sgen_split_nursery_init (struct SgenMinorCollector * collector)
{
  collector->is_split = 1;
  collector->alloc_for_promotion = minor_alloc_for_promotion;
  collector->par_alloc_for_promotion = minor_par_alloc_for_promotion;
  collector->prepare_to_space = prepare_to_space;
  collector->clear_fragments = clear_fragments;
  collector->build_fragments_get_exclude_head = build_fragments_get_exclude_head;
  collector->build_fragments_release_exclude_head = build_fragments_release_exclude_head;
  collector->build_fragments_finish = build_fragments_finish;
  collector->init_nursery = init_nursery;
  collector->handle_gc_param = handle_gc_param;
  collector->print_gc_param_usage = print_gc_param_usage;
  collector->serial_ops.copy_or_mark_object = split_nursery_serial_copy_object;
  collector->parallel_ops.copy_or_mark_object = split_nursery_parallel_copy_object;
  collector->parallel_ops.scan_object = split_nursery_parallel_scan_object;
  collector->parallel_ops.scan_vtype = split_nursery_parallel_scan_vtype;
  collector->serial_ops.scan_object = split_nursery_serial_scan_object;
  collector->serial_ops.scan_vtype = split_nursery_serial_scan_vtype;
  pthread_mutex_init (&par_alloc_buffer_refill_mutex, 0B);
}


split_nursery_serial_scan_vtype (char * start, mword desc, struct SgenGrayQueue * queue)
{
  unsigned int D.18166;
  unsigned int D.18167;
  unsigned int D.18170;
  unsigned int D.18171;
  unsigned int D.18172;
  unsigned int D.18173;
  unsigned int D.18174;
  void * D.18179;
  struct FILE * gc_debug_file.0;
  unsigned int _index.1;
  unsigned int D.18190;
  int D.18191;
  void * D.18196;
  unsigned int _index.2;
  unsigned int D.18200;
  int D.18201;
  unsigned int D.18208;
  unsigned int D.18211;
  int D.18212;
  int desc.3;
  unsigned int D.18216;
  unsigned int el_size.4;
  unsigned int D.18218;
  void * D.18223;
  int D.18229;
  unsigned int offset.5;
  unsigned int D.18231;
  unsigned int i.6;
  unsigned int D.18233;
  void * * D.18234;
  void * D.18239;
  sizetype el_size.7;
  unsigned int D.18246;
  void * D.18253;
  unsigned int D.18256;
  void * D.18263;
  unsigned int D.18266;
  unsigned int D.18267;
  struct MonoVTable * D.18270;
  struct MonoClass * D.18271;
  const char * D.18272;
  const char * D.18273;
  gsize * bitmap_data.8;
  unsigned int D.18275;
  void * D.18282;
  int bwords.9;

  start = start + 4294967288;
  D.18166 = desc & 7;
  switch (D.18166) <default: <D.18161>, case 1: <D.18087>, case 2: <D.18096>, case 3: <D.18146>, case 4: <D.18106>, case 5: <D.18139>, case 7: <D.18160>>
  <D.18087>:
  D.18167 = desc & 4294901760;
  if (D.18167 != 0) goto <D.18168>; else goto <D.18169>;
  <D.18168>:
  {
    void * * _objptr_end;
    void * * _objptr;

    _objptr = start;
    D.18170 = desc >> 16;
    D.18171 = D.18170 & 255;
    D.18172 = D.18171 * 4;
    _objptr = _objptr + D.18172;
    D.18173 = desc >> 24;
    D.18174 = D.18173 * 4;
    _objptr_end = _objptr + D.18174;
    {
      void * __old;

      __old = *_objptr;
      if (__old != 0B) goto <D.18175>; else goto <D.18176>;
      <D.18175>:
      split_nursery_serial_copy_object_from_obj (_objptr, queue);
      if (0 != 0) goto <D.18177>; else goto <D.18178>;
      <D.18177>:
      D.18179 = *_objptr;
      if (D.18179 != __old) goto <D.18180>; else goto <D.18181>;
      <D.18180>:
      gc_debug_file.0 = gc_debug_file;
      D.18179 = *_objptr;
      fprintf (gc_debug_file.0, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18179, __old);
      gc_debug_file.0 = gc_debug_file;
      fflush (gc_debug_file.0);
      <D.18181>:
      <D.18178>:
      <D.18176>:
    }
    _objptr = _objptr + 4;
    goto <D.18093>;
    <D.18092>:
    {
      void * __old;

      __old = *_objptr;
      if (__old != 0B) goto <D.18183>; else goto <D.18184>;
      <D.18183>:
      split_nursery_serial_copy_object_from_obj (_objptr, queue);
      if (0 != 0) goto <D.18185>; else goto <D.18186>;
      <D.18185>:
      D.18179 = *_objptr;
      if (D.18179 != __old) goto <D.18187>; else goto <D.18188>;
      <D.18187>:
      gc_debug_file.0 = gc_debug_file;
      D.18179 = *_objptr;
      fprintf (gc_debug_file.0, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18179, __old);
      gc_debug_file.0 = gc_debug_file;
      fflush (gc_debug_file.0);
      <D.18188>:
      <D.18186>:
      <D.18184>:
    }
    _objptr = _objptr + 4;
    <D.18093>:
    if (_objptr < _objptr_end) goto <D.18092>; else goto <D.18094>;
    <D.18094>:
  }
  <D.18169>:
  goto <D.18095>;
  <D.18096>:
  {
    void * * _objptr;
    gsize _bmap;

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

      _index = __builtin_ctz (_bmap);
      _index.1 = (unsigned int) _index;
      D.18190 = _index.1 * 4;
      _objptr = _objptr + D.18190;
      D.18191 = _index + 1;
      _bmap = _bmap >> D.18191;
      {
        void * __old;

        __old = *_objptr;
        if (__old != 0B) goto <D.18192>; else goto <D.18193>;
        <D.18192>:
        split_nursery_serial_copy_object_from_obj (_objptr, queue);
        if (0 != 0) goto <D.18194>; else goto <D.18195>;
        <D.18194>:
        D.18196 = *_objptr;
        if (D.18196 != __old) goto <D.18197>; else goto <D.18198>;
        <D.18197>:
        gc_debug_file.0 = gc_debug_file;
        D.18196 = *_objptr;
        fprintf (gc_debug_file.0, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18196, __old);
        gc_debug_file.0 = gc_debug_file;
        fflush (gc_debug_file.0);
        <D.18198>:
        <D.18195>:
        <D.18193>:
      }
      _objptr = _objptr + 4;
    }
    goto <D.18104>;
    <D.18103>:
    {
      int _index;

      _index = __builtin_ctz (_bmap);
      _index.2 = (unsigned int) _index;
      D.18200 = _index.2 * 4;
      _objptr = _objptr + D.18200;
      D.18201 = _index + 1;
      _bmap = _bmap >> D.18201;
      {
        void * __old;

        __old = *_objptr;
        if (__old != 0B) goto <D.18202>; else goto <D.18203>;
        <D.18202>:
        split_nursery_serial_copy_object_from_obj (_objptr, queue);
        if (0 != 0) goto <D.18204>; else goto <D.18205>;
        <D.18204>:
        D.18196 = *_objptr;
        if (D.18196 != __old) goto <D.18206>; else goto <D.18207>;
        <D.18206>:
        gc_debug_file.0 = gc_debug_file;
        D.18196 = *_objptr;
        fprintf (gc_debug_file.0, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18196, __old);
        gc_debug_file.0 = gc_debug_file;
        fflush (gc_debug_file.0);
        <D.18207>:
        <D.18205>:
        <D.18203>:
      }
      _objptr = _objptr + 4;
    }
    <D.18104>:
    if (_bmap != 0) goto <D.18103>; else goto <D.18105>;
    <D.18105>:
  }
  goto <D.18095>;
  <D.18106>:
  D.18208 = desc & 4294950912;
  if (D.18208 != 0) goto <D.18209>; else goto <D.18210>;
  <D.18209>:
  {
    int el_size;
    int etype;

    D.18211 = desc >> 3;
    D.18212 = (int) D.18211;
    el_size = D.18212 & 1023;
    desc.3 = (int) desc;
    etype = desc.3 & 49152;
    if (etype == 16384) goto <D.18214>; else goto <D.18215>;
    <D.18214>:
    {
      void * * p;
      void * * end_refs;

      p = start + 16;
      D.18216 = MEM[(struct MonoArray *)start].max_length;
      el_size.4 = (unsigned int) el_size;
      D.18218 = D.18216 * el_size.4;
      end_refs = p + D.18218;
      goto <D.18113>;
      <D.18112>:
      {
        void * __old;

        __old = *p;
        if (__old != 0B) goto <D.18219>; else goto <D.18220>;
        <D.18219>:
        split_nursery_serial_copy_object_from_obj (p, queue);
        if (0 != 0) goto <D.18221>; else goto <D.18222>;
        <D.18221>:
        D.18223 = *p;
        if (D.18223 != __old) goto <D.18224>; else goto <D.18225>;
        <D.18224>:
        gc_debug_file.0 = gc_debug_file;
        D.18223 = *p;
        fprintf (gc_debug_file.0, "Overwrote field at %p with %p (was: %p)\n", p, D.18223, __old);
        gc_debug_file.0 = gc_debug_file;
        fflush (gc_debug_file.0);
        <D.18225>:
        <D.18222>:
        <D.18220>:
      }
      p = p + 4;
      <D.18113>:
      if (p < end_refs) goto <D.18112>; else goto <D.18114>;
      <D.18114>:
    }
    goto <D.18226>;
    <D.18215>:
    if (etype == 32768) goto <D.18227>; else goto <D.18228>;
    <D.18227>:
    {
      int offset;
      int num_refs;
      char * e_start;
      char * e_end;

      D.18170 = desc >> 16;
      D.18229 = (int) D.18170;
      offset = D.18229 & 255;
      D.18173 = desc >> 24;
      num_refs = (int) D.18173;
      e_start = start + 16;
      D.18216 = MEM[(struct MonoArray *)start].max_length;
      el_size.4 = (unsigned int) el_size;
      D.18218 = D.18216 * el_size.4;
      e_end = e_start + D.18218;
      goto <D.18126>;
      <D.18125>:
      {
        void * * p;
        int i;

        p = e_start;
        offset.5 = (unsigned int) offset;
        D.18231 = offset.5 * 4;
        p = p + D.18231;
        i = 0;
        goto <D.18123>;
        <D.18122>:
        {
          void * __old;

          i.6 = (unsigned int) i;
          D.18233 = i.6 * 4;
          D.18234 = p + D.18233;
          __old = *D.18234;
          if (__old != 0B) goto <D.18235>; else goto <D.18236>;
          <D.18235>:
          i.6 = (unsigned int) i;
          D.18233 = i.6 * 4;
          D.18234 = p + D.18233;
          split_nursery_serial_copy_object_from_obj (D.18234, queue);
          if (0 != 0) goto <D.18237>; else goto <D.18238>;
          <D.18237>:
          i.6 = (unsigned int) i;
          D.18233 = i.6 * 4;
          D.18234 = p + D.18233;
          D.18239 = *D.18234;
          if (D.18239 != __old) goto <D.18240>; else goto <D.18241>;
          <D.18240>:
          gc_debug_file.0 = gc_debug_file;
          i.6 = (unsigned int) i;
          D.18233 = i.6 * 4;
          D.18234 = p + D.18233;
          i.6 = (unsigned int) i;
          D.18233 = i.6 * 4;
          D.18234 = p + D.18233;
          D.18239 = *D.18234;
          fprintf (gc_debug_file.0, "Overwrote field at %p with %p (was: %p)\n", D.18234, D.18239, __old);
          gc_debug_file.0 = gc_debug_file;
          fflush (gc_debug_file.0);
          <D.18241>:
          <D.18238>:
          <D.18236>:
        }
        i = i + 1;
        <D.18123>:
        if (i < num_refs) goto <D.18122>; else goto <D.18124>;
        <D.18124>:
        el_size.7 = (sizetype) el_size;
        e_start = e_start + el_size.7;
      }
      <D.18126>:
      if (e_start < e_end) goto <D.18125>; else goto <D.18127>;
      <D.18127>:
    }
    goto <D.18243>;
    <D.18228>:
    if (etype == 49152) goto <D.18244>; else goto <D.18245>;
    <D.18244>:
    {
      char * e_start;
      char * e_end;

      e_start = start + 16;
      D.18216 = MEM[(struct MonoArray *)start].max_length;
      el_size.4 = (unsigned int) el_size;
      D.18218 = D.18216 * el_size.4;
      e_end = e_start + D.18218;
      goto <D.18137>;
      <D.18136>:
      {
        void * * p;
        gsize _bmap;

        p = e_start;
        _bmap = desc >> 16;
        goto <D.18134>;
        <D.18133>:
        D.18246 = _bmap & 1;
        if (D.18246 != 0) goto <D.18247>; else goto <D.18248>;
        <D.18247>:
        {
          void * __old;

          __old = *p;
          if (__old != 0B) goto <D.18249>; else goto <D.18250>;
          <D.18249>:
          split_nursery_serial_copy_object_from_obj (p, queue);
          if (0 != 0) goto <D.18251>; else goto <D.18252>;
          <D.18251>:
          D.18253 = *p;
          if (D.18253 != __old) goto <D.18254>; else goto <D.18255>;
          <D.18254>:
          gc_debug_file.0 = gc_debug_file;
          D.18253 = *p;
          fprintf (gc_debug_file.0, "Overwrote field at %p with %p (was: %p)\n", p, D.18253, __old);
          gc_debug_file.0 = gc_debug_file;
          fflush (gc_debug_file.0);
          <D.18255>:
          <D.18252>:
          <D.18250>:
        }
        <D.18248>:
        _bmap = _bmap >> 1;
        p = p + 4;
        <D.18134>:
        if (_bmap != 0) goto <D.18133>; else goto <D.18135>;
        <D.18135>:
        el_size.7 = (sizetype) el_size;
        e_start = e_start + el_size.7;
      }
      <D.18137>:
      if (e_start < e_end) goto <D.18136>; else goto <D.18138>;
      <D.18138>:
    }
    <D.18245>:
    <D.18243>:
    <D.18226>:
  }
  <D.18210>:
  goto <D.18095>;
  <D.18139>:
  {
    void * * _objptr;
    gsize _bmap;

    _objptr = start;
    _bmap = desc >> 3;
    _objptr = _objptr + 8;
    goto <D.18144>;
    <D.18143>:
    D.18256 = _bmap & 1;
    if (D.18256 != 0) goto <D.18257>; else goto <D.18258>;
    <D.18257>:
    {
      void * __old;

      __old = *_objptr;
      if (__old != 0B) goto <D.18259>; else goto <D.18260>;
      <D.18259>:
      split_nursery_serial_copy_object_from_obj (_objptr, queue);
      if (0 != 0) goto <D.18261>; else goto <D.18262>;
      <D.18261>:
      D.18263 = *_objptr;
      if (D.18263 != __old) goto <D.18264>; else goto <D.18265>;
      <D.18264>:
      gc_debug_file.0 = gc_debug_file;
      D.18263 = *_objptr;
      fprintf (gc_debug_file.0, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18263, __old);
      gc_debug_file.0 = gc_debug_file;
      fflush (gc_debug_file.0);
      <D.18265>:
      <D.18262>:
      <D.18260>:
    }
    <D.18258>:
    _bmap = _bmap >> 1;
    _objptr = _objptr + 4;
    <D.18144>:
    if (_bmap != 0) goto <D.18143>; else goto <D.18145>;
    <D.18145>:
  }
  goto <D.18095>;
  <D.18146>:
  {
    void * * _objptr;
    gsize * bitmap_data;
    int bwords;
    void * * start_run;

    _objptr = start;
    bitmap_data = sgen_get_complex_descriptor (desc);
    D.18266 = *bitmap_data;
    D.18267 = D.18266 + 4294967295;
    bwords = (int) D.18267;
    start_run = _objptr;
    bitmap_data = bitmap_data + 4;
    if (0 != 0) goto <D.18268>; else goto <D.18269>;
    <D.18268>:
    {
      struct MonoObject * myobj;

      myobj = start;
      D.18270 = myobj->vtable;
      D.18271 = D.18270->klass;
      D.18272 = D.18271->name_space;
      D.18270 = myobj->vtable;
      D.18271 = D.18270->klass;
      D.18273 = D.18271->name;
      monoeg_g_print ("found %d at %p (0x%zx): %s.%s\n", bwords, start, desc, D.18272, D.18273);
    }
    <D.18269>:
    goto <D.18158>;
    <D.18157>:
    {
      gsize _bmap;

      bitmap_data.8 = bitmap_data;
      bitmap_data = bitmap_data.8 + 4;
      _bmap = *bitmap_data.8;
      _objptr = start_run;
      goto <D.18155>;
      <D.18154>:
      D.18275 = _bmap & 1;
      if (D.18275 != 0) goto <D.18276>; else goto <D.18277>;
      <D.18276>:
      {
        void * __old;

        __old = *_objptr;
        if (__old != 0B) goto <D.18278>; else goto <D.18279>;
        <D.18278>:
        split_nursery_serial_copy_object_from_obj (_objptr, queue);
        if (0 != 0) goto <D.18280>; else goto <D.18281>;
        <D.18280>:
        D.18282 = *_objptr;
        if (D.18282 != __old) goto <D.18283>; else goto <D.18284>;
        <D.18283>:
        gc_debug_file.0 = gc_debug_file;
        D.18282 = *_objptr;
        fprintf (gc_debug_file.0, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18282, __old);
        gc_debug_file.0 = gc_debug_file;
        fflush (gc_debug_file.0);
        <D.18284>:
        <D.18281>:
        <D.18279>:
      }
      <D.18277>:
      _bmap = _bmap >> 1;
      _objptr = _objptr + 4;
      <D.18155>:
      if (_bmap != 0) goto <D.18154>; else goto <D.18156>;
      <D.18156>:
      start_run = start_run + 128;
    }
    <D.18158>:
    bwords.9 = bwords;
    bwords = bwords.9 + -1;
    if (bwords.9 > 0) goto <D.18157>; else goto <D.18159>;
    <D.18159>:
  }
  goto <D.18095>;
  <D.18160>:
  goto <D.18095>;
  <D.18161>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-scan-object.h", 111);
  <D.18095>:
}


