GC_default_print_heap_obj_proc (char * p)
{
  long int base.0;
  unsigned int D.4483;
  long int D.4484;
  char * base;

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


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

  base = GC_base (p);
  if (base == 0B) goto <D.4485>; else goto <D.4486>;
  <D.4485>:
  if (p == 0B) goto <D.4487>; else goto <D.4488>;
  <D.4487>:
  GC_err_puts ("in register");
  goto <D.4489>;
  <D.4488>:
  GC_err_puts ("in root set");
  <D.4489>:
  goto <D.4490>;
  <D.4486>:
  GC_err_puts ("in object at ");
  GC_print_heap_obj.1 = GC_print_heap_obj;
  GC_print_heap_obj.1 (base);
  <D.4490>:
}


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.4493>; else goto <D.4494>;
  <D.4493>:
  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.4497>; else goto <D.4500>;
  <D.4500>:
  GC_incomplete_normal_bl.6 = GC_incomplete_normal_bl;
  if (GC_incomplete_normal_bl.6 == 0B) goto <D.4497>; else goto <D.4498>;
  <D.4497>:
  GC_err_puts ("Insufficient memory for black list\n");
  exit (1);
  <D.4498>:
  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.4494>:
  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.4504>; else goto <D.4507>;
  <D.4507>:
  GC_incomplete_stack_bl.10 = GC_incomplete_stack_bl;
  if (GC_incomplete_stack_bl.10 == 0B) goto <D.4504>; else goto <D.4505>;
  <D.4504>:
  GC_err_puts ("Insufficient memory for black list\n");
  exit (1);
  <D.4505>:
  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.4511;
  int D.4516;
  void * D.4518;
  unsigned int D.4519;

  D.4511 = __builtin_constant_p (__len);
  if (D.4511 != 0) goto <D.4512>; else goto <D.4513>;
  <D.4512>:
  if (__len == 0) goto <D.4514>; else goto <D.4515>;
  <D.4514>:
  D.4516 = __builtin_constant_p (__ch);
  if (D.4516 == 0) goto <D.4509>; else goto <D.4517>;
  <D.4517>:
  if (__ch != 0) goto <D.4509>; else goto <D.4510>;
  <D.4509>:
  __warn_memset_zero_len ();
  D.4518 = __dest;
  return D.4518;
  <D.4510>:
  <D.4515>:
  <D.4513>:
  D.4519 = __builtin_object_size (__dest, 0);
  D.4518 = __builtin___memset_chk (__dest, __ch, __len, D.4519);
  return D.4518;
}


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


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

  D.4522 = __builtin_object_size (__dest, 0);
  D.4521 = __builtin___memcpy_chk (__dest, __src, __len, D.4522);
  return D.4521;
}


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.4533;
  long unsigned int D.4534;
  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.4527>; else goto <D.4528>;
  <D.4527>:
  GC_clear_bl (very_old_normal_bl);
  <D.4528>:
  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.4531>; else goto <D.4532>;
  <D.4531>:
  D.4533 = GC_arrays._heapsize;
  GC_total_stack_black_listed.15 = GC_total_stack_black_listed;
  D.4534 = D.4533 / GC_total_stack_black_listed.15;
  GC_black_list_spacing.16 = D.4534 * 4096;
  GC_black_list_spacing = GC_black_list_spacing.16;
  <D.4532>:
  GC_black_list_spacing.17 = GC_black_list_spacing;
  if (GC_black_list_spacing.17 <= 12287) goto <D.4537>; else goto <D.4538>;
  <D.4537>:
  GC_black_list_spacing = 12288;
  <D.4538>:
  GC_black_list_spacing.17 = GC_black_list_spacing;
  if (GC_black_list_spacing.17 > 8388608) goto <D.4539>; else goto <D.4540>;
  <D.4539>:
  GC_black_list_spacing = 8388608;
  <D.4540>:
}


