GC_never_stop_func ()
{
  GC_bool D.5738;

  D.5738 = 0;
  return D.5738;
}


GC_timeout_stop_func ()
{
  unsigned int count.0;
  unsigned int count.1;
  unsigned int count.2;
  unsigned int D.5743;
  int D.5746;
  long int GC_start_time.3;
  long int D.5748;
  double D.5749;
  double D.5750;
  double D.5751;
  long unsigned int GC_time_limit.4;
  int GC_print_stats.5;
  long int time_diff.6;
  int GC_n_attempts.7;
  long int D.5760;
  clock_t current_time;
  static unsigned int count = 0;
  long unsigned int time_diff;

  count.0 = count;
  count.1 = count.0;
  count.2 = count.1 + 1;
  count = count.2;
  D.5743 = count.1 & 3;
  if (D.5743 != 0) goto <D.5744>; else goto <D.5745>;
  <D.5744>:
  D.5746 = 0;
  return D.5746;
  <D.5745>:
  current_time = clock ();
  GC_start_time.3 = GC_start_time;
  D.5748 = current_time - GC_start_time.3;
  D.5749 = (double) D.5748;
  D.5750 = D.5749 * 1.0e+3;
  D.5751 = D.5750 / 1.0e+6;
  time_diff = (long unsigned int) D.5751;
  GC_time_limit.4 = GC_time_limit;
  if (time_diff >= GC_time_limit.4) goto <D.5753>; else goto <D.5754>;
  <D.5753>:
  GC_print_stats.5 = GC_print_stats;
  if (GC_print_stats.5 != 0) goto <D.5756>; else goto <D.5757>;
  <D.5756>:
  GC_printf ("Abandoning stopped marking after ", 0, 0, 0, 0, 0, 0);
  time_diff.6 = (long int) time_diff;
  GC_printf ("%lu msecs", time_diff.6, 0, 0, 0, 0, 0);
  GC_n_attempts.7 = GC_n_attempts;
  D.5760 = (long int) GC_n_attempts.7;
  GC_printf ("(attempt %ld)\n", D.5760, 0, 0, 0, 0, 0);
  <D.5757>:
  D.5746 = 1;
  return D.5746;
  <D.5754>:
  D.5746 = 0;
  return D.5746;
}


GC_adj_words_allocd ()
{
  long unsigned int GC_non_gc_bytes.8;
  long int GC_non_gc_bytes.9;
  long unsigned int D.5764;
  long int D.5765;
  long int D.5766;
  long unsigned int D.5767;
  long int D.5768;
  long unsigned int D.5769;
  long int D.5770;
  long int D.5771;
  long unsigned int D.5772;
  long int D.5773;
  long int D.5774;
  long unsigned int D.5777;
  long unsigned int result.10;
  long unsigned int D.5779;
  long unsigned int D.5780;
  long unsigned int D.5781;
  long unsigned int D.5784;
  long unsigned int D.5785;
  long int D.5786;
  word D.5789;
  register signed_word result;
  register signed_word expl_managed;

  GC_non_gc_bytes.8 = GC_non_gc_bytes;
  GC_non_gc_bytes.9 = (long int) GC_non_gc_bytes.8;
  D.5764 = GC_arrays._non_gc_bytes_at_gc;
  D.5765 = (long int) D.5764;
  D.5766 = GC_non_gc_bytes.9 - D.5765;
  expl_managed = D.5766 >> 3;
  D.5767 = GC_arrays._words_allocd;
  D.5768 = (long int) D.5767;
  D.5769 = GC_arrays._mem_freed;
  D.5770 = (long int) D.5769;
  D.5771 = D.5768 - D.5770;
  D.5772 = GC_arrays._finalizer_mem_freed;
  D.5773 = (long int) D.5772;
  D.5774 = D.5771 + D.5773;
  result = D.5774 - expl_managed;
  D.5767 = GC_arrays._words_allocd;
  D.5768 = (long int) D.5767;
  if (D.5768 < result) goto <D.5775>; else goto <D.5776>;
  <D.5775>:
  D.5767 = GC_arrays._words_allocd;
  result = (signed_word) D.5767;
  <D.5776>:
  D.5777 = GC_arrays._words_finalized;
  result.10 = (long unsigned int) result;
  D.5779 = D.5777 + result.10;
  result = (signed_word) D.5779;
  D.5780 = GC_arrays._words_wasted;
  D.5781 = D.5780 >> 3;
  result.10 = (long unsigned int) result;
  if (D.5781 < result.10) goto <D.5782>; else goto <D.5783>;
  <D.5782>:
  D.5780 = GC_arrays._words_wasted;
  result.10 = (long unsigned int) result;
  D.5784 = D.5780 + result.10;
  result = (signed_word) D.5784;
  <D.5783>:
  D.5767 = GC_arrays._words_allocd;
  D.5785 = D.5767 >> 3;
  D.5786 = (long int) D.5785;
  if (D.5786 > result) goto <D.5787>; else goto <D.5788>;
  <D.5787>:
  D.5767 = GC_arrays._words_allocd;
  D.5789 = D.5767 >> 3;
  return D.5789;
  <D.5788>:
  D.5789 = (word) result;
  return D.5789;
}


GC_clear_a_few_frames ()
{
  word frames[64];
  register int i;

  try
    {
      i = 0;
      goto <D.5577>;
      <D.5576>:
      frames[i] = 0;
      i = i + 1;
      <D.5577>:
      if (i <= 63) goto <D.5576>; else goto <D.5578>;
      <D.5578>:
    }
  finally
    {
      frames = {CLOBBER};
    }
}


GC_should_collect ()
{
  GC_bool D.5791;
  int iftmp.11;
  long unsigned int D.5796;
  long unsigned int D.5797;
  long unsigned int D.5799;
  long unsigned int GC_collect_at_heapsize.12;

  D.5796 = GC_adj_words_allocd ();
  D.5797 = min_words_allocd ();
  if (D.5796 >= D.5797) goto <D.5793>; else goto <D.5798>;
  <D.5798>:
  D.5799 = GC_arrays._heapsize;
  GC_collect_at_heapsize.12 = GC_collect_at_heapsize;
  if (D.5799 >= GC_collect_at_heapsize.12) goto <D.5793>; else goto <D.5794>;
  <D.5793>:
  iftmp.11 = 1;
  goto <D.5795>;
  <D.5794>:
  iftmp.11 = 0;
  <D.5795>:
  D.5791 = iftmp.11;
  return D.5791;
}


min_words_allocd ()
{
  long int D.5804;
  long unsigned int D.5805;
  long unsigned int GC_root_size.13;
  long unsigned int D.5807;
  long unsigned int D.5808;
  long unsigned int D.5809;
  long unsigned int D.5810;
  long unsigned int D.5811;
  long unsigned int D.5812;
  int GC_incremental.14;
  long unsigned int GC_time_limit.15;
  word D.5818;
  long unsigned int GC_free_space_divisor.16;
  long unsigned int D.5820;
  register signed_word stack_size;
  word total_root_size;
  word scan_size;

  stack_size = 10000;
  if (stack_size < 0) goto <D.5802>; else goto <D.5803>;
  <D.5802>:
  stack_size = -stack_size;
  <D.5803>:
  D.5804 = stack_size * 2;
  D.5805 = (long unsigned int) D.5804;
  GC_root_size.13 = GC_root_size;
  total_root_size = D.5805 + GC_root_size.13;
  D.5807 = GC_arrays._heapsize;
  D.5808 = GC_arrays._large_free_bytes;
  D.5809 = D.5807 - D.5808;
  D.5808 = GC_arrays._large_free_bytes;
  D.5810 = D.5808 >> 2;
  D.5811 = D.5809 + D.5810;
  D.5812 = D.5811 + total_root_size;
  scan_size = D.5812 >> 3;
  GC_incremental.14 = GC_incremental;
  if (GC_incremental.14 != 0) goto <D.5815>; else goto <D.5813>;
  <D.5815>:
  GC_time_limit.15 = GC_time_limit;
  if (GC_time_limit.15 != 999999) goto <D.5817>; else goto <D.5813>;
  <D.5817>:
  GC_free_space_divisor.16 = GC_free_space_divisor;
  D.5820 = GC_free_space_divisor.16 * 2;
  D.5818 = scan_size / D.5820;
  return D.5818;
  <D.5813>:
  GC_free_space_divisor.16 = GC_free_space_divisor;
  D.5818 = scan_size / GC_free_space_divisor.16;
  return D.5818;
}


