GC_default_print_heap_obj_proc (char * p)
{
  long int base.0;
  long unsigned int D.4979;
  long int D.4980;
  char * base;

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


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

  base = GC_base (p);
  if (base == 0B) goto <D.4981>; else goto <D.4982>;
  <D.4981>:
  if (p == 0B) goto <D.4983>; else goto <D.4984>;
  <D.4983>:
  GC_err_puts ("in register");
  goto <D.4985>;
  <D.4984>:
  GC_err_puts ("in root set");
  <D.4985>:
  goto <D.4986>;
  <D.4982>:
  GC_err_puts ("in object at ");
  GC_print_heap_obj.1 = GC_print_heap_obj;
  GC_print_heap_obj.1 (base);
  <D.4986>:
}


GC_bl_init ()
{
  int GC_all_interior_pointers.2;
  char * D.4991;
  char * D.4992;
  word * GC_old_normal_bl.3;
  word * GC_incomplete_normal_bl.4;
  char * D.4998;
  char * D.4999;
  word * GC_old_stack_bl.5;
  word * GC_incomplete_stack_bl.6;

  GC_all_interior_pointers.2 = GC_all_interior_pointers;
  if (GC_all_interior_pointers.2 == 0) goto <D.4989>; else goto <D.4990>;
  <D.4989>:
  D.4991 = GC_scratch_alloc (8192);
  GC_old_normal_bl = D.4991;
  D.4992 = GC_scratch_alloc (8192);
  GC_incomplete_normal_bl = D.4992;
  GC_old_normal_bl.3 = GC_old_normal_bl;
  if (GC_old_normal_bl.3 == 0B) goto <D.4993>; else goto <D.4996>;
  <D.4996>:
  GC_incomplete_normal_bl.4 = GC_incomplete_normal_bl;
  if (GC_incomplete_normal_bl.4 == 0B) goto <D.4993>; else goto <D.4994>;
  <D.4993>:
  GC_err_puts ("Insufficient memory for black list\n");
  exit (1);
  <D.4994>:
  GC_old_normal_bl.3 = GC_old_normal_bl;
  GC_clear_bl (GC_old_normal_bl.3);
  GC_incomplete_normal_bl.4 = GC_incomplete_normal_bl;
  GC_clear_bl (GC_incomplete_normal_bl.4);
  <D.4990>:
  D.4998 = GC_scratch_alloc (8192);
  GC_old_stack_bl = D.4998;
  D.4999 = GC_scratch_alloc (8192);
  GC_incomplete_stack_bl = D.4999;
  GC_old_stack_bl.5 = GC_old_stack_bl;
  if (GC_old_stack_bl.5 == 0B) goto <D.5000>; else goto <D.5003>;
  <D.5003>:
  GC_incomplete_stack_bl.6 = GC_incomplete_stack_bl;
  if (GC_incomplete_stack_bl.6 == 0B) goto <D.5000>; else goto <D.5001>;
  <D.5000>:
  GC_err_puts ("Insufficient memory for black list\n");
  exit (1);
  <D.5001>:
  GC_old_stack_bl.5 = GC_old_stack_bl;
  GC_clear_bl (GC_old_stack_bl.5);
  GC_incomplete_stack_bl.6 = GC_incomplete_stack_bl;
  GC_clear_bl (GC_incomplete_stack_bl.6);
}


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


__attribute__((__artificial__, __gnu_inline__, __always_inline__, __nothrow__, __leaf__))
memset (void * __dest, int __ch, size_t __len)
{
  void * D.5005;
  long unsigned int D.5006;

  D.5006 = __builtin_object_size (__dest, 0);
  D.5005 = __builtin___memset_chk (__dest, __ch, __len, D.5006);
  return D.5005;
}


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


__attribute__((__artificial__, __gnu_inline__, __always_inline__, __nothrow__, __leaf__))
memcpy (void * restrict __dest, const void * restrict __src, size_t __len)
{
  void * D.5008;
  long unsigned int D.5009;

  D.5009 = __builtin_object_size (__dest, 0);
  D.5008 = __builtin___memcpy_chk (__dest, __src, __len, D.5009);
  return D.5008;
}


