GC_hblk_fl_from_blocks (word blocks_needed)
{
  int D.5797;
  long unsigned int D.5800;
  long unsigned int D.5801;
  unsigned int D.5802;
  unsigned int D.5803;

  if (blocks_needed <= 32) goto <D.5795>; else goto <D.5796>;
  <D.5795>:
  D.5797 = (int) blocks_needed;
  return D.5797;
  <D.5796>:
  if (blocks_needed > 255) goto <D.5798>; else goto <D.5799>;
  <D.5798>:
  D.5797 = 60;
  return D.5797;
  <D.5799>:
  D.5800 = blocks_needed + 18446744073709551584;
  D.5801 = D.5800 / 8;
  D.5802 = (unsigned int) D.5801;
  D.5803 = D.5802 + 32;
  D.5797 = (int) D.5803;
  return D.5797;
}


GC_print_hblkfreelist ()
{
  long int D.5807;
  long int sz.0;
  long int h.1;
  struct hblk * D.5810;
  long unsigned int D.5814;
  struct hblk * D.5815;
  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.5553>;
  <D.5552>:
  h = GC_hblkfreelist[i];
  if (h != 0B) goto <D.5805>; else goto <D.5806>;
  <D.5805>:
  D.5807 = (long int) i;
  GC_printf ("Free list %ld:\n", D.5807, 0, 0, 0, 0, 0);
  <D.5806>:
  goto <D.5550>;
  <D.5549>:
  hhdr = GC_find_header (h);
  sz = hhdr->hb_sz;
  sz.0 = (long int) sz;
  h.1 = (long int) h;
  GC_printf ("\t0x%lx size %lu ", h.1, sz.0, 0, 0, 0, 0);
  total_free = total_free + sz;
  D.5810 = GC_is_black_listed (h, 4096);
  if (D.5810 != 0B) goto <D.5811>; else goto <D.5812>;
  <D.5811>:
  GC_printf ("start black listed\n", 0, 0, 0, 0, 0, 0);
  goto <D.5813>;
  <D.5812>:
  D.5814 = hhdr->hb_sz;
  D.5815 = GC_is_black_listed (h, D.5814);
  if (D.5815 != 0B) goto <D.5816>; else goto <D.5817>;
  <D.5816>:
  GC_printf ("partially black listed\n", 0, 0, 0, 0, 0, 0);
  goto <D.5818>;
  <D.5817>:
  GC_printf ("not black listed\n", 0, 0, 0, 0, 0, 0);
  <D.5818>:
  <D.5813>:
  h = hhdr->hb_next;
  <D.5550>:
  if (h != 0B) goto <D.5549>; else goto <D.5551>;
  <D.5551>:
  i = i + 1;
  <D.5553>:
  if (i <= 60) goto <D.5552>; else goto <D.5554>;
  <D.5554>:
  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.5822;
  struct hblk * h;
  struct hdr * hhdr;
  int i;

  i = 0;
  goto <D.5565>;
  <D.5564>:
  h = GC_hblkfreelist[i];
  goto <D.5562>;
  <D.5561>:
  hhdr = GC_find_header (h);
  if (hhdr == wanted) goto <D.5820>; else goto <D.5821>;
  <D.5820>:
  D.5822 = i;
  return D.5822;
  <D.5821>:
  h = hhdr->hb_next;
  <D.5562>:
  if (h != 0B) goto <D.5561>; else goto <D.5563>;
  <D.5563>:
  i = i + 1;
  <D.5565>:
  if (i <= 60) goto <D.5564>; else goto <D.5566>;
  <D.5566>:
  D.5822 = -1;
  return D.5822;
}


GC_dump_regions ()
{
  char * D.5824;
  long unsigned int D.5825;
  unsigned int D.5826;
  long unsigned int D.5827;
  long unsigned int GC_n_heap_sects.3;
  char * D.5830;
  long int end.4;
  long int start.5;
  long int p.6;
  long unsigned int hhdr.7;
  long int hhdr.8;
  map_entry_type * D.5838;
  map_entry_type * GC_invalid_map.9;
  long unsigned int D.5842;
  long unsigned int D.5843;
  long int D.5844;
  unsigned char D.5845;
  int D.5846;
  int D.5847;
  long int D.5853;
  long int D.5857;
  long unsigned int D.5859;
  long int D.5860;
  long unsigned int D.5861;
  long unsigned int D.5862;
  long unsigned int D.5863;
  long unsigned int D.5864;
  unsigned int i;
  char * start;
  char * end;
  char * p;
  size_t bytes;
  struct hdr * hhdr;

  i = 0;
  goto <D.5584>;
  <D.5583>:
  start = GC_arrays._heap_sects[i].hs_start;
  bytes = GC_arrays._heap_sects[i].hs_bytes;
  end = start + bytes;
  goto <D.5576>;
  <D.5575>:
  i = i + 1;
  D.5824 = GC_arrays._heap_sects[i].hs_start;
  D.5825 = GC_arrays._heap_sects[i].hs_bytes;
  end = D.5824 + D.5825;
  <D.5576>:
  D.5826 = i + 1;
  D.5827 = (long unsigned int) D.5826;
  GC_n_heap_sects.3 = GC_n_heap_sects;
  if (D.5827 < GC_n_heap_sects.3) goto <D.5829>; else goto <D.5577>;
  <D.5829>:
  D.5826 = i + 1;
  D.5830 = GC_arrays._heap_sects[D.5826].hs_start;
  if (D.5830 == end) goto <D.5575>; else goto <D.5577>;
  <D.5577>:
  end.4 = (long int) end;
  start.5 = (long int) start;
  GC_printf ("***Section from 0x%lx to 0x%lx\n", start.5, end.4, 0, 0, 0, 0);
  p = start;
  goto <D.5578>;
  <D.5581>:
  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.5835>; else goto <D.5836>;
  <D.5835>:
  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.5578>;
  <D.5836>:
  D.5838 = hhdr->hb_map;
  GC_invalid_map.9 = GC_invalid_map;
  if (D.5838 == GC_invalid_map.9) goto <D.5840>; else goto <D.5841>;
  <D.5840>:
  {
    int correct_index;
    int actual_index;

    D.5842 = hhdr->hb_sz;
    D.5843 = D.5842 >> 12;
    correct_index = GC_hblk_fl_from_blocks (D.5843);
    D.5842 = hhdr->hb_sz;
    D.5844 = (long int) D.5842;
    GC_printf ("\tfree block of size 0x%lx bytes", D.5844, 0, 0, 0, 0, 0);
    D.5845 = hhdr->hb_flags;
    D.5846 = (int) D.5845;
    D.5847 = D.5846 & 2;
    if (D.5847 == 0) goto <D.5848>; else goto <D.5849>;
    <D.5848>:
    GC_printf ("\n", 0, 0, 0, 0, 0, 0);
    goto <D.5850>;
    <D.5849>:
    GC_printf ("(unmapped)\n", 0, 0, 0, 0, 0, 0);
    <D.5850>:
    actual_index = free_list_index_of (hhdr);
    if (actual_index == -1) goto <D.5851>; else goto <D.5852>;
    <D.5851>:
    D.5853 = (long int) correct_index;
    GC_printf ("\t\tBlock not on free list %ld!!\n", D.5853, 0, 0, 0, 0, 0);
    goto <D.5854>;
    <D.5852>:
    if (correct_index != actual_index) goto <D.5855>; else goto <D.5856>;
    <D.5855>:
    D.5853 = (long int) correct_index;
    D.5857 = (long int) actual_index;
    GC_printf ("\t\tBlock on list %ld, should be on %ld!!\n", D.5857, D.5853, 0, 0, 0, 0);
    <D.5856>:
    <D.5854>:
    D.5842 = hhdr->hb_sz;
    p = p + D.5842;
  }
  goto <D.5858>;
  <D.5841>:
  D.5842 = hhdr->hb_sz;
  D.5859 = D.5842 << 3;
  D.5860 = (long int) D.5859;
  GC_printf ("\tused for blocks of size 0x%lx bytes\n", D.5860, 0, 0, 0, 0, 0);
  D.5842 = hhdr->hb_sz;
  D.5859 = D.5842 << 3;
  D.5861 = D.5859 + 4095;
  D.5862 = D.5861 >> 12;
  D.5863 = D.5862 * 4096;
  p = p + D.5863;
  <D.5858>:
  <D.5578>:
  if (p < end) goto <D.5581>; else goto <D.5582>;
  <D.5582>:
  i = i + 1;
  <D.5584>:
  D.5864 = (long unsigned int) i;
  GC_n_heap_sects.3 = GC_n_heap_sects;
  if (D.5864 < GC_n_heap_sects.3) goto <D.5583>; else goto <D.5585>;
  <D.5585>:
}


