GC_hblk_fl_from_blocks (word blocks_needed)
{
  int D.6253;
  long unsigned int D.6256;
  long unsigned int D.6257;
  unsigned int D.6258;
  unsigned int D.6259;

  if (blocks_needed <= 32) goto <D.6251>; else goto <D.6252>;
  <D.6251>:
  D.6253 = (int) blocks_needed;
  return D.6253;
  <D.6252>:
  if (blocks_needed > 255) goto <D.6254>; else goto <D.6255>;
  <D.6254>:
  D.6253 = 60;
  return D.6253;
  <D.6255>:
  D.6256 = blocks_needed + 18446744073709551584;
  D.6257 = D.6256 / 8;
  D.6258 = (unsigned int) D.6257;
  D.6259 = D.6258 + 32;
  D.6253 = (int) D.6259;
  return D.6253;
}


GC_print_hblkfreelist ()
{
  long int D.6263;
  long unsigned int D.6264;
  long int D.6265;
  long int h.0;
  long int sz.1;
  struct hblk * D.6268;
  long unsigned int D.6272;
  struct hblk * D.6273;
  long unsigned int D.6277;
  long int D.6280;
  long int total_free.2;
  struct hblk * h;
  word total_free;
  struct hdr * hhdr;
  word sz;
  int i;

  total_free = 0;
  i = 0;
  goto <D.6055>;
  <D.6054>:
  h = GC_hblkfreelist[i];
  if (h != 0B) goto <D.6261>; else goto <D.6262>;
  <D.6261>:
  D.6263 = (long int) i;
  D.6264 = GC_free_bytes[i];
  D.6265 = (long int) D.6264;
  GC_printf ("Free list %ld (Total size %ld):\n", D.6263, D.6265, 0, 0, 0, 0);
  <D.6262>:
  goto <D.6052>;
  <D.6051>:
  hhdr = GC_find_header (h);
  sz = hhdr->hb_sz;
  h.0 = (long int) h;
  sz.1 = (long int) sz;
  GC_printf ("\t0x%lx size %lu ", h.0, sz.1, 0, 0, 0, 0);
  total_free = total_free + sz;
  D.6268 = GC_is_black_listed (h, 4096);
  if (D.6268 != 0B) goto <D.6269>; else goto <D.6270>;
  <D.6269>:
  GC_printf ("start black listed\n", 0, 0, 0, 0, 0, 0);
  goto <D.6271>;
  <D.6270>:
  D.6272 = hhdr->hb_sz;
  D.6273 = GC_is_black_listed (h, D.6272);
  if (D.6273 != 0B) goto <D.6274>; else goto <D.6275>;
  <D.6274>:
  GC_printf ("partially black listed\n", 0, 0, 0, 0, 0, 0);
  goto <D.6276>;
  <D.6275>:
  GC_printf ("not black listed\n", 0, 0, 0, 0, 0, 0);
  <D.6276>:
  <D.6271>:
  h = hhdr->hb_next;
  <D.6052>:
  if (h != 0B) goto <D.6051>; else goto <D.6053>;
  <D.6053>:
  i = i + 1;
  <D.6055>:
  if (i <= 60) goto <D.6054>; else goto <D.6056>;
  <D.6056>:
  D.6277 = GC_arrays._large_free_bytes;
  if (D.6277 != total_free) goto <D.6278>; else goto <D.6279>;
  <D.6278>:
  D.6277 = GC_arrays._large_free_bytes;
  D.6280 = (long int) D.6277;
  GC_printf ("GC_large_free_bytes = %lu (INCONSISTENT!!)\n", D.6280, 0, 0, 0, 0, 0);
  <D.6279>:
  total_free.2 = (long int) total_free;
  GC_printf ("Total of %lu bytes on free list\n", total_free.2, 0, 0, 0, 0, 0);
}


free_list_index_of (struct hdr * wanted)
{
  int D.6284;
  struct hblk * h;
  struct hdr * hhdr;
  int i;

  i = 0;
  goto <D.6067>;
  <D.6066>:
  h = GC_hblkfreelist[i];
  goto <D.6064>;
  <D.6063>:
  hhdr = GC_find_header (h);
  if (hhdr == wanted) goto <D.6282>; else goto <D.6283>;
  <D.6282>:
  D.6284 = i;
  return D.6284;
  <D.6283>:
  h = hhdr->hb_next;
  <D.6064>:
  if (h != 0B) goto <D.6063>; else goto <D.6065>;
  <D.6065>:
  i = i + 1;
  <D.6067>:
  if (i <= 60) goto <D.6066>; else goto <D.6068>;
  <D.6068>:
  D.6284 = -1;
  return D.6284;
}