GC_notify_full_gc ()
{
  void (*<T3a4>) (void) GC_start_call_back.17;

  GC_start_call_back.17 = GC_start_call_back;
  if (GC_start_call_back.17 != 0B) goto <D.5823>; else goto <D.5824>;
  <D.5823>:
  GC_start_call_back.17 = GC_start_call_back;
  GC_start_call_back.17 ();
  <D.5824>:
}


GC_maybe_gc ()
{
  int D.5825;
  int GC_incremental.18;
  int GC_need_full_gc.19;
  int n_partial_gcs.20;
  int GC_full_freq.21;
  int GC_print_stats.22;
  long unsigned int D.5841;
  long unsigned int D.5842;
  long int D.5843;
  long unsigned int GC_gc_no.23;
  long int GC_gc_no.24;
  long int D.5846;
  int n_partial_gcs.25;
  long unsigned int GC_time_limit.26;
  long int GC_start_time.27;
  int (*GC_stop_func) (void) iftmp.28;
  int D.5856;
  int GC_is_full_gc.29;
  int GC_n_attempts.30;
  int GC_n_attempts.31;
  static int n_partial_gcs = 0;

  D.5825 = GC_should_collect ();
  if (D.5825 != 0) goto <D.5826>; else goto <D.5827>;
  <D.5826>:
  GC_incremental.18 = GC_incremental;
  if (GC_incremental.18 == 0) goto <D.5829>; else goto <D.5830>;
  <D.5829>:
  GC_try_to_collect_inner (GC_never_stop_func);
  n_partial_gcs = 0;
  return;
  <D.5830>:
  GC_wait_for_reclaim ();
  GC_need_full_gc.19 = GC_need_full_gc;
  if (GC_need_full_gc.19 != 0) goto <D.5831>; else goto <D.5835>;
  <D.5835>:
  n_partial_gcs.20 = n_partial_gcs;
  GC_full_freq.21 = GC_full_freq;
  if (n_partial_gcs.20 >= GC_full_freq.21) goto <D.5831>; else goto <D.5832>;
  <D.5831>:
  GC_print_stats.22 = GC_print_stats;
  if (GC_print_stats.22 != 0) goto <D.5839>; else goto <D.5840>;
  <D.5839>:
  D.5841 = GC_arrays._words_allocd;
  D.5842 = D.5841 << 3;
  D.5843 = (long int) D.5842;
  GC_gc_no.23 = GC_gc_no;
  GC_gc_no.24 = (long int) GC_gc_no.23;
  D.5846 = GC_gc_no.24 + 1;
  GC_printf ("***>Full mark for collection %lu after %ld allocd bytes\n", D.5846, D.5843, 0, 0, 0, 0);
  <D.5840>:
  GC_promote_black_lists ();
  GC_reclaim_all (0B, 1);
  GC_clear_marks ();
  n_partial_gcs = 0;
  GC_notify_full_gc ();
  GC_is_full_gc = 1;
  goto <D.5833>;
  <D.5832>:
  n_partial_gcs.20 = n_partial_gcs;
  n_partial_gcs.25 = n_partial_gcs.20 + 1;
  n_partial_gcs = n_partial_gcs.25;
  <D.5833>:
  GC_time_limit.26 = GC_time_limit;
  if (GC_time_limit.26 != 999999) goto <D.5849>; else goto <D.5850>;
  <D.5849>:
  GC_start_time.27 = clock ();
  GC_start_time = GC_start_time.27;
  <D.5850>:
  GC_time_limit.26 = GC_time_limit;
  if (GC_time_limit.26 == 999999) goto <D.5853>; else goto <D.5854>;
  <D.5853>:
  iftmp.28 = GC_never_stop_func;
  goto <D.5855>;
  <D.5854>:
  iftmp.28 = GC_timeout_stop_func;
  <D.5855>:
  D.5856 = GC_stopped_mark (iftmp.28);
  if (D.5856 != 0) goto <D.5857>; else goto <D.5858>;
  <D.5857>:
  GC_finish_collection ();
  goto <D.5859>;
  <D.5858>:
  GC_is_full_gc.29 = GC_is_full_gc;
  if (GC_is_full_gc.29 == 0) goto <D.5861>; else goto <D.5862>;
  <D.5861>:
  GC_n_attempts.30 = GC_n_attempts;
  GC_n_attempts.31 = GC_n_attempts.30 + 1;
  GC_n_attempts = GC_n_attempts.31;
  <D.5862>:
  <D.5859>:
  <D.5827>:
}