split_nursery_serial_copy_object_from_obj (void * * obj_slot, struct SgenGrayQueue * queue)
{
  int current_collection_generation.10;
  int D.18290;
  struct FILE * gc_debug_file.11;
  char * iftmp.12;
  unsigned int D.18297;
  unsigned int D.18298;
  unsigned int D.18301;
  int iftmp.13;
  int D.18312;
  int D.18314;
  _Bool D.18316;
  long int D.18317;
  long int D.18318;
  unsigned int D.18321;
  _Bool D.18322;
  long int D.18323;
  long int D.18324;
  int D.18331;
  int D.18334;
  int D.18341;
  int iftmp.14;
  int D.18347;
  int D.18349;
  _Bool D.18351;
  long int D.18352;
  long int D.18353;
  char * forwarded;
  char * obj;
  void * copy;

  obj = *obj_slot;
  if (0 != 0) goto <D.18287>; else goto <D.18288>;
  <D.18287>:
  current_collection_generation.10 = current_collection_generation;
  monoeg_g_log (0B, 4, "calling minor-serial-copy-from-obj from a %d generation collection", current_collection_generation.10);
  <D.17763>:
  goto <D.17763>;
  <D.18288>:
  D.18290 = sgen_ptr_in_nursery (obj);
  if (D.18290 == 0) goto <D.18291>; else goto <D.18292>;
  <D.18291>:
  return;
  <D.18292>:
  if (0 != 0) goto <D.18293>; else goto <D.18294>;
  <D.18293>:
  gc_debug_file.11 = gc_debug_file;
  fprintf (gc_debug_file.11, "Precise copy of %p from %p\n", obj, obj_slot);
  gc_debug_file.11 = gc_debug_file;
  fflush (gc_debug_file.11);
  <D.18294>:
  D.18297 = MEM[(mword *)obj];
  D.18298 = D.18297 & 1;
  if (D.18298 != 0) goto <D.18299>; else goto <D.18300>;
  <D.18299>:
  D.18297 = MEM[(mword *)obj];
  D.18301 = D.18297 & 4294967292;
  iftmp.12 = (char *) D.18301;
  goto <D.18302>;
  <D.18300>:
  iftmp.12 = 0B;
  <D.18302>:
  forwarded = iftmp.12;
  if (forwarded != 0B) goto <D.18303>; else goto <D.18304>;
  <D.18303>:
  if (0 != 0) goto <D.18305>; else goto <D.18306>;
  <D.18305>:
  monoeg_g_log (0B, 4, "forwarded object %p has no gc descriptor", forwarded);
  <D.17764>:
  goto <D.17764>;
  <D.18306>:
  if (0 != 0) goto <D.18307>; else goto <D.18308>;
  <D.18307>:
  gc_debug_file.11 = gc_debug_file;
  fprintf (gc_debug_file.11, " (already forwarded to %p)\n", forwarded);
  gc_debug_file.11 = gc_debug_file;
  fflush (gc_debug_file.11);
  <D.18308>:
  *obj_slot = forwarded;
  D.18312 = sgen_ptr_in_nursery (forwarded);
  if (D.18312 != 0) goto <D.18313>; else goto <D.18310>;
  <D.18313>:
  D.18314 = sgen_ptr_in_nursery (obj_slot);
  if (D.18314 == 0) goto <D.18315>; else goto <D.18310>;
  <D.18315>:
  iftmp.13 = 1;
  goto <D.18311>;
  <D.18310>:
  iftmp.13 = 0;
  <D.18311>:
  D.18316 = iftmp.13 != 0;
  D.18317 = (long int) D.18316;
  D.18318 = __builtin_expect (D.18317, 0);
  if (D.18318 != 0) goto <D.18319>; else goto <D.18320>;
  <D.18319>:
  sgen_add_to_global_remset (obj_slot, forwarded);
  <D.18320>:
  return;
  <D.18304>:
  D.18297 = MEM[(mword *)obj];
  D.18321 = D.18297 & 2;
  D.18322 = D.18321 != 0;
  D.18323 = (long int) D.18322;
  D.18324 = __builtin_expect (D.18323, 0);
  if (D.18324 != 0) goto <D.18325>; else goto <D.18326>;
  <D.18325>:
  if (0 != 0) goto <D.18327>; else goto <D.18328>;
  <D.18327>:
  monoeg_g_log (0B, 4, "pinned object %p has no gc descriptor", obj);
  <D.17765>:
  goto <D.17765>;
  <D.18328>:
  if (0 != 0) goto <D.18329>; else goto <D.18330>;
  <D.18329>:
  gc_debug_file.11 = gc_debug_file;
  fprintf (gc_debug_file.11, " (pinned, no change)\n");
  gc_debug_file.11 = gc_debug_file;
  fflush (gc_debug_file.11);
  <D.18330>:
  D.18331 = sgen_ptr_in_nursery (obj_slot);
  if (D.18331 == 0) goto <D.18332>; else goto <D.18333>;
  <D.18332>:
  sgen_add_to_global_remset (obj_slot, obj);
  <D.18333>:
  return;
  <D.18326>:
  D.18334 = sgen_nursery_is_to_space (obj);
  if (D.18334 != 0) goto <D.18335>; else goto <D.18336>;
  <D.18335>:
  if (0 != 0) goto <D.18337>; else goto <D.18338>;
  <D.18337>:
  monoeg_g_log (0B, 4, "to space object %p has no gc descriptor", obj);
  <D.17766>:
  goto <D.17766>;
  <D.18338>:
  if (0 != 0) goto <D.18339>; else goto <D.18340>;
  <D.18339>:
  gc_debug_file.11 = gc_debug_file;
  fprintf (gc_debug_file.11, " (tospace, no change)\n");
  gc_debug_file.11 = gc_debug_file;
  fflush (gc_debug_file.11);
  <D.18340>:
  D.18341 = sgen_ptr_in_nursery (obj_slot);
  if (D.18341 == 0) goto <D.18342>; else goto <D.18343>;
  <D.18342>:
  sgen_add_to_global_remset (obj_slot, obj);
  <D.18343>:
  return;
  <D.18336>:
  copy = copy_object_no_checks (obj, queue);
  *obj_slot = copy;
  D.18347 = sgen_ptr_in_nursery (copy);
  if (D.18347 != 0) goto <D.18348>; else goto <D.18345>;
  <D.18348>:
  D.18349 = sgen_ptr_in_nursery (obj_slot);
  if (D.18349 == 0) goto <D.18350>; else goto <D.18345>;
  <D.18350>:
  iftmp.14 = 1;
  goto <D.18346>;
  <D.18345>:
  iftmp.14 = 0;
  <D.18346>:
  D.18351 = iftmp.14 != 0;
  D.18352 = (long int) D.18351;
  D.18353 = __builtin_expect (D.18352, 0);
  if (D.18353 != 0) goto <D.18354>; else goto <D.18355>;
  <D.18354>:
  sgen_add_to_global_remset (obj_slot, copy);
  <D.18355>:
}


sgen_nursery_is_to_space (char * object)
{
  int object.15;
  char * sgen_nursery_start.16;
  int sgen_nursery_start.17;
  int D.18360;
  int D.18361;
  _Bool D.18362;
  long int D.18363;
  long int D.18364;
  char * D.18367;
  char * D.18368;
  int sgen_space_bitmap_size.18;
  _Bool D.18370;
  long int D.18371;
  long int D.18372;
  gboolean D.18375;
  char * sgen_space_bitmap.19;
  sizetype byte.20;
  char * D.18378;
  char D.18379;
  int D.18380;
  int D.18381;
  int D.18382;
  _Bool D.18383;
  int idx;
  int byte;
  int bit;

  object.15 = (int) object;
  sgen_nursery_start.16 = sgen_nursery_start;
  sgen_nursery_start.17 = (int) sgen_nursery_start.16;
  D.18360 = object.15 - sgen_nursery_start.17;
  idx = D.18360 >> 9;
  byte = idx / 8;
  bit = idx & 7;
  D.18361 = sgen_ptr_in_nursery (object);
  D.18362 = D.18361 == 0;
  D.18363 = (long int) D.18362;
  D.18364 = __builtin_expect (D.18363, 0);
  if (D.18364 != 0) goto <D.18365>; else goto <D.18366>;
  <D.18365>:
  D.18367 = sgen_get_nursery_start ();
  D.18368 = sgen_get_nursery_end ();
  monoeg_g_log (0B, 4, "object %p is not in nursery [%p - %p]", object, D.18367, D.18368);
  <D.17048>:
  goto <D.17048>;
  <D.18366>:
  sgen_space_bitmap_size.18 = sgen_space_bitmap_size;
  D.18370 = byte >= sgen_space_bitmap_size.18;
  D.18371 = (long int) D.18370;
  D.18372 = __builtin_expect (D.18371, 0);
  if (D.18372 != 0) goto <D.18373>; else goto <D.18374>;
  <D.18373>:
  sgen_space_bitmap_size.18 = sgen_space_bitmap_size;
  monoeg_g_log (0B, 4, "byte index %d out of range", byte, sgen_space_bitmap_size.18);
  <D.17049>:
  goto <D.17049>;
  <D.18374>:
  sgen_space_bitmap.19 = sgen_space_bitmap;
  byte.20 = (sizetype) byte;
  D.18378 = sgen_space_bitmap.19 + byte.20;
  D.18379 = *D.18378;
  D.18380 = (int) D.18379;
  D.18381 = D.18380 >> bit;
  D.18382 = D.18381 & 1;
  D.18383 = D.18382 != 0;
  D.18375 = (gboolean) D.18383;
  return D.18375;
}


sgen_get_nursery_start ()
{
  char * D.18385;

  D.18385 = sgen_nursery_start;
  return D.18385;
}


sgen_get_nursery_end ()
{
  char * D.18387;

  D.18387 = sgen_nursery_end;
  return D.18387;
}


copy_object_no_checks (void * obj, struct SgenGrayQueue * queue)
{
  void * D.18389;
  unsigned int D.18390;
  unsigned int D.18391;
  unsigned int D.18392;
  _Bool D.18393;
  long int D.18394;
  long int D.18395;
  void * D.18398;
  struct SgenGrayQueue * iftmp.21;
  unsigned int destination.22;
  unsigned int D.18404;
  struct MonoVTable * vt;
  gboolean has_references;
  mword objsize;
  char * destination;

  vt = MEM[(struct MonoObject *)obj].vtable;
  D.18389 = vt->gc_descr;
  D.18390 = (unsigned int) D.18389;
  has_references = sgen_gc_descr_has_references (D.18390);
  D.18391 = sgen_par_object_get_size (vt, obj);
  D.18392 = D.18391 + 7;
  objsize = D.18392 & 4294967288;
  destination = alloc_for_promotion (vt, obj, objsize, has_references);
  D.18393 = destination == 0B;
  D.18394 = (long int) D.18393;
  D.18395 = __builtin_expect (D.18394, 0);
  if (D.18395 != 0) goto <D.18396>; else goto <D.18397>;
  <D.18396>:
  sgen_pin_object (obj, queue);
  sgen_set_pinned_from_failed_allocation (objsize);
  D.18398 = obj;
  return D.18398;
  <D.18397>:
  if (has_references != 0) goto <D.18400>; else goto <D.18401>;
  <D.18400>:
  iftmp.21 = queue;
  goto <D.18402>;
  <D.18401>:
  iftmp.21 = 0B;
  <D.18402>:
  par_copy_object_no_checks (destination, vt, obj, objsize, iftmp.21);
  destination.22 = (unsigned int) destination;
  D.18404 = destination.22 | 1;
  MEM[(mword *)obj] = D.18404;
  D.18398 = destination;
  return D.18398;
}


sgen_gc_descr_has_references (mword desc)
{
  unsigned int D.18406;
  gboolean D.18409;
  unsigned int D.18410;
  unsigned int D.18413;

  D.18406 = desc & 4294901767;
  if (D.18406 == 1) goto <D.18407>; else goto <D.18408>;
  <D.18407>:
  D.18409 = 0;
  return D.18409;
  <D.18408>:
  D.18410 = desc & 49159;
  if (D.18410 == 4) goto <D.18411>; else goto <D.18412>;
  <D.18411>:
  D.18409 = 0;
  return D.18409;
  <D.18412>:
  D.18413 = desc & 7;
  if (D.18413 == 7) goto <D.18414>; else goto <D.18415>;
  <D.18414>:
  D.18409 = 0;
  return D.18409;
  <D.18415>:
  D.18409 = 1;
  return D.18409;
}


sgen_par_object_get_size (struct MonoVTable * vtable, struct MonoObject * o)
{
  void * D.18417;
  unsigned int D.18418;
  guint D.18423;
  int D.18424;
  int D.18425;
  unsigned int D.18426;
  unsigned int D.18429;
  int D.18430;
  unsigned int D.18431;
  unsigned int element_size.23;
  unsigned int D.18433;
  unsigned int D.18434;
  struct MonoClass * D.18437;
  unsigned char D.18438;
  unsigned int D.18439;
  unsigned int D.18440;
  mword descr;
  mword type;

  D.18417 = vtable->gc_descr;
  descr = (mword) D.18417;
  type = descr & 7;
  D.18418 = type + 4294967295;
  if (D.18418 <= 1) goto <D.18419>; else goto <D.18420>;
  <D.18419>:
  {
    mword size;

    size = descr & 65528;
    if (size == 0) goto <D.18421>; else goto <D.18422>;
    <D.18421>:
    D.18424 = MEM[(struct MonoString *)o].length;
    D.18425 = D.18424 * 2;
    D.18426 = (unsigned int) D.18425;
    D.18423 = D.18426 + 14;
    return D.18423;
    <D.18422>:
    D.18423 = size;
    return D.18423;
  }
  <D.18420>:
  if (type == 4) goto <D.18427>; else goto <D.18428>;
  <D.18427>:
  {
    int element_size;
    struct MonoArray * array;
    size_t size;

    D.18429 = descr >> 3;
    D.18430 = (int) D.18429;
    element_size = D.18430 & 1023;
    array = o;
    D.18431 = array->max_length;
    element_size.23 = (unsigned int) element_size;
    D.18433 = D.18431 * element_size.23;
    size = D.18433 + 16;
    D.18434 = descr & 8192;
    if (D.18434 != 0) goto <D.18435>; else goto <D.18436>;
    <D.18435>:
    size = size + 3;
    size = size & 4294967292;
    D.18437 = vtable->klass;
    D.18438 = D.18437->rank;
    D.18439 = (unsigned int) D.18438;
    D.18440 = D.18439 * 8;
    size = D.18440 + size;
    <D.18436>:
    D.18423 = size;
    return D.18423;
  }
  <D.18428>:
  D.18423 = slow_object_get_size (vtable, o);
  return D.18423;
}


slow_object_get_size (struct MonoVTable * vtable, struct MonoObject * o)
{
  struct MonoClass * D.18442;
  guint D.18445;
  int D.18446;
  int D.18447;
  unsigned int D.18448;
  unsigned char D.18449;
  int D.18452;
  unsigned int D.18453;
  unsigned int D.18454;
  unsigned int D.18455;
  struct MonoArrayBounds * D.18456;
  _Bool D.18457;
  long int D.18458;
  long int D.18459;
  unsigned int D.18462;
  unsigned int D.18463;
  int D.18464;
  struct MonoClass * klass;

  klass = vtable->klass;
  D.18442 = mono_defaults.string_class;
  if (D.18442 == klass) goto <D.18443>; else goto <D.18444>;
  <D.18443>:
  D.18446 = MEM[(struct MonoString *)o].length;
  D.18447 = D.18446 * 2;
  D.18448 = (unsigned int) D.18447;
  D.18445 = D.18448 + 14;
  return D.18445;
  <D.18444>:
  D.18449 = klass->rank;
  if (D.18449 != 0) goto <D.18450>; else goto <D.18451>;
  <D.18450>:
  {
    struct MonoArray * array;
    size_t size;

    array = o;
    D.18452 = klass->sizes.element_size;
    D.18453 = (unsigned int) D.18452;
    D.18454 = array->max_length;
    D.18455 = D.18453 * D.18454;
    size = D.18455 + 16;
    D.18456 = array->bounds;
    D.18457 = D.18456 != 0B;
    D.18458 = (long int) D.18457;
    D.18459 = __builtin_expect (D.18458, 0);
    if (D.18459 != 0) goto <D.18460>; else goto <D.18461>;
    <D.18460>:
    size = size + 3;
    size = size & 4294967292;
    D.18449 = klass->rank;
    D.18462 = (unsigned int) D.18449;
    D.18463 = D.18462 * 8;
    size = D.18463 + size;
    <D.18461>:
    D.18445 = size;
    return D.18445;
  }
  <D.18451>:
  D.18464 = klass->instance_size;
  D.18445 = (guint) D.18464;
  return D.18445;
}


alloc_for_promotion (struct MonoVTable * vtable, char * obj, size_t objsize, gboolean has_references)
{
  int promote_age.24;
  char * D.18469;
  void * (*<T2dd5>) (struct MonoVTable *, int, gboolean) D.18470;
  int objsize.25;
  char * D.18472;
  char * D.18473;
  _Bool D.18474;
  long int D.18475;
  long int D.18476;
  char * D.18479;
  char * D.18480;
  char * p;
  int age;

  p = 0B;
  age = get_object_age (obj);
  promote_age.24 = promote_age;
  if (age >= promote_age.24) goto <D.18467>; else goto <D.18468>;
  <D.18467>:
  D.18470 = major_collector.alloc_object;
  objsize.25 = (int) objsize;
  D.18469 = D.18470 (vtable, objsize.25, has_references);
  return D.18469;
  <D.18468>:
  age = age + 1;
  p = age_alloc_buffers[age].next;
  D.18472 = p + objsize;
  D.18473 = age_alloc_buffers[age].end;
  D.18474 = D.18472 <= D.18473;
  D.18475 = (long int) D.18474;
  D.18476 = __builtin_expect (D.18475, 1);
  if (D.18476 != 0) goto <D.18477>; else goto <D.18478>;
  <D.18477>:
  D.18479 = age_alloc_buffers[age].next;
  D.18480 = D.18479 + objsize;
  age_alloc_buffers[age].next = D.18480;
  goto <D.18481>;
  <D.18478>:
  p = alloc_for_promotion_slow_path (age, objsize);
  if (p == 0B) goto <D.18482>; else goto <D.18483>;
  <D.18482>:
  D.18470 = major_collector.alloc_object;
  objsize.25 = (int) objsize;
  D.18469 = D.18470 (vtable, objsize.25, has_references);
  return D.18469;
  <D.18483>:
  <D.18481>:
  MEM[(struct MonoVTable * *)p] = vtable;
  D.18469 = p;
  return D.18469;
}


get_object_age (char * object)
{
  int object.26;
  char * sgen_nursery_start.27;
  int sgen_nursery_start.28;
  int D.18488;
  int D.18489;
  char * region_age.29;
  sizetype idx.30;
  char * D.18492;
  char D.18493;
  int idx;

  object.26 = (int) object;
  sgen_nursery_start.27 = sgen_nursery_start;
  sgen_nursery_start.28 = (int) sgen_nursery_start.27;
  D.18488 = object.26 - sgen_nursery_start.28;
  idx = D.18488 >> 9;
  region_age.29 = region_age;
  idx.30 = (sizetype) idx;
  D.18492 = region_age.29 + idx.30;
  D.18493 = *D.18492;
  D.18489 = (int) D.18493;
  return D.18489;
}


alloc_for_promotion_slow_path (int age, size_t objsize)
{
  unsigned int D.18495;
  unsigned int D.18496;
  unsigned int D.18497;
  unsigned int allocated_size.31;
  char * D.18501;
  char * D.18502;
  char * D.18503;
  char * D.18504;
  char * D.18505;
  char * p;
  size_t allocated_size;
  size_t aligned_objsize;

  try
    {
      D.18495 = objsize + 511;
      aligned_objsize = D.18495 & 4294966784;
      D.18496 = MAX_EXPR <aligned_objsize, 4096>;
      D.18497 = MAX_EXPR <aligned_objsize, 512>;
      p = sgen_fragment_allocator_serial_range_alloc (&collector_allocator, D.18496, D.18497, &allocated_size);
      if (p != 0B) goto <D.18498>; else goto <D.18499>;
      <D.18498>:
      allocated_size.31 = allocated_size;
      D.18501 = p + allocated_size.31;
      set_age_in_range (p, D.18501, age);
      D.18502 = age_alloc_buffers[age].next;
      D.18503 = age_alloc_buffers[age].end;
      sgen_clear_range (D.18502, D.18503);
      D.18504 = p + objsize;
      age_alloc_buffers[age].next = D.18504;
      allocated_size.31 = allocated_size;
      D.18501 = p + allocated_size.31;
      age_alloc_buffers[age].end = D.18501;
      <D.18499>:
      D.18505 = p;
      return D.18505;
    }
  finally
    {
      allocated_size = {CLOBBER};
    }
}