GC_dump_regions ()
{
  char * D.6286;
  long unsigned int D.6287;
  unsigned int D.6288;
  long unsigned int D.6289;
  long unsigned int GC_n_heap_sects.3;
  char * D.6292;
  long int start.4;
  long int end.5;
  long int p.6;
  long unsigned int hhdr.7;
  long int hhdr.8;
  map_entry_type * D.6300;
  map_entry_type * GC_invalid_map.9;
  long unsigned int D.6304;
  long unsigned int D.6305;
  long int D.6306;
  long int D.6312;
  long int D.6316;
  long unsigned int D.6318;
  long int D.6319;
  long unsigned int D.6320;
  long unsigned int D.6321;
  long unsigned int D.6322;
  long unsigned int D.6323;
  unsigned int i;
  char * start;
  char * end;
  char * p;
  size_t bytes;
  struct hdr * hhdr;

  i = 0;
  goto <D.6086>;
  <D.6085>:
  start = GC_arrays._heap_sects[i].hs_start;
  bytes = GC_arrays._heap_sects[i].hs_bytes;
  end = start + bytes;
  goto <D.6078>;
  <D.6077>:
  i = i + 1;
  D.6286 = GC_arrays._heap_sects[i].hs_start;
  D.6287 = GC_arrays._heap_sects[i].hs_bytes;
  end = D.6286 + D.6287;
  <D.6078>:
  D.6288 = i + 1;
  D.6289 = (long unsigned int) D.6288;
  GC_n_heap_sects.3 = GC_n_heap_sects;
  if (D.6289 < GC_n_heap_sects.3) goto <D.6291>; else goto <D.6079>;
  <D.6291>:
  D.6288 = i + 1;
  D.6292 = GC_arrays._heap_sects[D.6288].hs_start;
  if (D.6292 == end) goto <D.6077>; else goto <D.6079>;
  <D.6079>:
  start.4 = (long int) start;
  end.5 = (long int) end;
  GC_printf ("***Section from 0x%lx to 0x%lx\n", start.4, end.5, 0, 0, 0, 0);
  p = start;
  goto <D.6080>;
  <D.6083>:
  hhdr = GC_find_header (p);
  p.6 = (long int) p;
  GC_printf ("\t0x%lx ", p.6, 0, 0, 0, 0, 0);
  hhdr.7 = (long unsigned int) hhdr;
  if (hhdr.7 <= 4095) goto <D.6297>; else goto <D.6298>;
  <D.6297>:
  hhdr.8 = (long int) hhdr;
  GC_printf ("Missing header!!(%ld)\n", hhdr.8, 0, 0, 0, 0, 0);
  p = p + 4096;
  // predicted unlikely by continue predictor.
  goto <D.6080>;
  <D.6298>:
  D.6300 = hhdr->hb_map;
  GC_invalid_map.9 = GC_invalid_map;
  if (D.6300 == GC_invalid_map.9) goto <D.6302>; else goto <D.6303>;
  <D.6302>:
  {
    int correct_index;
    int actual_index;

    D.6304 = hhdr->hb_sz;
    D.6305 = D.6304 >> 12;
    correct_index = GC_hblk_fl_from_blocks (D.6305);
    D.6304 = hhdr->hb_sz;
    D.6306 = (long int) D.6304;
    GC_printf ("\tfree block of size 0x%lx bytes", D.6306, 0, 0, 0, 0, 0);
    if (1 != 0) goto <D.6307>; else goto <D.6308>;
    <D.6307>:
    GC_printf ("\n", 0, 0, 0, 0, 0, 0);
    goto <D.6309>;
    <D.6308>:
    GC_printf ("(unmapped)\n", 0, 0, 0, 0, 0, 0);
    <D.6309>:
    actual_index = free_list_index_of (hhdr);
    if (actual_index == -1) goto <D.6310>; else goto <D.6311>;
    <D.6310>:
    D.6312 = (long int) correct_index;
    GC_printf ("\t\tBlock not on free list %ld!!\n", D.6312, 0, 0, 0, 0, 0);
    goto <D.6313>;
    <D.6311>:
    if (correct_index != actual_index) goto <D.6314>; else goto <D.6315>;
    <D.6314>:
    D.6316 = (long int) actual_index;
    D.6312 = (long int) correct_index;
    GC_printf ("\t\tBlock on list %ld, should be on %ld!!\n", D.6316, D.6312, 0, 0, 0, 0);
    <D.6315>:
    <D.6313>:
    D.6304 = hhdr->hb_sz;
    p = p + D.6304;
  }
  goto <D.6317>;
  <D.6303>:
  D.6304 = hhdr->hb_sz;
  D.6318 = D.6304 << 3;
  D.6319 = (long int) D.6318;
  GC_printf ("\tused for blocks of size 0x%lx bytes\n", D.6319, 0, 0, 0, 0, 0);
  D.6304 = hhdr->hb_sz;
  D.6318 = D.6304 << 3;
  D.6320 = D.6318 + 4095;
  D.6321 = D.6320 >> 12;
  D.6322 = D.6321 * 4096;
  p = p + D.6322;
  <D.6317>:
  <D.6080>:
  if (p < end) goto <D.6083>; else goto <D.6084>;
  <D.6084>:
  i = i + 1;
  <D.6086>:
  D.6323 = (long unsigned int) i;
  GC_n_heap_sects.3 = GC_n_heap_sects;
  if (D.6323 < GC_n_heap_sects.3) goto <D.6085>; else goto <D.6087>;
  <D.6087>:
}


GC_remove_from_fl (struct hdr * hhdr, int n)
{
  long unsigned int D.6326;
  long unsigned int D.6327;
  struct hblk * D.6329;
  struct hblk * D.6332;
  long unsigned int D.6334;
  long unsigned int D.6335;
  long unsigned int D.6336;
  struct bottom_index * D.6338;
  long unsigned int D.6339;
  long unsigned int D.6340;
  long unsigned int D.6341;
  long unsigned int D.6342;
  long unsigned int D.6345;
  long unsigned int D.6346;
  long unsigned int D.6347;
  long unsigned int D.6349;
  long unsigned int D.6350;
  int index;

  if (n == -1) goto <D.6324>; else goto <D.6325>;
  <D.6324>:
  D.6326 = hhdr->hb_sz;
  D.6327 = D.6326 >> 12;
  index = GC_hblk_fl_from_blocks (D.6327);
  goto <D.6328>;
  <D.6325>:
  index = n;
  <D.6328>:
  D.6329 = hhdr->hb_prev;
  if (D.6329 == 0B) goto <D.6330>; else goto <D.6331>;
  <D.6330>:
  D.6332 = hhdr->hb_next;
  GC_hblkfreelist[index] = D.6332;
  goto <D.6333>;
  <D.6331>:
  {
    struct hdr * phdr;

    {
      register struct hdr * * _ha;

      {
        register struct bottom_index * bi;

        {
          register word hi;
          register struct bottom_index * _bi;

          D.6329 = hhdr->hb_prev;
          D.6334 = (long unsigned int) D.6329;
          hi = D.6334 >> 22;
          D.6335 = hi & 2047;
          _bi = GC_arrays._top_index[D.6335];
          goto <D.6106>;
          <D.6105>:
          _bi = _bi->hash_link;
          <D.6106>:
          D.6336 = _bi->key;
          if (D.6336 != hi) goto <D.6337>; else goto <D.6107>;
          <D.6337>:
          D.6338 = GC_arrays._all_nils;
          if (D.6338 != _bi) goto <D.6105>; else goto <D.6107>;
          <D.6107>:
          bi = _bi;
        }
        D.6329 = hhdr->hb_prev;
        D.6334 = (long unsigned int) D.6329;
        D.6339 = D.6334 >> 12;
        D.6340 = D.6339 & 1023;
        _ha = &bi->index[D.6340];
      }
      phdr = *_ha;
    }
    D.6332 = hhdr->hb_next;
    phdr->hb_next = D.6332;
  }
  <D.6333>:
  D.6341 = GC_free_bytes[index];
  D.6326 = hhdr->hb_sz;
  D.6342 = D.6341 - D.6326;
  GC_free_bytes[index] = D.6342;
  D.6332 = hhdr->hb_next;
  if (D.6332 != 0B) goto <D.6343>; else goto <D.6344>;
  <D.6343>:
  {
    struct hdr * nhdr;

    {
      register struct hdr * * _ha;

      {
        register struct bottom_index * bi;

        {
          register word hi;
          register struct bottom_index * _bi;

          D.6332 = hhdr->hb_next;
          D.6345 = (long unsigned int) D.6332;
          hi = D.6345 >> 22;
          D.6346 = hi & 2047;
          _bi = GC_arrays._top_index[D.6346];
          goto <D.6114>;
          <D.6113>:
          _bi = _bi->hash_link;
          <D.6114>:
          D.6347 = _bi->key;
          if (D.6347 != hi) goto <D.6348>; else goto <D.6115>;
          <D.6348>:
          D.6338 = GC_arrays._all_nils;
          if (D.6338 != _bi) goto <D.6113>; else goto <D.6115>;
          <D.6115>:
          bi = _bi;
        }
        D.6332 = hhdr->hb_next;
        D.6345 = (long unsigned int) D.6332;
        D.6349 = D.6345 >> 12;
        D.6350 = D.6349 & 1023;
        _ha = &bi->index[D.6350];
      }
      nhdr = *_ha;
    }
    D.6329 = hhdr->hb_prev;
    nhdr->hb_prev = D.6329;
  }
  <D.6344>:
}