GC_promote_black_lists ()
{
  word * GC_incomplete_normal_bl.7;
  word * GC_incomplete_stack_bl.8;
  int GC_all_interior_pointers.9;
  long unsigned int D.5016;
  long unsigned int GC_total_stack_black_listed.10;
  long unsigned int D.5020;
  long unsigned int D.5021;
  long unsigned int D.5022;
  long unsigned int GC_black_list_spacing.11;
  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.7 = GC_incomplete_normal_bl;
  GC_old_normal_bl = GC_incomplete_normal_bl.7;
  GC_incomplete_stack_bl.8 = GC_incomplete_stack_bl;
  GC_old_stack_bl = GC_incomplete_stack_bl.8;
  GC_all_interior_pointers.9 = GC_all_interior_pointers;
  if (GC_all_interior_pointers.9 == 0) goto <D.5014>; else goto <D.5015>;
  <D.5014>:
  GC_clear_bl (very_old_normal_bl);
  <D.5015>:
  GC_clear_bl (very_old_stack_bl);
  GC_incomplete_normal_bl = very_old_normal_bl;
  GC_incomplete_stack_bl = very_old_stack_bl;
  D.5016 = total_stack_black_listed ();
  GC_total_stack_black_listed = D.5016;
  GC_total_stack_black_listed.10 = GC_total_stack_black_listed;
  if (GC_total_stack_black_listed.10 != 0) goto <D.5018>; else goto <D.5019>;
  <D.5018>:
  D.5020 = GC_arrays._heapsize;
  GC_total_stack_black_listed.10 = GC_total_stack_black_listed;
  D.5021 = D.5020 / GC_total_stack_black_listed.10;
  D.5022 = D.5021 * 4096;
  GC_black_list_spacing = D.5022;
  <D.5019>:
  GC_black_list_spacing.11 = GC_black_list_spacing;
  if (GC_black_list_spacing.11 <= 12287) goto <D.5024>; else goto <D.5025>;
  <D.5024>:
  GC_black_list_spacing = 12288;
  <D.5025>:
  GC_black_list_spacing.11 = GC_black_list_spacing;
  if (GC_black_list_spacing.11 > 8388608) goto <D.5026>; else goto <D.5027>;
  <D.5026>:
  GC_black_list_spacing = 8388608;
  <D.5027>:
}


total_stack_black_listed ()
{
  sizetype D.5028;
  long unsigned int D.5029;
  long unsigned int D.5030;
  long unsigned int GC_n_heap_sects.12;
  word D.5032;
  register unsigned int i;
  word total;

  total = 0;
  i = 0;
  goto <D.4975>;
  <D.4974>:
  {
    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.5028 = len & 18446744073709547520;
    endp1 = start + D.5028;
    D.5029 = GC_number_stack_black_listed (start, endp1);
    total = D.5029 + total;
  }
  i = i + 1;
  <D.4975>:
  D.5030 = (long unsigned int) i;
  GC_n_heap_sects.12 = GC_n_heap_sects;
  if (D.5030 < GC_n_heap_sects.12) goto <D.4974>; else goto <D.4976>;
  <D.4976>:
  D.5032 = total * 4096;
  return D.5032;
}


GC_unpromote_black_lists ()
{
  int GC_all_interior_pointers.13;
  word * GC_old_normal_bl.14;
  word * GC_incomplete_normal_bl.15;
  word * GC_old_stack_bl.16;
  word * GC_incomplete_stack_bl.17;

  GC_all_interior_pointers.13 = GC_all_interior_pointers;
  if (GC_all_interior_pointers.13 == 0) goto <D.5035>; else goto <D.5036>;
  <D.5035>:
  GC_old_normal_bl.14 = GC_old_normal_bl;
  GC_incomplete_normal_bl.15 = GC_incomplete_normal_bl;
  GC_copy_bl (GC_old_normal_bl.14, GC_incomplete_normal_bl.15);
  <D.5036>:
  GC_old_stack_bl.16 = GC_old_stack_bl;
  GC_incomplete_stack_bl.17 = GC_incomplete_stack_bl;
  GC_copy_bl (GC_old_stack_bl.16, GC_incomplete_stack_bl.17);
}


