GC_never_stop_func ()
{
  GC_bool D.5388;

  D.5388 = 0;
  return D.5388;
}


GC_timeout_stop_func ()
{
  unsigned int count.0;
  unsigned int count.1;
  unsigned int count.2;
  unsigned int D.5393;
  int D.5396;
  long int GC_start_time.3;
  long int D.5398;
  double D.5399;
  double D.5400;
  double D.5401;
  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.5393 = count.1 & 3;
  if (D.5393 != 0) goto <D.5394>; else goto <D.5395>;
  <D.5394>:
  D.5396 = 0;
  return D.5396;
  <D.5395>:
  current_time = clock ();
  GC_start_time.3 = GC_start_time;
  D.5398 = current_time - GC_start_time.3;
  D.5399 = (double) D.5398;
  D.5400 = D.5399 * 1.0e+3;
  D.5401 = D.5400 / 1.0e+6;
  time_diff = (long unsigned int) D.5401;
  GC_time_limit.4 = GC_time_limit;
  if (time_diff >= GC_time_limit.4) goto <D.5403>; else goto <D.5404>;
  <D.5403>:
  GC_print_stats.5 = GC_print_stats;
  if (GC_print_stats.5 != 0) goto <D.5406>; else goto <D.5407>;
  <D.5406>:
  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.5407>:
  D.5396 = 1;
  return D.5396;
  <D.5404>:
  D.5396 = 0;
  return D.5396;
}


GC_adj_words_allocd ()
{
  long unsigned int GC_non_gc_bytes.8;
  long int GC_non_gc_bytes.9;
  long unsigned int D.5413;
  long int D.5414;
  long int D.5415;
  long unsigned int D.5416;
  long int D.5417;
  long unsigned int D.5418;
  long int D.5419;
  long int D.5420;
  long unsigned int D.5421;
  long int D.5422;
  long int D.5423;
  long unsigned int D.5426;
  long unsigned int result.10;
  long unsigned int D.5428;
  long unsigned int D.5429;
  long unsigned int D.5430;
  long unsigned int D.5433;
  long unsigned int D.5434;
  long int D.5435;
  word D.5438;
  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.5413 = GC_arrays._non_gc_bytes_at_gc;
  D.5414 = (long int) D.5413;
  D.5415 = GC_non_gc_bytes.9 - D.5414;
  expl_managed = D.5415 >> 2;
  D.5416 = GC_arrays._words_allocd;
  D.5417 = (long int) D.5416;
  D.5418 = GC_arrays._mem_freed;
  D.5419 = (long int) D.5418;
  D.5420 = D.5417 - D.5419;
  D.5421 = GC_arrays._finalizer_mem_freed;
  D.5422 = (long int) D.5421;
  D.5423 = D.5420 + D.5422;
  result = D.5423 - expl_managed;
  D.5416 = GC_arrays._words_allocd;
  D.5417 = (long int) D.5416;
  if (D.5417 < result) goto <D.5424>; else goto <D.5425>;
  <D.5424>:
  D.5416 = GC_arrays._words_allocd;
  result = (signed_word) D.5416;
  <D.5425>:
  D.5426 = GC_arrays._words_finalized;
  result.10 = (long unsigned int) result;
  D.5428 = D.5426 + result.10;
  result = (signed_word) D.5428;
  D.5429 = GC_arrays._words_wasted;
  D.5430 = D.5429 >> 3;
  result.10 = (long unsigned int) result;
  if (D.5430 < result.10) goto <D.5431>; else goto <D.5432>;
  <D.5431>:
  D.5429 = GC_arrays._words_wasted;
  result.10 = (long unsigned int) result;
  D.5433 = D.5429 + result.10;
  result = (signed_word) D.5433;
  <D.5432>:
  D.5416 = GC_arrays._words_allocd;
  D.5434 = D.5416 >> 3;
  D.5435 = (long int) D.5434;
  if (D.5435 > result) goto <D.5436>; else goto <D.5437>;
  <D.5436>:
  D.5416 = GC_arrays._words_allocd;
  D.5438 = D.5416 >> 3;
  return D.5438;
  <D.5437>:
  D.5438 = (word) result;
  return D.5438;
}


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

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


GC_should_collect ()
{
  GC_bool D.5440;
  int iftmp.11;
  long unsigned int D.5445;
  long unsigned int D.5446;
  long unsigned int D.5448;
  long unsigned int GC_collect_at_heapsize.12;

  D.5445 = GC_adj_words_allocd ();
  D.5446 = min_words_allocd ();
  if (D.5445 >= D.5446) goto <D.5442>; else goto <D.5447>;
  <D.5447>:
  D.5448 = GC_arrays._heapsize;
  GC_collect_at_heapsize.12 = GC_collect_at_heapsize;
  if (D.5448 >= GC_collect_at_heapsize.12) goto <D.5442>; else goto <D.5443>;
  <D.5442>:
  iftmp.11 = 1;
  goto <D.5444>;
  <D.5443>:
  iftmp.11 = 0;
  <D.5444>:
  D.5440 = iftmp.11;
  return D.5440;
}


min_words_allocd ()
{
  long int D.5453;
  long unsigned int D.5454;
  long unsigned int GC_root_size.13;
  long unsigned int D.5456;
  long unsigned int D.5457;
  long unsigned int D.5458;
  long unsigned int D.5459;
  long unsigned int D.5460;
  long unsigned int D.5461;
  int GC_incremental.14;
  long unsigned int GC_time_limit.15;
  word D.5467;
  long unsigned int GC_free_space_divisor.16;
  long unsigned int D.5469;
  register signed_word stack_size;
  word total_root_size;
  word scan_size;

  stack_size = 10000;
  if (stack_size < 0) goto <D.5451>; else goto <D.5452>;
  <D.5451>:
  stack_size = -stack_size;
  <D.5452>:
  D.5453 = stack_size * 2;
  D.5454 = (long unsigned int) D.5453;
  GC_root_size.13 = GC_root_size;
  total_root_size = D.5454 + GC_root_size.13;
  D.5456 = GC_arrays._heapsize;
  D.5457 = GC_arrays._large_free_bytes;
  D.5458 = D.5456 - D.5457;
  D.5457 = GC_arrays._large_free_bytes;
  D.5459 = D.5457 >> 2;
  D.5460 = D.5458 + D.5459;
  D.5461 = D.5460 + total_root_size;
  scan_size = D.5461 >> 2;
  GC_incremental.14 = GC_incremental;
  if (GC_incremental.14 != 0) goto <D.5464>; else goto <D.5462>;
  <D.5464>:
  GC_time_limit.15 = GC_time_limit;
  if (GC_time_limit.15 != 999999) goto <D.5466>; else goto <D.5462>;
  <D.5466>:
  GC_free_space_divisor.16 = GC_free_space_divisor;
  D.5469 = GC_free_space_divisor.16 * 2;
  D.5467 = scan_size / D.5469;
  return D.5467;
  <D.5462>:
  GC_free_space_divisor.16 = GC_free_space_divisor;
  D.5467 = scan_size / GC_free_space_divisor.16;
  return D.5467;
}


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

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


