GC_never_stop_func ()
{
  GC_bool D.7898;

  D.7898 = 0;
  return D.7898;
}


GC_timeout_stop_func ()
{
  unsigned int count.0;
  unsigned int count.1;
  unsigned int count.2;
  unsigned int D.7903;
  int D.7906;
  long int GC_start_time.3;
  long int D.7908;
  double D.7909;
  double D.7910;
  double D.7911;
  long unsigned int GC_time_limit.4;
  int GC_print_stats.5;
  long int time_diff.6;
  int GC_n_attempts.7;
  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.7903 = count.1 & 3;
  if (D.7903 != 0) goto <D.7904>; else goto <D.7905>;
  <D.7904>:
  D.7906 = 0;
  return D.7906;
  <D.7905>:
  current_time = clock ();
  GC_start_time.3 = GC_start_time;
  D.7908 = current_time - GC_start_time.3;
  D.7909 = (double) D.7908;
  D.7910 = D.7909 * 1.0e+3;
  D.7911 = D.7910 / 1.0e+6;
  time_diff = (long unsigned int) D.7911;
  GC_time_limit.4 = GC_time_limit;
  if (time_diff >= GC_time_limit.4) goto <D.7913>; else goto <D.7914>;
  <D.7913>:
  GC_print_stats.5 = GC_print_stats;
  if (GC_print_stats.5 != 0) goto <D.7916>; else goto <D.7917>;
  <D.7916>:
  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;
  GC_printf ("(attempt %ld)\n", GC_n_attempts.7, 0, 0, 0, 0, 0);
  <D.7917>:
  D.7906 = 1;
  return D.7906;
  <D.7914>:
  D.7906 = 0;
  return D.7906;
}


GC_adj_words_allocd ()
{
  long unsigned int GC_non_gc_bytes.8;
  long int GC_non_gc_bytes.9;
  long unsigned int D.7923;
  long int D.7924;
  long int D.7925;
  long unsigned int D.7926;
  long int D.7927;
  long unsigned int D.7928;
  long int D.7929;
  long int D.7930;
  long unsigned int D.7931;
  long int D.7932;
  long int D.7933;
  long unsigned int D.7936;
  long unsigned int result.10;
  long unsigned int D.7938;
  long unsigned int D.7939;
  long unsigned int D.7940;
  long unsigned int D.7943;
  long unsigned int D.7944;
  long int D.7945;
  word D.7948;
  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.7923 = GC_arrays._non_gc_bytes_at_gc;
  D.7924 = (long int) D.7923;
  D.7925 = GC_non_gc_bytes.9 - D.7924;
  expl_managed = D.7925 >> 2;
  D.7926 = GC_arrays._words_allocd;
  D.7927 = (long int) D.7926;
  D.7928 = GC_arrays._mem_freed;
  D.7929 = (long int) D.7928;
  D.7930 = D.7927 - D.7929;
  D.7931 = GC_arrays._finalizer_mem_freed;
  D.7932 = (long int) D.7931;
  D.7933 = D.7930 + D.7932;
  result = D.7933 - expl_managed;
  D.7926 = GC_arrays._words_allocd;
  D.7927 = (long int) D.7926;
  if (D.7927 < result) goto <D.7934>; else goto <D.7935>;
  <D.7934>:
  D.7926 = GC_arrays._words_allocd;
  result = (signed_word) D.7926;
  <D.7935>:
  D.7936 = GC_arrays._words_finalized;
  result.10 = (long unsigned int) result;
  D.7938 = D.7936 + result.10;
  result = (signed_word) D.7938;
  D.7939 = GC_arrays._words_wasted;
  D.7940 = D.7939 >> 3;
  result.10 = (long unsigned int) result;
  if (D.7940 < result.10) goto <D.7941>; else goto <D.7942>;
  <D.7941>:
  D.7939 = GC_arrays._words_wasted;
  result.10 = (long unsigned int) result;
  D.7943 = D.7939 + result.10;
  result = (signed_word) D.7943;
  <D.7942>:
  D.7926 = GC_arrays._words_allocd;
  D.7944 = D.7926 >> 3;
  D.7945 = (long int) D.7944;
  if (D.7945 > result) goto <D.7946>; else goto <D.7947>;
  <D.7946>:
  D.7926 = GC_arrays._words_allocd;
  D.7948 = D.7926 >> 3;
  return D.7948;
  <D.7947>:
  D.7948 = (word) result;
  return D.7948;
}


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

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


GC_should_collect ()
{
  GC_bool D.7950;
  int iftmp.11;
  long unsigned int D.7955;
  long unsigned int D.7956;
  long unsigned int D.7958;
  long unsigned int GC_collect_at_heapsize.12;

  D.7955 = GC_adj_words_allocd ();
  D.7956 = min_words_allocd ();
  if (D.7955 >= D.7956) goto <D.7952>; else goto <D.7957>;
  <D.7957>:
  D.7958 = GC_arrays._heapsize;
  GC_collect_at_heapsize.12 = GC_collect_at_heapsize;
  if (D.7958 >= GC_collect_at_heapsize.12) goto <D.7952>; else goto <D.7953>;
  <D.7952>:
  iftmp.11 = 1;
  goto <D.7954>;
  <D.7953>:
  iftmp.11 = 0;
  <D.7954>:
  D.7950 = iftmp.11;
  return D.7950;
}


min_words_allocd ()
{
  long int D.7963;
  long unsigned int D.7964;
  long unsigned int GC_root_size.13;
  long unsigned int D.7966;
  long unsigned int D.7967;
  long unsigned int D.7968;
  long unsigned int D.7969;
  long unsigned int D.7970;
  long unsigned int D.7971;
  int GC_incremental.14;
  long unsigned int GC_time_limit.15;
  word D.7977;
  long unsigned int GC_free_space_divisor.16;
  long unsigned int D.7979;
  register signed_word stack_size;
  word total_root_size;
  word scan_size;

  stack_size = 10000;
  if (stack_size < 0) goto <D.7961>; else goto <D.7962>;
  <D.7961>:
  stack_size = -stack_size;
  <D.7962>:
  D.7963 = stack_size * 2;
  D.7964 = (long unsigned int) D.7963;
  GC_root_size.13 = GC_root_size;
  total_root_size = D.7964 + GC_root_size.13;
  D.7966 = GC_arrays._heapsize;
  D.7967 = GC_arrays._large_free_bytes;
  D.7968 = D.7966 - D.7967;
  D.7967 = GC_arrays._large_free_bytes;
  D.7969 = D.7967 >> 2;
  D.7970 = D.7968 + D.7969;
  D.7971 = D.7970 + total_root_size;
  scan_size = D.7971 >> 2;
  GC_incremental.14 = GC_incremental;
  if (GC_incremental.14 != 0) goto <D.7974>; else goto <D.7972>;
  <D.7974>:
  GC_time_limit.15 = GC_time_limit;
  if (GC_time_limit.15 != 999999) goto <D.7976>; else goto <D.7972>;
  <D.7976>:
  GC_free_space_divisor.16 = GC_free_space_divisor;
  D.7979 = GC_free_space_divisor.16 * 2;
  D.7977 = scan_size / D.7979;
  return D.7977;
  <D.7972>:
  GC_free_space_divisor.16 = GC_free_space_divisor;
  D.7977 = scan_size / GC_free_space_divisor.16;
  return D.7977;
}


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

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