GC_remove_from_fl (struct hdr * hhdr, int n)
{
  struct hblk * D.5865;
  long unsigned int D.5870;
  long unsigned int D.5871;
  struct hblk * D.5873;
  long unsigned int D.5875;
  long unsigned int D.5876;
  long unsigned int D.5877;
  struct bottom_index * D.5879;
  long unsigned int D.5880;
  long unsigned int D.5881;
  long unsigned int D.5884;
  long unsigned int D.5885;
  long unsigned int D.5886;
  long unsigned int D.5888;
  long unsigned int D.5889;
  int index;

  D.5865 = hhdr->hb_prev;
  if (D.5865 == 0B) goto <D.5866>; else goto <D.5867>;
  <D.5866>:
  if (n == -1) goto <D.5868>; else goto <D.5869>;
  <D.5868>:
  D.5870 = hhdr->hb_sz;
  D.5871 = D.5870 >> 12;
  index = GC_hblk_fl_from_blocks (D.5871);
  goto <D.5872>;
  <D.5869>:
  index = n;
  <D.5872>:
  D.5873 = hhdr->hb_next;
  GC_hblkfreelist[index] = D.5873;
  goto <D.5874>;
  <D.5867>:
  {
    struct hdr * phdr;

    {
      register struct hdr * * _ha;

      {
        register struct bottom_index * bi;

        {
          register word hi;
          register struct bottom_index * _bi;

          D.5865 = hhdr->hb_prev;
          D.5875 = (long unsigned int) D.5865;
          hi = D.5875 >> 22;
          D.5876 = hi & 2047;
          _bi = GC_arrays._top_index[D.5876];
          goto <D.5604>;
          <D.5603>:
          _bi = _bi->hash_link;
          <D.5604>:
          D.5877 = _bi->key;
          if (D.5877 != hi) goto <D.5878>; else goto <D.5605>;
          <D.5878>:
          D.5879 = GC_arrays._all_nils;
          if (D.5879 != _bi) goto <D.5603>; else goto <D.5605>;
          <D.5605>:
          bi = _bi;
        }
        D.5865 = hhdr->hb_prev;
        D.5875 = (long unsigned int) D.5865;
        D.5880 = D.5875 >> 12;
        D.5881 = D.5880 & 1023;
        _ha = &bi->index[D.5881];
      }
      phdr = *_ha;
    }
    D.5873 = hhdr->hb_next;
    phdr->hb_next = D.5873;
  }
  <D.5874>:
  D.5873 = hhdr->hb_next;
  if (D.5873 != 0B) goto <D.5882>; else goto <D.5883>;
  <D.5882>:
  {
    struct hdr * nhdr;

    {
      register struct hdr * * _ha;

      {
        register struct bottom_index * bi;

        {
          register word hi;
          register struct bottom_index * _bi;

          D.5873 = hhdr->hb_next;
          D.5884 = (long unsigned int) D.5873;
          hi = D.5884 >> 22;
          D.5885 = hi & 2047;
          _bi = GC_arrays._top_index[D.5885];
          goto <D.5612>;
          <D.5611>:
          _bi = _bi->hash_link;
          <D.5612>:
          D.5886 = _bi->key;
          if (D.5886 != hi) goto <D.5887>; else goto <D.5613>;
          <D.5887>:
          D.5879 = GC_arrays._all_nils;
          if (D.5879 != _bi) goto <D.5611>; else goto <D.5613>;
          <D.5613>:
          bi = _bi;
        }
        D.5873 = hhdr->hb_next;
        D.5884 = (long unsigned int) D.5873;
        D.5888 = D.5884 >> 12;
        D.5889 = D.5888 & 1023;
        _ha = &bi->index[D.5889];
      }
      nhdr = *_ha;
    }
    D.5865 = hhdr->hb_prev;
    nhdr->hb_prev = D.5865;
  }
  <D.5883>:
}


