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.18186;
  unsigned int D.18187;
  unsigned int D.18190;
  unsigned int D.18191;
  unsigned int D.18192;
  unsigned int D.18193;
  unsigned int D.18194;
  void * D.18199;
  struct FILE * gc_debug_file.0;
  unsigned int _index.1;
  unsigned int D.18210;
  int D.18211;
  void * D.18216;
  unsigned int _index.2;
  unsigned int D.18220;
  int D.18221;
  unsigned int D.18228;
  unsigned int D.18231;
  int D.18232;
  int desc.3;
  unsigned int D.18236;
  unsigned int el_size.4;
  unsigned int D.18238;
  void * D.18243;
  int D.18249;
  unsigned int offset.5;
  unsigned int D.18251;
  unsigned int i.6;
  unsigned int D.18253;
  void * * D.18254;
  void * D.18259;
  sizetype el_size.7;
  unsigned int D.18266;
  void * D.18273;
  unsigned int D.18276;
  void * D.18283;
  unsigned int D.18286;
  unsigned int D.18287;
  struct MonoVTable * D.18290;
  struct MonoClass * D.18291;
  const char * D.18292;
  const char * D.18293;
  gsize * bitmap_data.8;
  unsigned int D.18295;
  void * D.18302;
  int bwords.9;

  start = start + 4294967288;
  D.18186 = desc & 7;
  switch (D.18186) <default: <D.18181>, case 1: <D.18107>, case 2: <D.18116>, case 3: <D.18166>, case 4: <D.18126>, case 5: <D.18159>, case 7: <D.18180>>
  <D.18107>:
  D.18187 = desc & 4294901760;
  if (D.18187 != 0) goto <D.18188>; else goto <D.18189>;
  <D.18188>:
  {
    void * * _objptr_end;
    void * * _objptr;

    _objptr = start;
    D.18190 = desc >> 16;
    D.18191 = D.18190 & 255;
    D.18192 = D.18191 * 4;
    _objptr = _objptr + D.18192;
    D.18193 = desc >> 24;
    D.18194 = D.18193 * 4;
    _objptr_end = _objptr + D.18194;
    {
      void * __old;

      __old = *_objptr;
      if (__old != 0B) goto <D.18195>; else goto <D.18196>;
      <D.18195>:
      split_nursery_serial_copy_object_from_obj (_objptr, queue);
      if (0 != 0) goto <D.18197>; else goto <D.18198>;
      <D.18197>:
      D.18199 = *_objptr;
      if (D.18199 != __old) goto <D.18200>; else goto <D.18201>;
      <D.18200>:
      D.18199 = *_objptr;
      gc_debug_file.0 = gc_debug_file;
      fprintf (gc_debug_file.0, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18199, __old);
      gc_debug_file.0 = gc_debug_file;
      fflush (gc_debug_file.0);
      <D.18201>:
      <D.18198>:
      <D.18196>:
    }
    _objptr = _objptr + 4;
    goto <D.18113>;
    <D.18112>:
    {
      void * __old;

      __old = *_objptr;
      if (__old != 0B) goto <D.18203>; else goto <D.18204>;
      <D.18203>:
      split_nursery_serial_copy_object_from_obj (_objptr, queue);
      if (0 != 0) goto <D.18205>; else goto <D.18206>;
      <D.18205>:
      D.18199 = *_objptr;
      if (D.18199 != __old) goto <D.18207>; else goto <D.18208>;
      <D.18207>:
      D.18199 = *_objptr;
      gc_debug_file.0 = gc_debug_file;
      fprintf (gc_debug_file.0, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18199, __old);
      gc_debug_file.0 = gc_debug_file;
      fflush (gc_debug_file.0);
      <D.18208>:
      <D.18206>:
      <D.18204>:
    }
    _objptr = _objptr + 4;
    <D.18113>:
    if (_objptr < _objptr_end) goto <D.18112>; else goto <D.18114>;
    <D.18114>:
  }
  <D.18189>:
  goto <D.18115>;
  <D.18116>:
  {
    void * * _objptr;
    gsize _bmap;

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

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

        __old = *_objptr;
        if (__old != 0B) goto <D.18212>; else goto <D.18213>;
        <D.18212>:
        split_nursery_serial_copy_object_from_obj (_objptr, queue);
        if (0 != 0) goto <D.18214>; else goto <D.18215>;
        <D.18214>:
        D.18216 = *_objptr;
        if (D.18216 != __old) goto <D.18217>; else goto <D.18218>;
        <D.18217>:
        D.18216 = *_objptr;
        gc_debug_file.0 = gc_debug_file;
        fprintf (gc_debug_file.0, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18216, __old);
        gc_debug_file.0 = gc_debug_file;
        fflush (gc_debug_file.0);
        <D.18218>:
        <D.18215>:
        <D.18213>:
      }
      _objptr = _objptr + 4;
    }
    goto <D.18124>;
    <D.18123>:
    {
      int _index;

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

        __old = *_objptr;
        if (__old != 0B) goto <D.18222>; else goto <D.18223>;
        <D.18222>:
        split_nursery_serial_copy_object_from_obj (_objptr, queue);
        if (0 != 0) goto <D.18224>; else goto <D.18225>;
        <D.18224>:
        D.18216 = *_objptr;
        if (D.18216 != __old) goto <D.18226>; else goto <D.18227>;
        <D.18226>:
        D.18216 = *_objptr;
        gc_debug_file.0 = gc_debug_file;
        fprintf (gc_debug_file.0, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18216, __old);
        gc_debug_file.0 = gc_debug_file;
        fflush (gc_debug_file.0);
        <D.18227>:
        <D.18225>:
        <D.18223>:
      }
      _objptr = _objptr + 4;
    }
    <D.18124>:
    if (_bmap != 0) goto <D.18123>; else goto <D.18125>;
    <D.18125>:
  }
  goto <D.18115>;
  <D.18126>:
  D.18228 = desc & 4294950912;
  if (D.18228 != 0) goto <D.18229>; else goto <D.18230>;
  <D.18229>:
  {
    int el_size;
    int etype;

    D.18231 = desc >> 3;
    D.18232 = (int) D.18231;
    el_size = D.18232 & 1023;
    desc.3 = (int) desc;
    etype = desc.3 & 49152;
    if (etype == 16384) goto <D.18234>; else goto <D.18235>;
    <D.18234>:
    {
      void * * p;
      void * * end_refs;

      p = start + 16;
      D.18236 = MEM[(struct MonoArray *)start].max_length;
      el_size.4 = (unsigned int) el_size;
      D.18238 = D.18236 * el_size.4;
      end_refs = p + D.18238;
      goto <D.18133>;
      <D.18132>:
      {
        void * __old;

        __old = *p;
        if (__old != 0B) goto <D.18239>; else goto <D.18240>;
        <D.18239>:
        split_nursery_serial_copy_object_from_obj (p, queue);
        if (0 != 0) goto <D.18241>; else goto <D.18242>;
        <D.18241>:
        D.18243 = *p;
        if (D.18243 != __old) goto <D.18244>; else goto <D.18245>;
        <D.18244>:
        D.18243 = *p;
        gc_debug_file.0 = gc_debug_file;
        fprintf (gc_debug_file.0, "Overwrote field at %p with %p (was: %p)\n", p, D.18243, __old);
        gc_debug_file.0 = gc_debug_file;
        fflush (gc_debug_file.0);
        <D.18245>:
        <D.18242>:
        <D.18240>:
      }
      p = p + 4;
      <D.18133>:
      if (p < end_refs) goto <D.18132>; else goto <D.18134>;
      <D.18134>:
    }
    goto <D.18246>;
    <D.18235>:
    if (etype == 32768) goto <D.18247>; else goto <D.18248>;
    <D.18247>:
    {
      int offset;
      int num_refs;
      char * e_start;
      char * e_end;

      D.18190 = desc >> 16;
      D.18249 = (int) D.18190;
      offset = D.18249 & 255;
      D.18193 = desc >> 24;
      num_refs = (int) D.18193;
      e_start = start + 16;
      D.18236 = MEM[(struct MonoArray *)start].max_length;
      el_size.4 = (unsigned int) el_size;
      D.18238 = D.18236 * el_size.4;
      e_end = e_start + D.18238;
      goto <D.18146>;
      <D.18145>:
      {
        void * * p;
        int i;

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

          i.6 = (unsigned int) i;
          D.18253 = i.6 * 4;
          D.18254 = p + D.18253;
          __old = *D.18254;
          if (__old != 0B) goto <D.18255>; else goto <D.18256>;
          <D.18255>:
          i.6 = (unsigned int) i;
          D.18253 = i.6 * 4;
          D.18254 = p + D.18253;
          split_nursery_serial_copy_object_from_obj (D.18254, queue);
          if (0 != 0) goto <D.18257>; else goto <D.18258>;
          <D.18257>:
          i.6 = (unsigned int) i;
          D.18253 = i.6 * 4;
          D.18254 = p + D.18253;
          D.18259 = *D.18254;
          if (D.18259 != __old) goto <D.18260>; else goto <D.18261>;
          <D.18260>:
          i.6 = (unsigned int) i;
          D.18253 = i.6 * 4;
          D.18254 = p + D.18253;
          D.18259 = *D.18254;
          i.6 = (unsigned int) i;
          D.18253 = i.6 * 4;
          D.18254 = p + D.18253;
          gc_debug_file.0 = gc_debug_file;
          fprintf (gc_debug_file.0, "Overwrote field at %p with %p (was: %p)\n", D.18254, D.18259, __old);
          gc_debug_file.0 = gc_debug_file;
          fflush (gc_debug_file.0);
          <D.18261>:
          <D.18258>:
          <D.18256>:
        }
        i = i + 1;
        <D.18143>:
        if (i < num_refs) goto <D.18142>; else goto <D.18144>;
        <D.18144>:
        el_size.7 = (sizetype) el_size;
        e_start = e_start + el_size.7;
      }
      <D.18146>:
      if (e_start < e_end) goto <D.18145>; else goto <D.18147>;
      <D.18147>:
    }
    goto <D.18263>;
    <D.18248>:
    if (etype == 49152) goto <D.18264>; else goto <D.18265>;
    <D.18264>:
    {
      char * e_start;
      char * e_end;

      e_start = start + 16;
      D.18236 = MEM[(struct MonoArray *)start].max_length;
      el_size.4 = (unsigned int) el_size;
      D.18238 = D.18236 * el_size.4;
      e_end = e_start + D.18238;
      goto <D.18157>;
      <D.18156>:
      {
        void * * p;
        gsize _bmap;

        p = e_start;
        _bmap = desc >> 16;
        goto <D.18154>;
        <D.18153>:
        D.18266 = _bmap & 1;
        if (D.18266 != 0) goto <D.18267>; else goto <D.18268>;
        <D.18267>:
        {
          void * __old;

          __old = *p;
          if (__old != 0B) goto <D.18269>; else goto <D.18270>;
          <D.18269>:
          split_nursery_serial_copy_object_from_obj (p, queue);
          if (0 != 0) goto <D.18271>; else goto <D.18272>;
          <D.18271>:
          D.18273 = *p;
          if (D.18273 != __old) goto <D.18274>; else goto <D.18275>;
          <D.18274>:
          D.18273 = *p;
          gc_debug_file.0 = gc_debug_file;
          fprintf (gc_debug_file.0, "Overwrote field at %p with %p (was: %p)\n", p, D.18273, __old);
          gc_debug_file.0 = gc_debug_file;
          fflush (gc_debug_file.0);
          <D.18275>:
          <D.18272>:
          <D.18270>:
        }
        <D.18268>:
        _bmap = _bmap >> 1;
        p = p + 4;
        <D.18154>:
        if (_bmap != 0) goto <D.18153>; else goto <D.18155>;
        <D.18155>:
        el_size.7 = (sizetype) el_size;
        e_start = e_start + el_size.7;
      }
      <D.18157>:
      if (e_start < e_end) goto <D.18156>; else goto <D.18158>;
      <D.18158>:
    }
    <D.18265>:
    <D.18263>:
    <D.18246>:
  }
  <D.18230>:
  goto <D.18115>;
  <D.18159>:
  {
    void * * _objptr;
    gsize _bmap;

    _objptr = start;
    _bmap = desc >> 3;
    _objptr = _objptr + 8;
    goto <D.18164>;
    <D.18163>:
    D.18276 = _bmap & 1;
    if (D.18276 != 0) goto <D.18277>; else goto <D.18278>;
    <D.18277>:
    {
      void * __old;

      __old = *_objptr;
      if (__old != 0B) goto <D.18279>; else goto <D.18280>;
      <D.18279>:
      split_nursery_serial_copy_object_from_obj (_objptr, queue);
      if (0 != 0) goto <D.18281>; else goto <D.18282>;
      <D.18281>:
      D.18283 = *_objptr;
      if (D.18283 != __old) goto <D.18284>; else goto <D.18285>;
      <D.18284>:
      D.18283 = *_objptr;
      gc_debug_file.0 = gc_debug_file;
      fprintf (gc_debug_file.0, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18283, __old);
      gc_debug_file.0 = gc_debug_file;
      fflush (gc_debug_file.0);
      <D.18285>:
      <D.18282>:
      <D.18280>:
    }
    <D.18278>:
    _bmap = _bmap >> 1;
    _objptr = _objptr + 4;
    <D.18164>:
    if (_bmap != 0) goto <D.18163>; else goto <D.18165>;
    <D.18165>:
  }
  goto <D.18115>;
  <D.18166>:
  {
    void * * _objptr;
    gsize * bitmap_data;
    int bwords;
    void * * start_run;

    _objptr = start;
    bitmap_data = sgen_get_complex_descriptor (desc);
    D.18286 = *bitmap_data;
    D.18287 = D.18286 + 4294967295;
    bwords = (int) D.18287;
    start_run = _objptr;
    bitmap_data = bitmap_data + 4;
    if (0 != 0) goto <D.18288>; else goto <D.18289>;
    <D.18288>:
    {
      struct MonoObject * myobj;

      myobj = start;
      D.18290 = myobj->vtable;
      D.18291 = D.18290->klass;
      D.18292 = D.18291->name;
      D.18290 = myobj->vtable;
      D.18291 = D.18290->klass;
      D.18293 = D.18291->name_space;
      monoeg_g_print ("found %d at %p (0x%zx): %s.%s\n", bwords, start, desc, D.18293, D.18292);
    }
    <D.18289>:
    goto <D.18178>;
    <D.18177>:
    {
      gsize _bmap;

      bitmap_data.8 = bitmap_data;
      bitmap_data = bitmap_data.8 + 4;
      _bmap = *bitmap_data.8;
      _objptr = start_run;
      goto <D.18175>;
      <D.18174>:
      D.18295 = _bmap & 1;
      if (D.18295 != 0) goto <D.18296>; else goto <D.18297>;
      <D.18296>:
      {
        void * __old;

        __old = *_objptr;
        if (__old != 0B) goto <D.18298>; else goto <D.18299>;
        <D.18298>:
        split_nursery_serial_copy_object_from_obj (_objptr, queue);
        if (0 != 0) goto <D.18300>; else goto <D.18301>;
        <D.18300>:
        D.18302 = *_objptr;
        if (D.18302 != __old) goto <D.18303>; else goto <D.18304>;
        <D.18303>:
        D.18302 = *_objptr;
        gc_debug_file.0 = gc_debug_file;
        fprintf (gc_debug_file.0, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18302, __old);
        gc_debug_file.0 = gc_debug_file;
        fflush (gc_debug_file.0);
        <D.18304>:
        <D.18301>:
        <D.18299>:
      }
      <D.18297>:
      _bmap = _bmap >> 1;
      _objptr = _objptr + 4;
      <D.18175>:
      if (_bmap != 0) goto <D.18174>; else goto <D.18176>;
      <D.18176>:
      start_run = start_run + 128;
    }
    <D.18178>:
    bwords.9 = bwords;
    bwords = bwords.9 + -1;
    if (bwords.9 > 0) goto <D.18177>; else goto <D.18179>;
    <D.18179>:
  }
  goto <D.18115>;
  <D.18180>:
  goto <D.18115>;
  <D.18181>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-scan-object.h", 111);
  <D.18115>:
}


