GC_never_stop_func ()
{
  GC_bool D.5321;

  D.5321 = 0;
  return D.5321;
}


GC_timeout_stop_func ()
{
  unsigned int count.0;
  unsigned int count.1;
  unsigned int count.2;
  unsigned int D.5326;
  int D.5329;
  long int GC_start_time.3;
  long int D.5331;
  double D.5332;
  double D.5333;
  double D.5334;
  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.5326 = count.1 & 3;
  if (D.5326 != 0) goto <D.5327>; else goto <D.5328>;
  <D.5327>:
  D.5329 = 0;
  return D.5329;
  <D.5328>:
  current_time = clock ();
  GC_start_time.3 = GC_start_time;
  D.5331 = current_time - GC_start_time.3;
  D.5332 = (double) D.5331;
  D.5333 = D.5332 * 1.0e+3;
  D.5334 = D.5333 / 1.0e+6;
  time_diff = (long unsigned int) D.5334;
  GC_time_limit.4 = GC_time_limit;
  if (time_diff >= GC_time_limit.4) goto <D.5336>; else goto <D.5337>;
  <D.5336>:
  GC_print_stats.5 = GC_print_stats;
  if (GC_print_stats.5 != 0) goto <D.5339>; else goto <D.5340>;
  <D.5339>:
  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.5340>:
  D.5329 = 1;
  return D.5329;
  <D.5337>:
  D.5329 = 0;
  return D.5329;
}


GC_adj_words_allocd ()
{
  long unsigned int GC_non_gc_bytes.8;
  long int GC_non_gc_bytes.9;
  long unsigned int D.5346;
  long int D.5347;
  long int D.5348;
  long unsigned int D.5349;
  long int D.5350;
  long unsigned int D.5351;
  long int D.5352;
  long int D.5353;
  long unsigned int D.5354;
  long int D.5355;
  long int D.5356;
  long unsigned int D.5359;
  long unsigned int result.10;
  long unsigned int D.5361;
  long unsigned int D.5362;
  long unsigned int D.5363;
  long unsigned int D.5366;
  long unsigned int D.5367;
  long int D.5368;
  word D.5371;
  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.5346 = GC_arrays._non_gc_bytes_at_gc;
  D.5347 = (long int) D.5346;
  D.5348 = GC_non_gc_bytes.9 - D.5347;
  expl_managed = D.5348 >> 2;
  D.5349 = GC_arrays._words_allocd;
  D.5350 = (long int) D.5349;
  D.5351 = GC_arrays._mem_freed;
  D.5352 = (long int) D.5351;
  D.5353 = D.5350 - D.5352;
  D.5354 = GC_arrays._finalizer_mem_freed;
  D.5355 = (long int) D.5354;
  D.5356 = D.5353 + D.5355;
  result = D.5356 - expl_managed;
  D.5349 = GC_arrays._words_allocd;
  D.5350 = (long int) D.5349;
  if (D.5350 < result) goto <D.5357>; else goto <D.5358>;
  <D.5357>:
  D.5349 = GC_arrays._words_allocd;
  result = (signed_word) D.5349;
  <D.5358>:
  D.5359 = GC_arrays._words_finalized;
  result.10 = (long unsigned int) result;
  D.5361 = D.5359 + result.10;
  result = (signed_word) D.5361;
  D.5362 = GC_arrays._words_wasted;
  D.5363 = D.5362 >> 3;
  result.10 = (long unsigned int) result;
  if (D.5363 < result.10) goto <D.5364>; else goto <D.5365>;
  <D.5364>:
  D.5362 = GC_arrays._words_wasted;
  result.10 = (long unsigned int) result;
  D.5366 = D.5362 + result.10;
  result = (signed_word) D.5366;
  <D.5365>:
  D.5349 = GC_arrays._words_allocd;
  D.5367 = D.5349 >> 3;
  D.5368 = (long int) D.5367;
  if (D.5368 > result) goto <D.5369>; else goto <D.5370>;
  <D.5369>:
  D.5349 = GC_arrays._words_allocd;
  D.5371 = D.5349 >> 3;
  return D.5371;
  <D.5370>:
  D.5371 = (word) result;
  return D.5371;
}


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

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


GC_should_collect ()
{
  GC_bool D.5373;
  int iftmp.11;
  long unsigned int D.5378;
  long unsigned int D.5379;
  long unsigned int D.5381;
  long unsigned int GC_collect_at_heapsize.12;

  D.5378 = GC_adj_words_allocd ();
  D.5379 = min_words_allocd ();
  if (D.5378 >= D.5379) goto <D.5375>; else goto <D.5380>;
  <D.5380>:
  D.5381 = GC_arrays._heapsize;
  GC_collect_at_heapsize.12 = GC_collect_at_heapsize;
  if (D.5381 >= GC_collect_at_heapsize.12) goto <D.5375>; else goto <D.5376>;
  <D.5375>:
  iftmp.11 = 1;
  goto <D.5377>;
  <D.5376>:
  iftmp.11 = 0;
  <D.5377>:
  D.5373 = iftmp.11;
  return D.5373;
}


min_words_allocd ()
{
  long int D.5386;
  long unsigned int D.5387;
  long unsigned int GC_root_size.13;
  long unsigned int D.5389;
  long unsigned int D.5390;
  long unsigned int D.5391;
  long unsigned int D.5392;
  long unsigned int D.5393;
  long unsigned int D.5394;
  int GC_incremental.14;
  long unsigned int GC_time_limit.15;
  word D.5400;
  long unsigned int GC_free_space_divisor.16;
  long unsigned int D.5402;
  register signed_word stack_size;
  word total_root_size;
  word scan_size;

  stack_size = 10000;
  if (stack_size < 0) goto <D.5384>; else goto <D.5385>;
  <D.5384>:
  stack_size = -stack_size;
  <D.5385>:
  D.5386 = stack_size * 2;
  D.5387 = (long unsigned int) D.5386;
  GC_root_size.13 = GC_root_size;
  total_root_size = D.5387 + GC_root_size.13;
  D.5389 = GC_arrays._heapsize;
  D.5390 = GC_arrays._large_free_bytes;
  D.5391 = D.5389 - D.5390;
  D.5390 = GC_arrays._large_free_bytes;
  D.5392 = D.5390 >> 2;
  D.5393 = D.5391 + D.5392;
  D.5394 = D.5393 + total_root_size;
  scan_size = D.5394 >> 2;
  GC_incremental.14 = GC_incremental;
  if (GC_incremental.14 != 0) goto <D.5397>; else goto <D.5395>;
  <D.5397>:
  GC_time_limit.15 = GC_time_limit;
  if (GC_time_limit.15 != 999999) goto <D.5399>; else goto <D.5395>;
  <D.5399>:
  GC_free_space_divisor.16 = GC_free_space_divisor;
  D.5402 = GC_free_space_divisor.16 * 2;
  D.5400 = scan_size / D.5402;
  return D.5400;
  <D.5395>:
  GC_free_space_divisor.16 = GC_free_space_divisor;
  D.5400 = scan_size / GC_free_space_divisor.16;
  return D.5400;
}


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

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


