GC_never_stop_func ()
{
  GC_bool D.6228;

  D.6228 = 0;
  return D.6228;
}


GC_timeout_stop_func ()
{
  unsigned int count.0;
  unsigned int count.1;
  unsigned int count.2;
  unsigned int D.6233;
  int D.6236;
  long int GC_start_time.3;
  long int D.6238;
  double D.6239;
  double D.6240;
  double D.6241;
  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.6250;
  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.6233 = count.1 & 3;
  if (D.6233 != 0) goto <D.6234>; else goto <D.6235>;
  <D.6234>:
  D.6236 = 0;
  return D.6236;
  <D.6235>:
  current_time = clock ();
  GC_start_time.3 = GC_start_time;
  D.6238 = current_time - GC_start_time.3;
  D.6239 = (double) D.6238;
  D.6240 = D.6239 * 1.0e+3;
  D.6241 = D.6240 / 1.0e+6;
  time_diff = (long unsigned int) D.6241;
  GC_time_limit.4 = GC_time_limit;
  if (time_diff >= GC_time_limit.4) goto <D.6243>; else goto <D.6244>;
  <D.6243>:
  GC_print_stats.5 = GC_print_stats;
  if (GC_print_stats.5 != 0) goto <D.6246>; else goto <D.6247>;
  <D.6246>:
  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.6250 = (long int) GC_n_attempts.7;
  GC_printf ("(attempt %ld)\n", D.6250, 0, 0, 0, 0, 0);
  <D.6247>:
  D.6236 = 1;
  return D.6236;
  <D.6244>:
  D.6236 = 0;
  return D.6236;
}


GC_adj_words_allocd ()
{
  long unsigned int GC_non_gc_bytes.8;
  long int GC_non_gc_bytes.9;
  long unsigned int D.6254;
  long int D.6255;
  long int D.6256;
  long unsigned int D.6257;
  long int D.6258;
  long unsigned int D.6259;
  long int D.6260;
  long int D.6261;
  long unsigned int D.6262;
  long int D.6263;
  long int D.6264;
  long unsigned int D.6267;
  long unsigned int result.10;
  long unsigned int D.6269;
  long unsigned int D.6270;
  long unsigned int D.6271;
  long unsigned int D.6274;
  long unsigned int D.6275;
  long int D.6276;
  word D.6279;
  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.6254 = GC_arrays._non_gc_bytes_at_gc;
  D.6255 = (long int) D.6254;
  D.6256 = GC_non_gc_bytes.9 - D.6255;
  expl_managed = D.6256 >> 3;
  D.6257 = GC_arrays._words_allocd;
  D.6258 = (long int) D.6257;
  D.6259 = GC_arrays._mem_freed;
  D.6260 = (long int) D.6259;
  D.6261 = D.6258 - D.6260;
  D.6262 = GC_arrays._finalizer_mem_freed;
  D.6263 = (long int) D.6262;
  D.6264 = D.6261 + D.6263;
  result = D.6264 - expl_managed;
  D.6257 = GC_arrays._words_allocd;
  D.6258 = (long int) D.6257;
  if (D.6258 < result) goto <D.6265>; else goto <D.6266>;
  <D.6265>:
  D.6257 = GC_arrays._words_allocd;
  result = (signed_word) D.6257;
  <D.6266>:
  D.6267 = GC_arrays._words_finalized;
  result.10 = (long unsigned int) result;
  D.6269 = D.6267 + result.10;
  result = (signed_word) D.6269;
  D.6270 = GC_arrays._words_wasted;
  D.6271 = D.6270 >> 3;
  result.10 = (long unsigned int) result;
  if (D.6271 < result.10) goto <D.6272>; else goto <D.6273>;
  <D.6272>:
  D.6270 = GC_arrays._words_wasted;
  result.10 = (long unsigned int) result;
  D.6274 = D.6270 + result.10;
  result = (signed_word) D.6274;
  <D.6273>:
  D.6257 = GC_arrays._words_allocd;
  D.6275 = D.6257 >> 3;
  D.6276 = (long int) D.6275;
  if (D.6276 > result) goto <D.6277>; else goto <D.6278>;
  <D.6277>:
  D.6257 = GC_arrays._words_allocd;
  D.6279 = D.6257 >> 3;
  return D.6279;
  <D.6278>:
  D.6279 = (word) result;
  return D.6279;
}


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

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


GC_should_collect ()
{
  GC_bool D.6281;
  int iftmp.11;
  long unsigned int D.6286;
  long unsigned int D.6287;
  long unsigned int D.6289;
  long unsigned int GC_collect_at_heapsize.12;

  D.6286 = GC_adj_words_allocd ();
  D.6287 = min_words_allocd ();
  if (D.6286 >= D.6287) goto <D.6283>; else goto <D.6288>;
  <D.6288>:
  D.6289 = GC_arrays._heapsize;
  GC_collect_at_heapsize.12 = GC_collect_at_heapsize;
  if (D.6289 >= GC_collect_at_heapsize.12) goto <D.6283>; else goto <D.6284>;
  <D.6283>:
  iftmp.11 = 1;
  goto <D.6285>;
  <D.6284>:
  iftmp.11 = 0;
  <D.6285>:
  D.6281 = iftmp.11;
  return D.6281;
}


min_words_allocd ()
{
  long int D.6294;
  long unsigned int D.6295;
  long unsigned int GC_root_size.13;
  long unsigned int D.6297;
  long unsigned int D.6298;
  long unsigned int D.6299;
  long unsigned int D.6300;
  long unsigned int D.6301;
  long unsigned int D.6302;
  int GC_incremental.14;
  long unsigned int GC_time_limit.15;
  word D.6308;
  long unsigned int GC_free_space_divisor.16;
  long unsigned int D.6310;
  register signed_word stack_size;
  word total_root_size;
  word scan_size;

  stack_size = 10000;
  if (stack_size < 0) goto <D.6292>; else goto <D.6293>;
  <D.6292>:
  stack_size = -stack_size;
  <D.6293>:
  D.6294 = stack_size * 2;
  D.6295 = (long unsigned int) D.6294;
  GC_root_size.13 = GC_root_size;
  total_root_size = D.6295 + GC_root_size.13;
  D.6297 = GC_arrays._heapsize;
  D.6298 = GC_arrays._large_free_bytes;
  D.6299 = D.6297 - D.6298;
  D.6298 = GC_arrays._large_free_bytes;
  D.6300 = D.6298 >> 2;
  D.6301 = D.6299 + D.6300;
  D.6302 = D.6301 + total_root_size;
  scan_size = D.6302 >> 3;
  GC_incremental.14 = GC_incremental;
  if (GC_incremental.14 != 0) goto <D.6305>; else goto <D.6303>;
  <D.6305>:
  GC_time_limit.15 = GC_time_limit;
  if (GC_time_limit.15 != 999999) goto <D.6307>; else goto <D.6303>;
  <D.6307>:
  GC_free_space_divisor.16 = GC_free_space_divisor;
  D.6310 = GC_free_space_divisor.16 * 2;
  D.6308 = scan_size / D.6310;
  return D.6308;
  <D.6303>:
  GC_free_space_divisor.16 = GC_free_space_divisor;
  D.6308 = scan_size / GC_free_space_divisor.16;
  return D.6308;
}


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

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