total_stack_black_listed ()
{
  long unsigned int D.4541;
  long unsigned int D.4542;
  long unsigned int D.4543;
  long unsigned int GC_n_heap_sects.18;
  word D.4545;
  register unsigned int i;
  word total;

  total = 0;
  i = 0;
  goto <D.4479>;
  <D.4478>:
  {
    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.4541 = len / 4096;
    D.4542 = D.4541 * 4096;
    endp1 = start + D.4542;
    D.4543 = GC_number_stack_black_listed (start, endp1);
    total = D.4543 + total;
  }
  i = i + 1;
  <D.4479>:
  GC_n_heap_sects.18 = GC_n_heap_sects;
  if (i < GC_n_heap_sects.18) goto <D.4478>; else goto <D.4480>;
  <D.4480>:
  D.4545 = total * 4096;
  return D.4545;
}


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.4548>; else goto <D.4549>;
  <D.4548>:
  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.4549>:
  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.4554;
  char D.4555;
  long unsigned int D.4558;
  int D.4559;
  long unsigned int D.4562;
  struct bottom_index * D.4563;
  long unsigned int D.4564;
  struct hdr * D.4565;
  word * GC_old_normal_bl.24;
  int D.4568;
  unsigned int D.4569;
  unsigned int D.4570;
  word * D.4571;
  long unsigned int D.4572;
  int D.4573;
  long unsigned int D.4574;
  long unsigned int D.4575;
  word * GC_incomplete_normal_bl.25;
  word * D.4577;
  long unsigned int D.4578;
  long unsigned int D.4579;
  long unsigned int D.4580;

  D.4554 = p & 3;
  D.4555 = GC_arrays._modws_valid_offsets[D.4554];
  if (D.4555 == 0) goto <D.4556>; else goto <D.4557>;
  <D.4556>:
  return;
  <D.4557>:
  {
    register int index;

    D.4558 = p >> 12;
    D.4559 = (int) D.4558;
    index = D.4559 & 65535;
    D.4562 = p >> 22;
    D.4563 = GC_arrays._top_index[D.4562];
    D.4558 = p >> 12;
    D.4564 = D.4558 & 1023;
    D.4565 = D.4563->index[D.4564];
    if (D.4565 == 0B) goto <D.4560>; else goto <D.4566>;
    <D.4566>:
    GC_old_normal_bl.24 = GC_old_normal_bl;
    D.4568 = index >> 5;
    D.4569 = (unsigned int) D.4568;
    D.4570 = D.4569 * 4;
    D.4571 = GC_old_normal_bl.24 + D.4570;
    D.4572 = *D.4571;
    D.4573 = index & 31;
    D.4574 = D.4572 >> D.4573;
    D.4575 = D.4574 & 1;
    if (D.4575 != 0) goto <D.4560>; else goto <D.4561>;
    <D.4560>:
    GC_incomplete_normal_bl.25 = GC_incomplete_normal_bl;
    D.4568 = index >> 5;
    D.4569 = (unsigned int) D.4568;
    D.4570 = D.4569 * 4;
    D.4577 = GC_incomplete_normal_bl.25 + D.4570;
    GC_incomplete_normal_bl.25 = GC_incomplete_normal_bl;
    D.4568 = index >> 5;
    D.4569 = (unsigned int) D.4568;
    D.4570 = D.4569 * 4;
    D.4577 = GC_incomplete_normal_bl.25 + D.4570;
    D.4578 = *D.4577;
    D.4573 = index & 31;
    D.4579 = 1 << D.4573;
    D.4580 = D.4578 | D.4579;
    *D.4577 = D.4580;
    <D.4561>:
  }
}


