mono_generic_context_check_used (struct MonoGenericContext * context)
{
  struct MonoGenericInst * D.22440;
  int D.22441;
  struct MonoGenericInst * D.22442;
  int D.22443;
  int D.22444;
  int context_used;

  context_used = 0;
  D.22440 = context->class_inst;
  D.22441 = inst_check_context_used (D.22440);
  context_used = D.22441 | context_used;
  D.22442 = context->method_inst;
  D.22443 = inst_check_context_used (D.22442);
  context_used = D.22443 | context_used;
  D.22444 = context_used;
  return D.22444;
}


inst_check_context_used (struct MonoGenericInst * inst)
{
  int D.22448;
  struct MonoType * D.22449;
  int D.22450;
  <unnamed-unsigned:22> D.22451;
  int D.22452;
  int context_used;
  int i;

  context_used = 0;
  if (inst == 0B) goto <D.22446>; else goto <D.22447>;
  <D.22446>:
  D.22448 = 0;
  return D.22448;
  <D.22447>:
  i = 0;
  goto <D.21531>;
  <D.21530>:
  D.22449 = inst->type_argv[i];
  D.22450 = type_check_context_used (D.22449, 1);
  context_used = D.22450 | context_used;
  i = i + 1;
  <D.21531>:
  D.22451 = inst->type_argc;
  D.22452 = (int) D.22451;
  if (D.22452 > i) goto <D.21530>; else goto <D.21532>;
  <D.21532>:
  D.22448 = context_used;
  return D.22448;
}


type_check_context_used (struct MonoType * type, gboolean recursive)
{
  int D.22454;
  int D.22455;
  struct MonoClass * D.22456;
  struct MonoArrayType * D.22457;
  struct MonoClass * D.22458;
  struct MonoClass * D.22461;
  struct MonoClass * D.22464;
  struct MonoGenericContainer * D.22465;
  _Bool D.22466;
  long int D.22467;
  long int D.22468;
  struct MonoGenericContext * D.22471;

  D.22454 = mono_type_get_type (type);
  switch (D.22454) <default: <D.21524>, case 18: <D.21521>, case 19: <D.21517>, case 20: <D.21520>, case 21: <D.21522>, case 29: <D.21519>, case 30: <D.21518>>
  <D.21517>:
  D.22455 = 1;
  return D.22455;
  <D.21518>:
  D.22455 = 2;
  return D.22455;
  <D.21519>:
  D.22456 = mono_type_get_class (type);
  D.22455 = mono_class_check_context_used (D.22456);
  return D.22455;
  <D.21520>:
  D.22457 = mono_type_get_array_type (type);
  D.22458 = D.22457->eklass;
  D.22455 = mono_class_check_context_used (D.22458);
  return D.22455;
  <D.21521>:
  if (recursive != 0) goto <D.22459>; else goto <D.22460>;
  <D.22459>:
  D.22461 = mono_type_get_class (type);
  D.22455 = mono_class_check_context_used (D.22461);
  return D.22455;
  <D.22460>:
  D.22455 = 0;
  return D.22455;
  <D.21522>:
  if (recursive != 0) goto <D.22462>; else goto <D.22463>;
  <D.22462>:
  {
    struct MonoGenericClass * gclass;

    gclass = type->data.generic_class;
    D.22464 = gclass->container_class;
    D.22465 = D.22464->generic_container;
    D.22466 = D.22465 == 0B;
    D.22467 = (long int) D.22466;
    D.22468 = __builtin_expect (D.22467, 0);
    if (D.22468 != 0) goto <D.22469>; else goto <D.22470>;
    <D.22469>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 64, "gclass->container_class->generic_container");
    <D.22470>:
    D.22471 = &gclass->context;
    D.22455 = mono_generic_context_check_used (D.22471);
    return D.22455;
  }
  <D.22463>:
  D.22455 = 0;
  return D.22455;
  <D.21524>:
  D.22455 = 0;
  return D.22455;
}


mono_class_check_context_used (struct MonoClass * class)
{
  struct MonoType * D.22473;
  int D.22474;
  struct MonoType * D.22475;
  int D.22476;
  struct MonoGenericClass * D.22477;
  struct MonoGenericContext * D.22480;
  int D.22481;
  struct MonoGenericContainer * D.22483;
  struct MonoGenericContext * D.22486;
  int D.22487;
  int D.22488;
  int context_used;

  context_used = 0;
  D.22473 = &class->this_arg;
  D.22474 = type_check_context_used (D.22473, 0);
  context_used = D.22474 | context_used;
  D.22475 = &class->byval_arg;
  D.22476 = type_check_context_used (D.22475, 0);
  context_used = D.22476 | context_used;
  D.22477 = class->generic_class;
  if (D.22477 != 0B) goto <D.22478>; else goto <D.22479>;
  <D.22478>:
  D.22477 = class->generic_class;
  D.22480 = &D.22477->context;
  D.22481 = mono_generic_context_check_used (D.22480);
  context_used = D.22481 | context_used;
  goto <D.22482>;
  <D.22479>:
  D.22483 = class->generic_container;
  if (D.22483 != 0B) goto <D.22484>; else goto <D.22485>;
  <D.22484>:
  D.22483 = class->generic_container;
  D.22486 = &D.22483->context;
  D.22487 = mono_generic_context_check_used (D.22486);
  context_used = D.22487 | context_used;
  <D.22485>:
  <D.22482>:
  D.22488 = context_used;
  return D.22488;
}


mono_method_get_declaring_generic_method (struct MonoMethod * method)
{
  unsigned int D.22490;
  unsigned int D.22491;
  _Bool D.22492;
  long int D.22493;
  long int D.22494;
  struct MonoMethod * D.22497;
  struct MonoMethodInflated * inflated;

  D.22490 = BIT_FIELD_REF <*method, 32, 160>;
  D.22491 = D.22490 & 4096;
  D.22492 = D.22491 == 0;
  D.22493 = (long int) D.22492;
  D.22494 = __builtin_expect (D.22493, 0);
  if (D.22494 != 0) goto <D.22495>; else goto <D.22496>;
  <D.22495>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 449, "method->is_inflated");
  <D.22496>:
  inflated = method;
  D.22497 = inflated->declaring;
  return D.22497;
}


mono_class_get_method_generic (struct MonoClass * klass, struct MonoMethod * method)
{
  unsigned int D.22499;
  unsigned int D.22500;
  struct MonoGenericClass * D.22504;
  unsigned char D.22509;
  struct MonoMethod * D.22512;
  struct MonoMethod * * D.22513;
  unsigned int i.0;
  unsigned int D.22515;
  struct MonoMethod * * D.22516;
  unsigned int D.22518;
  unsigned int D.22519;
  struct MonoMethod * D.22522;
  unsigned int i.1;
  unsigned int D.22525;
  struct MonoGenericContext * D.22530;
  struct MonoGenericInst * D.22531;
  struct MonoMethod * declaring;
  struct MonoMethod * m;
  int i;

  D.22499 = BIT_FIELD_REF <*method, 32, 160>;
  D.22500 = D.22499 & 4096;
  if (D.22500 != 0) goto <D.22501>; else goto <D.22502>;
  <D.22501>:
  declaring = mono_method_get_declaring_generic_method (method);
  goto <D.22503>;
  <D.22502>:
  declaring = method;
  <D.22503>:
  m = 0B;
  D.22504 = klass->generic_class;
  if (D.22504 != 0B) goto <D.22505>; else goto <D.22506>;
  <D.22505>:
  m = mono_class_get_inflated_method (klass, declaring);
  <D.22506>:
  if (m == 0B) goto <D.22507>; else goto <D.22508>;
  <D.22507>:
  mono_class_setup_methods (klass);
  D.22509 = klass->exception_type;
  if (D.22509 != 0) goto <D.22510>; else goto <D.22511>;
  <D.22510>:
  D.22512 = 0B;
  return D.22512;
  <D.22511>:
  i = 0;
  goto <D.21659>;
  <D.21658>:
  D.22513 = klass->methods;
  i.0 = (unsigned int) i;
  D.22515 = i.0 * 4;
  D.22516 = D.22513 + D.22515;
  m = *D.22516;
  if (m == declaring) goto <D.21657>; else goto <D.22517>;
  <D.22517>:
  D.22518 = BIT_FIELD_REF <*m, 32, 160>;
  D.22519 = D.22518 & 4096;
  if (D.22519 != 0) goto <D.22520>; else goto <D.22521>;
  <D.22520>:
  D.22522 = mono_method_get_declaring_generic_method (m);
  if (D.22522 == declaring) goto <D.21657>; else goto <D.22523>;
  <D.22523>:
  <D.22521>:
  i = i + 1;
  <D.21659>:
  i.1 = (unsigned int) i;
  D.22525 = klass->method.count;
  if (i.1 < D.22525) goto <D.21658>; else goto <D.21657>;
  <D.21657>:
  i.1 = (unsigned int) i;
  D.22525 = klass->method.count;
  if (i.1 >= D.22525) goto <D.22526>; else goto <D.22527>;
  <D.22526>:
  D.22512 = 0B;
  return D.22512;
  <D.22527>:
  <D.22508>:
  if (method != declaring) goto <D.22528>; else goto <D.22529>;
  <D.22528>:
  {
    struct MonoGenericContext context;

    try
      {
        context.class_inst = 0B;
        D.22530 = mono_method_get_context (method);
        D.22531 = D.22530->method_inst;
        context.method_inst = D.22531;
        m = mono_class_inflate_generic_method (m, &context);
      }
    finally
      {
        context = {CLOBBER};
      }
  }
  <D.22529>:
  D.22512 = m;
  return D.22512;
}


mono_is_partially_sharable_inst (struct MonoGenericInst * inst)
{
  struct MonoType * D.22536;
  int D.22537;
  unsigned char D.22539;
  <unnamed-unsigned:22> D.22541;
  int D.22542;
  gboolean D.22543;
  int iftmp.2;
  int i;
  gboolean has_refs;
  gboolean has_non_refs;

  has_refs = 0;
  has_non_refs = 0;
  i = 0;
  goto <D.21765>;
  <D.21764>:
  D.22536 = inst->type_argv[i];
  D.22537 = mono_type_is_reference (D.22536);
  if (D.22537 != 0) goto <D.22533>; else goto <D.22538>;
  <D.22538>:
  D.22536 = inst->type_argv[i];
  D.22539 = D.22536->type;
  if (D.22539 == 19) goto <D.22533>; else goto <D.22540>;
  <D.22540>:
  D.22536 = inst->type_argv[i];
  D.22539 = D.22536->type;
  if (D.22539 == 30) goto <D.22533>; else goto <D.22534>;
  <D.22533>:
  has_refs = 1;
  goto <D.22535>;
  <D.22534>:
  has_non_refs = 1;
  <D.22535>:
  i = i + 1;
  <D.21765>:
  D.22541 = inst->type_argc;
  D.22542 = (int) D.22541;
  if (D.22542 > i) goto <D.21764>; else goto <D.21766>;
  <D.21766>:
  if (has_refs != 0) goto <D.22547>; else goto <D.22545>;
  <D.22547>:
  if (has_non_refs != 0) goto <D.22548>; else goto <D.22545>;
  <D.22548>:
  iftmp.2 = 1;
  goto <D.22546>;
  <D.22545>:
  iftmp.2 = 0;
  <D.22546>:
  D.22543 = iftmp.2;
  return D.22543;
}


mini_get_gsharedvt_wrapper (gboolean gsharedvt_in, void * addr, struct MonoMethodSignature * normal_sig, struct MonoMethodSignature * gsharedvt_sig, struct MonoGenericSharingContext * gsctx, gint32 vcall_offset, gboolean calli)
{
  int inited.3;
  union mono_mutex_t * D.22553;
  _Bool D.22556;
  long int D.22557;
  long int D.22558;
  struct GHashTable * D.22561;
  struct GHashTable * D.22564;
  _Bool D.22567;
  long int D.22568;
  long int D.22569;
  void * D.22574;
  void * tramp_addr.4;
  void * tramp_addr.5;
  int mono_aot_only.6;
  struct MonoDomain * D.22588;
  int num_trampolines.7;
  int num_trampolines.8;
  _Bool D.22593;
  long int D.22594;
  long int D.22595;
  _Bool D.22600;
  long int D.22601;
  long int D.22602;
  static gboolean inited = 0;
  static int num_trampolines;
  void * res;
  void * info;
  struct MonoDomain * domain;
  struct MonoJitDomainInfo * domain_info;
  struct GSharedVtTrampInfo * tramp_info;
  struct GSharedVtTrampInfo tinfo;

  try
    {
      domain = mono_domain_get ();
      inited.3 = inited;
      if (inited.3 == 0) goto <D.22551>; else goto <D.22552>;
      <D.22551>:
      mono_counters_register ("GSHAREDVT arg trampolines", 256, &num_trampolines);
      inited = 1;
      <D.22552>:
      tinfo.is_in = gsharedvt_in;
      tinfo.calli = calli;
      tinfo.vcall_offset = vcall_offset;
      tinfo.addr = addr;
      tinfo.sig = normal_sig;
      tinfo.gsig = gsharedvt_sig;
      memcpy (&tinfo.gsctx, gsctx, 8);
      domain_info = domain->runtime_info;
      {
        int ret;

        D.22553 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.22553);
        if (ret != 0) goto <D.22554>; else goto <D.22555>;
        <D.22554>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.22555>:
        D.22556 = ret != 0;
        D.22557 = (long int) D.22556;
        D.22558 = __builtin_expect (D.22557, 0);
        if (D.22558 != 0) goto <D.22559>; else goto <D.22560>;
        <D.22559>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1148, "ret == 0");
        <D.22560>:
      }
      D.22561 = domain_info->gsharedvt_arg_tramp_hash;
      if (D.22561 == 0B) goto <D.22562>; else goto <D.22563>;
      <D.22562>:
      D.22564 = monoeg_g_hash_table_new (tramp_info_hash, tramp_info_equal);
      domain_info->gsharedvt_arg_tramp_hash = D.22564;
      <D.22563>:
      D.22561 = domain_info->gsharedvt_arg_tramp_hash;
      res = monoeg_g_hash_table_lookup (D.22561, &tinfo);
      {
        int ret;

        D.22553 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.22553);
        if (ret != 0) goto <D.22565>; else goto <D.22566>;
        <D.22565>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.22566>:
        D.22567 = ret != 0;
        D.22568 = (long int) D.22567;
        D.22569 = __builtin_expect (D.22568, 0);
        if (D.22569 != 0) goto <D.22570>; else goto <D.22571>;
        <D.22570>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1152, "ret == 0");
        <D.22571>:
      }
      if (res != 0B) goto <D.22572>; else goto <D.22573>;
      <D.22572>:
      D.22574 = res;
      return D.22574;
      <D.22573>:
      info = mono_arch_get_gsharedvt_call_info (addr, normal_sig, gsharedvt_sig, gsctx, gsharedvt_in, vcall_offset, calli);
      if (gsharedvt_in != 0) goto <D.22575>; else goto <D.22576>;
      <D.22575>:
      {
        static void * tramp_addr;
        struct MonoMethod * wrapper;

        tramp_addr.4 = tramp_addr;
        if (tramp_addr.4 == 0B) goto <D.22578>; else goto <D.22579>;
        <D.22578>:
        wrapper = mono_marshal_get_gsharedvt_in_wrapper ();
        addr = mono_compile_method (wrapper);
        mono_memory_barrier ();
        tramp_addr = addr;
        <D.22579>:
        addr = tramp_addr;
      }
      goto <D.22580>;
      <D.22576>:
      {
        static void * tramp_addr;
        struct MonoMethod * wrapper;

        tramp_addr.5 = tramp_addr;
        if (tramp_addr.5 == 0B) goto <D.22582>; else goto <D.22583>;
        <D.22582>:
        wrapper = mono_marshal_get_gsharedvt_out_wrapper ();
        addr = mono_compile_method (wrapper);
        mono_memory_barrier ();
        tramp_addr = addr;
        <D.22583>:
        addr = tramp_addr;
      }
      <D.22580>:
      mono_aot_only.6 = mono_aot_only;
      if (mono_aot_only.6 != 0) goto <D.22585>; else goto <D.22586>;
      <D.22585>:
      addr = mono_aot_get_gsharedvt_arg_trampoline (info, addr);
      goto <D.22587>;
      <D.22586>:
      D.22588 = mono_domain_get ();
      addr = mono_arch_get_gsharedvt_arg_trampoline (D.22588, info, addr);
      <D.22587>:
      num_trampolines.7 = num_trampolines;
      num_trampolines.8 = num_trampolines.7 + 1;
      num_trampolines = num_trampolines.8;
      tramp_info = mono_domain_alloc0 (domain, 32);
      memcpy (tramp_info, &tinfo, 32);
      {
        int ret;

        D.22553 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.22553);
        if (ret != 0) goto <D.22591>; else goto <D.22592>;
        <D.22591>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.22592>:
        D.22593 = ret != 0;
        D.22594 = (long int) D.22593;
        D.22595 = __builtin_expect (D.22594, 0);
        if (D.22595 != 0) goto <D.22596>; else goto <D.22597>;
        <D.22596>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1193, "ret == 0");
        <D.22597>:
      }
      D.22561 = domain_info->gsharedvt_arg_tramp_hash;
      monoeg_g_hash_table_insert_replace (D.22561, tramp_info, addr, 0);
      {
        int ret;

        D.22553 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.22553);
        if (ret != 0) goto <D.22598>; else goto <D.22599>;
        <D.22598>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.22599>:
        D.22600 = ret != 0;
        D.22601 = (long int) D.22600;
        D.22602 = __builtin_expect (D.22601, 0);
        if (D.22602 != 0) goto <D.22603>; else goto <D.22604>;
        <D.22603>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1196, "ret == 0");
        <D.22604>:
      }
      D.22574 = addr;
      return D.22574;
    }
  finally
    {
      tinfo = {CLOBBER};
    }
}


tramp_info_equal (const void * a, const void * b)
{
  gboolean D.22607;
  int iftmp.9;
  int D.22611;
  int D.22612;
  int D.22614;
  int D.22615;
  int D.22617;
  int D.22618;
  void * D.22620;
  void * D.22621;
  struct MonoMethodSignature * D.22623;
  struct MonoMethodSignature * D.22624;
  struct MonoMethodSignature * D.22626;
  struct MonoMethodSignature * D.22627;
  struct MonoGenericInst * D.22629;
  struct MonoGenericInst * D.22630;
  struct MonoGenericInst * D.22632;
  struct MonoGenericInst * D.22633;
  struct GSharedVtTrampInfo * tramp1;
  struct GSharedVtTrampInfo * tramp2;

  tramp1 = a;
  tramp2 = b;
  D.22611 = tramp1->is_in;
  D.22612 = tramp2->is_in;
  if (D.22611 == D.22612) goto <D.22613>; else goto <D.22609>;
  <D.22613>:
  D.22614 = tramp1->calli;
  D.22615 = tramp2->calli;
  if (D.22614 == D.22615) goto <D.22616>; else goto <D.22609>;
  <D.22616>:
  D.22617 = tramp1->vcall_offset;
  D.22618 = tramp2->vcall_offset;
  if (D.22617 == D.22618) goto <D.22619>; else goto <D.22609>;
  <D.22619>:
  D.22620 = tramp1->addr;
  D.22621 = tramp2->addr;
  if (D.22620 == D.22621) goto <D.22622>; else goto <D.22609>;
  <D.22622>:
  D.22623 = tramp1->sig;
  D.22624 = tramp2->sig;
  if (D.22623 == D.22624) goto <D.22625>; else goto <D.22609>;
  <D.22625>:
  D.22626 = tramp1->gsig;
  D.22627 = tramp2->gsig;
  if (D.22626 == D.22627) goto <D.22628>; else goto <D.22609>;
  <D.22628>:
  D.22629 = tramp1->gsctx.class_inst;
  D.22630 = tramp2->gsctx.class_inst;
  if (D.22629 == D.22630) goto <D.22631>; else goto <D.22609>;
  <D.22631>:
  D.22632 = tramp1->gsctx.method_inst;
  D.22633 = tramp2->gsctx.method_inst;
  if (D.22632 == D.22633) goto <D.22634>; else goto <D.22609>;
  <D.22634>:
  iftmp.9 = 1;
  goto <D.22610>;
  <D.22609>:
  iftmp.9 = 0;
  <D.22610>:
  D.22607 = iftmp.9;
  return D.22607;
}


tramp_info_hash (const void * key)
{
  guint D.22636;
  void * D.22637;
  struct GSharedVtTrampInfo * tramp;

  tramp = key;
  D.22637 = tramp->addr;
  D.22636 = (guint) D.22637;
  return D.22636;
}


mono_memory_barrier ()
{
  __sync_synchronize ();
}


memcpy (void * restrict __dest, const void * restrict __src, size_t __len)
{
  void * D.22639;
  unsigned int D.22640;

  D.22640 = __builtin_object_size (__dest, 0);
  D.22639 = __builtin___memcpy_chk (__dest, __src, __len, D.22640);
  return D.22639;
}


mono_rgctx_info_type_to_str (MonoRgctxInfoType type)
{
  const char * D.22642;

  switch (type) <default: <D.22018>, case 0: <D.21993>, case 1: <D.21994>, case 2: <D.21995>, case 3: <D.21996>, case 4: <D.21997>, case 5: <D.21998>, case 6: <D.22000>, case 7: <D.22001>, case 8: <D.22002>, case 9: <D.22003>, case 10: <D.22004>, case 11: <D.22005>, case 12: <D.22006>, case 13: <D.22007>, case 14: <D.22008>, case 15: <D.22010>, case 16: <D.22011>, case 17: <D.22012>, case 18: <D.22013>, case 19: <D.22009>, case 20: <D.21999>, case 22: <D.22014>, case 23: <D.22015>, case 24: <D.22016>, case 25: <D.22017>>
  <D.21993>:
  D.22642 = "STATIC_DATA";
  return D.22642;
  <D.21994>:
  D.22642 = "KLASS";
  return D.22642;
  <D.21995>:
  D.22642 = "VTABLE";
  return D.22642;
  <D.21996>:
  D.22642 = "TYPE";
  return D.22642;
  <D.21997>:
  D.22642 = "REFLECTION_TYPE";
  return D.22642;
  <D.21998>:
  D.22642 = "METHOD";
  return D.22642;
  <D.21999>:
  D.22642 = "GSHAREDVT_INFO";
  return D.22642;
  <D.22000>:
  D.22642 = "GENERIC_METHOD_CODE";
  return D.22642;
  <D.22001>:
  D.22642 = "CLASS_FIELD";
  return D.22642;
  <D.22002>:
  D.22642 = "METHOD_RGCTX";
  return D.22642;
  <D.22003>:
  D.22642 = "METHOD_CONTEXT";
  return D.22642;
  <D.22004>:
  D.22642 = "REMOTING_INVOKE_WITH_CHECK";
  return D.22642;
  <D.22005>:
  D.22642 = "METHOD_DELEGATE_CODE";
  return D.22642;
  <D.22006>:
  D.22642 = "CAST_CACHE";
  return D.22642;
  <D.22007>:
  D.22642 = "ARRAY_ELEMENT_SIZE";
  return D.22642;
  <D.22008>:
  D.22642 = "VALUE_SIZE";
  return D.22642;
  <D.22009>:
  D.22642 = "CLASS_BOX_TYPE";
  return D.22642;
  <D.22010>:
  D.22642 = "FIELD_OFFSET";
  return D.22642;
  <D.22011>:
  D.22642 = "METHOD_GSHAREDVT_OUT_TRAMPOLINE";
  return D.22642;
  <D.22012>:
  D.22642 = "METHOD_GSHAREDVT_OUT_TRAMPOLINE_VIRT";
  return D.22642;
  <D.22013>:
  D.22642 = "SIG_GSHAREDVT_OUT_TRAMPOLINE_CALLI";
  return D.22642;
  <D.22014>:
  D.22642 = "MEMCPY";
  return D.22642;
  <D.22015>:
  D.22642 = "BZERO";
  return D.22642;
  <D.22016>:
  D.22642 = "NULLABLE_CLASS_BOX";
  return D.22642;
  <D.22017>:
  D.22642 = "NULLABLE_CLASS_UNBOX";
  return D.22642;
  <D.22018>:
  D.22642 = "<UNKNOWN RGCTX INFO TYPE>";
  return D.22642;
}


mini_rgctx_info_type_to_patch_info_type (MonoRgctxInfoType info_type)
{
  MonoJumpInfoType D.22644;

  switch (info_type) <default: <D.22092>, case 0: <D.22077>, case 1: <D.22078>, case 2: <D.22079>, case 3: <D.22080>, case 4: <D.22081>, case 12: <D.22082>, case 13: <D.22083>, case 14: <D.22084>, case 15: <D.22091>, case 19: <D.22085>, case 21: <D.22090>, case 22: <D.22086>, case 23: <D.22087>, case 24: <D.22088>, case 25: <D.22089>>
  <D.22077>:
  <D.22078>:
  <D.22079>:
  <D.22080>:
  <D.22081>:
  <D.22082>:
  <D.22083>:
  <D.22084>:
  <D.22085>:
  <D.22086>:
  <D.22087>:
  <D.22088>:
  <D.22089>:
  <D.22090>:
  D.22644 = 11;
  return D.22644;
  <D.22091>:
  D.22644 = 13;
  return D.22644;
  <D.22092>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1677);
  D.22644 = 4294967295;
  return D.22644;
}