GC_maybe_gc ()
{
  int D.6315;
  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.6333;
  long unsigned int D.6334;
  long unsigned int D.6335;
  long int D.6336;
  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.6346;
  int GC_is_full_gc.29;
  int GC_n_attempts.30;
  int GC_n_attempts.31;
  static int n_partial_gcs = 0;

  D.6315 = GC_should_collect ();
  if (D.6315 != 0) goto <D.6316>; else goto <D.6317>;
  <D.6316>:
  GC_incremental.18 = GC_incremental;
  if (GC_incremental.18 == 0) goto <D.6319>; else goto <D.6320>;
  <D.6319>:
  GC_try_to_collect_inner (GC_never_stop_func);
  n_partial_gcs = 0;
  return;
  <D.6320>:
  GC_need_full_gc.19 = GC_need_full_gc;
  if (GC_need_full_gc.19 != 0) goto <D.6321>; else goto <D.6325>;
  <D.6325>:
  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.6321>; else goto <D.6322>;
  <D.6321>:
  GC_print_stats.22 = GC_print_stats;
  if (GC_print_stats.22 != 0) goto <D.6329>; else goto <D.6330>;
  <D.6329>:
  GC_gc_no.23 = GC_gc_no;
  GC_gc_no.24 = (long int) GC_gc_no.23;
  D.6333 = GC_gc_no.24 + 1;
  D.6334 = GC_arrays._words_allocd;
  D.6335 = D.6334 << 3;
  D.6336 = (long int) D.6335;
  GC_printf ("***>Full mark for collection %lu after %ld allocd bytes\n", D.6333, D.6336, 0, 0, 0, 0);
  <D.6330>:
  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.6323>;
  <D.6322>:
  n_partial_gcs.20 = n_partial_gcs;
  n_partial_gcs.25 = n_partial_gcs.20 + 1;
  n_partial_gcs = n_partial_gcs.25;
  <D.6323>:
  GC_time_limit.26 = GC_time_limit;
  if (GC_time_limit.26 != 999999) goto <D.6339>; else goto <D.6340>;
  <D.6339>:
  GC_start_time.27 = clock ();
  GC_start_time = GC_start_time.27;
  <D.6340>:
  GC_time_limit.26 = GC_time_limit;
  if (GC_time_limit.26 == 999999) goto <D.6343>; else goto <D.6344>;
  <D.6343>:
  iftmp.28 = GC_never_stop_func;
  goto <D.6345>;
  <D.6344>:
  iftmp.28 = GC_timeout_stop_func;
  <D.6345>:
  D.6346 = GC_stopped_mark (iftmp.28);
  if (D.6346 != 0) goto <D.6347>; else goto <D.6348>;
  <D.6347>:
  GC_finish_collection ();
  goto <D.6349>;
  <D.6348>:
  GC_is_full_gc.29 = GC_is_full_gc;
  if (GC_is_full_gc.29 == 0) goto <D.6351>; else goto <D.6352>;
  <D.6351>:
  GC_n_attempts.30 = GC_n_attempts;
  GC_n_attempts.31 = GC_n_attempts.30 + 1;
  GC_n_attempts = GC_n_attempts.31;
  <D.6352>:
  <D.6349>:
  <D.6317>:
}


GC_try_to_collect_inner (int (*GC_stop_func) (void) stop_func)
{
  int GC_dont_gc.32;
  GC_bool D.6359;
  void (*<T39e>) (GCEventType) GC_notify_event.33;
  int GC_incremental.34;
  int D.6366;
  int GC_print_stats.35;
  int D.6372;
  int D.6375;
  long unsigned int GC_gc_no.36;
  long int GC_gc_no.37;
  long int D.6384;
  long unsigned int D.6385;
  long unsigned int D.6386;
  long int D.6387;
  int GC_find_leak.38;
  int D.6392;
  int D.6395;
  long int D.6402;
  double D.6403;
  double D.6404;
  double D.6405;
  long unsigned int D.6406;
  long int D.6407;
  clock_t start_time;
  clock_t current_time;

  GC_dont_gc.32 = GC_dont_gc;
  if (GC_dont_gc.32 != 0) goto <D.6357>; else goto <D.6358>;
  <D.6357>:
  D.6359 = 0;
  return D.6359;
  <D.6358>:
  GC_notify_event.33 = GC_notify_event;
  if (GC_notify_event.33 != 0B) goto <D.6361>; else goto <D.6362>;
  <D.6361>:
  GC_notify_event.33 = GC_notify_event;
  GC_notify_event.33 (0);
  <D.6362>:
  GC_incremental.34 = GC_incremental;
  if (GC_incremental.34 != 0) goto <D.6364>; else goto <D.6365>;
  <D.6364>:
  D.6366 = GC_collection_in_progress ();
  if (D.6366 != 0) goto <D.6367>; else goto <D.6368>;
  <D.6367>:
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.6370>; else goto <D.6371>;
  <D.6370>:
  GC_printf ("GC_try_to_collect_inner: finishing collection in progress\n", 0, 0, 0, 0, 0, 0);
  <D.6371>:
  goto <D.6088>;
  <D.6087>:
  D.6372 = stop_func ();
  if (D.6372 != 0) goto <D.6373>; else goto <D.6374>;
  <D.6373>:
  D.6359 = 0;
  return D.6359;
  <D.6374>:
  GC_collect_a_little_inner (1);
  <D.6088>:
  D.6375 = GC_collection_in_progress ();
  if (D.6375 != 0) goto <D.6087>; else goto <D.6089>;
  <D.6089>:
  <D.6368>:
  <D.6365>:
  if (stop_func == GC_never_stop_func) goto <D.6376>; else goto <D.6377>;
  <D.6376>:
  GC_notify_full_gc ();
  <D.6377>:
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.6378>; else goto <D.6379>;
  <D.6378>:
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.6380>; else goto <D.6381>;
  <D.6380>:
  start_time = clock ();
  <D.6381>:
  GC_gc_no.36 = GC_gc_no;
  GC_gc_no.37 = (long int) GC_gc_no.36;
  D.6384 = GC_gc_no.37 + 1;
  D.6385 = GC_arrays._words_allocd;
  D.6386 = D.6385 << 3;
  D.6387 = (long int) D.6386;
  GC_printf ("Initiating full world-stop collection %lu after %ld allocd bytes\n", D.6384, D.6387, 0, 0, 0, 0);
  <D.6379>:
  GC_promote_black_lists ();
  GC_find_leak.38 = GC_find_leak;
  if (GC_find_leak.38 != 0) goto <D.6388>; else goto <D.6391>;
  <D.6391>:
  if (stop_func != GC_never_stop_func) goto <D.6388>; else goto <D.6389>;
  <D.6388>:
  D.6392 = GC_reclaim_all (stop_func, 0);
  if (D.6392 == 0) goto <D.6393>; else goto <D.6394>;
  <D.6393>:
  D.6359 = 0;
  return D.6359;
  <D.6394>:
  <D.6389>:
  GC_invalidate_mark_state ();
  GC_clear_marks ();
  GC_is_full_gc = 1;
  D.6395 = GC_stopped_mark (stop_func);
  if (D.6395 == 0) goto <D.6396>; else goto <D.6397>;
  <D.6396>:
  GC_incremental.34 = GC_incremental;
  if (GC_incremental.34 == 0) goto <D.6398>; else goto <D.6399>;
  <D.6398>:
  GC_invalidate_mark_state ();
  GC_unpromote_black_lists ();
  <D.6399>:
  D.6359 = 0;
  return D.6359;
  <D.6397>:
  GC_finish_collection ();
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.6400>; else goto <D.6401>;
  <D.6400>:
  current_time = clock ();
  D.6402 = current_time - start_time;
  D.6403 = (double) D.6402;
  D.6404 = D.6403 * 1.0e+3;
  D.6405 = D.6404 / 1.0e+6;
  D.6406 = (long unsigned int) D.6405;
  D.6407 = (long int) D.6406;
  GC_printf ("Complete collection took %lu msecs\n", D.6407, 0, 0, 0, 0, 0);
  <D.6401>:
  GC_notify_event.33 = GC_notify_event;
  if (GC_notify_event.33 != 0B) goto <D.6408>; else goto <D.6409>;
  <D.6408>:
  GC_notify_event.33 = GC_notify_event;
  GC_notify_event.33 (5);
  <D.6409>:
  D.6359 = 1;
  return D.6359;
}