set_age_in_range (char * start, char * end, int age)
{
  int start.32;
  char * sgen_nursery_start.33;
  int sgen_nursery_start.34;
  int D.18511;
  char * region_age.35;
  sizetype region_idx.36;
  int end.37;
  int D.18515;
  unsigned int length.38;
  char * region_start;
  int region_idx;
  int length;

  start.32 = (int) start;
  sgen_nursery_start.33 = sgen_nursery_start;
  sgen_nursery_start.34 = (int) sgen_nursery_start.33;
  D.18511 = start.32 - sgen_nursery_start.34;
  region_idx = D.18511 >> 9;
  region_age.35 = region_age;
  region_idx.36 = (sizetype) region_idx;
  region_start = region_age.35 + region_idx.36;
  end.37 = (int) end;
  start.32 = (int) start;
  D.18515 = end.37 - start.32;
  length = D.18515 >> 9;
  length.38 = (unsigned int) length;
  memset (region_start, age, length.38);
}


memset (void * __dest, int __ch, size_t __len)
{
  int D.18519;
  int D.18524;
  void * D.18526;
  unsigned int D.18527;

  D.18519 = __builtin_constant_p (__len);
  if (D.18519 != 0) goto <D.18520>; else goto <D.18521>;
  <D.18520>:
  if (__len == 0) goto <D.18522>; else goto <D.18523>;
  <D.18522>:
  D.18524 = __builtin_constant_p (__ch);
  if (D.18524 == 0) goto <D.18517>; else goto <D.18525>;
  <D.18525>:
  if (__ch != 0) goto <D.18517>; else goto <D.18518>;
  <D.18517>:
  __warn_memset_zero_len ();
  D.18526 = __dest;
  return D.18526;
  <D.18518>:
  <D.18523>:
  <D.18521>:
  D.18527 = __builtin_object_size (__dest, 0);
  D.18526 = __builtin___memset_chk (__dest, __ch, __len, D.18527);
  return D.18526;
}


par_copy_object_no_checks (char * destination, struct MonoVTable * vt, void * obj, mword objsize, struct SgenGrayQueue * queue)
{
  struct MonoClass * D.18531;
  const char * D.18532;
  const char * D.18533;
  struct FILE * gc_debug_file.39;
  struct MonoVTable * D.18537;
  struct MonoClass * D.18538;
  const char * D.18539;
  unsigned int D.18542;
  const void * D.18543;
  mword * D.18544;
  unsigned int D.18545;
  mword * D.18546;
  unsigned int D.18547;
  mword * D.18548;
  unsigned int D.18549;
  mword * D.18550;
  unsigned int D.18551;
  mword * D.18552;
  unsigned int D.18553;
  mword * D.18554;
  unsigned int D.18555;
  mword * D.18556;
  unsigned int D.18557;
  void * D.18559;
  const void * D.18560;
  unsigned int D.18561;
  int iftmp.40;
  unsigned char D.18567;
  struct MonoArrayBounds * D.18569;
  _Bool D.18571;
  long int D.18572;
  long int D.18573;
  int D.18576;
  int obj.41;
  int D.18578;
  sizetype D.18579;
  struct MonoArrayBounds * D.18580;
  int D.18583;
  unsigned int D.18584;
  <unnamed type> mono_profiler_events.42;
  unsigned int D.18586;
  _Bool D.18587;
  long int D.18588;
  long int D.18589;
  const char * D.18596;
  int iftmp.43;
  struct GrayQueueSection * D.18601;
  int D.18603;
  _Bool D.18604;
  long int D.18605;
  long int D.18606;
  int D.18610;
  int D.18611;
  static const void * copy_labels[9] = {(const void *) &LAB_0, (const void *) &LAB_1, (const void *) &LAB_2, (const void *) &LAB_3, (const void *) &LAB_4, (const void *) &LAB_5, (const void *) &LAB_6, (const void *) &LAB_7, (const void *) &LAB_8};
  void LAB_0 = <<< error >>>;
  void LAB_1 = <<< error >>>;
  void LAB_2 = <<< error >>>;
  void LAB_3 = <<< error >>>;
  void LAB_4 = <<< error >>>;
  void LAB_5 = <<< error >>>;
  void LAB_6 = <<< error >>>;
  void LAB_7 = <<< error >>>;
  void LAB_8 = <<< error >>>;

  if (0 != 0) goto <D.18529>; else goto <D.18530>;
  <D.18529>:
  D.18531 = vt->klass;
  D.18532 = D.18531->name_space;
  D.18531 = vt->klass;
  D.18533 = D.18531->name;
  monoeg_g_log (0B, 4, "vtable %p for class %s:%s was not initialized", vt, D.18532, D.18533);
  <D.17734>:
  goto <D.17734>;
  <D.18530>:
  if (0 != 0) goto <D.18534>; else goto <D.18535>;
  <D.18534>:
  gc_debug_file.39 = gc_debug_file;
  D.18537 = MEM[(struct MonoObject *)obj].vtable;
  D.18538 = D.18537->klass;
  D.18539 = D.18538->name;
  fprintf (gc_debug_file.39, " (to %p, %s size: %lu)\n", destination, D.18539, objsize);
  gc_debug_file.39 = gc_debug_file;
  fflush (gc_debug_file.39);
  <D.18535>:
  if (objsize <= 32) goto <D.18540>; else goto <D.18541>;
  <D.18540>:
  {
    mword * dest;

    dest = destination;
    D.18542 = objsize / 4;
    D.18543 = copy_labels[D.18542];
    goto D.18543;
    LAB_8:
    D.18544 = dest + 28;
    D.18545 = MEM[(mword *)obj + 28B];
    *D.18544 = D.18545;
    LAB_7:
    D.18546 = dest + 24;
    D.18547 = MEM[(mword *)obj + 24B];
    *D.18546 = D.18547;
    LAB_6:
    D.18548 = dest + 20;
    D.18549 = MEM[(mword *)obj + 20B];
    *D.18548 = D.18549;
    LAB_5:
    D.18550 = dest + 16;
    D.18551 = MEM[(mword *)obj + 16B];
    *D.18550 = D.18551;
    LAB_4:
    D.18552 = dest + 12;
    D.18553 = MEM[(mword *)obj + 12B];
    *D.18552 = D.18553;
    LAB_3:
    D.18554 = dest + 8;
    D.18555 = MEM[(mword *)obj + 8B];
    *D.18554 = D.18555;
    LAB_2:
    D.18556 = dest + 4;
    D.18557 = MEM[(mword *)obj + 4B];
    *D.18556 = D.18557;
    LAB_1:
    LAB_0:
  }
  goto <D.18558>;
  <D.18541>:
  D.18559 = destination + 4;
  D.18560 = obj + 4;
  D.18561 = objsize + 4294967292;
  mono_gc_memmove_aligned (D.18559, D.18560, D.18561);
  <D.18558>:
  if (0 != 0) goto <D.18562>; else goto <D.18563>;
  <D.18562>:
  D.18531 = vt->klass;
  D.18532 = D.18531->name_space;
  D.18531 = vt->klass;
  D.18533 = D.18531->name;
  monoeg_g_log (0B, 4, "vtable %p for class %s:%s has no gc descriptor", vt, D.18532, D.18533);
  <D.17736>:
  goto <D.17736>;
  <D.18563>:
  D.18567 = vt->rank;
  if (D.18567 != 0) goto <D.18568>; else goto <D.18565>;
  <D.18568>:
  D.18569 = MEM[(struct MonoArray *)obj].bounds;
  if (D.18569 != 0B) goto <D.18570>; else goto <D.18565>;
  <D.18570>:
  iftmp.40 = 1;
  goto <D.18566>;
  <D.18565>:
  iftmp.40 = 0;
  <D.18566>:
  D.18571 = iftmp.40 != 0;
  D.18572 = (long int) D.18571;
  D.18573 = __builtin_expect (D.18572, 0);
  if (D.18573 != 0) goto <D.18574>; else goto <D.18575>;
  <D.18574>:
  {
    struct MonoArray * array;

    array = destination;
    D.18569 = MEM[(struct MonoArray *)obj].bounds;
    D.18576 = (int) D.18569;
    obj.41 = (int) obj;
    D.18578 = D.18576 - obj.41;
    D.18579 = (sizetype) D.18578;
    D.18580 = destination + D.18579;
    array->bounds = D.18580;
    if (0 != 0) goto <D.18581>; else goto <D.18582>;
    <D.18581>:
    gc_debug_file.39 = gc_debug_file;
    D.18567 = vt->rank;
    D.18583 = (int) D.18567;
    D.18584 = mono_array_length (array);
    fprintf (gc_debug_file.39, "Array instance %p: size: %lu, rank: %d, length: %lu\n", array, objsize, D.18583, D.18584);
    gc_debug_file.39 = gc_debug_file;
    fflush (gc_debug_file.39);
    <D.18582>:
  }
  <D.18575>:
  mono_profiler_events.42 = mono_profiler_events;
  D.18586 = mono_profiler_events.42 & 524288;
  D.18587 = D.18586 != 0;
  D.18588 = (long int) D.18587;
  D.18589 = __builtin_expect (D.18588, 0);
  if (D.18589 != 0) goto <D.18590>; else goto <D.18591>;
  <D.18590>:
  sgen_register_moved_object (obj, destination);
  <D.18591>:
  obj = destination;
  if (queue != 0B) goto <D.18592>; else goto <D.18593>;
  <D.18592>:
  if (0 != 0) goto <D.18594>; else goto <D.18595>;
  <D.18594>:
  gc_debug_file.39 = gc_debug_file;
  D.18596 = sgen_safe_name (obj);
  fprintf (gc_debug_file.39, "Enqueuing gray object %p (%s)\n", obj, D.18596);
  gc_debug_file.39 = gc_debug_file;
  fflush (gc_debug_file.39);
  <D.18595>:
  D.18601 = queue->first;
  if (D.18601 == 0B) goto <D.18598>; else goto <D.18602>;
  <D.18602>:
  D.18601 = queue->first;
  D.18603 = D.18601->end;
  if (D.18603 == 125) goto <D.18598>; else goto <D.18599>;
  <D.18598>:
  iftmp.43 = 1;
  goto <D.18600>;
  <D.18599>:
  iftmp.43 = 0;
  <D.18600>:
  D.18604 = iftmp.43 != 0;
  D.18605 = (long int) D.18604;
  D.18606 = __builtin_expect (D.18605, 0);
  if (D.18606 != 0) goto <D.18607>; else goto <D.18608>;
  <D.18607>:
  sgen_gray_object_enqueue (queue, obj);
  goto <D.18609>;
  <D.18608>:
  D.18601 = queue->first;
  D.18601 = queue->first;
  D.18603 = D.18601->end;
  D.18610 = D.18603;
  D.18611 = D.18610 + 1;
  D.18601->end = D.18611;
  D.18601->objects[D.18610] = obj;
  <D.18609>:
  __builtin_prefetch (obj);
  <D.18593>:
}


sgen_ptr_in_nursery (void * p)
{
  gboolean D.18614;
  int sgen_nursery_bits.45;
  int D.18616;
  int D.18617;
  unsigned int D.18618;
  unsigned int p.46;
  unsigned int D.18620;
  char * sgen_nursery_start.47;
  unsigned int sgen_nursery_start.48;
  _Bool D.18623;

  sgen_nursery_bits.45 = sgen_nursery_bits;
  D.18616 = 1 << sgen_nursery_bits.45;
  D.18617 = -D.18616;
  D.18618 = (unsigned int) D.18617;
  p.46 = (unsigned int) p;
  D.18620 = D.18618 & p.46;
  sgen_nursery_start.47 = sgen_nursery_start;
  sgen_nursery_start.48 = (unsigned int) sgen_nursery_start.47;
  D.18623 = D.18620 == sgen_nursery_start.48;
  D.18614 = (gboolean) D.18623;
  return D.18614;
}