mono_method_lookup_or_register_info (struct MonoMethod * method, gboolean in_mrgctx, void * data, MonoRgctxInfoType info_type, struct MonoGenericContext * generic_context)
{
  struct MonoGenericContext * D.22648;
  int iftmp.10;
  unsigned int D.22653;
  unsigned int D.22654;
  _Bool D.22656;
  long int D.22657;
  long int D.22658;
  <unnamed-unsigned:22> D.22661;
  _Bool D.22662;
  long int D.22663;
  long int D.22664;
  guint32 D.22670;
  unsigned int index.11;
  struct MonoClass * class;
  int type_argc;
  int index;

  class = method->klass;
  if (in_mrgctx != 0) goto <D.22646>; else goto <D.22647>;
  <D.22646>:
  {
    struct MonoGenericInst * method_inst;

    D.22648 = mono_method_get_context (method);
    method_inst = D.22648->method_inst;
    D.22653 = BIT_FIELD_REF <*method, 32, 160>;
    D.22654 = D.22653 & 4096;
    if (D.22654 == 0) goto <D.22650>; else goto <D.22655>;
    <D.22655>:
    if (method_inst == 0B) goto <D.22650>; else goto <D.22651>;
    <D.22650>:
    iftmp.10 = 1;
    goto <D.22652>;
    <D.22651>:
    iftmp.10 = 0;
    <D.22652>:
    D.22656 = iftmp.10 != 0;
    D.22657 = (long int) D.22656;
    D.22658 = __builtin_expect (D.22657, 0);
    if (D.22658 != 0) goto <D.22659>; else goto <D.22660>;
    <D.22659>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1755, "method->is_inflated && method_inst");
    <D.22660>:
    D.22661 = method_inst->type_argc;
    type_argc = (int) D.22661;
    D.22662 = type_argc <= 0;
    D.22663 = (long int) D.22662;
    D.22664 = __builtin_expect (D.22663, 0);
    if (D.22664 != 0) goto <D.22665>; else goto <D.22666>;
    <D.22665>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1757, "type_argc > 0");
    <D.22666>:
  }
  goto <D.22667>;
  <D.22647>:
  type_argc = 0;
  <D.22667>:
  index = lookup_or_register_info (class, type_argc, data, info_type, generic_context);
  if (in_mrgctx != 0) goto <D.22668>; else goto <D.22669>;
  <D.22668>:
  index.11 = (unsigned int) index;
  D.22670 = index.11 | 2147483648;
  return D.22670;
  <D.22669>:
  D.22670 = (guint32) index;
  return D.22670;
}


lookup_or_register_info (struct MonoClass * class, int type_argc, void * data, MonoRgctxInfoType info_type, struct MonoGenericContext * generic_context)
{
  int D.22673;
  <unnamed type> D.22678;
  void * D.22680;
  int D.22681;
  int D.22684;
  int inited.12;
  int max_slot.13;
  static gboolean inited = 0;
  static int max_slot = 0;
  struct MonoRuntimeGenericContextTemplate * rgctx_template;
  struct MonoRuntimeGenericContextInfoTemplate * oti_list;
  struct MonoRuntimeGenericContextInfoTemplate * oti;
  int i;

  rgctx_template = mono_class_get_runtime_generic_context_template (class);
  class = get_shared_class (class);
  mono_loader_lock ();
  D.22673 = info_has_identity (info_type);
  if (D.22673 != 0) goto <D.22674>; else goto <D.22675>;
  <D.22674>:
  oti_list = get_info_templates (rgctx_template, type_argc);
  oti = oti_list;
  i = 0;
  goto <D.22109>;
  <D.22108>:
  {
    void * inflated_data;

    D.22678 = oti->info_type;
    if (D.22678 != info_type) goto <D.22676>; else goto <D.22679>;
    <D.22679>:
    D.22680 = oti->data;
    if (D.22680 == 0B) goto <D.22676>; else goto <D.22677>;
    <D.22676>:
    // predicted unlikely by continue predictor.
    goto <D.22107>;
    <D.22677>:
    inflated_data = inflate_info (oti, generic_context, class, 1);
    D.22681 = info_equal (data, inflated_data, info_type);
    if (D.22681 != 0) goto <D.22682>; else goto <D.22683>;
    <D.22682>:
    free_inflated_info (info_type, inflated_data);
    mono_loader_unlock ();
    D.22684 = i;
    return D.22684;
    <D.22683>:
    free_inflated_info (info_type, inflated_data);
  }
  <D.22107>:
  oti = oti->next;
  i = i + 1;
  <D.22109>:
  if (oti != 0B) goto <D.22108>; else goto <D.22110>;
  <D.22110>:
  <D.22675>:
  i = register_info (class, type_argc, data, info_type);
  mono_loader_unlock ();
  inited.12 = inited;
  if (inited.12 == 0) goto <D.22686>; else goto <D.22687>;
  <D.22686>:
  mono_counters_register ("RGCTX max slot number", 2048, &max_slot);
  inited = 1;
  <D.22687>:
  max_slot.13 = max_slot;
  if (i > max_slot.13) goto <D.22689>; else goto <D.22690>;
  <D.22689>:
  max_slot = i;
  <D.22690>:
  D.22684 = i;
  return D.22684;
}


mono_class_get_runtime_generic_context_template (struct MonoClass * class)
{
  struct MonoRuntimeGenericContextTemplate * D.22694;
  struct MonoClass * D.22695;
  int D.22698;
  void * D.22699;
  struct MonoClass * D.22702;
  struct MonoType * D.22703;
  struct MonoImage * D.22706;
  int i.14;
  <unnamed type> D.22708;
  struct MonoRuntimeGenericContextTemplate * D.22709;
  struct MonoRuntimeGenericContextTemplate * parent_template;
  struct MonoRuntimeGenericContextTemplate * template;
  guint32 i;

  class = get_shared_class (class);
  mono_loader_lock ();
  template = class_lookup_rgctx_template (class);
  mono_loader_unlock ();
  if (template != 0B) goto <D.22692>; else goto <D.22693>;
  <D.22692>:
  D.22694 = template;
  return D.22694;
  <D.22693>:
  template = alloc_template (class);
  mono_loader_lock ();
  D.22695 = class->parent;
  if (D.22695 != 0B) goto <D.22696>; else goto <D.22697>;
  <D.22696>:
  {
    guint32 num_entries;
    int max_argc;
    int type_argc;

    D.22695 = class->parent;
    parent_template = mono_class_get_runtime_generic_context_template (D.22695);
    max_argc = template_get_max_argc (parent_template);
    type_argc = 0;
    goto <D.21784>;
    <D.21783>:
    D.22698 = rgctx_template_num_infos (parent_template, type_argc);
    num_entries = (guint32) D.22698;
    i = 0;
    goto <D.21781>;
    <D.21780>:
    {
      struct MonoRuntimeGenericContextInfoTemplate oti;

      try
        {
          D.22695 = class->parent;
          oti = class_get_rgctx_template_oti (D.22695, type_argc, i, 0, 0, 0B); [return slot optimization]
          D.22699 = oti.data;
          if (D.22699 != 0B) goto <D.22700>; else goto <D.22701>;
          <D.22700>:
          D.22699 = oti.data;
          D.22702 = mono_defaults.object_class;
          D.22703 = &D.22702->byval_arg;
          if (D.22699 != D.22703) goto <D.22704>; else goto <D.22705>;
          <D.22704>:
          D.22706 = class->image;
          i.14 = (int) i;
          D.22699 = oti.data;
          D.22708 = oti.info_type;
          rgctx_template_set_slot (D.22706, template, type_argc, i.14, D.22699, D.22708);
          <D.22705>:
          <D.22701>:
        }
      finally
        {
          oti = {CLOBBER};
        }
    }
    i = i + 1;
    <D.21781>:
    if (i < num_entries) goto <D.21780>; else goto <D.21782>;
    <D.21782>:
    type_argc = type_argc + 1;
    <D.21784>:
    if (type_argc <= max_argc) goto <D.21783>; else goto <D.21785>;
    <D.21785>:
  }
  <D.22697>:
  D.22709 = class_lookup_rgctx_template (class);
  if (D.22709 != 0B) goto <D.22710>; else goto <D.22711>;
  <D.22710>:
  template = class_lookup_rgctx_template (class);
  goto <D.22712>;
  <D.22711>:
  class_set_rgctx_template (class, template);
  D.22695 = class->parent;
  if (D.22695 != 0B) goto <D.22713>; else goto <D.22714>;
  <D.22713>:
  register_generic_subclass (class);
  <D.22714>:
  <D.22712>:
  mono_loader_unlock ();
  D.22694 = template;
  return D.22694;
}


alloc_template (struct MonoClass * class)
{
  int inited.15;
  int num_allocted.16;
  int num_allocted.17;
  int num_bytes.18;
  int num_bytes.19;
  struct MonoRuntimeGenericContextTemplate * D.22723;
  struct MonoImage * D.22724;
  unsigned int size.20;
  static gboolean inited = 0;
  static int num_allocted = 0;
  static int num_bytes = 0;
  int size;

  size = 12;
  inited.15 = inited;
  if (inited.15 == 0) goto <D.22717>; else goto <D.22718>;
  <D.22717>:
  mono_counters_register ("RGCTX template num allocted", 2048, &num_allocted);
  mono_counters_register ("RGCTX template bytes allocted", 2048, &num_bytes);
  inited = 1;
  <D.22718>:
  num_allocted.16 = num_allocted;
  num_allocted.17 = num_allocted.16 + 1;
  num_allocted = num_allocted.17;
  num_bytes.18 = num_bytes;
  num_bytes.19 = num_bytes.18 + size;
  num_bytes = num_bytes.19;
  D.22724 = class->image;
  size.20 = (unsigned int) size;
  D.22723 = mono_image_alloc0 (D.22724, size.20);
  return D.22723;
}


template_get_max_argc (struct MonoRuntimeGenericContextTemplate * template)
{
  int D.22727;
  struct GSList * D.22728;
  unsigned int D.22729;

  D.22728 = template->method_templates;
  D.22729 = monoeg_g_slist_length (D.22728);
  D.22727 = (int) D.22729;
  return D.22727;
}


rgctx_template_num_infos (struct MonoRuntimeGenericContextTemplate * template, int type_argc)
{
  int D.22731;
  struct MonoRuntimeGenericContextInfoTemplate * oti;
  int i;

  i = 0;
  oti = get_info_templates (template, type_argc);
  goto <D.21576>;
  <D.21575>:
  i = i + 1;
  oti = oti->next;
  <D.21576>:
  if (oti != 0B) goto <D.21575>; else goto <D.21577>;
  <D.21577>:
  D.22731 = i;
  return D.22731;
}


class_get_rgctx_template_oti (struct MonoClass * class, int type_argc, guint32 slot, gboolean temporary, gboolean shared, gboolean * do_free)
{
  int iftmp.21;
  _Bool D.22741;
  long int D.22742;
  long int D.22743;
  struct MonoGenericClass * D.22747;
  struct MonoClass * D.22750;
  void * D.22751;
  struct MonoGenericContext * D.22754;
  void * D.22755;
  int tmp_do_free.22;
  <unnamed type> D.22759;
  int slot.23;
  _Bool D.22763;
  long int D.22764;
  long int D.22765;

  if (temporary == 0) goto <D.22735>; else goto <D.22739>;
  <D.22739>:
  if (do_free == 0B) goto <D.22735>; else goto <D.22736>;
  <D.22735>:
  if (temporary != 0) goto <D.22737>; else goto <D.22740>;
  <D.22740>:
  if (do_free != 0B) goto <D.22737>; else goto <D.22736>;
  <D.22737>:
  iftmp.21 = 1;
  goto <D.22738>;
  <D.22736>:
  iftmp.21 = 0;
  <D.22738>:
  D.22741 = iftmp.21 != 0;
  D.22742 = (long int) D.22741;
  D.22743 = __builtin_expect (D.22742, 0);
  if (D.22743 != 0) goto <D.22744>; else goto <D.22745>;
  <D.22744>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 886, "(temporary && do_free) || (!temporary && !do_free)");
  <D.22745>:
  D.22747 = class->generic_class;
  if (D.22747 != 0B) goto <D.22748>; else goto <D.22746>;
  <D.22748>:
  if (shared == 0) goto <D.22749>; else goto <D.22746>;
  <D.22749>:
  {
    struct MonoRuntimeGenericContextInfoTemplate oti;
    gboolean tmp_do_free;

    try
      {
        D.22747 = class->generic_class;
        D.22750 = D.22747->container_class;
        oti = class_get_rgctx_template_oti (D.22750, type_argc, slot, 1, 0, &tmp_do_free);
        D.22751 = oti.data;
        if (D.22751 != 0B) goto <D.22752>; else goto <D.22753>;
        <D.22752>:
        {
          void * info;

          info = oti.data;
          D.22747 = class->generic_class;
          D.22754 = &D.22747->context;
          D.22755 = inflate_info (&oti, D.22754, class, temporary);
          oti.data = D.22755;
          tmp_do_free.22 = tmp_do_free;
          if (tmp_do_free.22 != 0) goto <D.22757>; else goto <D.22758>;
          <D.22757>:
          D.22759 = oti.info_type;
          free_inflated_info (D.22759, info);
          <D.22758>:
        }
        <D.22753>:
        if (temporary != 0) goto <D.22760>; else goto <D.22761>;
        <D.22760>:
        *do_free = 1;
        <D.22761>:
        <retval> = oti;
        return <retval>;
      }
    finally
      {
        oti = {CLOBBER};
        tmp_do_free = {CLOBBER};
      }
  }
  <D.22746>:
  {
    struct MonoRuntimeGenericContextTemplate * template;
    struct MonoRuntimeGenericContextInfoTemplate * oti;

    template = mono_class_get_runtime_generic_context_template (class);
    slot.23 = (int) slot;
    oti = rgctx_template_get_other_slot (template, type_argc, slot.23);
    D.22763 = oti == 0B;
    D.22764 = (long int) D.22763;
    D.22765 = __builtin_expect (D.22764, 0);
    if (D.22765 != 0) goto <D.22766>; else goto <D.22767>;
    <D.22766>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 912, "oti");
    <D.22767>:
    if (temporary != 0) goto <D.22768>; else goto <D.22769>;
    <D.22768>:
    *do_free = 0;
    <D.22769>:
    <retval> = *oti;
    return <retval>;
  }
}


rgctx_template_get_other_slot (struct MonoRuntimeGenericContextTemplate * template, int type_argc, int slot)
{
  _Bool D.22772;
  long int D.22773;
  long int D.22774;
  struct MonoRuntimeGenericContextInfoTemplate * D.22779;
  int i;
  struct MonoRuntimeGenericContextInfoTemplate * oti;

  D.22772 = slot < 0;
  D.22773 = (long int) D.22772;
  D.22774 = __builtin_expect (D.22773, 0);
  if (D.22774 != 0) goto <D.22775>; else goto <D.22776>;
  <D.22775>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 189, "slot >= 0");
  <D.22776>:
  oti = get_info_templates (template, type_argc);
  i = 0;
  goto <D.21567>;
  <D.21566>:
  if (oti == 0B) goto <D.22777>; else goto <D.22778>;
  <D.22777>:
  D.22779 = 0B;
  return D.22779;
  <D.22778>:
  oti = oti->next;
  i = i + 1;
  <D.21567>:
  if (i < slot) goto <D.21566>; else goto <D.21568>;
  <D.21568>:
  D.22779 = oti;
  return D.22779;
}


rgctx_template_set_slot (struct MonoImage * image, struct MonoRuntimeGenericContextTemplate * template, int type_argc, int slot, void * data, MonoRgctxInfoType info_type)
{
  struct MonoRuntimeGenericContextInfoTemplate * list.24;
  int inited.25;
  _Bool D.22785;
  long int D.22786;
  long int D.22787;
  _Bool D.22790;
  long int D.22791;
  long int D.22792;
  struct MonoRuntimeGenericContextInfoTemplate * D.22797;
  struct MonoRuntimeGenericContextInfoTemplate * D.22800;
  void * D.22801;
  _Bool D.22802;
  long int D.22803;
  long int D.22804;
  struct MonoRuntimeGenericContextInfoTemplate * list.26;
  struct MonoClass * D.22808;
  struct MonoType * D.22809;
  int num_markers.27;
  int num_markers.28;
  int num_data.29;
  int num_data.30;
  static gboolean inited = 0;
  static int num_markers = 0;
  static int num_data = 0;
  int i;
  struct MonoRuntimeGenericContextInfoTemplate * list;
  struct MonoRuntimeGenericContextInfoTemplate * * oti;

  try
    {
      list.24 = get_info_templates (template, type_argc);
      list = list.24;
      oti = &list;
      inited.25 = inited;
      if (inited.25 == 0) goto <D.22783>; else goto <D.22784>;
      <D.22783>:
      mono_counters_register ("RGCTX oti num markers", 2048, &num_markers);
      mono_counters_register ("RGCTX oti num data", 2048, &num_data);
      inited = 1;
      <D.22784>:
      D.22785 = slot < 0;
      D.22786 = (long int) D.22785;
      D.22787 = __builtin_expect (D.22786, 0);
      if (D.22787 != 0) goto <D.22788>; else goto <D.22789>;
      <D.22788>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 414, "slot >= 0");
      <D.22789>:
      D.22790 = data == 0B;
      D.22791 = (long int) D.22790;
      D.22792 = __builtin_expect (D.22791, 0);
      if (D.22792 != 0) goto <D.22793>; else goto <D.22794>;
      <D.22793>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 415, "data");
      <D.22794>:
      i = 0;
      goto <D.21644>;
      <D.21643>:
      if (i > 0) goto <D.22795>; else goto <D.22796>;
      <D.22795>:
      D.22797 = *oti;
      oti = &D.22797->next;
      <D.22796>:
      D.22797 = *oti;
      if (D.22797 == 0B) goto <D.22798>; else goto <D.22799>;
      <D.22798>:
      D.22800 = alloc_oti (image);
      *oti = D.22800;
      <D.22799>:
      i = i + 1;
      <D.21644>:
      if (i <= slot) goto <D.21643>; else goto <D.21645>;
      <D.21645>:
      D.22797 = *oti;
      D.22801 = D.22797->data;
      D.22802 = D.22801 != 0B;
      D.22803 = (long int) D.22802;
      D.22804 = __builtin_expect (D.22803, 0);
      if (D.22804 != 0) goto <D.22805>; else goto <D.22806>;
      <D.22805>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 426, "!(*oti)->data");
      <D.22806>:
      D.22797 = *oti;
      D.22797->data = data;
      D.22797 = *oti;
      D.22797->info_type = info_type;
      list.26 = list;
      set_info_templates (image, template, type_argc, list.26);
      D.22808 = mono_defaults.object_class;
      D.22809 = &D.22808->byval_arg;
      if (D.22809 == data) goto <D.22810>; else goto <D.22811>;
      <D.22810>:
      num_markers.27 = num_markers;
      num_markers.28 = num_markers.27 + 1;
      num_markers = num_markers.28;
      goto <D.22814>;
      <D.22811>:
      num_data.29 = num_data;
      num_data.30 = num_data.29 + 1;
      num_data = num_data.30;
      <D.22814>:
    }
  finally
    {
      list = {CLOBBER};
    }
}


alloc_oti (struct MonoImage * image)
{
  int inited.31;
  int num_allocted.32;
  int num_allocted.33;
  int num_bytes.34;
  int num_bytes.35;
  struct MonoRuntimeGenericContextInfoTemplate * D.22824;
  unsigned int size.36;
  static gboolean inited = 0;
  static int num_allocted = 0;
  static int num_bytes = 0;
  int size;

  size = 12;
  inited.31 = inited;
  if (inited.31 == 0) goto <D.22818>; else goto <D.22819>;
  <D.22818>:
  mono_counters_register ("RGCTX oti num allocted", 2048, &num_allocted);
  mono_counters_register ("RGCTX oti bytes allocted", 2048, &num_bytes);
  inited = 1;
  <D.22819>:
  num_allocted.32 = num_allocted;
  num_allocted.33 = num_allocted.32 + 1;
  num_allocted = num_allocted.33;
  num_bytes.34 = num_bytes;
  num_bytes.35 = num_bytes.34 + size;
  num_bytes = num_bytes.35;
  size.36 = (unsigned int) size;
  D.22824 = mono_image_alloc0 (image, size.36);
  return D.22824;
}


set_info_templates (struct MonoImage * image, struct MonoRuntimeGenericContextTemplate * template, int type_argc, struct MonoRuntimeGenericContextInfoTemplate * oti)
{
  _Bool D.22827;
  long int D.22828;
  long int D.22829;
  struct GSList * D.22835;
  unsigned int D.22836;
  struct GSList * D.22837;
  int D.22838;
  unsigned int D.22839;
  _Bool D.22840;
  long int D.22841;
  long int D.22842;

  D.22827 = type_argc < 0;
  D.22828 = (long int) D.22827;
  D.22829 = __builtin_expect (D.22828, 0);
  if (D.22829 != 0) goto <D.22830>; else goto <D.22831>;
  <D.22830>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 152, "type_argc >= 0");
  <D.22831>:
  if (type_argc == 0) goto <D.22832>; else goto <D.22833>;
  <D.22832>:
  template->infos = oti;
  goto <D.22834>;
  <D.22833>:
  {
    int length;
    struct GSList * list;

    D.22835 = template->method_templates;
    D.22836 = monoeg_g_slist_length (D.22835);
    length = (int) D.22836;
    goto <D.21554>;
    <D.21553>:
    D.22835 = template->method_templates;
    D.22837 = g_slist_append_image (image, D.22835, 0B);
    template->method_templates = D.22837;
    length = length + 1;
    <D.21554>:
    if (length < type_argc) goto <D.21553>; else goto <D.21555>;
    <D.21555>:
    D.22835 = template->method_templates;
    D.22838 = type_argc + -1;
    D.22839 = (unsigned int) D.22838;
    list = monoeg_g_slist_nth (D.22835, D.22839);
    D.22840 = list == 0B;
    D.22841 = (long int) D.22840;
    D.22842 = __builtin_expect (D.22841, 0);
    if (D.22842 != 0) goto <D.22843>; else goto <D.22844>;
    <D.22843>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 166, "list");
    <D.22844>:
    list->data = oti;
  }
  <D.22834>:
}


class_lookup_rgctx_template (struct MonoClass * class)
{
  struct MonoImage * D.22845;
  struct GHashTable * D.22846;
  struct MonoRuntimeGenericContextTemplate * D.22849;
  struct MonoRuntimeGenericContextTemplate * template;

  D.22845 = class->image;
  D.22846 = D.22845->rgctx_template_hash;
  if (D.22846 == 0B) goto <D.22847>; else goto <D.22848>;
  <D.22847>:
  D.22849 = 0B;
  return D.22849;
  <D.22848>:
  D.22845 = class->image;
  D.22846 = D.22845->rgctx_template_hash;
  template = monoeg_g_hash_table_lookup (D.22846, class);
  D.22849 = template;
  return D.22849;
}


class_set_rgctx_template (struct MonoClass * class, struct MonoRuntimeGenericContextTemplate * rgctx_template)
{
  struct MonoImage * D.22851;
  struct GHashTable * D.22852;
  struct GHashTable * D.22855;

  D.22851 = class->image;
  D.22852 = D.22851->rgctx_template_hash;
  if (D.22852 == 0B) goto <D.22853>; else goto <D.22854>;
  <D.22853>:
  D.22851 = class->image;
  D.22855 = monoeg_g_hash_table_new (mono_aligned_addr_hash, 0B);
  D.22851->rgctx_template_hash = D.22855;
  <D.22854>:
  D.22851 = class->image;
  D.22852 = D.22851->rgctx_template_hash;
  monoeg_g_hash_table_insert_replace (D.22852, class, rgctx_template, 0);
}