GC_collect_a_little_inner (int n)
{
  int GC_dont_gc.39;
  int GC_incremental.40;
  int D.6418;
  int D.6420;
  int GC_n_attempts.41;
  long unsigned int GC_time_limit.42;
  long int GC_start_time.43;
  int D.6430;
  int GC_n_attempts.44;
  int D.6434;
  int GC_deficit.45;
  int D.6438;
  int GC_deficit.46;
  register int i;

  GC_dont_gc.39 = GC_dont_gc;
  if (GC_dont_gc.39 != 0) goto <D.6412>; else goto <D.6413>;
  <D.6412>:
  return;
  <D.6413>:
  GC_incremental.40 = GC_incremental;
  if (GC_incremental.40 != 0) goto <D.6417>; else goto <D.6414>;
  <D.6417>:
  D.6418 = GC_collection_in_progress ();
  if (D.6418 != 0) goto <D.6419>; else goto <D.6414>;
  <D.6419>:
  i = GC_deficit;
  goto <D.6097>;
  <D.6096>:
  D.6420 = GC_mark_some (0B);
  if (D.6420 != 0) goto <D.6421>; else goto <D.6422>;
  <D.6421>:
  GC_n_attempts.41 = GC_n_attempts;
  if (GC_n_attempts.41 <= 0) goto <D.6426>; else goto <D.6423>;
  <D.6426>:
  GC_time_limit.42 = GC_time_limit;
  if (GC_time_limit.42 != 999999) goto <D.6428>; else goto <D.6423>;
  <D.6428>:
  GC_start_time.43 = clock ();
  GC_start_time = GC_start_time.43;
  D.6430 = GC_stopped_mark (GC_timeout_stop_func);
  if (D.6430 == 0) goto <D.6431>; else goto <D.6432>;
  <D.6431>:
  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.6095>;
  <D.6432>:
  goto <D.6424>;
  <D.6423>:
  GC_stopped_mark (GC_never_stop_func);
  <D.6424>:
  GC_finish_collection ();
  goto <D.6095>;
  <D.6422>:
  i = i + 1;
  <D.6097>:
  D.6434 = n * 10;
  if (D.6434 > i) goto <D.6096>; else goto <D.6095>;
  <D.6095>:
  GC_deficit.45 = GC_deficit;
  if (GC_deficit.45 > 0) goto <D.6436>; else goto <D.6437>;
  <D.6436>:
  D.6438 = n * -10;
  GC_deficit.45 = GC_deficit;
  GC_deficit.46 = D.6438 + GC_deficit.45;
  GC_deficit = GC_deficit.46;
  <D.6437>:
  GC_deficit.45 = GC_deficit;
  if (GC_deficit.45 < 0) goto <D.6440>; else goto <D.6441>;
  <D.6440>:
  GC_deficit = 0;
  <D.6441>:
  goto <D.6415>;
  <D.6414>:
  GC_maybe_gc ();
  <D.6415>:
}


GC_collect_a_little ()
{
  int D.6443;
  int GC_debugging_started.47;
  void (*<T3a5>) (void) GC_print_all_smashed.48;
  int D.6452;
  int result;

  D.6443 = GC_test_and_set (&GC_allocate_lock);
  if (D.6443 != 0) goto <D.6444>; else goto <D.6445>;
  <D.6444>:
  GC_lock ();
  <D.6445>:
  GC_collect_a_little_inner (1);
  result = GC_collection_in_progress ();
  GC_clear (&GC_allocate_lock);
  if (result == 0) goto <D.6446>; else goto <D.6447>;
  <D.6446>:
  GC_debugging_started.47 = GC_debugging_started;
  if (GC_debugging_started.47 != 0) goto <D.6449>; else goto <D.6450>;
  <D.6449>:
  GC_print_all_smashed.48 = GC_print_all_smashed;
  GC_print_all_smashed.48 ();
  <D.6450>:
  <D.6447>:
  D.6452 = result;
  return D.6452;
}