split_nursery_serial_scan_object (char * start, struct SgenGrayQueue * queue)
{
  unsigned int D.18625;
  unsigned int D.18626;
  unsigned int D.18627;
  unsigned int D.18628;
  unsigned int D.18631;
  unsigned int D.18632;
  unsigned int D.18633;
  unsigned int D.18634;
  unsigned int D.18635;
  void * D.18640;
  struct FILE * gc_debug_file.49;
  unsigned int _index.50;
  unsigned int D.18651;
  int D.18652;
  void * D.18657;
  unsigned int _index.51;
  unsigned int D.18661;
  int D.18662;
  unsigned int D.18669;
  unsigned int D.18672;
  int D.18673;
  int desc.52;
  unsigned int D.18677;
  unsigned int el_size.53;
  unsigned int D.18679;
  void * D.18684;
  int D.18690;
  unsigned int offset.54;
  unsigned int D.18692;
  unsigned int i.55;
  unsigned int D.18694;
  void * * D.18695;
  void * D.18700;
  sizetype el_size.56;
  unsigned int D.18707;
  void * D.18714;
  unsigned int D.18717;
  void * D.18724;
  unsigned int D.18727;
  unsigned int D.18728;
  struct MonoVTable * D.18731;
  struct MonoClass * D.18732;
  const char * D.18733;
  const char * D.18734;
  gsize * bitmap_data.57;
  unsigned int D.18736;
  void * D.18743;
  int bwords.58;
  unsigned int D.18747;
  gsize * mbitmap_data.59;
  unsigned int D.18749;
  unsigned int D.18750;
  struct MonoClass * D.18751;
  unsigned int el_size.60;
  unsigned int D.18753;
  const char * D.18756;
  const char * D.18757;
  gsize * bitmap_data.61;
  unsigned int D.18759;
  void * D.18766;
  unsigned int bwords.62;
  sizetype el_size.63;

  {
    struct GCVTable * vt;
    mword desc;

    D.18625 = MEM[(mword *)start];
    D.18626 = D.18625 & 4294967292;
    vt = (struct GCVTable *) D.18626;
    desc = vt->desc;
    D.18627 = desc & 7;
    switch (D.18627) <default: <D.18081>, case 1: <D.17986>, case 2: <D.17995>, case 3: <D.18045>, case 4: <D.18005>, case 5: <D.18038>, case 6: <D.18059>, case 7: <D.18080>>
    <D.17986>:
    D.18628 = desc & 4294901760;
    if (D.18628 != 0) goto <D.18629>; else goto <D.18630>;
    <D.18629>:
    {
      void * * _objptr_end;
      void * * _objptr;

      _objptr = start;
      D.18631 = desc >> 16;
      D.18632 = D.18631 & 255;
      D.18633 = D.18632 * 4;
      _objptr = _objptr + D.18633;
      D.18634 = desc >> 24;
      D.18635 = D.18634 * 4;
      _objptr_end = _objptr + D.18635;
      {
        void * __old;

        __old = *_objptr;
        if (__old != 0B) goto <D.18636>; else goto <D.18637>;
        <D.18636>:
        split_nursery_serial_copy_object_from_obj (_objptr, queue);
        if (0 != 0) goto <D.18638>; else goto <D.18639>;
        <D.18638>:
        D.18640 = *_objptr;
        if (D.18640 != __old) goto <D.18641>; else goto <D.18642>;
        <D.18641>:
        gc_debug_file.49 = gc_debug_file;
        D.18640 = *_objptr;
        fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18640, __old);
        gc_debug_file.49 = gc_debug_file;
        fflush (gc_debug_file.49);
        <D.18642>:
        <D.18639>:
        <D.18637>:
      }
      _objptr = _objptr + 4;
      goto <D.17992>;
      <D.17991>:
      {
        void * __old;

        __old = *_objptr;
        if (__old != 0B) goto <D.18644>; else goto <D.18645>;
        <D.18644>:
        split_nursery_serial_copy_object_from_obj (_objptr, queue);
        if (0 != 0) goto <D.18646>; else goto <D.18647>;
        <D.18646>:
        D.18640 = *_objptr;
        if (D.18640 != __old) goto <D.18648>; else goto <D.18649>;
        <D.18648>:
        gc_debug_file.49 = gc_debug_file;
        D.18640 = *_objptr;
        fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18640, __old);
        gc_debug_file.49 = gc_debug_file;
        fflush (gc_debug_file.49);
        <D.18649>:
        <D.18647>:
        <D.18645>:
      }
      _objptr = _objptr + 4;
      <D.17992>:
      if (_objptr < _objptr_end) goto <D.17991>; else goto <D.17993>;
      <D.17993>:
    }
    <D.18630>:
    goto <D.17994>;
    <D.17995>:
    {
      void * * _objptr;
      gsize _bmap;

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

        _index = __builtin_ctz (_bmap);
        _index.50 = (unsigned int) _index;
        D.18651 = _index.50 * 4;
        _objptr = _objptr + D.18651;
        D.18652 = _index + 1;
        _bmap = _bmap >> D.18652;
        {
          void * __old;

          __old = *_objptr;
          if (__old != 0B) goto <D.18653>; else goto <D.18654>;
          <D.18653>:
          split_nursery_serial_copy_object_from_obj (_objptr, queue);
          if (0 != 0) goto <D.18655>; else goto <D.18656>;
          <D.18655>:
          D.18657 = *_objptr;
          if (D.18657 != __old) goto <D.18658>; else goto <D.18659>;
          <D.18658>:
          gc_debug_file.49 = gc_debug_file;
          D.18657 = *_objptr;
          fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18657, __old);
          gc_debug_file.49 = gc_debug_file;
          fflush (gc_debug_file.49);
          <D.18659>:
          <D.18656>:
          <D.18654>:
        }
        _objptr = _objptr + 4;
      }
      goto <D.18003>;
      <D.18002>:
      {
        int _index;

        _index = __builtin_ctz (_bmap);
        _index.51 = (unsigned int) _index;
        D.18661 = _index.51 * 4;
        _objptr = _objptr + D.18661;
        D.18662 = _index + 1;
        _bmap = _bmap >> D.18662;
        {
          void * __old;

          __old = *_objptr;
          if (__old != 0B) goto <D.18663>; else goto <D.18664>;
          <D.18663>:
          split_nursery_serial_copy_object_from_obj (_objptr, queue);
          if (0 != 0) goto <D.18665>; else goto <D.18666>;
          <D.18665>:
          D.18657 = *_objptr;
          if (D.18657 != __old) goto <D.18667>; else goto <D.18668>;
          <D.18667>:
          gc_debug_file.49 = gc_debug_file;
          D.18657 = *_objptr;
          fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18657, __old);
          gc_debug_file.49 = gc_debug_file;
          fflush (gc_debug_file.49);
          <D.18668>:
          <D.18666>:
          <D.18664>:
        }
        _objptr = _objptr + 4;
      }
      <D.18003>:
      if (_bmap != 0) goto <D.18002>; else goto <D.18004>;
      <D.18004>:
    }
    goto <D.17994>;
    <D.18005>:
    D.18669 = desc & 4294950912;
    if (D.18669 != 0) goto <D.18670>; else goto <D.18671>;
    <D.18670>:
    {
      int el_size;
      int etype;

      D.18672 = desc >> 3;
      D.18673 = (int) D.18672;
      el_size = D.18673 & 1023;
      desc.52 = (int) desc;
      etype = desc.52 & 49152;
      if (etype == 16384) goto <D.18675>; else goto <D.18676>;
      <D.18675>:
      {
        void * * p;
        void * * end_refs;

        p = start + 16;
        D.18677 = MEM[(struct MonoArray *)start].max_length;
        el_size.53 = (unsigned int) el_size;
        D.18679 = D.18677 * el_size.53;
        end_refs = p + D.18679;
        goto <D.18012>;
        <D.18011>:
        {
          void * __old;

          __old = *p;
          if (__old != 0B) goto <D.18680>; else goto <D.18681>;
          <D.18680>:
          split_nursery_serial_copy_object_from_obj (p, queue);
          if (0 != 0) goto <D.18682>; else goto <D.18683>;
          <D.18682>:
          D.18684 = *p;
          if (D.18684 != __old) goto <D.18685>; else goto <D.18686>;
          <D.18685>:
          gc_debug_file.49 = gc_debug_file;
          D.18684 = *p;
          fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", p, D.18684, __old);
          gc_debug_file.49 = gc_debug_file;
          fflush (gc_debug_file.49);
          <D.18686>:
          <D.18683>:
          <D.18681>:
        }
        p = p + 4;
        <D.18012>:
        if (p < end_refs) goto <D.18011>; else goto <D.18013>;
        <D.18013>:
      }
      goto <D.18687>;
      <D.18676>:
      if (etype == 32768) goto <D.18688>; else goto <D.18689>;
      <D.18688>:
      {
        int offset;
        int num_refs;
        char * e_start;
        char * e_end;

        D.18631 = desc >> 16;
        D.18690 = (int) D.18631;
        offset = D.18690 & 255;
        D.18634 = desc >> 24;
        num_refs = (int) D.18634;
        e_start = start + 16;
        D.18677 = MEM[(struct MonoArray *)start].max_length;
        el_size.53 = (unsigned int) el_size;
        D.18679 = D.18677 * el_size.53;
        e_end = e_start + D.18679;
        goto <D.18025>;
        <D.18024>:
        {
          void * * p;
          int i;

          p = e_start;
          offset.54 = (unsigned int) offset;
          D.18692 = offset.54 * 4;
          p = p + D.18692;
          i = 0;
          goto <D.18022>;
          <D.18021>:
          {
            void * __old;

            i.55 = (unsigned int) i;
            D.18694 = i.55 * 4;
            D.18695 = p + D.18694;
            __old = *D.18695;
            if (__old != 0B) goto <D.18696>; else goto <D.18697>;
            <D.18696>:
            i.55 = (unsigned int) i;
            D.18694 = i.55 * 4;
            D.18695 = p + D.18694;
            split_nursery_serial_copy_object_from_obj (D.18695, queue);
            if (0 != 0) goto <D.18698>; else goto <D.18699>;
            <D.18698>:
            i.55 = (unsigned int) i;
            D.18694 = i.55 * 4;
            D.18695 = p + D.18694;
            D.18700 = *D.18695;
            if (D.18700 != __old) goto <D.18701>; else goto <D.18702>;
            <D.18701>:
            gc_debug_file.49 = gc_debug_file;
            i.55 = (unsigned int) i;
            D.18694 = i.55 * 4;
            D.18695 = p + D.18694;
            i.55 = (unsigned int) i;
            D.18694 = i.55 * 4;
            D.18695 = p + D.18694;
            D.18700 = *D.18695;
            fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", D.18695, D.18700, __old);
            gc_debug_file.49 = gc_debug_file;
            fflush (gc_debug_file.49);
            <D.18702>:
            <D.18699>:
            <D.18697>:
          }
          i = i + 1;
          <D.18022>:
          if (i < num_refs) goto <D.18021>; else goto <D.18023>;
          <D.18023>:
          el_size.56 = (sizetype) el_size;
          e_start = e_start + el_size.56;
        }
        <D.18025>:
        if (e_start < e_end) goto <D.18024>; else goto <D.18026>;
        <D.18026>:
      }
      goto <D.18704>;
      <D.18689>:
      if (etype == 49152) goto <D.18705>; else goto <D.18706>;
      <D.18705>:
      {
        char * e_start;
        char * e_end;

        e_start = start + 16;
        D.18677 = MEM[(struct MonoArray *)start].max_length;
        el_size.53 = (unsigned int) el_size;
        D.18679 = D.18677 * el_size.53;
        e_end = e_start + D.18679;
        goto <D.18036>;
        <D.18035>:
        {
          void * * p;
          gsize _bmap;

          p = e_start;
          _bmap = desc >> 16;
          goto <D.18033>;
          <D.18032>:
          D.18707 = _bmap & 1;
          if (D.18707 != 0) goto <D.18708>; else goto <D.18709>;
          <D.18708>:
          {
            void * __old;

            __old = *p;
            if (__old != 0B) goto <D.18710>; else goto <D.18711>;
            <D.18710>:
            split_nursery_serial_copy_object_from_obj (p, queue);
            if (0 != 0) goto <D.18712>; else goto <D.18713>;
            <D.18712>:
            D.18714 = *p;
            if (D.18714 != __old) goto <D.18715>; else goto <D.18716>;
            <D.18715>:
            gc_debug_file.49 = gc_debug_file;
            D.18714 = *p;
            fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", p, D.18714, __old);
            gc_debug_file.49 = gc_debug_file;
            fflush (gc_debug_file.49);
            <D.18716>:
            <D.18713>:
            <D.18711>:
          }
          <D.18709>:
          _bmap = _bmap >> 1;
          p = p + 4;
          <D.18033>:
          if (_bmap != 0) goto <D.18032>; else goto <D.18034>;
          <D.18034>:
          el_size.56 = (sizetype) el_size;
          e_start = e_start + el_size.56;
        }
        <D.18036>:
        if (e_start < e_end) goto <D.18035>; else goto <D.18037>;
        <D.18037>:
      }
      <D.18706>:
      <D.18704>:
      <D.18687>:
    }
    <D.18671>:
    goto <D.17994>;
    <D.18038>:
    {
      void * * _objptr;
      gsize _bmap;

      _objptr = start;
      _bmap = desc >> 3;
      _objptr = _objptr + 8;
      goto <D.18043>;
      <D.18042>:
      D.18717 = _bmap & 1;
      if (D.18717 != 0) goto <D.18718>; else goto <D.18719>;
      <D.18718>:
      {
        void * __old;

        __old = *_objptr;
        if (__old != 0B) goto <D.18720>; else goto <D.18721>;
        <D.18720>:
        split_nursery_serial_copy_object_from_obj (_objptr, queue);
        if (0 != 0) goto <D.18722>; else goto <D.18723>;
        <D.18722>:
        D.18724 = *_objptr;
        if (D.18724 != __old) goto <D.18725>; else goto <D.18726>;
        <D.18725>:
        gc_debug_file.49 = gc_debug_file;
        D.18724 = *_objptr;
        fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18724, __old);
        gc_debug_file.49 = gc_debug_file;
        fflush (gc_debug_file.49);
        <D.18726>:
        <D.18723>:
        <D.18721>:
      }
      <D.18719>:
      _bmap = _bmap >> 1;
      _objptr = _objptr + 4;
      <D.18043>:
      if (_bmap != 0) goto <D.18042>; else goto <D.18044>;
      <D.18044>:
    }
    goto <D.17994>;
    <D.18045>:
    {
      void * * _objptr;
      gsize * bitmap_data;
      int bwords;
      void * * start_run;

      _objptr = start;
      bitmap_data = sgen_get_complex_descriptor (desc);
      D.18727 = *bitmap_data;
      D.18728 = D.18727 + 4294967295;
      bwords = (int) D.18728;
      start_run = _objptr;
      bitmap_data = bitmap_data + 4;
      if (0 != 0) goto <D.18729>; else goto <D.18730>;
      <D.18729>:
      {
        struct MonoObject * myobj;

        myobj = start;
        D.18731 = myobj->vtable;
        D.18732 = D.18731->klass;
        D.18733 = D.18732->name_space;
        D.18731 = myobj->vtable;
        D.18732 = D.18731->klass;
        D.18734 = D.18732->name;
        monoeg_g_print ("found %d at %p (0x%zx): %s.%s\n", bwords, start, desc, D.18733, D.18734);
      }
      <D.18730>:
      goto <D.18057>;
      <D.18056>:
      {
        gsize _bmap;

        bitmap_data.57 = bitmap_data;
        bitmap_data = bitmap_data.57 + 4;
        _bmap = *bitmap_data.57;
        _objptr = start_run;
        goto <D.18054>;
        <D.18053>:
        D.18736 = _bmap & 1;
        if (D.18736 != 0) goto <D.18737>; else goto <D.18738>;
        <D.18737>:
        {
          void * __old;

          __old = *_objptr;
          if (__old != 0B) goto <D.18739>; else goto <D.18740>;
          <D.18739>:
          split_nursery_serial_copy_object_from_obj (_objptr, queue);
          if (0 != 0) goto <D.18741>; else goto <D.18742>;
          <D.18741>:
          D.18743 = *_objptr;
          if (D.18743 != __old) goto <D.18744>; else goto <D.18745>;
          <D.18744>:
          gc_debug_file.49 = gc_debug_file;
          D.18743 = *_objptr;
          fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18743, __old);
          gc_debug_file.49 = gc_debug_file;
          fflush (gc_debug_file.49);
          <D.18745>:
          <D.18742>:
          <D.18740>:
        }
        <D.18738>:
        _bmap = _bmap >> 1;
        _objptr = _objptr + 4;
        <D.18054>:
        if (_bmap != 0) goto <D.18053>; else goto <D.18055>;
        <D.18055>:
        start_run = start_run + 128;
      }
      <D.18057>:
      bwords.58 = bwords;
      bwords = bwords.58 + -1;
      if (bwords.58 > 0) goto <D.18056>; else goto <D.18058>;
      <D.18058>:
    }
    goto <D.17994>;
    <D.18059>:
    {
      gsize * mbitmap_data;
      int mbwords;
      int el_size;
      char * e_start;
      char * e_end;

      D.18747 = vt->desc;
      mbitmap_data = sgen_get_complex_descriptor (D.18747);
      mbitmap_data.59 = mbitmap_data;
      mbitmap_data = mbitmap_data.59 + 4;
      D.18749 = *mbitmap_data.59;
      D.18750 = D.18749 + 4294967295;
      mbwords = (int) D.18750;
      D.18751 = vt->klass;
      el_size = mono_array_element_size (D.18751);
      e_start = start + 16;
      D.18677 = MEM[(struct MonoArray *)start].max_length;
      el_size.60 = (unsigned int) el_size;
      D.18753 = D.18677 * el_size.60;
      e_end = e_start + D.18753;
      if (0 != 0) goto <D.18754>; else goto <D.18755>;
      <D.18754>:
      D.18747 = vt->desc;
      D.18751 = vt->klass;
      D.18756 = D.18751->name_space;
      D.18751 = vt->klass;
      D.18757 = D.18751->name;
      monoeg_g_print ("found %d at %p (0x%zx): %s.%s\n", mbwords, start, D.18747, D.18756, D.18757);
      <D.18755>:
      goto <D.18078>;
      <D.18077>:
      {
        void * * _objptr;
        gsize * bitmap_data;
        unsigned int bwords;

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

          bitmap_data.61 = bitmap_data;
          bitmap_data = bitmap_data.61 + 4;
          _bmap = *bitmap_data.61;
          start_run = _objptr;
          goto <D.18072>;
          <D.18071>:
          D.18759 = _bmap & 1;
          if (D.18759 != 0) goto <D.18760>; else goto <D.18761>;
          <D.18760>:
          {
            void * __old;

            __old = *_objptr;
            if (__old != 0B) goto <D.18762>; else goto <D.18763>;
            <D.18762>:
            split_nursery_serial_copy_object_from_obj (_objptr, queue);
            if (0 != 0) goto <D.18764>; else goto <D.18765>;
            <D.18764>:
            D.18766 = *_objptr;
            if (D.18766 != __old) goto <D.18767>; else goto <D.18768>;
            <D.18767>:
            gc_debug_file.49 = gc_debug_file;
            D.18766 = *_objptr;
            fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18766, __old);
            gc_debug_file.49 = gc_debug_file;
            fflush (gc_debug_file.49);
            <D.18768>:
            <D.18765>:
            <D.18763>:
          }
          <D.18761>:
          _bmap = _bmap >> 1;
          _objptr = _objptr + 4;
          <D.18072>:
          if (_bmap != 0) goto <D.18071>; else goto <D.18073>;
          <D.18073>:
          _objptr = start_run + 128;
        }
        <D.18075>:
        bwords.62 = bwords;
        bwords = bwords.62 + 4294967295;
        if (bwords.62 != 0) goto <D.18074>; else goto <D.18076>;
        <D.18076>:
        el_size.63 = (sizetype) el_size;
        e_start = e_start + el_size.63;
      }
      <D.18078>:
      if (e_start < e_end) goto <D.18077>; else goto <D.18079>;
      <D.18079>:
    }
    goto <D.17994>;
    <D.18080>:
    goto <D.17994>;
    <D.18081>:
    monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-scan-object.h", 111);
    <D.17994>:
  }
}