GC_try_to_collect_inner (int (*GC_stop_func) (void) stop_func)
{
  int GC_dont_gc.32;
  GC_bool D.5869;
  void (*<T39d>) (GCEventType) GC_notify_event.33;
  int GC_incremental.34;
  int D.5876;
  int GC_print_stats.35;
  int D.5882;
  int D.5885;
  long unsigned int D.5892;
  long unsigned int D.5893;
  long int D.5894;
  long unsigned int GC_gc_no.36;
  long int GC_gc_no.37;
  long int D.5897;
  int GC_find_leak.38;
  int D.5902;
  int D.5905;
  long int D.5912;
  double D.5913;
  double D.5914;
  double D.5915;
  long unsigned int D.5916;
  long int D.5917;
  clock_t start_time;
  clock_t current_time;

  GC_dont_gc.32 = GC_dont_gc;
  if (GC_dont_gc.32 != 0) goto <D.5867>; else goto <D.5868>;
  <D.5867>:
  D.5869 = 0;
  return D.5869;
  <D.5868>:
  GC_notify_event.33 = GC_notify_event;
  if (GC_notify_event.33 != 0B) goto <D.5871>; else goto <D.5872>;
  <D.5871>:
  GC_notify_event.33 = GC_notify_event;
  GC_notify_event.33 (0);
  <D.5872>:
  GC_incremental.34 = GC_incremental;
  if (GC_incremental.34 != 0) goto <D.5874>; else goto <D.5875>;
  <D.5874>:
  D.5876 = GC_collection_in_progress ();
  if (D.5876 != 0) goto <D.5877>; else goto <D.5878>;
  <D.5877>:
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.5880>; else goto <D.5881>;
  <D.5880>:
  GC_printf ("GC_try_to_collect_inner: finishing collection in progress\n", 0, 0, 0, 0, 0, 0);
  <D.5881>:
  goto <D.5595>;
  <D.5594>:
  D.5882 = stop_func ();
  if (D.5882 != 0) goto <D.5883>; else goto <D.5884>;
  <D.5883>:
  D.5869 = 0;
  return D.5869;
  <D.5884>:
  GC_collect_a_little_inner (1);
  <D.5595>:
  D.5885 = GC_collection_in_progress ();
  if (D.5885 != 0) goto <D.5594>; else goto <D.5596>;
  <D.5596>:
  <D.5878>:
  <D.5875>:
  if (stop_func == GC_never_stop_func) goto <D.5886>; else goto <D.5887>;
  <D.5886>:
  GC_notify_full_gc ();
  <D.5887>:
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.5888>; else goto <D.5889>;
  <D.5888>:
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.5890>; else goto <D.5891>;
  <D.5890>:
  start_time = clock ();
  <D.5891>:
  D.5892 = GC_arrays._words_allocd;
  D.5893 = D.5892 << 3;
  D.5894 = (long int) D.5893;
  GC_gc_no.36 = GC_gc_no;
  GC_gc_no.37 = (long int) GC_gc_no.36;
  D.5897 = GC_gc_no.37 + 1;
  GC_printf ("Initiating full world-stop collection %lu after %ld allocd bytes\n", D.5897, D.5894, 0, 0, 0, 0);
  <D.5889>:
  GC_promote_black_lists ();
  GC_wait_for_reclaim ();
  GC_find_leak.38 = GC_find_leak;
  if (GC_find_leak.38 != 0) goto <D.5898>; else goto <D.5901>;
  <D.5901>:
  if (stop_func != GC_never_stop_func) goto <D.5898>; else goto <D.5899>;
  <D.5898>:
  D.5902 = GC_reclaim_all (stop_func, 0);
  if (D.5902 == 0) goto <D.5903>; else goto <D.5904>;
  <D.5903>:
  D.5869 = 0;
  return D.5869;
  <D.5904>:
  <D.5899>:
  GC_invalidate_mark_state ();
  GC_clear_marks ();
  GC_is_full_gc = 1;
  D.5905 = GC_stopped_mark (stop_func);
  if (D.5905 == 0) goto <D.5906>; else goto <D.5907>;
  <D.5906>:
  GC_incremental.34 = GC_incremental;
  if (GC_incremental.34 == 0) goto <D.5908>; else goto <D.5909>;
  <D.5908>:
  GC_invalidate_mark_state ();
  GC_unpromote_black_lists ();
  <D.5909>:
  D.5869 = 0;
  return D.5869;
  <D.5907>:
  GC_finish_collection ();
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.5910>; else goto <D.5911>;
  <D.5910>:
  current_time = clock ();
  D.5912 = current_time - start_time;
  D.5913 = (double) D.5912;
  D.5914 = D.5913 * 1.0e+3;
  D.5915 = D.5914 / 1.0e+6;
  D.5916 = (long unsigned int) D.5915;
  D.5917 = (long int) D.5916;
  GC_printf ("Complete collection took %lu msecs\n", D.5917, 0, 0, 0, 0, 0);
  <D.5911>:
  GC_notify_event.33 = GC_notify_event;
  if (GC_notify_event.33 != 0B) goto <D.5918>; else goto <D.5919>;
  <D.5918>:
  GC_notify_event.33 = GC_notify_event;
  GC_notify_event.33 (5);
  <D.5919>:
  D.5869 = 1;
  return D.5869;
}


GC_collect_a_little_inner (int n)
{
  int GC_dont_gc.39;
  int GC_incremental.40;
  int D.5928;
  int D.5930;
  int GC_n_attempts.41;
  long unsigned int GC_time_limit.42;
  long int GC_start_time.43;
  int D.5940;
  int GC_n_attempts.44;
  int D.5944;
  int GC_deficit.45;
  int D.5948;
  int GC_deficit.46;
  register int i;

  GC_dont_gc.39 = GC_dont_gc;
  if (GC_dont_gc.39 != 0) goto <D.5922>; else goto <D.5923>;
  <D.5922>:
  return;
  <D.5923>:
  GC_incremental.40 = GC_incremental;
  if (GC_incremental.40 != 0) goto <D.5927>; else goto <D.5924>;
  <D.5927>:
  D.5928 = GC_collection_in_progress ();
  if (D.5928 != 0) goto <D.5929>; else goto <D.5924>;
  <D.5929>:
  i = GC_deficit;
  goto <D.5604>;
  <D.5603>:
  D.5930 = GC_mark_some (0B);
  if (D.5930 != 0) goto <D.5931>; else goto <D.5932>;
  <D.5931>:
  GC_wait_for_reclaim ();
  GC_n_attempts.41 = GC_n_attempts;
  if (GC_n_attempts.41 <= 0) goto <D.5936>; else goto <D.5933>;
  <D.5936>:
  GC_time_limit.42 = GC_time_limit;
  if (GC_time_limit.42 != 999999) goto <D.5938>; else goto <D.5933>;
  <D.5938>:
  GC_start_time.43 = clock ();
  GC_start_time = GC_start_time.43;
  D.5940 = GC_stopped_mark (GC_timeout_stop_func);
  if (D.5940 == 0) goto <D.5941>; else goto <D.5942>;
  <D.5941>:
  GC_n_attempts.41 = GC_n_attempts;
  GC_n_attempts.44 = GC_n_attempts.41 + 1;
  GC_n_attempts = GC_n_attempts.44;
  goto <D.5602>;
  <D.5942>:
  goto <D.5934>;
  <D.5933>:
  GC_stopped_mark (GC_never_stop_func);
  <D.5934>:
  GC_finish_collection ();
  goto <D.5602>;
  <D.5932>:
  i = i + 1;
  <D.5604>:
  D.5944 = n * 10;
  if (D.5944 > i) goto <D.5603>; else goto <D.5602>;
  <D.5602>:
  GC_deficit.45 = GC_deficit;
  if (GC_deficit.45 > 0) goto <D.5946>; else goto <D.5947>;
  <D.5946>:
  D.5948 = n * -10;
  GC_deficit.45 = GC_deficit;
  GC_deficit.46 = D.5948 + GC_deficit.45;
  GC_deficit = GC_deficit.46;
  <D.5947>:
  GC_deficit.45 = GC_deficit;
  if (GC_deficit.45 < 0) goto <D.5950>; else goto <D.5951>;
  <D.5950>:
  GC_deficit = 0;
  <D.5951>:
  goto <D.5925>;
  <D.5924>:
  GC_maybe_gc ();
  <D.5925>:
}


GC_collect_a_little ()
{
  int D.5953;
  int GC_debugging_started.47;
  void (*<T3a4>) (void) GC_print_all_smashed.48;
  int D.5962;
  int result;

  D.5953 = pthread_mutex_trylock (&GC_allocate_ml);
  if (D.5953 != 0) goto <D.5954>; else goto <D.5955>;
  <D.5954>:
  GC_lock ();
  <D.5955>:
  GC_collect_a_little_inner (1);
  result = GC_collection_in_progress ();
  pthread_mutex_unlock (&GC_allocate_ml);
  if (result == 0) goto <D.5956>; else goto <D.5957>;
  <D.5956>:
  GC_debugging_started.47 = GC_debugging_started;
  if (GC_debugging_started.47 != 0) goto <D.5959>; else goto <D.5960>;
  <D.5959>:
  GC_print_all_smashed.48 = GC_print_all_smashed;
  GC_print_all_smashed.48 ();
  <D.5960>:
  <D.5957>:
  D.5962 = result;
  return D.5962;
}


