GC_never_stop_func ()
{
  GC_bool D.5820;

  D.5820 = 0;
  return D.5820;
}


GC_timeout_stop_func ()
{
  unsigned int count.0;
  unsigned int count.1;
  unsigned int count.2;
  unsigned int D.5825;
  int D.5828;
  long int GC_start_time.3;
  long int D.5830;
  double D.5831;
  double D.5832;
  double D.5833;
  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.5842;
  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.5825 = count.1 & 3;
  if (D.5825 != 0) goto <D.5826>; else goto <D.5827>;
  <D.5826>:
  D.5828 = 0;
  return D.5828;
  <D.5827>:
  current_time = clock ();
  GC_start_time.3 = GC_start_time;
  D.5830 = current_time - GC_start_time.3;
  D.5831 = (double) D.5830;
  D.5832 = D.5831 * 1.0e+3;
  D.5833 = D.5832 / 1.0e+6;
  time_diff = (long unsigned int) D.5833;
  GC_time_limit.4 = GC_time_limit;
  if (time_diff >= GC_time_limit.4) goto <D.5835>; else goto <D.5836>;
  <D.5835>:
  GC_print_stats.5 = GC_print_stats;
  if (GC_print_stats.5 != 0) goto <D.5838>; else goto <D.5839>;
  <D.5838>:
  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.5842 = (long int) GC_n_attempts.7;
  GC_printf ("(attempt %ld)\n", D.5842, 0, 0, 0, 0, 0);
  <D.5839>:
  D.5828 = 1;
  return D.5828;
  <D.5836>:
  D.5828 = 0;
  return D.5828;
}


GC_adj_words_allocd ()
{
  long unsigned int GC_non_gc_bytes.8;
  long int GC_non_gc_bytes.9;
  long unsigned int D.5846;
  long int D.5847;
  long int D.5848;
  long unsigned int D.5849;
  long int D.5850;
  long unsigned int D.5851;
  long int D.5852;
  long int D.5853;
  long unsigned int D.5854;
  long int D.5855;
  long int D.5856;
  long unsigned int D.5859;
  long unsigned int result.10;
  long unsigned int D.5861;
  long unsigned int D.5862;
  long unsigned int D.5863;
  long unsigned int D.5866;
  long unsigned int D.5867;
  long int D.5868;
  word D.5871;
  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.5846 = GC_arrays._non_gc_bytes_at_gc;
  D.5847 = (long int) D.5846;
  D.5848 = GC_non_gc_bytes.9 - D.5847;
  expl_managed = D.5848 >> 3;
  D.5849 = GC_arrays._words_allocd;
  D.5850 = (long int) D.5849;
  D.5851 = GC_arrays._mem_freed;
  D.5852 = (long int) D.5851;
  D.5853 = D.5850 - D.5852;
  D.5854 = GC_arrays._finalizer_mem_freed;
  D.5855 = (long int) D.5854;
  D.5856 = D.5853 + D.5855;
  result = D.5856 - expl_managed;
  D.5849 = GC_arrays._words_allocd;
  D.5850 = (long int) D.5849;
  if (D.5850 < result) goto <D.5857>; else goto <D.5858>;
  <D.5857>:
  D.5849 = GC_arrays._words_allocd;
  result = (signed_word) D.5849;
  <D.5858>:
  D.5859 = GC_arrays._words_finalized;
  result.10 = (long unsigned int) result;
  D.5861 = D.5859 + result.10;
  result = (signed_word) D.5861;
  D.5862 = GC_arrays._words_wasted;
  D.5863 = D.5862 >> 3;
  result.10 = (long unsigned int) result;
  if (D.5863 < result.10) goto <D.5864>; else goto <D.5865>;
  <D.5864>:
  D.5862 = GC_arrays._words_wasted;
  result.10 = (long unsigned int) result;
  D.5866 = D.5862 + result.10;
  result = (signed_word) D.5866;
  <D.5865>:
  D.5849 = GC_arrays._words_allocd;
  D.5867 = D.5849 >> 3;
  D.5868 = (long int) D.5867;
  if (D.5868 > result) goto <D.5869>; else goto <D.5870>;
  <D.5869>:
  D.5849 = GC_arrays._words_allocd;
  D.5871 = D.5849 >> 3;
  return D.5871;
  <D.5870>:
  D.5871 = (word) result;
  return D.5871;
}


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

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


GC_should_collect ()
{
  GC_bool D.5873;
  int iftmp.11;
  long unsigned int D.5878;
  long unsigned int D.5879;
  long unsigned int D.5881;
  long unsigned int GC_collect_at_heapsize.12;

  D.5878 = GC_adj_words_allocd ();
  D.5879 = min_words_allocd ();
  if (D.5878 >= D.5879) goto <D.5875>; else goto <D.5880>;
  <D.5880>:
  D.5881 = GC_arrays._heapsize;
  GC_collect_at_heapsize.12 = GC_collect_at_heapsize;
  if (D.5881 >= GC_collect_at_heapsize.12) goto <D.5875>; else goto <D.5876>;
  <D.5875>:
  iftmp.11 = 1;
  goto <D.5877>;
  <D.5876>:
  iftmp.11 = 0;
  <D.5877>:
  D.5873 = iftmp.11;
  return D.5873;
}


min_words_allocd ()
{
  long int D.5886;
  long unsigned int D.5887;
  long unsigned int GC_root_size.13;
  long unsigned int D.5889;
  long unsigned int D.5890;
  long unsigned int D.5891;
  long unsigned int D.5892;
  long unsigned int D.5893;
  long unsigned int D.5894;
  int GC_incremental.14;
  long unsigned int GC_time_limit.15;
  word D.5900;
  long unsigned int GC_free_space_divisor.16;
  long unsigned int D.5902;
  register signed_word stack_size;
  word total_root_size;
  word scan_size;

  stack_size = 10000;
  if (stack_size < 0) goto <D.5884>; else goto <D.5885>;
  <D.5884>:
  stack_size = -stack_size;
  <D.5885>:
  D.5886 = stack_size * 2;
  D.5887 = (long unsigned int) D.5886;
  GC_root_size.13 = GC_root_size;
  total_root_size = D.5887 + GC_root_size.13;
  D.5889 = GC_arrays._heapsize;
  D.5890 = GC_arrays._large_free_bytes;
  D.5891 = D.5889 - D.5890;
  D.5890 = GC_arrays._large_free_bytes;
  D.5892 = D.5890 >> 2;
  D.5893 = D.5891 + D.5892;
  D.5894 = D.5893 + total_root_size;
  scan_size = D.5894 >> 3;
  GC_incremental.14 = GC_incremental;
  if (GC_incremental.14 != 0) goto <D.5897>; else goto <D.5895>;
  <D.5897>:
  GC_time_limit.15 = GC_time_limit;
  if (GC_time_limit.15 != 999999) goto <D.5899>; else goto <D.5895>;
  <D.5899>:
  GC_free_space_divisor.16 = GC_free_space_divisor;
  D.5902 = GC_free_space_divisor.16 * 2;
  D.5900 = scan_size / D.5902;
  return D.5900;
  <D.5895>:
  GC_free_space_divisor.16 = GC_free_space_divisor;
  D.5900 = scan_size / GC_free_space_divisor.16;
  return D.5900;
}


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

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