GC_maybe_gc ()
{
  int D.7984;
  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.8002;
  long unsigned int D.8003;
  long unsigned int D.8004;
  long int D.8005;
  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.8015;
  int GC_is_full_gc.29;
  int GC_n_attempts.30;
  int GC_n_attempts.31;
  static int n_partial_gcs = 0;

  D.7984 = GC_should_collect ();
  if (D.7984 != 0) goto <D.7985>; else goto <D.7986>;
  <D.7985>:
  GC_incremental.18 = GC_incremental;
  if (GC_incremental.18 == 0) goto <D.7988>; else goto <D.7989>;
  <D.7988>:
  GC_try_to_collect_inner (GC_never_stop_func);
  n_partial_gcs = 0;
  return;
  <D.7989>:
  GC_need_full_gc.19 = GC_need_full_gc;
  if (GC_need_full_gc.19 != 0) goto <D.7990>; else goto <D.7994>;
  <D.7994>:
  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.7990>; else goto <D.7991>;
  <D.7990>:
  GC_print_stats.22 = GC_print_stats;
  if (GC_print_stats.22 != 0) goto <D.7998>; else goto <D.7999>;
  <D.7998>:
  GC_gc_no.23 = GC_gc_no;
  GC_gc_no.24 = (long int) GC_gc_no.23;
  D.8002 = GC_gc_no.24 + 1;
  D.8003 = GC_arrays._words_allocd;
  D.8004 = D.8003 << 2;
  D.8005 = (long int) D.8004;
  GC_printf ("***>Full mark for collection %lu after %ld allocd bytes\n", D.8002, D.8005, 0, 0, 0, 0);
  <D.7999>:
  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.7992>;
  <D.7991>:
  n_partial_gcs.20 = n_partial_gcs;
  n_partial_gcs.25 = n_partial_gcs.20 + 1;
  n_partial_gcs = n_partial_gcs.25;
  <D.7992>:
  GC_time_limit.26 = GC_time_limit;
  if (GC_time_limit.26 != 999999) goto <D.8008>; else goto <D.8009>;
  <D.8008>:
  GC_start_time.27 = clock ();
  GC_start_time = GC_start_time.27;
  <D.8009>:
  GC_time_limit.26 = GC_time_limit;
  if (GC_time_limit.26 == 999999) goto <D.8012>; else goto <D.8013>;
  <D.8012>:
  iftmp.28 = GC_never_stop_func;
  goto <D.8014>;
  <D.8013>:
  iftmp.28 = GC_timeout_stop_func;
  <D.8014>:
  D.8015 = GC_stopped_mark (iftmp.28);
  if (D.8015 != 0) goto <D.8016>; else goto <D.8017>;
  <D.8016>:
  GC_finish_collection ();
  goto <D.8018>;
  <D.8017>:
  GC_is_full_gc.29 = GC_is_full_gc;
  if (GC_is_full_gc.29 == 0) goto <D.8020>; else goto <D.8021>;
  <D.8020>:
  GC_n_attempts.30 = GC_n_attempts;
  GC_n_attempts.31 = GC_n_attempts.30 + 1;
  GC_n_attempts = GC_n_attempts.31;
  <D.8021>:
  <D.8018>:
  <D.7986>:
}


GC_try_to_collect_inner (int (*GC_stop_func) (void) stop_func)
{
  int GC_dont_gc.32;
  GC_bool D.8028;
  void (*<Td54>) (GCEventType) GC_notify_event.33;
  int GC_incremental.34;
  int D.8035;
  int GC_print_stats.35;
  int D.8041;
  int D.8044;
  long unsigned int GC_gc_no.36;
  long int GC_gc_no.37;
  long int D.8053;
  long unsigned int D.8054;
  long unsigned int D.8055;
  long int D.8056;
  int GC_find_leak.38;
  int D.8061;
  int D.8064;
  long int D.8071;
  double D.8072;
  double D.8073;
  double D.8074;
  long unsigned int D.8075;
  long int D.8076;
  clock_t start_time;
  clock_t current_time;

  GC_dont_gc.32 = GC_dont_gc;
  if (GC_dont_gc.32 != 0) goto <D.8026>; else goto <D.8027>;
  <D.8026>:
  D.8028 = 0;
  return D.8028;
  <D.8027>:
  GC_notify_event.33 = GC_notify_event;
  if (GC_notify_event.33 != 0B) goto <D.8030>; else goto <D.8031>;
  <D.8030>:
  GC_notify_event.33 = GC_notify_event;
  GC_notify_event.33 (0);
  <D.8031>:
  GC_incremental.34 = GC_incremental;
  if (GC_incremental.34 != 0) goto <D.8033>; else goto <D.8034>;
  <D.8033>:
  D.8035 = GC_collection_in_progress ();
  if (D.8035 != 0) goto <D.8036>; else goto <D.8037>;
  <D.8036>:
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.8039>; else goto <D.8040>;
  <D.8039>:
  GC_printf ("GC_try_to_collect_inner: finishing collection in progress\n", 0, 0, 0, 0, 0, 0);
  <D.8040>:
  goto <D.7756>;
  <D.7755>:
  D.8041 = stop_func ();
  if (D.8041 != 0) goto <D.8042>; else goto <D.8043>;
  <D.8042>:
  D.8028 = 0;
  return D.8028;
  <D.8043>:
  GC_collect_a_little_inner (1);
  <D.7756>:
  D.8044 = GC_collection_in_progress ();
  if (D.8044 != 0) goto <D.7755>; else goto <D.7757>;
  <D.7757>:
  <D.8037>:
  <D.8034>:
  if (stop_func == GC_never_stop_func) goto <D.8045>; else goto <D.8046>;
  <D.8045>:
  GC_notify_full_gc ();
  <D.8046>:
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.8047>; else goto <D.8048>;
  <D.8047>:
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.8049>; else goto <D.8050>;
  <D.8049>:
  start_time = clock ();
  <D.8050>:
  GC_gc_no.36 = GC_gc_no;
  GC_gc_no.37 = (long int) GC_gc_no.36;
  D.8053 = GC_gc_no.37 + 1;
  D.8054 = GC_arrays._words_allocd;
  D.8055 = D.8054 << 2;
  D.8056 = (long int) D.8055;
  GC_printf ("Initiating full world-stop collection %lu after %ld allocd bytes\n", D.8053, D.8056, 0, 0, 0, 0);
  <D.8048>:
  GC_promote_black_lists ();
  GC_find_leak.38 = GC_find_leak;
  if (GC_find_leak.38 != 0) goto <D.8057>; else goto <D.8060>;
  <D.8060>:
  if (stop_func != GC_never_stop_func) goto <D.8057>; else goto <D.8058>;
  <D.8057>:
  D.8061 = GC_reclaim_all (stop_func, 0);
  if (D.8061 == 0) goto <D.8062>; else goto <D.8063>;
  <D.8062>:
  D.8028 = 0;
  return D.8028;
  <D.8063>:
  <D.8058>:
  GC_invalidate_mark_state ();
  GC_clear_marks ();
  GC_is_full_gc = 1;
  D.8064 = GC_stopped_mark (stop_func);
  if (D.8064 == 0) goto <D.8065>; else goto <D.8066>;
  <D.8065>:
  GC_incremental.34 = GC_incremental;
  if (GC_incremental.34 == 0) goto <D.8067>; else goto <D.8068>;
  <D.8067>:
  GC_invalidate_mark_state ();
  GC_unpromote_black_lists ();
  <D.8068>:
  D.8028 = 0;
  return D.8028;
  <D.8066>:
  GC_finish_collection ();
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.8069>; else goto <D.8070>;
  <D.8069>:
  current_time = clock ();
  D.8071 = current_time - start_time;
  D.8072 = (double) D.8071;
  D.8073 = D.8072 * 1.0e+3;
  D.8074 = D.8073 / 1.0e+6;
  D.8075 = (long unsigned int) D.8074;
  D.8076 = (long int) D.8075;
  GC_printf ("Complete collection took %lu msecs\n", D.8076, 0, 0, 0, 0, 0);
  <D.8070>:
  GC_notify_event.33 = GC_notify_event;
  if (GC_notify_event.33 != 0B) goto <D.8077>; else goto <D.8078>;
  <D.8077>:
  GC_notify_event.33 = GC_notify_event;
  GC_notify_event.33 (5);
  <D.8078>:
  D.8028 = 1;
  return D.8028;
}