GC_maybe_gc ()
{
  int D.5407;
  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.5425;
  long unsigned int D.5426;
  long unsigned int D.5427;
  long int D.5428;
  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.5438;
  int GC_is_full_gc.29;
  int GC_n_attempts.30;
  int GC_n_attempts.31;
  static int n_partial_gcs = 0;

  D.5407 = GC_should_collect ();
  if (D.5407 != 0) goto <D.5408>; else goto <D.5409>;
  <D.5408>:
  GC_incremental.18 = GC_incremental;
  if (GC_incremental.18 == 0) goto <D.5411>; else goto <D.5412>;
  <D.5411>:
  GC_try_to_collect_inner (GC_never_stop_func);
  n_partial_gcs = 0;
  return;
  <D.5412>:
  GC_need_full_gc.19 = GC_need_full_gc;
  if (GC_need_full_gc.19 != 0) goto <D.5413>; else goto <D.5417>;
  <D.5417>:
  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.5413>; else goto <D.5414>;
  <D.5413>:
  GC_print_stats.22 = GC_print_stats;
  if (GC_print_stats.22 != 0) goto <D.5421>; else goto <D.5422>;
  <D.5421>:
  GC_gc_no.23 = GC_gc_no;
  GC_gc_no.24 = (long int) GC_gc_no.23;
  D.5425 = GC_gc_no.24 + 1;
  D.5426 = GC_arrays._words_allocd;
  D.5427 = D.5426 << 2;
  D.5428 = (long int) D.5427;
  GC_printf ("***>Full mark for collection %lu after %ld allocd bytes\n", D.5425, D.5428, 0, 0, 0, 0);
  <D.5422>:
  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.5415>;
  <D.5414>:
  n_partial_gcs.20 = n_partial_gcs;
  n_partial_gcs.25 = n_partial_gcs.20 + 1;
  n_partial_gcs = n_partial_gcs.25;
  <D.5415>:
  GC_time_limit.26 = GC_time_limit;
  if (GC_time_limit.26 != 999999) goto <D.5431>; else goto <D.5432>;
  <D.5431>:
  GC_start_time.27 = clock ();
  GC_start_time = GC_start_time.27;
  <D.5432>:
  GC_time_limit.26 = GC_time_limit;
  if (GC_time_limit.26 == 999999) goto <D.5435>; else goto <D.5436>;
  <D.5435>:
  iftmp.28 = GC_never_stop_func;
  goto <D.5437>;
  <D.5436>:
  iftmp.28 = GC_timeout_stop_func;
  <D.5437>:
  D.5438 = GC_stopped_mark (iftmp.28);
  if (D.5438 != 0) goto <D.5439>; else goto <D.5440>;
  <D.5439>:
  GC_finish_collection ();
  goto <D.5441>;
  <D.5440>:
  GC_is_full_gc.29 = GC_is_full_gc;
  if (GC_is_full_gc.29 == 0) goto <D.5443>; else goto <D.5444>;
  <D.5443>:
  GC_n_attempts.30 = GC_n_attempts;
  GC_n_attempts.31 = GC_n_attempts.30 + 1;
  GC_n_attempts = GC_n_attempts.31;
  <D.5444>:
  <D.5441>:
  <D.5409>:
}


GC_try_to_collect_inner (int (*GC_stop_func) (void) stop_func)
{
  int GC_dont_gc.32;
  GC_bool D.5451;
  void (*<T2b1>) (GCEventType) GC_notify_event.33;
  int GC_incremental.34;
  int D.5458;
  int GC_print_stats.35;
  int D.5464;
  int D.5467;
  long unsigned int GC_gc_no.36;
  long int GC_gc_no.37;
  long int D.5476;
  long unsigned int D.5477;
  long unsigned int D.5478;
  long int D.5479;
  int GC_find_leak.38;
  int D.5484;
  int D.5487;
  long int D.5494;
  double D.5495;
  double D.5496;
  double D.5497;
  long unsigned int D.5498;
  long int D.5499;
  clock_t start_time;
  clock_t current_time;

  GC_dont_gc.32 = GC_dont_gc;
  if (GC_dont_gc.32 != 0) goto <D.5449>; else goto <D.5450>;
  <D.5449>:
  D.5451 = 0;
  return D.5451;
  <D.5450>:
  GC_notify_event.33 = GC_notify_event;
  if (GC_notify_event.33 != 0B) goto <D.5453>; else goto <D.5454>;
  <D.5453>:
  GC_notify_event.33 = GC_notify_event;
  GC_notify_event.33 (0);
  <D.5454>:
  GC_incremental.34 = GC_incremental;
  if (GC_incremental.34 != 0) goto <D.5456>; else goto <D.5457>;
  <D.5456>:
  D.5458 = GC_collection_in_progress ();
  if (D.5458 != 0) goto <D.5459>; else goto <D.5460>;
  <D.5459>:
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.5462>; else goto <D.5463>;
  <D.5462>:
  GC_printf ("GC_try_to_collect_inner: finishing collection in progress\n", 0, 0, 0, 0, 0, 0);
  <D.5463>:
  goto <D.5181>;
  <D.5180>:
  D.5464 = stop_func ();
  if (D.5464 != 0) goto <D.5465>; else goto <D.5466>;
  <D.5465>:
  D.5451 = 0;
  return D.5451;
  <D.5466>:
  GC_collect_a_little_inner (1);
  <D.5181>:
  D.5467 = GC_collection_in_progress ();
  if (D.5467 != 0) goto <D.5180>; else goto <D.5182>;
  <D.5182>:
  <D.5460>:
  <D.5457>:
  if (stop_func == GC_never_stop_func) goto <D.5468>; else goto <D.5469>;
  <D.5468>:
  GC_notify_full_gc ();
  <D.5469>:
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.5470>; else goto <D.5471>;
  <D.5470>:
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.5472>; else goto <D.5473>;
  <D.5472>:
  start_time = clock ();
  <D.5473>:
  GC_gc_no.36 = GC_gc_no;
  GC_gc_no.37 = (long int) GC_gc_no.36;
  D.5476 = GC_gc_no.37 + 1;
  D.5477 = GC_arrays._words_allocd;
  D.5478 = D.5477 << 2;
  D.5479 = (long int) D.5478;
  GC_printf ("Initiating full world-stop collection %lu after %ld allocd bytes\n", D.5476, D.5479, 0, 0, 0, 0);
  <D.5471>:
  GC_promote_black_lists ();
  GC_find_leak.38 = GC_find_leak;
  if (GC_find_leak.38 != 0) goto <D.5480>; else goto <D.5483>;
  <D.5483>:
  if (stop_func != GC_never_stop_func) goto <D.5480>; else goto <D.5481>;
  <D.5480>:
  D.5484 = GC_reclaim_all (stop_func, 0);
  if (D.5484 == 0) goto <D.5485>; else goto <D.5486>;
  <D.5485>:
  D.5451 = 0;
  return D.5451;
  <D.5486>:
  <D.5481>:
  GC_invalidate_mark_state ();
  GC_clear_marks ();
  GC_is_full_gc = 1;
  D.5487 = GC_stopped_mark (stop_func);
  if (D.5487 == 0) goto <D.5488>; else goto <D.5489>;
  <D.5488>:
  GC_incremental.34 = GC_incremental;
  if (GC_incremental.34 == 0) goto <D.5490>; else goto <D.5491>;
  <D.5490>:
  GC_invalidate_mark_state ();
  GC_unpromote_black_lists ();
  <D.5491>:
  D.5451 = 0;
  return D.5451;
  <D.5489>:
  GC_finish_collection ();
  GC_print_stats.35 = GC_print_stats;
  if (GC_print_stats.35 != 0) goto <D.5492>; else goto <D.5493>;
  <D.5492>:
  current_time = clock ();
  D.5494 = current_time - start_time;
  D.5495 = (double) D.5494;
  D.5496 = D.5495 * 1.0e+3;
  D.5497 = D.5496 / 1.0e+6;
  D.5498 = (long unsigned int) D.5497;
  D.5499 = (long int) D.5498;
  GC_printf ("Complete collection took %lu msecs\n", D.5499, 0, 0, 0, 0, 0);
  <D.5493>:
  GC_notify_event.33 = GC_notify_event;
  if (GC_notify_event.33 != 0B) goto <D.5500>; else goto <D.5501>;
  <D.5500>:
  GC_notify_event.33 = GC_notify_event;
  GC_notify_event.33 (5);
  <D.5501>:
  D.5451 = 1;
  return D.5451;
}