GC_test_and_set (volatile unsigned int * addr)
{
  int D.6454;
  int oldval;
  int temp;

  temp = 1;
  __asm__ __volatile__("1:	lwarx %0,0,%1
	cmpwi %0, 0
	bne 2f
	stwcx. %2,0,%1
	bne- 1b
	sync
2:	
" : "=&r" oldval : "r" addr, "r" temp : "memory", "cr0");
  D.6454 = oldval;
  return D.6454;
}


GC_clear (volatile unsigned int * addr)
{
  __asm__ __volatile__("lwsync" :  :  : "memory");
  *addr = 0;
}


GC_stopped_mark (int (*GC_stop_func) (void) stop_func)
{
  int GC_print_stats.49;
  void (*<T39e>) (GCEventType) GC_notify_event.50;
  long unsigned int GC_gc_no.51;
  long int GC_gc_no.52;
  long int D.6466;
  long unsigned int D.6467;
  long unsigned int D.6468;
  long int D.6469;
  long unsigned int D.6470;
  long unsigned int D.6471;
  long int D.6472;
  int D.6473;
  long int D.6478;
  GC_bool D.6479;
  int D.6480;
  long unsigned int GC_gc_no.53;
  long int D.6485;
  long unsigned int D.6488;
  long int D.6489;
  int GC_debugging_started.54;
  void (*<T3a5>) (void) GC_check_heap.55;
  long int D.6498;
  double D.6499;
  double D.6500;
  double D.6501;
  long unsigned int D.6502;
  long int D.6503;
  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.6457>; else goto <D.6458>;
      <D.6457>:
      start_time = clock ();
      <D.6458>:
      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.6460>; else goto <D.6461>;
      <D.6460>:
      GC_notify_event.50 = GC_notify_event;
      GC_notify_event.50 (1);
      <D.6461>:
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.6462>; else goto <D.6463>;
      <D.6462>:
      GC_gc_no.51 = GC_gc_no;
      GC_gc_no.52 = (long int) GC_gc_no.51;
      D.6466 = GC_gc_no.52 + 1;
      GC_printf ("--> Marking for collection %lu ", D.6466, 0, 0, 0, 0, 0);
      D.6467 = GC_arrays._words_allocd;
      D.6468 = D.6467 << 3;
      D.6469 = (long int) D.6468;
      D.6470 = GC_arrays._words_wasted;
      D.6471 = D.6470 << 3;
      D.6472 = (long int) D.6471;
      GC_printf ("after %lu allocd bytes + %lu wasted bytes\n", D.6469, D.6472, 0, 0, 0, 0);
      <D.6463>:
      GC_clear_a_few_frames ();
      GC_noop (0B, 0, 0, 0, 0, 0);
      GC_initiate_gc ();
      i = 0;
      <D.6110>:
      D.6473 = stop_func ();
      if (D.6473 != 0) goto <D.6474>; else goto <D.6475>;
      <D.6474>:
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.6476>; else goto <D.6477>;
      <D.6476>:
      GC_printf ("Abandoned stopped marking after ", 0, 0, 0, 0, 0, 0);
      D.6478 = (long int) i;
      GC_printf ("%lu iterations\n", D.6478, 0, 0, 0, 0, 0);
      <D.6477>:
      GC_deficit = i;
      GC_world_stopped = 0;
      GC_start_world ();
      D.6479 = 0;
      return D.6479;
      <D.6475>:
      D.6480 = GC_mark_some (&dummy);
      if (D.6480 != 0) goto <D.6109>; else goto <D.6481>;
      <D.6481>:
      i = i + 1;
      goto <D.6110>;
      <D.6109>:
      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.6483>; else goto <D.6484>;
      <D.6483>:
      GC_gc_no.51 = GC_gc_no;
      GC_gc_no.52 = (long int) GC_gc_no.51;
      D.6485 = GC_gc_no.52 + -1;
      GC_printf ("Collection %lu finished", D.6485, 0, 0, 0, 0, 0);
      <D.6484>:
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.6486>; else goto <D.6487>;
      <D.6486>:
      D.6488 = GC_arrays._heapsize;
      D.6489 = (long int) D.6488;
      GC_printf (" ---> heapsize = %lu bytes\n", D.6489, 0, 0, 0, 0, 0);
      GC_printf ("", 0, 0, 0, 0, 0, 0);
      <D.6487>:
      GC_debugging_started.54 = GC_debugging_started;
      if (GC_debugging_started.54 != 0) goto <D.6491>; else goto <D.6492>;
      <D.6491>:
      GC_check_heap.55 = GC_check_heap;
      GC_check_heap.55 ();
      <D.6492>:
      GC_notify_event.50 = GC_notify_event;
      if (GC_notify_event.50 != 0B) goto <D.6494>; else goto <D.6495>;
      <D.6494>:
      GC_notify_event.50 = GC_notify_event;
      GC_notify_event.50 (2);
      <D.6495>:
      GC_world_stopped = 0;
      GC_start_world ();
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.6496>; else goto <D.6497>;
      <D.6496>:
      current_time = clock ();
      D.6498 = current_time - start_time;
      D.6499 = (double) D.6498;
      D.6500 = D.6499 * 1.0e+3;
      D.6501 = D.6500 / 1.0e+6;
      D.6502 = (long unsigned int) D.6501;
      D.6503 = (long int) D.6502;
      GC_printf ("World-stopped marking took %lu msecs\n", D.6503, 0, 0, 0, 0, 0);
      <D.6497>:
      D.6479 = 1;
      return D.6479;
    }
  finally
    {
      dummy = {CLOBBER};
    }
}


GC_set_fl_marks (char * q)
{
  long unsigned int p.56;
  long unsigned int D.6507;
  long int p.57;
  long int h.58;
  long int D.6512;
  long int D.6513;
  int D.6514;
  sizetype D.6515;
  long unsigned int D.6516;
  int D.6517;
  long unsigned int D.6518;
  long unsigned int D.6519;
  char * p;
  struct hblk * h;
  struct hblk * last_h;
  struct hdr * hhdr;
  int word_no;

  last_h = 0B;
  p = q;
  goto <D.6121>;
  <D.6120>:
  p.56 = (long unsigned int) p;
  D.6507 = p.56 & 18446744073709547520;
  h = (struct hblk *) D.6507;
  if (h != last_h) goto <D.6508>; else goto <D.6509>;
  <D.6508>:
  last_h = h;
  hhdr = GC_find_header (h);
  <D.6509>:
  p.57 = (long int) p;
  h.58 = (long int) h;
  D.6512 = p.57 - h.58;
  D.6513 = D.6512 /[ex] 8;
  word_no = (int) D.6513;
  D.6514 = word_no >> 6;
  D.6515 = (sizetype) D.6514;
  D.6514 = word_no >> 6;
  D.6515 = (sizetype) D.6514;
  D.6516 = hhdr->hb_marks[D.6515];
  D.6517 = word_no & 63;
  D.6518 = 1 << D.6517;
  D.6519 = D.6516 | D.6518;
  hhdr->hb_marks[D.6515] = D.6519;
  p = MEM[(char * *)p];
  <D.6121>:
  if (p != 0B) goto <D.6120>; else goto <D.6122>;
  <D.6122>:
}