split_nursery_serial_copy_object_from_obj (void * * obj_slot, struct SgenGrayQueue * queue)
{
  int current_collection_generation.10;
  int D.18310;
  struct FILE * gc_debug_file.11;
  char * iftmp.12;
  unsigned int D.18317;
  unsigned int D.18318;
  unsigned int D.18321;
  int iftmp.13;
  int D.18332;
  int D.18334;
  _Bool D.18336;
  long int D.18337;
  long int D.18338;
  unsigned int D.18341;
  _Bool D.18342;
  long int D.18343;
  long int D.18344;
  int D.18351;
  int D.18354;
  int D.18361;
  int iftmp.14;
  int D.18367;
  int D.18369;
  _Bool D.18371;
  long int D.18372;
  long int D.18373;
  char * forwarded;
  char * obj;
  void * copy;

  obj = *obj_slot;
  if (0 != 0) goto <D.18307>; else goto <D.18308>;
  <D.18307>:
  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.17783>:
  goto <D.17783>;
  <D.18308>:
  D.18310 = sgen_ptr_in_nursery (obj);
  if (D.18310 == 0) goto <D.18311>; else goto <D.18312>;
  <D.18311>:
  return;
  <D.18312>:
  if (0 != 0) goto <D.18313>; else goto <D.18314>;
  <D.18313>:
  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.18314>:
  D.18317 = MEM[(mword *)obj];
  D.18318 = D.18317 & 1;
  if (D.18318 != 0) goto <D.18319>; else goto <D.18320>;
  <D.18319>:
  D.18317 = MEM[(mword *)obj];
  D.18321 = D.18317 & 4294967292;
  iftmp.12 = (char *) D.18321;
  goto <D.18322>;
  <D.18320>:
  iftmp.12 = 0B;
  <D.18322>:
  forwarded = iftmp.12;
  if (forwarded != 0B) goto <D.18323>; else goto <D.18324>;
  <D.18323>:
  if (0 != 0) goto <D.18325>; else goto <D.18326>;
  <D.18325>:
  monoeg_g_log (0B, 4, "forwarded object %p has no gc descriptor", forwarded);
  <D.17784>:
  goto <D.17784>;
  <D.18326>:
  if (0 != 0) goto <D.18327>; else goto <D.18328>;
  <D.18327>:
  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.18328>:
  *obj_slot = forwarded;
  D.18332 = sgen_ptr_in_nursery (forwarded);
  if (D.18332 != 0) goto <D.18333>; else goto <D.18330>;
  <D.18333>:
  D.18334 = sgen_ptr_in_nursery (obj_slot);
  if (D.18334 == 0) goto <D.18335>; else goto <D.18330>;
  <D.18335>:
  iftmp.13 = 1;
  goto <D.18331>;
  <D.18330>:
  iftmp.13 = 0;
  <D.18331>:
  D.18336 = iftmp.13 != 0;
  D.18337 = (long int) D.18336;
  D.18338 = __builtin_expect (D.18337, 0);
  if (D.18338 != 0) goto <D.18339>; else goto <D.18340>;
  <D.18339>:
  sgen_add_to_global_remset (obj_slot, forwarded);
  <D.18340>:
  return;
  <D.18324>:
  D.18317 = MEM[(mword *)obj];
  D.18341 = D.18317 & 2;
  D.18342 = D.18341 != 0;
  D.18343 = (long int) D.18342;
  D.18344 = __builtin_expect (D.18343, 0);
  if (D.18344 != 0) goto <D.18345>; else goto <D.18346>;
  <D.18345>:
  if (0 != 0) goto <D.18347>; else goto <D.18348>;
  <D.18347>:
  monoeg_g_log (0B, 4, "pinned object %p has no gc descriptor", obj);
  <D.17785>:
  goto <D.17785>;
  <D.18348>:
  if (0 != 0) goto <D.18349>; else goto <D.18350>;
  <D.18349>:
  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.18350>:
  D.18351 = sgen_ptr_in_nursery (obj_slot);
  if (D.18351 == 0) goto <D.18352>; else goto <D.18353>;
  <D.18352>:
  sgen_add_to_global_remset (obj_slot, obj);
  <D.18353>:
  return;
  <D.18346>:
  D.18354 = sgen_nursery_is_to_space (obj);
  if (D.18354 != 0) goto <D.18355>; else goto <D.18356>;
  <D.18355>:
  if (0 != 0) goto <D.18357>; else goto <D.18358>;
  <D.18357>:
  monoeg_g_log (0B, 4, "to space object %p has no gc descriptor", obj);
  <D.17786>:
  goto <D.17786>;
  <D.18358>:
  if (0 != 0) goto <D.18359>; else goto <D.18360>;
  <D.18359>:
  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.18360>:
  D.18361 = sgen_ptr_in_nursery (obj_slot);
  if (D.18361 == 0) goto <D.18362>; else goto <D.18363>;
  <D.18362>:
  sgen_add_to_global_remset (obj_slot, obj);
  <D.18363>:
  return;
  <D.18356>:
  copy = copy_object_no_checks (obj, queue);
  *obj_slot = copy;
  D.18367 = sgen_ptr_in_nursery (copy);
  if (D.18367 != 0) goto <D.18368>; else goto <D.18365>;
  <D.18368>:
  D.18369 = sgen_ptr_in_nursery (obj_slot);
  if (D.18369 == 0) goto <D.18370>; else goto <D.18365>;
  <D.18370>:
  iftmp.14 = 1;
  goto <D.18366>;
  <D.18365>:
  iftmp.14 = 0;
  <D.18366>:
  D.18371 = iftmp.14 != 0;
  D.18372 = (long int) D.18371;
  D.18373 = __builtin_expect (D.18372, 0);
  if (D.18373 != 0) goto <D.18374>; else goto <D.18375>;
  <D.18374>:
  sgen_add_to_global_remset (obj_slot, copy);
  <D.18375>:
}


sgen_nursery_is_to_space (char * object)
{
  int object.15;
  char * sgen_nursery_start.16;
  int sgen_nursery_start.17;
  int D.18380;
  int D.18381;
  _Bool D.18382;
  long int D.18383;
  long int D.18384;
  char * D.18387;
  char * D.18388;
  int sgen_space_bitmap_size.18;
  _Bool D.18390;
  long int D.18391;
  long int D.18392;
  gboolean D.18395;
  char * sgen_space_bitmap.19;
  sizetype byte.20;
  char * D.18398;
  char D.18399;
  int D.18400;
  int D.18401;
  int D.18402;
  _Bool D.18403;
  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.18380 = object.15 - sgen_nursery_start.17;
  idx = D.18380 >> 9;
  byte = idx / 8;
  bit = idx & 7;
  D.18381 = sgen_ptr_in_nursery (object);
  D.18382 = D.18381 == 0;
  D.18383 = (long int) D.18382;
  D.18384 = __builtin_expect (D.18383, 0);
  if (D.18384 != 0) goto <D.18385>; else goto <D.18386>;
  <D.18385>:
  D.18387 = sgen_get_nursery_end ();
  D.18388 = sgen_get_nursery_start ();
  monoeg_g_log (0B, 4, "object %p is not in nursery [%p - %p]", object, D.18388, D.18387);
  <D.17068>:
  goto <D.17068>;
  <D.18386>:
  sgen_space_bitmap_size.18 = sgen_space_bitmap_size;
  D.18390 = byte >= sgen_space_bitmap_size.18;
  D.18391 = (long int) D.18390;
  D.18392 = __builtin_expect (D.18391, 0);
  if (D.18392 != 0) goto <D.18393>; else goto <D.18394>;
  <D.18393>:
  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.17069>:
  goto <D.17069>;
  <D.18394>:
  sgen_space_bitmap.19 = sgen_space_bitmap;
  byte.20 = (sizetype) byte;
  D.18398 = sgen_space_bitmap.19 + byte.20;
  D.18399 = *D.18398;
  D.18400 = (int) D.18399;
  D.18401 = D.18400 >> bit;
  D.18402 = D.18401 & 1;
  D.18403 = D.18402 != 0;
  D.18395 = (gboolean) D.18403;
  return D.18395;
}


sgen_get_nursery_end ()
{
  char * D.18405;

  D.18405 = sgen_nursery_end;
  return D.18405;
}


sgen_get_nursery_start ()
{
  char * D.18407;

  D.18407 = sgen_nursery_start;
  return D.18407;
}


copy_object_no_checks (void * obj, struct SgenGrayQueue * queue)
{
  void * D.18409;
  unsigned int D.18410;
  unsigned int D.18411;
  unsigned int D.18412;
  _Bool D.18413;
  long int D.18414;
  long int D.18415;
  void * D.18418;
  struct SgenGrayQueue * iftmp.21;
  unsigned int destination.22;
  unsigned int D.18424;
  struct MonoVTable * vt;
  gboolean has_references;
  mword objsize;
  char * destination;

  vt = MEM[(struct MonoObject *)obj].vtable;
  D.18409 = vt->gc_descr;
  D.18410 = (unsigned int) D.18409;
  has_references = sgen_gc_descr_has_references (D.18410);
  D.18411 = sgen_par_object_get_size (vt, obj);
  D.18412 = D.18411 + 7;
  objsize = D.18412 & 4294967288;
  destination = alloc_for_promotion (vt, obj, objsize, has_references);
  D.18413 = destination == 0B;
  D.18414 = (long int) D.18413;
  D.18415 = __builtin_expect (D.18414, 0);
  if (D.18415 != 0) goto <D.18416>; else goto <D.18417>;
  <D.18416>:
  sgen_pin_object (obj, queue);
  sgen_set_pinned_from_failed_allocation (objsize);
  D.18418 = obj;
  return D.18418;
  <D.18417>:
  if (has_references != 0) goto <D.18420>; else goto <D.18421>;
  <D.18420>:
  iftmp.21 = queue;
  goto <D.18422>;
  <D.18421>:
  iftmp.21 = 0B;
  <D.18422>:
  par_copy_object_no_checks (destination, vt, obj, objsize, iftmp.21);
  destination.22 = (unsigned int) destination;
  D.18424 = destination.22 | 1;
  MEM[(mword *)obj] = D.18424;
  D.18418 = destination;
  return D.18418;
}


sgen_gc_descr_has_references (mword desc)
{
  unsigned int D.18426;
  gboolean D.18429;
  unsigned int D.18430;
  unsigned int D.18433;

  D.18426 = desc & 4294901767;
  if (D.18426 == 1) goto <D.18427>; else goto <D.18428>;
  <D.18427>:
  D.18429 = 0;
  return D.18429;
  <D.18428>:
  D.18430 = desc & 49159;
  if (D.18430 == 4) goto <D.18431>; else goto <D.18432>;
  <D.18431>:
  D.18429 = 0;
  return D.18429;
  <D.18432>:
  D.18433 = desc & 7;
  if (D.18433 == 7) goto <D.18434>; else goto <D.18435>;
  <D.18434>:
  D.18429 = 0;
  return D.18429;
  <D.18435>:
  D.18429 = 1;
  return D.18429;
}


sgen_par_object_get_size (struct MonoVTable * vtable, struct MonoObject * o)
{
  void * D.18437;
  unsigned int D.18438;
  guint D.18443;
  int D.18444;
  int D.18445;
  unsigned int D.18446;
  unsigned int D.18449;
  int D.18450;
  unsigned int D.18451;
  unsigned int element_size.23;
  unsigned int D.18453;
  unsigned int D.18454;
  struct MonoClass * D.18457;
  unsigned char D.18458;
  unsigned int D.18459;
  unsigned int D.18460;
  mword descr;
  mword type;

  D.18437 = vtable->gc_descr;
  descr = (mword) D.18437;
  type = descr & 7;
  D.18438 = type + 4294967295;
  if (D.18438 <= 1) goto <D.18439>; else goto <D.18440>;
  <D.18439>:
  {
    mword size;

    size = descr & 65528;
    if (size == 0) goto <D.18441>; else goto <D.18442>;
    <D.18441>:
    D.18444 = MEM[(struct MonoString *)o].length;
    D.18445 = D.18444 * 2;
    D.18446 = (unsigned int) D.18445;
    D.18443 = D.18446 + 14;
    return D.18443;
    <D.18442>:
    D.18443 = size;
    return D.18443;
  }
  <D.18440>:
  if (type == 4) goto <D.18447>; else goto <D.18448>;
  <D.18447>:
  {
    int element_size;
    struct MonoArray * array;
    size_t size;

    D.18449 = descr >> 3;
    D.18450 = (int) D.18449;
    element_size = D.18450 & 1023;
    array = o;
    D.18451 = array->max_length;
    element_size.23 = (unsigned int) element_size;
    D.18453 = D.18451 * element_size.23;
    size = D.18453 + 16;
    D.18454 = descr & 8192;
    if (D.18454 != 0) goto <D.18455>; else goto <D.18456>;
    <D.18455>:
    size = size + 3;
    size = size & 4294967292;
    D.18457 = vtable->klass;
    D.18458 = D.18457->rank;
    D.18459 = (unsigned int) D.18458;
    D.18460 = D.18459 * 8;
    size = D.18460 + size;
    <D.18456>:
    D.18443 = size;
    return D.18443;
  }
  <D.18448>:
  D.18443 = slow_object_get_size (vtable, o);
  return D.18443;
}


slow_object_get_size (struct MonoVTable * vtable, struct MonoObject * o)
{
  struct MonoClass * D.18462;
  guint D.18465;
  int D.18466;
  int D.18467;
  unsigned int D.18468;
  unsigned char D.18469;
  int D.18472;
  unsigned int D.18473;
  unsigned int D.18474;
  unsigned int D.18475;
  struct MonoArrayBounds * D.18476;
  _Bool D.18477;
  long int D.18478;
  long int D.18479;
  unsigned int D.18482;
  unsigned int D.18483;
  int D.18484;
  struct MonoClass * klass;

  klass = vtable->klass;
  D.18462 = mono_defaults.string_class;
  if (D.18462 == klass) goto <D.18463>; else goto <D.18464>;
  <D.18463>:
  D.18466 = MEM[(struct MonoString *)o].length;
  D.18467 = D.18466 * 2;
  D.18468 = (unsigned int) D.18467;
  D.18465 = D.18468 + 14;
  return D.18465;
  <D.18464>:
  D.18469 = klass->rank;
  if (D.18469 != 0) goto <D.18470>; else goto <D.18471>;
  <D.18470>:
  {
    struct MonoArray * array;
    size_t size;

    array = o;
    D.18472 = klass->sizes.element_size;
    D.18473 = (unsigned int) D.18472;
    D.18474 = array->max_length;
    D.18475 = D.18473 * D.18474;
    size = D.18475 + 16;
    D.18476 = array->bounds;
    D.18477 = D.18476 != 0B;
    D.18478 = (long int) D.18477;
    D.18479 = __builtin_expect (D.18478, 0);
    if (D.18479 != 0) goto <D.18480>; else goto <D.18481>;
    <D.18480>:
    size = size + 3;
    size = size & 4294967292;
    D.18469 = klass->rank;
    D.18482 = (unsigned int) D.18469;
    D.18483 = D.18482 * 8;
    size = D.18483 + size;
    <D.18481>:
    D.18465 = size;
    return D.18465;
  }
  <D.18471>:
  D.18484 = klass->instance_size;
  D.18465 = (guint) D.18484;
  return D.18465;
}


alloc_for_promotion (struct MonoVTable * vtable, char * obj, size_t objsize, gboolean has_references)
{
  int promote_age.24;
  char * D.18489;
  void * (*<T2ddb>) (struct MonoVTable *, int, gboolean) D.18490;
  int objsize.25;
  char * D.18492;
  char * D.18493;
  _Bool D.18494;
  long int D.18495;
  long int D.18496;
  char * D.18499;
  char * D.18500;
  char * p;
  int age;

  p = 0B;
  age = get_object_age (obj);
  promote_age.24 = promote_age;
  if (age >= promote_age.24) goto <D.18487>; else goto <D.18488>;
  <D.18487>:
  D.18490 = major_collector.alloc_object;
  objsize.25 = (int) objsize;
  D.18489 = D.18490 (vtable, objsize.25, has_references);
  return D.18489;
  <D.18488>:
  age = age + 1;
  p = age_alloc_buffers[age].next;
  D.18492 = p + objsize;
  D.18493 = age_alloc_buffers[age].end;
  D.18494 = D.18492 <= D.18493;
  D.18495 = (long int) D.18494;
  D.18496 = __builtin_expect (D.18495, 1);
  if (D.18496 != 0) goto <D.18497>; else goto <D.18498>;
  <D.18497>:
  D.18499 = age_alloc_buffers[age].next;
  D.18500 = D.18499 + objsize;
  age_alloc_buffers[age].next = D.18500;
  goto <D.18501>;
  <D.18498>:
  p = alloc_for_promotion_slow_path (age, objsize);
  if (p == 0B) goto <D.18502>; else goto <D.18503>;
  <D.18502>:
  D.18490 = major_collector.alloc_object;
  objsize.25 = (int) objsize;
  D.18489 = D.18490 (vtable, objsize.25, has_references);
  return D.18489;
  <D.18503>:
  <D.18501>:
  MEM[(struct MonoVTable * *)p] = vtable;
  D.18489 = p;
  return D.18489;
}


get_object_age (char * object)
{
  int object.26;
  char * sgen_nursery_start.27;
  int sgen_nursery_start.28;
  int D.18508;
  int D.18509;
  char * region_age.29;
  sizetype idx.30;
  char * D.18512;
  char D.18513;
  int idx;

  object.26 = (int) object;
  sgen_nursery_start.27 = sgen_nursery_start;
  sgen_nursery_start.28 = (int) sgen_nursery_start.27;
  D.18508 = object.26 - sgen_nursery_start.28;
  idx = D.18508 >> 9;
  region_age.29 = region_age;
  idx.30 = (sizetype) idx;
  D.18512 = region_age.29 + idx.30;
  D.18513 = *D.18512;
  D.18509 = (int) D.18513;
  return D.18509;
}


alloc_for_promotion_slow_path (int age, size_t objsize)
{
  unsigned int D.18515;
  unsigned int D.18516;
  unsigned int D.18517;
  unsigned int allocated_size.31;
  char * D.18521;
  char * D.18522;
  char * D.18523;
  char * D.18524;
  char * D.18525;
  char * p;
  size_t allocated_size;
  size_t aligned_objsize;

  try
    {
      D.18515 = objsize + 511;
      aligned_objsize = D.18515 & 4294966784;
      D.18516 = MAX_EXPR <aligned_objsize, 512>;
      D.18517 = MAX_EXPR <aligned_objsize, 4096>;
      p = sgen_fragment_allocator_serial_range_alloc (&collector_allocator, D.18517, D.18516, &allocated_size);
      if (p != 0B) goto <D.18518>; else goto <D.18519>;
      <D.18518>:
      allocated_size.31 = allocated_size;
      D.18521 = p + allocated_size.31;
      set_age_in_range (p, D.18521, age);
      D.18522 = age_alloc_buffers[age].end;
      D.18523 = age_alloc_buffers[age].next;
      sgen_clear_range (D.18523, D.18522);
      D.18524 = p + objsize;
      age_alloc_buffers[age].next = D.18524;
      allocated_size.31 = allocated_size;
      D.18521 = p + allocated_size.31;
      age_alloc_buffers[age].end = D.18521;
      <D.18519>:
      D.18525 = p;
      return D.18525;
    }
  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.18531;
  char * region_age.35;
  sizetype region_idx.36;
  int end.37;
  int D.18535;
  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.18531 = start.32 - sgen_nursery_start.34;
  region_idx = D.18531 >> 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.18535 = end.37 - start.32;
  length = D.18535 >> 9;
  length.38 = (unsigned int) length;
  memset (region_start, age, length.38);
}