GC_free_block_ending_at (struct hblk * h)
{
  long unsigned int p.10;
  long unsigned int D.5891;
  long unsigned int D.5892;
  struct bottom_index * D.5894;
  long unsigned int D.5895;
  long unsigned int D.5896;
  long unsigned int phdr.11;
  long unsigned int D.5898;
  sizetype D.5899;
  _Bool D.5900;
  _Bool D.5901;
  _Bool D.5902;
  map_entry_type * D.5905;
  map_entry_type * GC_invalid_map.12;
  struct hblk * D.5909;
  struct hblk * D.5910;
  long unsigned int D.5915;
  char * D.5916;
  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.5891 = hi & 2047;
        _bi = GC_arrays._top_index[D.5891];
        goto <D.5624>;
        <D.5623>:
        _bi = _bi->hash_link;
        <D.5624>:
        D.5892 = _bi->key;
        if (D.5892 != hi) goto <D.5893>; else goto <D.5625>;
        <D.5893>:
        D.5894 = GC_arrays._all_nils;
        if (D.5894 != _bi) goto <D.5623>; else goto <D.5625>;
        <D.5625>:
        bi = _bi;
      }
      p.10 = (long unsigned int) p;
      D.5895 = p.10 >> 12;
      D.5896 = D.5895 & 1023;
      _ha = &bi->index[D.5896];
    }
    phdr = *_ha;
  }
  goto <D.5627>;
  <D.5626>:
  phdr.11 = (long unsigned int) phdr;
  D.5898 = phdr.11 * 4096;
  D.5899 = -D.5898;
  p = p + D.5899;
  phdr = GC_find_header (p);
  <D.5627>:
  D.5900 = phdr != 0B;
  phdr.11 = (long unsigned int) phdr;
  D.5901 = phdr.11 <= 4095;
  D.5902 = D.5900 & D.5901;
  if (D.5902 != 0) goto <D.5626>; else goto <D.5628>;
  <D.5628>:
  if (phdr != 0B) goto <D.5903>; else goto <D.5904>;
  <D.5903>:
  D.5905 = phdr->hb_map;
  GC_invalid_map.12 = GC_invalid_map;
  if (D.5905 == GC_invalid_map.12) goto <D.5907>; else goto <D.5908>;
  <D.5907>:
  D.5909 = p;
  return D.5909;
  <D.5908>:
  D.5909 = 0B;
  return D.5909;
  <D.5904>:
  D.5910 = h + 18446744073709547520;
  p = GC_prev_block (D.5910);
  if (p != 0B) goto <D.5911>; else goto <D.5912>;
  <D.5911>:
  phdr = GC_find_header (p);
  D.5905 = phdr->hb_map;
  GC_invalid_map.12 = GC_invalid_map;
  if (D.5905 == GC_invalid_map.12) goto <D.5913>; else goto <D.5914>;
  <D.5913>:
  D.5915 = phdr->hb_sz;
  D.5916 = p + D.5915;
  if (D.5916 == h) goto <D.5917>; else goto <D.5918>;
  <D.5917>:
  D.5909 = p;
  return D.5909;
  <D.5918>:
  <D.5914>:
  <D.5912>:
  D.5909 = 0B;
  return D.5909;
}


GC_add_to_fl (struct hblk * h, struct hdr * hhdr)
{
  long unsigned int D.5920;
  long unsigned int D.5921;
  long unsigned int second.13;
  long unsigned int D.5925;
  long unsigned int D.5926;
  struct bottom_index * D.5928;
  long unsigned int D.5929;
  long unsigned int D.5930;
  int index;
  struct hblk * second;
  struct hdr * second_hdr;

  D.5920 = hhdr->hb_sz;
  D.5921 = D.5920 >> 12;
  index = GC_hblk_fl_from_blocks (D.5921);
  second = GC_hblkfreelist[index];
  GC_hblkfreelist[index] = h;
  hhdr->hb_next = second;
  hhdr->hb_prev = 0B;
  if (second != 0B) goto <D.5922>; else goto <D.5923>;
  <D.5922>:
  {
    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.5925 = hi & 2047;
        _bi = GC_arrays._top_index[D.5925];
        goto <D.5641>;
        <D.5640>:
        _bi = _bi->hash_link;
        <D.5641>:
        D.5926 = _bi->key;
        if (D.5926 != hi) goto <D.5927>; else goto <D.5642>;
        <D.5927>:
        D.5928 = GC_arrays._all_nils;
        if (D.5928 != _bi) goto <D.5640>; else goto <D.5642>;
        <D.5642>:
        bi = _bi;
      }
      second.13 = (long unsigned int) second;
      D.5929 = second.13 >> 12;
      D.5930 = D.5929 & 1023;
      _ha = &bi->index[D.5930];
    }
    second_hdr = *_ha;
  }
  second_hdr->hb_prev = h;
  <D.5923>:
  GC_invalidate_map (hhdr);
}


GC_unmap_old ()
{
  unsigned char D.5931;
  int D.5932;
  int D.5933;
  long unsigned int GC_gc_no.14;
  short unsigned int D.5937;
  long unsigned int D.5940;
  long unsigned int D.5942;
  unsigned char D.5945;
  struct hblk * h;
  struct hdr * hhdr;
  word sz;
  short unsigned int last_rec;
  short unsigned int threshold;
  int i;

  i = 0;
  goto <D.5657>;
  <D.5656>:
  h = GC_hblkfreelist[i];
  goto <D.5654>;
  <D.5653>:
  hhdr = GC_find_header (h);
  D.5931 = hhdr->hb_flags;
  D.5932 = (int) D.5931;
  D.5933 = D.5932 & 2;
  if (D.5933 != 0) goto <D.5934>; else goto <D.5935>;
  <D.5934>:
  // predicted unlikely by continue predictor.
  goto <D.5652>;
  <D.5935>:
  GC_gc_no.14 = GC_gc_no;
  D.5937 = (short unsigned int) GC_gc_no.14;
  threshold = D.5937 + 65530;
  last_rec = hhdr->hb_last_reclaimed;
  D.5940 = (long unsigned int) last_rec;
  GC_gc_no.14 = GC_gc_no;
  if (D.5940 > GC_gc_no.14) goto <D.5938>; else goto <D.5941>;
  <D.5941>:
  if (last_rec < threshold) goto <D.5938>; else goto <D.5939>;
  <D.5938>:
  D.5942 = (long unsigned int) threshold;
  GC_gc_no.14 = GC_gc_no;
  if (D.5942 < GC_gc_no.14) goto <D.5943>; else goto <D.5944>;
  <D.5943>:
  sz = hhdr->hb_sz;
  GC_unmap (h, sz);
  D.5931 = hhdr->hb_flags;
  D.5945 = D.5931 | 2;
  hhdr->hb_flags = D.5945;
  <D.5944>:
  <D.5939>:
  <D.5652>:
  h = hhdr->hb_next;
  <D.5654>:
  if (h != 0B) goto <D.5653>; else goto <D.5655>;
  <D.5655>:
  i = i + 1;
  <D.5657>:
  if (i <= 60) goto <D.5656>; else goto <D.5658>;
  <D.5658>:
}