GC_maybe_gc ()
{
  int D.5474;
  int GC_incremental.18;
  int GC_need_full_gc.19;
  int n_partial_gcs.20;
  int GC_full_freq.21;
  int GC_print_stats.22;
  long unsigned int D.5490;
  long unsigned int D.5491;
  long int D.5492;
  long unsigned int GC_gc_no.23;
  long int GC_gc_no.24;
  long int D.5495;
  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.5505;
  int GC_is_full_gc.29;
  int GC_n_attempts.30;
  int GC_n_attempts.31;
  static int n_partial_gcs = 0;

  D.5474 = GC_should_collect ();
  if (D.5474 != 0) goto <D.5475>; else goto <D.5476>;
  <D.5475>:
  GC_incremental.18 = GC_incremental;
  if (GC_incremental.18 == 0) goto <D.5478>; else goto <D.5479>;
  <D.5478>:
  GC_try_to_collect_inner (GC_never_stop_func);
  n_partial_gcs = 0;
  return;
  <D.5479>:
  GC_wait_for_reclaim ();
  GC_need_full_gc.19 = GC_need_full_gc;
  if (GC_need_full_gc.19 != 0) goto <D.5480>; else goto <D.5484>;
  <D.5484>:
  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.5480>; else goto <D.5481>;
  <D.5480>:
  GC_print_stats.22 = GC_print_stats;
  if (GC_print_stats.22 != 0) goto <D.5488>; else goto <D.5489>;
  <D.5488>:
  D.5490 = GC_arrays._words_allocd;
  D.5491 = D.5490 << 2;
  D.5492 = (long int) D.5491;
  GC_gc_no.23 = GC_gc_no;
  GC_gc_no.24 = (long int) GC_gc_no.23;
  D.5495 = GC_gc_no.24 + 1;
  GC_printf ("***>Full mark for collection %lu after %ld allocd bytes\n", D.5495, D.5492, 0, 0, 0, 0);
  <D.5489>:
  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.5482>;
  <D.5481>:
  n_partial_gcs.20 = n_partial_gcs;
  n_partial_gcs.25 = n_partial_gcs.20 + 1;
  n_partial_gcs = n_partial_gcs.25;
  <D.5482>:
  GC_time_limit.26 = GC_time_limit;
  if (GC_time_limit.26 != 999999) goto <D.5498>; else goto <D.5499>;
  <D.5498>:
  GC_start_time.27 = clock ();
  GC_start_time = GC_start_time.27;
  <D.5499>:
  GC_time_limit.26 = GC_time_limit;
  if (GC_time_limit.26 == 999999) goto <D.5502>; else goto <D.5503>;
  <D.5502>:
  iftmp.28 = GC_never_stop_func;
  goto <D.5504>;
  <D.5503>:
  iftmp.28 = GC_timeout_stop_func;
  <D.5504>:
  D.5505 = GC_stopped_mark (iftmp.28);
  if (D.5505 != 0) goto <D.5506>; else goto <D.5507>;
  <D.5506>:
  GC_finish_collection ();
  goto <D.5508>;
  <D.5507>:
  GC_is_full_gc.29 = GC_is_full_gc;
  if (GC_is_full_gc.29 == 0) goto <D.5510>; else goto <D.5511>;
  <D.5510>:
  GC_n_attempts.30 = GC_n_attempts;
  GC_n_attempts.31 = GC_n_attempts.30 + 1;
  GC_n_attempts = GC_n_attempts.31;
  <D.5511>:
  <D.5508>:
  <D.5476>:
}


GC_try_to_collect_inner (int (*GC_stop_func) (void) stop_func)
{
  int GC_dont_gc.32;
  GC_bool D.5518;
  void (*<T2c1>) (GCEventType) GC_notify_event.33;
  int GC_incremental.34;
  int D.5525;
  int GC_print_stats.35;
  int D.5531;
  int D.5534;
  long unsigned int D.5541;
  long unsigned int D.5542;
  long int D.5543;
  long unsigned int GC_gc_no.36;
  long int GC_gc_no.37;
  long int D.5546;
  int GC_find_leak.38;
  int D.5551;
  int D.5554;
  long int D.5561;
  double D.5562;
  double D.5563;
  double D.5564;
  long unsigned int D.5565;
  long int D.5566;
  clock_t start_time;
  clock_t current_time;

  GC_dont_gc.32 = GC_dont_gc;
  if (GC_dont_gc.32 != 0) goto <D.5516>; else goto <D.5517>;
  <D.5516>:
  D.5518 = 0;
  return D.5518;
  <D.5517>:
  GC_notify_event.33 = GC_notify_event;
  if (GC_notify_event.33 != 0B) goto <D.5520>; else goto <D.5521>;
  <D.5520>:
  GC_notify_event.33 = GC_notify_event;
  GC_notify_event.33 (0);
  <D.5521>:
  GC_incremental.34 = GC_incremental;
  if (GC_incremental.34 != 0) goto <D.5523>; else goto <D.5524>;
  <D.5523>:
  D.5525 = GC_collection_in_progress ();
  if (D.5525 != 0) goto <D.5526>; else goto <D.5527>;
  <D.5526>:
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.5529>; else goto <D.5530>;
  <D.5529>:
  GC_printf ("GC_try_to_collect_inner: finishing collection in progress\n", 0, 0, 0, 0, 0, 0);
  <D.5530>:
  goto <D.5245>;
  <D.5244>:
  D.5531 = stop_func ();
  if (D.5531 != 0) goto <D.5532>; else goto <D.5533>;
  <D.5532>:
  D.5518 = 0;
  return D.5518;
  <D.5533>:
  GC_collect_a_little_inner (1);
  <D.5245>:
  D.5534 = GC_collection_in_progress ();
  if (D.5534 != 0) goto <D.5244>; else goto <D.5246>;
  <D.5246>:
  <D.5527>:
  <D.5524>:
  if (stop_func == GC_never_stop_func) goto <D.5535>; else goto <D.5536>;
  <D.5535>:
  GC_notify_full_gc ();
  <D.5536>:
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.5537>; else goto <D.5538>;
  <D.5537>:
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.5539>; else goto <D.5540>;
  <D.5539>:
  start_time = clock ();
  <D.5540>:
  D.5541 = GC_arrays._words_allocd;
  D.5542 = D.5541 << 2;
  D.5543 = (long int) D.5542;
  GC_gc_no.36 = GC_gc_no;
  GC_gc_no.37 = (long int) GC_gc_no.36;
  D.5546 = GC_gc_no.37 + 1;
  GC_printf ("Initiating full world-stop collection %lu after %ld allocd bytes\n", D.5546, D.5543, 0, 0, 0, 0);
  <D.5538>:
  GC_promote_black_lists ();
  GC_wait_for_reclaim ();
  GC_find_leak.38 = GC_find_leak;
  if (GC_find_leak.38 != 0) goto <D.5547>; else goto <D.5550>;
  <D.5550>:
  if (stop_func != GC_never_stop_func) goto <D.5547>; else goto <D.5548>;
  <D.5547>:
  D.5551 = GC_reclaim_all (stop_func, 0);
  if (D.5551 == 0) goto <D.5552>; else goto <D.5553>;
  <D.5552>:
  D.5518 = 0;
  return D.5518;
  <D.5553>:
  <D.5548>:
  GC_invalidate_mark_state ();
  GC_clear_marks ();
  GC_is_full_gc = 1;
  D.5554 = GC_stopped_mark (stop_func);
  if (D.5554 == 0) goto <D.5555>; else goto <D.5556>;
  <D.5555>:
  GC_incremental.34 = GC_incremental;
  if (GC_incremental.34 == 0) goto <D.5557>; else goto <D.5558>;
  <D.5557>:
  GC_invalidate_mark_state ();
  GC_unpromote_black_lists ();
  <D.5558>:
  D.5518 = 0;
  return D.5518;
  <D.5556>:
  GC_finish_collection ();
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.5559>; else goto <D.5560>;
  <D.5559>:
  current_time = clock ();
  D.5561 = current_time - start_time;
  D.5562 = (double) D.5561;
  D.5563 = D.5562 * 1.0e+3;
  D.5564 = D.5563 / 1.0e+6;
  D.5565 = (long unsigned int) D.5564;
  D.5566 = (long int) D.5565;
  GC_printf ("Complete collection took %lu msecs\n", D.5566, 0, 0, 0, 0, 0);
  <D.5560>:
  GC_notify_event.33 = GC_notify_event;
  if (GC_notify_event.33 != 0B) goto <D.5567>; else goto <D.5568>;
  <D.5567>:
  GC_notify_event.33 = GC_notify_event;
  GC_notify_event.33 (5);
  <D.5568>:
  D.5518 = 1;
  return D.5518;
}


