GC_default_print_heap_obj_proc (char * p)
{
  unsigned int D.4546;
  long int D.4547;
  long int base.0;
  char * base;

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


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

  base = GC_base (p);
  if (base == 0B) goto <D.4549>; else goto <D.4550>;
  <D.4549>:
  if (p == 0B) goto <D.4551>; else goto <D.4552>;
  <D.4551>:
  GC_err_puts ("in register");
  goto <D.4553>;
  <D.4552>:
  GC_err_puts ("in root set");
  <D.4553>:
  goto <D.4554>;
  <D.4550>:
  GC_err_puts ("in object at ");
  GC_print_heap_obj.1 = GC_print_heap_obj;
  GC_print_heap_obj.1 (base);
  <D.4554>:
}


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.4557>; else goto <D.4558>;
  <D.4557>:
  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.4561>; else goto <D.4564>;
  <D.4564>:
  GC_incomplete_normal_bl.6 = GC_incomplete_normal_bl;
  if (GC_incomplete_normal_bl.6 == 0B) goto <D.4561>; else goto <D.4562>;
  <D.4561>:
  GC_err_puts ("Insufficient memory for black list\n");
  exit (1);
  <D.4562>:
  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.4558>:
  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.4568>; else goto <D.4571>;
  <D.4571>:
  GC_incomplete_stack_bl.10 = GC_incomplete_stack_bl;
  if (GC_incomplete_stack_bl.10 == 0B) goto <D.4568>; else goto <D.4569>;
  <D.4568>:
  GC_err_puts ("Insufficient memory for black list\n");
  exit (1);
  <D.4569>:
  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.4575;
  int D.4580;
  void * D.4582;
  unsigned int D.4583;

  D.4575 = __builtin_constant_p (__len);
  if (D.4575 != 0) goto <D.4576>; else goto <D.4577>;
  <D.4576>:
  if (__len == 0) goto <D.4578>; else goto <D.4579>;
  <D.4578>:
  D.4580 = __builtin_constant_p (__ch);
  if (D.4580 == 0) goto <D.4573>; else goto <D.4581>;
  <D.4581>:
  if (__ch != 0) goto <D.4573>; else goto <D.4574>;
  <D.4573>:
  __warn_memset_zero_len ();
  D.4582 = __dest;
  return D.4582;
  <D.4574>:
  <D.4579>:
  <D.4577>:
  D.4583 = __builtin_object_size (__dest, 0);
  D.4582 = __builtin___memset_chk (__dest, __ch, __len, D.4583);
  return D.4582;
}


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


memcpy (void * restrict __dest, const void * restrict __src, size_t __len)
{
  void * D.4585;
  unsigned int D.4586;

  D.4586 = __builtin_object_size (__dest, 0);
  D.4585 = __builtin___memcpy_chk (__dest, __src, __len, D.4586);
  return D.4585;
}


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.4597;
  long unsigned int D.4598;
  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.4591>; else goto <D.4592>;
  <D.4591>:
  GC_clear_bl (very_old_normal_bl);
  <D.4592>:
  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.4595>; else goto <D.4596>;
  <D.4595>:
  D.4597 = GC_arrays._heapsize;
  GC_total_stack_black_listed.15 = GC_total_stack_black_listed;
  D.4598 = D.4597 / GC_total_stack_black_listed.15;
  GC_black_list_spacing.16 = D.4598 * 4096;
  GC_black_list_spacing = GC_black_list_spacing.16;
  <D.4596>:
  GC_black_list_spacing.17 = GC_black_list_spacing;
  if (GC_black_list_spacing.17 <= 12287) goto <D.4601>; else goto <D.4602>;
  <D.4601>:
  GC_black_list_spacing = 12288;
  <D.4602>:
  GC_black_list_spacing.17 = GC_black_list_spacing;
  if (GC_black_list_spacing.17 > 8388608) goto <D.4603>; else goto <D.4604>;
  <D.4603>:
  GC_black_list_spacing = 8388608;
  <D.4604>:
}