GC_merge_unmapped ()
{
  long unsigned int h.15;
  long unsigned int D.5947;
  long unsigned int D.5948;
  struct bottom_index * D.5950;
  long unsigned int D.5951;
  long unsigned int D.5952;
  long unsigned int D.5953;
  long unsigned int next.16;
  long unsigned int D.5955;
  long unsigned int D.5956;
  long unsigned int D.5958;
  long unsigned int D.5959;
  map_entry_type * D.5963;
  map_entry_type * GC_invalid_map.17;
  unsigned char D.5966;
  int D.5967;
  int D.5968;
  unsigned char D.5974;
  unsigned char D.5976;
  int D.5977;
  int D.5978;
  unsigned char D.5984;
  short unsigned int D.5985;
  long unsigned int D.5987;
  long unsigned int D.5988;
  long unsigned int D.5989;
  struct hblk * h;
  struct hblk * next;
  struct hdr * hhdr;
  struct hdr * nexthdr;
  word size;
  word nextsize;
  int i;

  i = 0;
  goto <D.5687>;
  <D.5686>:
  h = GC_hblkfreelist[i];
  goto <D.5684>;
  <D.5683>:
  {
    register struct hdr * * _ha;

    {
      register struct bottom_index * bi;

      {
        register word hi;
        register struct bottom_index * _bi;

        h.15 = (long unsigned int) h;
        hi = h.15 >> 22;
        D.5947 = hi & 2047;
        _bi = GC_arrays._top_index[D.5947];
        goto <D.5674>;
        <D.5673>:
        _bi = _bi->hash_link;
        <D.5674>:
        D.5948 = _bi->key;
        if (D.5948 != hi) goto <D.5949>; else goto <D.5675>;
        <D.5949>:
        D.5950 = GC_arrays._all_nils;
        if (D.5950 != _bi) goto <D.5673>; else goto <D.5675>;
        <D.5675>:
        bi = _bi;
      }
      h.15 = (long unsigned int) h;
      D.5951 = h.15 >> 12;
      D.5952 = D.5951 & 1023;
      _ha = &bi->index[D.5952];
    }
    hhdr = *_ha;
  }
  size = hhdr->hb_sz;
  h.15 = (long unsigned int) h;
  D.5953 = h.15 + size;
  next = (struct hblk *) D.5953;
  {
    register struct hdr * * _ha;

    {
      register struct bottom_index * bi;

      {
        register word hi;
        register struct bottom_index * _bi;

        next.16 = (long unsigned int) next;
        hi = next.16 >> 22;
        D.5955 = hi & 2047;
        _bi = GC_arrays._top_index[D.5955];
        goto <D.5681>;
        <D.5680>:
        _bi = _bi->hash_link;
        <D.5681>:
        D.5956 = _bi->key;
        if (D.5956 != hi) goto <D.5957>; else goto <D.5682>;
        <D.5957>:
        D.5950 = GC_arrays._all_nils;
        if (D.5950 != _bi) goto <D.5680>; else goto <D.5682>;
        <D.5682>:
        bi = _bi;
      }
      next.16 = (long unsigned int) next;
      D.5958 = next.16 >> 12;
      D.5959 = D.5958 & 1023;
      _ha = &bi->index[D.5959];
    }
    nexthdr = *_ha;
  }
  if (nexthdr != 0B) goto <D.5962>; else goto <D.5960>;
  <D.5962>:
  D.5963 = nexthdr->hb_map;
  GC_invalid_map.17 = GC_invalid_map;
  if (D.5963 == GC_invalid_map.17) goto <D.5965>; else goto <D.5960>;
  <D.5965>:
  nextsize = nexthdr->hb_sz;
  D.5966 = hhdr->hb_flags;
  D.5967 = (int) D.5966;
  D.5968 = D.5967 & 2;
  if (D.5968 == 0) goto <D.5969>; else goto <D.5970>;
  <D.5969>:
  if (size > nextsize) goto <D.5971>; else goto <D.5972>;
  <D.5971>:
  GC_remap (next, nextsize);
  goto <D.5973>;
  <D.5972>:
  GC_unmap (h, size);
  D.5966 = hhdr->hb_flags;
  D.5974 = D.5966 | 2;
  hhdr->hb_flags = D.5974;
  <D.5973>:
  goto <D.5975>;
  <D.5970>:
  D.5976 = nexthdr->hb_flags;
  D.5977 = (int) D.5976;
  D.5978 = D.5977 & 2;
  if (D.5978 == 0) goto <D.5979>; else goto <D.5980>;
  <D.5979>:
  if (size > nextsize) goto <D.5981>; else goto <D.5982>;
  <D.5981>:
  GC_unmap (next, nextsize);
  goto <D.5983>;
  <D.5982>:
  GC_remap (h, size);
  D.5966 = hhdr->hb_flags;
  D.5984 = D.5966 & 253;
  hhdr->hb_flags = D.5984;
  D.5985 = nexthdr->hb_last_reclaimed;
  hhdr->hb_last_reclaimed = D.5985;
  <D.5983>:
  goto <D.5986>;
  <D.5980>:
  D.5987 = nexthdr->hb_sz;
  GC_unmap_gap (h, size, next, D.5987);
  <D.5986>:
  <D.5975>:
  GC_remove_from_fl (hhdr, i);
  GC_remove_from_fl (nexthdr, -1);
  D.5988 = hhdr->hb_sz;
  D.5987 = nexthdr->hb_sz;
  D.5989 = D.5988 + D.5987;
  hhdr->hb_sz = D.5989;
  GC_remove_header (next);
  GC_add_to_fl (h, hhdr);
  h = GC_hblkfreelist[i];
  goto <D.5961>;
  <D.5960>:
  h = hhdr->hb_next;
  <D.5961>:
  <D.5684>:
  if (h != 0B) goto <D.5683>; else goto <D.5685>;
  <D.5685>:
  i = i + 1;
  <D.5687>:
  if (i <= 60) goto <D.5686>; else goto <D.5688>;
  <D.5688>:
}


GC_get_first_part (struct hblk * h, struct hdr * hhdr, word bytes, int index)
{
  struct hblk * D.5992;
  long unsigned int h.18;
  long unsigned int D.5994;
  void (*<T770>) (char *, GC_word) GC_current_warn_proc.19;
  long unsigned int D.5998;
  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.5990>; else goto <D.5991>;
  <D.5990>:
  D.5992 = h;
  return D.5992;
  <D.5991>:
  h.18 = (long unsigned int) h;
  D.5994 = h.18 + bytes;
  rest = (struct hblk *) D.5994;
  rest_hdr = GC_install_header (rest);
  if (rest_hdr == 0B) goto <D.5995>; else goto <D.5996>;
  <D.5995>:
  GC_current_warn_proc.19 = GC_current_warn_proc;
  GC_current_warn_proc.19 ("GC Warning: Header allocation failed: Dropping block.\n", 0);
  D.5992 = 0B;
  return D.5992;
  <D.5996>:
  D.5998 = total_size - bytes;
  rest_hdr->hb_sz = D.5998;
  rest_hdr->hb_flags = 0;
  GC_add_to_fl (rest, rest_hdr);
  D.5992 = h;
  return D.5992;
}


