GC_default_print_heap_obj_proc (char * p)
{
  long int base.0;
  long unsigned int D.5390;
  long int D.5391;
  char * base;

  base = GC_base (p);
  base.0 = (long int) base;
  D.5390 = GC_size (base);
  D.5391 = (long int) D.5390;
  GC_err_printf ("start: 0x%lx, appr. length: %ld", base.0, D.5391, 0, 0, 0, 0);
}


GC_print_source_ptr (char * p)
{
  void (*<Tdbe>) (char *) GC_print_heap_obj.1;
  char * base;

  base = GC_base (p);
  if (base == 0B) goto <D.5392>; else goto <D.5393>;
  <D.5392>:
  if (p == 0B) goto <D.5394>; else goto <D.5395>;
  <D.5394>:
  GC_err_puts ("in register");
  goto <D.5396>;
  <D.5395>:
  GC_err_puts ("in root set");
  <D.5396>:
  goto <D.5397>;
  <D.5393>:
  GC_err_puts ("in object at ");
  GC_print_heap_obj.1 = GC_print_heap_obj;
  GC_print_heap_obj.1 (base);
  <D.5397>:
}


GC_bl_init ()
{
  int GC_all_interior_pointers.2;
  char * GC_old_normal_bl.3;
  char * GC_incomplete_normal_bl.4;
  word * GC_old_normal_bl.5;
  word * GC_incomplete_normal_bl.6;
  char * GC_old_stack_bl.7;
  char * GC_incomplete_stack_bl.8;
  word * GC_old_stack_bl.9;
  word * GC_incomplete_stack_bl.10;

  GC_all_interior_pointers.2 = GC_all_interior_pointers;
  if (GC_all_interior_pointers.2 == 0) goto <D.5400>; else goto <D.5401>;
  <D.5400>:
  GC_old_normal_bl.3 = GC_scratch_alloc (8192);
  GC_old_normal_bl = GC_old_normal_bl.3;
  GC_incomplete_normal_bl.4 = GC_scratch_alloc (8192);
  GC_incomplete_normal_bl = GC_incomplete_normal_bl.4;
  GC_old_normal_bl.5 = GC_old_normal_bl;
  if (GC_old_normal_bl.5 == 0B) goto <D.5404>; else goto <D.5407>;
  <D.5407>:
  GC_incomplete_normal_bl.6 = GC_incomplete_normal_bl;
  if (GC_incomplete_normal_bl.6 == 0B) goto <D.5404>; else goto <D.5405>;
  <D.5404>:
  GC_err_puts ("Insufficient memory for black list\n");
  exit (1);
  <D.5405>:
  GC_old_normal_bl.5 = GC_old_normal_bl;
  GC_clear_bl (GC_old_normal_bl.5);
  GC_incomplete_normal_bl.6 = GC_incomplete_normal_bl;
  GC_clear_bl (GC_incomplete_normal_bl.6);
  <D.5401>:
  GC_old_stack_bl.7 = GC_scratch_alloc (8192);
  GC_old_stack_bl = GC_old_stack_bl.7;
  GC_incomplete_stack_bl.8 = GC_scratch_alloc (8192);
  GC_incomplete_stack_bl = GC_incomplete_stack_bl.8;
  GC_old_stack_bl.9 = GC_old_stack_bl;
  if (GC_old_stack_bl.9 == 0B) goto <D.5411>; else goto <D.5414>;
  <D.5414>:
  GC_incomplete_stack_bl.10 = GC_incomplete_stack_bl;
  if (GC_incomplete_stack_bl.10 == 0B) goto <D.5411>; else goto <D.5412>;
  <D.5411>:
  GC_err_puts ("Insufficient memory for black list\n");
  exit (1);
  <D.5412>:
  GC_old_stack_bl.9 = GC_old_stack_bl;
  GC_clear_bl (GC_old_stack_bl.9);
  GC_incomplete_stack_bl.10 = GC_incomplete_stack_bl;
  GC_clear_bl (GC_incomplete_stack_bl.10);
}


GC_clear_bl (word * doomed)
{
  memset (doomed, 0, 8192);
}