GC_maybe_gc ()
{
  int D.5907;
  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 GC_gc_no.23;
  long int GC_gc_no.24;
  long int D.5925;
  long unsigned int D.5926;
  long unsigned int D.5927;
  long int D.5928;
  int n_partial_gcs.25;
  long unsigned int GC_time_limit.26;
  long int D.5933;
  int (*GC_stop_func) (void) iftmp.27;
  int D.5938;
  int GC_is_full_gc.28;
  int GC_n_attempts.29;
  int D.5946;
  static int n_partial_gcs = 0;

  D.5907 = GC_should_collect ();
  if (D.5907 != 0) goto <D.5908>; else goto <D.5909>;
  <D.5908>:
  GC_incremental.18 = GC_incremental;
  if (GC_incremental.18 == 0) goto <D.5911>; else goto <D.5912>;
  <D.5911>:
  GC_try_to_collect_inner (GC_never_stop_func);
  n_partial_gcs = 0;
  return;
  <D.5912>:
  GC_wait_for_reclaim ();
  GC_need_full_gc.19 = GC_need_full_gc;
  if (GC_need_full_gc.19 != 0) goto <D.5913>; else goto <D.5917>;
  <D.5917>:
  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.5913>; else goto <D.5914>;
  <D.5913>:
  GC_print_stats.22 = GC_print_stats;
  if (GC_print_stats.22 != 0) goto <D.5921>; else goto <D.5922>;
  <D.5921>:
  GC_gc_no.23 = GC_gc_no;
  GC_gc_no.24 = (long int) GC_gc_no.23;
  D.5925 = GC_gc_no.24 + 1;
  D.5926 = GC_arrays._words_allocd;
  D.5927 = D.5926 << 3;
  D.5928 = (long int) D.5927;
  GC_printf ("***>Full mark for collection %lu after %ld allocd bytes\n", D.5925, D.5928, 0, 0, 0, 0);
  <D.5922>:
  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.5915>;
  <D.5914>:
  n_partial_gcs.20 = n_partial_gcs;
  n_partial_gcs.25 = n_partial_gcs.20 + 1;
  n_partial_gcs = n_partial_gcs.25;
  <D.5915>:
  GC_time_limit.26 = GC_time_limit;
  if (GC_time_limit.26 != 999999) goto <D.5931>; else goto <D.5932>;
  <D.5931>:
  D.5933 = clock ();
  GC_start_time = D.5933;
  <D.5932>:
  GC_time_limit.26 = GC_time_limit;
  if (GC_time_limit.26 == 999999) goto <D.5935>; else goto <D.5936>;
  <D.5935>:
  iftmp.27 = GC_never_stop_func;
  goto <D.5937>;
  <D.5936>:
  iftmp.27 = GC_timeout_stop_func;
  <D.5937>:
  D.5938 = GC_stopped_mark (iftmp.27);
  if (D.5938 != 0) goto <D.5939>; else goto <D.5940>;
  <D.5939>:
  GC_finish_collection ();
  goto <D.5941>;
  <D.5940>:
  GC_is_full_gc.28 = GC_is_full_gc;
  if (GC_is_full_gc.28 == 0) goto <D.5943>; else goto <D.5944>;
  <D.5943>:
  GC_n_attempts.29 = GC_n_attempts;
  D.5946 = GC_n_attempts.29 + 1;
  GC_n_attempts = D.5946;
  <D.5944>:
  <D.5941>:
  <D.5909>:
}


GC_try_to_collect_inner (int (*GC_stop_func) (void) stop_func)
{
  int GC_dont_gc.30;
  GC_bool D.5951;
  void (*<T413>) (GCEventType) GC_notify_event.31;
  int GC_incremental.32;
  int D.5958;
  int GC_print_stats.33;
  int D.5964;
  int D.5967;
  long unsigned int GC_gc_no.34;
  long int GC_gc_no.35;
  long int D.5976;
  long unsigned int D.5977;
  long unsigned int D.5978;
  long int D.5979;
  int GC_find_leak.36;
  int D.5984;
  int D.5987;
  long int D.5994;
  double D.5995;
  double D.5996;
  double D.5997;
  long unsigned int D.5998;
  long int D.5999;
  clock_t start_time;
  clock_t current_time;

  GC_dont_gc.30 = GC_dont_gc;
  if (GC_dont_gc.30 != 0) goto <D.5949>; else goto <D.5950>;
  <D.5949>:
  D.5951 = 0;
  return D.5951;
  <D.5950>:
  GC_notify_event.31 = GC_notify_event;
  if (GC_notify_event.31 != 0B) goto <D.5953>; else goto <D.5954>;
  <D.5953>:
  GC_notify_event.31 = GC_notify_event;
  GC_notify_event.31 (0);
  <D.5954>:
  GC_incremental.32 = GC_incremental;
  if (GC_incremental.32 != 0) goto <D.5956>; else goto <D.5957>;
  <D.5956>:
  D.5958 = GC_collection_in_progress ();
  if (D.5958 != 0) goto <D.5959>; else goto <D.5960>;
  <D.5959>:
  GC_print_stats.33 = GC_print_stats;
  if (GC_print_stats.33 != 0) goto <D.5962>; else goto <D.5963>;
  <D.5962>:
  GC_printf ("GC_try_to_collect_inner: finishing collection in progress\n", 0, 0, 0, 0, 0, 0);
  <D.5963>:
  goto <D.5677>;
  <D.5676>:
  D.5964 = stop_func ();
  if (D.5964 != 0) goto <D.5965>; else goto <D.5966>;
  <D.5965>:
  D.5951 = 0;
  return D.5951;
  <D.5966>:
  GC_collect_a_little_inner (1);
  <D.5677>:
  D.5967 = GC_collection_in_progress ();
  if (D.5967 != 0) goto <D.5676>; else goto <D.5678>;
  <D.5678>:
  <D.5960>:
  <D.5957>:
  if (stop_func == GC_never_stop_func) goto <D.5968>; else goto <D.5969>;
  <D.5968>:
  GC_notify_full_gc ();
  <D.5969>:
  GC_print_stats.33 = GC_print_stats;
  if (GC_print_stats.33 != 0) goto <D.5970>; else goto <D.5971>;
  <D.5970>:
  GC_print_stats.33 = GC_print_stats;
  if (GC_print_stats.33 != 0) goto <D.5972>; else goto <D.5973>;
  <D.5972>:
  start_time = clock ();
  <D.5973>:
  GC_gc_no.34 = GC_gc_no;
  GC_gc_no.35 = (long int) GC_gc_no.34;
  D.5976 = GC_gc_no.35 + 1;
  D.5977 = GC_arrays._words_allocd;
  D.5978 = D.5977 << 3;
  D.5979 = (long int) D.5978;
  GC_printf ("Initiating full world-stop collection %lu after %ld allocd bytes\n", D.5976, D.5979, 0, 0, 0, 0);
  <D.5971>:
  GC_promote_black_lists ();
  GC_wait_for_reclaim ();
  GC_find_leak.36 = GC_find_leak;
  if (GC_find_leak.36 != 0) goto <D.5980>; else goto <D.5983>;
  <D.5983>:
  if (stop_func != GC_never_stop_func) goto <D.5980>; else goto <D.5981>;
  <D.5980>:
  D.5984 = GC_reclaim_all (stop_func, 0);
  if (D.5984 == 0) goto <D.5985>; else goto <D.5986>;
  <D.5985>:
  D.5951 = 0;
  return D.5951;
  <D.5986>:
  <D.5981>:
  GC_invalidate_mark_state ();
  GC_clear_marks ();
  GC_is_full_gc = 1;
  D.5987 = GC_stopped_mark (stop_func);
  if (D.5987 == 0) goto <D.5988>; else goto <D.5989>;
  <D.5988>:
  GC_incremental.32 = GC_incremental;
  if (GC_incremental.32 == 0) goto <D.5990>; else goto <D.5991>;
  <D.5990>:
  GC_invalidate_mark_state ();
  GC_unpromote_black_lists ();
  <D.5991>:
  D.5951 = 0;
  return D.5951;
  <D.5989>:
  GC_finish_collection ();
  GC_print_stats.33 = GC_print_stats;
  if (GC_print_stats.33 != 0) goto <D.5992>; else goto <D.5993>;
  <D.5992>:
  current_time = clock ();
  D.5994 = current_time - start_time;
  D.5995 = (double) D.5994;
  D.5996 = D.5995 * 1.0e+3;
  D.5997 = D.5996 / 1.0e+6;
  D.5998 = (long unsigned int) D.5997;
  D.5999 = (long int) D.5998;
  GC_printf ("Complete collection took %lu msecs\n", D.5999, 0, 0, 0, 0, 0);
  <D.5993>:
  GC_notify_event.31 = GC_notify_event;
  if (GC_notify_event.31 != 0B) goto <D.6000>; else goto <D.6001>;
  <D.6000>:
  GC_notify_event.31 = GC_notify_event;
  GC_notify_event.31 (5);
  <D.6001>:
  D.5951 = 1;
  return D.5951;
}