GC_collect_a_little_inner (int n)
{
  int GC_dont_gc.39;
  int GC_incremental.40;
  int D.5510;
  int D.5512;
  int GC_n_attempts.41;
  long unsigned int GC_time_limit.42;
  long int GC_start_time.43;
  int D.5522;
  int GC_n_attempts.44;
  int D.5526;
  int GC_deficit.45;
  int D.5530;
  int GC_deficit.46;
  register int i;

  GC_dont_gc.39 = GC_dont_gc;
  if (GC_dont_gc.39 != 0) goto <D.5504>; else goto <D.5505>;
  <D.5504>:
  return;
  <D.5505>:
  GC_incremental.40 = GC_incremental;
  if (GC_incremental.40 != 0) goto <D.5509>; else goto <D.5506>;
  <D.5509>:
  D.5510 = GC_collection_in_progress ();
  if (D.5510 != 0) goto <D.5511>; else goto <D.5506>;
  <D.5511>:
  i = GC_deficit;
  goto <D.5190>;
  <D.5189>:
  D.5512 = GC_mark_some (0B);
  if (D.5512 != 0) goto <D.5513>; else goto <D.5514>;
  <D.5513>:
  GC_n_attempts.41 = GC_n_attempts;
  if (GC_n_attempts.41 <= 0) goto <D.5518>; else goto <D.5515>;
  <D.5518>:
  GC_time_limit.42 = GC_time_limit;
  if (GC_time_limit.42 != 999999) goto <D.5520>; else goto <D.5515>;
  <D.5520>:
  GC_start_time.43 = clock ();
  GC_start_time = GC_start_time.43;
  D.5522 = GC_stopped_mark (GC_timeout_stop_func);
  if (D.5522 == 0) goto <D.5523>; else goto <D.5524>;
  <D.5523>:
  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.5188>;
  <D.5524>:
  goto <D.5516>;
  <D.5515>:
  GC_stopped_mark (GC_never_stop_func);
  <D.5516>:
  GC_finish_collection ();
  goto <D.5188>;
  <D.5514>:
  i = i + 1;
  <D.5190>:
  D.5526 = n * 10;
  if (D.5526 > i) goto <D.5189>; else goto <D.5188>;
  <D.5188>:
  GC_deficit.45 = GC_deficit;
  if (GC_deficit.45 > 0) goto <D.5528>; else goto <D.5529>;
  <D.5528>:
  D.5530 = n * -10;
  GC_deficit.45 = GC_deficit;
  GC_deficit.46 = D.5530 + GC_deficit.45;
  GC_deficit = GC_deficit.46;
  <D.5529>:
  GC_deficit.45 = GC_deficit;
  if (GC_deficit.45 < 0) goto <D.5532>; else goto <D.5533>;
  <D.5532>:
  GC_deficit = 0;
  <D.5533>:
  goto <D.5507>;
  <D.5506>:
  GC_maybe_gc ();
  <D.5507>:
}


GC_collect_a_little ()
{
  int D.5535;
  int GC_debugging_started.47;
  void (*<T2b8>) (void) GC_print_all_smashed.48;
  int D.5544;
  int result;

  D.5535 = _test_and_set (&GC_allocate_lock, 1);
  if (D.5535 != 0) goto <D.5536>; else goto <D.5537>;
  <D.5536>:
  GC_lock ();
  <D.5537>:
  GC_collect_a_little_inner (1);
  result = GC_collection_in_progress ();
  GC_clear (&GC_allocate_lock);
  if (result == 0) goto <D.5538>; else goto <D.5539>;
  <D.5538>:
  GC_debugging_started.47 = GC_debugging_started;
  if (GC_debugging_started.47 != 0) goto <D.5541>; else goto <D.5542>;
  <D.5541>:
  GC_print_all_smashed.48 = GC_print_all_smashed;
  GC_print_all_smashed.48 ();
  <D.5542>:
  <D.5539>:
  D.5544 = result;
  return D.5544;
}