memset (void * __dest, int __ch, size_t __len)
{
  int D.5418;
  int D.5423;
  void * D.5425;
  long unsigned int D.5426;

  D.5418 = __builtin_constant_p (__len);
  if (D.5418 != 0) goto <D.5419>; else goto <D.5420>;
  <D.5419>:
  if (__len == 0) goto <D.5421>; else goto <D.5422>;
  <D.5421>:
  D.5423 = __builtin_constant_p (__ch);
  if (D.5423 == 0) goto <D.5416>; else goto <D.5424>;
  <D.5424>:
  if (__ch != 0) goto <D.5416>; else goto <D.5417>;
  <D.5416>:
  __warn_memset_zero_len ();
  D.5425 = __dest;
  return D.5425;
  <D.5417>:
  <D.5422>:
  <D.5420>:
  D.5426 = __builtin_object_size (__dest, 0);
  D.5425 = __builtin___memset_chk (__dest, __ch, __len, D.5426);
  return D.5425;
}


GC_copy_bl (word * old, word * new)
{
  memcpy (new, old, 8192);
}


memcpy (void * restrict __dest, const void * restrict __src, size_t __len)
{
  void * D.5428;
  long unsigned int D.5429;

  D.5429 = __builtin_object_size (__dest, 0);
  D.5428 = __builtin___memcpy_chk (__dest, __src, __len, D.5429);
  return D.5428;
}


GC_promote_black_lists ()
{
  word * GC_incomplete_normal_bl.11;
  word * GC_incomplete_stack_bl.12;
  int GC_all_interior_pointers.13;
  long unsigned int GC_total_stack_black_listed.14;
  long unsigned int GC_total_stack_black_listed.15;
  long unsigned int D.5440;
  long unsigned int D.5441;
  long unsigned int GC_black_list_spacing.16;
  long unsigned int GC_black_list_spacing.17;
  word * very_old_normal_bl;
  word * very_old_stack_bl;

  very_old_normal_bl = GC_old_normal_bl;
  very_old_stack_bl = GC_old_stack_bl;
  GC_incomplete_normal_bl.11 = GC_incomplete_normal_bl;
  GC_old_normal_bl = GC_incomplete_normal_bl.11;
  GC_incomplete_stack_bl.12 = GC_incomplete_stack_bl;
  GC_old_stack_bl = GC_incomplete_stack_bl.12;
  GC_all_interior_pointers.13 = GC_all_interior_pointers;
  if (GC_all_interior_pointers.13 == 0) goto <D.5434>; else goto <D.5435>;
  <D.5434>:
  GC_clear_bl (very_old_normal_bl);
  <D.5435>:
  GC_clear_bl (very_old_stack_bl);
  GC_incomplete_normal_bl = very_old_normal_bl;
  GC_incomplete_stack_bl = very_old_stack_bl;
  GC_total_stack_black_listed.14 = total_stack_black_listed ();
  GC_total_stack_black_listed = GC_total_stack_black_listed.14;
  GC_total_stack_black_listed.15 = GC_total_stack_black_listed;
  if (GC_total_stack_black_listed.15 != 0) goto <D.5438>; else goto <D.5439>;
  <D.5438>:
  D.5440 = GC_arrays._heapsize;
  GC_total_stack_black_listed.15 = GC_total_stack_black_listed;
  D.5441 = D.5440 / GC_total_stack_black_listed.15;
  GC_black_list_spacing.16 = D.5441 * 4096;
  GC_black_list_spacing = GC_black_list_spacing.16;
  <D.5439>:
  GC_black_list_spacing.17 = GC_black_list_spacing;
  if (GC_black_list_spacing.17 <= 12287) goto <D.5444>; else goto <D.5445>;
  <D.5444>:
  GC_black_list_spacing = 12288;
  <D.5445>:
  GC_black_list_spacing.17 = GC_black_list_spacing;
  if (GC_black_list_spacing.17 > 8388608) goto <D.5446>; else goto <D.5447>;
  <D.5446>:
  GC_black_list_spacing = 8388608;
  <D.5447>:
}


total_stack_black_listed ()
{
  long unsigned int D.5448;
  long unsigned int D.5449;
  long unsigned int D.5450;
  long unsigned int D.5451;
  long unsigned int GC_n_heap_sects.18;
  word D.5453;
  register unsigned int i;
  word total;

  total = 0;
  i = 0;
  goto <D.5386>;
  <D.5385>:
  {
    struct hblk * start;
    word len;
    struct hblk * endp1;

    start = GC_arrays._heap_sects[i].hs_start;
    len = GC_arrays._heap_sects[i].hs_bytes;
    D.5448 = len / 4096;
    D.5449 = D.5448 * 4096;
    endp1 = start + D.5449;
    D.5450 = GC_number_stack_black_listed (start, endp1);
    total = D.5450 + total;
  }
  i = i + 1;
  <D.5386>:
  D.5451 = (long unsigned int) i;
  GC_n_heap_sects.18 = GC_n_heap_sects;
  if (D.5451 < GC_n_heap_sects.18) goto <D.5385>; else goto <D.5387>;
  <D.5387>:
  D.5453 = total * 4096;
  return D.5453;
}