GC_collect_a_little_inner (int n)
{
  int GC_dont_gc.39;
  int GC_incremental.40;
  int D.5577;
  int D.5579;
  int GC_n_attempts.41;
  long unsigned int GC_time_limit.42;
  long int GC_start_time.43;
  int D.5589;
  int GC_n_attempts.44;
  int D.5593;
  int GC_deficit.45;
  int D.5597;
  int GC_deficit.46;
  register int i;

  GC_dont_gc.39 = GC_dont_gc;
  if (GC_dont_gc.39 != 0) goto <D.5571>; else goto <D.5572>;
  <D.5571>:
  return;
  <D.5572>:
  GC_incremental.40 = GC_incremental;
  if (GC_incremental.40 != 0) goto <D.5576>; else goto <D.5573>;
  <D.5576>:
  D.5577 = GC_collection_in_progress ();
  if (D.5577 != 0) goto <D.5578>; else goto <D.5573>;
  <D.5578>:
  i = GC_deficit;
  goto <D.5254>;
  <D.5253>:
  D.5579 = GC_mark_some (0B);
  if (D.5579 != 0) goto <D.5580>; else goto <D.5581>;
  <D.5580>:
  GC_wait_for_reclaim ();
  GC_n_attempts.41 = GC_n_attempts;
  if (GC_n_attempts.41 <= 0) goto <D.5585>; else goto <D.5582>;
  <D.5585>:
  GC_time_limit.42 = GC_time_limit;
  if (GC_time_limit.42 != 999999) goto <D.5587>; else goto <D.5582>;
  <D.5587>:
  GC_start_time.43 = clock ();
  GC_start_time = GC_start_time.43;
  D.5589 = GC_stopped_mark (GC_timeout_stop_func);
  if (D.5589 == 0) goto <D.5590>; else goto <D.5591>;
  <D.5590>:
  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.5252>;
  <D.5591>:
  goto <D.5583>;
  <D.5582>:
  GC_stopped_mark (GC_never_stop_func);
  <D.5583>:
  GC_finish_collection ();
  goto <D.5252>;
  <D.5581>:
  i = i + 1;
  <D.5254>:
  D.5593 = n * 10;
  if (D.5593 > i) goto <D.5253>; else goto <D.5252>;
  <D.5252>:
  GC_deficit.45 = GC_deficit;
  if (GC_deficit.45 > 0) goto <D.5595>; else goto <D.5596>;
  <D.5595>:
  D.5597 = n * -10;
  GC_deficit.45 = GC_deficit;
  GC_deficit.46 = D.5597 + GC_deficit.45;
  GC_deficit = GC_deficit.46;
  <D.5596>:
  GC_deficit.45 = GC_deficit;
  if (GC_deficit.45 < 0) goto <D.5599>; else goto <D.5600>;
  <D.5599>:
  GC_deficit = 0;
  <D.5600>:
  goto <D.5574>;
  <D.5573>:
  GC_maybe_gc ();
  <D.5574>:
}


GC_collect_a_little ()
{
  int D.5602;
  int GC_debugging_started.47;
  void (*<T2c8>) (void) GC_print_all_smashed.48;
  int D.5611;
  int result;

  D.5602 = pthread_mutex_trylock (&GC_allocate_ml);
  if (D.5602 != 0) goto <D.5603>; else goto <D.5604>;
  <D.5603>:
  GC_lock ();
  <D.5604>:
  GC_collect_a_little_inner (1);
  result = GC_collection_in_progress ();
  pthread_mutex_unlock (&GC_allocate_ml);
  if (result == 0) goto <D.5605>; else goto <D.5606>;
  <D.5605>:
  GC_debugging_started.47 = GC_debugging_started;
  if (GC_debugging_started.47 != 0) goto <D.5608>; else goto <D.5609>;
  <D.5608>:
  GC_print_all_smashed.48 = GC_print_all_smashed;
  GC_print_all_smashed.48 ();
  <D.5609>:
  <D.5606>:
  D.5611 = result;
  return D.5611;
}


