GC_default_print_heap_obj_proc (char * p)
{
  long int base.0;
  unsigned int D.7060;
  long int D.7061;
  char * base;

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


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

  base = GC_base (p);
  if (base == 0B) goto <D.7062>; else goto <D.7063>;
  <D.7062>:
  if (p == 0B) goto <D.7064>; else goto <D.7065>;
  <D.7064>:
  GC_err_puts ("in register");
  goto <D.7066>;
  <D.7065>:
  GC_err_puts ("in root set");
  <D.7066>:
  goto <D.7067>;
  <D.7063>:
  GC_err_puts ("in object at ");
  GC_print_heap_obj.1 = GC_print_heap_obj;
  GC_print_heap_obj.1 (base);
  <D.7067>:
}


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.7070>; else goto <D.7071>;
  <D.7070>:
  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.7074>; else goto <D.7077>;
  <D.7077>:
  GC_incomplete_normal_bl.6 = GC_incomplete_normal_bl;
  if (GC_incomplete_normal_bl.6 == 0B) goto <D.7074>; else goto <D.7075>;
  <D.7074>:
  GC_err_puts ("Insufficient memory for black list\n");
  exit (1);
  <D.7075>:
  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.7071>:
  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.7081>; else goto <D.7084>;
  <D.7084>:
  GC_incomplete_stack_bl.10 = GC_incomplete_stack_bl;
  if (GC_incomplete_stack_bl.10 == 0B) goto <D.7081>; else goto <D.7082>;
  <D.7081>:
  GC_err_puts ("Insufficient memory for black list\n");
  exit (1);
  <D.7082>:
  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.7088;
  int D.7093;
  void * D.7095;
  unsigned int D.7096;

  D.7088 = __builtin_constant_p (__len);
  if (D.7088 != 0) goto <D.7089>; else goto <D.7090>;
  <D.7089>:
  if (__len == 0) goto <D.7091>; else goto <D.7092>;
  <D.7091>:
  D.7093 = __builtin_constant_p (__ch);
  if (D.7093 == 0) goto <D.7086>; else goto <D.7094>;
  <D.7094>:
  if (__ch != 0) goto <D.7086>; else goto <D.7087>;
  <D.7086>:
  __warn_memset_zero_len ();
  D.7095 = __dest;
  return D.7095;
  <D.7087>:
  <D.7092>:
  <D.7090>:
  D.7096 = __builtin_object_size (__dest, 0);
  D.7095 = __builtin___memset_chk (__dest, __ch, __len, D.7096);
  return D.7095;
}


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


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

  D.7099 = __builtin_object_size (__dest, 0);
  D.7098 = __builtin___memcpy_chk (__dest, __src, __len, D.7099);
  return D.7098;
}


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.7110;
  long unsigned int D.7111;
  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.7104>; else goto <D.7105>;
  <D.7104>:
  GC_clear_bl (very_old_normal_bl);
  <D.7105>:
  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.7108>; else goto <D.7109>;
  <D.7108>:
  D.7110 = GC_arrays._heapsize;
  GC_total_stack_black_listed.15 = GC_total_stack_black_listed;
  D.7111 = D.7110 / GC_total_stack_black_listed.15;
  GC_black_list_spacing.16 = D.7111 * 4096;
  GC_black_list_spacing = GC_black_list_spacing.16;
  <D.7109>:
  GC_black_list_spacing.17 = GC_black_list_spacing;
  if (GC_black_list_spacing.17 <= 12287) goto <D.7114>; else goto <D.7115>;
  <D.7114>:
  GC_black_list_spacing = 12288;
  <D.7115>:
  GC_black_list_spacing.17 = GC_black_list_spacing;
  if (GC_black_list_spacing.17 > 8388608) goto <D.7116>; else goto <D.7117>;
  <D.7116>:
  GC_black_list_spacing = 8388608;
  <D.7117>:
}