memset (void * __dest, int __ch, size_t __len)
{
  int D.18539;
  int D.18544;
  void * D.18546;
  unsigned int D.18547;

  D.18539 = __builtin_constant_p (__len);
  if (D.18539 != 0) goto <D.18540>; else goto <D.18541>;
  <D.18540>:
  if (__len == 0) goto <D.18542>; else goto <D.18543>;
  <D.18542>:
  D.18544 = __builtin_constant_p (__ch);
  if (D.18544 == 0) goto <D.18537>; else goto <D.18545>;
  <D.18545>:
  if (__ch != 0) goto <D.18537>; else goto <D.18538>;
  <D.18537>:
  __warn_memset_zero_len ();
  D.18546 = __dest;
  return D.18546;
  <D.18538>:
  <D.18543>:
  <D.18541>:
  D.18547 = __builtin_object_size (__dest, 0);
  D.18546 = __builtin___memset_chk (__dest, __ch, __len, D.18547);
  return D.18546;
}


par_copy_object_no_checks (char * destination, struct MonoVTable * vt, void * obj, mword objsize, struct SgenGrayQueue * queue)
{
  struct MonoClass * D.18551;
  const char * D.18552;
  const char * D.18553;
  struct MonoVTable * D.18556;
  struct MonoClass * D.18557;
  const char * D.18558;
  struct FILE * gc_debug_file.39;
  unsigned int D.18562;
  const void * D.18563;
  mword * D.18564;
  unsigned int D.18565;
  mword * D.18566;
  unsigned int D.18567;
  mword * D.18568;
  unsigned int D.18569;
  mword * D.18570;
  unsigned int D.18571;
  mword * D.18572;
  unsigned int D.18573;
  mword * D.18574;
  unsigned int D.18575;
  mword * D.18576;
  unsigned int D.18577;
  unsigned int D.18579;
  const void * D.18580;
  void * D.18581;
  int iftmp.40;
  unsigned char D.18587;
  struct MonoArrayBounds * D.18589;
  _Bool D.18591;
  long int D.18592;
  long int D.18593;
  int D.18596;
  int obj.41;
  int D.18598;
  sizetype D.18599;
  struct MonoArrayBounds * D.18600;
  unsigned int D.18603;
  int D.18604;
  <unnamed type> mono_profiler_events.42;
  unsigned int D.18606;
  _Bool D.18607;
  long int D.18608;
  long int D.18609;
  const char * D.18616;
  int iftmp.43;
  struct GrayQueueSection * D.18621;
  int D.18623;
  _Bool D.18624;
  long int D.18625;
  long int D.18626;
  int D.18630;
  int D.18631;
  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.18549>; else goto <D.18550>;
  <D.18549>:
  D.18551 = vt->klass;
  D.18552 = D.18551->name;
  D.18551 = vt->klass;
  D.18553 = D.18551->name_space;
  monoeg_g_log (0B, 4, "vtable %p for class %s:%s was not initialized", vt, D.18553, D.18552);
  <D.17754>:
  goto <D.17754>;
  <D.18550>:
  if (0 != 0) goto <D.18554>; else goto <D.18555>;
  <D.18554>:
  D.18556 = MEM[(struct MonoObject *)obj].vtable;
  D.18557 = D.18556->klass;
  D.18558 = D.18557->name;
  gc_debug_file.39 = gc_debug_file;
  fprintf (gc_debug_file.39, " (to %p, %s size: %lu)\n", destination, D.18558, objsize);
  gc_debug_file.39 = gc_debug_file;
  fflush (gc_debug_file.39);
  <D.18555>:
  if (objsize <= 32) goto <D.18560>; else goto <D.18561>;
  <D.18560>:
  {
    mword * dest;

    dest = destination;
    D.18562 = objsize / 4;
    D.18563 = copy_labels[D.18562];
    goto D.18563;
    LAB_8:
    D.18564 = dest + 28;
    D.18565 = MEM[(mword *)obj + 28B];
    *D.18564 = D.18565;
    LAB_7:
    D.18566 = dest + 24;
    D.18567 = MEM[(mword *)obj + 24B];
    *D.18566 = D.18567;
    LAB_6:
    D.18568 = dest + 20;
    D.18569 = MEM[(mword *)obj + 20B];
    *D.18568 = D.18569;
    LAB_5:
    D.18570 = dest + 16;
    D.18571 = MEM[(mword *)obj + 16B];
    *D.18570 = D.18571;
    LAB_4:
    D.18572 = dest + 12;
    D.18573 = MEM[(mword *)obj + 12B];
    *D.18572 = D.18573;
    LAB_3:
    D.18574 = dest + 8;
    D.18575 = MEM[(mword *)obj + 8B];
    *D.18574 = D.18575;
    LAB_2:
    D.18576 = dest + 4;
    D.18577 = MEM[(mword *)obj + 4B];
    *D.18576 = D.18577;
    LAB_1:
    LAB_0:
  }
  goto <D.18578>;
  <D.18561>:
  D.18579 = objsize + 4294967292;
  D.18580 = obj + 4;
  D.18581 = destination + 4;
  mono_gc_memmove_aligned (D.18581, D.18580, D.18579);
  <D.18578>:
  if (0 != 0) goto <D.18582>; else goto <D.18583>;
  <D.18582>:
  D.18551 = vt->klass;
  D.18552 = D.18551->name;
  D.18551 = vt->klass;
  D.18553 = D.18551->name_space;
  monoeg_g_log (0B, 4, "vtable %p for class %s:%s has no gc descriptor", vt, D.18553, D.18552);
  <D.17756>:
  goto <D.17756>;
  <D.18583>:
  D.18587 = vt->rank;
  if (D.18587 != 0) goto <D.18588>; else goto <D.18585>;
  <D.18588>:
  D.18589 = MEM[(struct MonoArray *)obj].bounds;
  if (D.18589 != 0B) goto <D.18590>; else goto <D.18585>;
  <D.18590>:
  iftmp.40 = 1;
  goto <D.18586>;
  <D.18585>:
  iftmp.40 = 0;
  <D.18586>:
  D.18591 = iftmp.40 != 0;
  D.18592 = (long int) D.18591;
  D.18593 = __builtin_expect (D.18592, 0);
  if (D.18593 != 0) goto <D.18594>; else goto <D.18595>;
  <D.18594>:
  {
    struct MonoArray * array;

    array = destination;
    D.18589 = MEM[(struct MonoArray *)obj].bounds;
    D.18596 = (int) D.18589;
    obj.41 = (int) obj;
    D.18598 = D.18596 - obj.41;
    D.18599 = (sizetype) D.18598;
    D.18600 = destination + D.18599;
    array->bounds = D.18600;
    if (0 != 0) goto <D.18601>; else goto <D.18602>;
    <D.18601>:
    D.18603 = mono_array_length (array);
    D.18587 = vt->rank;
    D.18604 = (int) D.18587;
    gc_debug_file.39 = gc_debug_file;
    fprintf (gc_debug_file.39, "Array instance %p: size: %lu, rank: %d, length: %lu\n", array, objsize, D.18604, D.18603);
    gc_debug_file.39 = gc_debug_file;
    fflush (gc_debug_file.39);
    <D.18602>:
  }
  <D.18595>:
  mono_profiler_events.42 = mono_profiler_events;
  D.18606 = mono_profiler_events.42 & 524288;
  D.18607 = D.18606 != 0;
  D.18608 = (long int) D.18607;
  D.18609 = __builtin_expect (D.18608, 0);
  if (D.18609 != 0) goto <D.18610>; else goto <D.18611>;
  <D.18610>:
  sgen_register_moved_object (obj, destination);
  <D.18611>:
  obj = destination;
  if (queue != 0B) goto <D.18612>; else goto <D.18613>;
  <D.18612>:
  if (0 != 0) goto <D.18614>; else goto <D.18615>;
  <D.18614>:
  D.18616 = sgen_safe_name (obj);
  gc_debug_file.39 = gc_debug_file;
  fprintf (gc_debug_file.39, "Enqueuing gray object %p (%s)\n", obj, D.18616);
  gc_debug_file.39 = gc_debug_file;
  fflush (gc_debug_file.39);
  <D.18615>:
  D.18621 = queue->first;
  if (D.18621 == 0B) goto <D.18618>; else goto <D.18622>;
  <D.18622>:
  D.18621 = queue->first;
  D.18623 = D.18621->end;
  if (D.18623 == 125) goto <D.18618>; else goto <D.18619>;
  <D.18618>:
  iftmp.43 = 1;
  goto <D.18620>;
  <D.18619>:
  iftmp.43 = 0;
  <D.18620>:
  D.18624 = iftmp.43 != 0;
  D.18625 = (long int) D.18624;
  D.18626 = __builtin_expect (D.18625, 0);
  if (D.18626 != 0) goto <D.18627>; else goto <D.18628>;
  <D.18627>:
  sgen_gray_object_enqueue (queue, obj);
  goto <D.18629>;
  <D.18628>:
  D.18621 = queue->first;
  D.18621 = queue->first;
  D.18623 = D.18621->end;
  D.18630 = D.18623;
  D.18631 = D.18630 + 1;
  D.18621->end = D.18631;
  D.18621->objects[D.18630] = obj;
  <D.18629>:
  __builtin_prefetch (obj);
  <D.18613>:
}


sgen_ptr_in_nursery (void * p)
{
  gboolean D.18634;
  int sgen_nursery_bits.45;
  int D.18636;
  int D.18637;
  unsigned int D.18638;
  unsigned int p.46;
  unsigned int D.18640;
  char * sgen_nursery_start.47;
  unsigned int sgen_nursery_start.48;
  _Bool D.18643;

  sgen_nursery_bits.45 = sgen_nursery_bits;
  D.18636 = 1 << sgen_nursery_bits.45;
  D.18637 = -D.18636;
  D.18638 = (unsigned int) D.18637;
  p.46 = (unsigned int) p;
  D.18640 = D.18638 & p.46;
  sgen_nursery_start.47 = sgen_nursery_start;
  sgen_nursery_start.48 = (unsigned int) sgen_nursery_start.47;
  D.18643 = D.18640 == sgen_nursery_start.48;
  D.18634 = (gboolean) D.18643;
  return D.18634;
}