GC_stopped_mark (int (*GC_stop_func) (void) stop_func)
{
  int GC_print_stats.49;
  void (*<T2c1>) (GCEventType) GC_notify_event.50;
  long unsigned int GC_gc_no.51;
  long int GC_gc_no.52;
  long int D.5623;
  long unsigned int D.5624;
  long unsigned int D.5625;
  long int D.5626;
  long unsigned int D.5627;
  long unsigned int D.5628;
  long int D.5629;
  int D.5630;
  GC_bool D.5635;
  int D.5636;
  long unsigned int GC_gc_no.53;
  long int D.5641;
  long unsigned int D.5644;
  long int D.5645;
  int GC_debugging_started.54;
  void (*<T2c8>) (void) GC_check_heap.55;
  long int D.5654;
  double D.5655;
  double D.5656;
  double D.5657;
  long unsigned int D.5658;
  long int D.5659;
  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.5614>; else goto <D.5615>;
      <D.5614>:
      start_time = clock ();
      <D.5615>:
      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.5617>; else goto <D.5618>;
      <D.5617>:
      GC_notify_event.50 = GC_notify_event;
      GC_notify_event.50 (1);
      <D.5618>:
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.5619>; else goto <D.5620>;
      <D.5619>:
      GC_gc_no.51 = GC_gc_no;
      GC_gc_no.52 = (long int) GC_gc_no.51;
      D.5623 = GC_gc_no.52 + 1;
      GC_printf ("--> Marking for collection %lu ", D.5623, 0, 0, 0, 0, 0);
      D.5624 = GC_arrays._words_wasted;
      D.5625 = D.5624 << 2;
      D.5626 = (long int) D.5625;
      D.5627 = GC_arrays._words_allocd;
      D.5628 = D.5627 << 2;
      D.5629 = (long int) D.5628;
      GC_printf ("after %lu allocd bytes + %lu wasted bytes\n", D.5629, D.5626, 0, 0, 0, 0);
      <D.5620>:
      GC_clear_a_few_frames ();
      GC_noop (0B, 0, 0, 0, 0, 0);
      GC_initiate_gc ();
      i = 0;
      <D.5267>:
      D.5630 = stop_func ();
      if (D.5630 != 0) goto <D.5631>; else goto <D.5632>;
      <D.5631>:
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.5633>; else goto <D.5634>;
      <D.5633>:
      GC_printf ("Abandoned stopped marking after ", 0, 0, 0, 0, 0, 0);
      GC_printf ("%lu iterations\n", i, 0, 0, 0, 0, 0);
      <D.5634>:
      GC_deficit = i;
      GC_world_stopped = 0;
      GC_start_world ();
      D.5635 = 0;
      return D.5635;
      <D.5632>:
      D.5636 = GC_mark_some (&dummy);
      if (D.5636 != 0) goto <D.5266>; else goto <D.5637>;
      <D.5637>:
      i = i + 1;
      goto <D.5267>;
      <D.5266>:
      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.5639>; else goto <D.5640>;
      <D.5639>:
      GC_gc_no.51 = GC_gc_no;
      GC_gc_no.52 = (long int) GC_gc_no.51;
      D.5641 = GC_gc_no.52 + -1;
      GC_printf ("Collection %lu finished", D.5641, 0, 0, 0, 0, 0);
      <D.5640>:
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.5642>; else goto <D.5643>;
      <D.5642>:
      D.5644 = GC_arrays._heapsize;
      D.5645 = (long int) D.5644;
      GC_printf (" ---> heapsize = %lu bytes\n", D.5645, 0, 0, 0, 0, 0);
      GC_printf ("", 0, 0, 0, 0, 0, 0);
      <D.5643>:
      GC_debugging_started.54 = GC_debugging_started;
      if (GC_debugging_started.54 != 0) goto <D.5647>; else goto <D.5648>;
      <D.5647>:
      GC_check_heap.55 = GC_check_heap;
      GC_check_heap.55 ();
      <D.5648>:
      GC_notify_event.50 = GC_notify_event;
      if (GC_notify_event.50 != 0B) goto <D.5650>; else goto <D.5651>;
      <D.5650>:
      GC_notify_event.50 = GC_notify_event;
      GC_notify_event.50 (2);
      <D.5651>:
      GC_world_stopped = 0;
      GC_start_world ();
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.5652>; else goto <D.5653>;
      <D.5652>:
      current_time = clock ();
      D.5654 = current_time - start_time;
      D.5655 = (double) D.5654;
      D.5656 = D.5655 * 1.0e+3;
      D.5657 = D.5656 / 1.0e+6;
      D.5658 = (long unsigned int) D.5657;
      D.5659 = (long int) D.5658;
      GC_printf ("World-stopped marking took %lu msecs\n", D.5659, 0, 0, 0, 0, 0);
      <D.5653>:
      D.5635 = 1;
      return D.5635;
    }
  finally
    {
      dummy = {CLOBBER};
    }
}


GC_set_fl_marks (char * q)
{
  long unsigned int p.56;
  long unsigned int D.5663;
  long unsigned int h.57;
  long unsigned int D.5667;
  struct bottom_index * D.5668;
  long unsigned int D.5669;
  long unsigned int D.5670;
  int p.58;
  int h.59;
  int D.5673;
  int D.5674;
  sizetype D.5675;
  int D.5676;
  long unsigned int D.5677;
  long unsigned int D.5678;
  word * D.5679;
  int D.5680;
  char * p;
  struct hblk * h;
  struct hblk * last_h;
  struct hdr * hhdr;
  int word_no;

  last_h = 0B;
  p = q;
  goto <D.5281>;
  <D.5280>:
  p.56 = (long unsigned int) p;
  D.5663 = p.56 & 4294963200;
  h = (struct hblk *) D.5663;
  if (h != last_h) goto <D.5664>; else goto <D.5665>;
  <D.5664>:
  last_h = h;
  h.57 = (long unsigned int) h;
  D.5667 = h.57 >> 22;
  D.5668 = GC_arrays._top_index[D.5667];
  h.57 = (long unsigned int) h;
  D.5669 = h.57 >> 12;
  D.5670 = D.5669 & 1023;
  hhdr = D.5668->index[D.5670];
  <D.5665>:
  p.58 = (int) p;
  h.59 = (int) h;
  D.5673 = p.58 - h.59;
  word_no = D.5673 /[ex] 4;
  {
    word old;

    <D.5278>:
    D.5674 = word_no >> 5;
    D.5675 = (sizetype) D.5674;
    old = hhdr->hb_marks[D.5675];
    D.5676 = word_no & 31;
    D.5677 = 1 << D.5676;
    D.5678 = D.5677 | old;
    D.5674 = word_no >> 5;
    D.5675 = (sizetype) D.5674;
    D.5679 = &hhdr->hb_marks[D.5675];
    D.5680 = GC_compare_and_exchange (D.5679, old, D.5678);
    if (D.5680 == 0) goto <D.5278>; else goto <D.5279>;
    <D.5279>:
  }
  p = MEM[(char * *)p];
  <D.5281>:
  if (p != 0B) goto <D.5280>; else goto <D.5282>;
  <D.5282>:
}


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

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