total_stack_black_listed ()
{
  long unsigned int D.4605;
  long unsigned int D.4606;
  long unsigned int D.4607;
  long unsigned int GC_n_heap_sects.18;
  word D.4609;
  register unsigned int i;
  word total;

  total = 0;
  i = 0;
  goto <D.4543>;
  <D.4542>:
  {
    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.4605 = len / 4096;
    D.4606 = D.4605 * 4096;
    endp1 = start + D.4606;
    D.4607 = GC_number_stack_black_listed (start, endp1);
    total = D.4607 + total;
  }
  i = i + 1;
  <D.4543>:
  GC_n_heap_sects.18 = GC_n_heap_sects;
  if (i < GC_n_heap_sects.18) goto <D.4542>; else goto <D.4544>;
  <D.4544>:
  D.4609 = total * 4096;
  return D.4609;
}


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

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


GC_add_to_black_list_normal (word p)
{
  long unsigned int D.4618;
  char D.4619;
  long unsigned int D.4622;
  int D.4623;
  long unsigned int D.4626;
  struct bottom_index * D.4627;
  long unsigned int D.4628;
  struct hdr * D.4629;
  word * GC_old_normal_bl.24;
  int D.4632;
  unsigned int D.4633;
  unsigned int D.4634;
  word * D.4635;
  long unsigned int D.4636;
  int D.4637;
  long unsigned int D.4638;
  long unsigned int D.4639;
  word * GC_incomplete_normal_bl.25;
  word * D.4641;
  long unsigned int D.4642;
  long unsigned int D.4643;
  long unsigned int D.4644;

  D.4618 = p & 3;
  D.4619 = GC_arrays._modws_valid_offsets[D.4618];
  if (D.4619 == 0) goto <D.4620>; else goto <D.4621>;
  <D.4620>:
  return;
  <D.4621>:
  {
    register int index;

    D.4622 = p >> 12;
    D.4623 = (int) D.4622;
    index = D.4623 & 65535;
    D.4626 = p >> 22;
    D.4627 = GC_arrays._top_index[D.4626];
    D.4622 = p >> 12;
    D.4628 = D.4622 & 1023;
    D.4629 = D.4627->index[D.4628];
    if (D.4629 == 0B) goto <D.4624>; else goto <D.4630>;
    <D.4630>:
    GC_old_normal_bl.24 = GC_old_normal_bl;
    D.4632 = index >> 5;
    D.4633 = (unsigned int) D.4632;
    D.4634 = D.4633 * 4;
    D.4635 = GC_old_normal_bl.24 + D.4634;
    D.4636 = *D.4635;
    D.4637 = index & 31;
    D.4638 = D.4636 >> D.4637;
    D.4639 = D.4638 & 1;
    if (D.4639 != 0) goto <D.4624>; else goto <D.4625>;
    <D.4624>:
    GC_incomplete_normal_bl.25 = GC_incomplete_normal_bl;
    D.4632 = index >> 5;
    D.4633 = (unsigned int) D.4632;
    D.4634 = D.4633 * 4;
    D.4641 = GC_incomplete_normal_bl.25 + D.4634;
    GC_incomplete_normal_bl.25 = GC_incomplete_normal_bl;
    D.4632 = index >> 5;
    D.4633 = (unsigned int) D.4632;
    D.4634 = D.4633 * 4;
    D.4641 = GC_incomplete_normal_bl.25 + D.4634;
    D.4642 = *D.4641;
    D.4637 = index & 31;
    D.4643 = 1 << D.4637;
    D.4644 = D.4642 | D.4643;
    *D.4641 = D.4644;
    <D.4625>:
  }
}