GC_collect_a_little_inner (int n)
{
  int GC_dont_gc.37;
  int GC_incremental.38;
  int D.6010;
  int D.6012;
  int GC_n_attempts.39;
  long unsigned int GC_time_limit.40;
  long int D.6021;
  int D.6022;
  int D.6025;
  int D.6026;
  int GC_deficit.41;
  int D.6030;
  int D.6031;
  register int i;

  GC_dont_gc.37 = GC_dont_gc;
  if (GC_dont_gc.37 != 0) goto <D.6004>; else goto <D.6005>;
  <D.6004>:
  return;
  <D.6005>:
  GC_incremental.38 = GC_incremental;
  if (GC_incremental.38 != 0) goto <D.6009>; else goto <D.6006>;
  <D.6009>:
  D.6010 = GC_collection_in_progress ();
  if (D.6010 != 0) goto <D.6011>; else goto <D.6006>;
  <D.6011>:
  i = GC_deficit;
  goto <D.5686>;
  <D.5685>:
  D.6012 = GC_mark_some (0B);
  if (D.6012 != 0) goto <D.6013>; else goto <D.6014>;
  <D.6013>:
  GC_wait_for_reclaim ();
  GC_n_attempts.39 = GC_n_attempts;
  if (GC_n_attempts.39 <= 0) goto <D.6018>; else goto <D.6015>;
  <D.6018>:
  GC_time_limit.40 = GC_time_limit;
  if (GC_time_limit.40 != 999999) goto <D.6020>; else goto <D.6015>;
  <D.6020>:
  D.6021 = clock ();
  GC_start_time = D.6021;
  D.6022 = GC_stopped_mark (GC_timeout_stop_func);
  if (D.6022 == 0) goto <D.6023>; else goto <D.6024>;
  <D.6023>:
  GC_n_attempts.39 = GC_n_attempts;
  D.6025 = GC_n_attempts.39 + 1;
  GC_n_attempts = D.6025;
  goto <D.5684>;
  <D.6024>:
  goto <D.6016>;
  <D.6015>:
  GC_stopped_mark (GC_never_stop_func);
  <D.6016>:
  GC_finish_collection ();
  goto <D.5684>;
  <D.6014>:
  i = i + 1;
  <D.5686>:
  D.6026 = n * 10;
  if (D.6026 > i) goto <D.5685>; else goto <D.5684>;
  <D.5684>:
  GC_deficit.41 = GC_deficit;
  if (GC_deficit.41 > 0) goto <D.6028>; else goto <D.6029>;
  <D.6028>:
  D.6030 = n * -10;
  GC_deficit.41 = GC_deficit;
  D.6031 = D.6030 + GC_deficit.41;
  GC_deficit = D.6031;
  <D.6029>:
  GC_deficit.41 = GC_deficit;
  if (GC_deficit.41 < 0) goto <D.6032>; else goto <D.6033>;
  <D.6032>:
  GC_deficit = 0;
  <D.6033>:
  goto <D.6007>;
  <D.6006>:
  GC_maybe_gc ();
  <D.6007>:
}


GC_collect_a_little ()
{
  int D.6035;
  int GC_debugging_started.42;
  void (*<T41a>) (void) GC_print_all_smashed.43;
  int D.6044;
  int result;

  D.6035 = pthread_mutex_trylock (&GC_allocate_ml);
  if (D.6035 != 0) goto <D.6036>; else goto <D.6037>;
  <D.6036>:
  GC_lock ();
  <D.6037>:
  GC_collect_a_little_inner (1);
  result = GC_collection_in_progress ();
  pthread_mutex_unlock (&GC_allocate_ml);
  if (result == 0) goto <D.6038>; else goto <D.6039>;
  <D.6038>:
  GC_debugging_started.42 = GC_debugging_started;
  if (GC_debugging_started.42 != 0) goto <D.6041>; else goto <D.6042>;
  <D.6041>:
  GC_print_all_smashed.43 = GC_print_all_smashed;
  GC_print_all_smashed.43 ();
  <D.6042>:
  <D.6039>:
  D.6044 = result;
  return D.6044;
}