GC_split_block (struct hblk * h, struct hdr * hhdr, struct hblk * n, struct hdr * nhdr, int index)
{
  long unsigned int n.20;
  long unsigned int h.21;
  long unsigned int D.6002;
  struct hdr * D.6005;
  struct hdr * D.6009;
  long unsigned int GC_gc_no.22;
  short unsigned int D.6011;
  word total_size;
  word h_size;
  struct hblk * prev;
  struct hblk * next;

  total_size = hhdr->hb_sz;
  n.20 = (long unsigned int) n;
  h.21 = (long unsigned int) h;
  h_size = n.20 - h.21;
  prev = hhdr->hb_prev;
  next = hhdr->hb_next;
  nhdr->hb_prev = prev;
  nhdr->hb_next = next;
  D.6002 = total_size - h_size;
  nhdr->hb_sz = D.6002;
  nhdr->hb_flags = 0;
  if (prev != 0B) goto <D.6003>; else goto <D.6004>;
  <D.6003>:
  D.6005 = GC_find_header (prev);
  D.6005->hb_next = n;
  goto <D.6006>;
  <D.6004>:
  GC_hblkfreelist[index] = n;
  <D.6006>:
  if (next != 0B) goto <D.6007>; else goto <D.6008>;
  <D.6007>:
  D.6009 = GC_find_header (next);
  D.6009->hb_prev = n;
  <D.6008>:
  GC_gc_no.22 = GC_gc_no;
  D.6011 = (short unsigned int) GC_gc_no.22;
  hhdr->hb_last_reclaimed = D.6011;
  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.6012;
  long unsigned int D.6013;
  struct hblk * D.6016;
  word blocks;
  int start_list;
  int i;

  D.6012 = sz << 3;
  D.6013 = D.6012 + 4095;
  blocks = D.6013 >> 12;
  start_list = GC_hblk_fl_from_blocks (blocks);
  i = start_list;
  goto <D.5720>;
  <D.5719>:
  {
    struct hblk * result;

    result = GC_allochblk_nth (sz, kind, flags, i);
    if (result != 0B) goto <D.6014>; else goto <D.6015>;
    <D.6014>:
    D.6016 = result;
    return D.6016;
    <D.6015>:
  }
  i = i + 1;
  <D.5720>:
  if (i <= 60) goto <D.5719>; else goto <D.5721>;
  <D.5721>:
  D.6016 = 0B;
  return D.6016;
}