GC_stopped_mark (int (*GC_stop_func) (void) stop_func)
{
  int GC_print_stats.49;
  void (*<T39d>) (GCEventType) GC_notify_event.50;
  long unsigned int GC_gc_no.51;
  long int GC_gc_no.52;
  long int D.5974;
  long unsigned int D.5975;
  long unsigned int D.5976;
  long int D.5977;
  long unsigned int D.5978;
  long unsigned int D.5979;
  long int D.5980;
  int D.5981;
  long int D.5986;
  GC_bool D.5987;
  int D.5988;
  long unsigned int GC_gc_no.53;
  long int D.5993;
  long unsigned int D.5996;
  long int D.5997;
  int GC_debugging_started.54;
  void (*<T3a4>) (void) GC_check_heap.55;
  long int D.6006;
  double D.6007;
  double D.6008;
  double D.6009;
  long unsigned int D.6010;
  long int D.6011;
  register int i;
  int dummy;
  clock_t start_time;
  clock_t current_time;
  extern int GC_cond_register_dynamic_libraries ();

  try
    {
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.5965>; else goto <D.5966>;
      <D.5965>:
      start_time = clock ();
      <D.5966>:
      GC_cond_register_dynamic_libraries ();
      GC_stop_world ();
      GC_world_stopped = 1;
      GC_notify_event.50 = GC_notify_event;
      if (GC_notify_event.50 != 0B) goto <D.5968>; else goto <D.5969>;
      <D.5968>:
      GC_notify_event.50 = GC_notify_event;
      GC_notify_event.50 (1);
      <D.5969>:
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.5970>; else goto <D.5971>;
      <D.5970>:
      GC_gc_no.51 = GC_gc_no;
      GC_gc_no.52 = (long int) GC_gc_no.51;
      D.5974 = GC_gc_no.52 + 1;
      GC_printf ("--> Marking for collection %lu ", D.5974, 0, 0, 0, 0, 0);
      D.5975 = GC_arrays._words_wasted;
      D.5976 = D.5975 << 3;
      D.5977 = (long int) D.5976;
      D.5978 = GC_arrays._words_allocd;
      D.5979 = D.5978 << 3;
      D.5980 = (long int) D.5979;
      GC_printf ("after %lu allocd bytes + %lu wasted bytes\n", D.5980, D.5977, 0, 0, 0, 0);
      <D.5971>:
      GC_clear_a_few_frames ();
      GC_noop (0B, 0, 0, 0, 0, 0);
      GC_initiate_gc ();
      i = 0;
      <D.5617>:
      D.5981 = stop_func ();
      if (D.5981 != 0) goto <D.5982>; else goto <D.5983>;
      <D.5982>:
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.5984>; else goto <D.5985>;
      <D.5984>:
      GC_printf ("Abandoned stopped marking after ", 0, 0, 0, 0, 0, 0);
      D.5986 = (long int) i;
      GC_printf ("%lu iterations\n", D.5986, 0, 0, 0, 0, 0);
      <D.5985>:
      GC_deficit = i;
      GC_world_stopped = 0;
      GC_start_world ();
      D.5987 = 0;
      return D.5987;
      <D.5983>:
      D.5988 = GC_mark_some (&dummy);
      if (D.5988 != 0) goto <D.5616>; else goto <D.5989>;
      <D.5989>:
      i = i + 1;
      goto <D.5617>;
      <D.5616>:
      GC_gc_no.51 = GC_gc_no;
      GC_gc_no.53 = GC_gc_no.51 + 1;
      GC_gc_no = GC_gc_no.53;
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.5991>; else goto <D.5992>;
      <D.5991>:
      GC_gc_no.51 = GC_gc_no;
      GC_gc_no.52 = (long int) GC_gc_no.51;
      D.5993 = GC_gc_no.52 + -1;
      GC_printf ("Collection %lu finished", D.5993, 0, 0, 0, 0, 0);
      <D.5992>:
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.5994>; else goto <D.5995>;
      <D.5994>:
      D.5996 = GC_arrays._heapsize;
      D.5997 = (long int) D.5996;
      GC_printf (" ---> heapsize = %lu bytes\n", D.5997, 0, 0, 0, 0, 0);
      GC_printf ("", 0, 0, 0, 0, 0, 0);
      <D.5995>:
      GC_debugging_started.54 = GC_debugging_started;
      if (GC_debugging_started.54 != 0) goto <D.5999>; else goto <D.6000>;
      <D.5999>:
      GC_check_heap.55 = GC_check_heap;
      GC_check_heap.55 ();
      <D.6000>:
      GC_notify_event.50 = GC_notify_event;
      if (GC_notify_event.50 != 0B) goto <D.6002>; else goto <D.6003>;
      <D.6002>:
      GC_notify_event.50 = GC_notify_event;
      GC_notify_event.50 (2);
      <D.6003>:
      GC_world_stopped = 0;
      GC_start_world ();
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.6004>; else goto <D.6005>;
      <D.6004>:
      current_time = clock ();
      D.6006 = current_time - start_time;
      D.6007 = (double) D.6006;
      D.6008 = D.6007 * 1.0e+3;
      D.6009 = D.6008 / 1.0e+6;
      D.6010 = (long unsigned int) D.6009;
      D.6011 = (long int) D.6010;
      GC_printf ("World-stopped marking took %lu msecs\n", D.6011, 0, 0, 0, 0, 0);
      <D.6005>:
      D.5987 = 1;
      return D.5987;
    }
  finally
    {
      dummy = {CLOBBER};
    }
}


GC_set_fl_marks (char * q)
{
  long unsigned int p.56;
  long unsigned int D.6015;
  long int p.57;
  long int h.58;
  long int D.6020;
  long int D.6021;
  int D.6022;
  sizetype D.6023;
  int D.6024;
  long unsigned int D.6025;
  long unsigned int D.6026;
  word * D.6027;
  int D.6028;
  char * p;
  struct hblk * h;
  struct hblk * last_h;
  struct hdr * hhdr;
  int word_no;

  last_h = 0B;
  p = q;
  goto <D.5631>;
  <D.5630>:
  p.56 = (long unsigned int) p;
  D.6015 = p.56 & 18446744073709547520;
  h = (struct hblk *) D.6015;
  if (h != last_h) goto <D.6016>; else goto <D.6017>;
  <D.6016>:
  last_h = h;
  hhdr = GC_find_header (h);
  <D.6017>:
  p.57 = (long int) p;
  h.58 = (long int) h;
  D.6020 = p.57 - h.58;
  D.6021 = D.6020 /[ex] 8;
  word_no = (int) D.6021;
  {
    word old;

    <D.5628>:
    D.6022 = word_no >> 6;
    D.6023 = (sizetype) D.6022;
    old = hhdr->hb_marks[D.6023];
    D.6024 = word_no & 63;
    D.6025 = 1 << D.6024;
    D.6026 = D.6025 | old;
    D.6022 = word_no >> 6;
    D.6023 = (sizetype) D.6022;
    D.6027 = &hhdr->hb_marks[D.6023];
    D.6028 = GC_compare_and_exchange (D.6027, old, D.6026);
    if (D.6028 == 0) goto <D.5628>; else goto <D.5629>;
    <D.5629>:
  }
  p = MEM[(char * *)p];
  <D.5631>:
  if (p != 0B) goto <D.5630>; else goto <D.5632>;
  <D.5632>:
}


GC_compare_and_exchange (volatile GC_word * addr, GC_word old, GC_word new_val)
{
  GC_bool D.6029;
  char result;

  __asm__ __volatile__("lock; cmpxchgq %2, %0; setz %1" : "=m" *addr, "=r" result : "r" new_val, "a" old, "m" *addr : "memory");
  D.6029 = (GC_bool) result;
  return D.6029;
}