split_nursery_parallel_scan_vtype (char * start, mword desc, struct SgenGrayQueue * queue)
{
  unsigned int D.18772;
  unsigned int D.18773;
  unsigned int D.18776;
  unsigned int D.18777;
  unsigned int D.18778;
  unsigned int D.18779;
  unsigned int D.18780;
  struct FILE * gc_debug_file.64;
  void * D.18788;
  int iftmp.65;
  int D.18792;
  int D.18794;
  _Bool D.18796;
  long int D.18797;
  long int D.18798;
  int iftmp.66;
  int D.18810;
  int D.18812;
  _Bool D.18814;
  long int D.18815;
  long int D.18816;
  unsigned int _index.67;
  unsigned int D.18820;
  int D.18821;
  void * D.18828;
  int iftmp.68;
  int D.18832;
  int D.18834;
  _Bool D.18836;
  long int D.18837;
  long int D.18838;
  unsigned int _index.69;
  unsigned int D.18842;
  int D.18843;
  int iftmp.70;
  int D.18853;
  int D.18855;
  _Bool D.18857;
  long int D.18858;
  long int D.18859;
  unsigned int D.18862;
  unsigned int D.18865;
  int D.18866;
  int desc.71;
  unsigned int D.18870;
  unsigned int el_size.72;
  unsigned int D.18872;
  void * D.18879;
  int iftmp.73;
  int D.18883;
  int D.18885;
  _Bool D.18887;
  long int D.18888;
  long int D.18889;
  int D.18895;
  unsigned int offset.74;
  unsigned int D.18897;
  unsigned int i.75;
  unsigned int D.18899;
  void * * D.18900;
  void * D.18907;
  int iftmp.76;
  int D.18911;
  void * D.18913;
  int D.18914;
  _Bool D.18916;
  long int D.18917;
  long int D.18918;
  void * D.18921;
  sizetype el_size.77;
  unsigned int D.18926;
  void * D.18935;
  int iftmp.78;
  int D.18939;
  int D.18941;
  _Bool D.18943;
  long int D.18944;
  long int D.18945;
  unsigned int D.18948;
  void * D.18957;
  int iftmp.79;
  int D.18961;
  int D.18963;
  _Bool D.18965;
  long int D.18966;
  long int D.18967;
  unsigned int D.18970;
  unsigned int D.18971;
  struct MonoVTable * D.18974;
  struct MonoClass * D.18975;
  const char * D.18976;
  const char * D.18977;
  gsize * bitmap_data.80;
  unsigned int D.18979;
  void * D.18988;
  int iftmp.81;
  int D.18992;
  int D.18994;
  _Bool D.18996;
  long int D.18997;
  long int D.18998;
  int bwords.82;

  start = start + 4294967288;
  D.18772 = desc & 7;
  switch (D.18772) <default: <D.17979>, case 1: <D.17896>, case 2: <D.17907>, case 3: <D.17963>, case 4: <D.17919>, case 5: <D.17955>, case 7: <D.17978>>
  <D.17896>:
  D.18773 = desc & 4294901760;
  if (D.18773 != 0) goto <D.18774>; else goto <D.18775>;
  <D.18774>:
  {
    void * * _objptr_end;
    void * * _objptr;

    _objptr = start;
    D.18776 = desc >> 16;
    D.18777 = D.18776 & 255;
    D.18778 = D.18777 * 4;
    _objptr = _objptr + D.18778;
    D.18779 = desc >> 24;
    D.18780 = D.18779 * 4;
    _objptr_end = _objptr + D.18780;
    {
      void * __old;
      void * __copy;

      __old = *_objptr;
      if (__old != 0B) goto <D.18781>; else goto <D.18782>;
      <D.18781>:
      split_nursery_parallel_copy_object (_objptr, queue);
      __copy = *_objptr;
      if (0 != 0) goto <D.18783>; else goto <D.18784>;
      <D.18783>:
      if (__old != __copy) goto <D.18785>; else goto <D.18786>;
      <D.18785>:
      gc_debug_file.64 = gc_debug_file;
      D.18788 = *_objptr;
      fprintf (gc_debug_file.64, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18788, __old);
      gc_debug_file.64 = gc_debug_file;
      fflush (gc_debug_file.64);
      <D.18786>:
      <D.18784>:
      D.18792 = sgen_ptr_in_nursery (__copy);
      if (D.18792 != 0) goto <D.18793>; else goto <D.18790>;
      <D.18793>:
      D.18794 = sgen_ptr_in_nursery (_objptr);
      if (D.18794 == 0) goto <D.18795>; else goto <D.18790>;
      <D.18795>:
      iftmp.65 = 1;
      goto <D.18791>;
      <D.18790>:
      iftmp.65 = 0;
      <D.18791>:
      D.18796 = iftmp.65 != 0;
      D.18797 = (long int) D.18796;
      D.18798 = __builtin_expect (D.18797, 0);
      if (D.18798 != 0) goto <D.18799>; else goto <D.18800>;
      <D.18799>:
      sgen_add_to_global_remset (_objptr, __copy);
      <D.18800>:
      <D.18782>:
    }
    _objptr = _objptr + 4;
    goto <D.17904>;
    <D.17903>:
    {
      void * __old;
      void * __copy;

      __old = *_objptr;
      if (__old != 0B) goto <D.18801>; else goto <D.18802>;
      <D.18801>:
      split_nursery_parallel_copy_object (_objptr, queue);
      __copy = *_objptr;
      if (0 != 0) goto <D.18803>; else goto <D.18804>;
      <D.18803>:
      if (__old != __copy) goto <D.18805>; else goto <D.18806>;
      <D.18805>:
      gc_debug_file.64 = gc_debug_file;
      D.18788 = *_objptr;
      fprintf (gc_debug_file.64, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18788, __old);
      gc_debug_file.64 = gc_debug_file;
      fflush (gc_debug_file.64);
      <D.18806>:
      <D.18804>:
      D.18810 = sgen_ptr_in_nursery (__copy);
      if (D.18810 != 0) goto <D.18811>; else goto <D.18808>;
      <D.18811>:
      D.18812 = sgen_ptr_in_nursery (_objptr);
      if (D.18812 == 0) goto <D.18813>; else goto <D.18808>;
      <D.18813>:
      iftmp.66 = 1;
      goto <D.18809>;
      <D.18808>:
      iftmp.66 = 0;
      <D.18809>:
      D.18814 = iftmp.66 != 0;
      D.18815 = (long int) D.18814;
      D.18816 = __builtin_expect (D.18815, 0);
      if (D.18816 != 0) goto <D.18817>; else goto <D.18818>;
      <D.18817>:
      sgen_add_to_global_remset (_objptr, __copy);
      <D.18818>:
      <D.18802>:
    }
    _objptr = _objptr + 4;
    <D.17904>:
    if (_objptr < _objptr_end) goto <D.17903>; else goto <D.17905>;
    <D.17905>:
  }
  <D.18775>:
  goto <D.17906>;
  <D.17907>:
  {
    void * * _objptr;
    gsize _bmap;

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

      _index = __builtin_ctz (_bmap);
      _index.67 = (unsigned int) _index;
      D.18820 = _index.67 * 4;
      _objptr = _objptr + D.18820;
      D.18821 = _index + 1;
      _bmap = _bmap >> D.18821;
      {
        void * __old;
        void * __copy;

        __old = *_objptr;
        if (__old != 0B) goto <D.18822>; else goto <D.18823>;
        <D.18822>:
        split_nursery_parallel_copy_object (_objptr, queue);
        __copy = *_objptr;
        if (0 != 0) goto <D.18824>; else goto <D.18825>;
        <D.18824>:
        if (__old != __copy) goto <D.18826>; else goto <D.18827>;
        <D.18826>:
        gc_debug_file.64 = gc_debug_file;
        D.18828 = *_objptr;
        fprintf (gc_debug_file.64, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18828, __old);
        gc_debug_file.64 = gc_debug_file;
        fflush (gc_debug_file.64);
        <D.18827>:
        <D.18825>:
        D.18832 = sgen_ptr_in_nursery (__copy);
        if (D.18832 != 0) goto <D.18833>; else goto <D.18830>;
        <D.18833>:
        D.18834 = sgen_ptr_in_nursery (_objptr);
        if (D.18834 == 0) goto <D.18835>; else goto <D.18830>;
        <D.18835>:
        iftmp.68 = 1;
        goto <D.18831>;
        <D.18830>:
        iftmp.68 = 0;
        <D.18831>:
        D.18836 = iftmp.68 != 0;
        D.18837 = (long int) D.18836;
        D.18838 = __builtin_expect (D.18837, 0);
        if (D.18838 != 0) goto <D.18839>; else goto <D.18840>;
        <D.18839>:
        sgen_add_to_global_remset (_objptr, __copy);
        <D.18840>:
        <D.18823>:
      }
      _objptr = _objptr + 4;
    }
    goto <D.17917>;
    <D.17916>:
    {
      int _index;

      _index = __builtin_ctz (_bmap);
      _index.69 = (unsigned int) _index;
      D.18842 = _index.69 * 4;
      _objptr = _objptr + D.18842;
      D.18843 = _index + 1;
      _bmap = _bmap >> D.18843;
      {
        void * __old;
        void * __copy;

        __old = *_objptr;
        if (__old != 0B) goto <D.18844>; else goto <D.18845>;
        <D.18844>:
        split_nursery_parallel_copy_object (_objptr, queue);
        __copy = *_objptr;
        if (0 != 0) goto <D.18846>; else goto <D.18847>;
        <D.18846>:
        if (__old != __copy) goto <D.18848>; else goto <D.18849>;
        <D.18848>:
        gc_debug_file.64 = gc_debug_file;
        D.18828 = *_objptr;
        fprintf (gc_debug_file.64, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18828, __old);
        gc_debug_file.64 = gc_debug_file;
        fflush (gc_debug_file.64);
        <D.18849>:
        <D.18847>:
        D.18853 = sgen_ptr_in_nursery (__copy);
        if (D.18853 != 0) goto <D.18854>; else goto <D.18851>;
        <D.18854>:
        D.18855 = sgen_ptr_in_nursery (_objptr);
        if (D.18855 == 0) goto <D.18856>; else goto <D.18851>;
        <D.18856>:
        iftmp.70 = 1;
        goto <D.18852>;
        <D.18851>:
        iftmp.70 = 0;
        <D.18852>:
        D.18857 = iftmp.70 != 0;
        D.18858 = (long int) D.18857;
        D.18859 = __builtin_expect (D.18858, 0);
        if (D.18859 != 0) goto <D.18860>; else goto <D.18861>;
        <D.18860>:
        sgen_add_to_global_remset (_objptr, __copy);
        <D.18861>:
        <D.18845>:
      }
      _objptr = _objptr + 4;
    }
    <D.17917>:
    if (_bmap != 0) goto <D.17916>; else goto <D.17918>;
    <D.17918>:
  }
  goto <D.17906>;
  <D.17919>:
  D.18862 = desc & 4294950912;
  if (D.18862 != 0) goto <D.18863>; else goto <D.18864>;
  <D.18863>:
  {
    int el_size;
    int etype;

    D.18865 = desc >> 3;
    D.18866 = (int) D.18865;
    el_size = D.18866 & 1023;
    desc.71 = (int) desc;
    etype = desc.71 & 49152;
    if (etype == 16384) goto <D.18868>; else goto <D.18869>;
    <D.18868>:
    {
      void * * p;
      void * * end_refs;

      p = start + 16;
      D.18870 = MEM[(struct MonoArray *)start].max_length;
      el_size.72 = (unsigned int) el_size;
      D.18872 = D.18870 * el_size.72;
      end_refs = p + D.18872;
      goto <D.17927>;
      <D.17926>:
      {
        void * __old;
        void * __copy;

        __old = *p;
        if (__old != 0B) goto <D.18873>; else goto <D.18874>;
        <D.18873>:
        split_nursery_parallel_copy_object (p, queue);
        __copy = *p;
        if (0 != 0) goto <D.18875>; else goto <D.18876>;
        <D.18875>:
        if (__old != __copy) goto <D.18877>; else goto <D.18878>;
        <D.18877>:
        gc_debug_file.64 = gc_debug_file;
        D.18879 = *p;
        fprintf (gc_debug_file.64, "Overwrote field at %p with %p (was: %p)\n", p, D.18879, __old);
        gc_debug_file.64 = gc_debug_file;
        fflush (gc_debug_file.64);
        <D.18878>:
        <D.18876>:
        D.18883 = sgen_ptr_in_nursery (__copy);
        if (D.18883 != 0) goto <D.18884>; else goto <D.18881>;
        <D.18884>:
        D.18885 = sgen_ptr_in_nursery (p);
        if (D.18885 == 0) goto <D.18886>; else goto <D.18881>;
        <D.18886>:
        iftmp.73 = 1;
        goto <D.18882>;
        <D.18881>:
        iftmp.73 = 0;
        <D.18882>:
        D.18887 = iftmp.73 != 0;
        D.18888 = (long int) D.18887;
        D.18889 = __builtin_expect (D.18888, 0);
        if (D.18889 != 0) goto <D.18890>; else goto <D.18891>;
        <D.18890>:
        sgen_add_to_global_remset (p, __copy);
        <D.18891>:
        <D.18874>:
      }
      p = p + 4;
      <D.17927>:
      if (p < end_refs) goto <D.17926>; else goto <D.17928>;
      <D.17928>:
    }
    goto <D.18892>;
    <D.18869>:
    if (etype == 32768) goto <D.18893>; else goto <D.18894>;
    <D.18893>:
    {
      int offset;
      int num_refs;
      char * e_start;
      char * e_end;

      D.18776 = desc >> 16;
      D.18895 = (int) D.18776;
      offset = D.18895 & 255;
      D.18779 = desc >> 24;
      num_refs = (int) D.18779;
      e_start = start + 16;
      D.18870 = MEM[(struct MonoArray *)start].max_length;
      el_size.72 = (unsigned int) el_size;
      D.18872 = D.18870 * el_size.72;
      e_end = e_start + D.18872;
      goto <D.17941>;
      <D.17940>:
      {
        void * * p;
        int i;

        p = e_start;
        offset.74 = (unsigned int) offset;
        D.18897 = offset.74 * 4;
        p = p + D.18897;
        i = 0;
        goto <D.17938>;
        <D.17937>:
        {
          void * __old;
          void * __copy;

          i.75 = (unsigned int) i;
          D.18899 = i.75 * 4;
          D.18900 = p + D.18899;
          __old = *D.18900;
          if (__old != 0B) goto <D.18901>; else goto <D.18902>;
          <D.18901>:
          i.75 = (unsigned int) i;
          D.18899 = i.75 * 4;
          D.18900 = p + D.18899;
          split_nursery_parallel_copy_object (D.18900, queue);
          i.75 = (unsigned int) i;
          D.18899 = i.75 * 4;
          D.18900 = p + D.18899;
          __copy = *D.18900;
          if (0 != 0) goto <D.18903>; else goto <D.18904>;
          <D.18903>:
          if (__old != __copy) goto <D.18905>; else goto <D.18906>;
          <D.18905>:
          gc_debug_file.64 = gc_debug_file;
          i.75 = (unsigned int) i;
          D.18899 = i.75 * 4;
          D.18900 = p + D.18899;
          i.75 = (unsigned int) i;
          D.18899 = i.75 * 4;
          D.18900 = p + D.18899;
          D.18907 = *D.18900;
          fprintf (gc_debug_file.64, "Overwrote field at %p with %p (was: %p)\n", D.18900, D.18907, __old);
          gc_debug_file.64 = gc_debug_file;
          fflush (gc_debug_file.64);
          <D.18906>:
          <D.18904>:
          D.18911 = sgen_ptr_in_nursery (__copy);
          if (D.18911 != 0) goto <D.18912>; else goto <D.18909>;
          <D.18912>:
          i.75 = (unsigned int) i;
          D.18899 = i.75 * 4;
          D.18913 = p + D.18899;
          D.18914 = sgen_ptr_in_nursery (D.18913);
          if (D.18914 == 0) goto <D.18915>; else goto <D.18909>;
          <D.18915>:
          iftmp.76 = 1;
          goto <D.18910>;
          <D.18909>:
          iftmp.76 = 0;
          <D.18910>:
          D.18916 = iftmp.76 != 0;
          D.18917 = (long int) D.18916;
          D.18918 = __builtin_expect (D.18917, 0);
          if (D.18918 != 0) goto <D.18919>; else goto <D.18920>;
          <D.18919>:
          i.75 = (unsigned int) i;
          D.18899 = i.75 * 4;
          D.18921 = p + D.18899;
          sgen_add_to_global_remset (D.18921, __copy);
          <D.18920>:
          <D.18902>:
        }
        i = i + 1;
        <D.17938>:
        if (i < num_refs) goto <D.17937>; else goto <D.17939>;
        <D.17939>:
        el_size.77 = (sizetype) el_size;
        e_start = e_start + el_size.77;
      }
      <D.17941>:
      if (e_start < e_end) goto <D.17940>; else goto <D.17942>;
      <D.17942>:
    }
    goto <D.18923>;
    <D.18894>:
    if (etype == 49152) goto <D.18924>; else goto <D.18925>;
    <D.18924>:
    {
      char * e_start;
      char * e_end;

      e_start = start + 16;
      D.18870 = MEM[(struct MonoArray *)start].max_length;
      el_size.72 = (unsigned int) el_size;
      D.18872 = D.18870 * el_size.72;
      e_end = e_start + D.18872;
      goto <D.17953>;
      <D.17952>:
      {
        void * * p;
        gsize _bmap;

        p = e_start;
        _bmap = desc >> 16;
        goto <D.17950>;
        <D.17949>:
        D.18926 = _bmap & 1;
        if (D.18926 != 0) goto <D.18927>; else goto <D.18928>;
        <D.18927>:
        {
          void * __old;
          void * __copy;

          __old = *p;
          if (__old != 0B) goto <D.18929>; else goto <D.18930>;
          <D.18929>:
          split_nursery_parallel_copy_object (p, queue);
          __copy = *p;
          if (0 != 0) goto <D.18931>; else goto <D.18932>;
          <D.18931>:
          if (__old != __copy) goto <D.18933>; else goto <D.18934>;
          <D.18933>:
          gc_debug_file.64 = gc_debug_file;
          D.18935 = *p;
          fprintf (gc_debug_file.64, "Overwrote field at %p with %p (was: %p)\n", p, D.18935, __old);
          gc_debug_file.64 = gc_debug_file;
          fflush (gc_debug_file.64);
          <D.18934>:
          <D.18932>:
          D.18939 = sgen_ptr_in_nursery (__copy);
          if (D.18939 != 0) goto <D.18940>; else goto <D.18937>;
          <D.18940>:
          D.18941 = sgen_ptr_in_nursery (p);
          if (D.18941 == 0) goto <D.18942>; else goto <D.18937>;
          <D.18942>:
          iftmp.78 = 1;
          goto <D.18938>;
          <D.18937>:
          iftmp.78 = 0;
          <D.18938>:
          D.18943 = iftmp.78 != 0;
          D.18944 = (long int) D.18943;
          D.18945 = __builtin_expect (D.18944, 0);
          if (D.18945 != 0) goto <D.18946>; else goto <D.18947>;
          <D.18946>:
          sgen_add_to_global_remset (p, __copy);
          <D.18947>:
          <D.18930>:
        }
        <D.18928>:
        _bmap = _bmap >> 1;
        p = p + 4;
        <D.17950>:
        if (_bmap != 0) goto <D.17949>; else goto <D.17951>;
        <D.17951>:
        el_size.77 = (sizetype) el_size;
        e_start = e_start + el_size.77;
      }
      <D.17953>:
      if (e_start < e_end) goto <D.17952>; else goto <D.17954>;
      <D.17954>:
    }
    <D.18925>:
    <D.18923>:
    <D.18892>:
  }
  <D.18864>:
  goto <D.17906>;
  <D.17955>:
  {
    void * * _objptr;
    gsize _bmap;

    _objptr = start;
    _bmap = desc >> 3;
    _objptr = _objptr + 8;
    goto <D.17961>;
    <D.17960>:
    D.18948 = _bmap & 1;
    if (D.18948 != 0) goto <D.18949>; else goto <D.18950>;
    <D.18949>:
    {
      void * __old;
      void * __copy;

      __old = *_objptr;
      if (__old != 0B) goto <D.18951>; else goto <D.18952>;
      <D.18951>:
      split_nursery_parallel_copy_object (_objptr, queue);
      __copy = *_objptr;
      if (0 != 0) goto <D.18953>; else goto <D.18954>;
      <D.18953>:
      if (__old != __copy) goto <D.18955>; else goto <D.18956>;
      <D.18955>:
      gc_debug_file.64 = gc_debug_file;
      D.18957 = *_objptr;
      fprintf (gc_debug_file.64, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18957, __old);
      gc_debug_file.64 = gc_debug_file;
      fflush (gc_debug_file.64);
      <D.18956>:
      <D.18954>:
      D.18961 = sgen_ptr_in_nursery (__copy);
      if (D.18961 != 0) goto <D.18962>; else goto <D.18959>;
      <D.18962>:
      D.18963 = sgen_ptr_in_nursery (_objptr);
      if (D.18963 == 0) goto <D.18964>; else goto <D.18959>;
      <D.18964>:
      iftmp.79 = 1;
      goto <D.18960>;
      <D.18959>:
      iftmp.79 = 0;
      <D.18960>:
      D.18965 = iftmp.79 != 0;
      D.18966 = (long int) D.18965;
      D.18967 = __builtin_expect (D.18966, 0);
      if (D.18967 != 0) goto <D.18968>; else goto <D.18969>;
      <D.18968>:
      sgen_add_to_global_remset (_objptr, __copy);
      <D.18969>:
      <D.18952>:
    }
    <D.18950>:
    _bmap = _bmap >> 1;
    _objptr = _objptr + 4;
    <D.17961>:
    if (_bmap != 0) goto <D.17960>; else goto <D.17962>;
    <D.17962>:
  }
  goto <D.17906>;
  <D.17963>:
  {
    void * * _objptr;
    gsize * bitmap_data;
    int bwords;
    void * * start_run;

    _objptr = start;
    bitmap_data = sgen_get_complex_descriptor (desc);
    D.18970 = *bitmap_data;
    D.18971 = D.18970 + 4294967295;
    bwords = (int) D.18971;
    start_run = _objptr;
    bitmap_data = bitmap_data + 4;
    if (0 != 0) goto <D.18972>; else goto <D.18973>;
    <D.18972>:
    {
      struct MonoObject * myobj;

      myobj = start;
      D.18974 = myobj->vtable;
      D.18975 = D.18974->klass;
      D.18976 = D.18975->name_space;
      D.18974 = myobj->vtable;
      D.18975 = D.18974->klass;
      D.18977 = D.18975->name;
      monoeg_g_print ("found %d at %p (0x%zx): %s.%s\n", bwords, start, desc, D.18976, D.18977);
    }
    <D.18973>:
    goto <D.17976>;
    <D.17975>:
    {
      gsize _bmap;

      bitmap_data.80 = bitmap_data;
      bitmap_data = bitmap_data.80 + 4;
      _bmap = *bitmap_data.80;
      _objptr = start_run;
      goto <D.17973>;
      <D.17972>:
      D.18979 = _bmap & 1;
      if (D.18979 != 0) goto <D.18980>; else goto <D.18981>;
      <D.18980>:
      {
        void * __old;
        void * __copy;

        __old = *_objptr;
        if (__old != 0B) goto <D.18982>; else goto <D.18983>;
        <D.18982>:
        split_nursery_parallel_copy_object (_objptr, queue);
        __copy = *_objptr;
        if (0 != 0) goto <D.18984>; else goto <D.18985>;
        <D.18984>:
        if (__old != __copy) goto <D.18986>; else goto <D.18987>;
        <D.18986>:
        gc_debug_file.64 = gc_debug_file;
        D.18988 = *_objptr;
        fprintf (gc_debug_file.64, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18988, __old);
        gc_debug_file.64 = gc_debug_file;
        fflush (gc_debug_file.64);
        <D.18987>:
        <D.18985>:
        D.18992 = sgen_ptr_in_nursery (__copy);
        if (D.18992 != 0) goto <D.18993>; else goto <D.18990>;
        <D.18993>:
        D.18994 = sgen_ptr_in_nursery (_objptr);
        if (D.18994 == 0) goto <D.18995>; else goto <D.18990>;
        <D.18995>:
        iftmp.81 = 1;
        goto <D.18991>;
        <D.18990>:
        iftmp.81 = 0;
        <D.18991>:
        D.18996 = iftmp.81 != 0;
        D.18997 = (long int) D.18996;
        D.18998 = __builtin_expect (D.18997, 0);
        if (D.18998 != 0) goto <D.18999>; else goto <D.19000>;
        <D.18999>:
        sgen_add_to_global_remset (_objptr, __copy);
        <D.19000>:
        <D.18983>:
      }
      <D.18981>:
      _bmap = _bmap >> 1;
      _objptr = _objptr + 4;
      <D.17973>:
      if (_bmap != 0) goto <D.17972>; else goto <D.17974>;
      <D.17974>:
      start_run = start_run + 128;
    }
    <D.17976>:
    bwords.82 = bwords;
    bwords = bwords.82 + -1;
    if (bwords.82 > 0) goto <D.17975>; else goto <D.17977>;
    <D.17977>:
  }
  goto <D.17906>;
  <D.17978>:
  goto <D.17906>;
  <D.17979>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-scan-object.h", 111);
  <D.17906>:
}