GC_stopped_mark (int (*GC_stop_func) (void) stop_func)
{
  int GC_print_stats.44;
  void (*<T413>) (GCEventType) GC_notify_event.45;
  long unsigned int GC_gc_no.46;
  long int GC_gc_no.47;
  long int D.6056;
  long unsigned int D.6057;
  long unsigned int D.6058;
  long int D.6059;
  long unsigned int D.6060;
  long unsigned int D.6061;
  long int D.6062;
  int D.6063;
  long int D.6068;
  GC_bool D.6069;
  int D.6070;
  long unsigned int D.6072;
  long int D.6075;
  long unsigned int D.6078;
  long int D.6079;
  int GC_debugging_started.48;
  void (*<T41a>) (void) GC_check_heap.49;
  long int D.6088;
  double D.6089;
  double D.6090;
  double D.6091;
  long unsigned int D.6092;
  long int D.6093;
  register int i;
  int dummy;
  clock_t start_time;
  clock_t current_time;
  extern int GC_cond_register_dynamic_libraries ();

  try
    {
      GC_print_stats.44 = GC_print_stats;
      if (GC_print_stats.44 != 0) goto <D.6047>; else goto <D.6048>;
      <D.6047>:
      start_time = clock ();
      <D.6048>:
      GC_cond_register_dynamic_libraries ();
      GC_stop_world ();
      GC_world_stopped = 1;
      GC_notify_event.45 = GC_notify_event;
      if (GC_notify_event.45 != 0B) goto <D.6050>; else goto <D.6051>;
      <D.6050>:
      GC_notify_event.45 = GC_notify_event;
      GC_notify_event.45 (1);
      <D.6051>:
      GC_print_stats.44 = GC_print_stats;
      if (GC_print_stats.44 != 0) goto <D.6052>; else goto <D.6053>;
      <D.6052>:
      GC_gc_no.46 = GC_gc_no;
      GC_gc_no.47 = (long int) GC_gc_no.46;
      D.6056 = GC_gc_no.47 + 1;
      GC_printf ("--> Marking for collection %lu ", D.6056, 0, 0, 0, 0, 0);
      D.6057 = GC_arrays._words_allocd;
      D.6058 = D.6057 << 3;
      D.6059 = (long int) D.6058;
      D.6060 = GC_arrays._words_wasted;
      D.6061 = D.6060 << 3;
      D.6062 = (long int) D.6061;
      GC_printf ("after %lu allocd bytes + %lu wasted bytes\n", D.6059, D.6062, 0, 0, 0, 0);
      <D.6053>:
      GC_clear_a_few_frames ();
      GC_noop (0B, 0, 0, 0, 0, 0);
      GC_initiate_gc ();
      i = 0;
      <D.5699>:
      D.6063 = stop_func ();
      if (D.6063 != 0) goto <D.6064>; else goto <D.6065>;
      <D.6064>:
      GC_print_stats.44 = GC_print_stats;
      if (GC_print_stats.44 != 0) goto <D.6066>; else goto <D.6067>;
      <D.6066>:
      GC_printf ("Abandoned stopped marking after ", 0, 0, 0, 0, 0, 0);
      D.6068 = (long int) i;
      GC_printf ("%lu iterations\n", D.6068, 0, 0, 0, 0, 0);
      <D.6067>:
      GC_deficit = i;
      GC_world_stopped = 0;
      GC_start_world ();
      D.6069 = 0;
      return D.6069;
      <D.6065>:
      D.6070 = GC_mark_some (&dummy);
      if (D.6070 != 0) goto <D.5698>; else goto <D.6071>;
      <D.6071>:
      i = i + 1;
      goto <D.5699>;
      <D.5698>:
      GC_gc_no.46 = GC_gc_no;
      D.6072 = GC_gc_no.46 + 1;
      GC_gc_no = D.6072;
      GC_print_stats.44 = GC_print_stats;
      if (GC_print_stats.44 != 0) goto <D.6073>; else goto <D.6074>;
      <D.6073>:
      GC_gc_no.46 = GC_gc_no;
      GC_gc_no.47 = (long int) GC_gc_no.46;
      D.6075 = GC_gc_no.47 + -1;
      GC_printf ("Collection %lu finished", D.6075, 0, 0, 0, 0, 0);
      <D.6074>:
      GC_print_stats.44 = GC_print_stats;
      if (GC_print_stats.44 != 0) goto <D.6076>; else goto <D.6077>;
      <D.6076>:
      D.6078 = GC_arrays._heapsize;
      D.6079 = (long int) D.6078;
      GC_printf (" ---> heapsize = %lu bytes\n", D.6079, 0, 0, 0, 0, 0);
      GC_printf ("", 0, 0, 0, 0, 0, 0);
      <D.6077>:
      GC_debugging_started.48 = GC_debugging_started;
      if (GC_debugging_started.48 != 0) goto <D.6081>; else goto <D.6082>;
      <D.6081>:
      GC_check_heap.49 = GC_check_heap;
      GC_check_heap.49 ();
      <D.6082>:
      GC_notify_event.45 = GC_notify_event;
      if (GC_notify_event.45 != 0B) goto <D.6084>; else goto <D.6085>;
      <D.6084>:
      GC_notify_event.45 = GC_notify_event;
      GC_notify_event.45 (2);
      <D.6085>:
      GC_world_stopped = 0;
      GC_start_world ();
      GC_print_stats.44 = GC_print_stats;
      if (GC_print_stats.44 != 0) goto <D.6086>; else goto <D.6087>;
      <D.6086>:
      current_time = clock ();
      D.6088 = current_time - start_time;
      D.6089 = (double) D.6088;
      D.6090 = D.6089 * 1.0e+3;
      D.6091 = D.6090 / 1.0e+6;
      D.6092 = (long unsigned int) D.6091;
      D.6093 = (long int) D.6092;
      GC_printf ("World-stopped marking took %lu msecs\n", D.6093, 0, 0, 0, 0, 0);
      <D.6087>:
      D.6069 = 1;
      return D.6069;
    }
  finally
    {
      dummy = {CLOBBER};
    }
}


GC_set_fl_marks (char * q)
{
  long unsigned int p.50;
  long unsigned int D.6097;
  long int p.51;
  long int h.52;
  long int D.6102;
  long int D.6103;
  word[8] * D.6104;
  int D.6105;
  long unsigned int D.6106;
  long unsigned int D.6107;
  volatile word * D.6108;
  volatile GC_word * D.6109;
  int D.6110;
  long unsigned int D.6111;
  long unsigned int D.6112;
  int D.6113;
  char * p;
  struct hblk * h;
  struct hblk * last_h;
  struct hdr * hhdr;
  int word_no;

  last_h = 0B;
  p = q;
  goto <D.5713>;
  <D.5712>:
  p.50 = (long unsigned int) p;
  D.6097 = p.50 & 18446744073709547520;
  h = (struct hblk *) D.6097;
  if (h != last_h) goto <D.6098>; else goto <D.6099>;
  <D.6098>:
  last_h = h;
  hhdr = GC_find_header (h);
  <D.6099>:
  p.51 = (long int) p;
  h.52 = (long int) h;
  D.6102 = p.51 - h.52;
  D.6103 = D.6102 /[ex] 8;
  word_no = (int) D.6103;
  {
    word old;

    <D.5710>:
    D.6104 = &hhdr->hb_marks;
    D.6105 = word_no >> 6;
    D.6106 = (long unsigned int) D.6105;
    D.6107 = D.6106 * 8;
    D.6108 = D.6104 + D.6107;
    old = *D.6108;
    D.6104 = &hhdr->hb_marks;
    D.6105 = word_no >> 6;
    D.6106 = (long unsigned int) D.6105;
    D.6107 = D.6106 * 8;
    D.6109 = D.6104 + D.6107;
    D.6110 = word_no & 63;
    D.6111 = 1 << D.6110;
    D.6112 = D.6111 | old;
    D.6113 = GC_compare_and_exchange (D.6109, old, D.6112);
    if (D.6113 == 0) goto <D.5710>; else goto <D.5711>;
    <D.5711>:
  }
  p = MEM[(char * *)p];
  <D.5713>:
  if (p != 0B) goto <D.5712>; else goto <D.5714>;
  <D.5714>:
}


