GC_default_print_heap_obj_proc (char * p)
{
  long unsigned int D.4896;
  long int D.4897;
  long int base.0;
  char * base;

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


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

  base = GC_base (p);
  if (base == 0B) goto <D.4899>; else goto <D.4900>;
  <D.4899>:
  if (p == 0B) goto <D.4901>; else goto <D.4902>;
  <D.4901>:
  GC_err_puts ("in register");
  goto <D.4903>;
  <D.4902>:
  GC_err_puts ("in root set");
  <D.4903>:
  goto <D.4904>;
  <D.4900>:
  GC_err_puts ("in object at ");
  GC_print_heap_obj.1 = GC_print_heap_obj;
  GC_print_heap_obj.1 (base);
  <D.4904>:
}


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.4907>; else goto <D.4908>;
  <D.4907>:
  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.4911>; else goto <D.4914>;
  <D.4914>:
  GC_incomplete_normal_bl.6 = GC_incomplete_normal_bl;
  if (GC_incomplete_normal_bl.6 == 0B) goto <D.4911>; else goto <D.4912>;
  <D.4911>:
  GC_err_puts ("Insufficient memory for black list\n");
  exit (1);
  <D.4912>:
  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.4908>:
  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.4918>; else goto <D.4921>;
  <D.4921>:
  GC_incomplete_stack_bl.10 = GC_incomplete_stack_bl;
  if (GC_incomplete_stack_bl.10 == 0B) goto <D.4918>; else goto <D.4919>;
  <D.4918>:
  GC_err_puts ("Insufficient memory for black list\n");
  exit (1);
  <D.4919>:
  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.4925;
  int D.4930;
  void * D.4932;
  long unsigned int D.4933;

  D.4925 = __builtin_constant_p (__len);
  if (D.4925 != 0) goto <D.4926>; else goto <D.4927>;
  <D.4926>:
  if (__len == 0) goto <D.4928>; else goto <D.4929>;
  <D.4928>:
  D.4930 = __builtin_constant_p (__ch);
  if (D.4930 == 0) goto <D.4923>; else goto <D.4931>;
  <D.4931>:
  if (__ch != 0) goto <D.4923>; else goto <D.4924>;
  <D.4923>:
  __warn_memset_zero_len ();
  D.4932 = __dest;
  return D.4932;
  <D.4924>:
  <D.4929>:
  <D.4927>:
  D.4933 = __builtin_object_size (__dest, 0);
  D.4932 = __builtin___memset_chk (__dest, __ch, __len, D.4933);
  return D.4932;
}


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


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

  D.4936 = __builtin_object_size (__dest, 0);
  D.4935 = __builtin___memcpy_chk (__dest, __src, __len, D.4936);
  return D.4935;
}


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.4947;
  long unsigned int D.4948;
  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.4941>; else goto <D.4942>;
  <D.4941>:
  GC_clear_bl (very_old_normal_bl);
  <D.4942>:
  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.4945>; else goto <D.4946>;
  <D.4945>:
  D.4947 = GC_arrays._heapsize;
  GC_total_stack_black_listed.15 = GC_total_stack_black_listed;
  D.4948 = D.4947 / GC_total_stack_black_listed.15;
  GC_black_list_spacing.16 = D.4948 * 4096;
  GC_black_list_spacing = GC_black_list_spacing.16;
  <D.4946>:
  GC_black_list_spacing.17 = GC_black_list_spacing;
  if (GC_black_list_spacing.17 <= 12287) goto <D.4951>; else goto <D.4952>;
  <D.4951>:
  GC_black_list_spacing = 12288;
  <D.4952>:
  GC_black_list_spacing.17 = GC_black_list_spacing;
  if (GC_black_list_spacing.17 > 8388608) goto <D.4953>; else goto <D.4954>;
  <D.4953>:
  GC_black_list_spacing = 8388608;
  <D.4954>:
}