GC_clear_fl_marks (char * q)
{
  long unsigned int p.59;
  long unsigned int D.6521;
  long int p.60;
  long int h.61;
  long int D.6526;
  long int D.6527;
  int D.6528;
  long unsigned int D.6529;
  int D.6530;
  long unsigned int D.6531;
  long unsigned int D.6532;
  long unsigned int D.6533;
  char * p;
  struct hblk * h;
  struct hblk * last_h;
  struct hdr * hhdr;
  int word_no;

  last_h = 0B;
  p = q;
  goto <D.6132>;
  <D.6131>:
  p.59 = (long unsigned int) p;
  D.6521 = p.59 & 18446744073709547520;
  h = (struct hblk *) D.6521;
  if (h != last_h) goto <D.6522>; else goto <D.6523>;
  <D.6522>:
  last_h = h;
  hhdr = GC_find_header (h);
  <D.6523>:
  p.60 = (long int) p;
  h.61 = (long int) h;
  D.6526 = p.60 - h.61;
  D.6527 = D.6526 /[ex] 8;
  word_no = (int) D.6527;
  D.6528 = word_no >> 6;
  D.6528 = word_no >> 6;
  D.6529 = hhdr->hb_marks[D.6528];
  D.6530 = word_no & 63;
  D.6531 = 1 << D.6530;
  D.6532 = ~D.6531;
  D.6533 = D.6529 & D.6532;
  hhdr->hb_marks[D.6528] = D.6533;
  p = MEM[(char * *)p];
  <D.6132>:
  if (p != 0B) goto <D.6131>; else goto <D.6133>;
  <D.6133>:
}


GC_finish_collection ()
{
  void (*<T39e>) (GCEventType) GC_notify_event.62;
  char * D.6537;
  int GC_dump_regularly.63;
  int GC_find_leak.64;
  char * * D.6546;
  long unsigned int D.6547;
  char * * D.6548;
  int GC_n_kinds.65;
  int GC_print_back_height.66;
  char * * D.6555;
  long unsigned int D.6556;
  char * * D.6557;
  int GC_is_full_gc.67;
  long unsigned int D.6563;
  long unsigned int D.6564;
  long unsigned int GC_used_heap_size_after_full.68;
  long unsigned int GC_used_heap_size_after_full.69;
  long unsigned int D.6568;
  long unsigned int D.6569;
  long unsigned int D.6570;
  _Bool D.6571;
  int GC_need_full_gc.70;
  long unsigned int D.6573;
  long unsigned int D.6574;
  long unsigned int D.6575;
  long unsigned int GC_non_gc_bytes.71;

  GC_notify_event.62 = GC_notify_event;
  if (GC_notify_event.62 != 0B) goto <D.6535>; else goto <D.6536>;
  <D.6535>:
  GC_notify_event.62 = GC_notify_event;
  GC_notify_event.62 (3);
  <D.6536>:
  D.6537 = getenv ("GC_PRINT_ADDRESS_MAP");
  if (D.6537 != 0B) goto <D.6538>; else goto <D.6539>;
  <D.6538>:
  GC_print_address_map ();
  <D.6539>:
  GC_dump_regularly.63 = GC_dump_regularly;
  if (GC_dump_regularly.63 != 0) goto <D.6541>; else goto <D.6542>;
  <D.6541>:
  GC_dump ();
  <D.6542>:
  GC_find_leak.64 = GC_find_leak;
  if (GC_find_leak.64 != 0) goto <D.6544>; else goto <D.6545>;
  <D.6544>:
  {
    register word size;
    int kind;
    char * q;

    kind = 0;
    goto <D.6147>;
    <D.6146>:
    size = 1;
    goto <D.6144>;
    <D.6143>:
    D.6546 = GC_obj_kinds[kind].ok_freelist;
    D.6547 = size * 8;
    D.6548 = D.6546 + D.6547;
    q = *D.6548;
    if (q != 0B) goto <D.6549>; else goto <D.6550>;
    <D.6549>:
    GC_set_fl_marks (q);
    <D.6550>:
    size = size + 1;
    <D.6144>:
    if (size <= 256) goto <D.6143>; else goto <D.6145>;
    <D.6145>:
    kind = kind + 1;
    <D.6147>:
    GC_n_kinds.65 = GC_n_kinds;
    if (kind < GC_n_kinds.65) goto <D.6146>; else goto <D.6148>;
    <D.6148>:
  }
  GC_start_reclaim (1);
  <D.6545>:
  GC_finalize ();
  GC_print_back_height.66 = GC_print_back_height;
  if (GC_print_back_height.66 != 0) goto <D.6553>; else goto <D.6554>;
  <D.6553>:
  GC_err_puts ("Back height not available: Rebuild collector with -DMAKE_BACK_GRAPH\n");
  <D.6554>:
  {
    register word size;
    register char * q;
    int kind;

    kind = 0;
    goto <D.6156>;
    <D.6155>:
    size = 1;
    goto <D.6153>;
    <D.6152>:
    D.6555 = GC_obj_kinds[kind].ok_freelist;
    D.6556 = size * 8;
    D.6557 = D.6555 + D.6556;
    q = *D.6557;
    if (q != 0B) goto <D.6558>; else goto <D.6559>;
    <D.6558>:
    GC_clear_fl_marks (q);
    <D.6559>:
    size = size + 1;
    <D.6153>:
    if (size <= 256) goto <D.6152>; else goto <D.6154>;
    <D.6154>:
    kind = kind + 1;
    <D.6156>:
    GC_n_kinds.65 = GC_n_kinds;
    if (kind < GC_n_kinds.65) goto <D.6155>; else goto <D.6157>;
    <D.6157>:
  }
  GC_start_reclaim (0);
  GC_is_full_gc.67 = GC_is_full_gc;
  if (GC_is_full_gc.67 != 0) goto <D.6561>; else goto <D.6562>;
  <D.6561>:
  D.6563 = GC_arrays._heapsize;
  D.6564 = GC_arrays._large_free_bytes;
  GC_used_heap_size_after_full.68 = D.6563 - D.6564;
  GC_used_heap_size_after_full = GC_used_heap_size_after_full.68;
  GC_need_full_gc = 0;
  goto <D.6566>;
  <D.6562>:
  D.6563 = GC_arrays._heapsize;
  D.6564 = GC_arrays._large_free_bytes;
  GC_used_heap_size_after_full.68 = D.6563 - D.6564;
  GC_used_heap_size_after_full.69 = GC_used_heap_size_after_full;
  D.6568 = GC_used_heap_size_after_full.68 - GC_used_heap_size_after_full.69;
  D.6569 = D.6568 >> 3;
  D.6570 = min_words_allocd ();
  D.6571 = D.6569 > D.6570;
  GC_need_full_gc.70 = (int) D.6571;
  GC_need_full_gc = GC_need_full_gc.70;
  <D.6566>:
  GC_n_attempts = 0;
  GC_is_full_gc = 0;
  D.6573 = GC_arrays._words_allocd_before_gc;
  D.6574 = GC_arrays._words_allocd;
  D.6575 = D.6573 + D.6574;
  GC_arrays._words_allocd_before_gc = D.6575;
  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_notify_event.62 = GC_notify_event;
  if (GC_notify_event.62 != 0B) goto <D.6577>; else goto <D.6578>;
  <D.6577>:
  GC_notify_event.62 = GC_notify_event;
  GC_notify_event.62 (4);
  <D.6578>:
}