GC_clear_fl_marks (char * q)
{
  long unsigned int p.59;
  long unsigned int D.6032;
  long int p.60;
  long int h.61;
  long int D.6037;
  long int D.6038;
  int D.6039;
  long unsigned int D.6040;
  int D.6041;
  long unsigned int D.6042;
  long unsigned int D.6043;
  long unsigned int D.6044;
  char * p;
  struct hblk * h;
  struct hblk * last_h;
  struct hdr * hhdr;
  int word_no;

  last_h = 0B;
  p = q;
  goto <D.5642>;
  <D.5641>:
  p.59 = (long unsigned int) p;
  D.6032 = p.59 & 18446744073709547520;
  h = (struct hblk *) D.6032;
  if (h != last_h) goto <D.6033>; else goto <D.6034>;
  <D.6033>:
  last_h = h;
  hhdr = GC_find_header (h);
  <D.6034>:
  p.60 = (long int) p;
  h.61 = (long int) h;
  D.6037 = p.60 - h.61;
  D.6038 = D.6037 /[ex] 8;
  word_no = (int) D.6038;
  D.6039 = word_no >> 6;
  D.6039 = word_no >> 6;
  D.6040 = hhdr->hb_marks[D.6039];
  D.6041 = word_no & 63;
  D.6042 = 1 << D.6041;
  D.6043 = ~D.6042;
  D.6044 = D.6040 & D.6043;
  hhdr->hb_marks[D.6039] = D.6044;
  p = MEM[(char * *)p];
  <D.5642>:
  if (p != 0B) goto <D.5641>; else goto <D.5643>;
  <D.5643>:
}


GC_finish_collection ()
{
  void (*<T39d>) (GCEventType) GC_notify_event.62;
  char * D.6048;
  int GC_dump_regularly.63;
  int GC_find_leak.64;
  char * * D.6057;
  long unsigned int D.6058;
  char * * D.6059;
  int GC_n_kinds.65;
  int GC_print_back_height.66;
  char * * D.6066;
  long unsigned int D.6067;
  char * * D.6068;
  int GC_is_full_gc.67;
  long unsigned int D.6074;
  long unsigned int D.6075;
  long unsigned int GC_used_heap_size_after_full.68;
  long unsigned int GC_used_heap_size_after_full.69;
  long unsigned int D.6079;
  long unsigned int D.6080;
  long unsigned int D.6081;
  _Bool D.6082;
  int GC_need_full_gc.70;
  long unsigned int D.6084;
  long unsigned int D.6085;
  long unsigned int D.6086;
  long unsigned int GC_non_gc_bytes.71;

  GC_notify_event.62 = GC_notify_event;
  if (GC_notify_event.62 != 0B) goto <D.6046>; else goto <D.6047>;
  <D.6046>:
  GC_notify_event.62 = GC_notify_event;
  GC_notify_event.62 (3);
  <D.6047>:
  D.6048 = getenv ("GC_PRINT_ADDRESS_MAP");
  if (D.6048 != 0B) goto <D.6049>; else goto <D.6050>;
  <D.6049>:
  GC_print_address_map ();
  <D.6050>:
  GC_dump_regularly.63 = GC_dump_regularly;
  if (GC_dump_regularly.63 != 0) goto <D.6052>; else goto <D.6053>;
  <D.6052>:
  GC_dump ();
  <D.6053>:
  GC_find_leak.64 = GC_find_leak;
  if (GC_find_leak.64 != 0) goto <D.6055>; else goto <D.6056>;
  <D.6055>:
  {
    register word size;
    int kind;
    char * q;

    kind = 0;
    goto <D.5657>;
    <D.5656>:
    size = 1;
    goto <D.5654>;
    <D.5653>:
    D.6057 = GC_obj_kinds[kind].ok_freelist;
    D.6058 = size * 8;
    D.6059 = D.6057 + D.6058;
    q = *D.6059;
    if (q != 0B) goto <D.6060>; else goto <D.6061>;
    <D.6060>:
    GC_set_fl_marks (q);
    <D.6061>:
    size = size + 1;
    <D.5654>:
    if (size <= 256) goto <D.5653>; else goto <D.5655>;
    <D.5655>:
    kind = kind + 1;
    <D.5657>:
    GC_n_kinds.65 = GC_n_kinds;
    if (kind < GC_n_kinds.65) goto <D.5656>; else goto <D.5658>;
    <D.5658>:
  }
  GC_start_reclaim (1);
  <D.6056>:
  GC_finalize ();
  GC_print_back_height.66 = GC_print_back_height;
  if (GC_print_back_height.66 != 0) goto <D.6064>; else goto <D.6065>;
  <D.6064>:
  GC_err_puts ("Back height not available: Rebuild collector with -DMAKE_BACK_GRAPH\n");
  <D.6065>:
  {
    register word size;
    register char * q;
    int kind;

    kind = 0;
    goto <D.5666>;
    <D.5665>:
    size = 1;
    goto <D.5663>;
    <D.5662>:
    D.6066 = GC_obj_kinds[kind].ok_freelist;
    D.6067 = size * 8;
    D.6068 = D.6066 + D.6067;
    q = *D.6068;
    if (q != 0B) goto <D.6069>; else goto <D.6070>;
    <D.6069>:
    GC_clear_fl_marks (q);
    <D.6070>:
    size = size + 1;
    <D.5663>:
    if (size <= 256) goto <D.5662>; else goto <D.5664>;
    <D.5664>:
    kind = kind + 1;
    <D.5666>:
    GC_n_kinds.65 = GC_n_kinds;
    if (kind < GC_n_kinds.65) goto <D.5665>; else goto <D.5667>;
    <D.5667>:
  }
  GC_start_reclaim (0);
  GC_is_full_gc.67 = GC_is_full_gc;
  if (GC_is_full_gc.67 != 0) goto <D.6072>; else goto <D.6073>;
  <D.6072>:
  D.6074 = GC_arrays._heapsize;
  D.6075 = GC_arrays._large_free_bytes;
  GC_used_heap_size_after_full.68 = D.6074 - D.6075;
  GC_used_heap_size_after_full = GC_used_heap_size_after_full.68;
  GC_need_full_gc = 0;
  goto <D.6077>;
  <D.6073>:
  D.6074 = GC_arrays._heapsize;
  D.6075 = GC_arrays._large_free_bytes;
  GC_used_heap_size_after_full.68 = D.6074 - D.6075;
  GC_used_heap_size_after_full.69 = GC_used_heap_size_after_full;
  D.6079 = GC_used_heap_size_after_full.68 - GC_used_heap_size_after_full.69;
  D.6080 = D.6079 >> 3;
  D.6081 = min_words_allocd ();
  D.6082 = D.6080 > D.6081;
  GC_need_full_gc.70 = (int) D.6082;
  GC_need_full_gc = GC_need_full_gc.70;
  <D.6077>:
  GC_n_attempts = 0;
  GC_is_full_gc = 0;
  D.6084 = GC_arrays._words_allocd_before_gc;
  D.6085 = GC_arrays._words_allocd;
  D.6086 = D.6084 + D.6085;
  GC_arrays._words_allocd_before_gc = D.6086;
  GC_non_gc_bytes.71 = GC_non_gc_bytes;
  GC_arrays._non_gc_bytes_at_gc = GC_non_gc_bytes.71;
  GC_arrays._words_allocd = 0;
  GC_arrays._words_wasted = 0;
  GC_arrays._mem_freed = 0;
  GC_arrays._finalizer_mem_freed = 0;
  GC_unmap_old ();
  GC_notify_event.62 = GC_notify_event;
  if (GC_notify_event.62 != 0B) goto <D.6088>; else goto <D.6089>;
  <D.6088>:
  GC_notify_event.62 = GC_notify_event;
  GC_notify_event.62 (4);
  <D.6089>:
}