total_stack_black_listed ()
{
  long unsigned int D.4955;
  long unsigned int D.4956;
  long unsigned int D.4957;
  long unsigned int D.4958;
  long unsigned int GC_n_heap_sects.18;
  word D.4960;
  register unsigned int i;
  word total;

  total = 0;
  i = 0;
  goto <D.4893>;
  <D.4892>:
  {
    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.4955 = len / 4096;
    D.4956 = D.4955 * 4096;
    endp1 = start + D.4956;
    D.4957 = GC_number_stack_black_listed (start, endp1);
    total = D.4957 + total;
  }
  i = i + 1;
  <D.4893>:
  D.4958 = (long unsigned int) i;
  GC_n_heap_sects.18 = GC_n_heap_sects;
  if (D.4958 < GC_n_heap_sects.18) goto <D.4892>; else goto <D.4894>;
  <D.4894>:
  D.4960 = total * 4096;
  return D.4960;
}


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.4963>; else goto <D.4964>;
  <D.4963>:
  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.4964>:
  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.4969;
  char D.4970;
  long unsigned int D.4973;
  int D.4974;
  char * p.24;
  struct hdr * D.4978;
  word * GC_old_normal_bl.25;
  int D.4981;
  long unsigned int D.4982;
  long unsigned int D.4983;
  word * D.4984;
  long unsigned int D.4985;
  int D.4986;
  long unsigned int D.4987;
  long unsigned int D.4988;
  word * GC_incomplete_normal_bl.26;
  word * D.4990;
  long unsigned int D.4991;
  long unsigned int D.4992;
  long unsigned int D.4993;

  D.4969 = p & 7;
  D.4970 = GC_arrays._modws_valid_offsets[D.4969];
  if (D.4970 == 0) goto <D.4971>; else goto <D.4972>;
  <D.4971>:
  return;
  <D.4972>:
  {
    register int index;

    D.4973 = p >> 12;
    D.4974 = (int) D.4973;
    index = D.4974 & 65535;
    p.24 = (char *) p;
    D.4978 = GC_find_header (p.24);
    if (D.4978 == 0B) goto <D.4975>; else goto <D.4979>;
    <D.4979>:
    GC_old_normal_bl.25 = GC_old_normal_bl;
    D.4981 = index >> 6;
    D.4982 = (long unsigned int) D.4981;
    D.4983 = D.4982 * 8;
    D.4984 = GC_old_normal_bl.25 + D.4983;
    D.4985 = *D.4984;
    D.4986 = index & 63;
    D.4987 = D.4985 >> D.4986;
    D.4988 = D.4987 & 1;
    if (D.4988 != 0) goto <D.4975>; else goto <D.4976>;
    <D.4975>:
    GC_incomplete_normal_bl.26 = GC_incomplete_normal_bl;
    D.4981 = index >> 6;
    D.4982 = (long unsigned int) D.4981;
    D.4983 = D.4982 * 8;
    D.4990 = GC_incomplete_normal_bl.26 + D.4983;
    GC_incomplete_normal_bl.26 = GC_incomplete_normal_bl;
    D.4981 = index >> 6;
    D.4982 = (long unsigned int) D.4981;
    D.4983 = D.4982 * 8;
    D.4990 = GC_incomplete_normal_bl.26 + D.4983;
    D.4991 = *D.4990;
    D.4986 = index & 63;
    D.4992 = 1 << D.4986;
    D.4993 = D.4991 | D.4992;
    *D.4990 = D.4993;
    <D.4976>:
  }
}