GC_try_to_collect (int (*GC_stop_func) (void) stop_func)
{
  int GC_debugging_started.72;
  void (*<T3a5>) (void) GC_print_all_smashed.73;
  int D.6583;
  int GC_is_initialized.74;
  int D.6593;
  int result;

  GC_debugging_started.72 = GC_debugging_started;
  if (GC_debugging_started.72 != 0) goto <D.6580>; else goto <D.6581>;
  <D.6580>:
  GC_print_all_smashed.73 = GC_print_all_smashed;
  GC_print_all_smashed.73 ();
  <D.6581>:
  GC_notify_or_invoke_finalizers ();
  D.6583 = GC_test_and_set (&GC_allocate_lock);
  if (D.6583 != 0) goto <D.6584>; else goto <D.6585>;
  <D.6584>:
  GC_lock ();
  <D.6585>:
  GC_collecting = 1;
  GC_is_initialized.74 = GC_is_initialized;
  if (GC_is_initialized.74 == 0) goto <D.6587>; else goto <D.6588>;
  <D.6587>:
  GC_init_inner ();
  <D.6588>:
  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.6589>; else goto <D.6590>;
  <D.6589>:
  GC_debugging_started.72 = GC_debugging_started;
  if (GC_debugging_started.72 != 0) goto <D.6591>; else goto <D.6592>;
  <D.6591>:
  GC_print_all_smashed.73 = GC_print_all_smashed;
  GC_print_all_smashed.73 ();
  <D.6592>:
  GC_notify_or_invoke_finalizers ();
  <D.6590>:
  D.6593 = result;
  return D.6593;
}


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.6596>; else goto <D.6597>;
  <D.6596>:
  GC_print_all_errors ();
  <D.6597>:
}


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.6604;
  long unsigned int D.6605;
  void * GC_least_plausible_heap_addr.78;
  void * GC_least_plausible_heap_addr.79;
  char * D.6611;
  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.6599>; else goto <D.6600>;
  <D.6599>:
  GC_abort ("Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS");
  <D.6600>:
  phdr = GC_install_header (p);
  if (phdr == 0B) goto <D.6601>; else goto <D.6602>;
  <D.6601>:
  return;
  <D.6602>:
  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.6604 = GC_arrays._heapsize;
  D.6605 = D.6604 + bytes;
  GC_arrays._heapsize = D.6605;
  GC_least_plausible_heap_addr.78 = GC_least_plausible_heap_addr;
  if (p <= GC_least_plausible_heap_addr.78) goto <D.6606>; else goto <D.6609>;
  <D.6609>:
  GC_least_plausible_heap_addr.78 = GC_least_plausible_heap_addr;
  if (GC_least_plausible_heap_addr.78 == 0B) goto <D.6606>; else goto <D.6607>;
  <D.6606>:
  GC_least_plausible_heap_addr.79 = p + 18446744073709551608;
  GC_least_plausible_heap_addr = GC_least_plausible_heap_addr.79;
  <D.6607>:
  D.6611 = p + bytes;
  GC_greatest_plausible_heap_addr.80 = GC_greatest_plausible_heap_addr;
  if (D.6611 >= GC_greatest_plausible_heap_addr.80) goto <D.6613>; else goto <D.6614>;
  <D.6613>:
  GC_greatest_plausible_heap_addr.81 = p + bytes;
  GC_greatest_plausible_heap_addr = GC_greatest_plausible_heap_addr.81;
  <D.6614>:
}