GC_collect_a_little_inner (int n)
{
  int GC_dont_gc.39;
  int GC_incremental.40;
  int D.8087;
  int D.8089;
  int GC_n_attempts.41;
  long unsigned int GC_time_limit.42;
  long int GC_start_time.43;
  int D.8099;
  int GC_n_attempts.44;
  int D.8103;
  int GC_deficit.45;
  int D.8107;
  int GC_deficit.46;
  register int i;

  GC_dont_gc.39 = GC_dont_gc;
  if (GC_dont_gc.39 != 0) goto <D.8081>; else goto <D.8082>;
  <D.8081>:
  return;
  <D.8082>:
  GC_incremental.40 = GC_incremental;
  if (GC_incremental.40 != 0) goto <D.8086>; else goto <D.8083>;
  <D.8086>:
  D.8087 = GC_collection_in_progress ();
  if (D.8087 != 0) goto <D.8088>; else goto <D.8083>;
  <D.8088>:
  i = GC_deficit;
  goto <D.7765>;
  <D.7764>:
  D.8089 = GC_mark_some (0B);
  if (D.8089 != 0) goto <D.8090>; else goto <D.8091>;
  <D.8090>:
  GC_n_attempts.41 = GC_n_attempts;
  if (GC_n_attempts.41 <= 0) goto <D.8095>; else goto <D.8092>;
  <D.8095>:
  GC_time_limit.42 = GC_time_limit;
  if (GC_time_limit.42 != 999999) goto <D.8097>; else goto <D.8092>;
  <D.8097>:
  GC_start_time.43 = clock ();
  GC_start_time = GC_start_time.43;
  D.8099 = GC_stopped_mark (GC_timeout_stop_func);
  if (D.8099 == 0) goto <D.8100>; else goto <D.8101>;
  <D.8100>:
  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.7763>;
  <D.8101>:
  goto <D.8093>;
  <D.8092>:
  GC_stopped_mark (GC_never_stop_func);
  <D.8093>:
  GC_finish_collection ();
  goto <D.7763>;
  <D.8091>:
  i = i + 1;
  <D.7765>:
  D.8103 = n * 10;
  if (D.8103 > i) goto <D.7764>; else goto <D.7763>;
  <D.7763>:
  GC_deficit.45 = GC_deficit;
  if (GC_deficit.45 > 0) goto <D.8105>; else goto <D.8106>;
  <D.8105>:
  D.8107 = n * -10;
  GC_deficit.45 = GC_deficit;
  GC_deficit.46 = D.8107 + GC_deficit.45;
  GC_deficit = GC_deficit.46;
  <D.8106>:
  GC_deficit.45 = GC_deficit;
  if (GC_deficit.45 < 0) goto <D.8109>; else goto <D.8110>;
  <D.8109>:
  GC_deficit = 0;
  <D.8110>:
  goto <D.8084>;
  <D.8083>:
  GC_maybe_gc ();
  <D.8084>:
}


GC_collect_a_little ()
{
  int D.8112;
  int GC_debugging_started.47;
  void (*<Td5b>) (void) GC_print_all_smashed.48;
  int D.8121;
  int result;

  D.8112 = GC_test_and_set (&GC_allocate_lock);
  if (D.8112 != 0) goto <D.8113>; else goto <D.8114>;
  <D.8113>:
  GC_lock ();
  <D.8114>:
  GC_collect_a_little_inner (1);
  result = GC_collection_in_progress ();
  GC_clear (&GC_allocate_lock);
  if (result == 0) goto <D.8115>; else goto <D.8116>;
  <D.8115>:
  GC_debugging_started.47 = GC_debugging_started;
  if (GC_debugging_started.47 != 0) goto <D.8118>; else goto <D.8119>;
  <D.8118>:
  GC_print_all_smashed.48 = GC_print_all_smashed;
  GC_print_all_smashed.48 ();
  <D.8119>:
  <D.8116>:
  D.8121 = result;
  return D.8121;
}


GC_test_and_set (volatile unsigned int * addr)
{
  int D.8123;
  unsigned int D.8124;

  D.8124 = __sync_lock_test_and_set_4 (addr, 1);
  D.8123 = (int) D.8124;
  return D.8123;
}


GC_clear (volatile unsigned int * addr)
{
  __sync_synchronize ();
  *addr = 0;
}