GC_add_to_black_list_stack (word p)
{
  long unsigned int D.4995;
  int D.4996;
  char * p.27;
  struct hdr * D.5000;
  word * GC_old_stack_bl.28;
  int D.5003;
  long unsigned int D.5004;
  long unsigned int D.5005;
  word * D.5006;
  long unsigned int D.5007;
  int D.5008;
  long unsigned int D.5009;
  long unsigned int D.5010;
  word * GC_incomplete_stack_bl.29;
  word * D.5012;
  long unsigned int D.5013;
  long unsigned int D.5014;
  long unsigned int D.5015;
  register int index;

  D.4995 = p >> 12;
  D.4996 = (int) D.4995;
  index = D.4996 & 65535;
  p.27 = (char *) p;
  D.5000 = GC_find_header (p.27);
  if (D.5000 == 0B) goto <D.4997>; else goto <D.5001>;
  <D.5001>:
  GC_old_stack_bl.28 = GC_old_stack_bl;
  D.5003 = index >> 6;
  D.5004 = (long unsigned int) D.5003;
  D.5005 = D.5004 * 8;
  D.5006 = GC_old_stack_bl.28 + D.5005;
  D.5007 = *D.5006;
  D.5008 = index & 63;
  D.5009 = D.5007 >> D.5008;
  D.5010 = D.5009 & 1;
  if (D.5010 != 0) goto <D.4997>; else goto <D.4998>;
  <D.4997>:
  GC_incomplete_stack_bl.29 = GC_incomplete_stack_bl;
  D.5003 = index >> 6;
  D.5004 = (long unsigned int) D.5003;
  D.5005 = D.5004 * 8;
  D.5012 = GC_incomplete_stack_bl.29 + D.5005;
  GC_incomplete_stack_bl.29 = GC_incomplete_stack_bl;
  D.5003 = index >> 6;
  D.5004 = (long unsigned int) D.5003;
  D.5005 = D.5004 * 8;
  D.5012 = GC_incomplete_stack_bl.29 + D.5005;
  D.5013 = *D.5012;
  D.5008 = index & 63;
  D.5014 = 1 << D.5008;
  D.5015 = D.5013 | D.5014;
  *D.5012 = D.5015;
  <D.4998>:
}


GC_is_black_listed (struct hblk * h, word len)
{
  long unsigned int h.30;
  long unsigned int D.5017;
  int D.5018;
  int GC_all_interior_pointers.31;
  word * GC_old_normal_bl.32;
  int D.5025;
  long unsigned int D.5026;
  long unsigned int D.5027;
  word * D.5028;
  long unsigned int D.5029;
  int D.5030;
  long unsigned int D.5031;
  long unsigned int D.5032;
  word * GC_incomplete_normal_bl.33;
  word * D.5035;
  long unsigned int D.5036;
  long unsigned int D.5037;
  long unsigned int D.5038;
  struct hblk * D.5039;
  word * GC_old_stack_bl.34;
  word * D.5043;
  long unsigned int D.5044;
  word * GC_incomplete_stack_bl.35;
  word * D.5047;
  long unsigned int D.5048;
  long unsigned int D.5050;
  long unsigned int D.5051;
  long unsigned int D.5052;
  long unsigned int D.5055;
  long unsigned int D.5056;
  long unsigned int D.5058;
  long unsigned int D.5059;
  sizetype D.5060;
  sizetype D.5061;
  long unsigned int D.5063;
  struct hblk * D.5064;
  long unsigned int D.5065;
  long unsigned int D.5066;
  int D.5067;
  register int index;
  register word i;
  word nblocks;

  h.30 = (long unsigned int) h;
  D.5017 = h.30 >> 12;
  D.5018 = (int) D.5017;
  index = D.5018 & 65535;
  nblocks = len >> 12;
  GC_all_interior_pointers.31 = GC_all_interior_pointers;
  if (GC_all_interior_pointers.31 == 0) goto <D.5020>; else goto <D.5021>;
  <D.5020>:
  GC_old_normal_bl.32 = GC_old_normal_bl;
  D.5025 = index >> 6;
  D.5026 = (long unsigned int) D.5025;
  D.5027 = D.5026 * 8;
  D.5028 = GC_old_normal_bl.32 + D.5027;
  D.5029 = *D.5028;
  D.5030 = index & 63;
  D.5031 = D.5029 >> D.5030;
  D.5032 = D.5031 & 1;
  if (D.5032 != 0) goto <D.5022>; else goto <D.5033>;
  <D.5033>:
  GC_incomplete_normal_bl.33 = GC_incomplete_normal_bl;
  D.5025 = index >> 6;
  D.5026 = (long unsigned int) D.5025;
  D.5027 = D.5026 * 8;
  D.5035 = GC_incomplete_normal_bl.33 + D.5027;
  D.5036 = *D.5035;
  D.5030 = index & 63;
  D.5037 = D.5036 >> D.5030;
  D.5038 = D.5037 & 1;
  if (D.5038 != 0) goto <D.5022>; else goto <D.5023>;
  <D.5022>:
  D.5039 = h + 4096;
  return D.5039;
  <D.5023>:
  <D.5021>:
  i = 0;
  <D.4874>:
  GC_old_stack_bl.34 = GC_old_stack_bl;
  D.5025 = index >> 6;
  D.5026 = (long unsigned int) D.5025;
  D.5027 = D.5026 * 8;
  D.5043 = GC_old_stack_bl.34 + D.5027;
  D.5044 = *D.5043;
  if (D.5044 == 0) goto <D.5045>; else goto <D.5040>;
  <D.5045>:
  GC_incomplete_stack_bl.35 = GC_incomplete_stack_bl;
  D.5025 = index >> 6;
  D.5026 = (long unsigned int) D.5025;
  D.5027 = D.5026 * 8;
  D.5047 = GC_incomplete_stack_bl.35 + D.5027;
  D.5048 = *D.5047;
  if (D.5048 == 0) goto <D.5049>; else goto <D.5040>;
  <D.5049>:
  D.5050 = (long unsigned int) index;
  D.5051 = D.5050 & 63;
  D.5052 = i - D.5051;
  i = D.5052 + 64;
  goto <D.5041>;
  <D.5040>:
  GC_old_stack_bl.34 = GC_old_stack_bl;
  D.5025 = index >> 6;
  D.5026 = (long unsigned int) D.5025;
  D.5027 = D.5026 * 8;
  D.5043 = GC_old_stack_bl.34 + D.5027;
  D.5044 = *D.5043;
  D.5030 = index & 63;
  D.5055 = D.5044 >> D.5030;
  D.5056 = D.5055 & 1;
  if (D.5056 != 0) goto <D.5053>; else goto <D.5057>;
  <D.5057>:
  GC_incomplete_stack_bl.35 = GC_incomplete_stack_bl;
  D.5025 = index >> 6;
  D.5026 = (long unsigned int) D.5025;
  D.5027 = D.5026 * 8;
  D.5047 = GC_incomplete_stack_bl.35 + D.5027;
  D.5048 = *D.5047;
  D.5030 = index & 63;
  D.5058 = D.5048 >> D.5030;
  D.5059 = D.5058 & 1;
  if (D.5059 != 0) goto <D.5053>; else goto <D.5054>;
  <D.5053>:
  D.5060 = i + 1;
  D.5061 = D.5060 * 4096;
  D.5039 = h + D.5061;
  return D.5039;
  <D.5054>:
  i = i + 1;
  <D.5041>:
  if (i >= nblocks) goto <D.4873>; else goto <D.5062>;
  <D.5062>:
  D.5063 = i * 4096;
  D.5064 = h + D.5063;
  D.5065 = (long unsigned int) D.5064;
  D.5066 = D.5065 >> 12;
  D.5067 = (int) D.5066;
  index = D.5067 & 65535;
  goto <D.4874>;
  <D.4873>:
  D.5039 = 0B;
  return D.5039;
}