GC_add_to_black_list_stack (word p)
{
  long unsigned int D.4646;
  int D.4647;
  long unsigned int D.4650;
  struct bottom_index * D.4651;
  long unsigned int D.4652;
  struct hdr * D.4653;
  word * GC_old_stack_bl.26;
  int D.4656;
  unsigned int D.4657;
  unsigned int D.4658;
  word * D.4659;
  long unsigned int D.4660;
  int D.4661;
  long unsigned int D.4662;
  long unsigned int D.4663;
  word * GC_incomplete_stack_bl.27;
  word * D.4665;
  long unsigned int D.4666;
  long unsigned int D.4667;
  long unsigned int D.4668;
  register int index;

  D.4646 = p >> 12;
  D.4647 = (int) D.4646;
  index = D.4647 & 65535;
  D.4650 = p >> 22;
  D.4651 = GC_arrays._top_index[D.4650];
  D.4646 = p >> 12;
  D.4652 = D.4646 & 1023;
  D.4653 = D.4651->index[D.4652];
  if (D.4653 == 0B) goto <D.4648>; else goto <D.4654>;
  <D.4654>:
  GC_old_stack_bl.26 = GC_old_stack_bl;
  D.4656 = index >> 5;
  D.4657 = (unsigned int) D.4656;
  D.4658 = D.4657 * 4;
  D.4659 = GC_old_stack_bl.26 + D.4658;
  D.4660 = *D.4659;
  D.4661 = index & 31;
  D.4662 = D.4660 >> D.4661;
  D.4663 = D.4662 & 1;
  if (D.4663 != 0) goto <D.4648>; else goto <D.4649>;
  <D.4648>:
  GC_incomplete_stack_bl.27 = GC_incomplete_stack_bl;
  D.4656 = index >> 5;
  D.4657 = (unsigned int) D.4656;
  D.4658 = D.4657 * 4;
  D.4665 = GC_incomplete_stack_bl.27 + D.4658;
  GC_incomplete_stack_bl.27 = GC_incomplete_stack_bl;
  D.4656 = index >> 5;
  D.4657 = (unsigned int) D.4656;
  D.4658 = D.4657 * 4;
  D.4665 = GC_incomplete_stack_bl.27 + D.4658;
  D.4666 = *D.4665;
  D.4661 = index & 31;
  D.4667 = 1 << D.4661;
  D.4668 = D.4666 | D.4667;
  *D.4665 = D.4668;
  <D.4649>:
}