GC_add_to_black_list_normal (word p)
{
  long unsigned int D.5041;
  char D.5042;
  long unsigned int D.5045;
  int D.5046;
  char * p.18;
  struct hdr * D.5050;
  word * GC_old_normal_bl.19;
  int D.5053;
  long unsigned int D.5054;
  long unsigned int D.5055;
  word * D.5056;
  long unsigned int D.5057;
  int D.5058;
  long unsigned int D.5059;
  long unsigned int D.5060;
  word * GC_incomplete_normal_bl.20;
  word * D.5062;
  long unsigned int D.5063;
  long unsigned int D.5064;
  long unsigned int D.5065;

  D.5041 = p & 7;
  D.5042 = GC_arrays._modws_valid_offsets[D.5041];
  if (D.5042 == 0) goto <D.5043>; else goto <D.5044>;
  <D.5043>:
  return;
  <D.5044>:
  {
    register int index;

    D.5045 = p >> 12;
    D.5046 = (int) D.5045;
    index = D.5046 & 65535;
    p.18 = (char *) p;
    D.5050 = GC_find_header (p.18);
    if (D.5050 == 0B) goto <D.5047>; else goto <D.5051>;
    <D.5051>:
    GC_old_normal_bl.19 = GC_old_normal_bl;
    D.5053 = index >> 6;
    D.5054 = (long unsigned int) D.5053;
    D.5055 = D.5054 * 8;
    D.5056 = GC_old_normal_bl.19 + D.5055;
    D.5057 = *D.5056;
    D.5058 = index & 63;
    D.5059 = D.5057 >> D.5058;
    D.5060 = D.5059 & 1;
    if (D.5060 != 0) goto <D.5047>; else goto <D.5048>;
    <D.5047>:
    GC_incomplete_normal_bl.20 = GC_incomplete_normal_bl;
    D.5053 = index >> 6;
    D.5054 = (long unsigned int) D.5053;
    D.5055 = D.5054 * 8;
    D.5062 = GC_incomplete_normal_bl.20 + D.5055;
    GC_incomplete_normal_bl.20 = GC_incomplete_normal_bl;
    D.5053 = index >> 6;
    D.5054 = (long unsigned int) D.5053;
    D.5055 = D.5054 * 8;
    D.5062 = GC_incomplete_normal_bl.20 + D.5055;
    D.5063 = *D.5062;
    D.5058 = index & 63;
    D.5064 = 1 << D.5058;
    D.5065 = D.5063 | D.5064;
    *D.5062 = D.5065;
    <D.5048>:
  }
}


GC_add_to_black_list_stack (word p)
{
  long unsigned int D.5067;
  int D.5068;
  char * p.21;
  struct hdr * D.5072;
  word * GC_old_stack_bl.22;
  int D.5075;
  long unsigned int D.5076;
  long unsigned int D.5077;
  word * D.5078;
  long unsigned int D.5079;
  int D.5080;
  long unsigned int D.5081;
  long unsigned int D.5082;
  word * GC_incomplete_stack_bl.23;
  word * D.5084;
  long unsigned int D.5085;
  long unsigned int D.5086;
  long unsigned int D.5087;
  register int index;

  D.5067 = p >> 12;
  D.5068 = (int) D.5067;
  index = D.5068 & 65535;
  p.21 = (char *) p;
  D.5072 = GC_find_header (p.21);
  if (D.5072 == 0B) goto <D.5069>; else goto <D.5073>;
  <D.5073>:
  GC_old_stack_bl.22 = GC_old_stack_bl;
  D.5075 = index >> 6;
  D.5076 = (long unsigned int) D.5075;
  D.5077 = D.5076 * 8;
  D.5078 = GC_old_stack_bl.22 + D.5077;
  D.5079 = *D.5078;
  D.5080 = index & 63;
  D.5081 = D.5079 >> D.5080;
  D.5082 = D.5081 & 1;
  if (D.5082 != 0) goto <D.5069>; else goto <D.5070>;
  <D.5069>:
  GC_incomplete_stack_bl.23 = GC_incomplete_stack_bl;
  D.5075 = index >> 6;
  D.5076 = (long unsigned int) D.5075;
  D.5077 = D.5076 * 8;
  D.5084 = GC_incomplete_stack_bl.23 + D.5077;
  GC_incomplete_stack_bl.23 = GC_incomplete_stack_bl;
  D.5075 = index >> 6;
  D.5076 = (long unsigned int) D.5075;
  D.5077 = D.5076 * 8;
  D.5084 = GC_incomplete_stack_bl.23 + D.5077;
  D.5085 = *D.5084;
  D.5080 = index & 63;
  D.5086 = 1 << D.5080;
  D.5087 = D.5085 | D.5086;
  *D.5084 = D.5087;
  <D.5070>:
}