_test_and_set (int * __p, int __v)
{
  int D.5546;
  int __r;
  int __t;

  __asm__ __volatile__("/* Inline test and set */
.set	push
	.set	mips2
	sync
	1:
	ll	%0,%3
	move	%1,%4
	beq	%0,%4,2f
	sc	%1,%2
	beqz	%1,1b
sync
	.set	pop
	2:
	/* End test and set */" : "=&r" __r, "=&r" __t, "=m" *__p : "m" *__p, "r" __v : "memory");
  D.5546 = __r;
  return D.5546;
}


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


GC_stopped_mark (int (*GC_stop_func) (void) stop_func)
{
  int GC_print_stats.49;
  void (*<T2b1>) (GCEventType) GC_notify_event.50;
  long unsigned int GC_gc_no.51;
  long int GC_gc_no.52;
  long int D.5558;
  long unsigned int D.5559;
  long unsigned int D.5560;
  long int D.5561;
  long unsigned int D.5562;
  long unsigned int D.5563;
  long int D.5564;
  int D.5565;
  GC_bool D.5570;
  int D.5571;
  long unsigned int GC_gc_no.53;
  long int D.5576;
  long unsigned int D.5579;
  long int D.5580;
  int GC_debugging_started.54;
  void (*<T2b8>) (void) GC_check_heap.55;
  long int D.5589;
  double D.5590;
  double D.5591;
  double D.5592;
  long unsigned int D.5593;
  long int D.5594;
  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.5549>; else goto <D.5550>;
      <D.5549>:
      start_time = clock ();
      <D.5550>:
      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.5552>; else goto <D.5553>;
      <D.5552>:
      GC_notify_event.50 = GC_notify_event;
      GC_notify_event.50 (1);
      <D.5553>:
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.5554>; else goto <D.5555>;
      <D.5554>:
      GC_gc_no.51 = GC_gc_no;
      GC_gc_no.52 = (long int) GC_gc_no.51;
      D.5558 = GC_gc_no.52 + 1;
      GC_printf ("--> Marking for collection %lu ", D.5558, 0, 0, 0, 0, 0);
      D.5559 = GC_arrays._words_allocd;
      D.5560 = D.5559 << 2;
      D.5561 = (long int) D.5560;
      D.5562 = GC_arrays._words_wasted;
      D.5563 = D.5562 << 2;
      D.5564 = (long int) D.5563;
      GC_printf ("after %lu allocd bytes + %lu wasted bytes\n", D.5561, D.5564, 0, 0, 0, 0);
      <D.5555>:
      GC_clear_a_few_frames ();
      GC_noop (0B, 0, 0, 0, 0, 0);
      GC_initiate_gc ();
      i = 0;
      <D.5203>:
      D.5565 = stop_func ();
      if (D.5565 != 0) goto <D.5566>; else goto <D.5567>;
      <D.5566>:
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.5568>; else goto <D.5569>;
      <D.5568>:
      GC_printf ("Abandoned stopped marking after ", 0, 0, 0, 0, 0, 0);
      GC_printf ("%lu iterations\n", i, 0, 0, 0, 0, 0);
      <D.5569>:
      GC_deficit = i;
      GC_world_stopped = 0;
      GC_start_world ();
      D.5570 = 0;
      return D.5570;
      <D.5567>:
      D.5571 = GC_mark_some (&dummy);
      if (D.5571 != 0) goto <D.5202>; else goto <D.5572>;
      <D.5572>:
      i = i + 1;
      goto <D.5203>;
      <D.5202>:
      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.5574>; else goto <D.5575>;
      <D.5574>:
      GC_gc_no.51 = GC_gc_no;
      GC_gc_no.52 = (long int) GC_gc_no.51;
      D.5576 = GC_gc_no.52 + -1;
      GC_printf ("Collection %lu finished", D.5576, 0, 0, 0, 0, 0);
      <D.5575>:
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.5577>; else goto <D.5578>;
      <D.5577>:
      D.5579 = GC_arrays._heapsize;
      D.5580 = (long int) D.5579;
      GC_printf (" ---> heapsize = %lu bytes\n", D.5580, 0, 0, 0, 0, 0);
      GC_printf ("", 0, 0, 0, 0, 0, 0);
      <D.5578>:
      GC_debugging_started.54 = GC_debugging_started;
      if (GC_debugging_started.54 != 0) goto <D.5582>; else goto <D.5583>;
      <D.5582>:
      GC_check_heap.55 = GC_check_heap;
      GC_check_heap.55 ();
      <D.5583>:
      GC_notify_event.50 = GC_notify_event;
      if (GC_notify_event.50 != 0B) goto <D.5585>; else goto <D.5586>;
      <D.5585>:
      GC_notify_event.50 = GC_notify_event;
      GC_notify_event.50 (2);
      <D.5586>:
      GC_world_stopped = 0;
      GC_start_world ();
      GC_print_stats.49 = GC_print_stats;
      if (GC_print_stats.49 != 0) goto <D.5587>; else goto <D.5588>;
      <D.5587>:
      current_time = clock ();
      D.5589 = current_time - start_time;
      D.5590 = (double) D.5589;
      D.5591 = D.5590 * 1.0e+3;
      D.5592 = D.5591 / 1.0e+6;
      D.5593 = (long unsigned int) D.5592;
      D.5594 = (long int) D.5593;
      GC_printf ("World-stopped marking took %lu msecs\n", D.5594, 0, 0, 0, 0, 0);
      <D.5588>:
      D.5570 = 1;
      return D.5570;
    }
  finally
    {
      dummy = {CLOBBER};
    }
}


GC_set_fl_marks (char * q)
{
  long unsigned int p.56;
  long unsigned int D.5598;
  long unsigned int h.57;
  long unsigned int D.5602;
  struct bottom_index * D.5603;
  long unsigned int D.5604;
  long unsigned int D.5605;
  int p.58;
  int h.59;
  int D.5608;
  int D.5609;
  sizetype D.5610;
  long unsigned int D.5611;
  int D.5612;
  long unsigned int D.5613;
  long unsigned int D.5614;
  char * p;
  struct hblk * h;
  struct hblk * last_h;
  struct hdr * hhdr;
  int word_no;

  last_h = 0B;
  p = q;
  goto <D.5214>;
  <D.5213>:
  p.56 = (long unsigned int) p;
  D.5598 = p.56 & 4294963200;
  h = (struct hblk *) D.5598;
  if (h != last_h) goto <D.5599>; else goto <D.5600>;
  <D.5599>:
  last_h = h;
  h.57 = (long unsigned int) h;
  D.5602 = h.57 >> 22;
  D.5603 = GC_arrays._top_index[D.5602];
  h.57 = (long unsigned int) h;
  D.5604 = h.57 >> 12;
  D.5605 = D.5604 & 1023;
  hhdr = D.5603->index[D.5605];
  <D.5600>:
  p.58 = (int) p;
  h.59 = (int) h;
  D.5608 = p.58 - h.59;
  word_no = D.5608 /[ex] 4;
  D.5609 = word_no >> 5;
  D.5610 = (sizetype) D.5609;
  D.5609 = word_no >> 5;
  D.5610 = (sizetype) D.5609;
  D.5611 = hhdr->hb_marks[D.5610];
  D.5612 = word_no & 31;
  D.5613 = 1 << D.5612;
  D.5614 = D.5611 | D.5613;
  hhdr->hb_marks[D.5610] = D.5614;
  p = MEM[(char * *)p];
  <D.5214>:
  if (p != 0B) goto <D.5213>; else goto <D.5215>;
  <D.5215>:
}