register_generic_subclass (struct MonoClass * class)
{
  _Bool D.22856;
  long int D.22857;
  long int D.22858;
  struct MonoGenericClass * D.22861;
  struct GHashTable * generic_subclass_hash.37;
  struct GHashTable * generic_subclass_hash.38;
  struct MonoClass * parent;
  struct MonoClass * subclass;
  struct MonoRuntimeGenericContextTemplate * rgctx_template;

  parent = class->parent;
  rgctx_template = class_lookup_rgctx_template (class);
  D.22856 = rgctx_template == 0B;
  D.22857 = (long int) D.22856;
  D.22858 = __builtin_expect (D.22857, 0);
  if (D.22858 != 0) goto <D.22859>; else goto <D.22860>;
  <D.22859>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 260, "rgctx_template");
  <D.22860>:
  D.22861 = parent->generic_class;
  if (D.22861 != 0B) goto <D.22862>; else goto <D.22863>;
  <D.22862>:
  D.22861 = parent->generic_class;
  parent = D.22861->container_class;
  <D.22863>:
  generic_subclass_hash.37 = generic_subclass_hash;
  if (generic_subclass_hash.37 == 0B) goto <D.22865>; else goto <D.22866>;
  <D.22865>:
  generic_subclass_hash.38 = monoeg_g_hash_table_new (mono_aligned_addr_hash, 0B);
  generic_subclass_hash = generic_subclass_hash.38;
  <D.22866>:
  generic_subclass_hash.37 = generic_subclass_hash;
  subclass = monoeg_g_hash_table_lookup (generic_subclass_hash.37, parent);
  rgctx_template->next_subclass = subclass;
  generic_subclass_hash.37 = generic_subclass_hash;
  monoeg_g_hash_table_insert_replace (generic_subclass_hash.37, parent, class, 0);
}


get_shared_class (struct MonoClass * class)
{
  struct MonoClass * D.22868;

  D.22868 = class_uninstantiated (class);
  return D.22868;
}


class_uninstantiated (struct MonoClass * class)
{
  struct MonoGenericClass * D.22870;
  struct MonoClass * D.22873;

  D.22870 = class->generic_class;
  if (D.22870 != 0B) goto <D.22871>; else goto <D.22872>;
  <D.22871>:
  D.22870 = class->generic_class;
  D.22873 = D.22870->container_class;
  return D.22873;
  <D.22872>:
  D.22873 = class;
  return D.22873;
}


info_has_identity (MonoRgctxInfoType info_type)
{
  int D.22875;
  _Bool D.22876;

  D.22876 = info_type != 12;
  D.22875 = (int) D.22876;
  return D.22875;
}


get_info_templates (struct MonoRuntimeGenericContextTemplate * template, int type_argc)
{
  _Bool D.22878;
  long int D.22879;
  long int D.22880;
  struct MonoRuntimeGenericContextInfoTemplate * D.22885;
  struct GSList * D.22886;
  int D.22887;
  unsigned int D.22888;

  D.22878 = type_argc < 0;
  D.22879 = (long int) D.22878;
  D.22880 = __builtin_expect (D.22879, 0);
  if (D.22880 != 0) goto <D.22881>; else goto <D.22882>;
  <D.22881>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 139, "type_argc >= 0");
  <D.22882>:
  if (type_argc == 0) goto <D.22883>; else goto <D.22884>;
  <D.22883>:
  D.22885 = template->infos;
  return D.22885;
  <D.22884>:
  D.22886 = template->method_templates;
  D.22887 = type_argc + -1;
  D.22888 = (unsigned int) D.22887;
  D.22885 = monoeg_g_slist_nth_data (D.22886, D.22888);
  return D.22885;
}


inflate_info (struct MonoRuntimeGenericContextInfoTemplate * oti, struct MonoGenericContext * context, struct MonoClass * class, gboolean temporary)
{
  _Bool D.22890;
  long int D.22891;
  long int D.22892;
  struct MonoClass * D.22895;
  struct MonoType * D.22896;
  void * D.22899;
  struct MonoImage * iftmp.39;
  int D.22904;
  _Bool D.22905;
  long int D.22906;
  long int D.22907;
  struct MonoClass * D.22910;
  struct MonoType * D.22911;
  unsigned int D.22912;
  unsigned int D.22913;
  _Bool D.22914;
  long int D.22915;
  long int D.22916;
  unsigned char D.22922;
  const char * D.22924;
  struct MonoMethodSignature * D.22925;
  struct MonoClass * D.22926;
  _Bool D.22927;
  long int D.22928;
  long int D.22929;
  struct GPtrArray * D.22932;
  struct GPtrArray * D.22933;
  void * * D.22934;
  unsigned int i.40;
  unsigned int D.22936;
  void * * D.22937;
  void * D.22938;
  struct GPtrArray * D.22939;
  unsigned int i.41;
  unsigned int D.22941;
  struct MonoClass * D.22942;
  struct MonoType * D.22943;
  struct MonoMethodSignature * D.22944;
  unsigned int D.22945;
  unsigned int D.22946;
  _Bool D.22947;
  long int D.22948;
  long int D.22949;
  unsigned char D.22955;
  const char * D.22957;
  struct MonoMethodSignature * D.22958;
  struct MonoClass * D.22959;
  _Bool D.22960;
  long int D.22961;
  long int D.22962;
  struct MonoClass * D.22965;
  struct MonoType * D.22966;
  int field.42;
  struct MonoClassField * D.22968;
  int D.22969;
  int D.22970;
  struct MonoClassField * D.22971;
  _Bool D.22972;
  long int D.22973;
  long int D.22974;
  unsigned int i.43;
  unsigned int D.22978;
  int D.22979;
  _Bool D.22980;
  long int D.22981;
  long int D.22982;
  void * data;
  MonoRgctxInfoType info_type;
  struct MonoError error;

  try
    {
      data = oti->data;
      info_type = oti->info_type;
      D.22890 = data == 0B;
      D.22891 = (long int) D.22890;
      D.22892 = __builtin_expect (D.22891, 0);
      if (D.22892 != 0) goto <D.22893>; else goto <D.22894>;
      <D.22893>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 519, "data");
      <D.22894>:
      D.22895 = mono_defaults.object_class;
      D.22896 = &D.22895->byval_arg;
      if (D.22896 == data) goto <D.22897>; else goto <D.22898>;
      <D.22897>:
      D.22895 = mono_defaults.object_class;
      D.22899 = &D.22895->byval_arg;
      return D.22899;
      <D.22898>:
      switch (info_type) <default: <D.21723>, case 0: <D.21670>, case 1: <D.21671>, case 2: <D.21672>, case 3: <D.21673>, case 4: <D.21674>, case 5: <D.21685>, case 6: <D.21686>, case 7: <D.21712>, case 8: <D.21687>, case 9: <D.21688>, case 10: <D.21689>, case 11: <D.21690>, case 12: <D.21675>, case 13: <D.21676>, case 14: <D.21677>, case 15: <D.21713>, case 16: <D.21704>, case 17: <D.21705>, case 18: <D.21719>, case 19: <D.21678>, case 20: <D.21695>, case 21: <D.21681>, case 22: <D.21679>, case 23: <D.21680>, case 24: <D.21682>, case 25: <D.21683>>
      <D.21670>:
      <D.21671>:
      <D.21672>:
      <D.21673>:
      <D.21674>:
      <D.21675>:
      <D.21676>:
      <D.21677>:
      <D.21678>:
      <D.21679>:
      <D.21680>:
      <D.21681>:
      <D.21682>:
      <D.21683>:
      {
        void * result;

        if (temporary == 0) goto <D.22901>; else goto <D.22902>;
        <D.22901>:
        iftmp.39 = class->image;
        goto <D.22903>;
        <D.22902>:
        iftmp.39 = 0B;
        <D.22903>:
        result = mono_class_inflate_generic_type_with_mempool (iftmp.39, data, context, &error);
        D.22904 = mono_error_ok (&error);
        D.22905 = D.22904 == 0;
        D.22906 = (long int) D.22905;
        D.22907 = __builtin_expect (D.22906, 0);
        if (D.22907 != 0) goto <D.22908>; else goto <D.22909>;
        <D.22908>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 542, "mono_error_ok (&error)");
        <D.22909>:
        D.22899 = result;
        return D.22899;
      }
      <D.21685>:
      <D.21686>:
      <D.21687>:
      <D.21688>:
      <D.21689>:
      <D.21690>:
      {
        struct MonoMethod * method;
        struct MonoMethod * inflated_method;
        struct MonoType * inflated_type;
        struct MonoClass * inflated_class;

        method = data;
        D.22910 = method->klass;
        D.22911 = &D.22910->byval_arg;
        inflated_type = mono_class_inflate_generic_type (D.22911, context);
        inflated_class = mono_class_from_mono_type (inflated_type);
        mono_metadata_free_type (inflated_type);
        mono_class_init (inflated_class);
        D.22912 = BIT_FIELD_REF <*method, 32, 160>;
        D.22913 = D.22912 & 124;
        D.22914 = D.22913 != 0;
        D.22915 = (long int) D.22914;
        D.22916 = __builtin_expect (D.22915, 0);
        if (D.22916 != 0) goto <D.22917>; else goto <D.22918>;
        <D.22917>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 561, "!method->wrapper_type");
        <D.22918>:
        D.22922 = inflated_class->byval_arg.type;
        if (D.22922 == 20) goto <D.22919>; else goto <D.22923>;
        <D.22923>:
        D.22922 = inflated_class->byval_arg.type;
        if (D.22922 == 29) goto <D.22919>; else goto <D.22920>;
        <D.22919>:
        D.22924 = method->name;
        D.22925 = method->signature;
        inflated_method = mono_method_search_in_array_class (inflated_class, D.22924, D.22925);
        goto <D.22921>;
        <D.22920>:
        inflated_method = mono_class_inflate_generic_method (method, context);
        <D.22921>:
        D.22926 = inflated_method->klass;
        mono_class_init (D.22926);
        D.22926 = inflated_method->klass;
        D.22927 = D.22926 != inflated_class;
        D.22928 = (long int) D.22927;
        D.22929 = __builtin_expect (D.22928, 0);
        if (D.22929 != 0) goto <D.22930>; else goto <D.22931>;
        <D.22930>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 571, "inflated_method->klass == inflated_class");
        <D.22931>:
        D.22899 = inflated_method;
        return D.22899;
      }
      <D.21695>:
      {
        struct MonoGSharedVtMethodInfo * info;
        struct MonoGSharedVtMethodInfo * res;
        int i;

        info = data;
        res = monoeg_malloc0 (8);
        D.22932 = monoeg_g_ptr_array_new ();
        res->entries = D.22932;
        i = 0;
        goto <D.21702>;
        <D.21701>:
        {
          struct MonoRuntimeGenericContextInfoTemplate * otemplate;
          struct MonoRuntimeGenericContextInfoTemplate * template;

          D.22933 = info->entries;
          D.22934 = D.22933->pdata;
          i.40 = (unsigned int) i;
          D.22936 = i.40 * 4;
          D.22937 = D.22934 + D.22936;
          otemplate = *D.22937;
          template = monoeg_malloc0 (12);
          memcpy (template, otemplate, 12);
          D.22938 = inflate_info (template, context, class, 0);
          template->data = D.22938;
          D.22939 = res->entries;
          monoeg_g_ptr_array_add (D.22939, template);
        }
        i = i + 1;
        <D.21702>:
        i.41 = (unsigned int) i;
        D.22933 = info->entries;
        D.22941 = D.22933->len;
        if (i.41 < D.22941) goto <D.21701>; else goto <D.21703>;
        <D.21703>:
        D.22899 = res;
        return D.22899;
      }
      <D.21704>:
      <D.21705>:
      {
        struct MonoJumpInfoGSharedVtCall * info;
        struct MonoMethod * method;
        struct MonoMethod * inflated_method;
        struct MonoType * inflated_type;
        struct MonoClass * inflated_class;
        struct MonoJumpInfoGSharedVtCall * res;

        info = data;
        method = info->method;
        D.22942 = method->klass;
        D.22943 = &D.22942->byval_arg;
        inflated_type = mono_class_inflate_generic_type (D.22943, context);
        inflated_class = mono_class_from_mono_type (inflated_type);
        res = monoeg_malloc0 (8);
        D.22944 = info->sig;
        res->sig = D.22944;
        mono_metadata_free_type (inflated_type);
        mono_class_init (inflated_class);
        D.22945 = BIT_FIELD_REF <*method, 32, 160>;
        D.22946 = D.22945 & 124;
        D.22947 = D.22946 != 0;
        D.22948 = (long int) D.22947;
        D.22949 = __builtin_expect (D.22948, 0);
        if (D.22949 != 0) goto <D.22950>; else goto <D.22951>;
        <D.22950>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 616, "!method->wrapper_type");
        <D.22951>:
        D.22955 = inflated_class->byval_arg.type;
        if (D.22955 == 20) goto <D.22952>; else goto <D.22956>;
        <D.22956>:
        D.22955 = inflated_class->byval_arg.type;
        if (D.22955 == 29) goto <D.22952>; else goto <D.22953>;
        <D.22952>:
        D.22957 = method->name;
        D.22958 = method->signature;
        inflated_method = mono_method_search_in_array_class (inflated_class, D.22957, D.22958);
        goto <D.22954>;
        <D.22953>:
        inflated_method = mono_class_inflate_generic_method (method, context);
        <D.22954>:
        D.22959 = inflated_method->klass;
        mono_class_init (D.22959);
        D.22959 = inflated_method->klass;
        D.22960 = D.22959 != inflated_class;
        D.22961 = (long int) D.22960;
        D.22962 = __builtin_expect (D.22961, 0);
        if (D.22962 != 0) goto <D.22963>; else goto <D.22964>;
        <D.22963>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 626, "inflated_method->klass == inflated_class");
        <D.22964>:
        res->method = inflated_method;
        D.22899 = res;
        return D.22899;
      }
      <D.21712>:
      <D.21713>:
      {
        struct MonoClassField * field;
        struct MonoType * inflated_type;
        struct MonoClass * inflated_class;
        int i;
        void * dummy;

        try
          {
            field = data;
            D.22965 = field->parent;
            D.22966 = &D.22965->byval_arg;
            inflated_type = mono_class_inflate_generic_type (D.22966, context);
            inflated_class = mono_class_from_mono_type (inflated_type);
            field.42 = (int) field;
            D.22965 = field->parent;
            D.22968 = D.22965->fields;
            D.22969 = (int) D.22968;
            D.22970 = field.42 - D.22969;
            i = D.22970 /[ex] 16;
            dummy = 0B;
            mono_metadata_free_type (inflated_type);
            mono_class_get_fields (inflated_class, &dummy);
            D.22971 = inflated_class->fields;
            D.22972 = D.22971 == 0B;
            D.22973 = (long int) D.22972;
            D.22974 = __builtin_expect (D.22973, 0);
            if (D.22974 != 0) goto <D.22975>; else goto <D.22976>;
            <D.22975>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 643, "inflated_class->fields");
            <D.22976>:
            D.22971 = inflated_class->fields;
            i.43 = (unsigned int) i;
            D.22978 = i.43 * 16;
            D.22899 = D.22971 + D.22978;
            return D.22899;
          }
        finally
          {
            dummy = {CLOBBER};
          }
      }
      <D.21719>:
      {
        struct MonoMethodSignature * sig;
        struct MonoMethodSignature * isig;
        struct MonoError error;

        try
          {
            sig = data;
            isig = mono_inflate_generic_signature (sig, context, &error);
            D.22979 = mono_error_ok (&error);
            D.22980 = D.22979 == 0;
            D.22981 = (long int) D.22980;
            D.22982 = __builtin_expect (D.22981, 0);
            if (D.22982 != 0) goto <D.22983>; else goto <D.22984>;
            <D.22983>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 653, "mono_error_ok (&error)");
            <D.22984>:
            D.22899 = isig;
            return D.22899;
          }
        finally
          {
            error = {CLOBBER};
          }
      }
      <D.21723>:
      monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 658);
      D.22899 = 0B;
      return D.22899;
    }
  finally
    {
      error = {CLOBBER};
    }
}


info_equal (void * data1, void * data2, MonoRgctxInfoType info_type)
{
  gboolean D.22989;
  struct MonoClass * D.22990;
  struct MonoClass * D.22991;
  _Bool D.22992;
  _Bool D.22993;

  switch (info_type) <default: <D.22073>, case 0: <D.22048>, case 1: <D.22049>, case 2: <D.22050>, case 3: <D.22051>, case 4: <D.22052>, case 5: <D.22061>, case 6: <D.22063>, case 7: <D.22064>, case 8: <D.22066>, case 9: <D.22067>, case 10: <D.22068>, case 11: <D.22069>, case 12: <D.22053>, case 13: <D.22054>, case 14: <D.22055>, case 15: <D.22065>, case 16: <D.22070>, case 17: <D.22071>, case 18: <D.22072>, case 19: <D.22056>, case 20: <D.22062>, case 22: <D.22057>, case 23: <D.22058>, case 24: <D.22059>, case 25: <D.22060>>
  <D.22048>:
  <D.22049>:
  <D.22050>:
  <D.22051>:
  <D.22052>:
  <D.22053>:
  <D.22054>:
  <D.22055>:
  <D.22056>:
  <D.22057>:
  <D.22058>:
  <D.22059>:
  <D.22060>:
  D.22990 = mono_class_from_mono_type (data1);
  D.22991 = mono_class_from_mono_type (data2);
  D.22992 = D.22990 == D.22991;
  D.22989 = (gboolean) D.22992;
  return D.22989;
  <D.22061>:
  <D.22062>:
  <D.22063>:
  <D.22064>:
  <D.22065>:
  <D.22066>:
  <D.22067>:
  <D.22068>:
  <D.22069>:
  <D.22070>:
  <D.22071>:
  <D.22072>:
  D.22993 = data1 == data2;
  D.22989 = (gboolean) D.22993;
  return D.22989;
  <D.22073>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1644);
  D.22989 = 0;
  return D.22989;
}


free_inflated_info (MonoRgctxInfoType info_type, void * info)
{
  if (info == 0B) goto <D.22995>; else goto <D.22996>;
  <D.22995>:
  return;
  <D.22996>:
  switch (info_type) <default: <D.21735>, case 0: <D.21728>, case 1: <D.21729>, case 2: <D.21730>, case 3: <D.21731>, case 4: <D.21732>, case 12: <D.21733>>
  <D.21728>:
  <D.21729>:
  <D.21730>:
  <D.21731>:
  <D.21732>:
  <D.21733>:
  mono_metadata_free_type (info);
  goto <D.21734>;
  <D.21735>:
  goto <D.21734>;
  <D.21734>:
}


register_info (struct MonoClass * class, int type_argc, void * data, MonoRgctxInfoType info_type)
{
  void * D.22999;
  struct MonoGenericClass * D.23001;
  void * D.23006;
  struct MonoImage * D.23008;
  struct MonoClass * D.23009;
  struct MonoType * D.23010;
  int D.23011;
  int i;
  struct MonoRuntimeGenericContextTemplate * template;
  struct MonoClass * parent;
  struct MonoRuntimeGenericContextInfoTemplate * oti;

  template = mono_class_get_runtime_generic_context_template (class);
  i = 0;
  oti = get_info_templates (template, type_argc);
  goto <D.22037>;
  <D.22036>:
  D.22999 = oti->data;
  if (D.22999 == 0B) goto <D.22035>; else goto <D.23000>;
  <D.23000>:
  i = i + 1;
  oti = oti->next;
  <D.22037>:
  if (oti != 0B) goto <D.22036>; else goto <D.22035>;
  <D.22035>:
  parent = class->parent;
  goto <D.22042>;
  <D.22041>:
  {
    struct MonoRuntimeGenericContextTemplate * parent_template;
    struct MonoRuntimeGenericContextInfoTemplate * oti;

    D.23001 = parent->generic_class;
    if (D.23001 != 0B) goto <D.23002>; else goto <D.23003>;
    <D.23002>:
    D.23001 = parent->generic_class;
    parent = D.23001->container_class;
    <D.23003>:
    parent_template = mono_class_get_runtime_generic_context_template (parent);
    oti = rgctx_template_get_other_slot (parent_template, type_argc, i);
    if (oti != 0B) goto <D.23004>; else goto <D.23005>;
    <D.23004>:
    D.23006 = oti->data;
    if (D.23006 != 0B) goto <D.22040>; else goto <D.23007>;
    <D.23007>:
    <D.23005>:
    D.23008 = parent->image;
    D.23009 = mono_defaults.object_class;
    D.23010 = &D.23009->byval_arg;
    rgctx_template_set_slot (D.23008, parent_template, type_argc, i, D.23010, 0);
    parent = parent->parent;
  }
  <D.22042>:
  if (parent != 0B) goto <D.22041>; else goto <D.22040>;
  <D.22040>:
  fill_in_rgctx_template_slot (class, type_argc, i, data, info_type);
  D.23011 = i;
  return D.23011;
}


fill_in_rgctx_template_slot (struct MonoClass * class, int type_argc, int index, void * data, MonoRgctxInfoType info_type)
{
  struct MonoImage * D.23013;
  struct GHashTable * generic_subclass_hash.44;
  _Bool D.23018;
  long int D.23019;
  long int D.23020;
  struct MonoClass * D.23023;
  unsigned int index.45;
  void * D.23025;
  _Bool D.23026;
  long int D.23027;
  long int D.23028;
  struct MonoRuntimeGenericContextTemplate * template;
  struct MonoClass * subclass;

  template = mono_class_get_runtime_generic_context_template (class);
  D.23013 = class->image;
  rgctx_template_set_slot (D.23013, template, type_argc, index, data, info_type);
  generic_subclass_hash.44 = generic_subclass_hash;
  if (generic_subclass_hash.44 != 0B) goto <D.23015>; else goto <D.23016>;
  <D.23015>:
  generic_subclass_hash.44 = generic_subclass_hash;
  subclass = monoeg_g_hash_table_lookup (generic_subclass_hash.44, class);
  goto <D.23017>;
  <D.23016>:
  subclass = 0B;
  <D.23017>:
  goto <D.21988>;
  <D.21987>:
  {
    struct MonoRuntimeGenericContextInfoTemplate subclass_oti;
    struct MonoRuntimeGenericContextTemplate * subclass_template;

    try
      {
        subclass_template = class_lookup_rgctx_template (subclass);
        D.23018 = subclass_template == 0B;
        D.23019 = (long int) D.23018;
        D.23020 = __builtin_expect (D.23019, 0);
        if (D.23020 != 0) goto <D.23021>; else goto <D.23022>;
        <D.23021>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1509, "subclass_template");
        <D.23022>:
        D.23023 = subclass->parent;
        index.45 = (unsigned int) index;
        subclass_oti = class_get_rgctx_template_oti (D.23023, type_argc, index.45, 0, 0, 0B); [return slot optimization]
        D.23025 = subclass_oti.data;
        D.23026 = D.23025 == 0B;
        D.23027 = (long int) D.23026;
        D.23028 = __builtin_expect (D.23027, 0);
        if (D.23028 != 0) goto <D.23029>; else goto <D.23030>;
        <D.23029>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1512, "subclass_oti.data");
        <D.23030>:
        D.23025 = subclass_oti.data;
        fill_in_rgctx_template_slot (subclass, type_argc, index, D.23025, info_type);
        subclass = subclass_template->next_subclass;
      }
    finally
      {
        subclass_oti = {CLOBBER};
      }
  }
  <D.21988>:
  if (subclass != 0B) goto <D.21987>; else goto <D.21989>;
  <D.21989>:
}


mono_class_rgctx_get_array_size (int n, gboolean mrgctx)
{
  unsigned int n.46;
  _Bool D.23032;
  long int D.23033;
  long int D.23034;
  int D.23039;

  n.46 = (unsigned int) n;
  D.23032 = n.46 > 29;
  D.23033 = (long int) D.23032;
  D.23034 = __builtin_expect (D.23033, 0);
  if (D.23034 != 0) goto <D.23035>; else goto <D.23036>;
  <D.23035>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1784, "n >= 0 && n < 30");
  <D.23036>:
  if (mrgctx != 0) goto <D.23037>; else goto <D.23038>;
  <D.23037>:
  D.23039 = 6 << n;
  return D.23039;
  <D.23038>:
  D.23039 = 4 << n;
  return D.23039;
}


mono_class_fill_runtime_generic_context (struct MonoVTable * class_vtable, guint8 * caller, guint32 slot)
{
  union mono_mutex_t * D.23041;
  _Bool D.23044;
  long int D.23045;
  long int D.23046;
  int inited.47;
  int num_alloced.48;
  int num_alloced.49;
  _Bool D.23058;
  long int D.23059;
  long int D.23060;
  void * D.23063;
  static gboolean inited = 0;
  static int num_alloced = 0;
  struct MonoDomain * domain;
  void * * rgctx;
  void * info;

  domain = class_vtable->domain;
  {
    int ret;

    D.23041 = &domain->lock.mutex;
    ret = pthread_mutex_lock (D.23041);
    if (ret != 0) goto <D.23042>; else goto <D.23043>;
    <D.23042>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.23043>:
    D.23044 = ret != 0;
    D.23045 = (long int) D.23044;
    D.23046 = __builtin_expect (D.23045, 0);
    if (D.23046 != 0) goto <D.23047>; else goto <D.23048>;
    <D.23047>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1925, "ret == 0");
    <D.23048>:
  }
  inited.47 = inited;
  if (inited.47 == 0) goto <D.23050>; else goto <D.23051>;
  <D.23050>:
  mono_counters_register ("RGCTX num alloced", 2048, &num_alloced);
  inited = 1;
  <D.23051>:
  rgctx = class_vtable->runtime_generic_context;
  if (rgctx == 0B) goto <D.23052>; else goto <D.23053>;
  <D.23052>:
  rgctx = alloc_rgctx_array (domain, 0, 0);
  class_vtable->runtime_generic_context = rgctx;
  num_alloced.48 = num_alloced;
  num_alloced.49 = num_alloced.48 + 1;
  num_alloced = num_alloced.49;
  <D.23053>:
  {
    int ret;

    D.23041 = &domain->lock.mutex;
    ret = pthread_mutex_unlock (D.23041);
    if (ret != 0) goto <D.23056>; else goto <D.23057>;
    <D.23056>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.23057>:
    D.23058 = ret != 0;
    D.23059 = (long int) D.23058;
    D.23060 = __builtin_expect (D.23059, 0);
    if (D.23060 != 0) goto <D.23061>; else goto <D.23062>;
    <D.23061>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1939, "ret == 0");
    <D.23062>:
  }
  info = fill_runtime_generic_context (class_vtable, rgctx, caller, slot, 0B);
  D.23063 = info;
  return D.23063;
}