GC_clear_fl_marks (char * q)
{
  long unsigned int p.60;
  long unsigned int D.5684;
  long unsigned int h.61;
  long unsigned int D.5688;
  struct bottom_index * D.5689;
  long unsigned int D.5690;
  long unsigned int D.5691;
  int p.62;
  int h.63;
  int D.5694;
  int D.5695;
  long unsigned int D.5696;
  int D.5697;
  long unsigned int D.5698;
  long unsigned int D.5699;
  long unsigned int D.5700;
  char * p;
  struct hblk * h;
  struct hblk * last_h;
  struct hdr * hhdr;
  int word_no;

  last_h = 0B;
  p = q;
  goto <D.5292>;
  <D.5291>:
  p.60 = (long unsigned int) p;
  D.5684 = p.60 & 4294963200;
  h = (struct hblk *) D.5684;
  if (h != last_h) goto <D.5685>; else goto <D.5686>;
  <D.5685>:
  last_h = h;
  h.61 = (long unsigned int) h;
  D.5688 = h.61 >> 22;
  D.5689 = GC_arrays._top_index[D.5688];
  h.61 = (long unsigned int) h;
  D.5690 = h.61 >> 12;
  D.5691 = D.5690 & 1023;
  hhdr = D.5689->index[D.5691];
  <D.5686>:
  p.62 = (int) p;
  h.63 = (int) h;
  D.5694 = p.62 - h.63;
  word_no = D.5694 /[ex] 4;
  D.5695 = word_no >> 5;
  D.5695 = word_no >> 5;
  D.5696 = hhdr->hb_marks[D.5695];
  D.5697 = word_no & 31;
  D.5698 = 1 << D.5697;
  D.5699 = ~D.5698;
  D.5700 = D.5696 & D.5699;
  hhdr->hb_marks[D.5695] = D.5700;
  p = MEM[(char * *)p];
  <D.5292>:
  if (p != 0B) goto <D.5291>; else goto <D.5293>;
  <D.5293>:
}


GC_finish_collection ()
{
  void (*<T2c1>) (GCEventType) GC_notify_event.64;
  char * D.5704;
  int GC_dump_regularly.65;
  int GC_find_leak.66;
  char * * D.5713;
  long unsigned int D.5714;
  char * * D.5715;
  int GC_n_kinds.67;
  int GC_print_back_height.68;
  char * * D.5722;
  long unsigned int D.5723;
  char * * D.5724;
  int GC_is_full_gc.69;
  long unsigned int D.5730;
  long unsigned int D.5731;
  long unsigned int GC_used_heap_size_after_full.70;
  long unsigned int GC_used_heap_size_after_full.71;
  long unsigned int D.5735;
  long unsigned int D.5736;
  long unsigned int D.5737;
  _Bool D.5738;
  int GC_need_full_gc.72;
  long unsigned int D.5740;
  long unsigned int D.5741;
  long unsigned int D.5742;
  long unsigned int GC_non_gc_bytes.73;

  GC_notify_event.64 = GC_notify_event;
  if (GC_notify_event.64 != 0B) goto <D.5702>; else goto <D.5703>;
  <D.5702>:
  GC_notify_event.64 = GC_notify_event;
  GC_notify_event.64 (3);
  <D.5703>:
  D.5704 = getenv ("GC_PRINT_ADDRESS_MAP");
  if (D.5704 != 0B) goto <D.5705>; else goto <D.5706>;
  <D.5705>:
  GC_print_address_map ();
  <D.5706>:
  GC_dump_regularly.65 = GC_dump_regularly;
  if (GC_dump_regularly.65 != 0) goto <D.5708>; else goto <D.5709>;
  <D.5708>:
  GC_dump ();
  <D.5709>:
  GC_find_leak.66 = GC_find_leak;
  if (GC_find_leak.66 != 0) goto <D.5711>; else goto <D.5712>;
  <D.5711>:
  {
    register word size;
    int kind;
    char * q;

    kind = 0;
    goto <D.5307>;
    <D.5306>:
    size = 1;
    goto <D.5304>;
    <D.5303>:
    D.5713 = GC_obj_kinds[kind].ok_freelist;
    D.5714 = size * 4;
    D.5715 = D.5713 + D.5714;
    q = *D.5715;
    if (q != 0B) goto <D.5716>; else goto <D.5717>;
    <D.5716>:
    GC_set_fl_marks (q);
    <D.5717>:
    size = size + 1;
    <D.5304>:
    if (size <= 512) goto <D.5303>; else goto <D.5305>;
    <D.5305>:
    kind = kind + 1;
    <D.5307>:
    GC_n_kinds.67 = GC_n_kinds;
    if (kind < GC_n_kinds.67) goto <D.5306>; else goto <D.5308>;
    <D.5308>:
  }
  GC_start_reclaim (1);
  <D.5712>:
  GC_finalize ();
  GC_print_back_height.68 = GC_print_back_height;
  if (GC_print_back_height.68 != 0) goto <D.5720>; else goto <D.5721>;
  <D.5720>:
  GC_err_puts ("Back height not available: Rebuild collector with -DMAKE_BACK_GRAPH\n");
  <D.5721>:
  {
    register word size;
    register char * q;
    int kind;

    kind = 0;
    goto <D.5316>;
    <D.5315>:
    size = 1;
    goto <D.5313>;
    <D.5312>:
    D.5722 = GC_obj_kinds[kind].ok_freelist;
    D.5723 = size * 4;
    D.5724 = D.5722 + D.5723;
    q = *D.5724;
    if (q != 0B) goto <D.5725>; else goto <D.5726>;
    <D.5725>:
    GC_clear_fl_marks (q);
    <D.5726>:
    size = size + 1;
    <D.5313>:
    if (size <= 512) goto <D.5312>; else goto <D.5314>;
    <D.5314>:
    kind = kind + 1;
    <D.5316>:
    GC_n_kinds.67 = GC_n_kinds;
    if (kind < GC_n_kinds.67) goto <D.5315>; else goto <D.5317>;
    <D.5317>:
  }
  GC_start_reclaim (0);
  GC_is_full_gc.69 = GC_is_full_gc;
  if (GC_is_full_gc.69 != 0) goto <D.5728>; else goto <D.5729>;
  <D.5728>:
  D.5730 = GC_arrays._heapsize;
  D.5731 = GC_arrays._large_free_bytes;
  GC_used_heap_size_after_full.70 = D.5730 - D.5731;
  GC_used_heap_size_after_full = GC_used_heap_size_after_full.70;
  GC_need_full_gc = 0;
  goto <D.5733>;
  <D.5729>:
  D.5730 = GC_arrays._heapsize;
  D.5731 = GC_arrays._large_free_bytes;
  GC_used_heap_size_after_full.70 = D.5730 - D.5731;
  GC_used_heap_size_after_full.71 = GC_used_heap_size_after_full;
  D.5735 = GC_used_heap_size_after_full.70 - GC_used_heap_size_after_full.71;
  D.5736 = D.5735 >> 2;
  D.5737 = min_words_allocd ();
  D.5738 = D.5736 > D.5737;
  GC_need_full_gc.72 = (int) D.5738;
  GC_need_full_gc = GC_need_full_gc.72;
  <D.5733>:
  GC_n_attempts = 0;
  GC_is_full_gc = 0;
  D.5740 = GC_arrays._words_allocd_before_gc;
  D.5741 = GC_arrays._words_allocd;
  D.5742 = D.5740 + D.5741;
  GC_arrays._words_allocd_before_gc = D.5742;
  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.5744>; else goto <D.5745>;
  <D.5744>:
  GC_notify_event.64 = GC_notify_event;
  GC_notify_event.64 (4);
  <D.5745>:
}