split_nursery_parallel_scan_object (char * start, struct SgenGrayQueue * queue)
{
  unsigned int D.19003;
  unsigned int D.19004;
  unsigned int D.19005;
  unsigned int D.19006;
  unsigned int D.19009;
  unsigned int D.19010;
  unsigned int D.19011;
  unsigned int D.19012;
  unsigned int D.19013;
  struct FILE * gc_debug_file.83;
  void * D.19021;
  int iftmp.84;
  int D.19025;
  int D.19027;
  _Bool D.19029;
  long int D.19030;
  long int D.19031;
  int iftmp.85;
  int D.19043;
  int D.19045;
  _Bool D.19047;
  long int D.19048;
  long int D.19049;
  unsigned int _index.86;
  unsigned int D.19053;
  int D.19054;
  void * D.19061;
  int iftmp.87;
  int D.19065;
  int D.19067;
  _Bool D.19069;
  long int D.19070;
  long int D.19071;
  unsigned int _index.88;
  unsigned int D.19075;
  int D.19076;
  int iftmp.89;
  int D.19086;
  int D.19088;
  _Bool D.19090;
  long int D.19091;
  long int D.19092;
  unsigned int D.19095;
  unsigned int D.19098;
  int D.19099;
  int desc.90;
  unsigned int D.19103;
  unsigned int el_size.91;
  unsigned int D.19105;
  void * D.19112;
  int iftmp.92;
  int D.19116;
  int D.19118;
  _Bool D.19120;
  long int D.19121;
  long int D.19122;
  int D.19128;
  unsigned int offset.93;
  unsigned int D.19130;
  unsigned int i.94;
  unsigned int D.19132;
  void * * D.19133;
  void * D.19140;
  int iftmp.95;
  int D.19144;
  void * D.19146;
  int D.19147;
  _Bool D.19149;
  long int D.19150;
  long int D.19151;
  void * D.19154;
  sizetype el_size.96;
  unsigned int D.19159;
  void * D.19168;
  int iftmp.97;
  int D.19172;
  int D.19174;
  _Bool D.19176;
  long int D.19177;
  long int D.19178;
  unsigned int D.19181;
  void * D.19190;
  int iftmp.98;
  int D.19194;
  int D.19196;
  _Bool D.19198;
  long int D.19199;
  long int D.19200;
  unsigned int D.19203;
  unsigned int D.19204;
  struct MonoVTable * D.19207;
  struct MonoClass * D.19208;
  const char * D.19209;
  const char * D.19210;
  gsize * bitmap_data.99;
  unsigned int D.19212;
  void * D.19221;
  int iftmp.100;
  int D.19225;
  int D.19227;
  _Bool D.19229;
  long int D.19230;
  long int D.19231;
  int bwords.101;
  unsigned int D.19235;
  gsize * mbitmap_data.102;
  unsigned int D.19237;
  unsigned int D.19238;
  struct MonoClass * D.19239;
  unsigned int el_size.103;
  unsigned int D.19241;
  const char * D.19244;
  const char * D.19245;
  gsize * bitmap_data.104;
  unsigned int D.19247;
  void * D.19256;
  int iftmp.105;
  int D.19260;
  int D.19262;
  _Bool D.19264;
  long int D.19265;
  long int D.19266;
  unsigned int bwords.106;
  sizetype el_size.107;

  {
    struct GCVTable * vt;
    mword desc;

    D.19003 = MEM[(mword *)start];
    D.19004 = D.19003 & 4294967292;
    vt = (struct GCVTable *) D.19004;
    desc = vt->desc;
    D.19005 = desc & 7;
    switch (D.19005) <default: <D.17890>, case 1: <D.17785>, case 2: <D.17796>, case 3: <D.17852>, case 4: <D.17808>, case 5: <D.17844>, case 6: <D.17867>, case 7: <D.17889>>
    <D.17785>:
    D.19006 = desc & 4294901760;
    if (D.19006 != 0) goto <D.19007>; else goto <D.19008>;
    <D.19007>:
    {
      void * * _objptr_end;
      void * * _objptr;

      _objptr = start;
      D.19009 = desc >> 16;
      D.19010 = D.19009 & 255;
      D.19011 = D.19010 * 4;
      _objptr = _objptr + D.19011;
      D.19012 = desc >> 24;
      D.19013 = D.19012 * 4;
      _objptr_end = _objptr + D.19013;
      {
        void * __old;
        void * __copy;

        __old = *_objptr;
        if (__old != 0B) goto <D.19014>; else goto <D.19015>;
        <D.19014>:
        split_nursery_parallel_copy_object (_objptr, queue);
        __copy = *_objptr;
        if (0 != 0) goto <D.19016>; else goto <D.19017>;
        <D.19016>:
        if (__old != __copy) goto <D.19018>; else goto <D.19019>;
        <D.19018>:
        gc_debug_file.83 = gc_debug_file;
        D.19021 = *_objptr;
        fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.19021, __old);
        gc_debug_file.83 = gc_debug_file;
        fflush (gc_debug_file.83);
        <D.19019>:
        <D.19017>:
        D.19025 = sgen_ptr_in_nursery (__copy);
        if (D.19025 != 0) goto <D.19026>; else goto <D.19023>;
        <D.19026>:
        D.19027 = sgen_ptr_in_nursery (_objptr);
        if (D.19027 == 0) goto <D.19028>; else goto <D.19023>;
        <D.19028>:
        iftmp.84 = 1;
        goto <D.19024>;
        <D.19023>:
        iftmp.84 = 0;
        <D.19024>:
        D.19029 = iftmp.84 != 0;
        D.19030 = (long int) D.19029;
        D.19031 = __builtin_expect (D.19030, 0);
        if (D.19031 != 0) goto <D.19032>; else goto <D.19033>;
        <D.19032>:
        sgen_add_to_global_remset (_objptr, __copy);
        <D.19033>:
        <D.19015>:
      }
      _objptr = _objptr + 4;
      goto <D.17793>;
      <D.17792>:
      {
        void * __old;
        void * __copy;

        __old = *_objptr;
        if (__old != 0B) goto <D.19034>; else goto <D.19035>;
        <D.19034>:
        split_nursery_parallel_copy_object (_objptr, queue);
        __copy = *_objptr;
        if (0 != 0) goto <D.19036>; else goto <D.19037>;
        <D.19036>:
        if (__old != __copy) goto <D.19038>; else goto <D.19039>;
        <D.19038>:
        gc_debug_file.83 = gc_debug_file;
        D.19021 = *_objptr;
        fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.19021, __old);
        gc_debug_file.83 = gc_debug_file;
        fflush (gc_debug_file.83);
        <D.19039>:
        <D.19037>:
        D.19043 = sgen_ptr_in_nursery (__copy);
        if (D.19043 != 0) goto <D.19044>; else goto <D.19041>;
        <D.19044>:
        D.19045 = sgen_ptr_in_nursery (_objptr);
        if (D.19045 == 0) goto <D.19046>; else goto <D.19041>;
        <D.19046>:
        iftmp.85 = 1;
        goto <D.19042>;
        <D.19041>:
        iftmp.85 = 0;
        <D.19042>:
        D.19047 = iftmp.85 != 0;
        D.19048 = (long int) D.19047;
        D.19049 = __builtin_expect (D.19048, 0);
        if (D.19049 != 0) goto <D.19050>; else goto <D.19051>;
        <D.19050>:
        sgen_add_to_global_remset (_objptr, __copy);
        <D.19051>:
        <D.19035>:
      }
      _objptr = _objptr + 4;
      <D.17793>:
      if (_objptr < _objptr_end) goto <D.17792>; else goto <D.17794>;
      <D.17794>:
    }
    <D.19008>:
    goto <D.17795>;
    <D.17796>:
    {
      void * * _objptr;
      gsize _bmap;

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

        _index = __builtin_ctz (_bmap);
        _index.86 = (unsigned int) _index;
        D.19053 = _index.86 * 4;
        _objptr = _objptr + D.19053;
        D.19054 = _index + 1;
        _bmap = _bmap >> D.19054;
        {
          void * __old;
          void * __copy;

          __old = *_objptr;
          if (__old != 0B) goto <D.19055>; else goto <D.19056>;
          <D.19055>:
          split_nursery_parallel_copy_object (_objptr, queue);
          __copy = *_objptr;
          if (0 != 0) goto <D.19057>; else goto <D.19058>;
          <D.19057>:
          if (__old != __copy) goto <D.19059>; else goto <D.19060>;
          <D.19059>:
          gc_debug_file.83 = gc_debug_file;
          D.19061 = *_objptr;
          fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.19061, __old);
          gc_debug_file.83 = gc_debug_file;
          fflush (gc_debug_file.83);
          <D.19060>:
          <D.19058>:
          D.19065 = sgen_ptr_in_nursery (__copy);
          if (D.19065 != 0) goto <D.19066>; else goto <D.19063>;
          <D.19066>:
          D.19067 = sgen_ptr_in_nursery (_objptr);
          if (D.19067 == 0) goto <D.19068>; else goto <D.19063>;
          <D.19068>:
          iftmp.87 = 1;
          goto <D.19064>;
          <D.19063>:
          iftmp.87 = 0;
          <D.19064>:
          D.19069 = iftmp.87 != 0;
          D.19070 = (long int) D.19069;
          D.19071 = __builtin_expect (D.19070, 0);
          if (D.19071 != 0) goto <D.19072>; else goto <D.19073>;
          <D.19072>:
          sgen_add_to_global_remset (_objptr, __copy);
          <D.19073>:
          <D.19056>:
        }
        _objptr = _objptr + 4;
      }
      goto <D.17806>;
      <D.17805>:
      {
        int _index;

        _index = __builtin_ctz (_bmap);
        _index.88 = (unsigned int) _index;
        D.19075 = _index.88 * 4;
        _objptr = _objptr + D.19075;
        D.19076 = _index + 1;
        _bmap = _bmap >> D.19076;
        {
          void * __old;
          void * __copy;

          __old = *_objptr;
          if (__old != 0B) goto <D.19077>; else goto <D.19078>;
          <D.19077>:
          split_nursery_parallel_copy_object (_objptr, queue);
          __copy = *_objptr;
          if (0 != 0) goto <D.19079>; else goto <D.19080>;
          <D.19079>:
          if (__old != __copy) goto <D.19081>; else goto <D.19082>;
          <D.19081>:
          gc_debug_file.83 = gc_debug_file;
          D.19061 = *_objptr;
          fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.19061, __old);
          gc_debug_file.83 = gc_debug_file;
          fflush (gc_debug_file.83);
          <D.19082>:
          <D.19080>:
          D.19086 = sgen_ptr_in_nursery (__copy);
          if (D.19086 != 0) goto <D.19087>; else goto <D.19084>;
          <D.19087>:
          D.19088 = sgen_ptr_in_nursery (_objptr);
          if (D.19088 == 0) goto <D.19089>; else goto <D.19084>;
          <D.19089>:
          iftmp.89 = 1;
          goto <D.19085>;
          <D.19084>:
          iftmp.89 = 0;
          <D.19085>:
          D.19090 = iftmp.89 != 0;
          D.19091 = (long int) D.19090;
          D.19092 = __builtin_expect (D.19091, 0);
          if (D.19092 != 0) goto <D.19093>; else goto <D.19094>;
          <D.19093>:
          sgen_add_to_global_remset (_objptr, __copy);
          <D.19094>:
          <D.19078>:
        }
        _objptr = _objptr + 4;
      }
      <D.17806>:
      if (_bmap != 0) goto <D.17805>; else goto <D.17807>;
      <D.17807>:
    }
    goto <D.17795>;
    <D.17808>:
    D.19095 = desc & 4294950912;
    if (D.19095 != 0) goto <D.19096>; else goto <D.19097>;
    <D.19096>:
    {
      int el_size;
      int etype;

      D.19098 = desc >> 3;
      D.19099 = (int) D.19098;
      el_size = D.19099 & 1023;
      desc.90 = (int) desc;
      etype = desc.90 & 49152;
      if (etype == 16384) goto <D.19101>; else goto <D.19102>;
      <D.19101>:
      {
        void * * p;
        void * * end_refs;

        p = start + 16;
        D.19103 = MEM[(struct MonoArray *)start].max_length;
        el_size.91 = (unsigned int) el_size;
        D.19105 = D.19103 * el_size.91;
        end_refs = p + D.19105;
        goto <D.17816>;
        <D.17815>:
        {
          void * __old;
          void * __copy;

          __old = *p;
          if (__old != 0B) goto <D.19106>; else goto <D.19107>;
          <D.19106>:
          split_nursery_parallel_copy_object (p, queue);
          __copy = *p;
          if (0 != 0) goto <D.19108>; else goto <D.19109>;
          <D.19108>:
          if (__old != __copy) goto <D.19110>; else goto <D.19111>;
          <D.19110>:
          gc_debug_file.83 = gc_debug_file;
          D.19112 = *p;
          fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", p, D.19112, __old);
          gc_debug_file.83 = gc_debug_file;
          fflush (gc_debug_file.83);
          <D.19111>:
          <D.19109>:
          D.19116 = sgen_ptr_in_nursery (__copy);
          if (D.19116 != 0) goto <D.19117>; else goto <D.19114>;
          <D.19117>:
          D.19118 = sgen_ptr_in_nursery (p);
          if (D.19118 == 0) goto <D.19119>; else goto <D.19114>;
          <D.19119>:
          iftmp.92 = 1;
          goto <D.19115>;
          <D.19114>:
          iftmp.92 = 0;
          <D.19115>:
          D.19120 = iftmp.92 != 0;
          D.19121 = (long int) D.19120;
          D.19122 = __builtin_expect (D.19121, 0);
          if (D.19122 != 0) goto <D.19123>; else goto <D.19124>;
          <D.19123>:
          sgen_add_to_global_remset (p, __copy);
          <D.19124>:
          <D.19107>:
        }
        p = p + 4;
        <D.17816>:
        if (p < end_refs) goto <D.17815>; else goto <D.17817>;
        <D.17817>:
      }
      goto <D.19125>;
      <D.19102>:
      if (etype == 32768) goto <D.19126>; else goto <D.19127>;
      <D.19126>:
      {
        int offset;
        int num_refs;
        char * e_start;
        char * e_end;

        D.19009 = desc >> 16;
        D.19128 = (int) D.19009;
        offset = D.19128 & 255;
        D.19012 = desc >> 24;
        num_refs = (int) D.19012;
        e_start = start + 16;
        D.19103 = MEM[(struct MonoArray *)start].max_length;
        el_size.91 = (unsigned int) el_size;
        D.19105 = D.19103 * el_size.91;
        e_end = e_start + D.19105;
        goto <D.17830>;
        <D.17829>:
        {
          void * * p;
          int i;

          p = e_start;
          offset.93 = (unsigned int) offset;
          D.19130 = offset.93 * 4;
          p = p + D.19130;
          i = 0;
          goto <D.17827>;
          <D.17826>:
          {
            void * __old;
            void * __copy;

            i.94 = (unsigned int) i;
            D.19132 = i.94 * 4;
            D.19133 = p + D.19132;
            __old = *D.19133;
            if (__old != 0B) goto <D.19134>; else goto <D.19135>;
            <D.19134>:
            i.94 = (unsigned int) i;
            D.19132 = i.94 * 4;
            D.19133 = p + D.19132;
            split_nursery_parallel_copy_object (D.19133, queue);
            i.94 = (unsigned int) i;
            D.19132 = i.94 * 4;
            D.19133 = p + D.19132;
            __copy = *D.19133;
            if (0 != 0) goto <D.19136>; else goto <D.19137>;
            <D.19136>:
            if (__old != __copy) goto <D.19138>; else goto <D.19139>;
            <D.19138>:
            gc_debug_file.83 = gc_debug_file;
            i.94 = (unsigned int) i;
            D.19132 = i.94 * 4;
            D.19133 = p + D.19132;
            i.94 = (unsigned int) i;
            D.19132 = i.94 * 4;
            D.19133 = p + D.19132;
            D.19140 = *D.19133;
            fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", D.19133, D.19140, __old);
            gc_debug_file.83 = gc_debug_file;
            fflush (gc_debug_file.83);
            <D.19139>:
            <D.19137>:
            D.19144 = sgen_ptr_in_nursery (__copy);
            if (D.19144 != 0) goto <D.19145>; else goto <D.19142>;
            <D.19145>:
            i.94 = (unsigned int) i;
            D.19132 = i.94 * 4;
            D.19146 = p + D.19132;
            D.19147 = sgen_ptr_in_nursery (D.19146);
            if (D.19147 == 0) goto <D.19148>; else goto <D.19142>;
            <D.19148>:
            iftmp.95 = 1;
            goto <D.19143>;
            <D.19142>:
            iftmp.95 = 0;
            <D.19143>:
            D.19149 = iftmp.95 != 0;
            D.19150 = (long int) D.19149;
            D.19151 = __builtin_expect (D.19150, 0);
            if (D.19151 != 0) goto <D.19152>; else goto <D.19153>;
            <D.19152>:
            i.94 = (unsigned int) i;
            D.19132 = i.94 * 4;
            D.19154 = p + D.19132;
            sgen_add_to_global_remset (D.19154, __copy);
            <D.19153>:
            <D.19135>:
          }
          i = i + 1;
          <D.17827>:
          if (i < num_refs) goto <D.17826>; else goto <D.17828>;
          <D.17828>:
          el_size.96 = (sizetype) el_size;
          e_start = e_start + el_size.96;
        }
        <D.17830>:
        if (e_start < e_end) goto <D.17829>; else goto <D.17831>;
        <D.17831>:
      }
      goto <D.19156>;
      <D.19127>:
      if (etype == 49152) goto <D.19157>; else goto <D.19158>;
      <D.19157>:
      {
        char * e_start;
        char * e_end;

        e_start = start + 16;
        D.19103 = MEM[(struct MonoArray *)start].max_length;
        el_size.91 = (unsigned int) el_size;
        D.19105 = D.19103 * el_size.91;
        e_end = e_start + D.19105;
        goto <D.17842>;
        <D.17841>:
        {
          void * * p;
          gsize _bmap;

          p = e_start;
          _bmap = desc >> 16;
          goto <D.17839>;
          <D.17838>:
          D.19159 = _bmap & 1;
          if (D.19159 != 0) goto <D.19160>; else goto <D.19161>;
          <D.19160>:
          {
            void * __old;
            void * __copy;

            __old = *p;
            if (__old != 0B) goto <D.19162>; else goto <D.19163>;
            <D.19162>:
            split_nursery_parallel_copy_object (p, queue);
            __copy = *p;
            if (0 != 0) goto <D.19164>; else goto <D.19165>;
            <D.19164>:
            if (__old != __copy) goto <D.19166>; else goto <D.19167>;
            <D.19166>:
            gc_debug_file.83 = gc_debug_file;
            D.19168 = *p;
            fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", p, D.19168, __old);
            gc_debug_file.83 = gc_debug_file;
            fflush (gc_debug_file.83);
            <D.19167>:
            <D.19165>:
            D.19172 = sgen_ptr_in_nursery (__copy);
            if (D.19172 != 0) goto <D.19173>; else goto <D.19170>;
            <D.19173>:
            D.19174 = sgen_ptr_in_nursery (p);
            if (D.19174 == 0) goto <D.19175>; else goto <D.19170>;
            <D.19175>:
            iftmp.97 = 1;
            goto <D.19171>;
            <D.19170>:
            iftmp.97 = 0;
            <D.19171>:
            D.19176 = iftmp.97 != 0;
            D.19177 = (long int) D.19176;
            D.19178 = __builtin_expect (D.19177, 0);
            if (D.19178 != 0) goto <D.19179>; else goto <D.19180>;
            <D.19179>:
            sgen_add_to_global_remset (p, __copy);
            <D.19180>:
            <D.19163>:
          }
          <D.19161>:
          _bmap = _bmap >> 1;
          p = p + 4;
          <D.17839>:
          if (_bmap != 0) goto <D.17838>; else goto <D.17840>;
          <D.17840>:
          el_size.96 = (sizetype) el_size;
          e_start = e_start + el_size.96;
        }
        <D.17842>:
        if (e_start < e_end) goto <D.17841>; else goto <D.17843>;
        <D.17843>:
      }
      <D.19158>:
      <D.19156>:
      <D.19125>:
    }
    <D.19097>:
    goto <D.17795>;
    <D.17844>:
    {
      void * * _objptr;
      gsize _bmap;

      _objptr = start;
      _bmap = desc >> 3;
      _objptr = _objptr + 8;
      goto <D.17850>;
      <D.17849>:
      D.19181 = _bmap & 1;
      if (D.19181 != 0) goto <D.19182>; else goto <D.19183>;
      <D.19182>:
      {
        void * __old;
        void * __copy;

        __old = *_objptr;
        if (__old != 0B) goto <D.19184>; else goto <D.19185>;
        <D.19184>:
        split_nursery_parallel_copy_object (_objptr, queue);
        __copy = *_objptr;
        if (0 != 0) goto <D.19186>; else goto <D.19187>;
        <D.19186>:
        if (__old != __copy) goto <D.19188>; else goto <D.19189>;
        <D.19188>:
        gc_debug_file.83 = gc_debug_file;
        D.19190 = *_objptr;
        fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.19190, __old);
        gc_debug_file.83 = gc_debug_file;
        fflush (gc_debug_file.83);
        <D.19189>:
        <D.19187>:
        D.19194 = sgen_ptr_in_nursery (__copy);
        if (D.19194 != 0) goto <D.19195>; else goto <D.19192>;
        <D.19195>:
        D.19196 = sgen_ptr_in_nursery (_objptr);
        if (D.19196 == 0) goto <D.19197>; else goto <D.19192>;
        <D.19197>:
        iftmp.98 = 1;
        goto <D.19193>;
        <D.19192>:
        iftmp.98 = 0;
        <D.19193>:
        D.19198 = iftmp.98 != 0;
        D.19199 = (long int) D.19198;
        D.19200 = __builtin_expect (D.19199, 0);
        if (D.19200 != 0) goto <D.19201>; else goto <D.19202>;
        <D.19201>:
        sgen_add_to_global_remset (_objptr, __copy);
        <D.19202>:
        <D.19185>:
      }
      <D.19183>:
      _bmap = _bmap >> 1;
      _objptr = _objptr + 4;
      <D.17850>:
      if (_bmap != 0) goto <D.17849>; else goto <D.17851>;
      <D.17851>:
    }
    goto <D.17795>;
    <D.17852>:
    {
      void * * _objptr;
      gsize * bitmap_data;
      int bwords;
      void * * start_run;

      _objptr = start;
      bitmap_data = sgen_get_complex_descriptor (desc);
      D.19203 = *bitmap_data;
      D.19204 = D.19203 + 4294967295;
      bwords = (int) D.19204;
      start_run = _objptr;
      bitmap_data = bitmap_data + 4;
      if (0 != 0) goto <D.19205>; else goto <D.19206>;
      <D.19205>:
      {
        struct MonoObject * myobj;

        myobj = start;
        D.19207 = myobj->vtable;
        D.19208 = D.19207->klass;
        D.19209 = D.19208->name_space;
        D.19207 = myobj->vtable;
        D.19208 = D.19207->klass;
        D.19210 = D.19208->name;
        monoeg_g_print ("found %d at %p (0x%zx): %s.%s\n", bwords, start, desc, D.19209, D.19210);
      }
      <D.19206>:
      goto <D.17865>;
      <D.17864>:
      {
        gsize _bmap;

        bitmap_data.99 = bitmap_data;
        bitmap_data = bitmap_data.99 + 4;
        _bmap = *bitmap_data.99;
        _objptr = start_run;
        goto <D.17862>;
        <D.17861>:
        D.19212 = _bmap & 1;
        if (D.19212 != 0) goto <D.19213>; else goto <D.19214>;
        <D.19213>:
        {
          void * __old;
          void * __copy;

          __old = *_objptr;
          if (__old != 0B) goto <D.19215>; else goto <D.19216>;
          <D.19215>:
          split_nursery_parallel_copy_object (_objptr, queue);
          __copy = *_objptr;
          if (0 != 0) goto <D.19217>; else goto <D.19218>;
          <D.19217>:
          if (__old != __copy) goto <D.19219>; else goto <D.19220>;
          <D.19219>:
          gc_debug_file.83 = gc_debug_file;
          D.19221 = *_objptr;
          fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.19221, __old);
          gc_debug_file.83 = gc_debug_file;
          fflush (gc_debug_file.83);
          <D.19220>:
          <D.19218>:
          D.19225 = sgen_ptr_in_nursery (__copy);
          if (D.19225 != 0) goto <D.19226>; else goto <D.19223>;
          <D.19226>:
          D.19227 = sgen_ptr_in_nursery (_objptr);
          if (D.19227 == 0) goto <D.19228>; else goto <D.19223>;
          <D.19228>:
          iftmp.100 = 1;
          goto <D.19224>;
          <D.19223>:
          iftmp.100 = 0;
          <D.19224>:
          D.19229 = iftmp.100 != 0;
          D.19230 = (long int) D.19229;
          D.19231 = __builtin_expect (D.19230, 0);
          if (D.19231 != 0) goto <D.19232>; else goto <D.19233>;
          <D.19232>:
          sgen_add_to_global_remset (_objptr, __copy);
          <D.19233>:
          <D.19216>:
        }
        <D.19214>:
        _bmap = _bmap >> 1;
        _objptr = _objptr + 4;
        <D.17862>:
        if (_bmap != 0) goto <D.17861>; else goto <D.17863>;
        <D.17863>:
        start_run = start_run + 128;
      }
      <D.17865>:
      bwords.101 = bwords;
      bwords = bwords.101 + -1;
      if (bwords.101 > 0) goto <D.17864>; else goto <D.17866>;
      <D.17866>:
    }
    goto <D.17795>;
    <D.17867>:
    {
      gsize * mbitmap_data;
      int mbwords;
      int el_size;
      char * e_start;
      char * e_end;

      D.19235 = vt->desc;
      mbitmap_data = sgen_get_complex_descriptor (D.19235);
      mbitmap_data.102 = mbitmap_data;
      mbitmap_data = mbitmap_data.102 + 4;
      D.19237 = *mbitmap_data.102;
      D.19238 = D.19237 + 4294967295;
      mbwords = (int) D.19238;
      D.19239 = vt->klass;
      el_size = mono_array_element_size (D.19239);
      e_start = start + 16;
      D.19103 = MEM[(struct MonoArray *)start].max_length;
      el_size.103 = (unsigned int) el_size;
      D.19241 = D.19103 * el_size.103;
      e_end = e_start + D.19241;
      if (0 != 0) goto <D.19242>; else goto <D.19243>;
      <D.19242>:
      D.19235 = vt->desc;
      D.19239 = vt->klass;
      D.19244 = D.19239->name_space;
      D.19239 = vt->klass;
      D.19245 = D.19239->name;
      monoeg_g_print ("found %d at %p (0x%zx): %s.%s\n", mbwords, start, D.19235, D.19244, D.19245);
      <D.19243>:
      goto <D.17887>;
      <D.17886>:
      {
        void * * _objptr;
        gsize * bitmap_data;
        unsigned int bwords;

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

          bitmap_data.104 = bitmap_data;
          bitmap_data = bitmap_data.104 + 4;
          _bmap = *bitmap_data.104;
          start_run = _objptr;
          goto <D.17881>;
          <D.17880>:
          D.19247 = _bmap & 1;
          if (D.19247 != 0) goto <D.19248>; else goto <D.19249>;
          <D.19248>:
          {
            void * __old;
            void * __copy;

            __old = *_objptr;
            if (__old != 0B) goto <D.19250>; else goto <D.19251>;
            <D.19250>:
            split_nursery_parallel_copy_object (_objptr, queue);
            __copy = *_objptr;
            if (0 != 0) goto <D.19252>; else goto <D.19253>;
            <D.19252>:
            if (__old != __copy) goto <D.19254>; else goto <D.19255>;
            <D.19254>:
            gc_debug_file.83 = gc_debug_file;
            D.19256 = *_objptr;
            fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.19256, __old);
            gc_debug_file.83 = gc_debug_file;
            fflush (gc_debug_file.83);
            <D.19255>:
            <D.19253>:
            D.19260 = sgen_ptr_in_nursery (__copy);
            if (D.19260 != 0) goto <D.19261>; else goto <D.19258>;
            <D.19261>:
            D.19262 = sgen_ptr_in_nursery (_objptr);
            if (D.19262 == 0) goto <D.19263>; else goto <D.19258>;
            <D.19263>:
            iftmp.105 = 1;
            goto <D.19259>;
            <D.19258>:
            iftmp.105 = 0;
            <D.19259>:
            D.19264 = iftmp.105 != 0;
            D.19265 = (long int) D.19264;
            D.19266 = __builtin_expect (D.19265, 0);
            if (D.19266 != 0) goto <D.19267>; else goto <D.19268>;
            <D.19267>:
            sgen_add_to_global_remset (_objptr, __copy);
            <D.19268>:
            <D.19251>:
          }
          <D.19249>:
          _bmap = _bmap >> 1;
          _objptr = _objptr + 4;
          <D.17881>:
          if (_bmap != 0) goto <D.17880>; else goto <D.17882>;
          <D.17882>:
          _objptr = start_run + 128;
        }
        <D.17884>:
        bwords.106 = bwords;
        bwords = bwords.106 + 4294967295;
        if (bwords.106 != 0) goto <D.17883>; else goto <D.17885>;
        <D.17885>:
        el_size.107 = (sizetype) el_size;
        e_start = e_start + el_size.107;
      }
      <D.17887>:
      if (e_start < e_end) goto <D.17886>; else goto <D.17888>;
      <D.17888>:
    }
    goto <D.17795>;
    <D.17889>:
    goto <D.17795>;
    <D.17890>:
    monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-scan-object.h", 111);
    <D.17795>:
  }
}