GC_try_to_collect (int (*GC_stop_func) (void) stop_func)
{
  int GC_debugging_started.72;
  void (*<T3a4>) (void) GC_print_all_smashed.73;
  int D.6094;
  int GC_is_initialized.74;
  int D.6104;
  int result;

  GC_debugging_started.72 = GC_debugging_started;
  if (GC_debugging_started.72 != 0) goto <D.6091>; else goto <D.6092>;
  <D.6091>:
  GC_print_all_smashed.73 = GC_print_all_smashed;
  GC_print_all_smashed.73 ();
  <D.6092>:
  GC_notify_or_invoke_finalizers ();
  D.6094 = pthread_mutex_trylock (&GC_allocate_ml);
  if (D.6094 != 0) goto <D.6095>; else goto <D.6096>;
  <D.6095>:
  GC_lock ();
  <D.6096>:
  GC_collecting = 1;
  GC_is_initialized.74 = GC_is_initialized;
  if (GC_is_initialized.74 == 0) goto <D.6098>; else goto <D.6099>;
  <D.6098>:
  GC_init_inner ();
  <D.6099>:
  GC_noop (0B, 0, 0, 0, 0, 0);
  result = GC_try_to_collect_inner (stop_func);
  GC_collecting = 0;
  pthread_mutex_unlock (&GC_allocate_ml);
  if (result != 0) goto <D.6100>; else goto <D.6101>;
  <D.6100>:
  GC_debugging_started.72 = GC_debugging_started;
  if (GC_debugging_started.72 != 0) goto <D.6102>; else goto <D.6103>;
  <D.6102>:
  GC_print_all_smashed.73 = GC_print_all_smashed;
  GC_print_all_smashed.73 ();
  <D.6103>:
  GC_notify_or_invoke_finalizers ();
  <D.6101>:
  D.6104 = result;
  return D.6104;
}


GC_gcollect ()
{
  int GC_have_errors.75;

  GC_try_to_collect (GC_never_stop_func);
  GC_have_errors.75 = GC_have_errors;
  if (GC_have_errors.75 != 0) goto <D.6107>; else goto <D.6108>;
  <D.6107>:
  GC_print_all_errors ();
  <D.6108>:
}


GC_add_to_heap (struct hblk * p, word bytes)
{
  long unsigned int GC_n_heap_sects.76;
  long unsigned int GC_n_heap_sects.77;
  long unsigned int D.6115;
  long unsigned int D.6116;
  void * GC_least_plausible_heap_addr.78;
  void * GC_least_plausible_heap_addr.79;
  char * D.6122;
  void * GC_greatest_plausible_heap_addr.80;
  void * GC_greatest_plausible_heap_addr.81;
  word words;
  struct hdr * phdr;

  GC_n_heap_sects.76 = GC_n_heap_sects;
  if (GC_n_heap_sects.76 > 511) goto <D.6110>; else goto <D.6111>;
  <D.6110>:
  GC_abort ("Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS");
  <D.6111>:
  phdr = GC_install_header (p);
  if (phdr == 0B) goto <D.6112>; else goto <D.6113>;
  <D.6112>:
  return;
  <D.6113>:
  GC_n_heap_sects.76 = GC_n_heap_sects;
  GC_arrays._heap_sects[GC_n_heap_sects.76].hs_start = p;
  GC_n_heap_sects.76 = GC_n_heap_sects;
  GC_arrays._heap_sects[GC_n_heap_sects.76].hs_bytes = bytes;
  GC_n_heap_sects.76 = GC_n_heap_sects;
  GC_n_heap_sects.77 = GC_n_heap_sects.76 + 1;
  GC_n_heap_sects = GC_n_heap_sects.77;
  words = bytes >> 3;
  phdr->hb_sz = words;
  phdr->hb_map = 1B;
  phdr->hb_flags = 0;
  GC_freehblk (p);
  D.6115 = GC_arrays._heapsize;
  D.6116 = D.6115 + bytes;
  GC_arrays._heapsize = D.6116;
  GC_least_plausible_heap_addr.78 = GC_least_plausible_heap_addr;
  if (p <= GC_least_plausible_heap_addr.78) goto <D.6117>; else goto <D.6120>;
  <D.6120>:
  GC_least_plausible_heap_addr.78 = GC_least_plausible_heap_addr;
  if (GC_least_plausible_heap_addr.78 == 0B) goto <D.6117>; else goto <D.6118>;
  <D.6117>:
  GC_least_plausible_heap_addr.79 = p + 18446744073709551608;
  GC_least_plausible_heap_addr = GC_least_plausible_heap_addr.79;
  <D.6118>:
  D.6122 = p + bytes;
  GC_greatest_plausible_heap_addr.80 = GC_greatest_plausible_heap_addr;
  if (D.6122 >= GC_greatest_plausible_heap_addr.80) goto <D.6124>; else goto <D.6125>;
  <D.6124>:
  GC_greatest_plausible_heap_addr.81 = p + bytes;
  GC_greatest_plausible_heap_addr = GC_greatest_plausible_heap_addr.81;
  <D.6125>:
}


GC_print_heap_sects ()
{
  long unsigned int D.6128;
  long int D.6129;
  char * D.6130;
  long unsigned int D.6131;
  long int D.6132;
  long int start.82;
  long int D.6134;
  struct hblk * D.6135;
  struct hblk * D.6138;
  long unsigned int D.6139;
  long int D.6140;
  long int D.6141;
  long unsigned int D.6142;
  long unsigned int GC_n_heap_sects.83;
  register unsigned int i;

  D.6128 = GC_arrays._heapsize;
  D.6129 = (long int) D.6128;
  GC_printf ("Total heap size: %lu\n", D.6129, 0, 0, 0, 0, 0);
  i = 0;
  goto <D.5692>;
  <D.5691>:
  {
    long unsigned int start;
    long unsigned int len;
    struct hblk * h;
    unsigned int nbl;

    D.6130 = GC_arrays._heap_sects[i].hs_start;
    start = (long unsigned int) D.6130;
    len = GC_arrays._heap_sects[i].hs_bytes;
    nbl = 0;
    D.6131 = start + len;
    D.6132 = (long int) D.6131;
    start.82 = (long int) start;
    D.6134 = (long int) i;
    GC_printf ("Section %ld from 0x%lx to 0x%lx ", D.6134, start.82, D.6132, 0, 0, 0);
    h = (struct hblk *) start;
    goto <D.5689>;
    <D.5688>:
    D.6135 = GC_is_black_listed (h, 4096);
    if (D.6135 != 0B) goto <D.6136>; else goto <D.6137>;
    <D.6136>:
    nbl = nbl + 1;
    <D.6137>:
    h = h + 4096;
    <D.5689>:
    D.6131 = start + len;
    D.6138 = (struct hblk *) D.6131;
    if (D.6138 > h) goto <D.5688>; else goto <D.5690>;
    <D.5690>:
    D.6139 = len / 4096;
    D.6140 = (long int) D.6139;
    D.6141 = (long int) nbl;
    GC_printf ("%lu/%lu blacklisted\n", D.6141, D.6140, 0, 0, 0, 0);
  }
  i = i + 1;
  <D.5692>:
  D.6142 = (long unsigned int) i;
  GC_n_heap_sects.83 = GC_n_heap_sects;
  if (D.6142 < GC_n_heap_sects.83) goto <D.5691>; else goto <D.5693>;
  <D.5693>:
}


GC_max (char * x, char * y)
{
  char * D.6144;

  D.6144 = MAX_EXPR <y, x>;
  return D.6144;
}


GC_min (char * x, char * y)
{
  char * D.6146;

  D.6146 = MIN_EXPR <y, x>;
  return D.6146;
}


GC_set_max_heap_size (GC_word n)
{
  GC_arrays._max_heapsize = n;
}