total_stack_black_listed ()
{
  long unsigned int D.7118;
  long unsigned int D.7119;
  long unsigned int D.7120;
  long unsigned int GC_n_heap_sects.18;
  word D.7122;
  register unsigned int i;
  word total;

  total = 0;
  i = 0;
  goto <D.7054>;
  <D.7053>:
  {
    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.7118 = len / 4096;
    D.7119 = D.7118 * 4096;
    endp1 = start + D.7119;
    D.7120 = GC_number_stack_black_listed (start, endp1);
    total = D.7120 + total;
  }
  i = i + 1;
  <D.7054>:
  GC_n_heap_sects.18 = GC_n_heap_sects;
  if (i < GC_n_heap_sects.18) goto <D.7053>; else goto <D.7055>;
  <D.7055>:
  D.7122 = total * 4096;
  return D.7122;
}


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.7125>; else goto <D.7126>;
  <D.7125>:
  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.7126>:
  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.7131;
  char D.7132;
  long unsigned int D.7135;
  int D.7136;
  long unsigned int D.7139;
  struct bottom_index * D.7140;
  long unsigned int D.7141;
  struct hdr * D.7142;
  word * GC_old_normal_bl.24;
  int D.7145;
  unsigned int D.7146;
  unsigned int D.7147;
  word * D.7148;
  long unsigned int D.7149;
  int D.7150;
  long unsigned int D.7151;
  long unsigned int D.7152;
  word * GC_incomplete_normal_bl.25;
  word * D.7154;
  long unsigned int D.7155;
  long unsigned int D.7156;
  long unsigned int D.7157;

  D.7131 = p & 3;
  D.7132 = GC_arrays._modws_valid_offsets[D.7131];
  if (D.7132 == 0) goto <D.7133>; else goto <D.7134>;
  <D.7133>:
  return;
  <D.7134>:
  {
    register int index;

    D.7135 = p >> 12;
    D.7136 = (int) D.7135;
    index = D.7136 & 65535;
    D.7139 = p >> 22;
    D.7140 = GC_arrays._top_index[D.7139];
    D.7135 = p >> 12;
    D.7141 = D.7135 & 1023;
    D.7142 = D.7140->index[D.7141];
    if (D.7142 == 0B) goto <D.7137>; else goto <D.7143>;
    <D.7143>:
    GC_old_normal_bl.24 = GC_old_normal_bl;
    D.7145 = index >> 5;
    D.7146 = (unsigned int) D.7145;
    D.7147 = D.7146 * 4;
    D.7148 = GC_old_normal_bl.24 + D.7147;
    D.7149 = *D.7148;
    D.7150 = index & 31;
    D.7151 = D.7149 >> D.7150;
    D.7152 = D.7151 & 1;
    if (D.7152 != 0) goto <D.7137>; else goto <D.7138>;
    <D.7137>:
    GC_incomplete_normal_bl.25 = GC_incomplete_normal_bl;
    D.7145 = index >> 5;
    D.7146 = (unsigned int) D.7145;
    D.7147 = D.7146 * 4;
    D.7154 = GC_incomplete_normal_bl.25 + D.7147;
    GC_incomplete_normal_bl.25 = GC_incomplete_normal_bl;
    D.7145 = index >> 5;
    D.7146 = (unsigned int) D.7145;
    D.7147 = D.7146 * 4;
    D.7154 = GC_incomplete_normal_bl.25 + D.7147;
    D.7155 = *D.7154;
    D.7150 = index & 31;
    D.7156 = 1 << D.7150;
    D.7157 = D.7155 | D.7156;
    *D.7154 = D.7157;
    <D.7138>:
  }
}