GC_is_black_listed (struct hblk * h, word len)
{
  long unsigned int h.28;
  long unsigned int D.4670;
  int D.4671;
  int GC_all_interior_pointers.29;
  word * GC_old_normal_bl.30;
  int D.4678;
  unsigned int D.4679;
  unsigned int D.4680;
  word * D.4681;
  long unsigned int D.4682;
  int D.4683;
  long unsigned int D.4684;
  long unsigned int D.4685;
  word * GC_incomplete_normal_bl.31;
  word * D.4688;
  long unsigned int D.4689;
  long unsigned int D.4690;
  long unsigned int D.4691;
  struct hblk * D.4692;
  word * GC_old_stack_bl.32;
  word * D.4696;
  long unsigned int D.4697;
  word * GC_incomplete_stack_bl.33;
  word * D.4700;
  long unsigned int D.4701;
  long unsigned int index.34;
  long unsigned int D.4704;
  long unsigned int D.4705;
  long unsigned int D.4708;
  long unsigned int D.4709;
  long unsigned int D.4711;
  long unsigned int D.4712;
  sizetype D.4713;
  sizetype D.4714;
  long unsigned int D.4716;
  struct hblk * D.4717;
  long unsigned int D.4718;
  long unsigned int D.4719;
  int D.4720;
  register int index;
  register word i;
  word nblocks;

  h.28 = (long unsigned int) h;
  D.4670 = h.28 >> 12;
  D.4671 = (int) D.4670;
  index = D.4671 & 65535;
  nblocks = len >> 12;
  GC_all_interior_pointers.29 = GC_all_interior_pointers;
  if (GC_all_interior_pointers.29 == 0) goto <D.4673>; else goto <D.4674>;
  <D.4673>:
  GC_old_normal_bl.30 = GC_old_normal_bl;
  D.4678 = index >> 5;
  D.4679 = (unsigned int) D.4678;
  D.4680 = D.4679 * 4;
  D.4681 = GC_old_normal_bl.30 + D.4680;
  D.4682 = *D.4681;
  D.4683 = index & 31;
  D.4684 = D.4682 >> D.4683;
  D.4685 = D.4684 & 1;
  if (D.4685 != 0) goto <D.4675>; else goto <D.4686>;
  <D.4686>:
  GC_incomplete_normal_bl.31 = GC_incomplete_normal_bl;
  D.4678 = index >> 5;
  D.4679 = (unsigned int) D.4678;
  D.4680 = D.4679 * 4;
  D.4688 = GC_incomplete_normal_bl.31 + D.4680;
  D.4689 = *D.4688;
  D.4683 = index & 31;
  D.4690 = D.4689 >> D.4683;
  D.4691 = D.4690 & 1;
  if (D.4691 != 0) goto <D.4675>; else goto <D.4676>;
  <D.4675>:
  D.4692 = h + 4096;
  return D.4692;
  <D.4676>:
  <D.4674>:
  i = 0;
  <D.4524>:
  GC_old_stack_bl.32 = GC_old_stack_bl;
  D.4678 = index >> 5;
  D.4679 = (unsigned int) D.4678;
  D.4680 = D.4679 * 4;
  D.4696 = GC_old_stack_bl.32 + D.4680;
  D.4697 = *D.4696;
  if (D.4697 == 0) goto <D.4698>; else goto <D.4693>;
  <D.4698>:
  GC_incomplete_stack_bl.33 = GC_incomplete_stack_bl;
  D.4678 = index >> 5;
  D.4679 = (unsigned int) D.4678;
  D.4680 = D.4679 * 4;
  D.4700 = GC_incomplete_stack_bl.33 + D.4680;
  D.4701 = *D.4700;
  if (D.4701 == 0) goto <D.4702>; else goto <D.4693>;
  <D.4702>:
  index.34 = (long unsigned int) index;
  D.4704 = index.34 & 31;
  D.4705 = i - D.4704;
  i = D.4705 + 32;
  goto <D.4694>;
  <D.4693>:
  GC_old_stack_bl.32 = GC_old_stack_bl;
  D.4678 = index >> 5;
  D.4679 = (unsigned int) D.4678;
  D.4680 = D.4679 * 4;
  D.4696 = GC_old_stack_bl.32 + D.4680;
  D.4697 = *D.4696;
  D.4683 = index & 31;
  D.4708 = D.4697 >> D.4683;
  D.4709 = D.4708 & 1;
  if (D.4709 != 0) goto <D.4706>; else goto <D.4710>;
  <D.4710>:
  GC_incomplete_stack_bl.33 = GC_incomplete_stack_bl;
  D.4678 = index >> 5;
  D.4679 = (unsigned int) D.4678;
  D.4680 = D.4679 * 4;
  D.4700 = GC_incomplete_stack_bl.33 + D.4680;
  D.4701 = *D.4700;
  D.4683 = index & 31;
  D.4711 = D.4701 >> D.4683;
  D.4712 = D.4711 & 1;
  if (D.4712 != 0) goto <D.4706>; else goto <D.4707>;
  <D.4706>:
  D.4713 = i + 1;
  D.4714 = D.4713 * 4096;
  D.4692 = h + D.4714;
  return D.4692;
  <D.4707>:
  i = i + 1;
  <D.4694>:
  if (i >= nblocks) goto <D.4523>; else goto <D.4715>;
  <D.4715>:
  D.4716 = i * 4096;
  D.4717 = h + D.4716;
  D.4718 = (long unsigned int) D.4717;
  D.4719 = D.4718 >> 12;
  D.4720 = (int) D.4719;
  index = D.4720 & 65535;
  goto <D.4524>;
  <D.4523>:
  D.4692 = 0B;
  return D.4692;
}


GC_number_stack_black_listed (struct hblk * start, struct hblk * endp1)
{
  long unsigned int h.35;
  long unsigned int D.4723;
  int D.4724;
  word * GC_old_stack_bl.36;
  int D.4726;
  unsigned int D.4727;
  unsigned int D.4728;
  word * D.4729;
  long unsigned int D.4730;
  int D.4731;
  long unsigned int D.4732;
  long unsigned int D.4733;
  word D.4736;
  register struct hblk * h;
  word result;

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

    h.35 = (long unsigned int) h;
    D.4723 = h.35 >> 12;
    D.4724 = (int) D.4723;
    index = D.4724 & 65535;
    GC_old_stack_bl.36 = GC_old_stack_bl;
    D.4726 = index >> 5;
    D.4727 = (unsigned int) D.4726;
    D.4728 = D.4727 * 4;
    D.4729 = GC_old_stack_bl.36 + D.4728;
    D.4730 = *D.4729;
    D.4731 = index & 31;
    D.4732 = D.4730 >> D.4731;
    D.4733 = D.4732 & 1;
    if (D.4733 != 0) goto <D.4734>; else goto <D.4735>;
    <D.4734>:
    result = result + 1;
    <D.4735>:
  }
  h = h + 4096;
  <D.4533>:
  if (h < endp1) goto <D.4532>; else goto <D.4534>;
  <D.4534>:
  D.4736 = result;
  return D.4736;
}