alloc_rgctx_array (struct MonoDomain * domain, int n, gboolean is_mrgctx)
{
  int D.23065;
  unsigned int D.23066;
  unsigned int D.23067;
  unsigned int size.50;
  int inited.51;
  int mrgctx_num_alloced.52;
  int mrgctx_num_alloced.53;
  int mrgctx_bytes_alloced.54;
  int mrgctx_bytes_alloced.55;
  int rgctx_num_alloced.56;
  int rgctx_num_alloced.57;
  int rgctx_bytes_alloced.58;
  int rgctx_bytes_alloced.59;
  void * * D.23083;
  static gboolean inited = 0;
  static int rgctx_num_alloced = 0;
  static int rgctx_bytes_alloced = 0;
  static int mrgctx_num_alloced = 0;
  static int mrgctx_bytes_alloced = 0;
  int size;
  void * array;

  D.23065 = mono_class_rgctx_get_array_size (n, is_mrgctx);
  D.23066 = (unsigned int) D.23065;
  D.23067 = D.23066 * 4;
  size = (int) D.23067;
  size.50 = (unsigned int) size;
  array = mono_domain_alloc0 (domain, size.50);
  inited.51 = inited;
  if (inited.51 == 0) goto <D.23070>; else goto <D.23071>;
  <D.23070>:
  mono_counters_register ("RGCTX num arrays alloced", 2048, &rgctx_num_alloced);
  mono_counters_register ("RGCTX bytes alloced", 2048, &rgctx_bytes_alloced);
  mono_counters_register ("MRGCTX num arrays alloced", 2048, &mrgctx_num_alloced);
  mono_counters_register ("MRGCTX bytes alloced", 2048, &mrgctx_bytes_alloced);
  inited = 1;
  <D.23071>:
  if (is_mrgctx != 0) goto <D.23072>; else goto <D.23073>;
  <D.23072>:
  mrgctx_num_alloced.52 = mrgctx_num_alloced;
  mrgctx_num_alloced.53 = mrgctx_num_alloced.52 + 1;
  mrgctx_num_alloced = mrgctx_num_alloced.53;
  mrgctx_bytes_alloced.54 = mrgctx_bytes_alloced;
  mrgctx_bytes_alloced.55 = mrgctx_bytes_alloced.54 + size;
  mrgctx_bytes_alloced = mrgctx_bytes_alloced.55;
  goto <D.23078>;
  <D.23073>:
  rgctx_num_alloced.56 = rgctx_num_alloced;
  rgctx_num_alloced.57 = rgctx_num_alloced.56 + 1;
  rgctx_num_alloced = rgctx_num_alloced.57;
  rgctx_bytes_alloced.58 = rgctx_bytes_alloced;
  rgctx_bytes_alloced.59 = rgctx_bytes_alloced.58 + size;
  rgctx_bytes_alloced = rgctx_bytes_alloced.59;
  <D.23078>:
  D.23083 = array;
  return D.23083;
}


fill_runtime_generic_context (struct MonoVTable * class_vtable, void * * rgctx, guint8 * caller, guint32 slot, struct MonoGenericInst * method_inst)
{
  struct MonoGenericContext * iftmp.60;
  struct MonoGenericClass * D.23086;
  struct MonoGenericInst * iftmp.61;
  _Bool D.23094;
  long int D.23095;
  long int D.23096;
  union mono_mutex_t * D.23099;
  _Bool D.23102;
  long int D.23103;
  long int D.23104;
  _Bool D.23107;
  int D.23108;
  unsigned int size.62;
  unsigned int D.23112;
  int D.23117;
  int D.23118;
  unsigned int D.23119;
  unsigned int first_slot.63;
  unsigned int D.23123;
  unsigned int offset.64;
  unsigned int D.23125;
  unsigned int D.23126;
  unsigned int rgctx_index.65;
  unsigned int D.23128;
  void * * D.23129;
  _Bool D.23134;
  long int D.23135;
  long int D.23136;
  void * D.23139;
  unsigned int offset.66;
  unsigned int D.23141;
  void * * D.23142;
  void * D.23143;
  int D.23146;
  void * * D.23147;
  int D.23148;
  void * D.23149;
  _Bool D.23150;
  long int D.23151;
  long int D.23152;
  _Bool D.23157;
  long int D.23158;
  long int D.23159;
  struct MonoClass * D.23162;
  int iftmp.67;
  <unnamed-unsigned:22> D.23166;
  _Bool D.23170;
  long int D.23171;
  long int D.23172;
  _Bool D.23180;
  long int D.23181;
  long int D.23182;
  int do_free.68;
  <unnamed type> D.23188;
  void * D.23189;
  void * info;
  int i;
  int first_slot;
  int size;
  struct MonoDomain * domain;
  struct MonoClass * class;
  struct MonoGenericContext * class_context;
  struct MonoRuntimeGenericContextInfoTemplate oti;
  struct MonoGenericContext context;
  int rgctx_index;
  gboolean do_free;

  try
    {
      domain = class_vtable->domain;
      class = class_vtable->klass;
      D.23086 = class->generic_class;
      if (D.23086 != 0B) goto <D.23087>; else goto <D.23088>;
      <D.23087>:
      D.23086 = class->generic_class;
      iftmp.60 = &D.23086->context;
      goto <D.23089>;
      <D.23088>:
      iftmp.60 = 0B;
      <D.23089>:
      class_context = iftmp.60;
      if (class_context != 0B) goto <D.23091>; else goto <D.23092>;
      <D.23091>:
      iftmp.61 = class_context->class_inst;
      goto <D.23093>;
      <D.23092>:
      iftmp.61 = 0B;
      <D.23093>:
      context.class_inst = iftmp.61;
      context.method_inst = method_inst;
      D.23094 = rgctx == 0B;
      D.23095 = (long int) D.23094;
      D.23096 = __builtin_expect (D.23095, 0);
      if (D.23096 != 0) goto <D.23097>; else goto <D.23098>;
      <D.23097>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1840, "rgctx");
      <D.23098>:
      {
        int ret;

        D.23099 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23099);
        if (ret != 0) goto <D.23100>; else goto <D.23101>;
        <D.23100>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23101>:
        D.23102 = ret != 0;
        D.23103 = (long int) D.23102;
        D.23104 = __builtin_expect (D.23103, 0);
        if (D.23104 != 0) goto <D.23105>; else goto <D.23106>;
        <D.23105>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1842, "ret == 0");
        <D.23106>:
      }
      first_slot = 0;
      D.23107 = method_inst != 0B;
      D.23108 = (int) D.23107;
      size = mono_class_rgctx_get_array_size (0, D.23108);
      if (method_inst != 0B) goto <D.23109>; else goto <D.23110>;
      <D.23109>:
      size.62 = (unsigned int) size;
      D.23112 = size.62 + 4294967294;
      size = (int) D.23112;
      <D.23110>:
      i = 0;
      <D.22160>:
      {
        int offset;

        if (method_inst != 0B) goto <D.23115>; else goto <D.23113>;
        <D.23115>:
        if (i == 0) goto <D.23116>; else goto <D.23113>;
        <D.23116>:
        offset = 2;
        goto <D.23114>;
        <D.23113>:
        offset = 0;
        <D.23114>:
        D.23117 = first_slot + size;
        D.23118 = D.23117 + -1;
        D.23119 = (unsigned int) D.23118;
        if (D.23119 > slot) goto <D.23120>; else goto <D.23121>;
        <D.23120>:
        first_slot.63 = (unsigned int) first_slot;
        D.23123 = slot - first_slot.63;
        offset.64 = (unsigned int) offset;
        D.23125 = D.23123 + offset.64;
        D.23126 = D.23125 + 1;
        rgctx_index = (int) D.23126;
        rgctx_index.65 = (unsigned int) rgctx_index;
        D.23128 = rgctx_index.65 * 4;
        D.23129 = rgctx + D.23128;
        info = *D.23129;
        if (info != 0B) goto <D.23130>; else goto <D.23131>;
        <D.23130>:
        {
          int ret;

          D.23099 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.23099);
          if (ret != 0) goto <D.23132>; else goto <D.23133>;
          <D.23132>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.23133>:
          D.23134 = ret != 0;
          D.23135 = (long int) D.23134;
          D.23136 = __builtin_expect (D.23135, 0);
          if (D.23136 != 0) goto <D.23137>; else goto <D.23138>;
          <D.23137>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1863, "ret == 0");
          <D.23138>:
        }
        D.23139 = info;
        return D.23139;
        <D.23131>:
        goto <D.22159>;
        <D.23121>:
        offset.66 = (unsigned int) offset;
        D.23141 = offset.66 * 4;
        D.23142 = rgctx + D.23141;
        D.23143 = *D.23142;
        if (D.23143 == 0B) goto <D.23144>; else goto <D.23145>;
        <D.23144>:
        offset.66 = (unsigned int) offset;
        D.23141 = offset.66 * 4;
        D.23142 = rgctx + D.23141;
        D.23146 = i + 1;
        D.23107 = method_inst != 0B;
        D.23108 = (int) D.23107;
        D.23147 = alloc_rgctx_array (domain, D.23146, D.23108);
        *D.23142 = D.23147;
        <D.23145>:
        offset.66 = (unsigned int) offset;
        D.23141 = offset.66 * 4;
        D.23142 = rgctx + D.23141;
        rgctx = *D.23142;
        D.23148 = size + -1;
        first_slot = D.23148 + first_slot;
        D.23146 = i + 1;
        D.23107 = method_inst != 0B;
        D.23108 = (int) D.23107;
        size = mono_class_rgctx_get_array_size (D.23146, D.23108);
      }
      i = i + 1;
      goto <D.22160>;
      <D.22159>:
      rgctx_index.65 = (unsigned int) rgctx_index;
      D.23128 = rgctx_index.65 * 4;
      D.23129 = rgctx + D.23128;
      D.23149 = *D.23129;
      D.23150 = D.23149 != 0B;
      D.23151 = (long int) D.23150;
      D.23152 = __builtin_expect (D.23151, 0);
      if (D.23152 != 0) goto <D.23153>; else goto <D.23154>;
      <D.23153>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1875, "!rgctx [rgctx_index]");
      <D.23154>:
      {
        int ret;

        D.23099 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23099);
        if (ret != 0) goto <D.23155>; else goto <D.23156>;
        <D.23155>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23156>:
        D.23157 = ret != 0;
        D.23158 = (long int) D.23157;
        D.23159 = __builtin_expect (D.23158, 0);
        if (D.23159 != 0) goto <D.23160>; else goto <D.23161>;
        <D.23160>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1877, "ret == 0");
        <D.23161>:
      }
      D.23162 = get_shared_class (class);
      if (method_inst != 0B) goto <D.23164>; else goto <D.23165>;
      <D.23164>:
      D.23166 = method_inst->type_argc;
      iftmp.67 = (int) D.23166;
      goto <D.23167>;
      <D.23165>:
      iftmp.67 = 0;
      <D.23167>:
      oti = class_get_rgctx_template_oti (D.23162, iftmp.67, slot, 1, 1, &do_free);
      info = instantiate_info (domain, &oti, &context, class, caller);
      {
        int ret;

        D.23099 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23099);
        if (ret != 0) goto <D.23168>; else goto <D.23169>;
        <D.23168>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23169>:
        D.23170 = ret != 0;
        D.23171 = (long int) D.23170;
        D.23172 = __builtin_expect (D.23171, 0);
        if (D.23172 != 0) goto <D.23173>; else goto <D.23174>;
        <D.23173>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1890, "ret == 0");
        <D.23174>:
      }
      rgctx_index.65 = (unsigned int) rgctx_index;
      D.23128 = rgctx_index.65 * 4;
      D.23129 = rgctx + D.23128;
      D.23149 = *D.23129;
      if (D.23149 != 0B) goto <D.23175>; else goto <D.23176>;
      <D.23175>:
      rgctx_index.65 = (unsigned int) rgctx_index;
      D.23128 = rgctx_index.65 * 4;
      D.23129 = rgctx + D.23128;
      info = *D.23129;
      goto <D.23177>;
      <D.23176>:
      rgctx_index.65 = (unsigned int) rgctx_index;
      D.23128 = rgctx_index.65 * 4;
      D.23129 = rgctx + D.23128;
      *D.23129 = info;
      <D.23177>:
      {
        int ret;

        D.23099 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23099);
        if (ret != 0) goto <D.23178>; else goto <D.23179>;
        <D.23178>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23179>:
        D.23180 = ret != 0;
        D.23181 = (long int) D.23180;
        D.23182 = __builtin_expect (D.23181, 0);
        if (D.23182 != 0) goto <D.23183>; else goto <D.23184>;
        <D.23183>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1899, "ret == 0");
        <D.23184>:
      }
      do_free.68 = do_free;
      if (do_free.68 != 0) goto <D.23186>; else goto <D.23187>;
      <D.23186>:
      D.23188 = oti.info_type;
      D.23189 = oti.data;
      free_inflated_info (D.23188, D.23189);
      <D.23187>:
      D.23139 = info;
      return D.23139;
    }
  finally
    {
      oti = {CLOBBER};
      context = {CLOBBER};
      do_free = {CLOBBER};
    }
}