GC_allochblk_nth (word sz, int kind, unsigned char flags, int n)
{
  long unsigned int D.6018;
  long unsigned int D.6019;
  long unsigned int D.6020;
  long unsigned int D.6021;
  long unsigned int hbp.23;
  long unsigned int D.6023;
  long unsigned int D.6024;
  struct bottom_index * D.6026;
  long unsigned int D.6027;
  long unsigned int D.6028;
  long unsigned int D.6029;
  int GC_use_entire_heap.24;
  int GC_dont_gc.25;
  long unsigned int D.6042;
  long unsigned int D.6043;
  long unsigned int D.6044;
  long unsigned int D.6045;
  int GC_incremental.26;
  long unsigned int GC_time_limit.27;
  int D.6051;
  long unsigned int thishbp.28;
  long unsigned int D.6057;
  long unsigned int D.6058;
  long unsigned int D.6060;
  long unsigned int D.6061;
  long unsigned int D.6062;
  _Bool D.6063;
  _Bool D.6064;
  _Bool D.6065;
  long unsigned int size_needed.29;
  struct hblk * D.6069;
  int D.6072;
  _Bool D.6075;
  _Bool D.6076;
  _Bool D.6077;
  sizetype size_avail.30;
  sizetype size_needed.31;
  sizetype D.6082;
  signed_word iftmp.32;
  int D.6084;
  int D.6085;
  long unsigned int eff_size_needed.33;
  long int hbp.34;
  long int lasthbp.35;
  long int D.6093;
  unsigned char D.6100;
  int D.6101;
  int D.6102;
  unsigned char D.6105;
  long unsigned int GC_black_list_spacing.36;
  long int GC_black_list_spacing.37;
  long int D.6112;
  long int GC_large_alloc_warn_suppressed.38;
  long int GC_large_alloc_warn_suppressed.39;
  long int GC_large_alloc_warn_interval.40;
  void (*<T770>) (char *, GC_word) GC_current_warn_proc.41;
  _Bool D.6120;
  _Bool D.6121;
  _Bool D.6122;
  int GC_find_leak.42;
  unsigned int count.43;
  unsigned int count.44;
  unsigned int D.6132;
  long unsigned int D.6135;
  long unsigned int D.6136;
  long unsigned int D.6137;
  long unsigned int D.6138;
  long unsigned int D.6139;
  long unsigned int D.6140;
  int GC_debugging_started.45;
  struct hblk * D.6149;
  int D.6156;
  int D.6159;
  long unsigned int D.6162;
  _Bool D.6163;
  int D.6164;
  long int D.6165;
  long unsigned int D.6166;
  long unsigned int D.6167;
  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.6018 = sz << 3;
  D.6019 = D.6018 + 4095;
  D.6020 = D.6019 >> 12;
  D.6021 = D.6020 * 4096;
  size_needed = (signed_word) D.6021;
  hbp = GC_hblkfreelist[n];
  goto <D.5767>;
  <D.5766>:
  {
    register struct hdr * * _ha;

    {
      register struct bottom_index * bi;

      {
        register word hi;
        register struct bottom_index * _bi;

        hbp.23 = (long unsigned int) hbp;
        hi = hbp.23 >> 22;
        D.6023 = hi & 2047;
        _bi = GC_arrays._top_index[D.6023];
        goto <D.5739>;
        <D.5738>:
        _bi = _bi->hash_link;
        <D.5739>:
        D.6024 = _bi->key;
        if (D.6024 != hi) goto <D.6025>; else goto <D.5740>;
        <D.6025>:
        D.6026 = GC_arrays._all_nils;
        if (D.6026 != _bi) goto <D.5738>; else goto <D.5740>;
        <D.5740>:
        bi = _bi;
      }
      hbp.23 = (long unsigned int) hbp;
      D.6027 = hbp.23 >> 12;
      D.6028 = D.6027 & 1023;
      _ha = &bi->index[D.6028];
    }
    hhdr = *_ha;
  }
  D.6029 = hhdr->hb_sz;
  size_avail = (signed_word) D.6029;
  if (size_avail < size_needed) goto <D.6030>; else goto <D.6031>;
  <D.6030>:
  // predicted unlikely by continue predictor.
  goto <D.5741>;
  <D.6031>:
  if (size_avail != size_needed) goto <D.6034>; else goto <D.6035>;
  <D.6034>:
  GC_use_entire_heap.24 = GC_use_entire_heap;
  if (GC_use_entire_heap.24 == 0) goto <D.6037>; else goto <D.6038>;
  <D.6037>:
  GC_dont_gc.25 = GC_dont_gc;
  if (GC_dont_gc.25 == 0) goto <D.6040>; else goto <D.6041>;
  <D.6040>:
  D.6042 = GC_arrays._heapsize;
  D.6043 = GC_arrays._large_free_bytes;
  D.6044 = D.6042 - D.6043;
  D.6045 = GC_arrays._requested_heapsize;
  if (D.6044 >= D.6045) goto <D.6046>; else goto <D.6047>;
  <D.6046>:
  GC_incremental.26 = GC_incremental;
  if (GC_incremental.26 == 0) goto <D.6032>; else goto <D.6049>;
  <D.6049>:
  GC_time_limit.27 = GC_time_limit;
  if (GC_time_limit.27 == 999999) goto <D.6032>; else goto <D.6033>;
  <D.6032>:
  D.6051 = GC_should_collect ();
  if (D.6051 != 0) goto <D.6052>; else goto <D.6053>;
  <D.6052>:
  // predicted unlikely by continue predictor.
  goto <D.5741>;
  <D.6053>:
  <D.6033>:
  <D.6047>:
  <D.6041>:
  <D.6038>:
  <D.6035>:
  {
    signed_word next_size;

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

      {
        register struct bottom_index * bi;

        {
          register word hi;
          register struct bottom_index * _bi;

          thishbp.28 = (long unsigned int) thishbp;
          hi = thishbp.28 >> 22;
          D.6057 = hi & 2047;
          _bi = GC_arrays._top_index[D.6057];
          goto <D.5748>;
          <D.5747>:
          _bi = _bi->hash_link;
          <D.5748>:
          D.6058 = _bi->key;
          if (D.6058 != hi) goto <D.6059>; else goto <D.5749>;
          <D.6059>:
          D.6026 = GC_arrays._all_nils;
          if (D.6026 != _bi) goto <D.5747>; else goto <D.5749>;
          <D.5749>:
          bi = _bi;
        }
        thishbp.28 = (long unsigned int) thishbp;
        D.6060 = thishbp.28 >> 12;
        D.6061 = D.6060 & 1023;
        _ha = &bi->index[D.6061];
      }
      thishdr = *_ha;
    }
    D.6062 = thishdr->hb_sz;
    next_size = (signed_word) D.6062;
    D.6063 = next_size < size_avail;
    D.6064 = next_size >= size_needed;
    D.6065 = D.6063 & D.6064;
    if (D.6065 != 0) goto <D.6066>; else goto <D.6067>;
    <D.6066>:
    size_needed.29 = (long unsigned int) size_needed;
    D.6069 = GC_is_black_listed (thishbp, size_needed.29);
    if (D.6069 == 0B) goto <D.6070>; else goto <D.6071>;
    <D.6070>:
    // predicted unlikely by continue predictor.
    goto <D.5741>;
    <D.6071>:
    <D.6067>:
    <D.6055>:
  }
  D.6072 = kind & -2;
  if (D.6072 != 2) goto <D.6073>; else goto <D.6074>;
  <D.6073>:
  D.6075 = kind != 0;
  size_needed.29 = (long unsigned int) size_needed;
  D.6076 = size_needed.29 > 8192;
  D.6077 = D.6075 | D.6076;
  if (D.6077 != 0) goto <D.6078>; else goto <D.6079>;
  <D.6078>:
  {
    struct hblk * lasthbp;
    char * search_end;
    signed_word orig_avail;
    signed_word eff_size_needed;

    lasthbp = hbp;
    size_avail.30 = (sizetype) size_avail;
    size_needed.31 = (sizetype) size_needed;
    D.6082 = size_avail.30 - size_needed.31;
    search_end = hbp + D.6082;
    orig_avail = size_avail;
    D.6084 = (int) flags;
    D.6085 = D.6084 & 1;
    if (D.6085 == 0) goto <D.6086>; else goto <D.6087>;
    <D.6086>:
    iftmp.32 = size_needed;
    goto <D.6088>;
    <D.6087>:
    iftmp.32 = 4096;
    <D.6088>:
    eff_size_needed = iftmp.32;
    goto <D.5755>;
    <D.5754>:
    lasthbp = thishbp;
    <D.5755>:
    if (lasthbp <= search_end) goto <D.6089>; else goto <D.5756>;
    <D.6089>:
    eff_size_needed.33 = (long unsigned int) eff_size_needed;
    thishbp = GC_is_black_listed (lasthbp, eff_size_needed.33);
    if (thishbp != 0B) goto <D.5754>; else goto <D.5756>;
    <D.5756>:
    hbp.34 = (long int) hbp;
    lasthbp.35 = (long int) lasthbp;
    D.6093 = hbp.34 - lasthbp.35;
    size_avail = D.6093 + size_avail;
    thishbp = lasthbp;
    if (size_avail >= size_needed) goto <D.6094>; else goto <D.6095>;
    <D.6094>:
    if (thishbp != hbp) goto <D.6096>; else goto <D.6097>;
    <D.6096>:
    thishdr = GC_install_header (thishbp);
    if (thishdr != 0B) goto <D.6098>; else goto <D.6099>;
    <D.6098>:
    D.6100 = hhdr->hb_flags;
    D.6101 = (int) D.6100;
    D.6102 = D.6101 & 2;
    if (D.6102 != 0) goto <D.6103>; else goto <D.6104>;
    <D.6103>:
    D.6029 = hhdr->hb_sz;
    GC_remap (hbp, D.6029);
    D.6100 = hhdr->hb_flags;
    D.6105 = D.6100 & 253;
    hhdr->hb_flags = D.6105;
    <D.6104>:
    GC_split_block (hbp, hhdr, thishbp, thishdr, n);
    hbp = thishbp;
    hhdr = thishdr;
    <D.6099>:
    <D.6097>:
    goto <D.6106>;
    <D.6095>:
    GC_black_list_spacing.36 = GC_black_list_spacing;
    GC_black_list_spacing.37 = (long int) GC_black_list_spacing.36;
    if (GC_black_list_spacing.37 < size_needed) goto <D.6111>; else goto <D.6107>;
    <D.6111>:
    D.6112 = orig_avail - size_needed;
    GC_black_list_spacing.36 = GC_black_list_spacing;
    GC_black_list_spacing.37 = (long int) GC_black_list_spacing.36;
    if (D.6112 > GC_black_list_spacing.37) goto <D.6113>; else goto <D.6107>;
    <D.6113>:
    GC_large_alloc_warn_suppressed.38 = GC_large_alloc_warn_suppressed;
    GC_large_alloc_warn_suppressed.39 = GC_large_alloc_warn_suppressed.38 + 1;
    GC_large_alloc_warn_suppressed = GC_large_alloc_warn_suppressed.39;
    GC_large_alloc_warn_suppressed.38 = GC_large_alloc_warn_suppressed;
    GC_large_alloc_warn_interval.40 = GC_large_alloc_warn_interval;
    if (GC_large_alloc_warn_suppressed.38 >= GC_large_alloc_warn_interval.40) goto <D.6117>; else goto <D.6118>;
    <D.6117>:
    GC_current_warn_proc.41 = GC_current_warn_proc;
    size_needed.29 = (long unsigned int) size_needed;
    GC_current_warn_proc.41 ("GC Warning: Repeated allocation of very large block (appr. size %ld):\n\tMay lead to memory leak and poor performance.\n", size_needed.29);
    GC_large_alloc_warn_suppressed = 0;
    <D.6118>:
    size_avail = orig_avail;
    goto <D.6108>;
    <D.6107>:
    D.6120 = size_avail == 0;
    D.6121 = size_needed == 4096;
    D.6122 = D.6120 & D.6121;
    if (D.6122 != 0) goto <D.6123>; else goto <D.6124>;
    <D.6123>:
    D.6100 = hhdr->hb_flags;
    D.6101 = (int) D.6100;
    D.6102 = D.6101 & 2;
    if (D.6102 == 0) goto <D.6125>; else goto <D.6126>;
    <D.6125>:
    GC_find_leak.42 = GC_find_leak;
    if (GC_find_leak.42 == 0) goto <D.6128>; else goto <D.6129>;
    <D.6128>:
    {
      static unsigned int count = 0;

      count.43 = count;
      count.44 = count.43 + 1;
      count = count.44;
      count.43 = count;
      D.6132 = count.43 & 3;
      if (D.6132 == 0) goto <D.6133>; else goto <D.6134>;
      <D.6133>:
      {
        word total_size;
        struct hblk * limit;
        struct hblk * h;
        struct hblk * prev;

        total_size = hhdr->hb_sz;
        D.6135 = total_size >> 12;
        D.6136 = D.6135 * 4096;
        limit = hbp + D.6136;
        prev = hhdr->hb_prev;
        D.6137 = GC_arrays._words_wasted;
        D.6138 = total_size >> 3;
        D.6139 = D.6137 + D.6138;
        GC_arrays._words_wasted = D.6139;
        D.6043 = GC_arrays._large_free_bytes;
        D.6140 = D.6043 - total_size;
        GC_arrays._large_free_bytes = D.6140;
        GC_remove_from_fl (hhdr, n);
        h = hbp;
        goto <D.5763>;
        <D.5762>:
        if (h == hbp) goto <D.6141>; else goto <D.6143>;
        <D.6143>:
        hhdr = GC_install_header (h);
        if (hhdr != 0B) goto <D.6141>; else goto <D.6142>;
        <D.6141>:
        setup_header (hhdr, 512, 0, 0);
        GC_debugging_started.45 = GC_debugging_started;
        if (GC_debugging_started.45 != 0) goto <D.6145>; else goto <D.6146>;
        <D.6145>:
        memset (h, 0, 4096);
        <D.6146>:
        <D.6142>:
        h = h + 4096;
        <D.5763>:
        if (h < limit) goto <D.5762>; else goto <D.5764>;
        <D.5764>:
        hbp = prev;
        if (hbp == 0B) goto <D.6147>; else goto <D.6148>;
        <D.6147>:
        D.6084 = (int) flags;
        D.6149 = GC_allochblk_nth (sz, kind, D.6084, n);
        return D.6149;
        <D.6148>:
        hhdr = GC_find_header (hbp);
      }
      <D.6134>:
    }
    <D.6129>:
    <D.6126>:
    <D.6124>:
    <D.6108>:
    <D.6106>:
  }
  <D.6079>:
  <D.6074>:
  if (size_avail >= size_needed) goto <D.6150>; else goto <D.6151>;
  <D.6150>:
  D.6100 = hhdr->hb_flags;
  D.6101 = (int) D.6100;
  D.6102 = D.6101 & 2;
  if (D.6102 != 0) goto <D.6152>; else goto <D.6153>;
  <D.6152>:
  D.6029 = hhdr->hb_sz;
  GC_remap (hbp, D.6029);
  D.6100 = hhdr->hb_flags;
  D.6105 = D.6100 & 253;
  hhdr->hb_flags = D.6105;
  <D.6153>:
  hbp = GC_get_first_part (hbp, hhdr, size_needed, n);
  goto <D.5765>;
  <D.6151>:
  <D.5741>:
  hbp = hhdr->hb_next;
  <D.5767>:
  if (hbp != 0B) goto <D.5766>; else goto <D.5765>;
  <D.5765>:
  if (hbp == 0B) goto <D.6154>; else goto <D.6155>;
  <D.6154>:
  D.6149 = 0B;
  return D.6149;
  <D.6155>:
  size_needed.29 = (long unsigned int) size_needed;
  D.6156 = GC_install_counts (hbp, size_needed.29);
  if (D.6156 == 0) goto <D.6157>; else goto <D.6158>;
  <D.6157>:
  D.6149 = 0B;
  return D.6149;
  <D.6158>:
  D.6084 = (int) flags;
  D.6159 = setup_header (hhdr, sz, kind, D.6084);
  if (D.6159 == 0) goto <D.6160>; else goto <D.6161>;
  <D.6160>:
  size_needed.29 = (long unsigned int) size_needed;
  GC_remove_counts (hbp, size_needed.29);
  D.6149 = 0B;
  return D.6149;
  <D.6161>:
  D.6162 = hhdr->hb_descr;
  D.6163 = D.6162 == 0;
  D.6164 = (int) D.6163;
  D.6165 = size_needed >> 12;
  D.6166 = (long unsigned int) D.6165;
  GC_remove_protection (hbp, D.6166, D.6164);
  {
    extern unsigned int GC_fail_count;

    GC_fail_count = 0;
  }
  D.6043 = GC_arrays._large_free_bytes;
  size_needed.29 = (long unsigned int) size_needed;
  D.6167 = D.6043 - size_needed.29;
  GC_arrays._large_free_bytes = D.6167;
  D.6149 = hbp;
  return D.6149;
}