GC_clear_fl_marks (char * q)
{
  long unsigned int p.60;
  long unsigned int D.5616;
  long unsigned int h.61;
  long unsigned int D.5620;
  struct bottom_index * D.5621;
  long unsigned int D.5622;
  long unsigned int D.5623;
  int p.62;
  int h.63;
  int D.5626;
  int D.5627;
  long unsigned int D.5628;
  int D.5629;
  long unsigned int D.5630;
  long unsigned int D.5631;
  long unsigned int D.5632;
  char * p;
  struct hblk * h;
  struct hblk * last_h;
  struct hdr * hhdr;
  int word_no;

  last_h = 0B;
  p = q;
  goto <D.5225>;
  <D.5224>:
  p.60 = (long unsigned int) p;
  D.5616 = p.60 & 4294963200;
  h = (struct hblk *) D.5616;
  if (h != last_h) goto <D.5617>; else goto <D.5618>;
  <D.5617>:
  last_h = h;
  h.61 = (long unsigned int) h;
  D.5620 = h.61 >> 22;
  D.5621 = GC_arrays._top_index[D.5620];
  h.61 = (long unsigned int) h;
  D.5622 = h.61 >> 12;
  D.5623 = D.5622 & 1023;
  hhdr = D.5621->index[D.5623];
  <D.5618>:
  p.62 = (int) p;
  h.63 = (int) h;
  D.5626 = p.62 - h.63;
  word_no = D.5626 /[ex] 4;
  D.5627 = word_no >> 5;
  D.5627 = word_no >> 5;
  D.5628 = hhdr->hb_marks[D.5627];
  D.5629 = word_no & 31;
  D.5630 = 1 << D.5629;
  D.5631 = ~D.5630;
  D.5632 = D.5628 & D.5631;
  hhdr->hb_marks[D.5627] = D.5632;
  p = MEM[(char * *)p];
  <D.5225>:
  if (p != 0B) goto <D.5224>; else goto <D.5226>;
  <D.5226>:
}


GC_finish_collection ()
{
  void (*<T2b1>) (GCEventType) GC_notify_event.64;
  char * D.5636;
  int GC_dump_regularly.65;
  int GC_find_leak.66;
  char * * D.5645;
  long unsigned int D.5646;
  char * * D.5647;
  int GC_n_kinds.67;
  int GC_print_back_height.68;
  char * * D.5654;
  long unsigned int D.5655;
  char * * D.5656;
  int GC_is_full_gc.69;
  long unsigned int D.5662;
  long unsigned int D.5663;
  long unsigned int GC_used_heap_size_after_full.70;
  long unsigned int GC_used_heap_size_after_full.71;
  long unsigned int D.5667;
  long unsigned int D.5668;
  long unsigned int D.5669;
  _Bool D.5670;
  int GC_need_full_gc.72;
  long unsigned int D.5672;
  long unsigned int D.5673;
  long unsigned int D.5674;
  long unsigned int GC_non_gc_bytes.73;

  GC_notify_event.64 = GC_notify_event;
  if (GC_notify_event.64 != 0B) goto <D.5634>; else goto <D.5635>;
  <D.5634>:
  GC_notify_event.64 = GC_notify_event;
  GC_notify_event.64 (3);
  <D.5635>:
  D.5636 = getenv ("GC_PRINT_ADDRESS_MAP");
  if (D.5636 != 0B) goto <D.5637>; else goto <D.5638>;
  <D.5637>:
  GC_print_address_map ();
  <D.5638>:
  GC_dump_regularly.65 = GC_dump_regularly;
  if (GC_dump_regularly.65 != 0) goto <D.5640>; else goto <D.5641>;
  <D.5640>:
  GC_dump ();
  <D.5641>:
  GC_find_leak.66 = GC_find_leak;
  if (GC_find_leak.66 != 0) goto <D.5643>; else goto <D.5644>;
  <D.5643>:
  {
    register word size;
    int kind;
    char * q;

    kind = 0;
    goto <D.5240>;
    <D.5239>:
    size = 1;
    goto <D.5237>;
    <D.5236>:
    D.5645 = GC_obj_kinds[kind].ok_freelist;
    D.5646 = size * 4;
    D.5647 = D.5645 + D.5646;
    q = *D.5647;
    if (q != 0B) goto <D.5648>; else goto <D.5649>;
    <D.5648>:
    GC_set_fl_marks (q);
    <D.5649>:
    size = size + 1;
    <D.5237>:
    if (size <= 512) goto <D.5236>; else goto <D.5238>;
    <D.5238>:
    kind = kind + 1;
    <D.5240>:
    GC_n_kinds.67 = GC_n_kinds;
    if (kind < GC_n_kinds.67) goto <D.5239>; else goto <D.5241>;
    <D.5241>:
  }
  GC_start_reclaim (1);
  <D.5644>:
  GC_finalize ();
  GC_print_back_height.68 = GC_print_back_height;
  if (GC_print_back_height.68 != 0) goto <D.5652>; else goto <D.5653>;
  <D.5652>:
  GC_err_puts ("Back height not available: Rebuild collector with -DMAKE_BACK_GRAPH\n");
  <D.5653>:
  {
    register word size;
    register char * q;
    int kind;

    kind = 0;
    goto <D.5249>;
    <D.5248>:
    size = 1;
    goto <D.5246>;
    <D.5245>:
    D.5654 = GC_obj_kinds[kind].ok_freelist;
    D.5655 = size * 4;
    D.5656 = D.5654 + D.5655;
    q = *D.5656;
    if (q != 0B) goto <D.5657>; else goto <D.5658>;
    <D.5657>:
    GC_clear_fl_marks (q);
    <D.5658>:
    size = size + 1;
    <D.5246>:
    if (size <= 512) goto <D.5245>; else goto <D.5247>;
    <D.5247>:
    kind = kind + 1;
    <D.5249>:
    GC_n_kinds.67 = GC_n_kinds;
    if (kind < GC_n_kinds.67) goto <D.5248>; else goto <D.5250>;
    <D.5250>:
  }
  GC_start_reclaim (0);
  GC_is_full_gc.69 = GC_is_full_gc;
  if (GC_is_full_gc.69 != 0) goto <D.5660>; else goto <D.5661>;
  <D.5660>:
  D.5662 = GC_arrays._heapsize;
  D.5663 = GC_arrays._large_free_bytes;
  GC_used_heap_size_after_full.70 = D.5662 - D.5663;
  GC_used_heap_size_after_full = GC_used_heap_size_after_full.70;
  GC_need_full_gc = 0;
  goto <D.5665>;
  <D.5661>:
  D.5662 = GC_arrays._heapsize;
  D.5663 = GC_arrays._large_free_bytes;
  GC_used_heap_size_after_full.70 = D.5662 - D.5663;
  GC_used_heap_size_after_full.71 = GC_used_heap_size_after_full;
  D.5667 = GC_used_heap_size_after_full.70 - GC_used_heap_size_after_full.71;
  D.5668 = D.5667 >> 2;
  D.5669 = min_words_allocd ();
  D.5670 = D.5668 > D.5669;
  GC_need_full_gc.72 = (int) D.5670;
  GC_need_full_gc = GC_need_full_gc.72;
  <D.5665>:
  GC_n_attempts = 0;
  GC_is_full_gc = 0;
  D.5672 = GC_arrays._words_allocd_before_gc;
  D.5673 = GC_arrays._words_allocd;
  D.5674 = D.5672 + D.5673;
  GC_arrays._words_allocd_before_gc = D.5674;
  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.5676>; else goto <D.5677>;
  <D.5676>:
  GC_notify_event.64 = GC_notify_event;
  GC_notify_event.64 (4);
  <D.5677>:
}