GC_add_to_black_list_stack (word p)
{
  long unsigned int D.7159;
  int D.7160;
  long unsigned int D.7163;
  struct bottom_index * D.7164;
  long unsigned int D.7165;
  struct hdr * D.7166;
  word * GC_old_stack_bl.26;
  int D.7169;
  unsigned int D.7170;
  unsigned int D.7171;
  word * D.7172;
  long unsigned int D.7173;
  int D.7174;
  long unsigned int D.7175;
  long unsigned int D.7176;
  word * GC_incomplete_stack_bl.27;
  word * D.7178;
  long unsigned int D.7179;
  long unsigned int D.7180;
  long unsigned int D.7181;
  register int index;

  D.7159 = p >> 12;
  D.7160 = (int) D.7159;
  index = D.7160 & 65535;
  D.7163 = p >> 22;
  D.7164 = GC_arrays._top_index[D.7163];
  D.7159 = p >> 12;
  D.7165 = D.7159 & 1023;
  D.7166 = D.7164->index[D.7165];
  if (D.7166 == 0B) goto <D.7161>; else goto <D.7167>;
  <D.7167>:
  GC_old_stack_bl.26 = GC_old_stack_bl;
  D.7169 = index >> 5;
  D.7170 = (unsigned int) D.7169;
  D.7171 = D.7170 * 4;
  D.7172 = GC_old_stack_bl.26 + D.7171;
  D.7173 = *D.7172;
  D.7174 = index & 31;
  D.7175 = D.7173 >> D.7174;
  D.7176 = D.7175 & 1;
  if (D.7176 != 0) goto <D.7161>; else goto <D.7162>;
  <D.7161>:
  GC_incomplete_stack_bl.27 = GC_incomplete_stack_bl;
  D.7169 = index >> 5;
  D.7170 = (unsigned int) D.7169;
  D.7171 = D.7170 * 4;
  D.7178 = GC_incomplete_stack_bl.27 + D.7171;
  GC_incomplete_stack_bl.27 = GC_incomplete_stack_bl;
  D.7169 = index >> 5;
  D.7170 = (unsigned int) D.7169;
  D.7171 = D.7170 * 4;
  D.7178 = GC_incomplete_stack_bl.27 + D.7171;
  D.7179 = *D.7178;
  D.7174 = index & 31;
  D.7180 = 1 << D.7174;
  D.7181 = D.7179 | D.7180;
  *D.7178 = D.7181;
  <D.7162>:
}


GC_is_black_listed (struct hblk * h, word len)
{
  long unsigned int h.28;
  long unsigned int D.7183;
  int D.7184;
  int GC_all_interior_pointers.29;
  word * GC_old_normal_bl.30;
  int D.7191;
  unsigned int D.7192;
  unsigned int D.7193;
  word * D.7194;
  long unsigned int D.7195;
  int D.7196;
  long unsigned int D.7197;
  long unsigned int D.7198;
  word * GC_incomplete_normal_bl.31;
  word * D.7201;
  long unsigned int D.7202;
  long unsigned int D.7203;
  long unsigned int D.7204;
  struct hblk * D.7205;
  word * GC_old_stack_bl.32;
  word * D.7209;
  long unsigned int D.7210;
  word * GC_incomplete_stack_bl.33;
  word * D.7213;
  long unsigned int D.7214;
  long unsigned int index.34;
  long unsigned int D.7217;
  long unsigned int D.7218;
  long unsigned int D.7221;
  long unsigned int D.7222;
  long unsigned int D.7224;
  long unsigned int D.7225;
  sizetype D.7226;
  sizetype D.7227;
  long unsigned int D.7229;
  struct hblk * D.7230;
  long unsigned int D.7231;
  long unsigned int D.7232;
  int D.7233;
  register int index;
  register word i;
  word nblocks;

  h.28 = (long unsigned int) h;
  D.7183 = h.28 >> 12;
  D.7184 = (int) D.7183;
  index = D.7184 & 65535;
  nblocks = len >> 12;
  GC_all_interior_pointers.29 = GC_all_interior_pointers;
  if (GC_all_interior_pointers.29 == 0) goto <D.7186>; else goto <D.7187>;
  <D.7186>:
  GC_old_normal_bl.30 = GC_old_normal_bl;
  D.7191 = index >> 5;
  D.7192 = (unsigned int) D.7191;
  D.7193 = D.7192 * 4;
  D.7194 = GC_old_normal_bl.30 + D.7193;
  D.7195 = *D.7194;
  D.7196 = index & 31;
  D.7197 = D.7195 >> D.7196;
  D.7198 = D.7197 & 1;
  if (D.7198 != 0) goto <D.7188>; else goto <D.7199>;
  <D.7199>:
  GC_incomplete_normal_bl.31 = GC_incomplete_normal_bl;
  D.7191 = index >> 5;
  D.7192 = (unsigned int) D.7191;
  D.7193 = D.7192 * 4;
  D.7201 = GC_incomplete_normal_bl.31 + D.7193;
  D.7202 = *D.7201;
  D.7196 = index & 31;
  D.7203 = D.7202 >> D.7196;
  D.7204 = D.7203 & 1;
  if (D.7204 != 0) goto <D.7188>; else goto <D.7189>;
  <D.7188>:
  D.7205 = h + 4096;
  return D.7205;
  <D.7189>:
  <D.7187>:
  i = 0;
  <D.7035>:
  GC_old_stack_bl.32 = GC_old_stack_bl;
  D.7191 = index >> 5;
  D.7192 = (unsigned int) D.7191;
  D.7193 = D.7192 * 4;
  D.7209 = GC_old_stack_bl.32 + D.7193;
  D.7210 = *D.7209;
  if (D.7210 == 0) goto <D.7211>; else goto <D.7206>;
  <D.7211>:
  GC_incomplete_stack_bl.33 = GC_incomplete_stack_bl;
  D.7191 = index >> 5;
  D.7192 = (unsigned int) D.7191;
  D.7193 = D.7192 * 4;
  D.7213 = GC_incomplete_stack_bl.33 + D.7193;
  D.7214 = *D.7213;
  if (D.7214 == 0) goto <D.7215>; else goto <D.7206>;
  <D.7215>:
  index.34 = (long unsigned int) index;
  D.7217 = index.34 & 31;
  D.7218 = i - D.7217;
  i = D.7218 + 32;
  goto <D.7207>;
  <D.7206>:
  GC_old_stack_bl.32 = GC_old_stack_bl;
  D.7191 = index >> 5;
  D.7192 = (unsigned int) D.7191;
  D.7193 = D.7192 * 4;
  D.7209 = GC_old_stack_bl.32 + D.7193;
  D.7210 = *D.7209;
  D.7196 = index & 31;
  D.7221 = D.7210 >> D.7196;
  D.7222 = D.7221 & 1;
  if (D.7222 != 0) goto <D.7219>; else goto <D.7223>;
  <D.7223>:
  GC_incomplete_stack_bl.33 = GC_incomplete_stack_bl;
  D.7191 = index >> 5;
  D.7192 = (unsigned int) D.7191;
  D.7193 = D.7192 * 4;
  D.7213 = GC_incomplete_stack_bl.33 + D.7193;
  D.7214 = *D.7213;
  D.7196 = index & 31;
  D.7224 = D.7214 >> D.7196;
  D.7225 = D.7224 & 1;
  if (D.7225 != 0) goto <D.7219>; else goto <D.7220>;
  <D.7219>:
  D.7226 = i + 1;
  D.7227 = D.7226 * 4096;
  D.7205 = h + D.7227;
  return D.7205;
  <D.7220>:
  i = i + 1;
  <D.7207>:
  if (i >= nblocks) goto <D.7034>; else goto <D.7228>;
  <D.7228>:
  D.7229 = i * 4096;
  D.7230 = h + D.7229;
  D.7231 = (long unsigned int) D.7230;
  D.7232 = D.7231 >> 12;
  D.7233 = (int) D.7232;
  index = D.7233 & 65535;
  goto <D.7035>;
  <D.7034>:
  D.7205 = 0B;
  return D.7205;
}