GC_print_heap_sects ()
{
  long unsigned int D.6617;
  long int D.6618;
  char * D.6619;
  long int D.6620;
  long int start.82;
  long unsigned int D.6622;
  long int D.6623;
  struct hblk * D.6624;
  struct hblk * D.6627;
  long int D.6628;
  long unsigned int D.6629;
  long int D.6630;
  long unsigned int D.6631;
  long unsigned int GC_n_heap_sects.83;
  register unsigned int i;

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

    D.6619 = GC_arrays._heap_sects[i].hs_start;
    start = (long unsigned int) D.6619;
    len = GC_arrays._heap_sects[i].hs_bytes;
    nbl = 0;
    D.6620 = (long int) i;
    start.82 = (long int) start;
    D.6622 = start + len;
    D.6623 = (long int) D.6622;
    GC_printf ("Section %ld from 0x%lx to 0x%lx ", D.6620, start.82, D.6623, 0, 0, 0);
    h = (struct hblk *) start;
    goto <D.6179>;
    <D.6178>:
    D.6624 = GC_is_black_listed (h, 4096);
    if (D.6624 != 0B) goto <D.6625>; else goto <D.6626>;
    <D.6625>:
    nbl = nbl + 1;
    <D.6626>:
    h = h + 4096;
    <D.6179>:
    D.6622 = start + len;
    D.6627 = (struct hblk *) D.6622;
    if (D.6627 > h) goto <D.6178>; else goto <D.6180>;
    <D.6180>:
    D.6628 = (long int) nbl;
    D.6629 = len / 4096;
    D.6630 = (long int) D.6629;
    GC_printf ("%lu/%lu blacklisted\n", D.6628, D.6630, 0, 0, 0, 0);
  }
  i = i + 1;
  <D.6182>:
  D.6631 = (long unsigned int) i;
  GC_n_heap_sects.83 = GC_n_heap_sects;
  if (D.6631 < GC_n_heap_sects.83) goto <D.6181>; else goto <D.6183>;
  <D.6183>:
}


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

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


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

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


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.6640;
  long unsigned int D.6641;
  long unsigned int D.6644;
  long unsigned int D.6645;
  GC_bool D.6648;
  int GC_print_stats.85;
  long int bytes.86;
  long unsigned int D.6657;
  long unsigned int D.6658;
  long int D.6659;
  long unsigned int D.6660;
  long unsigned int D.6661;
  char * D.6666;
  signed long space.87;
  void * GC_greatest_plausible_heap_addr.88;
  sizetype D.6671;
  char * D.6672;
  char * GC_greatest_plausible_heap_addr.89;
  void * GC_least_plausible_heap_addr.90;
  sizetype D.6675;
  char * D.6676;
  char * GC_least_plausible_heap_addr.91;
  long unsigned int D.6678;
  long unsigned int GC_collect_at_heapsize.92;
  void (*<T3a2>) (size_t) GC_on_heap_resize.93;
  word bytes;
  struct hblk * space;
  word expansion_slop;

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

    GC_page_size.84 = GC_page_size;
    mask = GC_page_size.84 + 18446744073709551615;
    bytes = bytes + mask;
    D.6640 = ~mask;
    bytes = D.6640 & bytes;
  }
  D.6641 = GC_arrays._max_heapsize;
  if (D.6641 != 0) goto <D.6642>; else goto <D.6643>;
  <D.6642>:
  D.6644 = GC_arrays._heapsize;
  D.6645 = D.6644 + bytes;
  D.6641 = GC_arrays._max_heapsize;
  if (D.6645 > D.6641) goto <D.6646>; else goto <D.6647>;
  <D.6646>:
  D.6648 = 0;
  return D.6648;
  <D.6647>:
  <D.6643>:
  space = GC_unix_get_mem (bytes);
  if (space == 0B) goto <D.6649>; else goto <D.6650>;
  <D.6649>:
  GC_print_stats.85 = GC_print_stats;
  if (GC_print_stats.85 != 0) goto <D.6652>; else goto <D.6653>;
  <D.6652>:
  bytes.86 = (long int) bytes;
  GC_printf ("Failed to expand heap by %ld bytes\n", bytes.86, 0, 0, 0, 0, 0);
  <D.6653>:
  D.6648 = 0;
  return D.6648;
  <D.6650>:
  GC_print_stats.85 = GC_print_stats;
  if (GC_print_stats.85 != 0) goto <D.6655>; else goto <D.6656>;
  <D.6655>:
  bytes.86 = (long int) bytes;
  D.6657 = GC_arrays._words_allocd;
  D.6658 = D.6657 << 3;
  D.6659 = (long int) D.6658;
  GC_printf ("Increasing heap size by %lu after %lu allocated bytes\n", bytes.86, D.6659, 0, 0, 0, 0);
  <D.6656>:
  D.6660 = min_words_allocd ();
  D.6661 = D.6660 << 3;
  expansion_slop = D.6661 + 33554432;
  D.6666 = GC_arrays._last_heap_addr;
  if (D.6666 == 0B) goto <D.6667>; else goto <D.6662>;
  <D.6667>:
  space.87 = (signed long) space;
  if (space.87 >= 0) goto <D.6663>; else goto <D.6662>;
  <D.6662>:
  D.6666 = GC_arrays._last_heap_addr;
  if (D.6666 != 0B) goto <D.6669>; else goto <D.6664>;
  <D.6669>:
  D.6666 = GC_arrays._last_heap_addr;
  if (D.6666 < space) goto <D.6663>; else goto <D.6664>;
  <D.6663>:
  GC_greatest_plausible_heap_addr.88 = GC_greatest_plausible_heap_addr;
  D.6671 = bytes + expansion_slop;
  D.6672 = space + D.6671;
  GC_greatest_plausible_heap_addr.89 = GC_max (GC_greatest_plausible_heap_addr.88, D.6672);
  GC_greatest_plausible_heap_addr = GC_greatest_plausible_heap_addr.89;
  goto <D.6665>;
  <D.6664>:
  GC_least_plausible_heap_addr.90 = GC_least_plausible_heap_addr;
  D.6675 = -expansion_slop;
  D.6676 = space + D.6675;
  GC_least_plausible_heap_addr.91 = GC_min (GC_least_plausible_heap_addr.90, D.6676);
  GC_least_plausible_heap_addr = GC_least_plausible_heap_addr.91;
  <D.6665>:
  D.6666 = GC_arrays._last_heap_addr;
  GC_arrays._prev_heap_addr = D.6666;
  GC_arrays._last_heap_addr = space;
  GC_add_to_heap (space, bytes);
  D.6644 = GC_arrays._heapsize;
  D.6678 = D.6644 + expansion_slop;
  GC_collect_at_heapsize.92 = D.6678 + 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.6681>; else goto <D.6682>;
  <D.6681>:
  GC_on_heap_resize.93 = GC_on_heap_resize;
  D.6644 = GC_arrays._heapsize;
  GC_on_heap_resize.93 (D.6644);
  <D.6682>:
  D.6648 = 1;
  return D.6648;
}