GC_try_to_collect (int (*GC_stop_func) (void) stop_func)
{
  int GC_debugging_started.74;
  void (*<T2b8>) (void) GC_print_all_smashed.75;
  int D.5682;
  int GC_is_initialized.76;
  int D.5692;
  int result;

  GC_debugging_started.74 = GC_debugging_started;
  if (GC_debugging_started.74 != 0) goto <D.5679>; else goto <D.5680>;
  <D.5679>:
  GC_print_all_smashed.75 = GC_print_all_smashed;
  GC_print_all_smashed.75 ();
  <D.5680>:
  GC_notify_or_invoke_finalizers ();
  D.5682 = _test_and_set (&GC_allocate_lock, 1);
  if (D.5682 != 0) goto <D.5683>; else goto <D.5684>;
  <D.5683>:
  GC_lock ();
  <D.5684>:
  GC_collecting = 1;
  GC_is_initialized.76 = GC_is_initialized;
  if (GC_is_initialized.76 == 0) goto <D.5686>; else goto <D.5687>;
  <D.5686>:
  GC_init_inner ();
  <D.5687>:
  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.5688>; else goto <D.5689>;
  <D.5688>:
  GC_debugging_started.74 = GC_debugging_started;
  if (GC_debugging_started.74 != 0) goto <D.5690>; else goto <D.5691>;
  <D.5690>:
  GC_print_all_smashed.75 = GC_print_all_smashed;
  GC_print_all_smashed.75 ();
  <D.5691>:
  GC_notify_or_invoke_finalizers ();
  <D.5689>:
  D.5692 = result;
  return D.5692;
}


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


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.5703;
  long unsigned int D.5704;
  void * GC_least_plausible_heap_addr.80;
  void * GC_least_plausible_heap_addr.81;
  char * D.5710;
  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.5698>; else goto <D.5699>;
  <D.5698>:
  GC_abort ("Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS");
  <D.5699>:
  phdr = GC_install_header (p);
  if (phdr == 0B) goto <D.5700>; else goto <D.5701>;
  <D.5700>:
  return;
  <D.5701>:
  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.5703 = GC_arrays._heapsize;
  D.5704 = D.5703 + bytes;
  GC_arrays._heapsize = D.5704;
  GC_least_plausible_heap_addr.80 = GC_least_plausible_heap_addr;
  if (p <= GC_least_plausible_heap_addr.80) goto <D.5705>; else goto <D.5708>;
  <D.5708>:
  GC_least_plausible_heap_addr.80 = GC_least_plausible_heap_addr;
  if (GC_least_plausible_heap_addr.80 == 0B) goto <D.5705>; else goto <D.5706>;
  <D.5705>:
  GC_least_plausible_heap_addr.81 = p + 4294967292;
  GC_least_plausible_heap_addr = GC_least_plausible_heap_addr.81;
  <D.5706>:
  D.5710 = p + bytes;
  GC_greatest_plausible_heap_addr.82 = GC_greatest_plausible_heap_addr;
  if (D.5710 >= GC_greatest_plausible_heap_addr.82) goto <D.5712>; else goto <D.5713>;
  <D.5712>:
  GC_greatest_plausible_heap_addr.83 = p + bytes;
  GC_greatest_plausible_heap_addr = GC_greatest_plausible_heap_addr.83;
  <D.5713>:
}