GC_is_black_listed (struct hblk * h, word len)
{
  long unsigned int h.24;
  long unsigned int D.5089;
  int D.5090;
  int GC_all_interior_pointers.25;
  word * GC_old_normal_bl.26;
  int D.5097;
  long unsigned int D.5098;
  long unsigned int D.5099;
  word * D.5100;
  long unsigned int D.5101;
  int D.5102;
  long unsigned int D.5103;
  long unsigned int D.5104;
  word * GC_incomplete_normal_bl.27;
  word * D.5107;
  long unsigned int D.5108;
  long unsigned int D.5109;
  long unsigned int D.5110;
  struct hblk * D.5111;
  word * GC_old_stack_bl.28;
  word * D.5115;
  long unsigned int D.5116;
  word * GC_incomplete_stack_bl.29;
  word * D.5119;
  long unsigned int D.5120;
  long unsigned int D.5122;
  long unsigned int D.5123;
  long unsigned int D.5124;
  long unsigned int D.5127;
  long unsigned int D.5128;
  long unsigned int D.5130;
  long unsigned int D.5131;
  sizetype D.5132;
  sizetype D.5133;
  long unsigned int D.5135;
  struct hblk * D.5136;
  long unsigned int D.5137;
  long unsigned int D.5138;
  int D.5139;
  register int index;
  register word i;
  word nblocks;

  h.24 = (long unsigned int) h;
  D.5089 = h.24 >> 12;
  D.5090 = (int) D.5089;
  index = D.5090 & 65535;
  nblocks = len >> 12;
  GC_all_interior_pointers.25 = GC_all_interior_pointers;
  if (GC_all_interior_pointers.25 == 0) goto <D.5092>; else goto <D.5093>;
  <D.5092>:
  GC_old_normal_bl.26 = GC_old_normal_bl;
  D.5097 = index >> 6;
  D.5098 = (long unsigned int) D.5097;
  D.5099 = D.5098 * 8;
  D.5100 = GC_old_normal_bl.26 + D.5099;
  D.5101 = *D.5100;
  D.5102 = index & 63;
  D.5103 = D.5101 >> D.5102;
  D.5104 = D.5103 & 1;
  if (D.5104 != 0) goto <D.5094>; else goto <D.5105>;
  <D.5105>:
  GC_incomplete_normal_bl.27 = GC_incomplete_normal_bl;
  D.5097 = index >> 6;
  D.5098 = (long unsigned int) D.5097;
  D.5099 = D.5098 * 8;
  D.5107 = GC_incomplete_normal_bl.27 + D.5099;
  D.5108 = *D.5107;
  D.5102 = index & 63;
  D.5109 = D.5108 >> D.5102;
  D.5110 = D.5109 & 1;
  if (D.5110 != 0) goto <D.5094>; else goto <D.5095>;
  <D.5094>:
  D.5111 = h + 4096;
  return D.5111;
  <D.5095>:
  <D.5093>:
  i = 0;
  <D.4956>:
  GC_old_stack_bl.28 = GC_old_stack_bl;
  D.5097 = index >> 6;
  D.5098 = (long unsigned int) D.5097;
  D.5099 = D.5098 * 8;
  D.5115 = GC_old_stack_bl.28 + D.5099;
  D.5116 = *D.5115;
  if (D.5116 == 0) goto <D.5117>; else goto <D.5112>;
  <D.5117>:
  GC_incomplete_stack_bl.29 = GC_incomplete_stack_bl;
  D.5097 = index >> 6;
  D.5098 = (long unsigned int) D.5097;
  D.5099 = D.5098 * 8;
  D.5119 = GC_incomplete_stack_bl.29 + D.5099;
  D.5120 = *D.5119;
  if (D.5120 == 0) goto <D.5121>; else goto <D.5112>;
  <D.5121>:
  D.5122 = (long unsigned int) index;
  D.5123 = D.5122 & 63;
  D.5124 = i - D.5123;
  i = D.5124 + 64;
  goto <D.5113>;
  <D.5112>:
  GC_old_stack_bl.28 = GC_old_stack_bl;
  D.5097 = index >> 6;
  D.5098 = (long unsigned int) D.5097;
  D.5099 = D.5098 * 8;
  D.5115 = GC_old_stack_bl.28 + D.5099;
  D.5116 = *D.5115;
  D.5102 = index & 63;
  D.5127 = D.5116 >> D.5102;
  D.5128 = D.5127 & 1;
  if (D.5128 != 0) goto <D.5125>; else goto <D.5129>;
  <D.5129>:
  GC_incomplete_stack_bl.29 = GC_incomplete_stack_bl;
  D.5097 = index >> 6;
  D.5098 = (long unsigned int) D.5097;
  D.5099 = D.5098 * 8;
  D.5119 = GC_incomplete_stack_bl.29 + D.5099;
  D.5120 = *D.5119;
  D.5102 = index & 63;
  D.5130 = D.5120 >> D.5102;
  D.5131 = D.5130 & 1;
  if (D.5131 != 0) goto <D.5125>; else goto <D.5126>;
  <D.5125>:
  D.5132 = i + 1;
  D.5133 = D.5132 * 4096;
  D.5111 = h + D.5133;
  return D.5111;
  <D.5126>:
  i = i + 1;
  <D.5113>:
  if (i >= nblocks) goto <D.4955>; else goto <D.5134>;
  <D.5134>:
  D.5135 = i * 4096;
  D.5136 = h + D.5135;
  D.5137 = (long unsigned int) D.5136;
  D.5138 = D.5137 >> 12;
  D.5139 = (int) D.5138;
  index = D.5139 & 65535;
  goto <D.4956>;
  <D.4955>:
  D.5111 = 0B;
  return D.5111;
}