GC_compare_and_exchange (volatile GC_word * addr, GC_word old, GC_word new_val)
{
  GC_bool D.6114;
  _Bool D.6115;
  int retval;

  __asm__ __volatile__("     csg %1,%2,0(%3)
     ipm %0
     srl %0,28
" : "=&d" retval, "=d" old : "d" new_val, "a" addr, "1" old : "memory", "cc");
  D.6115 = retval == 0;
  D.6114 = (GC_bool) D.6115;
  return D.6114;
}


GC_clear_fl_marks (char * q)
{
  long unsigned int p.53;
  long unsigned int D.6118;
  long int p.54;
  long int h.55;
  long int D.6123;
  long int D.6124;
  int D.6125;
  long unsigned int D.6126;
  int D.6127;
  long unsigned int D.6128;
  long unsigned int D.6129;
  long unsigned int D.6130;
  char * p;
  struct hblk * h;
  struct hblk * last_h;
  struct hdr * hhdr;
  int word_no;

  last_h = 0B;
  p = q;
  goto <D.5724>;
  <D.5723>:
  p.53 = (long unsigned int) p;
  D.6118 = p.53 & 18446744073709547520;
  h = (struct hblk *) D.6118;
  if (h != last_h) goto <D.6119>; else goto <D.6120>;
  <D.6119>:
  last_h = h;
  hhdr = GC_find_header (h);
  <D.6120>:
  p.54 = (long int) p;
  h.55 = (long int) h;
  D.6123 = p.54 - h.55;
  D.6124 = D.6123 /[ex] 8;
  word_no = (int) D.6124;
  D.6125 = word_no >> 6;
  D.6125 = word_no >> 6;
  D.6126 = hhdr->hb_marks[D.6125];
  D.6127 = word_no & 63;
  D.6128 = 1 << D.6127;
  D.6129 = ~D.6128;
  D.6130 = D.6126 & D.6129;
  hhdr->hb_marks[D.6125] = D.6130;
  p = MEM[(char * *)p];
  <D.5724>:
  if (p != 0B) goto <D.5723>; else goto <D.5725>;
  <D.5725>:
}


GC_finish_collection ()
{
  void (*<T413>) (GCEventType) GC_notify_event.56;
  char * D.6134;
  int GC_dump_regularly.57;
  int GC_find_leak.58;
  char * * D.6143;
  long unsigned int D.6144;
  char * * D.6145;
  int GC_n_kinds.59;
  int GC_print_back_height.60;
  char * * D.6152;
  long unsigned int D.6153;
  char * * D.6154;
  int GC_is_full_gc.61;
  long unsigned int D.6160;
  long unsigned int D.6161;
  long unsigned int D.6162;
  long unsigned int GC_used_heap_size_after_full.62;
  long unsigned int D.6165;
  long unsigned int D.6166;
  long unsigned int D.6167;
  _Bool D.6168;
  int D.6169;
  long unsigned int D.6170;
  long unsigned int D.6171;
  long unsigned int D.6172;
  long unsigned int GC_non_gc_bytes.63;

  GC_notify_event.56 = GC_notify_event;
  if (GC_notify_event.56 != 0B) goto <D.6132>; else goto <D.6133>;
  <D.6132>:
  GC_notify_event.56 = GC_notify_event;
  GC_notify_event.56 (3);
  <D.6133>:
  D.6134 = getenv ("GC_PRINT_ADDRESS_MAP");
  if (D.6134 != 0B) goto <D.6135>; else goto <D.6136>;
  <D.6135>:
  GC_print_address_map ();
  <D.6136>:
  GC_dump_regularly.57 = GC_dump_regularly;
  if (GC_dump_regularly.57 != 0) goto <D.6138>; else goto <D.6139>;
  <D.6138>:
  GC_dump ();
  <D.6139>:
  GC_find_leak.58 = GC_find_leak;
  if (GC_find_leak.58 != 0) goto <D.6141>; else goto <D.6142>;
  <D.6141>:
  {
    register word size;
    int kind;
    char * q;

    kind = 0;
    goto <D.5739>;
    <D.5738>:
    size = 1;
    goto <D.5736>;
    <D.5735>:
    D.6143 = GC_obj_kinds[kind].ok_freelist;
    D.6144 = size * 8;
    D.6145 = D.6143 + D.6144;
    q = *D.6145;
    if (q != 0B) goto <D.6146>; else goto <D.6147>;
    <D.6146>:
    GC_set_fl_marks (q);
    <D.6147>:
    size = size + 1;
    <D.5736>:
    if (size <= 256) goto <D.5735>; else goto <D.5737>;
    <D.5737>:
    kind = kind + 1;
    <D.5739>:
    GC_n_kinds.59 = GC_n_kinds;
    if (kind < GC_n_kinds.59) goto <D.5738>; else goto <D.5740>;
    <D.5740>:
  }
  GC_start_reclaim (1);
  <D.6142>:
  GC_finalize ();
  GC_print_back_height.60 = GC_print_back_height;
  if (GC_print_back_height.60 != 0) goto <D.6150>; else goto <D.6151>;
  <D.6150>:
  GC_err_puts ("Back height not available: Rebuild collector with -DMAKE_BACK_GRAPH\n");
  <D.6151>:
  {
    register word size;
    register char * q;
    int kind;

    kind = 0;
    goto <D.5748>;
    <D.5747>:
    size = 1;
    goto <D.5745>;
    <D.5744>:
    D.6152 = GC_obj_kinds[kind].ok_freelist;
    D.6153 = size * 8;
    D.6154 = D.6152 + D.6153;
    q = *D.6154;
    if (q != 0B) goto <D.6155>; else goto <D.6156>;
    <D.6155>:
    GC_clear_fl_marks (q);
    <D.6156>:
    size = size + 1;
    <D.5745>:
    if (size <= 256) goto <D.5744>; else goto <D.5746>;
    <D.5746>:
    kind = kind + 1;
    <D.5748>:
    GC_n_kinds.59 = GC_n_kinds;
    if (kind < GC_n_kinds.59) goto <D.5747>; else goto <D.5749>;
    <D.5749>:
  }
  GC_start_reclaim (0);
  GC_is_full_gc.61 = GC_is_full_gc;
  if (GC_is_full_gc.61 != 0) goto <D.6158>; else goto <D.6159>;
  <D.6158>:
  D.6160 = GC_arrays._heapsize;
  D.6161 = GC_arrays._large_free_bytes;
  D.6162 = D.6160 - D.6161;
  GC_used_heap_size_after_full = D.6162;
  GC_need_full_gc = 0;
  goto <D.6163>;
  <D.6159>:
  D.6160 = GC_arrays._heapsize;
  D.6161 = GC_arrays._large_free_bytes;
  D.6162 = D.6160 - D.6161;
  GC_used_heap_size_after_full.62 = GC_used_heap_size_after_full;
  D.6165 = D.6162 - GC_used_heap_size_after_full.62;
  D.6166 = D.6165 >> 3;
  D.6167 = min_words_allocd ();
  D.6168 = D.6166 > D.6167;
  D.6169 = (int) D.6168;
  GC_need_full_gc = D.6169;
  <D.6163>:
  GC_n_attempts = 0;
  GC_is_full_gc = 0;
  D.6170 = GC_arrays._words_allocd_before_gc;
  D.6171 = GC_arrays._words_allocd;
  D.6172 = D.6170 + D.6171;
  GC_arrays._words_allocd_before_gc = D.6172;
  GC_non_gc_bytes.63 = GC_non_gc_bytes;
  GC_arrays._non_gc_bytes_at_gc = GC_non_gc_bytes.63;
  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.56 = GC_notify_event;
  if (GC_notify_event.56 != 0B) goto <D.6174>; else goto <D.6175>;
  <D.6174>:
  GC_notify_event.56 = GC_notify_event;
  GC_notify_event.56 (4);
  <D.6175>:
}


GC_try_to_collect (int (*GC_stop_func) (void) stop_func)
{
  int GC_debugging_started.64;
  void (*<T41a>) (void) GC_print_all_smashed.65;
  int D.6180;
  int GC_is_initialized.66;
  int D.6190;
  int result;

  GC_debugging_started.64 = GC_debugging_started;
  if (GC_debugging_started.64 != 0) goto <D.6177>; else goto <D.6178>;
  <D.6177>:
  GC_print_all_smashed.65 = GC_print_all_smashed;
  GC_print_all_smashed.65 ();
  <D.6178>:
  GC_notify_or_invoke_finalizers ();
  D.6180 = pthread_mutex_trylock (&GC_allocate_ml);
  if (D.6180 != 0) goto <D.6181>; else goto <D.6182>;
  <D.6181>:
  GC_lock ();
  <D.6182>:
  GC_collecting = 1;
  GC_is_initialized.66 = GC_is_initialized;
  if (GC_is_initialized.66 == 0) goto <D.6184>; else goto <D.6185>;
  <D.6184>:
  GC_init_inner ();
  <D.6185>:
  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.6186>; else goto <D.6187>;
  <D.6186>:
  GC_debugging_started.64 = GC_debugging_started;
  if (GC_debugging_started.64 != 0) goto <D.6188>; else goto <D.6189>;
  <D.6188>:
  GC_print_all_smashed.65 = GC_print_all_smashed;
  GC_print_all_smashed.65 ();
  <D.6189>:
  GC_notify_or_invoke_finalizers ();
  <D.6187>:
  D.6190 = result;
  return D.6190;
}


GC_gcollect ()
{
  int GC_have_errors.67;

  GC_try_to_collect (GC_never_stop_func);
  GC_have_errors.67 = GC_have_errors;
  if (GC_have_errors.67 != 0) goto <D.6193>; else goto <D.6194>;
  <D.6193>:
  GC_print_all_errors ();
  <D.6194>:
}


GC_add_to_heap (struct hblk * p, word bytes)
{
  long unsigned int GC_n_heap_sects.68;
  long unsigned int D.6200;
  long unsigned int D.6201;
  long unsigned int D.6202;
  void * GC_least_plausible_heap_addr.69;
  void * D.6207;
  char * D.6208;
  void * GC_greatest_plausible_heap_addr.70;
  void * D.6212;
  word words;
  struct hdr * phdr;

  GC_n_heap_sects.68 = GC_n_heap_sects;
  if (GC_n_heap_sects.68 > 511) goto <D.6196>; else goto <D.6197>;
  <D.6196>:
  GC_abort ("Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS");
  <D.6197>:
  phdr = GC_install_header (p);
  if (phdr == 0B) goto <D.6198>; else goto <D.6199>;
  <D.6198>:
  return;
  <D.6199>:
  GC_n_heap_sects.68 = GC_n_heap_sects;
  GC_arrays._heap_sects[GC_n_heap_sects.68].hs_start = p;
  GC_n_heap_sects.68 = GC_n_heap_sects;
  GC_arrays._heap_sects[GC_n_heap_sects.68].hs_bytes = bytes;
  GC_n_heap_sects.68 = GC_n_heap_sects;
  D.6200 = GC_n_heap_sects.68 + 1;
  GC_n_heap_sects = D.6200;
  words = bytes >> 3;
  phdr->hb_sz = words;
  phdr->hb_map = 1B;
  phdr->hb_flags = 0;
  GC_freehblk (p);
  D.6201 = GC_arrays._heapsize;
  D.6202 = D.6201 + bytes;
  GC_arrays._heapsize = D.6202;
  GC_least_plausible_heap_addr.69 = GC_least_plausible_heap_addr;
  if (p <= GC_least_plausible_heap_addr.69) goto <D.6203>; else goto <D.6206>;
  <D.6206>:
  GC_least_plausible_heap_addr.69 = GC_least_plausible_heap_addr;
  if (GC_least_plausible_heap_addr.69 == 0B) goto <D.6203>; else goto <D.6204>;
  <D.6203>:
  D.6207 = p + 18446744073709551608;
  GC_least_plausible_heap_addr = D.6207;
  <D.6204>:
  D.6208 = p + bytes;
  GC_greatest_plausible_heap_addr.70 = GC_greatest_plausible_heap_addr;
  if (D.6208 >= GC_greatest_plausible_heap_addr.70) goto <D.6210>; else goto <D.6211>;
  <D.6210>:
  D.6212 = p + bytes;
  GC_greatest_plausible_heap_addr = D.6212;
  <D.6211>:
}


GC_print_heap_sects ()
{
  long unsigned int D.6214;
  long int D.6215;
  char * D.6216;
  long int D.6217;
  long int start.71;
  long unsigned int D.6219;
  long int D.6220;
  struct hblk * D.6221;
  struct hblk * D.6224;
  long int D.6225;
  long unsigned int D.6226;
  long int D.6227;
  long unsigned int D.6228;
  long unsigned int GC_n_heap_sects.72;
  register unsigned int i;

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

    D.6216 = GC_arrays._heap_sects[i].hs_start;
    start = (long unsigned int) D.6216;
    len = GC_arrays._heap_sects[i].hs_bytes;
    nbl = 0;
    D.6217 = (long int) i;
    start.71 = (long int) start;
    D.6219 = start + len;
    D.6220 = (long int) D.6219;
    GC_printf ("Section %ld from 0x%lx to 0x%lx ", D.6217, start.71, D.6220, 0, 0, 0);
    h = (struct hblk *) start;
    goto <D.5771>;
    <D.5770>:
    D.6221 = GC_is_black_listed (h, 4096);
    if (D.6221 != 0B) goto <D.6222>; else goto <D.6223>;
    <D.6222>:
    nbl = nbl + 1;
    <D.6223>:
    h = h + 4096;
    <D.5771>:
    D.6219 = start + len;
    D.6224 = (struct hblk *) D.6219;
    if (D.6224 > h) goto <D.5770>; else goto <D.5772>;
    <D.5772>:
    D.6225 = (long int) nbl;
    D.6226 = len / 4096;
    D.6227 = (long int) D.6226;
    GC_printf ("%lu/%lu blacklisted\n", D.6225, D.6227, 0, 0, 0, 0);
  }
  i = i + 1;
  <D.5774>:
  D.6228 = (long unsigned int) i;
  GC_n_heap_sects.72 = GC_n_heap_sects;
  if (D.6228 < GC_n_heap_sects.72) goto <D.5773>; else goto <D.5775>;
  <D.5775>:
}


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

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


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

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


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.73;
  long unsigned int D.6237;
  long unsigned int D.6238;
  long unsigned int D.6241;
  long unsigned int D.6242;
  GC_bool D.6245;
  int GC_print_stats.74;
  long int bytes.75;
  long unsigned int D.6254;
  long unsigned int D.6255;
  long int D.6256;
  long unsigned int D.6257;
  long unsigned int D.6258;
  char * D.6263;
  signed long space.76;
  void * GC_greatest_plausible_heap_addr.77;
  sizetype D.6268;
  char * D.6269;
  char * D.6270;
  void * GC_least_plausible_heap_addr.78;
  sizetype D.6272;
  char * D.6273;
  char * D.6274;
  long unsigned int D.6275;
  long unsigned int D.6276;
  void (*<T417>) (size_t) GC_on_heap_resize.79;
  word bytes;
  struct hblk * space;
  word expansion_slop;

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

    GC_page_size.73 = GC_page_size;
    mask = GC_page_size.73 + 18446744073709551615;
    bytes = bytes + mask;
    D.6237 = ~mask;
    bytes = D.6237 & bytes;
  }
  D.6238 = GC_arrays._max_heapsize;
  if (D.6238 != 0) goto <D.6239>; else goto <D.6240>;
  <D.6239>:
  D.6241 = GC_arrays._heapsize;
  D.6242 = D.6241 + bytes;
  D.6238 = GC_arrays._max_heapsize;
  if (D.6242 > D.6238) goto <D.6243>; else goto <D.6244>;
  <D.6243>:
  D.6245 = 0;
  return D.6245;
  <D.6244>:
  <D.6240>:
  space = GC_unix_get_mem (bytes);
  if (space == 0B) goto <D.6246>; else goto <D.6247>;
  <D.6246>:
  GC_print_stats.74 = GC_print_stats;
  if (GC_print_stats.74 != 0) goto <D.6249>; else goto <D.6250>;
  <D.6249>:
  bytes.75 = (long int) bytes;
  GC_printf ("Failed to expand heap by %ld bytes\n", bytes.75, 0, 0, 0, 0, 0);
  <D.6250>:
  D.6245 = 0;
  return D.6245;
  <D.6247>:
  GC_print_stats.74 = GC_print_stats;
  if (GC_print_stats.74 != 0) goto <D.6252>; else goto <D.6253>;
  <D.6252>:
  bytes.75 = (long int) bytes;
  D.6254 = GC_arrays._words_allocd;
  D.6255 = D.6254 << 3;
  D.6256 = (long int) D.6255;
  GC_printf ("Increasing heap size by %lu after %lu allocated bytes\n", bytes.75, D.6256, 0, 0, 0, 0);
  <D.6253>:
  D.6257 = min_words_allocd ();
  D.6258 = D.6257 << 3;
  expansion_slop = D.6258 + 33554432;
  D.6263 = GC_arrays._last_heap_addr;
  if (D.6263 == 0B) goto <D.6264>; else goto <D.6259>;
  <D.6264>:
  space.76 = (signed long) space;
  if (space.76 >= 0) goto <D.6260>; else goto <D.6259>;
  <D.6259>:
  D.6263 = GC_arrays._last_heap_addr;
  if (D.6263 != 0B) goto <D.6266>; else goto <D.6261>;
  <D.6266>:
  D.6263 = GC_arrays._last_heap_addr;
  if (D.6263 < space) goto <D.6260>; else goto <D.6261>;
  <D.6260>:
  GC_greatest_plausible_heap_addr.77 = GC_greatest_plausible_heap_addr;
  D.6268 = bytes + expansion_slop;
  D.6269 = space + D.6268;
  D.6270 = GC_max (GC_greatest_plausible_heap_addr.77, D.6269);
  GC_greatest_plausible_heap_addr = D.6270;
  goto <D.6262>;
  <D.6261>:
  GC_least_plausible_heap_addr.78 = GC_least_plausible_heap_addr;
  D.6272 = -expansion_slop;
  D.6273 = space + D.6272;
  D.6274 = GC_min (GC_least_plausible_heap_addr.78, D.6273);
  GC_least_plausible_heap_addr = D.6274;
  <D.6262>:
  D.6263 = GC_arrays._last_heap_addr;
  GC_arrays._prev_heap_addr = D.6263;
  GC_arrays._last_heap_addr = space;
  GC_add_to_heap (space, bytes);
  D.6241 = GC_arrays._heapsize;
  D.6275 = D.6241 + expansion_slop;
  D.6276 = D.6275 + 18446744073692774400;
  GC_collect_at_heapsize = D.6276;
  GC_on_heap_resize.79 = GC_on_heap_resize;
  if (GC_on_heap_resize.79 != 0B) goto <D.6278>; else goto <D.6279>;
  <D.6278>:
  GC_on_heap_resize.79 = GC_on_heap_resize;
  D.6241 = GC_arrays._heapsize;
  GC_on_heap_resize.79 (D.6241);
  <D.6279>:
  D.6245 = 1;
  return D.6245;
}