GC_free_block_ending_at (struct hblk * h)
{
  long unsigned int p.10;
  long unsigned int D.6352;
  long unsigned int D.6353;
  struct bottom_index * D.6355;
  long unsigned int D.6356;
  long unsigned int D.6357;
  long unsigned int phdr.11;
  long unsigned int D.6359;
  sizetype D.6360;
  map_entry_type * D.6364;
  map_entry_type * GC_invalid_map.12;
  struct hblk * D.6368;
  struct hblk * D.6369;
  long unsigned int D.6374;
  char * D.6375;
  struct hblk * p;
  struct hdr * phdr;

  p = h + 18446744073709547520;
  {
    register struct hdr * * _ha;

    {
      register struct bottom_index * bi;

      {
        register word hi;
        register struct bottom_index * _bi;

        p.10 = (long unsigned int) p;
        hi = p.10 >> 22;
        D.6352 = hi & 2047;
        _bi = GC_arrays._top_index[D.6352];
        goto <D.6126>;
        <D.6125>:
        _bi = _bi->hash_link;
        <D.6126>:
        D.6353 = _bi->key;
        if (D.6353 != hi) goto <D.6354>; else goto <D.6127>;
        <D.6354>:
        D.6355 = GC_arrays._all_nils;
        if (D.6355 != _bi) goto <D.6125>; else goto <D.6127>;
        <D.6127>:
        bi = _bi;
      }
      p.10 = (long unsigned int) p;
      D.6356 = p.10 >> 12;
      D.6357 = D.6356 & 1023;
      _ha = &bi->index[D.6357];
    }
    phdr = *_ha;
  }
  goto <D.6129>;
  <D.6128>:
  phdr.11 = (long unsigned int) phdr;
  D.6359 = phdr.11 * 4096;
  D.6360 = -D.6359;
  p = p + D.6360;
  phdr = GC_find_header (p);
  <D.6129>:
  if (phdr != 0B) goto <D.6361>; else goto <D.6130>;
  <D.6361>:
  phdr.11 = (long unsigned int) phdr;
  if (phdr.11 <= 4095) goto <D.6128>; else goto <D.6130>;
  <D.6130>:
  if (phdr != 0B) goto <D.6362>; else goto <D.6363>;
  <D.6362>:
  D.6364 = phdr->hb_map;
  GC_invalid_map.12 = GC_invalid_map;
  if (D.6364 == GC_invalid_map.12) goto <D.6366>; else goto <D.6367>;
  <D.6366>:
  D.6368 = p;
  return D.6368;
  <D.6367>:
  D.6368 = 0B;
  return D.6368;
  <D.6363>:
  D.6369 = h + 18446744073709547520;
  p = GC_prev_block (D.6369);
  if (p != 0B) goto <D.6370>; else goto <D.6371>;
  <D.6370>:
  phdr = GC_find_header (p);
  D.6364 = phdr->hb_map;
  GC_invalid_map.12 = GC_invalid_map;
  if (D.6364 == GC_invalid_map.12) goto <D.6372>; else goto <D.6373>;
  <D.6372>:
  D.6374 = phdr->hb_sz;
  D.6375 = p + D.6374;
  if (D.6375 == h) goto <D.6376>; else goto <D.6377>;
  <D.6376>:
  D.6368 = p;
  return D.6368;
  <D.6377>:
  <D.6373>:
  <D.6371>:
  D.6368 = 0B;
  return D.6368;
}


GC_add_to_fl (struct hblk * h, struct hdr * hhdr)
{
  long unsigned int D.6379;
  long unsigned int D.6380;
  long unsigned int D.6381;
  long unsigned int D.6382;
  long unsigned int second.13;
  long unsigned int D.6386;
  long unsigned int D.6387;
  struct bottom_index * D.6389;
  long unsigned int D.6390;
  long unsigned int D.6391;
  int index;
  struct hblk * second;
  struct hdr * second_hdr;

  D.6379 = hhdr->hb_sz;
  D.6380 = D.6379 >> 12;
  index = GC_hblk_fl_from_blocks (D.6380);
  second = GC_hblkfreelist[index];
  GC_hblkfreelist[index] = h;
  D.6381 = GC_free_bytes[index];
  D.6379 = hhdr->hb_sz;
  D.6382 = D.6381 + D.6379;
  GC_free_bytes[index] = D.6382;
  hhdr->hb_next = second;
  hhdr->hb_prev = 0B;
  if (second != 0B) goto <D.6383>; else goto <D.6384>;
  <D.6383>:
  {
    register struct hdr * * _ha;

    {
      register struct bottom_index * bi;

      {
        register word hi;
        register struct bottom_index * _bi;

        second.13 = (long unsigned int) second;
        hi = second.13 >> 22;
        D.6386 = hi & 2047;
        _bi = GC_arrays._top_index[D.6386];
        goto <D.6143>;
        <D.6142>:
        _bi = _bi->hash_link;
        <D.6143>:
        D.6387 = _bi->key;
        if (D.6387 != hi) goto <D.6388>; else goto <D.6144>;
        <D.6388>:
        D.6389 = GC_arrays._all_nils;
        if (D.6389 != _bi) goto <D.6142>; else goto <D.6144>;
        <D.6144>:
        bi = _bi;
      }
      second.13 = (long unsigned int) second;
      D.6390 = second.13 >> 12;
      D.6391 = D.6390 & 1023;
      _ha = &bi->index[D.6391];
    }
    second_hdr = *_ha;
  }
  second_hdr->hb_prev = h;
  <D.6384>:
  GC_invalidate_map (hhdr);
}