GC_stopped_mark (int (*GC_stop_func) (void) stop_func)
{
  int GC_print_stats.49;
  void (*<Td54>) (GCEventType) GC_notify_event.50;
  long unsigned int GC_gc_no.51;
  long int GC_gc_no.52;
  long int D.8136;
  long unsigned int D.8137;
  long unsigned int D.8138;
  long int D.8139;
  long unsigned int D.8140;
  long unsigned int D.8141;
  long int D.8142;
  int D.8143;
  GC_bool D.8148;
  int D.8149;
  long unsigned int GC_gc_no.53;
  long int D.8154;
  long unsigned int D.8157;
  long int D.8158;
  int GC_debugging_started.54;
  void (*<Td5b>) (void) GC_check_heap.55;
  long int D.8167;
  double D.8168;
  double D.8169;
  double D.8170;
  long unsigned int D.8171;
  long int D.8172;
  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.8127>; else goto <D.8128>;
      <D.8127>:
      start_time = clock ();
      <D.8128>:
      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.8130>; else goto <D.8131>;
      <D.8130>:
      GC_notify_event.50 = GC_notify_event;
      GC_notify_event.50 (1);
      <D.8131>:
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.8132>; else goto <D.8133>;
      <D.8132>:
      GC_gc_no.51 = GC_gc_no;
      GC_gc_no.52 = (long int) GC_gc_no.51;
      D.8136 = GC_gc_no.52 + 1;
      GC_printf ("--> Marking for collection %lu ", D.8136, 0, 0, 0, 0, 0);
      D.8137 = GC_arrays._words_allocd;
      D.8138 = D.8137 << 2;
      D.8139 = (long int) D.8138;
      D.8140 = GC_arrays._words_wasted;
      D.8141 = D.8140 << 2;
      D.8142 = (long int) D.8141;
      GC_printf ("after %lu allocd bytes + %lu wasted bytes\n", D.8139, D.8142, 0, 0, 0, 0);
      <D.8133>:
      GC_clear_a_few_frames ();
      GC_noop (0B, 0, 0, 0, 0, 0);
      GC_initiate_gc ();
      i = 0;
      <D.7778>:
      D.8143 = stop_func ();
      if (D.8143 != 0) goto <D.8144>; else goto <D.8145>;
      <D.8144>:
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.8146>; else goto <D.8147>;
      <D.8146>:
      GC_printf ("Abandoned stopped marking after ", 0, 0, 0, 0, 0, 0);
      GC_printf ("%lu iterations\n", i, 0, 0, 0, 0, 0);
      <D.8147>:
      GC_deficit = i;
      GC_world_stopped = 0;
      GC_start_world ();
      D.8148 = 0;
      return D.8148;
      <D.8145>:
      D.8149 = GC_mark_some (&dummy);
      if (D.8149 != 0) goto <D.7777>; else goto <D.8150>;
      <D.8150>:
      i = i + 1;
      goto <D.7778>;
      <D.7777>:
      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.8152>; else goto <D.8153>;
      <D.8152>:
      GC_gc_no.51 = GC_gc_no;
      GC_gc_no.52 = (long int) GC_gc_no.51;
      D.8154 = GC_gc_no.52 + -1;
      GC_printf ("Collection %lu finished", D.8154, 0, 0, 0, 0, 0);
      <D.8153>:
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.8155>; else goto <D.8156>;
      <D.8155>:
      D.8157 = GC_arrays._heapsize;
      D.8158 = (long int) D.8157;
      GC_printf (" ---> heapsize = %lu bytes\n", D.8158, 0, 0, 0, 0, 0);
      GC_printf ("", 0, 0, 0, 0, 0, 0);
      <D.8156>:
      GC_debugging_started.54 = GC_debugging_started;
      if (GC_debugging_started.54 != 0) goto <D.8160>; else goto <D.8161>;
      <D.8160>:
      GC_check_heap.55 = GC_check_heap;
      GC_check_heap.55 ();
      <D.8161>:
      GC_notify_event.50 = GC_notify_event;
      if (GC_notify_event.50 != 0B) goto <D.8163>; else goto <D.8164>;
      <D.8163>:
      GC_notify_event.50 = GC_notify_event;
      GC_notify_event.50 (2);
      <D.8164>:
      GC_world_stopped = 0;
      GC_start_world ();
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.8165>; else goto <D.8166>;
      <D.8165>:
      current_time = clock ();
      D.8167 = current_time - start_time;
      D.8168 = (double) D.8167;
      D.8169 = D.8168 * 1.0e+3;
      D.8170 = D.8169 / 1.0e+6;
      D.8171 = (long unsigned int) D.8170;
      D.8172 = (long int) D.8171;
      GC_printf ("World-stopped marking took %lu msecs\n", D.8172, 0, 0, 0, 0, 0);
      <D.8166>:
      D.8148 = 1;
      return D.8148;
    }
  finally
    {
      dummy = {CLOBBER};
    }
}


GC_set_fl_marks (char * q)
{
  long unsigned int p.56;
  long unsigned int D.8176;
  long unsigned int h.57;
  long unsigned int D.8180;
  struct bottom_index * D.8181;
  long unsigned int D.8182;
  long unsigned int D.8183;
  int p.58;
  int h.59;
  int D.8186;
  int D.8187;
  sizetype D.8188;
  long unsigned int D.8189;
  int D.8190;
  long unsigned int D.8191;
  long unsigned int D.8192;
  char * p;
  struct hblk * h;
  struct hblk * last_h;
  struct hdr * hhdr;
  int word_no;

  last_h = 0B;
  p = q;
  goto <D.7789>;
  <D.7788>:
  p.56 = (long unsigned int) p;
  D.8176 = p.56 & 4294963200;
  h = (struct hblk *) D.8176;
  if (h != last_h) goto <D.8177>; else goto <D.8178>;
  <D.8177>:
  last_h = h;
  h.57 = (long unsigned int) h;
  D.8180 = h.57 >> 22;
  D.8181 = GC_arrays._top_index[D.8180];
  h.57 = (long unsigned int) h;
  D.8182 = h.57 >> 12;
  D.8183 = D.8182 & 1023;
  hhdr = D.8181->index[D.8183];
  <D.8178>:
  p.58 = (int) p;
  h.59 = (int) h;
  D.8186 = p.58 - h.59;
  word_no = D.8186 /[ex] 4;
  D.8187 = word_no >> 5;
  D.8188 = (sizetype) D.8187;
  D.8187 = word_no >> 5;
  D.8188 = (sizetype) D.8187;
  D.8189 = hhdr->hb_marks[D.8188];
  D.8190 = word_no & 31;
  D.8191 = 1 << D.8190;
  D.8192 = D.8189 | D.8191;
  hhdr->hb_marks[D.8188] = D.8192;
  p = MEM[(char * *)p];
  <D.7789>:
  if (p != 0B) goto <D.7788>; else goto <D.7790>;
  <D.7790>:
}


GC_clear_fl_marks (char * q)
{
  long unsigned int p.60;
  long unsigned int D.8194;
  long unsigned int h.61;
  long unsigned int D.8198;
  struct bottom_index * D.8199;
  long unsigned int D.8200;
  long unsigned int D.8201;
  int p.62;
  int h.63;
  int D.8204;
  int D.8205;
  long unsigned int D.8206;
  int D.8207;
  long unsigned int D.8208;
  long unsigned int D.8209;
  long unsigned int D.8210;
  char * p;
  struct hblk * h;
  struct hblk * last_h;
  struct hdr * hhdr;
  int word_no;

  last_h = 0B;
  p = q;
  goto <D.7800>;
  <D.7799>:
  p.60 = (long unsigned int) p;
  D.8194 = p.60 & 4294963200;
  h = (struct hblk *) D.8194;
  if (h != last_h) goto <D.8195>; else goto <D.8196>;
  <D.8195>:
  last_h = h;
  h.61 = (long unsigned int) h;
  D.8198 = h.61 >> 22;
  D.8199 = GC_arrays._top_index[D.8198];
  h.61 = (long unsigned int) h;
  D.8200 = h.61 >> 12;
  D.8201 = D.8200 & 1023;
  hhdr = D.8199->index[D.8201];
  <D.8196>:
  p.62 = (int) p;
  h.63 = (int) h;
  D.8204 = p.62 - h.63;
  word_no = D.8204 /[ex] 4;
  D.8205 = word_no >> 5;
  D.8205 = word_no >> 5;
  D.8206 = hhdr->hb_marks[D.8205];
  D.8207 = word_no & 31;
  D.8208 = 1 << D.8207;
  D.8209 = ~D.8208;
  D.8210 = D.8206 & D.8209;
  hhdr->hb_marks[D.8205] = D.8210;
  p = MEM[(char * *)p];
  <D.7800>:
  if (p != 0B) goto <D.7799>; else goto <D.7801>;
  <D.7801>:
}