GC_try_to_collect (int (*GC_stop_func) (void) stop_func)
{
  int GC_debugging_started.74;
  void (*<T2c8>) (void) GC_print_all_smashed.75;
  int D.5750;
  int GC_is_initialized.76;
  int D.5760;
  int result;

  GC_debugging_started.74 = GC_debugging_started;
  if (GC_debugging_started.74 != 0) goto <D.5747>; else goto <D.5748>;
  <D.5747>:
  GC_print_all_smashed.75 = GC_print_all_smashed;
  GC_print_all_smashed.75 ();
  <D.5748>:
  GC_notify_or_invoke_finalizers ();
  D.5750 = pthread_mutex_trylock (&GC_allocate_ml);
  if (D.5750 != 0) goto <D.5751>; else goto <D.5752>;
  <D.5751>:
  GC_lock ();
  <D.5752>:
  GC_collecting = 1;
  GC_is_initialized.76 = GC_is_initialized;
  if (GC_is_initialized.76 == 0) goto <D.5754>; else goto <D.5755>;
  <D.5754>:
  GC_init_inner ();
  <D.5755>:
  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.5756>; else goto <D.5757>;
  <D.5756>:
  GC_debugging_started.74 = GC_debugging_started;
  if (GC_debugging_started.74 != 0) goto <D.5758>; else goto <D.5759>;
  <D.5758>:
  GC_print_all_smashed.75 = GC_print_all_smashed;
  GC_print_all_smashed.75 ();
  <D.5759>:
  GC_notify_or_invoke_finalizers ();
  <D.5757>:
  D.5760 = result;
  return D.5760;
}


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


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.5771;
  long unsigned int D.5772;
  void * GC_least_plausible_heap_addr.80;
  void * GC_least_plausible_heap_addr.81;
  char * D.5778;
  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.5766>; else goto <D.5767>;
  <D.5766>:
  GC_abort ("Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS");
  <D.5767>:
  phdr = GC_install_header (p);
  if (phdr == 0B) goto <D.5768>; else goto <D.5769>;
  <D.5768>:
  return;
  <D.5769>:
  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.5771 = GC_arrays._heapsize;
  D.5772 = D.5771 + bytes;
  GC_arrays._heapsize = D.5772;
  GC_least_plausible_heap_addr.80 = GC_least_plausible_heap_addr;
  if (p <= GC_least_plausible_heap_addr.80) goto <D.5773>; else goto <D.5776>;
  <D.5776>:
  GC_least_plausible_heap_addr.80 = GC_least_plausible_heap_addr;
  if (GC_least_plausible_heap_addr.80 == 0B) goto <D.5773>; else goto <D.5774>;
  <D.5773>:
  GC_least_plausible_heap_addr.81 = p + 4294967292;
  GC_least_plausible_heap_addr = GC_least_plausible_heap_addr.81;
  <D.5774>:
  D.5778 = p + bytes;
  GC_greatest_plausible_heap_addr.82 = GC_greatest_plausible_heap_addr;
  if (D.5778 >= GC_greatest_plausible_heap_addr.82) goto <D.5780>; else goto <D.5781>;
  <D.5780>:
  GC_greatest_plausible_heap_addr.83 = p + bytes;
  GC_greatest_plausible_heap_addr = GC_greatest_plausible_heap_addr.83;
  <D.5781>:
}