GC_get_first_part (struct hblk * h, struct hdr * hhdr, word bytes, int index)
{
  struct hblk * D.6394;
  long unsigned int h.14;
  long unsigned int D.6396;
  void (*<T789>) (char *, GC_word) GC_current_warn_proc.15;
  long unsigned int D.6400;
  word total_size;
  struct hblk * rest;
  struct hdr * rest_hdr;

  total_size = hhdr->hb_sz;
  GC_remove_from_fl (hhdr, index);
  if (total_size == bytes) goto <D.6392>; else goto <D.6393>;
  <D.6392>:
  D.6394 = h;
  return D.6394;
  <D.6393>:
  h.14 = (long unsigned int) h;
  D.6396 = h.14 + bytes;
  rest = (struct hblk *) D.6396;
  rest_hdr = GC_install_header (rest);
  if (rest_hdr == 0B) goto <D.6397>; else goto <D.6398>;
  <D.6397>:
  GC_current_warn_proc.15 = GC_current_warn_proc;
  GC_current_warn_proc.15 ("GC Warning: Header allocation failed: Dropping block.\n", 0);
  D.6394 = 0B;
  return D.6394;
  <D.6398>:
  D.6400 = total_size - bytes;
  rest_hdr->hb_sz = D.6400;
  rest_hdr->hb_flags = 0;
  GC_add_to_fl (rest, rest_hdr);
  D.6394 = h;
  return D.6394;
}


GC_split_block (struct hblk * h, struct hdr * hhdr, struct hblk * n, struct hdr * nhdr, int index)
{
  long unsigned int n.16;
  long unsigned int h.17;
  long unsigned int D.6404;
  struct hdr * D.6407;
  struct hdr * D.6411;
  long unsigned int D.6412;
  long unsigned int D.6413;
  word total_size;
  word h_size;
  struct hblk * prev;
  struct hblk * next;

  total_size = hhdr->hb_sz;
  n.16 = (long unsigned int) n;
  h.17 = (long unsigned int) h;
  h_size = n.16 - h.17;
  prev = hhdr->hb_prev;
  next = hhdr->hb_next;
  nhdr->hb_prev = prev;
  nhdr->hb_next = next;
  D.6404 = total_size - h_size;
  nhdr->hb_sz = D.6404;
  nhdr->hb_flags = 0;
  if (prev != 0B) goto <D.6405>; else goto <D.6406>;
  <D.6405>:
  D.6407 = GC_find_header (prev);
  D.6407->hb_next = n;
  goto <D.6408>;
  <D.6406>:
  GC_hblkfreelist[index] = n;
  <D.6408>:
  if (next != 0B) goto <D.6409>; else goto <D.6410>;
  <D.6409>:
  D.6411 = GC_find_header (next);
  D.6411->hb_prev = n;
  <D.6410>:
  D.6412 = GC_free_bytes[index];
  D.6413 = D.6412 - h_size;
  GC_free_bytes[index] = D.6413;
  hhdr->hb_sz = h_size;
  GC_add_to_fl (h, hhdr);
  GC_invalidate_map (nhdr);
}


GC_allochblk (word sz, int kind, unsigned int flags)
{
  long unsigned int D.6414;
  long unsigned int D.6415;
  struct hblk * D.6418;
  word blocks;
  int start_list;
  int i;

  D.6414 = sz << 3;
  D.6415 = D.6414 + 4095;
  blocks = D.6415 >> 12;
  start_list = GC_hblk_fl_from_blocks (blocks);
  i = start_list;
  goto <D.6176>;
  <D.6175>:
  {
    struct hblk * result;

    result = GC_allochblk_nth (sz, kind, flags, i);
    if (result != 0B) goto <D.6416>; else goto <D.6417>;
    <D.6416>:
    D.6418 = result;
    return D.6418;
    <D.6417>:
  }
  i = i + 1;
  <D.6176>:
  if (i <= 60) goto <D.6175>; else goto <D.6177>;
  <D.6177>:
  D.6418 = 0B;
  return D.6418;
}