split_nursery_serial_scan_object (char * start, struct SgenGrayQueue * queue)
{
  unsigned int D.18645;
  unsigned int D.18646;
  unsigned int D.18647;
  unsigned int D.18648;
  unsigned int D.18651;
  unsigned int D.18652;
  unsigned int D.18653;
  unsigned int D.18654;
  unsigned int D.18655;
  void * D.18660;
  struct FILE * gc_debug_file.49;
  unsigned int _index.50;
  unsigned int D.18671;
  int D.18672;
  void * D.18677;
  unsigned int _index.51;
  unsigned int D.18681;
  int D.18682;
  unsigned int D.18689;
  unsigned int D.18692;
  int D.18693;
  int desc.52;
  unsigned int D.18697;
  unsigned int el_size.53;
  unsigned int D.18699;
  void * D.18704;
  int D.18710;
  unsigned int offset.54;
  unsigned int D.18712;
  unsigned int i.55;
  unsigned int D.18714;
  void * * D.18715;
  void * D.18720;
  sizetype el_size.56;
  unsigned int D.18727;
  void * D.18734;
  unsigned int D.18737;
  void * D.18744;
  unsigned int D.18747;
  unsigned int D.18748;
  struct MonoVTable * D.18751;
  struct MonoClass * D.18752;
  const char * D.18753;
  const char * D.18754;
  gsize * bitmap_data.57;
  unsigned int D.18756;
  void * D.18763;
  int bwords.58;
  unsigned int D.18767;
  gsize * mbitmap_data.59;
  unsigned int D.18769;
  unsigned int D.18770;
  struct MonoClass * D.18771;
  unsigned int el_size.60;
  unsigned int D.18773;
  const char * D.18776;
  const char * D.18777;
  gsize * bitmap_data.61;
  unsigned int D.18779;
  void * D.18786;
  unsigned int bwords.62;
  sizetype el_size.63;

  {
    struct GCVTable * vt;
    mword desc;

    D.18645 = MEM[(mword *)start];
    D.18646 = D.18645 & 4294967292;
    vt = (struct GCVTable *) D.18646;
    desc = vt->desc;
    D.18647 = desc & 7;
    switch (D.18647) <default: <D.18101>, case 1: <D.18006>, case 2: <D.18015>, case 3: <D.18065>, case 4: <D.18025>, case 5: <D.18058>, case 6: <D.18079>, case 7: <D.18100>>
    <D.18006>:
    D.18648 = desc & 4294901760;
    if (D.18648 != 0) goto <D.18649>; else goto <D.18650>;
    <D.18649>:
    {
      void * * _objptr_end;
      void * * _objptr;

      _objptr = start;
      D.18651 = desc >> 16;
      D.18652 = D.18651 & 255;
      D.18653 = D.18652 * 4;
      _objptr = _objptr + D.18653;
      D.18654 = desc >> 24;
      D.18655 = D.18654 * 4;
      _objptr_end = _objptr + D.18655;
      {
        void * __old;

        __old = *_objptr;
        if (__old != 0B) goto <D.18656>; else goto <D.18657>;
        <D.18656>:
        split_nursery_serial_copy_object_from_obj (_objptr, queue);
        if (0 != 0) goto <D.18658>; else goto <D.18659>;
        <D.18658>:
        D.18660 = *_objptr;
        if (D.18660 != __old) goto <D.18661>; else goto <D.18662>;
        <D.18661>:
        D.18660 = *_objptr;
        gc_debug_file.49 = gc_debug_file;
        fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18660, __old);
        gc_debug_file.49 = gc_debug_file;
        fflush (gc_debug_file.49);
        <D.18662>:
        <D.18659>:
        <D.18657>:
      }
      _objptr = _objptr + 4;
      goto <D.18012>;
      <D.18011>:
      {
        void * __old;

        __old = *_objptr;
        if (__old != 0B) goto <D.18664>; else goto <D.18665>;
        <D.18664>:
        split_nursery_serial_copy_object_from_obj (_objptr, queue);
        if (0 != 0) goto <D.18666>; else goto <D.18667>;
        <D.18666>:
        D.18660 = *_objptr;
        if (D.18660 != __old) goto <D.18668>; else goto <D.18669>;
        <D.18668>:
        D.18660 = *_objptr;
        gc_debug_file.49 = gc_debug_file;
        fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18660, __old);
        gc_debug_file.49 = gc_debug_file;
        fflush (gc_debug_file.49);
        <D.18669>:
        <D.18667>:
        <D.18665>:
      }
      _objptr = _objptr + 4;
      <D.18012>:
      if (_objptr < _objptr_end) goto <D.18011>; else goto <D.18013>;
      <D.18013>:
    }
    <D.18650>:
    goto <D.18014>;
    <D.18015>:
    {
      void * * _objptr;
      gsize _bmap;

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

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

          __old = *_objptr;
          if (__old != 0B) goto <D.18673>; else goto <D.18674>;
          <D.18673>:
          split_nursery_serial_copy_object_from_obj (_objptr, queue);
          if (0 != 0) goto <D.18675>; else goto <D.18676>;
          <D.18675>:
          D.18677 = *_objptr;
          if (D.18677 != __old) goto <D.18678>; else goto <D.18679>;
          <D.18678>:
          D.18677 = *_objptr;
          gc_debug_file.49 = gc_debug_file;
          fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18677, __old);
          gc_debug_file.49 = gc_debug_file;
          fflush (gc_debug_file.49);
          <D.18679>:
          <D.18676>:
          <D.18674>:
        }
        _objptr = _objptr + 4;
      }
      goto <D.18023>;
      <D.18022>:
      {
        int _index;

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

          __old = *_objptr;
          if (__old != 0B) goto <D.18683>; else goto <D.18684>;
          <D.18683>:
          split_nursery_serial_copy_object_from_obj (_objptr, queue);
          if (0 != 0) goto <D.18685>; else goto <D.18686>;
          <D.18685>:
          D.18677 = *_objptr;
          if (D.18677 != __old) goto <D.18687>; else goto <D.18688>;
          <D.18687>:
          D.18677 = *_objptr;
          gc_debug_file.49 = gc_debug_file;
          fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18677, __old);
          gc_debug_file.49 = gc_debug_file;
          fflush (gc_debug_file.49);
          <D.18688>:
          <D.18686>:
          <D.18684>:
        }
        _objptr = _objptr + 4;
      }
      <D.18023>:
      if (_bmap != 0) goto <D.18022>; else goto <D.18024>;
      <D.18024>:
    }
    goto <D.18014>;
    <D.18025>:
    D.18689 = desc & 4294950912;
    if (D.18689 != 0) goto <D.18690>; else goto <D.18691>;
    <D.18690>:
    {
      int el_size;
      int etype;

      D.18692 = desc >> 3;
      D.18693 = (int) D.18692;
      el_size = D.18693 & 1023;
      desc.52 = (int) desc;
      etype = desc.52 & 49152;
      if (etype == 16384) goto <D.18695>; else goto <D.18696>;
      <D.18695>:
      {
        void * * p;
        void * * end_refs;

        p = start + 16;
        D.18697 = MEM[(struct MonoArray *)start].max_length;
        el_size.53 = (unsigned int) el_size;
        D.18699 = D.18697 * el_size.53;
        end_refs = p + D.18699;
        goto <D.18032>;
        <D.18031>:
        {
          void * __old;

          __old = *p;
          if (__old != 0B) goto <D.18700>; else goto <D.18701>;
          <D.18700>:
          split_nursery_serial_copy_object_from_obj (p, queue);
          if (0 != 0) goto <D.18702>; else goto <D.18703>;
          <D.18702>:
          D.18704 = *p;
          if (D.18704 != __old) goto <D.18705>; else goto <D.18706>;
          <D.18705>:
          D.18704 = *p;
          gc_debug_file.49 = gc_debug_file;
          fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", p, D.18704, __old);
          gc_debug_file.49 = gc_debug_file;
          fflush (gc_debug_file.49);
          <D.18706>:
          <D.18703>:
          <D.18701>:
        }
        p = p + 4;
        <D.18032>:
        if (p < end_refs) goto <D.18031>; else goto <D.18033>;
        <D.18033>:
      }
      goto <D.18707>;
      <D.18696>:
      if (etype == 32768) goto <D.18708>; else goto <D.18709>;
      <D.18708>:
      {
        int offset;
        int num_refs;
        char * e_start;
        char * e_end;

        D.18651 = desc >> 16;
        D.18710 = (int) D.18651;
        offset = D.18710 & 255;
        D.18654 = desc >> 24;
        num_refs = (int) D.18654;
        e_start = start + 16;
        D.18697 = MEM[(struct MonoArray *)start].max_length;
        el_size.53 = (unsigned int) el_size;
        D.18699 = D.18697 * el_size.53;
        e_end = e_start + D.18699;
        goto <D.18045>;
        <D.18044>:
        {
          void * * p;
          int i;

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

            i.55 = (unsigned int) i;
            D.18714 = i.55 * 4;
            D.18715 = p + D.18714;
            __old = *D.18715;
            if (__old != 0B) goto <D.18716>; else goto <D.18717>;
            <D.18716>:
            i.55 = (unsigned int) i;
            D.18714 = i.55 * 4;
            D.18715 = p + D.18714;
            split_nursery_serial_copy_object_from_obj (D.18715, queue);
            if (0 != 0) goto <D.18718>; else goto <D.18719>;
            <D.18718>:
            i.55 = (unsigned int) i;
            D.18714 = i.55 * 4;
            D.18715 = p + D.18714;
            D.18720 = *D.18715;
            if (D.18720 != __old) goto <D.18721>; else goto <D.18722>;
            <D.18721>:
            i.55 = (unsigned int) i;
            D.18714 = i.55 * 4;
            D.18715 = p + D.18714;
            D.18720 = *D.18715;
            i.55 = (unsigned int) i;
            D.18714 = i.55 * 4;
            D.18715 = p + D.18714;
            gc_debug_file.49 = gc_debug_file;
            fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", D.18715, D.18720, __old);
            gc_debug_file.49 = gc_debug_file;
            fflush (gc_debug_file.49);
            <D.18722>:
            <D.18719>:
            <D.18717>:
          }
          i = i + 1;
          <D.18042>:
          if (i < num_refs) goto <D.18041>; else goto <D.18043>;
          <D.18043>:
          el_size.56 = (sizetype) el_size;
          e_start = e_start + el_size.56;
        }
        <D.18045>:
        if (e_start < e_end) goto <D.18044>; else goto <D.18046>;
        <D.18046>:
      }
      goto <D.18724>;
      <D.18709>:
      if (etype == 49152) goto <D.18725>; else goto <D.18726>;
      <D.18725>:
      {
        char * e_start;
        char * e_end;

        e_start = start + 16;
        D.18697 = MEM[(struct MonoArray *)start].max_length;
        el_size.53 = (unsigned int) el_size;
        D.18699 = D.18697 * el_size.53;
        e_end = e_start + D.18699;
        goto <D.18056>;
        <D.18055>:
        {
          void * * p;
          gsize _bmap;

          p = e_start;
          _bmap = desc >> 16;
          goto <D.18053>;
          <D.18052>:
          D.18727 = _bmap & 1;
          if (D.18727 != 0) goto <D.18728>; else goto <D.18729>;
          <D.18728>:
          {
            void * __old;

            __old = *p;
            if (__old != 0B) goto <D.18730>; else goto <D.18731>;
            <D.18730>:
            split_nursery_serial_copy_object_from_obj (p, queue);
            if (0 != 0) goto <D.18732>; else goto <D.18733>;
            <D.18732>:
            D.18734 = *p;
            if (D.18734 != __old) goto <D.18735>; else goto <D.18736>;
            <D.18735>:
            D.18734 = *p;
            gc_debug_file.49 = gc_debug_file;
            fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", p, D.18734, __old);
            gc_debug_file.49 = gc_debug_file;
            fflush (gc_debug_file.49);
            <D.18736>:
            <D.18733>:
            <D.18731>:
          }
          <D.18729>:
          _bmap = _bmap >> 1;
          p = p + 4;
          <D.18053>:
          if (_bmap != 0) goto <D.18052>; else goto <D.18054>;
          <D.18054>:
          el_size.56 = (sizetype) el_size;
          e_start = e_start + el_size.56;
        }
        <D.18056>:
        if (e_start < e_end) goto <D.18055>; else goto <D.18057>;
        <D.18057>:
      }
      <D.18726>:
      <D.18724>:
      <D.18707>:
    }
    <D.18691>:
    goto <D.18014>;
    <D.18058>:
    {
      void * * _objptr;
      gsize _bmap;

      _objptr = start;
      _bmap = desc >> 3;
      _objptr = _objptr + 8;
      goto <D.18063>;
      <D.18062>:
      D.18737 = _bmap & 1;
      if (D.18737 != 0) goto <D.18738>; else goto <D.18739>;
      <D.18738>:
      {
        void * __old;

        __old = *_objptr;
        if (__old != 0B) goto <D.18740>; else goto <D.18741>;
        <D.18740>:
        split_nursery_serial_copy_object_from_obj (_objptr, queue);
        if (0 != 0) goto <D.18742>; else goto <D.18743>;
        <D.18742>:
        D.18744 = *_objptr;
        if (D.18744 != __old) goto <D.18745>; else goto <D.18746>;
        <D.18745>:
        D.18744 = *_objptr;
        gc_debug_file.49 = gc_debug_file;
        fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18744, __old);
        gc_debug_file.49 = gc_debug_file;
        fflush (gc_debug_file.49);
        <D.18746>:
        <D.18743>:
        <D.18741>:
      }
      <D.18739>:
      _bmap = _bmap >> 1;
      _objptr = _objptr + 4;
      <D.18063>:
      if (_bmap != 0) goto <D.18062>; else goto <D.18064>;
      <D.18064>:
    }
    goto <D.18014>;
    <D.18065>:
    {
      void * * _objptr;
      gsize * bitmap_data;
      int bwords;
      void * * start_run;

      _objptr = start;
      bitmap_data = sgen_get_complex_descriptor (desc);
      D.18747 = *bitmap_data;
      D.18748 = D.18747 + 4294967295;
      bwords = (int) D.18748;
      start_run = _objptr;
      bitmap_data = bitmap_data + 4;
      if (0 != 0) goto <D.18749>; else goto <D.18750>;
      <D.18749>:
      {
        struct MonoObject * myobj;

        myobj = start;
        D.18751 = myobj->vtable;
        D.18752 = D.18751->klass;
        D.18753 = D.18752->name;
        D.18751 = myobj->vtable;
        D.18752 = D.18751->klass;
        D.18754 = D.18752->name_space;
        monoeg_g_print ("found %d at %p (0x%zx): %s.%s\n", bwords, start, desc, D.18754, D.18753);
      }
      <D.18750>:
      goto <D.18077>;
      <D.18076>:
      {
        gsize _bmap;

        bitmap_data.57 = bitmap_data;
        bitmap_data = bitmap_data.57 + 4;
        _bmap = *bitmap_data.57;
        _objptr = start_run;
        goto <D.18074>;
        <D.18073>:
        D.18756 = _bmap & 1;
        if (D.18756 != 0) goto <D.18757>; else goto <D.18758>;
        <D.18757>:
        {
          void * __old;

          __old = *_objptr;
          if (__old != 0B) goto <D.18759>; else goto <D.18760>;
          <D.18759>:
          split_nursery_serial_copy_object_from_obj (_objptr, queue);
          if (0 != 0) goto <D.18761>; else goto <D.18762>;
          <D.18761>:
          D.18763 = *_objptr;
          if (D.18763 != __old) goto <D.18764>; else goto <D.18765>;
          <D.18764>:
          D.18763 = *_objptr;
          gc_debug_file.49 = gc_debug_file;
          fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18763, __old);
          gc_debug_file.49 = gc_debug_file;
          fflush (gc_debug_file.49);
          <D.18765>:
          <D.18762>:
          <D.18760>:
        }
        <D.18758>:
        _bmap = _bmap >> 1;
        _objptr = _objptr + 4;
        <D.18074>:
        if (_bmap != 0) goto <D.18073>; else goto <D.18075>;
        <D.18075>:
        start_run = start_run + 128;
      }
      <D.18077>:
      bwords.58 = bwords;
      bwords = bwords.58 + -1;
      if (bwords.58 > 0) goto <D.18076>; else goto <D.18078>;
      <D.18078>:
    }
    goto <D.18014>;
    <D.18079>:
    {
      gsize * mbitmap_data;
      int mbwords;
      int el_size;
      char * e_start;
      char * e_end;

      D.18767 = vt->desc;
      mbitmap_data = sgen_get_complex_descriptor (D.18767);
      mbitmap_data.59 = mbitmap_data;
      mbitmap_data = mbitmap_data.59 + 4;
      D.18769 = *mbitmap_data.59;
      D.18770 = D.18769 + 4294967295;
      mbwords = (int) D.18770;
      D.18771 = vt->klass;
      el_size = mono_array_element_size (D.18771);
      e_start = start + 16;
      D.18697 = MEM[(struct MonoArray *)start].max_length;
      el_size.60 = (unsigned int) el_size;
      D.18773 = D.18697 * el_size.60;
      e_end = e_start + D.18773;
      if (0 != 0) goto <D.18774>; else goto <D.18775>;
      <D.18774>:
      D.18771 = vt->klass;
      D.18776 = D.18771->name;
      D.18771 = vt->klass;
      D.18777 = D.18771->name_space;
      D.18767 = vt->desc;
      monoeg_g_print ("found %d at %p (0x%zx): %s.%s\n", mbwords, start, D.18767, D.18777, D.18776);
      <D.18775>:
      goto <D.18098>;
      <D.18097>:
      {
        void * * _objptr;
        gsize * bitmap_data;
        unsigned int bwords;

        _objptr = e_start;
        bitmap_data = mbitmap_data;
        bwords = (unsigned int) mbwords;
        goto <D.18095>;
        <D.18094>:
        {
          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.18092>;
          <D.18091>:
          D.18779 = _bmap & 1;
          if (D.18779 != 0) goto <D.18780>; else goto <D.18781>;
          <D.18780>:
          {
            void * __old;

            __old = *_objptr;
            if (__old != 0B) goto <D.18782>; else goto <D.18783>;
            <D.18782>:
            split_nursery_serial_copy_object_from_obj (_objptr, queue);
            if (0 != 0) goto <D.18784>; else goto <D.18785>;
            <D.18784>:
            D.18786 = *_objptr;
            if (D.18786 != __old) goto <D.18787>; else goto <D.18788>;
            <D.18787>:
            D.18786 = *_objptr;
            gc_debug_file.49 = gc_debug_file;
            fprintf (gc_debug_file.49, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18786, __old);
            gc_debug_file.49 = gc_debug_file;
            fflush (gc_debug_file.49);
            <D.18788>:
            <D.18785>:
            <D.18783>:
          }
          <D.18781>:
          _bmap = _bmap >> 1;
          _objptr = _objptr + 4;
          <D.18092>:
          if (_bmap != 0) goto <D.18091>; else goto <D.18093>;
          <D.18093>:
          _objptr = start_run + 128;
        }
        <D.18095>:
        bwords.62 = bwords;
        bwords = bwords.62 + 4294967295;
        if (bwords.62 != 0) goto <D.18094>; else goto <D.18096>;
        <D.18096>:
        el_size.63 = (sizetype) el_size;
        e_start = e_start + el_size.63;
      }
      <D.18098>:
      if (e_start < e_end) goto <D.18097>; else goto <D.18099>;
      <D.18099>:
    }
    goto <D.18014>;
    <D.18100>:
    goto <D.18014>;
    <D.18101>:
    monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-scan-object.h", 111);
    <D.18014>:
  }
}