GC_unpromote_black_lists ()
{
  int GC_all_interior_pointers.19;
  word * GC_old_normal_bl.20;
  word * GC_incomplete_normal_bl.21;
  word * GC_old_stack_bl.22;
  word * GC_incomplete_stack_bl.23;

  GC_all_interior_pointers.19 = GC_all_interior_pointers;
  if (GC_all_interior_pointers.19 == 0) goto <D.5456>; else goto <D.5457>;
  <D.5456>:
  GC_old_normal_bl.20 = GC_old_normal_bl;
  GC_incomplete_normal_bl.21 = GC_incomplete_normal_bl;
  GC_copy_bl (GC_old_normal_bl.20, GC_incomplete_normal_bl.21);
  <D.5457>:
  GC_old_stack_bl.22 = GC_old_stack_bl;
  GC_incomplete_stack_bl.23 = GC_incomplete_stack_bl;
  GC_copy_bl (GC_old_stack_bl.22, GC_incomplete_stack_bl.23);
}


GC_add_to_black_list_normal (word p)
{
  long unsigned int D.5462;
  char D.5463;
  long unsigned int D.5466;
  int D.5467;
  char * p.24;
  struct hdr * D.5471;
  word * GC_old_normal_bl.25;
  int D.5474;
  long unsigned int D.5475;
  long unsigned int D.5476;
  word * D.5477;
  long unsigned int D.5478;
  int D.5479;
  long unsigned int D.5480;
  long unsigned int D.5481;
  word * GC_incomplete_normal_bl.26;
  word * D.5483;
  long unsigned int D.5484;
  long unsigned int D.5485;
  long unsigned int D.5486;

  D.5462 = p & 7;
  D.5463 = GC_arrays._modws_valid_offsets[D.5462];
  if (D.5463 == 0) goto <D.5464>; else goto <D.5465>;
  <D.5464>:
  return;
  <D.5465>:
  {
    register int index;

    D.5466 = p >> 12;
    D.5467 = (int) D.5466;
    index = D.5467 & 65535;
    p.24 = (char *) p;
    D.5471 = GC_find_header (p.24);
    if (D.5471 == 0B) goto <D.5468>; else goto <D.5472>;
    <D.5472>:
    GC_old_normal_bl.25 = GC_old_normal_bl;
    D.5474 = index >> 6;
    D.5475 = (long unsigned int) D.5474;
    D.5476 = D.5475 * 8;
    D.5477 = GC_old_normal_bl.25 + D.5476;
    D.5478 = *D.5477;
    D.5479 = index & 63;
    D.5480 = D.5478 >> D.5479;
    D.5481 = D.5480 & 1;
    if (D.5481 != 0) goto <D.5468>; else goto <D.5469>;
    <D.5468>:
    GC_incomplete_normal_bl.26 = GC_incomplete_normal_bl;
    D.5474 = index >> 6;
    D.5475 = (long unsigned int) D.5474;
    D.5476 = D.5475 * 8;
    D.5483 = GC_incomplete_normal_bl.26 + D.5476;
    GC_incomplete_normal_bl.26 = GC_incomplete_normal_bl;
    D.5474 = index >> 6;
    D.5475 = (long unsigned int) D.5474;
    D.5476 = D.5475 * 8;
    D.5483 = GC_incomplete_normal_bl.26 + D.5476;
    D.5484 = *D.5483;
    D.5479 = index & 63;
    D.5485 = 1 << D.5479;
    D.5486 = D.5484 | D.5485;
    *D.5483 = D.5486;
    <D.5469>:
  }
}