GC_expand_hp (size_t bytes)
{
  int D.6684;
  int GC_is_initialized.94;
  long unsigned int D.6690;
  long unsigned int D.6693;
  long unsigned int D.6694;
  int D.6695;
  int result;

  D.6684 = GC_test_and_set (&GC_allocate_lock);
  if (D.6684 != 0) goto <D.6685>; else goto <D.6686>;
  <D.6685>:
  GC_lock ();
  <D.6686>:
  GC_is_initialized.94 = GC_is_initialized;
  if (GC_is_initialized.94 == 0) goto <D.6688>; else goto <D.6689>;
  <D.6688>:
  GC_init_inner ();
  <D.6689>:
  D.6690 = bytes >> 12;
  result = GC_expand_hp_inner (D.6690);
  if (result != 0) goto <D.6691>; else goto <D.6692>;
  <D.6691>:
  D.6693 = GC_arrays._requested_heapsize;
  D.6694 = D.6693 + bytes;
  GC_arrays._requested_heapsize = D.6694;
  <D.6692>:
  GC_clear (&GC_allocate_lock);
  D.6695 = result;
  return D.6695;
}


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.6708;
  long unsigned int last_fo_entries.98;
  long unsigned int D.6710;
  long unsigned int GC_fo_entries.99;
  long unsigned int last_words_finalized.100;
  long unsigned int last_words_finalized.101;
  int D.6716;
  long unsigned int D.6717;
  long unsigned int GC_free_space_divisor.102;
  long unsigned int D.6719;
  long unsigned int D.6720;
  long unsigned int GC_black_list_spacing.103;
  long unsigned int D.6727;
  long unsigned int D.6730;
  int D.6736;
  int D.6738;
  unsigned int GC_fail_count.104;
  unsigned int GC_fail_count.105;
  unsigned int GC_fail_count.106;
  long unsigned int D.6743;
  long unsigned int GC_max_retries.107;
  void (*<T41b>) (char *, GC_word) GC_current_warn_proc.108;
  GC_bool D.6749;
  int GC_print_stats.109;

  GC_incremental.95 = GC_incremental;
  if (GC_incremental.95 == 0) goto <D.6703>; else goto <D.6697>;
  <D.6703>:
  GC_dont_gc.96 = GC_dont_gc;
  if (GC_dont_gc.96 == 0) goto <D.6705>; else goto <D.6697>;
  <D.6705>:
  GC_dont_expand.97 = GC_dont_expand;
  if (GC_dont_expand.97 != 0) goto <D.6707>; else goto <D.6698>;
  <D.6707>:
  D.6708 = GC_arrays._words_allocd;
  if (D.6708 != 0) goto <D.6699>; else goto <D.6698>;
  <D.6698>:
  last_fo_entries.98 = last_fo_entries;
  D.6710 = last_fo_entries.98 + 500;
  GC_fo_entries.99 = GC_fo_entries;
  if (D.6710 < GC_fo_entries.99) goto <D.6712>; else goto <D.6700>;
  <D.6712>:
  last_words_finalized.100 = last_words_finalized;
  if (last_words_finalized.100 != 0) goto <D.6699>; else goto <D.6714>;
  <D.6714>:
  last_words_finalized.101 = GC_arrays._words_finalized;
  if (last_words_finalized.101 != 0) goto <D.6699>; else goto <D.6700>;
  <D.6700>:
  D.6716 = GC_should_collect ();
  if (D.6716 != 0) goto <D.6699>; else goto <D.6697>;
  <D.6699>:
  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.6701>;
  <D.6697>:
  {
    word blocks_to_get;

    D.6717 = GC_arrays._heapsize;
    GC_free_space_divisor.102 = GC_free_space_divisor;
    D.6719 = GC_free_space_divisor.102 * 4096;
    D.6720 = D.6717 / D.6719;
    blocks_to_get = D.6720 + needed_blocks;
    if (blocks_to_get > 2048) goto <D.6721>; else goto <D.6722>;
    <D.6721>:
    {
      word slop;

      if (ignore_off_page != 0) goto <D.6723>; else goto <D.6724>;
      <D.6723>:
      slop = 4;
      goto <D.6725>;
      <D.6724>:
      GC_black_list_spacing.103 = GC_black_list_spacing;
      D.6727 = GC_black_list_spacing.103 >> 12;
      slop = D.6727 * 2;
      if (slop > needed_blocks) goto <D.6728>; else goto <D.6729>;
      <D.6728>:
      slop = needed_blocks;
      <D.6729>:
      <D.6725>:
      D.6730 = needed_blocks + slop;
      if (D.6730 > 2048) goto <D.6731>; else goto <D.6732>;
      <D.6731>:
      blocks_to_get = needed_blocks + slop;
      goto <D.6733>;
      <D.6732>:
      blocks_to_get = 2048;
      <D.6733>:
    }
    <D.6722>:
    D.6736 = GC_expand_hp_inner (blocks_to_get);
    if (D.6736 == 0) goto <D.6737>; else goto <D.6734>;
    <D.6737>:
    D.6738 = GC_expand_hp_inner (needed_blocks);
    if (D.6738 == 0) goto <D.6739>; else goto <D.6734>;
    <D.6739>:
    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.6743 = (long unsigned int) GC_fail_count.105;
    GC_max_retries.107 = GC_max_retries;
    if (D.6743 < GC_max_retries.107) goto <D.6745>; else goto <D.6746>;
    <D.6745>:
    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.6748>;
    <D.6746>:
    GC_current_warn_proc.108 = GC_current_warn_proc;
    GC_current_warn_proc.108 ("GC Warning: Out of Memory!  Returning NIL!\n", 0);
    D.6749 = 0;
    return D.6749;
    <D.6748>:
    goto <D.6735>;
    <D.6734>:
    GC_fail_count.104 = GC_fail_count;
    if (GC_fail_count.104 != 0) goto <D.6750>; else goto <D.6751>;
    <D.6750>:
    GC_print_stats.109 = GC_print_stats;
    if (GC_print_stats.109 != 0) goto <D.6753>; else goto <D.6754>;
    <D.6753>:
    GC_printf ("Memory available again ...\n", 0, 0, 0, 0, 0, 0);
    <D.6754>:
    <D.6751>:
    <D.6735>:
  }
  <D.6701>:
  D.6749 = 1;
  return D.6749;
}


GC_allocobj (word sz, int kind)
{
  char * * D.6756;
  long unsigned int D.6757;
  char * D.6760;
  int GC_incremental.110;
  long unsigned int GC_time_limit.111;
  char * D.6767;
  int D.6777;
  char * * flh;
  GC_bool tried_minor;

  D.6756 = GC_obj_kinds[kind].ok_freelist;
  D.6757 = sz * 8;
  flh = D.6756 + D.6757;
  tried_minor = 0;
  if (sz == 0) goto <D.6758>; else goto <D.6759>;
  <D.6758>:
  D.6760 = 0B;
  return D.6760;
  <D.6759>:
  goto <D.6225>;
  <D.6224>:
  GC_collecting = 1;
  GC_incremental.110 = GC_incremental;
  if (GC_incremental.110 != 0) goto <D.6762>; else goto <D.6763>;
  <D.6762>:
  GC_time_limit.111 = GC_time_limit;
  if (GC_time_limit.111 != 999999) goto <D.6765>; else goto <D.6766>;
  <D.6765>:
  GC_collect_a_little_inner (1);
  <D.6766>:
  <D.6763>:
  GC_continue_reclaim (sz, kind);
  GC_collecting = 0;
  D.6767 = *flh;
  if (D.6767 == 0B) goto <D.6768>; else goto <D.6769>;
  <D.6768>:
  GC_new_hblk (sz, kind);
  <D.6769>:
  D.6767 = *flh;
  if (D.6767 == 0B) goto <D.6770>; else goto <D.6771>;
  <D.6770>:
  GC_collecting = 1;
  GC_incremental.110 = GC_incremental;
  if (GC_incremental.110 != 0) goto <D.6774>; else goto <D.6772>;
  <D.6774>:
  GC_time_limit.111 = GC_time_limit;
  if (GC_time_limit.111 == 999999) goto <D.6775>; else goto <D.6772>;
  <D.6775>:
  if (tried_minor == 0) goto <D.6776>; else goto <D.6772>;
  <D.6776>:
  GC_collect_a_little_inner (1);
  tried_minor = 1;
  goto <D.6773>;
  <D.6772>:
  D.6777 = GC_collect_or_expand (1, 0);
  if (D.6777 == 0) goto <D.6778>; else goto <D.6779>;
  <D.6778>:
  GC_collecting = 0;
  D.6760 = 0B;
  return D.6760;
  <D.6779>:
  <D.6773>:
  GC_collecting = 0;
  <D.6771>:
  <D.6225>:
  D.6767 = *flh;
  if (D.6767 == 0B) goto <D.6224>; else goto <D.6226>;
  <D.6226>:
  GC_fail_count = 0;
  D.6760 = *flh;
  return D.6760;
}