split_nursery_parallel_scan_vtype (char * start, mword desc, struct SgenGrayQueue * queue)
{
  unsigned int D.18792;
  unsigned int D.18793;
  unsigned int D.18796;
  unsigned int D.18797;
  unsigned int D.18798;
  unsigned int D.18799;
  unsigned int D.18800;
  void * D.18807;
  struct FILE * gc_debug_file.64;
  int iftmp.65;
  int D.18812;
  int D.18814;
  _Bool D.18816;
  long int D.18817;
  long int D.18818;
  int iftmp.66;
  int D.18830;
  int D.18832;
  _Bool D.18834;
  long int D.18835;
  long int D.18836;
  unsigned int _index.67;
  unsigned int D.18840;
  int D.18841;
  void * D.18848;
  int iftmp.68;
  int D.18852;
  int D.18854;
  _Bool D.18856;
  long int D.18857;
  long int D.18858;
  unsigned int _index.69;
  unsigned int D.18862;
  int D.18863;
  int iftmp.70;
  int D.18873;
  int D.18875;
  _Bool D.18877;
  long int D.18878;
  long int D.18879;
  unsigned int D.18882;
  unsigned int D.18885;
  int D.18886;
  int desc.71;
  unsigned int D.18890;
  unsigned int el_size.72;
  unsigned int D.18892;
  void * D.18899;
  int iftmp.73;
  int D.18903;
  int D.18905;
  _Bool D.18907;
  long int D.18908;
  long int D.18909;
  int D.18915;
  unsigned int offset.74;
  unsigned int D.18917;
  unsigned int i.75;
  unsigned int D.18919;
  void * * D.18920;
  void * D.18927;
  int iftmp.76;
  int D.18931;
  void * D.18933;
  int D.18934;
  _Bool D.18936;
  long int D.18937;
  long int D.18938;
  void * D.18941;
  sizetype el_size.77;
  unsigned int D.18946;
  void * D.18955;
  int iftmp.78;
  int D.18959;
  int D.18961;
  _Bool D.18963;
  long int D.18964;
  long int D.18965;
  unsigned int D.18968;
  void * D.18977;
  int iftmp.79;
  int D.18981;
  int D.18983;
  _Bool D.18985;
  long int D.18986;
  long int D.18987;
  unsigned int D.18990;
  unsigned int D.18991;
  struct MonoVTable * D.18994;
  struct MonoClass * D.18995;
  const char * D.18996;
  const char * D.18997;
  gsize * bitmap_data.80;
  unsigned int D.18999;
  void * D.19008;
  int iftmp.81;
  int D.19012;
  int D.19014;
  _Bool D.19016;
  long int D.19017;
  long int D.19018;
  int bwords.82;

  start = start + 4294967288;
  D.18792 = desc & 7;
  switch (D.18792) <default: <D.17999>, case 1: <D.17916>, case 2: <D.17927>, case 3: <D.17983>, case 4: <D.17939>, case 5: <D.17975>, case 7: <D.17998>>
  <D.17916>:
  D.18793 = desc & 4294901760;
  if (D.18793 != 0) goto <D.18794>; else goto <D.18795>;
  <D.18794>:
  {
    void * * _objptr_end;
    void * * _objptr;

    _objptr = start;
    D.18796 = desc >> 16;
    D.18797 = D.18796 & 255;
    D.18798 = D.18797 * 4;
    _objptr = _objptr + D.18798;
    D.18799 = desc >> 24;
    D.18800 = D.18799 * 4;
    _objptr_end = _objptr + D.18800;
    {
      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>:
      D.18807 = *_objptr;
      gc_debug_file.64 = gc_debug_file;
      fprintf (gc_debug_file.64, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18807, __old);
      gc_debug_file.64 = gc_debug_file;
      fflush (gc_debug_file.64);
      <D.18806>:
      <D.18804>:
      D.18812 = sgen_ptr_in_nursery (__copy);
      if (D.18812 != 0) goto <D.18813>; else goto <D.18810>;
      <D.18813>:
      D.18814 = sgen_ptr_in_nursery (_objptr);
      if (D.18814 == 0) goto <D.18815>; else goto <D.18810>;
      <D.18815>:
      iftmp.65 = 1;
      goto <D.18811>;
      <D.18810>:
      iftmp.65 = 0;
      <D.18811>:
      D.18816 = iftmp.65 != 0;
      D.18817 = (long int) D.18816;
      D.18818 = __builtin_expect (D.18817, 0);
      if (D.18818 != 0) goto <D.18819>; else goto <D.18820>;
      <D.18819>:
      sgen_add_to_global_remset (_objptr, __copy);
      <D.18820>:
      <D.18802>:
    }
    _objptr = _objptr + 4;
    goto <D.17924>;
    <D.17923>:
    {
      void * __old;
      void * __copy;

      __old = *_objptr;
      if (__old != 0B) goto <D.18821>; else goto <D.18822>;
      <D.18821>:
      split_nursery_parallel_copy_object (_objptr, queue);
      __copy = *_objptr;
      if (0 != 0) goto <D.18823>; else goto <D.18824>;
      <D.18823>:
      if (__old != __copy) goto <D.18825>; else goto <D.18826>;
      <D.18825>:
      D.18807 = *_objptr;
      gc_debug_file.64 = gc_debug_file;
      fprintf (gc_debug_file.64, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18807, __old);
      gc_debug_file.64 = gc_debug_file;
      fflush (gc_debug_file.64);
      <D.18826>:
      <D.18824>:
      D.18830 = sgen_ptr_in_nursery (__copy);
      if (D.18830 != 0) goto <D.18831>; else goto <D.18828>;
      <D.18831>:
      D.18832 = sgen_ptr_in_nursery (_objptr);
      if (D.18832 == 0) goto <D.18833>; else goto <D.18828>;
      <D.18833>:
      iftmp.66 = 1;
      goto <D.18829>;
      <D.18828>:
      iftmp.66 = 0;
      <D.18829>:
      D.18834 = iftmp.66 != 0;
      D.18835 = (long int) D.18834;
      D.18836 = __builtin_expect (D.18835, 0);
      if (D.18836 != 0) goto <D.18837>; else goto <D.18838>;
      <D.18837>:
      sgen_add_to_global_remset (_objptr, __copy);
      <D.18838>:
      <D.18822>:
    }
    _objptr = _objptr + 4;
    <D.17924>:
    if (_objptr < _objptr_end) goto <D.17923>; else goto <D.17925>;
    <D.17925>:
  }
  <D.18795>:
  goto <D.17926>;
  <D.17927>:
  {
    void * * _objptr;
    gsize _bmap;

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

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

        __old = *_objptr;
        if (__old != 0B) goto <D.18842>; else goto <D.18843>;
        <D.18842>:
        split_nursery_parallel_copy_object (_objptr, queue);
        __copy = *_objptr;
        if (0 != 0) goto <D.18844>; else goto <D.18845>;
        <D.18844>:
        if (__old != __copy) goto <D.18846>; else goto <D.18847>;
        <D.18846>:
        D.18848 = *_objptr;
        gc_debug_file.64 = gc_debug_file;
        fprintf (gc_debug_file.64, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18848, __old);
        gc_debug_file.64 = gc_debug_file;
        fflush (gc_debug_file.64);
        <D.18847>:
        <D.18845>:
        D.18852 = sgen_ptr_in_nursery (__copy);
        if (D.18852 != 0) goto <D.18853>; else goto <D.18850>;
        <D.18853>:
        D.18854 = sgen_ptr_in_nursery (_objptr);
        if (D.18854 == 0) goto <D.18855>; else goto <D.18850>;
        <D.18855>:
        iftmp.68 = 1;
        goto <D.18851>;
        <D.18850>:
        iftmp.68 = 0;
        <D.18851>:
        D.18856 = iftmp.68 != 0;
        D.18857 = (long int) D.18856;
        D.18858 = __builtin_expect (D.18857, 0);
        if (D.18858 != 0) goto <D.18859>; else goto <D.18860>;
        <D.18859>:
        sgen_add_to_global_remset (_objptr, __copy);
        <D.18860>:
        <D.18843>:
      }
      _objptr = _objptr + 4;
    }
    goto <D.17937>;
    <D.17936>:
    {
      int _index;

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

        __old = *_objptr;
        if (__old != 0B) goto <D.18864>; else goto <D.18865>;
        <D.18864>:
        split_nursery_parallel_copy_object (_objptr, queue);
        __copy = *_objptr;
        if (0 != 0) goto <D.18866>; else goto <D.18867>;
        <D.18866>:
        if (__old != __copy) goto <D.18868>; else goto <D.18869>;
        <D.18868>:
        D.18848 = *_objptr;
        gc_debug_file.64 = gc_debug_file;
        fprintf (gc_debug_file.64, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18848, __old);
        gc_debug_file.64 = gc_debug_file;
        fflush (gc_debug_file.64);
        <D.18869>:
        <D.18867>:
        D.18873 = sgen_ptr_in_nursery (__copy);
        if (D.18873 != 0) goto <D.18874>; else goto <D.18871>;
        <D.18874>:
        D.18875 = sgen_ptr_in_nursery (_objptr);
        if (D.18875 == 0) goto <D.18876>; else goto <D.18871>;
        <D.18876>:
        iftmp.70 = 1;
        goto <D.18872>;
        <D.18871>:
        iftmp.70 = 0;
        <D.18872>:
        D.18877 = iftmp.70 != 0;
        D.18878 = (long int) D.18877;
        D.18879 = __builtin_expect (D.18878, 0);
        if (D.18879 != 0) goto <D.18880>; else goto <D.18881>;
        <D.18880>:
        sgen_add_to_global_remset (_objptr, __copy);
        <D.18881>:
        <D.18865>:
      }
      _objptr = _objptr + 4;
    }
    <D.17937>:
    if (_bmap != 0) goto <D.17936>; else goto <D.17938>;
    <D.17938>:
  }
  goto <D.17926>;
  <D.17939>:
  D.18882 = desc & 4294950912;
  if (D.18882 != 0) goto <D.18883>; else goto <D.18884>;
  <D.18883>:
  {
    int el_size;
    int etype;

    D.18885 = desc >> 3;
    D.18886 = (int) D.18885;
    el_size = D.18886 & 1023;
    desc.71 = (int) desc;
    etype = desc.71 & 49152;
    if (etype == 16384) goto <D.18888>; else goto <D.18889>;
    <D.18888>:
    {
      void * * p;
      void * * end_refs;

      p = start + 16;
      D.18890 = MEM[(struct MonoArray *)start].max_length;
      el_size.72 = (unsigned int) el_size;
      D.18892 = D.18890 * el_size.72;
      end_refs = p + D.18892;
      goto <D.17947>;
      <D.17946>:
      {
        void * __old;
        void * __copy;

        __old = *p;
        if (__old != 0B) goto <D.18893>; else goto <D.18894>;
        <D.18893>:
        split_nursery_parallel_copy_object (p, queue);
        __copy = *p;
        if (0 != 0) goto <D.18895>; else goto <D.18896>;
        <D.18895>:
        if (__old != __copy) goto <D.18897>; else goto <D.18898>;
        <D.18897>:
        D.18899 = *p;
        gc_debug_file.64 = gc_debug_file;
        fprintf (gc_debug_file.64, "Overwrote field at %p with %p (was: %p)\n", p, D.18899, __old);
        gc_debug_file.64 = gc_debug_file;
        fflush (gc_debug_file.64);
        <D.18898>:
        <D.18896>:
        D.18903 = sgen_ptr_in_nursery (__copy);
        if (D.18903 != 0) goto <D.18904>; else goto <D.18901>;
        <D.18904>:
        D.18905 = sgen_ptr_in_nursery (p);
        if (D.18905 == 0) goto <D.18906>; else goto <D.18901>;
        <D.18906>:
        iftmp.73 = 1;
        goto <D.18902>;
        <D.18901>:
        iftmp.73 = 0;
        <D.18902>:
        D.18907 = iftmp.73 != 0;
        D.18908 = (long int) D.18907;
        D.18909 = __builtin_expect (D.18908, 0);
        if (D.18909 != 0) goto <D.18910>; else goto <D.18911>;
        <D.18910>:
        sgen_add_to_global_remset (p, __copy);
        <D.18911>:
        <D.18894>:
      }
      p = p + 4;
      <D.17947>:
      if (p < end_refs) goto <D.17946>; else goto <D.17948>;
      <D.17948>:
    }
    goto <D.18912>;
    <D.18889>:
    if (etype == 32768) goto <D.18913>; else goto <D.18914>;
    <D.18913>:
    {
      int offset;
      int num_refs;
      char * e_start;
      char * e_end;

      D.18796 = desc >> 16;
      D.18915 = (int) D.18796;
      offset = D.18915 & 255;
      D.18799 = desc >> 24;
      num_refs = (int) D.18799;
      e_start = start + 16;
      D.18890 = MEM[(struct MonoArray *)start].max_length;
      el_size.72 = (unsigned int) el_size;
      D.18892 = D.18890 * el_size.72;
      e_end = e_start + D.18892;
      goto <D.17961>;
      <D.17960>:
      {
        void * * p;
        int i;

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

          i.75 = (unsigned int) i;
          D.18919 = i.75 * 4;
          D.18920 = p + D.18919;
          __old = *D.18920;
          if (__old != 0B) goto <D.18921>; else goto <D.18922>;
          <D.18921>:
          i.75 = (unsigned int) i;
          D.18919 = i.75 * 4;
          D.18920 = p + D.18919;
          split_nursery_parallel_copy_object (D.18920, queue);
          i.75 = (unsigned int) i;
          D.18919 = i.75 * 4;
          D.18920 = p + D.18919;
          __copy = *D.18920;
          if (0 != 0) goto <D.18923>; else goto <D.18924>;
          <D.18923>:
          if (__old != __copy) goto <D.18925>; else goto <D.18926>;
          <D.18925>:
          i.75 = (unsigned int) i;
          D.18919 = i.75 * 4;
          D.18920 = p + D.18919;
          D.18927 = *D.18920;
          i.75 = (unsigned int) i;
          D.18919 = i.75 * 4;
          D.18920 = p + D.18919;
          gc_debug_file.64 = gc_debug_file;
          fprintf (gc_debug_file.64, "Overwrote field at %p with %p (was: %p)\n", D.18920, D.18927, __old);
          gc_debug_file.64 = gc_debug_file;
          fflush (gc_debug_file.64);
          <D.18926>:
          <D.18924>:
          D.18931 = sgen_ptr_in_nursery (__copy);
          if (D.18931 != 0) goto <D.18932>; else goto <D.18929>;
          <D.18932>:
          i.75 = (unsigned int) i;
          D.18919 = i.75 * 4;
          D.18933 = p + D.18919;
          D.18934 = sgen_ptr_in_nursery (D.18933);
          if (D.18934 == 0) goto <D.18935>; else goto <D.18929>;
          <D.18935>:
          iftmp.76 = 1;
          goto <D.18930>;
          <D.18929>:
          iftmp.76 = 0;
          <D.18930>:
          D.18936 = iftmp.76 != 0;
          D.18937 = (long int) D.18936;
          D.18938 = __builtin_expect (D.18937, 0);
          if (D.18938 != 0) goto <D.18939>; else goto <D.18940>;
          <D.18939>:
          i.75 = (unsigned int) i;
          D.18919 = i.75 * 4;
          D.18941 = p + D.18919;
          sgen_add_to_global_remset (D.18941, __copy);
          <D.18940>:
          <D.18922>:
        }
        i = i + 1;
        <D.17958>:
        if (i < num_refs) goto <D.17957>; else goto <D.17959>;
        <D.17959>:
        el_size.77 = (sizetype) el_size;
        e_start = e_start + el_size.77;
      }
      <D.17961>:
      if (e_start < e_end) goto <D.17960>; else goto <D.17962>;
      <D.17962>:
    }
    goto <D.18943>;
    <D.18914>:
    if (etype == 49152) goto <D.18944>; else goto <D.18945>;
    <D.18944>:
    {
      char * e_start;
      char * e_end;

      e_start = start + 16;
      D.18890 = MEM[(struct MonoArray *)start].max_length;
      el_size.72 = (unsigned int) el_size;
      D.18892 = D.18890 * el_size.72;
      e_end = e_start + D.18892;
      goto <D.17973>;
      <D.17972>:
      {
        void * * p;
        gsize _bmap;

        p = e_start;
        _bmap = desc >> 16;
        goto <D.17970>;
        <D.17969>:
        D.18946 = _bmap & 1;
        if (D.18946 != 0) goto <D.18947>; else goto <D.18948>;
        <D.18947>:
        {
          void * __old;
          void * __copy;

          __old = *p;
          if (__old != 0B) goto <D.18949>; else goto <D.18950>;
          <D.18949>:
          split_nursery_parallel_copy_object (p, queue);
          __copy = *p;
          if (0 != 0) goto <D.18951>; else goto <D.18952>;
          <D.18951>:
          if (__old != __copy) goto <D.18953>; else goto <D.18954>;
          <D.18953>:
          D.18955 = *p;
          gc_debug_file.64 = gc_debug_file;
          fprintf (gc_debug_file.64, "Overwrote field at %p with %p (was: %p)\n", p, D.18955, __old);
          gc_debug_file.64 = gc_debug_file;
          fflush (gc_debug_file.64);
          <D.18954>:
          <D.18952>:
          D.18959 = sgen_ptr_in_nursery (__copy);
          if (D.18959 != 0) goto <D.18960>; else goto <D.18957>;
          <D.18960>:
          D.18961 = sgen_ptr_in_nursery (p);
          if (D.18961 == 0) goto <D.18962>; else goto <D.18957>;
          <D.18962>:
          iftmp.78 = 1;
          goto <D.18958>;
          <D.18957>:
          iftmp.78 = 0;
          <D.18958>:
          D.18963 = iftmp.78 != 0;
          D.18964 = (long int) D.18963;
          D.18965 = __builtin_expect (D.18964, 0);
          if (D.18965 != 0) goto <D.18966>; else goto <D.18967>;
          <D.18966>:
          sgen_add_to_global_remset (p, __copy);
          <D.18967>:
          <D.18950>:
        }
        <D.18948>:
        _bmap = _bmap >> 1;
        p = p + 4;
        <D.17970>:
        if (_bmap != 0) goto <D.17969>; else goto <D.17971>;
        <D.17971>:
        el_size.77 = (sizetype) el_size;
        e_start = e_start + el_size.77;
      }
      <D.17973>:
      if (e_start < e_end) goto <D.17972>; else goto <D.17974>;
      <D.17974>:
    }
    <D.18945>:
    <D.18943>:
    <D.18912>:
  }
  <D.18884>:
  goto <D.17926>;
  <D.17975>:
  {
    void * * _objptr;
    gsize _bmap;

    _objptr = start;
    _bmap = desc >> 3;
    _objptr = _objptr + 8;
    goto <D.17981>;
    <D.17980>:
    D.18968 = _bmap & 1;
    if (D.18968 != 0) goto <D.18969>; else goto <D.18970>;
    <D.18969>:
    {
      void * __old;
      void * __copy;

      __old = *_objptr;
      if (__old != 0B) goto <D.18971>; else goto <D.18972>;
      <D.18971>:
      split_nursery_parallel_copy_object (_objptr, queue);
      __copy = *_objptr;
      if (0 != 0) goto <D.18973>; else goto <D.18974>;
      <D.18973>:
      if (__old != __copy) goto <D.18975>; else goto <D.18976>;
      <D.18975>:
      D.18977 = *_objptr;
      gc_debug_file.64 = gc_debug_file;
      fprintf (gc_debug_file.64, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.18977, __old);
      gc_debug_file.64 = gc_debug_file;
      fflush (gc_debug_file.64);
      <D.18976>:
      <D.18974>:
      D.18981 = sgen_ptr_in_nursery (__copy);
      if (D.18981 != 0) goto <D.18982>; else goto <D.18979>;
      <D.18982>:
      D.18983 = sgen_ptr_in_nursery (_objptr);
      if (D.18983 == 0) goto <D.18984>; else goto <D.18979>;
      <D.18984>:
      iftmp.79 = 1;
      goto <D.18980>;
      <D.18979>:
      iftmp.79 = 0;
      <D.18980>:
      D.18985 = iftmp.79 != 0;
      D.18986 = (long int) D.18985;
      D.18987 = __builtin_expect (D.18986, 0);
      if (D.18987 != 0) goto <D.18988>; else goto <D.18989>;
      <D.18988>:
      sgen_add_to_global_remset (_objptr, __copy);
      <D.18989>:
      <D.18972>:
    }
    <D.18970>:
    _bmap = _bmap >> 1;
    _objptr = _objptr + 4;
    <D.17981>:
    if (_bmap != 0) goto <D.17980>; else goto <D.17982>;
    <D.17982>:
  }
  goto <D.17926>;
  <D.17983>:
  {
    void * * _objptr;
    gsize * bitmap_data;
    int bwords;
    void * * start_run;

    _objptr = start;
    bitmap_data = sgen_get_complex_descriptor (desc);
    D.18990 = *bitmap_data;
    D.18991 = D.18990 + 4294967295;
    bwords = (int) D.18991;
    start_run = _objptr;
    bitmap_data = bitmap_data + 4;
    if (0 != 0) goto <D.18992>; else goto <D.18993>;
    <D.18992>:
    {
      struct MonoObject * myobj;

      myobj = start;
      D.18994 = myobj->vtable;
      D.18995 = D.18994->klass;
      D.18996 = D.18995->name;
      D.18994 = myobj->vtable;
      D.18995 = D.18994->klass;
      D.18997 = D.18995->name_space;
      monoeg_g_print ("found %d at %p (0x%zx): %s.%s\n", bwords, start, desc, D.18997, D.18996);
    }
    <D.18993>:
    goto <D.17996>;
    <D.17995>:
    {
      gsize _bmap;

      bitmap_data.80 = bitmap_data;
      bitmap_data = bitmap_data.80 + 4;
      _bmap = *bitmap_data.80;
      _objptr = start_run;
      goto <D.17993>;
      <D.17992>:
      D.18999 = _bmap & 1;
      if (D.18999 != 0) goto <D.19000>; else goto <D.19001>;
      <D.19000>:
      {
        void * __old;
        void * __copy;

        __old = *_objptr;
        if (__old != 0B) goto <D.19002>; else goto <D.19003>;
        <D.19002>:
        split_nursery_parallel_copy_object (_objptr, queue);
        __copy = *_objptr;
        if (0 != 0) goto <D.19004>; else goto <D.19005>;
        <D.19004>:
        if (__old != __copy) goto <D.19006>; else goto <D.19007>;
        <D.19006>:
        D.19008 = *_objptr;
        gc_debug_file.64 = gc_debug_file;
        fprintf (gc_debug_file.64, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.19008, __old);
        gc_debug_file.64 = gc_debug_file;
        fflush (gc_debug_file.64);
        <D.19007>:
        <D.19005>:
        D.19012 = sgen_ptr_in_nursery (__copy);
        if (D.19012 != 0) goto <D.19013>; else goto <D.19010>;
        <D.19013>:
        D.19014 = sgen_ptr_in_nursery (_objptr);
        if (D.19014 == 0) goto <D.19015>; else goto <D.19010>;
        <D.19015>:
        iftmp.81 = 1;
        goto <D.19011>;
        <D.19010>:
        iftmp.81 = 0;
        <D.19011>:
        D.19016 = iftmp.81 != 0;
        D.19017 = (long int) D.19016;
        D.19018 = __builtin_expect (D.19017, 0);
        if (D.19018 != 0) goto <D.19019>; else goto <D.19020>;
        <D.19019>:
        sgen_add_to_global_remset (_objptr, __copy);
        <D.19020>:
        <D.19003>:
      }
      <D.19001>:
      _bmap = _bmap >> 1;
      _objptr = _objptr + 4;
      <D.17993>:
      if (_bmap != 0) goto <D.17992>; else goto <D.17994>;
      <D.17994>:
      start_run = start_run + 128;
    }
    <D.17996>:
    bwords.82 = bwords;
    bwords = bwords.82 + -1;
    if (bwords.82 > 0) goto <D.17995>; else goto <D.17997>;
    <D.17997>:
  }
  goto <D.17926>;
  <D.17998>:
  goto <D.17926>;
  <D.17999>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-scan-object.h", 111);
  <D.17926>:
}