instantiate_info (struct MonoDomain * domain, struct MonoRuntimeGenericContextInfoTemplate * oti, struct MonoGenericContext * context, struct MonoClass * class, guint8 * caller)
{
  void * D.23192;
  void * D.23195;
  <unnamed type> D.23196;
  _Bool D.23197;
  long int D.23198;
  long int D.23199;
  int D.23204;
  struct MonoMethod * D.23205;
  struct MonoClass * D.23207;
  unsigned int D.23208;
  unsigned int D.23209;
  struct MonoType * D.23211;
  short unsigned int D.23212;
  int D.23213;
  int D.23214;
  int D.23216;
  unsigned int D.23217;
  unsigned int D.23218;
  unsigned int D.23219;
  unsigned int D.23220;
  _Bool D.23221;
  long int D.23222;
  long int D.23223;
  struct MonoGenericInst * D.23226;
  _Bool D.23227;
  long int D.23228;
  long int D.23229;
  struct MonoClass * D.23232;
  struct MonoException * D.23235;
  unsigned int D.23236;
  unsigned int D.23237;
  _Bool D.23238;
  long int D.23239;
  long int D.23240;
  struct MonoGenericInst * D.23243;
  _Bool D.23244;
  long int D.23245;
  long int D.23246;
  _Bool D.23249;
  long int D.23250;
  long int D.23251;
  struct MonoDomain * D.23254;
  void * D.23255;
  _Bool D.23256;
  long int D.23257;
  long int D.23258;
  _Bool D.23261;
  long int D.23262;
  long int D.23263;
  struct MonoGenericSharingContext * D.23266;
  _Bool D.23267;
  unsigned int D.23268;
  unsigned int D.23269;
  _Bool D.23270;
  long int D.23271;
  long int D.23272;
  struct MonoClass * D.23282;
  struct MonoClass * D.23283;
  struct MonoClass * D.23284;
  int D.21954;
  int iftmp.69;
  int D.21953;
  const char[7] * D.23289;
  unsigned char D.23290;
  int D.23291;
  unsigned char D.23292;
  int D.23293;
  const unsigned char * D.23298;
  unsigned char D.23299;
  int D.23300;
  const unsigned char * D.23301;
  unsigned char D.23302;
  int D.23303;
  const unsigned char * D.23308;
  unsigned char D.23309;
  int D.23310;
  const unsigned char * D.23311;
  unsigned char D.23312;
  int D.23313;
  const unsigned char * D.23318;
  unsigned char D.23319;
  int D.23320;
  const unsigned char * D.23321;
  unsigned char D.23322;
  int D.23323;
  const char * D.23325;
  unsigned int D.23327;
  unsigned int D.23328;
  int imt_slot.70;
  int D.23332;
  int D.23334;
  int D.23335;
  unsigned int D.23336;
  unsigned int D.23337;
  struct MonoDomain * D.23341;
  void * D.23342;
  _Bool D.23343;
  long int D.23344;
  long int D.23345;
  _Bool D.23348;
  long int D.23349;
  long int D.23350;
  struct MonoDomain * D.23353;
  void * D.23354;
  _Bool D.23357;
  long int D.23358;
  long int D.23359;
  struct MonoGenericSharingContext * D.23368;
  struct MonoMethodSignature * D.23371;
  struct MonoMethod * D.23375;
  void * D.23376;
  struct MonoGenericSharingContext * D.23377;
  struct GPtrArray * D.23378;
  unsigned int D.23379;
  unsigned int D.23380;
  unsigned int D.23381;
  void * * D.23382;
  unsigned int i.71;
  unsigned int D.23384;
  void * * D.23385;
  <unnamed type> D.23386;
  int align.72;
  unsigned int align.73;
  int D.23391;
  int D.23396;
  int D.23397;
  void * offset.74;
  void * D.23399;
  unsigned int i.75;
  void * data;
  gboolean temporary;

  D.23192 = oti->data;
  if (D.23192 == 0B) goto <D.23193>; else goto <D.23194>;
  <D.23193>:
  D.23195 = 0B;
  return D.23195;
  <D.23194>:
  D.23196 = oti->info_type;
  switch (D.23196) <default: <D.21899>, case 0: <D.21894>, case 1: <D.21895>, case 2: <D.21896>, case 12: <D.21897>>
  <D.21894>:
  <D.21895>:
  <D.21896>:
  <D.21897>:
  temporary = 1;
  goto <D.21898>;
  <D.21899>:
  temporary = 0;
  <D.21898>:
  data = inflate_info (oti, context, class, temporary);
  D.23196 = oti->info_type;
  switch (D.23196) <default: <D.21975>, case 0: <D.21900>, case 1: <D.21901>, case 2: <D.21902>, case 3: <D.21912>, case 4: <D.21913>, case 5: <D.21914>, case 6: <D.21915>, case 7: <D.21919>, case 8: <D.21922>, case 9: <D.21925>, case 10: <D.21917>, case 11: <D.21918>, case 12: <D.21903>, case 13: <D.21904>, case 14: <D.21905>, case 15: <D.21920>, case 16: <D.21933>, case 17: <D.21934>, case 18: <D.21927>, case 19: <D.21906>, case 20: <D.21960>, case 22: <D.21907>, case 23: <D.21908>, case 24: <D.21909>, case 25: <D.21910>>
  <D.21900>:
  <D.21901>:
  <D.21902>:
  <D.21903>:
  <D.21904>:
  <D.21905>:
  <D.21906>:
  <D.21907>:
  <D.21908>:
  <D.21909>:
  <D.21910>:
  {
    struct MonoClass * arg_class;

    arg_class = mono_class_from_mono_type (data);
    D.23196 = oti->info_type;
    free_inflated_info (D.23196, data);
    D.23197 = arg_class == 0B;
    D.23198 = (long int) D.23197;
    D.23199 = __builtin_expect (D.23198, 0);
    if (D.23199 != 0) goto <D.23200>; else goto <D.23201>;
    <D.23200>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1239, "arg_class");
    <D.23201>:
    D.23196 = oti->info_type;
    if (D.23196 == 1) goto <D.23202>; else goto <D.23203>;
    <D.23202>:
    mono_class_compute_gc_descriptor (arg_class);
    <D.23203>:
    D.23196 = oti->info_type;
    D.23195 = class_type_info (domain, arg_class, D.23196);
    return D.23195;
  }
  <D.21912>:
  D.23195 = data;
  return D.23195;
  <D.21913>:
  D.23195 = mono_type_get_object (domain, data);
  return D.23195;
  <D.21914>:
  D.23195 = data;
  return D.23195;
  <D.21915>:
  {
    void * addr;

    addr = mono_compile_method (data);
    D.23204 = mono_method_needs_static_rgctx_invoke (data, 0);
    D.23195 = mini_add_method_trampoline (0B, data, addr, D.23204, 0);
    return D.23195;
  }
  <D.21917>:
  D.23205 = mono_marshal_get_remoting_invoke_with_check (data);
  D.23195 = mono_compile_method (D.23205);
  return D.23195;
  <D.21918>:
  D.23195 = mono_domain_alloc0 (domain, 4);
  return D.23195;
  <D.21919>:
  D.23195 = data;
  return D.23195;
  <D.21920>:
  {
    struct MonoClassField * field;

    field = data;
    D.23207 = field->parent;
    D.23208 = BIT_FIELD_REF <*D.23207, 32, 160>;
    D.23209 = D.23208 & 8;
    if (D.23209 != 0) goto <D.23210>; else goto <D.23206>;
    <D.23210>:
    D.23211 = field->type;
    D.23212 = D.23211->attrs;
    D.23213 = (int) D.23212;
    D.23214 = D.23213 & 16;
    if (D.23214 == 0) goto <D.23215>; else goto <D.23206>;
    <D.23215>:
    D.23216 = field->offset;
    D.23217 = (unsigned int) D.23216;
    D.23218 = D.23217 + 4294967288;
    D.23195 = (void *) D.23218;
    return D.23195;
    <D.23206>:
    D.23216 = field->offset;
    D.23195 = (void *) D.23216;
    return D.23195;
  }
  <D.21922>:
  {
    struct MonoMethodInflated * method;
    struct MonoVTable * vtable;

    method = data;
    D.23219 = BIT_FIELD_REF <*method, 32, 160>;
    D.23220 = D.23219 & 4096;
    D.23221 = D.23220 == 0;
    D.23222 = (long int) D.23221;
    D.23223 = __builtin_expect (D.23222, 0);
    if (D.23223 != 0) goto <D.23224>; else goto <D.23225>;
    <D.23224>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1281, "method->method.method.is_inflated");
    <D.23225>:
    D.23226 = method->context.method_inst;
    D.23227 = D.23226 == 0B;
    D.23228 = (long int) D.23227;
    D.23229 = __builtin_expect (D.23228, 0);
    if (D.23229 != 0) goto <D.23230>; else goto <D.23231>;
    <D.23230>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1282, "method->context.method_inst");
    <D.23231>:
    D.23232 = method->method.method.klass;
    vtable = mono_class_vtable (domain, D.23232);
    if (vtable == 0B) goto <D.23233>; else goto <D.23234>;
    <D.23233>:
    D.23232 = method->method.method.klass;
    D.23235 = mono_class_get_exception_for_failure (D.23232);
    mono_raise_exception (D.23235);
    <D.23234>:
    D.23226 = method->context.method_inst;
    D.23195 = mono_method_lookup_rgctx (vtable, D.23226);
    return D.23195;
  }
  <D.21925>:
  {
    struct MonoMethodInflated * method;

    method = data;
    D.23236 = BIT_FIELD_REF <*method, 32, 160>;
    D.23237 = D.23236 & 4096;
    D.23238 = D.23237 == 0;
    D.23239 = (long int) D.23238;
    D.23240 = __builtin_expect (D.23239, 0);
    if (D.23240 != 0) goto <D.23241>; else goto <D.23242>;
    <D.23241>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1293, "method->method.method.is_inflated");
    <D.23242>:
    D.23243 = method->context.method_inst;
    D.23244 = D.23243 == 0B;
    D.23245 = (long int) D.23244;
    D.23246 = __builtin_expect (D.23245, 0);
    if (D.23246 != 0) goto <D.23247>; else goto <D.23248>;
    <D.23247>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1294, "method->context.method_inst");
    <D.23248>:
    D.23195 = method->context.method_inst;
    return D.23195;
  }
  <D.21927>:
  {
    struct MonoMethodSignature * gsig;
    struct MonoMethodSignature * sig;
    void * addr;
    struct MonoJitInfo * caller_ji;
    struct MonoGenericJitInfo * gji;

    gsig = oti->data;
    sig = data;
    D.23249 = caller == 0B;
    D.23250 = (long int) D.23249;
    D.23251 = __builtin_expect (D.23250, 0);
    if (D.23251 != 0) goto <D.23252>; else goto <D.23253>;
    <D.23252>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1310, "caller");
    <D.23253>:
    D.23254 = mono_domain_get ();
    D.23255 = mono_get_addr_from_ftnptr (caller);
    caller_ji = mini_jit_info_table_find (D.23254, D.23255, 0B);
    D.23256 = caller_ji == 0B;
    D.23257 = (long int) D.23256;
    D.23258 = __builtin_expect (D.23257, 0);
    if (D.23258 != 0) goto <D.23259>; else goto <D.23260>;
    <D.23259>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1312, "caller_ji");
    <D.23260>:
    gji = mono_jit_info_get_generic_jit_info (caller_ji);
    D.23261 = gji == 0B;
    D.23262 = (long int) D.23261;
    D.23263 = __builtin_expect (D.23262, 0);
    if (D.23263 != 0) goto <D.23264>; else goto <D.23265>;
    <D.23264>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1314, "gji");
    <D.23265>:
    D.23266 = gji->generic_sharing_context;
    addr = mini_get_gsharedvt_wrapper (0, 0B, sig, gsig, D.23266, -1, 1);
    D.23195 = addr;
    return D.23195;
  }
  <D.21933>:
  <D.21934>:
  {
    struct MonoJumpInfoGSharedVtCall * call_info;
    struct MonoMethodSignature * call_sig;
    struct MonoMethod * method;
    void * addr;
    struct MonoJitInfo * caller_ji;
    struct MonoJitInfo * callee_ji;
    gboolean virtual;
    gint32 vcall_offset;
    struct MonoGenericJitInfo * gji;
    struct MonoGenericJitInfo * callee_gji;
    gboolean callee_gsharedvt;

    call_info = data;
    D.23196 = oti->info_type;
    D.23267 = D.23196 == 17;
    virtual = (gboolean) D.23267;
    callee_gji = 0B;
    call_sig = call_info->sig;
    method = call_info->method;
    D.23268 = BIT_FIELD_REF <*method, 32, 160>;
    D.23269 = D.23268 & 4096;
    D.23270 = D.23269 == 0;
    D.23271 = (long int) D.23270;
    D.23272 = __builtin_expect (D.23271, 0);
    if (D.23272 != 0) goto <D.23273>; else goto <D.23274>;
    <D.23273>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1337, "method->is_inflated");
    <D.23274>:
    if (virtual == 0) goto <D.23275>; else goto <D.23276>;
    <D.23275>:
    addr = mono_compile_method (method);
    goto <D.23277>;
    <D.23276>:
    addr = 0B;
    <D.23277>:
    if (virtual != 0) goto <D.23278>; else goto <D.23279>;
    <D.23278>:
    D.23282 = method->klass;
    D.23283 = D.23282->parent;
    D.23284 = mono_defaults.multicastdelegate_class;
    if (D.23283 == D.23284) goto <D.23285>; else goto <D.23280>;
    <D.23285>:
    {
      size_t __s1_len;
      size_t __s2_len;

      __s2_len = 6;
      if (__s2_len <= 3) goto <D.23287>; else goto <D.23288>;
      <D.23287>:
      {
        const unsigned char * __s2;
        int __result;

        __s2 = method->name;
        D.23289 = "Invoke";
        D.23290 = MEM[(const unsigned char *)D.23289];
        D.23291 = (int) D.23290;
        D.23292 = *__s2;
        D.23293 = (int) D.23292;
        __result = D.23291 - D.23293;
        {
          if (__s2_len != 0) goto <D.23294>; else goto <D.23295>;
          <D.23294>:
          if (__result == 0) goto <D.23296>; else goto <D.23297>;
          <D.23296>:
          D.23298 = &MEM[(void *)"Invoke" + 1B];
          D.23299 = *D.23298;
          D.23300 = (int) D.23299;
          D.23301 = __s2 + 1;
          D.23302 = *D.23301;
          D.23303 = (int) D.23302;
          __result = D.23300 - D.23303;
          if (__s2_len > 1) goto <D.23304>; else goto <D.23305>;
          <D.23304>:
          if (__result == 0) goto <D.23306>; else goto <D.23307>;
          <D.23306>:
          D.23308 = &MEM[(void *)"Invoke" + 2B];
          D.23309 = *D.23308;
          D.23310 = (int) D.23309;
          D.23311 = __s2 + 2;
          D.23312 = *D.23311;
          D.23313 = (int) D.23312;
          __result = D.23310 - D.23313;
          if (__s2_len > 2) goto <D.23314>; else goto <D.23315>;
          <D.23314>:
          if (__result == 0) goto <D.23316>; else goto <D.23317>;
          <D.23316>:
          D.23318 = &MEM[(void *)"Invoke" + 3B];
          D.23319 = *D.23318;
          D.23320 = (int) D.23319;
          D.23321 = __s2 + 3;
          D.23322 = *D.23321;
          D.23323 = (int) D.23322;
          __result = D.23320 - D.23323;
          <D.23317>:
          <D.23315>:
          <D.23307>:
          <D.23305>:
          <D.23297>:
          <D.23295>:
        }
        D.21953 = __result;
      }
      iftmp.69 = -D.21953;
      goto <D.23324>;
      <D.23288>:
      D.23325 = method->name;
      iftmp.69 = __builtin_strcmp (D.23325, "Invoke");
      <D.23324>:
      D.21954 = iftmp.69;
    }
    if (D.21954 == 0) goto <D.23326>; else goto <D.23280>;
    <D.23326>:
    vcall_offset = -2;
    goto <D.23281>;
    <D.23280>:
    D.23282 = method->klass;
    D.23327 = D.23282->flags;
    D.23328 = D.23327 & 32;
    if (D.23328 != 0) goto <D.23329>; else goto <D.23330>;
    <D.23329>:
    {
      guint32 imt_slot;

      imt_slot = mono_method_get_imt_slot (method);
      imt_slot.70 = (int) imt_slot;
      D.23332 = imt_slot.70 + -19;
      vcall_offset = D.23332 * 4;
    }
    goto <D.23333>;
    <D.23330>:
    D.23334 = mono_method_get_vtable_index (method);
    D.23335 = D.23334 * 4;
    D.23336 = (unsigned int) D.23335;
    D.23337 = D.23336 + 32;
    vcall_offset = (gint32) D.23337;
    <D.23333>:
    <D.23281>:
    goto <D.23338>;
    <D.23279>:
    vcall_offset = -1;
    <D.23338>:
    D.23249 = caller == 0B;
    D.23250 = (long int) D.23249;
    D.23251 = __builtin_expect (D.23250, 0);
    if (D.23251 != 0) goto <D.23339>; else goto <D.23340>;
    <D.23339>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1364, "caller");
    <D.23340>:
    D.23341 = mono_domain_get ();
    D.23342 = mono_get_addr_from_ftnptr (caller);
    caller_ji = mini_jit_info_table_find (D.23341, D.23342, 0B);
    D.23343 = caller_ji == 0B;
    D.23344 = (long int) D.23343;
    D.23345 = __builtin_expect (D.23344, 0);
    if (D.23345 != 0) goto <D.23346>; else goto <D.23347>;
    <D.23346>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1366, "caller_ji");
    <D.23347>:
    gji = mono_jit_info_get_generic_jit_info (caller_ji);
    D.23348 = gji == 0B;
    D.23349 = (long int) D.23348;
    D.23350 = __builtin_expect (D.23349, 0);
    if (D.23350 != 0) goto <D.23351>; else goto <D.23352>;
    <D.23351>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1368, "gji");
    <D.23352>:
    D.23353 = mono_domain_get ();
    D.23354 = mono_get_addr_from_ftnptr (addr);
    callee_ji = mini_jit_info_table_find (D.23353, D.23354, 0B);
    callee_gsharedvt = ji_is_gsharedvt (callee_ji);
    if (callee_gsharedvt != 0) goto <D.23355>; else goto <D.23356>;
    <D.23355>:
    callee_gji = mono_jit_info_get_generic_jit_info (callee_ji);
    D.23357 = callee_gji == 0B;
    D.23358 = (long int) D.23357;
    D.23359 = __builtin_expect (D.23358, 0);
    if (D.23359 != 0) goto <D.23360>; else goto <D.23361>;
    <D.23360>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1375, "callee_gji");
    <D.23361>:
    <D.23356>:
    if (virtual != 0) goto <D.23362>; else goto <D.23365>;
    <D.23365>:
    if (callee_gsharedvt == 0) goto <D.23362>; else goto <D.23363>;
    <D.23362>:
    {
      struct MonoMethodSignature * sig;
      struct MonoMethodSignature * gsig;

      D.23268 = BIT_FIELD_REF <*method, 32, 160>;
      D.23269 = D.23268 & 4096;
      D.23270 = D.23269 == 0;
      D.23271 = (long int) D.23270;
      D.23272 = __builtin_expect (D.23271, 0);
      if (D.23272 != 0) goto <D.23366>; else goto <D.23367>;
      <D.23366>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1392, "method->is_inflated");
      <D.23367>:
      sig = mono_method_signature (method);
      gsig = call_sig;
      D.23368 = gji->generic_sharing_context;
      addr = mini_get_gsharedvt_wrapper (0, addr, sig, gsig, D.23368, vcall_offset, 0);
    }
    goto <D.23364>;
    <D.23363>:
    if (callee_gsharedvt != 0) goto <D.23369>; else goto <D.23370>;
    <D.23369>:
    {
      struct MonoMethodSignature * sig;
      struct MonoMethodSignature * gsig;

      D.23371 = mono_method_signature (method);
      if (D.23371 == call_sig) goto <D.23372>; else goto <D.23373>;
      <D.23372>:
      goto <D.23374>;
      <D.23373>:
      sig = mono_method_signature (method);
      D.23375 = jinfo_get_method (callee_ji);
      gsig = mono_method_signature (D.23375);
      D.23376 = callee_ji->code_start;
      D.23377 = callee_gji->generic_sharing_context;
      addr = mini_get_gsharedvt_wrapper (1, D.23376, sig, gsig, D.23377, -1, 0);
      sig = mono_method_signature (method);
      gsig = call_sig;
      D.23368 = gji->generic_sharing_context;
      addr = mini_get_gsharedvt_wrapper (0, addr, sig, gsig, D.23368, -1, 0);
      <D.23374>:
    }
    <D.23370>:
    <D.23364>:
    D.23195 = addr;
    return D.23195;
  }
  <D.21960>:
  {
    struct MonoGSharedVtMethodInfo * info;
    struct MonoGSharedVtMethodRuntimeInfo * res;
    struct MonoType * t;
    int i;
    int offset;
    int align;
    int size;

    try
      {
        info = data;
        D.23378 = info->entries;
        D.23379 = D.23378->len;
        D.23380 = D.23379 + 1;
        D.23381 = D.23380 * 4;
        res = monoeg_malloc0 (D.23381);
        offset = 0;
        i = 0;
        goto <D.21973>;
        <D.21972>:
        {
          struct MonoRuntimeGenericContextInfoTemplate * template;

          D.23378 = info->entries;
          D.23382 = D.23378->pdata;
          i.71 = (unsigned int) i;
          D.23384 = i.71 * 4;
          D.23385 = D.23382 + D.23384;
          template = *D.23385;
          D.23386 = template->info_type;
          switch (D.23386) <default: <D.21971>, case 21: <D.21969>>
          <D.21969>:
          t = template->data;
          size = mono_type_size (t, &align);
          align.72 = align;
          align.73 = (unsigned int) align.72;
          if (align.73 <= 3) goto <D.23389>; else goto <D.23390>;
          <D.23389>:
          align = 4;
          <D.23390>:
          D.23391 = mono_type_is_struct (t);
          if (D.23391 != 0) goto <D.23392>; else goto <D.23393>;
          <D.23392>:
          align.72 = align;
          align.73 = (unsigned int) align.72;
          if (align.73 <= 7) goto <D.23394>; else goto <D.23395>;
          <D.23394>:
          align = 8;
          <D.23395>:
          <D.23393>:
          align.72 = align;
          D.23396 = align.72 + -1;
          offset = D.23396 + offset;
          align.72 = align;
          D.23397 = -align.72;
          offset = D.23397 & offset;
          offset.74 = (void *) offset;
          res->entries[i] = offset.74;
          offset = offset + size;
          goto <D.21970>;
          <D.21971>:
          D.23399 = instantiate_info (domain, template, context, class, 0B);
          res->entries[i] = D.23399;
          goto <D.21970>;
          <D.21970>:
        }
        i = i + 1;
        <D.21973>:
        i.75 = (unsigned int) i;
        D.23378 = info->entries;
        D.23379 = D.23378->len;
        if (i.75 < D.23379) goto <D.21972>; else goto <D.21974>;
        <D.21974>:
        res->locals_size = offset;
        D.23195 = res;
        return D.23195;
      }
    finally
      {
        align = {CLOBBER};
      }
  }
  <D.21975>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1482);
  D.23195 = 0B;
  return D.23195;
}


class_type_info (struct MonoDomain * domain, struct MonoClass * class, MonoRgctxInfoType info_type)
{
  struct MonoException * D.23405;
  void * D.23406;
  struct MonoException * D.23409;
  void * * * D.23410;
  int D.23411;
  struct MonoType * D.23412;
  int D.23413;
  int D.23416;
  int D.23417;
  int D.23420;
  int D.23423;
  unsigned int size.76;
  unsigned int D.23428;
  unsigned int size.77;
  unsigned int align.78;
  struct MonoMethod * D.23441;
  struct MonoClass * D.23447;
  _Bool D.23448;
  long int D.23449;
  long int D.23450;
  void * * D.23453;
  struct MonoMethod * D.23456;
  _Bool D.23462;
  long int D.23463;
  long int D.23464;
  void * * D.23467;
  int D.23470;
  struct MonoDomain * D.23476;
  void * D.23477;
  _Bool D.23478;
  long int D.23479;
  long int D.23480;
  int D.23483;

  switch (info_type) <default: <D.21837>, case 0: <D.21804>, case 1: <D.21806>, case 2: <D.21807>, case 12: <D.21809>, case 13: <D.21811>, case 14: <D.21812>, case 19: <D.21813>, case 22: <D.21814>, case 23: <D.21815>, case 24: <D.21827>, case 25: <D.21828>>
  <D.21804>:
  {
    struct MonoVTable * vtable;

    vtable = mono_class_vtable (domain, class);
    if (vtable == 0B) goto <D.23403>; else goto <D.23404>;
    <D.23403>:
    D.23405 = mono_class_get_exception_for_failure (class);
    mono_raise_exception (D.23405);
    <D.23404>:
    D.23406 = mono_vtable_get_static_field_data (vtable);
    return D.23406;
  }
  <D.21806>:
  D.23406 = class;
  return D.23406;
  <D.21807>:
  {
    struct MonoVTable * vtable;

    vtable = mono_class_vtable (domain, class);
    if (vtable == 0B) goto <D.23407>; else goto <D.23408>;
    <D.23407>:
    D.23409 = mono_class_get_exception_for_failure (class);
    mono_raise_exception (D.23409);
    <D.23408>:
    D.23406 = vtable;
    return D.23406;
  }
  <D.21809>:
  {
    void * * * cache_data;

    cache_data = mono_domain_alloc0 (domain, 8);
    D.23410 = cache_data + 4;
    *D.23410 = class;
    D.23406 = cache_data;
    return D.23406;
  }
  <D.21811>:
  D.23411 = mono_class_array_element_size (class);
  D.23406 = (void *) D.23411;
  return D.23406;
  <D.21812>:
  D.23412 = &class->byval_arg;
  D.23413 = mono_type_is_reference (D.23412);
  if (D.23413 != 0) goto <D.23414>; else goto <D.23415>;
  <D.23414>:
  D.23406 = 4B;
  return D.23406;
  <D.23415>:
  D.23416 = mono_class_value_size (class, 0B);
  D.23406 = (void *) D.23416;
  return D.23406;
  <D.21813>:
  D.23412 = &class->byval_arg;
  D.23417 = mono_type_is_reference (D.23412);
  if (D.23417 != 0) goto <D.23418>; else goto <D.23419>;
  <D.23418>:
  D.23406 = 1B;
  return D.23406;
  <D.23419>:
  D.23420 = mono_class_is_nullable (class);
  if (D.23420 != 0) goto <D.23421>; else goto <D.23422>;
  <D.23421>:
  D.23406 = 2B;
  return D.23406;
  <D.23422>:
  D.23406 = 0B;
  return D.23406;
  <D.21814>:
  <D.21815>:
  {
    static struct MonoMethod * memcpy_method[17];
    static struct MonoMethod * bzero_method[17];
    struct MonoJitDomainInfo * domain_info;
    int size;
    guint32 align;

    try
      {
        domain_info = domain->runtime_info;
        D.23412 = &class->byval_arg;
        D.23423 = mono_type_is_reference (D.23412);
        if (D.23423 != 0) goto <D.23424>; else goto <D.23425>;
        <D.23424>:
        size = 4;
        align = 4;
        goto <D.23426>;
        <D.23425>:
        size = mono_class_value_size (class, &align);
        <D.23426>:
        size.76 = (unsigned int) size;
        D.23428 = size.76 + 4294967295;
        if (D.23428 > 1) goto <D.23429>; else goto <D.23430>;
        <D.23429>:
        if (size != 4) goto <D.23431>; else goto <D.23432>;
        <D.23431>:
        if (size != 8) goto <D.23433>; else goto <D.23434>;
        <D.23433>:
        size = 0;
        <D.23434>:
        <D.23432>:
        <D.23430>:
        size.77 = (unsigned int) size;
        align.78 = align;
        if (size.77 > align.78) goto <D.23437>; else goto <D.23438>;
        <D.23437>:
        size = 0;
        <D.23438>:
        if (info_type == 22) goto <D.23439>; else goto <D.23440>;
        <D.23439>:
        D.23441 = memcpy_method[size];
        if (D.23441 == 0B) goto <D.23442>; else goto <D.23443>;
        <D.23442>:
        {
          struct MonoMethod * m;
          char name[32];

          try
            {
              if (size == 0) goto <D.23444>; else goto <D.23445>;
              <D.23444>:
              sprintf (&name, "memcpy");
              goto <D.23446>;
              <D.23445>:
              sprintf (&name, "memcpy_aligned_%d", size);
              <D.23446>:
              D.23447 = mono_defaults.string_class;
              m = mono_class_get_method_from_name (D.23447, &name, 3);
              D.23448 = m == 0B;
              D.23449 = (long int) D.23448;
              D.23450 = __builtin_expect (D.23449, 0);
              if (D.23450 != 0) goto <D.23451>; else goto <D.23452>;
              <D.23451>:
              monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 991, "m");
              <D.23452>:
              mono_memory_barrier ();
              memcpy_method[size] = m;
            }
          finally
            {
              name = {CLOBBER};
            }
        }
        <D.23443>:
        D.23453 = domain_info->memcpy_addr[size];
        if (D.23453 == 0B) goto <D.23454>; else goto <D.23455>;
        <D.23454>:
        {
          void * addr;

          D.23441 = memcpy_method[size];
          addr = mono_compile_method (D.23441);
          mono_memory_barrier ();
          domain_info->memcpy_addr[size] = addr;
        }
        <D.23455>:
        D.23406 = domain_info->memcpy_addr[size];
        return D.23406;
        <D.23440>:
        D.23456 = bzero_method[size];
        if (D.23456 == 0B) goto <D.23457>; else goto <D.23458>;
        <D.23457>:
        {
          struct MonoMethod * m;
          char name[32];

          try
            {
              if (size == 0) goto <D.23459>; else goto <D.23460>;
              <D.23459>:
              sprintf (&name, "bzero");
              goto <D.23461>;
              <D.23460>:
              sprintf (&name, "bzero_aligned_%d", size);
              <D.23461>:
              D.23447 = mono_defaults.string_class;
              m = mono_class_get_method_from_name (D.23447, &name, 2);
              D.23462 = m == 0B;
              D.23463 = (long int) D.23462;
              D.23464 = __builtin_expect (D.23463, 0);
              if (D.23464 != 0) goto <D.23465>; else goto <D.23466>;
              <D.23465>:
              monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1011, "m");
              <D.23466>:
              mono_memory_barrier ();
              bzero_method[size] = m;
            }
          finally
            {
              name = {CLOBBER};
            }
        }
        <D.23458>:
        D.23467 = domain_info->bzero_addr[size];
        if (D.23467 == 0B) goto <D.23468>; else goto <D.23469>;
        <D.23468>:
        {
          void * addr;

          D.23456 = bzero_method[size];
          addr = mono_compile_method (D.23456);
          mono_memory_barrier ();
          domain_info->bzero_addr[size] = addr;
        }
        <D.23469>:
        D.23406 = domain_info->bzero_addr[size];
        return D.23406;
      }
    finally
      {
        align = {CLOBBER};
      }
  }
  <D.21827>:
  <D.21828>:
  {
    struct MonoMethod * method;
    void * addr;
    struct MonoJitInfo * ji;
    struct MonoGenericContext * ctx;

    D.23470 = mono_class_is_nullable (class);
    if (D.23470 == 0) goto <D.23471>; else goto <D.23472>;
    <D.23471>:
    D.23406 = 0B;
    return D.23406;
    <D.23472>:
    if (info_type == 24) goto <D.23473>; else goto <D.23474>;
    <D.23473>:
    method = mono_class_get_method_from_name (class, "Box", 1);
    goto <D.23475>;
    <D.23474>:
    method = mono_class_get_method_from_name (class, "Unbox", 1);
    <D.23475>:
    addr = mono_compile_method (method);
    D.23476 = mono_domain_get ();
    D.23477 = mono_get_addr_from_ftnptr (addr);
    ji = mini_jit_info_table_find (D.23476, D.23477, 0B);
    D.23478 = ji == 0B;
    D.23479 = (long int) D.23478;
    D.23480 = __builtin_expect (D.23479, 0);
    if (D.23480 != 0) goto <D.23481>; else goto <D.23482>;
    <D.23481>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1042, "ji");
    <D.23482>:
    D.23483 = mini_jit_info_is_gsharedvt (ji);
    if (D.23483 != 0) goto <D.23484>; else goto <D.23485>;
    <D.23484>:
    D.23406 = mono_create_static_rgctx_trampoline (method, addr);
    return D.23406;
    <D.23485>:
    {
      struct MonoGenericSharingContext gsctx;
      struct MonoMethodSignature * sig;
      struct MonoMethodSignature * gsig;
      struct MonoMethod * gmethod;

      try
        {
          gmethod = mini_get_shared_method (method);
          sig = mono_method_signature (method);
          gsig = mono_method_signature (gmethod);
          ctx = mono_method_get_context (gmethod);
          mini_init_gsctx (ctx, &gsctx);
          addr = mini_get_gsharedvt_wrapper (0, addr, sig, gsig, &gsctx, -1, 0);
          addr = mono_create_static_rgctx_trampoline (method, addr);
          D.23406 = addr;
          return D.23406;
        }
      finally
        {
          gsctx = {CLOBBER};
        }
    }
  }
  <D.21837>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1065);
  D.23406 = 0B;
  return D.23406;
}


sprintf (char * restrict __s, const char * restrict __fmt)
{
  int D.23489;
  unsigned int D.23490;

  D.23490 = __builtin_object_size (__s, 1);
  D.23489 = __builtin___sprintf_chk (__s, 1, D.23490, __fmt, __builtin_va_arg_pack ());
  return D.23489;
}


ji_is_gsharedvt (struct MonoJitInfo * ji)
{
  unsigned int D.23495;
  unsigned int D.23496;
  struct MonoGenericSharingContext * D.23498;
  gboolean * D.23499;
  struct MonoGenericSharingContext * D.23501;
  gboolean * D.23502;
  gboolean D.23503;

  if (ji != 0B) goto <D.23494>; else goto <D.23492>;
  <D.23494>:
  D.23495 = BIT_FIELD_REF <*ji, 32, 160>;
  D.23496 = D.23495 & 131072;
  if (D.23496 != 0) goto <D.23497>; else goto <D.23492>;
  <D.23497>:
  D.23498 = mono_jit_info_get_generic_sharing_context (ji);
  D.23499 = D.23498->var_is_vt;
  if (D.23499 != 0B) goto <D.23493>; else goto <D.23500>;
  <D.23500>:
  D.23501 = mono_jit_info_get_generic_sharing_context (ji);
  D.23502 = D.23501->mvar_is_vt;
  if (D.23502 != 0B) goto <D.23493>; else goto <D.23492>;
  <D.23493>:
  D.23503 = 1;
  return D.23503;
  <D.23492>:
  D.23503 = 0;
  return D.23503;
}


jinfo_get_method (struct MonoJitInfo * ji)
{
  struct MonoMethod * D.23505;

  D.23505 = mono_jit_info_get_method (ji);
  return D.23505;
}


mono_method_fill_runtime_generic_context (struct MonoMethodRuntimeGenericContext * mrgctx, guint8 * caller, guint32 slot)
{
  struct MonoVTable * D.23507;
  struct MonoGenericInst * D.23508;
  void * D.23509;
  void * info;

  D.23507 = mrgctx->class_vtable;
  D.23508 = mrgctx->method_inst;
  info = fill_runtime_generic_context (D.23507, mrgctx, caller, slot, D.23508);
  D.23509 = info;
  return D.23509;
}