split_nursery_parallel_copy_object (void * * obj_slot, struct SgenGrayQueue * queue)
{
  int current_collection_generation.108;
  int D.19275;
  unsigned int D.19278;
  unsigned int D.19279;
  unsigned int D.19282;
  int D.19285;
  unsigned int D.19288;
  unsigned int D.19289;
  void * D.19290;
  unsigned int D.19291;
  _Bool D.19292;
  long int D.19293;
  long int D.19294;
  unsigned int destination.109;
  unsigned int D.19298;
  void * D.19299;
  void * D.19300;
  struct SgenGrayQueue * iftmp.110;
  int D.19308;
  _Bool D.19312;
  long int D.19313;
  long int D.19314;
  char * obj;
  mword vtable_word;
  mword objsize;
  struct MonoVTable * vt;
  void * destination;
  gboolean has_references;

  obj = *obj_slot;
  if (0 != 0) goto <D.19272>; else goto <D.19273>;
  <D.19272>:
  current_collection_generation.108 = current_collection_generation;
  monoeg_g_log (0B, 4, "calling minor-par-copy from a %d generation collection", current_collection_generation.108);
  <D.17777>:
  goto <D.17777>;
  <D.19273>:
  D.19275 = sgen_ptr_in_nursery (obj);
  if (D.19275 == 0) goto <D.19276>; else goto <D.19277>;
  <D.19276>:
  return;
  <D.19277>:
  vtable_word = MEM[(mword *)obj];
  D.19278 = vtable_word & 4294967292;
  vt = (struct MonoVTable *) D.19278;
  D.19279 = vtable_word & 1;
  if (D.19279 != 0) goto <D.19280>; else goto <D.19281>;
  <D.19280>:
  *obj_slot = vt;
  return;
  <D.19281>:
  D.19282 = vtable_word & 2;
  if (D.19282 != 0) goto <D.19283>; else goto <D.19284>;
  <D.19283>:
  return;
  <D.19284>:
  D.19285 = sgen_nursery_is_to_space (obj);
  if (D.19285 != 0) goto <D.19286>; else goto <D.19287>;
  <D.19286>:
  return;
  <D.19287>:
  D.19288 = sgen_par_object_get_size (vt, obj);
  D.19289 = D.19288 + 7;
  objsize = D.19289 & 4294967288;
  D.19290 = vt->gc_descr;
  D.19291 = (unsigned int) D.19290;
  has_references = sgen_gc_descr_has_references (D.19291);
  destination = par_alloc_for_promotion (vt, obj, objsize, has_references);
  D.19292 = destination == 0B;
  D.19293 = (long int) D.19292;
  D.19294 = __builtin_expect (D.19293, 0);
  if (D.19294 != 0) goto <D.19295>; else goto <D.19296>;
  <D.19295>:
  sgen_parallel_pin_or_update (obj_slot, obj, vt, queue);
  return;
  <D.19296>:
  MEM[(struct MonoVTable * *)destination] = vt;
  destination.109 = (unsigned int) destination;
  D.19298 = destination.109 | 1;
  D.19299 = (void *) D.19298;
  D.19300 = InterlockedCompareExchangePointer (obj, D.19299, vt);
  if (D.19300 == vt) goto <D.19301>; else goto <D.19302>;
  <D.19301>:
  if (has_references != 0) goto <D.19304>; else goto <D.19305>;
  <D.19304>:
  iftmp.110 = queue;
  goto <D.19306>;
  <D.19305>:
  iftmp.110 = 0B;
  <D.19306>:
  par_copy_object_no_checks (destination, vt, obj, objsize, iftmp.110);
  obj = destination;
  *obj_slot = obj;
  goto <D.19307>;
  <D.19302>:
  D.19308 = sgen_ptr_in_nursery (destination);
  if (D.19308 == 0) goto <D.19309>; else goto <D.19310>;
  <D.19309>:
  MEM[(void * *)destination] = 0B;
  goto <D.19311>;
  <D.19310>:
  memset (destination, 0, objsize);
  <D.19311>:
  vtable_word = MEM[(mword *)obj];
  D.19279 = vtable_word & 1;
  D.19312 = D.19279 == 0;
  D.19313 = (long int) D.19312;
  D.19314 = __builtin_expect (D.19313, 0);
  if (D.19314 != 0) goto <D.19315>; else goto <D.19316>;
  <D.19315>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-minor-copy-object.h", 291, "vtable_word & SGEN_FORWARDED_BIT");
  <D.19316>:
  D.19278 = vtable_word & 4294967292;
  obj = (char *) D.19278;
  *obj_slot = obj;
  <D.19307>:
}


par_alloc_for_promotion (struct MonoVTable * vtable, char * obj, size_t objsize, gboolean has_references)
{
  int promote_age.111;
  char * D.19321;
  void * (*<T2dd5>) (struct MonoVTable *, int, gboolean) D.19322;
  int objsize.112;
  char * D.19324;
  char * D.19325;
  _Bool D.19326;
  long int D.19327;
  long int D.19328;
  char * * D.19331;
  void * D.19332;
  void * D.19333;
  char * p;
  int age;
  void restart = <<< error >>>;

  age = get_object_age (obj);
  promote_age.111 = promote_age;
  if (age >= promote_age.111) goto <D.19319>; else goto <D.19320>;
  <D.19319>:
  D.19322 = major_collector.par_alloc_object;
  objsize.112 = (int) objsize;
  D.19321 = D.19322 (vtable, objsize.112, has_references);
  return D.19321;
  <D.19320>:
  restart:
  p = age_alloc_buffers[age].next;
  mono_memory_read_barrier ();
  D.19324 = p + objsize;
  D.19325 = age_alloc_buffers[age].end;
  D.19326 = D.19324 <= D.19325;
  D.19327 = (long int) D.19326;
  D.19328 = __builtin_expect (D.19327, 1);
  if (D.19328 != 0) goto <D.19329>; else goto <D.19330>;
  <D.19329>:
  D.19331 = &age_alloc_buffers[age].next;
  D.19332 = p + objsize;
  D.19333 = InterlockedCompareExchangePointer (D.19331, D.19332, p);
  if (D.19333 != p) goto restart; else goto <D.19334>;
  <D.19334>:
  goto <D.19335>;
  <D.19330>:
  p = par_alloc_for_promotion_slow_path (age, objsize);
  if (p == 0B) goto <D.19336>; else goto <D.19337>;
  <D.19336>:
  D.19322 = major_collector.par_alloc_object;
  objsize.112 = (int) objsize;
  D.19321 = D.19322 (vtable, objsize.112, has_references);
  return D.19321;
  <D.19337>:
  <D.19335>:
  MEM[(struct MonoVTable * *)p] = vtable;
  D.19321 = p;
  return D.19321;
}


mono_memory_read_barrier ()
{
  mono_memory_barrier ();
}


mono_memory_barrier ()
{
  __sync_synchronize ();
}


par_alloc_for_promotion_slow_path (int age, size_t objsize)
{
  unsigned int D.19339;
  char * D.19340;
  char * D.19341;
  _Bool D.19342;
  long int D.19343;
  long int D.19344;
  char * * D.19347;
  void * D.19348;
  void * D.19349;
  void * D.19354;
  unsigned int D.19355;
  unsigned int D.19356;
  unsigned int allocated_size.113;
  char * D.19360;
  char * D.19361;
  char * p;
  size_t allocated_size;
  size_t aligned_objsize;
  void restart = <<< error >>>;

  try
    {
      D.19339 = objsize + 511;
      aligned_objsize = D.19339 & 4294966784;
      pthread_mutex_lock (&par_alloc_buffer_refill_mutex);
      restart:
      p = age_alloc_buffers[age].next;
      D.19340 = p + objsize;
      D.19341 = age_alloc_buffers[age].end;
      D.19342 = D.19340 <= D.19341;
      D.19343 = (long int) D.19342;
      D.19344 = __builtin_expect (D.19343, 1);
      if (D.19344 != 0) goto <D.19345>; else goto <D.19346>;
      <D.19345>:
      D.19347 = &age_alloc_buffers[age].next;
      D.19348 = p + objsize;
      D.19349 = InterlockedCompareExchangePointer (D.19347, D.19348, p);
      if (D.19349 != p) goto restart; else goto <D.19350>;
      <D.19350>:
      goto <D.19351>;
      <D.19346>:
      {
        char * end;

        end = age_alloc_buffers[age].end;
        if (end != 0B) goto <D.19352>; else goto <D.19353>;
        <D.19352>:
        <D.17644>:
        p = age_alloc_buffers[age].next;
        D.19347 = &age_alloc_buffers[age].next;
        D.19354 = InterlockedCompareExchangePointer (D.19347, end, p);
        if (D.19354 != p) goto <D.17644>; else goto <D.17645>;
        <D.17645>:
        sgen_clear_range (p, end);
        <D.19353>:
        age_alloc_buffers[age].end = 0B;
        mono_memory_write_barrier ();
        D.19355 = MAX_EXPR <aligned_objsize, 4096>;
        D.19356 = MAX_EXPR <aligned_objsize, 512>;
        p = sgen_fragment_allocator_par_range_alloc (&collector_allocator, D.19355, D.19356, &allocated_size);
        if (p != 0B) goto <D.19357>; else goto <D.19358>;
        <D.19357>:
        allocated_size.113 = allocated_size;
        D.19360 = p + allocated_size.113;
        set_age_in_range (p, D.19360, age);
        D.19340 = p + objsize;
        age_alloc_buffers[age].next = D.19340;
        mono_memory_write_barrier ();
        allocated_size.113 = allocated_size;
        D.19360 = p + allocated_size.113;
        age_alloc_buffers[age].end = D.19360;
        <D.19358>:
      }
      <D.19351>:
      pthread_mutex_unlock (&par_alloc_buffer_refill_mutex);
      D.19361 = p;
      return D.19361;
    }
  finally
    {
      allocated_size = {CLOBBER};
    }
}


mono_memory_write_barrier ()
{
  mono_memory_barrier ();
}


InterlockedCompareExchangePointer (void * volatile * dest, void * exch, void * comp)
{
  void * D.19364;
  unsigned int comp.114;
  unsigned int exch.115;
  unsigned int D.19367;

  comp.114 = (unsigned int) comp;
  exch.115 = (unsigned int) exch;
  D.19367 = __sync_val_compare_and_swap_4 (dest, comp.114, exch.115);
  D.19364 = (void *) D.19367;
  return D.19364;
}