GC_finish_collection ()
{
  void (*<Td54>) (GCEventType) GC_notify_event.64;
  char * D.8214;
  int GC_dump_regularly.65;
  int GC_find_leak.66;
  char * * D.8223;
  long unsigned int D.8224;
  char * * D.8225;
  int GC_n_kinds.67;
  int GC_print_back_height.68;
  char * * D.8232;
  long unsigned int D.8233;
  char * * D.8234;
  int GC_is_full_gc.69;
  long unsigned int D.8240;
  long unsigned int D.8241;
  long unsigned int GC_used_heap_size_after_full.70;
  long unsigned int GC_used_heap_size_after_full.71;
  long unsigned int D.8245;
  long unsigned int D.8246;
  long unsigned int D.8247;
  _Bool D.8248;
  int GC_need_full_gc.72;
  long unsigned int D.8250;
  long unsigned int D.8251;
  long unsigned int D.8252;
  long unsigned int GC_non_gc_bytes.73;

  GC_notify_event.64 = GC_notify_event;
  if (GC_notify_event.64 != 0B) goto <D.8212>; else goto <D.8213>;
  <D.8212>:
  GC_notify_event.64 = GC_notify_event;
  GC_notify_event.64 (3);
  <D.8213>:
  D.8214 = getenv ("GC_PRINT_ADDRESS_MAP");
  if (D.8214 != 0B) goto <D.8215>; else goto <D.8216>;
  <D.8215>:
  GC_print_address_map ();
  <D.8216>:
  GC_dump_regularly.65 = GC_dump_regularly;
  if (GC_dump_regularly.65 != 0) goto <D.8218>; else goto <D.8219>;
  <D.8218>:
  GC_dump ();
  <D.8219>:
  GC_find_leak.66 = GC_find_leak;
  if (GC_find_leak.66 != 0) goto <D.8221>; else goto <D.8222>;
  <D.8221>:
  {
    register word size;
    int kind;
    char * q;

    kind = 0;
    goto <D.7815>;
    <D.7814>:
    size = 1;
    goto <D.7812>;
    <D.7811>:
    D.8223 = GC_obj_kinds[kind].ok_freelist;
    D.8224 = size * 4;
    D.8225 = D.8223 + D.8224;
    q = *D.8225;
    if (q != 0B) goto <D.8226>; else goto <D.8227>;
    <D.8226>:
    GC_set_fl_marks (q);
    <D.8227>:
    size = size + 1;
    <D.7812>:
    if (size <= 512) goto <D.7811>; else goto <D.7813>;
    <D.7813>:
    kind = kind + 1;
    <D.7815>:
    GC_n_kinds.67 = GC_n_kinds;
    if (kind < GC_n_kinds.67) goto <D.7814>; else goto <D.7816>;
    <D.7816>:
  }
  GC_start_reclaim (1);
  <D.8222>:
  GC_finalize ();
  GC_print_back_height.68 = GC_print_back_height;
  if (GC_print_back_height.68 != 0) goto <D.8230>; else goto <D.8231>;
  <D.8230>:
  GC_err_puts ("Back height not available: Rebuild collector with -DMAKE_BACK_GRAPH\n");
  <D.8231>:
  {
    register word size;
    register char * q;
    int kind;

    kind = 0;
    goto <D.7824>;
    <D.7823>:
    size = 1;
    goto <D.7821>;
    <D.7820>:
    D.8232 = GC_obj_kinds[kind].ok_freelist;
    D.8233 = size * 4;
    D.8234 = D.8232 + D.8233;
    q = *D.8234;
    if (q != 0B) goto <D.8235>; else goto <D.8236>;
    <D.8235>:
    GC_clear_fl_marks (q);
    <D.8236>:
    size = size + 1;
    <D.7821>:
    if (size <= 512) goto <D.7820>; else goto <D.7822>;
    <D.7822>:
    kind = kind + 1;
    <D.7824>:
    GC_n_kinds.67 = GC_n_kinds;
    if (kind < GC_n_kinds.67) goto <D.7823>; else goto <D.7825>;
    <D.7825>:
  }
  GC_start_reclaim (0);
  GC_is_full_gc.69 = GC_is_full_gc;
  if (GC_is_full_gc.69 != 0) goto <D.8238>; else goto <D.8239>;
  <D.8238>:
  D.8240 = GC_arrays._heapsize;
  D.8241 = GC_arrays._large_free_bytes;
  GC_used_heap_size_after_full.70 = D.8240 - D.8241;
  GC_used_heap_size_after_full = GC_used_heap_size_after_full.70;
  GC_need_full_gc = 0;
  goto <D.8243>;
  <D.8239>:
  D.8240 = GC_arrays._heapsize;
  D.8241 = GC_arrays._large_free_bytes;
  GC_used_heap_size_after_full.70 = D.8240 - D.8241;
  GC_used_heap_size_after_full.71 = GC_used_heap_size_after_full;
  D.8245 = GC_used_heap_size_after_full.70 - GC_used_heap_size_after_full.71;
  D.8246 = D.8245 >> 2;
  D.8247 = min_words_allocd ();
  D.8248 = D.8246 > D.8247;
  GC_need_full_gc.72 = (int) D.8248;
  GC_need_full_gc = GC_need_full_gc.72;
  <D.8243>:
  GC_n_attempts = 0;
  GC_is_full_gc = 0;
  D.8250 = GC_arrays._words_allocd_before_gc;
  D.8251 = GC_arrays._words_allocd;
  D.8252 = D.8250 + D.8251;
  GC_arrays._words_allocd_before_gc = D.8252;
  GC_non_gc_bytes.73 = GC_non_gc_bytes;
  GC_arrays._non_gc_bytes_at_gc = GC_non_gc_bytes.73;
  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.64 = GC_notify_event;
  if (GC_notify_event.64 != 0B) goto <D.8254>; else goto <D.8255>;
  <D.8254>:
  GC_notify_event.64 = GC_notify_event;
  GC_notify_event.64 (4);
  <D.8255>:
}