GC_expand_hp (size_t bytes)
{
  int D.6281;
  int GC_is_initialized.80;
  long unsigned int D.6287;
  long unsigned int D.6290;
  long unsigned int D.6291;
  int D.6292;
  int result;

  D.6281 = pthread_mutex_trylock (&GC_allocate_ml);
  if (D.6281 != 0) goto <D.6282>; else goto <D.6283>;
  <D.6282>:
  GC_lock ();
  <D.6283>:
  GC_is_initialized.80 = GC_is_initialized;
  if (GC_is_initialized.80 == 0) goto <D.6285>; else goto <D.6286>;
  <D.6285>:
  GC_init_inner ();
  <D.6286>:
  D.6287 = bytes >> 12;
  result = GC_expand_hp_inner (D.6287);
  if (result != 0) goto <D.6288>; else goto <D.6289>;
  <D.6288>:
  D.6290 = GC_arrays._requested_heapsize;
  D.6291 = D.6290 + bytes;
  GC_arrays._requested_heapsize = D.6291;
  <D.6289>:
  pthread_mutex_unlock (&GC_allocate_ml);
  D.6292 = result;
  return D.6292;
}


GC_collect_or_expand (word needed_blocks, GC_bool ignore_off_page)
{
  int GC_incremental.81;
  int GC_dont_gc.82;
  int GC_dont_expand.83;
  long unsigned int D.6305;
  long unsigned int last_fo_entries.84;
  long unsigned int D.6307;
  long unsigned int GC_fo_entries.85;
  long unsigned int last_words_finalized.86;
  long unsigned int D.6312;
  int D.6313;
  long unsigned int D.6314;
  long unsigned int GC_free_space_divisor.87;
  long unsigned int D.6316;
  long unsigned int D.6317;
  long unsigned int GC_black_list_spacing.88;
  long unsigned int D.6324;
  long unsigned int D.6327;
  int D.6333;
  int D.6335;
  unsigned int GC_fail_count.89;
  unsigned int GC_fail_count.90;
  unsigned int D.6339;
  long unsigned int D.6340;
  long unsigned int GC_max_retries.91;
  void (*<T490>) (char *, GC_word) GC_current_warn_proc.92;
  GC_bool D.6346;
  int GC_print_stats.93;

  GC_incremental.81 = GC_incremental;
  if (GC_incremental.81 == 0) goto <D.6300>; else goto <D.6294>;
  <D.6300>:
  GC_dont_gc.82 = GC_dont_gc;
  if (GC_dont_gc.82 == 0) goto <D.6302>; else goto <D.6294>;
  <D.6302>:
  GC_dont_expand.83 = GC_dont_expand;
  if (GC_dont_expand.83 != 0) goto <D.6304>; else goto <D.6295>;
  <D.6304>:
  D.6305 = GC_arrays._words_allocd;
  if (D.6305 != 0) goto <D.6296>; else goto <D.6295>;
  <D.6295>:
  last_fo_entries.84 = last_fo_entries;
  D.6307 = last_fo_entries.84 + 500;
  GC_fo_entries.85 = GC_fo_entries;
  if (D.6307 < GC_fo_entries.85) goto <D.6309>; else goto <D.6297>;
  <D.6309>:
  last_words_finalized.86 = last_words_finalized;
  if (last_words_finalized.86 != 0) goto <D.6296>; else goto <D.6311>;
  <D.6311>:
  D.6312 = GC_arrays._words_finalized;
  if (D.6312 != 0) goto <D.6296>; else goto <D.6297>;
  <D.6297>:
  D.6313 = GC_should_collect ();
  if (D.6313 != 0) goto <D.6296>; else goto <D.6294>;
  <D.6296>:
  GC_try_to_collect_inner (GC_never_stop_func);
  GC_fo_entries.85 = GC_fo_entries;
  last_fo_entries = GC_fo_entries.85;
  D.6312 = GC_arrays._words_finalized;
  last_words_finalized = D.6312;
  goto <D.6298>;
  <D.6294>:
  {
    word blocks_to_get;

    D.6314 = GC_arrays._heapsize;
    GC_free_space_divisor.87 = GC_free_space_divisor;
    D.6316 = GC_free_space_divisor.87 * 4096;
    D.6317 = D.6314 / D.6316;
    blocks_to_get = D.6317 + needed_blocks;
    if (blocks_to_get > 2048) goto <D.6318>; else goto <D.6319>;
    <D.6318>:
    {
      word slop;

      if (ignore_off_page != 0) goto <D.6320>; else goto <D.6321>;
      <D.6320>:
      slop = 4;
      goto <D.6322>;
      <D.6321>:
      GC_black_list_spacing.88 = GC_black_list_spacing;
      D.6324 = GC_black_list_spacing.88 >> 12;
      slop = D.6324 * 2;
      if (slop > needed_blocks) goto <D.6325>; else goto <D.6326>;
      <D.6325>:
      slop = needed_blocks;
      <D.6326>:
      <D.6322>:
      D.6327 = needed_blocks + slop;
      if (D.6327 > 2048) goto <D.6328>; else goto <D.6329>;
      <D.6328>:
      blocks_to_get = needed_blocks + slop;
      goto <D.6330>;
      <D.6329>:
      blocks_to_get = 2048;
      <D.6330>:
    }
    <D.6319>:
    D.6333 = GC_expand_hp_inner (blocks_to_get);
    if (D.6333 == 0) goto <D.6334>; else goto <D.6331>;
    <D.6334>:
    D.6335 = GC_expand_hp_inner (needed_blocks);
    if (D.6335 == 0) goto <D.6336>; else goto <D.6331>;
    <D.6336>:
    GC_fail_count.89 = GC_fail_count;
    GC_fail_count.90 = GC_fail_count.89;
    D.6339 = GC_fail_count.90 + 1;
    GC_fail_count = D.6339;
    D.6340 = (long unsigned int) GC_fail_count.90;
    GC_max_retries.91 = GC_max_retries;
    if (D.6340 < GC_max_retries.91) goto <D.6342>; else goto <D.6343>;
    <D.6342>:
    GC_current_warn_proc.92 = GC_current_warn_proc;
    GC_current_warn_proc.92 ("GC Warning: Out of Memory!  Trying to continue ...\n", 0);
    GC_try_to_collect_inner (GC_never_stop_func);
    goto <D.6345>;
    <D.6343>:
    GC_current_warn_proc.92 = GC_current_warn_proc;
    GC_current_warn_proc.92 ("GC Warning: Out of Memory!  Returning NIL!\n", 0);
    D.6346 = 0;
    return D.6346;
    <D.6345>:
    goto <D.6332>;
    <D.6331>:
    GC_fail_count.89 = GC_fail_count;
    if (GC_fail_count.89 != 0) goto <D.6347>; else goto <D.6348>;
    <D.6347>:
    GC_print_stats.93 = GC_print_stats;
    if (GC_print_stats.93 != 0) goto <D.6350>; else goto <D.6351>;
    <D.6350>:
    GC_printf ("Memory available again ...\n", 0, 0, 0, 0, 0, 0);
    <D.6351>:
    <D.6348>:
    <D.6332>:
  }
  <D.6298>:
  D.6346 = 1;
  return D.6346;
}