GC_add_to_black_list_stack (word p)
{
  long unsigned int D.4582;
  int D.4583;
  long unsigned int D.4586;
  struct bottom_index * D.4587;
  long unsigned int D.4588;
  struct hdr * D.4589;
  word * GC_old_stack_bl.26;
  int D.4592;
  unsigned int D.4593;
  unsigned int D.4594;
  word * D.4595;
  long unsigned int D.4596;
  int D.4597;
  long unsigned int D.4598;
  long unsigned int D.4599;
  word * GC_incomplete_stack_bl.27;
  word * D.4601;
  long unsigned int D.4602;
  long unsigned int D.4603;
  long unsigned int D.4604;
  register int index;

  D.4582 = p >> 12;
  D.4583 = (int) D.4582;
  index = D.4583 & 65535;
  D.4586 = p >> 22;
  D.4587 = GC_arrays._top_index[D.4586];
  D.4582 = p >> 12;
  D.4588 = D.4582 & 1023;
  D.4589 = D.4587->index[D.4588];
  if (D.4589 == 0B) goto <D.4584>; else goto <D.4590>;
  <D.4590>:
  GC_old_stack_bl.26 = GC_old_stack_bl;
  D.4592 = index >> 5;
  D.4593 = (unsigned int) D.4592;
  D.4594 = D.4593 * 4;
  D.4595 = GC_old_stack_bl.26 + D.4594;
  D.4596 = *D.4595;
  D.4597 = index & 31;
  D.4598 = D.4596 >> D.4597;
  D.4599 = D.4598 & 1;
  if (D.4599 != 0) goto <D.4584>; else goto <D.4585>;
  <D.4584>:
  GC_incomplete_stack_bl.27 = GC_incomplete_stack_bl;
  D.4592 = index >> 5;
  D.4593 = (unsigned int) D.4592;
  D.4594 = D.4593 * 4;
  D.4601 = GC_incomplete_stack_bl.27 + D.4594;
  GC_incomplete_stack_bl.27 = GC_incomplete_stack_bl;
  D.4592 = index >> 5;
  D.4593 = (unsigned int) D.4592;
  D.4594 = D.4593 * 4;
  D.4601 = GC_incomplete_stack_bl.27 + D.4594;
  D.4602 = *D.4601;
  D.4597 = index & 31;
  D.4603 = 1 << D.4597;
  D.4604 = D.4602 | D.4603;
  *D.4601 = D.4604;
  <D.4585>:
}


GC_is_black_listed (struct hblk * h, word len)
{
  long unsigned int h.28;
  long unsigned int D.4606;
  int D.4607;
  int GC_all_interior_pointers.29;
  word * GC_old_normal_bl.30;
  int D.4614;
  unsigned int D.4615;
  unsigned int D.4616;
  word * D.4617;
  long unsigned int D.4618;
  int D.4619;
  long unsigned int D.4620;
  long unsigned int D.4621;
  word * GC_incomplete_normal_bl.31;
  word * D.4624;
  long unsigned int D.4625;
  long unsigned int D.4626;
  long unsigned int D.4627;
  struct hblk * D.4628;
  word * GC_old_stack_bl.32;
  word * D.4632;
  long unsigned int D.4633;
  word * GC_incomplete_stack_bl.33;
  word * D.4636;
  long unsigned int D.4637;
  long unsigned int index.34;
  long unsigned int D.4640;
  long unsigned int D.4641;
  long unsigned int D.4644;
  long unsigned int D.4645;
  long unsigned int D.4647;
  long unsigned int D.4648;
  sizetype D.4649;
  sizetype D.4650;
  long unsigned int D.4652;
  struct hblk * D.4653;
  long unsigned int D.4654;
  long unsigned int D.4655;
  int D.4656;
  register int index;
  register word i;
  word nblocks;

  h.28 = (long unsigned int) h;
  D.4606 = h.28 >> 12;
  D.4607 = (int) D.4606;
  index = D.4607 & 65535;
  nblocks = len >> 12;
  GC_all_interior_pointers.29 = GC_all_interior_pointers;
  if (GC_all_interior_pointers.29 == 0) goto <D.4609>; else goto <D.4610>;
  <D.4609>:
  GC_old_normal_bl.30 = GC_old_normal_bl;
  D.4614 = index >> 5;
  D.4615 = (unsigned int) D.4614;
  D.4616 = D.4615 * 4;
  D.4617 = GC_old_normal_bl.30 + D.4616;
  D.4618 = *D.4617;
  D.4619 = index & 31;
  D.4620 = D.4618 >> D.4619;
  D.4621 = D.4620 & 1;
  if (D.4621 != 0) goto <D.4611>; else goto <D.4622>;
  <D.4622>:
  GC_incomplete_normal_bl.31 = GC_incomplete_normal_bl;
  D.4614 = index >> 5;
  D.4615 = (unsigned int) D.4614;
  D.4616 = D.4615 * 4;
  D.4624 = GC_incomplete_normal_bl.31 + D.4616;
  D.4625 = *D.4624;
  D.4619 = index & 31;
  D.4626 = D.4625 >> D.4619;
  D.4627 = D.4626 & 1;
  if (D.4627 != 0) goto <D.4611>; else goto <D.4612>;
  <D.4611>:
  D.4628 = h + 4096;
  return D.4628;
  <D.4612>:
  <D.4610>:
  i = 0;
  <D.4460>:
  GC_old_stack_bl.32 = GC_old_stack_bl;
  D.4614 = index >> 5;
  D.4615 = (unsigned int) D.4614;
  D.4616 = D.4615 * 4;
  D.4632 = GC_old_stack_bl.32 + D.4616;
  D.4633 = *D.4632;
  if (D.4633 == 0) goto <D.4634>; else goto <D.4629>;
  <D.4634>:
  GC_incomplete_stack_bl.33 = GC_incomplete_stack_bl;
  D.4614 = index >> 5;
  D.4615 = (unsigned int) D.4614;
  D.4616 = D.4615 * 4;
  D.4636 = GC_incomplete_stack_bl.33 + D.4616;
  D.4637 = *D.4636;
  if (D.4637 == 0) goto <D.4638>; else goto <D.4629>;
  <D.4638>:
  index.34 = (long unsigned int) index;
  D.4640 = index.34 & 31;
  D.4641 = i - D.4640;
  i = D.4641 + 32;
  goto <D.4630>;
  <D.4629>:
  GC_old_stack_bl.32 = GC_old_stack_bl;
  D.4614 = index >> 5;
  D.4615 = (unsigned int) D.4614;
  D.4616 = D.4615 * 4;
  D.4632 = GC_old_stack_bl.32 + D.4616;
  D.4633 = *D.4632;
  D.4619 = index & 31;
  D.4644 = D.4633 >> D.4619;
  D.4645 = D.4644 & 1;
  if (D.4645 != 0) goto <D.4642>; else goto <D.4646>;
  <D.4646>:
  GC_incomplete_stack_bl.33 = GC_incomplete_stack_bl;
  D.4614 = index >> 5;
  D.4615 = (unsigned int) D.4614;
  D.4616 = D.4615 * 4;
  D.4636 = GC_incomplete_stack_bl.33 + D.4616;
  D.4637 = *D.4636;
  D.4619 = index & 31;
  D.4647 = D.4637 >> D.4619;
  D.4648 = D.4647 & 1;
  if (D.4648 != 0) goto <D.4642>; else goto <D.4643>;
  <D.4642>:
  D.4649 = i + 1;
  D.4650 = D.4649 * 4096;
  D.4628 = h + D.4650;
  return D.4628;
  <D.4643>:
  i = i + 1;
  <D.4630>:
  if (i >= nblocks) goto <D.4459>; else goto <D.4651>;
  <D.4651>:
  D.4652 = i * 4096;
  D.4653 = h + D.4652;
  D.4654 = (long unsigned int) D.4653;
  D.4655 = D.4654 >> 12;
  D.4656 = (int) D.4655;
  index = D.4656 & 65535;
  goto <D.4460>;
  <D.4459>:
  D.4628 = 0B;
  return D.4628;
}