GC_try_to_collect (int (*GC_stop_func) (void) stop_func)
{
  int GC_debugging_started.74;
  void (*<Td5b>) (void) GC_print_all_smashed.75;
  int D.8260;
  int GC_is_initialized.76;
  int D.8270;
  int result;

  GC_debugging_started.74 = GC_debugging_started;
  if (GC_debugging_started.74 != 0) goto <D.8257>; else goto <D.8258>;
  <D.8257>:
  GC_print_all_smashed.75 = GC_print_all_smashed;
  GC_print_all_smashed.75 ();
  <D.8258>:
  GC_notify_or_invoke_finalizers ();
  D.8260 = GC_test_and_set (&GC_allocate_lock);
  if (D.8260 != 0) goto <D.8261>; else goto <D.8262>;
  <D.8261>:
  GC_lock ();
  <D.8262>:
  GC_collecting = 1;
  GC_is_initialized.76 = GC_is_initialized;
  if (GC_is_initialized.76 == 0) goto <D.8264>; else goto <D.8265>;
  <D.8264>:
  GC_init_inner ();
  <D.8265>:
  GC_noop (0B, 0, 0, 0, 0, 0);
  result = GC_try_to_collect_inner (stop_func);
  GC_collecting = 0;
  GC_clear (&GC_allocate_lock);
  if (result != 0) goto <D.8266>; else goto <D.8267>;
  <D.8266>:
  GC_debugging_started.74 = GC_debugging_started;
  if (GC_debugging_started.74 != 0) goto <D.8268>; else goto <D.8269>;
  <D.8268>:
  GC_print_all_smashed.75 = GC_print_all_smashed;
  GC_print_all_smashed.75 ();
  <D.8269>:
  GC_notify_or_invoke_finalizers ();
  <D.8267>:
  D.8270 = result;
  return D.8270;
}


GC_gcollect ()
{
  int GC_have_errors.77;

  GC_try_to_collect (GC_never_stop_func);
  GC_have_errors.77 = GC_have_errors;
  if (GC_have_errors.77 != 0) goto <D.8273>; else goto <D.8274>;
  <D.8273>:
  GC_print_all_errors ();
  <D.8274>:
}


GC_add_to_heap (struct hblk * p, word bytes)
{
  long unsigned int GC_n_heap_sects.78;
  long unsigned int GC_n_heap_sects.79;
  long unsigned int D.8281;
  long unsigned int D.8282;
  void * GC_least_plausible_heap_addr.80;
  void * GC_least_plausible_heap_addr.81;
  char * D.8288;
  void * GC_greatest_plausible_heap_addr.82;
  void * GC_greatest_plausible_heap_addr.83;
  word words;
  struct hdr * phdr;

  GC_n_heap_sects.78 = GC_n_heap_sects;
  if (GC_n_heap_sects.78 > 511) goto <D.8276>; else goto <D.8277>;
  <D.8276>:
  GC_abort ("Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS");
  <D.8277>:
  phdr = GC_install_header (p);
  if (phdr == 0B) goto <D.8278>; else goto <D.8279>;
  <D.8278>:
  return;
  <D.8279>:
  GC_n_heap_sects.78 = GC_n_heap_sects;
  GC_arrays._heap_sects[GC_n_heap_sects.78].hs_start = p;
  GC_n_heap_sects.78 = GC_n_heap_sects;
  GC_arrays._heap_sects[GC_n_heap_sects.78].hs_bytes = bytes;
  GC_n_heap_sects.78 = GC_n_heap_sects;
  GC_n_heap_sects.79 = GC_n_heap_sects.78 + 1;
  GC_n_heap_sects = GC_n_heap_sects.79;
  words = bytes >> 2;
  phdr->hb_sz = words;
  phdr->hb_map = 1B;
  phdr->hb_flags = 0;
  GC_freehblk (p);
  D.8281 = GC_arrays._heapsize;
  D.8282 = D.8281 + bytes;
  GC_arrays._heapsize = D.8282;
  GC_least_plausible_heap_addr.80 = GC_least_plausible_heap_addr;
  if (p <= GC_least_plausible_heap_addr.80) goto <D.8283>; else goto <D.8286>;
  <D.8286>:
  GC_least_plausible_heap_addr.80 = GC_least_plausible_heap_addr;
  if (GC_least_plausible_heap_addr.80 == 0B) goto <D.8283>; else goto <D.8284>;
  <D.8283>:
  GC_least_plausible_heap_addr.81 = p + 4294967292;
  GC_least_plausible_heap_addr = GC_least_plausible_heap_addr.81;
  <D.8284>:
  D.8288 = p + bytes;
  GC_greatest_plausible_heap_addr.82 = GC_greatest_plausible_heap_addr;
  if (D.8288 >= GC_greatest_plausible_heap_addr.82) goto <D.8290>; else goto <D.8291>;
  <D.8290>:
  GC_greatest_plausible_heap_addr.83 = p + bytes;
  GC_greatest_plausible_heap_addr = GC_greatest_plausible_heap_addr.83;
  <D.8291>:
}