GC_allocobj (word sz, int kind)
{
  char * * D.6353;
  long unsigned int D.6354;
  char * D.6357;
  int GC_incremental.94;
  long unsigned int GC_time_limit.95;
  char * D.6364;
  int D.6374;
  char * * flh;
  GC_bool tried_minor;

  D.6353 = GC_obj_kinds[kind].ok_freelist;
  D.6354 = sz * 8;
  flh = D.6353 + D.6354;
  tried_minor = 0;
  if (sz == 0) goto <D.6355>; else goto <D.6356>;
  <D.6355>:
  D.6357 = 0B;
  return D.6357;
  <D.6356>:
  goto <D.5817>;
  <D.5816>:
  GC_collecting = 1;
  GC_incremental.94 = GC_incremental;
  if (GC_incremental.94 != 0) goto <D.6359>; else goto <D.6360>;
  <D.6359>:
  GC_time_limit.95 = GC_time_limit;
  if (GC_time_limit.95 != 999999) goto <D.6362>; else goto <D.6363>;
  <D.6362>:
  GC_collect_a_little_inner (1);
  <D.6363>:
  <D.6360>:
  GC_continue_reclaim (sz, kind);
  GC_collecting = 0;
  D.6364 = *flh;
  if (D.6364 == 0B) goto <D.6365>; else goto <D.6366>;
  <D.6365>:
  GC_new_hblk (sz, kind);
  <D.6366>:
  D.6364 = *flh;
  if (D.6364 == 0B) goto <D.6367>; else goto <D.6368>;
  <D.6367>:
  GC_collecting = 1;
  GC_incremental.94 = GC_incremental;
  if (GC_incremental.94 != 0) goto <D.6371>; else goto <D.6369>;
  <D.6371>:
  GC_time_limit.95 = GC_time_limit;
  if (GC_time_limit.95 == 999999) goto <D.6372>; else goto <D.6369>;
  <D.6372>:
  if (tried_minor == 0) goto <D.6373>; else goto <D.6369>;
  <D.6373>:
  GC_collect_a_little_inner (1);
  tried_minor = 1;
  goto <D.6370>;
  <D.6369>:
  D.6374 = GC_collect_or_expand (1, 0);
  if (D.6374 == 0) goto <D.6375>; else goto <D.6376>;
  <D.6375>:
  GC_collecting = 0;
  D.6357 = 0B;
  return D.6357;
  <D.6376>:
  <D.6370>:
  GC_collecting = 0;
  <D.6368>:
  <D.5817>:
  D.6364 = *flh;
  if (D.6364 == 0B) goto <D.5816>; else goto <D.5818>;
  <D.5818>:
  GC_fail_count = 0;
  D.6357 = *flh;
  return D.6357;
}