GC_print_heap_sects ()
{
  long unsigned int D.5784;
  long int D.5785;
  char * D.5786;
  long unsigned int D.5787;
  long int D.5788;
  long int start.84;
  long int i.85;
  struct hblk * D.5791;
  struct hblk * D.5794;
  long unsigned int D.5795;
  long int D.5796;
  long int nbl.86;
  long unsigned int GC_n_heap_sects.87;
  register unsigned int i;

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

    D.5786 = GC_arrays._heap_sects[i].hs_start;
    start = (long unsigned int) D.5786;
    len = GC_arrays._heap_sects[i].hs_bytes;
    nbl = 0;
    D.5787 = start + len;
    D.5788 = (long int) D.5787;
    start.84 = (long int) start;
    i.85 = (long int) i;
    GC_printf ("Section %ld from 0x%lx to 0x%lx ", i.85, start.84, D.5788, 0, 0, 0);
    h = (struct hblk *) start;
    goto <D.5339>;
    <D.5338>:
    D.5791 = GC_is_black_listed (h, 4096);
    if (D.5791 != 0B) goto <D.5792>; else goto <D.5793>;
    <D.5792>:
    nbl = nbl + 1;
    <D.5793>:
    h = h + 4096;
    <D.5339>:
    D.5787 = start + len;
    D.5794 = (struct hblk *) D.5787;
    if (D.5794 > h) goto <D.5338>; else goto <D.5340>;
    <D.5340>:
    D.5795 = len / 4096;
    D.5796 = (long int) D.5795;
    nbl.86 = (long int) nbl;
    GC_printf ("%lu/%lu blacklisted\n", nbl.86, D.5796, 0, 0, 0, 0);
  }
  i = i + 1;
  <D.5342>:
  GC_n_heap_sects.87 = GC_n_heap_sects;
  if (i < GC_n_heap_sects.87) goto <D.5341>; else goto <D.5343>;
  <D.5343>:
}


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

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


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

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


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.5806;
  long unsigned int D.5807;
  long unsigned int D.5810;
  long unsigned int D.5811;
  GC_bool D.5814;
  int GC_print_stats.89;
  long int bytes.90;
  long unsigned int D.5823;
  long unsigned int D.5824;
  long int D.5825;
  long unsigned int D.5826;
  long unsigned int D.5827;
  char * D.5832;
  signed int space.91;
  sizetype D.5836;
  char * D.5837;
  void * GC_greatest_plausible_heap_addr.92;
  char * GC_greatest_plausible_heap_addr.93;
  sizetype D.5840;
  char * D.5841;
  void * GC_least_plausible_heap_addr.94;
  char * GC_least_plausible_heap_addr.95;
  long unsigned int D.5844;
  long unsigned int GC_collect_at_heapsize.96;
  void (*<T2c5>) (size_t) GC_on_heap_resize.97;
  word bytes;
  struct hblk * space;
  word expansion_slop;

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

    GC_page_size.88 = GC_page_size;
    mask = GC_page_size.88 + 4294967295;
    bytes = bytes + mask;
    D.5806 = ~mask;
    bytes = D.5806 & bytes;
  }
  D.5807 = GC_arrays._max_heapsize;
  if (D.5807 != 0) goto <D.5808>; else goto <D.5809>;
  <D.5808>:
  D.5810 = GC_arrays._heapsize;
  D.5811 = D.5810 + bytes;
  D.5807 = GC_arrays._max_heapsize;
  if (D.5811 > D.5807) goto <D.5812>; else goto <D.5813>;
  <D.5812>:
  D.5814 = 0;
  return D.5814;
  <D.5813>:
  <D.5809>:
  space = GC_unix_get_mem (bytes);
  if (space == 0B) goto <D.5815>; else goto <D.5816>;
  <D.5815>:
  GC_print_stats.89 = GC_print_stats;
  if (GC_print_stats.89 != 0) goto <D.5818>; else goto <D.5819>;
  <D.5818>:
  bytes.90 = (long int) bytes;
  GC_printf ("Failed to expand heap by %ld bytes\n", bytes.90, 0, 0, 0, 0, 0);
  <D.5819>:
  D.5814 = 0;
  return D.5814;
  <D.5816>:
  GC_print_stats.89 = GC_print_stats;
  if (GC_print_stats.89 != 0) goto <D.5821>; else goto <D.5822>;
  <D.5821>:
  D.5823 = GC_arrays._words_allocd;
  D.5824 = D.5823 << 2;
  D.5825 = (long int) D.5824;
  bytes.90 = (long int) bytes;
  GC_printf ("Increasing heap size by %lu after %lu allocated bytes\n", bytes.90, D.5825, 0, 0, 0, 0);
  <D.5822>:
  D.5826 = min_words_allocd ();
  D.5827 = D.5826 << 2;
  expansion_slop = D.5827 + 33554432;
  D.5832 = GC_arrays._last_heap_addr;
  if (D.5832 == 0B) goto <D.5833>; else goto <D.5828>;
  <D.5833>:
  space.91 = (signed int) space;
  if (space.91 >= 0) goto <D.5829>; else goto <D.5828>;
  <D.5828>:
  D.5832 = GC_arrays._last_heap_addr;
  if (D.5832 != 0B) goto <D.5835>; else goto <D.5830>;
  <D.5835>:
  D.5832 = GC_arrays._last_heap_addr;
  if (D.5832 < space) goto <D.5829>; else goto <D.5830>;
  <D.5829>:
  D.5836 = bytes + expansion_slop;
  D.5837 = space + D.5836;
  GC_greatest_plausible_heap_addr.92 = GC_greatest_plausible_heap_addr;
  GC_greatest_plausible_heap_addr.93 = GC_max (GC_greatest_plausible_heap_addr.92, D.5837);
  GC_greatest_plausible_heap_addr = GC_greatest_plausible_heap_addr.93;
  goto <D.5831>;
  <D.5830>:
  D.5840 = -expansion_slop;
  D.5841 = space + D.5840;
  GC_least_plausible_heap_addr.94 = GC_least_plausible_heap_addr;
  GC_least_plausible_heap_addr.95 = GC_min (GC_least_plausible_heap_addr.94, D.5841);
  GC_least_plausible_heap_addr = GC_least_plausible_heap_addr.95;
  <D.5831>:
  D.5832 = GC_arrays._last_heap_addr;
  GC_arrays._prev_heap_addr = D.5832;
  GC_arrays._last_heap_addr = space;
  GC_add_to_heap (space, bytes);
  D.5810 = GC_arrays._heapsize;
  D.5844 = D.5810 + expansion_slop;
  GC_collect_at_heapsize.96 = D.5844 + 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.5847>; else goto <D.5848>;
  <D.5847>:
  GC_on_heap_resize.97 = GC_on_heap_resize;
  D.5810 = GC_arrays._heapsize;
  GC_on_heap_resize.97 (D.5810);
  <D.5848>:
  D.5814 = 1;
  return D.5814;
}