GC_print_heap_sects ()
{
  long unsigned int D.8294;
  long int D.8295;
  char * D.8296;
  long int i.84;
  long int start.85;
  long unsigned int D.8299;
  long int D.8300;
  struct hblk * D.8301;
  struct hblk * D.8304;
  long int nbl.86;
  long unsigned int D.8306;
  long int D.8307;
  long unsigned int GC_n_heap_sects.87;
  register unsigned int i;

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

    D.8296 = GC_arrays._heap_sects[i].hs_start;
    start = (long unsigned int) D.8296;
    len = GC_arrays._heap_sects[i].hs_bytes;
    nbl = 0;
    i.84 = (long int) i;
    start.85 = (long int) start;
    D.8299 = start + len;
    D.8300 = (long int) D.8299;
    GC_printf ("Section %ld from 0x%lx to 0x%lx ", i.84, start.85, D.8300, 0, 0, 0);
    h = (struct hblk *) start;
    goto <D.7847>;
    <D.7846>:
    D.8301 = GC_is_black_listed (h, 4096);
    if (D.8301 != 0B) goto <D.8302>; else goto <D.8303>;
    <D.8302>:
    nbl = nbl + 1;
    <D.8303>:
    h = h + 4096;
    <D.7847>:
    D.8299 = start + len;
    D.8304 = (struct hblk *) D.8299;
    if (D.8304 > h) goto <D.7846>; else goto <D.7848>;
    <D.7848>:
    nbl.86 = (long int) nbl;
    D.8306 = len / 4096;
    D.8307 = (long int) D.8306;
    GC_printf ("%lu/%lu blacklisted\n", nbl.86, D.8307, 0, 0, 0, 0);
  }
  i = i + 1;
  <D.7850>:
  GC_n_heap_sects.87 = GC_n_heap_sects;
  if (i < GC_n_heap_sects.87) goto <D.7849>; else goto <D.7851>;
  <D.7851>:
}


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

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


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

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


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.88;
  long unsigned int D.8316;
  long unsigned int D.8317;
  long unsigned int D.8320;
  long unsigned int D.8321;
  GC_bool D.8324;
  int GC_print_stats.89;
  long int bytes.90;
  long unsigned int D.8333;
  long unsigned int D.8334;
  long int D.8335;
  long unsigned int D.8336;
  long unsigned int D.8337;
  char * D.8342;
  signed int space.91;
  void * GC_greatest_plausible_heap_addr.92;
  sizetype D.8347;
  char * D.8348;
  char * GC_greatest_plausible_heap_addr.93;
  void * GC_least_plausible_heap_addr.94;
  sizetype D.8351;
  char * D.8352;
  char * GC_least_plausible_heap_addr.95;
  long unsigned int D.8354;
  long unsigned int GC_collect_at_heapsize.96;
  void (*<Td58>) (size_t) GC_on_heap_resize.97;
  word bytes;
  struct hblk * space;
  word expansion_slop;

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

    GC_page_size.88 = GC_page_size;
    mask = GC_page_size.88 + 4294967295;
    bytes = bytes + mask;
    D.8316 = ~mask;
    bytes = D.8316 & bytes;
  }
  D.8317 = GC_arrays._max_heapsize;
  if (D.8317 != 0) goto <D.8318>; else goto <D.8319>;
  <D.8318>:
  D.8320 = GC_arrays._heapsize;
  D.8321 = D.8320 + bytes;
  D.8317 = GC_arrays._max_heapsize;
  if (D.8321 > D.8317) goto <D.8322>; else goto <D.8323>;
  <D.8322>:
  D.8324 = 0;
  return D.8324;
  <D.8323>:
  <D.8319>:
  space = GC_unix_get_mem (bytes);
  if (space == 0B) goto <D.8325>; else goto <D.8326>;
  <D.8325>:
  GC_print_stats.89 = GC_print_stats;
  if (GC_print_stats.89 != 0) goto <D.8328>; else goto <D.8329>;
  <D.8328>:
  bytes.90 = (long int) bytes;
  GC_printf ("Failed to expand heap by %ld bytes\n", bytes.90, 0, 0, 0, 0, 0);
  <D.8329>:
  D.8324 = 0;
  return D.8324;
  <D.8326>:
  GC_print_stats.89 = GC_print_stats;
  if (GC_print_stats.89 != 0) goto <D.8331>; else goto <D.8332>;
  <D.8331>:
  bytes.90 = (long int) bytes;
  D.8333 = GC_arrays._words_allocd;
  D.8334 = D.8333 << 2;
  D.8335 = (long int) D.8334;
  GC_printf ("Increasing heap size by %lu after %lu allocated bytes\n", bytes.90, D.8335, 0, 0, 0, 0);
  <D.8332>:
  D.8336 = min_words_allocd ();
  D.8337 = D.8336 << 2;
  expansion_slop = D.8337 + 33554432;
  D.8342 = GC_arrays._last_heap_addr;
  if (D.8342 == 0B) goto <D.8343>; else goto <D.8338>;
  <D.8343>:
  space.91 = (signed int) space;
  if (space.91 >= 0) goto <D.8339>; else goto <D.8338>;
  <D.8338>:
  D.8342 = GC_arrays._last_heap_addr;
  if (D.8342 != 0B) goto <D.8345>; else goto <D.8340>;
  <D.8345>:
  D.8342 = GC_arrays._last_heap_addr;
  if (D.8342 < space) goto <D.8339>; else goto <D.8340>;
  <D.8339>:
  GC_greatest_plausible_heap_addr.92 = GC_greatest_plausible_heap_addr;
  D.8347 = bytes + expansion_slop;
  D.8348 = space + D.8347;
  GC_greatest_plausible_heap_addr.93 = GC_max (GC_greatest_plausible_heap_addr.92, D.8348);
  GC_greatest_plausible_heap_addr = GC_greatest_plausible_heap_addr.93;
  goto <D.8341>;
  <D.8340>:
  GC_least_plausible_heap_addr.94 = GC_least_plausible_heap_addr;
  D.8351 = -expansion_slop;
  D.8352 = space + D.8351;
  GC_least_plausible_heap_addr.95 = GC_min (GC_least_plausible_heap_addr.94, D.8352);
  GC_least_plausible_heap_addr = GC_least_plausible_heap_addr.95;
  <D.8341>:
  D.8342 = GC_arrays._last_heap_addr;
  GC_arrays._prev_heap_addr = D.8342;
  GC_arrays._last_heap_addr = space;
  GC_add_to_heap (space, bytes);
  D.8320 = GC_arrays._heapsize;
  D.8354 = D.8320 + expansion_slop;
  GC_collect_at_heapsize.96 = D.8354 + 4278190080;
  GC_collect_at_heapsize = GC_collect_at_heapsize.96;
  GC_on_heap_resize.97 = GC_on_heap_resize;
  if (GC_on_heap_resize.97 != 0B) goto <D.8357>; else goto <D.8358>;
  <D.8357>:
  GC_on_heap_resize.97 = GC_on_heap_resize;
  D.8320 = GC_arrays._heapsize;
  GC_on_heap_resize.97 (D.8320);
  <D.8358>:
  D.8324 = 1;
  return D.8324;
}


GC_expand_hp (size_t bytes)
{
  int D.8360;
  int GC_is_initialized.98;
  long unsigned int D.8366;
  long unsigned int D.8369;
  long unsigned int D.8370;
  int D.8371;
  int result;

  D.8360 = GC_test_and_set (&GC_allocate_lock);
  if (D.8360 != 0) goto <D.8361>; else goto <D.8362>;
  <D.8361>:
  GC_lock ();
  <D.8362>:
  GC_is_initialized.98 = GC_is_initialized;
  if (GC_is_initialized.98 == 0) goto <D.8364>; else goto <D.8365>;
  <D.8364>:
  GC_init_inner ();
  <D.8365>:
  D.8366 = bytes >> 12;
  result = GC_expand_hp_inner (D.8366);
  if (result != 0) goto <D.8367>; else goto <D.8368>;
  <D.8367>:
  D.8369 = GC_arrays._requested_heapsize;
  D.8370 = D.8369 + bytes;
  GC_arrays._requested_heapsize = D.8370;
  <D.8368>:
  GC_clear (&GC_allocate_lock);
  D.8371 = result;
  return D.8371;
}