GC_allochblk_nth (word sz, int kind, unsigned char flags, int n)
{
  long unsigned int D.6420;
  long unsigned int D.6421;
  long unsigned int D.6422;
  long unsigned int D.6423;
  long unsigned int hbp.18;
  long unsigned int D.6425;
  long unsigned int D.6426;
  struct bottom_index * D.6428;
  long unsigned int D.6429;
  long unsigned int D.6430;
  long unsigned int D.6431;
  int GC_use_entire_heap.19;
  int GC_dont_gc.20;
  long unsigned int D.6444;
  long unsigned int D.6445;
  long unsigned int D.6446;
  long unsigned int D.6447;
  int GC_incremental.21;
  long unsigned int GC_time_limit.22;
  int D.6453;
  long unsigned int D.6456;
  int D.6457;
  long unsigned int D.6460;
  long unsigned int D.6461;
  long unsigned int D.6462;
  long unsigned int thishbp.23;
  long unsigned int D.6468;
  long unsigned int D.6469;
  long unsigned int D.6471;
  long unsigned int D.6472;
  long unsigned int D.6473;
  long unsigned int size_needed.24;
  struct hblk * D.6479;
  int D.6484;
  sizetype size_avail.25;
  sizetype size_needed.26;
  sizetype D.6490;
  signed_word iftmp.27;
  int D.6492;
  int D.6493;
  long unsigned int eff_size_needed.28;
  long int hbp.29;
  long int lasthbp.30;
  long int D.6501;
  long unsigned int GC_black_list_spacing.31;
  long int GC_black_list_spacing.32;
  long int D.6514;
  long int GC_large_alloc_warn_suppressed.33;
  long int GC_large_alloc_warn_suppressed.34;
  long int GC_large_alloc_warn_interval.35;
  void (*<T789>) (char *, GC_word) GC_current_warn_proc.36;
  int GC_find_leak.37;
  unsigned int count.38;
  unsigned int count.39;
  unsigned int D.6531;
  long unsigned int D.6534;
  long unsigned int D.6535;
  long unsigned int D.6536;
  long unsigned int D.6537;
  long unsigned int D.6538;
  long unsigned int D.6539;
  int GC_debugging_started.40;
  struct hblk * D.6548;
  int D.6553;
  int D.6556;
  long int D.6559;
  long unsigned int D.6560;
  long unsigned int D.6561;
  _Bool D.6562;
  int D.6563;
  long unsigned int D.6564;
  register struct hblk * hbp;
  register struct hdr * hhdr;
  register struct hblk * thishbp;
  register struct hdr * thishdr;
  signed_word size_needed;
  signed_word size_avail;

  D.6420 = sz << 3;
  D.6421 = D.6420 + 4095;
  D.6422 = D.6421 >> 12;
  D.6423 = D.6422 * 4096;
  size_needed = (signed_word) D.6423;
  hbp = GC_hblkfreelist[n];
  goto <D.6223>;
  <D.6222>:
  {
    register struct hdr * * _ha;

    {
      register struct bottom_index * bi;

      {
        register word hi;
        register struct bottom_index * _bi;

        hbp.18 = (long unsigned int) hbp;
        hi = hbp.18 >> 22;
        D.6425 = hi & 2047;
        _bi = GC_arrays._top_index[D.6425];
        goto <D.6195>;
        <D.6194>:
        _bi = _bi->hash_link;
        <D.6195>:
        D.6426 = _bi->key;
        if (D.6426 != hi) goto <D.6427>; else goto <D.6196>;
        <D.6427>:
        D.6428 = GC_arrays._all_nils;
        if (D.6428 != _bi) goto <D.6194>; else goto <D.6196>;
        <D.6196>:
        bi = _bi;
      }
      hbp.18 = (long unsigned int) hbp;
      D.6429 = hbp.18 >> 12;
      D.6430 = D.6429 & 1023;
      _ha = &bi->index[D.6430];
    }
    hhdr = *_ha;
  }
  D.6431 = hhdr->hb_sz;
  size_avail = (signed_word) D.6431;
  if (size_avail < size_needed) goto <D.6432>; else goto <D.6433>;
  <D.6432>:
  // predicted unlikely by continue predictor.
  goto <D.6197>;
  <D.6433>:
  if (size_avail != size_needed) goto <D.6436>; else goto <D.6437>;
  <D.6436>:
  GC_use_entire_heap.19 = GC_use_entire_heap;
  if (GC_use_entire_heap.19 == 0) goto <D.6439>; else goto <D.6440>;
  <D.6439>:
  GC_dont_gc.20 = GC_dont_gc;
  if (GC_dont_gc.20 == 0) goto <D.6442>; else goto <D.6443>;
  <D.6442>:
  D.6444 = GC_arrays._heapsize;
  D.6445 = GC_arrays._large_free_bytes;
  D.6446 = D.6444 - D.6445;
  D.6447 = GC_arrays._requested_heapsize;
  if (D.6446 >= D.6447) goto <D.6448>; else goto <D.6449>;
  <D.6448>:
  GC_incremental.21 = GC_incremental;
  if (GC_incremental.21 == 0) goto <D.6434>; else goto <D.6451>;
  <D.6451>:
  GC_time_limit.22 = GC_time_limit;
  if (GC_time_limit.22 == 999999) goto <D.6434>; else goto <D.6435>;
  <D.6434>:
  D.6453 = GC_should_collect ();
  if (D.6453 != 0) goto <D.6454>; else goto <D.6455>;
  <D.6454>:
  D.6456 = GC_arrays._large_allocd_bytes;
  D.6457 = GC_enough_large_bytes_left (D.6456, n);
  if (D.6457 == 0) goto <D.6458>; else goto <D.6459>;
  <D.6458>:
  // predicted unlikely by continue predictor.
  goto <D.6197>;
  <D.6459>:
  D.6460 = GC_arrays._finalizer_mem_freed;
  D.6461 = D.6460 << 3;
  D.6444 = GC_arrays._heapsize;
  D.6462 = D.6444 >> 4;
  if (D.6461 > D.6462) goto <D.6463>; else goto <D.6464>;
  <D.6463>:
  // predicted unlikely by continue predictor.
  goto <D.6197>;
  <D.6464>:
  <D.6455>:
  <D.6435>:
  <D.6449>:
  <D.6443>:
  <D.6440>:
  <D.6437>:
  {
    signed_word next_size;

    thishbp = hhdr->hb_next;
    if (thishbp != 0B) goto <D.6465>; else goto <D.6466>;
    <D.6465>:
    {
      register struct hdr * * _ha;

      {
        register struct bottom_index * bi;

        {
          register word hi;
          register struct bottom_index * _bi;

          thishbp.23 = (long unsigned int) thishbp;
          hi = thishbp.23 >> 22;
          D.6468 = hi & 2047;
          _bi = GC_arrays._top_index[D.6468];
          goto <D.6204>;
          <D.6203>:
          _bi = _bi->hash_link;
          <D.6204>:
          D.6469 = _bi->key;
          if (D.6469 != hi) goto <D.6470>; else goto <D.6205>;
          <D.6470>:
          D.6428 = GC_arrays._all_nils;
          if (D.6428 != _bi) goto <D.6203>; else goto <D.6205>;
          <D.6205>:
          bi = _bi;
        }
        thishbp.23 = (long unsigned int) thishbp;
        D.6471 = thishbp.23 >> 12;
        D.6472 = D.6471 & 1023;
        _ha = &bi->index[D.6472];
      }
      thishdr = *_ha;
    }
    D.6473 = thishdr->hb_sz;
    next_size = (signed_word) D.6473;
    if (next_size < size_avail) goto <D.6474>; else goto <D.6475>;
    <D.6474>:
    if (next_size >= size_needed) goto <D.6476>; else goto <D.6477>;
    <D.6476>:
    size_needed.24 = (long unsigned int) size_needed;
    D.6479 = GC_is_black_listed (thishbp, size_needed.24);
    if (D.6479 == 0B) goto <D.6480>; else goto <D.6481>;
    <D.6480>:
    // predicted unlikely by continue predictor.
    goto <D.6197>;
    <D.6481>:
    <D.6477>:
    <D.6475>:
    <D.6466>:
  }
  D.6484 = kind & -2;
  if (D.6484 != 2) goto <D.6485>; else goto <D.6486>;
  <D.6485>:
  if (kind != 0) goto <D.6482>; else goto <D.6487>;
  <D.6487>:
  size_needed.24 = (long unsigned int) size_needed;
  if (size_needed.24 > 8192) goto <D.6482>; else goto <D.6483>;
  <D.6482>:
  {
    struct hblk * lasthbp;
    char * search_end;
    signed_word orig_avail;
    signed_word eff_size_needed;

    lasthbp = hbp;
    size_avail.25 = (sizetype) size_avail;
    size_needed.26 = (sizetype) size_needed;
    D.6490 = size_avail.25 - size_needed.26;
    search_end = hbp + D.6490;
    orig_avail = size_avail;
    D.6492 = (int) flags;
    D.6493 = D.6492 & 1;
    if (D.6493 == 0) goto <D.6494>; else goto <D.6495>;
    <D.6494>:
    iftmp.27 = size_needed;
    goto <D.6496>;
    <D.6495>:
    iftmp.27 = 4096;
    <D.6496>:
    eff_size_needed = iftmp.27;
    goto <D.6211>;
    <D.6210>:
    lasthbp = thishbp;
    <D.6211>:
    if (lasthbp <= search_end) goto <D.6497>; else goto <D.6212>;
    <D.6497>:
    eff_size_needed.28 = (long unsigned int) eff_size_needed;
    thishbp = GC_is_black_listed (lasthbp, eff_size_needed.28);
    if (thishbp != 0B) goto <D.6210>; else goto <D.6212>;
    <D.6212>:
    hbp.29 = (long int) hbp;
    lasthbp.30 = (long int) lasthbp;
    D.6501 = hbp.29 - lasthbp.30;
    size_avail = D.6501 + size_avail;
    thishbp = lasthbp;
    if (size_avail >= size_needed) goto <D.6502>; else goto <D.6503>;
    <D.6502>:
    if (thishbp != hbp) goto <D.6504>; else goto <D.6505>;
    <D.6504>:
    thishdr = GC_install_header (thishbp);
    if (thishdr != 0B) goto <D.6506>; else goto <D.6507>;
    <D.6506>:
    GC_split_block (hbp, hhdr, thishbp, thishdr, n);
    hbp = thishbp;
    hhdr = thishdr;
    <D.6507>:
    <D.6505>:
    goto <D.6508>;
    <D.6503>:
    GC_black_list_spacing.31 = GC_black_list_spacing;
    GC_black_list_spacing.32 = (long int) GC_black_list_spacing.31;
    if (GC_black_list_spacing.32 < size_needed) goto <D.6513>; else goto <D.6509>;
    <D.6513>:
    D.6514 = orig_avail - size_needed;
    GC_black_list_spacing.31 = GC_black_list_spacing;
    GC_black_list_spacing.32 = (long int) GC_black_list_spacing.31;
    if (D.6514 > GC_black_list_spacing.32) goto <D.6515>; else goto <D.6509>;
    <D.6515>:
    GC_large_alloc_warn_suppressed.33 = GC_large_alloc_warn_suppressed;
    GC_large_alloc_warn_suppressed.34 = GC_large_alloc_warn_suppressed.33 + 1;
    GC_large_alloc_warn_suppressed = GC_large_alloc_warn_suppressed.34;
    GC_large_alloc_warn_suppressed.33 = GC_large_alloc_warn_suppressed;
    GC_large_alloc_warn_interval.35 = GC_large_alloc_warn_interval;
    if (GC_large_alloc_warn_suppressed.33 >= GC_large_alloc_warn_interval.35) goto <D.6519>; else goto <D.6520>;
    <D.6519>:
    GC_current_warn_proc.36 = GC_current_warn_proc;
    size_needed.24 = (long unsigned int) size_needed;
    GC_current_warn_proc.36 ("GC Warning: Repeated allocation of very large block (appr. size %ld):\n\tMay lead to memory leak and poor performance.\n", size_needed.24);
    GC_large_alloc_warn_suppressed = 0;
    <D.6520>:
    size_avail = orig_avail;
    goto <D.6510>;
    <D.6509>:
    if (size_avail == 0) goto <D.6522>; else goto <D.6523>;
    <D.6522>:
    if (size_needed == 4096) goto <D.6524>; else goto <D.6525>;
    <D.6524>:
    GC_find_leak.37 = GC_find_leak;
    if (GC_find_leak.37 == 0) goto <D.6527>; else goto <D.6528>;
    <D.6527>:
    {
      static unsigned int count = 0;

      count.38 = count;
      count.39 = count.38 + 1;
      count = count.39;
      count.38 = count;
      D.6531 = count.38 & 3;
      if (D.6531 == 0) goto <D.6532>; else goto <D.6533>;
      <D.6532>:
      {
        word total_size;
        struct hblk * limit;
        struct hblk * h;
        struct hblk * prev;

        total_size = hhdr->hb_sz;
        D.6534 = total_size >> 12;
        D.6535 = D.6534 * 4096;
        limit = hbp + D.6535;
        prev = hhdr->hb_prev;
        D.6536 = GC_arrays._words_wasted;
        D.6537 = total_size >> 3;
        D.6538 = D.6536 + D.6537;
        GC_arrays._words_wasted = D.6538;
        D.6445 = GC_arrays._large_free_bytes;
        D.6539 = D.6445 - total_size;
        GC_arrays._large_free_bytes = D.6539;
        GC_remove_from_fl (hhdr, n);
        h = hbp;
        goto <D.6219>;
        <D.6218>:
        if (h == hbp) goto <D.6540>; else goto <D.6542>;
        <D.6542>:
        hhdr = GC_install_header (h);
        if (hhdr != 0B) goto <D.6540>; else goto <D.6541>;
        <D.6540>:
        setup_header (hhdr, 512, 0, 0);
        GC_debugging_started.40 = GC_debugging_started;
        if (GC_debugging_started.40 != 0) goto <D.6544>; else goto <D.6545>;
        <D.6544>:
        memset (h, 0, 4096);
        <D.6545>:
        <D.6541>:
        h = h + 4096;
        <D.6219>:
        if (h < limit) goto <D.6218>; else goto <D.6220>;
        <D.6220>:
        hbp = prev;
        if (hbp == 0B) goto <D.6546>; else goto <D.6547>;
        <D.6546>:
        D.6492 = (int) flags;
        D.6548 = GC_allochblk_nth (sz, kind, D.6492, n);
        return D.6548;
        <D.6547>:
        hhdr = GC_find_header (hbp);
      }
      <D.6533>:
    }
    <D.6528>:
    <D.6525>:
    <D.6523>:
    <D.6510>:
    <D.6508>:
  }
  <D.6483>:
  <D.6486>:
  if (size_avail >= size_needed) goto <D.6549>; else goto <D.6550>;
  <D.6549>:
  hbp = GC_get_first_part (hbp, hhdr, size_needed, n);
  goto <D.6221>;
  <D.6550>:
  <D.6197>:
  hbp = hhdr->hb_next;
  <D.6223>:
  if (hbp != 0B) goto <D.6222>; else goto <D.6221>;
  <D.6221>:
  if (hbp == 0B) goto <D.6551>; else goto <D.6552>;
  <D.6551>:
  D.6548 = 0B;
  return D.6548;
  <D.6552>:
  size_needed.24 = (long unsigned int) size_needed;
  D.6553 = GC_install_counts (hbp, size_needed.24);
  if (D.6553 == 0) goto <D.6554>; else goto <D.6555>;
  <D.6554>:
  D.6548 = 0B;
  return D.6548;
  <D.6555>:
  D.6492 = (int) flags;
  D.6556 = setup_header (hhdr, sz, kind, D.6492);
  if (D.6556 == 0) goto <D.6557>; else goto <D.6558>;
  <D.6557>:
  size_needed.24 = (long unsigned int) size_needed;
  GC_remove_counts (hbp, size_needed.24);
  D.6548 = 0B;
  return D.6548;
  <D.6558>:
  D.6559 = size_needed >> 12;
  D.6560 = (long unsigned int) D.6559;
  D.6561 = hhdr->hb_descr;
  D.6562 = D.6561 == 0;
  D.6563 = (int) D.6562;
  GC_remove_protection (hbp, D.6560, D.6563);
  {
    extern unsigned int GC_fail_count;

    GC_fail_count = 0;
  }
  D.6445 = GC_arrays._large_free_bytes;
  size_needed.24 = (long unsigned int) size_needed;
  D.6564 = D.6445 - size_needed.24;
  GC_arrays._large_free_bytes = D.6564;
  D.6548 = hbp;
  return D.6548;
}