mono_method_lookup_rgctx (struct MonoVTable * class_vtable, struct MonoGenericInst * method_inst)
{
  struct MonoClass * D.23511;
  struct MonoGenericContainer * D.23512;
  _Bool D.23513;
  long int D.23514;
  long int D.23515;
  unsigned int D.23518;
  unsigned int D.23519;
  _Bool D.23520;
  long int D.23521;
  long int D.23522;
  union mono_mutex_t * D.23525;
  _Bool D.23528;
  long int D.23529;
  long int D.23530;
  struct GHashTable * D.23533;
  struct GHashTable * D.23536;
  _Bool D.23541;
  long int D.23542;
  long int D.23543;
  _Bool D.23546;
  long int D.23547;
  long int D.23548;
  struct MonoMethodRuntimeGenericContext * D.23551;
  struct MonoDomain * domain;
  struct MonoMethodRuntimeGenericContext * mrgctx;
  struct MonoMethodRuntimeGenericContext key;

  try
    {
      domain = class_vtable->domain;
      D.23511 = class_vtable->klass;
      D.23512 = D.23511->generic_container;
      D.23513 = D.23512 != 0B;
      D.23514 = (long int) D.23513;
      D.23515 = __builtin_expect (D.23514, 0);
      if (D.23515 != 0) goto <D.23516>; else goto <D.23517>;
      <D.23516>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2002, "!class_vtable->klass->generic_container");
      <D.23517>:
      D.23518 = BIT_FIELD_REF <*method_inst, 32, 32>;
      D.23519 = D.23518 & 4194304;
      D.23520 = D.23519 != 0;
      D.23521 = (long int) D.23520;
      D.23522 = __builtin_expect (D.23521, 0);
      if (D.23522 != 0) goto <D.23523>; else goto <D.23524>;
      <D.23523>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2003, "!method_inst->is_open");
      <D.23524>:
      {
        int ret;

        D.23525 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23525);
        if (ret != 0) goto <D.23526>; else goto <D.23527>;
        <D.23526>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23527>:
        D.23528 = ret != 0;
        D.23529 = (long int) D.23528;
        D.23530 = __builtin_expect (D.23529, 0);
        if (D.23530 != 0) goto <D.23531>; else goto <D.23532>;
        <D.23531>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2005, "ret == 0");
        <D.23532>:
      }
      D.23533 = domain->method_rgctx_hash;
      if (D.23533 == 0B) goto <D.23534>; else goto <D.23535>;
      <D.23534>:
      D.23536 = monoeg_g_hash_table_new (mrgctx_hash_func, mrgctx_equal_func);
      domain->method_rgctx_hash = D.23536;
      <D.23535>:
      key.class_vtable = class_vtable;
      key.method_inst = method_inst;
      D.23533 = domain->method_rgctx_hash;
      mrgctx = monoeg_g_hash_table_lookup (D.23533, &key);
      if (mrgctx == 0B) goto <D.23537>; else goto <D.23538>;
      <D.23537>:
      mrgctx = alloc_rgctx_array (domain, 0, 1);
      mrgctx->class_vtable = class_vtable;
      mrgctx->method_inst = method_inst;
      D.23533 = domain->method_rgctx_hash;
      monoeg_g_hash_table_insert_replace (D.23533, mrgctx, mrgctx, 0);
      <D.23538>:
      {
        int ret;

        D.23525 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23525);
        if (ret != 0) goto <D.23539>; else goto <D.23540>;
        <D.23539>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23540>:
        D.23541 = ret != 0;
        D.23542 = (long int) D.23541;
        D.23543 = __builtin_expect (D.23542, 0);
        if (D.23543 != 0) goto <D.23544>; else goto <D.23545>;
        <D.23544>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2031, "ret == 0");
        <D.23545>:
      }
      D.23546 = mrgctx == 0B;
      D.23547 = (long int) D.23546;
      D.23548 = __builtin_expect (D.23547, 0);
      if (D.23548 != 0) goto <D.23549>; else goto <D.23550>;
      <D.23549>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2033, "mrgctx");
      <D.23550>:
      D.23551 = mrgctx;
      return D.23551;
    }
  finally
    {
      key = {CLOBBER};
    }
}


mrgctx_equal_func (const void * a, const void * b)
{
  gboolean D.23554;
  int iftmp.79;
  struct MonoVTable * D.23558;
  struct MonoVTable * D.23559;
  struct MonoGenericInst * D.23561;
  struct MonoGenericInst * D.23562;
  int D.23563;
  const struct MonoMethodRuntimeGenericContext * mrgctx1;
  const struct MonoMethodRuntimeGenericContext * mrgctx2;

  mrgctx1 = a;
  mrgctx2 = b;
  D.23558 = mrgctx1->class_vtable;
  D.23559 = mrgctx2->class_vtable;
  if (D.23558 == D.23559) goto <D.23560>; else goto <D.23556>;
  <D.23560>:
  D.23561 = mrgctx1->method_inst;
  D.23562 = mrgctx2->method_inst;
  D.23563 = mono_metadata_generic_inst_equal (D.23561, D.23562);
  if (D.23563 != 0) goto <D.23564>; else goto <D.23556>;
  <D.23564>:
  iftmp.79 = 1;
  goto <D.23557>;
  <D.23556>:
  iftmp.79 = 0;
  <D.23557>:
  D.23554 = iftmp.79;
  return D.23554;
}


mrgctx_hash_func (const void * key)
{
  guint D.23566;
  struct MonoVTable * D.23567;
  unsigned int D.23568;
  struct MonoGenericInst * D.23569;
  unsigned int D.23570;
  const struct MonoMethodRuntimeGenericContext * mrgctx;

  mrgctx = key;
  D.23567 = mrgctx->class_vtable;
  D.23568 = mono_aligned_addr_hash (D.23567);
  D.23569 = mrgctx->method_inst;
  D.23570 = mono_metadata_generic_inst_hash (D.23569);
  D.23566 = D.23568 ^ D.23570;
  return D.23566;
}


mono_generic_context_is_sharable_full (struct MonoGenericContext * context, gboolean allow_type_vars, gboolean allow_partial)
{
  int iftmp.80;
  struct MonoGenericInst * D.23575;
  struct MonoGenericInst * D.23577;
  _Bool D.23579;
  long int D.23580;
  long int D.23581;
  int D.23586;
  gboolean D.23589;
  int D.23592;

  D.23575 = context->class_inst;
  if (D.23575 == 0B) goto <D.23576>; else goto <D.23573>;
  <D.23576>:
  D.23577 = context->method_inst;
  if (D.23577 == 0B) goto <D.23578>; else goto <D.23573>;
  <D.23578>:
  iftmp.80 = 1;
  goto <D.23574>;
  <D.23573>:
  iftmp.80 = 0;
  <D.23574>:
  D.23579 = iftmp.80 != 0;
  D.23580 = (long int) D.23579;
  D.23581 = __builtin_expect (D.23580, 0);
  if (D.23581 != 0) goto <D.23582>; else goto <D.23583>;
  <D.23582>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2051, "context->class_inst || context->method_inst");
  <D.23583>:
  D.23575 = context->class_inst;
  if (D.23575 != 0B) goto <D.23584>; else goto <D.23585>;
  <D.23584>:
  D.23575 = context->class_inst;
  D.23586 = generic_inst_is_sharable (D.23575, allow_type_vars, allow_partial);
  if (D.23586 == 0) goto <D.23587>; else goto <D.23588>;
  <D.23587>:
  D.23589 = 0;
  return D.23589;
  <D.23588>:
  <D.23585>:
  D.23577 = context->method_inst;
  if (D.23577 != 0B) goto <D.23590>; else goto <D.23591>;
  <D.23590>:
  D.23577 = context->method_inst;
  D.23592 = generic_inst_is_sharable (D.23577, allow_type_vars, allow_partial);
  if (D.23592 == 0) goto <D.23593>; else goto <D.23594>;
  <D.23593>:
  D.23589 = 0;
  return D.23589;
  <D.23594>:
  <D.23591>:
  D.23589 = 1;
  return D.23589;
}


generic_inst_is_sharable (struct MonoGenericInst * inst, gboolean allow_type_vars, gboolean allow_partial)
{
  int D.23598;
  unsigned char D.23601;
  unsigned int D.23607;
  unsigned int D.23608;
  unsigned char D.23611;
  gboolean D.23614;
  <unnamed-unsigned:22> D.23615;
  int D.23616;
  int i;
  gboolean has_ref;

  has_ref = 0;
  i = 0;
  goto <D.21756>;
  <D.21755>:
  {
    struct MonoType * type;

    type = inst->type_argv[i];
    D.23598 = mono_type_is_reference (type);
    if (D.23598 != 0) goto <D.23596>; else goto <D.23599>;
    <D.23599>:
    if (allow_type_vars != 0) goto <D.23600>; else goto <D.23597>;
    <D.23600>:
    D.23601 = type->type;
    if (D.23601 == 19) goto <D.23596>; else goto <D.23602>;
    <D.23602>:
    D.23601 = type->type;
    if (D.23601 == 30) goto <D.23596>; else goto <D.23597>;
    <D.23596>:
    has_ref = 1;
    // predicted unlikely by continue predictor.
    goto <D.21754>;
    <D.23597>:
    if (allow_partial != 0) goto <D.23605>; else goto <D.23606>;
    <D.23605>:
    D.23607 = BIT_FIELD_REF <*type, 32, 32>;
    D.23608 = D.23607 & 1073741824;
    if (D.23608 == 0) goto <D.23609>; else goto <D.23610>;
    <D.23609>:
    D.23601 = type->type;
    D.23611 = D.23601 + 254;
    if (D.23611 <= 11) goto <D.23603>; else goto <D.23612>;
    <D.23612>:
    D.23601 = type->type;
    if (D.23601 == 24) goto <D.23603>; else goto <D.23613>;
    <D.23613>:
    D.23601 = type->type;
    if (D.23601 == 25) goto <D.23603>; else goto <D.23604>;
    <D.23603>:
    // predicted unlikely by continue predictor.
    goto <D.21754>;
    <D.23604>:
    <D.23610>:
    <D.23606>:
    D.23614 = 0;
    return D.23614;
  }
  <D.21754>:
  i = i + 1;
  <D.21756>:
  D.23615 = inst->type_argc;
  D.23616 = (int) D.23615;
  if (D.23616 > i) goto <D.21755>; else goto <D.21757>;
  <D.21757>:
  if (allow_partial != 0) goto <D.23617>; else goto <D.23618>;
  <D.23617>:
  D.23614 = has_ref;
  return D.23614;
  <D.23618>:
  D.23614 = 1;
  return D.23614;
}


mono_generic_context_is_sharable (struct MonoGenericContext * context, gboolean allow_type_vars)
{
  gboolean D.23620;
  int D.23621;

  D.23621 = partial_sharing_supported ();
  D.23620 = mono_generic_context_is_sharable_full (context, allow_type_vars, D.23621);
  return D.23620;
}


partial_sharing_supported ()
{
  gboolean D.23625;
  int partial_supported.81;
  int mono_aot_only.82;

  if (0 != 0) goto <D.23623>; else goto <D.23624>;
  <D.23623>:
  D.23625 = 0;
  return D.23625;
  <D.23624>:
  partial_supported.81 = partial_supported;
  if (partial_supported.81 != 0) goto <D.23626>; else goto <D.23629>;
  <D.23629>:
  mono_aot_only.82 = mono_aot_only;
  if (mono_aot_only.82 != 0) goto <D.23626>; else goto <D.23627>;
  <D.23626>:
  D.23625 = 1;
  return D.23625;
  <D.23627>:
  D.23625 = 0;
  return D.23625;
}


mono_method_is_generic_impl (struct MonoMethod * method)
{
  unsigned int D.23632;
  unsigned int D.23633;
  gboolean D.23636;
  unsigned int D.23637;
  struct MonoClass * D.23640;
  struct MonoGenericContainer * D.23641;

  D.23632 = BIT_FIELD_REF <*method, 32, 160>;
  D.23633 = D.23632 & 4096;
  if (D.23633 != 0) goto <D.23634>; else goto <D.23635>;
  <D.23634>:
  D.23636 = 1;
  return D.23636;
  <D.23635>:
  D.23632 = BIT_FIELD_REF <*method, 32, 160>;
  D.23637 = D.23632 & 124;
  if (D.23637 != 0) goto <D.23638>; else goto <D.23639>;
  <D.23638>:
  D.23636 = 0;
  return D.23636;
  <D.23639>:
  D.23640 = method->klass;
  D.23641 = D.23640->generic_container;
  if (D.23641 != 0B) goto <D.23642>; else goto <D.23643>;
  <D.23642>:
  D.23636 = 1;
  return D.23636;
  <D.23643>:
  D.23636 = 0;
  return D.23636;
}


mono_method_is_generic_sharable_full (struct MonoMethod * method, gboolean allow_type_vars, gboolean allow_partial, gboolean allow_gsharedvt)
{
  int D.23645;
  gboolean D.23648;
  int D.23649;
  struct MonoClass * D.23652;
  int D.23653;
  int D.23658;
  int D.23661;
  unsigned int D.23664;
  unsigned int D.23665;
  int D.23668;
  struct MonoMethod * D.23671;
  _Bool D.23672;
  long int D.23673;
  long int D.23674;
  unsigned int D.23677;
  unsigned int D.23678;
  struct MonoGenericContainer * D.23681;
  int D.23682;
  struct MonoGenericClass * D.23685;
  struct MonoGenericContext * D.23688;
  int D.23689;
  int iftmp.83;
  struct MonoClass * D.23696;
  struct MonoGenericContainer * D.23698;
  _Bool D.23699;
  long int D.23700;
  long int D.23701;
  int D.23704;
  struct MonoGenericContainer * D.23707;
  int D.23712;
  int D.23715;

  D.23645 = mono_method_is_generic_impl (method);
  if (D.23645 == 0) goto <D.23646>; else goto <D.23647>;
  <D.23646>:
  D.23648 = 0;
  return D.23648;
  <D.23647>:
  D.23649 = partial_sharing_supported ();
  if (D.23649 == 0) goto <D.23650>; else goto <D.23651>;
  <D.23650>:
  allow_partial = 0;
  <D.23651>:
  D.23652 = method->klass;
  D.23653 = is_async_state_machine_class (D.23652);
  if (D.23653 != 0) goto <D.23654>; else goto <D.23655>;
  <D.23654>:
  D.23648 = 0;
  return D.23648;
  <D.23655>:
  if (allow_gsharedvt != 0) goto <D.23656>; else goto <D.23657>;
  <D.23656>:
  D.23658 = mini_is_gsharedvt_sharable_method (method);
  if (D.23658 != 0) goto <D.23659>; else goto <D.23660>;
  <D.23659>:
  D.23661 = is_async_method (method);
  if (D.23661 != 0) goto <D.23662>; else goto <D.23663>;
  <D.23662>:
  D.23648 = 0;
  return D.23648;
  <D.23663>:
  D.23648 = 1;
  return D.23648;
  <D.23660>:
  <D.23657>:
  D.23664 = BIT_FIELD_REF <*method, 32, 160>;
  D.23665 = D.23664 & 4096;
  if (D.23665 != 0) goto <D.23666>; else goto <D.23667>;
  <D.23666>:
  {
    struct MonoMethodInflated * inflated;
    struct MonoGenericContext * context;

    inflated = method;
    context = &inflated->context;
    D.23668 = mono_generic_context_is_sharable_full (context, allow_type_vars, allow_partial);
    if (D.23668 == 0) goto <D.23669>; else goto <D.23670>;
    <D.23669>:
    D.23648 = 0;
    return D.23648;
    <D.23670>:
    D.23671 = inflated->declaring;
    D.23672 = D.23671 == 0B;
    D.23673 = (long int) D.23672;
    D.23674 = __builtin_expect (D.23673, 0);
    if (D.23674 != 0) goto <D.23675>; else goto <D.23676>;
    <D.23675>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2216, "inflated->declaring");
    <D.23676>:
    D.23671 = inflated->declaring;
    D.23677 = BIT_FIELD_REF <*D.23671, 32, 160>;
    D.23678 = D.23677 & 2048;
    if (D.23678 != 0) goto <D.23679>; else goto <D.23680>;
    <D.23679>:
    D.23671 = inflated->declaring;
    D.23681 = mono_method_get_generic_container (D.23671);
    D.23682 = has_constraints (D.23681);
    if (D.23682 != 0) goto <D.23683>; else goto <D.23684>;
    <D.23683>:
    D.23648 = 0;
    return D.23648;
    <D.23684>:
    <D.23680>:
  }
  <D.23667>:
  D.23652 = method->klass;
  D.23685 = D.23652->generic_class;
  if (D.23685 != 0B) goto <D.23686>; else goto <D.23687>;
  <D.23686>:
  D.23652 = method->klass;
  D.23685 = D.23652->generic_class;
  D.23688 = &D.23685->context;
  D.23689 = mono_generic_context_is_sharable_full (D.23688, allow_type_vars, allow_partial);
  if (D.23689 == 0) goto <D.23690>; else goto <D.23691>;
  <D.23690>:
  D.23648 = 0;
  return D.23648;
  <D.23691>:
  D.23652 = method->klass;
  D.23685 = D.23652->generic_class;
  D.23696 = D.23685->container_class;
  if (D.23696 == 0B) goto <D.23693>; else goto <D.23697>;
  <D.23697>:
  D.23652 = method->klass;
  D.23685 = D.23652->generic_class;
  D.23696 = D.23685->container_class;
  D.23698 = D.23696->generic_container;
  if (D.23698 == 0B) goto <D.23693>; else goto <D.23694>;
  <D.23693>:
  iftmp.83 = 1;
  goto <D.23695>;
  <D.23694>:
  iftmp.83 = 0;
  <D.23695>:
  D.23699 = iftmp.83 != 0;
  D.23700 = (long int) D.23699;
  D.23701 = __builtin_expect (D.23700, 0);
  if (D.23701 != 0) goto <D.23702>; else goto <D.23703>;
  <D.23702>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2229, "method->klass->generic_class->container_class && method->klass->generic_class->container_class->generic_container");
  <D.23703>:
  D.23652 = method->klass;
  D.23685 = D.23652->generic_class;
  D.23696 = D.23685->container_class;
  D.23698 = D.23696->generic_container;
  D.23704 = has_constraints (D.23698);
  if (D.23704 != 0) goto <D.23705>; else goto <D.23706>;
  <D.23705>:
  D.23648 = 0;
  return D.23648;
  <D.23706>:
  <D.23687>:
  D.23652 = method->klass;
  D.23707 = D.23652->generic_container;
  if (D.23707 != 0B) goto <D.23708>; else goto <D.23709>;
  <D.23708>:
  if (allow_type_vars == 0) goto <D.23710>; else goto <D.23711>;
  <D.23710>:
  D.23648 = 0;
  return D.23648;
  <D.23711>:
  <D.23709>:
  D.23712 = is_async_method (method);
  if (D.23712 != 0) goto <D.23713>; else goto <D.23714>;
  <D.23713>:
  D.23715 = mini_method_is_open (method);
  if (D.23715 != 0) goto <D.23716>; else goto <D.23717>;
  <D.23716>:
  D.23648 = 1;
  return D.23648;
  <D.23717>:
  D.23648 = 0;
  return D.23648;
  <D.23714>:
  D.23648 = 1;
  return D.23648;
}


is_async_state_machine_class (struct MonoClass * klass)
{
  gboolean D.23719;
  int iclass_set.84;
  struct MonoImage * D.23723;
  struct MonoClass * iclass.85;
  struct MonoClass * iclass.86;
  unsigned int D.23728;
  unsigned int D.23729;
  int D.23732;
  static struct MonoClass * iclass;
  static gboolean iclass_set;

  D.23719 = 0;
  return D.23719;
  iclass_set.84 = iclass_set;
  if (iclass_set.84 == 0) goto <D.23721>; else goto <D.23722>;
  <D.23721>:
  D.23723 = mono_defaults.corlib;
  iclass.85 = mono_class_from_name (D.23723, "System.Runtime.CompilerServices", "IAsyncStateMachine");
  iclass = iclass.85;
  mono_memory_barrier ();
  iclass_set = 1;
  <D.23722>:
  iclass.86 = iclass;
  if (iclass.86 != 0B) goto <D.23726>; else goto <D.23727>;
  <D.23726>:
  D.23728 = BIT_FIELD_REF <*klass, 32, 160>;
  D.23729 = D.23728 & 8;
  if (D.23729 != 0) goto <D.23730>; else goto <D.23731>;
  <D.23730>:
  iclass.86 = iclass;
  D.23732 = mono_class_is_assignable_from (iclass.86, klass);
  if (D.23732 != 0) goto <D.23733>; else goto <D.23734>;
  <D.23733>:
  D.23719 = 1;
  return D.23719;
  <D.23734>:
  <D.23731>:
  <D.23727>:
  D.23719 = 0;
  return D.23719;
}


has_constraints (struct MonoGenericContainer * container)
{
  gboolean D.23736;

  D.23736 = 0;
  return D.23736;
}


is_async_method (struct MonoMethod * method)
{
  gboolean D.23738;
  int attr_class_set.87;
  struct MonoImage * D.23742;
  struct MonoClass * attr_class.88;
  struct MonoClass * attr_class.89;
  struct MonoType * D.23752;
  unsigned char D.23753;
  struct MonoGenericClass * D.23756;
  struct MonoClass * D.23757;
  int D.22241;
  int iftmp.90;
  int D.22240;
  const char[7] * D.23762;
  unsigned char D.23763;
  int D.23764;
  unsigned char D.23765;
  int D.23766;
  const unsigned char * D.23771;
  unsigned char D.23772;
  int D.23773;
  const unsigned char * D.23774;
  unsigned char D.23775;
  int D.23776;
  const unsigned char * D.23781;
  unsigned char D.23782;
  int D.23783;
  const unsigned char * D.23784;
  unsigned char D.23785;
  int D.23786;
  const unsigned char * D.23791;
  unsigned char D.23792;
  int D.23793;
  const unsigned char * D.23794;
  unsigned char D.23795;
  int D.23796;
  const char * D.23798;
  int D.23801;
  struct MonoCustomAttrInfo * cattr;
  struct MonoMethodSignature * sig;
  gboolean res;
  static struct MonoClass * attr_class;
  static gboolean attr_class_set;

  res = 0;
  D.23738 = 0;
  return D.23738;
  attr_class_set.87 = attr_class_set;
  if (attr_class_set.87 == 0) goto <D.23740>; else goto <D.23741>;
  <D.23740>:
  D.23742 = mono_defaults.corlib;
  attr_class.88 = mono_class_from_name (D.23742, "System.Runtime.CompilerServices", "AsyncStateMachineAttribute");
  attr_class = attr_class.88;
  mono_memory_barrier ();
  attr_class_set = 1;
  <D.23741>:
  sig = mono_method_signature (method);
  attr_class.89 = attr_class;
  if (attr_class.89 != 0B) goto <D.23748>; else goto <D.23749>;
  <D.23748>:
  if (sig != 0B) goto <D.23750>; else goto <D.23751>;
  <D.23750>:
  D.23752 = sig->ret;
  D.23753 = D.23752->type;
  if (D.23753 == 1) goto <D.23744>; else goto <D.23754>;
  <D.23754>:
  D.23752 = sig->ret;
  D.23753 = D.23752->type;
  if (D.23753 == 18) goto <D.23755>; else goto <D.23745>;
  <D.23755>:
  D.23752 = sig->ret;
  D.23756 = D.23752->data.generic_class;
  D.23757 = D.23756->container_class;
  if (1 != 0) goto <D.23744>; else goto <D.23745>;
  <D.23745>:
  D.23752 = sig->ret;
  D.23753 = D.23752->type;
  if (D.23753 == 21) goto <D.23758>; else goto <D.23746>;
  <D.23758>:
  {
    size_t __s1_len;
    size_t __s2_len;

    __s2_len = 6;
    if (__s2_len <= 3) goto <D.23760>; else goto <D.23761>;
    <D.23760>:
    {
      const unsigned char * __s2;
      int __result;

      D.23752 = sig->ret;
      D.23756 = D.23752->data.generic_class;
      D.23757 = D.23756->container_class;
      __s2 = D.23757->name;
      D.23762 = "Task`1";
      D.23763 = MEM[(const unsigned char *)D.23762];
      D.23764 = (int) D.23763;
      D.23765 = *__s2;
      D.23766 = (int) D.23765;
      __result = D.23764 - D.23766;
      {
        if (__s2_len != 0) goto <D.23767>; else goto <D.23768>;
        <D.23767>:
        if (__result == 0) goto <D.23769>; else goto <D.23770>;
        <D.23769>:
        D.23771 = &MEM[(void *)"Task`1" + 1B];
        D.23772 = *D.23771;
        D.23773 = (int) D.23772;
        D.23774 = __s2 + 1;
        D.23775 = *D.23774;
        D.23776 = (int) D.23775;
        __result = D.23773 - D.23776;
        if (__s2_len > 1) goto <D.23777>; else goto <D.23778>;
        <D.23777>:
        if (__result == 0) goto <D.23779>; else goto <D.23780>;
        <D.23779>:
        D.23781 = &MEM[(void *)"Task`1" + 2B];
        D.23782 = *D.23781;
        D.23783 = (int) D.23782;
        D.23784 = __s2 + 2;
        D.23785 = *D.23784;
        D.23786 = (int) D.23785;
        __result = D.23783 - D.23786;
        if (__s2_len > 2) goto <D.23787>; else goto <D.23788>;
        <D.23787>:
        if (__result == 0) goto <D.23789>; else goto <D.23790>;
        <D.23789>:
        D.23791 = &MEM[(void *)"Task`1" + 3B];
        D.23792 = *D.23791;
        D.23793 = (int) D.23792;
        D.23794 = __s2 + 3;
        D.23795 = *D.23794;
        D.23796 = (int) D.23795;
        __result = D.23793 - D.23796;
        <D.23790>:
        <D.23788>:
        <D.23780>:
        <D.23778>:
        <D.23770>:
        <D.23768>:
      }
      D.22240 = __result;
    }
    iftmp.90 = -D.22240;
    goto <D.23797>;
    <D.23761>:
    D.23752 = sig->ret;
    D.23756 = D.23752->data.generic_class;
    D.23757 = D.23756->container_class;
    D.23798 = D.23757->name;
    iftmp.90 = __builtin_strcmp (D.23798, "Task`1");
    <D.23797>:
    D.22241 = iftmp.90;
  }
  if (D.22241 == 0) goto <D.23744>; else goto <D.23746>;
  <D.23744>:
  cattr = mono_custom_attrs_from_method (method);
  if (cattr != 0B) goto <D.23799>; else goto <D.23800>;
  <D.23799>:
  attr_class.89 = attr_class;
  D.23801 = mono_custom_attrs_has_attr (cattr, attr_class.89);
  if (D.23801 != 0) goto <D.23802>; else goto <D.23803>;
  <D.23802>:
  res = 1;
  <D.23803>:
  mono_custom_attrs_free (cattr);
  <D.23800>:
  <D.23746>:
  <D.23751>:
  <D.23749>:
  D.23738 = res;
  return D.23738;
}