GC_expand_hp (size_t bytes)
{
  int D.5850;
  int GC_is_initialized.98;
  long unsigned int D.5856;
  long unsigned int D.5859;
  long unsigned int D.5860;
  int D.5861;
  int result;

  D.5850 = pthread_mutex_trylock (&GC_allocate_ml);
  if (D.5850 != 0) goto <D.5851>; else goto <D.5852>;
  <D.5851>:
  GC_lock ();
  <D.5852>:
  GC_is_initialized.98 = GC_is_initialized;
  if (GC_is_initialized.98 == 0) goto <D.5854>; else goto <D.5855>;
  <D.5854>:
  GC_init_inner ();
  <D.5855>:
  D.5856 = bytes >> 12;
  result = GC_expand_hp_inner (D.5856);
  if (result != 0) goto <D.5857>; else goto <D.5858>;
  <D.5857>:
  D.5859 = GC_arrays._requested_heapsize;
  D.5860 = D.5859 + bytes;
  GC_arrays._requested_heapsize = D.5860;
  <D.5858>:
  pthread_mutex_unlock (&GC_allocate_ml);
  D.5861 = result;
  return D.5861;
}


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.5874;
  long unsigned int last_fo_entries.102;
  long unsigned int D.5876;
  long unsigned int GC_fo_entries.103;
  long unsigned int last_words_finalized.104;
  long unsigned int last_words_finalized.105;
  int D.5882;
  long unsigned int D.5883;
  long unsigned int GC_free_space_divisor.106;
  long unsigned int D.5885;
  long unsigned int D.5886;
  long unsigned int GC_black_list_spacing.107;
  long unsigned int D.5893;
  long unsigned int D.5896;
  int D.5902;
  int D.5904;
  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 (*<T33e>) (char *, GC_word) GC_current_warn_proc.112;
  GC_bool D.5914;
  int GC_print_stats.113;

  GC_incremental.99 = GC_incremental;
  if (GC_incremental.99 == 0) goto <D.5869>; else goto <D.5863>;
  <D.5869>:
  GC_dont_gc.100 = GC_dont_gc;
  if (GC_dont_gc.100 == 0) goto <D.5871>; else goto <D.5863>;
  <D.5871>:
  GC_dont_expand.101 = GC_dont_expand;
  if (GC_dont_expand.101 != 0) goto <D.5873>; else goto <D.5864>;
  <D.5873>:
  D.5874 = GC_arrays._words_allocd;
  if (D.5874 != 0) goto <D.5865>; else goto <D.5864>;
  <D.5864>:
  last_fo_entries.102 = last_fo_entries;
  D.5876 = last_fo_entries.102 + 500;
  GC_fo_entries.103 = GC_fo_entries;
  if (D.5876 < GC_fo_entries.103) goto <D.5878>; else goto <D.5866>;
  <D.5878>:
  last_words_finalized.104 = last_words_finalized;
  if (last_words_finalized.104 != 0) goto <D.5865>; else goto <D.5880>;
  <D.5880>:
  last_words_finalized.105 = GC_arrays._words_finalized;
  if (last_words_finalized.105 != 0) goto <D.5865>; else goto <D.5866>;
  <D.5866>:
  D.5882 = GC_should_collect ();
  if (D.5882 != 0) goto <D.5865>; else goto <D.5863>;
  <D.5865>:
  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.5867>;
  <D.5863>:
  {
    word blocks_to_get;

    D.5883 = GC_arrays._heapsize;
    GC_free_space_divisor.106 = GC_free_space_divisor;
    D.5885 = GC_free_space_divisor.106 * 4096;
    D.5886 = D.5883 / D.5885;
    blocks_to_get = D.5886 + needed_blocks;
    if (blocks_to_get > 2048) goto <D.5887>; else goto <D.5888>;
    <D.5887>:
    {
      word slop;

      if (ignore_off_page != 0) goto <D.5889>; else goto <D.5890>;
      <D.5889>:
      slop = 4;
      goto <D.5891>;
      <D.5890>:
      GC_black_list_spacing.107 = GC_black_list_spacing;
      D.5893 = GC_black_list_spacing.107 >> 12;
      slop = D.5893 * 2;
      if (slop > needed_blocks) goto <D.5894>; else goto <D.5895>;
      <D.5894>:
      slop = needed_blocks;
      <D.5895>:
      <D.5891>:
      D.5896 = needed_blocks + slop;
      if (D.5896 > 2048) goto <D.5897>; else goto <D.5898>;
      <D.5897>:
      blocks_to_get = needed_blocks + slop;
      goto <D.5899>;
      <D.5898>:
      blocks_to_get = 2048;
      <D.5899>:
    }
    <D.5888>:
    D.5902 = GC_expand_hp_inner (blocks_to_get);
    if (D.5902 == 0) goto <D.5903>; else goto <D.5900>;
    <D.5903>:
    D.5904 = GC_expand_hp_inner (needed_blocks);
    if (D.5904 == 0) goto <D.5905>; else goto <D.5900>;
    <D.5905>:
    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.5910>; else goto <D.5911>;
    <D.5910>:
    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.5913>;
    <D.5911>:
    GC_current_warn_proc.112 = GC_current_warn_proc;
    GC_current_warn_proc.112 ("GC Warning: Out of Memory!  Returning NIL!\n", 0);
    D.5914 = 0;
    return D.5914;
    <D.5913>:
    goto <D.5901>;
    <D.5900>:
    GC_fail_count.108 = GC_fail_count;
    if (GC_fail_count.108 != 0) goto <D.5915>; else goto <D.5916>;
    <D.5915>:
    GC_print_stats.113 = GC_print_stats;
    if (GC_print_stats.113 != 0) goto <D.5918>; else goto <D.5919>;
    <D.5918>:
    GC_printf ("Memory available again ...\n", 0, 0, 0, 0, 0, 0);
    <D.5919>:
    <D.5916>:
    <D.5901>:
  }
  <D.5867>:
  D.5914 = 1;
  return D.5914;
}


GC_allocobj (word sz, int kind)
{
  char * * D.5921;
  long unsigned int D.5922;
  char * D.5925;
  int GC_incremental.114;
  long unsigned int GC_time_limit.115;
  char * D.5932;
  int D.5942;
  char * * flh;
  GC_bool tried_minor;

  D.5921 = GC_obj_kinds[kind].ok_freelist;
  D.5922 = sz * 4;
  flh = D.5921 + D.5922;
  tried_minor = 0;
  if (sz == 0) goto <D.5923>; else goto <D.5924>;
  <D.5923>:
  D.5925 = 0B;
  return D.5925;
  <D.5924>:
  goto <D.5385>;
  <D.5384>:
  GC_collecting = 1;
  GC_incremental.114 = GC_incremental;
  if (GC_incremental.114 != 0) goto <D.5927>; else goto <D.5928>;
  <D.5927>:
  GC_time_limit.115 = GC_time_limit;
  if (GC_time_limit.115 != 999999) goto <D.5930>; else goto <D.5931>;
  <D.5930>:
  GC_collect_a_little_inner (1);
  <D.5931>:
  <D.5928>:
  GC_continue_reclaim (sz, kind);
  GC_collecting = 0;
  D.5932 = *flh;
  if (D.5932 == 0B) goto <D.5933>; else goto <D.5934>;
  <D.5933>:
  GC_new_hblk (sz, kind);
  <D.5934>:
  D.5932 = *flh;
  if (D.5932 == 0B) goto <D.5935>; else goto <D.5936>;
  <D.5935>:
  GC_collecting = 1;
  GC_incremental.114 = GC_incremental;
  if (GC_incremental.114 != 0) goto <D.5939>; else goto <D.5937>;
  <D.5939>:
  GC_time_limit.115 = GC_time_limit;
  if (GC_time_limit.115 == 999999) goto <D.5940>; else goto <D.5937>;
  <D.5940>:
  if (tried_minor == 0) goto <D.5941>; else goto <D.5937>;
  <D.5941>:
  GC_collect_a_little_inner (1);
  tried_minor = 1;
  goto <D.5938>;
  <D.5937>:
  D.5942 = GC_collect_or_expand (1, 0);
  if (D.5942 == 0) goto <D.5943>; else goto <D.5944>;
  <D.5943>:
  GC_collecting = 0;
  D.5925 = 0B;
  return D.5925;
  <D.5944>:
  <D.5938>:
  GC_collecting = 0;
  <D.5936>:
  <D.5385>:
  D.5932 = *flh;
  if (D.5932 == 0B) goto <D.5384>; else goto <D.5386>;
  <D.5386>:
  GC_fail_count = 0;
  D.5925 = *flh;
  return D.5925;
}