GC_print_heap_sects ()
{
  long unsigned int D.5716;
  long int D.5717;
  char * D.5718;
  long int i.84;
  long int start.85;
  long unsigned int D.5721;
  long int D.5722;
  struct hblk * D.5723;
  struct hblk * D.5726;
  long int nbl.86;
  long unsigned int D.5728;
  long int D.5729;
  long unsigned int GC_n_heap_sects.87;
  register unsigned int i;

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

    D.5718 = GC_arrays._heap_sects[i].hs_start;
    start = (long unsigned int) D.5718;
    len = GC_arrays._heap_sects[i].hs_bytes;
    nbl = 0;
    i.84 = (long int) i;
    start.85 = (long int) start;
    D.5721 = start + len;
    D.5722 = (long int) D.5721;
    GC_printf ("Section %ld from 0x%lx to 0x%lx ", i.84, start.85, D.5722, 0, 0, 0);
    h = (struct hblk *) start;
    goto <D.5272>;
    <D.5271>:
    D.5723 = GC_is_black_listed (h, 4096);
    if (D.5723 != 0B) goto <D.5724>; else goto <D.5725>;
    <D.5724>:
    nbl = nbl + 1;
    <D.5725>:
    h = h + 4096;
    <D.5272>:
    D.5721 = start + len;
    D.5726 = (struct hblk *) D.5721;
    if (D.5726 > h) goto <D.5271>; else goto <D.5273>;
    <D.5273>:
    nbl.86 = (long int) nbl;
    D.5728 = len / 4096;
    D.5729 = (long int) D.5728;
    GC_printf ("%lu/%lu blacklisted\n", nbl.86, D.5729, 0, 0, 0, 0);
  }
  i = i + 1;
  <D.5275>:
  GC_n_heap_sects.87 = GC_n_heap_sects;
  if (i < GC_n_heap_sects.87) goto <D.5274>; else goto <D.5276>;
  <D.5276>:
}


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

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


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

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


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.5738;
  long unsigned int D.5739;
  long unsigned int D.5742;
  long unsigned int D.5743;
  GC_bool D.5746;
  int GC_print_stats.89;
  long int bytes.90;
  long unsigned int D.5755;
  long unsigned int D.5756;
  long int D.5757;
  long unsigned int D.5758;
  long unsigned int D.5759;
  char * D.5764;
  signed int space.91;
  void * GC_greatest_plausible_heap_addr.92;
  sizetype D.5769;
  char * D.5770;
  char * GC_greatest_plausible_heap_addr.93;
  void * GC_least_plausible_heap_addr.94;
  sizetype D.5773;
  char * D.5774;
  char * GC_least_plausible_heap_addr.95;
  long unsigned int D.5776;
  long unsigned int GC_collect_at_heapsize.96;
  void (*<T2b5>) (size_t) GC_on_heap_resize.97;
  word bytes;
  struct hblk * space;
  word expansion_slop;

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

    GC_page_size.88 = GC_page_size;
    mask = GC_page_size.88 + 4294967295;
    bytes = bytes + mask;
    D.5738 = ~mask;
    bytes = D.5738 & bytes;
  }
  D.5739 = GC_arrays._max_heapsize;
  if (D.5739 != 0) goto <D.5740>; else goto <D.5741>;
  <D.5740>:
  D.5742 = GC_arrays._heapsize;
  D.5743 = D.5742 + bytes;
  D.5739 = GC_arrays._max_heapsize;
  if (D.5743 > D.5739) goto <D.5744>; else goto <D.5745>;
  <D.5744>:
  D.5746 = 0;
  return D.5746;
  <D.5745>:
  <D.5741>:
  space = GC_unix_get_mem (bytes);
  if (space == 0B) goto <D.5747>; else goto <D.5748>;
  <D.5747>:
  GC_print_stats.89 = GC_print_stats;
  if (GC_print_stats.89 != 0) goto <D.5750>; else goto <D.5751>;
  <D.5750>:
  bytes.90 = (long int) bytes;
  GC_printf ("Failed to expand heap by %ld bytes\n", bytes.90, 0, 0, 0, 0, 0);
  <D.5751>:
  D.5746 = 0;
  return D.5746;
  <D.5748>:
  GC_print_stats.89 = GC_print_stats;
  if (GC_print_stats.89 != 0) goto <D.5753>; else goto <D.5754>;
  <D.5753>:
  bytes.90 = (long int) bytes;
  D.5755 = GC_arrays._words_allocd;
  D.5756 = D.5755 << 2;
  D.5757 = (long int) D.5756;
  GC_printf ("Increasing heap size by %lu after %lu allocated bytes\n", bytes.90, D.5757, 0, 0, 0, 0);
  <D.5754>:
  D.5758 = min_words_allocd ();
  D.5759 = D.5758 << 2;
  expansion_slop = D.5759 + 33554432;
  D.5764 = GC_arrays._last_heap_addr;
  if (D.5764 == 0B) goto <D.5765>; else goto <D.5760>;
  <D.5765>:
  space.91 = (signed int) space;
  if (space.91 >= 0) goto <D.5761>; else goto <D.5760>;
  <D.5760>:
  D.5764 = GC_arrays._last_heap_addr;
  if (D.5764 != 0B) goto <D.5767>; else goto <D.5762>;
  <D.5767>:
  D.5764 = GC_arrays._last_heap_addr;
  if (D.5764 < space) goto <D.5761>; else goto <D.5762>;
  <D.5761>:
  GC_greatest_plausible_heap_addr.92 = GC_greatest_plausible_heap_addr;
  D.5769 = bytes + expansion_slop;
  D.5770 = space + D.5769;
  GC_greatest_plausible_heap_addr.93 = GC_max (GC_greatest_plausible_heap_addr.92, D.5770);
  GC_greatest_plausible_heap_addr = GC_greatest_plausible_heap_addr.93;
  goto <D.5763>;
  <D.5762>:
  GC_least_plausible_heap_addr.94 = GC_least_plausible_heap_addr;
  D.5773 = -expansion_slop;
  D.5774 = space + D.5773;
  GC_least_plausible_heap_addr.95 = GC_min (GC_least_plausible_heap_addr.94, D.5774);
  GC_least_plausible_heap_addr = GC_least_plausible_heap_addr.95;
  <D.5763>:
  D.5764 = GC_arrays._last_heap_addr;
  GC_arrays._prev_heap_addr = D.5764;
  GC_arrays._last_heap_addr = space;
  GC_add_to_heap (space, bytes);
  D.5742 = GC_arrays._heapsize;
  D.5776 = D.5742 + expansion_slop;
  GC_collect_at_heapsize.96 = D.5776 + 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.5779>; else goto <D.5780>;
  <D.5779>:
  GC_on_heap_resize.97 = GC_on_heap_resize;
  D.5742 = GC_arrays._heapsize;
  GC_on_heap_resize.97 (D.5742);
  <D.5780>:
  D.5746 = 1;
  return D.5746;
}