mini_method_is_open (struct MonoMethod * method)
{
  unsigned int D.23805;
  unsigned int D.23806;
  struct MonoGenericInst * D.23809;
  unsigned int D.23812;
  unsigned int D.23813;
  gboolean D.23816;
  struct MonoGenericInst * D.23817;
  unsigned int D.23820;
  unsigned int D.23821;

  D.23805 = BIT_FIELD_REF <*method, 32, 160>;
  D.23806 = D.23805 & 4096;
  if (D.23806 != 0) goto <D.23807>; else goto <D.23808>;
  <D.23807>:
  {
    struct MonoGenericContext * ctx;

    ctx = mono_method_get_context (method);
    D.23809 = ctx->class_inst;
    if (D.23809 != 0B) goto <D.23810>; else goto <D.23811>;
    <D.23810>:
    D.23809 = ctx->class_inst;
    D.23812 = BIT_FIELD_REF <*D.23809, 32, 32>;
    D.23813 = D.23812 & 4194304;
    if (D.23813 != 0) goto <D.23814>; else goto <D.23815>;
    <D.23814>:
    D.23816 = 1;
    return D.23816;
    <D.23815>:
    <D.23811>:
    D.23817 = ctx->method_inst;
    if (D.23817 != 0B) goto <D.23818>; else goto <D.23819>;
    <D.23818>:
    D.23817 = ctx->method_inst;
    D.23820 = BIT_FIELD_REF <*D.23817, 32, 32>;
    D.23821 = D.23820 & 4194304;
    if (D.23821 != 0) goto <D.23822>; else goto <D.23823>;
    <D.23822>:
    D.23816 = 1;
    return D.23816;
    <D.23823>:
    <D.23819>:
  }
  <D.23808>:
  D.23816 = 0;
  return D.23816;
}


mono_method_is_generic_sharable (struct MonoMethod * method, gboolean allow_type_vars)
{
  gboolean D.23825;
  int D.23826;

  D.23826 = partial_sharing_supported ();
  D.23825 = mono_method_is_generic_sharable_full (method, allow_type_vars, D.23826, 1);
  return D.23825;
}


mono_method_needs_static_rgctx_invoke (struct MonoMethod * method, gboolean allow_type_vars)
{
  struct MonoClass * D.23828;
  int D.23829;
  gboolean D.23832;
  int D.23833;
  unsigned int D.23836;
  unsigned int D.23837;
  struct MonoGenericContext * D.23840;
  struct MonoGenericInst * D.23841;
  int iftmp.91;
  short unsigned int D.23849;
  int D.23850;
  int D.23851;
  unsigned int D.23853;
  unsigned int D.23854;
  struct MonoGenericClass * D.23855;
  struct MonoGenericContainer * D.23857;

  D.23828 = method->klass;
  D.23829 = mono_class_generic_sharing_enabled (D.23828);
  if (D.23829 == 0) goto <D.23830>; else goto <D.23831>;
  <D.23830>:
  D.23832 = 0;
  return D.23832;
  <D.23831>:
  D.23833 = mono_method_is_generic_sharable (method, allow_type_vars);
  if (D.23833 == 0) goto <D.23834>; else goto <D.23835>;
  <D.23834>:
  D.23832 = 0;
  return D.23832;
  <D.23835>:
  D.23836 = BIT_FIELD_REF <*method, 32, 160>;
  D.23837 = D.23836 & 4096;
  if (D.23837 != 0) goto <D.23838>; else goto <D.23839>;
  <D.23838>:
  D.23840 = mono_method_get_context (method);
  D.23841 = D.23840->method_inst;
  if (D.23841 != 0B) goto <D.23842>; else goto <D.23843>;
  <D.23842>:
  D.23832 = 1;
  return D.23832;
  <D.23843>:
  <D.23839>:
  D.23849 = method->flags;
  D.23850 = (int) D.23849;
  D.23851 = D.23850 & 16;
  if (D.23851 != 0) goto <D.23845>; else goto <D.23852>;
  <D.23852>:
  D.23828 = method->klass;
  D.23853 = BIT_FIELD_REF <*D.23828, 32, 160>;
  D.23854 = D.23853 & 8;
  if (D.23854 != 0) goto <D.23845>; else goto <D.23846>;
  <D.23845>:
  D.23828 = method->klass;
  D.23855 = D.23828->generic_class;
  if (D.23855 != 0B) goto <D.23847>; else goto <D.23856>;
  <D.23856>:
  D.23828 = method->klass;
  D.23857 = D.23828->generic_container;
  if (D.23857 != 0B) goto <D.23847>; else goto <D.23846>;
  <D.23847>:
  iftmp.91 = 1;
  goto <D.23848>;
  <D.23846>:
  iftmp.91 = 0;
  <D.23848>:
  D.23832 = iftmp.91;
  return D.23832;
}


mono_method_construct_object_context (struct MonoMethod * method)
{
  struct MonoClass * D.23860;
  struct MonoGenericClass * D.23861;
  _Bool D.23862;
  long int D.23863;
  long int D.23864;
  struct MonoGenericContainer * D.23867;
  <unnamed-signed:31> D.23870;
  struct MonoGenericInst * D.23871;
  struct MonoGenericContext * D.23873;
  struct MonoGenericInst * D.23874;
  struct MonoGenericContext * D.23877;
  struct MonoGenericInst * D.23878;
  <unnamed-unsigned:22> D.23879;
  struct MonoGenericInst * D.23880;
  int iftmp.92;
  struct MonoGenericInst * D.23885;
  struct MonoGenericInst * D.23887;
  _Bool D.23889;
  long int D.23890;
  long int D.23891;
  struct MonoGenericContext object_context;

  try
    {
      D.23860 = method->klass;
      D.23861 = D.23860->generic_class;
      D.23862 = D.23861 != 0B;
      D.23863 = (long int) D.23862;
      D.23864 = __builtin_expect (D.23863, 0);
      if (D.23864 != 0) goto <D.23865>; else goto <D.23866>;
      <D.23865>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2298, "!method->klass->generic_class");
      <D.23866>:
      D.23860 = method->klass;
      D.23867 = D.23860->generic_container;
      if (D.23867 != 0B) goto <D.23868>; else goto <D.23869>;
      <D.23868>:
      {
        int type_argc;

        D.23860 = method->klass;
        D.23867 = D.23860->generic_container;
        D.23870 = D.23867->type_argc;
        type_argc = (int) D.23870;
        D.23871 = get_object_generic_inst (type_argc);
        object_context.class_inst = D.23871;
      }
      goto <D.23872>;
      <D.23869>:
      object_context.class_inst = 0B;
      <D.23872>:
      D.23873 = mono_method_get_context_general (method, 1);
      D.23874 = D.23873->method_inst;
      if (D.23874 != 0B) goto <D.23875>; else goto <D.23876>;
      <D.23875>:
      {
        int type_argc;

        D.23877 = mono_method_get_context_general (method, 1);
        D.23878 = D.23877->method_inst;
        D.23879 = D.23878->type_argc;
        type_argc = (int) D.23879;
        D.23880 = get_object_generic_inst (type_argc);
        object_context.method_inst = D.23880;
      }
      goto <D.23881>;
      <D.23876>:
      object_context.method_inst = 0B;
      <D.23881>:
      D.23885 = object_context.class_inst;
      if (D.23885 == 0B) goto <D.23886>; else goto <D.23883>;
      <D.23886>:
      D.23887 = object_context.method_inst;
      if (D.23887 == 0B) goto <D.23888>; else goto <D.23883>;
      <D.23888>:
      iftmp.92 = 1;
      goto <D.23884>;
      <D.23883>:
      iftmp.92 = 0;
      <D.23884>:
      D.23889 = iftmp.92 != 0;
      D.23890 = (long int) D.23889;
      D.23891 = __builtin_expect (D.23890, 0);
      if (D.23891 != 0) goto <D.23892>; else goto <D.23893>;
      <D.23892>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2315, "object_context.class_inst || object_context.method_inst");
      <D.23893>:
      <retval> = object_context;
      return <retval>;
    }
  finally
    {
      object_context = {CLOBBER};
    }
}


get_object_generic_inst (int type_argc)
{
  unsigned int type_argc.93;
  unsigned int D.23897;
  unsigned int i.94;
  unsigned int D.23899;
  struct MonoType * * D.23900;
  struct MonoClass * D.23901;
  struct MonoType * D.23902;
  struct MonoGenericInst * D.23903;
  struct MonoType * * type_argv;
  int i;

  type_argc.93 = (unsigned int) type_argc;
  D.23897 = type_argc.93 * 4;
  type_argv = __builtin_alloca (D.23897);
  i = 0;
  goto <D.22264>;
  <D.22263>:
  i.94 = (unsigned int) i;
  D.23899 = i.94 * 4;
  D.23900 = type_argv + D.23899;
  D.23901 = mono_defaults.object_class;
  D.23902 = &D.23901->byval_arg;
  *D.23900 = D.23902;
  i = i + 1;
  <D.22264>:
  if (i < type_argc) goto <D.22263>; else goto <D.22265>;
  <D.22265>:
  D.23903 = mono_metadata_get_generic_inst (type_argc, type_argv);
  return D.23903;
}


mono_set_generic_sharing_supported (gboolean supported)
{
  gshared_supported = supported;
}


mono_set_generic_sharing_vt_supported (gboolean supported)
{
  gsharedvt_supported = supported;
}


mono_set_partial_sharing_supported (gboolean supported)
{
  partial_supported = supported;
}


mono_class_generic_sharing_enabled (struct MonoClass * class)
{
  int inited.95;
  int gshared_supported.96;
  int D.22297;
  int iftmp.97;
  int D.22296;
  const char[7] * D.23917;
  unsigned char D.23918;
  int D.23919;
  unsigned char D.23920;
  int D.23921;
  const unsigned char * D.23926;
  unsigned char D.23927;
  int D.23928;
  const unsigned char * D.23929;
  unsigned char D.23930;
  int D.23931;
  const unsigned char * D.23936;
  unsigned char D.23937;
  int D.23938;
  const unsigned char * D.23939;
  unsigned char D.23940;
  int D.23941;
  const unsigned char * D.23946;
  unsigned char D.23947;
  int D.23948;
  const unsigned char * D.23949;
  unsigned char D.23950;
  int D.23951;
  int D.22306;
  int iftmp.98;
  int D.22305;
  const char[12] * D.23959;
  unsigned char D.23960;
  int D.23961;
  unsigned char D.23962;
  int D.23963;
  const unsigned char * D.23968;
  unsigned char D.23969;
  int D.23970;
  const unsigned char * D.23971;
  unsigned char D.23972;
  int D.23973;
  const unsigned char * D.23978;
  unsigned char D.23979;
  int D.23980;
  const unsigned char * D.23981;
  unsigned char D.23982;
  int D.23983;
  const unsigned char * D.23988;
  unsigned char D.23989;
  int D.23990;
  const unsigned char * D.23991;
  unsigned char D.23992;
  int D.23993;
  int D.22315;
  int iftmp.99;
  int D.22314;
  const char[4] * D.24001;
  unsigned char D.24002;
  int D.24003;
  unsigned char D.24004;
  int D.24005;
  const unsigned char * D.24010;
  unsigned char D.24011;
  int D.24012;
  const unsigned char * D.24013;
  unsigned char D.24014;
  int D.24015;
  const unsigned char * D.24020;
  unsigned char D.24021;
  int D.24022;
  const unsigned char * D.24023;
  unsigned char D.24024;
  int D.24025;
  const unsigned char * D.24030;
  unsigned char D.24031;
  int D.24032;
  const unsigned char * D.24033;
  unsigned char D.24034;
  int D.24035;
  int D.22324;
  int iftmp.100;
  int D.22323;
  const char[5] * D.24043;
  unsigned char D.24044;
  int D.24045;
  unsigned char D.24046;
  int D.24047;
  const unsigned char * D.24052;
  unsigned char D.24053;
  int D.24054;
  const unsigned char * D.24055;
  unsigned char D.24056;
  int D.24057;
  const unsigned char * D.24062;
  unsigned char D.24063;
  int D.24064;
  const unsigned char * D.24065;
  unsigned char D.24066;
  int D.24067;
  const unsigned char * D.24072;
  unsigned char D.24073;
  int D.24074;
  const unsigned char * D.24075;
  unsigned char D.24076;
  int D.24077;
  int generic_sharing.101;
  gboolean D.24085;
  struct MonoImage * D.24086;
  struct MonoImage * D.24087;
  _Bool D.24088;
  struct MonoClass * D.24091;
  const char * D.24092;
  static int generic_sharing = 0;
  static gboolean inited = 0;

  inited.95 = inited;
  if (inited.95 == 0) goto <D.23906>; else goto <D.23907>;
  <D.23906>:
  {
    const char * option;

    gshared_supported.96 = gshared_supported;
    if (gshared_supported.96 != 0) goto <D.23909>; else goto <D.23910>;
    <D.23909>:
    generic_sharing = 3;
    goto <D.23911>;
    <D.23910>:
    generic_sharing = 0;
    <D.23911>:
    option = monoeg_g_getenv ("MONO_GENERIC_SHARING");
    if (option != 0B) goto <D.23912>; else goto <D.23913>;
    <D.23912>:
    {
      size_t __s1_len;
      size_t __s2_len;

      __s2_len = 6;
      if (__s2_len <= 3) goto <D.23915>; else goto <D.23916>;
      <D.23915>:
      {
        const unsigned char * __s2;
        int __result;

        __s2 = option;
        D.23917 = "corlib";
        D.23918 = MEM[(const unsigned char *)D.23917];
        D.23919 = (int) D.23918;
        D.23920 = *__s2;
        D.23921 = (int) D.23920;
        __result = D.23919 - D.23921;
        {
          if (__s2_len != 0) goto <D.23922>; else goto <D.23923>;
          <D.23922>:
          if (__result == 0) goto <D.23924>; else goto <D.23925>;
          <D.23924>:
          D.23926 = &MEM[(void *)"corlib" + 1B];
          D.23927 = *D.23926;
          D.23928 = (int) D.23927;
          D.23929 = __s2 + 1;
          D.23930 = *D.23929;
          D.23931 = (int) D.23930;
          __result = D.23928 - D.23931;
          if (__s2_len > 1) goto <D.23932>; else goto <D.23933>;
          <D.23932>:
          if (__result == 0) goto <D.23934>; else goto <D.23935>;
          <D.23934>:
          D.23936 = &MEM[(void *)"corlib" + 2B];
          D.23937 = *D.23936;
          D.23938 = (int) D.23937;
          D.23939 = __s2 + 2;
          D.23940 = *D.23939;
          D.23941 = (int) D.23940;
          __result = D.23938 - D.23941;
          if (__s2_len > 2) goto <D.23942>; else goto <D.23943>;
          <D.23942>:
          if (__result == 0) goto <D.23944>; else goto <D.23945>;
          <D.23944>:
          D.23946 = &MEM[(void *)"corlib" + 3B];
          D.23947 = *D.23946;
          D.23948 = (int) D.23947;
          D.23949 = __s2 + 3;
          D.23950 = *D.23949;
          D.23951 = (int) D.23950;
          __result = D.23948 - D.23951;
          <D.23945>:
          <D.23943>:
          <D.23935>:
          <D.23933>:
          <D.23925>:
          <D.23923>:
        }
        D.22296 = __result;
      }
      iftmp.97 = -D.22296;
      goto <D.23952>;
      <D.23916>:
      iftmp.97 = __builtin_strcmp (option, "corlib");
      <D.23952>:
      D.22297 = iftmp.97;
    }
    if (D.22297 == 0) goto <D.23953>; else goto <D.23954>;
    <D.23953>:
    generic_sharing = 2;
    goto <D.23955>;
    <D.23954>:
    {
      size_t __s1_len;
      size_t __s2_len;

      __s2_len = 11;
      if (__s2_len <= 3) goto <D.23957>; else goto <D.23958>;
      <D.23957>:
      {
        const unsigned char * __s2;
        int __result;

        __s2 = option;
        D.23959 = "collections";
        D.23960 = MEM[(const unsigned char *)D.23959];
        D.23961 = (int) D.23960;
        D.23962 = *__s2;
        D.23963 = (int) D.23962;
        __result = D.23961 - D.23963;
        {
          if (__s2_len != 0) goto <D.23964>; else goto <D.23965>;
          <D.23964>:
          if (__result == 0) goto <D.23966>; else goto <D.23967>;
          <D.23966>:
          D.23968 = &MEM[(void *)"collections" + 1B];
          D.23969 = *D.23968;
          D.23970 = (int) D.23969;
          D.23971 = __s2 + 1;
          D.23972 = *D.23971;
          D.23973 = (int) D.23972;
          __result = D.23970 - D.23973;
          if (__s2_len > 1) goto <D.23974>; else goto <D.23975>;
          <D.23974>:
          if (__result == 0) goto <D.23976>; else goto <D.23977>;
          <D.23976>:
          D.23978 = &MEM[(void *)"collections" + 2B];
          D.23979 = *D.23978;
          D.23980 = (int) D.23979;
          D.23981 = __s2 + 2;
          D.23982 = *D.23981;
          D.23983 = (int) D.23982;
          __result = D.23980 - D.23983;
          if (__s2_len > 2) goto <D.23984>; else goto <D.23985>;
          <D.23984>:
          if (__result == 0) goto <D.23986>; else goto <D.23987>;
          <D.23986>:
          D.23988 = &MEM[(void *)"collections" + 3B];
          D.23989 = *D.23988;
          D.23990 = (int) D.23989;
          D.23991 = __s2 + 3;
          D.23992 = *D.23991;
          D.23993 = (int) D.23992;
          __result = D.23990 - D.23993;
          <D.23987>:
          <D.23985>:
          <D.23977>:
          <D.23975>:
          <D.23967>:
          <D.23965>:
        }
        D.22305 = __result;
      }
      iftmp.98 = -D.22305;
      goto <D.23994>;
      <D.23958>:
      iftmp.98 = __builtin_strcmp (option, "collections");
      <D.23994>:
      D.22306 = iftmp.98;
    }
    if (D.22306 == 0) goto <D.23995>; else goto <D.23996>;
    <D.23995>:
    generic_sharing = 1;
    goto <D.23997>;
    <D.23996>:
    {
      size_t __s1_len;
      size_t __s2_len;

      __s2_len = 3;
      if (__s2_len <= 3) goto <D.23999>; else goto <D.24000>;
      <D.23999>:
      {
        const unsigned char * __s2;
        int __result;

        __s2 = option;
        D.24001 = "all";
        D.24002 = MEM[(const unsigned char *)D.24001];
        D.24003 = (int) D.24002;
        D.24004 = *__s2;
        D.24005 = (int) D.24004;
        __result = D.24003 - D.24005;
        {
          if (__s2_len != 0) goto <D.24006>; else goto <D.24007>;
          <D.24006>:
          if (__result == 0) goto <D.24008>; else goto <D.24009>;
          <D.24008>:
          D.24010 = &MEM[(void *)"all" + 1B];
          D.24011 = *D.24010;
          D.24012 = (int) D.24011;
          D.24013 = __s2 + 1;
          D.24014 = *D.24013;
          D.24015 = (int) D.24014;
          __result = D.24012 - D.24015;
          if (__s2_len > 1) goto <D.24016>; else goto <D.24017>;
          <D.24016>:
          if (__result == 0) goto <D.24018>; else goto <D.24019>;
          <D.24018>:
          D.24020 = &MEM[(void *)"all" + 2B];
          D.24021 = *D.24020;
          D.24022 = (int) D.24021;
          D.24023 = __s2 + 2;
          D.24024 = *D.24023;
          D.24025 = (int) D.24024;
          __result = D.24022 - D.24025;
          if (__s2_len > 2) goto <D.24026>; else goto <D.24027>;
          <D.24026>:
          if (__result == 0) goto <D.24028>; else goto <D.24029>;
          <D.24028>:
          D.24030 = &MEM[(void *)"all" + 3B];
          D.24031 = *D.24030;
          D.24032 = (int) D.24031;
          D.24033 = __s2 + 3;
          D.24034 = *D.24033;
          D.24035 = (int) D.24034;
          __result = D.24032 - D.24035;
          <D.24029>:
          <D.24027>:
          <D.24019>:
          <D.24017>:
          <D.24009>:
          <D.24007>:
        }
        D.22314 = __result;
      }
      iftmp.99 = -D.22314;
      goto <D.24036>;
      <D.24000>:
      iftmp.99 = __builtin_strcmp (option, "all");
      <D.24036>:
      D.22315 = iftmp.99;
    }
    if (D.22315 == 0) goto <D.24037>; else goto <D.24038>;
    <D.24037>:
    generic_sharing = 3;
    goto <D.24039>;
    <D.24038>:
    {
      size_t __s1_len;
      size_t __s2_len;

      __s2_len = 4;
      if (__s2_len <= 3) goto <D.24041>; else goto <D.24042>;
      <D.24041>:
      {
        const unsigned char * __s2;
        int __result;

        __s2 = option;
        D.24043 = "none";
        D.24044 = MEM[(const unsigned char *)D.24043];
        D.24045 = (int) D.24044;
        D.24046 = *__s2;
        D.24047 = (int) D.24046;
        __result = D.24045 - D.24047;
        {
          if (__s2_len != 0) goto <D.24048>; else goto <D.24049>;
          <D.24048>:
          if (__result == 0) goto <D.24050>; else goto <D.24051>;
          <D.24050>:
          D.24052 = &MEM[(void *)"none" + 1B];
          D.24053 = *D.24052;
          D.24054 = (int) D.24053;
          D.24055 = __s2 + 1;
          D.24056 = *D.24055;
          D.24057 = (int) D.24056;
          __result = D.24054 - D.24057;
          if (__s2_len > 1) goto <D.24058>; else goto <D.24059>;
          <D.24058>:
          if (__result == 0) goto <D.24060>; else goto <D.24061>;
          <D.24060>:
          D.24062 = &MEM[(void *)"none" + 2B];
          D.24063 = *D.24062;
          D.24064 = (int) D.24063;
          D.24065 = __s2 + 2;
          D.24066 = *D.24065;
          D.24067 = (int) D.24066;
          __result = D.24064 - D.24067;
          if (__s2_len > 2) goto <D.24068>; else goto <D.24069>;
          <D.24068>:
          if (__result == 0) goto <D.24070>; else goto <D.24071>;
          <D.24070>:
          D.24072 = &MEM[(void *)"none" + 3B];
          D.24073 = *D.24072;
          D.24074 = (int) D.24073;
          D.24075 = __s2 + 3;
          D.24076 = *D.24075;
          D.24077 = (int) D.24076;
          __result = D.24074 - D.24077;
          <D.24071>:
          <D.24069>:
          <D.24061>:
          <D.24059>:
          <D.24051>:
          <D.24049>:
        }
        D.22323 = __result;
      }
      iftmp.100 = -D.22323;
      goto <D.24078>;
      <D.24042>:
      iftmp.100 = __builtin_strcmp (option, "none");
      <D.24078>:
      D.22324 = iftmp.100;
    }
    if (D.22324 == 0) goto <D.24079>; else goto <D.24080>;
    <D.24079>:
    generic_sharing = 0;
    goto <D.24081>;
    <D.24080>:
    monoeg_g_log (0B, 16, "Unknown generic sharing option `%s\'.", option);
    <D.24081>:
    <D.24039>:
    <D.23997>:
    <D.23955>:
    <D.23913>:
    gshared_supported.96 = gshared_supported;
    if (gshared_supported.96 == 0) goto <D.24082>; else goto <D.24083>;
    <D.24082>:
    generic_sharing = 0;
    <D.24083>:
    inited = 1;
  }
  <D.23907>:
  generic_sharing.101 = generic_sharing;
  switch (generic_sharing.101) <default: <D.22332>, case 0: <D.22325>, case 1: <D.22328>, case 2: <D.22327>, case 3: <D.22326>>
  <D.22325>:
  D.24085 = 0;
  return D.24085;
  <D.22326>:
  D.24085 = 1;
  return D.24085;
  <D.22327>:
  D.24086 = class->image;
  D.24087 = mono_defaults.corlib;
  D.24088 = D.24086 == D.24087;
  D.24085 = (gboolean) D.24088;
  return D.24085;
  <D.22328>:
  D.24086 = class->image;
  D.24087 = mono_defaults.corlib;
  if (D.24086 != D.24087) goto <D.24089>; else goto <D.24090>;
  <D.24089>:
  D.24085 = 0;
  return D.24085;
  <D.24090>:
  goto <D.22330>;
  <D.22329>:
  class = class->nested_in;
  <D.22330>:
  D.24091 = class->nested_in;
  if (D.24091 != 0B) goto <D.22329>; else goto <D.22331>;
  <D.22331>:
  D.24092 = class->name_space;
  D.24085 = monoeg_g_str_has_prefix (D.24092, "System.Collections.Generic");
  return D.24085;
  <D.22332>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 2398);
  D.24085 = 0;
  return D.24085;
}