GC_enough_large_bytes_left (word bytes, int n)
{
  long unsigned int D.6566;
  long unsigned int D.6567;
  GC_bool D.6570;
  int i;

  i = 60;
  goto <D.6039>;
  <D.6038>:
  D.6566 = GC_free_bytes[i];
  bytes = D.6566 + bytes;
  D.6567 = GC_arrays._max_large_allocd_bytes;
  if (D.6567 < bytes) goto <D.6568>; else goto <D.6569>;
  <D.6568>:
  D.6570 = 1;
  return D.6570;
  <D.6569>:
  i = i + -1;
  <D.6039>:
  if (i >= n) goto <D.6038>; else goto <D.6040>;
  <D.6040>:
  D.6570 = 0;
  return D.6570;
}


memset (void * __dest, int __ch, size_t __len)
{
  int D.6574;
  int D.6579;
  void * D.6581;
  long unsigned int D.6582;

  D.6574 = __builtin_constant_p (__len);
  if (D.6574 != 0) goto <D.6575>; else goto <D.6576>;
  <D.6575>:
  if (__len == 0) goto <D.6577>; else goto <D.6578>;
  <D.6577>:
  D.6579 = __builtin_constant_p (__ch);
  if (D.6579 == 0) goto <D.6572>; else goto <D.6580>;
  <D.6580>:
  if (__ch != 0) goto <D.6572>; else goto <D.6573>;
  <D.6572>:
  __warn_memset_zero_len ();
  D.6581 = __dest;
  return D.6581;
  <D.6573>:
  <D.6578>:
  <D.6576>:
  D.6582 = __builtin_object_size (__dest, 0);
  D.6581 = __builtin___memset_chk (__dest, __ch, __len, D.6582);
  return D.6581;
}