GC_number_stack_black_listed (struct hblk * start, struct hblk * endp1)
{
  long unsigned int h.35;
  long unsigned int D.7236;
  int D.7237;
  word * GC_old_stack_bl.36;
  int D.7239;
  unsigned int D.7240;
  unsigned int D.7241;
  word * D.7242;
  long unsigned int D.7243;
  int D.7244;
  long unsigned int D.7245;
  long unsigned int D.7246;
  word D.7249;
  register struct hblk * h;
  word result;

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

    h.35 = (long unsigned int) h;
    D.7236 = h.35 >> 12;
    D.7237 = (int) D.7236;
    index = D.7237 & 65535;
    GC_old_stack_bl.36 = GC_old_stack_bl;
    D.7239 = index >> 5;
    D.7240 = (unsigned int) D.7239;
    D.7241 = D.7240 * 4;
    D.7242 = GC_old_stack_bl.36 + D.7241;
    D.7243 = *D.7242;
    D.7244 = index & 31;
    D.7245 = D.7243 >> D.7244;
    D.7246 = D.7245 & 1;
    if (D.7246 != 0) goto <D.7247>; else goto <D.7248>;
    <D.7247>:
    result = result + 1;
    <D.7248>:
  }
  h = h + 4096;
  <D.7044>:
  if (h < endp1) goto <D.7043>; else goto <D.7045>;
  <D.7045>:
  D.7249 = result;
  return D.7249;
}


