__attribute__((visibility ("hidden")))
sgen_safe_name (void * obj)
{
  const char * D.21763;

  D.21763 = safe_name (obj);
  return D.21763;
}


safe_name (void * obj)
{
  long unsigned int D.21765;
  long unsigned int D.21766;
  const char * D.21767;
  struct MonoClass * D.21768;
  struct MonoVTable * vt;

  D.21765 = MEM[(mword *)obj];
  D.21766 = D.21765 & 18446744073709551612;
  vt = (struct MonoVTable *) D.21766;
  D.21768 = vt->klass;
  D.21767 = D.21768->name;
  return D.21767;
}


__attribute__((visibility ("hidden")))
sgen_scan_area_with_callback (char * start, char * end, void (*IterateObjectCallbackFunc) (char *, size_t, void *) callback, void * data, gboolean allow_flags)
{
  void * D.21770;
  char * iftmp.0;
  long unsigned int D.21776;
  long unsigned int D.21777;
  long unsigned int D.21780;
  unsigned int D.21785;
  unsigned int D.21786;
  long unsigned int D.21787;
  long unsigned int D.21788;
  long unsigned int D.21789;
  struct MonoVTable * D.21790;
  struct MonoVTable * array_fill_vtable.1;

  goto <D.20333>;
  <D.20334>:
  {
    size_t size;
    char * obj;

    D.21770 = MEM[(void * *)start];
    if (D.21770 == 0B) goto <D.21771>; else goto <D.21772>;
    <D.21771>:
    start = start + 8;
    // predicted unlikely by continue predictor.
    goto <D.20333>;
    <D.21772>:
    if (allow_flags != 0) goto <D.21773>; else goto <D.21774>;
    <D.21773>:
    D.21776 = MEM[(mword *)start];
    D.21777 = D.21776 & 1;
    if (D.21777 != 0) goto <D.21778>; else goto <D.21779>;
    <D.21778>:
    D.21776 = MEM[(mword *)start];
    D.21780 = D.21776 & 18446744073709551612;
    iftmp.0 = (char *) D.21780;
    goto <D.21781>;
    <D.21779>:
    iftmp.0 = 0B;
    <D.21781>:
    obj = iftmp.0;
    if (obj == 0B) goto <D.21782>; else goto <D.21783>;
    <D.21782>:
    obj = start;
    <D.21783>:
    goto <D.21784>;
    <D.21774>:
    obj = start;
    <D.21784>:
    D.21785 = sgen_safe_object_get_size (obj);
    D.21786 = D.21785 + 7;
    D.21787 = (long unsigned int) D.21786;
    size = D.21787 & 4294967288;
    D.21788 = MEM[(mword *)obj];
    D.21789 = D.21788 & 18446744073709551612;
    D.21790 = (struct MonoVTable *) D.21789;
    array_fill_vtable.1 = array_fill_vtable;
    if (D.21790 != array_fill_vtable.1) goto <D.21792>; else goto <D.21793>;
    <D.21792>:
    callback (obj, size, data);
    <D.21793>:
    start = start + size;
  }
  <D.20333>:
  if (start < end) goto <D.20334>; else goto <D.20335>;
  <D.20335>:
}


sgen_safe_object_get_size (struct MonoObject * obj)
{
  char * iftmp.2;
  long unsigned int D.21795;
  long unsigned int D.21796;
  long unsigned int D.21799;
  guint D.21803;
  struct MonoVTable * D.21804;
  char * forwarded;

  D.21795 = MEM[(mword *)obj];
  D.21796 = D.21795 & 1;
  if (D.21796 != 0) goto <D.21797>; else goto <D.21798>;
  <D.21797>:
  D.21795 = MEM[(mword *)obj];
  D.21799 = D.21795 & 18446744073709551612;
  iftmp.2 = (char *) D.21799;
  goto <D.21800>;
  <D.21798>:
  iftmp.2 = 0B;
  <D.21800>:
  forwarded = iftmp.2;
  if (forwarded != 0B) goto <D.21801>; else goto <D.21802>;
  <D.21801>:
  obj = forwarded;
  <D.21802>:
  D.21795 = MEM[(mword *)obj];
  D.21799 = D.21795 & 18446744073709551612;
  D.21804 = (struct MonoVTable *) D.21799;
  D.21803 = sgen_par_object_get_size (D.21804, obj);
  return D.21803;
}


sgen_par_object_get_size (struct MonoVTable * vtable, struct MonoObject * o)
{
  void * D.21806;
  long unsigned int D.21807;
  guint D.21812;
  int D.21813;
  int D.21814;
  unsigned int D.21815;
  long unsigned int D.21818;
  int D.21819;
  unsigned int D.21820;
  unsigned int element_size.3;
  unsigned int D.21822;
  long unsigned int D.21823;
  long unsigned int D.21824;
  struct MonoClass * D.21827;
  unsigned char D.21828;
  long unsigned int D.21829;
  long unsigned int D.21830;
  mword descr;
  mword type;

  D.21806 = vtable->gc_descr;
  descr = (mword) D.21806;
  type = descr & 7;
  D.21807 = type + 18446744073709551615;
  if (D.21807 <= 1) goto <D.21808>; else goto <D.21809>;
  <D.21808>:
  {
    mword size;

    size = descr & 65528;
    if (size == 0) goto <D.21810>; else goto <D.21811>;
    <D.21810>:
    D.21813 = MEM[(struct MonoString *)o].length;
    D.21814 = D.21813 * 2;
    D.21815 = (unsigned int) D.21814;
    D.21812 = D.21815 + 26;
    return D.21812;
    <D.21811>:
    D.21812 = (guint) size;
    return D.21812;
  }
  <D.21809>:
  if (type == 4) goto <D.21816>; else goto <D.21817>;
  <D.21816>:
  {
    int element_size;
    struct MonoArray * array;
    size_t size;

    D.21818 = descr >> 3;
    D.21819 = (int) D.21818;
    element_size = D.21819 & 1023;
    array = o;
    D.21820 = array->max_length;
    element_size.3 = (unsigned int) element_size;
    D.21822 = D.21820 * element_size.3;
    D.21823 = (long unsigned int) D.21822;
    size = D.21823 + 32;
    D.21824 = descr & 8192;
    if (D.21824 != 0) goto <D.21825>; else goto <D.21826>;
    <D.21825>:
    size = size + 3;
    size = size & 18446744073709551612;
    D.21827 = vtable->klass;
    D.21828 = D.21827->rank;
    D.21829 = (long unsigned int) D.21828;
    D.21830 = D.21829 * 8;
    size = D.21830 + size;
    <D.21826>:
    D.21812 = (guint) size;
    return D.21812;
  }
  <D.21817>:
  D.21812 = slow_object_get_size (vtable, o);
  return D.21812;
}


slow_object_get_size (struct MonoVTable * vtable, struct MonoObject * o)
{
  struct MonoClass * D.21832;
  guint D.21835;
  int D.21836;
  int D.21837;
  unsigned int D.21838;
  unsigned char D.21839;
  int D.21842;
  unsigned int D.21843;
  unsigned int D.21844;
  unsigned int D.21845;
  long unsigned int D.21846;
  struct MonoArrayBounds * D.21847;
  _Bool D.21848;
  long int D.21849;
  long int D.21850;
  long unsigned int D.21853;
  long unsigned int D.21854;
  int D.21855;
  struct MonoClass * klass;

  klass = vtable->klass;
  D.21832 = mono_defaults.string_class;
  if (D.21832 == klass) goto <D.21833>; else goto <D.21834>;
  <D.21833>:
  D.21836 = MEM[(struct MonoString *)o].length;
  D.21837 = D.21836 * 2;
  D.21838 = (unsigned int) D.21837;
  D.21835 = D.21838 + 26;
  return D.21835;
  <D.21834>:
  D.21839 = klass->rank;
  if (D.21839 != 0) goto <D.21840>; else goto <D.21841>;
  <D.21840>:
  {
    struct MonoArray * array;
    size_t size;

    array = o;
    D.21842 = klass->sizes.element_size;
    D.21843 = (unsigned int) D.21842;
    D.21844 = array->max_length;
    D.21845 = D.21843 * D.21844;
    D.21846 = (long unsigned int) D.21845;
    size = D.21846 + 32;
    D.21847 = array->bounds;
    D.21848 = D.21847 != 0B;
    D.21849 = (long int) D.21848;
    D.21850 = __builtin_expect (D.21849, 0);
    if (D.21850 != 0) goto <D.21851>; else goto <D.21852>;
    <D.21851>:
    size = size + 3;
    size = size & 18446744073709551612;
    D.21839 = klass->rank;
    D.21853 = (long unsigned int) D.21839;
    D.21854 = D.21853 * 8;
    size = D.21854 + size;
    <D.21852>:
    D.21835 = (guint) size;
    return D.21835;
  }
  <D.21841>:
  D.21855 = klass->instance_size;
  D.21835 = (guint) D.21855;
  return D.21835;
}


mono_gc_scan_for_specific_ref (struct MonoObject * key, gboolean precise)
{
  struct GCMemSection * nursery_section.4;
  char * D.21858;
  char * D.21859;
  void (*<T2e39>) (gboolean, gboolean, void (*IterateObjectCallbackFunc) (char *, size_t, void *), void *) D.21860;
  long unsigned int D.21861;
  long unsigned int D.21862;
  void * D.21863;
  char * D.21864;
  struct SgenHashTableEntry * D.21865;
  unsigned int D.21866;
  void * * ptr;
  struct RootRecord * root;

  scan_object_for_specific_ref_precise = precise;
  nursery_section.4 = nursery_section;
  D.21858 = nursery_section.4->data;
  nursery_section.4 = nursery_section;
  D.21859 = nursery_section.4->end_data;
  sgen_scan_area_with_callback (D.21858, D.21859, scan_object_for_specific_ref_callback, key, 1);
  D.21860 = major_collector.iterate_objects;
  D.21860 (1, 1, scan_object_for_specific_ref_callback, key);
  sgen_los_iterate_objects (scan_object_for_specific_ref_callback, key);
  scan_roots_for_specific_ref (key, 0);
  scan_roots_for_specific_ref (key, 2);
  {
    struct SgenHashTable * __hash_table;
    struct SgenHashTableEntry * * __table;
    guint __i;

    __hash_table = &roots_hash[1];
    __table = __hash_table->table;
    __i = 0;
    goto <D.20410>;
    <D.20409>:
    {
      struct SgenHashTableEntry * * __iter;
      struct SgenHashTableEntry * * __next;

      D.21861 = (long unsigned int) __i;
      D.21862 = D.21861 * 8;
      __iter = __table + D.21862;
      goto <D.20407>;
      <D.20406>:
      {
        struct SgenHashTableEntry * __entry;

        __entry = *__iter;
        __next = &__entry->next;
        ptr = __entry->key;
        root = &__entry->data;
        goto <D.20404>;
        <D.20403>:
        D.21863 = *ptr;
        check_root_obj_specific_ref (root, D.21863, key);
        ptr = ptr + 8;
        <D.20404>:
        D.21864 = root->end_root;
        if (D.21864 > ptr) goto <D.20403>; else goto <D.20405>;
        <D.20405>:
      }
      __iter = __next;
      <D.20407>:
      D.21865 = *__iter;
      if (D.21865 != 0B) goto <D.20406>; else goto <D.20408>;
      <D.20408>:
    }
    __i = __i + 1;
    <D.20410>:
    D.21866 = roots_hash[1].size;
    if (D.21866 > __i) goto <D.20409>; else goto <D.20411>;
    <D.20411>:
  }
}


scan_object_for_specific_ref_callback (char * obj, size_t size, struct MonoObject * key)
{
  scan_object_for_specific_ref (obj, key);
}


scan_object_for_specific_ref (char * start, struct MonoObject * key)
{
  char * iftmp.5;
  long unsigned int D.21868;
  long unsigned int D.21869;
  long unsigned int D.21872;
  int scan_object_for_specific_ref_precise.6;
  long unsigned int D.21879;
  long unsigned int D.21880;
  long unsigned int D.21883;
  long unsigned int D.21884;
  long unsigned int D.21885;
  long unsigned int D.21886;
  long unsigned int D.21887;
  long unsigned int D.21888;
  void * D.21889;
  const char * D.21892;
  long int _objptr.7;
  long int start.8;
  long int D.21895;
  const char * D.21898;
  long unsigned int D.21899;
  long unsigned int D.21900;
  int D.21901;
  void * D.21902;
  const char * D.21905;
  long int _objptr.9;
  long int D.21907;
  long unsigned int D.21908;
  long unsigned int D.21909;
  int D.21910;
  const char * D.21913;
  long unsigned int D.21914;
  long unsigned int D.21917;
  int D.21918;
  int D.21919;
  unsigned int D.21922;
  unsigned int el_size.10;
  unsigned int D.21924;
  sizetype D.21925;
  void * D.21926;
  const char * D.21929;
  long int p.11;
  long int D.21931;
  int D.21935;
  int D.21936;
  long unsigned int D.21937;
  long unsigned int D.21938;
  long unsigned int D.21939;
  long unsigned int D.21940;
  void * * D.21941;
  void * D.21942;
  const char * D.21945;
  long int D.21946;
  long int D.21947;
  sizetype D.21948;
  long unsigned int D.21952;
  void * D.21955;
  const char * D.21958;
  long int p.12;
  long int D.21960;
  long unsigned int D.21961;
  void * D.21964;
  const char * D.21967;
  long int _objptr.13;
  long int D.21969;
  long unsigned int D.21970;
  unsigned int D.21971;
  unsigned int D.21972;
  struct MonoVTable * D.21975;
  struct MonoClass * D.21976;
  const char * D.21977;
  const char * D.21978;
  gsize * bitmap_data.14;
  long unsigned int D.21980;
  void * D.21983;
  const char * D.21986;
  long int _objptr.15;
  long int D.21988;
  int bwords.16;
  long unsigned int D.21990;
  gsize * mbitmap_data.17;
  long unsigned int D.21992;
  unsigned int D.21993;
  unsigned int D.21994;
  struct MonoClass * D.21995;
  unsigned int el_size.18;
  unsigned int D.21997;
  sizetype D.21998;
  const char * D.22001;
  const char * D.22002;
  gsize * bitmap_data.19;
  long unsigned int D.22004;
  void * D.22007;
  const char * D.22010;
  long int _objptr.20;
  long int D.22012;
  unsigned int bwords.21;
  sizetype D.22014;
  unsigned int D.22016;
  long unsigned int D.22017;
  long unsigned int D.22018;
  mword * D.22019;
  long unsigned int D.22020;
  long unsigned int key.22;
  const char * D.22024;
  long unsigned int D.22025;
  char * forwarded;

  D.21868 = MEM[(mword *)start];
  D.21869 = D.21868 & 1;
  if (D.21869 != 0) goto <D.21870>; else goto <D.21871>;
  <D.21870>:
  D.21868 = MEM[(mword *)start];
  D.21872 = D.21868 & 18446744073709551612;
  iftmp.5 = (char *) D.21872;
  goto <D.21873>;
  <D.21871>:
  iftmp.5 = 0B;
  <D.21873>:
  forwarded = iftmp.5;
  if (forwarded != 0B) goto <D.21874>; else goto <D.21875>;
  <D.21874>:
  start = forwarded;
  <D.21875>:
  scan_object_for_specific_ref_precise.6 = scan_object_for_specific_ref_precise;
  if (scan_object_for_specific_ref_precise.6 != 0) goto <D.21877>; else goto <D.21878>;
  <D.21877>:
  {
    struct GCVTable * vt;
    mword desc;

    D.21868 = MEM[(mword *)start];
    D.21872 = D.21868 & 18446744073709551612;
    vt = (struct GCVTable *) D.21872;
    desc = vt->desc;
    D.21879 = desc & 7;
    switch (D.21879) <default: <D.20317>, case 1: <D.20232>, case 2: <D.20239>, case 3: <D.20283>, case 4: <D.20247>, case 5: <D.20277>, case 6: <D.20296>, case 7: <D.20316>>
    <D.20232>:
    D.21880 = desc & 4294901760;
    if (D.21880 != 0) goto <D.21881>; else goto <D.21882>;
    <D.21881>:
    {
      void * * _objptr_end;
      void * * _objptr;

      _objptr = start;
      D.21883 = desc >> 16;
      D.21884 = D.21883 & 255;
      D.21885 = D.21884 * 8;
      _objptr = _objptr + D.21885;
      D.21886 = desc >> 24;
      D.21887 = D.21886 & 255;
      D.21888 = D.21887 * 8;
      _objptr_end = _objptr + D.21888;
      D.21889 = *_objptr;
      if (D.21889 == key) goto <D.21890>; else goto <D.21891>;
      <D.21890>:
      D.21892 = safe_name (start);
      _objptr.7 = (long int) _objptr;
      start.8 = (long int) start;
      D.21895 = _objptr.7 - start.8;
      monoeg_g_print ("found ref to %p in object %p (%s) at offset %td\n", key, start, D.21892, D.21895);
      <D.21891>:
      _objptr = _objptr + 8;
      goto <D.20236>;
      <D.20235>:
      D.21889 = *_objptr;
      if (D.21889 == key) goto <D.21896>; else goto <D.21897>;
      <D.21896>:
      D.21898 = safe_name (start);
      _objptr.7 = (long int) _objptr;
      start.8 = (long int) start;
      D.21895 = _objptr.7 - start.8;
      monoeg_g_print ("found ref to %p in object %p (%s) at offset %td\n", key, start, D.21898, D.21895);
      <D.21897>:
      _objptr = _objptr + 8;
      <D.20236>:
      if (_objptr < _objptr_end) goto <D.20235>; else goto <D.20237>;
      <D.20237>:
    }
    <D.21882>:
    goto <D.20238>;
    <D.20239>:
    {
      void * * _objptr;
      gsize _bmap;

      _objptr = start;
      _bmap = desc >> 16;
      _objptr = _objptr + 16;
      {
        int _index;

        _index = __builtin_ctzl (_bmap);
        D.21899 = (long unsigned int) _index;
        D.21900 = D.21899 * 8;
        _objptr = _objptr + D.21900;
        D.21901 = _index + 1;
        _bmap = _bmap >> D.21901;
        D.21902 = *_objptr;
        if (D.21902 == key) goto <D.21903>; else goto <D.21904>;
        <D.21903>:
        D.21905 = safe_name (start);
        _objptr.9 = (long int) _objptr;
        start.8 = (long int) start;
        D.21907 = _objptr.9 - start.8;
        monoeg_g_print ("found ref to %p in object %p (%s) at offset %td\n", key, start, D.21905, D.21907);
        <D.21904>:
        _objptr = _objptr + 8;
      }
      goto <D.20245>;
      <D.20244>:
      {
        int _index;

        _index = __builtin_ctzl (_bmap);
        D.21908 = (long unsigned int) _index;
        D.21909 = D.21908 * 8;
        _objptr = _objptr + D.21909;
        D.21910 = _index + 1;
        _bmap = _bmap >> D.21910;
        D.21902 = *_objptr;
        if (D.21902 == key) goto <D.21911>; else goto <D.21912>;
        <D.21911>:
        D.21913 = safe_name (start);
        _objptr.9 = (long int) _objptr;
        start.8 = (long int) start;
        D.21907 = _objptr.9 - start.8;
        monoeg_g_print ("found ref to %p in object %p (%s) at offset %td\n", key, start, D.21913, D.21907);
        <D.21912>:
        _objptr = _objptr + 8;
      }
      <D.20245>:
      if (_bmap != 0) goto <D.20244>; else goto <D.20246>;
      <D.20246>:
    }
    goto <D.20238>;
    <D.20247>:
    D.21914 = desc & 4294950912;
    if (D.21914 != 0) goto <D.21915>; else goto <D.21916>;
    <D.21915>:
    {
      int el_size;
      int etype;

      D.21917 = desc >> 3;
      D.21918 = (int) D.21917;
      el_size = D.21918 & 1023;
      D.21919 = (int) desc;
      etype = D.21919 & 49152;
      if (etype == 16384) goto <D.21920>; else goto <D.21921>;
      <D.21920>:
      {
        void * * p;
        void * * end_refs;

        p = start + 32;
        D.21922 = MEM[(struct MonoArray *)start].max_length;
        el_size.10 = (unsigned int) el_size;
        D.21924 = D.21922 * el_size.10;
        D.21925 = (sizetype) D.21924;
        end_refs = p + D.21925;
        goto <D.20253>;
        <D.20252>:
        D.21926 = *p;
        if (D.21926 == key) goto <D.21927>; else goto <D.21928>;
        <D.21927>:
        D.21929 = safe_name (start);
        p.11 = (long int) p;
        start.8 = (long int) start;
        D.21931 = p.11 - start.8;
        monoeg_g_print ("found ref to %p in object %p (%s) at offset %td\n", key, start, D.21929, D.21931);
        <D.21928>:
        p = p + 8;
        <D.20253>:
        if (p < end_refs) goto <D.20252>; else goto <D.20254>;
        <D.20254>:
      }
      goto <D.21932>;
      <D.21921>:
      if (etype == 32768) goto <D.21933>; else goto <D.21934>;
      <D.21933>:
      {
        int offset;
        int num_refs;
        char * e_start;
        char * e_end;

        D.21883 = desc >> 16;
        D.21935 = (int) D.21883;
        offset = D.21935 & 255;
        D.21886 = desc >> 24;
        D.21936 = (int) D.21886;
        num_refs = D.21936 & 255;
        e_start = start + 32;
        D.21922 = MEM[(struct MonoArray *)start].max_length;
        el_size.10 = (unsigned int) el_size;
        D.21924 = D.21922 * el_size.10;
        D.21925 = (sizetype) D.21924;
        e_end = e_start + D.21925;
        goto <D.20265>;
        <D.20264>:
        {
          void * * p;
          int i;

          p = e_start;
          D.21937 = (long unsigned int) offset;
          D.21938 = D.21937 * 8;
          p = p + D.21938;
          i = 0;
          goto <D.20262>;
          <D.20261>:
          D.21939 = (long unsigned int) i;
          D.21940 = D.21939 * 8;
          D.21941 = p + D.21940;
          D.21942 = *D.21941;
          if (D.21942 == key) goto <D.21943>; else goto <D.21944>;
          <D.21943>:
          D.21945 = safe_name (start);
          D.21939 = (long unsigned int) i;
          D.21940 = D.21939 * 8;
          D.21941 = p + D.21940;
          D.21946 = (long int) D.21941;
          start.8 = (long int) start;
          D.21947 = D.21946 - start.8;
          monoeg_g_print ("found ref to %p in object %p (%s) at offset %td\n", key, start, D.21945, D.21947);
          <D.21944>:
          i = i + 1;
          <D.20262>:
          if (i < num_refs) goto <D.20261>; else goto <D.20263>;
          <D.20263>:
          D.21948 = (sizetype) el_size;
          e_start = e_start + D.21948;
        }
        <D.20265>:
        if (e_start < e_end) goto <D.20264>; else goto <D.20266>;
        <D.20266>:
      }
      goto <D.21949>;
      <D.21934>:
      if (etype == 49152) goto <D.21950>; else goto <D.21951>;
      <D.21950>:
      {
        char * e_start;
        char * e_end;

        e_start = start + 32;
        D.21922 = MEM[(struct MonoArray *)start].max_length;
        el_size.10 = (unsigned int) el_size;
        D.21924 = D.21922 * el_size.10;
        D.21925 = (sizetype) D.21924;
        e_end = e_start + D.21925;
        goto <D.20275>;
        <D.20274>:
        {
          void * * p;
          gsize _bmap;

          p = e_start;
          _bmap = desc >> 16;
          goto <D.20272>;
          <D.20271>:
          D.21952 = _bmap & 1;
          if (D.21952 != 0) goto <D.21953>; else goto <D.21954>;
          <D.21953>:
          D.21955 = *p;
          if (D.21955 == key) goto <D.21956>; else goto <D.21957>;
          <D.21956>:
          D.21958 = safe_name (start);
          p.12 = (long int) p;
          start.8 = (long int) start;
          D.21960 = p.12 - start.8;
          monoeg_g_print ("found ref to %p in object %p (%s) at offset %td\n", key, start, D.21958, D.21960);
          <D.21957>:
          <D.21954>:
          _bmap = _bmap >> 1;
          p = p + 8;
          <D.20272>:
          if (_bmap != 0) goto <D.20271>; else goto <D.20273>;
          <D.20273>:
          D.21948 = (sizetype) el_size;
          e_start = e_start + D.21948;
        }
        <D.20275>:
        if (e_start < e_end) goto <D.20274>; else goto <D.20276>;
        <D.20276>:
      }
      <D.21951>:
      <D.21949>:
      <D.21932>:
    }
    <D.21916>:
    goto <D.20238>;
    <D.20277>:
    {
      void * * _objptr;
      gsize _bmap;

      _objptr = start;
      _bmap = desc >> 3;
      _objptr = _objptr + 16;
      goto <D.20281>;
      <D.20280>:
      D.21961 = _bmap & 1;
      if (D.21961 != 0) goto <D.21962>; else goto <D.21963>;
      <D.21962>:
      D.21964 = *_objptr;
      if (D.21964 == key) goto <D.21965>; else goto <D.21966>;
      <D.21965>:
      D.21967 = safe_name (start);
      _objptr.13 = (long int) _objptr;
      start.8 = (long int) start;
      D.21969 = _objptr.13 - start.8;
      monoeg_g_print ("found ref to %p in object %p (%s) at offset %td\n", key, start, D.21967, D.21969);
      <D.21966>:
      <D.21963>:
      _bmap = _bmap >> 1;
      _objptr = _objptr + 8;
      <D.20281>:
      if (_bmap != 0) goto <D.20280>; else goto <D.20282>;
      <D.20282>:
    }
    goto <D.20238>;
    <D.20283>:
    {
      void * * _objptr;
      gsize * bitmap_data;
      int bwords;
      void * * start_run;

      _objptr = start;
      bitmap_data = sgen_get_complex_descriptor (desc);
      D.21970 = *bitmap_data;
      D.21971 = (unsigned int) D.21970;
      D.21972 = D.21971 + 4294967295;
      bwords = (int) D.21972;
      start_run = _objptr;
      bitmap_data = bitmap_data + 8;
      if (0 != 0) goto <D.21973>; else goto <D.21974>;
      <D.21973>:
      {
        struct MonoObject * myobj;

        myobj = start;
        D.21975 = myobj->vtable;
        D.21976 = D.21975->klass;
        D.21977 = D.21976->name_space;
        D.21975 = myobj->vtable;
        D.21976 = D.21975->klass;
        D.21978 = D.21976->name;
        monoeg_g_print ("found %d at %p (0x%zx): %s.%s\n", bwords, start, desc, D.21977, D.21978);
      }
      <D.21974>:
      goto <D.20294>;
      <D.20293>:
      {
        gsize _bmap;

        bitmap_data.14 = bitmap_data;
        bitmap_data = bitmap_data.14 + 8;
        _bmap = *bitmap_data.14;
        _objptr = start_run;
        goto <D.20291>;
        <D.20290>:
        D.21980 = _bmap & 1;
        if (D.21980 != 0) goto <D.21981>; else goto <D.21982>;
        <D.21981>:
        D.21983 = *_objptr;
        if (D.21983 == key) goto <D.21984>; else goto <D.21985>;
        <D.21984>:
        D.21986 = safe_name (start);
        _objptr.15 = (long int) _objptr;
        start.8 = (long int) start;
        D.21988 = _objptr.15 - start.8;
        monoeg_g_print ("found ref to %p in object %p (%s) at offset %td\n", key, start, D.21986, D.21988);
        <D.21985>:
        <D.21982>:
        _bmap = _bmap >> 1;
        _objptr = _objptr + 8;
        <D.20291>:
        if (_bmap != 0) goto <D.20290>; else goto <D.20292>;
        <D.20292>:
        start_run = start_run + 512;
      }
      <D.20294>:
      bwords.16 = bwords;
      bwords = bwords.16 + -1;
      if (bwords.16 > 0) goto <D.20293>; else goto <D.20295>;
      <D.20295>:
    }
    goto <D.20238>;
    <D.20296>:
    {
      gsize * mbitmap_data;
      int mbwords;
      int el_size;
      char * e_start;
      char * e_end;

      D.21990 = vt->desc;
      mbitmap_data = sgen_get_complex_descriptor (D.21990);
      mbitmap_data.17 = mbitmap_data;
      mbitmap_data = mbitmap_data.17 + 8;
      D.21992 = *mbitmap_data.17;
      D.21993 = (unsigned int) D.21992;
      D.21994 = D.21993 + 4294967295;
      mbwords = (int) D.21994;
      D.21995 = vt->klass;
      el_size = mono_array_element_size (D.21995);
      e_start = start + 32;
      D.21922 = MEM[(struct MonoArray *)start].max_length;
      el_size.18 = (unsigned int) el_size;
      D.21997 = D.21922 * el_size.18;
      D.21998 = (sizetype) D.21997;
      e_end = e_start + D.21998;
      if (0 != 0) goto <D.21999>; else goto <D.22000>;
      <D.21999>:
      D.21990 = vt->desc;
      D.21995 = vt->klass;
      D.22001 = D.21995->name_space;
      D.21995 = vt->klass;
      D.22002 = D.21995->name;
      monoeg_g_print ("found %d at %p (0x%zx): %s.%s\n", mbwords, start, D.21990, D.22001, D.22002);
      <D.22000>:
      goto <D.20314>;
      <D.20313>:
      {
        void * * _objptr;
        gsize * bitmap_data;
        unsigned int bwords;

        _objptr = e_start;
        bitmap_data = mbitmap_data;
        bwords = (unsigned int) mbwords;
        goto <D.20311>;
        <D.20310>:
        {
          gsize _bmap;
          void * * start_run;

          bitmap_data.19 = bitmap_data;
          bitmap_data = bitmap_data.19 + 8;
          _bmap = *bitmap_data.19;
          start_run = _objptr;
          goto <D.20308>;
          <D.20307>:
          D.22004 = _bmap & 1;
          if (D.22004 != 0) goto <D.22005>; else goto <D.22006>;
          <D.22005>:
          D.22007 = *_objptr;
          if (D.22007 == key) goto <D.22008>; else goto <D.22009>;
          <D.22008>:
          D.22010 = safe_name (start);
          _objptr.20 = (long int) _objptr;
          start.8 = (long int) start;
          D.22012 = _objptr.20 - start.8;
          monoeg_g_print ("found ref to %p in object %p (%s) at offset %td\n", key, start, D.22010, D.22012);
          <D.22009>:
          <D.22006>:
          _bmap = _bmap >> 1;
          _objptr = _objptr + 8;
          <D.20308>:
          if (_bmap != 0) goto <D.20307>; else goto <D.20309>;
          <D.20309>:
          _objptr = start_run + 512;
        }
        <D.20311>:
        bwords.21 = bwords;
        bwords = bwords.21 + 4294967295;
        if (bwords.21 != 0) goto <D.20310>; else goto <D.20312>;
        <D.20312>:
        D.22014 = (sizetype) el_size;
        e_start = e_start + D.22014;
      }
      <D.20314>:
      if (e_start < e_end) goto <D.20313>; else goto <D.20315>;
      <D.20315>:
    }
    goto <D.20238>;
    <D.20316>:
    goto <D.20238>;
    <D.20317>:
    monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-scan-object.h", 111);
    <D.20238>:
  }
  goto <D.22015>;
  <D.21878>:
  {
    mword * words;
    size_t size;
    int i;

    words = start;
    D.22016 = sgen_safe_object_get_size (start);
    size = (size_t) D.22016;
    i = 0;
    goto <D.20322>;
    <D.20321>:
    D.22017 = (long unsigned int) i;
    D.22018 = D.22017 * 8;
    D.22019 = words + D.22018;
    D.22020 = *D.22019;
    key.22 = (long unsigned int) key;
    if (D.22020 == key.22) goto <D.22022>; else goto <D.22023>;
    <D.22022>:
    D.22024 = safe_name (start);
    D.22017 = (long unsigned int) i;
    D.22018 = D.22017 * 8;
    monoeg_g_print ("found possible ref to %p in object %p (%s) at offset %td\n", key, start, D.22024, D.22018);
    <D.22023>:
    i = i + 1;
    <D.20322>:
    D.22017 = (long unsigned int) i;
    D.22025 = size / 8;
    if (D.22017 < D.22025) goto <D.20321>; else goto <D.20323>;
    <D.20323>:
  }
  <D.22015>:
}


scan_roots_for_specific_ref (struct MonoObject * key, int root_type)
{
  long unsigned int D.22028;
  long unsigned int D.22029;
  long unsigned int D.22030;
  long unsigned int D.22031;
  void * D.22034;
  long unsigned int D.22035;
  unsigned int D.22036;
  unsigned int D.22037;
  gsize * bitmap_data.23;
  long unsigned int D.22039;
  void * D.22042;
  int bwords.24;
  struct SgenHashTableEntry * D.22044;
  unsigned int D.22045;
  void * * start_root;
  struct RootRecord * root;

  check_key = key;
  {
    struct SgenHashTable * __hash_table;
    struct SgenHashTableEntry * * __table;
    guint __i;

    __hash_table = &roots_hash[root_type];
    __table = __hash_table->table;
    __i = 0;
    goto <D.20389>;
    <D.20388>:
    {
      struct SgenHashTableEntry * * __iter;
      struct SgenHashTableEntry * * __next;

      D.22028 = (long unsigned int) __i;
      D.22029 = D.22028 * 8;
      __iter = __table + D.22029;
      goto <D.20386>;
      <D.20385>:
      {
        struct SgenHashTableEntry * __entry;

        __entry = *__iter;
        __next = &__entry->next;
        start_root = __entry->key;
        root = &__entry->data;
        {
          mword desc;

          desc = root->root_desc;
          check_root = root;
          D.22030 = desc & 7;
          switch (D.22030) <default: <D.20384>, case 1: <D.20364>, case 2: <D.20383>, case 3: <D.20368>, case 4: <D.20381>>
          <D.20364>:
          desc = desc >> 3;
          goto <D.20366>;
          <D.20365>:
          D.22031 = desc & 1;
          if (D.22031 != 0) goto <D.22032>; else goto <D.22033>;
          <D.22032>:
          D.22034 = *start_root;
          check_root_obj_specific_ref (root, key, D.22034);
          <D.22033>:
          desc = desc >> 1;
          start_root = start_root + 8;
          <D.20366>:
          if (desc != 0) goto <D.20365>; else goto <D.20367>;
          <D.20367>:
          return;
          <D.20368>:
          {
            gsize * bitmap_data;
            int bwords;
            void * * start_run;

            bitmap_data = sgen_get_complex_descriptor_bitmap (desc);
            D.22035 = *bitmap_data;
            D.22036 = (unsigned int) D.22035;
            D.22037 = D.22036 + 4294967295;
            bwords = (int) D.22037;
            start_run = start_root;
            bitmap_data = bitmap_data + 8;
            goto <D.20378>;
            <D.20377>:
            {
              gsize bmap;
              void * * objptr;

              bitmap_data.23 = bitmap_data;
              bitmap_data = bitmap_data.23 + 8;
              bmap = *bitmap_data.23;
              objptr = start_run;
              goto <D.20375>;
              <D.20374>:
              D.22039 = bmap & 1;
              if (D.22039 != 0) goto <D.22040>; else goto <D.22041>;
              <D.22040>:
              D.22042 = *objptr;
              check_root_obj_specific_ref (root, key, D.22042);
              <D.22041>:
              bmap = bmap >> 1;
              objptr = objptr + 8;
              <D.20375>:
              if (bmap != 0) goto <D.20374>; else goto <D.20376>;
              <D.20376>:
              start_run = start_run + 512;
            }
            <D.20378>:
            bwords.24 = bwords;
            bwords = bwords.24 + -1;
            if (bwords.24 > 0) goto <D.20377>; else goto <D.20379>;
            <D.20379>:
            goto <D.20380>;
          }
          <D.20381>:
          {
            void (*MonoGCRootMarkFunc) (void *, void (*MonoGCMarkFunc) (void * *)) marker;

            marker = sgen_get_user_descriptor_func (desc);
            marker (start_root, check_root_obj_specific_ref_from_marker);
            goto <D.20380>;
          }
          <D.20383>:
          monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-gc.c", 844);
          <D.20384>:
          monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-gc.c", 846);
          <D.20380>:
        }
      }
      __iter = __next;
      <D.20386>:
      D.22044 = *__iter;
      if (D.22044 != 0B) goto <D.20385>; else goto <D.20387>;
      <D.20387>:
    }
    __i = __i + 1;
    <D.20389>:
    D.22045 = roots_hash[root_type].size;
    if (D.22045 > __i) goto <D.20388>; else goto <D.20390>;
    <D.20390>:
  }
  check_key = 0B;
  check_root = 0B;
}


check_root_obj_specific_ref_from_marker (void * * obj)
{
  struct RootRecord * check_root.25;
  struct MonoObject * check_key.26;
  void * D.22049;

  check_root.25 = check_root;
  check_key.26 = check_key;
  D.22049 = *obj;
  check_root_obj_specific_ref (check_root.25, check_key.26, D.22049);
}


check_root_obj_specific_ref (struct RootRecord * root, struct MonoObject * key, struct MonoObject * obj)
{
  if (key != obj) goto <D.22050>; else goto <D.22051>;
  <D.22050>:
  return;
  <D.22051>:
  monoeg_g_print ("found ref to %p in root record %p\n", key, root);
}


__attribute__((visibility ("hidden")))
mono_gc_clear_domain (struct MonoDomain * domain)
{
  int concurrent_collection_in_progress.27;
  int concurrent_collection_in_progress.28;
  _Bool D.22057;
  long int D.22058;
  long int D.22059;
  int xdomain_checks.29;
  struct MonoDomain * D.22065;
  struct GCMemSection * nursery_section.30;
  char * D.22069;
  char * D.22070;
  void (*<T2e39>) (gboolean, gboolean, void (*IterateObjectCallbackFunc) (char *, size_t, void *), void *) D.22071;
  char[0:] * D.22072;
  int D.22073;
  struct LOSObject * D.22078;
  struct FILE * gc_debug_file.31;
  struct MonoDomain * D.22083;
  int do_pin_stats.32;
  _Bool D.22087;
  long int D.22088;
  long int D.22089;
  struct LOSObject * bigobj;
  struct LOSObject * prev;
  int i;

  pthread_mutex_lock (&gc_mutex);
  sgen_stop_world (0);
  concurrent_collection_in_progress.27 = concurrent_collection_in_progress;
  if (concurrent_collection_in_progress.27 != 0) goto <D.22054>; else goto <D.22055>;
  <D.22054>:
  sgen_perform_collection (0, 1, "clear domain", 1);
  <D.22055>:
  concurrent_collection_in_progress.28 = concurrent_collection_in_progress;
  D.22057 = concurrent_collection_in_progress.28 != 0;
  D.22058 = (long int) D.22057;
  D.22059 = __builtin_expect (D.22058, 0);
  if (D.22059 != 0) goto <D.22060>; else goto <D.22061>;
  <D.22060>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 1059, "!concurrent_collection_in_progress");
  <D.22061>:
  sgen_process_fin_stage_entries ();
  sgen_process_dislink_stage_entries ();
  sgen_clear_nursery_fragments ();
  xdomain_checks.29 = xdomain_checks;
  if (xdomain_checks.29 != 0) goto <D.22063>; else goto <D.22064>;
  <D.22063>:
  D.22065 = mono_get_root_domain ();
  if (D.22065 != domain) goto <D.22066>; else goto <D.22067>;
  <D.22066>:
  scan_for_registered_roots_in_domain (domain, 0);
  scan_for_registered_roots_in_domain (domain, 2);
  check_for_xdomain_refs ();
  <D.22067>:
  <D.22064>:
  null_ephemerons_for_domain (domain);
  i = 0;
  goto <D.20507>;
  <D.20506>:
  sgen_null_links_for_domain (domain, i);
  i = i + 1;
  <D.20507>:
  if (i <= 1) goto <D.20506>; else goto <D.20508>;
  <D.20508>:
  i = 0;
  goto <D.20510>;
  <D.20509>:
  sgen_remove_finalizers_for_domain (domain, i);
  i = i + 1;
  <D.20510>:
  if (i <= 1) goto <D.20509>; else goto <D.20511>;
  <D.20511>:
  nursery_section.30 = nursery_section;
  D.22069 = nursery_section.30->data;
  nursery_section.30 = nursery_section;
  D.22070 = nursery_section.30->end_data;
  sgen_scan_area_with_callback (D.22069, D.22070, clear_domain_process_minor_object_callback, domain, 0);
  D.22071 = major_collector.iterate_objects;
  D.22071 (1, 1, clear_domain_process_major_object_callback, domain);
  bigobj = los_object_list;
  goto <D.20513>;
  <D.20512>:
  D.22072 = &bigobj->data;
  clear_domain_process_object (D.22072, domain);
  bigobj = bigobj->next;
  <D.20513>:
  if (bigobj != 0B) goto <D.20512>; else goto <D.20514>;
  <D.20514>:
  prev = 0B;
  bigobj = los_object_list;
  goto <D.20516>;
  <D.20517>:
  D.22072 = &bigobj->data;
  D.22073 = need_remove_object_for_domain (D.22072, domain);
  if (D.22073 != 0) goto <D.22074>; else goto <D.22075>;
  <D.22074>:
  {
    struct LOSObject * to_free;

    to_free = bigobj;
    if (prev != 0B) goto <D.22076>; else goto <D.22077>;
    <D.22076>:
    D.22078 = bigobj->next;
    prev->next = D.22078;
    goto <D.22079>;
    <D.22077>:
    D.22078 = bigobj->next;
    los_object_list = D.22078;
    <D.22079>:
    bigobj = bigobj->next;
    if (0 != 0) goto <D.22080>; else goto <D.22081>;
    <D.22080>:
    gc_debug_file.31 = gc_debug_file;
    D.22072 = &bigobj->data;
    fprintf (gc_debug_file.31, "Freeing large object %p\n", D.22072);
    gc_debug_file.31 = gc_debug_file;
    fflush (gc_debug_file.31);
    <D.22081>:
    sgen_los_free_object (to_free);
    // predicted unlikely by continue predictor.
    goto <D.20516>;
  }
  <D.22075>:
  prev = bigobj;
  bigobj = bigobj->next;
  <D.20516>:
  if (bigobj != 0B) goto <D.20517>; else goto <D.20518>;
  <D.20518>:
  D.22071 = major_collector.iterate_objects;
  D.22071 (1, 0, clear_domain_free_major_non_pinned_object_callback, domain);
  D.22071 = major_collector.iterate_objects;
  D.22071 (0, 1, clear_domain_free_major_pinned_object_callback, domain);
  D.22083 = mono_get_root_domain ();
  if (D.22083 == domain) goto <D.22084>; else goto <D.22085>;
  <D.22084>:
  do_pin_stats.32 = do_pin_stats;
  D.22087 = do_pin_stats.32 != 0;
  D.22088 = (long int) D.22087;
  D.22089 = __builtin_expect (D.22088, 0);
  if (D.22089 != 0) goto <D.22090>; else goto <D.22091>;
  <D.22090>:
  sgen_pin_stats_print_class_stats ();
  <D.22091>:
  <D.22085>:
  sgen_restart_world (0, 0B);
  sgen_gc_unlock ();
}


clear_domain_free_major_pinned_object_callback (char * obj, size_t size, struct MonoDomain * domain)
{
  int D.22092;
  void (*<T2e35>) (char *, size_t) D.22095;

  D.22092 = need_remove_object_for_domain (obj, domain);
  if (D.22092 != 0) goto <D.22093>; else goto <D.22094>;
  <D.22093>:
  D.22095 = major_collector.free_pinned_object;
  D.22095 (obj, size);
  <D.22094>:
}


clear_domain_free_major_non_pinned_object_callback (char * obj, size_t size, struct MonoDomain * domain)
{
  int D.22096;
  void (*<T2e35>) (char *, size_t) D.22099;

  D.22096 = need_remove_object_for_domain (obj, domain);
  if (D.22096 != 0) goto <D.22097>; else goto <D.22098>;
  <D.22097>:
  D.22099 = major_collector.free_non_pinned_object;
  D.22099 (obj, size);
  <D.22098>:
}


clear_domain_process_major_object_callback (char * obj, size_t size, struct MonoDomain * domain)
{
  clear_domain_process_object (obj, domain);
}


clear_domain_process_minor_object_callback (char * obj, size_t size, struct MonoDomain * domain)
{
  int D.22100;

  D.22100 = clear_domain_process_object (obj, domain);
  if (D.22100 != 0) goto <D.22101>; else goto <D.22102>;
  <D.22101>:
  memset (obj, 0, size);
  <D.22102>:
}


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

  D.22104 = __builtin_object_size (__dest, 0);
  D.22103 = __builtin___memset_chk (__dest, __ch, __len, D.22104);
  return D.22103;
}


scan_for_registered_roots_in_domain (struct MonoDomain * domain, int root_type)
{
  long unsigned int D.22106;
  long unsigned int D.22107;
  long unsigned int D.22110;
  long unsigned int D.22111;
  void * D.22114;
  long unsigned int D.22117;
  unsigned int D.22118;
  unsigned int D.22119;
  gsize * bitmap_data.33;
  long unsigned int D.22121;
  void * D.22124;
  int bwords.34;
  struct SgenHashTableEntry * D.22128;
  unsigned int D.22129;
  void * * start_root;
  struct RootRecord * root;

  check_domain = domain;
  {
    struct SgenHashTable * __hash_table;
    struct SgenHashTableEntry * * __table;
    guint __i;

    __hash_table = &roots_hash[root_type];
    __table = __hash_table->table;
    __i = 0;
    goto <D.20465>;
    <D.20464>:
    {
      struct SgenHashTableEntry * * __iter;
      struct SgenHashTableEntry * * __next;

      D.22106 = (long unsigned int) __i;
      D.22107 = D.22106 * 8;
      __iter = __table + D.22107;
      goto <D.20462>;
      <D.20461>:
      {
        struct SgenHashTableEntry * __entry;

        __entry = *__iter;
        __next = &__entry->next;
        start_root = __entry->key;
        root = &__entry->data;
        {
          mword desc;

          desc = root->root_desc;
          if (start_root == domain) goto <D.22108>; else goto <D.22109>;
          <D.22108>:
          // predicted unlikely by continue predictor.
          goto <D.20439>;
          <D.22109>:
          D.22110 = desc & 7;
          switch (D.22110) <default: <D.20460>, case 1: <D.20440>, case 2: <D.20459>, case 3: <D.20445>, case 4: <D.20457>>
          <D.20440>:
          desc = desc >> 3;
          goto <D.20442>;
          <D.20441>:
          D.22111 = desc & 1;
          if (D.22111 != 0) goto <D.22112>; else goto <D.22113>;
          <D.22112>:
          D.22114 = *start_root;
          if (D.22114 != 0B) goto <D.22115>; else goto <D.22116>;
          <D.22115>:
          D.22114 = *start_root;
          check_obj_not_in_domain (D.22114);
          <D.22116>:
          <D.22113>:
          desc = desc >> 1;
          start_root = start_root + 8;
          <D.20442>:
          if (desc != 0) goto <D.20441>; else goto <D.20443>;
          <D.20443>:
          goto <D.20444>;
          <D.20445>:
          {
            gsize * bitmap_data;
            int bwords;
            void * * start_run;

            bitmap_data = sgen_get_complex_descriptor_bitmap (desc);
            D.22117 = *bitmap_data;
            D.22118 = (unsigned int) D.22117;
            D.22119 = D.22118 + 4294967295;
            bwords = (int) D.22119;
            start_run = start_root;
            bitmap_data = bitmap_data + 8;
            goto <D.20455>;
            <D.20454>:
            {
              gsize bmap;
              void * * objptr;

              bitmap_data.33 = bitmap_data;
              bitmap_data = bitmap_data.33 + 8;
              bmap = *bitmap_data.33;
              objptr = start_run;
              goto <D.20452>;
              <D.20451>:
              D.22121 = bmap & 1;
              if (D.22121 != 0) goto <D.22122>; else goto <D.22123>;
              <D.22122>:
              D.22124 = *objptr;
              if (D.22124 != 0B) goto <D.22125>; else goto <D.22126>;
              <D.22125>:
              D.22124 = *objptr;
              check_obj_not_in_domain (D.22124);
              <D.22126>:
              <D.22123>:
              bmap = bmap >> 1;
              objptr = objptr + 8;
              <D.20452>:
              if (bmap != 0) goto <D.20451>; else goto <D.20453>;
              <D.20453>:
              start_run = start_run + 512;
            }
            <D.20455>:
            bwords.34 = bwords;
            bwords = bwords.34 + -1;
            if (bwords.34 > 0) goto <D.20454>; else goto <D.20456>;
            <D.20456>:
            goto <D.20444>;
          }
          <D.20457>:
          {
            void (*MonoGCRootMarkFunc) (void *, void (*MonoGCMarkFunc) (void * *)) marker;

            marker = sgen_get_user_descriptor_func (desc);
            marker (start_root, check_obj_not_in_domain);
            goto <D.20444>;
          }
          <D.20459>:
          monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-gc.c", 969);
          <D.20460>:
          monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-gc.c", 971);
          <D.20444>:
        }
      }
      <D.20439>:
      __iter = __next;
      <D.20462>:
      D.22128 = *__iter;
      if (D.22128 != 0B) goto <D.20461>; else goto <D.20463>;
      <D.20463>:
    }
    __i = __i + 1;
    <D.20465>:
    D.22129 = roots_hash[root_type].size;
    if (D.22129 > __i) goto <D.20464>; else goto <D.20466>;
    <D.20466>:
  }
  check_domain = 0B;
}


check_obj_not_in_domain (void * * o)
{
  void * D.22130;
  struct MonoVTable * D.22131;
  struct MonoDomain * D.22132;
  struct MonoDomain * check_domain.35;
  _Bool D.22134;
  long int D.22135;
  long int D.22136;

  D.22130 = *o;
  D.22131 = MEM[(struct MonoObject *)D.22130].vtable;
  D.22132 = D.22131->domain;
  check_domain.35 = check_domain;
  D.22134 = D.22132 == check_domain.35;
  D.22135 = (long int) D.22134;
  D.22136 = __builtin_expect (D.22135, 0);
  if (D.22136 != 0) goto <D.22137>; else goto <D.22138>;
  <D.22137>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 918, "((MonoObject*)(*o))->vtable->domain != check_domain");
  <D.22138>:
}


check_for_xdomain_refs ()
{
  struct GCMemSection * nursery_section.36;
  char * D.22140;
  char * D.22141;
  void (*<T2e39>) (gboolean, gboolean, void (*IterateObjectCallbackFunc) (char *, size_t, void *), void *) D.22142;
  char[0:] * D.22143;
  long unsigned int D.22144;
  struct LOSObject * bigobj;

  nursery_section.36 = nursery_section;
  D.22140 = nursery_section.36->data;
  nursery_section.36 = nursery_section;
  D.22141 = nursery_section.36->end_data;
  sgen_scan_area_with_callback (D.22140, D.22141, scan_object_for_xdomain_refs, 0B, 0);
  D.22142 = major_collector.iterate_objects;
  D.22142 (1, 1, scan_object_for_xdomain_refs, 0B);
  bigobj = los_object_list;
  goto <D.20472>;
  <D.20471>:
  D.22143 = &bigobj->data;
  D.22144 = sgen_los_object_size (bigobj);
  scan_object_for_xdomain_refs (D.22143, D.22144, 0B);
  bigobj = bigobj->next;
  <D.20472>:
  if (bigobj != 0B) goto <D.20471>; else goto <D.20473>;
  <D.20473>:
}


scan_object_for_xdomain_refs (char * start, mword size, void * data)
{
  struct MonoVTable * D.22145;
  long unsigned int D.22146;
  long unsigned int D.22147;
  long unsigned int D.22148;
  long unsigned int D.22149;
  long unsigned int D.22152;
  long unsigned int D.22153;
  long unsigned int D.22154;
  long unsigned int D.22155;
  long unsigned int D.22156;
  long unsigned int D.22157;
  long unsigned int D.22158;
  long unsigned int D.22159;
  int D.22160;
  long unsigned int D.22161;
  long unsigned int D.22162;
  int D.22163;
  long unsigned int D.22164;
  long unsigned int D.22167;
  int D.22168;
  int D.22169;
  unsigned int D.22172;
  unsigned int el_size.37;
  unsigned int D.22174;
  sizetype D.22175;
  int D.22179;
  int D.22180;
  long unsigned int D.22181;
  long unsigned int D.22182;
  long unsigned int D.22183;
  long unsigned int D.22184;
  void * * D.22185;
  sizetype D.22186;
  long unsigned int D.22190;
  long unsigned int D.22193;
  long unsigned int D.22196;
  unsigned int D.22197;
  unsigned int D.22198;
  struct MonoVTable * D.22201;
  struct MonoClass * D.22202;
  const char * D.22203;
  const char * D.22204;
  gsize * bitmap_data.38;
  long unsigned int D.22206;
  int bwords.39;
  long unsigned int D.22210;
  gsize * mbitmap_data.40;
  long unsigned int D.22212;
  unsigned int D.22213;
  unsigned int D.22214;
  struct MonoClass * D.22215;
  unsigned int el_size.41;
  unsigned int D.22217;
  sizetype D.22218;
  const char * D.22221;
  const char * D.22222;
  gsize * bitmap_data.42;
  long unsigned int D.22224;
  unsigned int bwords.43;
  sizetype D.22228;
  struct MonoDomain * domain;

  D.22145 = MEM[(struct MonoObject *)start].vtable;
  domain = D.22145->domain;
  {
    struct GCVTable * vt;
    mword desc;

    D.22146 = MEM[(mword *)start];
    D.22147 = D.22146 & 18446744073709551612;
    vt = (struct GCVTable *) D.22147;
    desc = vt->desc;
    D.22148 = desc & 7;
    switch (D.22148) <default: <D.20223>, case 1: <D.20138>, case 2: <D.20145>, case 3: <D.20189>, case 4: <D.20153>, case 5: <D.20183>, case 6: <D.20202>, case 7: <D.20222>>
    <D.20138>:
    D.22149 = desc & 4294901760;
    if (D.22149 != 0) goto <D.22150>; else goto <D.22151>;
    <D.22150>:
    {
      void * * _objptr_end;
      void * * _objptr;

      _objptr = start;
      D.22152 = desc >> 16;
      D.22153 = D.22152 & 255;
      D.22154 = D.22153 * 8;
      _objptr = _objptr + D.22154;
      D.22155 = desc >> 24;
      D.22156 = D.22155 & 255;
      D.22157 = D.22156 * 8;
      _objptr_end = _objptr + D.22157;
      check_reference_for_xdomain (_objptr, start, domain);
      _objptr = _objptr + 8;
      goto <D.20142>;
      <D.20141>:
      check_reference_for_xdomain (_objptr, start, domain);
      _objptr = _objptr + 8;
      <D.20142>:
      if (_objptr < _objptr_end) goto <D.20141>; else goto <D.20143>;
      <D.20143>:
    }
    <D.22151>:
    goto <D.20144>;
    <D.20145>:
    {
      void * * _objptr;
      gsize _bmap;

      _objptr = start;
      _bmap = desc >> 16;
      _objptr = _objptr + 16;
      {
        int _index;

        _index = __builtin_ctzl (_bmap);
        D.22158 = (long unsigned int) _index;
        D.22159 = D.22158 * 8;
        _objptr = _objptr + D.22159;
        D.22160 = _index + 1;
        _bmap = _bmap >> D.22160;
        check_reference_for_xdomain (_objptr, start, domain);
        _objptr = _objptr + 8;
      }
      goto <D.20151>;
      <D.20150>:
      {
        int _index;

        _index = __builtin_ctzl (_bmap);
        D.22161 = (long unsigned int) _index;
        D.22162 = D.22161 * 8;
        _objptr = _objptr + D.22162;
        D.22163 = _index + 1;
        _bmap = _bmap >> D.22163;
        check_reference_for_xdomain (_objptr, start, domain);
        _objptr = _objptr + 8;
      }
      <D.20151>:
      if (_bmap != 0) goto <D.20150>; else goto <D.20152>;
      <D.20152>:
    }
    goto <D.20144>;
    <D.20153>:
    D.22164 = desc & 4294950912;
    if (D.22164 != 0) goto <D.22165>; else goto <D.22166>;
    <D.22165>:
    {
      int el_size;
      int etype;

      D.22167 = desc >> 3;
      D.22168 = (int) D.22167;
      el_size = D.22168 & 1023;
      D.22169 = (int) desc;
      etype = D.22169 & 49152;
      if (etype == 16384) goto <D.22170>; else goto <D.22171>;
      <D.22170>:
      {
        void * * p;
        void * * end_refs;

        p = start + 32;
        D.22172 = MEM[(struct MonoArray *)start].max_length;
        el_size.37 = (unsigned int) el_size;
        D.22174 = D.22172 * el_size.37;
        D.22175 = (sizetype) D.22174;
        end_refs = p + D.22175;
        goto <D.20159>;
        <D.20158>:
        check_reference_for_xdomain (p, start, domain);
        p = p + 8;
        <D.20159>:
        if (p < end_refs) goto <D.20158>; else goto <D.20160>;
        <D.20160>:
      }
      goto <D.22176>;
      <D.22171>:
      if (etype == 32768) goto <D.22177>; else goto <D.22178>;
      <D.22177>:
      {
        int offset;
        int num_refs;
        char * e_start;
        char * e_end;

        D.22152 = desc >> 16;
        D.22179 = (int) D.22152;
        offset = D.22179 & 255;
        D.22155 = desc >> 24;
        D.22180 = (int) D.22155;
        num_refs = D.22180 & 255;
        e_start = start + 32;
        D.22172 = MEM[(struct MonoArray *)start].max_length;
        el_size.37 = (unsigned int) el_size;
        D.22174 = D.22172 * el_size.37;
        D.22175 = (sizetype) D.22174;
        e_end = e_start + D.22175;
        goto <D.20171>;
        <D.20170>:
        {
          void * * p;
          int i;

          p = e_start;
          D.22181 = (long unsigned int) offset;
          D.22182 = D.22181 * 8;
          p = p + D.22182;
          i = 0;
          goto <D.20168>;
          <D.20167>:
          D.22183 = (long unsigned int) i;
          D.22184 = D.22183 * 8;
          D.22185 = p + D.22184;
          check_reference_for_xdomain (D.22185, start, domain);
          i = i + 1;
          <D.20168>:
          if (i < num_refs) goto <D.20167>; else goto <D.20169>;
          <D.20169>:
          D.22186 = (sizetype) el_size;
          e_start = e_start + D.22186;
        }
        <D.20171>:
        if (e_start < e_end) goto <D.20170>; else goto <D.20172>;
        <D.20172>:
      }
      goto <D.22187>;
      <D.22178>:
      if (etype == 49152) goto <D.22188>; else goto <D.22189>;
      <D.22188>:
      {
        char * e_start;
        char * e_end;

        e_start = start + 32;
        D.22172 = MEM[(struct MonoArray *)start].max_length;
        el_size.37 = (unsigned int) el_size;
        D.22174 = D.22172 * el_size.37;
        D.22175 = (sizetype) D.22174;
        e_end = e_start + D.22175;
        goto <D.20181>;
        <D.20180>:
        {
          void * * p;
          gsize _bmap;

          p = e_start;
          _bmap = desc >> 16;
          goto <D.20178>;
          <D.20177>:
          D.22190 = _bmap & 1;
          if (D.22190 != 0) goto <D.22191>; else goto <D.22192>;
          <D.22191>:
          check_reference_for_xdomain (p, start, domain);
          <D.22192>:
          _bmap = _bmap >> 1;
          p = p + 8;
          <D.20178>:
          if (_bmap != 0) goto <D.20177>; else goto <D.20179>;
          <D.20179>:
          D.22186 = (sizetype) el_size;
          e_start = e_start + D.22186;
        }
        <D.20181>:
        if (e_start < e_end) goto <D.20180>; else goto <D.20182>;
        <D.20182>:
      }
      <D.22189>:
      <D.22187>:
      <D.22176>:
    }
    <D.22166>:
    goto <D.20144>;
    <D.20183>:
    {
      void * * _objptr;
      gsize _bmap;

      _objptr = start;
      _bmap = desc >> 3;
      _objptr = _objptr + 16;
      goto <D.20187>;
      <D.20186>:
      D.22193 = _bmap & 1;
      if (D.22193 != 0) goto <D.22194>; else goto <D.22195>;
      <D.22194>:
      check_reference_for_xdomain (_objptr, start, domain);
      <D.22195>:
      _bmap = _bmap >> 1;
      _objptr = _objptr + 8;
      <D.20187>:
      if (_bmap != 0) goto <D.20186>; else goto <D.20188>;
      <D.20188>:
    }
    goto <D.20144>;
    <D.20189>:
    {
      void * * _objptr;
      gsize * bitmap_data;
      int bwords;
      void * * start_run;

      _objptr = start;
      bitmap_data = sgen_get_complex_descriptor (desc);
      D.22196 = *bitmap_data;
      D.22197 = (unsigned int) D.22196;
      D.22198 = D.22197 + 4294967295;
      bwords = (int) D.22198;
      start_run = _objptr;
      bitmap_data = bitmap_data + 8;
      if (0 != 0) goto <D.22199>; else goto <D.22200>;
      <D.22199>:
      {
        struct MonoObject * myobj;

        myobj = start;
        D.22201 = myobj->vtable;
        D.22202 = D.22201->klass;
        D.22203 = D.22202->name_space;
        D.22201 = myobj->vtable;
        D.22202 = D.22201->klass;
        D.22204 = D.22202->name;
        monoeg_g_print ("found %d at %p (0x%zx): %s.%s\n", bwords, start, desc, D.22203, D.22204);
      }
      <D.22200>:
      goto <D.20200>;
      <D.20199>:
      {
        gsize _bmap;

        bitmap_data.38 = bitmap_data;
        bitmap_data = bitmap_data.38 + 8;
        _bmap = *bitmap_data.38;
        _objptr = start_run;
        goto <D.20197>;
        <D.20196>:
        D.22206 = _bmap & 1;
        if (D.22206 != 0) goto <D.22207>; else goto <D.22208>;
        <D.22207>:
        check_reference_for_xdomain (_objptr, start, domain);
        <D.22208>:
        _bmap = _bmap >> 1;
        _objptr = _objptr + 8;
        <D.20197>:
        if (_bmap != 0) goto <D.20196>; else goto <D.20198>;
        <D.20198>:
        start_run = start_run + 512;
      }
      <D.20200>:
      bwords.39 = bwords;
      bwords = bwords.39 + -1;
      if (bwords.39 > 0) goto <D.20199>; else goto <D.20201>;
      <D.20201>:
    }
    goto <D.20144>;
    <D.20202>:
    {
      gsize * mbitmap_data;
      int mbwords;
      int el_size;
      char * e_start;
      char * e_end;

      D.22210 = vt->desc;
      mbitmap_data = sgen_get_complex_descriptor (D.22210);
      mbitmap_data.40 = mbitmap_data;
      mbitmap_data = mbitmap_data.40 + 8;
      D.22212 = *mbitmap_data.40;
      D.22213 = (unsigned int) D.22212;
      D.22214 = D.22213 + 4294967295;
      mbwords = (int) D.22214;
      D.22215 = vt->klass;
      el_size = mono_array_element_size (D.22215);
      e_start = start + 32;
      D.22172 = MEM[(struct MonoArray *)start].max_length;
      el_size.41 = (unsigned int) el_size;
      D.22217 = D.22172 * el_size.41;
      D.22218 = (sizetype) D.22217;
      e_end = e_start + D.22218;
      if (0 != 0) goto <D.22219>; else goto <D.22220>;
      <D.22219>:
      D.22210 = vt->desc;
      D.22215 = vt->klass;
      D.22221 = D.22215->name_space;
      D.22215 = vt->klass;
      D.22222 = D.22215->name;
      monoeg_g_print ("found %d at %p (0x%zx): %s.%s\n", mbwords, start, D.22210, D.22221, D.22222);
      <D.22220>:
      goto <D.20220>;
      <D.20219>:
      {
        void * * _objptr;
        gsize * bitmap_data;
        unsigned int bwords;

        _objptr = e_start;
        bitmap_data = mbitmap_data;
        bwords = (unsigned int) mbwords;
        goto <D.20217>;
        <D.20216>:
        {
          gsize _bmap;
          void * * start_run;

          bitmap_data.42 = bitmap_data;
          bitmap_data = bitmap_data.42 + 8;
          _bmap = *bitmap_data.42;
          start_run = _objptr;
          goto <D.20214>;
          <D.20213>:
          D.22224 = _bmap & 1;
          if (D.22224 != 0) goto <D.22225>; else goto <D.22226>;
          <D.22225>:
          check_reference_for_xdomain (_objptr, start, domain);
          <D.22226>:
          _bmap = _bmap >> 1;
          _objptr = _objptr + 8;
          <D.20214>:
          if (_bmap != 0) goto <D.20213>; else goto <D.20215>;
          <D.20215>:
          _objptr = start_run + 512;
        }
        <D.20217>:
        bwords.43 = bwords;
        bwords = bwords.43 + 4294967295;
        if (bwords.43 != 0) goto <D.20216>; else goto <D.20218>;
        <D.20218>:
        D.22228 = (sizetype) el_size;
        e_start = e_start + D.22228;
      }
      <D.20220>:
      if (e_start < e_end) goto <D.20219>; else goto <D.20221>;
      <D.20221>:
    }
    goto <D.20144>;
    <D.20222>:
    goto <D.20144>;
    <D.20223>:
    monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-scan-object.h", 111);
    <D.20144>:
  }
}


check_reference_for_xdomain (void * * ptr, char * obj, struct MonoDomain * domain)
{
  long int ptr.44;
  long int o.45;
  long int D.22232;
  struct MonoVTable * D.22236;
  struct MonoDomain * D.22237;
  int D.22238;
  struct MonoVTable * D.22241;
  struct MonoClassField * D.22242;
  long unsigned int D.22243;
  long unsigned int D.22244;
  struct MonoClassField * D.22245;
  int D.22246;
  unsigned int D.22249;
  unsigned int i.46;
  struct MonoClass * D.22252;
  struct MonoClass * D.22253;
  struct MonoClass * D.22257;
  const char * D.22258;
  const char * D.22259;
  const char * iftmp.47;
  const char * D.22264;
  const char * D.22265;
  const char * iftmp.48;
  struct MonoObject * o;
  struct MonoObject * ref;
  int offset;
  struct MonoClass * class;
  struct MonoClassField * field;
  char * str;

  o = obj;
  ref = *ptr;
  ptr.44 = (long int) ptr;
  o.45 = (long int) o;
  D.22232 = ptr.44 - o.45;
  offset = (int) D.22232;
  if (ref == 0B) goto <D.22233>; else goto <D.22235>;
  <D.22235>:
  D.22236 = ref->vtable;
  D.22237 = D.22236->domain;
  if (D.22237 == domain) goto <D.22233>; else goto <D.22234>;
  <D.22233>:
  return;
  <D.22234>:
  D.22238 = is_xdomain_ref_allowed (ptr, obj, domain);
  if (D.22238 != 0) goto <D.22239>; else goto <D.22240>;
  <D.22239>:
  return;
  <D.22240>:
  field = 0B;
  D.22241 = o->vtable;
  class = D.22241->klass;
  goto <D.20129>;
  <D.20128>:
  {
    int i;

    i = 0;
    goto <D.20126>;
    <D.20125>:
    D.22242 = class->fields;
    D.22243 = (long unsigned int) i;
    D.22244 = D.22243 * 32;
    D.22245 = D.22242 + D.22244;
    D.22246 = D.22245->offset;
    if (D.22246 == offset) goto <D.22247>; else goto <D.22248>;
    <D.22247>:
    D.22242 = class->fields;
    D.22243 = (long unsigned int) i;
    D.22244 = D.22243 * 32;
    field = D.22242 + D.22244;
    goto <D.20124>;
    <D.22248>:
    i = i + 1;
    <D.20126>:
    D.22249 = class->field.count;
    i.46 = (unsigned int) i;
    if (D.22249 > i.46) goto <D.20125>; else goto <D.20124>;
    <D.20124>:
    if (field != 0B) goto <D.20127>; else goto <D.22251>;
    <D.22251>:
  }
  class = class->parent;
  <D.20129>:
  if (class != 0B) goto <D.20128>; else goto <D.20127>;
  <D.20127>:
  D.22236 = ref->vtable;
  D.22252 = D.22236->klass;
  D.22253 = mono_defaults.string_class;
  if (D.22252 == D.22253) goto <D.22254>; else goto <D.22255>;
  <D.22254>:
  str = mono_string_to_utf8 (ref);
  goto <D.22256>;
  <D.22255>:
  str = 0B;
  <D.22256>:
  D.22241 = o->vtable;
  D.22257 = D.22241->klass;
  D.22258 = D.22257->name_space;
  D.22241 = o->vtable;
  D.22257 = D.22241->klass;
  D.22259 = D.22257->name;
  if (field != 0B) goto <D.22261>; else goto <D.22262>;
  <D.22261>:
  iftmp.47 = field->name;
  goto <D.22263>;
  <D.22262>:
  iftmp.47 = "";
  <D.22263>:
  D.22236 = ref->vtable;
  D.22252 = D.22236->klass;
  D.22264 = D.22252->name_space;
  D.22236 = ref->vtable;
  D.22252 = D.22236->klass;
  D.22265 = D.22252->name;
  if (str != 0B) goto <D.22267>; else goto <D.22268>;
  <D.22267>:
  iftmp.48 = str;
  goto <D.22269>;
  <D.22268>:
  iftmp.48 = "";
  <D.22269>:
  monoeg_g_print ("xdomain reference in %p (%s.%s) at offset %d (%s) to %p (%s.%s) (%s)  -  pointed to by:\n", o, D.22258, D.22259, offset, iftmp.47, ref, D.22264, D.22265, iftmp.48);
  mono_gc_scan_for_specific_ref (o, 1);
  if (str != 0B) goto <D.22270>; else goto <D.22271>;
  <D.22270>:
  monoeg_g_free (str);
  <D.22271>:
}


is_xdomain_ref_allowed (void * * ptr, char * obj, struct MonoDomain * domain)
{
  long int ptr.49;
  long int o.50;
  long int D.22275;
  struct MonoVTable * D.22276;
  struct MonoClass * D.22277;
  struct MonoClass * D.22278;
  gboolean D.22283;
  struct MonoClass * D.22284;
  struct MonoClass * D.22289;
  int D.22290;
  struct MonoVTable * D.22295;
  struct MonoClass * D.22296;
  const char * D.22297;
  int D.22298;
  const char * D.22301;
  int D.22302;
  const char * D.22305;
  int D.22306;
  const char * D.22309;
  int D.22310;
  int D.22313;
  int D.22316;
  int D.22319;
  int D.22322;
  int D.22325;
  int D.22328;
  int D.22331;
  int D.22334;
  int D.22337;
  struct MonoObject * o;
  struct MonoObject * ref;
  int offset;

  o = obj;
  ref = *ptr;
  ptr.49 = (long int) ptr;
  o.50 = (long int) o;
  D.22275 = ptr.49 - o.50;
  offset = (int) D.22275;
  D.22276 = o->vtable;
  D.22277 = D.22276->klass;
  D.22278 = mono_defaults.thread_class;
  if (D.22277 == D.22278) goto <D.22279>; else goto <D.22280>;
  <D.22279>:
  if (offset == 16) goto <D.22281>; else goto <D.22282>;
  <D.22281>:
  D.22283 = 1;
  return D.22283;
  <D.22282>:
  <D.22280>:
  D.22276 = o->vtable;
  D.22277 = D.22276->klass;
  D.22284 = mono_defaults.internal_thread_class;
  if (D.22277 == D.22284) goto <D.22285>; else goto <D.22286>;
  <D.22285>:
  if (offset == 120) goto <D.22287>; else goto <D.22288>;
  <D.22287>:
  D.22283 = 1;
  return D.22283;
  <D.22288>:
  <D.22286>:
  D.22276 = o->vtable;
  D.22277 = D.22276->klass;
  D.22289 = mono_defaults.real_proxy_class;
  D.22290 = mono_class_has_parent_fast (D.22277, D.22289);
  if (D.22290 != 0) goto <D.22291>; else goto <D.22292>;
  <D.22291>:
  if (offset == 32) goto <D.22293>; else goto <D.22294>;
  <D.22293>:
  D.22283 = 1;
  return D.22283;
  <D.22294>:
  <D.22292>:
  D.22295 = ref->vtable;
  D.22296 = D.22295->klass;
  D.22297 = D.22296->name_space;
  D.22298 = strcmp (D.22297, "System.Globalization");
  if (D.22298 == 0) goto <D.22299>; else goto <D.22300>;
  <D.22299>:
  D.22295 = ref->vtable;
  D.22296 = D.22295->klass;
  D.22301 = D.22296->name;
  D.22302 = strcmp (D.22301, "CultureInfo");
  if (D.22302 == 0) goto <D.22303>; else goto <D.22304>;
  <D.22303>:
  D.22276 = o->vtable;
  D.22277 = D.22276->klass;
  D.22305 = D.22277->name_space;
  D.22306 = strcmp (D.22305, "System");
  if (D.22306 == 0) goto <D.22307>; else goto <D.22308>;
  <D.22307>:
  D.22276 = o->vtable;
  D.22277 = D.22276->klass;
  D.22309 = D.22277->name;
  D.22310 = strcmp (D.22309, "Object[]");
  if (D.22310 == 0) goto <D.22311>; else goto <D.22312>;
  <D.22311>:
  D.22283 = 1;
  return D.22283;
  <D.22312>:
  <D.22308>:
  <D.22304>:
  <D.22300>:
  D.22295 = ref->vtable;
  D.22296 = D.22295->klass;
  D.22297 = D.22296->name_space;
  D.22313 = strcmp (D.22297, "System");
  if (D.22313 == 0) goto <D.22314>; else goto <D.22315>;
  <D.22314>:
  D.22295 = ref->vtable;
  D.22296 = D.22295->klass;
  D.22301 = D.22296->name;
  D.22316 = strcmp (D.22301, "Byte[]");
  if (D.22316 == 0) goto <D.22317>; else goto <D.22318>;
  <D.22317>:
  D.22276 = o->vtable;
  D.22277 = D.22276->klass;
  D.22305 = D.22277->name_space;
  D.22319 = strcmp (D.22305, "System.IO");
  if (D.22319 == 0) goto <D.22320>; else goto <D.22321>;
  <D.22320>:
  D.22276 = o->vtable;
  D.22277 = D.22276->klass;
  D.22309 = D.22277->name;
  D.22322 = strcmp (D.22309, "MemoryStream");
  if (D.22322 == 0) goto <D.22323>; else goto <D.22324>;
  <D.22323>:
  D.22283 = 1;
  return D.22283;
  <D.22324>:
  <D.22321>:
  <D.22318>:
  <D.22315>:
  D.22295 = ref->vtable;
  D.22296 = D.22295->klass;
  D.22297 = D.22296->name_space;
  D.22325 = strcmp (D.22297, "System.Runtime.Remoting.Messaging");
  if (D.22325 == 0) goto <D.22326>; else goto <D.22327>;
  <D.22326>:
  D.22295 = ref->vtable;
  D.22296 = D.22295->klass;
  D.22301 = D.22296->name;
  D.22328 = strcmp (D.22301, "AsyncResult");
  if (D.22328 == 0) goto <D.22329>; else goto <D.22330>;
  <D.22329>:
  D.22276 = o->vtable;
  D.22277 = D.22276->klass;
  D.22305 = D.22277->name_space;
  D.22331 = strcmp (D.22305, "System");
  if (D.22331 == 0) goto <D.22332>; else goto <D.22333>;
  <D.22332>:
  D.22276 = o->vtable;
  D.22277 = D.22276->klass;
  D.22309 = D.22277->name;
  D.22334 = strcmp (D.22309, "Object[]");
  if (D.22334 == 0) goto <D.22335>; else goto <D.22336>;
  <D.22335>:
  D.22337 = mono_thread_pool_is_queue_array (o);
  if (D.22337 != 0) goto <D.22338>; else goto <D.22339>;
  <D.22338>:
  D.22283 = 1;
  return D.22283;
  <D.22339>:
  <D.22336>:
  <D.22333>:
  <D.22330>:
  <D.22327>:
  D.22283 = 0;
  return D.22283;
}


mono_class_has_parent_fast (struct MonoClass * klass, struct MonoClass * parent)
{
  gboolean D.22341;
  int iftmp.51;
  short unsigned int D.22345;
  short unsigned int D.22346;
  struct MonoClass * * D.22348;
  long unsigned int D.22349;
  long unsigned int D.22350;
  sizetype D.22351;
  struct MonoClass * * D.22352;
  struct MonoClass * D.22353;

  D.22345 = klass->idepth;
  D.22346 = parent->idepth;
  if (D.22345 >= D.22346) goto <D.22347>; else goto <D.22343>;
  <D.22347>:
  D.22348 = klass->supertypes;
  D.22346 = parent->idepth;
  D.22349 = (long unsigned int) D.22346;
  D.22350 = D.22349 * 8;
  D.22351 = D.22350 + 18446744073709551608;
  D.22352 = D.22348 + D.22351;
  D.22353 = *D.22352;
  if (D.22353 == parent) goto <D.22354>; else goto <D.22343>;
  <D.22354>:
  iftmp.51 = 1;
  goto <D.22344>;
  <D.22343>:
  iftmp.51 = 0;
  <D.22344>:
  D.22341 = iftmp.51;
  return D.22341;
}


__attribute__((__gnu_inline__, nothrow, leaf, pure))
strcmp (const char * __s1, const char * __s2)
{
  int iftmp.52;
  int iftmp.53;
  int D.22364;
  char * __p1;
  char * __p2;
  int __ret;

  __p1 = __s1;
  __p2 = __s2;
  __asm__ __volatile__("   slr   0,0
0: clst  %1,%2
   jo    0b
   ipm   %0
   srl   %0,28" : "=d" __ret, "=&a" __p1, "=&a" __p2 : "1" __p1, "2" __p2 : "0", "memory", "cc");
  if (__ret != 0) goto <D.22357>; else goto <D.22358>;
  <D.22357>:
  if (__ret == 1) goto <D.22360>; else goto <D.22361>;
  <D.22360>:
  iftmp.53 = -1;
  goto <D.22362>;
  <D.22361>:
  iftmp.53 = 1;
  <D.22362>:
  iftmp.52 = iftmp.53;
  goto <D.22363>;
  <D.22358>:
  iftmp.52 = 0;
  <D.22363>:
  __ret = iftmp.52;
  D.22364 = __ret;
  return D.22364;
}


null_ephemerons_for_domain (struct MonoDomain * domain)
{
  struct MonoVTable * D.22369;
  struct EphemeronLinkNode * D.22373;
  struct EphemeronLinkNode * current;
  struct EphemeronLinkNode * prev;

  current = ephemeron_list;
  prev = 0B;
  goto <D.21183>;
  <D.21182>:
  {
    struct MonoObject * object;

    object = current->array;
    if (object != 0B) goto <D.22368>; else goto <D.22366>;
    <D.22368>:
    D.22369 = object->vtable;
    if (D.22369 == 0B) goto <D.22370>; else goto <D.22366>;
    <D.22370>:
    {
      struct EphemeronLinkNode * tmp;

      tmp = current;
      if (prev != 0B) goto <D.22371>; else goto <D.22372>;
      <D.22371>:
      D.22373 = current->next;
      prev->next = D.22373;
      goto <D.22374>;
      <D.22372>:
      D.22373 = current->next;
      ephemeron_list = D.22373;
      <D.22374>:
      current = current->next;
      sgen_free_internal (tmp, 18);
    }
    goto <D.22367>;
    <D.22366>:
    prev = current;
    current = current->next;
    <D.22367>:
  }
  <D.21183>:
  if (current != 0B) goto <D.21182>; else goto <D.21184>;
  <D.21184>:
}


clear_domain_process_object (char * obj, struct MonoDomain * domain)
{
  struct MonoThreadsSync * D.22377;
  gboolean D.22382;
  gboolean remove;

  process_object_for_domain_clearing (obj, domain);
  remove = need_remove_object_for_domain (obj, domain);
  if (remove != 0) goto <D.22375>; else goto <D.22376>;
  <D.22375>:
  D.22377 = MEM[(struct MonoObject *)obj].synchronisation;
  if (D.22377 != 0B) goto <D.22378>; else goto <D.22379>;
  <D.22378>:
  {
    void * * dislink;

    dislink = mono_monitor_get_object_monitor_weak_link (obj);
    if (dislink != 0B) goto <D.22380>; else goto <D.22381>;
    <D.22380>:
    sgen_register_disappearing_link (0B, dislink, 0, 1);
    <D.22381>:
  }
  <D.22379>:
  <D.22376>:
  D.22382 = remove;
  return D.22382;
}


process_object_for_domain_clearing (char * start, struct MonoDomain * domain)
{
  long unsigned int D.22384;
  long unsigned int D.22385;
  struct MonoClass * D.22386;
  struct MonoClass * D.22387;
  struct MonoVTable * D.22390;
  struct MonoDomain * D.22391;
  struct MonoDomain * D.22392;
  _Bool D.22393;
  long int D.22394;
  long int D.22395;
  struct MonoClass * D.22398;
  int D.22399;
  long unsigned int D.22406;
  long unsigned int D.22407;
  struct MonoVTable * D.22409;
  struct MonoDomain * D.22410;
  struct FILE * gc_debug_file.54;
  struct GCVTable * vt;

  D.22384 = MEM[(mword *)start];
  D.22385 = D.22384 & 18446744073709551612;
  vt = (struct GCVTable *) D.22385;
  D.22386 = vt->klass;
  D.22387 = mono_defaults.internal_thread_class;
  if (D.22386 == D.22387) goto <D.22388>; else goto <D.22389>;
  <D.22388>:
  D.22390 = MEM[(struct MonoObject *)start].vtable;
  D.22391 = D.22390->domain;
  D.22392 = mono_get_root_domain ();
  D.22393 = D.22391 != D.22392;
  D.22394 = (long int) D.22393;
  D.22395 = __builtin_expect (D.22394, 0);
  if (D.22395 != 0) goto <D.22396>; else goto <D.22397>;
  <D.22396>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 896, "mono_object_domain (start) == mono_get_root_domain ()");
  <D.22397>:
  <D.22389>:
  D.22386 = vt->klass;
  D.22398 = mono_defaults.real_proxy_class;
  D.22399 = mono_class_has_parent_fast (D.22386, D.22398);
  if (D.22399 != 0) goto <D.22400>; else goto <D.22401>;
  <D.22400>:
  {
    struct MonoObject * server;

    server = MEM[(struct MonoRealProxy *)start].unwrapped_server;
    if (server != 0B) goto <D.22404>; else goto <D.22405>;
    <D.22404>:
    D.22406 = MEM[(mword *)server];
    D.22407 = D.22406 & 18446744073709551612;
    if (D.22407 == 0) goto <D.22402>; else goto <D.22408>;
    <D.22408>:
    D.22409 = server->vtable;
    D.22410 = D.22409->domain;
    if (D.22410 == domain) goto <D.22402>; else goto <D.22403>;
    <D.22402>:
    if (0 != 0) goto <D.22411>; else goto <D.22412>;
    <D.22411>:
    gc_debug_file.54 = gc_debug_file;
    fprintf (gc_debug_file.54, "Cleaning up remote pointer in %p to object %p\n", start, server);
    gc_debug_file.54 = gc_debug_file;
    fflush (gc_debug_file.54);
    <D.22412>:
    MEM[(struct MonoRealProxy *)start].unwrapped_server = 0B;
    <D.22403>:
    <D.22405>:
  }
  <D.22401>:
}


need_remove_object_for_domain (char * start, struct MonoDomain * domain)
{
  struct MonoVTable * D.22414;
  struct MonoDomain * D.22415;
  struct FILE * gc_debug_file.55;
  gboolean D.22421;

  D.22414 = MEM[(struct MonoObject *)start].vtable;
  D.22415 = D.22414->domain;
  if (D.22415 == domain) goto <D.22416>; else goto <D.22417>;
  <D.22416>:
  if (0 != 0) goto <D.22418>; else goto <D.22419>;
  <D.22418>:
  gc_debug_file.55 = gc_debug_file;
  fprintf (gc_debug_file.55, "Need to cleanup object %p\n", start);
  gc_debug_file.55 = gc_debug_file;
  fflush (gc_debug_file.55);
  <D.22419>:
  D.22421 = 1;
  return D.22421;
  <D.22417>:
  D.22421 = 0;
  return D.22421;
}


__attribute__((visibility ("hidden")))
sgen_add_to_global_remset (void * ptr, void * obj)
{
  int D.22423;
  _Bool D.22424;
  long int D.22425;
  long int D.22426;
  int D.22429;
  int current_collection_generation.56;
  _Bool D.22433;
  long int D.22434;
  long int D.22435;
  int D.22441;
  _Bool D.22442;
  long int D.22443;
  long int D.22444;
  long unsigned int D.22447;
  long unsigned int D.22448;
  int iftmp.57;
  int D.22454;
  int D.22456;
  _Bool D.22458;
  long int D.22459;
  long int D.22460;
  int D.22464;
  void (*<T1312>) (void *) D.22467;
  int do_pin_stats.58;
  _Bool D.22469;
  long int D.22470;
  long int D.22471;
  struct FILE * gc_debug_file.59;

  D.22423 = sgen_ptr_in_nursery (obj);
  D.22424 = D.22423 == 0;
  D.22425 = (long int) D.22424;
  D.22426 = __builtin_expect (D.22425, 0);
  if (D.22426 != 0) goto <D.22427>; else goto <D.22428>;
  <D.22427>:
  monoeg_g_log (0B, 4, "Target pointer of global remset must be in the nursery");
  <D.20523>:
  goto <D.20523>;
  <D.22428>:
  D.22429 = major_collector.is_concurrent;
  if (D.22429 == 0) goto <D.22430>; else goto <D.22431>;
  <D.22430>:
  current_collection_generation.56 = current_collection_generation;
  D.22433 = current_collection_generation.56 == -1;
  D.22434 = (long int) D.22433;
  D.22435 = __builtin_expect (D.22434, 0);
  if (D.22435 != 0) goto <D.22436>; else goto <D.22437>;
  <D.22436>:
  monoeg_g_log (0B, 4, "Global remsets can only be added during collections");
  <D.20524>:
  goto <D.20524>;
  <D.22437>:
  goto <D.22438>;
  <D.22431>:
  current_collection_generation.56 = current_collection_generation;
  if (current_collection_generation.56 == -1) goto <D.22439>; else goto <D.22440>;
  <D.22439>:
  D.22441 = sgen_concurrent_collection_in_progress ();
  D.22442 = D.22441 == 0;
  D.22443 = (long int) D.22442;
  D.22444 = __builtin_expect (D.22443, 0);
  if (D.22444 != 0) goto <D.22445>; else goto <D.22446>;
  <D.22445>:
  monoeg_g_log (0B, 4, "Global remsets outside of collection pauses can only be added by the concurrent collector");
  <D.20525>:
  goto <D.20525>;
  <D.22446>:
  <D.22440>:
  <D.22438>:
  D.22447 = MEM[(mword *)obj];
  D.22448 = D.22447 & 2;
  if (D.22448 == 0) goto <D.22449>; else goto <D.22450>;
  <D.22449>:
  D.22454 = sgen_minor_collector.is_split;
  if (D.22454 == 0) goto <D.22455>; else goto <D.22452>;
  <D.22455>:
  D.22456 = sgen_concurrent_collection_in_progress ();
  if (D.22456 == 0) goto <D.22457>; else goto <D.22452>;
  <D.22457>:
  iftmp.57 = 1;
  goto <D.22453>;
  <D.22452>:
  iftmp.57 = 0;
  <D.22453>:
  D.22458 = iftmp.57 != 0;
  D.22459 = (long int) D.22458;
  D.22460 = __builtin_expect (D.22459, 0);
  if (D.22460 != 0) goto <D.22461>; else goto <D.22462>;
  <D.22461>:
  monoeg_g_log (0B, 4, "Non-pinned objects can only remain in nursery if it is a split nursery");
  <D.20526>:
  goto <D.20526>;
  <D.22462>:
  goto <D.22463>;
  <D.22450>:
  D.22464 = sgen_cement_lookup_or_register (obj);
  if (D.22464 != 0) goto <D.22465>; else goto <D.22466>;
  <D.22465>:
  return;
  <D.22466>:
  <D.22463>:
  D.22467 = remset.record_pointer;
  D.22467 (ptr);
  do_pin_stats.58 = do_pin_stats;
  D.22469 = do_pin_stats.58 != 0;
  D.22470 = (long int) D.22469;
  D.22471 = __builtin_expect (D.22470, 0);
  if (D.22471 != 0) goto <D.22472>; else goto <D.22473>;
  <D.22472>:
  sgen_pin_stats_register_global_remset (obj);
  <D.22473>:
  if (0 != 0) goto <D.22474>; else goto <D.22475>;
  <D.22474>:
  gc_debug_file.59 = gc_debug_file;
  fprintf (gc_debug_file.59, "Adding global remset for %p\n", ptr);
  gc_debug_file.59 = gc_debug_file;
  fflush (gc_debug_file.59);
  <D.22475>:
}


__attribute__((always_inline))
sgen_ptr_in_nursery (void * p)
{
  gboolean D.22478;
  int sgen_nursery_bits.60;
  int D.22480;
  int D.22481;
  long unsigned int D.22482;
  long unsigned int p.61;
  long unsigned int D.22484;
  char * sgen_nursery_start.62;
  long unsigned int sgen_nursery_start.63;
  _Bool D.22487;

  sgen_nursery_bits.60 = sgen_nursery_bits;
  D.22480 = 1 << sgen_nursery_bits.60;
  D.22481 = -D.22480;
  D.22482 = (long unsigned int) D.22481;
  p.61 = (long unsigned int) p;
  D.22484 = D.22482 & p.61;
  sgen_nursery_start.62 = sgen_nursery_start;
  sgen_nursery_start.63 = (long unsigned int) sgen_nursery_start.62;
  D.22487 = D.22484 == sgen_nursery_start.63;
  D.22478 = (gboolean) D.22487;
  return D.22478;
}


__attribute__((visibility ("hidden")))
sgen_drain_gray_stack (int max_objs, struct ScanCopyContext ctx)
{
  struct GrayQueueSection * D.22491;
  int D.22495;
  _Bool D.22496;
  long int D.22497;
  long int D.22498;
  int D.22502;
  gboolean D.22505;
  struct FILE * gc_debug_file.64;
  const char * D.22509;
  const char * D.22520;
  char * obj;
  void (*ScanObjectFunc) (char *, struct SgenGrayQueue *) scan_func;
  struct GrayQueue * queue;

  scan_func = ctx.scan_func;
  queue = ctx.queue;
  if (max_objs == -1) goto <D.22489>; else goto <D.22490>;
  <D.22489>:
  <D.20534>:
  D.22491 = queue->first;
  if (D.22491 == 0B) goto <D.22492>; else goto <D.22493>;
  <D.22492>:
  obj = 0B;
  goto <D.22494>;
  <D.22493>:
  D.22491 = queue->first;
  D.22495 = D.22491->end;
  D.22496 = D.22495 == 1;
  D.22497 = (long int) D.22496;
  D.22498 = __builtin_expect (D.22497, 0);
  if (D.22498 != 0) goto <D.22499>; else goto <D.22500>;
  <D.22499>:
  obj = sgen_gray_object_dequeue (queue);
  goto <D.22501>;
  <D.22500>:
  D.22491 = queue->first;
  D.22491 = queue->first;
  D.22495 = D.22491->end;
  D.22502 = D.22495 + -1;
  D.22491->end = D.22502;
  D.22495 = D.22491->end;
  obj = D.22491->objects[D.22495];
  <D.22501>:
  <D.22494>:
  if (obj == 0B) goto <D.22503>; else goto <D.22504>;
  <D.22503>:
  D.22505 = 1;
  return D.22505;
  <D.22504>:
  if (0 != 0) goto <D.22506>; else goto <D.22507>;
  <D.22506>:
  gc_debug_file.64 = gc_debug_file;
  D.22509 = safe_name (obj);
  fprintf (gc_debug_file.64, "Precise gray object scan %p (%s)\n", obj, D.22509);
  gc_debug_file.64 = gc_debug_file;
  fflush (gc_debug_file.64);
  <D.22507>:
  scan_func (obj, queue);
  goto <D.20534>;
  <D.22490>:
  {
    int i;

    <D.20539>:
    i = 0;
    goto <D.20537>;
    <D.20536>:
    D.22491 = queue->first;
    if (D.22491 == 0B) goto <D.22510>; else goto <D.22511>;
    <D.22510>:
    obj = 0B;
    goto <D.22512>;
    <D.22511>:
    D.22491 = queue->first;
    D.22495 = D.22491->end;
    D.22496 = D.22495 == 1;
    D.22497 = (long int) D.22496;
    D.22498 = __builtin_expect (D.22497, 0);
    if (D.22498 != 0) goto <D.22513>; else goto <D.22514>;
    <D.22513>:
    obj = sgen_gray_object_dequeue (queue);
    goto <D.22515>;
    <D.22514>:
    D.22491 = queue->first;
    D.22491 = queue->first;
    D.22495 = D.22491->end;
    D.22502 = D.22495 + -1;
    D.22491->end = D.22502;
    D.22495 = D.22491->end;
    obj = D.22491->objects[D.22495];
    <D.22515>:
    <D.22512>:
    if (obj == 0B) goto <D.22516>; else goto <D.22517>;
    <D.22516>:
    D.22505 = 1;
    return D.22505;
    <D.22517>:
    if (0 != 0) goto <D.22518>; else goto <D.22519>;
    <D.22518>:
    gc_debug_file.64 = gc_debug_file;
    D.22520 = safe_name (obj);
    fprintf (gc_debug_file.64, "Precise gray object scan %p (%s)\n", obj, D.22520);
    gc_debug_file.64 = gc_debug_file;
    fflush (gc_debug_file.64);
    <D.22519>:
    scan_func (obj, queue);
    i = i + 1;
    <D.20537>:
    if (i != max_objs) goto <D.20536>; else goto <D.20538>;
    <D.20538>:
    if (max_objs < 0) goto <D.20539>; else goto <D.20540>;
    <D.20540>:
    D.22505 = 0;
    return D.22505;
  }
}


__attribute__((visibility ("hidden")))
sgen_pin_objects_in_section (struct GCMemSection * section, struct ScanCopyContext ctx)
{
  long unsigned int D.22524;
  long unsigned int D.22525;
  void * * D.22526;
  char * D.22527;
  char * D.22528;
  int num_entries;

  num_entries = section->pin_queue_num_entries;
  if (num_entries != 0) goto <D.22522>; else goto <D.22523>;
  <D.22522>:
  {
    void * * start;
    int reduced_to;

    start = section->pin_queue_start;
    D.22524 = (long unsigned int) num_entries;
    D.22525 = D.22524 * 8;
    D.22526 = start + D.22525;
    D.22527 = section->data;
    D.22528 = section->next_data;
    reduced_to = pin_objects_from_addresses (section, start, D.22526, D.22527, D.22528, ctx);
    section->pin_queue_num_entries = reduced_to;
    if (reduced_to == 0) goto <D.22529>; else goto <D.22530>;
    <D.22529>:
    section->pin_queue_start = 0B;
    <D.22530>:
  }
  <D.22523>:
}


pin_objects_from_addresses (struct GCMemSection * section, void * * start, void * * end, void * start_nursery, void * end_nursery, struct ScanCopyContext ctx)
{
  struct FILE * gc_debug_file.65;
  char * D.22542;
  long int addr.66;
  char * D.22546;
  long int D.22547;
  long int D.22548;
  long int D.22549;
  unsigned int D.22550;
  unsigned int idx.67;
  _Bool D.22552;
  long int D.22553;
  long int D.22554;
  char * * D.22557;
  long unsigned int D.22558;
  long unsigned int D.22559;
  char * * D.22560;
  void * D.22572;
  long unsigned int search_start.68;
  long unsigned int D.22576;
  long unsigned int D.22577;
  unsigned int D.22578;
  unsigned int D.22579;
  long unsigned int D.22580;
  struct MonoThreadsSync * D.22581;
  const char * D.22587;
  const char * D.22597;
  long unsigned int D.22598;
  long unsigned int D.22599;
  int iftmp.69;
  struct GrayQueueSection * D.22604;
  int D.22606;
  _Bool D.22607;
  long int D.22608;
  long int D.22609;
  int D.22613;
  int D.22614;
  int do_pin_stats.70;
  _Bool D.22616;
  long int D.22617;
  long int D.22618;
  long unsigned int D.22621;
  long unsigned int D.22622;
  void * * D.22623;
  <unnamed type> D.22624;
  unsigned int D.22625;
  void * * D.22628;
  void * D.22629;
  long long int D.22630;
  long long int stat_pinned_objects.71;
  long long int D.22632;
  int D.22633;
  void * last;
  int count;
  void * search_start;
  void * last_obj;
  size_t last_obj_size;
  void * addr;
  int idx;
  void * * definitely_pinned;
  void (*ScanObjectFunc) (char *, struct SgenGrayQueue *) scan_func;
  struct SgenGrayQueue * queue;

  last = 0B;
  count = 0;
  last_obj = 0B;
  last_obj_size = 0;
  definitely_pinned = start;
  scan_func = ctx.scan_func;
  queue = ctx.queue;
  sgen_nursery_allocator_prepare_for_pinning ();
  goto <D.20559>;
  <D.20566>:
  addr = *start;
  if (addr != last) goto <D.22531>; else goto <D.22532>;
  <D.22531>:
  if (addr >= start_nursery) goto <D.22533>; else goto <D.22534>;
  <D.22533>:
  if (addr < end_nursery) goto <D.22535>; else goto <D.22536>;
  <D.22535>:
  if (0 != 0) goto <D.22537>; else goto <D.22538>;
  <D.22537>:
  gc_debug_file.65 = gc_debug_file;
  fprintf (gc_debug_file.65, "Considering pinning addr %p\n", addr);
  gc_debug_file.65 = gc_debug_file;
  fflush (gc_debug_file.65);
  <D.22538>:
  if (addr >= last_obj) goto <D.22540>; else goto <D.22541>;
  <D.22540>:
  D.22542 = last_obj + last_obj_size;
  if (D.22542 > addr) goto <D.22543>; else goto <D.22544>;
  <D.22543>:
  start = start + 8;
  // predicted unlikely by continue predictor.
  goto <D.20559>;
  <D.22544>:
  <D.22541>:
  addr.66 = (long int) addr;
  D.22546 = section->data;
  D.22547 = (long int) D.22546;
  D.22548 = addr.66 - D.22547;
  D.22549 = D.22548 / 8192;
  idx = (int) D.22549;
  D.22550 = section->num_scan_start;
  idx.67 = (unsigned int) idx;
  D.22552 = D.22550 <= idx.67;
  D.22553 = (long int) D.22552;
  D.22554 = __builtin_expect (D.22553, 0);
  if (D.22554 != 0) goto <D.22555>; else goto <D.22556>;
  <D.22555>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 1246, "idx < section->num_scan_start");
  <D.22556>:
  D.22557 = section->scan_starts;
  D.22558 = (long unsigned int) idx;
  D.22559 = D.22558 * 8;
  D.22560 = D.22557 + D.22559;
  search_start = *D.22560;
  if (search_start == 0B) goto <D.22561>; else goto <D.22563>;
  <D.22563>:
  if (search_start > addr) goto <D.22561>; else goto <D.22562>;
  <D.22561>:
  goto <D.20562>;
  <D.20561>:
  idx = idx + -1;
  D.22557 = section->scan_starts;
  D.22558 = (long unsigned int) idx;
  D.22559 = D.22558 * 8;
  D.22560 = D.22557 + D.22559;
  search_start = *D.22560;
  if (search_start != 0B) goto <D.22564>; else goto <D.22565>;
  <D.22564>:
  if (search_start <= addr) goto <D.20560>; else goto <D.22566>;
  <D.22566>:
  <D.22565>:
  <D.20562>:
  if (idx != 0) goto <D.20561>; else goto <D.20560>;
  <D.20560>:
  if (search_start == 0B) goto <D.22567>; else goto <D.22569>;
  <D.22569>:
  if (search_start > addr) goto <D.22567>; else goto <D.22568>;
  <D.22567>:
  search_start = start_nursery;
  <D.22568>:
  <D.22562>:
  if (search_start < last_obj) goto <D.22570>; else goto <D.22571>;
  <D.22570>:
  search_start = last_obj + last_obj_size;
  <D.22571>:
  <D.20565>:
  D.22572 = MEM[(void * *)search_start];
  if (D.22572 == 0B) goto <D.22573>; else goto <D.22574>;
  <D.22573>:
  search_start.68 = (long unsigned int) search_start;
  D.22576 = search_start.68 + 15;
  D.22577 = D.22576 & 18446744073709551608;
  search_start = (void *) D.22577;
  // predicted unlikely by continue predictor.
  goto <D.20563>;
  <D.22574>:
  last_obj = search_start;
  D.22578 = sgen_safe_object_get_size (search_start);
  D.22579 = D.22578 + 7;
  D.22580 = (long unsigned int) D.22579;
  last_obj_size = D.22580 & 4294967288;
  D.22581 = MEM[(struct MonoObject *)last_obj].synchronisation;
  if (D.22581 == -1B) goto <D.22582>; else goto <D.22583>;
  <D.22582>:
  goto <D.22584>;
  <D.22583>:
  if (0 != 0) goto <D.22585>; else goto <D.22586>;
  <D.22585>:
  gc_debug_file.65 = gc_debug_file;
  D.22587 = safe_name (last_obj);
  fprintf (gc_debug_file.65, "Pinned try match %p (%s), size %zd\n", last_obj, D.22587, last_obj_size);
  gc_debug_file.65 = gc_debug_file;
  fflush (gc_debug_file.65);
  <D.22586>:
  if (addr >= search_start) goto <D.22588>; else goto <D.22589>;
  <D.22588>:
  D.22542 = last_obj + last_obj_size;
  if (D.22542 > addr) goto <D.22590>; else goto <D.22591>;
  <D.22590>:
  if (scan_func != 0B) goto <D.22592>; else goto <D.22593>;
  <D.22592>:
  scan_func (search_start, queue);
  goto <D.22594>;
  <D.22593>:
  if (0 != 0) goto <D.22595>; else goto <D.22596>;
  <D.22595>:
  gc_debug_file.65 = gc_debug_file;
  D.22572 = MEM[(void * *)search_start];
  D.22597 = safe_name (search_start);
  fprintf (gc_debug_file.65, "Pinned object %p, vtable %p (%s), count %d\n\n", search_start, D.22572, D.22597, count);
  gc_debug_file.65 = gc_debug_file;
  fflush (gc_debug_file.65);
  <D.22596>:
  D.22598 = MEM[(mword *)search_start];
  D.22599 = D.22598 | 2;
  MEM[(mword *)search_start] = D.22599;
  D.22604 = queue->first;
  if (D.22604 == 0B) goto <D.22601>; else goto <D.22605>;
  <D.22605>:
  D.22604 = queue->first;
  D.22606 = D.22604->end;
  if (D.22606 == 125) goto <D.22601>; else goto <D.22602>;
  <D.22601>:
  iftmp.69 = 1;
  goto <D.22603>;
  <D.22602>:
  iftmp.69 = 0;
  <D.22603>:
  D.22607 = iftmp.69 != 0;
  D.22608 = (long int) D.22607;
  D.22609 = __builtin_expect (D.22608, 0);
  if (D.22609 != 0) goto <D.22610>; else goto <D.22611>;
  <D.22610>:
  sgen_gray_object_enqueue (queue, search_start);
  goto <D.22612>;
  <D.22611>:
  D.22604 = queue->first;
  D.22604 = queue->first;
  D.22606 = D.22604->end;
  D.22613 = D.22606;
  D.22614 = D.22613 + 1;
  D.22604->end = D.22614;
  D.22604->objects[D.22613] = search_start;
  <D.22612>:
  __builtin_prefetch (search_start);
  do_pin_stats.70 = do_pin_stats;
  D.22616 = do_pin_stats.70 != 0;
  D.22617 = (long int) D.22616;
  D.22618 = __builtin_expect (D.22617, 0);
  if (D.22618 != 0) goto <D.22619>; else goto <D.22620>;
  <D.22619>:
  sgen_pin_stats_register_object (search_start, last_obj_size);
  <D.22620>:
  D.22621 = (long unsigned int) count;
  D.22622 = D.22621 * 8;
  D.22623 = definitely_pinned + D.22622;
  *D.22623 = search_start;
  count = count + 1;
  <D.22594>:
  goto <D.20564>;
  <D.22591>:
  <D.22589>:
  <D.22584>:
  search_start = search_start + last_obj_size;
  <D.20563>:
  if (search_start <= addr) goto <D.20565>; else goto <D.20564>;
  <D.20564>:
  last = addr;
  <D.22536>:
  <D.22534>:
  <D.22532>:
  start = start + 8;
  <D.20559>:
  if (start < end) goto <D.20566>; else goto <D.20567>;
  <D.20567>:
  D.22624 = mono_profiler_get_events ();
  D.22625 = D.22624 & 1048576;
  if (D.22625 != 0) goto <D.22626>; else goto <D.22627>;
  <D.22626>:
  {
    struct GCRootReport report;

    try
      {
        report.count = 0;
        idx = 0;
        goto <D.20570>;
        <D.20569>:
        D.22558 = (long unsigned int) idx;
        D.22559 = D.22558 * 8;
        D.22628 = definitely_pinned + D.22559;
        D.22629 = *D.22628;
        add_profile_gc_root (&report, D.22629, 260, 0);
        idx = idx + 1;
        <D.20570>:
        if (idx < count) goto <D.20569>; else goto <D.20571>;
        <D.20571>:
        notify_gc_roots (&report);
      }
    finally
      {
        report = {CLOBBER};
      }
  }
  <D.22627>:
  D.22630 = (long long int) count;
  stat_pinned_objects.71 = stat_pinned_objects;
  D.22632 = D.22630 + stat_pinned_objects.71;
  stat_pinned_objects = D.22632;
  D.22633 = count;
  return D.22633;
}


add_profile_gc_root (struct GCRootReport * report, void * object, int rtype, uintptr_t extra_info)
{
  int D.22635;
  int D.22638;
  int D.22639;
  long unsigned int D.22640;
  long unsigned int D.22641;
  struct MonoVTable * D.22642;
  struct MonoClass * D.22643;
  long unsigned int D.22644;

  D.22635 = report->count;
  if (D.22635 == 32) goto <D.22636>; else goto <D.22637>;
  <D.22636>:
  notify_gc_roots (report);
  <D.22637>:
  D.22635 = report->count;
  report->objects[D.22635] = object;
  D.22635 = report->count;
  report->root_types[D.22635] = rtype;
  D.22635 = report->count;
  D.22638 = D.22635;
  D.22639 = D.22638 + 1;
  report->count = D.22639;
  D.22640 = MEM[(mword *)object];
  D.22641 = D.22640 & 18446744073709551612;
  D.22642 = (struct MonoVTable *) D.22641;
  D.22643 = D.22642->klass;
  D.22644 = (long unsigned int) D.22643;
  report->extra_info[D.22638] = D.22644;
}


notify_gc_roots (struct GCRootReport * report)
{
  int D.22645;
  void *[32] * D.22648;
  int[32] * D.22649;
  uintptr_t[32] * D.22650;

  D.22645 = report->count;
  if (D.22645 == 0) goto <D.22646>; else goto <D.22647>;
  <D.22646>:
  return;
  <D.22647>:
  D.22645 = report->count;
  D.22648 = &report->objects;
  D.22649 = &report->root_types;
  D.22650 = &report->extra_info;
  mono_profiler_gc_roots (D.22645, D.22648, D.22649, D.22650);
  report->count = 0;
}


__attribute__((visibility ("hidden")))
sgen_pin_object (void * object, struct GrayQueue * queue)
{
  int concurrent_collection_in_progress.72;
  _Bool D.22653;
  long int D.22654;
  long int D.22655;
  int D.22658;
  long unsigned int objects_pinned.73;
  long unsigned int D.22662;
  long unsigned int D.22664;
  long unsigned int D.22665;
  int do_pin_stats.74;
  _Bool D.22667;
  long int D.22668;
  long int D.22669;
  unsigned int D.22672;
  long unsigned int D.22673;
  int iftmp.75;
  struct GrayQueueSection * D.22678;
  int D.22680;
  _Bool D.22681;
  long int D.22682;
  long int D.22683;
  int D.22687;
  int D.22688;

  concurrent_collection_in_progress.72 = concurrent_collection_in_progress;
  D.22653 = concurrent_collection_in_progress.72 != 0;
  D.22654 = (long int) D.22653;
  D.22655 = __builtin_expect (D.22654, 0);
  if (D.22655 != 0) goto <D.22656>; else goto <D.22657>;
  <D.22656>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 1355, "!concurrent_collection_in_progress");
  <D.22657>:
  D.22658 = sgen_collection_is_parallel ();
  if (D.22658 != 0) goto <D.22659>; else goto <D.22660>;
  <D.22659>:
  pthread_mutex_lock (&pin_queue_mutex);
  sgen_pin_stage_ptr (object);
  objects_pinned.73 = objects_pinned;
  D.22662 = objects_pinned.73 + 1;
  objects_pinned = D.22662;
  pthread_mutex_unlock (&pin_queue_mutex);
  goto <D.22663>;
  <D.22660>:
  D.22664 = MEM[(mword *)object];
  D.22665 = D.22664 | 2;
  MEM[(mword *)object] = D.22665;
  sgen_pin_stage_ptr (object);
  objects_pinned.73 = objects_pinned;
  D.22662 = objects_pinned.73 + 1;
  objects_pinned = D.22662;
  do_pin_stats.74 = do_pin_stats;
  D.22667 = do_pin_stats.74 != 0;
  D.22668 = (long int) D.22667;
  D.22669 = __builtin_expect (D.22668, 0);
  if (D.22669 != 0) goto <D.22670>; else goto <D.22671>;
  <D.22670>:
  D.22672 = sgen_safe_object_get_size (object);
  D.22673 = (long unsigned int) D.22672;
  sgen_pin_stats_register_object (object, D.22673);
  <D.22671>:
  <D.22663>:
  D.22678 = queue->first;
  if (D.22678 == 0B) goto <D.22675>; else goto <D.22679>;
  <D.22679>:
  D.22678 = queue->first;
  D.22680 = D.22678->end;
  if (D.22680 == 125) goto <D.22675>; else goto <D.22676>;
  <D.22675>:
  iftmp.75 = 1;
  goto <D.22677>;
  <D.22676>:
  iftmp.75 = 0;
  <D.22677>:
  D.22681 = iftmp.75 != 0;
  D.22682 = (long int) D.22681;
  D.22683 = __builtin_expect (D.22682, 0);
  if (D.22683 != 0) goto <D.22684>; else goto <D.22685>;
  <D.22684>:
  sgen_gray_object_enqueue (queue, object);
  goto <D.22686>;
  <D.22685>:
  D.22678 = queue->first;
  D.22678 = queue->first;
  D.22680 = D.22678->end;
  D.22687 = D.22680;
  D.22688 = D.22687 + 1;
  D.22678->end = D.22688;
  D.22678->objects[D.22687] = object;
  <D.22686>:
  __builtin_prefetch (object);
}


__attribute__((visibility ("hidden")))
sgen_parallel_pin_or_update (void * * ptr, void * obj, struct MonoVTable * vt, struct SgenGrayQueue * queue)
{
  int D.22689;
  long unsigned int vt.76;
  long unsigned int D.22693;
  void * D.22694;
  void * D.22695;
  void (*<T2d48>) (char *, struct SgenGrayQueue *) D.22699;
  long unsigned int D.22700;
  long unsigned int D.22703;
  void * D.22704;
  long unsigned int D.22705;

  <D.20592>:
  {
    mword vtable_word;
    gboolean major_pinned;

    major_pinned = 0;
    D.22689 = sgen_ptr_in_nursery (obj);
    if (D.22689 != 0) goto <D.22690>; else goto <D.22691>;
    <D.22690>:
    vt.76 = (long unsigned int) vt;
    D.22693 = vt.76 | 2;
    D.22694 = (void *) D.22693;
    D.22695 = InterlockedCompareExchangePointer (obj, D.22694, vt);
    if (D.22695 == vt) goto <D.22696>; else goto <D.22697>;
    <D.22696>:
    sgen_pin_object (obj, queue);
    goto <D.20591>;
    <D.22697>:
    goto <D.22698>;
    <D.22691>:
    D.22699 = major_collector.pin_major_object;
    D.22699 (obj, queue);
    major_pinned = 1;
    <D.22698>:
    vtable_word = MEM[(mword *)obj];
    D.22700 = vtable_word & 1;
    if (D.22700 != 0) goto <D.22701>; else goto <D.22702>;
    <D.22701>:
    D.22703 = vtable_word & 18446744073709551612;
    D.22704 = (void *) D.22703;
    *ptr = D.22704;
    goto <D.20591>;
    <D.22702>:
    D.22705 = vtable_word & 2;
    if (D.22705 != 0) goto <D.20591>; else goto <D.22706>;
    <D.22706>:
    if (major_pinned != 0) goto <D.20591>; else goto <D.22707>;
    <D.22707>:
  }
  goto <D.20592>;
  <D.20591>:
}


InterlockedCompareExchangePointer (void * volatile * dest, void * exch, void * comp)
{
  void * D.22708;
  long unsigned int comp.77;
  long unsigned int exch.78;
  long unsigned int D.22711;

  comp.77 = (long unsigned int) comp;
  exch.78 = (long unsigned int) exch;
  D.22711 = __sync_val_compare_and_swap_8 (dest, comp.77, exch.78);
  D.22708 = (void *) D.22711;
  return D.22708;
}


__attribute__((visibility ("hidden")))
sgen_sort_addresses (void * * array, int size)
{
  int D.22713;
  long unsigned int D.22714;
  long unsigned int D.22715;
  void * * D.22716;
  void * D.22717;
  long unsigned int D.22718;
  long unsigned int D.22719;
  void * * D.22720;
  void * D.22721;
  long unsigned int D.22723;
  long unsigned int D.22724;
  void * * D.22725;
  void * D.22726;
  int D.22727;
  long unsigned int D.22730;
  long unsigned int D.22731;
  void * * D.22732;
  void * D.22733;
  sizetype D.22734;
  sizetype D.22735;
  sizetype D.22736;
  void * * D.22737;
  void * D.22738;
  long unsigned int D.22741;
  long unsigned int D.22742;
  void * * D.22743;
  void * D.22744;
  int i;
  void * tmp;

  i = 1;
  goto <D.20605>;
  <D.20604>:
  {
    int child;

    child = i;
    goto <D.20603>;
    <D.20602>:
    {
      int parent;

      D.22713 = child + -1;
      parent = D.22713 / 2;
      D.22714 = (long unsigned int) parent;
      D.22715 = D.22714 * 8;
      D.22716 = array + D.22715;
      D.22717 = *D.22716;
      D.22718 = (long unsigned int) child;
      D.22719 = D.22718 * 8;
      D.22720 = array + D.22719;
      D.22721 = *D.22720;
      if (D.22717 >= D.22721) goto <D.20601>; else goto <D.22722>;
      <D.22722>:
      D.22714 = (long unsigned int) parent;
      D.22715 = D.22714 * 8;
      D.22716 = array + D.22715;
      tmp = *D.22716;
      D.22714 = (long unsigned int) parent;
      D.22715 = D.22714 * 8;
      D.22716 = array + D.22715;
      D.22718 = (long unsigned int) child;
      D.22719 = D.22718 * 8;
      D.22720 = array + D.22719;
      D.22721 = *D.22720;
      *D.22716 = D.22721;
      D.22718 = (long unsigned int) child;
      D.22719 = D.22718 * 8;
      D.22720 = array + D.22719;
      *D.22720 = tmp;
      child = parent;
    }
    <D.20603>:
    if (child > 0) goto <D.20602>; else goto <D.20601>;
    <D.20601>:
  }
  i = i + 1;
  <D.20605>:
  if (i < size) goto <D.20604>; else goto <D.20606>;
  <D.20606>:
  i = size + -1;
  goto <D.20614>;
  <D.20613>:
  {
    int end;
    int root;

    D.22723 = (long unsigned int) i;
    D.22724 = D.22723 * 8;
    D.22725 = array + D.22724;
    tmp = *D.22725;
    D.22723 = (long unsigned int) i;
    D.22724 = D.22723 * 8;
    D.22725 = array + D.22724;
    D.22726 = *array;
    *D.22725 = D.22726;
    *array = tmp;
    end = i + -1;
    root = 0;
    goto <D.20612>;
    <D.20611>:
    {
      int child;

      D.22727 = root * 2;
      child = D.22727 + 1;
      if (child < end) goto <D.22728>; else goto <D.22729>;
      <D.22728>:
      D.22730 = (long unsigned int) child;
      D.22731 = D.22730 * 8;
      D.22732 = array + D.22731;
      D.22733 = *D.22732;
      D.22734 = (sizetype) child;
      D.22735 = D.22734 + 1;
      D.22736 = D.22735 * 8;
      D.22737 = array + D.22736;
      D.22738 = *D.22737;
      if (D.22733 < D.22738) goto <D.22739>; else goto <D.22740>;
      <D.22739>:
      child = child + 1;
      <D.22740>:
      <D.22729>:
      D.22741 = (long unsigned int) root;
      D.22742 = D.22741 * 8;
      D.22743 = array + D.22742;
      D.22744 = *D.22743;
      D.22730 = (long unsigned int) child;
      D.22731 = D.22730 * 8;
      D.22732 = array + D.22731;
      D.22733 = *D.22732;
      if (D.22744 >= D.22733) goto <D.20610>; else goto <D.22745>;
      <D.22745>:
      D.22741 = (long unsigned int) root;
      D.22742 = D.22741 * 8;
      D.22743 = array + D.22742;
      tmp = *D.22743;
      D.22741 = (long unsigned int) root;
      D.22742 = D.22741 * 8;
      D.22743 = array + D.22742;
      D.22730 = (long unsigned int) child;
      D.22731 = D.22730 * 8;
      D.22732 = array + D.22731;
      D.22733 = *D.22732;
      *D.22743 = D.22733;
      D.22730 = (long unsigned int) child;
      D.22731 = D.22730 * 8;
      D.22732 = array + D.22731;
      *D.22732 = tmp;
      root = child;
    }
    <D.20612>:
    D.22727 = root * 2;
    if (D.22727 < end) goto <D.20611>; else goto <D.20610>;
    <D.20610>:
  }
  i = i + -1;
  <D.20614>:
  if (i > 0) goto <D.20613>; else goto <D.20615>;
  <D.20615>:
}


__attribute__((visibility ("hidden")))
sgen_update_heap_boundaries (mword low, mword high)
{
  void * low.79;
  void * old.80;
  void * D.22749;
  void * high.81;
  void * D.22752;
  mword old;

  <D.20712>:
  old = lowest_heap_address;
  if (low >= old) goto <D.20711>; else goto <D.22746>;
  <D.22746>:
  low.79 = (void *) low;
  old.80 = (void *) old;
  D.22749 = InterlockedCompareExchangePointer (&lowest_heap_address, low.79, old.80);
  old.80 = (void *) old;
  if (D.22749 != old.80) goto <D.20712>; else goto <D.20711>;
  <D.20711>:
  <D.20714>:
  old = highest_heap_address;
  if (high <= old) goto <D.20713>; else goto <D.22750>;
  <D.22750>:
  high.81 = (void *) high;
  old.80 = (void *) old;
  D.22752 = InterlockedCompareExchangePointer (&highest_heap_address, high.81, old.80);
  old.80 = (void *) old;
  if (D.22752 != old.80) goto <D.20714>; else goto <D.20713>;
  <D.20713>:
}


__attribute__((visibility ("hidden")))
mono_gc_get_nursery (int * shift_bits, size_t * size)
{
  int sgen_nursery_size.82;
  long unsigned int D.22754;
  int sgen_nursery_bits.83;
  void * D.22756;

  sgen_nursery_size.82 = sgen_nursery_size;
  D.22754 = (long unsigned int) sgen_nursery_size.82;
  *size = D.22754;
  sgen_nursery_bits.83 = sgen_nursery_bits;
  *shift_bits = sgen_nursery_bits.83;
  D.22756 = sgen_get_nursery_start ();
  return D.22756;
}


__attribute__((always_inline))
sgen_get_nursery_start ()
{
  char * D.22758;

  D.22758 = sgen_nursery_start;
  return D.22758;
}


__attribute__((visibility ("hidden")))
mono_gc_set_current_thread_appdomain (struct MonoDomain * domain)
{
  _Bool D.22762;
  long int D.22763;
  long int D.22764;
  struct SgenThreadInfo * info;

  info = mono_thread_info_current ();
  if (domain != 0B) goto <D.22760>; else goto <D.22761>;
  <D.22760>:
  D.22762 = info == 0B;
  D.22763 = (long int) D.22762;
  D.22764 = __builtin_expect (D.22763, 0);
  if (D.22764 != 0) goto <D.22765>; else goto <D.22766>;
  <D.22765>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 1733, "info");
  <D.22766>:
  info->stopped_domain = domain;
  <D.22761>:
}


__attribute__((visibility ("hidden")))
mono_gc_precise_stack_mark_enabled ()
{
  gboolean D.22767;
  int conservative_stack_mark.84;
  _Bool D.22769;

  conservative_stack_mark.84 = conservative_stack_mark;
  D.22769 = conservative_stack_mark.84 == 0;
  D.22767 = (gboolean) D.22769;
  return D.22767;
}


__attribute__((visibility ("hidden")))
mono_gc_get_logfile ()
{
  struct FILE * D.22771;

  D.22771 = gc_debug_file;
  return D.22771;
}


__attribute__((visibility ("hidden")))
sgen_generation_name (int generation)
{
  const char * D.22773;

  D.22773 = generation_name (generation);
  return D.22773;
}


generation_name (int generation)
{
  const char * D.22775;

  switch (generation) <default: <D.20816>, case 0: <D.20814>, case 1: <D.20815>>
  <D.20814>:
  D.22775 = "nursery";
  return D.22775;
  <D.20815>:
  D.22775 = "old";
  return D.22775;
  <D.20816>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-gc.c", 1869);
}


__attribute__((visibility ("hidden")))
sgen_get_current_object_ops ()
{
  struct SgenObjectOperations * D.22777;

  D.22777 = &current_object_ops;
  return D.22777;
}


__attribute__((visibility ("hidden")))
sgen_check_section_scan_starts (struct GCMemSection * section)
{
  char * * D.22779;
  long unsigned int D.22780;
  long unsigned int D.22781;
  char * * D.22782;
  char * D.22783;
  unsigned int D.22786;
  _Bool D.22787;
  long int D.22788;
  long int D.22789;
  unsigned int D.22792;
  unsigned int i.85;
  int i;

  i = 0;
  goto <D.20848>;
  <D.20847>:
  D.22779 = section->scan_starts;
  D.22780 = (long unsigned int) i;
  D.22781 = D.22780 * 8;
  D.22782 = D.22779 + D.22781;
  D.22783 = *D.22782;
  if (D.22783 != 0B) goto <D.22784>; else goto <D.22785>;
  <D.22784>:
  {
    guint size;

    D.22779 = section->scan_starts;
    D.22780 = (long unsigned int) i;
    D.22781 = D.22780 * 8;
    D.22782 = D.22779 + D.22781;
    D.22783 = *D.22782;
    size = sgen_safe_object_get_size (D.22783);
    D.22786 = size + 4294967280;
    D.22787 = D.22786 > 7984;
    D.22788 = (long int) D.22787;
    D.22789 = __builtin_expect (D.22788, 0);
    if (D.22789 != 0) goto <D.22790>; else goto <D.22791>;
    <D.22790>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 2034, "size >= sizeof (MonoObject) && size <= MAX_SMALL_OBJ_SIZE");
    <D.22791>:
  }
  <D.22785>:
  i = i + 1;
  <D.20848>:
  D.22792 = section->num_scan_start;
  i.85 = (unsigned int) i;
  if (D.22792 > i.85) goto <D.20847>; else goto <D.20849>;
  <D.20849>:
}


__attribute__((visibility ("hidden")))
sgen_dump_occupied (char * start, char * end, char * section_start)
{
  struct FILE * heap_dump_file.86;
  long int start.87;
  long int section_start.88;
  long int D.22797;
  long int end.89;
  long int D.22799;

  heap_dump_file.86 = heap_dump_file;
  start.87 = (long int) start;
  section_start.88 = (long int) section_start;
  D.22797 = start.87 - section_start.88;
  end.89 = (long int) end;
  start.87 = (long int) start;
  D.22799 = end.89 - start.87;
  fprintf (heap_dump_file.86, "<occupied offset=\"%td\" size=\"%td\"/>\n", D.22797, D.22799);
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__))
fprintf (struct FILE * restrict __stream, const char * restrict __fmt)
{
  int D.22800;

  D.22800 = __fprintf_chk (__stream, 1, __fmt, __builtin_va_arg_pack ());
  return D.22800;
}


__attribute__((visibility ("hidden")))
sgen_dump_section (struct GCMemSection * section, const char * type)
{
  char * D.22802;
  long unsigned int D.22803;
  struct FILE * heap_dump_file.90;
  void * D.22805;
  char * D.22810;
  _Bool D.22811;
  long int D.22812;
  long int D.22813;
  long unsigned int D.22818;
  long unsigned int D.22819;
  unsigned int D.22820;
  unsigned int D.22821;
  sizetype D.22822;
  char * start;
  char * end;
  char * occ_start;
  struct GCVTable * vt;
  char * old_start;

  start = section->data;
  D.22802 = section->data;
  D.22803 = section->size;
  end = D.22802 + D.22803;
  occ_start = 0B;
  old_start = 0B;
  heap_dump_file.90 = heap_dump_file;
  D.22803 = section->size;
  fprintf (heap_dump_file.90, "<section type=\"%s\" size=\"%lu\">\n", type, D.22803);
  goto <D.20889>;
  <D.20890>:
  {
    guint size;
    struct MonoClass * class;

    D.22805 = MEM[(void * *)start];
    if (D.22805 == 0B) goto <D.22806>; else goto <D.22807>;
    <D.22806>:
    if (occ_start != 0B) goto <D.22808>; else goto <D.22809>;
    <D.22808>:
    D.22802 = section->data;
    sgen_dump_occupied (occ_start, start, D.22802);
    occ_start = 0B;
    <D.22809>:
    start = start + 8;
    // predicted unlikely by continue predictor.
    goto <D.20889>;
    <D.22807>:
    D.22810 = section->next_data;
    D.22811 = D.22810 <= start;
    D.22812 = (long int) D.22811;
    D.22813 = __builtin_expect (D.22812, 0);
    if (D.22813 != 0) goto <D.22814>; else goto <D.22815>;
    <D.22814>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 2088, "start < section->next_data");
    <D.22815>:
    if (occ_start == 0B) goto <D.22816>; else goto <D.22817>;
    <D.22816>:
    occ_start = start;
    <D.22817>:
    D.22818 = MEM[(mword *)start];
    D.22819 = D.22818 & 18446744073709551612;
    vt = (struct GCVTable *) D.22819;
    class = vt->klass;
    D.22820 = sgen_safe_object_get_size (start);
    D.22821 = D.22820 + 7;
    size = D.22821 & 4294967288;
    old_start = start;
    D.22822 = (sizetype) size;
    start = start + D.22822;
  }
  <D.20889>:
  if (start < end) goto <D.20890>; else goto <D.20891>;
  <D.20891>:
  if (occ_start != 0B) goto <D.22823>; else goto <D.22824>;
  <D.22823>:
  D.22802 = section->data;
  sgen_dump_occupied (occ_start, start, D.22802);
  <D.22824>:
  heap_dump_file.90 = heap_dump_file;
  fprintf (heap_dump_file.90, "</section>\n");
}


__attribute__((visibility ("hidden")))
sgen_register_moved_object (void * obj, void * destination)
{
  <unnamed type> mono_profiler_events.91;
  unsigned int D.22826;
  _Bool D.22827;
  long int D.22828;
  long int D.22829;
  int D.22832;
  _Bool D.22833;
  long int D.22834;
  long int D.22835;
  int moved_objects_idx.92;
  int moved_objects_idx.93;
  int D.22842;
  int moved_objects_idx.94;
  int D.22844;

  mono_profiler_events.91 = mono_profiler_events;
  D.22826 = mono_profiler_events.91 & 524288;
  D.22827 = D.22826 == 0;
  D.22828 = (long int) D.22827;
  D.22829 = __builtin_expect (D.22828, 0);
  if (D.22829 != 0) goto <D.22830>; else goto <D.22831>;
  <D.22830>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 2187, "mono_profiler_events & MONO_PROFILE_GC_MOVES");
  <D.22831>:
  D.22832 = sgen_collection_is_parallel ();
  D.22833 = D.22832 != 0;
  D.22834 = (long int) D.22833;
  D.22835 = __builtin_expect (D.22834, 0);
  if (D.22835 != 0) goto <D.22836>; else goto <D.22837>;
  <D.22836>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 2190, "!sgen_collection_is_parallel ()");
  <D.22837>:
  moved_objects_idx.92 = moved_objects_idx;
  if (moved_objects_idx.92 == 64) goto <D.22839>; else goto <D.22840>;
  <D.22839>:
  moved_objects_idx.92 = moved_objects_idx;
  mono_profiler_gc_moves (&moved_objects, moved_objects_idx.92);
  moved_objects_idx = 0;
  <D.22840>:
  moved_objects_idx.92 = moved_objects_idx;
  moved_objects_idx.93 = moved_objects_idx.92;
  D.22842 = moved_objects_idx.93 + 1;
  moved_objects_idx = D.22842;
  moved_objects[moved_objects_idx.93] = obj;
  moved_objects_idx.92 = moved_objects_idx;
  moved_objects_idx.94 = moved_objects_idx.92;
  D.22844 = moved_objects_idx.94 + 1;
  moved_objects_idx = D.22844;
  moved_objects[moved_objects_idx.94] = destination;
}


__attribute__((visibility ("hidden")))
sgen_set_pinned_from_failed_allocation (mword objsize)
{
  long unsigned int bytes_pinned_from_failed_allocation.95;
  long unsigned int D.22846;

  bytes_pinned_from_failed_allocation.95 = bytes_pinned_from_failed_allocation;
  D.22846 = bytes_pinned_from_failed_allocation.95 + objsize;
  bytes_pinned_from_failed_allocation = D.22846;
}


__attribute__((visibility ("hidden")))
sgen_collection_is_parallel ()
{
  int current_collection_generation.96;
  gboolean D.22848;

  current_collection_generation.96 = current_collection_generation;
  switch (current_collection_generation.96) <default: <D.20936>, case 0: <D.20934>, case 1: <D.20935>>
  <D.20934>:
  D.22848 = nursery_collection_is_parallel;
  return D.22848;
  <D.20935>:
  D.22848 = major_collector.is_parallel;
  return D.22848;
  <D.20936>:
  current_collection_generation.96 = current_collection_generation;
  monoeg_g_log (0B, 4, "Invalid current generation %d", current_collection_generation.96);
  <D.20937>:
  goto <D.20937>;
}


__attribute__((visibility ("hidden")))
sgen_collection_is_concurrent ()
{
  int current_collection_generation.97;
  gboolean D.22851;

  current_collection_generation.97 = current_collection_generation;
  switch (current_collection_generation.97) <default: <D.20943>, case 0: <D.20941>, case 1: <D.20942>>
  <D.20941>:
  D.22851 = 0;
  return D.22851;
  <D.20942>:
  D.22851 = concurrent_collection_in_progress;
  return D.22851;
  <D.20943>:
  current_collection_generation.97 = current_collection_generation;
  monoeg_g_log (0B, 4, "Invalid current generation %d", current_collection_generation.97);
  <D.20944>:
  goto <D.20944>;
}


__attribute__((visibility ("hidden")))
sgen_concurrent_collection_in_progress ()
{
  gboolean D.22853;

  D.22853 = concurrent_collection_in_progress;
  return D.22853;
}


__attribute__((visibility ("hidden")))
sgen_ensure_free_space (size_t size)
{
  int D.22857;
  int degraded_mode.98;
  int D.22864;
  int D.22868;
  int concurrent_collection_in_progress.99;
  int D.22877;
  int generation_to_collect;
  const char * reason;

  generation_to_collect = -1;
  reason = 0B;
  if (size > 8000) goto <D.22855>; else goto <D.22856>;
  <D.22855>:
  D.22857 = sgen_need_major_collection (size);
  if (D.22857 != 0) goto <D.22858>; else goto <D.22859>;
  <D.22858>:
  reason = "LOS overflow";
  generation_to_collect = 1;
  <D.22859>:
  goto <D.22860>;
  <D.22856>:
  degraded_mode.98 = degraded_mode;
  if (degraded_mode.98 != 0) goto <D.22862>; else goto <D.22863>;
  <D.22862>:
  D.22864 = sgen_need_major_collection (size);
  if (D.22864 != 0) goto <D.22865>; else goto <D.22866>;
  <D.22865>:
  reason = "Degraded mode overflow";
  generation_to_collect = 1;
  <D.22866>:
  goto <D.22867>;
  <D.22863>:
  D.22868 = sgen_need_major_collection (size);
  if (D.22868 != 0) goto <D.22869>; else goto <D.22870>;
  <D.22869>:
  reason = "Minor allowance";
  generation_to_collect = 1;
  goto <D.22871>;
  <D.22870>:
  generation_to_collect = 0;
  reason = "Nursery full";
  <D.22871>:
  <D.22867>:
  <D.22860>:
  if (generation_to_collect == -1) goto <D.22872>; else goto <D.22873>;
  <D.22872>:
  concurrent_collection_in_progress.99 = concurrent_collection_in_progress;
  if (concurrent_collection_in_progress.99 != 0) goto <D.22875>; else goto <D.22876>;
  <D.22875>:
  D.22877 = sgen_workers_all_done ();
  if (D.22877 != 0) goto <D.22878>; else goto <D.22879>;
  <D.22878>:
  generation_to_collect = 1;
  reason = "Finish concurrent collection";
  <D.22879>:
  <D.22876>:
  <D.22873>:
  if (generation_to_collect == -1) goto <D.22880>; else goto <D.22881>;
  <D.22880>:
  return;
  <D.22881>:
  sgen_perform_collection (size, generation_to_collect, reason, 0);
}


__attribute__((visibility ("hidden")))
sgen_perform_collection (size_t requested_size, int generation_to_collect, const char * reason, gboolean wait_to_finish)
{
  unsigned int generation_to_collect.100;
  _Bool D.22886;
  long int D.22887;
  long int D.22888;
  long int D.22891;
  int concurrent_collection_in_progress.101;
  int iftmp.102;
  int D.22900;
  int allow_synchronous_major.103;
  gboolean * D.22910;
  int D.22913;
  int D.22918;
  int D.22922;
  int concurrent_collection_in_progress.104;
  _Bool D.22926;
  long int D.22927;
  long int D.22928;
  int D.22936;
  long int D.22939;
  long int D.22940;
  long int D.22941;
  int D.22942;
  long int D.22943;
  long int D.22951;
  long int D.22952;
  long int D.22953;
  int D.22954;
  long int D.22955;
  int gc_debug_level.105;
  _Bool D.22957;
  long int D.22958;
  long int D.22959;
  struct FILE * gc_debug_file.106;
  long int D.22963;
  long unsigned int D.22964;
  long unsigned int los_memory_usage.107;
  int D.22968;
  _Bool D.22971;
  long int D.22972;
  long int D.22973;
  int D.22976;
  int D.22977;
  _Bool D.22978;
  long int D.22979;
  long int D.22980;
  gint64 gc_end;
  struct GGTimingInfo infos[2];
  int overflow_generation_to_collect;
  int oldest_generation_collected;
  const char * overflow_reason;
  void done = <<< error >>>;

  try
    {
      overflow_generation_to_collect = -1;
      oldest_generation_collected = generation_to_collect;
      overflow_reason = 0B;
      if (wait_to_finish != 0) goto <D.22883>; else goto <D.22884>;
      <D.22883>:
      <D.22884>:
      generation_to_collect.100 = (unsigned int) generation_to_collect;
      D.22886 = generation_to_collect.100 > 1;
      D.22887 = (long int) D.22886;
      D.22888 = __builtin_expect (D.22887, 0);
      if (D.22888 != 0) goto <D.22889>; else goto <D.22890>;
      <D.22889>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3452, "generation_to_collect == GENERATION_NURSERY || generation_to_collect == GENERATION_OLD");
      <D.22890>:
      memset (&infos, 0, 96);
      mono_profiler_gc_event (0, generation_to_collect);
      infos[0].generation = generation_to_collect;
      infos[0].reason = reason;
      infos[0].is_overflow = 0;
      D.22891 = mono_100ns_ticks ();
      infos[0].total_time = D.22891;
      infos[1].generation = -1;
      sgen_stop_world (generation_to_collect);
      concurrent_collection_in_progress.101 = concurrent_collection_in_progress;
      if (concurrent_collection_in_progress.101 != 0) goto <D.22893>; else goto <D.22894>;
      <D.22893>:
      if (wait_to_finish != 0) goto <D.22898>; else goto <D.22896>;
      <D.22898>:
      if (generation_to_collect == 1) goto <D.22899>; else goto <D.22896>;
      <D.22899>:
      iftmp.102 = 1;
      goto <D.22897>;
      <D.22896>:
      iftmp.102 = 0;
      <D.22897>:
      D.22900 = major_update_or_finish_concurrent_collection (iftmp.102);
      if (D.22900 != 0) goto <D.22901>; else goto <D.22902>;
      <D.22901>:
      oldest_generation_collected = 1;
      goto done;
      <D.22902>:
      if (generation_to_collect == 1) goto done; else goto <D.22903>;
      <D.22903>:
      goto <D.22904>;
      <D.22894>:
      if (generation_to_collect == 1) goto <D.22905>; else goto <D.22906>;
      <D.22905>:
      allow_synchronous_major.103 = allow_synchronous_major;
      if (allow_synchronous_major.103 != 0) goto <D.22908>; else goto <D.22909>;
      <D.22908>:
      D.22910 = major_collector.want_synchronous_collection;
      if (D.22910 != 0B) goto <D.22911>; else goto <D.22912>;
      <D.22911>:
      D.22910 = major_collector.want_synchronous_collection;
      D.22913 = *D.22910;
      if (D.22913 != 0) goto <D.22914>; else goto <D.22915>;
      <D.22914>:
      wait_to_finish = 1;
      <D.22915>:
      <D.22912>:
      <D.22909>:
      <D.22906>:
      <D.22904>:
      if (generation_to_collect == 0) goto <D.22916>; else goto <D.22917>;
      <D.22916>:
      D.22918 = collect_nursery (0B, 0);
      if (D.22918 != 0) goto <D.22919>; else goto <D.22920>;
      <D.22919>:
      overflow_generation_to_collect = 1;
      overflow_reason = "Minor overflow";
      <D.22920>:
      goto <D.22921>;
      <D.22917>:
      D.22922 = major_collector.is_concurrent;
      if (D.22922 != 0) goto <D.22923>; else goto <D.22924>;
      <D.22923>:
      concurrent_collection_in_progress.104 = concurrent_collection_in_progress;
      D.22926 = concurrent_collection_in_progress.104 != 0;
      D.22927 = (long int) D.22926;
      D.22928 = __builtin_expect (D.22927, 0);
      if (D.22928 != 0) goto <D.22929>; else goto <D.22930>;
      <D.22929>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3489, "!concurrent_collection_in_progress");
      <D.22930>:
      if (wait_to_finish == 0) goto <D.22931>; else goto <D.22932>;
      <D.22931>:
      collect_nursery (0B, 0);
      <D.22932>:
      <D.22924>:
      D.22922 = major_collector.is_concurrent;
      if (D.22922 != 0) goto <D.22934>; else goto <D.22933>;
      <D.22934>:
      if (wait_to_finish == 0) goto <D.22935>; else goto <D.22933>;
      <D.22935>:
      major_start_concurrent_collection (reason);
      goto done;
      <D.22933>:
      D.22936 = major_do_collection (reason);
      if (D.22936 != 0) goto <D.22937>; else goto <D.22938>;
      <D.22937>:
      overflow_generation_to_collect = 0;
      overflow_reason = "Excessive pinning";
      <D.22938>:
      <D.22921>:
      gc_end = mono_100ns_ticks ();
      D.22939 = infos[0].total_time;
      D.22940 = gc_end - D.22939;
      D.22941 = D.22940 / 10;
      D.22942 = (int) D.22941;
      D.22943 = (long int) D.22942;
      infos[0].total_time = D.22943;
      D.22922 = major_collector.is_concurrent;
      if (D.22922 == 0) goto <D.22944>; else goto <D.22945>;
      <D.22944>:
      if (overflow_generation_to_collect != -1) goto <D.22946>; else goto <D.22947>;
      <D.22946>:
      mono_profiler_gc_event (0, overflow_generation_to_collect);
      infos[1].generation = overflow_generation_to_collect;
      infos[1].reason = overflow_reason;
      infos[1].is_overflow = 1;
      infos[1].total_time = gc_end;
      if (overflow_generation_to_collect == 0) goto <D.22948>; else goto <D.22949>;
      <D.22948>:
      collect_nursery (0B, 0);
      goto <D.22950>;
      <D.22949>:
      major_do_collection (overflow_reason);
      <D.22950>:
      gc_end = mono_100ns_ticks ();
      D.22951 = infos[1].total_time;
      D.22952 = gc_end - D.22951;
      D.22953 = D.22952 / 10;
      D.22954 = (int) D.22953;
      D.22955 = (long int) D.22954;
      infos[1].total_time = D.22955;
      mono_profiler_gc_event (5, overflow_generation_to_collect);
      oldest_generation_collected = MAX_EXPR <overflow_generation_to_collect, oldest_generation_collected>;
      <D.22947>:
      <D.22945>:
      gc_debug_level.105 = gc_debug_level;
      D.22957 = gc_debug_level.105 > 1;
      D.22958 = (long int) D.22957;
      D.22959 = __builtin_expect (D.22958, 0);
      if (D.22959 != 0) goto <D.22960>; else goto <D.22961>;
      <D.22960>:
      gc_debug_file.106 = gc_debug_file;
      D.22963 = mono_gc_get_heap_size ();
      D.22964 = (long unsigned int) D.22963;
      los_memory_usage.107 = los_memory_usage;
      fprintf (gc_debug_file.106, "Heap size: %lu, LOS size: %lu\n", D.22964, los_memory_usage.107);
      gc_debug_file.106 = gc_debug_file;
      fflush (gc_debug_file.106);
      <D.22961>:
      if (generation_to_collect == 0) goto <D.22966>; else goto <D.22967>;
      <D.22966>:
      D.22968 = sgen_can_alloc_size (requested_size);
      if (D.22968 == 0) goto <D.22969>; else goto <D.22970>;
      <D.22969>:
      gc_debug_level.105 = gc_debug_level;
      D.22971 = gc_debug_level.105 > 0;
      D.22972 = (long int) D.22971;
      D.22973 = __builtin_expect (D.22972, 0);
      if (D.22973 != 0) goto <D.22974>; else goto <D.22975>;
      <D.22974>:
      gc_debug_file.106 = gc_debug_file;
      D.22976 = sgen_get_pinned_count ();
      fprintf (gc_debug_file.106, "nursery collection didn\'t find enough room for %zd alloc (%d pinned)\n", requested_size, D.22976);
      gc_debug_file.106 = gc_debug_file;
      fflush (gc_debug_file.106);
      <D.22975>:
      sgen_dump_pin_queue ();
      degraded_mode = 1;
      <D.22970>:
      <D.22967>:
      done:
      D.22977 = sgen_gray_object_queue_is_empty (&gray_queue);
      D.22978 = D.22977 == 0;
      D.22979 = (long int) D.22978;
      D.22980 = __builtin_expect (D.22979, 0);
      if (D.22980 != 0) goto <D.22981>; else goto <D.22982>;
      <D.22981>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3542, "sgen_gray_object_queue_is_empty (&gray_queue)");
      <D.22982>:
      sgen_restart_world (oldest_generation_collected, &infos);
      mono_profiler_gc_event (5, generation_to_collect);
    }
  finally
    {
      infos = {CLOBBER};
    }
}


major_update_or_finish_concurrent_collection (gboolean force_finish)
{
  int D.22983;
  _Bool D.22984;
  long int D.22985;
  long int D.22986;
  int D.22991;
  void (*<T869>) (void) D.22994;
  gboolean D.22995;
  int mod_union_consistency_check.108;
  int whole_heap_check_before_collection.109;
  struct SgenGrayQueue unpin_queue;

  try
    {
      memset (&unpin_queue, 0, 32);
      D.22983 = sgen_gray_object_queue_is_empty (&gray_queue);
      D.22984 = D.22983 == 0;
      D.22985 = (long int) D.22984;
      D.22986 = __builtin_expect (D.22985, 0);
      if (D.22986 != 0) goto <D.22987>; else goto <D.22988>;
      <D.22987>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3350, "sgen_gray_object_queue_is_empty (&gray_queue)");
      <D.22988>:
      if (force_finish == 0) goto <D.22989>; else goto <D.22990>;
      <D.22989>:
      D.22991 = sgen_workers_all_done ();
      if (D.22991 == 0) goto <D.22992>; else goto <D.22993>;
      <D.22992>:
      D.22994 = major_collector.update_cardtable_mod_union;
      D.22994 ();
      sgen_los_update_cardtable_mod_union ();
      D.22995 = 0;
      return D.22995;
      <D.22993>:
      <D.22990>:
      wait_for_workers_to_finish ();
      D.22994 = major_collector.update_cardtable_mod_union;
      D.22994 ();
      sgen_los_update_cardtable_mod_union ();
      collect_nursery (&unpin_queue, 1);
      mod_union_consistency_check.108 = mod_union_consistency_check;
      if (mod_union_consistency_check.108 != 0) goto <D.22997>; else goto <D.22998>;
      <D.22997>:
      sgen_check_mod_union_consistency ();
      <D.22998>:
      current_collection_generation = 1;
      major_finish_collection ("finishing", -1, 1);
      whole_heap_check_before_collection.109 = whole_heap_check_before_collection;
      if (whole_heap_check_before_collection.109 != 0) goto <D.23000>; else goto <D.23001>;
      <D.23000>:
      sgen_check_whole_heap (0);
      <D.23001>:
      unpin_objects_from_queue (&unpin_queue);
      sgen_gray_object_queue_deinit (&unpin_queue);
      current_collection_generation = -1;
      D.22995 = 1;
      return D.22995;
    }
  finally
    {
      unpin_queue = {CLOBBER};
    }
}


wait_for_workers_to_finish ()
{
  int D.23004;

  goto <D.21094>;
  <D.21093>:
  monoeg_g_usleep (200);
  <D.21094>:
  D.23004 = sgen_workers_all_done ();
  if (D.23004 == 0) goto <D.21093>; else goto <D.21095>;
  <D.21095>:
}


major_finish_collection (const char * reason, int old_next_pin_slot, gboolean scan_mod_union)
{
  int concurrent_collection_in_progress.110;
  int D.23009;
  int concurrent_collection_in_progress.111;
  int D.23013;
  _Bool D.23014;
  long int D.23015;
  long int D.23016;
  int do_concurrent_checks.112;
  struct SgenSectionGrayQueue * D.23023;
  int D.23024;
  _Bool D.23025;
  long int D.23026;
  long int D.23027;
  long int D.23030;
  long int D.23031;
  int D.23032;
  long long int D.23033;
  long long int time_major_finish_gray_stack.113;
  long long int D.23035;
  long unsigned int objects_pinned.114;
  int concurrent_collection_in_progress.115;
  _Bool D.23040;
  long int D.23041;
  long int D.23042;
  struct GCMemSection * nursery_section.116;
  char * D.23046;
  long unsigned int D.23047;
  char * D.23048;
  long unsigned int D.23049;
  int check_mark_bits_after_major_collection.117;
  char[0:] * D.23053;
  long unsigned int D.23054;
  long unsigned int D.23055;
  _Bool D.23056;
  long int D.23057;
  long int D.23058;
  int D.23061;
  long unsigned int D.23064;
  long unsigned int D.23065;
  long unsigned int D.23066;
  struct LOSObject * D.23070;
  long int D.23072;
  long int D.23073;
  int D.23074;
  long long int D.23075;
  long long int time_major_free_bigobjs.118;
  long long int D.23077;
  long long int time_major_los_sweep.119;
  long long int D.23079;
  void (*<T869>) (void) D.23080;
  long long int time_major_sweep.120;
  long long int D.23082;
  int concurrent_collection_in_progress.121;
  void * * D.23086;
  int D.23087;
  long unsigned int D.23088;
  int concurrent_collection_in_progress.122;
  long long int time_major_fragment_creation.123;
  long long int D.23095;
  struct FILE * heap_dump_file.124;
  int stat_major_gcs.125;
  int D.23100;
  struct FinalizeReadyEntry * fin_ready_list.126;
  struct FinalizeReadyEntry * critical_fin_list.127;
  struct FILE * gc_debug_file.128;
  int num_ready_finalizers.129;
  int D.23110;
  _Bool D.23111;
  long int D.23112;
  long int D.23113;
  void (*<T869>) (void) D.23116;
  struct SgenSectionGrayQueue * D.23117;
  int D.23118;
  _Bool D.23119;
  long int D.23120;
  long int D.23121;
  int concurrent_collection_in_progress.130;
  struct LOSObject * bigobj;
  struct LOSObject * prevbo;
  gint64 atv;
  gint64 btv;

  btv = mono_100ns_ticks ();
  concurrent_collection_in_progress.110 = concurrent_collection_in_progress;
  if (concurrent_collection_in_progress.110 != 0) goto <D.23005>; else goto <D.23008>;
  <D.23008>:
  D.23009 = major_collector.is_parallel;
  if (D.23009 != 0) goto <D.23005>; else goto <D.23006>;
  <D.23005>:
  join_workers ();
  <D.23006>:
  concurrent_collection_in_progress.111 = concurrent_collection_in_progress;
  if (concurrent_collection_in_progress.111 != 0) goto <D.23011>; else goto <D.23012>;
  <D.23011>:
  current_object_ops = major_collector.major_concurrent_ops;
  major_copy_or_mark_from_roots (0B, 1, scan_mod_union);
  join_workers ();
  D.23013 = sgen_gray_object_queue_is_empty (&gray_queue);
  D.23014 = D.23013 == 0;
  D.23015 = (long int) D.23014;
  D.23016 = __builtin_expect (D.23015, 0);
  if (D.23016 != 0) goto <D.23017>; else goto <D.23018>;
  <D.23017>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3147, "sgen_gray_object_queue_is_empty (&gray_queue)");
  <D.23018>:
  do_concurrent_checks.112 = do_concurrent_checks;
  if (do_concurrent_checks.112 != 0) goto <D.23020>; else goto <D.23021>;
  <D.23020>:
  check_nursery_is_clean ();
  <D.23021>:
  goto <D.23022>;
  <D.23012>:
  current_object_ops = major_collector.major_ops;
  <D.23022>:
  sgen_gray_object_queue_disable_alloc_prepare (&gray_queue);
  D.23023 = sgen_workers_get_distribute_section_gray_queue ();
  D.23024 = sgen_section_gray_queue_is_empty (D.23023);
  D.23025 = D.23024 == 0;
  D.23026 = (long int) D.23025;
  D.23027 = __builtin_expect (D.23026, 0);
  if (D.23027 != 0) goto <D.23028>; else goto <D.23029>;
  <D.23028>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3161, "sgen_section_gray_queue_is_empty (sgen_workers_get_distribute_section_gray_queue ())");
  <D.23029>:
  finish_gray_stack (1, &gray_queue);
  atv = mono_100ns_ticks ();
  D.23030 = atv - btv;
  D.23031 = D.23030 / 10;
  D.23032 = (int) D.23031;
  D.23033 = (long long int) D.23032;
  time_major_finish_gray_stack.113 = time_major_finish_gray_stack;
  D.23035 = D.23033 + time_major_finish_gray_stack.113;
  time_major_finish_gray_stack = D.23035;
  sgen_workers_reset_data ();
  objects_pinned.114 = objects_pinned;
  if (objects_pinned.114 != 0) goto <D.23037>; else goto <D.23038>;
  <D.23037>:
  concurrent_collection_in_progress.115 = concurrent_collection_in_progress;
  D.23040 = concurrent_collection_in_progress.115 != 0;
  D.23041 = (long int) D.23040;
  D.23042 = __builtin_expect (D.23041, 0);
  if (D.23042 != 0) goto <D.23043>; else goto <D.23044>;
  <D.23043>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3177, "!concurrent_collection_in_progress");
  <D.23044>:
  nursery_section.116 = nursery_section;
  sgen_pin_queue_clear_discarded_entries (nursery_section.116, old_next_pin_slot);
  sgen_optimize_pin_queue (0);
  nursery_section.116 = nursery_section;
  sgen_find_section_pin_queue_start_end (nursery_section.116);
  objects_pinned = 0;
  <D.23038>:
  reset_heap_boundaries ();
  D.23046 = sgen_get_nursery_start ();
  D.23047 = (long unsigned int) D.23046;
  D.23048 = sgen_get_nursery_end ();
  D.23049 = (long unsigned int) D.23048;
  sgen_update_heap_boundaries (D.23047, D.23049);
  check_mark_bits_after_major_collection.117 = check_mark_bits_after_major_collection;
  if (check_mark_bits_after_major_collection.117 != 0) goto <D.23051>; else goto <D.23052>;
  <D.23051>:
  sgen_check_major_heap_marked ();
  <D.23052>:
  prevbo = 0B;
  bigobj = los_object_list;
  goto <D.21109>;
  <D.21110>:
  D.23053 = &bigobj->data;
  D.23054 = MEM[(mword *)D.23053];
  D.23055 = D.23054 & 2;
  D.23056 = D.23055 != 0;
  D.23057 = (long int) D.23056;
  D.23058 = __builtin_expect (D.23057, 0);
  if (D.23058 != 0) goto <D.23059>; else goto <D.23060>;
  <D.23059>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3197, "!object_is_pinned (bigobj->data)");
  <D.23060>:
  D.23053 = &bigobj->data;
  D.23061 = sgen_los_object_is_pinned (D.23053);
  if (D.23061 != 0) goto <D.23062>; else goto <D.23063>;
  <D.23062>:
  D.23053 = &bigobj->data;
  sgen_los_unpin_object (D.23053);
  D.23053 = &bigobj->data;
  D.23064 = (long unsigned int) D.23053;
  D.23053 = &bigobj->data;
  D.23064 = (long unsigned int) D.23053;
  D.23065 = sgen_los_object_size (bigobj);
  D.23066 = D.23064 + D.23065;
  sgen_update_heap_boundaries (D.23064, D.23066);
  goto <D.23067>;
  <D.23063>:
  {
    struct LOSObject * to_free;

    if (prevbo != 0B) goto <D.23068>; else goto <D.23069>;
    <D.23068>:
    D.23070 = bigobj->next;
    prevbo->next = D.23070;
    goto <D.23071>;
    <D.23069>:
    D.23070 = bigobj->next;
    los_object_list = D.23070;
    <D.23071>:
    to_free = bigobj;
    bigobj = bigobj->next;
    sgen_los_free_object (to_free);
    // predicted unlikely by continue predictor.
    goto <D.21109>;
  }
  <D.23067>:
  prevbo = bigobj;
  bigobj = bigobj->next;
  <D.21109>:
  if (bigobj != 0B) goto <D.21110>; else goto <D.21111>;
  <D.21111>:
  btv = mono_100ns_ticks ();
  D.23072 = btv - atv;
  D.23073 = D.23072 / 10;
  D.23074 = (int) D.23073;
  D.23075 = (long long int) D.23074;
  time_major_free_bigobjs.118 = time_major_free_bigobjs;
  D.23077 = D.23075 + time_major_free_bigobjs.118;
  time_major_free_bigobjs = D.23077;
  sgen_los_sweep ();
  atv = mono_100ns_ticks ();
  D.23030 = atv - btv;
  D.23031 = D.23030 / 10;
  D.23032 = (int) D.23031;
  D.23033 = (long long int) D.23032;
  time_major_los_sweep.119 = time_major_los_sweep;
  D.23079 = D.23033 + time_major_los_sweep.119;
  time_major_los_sweep = D.23079;
  D.23080 = major_collector.sweep;
  D.23080 ();
  btv = mono_100ns_ticks ();
  D.23072 = btv - atv;
  D.23073 = D.23072 / 10;
  D.23074 = (int) D.23073;
  D.23075 = (long long int) D.23074;
  time_major_sweep.120 = time_major_sweep;
  D.23082 = D.23075 + time_major_sweep.120;
  time_major_sweep = D.23082;
  concurrent_collection_in_progress.121 = concurrent_collection_in_progress;
  if (concurrent_collection_in_progress.121 == 0) goto <D.23084>; else goto <D.23085>;
  <D.23084>:
  nursery_section.116 = nursery_section;
  nursery_section.116 = nursery_section;
  D.23086 = nursery_section.116->pin_queue_start;
  nursery_section.116 = nursery_section;
  D.23087 = nursery_section.116->pin_queue_num_entries;
  D.23088 = sgen_build_nursery_fragments (nursery_section.116, D.23086, D.23087, 0B);
  if (D.23088 == 0) goto <D.23089>; else goto <D.23090>;
  <D.23089>:
  degraded_mode = 1;
  <D.23090>:
  sgen_finish_pinning ();
  sgen_clear_tlabs ();
  sgen_pin_stats_reset ();
  <D.23085>:
  concurrent_collection_in_progress.122 = concurrent_collection_in_progress;
  if (concurrent_collection_in_progress.122 != 0) goto <D.23092>; else goto <D.23093>;
  <D.23092>:
  sgen_cement_concurrent_finish ();
  <D.23093>:
  sgen_cement_clear_below_threshold ();
  atv = mono_100ns_ticks ();
  D.23030 = atv - btv;
  D.23031 = D.23030 / 10;
  D.23032 = (int) D.23031;
  D.23033 = (long long int) D.23032;
  time_major_fragment_creation.123 = time_major_fragment_creation;
  D.23095 = D.23033 + time_major_fragment_creation.123;
  time_major_fragment_creation = D.23095;
  heap_dump_file.124 = heap_dump_file;
  if (heap_dump_file.124 != 0B) goto <D.23097>; else goto <D.23098>;
  <D.23097>:
  stat_major_gcs.125 = stat_major_gcs;
  D.23100 = stat_major_gcs.125 + -1;
  dump_heap ("major", D.23100, reason);
  <D.23098>:
  fin_ready_list.126 = fin_ready_list;
  if (fin_ready_list.126 != 0B) goto <D.23101>; else goto <D.23104>;
  <D.23104>:
  critical_fin_list.127 = critical_fin_list;
  if (critical_fin_list.127 != 0B) goto <D.23101>; else goto <D.23102>;
  <D.23101>:
  if (0 != 0) goto <D.23106>; else goto <D.23107>;
  <D.23106>:
  gc_debug_file.128 = gc_debug_file;
  num_ready_finalizers.129 = num_ready_finalizers;
  fprintf (gc_debug_file.128, "Finalizer-thread wakeup: ready %d\n", num_ready_finalizers.129);
  gc_debug_file.128 = gc_debug_file;
  fflush (gc_debug_file.128);
  <D.23107>:
  mono_gc_finalize_notify ();
  <D.23102>:
  D.23110 = sgen_gray_object_queue_is_empty (&gray_queue);
  D.23111 = D.23110 == 0;
  D.23112 = (long int) D.23111;
  D.23113 = __builtin_expect (D.23112, 0);
  if (D.23113 != 0) goto <D.23114>; else goto <D.23115>;
  <D.23114>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3264, "sgen_gray_object_queue_is_empty (&gray_queue)");
  <D.23115>:
  sgen_memgov_major_collection_end ();
  current_collection_generation = -1;
  D.23116 = major_collector.finish_major_collection;
  D.23116 ();
  D.23117 = sgen_workers_get_distribute_section_gray_queue ();
  D.23118 = sgen_section_gray_queue_is_empty (D.23117);
  D.23119 = D.23118 == 0;
  D.23120 = (long int) D.23119;
  D.23121 = __builtin_expect (D.23120, 0);
  if (D.23121 != 0) goto <D.23122>; else goto <D.23123>;
  <D.23122>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3271, "sgen_section_gray_queue_is_empty (sgen_workers_get_distribute_section_gray_queue ())");
  <D.23123>:
  concurrent_collection_in_progress.130 = concurrent_collection_in_progress;
  if (concurrent_collection_in_progress.130 != 0) goto <D.23125>; else goto <D.23126>;
  <D.23125>:
  concurrent_collection_in_progress = 0;
  <D.23126>:
  check_scan_starts ();
}


major_copy_or_mark_from_roots (int * old_next_pin_slot, gboolean finish_up_concurrent_mark, gboolean scan_mod_union)
{
  <unnamed type> D.23127;
  int D.23128;
  int concurrent_collection_in_progress.131;
  int do_concurrent_checks.132;
  int whole_heap_check_before_collection.133;
  long int D.23139;
  long int D.23140;
  int D.23141;
  long long int D.23142;
  long long int time_major_pre_collection_fragment_clear.134;
  long long int D.23144;
  int D.23145;
  struct GCMemSection * nursery_section.135;
  char * D.23149;
  gboolean * D.23150;
  int xdomain_checks.136;
  int concurrent_collection_in_progress.137;
  void (*<T869>) (void) D.23157;
  struct FILE * gc_debug_file.138;
  long unsigned int lowest_heap_address.139;
  void * lowest_heap_address.140;
  long unsigned int highest_heap_address.141;
  void * highest_heap_address.142;
  int concurrent_collection_in_progress.143;
  int D.23169;
  int concurrent_collection_in_progress.144;
  int concurrent_collection_in_progress.145;
  void (*<T2c85>) (struct SgenGrayQueue *) D.23180;
  char[0:] * D.23183;
  long unsigned int D.23184;
  void * D.23185;
  void * * D.23186;
  int D.23189;
  _Bool D.23192;
  long int D.23193;
  long int D.23194;
  long unsigned int D.23197;
  long unsigned int D.23198;
  struct MonoVTable * D.23199;
  void * D.23200;
  long unsigned int D.23201;
  int D.23202;
  int iftmp.146;
  struct GrayQueueSection * D.23209;
  int D.23211;
  _Bool D.23212;
  long int D.23213;
  long int D.23214;
  int D.23218;
  int D.23219;
  int do_pin_stats.147;
  _Bool D.23221;
  long int D.23222;
  long int D.23223;
  unsigned int D.23226;
  long unsigned int D.23227;
  const char * D.23230;
  long unsigned int D.23231;
  void (*ScanObjectFunc) (char *, struct SgenGrayQueue *) iftmp.148;
  int concurrent_collection_in_progress.149;
  int concurrent_collection_in_progress.150;
  int D.23245;
  int check_nursery_objects_pinned.151;
  int iftmp.152;
  int concurrent_collection_in_progress.153;
  void (*<T2c85>) (struct SgenGrayQueue *) D.23258;
  int D.23261;
  long long int time_major_pinning.154;
  long long int D.23263;
  int gc_debug_level.155;
  _Bool D.23265;
  long int D.23266;
  long int D.23267;
  int D.23270;
  int D.23273;
  void (*<T869>) (void) D.23274;
  int concurrent_collection_in_progress.156;
  int D.23278;
  <unnamed type> D.23281;
  unsigned int D.23282;
  long int D.23285;
  long int D.23286;
  int D.23287;
  long long int D.23288;
  long long int time_major_scan_pinned.157;
  long long int D.23290;
  void (*<T2d43>) (void * *, struct SgenGrayQueue *) D.23291;
  void (*<T2d48>) (char *, struct SgenGrayQueue *) D.23292;
  long long int time_major_scan_registered_roots.158;
  long long int D.23294;
  long long int time_major_scan_thread_data.159;
  long long int D.23296;
  long long int time_major_scan_alloc_pinned.160;
  long long int D.23298;
  <unnamed type> D.23299;
  unsigned int D.23300;
  struct FinalizeReadyEntry * fin_ready_list.161;
  struct FinalizeReadyEntry * critical_fin_list.162;
  long long int time_major_scan_finalized.163;
  long long int D.23310;
  long long int time_major_scan_big_objects.164;
  long long int D.23314;
  int concurrent_collection_in_progress.165;
  struct LOSObject * bigobj;
  gint64 atv;
  gint64 btv;
  char * heap_start;
  char * heap_end;
  gboolean profile_roots;
  struct GCRootReport root_report;
  struct ScanFromRegisteredRootsJobData * scrrjd_normal;
  struct ScanFromRegisteredRootsJobData * scrrjd_wbarrier;
  struct ScanThreadDataJobData * stdjd;
  struct ScanFinalizerEntriesJobData * sfejd_fin_ready;
  struct ScanFinalizerEntriesJobData * sfejd_critical_fin;
  struct ScanCopyContext ctx;

  try
    {
      heap_start = 0B;
      heap_end = -1B;
      D.23127 = mono_profiler_get_events ();
      D.23128 = (int) D.23127;
      profile_roots = D.23128 & 1048576;
      root_report = {};
      concurrent_collection_in_progress.131 = concurrent_collection_in_progress;
      if (concurrent_collection_in_progress.131 != 0) goto <D.23130>; else goto <D.23131>;
      <D.23130>:
      sgen_nursery_allocator_prepare_for_pinning ();
      do_concurrent_checks.132 = do_concurrent_checks;
      if (do_concurrent_checks.132 != 0) goto <D.23133>; else goto <D.23134>;
      <D.23133>:
      check_nursery_is_clean ();
      <D.23134>:
      goto <D.23135>;
      <D.23131>:
      sgen_nursery_alloc_prepare_for_major ();
      <D.23135>:
      init_gray_queue ();
      atv = mono_100ns_ticks ();
      sgen_clear_nursery_fragments ();
      whole_heap_check_before_collection.133 = whole_heap_check_before_collection;
      if (whole_heap_check_before_collection.133 != 0) goto <D.23137>; else goto <D.23138>;
      <D.23137>:
      sgen_check_whole_heap (finish_up_concurrent_mark);
      <D.23138>:
      btv = mono_100ns_ticks ();
      D.23139 = btv - atv;
      D.23140 = D.23139 / 10;
      D.23141 = (int) D.23140;
      D.23142 = (long long int) D.23141;
      time_major_pre_collection_fragment_clear.134 = time_major_pre_collection_fragment_clear;
      D.23144 = D.23142 + time_major_pre_collection_fragment_clear.134;
      time_major_pre_collection_fragment_clear = D.23144;
      D.23145 = sgen_collection_is_concurrent ();
      if (D.23145 == 0) goto <D.23146>; else goto <D.23147>;
      <D.23146>:
      nursery_section.135 = nursery_section;
      D.23149 = sgen_get_nursery_end ();
      nursery_section.135->next_data = D.23149;
      <D.23147>:
      objects_pinned = 0;
      D.23150 = major_collector.have_swept;
      *D.23150 = 0;
      xdomain_checks.136 = xdomain_checks;
      if (xdomain_checks.136 != 0) goto <D.23152>; else goto <D.23153>;
      <D.23152>:
      sgen_clear_nursery_fragments ();
      check_for_xdomain_refs ();
      <D.23153>:
      concurrent_collection_in_progress.137 = concurrent_collection_in_progress;
      if (concurrent_collection_in_progress.137 == 0) goto <D.23155>; else goto <D.23156>;
      <D.23155>:
      D.23157 = remset.prepare_for_major_collection;
      D.23157 ();
      <D.23156>:
      sgen_process_fin_stage_entries ();
      sgen_process_dislink_stage_entries ();
      atv = mono_100ns_ticks ();
      sgen_init_pinning ();
      if (0 != 0) goto <D.23158>; else goto <D.23159>;
      <D.23158>:
      gc_debug_file.138 = gc_debug_file;
      fprintf (gc_debug_file.138, "Collecting pinned addresses\n");
      gc_debug_file.138 = gc_debug_file;
      fflush (gc_debug_file.138);
      <D.23159>:
      lowest_heap_address.139 = lowest_heap_address;
      lowest_heap_address.140 = (void *) lowest_heap_address.139;
      highest_heap_address.141 = highest_heap_address;
      highest_heap_address.142 = (void *) highest_heap_address.141;
      pin_from_roots (lowest_heap_address.140, highest_heap_address.142, &gray_queue);
      concurrent_collection_in_progress.143 = concurrent_collection_in_progress;
      if (concurrent_collection_in_progress.143 == 0) goto <D.23165>; else goto <D.23168>;
      <D.23168>:
      if (finish_up_concurrent_mark != 0) goto <D.23165>; else goto <D.23166>;
      <D.23165>:
      D.23169 = major_collector.is_concurrent;
      if (D.23169 != 0) goto <D.23170>; else goto <D.23171>;
      <D.23170>:
      sgen_cement_iterate (pin_stage_object_callback, 0B);
      <D.23171>:
      concurrent_collection_in_progress.144 = concurrent_collection_in_progress;
      if (concurrent_collection_in_progress.144 == 0) goto <D.23173>; else goto <D.23174>;
      <D.23173>:
      sgen_cement_reset ();
      <D.23174>:
      <D.23166>:
      sgen_optimize_pin_queue (0);
      concurrent_collection_in_progress.145 = concurrent_collection_in_progress;
      if (concurrent_collection_in_progress.145 != 0) goto <D.23176>; else goto <D.23177>;
      <D.23176>:
      sgen_workers_start_all_workers ();
      sgen_workers_start_marking ();
      <D.23177>:
      if (0 != 0) goto <D.23178>; else goto <D.23179>;
      <D.23178>:
      gc_debug_file.138 = gc_debug_file;
      fprintf (gc_debug_file.138, "Pinning from sections\n");
      gc_debug_file.138 = gc_debug_file;
      fflush (gc_debug_file.138);
      <D.23179>:
      nursery_section.135 = nursery_section;
      sgen_find_section_pin_queue_start_end (nursery_section.135);
      D.23180 = major_collector.find_pin_queue_start_ends;
      D.23180 (&gray_queue);
      if (0 != 0) goto <D.23181>; else goto <D.23182>;
      <D.23181>:
      gc_debug_file.138 = gc_debug_file;
      fprintf (gc_debug_file.138, "Pinning from large objects\n");
      gc_debug_file.138 = gc_debug_file;
      fflush (gc_debug_file.138);
      <D.23182>:
      bigobj = los_object_list;
      goto <D.21084>;
      <D.21083>:
      {
        int dummy;

        try
          {
            D.23183 = &bigobj->data;
            D.23183 = &bigobj->data;
            D.23184 = sgen_los_object_size (bigobj);
            D.23185 = D.23183 + D.23184;
            D.23186 = sgen_find_optimized_pin_queue_area (D.23183, D.23185, &dummy);
            if (D.23186 != 0B) goto <D.23187>; else goto <D.23188>;
            <D.23187>:
            D.23183 = &bigobj->data;
            D.23189 = sgen_los_object_is_pinned (D.23183);
            if (D.23189 != 0) goto <D.23190>; else goto <D.23191>;
            <D.23190>:
            D.23192 = finish_up_concurrent_mark == 0;
            D.23193 = (long int) D.23192;
            D.23194 = __builtin_expect (D.23193, 0);
            if (D.23194 != 0) goto <D.23195>; else goto <D.23196>;
            <D.23195>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 2919, "finish_up_concurrent_mark");
            <D.23196>:
            // predicted unlikely by continue predictor.
            goto <D.21082>;
            <D.23191>:
            D.23183 = &bigobj->data;
            sgen_los_pin_object (D.23183);
            D.23183 = &bigobj->data;
            D.23197 = MEM[(mword *)D.23183];
            D.23198 = D.23197 & 18446744073709551612;
            D.23199 = (struct MonoVTable *) D.23198;
            D.23200 = D.23199->gc_descr;
            D.23201 = (long unsigned int) D.23200;
            D.23202 = sgen_gc_descr_has_references (D.23201);
            if (D.23202 != 0) goto <D.23203>; else goto <D.23204>;
            <D.23203>:
            D.23209 = gray_queue.first;
            if (D.23209 == 0B) goto <D.23206>; else goto <D.23210>;
            <D.23210>:
            D.23209 = gray_queue.first;
            D.23211 = D.23209->end;
            if (D.23211 == 125) goto <D.23206>; else goto <D.23207>;
            <D.23206>:
            iftmp.146 = 1;
            goto <D.23208>;
            <D.23207>:
            iftmp.146 = 0;
            <D.23208>:
            D.23212 = iftmp.146 != 0;
            D.23213 = (long int) D.23212;
            D.23214 = __builtin_expect (D.23213, 0);
            if (D.23214 != 0) goto <D.23215>; else goto <D.23216>;
            <D.23215>:
            D.23183 = &bigobj->data;
            sgen_gray_object_enqueue (&gray_queue, D.23183);
            goto <D.23217>;
            <D.23216>:
            D.23209 = gray_queue.first;
            D.23209 = gray_queue.first;
            D.23211 = D.23209->end;
            D.23218 = D.23211;
            D.23219 = D.23218 + 1;
            D.23209->end = D.23219;
            D.23183 = &bigobj->data;
            D.23209->objects[D.23218] = D.23183;
            <D.23217>:
            D.23183 = &bigobj->data;
            __builtin_prefetch (D.23183);
            <D.23204>:
            do_pin_stats.147 = do_pin_stats;
            D.23221 = do_pin_stats.147 != 0;
            D.23222 = (long int) D.23221;
            D.23223 = __builtin_expect (D.23222, 0);
            if (D.23223 != 0) goto <D.23224>; else goto <D.23225>;
            <D.23224>:
            D.23183 = &bigobj->data;
            D.23183 = &bigobj->data;
            D.23226 = sgen_safe_object_get_size (D.23183);
            D.23227 = (long unsigned int) D.23226;
            sgen_pin_stats_register_object (D.23183, D.23227);
            <D.23225>:
            if (0 != 0) goto <D.23228>; else goto <D.23229>;
            <D.23228>:
            gc_debug_file.138 = gc_debug_file;
            D.23183 = &bigobj->data;
            D.23183 = &bigobj->data;
            D.23230 = safe_name (D.23183);
            D.23231 = sgen_los_object_size (bigobj);
            fprintf (gc_debug_file.138, "Marked large object %p (%s) size: %lu from roots\n", D.23183, D.23230, D.23231);
            gc_debug_file.138 = gc_debug_file;
            fflush (gc_debug_file.138);
            <D.23229>:
            if (profile_roots != 0) goto <D.23232>; else goto <D.23233>;
            <D.23232>:
            D.23183 = &bigobj->data;
            add_profile_gc_root (&root_report, D.23183, 260, 0);
            <D.23233>:
            <D.23188>:
          }
        finally
          {
            dummy = {CLOBBER};
          }
      }
      <D.21082>:
      bigobj = bigobj->next;
      <D.21084>:
      if (bigobj != 0B) goto <D.21083>; else goto <D.21085>;
      <D.21085>:
      if (profile_roots != 0) goto <D.23234>; else goto <D.23235>;
      <D.23234>:
      notify_gc_roots (&root_report);
      <D.23235>:
      concurrent_collection_in_progress.149 = concurrent_collection_in_progress;
      if (concurrent_collection_in_progress.149 != 0) goto <D.23238>; else goto <D.23239>;
      <D.23238>:
      iftmp.148 = current_object_ops.scan_object;
      goto <D.23240>;
      <D.23239>:
      iftmp.148 = 0B;
      <D.23240>:
      ctx.scan_func = iftmp.148;
      ctx.copy_func = 0B;
      ctx.queue = &gray_queue;
      concurrent_collection_in_progress.150 = concurrent_collection_in_progress;
      if (concurrent_collection_in_progress.150 != 0) goto <D.23244>; else goto <D.23241>;
      <D.23244>:
      D.23245 = sgen_minor_collector.is_split;
      if (D.23245 != 0) goto <D.23246>; else goto <D.23241>;
      <D.23246>:
      scan_nursery_objects (ctx);
      goto <D.23242>;
      <D.23241>:
      nursery_section.135 = nursery_section;
      sgen_pin_objects_in_section (nursery_section.135, ctx);
      check_nursery_objects_pinned.151 = check_nursery_objects_pinned;
      if (check_nursery_objects_pinned.151 != 0) goto <D.23248>; else goto <D.23249>;
      <D.23248>:
      D.23245 = sgen_minor_collector.is_split;
      if (D.23245 == 0) goto <D.23250>; else goto <D.23251>;
      <D.23250>:
      concurrent_collection_in_progress.153 = concurrent_collection_in_progress;
      if (concurrent_collection_in_progress.153 == 0) goto <D.23253>; else goto <D.23257>;
      <D.23257>:
      if (finish_up_concurrent_mark != 0) goto <D.23253>; else goto <D.23254>;
      <D.23253>:
      iftmp.152 = 1;
      goto <D.23255>;
      <D.23254>:
      iftmp.152 = 0;
      <D.23255>:
      sgen_check_nursery_objects_pinned (iftmp.152);
      <D.23251>:
      <D.23249>:
      <D.23242>:
      D.23258 = major_collector.pin_objects;
      D.23258 (&gray_queue);
      if (old_next_pin_slot != 0B) goto <D.23259>; else goto <D.23260>;
      <D.23259>:
      D.23261 = sgen_get_pinned_count ();
      *old_next_pin_slot = D.23261;
      <D.23260>:
      btv = mono_100ns_ticks ();
      D.23139 = btv - atv;
      D.23140 = D.23139 / 10;
      D.23141 = (int) D.23140;
      D.23142 = (long long int) D.23141;
      time_major_pinning.154 = time_major_pinning;
      D.23263 = D.23142 + time_major_pinning.154;
      time_major_pinning = D.23263;
      gc_debug_level.155 = gc_debug_level;
      D.23265 = gc_debug_level.155 > 1;
      D.23266 = (long int) D.23265;
      D.23267 = __builtin_expect (D.23266, 0);
      if (D.23267 != 0) goto <D.23268>; else goto <D.23269>;
      <D.23268>:
      gc_debug_file.138 = gc_debug_file;
      D.23270 = sgen_get_pinned_count ();
      D.23139 = btv - atv;
      D.23140 = D.23139 / 10;
      D.23141 = (int) D.23140;
      fprintf (gc_debug_file.138, "Finding pinned pointers: %d in %d usecs\n", D.23270, D.23141);
      gc_debug_file.138 = gc_debug_file;
      fflush (gc_debug_file.138);
      <D.23269>:
      if (0 != 0) goto <D.23271>; else goto <D.23272>;
      <D.23271>:
      gc_debug_file.138 = gc_debug_file;
      D.23273 = sgen_get_pinned_count ();
      fprintf (gc_debug_file.138, "Start scan with %d pinned objects\n", D.23273);
      gc_debug_file.138 = gc_debug_file;
      fflush (gc_debug_file.138);
      <D.23272>:
      D.23274 = major_collector.init_to_space;
      D.23274 ();
      concurrent_collection_in_progress.156 = concurrent_collection_in_progress;
      if (concurrent_collection_in_progress.156 == 0) goto <D.23276>; else goto <D.23277>;
      <D.23276>:
      D.23278 = major_collector.is_parallel;
      if (D.23278 != 0) goto <D.23279>; else goto <D.23280>;
      <D.23279>:
      sgen_workers_start_all_workers ();
      sgen_workers_start_marking ();
      <D.23280>:
      <D.23277>:
      D.23281 = mono_profiler_get_events ();
      D.23282 = D.23281 & 1048576;
      if (D.23282 != 0) goto <D.23283>; else goto <D.23284>;
      <D.23283>:
      report_registered_roots ();
      <D.23284>:
      atv = mono_100ns_ticks ();
      D.23285 = atv - btv;
      D.23286 = D.23285 / 10;
      D.23287 = (int) D.23286;
      D.23288 = (long long int) D.23287;
      time_major_scan_pinned.157 = time_major_scan_pinned;
      D.23290 = D.23288 + time_major_scan_pinned.157;
      time_major_scan_pinned = D.23290;
      scrrjd_normal = sgen_alloc_internal_dynamic (40, 20, 1);
      D.23291 = current_object_ops.copy_or_mark_object;
      scrrjd_normal->copy_or_mark_func = D.23291;
      D.23292 = current_object_ops.scan_object;
      scrrjd_normal->scan_func = D.23292;
      scrrjd_normal->heap_start = heap_start;
      scrrjd_normal->heap_end = heap_end;
      scrrjd_normal->root_type = 0;
      sgen_workers_enqueue_job (job_scan_from_registered_roots, scrrjd_normal);
      scrrjd_wbarrier = sgen_alloc_internal_dynamic (40, 20, 1);
      D.23291 = current_object_ops.copy_or_mark_object;
      scrrjd_wbarrier->copy_or_mark_func = D.23291;
      D.23292 = current_object_ops.scan_object;
      scrrjd_wbarrier->scan_func = D.23292;
      scrrjd_wbarrier->heap_start = heap_start;
      scrrjd_wbarrier->heap_end = heap_end;
      scrrjd_wbarrier->root_type = 2;
      sgen_workers_enqueue_job (job_scan_from_registered_roots, scrrjd_wbarrier);
      btv = mono_100ns_ticks ();
      D.23139 = btv - atv;
      D.23140 = D.23139 / 10;
      D.23141 = (int) D.23140;
      D.23142 = (long long int) D.23141;
      time_major_scan_registered_roots.158 = time_major_scan_registered_roots;
      D.23294 = D.23142 + time_major_scan_registered_roots.158;
      time_major_scan_registered_roots = D.23294;
      stdjd = sgen_alloc_internal_dynamic (16, 20, 1);
      stdjd->heap_start = heap_start;
      stdjd->heap_end = heap_end;
      sgen_workers_enqueue_job (job_scan_thread_data, stdjd);
      atv = mono_100ns_ticks ();
      D.23285 = atv - btv;
      D.23286 = D.23285 / 10;
      D.23287 = (int) D.23286;
      D.23288 = (long long int) D.23287;
      time_major_scan_thread_data.159 = time_major_scan_thread_data;
      D.23296 = D.23288 + time_major_scan_thread_data.159;
      time_major_scan_thread_data = D.23296;
      btv = mono_100ns_ticks ();
      D.23139 = btv - atv;
      D.23140 = D.23139 / 10;
      D.23141 = (int) D.23140;
      D.23142 = (long long int) D.23141;
      time_major_scan_alloc_pinned.160 = time_major_scan_alloc_pinned;
      D.23298 = D.23142 + time_major_scan_alloc_pinned.160;
      time_major_scan_alloc_pinned = D.23298;
      D.23299 = mono_profiler_get_events ();
      D.23300 = D.23299 & 1048576;
      if (D.23300 != 0) goto <D.23301>; else goto <D.23302>;
      <D.23301>:
      report_finalizer_roots ();
      <D.23302>:
      sfejd_fin_ready = sgen_alloc_internal_dynamic (8, 20, 1);
      fin_ready_list.161 = fin_ready_list;
      sfejd_fin_ready->list = fin_ready_list.161;
      sgen_workers_enqueue_job (job_scan_finalizer_entries, sfejd_fin_ready);
      sfejd_critical_fin = sgen_alloc_internal_dynamic (8, 20, 1);
      critical_fin_list.162 = critical_fin_list;
      sfejd_critical_fin->list = critical_fin_list.162;
      sgen_workers_enqueue_job (job_scan_finalizer_entries, sfejd_critical_fin);
      if (scan_mod_union != 0) goto <D.23305>; else goto <D.23306>;
      <D.23305>:
      D.23192 = finish_up_concurrent_mark == 0;
      D.23193 = (long int) D.23192;
      D.23194 = __builtin_expect (D.23193, 0);
      if (D.23194 != 0) goto <D.23307>; else goto <D.23308>;
      <D.23307>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3038, "finish_up_concurrent_mark");
      <D.23308>:
      sgen_workers_enqueue_job (job_scan_major_mod_union_cardtable, 0B);
      sgen_workers_enqueue_job (job_scan_los_mod_union_cardtable, 0B);
      <D.23306>:
      atv = mono_100ns_ticks ();
      D.23285 = atv - btv;
      D.23286 = D.23285 / 10;
      D.23287 = (int) D.23286;
      D.23288 = (long long int) D.23287;
      time_major_scan_finalized.163 = time_major_scan_finalized;
      D.23310 = D.23288 + time_major_scan_finalized.163;
      time_major_scan_finalized = D.23310;
      gc_debug_level.155 = gc_debug_level;
      D.23265 = gc_debug_level.155 > 1;
      D.23266 = (long int) D.23265;
      D.23267 = __builtin_expect (D.23266, 0);
      if (D.23267 != 0) goto <D.23311>; else goto <D.23312>;
      <D.23311>:
      gc_debug_file.138 = gc_debug_file;
      D.23285 = atv - btv;
      D.23286 = D.23285 / 10;
      D.23287 = (int) D.23286;
      fprintf (gc_debug_file.138, "Root scan: %d usecs\n", D.23287);
      gc_debug_file.138 = gc_debug_file;
      fflush (gc_debug_file.138);
      <D.23312>:
      btv = mono_100ns_ticks ();
      D.23139 = btv - atv;
      D.23140 = D.23139 / 10;
      D.23141 = (int) D.23140;
      D.23142 = (long long int) D.23141;
      time_major_scan_big_objects.164 = time_major_scan_big_objects;
      D.23314 = D.23142 + time_major_scan_big_objects.164;
      time_major_scan_big_objects = D.23314;
      concurrent_collection_in_progress.165 = concurrent_collection_in_progress;
      if (concurrent_collection_in_progress.165 != 0) goto <D.23316>; else goto <D.23317>;
      <D.23316>:
      sgen_finish_pinning ();
      sgen_pin_stats_reset ();
      do_concurrent_checks.132 = do_concurrent_checks;
      if (do_concurrent_checks.132 != 0) goto <D.23318>; else goto <D.23319>;
      <D.23318>:
      check_nursery_is_clean ();
      <D.23319>:
      <D.23317>:
    }
  finally
    {
      root_report = {CLOBBER};
      ctx = {CLOBBER};
    }
}


job_scan_los_mod_union_cardtable (struct WorkerData * worker_data, void * job_data_untyped)
{
  int concurrent_collection_in_progress.166;
  _Bool D.23323;
  long int D.23324;
  long int D.23325;
  struct SgenGrayQueue * D.23328;

  concurrent_collection_in_progress.166 = concurrent_collection_in_progress;
  D.23323 = concurrent_collection_in_progress.166 == 0;
  D.23324 = (long int) D.23323;
  D.23325 = __builtin_expect (D.23324, 0);
  if (D.23325 != 0) goto <D.23326>; else goto <D.23327>;
  <D.23326>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 2390, "concurrent_collection_in_progress");
  <D.23327>:
  D.23328 = sgen_workers_get_job_gray_queue (worker_data);
  sgen_los_scan_card_table (1, D.23328);
}


sgen_workers_get_job_gray_queue (struct WorkerData * worker_data)
{
  struct SgenGrayQueue * D.23329;
  struct SgenGrayQueue * iftmp.167;

  if (worker_data != 0B) goto <D.23331>; else goto <D.23332>;
  <D.23331>:
  iftmp.167 = &worker_data->private_gray_queue;
  goto <D.23333>;
  <D.23332>:
  iftmp.167 = &gray_queue;
  <D.23333>:
  D.23329 = iftmp.167;
  return D.23329;
}


job_scan_major_mod_union_cardtable (struct WorkerData * worker_data, void * job_data_untyped)
{
  int concurrent_collection_in_progress.168;
  _Bool D.23336;
  long int D.23337;
  long int D.23338;
  void (*<T2e45>) (gboolean, struct SgenGrayQueue *) D.23341;
  struct SgenGrayQueue * D.23342;

  concurrent_collection_in_progress.168 = concurrent_collection_in_progress;
  D.23336 = concurrent_collection_in_progress.168 == 0;
  D.23337 = (long int) D.23336;
  D.23338 = __builtin_expect (D.23337, 0);
  if (D.23338 != 0) goto <D.23339>; else goto <D.23340>;
  <D.23339>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 2383, "concurrent_collection_in_progress");
  <D.23340>:
  D.23341 = major_collector.scan_card_table;
  D.23342 = sgen_workers_get_job_gray_queue (worker_data);
  D.23341 (1, D.23342);
}


job_scan_finalizer_entries (struct WorkerData * worker_data, void * job_data_untyped)
{
  void (*<T2d43>) (void * *, struct SgenGrayQueue *) D.23343;
  struct SgenGrayQueue * D.23344;
  struct FinalizeReadyEntry * D.23345;
  struct ScanFinalizerEntriesJobData * job_data;
  struct ScanCopyContext ctx;

  try
    {
      job_data = job_data_untyped;
      ctx.scan_func = 0B;
      D.23343 = current_object_ops.copy_or_mark_object;
      ctx.copy_func = D.23343;
      D.23344 = sgen_workers_get_job_gray_queue (worker_data);
      ctx.queue = D.23344;
      D.23345 = job_data->list;
      scan_finalizer_entries (D.23345, ctx);
      sgen_free_internal_dynamic (job_data, 8, 20);
    }
  finally
    {
      ctx = {CLOBBER};
    }
}


scan_finalizer_entries (struct FinalizeReadyEntry * list, struct ScanCopyContext ctx)
{
  void * D.23346;
  struct FILE * gc_debug_file.169;
  const char * D.23352;
  void * * D.23353;
  void (*CopyOrMarkObjectFunc) (void * *, struct SgenGrayQueue *) copy_func;
  struct SgenGrayQueue * queue;
  struct FinalizeReadyEntry * fin;

  copy_func = ctx.copy_func;
  queue = ctx.queue;
  fin = list;
  goto <D.20809>;
  <D.20808>:
  D.23346 = fin->object;
  if (D.23346 == 0B) goto <D.23347>; else goto <D.23348>;
  <D.23347>:
  // predicted unlikely by continue predictor.
  goto <D.20807>;
  <D.23348>:
  if (0 != 0) goto <D.23349>; else goto <D.23350>;
  <D.23349>:
  gc_debug_file.169 = gc_debug_file;
  D.23346 = fin->object;
  D.23346 = fin->object;
  D.23352 = safe_name (D.23346);
  fprintf (gc_debug_file.169, "Scan of fin ready object: %p (%s)\n\n", D.23346, D.23352);
  gc_debug_file.169 = gc_debug_file;
  fflush (gc_debug_file.169);
  <D.23350>:
  D.23353 = &fin->object;
  copy_func (D.23353, queue);
  <D.20807>:
  fin = fin->next;
  <D.20809>:
  if (fin != 0B) goto <D.20808>; else goto <D.20810>;
  <D.20810>:
}


job_scan_thread_data (struct WorkerData * worker_data, void * job_data_untyped)
{
  char * D.23354;
  char * D.23355;
  struct SgenGrayQueue * D.23356;
  struct ScanThreadDataJobData * job_data;

  job_data = job_data_untyped;
  D.23354 = job_data->heap_start;
  D.23355 = job_data->heap_end;
  D.23356 = sgen_workers_get_job_gray_queue (worker_data);
  scan_thread_data (D.23354, D.23355, 1, D.23356);
  sgen_free_internal_dynamic (job_data, 16, 20);
}


scan_thread_data (void * start_nursery, void * end_nursery, gboolean precise, struct GrayQueue * queue)
{
  struct MonoLinkedListSet * D.23357;
  struct MonoLinkedListSetNode * D.23358;
  long unsigned int D.23359;
  int D.23362;
  struct FILE * gc_debug_file.170;
  void * D.23368;
  void * D.23369;
  long int D.23370;
  long int D.23371;
  long int D.23372;
  int D.23373;
  int D.23378;
  int D.23379;
  int D.23386;
  void (*<T2bfc>) (void *, guint8 *, guint8 *, gboolean) D.23389;
  int conservative_stack_mark.171;
  void * D.23393;
  struct _IO_FILE * stderr.172;
  struct MonoContext * D.23401;
  void * * D.23402;
  struct SgenThreadInfo * info;

  scan_area_arg_start = start_nursery;
  scan_area_arg_end = end_nursery;
  {
    struct MonoLinkedListSetNode * __cur;

    D.23357 = mono_thread_info_list_head ();
    __cur = D.23357->head;
    goto <D.21313>;
    <D.21312>:
    D.23358 = __cur->next;
    D.23359 = mono_lls_pointer_get_mark (D.23358);
    if (D.23359 == 0) goto <D.23360>; else goto <D.23361>;
    <D.23360>:
    info = __cur;
    D.23362 = info->skip;
    if (D.23362 != 0) goto <D.23363>; else goto <D.23364>;
    <D.23363>:
    if (0 != 0) goto <D.23365>; else goto <D.23366>;
    <D.23365>:
    gc_debug_file.170 = gc_debug_file;
    D.23368 = info->stack_start;
    D.23369 = info->stack_end;
    D.23369 = info->stack_end;
    D.23370 = (long int) D.23369;
    D.23368 = info->stack_start;
    D.23371 = (long int) D.23368;
    D.23372 = D.23370 - D.23371;
    fprintf (gc_debug_file.170, "Skipping dead thread %p, range: %p-%p, size: %td\n", info, D.23368, D.23369, D.23372);
    gc_debug_file.170 = gc_debug_file;
    fflush (gc_debug_file.170);
    <D.23366>:
    // predicted unlikely by continue predictor.
    goto <D.21310>;
    <D.23364>:
    D.23373 = info->gc_disabled;
    if (D.23373 != 0) goto <D.23374>; else goto <D.23375>;
    <D.23374>:
    if (0 != 0) goto <D.23376>; else goto <D.23377>;
    <D.23376>:
    gc_debug_file.170 = gc_debug_file;
    D.23368 = info->stack_start;
    D.23369 = info->stack_end;
    D.23369 = info->stack_end;
    D.23370 = (long int) D.23369;
    D.23368 = info->stack_start;
    D.23371 = (long int) D.23368;
    D.23372 = D.23370 - D.23371;
    fprintf (gc_debug_file.170, "GC disabled for thread %p, range: %p-%p, size: %td\n", info, D.23368, D.23369, D.23372);
    gc_debug_file.170 = gc_debug_file;
    fflush (gc_debug_file.170);
    <D.23377>:
    // predicted unlikely by continue predictor.
    goto <D.21310>;
    <D.23375>:
    D.23378 = MEM[(struct MonoThreadInfo *)info].thread_state;
    D.23379 = D.23378 & 15;
    if (D.23379 != 1) goto <D.23380>; else goto <D.23381>;
    <D.23380>:
    if (0 != 0) goto <D.23382>; else goto <D.23383>;
    <D.23382>:
    gc_debug_file.170 = gc_debug_file;
    D.23368 = info->stack_start;
    D.23369 = info->stack_end;
    D.23369 = info->stack_end;
    D.23370 = (long int) D.23369;
    D.23368 = info->stack_start;
    D.23371 = (long int) D.23368;
    D.23372 = D.23370 - D.23371;
    D.23378 = MEM[(struct MonoThreadInfo *)info].thread_state;
    D.23379 = D.23378 & 15;
    fprintf (gc_debug_file.170, "Skipping non-running thread %p, range: %p-%p, size: %td (state %d)\n", info, D.23368, D.23369, D.23372, D.23379);
    gc_debug_file.170 = gc_debug_file;
    fflush (gc_debug_file.170);
    <D.23383>:
    // predicted unlikely by continue predictor.
    goto <D.21310>;
    <D.23381>:
    if (0 != 0) goto <D.23384>; else goto <D.23385>;
    <D.23384>:
    gc_debug_file.170 = gc_debug_file;
    D.23368 = info->stack_start;
    D.23369 = info->stack_end;
    D.23369 = info->stack_end;
    D.23370 = (long int) D.23369;
    D.23368 = info->stack_start;
    D.23371 = (long int) D.23368;
    D.23372 = D.23370 - D.23371;
    D.23386 = sgen_get_pinned_count ();
    fprintf (gc_debug_file.170, "Scanning thread %p, range: %p-%p, size: %td, pinned=%d\n", info, D.23368, D.23369, D.23372, D.23386);
    gc_debug_file.170 = gc_debug_file;
    fflush (gc_debug_file.170);
    <D.23385>:
    D.23389 = gc_callbacks.thread_mark_func;
    if (D.23389 != 0B) goto <D.23390>; else goto <D.23387>;
    <D.23390>:
    conservative_stack_mark.171 = conservative_stack_mark;
    if (conservative_stack_mark.171 == 0) goto <D.23392>; else goto <D.23387>;
    <D.23392>:
    {
      struct UserCopyOrMarkData data;

      try
        {
          data.func = 0B;
          data.queue = queue;
          set_user_copy_or_mark_data (&data);
          D.23389 = gc_callbacks.thread_mark_func;
          D.23393 = info->runtime_data;
          D.23368 = info->stack_start;
          D.23369 = info->stack_end;
          D.23389 (D.23393, D.23368, D.23369, precise);
          set_user_copy_or_mark_data (0B);
        }
      finally
        {
          data = {CLOBBER};
        }
    }
    goto <D.23388>;
    <D.23387>:
    if (precise == 0) goto <D.23394>; else goto <D.23395>;
    <D.23394>:
    conservative_stack_mark.171 = conservative_stack_mark;
    if (conservative_stack_mark.171 == 0) goto <D.23396>; else goto <D.23397>;
    <D.23396>:
    stderr.172 = stderr;
    fprintf (stderr.172, "Precise stack mark not supported - disabling.\n");
    conservative_stack_mark = 1;
    <D.23397>:
    D.23368 = info->stack_start;
    D.23369 = info->stack_end;
    conservatively_pin_objects_from (D.23368, D.23369, start_nursery, end_nursery, 0);
    <D.23395>:
    <D.23388>:
    if (precise == 0) goto <D.23399>; else goto <D.23400>;
    <D.23399>:
    D.23401 = &info->ctx;
    D.23401 = &info->ctx;
    D.23402 = D.23401 + 128;
    conservatively_pin_objects_from (D.23401, D.23402, start_nursery, end_nursery, 0);
    <D.23400>:
    <D.23361>:
    <D.21310>:
    D.23358 = __cur->next;
    __cur = mono_lls_pointer_unmask (D.23358);
    <D.21313>:
    if (__cur != 0B) goto <D.21312>; else goto <D.21314>;
    <D.21314>:
  }
}


mono_lls_pointer_get_mark (void * n)
{
  uintptr_t D.23403;
  long unsigned int n.173;

  n.173 = (long unsigned int) n;
  D.23403 = n.173 & 1;
  return D.23403;
}


set_user_copy_or_mark_data (struct UserCopyOrMarkData * data)
{
  unsigned int user_copy_or_mark_key.174;

  user_copy_or_mark_key.174 = user_copy_or_mark_key;
  mono_native_tls_set_value (user_copy_or_mark_key.174, data);
}


mono_native_tls_set_value (pthread_key_t key, void * value)
{
  int D.23407;
  int D.23408;
  _Bool D.23409;

  D.23408 = pthread_setspecific (key, value);
  D.23409 = D.23408 == 0;
  D.23407 = (int) D.23409;
  return D.23407;
}


conservatively_pin_objects_from (void * * start, void * * end, void * start_nursery, void * end_nursery, int pin_type)
{
  volatile long long unsigned int D.20626;
  long long unsigned int start.175;
  long int end.176;
  long int start.177;
  long int D.23414;
  long long unsigned int D.23415;
  void * D.23416;
  long unsigned int start_nursery.178;
  long unsigned int end_nursery.179;
  struct FILE * gc_debug_file.180;
  void * addr.181;
  int do_pin_stats.182;
  _Bool D.23432;
  long int D.23433;
  long int D.23434;
  int D.23437;
  char * addr.183;
  int count;

  count = 0;
  {
    volatile long long unsigned int _zzq_args[6];
    volatile long long unsigned int _zzq_result;

    _zzq_args[0] = 1296236555;
    start.175 = (long long unsigned int) start;
    _zzq_args[1] = start.175;
    end.176 = (long int) end;
    start.177 = (long int) start;
    D.23414 = end.176 - start.177;
    D.23415 = (long long unsigned int) D.23414;
    _zzq_args[2] = D.23415;
    _zzq_args[3] = 0;
    _zzq_args[4] = 0;
    _zzq_args[5] = 0;
    __asm__ __volatile__("lgr 2,%1
	lgr 3,%2
	lr 15,15
	lr 1,1
	lr 2,2
	lr 3,3
	lr 2,2
	lgr %0, 3
	" : "=d" _zzq_result : "a" &_zzq_args[0], "0" 0 : "memory", "3", "2", "cc");
    D.20626 = _zzq_result;
  }
  goto <D.20629>;
  <D.20628>:
  D.23416 = *start;
  if (D.23416 >= start_nursery) goto <D.23417>; else goto <D.23418>;
  <D.23417>:
  D.23416 = *start;
  if (D.23416 < end_nursery) goto <D.23419>; else goto <D.23420>;
  <D.23419>:
  {
    mword addr;

    D.23416 = *start;
    addr = (mword) D.23416;
    addr = addr & 18446744073709551608;
    start_nursery.178 = (long unsigned int) start_nursery;
    if (addr >= start_nursery.178) goto <D.23422>; else goto <D.23423>;
    <D.23422>:
    end_nursery.179 = (long unsigned int) end_nursery;
    if (addr < end_nursery.179) goto <D.23425>; else goto <D.23426>;
    <D.23425>:
    if (0 != 0) goto <D.23427>; else goto <D.23428>;
    <D.23427>:
    gc_debug_file.180 = gc_debug_file;
    addr.181 = (void *) addr;
    fprintf (gc_debug_file.180, "Pinning address %p from %p\n", addr.181, start);
    gc_debug_file.180 = gc_debug_file;
    fflush (gc_debug_file.180);
    <D.23428>:
    addr.181 = (void *) addr;
    sgen_pin_stage_ptr (addr.181);
    count = count + 1;
    <D.23426>:
    <D.23423>:
    do_pin_stats.182 = do_pin_stats;
    D.23432 = do_pin_stats.182 != 0;
    D.23433 = (long int) D.23432;
    D.23434 = __builtin_expect (D.23433, 0);
    if (D.23434 != 0) goto <D.23435>; else goto <D.23436>;
    <D.23435>:
    addr.181 = (void *) addr;
    D.23437 = sgen_ptr_in_nursery (addr.181);
    if (D.23437 != 0) goto <D.23438>; else goto <D.23439>;
    <D.23438>:
    addr.183 = (char *) addr;
    sgen_pin_stats_register_address (addr.183, pin_type);
    <D.23439>:
    <D.23436>:
  }
  <D.23420>:
  <D.23418>:
  start = start + 8;
  <D.20629>:
  if (start < end) goto <D.20628>; else goto <D.20630>;
  <D.20630>:
  if (count != 0) goto <D.23441>; else goto <D.23442>;
  <D.23441>:
  if (0 != 0) goto <D.23443>; else goto <D.23444>;
  <D.23443>:
  gc_debug_file.180 = gc_debug_file;
  fprintf (gc_debug_file.180, "found %d potential pinned heap pointers\n", count);
  gc_debug_file.180 = gc_debug_file;
  fflush (gc_debug_file.180);
  <D.23444>:
  <D.23442>:
}


mono_lls_pointer_unmask (void * p)
{
  void * D.23445;
  long unsigned int p.184;
  long unsigned int D.23447;

  p.184 = (long unsigned int) p;
  D.23447 = p.184 & 18446744073709551612;
  D.23445 = (void *) D.23447;
  return D.23445;
}


job_scan_from_registered_roots (struct WorkerData * worker_data, void * job_data_untyped)
{
  void (*<T2d48>) (char *, struct SgenGrayQueue *) D.23449;
  void (*<T2d43>) (void * *, struct SgenGrayQueue *) D.23450;
  struct SgenGrayQueue * D.23451;
  char * D.23452;
  char * D.23453;
  int D.23454;
  struct ScanFromRegisteredRootsJobData * job_data;
  struct ScanCopyContext ctx;

  try
    {
      job_data = job_data_untyped;
      D.23449 = job_data->scan_func;
      ctx.scan_func = D.23449;
      D.23450 = job_data->copy_or_mark_func;
      ctx.copy_func = D.23450;
      D.23451 = sgen_workers_get_job_gray_queue (worker_data);
      ctx.queue = D.23451;
      D.23452 = job_data->heap_start;
      D.23453 = job_data->heap_end;
      D.23454 = job_data->root_type;
      scan_from_registered_roots (D.23452, D.23453, D.23454, ctx);
      sgen_free_internal_dynamic (job_data, 40, 20);
    }
  finally
    {
      ctx = {CLOBBER};
    }
}


scan_from_registered_roots (char * addr_start, char * addr_end, int root_type, struct ScanCopyContext ctx)
{
  long unsigned int D.23455;
  long unsigned int D.23456;
  struct FILE * gc_debug_file.185;
  char * D.23460;
  long unsigned int D.23461;
  void * D.23462;
  struct SgenHashTableEntry * D.23463;
  unsigned int D.23464;
  void * * start_root;
  struct RootRecord * root;

  {
    struct SgenHashTable * __hash_table;
    struct SgenHashTableEntry * * __table;
    guint __i;

    __hash_table = &roots_hash[root_type];
    __table = __hash_table->table;
    __i = 0;
    goto <D.20871>;
    <D.20870>:
    {
      struct SgenHashTableEntry * * __iter;
      struct SgenHashTableEntry * * __next;

      D.23455 = (long unsigned int) __i;
      D.23456 = D.23455 * 8;
      __iter = __table + D.23456;
      goto <D.20868>;
      <D.20867>:
      {
        struct SgenHashTableEntry * __entry;

        __entry = *__iter;
        __next = &__entry->next;
        start_root = __entry->key;
        root = &__entry->data;
        if (0 != 0) goto <D.23457>; else goto <D.23458>;
        <D.23457>:
        gc_debug_file.185 = gc_debug_file;
        D.23460 = root->end_root;
        D.23461 = root->root_desc;
        D.23462 = (void *) D.23461;
        fprintf (gc_debug_file.185, "Precise root scan %p-%p (desc: %p)\n", start_root, D.23460, D.23462);
        gc_debug_file.185 = gc_debug_file;
        fflush (gc_debug_file.185);
        <D.23458>:
        D.23460 = root->end_root;
        D.23461 = root->root_desc;
        precisely_scan_objects_from (start_root, D.23460, addr_start, addr_end, D.23461, ctx);
      }
      __iter = __next;
      <D.20868>:
      D.23463 = *__iter;
      if (D.23463 != 0B) goto <D.20867>; else goto <D.20869>;
      <D.20869>:
    }
    __i = __i + 1;
    <D.20871>:
    D.23464 = roots_hash[root_type].size;
    if (D.23464 > __i) goto <D.20870>; else goto <D.20872>;
    <D.20872>:
  }
}


precisely_scan_objects_from (void * * start_root, void * * end_root, char * n_start, char * n_end, mword desc, struct ScanCopyContext ctx)
{
  long unsigned int D.23465;
  long unsigned int D.23466;
  void * D.23469;
  struct FILE * gc_debug_file.186;
  long unsigned int D.23475;
  unsigned int D.23476;
  unsigned int D.23477;
  gsize * bitmap_data.187;
  long unsigned int D.23479;
  void * D.23482;
  int bwords.188;
  void (*CopyOrMarkObjectFunc) (void * *, struct SgenGrayQueue *) copy_func;
  struct SgenGrayQueue * queue;

  copy_func = ctx.copy_func;
  queue = ctx.queue;
  D.23465 = desc & 7;
  switch (D.23465) <default: <D.20702>, case 1: <D.20681>, case 2: <D.20701>, case 3: <D.20685>, case 4: <D.20698>>
  <D.20681>:
  desc = desc >> 3;
  goto <D.20683>;
  <D.20682>:
  D.23466 = desc & 1;
  if (D.23466 != 0) goto <D.23467>; else goto <D.23468>;
  <D.23467>:
  D.23469 = *start_root;
  if (D.23469 != 0B) goto <D.23470>; else goto <D.23471>;
  <D.23470>:
  copy_func (start_root, queue);
  if (0 != 0) goto <D.23472>; else goto <D.23473>;
  <D.23472>:
  gc_debug_file.186 = gc_debug_file;
  D.23469 = *start_root;
  fprintf (gc_debug_file.186, "Overwrote root at %p with %p\n", start_root, D.23469);
  gc_debug_file.186 = gc_debug_file;
  fflush (gc_debug_file.186);
  <D.23473>:
  sgen_drain_gray_stack (-1, ctx);
  <D.23471>:
  <D.23468>:
  desc = desc >> 1;
  start_root = start_root + 8;
  <D.20683>:
  if (desc != 0) goto <D.20682>; else goto <D.20684>;
  <D.20684>:
  return;
  <D.20685>:
  {
    gsize * bitmap_data;
    int bwords;
    void * * start_run;

    bitmap_data = sgen_get_complex_descriptor_bitmap (desc);
    D.23475 = *bitmap_data;
    D.23476 = (unsigned int) D.23475;
    D.23477 = D.23476 + 4294967295;
    bwords = (int) D.23477;
    start_run = start_root;
    bitmap_data = bitmap_data + 8;
    goto <D.20695>;
    <D.20694>:
    {
      gsize bmap;
      void * * objptr;

      bitmap_data.187 = bitmap_data;
      bitmap_data = bitmap_data.187 + 8;
      bmap = *bitmap_data.187;
      objptr = start_run;
      goto <D.20692>;
      <D.20691>:
      D.23479 = bmap & 1;
      if (D.23479 != 0) goto <D.23480>; else goto <D.23481>;
      <D.23480>:
      D.23482 = *objptr;
      if (D.23482 != 0B) goto <D.23483>; else goto <D.23484>;
      <D.23483>:
      copy_func (objptr, queue);
      if (0 != 0) goto <D.23485>; else goto <D.23486>;
      <D.23485>:
      gc_debug_file.186 = gc_debug_file;
      D.23482 = *objptr;
      fprintf (gc_debug_file.186, "Overwrote root at %p with %p\n", objptr, D.23482);
      gc_debug_file.186 = gc_debug_file;
      fflush (gc_debug_file.186);
      <D.23486>:
      sgen_drain_gray_stack (-1, ctx);
      <D.23484>:
      <D.23481>:
      bmap = bmap >> 1;
      objptr = objptr + 8;
      <D.20692>:
      if (bmap != 0) goto <D.20691>; else goto <D.20693>;
      <D.20693>:
      start_run = start_run + 512;
    }
    <D.20695>:
    bwords.188 = bwords;
    bwords = bwords.188 + -1;
    if (bwords.188 > 0) goto <D.20694>; else goto <D.20696>;
    <D.20696>:
    goto <D.20697>;
  }
  <D.20698>:
  {
    struct UserCopyOrMarkData data;
    void (*MonoGCRootMarkFunc) (void *, void (*MonoGCMarkFunc) (void * *)) marker;

    try
      {
        data.func = copy_func;
        data.queue = queue;
        marker = sgen_get_user_descriptor_func (desc);
        set_user_copy_or_mark_data (&data);
        marker (start_root, single_arg_user_copy_or_mark);
        set_user_copy_or_mark_data (0B);
        goto <D.20697>;
      }
    finally
      {
        data = {CLOBBER};
      }
  }
  <D.20701>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-gc.c", 1637);
  <D.20702>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-gc.c", 1639);
  <D.20697>:
}


single_arg_user_copy_or_mark (void * * obj)
{
  unsigned int user_copy_or_mark_key.189;
  void (*<T2d43>) (void * *, struct SgenGrayQueue *) D.23491;
  struct GrayQueue * D.23492;
  struct UserCopyOrMarkData * data;

  user_copy_or_mark_key.189 = user_copy_or_mark_key;
  data = pthread_getspecific (user_copy_or_mark_key.189);
  D.23491 = data->func;
  D.23492 = data->queue;
  D.23491 (obj, D.23492);
}


pin_stage_object_callback (char * obj, size_t size, void * data)
{
  sgen_pin_stage_ptr (obj);
}


init_gray_queue ()
{
  int D.23496;
  int D.23498;
  struct SgenSectionGrayQueue * D.23499;

  D.23496 = sgen_collection_is_parallel ();
  if (D.23496 != 0) goto <D.23493>; else goto <D.23497>;
  <D.23497>:
  D.23498 = sgen_collection_is_concurrent ();
  if (D.23498 != 0) goto <D.23493>; else goto <D.23494>;
  <D.23493>:
  sgen_workers_init_distribute_gray_queue ();
  D.23499 = sgen_workers_get_distribute_section_gray_queue ();
  sgen_gray_object_queue_init_with_alloc_prepare (&gray_queue, 0B, gray_queue_redirect, D.23499);
  goto <D.23495>;
  <D.23494>:
  sgen_gray_object_queue_init (&gray_queue, 0B);
  <D.23495>:
}


gray_queue_redirect (struct SgenGrayQueue * queue)
{
  void * D.23501;
  int iftmp.190;
  int concurrent_collection_in_progress.191;
  int current_collection_generation.192;
  int D.23512;
  _Bool D.23513;
  long int D.23514;
  long int D.23515;
  int D.23518;
  int concurrent_collection_in_progress.193;
  _Bool D.23525;
  long int D.23526;
  long int D.23527;
  gboolean wake;

  wake = 0;
  <D.20103>:
  {
    struct GrayQueueSection * section;

    section = sgen_gray_object_dequeue_section (queue);
    if (section == 0B) goto <D.20102>; else goto <D.23500>;
    <D.23500>:
    D.23501 = queue->alloc_prepare_data;
    sgen_section_gray_queue_enqueue (D.23501, section);
    wake = 1;
  }
  goto <D.20103>;
  <D.20102>:
  if (wake != 0) goto <D.23502>; else goto <D.23503>;
  <D.23502>:
  concurrent_collection_in_progress.191 = concurrent_collection_in_progress;
  if (concurrent_collection_in_progress.191 == 0) goto <D.23509>; else goto <D.23505>;
  <D.23509>:
  current_collection_generation.192 = current_collection_generation;
  if (current_collection_generation.192 != 1) goto <D.23506>; else goto <D.23511>;
  <D.23511>:
  D.23512 = major_collector.is_parallel;
  if (D.23512 == 0) goto <D.23506>; else goto <D.23505>;
  <D.23506>:
  iftmp.190 = 1;
  goto <D.23507>;
  <D.23505>:
  iftmp.190 = 0;
  <D.23507>:
  D.23513 = iftmp.190 != 0;
  D.23514 = (long int) D.23513;
  D.23515 = __builtin_expect (D.23514, 0);
  if (D.23515 != 0) goto <D.23516>; else goto <D.23517>;
  <D.23516>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 602, "concurrent_collection_in_progress || (current_collection_generation == GENERATION_OLD && major_collector.is_parallel)");
  <D.23517>:
  D.23518 = sgen_workers_have_started ();
  if (D.23518 != 0) goto <D.23519>; else goto <D.23520>;
  <D.23519>:
  sgen_workers_wake_up_all ();
  goto <D.23521>;
  <D.23520>:
  concurrent_collection_in_progress.193 = concurrent_collection_in_progress;
  if (concurrent_collection_in_progress.193 != 0) goto <D.23523>; else goto <D.23524>;
  <D.23523>:
  current_collection_generation.192 = current_collection_generation;
  D.23525 = current_collection_generation.192 != -1;
  D.23526 = (long int) D.23525;
  D.23527 = __builtin_expect (D.23526, 0);
  if (D.23527 != 0) goto <D.23528>; else goto <D.23529>;
  <D.23528>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 607, "current_collection_generation == -1");
  <D.23529>:
  <D.23524>:
  <D.23521>:
  <D.23503>:
}


pin_from_roots (void * start_nursery, void * end_nursery, struct GrayQueue * queue)
{
  int gc_debug_level.194;
  _Bool D.23531;
  long int D.23532;
  long int D.23533;
  struct FILE * gc_debug_file.195;
  long unsigned int roots_size.196;
  int D.23538;
  unsigned int D.23539;
  unsigned int D.23540;
  long unsigned int D.23541;
  long unsigned int D.23542;
  char * D.23545;
  struct SgenHashTableEntry * D.23546;
  unsigned int D.23547;
  void * * start_root;
  struct RootRecord * root;

  gc_debug_level.194 = gc_debug_level;
  D.23531 = gc_debug_level.194 > 1;
  D.23532 = (long int) D.23531;
  D.23533 = __builtin_expect (D.23532, 0);
  if (D.23533 != 0) goto <D.23534>; else goto <D.23535>;
  <D.23534>:
  gc_debug_file.195 = gc_debug_file;
  roots_size.196 = roots_size;
  D.23538 = (int) roots_size.196;
  D.23539 = roots_hash[0].num_entries;
  D.23540 = roots_hash[1].num_entries;
  fprintf (gc_debug_file.195, "Scanning pinned roots (%d bytes, %d/%d entries)\n", D.23538, D.23539, D.23540);
  gc_debug_file.195 = gc_debug_file;
  fflush (gc_debug_file.195);
  <D.23535>:
  {
    struct SgenHashTable * __hash_table;
    struct SgenHashTableEntry * * __table;
    guint __i;

    __hash_table = &roots_hash[1];
    __table = __hash_table->table;
    __i = 0;
    goto <D.20648>;
    <D.20647>:
    {
      struct SgenHashTableEntry * * __iter;
      struct SgenHashTableEntry * * __next;

      D.23541 = (long unsigned int) __i;
      D.23542 = D.23541 * 8;
      __iter = __table + D.23542;
      goto <D.20645>;
      <D.20644>:
      {
        struct SgenHashTableEntry * __entry;

        __entry = *__iter;
        __next = &__entry->next;
        start_root = __entry->key;
        root = &__entry->data;
        if (0 != 0) goto <D.23543>; else goto <D.23544>;
        <D.23543>:
        gc_debug_file.195 = gc_debug_file;
        D.23545 = root->end_root;
        fprintf (gc_debug_file.195, "Pinned roots %p-%p\n", start_root, D.23545);
        gc_debug_file.195 = gc_debug_file;
        fflush (gc_debug_file.195);
        <D.23544>:
        D.23545 = root->end_root;
        conservatively_pin_objects_from (start_root, D.23545, start_nursery, end_nursery, 2);
      }
      __iter = __next;
      <D.20645>:
      D.23546 = *__iter;
      if (D.23546 != 0B) goto <D.20644>; else goto <D.20646>;
      <D.20646>:
    }
    __i = __i + 1;
    <D.20648>:
    D.23547 = roots_hash[1].size;
    if (D.23547 > __i) goto <D.20647>; else goto <D.20649>;
    <D.20649>:
  }
  scan_thread_data (start_nursery, end_nursery, 0, queue);
}


sgen_gc_descr_has_references (mword desc)
{
  long unsigned int D.23548;
  gboolean D.23551;
  long unsigned int D.23552;
  long unsigned int D.23555;

  D.23548 = desc & 4294901767;
  if (D.23548 == 1) goto <D.23549>; else goto <D.23550>;
  <D.23549>:
  D.23551 = 0;
  return D.23551;
  <D.23550>:
  D.23552 = desc & 49159;
  if (D.23552 == 4) goto <D.23553>; else goto <D.23554>;
  <D.23553>:
  D.23551 = 0;
  return D.23551;
  <D.23554>:
  D.23555 = desc & 7;
  if (D.23555 == 7) goto <D.23556>; else goto <D.23557>;
  <D.23556>:
  D.23551 = 0;
  return D.23551;
  <D.23557>:
  D.23551 = 1;
  return D.23551;
}


scan_nursery_objects (struct ScanCopyContext ctx)
{
  struct GCMemSection * nursery_section.197;
  char * D.23560;
  char * D.23561;

  nursery_section.197 = nursery_section;
  D.23560 = nursery_section.197->data;
  nursery_section.197 = nursery_section;
  D.23561 = nursery_section.197->end_data;
  sgen_scan_area_with_callback (D.23560, D.23561, scan_nursery_objects_callback, &ctx, 0);
}


scan_nursery_objects_callback (char * obj, size_t size, struct ScanCopyContext * ctx)
{
  void (*<T2d48>) (char *, struct SgenGrayQueue *) D.23562;
  struct SgenGrayQueue * D.23563;

  D.23562 = ctx->scan_func;
  D.23563 = ctx->queue;
  D.23562 (obj, D.23563);
}


report_registered_roots ()
{
  report_registered_roots_by_type (0);
  report_registered_roots_by_type (2);
}


report_registered_roots_by_type (int root_type)
{
  long unsigned int D.23564;
  long unsigned int D.23565;
  struct FILE * gc_debug_file.198;
  char * D.23569;
  long unsigned int D.23570;
  void * D.23571;
  struct SgenHashTableEntry * D.23572;
  unsigned int D.23573;
  struct GCRootReport report;
  void * * start_root;
  struct RootRecord * root;

  try
    {
      report.count = 0;
      {
        struct SgenHashTable * __hash_table;
        struct SgenHashTableEntry * * __table;
        guint __i;

        __hash_table = &roots_hash[root_type];
        __table = __hash_table->table;
        __i = 0;
        goto <D.20795>;
        <D.20794>:
        {
          struct SgenHashTableEntry * * __iter;
          struct SgenHashTableEntry * * __next;

          D.23564 = (long unsigned int) __i;
          D.23565 = D.23564 * 8;
          __iter = __table + D.23565;
          goto <D.20792>;
          <D.20791>:
          {
            struct SgenHashTableEntry * __entry;

            __entry = *__iter;
            __next = &__entry->next;
            start_root = __entry->key;
            root = &__entry->data;
            if (0 != 0) goto <D.23566>; else goto <D.23567>;
            <D.23566>:
            gc_debug_file.198 = gc_debug_file;
            D.23569 = root->end_root;
            D.23570 = root->root_desc;
            D.23571 = (void *) D.23570;
            fprintf (gc_debug_file.198, "Precise root scan %p-%p (desc: %p)\n", start_root, D.23569, D.23571);
            gc_debug_file.198 = gc_debug_file;
            fflush (gc_debug_file.198);
            <D.23567>:
            D.23569 = root->end_root;
            D.23570 = root->root_desc;
            precisely_report_roots_from (&report, start_root, D.23569, D.23570);
          }
          __iter = __next;
          <D.20792>:
          D.23572 = *__iter;
          if (D.23572 != 0B) goto <D.20791>; else goto <D.20793>;
          <D.20793>:
        }
        __i = __i + 1;
        <D.20795>:
        D.23573 = roots_hash[root_type].size;
        if (D.23573 > __i) goto <D.20794>; else goto <D.20796>;
        <D.20796>:
      }
      notify_gc_roots (&report);
    }
  finally
    {
      report = {CLOBBER};
    }
}


precisely_report_roots_from (struct GCRootReport * report, void * * start_root, void * * end_root, mword desc)
{
  long unsigned int D.23574;
  long unsigned int D.23575;
  void * D.23578;
  long unsigned int D.23581;
  unsigned int D.23582;
  unsigned int D.23583;
  gsize * bitmap_data.199;
  long unsigned int D.23585;
  void * D.23588;
  int bwords.200;

  D.23574 = desc & 7;
  switch (D.23574) <default: <D.20778>, case 1: <D.20758>, case 2: <D.20777>, case 3: <D.20762>, case 4: <D.20775>>
  <D.20758>:
  desc = desc >> 3;
  goto <D.20760>;
  <D.20759>:
  D.23575 = desc & 1;
  if (D.23575 != 0) goto <D.23576>; else goto <D.23577>;
  <D.23576>:
  D.23578 = *start_root;
  if (D.23578 != 0B) goto <D.23579>; else goto <D.23580>;
  <D.23579>:
  D.23578 = *start_root;
  add_profile_gc_root (report, D.23578, 3, 0);
  <D.23580>:
  <D.23577>:
  desc = desc >> 1;
  start_root = start_root + 8;
  <D.20760>:
  if (desc != 0) goto <D.20759>; else goto <D.20761>;
  <D.20761>:
  return;
  <D.20762>:
  {
    gsize * bitmap_data;
    int bwords;
    void * * start_run;

    bitmap_data = sgen_get_complex_descriptor_bitmap (desc);
    D.23581 = *bitmap_data;
    D.23582 = (unsigned int) D.23581;
    D.23583 = D.23582 + 4294967295;
    bwords = (int) D.23583;
    start_run = start_root;
    bitmap_data = bitmap_data + 8;
    goto <D.20772>;
    <D.20771>:
    {
      gsize bmap;
      void * * objptr;

      bitmap_data.199 = bitmap_data;
      bitmap_data = bitmap_data.199 + 8;
      bmap = *bitmap_data.199;
      objptr = start_run;
      goto <D.20769>;
      <D.20768>:
      D.23585 = bmap & 1;
      if (D.23585 != 0) goto <D.23586>; else goto <D.23587>;
      <D.23586>:
      D.23588 = *objptr;
      if (D.23588 != 0B) goto <D.23589>; else goto <D.23590>;
      <D.23589>:
      D.23588 = *objptr;
      add_profile_gc_root (report, D.23588, 3, 0);
      <D.23590>:
      <D.23587>:
      bmap = bmap >> 1;
      objptr = objptr + 8;
      <D.20769>:
      if (bmap != 0) goto <D.20768>; else goto <D.20770>;
      <D.20770>:
      start_run = start_run + 512;
    }
    <D.20772>:
    bwords.200 = bwords;
    bwords = bwords.200 + -1;
    if (bwords.200 > 0) goto <D.20771>; else goto <D.20773>;
    <D.20773>:
    goto <D.20774>;
  }
  <D.20775>:
  {
    void (*MonoGCRootMarkFunc) (void *, void (*MonoGCMarkFunc) (void * *)) marker;

    marker = sgen_get_user_descriptor_func (desc);
    root_report = report;
    marker (start_root, single_arg_report_root);
    goto <D.20774>;
  }
  <D.20777>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-gc.c", 1821);
  <D.20778>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-gc.c", 1823);
  <D.20774>:
}


single_arg_report_root (void * * obj)
{
  void * D.23593;
  struct GCRootReport * root_report.201;

  D.23593 = *obj;
  if (D.23593 != 0B) goto <D.23594>; else goto <D.23595>;
  <D.23594>:
  root_report.201 = root_report;
  D.23593 = *obj;
  add_profile_gc_root (root_report.201, D.23593, 3, 0);
  <D.23595>:
}


report_finalizer_roots ()
{
  struct FinalizeReadyEntry * fin_ready_list.202;
  struct FinalizeReadyEntry * critical_fin_list.203;

  fin_ready_list.202 = fin_ready_list;
  report_finalizer_roots_list (fin_ready_list.202);
  critical_fin_list.203 = critical_fin_list;
  report_finalizer_roots_list (critical_fin_list.203);
}


report_finalizer_roots_list (struct FinalizeReadyEntry * list)
{
  void * D.23599;
  struct GCRootReport report;
  struct FinalizeReadyEntry * fin;

  try
    {
      report.count = 0;
      fin = list;
      goto <D.20743>;
      <D.20742>:
      D.23599 = fin->object;
      if (D.23599 == 0B) goto <D.23600>; else goto <D.23601>;
      <D.23600>:
      // predicted unlikely by continue predictor.
      goto <D.20741>;
      <D.23601>:
      D.23599 = fin->object;
      add_profile_gc_root (&report, D.23599, 1, 0);
      <D.20741>:
      fin = fin->next;
      <D.20743>:
      if (fin != 0B) goto <D.20742>; else goto <D.20744>;
      <D.20744>:
      notify_gc_roots (&report);
    }
  finally
    {
      report = {CLOBBER};
    }
}


join_workers ()
{
  int concurrent_collection_in_progress.204;
  int D.23606;
  int D.23607;
  _Bool D.23608;
  long int D.23609;
  long int D.23610;

  concurrent_collection_in_progress.204 = concurrent_collection_in_progress;
  if (concurrent_collection_in_progress.204 != 0) goto <D.23602>; else goto <D.23605>;
  <D.23605>:
  D.23606 = major_collector.is_parallel;
  if (D.23606 != 0) goto <D.23602>; else goto <D.23603>;
  <D.23602>:
  gray_queue_redirect (&gray_queue);
  sgen_workers_join ();
  <D.23603>:
  D.23607 = sgen_gray_object_queue_is_empty (&gray_queue);
  D.23608 = D.23607 == 0;
  D.23609 = (long int) D.23608;
  D.23610 = __builtin_expect (D.23609, 0);
  if (D.23610 != 0) goto <D.23611>; else goto <D.23612>;
  <D.23611>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3122, "sgen_gray_object_queue_is_empty (&gray_queue)");
  <D.23612>:
}


check_nursery_is_clean ()
{
  void * D.23613;
  int iftmp.205;
  long unsigned int D.23619;
  long unsigned int D.23620;
  long unsigned int D.23622;
  _Bool D.23624;
  long int D.23625;
  long int D.23626;
  long unsigned int D.23629;
  _Bool D.23630;
  long int D.23631;
  long int D.23632;
  unsigned int D.23635;
  unsigned int D.23636;
  unsigned int D.23637;
  long unsigned int D.23638;
  char * D.23639;
  char * start;
  char * end;
  char * cur;

  cur = sgen_get_nursery_start ();
  start = cur;
  end = sgen_get_nursery_end ();
  goto <D.21025>;
  <D.21026>:
  {
    size_t ss;
    size_t size;

    D.23613 = MEM[(void * *)cur];
    if (D.23613 == 0B) goto <D.23614>; else goto <D.23615>;
    <D.23614>:
    cur = cur + 8;
    // predicted unlikely by continue predictor.
    goto <D.21025>;
    <D.23615>:
    D.23619 = MEM[(mword *)cur];
    D.23620 = D.23619 & 1;
    if (D.23620 != 0) goto <D.23621>; else goto <D.23617>;
    <D.23621>:
    D.23619 = MEM[(mword *)cur];
    D.23622 = D.23619 & 18446744073709551612;
    if (D.23622 != 0) goto <D.23623>; else goto <D.23617>;
    <D.23623>:
    iftmp.205 = 1;
    goto <D.23618>;
    <D.23617>:
    iftmp.205 = 0;
    <D.23618>:
    D.23624 = iftmp.205 != 0;
    D.23625 = (long int) D.23624;
    D.23626 = __builtin_expect (D.23625, 0);
    if (D.23626 != 0) goto <D.23627>; else goto <D.23628>;
    <D.23627>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 2468, "!object_is_forwarded (cur)");
    <D.23628>:
    D.23619 = MEM[(mword *)cur];
    D.23629 = D.23619 & 2;
    D.23630 = D.23629 != 0;
    D.23631 = (long int) D.23630;
    D.23632 = __builtin_expect (D.23631, 0);
    if (D.23632 != 0) goto <D.23633>; else goto <D.23634>;
    <D.23633>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 2469, "!object_is_pinned (cur)");
    <D.23634>:
    D.23635 = sgen_safe_object_get_size (cur);
    ss = (size_t) D.23635;
    D.23636 = sgen_safe_object_get_size (cur);
    D.23637 = D.23636 + 7;
    D.23638 = (long unsigned int) D.23637;
    size = D.23638 & 4294967288;
    D.23639 = cur + size;
    verify_scan_starts (cur, D.23639);
    cur = cur + size;
  }
  <D.21025>:
  if (cur < end) goto <D.21026>; else goto <D.21027>;
  <D.21027>:
}


verify_scan_starts (char * start, char * end)
{
  struct GCMemSection * nursery_section.206;
  char * * D.23641;
  long unsigned int D.23642;
  long unsigned int D.23643;
  char * * D.23644;
  int gc_debug_level.207;
  _Bool D.23650;
  long int D.23651;
  long int D.23652;
  struct FILE * gc_debug_file.208;
  unsigned int D.23656;
  unsigned int i.209;
  int i;

  i = 0;
  goto <D.21003>;
  <D.21002>:
  {
    char * addr;

    nursery_section.206 = nursery_section;
    D.23641 = nursery_section.206->scan_starts;
    D.23642 = (long unsigned int) i;
    D.23643 = D.23642 * 8;
    D.23644 = D.23641 + D.23643;
    addr = *D.23644;
    if (addr > start) goto <D.23645>; else goto <D.23646>;
    <D.23645>:
    if (addr < end) goto <D.23647>; else goto <D.23648>;
    <D.23647>:
    gc_debug_level.207 = gc_debug_level;
    D.23650 = gc_debug_level.207 > 0;
    D.23651 = (long int) D.23650;
    D.23652 = __builtin_expect (D.23651, 0);
    if (D.23652 != 0) goto <D.23653>; else goto <D.23654>;
    <D.23653>:
    gc_debug_file.208 = gc_debug_file;
    fprintf (gc_debug_file.208, "NFC-BAD SCAN START [%d] %p for obj [%p %p]\n", i, addr, start, end);
    gc_debug_file.208 = gc_debug_file;
    fflush (gc_debug_file.208);
    <D.23654>:
    <D.23648>:
    <D.23646>:
  }
  i = i + 1;
  <D.21003>:
  nursery_section.206 = nursery_section;
  D.23656 = nursery_section.206->num_scan_start;
  i.209 = (unsigned int) i;
  if (D.23656 > i.209) goto <D.21002>; else goto <D.21004>;
  <D.21004>:
}


finish_gray_stack (int generation, struct GrayQueue * queue)
{
  char * iftmp.210;
  char * iftmp.211;
  int gc_debug_level.212;
  _Bool D.23667;
  long int D.23668;
  long int D.23669;
  struct FILE * gc_debug_file.213;
  const char * D.23673;
  int D.23674;
  int D.23677;
  const char * D.23690;
  long int D.23691;
  long int D.23692;
  int D.23693;
  int D.23694;
  _Bool D.23695;
  long int D.23696;
  long int D.23697;
  int D.23702;
  int D.23704;
  _Bool D.23705;
  long int D.23706;
  long int D.23707;
  gint64 atv;
  gint64 btv;
  int done_with_ephemerons;
  int ephemeron_rounds;
  void (*CopyOrMarkObjectFunc) (void * *, struct SgenGrayQueue *) copy_func;
  void (*ScanObjectFunc) (char *, struct SgenGrayQueue *) scan_func;
  struct ScanCopyContext ctx;
  char * start_addr;
  char * end_addr;

  try
    {
      ephemeron_rounds = 0;
      copy_func = current_object_ops.copy_or_mark_object;
      scan_func = current_object_ops.scan_object;
      ctx.scan_func = scan_func;
      ctx.copy_func = copy_func;
      ctx.queue = queue;
      if (generation == 0) goto <D.23659>; else goto <D.23660>;
      <D.23659>:
      iftmp.210 = sgen_get_nursery_start ();
      goto <D.23661>;
      <D.23660>:
      iftmp.210 = 0B;
      <D.23661>:
      start_addr = iftmp.210;
      if (generation == 0) goto <D.23663>; else goto <D.23664>;
      <D.23663>:
      iftmp.211 = sgen_get_nursery_end ();
      goto <D.23665>;
      <D.23664>:
      iftmp.211 = -1B;
      <D.23665>:
      end_addr = iftmp.211;
      sgen_drain_gray_stack (-1, ctx);
      atv = mono_100ns_ticks ();
      gc_debug_level.212 = gc_debug_level;
      D.23667 = gc_debug_level.212 > 1;
      D.23668 = (long int) D.23667;
      D.23669 = __builtin_expect (D.23668, 0);
      if (D.23669 != 0) goto <D.23670>; else goto <D.23671>;
      <D.23670>:
      gc_debug_file.213 = gc_debug_file;
      D.23673 = generation_name (generation);
      fprintf (gc_debug_file.213, "%s generation done\n", D.23673);
      gc_debug_file.213 = gc_debug_file;
      fflush (gc_debug_file.213);
      <D.23671>:
      D.23674 = sgen_need_bridge_processing ();
      if (D.23674 != 0) goto <D.23675>; else goto <D.23676>;
      <D.23675>:
      sgen_bridge_reset_data ();
      <D.23676>:
      done_with_ephemerons = 0;
      <D.20836>:
      done_with_ephemerons = mark_ephemerons_in_range (ctx);
      sgen_drain_gray_stack (-1, ctx);
      ephemeron_rounds = ephemeron_rounds + 1;
      if (done_with_ephemerons == 0) goto <D.20836>; else goto <D.20837>;
      <D.20837>:
      sgen_scan_togglerefs (start_addr, end_addr, ctx);
      D.23677 = sgen_need_bridge_processing ();
      if (D.23677 != 0) goto <D.23678>; else goto <D.23679>;
      <D.23678>:
      sgen_drain_gray_stack (-1, ctx);
      sgen_collect_bridge_objects (generation, ctx);
      if (generation == 1) goto <D.23680>; else goto <D.23681>;
      <D.23680>:
      sgen_collect_bridge_objects (0, ctx);
      <D.23681>:
      sgen_bridge_processing_stw_step ();
      <D.23679>:
      sgen_drain_gray_stack (-1, ctx);
      sgen_null_link_in_range (generation, 1, ctx);
      if (generation == 1) goto <D.23682>; else goto <D.23683>;
      <D.23682>:
      sgen_null_link_in_range (0, 1, ctx);
      <D.23683>:
      sgen_finalize_in_range (generation, ctx);
      if (generation == 1) goto <D.23684>; else goto <D.23685>;
      <D.23684>:
      sgen_finalize_in_range (0, ctx);
      <D.23685>:
      if (0 != 0) goto <D.23686>; else goto <D.23687>;
      <D.23686>:
      gc_debug_file.213 = gc_debug_file;
      fprintf (gc_debug_file.213, "Precise scan of gray area post fin\n");
      gc_debug_file.213 = gc_debug_file;
      fflush (gc_debug_file.213);
      <D.23687>:
      sgen_drain_gray_stack (-1, ctx);
      done_with_ephemerons = 0;
      <D.20838>:
      done_with_ephemerons = mark_ephemerons_in_range (ctx);
      sgen_drain_gray_stack (-1, ctx);
      ephemeron_rounds = ephemeron_rounds + 1;
      if (done_with_ephemerons == 0) goto <D.20838>; else goto <D.20839>;
      <D.20839>:
      clear_unreachable_ephemerons (ctx);
      btv = mono_100ns_ticks ();
      gc_debug_level.212 = gc_debug_level;
      D.23667 = gc_debug_level.212 > 1;
      D.23668 = (long int) D.23667;
      D.23669 = __builtin_expect (D.23668, 0);
      if (D.23669 != 0) goto <D.23688>; else goto <D.23689>;
      <D.23688>:
      gc_debug_file.213 = gc_debug_file;
      D.23690 = generation_name (generation);
      D.23691 = btv - atv;
      D.23692 = D.23691 / 10;
      D.23693 = (int) D.23692;
      fprintf (gc_debug_file.213, "Finalize queue handling scan for %s generation: %d usecs %d ephemeron rounds\n", D.23690, D.23693, ephemeron_rounds);
      gc_debug_file.213 = gc_debug_file;
      fflush (gc_debug_file.213);
      <D.23689>:
      D.23694 = sgen_gray_object_queue_is_empty (queue);
      D.23695 = D.23694 == 0;
      D.23696 = (long int) D.23695;
      D.23697 = __builtin_expect (D.23696, 0);
      if (D.23697 != 0) goto <D.23698>; else goto <D.23699>;
      <D.23698>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 2014, "sgen_gray_object_queue_is_empty (queue)");
      <D.23699>:
      <D.20841>:
      sgen_null_link_in_range (generation, 0, ctx);
      if (generation == 1) goto <D.23700>; else goto <D.23701>;
      <D.23700>:
      sgen_null_link_in_range (0, 0, ctx);
      <D.23701>:
      D.23702 = sgen_gray_object_queue_is_empty (queue);
      if (D.23702 != 0) goto <D.20840>; else goto <D.23703>;
      <D.23703>:
      sgen_drain_gray_stack (-1, ctx);
      goto <D.20841>;
      <D.20840>:
      D.23704 = sgen_gray_object_queue_is_empty (queue);
      D.23705 = D.23704 == 0;
      D.23706 = (long int) D.23705;
      D.23707 = __builtin_expect (D.23706, 0);
      if (D.23707 != 0) goto <D.23708>; else goto <D.23709>;
      <D.23708>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 2024, "sgen_gray_object_queue_is_empty (queue)");
      <D.23709>:
    }
  finally
    {
      ctx = {CLOBBER};
    }
}


mark_ephemerons_in_range (struct ScanCopyContext ctx)
{
  char * object.214;
  struct FILE * gc_debug_file.215;
  char * object.216;
  int D.23715;
  unsigned int D.23720;
  long unsigned int D.23721;
  long unsigned int D.23722;
  long unsigned int D.23723;
  long unsigned int D.23724;
  struct MonoVTable * D.23725;
  struct MonoDomain * D.23726;
  long int cur.217;
  char * D.23733;
  long int D.23734;
  long int D.23735;
  long int D.23736;
  const char * iftmp.218;
  int D.23738;
  void * D.23742;
  const char * iftmp.219;
  int D.23747;
  int D.23749;
  void * * D.23752;
  int D.23755;
  void * * D.23758;
  int D.23761;
  void (*CopyOrMarkObjectFunc) (void * *, struct SgenGrayQueue *) copy_func;
  struct GrayQueue * queue;
  int nothing_marked;
  struct EphemeronLinkNode * current;
  struct MonoArray * array;
  struct Ephemeron * cur;
  struct Ephemeron * array_end;
  char * tombstone;

  copy_func = ctx.copy_func;
  queue = ctx.queue;
  nothing_marked = 1;
  current = ephemeron_list;
  current = ephemeron_list;
  goto <D.21226>;
  <D.21225>:
  {
    char * object;

    try
      {
        object.214 = current->array;
        object = object.214;
        if (0 != 0) goto <D.23711>; else goto <D.23712>;
        <D.23711>:
        gc_debug_file.215 = gc_debug_file;
        object.216 = object;
        fprintf (gc_debug_file.215, "Ephemeron array at %p\n", object.216);
        gc_debug_file.215 = gc_debug_file;
        fflush (gc_debug_file.215);
        <D.23712>:
        object.216 = object;
        D.23715 = sgen_is_object_alive_for_current_gen (object.216);
        if (D.23715 == 0) goto <D.23716>; else goto <D.23717>;
        <D.23716>:
        if (0 != 0) goto <D.23718>; else goto <D.23719>;
        <D.23718>:
        gc_debug_file.215 = gc_debug_file;
        fprintf (gc_debug_file.215, "\tnot reachable\n");
        gc_debug_file.215 = gc_debug_file;
        fflush (gc_debug_file.215);
        <D.23719>:
        // predicted unlikely by continue predictor.
        goto <D.21218>;
        <D.23717>:
        copy_func (&object, queue);
        array = object;
        cur = mono_array_addr_with_size (array, 16, 0);
        D.23720 = array->max_length;
        D.23721 = (long unsigned int) D.23720;
        D.23722 = D.23721 * 16;
        array_end = cur + D.23722;
        object.216 = object;
        D.23723 = MEM[(mword *)object.216];
        D.23724 = D.23723 & 18446744073709551612;
        D.23725 = (struct MonoVTable *) D.23724;
        D.23726 = D.23725->domain;
        tombstone = D.23726->ephemeron_tombstone;
        goto <D.21223>;
        <D.21222>:
        {
          char * key;

          key = cur->key;
          if (key == 0B) goto <D.23727>; else goto <D.23729>;
          <D.23729>:
          if (key == tombstone) goto <D.23727>; else goto <D.23728>;
          <D.23727>:
          // predicted unlikely by continue predictor.
          goto <D.21220>;
          <D.23728>:
          if (0 != 0) goto <D.23730>; else goto <D.23731>;
          <D.23730>:
          gc_debug_file.215 = gc_debug_file;
          cur.217 = (long int) cur;
          D.23733 = mono_array_addr_with_size (array, 16, 0);
          D.23734 = (long int) D.23733;
          D.23735 = cur.217 - D.23734;
          D.23736 = D.23735 /[ex] 16;
          D.23738 = sgen_is_object_alive_for_current_gen (key);
          if (D.23738 != 0) goto <D.23739>; else goto <D.23740>;
          <D.23739>:
          iftmp.218 = "reachable";
          goto <D.23741>;
          <D.23740>:
          iftmp.218 = "unreachable";
          <D.23741>:
          D.23742 = cur->value;
          D.23742 = cur->value;
          if (D.23742 != 0B) goto <D.23746>; else goto <D.23744>;
          <D.23746>:
          D.23742 = cur->value;
          D.23747 = sgen_is_object_alive_for_current_gen (D.23742);
          if (D.23747 != 0) goto <D.23748>; else goto <D.23744>;
          <D.23748>:
          iftmp.219 = "reachable";
          goto <D.23745>;
          <D.23744>:
          iftmp.219 = "unreachable";
          <D.23745>:
          fprintf (gc_debug_file.215, "[%td] key %p (%s) value %p (%s)\n", D.23736, key, iftmp.218, D.23742, iftmp.219);
          gc_debug_file.215 = gc_debug_file;
          fflush (gc_debug_file.215);
          <D.23731>:
          D.23749 = sgen_is_object_alive_for_current_gen (key);
          if (D.23749 != 0) goto <D.23750>; else goto <D.23751>;
          <D.23750>:
          {
            char * value;

            value = cur->value;
            D.23752 = &cur->key;
            copy_func (D.23752, queue);
            if (value != 0B) goto <D.23753>; else goto <D.23754>;
            <D.23753>:
            D.23755 = sgen_is_object_alive_for_current_gen (value);
            if (D.23755 == 0) goto <D.23756>; else goto <D.23757>;
            <D.23756>:
            nothing_marked = 0;
            <D.23757>:
            D.23758 = &cur->value;
            copy_func (D.23758, queue);
            <D.23754>:
          }
          <D.23751>:
        }
        <D.21220>:
        cur = cur + 16;
        <D.21223>:
        if (cur < array_end) goto <D.21222>; else goto <D.21224>;
        <D.21224>:
      }
    finally
      {
        object = {CLOBBER};
      }
  }
  <D.21218>:
  current = current->next;
  <D.21226>:
  if (current != 0B) goto <D.21225>; else goto <D.21227>;
  <D.21227>:
  if (0 != 0) goto <D.23759>; else goto <D.23760>;
  <D.23759>:
  gc_debug_file.215 = gc_debug_file;
  fprintf (gc_debug_file.215, "Ephemeron run finished. Is it done %d\n", nothing_marked);
  gc_debug_file.215 = gc_debug_file;
  fflush (gc_debug_file.215);
  <D.23760>:
  D.23761 = nothing_marked;
  return D.23761;
}


sgen_is_object_alive_for_current_gen (char * object)
{
  int D.23765;
  int D.23768;
  int current_collection_generation.220;

  D.23765 = sgen_ptr_in_nursery (object);
  if (D.23765 != 0) goto <D.23766>; else goto <D.23767>;
  <D.23766>:
  D.23768 = sgen_nursery_is_object_alive (object);
  return D.23768;
  <D.23767>:
  current_collection_generation.220 = current_collection_generation;
  if (current_collection_generation.220 == 0) goto <D.23770>; else goto <D.23771>;
  <D.23770>:
  D.23768 = 1;
  return D.23768;
  <D.23771>:
  D.23768 = sgen_major_is_object_alive (object);
  return D.23768;
}


sgen_nursery_is_object_alive (char * obj)
{
  int D.23773;
  _Bool D.23774;
  long int D.23775;
  long int D.23776;
  int D.23779;
  gboolean D.23782;
  long unsigned int D.23785;
  long unsigned int D.23786;
  long unsigned int D.23788;
  long unsigned int D.23790;

  D.23773 = sgen_ptr_in_nursery (obj);
  D.23774 = D.23773 == 0;
  D.23775 = (long int) D.23774;
  D.23776 = __builtin_expect (D.23775, 0);
  if (D.23776 != 0) goto <D.23777>; else goto <D.23778>;
  <D.23777>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "../../mono/metadata/sgen-gc.h", 576, "sgen_ptr_in_nursery (obj)");
  <D.23778>:
  D.23779 = sgen_nursery_is_to_space (obj);
  if (D.23779 != 0) goto <D.23780>; else goto <D.23781>;
  <D.23780>:
  D.23782 = 1;
  return D.23782;
  <D.23781>:
  D.23785 = MEM[(mword *)obj];
  D.23786 = D.23785 & 2;
  if (D.23786 != 0) goto <D.23783>; else goto <D.23787>;
  <D.23787>:
  D.23785 = MEM[(mword *)obj];
  D.23788 = D.23785 & 1;
  if (D.23788 != 0) goto <D.23789>; else goto <D.23784>;
  <D.23789>:
  D.23785 = MEM[(mword *)obj];
  D.23790 = D.23785 & 18446744073709551612;
  if (D.23790 != 0) goto <D.23783>; else goto <D.23784>;
  <D.23783>:
  D.23782 = 1;
  return D.23782;
  <D.23784>:
  D.23782 = 0;
  return D.23782;
}


sgen_nursery_is_to_space (char * object)
{
  long int object.221;
  char * sgen_nursery_start.222;
  long int sgen_nursery_start.223;
  long int D.23795;
  long int D.23796;
  int D.23797;
  _Bool D.23798;
  long int D.23799;
  long int D.23800;
  char * D.23803;
  char * D.23804;
  int sgen_space_bitmap_size.224;
  _Bool D.23806;
  long int D.23807;
  long int D.23808;
  gboolean D.23811;
  char * sgen_space_bitmap.225;
  sizetype D.23813;
  char * D.23814;
  char D.23815;
  int D.23816;
  int D.23817;
  int D.23818;
  _Bool D.23819;
  int idx;
  int byte;
  int bit;

  object.221 = (long int) object;
  sgen_nursery_start.222 = sgen_nursery_start;
  sgen_nursery_start.223 = (long int) sgen_nursery_start.222;
  D.23795 = object.221 - sgen_nursery_start.223;
  D.23796 = D.23795 >> 9;
  idx = (int) D.23796;
  byte = idx / 8;
  bit = idx & 7;
  D.23797 = sgen_ptr_in_nursery (object);
  D.23798 = D.23797 == 0;
  D.23799 = (long int) D.23798;
  D.23800 = __builtin_expect (D.23799, 0);
  if (D.23800 != 0) goto <D.23801>; else goto <D.23802>;
  <D.23801>:
  D.23803 = sgen_get_nursery_start ();
  D.23804 = sgen_get_nursery_end ();
  monoeg_g_log (0B, 4, "object %p is not in nursery [%p - %p]", object, D.23803, D.23804);
  <D.17171>:
  goto <D.17171>;
  <D.23802>:
  sgen_space_bitmap_size.224 = sgen_space_bitmap_size;
  D.23806 = byte >= sgen_space_bitmap_size.224;
  D.23807 = (long int) D.23806;
  D.23808 = __builtin_expect (D.23807, 0);
  if (D.23808 != 0) goto <D.23809>; else goto <D.23810>;
  <D.23809>:
  sgen_space_bitmap_size.224 = sgen_space_bitmap_size;
  monoeg_g_log (0B, 4, "byte index %d out of range", byte, sgen_space_bitmap_size.224);
  <D.17172>:
  goto <D.17172>;
  <D.23810>:
  sgen_space_bitmap.225 = sgen_space_bitmap;
  D.23813 = (sizetype) byte;
  D.23814 = sgen_space_bitmap.225 + D.23813;
  D.23815 = *D.23814;
  D.23816 = (int) D.23815;
  D.23817 = D.23816 >> bit;
  D.23818 = D.23817 & 1;
  D.23819 = D.23818 != 0;
  D.23811 = (gboolean) D.23819;
  return D.23811;
}


sgen_major_is_object_alive (void * object)
{
  long unsigned int D.23823;
  long unsigned int D.23824;
  long unsigned int D.23826;
  long unsigned int D.23828;
  gboolean D.23829;
  unsigned int D.23830;
  unsigned int D.23831;
  long unsigned int D.23832;
  gboolean (*<T2ddf>) (char *) D.23835;
  mword objsize;

  D.23823 = MEM[(mword *)object];
  D.23824 = D.23823 & 2;
  if (D.23824 != 0) goto <D.23821>; else goto <D.23825>;
  <D.23825>:
  D.23823 = MEM[(mword *)object];
  D.23826 = D.23823 & 1;
  if (D.23826 != 0) goto <D.23827>; else goto <D.23822>;
  <D.23827>:
  D.23823 = MEM[(mword *)object];
  D.23828 = D.23823 & 18446744073709551612;
  if (D.23828 != 0) goto <D.23821>; else goto <D.23822>;
  <D.23821>:
  D.23829 = 1;
  return D.23829;
  <D.23822>:
  D.23830 = sgen_safe_object_get_size (object);
  D.23831 = D.23830 + 7;
  D.23832 = (long unsigned int) D.23831;
  objsize = D.23832 & 4294967288;
  if (objsize > 8000) goto <D.23833>; else goto <D.23834>;
  <D.23833>:
  D.23829 = sgen_los_object_is_pinned (object);
  return D.23829;
  <D.23834>:
  D.23835 = major_collector.is_object_live;
  D.23829 = D.23835 (object);
  return D.23829;
}


clear_unreachable_ephemerons (struct ScanCopyContext ctx)
{
  char * object.226;
  char * object.227;
  int D.23839;
  struct FILE * gc_debug_file.228;
  struct EphemeronLinkNode * D.23847;
  unsigned int D.23851;
  long unsigned int D.23852;
  long unsigned int D.23853;
  long unsigned int D.23854;
  long unsigned int D.23855;
  struct MonoVTable * D.23856;
  struct MonoDomain * D.23857;
  long int cur.229;
  char * D.23864;
  long int D.23865;
  long int D.23866;
  long int D.23867;
  const char * iftmp.230;
  int D.23869;
  void * D.23873;
  const char * iftmp.231;
  int D.23878;
  int D.23880;
  void (*CopyOrMarkObjectFunc) (void * *, struct SgenGrayQueue *) copy_func;
  struct GrayQueue * queue;
  struct EphemeronLinkNode * current;
  struct EphemeronLinkNode * prev;
  struct MonoArray * array;
  struct Ephemeron * cur;
  struct Ephemeron * array_end;
  char * tombstone;

  copy_func = ctx.copy_func;
  queue = ctx.queue;
  current = ephemeron_list;
  prev = 0B;
  goto <D.21198>;
  <D.21204>:
  {
    char * object;

    try
      {
        object.226 = current->array;
        object = object.226;
        object.227 = object;
        D.23839 = sgen_is_object_alive_for_current_gen (object.227);
        if (D.23839 == 0) goto <D.23840>; else goto <D.23841>;
        <D.23840>:
        {
          struct EphemeronLinkNode * tmp;

          tmp = current;
          if (0 != 0) goto <D.23842>; else goto <D.23843>;
          <D.23842>:
          gc_debug_file.228 = gc_debug_file;
          object.227 = object;
          fprintf (gc_debug_file.228, "Dead Ephemeron array at %p\n", object.227);
          gc_debug_file.228 = gc_debug_file;
          fflush (gc_debug_file.228);
          <D.23843>:
          if (prev != 0B) goto <D.23845>; else goto <D.23846>;
          <D.23845>:
          D.23847 = current->next;
          prev->next = D.23847;
          goto <D.23848>;
          <D.23846>:
          D.23847 = current->next;
          ephemeron_list = D.23847;
          <D.23848>:
          current = current->next;
          sgen_free_internal (tmp, 18);
          // predicted unlikely by continue predictor.
          goto <D.21198>;
        }
        <D.23841>:
        copy_func (&object, queue);
        object.227 = object;
        current->array = object.227;
        if (0 != 0) goto <D.23849>; else goto <D.23850>;
        <D.23849>:
        gc_debug_file.228 = gc_debug_file;
        object.227 = object;
        fprintf (gc_debug_file.228, "Clearing unreachable entries for ephemeron array at %p\n", object.227);
        gc_debug_file.228 = gc_debug_file;
        fflush (gc_debug_file.228);
        <D.23850>:
        array = object;
        cur = mono_array_addr_with_size (array, 16, 0);
        D.23851 = array->max_length;
        D.23852 = (long unsigned int) D.23851;
        D.23853 = D.23852 * 16;
        array_end = cur + D.23853;
        object.227 = object;
        D.23854 = MEM[(mword *)object.227];
        D.23855 = D.23854 & 18446744073709551612;
        D.23856 = (struct MonoVTable *) D.23855;
        D.23857 = D.23856->domain;
        tombstone = D.23857->ephemeron_tombstone;
        goto <D.21202>;
        <D.21201>:
        {
          char * key;

          key = cur->key;
          if (key == 0B) goto <D.23858>; else goto <D.23860>;
          <D.23860>:
          if (key == tombstone) goto <D.23858>; else goto <D.23859>;
          <D.23858>:
          // predicted unlikely by continue predictor.
          goto <D.21200>;
          <D.23859>:
          if (0 != 0) goto <D.23861>; else goto <D.23862>;
          <D.23861>:
          gc_debug_file.228 = gc_debug_file;
          cur.229 = (long int) cur;
          D.23864 = mono_array_addr_with_size (array, 16, 0);
          D.23865 = (long int) D.23864;
          D.23866 = cur.229 - D.23865;
          D.23867 = D.23866 /[ex] 16;
          D.23869 = sgen_is_object_alive_for_current_gen (key);
          if (D.23869 != 0) goto <D.23870>; else goto <D.23871>;
          <D.23870>:
          iftmp.230 = "reachable";
          goto <D.23872>;
          <D.23871>:
          iftmp.230 = "unreachable";
          <D.23872>:
          D.23873 = cur->value;
          D.23873 = cur->value;
          if (D.23873 != 0B) goto <D.23877>; else goto <D.23875>;
          <D.23877>:
          D.23873 = cur->value;
          D.23878 = sgen_is_object_alive_for_current_gen (D.23873);
          if (D.23878 != 0) goto <D.23879>; else goto <D.23875>;
          <D.23879>:
          iftmp.231 = "reachable";
          goto <D.23876>;
          <D.23875>:
          iftmp.231 = "unreachable";
          <D.23876>:
          fprintf (gc_debug_file.228, "[%td] key %p (%s) value %p (%s)\n", D.23867, key, iftmp.230, D.23873, iftmp.231);
          gc_debug_file.228 = gc_debug_file;
          fflush (gc_debug_file.228);
          <D.23862>:
          D.23880 = sgen_is_object_alive_for_current_gen (key);
          if (D.23880 == 0) goto <D.23881>; else goto <D.23882>;
          <D.23881>:
          cur->key = tombstone;
          cur->value = 0B;
          // predicted unlikely by continue predictor.
          goto <D.21200>;
          <D.23882>:
        }
        <D.21200>:
        cur = cur + 16;
        <D.21202>:
        if (cur < array_end) goto <D.21201>; else goto <D.21203>;
        <D.21203>:
        prev = current;
        current = current->next;
      }
    finally
      {
        object = {CLOBBER};
      }
  }
  <D.21198>:
  if (current != 0B) goto <D.21204>; else goto <D.21205>;
  <D.21205>:
}


reset_heap_boundaries ()
{
  lowest_heap_address = 18446744073709551615;
  highest_heap_address = 0;
}


__attribute__((always_inline))
sgen_get_nursery_end ()
{
  char * D.23885;

  D.23885 = sgen_nursery_end;
  return D.23885;
}


dump_heap (const char * type, int num, const char * reason)
{
  struct FILE * heap_dump_file.232;
  long int D.23890;
  long unsigned int D.23891;
  long unsigned int D.23892;
  struct MonoObject * D.23893;
  struct GCMemSection * nursery_section.233;
  void (*<T2e51>) (struct FILE *) D.23895;
  char[0:] * D.23896;
  struct ObjectList * list;
  struct LOSObject * bigobj;

  heap_dump_file.232 = heap_dump_file;
  fprintf (heap_dump_file.232, "<collection type=\"%s\" num=\"%d\"", type, num);
  if (reason != 0B) goto <D.23888>; else goto <D.23889>;
  <D.23888>:
  heap_dump_file.232 = heap_dump_file;
  fprintf (heap_dump_file.232, " reason=\"%s\"", reason);
  <D.23889>:
  heap_dump_file.232 = heap_dump_file;
  fprintf (heap_dump_file.232, ">\n");
  heap_dump_file.232 = heap_dump_file;
  D.23890 = mono_mempool_get_bytes_allocated ();
  fprintf (heap_dump_file.232, "<other-mem-usage type=\"mempools\" size=\"%ld\"/>\n", D.23890);
  heap_dump_file.232 = heap_dump_file;
  sgen_dump_internal_mem_usage (heap_dump_file.232);
  heap_dump_file.232 = heap_dump_file;
  D.23891 = sgen_pin_stats_get_pinned_byte_count (0);
  fprintf (heap_dump_file.232, "<pinned type=\"stack\" bytes=\"%zu\"/>\n", D.23891);
  heap_dump_file.232 = heap_dump_file;
  D.23892 = sgen_pin_stats_get_pinned_byte_count (2);
  fprintf (heap_dump_file.232, "<pinned type=\"other\" bytes=\"%zu\"/>\n", D.23892);
  heap_dump_file.232 = heap_dump_file;
  fprintf (heap_dump_file.232, "<pinned-objects>\n");
  list = sgen_pin_stats_get_object_list ();
  goto <D.20912>;
  <D.20911>:
  D.23893 = list->obj;
  dump_object (D.23893, 1);
  list = list->next;
  <D.20912>:
  if (list != 0B) goto <D.20911>; else goto <D.20913>;
  <D.20913>:
  heap_dump_file.232 = heap_dump_file;
  fprintf (heap_dump_file.232, "</pinned-objects>\n");
  nursery_section.233 = nursery_section;
  sgen_dump_section (nursery_section.233, "nursery");
  D.23895 = major_collector.dump_heap;
  heap_dump_file.232 = heap_dump_file;
  D.23895 (heap_dump_file.232);
  heap_dump_file.232 = heap_dump_file;
  fprintf (heap_dump_file.232, "<los>\n");
  bigobj = los_object_list;
  goto <D.20915>;
  <D.20914>:
  D.23896 = &bigobj->data;
  dump_object (D.23896, 0);
  bigobj = bigobj->next;
  <D.20915>:
  if (bigobj != 0B) goto <D.20914>; else goto <D.20916>;
  <D.20916>:
  heap_dump_file.232 = heap_dump_file;
  fprintf (heap_dump_file.232, "</los>\n");
  heap_dump_file.232 = heap_dump_file;
  fprintf (heap_dump_file.232, "</collection>\n");
}


dump_object (struct MonoObject * obj, gboolean dump_location)
{
  struct MonoVTable * D.23897;
  const char * D.23898;
  sizetype D.23899;
  const char * D.23900;
  char D.23901;
  int D.23902;
  char * D.23903;
  int j.234;
  unsigned int j.235;
  _Bool D.23909;
  long int D.23910;
  long int D.23911;
  struct FILE * heap_dump_file.236;
  const char * D.23915;
  unsigned int D.23916;
  int D.23919;
  unsigned int D.23923;
  static char class_name[1024];
  struct MonoClass * class;
  int i;
  int j;

  D.23897 = obj->vtable;
  class = D.23897->klass;
  j = 0;
  i = j;
  goto <D.20901>;
  <D.20900>:
  D.23898 = class->name;
  D.23899 = (sizetype) i;
  D.23900 = D.23898 + D.23899;
  D.23901 = *D.23900;
  D.23902 = (int) D.23901;
  D.23903 = __builtin_strchr ("<>\"", D.23902);
  if (D.23903 == 0B) goto <D.23904>; else goto <D.23905>;
  <D.23904>:
  j.234 = j;
  j = j.234 + 1;
  D.23898 = class->name;
  D.23899 = (sizetype) i;
  D.23900 = D.23898 + D.23899;
  D.23901 = *D.23900;
  class_name[j.234] = D.23901;
  <D.23905>:
  i = i + 1;
  <D.20901>:
  D.23898 = class->name;
  D.23899 = (sizetype) i;
  D.23900 = D.23898 + D.23899;
  D.23901 = *D.23900;
  if (D.23901 != 0) goto <D.23907>; else goto <D.20902>;
  <D.23907>:
  j.235 = (unsigned int) j;
  if (j.235 <= 1022) goto <D.20900>; else goto <D.20902>;
  <D.20902>:
  j.235 = (unsigned int) j;
  D.23909 = j.235 > 1023;
  D.23910 = (long int) D.23909;
  D.23911 = __builtin_expect (D.23910, 0);
  if (D.23911 != 0) goto <D.23912>; else goto <D.23913>;
  <D.23912>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 2132, "j < sizeof (class_name)");
  <D.23913>:
  class_name[j] = 0;
  heap_dump_file.236 = heap_dump_file;
  D.23915 = class->name_space;
  D.23916 = sgen_safe_object_get_size (obj);
  fprintf (heap_dump_file.236, "<object class=\"%s.%s\" size=\"%d\"", D.23915, &class_name, D.23916);
  if (dump_location != 0) goto <D.23917>; else goto <D.23918>;
  <D.23917>:
  {
    const char * location;

    D.23919 = sgen_ptr_in_nursery (obj);
    if (D.23919 != 0) goto <D.23920>; else goto <D.23921>;
    <D.23920>:
    location = "nursery";
    goto <D.23922>;
    <D.23921>:
    D.23923 = sgen_safe_object_get_size (obj);
    if (D.23923 <= 8000) goto <D.23924>; else goto <D.23925>;
    <D.23924>:
    location = "major";
    goto <D.23926>;
    <D.23925>:
    location = "LOS";
    <D.23926>:
    <D.23922>:
    heap_dump_file.236 = heap_dump_file;
    fprintf (heap_dump_file.236, " location=\"%s\"", location);
  }
  <D.23918>:
  heap_dump_file.236 = heap_dump_file;
  fprintf (heap_dump_file.236, "/>\n");
}


check_scan_starts ()
{
  int do_scan_starts_check.237;
  struct GCMemSection * nursery_section.238;
  void (*<T869>) (void) D.23931;

  do_scan_starts_check.237 = do_scan_starts_check;
  if (do_scan_starts_check.237 == 0) goto <D.23928>; else goto <D.23929>;
  <D.23928>:
  return;
  <D.23929>:
  nursery_section.238 = nursery_section;
  sgen_check_section_scan_starts (nursery_section.238);
  D.23931 = major_collector.check_scan_starts;
  D.23931 ();
}


unpin_objects_from_queue (struct SgenGrayQueue * queue)
{
  struct GrayQueueSection * D.23933;
  int D.23937;
  _Bool D.23938;
  long int D.23939;
  long int D.23940;
  int D.23944;
  long unsigned int D.23946;
  long unsigned int D.23947;
  _Bool D.23948;
  long int D.23949;
  long int D.23950;
  long unsigned int D.23953;

  <D.20655>:
  {
    char * addr;

    D.23933 = queue->first;
    if (D.23933 == 0B) goto <D.23934>; else goto <D.23935>;
    <D.23934>:
    addr = 0B;
    goto <D.23936>;
    <D.23935>:
    D.23933 = queue->first;
    D.23937 = D.23933->end;
    D.23938 = D.23937 == 1;
    D.23939 = (long int) D.23938;
    D.23940 = __builtin_expect (D.23939, 0);
    if (D.23940 != 0) goto <D.23941>; else goto <D.23942>;
    <D.23941>:
    addr = sgen_gray_object_dequeue (queue);
    goto <D.23943>;
    <D.23942>:
    D.23933 = queue->first;
    D.23933 = queue->first;
    D.23937 = D.23933->end;
    D.23944 = D.23937 + -1;
    D.23933->end = D.23944;
    D.23937 = D.23933->end;
    addr = D.23933->objects[D.23937];
    <D.23943>:
    <D.23936>:
    if (addr == 0B) goto <D.20654>; else goto <D.23945>;
    <D.23945>:
    D.23946 = MEM[(mword *)addr];
    D.23947 = D.23946 & 2;
    D.23948 = D.23947 == 0;
    D.23949 = (long int) D.23948;
    D.23950 = __builtin_expect (D.23949, 0);
    if (D.23950 != 0) goto <D.23951>; else goto <D.23952>;
    <D.23951>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 1548, "SGEN_OBJECT_IS_PINNED (addr)");
    <D.23952>:
    D.23946 = MEM[(mword *)addr];
    D.23953 = D.23946 & 18446744073709551613;
    MEM[(mword *)addr] = D.23953;
  }
  goto <D.20655>;
  <D.20654>:
}


major_start_concurrent_collection (const char * reason)
{
  int disable_major_collections.239;
  long long int (*<T2e7f>) (void) D.23957;
  _Bool D.23958;
  long int D.23959;
  long int D.23960;
  long long int num_objects_marked;

  disable_major_collections.239 = disable_major_collections;
  if (disable_major_collections.239 != 0) goto <D.23955>; else goto <D.23956>;
  <D.23955>:
  return;
  <D.23956>:
  D.23957 = major_collector.get_and_reset_num_major_objects_marked;
  num_objects_marked = D.23957 ();
  D.23958 = num_objects_marked != 0;
  D.23959 = (long int) D.23958;
  D.23960 = __builtin_expect (D.23959, 0);
  if (D.23960 != 0) goto <D.23961>; else goto <D.23962>;
  <D.23961>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3326, "num_objects_marked == 0");
  <D.23962>:
  major_start_collection (1, 0B);
  gray_queue_redirect (&gray_queue);
  sgen_workers_wait_for_jobs ();
  D.23957 = major_collector.get_and_reset_num_major_objects_marked;
  num_objects_marked = D.23957 ();
  current_collection_generation = -1;
}


major_start_collection (gboolean concurrent, int * old_next_pin_slot)
{
  struct MonoPerfCounters * mono_perfcounters.240;
  unsigned int D.23965;
  unsigned int D.23966;
  struct SgenSectionGrayQueue * D.23967;
  int D.23968;
  _Bool D.23969;
  long int D.23970;
  long int D.23971;
  int D.23976;
  _Bool D.23977;
  long int D.23978;
  long int D.23979;
  int gc_debug_level.241;
  _Bool D.23984;
  long int D.23985;
  long int D.23986;
  struct FILE * gc_debug_file.242;
  int stat_major_gcs.243;
  int D.23991;
  int D.23992;
  int D.23993;
  void (*<T869>) (void) D.23994;

  current_collection_generation = 1;
  mono_perfcounters.240 = mono_perfcounters;
  D.23965 = mono_perfcounters.240->gc_collections1;
  D.23966 = D.23965 + 1;
  mono_perfcounters.240->gc_collections1 = D.23966;
  D.23967 = sgen_workers_get_distribute_section_gray_queue ();
  D.23968 = sgen_section_gray_queue_is_empty (D.23967);
  D.23969 = D.23968 == 0;
  D.23970 = (long int) D.23969;
  D.23971 = __builtin_expect (D.23970, 0);
  if (D.23971 != 0) goto <D.23972>; else goto <D.23973>;
  <D.23972>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3074, "sgen_section_gray_queue_is_empty (sgen_workers_get_distribute_section_gray_queue ())");
  <D.23973>:
  if (concurrent != 0) goto <D.23974>; else goto <D.23975>;
  <D.23974>:
  D.23976 = major_collector.is_concurrent;
  D.23977 = D.23976 == 0;
  D.23978 = (long int) D.23977;
  D.23979 = __builtin_expect (D.23978, 0);
  if (D.23979 != 0) goto <D.23980>; else goto <D.23981>;
  <D.23980>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3077, "major_collector.is_concurrent");
  <D.23981>:
  concurrent_collection_in_progress = 1;
  sgen_cement_concurrent_start ();
  current_object_ops = major_collector.major_concurrent_ops;
  goto <D.23982>;
  <D.23975>:
  current_object_ops = major_collector.major_ops;
  <D.23982>:
  reset_pinned_from_failed_allocation ();
  sgen_memgov_major_collection_start ();
  check_scan_starts ();
  degraded_mode = 0;
  gc_debug_level.241 = gc_debug_level;
  D.23984 = gc_debug_level.241 > 0;
  D.23985 = (long int) D.23984;
  D.23986 = __builtin_expect (D.23985, 0);
  if (D.23986 != 0) goto <D.23987>; else goto <D.23988>;
  <D.23987>:
  gc_debug_file.242 = gc_debug_file;
  stat_major_gcs.243 = stat_major_gcs;
  fprintf (gc_debug_file.242, "Start major collection %d\n", stat_major_gcs.243);
  gc_debug_file.242 = gc_debug_file;
  fflush (gc_debug_file.242);
  <D.23988>:
  stat_major_gcs.243 = stat_major_gcs;
  D.23991 = stat_major_gcs.243 + 1;
  stat_major_gcs = D.23991;
  D.23992 = gc_stats.major_gc_count;
  D.23993 = D.23992 + 1;
  gc_stats.major_gc_count = D.23993;
  D.23994 = major_collector.start_major_collection;
  if (D.23994 != 0B) goto <D.23995>; else goto <D.23996>;
  <D.23995>:
  D.23994 = major_collector.start_major_collection;
  D.23994 ();
  <D.23996>:
  major_copy_or_mark_from_roots (old_next_pin_slot, 0, 0);
}


reset_pinned_from_failed_allocation ()
{
  bytes_pinned_from_failed_allocation = 0;
}


collect_nursery (struct SgenGrayQueue * unpin_queue, gboolean finish_up_concurrent_mark)
{
  int disable_minor_collections.244;
  gboolean D.24000;
  struct MonoPerfCounters * mono_perfcounters.245;
  unsigned int D.24002;
  unsigned int D.24003;
  int D.24004;
  char * iftmp.246;
  char * D.24009;
  int gc_debug_level.247;
  _Bool D.24014;
  long int D.24015;
  long int D.24016;
  struct FILE * gc_debug_file.248;
  int stat_minor_gcs.249;
  char * D.24021;
  long int nursery_next.250;
  char * D.24023;
  long int D.24024;
  long int D.24025;
  int D.24026;
  char * D.24027;
  long int D.24028;
  long int D.24029;
  struct GCMemSection * nursery_section.251;
  long unsigned int D.24031;
  _Bool D.24032;
  long int D.24033;
  long int D.24034;
  long int D.24037;
  long int D.24038;
  int D.24039;
  long long int D.24040;
  long long int time_minor_pre_collection_fragment_clear.252;
  long long int D.24042;
  int xdomain_checks.253;
  void (*<T869>) (void) D.24046;
  int D.24047;
  int D.24048;
  int D.24049;
  char * D.24050;
  long int D.24051;
  long int D.24052;
  int D.24053;
  long long int D.24054;
  long long int time_minor_pinning.254;
  long long int D.24056;
  _Bool D.24057;
  long int D.24058;
  long int D.24059;
  int D.24062;
  int D.24065;
  int whole_heap_check_before_collection.255;
  int consistency_check_at_minor_collection.256;
  char * D.24072;
  long long int time_minor_scan_remsets.257;
  long long int D.24074;
  int D.24077;
  void (*<T2d48>) (char *, struct SgenGrayQueue *) D.24080;
  <unnamed type> D.24081;
  unsigned int D.24082;
  <unnamed type> D.24085;
  unsigned int D.24086;
  long long int time_minor_scan_pinned.258;
  long long int D.24090;
  void (*<T2d43>) (void * *, struct SgenGrayQueue *) D.24091;
  char * D.24092;
  char * D.24093;
  long long int time_minor_scan_registered_roots.259;
  long long int D.24095;
  char * D.24096;
  long long int time_minor_scan_thread_data.260;
  long long int D.24098;
  int iftmp.261;
  int D.24103;
  int D.24105;
  _Bool D.24106;
  long int D.24107;
  long int D.24108;
  int D.24113;
  int D.24115;
  int D.24116;
  _Bool D.24117;
  long int D.24118;
  long int D.24119;
  struct FinalizeReadyEntry * fin_ready_list.262;
  struct FinalizeReadyEntry * critical_fin_list.263;
  long long int time_minor_finish_gray_stack.264;
  long long int D.24125;
  long unsigned int objects_pinned.265;
  void * * D.24129;
  int D.24130;
  long long int time_minor_fragment_creation.266;
  long long int D.24134;
  void (*<T869>) (void) D.24139;
  long long int D.24140;
  long int D.24141;
  long int D.24142;
  int D.24143;
  long long int D.24144;
  long long int D.24145;
  struct FILE * heap_dump_file.267;
  int D.24149;
  int num_ready_finalizers.268;
  int D.24156;
  _Bool D.24157;
  long int D.24158;
  long int D.24159;
  void (*<T869>) (void) D.24162;
  _Bool D.24163;
  int check_nursery_objects_pinned.269;
  int D.24167;
  _Bool D.24170;
  int D.24171;
  gboolean needs_major;
  size_t max_garbage_amount;
  char * nursery_next;
  struct FinishRememberedSetScanJobData * frssjd;
  struct ScanFromRegisteredRootsJobData * scrrjd_normal;
  struct ScanFromRegisteredRootsJobData * scrrjd_wbarrier;
  struct ScanFinalizerEntriesJobData * sfejd_fin_ready;
  struct ScanFinalizerEntriesJobData * sfejd_critical_fin;
  struct ScanThreadDataJobData * stdjd;
  mword fragment_total;
  struct ScanCopyContext ctx;
  gint64 all_atv;
  gint64 all_btv;
  gint64 atv;
  gint64 btv;

  try
    {
      disable_minor_collections.244 = disable_minor_collections;
      if (disable_minor_collections.244 != 0) goto <D.23998>; else goto <D.23999>;
      <D.23998>:
      D.24000 = 1;
      return D.24000;
      <D.23999>:
      verify_nursery ();
      mono_perfcounters.245 = mono_perfcounters;
      D.24002 = mono_perfcounters.245->gc_collections0;
      D.24003 = D.24002 + 1;
      mono_perfcounters.245->gc_collections0 = D.24003;
      current_collection_generation = 0;
      D.24004 = sgen_collection_is_parallel ();
      if (D.24004 != 0) goto <D.24005>; else goto <D.24006>;
      <D.24005>:
      current_object_ops = sgen_minor_collector.parallel_ops;
      goto <D.24007>;
      <D.24006>:
      current_object_ops = sgen_minor_collector.serial_ops;
      <D.24007>:
      reset_pinned_from_failed_allocation ();
      check_scan_starts ();
      sgen_nursery_alloc_prepare_for_minor ();
      degraded_mode = 0;
      objects_pinned = 0;
      nursery_next = sgen_nursery_alloc_get_upper_alloc_bound ();
      D.24009 = sgen_get_nursery_end ();
      if (D.24009 >= nursery_next) goto <D.24010>; else goto <D.24011>;
      <D.24010>:
      iftmp.246 = sgen_get_nursery_end ();
      goto <D.24012>;
      <D.24011>:
      iftmp.246 = nursery_next;
      <D.24012>:
      nursery_next = iftmp.246;
      gc_debug_level.247 = gc_debug_level;
      D.24014 = gc_debug_level.247 > 0;
      D.24015 = (long int) D.24014;
      D.24016 = __builtin_expect (D.24015, 0);
      if (D.24016 != 0) goto <D.24017>; else goto <D.24018>;
      <D.24017>:
      gc_debug_file.248 = gc_debug_file;
      stat_minor_gcs.249 = stat_minor_gcs;
      D.24021 = sgen_get_nursery_start ();
      nursery_next.250 = (long int) nursery_next;
      D.24023 = sgen_get_nursery_start ();
      D.24024 = (long int) D.24023;
      D.24025 = nursery_next.250 - D.24024;
      D.24026 = (int) D.24025;
      fprintf (gc_debug_file.248, "Start nursery collection %d %p-%p, size: %d\n", stat_minor_gcs.249, D.24021, nursery_next, D.24026);
      gc_debug_file.248 = gc_debug_file;
      fflush (gc_debug_file.248);
      <D.24018>:
      nursery_next.250 = (long int) nursery_next;
      D.24027 = sgen_get_nursery_start ();
      D.24028 = (long int) D.24027;
      D.24029 = nursery_next.250 - D.24028;
      max_garbage_amount = (size_t) D.24029;
      nursery_section.251 = nursery_section;
      D.24031 = nursery_section.251->size;
      D.24032 = D.24031 < max_garbage_amount;
      D.24033 = (long int) D.24032;
      D.24034 = __builtin_expect (D.24033, 0);
      if (D.24034 != 0) goto <D.24035>; else goto <D.24036>;
      <D.24035>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 2551, "nursery_section->size >= max_garbage_amount");
      <D.24036>:
      all_atv = mono_100ns_ticks ();
      atv = all_atv;
      btv = mono_100ns_ticks ();
      D.24037 = btv - atv;
      D.24038 = D.24037 / 10;
      D.24039 = (int) D.24038;
      D.24040 = (long long int) D.24039;
      time_minor_pre_collection_fragment_clear.252 = time_minor_pre_collection_fragment_clear;
      D.24042 = D.24040 + time_minor_pre_collection_fragment_clear.252;
      time_minor_pre_collection_fragment_clear = D.24042;
      xdomain_checks.253 = xdomain_checks;
      if (xdomain_checks.253 != 0) goto <D.24044>; else goto <D.24045>;
      <D.24044>:
      sgen_clear_nursery_fragments ();
      check_for_xdomain_refs ();
      <D.24045>:
      nursery_section.251 = nursery_section;
      nursery_section.251->next_data = nursery_next;
      D.24046 = major_collector.start_nursery_collection;
      D.24046 ();
      sgen_memgov_minor_collection_start ();
      init_gray_queue ();
      stat_minor_gcs.249 = stat_minor_gcs;
      D.24047 = stat_minor_gcs.249 + 1;
      stat_minor_gcs = D.24047;
      D.24048 = gc_stats.minor_gc_count;
      D.24049 = D.24048 + 1;
      gc_stats.minor_gc_count = D.24049;
      sgen_process_fin_stage_entries ();
      sgen_process_dislink_stage_entries ();
      sgen_init_pinning ();
      mono_profiler_gc_event (1, 0);
      D.24050 = sgen_get_nursery_start ();
      pin_from_roots (D.24050, nursery_next, &gray_queue);
      sgen_cement_iterate (pin_stage_object_callback, 0B);
      sgen_optimize_pin_queue (0);
      nursery_section.251 = nursery_section;
      sgen_pinning_setup_section (nursery_section.251);
      ctx.scan_func = 0B;
      ctx.copy_func = 0B;
      ctx.queue = &gray_queue;
      nursery_section.251 = nursery_section;
      sgen_pin_objects_in_section (nursery_section.251, ctx);
      nursery_section.251 = nursery_section;
      sgen_pinning_trim_queue_to_section (nursery_section.251);
      atv = mono_100ns_ticks ();
      D.24051 = atv - btv;
      D.24052 = D.24051 / 10;
      D.24053 = (int) D.24052;
      D.24054 = (long long int) D.24053;
      time_minor_pinning.254 = time_minor_pinning;
      D.24056 = D.24054 + time_minor_pinning.254;
      time_minor_pinning = D.24056;
      gc_debug_level.247 = gc_debug_level;
      D.24057 = gc_debug_level.247 > 1;
      D.24058 = (long int) D.24057;
      D.24059 = __builtin_expect (D.24058, 0);
      if (D.24059 != 0) goto <D.24060>; else goto <D.24061>;
      <D.24060>:
      gc_debug_file.248 = gc_debug_file;
      D.24062 = sgen_get_pinned_count ();
      D.24051 = atv - btv;
      D.24052 = D.24051 / 10;
      D.24053 = (int) D.24052;
      fprintf (gc_debug_file.248, "Finding pinned pointers: %d in %d usecs\n", D.24062, D.24053);
      gc_debug_file.248 = gc_debug_file;
      fflush (gc_debug_file.248);
      <D.24061>:
      if (0 != 0) goto <D.24063>; else goto <D.24064>;
      <D.24063>:
      gc_debug_file.248 = gc_debug_file;
      D.24065 = sgen_get_pinned_count ();
      fprintf (gc_debug_file.248, "Start scan with %d pinned objects\n", D.24065);
      gc_debug_file.248 = gc_debug_file;
      fflush (gc_debug_file.248);
      <D.24064>:
      whole_heap_check_before_collection.255 = whole_heap_check_before_collection;
      if (whole_heap_check_before_collection.255 != 0) goto <D.24067>; else goto <D.24068>;
      <D.24067>:
      sgen_clear_nursery_fragments ();
      sgen_check_whole_heap (finish_up_concurrent_mark);
      <D.24068>:
      consistency_check_at_minor_collection.256 = consistency_check_at_minor_collection;
      if (consistency_check_at_minor_collection.256 != 0) goto <D.24070>; else goto <D.24071>;
      <D.24070>:
      sgen_check_consistency ();
      <D.24071>:
      sgen_workers_start_all_workers ();
      sgen_workers_start_marking ();
      frssjd = sgen_alloc_internal_dynamic (16, 20, 1);
      D.24072 = sgen_get_nursery_start ();
      frssjd->heap_start = D.24072;
      frssjd->heap_end = nursery_next;
      sgen_workers_enqueue_job (job_finish_remembered_set_scan, frssjd);
      btv = mono_100ns_ticks ();
      D.24037 = btv - atv;
      D.24038 = D.24037 / 10;
      D.24039 = (int) D.24038;
      D.24040 = (long long int) D.24039;
      time_minor_scan_remsets.257 = time_minor_scan_remsets;
      D.24074 = D.24040 + time_minor_scan_remsets.257;
      time_minor_scan_remsets = D.24074;
      gc_debug_level.247 = gc_debug_level;
      D.24057 = gc_debug_level.247 > 1;
      D.24058 = (long int) D.24057;
      D.24059 = __builtin_expect (D.24058, 0);
      if (D.24059 != 0) goto <D.24075>; else goto <D.24076>;
      <D.24075>:
      gc_debug_file.248 = gc_debug_file;
      D.24037 = btv - atv;
      D.24038 = D.24037 / 10;
      D.24039 = (int) D.24038;
      fprintf (gc_debug_file.248, "Old generation scan: %d usecs\n", D.24039);
      gc_debug_file.248 = gc_debug_file;
      fflush (gc_debug_file.248);
      <D.24076>:
      D.24077 = sgen_collection_is_parallel ();
      if (D.24077 == 0) goto <D.24078>; else goto <D.24079>;
      <D.24078>:
      D.24080 = current_object_ops.scan_object;
      ctx.scan_func = D.24080;
      ctx.copy_func = 0B;
      ctx.queue = &gray_queue;
      sgen_drain_gray_stack (-1, ctx);
      <D.24079>:
      D.24081 = mono_profiler_get_events ();
      D.24082 = D.24081 & 1048576;
      if (D.24082 != 0) goto <D.24083>; else goto <D.24084>;
      <D.24083>:
      report_registered_roots ();
      <D.24084>:
      D.24085 = mono_profiler_get_events ();
      D.24086 = D.24085 & 1048576;
      if (D.24086 != 0) goto <D.24087>; else goto <D.24088>;
      <D.24087>:
      report_finalizer_roots ();
      <D.24088>:
      atv = mono_100ns_ticks ();
      D.24051 = atv - btv;
      D.24052 = D.24051 / 10;
      D.24053 = (int) D.24052;
      D.24054 = (long long int) D.24053;
      time_minor_scan_pinned.258 = time_minor_scan_pinned;
      D.24090 = D.24054 + time_minor_scan_pinned.258;
      time_minor_scan_pinned = D.24090;
      scrrjd_normal = sgen_alloc_internal_dynamic (40, 20, 1);
      D.24091 = current_object_ops.copy_or_mark_object;
      scrrjd_normal->copy_or_mark_func = D.24091;
      D.24080 = current_object_ops.scan_object;
      scrrjd_normal->scan_func = D.24080;
      D.24092 = sgen_get_nursery_start ();
      scrrjd_normal->heap_start = D.24092;
      scrrjd_normal->heap_end = nursery_next;
      scrrjd_normal->root_type = 0;
      sgen_workers_enqueue_job (job_scan_from_registered_roots, scrrjd_normal);
      scrrjd_wbarrier = sgen_alloc_internal_dynamic (40, 20, 1);
      D.24091 = current_object_ops.copy_or_mark_object;
      scrrjd_wbarrier->copy_or_mark_func = D.24091;
      D.24080 = current_object_ops.scan_object;
      scrrjd_wbarrier->scan_func = D.24080;
      D.24093 = sgen_get_nursery_start ();
      scrrjd_wbarrier->heap_start = D.24093;
      scrrjd_wbarrier->heap_end = nursery_next;
      scrrjd_wbarrier->root_type = 2;
      sgen_workers_enqueue_job (job_scan_from_registered_roots, scrrjd_wbarrier);
      btv = mono_100ns_ticks ();
      D.24037 = btv - atv;
      D.24038 = D.24037 / 10;
      D.24039 = (int) D.24038;
      D.24040 = (long long int) D.24039;
      time_minor_scan_registered_roots.259 = time_minor_scan_registered_roots;
      D.24095 = D.24040 + time_minor_scan_registered_roots.259;
      time_minor_scan_registered_roots = D.24095;
      stdjd = sgen_alloc_internal_dynamic (16, 20, 1);
      D.24096 = sgen_get_nursery_start ();
      stdjd->heap_start = D.24096;
      stdjd->heap_end = nursery_next;
      sgen_workers_enqueue_job (job_scan_thread_data, stdjd);
      atv = mono_100ns_ticks ();
      D.24051 = atv - btv;
      D.24052 = D.24051 / 10;
      D.24053 = (int) D.24052;
      D.24054 = (long long int) D.24053;
      time_minor_scan_thread_data.260 = time_minor_scan_thread_data;
      D.24098 = D.24054 + time_minor_scan_thread_data.260;
      time_minor_scan_thread_data = D.24098;
      btv = atv;
      D.24103 = sgen_collection_is_parallel ();
      if (D.24103 != 0) goto <D.24100>; else goto <D.24104>;
      <D.24104>:
      D.24105 = sgen_collection_is_concurrent ();
      if (D.24105 != 0) goto <D.24100>; else goto <D.24101>;
      <D.24100>:
      iftmp.261 = 1;
      goto <D.24102>;
      <D.24101>:
      iftmp.261 = 0;
      <D.24102>:
      D.24106 = iftmp.261 != 0;
      D.24107 = (long int) D.24106;
      D.24108 = __builtin_expect (D.24107, 0);
      if (D.24108 != 0) goto <D.24109>; else goto <D.24110>;
      <D.24109>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 2677, "!sgen_collection_is_parallel () && !sgen_collection_is_concurrent ()");
      <D.24110>:
      D.24113 = sgen_collection_is_parallel ();
      if (D.24113 != 0) goto <D.24111>; else goto <D.24114>;
      <D.24114>:
      D.24115 = sgen_collection_is_concurrent ();
      if (D.24115 != 0) goto <D.24111>; else goto <D.24112>;
      <D.24111>:
      D.24116 = sgen_gray_object_queue_is_empty (&gray_queue);
      D.24117 = D.24116 == 0;
      D.24118 = (long int) D.24117;
      D.24119 = __builtin_expect (D.24118, 0);
      if (D.24119 != 0) goto <D.24120>; else goto <D.24121>;
      <D.24120>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 2680, "sgen_gray_object_queue_is_empty (&gray_queue)");
      <D.24121>:
      <D.24112>:
      sfejd_fin_ready = sgen_alloc_internal_dynamic (8, 20, 1);
      fin_ready_list.262 = fin_ready_list;
      sfejd_fin_ready->list = fin_ready_list.262;
      sgen_workers_enqueue_job (job_scan_finalizer_entries, sfejd_fin_ready);
      sfejd_critical_fin = sgen_alloc_internal_dynamic (8, 20, 1);
      critical_fin_list.263 = critical_fin_list;
      sfejd_critical_fin->list = critical_fin_list.263;
      sgen_workers_enqueue_job (job_scan_finalizer_entries, sfejd_critical_fin);
      finish_gray_stack (0, &gray_queue);
      atv = mono_100ns_ticks ();
      D.24051 = atv - btv;
      D.24052 = D.24051 / 10;
      D.24053 = (int) D.24052;
      D.24054 = (long long int) D.24053;
      time_minor_finish_gray_stack.264 = time_minor_finish_gray_stack;
      D.24125 = D.24054 + time_minor_finish_gray_stack.264;
      time_minor_finish_gray_stack = D.24125;
      mono_profiler_gc_event (2, 0);
      sgen_workers_reset_data ();
      objects_pinned.265 = objects_pinned;
      if (objects_pinned.265 != 0) goto <D.24127>; else goto <D.24128>;
      <D.24127>:
      sgen_optimize_pin_queue (0);
      nursery_section.251 = nursery_section;
      sgen_pinning_setup_section (nursery_section.251);
      <D.24128>:
      mono_profiler_gc_event (3, 0);
      nursery_section.251 = nursery_section;
      nursery_section.251 = nursery_section;
      D.24129 = nursery_section.251->pin_queue_start;
      nursery_section.251 = nursery_section;
      D.24130 = nursery_section.251->pin_queue_num_entries;
      fragment_total = sgen_build_nursery_fragments (nursery_section.251, D.24129, D.24130, unpin_queue);
      if (fragment_total == 0) goto <D.24131>; else goto <D.24132>;
      <D.24131>:
      degraded_mode = 1;
      <D.24132>:
      sgen_clear_tlabs ();
      mono_profiler_gc_event (4, 0);
      btv = mono_100ns_ticks ();
      D.24037 = btv - atv;
      D.24038 = D.24037 / 10;
      D.24039 = (int) D.24038;
      D.24040 = (long long int) D.24039;
      time_minor_fragment_creation.266 = time_minor_fragment_creation;
      D.24134 = D.24040 + time_minor_fragment_creation.266;
      time_minor_fragment_creation = D.24134;
      gc_debug_level.247 = gc_debug_level;
      D.24057 = gc_debug_level.247 > 1;
      D.24058 = (long int) D.24057;
      D.24059 = __builtin_expect (D.24058, 0);
      if (D.24059 != 0) goto <D.24135>; else goto <D.24136>;
      <D.24135>:
      gc_debug_file.248 = gc_debug_file;
      D.24037 = btv - atv;
      D.24038 = D.24037 / 10;
      D.24039 = (int) D.24038;
      fprintf (gc_debug_file.248, "Fragment creation: %d usecs, %lu bytes available\n", D.24039, fragment_total);
      gc_debug_file.248 = gc_debug_file;
      fflush (gc_debug_file.248);
      <D.24136>:
      consistency_check_at_minor_collection.256 = consistency_check_at_minor_collection;
      if (consistency_check_at_minor_collection.256 != 0) goto <D.24137>; else goto <D.24138>;
      <D.24137>:
      sgen_check_major_refs ();
      <D.24138>:
      D.24139 = major_collector.finish_nursery_collection;
      D.24139 ();
      all_btv = mono_100ns_ticks ();
      D.24140 = gc_stats.minor_gc_time_usecs;
      D.24141 = all_btv - all_atv;
      D.24142 = D.24141 / 10;
      D.24143 = (int) D.24142;
      D.24144 = (long long int) D.24143;
      D.24145 = D.24140 + D.24144;
      gc_stats.minor_gc_time_usecs = D.24145;
      heap_dump_file.267 = heap_dump_file;
      if (heap_dump_file.267 != 0B) goto <D.24147>; else goto <D.24148>;
      <D.24147>:
      stat_minor_gcs.249 = stat_minor_gcs;
      D.24149 = stat_minor_gcs.249 + -1;
      dump_heap ("minor", D.24149, 0B);
      <D.24148>:
      sgen_finish_pinning ();
      fin_ready_list.262 = fin_ready_list;
      if (fin_ready_list.262 != 0B) goto <D.24150>; else goto <D.24152>;
      <D.24152>:
      critical_fin_list.263 = critical_fin_list;
      if (critical_fin_list.263 != 0B) goto <D.24150>; else goto <D.24151>;
      <D.24150>:
      if (0 != 0) goto <D.24153>; else goto <D.24154>;
      <D.24153>:
      gc_debug_file.248 = gc_debug_file;
      num_ready_finalizers.268 = num_ready_finalizers;
      fprintf (gc_debug_file.248, "Finalizer-thread wakeup: ready %d\n", num_ready_finalizers.268);
      gc_debug_file.248 = gc_debug_file;
      fflush (gc_debug_file.248);
      <D.24154>:
      mono_gc_finalize_notify ();
      <D.24151>:
      sgen_pin_stats_reset ();
      sgen_cement_clear_below_threshold ();
      D.24156 = sgen_gray_object_queue_is_empty (&gray_queue);
      D.24157 = D.24156 == 0;
      D.24158 = (long int) D.24157;
      D.24159 = __builtin_expect (D.24158, 0);
      if (D.24159 != 0) goto <D.24160>; else goto <D.24161>;
      <D.24160>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 2753, "sgen_gray_object_queue_is_empty (&gray_queue)");
      <D.24161>:
      D.24162 = remset.finish_minor_collection;
      D.24162 ();
      check_scan_starts ();
      sgen_memgov_minor_collection_end ();
      objects_pinned.265 = objects_pinned;
      D.24163 = objects_pinned.265 != 0;
      needs_major = (gboolean) D.24163;
      current_collection_generation = -1;
      objects_pinned = 0;
      check_nursery_objects_pinned.269 = check_nursery_objects_pinned;
      if (check_nursery_objects_pinned.269 != 0) goto <D.24165>; else goto <D.24166>;
      <D.24165>:
      D.24167 = sgen_minor_collector.is_split;
      if (D.24167 == 0) goto <D.24168>; else goto <D.24169>;
      <D.24168>:
      D.24170 = unpin_queue != 0B;
      D.24171 = (int) D.24170;
      sgen_check_nursery_objects_pinned (D.24171);
      <D.24169>:
      <D.24166>:
      D.24000 = needs_major;
      return D.24000;
    }
  finally
    {
      ctx = {CLOBBER};
    }
}


job_finish_remembered_set_scan (struct WorkerData * worker_data, void * job_data_untyped)
{
  void (*<T2eb3>) (void *, void *, struct SgenGrayQueue *) D.24174;
  char * D.24175;
  char * D.24176;
  struct SgenGrayQueue * D.24177;
  struct FinishRememberedSetScanJobData * job_data;

  job_data = job_data_untyped;
  D.24174 = remset.finish_scan_remsets;
  D.24175 = job_data->heap_start;
  D.24176 = job_data->heap_end;
  D.24177 = sgen_workers_get_job_gray_queue (worker_data);
  D.24174 (D.24175, D.24176, D.24177);
  sgen_free_internal_dynamic (job_data, 16, 20);
}


verify_nursery ()
{
  int do_verify_nursery.270;
  void * D.24181;
  long unsigned int D.24186;
  long unsigned int D.24187;
  long unsigned int D.24189;
  int gc_debug_level.271;
  _Bool D.24192;
  long int D.24193;
  long int D.24194;
  struct FILE * gc_debug_file.272;
  long unsigned int D.24198;
  unsigned int D.24203;
  unsigned int D.24204;
  unsigned int D.24205;
  long unsigned int D.24206;
  char * D.24207;
  int do_dump_nursery_content.273;
  long int cur.274;
  long int hole_start.275;
  long int D.24217;
  int D.24218;
  int D.24221;
  int D.24222;
  const char * D.24223;
  void * D.24224;
  struct MonoVTable * D.24225;
  _Bool D.24226;
  int D.24227;
  char * start;
  char * end;
  char * cur;
  char * hole_start;

  do_verify_nursery.270 = do_verify_nursery;
  if (do_verify_nursery.270 == 0) goto <D.24179>; else goto <D.24180>;
  <D.24179>:
  return;
  <D.24180>:
  sgen_nursery_allocator_prepare_for_pinning ();
  cur = sgen_get_nursery_start ();
  start = cur;
  hole_start = start;
  end = sgen_get_nursery_end ();
  goto <D.21014>;
  <D.21015>:
  {
    size_t ss;
    size_t size;

    D.24181 = MEM[(void * *)cur];
    if (D.24181 == 0B) goto <D.24182>; else goto <D.24183>;
    <D.24182>:
    cur = cur + 8;
    // predicted unlikely by continue predictor.
    goto <D.21014>;
    <D.24183>:
    D.24186 = MEM[(mword *)cur];
    D.24187 = D.24186 & 1;
    if (D.24187 != 0) goto <D.24188>; else goto <D.24184>;
    <D.24188>:
    D.24186 = MEM[(mword *)cur];
    D.24189 = D.24186 & 18446744073709551612;
    if (D.24189 != 0) goto <D.24190>; else goto <D.24184>;
    <D.24190>:
    gc_debug_level.271 = gc_debug_level;
    D.24192 = gc_debug_level.271 > 0;
    D.24193 = (long int) D.24192;
    D.24194 = __builtin_expect (D.24193, 0);
    if (D.24194 != 0) goto <D.24195>; else goto <D.24196>;
    <D.24195>:
    gc_debug_file.272 = gc_debug_file;
    fprintf (gc_debug_file.272, "FORWARDED OBJ %p\n", cur);
    gc_debug_file.272 = gc_debug_file;
    fflush (gc_debug_file.272);
    <D.24196>:
    goto <D.24185>;
    <D.24184>:
    D.24186 = MEM[(mword *)cur];
    D.24198 = D.24186 & 2;
    if (D.24198 != 0) goto <D.24199>; else goto <D.24200>;
    <D.24199>:
    gc_debug_level.271 = gc_debug_level;
    D.24192 = gc_debug_level.271 > 0;
    D.24193 = (long int) D.24192;
    D.24194 = __builtin_expect (D.24193, 0);
    if (D.24194 != 0) goto <D.24201>; else goto <D.24202>;
    <D.24201>:
    gc_debug_file.272 = gc_debug_file;
    fprintf (gc_debug_file.272, "PINNED OBJ %p\n", cur);
    gc_debug_file.272 = gc_debug_file;
    fflush (gc_debug_file.272);
    <D.24202>:
    <D.24200>:
    <D.24185>:
    D.24203 = sgen_safe_object_get_size (cur);
    ss = (size_t) D.24203;
    D.24204 = sgen_safe_object_get_size (cur);
    D.24205 = D.24204 + 7;
    D.24206 = (long unsigned int) D.24205;
    size = D.24206 & 4294967288;
    D.24207 = cur + size;
    verify_scan_starts (cur, D.24207);
    do_dump_nursery_content.273 = do_dump_nursery_content;
    if (do_dump_nursery_content.273 != 0) goto <D.24209>; else goto <D.24210>;
    <D.24209>:
    if (cur > hole_start) goto <D.24211>; else goto <D.24212>;
    <D.24211>:
    gc_debug_level.271 = gc_debug_level;
    D.24192 = gc_debug_level.271 > 0;
    D.24193 = (long int) D.24192;
    D.24194 = __builtin_expect (D.24193, 0);
    if (D.24194 != 0) goto <D.24213>; else goto <D.24214>;
    <D.24213>:
    gc_debug_file.272 = gc_debug_file;
    cur.274 = (long int) cur;
    hole_start.275 = (long int) hole_start;
    D.24217 = cur.274 - hole_start.275;
    D.24218 = (int) D.24217;
    fprintf (gc_debug_file.272, "HOLE [%p %p %d]\n", hole_start, cur, D.24218);
    gc_debug_file.272 = gc_debug_file;
    fflush (gc_debug_file.272);
    <D.24214>:
    <D.24212>:
    gc_debug_level.271 = gc_debug_level;
    D.24192 = gc_debug_level.271 > 0;
    D.24193 = (long int) D.24192;
    D.24194 = __builtin_expect (D.24193, 0);
    if (D.24194 != 0) goto <D.24219>; else goto <D.24220>;
    <D.24219>:
    gc_debug_file.272 = gc_debug_file;
    D.24207 = cur + size;
    D.24221 = (int) size;
    D.24222 = (int) ss;
    D.24223 = sgen_safe_name (cur);
    D.24186 = MEM[(mword *)cur];
    D.24189 = D.24186 & 18446744073709551612;
    D.24224 = (void *) D.24189;
    D.24225 = sgen_get_array_fill_vtable ();
    D.24226 = D.24224 == D.24225;
    D.24227 = (int) D.24226;
    fprintf (gc_debug_file.272, "OBJ  [%p %p %d %d %s %d]\n", cur, D.24207, D.24221, D.24222, D.24223, D.24227);
    gc_debug_file.272 = gc_debug_file;
    fflush (gc_debug_file.272);
    <D.24220>:
    <D.24210>:
    cur = cur + size;
    hole_start = cur;
  }
  <D.21014>:
  if (cur < end) goto <D.21015>; else goto <D.21016>;
  <D.21016>:
}


major_do_collection (const char * reason)
{
  int disable_major_collections.276;
  gboolean D.24232;
  long long int (*<T2e7f>) (void) D.24233;
  _Bool D.24236;
  long int D.24237;
  long int D.24238;
  int old_next_pin_slot.277;
  long long int D.24242;
  long int D.24243;
  long int D.24244;
  int D.24245;
  long long int D.24246;
  long long int D.24247;
  long unsigned int bytes_pinned_from_failed_allocation.278;
  _Bool D.24251;
  gint64 all_atv;
  gint64 all_btv;
  int old_next_pin_slot;

  try
    {
      disable_major_collections.276 = disable_major_collections;
      if (disable_major_collections.276 != 0) goto <D.24230>; else goto <D.24231>;
      <D.24230>:
      D.24232 = 0;
      return D.24232;
      <D.24231>:
      D.24233 = major_collector.get_and_reset_num_major_objects_marked;
      if (D.24233 != 0B) goto <D.24234>; else goto <D.24235>;
      <D.24234>:
      {
        long long int num_marked;

        D.24233 = major_collector.get_and_reset_num_major_objects_marked;
        num_marked = D.24233 ();
        D.24236 = num_marked != 0;
        D.24237 = (long int) D.24236;
        D.24238 = __builtin_expect (D.24237, 0);
        if (D.24238 != 0) goto <D.24239>; else goto <D.24240>;
        <D.24239>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3298, "!num_marked");
        <D.24240>:
      }
      <D.24235>:
      all_atv = mono_100ns_ticks ();
      major_start_collection (0, &old_next_pin_slot);
      old_next_pin_slot.277 = old_next_pin_slot;
      major_finish_collection (reason, old_next_pin_slot.277, 0);
      all_btv = mono_100ns_ticks ();
      D.24242 = gc_stats.major_gc_time_usecs;
      D.24243 = all_btv - all_atv;
      D.24244 = D.24243 / 10;
      D.24245 = (int) D.24244;
      D.24246 = (long long int) D.24245;
      D.24247 = D.24242 + D.24246;
      gc_stats.major_gc_time_usecs = D.24247;
      D.24233 = major_collector.get_and_reset_num_major_objects_marked;
      if (D.24233 != 0B) goto <D.24248>; else goto <D.24249>;
      <D.24248>:
      D.24233 = major_collector.get_and_reset_num_major_objects_marked;
      D.24233 ();
      <D.24249>:
      bytes_pinned_from_failed_allocation.278 = bytes_pinned_from_failed_allocation;
      D.24251 = bytes_pinned_from_failed_allocation.278 != 0;
      D.24232 = (gboolean) D.24251;
      return D.24232;
    }
  finally
    {
      old_next_pin_slot = {CLOBBER};
    }
}


sgen_gray_object_queue_is_empty (struct SgenGrayQueue * queue)
{
  gboolean D.24254;
  struct GrayQueueSection * D.24255;
  _Bool D.24256;

  D.24255 = queue->first;
  D.24256 = D.24255 == 0B;
  D.24254 = (gboolean) D.24256;
  return D.24254;
}


__attribute__((visibility ("hidden")))
sgen_gc_is_object_ready_for_finalization (void * object)
{
  gboolean D.24258;
  int D.24259;
  _Bool D.24260;

  D.24259 = sgen_is_object_alive (object);
  D.24260 = D.24259 == 0;
  D.24258 = (gboolean) D.24260;
  return D.24258;
}


sgen_is_object_alive (void * object)
{
  int D.24262;
  gboolean D.24265;

  D.24262 = sgen_ptr_in_nursery (object);
  if (D.24262 != 0) goto <D.24263>; else goto <D.24264>;
  <D.24263>:
  D.24265 = sgen_nursery_is_object_alive (object);
  return D.24265;
  <D.24264>:
  D.24265 = sgen_major_is_object_alive (object);
  return D.24265;
}


__attribute__((visibility ("hidden")))
sgen_queue_finalization_entry (struct MonoObject * obj)
{
  struct FinalizeReadyEntry * critical_fin_list.279;
  struct FinalizeReadyEntry * fin_ready_list.280;
  struct FinalizeReadyEntry * entry;
  gboolean critical;

  entry = sgen_alloc_internal (6);
  critical = has_critical_finalizer (obj);
  entry->object = obj;
  if (critical != 0) goto <D.24267>; else goto <D.24268>;
  <D.24267>:
  critical_fin_list.279 = critical_fin_list;
  entry->next = critical_fin_list.279;
  critical_fin_list = entry;
  goto <D.24270>;
  <D.24268>:
  fin_ready_list.280 = fin_ready_list;
  entry->next = fin_ready_list.280;
  fin_ready_list = entry;
  <D.24270>:
}


has_critical_finalizer (struct MonoObject * obj)
{
  struct MonoClass * D.24272;
  gboolean D.24275;
  long unsigned int D.24276;
  long unsigned int D.24277;
  struct MonoVTable * D.24278;
  struct MonoClass * class;

  D.24272 = mono_defaults.critical_finalizer_object;
  if (D.24272 == 0B) goto <D.24273>; else goto <D.24274>;
  <D.24273>:
  D.24275 = 0;
  return D.24275;
  <D.24274>:
  D.24276 = MEM[(mword *)obj];
  D.24277 = D.24276 & 18446744073709551612;
  D.24278 = (struct MonoVTable *) D.24277;
  class = D.24278->klass;
  D.24272 = mono_defaults.critical_finalizer_object;
  D.24275 = mono_class_has_parent_fast (class, D.24272);
  return D.24275;
}


__attribute__((visibility ("hidden")))
sgen_object_is_live (void * obj)
{
  gboolean D.24280;

  D.24280 = sgen_is_object_alive_and_on_current_collection (obj);
  return D.24280;
}


sgen_is_object_alive_and_on_current_collection (char * object)
{
  int D.24282;
  int D.24285;
  int current_collection_generation.281;

  D.24282 = sgen_ptr_in_nursery (object);
  if (D.24282 != 0) goto <D.24283>; else goto <D.24284>;
  <D.24283>:
  D.24285 = sgen_nursery_is_object_alive (object);
  return D.24285;
  <D.24284>:
  current_collection_generation.281 = current_collection_generation;
  if (current_collection_generation.281 == 0) goto <D.24287>; else goto <D.24288>;
  <D.24287>:
  D.24285 = 0;
  return D.24285;
  <D.24288>:
  D.24285 = sgen_major_is_object_alive (object);
  return D.24285;
}


mono_gc_invoke_finalizers ()
{
  struct FinalizeReadyEntry * * iftmp.282;
  struct FinalizeReadyEntry * D.24296;
  struct FinalizeReadyEntry * D.24299;
  struct FinalizeReadyEntry * D.24301;
  void * D.24303;
  _Bool D.24310;
  long int D.24311;
  long int D.24312;
  int num_ready_finalizers.283;
  int D.24316;
  struct FILE * gc_debug_file.284;
  const char * D.24320;
  _Bool D.24322;
  long int D.24323;
  long int D.24324;
  struct FinalizeReadyEntry * fin_ready_list.285;
  struct FinalizeReadyEntry * critical_fin_list.286;
  _Bool D.24330;
  long int D.24331;
  long int D.24332;
  int D.24335;
  struct FinalizeReadyEntry * entry;
  gboolean entry_is_critical;
  int count;
  void * obj;

  entry = 0B;
  entry_is_critical = 0;
  count = 0;
  goto <D.21248>;
  <D.21247>:
  pthread_mutex_lock (&gc_mutex);
  if (entry != 0B) goto <D.24290>; else goto <D.24291>;
  <D.24290>:
  {
    struct FinalizeReadyEntry * * list;

    if (entry_is_critical != 0) goto <D.24293>; else goto <D.24294>;
    <D.24293>:
    iftmp.282 = &critical_fin_list;
    goto <D.24295>;
    <D.24294>:
    iftmp.282 = &fin_ready_list;
    <D.24295>:
    list = iftmp.282;
    D.24296 = *list;
    if (D.24296 == entry) goto <D.24297>; else goto <D.24298>;
    <D.24297>:
    D.24299 = entry->next;
    *list = D.24299;
    goto <D.24300>;
    <D.24298>:
    {
      struct FinalizeReadyEntry * e;

      e = *list;
      goto <D.21238>;
      <D.21237>:
      e = e->next;
      <D.21238>:
      D.24301 = e->next;
      if (D.24301 != entry) goto <D.21237>; else goto <D.21239>;
      <D.21239>:
      D.24299 = entry->next;
      e->next = D.24299;
    }
    <D.24300>:
    sgen_free_internal (entry, 6);
    entry = 0B;
  }
  <D.24291>:
  entry = fin_ready_list;
  goto <D.21241>;
  <D.21240>:
  entry = entry->next;
  <D.21241>:
  if (entry != 0B) goto <D.24302>; else goto <D.21242>;
  <D.24302>:
  D.24303 = entry->object;
  if (D.24303 == 0B) goto <D.21240>; else goto <D.21242>;
  <D.21242>:
  if (entry != 0B) goto <D.24304>; else goto <D.24305>;
  <D.24304>:
  entry_is_critical = 0;
  goto <D.24306>;
  <D.24305>:
  entry_is_critical = 1;
  entry = critical_fin_list;
  goto <D.21244>;
  <D.21243>:
  entry = entry->next;
  <D.21244>:
  if (entry != 0B) goto <D.24307>; else goto <D.21245>;
  <D.24307>:
  D.24303 = entry->object;
  if (D.24303 == 0B) goto <D.21243>; else goto <D.21245>;
  <D.21245>:
  <D.24306>:
  if (entry != 0B) goto <D.24308>; else goto <D.24309>;
  <D.24308>:
  D.24303 = entry->object;
  D.24310 = D.24303 == 0B;
  D.24311 = (long int) D.24310;
  D.24312 = __builtin_expect (D.24311, 0);
  if (D.24312 != 0) goto <D.24313>; else goto <D.24314>;
  <D.24313>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3882, "entry->object");
  <D.24314>:
  num_ready_finalizers.283 = num_ready_finalizers;
  D.24316 = num_ready_finalizers.283 + -1;
  num_ready_finalizers = D.24316;
  obj = entry->object;
  entry->object = 0B;
  if (0 != 0) goto <D.24317>; else goto <D.24318>;
  <D.24317>:
  gc_debug_file.284 = gc_debug_file;
  D.24320 = safe_name (obj);
  fprintf (gc_debug_file.284, "Finalizing object %p (%s)\n", obj, D.24320);
  gc_debug_file.284 = gc_debug_file;
  fflush (gc_debug_file.284);
  <D.24318>:
  <D.24309>:
  sgen_gc_unlock ();
  if (entry == 0B) goto <D.21246>; else goto <D.24321>;
  <D.24321>:
  D.24303 = entry->object;
  D.24322 = D.24303 != 0B;
  D.24323 = (long int) D.24322;
  D.24324 = __builtin_expect (D.24323, 0);
  if (D.24324 != 0) goto <D.24325>; else goto <D.24326>;
  <D.24325>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3894, "entry->object == NULL");
  <D.24326>:
  count = count + 1;
  mono_gc_run_finalize (obj, 0B);
  <D.21248>:
  fin_ready_list.285 = fin_ready_list;
  if (fin_ready_list.285 != 0B) goto <D.21247>; else goto <D.24328>;
  <D.24328>:
  critical_fin_list.286 = critical_fin_list;
  if (critical_fin_list.286 != 0B) goto <D.21247>; else goto <D.21246>;
  <D.21246>:
  D.24330 = entry != 0B;
  D.24331 = (long int) D.24330;
  D.24332 = __builtin_expect (D.24331, 0);
  if (D.24332 != 0) goto <D.24333>; else goto <D.24334>;
  <D.24333>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3900, "!entry");
  <D.24334>:
  D.24335 = count;
  return D.24335;
}


__attribute__((visibility ("hidden")))
mono_gc_pending_finalizers ()
{
  gboolean D.24337;
  int iftmp.287;
  struct FinalizeReadyEntry * fin_ready_list.288;
  struct FinalizeReadyEntry * critical_fin_list.289;

  fin_ready_list.288 = fin_ready_list;
  if (fin_ready_list.288 != 0B) goto <D.24339>; else goto <D.24343>;
  <D.24343>:
  critical_fin_list.289 = critical_fin_list;
  if (critical_fin_list.289 != 0B) goto <D.24339>; else goto <D.24340>;
  <D.24339>:
  iftmp.287 = 1;
  goto <D.24341>;
  <D.24340>:
  iftmp.287 = 0;
  <D.24341>:
  D.24337 = iftmp.287;
  return D.24337;
}


__attribute__((visibility ("hidden")))
mono_gc_register_root (char * start, size_t size, void * descr)
{
  int D.24346;
  _Bool D.24347;
  int D.24348;

  D.24347 = descr == 0B;
  D.24348 = (int) D.24347;
  D.24346 = mono_gc_register_root_inner (start, size, descr, D.24348);
  return D.24346;
}


mono_gc_register_root_inner (char * start, size_t size, void * descr, int root_type)
{
  struct SgenHashTable * D.24350;
  char * D.24353;
  long int D.24354;
  long int start.290;
  long int D.24356;
  char * D.24357;
  int iftmp.291;
  long unsigned int D.24363;
  _Bool D.24366;
  long int D.24367;
  long int D.24368;
  long unsigned int descr.292;
  long unsigned int roots_size.293;
  long unsigned int D.24373;
  long unsigned int D.24374;
  int D.24375;
  struct SgenHashTable * D.24376;
  struct FILE * gc_debug_file.294;
  char * D.24380;
  int D.24381;
  int D.24382;
  struct RootRecord new_root;
  int i;

  try
    {
      pthread_mutex_lock (&gc_mutex);
      i = 0;
      goto <D.21263>;
      <D.21262>:
      {
        struct RootRecord * root;

        D.24350 = &roots_hash[i];
        root = sgen_hash_table_lookup (D.24350, start);
        if (root != 0B) goto <D.24351>; else goto <D.24352>;
        <D.24351>:
        {
          size_t old_size;

          D.24353 = root->end_root;
          D.24354 = (long int) D.24353;
          start.290 = (long int) start;
          D.24356 = D.24354 - start.290;
          old_size = (size_t) D.24356;
          D.24357 = start + size;
          root->end_root = D.24357;
          D.24363 = root->root_desc;
          if (D.24363 == 0) goto <D.24359>; else goto <D.24364>;
          <D.24364>:
          if (descr == 0B) goto <D.24359>; else goto <D.24360>;
          <D.24359>:
          D.24363 = root->root_desc;
          if (D.24363 != 0) goto <D.24361>; else goto <D.24365>;
          <D.24365>:
          if (descr != 0B) goto <D.24361>; else goto <D.24360>;
          <D.24361>:
          iftmp.291 = 1;
          goto <D.24362>;
          <D.24360>:
          iftmp.291 = 0;
          <D.24362>:
          D.24366 = iftmp.291 != 0;
          D.24367 = (long int) D.24366;
          D.24368 = __builtin_expect (D.24367, 0);
          if (D.24368 != 0) goto <D.24369>; else goto <D.24370>;
          <D.24369>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 3932, "((root->root_desc != 0) && (descr != NULL)) || ((root->root_desc == 0) && (descr == NULL))");
          <D.24370>:
          descr.292 = (long unsigned int) descr;
          root->root_desc = descr.292;
          roots_size.293 = roots_size;
          D.24373 = roots_size.293 + size;
          roots_size = D.24373;
          roots_size.293 = roots_size;
          D.24374 = roots_size.293 - old_size;
          roots_size = D.24374;
          sgen_gc_unlock ();
          D.24375 = 1;
          return D.24375;
        }
        <D.24352>:
      }
      i = i + 1;
      <D.21263>:
      if (i <= 2) goto <D.21262>; else goto <D.21264>;
      <D.21264>:
      D.24357 = start + size;
      new_root.end_root = D.24357;
      descr.292 = (long unsigned int) descr;
      new_root.root_desc = descr.292;
      D.24376 = &roots_hash[root_type];
      sgen_hash_table_replace (D.24376, start, &new_root, 0B);
      roots_size.293 = roots_size;
      D.24373 = roots_size.293 + size;
      roots_size = D.24373;
      if (0 != 0) goto <D.24377>; else goto <D.24378>;
      <D.24377>:
      gc_debug_file.294 = gc_debug_file;
      D.24380 = new_root.end_root;
      D.24381 = (int) size;
      roots_size.293 = roots_size;
      D.24382 = (int) roots_size.293;
      fprintf (gc_debug_file.294, "Added root for range: %p-%p, descr: %p  (%d/%d bytes)\n", start, D.24380, descr, D.24381, D.24382);
      gc_debug_file.294 = gc_debug_file;
      fflush (gc_debug_file.294);
      <D.24378>:
      sgen_gc_unlock ();
      D.24375 = 1;
      return D.24375;
    }
  finally
    {
      new_root = {CLOBBER};
    }
}


__attribute__((visibility ("hidden")))
mono_gc_register_root_wbarrier (char * start, size_t size, void * descr)
{
  int D.24385;

  D.24385 = mono_gc_register_root_inner (start, size, descr, 2);
  return D.24385;
}


__attribute__((visibility ("hidden")))
mono_gc_deregister_root (char * addr)
{
  struct SgenHashTable * D.24387;
  int D.24388;
  long unsigned int roots_size.295;
  char * D.24392;
  long int D.24393;
  long int addr.296;
  long int D.24395;
  long unsigned int D.24396;
  long unsigned int D.24397;
  int root_type;
  struct RootRecord root;

  try
    {
      pthread_mutex_lock (&gc_mutex);
      root_type = 0;
      goto <D.21281>;
      <D.21280>:
      D.24387 = &roots_hash[root_type];
      D.24388 = sgen_hash_table_remove (D.24387, addr, &root);
      if (D.24388 != 0) goto <D.24389>; else goto <D.24390>;
      <D.24389>:
      roots_size.295 = roots_size;
      D.24392 = root.end_root;
      D.24393 = (long int) D.24392;
      addr.296 = (long int) addr;
      D.24395 = D.24393 - addr.296;
      D.24396 = (long unsigned int) D.24395;
      D.24397 = roots_size.295 - D.24396;
      roots_size = D.24397;
      <D.24390>:
      root_type = root_type + 1;
      <D.21281>:
      if (root_type <= 2) goto <D.21280>; else goto <D.21282>;
      <D.21282>:
      sgen_gc_unlock ();
    }
  finally
    {
      root = {CLOBBER};
    }
}


__attribute__((visibility ("hidden")))
sgen_get_current_collection_generation ()
{
  int D.24398;

  D.24398 = current_collection_generation;
  return D.24398;
}


__attribute__((visibility ("hidden")))
mono_gc_set_gc_callbacks (struct MonoGCCallbacks * callbacks)
{
  gc_callbacks = *callbacks;
}


__attribute__((visibility ("hidden")))
mono_gc_get_gc_callbacks ()
{
  struct MonoGCCallbacks * D.24400;

  D.24400 = &gc_callbacks;
  return D.24400;
}


__attribute__((visibility ("hidden")))
mono_gc_conservatively_scan_area (void * start, void * end)
{
  void * scan_area_arg_start.297;
  void * scan_area_arg_end.298;

  scan_area_arg_start.297 = scan_area_arg_start;
  scan_area_arg_end.298 = scan_area_arg_end;
  conservatively_pin_objects_from (start, end, scan_area_arg_start.297, scan_area_arg_end.298, 0);
}


__attribute__((visibility ("hidden")))
mono_gc_scan_object (void * obj)
{
  unsigned int user_copy_or_mark_key.299;
  void (*<T2d43>) (void * *, struct SgenGrayQueue *) D.24405;
  struct GrayQueue * D.24406;
  void * D.24407;
  struct UserCopyOrMarkData * data;

  user_copy_or_mark_key.299 = user_copy_or_mark_key;
  data = pthread_getspecific (user_copy_or_mark_key.299);
  D.24405 = current_object_ops.copy_or_mark_object;
  D.24406 = data->queue;
  D.24405 (&obj, D.24406);
  D.24407 = obj;
  return D.24407;
}


__attribute__((visibility ("hidden")))
mono_gc_register_thread (void * baseptr)
{
  gboolean D.24409;
  struct SgenThreadInfo * D.24410;
  _Bool D.24411;

  D.24410 = mono_thread_info_attach (baseptr);
  D.24411 = D.24410 != 0B;
  D.24409 = (gboolean) D.24411;
  return D.24409;
}


__attribute__((visibility ("hidden")))
mono_gc_set_stack_end (void * stack_end)
{
  void * D.24415;
  _Bool D.24416;
  long int D.24417;
  long int D.24418;
  struct SgenThreadInfo * info;

  pthread_mutex_lock (&gc_mutex);
  info = mono_thread_info_current ();
  if (info != 0B) goto <D.24413>; else goto <D.24414>;
  <D.24413>:
  D.24415 = info->stack_end;
  D.24416 = D.24415 <= stack_end;
  D.24417 = (long int) D.24416;
  D.24418 = __builtin_expect (D.24417, 0);
  if (D.24418 != 0) goto <D.24419>; else goto <D.24420>;
  <D.24419>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 4224, "stack_end < info->stack_end");
  <D.24420>:
  info->stack_end = stack_end;
  <D.24414>:
  sgen_gc_unlock ();
}


mono_gc_pthread_create (pthread_t * new_thread, const union pthread_attr_t * attr, void * (*<T7eb>) (void *) start_routine, void * arg)
{
  int D.24421;

  D.24421 = pthread_create (new_thread, attr, start_routine, arg);
  return D.24421;
}


mono_gc_pthread_join (pthread_t thread, void * * retval)
{
  int D.24423;

  D.24423 = pthread_join (thread, retval);
  return D.24423;
}


mono_gc_pthread_detach (pthread_t thread)
{
  int D.24425;

  D.24425 = pthread_detach (thread);
  return D.24425;
}


__attribute__((__noreturn__))
mono_gc_pthread_exit (void * retval)
{
  mono_thread_info_dettach ();
  pthread_exit (retval);
}


mono_gc_wbarrier_set_field (struct MonoObject * obj, void * field_ptr, struct MonoObject * value)
{
  int D.24427;
  struct FILE * gc_debug_file.300;
  void (*<T2e9b>) (struct MonoObject *, void *, struct MonoObject *) D.24435;

  D.24427 = sgen_ptr_in_nursery (field_ptr);
  if (D.24427 != 0) goto <D.24428>; else goto <D.24429>;
  <D.24428>:
  MEM[(void * *)field_ptr] = value;
  return;
  <D.24429>:
  if (0 != 0) goto <D.24430>; else goto <D.24431>;
  <D.24430>:
  gc_debug_file.300 = gc_debug_file;
  fprintf (gc_debug_file.300, "Adding remset at %p\n", field_ptr);
  gc_debug_file.300 = gc_debug_file;
  fflush (gc_debug_file.300);
  <D.24431>:
  if (value != 0B) goto <D.24433>; else goto <D.24434>;
  <D.24433>:
  <D.24434>:
  D.24435 = remset.wbarrier_set_field;
  D.24435 (obj, field_ptr, value);
}


mono_gc_wbarrier_set_arrayref (struct MonoArray * arr, void * slot_ptr, struct MonoObject * value)
{
  int D.24437;
  struct FILE * gc_debug_file.301;
  void (*<T2e9f>) (struct MonoArray *, void *, struct MonoObject *) D.24445;

  D.24437 = sgen_ptr_in_nursery (slot_ptr);
  if (D.24437 != 0) goto <D.24438>; else goto <D.24439>;
  <D.24438>:
  MEM[(void * *)slot_ptr] = value;
  return;
  <D.24439>:
  if (0 != 0) goto <D.24440>; else goto <D.24441>;
  <D.24440>:
  gc_debug_file.301 = gc_debug_file;
  fprintf (gc_debug_file.301, "Adding remset at %p\n", slot_ptr);
  gc_debug_file.301 = gc_debug_file;
  fflush (gc_debug_file.301);
  <D.24441>:
  if (value != 0B) goto <D.24443>; else goto <D.24444>;
  <D.24443>:
  <D.24444>:
  D.24445 = remset.wbarrier_set_arrayref;
  D.24445 (arr, slot_ptr, value);
}


mono_gc_wbarrier_arrayref_copy (void * dest_ptr, void * src_ptr, int count)
{
  int D.24449;
  long unsigned int D.24451;
  long unsigned int D.24452;
  void (*<T2ea3>) (void *, void *, int) D.24453;

  D.24449 = sgen_ptr_in_nursery (dest_ptr);
  if (D.24449 != 0) goto <D.24447>; else goto <D.24450>;
  <D.24450>:
  if (count <= 0) goto <D.24447>; else goto <D.24448>;
  <D.24447>:
  D.24451 = (long unsigned int) count;
  D.24452 = D.24451 * 8;
  mono_gc_memmove_aligned (dest_ptr, src_ptr, D.24452);
  return;
  <D.24448>:
  D.24453 = remset.wbarrier_arrayref_copy;
  D.24453 (dest_ptr, src_ptr, count);
}


find_object_for_ptr (char * ptr)
{
  struct GCMemSection * nursery_section.302;
  char * D.24456;
  char * D.24459;
  char * found_obj.303;
  char * D.24465;
  void (*<T2e39>) (gboolean, gboolean, void (*IterateObjectCallbackFunc) (char *, size_t, void *), void *) D.24468;

  nursery_section.302 = nursery_section;
  D.24456 = nursery_section.302->data;
  if (D.24456 <= ptr) goto <D.24457>; else goto <D.24458>;
  <D.24457>:
  nursery_section.302 = nursery_section;
  D.24459 = nursery_section.302->end_data;
  if (D.24459 > ptr) goto <D.24460>; else goto <D.24461>;
  <D.24460>:
  found_obj = 0B;
  nursery_section.302 = nursery_section;
  D.24456 = nursery_section.302->data;
  nursery_section.302 = nursery_section;
  D.24459 = nursery_section.302->end_data;
  sgen_scan_area_with_callback (D.24456, D.24459, find_object_for_ptr_callback, ptr, 1);
  found_obj.303 = found_obj;
  if (found_obj.303 != 0B) goto <D.24463>; else goto <D.24464>;
  <D.24463>:
  D.24465 = found_obj;
  return D.24465;
  <D.24464>:
  <D.24461>:
  <D.24458>:
  found_obj = 0B;
  sgen_los_iterate_objects (find_object_for_ptr_callback, ptr);
  found_obj.303 = found_obj;
  if (found_obj.303 != 0B) goto <D.24466>; else goto <D.24467>;
  <D.24466>:
  D.24465 = found_obj;
  return D.24465;
  <D.24467>:
  found_obj = 0B;
  D.24468 = major_collector.iterate_objects;
  D.24468 (1, 1, find_object_for_ptr_callback, ptr);
  D.24465 = found_obj;
  return D.24465;
}


find_object_for_ptr_callback (char * obj, size_t size, void * user_data)
{
  char * D.24472;
  char * found_obj.304;
  _Bool D.24476;
  long int D.24477;
  long int D.24478;
  char * ptr;

  ptr = user_data;
  if (ptr >= obj) goto <D.24470>; else goto <D.24471>;
  <D.24470>:
  D.24472 = obj + size;
  if (D.24472 > ptr) goto <D.24473>; else goto <D.24474>;
  <D.24473>:
  found_obj.304 = found_obj;
  D.24476 = found_obj.304 != 0B;
  D.24477 = (long int) D.24476;
  D.24478 = __builtin_expect (D.24477, 0);
  if (D.24478 != 0) goto <D.24479>; else goto <D.24480>;
  <D.24479>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 4335, "!found_obj");
  <D.24480>:
  found_obj = obj;
  <D.24474>:
  <D.24471>:
}


mono_gc_wbarrier_generic_nostore (void * ptr)
{
  int D.24485;
  int D.24487;
  struct FILE * gc_debug_file.305;
  int D.24491;
  int concurrent_collection_in_progress.306;
  void (*<T1312>) (void *) D.24501;
  void * obj;

  obj = MEM[(void * *)ptr];
  if (obj != 0B) goto <D.24481>; else goto <D.24482>;
  <D.24481>:
  <D.24482>:
  D.24485 = sgen_ptr_in_nursery (ptr);
  if (D.24485 != 0) goto <D.24483>; else goto <D.24486>;
  <D.24486>:
  D.24487 = ptr_on_stack (ptr);
  if (D.24487 != 0) goto <D.24483>; else goto <D.24484>;
  <D.24483>:
  if (0 != 0) goto <D.24488>; else goto <D.24489>;
  <D.24488>:
  gc_debug_file.305 = gc_debug_file;
  fprintf (gc_debug_file.305, "Skipping remset at %p\n", ptr);
  gc_debug_file.305 = gc_debug_file;
  fflush (gc_debug_file.305);
  <D.24489>:
  return;
  <D.24484>:
  D.24491 = sgen_ptr_in_nursery (obj);
  if (D.24491 == 0) goto <D.24492>; else goto <D.24493>;
  <D.24492>:
  concurrent_collection_in_progress.306 = concurrent_collection_in_progress;
  if (concurrent_collection_in_progress.306 == 0) goto <D.24495>; else goto <D.24496>;
  <D.24495>:
  if (0 != 0) goto <D.24497>; else goto <D.24498>;
  <D.24497>:
  gc_debug_file.305 = gc_debug_file;
  fprintf (gc_debug_file.305, "Skipping remset at %p\n", ptr);
  gc_debug_file.305 = gc_debug_file;
  fflush (gc_debug_file.305);
  <D.24498>:
  return;
  <D.24496>:
  <D.24493>:
  if (0 != 0) goto <D.24499>; else goto <D.24500>;
  <D.24499>:
  gc_debug_file.305 = gc_debug_file;
  fprintf (gc_debug_file.305, "Adding remset at %p\n", ptr);
  gc_debug_file.305 = gc_debug_file;
  fflush (gc_debug_file.305);
  <D.24500>:
  D.24501 = remset.wbarrier_generic_nostore;
  D.24501 (ptr);
}


ptr_on_stack (void * ptr)
{
  void * stack_start.307;
  void * D.24506;
  gboolean D.24509;
  void * stack_start;
  struct SgenThreadInfo * info;

  try
    {
      stack_start = &stack_start;
      info = mono_thread_info_current ();
      stack_start.307 = stack_start;
      if (ptr >= stack_start.307) goto <D.24504>; else goto <D.24505>;
      <D.24504>:
      D.24506 = info->stack_end;
      if (D.24506 > ptr) goto <D.24507>; else goto <D.24508>;
      <D.24507>:
      D.24509 = 1;
      return D.24509;
      <D.24508>:
      <D.24505>:
      D.24509 = 0;
      return D.24509;
    }
  finally
    {
      stack_start = {CLOBBER};
    }
}


mono_gc_wbarrier_generic_store (void * ptr, struct MonoObject * value)
{
  struct FILE * gc_debug_file.308;
  const char * iftmp.309;
  int D.24519;

  if (0 != 0) goto <D.24512>; else goto <D.24513>;
  <D.24512>:
  gc_debug_file.308 = gc_debug_file;
  if (value != 0B) goto <D.24516>; else goto <D.24517>;
  <D.24516>:
  iftmp.309 = safe_name (value);
  goto <D.24518>;
  <D.24517>:
  iftmp.309 = "null";
  <D.24518>:
  fprintf (gc_debug_file.308, "Wbarrier store at %p to %p (%s)\n", ptr, value, iftmp.309);
  gc_debug_file.308 = gc_debug_file;
  fflush (gc_debug_file.308);
  <D.24513>:
  MEM[(void * *)ptr] = value;
  D.24519 = sgen_ptr_in_nursery (value);
  if (D.24519 != 0) goto <D.24520>; else goto <D.24521>;
  <D.24520>:
  mono_gc_wbarrier_generic_nostore (ptr);
  <D.24521>:
  sgen_dummy_use (value);
}


sgen_dummy_use (void * v)
{
  __asm__ __volatile__("" : "=r" v : "r" v);
}


mono_gc_wbarrier_generic_store_atomic (void * ptr, struct MonoObject * value)
{
  struct FILE * gc_debug_file.310;
  const char * iftmp.311;
  int D.24529;

  if (0 != 0) goto <D.24522>; else goto <D.24523>;
  <D.24522>:
  gc_debug_file.310 = gc_debug_file;
  if (value != 0B) goto <D.24526>; else goto <D.24527>;
  <D.24526>:
  iftmp.311 = safe_name (value);
  goto <D.24528>;
  <D.24527>:
  iftmp.311 = "null";
  <D.24528>:
  fprintf (gc_debug_file.310, "Wbarrier atomic store at %p to %p (%s)\n", ptr, value, iftmp.311);
  gc_debug_file.310 = gc_debug_file;
  fflush (gc_debug_file.310);
  <D.24523>:
  InterlockedWritePointer (ptr, value);
  D.24529 = sgen_ptr_in_nursery (value);
  if (D.24529 != 0) goto <D.24530>; else goto <D.24531>;
  <D.24530>:
  mono_gc_wbarrier_generic_nostore (ptr);
  <D.24531>:
  sgen_dummy_use (value);
}


InterlockedWritePointer (void * volatile * dst, void * val)
{
  InterlockedExchangePointer (dst, val);
}


InterlockedExchangePointer (void * volatile * val, void * new_val)
{
  long unsigned int old_val.312;
  long unsigned int new_val.313;
  long unsigned int D.24534;
  void * D.24535;
  void * D.24536;
  void * old_val;

  <D.12348>:
  old_val = *val;
  old_val.312 = (long unsigned int) old_val;
  new_val.313 = (long unsigned int) new_val;
  D.24534 = __sync_val_compare_and_swap_8 (val, old_val.312, new_val.313);
  D.24535 = (void *) D.24534;
  if (D.24535 != old_val) goto <D.12348>; else goto <D.12349>;
  <D.12349>:
  D.24536 = old_val;
  return D.24536;
}


__attribute__((visibility ("hidden")))
mono_gc_wbarrier_value_copy_bitmap (void * _dest, void * _src, int size, unsigned int bitmap)
{
  unsigned int D.24538;
  long unsigned int D.24541;
  struct MonoObject * D.24542;
  mword * dest;
  mword * src;

  dest = _dest;
  src = _src;
  goto <D.21408>;
  <D.21407>:
  D.24538 = bitmap & 1;
  if (D.24538 != 0) goto <D.24539>; else goto <D.24540>;
  <D.24539>:
  D.24541 = *src;
  D.24542 = (struct MonoObject *) D.24541;
  mono_gc_wbarrier_generic_store (dest, D.24542);
  goto <D.24543>;
  <D.24540>:
  D.24541 = *src;
  *dest = D.24541;
  <D.24543>:
  src = src + 8;
  dest = dest + 8;
  size = size + -8;
  bitmap = bitmap >> 1;
  <D.21408>:
  if (size != 0) goto <D.21407>; else goto <D.21409>;
  <D.21409>:
}


mono_gc_wbarrier_value_copy (void * dest, void * src, int count, struct MonoClass * klass)
{
  long unsigned int D.24544;
  long unsigned int D.24545;
  _Bool D.24546;
  long int D.24547;
  long int D.24548;
  struct FILE * gc_debug_file.314;
  void * D.24554;
  const char * D.24555;
  int D.24558;
  int D.24560;
  long unsigned int D.24562;
  int D.24563;
  int D.24564;
  long unsigned int D.24565;
  void (*<T2ea7>) (void *, void *, int, struct MonoClass *) D.24566;

  D.24544 = BIT_FIELD_REF <*klass, 64, 256>;
  D.24545 = D.24544 & 1152921504606846976;
  D.24546 = D.24545 == 0;
  D.24547 = (long int) D.24546;
  D.24548 = __builtin_expect (D.24547, 0);
  if (D.24548 != 0) goto <D.24549>; else goto <D.24550>;
  <D.24549>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 4480, "klass->valuetype");
  <D.24550>:
  if (0 != 0) goto <D.24551>; else goto <D.24552>;
  <D.24551>:
  gc_debug_file.314 = gc_debug_file;
  D.24554 = klass->gc_descr;
  D.24555 = klass->name;
  fprintf (gc_debug_file.314, "Adding value remset at %p, count %d, descr %p for class %s (%p)\n", dest, count, D.24554, D.24555, klass);
  gc_debug_file.314 = gc_debug_file;
  fflush (gc_debug_file.314);
  <D.24552>:
  D.24558 = sgen_ptr_in_nursery (dest);
  if (D.24558 != 0) goto <D.24556>; else goto <D.24559>;
  <D.24559>:
  D.24560 = ptr_on_stack (dest);
  if (D.24560 != 0) goto <D.24556>; else goto <D.24561>;
  <D.24561>:
  D.24554 = klass->gc_descr;
  D.24562 = (long unsigned int) D.24554;
  D.24563 = sgen_gc_descr_has_references (D.24562);
  if (D.24563 == 0) goto <D.24556>; else goto <D.24557>;
  <D.24556>:
  {
    size_t element_size;
    size_t size;

    D.24564 = mono_class_value_size (klass, 0B);
    element_size = (size_t) D.24564;
    D.24565 = (long unsigned int) count;
    size = D.24565 * element_size;
    mono_gc_memmove_atomic (dest, src, size);
    return;
  }
  <D.24557>:
  D.24566 = remset.wbarrier_value_copy;
  D.24566 (dest, src, count, klass);
}


mono_gc_wbarrier_object_copy (struct MonoObject * obj, struct MonoObject * src)
{
  int D.24570;
  int D.24572;
  struct MonoVTable * D.24573;
  struct MonoClass * D.24574;
  void * D.24575;
  const void * D.24576;
  long unsigned int D.24577;
  long unsigned int D.24578;
  void (*<T2eab>) (struct MonoObject *, struct MonoObject *) D.24579;
  int size;

  D.24570 = sgen_ptr_in_nursery (obj);
  if (D.24570 != 0) goto <D.24568>; else goto <D.24571>;
  <D.24571>:
  D.24572 = ptr_on_stack (obj);
  if (D.24572 != 0) goto <D.24568>; else goto <D.24569>;
  <D.24568>:
  D.24573 = obj->vtable;
  D.24574 = D.24573->klass;
  size = D.24574->instance_size;
  D.24575 = obj + 16;
  D.24576 = src + 16;
  D.24577 = (long unsigned int) size;
  D.24578 = D.24577 + 18446744073709551600;
  mono_gc_memmove_aligned (D.24575, D.24576, D.24578);
  return;
  <D.24569>:
  D.24579 = remset.wbarrier_object_copy;
  D.24579 (obj, src);
}


mono_gc_walk_heap (int flags, int (*MonoGCReferences) (struct MonoObject *, struct MonoClass *, uintptr_t, uintptr_t, struct MonoObject * *, uintptr_t *, void *) callback, void * data)
{
  struct GCMemSection * nursery_section.315;
  char * D.24582;
  char * D.24583;
  void (*<T2e39>) (gboolean, gboolean, void (*IterateObjectCallbackFunc) (char *, size_t, void *), void *) D.24584;
  int D.24585;
  struct HeapWalkInfo hwi;

  try
    {
      hwi.flags = flags;
      hwi.callback = callback;
      hwi.data = data;
      sgen_clear_nursery_fragments ();
      nursery_section.315 = nursery_section;
      D.24582 = nursery_section.315->data;
      nursery_section.315 = nursery_section;
      D.24583 = nursery_section.315->end_data;
      sgen_scan_area_with_callback (D.24582, D.24583, walk_references, &hwi, 0);
      D.24584 = major_collector.iterate_objects;
      D.24584 (1, 1, walk_references, &hwi);
      sgen_los_iterate_objects (walk_references, &hwi);
      D.24585 = 0;
      return D.24585;
    }
  finally
    {
      hwi = {CLOBBER};
    }
}


walk_references (char * start, size_t size, void * data)
{
  int D.24590;
  int D.24592;
  int (*<T30a4>) (struct MonoObject *, struct MonoClass *, uintptr_t, uintptr_t, struct MonoObject * *, uintptr_t *, void *) D.24593;
  struct MonoVTable * D.24594;
  struct MonoClass * D.24595;
  size_t iftmp.316;
  long unsigned int D.24600;
  struct MonoObject *[128] * D.24601;
  uintptr_t[128] * D.24602;
  void * D.24603;
  struct HeapWalkInfo * hwi;

  hwi = data;
  hwi->called = 0;
  hwi->count = 0;
  collect_references (hwi, start, size);
  D.24590 = hwi->count;
  if (D.24590 != 0) goto <D.24588>; else goto <D.24591>;
  <D.24591>:
  D.24592 = hwi->called;
  if (D.24592 == 0) goto <D.24588>; else goto <D.24589>;
  <D.24588>:
  D.24593 = hwi->callback;
  D.24594 = MEM[(struct MonoObject *)start].vtable;
  D.24595 = D.24594->klass;
  D.24592 = hwi->called;
  if (D.24592 == 0) goto <D.24597>; else goto <D.24598>;
  <D.24597>:
  iftmp.316 = size;
  goto <D.24599>;
  <D.24598>:
  iftmp.316 = 0;
  <D.24599>:
  D.24590 = hwi->count;
  D.24600 = (long unsigned int) D.24590;
  D.24601 = &hwi->refs;
  D.24602 = &hwi->offsets;
  D.24603 = hwi->data;
  D.24593 (start, D.24595, iftmp.316, D.24600, D.24601, D.24602, D.24603);
  <D.24589>:
}


collect_references (struct HeapWalkInfo * hwi, char * start, size_t size)
{
  long unsigned int D.24604;
  long unsigned int D.24605;
  long unsigned int D.24606;
  long unsigned int D.24607;
  long unsigned int D.24610;
  long unsigned int D.24611;
  long unsigned int D.24612;
  long unsigned int D.24613;
  long unsigned int D.24614;
  long unsigned int D.24615;
  void * D.24616;
  int D.24619;
  int (*<T30a4>) (struct MonoObject *, struct MonoClass *, uintptr_t, uintptr_t, struct MonoObject * *, uintptr_t *, void *) D.24622;
  struct MonoVTable * D.24623;
  struct MonoClass * D.24624;
  size_t iftmp.317;
  int D.24626;
  long unsigned int D.24630;
  struct MonoObject *[128] * D.24631;
  uintptr_t[128] * D.24632;
  void * D.24633;
  long int _objptr.318;
  long int start.319;
  long int D.24636;
  long unsigned int D.24637;
  int D.24638;
  int D.24639;
  size_t iftmp.320;
  int D.24648;
  int D.24649;
  long unsigned int D.24650;
  long unsigned int D.24651;
  int D.24652;
  void * D.24653;
  size_t iftmp.321;
  long int _objptr.322;
  long int D.24663;
  long unsigned int D.24664;
  int D.24665;
  int D.24666;
  long unsigned int D.24667;
  long unsigned int D.24668;
  int D.24669;
  size_t iftmp.323;
  int D.24678;
  int D.24679;
  long unsigned int D.24680;
  long unsigned int D.24683;
  int D.24684;
  int D.24685;
  unsigned int D.24688;
  unsigned int el_size.324;
  unsigned int D.24690;
  sizetype D.24691;
  void * D.24692;
  size_t iftmp.325;
  long int p.326;
  long int D.24702;
  long unsigned int D.24703;
  int D.24704;
  int D.24705;
  int D.24709;
  int D.24710;
  long unsigned int D.24711;
  long unsigned int D.24712;
  long unsigned int D.24713;
  long unsigned int D.24714;
  void * * D.24715;
  void * D.24716;
  size_t iftmp.327;
  long int D.24725;
  long int D.24726;
  long unsigned int D.24727;
  int D.24728;
  int D.24729;
  sizetype D.24730;
  long unsigned int D.24734;
  void * D.24737;
  size_t iftmp.328;
  long int p.329;
  long int D.24747;
  long unsigned int D.24748;
  int D.24749;
  int D.24750;
  long unsigned int D.24751;
  void * D.24754;
  size_t iftmp.330;
  long int _objptr.331;
  long int D.24764;
  long unsigned int D.24765;
  int D.24766;
  int D.24767;
  long unsigned int D.24768;
  unsigned int D.24769;
  unsigned int D.24770;
  struct MonoVTable * D.24773;
  struct MonoClass * D.24774;
  const char * D.24775;
  const char * D.24776;
  gsize * bitmap_data.332;
  long unsigned int D.24778;
  void * D.24781;
  size_t iftmp.333;
  long int _objptr.334;
  long int D.24791;
  long unsigned int D.24792;
  int D.24793;
  int D.24794;
  int bwords.335;
  long unsigned int D.24796;
  gsize * mbitmap_data.336;
  long unsigned int D.24798;
  unsigned int D.24799;
  unsigned int D.24800;
  struct MonoClass * D.24801;
  unsigned int el_size.337;
  unsigned int D.24803;
  sizetype D.24804;
  const char * D.24807;
  const char * D.24808;
  gsize * bitmap_data.338;
  long unsigned int D.24810;
  void * D.24813;
  size_t iftmp.339;
  long int _objptr.340;
  long int D.24823;
  long unsigned int D.24824;
  int D.24825;
  int D.24826;
  unsigned int bwords.341;
  sizetype D.24828;

  {
    struct GCVTable * vt;
    mword desc;

    D.24604 = MEM[(mword *)start];
    D.24605 = D.24604 & 18446744073709551612;
    vt = (struct GCVTable *) D.24605;
    desc = vt->desc;
    D.24606 = desc & 7;
    switch (D.24606) <default: <D.21524>, case 1: <D.21439>, case 2: <D.21446>, case 3: <D.21490>, case 4: <D.21454>, case 5: <D.21484>, case 6: <D.21503>, case 7: <D.21523>>
    <D.21439>:
    D.24607 = desc & 4294901760;
    if (D.24607 != 0) goto <D.24608>; else goto <D.24609>;
    <D.24608>:
    {
      void * * _objptr_end;
      void * * _objptr;

      _objptr = start;
      D.24610 = desc >> 16;
      D.24611 = D.24610 & 255;
      D.24612 = D.24611 * 8;
      _objptr = _objptr + D.24612;
      D.24613 = desc >> 24;
      D.24614 = D.24613 & 255;
      D.24615 = D.24614 * 8;
      _objptr_end = _objptr + D.24615;
      D.24616 = *_objptr;
      if (D.24616 != 0B) goto <D.24617>; else goto <D.24618>;
      <D.24617>:
      D.24619 = hwi->count;
      if (D.24619 == 128) goto <D.24620>; else goto <D.24621>;
      <D.24620>:
      D.24622 = hwi->callback;
      D.24623 = MEM[(struct MonoObject *)start].vtable;
      D.24624 = D.24623->klass;
      D.24626 = hwi->called;
      if (D.24626 == 0) goto <D.24627>; else goto <D.24628>;
      <D.24627>:
      iftmp.317 = size;
      goto <D.24629>;
      <D.24628>:
      iftmp.317 = 0;
      <D.24629>:
      D.24619 = hwi->count;
      D.24630 = (long unsigned int) D.24619;
      D.24631 = &hwi->refs;
      D.24632 = &hwi->offsets;
      D.24633 = hwi->data;
      D.24622 (start, D.24624, iftmp.317, D.24630, D.24631, D.24632, D.24633);
      hwi->count = 0;
      hwi->called = 1;
      <D.24621>:
      D.24619 = hwi->count;
      _objptr.318 = (long int) _objptr;
      start.319 = (long int) start;
      D.24636 = _objptr.318 - start.319;
      D.24637 = (long unsigned int) D.24636;
      hwi->offsets[D.24619] = D.24637;
      D.24619 = hwi->count;
      D.24638 = D.24619;
      D.24639 = D.24638 + 1;
      hwi->count = D.24639;
      D.24616 = *_objptr;
      hwi->refs[D.24638] = D.24616;
      <D.24618>:
      _objptr = _objptr + 8;
      goto <D.21443>;
      <D.21442>:
      D.24616 = *_objptr;
      if (D.24616 != 0B) goto <D.24640>; else goto <D.24641>;
      <D.24640>:
      D.24619 = hwi->count;
      if (D.24619 == 128) goto <D.24642>; else goto <D.24643>;
      <D.24642>:
      D.24622 = hwi->callback;
      D.24623 = MEM[(struct MonoObject *)start].vtable;
      D.24624 = D.24623->klass;
      D.24626 = hwi->called;
      if (D.24626 == 0) goto <D.24645>; else goto <D.24646>;
      <D.24645>:
      iftmp.320 = size;
      goto <D.24647>;
      <D.24646>:
      iftmp.320 = 0;
      <D.24647>:
      D.24619 = hwi->count;
      D.24630 = (long unsigned int) D.24619;
      D.24631 = &hwi->refs;
      D.24632 = &hwi->offsets;
      D.24633 = hwi->data;
      D.24622 (start, D.24624, iftmp.320, D.24630, D.24631, D.24632, D.24633);
      hwi->count = 0;
      hwi->called = 1;
      <D.24643>:
      D.24619 = hwi->count;
      _objptr.318 = (long int) _objptr;
      start.319 = (long int) start;
      D.24636 = _objptr.318 - start.319;
      D.24637 = (long unsigned int) D.24636;
      hwi->offsets[D.24619] = D.24637;
      D.24619 = hwi->count;
      D.24648 = D.24619;
      D.24649 = D.24648 + 1;
      hwi->count = D.24649;
      D.24616 = *_objptr;
      hwi->refs[D.24648] = D.24616;
      <D.24641>:
      _objptr = _objptr + 8;
      <D.21443>:
      if (_objptr < _objptr_end) goto <D.21442>; else goto <D.21444>;
      <D.21444>:
    }
    <D.24609>:
    goto <D.21445>;
    <D.21446>:
    {
      void * * _objptr;
      gsize _bmap;

      _objptr = start;
      _bmap = desc >> 16;
      _objptr = _objptr + 16;
      {
        int _index;

        _index = __builtin_ctzl (_bmap);
        D.24650 = (long unsigned int) _index;
        D.24651 = D.24650 * 8;
        _objptr = _objptr + D.24651;
        D.24652 = _index + 1;
        _bmap = _bmap >> D.24652;
        D.24653 = *_objptr;
        if (D.24653 != 0B) goto <D.24654>; else goto <D.24655>;
        <D.24654>:
        D.24619 = hwi->count;
        if (D.24619 == 128) goto <D.24656>; else goto <D.24657>;
        <D.24656>:
        D.24622 = hwi->callback;
        D.24623 = MEM[(struct MonoObject *)start].vtable;
        D.24624 = D.24623->klass;
        D.24626 = hwi->called;
        if (D.24626 == 0) goto <D.24659>; else goto <D.24660>;
        <D.24659>:
        iftmp.321 = size;
        goto <D.24661>;
        <D.24660>:
        iftmp.321 = 0;
        <D.24661>:
        D.24619 = hwi->count;
        D.24630 = (long unsigned int) D.24619;
        D.24631 = &hwi->refs;
        D.24632 = &hwi->offsets;
        D.24633 = hwi->data;
        D.24622 (start, D.24624, iftmp.321, D.24630, D.24631, D.24632, D.24633);
        hwi->count = 0;
        hwi->called = 1;
        <D.24657>:
        D.24619 = hwi->count;
        _objptr.322 = (long int) _objptr;
        start.319 = (long int) start;
        D.24663 = _objptr.322 - start.319;
        D.24664 = (long unsigned int) D.24663;
        hwi->offsets[D.24619] = D.24664;
        D.24619 = hwi->count;
        D.24665 = D.24619;
        D.24666 = D.24665 + 1;
        hwi->count = D.24666;
        D.24653 = *_objptr;
        hwi->refs[D.24665] = D.24653;
        <D.24655>:
        _objptr = _objptr + 8;
      }
      goto <D.21452>;
      <D.21451>:
      {
        int _index;

        _index = __builtin_ctzl (_bmap);
        D.24667 = (long unsigned int) _index;
        D.24668 = D.24667 * 8;
        _objptr = _objptr + D.24668;
        D.24669 = _index + 1;
        _bmap = _bmap >> D.24669;
        D.24653 = *_objptr;
        if (D.24653 != 0B) goto <D.24670>; else goto <D.24671>;
        <D.24670>:
        D.24619 = hwi->count;
        if (D.24619 == 128) goto <D.24672>; else goto <D.24673>;
        <D.24672>:
        D.24622 = hwi->callback;
        D.24623 = MEM[(struct MonoObject *)start].vtable;
        D.24624 = D.24623->klass;
        D.24626 = hwi->called;
        if (D.24626 == 0) goto <D.24675>; else goto <D.24676>;
        <D.24675>:
        iftmp.323 = size;
        goto <D.24677>;
        <D.24676>:
        iftmp.323 = 0;
        <D.24677>:
        D.24619 = hwi->count;
        D.24630 = (long unsigned int) D.24619;
        D.24631 = &hwi->refs;
        D.24632 = &hwi->offsets;
        D.24633 = hwi->data;
        D.24622 (start, D.24624, iftmp.323, D.24630, D.24631, D.24632, D.24633);
        hwi->count = 0;
        hwi->called = 1;
        <D.24673>:
        D.24619 = hwi->count;
        _objptr.322 = (long int) _objptr;
        start.319 = (long int) start;
        D.24663 = _objptr.322 - start.319;
        D.24664 = (long unsigned int) D.24663;
        hwi->offsets[D.24619] = D.24664;
        D.24619 = hwi->count;
        D.24678 = D.24619;
        D.24679 = D.24678 + 1;
        hwi->count = D.24679;
        D.24653 = *_objptr;
        hwi->refs[D.24678] = D.24653;
        <D.24671>:
        _objptr = _objptr + 8;
      }
      <D.21452>:
      if (_bmap != 0) goto <D.21451>; else goto <D.21453>;
      <D.21453>:
    }
    goto <D.21445>;
    <D.21454>:
    D.24680 = desc & 4294950912;
    if (D.24680 != 0) goto <D.24681>; else goto <D.24682>;
    <D.24681>:
    {
      int el_size;
      int etype;

      D.24683 = desc >> 3;
      D.24684 = (int) D.24683;
      el_size = D.24684 & 1023;
      D.24685 = (int) desc;
      etype = D.24685 & 49152;
      if (etype == 16384) goto <D.24686>; else goto <D.24687>;
      <D.24686>:
      {
        void * * p;
        void * * end_refs;

        p = start + 32;
        D.24688 = MEM[(struct MonoArray *)start].max_length;
        el_size.324 = (unsigned int) el_size;
        D.24690 = D.24688 * el_size.324;
        D.24691 = (sizetype) D.24690;
        end_refs = p + D.24691;
        goto <D.21460>;
        <D.21459>:
        D.24692 = *p;
        if (D.24692 != 0B) goto <D.24693>; else goto <D.24694>;
        <D.24693>:
        D.24619 = hwi->count;
        if (D.24619 == 128) goto <D.24695>; else goto <D.24696>;
        <D.24695>:
        D.24622 = hwi->callback;
        D.24623 = MEM[(struct MonoObject *)start].vtable;
        D.24624 = D.24623->klass;
        D.24626 = hwi->called;
        if (D.24626 == 0) goto <D.24698>; else goto <D.24699>;
        <D.24698>:
        iftmp.325 = size;
        goto <D.24700>;
        <D.24699>:
        iftmp.325 = 0;
        <D.24700>:
        D.24619 = hwi->count;
        D.24630 = (long unsigned int) D.24619;
        D.24631 = &hwi->refs;
        D.24632 = &hwi->offsets;
        D.24633 = hwi->data;
        D.24622 (start, D.24624, iftmp.325, D.24630, D.24631, D.24632, D.24633);
        hwi->count = 0;
        hwi->called = 1;
        <D.24696>:
        D.24619 = hwi->count;
        p.326 = (long int) p;
        start.319 = (long int) start;
        D.24702 = p.326 - start.319;
        D.24703 = (long unsigned int) D.24702;
        hwi->offsets[D.24619] = D.24703;
        D.24619 = hwi->count;
        D.24704 = D.24619;
        D.24705 = D.24704 + 1;
        hwi->count = D.24705;
        D.24692 = *p;
        hwi->refs[D.24704] = D.24692;
        <D.24694>:
        p = p + 8;
        <D.21460>:
        if (p < end_refs) goto <D.21459>; else goto <D.21461>;
        <D.21461>:
      }
      goto <D.24706>;
      <D.24687>:
      if (etype == 32768) goto <D.24707>; else goto <D.24708>;
      <D.24707>:
      {
        int offset;
        int num_refs;
        char * e_start;
        char * e_end;

        D.24610 = desc >> 16;
        D.24709 = (int) D.24610;
        offset = D.24709 & 255;
        D.24613 = desc >> 24;
        D.24710 = (int) D.24613;
        num_refs = D.24710 & 255;
        e_start = start + 32;
        D.24688 = MEM[(struct MonoArray *)start].max_length;
        el_size.324 = (unsigned int) el_size;
        D.24690 = D.24688 * el_size.324;
        D.24691 = (sizetype) D.24690;
        e_end = e_start + D.24691;
        goto <D.21472>;
        <D.21471>:
        {
          void * * p;
          int i;

          p = e_start;
          D.24711 = (long unsigned int) offset;
          D.24712 = D.24711 * 8;
          p = p + D.24712;
          i = 0;
          goto <D.21469>;
          <D.21468>:
          D.24713 = (long unsigned int) i;
          D.24714 = D.24713 * 8;
          D.24715 = p + D.24714;
          D.24716 = *D.24715;
          if (D.24716 != 0B) goto <D.24717>; else goto <D.24718>;
          <D.24717>:
          D.24619 = hwi->count;
          if (D.24619 == 128) goto <D.24719>; else goto <D.24720>;
          <D.24719>:
          D.24622 = hwi->callback;
          D.24623 = MEM[(struct MonoObject *)start].vtable;
          D.24624 = D.24623->klass;
          D.24626 = hwi->called;
          if (D.24626 == 0) goto <D.24722>; else goto <D.24723>;
          <D.24722>:
          iftmp.327 = size;
          goto <D.24724>;
          <D.24723>:
          iftmp.327 = 0;
          <D.24724>:
          D.24619 = hwi->count;
          D.24630 = (long unsigned int) D.24619;
          D.24631 = &hwi->refs;
          D.24632 = &hwi->offsets;
          D.24633 = hwi->data;
          D.24622 (start, D.24624, iftmp.327, D.24630, D.24631, D.24632, D.24633);
          hwi->count = 0;
          hwi->called = 1;
          <D.24720>:
          D.24619 = hwi->count;
          D.24713 = (long unsigned int) i;
          D.24714 = D.24713 * 8;
          D.24715 = p + D.24714;
          D.24725 = (long int) D.24715;
          start.319 = (long int) start;
          D.24726 = D.24725 - start.319;
          D.24727 = (long unsigned int) D.24726;
          hwi->offsets[D.24619] = D.24727;
          D.24619 = hwi->count;
          D.24728 = D.24619;
          D.24729 = D.24728 + 1;
          hwi->count = D.24729;
          D.24713 = (long unsigned int) i;
          D.24714 = D.24713 * 8;
          D.24715 = p + D.24714;
          D.24716 = *D.24715;
          hwi->refs[D.24728] = D.24716;
          <D.24718>:
          i = i + 1;
          <D.21469>:
          if (i < num_refs) goto <D.21468>; else goto <D.21470>;
          <D.21470>:
          D.24730 = (sizetype) el_size;
          e_start = e_start + D.24730;
        }
        <D.21472>:
        if (e_start < e_end) goto <D.21471>; else goto <D.21473>;
        <D.21473>:
      }
      goto <D.24731>;
      <D.24708>:
      if (etype == 49152) goto <D.24732>; else goto <D.24733>;
      <D.24732>:
      {
        char * e_start;
        char * e_end;

        e_start = start + 32;
        D.24688 = MEM[(struct MonoArray *)start].max_length;
        el_size.324 = (unsigned int) el_size;
        D.24690 = D.24688 * el_size.324;
        D.24691 = (sizetype) D.24690;
        e_end = e_start + D.24691;
        goto <D.21482>;
        <D.21481>:
        {
          void * * p;
          gsize _bmap;

          p = e_start;
          _bmap = desc >> 16;
          goto <D.21479>;
          <D.21478>:
          D.24734 = _bmap & 1;
          if (D.24734 != 0) goto <D.24735>; else goto <D.24736>;
          <D.24735>:
          D.24737 = *p;
          if (D.24737 != 0B) goto <D.24738>; else goto <D.24739>;
          <D.24738>:
          D.24619 = hwi->count;
          if (D.24619 == 128) goto <D.24740>; else goto <D.24741>;
          <D.24740>:
          D.24622 = hwi->callback;
          D.24623 = MEM[(struct MonoObject *)start].vtable;
          D.24624 = D.24623->klass;
          D.24626 = hwi->called;
          if (D.24626 == 0) goto <D.24743>; else goto <D.24744>;
          <D.24743>:
          iftmp.328 = size;
          goto <D.24745>;
          <D.24744>:
          iftmp.328 = 0;
          <D.24745>:
          D.24619 = hwi->count;
          D.24630 = (long unsigned int) D.24619;
          D.24631 = &hwi->refs;
          D.24632 = &hwi->offsets;
          D.24633 = hwi->data;
          D.24622 (start, D.24624, iftmp.328, D.24630, D.24631, D.24632, D.24633);
          hwi->count = 0;
          hwi->called = 1;
          <D.24741>:
          D.24619 = hwi->count;
          p.329 = (long int) p;
          start.319 = (long int) start;
          D.24747 = p.329 - start.319;
          D.24748 = (long unsigned int) D.24747;
          hwi->offsets[D.24619] = D.24748;
          D.24619 = hwi->count;
          D.24749 = D.24619;
          D.24750 = D.24749 + 1;
          hwi->count = D.24750;
          D.24737 = *p;
          hwi->refs[D.24749] = D.24737;
          <D.24739>:
          <D.24736>:
          _bmap = _bmap >> 1;
          p = p + 8;
          <D.21479>:
          if (_bmap != 0) goto <D.21478>; else goto <D.21480>;
          <D.21480>:
          D.24730 = (sizetype) el_size;
          e_start = e_start + D.24730;
        }
        <D.21482>:
        if (e_start < e_end) goto <D.21481>; else goto <D.21483>;
        <D.21483>:
      }
      <D.24733>:
      <D.24731>:
      <D.24706>:
    }
    <D.24682>:
    goto <D.21445>;
    <D.21484>:
    {
      void * * _objptr;
      gsize _bmap;

      _objptr = start;
      _bmap = desc >> 3;
      _objptr = _objptr + 16;
      goto <D.21488>;
      <D.21487>:
      D.24751 = _bmap & 1;
      if (D.24751 != 0) goto <D.24752>; else goto <D.24753>;
      <D.24752>:
      D.24754 = *_objptr;
      if (D.24754 != 0B) goto <D.24755>; else goto <D.24756>;
      <D.24755>:
      D.24619 = hwi->count;
      if (D.24619 == 128) goto <D.24757>; else goto <D.24758>;
      <D.24757>:
      D.24622 = hwi->callback;
      D.24623 = MEM[(struct MonoObject *)start].vtable;
      D.24624 = D.24623->klass;
      D.24626 = hwi->called;
      if (D.24626 == 0) goto <D.24760>; else goto <D.24761>;
      <D.24760>:
      iftmp.330 = size;
      goto <D.24762>;
      <D.24761>:
      iftmp.330 = 0;
      <D.24762>:
      D.24619 = hwi->count;
      D.24630 = (long unsigned int) D.24619;
      D.24631 = &hwi->refs;
      D.24632 = &hwi->offsets;
      D.24633 = hwi->data;
      D.24622 (start, D.24624, iftmp.330, D.24630, D.24631, D.24632, D.24633);
      hwi->count = 0;
      hwi->called = 1;
      <D.24758>:
      D.24619 = hwi->count;
      _objptr.331 = (long int) _objptr;
      start.319 = (long int) start;
      D.24764 = _objptr.331 - start.319;
      D.24765 = (long unsigned int) D.24764;
      hwi->offsets[D.24619] = D.24765;
      D.24619 = hwi->count;
      D.24766 = D.24619;
      D.24767 = D.24766 + 1;
      hwi->count = D.24767;
      D.24754 = *_objptr;
      hwi->refs[D.24766] = D.24754;
      <D.24756>:
      <D.24753>:
      _bmap = _bmap >> 1;
      _objptr = _objptr + 8;
      <D.21488>:
      if (_bmap != 0) goto <D.21487>; else goto <D.21489>;
      <D.21489>:
    }
    goto <D.21445>;
    <D.21490>:
    {
      void * * _objptr;
      gsize * bitmap_data;
      int bwords;
      void * * start_run;

      _objptr = start;
      bitmap_data = sgen_get_complex_descriptor (desc);
      D.24768 = *bitmap_data;
      D.24769 = (unsigned int) D.24768;
      D.24770 = D.24769 + 4294967295;
      bwords = (int) D.24770;
      start_run = _objptr;
      bitmap_data = bitmap_data + 8;
      if (0 != 0) goto <D.24771>; else goto <D.24772>;
      <D.24771>:
      {
        struct MonoObject * myobj;

        myobj = start;
        D.24773 = myobj->vtable;
        D.24774 = D.24773->klass;
        D.24775 = D.24774->name_space;
        D.24773 = myobj->vtable;
        D.24774 = D.24773->klass;
        D.24776 = D.24774->name;
        monoeg_g_print ("found %d at %p (0x%zx): %s.%s\n", bwords, start, desc, D.24775, D.24776);
      }
      <D.24772>:
      goto <D.21501>;
      <D.21500>:
      {
        gsize _bmap;

        bitmap_data.332 = bitmap_data;
        bitmap_data = bitmap_data.332 + 8;
        _bmap = *bitmap_data.332;
        _objptr = start_run;
        goto <D.21498>;
        <D.21497>:
        D.24778 = _bmap & 1;
        if (D.24778 != 0) goto <D.24779>; else goto <D.24780>;
        <D.24779>:
        D.24781 = *_objptr;
        if (D.24781 != 0B) goto <D.24782>; else goto <D.24783>;
        <D.24782>:
        D.24619 = hwi->count;
        if (D.24619 == 128) goto <D.24784>; else goto <D.24785>;
        <D.24784>:
        D.24622 = hwi->callback;
        D.24623 = MEM[(struct MonoObject *)start].vtable;
        D.24624 = D.24623->klass;
        D.24626 = hwi->called;
        if (D.24626 == 0) goto <D.24787>; else goto <D.24788>;
        <D.24787>:
        iftmp.333 = size;
        goto <D.24789>;
        <D.24788>:
        iftmp.333 = 0;
        <D.24789>:
        D.24619 = hwi->count;
        D.24630 = (long unsigned int) D.24619;
        D.24631 = &hwi->refs;
        D.24632 = &hwi->offsets;
        D.24633 = hwi->data;
        D.24622 (start, D.24624, iftmp.333, D.24630, D.24631, D.24632, D.24633);
        hwi->count = 0;
        hwi->called = 1;
        <D.24785>:
        D.24619 = hwi->count;
        _objptr.334 = (long int) _objptr;
        start.319 = (long int) start;
        D.24791 = _objptr.334 - start.319;
        D.24792 = (long unsigned int) D.24791;
        hwi->offsets[D.24619] = D.24792;
        D.24619 = hwi->count;
        D.24793 = D.24619;
        D.24794 = D.24793 + 1;
        hwi->count = D.24794;
        D.24781 = *_objptr;
        hwi->refs[D.24793] = D.24781;
        <D.24783>:
        <D.24780>:
        _bmap = _bmap >> 1;
        _objptr = _objptr + 8;
        <D.21498>:
        if (_bmap != 0) goto <D.21497>; else goto <D.21499>;
        <D.21499>:
        start_run = start_run + 512;
      }
      <D.21501>:
      bwords.335 = bwords;
      bwords = bwords.335 + -1;
      if (bwords.335 > 0) goto <D.21500>; else goto <D.21502>;
      <D.21502>:
    }
    goto <D.21445>;
    <D.21503>:
    {
      gsize * mbitmap_data;
      int mbwords;
      int el_size;
      char * e_start;
      char * e_end;

      D.24796 = vt->desc;
      mbitmap_data = sgen_get_complex_descriptor (D.24796);
      mbitmap_data.336 = mbitmap_data;
      mbitmap_data = mbitmap_data.336 + 8;
      D.24798 = *mbitmap_data.336;
      D.24799 = (unsigned int) D.24798;
      D.24800 = D.24799 + 4294967295;
      mbwords = (int) D.24800;
      D.24801 = vt->klass;
      el_size = mono_array_element_size (D.24801);
      e_start = start + 32;
      D.24688 = MEM[(struct MonoArray *)start].max_length;
      el_size.337 = (unsigned int) el_size;
      D.24803 = D.24688 * el_size.337;
      D.24804 = (sizetype) D.24803;
      e_end = e_start + D.24804;
      if (0 != 0) goto <D.24805>; else goto <D.24806>;
      <D.24805>:
      D.24796 = vt->desc;
      D.24801 = vt->klass;
      D.24807 = D.24801->name_space;
      D.24801 = vt->klass;
      D.24808 = D.24801->name;
      monoeg_g_print ("found %d at %p (0x%zx): %s.%s\n", mbwords, start, D.24796, D.24807, D.24808);
      <D.24806>:
      goto <D.21521>;
      <D.21520>:
      {
        void * * _objptr;
        gsize * bitmap_data;
        unsigned int bwords;

        _objptr = e_start;
        bitmap_data = mbitmap_data;
        bwords = (unsigned int) mbwords;
        goto <D.21518>;
        <D.21517>:
        {
          gsize _bmap;
          void * * start_run;

          bitmap_data.338 = bitmap_data;
          bitmap_data = bitmap_data.338 + 8;
          _bmap = *bitmap_data.338;
          start_run = _objptr;
          goto <D.21515>;
          <D.21514>:
          D.24810 = _bmap & 1;
          if (D.24810 != 0) goto <D.24811>; else goto <D.24812>;
          <D.24811>:
          D.24813 = *_objptr;
          if (D.24813 != 0B) goto <D.24814>; else goto <D.24815>;
          <D.24814>:
          D.24619 = hwi->count;
          if (D.24619 == 128) goto <D.24816>; else goto <D.24817>;
          <D.24816>:
          D.24622 = hwi->callback;
          D.24623 = MEM[(struct MonoObject *)start].vtable;
          D.24624 = D.24623->klass;
          D.24626 = hwi->called;
          if (D.24626 == 0) goto <D.24819>; else goto <D.24820>;
          <D.24819>:
          iftmp.339 = size;
          goto <D.24821>;
          <D.24820>:
          iftmp.339 = 0;
          <D.24821>:
          D.24619 = hwi->count;
          D.24630 = (long unsigned int) D.24619;
          D.24631 = &hwi->refs;
          D.24632 = &hwi->offsets;
          D.24633 = hwi->data;
          D.24622 (start, D.24624, iftmp.339, D.24630, D.24631, D.24632, D.24633);
          hwi->count = 0;
          hwi->called = 1;
          <D.24817>:
          D.24619 = hwi->count;
          _objptr.340 = (long int) _objptr;
          start.319 = (long int) start;
          D.24823 = _objptr.340 - start.319;
          D.24824 = (long unsigned int) D.24823;
          hwi->offsets[D.24619] = D.24824;
          D.24619 = hwi->count;
          D.24825 = D.24619;
          D.24826 = D.24825 + 1;
          hwi->count = D.24826;
          D.24813 = *_objptr;
          hwi->refs[D.24825] = D.24813;
          <D.24815>:
          <D.24812>:
          _bmap = _bmap >> 1;
          _objptr = _objptr + 8;
          <D.21515>:
          if (_bmap != 0) goto <D.21514>; else goto <D.21516>;
          <D.21516>:
          _objptr = start_run + 512;
        }
        <D.21518>:
        bwords.341 = bwords;
        bwords = bwords.341 + 4294967295;
        if (bwords.341 != 0) goto <D.21517>; else goto <D.21519>;
        <D.21519>:
        D.24828 = (sizetype) el_size;
        e_start = e_start + D.24828;
      }
      <D.21521>:
      if (e_start < e_end) goto <D.21520>; else goto <D.21522>;
      <D.21522>:
    }
    goto <D.21445>;
    <D.21523>:
    goto <D.21445>;
    <D.21524>:
    monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-scan-object.h", 111);
    <D.21445>:
  }
}


mono_gc_collect (int generation)
{
  pthread_mutex_lock (&gc_mutex);
  if (generation > 1) goto <D.24830>; else goto <D.24831>;
  <D.24830>:
  generation = 1;
  <D.24831>:
  sgen_perform_collection (0, generation, "user request", 1);
  sgen_gc_unlock ();
}


mono_gc_max_generation ()
{
  int D.24832;

  D.24832 = 1;
  return D.24832;
}


mono_gc_collection_count (int generation)
{
  int D.24836;

  if (generation == 0) goto <D.24834>; else goto <D.24835>;
  <D.24834>:
  D.24836 = stat_minor_gcs;
  return D.24836;
  <D.24835>:
  D.24836 = stat_major_gcs;
  return D.24836;
}


mono_gc_get_used_size ()
{
  long unsigned int los_memory_usage.342;
  struct GCMemSection * nursery_section.343;
  char * D.24840;
  long int D.24841;
  char * D.24842;
  long int D.24843;
  long int D.24844;
  gint64 (*<T2e55>) (void) D.24845;
  long int D.24846;
  int64_t D.24847;
  gint64 tot;

  tot = 0;
  pthread_mutex_lock (&gc_mutex);
  los_memory_usage.342 = los_memory_usage;
  tot = (gint64) los_memory_usage.342;
  nursery_section.343 = nursery_section;
  D.24840 = nursery_section.343->next_data;
  D.24841 = (long int) D.24840;
  nursery_section.343 = nursery_section;
  D.24842 = nursery_section.343->data;
  D.24843 = (long int) D.24842;
  D.24844 = D.24841 - D.24843;
  tot = D.24844 + tot;
  D.24845 = major_collector.get_used_size;
  D.24846 = D.24845 ();
  tot = D.24846 + tot;
  sgen_gc_unlock ();
  D.24847 = tot;
  return D.24847;
}


__attribute__((visibility ("hidden")))
mono_gc_get_los_limit ()
{
  int D.24849;

  D.24849 = 8000;
  return D.24849;
}


__attribute__((visibility ("hidden")))
mono_gc_user_markers_supported ()
{
  gboolean D.24851;

  D.24851 = 1;
  return D.24851;
}


mono_object_is_alive (struct MonoObject * o)
{
  gboolean D.24853;

  D.24853 = 1;
  return D.24853;
}


mono_gc_get_generation (struct MonoObject * obj)
{
  int D.24855;
  int D.24858;

  D.24855 = sgen_ptr_in_nursery (obj);
  if (D.24855 != 0) goto <D.24856>; else goto <D.24857>;
  <D.24856>:
  D.24858 = 0;
  return D.24858;
  <D.24857>:
  D.24858 = 1;
  return D.24858;
}


mono_gc_enable_events ()
{

}


__attribute__((visibility ("hidden")))
mono_gc_weak_link_add (void * * link_addr, struct MonoObject * obj, gboolean track)
{
  sgen_register_disappearing_link (obj, link_addr, track, 0);
}


__attribute__((visibility ("hidden")))
mono_gc_weak_link_remove (void * * link_addr, gboolean track)
{
  sgen_register_disappearing_link (0B, link_addr, track, 0);
}


__attribute__((visibility ("hidden")))
mono_gc_weak_link_get (void * * link_addr)
{
  long unsigned int ptr.344;
  long unsigned int D.24863;
  long unsigned int D.24864;
  struct MonoObject * D.24866;
  int bridge_processing_in_progress.345;
  _Bool D.24868;
  long int D.24869;
  long int D.24870;
  void * D.24873;
  void * volatile * link_addr_volatile;
  void * ptr;
  struct MonoObject * obj;
  void retry = <<< error >>>;

  retry:
  link_addr_volatile = link_addr;
  ptr = *link_addr_volatile;
  if (ptr != 0B) goto <D.24860>; else goto <D.24861>;
  <D.24860>:
  ptr.344 = (long unsigned int) ptr;
  D.24863 = ~ptr.344;
  D.24864 = D.24863 & 18446744073709551612;
  obj = (struct MonoObject *) D.24864;
  goto <D.24865>;
  <D.24861>:
  D.24866 = 0B;
  return D.24866;
  <D.24865>:
  mono_memory_barrier ();
  bridge_processing_in_progress.345 = bridge_processing_in_progress;
  D.24868 = bridge_processing_in_progress.345 != 0;
  D.24869 = (long int) D.24868;
  D.24870 = __builtin_expect (D.24869, 0);
  if (D.24870 != 0) goto <D.24871>; else goto <D.24872>;
  <D.24871>:
  mono_gc_wait_for_bridge_processing ();
  <D.24872>:
  D.24873 = *link_addr_volatile;
  if (D.24873 != ptr) goto retry; else goto <D.24874>;
  <D.24874>:
  D.24866 = obj;
  return D.24866;
}


mono_memory_barrier ()
{
  __sync_synchronize ();
}


__attribute__((visibility ("hidden")))
mono_gc_ephemeron_array_add (struct MonoObject * obj)
{
  gboolean D.24878;
  struct EphemeronLinkNode * ephemeron_list.346;
  struct FILE * gc_debug_file.347;
  struct EphemeronLinkNode * node;

  pthread_mutex_lock (&gc_mutex);
  node = sgen_alloc_internal (18);
  if (node == 0B) goto <D.24876>; else goto <D.24877>;
  <D.24876>:
  sgen_gc_unlock ();
  D.24878 = 0;
  return D.24878;
  <D.24877>:
  node->array = obj;
  ephemeron_list.346 = ephemeron_list;
  node->next = ephemeron_list.346;
  ephemeron_list = node;
  if (0 != 0) goto <D.24880>; else goto <D.24881>;
  <D.24880>:
  gc_debug_file.347 = gc_debug_file;
  fprintf (gc_debug_file.347, "Registered ephemeron array %p\n", obj);
  gc_debug_file.347 = gc_debug_file;
  fflush (gc_debug_file.347);
  <D.24881>:
  sgen_gc_unlock ();
  D.24878 = 1;
  return D.24878;
}


__attribute__((visibility ("hidden")))
mono_gc_set_allow_synchronous_major (gboolean flag)
{
  int D.24884;
  gboolean D.24887;

  D.24884 = major_collector.is_concurrent;
  if (D.24884 == 0) goto <D.24885>; else goto <D.24886>;
  <D.24885>:
  D.24887 = flag;
  return D.24887;
  <D.24886>:
  allow_synchronous_major = flag;
  D.24887 = 1;
  return D.24887;
}


__attribute__((visibility ("hidden")))
mono_gc_invoke_with_gc_lock (void * (*MonoGCLockedCallbackFunc) (void *) func, void * data)
{
  void * D.24889;
  void * result;

  pthread_mutex_lock (&sgen_interruption_mutex);
  result = func (data);
  pthread_mutex_unlock (&sgen_interruption_mutex);
  D.24889 = result;
  return D.24889;
}


__attribute__((visibility ("hidden")))
mono_gc_is_gc_thread ()
{
  struct SgenThreadInfo * D.24891;
  _Bool D.24892;
  gboolean D.24893;
  gboolean result;

  pthread_mutex_lock (&gc_mutex);
  D.24891 = mono_thread_info_current ();
  D.24892 = D.24891 != 0B;
  result = (gboolean) D.24892;
  sgen_gc_unlock ();
  D.24893 = result;
  return D.24893;
}


__attribute__((visibility ("hidden")))
sgen_env_var_error (const char * env_var, const char * fallback, const char * description_format)
{
  struct _IO_FILE * stderr.348;
  struct  ap[1];

  try
    {
      __builtin_va_start (&ap, 0);
      stderr.348 = stderr;
      fprintf (stderr.348, "Warning: In environment variable `%s\': ", env_var);
      stderr.348 = stderr;
      vfprintf (stderr.348, description_format, &ap);
      if (fallback != 0B) goto <D.24896>; else goto <D.24897>;
      <D.24896>:
      stderr.348 = stderr;
      fprintf (stderr.348, " - %s", fallback);
      <D.24897>:
      stderr.348 = stderr;
      fprintf (stderr.348, "\n");
      __builtin_va_end (&ap);
    }
  finally
    {
      ap = {CLOBBER};
    }
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__))
vfprintf (struct FILE * restrict __stream, const char * restrict __fmt, struct  * __ap)
{
  int D.24898;

  D.24898 = __vfprintf_chk (__stream, 1, __fmt, __ap);
  return D.24898;
}


__attribute__((visibility ("hidden")))
mono_gc_base_init ()
{
  int D.24900;
  long unsigned int D.24901;
  struct _IO_FILE * stderr.349;
  int D.24905;
  char * D.24908;
  int D.24910;
  char * D.24913;
  char * D.24914;
  int D.24919;
  int D.24923;
  int D.24931;
  int D.24936;
  int D.24941;
  int D.24946;
  int D.24951;
  int D.24954;
  _Bool D.24957;
  long int D.24958;
  long int D.24959;
  int sgen_nursery_size.350;
  unsigned char D.24967;
  int D.24970;
  int D.24973;
  int D.24976;
  char * D.24979;
  char D.24982;
  int D.24984;
  int D.24986;
  long int D.24987;
  long int max_heap_candidate.351;
  long int D.24989;
  long int D.24990;
  int D.24991;
  int D.24992;
  long int D.24993;
  long int D.24994;
  int D.24997;
  int D.24998;
  char * D.25001;
  int D.25005;
  long int soft_limit.352;
  int D.25010;
  char * D.25015;
  char * endptr.353;
  char D.25020;
  unsigned long val.354;
  unsigned long D.25022;
  int D.25025;
  char * D.25028;
  int D.25029;
  int D.25033;
  const char * iftmp.355;
  int conservative_stack_mark.356;
  int D.25042;
  char * D.25045;
  gchar * D.25046;
  int D.25047;
  char * D.25050;
  int D.25054;
  long int val.357;
  long int D.25057;
  long int D.25058;
  int D.25063;
  int sgen_nursery_bits.358;
  int D.25065;
  int D.25066;
  int D.25067;
  char * D.25070;
  int D.25071;
  int D.25074;
  char * D.25077;
  int D.25078;
  int D.25081;
  int D.25084;
  char * D.25087;
  int D.25088;
  int D.25092;
  int D.25096;
  int D.25101;
  gboolean (*<T2e07>) (const char *) D.25104;
  int D.25107;
  gboolean (*<T2e07>) (const char *) D.25110;
  int D.25113;
  void (*<T869>) (void) D.25120;
  void (*<T869>) (void) D.25123;
  unsigned char D.25137;
  char D.25140;
  char D.25141;
  int D.25144;
  int D.25149;
  struct FILE * D.25150;
  struct FILE * gc_debug_file.359;
  int D.25155;
  int D.25159;
  int D.25163;
  int D.25167;
  char * D.25170;
  int D.25171;
  unsigned int D.25172;
  int D.25174;
  int D.25178;
  char * D.25181;
  int D.25182;
  unsigned int D.25183;
  int D.25185;
  int D.25189;
  int D.25193;
  int D.25199;
  int D.25203;
  int D.25207;
  int D.25211;
  int D.25215;
  int D.25219;
  int D.25223;
  int D.25227;
  int D.25233;
  int D.25237;
  int D.25241;
  int D.25245;
  int D.25249;
  char * D.25252;
  struct FILE * D.25253;
  struct FILE * heap_dump_file.360;
  int do_pin_stats.361;
  void (*<T2e6f>) (struct SgenMajorCollector *) D.25268;
  struct MonoThreadInfoCallbacks cb;
  const char * env;
  char * * opts;
  char * * ptr;
  char * major_collector_opt;
  char * minor_collector_opt;
  glong max_heap;
  glong soft_limit;
  int num_workers;
  int result;
  int dummy;
  gboolean debug_print_allowance;
  double allowance_ratio;
  double save_target;
  gboolean have_split_nursery;
  gboolean cement_enabled;
  void use_simple_nursery = <<< error >>>;
  void use_marksweep_major = <<< error >>>;

  try
    {
      major_collector_opt = 0B;
      minor_collector_opt = 0B;
      max_heap = 0;
      soft_limit = 0;
      debug_print_allowance = 0;
      allowance_ratio = 0.0;
      save_target = 0.0;
      have_split_nursery = 0;
      cement_enabled = 1;
      <D.21640>:
      result = InterlockedCompareExchange (&gc_initialized, -1, 0);
      switch (result) <default: <D.21639>, case -1: <D.21636>, case 0: <D.21638>, case 1: <D.21635>>
      <D.21635>:
      return;
      <D.21636>:
      monoeg_g_usleep (1000);
      goto <D.21637>;
      <D.21638>:
      goto <D.21637>;
      <D.21639>:
      monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-gc.c", 4863);
      <D.21637>:
      if (result != 0) goto <D.21640>; else goto <D.21641>;
      <D.21641>:
      pthread_mutex_init (&gc_mutex, 0B);
      D.24900 = mono_pagesize ();
      D.24901 = (long unsigned int) D.24900;
      pagesize = D.24901;
      stderr.349 = stderr;
      gc_debug_file = stderr.349;
      cb.thread_register = sgen_thread_register;
      cb.thread_detach = sgen_thread_detach;
      cb.thread_unregister = sgen_thread_unregister;
      cb.thread_attach = sgen_thread_attach;
      cb.mono_method_is_critical = is_critical_method;
      cb.mono_gc_pthread_create = mono_gc_pthread_create;
      mono_threads_init (&cb, 1360);
      pthread_mutex_init (&sgen_interruption_mutex, 0B);
      pthread_mutex_init (&pin_queue_mutex, 0B);
      init_user_copy_or_mark_key ();
      env = monoeg_g_getenv ("MONO_GC_PARAMS");
      if (env != 0B) goto <D.24903>; else goto <D.24904>;
      <D.24903>:
      opts = monoeg_g_strsplit (env, ",", -1);
      ptr = opts;
      goto <D.21644>;
      <D.21643>:
      {
        char * opt;

        opt = *ptr;
        D.24905 = monoeg_g_str_has_prefix (opt, "major=");
        if (D.24905 != 0) goto <D.24906>; else goto <D.24907>;
        <D.24906>:
        D.24908 = __builtin_strchr (opt, 61);
        opt = D.24908 + 1;
        major_collector_opt = monoeg_strdup (opt);
        goto <D.24909>;
        <D.24907>:
        D.24910 = monoeg_g_str_has_prefix (opt, "minor=");
        if (D.24910 != 0) goto <D.24911>; else goto <D.24912>;
        <D.24911>:
        D.24913 = __builtin_strchr (opt, 61);
        opt = D.24913 + 1;
        minor_collector_opt = monoeg_strdup (opt);
        <D.24912>:
        <D.24909>:
      }
      ptr = ptr + 8;
      <D.21644>:
      D.24914 = *ptr;
      if (D.24914 != 0B) goto <D.21643>; else goto <D.21645>;
      <D.21645>:
      goto <D.24915>;
      <D.24904>:
      opts = 0B;
      <D.24915>:
      init_stats ();
      sgen_init_internal_allocator ();
      sgen_init_nursery_allocator ();
      sgen_init_fin_weak_hash ();
      sgen_register_fixed_internal_mem_type (2, 56);
      sgen_register_fixed_internal_mem_type (6, 16);
      sgen_register_fixed_internal_mem_type (14, 1016);
      sgen_register_fixed_internal_mem_type (18, 16);
      {
        int tls_offset;

        tls_offset = -1;
        {
          guint64 foo;

          __asm__("basr	%%r1,0
	j	0f
	.quad sgen_thread_info@NTPOFF
0:
	lg	%0,4(%%r1)
	" : "=r" foo :  : "1");
          tls_offset = (int) foo;
        }
        mono_tls_key_set_offset (4, tls_offset);
      }
      sgen_os_init ();
      mono_thread_info_attach (&dummy);
      if (minor_collector_opt == 0B) goto <D.24916>; else goto <D.24917>;
      <D.24916>:
      sgen_simple_nursery_init (&sgen_minor_collector);
      goto <D.24918>;
      <D.24917>:
      D.24919 = strcmp (minor_collector_opt, "simple");
      if (D.24919 == 0) goto <D.24920>; else goto <D.24921>;
      <D.24920>:
      use_simple_nursery:
      sgen_simple_nursery_init (&sgen_minor_collector);
      goto <D.24922>;
      <D.24921>:
      D.24923 = strcmp (minor_collector_opt, "split");
      if (D.24923 == 0) goto <D.24924>; else goto <D.24925>;
      <D.24924>:
      sgen_split_nursery_init (&sgen_minor_collector);
      have_split_nursery = 1;
      goto <D.24926>;
      <D.24925>:
      sgen_env_var_error ("MONO_GC_PARAMS", "Using `simple` instead.", "Unknown minor collector `%s\'.", minor_collector_opt);
      goto use_simple_nursery;
      <D.24926>:
      <D.24922>:
      <D.24918>:
      if (major_collector_opt == 0B) goto <D.24927>; else goto <D.24930>;
      <D.24930>:
      D.24931 = strcmp (major_collector_opt, "marksweep");
      if (D.24931 == 0) goto <D.24927>; else goto <D.24928>;
      <D.24927>:
      use_marksweep_major:
      sgen_marksweep_init (&major_collector);
      goto <D.24929>;
      <D.24928>:
      if (major_collector_opt == 0B) goto <D.24932>; else goto <D.24935>;
      <D.24935>:
      D.24936 = strcmp (major_collector_opt, "marksweep-fixed");
      if (D.24936 == 0) goto <D.24932>; else goto <D.24933>;
      <D.24932>:
      sgen_marksweep_fixed_init (&major_collector);
      goto <D.24934>;
      <D.24933>:
      if (major_collector_opt == 0B) goto <D.24937>; else goto <D.24940>;
      <D.24940>:
      D.24941 = strcmp (major_collector_opt, "marksweep-par");
      if (D.24941 == 0) goto <D.24937>; else goto <D.24938>;
      <D.24937>:
      sgen_marksweep_par_init (&major_collector);
      goto <D.24939>;
      <D.24938>:
      if (major_collector_opt == 0B) goto <D.24942>; else goto <D.24945>;
      <D.24945>:
      D.24946 = strcmp (major_collector_opt, "marksweep-fixed-par");
      if (D.24946 == 0) goto <D.24942>; else goto <D.24943>;
      <D.24942>:
      sgen_marksweep_fixed_par_init (&major_collector);
      goto <D.24944>;
      <D.24943>:
      if (major_collector_opt == 0B) goto <D.24947>; else goto <D.24950>;
      <D.24950>:
      D.24951 = strcmp (major_collector_opt, "marksweep-conc");
      if (D.24951 == 0) goto <D.24947>; else goto <D.24948>;
      <D.24947>:
      sgen_marksweep_conc_init (&major_collector);
      goto <D.24949>;
      <D.24948>:
      sgen_env_var_error ("MONO_GC_PARAMS", "Using `marksweep` instead.", "Unknown major collector `%s\'.", major_collector_opt);
      goto use_marksweep_major;
      <D.24949>:
      <D.24944>:
      <D.24939>:
      <D.24934>:
      <D.24929>:
      if (have_split_nursery != 0) goto <D.24952>; else goto <D.24953>;
      <D.24952>:
      D.24954 = major_collector.is_parallel;
      if (D.24954 != 0) goto <D.24955>; else goto <D.24956>;
      <D.24955>:
      sgen_env_var_error ("MONO_GC_PARAMS", "Disabling split minor collector.", "`minor=split` is not supported with the parallel collector yet.");
      have_split_nursery = 0;
      <D.24956>:
      <D.24953>:
      num_workers = mono_cpu_count ();
      D.24957 = num_workers <= 0;
      D.24958 = (long int) D.24957;
      D.24959 = __builtin_expect (D.24958, 0);
      if (D.24959 != 0) goto <D.24960>; else goto <D.24961>;
      <D.24960>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 4977, "num_workers > 0");
      <D.24961>:
      if (num_workers > 16) goto <D.24962>; else goto <D.24963>;
      <D.24962>:
      num_workers = 16;
      <D.24963>:
      conservative_stack_mark = 1;
      sgen_nursery_size.350 = sgen_nursery_size;
      sgen_nursery_size = sgen_nursery_size.350;
      if (opts != 0B) goto <D.24965>; else goto <D.24966>;
      <D.24965>:
      {
        gboolean usage_printed;

        usage_printed = 0;
        ptr = opts;
        goto <D.21663>;
        <D.21662>:
        {
          char * opt;

          opt = *ptr;
          D.24967 = MEM[(const unsigned char * {ref-all})opt];
          if (D.24967 == 0) goto <D.24968>; else goto <D.24969>;
          <D.24968>:
          // predicted unlikely by continue predictor.
          goto <D.21652>;
          <D.24969>:
          D.24970 = monoeg_g_str_has_prefix (opt, "major=");
          if (D.24970 != 0) goto <D.24971>; else goto <D.24972>;
          <D.24971>:
          // predicted unlikely by continue predictor.
          goto <D.21652>;
          <D.24972>:
          D.24973 = monoeg_g_str_has_prefix (opt, "minor=");
          if (D.24973 != 0) goto <D.24974>; else goto <D.24975>;
          <D.24974>:
          // predicted unlikely by continue predictor.
          goto <D.21652>;
          <D.24975>:
          D.24976 = monoeg_g_str_has_prefix (opt, "max-heap-size=");
          if (D.24976 != 0) goto <D.24977>; else goto <D.24978>;
          <D.24977>:
          {
            glong max_heap_candidate;

            try
              {
                max_heap_candidate = 0;
                D.24979 = __builtin_strchr (opt, 61);
                opt = D.24979 + 1;
                D.24982 = *opt;
                if (D.24982 != 0) goto <D.24983>; else goto <D.24980>;
                <D.24983>:
                D.24984 = mono_gc_parse_environment_string_extract_number (opt, &max_heap_candidate);
                if (D.24984 != 0) goto <D.24985>; else goto <D.24980>;
                <D.24985>:
                D.24986 = mono_pagesize ();
                D.24987 = (long int) D.24986;
                max_heap_candidate.351 = max_heap_candidate;
                D.24989 = D.24987 + max_heap_candidate.351;
                D.24990 = D.24989 + -1;
                D.24991 = mono_pagesize ();
                D.24992 = D.24991 + -1;
                D.24993 = (long int) D.24992;
                D.24994 = ~D.24993;
                max_heap = D.24990 & D.24994;
                max_heap_candidate.351 = max_heap_candidate;
                if (max_heap != max_heap_candidate.351) goto <D.24995>; else goto <D.24996>;
                <D.24995>:
                D.24997 = mono_pagesize ();
                sgen_env_var_error ("MONO_GC_PARAMS", "Rounding up.", "`max-heap-size` size must be a multiple of %d.", D.24997);
                <D.24996>:
                goto <D.24981>;
                <D.24980>:
                sgen_env_var_error ("MONO_GC_PARAMS", 0B, "`max-heap-size` must be an integer.");
                <D.24981>:
                // predicted unlikely by continue predictor.
                goto <D.21652>;
              }
            finally
              {
                max_heap_candidate = {CLOBBER};
              }
          }
          <D.24978>:
          D.24998 = monoeg_g_str_has_prefix (opt, "soft-heap-limit=");
          if (D.24998 != 0) goto <D.24999>; else goto <D.25000>;
          <D.24999>:
          D.25001 = __builtin_strchr (opt, 61);
          opt = D.25001 + 1;
          D.24982 = *opt;
          if (D.24982 != 0) goto <D.25004>; else goto <D.25002>;
          <D.25004>:
          D.25005 = mono_gc_parse_environment_string_extract_number (opt, &soft_limit);
          if (D.25005 != 0) goto <D.25006>; else goto <D.25002>;
          <D.25006>:
          soft_limit.352 = soft_limit;
          if (soft_limit.352 <= 0) goto <D.25008>; else goto <D.25009>;
          <D.25008>:
          sgen_env_var_error ("MONO_GC_PARAMS", 0B, "`soft-heap-limit` must be positive.");
          soft_limit = 0;
          <D.25009>:
          goto <D.25003>;
          <D.25002>:
          sgen_env_var_error ("MONO_GC_PARAMS", 0B, "`soft-heap-limit` must be an integer.");
          <D.25003>:
          // predicted unlikely by continue predictor.
          goto <D.21652>;
          <D.25000>:
          D.25010 = monoeg_g_str_has_prefix (opt, "workers=");
          if (D.25010 != 0) goto <D.25011>; else goto <D.25012>;
          <D.25011>:
          {
            long int val;
            char * endptr;

            try
              {
                D.24954 = major_collector.is_parallel;
                if (D.24954 == 0) goto <D.25013>; else goto <D.25014>;
                <D.25013>:
                sgen_env_var_error ("MONO_GC_PARAMS", "Ignoring.", "The `workers` option can only be used for parallel collectors.");
                // predicted unlikely by continue predictor.
                goto <D.21652>;
                <D.25014>:
                D.25015 = __builtin_strchr (opt, 61);
                opt = D.25015 + 1;
                val = strtol (opt, &endptr, 10);
                D.24982 = *opt;
                if (D.24982 == 0) goto <D.25016>; else goto <D.25018>;
                <D.25018>:
                endptr.353 = endptr;
                D.25020 = *endptr.353;
                if (D.25020 != 0) goto <D.25016>; else goto <D.25017>;
                <D.25016>:
                sgen_env_var_error ("MONO_GC_PARAMS", "Ignoring.", "Cannot parse the `workers` option value.");
                // predicted unlikely by continue predictor.
                goto <D.21652>;
                <D.25017>:
                val.354 = (unsigned long) val;
                D.25022 = val.354 + 18446744073709551615;
                if (D.25022 > 15) goto <D.25023>; else goto <D.25024>;
                <D.25023>:
                sgen_env_var_error ("MONO_GC_PARAMS", "Using default value.", "The number of `workers` must be in the range 1 to 16.");
                // predicted unlikely by continue predictor.
                goto <D.21652>;
                <D.25024>:
                num_workers = (int) val;
                // predicted unlikely by continue predictor.
                goto <D.21652>;
              }
            finally
              {
                endptr = {CLOBBER};
              }
          }
          <D.25012>:
          D.25025 = monoeg_g_str_has_prefix (opt, "stack-mark=");
          if (D.25025 != 0) goto <D.25026>; else goto <D.25027>;
          <D.25026>:
          D.25028 = __builtin_strchr (opt, 61);
          opt = D.25028 + 1;
          D.25029 = strcmp (opt, "precise");
          if (D.25029 == 0) goto <D.25030>; else goto <D.25031>;
          <D.25030>:
          conservative_stack_mark = 0;
          goto <D.25032>;
          <D.25031>:
          D.25033 = strcmp (opt, "conservative");
          if (D.25033 == 0) goto <D.25034>; else goto <D.25035>;
          <D.25034>:
          conservative_stack_mark = 1;
          goto <D.25036>;
          <D.25035>:
          conservative_stack_mark.356 = conservative_stack_mark;
          if (conservative_stack_mark.356 != 0) goto <D.25039>; else goto <D.25040>;
          <D.25039>:
          iftmp.355 = "Using `conservative`.";
          goto <D.25041>;
          <D.25040>:
          iftmp.355 = "Using `precise`.";
          <D.25041>:
          sgen_env_var_error ("MONO_GC_PARAMS", iftmp.355, "Invalid value `%s` for `stack-mark` option, possible values are: `precise`, `conservative`.", opt);
          <D.25036>:
          <D.25032>:
          // predicted unlikely by continue predictor.
          goto <D.21652>;
          <D.25027>:
          D.25042 = monoeg_g_str_has_prefix (opt, "bridge=");
          if (D.25042 != 0) goto <D.25043>; else goto <D.25044>;
          <D.25043>:
          D.25045 = __builtin_strchr (opt, 61);
          opt = D.25045 + 1;
          D.25046 = monoeg_strdup (opt);
          sgen_register_test_bridge_callbacks (D.25046);
          // predicted unlikely by continue predictor.
          goto <D.21652>;
          <D.25044>:
          D.25047 = monoeg_g_str_has_prefix (opt, "nursery-size=");
          if (D.25047 != 0) goto <D.25048>; else goto <D.25049>;
          <D.25048>:
          {
            long int val;

            try
              {
                D.25050 = __builtin_strchr (opt, 61);
                opt = D.25050 + 1;
                D.24982 = *opt;
                if (D.24982 != 0) goto <D.25053>; else goto <D.25051>;
                <D.25053>:
                D.25054 = mono_gc_parse_environment_string_extract_number (opt, &val);
                if (D.25054 != 0) goto <D.25055>; else goto <D.25051>;
                <D.25055>:
                val.357 = val;
                D.25057 = val.357 + -1;
                val.357 = val;
                D.25058 = D.25057 & val.357;
                if (D.25058 != 0) goto <D.25059>; else goto <D.25060>;
                <D.25059>:
                sgen_env_var_error ("MONO_GC_PARAMS", "Using default value.", "`nursery-size` must be a power of two.");
                // predicted unlikely by continue predictor.
                goto <D.21652>;
                <D.25060>:
                val.357 = val;
                if (val.357 <= 511) goto <D.25061>; else goto <D.25062>;
                <D.25061>:
                sgen_env_var_error ("MONO_GC_PARAMS", "Using default value.", "`nursery-size` must be at least %d bytes.\n", 512);
                // predicted unlikely by continue predictor.
                goto <D.21652>;
                <D.25062>:
                val.357 = val;
                D.25063 = (int) val.357;
                sgen_nursery_size = D.25063;
                sgen_nursery_bits = 0;
                goto <D.21658>;
                <D.21657>:
                <D.21658>:
                sgen_nursery_bits.358 = sgen_nursery_bits;
                D.25065 = sgen_nursery_bits.358 + 1;
                sgen_nursery_bits = D.25065;
                sgen_nursery_bits.358 = sgen_nursery_bits;
                D.25066 = 1 << sgen_nursery_bits.358;
                sgen_nursery_size.350 = sgen_nursery_size;
                if (D.25066 != sgen_nursery_size.350) goto <D.21657>; else goto <D.21659>;
                <D.21659>:
                goto <D.25052>;
                <D.25051>:
                sgen_env_var_error ("MONO_GC_PARAMS", "Using default value.", "`nursery-size` must be an integer.");
                // predicted unlikely by continue predictor.
                goto <D.21652>;
                <D.25052>:
                // predicted unlikely by continue predictor.
                goto <D.21652>;
              }
            finally
              {
                val = {CLOBBER};
              }
          }
          <D.25049>:
          D.25067 = monoeg_g_str_has_prefix (opt, "save-target-ratio=");
          if (D.25067 != 0) goto <D.25068>; else goto <D.25069>;
          <D.25068>:
          {
            double val;

            try
              {
                D.25070 = __builtin_strchr (opt, 61);
                opt = D.25070 + 1;
                D.25071 = parse_double_in_interval ("MONO_GC_PARAMS", "save-target-ratio", opt, 1.000000000000000055511151231257827021181583404541015625e-1, 2.0e+0, &val);
                if (D.25071 != 0) goto <D.25072>; else goto <D.25073>;
                <D.25072>:
                save_target = val;
                <D.25073>:
                // predicted unlikely by continue predictor.
                goto <D.21652>;
              }
            finally
              {
                val = {CLOBBER};
              }
          }
          <D.25069>:
          D.25074 = monoeg_g_str_has_prefix (opt, "default-allowance-ratio=");
          if (D.25074 != 0) goto <D.25075>; else goto <D.25076>;
          <D.25075>:
          {
            double val;

            try
              {
                D.25077 = __builtin_strchr (opt, 61);
                opt = D.25077 + 1;
                D.25078 = parse_double_in_interval ("MONO_GC_PARAMS", "default-allowance-ratio", opt, 1.0e+0, 1.0e+0, &val);
                if (D.25078 != 0) goto <D.25079>; else goto <D.25080>;
                <D.25079>:
                allowance_ratio = val;
                <D.25080>:
                // predicted unlikely by continue predictor.
                goto <D.21652>;
              }
            finally
              {
                val = {CLOBBER};
              }
          }
          <D.25076>:
          D.25081 = monoeg_g_str_has_prefix (opt, "allow-synchronous-major=");
          if (D.25081 != 0) goto <D.25082>; else goto <D.25083>;
          <D.25082>:
          D.25084 = major_collector.is_concurrent;
          if (D.25084 == 0) goto <D.25085>; else goto <D.25086>;
          <D.25085>:
          sgen_env_var_error ("MONO_GC_PARAMS", "Ignoring.", "`allow-synchronous-major` is only valid for the concurrent major collector.");
          // predicted unlikely by continue predictor.
          goto <D.21652>;
          <D.25086>:
          D.25087 = __builtin_strchr (opt, 61);
          opt = D.25087 + 1;
          D.25088 = strcmp (opt, "yes");
          if (D.25088 == 0) goto <D.25089>; else goto <D.25090>;
          <D.25089>:
          allow_synchronous_major = 1;
          goto <D.25091>;
          <D.25090>:
          D.25092 = strcmp (opt, "no");
          if (D.25092 == 0) goto <D.25093>; else goto <D.25094>;
          <D.25093>:
          allow_synchronous_major = 0;
          goto <D.25095>;
          <D.25094>:
          sgen_env_var_error ("MONO_GC_PARAMS", "Using default value.", "`allow-synchronous-major` must be either `yes\' or `no\'.");
          // predicted unlikely by continue predictor.
          goto <D.21652>;
          <D.25095>:
          <D.25091>:
          <D.25083>:
          D.25096 = strcmp (opt, "cementing");
          if (D.25096 == 0) goto <D.25097>; else goto <D.25098>;
          <D.25097>:
          D.24954 = major_collector.is_parallel;
          if (D.24954 != 0) goto <D.25099>; else goto <D.25100>;
          <D.25099>:
          sgen_env_var_error ("MONO_GC_PARAMS", "Ignoring.", "`cementing` is not supported for the parallel major collector.");
          // predicted unlikely by continue predictor.
          goto <D.21652>;
          <D.25100>:
          cement_enabled = 1;
          // predicted unlikely by continue predictor.
          goto <D.21652>;
          <D.25098>:
          D.25101 = strcmp (opt, "no-cementing");
          if (D.25101 == 0) goto <D.25102>; else goto <D.25103>;
          <D.25102>:
          cement_enabled = 0;
          // predicted unlikely by continue predictor.
          goto <D.21652>;
          <D.25103>:
          D.25104 = major_collector.handle_gc_param;
          if (D.25104 != 0B) goto <D.25105>; else goto <D.25106>;
          <D.25105>:
          D.25104 = major_collector.handle_gc_param;
          D.25107 = D.25104 (opt);
          if (D.25107 != 0) goto <D.25108>; else goto <D.25109>;
          <D.25108>:
          // predicted unlikely by continue predictor.
          goto <D.21652>;
          <D.25109>:
          <D.25106>:
          D.25110 = sgen_minor_collector.handle_gc_param;
          if (D.25110 != 0B) goto <D.25111>; else goto <D.25112>;
          <D.25111>:
          D.25110 = sgen_minor_collector.handle_gc_param;
          D.25113 = D.25110 (opt);
          if (D.25113 != 0) goto <D.25114>; else goto <D.25115>;
          <D.25114>:
          // predicted unlikely by continue predictor.
          goto <D.21652>;
          <D.25115>:
          <D.25112>:
          sgen_env_var_error ("MONO_GC_PARAMS", "Ignoring.", "Unknown option `%s`.", opt);
          if (usage_printed != 0) goto <D.25116>; else goto <D.25117>;
          <D.25116>:
          // predicted unlikely by continue predictor.
          goto <D.21652>;
          <D.25117>:
          stderr.349 = stderr;
          fprintf (stderr.349, "\n%s must be a comma-delimited list of one or more of the following:\n", "MONO_GC_PARAMS");
          stderr.349 = stderr;
          fprintf (stderr.349, "  max-heap-size=N (where N is an integer, possibly with a k, m or a g suffix)\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  soft-heap-limit=n (where N is an integer, possibly with a k, m or a g suffix)\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  nursery-size=N (where N is an integer, possibly with a k, m or a g suffix)\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  major=COLLECTOR (where COLLECTOR is `marksweep\', `marksweep-conc\', `marksweep-par\', \'marksweep-fixed\' or \'marksweep-fixed-par\')\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  minor=COLLECTOR (where COLLECTOR is `simple\' or `split\')\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  wbarrier=WBARRIER (where WBARRIER is `remset\' or `cardtable\')\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  stack-mark=MARK-METHOD (where MARK-METHOD is \'precise\' or \'conservative\')\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  [no-]cementing\n");
          D.25084 = major_collector.is_concurrent;
          if (D.25084 != 0) goto <D.25118>; else goto <D.25119>;
          <D.25118>:
          stderr.349 = stderr;
          fprintf (stderr.349, "  allow-synchronous-major=FLAG (where FLAG is `yes\' or `no\')\n");
          <D.25119>:
          D.25120 = major_collector.print_gc_param_usage;
          if (D.25120 != 0B) goto <D.25121>; else goto <D.25122>;
          <D.25121>:
          D.25120 = major_collector.print_gc_param_usage;
          D.25120 ();
          <D.25122>:
          D.25123 = sgen_minor_collector.print_gc_param_usage;
          if (D.25123 != 0B) goto <D.25124>; else goto <D.25125>;
          <D.25124>:
          D.25123 = sgen_minor_collector.print_gc_param_usage;
          D.25123 ();
          <D.25125>:
          stderr.349 = stderr;
          fprintf (stderr.349, " Experimental options:\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  save-target-ratio=R (where R must be between %.2f - %.2f).\n", 1.000000000000000055511151231257827021181583404541015625e-1, 2.0e+0);
          stderr.349 = stderr;
          fprintf (stderr.349, "  default-allowance-ratio=R (where R must be between %.2f - %.2f).\n", 1.0e+0, 1.0e+1);
          stderr.349 = stderr;
          fprintf (stderr.349, "\n");
          usage_printed = 1;
        }
        <D.21652>:
        ptr = ptr + 8;
        <D.21663>:
        D.24914 = *ptr;
        if (D.24914 != 0B) goto <D.21662>; else goto <D.21664>;
        <D.21664>:
        monoeg_g_strfreev (opts);
      }
      <D.24966>:
      D.24954 = major_collector.is_parallel;
      if (D.24954 != 0) goto <D.25126>; else goto <D.25127>;
      <D.25126>:
      cement_enabled = 0;
      sgen_workers_init (num_workers);
      goto <D.25128>;
      <D.25127>:
      D.25084 = major_collector.is_concurrent;
      if (D.25084 != 0) goto <D.25129>; else goto <D.25130>;
      <D.25129>:
      sgen_workers_init (1);
      <D.25130>:
      <D.25128>:
      if (major_collector_opt != 0B) goto <D.25131>; else goto <D.25132>;
      <D.25131>:
      monoeg_g_free (major_collector_opt);
      <D.25132>:
      if (minor_collector_opt != 0B) goto <D.25133>; else goto <D.25134>;
      <D.25133>:
      monoeg_g_free (minor_collector_opt);
      <D.25134>:
      alloc_nursery ();
      sgen_cement_init (cement_enabled);
      env = monoeg_g_getenv ("MONO_GC_DEBUG");
      if (env != 0B) goto <D.25135>; else goto <D.25136>;
      <D.25135>:
      {
        gboolean usage_printed;

        usage_printed = 0;
        opts = monoeg_g_strsplit (env, ",", -1);
        ptr = opts;
        goto <D.21673>;
        <D.21672>:
        {
          char * opt;

          opt = *ptr;
          D.25137 = MEM[(const unsigned char * {ref-all})opt];
          if (D.25137 == 0) goto <D.25138>; else goto <D.25139>;
          <D.25138>:
          // predicted unlikely by continue predictor.
          goto <D.21667>;
          <D.25139>:
          D.25140 = *opt;
          D.25141 = D.25140 + 208;
          if (D.25141 <= 9) goto <D.25142>; else goto <D.25143>;
          <D.25142>:
          D.25144 = atoi (opt);
          gc_debug_level = D.25144;
          opt = opt + 1;
          D.25140 = *opt;
          if (D.25140 == 58) goto <D.25145>; else goto <D.25146>;
          <D.25145>:
          opt = opt + 1;
          <D.25146>:
          D.25140 = *opt;
          if (D.25140 != 0) goto <D.25147>; else goto <D.25148>;
          <D.25147>:
          {
            char * rf;

            D.25149 = getpid ();
            rf = monoeg_g_strdup_printf ("%s.%d", opt, D.25149);
            D.25150 = fopen (rf, "wb");
            gc_debug_file = D.25150;
            gc_debug_file.359 = gc_debug_file;
            if (gc_debug_file.359 == 0B) goto <D.25152>; else goto <D.25153>;
            <D.25152>:
            stderr.349 = stderr;
            gc_debug_file = stderr.349;
            <D.25153>:
            monoeg_g_free (rf);
          }
          <D.25148>:
          goto <D.25154>;
          <D.25143>:
          D.25155 = strcmp (opt, "print-allowance");
          if (D.25155 == 0) goto <D.25156>; else goto <D.25157>;
          <D.25156>:
          debug_print_allowance = 1;
          goto <D.25158>;
          <D.25157>:
          D.25159 = strcmp (opt, "print-pinning");
          if (D.25159 == 0) goto <D.25160>; else goto <D.25161>;
          <D.25160>:
          do_pin_stats = 1;
          goto <D.25162>;
          <D.25161>:
          D.25163 = strcmp (opt, "verify-before-allocs");
          if (D.25163 == 0) goto <D.25164>; else goto <D.25165>;
          <D.25164>:
          verify_before_allocs = 1;
          has_per_allocation_action = 1;
          goto <D.25166>;
          <D.25165>:
          D.25167 = monoeg_g_str_has_prefix (opt, "verify-before-allocs=");
          if (D.25167 != 0) goto <D.25168>; else goto <D.25169>;
          <D.25168>:
          {
            char * arg;

            D.25170 = __builtin_strchr (opt, 61);
            arg = D.25170 + 1;
            D.25171 = atoi (arg);
            D.25172 = (unsigned int) D.25171;
            verify_before_allocs = D.25172;
            has_per_allocation_action = 1;
          }
          goto <D.25173>;
          <D.25169>:
          D.25174 = strcmp (opt, "collect-before-allocs");
          if (D.25174 == 0) goto <D.25175>; else goto <D.25176>;
          <D.25175>:
          collect_before_allocs = 1;
          has_per_allocation_action = 1;
          goto <D.25177>;
          <D.25176>:
          D.25178 = monoeg_g_str_has_prefix (opt, "collect-before-allocs=");
          if (D.25178 != 0) goto <D.25179>; else goto <D.25180>;
          <D.25179>:
          {
            char * arg;

            D.25181 = __builtin_strchr (opt, 61);
            arg = D.25181 + 1;
            has_per_allocation_action = 1;
            D.25182 = atoi (arg);
            D.25183 = (unsigned int) D.25182;
            collect_before_allocs = D.25183;
          }
          goto <D.25184>;
          <D.25180>:
          D.25185 = strcmp (opt, "verify-before-collections");
          if (D.25185 == 0) goto <D.25186>; else goto <D.25187>;
          <D.25186>:
          whole_heap_check_before_collection = 1;
          goto <D.25188>;
          <D.25187>:
          D.25189 = strcmp (opt, "check-at-minor-collections");
          if (D.25189 == 0) goto <D.25190>; else goto <D.25191>;
          <D.25190>:
          consistency_check_at_minor_collection = 1;
          nursery_clear_policy = 0;
          goto <D.25192>;
          <D.25191>:
          D.25193 = strcmp (opt, "mod-union-consistency-check");
          if (D.25193 == 0) goto <D.25194>; else goto <D.25195>;
          <D.25194>:
          D.25084 = major_collector.is_concurrent;
          if (D.25084 == 0) goto <D.25196>; else goto <D.25197>;
          <D.25196>:
          sgen_env_var_error ("MONO_GC_DEBUG", "Ignoring.", "`mod-union-consistency-check` only works with concurrent major collector.");
          // predicted unlikely by continue predictor.
          goto <D.21667>;
          <D.25197>:
          mod_union_consistency_check = 1;
          goto <D.25198>;
          <D.25195>:
          D.25199 = strcmp (opt, "check-mark-bits");
          if (D.25199 == 0) goto <D.25200>; else goto <D.25201>;
          <D.25200>:
          check_mark_bits_after_major_collection = 1;
          goto <D.25202>;
          <D.25201>:
          D.25203 = strcmp (opt, "check-nursery-pinned");
          if (D.25203 == 0) goto <D.25204>; else goto <D.25205>;
          <D.25204>:
          check_nursery_objects_pinned = 1;
          goto <D.25206>;
          <D.25205>:
          D.25207 = strcmp (opt, "xdomain-checks");
          if (D.25207 == 0) goto <D.25208>; else goto <D.25209>;
          <D.25208>:
          xdomain_checks = 1;
          goto <D.25210>;
          <D.25209>:
          D.25211 = strcmp (opt, "clear-at-gc");
          if (D.25211 == 0) goto <D.25212>; else goto <D.25213>;
          <D.25212>:
          nursery_clear_policy = 0;
          goto <D.25214>;
          <D.25213>:
          D.25215 = strcmp (opt, "clear-nursery-at-gc");
          if (D.25215 == 0) goto <D.25216>; else goto <D.25217>;
          <D.25216>:
          nursery_clear_policy = 0;
          goto <D.25218>;
          <D.25217>:
          D.25219 = strcmp (opt, "check-scan-starts");
          if (D.25219 == 0) goto <D.25220>; else goto <D.25221>;
          <D.25220>:
          do_scan_starts_check = 1;
          goto <D.25222>;
          <D.25221>:
          D.25223 = strcmp (opt, "verify-nursery-at-minor-gc");
          if (D.25223 == 0) goto <D.25224>; else goto <D.25225>;
          <D.25224>:
          do_verify_nursery = 1;
          goto <D.25226>;
          <D.25225>:
          D.25227 = strcmp (opt, "check-concurrent");
          if (D.25227 == 0) goto <D.25228>; else goto <D.25229>;
          <D.25228>:
          D.25084 = major_collector.is_concurrent;
          if (D.25084 == 0) goto <D.25230>; else goto <D.25231>;
          <D.25230>:
          sgen_env_var_error ("MONO_GC_DEBUG", "Ignoring.", "`check-concurrent` only works with concurrent major collectors.");
          // predicted unlikely by continue predictor.
          goto <D.21667>;
          <D.25231>:
          do_concurrent_checks = 1;
          goto <D.25232>;
          <D.25229>:
          D.25233 = strcmp (opt, "dump-nursery-at-minor-gc");
          if (D.25233 == 0) goto <D.25234>; else goto <D.25235>;
          <D.25234>:
          do_dump_nursery_content = 1;
          goto <D.25236>;
          <D.25235>:
          D.25237 = strcmp (opt, "no-managed-allocator");
          if (D.25237 == 0) goto <D.25238>; else goto <D.25239>;
          <D.25238>:
          sgen_set_use_managed_allocator (0);
          goto <D.25240>;
          <D.25239>:
          D.25241 = strcmp (opt, "disable-minor");
          if (D.25241 == 0) goto <D.25242>; else goto <D.25243>;
          <D.25242>:
          disable_minor_collections = 1;
          goto <D.25244>;
          <D.25243>:
          D.25245 = strcmp (opt, "disable-major");
          if (D.25245 == 0) goto <D.25246>; else goto <D.25247>;
          <D.25246>:
          disable_major_collections = 1;
          goto <D.25248>;
          <D.25247>:
          D.25249 = monoeg_g_str_has_prefix (opt, "heap-dump=");
          if (D.25249 != 0) goto <D.25250>; else goto <D.25251>;
          <D.25250>:
          {
            char * filename;

            D.25252 = __builtin_strchr (opt, 61);
            filename = D.25252 + 1;
            nursery_clear_policy = 0;
            D.25253 = fopen (filename, "w");
            heap_dump_file = D.25253;
            heap_dump_file.360 = heap_dump_file;
            if (heap_dump_file.360 != 0B) goto <D.25255>; else goto <D.25256>;
            <D.25255>:
            heap_dump_file.360 = heap_dump_file;
            fprintf (heap_dump_file.360, "<sgen-dump>\n");
            do_pin_stats = 1;
            <D.25256>:
          }
          goto <D.25257>;
          <D.25251>:
          sgen_env_var_error ("MONO_GC_DEBUG", "Ignoring.", "Unknown option `%s`.", opt);
          if (usage_printed != 0) goto <D.25258>; else goto <D.25259>;
          <D.25258>:
          // predicted unlikely by continue predictor.
          goto <D.21667>;
          <D.25259>:
          stderr.349 = stderr;
          fprintf (stderr.349, "\n%s must be of the format [<l>[:<filename>]|<option>]+ where <l> is a debug level 0-9.\n", "MONO_GC_DEBUG");
          stderr.349 = stderr;
          fprintf (stderr.349, "Valid <option>s are:\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  collect-before-allocs[=<n>]\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  verify-before-allocs[=<n>]\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  check-at-minor-collections\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  check-mark-bits\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  check-nursery-pinned\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  verify-before-collections\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  verify-nursery-at-minor-gc\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  dump-nursery-at-minor-gc\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  disable-minor\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  disable-major\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  xdomain-checks\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  check-concurrent\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  clear-at-gc\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  clear-nursery-at-gc\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  check-scan-starts\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  no-managed-allocator\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  print-allowance\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  print-pinning\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "  heap-dump=<filename>\n");
          stderr.349 = stderr;
          fprintf (stderr.349, "\n");
          usage_printed = 1;
          <D.25257>:
          <D.25248>:
          <D.25244>:
          <D.25240>:
          <D.25236>:
          <D.25232>:
          <D.25226>:
          <D.25222>:
          <D.25218>:
          <D.25214>:
          <D.25210>:
          <D.25206>:
          <D.25202>:
          <D.25198>:
          <D.25192>:
          <D.25188>:
          <D.25184>:
          <D.25177>:
          <D.25173>:
          <D.25166>:
          <D.25162>:
          <D.25158>:
          <D.25154>:
        }
        <D.21667>:
        ptr = ptr + 8;
        <D.21673>:
        if (ptr != 0B) goto <D.25260>; else goto <D.21674>;
        <D.25260>:
        D.24914 = *ptr;
        if (D.24914 != 0B) goto <D.21672>; else goto <D.21674>;
        <D.21674>:
        monoeg_g_strfreev (opts);
      }
      <D.25136>:
      D.24954 = major_collector.is_parallel;
      if (D.24954 != 0) goto <D.25261>; else goto <D.25262>;
      <D.25261>:
      heap_dump_file.360 = heap_dump_file;
      if (heap_dump_file.360 != 0B) goto <D.25263>; else goto <D.25264>;
      <D.25263>:
      sgen_env_var_error ("MONO_GC_DEBUG", "Disabling.", "Cannot do `heap-dump` with the parallel collector.");
      heap_dump_file.360 = heap_dump_file;
      fclose (heap_dump_file.360);
      heap_dump_file = 0B;
      <D.25264>:
      do_pin_stats.361 = do_pin_stats;
      if (do_pin_stats.361 != 0) goto <D.25266>; else goto <D.25267>;
      <D.25266>:
      sgen_env_var_error ("MONO_GC_DEBUG", "Disabling.", "`print-pinning` is not supported with the parallel collector.");
      do_pin_stats = 0;
      <D.25267>:
      <D.25262>:
      D.25268 = major_collector.post_param_init;
      if (D.25268 != 0B) goto <D.25269>; else goto <D.25270>;
      <D.25269>:
      D.25268 = major_collector.post_param_init;
      D.25268 (&major_collector);
      <D.25270>:
      soft_limit.352 = soft_limit;
      sgen_memgov_init (max_heap, soft_limit.352, debug_print_allowance, allowance_ratio, save_target);
      memset (&remset, 0, 96);
      sgen_card_table_init (&remset);
      gc_initialized = 1;
    }
  finally
    {
      cb = {CLOBBER};
      soft_limit = {CLOBBER};
      dummy = {CLOBBER};
    }
}


is_critical_method (struct MonoMethod * method)
{
  gboolean D.25281;
  int iftmp.362;
  int D.25286;
  int D.25288;

  D.25286 = mono_runtime_is_critical_method (method);
  if (D.25286 != 0) goto <D.25283>; else goto <D.25287>;
  <D.25287>:
  D.25288 = sgen_is_critical_method (method);
  if (D.25288 != 0) goto <D.25283>; else goto <D.25284>;
  <D.25283>:
  iftmp.362 = 1;
  goto <D.25285>;
  <D.25284>:
  iftmp.362 = 0;
  <D.25285>:
  D.25281 = iftmp.362;
  return D.25281;
}


sgen_thread_attach (struct SgenThreadInfo * info)
{
  void * (*<T2bf2>) (void) D.25290;
  void * D.25293;
  void * D.25296;

  pthread_mutex_lock (&gc_mutex);
  init_stats ();
  sgen_gc_unlock ();
  D.25290 = gc_callbacks.thread_attach_func;
  if (D.25290 != 0B) goto <D.25291>; else goto <D.25292>;
  <D.25291>:
  D.25293 = info->runtime_data;
  if (D.25293 == 0B) goto <D.25294>; else goto <D.25295>;
  <D.25294>:
  D.25290 = gc_callbacks.thread_attach_func;
  D.25296 = D.25290 ();
  info->runtime_data = D.25296;
  <D.25295>:
  <D.25292>:
}


sgen_thread_unregister (struct SgenThreadInfo * p)
{
  struct FILE * gc_debug_file.363;
  long unsigned int D.25300;
  void * D.25301;
  void (*<T1312>) (void *) D.25302;
  void * D.25305;

  if (0 != 0) goto <D.25297>; else goto <D.25298>;
  <D.25297>:
  gc_debug_file.363 = gc_debug_file;
  D.25300 = MEM[(struct MonoThreadInfo *)p].node.key;
  D.25301 = (void *) D.25300;
  fprintf (gc_debug_file.363, "unregister thread %p (%p)\n", p, D.25301);
  gc_debug_file.363 = gc_debug_file;
  fflush (gc_debug_file.363);
  <D.25298>:
  D.25302 = gc_callbacks.thread_detach_func;
  if (D.25302 != 0B) goto <D.25303>; else goto <D.25304>;
  <D.25303>:
  D.25302 = gc_callbacks.thread_detach_func;
  D.25305 = p->runtime_data;
  D.25302 (D.25305);
  p->runtime_data = 0B;
  <D.25304>:
}


sgen_thread_detach (struct SgenThreadInfo * p)
{
  struct MonoDomain * D.25306;
  struct MonoThread * D.25309;

  D.25306 = mono_domain_get ();
  if (D.25306 != 0B) goto <D.25307>; else goto <D.25308>;
  <D.25307>:
  D.25309 = mono_thread_current ();
  mono_thread_detach (D.25309);
  <D.25308>:
}


sgen_thread_register (struct SgenThreadInfo * info, void * addr)
{
  struct MonoContext * D.25310;
  long unsigned int D.25311;
  void * sstart.364;
  long unsigned int size.365;
  void * D.25314;
  void * D.25315;
  struct FILE * gc_debug_file.366;
  long unsigned int D.25319;
  void * D.25320;
  void * (*<T2bf2>) (void) D.25321;
  void * D.25324;
  void * D.25325;

  sgen_thread_info = info;
  info->stop_count = 4294967295;
  info->signal = 0;
  info->skip = 0;
  info->stack_start = 0B;
  info->stopped_ip = 0B;
  info->stopped_domain = 0B;
  D.25310 = &info->ctx;
  memset (D.25310, 0, 512);
  sgen_init_tlab_info (info);
  {
    size_t size;
    void * sstart;
    union pthread_attr_t attr;

    try
      {
        D.25311 = pthread_self ();
        pthread_getattr_np (D.25311, &attr);
        pthread_attr_getstack (&attr, &sstart, &size);
        sstart.364 = sstart;
        info->stack_start_limit = sstart.364;
        sstart.364 = sstart;
        size.365 = size;
        D.25314 = sstart.364 + size.365;
        info->stack_end = D.25314;
        pthread_attr_destroy (&attr);
      }
    finally
      {
        size = {CLOBBER};
        sstart = {CLOBBER};
        attr = {CLOBBER};
      }
  }
  D.25315 = info->stack_end;
  stack_end = D.25315;
  if (0 != 0) goto <D.25316>; else goto <D.25317>;
  <D.25316>:
  gc_debug_file.366 = gc_debug_file;
  D.25319 = MEM[(struct MonoThreadInfo *)info].node.key;
  D.25320 = (void *) D.25319;
  D.25315 = info->stack_end;
  fprintf (gc_debug_file.366, "registered thread %p (%p) stack end %p\n", info, D.25320, D.25315);
  gc_debug_file.366 = gc_debug_file;
  fflush (gc_debug_file.366);
  <D.25317>:
  D.25321 = gc_callbacks.thread_attach_func;
  if (D.25321 != 0B) goto <D.25322>; else goto <D.25323>;
  <D.25322>:
  D.25321 = gc_callbacks.thread_attach_func;
  D.25324 = D.25321 ();
  info->runtime_data = D.25324;
  <D.25323>:
  D.25325 = info;
  return D.25325;
}


InterlockedCompareExchange (volatile gint32 * dest, gint32 exch, gint32 comp)
{
  gint32 D.25327;
  unsigned int comp.367;
  unsigned int exch.368;
  unsigned int D.25330;

  comp.367 = (unsigned int) comp;
  exch.368 = (unsigned int) exch;
  D.25330 = __sync_val_compare_and_swap_4 (dest, comp.367, exch.368);
  D.25327 = (gint32) D.25330;
  return D.25327;
}


init_user_copy_or_mark_key ()
{
  mono_native_tls_alloc (&user_copy_or_mark_key, 0B);
}


mono_native_tls_alloc (pthread_key_t * key, void * destructor)
{
  int D.25332;
  void (*<Tc6>) (void *) destructor.369;
  int D.25334;
  _Bool D.25335;

  destructor.369 = (void (*<Tc6>) (void *)) destructor;
  D.25334 = pthread_key_create (key, destructor.369);
  D.25335 = D.25334 == 0;
  D.25332 = (int) D.25335;
  return D.25332;
}


init_stats ()
{
  int inited.370;
  static gboolean inited = 0;

  inited.370 = inited;
  if (inited.370 != 0) goto <D.25338>; else goto <D.25339>;
  <D.25338>:
  return;
  <D.25339>:
  mono_counters_register ("Minor fragment clear", 519, &time_minor_pre_collection_fragment_clear);
  mono_counters_register ("Minor pinning", 519, &time_minor_pinning);
  mono_counters_register ("Minor scan remembered set", 519, &time_minor_scan_remsets);
  mono_counters_register ("Minor scan pinned", 519, &time_minor_scan_pinned);
  mono_counters_register ("Minor scan registered roots", 519, &time_minor_scan_registered_roots);
  mono_counters_register ("Minor scan thread data", 519, &time_minor_scan_thread_data);
  mono_counters_register ("Minor finish gray stack", 519, &time_minor_finish_gray_stack);
  mono_counters_register ("Minor fragment creation", 519, &time_minor_fragment_creation);
  mono_counters_register ("Major fragment clear", 519, &time_major_pre_collection_fragment_clear);
  mono_counters_register ("Major pinning", 519, &time_major_pinning);
  mono_counters_register ("Major scan pinned", 519, &time_major_scan_pinned);
  mono_counters_register ("Major scan registered roots", 519, &time_major_scan_registered_roots);
  mono_counters_register ("Major scan thread data", 519, &time_major_scan_thread_data);
  mono_counters_register ("Major scan alloc_pinned", 519, &time_major_scan_alloc_pinned);
  mono_counters_register ("Major scan finalized", 519, &time_major_scan_finalized);
  mono_counters_register ("Major scan big objects", 519, &time_major_scan_big_objects);
  mono_counters_register ("Major finish gray stack", 519, &time_major_finish_gray_stack);
  mono_counters_register ("Major free big objects", 519, &time_major_free_bigobjs);
  mono_counters_register ("Major LOS sweep", 519, &time_major_los_sweep);
  mono_counters_register ("Major sweep", 519, &time_major_sweep);
  mono_counters_register ("Major fragment creation", 519, &time_major_fragment_creation);
  mono_counters_register ("Number of pinned objects", 515, &stat_pinned_objects);
  inited = 1;
}


monoeg_strdup (const gchar * str)
{
  gchar * D.25343;

  if (str != 0B) goto <D.25341>; else goto <D.25342>;
  <D.25341>:
  D.25343 = __strdup (str);
  return D.25343;
  <D.25342>:
  D.25343 = 0B;
  return D.25343;
}


parse_double_in_interval (const char * env_var, const char * opt_name, const char * opt, double min, double max, double * result)
{
  char * endptr.371;
  gboolean D.25348;
  char * endptr;
  double val;

  try
    {
      val = strtod (opt, &endptr);
      endptr.371 = endptr;
      if (endptr.371 == opt) goto <D.25346>; else goto <D.25347>;
      <D.25346>:
      sgen_env_var_error (env_var, "Using default value.", "`%s` must be a number.", opt_name);
      D.25348 = 0;
      return D.25348;
      <D.25347>:
      if (val < min) goto <D.25349>; else goto <D.25351>;
      <D.25351>:
      if (val > max) goto <D.25349>; else goto <D.25350>;
      <D.25349>:
      sgen_env_var_error (env_var, "Using default value.", "`%s` must be between %.2f - %.2f.", opt_name, min, max);
      D.25348 = 0;
      return D.25348;
      <D.25350>:
      *result = val;
      D.25348 = 1;
      return D.25348;
    }
  finally
    {
      endptr = {CLOBBER};
    }
}


alloc_nursery ()
{
  struct GCMemSection * nursery_section.372;
  int gc_debug_level.373;
  _Bool D.25358;
  long int D.25359;
  long int D.25360;
  struct FILE * gc_debug_file.374;
  int sgen_nursery_size.375;
  long unsigned int D.25365;
  long unsigned int D.25366;
  int D.25367;
  _Bool D.25368;
  long int D.25369;
  long int D.25370;
  void * (*<T2e21>) (mword, mword, int) D.25373;
  int sgen_nursery_bits.376;
  long unsigned int data.377;
  sizetype D.25376;
  char * D.25377;
  long unsigned int D.25378;
  sizetype D.25381;
  char * D.25382;
  long int D.25383;
  long unsigned int D.25384;
  char * D.25385;
  int D.25386;
  long unsigned int D.25387;
  long unsigned int D.25388;
  void * D.25389;
  unsigned int scan_starts.378;
  struct GCMemSection * section;
  char * data;
  int scan_starts;
  int alloc_size;

  nursery_section.372 = nursery_section;
  if (nursery_section.372 != 0B) goto <D.25355>; else goto <D.25356>;
  <D.25355>:
  return;
  <D.25356>:
  gc_debug_level.373 = gc_debug_level;
  D.25358 = gc_debug_level.373 > 1;
  D.25359 = (long int) D.25358;
  D.25360 = __builtin_expect (D.25359, 0);
  if (D.25360 != 0) goto <D.25361>; else goto <D.25362>;
  <D.25361>:
  gc_debug_file.374 = gc_debug_file;
  sgen_nursery_size.375 = sgen_nursery_size;
  D.25365 = (long unsigned int) sgen_nursery_size.375;
  fprintf (gc_debug_file.374, "Allocating nursery size: %lu\n", D.25365);
  gc_debug_file.374 = gc_debug_file;
  fflush (gc_debug_file.374);
  <D.25362>:
  section = sgen_alloc_internal (2);
  alloc_size = sgen_nursery_size;
  D.25366 = (long unsigned int) alloc_size;
  D.25367 = sgen_memgov_try_alloc_space (D.25366, 0);
  D.25368 = D.25367 == 0;
  D.25369 = (long int) D.25368;
  D.25370 = __builtin_expect (D.25369, 0);
  if (D.25370 != 0) goto <D.25371>; else goto <D.25372>;
  <D.25371>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 1693, "sgen_memgov_try_alloc_space (alloc_size, SPACE_NURSERY)");
  <D.25372>:
  D.25373 = major_collector.alloc_heap;
  D.25366 = (long unsigned int) alloc_size;
  D.25366 = (long unsigned int) alloc_size;
  sgen_nursery_bits.376 = sgen_nursery_bits;
  data = D.25373 (D.25366, D.25366, sgen_nursery_bits.376);
  data.377 = (long unsigned int) data;
  sgen_nursery_size.375 = sgen_nursery_size;
  D.25376 = (sizetype) sgen_nursery_size.375;
  D.25377 = data + D.25376;
  D.25378 = (long unsigned int) D.25377;
  sgen_update_heap_boundaries (data.377, D.25378);
  if (0 != 0) goto <D.25379>; else goto <D.25380>;
  <D.25379>:
  gc_debug_file.374 = gc_debug_file;
  D.25381 = (sizetype) alloc_size;
  D.25382 = data + D.25381;
  sgen_nursery_size.375 = sgen_nursery_size;
  D.25365 = (long unsigned int) sgen_nursery_size.375;
  D.25383 = mono_gc_get_heap_size ();
  D.25384 = (long unsigned int) D.25383;
  fprintf (gc_debug_file.374, "Expanding nursery size (%p-%p): %lu, total: %lu\n", data, D.25382, D.25365, D.25384);
  gc_debug_file.374 = gc_debug_file;
  fflush (gc_debug_file.374);
  <D.25380>:
  section->next_data = data;
  D.25385 = section->next_data;
  section->data = D.25385;
  D.25366 = (long unsigned int) alloc_size;
  section->size = D.25366;
  sgen_nursery_size.375 = sgen_nursery_size;
  D.25376 = (sizetype) sgen_nursery_size.375;
  D.25377 = data + D.25376;
  section->end_data = D.25377;
  D.25386 = alloc_size + 8191;
  scan_starts = D.25386 / 8192;
  D.25387 = (long unsigned int) scan_starts;
  D.25388 = D.25387 * 8;
  D.25389 = sgen_alloc_internal_dynamic (D.25388, 3, 1);
  section->scan_starts = D.25389;
  scan_starts.378 = (unsigned int) scan_starts;
  section->num_scan_start = scan_starts.378;
  nursery_section = section;
  sgen_nursery_size.375 = sgen_nursery_size;
  D.25376 = (sizetype) sgen_nursery_size.375;
  D.25377 = data + D.25376;
  sgen_nursery_allocator_set_nursery_bounds (data, D.25377);
}


__attribute__((__gnu_inline__, __pure__, __leaf__, __nothrow__))
atoi (const char * __nptr)
{
  int D.25392;
  long int D.25393;

  D.25393 = strtol (__nptr, 0B, 10);
  D.25392 = (int) D.25393;
  return D.25392;
}


__attribute__((visibility ("hidden")))
mono_gc_get_gc_name ()
{
  const char * D.25395;

  D.25395 = "sgen";
  return D.25395;
}


__attribute__((visibility ("hidden")))
sgen_is_critical_method (struct MonoMethod * method)
{
  gboolean D.25397;
  int iftmp.379;
  struct MonoMethod * write_barrier_method.380;
  int D.25404;

  write_barrier_method.380 = write_barrier_method;
  if (method == write_barrier_method.380) goto <D.25399>; else goto <D.25403>;
  <D.25403>:
  D.25404 = sgen_is_managed_allocator (method);
  if (D.25404 != 0) goto <D.25399>; else goto <D.25400>;
  <D.25399>:
  iftmp.379 = 1;
  goto <D.25401>;
  <D.25400>:
  iftmp.379 = 0;
  <D.25401>:
  D.25397 = iftmp.379;
  return D.25397;
}


__attribute__((visibility ("hidden")))
sgen_has_critical_method ()
{
  gboolean D.25406;
  int iftmp.381;
  struct MonoMethod * write_barrier_method.382;
  int D.25413;

  write_barrier_method.382 = write_barrier_method;
  if (write_barrier_method.382 != 0B) goto <D.25408>; else goto <D.25412>;
  <D.25412>:
  D.25413 = sgen_has_managed_allocator ();
  if (D.25413 != 0) goto <D.25408>; else goto <D.25409>;
  <D.25408>:
  iftmp.381 = 1;
  goto <D.25410>;
  <D.25409>:
  iftmp.381 = 0;
  <D.25410>:
  D.25406 = iftmp.381;
  return D.25406;
}


__attribute__((visibility ("hidden")))
mono_gc_get_write_barrier ()
{
  _Bool D.25415;
  long int D.25416;
  long int D.25417;
  struct MonoMethod * write_barrier_method.383;
  struct MonoMethod * D.25423;
  struct MonoImage * D.25424;
  struct MonoClass * D.25425;
  struct MonoType * D.25426;
  struct MonoClass * D.25427;
  struct MonoType * D.25428;
  struct MonoClass * D.25429;
  guint8 * sgen_cardtable.384;
  int D.25431;
  unsigned int D.25434;
  struct MonoMethod * res;
  struct MonoMethodBuilder * mb;
  struct MonoMethodSignature * sig;
  int i;
  int nursery_check_labels[3];
  int stack_end_offset;

  try
    {
      stack_end_offset = -1;
      {
        guint64 foo;

        __asm__("basr	%%r1,0
	j	0f
	.quad stack_end@NTPOFF
0:
	lg	%0,4(%%r1)
	" : "=r" foo :  : "1");
        stack_end_offset = (int) foo;
      }
      D.25415 = stack_end_offset == -1;
      D.25416 = (long int) D.25415;
      D.25417 = __builtin_expect (D.25416, 0);
      if (D.25417 != 0) goto <D.25418>; else goto <D.25419>;
      <D.25418>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 5450, "stack_end_offset != -1");
      <D.25419>:
      write_barrier_method.383 = write_barrier_method;
      if (write_barrier_method.383 != 0B) goto <D.25421>; else goto <D.25422>;
      <D.25421>:
      D.25423 = write_barrier_method;
      return D.25423;
      <D.25422>:
      D.25424 = mono_defaults.corlib;
      sig = mono_metadata_signature_alloc (D.25424, 1);
      D.25425 = mono_defaults.void_class;
      D.25426 = &D.25425->byval_arg;
      sig->ret = D.25426;
      D.25427 = mono_defaults.int_class;
      D.25428 = &D.25427->byval_arg;
      sig->params[0] = D.25428;
      D.25429 = mono_defaults.object_class;
      mb = mono_mb_new (D.25429, "wbarrier", 24);
      emit_nursery_check (mb, &nursery_check_labels);
      sgen_cardtable.384 = sgen_cardtable;
      mono_mb_emit_ptr (mb, sgen_cardtable.384);
      mono_mb_emit_ldarg (mb, 0);
      mono_mb_emit_icon (mb, 9);
      mono_mb_emit_byte (mb, 100);
      mono_mb_emit_ptr (mb, 8388607B);
      mono_mb_emit_byte (mb, 95);
      mono_mb_emit_byte (mb, 88);
      mono_mb_emit_icon (mb, 1);
      mono_mb_emit_byte (mb, 82);
      i = 0;
      goto <D.21700>;
      <D.21699>:
      D.25431 = nursery_check_labels[i];
      if (D.25431 != 0) goto <D.25432>; else goto <D.25433>;
      <D.25432>:
      D.25431 = nursery_check_labels[i];
      D.25434 = (unsigned int) D.25431;
      mono_mb_patch_branch (mb, D.25434);
      <D.25433>:
      i = i + 1;
      <D.21700>:
      if (i <= 2) goto <D.21699>; else goto <D.21701>;
      <D.21701>:
      mono_mb_emit_byte (mb, 42);
      res = mono_mb_create_method (mb, sig, 16);
      mono_mb_free (mb);
      pthread_mutex_lock (&gc_mutex);
      write_barrier_method.383 = write_barrier_method;
      if (write_barrier_method.383 != 0B) goto <D.25435>; else goto <D.25436>;
      <D.25435>:
      mono_free_method (res);
      goto <D.25437>;
      <D.25436>:
      mono_memory_barrier ();
      write_barrier_method = res;
      <D.25437>:
      sgen_gc_unlock ();
      D.25423 = write_barrier_method;
      return D.25423;
    }
  finally
    {
      nursery_check_labels = {CLOBBER};
    }
}


emit_nursery_check (struct MonoMethodBuilder * mb, int * nursery_check_return_labels)
{
  int sgen_nursery_bits.385;
  char * D.25441;
  long unsigned int D.25442;
  long unsigned int D.25443;
  int D.25444;
  unsigned int D.25445;
  int D.25446;
  int D.25447;
  char * D.25450;
  long unsigned int D.25451;
  long unsigned int D.25452;
  int D.25453;
  int * D.25454;
  unsigned int D.25455;
  int D.25456;

  memset (nursery_check_return_labels, 0, 12);
  mono_mb_emit_ldarg (mb, 0);
  sgen_nursery_bits.385 = sgen_nursery_bits;
  mono_mb_emit_icon (mb, sgen_nursery_bits.385);
  mono_mb_emit_byte (mb, 100);
  D.25441 = sgen_get_nursery_start ();
  D.25442 = (long unsigned int) D.25441;
  sgen_nursery_bits.385 = sgen_nursery_bits;
  D.25443 = D.25442 >> sgen_nursery_bits.385;
  D.25444 = (int) D.25443;
  mono_mb_emit_icon (mb, D.25444);
  D.25445 = mono_mb_emit_branch (mb, 59);
  D.25446 = (int) D.25445;
  *nursery_check_return_labels = D.25446;
  D.25447 = major_collector.is_concurrent;
  if (D.25447 == 0) goto <D.25448>; else goto <D.25449>;
  <D.25448>:
  mono_mb_emit_ldarg (mb, 0);
  mono_mb_emit_byte (mb, 77);
  sgen_nursery_bits.385 = sgen_nursery_bits;
  mono_mb_emit_icon (mb, sgen_nursery_bits.385);
  mono_mb_emit_byte (mb, 100);
  D.25450 = sgen_get_nursery_start ();
  D.25451 = (long unsigned int) D.25450;
  sgen_nursery_bits.385 = sgen_nursery_bits;
  D.25452 = D.25451 >> sgen_nursery_bits.385;
  D.25453 = (int) D.25452;
  mono_mb_emit_icon (mb, D.25453);
  D.25454 = nursery_check_return_labels + 4;
  D.25455 = mono_mb_emit_branch (mb, 64);
  D.25456 = (int) D.25455;
  *D.25454 = D.25456;
  <D.25449>:
}


__attribute__((visibility ("hidden")))
mono_gc_get_description ()
{
  char * D.25457;

  D.25457 = monoeg_strdup ("sgen");
  return D.25457;
}


__attribute__((visibility ("hidden")))
mono_gc_set_desktop_mode ()
{

}


__attribute__((visibility ("hidden")))
mono_gc_is_moving ()
{
  gboolean D.25459;

  D.25459 = 1;
  return D.25459;
}


__attribute__((visibility ("hidden")))
mono_gc_is_disabled ()
{
  gboolean D.25461;

  D.25461 = 0;
  return D.25461;
}


__attribute__((visibility ("hidden")))
sgen_get_nursery_clear_policy ()
{
  NurseryClearPolicy D.25463;

  D.25463 = nursery_clear_policy;
  return D.25463;
}


__attribute__((visibility ("hidden")))
sgen_get_array_fill_vtable ()
{
  struct MonoVTable * array_fill_vtable.386;
  _Bool D.25468;
  long int D.25469;
  long int D.25470;
  struct MonoClass * D.25473;
  void * D.25474;
  struct MonoVTable * D.25475;

  array_fill_vtable.386 = array_fill_vtable;
  if (array_fill_vtable.386 == 0B) goto <D.25466>; else goto <D.25467>;
  <D.25466>:
  {
    static struct MonoClass klass;
    static struct MonoVTable vtable;
    gsize bmap;
    struct MonoDomain * domain;

    try
      {
        domain = mono_get_root_domain ();
        D.25468 = domain == 0B;
        D.25469 = (long int) D.25468;
        D.25470 = __builtin_expect (D.25469, 0);
        if (D.25470 != 0) goto <D.25471>; else goto <D.25472>;
        <D.25471>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-gc.c", 5574, "domain");
        <D.25472>:
        D.25473 = mono_defaults.byte_class;
        klass.element_class = D.25473;
        klass.rank = 1;
        klass.instance_size = 32;
        klass.sizes.element_size = 1;
        klass.name = "array_filler_type";
        vtable.klass = &klass;
        bmap = 0;
        D.25474 = mono_gc_make_descr_for_array (1, &bmap, 0, 1);
        vtable.gc_descr = D.25474;
        vtable.rank = 1;
        array_fill_vtable = &vtable;
      }
    finally
      {
        bmap = {CLOBBER};
      }
  }
  <D.25467>:
  D.25475 = array_fill_vtable;
  return D.25475;
}


__attribute__((visibility ("hidden")))
sgen_gc_lock ()
{
  pthread_mutex_lock (&gc_mutex);
}


__attribute__((visibility ("hidden")))
sgen_gc_unlock ()
{
  gboolean try_free;

  try_free = sgen_try_free_some_memory;
  sgen_try_free_some_memory = 0;
  pthread_mutex_unlock (&gc_mutex);
  if (try_free != 0) goto <D.25477>; else goto <D.25478>;
  <D.25477>:
  mono_thread_hazardous_try_free_some ();
  <D.25478>:
}


__attribute__((visibility ("hidden")))
sgen_major_collector_iterate_live_block_ranges (void (*sgen_cardtable_block_callback) (mword, mword) callback)
{
  void (*<T2e49>) (void (*sgen_cardtable_block_callback) (mword, mword)) D.25479;

  D.25479 = major_collector.iterate_live_block_ranges;
  D.25479 (callback);
}


__attribute__((visibility ("hidden")))
sgen_major_collector_scan_card_table (struct SgenGrayQueue * queue)
{
  void (*<T2e45>) (gboolean, struct SgenGrayQueue *) D.25480;

  D.25480 = major_collector.scan_card_table;
  D.25480 (0, queue);
}


__attribute__((visibility ("hidden")))
sgen_get_major_collector ()
{
  struct SgenMajorCollector * D.25481;

  D.25481 = &major_collector;
  return D.25481;
}


__attribute__((visibility ("hidden")))
mono_gc_set_skip_thread (gboolean skip)
{
  struct SgenThreadInfo * info;

  info = mono_thread_info_current ();
  pthread_mutex_lock (&gc_mutex);
  info->gc_disabled = skip;
  sgen_gc_unlock ();
}


__attribute__((visibility ("hidden")))
sgen_get_remset ()
{
  struct SgenRemeberedSet * D.25483;

  D.25483 = &remset;
  return D.25483;
}


__attribute__((visibility ("hidden")))
mono_gc_get_vtable_bits (struct MonoClass * class)
{
  int D.25485;
  int D.25488;
  guint D.25491;

  D.25485 = sgen_need_bridge_processing ();
  if (D.25485 != 0) goto <D.25486>; else goto <D.25487>;
  <D.25486>:
  D.25488 = sgen_is_bridge_class (class);
  if (D.25488 != 0) goto <D.25489>; else goto <D.25490>;
  <D.25489>:
  D.25491 = 1;
  return D.25491;
  <D.25490>:
  <D.25487>:
  D.25491 = 0;
  return D.25491;
}


__attribute__((visibility ("hidden")))
mono_gc_register_altstack (void * stack, gint32 stack_size, void * altstack, gint32 altstack_size)
{

}


__attribute__((visibility ("hidden")))
sgen_check_whole_heap_stw ()
{
  sgen_stop_world (0);
  sgen_clear_nursery_fragments ();
  sgen_check_whole_heap (0);
  sgen_restart_world (0, 0B);
}


__attribute__((visibility ("hidden")))
sgen_gc_event_moves ()
{
  int moved_objects_idx.387;

  moved_objects_idx.387 = moved_objects_idx;
  if (moved_objects_idx.387 != 0) goto <D.25494>; else goto <D.25495>;
  <D.25494>:
  moved_objects_idx.387 = moved_objects_idx;
  mono_profiler_gc_moves (&moved_objects, moved_objects_idx.387);
  moved_objects_idx = 0;
  <D.25495>:
}