GC_number_stack_black_listed (struct hblk * start, struct hblk * endp1)
{
  long unsigned int h.30;
  long unsigned int D.5142;
  int D.5143;
  word * GC_old_stack_bl.31;
  int D.5145;
  long unsigned int D.5146;
  long unsigned int D.5147;
  word * D.5148;
  long unsigned int D.5149;
  int D.5150;
  long unsigned int D.5151;
  long unsigned int D.5152;
  word D.5155;
  register struct hblk * h;
  word result;

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

    h.30 = (long unsigned int) h;
    D.5142 = h.30 >> 12;
    D.5143 = (int) D.5142;
    index = D.5143 & 65535;
    GC_old_stack_bl.31 = GC_old_stack_bl;
    D.5145 = index >> 6;
    D.5146 = (long unsigned int) D.5145;
    D.5147 = D.5146 * 8;
    D.5148 = GC_old_stack_bl.31 + D.5147;
    D.5149 = *D.5148;
    D.5150 = index & 63;
    D.5151 = D.5149 >> D.5150;
    D.5152 = D.5151 & 1;
    if (D.5152 != 0) goto <D.5153>; else goto <D.5154>;
    <D.5153>:
    result = result + 1;
    <D.5154>:
  }
  h = h + 4096;
  <D.4965>:
  if (h < endp1) goto <D.4964>; else goto <D.4966>;
  <D.4966>:
  D.5155 = result;
  return D.5155;
}