split_nursery_parallel_scan_object (char * start, struct SgenGrayQueue * queue)
{
  unsigned int D.19023;
  unsigned int D.19024;
  unsigned int D.19025;
  unsigned int D.19026;
  unsigned int D.19029;
  unsigned int D.19030;
  unsigned int D.19031;
  unsigned int D.19032;
  unsigned int D.19033;
  void * D.19040;
  struct FILE * gc_debug_file.83;
  int iftmp.84;
  int D.19045;
  int D.19047;
  _Bool D.19049;
  long int D.19050;
  long int D.19051;
  int iftmp.85;
  int D.19063;
  int D.19065;
  _Bool D.19067;
  long int D.19068;
  long int D.19069;
  unsigned int _index.86;
  unsigned int D.19073;
  int D.19074;
  void * D.19081;
  int iftmp.87;
  int D.19085;
  int D.19087;
  _Bool D.19089;
  long int D.19090;
  long int D.19091;
  unsigned int _index.88;
  unsigned int D.19095;
  int D.19096;
  int iftmp.89;
  int D.19106;
  int D.19108;
  _Bool D.19110;
  long int D.19111;
  long int D.19112;
  unsigned int D.19115;
  unsigned int D.19118;
  int D.19119;
  int desc.90;
  unsigned int D.19123;
  unsigned int el_size.91;
  unsigned int D.19125;
  void * D.19132;
  int iftmp.92;
  int D.19136;
  int D.19138;
  _Bool D.19140;
  long int D.19141;
  long int D.19142;
  int D.19148;
  unsigned int offset.93;
  unsigned int D.19150;
  unsigned int i.94;
  unsigned int D.19152;
  void * * D.19153;
  void * D.19160;
  int iftmp.95;
  int D.19164;
  void * D.19166;
  int D.19167;
  _Bool D.19169;
  long int D.19170;
  long int D.19171;
  void * D.19174;
  sizetype el_size.96;
  unsigned int D.19179;
  void * D.19188;
  int iftmp.97;
  int D.19192;
  int D.19194;
  _Bool D.19196;
  long int D.19197;
  long int D.19198;
  unsigned int D.19201;
  void * D.19210;
  int iftmp.98;
  int D.19214;
  int D.19216;
  _Bool D.19218;
  long int D.19219;
  long int D.19220;
  unsigned int D.19223;
  unsigned int D.19224;
  struct MonoVTable * D.19227;
  struct MonoClass * D.19228;
  const char * D.19229;
  const char * D.19230;
  gsize * bitmap_data.99;
  unsigned int D.19232;
  void * D.19241;
  int iftmp.100;
  int D.19245;
  int D.19247;
  _Bool D.19249;
  long int D.19250;
  long int D.19251;
  int bwords.101;
  unsigned int D.19255;
  gsize * mbitmap_data.102;
  unsigned int D.19257;
  unsigned int D.19258;
  struct MonoClass * D.19259;
  unsigned int el_size.103;
  unsigned int D.19261;
  const char * D.19264;
  const char * D.19265;
  gsize * bitmap_data.104;
  unsigned int D.19267;
  void * D.19276;
  int iftmp.105;
  int D.19280;
  int D.19282;
  _Bool D.19284;
  long int D.19285;
  long int D.19286;
  unsigned int bwords.106;
  sizetype el_size.107;

  {
    struct GCVTable * vt;
    mword desc;

    D.19023 = MEM[(mword *)start];
    D.19024 = D.19023 & 4294967292;
    vt = (struct GCVTable *) D.19024;
    desc = vt->desc;
    D.19025 = desc & 7;
    switch (D.19025) <default: <D.17910>, case 1: <D.17805>, case 2: <D.17816>, case 3: <D.17872>, case 4: <D.17828>, case 5: <D.17864>, case 6: <D.17887>, case 7: <D.17909>>
    <D.17805>:
    D.19026 = desc & 4294901760;
    if (D.19026 != 0) goto <D.19027>; else goto <D.19028>;
    <D.19027>:
    {
      void * * _objptr_end;
      void * * _objptr;

      _objptr = start;
      D.19029 = desc >> 16;
      D.19030 = D.19029 & 255;
      D.19031 = D.19030 * 4;
      _objptr = _objptr + D.19031;
      D.19032 = desc >> 24;
      D.19033 = D.19032 * 4;
      _objptr_end = _objptr + D.19033;
      {
        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>:
        D.19040 = *_objptr;
        gc_debug_file.83 = gc_debug_file;
        fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.19040, __old);
        gc_debug_file.83 = gc_debug_file;
        fflush (gc_debug_file.83);
        <D.19039>:
        <D.19037>:
        D.19045 = sgen_ptr_in_nursery (__copy);
        if (D.19045 != 0) goto <D.19046>; else goto <D.19043>;
        <D.19046>:
        D.19047 = sgen_ptr_in_nursery (_objptr);
        if (D.19047 == 0) goto <D.19048>; else goto <D.19043>;
        <D.19048>:
        iftmp.84 = 1;
        goto <D.19044>;
        <D.19043>:
        iftmp.84 = 0;
        <D.19044>:
        D.19049 = iftmp.84 != 0;
        D.19050 = (long int) D.19049;
        D.19051 = __builtin_expect (D.19050, 0);
        if (D.19051 != 0) goto <D.19052>; else goto <D.19053>;
        <D.19052>:
        sgen_add_to_global_remset (_objptr, __copy);
        <D.19053>:
        <D.19035>:
      }
      _objptr = _objptr + 4;
      goto <D.17813>;
      <D.17812>:
      {
        void * __old;
        void * __copy;

        __old = *_objptr;
        if (__old != 0B) goto <D.19054>; else goto <D.19055>;
        <D.19054>:
        split_nursery_parallel_copy_object (_objptr, queue);
        __copy = *_objptr;
        if (0 != 0) goto <D.19056>; else goto <D.19057>;
        <D.19056>:
        if (__old != __copy) goto <D.19058>; else goto <D.19059>;
        <D.19058>:
        D.19040 = *_objptr;
        gc_debug_file.83 = gc_debug_file;
        fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.19040, __old);
        gc_debug_file.83 = gc_debug_file;
        fflush (gc_debug_file.83);
        <D.19059>:
        <D.19057>:
        D.19063 = sgen_ptr_in_nursery (__copy);
        if (D.19063 != 0) goto <D.19064>; else goto <D.19061>;
        <D.19064>:
        D.19065 = sgen_ptr_in_nursery (_objptr);
        if (D.19065 == 0) goto <D.19066>; else goto <D.19061>;
        <D.19066>:
        iftmp.85 = 1;
        goto <D.19062>;
        <D.19061>:
        iftmp.85 = 0;
        <D.19062>:
        D.19067 = iftmp.85 != 0;
        D.19068 = (long int) D.19067;
        D.19069 = __builtin_expect (D.19068, 0);
        if (D.19069 != 0) goto <D.19070>; else goto <D.19071>;
        <D.19070>:
        sgen_add_to_global_remset (_objptr, __copy);
        <D.19071>:
        <D.19055>:
      }
      _objptr = _objptr + 4;
      <D.17813>:
      if (_objptr < _objptr_end) goto <D.17812>; else goto <D.17814>;
      <D.17814>:
    }
    <D.19028>:
    goto <D.17815>;
    <D.17816>:
    {
      void * * _objptr;
      gsize _bmap;

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

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

          __old = *_objptr;
          if (__old != 0B) goto <D.19075>; else goto <D.19076>;
          <D.19075>:
          split_nursery_parallel_copy_object (_objptr, queue);
          __copy = *_objptr;
          if (0 != 0) goto <D.19077>; else goto <D.19078>;
          <D.19077>:
          if (__old != __copy) goto <D.19079>; else goto <D.19080>;
          <D.19079>:
          D.19081 = *_objptr;
          gc_debug_file.83 = gc_debug_file;
          fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.19081, __old);
          gc_debug_file.83 = gc_debug_file;
          fflush (gc_debug_file.83);
          <D.19080>:
          <D.19078>:
          D.19085 = sgen_ptr_in_nursery (__copy);
          if (D.19085 != 0) goto <D.19086>; else goto <D.19083>;
          <D.19086>:
          D.19087 = sgen_ptr_in_nursery (_objptr);
          if (D.19087 == 0) goto <D.19088>; else goto <D.19083>;
          <D.19088>:
          iftmp.87 = 1;
          goto <D.19084>;
          <D.19083>:
          iftmp.87 = 0;
          <D.19084>:
          D.19089 = iftmp.87 != 0;
          D.19090 = (long int) D.19089;
          D.19091 = __builtin_expect (D.19090, 0);
          if (D.19091 != 0) goto <D.19092>; else goto <D.19093>;
          <D.19092>:
          sgen_add_to_global_remset (_objptr, __copy);
          <D.19093>:
          <D.19076>:
        }
        _objptr = _objptr + 4;
      }
      goto <D.17826>;
      <D.17825>:
      {
        int _index;

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

          __old = *_objptr;
          if (__old != 0B) goto <D.19097>; else goto <D.19098>;
          <D.19097>:
          split_nursery_parallel_copy_object (_objptr, queue);
          __copy = *_objptr;
          if (0 != 0) goto <D.19099>; else goto <D.19100>;
          <D.19099>:
          if (__old != __copy) goto <D.19101>; else goto <D.19102>;
          <D.19101>:
          D.19081 = *_objptr;
          gc_debug_file.83 = gc_debug_file;
          fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.19081, __old);
          gc_debug_file.83 = gc_debug_file;
          fflush (gc_debug_file.83);
          <D.19102>:
          <D.19100>:
          D.19106 = sgen_ptr_in_nursery (__copy);
          if (D.19106 != 0) goto <D.19107>; else goto <D.19104>;
          <D.19107>:
          D.19108 = sgen_ptr_in_nursery (_objptr);
          if (D.19108 == 0) goto <D.19109>; else goto <D.19104>;
          <D.19109>:
          iftmp.89 = 1;
          goto <D.19105>;
          <D.19104>:
          iftmp.89 = 0;
          <D.19105>:
          D.19110 = iftmp.89 != 0;
          D.19111 = (long int) D.19110;
          D.19112 = __builtin_expect (D.19111, 0);
          if (D.19112 != 0) goto <D.19113>; else goto <D.19114>;
          <D.19113>:
          sgen_add_to_global_remset (_objptr, __copy);
          <D.19114>:
          <D.19098>:
        }
        _objptr = _objptr + 4;
      }
      <D.17826>:
      if (_bmap != 0) goto <D.17825>; else goto <D.17827>;
      <D.17827>:
    }
    goto <D.17815>;
    <D.17828>:
    D.19115 = desc & 4294950912;
    if (D.19115 != 0) goto <D.19116>; else goto <D.19117>;
    <D.19116>:
    {
      int el_size;
      int etype;

      D.19118 = desc >> 3;
      D.19119 = (int) D.19118;
      el_size = D.19119 & 1023;
      desc.90 = (int) desc;
      etype = desc.90 & 49152;
      if (etype == 16384) goto <D.19121>; else goto <D.19122>;
      <D.19121>:
      {
        void * * p;
        void * * end_refs;

        p = start + 16;
        D.19123 = MEM[(struct MonoArray *)start].max_length;
        el_size.91 = (unsigned int) el_size;
        D.19125 = D.19123 * el_size.91;
        end_refs = p + D.19125;
        goto <D.17836>;
        <D.17835>:
        {
          void * __old;
          void * __copy;

          __old = *p;
          if (__old != 0B) goto <D.19126>; else goto <D.19127>;
          <D.19126>:
          split_nursery_parallel_copy_object (p, queue);
          __copy = *p;
          if (0 != 0) goto <D.19128>; else goto <D.19129>;
          <D.19128>:
          if (__old != __copy) goto <D.19130>; else goto <D.19131>;
          <D.19130>:
          D.19132 = *p;
          gc_debug_file.83 = gc_debug_file;
          fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", p, D.19132, __old);
          gc_debug_file.83 = gc_debug_file;
          fflush (gc_debug_file.83);
          <D.19131>:
          <D.19129>:
          D.19136 = sgen_ptr_in_nursery (__copy);
          if (D.19136 != 0) goto <D.19137>; else goto <D.19134>;
          <D.19137>:
          D.19138 = sgen_ptr_in_nursery (p);
          if (D.19138 == 0) goto <D.19139>; else goto <D.19134>;
          <D.19139>:
          iftmp.92 = 1;
          goto <D.19135>;
          <D.19134>:
          iftmp.92 = 0;
          <D.19135>:
          D.19140 = iftmp.92 != 0;
          D.19141 = (long int) D.19140;
          D.19142 = __builtin_expect (D.19141, 0);
          if (D.19142 != 0) goto <D.19143>; else goto <D.19144>;
          <D.19143>:
          sgen_add_to_global_remset (p, __copy);
          <D.19144>:
          <D.19127>:
        }
        p = p + 4;
        <D.17836>:
        if (p < end_refs) goto <D.17835>; else goto <D.17837>;
        <D.17837>:
      }
      goto <D.19145>;
      <D.19122>:
      if (etype == 32768) goto <D.19146>; else goto <D.19147>;
      <D.19146>:
      {
        int offset;
        int num_refs;
        char * e_start;
        char * e_end;

        D.19029 = desc >> 16;
        D.19148 = (int) D.19029;
        offset = D.19148 & 255;
        D.19032 = desc >> 24;
        num_refs = (int) D.19032;
        e_start = start + 16;
        D.19123 = MEM[(struct MonoArray *)start].max_length;
        el_size.91 = (unsigned int) el_size;
        D.19125 = D.19123 * el_size.91;
        e_end = e_start + D.19125;
        goto <D.17850>;
        <D.17849>:
        {
          void * * p;
          int i;

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

            i.94 = (unsigned int) i;
            D.19152 = i.94 * 4;
            D.19153 = p + D.19152;
            __old = *D.19153;
            if (__old != 0B) goto <D.19154>; else goto <D.19155>;
            <D.19154>:
            i.94 = (unsigned int) i;
            D.19152 = i.94 * 4;
            D.19153 = p + D.19152;
            split_nursery_parallel_copy_object (D.19153, queue);
            i.94 = (unsigned int) i;
            D.19152 = i.94 * 4;
            D.19153 = p + D.19152;
            __copy = *D.19153;
            if (0 != 0) goto <D.19156>; else goto <D.19157>;
            <D.19156>:
            if (__old != __copy) goto <D.19158>; else goto <D.19159>;
            <D.19158>:
            i.94 = (unsigned int) i;
            D.19152 = i.94 * 4;
            D.19153 = p + D.19152;
            D.19160 = *D.19153;
            i.94 = (unsigned int) i;
            D.19152 = i.94 * 4;
            D.19153 = p + D.19152;
            gc_debug_file.83 = gc_debug_file;
            fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", D.19153, D.19160, __old);
            gc_debug_file.83 = gc_debug_file;
            fflush (gc_debug_file.83);
            <D.19159>:
            <D.19157>:
            D.19164 = sgen_ptr_in_nursery (__copy);
            if (D.19164 != 0) goto <D.19165>; else goto <D.19162>;
            <D.19165>:
            i.94 = (unsigned int) i;
            D.19152 = i.94 * 4;
            D.19166 = p + D.19152;
            D.19167 = sgen_ptr_in_nursery (D.19166);
            if (D.19167 == 0) goto <D.19168>; else goto <D.19162>;
            <D.19168>:
            iftmp.95 = 1;
            goto <D.19163>;
            <D.19162>:
            iftmp.95 = 0;
            <D.19163>:
            D.19169 = iftmp.95 != 0;
            D.19170 = (long int) D.19169;
            D.19171 = __builtin_expect (D.19170, 0);
            if (D.19171 != 0) goto <D.19172>; else goto <D.19173>;
            <D.19172>:
            i.94 = (unsigned int) i;
            D.19152 = i.94 * 4;
            D.19174 = p + D.19152;
            sgen_add_to_global_remset (D.19174, __copy);
            <D.19173>:
            <D.19155>:
          }
          i = i + 1;
          <D.17847>:
          if (i < num_refs) goto <D.17846>; else goto <D.17848>;
          <D.17848>:
          el_size.96 = (sizetype) el_size;
          e_start = e_start + el_size.96;
        }
        <D.17850>:
        if (e_start < e_end) goto <D.17849>; else goto <D.17851>;
        <D.17851>:
      }
      goto <D.19176>;
      <D.19147>:
      if (etype == 49152) goto <D.19177>; else goto <D.19178>;
      <D.19177>:
      {
        char * e_start;
        char * e_end;

        e_start = start + 16;
        D.19123 = MEM[(struct MonoArray *)start].max_length;
        el_size.91 = (unsigned int) el_size;
        D.19125 = D.19123 * el_size.91;
        e_end = e_start + D.19125;
        goto <D.17862>;
        <D.17861>:
        {
          void * * p;
          gsize _bmap;

          p = e_start;
          _bmap = desc >> 16;
          goto <D.17859>;
          <D.17858>:
          D.19179 = _bmap & 1;
          if (D.19179 != 0) goto <D.19180>; else goto <D.19181>;
          <D.19180>:
          {
            void * __old;
            void * __copy;

            __old = *p;
            if (__old != 0B) goto <D.19182>; else goto <D.19183>;
            <D.19182>:
            split_nursery_parallel_copy_object (p, queue);
            __copy = *p;
            if (0 != 0) goto <D.19184>; else goto <D.19185>;
            <D.19184>:
            if (__old != __copy) goto <D.19186>; else goto <D.19187>;
            <D.19186>:
            D.19188 = *p;
            gc_debug_file.83 = gc_debug_file;
            fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", p, D.19188, __old);
            gc_debug_file.83 = gc_debug_file;
            fflush (gc_debug_file.83);
            <D.19187>:
            <D.19185>:
            D.19192 = sgen_ptr_in_nursery (__copy);
            if (D.19192 != 0) goto <D.19193>; else goto <D.19190>;
            <D.19193>:
            D.19194 = sgen_ptr_in_nursery (p);
            if (D.19194 == 0) goto <D.19195>; else goto <D.19190>;
            <D.19195>:
            iftmp.97 = 1;
            goto <D.19191>;
            <D.19190>:
            iftmp.97 = 0;
            <D.19191>:
            D.19196 = iftmp.97 != 0;
            D.19197 = (long int) D.19196;
            D.19198 = __builtin_expect (D.19197, 0);
            if (D.19198 != 0) goto <D.19199>; else goto <D.19200>;
            <D.19199>:
            sgen_add_to_global_remset (p, __copy);
            <D.19200>:
            <D.19183>:
          }
          <D.19181>:
          _bmap = _bmap >> 1;
          p = p + 4;
          <D.17859>:
          if (_bmap != 0) goto <D.17858>; else goto <D.17860>;
          <D.17860>:
          el_size.96 = (sizetype) el_size;
          e_start = e_start + el_size.96;
        }
        <D.17862>:
        if (e_start < e_end) goto <D.17861>; else goto <D.17863>;
        <D.17863>:
      }
      <D.19178>:
      <D.19176>:
      <D.19145>:
    }
    <D.19117>:
    goto <D.17815>;
    <D.17864>:
    {
      void * * _objptr;
      gsize _bmap;

      _objptr = start;
      _bmap = desc >> 3;
      _objptr = _objptr + 8;
      goto <D.17870>;
      <D.17869>:
      D.19201 = _bmap & 1;
      if (D.19201 != 0) goto <D.19202>; else goto <D.19203>;
      <D.19202>:
      {
        void * __old;
        void * __copy;

        __old = *_objptr;
        if (__old != 0B) goto <D.19204>; else goto <D.19205>;
        <D.19204>:
        split_nursery_parallel_copy_object (_objptr, queue);
        __copy = *_objptr;
        if (0 != 0) goto <D.19206>; else goto <D.19207>;
        <D.19206>:
        if (__old != __copy) goto <D.19208>; else goto <D.19209>;
        <D.19208>:
        D.19210 = *_objptr;
        gc_debug_file.83 = gc_debug_file;
        fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.19210, __old);
        gc_debug_file.83 = gc_debug_file;
        fflush (gc_debug_file.83);
        <D.19209>:
        <D.19207>:
        D.19214 = sgen_ptr_in_nursery (__copy);
        if (D.19214 != 0) goto <D.19215>; else goto <D.19212>;
        <D.19215>:
        D.19216 = sgen_ptr_in_nursery (_objptr);
        if (D.19216 == 0) goto <D.19217>; else goto <D.19212>;
        <D.19217>:
        iftmp.98 = 1;
        goto <D.19213>;
        <D.19212>:
        iftmp.98 = 0;
        <D.19213>:
        D.19218 = iftmp.98 != 0;
        D.19219 = (long int) D.19218;
        D.19220 = __builtin_expect (D.19219, 0);
        if (D.19220 != 0) goto <D.19221>; else goto <D.19222>;
        <D.19221>:
        sgen_add_to_global_remset (_objptr, __copy);
        <D.19222>:
        <D.19205>:
      }
      <D.19203>:
      _bmap = _bmap >> 1;
      _objptr = _objptr + 4;
      <D.17870>:
      if (_bmap != 0) goto <D.17869>; else goto <D.17871>;
      <D.17871>:
    }
    goto <D.17815>;
    <D.17872>:
    {
      void * * _objptr;
      gsize * bitmap_data;
      int bwords;
      void * * start_run;

      _objptr = start;
      bitmap_data = sgen_get_complex_descriptor (desc);
      D.19223 = *bitmap_data;
      D.19224 = D.19223 + 4294967295;
      bwords = (int) D.19224;
      start_run = _objptr;
      bitmap_data = bitmap_data + 4;
      if (0 != 0) goto <D.19225>; else goto <D.19226>;
      <D.19225>:
      {
        struct MonoObject * myobj;

        myobj = start;
        D.19227 = myobj->vtable;
        D.19228 = D.19227->klass;
        D.19229 = D.19228->name;
        D.19227 = myobj->vtable;
        D.19228 = D.19227->klass;
        D.19230 = D.19228->name_space;
        monoeg_g_print ("found %d at %p (0x%zx): %s.%s\n", bwords, start, desc, D.19230, D.19229);
      }
      <D.19226>:
      goto <D.17885>;
      <D.17884>:
      {
        gsize _bmap;

        bitmap_data.99 = bitmap_data;
        bitmap_data = bitmap_data.99 + 4;
        _bmap = *bitmap_data.99;
        _objptr = start_run;
        goto <D.17882>;
        <D.17881>:
        D.19232 = _bmap & 1;
        if (D.19232 != 0) goto <D.19233>; else goto <D.19234>;
        <D.19233>:
        {
          void * __old;
          void * __copy;

          __old = *_objptr;
          if (__old != 0B) goto <D.19235>; else goto <D.19236>;
          <D.19235>:
          split_nursery_parallel_copy_object (_objptr, queue);
          __copy = *_objptr;
          if (0 != 0) goto <D.19237>; else goto <D.19238>;
          <D.19237>:
          if (__old != __copy) goto <D.19239>; else goto <D.19240>;
          <D.19239>:
          D.19241 = *_objptr;
          gc_debug_file.83 = gc_debug_file;
          fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.19241, __old);
          gc_debug_file.83 = gc_debug_file;
          fflush (gc_debug_file.83);
          <D.19240>:
          <D.19238>:
          D.19245 = sgen_ptr_in_nursery (__copy);
          if (D.19245 != 0) goto <D.19246>; else goto <D.19243>;
          <D.19246>:
          D.19247 = sgen_ptr_in_nursery (_objptr);
          if (D.19247 == 0) goto <D.19248>; else goto <D.19243>;
          <D.19248>:
          iftmp.100 = 1;
          goto <D.19244>;
          <D.19243>:
          iftmp.100 = 0;
          <D.19244>:
          D.19249 = iftmp.100 != 0;
          D.19250 = (long int) D.19249;
          D.19251 = __builtin_expect (D.19250, 0);
          if (D.19251 != 0) goto <D.19252>; else goto <D.19253>;
          <D.19252>:
          sgen_add_to_global_remset (_objptr, __copy);
          <D.19253>:
          <D.19236>:
        }
        <D.19234>:
        _bmap = _bmap >> 1;
        _objptr = _objptr + 4;
        <D.17882>:
        if (_bmap != 0) goto <D.17881>; else goto <D.17883>;
        <D.17883>:
        start_run = start_run + 128;
      }
      <D.17885>:
      bwords.101 = bwords;
      bwords = bwords.101 + -1;
      if (bwords.101 > 0) goto <D.17884>; else goto <D.17886>;
      <D.17886>:
    }
    goto <D.17815>;
    <D.17887>:
    {
      gsize * mbitmap_data;
      int mbwords;
      int el_size;
      char * e_start;
      char * e_end;

      D.19255 = vt->desc;
      mbitmap_data = sgen_get_complex_descriptor (D.19255);
      mbitmap_data.102 = mbitmap_data;
      mbitmap_data = mbitmap_data.102 + 4;
      D.19257 = *mbitmap_data.102;
      D.19258 = D.19257 + 4294967295;
      mbwords = (int) D.19258;
      D.19259 = vt->klass;
      el_size = mono_array_element_size (D.19259);
      e_start = start + 16;
      D.19123 = MEM[(struct MonoArray *)start].max_length;
      el_size.103 = (unsigned int) el_size;
      D.19261 = D.19123 * el_size.103;
      e_end = e_start + D.19261;
      if (0 != 0) goto <D.19262>; else goto <D.19263>;
      <D.19262>:
      D.19259 = vt->klass;
      D.19264 = D.19259->name;
      D.19259 = vt->klass;
      D.19265 = D.19259->name_space;
      D.19255 = vt->desc;
      monoeg_g_print ("found %d at %p (0x%zx): %s.%s\n", mbwords, start, D.19255, D.19265, D.19264);
      <D.19263>:
      goto <D.17907>;
      <D.17906>:
      {
        void * * _objptr;
        gsize * bitmap_data;
        unsigned int bwords;

        _objptr = e_start;
        bitmap_data = mbitmap_data;
        bwords = (unsigned int) mbwords;
        goto <D.17904>;
        <D.17903>:
        {
          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.17901>;
          <D.17900>:
          D.19267 = _bmap & 1;
          if (D.19267 != 0) goto <D.19268>; else goto <D.19269>;
          <D.19268>:
          {
            void * __old;
            void * __copy;

            __old = *_objptr;
            if (__old != 0B) goto <D.19270>; else goto <D.19271>;
            <D.19270>:
            split_nursery_parallel_copy_object (_objptr, queue);
            __copy = *_objptr;
            if (0 != 0) goto <D.19272>; else goto <D.19273>;
            <D.19272>:
            if (__old != __copy) goto <D.19274>; else goto <D.19275>;
            <D.19274>:
            D.19276 = *_objptr;
            gc_debug_file.83 = gc_debug_file;
            fprintf (gc_debug_file.83, "Overwrote field at %p with %p (was: %p)\n", _objptr, D.19276, __old);
            gc_debug_file.83 = gc_debug_file;
            fflush (gc_debug_file.83);
            <D.19275>:
            <D.19273>:
            D.19280 = sgen_ptr_in_nursery (__copy);
            if (D.19280 != 0) goto <D.19281>; else goto <D.19278>;
            <D.19281>:
            D.19282 = sgen_ptr_in_nursery (_objptr);
            if (D.19282 == 0) goto <D.19283>; else goto <D.19278>;
            <D.19283>:
            iftmp.105 = 1;
            goto <D.19279>;
            <D.19278>:
            iftmp.105 = 0;
            <D.19279>:
            D.19284 = iftmp.105 != 0;
            D.19285 = (long int) D.19284;
            D.19286 = __builtin_expect (D.19285, 0);
            if (D.19286 != 0) goto <D.19287>; else goto <D.19288>;
            <D.19287>:
            sgen_add_to_global_remset (_objptr, __copy);
            <D.19288>:
            <D.19271>:
          }
          <D.19269>:
          _bmap = _bmap >> 1;
          _objptr = _objptr + 4;
          <D.17901>:
          if (_bmap != 0) goto <D.17900>; else goto <D.17902>;
          <D.17902>:
          _objptr = start_run + 128;
        }
        <D.17904>:
        bwords.106 = bwords;
        bwords = bwords.106 + 4294967295;
        if (bwords.106 != 0) goto <D.17903>; else goto <D.17905>;
        <D.17905>:
        el_size.107 = (sizetype) el_size;
        e_start = e_start + el_size.107;
      }
      <D.17907>:
      if (e_start < e_end) goto <D.17906>; else goto <D.17908>;
      <D.17908>:
    }
    goto <D.17815>;
    <D.17909>:
    goto <D.17815>;
    <D.17910>:
    monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-scan-object.h", 111);
    <D.17815>:
  }
}