GC_number_stack_black_listed (struct hblk * start, struct hblk * endp1)
{
  long unsigned int h.36;
  long unsigned int D.5070;
  int D.5071;
  word * GC_old_stack_bl.37;
  int D.5073;
  long unsigned int D.5074;
  long unsigned int D.5075;
  word * D.5076;
  long unsigned int D.5077;
  int D.5078;
  long unsigned int D.5079;
  long unsigned int D.5080;
  word D.5083;
  register struct hblk * h;
  word result;

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

    h.36 = (long unsigned int) h;
    D.5070 = h.36 >> 12;
    D.5071 = (int) D.5070;
    index = D.5071 & 65535;
    GC_old_stack_bl.37 = GC_old_stack_bl;
    D.5073 = index >> 6;
    D.5074 = (long unsigned int) D.5073;
    D.5075 = D.5074 * 8;
    D.5076 = GC_old_stack_bl.37 + D.5075;
    D.5077 = *D.5076;
    D.5078 = index & 63;
    D.5079 = D.5077 >> D.5078;
    D.5080 = D.5079 & 1;
    if (D.5080 != 0) goto <D.5081>; else goto <D.5082>;
    <D.5081>:
    result = result + 1;
    <D.5082>:
  }
  h = h + 4096;
  <D.4883>:
  if (h < endp1) goto <D.4882>; else goto <D.4884>;
  <D.4884>:
  D.5083 = result;
  return D.5083;
}