GC_add_to_black_list_stack (word p)
{
  long unsigned int D.5488;
  int D.5489;
  char * p.27;
  struct hdr * D.5493;
  word * GC_old_stack_bl.28;
  int D.5496;
  long unsigned int D.5497;
  long unsigned int D.5498;
  word * D.5499;
  long unsigned int D.5500;
  int D.5501;
  long unsigned int D.5502;
  long unsigned int D.5503;
  word * GC_incomplete_stack_bl.29;
  word * D.5505;
  long unsigned int D.5506;
  long unsigned int D.5507;
  long unsigned int D.5508;
  register int index;

  D.5488 = p >> 12;
  D.5489 = (int) D.5488;
  index = D.5489 & 65535;
  p.27 = (char *) p;
  D.5493 = GC_find_header (p.27);
  if (D.5493 == 0B) goto <D.5490>; else goto <D.5494>;
  <D.5494>:
  GC_old_stack_bl.28 = GC_old_stack_bl;
  D.5496 = index >> 6;
  D.5497 = (long unsigned int) D.5496;
  D.5498 = D.5497 * 8;
  D.5499 = GC_old_stack_bl.28 + D.5498;
  D.5500 = *D.5499;
  D.5501 = index & 63;
  D.5502 = D.5500 >> D.5501;
  D.5503 = D.5502 & 1;
  if (D.5503 != 0) goto <D.5490>; else goto <D.5491>;
  <D.5490>:
  GC_incomplete_stack_bl.29 = GC_incomplete_stack_bl;
  D.5496 = index >> 6;
  D.5497 = (long unsigned int) D.5496;
  D.5498 = D.5497 * 8;
  D.5505 = GC_incomplete_stack_bl.29 + D.5498;
  GC_incomplete_stack_bl.29 = GC_incomplete_stack_bl;
  D.5496 = index >> 6;
  D.5497 = (long unsigned int) D.5496;
  D.5498 = D.5497 * 8;
  D.5505 = GC_incomplete_stack_bl.29 + D.5498;
  D.5506 = *D.5505;
  D.5501 = index & 63;
  D.5507 = 1 << D.5501;
  D.5508 = D.5506 | D.5507;
  *D.5505 = D.5508;
  <D.5491>:
}