GC_collect_or_expand (word needed_blocks, GC_bool ignore_off_page)
{
  int GC_incremental.99;
  int GC_dont_gc.100;
  int GC_dont_expand.101;
  long unsigned int D.8384;
  long unsigned int last_fo_entries.102;
  long unsigned int D.8386;
  long unsigned int GC_fo_entries.103;
  long unsigned int last_words_finalized.104;
  long unsigned int last_words_finalized.105;
  int D.8392;
  long unsigned int D.8393;
  long unsigned int GC_free_space_divisor.106;
  long unsigned int D.8395;
  long unsigned int D.8396;
  long unsigned int GC_black_list_spacing.107;
  long unsigned int D.8403;
  long unsigned int D.8406;
  int D.8412;
  int D.8414;
  unsigned int GC_fail_count.108;
  unsigned int GC_fail_count.109;
  unsigned int GC_fail_count.110;
  long unsigned int GC_max_retries.111;
  void (*<Tdd1>) (char *, GC_word) GC_current_warn_proc.112;
  GC_bool D.8424;
  int GC_print_stats.113;

  GC_incremental.99 = GC_incremental;
  if (GC_incremental.99 == 0) goto <D.8379>; else goto <D.8373>;
  <D.8379>:
  GC_dont_gc.100 = GC_dont_gc;
  if (GC_dont_gc.100 == 0) goto <D.8381>; else goto <D.8373>;
  <D.8381>:
  GC_dont_expand.101 = GC_dont_expand;
  if (GC_dont_expand.101 != 0) goto <D.8383>; else goto <D.8374>;
  <D.8383>:
  D.8384 = GC_arrays._words_allocd;
  if (D.8384 != 0) goto <D.8375>; else goto <D.8374>;
  <D.8374>:
  last_fo_entries.102 = last_fo_entries;
  D.8386 = last_fo_entries.102 + 500;
  GC_fo_entries.103 = GC_fo_entries;
  if (D.8386 < GC_fo_entries.103) goto <D.8388>; else goto <D.8376>;
  <D.8388>:
  last_words_finalized.104 = last_words_finalized;
  if (last_words_finalized.104 != 0) goto <D.8375>; else goto <D.8390>;
  <D.8390>:
  last_words_finalized.105 = GC_arrays._words_finalized;
  if (last_words_finalized.105 != 0) goto <D.8375>; else goto <D.8376>;
  <D.8376>:
  D.8392 = GC_should_collect ();
  if (D.8392 != 0) goto <D.8375>; else goto <D.8373>;
  <D.8375>:
  GC_try_to_collect_inner (GC_never_stop_func);
  GC_fo_entries.103 = GC_fo_entries;
  last_fo_entries = GC_fo_entries.103;
  last_words_finalized.105 = GC_arrays._words_finalized;
  last_words_finalized = last_words_finalized.105;
  goto <D.8377>;
  <D.8373>:
  {
    word blocks_to_get;

    D.8393 = GC_arrays._heapsize;
    GC_free_space_divisor.106 = GC_free_space_divisor;
    D.8395 = GC_free_space_divisor.106 * 4096;
    D.8396 = D.8393 / D.8395;
    blocks_to_get = D.8396 + needed_blocks;
    if (blocks_to_get > 2048) goto <D.8397>; else goto <D.8398>;
    <D.8397>:
    {
      word slop;

      if (ignore_off_page != 0) goto <D.8399>; else goto <D.8400>;
      <D.8399>:
      slop = 4;
      goto <D.8401>;
      <D.8400>:
      GC_black_list_spacing.107 = GC_black_list_spacing;
      D.8403 = GC_black_list_spacing.107 >> 12;
      slop = D.8403 * 2;
      if (slop > needed_blocks) goto <D.8404>; else goto <D.8405>;
      <D.8404>:
      slop = needed_blocks;
      <D.8405>:
      <D.8401>:
      D.8406 = needed_blocks + slop;
      if (D.8406 > 2048) goto <D.8407>; else goto <D.8408>;
      <D.8407>:
      blocks_to_get = needed_blocks + slop;
      goto <D.8409>;
      <D.8408>:
      blocks_to_get = 2048;
      <D.8409>:
    }
    <D.8398>:
    D.8412 = GC_expand_hp_inner (blocks_to_get);
    if (D.8412 == 0) goto <D.8413>; else goto <D.8410>;
    <D.8413>:
    D.8414 = GC_expand_hp_inner (needed_blocks);
    if (D.8414 == 0) goto <D.8415>; else goto <D.8410>;
    <D.8415>:
    GC_fail_count.108 = GC_fail_count;
    GC_fail_count.109 = GC_fail_count.108;
    GC_fail_count.110 = GC_fail_count.109 + 1;
    GC_fail_count = GC_fail_count.110;
    GC_max_retries.111 = GC_max_retries;
    if (GC_fail_count.109 < GC_max_retries.111) goto <D.8420>; else goto <D.8421>;
    <D.8420>:
    GC_current_warn_proc.112 = GC_current_warn_proc;
    GC_current_warn_proc.112 ("GC Warning: Out of Memory!  Trying to continue ...\n", 0);
    GC_try_to_collect_inner (GC_never_stop_func);
    goto <D.8423>;
    <D.8421>:
    GC_current_warn_proc.112 = GC_current_warn_proc;
    GC_current_warn_proc.112 ("GC Warning: Out of Memory!  Returning NIL!\n", 0);
    D.8424 = 0;
    return D.8424;
    <D.8423>:
    goto <D.8411>;
    <D.8410>:
    GC_fail_count.108 = GC_fail_count;
    if (GC_fail_count.108 != 0) goto <D.8425>; else goto <D.8426>;
    <D.8425>:
    GC_print_stats.113 = GC_print_stats;
    if (GC_print_stats.113 != 0) goto <D.8428>; else goto <D.8429>;
    <D.8428>:
    GC_printf ("Memory available again ...\n", 0, 0, 0, 0, 0, 0);
    <D.8429>:
    <D.8426>:
    <D.8411>:
  }
  <D.8377>:
  D.8424 = 1;
  return D.8424;
}


GC_allocobj (word sz, int kind)
{
  char * * D.8431;
  long unsigned int D.8432;
  char * D.8435;
  int GC_incremental.114;
  long unsigned int GC_time_limit.115;
  char * D.8442;
  int D.8452;
  char * * flh;
  GC_bool tried_minor;

  D.8431 = GC_obj_kinds[kind].ok_freelist;
  D.8432 = sz * 4;
  flh = D.8431 + D.8432;
  tried_minor = 0;
  if (sz == 0) goto <D.8433>; else goto <D.8434>;
  <D.8433>:
  D.8435 = 0B;
  return D.8435;
  <D.8434>:
  goto <D.7893>;
  <D.7892>:
  GC_collecting = 1;
  GC_incremental.114 = GC_incremental;
  if (GC_incremental.114 != 0) goto <D.8437>; else goto <D.8438>;
  <D.8437>:
  GC_time_limit.115 = GC_time_limit;
  if (GC_time_limit.115 != 999999) goto <D.8440>; else goto <D.8441>;
  <D.8440>:
  GC_collect_a_little_inner (1);
  <D.8441>:
  <D.8438>:
  GC_continue_reclaim (sz, kind);
  GC_collecting = 0;
  D.8442 = *flh;
  if (D.8442 == 0B) goto <D.8443>; else goto <D.8444>;
  <D.8443>:
  GC_new_hblk (sz, kind);
  <D.8444>:
  D.8442 = *flh;
  if (D.8442 == 0B) goto <D.8445>; else goto <D.8446>;
  <D.8445>:
  GC_collecting = 1;
  GC_incremental.114 = GC_incremental;
  if (GC_incremental.114 != 0) goto <D.8449>; else goto <D.8447>;
  <D.8449>:
  GC_time_limit.115 = GC_time_limit;
  if (GC_time_limit.115 == 999999) goto <D.8450>; else goto <D.8447>;
  <D.8450>:
  if (tried_minor == 0) goto <D.8451>; else goto <D.8447>;
  <D.8451>:
  GC_collect_a_little_inner (1);
  tried_minor = 1;
  goto <D.8448>;
  <D.8447>:
  D.8452 = GC_collect_or_expand (1, 0);
  if (D.8452 == 0) goto <D.8453>; else goto <D.8454>;
  <D.8453>:
  GC_collecting = 0;
  D.8435 = 0B;
  return D.8435;
  <D.8454>:
  <D.8448>:
  GC_collecting = 0;
  <D.8446>:
  <D.7893>:
  D.8442 = *flh;
  if (D.8442 == 0B) goto <D.7892>; else goto <D.7894>;
  <D.7894>:
  GC_fail_count = 0;
  D.8435 = *flh;
  return D.8435;
}