split_nursery_parallel_copy_object (void * * obj_slot, struct SgenGrayQueue * queue)
{
  int current_collection_generation.108;
  int D.19295;
  unsigned int D.19298;
  unsigned int D.19299;
  unsigned int D.19302;
  int D.19305;
  unsigned int D.19308;
  unsigned int D.19309;
  void * D.19310;
  unsigned int D.19311;
  _Bool D.19312;
  long int D.19313;
  long int D.19314;
  unsigned int destination.109;
  unsigned int D.19318;
  void * D.19319;
  void * D.19320;
  struct SgenGrayQueue * iftmp.110;
  int D.19328;
  _Bool D.19332;
  long int D.19333;
  long int D.19334;
  char * obj;
  mword vtable_word;
  mword objsize;
  struct MonoVTable * vt;
  void * destination;
  gboolean has_references;

  obj = *obj_slot;
  if (0 != 0) goto <D.19292>; else goto <D.19293>;
  <D.19292>:
  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.17797>:
  goto <D.17797>;
  <D.19293>:
  D.19295 = sgen_ptr_in_nursery (obj);
  if (D.19295 == 0) goto <D.19296>; else goto <D.19297>;
  <D.19296>:
  return;
  <D.19297>:
  vtable_word = MEM[(mword *)obj];
  D.19298 = vtable_word & 4294967292;
  vt = (struct MonoVTable *) D.19298;
  D.19299 = vtable_word & 1;
  if (D.19299 != 0) goto <D.19300>; else goto <D.19301>;
  <D.19300>:
  *obj_slot = vt;
  return;
  <D.19301>:
  D.19302 = vtable_word & 2;
  if (D.19302 != 0) goto <D.19303>; else goto <D.19304>;
  <D.19303>:
  return;
  <D.19304>:
  D.19305 = sgen_nursery_is_to_space (obj);
  if (D.19305 != 0) goto <D.19306>; else goto <D.19307>;
  <D.19306>:
  return;
  <D.19307>:
  D.19308 = sgen_par_object_get_size (vt, obj);
  D.19309 = D.19308 + 7;
  objsize = D.19309 & 4294967288;
  D.19310 = vt->gc_descr;
  D.19311 = (unsigned int) D.19310;
  has_references = sgen_gc_descr_has_references (D.19311);
  destination = par_alloc_for_promotion (vt, obj, objsize, has_references);
  D.19312 = destination == 0B;
  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>:
  sgen_parallel_pin_or_update (obj_slot, obj, vt, queue);
  return;
  <D.19316>:
  MEM[(struct MonoVTable * *)destination] = vt;
  destination.109 = (unsigned int) destination;
  D.19318 = destination.109 | 1;
  D.19319 = (void *) D.19318;
  D.19320 = InterlockedCompareExchangePointer (obj, D.19319, vt);
  if (D.19320 == vt) goto <D.19321>; else goto <D.19322>;
  <D.19321>:
  if (has_references != 0) goto <D.19324>; else goto <D.19325>;
  <D.19324>:
  iftmp.110 = queue;
  goto <D.19326>;
  <D.19325>:
  iftmp.110 = 0B;
  <D.19326>:
  par_copy_object_no_checks (destination, vt, obj, objsize, iftmp.110);
  obj = destination;
  *obj_slot = obj;
  goto <D.19327>;
  <D.19322>:
  D.19328 = sgen_ptr_in_nursery (destination);
  if (D.19328 == 0) goto <D.19329>; else goto <D.19330>;
  <D.19329>:
  MEM[(void * *)destination] = 0B;
  goto <D.19331>;
  <D.19330>:
  memset (destination, 0, objsize);
  <D.19331>:
  vtable_word = MEM[(mword *)obj];
  D.19299 = vtable_word & 1;
  D.19332 = D.19299 == 0;
  D.19333 = (long int) D.19332;
  D.19334 = __builtin_expect (D.19333, 0);
  if (D.19334 != 0) goto <D.19335>; else goto <D.19336>;
  <D.19335>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-minor-copy-object.h", 291, "vtable_word & SGEN_FORWARDED_BIT");
  <D.19336>:
  D.19298 = vtable_word & 4294967292;
  obj = (char *) D.19298;
  *obj_slot = obj;
  <D.19327>:
}


par_alloc_for_promotion (struct MonoVTable * vtable, char * obj, size_t objsize, gboolean has_references)
{
  int promote_age.111;
  char * D.19341;
  void * (*<T2ddb>) (struct MonoVTable *, int, gboolean) D.19342;
  int objsize.112;
  char * D.19344;
  char * D.19345;
  _Bool D.19346;
  long int D.19347;
  long int D.19348;
  void * D.19351;
  char * * D.19352;
  void * D.19353;
  char * p;
  int age;
  void restart = <<< error >>>;

  age = get_object_age (obj);
  promote_age.111 = promote_age;
  if (age >= promote_age.111) goto <D.19339>; else goto <D.19340>;
  <D.19339>:
  D.19342 = major_collector.par_alloc_object;
  objsize.112 = (int) objsize;
  D.19341 = D.19342 (vtable, objsize.112, has_references);
  return D.19341;
  <D.19340>:
  restart:
  p = age_alloc_buffers[age].next;
  D.19344 = p + objsize;
  D.19345 = age_alloc_buffers[age].end;
  D.19346 = D.19344 <= D.19345;
  D.19347 = (long int) D.19346;
  D.19348 = __builtin_expect (D.19347, 1);
  if (D.19348 != 0) goto <D.19349>; else goto <D.19350>;
  <D.19349>:
  D.19351 = p + objsize;
  D.19352 = &age_alloc_buffers[age].next;
  D.19353 = InterlockedCompareExchangePointer (D.19352, D.19351, p);
  if (D.19353 != p) goto restart; else goto <D.19354>;
  <D.19354>:
  goto <D.19355>;
  <D.19350>:
  p = par_alloc_for_promotion_slow_path (age, objsize);
  if (p == 0B) goto <D.19356>; else goto <D.19357>;
  <D.19356>:
  D.19342 = major_collector.par_alloc_object;
  objsize.112 = (int) objsize;
  D.19341 = D.19342 (vtable, objsize.112, has_references);
  return D.19341;
  <D.19357>:
  <D.19355>:
  MEM[(struct MonoVTable * *)p] = vtable;
  D.19341 = p;
  return D.19341;
}