GC_expand_hp_inner (word n)
{
  long unsigned int GC_page_size.84;
  long unsigned int D.6151;
  long unsigned int D.6152;
  long unsigned int D.6155;
  long unsigned int D.6156;
  GC_bool D.6159;
  int GC_print_stats.85;
  long int bytes.86;
  long unsigned int D.6168;
  long unsigned int D.6169;
  long int D.6170;
  long unsigned int D.6171;
  long unsigned int D.6172;
  char * D.6177;
  signed long space.87;
  sizetype D.6181;
  char * D.6182;
  void * GC_greatest_plausible_heap_addr.88;
  char * GC_greatest_plausible_heap_addr.89;
  sizetype D.6185;
  char * D.6186;
  void * GC_least_plausible_heap_addr.90;
  char * GC_least_plausible_heap_addr.91;
  long unsigned int D.6189;
  long unsigned int GC_collect_at_heapsize.92;
  void (*<T3a1>) (size_t) GC_on_heap_resize.93;
  word bytes;
  struct hblk * space;
  word expansion_slop;

  if (n <= 15) goto <D.6148>; else goto <D.6149>;
  <D.6148>:
  n = 16;
  <D.6149>:
  bytes = n * 4096;
  {
    word mask;

    GC_page_size.84 = GC_page_size;
    mask = GC_page_size.84 + 18446744073709551615;
    bytes = bytes + mask;
    D.6151 = ~mask;
    bytes = D.6151 & bytes;
  }
  D.6152 = GC_arrays._max_heapsize;
  if (D.6152 != 0) goto <D.6153>; else goto <D.6154>;
  <D.6153>:
  D.6155 = GC_arrays._heapsize;
  D.6156 = D.6155 + bytes;
  D.6152 = GC_arrays._max_heapsize;
  if (D.6156 > D.6152) goto <D.6157>; else goto <D.6158>;
  <D.6157>:
  D.6159 = 0;
  return D.6159;
  <D.6158>:
  <D.6154>:
  space = GC_unix_get_mem (bytes);
  if (space == 0B) goto <D.6160>; else goto <D.6161>;
  <D.6160>:
  GC_print_stats.85 = GC_print_stats;
  if (GC_print_stats.85 != 0) goto <D.6163>; else goto <D.6164>;
  <D.6163>:
  bytes.86 = (long int) bytes;
  GC_printf ("Failed to expand heap by %ld bytes\n", bytes.86, 0, 0, 0, 0, 0);
  <D.6164>:
  D.6159 = 0;
  return D.6159;
  <D.6161>:
  GC_print_stats.85 = GC_print_stats;
  if (GC_print_stats.85 != 0) goto <D.6166>; else goto <D.6167>;
  <D.6166>:
  D.6168 = GC_arrays._words_allocd;
  D.6169 = D.6168 << 3;
  D.6170 = (long int) D.6169;
  bytes.86 = (long int) bytes;
  GC_printf ("Increasing heap size by %lu after %lu allocated bytes\n", bytes.86, D.6170, 0, 0, 0, 0);
  <D.6167>:
  D.6171 = min_words_allocd ();
  D.6172 = D.6171 << 3;
  expansion_slop = D.6172 + 33554432;
  D.6177 = GC_arrays._last_heap_addr;
  if (D.6177 == 0B) goto <D.6178>; else goto <D.6173>;
  <D.6178>:
  space.87 = (signed long) space;
  if (space.87 >= 0) goto <D.6174>; else goto <D.6173>;
  <D.6173>:
  D.6177 = GC_arrays._last_heap_addr;
  if (D.6177 != 0B) goto <D.6180>; else goto <D.6175>;
  <D.6180>:
  D.6177 = GC_arrays._last_heap_addr;
  if (D.6177 < space) goto <D.6174>; else goto <D.6175>;
  <D.6174>:
  D.6181 = bytes + expansion_slop;
  D.6182 = space + D.6181;
  GC_greatest_plausible_heap_addr.88 = GC_greatest_plausible_heap_addr;
  GC_greatest_plausible_heap_addr.89 = GC_max (GC_greatest_plausible_heap_addr.88, D.6182);
  GC_greatest_plausible_heap_addr = GC_greatest_plausible_heap_addr.89;
  goto <D.6176>;
  <D.6175>:
  D.6185 = -expansion_slop;
  D.6186 = space + D.6185;
  GC_least_plausible_heap_addr.90 = GC_least_plausible_heap_addr;
  GC_least_plausible_heap_addr.91 = GC_min (GC_least_plausible_heap_addr.90, D.6186);
  GC_least_plausible_heap_addr = GC_least_plausible_heap_addr.91;
  <D.6176>:
  D.6177 = GC_arrays._last_heap_addr;
  GC_arrays._prev_heap_addr = D.6177;
  GC_arrays._last_heap_addr = space;
  GC_add_to_heap (space, bytes);
  D.6155 = GC_arrays._heapsize;
  D.6189 = D.6155 + expansion_slop;
  GC_collect_at_heapsize.92 = D.6189 + 18446744073692774400;
  GC_collect_at_heapsize = GC_collect_at_heapsize.92;
  GC_on_heap_resize.93 = GC_on_heap_resize;
  if (GC_on_heap_resize.93 != 0B) goto <D.6192>; else goto <D.6193>;
  <D.6192>:
  GC_on_heap_resize.93 = GC_on_heap_resize;
  D.6155 = GC_arrays._heapsize;
  GC_on_heap_resize.93 (D.6155);
  <D.6193>:
  D.6159 = 1;
  return D.6159;
}


GC_expand_hp (size_t bytes)
{
  int D.6195;
  int GC_is_initialized.94;
  long unsigned int D.6201;
  long unsigned int D.6204;
  long unsigned int D.6205;
  int D.6206;
  int result;

  D.6195 = pthread_mutex_trylock (&GC_allocate_ml);
  if (D.6195 != 0) goto <D.6196>; else goto <D.6197>;
  <D.6196>:
  GC_lock ();
  <D.6197>:
  GC_is_initialized.94 = GC_is_initialized;
  if (GC_is_initialized.94 == 0) goto <D.6199>; else goto <D.6200>;
  <D.6199>:
  GC_init_inner ();
  <D.6200>:
  D.6201 = bytes >> 12;
  result = GC_expand_hp_inner (D.6201);
  if (result != 0) goto <D.6202>; else goto <D.6203>;
  <D.6202>:
  D.6204 = GC_arrays._requested_heapsize;
  D.6205 = D.6204 + bytes;
  GC_arrays._requested_heapsize = D.6205;
  <D.6203>:
  pthread_mutex_unlock (&GC_allocate_ml);
  D.6206 = result;
  return D.6206;
}