memset (void * __dest, int __ch, size_t __len)
{
  int D.6171;
  int D.6176;
  void * D.6178;
  long unsigned int D.6179;

  D.6171 = __builtin_constant_p (__len);
  if (D.6171 != 0) goto <D.6172>; else goto <D.6173>;
  <D.6172>:
  if (__len == 0) goto <D.6174>; else goto <D.6175>;
  <D.6174>:
  D.6176 = __builtin_constant_p (__ch);
  if (D.6176 == 0) goto <D.6169>; else goto <D.6177>;
  <D.6177>:
  if (__ch != 0) goto <D.6169>; else goto <D.6170>;
  <D.6169>:
  __warn_memset_zero_len ();
  D.6178 = __dest;
  return D.6178;
  <D.6170>:
  <D.6175>:
  <D.6173>:
  D.6179 = __builtin_object_size (__dest, 0);
  D.6178 = __builtin___memset_chk (__dest, __ch, __len, D.6179);
  return D.6178;
}


setup_header (struct hdr * hhdr, word sz, int kind, unsigned char flags)
{
  int D.6181;
  GC_bool D.6184;
  word iftmp.46;
  map_entry_type * D.6189;
  unsigned char D.6190;
  int D.6191;
  long unsigned int D.6194;
  long unsigned int GC_gc_no.47;
  short unsigned int D.6196;
  register word descr;

  D.6181 = GC_add_map_entry (sz);
  if (D.6181 == 0) goto <D.6182>; else goto <D.6183>;
  <D.6182>:
  D.6184 = 0;
  return D.6184;
  <D.6183>:
  if (sz <= 256) goto <D.6186>; else goto <D.6187>;
  <D.6186>:
  iftmp.46 = sz;
  goto <D.6188>;
  <D.6187>:
  iftmp.46 = 0;
  <D.6188>:
  D.6189 = GC_arrays._obj_map[iftmp.46];
  hhdr->hb_map = D.6189;
  hhdr->hb_sz = sz;
  D.6190 = (unsigned char) kind;
  hhdr->hb_obj_kind = D.6190;
  hhdr->hb_flags = flags;
  descr = GC_obj_kinds[kind].ok_descriptor;
  D.6191 = GC_obj_kinds[kind].ok_relocate_descr;
  if (D.6191 != 0) goto <D.6192>; else goto <D.6193>;
  <D.6192>:
  D.6194 = sz << 3;
  descr = D.6194 + descr;
  <D.6193>:
  hhdr->hb_descr = descr;
  GC_clear_hdr_marks (hhdr);
  GC_gc_no.47 = GC_gc_no;
  D.6196 = (short unsigned int) GC_gc_no.47;
  hhdr->hb_last_reclaimed = D.6196;
  D.6184 = 1;
  return D.6184;
}