GC_number_stack_black_listed (struct hblk * start, struct hblk * endp1)
{
  long unsigned int h.35;
  long unsigned int D.4659;
  int D.4660;
  word * GC_old_stack_bl.36;
  int D.4662;
  unsigned int D.4663;
  unsigned int D.4664;
  word * D.4665;
  long unsigned int D.4666;
  int D.4667;
  long unsigned int D.4668;
  long unsigned int D.4669;
  word D.4672;
  register struct hblk * h;
  word result;

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

    h.35 = (long unsigned int) h;
    D.4659 = h.35 >> 12;
    D.4660 = (int) D.4659;
    index = D.4660 & 65535;
    GC_old_stack_bl.36 = GC_old_stack_bl;
    D.4662 = index >> 5;
    D.4663 = (unsigned int) D.4662;
    D.4664 = D.4663 * 4;
    D.4665 = GC_old_stack_bl.36 + D.4664;
    D.4666 = *D.4665;
    D.4667 = index & 31;
    D.4668 = D.4666 >> D.4667;
    D.4669 = D.4668 & 1;
    if (D.4669 != 0) goto <D.4670>; else goto <D.4671>;
    <D.4670>:
    result = result + 1;
    <D.4671>:
  }
  h = h + 4096;
  <D.4469>:
  if (h < endp1) goto <D.4468>; else goto <D.4470>;
  <D.4470>:
  D.4672 = result;
  return D.4672;
}