mono_get_generic_context_from_code (guint8 * code)
{
  struct MonoDomain * D.24094;
  _Bool D.24095;
  long int D.24096;
  long int D.24097;
  struct MonoGenericSharingContext * D.24100;
  struct MonoJitInfo * jit_info;

  D.24094 = mono_domain_get ();
  jit_info = mini_jit_info_table_find (D.24094, code, 0B);
  D.24095 = jit_info == 0B;
  D.24096 = (long int) D.24095;
  D.24097 = __builtin_expect (D.24096, 0);
  if (D.24097 != 0) goto <D.24098>; else goto <D.24099>;
  <D.24098>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2414, "jit_info");
  <D.24099>:
  D.24100 = mono_jit_info_get_generic_sharing_context (jit_info);
  return D.24100;
}


mini_method_get_context (struct MonoMethod * method)
{
  struct MonoGenericContext * D.24102;

  D.24102 = mono_method_get_context_general (method, 1);
  return D.24102;
}


mono_method_check_context_used (struct MonoMethod * method)
{
  struct MonoClass * D.24106;
  unsigned char D.24107;
  int D.24111;
  int D.24112;
  struct MonoGenericContext * method_context;
  int context_used;

  method_context = mini_method_get_context (method);
  context_used = 0;
  if (method_context == 0B) goto <D.24104>; else goto <D.24105>;
  <D.24104>:
  D.24106 = method->klass;
  D.24107 = D.24106->rank;
  if (D.24107 != 0) goto <D.24108>; else goto <D.24109>;
  <D.24108>:
  D.24106 = method->klass;
  context_used = mono_class_check_context_used (D.24106);
  <D.24109>:
  goto <D.24110>;
  <D.24105>:
  context_used = mono_generic_context_check_used (method_context);
  D.24106 = method->klass;
  D.24111 = mono_class_check_context_used (D.24106);
  context_used = D.24111 | context_used;
  <D.24110>:
  D.24112 = context_used;
  return D.24112;
}


mono_generic_context_equal_deep (struct MonoGenericContext * context1, struct MonoGenericContext * context2)
{
  gboolean D.24114;
  int iftmp.102;
  struct MonoGenericInst * D.24118;
  struct MonoGenericInst * D.24119;
  int D.24120;
  struct MonoGenericInst * D.24122;
  struct MonoGenericInst * D.24123;
  int D.24124;

  D.24118 = context1->class_inst;
  D.24119 = context2->class_inst;
  D.24120 = generic_inst_equal (D.24118, D.24119);
  if (D.24120 != 0) goto <D.24121>; else goto <D.24116>;
  <D.24121>:
  D.24122 = context1->method_inst;
  D.24123 = context2->method_inst;
  D.24124 = generic_inst_equal (D.24122, D.24123);
  if (D.24124 != 0) goto <D.24125>; else goto <D.24116>;
  <D.24125>:
  iftmp.102 = 1;
  goto <D.24117>;
  <D.24116>:
  iftmp.102 = 0;
  <D.24117>:
  D.24114 = iftmp.102;
  return D.24114;
}


generic_inst_equal (struct MonoGenericInst * inst1, struct MonoGenericInst * inst2)
{
  _Bool D.24129;
  long int D.24130;
  long int D.24131;
  gboolean D.24134;
  _Bool D.24135;
  long int D.24136;
  long int D.24137;
  unsigned int D.24140;
  unsigned int D.24141;
  unsigned int D.24142;
  unsigned int D.24143;
  struct MonoType * D.24146;
  struct MonoType * D.24147;
  int D.24148;
  <unnamed-unsigned:22> D.24151;
  int D.24152;
  int i;

  if (inst1 == 0B) goto <D.24127>; else goto <D.24128>;
  <D.24127>:
  D.24129 = inst2 != 0B;
  D.24130 = (long int) D.24129;
  D.24131 = __builtin_expect (D.24130, 0);
  if (D.24131 != 0) goto <D.24132>; else goto <D.24133>;
  <D.24132>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2458, "!inst2");
  <D.24133>:
  D.24134 = 1;
  return D.24134;
  <D.24128>:
  D.24135 = inst2 == 0B;
  D.24136 = (long int) D.24135;
  D.24137 = __builtin_expect (D.24136, 0);
  if (D.24137 != 0) goto <D.24138>; else goto <D.24139>;
  <D.24138>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2462, "inst2");
  <D.24139>:
  D.24140 = BIT_FIELD_REF <*inst1, 32, 32>;
  D.24141 = BIT_FIELD_REF <*inst2, 32, 32>;
  D.24142 = D.24140 ^ D.24141;
  D.24143 = D.24142 & 4194303;
  if (D.24143 != 0) goto <D.24144>; else goto <D.24145>;
  <D.24144>:
  D.24134 = 0;
  return D.24134;
  <D.24145>:
  i = 0;
  goto <D.22351>;
  <D.22350>:
  D.24146 = inst1->type_argv[i];
  D.24147 = inst2->type_argv[i];
  D.24148 = mono_metadata_type_equal (D.24146, D.24147);
  if (D.24148 == 0) goto <D.24149>; else goto <D.24150>;
  <D.24149>:
  D.24134 = 0;
  return D.24134;
  <D.24150>:
  i = i + 1;
  <D.22351>:
  D.24151 = inst1->type_argc;
  D.24152 = (int) D.24151;
  if (D.24152 > i) goto <D.22350>; else goto <D.22352>;
  <D.22352>:
  D.24134 = 1;
  return D.24134;
}


mini_class_get_container_class (struct MonoClass * class)
{
  struct MonoGenericClass * D.24154;
  struct MonoClass * D.24157;
  struct MonoGenericContainer * D.24158;
  _Bool D.24159;
  long int D.24160;
  long int D.24161;

  D.24154 = class->generic_class;
  if (D.24154 != 0B) goto <D.24155>; else goto <D.24156>;
  <D.24155>:
  D.24154 = class->generic_class;
  D.24157 = D.24154->container_class;
  return D.24157;
  <D.24156>:
  D.24158 = class->generic_container;
  D.24159 = D.24158 == 0B;
  D.24160 = (long int) D.24159;
  D.24161 = __builtin_expect (D.24160, 0);
  if (D.24161 != 0) goto <D.24162>; else goto <D.24163>;
  <D.24162>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2502, "class->generic_container");
  <D.24163>:
  D.24157 = class;
  return D.24157;
}


mini_class_get_context (struct MonoClass * class)
{
  struct MonoGenericClass * D.24165;
  struct MonoGenericContext * D.24168;
  struct MonoGenericContainer * D.24169;
  _Bool D.24170;
  long int D.24171;
  long int D.24172;

  D.24165 = class->generic_class;
  if (D.24165 != 0B) goto <D.24166>; else goto <D.24167>;
  <D.24166>:
  D.24165 = class->generic_class;
  D.24168 = &D.24165->context;
  return D.24168;
  <D.24167>:
  D.24169 = class->generic_container;
  D.24170 = D.24169 == 0B;
  D.24171 = (long int) D.24170;
  D.24172 = __builtin_expect (D.24171, 0);
  if (D.24172 != 0) goto <D.24173>; else goto <D.24174>;
  <D.24173>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2518, "class->generic_container");
  <D.24174>:
  D.24169 = class->generic_container;
  D.24168 = &D.24169->context;
  return D.24168;
}


mini_get_basic_type_from_generic (struct MonoGenericSharingContext * gsctx, struct MonoType * type)
{
  unsigned int D.24178;
  unsigned int D.24179;
  unsigned char D.24181;
  int D.24183;
  struct MonoType * D.24185;

  D.24178 = BIT_FIELD_REF <*type, 32, 32>;
  D.24179 = D.24178 & 1073741824;
  if (D.24179 == 0) goto <D.24180>; else goto <D.24176>;
  <D.24180>:
  D.24181 = type->type;
  if (D.24181 == 19) goto <D.24177>; else goto <D.24182>;
  <D.24182>:
  D.24181 = type->type;
  if (D.24181 == 30) goto <D.24177>; else goto <D.24176>;
  <D.24177>:
  D.24183 = mini_is_gsharedvt_type_gsctx (gsctx, type);
  if (D.24183 != 0) goto <D.24184>; else goto <D.24176>;
  <D.24184>:
  D.24185 = type;
  return D.24185;
  <D.24176>:
  D.24185 = mono_type_get_basic_type_from_generic (type);
  return D.24185;
}


mini_type_get_underlying_type (struct MonoGenericSharingContext * gsctx, struct MonoType * type)
{
  unsigned int D.24187;
  unsigned int D.24188;
  struct MonoType * D.24191;
  struct MonoClass * D.24192;
  unsigned char D.24197;
  int D.24199;
  struct MonoType * D.24202;

  D.24187 = BIT_FIELD_REF <*type, 32, 32>;
  D.24188 = D.24187 & 1073741824;
  if (D.24188 != 0) goto <D.24189>; else goto <D.24190>;
  <D.24189>:
  D.24192 = mono_defaults.int_class;
  D.24191 = &D.24192->byval_arg;
  return D.24191;
  <D.24190>:
  D.24187 = BIT_FIELD_REF <*type, 32, 32>;
  D.24188 = D.24187 & 1073741824;
  if (D.24188 == 0) goto <D.24195>; else goto <D.24196>;
  <D.24195>:
  D.24197 = type->type;
  if (D.24197 == 19) goto <D.24193>; else goto <D.24198>;
  <D.24198>:
  D.24197 = type->type;
  if (D.24197 == 30) goto <D.24193>; else goto <D.24194>;
  <D.24193>:
  D.24199 = mini_is_gsharedvt_type_gsctx (gsctx, type);
  if (D.24199 != 0) goto <D.24200>; else goto <D.24201>;
  <D.24200>:
  D.24191 = type;
  return D.24191;
  <D.24201>:
  <D.24194>:
  <D.24196>:
  D.24202 = mono_type_get_underlying_type (type);
  D.24191 = mini_get_basic_type_from_generic (gsctx, D.24202);
  return D.24191;
}


mini_type_stack_size (struct MonoGenericSharingContext * gsctx, struct MonoType * t, int * align)
{
  int D.24204;
  gboolean allow_open;

  allow_open = 1;
  D.24204 = mono_type_stack_size_internal (t, align, allow_open);
  return D.24204;
}


mini_type_stack_size_full (struct MonoGenericSharingContext * gsctx, struct MonoType * t, guint32 * align, gboolean pinvoke)
{
  int ialign.103;
  unsigned int ialign.104;
  int D.24214;
  int size;

  if (pinvoke != 0) goto <D.24206>; else goto <D.24207>;
  <D.24206>:
  size = mono_type_native_stack_size (t, align);
  goto <D.24208>;
  <D.24207>:
  {
    int ialign;

    try
      {
        if (align != 0B) goto <D.24209>; else goto <D.24210>;
        <D.24209>:
        size = mini_type_stack_size (gsctx, t, &ialign);
        ialign.103 = ialign;
        ialign.104 = (unsigned int) ialign.103;
        *align = ialign.104;
        goto <D.24213>;
        <D.24210>:
        size = mini_type_stack_size (gsctx, t, 0B);
        <D.24213>:
      }
    finally
      {
        ialign = {CLOBBER};
      }
  }
  <D.24208>:
  D.24214 = size;
  return D.24214;
}


mono_generic_sharing_init ()
{
  mono_install_image_unload_hook (mono_class_unregister_image_generic_subclasses, 0B);
}


mono_class_unregister_image_generic_subclasses (struct MonoImage * image, void * user_data)
{
  struct GHashTable * generic_subclass_hash.105;
  struct GHashTable * generic_subclass_hash.106;
  struct GHashTable * old_hash;

  generic_subclass_hash.105 = generic_subclass_hash;
  if (generic_subclass_hash.105 == 0B) goto <D.24217>; else goto <D.24218>;
  <D.24217>:
  return;
  <D.24218>:
  mono_loader_lock ();
  old_hash = generic_subclass_hash;
  generic_subclass_hash.106 = monoeg_g_hash_table_new (mono_aligned_addr_hash, 0B);
  generic_subclass_hash = generic_subclass_hash.106;
  monoeg_g_hash_table_foreach (old_hash, move_subclasses_not_in_image_foreach_func, image);
  mono_loader_unlock ();
  monoeg_g_hash_table_destroy (old_hash);
}


move_subclasses_not_in_image_foreach_func (struct MonoClass * class, struct MonoClass * subclass, struct MonoImage * image)
{
  struct MonoImage * D.24221;
  struct MonoImage * D.24224;
  _Bool D.24225;
  long int D.24226;
  long int D.24227;
  struct MonoRuntimeGenericContextTemplate * D.24230;
  struct GHashTable * generic_subclass_hash.107;
  struct MonoClass * new_list;

  D.24221 = class->image;
  if (D.24221 == image) goto <D.24222>; else goto <D.24223>;
  <D.24222>:
  goto <D.21600>;
  <D.21599>:
  D.24224 = subclass->image;
  D.24225 = D.24224 != image;
  D.24226 = (long int) D.24225;
  D.24227 = __builtin_expect (D.24226, 0);
  if (D.24227 != 0) goto <D.24228>; else goto <D.24229>;
  <D.24228>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 285, "subclass->image == image");
  <D.24229>:
  D.24230 = class_lookup_rgctx_template (subclass);
  subclass = D.24230->next_subclass;
  <D.21600>:
  if (subclass != 0B) goto <D.21599>; else goto <D.21601>;
  <D.21601>:
  return;
  <D.24223>:
  new_list = 0B;
  goto <D.21605>;
  <D.21604>:
  {
    struct MonoRuntimeGenericContextTemplate * subclass_template;
    struct MonoClass * next;

    subclass_template = class_lookup_rgctx_template (subclass);
    next = subclass_template->next_subclass;
    D.24224 = subclass->image;
    if (D.24224 != image) goto <D.24231>; else goto <D.24232>;
    <D.24231>:
    subclass_template->next_subclass = new_list;
    new_list = subclass;
    <D.24232>:
    subclass = next;
  }
  <D.21605>:
  if (subclass != 0B) goto <D.21604>; else goto <D.21606>;
  <D.21606>:
  if (new_list != 0B) goto <D.24233>; else goto <D.24234>;
  <D.24233>:
  generic_subclass_hash.107 = generic_subclass_hash;
  monoeg_g_hash_table_insert_replace (generic_subclass_hash.107, class, new_list, 0);
  <D.24234>:
}


mono_generic_sharing_cleanup ()
{
  struct GHashTable * generic_subclass_hash.108;

  mono_remove_image_unload_hook (mono_class_unregister_image_generic_subclasses, 0B);
  generic_subclass_hash.108 = generic_subclass_hash;
  if (generic_subclass_hash.108 != 0B) goto <D.24238>; else goto <D.24239>;
  <D.24238>:
  generic_subclass_hash.108 = generic_subclass_hash;
  monoeg_g_hash_table_destroy (generic_subclass_hash.108);
  <D.24239>:
}


mini_type_var_is_vt (struct MonoCompile * cfg, struct MonoType * type)
{
  unsigned char D.24240;
  struct MonoGenericSharingContext * D.24244;
  gboolean * D.24245;
  struct MonoGenericParam * D.24247;
  short unsigned int D.24248;
  unsigned int D.24249;
  unsigned int D.24250;
  gboolean * D.24251;
  int D.24252;
  gboolean D.24254;
  gboolean * D.24258;
  gboolean * D.24260;
  int D.24261;

  D.24240 = type->type;
  if (D.24240 == 19) goto <D.24241>; else goto <D.24242>;
  <D.24241>:
  D.24244 = cfg->generic_sharing_context;
  D.24245 = D.24244->var_is_vt;
  if (D.24245 != 0B) goto <D.24246>; else goto <D.24243>;
  <D.24246>:
  D.24244 = cfg->generic_sharing_context;
  D.24245 = D.24244->var_is_vt;
  D.24247 = type->data.generic_param;
  D.24248 = D.24247->num;
  D.24249 = (unsigned int) D.24248;
  D.24250 = D.24249 * 4;
  D.24251 = D.24245 + D.24250;
  D.24252 = *D.24251;
  if (D.24252 != 0) goto <D.24253>; else goto <D.24243>;
  <D.24253>:
  D.24254 = 1;
  return D.24254;
  <D.24243>:
  D.24254 = 0;
  return D.24254;
  <D.24242>:
  D.24240 = type->type;
  if (D.24240 == 30) goto <D.24255>; else goto <D.24256>;
  <D.24255>:
  D.24244 = cfg->generic_sharing_context;
  D.24258 = D.24244->mvar_is_vt;
  if (D.24258 != 0B) goto <D.24259>; else goto <D.24257>;
  <D.24259>:
  D.24244 = cfg->generic_sharing_context;
  D.24258 = D.24244->mvar_is_vt;
  D.24247 = type->data.generic_param;
  D.24248 = D.24247->num;
  D.24249 = (unsigned int) D.24248;
  D.24250 = D.24249 * 4;
  D.24260 = D.24258 + D.24250;
  D.24261 = *D.24260;
  if (D.24261 != 0) goto <D.24262>; else goto <D.24257>;
  <D.24262>:
  D.24254 = 1;
  return D.24254;
  <D.24257>:
  D.24254 = 0;
  return D.24254;
  <D.24256>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 2651);
  D.24254 = 0;
  return D.24254;
}


mini_type_is_reference (struct MonoCompile * cfg, struct MonoType * type)
{
  int D.24264;
  gboolean D.24267;
  struct MonoGenericSharingContext * D.24268;
  int iftmp.109;
  unsigned char D.24275;
  int D.24277;

  D.24264 = mono_type_is_reference (type);
  if (D.24264 != 0) goto <D.24265>; else goto <D.24266>;
  <D.24265>:
  D.24267 = 1;
  return D.24267;
  <D.24266>:
  D.24268 = cfg->generic_sharing_context;
  if (D.24268 == 0B) goto <D.24269>; else goto <D.24270>;
  <D.24269>:
  D.24267 = 0;
  return D.24267;
  <D.24270>:
  D.24275 = type->type;
  if (D.24275 == 19) goto <D.24272>; else goto <D.24276>;
  <D.24276>:
  D.24275 = type->type;
  if (D.24275 == 30) goto <D.24272>; else goto <D.24273>;
  <D.24272>:
  D.24277 = mini_type_var_is_vt (cfg, type);
  if (D.24277 == 0) goto <D.24278>; else goto <D.24273>;
  <D.24278>:
  iftmp.109 = 1;
  goto <D.24274>;
  <D.24273>:
  iftmp.109 = 0;
  <D.24274>:
  D.24267 = iftmp.109;
  return D.24267;
}


mini_method_get_rgctx (struct MonoMethod * m)
{
  struct MonoGenericContext * D.24280;
  struct MonoGenericInst * D.24281;
  void * D.24284;
  struct MonoDomain * D.24285;
  struct MonoClass * D.24286;
  struct MonoVTable * D.24287;
  struct MonoGenericContext * D.24288;
  struct MonoGenericInst * D.24289;
  struct MonoDomain * D.24290;

  D.24280 = mini_method_get_context (m);
  D.24281 = D.24280->method_inst;
  if (D.24281 != 0B) goto <D.24282>; else goto <D.24283>;
  <D.24282>:
  D.24285 = mono_domain_get ();
  D.24286 = m->klass;
  D.24287 = mono_class_vtable (D.24285, D.24286);
  D.24288 = mini_method_get_context (m);
  D.24289 = D.24288->method_inst;
  D.24284 = mono_method_lookup_rgctx (D.24287, D.24289);
  return D.24284;
  <D.24283>:
  D.24290 = mono_domain_get ();
  D.24286 = m->klass;
  D.24284 = mono_class_vtable (D.24290, D.24286);
  return D.24284;
}


mini_type_is_vtype (struct MonoCompile * cfg, struct MonoType * t)
{
  gboolean D.24292;
  int iftmp.110;
  int D.24297;
  int D.24299;

  D.24297 = mono_type_is_struct (t);
  if (D.24297 != 0) goto <D.24294>; else goto <D.24298>;
  <D.24298>:
  D.24299 = mini_is_gsharedvt_variable_type (cfg, t);
  if (D.24299 != 0) goto <D.24294>; else goto <D.24295>;
  <D.24294>:
  iftmp.110 = 1;
  goto <D.24296>;
  <D.24295>:
  iftmp.110 = 0;
  <D.24296>:
  D.24292 = iftmp.110;
  return D.24292;
}


mini_class_is_generic_sharable (struct MonoClass * klass)
{
  struct MonoGenericClass * D.24301;
  int D.24304;
  gboolean D.24307;
  int iftmp.111;
  struct MonoGenericContext * D.24312;
  int D.24313;

  D.24301 = klass->generic_class;
  if (D.24301 != 0B) goto <D.24302>; else goto <D.24303>;
  <D.24302>:
  D.24304 = is_async_state_machine_class (klass);
  if (D.24304 != 0) goto <D.24305>; else goto <D.24306>;
  <D.24305>:
  D.24307 = 0;
  return D.24307;
  <D.24306>:
  <D.24303>:
  D.24301 = klass->generic_class;
  if (D.24301 != 0B) goto <D.24311>; else goto <D.24309>;
  <D.24311>:
  D.24301 = klass->generic_class;
  D.24312 = &D.24301->context;
  D.24313 = mono_generic_context_is_sharable (D.24312, 0);
  if (D.24313 != 0) goto <D.24314>; else goto <D.24309>;
  <D.24314>:
  iftmp.111 = 1;
  goto <D.24310>;
  <D.24309>:
  iftmp.111 = 0;
  <D.24310>:
  D.24307 = iftmp.111;
  return D.24307;
}


mini_is_gsharedvt_variable_klass (struct MonoCompile * cfg, struct MonoClass * klass)
{
  gboolean D.24316;
  struct MonoType * D.24317;

  D.24317 = &klass->byval_arg;
  D.24316 = mini_is_gsharedvt_variable_type (cfg, D.24317);
  return D.24316;
}


mini_is_gsharedvt_type_gsctx (struct MonoGenericSharingContext * gsctx, struct MonoType * t)
{
  gboolean D.24319;

  D.24319 = 0;
  return D.24319;
}


mini_is_gsharedvt_type (struct MonoCompile * cfg, struct MonoType * t)
{
  gboolean D.24321;

  D.24321 = 0;
  return D.24321;
}


mini_is_gsharedvt_klass (struct MonoCompile * cfg, struct MonoClass * klass)
{
  gboolean D.24323;

  D.24323 = 0;
  return D.24323;
}


mini_is_gsharedvt_signature (struct MonoCompile * cfg, struct MonoMethodSignature * sig)
{
  gboolean D.24325;

  D.24325 = 0;
  return D.24325;
}


mini_is_gsharedvt_variable_type (struct MonoCompile * cfg, struct MonoType * t)
{
  gboolean D.24327;

  D.24327 = 0;
  return D.24327;
}


mini_is_gsharedvt_sharable_method (struct MonoMethod * method)
{
  gboolean D.24329;

  D.24329 = 0;
  return D.24329;
}


mini_is_gsharedvt_variable_signature (struct MonoMethodSignature * sig)
{
  gboolean D.24331;

  D.24331 = 0;
  return D.24331;
}