setup_header (struct hdr * hhdr, word sz, int kind, unsigned char flags)
{
  int D.6584;
  GC_bool D.6587;
  word iftmp.41;
  map_entry_type * D.6592;
  unsigned char D.6593;
  int D.6594;
  long unsigned int D.6597;
  long unsigned int GC_gc_no.42;
  short unsigned int D.6599;
  register word descr;

  D.6584 = GC_add_map_entry (sz);
  if (D.6584 == 0) goto <D.6585>; else goto <D.6586>;
  <D.6585>:
  D.6587 = 0;
  return D.6587;
  <D.6586>:
  if (sz <= 256) goto <D.6589>; else goto <D.6590>;
  <D.6589>:
  iftmp.41 = sz;
  goto <D.6591>;
  <D.6590>:
  iftmp.41 = 0;
  <D.6591>:
  D.6592 = GC_arrays._obj_map[iftmp.41];
  hhdr->hb_map = D.6592;
  hhdr->hb_sz = sz;
  D.6593 = (unsigned char) kind;
  hhdr->hb_obj_kind = D.6593;
  hhdr->hb_flags = flags;
  descr = GC_obj_kinds[kind].ok_descriptor;
  D.6594 = GC_obj_kinds[kind].ok_relocate_descr;
  if (D.6594 != 0) goto <D.6595>; else goto <D.6596>;
  <D.6595>:
  D.6597 = sz << 3;
  descr = D.6597 + descr;
  <D.6596>:
  hhdr->hb_descr = descr;
  GC_clear_hdr_marks (hhdr);
  GC_gc_no.42 = GC_gc_no;
  D.6599 = (short unsigned int) GC_gc_no.42;
  hhdr->hb_last_reclaimed = D.6599;
  D.6587 = 1;
  return D.6587;
}