split_nursery_serial_copy_object (void * * obj_slot, struct SgenGrayQueue * queue)
{
  int current_collection_generation.116;
  int D.19372;
  struct FILE * gc_debug_file.117;
  char * iftmp.118;
  unsigned int D.19379;
  unsigned int D.19380;
  unsigned int D.19383;
  unsigned int D.19391;
  _Bool D.19392;
  long int D.19393;
  long int D.19394;
  int D.19401;
  void * D.19408;
  char * forwarded;
  char * obj;

  obj = *obj_slot;
  if (0 != 0) goto <D.19369>; else goto <D.19370>;
  <D.19369>:
  current_collection_generation.116 = current_collection_generation;
  monoeg_g_log (0B, 4, "calling minor-serial-copy from a %d generation collection", current_collection_generation.116);
  <D.17752>:
  goto <D.17752>;
  <D.19370>:
  D.19372 = sgen_ptr_in_nursery (obj);
  if (D.19372 == 0) goto <D.19373>; else goto <D.19374>;
  <D.19373>:
  return;
  <D.19374>:
  if (0 != 0) goto <D.19375>; else goto <D.19376>;
  <D.19375>:
  gc_debug_file.117 = gc_debug_file;
  fprintf (gc_debug_file.117, "Precise copy of %p from %p\n", obj, obj_slot);
  gc_debug_file.117 = gc_debug_file;
  fflush (gc_debug_file.117);
  <D.19376>:
  D.19379 = MEM[(mword *)obj];
  D.19380 = D.19379 & 1;
  if (D.19380 != 0) goto <D.19381>; else goto <D.19382>;
  <D.19381>:
  D.19379 = MEM[(mword *)obj];
  D.19383 = D.19379 & 4294967292;
  iftmp.118 = (char *) D.19383;
  goto <D.19384>;
  <D.19382>:
  iftmp.118 = 0B;
  <D.19384>:
  forwarded = iftmp.118;
  if (forwarded != 0B) goto <D.19385>; else goto <D.19386>;
  <D.19385>:
  if (0 != 0) goto <D.19387>; else goto <D.19388>;
  <D.19387>:
  monoeg_g_log (0B, 4, "forwarded object %p has no gc descriptor", forwarded);
  <D.17753>:
  goto <D.17753>;
  <D.19388>:
  if (0 != 0) goto <D.19389>; else goto <D.19390>;
  <D.19389>:
  gc_debug_file.117 = gc_debug_file;
  fprintf (gc_debug_file.117, " (already forwarded to %p)\n", forwarded);
  gc_debug_file.117 = gc_debug_file;
  fflush (gc_debug_file.117);
  <D.19390>:
  *obj_slot = forwarded;
  return;
  <D.19386>:
  D.19379 = MEM[(mword *)obj];
  D.19391 = D.19379 & 2;
  D.19392 = D.19391 != 0;
  D.19393 = (long int) D.19392;
  D.19394 = __builtin_expect (D.19393, 0);
  if (D.19394 != 0) goto <D.19395>; else goto <D.19396>;
  <D.19395>:
  if (0 != 0) goto <D.19397>; else goto <D.19398>;
  <D.19397>:
  monoeg_g_log (0B, 4, "pinned object %p has no gc descriptor", obj);
  <D.17754>:
  goto <D.17754>;
  <D.19398>:
  if (0 != 0) goto <D.19399>; else goto <D.19400>;
  <D.19399>:
  gc_debug_file.117 = gc_debug_file;
  fprintf (gc_debug_file.117, " (pinned, no change)\n");
  gc_debug_file.117 = gc_debug_file;
  fflush (gc_debug_file.117);
  <D.19400>:
  return;
  <D.19396>:
  D.19401 = sgen_nursery_is_to_space (obj);
  if (D.19401 != 0) goto <D.19402>; else goto <D.19403>;
  <D.19402>:
  if (0 != 0) goto <D.19404>; else goto <D.19405>;
  <D.19404>:
  monoeg_g_log (0B, 4, "to space object %p has no gc descriptor", obj);
  <D.17755>:
  goto <D.17755>;
  <D.19405>:
  if (0 != 0) goto <D.19406>; else goto <D.19407>;
  <D.19406>:
  gc_debug_file.117 = gc_debug_file;
  fprintf (gc_debug_file.117, " (tospace, no change)\n");
  gc_debug_file.117 = gc_debug_file;
  fflush (gc_debug_file.117);
  <D.19407>:
  return;
  <D.19403>:
  D.19408 = copy_object_no_checks (obj, queue);
  *obj_slot = D.19408;
}


print_gc_param_usage ()
{
  struct _IO_FILE * stderr.119;

  stderr.119 = stderr;
  fprintf (stderr.119, "  alloc-ratio=P (where P is a percentage, an integer in 1-100)\n  promotion-age=P (where P is a number, an integer in 1-%d)\n", 14);
}


fprintf (struct FILE * restrict __stream, const char * restrict __fmt)
{
  int D.19411;

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


handle_gc_param (const char * opt)
{
  int D.19413;
  char * D.19416;
  unsigned int percentage.120;
  unsigned int D.19418;
  struct _IO_FILE * stderr.121;
  float D.19422;
  float alloc_ratio.122;
  gboolean D.19424;
  int D.19425;
  char * D.19428;
  int promote_age.123;
  int promote_age.124;
  unsigned int promote_age.125;
  unsigned int D.19432;

  D.19413 = monoeg_g_str_has_prefix (opt, "alloc-ratio=");
  if (D.19413 != 0) goto <D.19414>; else goto <D.19415>;
  <D.19414>:
  {
    const char * arg;
    int percentage;

    D.19416 = __builtin_strchr (opt, 61);
    arg = D.19416 + 1;
    percentage = atoi (arg);
    percentage.120 = (unsigned int) percentage;
    D.19418 = percentage.120 + 4294967295;
    if (D.19418 > 99) goto <D.19419>; else goto <D.19420>;
    <D.19419>:
    stderr.121 = stderr;
    fprintf (stderr.121, "alloc-ratio must be an integer in the range 1-100.\n");
    exit (1);
    <D.19420>:
    D.19422 = (float) percentage;
    alloc_ratio.122 = D.19422 / 1.0e+2;
    alloc_ratio = alloc_ratio.122;
    D.19424 = 1;
    return D.19424;
  }
  <D.19415>:
  D.19425 = monoeg_g_str_has_prefix (opt, "promotion-age=");
  if (D.19425 != 0) goto <D.19426>; else goto <D.19427>;
  <D.19426>:
  {
    const char * arg;

    D.19428 = __builtin_strchr (opt, 61);
    arg = D.19428 + 1;
    promote_age.123 = atoi (arg);
    promote_age = promote_age.123;
    promote_age.124 = promote_age;
    promote_age.125 = (unsigned int) promote_age.124;
    D.19432 = promote_age.125 + 4294967295;
    if (D.19432 > 13) goto <D.19433>; else goto <D.19434>;
    <D.19433>:
    stderr.121 = stderr;
    fprintf (stderr.121, "promotion-age must be an integer in the range 1-%d.\n", 14);
    exit (1);
    <D.19434>:
    D.19424 = 1;
    return D.19424;
  }
  <D.19427>:
  D.19424 = 0;
  return D.19424;
}


atoi (const char * __nptr)
{
  int D.19436;

  D.19436 = strtol (__nptr, 0B, 10);
  return D.19436;
}


init_nursery (struct SgenFragmentAllocator * allocator, char * start, char * end)
{
  int end.126;
  int start.127;
  int D.19440;
  float D.19441;
  float alloc_ratio.128;
  float D.19443;
  unsigned int start.129;
  unsigned int alloc_quote.130;
  unsigned int D.19446;
  unsigned int D.19447;
  char * promotion_barrier.131;
  char * promotion_barrier.132;
  int region_age_size.133;
  int region_age_size.134;
  unsigned int region_age_size.135;
  void * region_age.136;
  int alloc_quote;

  end.126 = (int) end;
  start.127 = (int) start;
  D.19440 = end.126 - start.127;
  D.19441 = (float) D.19440;
  alloc_ratio.128 = alloc_ratio;
  D.19443 = D.19441 * alloc_ratio.128;
  alloc_quote = (int) D.19443;
  start.129 = (unsigned int) start;
  alloc_quote.130 = (unsigned int) alloc_quote;
  D.19446 = start.129 + alloc_quote.130;
  D.19447 = D.19446 & 4294967288;
  promotion_barrier.131 = (char *) D.19447;
  promotion_barrier = promotion_barrier.131;
  promotion_barrier.132 = promotion_barrier;
  sgen_fragment_allocator_add (allocator, start, promotion_barrier.132);
  promotion_barrier.132 = promotion_barrier;
  sgen_fragment_allocator_add (&collector_allocator, promotion_barrier.132, end);
  end.126 = (int) end;
  start.127 = (int) start;
  D.19440 = end.126 - start.127;
  region_age_size.133 = D.19440 >> 9;
  region_age_size = region_age_size.133;
  region_age_size.134 = region_age_size;
  region_age_size.135 = (unsigned int) region_age_size.134;
  region_age.136 = monoeg_malloc0 (region_age_size.135);
  region_age = region_age.136;
}


build_fragments_finish (struct SgenFragmentAllocator * allocator)
{
  collector_allocator = *allocator;
  fragment_list_split (&collector_allocator);
}


fragment_list_split (struct SgenFragmentAllocator * allocator)
{
  char * D.19454;
  char * promotion_barrier.137;
  char * D.19458;
  struct SgenFragment * D.19461;
  struct SgenFragment * D.19462;
  char * D.19463;
  char * D.19464;
  _Bool D.19465;
  long int D.19466;
  long int D.19467;
  struct SgenFragment * D.19470;
  struct SgenFragment * D.19473;
  struct SgenFragment * prev;
  struct SgenFragment * list;

  prev = 0B;
  list = allocator->region_head;
  goto <D.17618>;
  <D.17617>:
  D.19454 = list->fragment_end;
  promotion_barrier.137 = promotion_barrier;
  if (D.19454 > promotion_barrier.137) goto <D.19456>; else goto <D.19457>;
  <D.19456>:
  D.19458 = list->fragment_start;
  promotion_barrier.137 = promotion_barrier;
  if (D.19458 < promotion_barrier.137) goto <D.19459>; else goto <D.19460>;
  <D.19459>:
  {
    struct SgenFragment * res;

    res = sgen_fragment_allocator_alloc ();
    promotion_barrier.137 = promotion_barrier;
    res->fragment_start = promotion_barrier.137;
    promotion_barrier.137 = promotion_barrier;
    res->fragment_next = promotion_barrier.137;
    D.19454 = list->fragment_end;
    res->fragment_end = D.19454;
    D.19461 = list->next;
    res->next = D.19461;
    D.19462 = list->next_in_order;
    res->next_in_order = D.19462;
    D.19463 = res->fragment_end;
    D.19464 = res->fragment_start;
    D.19465 = D.19463 <= D.19464;
    D.19466 = (long int) D.19465;
    D.19467 = __builtin_expect (D.19466, 0);
    if (D.19467 != 0) goto <D.19468>; else goto <D.19469>;
    <D.19468>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-split-nursery.c", 220, "res->fragment_end > res->fragment_start");
    <D.19469>:
    promotion_barrier.137 = promotion_barrier;
    list->fragment_end = promotion_barrier.137;
    list->next_in_order = 0B;
    D.19462 = list->next_in_order;
    list->next = D.19462;
    D.19458 = list->fragment_start;
    D.19454 = list->fragment_end;
    set_age_in_range (D.19458, D.19454, 0);
    allocator->alloc_head = res;
    D.19470 = allocator->alloc_head;
    allocator->region_head = D.19470;
    return;
  }
  <D.19460>:
  if (prev != 0B) goto <D.19471>; else goto <D.19472>;
  <D.19471>:
  prev->next_in_order = 0B;
  D.19473 = prev->next_in_order;
  prev->next = D.19473;
  <D.19472>:
  allocator->alloc_head = list;
  D.19470 = allocator->alloc_head;
  allocator->region_head = D.19470;
  return;
  <D.19457>:
  D.19458 = list->fragment_start;
  D.19454 = list->fragment_end;
  set_age_in_range (D.19458, D.19454, 0);
  prev = list;
  list = list->next;
  <D.17618>:
  if (list != 0B) goto <D.17617>; else goto <D.17619>;
  <D.17619>:
  allocator->alloc_head = 0B;
  D.19470 = allocator->alloc_head;
  allocator->region_head = D.19470;
}


build_fragments_release_exclude_head ()
{
  sgen_fragment_allocator_release (&collector_allocator);
}


build_fragments_get_exclude_head ()
{
  char * D.19475;
  char * D.19478;
  struct SgenFragment * D.19479;
  int i;

  i = 0;
  goto <D.17672>;
  <D.17671>:
  D.19475 = age_alloc_buffers[i].end;
  if (D.19475 != 0B) goto <D.19476>; else goto <D.19477>;
  <D.19476>:
  D.19478 = age_alloc_buffers[i].next;
  D.19475 = age_alloc_buffers[i].end;
  sgen_clear_range (D.19478, D.19475);
  <D.19477>:
  i = i + 1;
  <D.17672>:
  if (i <= 14) goto <D.17671>; else goto <D.17673>;
  <D.17673>:
  D.19479 = collector_allocator.region_head;
  return D.19479;
}


clear_fragments ()
{
  sgen_clear_allocator_fragments (&collector_allocator);
}


prepare_to_space (char * to_space_bitmap, int space_bitmap_size)
{
  unsigned int space_bitmap_size.138;
  char * D.19482;
  unsigned int D.19483;
  unsigned int D.19484;
  unsigned int D.19485;
  char * D.19486;
  unsigned int D.19487;
  unsigned int D.19488;
  int end.139;
  int start.140;
  int D.19491;
  char * D.19494;
  struct SgenFragment * D.19495;
  struct SgenFragment * * previous;
  struct SgenFragment * frag;

  space_bitmap_size.138 = (unsigned int) space_bitmap_size;
  memset (to_space_bitmap, 0, space_bitmap_size.138);
  memset (&age_alloc_buffers, 0, 120);
  previous = &collector_allocator.alloc_head;
  frag = *previous;
  goto <D.17690>;
  <D.17689>:
  {
    char * start;
    char * end;

    D.19482 = frag->fragment_next;
    D.19483 = (unsigned int) D.19482;
    D.19484 = D.19483 + 511;
    D.19485 = D.19484 & 4294966784;
    start = (char *) D.19485;
    D.19486 = frag->fragment_end;
    D.19487 = (unsigned int) D.19486;
    D.19488 = D.19487 & 4294966784;
    end = (char *) D.19488;
    end.139 = (int) end;
    start.140 = (int) start;
    D.19491 = end.139 - start.140;
    if (D.19491 <= 511) goto <D.19492>; else goto <D.19493>;
    <D.19492>:
    D.19482 = frag->fragment_next;
    D.19486 = frag->fragment_end;
    sgen_clear_range (D.19482, D.19486);
    D.19494 = frag->fragment_start;
    frag->fragment_end = D.19494;
    D.19486 = frag->fragment_end;
    frag->fragment_next = D.19486;
    D.19495 = frag->next;
    *previous = D.19495;
    // predicted unlikely by continue predictor.
    goto <D.17688>;
    <D.19493>:
    sgen_clear_range (start, end);
    D.19482 = frag->fragment_next;
    if (D.19482 != start) goto <D.19496>; else goto <D.19497>;
    <D.19496>:
    D.19482 = frag->fragment_next;
    sgen_clear_range (D.19482, start);
    <D.19497>:
    D.19486 = frag->fragment_end;
    if (D.19486 != end) goto <D.19498>; else goto <D.19499>;
    <D.19498>:
    D.19486 = frag->fragment_end;
    sgen_clear_range (end, D.19486);
    <D.19499>:
    frag->fragment_next = start;
    D.19482 = frag->fragment_next;
    frag->fragment_start = D.19482;
    frag->fragment_end = end;
    mark_bits_in_range (to_space_bitmap, start, end);
    previous = &frag->next;
  }
  <D.17688>:
  frag = *previous;
  <D.17690>:
  if (frag != 0B) goto <D.17689>; else goto <D.17691>;
  <D.17691>:
}


mark_bits_in_range (char * space_bitmap, char * start, char * end)
{
  unsigned int start.141;
  unsigned int D.19501;
  unsigned int end.142;
  unsigned int D.19503;
  unsigned int D.19504;

  start.141 = (unsigned int) start;
  D.19501 = start.141 & 4294966784;
  start = (char *) D.19501;
  end.142 = (unsigned int) end;
  D.19503 = end.142 + 511;
  D.19504 = D.19503 & 4294966784;
  end = (char *) D.19504;
  goto <D.17609>;
  <D.17608>:
  mark_bit (space_bitmap, start);
  start = start + 512;
  <D.17609>:
  if (start < end) goto <D.17608>; else goto <D.17610>;
  <D.17610>:
}


mark_bit (char * space_bitmap, char * pos)
{
  int pos.143;
  char * sgen_nursery_start.144;
  int sgen_nursery_start.145;
  int D.19508;
  int sgen_space_bitmap_size.146;
  _Bool D.19510;
  long int D.19511;
  long int D.19512;
  sizetype byte.147;
  char * D.19516;
  char D.19517;
  int D.19518;
  char D.19519;
  char D.19520;
  int idx;
  int byte;
  int bit;

  pos.143 = (int) pos;
  sgen_nursery_start.144 = sgen_nursery_start;
  sgen_nursery_start.145 = (int) sgen_nursery_start.144;
  D.19508 = pos.143 - sgen_nursery_start.145;
  idx = D.19508 >> 9;
  byte = idx / 8;
  bit = idx & 7;
  sgen_space_bitmap_size.146 = sgen_space_bitmap_size;
  D.19510 = byte >= sgen_space_bitmap_size.146;
  D.19511 = (long int) D.19510;
  D.19512 = __builtin_expect (D.19511, 0);
  if (D.19512 != 0) goto <D.19513>; else goto <D.19514>;
  <D.19513>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-split-nursery.c", 182, "byte < sgen_space_bitmap_size");
  <D.19514>:
  byte.147 = (sizetype) byte;
  D.19516 = space_bitmap + byte.147;
  byte.147 = (sizetype) byte;
  D.19516 = space_bitmap + byte.147;
  D.19517 = *D.19516;
  D.19518 = 1 << bit;
  D.19519 = (char) D.19518;
  D.19520 = D.19517 | D.19519;
  *D.19516 = D.19520;
}


minor_par_alloc_for_promotion (struct MonoVTable * vtable, char * obj, size_t objsize, gboolean has_references)
{
  int D.19521;
  char * D.19524;
  void * (*<T2dd5>) (struct MonoVTable *, int, gboolean) D.19525;
  int objsize.148;

  D.19521 = sgen_ptr_in_nursery (obj);
  if (D.19521 == 0) goto <D.19522>; else goto <D.19523>;
  <D.19522>:
  D.19525 = major_collector.par_alloc_object;
  objsize.148 = (int) objsize;
  D.19524 = D.19525 (vtable, objsize.148, has_references);
  return D.19524;
  <D.19523>:
  D.19524 = par_alloc_for_promotion (vtable, obj, objsize, has_references);
  return D.19524;
}


minor_alloc_for_promotion (struct MonoVTable * vtable, char * obj, size_t objsize, gboolean has_references)
{
  int D.19528;
  char * D.19531;
  void * (*<T2dd5>) (struct MonoVTable *, int, gboolean) D.19532;
  int objsize.149;

  D.19528 = sgen_ptr_in_nursery (obj);
  if (D.19528 == 0) goto <D.19529>; else goto <D.19530>;
  <D.19529>:
  D.19532 = major_collector.alloc_object;
  objsize.149 = (int) objsize;
  D.19531 = D.19532 (vtable, objsize.149, has_references);
  return D.19531;
  <D.19530>:
  D.19531 = alloc_for_promotion (vtable, obj, objsize, has_references);
  return D.19531;
}