par_alloc_for_promotion_slow_path (int age, size_t objsize)
{
  unsigned int D.19359;
  char * D.19360;
  char * D.19361;
  _Bool D.19362;
  long int D.19363;
  long int D.19364;
  void * D.19367;
  char * * D.19368;
  void * D.19369;
  void * D.19374;
  unsigned int D.19375;
  unsigned int D.19376;
  unsigned int allocated_size.113;
  char * D.19380;
  char * D.19381;
  char * p;
  size_t allocated_size;
  size_t aligned_objsize;
  void restart = <<< error >>>;

  try
    {
      D.19359 = objsize + 511;
      aligned_objsize = D.19359 & 4294966784;
      pthread_mutex_lock (&par_alloc_buffer_refill_mutex);
      restart:
      p = age_alloc_buffers[age].next;
      D.19360 = p + objsize;
      D.19361 = age_alloc_buffers[age].end;
      D.19362 = D.19360 <= D.19361;
      D.19363 = (long int) D.19362;
      D.19364 = __builtin_expect (D.19363, 1);
      if (D.19364 != 0) goto <D.19365>; else goto <D.19366>;
      <D.19365>:
      D.19367 = p + objsize;
      D.19368 = &age_alloc_buffers[age].next;
      D.19369 = InterlockedCompareExchangePointer (D.19368, D.19367, p);
      if (D.19369 != p) goto restart; else goto <D.19370>;
      <D.19370>:
      goto <D.19371>;
      <D.19366>:
      {
        char * end;

        end = age_alloc_buffers[age].end;
        if (end != 0B) goto <D.19372>; else goto <D.19373>;
        <D.19372>:
        <D.17664>:
        p = age_alloc_buffers[age].next;
        D.19368 = &age_alloc_buffers[age].next;
        D.19374 = InterlockedCompareExchangePointer (D.19368, end, p);
        if (D.19374 != p) goto <D.17664>; else goto <D.17665>;
        <D.17665>:
        sgen_clear_range (p, end);
        <D.19373>:
        age_alloc_buffers[age].end = 0B;
        D.19375 = MAX_EXPR <aligned_objsize, 512>;
        D.19376 = MAX_EXPR <aligned_objsize, 4096>;
        p = sgen_fragment_allocator_par_range_alloc (&collector_allocator, D.19376, D.19375, &allocated_size);
        if (p != 0B) goto <D.19377>; else goto <D.19378>;
        <D.19377>:
        allocated_size.113 = allocated_size;
        D.19380 = p + allocated_size.113;
        set_age_in_range (p, D.19380, age);
        D.19360 = p + objsize;
        age_alloc_buffers[age].next = D.19360;
        allocated_size.113 = allocated_size;
        D.19380 = p + allocated_size.113;
        age_alloc_buffers[age].end = D.19380;
        <D.19378>:
      }
      <D.19371>:
      pthread_mutex_unlock (&par_alloc_buffer_refill_mutex);
      D.19381 = p;
      return D.19381;
    }
  finally
    {
      allocated_size = {CLOBBER};
    }
}


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

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


split_nursery_serial_copy_object (void * * obj_slot, struct SgenGrayQueue * queue)
{
  int current_collection_generation.116;
  int D.19392;
  struct FILE * gc_debug_file.117;
  char * iftmp.118;
  unsigned int D.19399;
  unsigned int D.19400;
  unsigned int D.19403;
  unsigned int D.19411;
  _Bool D.19412;
  long int D.19413;
  long int D.19414;
  int D.19421;
  void * D.19428;
  char * forwarded;
  char * obj;

  obj = *obj_slot;
  if (0 != 0) goto <D.19389>; else goto <D.19390>;
  <D.19389>:
  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.17772>:
  goto <D.17772>;
  <D.19390>:
  D.19392 = sgen_ptr_in_nursery (obj);
  if (D.19392 == 0) goto <D.19393>; else goto <D.19394>;
  <D.19393>:
  return;
  <D.19394>:
  if (0 != 0) goto <D.19395>; else goto <D.19396>;
  <D.19395>:
  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.19396>:
  D.19399 = MEM[(mword *)obj];
  D.19400 = D.19399 & 1;
  if (D.19400 != 0) goto <D.19401>; else goto <D.19402>;
  <D.19401>:
  D.19399 = MEM[(mword *)obj];
  D.19403 = D.19399 & 4294967292;
  iftmp.118 = (char *) D.19403;
  goto <D.19404>;
  <D.19402>:
  iftmp.118 = 0B;
  <D.19404>:
  forwarded = iftmp.118;
  if (forwarded != 0B) goto <D.19405>; else goto <D.19406>;
  <D.19405>:
  if (0 != 0) goto <D.19407>; else goto <D.19408>;
  <D.19407>:
  monoeg_g_log (0B, 4, "forwarded object %p has no gc descriptor", forwarded);
  <D.17773>:
  goto <D.17773>;
  <D.19408>:
  if (0 != 0) goto <D.19409>; else goto <D.19410>;
  <D.19409>:
  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.19410>:
  *obj_slot = forwarded;
  return;
  <D.19406>:
  D.19399 = MEM[(mword *)obj];
  D.19411 = D.19399 & 2;
  D.19412 = D.19411 != 0;
  D.19413 = (long int) D.19412;
  D.19414 = __builtin_expect (D.19413, 0);
  if (D.19414 != 0) goto <D.19415>; else goto <D.19416>;
  <D.19415>:
  if (0 != 0) goto <D.19417>; else goto <D.19418>;
  <D.19417>:
  monoeg_g_log (0B, 4, "pinned object %p has no gc descriptor", obj);
  <D.17774>:
  goto <D.17774>;
  <D.19418>:
  if (0 != 0) goto <D.19419>; else goto <D.19420>;
  <D.19419>:
  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.19420>:
  return;
  <D.19416>:
  D.19421 = sgen_nursery_is_to_space (obj);
  if (D.19421 != 0) goto <D.19422>; else goto <D.19423>;
  <D.19422>:
  if (0 != 0) goto <D.19424>; else goto <D.19425>;
  <D.19424>:
  monoeg_g_log (0B, 4, "to space object %p has no gc descriptor", obj);
  <D.17775>:
  goto <D.17775>;
  <D.19425>:
  if (0 != 0) goto <D.19426>; else goto <D.19427>;
  <D.19426>:
  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.19427>:
  return;
  <D.19423>:
  D.19428 = copy_object_no_checks (obj, queue);
  *obj_slot = D.19428;
}


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.19431;

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


handle_gc_param (const char * opt)
{
  int D.19433;
  char * D.19436;
  unsigned int percentage.120;
  unsigned int D.19438;
  struct _IO_FILE * stderr.121;
  float D.19442;
  float alloc_ratio.122;
  gboolean D.19444;
  int D.19445;
  char * D.19448;
  int promote_age.123;
  int promote_age.124;
  unsigned int promote_age.125;
  unsigned int D.19452;

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

    D.19436 = __builtin_strchr (opt, 61);
    arg = D.19436 + 1;
    percentage = atoi (arg);
    percentage.120 = (unsigned int) percentage;
    D.19438 = percentage.120 + 4294967295;
    if (D.19438 > 99) goto <D.19439>; else goto <D.19440>;
    <D.19439>:
    stderr.121 = stderr;
    fprintf (stderr.121, "alloc-ratio must be an integer in the range 1-100.\n");
    exit (1);
    <D.19440>:
    D.19442 = (float) percentage;
    alloc_ratio.122 = D.19442 / 1.0e+2;
    alloc_ratio = alloc_ratio.122;
    D.19444 = 1;
    return D.19444;
  }
  <D.19435>:
  D.19445 = monoeg_g_str_has_prefix (opt, "promotion-age=");
  if (D.19445 != 0) goto <D.19446>; else goto <D.19447>;
  <D.19446>:
  {
    const char * arg;

    D.19448 = __builtin_strchr (opt, 61);
    arg = D.19448 + 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.19452 = promote_age.125 + 4294967295;
    if (D.19452 > 13) goto <D.19453>; else goto <D.19454>;
    <D.19453>:
    stderr.121 = stderr;
    fprintf (stderr.121, "promotion-age must be an integer in the range 1-%d.\n", 14);
    exit (1);
    <D.19454>:
    D.19444 = 1;
    return D.19444;
  }
  <D.19447>:
  D.19444 = 0;
  return D.19444;
}


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

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


init_nursery (struct SgenFragmentAllocator * allocator, char * start, char * end)
{
  int end.126;
  int start.127;
  int D.19460;
  float D.19461;
  float alloc_ratio.128;
  float D.19463;
  unsigned int start.129;
  unsigned int alloc_quote.130;
  unsigned int D.19466;
  unsigned int D.19467;
  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.19460 = end.126 - start.127;
  D.19461 = (float) D.19460;
  alloc_ratio.128 = alloc_ratio;
  D.19463 = D.19461 * alloc_ratio.128;
  alloc_quote = (int) D.19463;
  start.129 = (unsigned int) start;
  alloc_quote.130 = (unsigned int) alloc_quote;
  D.19466 = start.129 + alloc_quote.130;
  D.19467 = D.19466 & 4294967288;
  promotion_barrier.131 = (char *) D.19467;
  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.19460 = end.126 - start.127;
  region_age_size.133 = D.19460 >> 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.19474;
  char * promotion_barrier.137;
  char * D.19478;
  struct SgenFragment * D.19481;
  struct SgenFragment * D.19482;
  char * D.19483;
  char * D.19484;
  _Bool D.19485;
  long int D.19486;
  long int D.19487;
  struct SgenFragment * D.19490;
  struct SgenFragment * D.19493;
  struct SgenFragment * prev;
  struct SgenFragment * list;

  prev = 0B;
  list = allocator->region_head;
  goto <D.17638>;
  <D.17637>:
  D.19474 = list->fragment_end;
  promotion_barrier.137 = promotion_barrier;
  if (D.19474 > promotion_barrier.137) goto <D.19476>; else goto <D.19477>;
  <D.19476>:
  D.19478 = list->fragment_start;
  promotion_barrier.137 = promotion_barrier;
  if (D.19478 < promotion_barrier.137) goto <D.19479>; else goto <D.19480>;
  <D.19479>:
  {
    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.19474 = list->fragment_end;
    res->fragment_end = D.19474;
    D.19481 = list->next;
    res->next = D.19481;
    D.19482 = list->next_in_order;
    res->next_in_order = D.19482;
    D.19483 = res->fragment_end;
    D.19484 = res->fragment_start;
    D.19485 = D.19483 <= D.19484;
    D.19486 = (long int) D.19485;
    D.19487 = __builtin_expect (D.19486, 0);
    if (D.19487 != 0) goto <D.19488>; else goto <D.19489>;
    <D.19488>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-split-nursery.c", 220, "res->fragment_end > res->fragment_start");
    <D.19489>:
    promotion_barrier.137 = promotion_barrier;
    list->fragment_end = promotion_barrier.137;
    list->next_in_order = 0B;
    D.19482 = list->next_in_order;
    list->next = D.19482;
    D.19474 = list->fragment_end;
    D.19478 = list->fragment_start;
    set_age_in_range (D.19478, D.19474, 0);
    allocator->alloc_head = res;
    D.19490 = allocator->alloc_head;
    allocator->region_head = D.19490;
    return;
  }
  <D.19480>:
  if (prev != 0B) goto <D.19491>; else goto <D.19492>;
  <D.19491>:
  prev->next_in_order = 0B;
  D.19493 = prev->next_in_order;
  prev->next = D.19493;
  <D.19492>:
  allocator->alloc_head = list;
  D.19490 = allocator->alloc_head;
  allocator->region_head = D.19490;
  return;
  <D.19477>:
  D.19474 = list->fragment_end;
  D.19478 = list->fragment_start;
  set_age_in_range (D.19478, D.19474, 0);
  prev = list;
  list = list->next;
  <D.17638>:
  if (list != 0B) goto <D.17637>; else goto <D.17639>;
  <D.17639>:
  allocator->alloc_head = 0B;
  D.19490 = allocator->alloc_head;
  allocator->region_head = D.19490;
}


build_fragments_release_exclude_head ()
{
  sgen_fragment_allocator_release (&collector_allocator);
}


build_fragments_get_exclude_head ()
{
  char * D.19495;
  char * D.19498;
  struct SgenFragment * D.19499;
  int i;

  i = 0;
  goto <D.17692>;
  <D.17691>:
  D.19495 = age_alloc_buffers[i].end;
  if (D.19495 != 0B) goto <D.19496>; else goto <D.19497>;
  <D.19496>:
  D.19495 = age_alloc_buffers[i].end;
  D.19498 = age_alloc_buffers[i].next;
  sgen_clear_range (D.19498, D.19495);
  <D.19497>:
  i = i + 1;
  <D.17692>:
  if (i <= 14) goto <D.17691>; else goto <D.17693>;
  <D.17693>:
  D.19499 = collector_allocator.region_head;
  return D.19499;
}


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.19502;
  unsigned int D.19503;
  unsigned int D.19504;
  unsigned int D.19505;
  char * D.19506;
  unsigned int D.19507;
  unsigned int D.19508;
  int end.139;
  int start.140;
  int D.19511;
  char * D.19514;
  struct SgenFragment * D.19515;
  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.17710>;
  <D.17709>:
  {
    char * start;
    char * end;

    D.19502 = frag->fragment_next;
    D.19503 = (unsigned int) D.19502;
    D.19504 = D.19503 + 511;
    D.19505 = D.19504 & 4294966784;
    start = (char *) D.19505;
    D.19506 = frag->fragment_end;
    D.19507 = (unsigned int) D.19506;
    D.19508 = D.19507 & 4294966784;
    end = (char *) D.19508;
    end.139 = (int) end;
    start.140 = (int) start;
    D.19511 = end.139 - start.140;
    if (D.19511 <= 511) goto <D.19512>; else goto <D.19513>;
    <D.19512>:
    D.19506 = frag->fragment_end;
    D.19502 = frag->fragment_next;
    sgen_clear_range (D.19502, D.19506);
    D.19514 = frag->fragment_start;
    frag->fragment_end = D.19514;
    D.19506 = frag->fragment_end;
    frag->fragment_next = D.19506;
    D.19515 = frag->next;
    *previous = D.19515;
    // predicted unlikely by continue predictor.
    goto <D.17708>;
    <D.19513>:
    sgen_clear_range (start, end);
    D.19502 = frag->fragment_next;
    if (D.19502 != start) goto <D.19516>; else goto <D.19517>;
    <D.19516>:
    D.19502 = frag->fragment_next;
    sgen_clear_range (D.19502, start);
    <D.19517>:
    D.19506 = frag->fragment_end;
    if (D.19506 != end) goto <D.19518>; else goto <D.19519>;
    <D.19518>:
    D.19506 = frag->fragment_end;
    sgen_clear_range (end, D.19506);
    <D.19519>:
    frag->fragment_next = start;
    D.19502 = frag->fragment_next;
    frag->fragment_start = D.19502;
    frag->fragment_end = end;
    mark_bits_in_range (to_space_bitmap, start, end);
    previous = &frag->next;
  }
  <D.17708>:
  frag = *previous;
  <D.17710>:
  if (frag != 0B) goto <D.17709>; else goto <D.17711>;
  <D.17711>:
}


mark_bits_in_range (char * space_bitmap, char * start, char * end)
{
  unsigned int start.141;
  unsigned int D.19521;
  unsigned int end.142;
  unsigned int D.19523;
  unsigned int D.19524;

  start.141 = (unsigned int) start;
  D.19521 = start.141 & 4294966784;
  start = (char *) D.19521;
  end.142 = (unsigned int) end;
  D.19523 = end.142 + 511;
  D.19524 = D.19523 & 4294966784;
  end = (char *) D.19524;
  goto <D.17629>;
  <D.17628>:
  mark_bit (space_bitmap, start);
  start = start + 512;
  <D.17629>:
  if (start < end) goto <D.17628>; else goto <D.17630>;
  <D.17630>:
}


mark_bit (char * space_bitmap, char * pos)
{
  int pos.143;
  char * sgen_nursery_start.144;
  int sgen_nursery_start.145;
  int D.19528;
  int sgen_space_bitmap_size.146;
  _Bool D.19530;
  long int D.19531;
  long int D.19532;
  sizetype byte.147;
  char * D.19536;
  char D.19537;
  int D.19538;
  char D.19539;
  char D.19540;
  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.19528 = pos.143 - sgen_nursery_start.145;
  idx = D.19528 >> 9;
  byte = idx / 8;
  bit = idx & 7;
  sgen_space_bitmap_size.146 = sgen_space_bitmap_size;
  D.19530 = byte >= sgen_space_bitmap_size.146;
  D.19531 = (long int) D.19530;
  D.19532 = __builtin_expect (D.19531, 0);
  if (D.19532 != 0) goto <D.19533>; else goto <D.19534>;
  <D.19533>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-split-nursery.c", 182, "byte < sgen_space_bitmap_size");
  <D.19534>:
  byte.147 = (sizetype) byte;
  D.19536 = space_bitmap + byte.147;
  byte.147 = (sizetype) byte;
  D.19536 = space_bitmap + byte.147;
  D.19537 = *D.19536;
  D.19538 = 1 << bit;
  D.19539 = (char) D.19538;
  D.19540 = D.19537 | D.19539;
  *D.19536 = D.19540;
}


minor_par_alloc_for_promotion (struct MonoVTable * vtable, char * obj, size_t objsize, gboolean has_references)
{
  int D.19541;
  char * D.19544;
  void * (*<T2ddb>) (struct MonoVTable *, int, gboolean) D.19545;
  int objsize.148;

  D.19541 = sgen_ptr_in_nursery (obj);
  if (D.19541 == 0) goto <D.19542>; else goto <D.19543>;
  <D.19542>:
  D.19545 = major_collector.par_alloc_object;
  objsize.148 = (int) objsize;
  D.19544 = D.19545 (vtable, objsize.148, has_references);
  return D.19544;
  <D.19543>:
  D.19544 = par_alloc_for_promotion (vtable, obj, objsize, has_references);
  return D.19544;
}


minor_alloc_for_promotion (struct MonoVTable * vtable, char * obj, size_t objsize, gboolean has_references)
{
  int D.19548;
  char * D.19551;
  void * (*<T2ddb>) (struct MonoVTable *, int, gboolean) D.19552;
  int objsize.149;

  D.19548 = sgen_ptr_in_nursery (obj);
  if (D.19548 == 0) goto <D.19549>; else goto <D.19550>;
  <D.19549>:
  D.19552 = major_collector.alloc_object;
  objsize.149 = (int) objsize;
  D.19551 = D.19552 (vtable, objsize.149, has_references);
  return D.19551;
  <D.19550>:
  D.19551 = alloc_for_promotion (vtable, obj, objsize, has_references);
  return D.19551;
}