GC_is_black_listed (struct hblk * h, word len)
{
  long unsigned int h.30;
  long unsigned int D.5510;
  int D.5511;
  int GC_all_interior_pointers.31;
  word * GC_old_normal_bl.32;
  int D.5518;
  long unsigned int D.5519;
  long unsigned int D.5520;
  word * D.5521;
  long unsigned int D.5522;
  int D.5523;
  long unsigned int D.5524;
  long unsigned int D.5525;
  word * GC_incomplete_normal_bl.33;
  word * D.5528;
  long unsigned int D.5529;
  long unsigned int D.5530;
  long unsigned int D.5531;
  struct hblk * D.5532;
  word * GC_old_stack_bl.34;
  word * D.5536;
  long unsigned int D.5537;
  word * GC_incomplete_stack_bl.35;
  word * D.5540;
  long unsigned int D.5541;
  unsigned int index.36;
  long unsigned int D.5544;
  long unsigned int D.5545;
  long unsigned int D.5546;
  long unsigned int D.5549;
  long unsigned int D.5550;
  long unsigned int D.5552;
  long unsigned int D.5553;
  sizetype D.5554;
  sizetype D.5555;
  long unsigned int D.5557;
  struct hblk * D.5558;
  long unsigned int D.5559;
  long unsigned int D.5560;
  int D.5561;
  register int index;
  register word i;
  word nblocks;

  h.30 = (long unsigned int) h;
  D.5510 = h.30 >> 12;
  D.5511 = (int) D.5510;
  index = D.5511 & 65535;
  nblocks = len >> 12;
  GC_all_interior_pointers.31 = GC_all_interior_pointers;
  if (GC_all_interior_pointers.31 == 0) goto <D.5513>; else goto <D.5514>;
  <D.5513>:
  GC_old_normal_bl.32 = GC_old_normal_bl;
  D.5518 = index >> 6;
  D.5519 = (long unsigned int) D.5518;
  D.5520 = D.5519 * 8;
  D.5521 = GC_old_normal_bl.32 + D.5520;
  D.5522 = *D.5521;
  D.5523 = index & 63;
  D.5524 = D.5522 >> D.5523;
  D.5525 = D.5524 & 1;
  if (D.5525 != 0) goto <D.5515>; else goto <D.5526>;
  <D.5526>:
  GC_incomplete_normal_bl.33 = GC_incomplete_normal_bl;
  D.5518 = index >> 6;
  D.5519 = (long unsigned int) D.5518;
  D.5520 = D.5519 * 8;
  D.5528 = GC_incomplete_normal_bl.33 + D.5520;
  D.5529 = *D.5528;
  D.5523 = index & 63;
  D.5530 = D.5529 >> D.5523;
  D.5531 = D.5530 & 1;
  if (D.5531 != 0) goto <D.5515>; else goto <D.5516>;
  <D.5515>:
  D.5532 = h + 4096;
  return D.5532;
  <D.5516>:
  <D.5514>:
  i = 0;
  <D.5367>:
  GC_old_stack_bl.34 = GC_old_stack_bl;
  D.5518 = index >> 6;
  D.5519 = (long unsigned int) D.5518;
  D.5520 = D.5519 * 8;
  D.5536 = GC_old_stack_bl.34 + D.5520;
  D.5537 = *D.5536;
  if (D.5537 == 0) goto <D.5538>; else goto <D.5533>;
  <D.5538>:
  GC_incomplete_stack_bl.35 = GC_incomplete_stack_bl;
  D.5518 = index >> 6;
  D.5519 = (long unsigned int) D.5518;
  D.5520 = D.5519 * 8;
  D.5540 = GC_incomplete_stack_bl.35 + D.5520;
  D.5541 = *D.5540;
  if (D.5541 == 0) goto <D.5542>; else goto <D.5533>;
  <D.5542>:
  index.36 = (unsigned int) index;
  D.5544 = (long unsigned int) index.36;
  D.5545 = D.5544 & 63;
  D.5546 = i - D.5545;
  i = D.5546 + 64;
  goto <D.5534>;
  <D.5533>:
  GC_old_stack_bl.34 = GC_old_stack_bl;
  D.5518 = index >> 6;
  D.5519 = (long unsigned int) D.5518;
  D.5520 = D.5519 * 8;
  D.5536 = GC_old_stack_bl.34 + D.5520;
  D.5537 = *D.5536;
  D.5523 = index & 63;
  D.5549 = D.5537 >> D.5523;
  D.5550 = D.5549 & 1;
  if (D.5550 != 0) goto <D.5547>; else goto <D.5551>;
  <D.5551>:
  GC_incomplete_stack_bl.35 = GC_incomplete_stack_bl;
  D.5518 = index >> 6;
  D.5519 = (long unsigned int) D.5518;
  D.5520 = D.5519 * 8;
  D.5540 = GC_incomplete_stack_bl.35 + D.5520;
  D.5541 = *D.5540;
  D.5523 = index & 63;
  D.5552 = D.5541 >> D.5523;
  D.5553 = D.5552 & 1;
  if (D.5553 != 0) goto <D.5547>; else goto <D.5548>;
  <D.5547>:
  D.5554 = i + 1;
  D.5555 = D.5554 * 4096;
  D.5532 = h + D.5555;
  return D.5532;
  <D.5548>:
  i = i + 1;
  <D.5534>:
  if (i >= nblocks) goto <D.5366>; else goto <D.5556>;
  <D.5556>:
  D.5557 = i * 4096;
  D.5558 = h + D.5557;
  D.5559 = (long unsigned int) D.5558;
  D.5560 = D.5559 >> 12;
  D.5561 = (int) D.5560;
  index = D.5561 & 65535;
  goto <D.5367>;
  <D.5366>:
  D.5532 = 0B;
  return D.5532;
}


GC_number_stack_black_listed (struct hblk * start, struct hblk * endp1)
{
  long unsigned int h.37;
  long unsigned int D.5564;
  int D.5565;
  word * GC_old_stack_bl.38;
  int D.5567;
  long unsigned int D.5568;
  long unsigned int D.5569;
  word * D.5570;
  long unsigned int D.5571;
  int D.5572;
  long unsigned int D.5573;
  long unsigned int D.5574;
  word D.5577;
  register struct hblk * h;
  word result;

  result = 0;
  h = start;
  goto <D.5376>;
  <D.5375>:
  {
    register int index;

    h.37 = (long unsigned int) h;
    D.5564 = h.37 >> 12;
    D.5565 = (int) D.5564;
    index = D.5565 & 65535;
    GC_old_stack_bl.38 = GC_old_stack_bl;
    D.5567 = index >> 6;
    D.5568 = (long unsigned int) D.5567;
    D.5569 = D.5568 * 8;
    D.5570 = GC_old_stack_bl.38 + D.5569;
    D.5571 = *D.5570;
    D.5572 = index & 63;
    D.5573 = D.5571 >> D.5572;
    D.5574 = D.5573 & 1;
    if (D.5574 != 0) goto <D.5575>; else goto <D.5576>;
    <D.5575>:
    result = result + 1;
    <D.5576>:
  }
  h = h + 4096;
  <D.5376>:
  if (h < endp1) goto <D.5375>; else goto <D.5377>;
  <D.5377>:
  D.5577 = result;
  return D.5577;
}