GC_collect_or_expand (word needed_blocks, GC_bool ignore_off_page)
{
  int GC_incremental.95;
  int GC_dont_gc.96;
  int GC_dont_expand.97;
  long unsigned int D.6219;
  long unsigned int last_fo_entries.98;
  long unsigned int D.6221;
  long unsigned int GC_fo_entries.99;
  long unsigned int last_words_finalized.100;
  long unsigned int last_words_finalized.101;
  int D.6227;
  long unsigned int D.6228;
  long unsigned int GC_free_space_divisor.102;
  long unsigned int D.6230;
  long unsigned int D.6231;
  long unsigned int GC_black_list_spacing.103;
  long unsigned int D.6238;
  long unsigned int D.6241;
  int D.6247;
  int D.6249;
  unsigned int GC_fail_count.104;
  unsigned int GC_fail_count.105;
  unsigned int GC_fail_count.106;
  long unsigned int D.6254;
  long unsigned int GC_max_retries.107;
  void (*<T41a>) (char *, GC_word) GC_current_warn_proc.108;
  GC_bool D.6260;
  int GC_print_stats.109;

  GC_incremental.95 = GC_incremental;
  if (GC_incremental.95 == 0) goto <D.6214>; else goto <D.6208>;
  <D.6214>:
  GC_dont_gc.96 = GC_dont_gc;
  if (GC_dont_gc.96 == 0) goto <D.6216>; else goto <D.6208>;
  <D.6216>:
  GC_dont_expand.97 = GC_dont_expand;
  if (GC_dont_expand.97 != 0) goto <D.6218>; else goto <D.6209>;
  <D.6218>:
  D.6219 = GC_arrays._words_allocd;
  if (D.6219 != 0) goto <D.6210>; else goto <D.6209>;
  <D.6209>:
  last_fo_entries.98 = last_fo_entries;
  D.6221 = last_fo_entries.98 + 500;
  GC_fo_entries.99 = GC_fo_entries;
  if (D.6221 < GC_fo_entries.99) goto <D.6223>; else goto <D.6211>;
  <D.6223>:
  last_words_finalized.100 = last_words_finalized;
  if (last_words_finalized.100 != 0) goto <D.6210>; else goto <D.6225>;
  <D.6225>:
  last_words_finalized.101 = GC_arrays._words_finalized;
  if (last_words_finalized.101 != 0) goto <D.6210>; else goto <D.6211>;
  <D.6211>:
  D.6227 = GC_should_collect ();
  if (D.6227 != 0) goto <D.6210>; else goto <D.6208>;
  <D.6210>:
  GC_try_to_collect_inner (GC_never_stop_func);
  GC_fo_entries.99 = GC_fo_entries;
  last_fo_entries = GC_fo_entries.99;
  last_words_finalized.101 = GC_arrays._words_finalized;
  last_words_finalized = last_words_finalized.101;
  goto <D.6212>;
  <D.6208>:
  {
    word blocks_to_get;

    D.6228 = GC_arrays._heapsize;
    GC_free_space_divisor.102 = GC_free_space_divisor;
    D.6230 = GC_free_space_divisor.102 * 4096;
    D.6231 = D.6228 / D.6230;
    blocks_to_get = D.6231 + needed_blocks;
    if (blocks_to_get > 2048) goto <D.6232>; else goto <D.6233>;
    <D.6232>:
    {
      word slop;

      if (ignore_off_page != 0) goto <D.6234>; else goto <D.6235>;
      <D.6234>:
      slop = 4;
      goto <D.6236>;
      <D.6235>:
      GC_black_list_spacing.103 = GC_black_list_spacing;
      D.6238 = GC_black_list_spacing.103 >> 12;
      slop = D.6238 * 2;
      if (slop > needed_blocks) goto <D.6239>; else goto <D.6240>;
      <D.6239>:
      slop = needed_blocks;
      <D.6240>:
      <D.6236>:
      D.6241 = needed_blocks + slop;
      if (D.6241 > 2048) goto <D.6242>; else goto <D.6243>;
      <D.6242>:
      blocks_to_get = needed_blocks + slop;
      goto <D.6244>;
      <D.6243>:
      blocks_to_get = 2048;
      <D.6244>:
    }
    <D.6233>:
    D.6247 = GC_expand_hp_inner (blocks_to_get);
    if (D.6247 == 0) goto <D.6248>; else goto <D.6245>;
    <D.6248>:
    D.6249 = GC_expand_hp_inner (needed_blocks);
    if (D.6249 == 0) goto <D.6250>; else goto <D.6245>;
    <D.6250>:
    GC_fail_count.104 = GC_fail_count;
    GC_fail_count.105 = GC_fail_count.104;
    GC_fail_count.106 = GC_fail_count.105 + 1;
    GC_fail_count = GC_fail_count.106;
    D.6254 = (long unsigned int) GC_fail_count.105;
    GC_max_retries.107 = GC_max_retries;
    if (D.6254 < GC_max_retries.107) goto <D.6256>; else goto <D.6257>;
    <D.6256>:
    GC_current_warn_proc.108 = GC_current_warn_proc;
    GC_current_warn_proc.108 ("GC Warning: Out of Memory!  Trying to continue ...\n", 0);
    GC_try_to_collect_inner (GC_never_stop_func);
    goto <D.6259>;
    <D.6257>:
    GC_current_warn_proc.108 = GC_current_warn_proc;
    GC_current_warn_proc.108 ("GC Warning: Out of Memory!  Returning NIL!\n", 0);
    D.6260 = 0;
    return D.6260;
    <D.6259>:
    goto <D.6246>;
    <D.6245>:
    GC_fail_count.104 = GC_fail_count;
    if (GC_fail_count.104 != 0) goto <D.6261>; else goto <D.6262>;
    <D.6261>:
    GC_print_stats.109 = GC_print_stats;
    if (GC_print_stats.109 != 0) goto <D.6264>; else goto <D.6265>;
    <D.6264>:
    GC_printf ("Memory available again ...\n", 0, 0, 0, 0, 0, 0);
    <D.6265>:
    <D.6262>:
    <D.6246>:
  }
  <D.6212>:
  D.6260 = 1;
  return D.6260;
}


GC_allocobj (word sz, int kind)
{
  char * * D.6267;
  long unsigned int D.6268;
  char * D.6271;
  int GC_incremental.110;
  long unsigned int GC_time_limit.111;
  char * D.6278;
  int D.6288;
  char * * flh;
  GC_bool tried_minor;

  D.6267 = GC_obj_kinds[kind].ok_freelist;
  D.6268 = sz * 8;
  flh = D.6267 + D.6268;
  tried_minor = 0;
  if (sz == 0) goto <D.6269>; else goto <D.6270>;
  <D.6269>:
  D.6271 = 0B;
  return D.6271;
  <D.6270>:
  goto <D.5735>;
  <D.5734>:
  GC_collecting = 1;
  GC_incremental.110 = GC_incremental;
  if (GC_incremental.110 != 0) goto <D.6273>; else goto <D.6274>;
  <D.6273>:
  GC_time_limit.111 = GC_time_limit;
  if (GC_time_limit.111 != 999999) goto <D.6276>; else goto <D.6277>;
  <D.6276>:
  GC_collect_a_little_inner (1);
  <D.6277>:
  <D.6274>:
  GC_continue_reclaim (sz, kind);
  GC_collecting = 0;
  D.6278 = *flh;
  if (D.6278 == 0B) goto <D.6279>; else goto <D.6280>;
  <D.6279>:
  GC_new_hblk (sz, kind);
  <D.6280>:
  D.6278 = *flh;
  if (D.6278 == 0B) goto <D.6281>; else goto <D.6282>;
  <D.6281>:
  GC_collecting = 1;
  GC_incremental.110 = GC_incremental;
  if (GC_incremental.110 != 0) goto <D.6285>; else goto <D.6283>;
  <D.6285>:
  GC_time_limit.111 = GC_time_limit;
  if (GC_time_limit.111 == 999999) goto <D.6286>; else goto <D.6283>;
  <D.6286>:
  if (tried_minor == 0) goto <D.6287>; else goto <D.6283>;
  <D.6287>:
  GC_collect_a_little_inner (1);
  tried_minor = 1;
  goto <D.6284>;
  <D.6283>:
  D.6288 = GC_collect_or_expand (1, 0);
  if (D.6288 == 0) goto <D.6289>; else goto <D.6290>;
  <D.6289>:
  GC_collecting = 0;
  D.6271 = 0B;
  return D.6271;
  <D.6290>:
  <D.6284>:
  GC_collecting = 0;
  <D.6282>:
  <D.5735>:
  D.6278 = *flh;
  if (D.6278 == 0B) goto <D.5734>; else goto <D.5736>;
  <D.5736>:
  GC_fail_count = 0;
  D.6271 = *flh;
  return D.6271;
}