GC_expand_hp (size_t bytes)
{
  int D.5782;
  int GC_is_initialized.98;
  long unsigned int D.5788;
  long unsigned int D.5791;
  long unsigned int D.5792;
  int D.5793;
  int result;

  D.5782 = _test_and_set (&GC_allocate_lock, 1);
  if (D.5782 != 0) goto <D.5783>; else goto <D.5784>;
  <D.5783>:
  GC_lock ();
  <D.5784>:
  GC_is_initialized.98 = GC_is_initialized;
  if (GC_is_initialized.98 == 0) goto <D.5786>; else goto <D.5787>;
  <D.5786>:
  GC_init_inner ();
  <D.5787>:
  D.5788 = bytes >> 12;
  result = GC_expand_hp_inner (D.5788);
  if (result != 0) goto <D.5789>; else goto <D.5790>;
  <D.5789>:
  D.5791 = GC_arrays._requested_heapsize;
  D.5792 = D.5791 + bytes;
  GC_arrays._requested_heapsize = D.5792;
  <D.5790>:
  GC_clear (&GC_allocate_lock);
  D.5793 = result;
  return D.5793;
}


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.5806;
  long unsigned int last_fo_entries.102;
  long unsigned int D.5808;
  long unsigned int GC_fo_entries.103;
  long unsigned int last_words_finalized.104;
  long unsigned int last_words_finalized.105;
  int D.5814;
  long unsigned int D.5815;
  long unsigned int GC_free_space_divisor.106;
  long unsigned int D.5817;
  long unsigned int D.5818;
  long unsigned int GC_black_list_spacing.107;
  long unsigned int D.5825;
  long unsigned int D.5828;
  int D.5834;
  int D.5836;
  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 (*<T32e>) (char *, GC_word) GC_current_warn_proc.112;
  GC_bool D.5846;
  int GC_print_stats.113;

  GC_incremental.99 = GC_incremental;
  if (GC_incremental.99 == 0) goto <D.5801>; else goto <D.5795>;
  <D.5801>:
  GC_dont_gc.100 = GC_dont_gc;
  if (GC_dont_gc.100 == 0) goto <D.5803>; else goto <D.5795>;
  <D.5803>:
  GC_dont_expand.101 = GC_dont_expand;
  if (GC_dont_expand.101 != 0) goto <D.5805>; else goto <D.5796>;
  <D.5805>:
  D.5806 = GC_arrays._words_allocd;
  if (D.5806 != 0) goto <D.5797>; else goto <D.5796>;
  <D.5796>:
  last_fo_entries.102 = last_fo_entries;
  D.5808 = last_fo_entries.102 + 500;
  GC_fo_entries.103 = GC_fo_entries;
  if (D.5808 < GC_fo_entries.103) goto <D.5810>; else goto <D.5798>;
  <D.5810>:
  last_words_finalized.104 = last_words_finalized;
  if (last_words_finalized.104 != 0) goto <D.5797>; else goto <D.5812>;
  <D.5812>:
  last_words_finalized.105 = GC_arrays._words_finalized;
  if (last_words_finalized.105 != 0) goto <D.5797>; else goto <D.5798>;
  <D.5798>:
  D.5814 = GC_should_collect ();
  if (D.5814 != 0) goto <D.5797>; else goto <D.5795>;
  <D.5797>:
  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.5799>;
  <D.5795>:
  {
    word blocks_to_get;

    D.5815 = GC_arrays._heapsize;
    GC_free_space_divisor.106 = GC_free_space_divisor;
    D.5817 = GC_free_space_divisor.106 * 4096;
    D.5818 = D.5815 / D.5817;
    blocks_to_get = D.5818 + needed_blocks;
    if (blocks_to_get > 2048) goto <D.5819>; else goto <D.5820>;
    <D.5819>:
    {
      word slop;

      if (ignore_off_page != 0) goto <D.5821>; else goto <D.5822>;
      <D.5821>:
      slop = 4;
      goto <D.5823>;
      <D.5822>:
      GC_black_list_spacing.107 = GC_black_list_spacing;
      D.5825 = GC_black_list_spacing.107 >> 12;
      slop = D.5825 * 2;
      if (slop > needed_blocks) goto <D.5826>; else goto <D.5827>;
      <D.5826>:
      slop = needed_blocks;
      <D.5827>:
      <D.5823>:
      D.5828 = needed_blocks + slop;
      if (D.5828 > 2048) goto <D.5829>; else goto <D.5830>;
      <D.5829>:
      blocks_to_get = needed_blocks + slop;
      goto <D.5831>;
      <D.5830>:
      blocks_to_get = 2048;
      <D.5831>:
    }
    <D.5820>:
    D.5834 = GC_expand_hp_inner (blocks_to_get);
    if (D.5834 == 0) goto <D.5835>; else goto <D.5832>;
    <D.5835>:
    D.5836 = GC_expand_hp_inner (needed_blocks);
    if (D.5836 == 0) goto <D.5837>; else goto <D.5832>;
    <D.5837>:
    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.5842>; else goto <D.5843>;
    <D.5842>:
    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.5845>;
    <D.5843>:
    GC_current_warn_proc.112 = GC_current_warn_proc;
    GC_current_warn_proc.112 ("GC Warning: Out of Memory!  Returning NIL!\n", 0);
    D.5846 = 0;
    return D.5846;
    <D.5845>:
    goto <D.5833>;
    <D.5832>:
    GC_fail_count.108 = GC_fail_count;
    if (GC_fail_count.108 != 0) goto <D.5847>; else goto <D.5848>;
    <D.5847>:
    GC_print_stats.113 = GC_print_stats;
    if (GC_print_stats.113 != 0) goto <D.5850>; else goto <D.5851>;
    <D.5850>:
    GC_printf ("Memory available again ...\n", 0, 0, 0, 0, 0, 0);
    <D.5851>:
    <D.5848>:
    <D.5833>:
  }
  <D.5799>:
  D.5846 = 1;
  return D.5846;
}


GC_allocobj (word sz, int kind)
{
  char * * D.5853;
  long unsigned int D.5854;
  char * D.5857;
  int GC_incremental.114;
  long unsigned int GC_time_limit.115;
  char * D.5864;
  int D.5874;
  char * * flh;
  GC_bool tried_minor;

  D.5853 = GC_obj_kinds[kind].ok_freelist;
  D.5854 = sz * 4;
  flh = D.5853 + D.5854;
  tried_minor = 0;
  if (sz == 0) goto <D.5855>; else goto <D.5856>;
  <D.5855>:
  D.5857 = 0B;
  return D.5857;
  <D.5856>:
  goto <D.5318>;
  <D.5317>:
  GC_collecting = 1;
  GC_incremental.114 = GC_incremental;
  if (GC_incremental.114 != 0) goto <D.5859>; else goto <D.5860>;
  <D.5859>:
  GC_time_limit.115 = GC_time_limit;
  if (GC_time_limit.115 != 999999) goto <D.5862>; else goto <D.5863>;
  <D.5862>:
  GC_collect_a_little_inner (1);
  <D.5863>:
  <D.5860>:
  GC_continue_reclaim (sz, kind);
  GC_collecting = 0;
  D.5864 = *flh;
  if (D.5864 == 0B) goto <D.5865>; else goto <D.5866>;
  <D.5865>:
  GC_new_hblk (sz, kind);
  <D.5866>:
  D.5864 = *flh;
  if (D.5864 == 0B) goto <D.5867>; else goto <D.5868>;
  <D.5867>:
  GC_collecting = 1;
  GC_incremental.114 = GC_incremental;
  if (GC_incremental.114 != 0) goto <D.5871>; else goto <D.5869>;
  <D.5871>:
  GC_time_limit.115 = GC_time_limit;
  if (GC_time_limit.115 == 999999) goto <D.5872>; else goto <D.5869>;
  <D.5872>:
  if (tried_minor == 0) goto <D.5873>; else goto <D.5869>;
  <D.5873>:
  GC_collect_a_little_inner (1);
  tried_minor = 1;
  goto <D.5870>;
  <D.5869>:
  D.5874 = GC_collect_or_expand (1, 0);
  if (D.5874 == 0) goto <D.5875>; else goto <D.5876>;
  <D.5875>:
  GC_collecting = 0;
  D.5857 = 0B;
  return D.5857;
  <D.5876>:
  <D.5870>:
  GC_collecting = 0;
  <D.5868>:
  <D.5318>:
  D.5864 = *flh;
  if (D.5864 == 0B) goto <D.5317>; else goto <D.5319>;
  <D.5319>:
  GC_fail_count = 0;
  D.5857 = *flh;
  return D.5857;
}