GC_freehblk (struct hblk * hbp)
{
  long unsigned int hbp.48;
  long unsigned int D.6199;
  long unsigned int D.6200;
  struct bottom_index * D.6202;
  long unsigned int D.6203;
  long unsigned int D.6204;
  long unsigned int D.6205;
  long int D.6206;
  long unsigned int D.6207;
  long unsigned int D.6208;
  long unsigned int D.6209;
  long unsigned int D.6210;
  long unsigned int size.49;
  long unsigned int size.50;
  long unsigned int GC_gc_no.51;
  short unsigned int D.6214;
  map_entry_type * D.6215;
  map_entry_type * GC_invalid_map.52;
  long int hbp.53;
  long unsigned int D.6220;
  long unsigned int next.54;
  long unsigned int D.6222;
  long unsigned int D.6223;
  long unsigned int D.6225;
  long unsigned int D.6226;
  map_entry_type * D.6229;
  unsigned char D.6232;
  int D.6233;
  int D.6234;
  long unsigned int D.6237;
  long unsigned int D.6238;
  unsigned char D.6241;
  int D.6242;
  int D.6243;
  long unsigned int D.6246;
  long unsigned int D.6247;
  long unsigned int D.6248;
  long unsigned int D.6249;
  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.48 = (long unsigned int) hbp;
        hi = hbp.48 >> 22;
        D.6199 = hi & 2047;
        _bi = GC_arrays._top_index[D.6199];
        goto <D.5785>;
        <D.5784>:
        _bi = _bi->hash_link;
        <D.5785>:
        D.6200 = _bi->key;
        if (D.6200 != hi) goto <D.6201>; else goto <D.5786>;
        <D.6201>:
        D.6202 = GC_arrays._all_nils;
        if (D.6202 != _bi) goto <D.5784>; else goto <D.5786>;
        <D.5786>:
        bi = _bi;
      }
      hbp.48 = (long unsigned int) hbp;
      D.6203 = hbp.48 >> 12;
      D.6204 = D.6203 & 1023;
      _ha = &bi->index[D.6204];
    }
    hhdr = *_ha;
  }
  D.6205 = hhdr->hb_sz;
  size = (signed_word) D.6205;
  D.6206 = size << 3;
  D.6207 = (long unsigned int) D.6206;
  D.6208 = D.6207 + 4095;
  D.6209 = D.6208 >> 12;
  D.6210 = D.6209 * 4096;
  size = (signed_word) D.6210;
  size.49 = (long unsigned int) size;
  GC_remove_counts (hbp, size.49);
  size.50 = (long unsigned int) size;
  hhdr->hb_sz = size.50;
  GC_gc_no.51 = GC_gc_no;
  D.6214 = (short unsigned int) GC_gc_no.51;
  hhdr->hb_last_reclaimed = D.6214;
  D.6215 = hhdr->hb_map;
  GC_invalid_map.52 = GC_invalid_map;
  if (D.6215 == GC_invalid_map.52) goto <D.6217>; else goto <D.6218>;
  <D.6217>:
  hbp.53 = (long int) hbp;
  GC_printf ("Duplicate large block deallocation of 0x%lx\n", hbp.53, 0, 0, 0, 0, 0);
  GC_abort ("Duplicate large block deallocation");
  <D.6218>:
  GC_invalidate_map (hhdr);
  hbp.48 = (long unsigned int) hbp;
  size.49 = (long unsigned int) size;
  D.6220 = hbp.48 + size.49;
  next = (struct hblk *) D.6220;
  {
    register struct hdr * * _ha;

    {
      register struct bottom_index * bi;

      {
        register word hi;
        register struct bottom_index * _bi;

        next.54 = (long unsigned int) next;
        hi = next.54 >> 22;
        D.6222 = hi & 2047;
        _bi = GC_arrays._top_index[D.6222];
        goto <D.5792>;
        <D.5791>:
        _bi = _bi->hash_link;
        <D.5792>:
        D.6223 = _bi->key;
        if (D.6223 != hi) goto <D.6224>; else goto <D.5793>;
        <D.6224>:
        D.6202 = GC_arrays._all_nils;
        if (D.6202 != _bi) goto <D.5791>; else goto <D.5793>;
        <D.5793>:
        bi = _bi;
      }
      next.54 = (long unsigned int) next;
      D.6225 = next.54 >> 12;
      D.6226 = D.6225 & 1023;
      _ha = &bi->index[D.6226];
    }
    nexthdr = *_ha;
  }
  prev = GC_free_block_ending_at (hbp);
  if (nexthdr != 0B) goto <D.6227>; else goto <D.6228>;
  <D.6227>:
  D.6229 = nexthdr->hb_map;
  GC_invalid_map.52 = GC_invalid_map;
  if (D.6229 == GC_invalid_map.52) goto <D.6230>; else goto <D.6231>;
  <D.6230>:
  D.6232 = nexthdr->hb_flags;
  D.6233 = (int) D.6232;
  D.6234 = D.6233 & 2;
  if (D.6234 == 0) goto <D.6235>; else goto <D.6236>;
  <D.6235>:
  GC_remove_from_fl (nexthdr, -1);
  D.6205 = hhdr->hb_sz;
  D.6237 = nexthdr->hb_sz;
  D.6238 = D.6205 + D.6237;
  hhdr->hb_sz = D.6238;
  GC_remove_header (next);
  <D.6236>:
  <D.6231>:
  <D.6228>:
  if (prev != 0B) goto <D.6239>; else goto <D.6240>;
  <D.6239>:
  prevhdr = GC_find_header (prev);
  D.6241 = prevhdr->hb_flags;
  D.6242 = (int) D.6241;
  D.6243 = D.6242 & 2;
  if (D.6243 == 0) goto <D.6244>; else goto <D.6245>;
  <D.6244>:
  GC_remove_from_fl (prevhdr, -1);
  D.6246 = prevhdr->hb_sz;
  D.6205 = hhdr->hb_sz;
  D.6247 = D.6246 + D.6205;
  prevhdr->hb_sz = D.6247;
  GC_gc_no.51 = GC_gc_no;
  D.6214 = (short unsigned int) GC_gc_no.51;
  prevhdr->hb_last_reclaimed = D.6214;
  GC_remove_header (hbp);
  hbp = prev;
  hhdr = prevhdr;
  <D.6245>:
  <D.6240>:
  D.6248 = GC_arrays._large_free_bytes;
  size.49 = (long unsigned int) size;
  D.6249 = D.6248 + size.49;
  GC_arrays._large_free_bytes = D.6249;
  GC_add_to_fl (hbp, hhdr);
}