GC_freehblk (struct hblk * hbp)
{
  long unsigned int hbp.43;
  long unsigned int D.6602;
  long unsigned int D.6603;
  struct bottom_index * D.6605;
  long unsigned int D.6606;
  long unsigned int D.6607;
  long unsigned int D.6608;
  long int D.6609;
  long unsigned int D.6610;
  long unsigned int D.6611;
  long unsigned int D.6612;
  long unsigned int D.6613;
  long unsigned int size.44;
  long unsigned int size.45;
  map_entry_type * D.6616;
  map_entry_type * GC_invalid_map.46;
  long int hbp.47;
  long unsigned int D.6621;
  long unsigned int next.48;
  long unsigned int D.6623;
  long unsigned int D.6624;
  long unsigned int D.6626;
  long unsigned int D.6627;
  map_entry_type * D.6630;
  long unsigned int D.6633;
  long unsigned int D.6634;
  long unsigned int D.6639;
  long unsigned int D.6640;
  long unsigned int D.6641;
  long unsigned int D.6642;
  struct hblk * next;
  struct hblk * prev;
  struct hdr * hhdr;
  struct hdr * prevhdr;
  struct hdr * nexthdr;
  signed_word size;

  {
    register struct hdr * * _ha;

    {
      register struct bottom_index * bi;

      {
        register word hi;
        register struct bottom_index * _bi;

        hbp.43 = (long unsigned int) hbp;
        hi = hbp.43 >> 22;
        D.6602 = hi & 2047;
        _bi = GC_arrays._top_index[D.6602];
        goto <D.6241>;
        <D.6240>:
        _bi = _bi->hash_link;
        <D.6241>:
        D.6603 = _bi->key;
        if (D.6603 != hi) goto <D.6604>; else goto <D.6242>;
        <D.6604>:
        D.6605 = GC_arrays._all_nils;
        if (D.6605 != _bi) goto <D.6240>; else goto <D.6242>;
        <D.6242>:
        bi = _bi;
      }
      hbp.43 = (long unsigned int) hbp;
      D.6606 = hbp.43 >> 12;
      D.6607 = D.6606 & 1023;
      _ha = &bi->index[D.6607];
    }
    hhdr = *_ha;
  }
  D.6608 = hhdr->hb_sz;
  size = (signed_word) D.6608;
  D.6609 = size << 3;
  D.6610 = (long unsigned int) D.6609;
  D.6611 = D.6610 + 4095;
  D.6612 = D.6611 >> 12;
  D.6613 = D.6612 * 4096;
  size = (signed_word) D.6613;
  size.44 = (long unsigned int) size;
  GC_remove_counts (hbp, size.44);
  size.45 = (long unsigned int) size;
  hhdr->hb_sz = size.45;
  D.6616 = hhdr->hb_map;
  GC_invalid_map.46 = GC_invalid_map;
  if (D.6616 == GC_invalid_map.46) goto <D.6618>; else goto <D.6619>;
  <D.6618>:
  hbp.47 = (long int) hbp;
  GC_printf ("Duplicate large block deallocation of 0x%lx\n", hbp.47, 0, 0, 0, 0, 0);
  GC_abort ("Duplicate large block deallocation");
  <D.6619>:
  GC_invalidate_map (hhdr);
  hbp.43 = (long unsigned int) hbp;
  size.44 = (long unsigned int) size;
  D.6621 = hbp.43 + size.44;
  next = (struct hblk *) D.6621;
  {
    register struct hdr * * _ha;

    {
      register struct bottom_index * bi;

      {
        register word hi;
        register struct bottom_index * _bi;

        next.48 = (long unsigned int) next;
        hi = next.48 >> 22;
        D.6623 = hi & 2047;
        _bi = GC_arrays._top_index[D.6623];
        goto <D.6248>;
        <D.6247>:
        _bi = _bi->hash_link;
        <D.6248>:
        D.6624 = _bi->key;
        if (D.6624 != hi) goto <D.6625>; else goto <D.6249>;
        <D.6625>:
        D.6605 = GC_arrays._all_nils;
        if (D.6605 != _bi) goto <D.6247>; else goto <D.6249>;
        <D.6249>:
        bi = _bi;
      }
      next.48 = (long unsigned int) next;
      D.6626 = next.48 >> 12;
      D.6627 = D.6626 & 1023;
      _ha = &bi->index[D.6627];
    }
    nexthdr = *_ha;
  }
  prev = GC_free_block_ending_at (hbp);
  if (nexthdr != 0B) goto <D.6628>; else goto <D.6629>;
  <D.6628>:
  D.6630 = nexthdr->hb_map;
  GC_invalid_map.46 = GC_invalid_map;
  if (D.6630 == GC_invalid_map.46) goto <D.6631>; else goto <D.6632>;
  <D.6631>:
  GC_remove_from_fl (nexthdr, -1);
  D.6608 = hhdr->hb_sz;
  D.6633 = nexthdr->hb_sz;
  D.6634 = D.6608 + D.6633;
  hhdr->hb_sz = D.6634;
  GC_remove_header (next);
  <D.6632>:
  <D.6629>:
  if (prev != 0B) goto <D.6635>; else goto <D.6636>;
  <D.6635>:
  prevhdr = GC_find_header (prev);
  if (1 != 0) goto <D.6637>; else goto <D.6638>;
  <D.6637>:
  GC_remove_from_fl (prevhdr, -1);
  D.6639 = prevhdr->hb_sz;
  D.6608 = hhdr->hb_sz;
  D.6640 = D.6639 + D.6608;
  prevhdr->hb_sz = D.6640;
  GC_remove_header (hbp);
  hbp = prev;
  hhdr = prevhdr;
  <D.6638>:
  <D.6636>:
  D.6641 = GC_arrays._large_free_bytes;
  size.44 = (long unsigned int) size;
  D.6642 = D.6641 + size.44;
  GC_arrays._large_free_bytes = D.6642;
  GC_add_to_fl (hbp, hhdr);
}


