__attribute__((visibility ("hidden")))
mono_generic_context_check_used (struct MonoGenericContext * context)
{
  struct MonoGenericInst * D.23065;
  int D.23066;
  struct MonoGenericInst * D.23067;
  int D.23068;
  int D.23069;
  int context_used;

  context_used = 0;
  D.23065 = context->class_inst;
  D.23066 = inst_check_context_used (D.23065);
  context_used = D.23066 | context_used;
  D.23067 = context->method_inst;
  D.23068 = inst_check_context_used (D.23067);
  context_used = D.23068 | context_used;
  D.23069 = context_used;
  return D.23069;
}


inst_check_context_used (struct MonoGenericInst * inst)
{
  int D.23073;
  struct MonoType * D.23074;
  int D.23075;
  <unnamed-unsigned:22> D.23076;
  int D.23077;
  int context_used;
  int i;

  context_used = 0;
  if (inst == 0B) goto <D.23071>; else goto <D.23072>;
  <D.23071>:
  D.23073 = 0;
  return D.23073;
  <D.23072>:
  i = 0;
  goto <D.22210>;
  <D.22209>:
  D.23074 = inst->type_argv[i];
  D.23075 = type_check_context_used (D.23074, 1);
  context_used = D.23075 | context_used;
  i = i + 1;
  <D.22210>:
  D.23076 = inst->type_argc;
  D.23077 = (int) D.23076;
  if (D.23077 > i) goto <D.22209>; else goto <D.22211>;
  <D.22211>:
  D.23073 = context_used;
  return D.23073;
}


type_check_context_used (struct MonoType * type, gboolean recursive)
{
  int D.23079;
  int D.23080;
  struct MonoClass * D.23081;
  struct MonoArrayType * D.23082;
  struct MonoClass * D.23083;
  struct MonoClass * D.23086;
  struct MonoClass * D.23089;
  struct MonoGenericContainer * D.23090;
  _Bool D.23091;
  long int D.23092;
  long int D.23093;
  struct MonoGenericContext * D.23096;

  D.23079 = mono_type_get_type (type);
  switch (D.23079) <default: <D.22203>, case 18: <D.22200>, case 19: <D.22196>, case 20: <D.22199>, case 21: <D.22201>, case 29: <D.22198>, case 30: <D.22197>>
  <D.22196>:
  D.23080 = 1;
  return D.23080;
  <D.22197>:
  D.23080 = 2;
  return D.23080;
  <D.22198>:
  D.23081 = mono_type_get_class (type);
  D.23080 = mono_class_check_context_used (D.23081);
  return D.23080;
  <D.22199>:
  D.23082 = mono_type_get_array_type (type);
  D.23083 = D.23082->eklass;
  D.23080 = mono_class_check_context_used (D.23083);
  return D.23080;
  <D.22200>:
  if (recursive != 0) goto <D.23084>; else goto <D.23085>;
  <D.23084>:
  D.23086 = mono_type_get_class (type);
  D.23080 = mono_class_check_context_used (D.23086);
  return D.23080;
  <D.23085>:
  D.23080 = 0;
  return D.23080;
  <D.22201>:
  if (recursive != 0) goto <D.23087>; else goto <D.23088>;
  <D.23087>:
  {
    struct MonoGenericClass * gclass;

    gclass = type->data.generic_class;
    D.23089 = gclass->container_class;
    D.23090 = D.23089->generic_container;
    D.23091 = D.23090 == 0B;
    D.23092 = (long int) D.23091;
    D.23093 = __builtin_expect (D.23092, 0);
    if (D.23093 != 0) goto <D.23094>; else goto <D.23095>;
    <D.23094>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 64, "gclass->container_class->generic_container");
    <D.23095>:
    D.23096 = &gclass->context;
    D.23080 = mono_generic_context_check_used (D.23096);
    return D.23080;
  }
  <D.23088>:
  D.23080 = 0;
  return D.23080;
  <D.22203>:
  D.23080 = 0;
  return D.23080;
}


__attribute__((visibility ("hidden")))
mono_class_check_context_used (struct MonoClass * class)
{
  struct MonoType * D.23098;
  int D.23099;
  struct MonoType * D.23100;
  int D.23101;
  struct MonoGenericClass * D.23102;
  struct MonoGenericContext * D.23105;
  int D.23106;
  struct MonoGenericContainer * D.23108;
  struct MonoGenericContext * D.23111;
  int D.23112;
  int D.23113;
  int context_used;

  context_used = 0;
  D.23098 = &class->this_arg;
  D.23099 = type_check_context_used (D.23098, 0);
  context_used = D.23099 | context_used;
  D.23100 = &class->byval_arg;
  D.23101 = type_check_context_used (D.23100, 0);
  context_used = D.23101 | context_used;
  D.23102 = class->generic_class;
  if (D.23102 != 0B) goto <D.23103>; else goto <D.23104>;
  <D.23103>:
  D.23102 = class->generic_class;
  D.23105 = &D.23102->context;
  D.23106 = mono_generic_context_check_used (D.23105);
  context_used = D.23106 | context_used;
  goto <D.23107>;
  <D.23104>:
  D.23108 = class->generic_container;
  if (D.23108 != 0B) goto <D.23109>; else goto <D.23110>;
  <D.23109>:
  D.23108 = class->generic_container;
  D.23111 = &D.23108->context;
  D.23112 = mono_generic_context_check_used (D.23111);
  context_used = D.23112 | context_used;
  <D.23110>:
  <D.23107>:
  D.23113 = context_used;
  return D.23113;
}


__attribute__((visibility ("hidden")))
mono_method_get_declaring_generic_method (struct MonoMethod * method)
{
  long unsigned int D.23115;
  long unsigned int D.23116;
  _Bool D.23117;
  long int D.23118;
  long int D.23119;
  struct MonoMethod * D.23122;
  struct MonoMethodInflated * inflated;

  D.23115 = BIT_FIELD_REF <*method, 64, 256>;
  D.23116 = D.23115 & 2251799813685248;
  D.23117 = D.23116 == 0;
  D.23118 = (long int) D.23117;
  D.23119 = __builtin_expect (D.23118, 0);
  if (D.23119 != 0) goto <D.23120>; else goto <D.23121>;
  <D.23120>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 449, "method->is_inflated");
  <D.23121>:
  inflated = method;
  D.23122 = inflated->declaring;
  return D.23122;
}


__attribute__((visibility ("hidden")))
mono_class_get_method_generic (struct MonoClass * klass, struct MonoMethod * method)
{
  long unsigned int D.23124;
  long unsigned int D.23125;
  struct MonoGenericClass * D.23129;
  unsigned char D.23134;
  struct MonoMethod * D.23137;
  struct MonoMethod * * D.23138;
  long unsigned int D.23139;
  long unsigned int D.23140;
  struct MonoMethod * * D.23141;
  long unsigned int D.23143;
  long unsigned int D.23144;
  struct MonoMethod * D.23147;
  unsigned int D.23149;
  unsigned int i.0;
  struct MonoGenericContext * D.23155;
  struct MonoGenericInst * D.23156;
  struct MonoMethod * declaring;
  struct MonoMethod * m;
  int i;

  D.23124 = BIT_FIELD_REF <*method, 64, 256>;
  D.23125 = D.23124 & 2251799813685248;
  if (D.23125 != 0) goto <D.23126>; else goto <D.23127>;
  <D.23126>:
  declaring = mono_method_get_declaring_generic_method (method);
  goto <D.23128>;
  <D.23127>:
  declaring = method;
  <D.23128>:
  m = 0B;
  D.23129 = klass->generic_class;
  if (D.23129 != 0B) goto <D.23130>; else goto <D.23131>;
  <D.23130>:
  m = mono_class_get_inflated_method (klass, declaring);
  <D.23131>:
  if (m == 0B) goto <D.23132>; else goto <D.23133>;
  <D.23132>:
  mono_class_setup_methods (klass);
  D.23134 = klass->exception_type;
  if (D.23134 != 0) goto <D.23135>; else goto <D.23136>;
  <D.23135>:
  D.23137 = 0B;
  return D.23137;
  <D.23136>:
  i = 0;
  goto <D.22338>;
  <D.22337>:
  D.23138 = klass->methods;
  D.23139 = (long unsigned int) i;
  D.23140 = D.23139 * 8;
  D.23141 = D.23138 + D.23140;
  m = *D.23141;
  if (m == declaring) goto <D.22336>; else goto <D.23142>;
  <D.23142>:
  D.23143 = BIT_FIELD_REF <*m, 64, 256>;
  D.23144 = D.23143 & 2251799813685248;
  if (D.23144 != 0) goto <D.23145>; else goto <D.23146>;
  <D.23145>:
  D.23147 = mono_method_get_declaring_generic_method (m);
  if (D.23147 == declaring) goto <D.22336>; else goto <D.23148>;
  <D.23148>:
  <D.23146>:
  i = i + 1;
  <D.22338>:
  D.23149 = klass->method.count;
  i.0 = (unsigned int) i;
  if (D.23149 > i.0) goto <D.22337>; else goto <D.22336>;
  <D.22336>:
  D.23149 = klass->method.count;
  i.0 = (unsigned int) i;
  if (D.23149 <= i.0) goto <D.23151>; else goto <D.23152>;
  <D.23151>:
  D.23137 = 0B;
  return D.23137;
  <D.23152>:
  <D.23133>:
  if (method != declaring) goto <D.23153>; else goto <D.23154>;
  <D.23153>:
  {
    struct MonoGenericContext context;

    try
      {
        context.class_inst = 0B;
        D.23155 = mono_method_get_context (method);
        D.23156 = D.23155->method_inst;
        context.method_inst = D.23156;
        m = mono_class_inflate_generic_method (m, &context);
      }
    finally
      {
        context = {CLOBBER};
      }
  }
  <D.23154>:
  D.23137 = m;
  return D.23137;
}


__attribute__((visibility ("hidden")))
mono_is_partially_sharable_inst (struct MonoGenericInst * inst)
{
  struct MonoType * D.23161;
  int D.23162;
  unsigned char D.23164;
  <unnamed-unsigned:22> D.23166;
  int D.23167;
  gboolean D.23168;
  int iftmp.1;
  int i;
  gboolean has_refs;
  gboolean has_non_refs;

  has_refs = 0;
  has_non_refs = 0;
  i = 0;
  goto <D.22444>;
  <D.22443>:
  D.23161 = inst->type_argv[i];
  D.23162 = mono_type_is_reference (D.23161);
  if (D.23162 != 0) goto <D.23158>; else goto <D.23163>;
  <D.23163>:
  D.23161 = inst->type_argv[i];
  D.23164 = D.23161->type;
  if (D.23164 == 19) goto <D.23158>; else goto <D.23165>;
  <D.23165>:
  D.23161 = inst->type_argv[i];
  D.23164 = D.23161->type;
  if (D.23164 == 30) goto <D.23158>; else goto <D.23159>;
  <D.23158>:
  has_refs = 1;
  goto <D.23160>;
  <D.23159>:
  has_non_refs = 1;
  <D.23160>:
  i = i + 1;
  <D.22444>:
  D.23166 = inst->type_argc;
  D.23167 = (int) D.23166;
  if (D.23167 > i) goto <D.22443>; else goto <D.22445>;
  <D.22445>:
  if (has_refs != 0) goto <D.23172>; else goto <D.23170>;
  <D.23172>:
  if (has_non_refs != 0) goto <D.23173>; else goto <D.23170>;
  <D.23173>:
  iftmp.1 = 1;
  goto <D.23171>;
  <D.23170>:
  iftmp.1 = 0;
  <D.23171>:
  D.23168 = iftmp.1;
  return D.23168;
}


__attribute__((visibility ("hidden")))
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.2;
  union mono_mutex_t * D.23178;
  _Bool D.23181;
  long int D.23182;
  long int D.23183;
  struct GHashTable * D.23186;
  struct GHashTable * D.23189;
  _Bool D.23192;
  long int D.23193;
  long int D.23194;
  void * D.23199;
  void * tramp_addr.3;
  void * tramp_addr.4;
  int mono_aot_only.5;
  struct MonoDomain * D.23213;
  int num_trampolines.6;
  int num_trampolines.7;
  _Bool D.23218;
  long int D.23219;
  long int D.23220;
  _Bool D.23225;
  long int D.23226;
  long int D.23227;
  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.2 = inited;
      if (inited.2 == 0) goto <D.23176>; else goto <D.23177>;
      <D.23176>:
      mono_counters_register ("GSHAREDVT arg trampolines", 256, &num_trampolines);
      inited = 1;
      <D.23177>:
      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, 16);
      domain_info = domain->runtime_info;
      {
        int ret;

        D.23178 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23178);
        if (ret != 0) goto <D.23179>; else goto <D.23180>;
        <D.23179>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23180>:
        D.23181 = ret != 0;
        D.23182 = (long int) D.23181;
        D.23183 = __builtin_expect (D.23182, 0);
        if (D.23183 != 0) goto <D.23184>; else goto <D.23185>;
        <D.23184>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1148, "ret == 0");
        <D.23185>:
      }
      D.23186 = domain_info->gsharedvt_arg_tramp_hash;
      if (D.23186 == 0B) goto <D.23187>; else goto <D.23188>;
      <D.23187>:
      D.23189 = monoeg_g_hash_table_new (tramp_info_hash, tramp_info_equal);
      domain_info->gsharedvt_arg_tramp_hash = D.23189;
      <D.23188>:
      D.23186 = domain_info->gsharedvt_arg_tramp_hash;
      res = monoeg_g_hash_table_lookup (D.23186, &tinfo);
      {
        int ret;

        D.23178 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23178);
        if (ret != 0) goto <D.23190>; else goto <D.23191>;
        <D.23190>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23191>:
        D.23192 = ret != 0;
        D.23193 = (long int) D.23192;
        D.23194 = __builtin_expect (D.23193, 0);
        if (D.23194 != 0) goto <D.23195>; else goto <D.23196>;
        <D.23195>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1152, "ret == 0");
        <D.23196>:
      }
      if (res != 0B) goto <D.23197>; else goto <D.23198>;
      <D.23197>:
      D.23199 = res;
      return D.23199;
      <D.23198>:
      info = mono_arch_get_gsharedvt_call_info (addr, normal_sig, gsharedvt_sig, gsctx, gsharedvt_in, vcall_offset, calli);
      if (gsharedvt_in != 0) goto <D.23200>; else goto <D.23201>;
      <D.23200>:
      {
        static void * tramp_addr;
        struct MonoMethod * wrapper;

        tramp_addr.3 = tramp_addr;
        if (tramp_addr.3 == 0B) goto <D.23203>; else goto <D.23204>;
        <D.23203>:
        wrapper = mono_marshal_get_gsharedvt_in_wrapper ();
        addr = mono_compile_method (wrapper);
        mono_memory_barrier ();
        tramp_addr = addr;
        <D.23204>:
        addr = tramp_addr;
      }
      goto <D.23205>;
      <D.23201>:
      {
        static void * tramp_addr;
        struct MonoMethod * wrapper;

        tramp_addr.4 = tramp_addr;
        if (tramp_addr.4 == 0B) goto <D.23207>; else goto <D.23208>;
        <D.23207>:
        wrapper = mono_marshal_get_gsharedvt_out_wrapper ();
        addr = mono_compile_method (wrapper);
        mono_memory_barrier ();
        tramp_addr = addr;
        <D.23208>:
        addr = tramp_addr;
      }
      <D.23205>:
      mono_aot_only.5 = mono_aot_only;
      if (mono_aot_only.5 != 0) goto <D.23210>; else goto <D.23211>;
      <D.23210>:
      addr = mono_aot_get_gsharedvt_arg_trampoline (info, addr);
      goto <D.23212>;
      <D.23211>:
      D.23213 = mono_domain_get ();
      addr = mono_arch_get_gsharedvt_arg_trampoline (D.23213, info, addr);
      <D.23212>:
      num_trampolines.6 = num_trampolines;
      num_trampolines.7 = num_trampolines.6 + 1;
      num_trampolines = num_trampolines.7;
      tramp_info = mono_domain_alloc0 (domain, 56);
      memcpy (tramp_info, &tinfo, 56);
      {
        int ret;

        D.23178 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23178);
        if (ret != 0) goto <D.23216>; else goto <D.23217>;
        <D.23216>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23217>:
        D.23218 = ret != 0;
        D.23219 = (long int) D.23218;
        D.23220 = __builtin_expect (D.23219, 0);
        if (D.23220 != 0) goto <D.23221>; else goto <D.23222>;
        <D.23221>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1193, "ret == 0");
        <D.23222>:
      }
      D.23186 = domain_info->gsharedvt_arg_tramp_hash;
      monoeg_g_hash_table_insert_replace (D.23186, tramp_info, addr, 0);
      {
        int ret;

        D.23178 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23178);
        if (ret != 0) goto <D.23223>; else goto <D.23224>;
        <D.23223>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23224>:
        D.23225 = ret != 0;
        D.23226 = (long int) D.23225;
        D.23227 = __builtin_expect (D.23226, 0);
        if (D.23227 != 0) goto <D.23228>; else goto <D.23229>;
        <D.23228>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1196, "ret == 0");
        <D.23229>:
      }
      D.23199 = addr;
      return D.23199;
    }
  finally
    {
      tinfo = {CLOBBER};
    }
}


tramp_info_equal (const void * a, const void * b)
{
  gboolean D.23232;
  int iftmp.8;
  signed long D.23236;
  long unsigned int D.23237;
  long unsigned int D.23238;
  signed long D.23239;
  long unsigned int D.23240;
  long unsigned int D.23241;
  int D.23243;
  int D.23244;
  void * D.23246;
  void * D.23247;
  struct MonoMethodSignature * D.23249;
  struct MonoMethodSignature * D.23250;
  struct MonoMethodSignature * D.23252;
  struct MonoMethodSignature * D.23253;
  struct MonoGenericInst * D.23255;
  struct MonoGenericInst * D.23256;
  struct MonoGenericInst * D.23258;
  struct MonoGenericInst * D.23259;
  struct GSharedVtTrampInfo * tramp1;
  struct GSharedVtTrampInfo * tramp2;

  tramp1 = a;
  tramp2 = b;
  D.23236 = BIT_FIELD_REF <*tramp1, 64, 0>;
  D.23237 = (long unsigned int) D.23236;
  D.23238 = D.23237;
  D.23239 = BIT_FIELD_REF <*tramp2, 64, 0>;
  D.23240 = (long unsigned int) D.23239;
  D.23241 = D.23240;
  if (D.23238 == D.23241) goto <D.23242>; else goto <D.23234>;
  <D.23242>:
  D.23243 = tramp1->vcall_offset;
  D.23244 = tramp2->vcall_offset;
  if (D.23243 == D.23244) goto <D.23245>; else goto <D.23234>;
  <D.23245>:
  D.23246 = tramp1->addr;
  D.23247 = tramp2->addr;
  if (D.23246 == D.23247) goto <D.23248>; else goto <D.23234>;
  <D.23248>:
  D.23249 = tramp1->sig;
  D.23250 = tramp2->sig;
  if (D.23249 == D.23250) goto <D.23251>; else goto <D.23234>;
  <D.23251>:
  D.23252 = tramp1->gsig;
  D.23253 = tramp2->gsig;
  if (D.23252 == D.23253) goto <D.23254>; else goto <D.23234>;
  <D.23254>:
  D.23255 = tramp1->gsctx.class_inst;
  D.23256 = tramp2->gsctx.class_inst;
  if (D.23255 == D.23256) goto <D.23257>; else goto <D.23234>;
  <D.23257>:
  D.23258 = tramp1->gsctx.method_inst;
  D.23259 = tramp2->gsctx.method_inst;
  if (D.23258 == D.23259) goto <D.23260>; else goto <D.23234>;
  <D.23260>:
  iftmp.8 = 1;
  goto <D.23235>;
  <D.23234>:
  iftmp.8 = 0;
  <D.23235>:
  D.23232 = iftmp.8;
  return D.23232;
}


tramp_info_hash (const void * key)
{
  guint D.23262;
  void * D.23263;
  long int D.23264;
  struct GSharedVtTrampInfo * tramp;

  tramp = key;
  D.23263 = tramp->addr;
  D.23264 = (long int) D.23263;
  D.23262 = (guint) D.23264;
  return D.23262;
}


mono_memory_barrier ()
{
  __sync_synchronize ();
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__, __nothrow__, __leaf__))
memcpy (void * restrict __dest, const void * restrict __src, size_t __len)
{
  void * D.23266;
  long unsigned int D.23267;

  D.23267 = __builtin_object_size (__dest, 0);
  D.23266 = __builtin___memcpy_chk (__dest, __src, __len, D.23267);
  return D.23266;
}


__attribute__((visibility ("hidden")))
mono_rgctx_info_type_to_str (MonoRgctxInfoType type)
{
  const char * D.23269;

  switch (type) <default: <D.22688>, case 0: <D.22663>, case 1: <D.22664>, case 2: <D.22665>, case 3: <D.22666>, case 4: <D.22667>, case 5: <D.22668>, case 6: <D.22670>, case 7: <D.22671>, case 8: <D.22672>, case 9: <D.22673>, case 10: <D.22674>, case 11: <D.22675>, case 12: <D.22676>, case 13: <D.22677>, case 14: <D.22678>, case 15: <D.22680>, case 16: <D.22681>, case 17: <D.22682>, case 18: <D.22683>, case 19: <D.22679>, case 20: <D.22669>, case 22: <D.22684>, case 23: <D.22685>, case 24: <D.22686>, case 25: <D.22687>>
  <D.22663>:
  D.23269 = "STATIC_DATA";
  return D.23269;
  <D.22664>:
  D.23269 = "KLASS";
  return D.23269;
  <D.22665>:
  D.23269 = "VTABLE";
  return D.23269;
  <D.22666>:
  D.23269 = "TYPE";
  return D.23269;
  <D.22667>:
  D.23269 = "REFLECTION_TYPE";
  return D.23269;
  <D.22668>:
  D.23269 = "METHOD";
  return D.23269;
  <D.22669>:
  D.23269 = "GSHAREDVT_INFO";
  return D.23269;
  <D.22670>:
  D.23269 = "GENERIC_METHOD_CODE";
  return D.23269;
  <D.22671>:
  D.23269 = "CLASS_FIELD";
  return D.23269;
  <D.22672>:
  D.23269 = "METHOD_RGCTX";
  return D.23269;
  <D.22673>:
  D.23269 = "METHOD_CONTEXT";
  return D.23269;
  <D.22674>:
  D.23269 = "REMOTING_INVOKE_WITH_CHECK";
  return D.23269;
  <D.22675>:
  D.23269 = "METHOD_DELEGATE_CODE";
  return D.23269;
  <D.22676>:
  D.23269 = "CAST_CACHE";
  return D.23269;
  <D.22677>:
  D.23269 = "ARRAY_ELEMENT_SIZE";
  return D.23269;
  <D.22678>:
  D.23269 = "VALUE_SIZE";
  return D.23269;
  <D.22679>:
  D.23269 = "CLASS_BOX_TYPE";
  return D.23269;
  <D.22680>:
  D.23269 = "FIELD_OFFSET";
  return D.23269;
  <D.22681>:
  D.23269 = "METHOD_GSHAREDVT_OUT_TRAMPOLINE";
  return D.23269;
  <D.22682>:
  D.23269 = "METHOD_GSHAREDVT_OUT_TRAMPOLINE_VIRT";
  return D.23269;
  <D.22683>:
  D.23269 = "SIG_GSHAREDVT_OUT_TRAMPOLINE_CALLI";
  return D.23269;
  <D.22684>:
  D.23269 = "MEMCPY";
  return D.23269;
  <D.22685>:
  D.23269 = "BZERO";
  return D.23269;
  <D.22686>:
  D.23269 = "NULLABLE_CLASS_BOX";
  return D.23269;
  <D.22687>:
  D.23269 = "NULLABLE_CLASS_UNBOX";
  return D.23269;
  <D.22688>:
  D.23269 = "<UNKNOWN RGCTX INFO TYPE>";
  return D.23269;
}


__attribute__((visibility ("hidden")))
mini_rgctx_info_type_to_patch_info_type (MonoRgctxInfoType info_type)
{
  MonoJumpInfoType D.23271;

  switch (info_type) <default: <D.22762>, case 0: <D.22747>, case 1: <D.22748>, case 2: <D.22749>, case 3: <D.22750>, case 4: <D.22751>, case 12: <D.22752>, case 13: <D.22753>, case 14: <D.22754>, case 15: <D.22761>, case 19: <D.22755>, case 21: <D.22760>, case 22: <D.22756>, case 23: <D.22757>, case 24: <D.22758>, case 25: <D.22759>>
  <D.22747>:
  <D.22748>:
  <D.22749>:
  <D.22750>:
  <D.22751>:
  <D.22752>:
  <D.22753>:
  <D.22754>:
  <D.22755>:
  <D.22756>:
  <D.22757>:
  <D.22758>:
  <D.22759>:
  <D.22760>:
  D.23271 = 11;
  return D.23271;
  <D.22761>:
  D.23271 = 13;
  return D.23271;
  <D.22762>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1677);
  D.23271 = 4294967295;
  return D.23271;
}


__attribute__((visibility ("hidden")))
mono_method_lookup_or_register_info (struct MonoMethod * method, gboolean in_mrgctx, void * data, MonoRgctxInfoType info_type, struct MonoGenericContext * generic_context)
{
  struct MonoGenericContext * D.23275;
  int iftmp.9;
  long unsigned int D.23280;
  long unsigned int D.23281;
  _Bool D.23283;
  long int D.23284;
  long int D.23285;
  <unnamed-unsigned:22> D.23288;
  _Bool D.23289;
  long int D.23290;
  long int D.23291;
  guint32 D.23297;
  unsigned int index.10;
  struct MonoClass * class;
  int type_argc;
  int index;

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

    D.23275 = mono_method_get_context (method);
    method_inst = D.23275->method_inst;
    D.23280 = BIT_FIELD_REF <*method, 64, 256>;
    D.23281 = D.23280 & 2251799813685248;
    if (D.23281 == 0) goto <D.23277>; else goto <D.23282>;
    <D.23282>:
    if (method_inst == 0B) goto <D.23277>; else goto <D.23278>;
    <D.23277>:
    iftmp.9 = 1;
    goto <D.23279>;
    <D.23278>:
    iftmp.9 = 0;
    <D.23279>:
    D.23283 = iftmp.9 != 0;
    D.23284 = (long int) D.23283;
    D.23285 = __builtin_expect (D.23284, 0);
    if (D.23285 != 0) goto <D.23286>; else goto <D.23287>;
    <D.23286>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1755, "method->is_inflated && method_inst");
    <D.23287>:
    D.23288 = method_inst->type_argc;
    type_argc = (int) D.23288;
    D.23289 = type_argc <= 0;
    D.23290 = (long int) D.23289;
    D.23291 = __builtin_expect (D.23290, 0);
    if (D.23291 != 0) goto <D.23292>; else goto <D.23293>;
    <D.23292>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1757, "type_argc > 0");
    <D.23293>:
  }
  goto <D.23294>;
  <D.23274>:
  type_argc = 0;
  <D.23294>:
  index = lookup_or_register_info (class, type_argc, data, info_type, generic_context);
  if (in_mrgctx != 0) goto <D.23295>; else goto <D.23296>;
  <D.23295>:
  index.10 = (unsigned int) index;
  D.23297 = index.10 | 2147483648;
  return D.23297;
  <D.23296>:
  D.23297 = (guint32) index;
  return D.23297;
}


lookup_or_register_info (struct MonoClass * class, int type_argc, void * data, MonoRgctxInfoType info_type, struct MonoGenericContext * generic_context)
{
  int D.23300;
  <unnamed type> D.23305;
  void * D.23307;
  int D.23308;
  int D.23311;
  int inited.11;
  int max_slot.12;
  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.23300 = info_has_identity (info_type);
  if (D.23300 != 0) goto <D.23301>; else goto <D.23302>;
  <D.23301>:
  oti_list = get_info_templates (rgctx_template, type_argc);
  oti = oti_list;
  i = 0;
  goto <D.22779>;
  <D.22778>:
  {
    void * inflated_data;

    D.23305 = oti->info_type;
    if (D.23305 != info_type) goto <D.23303>; else goto <D.23306>;
    <D.23306>:
    D.23307 = oti->data;
    if (D.23307 == 0B) goto <D.23303>; else goto <D.23304>;
    <D.23303>:
    // predicted unlikely by continue predictor.
    goto <D.22777>;
    <D.23304>:
    inflated_data = inflate_info (oti, generic_context, class, 1);
    D.23308 = info_equal (data, inflated_data, info_type);
    if (D.23308 != 0) goto <D.23309>; else goto <D.23310>;
    <D.23309>:
    free_inflated_info (info_type, inflated_data);
    mono_loader_unlock ();
    D.23311 = i;
    return D.23311;
    <D.23310>:
    free_inflated_info (info_type, inflated_data);
  }
  <D.22777>:
  oti = oti->next;
  i = i + 1;
  <D.22779>:
  if (oti != 0B) goto <D.22778>; else goto <D.22780>;
  <D.22780>:
  <D.23302>:
  i = register_info (class, type_argc, data, info_type);
  mono_loader_unlock ();
  inited.11 = inited;
  if (inited.11 == 0) goto <D.23313>; else goto <D.23314>;
  <D.23313>:
  mono_counters_register ("RGCTX max slot number", 2048, &max_slot);
  inited = 1;
  <D.23314>:
  max_slot.12 = max_slot;
  if (i > max_slot.12) goto <D.23316>; else goto <D.23317>;
  <D.23316>:
  max_slot = i;
  <D.23317>:
  D.23311 = i;
  return D.23311;
}


mono_class_get_runtime_generic_context_template (struct MonoClass * class)
{
  struct MonoRuntimeGenericContextTemplate * D.23321;
  struct MonoClass * D.23322;
  int D.23325;
  void * D.23326;
  struct MonoClass * D.23329;
  struct MonoType * D.23330;
  struct MonoImage * D.23333;
  int i.13;
  <unnamed type> D.23335;
  struct MonoRuntimeGenericContextTemplate * D.23336;
  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.23319>; else goto <D.23320>;
  <D.23319>:
  D.23321 = template;
  return D.23321;
  <D.23320>:
  template = alloc_template (class);
  mono_loader_lock ();
  D.23322 = class->parent;
  if (D.23322 != 0B) goto <D.23323>; else goto <D.23324>;
  <D.23323>:
  {
    guint32 num_entries;
    int max_argc;
    int type_argc;

    D.23322 = class->parent;
    parent_template = mono_class_get_runtime_generic_context_template (D.23322);
    max_argc = template_get_max_argc (parent_template);
    type_argc = 0;
    goto <D.22463>;
    <D.22462>:
    D.23325 = rgctx_template_num_infos (parent_template, type_argc);
    num_entries = (guint32) D.23325;
    i = 0;
    goto <D.22460>;
    <D.22459>:
    {
      struct MonoRuntimeGenericContextInfoTemplate oti;

      try
        {
          D.23322 = class->parent;
          oti = class_get_rgctx_template_oti (D.23322, type_argc, i, 0, 0, 0B); [return slot optimization]
          D.23326 = oti.data;
          if (D.23326 != 0B) goto <D.23327>; else goto <D.23328>;
          <D.23327>:
          D.23326 = oti.data;
          D.23329 = mono_defaults.object_class;
          D.23330 = &D.23329->byval_arg;
          if (D.23326 != D.23330) goto <D.23331>; else goto <D.23332>;
          <D.23331>:
          D.23333 = class->image;
          i.13 = (int) i;
          D.23326 = oti.data;
          D.23335 = oti.info_type;
          rgctx_template_set_slot (D.23333, template, type_argc, i.13, D.23326, D.23335);
          <D.23332>:
          <D.23328>:
        }
      finally
        {
          oti = {CLOBBER};
        }
    }
    i = i + 1;
    <D.22460>:
    if (i < num_entries) goto <D.22459>; else goto <D.22461>;
    <D.22461>:
    type_argc = type_argc + 1;
    <D.22463>:
    if (type_argc <= max_argc) goto <D.22462>; else goto <D.22464>;
    <D.22464>:
  }
  <D.23324>:
  D.23336 = class_lookup_rgctx_template (class);
  if (D.23336 != 0B) goto <D.23337>; else goto <D.23338>;
  <D.23337>:
  template = class_lookup_rgctx_template (class);
  goto <D.23339>;
  <D.23338>:
  class_set_rgctx_template (class, template);
  D.23322 = class->parent;
  if (D.23322 != 0B) goto <D.23340>; else goto <D.23341>;
  <D.23340>:
  register_generic_subclass (class);
  <D.23341>:
  <D.23339>:
  mono_loader_unlock ();
  D.23321 = template;
  return D.23321;
}


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

  size = 24;
  inited.14 = inited;
  if (inited.14 == 0) goto <D.23344>; else goto <D.23345>;
  <D.23344>:
  mono_counters_register ("RGCTX template num allocted", 2048, &num_allocted);
  mono_counters_register ("RGCTX template bytes allocted", 2048, &num_bytes);
  inited = 1;
  <D.23345>:
  num_allocted.15 = num_allocted;
  num_allocted.16 = num_allocted.15 + 1;
  num_allocted = num_allocted.16;
  num_bytes.17 = num_bytes;
  num_bytes.18 = num_bytes.17 + size;
  num_bytes = num_bytes.18;
  D.23351 = class->image;
  size.19 = (unsigned int) size;
  D.23350 = mono_image_alloc0 (D.23351, size.19);
  return D.23350;
}


template_get_max_argc (struct MonoRuntimeGenericContextTemplate * template)
{
  int D.23354;
  struct GSList * D.23355;
  unsigned int D.23356;

  D.23355 = template->method_templates;
  D.23356 = monoeg_g_slist_length (D.23355);
  D.23354 = (int) D.23356;
  return D.23354;
}


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

  i = 0;
  oti = get_info_templates (template, type_argc);
  goto <D.22255>;
  <D.22254>:
  i = i + 1;
  oti = oti->next;
  <D.22255>:
  if (oti != 0B) goto <D.22254>; else goto <D.22256>;
  <D.22256>:
  D.23358 = i;
  return D.23358;
}


class_get_rgctx_template_oti (struct MonoClass * class, int type_argc, guint32 slot, gboolean temporary, gboolean shared, gboolean * do_free)
{
  int iftmp.20;
  _Bool D.23368;
  long int D.23369;
  long int D.23370;
  struct MonoGenericClass * D.23374;
  struct MonoClass * D.23377;
  void * D.23378;
  struct MonoGenericContext * D.23381;
  void * D.23382;
  int tmp_do_free.21;
  <unnamed type> D.23386;
  int slot.22;
  _Bool D.23390;
  long int D.23391;
  long int D.23392;

  if (temporary == 0) goto <D.23362>; else goto <D.23366>;
  <D.23366>:
  if (do_free == 0B) goto <D.23362>; else goto <D.23363>;
  <D.23362>:
  if (temporary != 0) goto <D.23364>; else goto <D.23367>;
  <D.23367>:
  if (do_free != 0B) goto <D.23364>; else goto <D.23363>;
  <D.23364>:
  iftmp.20 = 1;
  goto <D.23365>;
  <D.23363>:
  iftmp.20 = 0;
  <D.23365>:
  D.23368 = iftmp.20 != 0;
  D.23369 = (long int) D.23368;
  D.23370 = __builtin_expect (D.23369, 0);
  if (D.23370 != 0) goto <D.23371>; else goto <D.23372>;
  <D.23371>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 886, "(temporary && do_free) || (!temporary && !do_free)");
  <D.23372>:
  D.23374 = class->generic_class;
  if (D.23374 != 0B) goto <D.23375>; else goto <D.23373>;
  <D.23375>:
  if (shared == 0) goto <D.23376>; else goto <D.23373>;
  <D.23376>:
  {
    struct MonoRuntimeGenericContextInfoTemplate oti;
    gboolean tmp_do_free;

    try
      {
        D.23374 = class->generic_class;
        D.23377 = D.23374->container_class;
        oti = class_get_rgctx_template_oti (D.23377, type_argc, slot, 1, 0, &tmp_do_free);
        D.23378 = oti.data;
        if (D.23378 != 0B) goto <D.23379>; else goto <D.23380>;
        <D.23379>:
        {
          void * info;

          info = oti.data;
          D.23374 = class->generic_class;
          D.23381 = &D.23374->context;
          D.23382 = inflate_info (&oti, D.23381, class, temporary);
          oti.data = D.23382;
          tmp_do_free.21 = tmp_do_free;
          if (tmp_do_free.21 != 0) goto <D.23384>; else goto <D.23385>;
          <D.23384>:
          D.23386 = oti.info_type;
          free_inflated_info (D.23386, info);
          <D.23385>:
        }
        <D.23380>:
        if (temporary != 0) goto <D.23387>; else goto <D.23388>;
        <D.23387>:
        *do_free = 1;
        <D.23388>:
        <retval> = oti;
        return <retval>;
      }
    finally
      {
        oti = {CLOBBER};
        tmp_do_free = {CLOBBER};
      }
  }
  <D.23373>:
  {
    struct MonoRuntimeGenericContextTemplate * template;
    struct MonoRuntimeGenericContextInfoTemplate * oti;

    template = mono_class_get_runtime_generic_context_template (class);
    slot.22 = (int) slot;
    oti = rgctx_template_get_other_slot (template, type_argc, slot.22);
    D.23390 = oti == 0B;
    D.23391 = (long int) D.23390;
    D.23392 = __builtin_expect (D.23391, 0);
    if (D.23392 != 0) goto <D.23393>; else goto <D.23394>;
    <D.23393>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 912, "oti");
    <D.23394>:
    if (temporary != 0) goto <D.23395>; else goto <D.23396>;
    <D.23395>:
    *do_free = 0;
    <D.23396>:
    <retval> = *oti;
    return <retval>;
  }
}


rgctx_template_get_other_slot (struct MonoRuntimeGenericContextTemplate * template, int type_argc, int slot)
{
  _Bool D.23399;
  long int D.23400;
  long int D.23401;
  struct MonoRuntimeGenericContextInfoTemplate * D.23406;
  int i;
  struct MonoRuntimeGenericContextInfoTemplate * oti;

  D.23399 = slot < 0;
  D.23400 = (long int) D.23399;
  D.23401 = __builtin_expect (D.23400, 0);
  if (D.23401 != 0) goto <D.23402>; else goto <D.23403>;
  <D.23402>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 189, "slot >= 0");
  <D.23403>:
  oti = get_info_templates (template, type_argc);
  i = 0;
  goto <D.22246>;
  <D.22245>:
  if (oti == 0B) goto <D.23404>; else goto <D.23405>;
  <D.23404>:
  D.23406 = 0B;
  return D.23406;
  <D.23405>:
  oti = oti->next;
  i = i + 1;
  <D.22246>:
  if (i < slot) goto <D.22245>; else goto <D.22247>;
  <D.22247>:
  D.23406 = oti;
  return D.23406;
}


rgctx_template_set_slot (struct MonoImage * image, struct MonoRuntimeGenericContextTemplate * template, int type_argc, int slot, void * data, MonoRgctxInfoType info_type)
{
  struct MonoRuntimeGenericContextInfoTemplate * list.23;
  int inited.24;
  _Bool D.23412;
  long int D.23413;
  long int D.23414;
  _Bool D.23417;
  long int D.23418;
  long int D.23419;
  struct MonoRuntimeGenericContextInfoTemplate * D.23424;
  struct MonoRuntimeGenericContextInfoTemplate * D.23427;
  void * D.23428;
  _Bool D.23429;
  long int D.23430;
  long int D.23431;
  struct MonoRuntimeGenericContextInfoTemplate * list.25;
  struct MonoClass * D.23435;
  struct MonoType * D.23436;
  int num_markers.26;
  int num_markers.27;
  int num_data.28;
  int num_data.29;
  static gboolean inited = 0;
  static int num_markers = 0;
  static int num_data = 0;
  int i;
  struct MonoRuntimeGenericContextInfoTemplate * list;
  struct MonoRuntimeGenericContextInfoTemplate * * oti;

  try
    {
      list.23 = get_info_templates (template, type_argc);
      list = list.23;
      oti = &list;
      inited.24 = inited;
      if (inited.24 == 0) goto <D.23410>; else goto <D.23411>;
      <D.23410>:
      mono_counters_register ("RGCTX oti num markers", 2048, &num_markers);
      mono_counters_register ("RGCTX oti num data", 2048, &num_data);
      inited = 1;
      <D.23411>:
      D.23412 = slot < 0;
      D.23413 = (long int) D.23412;
      D.23414 = __builtin_expect (D.23413, 0);
      if (D.23414 != 0) goto <D.23415>; else goto <D.23416>;
      <D.23415>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 414, "slot >= 0");
      <D.23416>:
      D.23417 = data == 0B;
      D.23418 = (long int) D.23417;
      D.23419 = __builtin_expect (D.23418, 0);
      if (D.23419 != 0) goto <D.23420>; else goto <D.23421>;
      <D.23420>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 415, "data");
      <D.23421>:
      i = 0;
      goto <D.22323>;
      <D.22322>:
      if (i > 0) goto <D.23422>; else goto <D.23423>;
      <D.23422>:
      D.23424 = *oti;
      oti = &D.23424->next;
      <D.23423>:
      D.23424 = *oti;
      if (D.23424 == 0B) goto <D.23425>; else goto <D.23426>;
      <D.23425>:
      D.23427 = alloc_oti (image);
      *oti = D.23427;
      <D.23426>:
      i = i + 1;
      <D.22323>:
      if (i <= slot) goto <D.22322>; else goto <D.22324>;
      <D.22324>:
      D.23424 = *oti;
      D.23428 = D.23424->data;
      D.23429 = D.23428 != 0B;
      D.23430 = (long int) D.23429;
      D.23431 = __builtin_expect (D.23430, 0);
      if (D.23431 != 0) goto <D.23432>; else goto <D.23433>;
      <D.23432>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 426, "!(*oti)->data");
      <D.23433>:
      D.23424 = *oti;
      D.23424->data = data;
      D.23424 = *oti;
      D.23424->info_type = info_type;
      list.25 = list;
      set_info_templates (image, template, type_argc, list.25);
      D.23435 = mono_defaults.object_class;
      D.23436 = &D.23435->byval_arg;
      if (D.23436 == data) goto <D.23437>; else goto <D.23438>;
      <D.23437>:
      num_markers.26 = num_markers;
      num_markers.27 = num_markers.26 + 1;
      num_markers = num_markers.27;
      goto <D.23441>;
      <D.23438>:
      num_data.28 = num_data;
      num_data.29 = num_data.28 + 1;
      num_data = num_data.29;
      <D.23441>:
    }
  finally
    {
      list = {CLOBBER};
    }
}


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

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


set_info_templates (struct MonoImage * image, struct MonoRuntimeGenericContextTemplate * template, int type_argc, struct MonoRuntimeGenericContextInfoTemplate * oti)
{
  _Bool D.23454;
  long int D.23455;
  long int D.23456;
  struct GSList * D.23462;
  unsigned int D.23463;
  struct GSList * D.23464;
  int D.23465;
  unsigned int D.23466;
  _Bool D.23467;
  long int D.23468;
  long int D.23469;

  D.23454 = type_argc < 0;
  D.23455 = (long int) D.23454;
  D.23456 = __builtin_expect (D.23455, 0);
  if (D.23456 != 0) goto <D.23457>; else goto <D.23458>;
  <D.23457>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 152, "type_argc >= 0");
  <D.23458>:
  if (type_argc == 0) goto <D.23459>; else goto <D.23460>;
  <D.23459>:
  template->infos = oti;
  goto <D.23461>;
  <D.23460>:
  {
    int length;
    struct GSList * list;

    D.23462 = template->method_templates;
    D.23463 = monoeg_g_slist_length (D.23462);
    length = (int) D.23463;
    goto <D.22233>;
    <D.22232>:
    D.23462 = template->method_templates;
    D.23464 = g_slist_append_image (image, D.23462, 0B);
    template->method_templates = D.23464;
    length = length + 1;
    <D.22233>:
    if (length < type_argc) goto <D.22232>; else goto <D.22234>;
    <D.22234>:
    D.23462 = template->method_templates;
    D.23465 = type_argc + -1;
    D.23466 = (unsigned int) D.23465;
    list = monoeg_g_slist_nth (D.23462, D.23466);
    D.23467 = list == 0B;
    D.23468 = (long int) D.23467;
    D.23469 = __builtin_expect (D.23468, 0);
    if (D.23469 != 0) goto <D.23470>; else goto <D.23471>;
    <D.23470>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 166, "list");
    <D.23471>:
    list->data = oti;
  }
  <D.23461>:
}


class_lookup_rgctx_template (struct MonoClass * class)
{
  struct MonoImage * D.23472;
  struct GHashTable * D.23473;
  struct MonoRuntimeGenericContextTemplate * D.23476;
  struct MonoRuntimeGenericContextTemplate * template;

  D.23472 = class->image;
  D.23473 = D.23472->rgctx_template_hash;
  if (D.23473 == 0B) goto <D.23474>; else goto <D.23475>;
  <D.23474>:
  D.23476 = 0B;
  return D.23476;
  <D.23475>:
  D.23472 = class->image;
  D.23473 = D.23472->rgctx_template_hash;
  template = monoeg_g_hash_table_lookup (D.23473, class);
  D.23476 = template;
  return D.23476;
}


class_set_rgctx_template (struct MonoClass * class, struct MonoRuntimeGenericContextTemplate * rgctx_template)
{
  struct MonoImage * D.23478;
  struct GHashTable * D.23479;
  struct GHashTable * D.23482;

  D.23478 = class->image;
  D.23479 = D.23478->rgctx_template_hash;
  if (D.23479 == 0B) goto <D.23480>; else goto <D.23481>;
  <D.23480>:
  D.23478 = class->image;
  D.23482 = monoeg_g_hash_table_new (mono_aligned_addr_hash, 0B);
  D.23478->rgctx_template_hash = D.23482;
  <D.23481>:
  D.23478 = class->image;
  D.23479 = D.23478->rgctx_template_hash;
  monoeg_g_hash_table_insert_replace (D.23479, class, rgctx_template, 0);
}


register_generic_subclass (struct MonoClass * class)
{
  _Bool D.23483;
  long int D.23484;
  long int D.23485;
  struct MonoGenericClass * D.23488;
  struct GHashTable * generic_subclass_hash.36;
  struct GHashTable * D.23494;
  struct MonoClass * parent;
  struct MonoClass * subclass;
  struct MonoRuntimeGenericContextTemplate * rgctx_template;

  parent = class->parent;
  rgctx_template = class_lookup_rgctx_template (class);
  D.23483 = rgctx_template == 0B;
  D.23484 = (long int) D.23483;
  D.23485 = __builtin_expect (D.23484, 0);
  if (D.23485 != 0) goto <D.23486>; else goto <D.23487>;
  <D.23486>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 260, "rgctx_template");
  <D.23487>:
  D.23488 = parent->generic_class;
  if (D.23488 != 0B) goto <D.23489>; else goto <D.23490>;
  <D.23489>:
  D.23488 = parent->generic_class;
  parent = D.23488->container_class;
  <D.23490>:
  generic_subclass_hash.36 = generic_subclass_hash;
  if (generic_subclass_hash.36 == 0B) goto <D.23492>; else goto <D.23493>;
  <D.23492>:
  D.23494 = monoeg_g_hash_table_new (mono_aligned_addr_hash, 0B);
  generic_subclass_hash = D.23494;
  <D.23493>:
  generic_subclass_hash.36 = generic_subclass_hash;
  subclass = monoeg_g_hash_table_lookup (generic_subclass_hash.36, parent);
  rgctx_template->next_subclass = subclass;
  generic_subclass_hash.36 = generic_subclass_hash;
  monoeg_g_hash_table_insert_replace (generic_subclass_hash.36, parent, class, 0);
}


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

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


class_uninstantiated (struct MonoClass * class)
{
  struct MonoGenericClass * D.23497;
  struct MonoClass * D.23500;

  D.23497 = class->generic_class;
  if (D.23497 != 0B) goto <D.23498>; else goto <D.23499>;
  <D.23498>:
  D.23497 = class->generic_class;
  D.23500 = D.23497->container_class;
  return D.23500;
  <D.23499>:
  D.23500 = class;
  return D.23500;
}


info_has_identity (MonoRgctxInfoType info_type)
{
  int D.23502;
  _Bool D.23503;

  D.23503 = info_type != 12;
  D.23502 = (int) D.23503;
  return D.23502;
}


get_info_templates (struct MonoRuntimeGenericContextTemplate * template, int type_argc)
{
  _Bool D.23505;
  long int D.23506;
  long int D.23507;
  struct MonoRuntimeGenericContextInfoTemplate * D.23512;
  struct GSList * D.23513;
  int D.23514;
  unsigned int D.23515;

  D.23505 = type_argc < 0;
  D.23506 = (long int) D.23505;
  D.23507 = __builtin_expect (D.23506, 0);
  if (D.23507 != 0) goto <D.23508>; else goto <D.23509>;
  <D.23508>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 139, "type_argc >= 0");
  <D.23509>:
  if (type_argc == 0) goto <D.23510>; else goto <D.23511>;
  <D.23510>:
  D.23512 = template->infos;
  return D.23512;
  <D.23511>:
  D.23513 = template->method_templates;
  D.23514 = type_argc + -1;
  D.23515 = (unsigned int) D.23514;
  D.23512 = monoeg_g_slist_nth_data (D.23513, D.23515);
  return D.23512;
}


inflate_info (struct MonoRuntimeGenericContextInfoTemplate * oti, struct MonoGenericContext * context, struct MonoClass * class, gboolean temporary)
{
  _Bool D.23517;
  long int D.23518;
  long int D.23519;
  struct MonoClass * D.23522;
  struct MonoType * D.23523;
  void * D.23526;
  struct MonoImage * iftmp.37;
  int D.23531;
  _Bool D.23532;
  long int D.23533;
  long int D.23534;
  struct MonoClass * D.23537;
  struct MonoType * D.23538;
  long unsigned int D.23539;
  long unsigned int D.23540;
  _Bool D.23541;
  long int D.23542;
  long int D.23543;
  unsigned char D.23549;
  const char * D.23551;
  struct MonoMethodSignature * D.23552;
  struct MonoClass * D.23553;
  _Bool D.23554;
  long int D.23555;
  long int D.23556;
  struct GPtrArray * D.23559;
  struct GPtrArray * D.23560;
  void * * D.23561;
  long unsigned int D.23562;
  long unsigned int D.23563;
  void * * D.23564;
  void * D.23565;
  struct GPtrArray * D.23566;
  unsigned int D.23567;
  unsigned int i.38;
  struct MonoClass * D.23569;
  struct MonoType * D.23570;
  struct MonoMethodSignature * D.23571;
  long unsigned int D.23572;
  long unsigned int D.23573;
  _Bool D.23574;
  long int D.23575;
  long int D.23576;
  unsigned char D.23582;
  const char * D.23584;
  struct MonoMethodSignature * D.23585;
  struct MonoClass * D.23586;
  _Bool D.23587;
  long int D.23588;
  long int D.23589;
  struct MonoClass * D.23592;
  struct MonoType * D.23593;
  long int field.39;
  struct MonoClassField * D.23595;
  long int D.23596;
  long int D.23597;
  long int D.23598;
  struct MonoClassField * D.23599;
  _Bool D.23600;
  long int D.23601;
  long int D.23602;
  long unsigned int D.23605;
  long unsigned int D.23606;
  int D.23607;
  _Bool D.23608;
  long int D.23609;
  long int D.23610;
  void * data;
  MonoRgctxInfoType info_type;
  struct MonoError error;

  try
    {
      data = oti->data;
      info_type = oti->info_type;
      D.23517 = data == 0B;
      D.23518 = (long int) D.23517;
      D.23519 = __builtin_expect (D.23518, 0);
      if (D.23519 != 0) goto <D.23520>; else goto <D.23521>;
      <D.23520>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 519, "data");
      <D.23521>:
      D.23522 = mono_defaults.object_class;
      D.23523 = &D.23522->byval_arg;
      if (D.23523 == data) goto <D.23524>; else goto <D.23525>;
      <D.23524>:
      D.23522 = mono_defaults.object_class;
      D.23526 = &D.23522->byval_arg;
      return D.23526;
      <D.23525>:
      switch (info_type) <default: <D.22402>, case 0: <D.22349>, case 1: <D.22350>, case 2: <D.22351>, case 3: <D.22352>, case 4: <D.22353>, case 5: <D.22364>, case 6: <D.22365>, case 7: <D.22391>, case 8: <D.22366>, case 9: <D.22367>, case 10: <D.22368>, case 11: <D.22369>, case 12: <D.22354>, case 13: <D.22355>, case 14: <D.22356>, case 15: <D.22392>, case 16: <D.22383>, case 17: <D.22384>, case 18: <D.22398>, case 19: <D.22357>, case 20: <D.22374>, case 21: <D.22360>, case 22: <D.22358>, case 23: <D.22359>, case 24: <D.22361>, case 25: <D.22362>>
      <D.22349>:
      <D.22350>:
      <D.22351>:
      <D.22352>:
      <D.22353>:
      <D.22354>:
      <D.22355>:
      <D.22356>:
      <D.22357>:
      <D.22358>:
      <D.22359>:
      <D.22360>:
      <D.22361>:
      <D.22362>:
      {
        void * result;

        if (temporary == 0) goto <D.23528>; else goto <D.23529>;
        <D.23528>:
        iftmp.37 = class->image;
        goto <D.23530>;
        <D.23529>:
        iftmp.37 = 0B;
        <D.23530>:
        result = mono_class_inflate_generic_type_with_mempool (iftmp.37, data, context, &error);
        D.23531 = mono_error_ok (&error);
        D.23532 = D.23531 == 0;
        D.23533 = (long int) D.23532;
        D.23534 = __builtin_expect (D.23533, 0);
        if (D.23534 != 0) goto <D.23535>; else goto <D.23536>;
        <D.23535>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 542, "mono_error_ok (&error)");
        <D.23536>:
        D.23526 = result;
        return D.23526;
      }
      <D.22364>:
      <D.22365>:
      <D.22366>:
      <D.22367>:
      <D.22368>:
      <D.22369>:
      {
        struct MonoMethod * method;
        struct MonoMethod * inflated_method;
        struct MonoType * inflated_type;
        struct MonoClass * inflated_class;

        method = data;
        D.23537 = method->klass;
        D.23538 = &D.23537->byval_arg;
        inflated_type = mono_class_inflate_generic_type (D.23538, context);
        inflated_class = mono_class_from_mono_type (inflated_type);
        mono_metadata_free_type (inflated_type);
        mono_class_init (inflated_class);
        D.23539 = BIT_FIELD_REF <*method, 64, 256>;
        D.23540 = D.23539 & 4467570830351532032;
        D.23541 = D.23540 != 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", 561, "!method->wrapper_type");
        <D.23545>:
        D.23549 = inflated_class->byval_arg.type;
        if (D.23549 == 20) goto <D.23546>; else goto <D.23550>;
        <D.23550>:
        D.23549 = inflated_class->byval_arg.type;
        if (D.23549 == 29) goto <D.23546>; else goto <D.23547>;
        <D.23546>:
        D.23551 = method->name;
        D.23552 = method->signature;
        inflated_method = mono_method_search_in_array_class (inflated_class, D.23551, D.23552);
        goto <D.23548>;
        <D.23547>:
        inflated_method = mono_class_inflate_generic_method (method, context);
        <D.23548>:
        D.23553 = inflated_method->klass;
        mono_class_init (D.23553);
        D.23553 = inflated_method->klass;
        D.23554 = D.23553 != inflated_class;
        D.23555 = (long int) D.23554;
        D.23556 = __builtin_expect (D.23555, 0);
        if (D.23556 != 0) goto <D.23557>; else goto <D.23558>;
        <D.23557>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 571, "inflated_method->klass == inflated_class");
        <D.23558>:
        D.23526 = inflated_method;
        return D.23526;
      }
      <D.22374>:
      {
        struct MonoGSharedVtMethodInfo * info;
        struct MonoGSharedVtMethodInfo * res;
        int i;

        info = data;
        res = monoeg_malloc0 (16);
        D.23559 = monoeg_g_ptr_array_new ();
        res->entries = D.23559;
        i = 0;
        goto <D.22381>;
        <D.22380>:
        {
          struct MonoRuntimeGenericContextInfoTemplate * otemplate;
          struct MonoRuntimeGenericContextInfoTemplate * template;

          D.23560 = info->entries;
          D.23561 = D.23560->pdata;
          D.23562 = (long unsigned int) i;
          D.23563 = D.23562 * 8;
          D.23564 = D.23561 + D.23563;
          otemplate = *D.23564;
          template = monoeg_malloc0 (24);
          memcpy (template, otemplate, 24);
          D.23565 = inflate_info (template, context, class, 0);
          template->data = D.23565;
          D.23566 = res->entries;
          monoeg_g_ptr_array_add (D.23566, template);
        }
        i = i + 1;
        <D.22381>:
        D.23560 = info->entries;
        D.23567 = D.23560->len;
        i.38 = (unsigned int) i;
        if (D.23567 > i.38) goto <D.22380>; else goto <D.22382>;
        <D.22382>:
        D.23526 = res;
        return D.23526;
      }
      <D.22383>:
      <D.22384>:
      {
        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.23569 = method->klass;
        D.23570 = &D.23569->byval_arg;
        inflated_type = mono_class_inflate_generic_type (D.23570, context);
        inflated_class = mono_class_from_mono_type (inflated_type);
        res = monoeg_malloc0 (16);
        D.23571 = info->sig;
        res->sig = D.23571;
        mono_metadata_free_type (inflated_type);
        mono_class_init (inflated_class);
        D.23572 = BIT_FIELD_REF <*method, 64, 256>;
        D.23573 = D.23572 & 4467570830351532032;
        D.23574 = D.23573 != 0;
        D.23575 = (long int) D.23574;
        D.23576 = __builtin_expect (D.23575, 0);
        if (D.23576 != 0) goto <D.23577>; else goto <D.23578>;
        <D.23577>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 616, "!method->wrapper_type");
        <D.23578>:
        D.23582 = inflated_class->byval_arg.type;
        if (D.23582 == 20) goto <D.23579>; else goto <D.23583>;
        <D.23583>:
        D.23582 = inflated_class->byval_arg.type;
        if (D.23582 == 29) goto <D.23579>; else goto <D.23580>;
        <D.23579>:
        D.23584 = method->name;
        D.23585 = method->signature;
        inflated_method = mono_method_search_in_array_class (inflated_class, D.23584, D.23585);
        goto <D.23581>;
        <D.23580>:
        inflated_method = mono_class_inflate_generic_method (method, context);
        <D.23581>:
        D.23586 = inflated_method->klass;
        mono_class_init (D.23586);
        D.23586 = inflated_method->klass;
        D.23587 = D.23586 != inflated_class;
        D.23588 = (long int) D.23587;
        D.23589 = __builtin_expect (D.23588, 0);
        if (D.23589 != 0) goto <D.23590>; else goto <D.23591>;
        <D.23590>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 626, "inflated_method->klass == inflated_class");
        <D.23591>:
        res->method = inflated_method;
        D.23526 = res;
        return D.23526;
      }
      <D.22391>:
      <D.22392>:
      {
        struct MonoClassField * field;
        struct MonoType * inflated_type;
        struct MonoClass * inflated_class;
        int i;
        void * dummy;

        try
          {
            field = data;
            D.23592 = field->parent;
            D.23593 = &D.23592->byval_arg;
            inflated_type = mono_class_inflate_generic_type (D.23593, context);
            inflated_class = mono_class_from_mono_type (inflated_type);
            field.39 = (long int) field;
            D.23592 = field->parent;
            D.23595 = D.23592->fields;
            D.23596 = (long int) D.23595;
            D.23597 = field.39 - D.23596;
            D.23598 = D.23597 /[ex] 32;
            i = (int) D.23598;
            dummy = 0B;
            mono_metadata_free_type (inflated_type);
            mono_class_get_fields (inflated_class, &dummy);
            D.23599 = inflated_class->fields;
            D.23600 = D.23599 == 0B;
            D.23601 = (long int) D.23600;
            D.23602 = __builtin_expect (D.23601, 0);
            if (D.23602 != 0) goto <D.23603>; else goto <D.23604>;
            <D.23603>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 643, "inflated_class->fields");
            <D.23604>:
            D.23599 = inflated_class->fields;
            D.23605 = (long unsigned int) i;
            D.23606 = D.23605 * 32;
            D.23526 = D.23599 + D.23606;
            return D.23526;
          }
        finally
          {
            dummy = {CLOBBER};
          }
      }
      <D.22398>:
      {
        struct MonoMethodSignature * sig;
        struct MonoMethodSignature * isig;
        struct MonoError error;

        try
          {
            sig = data;
            isig = mono_inflate_generic_signature (sig, context, &error);
            D.23607 = mono_error_ok (&error);
            D.23608 = D.23607 == 0;
            D.23609 = (long int) D.23608;
            D.23610 = __builtin_expect (D.23609, 0);
            if (D.23610 != 0) goto <D.23611>; else goto <D.23612>;
            <D.23611>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 653, "mono_error_ok (&error)");
            <D.23612>:
            D.23526 = isig;
            return D.23526;
          }
        finally
          {
            error = {CLOBBER};
          }
      }
      <D.22402>:
      monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 658);
      D.23526 = 0B;
      return D.23526;
    }
  finally
    {
      error = {CLOBBER};
    }
}


info_equal (void * data1, void * data2, MonoRgctxInfoType info_type)
{
  gboolean D.23617;
  struct MonoClass * D.23618;
  struct MonoClass * D.23619;
  _Bool D.23620;
  _Bool D.23621;

  switch (info_type) <default: <D.22743>, case 0: <D.22718>, case 1: <D.22719>, case 2: <D.22720>, case 3: <D.22721>, case 4: <D.22722>, case 5: <D.22731>, case 6: <D.22733>, case 7: <D.22734>, case 8: <D.22736>, case 9: <D.22737>, case 10: <D.22738>, case 11: <D.22739>, case 12: <D.22723>, case 13: <D.22724>, case 14: <D.22725>, case 15: <D.22735>, case 16: <D.22740>, case 17: <D.22741>, case 18: <D.22742>, case 19: <D.22726>, case 20: <D.22732>, case 22: <D.22727>, case 23: <D.22728>, case 24: <D.22729>, case 25: <D.22730>>
  <D.22718>:
  <D.22719>:
  <D.22720>:
  <D.22721>:
  <D.22722>:
  <D.22723>:
  <D.22724>:
  <D.22725>:
  <D.22726>:
  <D.22727>:
  <D.22728>:
  <D.22729>:
  <D.22730>:
  D.23618 = mono_class_from_mono_type (data1);
  D.23619 = mono_class_from_mono_type (data2);
  D.23620 = D.23618 == D.23619;
  D.23617 = (gboolean) D.23620;
  return D.23617;
  <D.22731>:
  <D.22732>:
  <D.22733>:
  <D.22734>:
  <D.22735>:
  <D.22736>:
  <D.22737>:
  <D.22738>:
  <D.22739>:
  <D.22740>:
  <D.22741>:
  <D.22742>:
  D.23621 = data1 == data2;
  D.23617 = (gboolean) D.23621;
  return D.23617;
  <D.22743>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1644);
  D.23617 = 0;
  return D.23617;
}


free_inflated_info (MonoRgctxInfoType info_type, void * info)
{
  if (info == 0B) goto <D.23623>; else goto <D.23624>;
  <D.23623>:
  return;
  <D.23624>:
  switch (info_type) <default: <D.22414>, case 0: <D.22407>, case 1: <D.22408>, case 2: <D.22409>, case 3: <D.22410>, case 4: <D.22411>, case 12: <D.22412>>
  <D.22407>:
  <D.22408>:
  <D.22409>:
  <D.22410>:
  <D.22411>:
  <D.22412>:
  mono_metadata_free_type (info);
  goto <D.22413>;
  <D.22414>:
  goto <D.22413>;
  <D.22413>:
}


register_info (struct MonoClass * class, int type_argc, void * data, MonoRgctxInfoType info_type)
{
  void * D.23627;
  struct MonoGenericClass * D.23629;
  void * D.23634;
  struct MonoImage * D.23636;
  struct MonoClass * D.23637;
  struct MonoType * D.23638;
  int D.23639;
  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.22707>;
  <D.22706>:
  D.23627 = oti->data;
  if (D.23627 == 0B) goto <D.22705>; else goto <D.23628>;
  <D.23628>:
  i = i + 1;
  oti = oti->next;
  <D.22707>:
  if (oti != 0B) goto <D.22706>; else goto <D.22705>;
  <D.22705>:
  parent = class->parent;
  goto <D.22712>;
  <D.22711>:
  {
    struct MonoRuntimeGenericContextTemplate * parent_template;
    struct MonoRuntimeGenericContextInfoTemplate * oti;

    D.23629 = parent->generic_class;
    if (D.23629 != 0B) goto <D.23630>; else goto <D.23631>;
    <D.23630>:
    D.23629 = parent->generic_class;
    parent = D.23629->container_class;
    <D.23631>:
    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.23632>; else goto <D.23633>;
    <D.23632>:
    D.23634 = oti->data;
    if (D.23634 != 0B) goto <D.22710>; else goto <D.23635>;
    <D.23635>:
    <D.23633>:
    D.23636 = parent->image;
    D.23637 = mono_defaults.object_class;
    D.23638 = &D.23637->byval_arg;
    rgctx_template_set_slot (D.23636, parent_template, type_argc, i, D.23638, 0);
    parent = parent->parent;
  }
  <D.22712>:
  if (parent != 0B) goto <D.22711>; else goto <D.22710>;
  <D.22710>:
  fill_in_rgctx_template_slot (class, type_argc, i, data, info_type);
  D.23639 = i;
  return D.23639;
}


fill_in_rgctx_template_slot (struct MonoClass * class, int type_argc, int index, void * data, MonoRgctxInfoType info_type)
{
  struct MonoImage * D.23641;
  struct GHashTable * generic_subclass_hash.40;
  _Bool D.23646;
  long int D.23647;
  long int D.23648;
  struct MonoClass * D.23651;
  unsigned int index.41;
  void * D.23653;
  _Bool D.23654;
  long int D.23655;
  long int D.23656;
  struct MonoRuntimeGenericContextTemplate * template;
  struct MonoClass * subclass;

  template = mono_class_get_runtime_generic_context_template (class);
  D.23641 = class->image;
  rgctx_template_set_slot (D.23641, template, type_argc, index, data, info_type);
  generic_subclass_hash.40 = generic_subclass_hash;
  if (generic_subclass_hash.40 != 0B) goto <D.23643>; else goto <D.23644>;
  <D.23643>:
  generic_subclass_hash.40 = generic_subclass_hash;
  subclass = monoeg_g_hash_table_lookup (generic_subclass_hash.40, class);
  goto <D.23645>;
  <D.23644>:
  subclass = 0B;
  <D.23645>:
  goto <D.22658>;
  <D.22657>:
  {
    struct MonoRuntimeGenericContextInfoTemplate subclass_oti;
    struct MonoRuntimeGenericContextTemplate * subclass_template;

    try
      {
        subclass_template = class_lookup_rgctx_template (subclass);
        D.23646 = subclass_template == 0B;
        D.23647 = (long int) D.23646;
        D.23648 = __builtin_expect (D.23647, 0);
        if (D.23648 != 0) goto <D.23649>; else goto <D.23650>;
        <D.23649>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1509, "subclass_template");
        <D.23650>:
        D.23651 = subclass->parent;
        index.41 = (unsigned int) index;
        subclass_oti = class_get_rgctx_template_oti (D.23651, type_argc, index.41, 0, 0, 0B); [return slot optimization]
        D.23653 = subclass_oti.data;
        D.23654 = D.23653 == 0B;
        D.23655 = (long int) D.23654;
        D.23656 = __builtin_expect (D.23655, 0);
        if (D.23656 != 0) goto <D.23657>; else goto <D.23658>;
        <D.23657>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1512, "subclass_oti.data");
        <D.23658>:
        D.23653 = subclass_oti.data;
        fill_in_rgctx_template_slot (subclass, type_argc, index, D.23653, info_type);
        subclass = subclass_template->next_subclass;
      }
    finally
      {
        subclass_oti = {CLOBBER};
      }
  }
  <D.22658>:
  if (subclass != 0B) goto <D.22657>; else goto <D.22659>;
  <D.22659>:
}


__attribute__((visibility ("hidden")))
mono_class_rgctx_get_array_size (int n, gboolean mrgctx)
{
  unsigned int n.42;
  _Bool D.23660;
  long int D.23661;
  long int D.23662;
  int D.23667;

  n.42 = (unsigned int) n;
  D.23660 = n.42 > 29;
  D.23661 = (long int) D.23660;
  D.23662 = __builtin_expect (D.23661, 0);
  if (D.23662 != 0) goto <D.23663>; else goto <D.23664>;
  <D.23663>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1784, "n >= 0 && n < 30");
  <D.23664>:
  if (mrgctx != 0) goto <D.23665>; else goto <D.23666>;
  <D.23665>:
  D.23667 = 6 << n;
  return D.23667;
  <D.23666>:
  D.23667 = 4 << n;
  return D.23667;
}


__attribute__((visibility ("hidden")))
mono_class_fill_runtime_generic_context (struct MonoVTable * class_vtable, guint8 * caller, guint32 slot)
{
  union mono_mutex_t * D.23669;
  _Bool D.23672;
  long int D.23673;
  long int D.23674;
  int inited.43;
  int num_alloced.44;
  int num_alloced.45;
  _Bool D.23686;
  long int D.23687;
  long int D.23688;
  void * D.23691;
  static gboolean inited = 0;
  static int num_alloced = 0;
  struct MonoDomain * domain;
  void * * rgctx;
  void * info;

  domain = class_vtable->domain;
  {
    int ret;

    D.23669 = &domain->lock.mutex;
    ret = pthread_mutex_lock (D.23669);
    if (ret != 0) goto <D.23670>; else goto <D.23671>;
    <D.23670>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.23671>:
    D.23672 = ret != 0;
    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", 1925, "ret == 0");
    <D.23676>:
  }
  inited.43 = inited;
  if (inited.43 == 0) goto <D.23678>; else goto <D.23679>;
  <D.23678>:
  mono_counters_register ("RGCTX num alloced", 2048, &num_alloced);
  inited = 1;
  <D.23679>:
  rgctx = class_vtable->runtime_generic_context;
  if (rgctx == 0B) goto <D.23680>; else goto <D.23681>;
  <D.23680>:
  rgctx = alloc_rgctx_array (domain, 0, 0);
  class_vtable->runtime_generic_context = rgctx;
  num_alloced.44 = num_alloced;
  num_alloced.45 = num_alloced.44 + 1;
  num_alloced = num_alloced.45;
  <D.23681>:
  {
    int ret;

    D.23669 = &domain->lock.mutex;
    ret = pthread_mutex_unlock (D.23669);
    if (ret != 0) goto <D.23684>; else goto <D.23685>;
    <D.23684>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.23685>:
    D.23686 = ret != 0;
    D.23687 = (long int) D.23686;
    D.23688 = __builtin_expect (D.23687, 0);
    if (D.23688 != 0) goto <D.23689>; else goto <D.23690>;
    <D.23689>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1939, "ret == 0");
    <D.23690>:
  }
  info = fill_runtime_generic_context (class_vtable, rgctx, caller, slot, 0B);
  D.23691 = info;
  return D.23691;
}


alloc_rgctx_array (struct MonoDomain * domain, int n, gboolean is_mrgctx)
{
  int D.23693;
  unsigned int D.23694;
  unsigned int D.23695;
  unsigned int size.46;
  int inited.47;
  int mrgctx_num_alloced.48;
  int mrgctx_num_alloced.49;
  int mrgctx_bytes_alloced.50;
  int mrgctx_bytes_alloced.51;
  int rgctx_num_alloced.52;
  int rgctx_num_alloced.53;
  int rgctx_bytes_alloced.54;
  int rgctx_bytes_alloced.55;
  void * * D.23711;
  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.23693 = mono_class_rgctx_get_array_size (n, is_mrgctx);
  D.23694 = (unsigned int) D.23693;
  D.23695 = D.23694 * 8;
  size = (int) D.23695;
  size.46 = (unsigned int) size;
  array = mono_domain_alloc0 (domain, size.46);
  inited.47 = inited;
  if (inited.47 == 0) goto <D.23698>; else goto <D.23699>;
  <D.23698>:
  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.23699>:
  if (is_mrgctx != 0) goto <D.23700>; else goto <D.23701>;
  <D.23700>:
  mrgctx_num_alloced.48 = mrgctx_num_alloced;
  mrgctx_num_alloced.49 = mrgctx_num_alloced.48 + 1;
  mrgctx_num_alloced = mrgctx_num_alloced.49;
  mrgctx_bytes_alloced.50 = mrgctx_bytes_alloced;
  mrgctx_bytes_alloced.51 = mrgctx_bytes_alloced.50 + size;
  mrgctx_bytes_alloced = mrgctx_bytes_alloced.51;
  goto <D.23706>;
  <D.23701>:
  rgctx_num_alloced.52 = rgctx_num_alloced;
  rgctx_num_alloced.53 = rgctx_num_alloced.52 + 1;
  rgctx_num_alloced = rgctx_num_alloced.53;
  rgctx_bytes_alloced.54 = rgctx_bytes_alloced;
  rgctx_bytes_alloced.55 = rgctx_bytes_alloced.54 + size;
  rgctx_bytes_alloced = rgctx_bytes_alloced.55;
  <D.23706>:
  D.23711 = array;
  return D.23711;
}


fill_runtime_generic_context (struct MonoVTable * class_vtable, void * * rgctx, guint8 * caller, guint32 slot, struct MonoGenericInst * method_inst)
{
  struct MonoGenericContext * iftmp.56;
  struct MonoGenericClass * D.23714;
  struct MonoGenericInst * iftmp.57;
  _Bool D.23722;
  long int D.23723;
  long int D.23724;
  union mono_mutex_t * D.23727;
  _Bool D.23730;
  long int D.23731;
  long int D.23732;
  _Bool D.23735;
  int D.23736;
  unsigned int size.58;
  unsigned int D.23740;
  int D.23745;
  int D.23746;
  unsigned int D.23747;
  unsigned int first_slot.59;
  unsigned int D.23751;
  unsigned int offset.60;
  unsigned int D.23753;
  unsigned int D.23754;
  long unsigned int D.23755;
  long unsigned int D.23756;
  void * * D.23757;
  _Bool D.23762;
  long int D.23763;
  long int D.23764;
  void * D.23767;
  long unsigned int D.23768;
  long unsigned int D.23769;
  void * * D.23770;
  void * D.23771;
  int D.23774;
  void * * D.23775;
  int D.23776;
  void * D.23777;
  _Bool D.23778;
  long int D.23779;
  long int D.23780;
  _Bool D.23785;
  long int D.23786;
  long int D.23787;
  struct MonoClass * D.23790;
  int iftmp.61;
  <unnamed-unsigned:22> D.23794;
  _Bool D.23798;
  long int D.23799;
  long int D.23800;
  _Bool D.23808;
  long int D.23809;
  long int D.23810;
  int do_free.62;
  <unnamed type> D.23816;
  void * D.23817;
  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.23714 = class->generic_class;
      if (D.23714 != 0B) goto <D.23715>; else goto <D.23716>;
      <D.23715>:
      D.23714 = class->generic_class;
      iftmp.56 = &D.23714->context;
      goto <D.23717>;
      <D.23716>:
      iftmp.56 = 0B;
      <D.23717>:
      class_context = iftmp.56;
      if (class_context != 0B) goto <D.23719>; else goto <D.23720>;
      <D.23719>:
      iftmp.57 = class_context->class_inst;
      goto <D.23721>;
      <D.23720>:
      iftmp.57 = 0B;
      <D.23721>:
      context.class_inst = iftmp.57;
      context.method_inst = method_inst;
      D.23722 = rgctx == 0B;
      D.23723 = (long int) D.23722;
      D.23724 = __builtin_expect (D.23723, 0);
      if (D.23724 != 0) goto <D.23725>; else goto <D.23726>;
      <D.23725>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1840, "rgctx");
      <D.23726>:
      {
        int ret;

        D.23727 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23727);
        if (ret != 0) goto <D.23728>; else goto <D.23729>;
        <D.23728>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23729>:
        D.23730 = ret != 0;
        D.23731 = (long int) D.23730;
        D.23732 = __builtin_expect (D.23731, 0);
        if (D.23732 != 0) goto <D.23733>; else goto <D.23734>;
        <D.23733>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1842, "ret == 0");
        <D.23734>:
      }
      first_slot = 0;
      D.23735 = method_inst != 0B;
      D.23736 = (int) D.23735;
      size = mono_class_rgctx_get_array_size (0, D.23736);
      if (method_inst != 0B) goto <D.23737>; else goto <D.23738>;
      <D.23737>:
      size.58 = (unsigned int) size;
      D.23740 = size.58 + 4294967294;
      size = (int) D.23740;
      <D.23738>:
      i = 0;
      <D.22830>:
      {
        int offset;

        if (method_inst != 0B) goto <D.23743>; else goto <D.23741>;
        <D.23743>:
        if (i == 0) goto <D.23744>; else goto <D.23741>;
        <D.23744>:
        offset = 2;
        goto <D.23742>;
        <D.23741>:
        offset = 0;
        <D.23742>:
        D.23745 = first_slot + size;
        D.23746 = D.23745 + -1;
        D.23747 = (unsigned int) D.23746;
        if (D.23747 > slot) goto <D.23748>; else goto <D.23749>;
        <D.23748>:
        first_slot.59 = (unsigned int) first_slot;
        D.23751 = slot - first_slot.59;
        offset.60 = (unsigned int) offset;
        D.23753 = D.23751 + offset.60;
        D.23754 = D.23753 + 1;
        rgctx_index = (int) D.23754;
        D.23755 = (long unsigned int) rgctx_index;
        D.23756 = D.23755 * 8;
        D.23757 = rgctx + D.23756;
        info = *D.23757;
        if (info != 0B) goto <D.23758>; else goto <D.23759>;
        <D.23758>:
        {
          int ret;

          D.23727 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.23727);
          if (ret != 0) goto <D.23760>; else goto <D.23761>;
          <D.23760>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.23761>:
          D.23762 = ret != 0;
          D.23763 = (long int) D.23762;
          D.23764 = __builtin_expect (D.23763, 0);
          if (D.23764 != 0) goto <D.23765>; else goto <D.23766>;
          <D.23765>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1863, "ret == 0");
          <D.23766>:
        }
        D.23767 = info;
        return D.23767;
        <D.23759>:
        goto <D.22829>;
        <D.23749>:
        D.23768 = (long unsigned int) offset;
        D.23769 = D.23768 * 8;
        D.23770 = rgctx + D.23769;
        D.23771 = *D.23770;
        if (D.23771 == 0B) goto <D.23772>; else goto <D.23773>;
        <D.23772>:
        D.23768 = (long unsigned int) offset;
        D.23769 = D.23768 * 8;
        D.23770 = rgctx + D.23769;
        D.23774 = i + 1;
        D.23735 = method_inst != 0B;
        D.23736 = (int) D.23735;
        D.23775 = alloc_rgctx_array (domain, D.23774, D.23736);
        *D.23770 = D.23775;
        <D.23773>:
        D.23768 = (long unsigned int) offset;
        D.23769 = D.23768 * 8;
        D.23770 = rgctx + D.23769;
        rgctx = *D.23770;
        D.23776 = size + -1;
        first_slot = D.23776 + first_slot;
        D.23774 = i + 1;
        D.23735 = method_inst != 0B;
        D.23736 = (int) D.23735;
        size = mono_class_rgctx_get_array_size (D.23774, D.23736);
      }
      i = i + 1;
      goto <D.22830>;
      <D.22829>:
      D.23755 = (long unsigned int) rgctx_index;
      D.23756 = D.23755 * 8;
      D.23757 = rgctx + D.23756;
      D.23777 = *D.23757;
      D.23778 = D.23777 != 0B;
      D.23779 = (long int) D.23778;
      D.23780 = __builtin_expect (D.23779, 0);
      if (D.23780 != 0) goto <D.23781>; else goto <D.23782>;
      <D.23781>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1875, "!rgctx [rgctx_index]");
      <D.23782>:
      {
        int ret;

        D.23727 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23727);
        if (ret != 0) goto <D.23783>; else goto <D.23784>;
        <D.23783>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23784>:
        D.23785 = ret != 0;
        D.23786 = (long int) D.23785;
        D.23787 = __builtin_expect (D.23786, 0);
        if (D.23787 != 0) goto <D.23788>; else goto <D.23789>;
        <D.23788>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1877, "ret == 0");
        <D.23789>:
      }
      D.23790 = get_shared_class (class);
      if (method_inst != 0B) goto <D.23792>; else goto <D.23793>;
      <D.23792>:
      D.23794 = method_inst->type_argc;
      iftmp.61 = (int) D.23794;
      goto <D.23795>;
      <D.23793>:
      iftmp.61 = 0;
      <D.23795>:
      oti = class_get_rgctx_template_oti (D.23790, iftmp.61, slot, 1, 1, &do_free);
      info = instantiate_info (domain, &oti, &context, class, caller);
      {
        int ret;

        D.23727 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23727);
        if (ret != 0) goto <D.23796>; else goto <D.23797>;
        <D.23796>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23797>:
        D.23798 = ret != 0;
        D.23799 = (long int) D.23798;
        D.23800 = __builtin_expect (D.23799, 0);
        if (D.23800 != 0) goto <D.23801>; else goto <D.23802>;
        <D.23801>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1890, "ret == 0");
        <D.23802>:
      }
      D.23755 = (long unsigned int) rgctx_index;
      D.23756 = D.23755 * 8;
      D.23757 = rgctx + D.23756;
      D.23777 = *D.23757;
      if (D.23777 != 0B) goto <D.23803>; else goto <D.23804>;
      <D.23803>:
      D.23755 = (long unsigned int) rgctx_index;
      D.23756 = D.23755 * 8;
      D.23757 = rgctx + D.23756;
      info = *D.23757;
      goto <D.23805>;
      <D.23804>:
      D.23755 = (long unsigned int) rgctx_index;
      D.23756 = D.23755 * 8;
      D.23757 = rgctx + D.23756;
      *D.23757 = info;
      <D.23805>:
      {
        int ret;

        D.23727 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23727);
        if (ret != 0) goto <D.23806>; else goto <D.23807>;
        <D.23806>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23807>:
        D.23808 = ret != 0;
        D.23809 = (long int) D.23808;
        D.23810 = __builtin_expect (D.23809, 0);
        if (D.23810 != 0) goto <D.23811>; else goto <D.23812>;
        <D.23811>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1899, "ret == 0");
        <D.23812>:
      }
      do_free.62 = do_free;
      if (do_free.62 != 0) goto <D.23814>; else goto <D.23815>;
      <D.23814>:
      D.23816 = oti.info_type;
      D.23817 = oti.data;
      free_inflated_info (D.23816, D.23817);
      <D.23815>:
      D.23767 = info;
      return D.23767;
    }
  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.23820;
  void * D.23823;
  <unnamed type> D.23824;
  _Bool D.23825;
  long int D.23826;
  long int D.23827;
  int D.23832;
  struct MonoMethod * D.23833;
  struct MonoClass * D.23835;
  long unsigned int D.23836;
  long unsigned int D.23837;
  struct MonoType * D.23839;
  short unsigned int D.23840;
  int D.23841;
  int D.23842;
  int D.23844;
  long unsigned int D.23845;
  long unsigned int D.23846;
  long unsigned int D.23847;
  long unsigned int D.23848;
  _Bool D.23849;
  long int D.23850;
  long int D.23851;
  struct MonoGenericInst * D.23854;
  _Bool D.23855;
  long int D.23856;
  long int D.23857;
  struct MonoClass * D.23860;
  struct MonoException * D.23863;
  long unsigned int D.23864;
  long unsigned int D.23865;
  _Bool D.23866;
  long int D.23867;
  long int D.23868;
  struct MonoGenericInst * D.23871;
  _Bool D.23872;
  long int D.23873;
  long int D.23874;
  _Bool D.23877;
  long int D.23878;
  long int D.23879;
  struct MonoDomain * D.23882;
  void * D.23883;
  _Bool D.23884;
  long int D.23885;
  long int D.23886;
  _Bool D.23889;
  long int D.23890;
  long int D.23891;
  struct MonoGenericSharingContext * D.23894;
  _Bool D.23895;
  long unsigned int D.23896;
  long unsigned int D.23897;
  _Bool D.23898;
  long int D.23899;
  long int D.23900;
  struct MonoClass * D.23910;
  struct MonoClass * D.23911;
  struct MonoClass * D.23912;
  const char * D.23914;
  int D.23915;
  unsigned int D.23917;
  unsigned int D.23918;
  int imt_slot.63;
  int D.23922;
  int D.23924;
  int D.23925;
  unsigned int D.23926;
  unsigned int D.23927;
  struct MonoDomain * D.23931;
  void * D.23932;
  _Bool D.23933;
  long int D.23934;
  long int D.23935;
  _Bool D.23938;
  long int D.23939;
  long int D.23940;
  struct MonoDomain * D.23943;
  void * D.23944;
  _Bool D.23947;
  long int D.23948;
  long int D.23949;
  struct MonoGenericSharingContext * D.23958;
  struct MonoMethodSignature * D.23961;
  struct MonoMethod * D.23965;
  void * D.23966;
  struct MonoGenericSharingContext * D.23967;
  struct GPtrArray * D.23968;
  unsigned int D.23969;
  long unsigned int D.23970;
  long unsigned int D.23971;
  long unsigned int D.23972;
  void * * D.23973;
  long unsigned int D.23974;
  long unsigned int D.23975;
  void * * D.23976;
  <unnamed type> D.23977;
  int align.64;
  unsigned int align.65;
  int D.23982;
  int D.23987;
  int D.23988;
  long int D.23989;
  void * D.23990;
  void * D.23991;
  unsigned int i.66;
  void * data;
  gboolean temporary;

  D.23820 = oti->data;
  if (D.23820 == 0B) goto <D.23821>; else goto <D.23822>;
  <D.23821>:
  D.23823 = 0B;
  return D.23823;
  <D.23822>:
  D.23824 = oti->info_type;
  switch (D.23824) <default: <D.22578>, case 0: <D.22573>, case 1: <D.22574>, case 2: <D.22575>, case 12: <D.22576>>
  <D.22573>:
  <D.22574>:
  <D.22575>:
  <D.22576>:
  temporary = 1;
  goto <D.22577>;
  <D.22578>:
  temporary = 0;
  <D.22577>:
  data = inflate_info (oti, context, class, temporary);
  D.23824 = oti->info_type;
  switch (D.23824) <default: <D.22645>, case 0: <D.22579>, case 1: <D.22580>, case 2: <D.22581>, case 3: <D.22591>, case 4: <D.22592>, case 5: <D.22593>, case 6: <D.22594>, case 7: <D.22598>, case 8: <D.22601>, case 9: <D.22604>, case 10: <D.22596>, case 11: <D.22597>, case 12: <D.22582>, case 13: <D.22583>, case 14: <D.22584>, case 15: <D.22599>, case 16: <D.22612>, case 17: <D.22613>, case 18: <D.22606>, case 19: <D.22585>, case 20: <D.22630>, case 22: <D.22586>, case 23: <D.22587>, case 24: <D.22588>, case 25: <D.22589>>
  <D.22579>:
  <D.22580>:
  <D.22581>:
  <D.22582>:
  <D.22583>:
  <D.22584>:
  <D.22585>:
  <D.22586>:
  <D.22587>:
  <D.22588>:
  <D.22589>:
  {
    struct MonoClass * arg_class;

    arg_class = mono_class_from_mono_type (data);
    D.23824 = oti->info_type;
    free_inflated_info (D.23824, data);
    D.23825 = arg_class == 0B;
    D.23826 = (long int) D.23825;
    D.23827 = __builtin_expect (D.23826, 0);
    if (D.23827 != 0) goto <D.23828>; else goto <D.23829>;
    <D.23828>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1239, "arg_class");
    <D.23829>:
    D.23824 = oti->info_type;
    if (D.23824 == 1) goto <D.23830>; else goto <D.23831>;
    <D.23830>:
    mono_class_compute_gc_descriptor (arg_class);
    <D.23831>:
    D.23824 = oti->info_type;
    D.23823 = class_type_info (domain, arg_class, D.23824);
    return D.23823;
  }
  <D.22591>:
  D.23823 = data;
  return D.23823;
  <D.22592>:
  D.23823 = mono_type_get_object (domain, data);
  return D.23823;
  <D.22593>:
  D.23823 = data;
  return D.23823;
  <D.22594>:
  {
    void * addr;

    addr = mono_compile_method (data);
    D.23832 = mono_method_needs_static_rgctx_invoke (data, 0);
    D.23823 = mini_add_method_trampoline (0B, data, addr, D.23832, 0);
    return D.23823;
  }
  <D.22596>:
  D.23833 = mono_marshal_get_remoting_invoke_with_check (data);
  D.23823 = mono_compile_method (D.23833);
  return D.23823;
  <D.22597>:
  D.23823 = mono_domain_alloc0 (domain, 8);
  return D.23823;
  <D.22598>:
  D.23823 = data;
  return D.23823;
  <D.22599>:
  {
    struct MonoClassField * field;

    field = data;
    D.23835 = field->parent;
    D.23836 = BIT_FIELD_REF <*D.23835, 64, 256>;
    D.23837 = D.23836 & 1152921504606846976;
    if (D.23837 != 0) goto <D.23838>; else goto <D.23834>;
    <D.23838>:
    D.23839 = field->type;
    D.23840 = D.23839->attrs;
    D.23841 = (int) D.23840;
    D.23842 = D.23841 & 16;
    if (D.23842 == 0) goto <D.23843>; else goto <D.23834>;
    <D.23843>:
    D.23844 = field->offset;
    D.23845 = (long unsigned int) D.23844;
    D.23846 = D.23845 + 18446744073709551600;
    D.23823 = (void *) D.23846;
    return D.23823;
    <D.23834>:
    D.23844 = field->offset;
    D.23845 = (long unsigned int) D.23844;
    D.23823 = (void *) D.23845;
    return D.23823;
  }
  <D.22601>:
  {
    struct MonoMethodInflated * method;
    struct MonoVTable * vtable;

    method = data;
    D.23847 = BIT_FIELD_REF <MEM[(void *)method], 64, 256>;
    D.23848 = D.23847 & 2251799813685248;
    D.23849 = D.23848 == 0;
    D.23850 = (long int) D.23849;
    D.23851 = __builtin_expect (D.23850, 0);
    if (D.23851 != 0) goto <D.23852>; else goto <D.23853>;
    <D.23852>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1281, "method->method.method.is_inflated");
    <D.23853>:
    D.23854 = method->context.method_inst;
    D.23855 = D.23854 == 0B;
    D.23856 = (long int) D.23855;
    D.23857 = __builtin_expect (D.23856, 0);
    if (D.23857 != 0) goto <D.23858>; else goto <D.23859>;
    <D.23858>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1282, "method->context.method_inst");
    <D.23859>:
    D.23860 = method->method.method.klass;
    vtable = mono_class_vtable (domain, D.23860);
    if (vtable == 0B) goto <D.23861>; else goto <D.23862>;
    <D.23861>:
    D.23860 = method->method.method.klass;
    D.23863 = mono_class_get_exception_for_failure (D.23860);
    mono_raise_exception (D.23863);
    <D.23862>:
    D.23854 = method->context.method_inst;
    D.23823 = mono_method_lookup_rgctx (vtable, D.23854);
    return D.23823;
  }
  <D.22604>:
  {
    struct MonoMethodInflated * method;

    method = data;
    D.23864 = BIT_FIELD_REF <MEM[(void *)method], 64, 256>;
    D.23865 = D.23864 & 2251799813685248;
    D.23866 = D.23865 == 0;
    D.23867 = (long int) D.23866;
    D.23868 = __builtin_expect (D.23867, 0);
    if (D.23868 != 0) goto <D.23869>; else goto <D.23870>;
    <D.23869>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1293, "method->method.method.is_inflated");
    <D.23870>:
    D.23871 = method->context.method_inst;
    D.23872 = D.23871 == 0B;
    D.23873 = (long int) D.23872;
    D.23874 = __builtin_expect (D.23873, 0);
    if (D.23874 != 0) goto <D.23875>; else goto <D.23876>;
    <D.23875>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1294, "method->context.method_inst");
    <D.23876>:
    D.23823 = method->context.method_inst;
    return D.23823;
  }
  <D.22606>:
  {
    struct MonoMethodSignature * gsig;
    struct MonoMethodSignature * sig;
    void * addr;
    struct MonoJitInfo * caller_ji;
    struct MonoGenericJitInfo * gji;

    gsig = oti->data;
    sig = data;
    D.23877 = caller == 0B;
    D.23878 = (long int) D.23877;
    D.23879 = __builtin_expect (D.23878, 0);
    if (D.23879 != 0) goto <D.23880>; else goto <D.23881>;
    <D.23880>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1310, "caller");
    <D.23881>:
    D.23882 = mono_domain_get ();
    D.23883 = mono_get_addr_from_ftnptr (caller);
    caller_ji = mini_jit_info_table_find (D.23882, D.23883, 0B);
    D.23884 = caller_ji == 0B;
    D.23885 = (long int) D.23884;
    D.23886 = __builtin_expect (D.23885, 0);
    if (D.23886 != 0) goto <D.23887>; else goto <D.23888>;
    <D.23887>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1312, "caller_ji");
    <D.23888>:
    gji = mono_jit_info_get_generic_jit_info (caller_ji);
    D.23889 = gji == 0B;
    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", 1314, "gji");
    <D.23893>:
    D.23894 = gji->generic_sharing_context;
    addr = mini_get_gsharedvt_wrapper (0, 0B, sig, gsig, D.23894, -1, 1);
    D.23823 = addr;
    return D.23823;
  }
  <D.22612>:
  <D.22613>:
  {
    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.23824 = oti->info_type;
    D.23895 = D.23824 == 17;
    virtual = (gboolean) D.23895;
    callee_gji = 0B;
    call_sig = call_info->sig;
    method = call_info->method;
    D.23896 = BIT_FIELD_REF <*method, 64, 256>;
    D.23897 = D.23896 & 2251799813685248;
    D.23898 = D.23897 == 0;
    D.23899 = (long int) D.23898;
    D.23900 = __builtin_expect (D.23899, 0);
    if (D.23900 != 0) goto <D.23901>; else goto <D.23902>;
    <D.23901>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1337, "method->is_inflated");
    <D.23902>:
    if (virtual == 0) goto <D.23903>; else goto <D.23904>;
    <D.23903>:
    addr = mono_compile_method (method);
    goto <D.23905>;
    <D.23904>:
    addr = 0B;
    <D.23905>:
    if (virtual != 0) goto <D.23906>; else goto <D.23907>;
    <D.23906>:
    D.23910 = method->klass;
    D.23911 = D.23910->parent;
    D.23912 = mono_defaults.multicastdelegate_class;
    if (D.23911 == D.23912) goto <D.23913>; else goto <D.23908>;
    <D.23913>:
    D.23914 = method->name;
    D.23915 = strcmp (D.23914, "Invoke");
    if (D.23915 == 0) goto <D.23916>; else goto <D.23908>;
    <D.23916>:
    vcall_offset = -2;
    goto <D.23909>;
    <D.23908>:
    D.23910 = method->klass;
    D.23917 = D.23910->flags;
    D.23918 = D.23917 & 32;
    if (D.23918 != 0) goto <D.23919>; else goto <D.23920>;
    <D.23919>:
    {
      guint32 imt_slot;

      imt_slot = mono_method_get_imt_slot (method);
      imt_slot.63 = (int) imt_slot;
      D.23922 = imt_slot.63 + -19;
      vcall_offset = D.23922 * 8;
    }
    goto <D.23923>;
    <D.23920>:
    D.23924 = mono_method_get_vtable_index (method);
    D.23925 = D.23924 * 8;
    D.23926 = (unsigned int) D.23925;
    D.23927 = D.23926 + 56;
    vcall_offset = (gint32) D.23927;
    <D.23923>:
    <D.23909>:
    goto <D.23928>;
    <D.23907>:
    vcall_offset = -1;
    <D.23928>:
    D.23877 = caller == 0B;
    D.23878 = (long int) D.23877;
    D.23879 = __builtin_expect (D.23878, 0);
    if (D.23879 != 0) goto <D.23929>; else goto <D.23930>;
    <D.23929>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1364, "caller");
    <D.23930>:
    D.23931 = mono_domain_get ();
    D.23932 = mono_get_addr_from_ftnptr (caller);
    caller_ji = mini_jit_info_table_find (D.23931, D.23932, 0B);
    D.23933 = caller_ji == 0B;
    D.23934 = (long int) D.23933;
    D.23935 = __builtin_expect (D.23934, 0);
    if (D.23935 != 0) goto <D.23936>; else goto <D.23937>;
    <D.23936>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1366, "caller_ji");
    <D.23937>:
    gji = mono_jit_info_get_generic_jit_info (caller_ji);
    D.23938 = gji == 0B;
    D.23939 = (long int) D.23938;
    D.23940 = __builtin_expect (D.23939, 0);
    if (D.23940 != 0) goto <D.23941>; else goto <D.23942>;
    <D.23941>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1368, "gji");
    <D.23942>:
    D.23943 = mono_domain_get ();
    D.23944 = mono_get_addr_from_ftnptr (addr);
    callee_ji = mini_jit_info_table_find (D.23943, D.23944, 0B);
    callee_gsharedvt = ji_is_gsharedvt (callee_ji);
    if (callee_gsharedvt != 0) goto <D.23945>; else goto <D.23946>;
    <D.23945>:
    callee_gji = mono_jit_info_get_generic_jit_info (callee_ji);
    D.23947 = callee_gji == 0B;
    D.23948 = (long int) D.23947;
    D.23949 = __builtin_expect (D.23948, 0);
    if (D.23949 != 0) goto <D.23950>; else goto <D.23951>;
    <D.23950>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1375, "callee_gji");
    <D.23951>:
    <D.23946>:
    if (virtual != 0) goto <D.23952>; else goto <D.23955>;
    <D.23955>:
    if (callee_gsharedvt == 0) goto <D.23952>; else goto <D.23953>;
    <D.23952>:
    {
      struct MonoMethodSignature * sig;
      struct MonoMethodSignature * gsig;

      D.23896 = BIT_FIELD_REF <*method, 64, 256>;
      D.23897 = D.23896 & 2251799813685248;
      D.23898 = D.23897 == 0;
      D.23899 = (long int) D.23898;
      D.23900 = __builtin_expect (D.23899, 0);
      if (D.23900 != 0) goto <D.23956>; else goto <D.23957>;
      <D.23956>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1392, "method->is_inflated");
      <D.23957>:
      sig = mono_method_signature (method);
      gsig = call_sig;
      D.23958 = gji->generic_sharing_context;
      addr = mini_get_gsharedvt_wrapper (0, addr, sig, gsig, D.23958, vcall_offset, 0);
    }
    goto <D.23954>;
    <D.23953>:
    if (callee_gsharedvt != 0) goto <D.23959>; else goto <D.23960>;
    <D.23959>:
    {
      struct MonoMethodSignature * sig;
      struct MonoMethodSignature * gsig;

      D.23961 = mono_method_signature (method);
      if (D.23961 == call_sig) goto <D.23962>; else goto <D.23963>;
      <D.23962>:
      goto <D.23964>;
      <D.23963>:
      sig = mono_method_signature (method);
      D.23965 = jinfo_get_method (callee_ji);
      gsig = mono_method_signature (D.23965);
      D.23966 = callee_ji->code_start;
      D.23967 = callee_gji->generic_sharing_context;
      addr = mini_get_gsharedvt_wrapper (1, D.23966, sig, gsig, D.23967, -1, 0);
      sig = mono_method_signature (method);
      gsig = call_sig;
      D.23958 = gji->generic_sharing_context;
      addr = mini_get_gsharedvt_wrapper (0, addr, sig, gsig, D.23958, -1, 0);
      <D.23964>:
    }
    <D.23960>:
    <D.23954>:
    D.23823 = addr;
    return D.23823;
  }
  <D.22630>:
  {
    struct MonoGSharedVtMethodInfo * info;
    struct MonoGSharedVtMethodRuntimeInfo * res;
    struct MonoType * t;
    int i;
    int offset;
    int align;
    int size;

    try
      {
        info = data;
        D.23968 = info->entries;
        D.23969 = D.23968->len;
        D.23970 = (long unsigned int) D.23969;
        D.23971 = D.23970 + 1;
        D.23972 = D.23971 * 8;
        res = monoeg_malloc0 (D.23972);
        offset = 0;
        i = 0;
        goto <D.22643>;
        <D.22642>:
        {
          struct MonoRuntimeGenericContextInfoTemplate * template;

          D.23968 = info->entries;
          D.23973 = D.23968->pdata;
          D.23974 = (long unsigned int) i;
          D.23975 = D.23974 * 8;
          D.23976 = D.23973 + D.23975;
          template = *D.23976;
          D.23977 = template->info_type;
          switch (D.23977) <default: <D.22641>, case 21: <D.22639>>
          <D.22639>:
          t = template->data;
          size = mono_type_size (t, &align);
          align.64 = align;
          align.65 = (unsigned int) align.64;
          if (align.65 <= 7) goto <D.23980>; else goto <D.23981>;
          <D.23980>:
          align = 8;
          <D.23981>:
          D.23982 = mono_type_is_struct (t);
          if (D.23982 != 0) goto <D.23983>; else goto <D.23984>;
          <D.23983>:
          align.64 = align;
          align.65 = (unsigned int) align.64;
          if (align.65 <= 15) goto <D.23985>; else goto <D.23986>;
          <D.23985>:
          align = 16;
          <D.23986>:
          <D.23984>:
          align.64 = align;
          D.23987 = align.64 + -1;
          offset = D.23987 + offset;
          align.64 = align;
          D.23988 = -align.64;
          offset = D.23988 & offset;
          D.23989 = (long int) offset;
          D.23990 = (void *) D.23989;
          res->entries[i] = D.23990;
          offset = offset + size;
          goto <D.22640>;
          <D.22641>:
          D.23991 = instantiate_info (domain, template, context, class, 0B);
          res->entries[i] = D.23991;
          goto <D.22640>;
          <D.22640>:
        }
        i = i + 1;
        <D.22643>:
        D.23968 = info->entries;
        D.23969 = D.23968->len;
        i.66 = (unsigned int) i;
        if (D.23969 > i.66) goto <D.22642>; else goto <D.22644>;
        <D.22644>:
        res->locals_size = offset;
        D.23823 = res;
        return D.23823;
      }
    finally
      {
        align = {CLOBBER};
      }
  }
  <D.22645>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1482);
  D.23823 = 0B;
  return D.23823;
}


class_type_info (struct MonoDomain * domain, struct MonoClass * class, MonoRgctxInfoType info_type)
{
  struct MonoException * D.23997;
  void * D.23998;
  struct MonoException * D.24001;
  void * * * D.24002;
  int D.24003;
  long unsigned int D.24004;
  struct MonoType * D.24005;
  int D.24006;
  int D.24009;
  long unsigned int D.24010;
  int D.24011;
  int D.24014;
  int D.24017;
  unsigned int size.67;
  unsigned int D.24022;
  unsigned int align.68;
  unsigned int size.69;
  struct MonoMethod * D.24035;
  struct MonoClass * D.24041;
  _Bool D.24042;
  long int D.24043;
  long int D.24044;
  void * * D.24047;
  struct MonoMethod * D.24050;
  _Bool D.24056;
  long int D.24057;
  long int D.24058;
  void * * D.24061;
  int D.24064;
  struct MonoDomain * D.24070;
  void * D.24071;
  _Bool D.24072;
  long int D.24073;
  long int D.24074;
  int D.24077;

  switch (info_type) <default: <D.22516>, case 0: <D.22483>, case 1: <D.22485>, case 2: <D.22486>, case 12: <D.22488>, case 13: <D.22490>, case 14: <D.22491>, case 19: <D.22492>, case 22: <D.22493>, case 23: <D.22494>, case 24: <D.22506>, case 25: <D.22507>>
  <D.22483>:
  {
    struct MonoVTable * vtable;

    vtable = mono_class_vtable (domain, class);
    if (vtable == 0B) goto <D.23995>; else goto <D.23996>;
    <D.23995>:
    D.23997 = mono_class_get_exception_for_failure (class);
    mono_raise_exception (D.23997);
    <D.23996>:
    D.23998 = mono_vtable_get_static_field_data (vtable);
    return D.23998;
  }
  <D.22485>:
  D.23998 = class;
  return D.23998;
  <D.22486>:
  {
    struct MonoVTable * vtable;

    vtable = mono_class_vtable (domain, class);
    if (vtable == 0B) goto <D.23999>; else goto <D.24000>;
    <D.23999>:
    D.24001 = mono_class_get_exception_for_failure (class);
    mono_raise_exception (D.24001);
    <D.24000>:
    D.23998 = vtable;
    return D.23998;
  }
  <D.22488>:
  {
    void * * * cache_data;

    cache_data = mono_domain_alloc0 (domain, 16);
    D.24002 = cache_data + 8;
    *D.24002 = class;
    D.23998 = cache_data;
    return D.23998;
  }
  <D.22490>:
  D.24003 = mono_class_array_element_size (class);
  D.24004 = (long unsigned int) D.24003;
  D.23998 = (void *) D.24004;
  return D.23998;
  <D.22491>:
  D.24005 = &class->byval_arg;
  D.24006 = mono_type_is_reference (D.24005);
  if (D.24006 != 0) goto <D.24007>; else goto <D.24008>;
  <D.24007>:
  D.23998 = 8B;
  return D.23998;
  <D.24008>:
  D.24009 = mono_class_value_size (class, 0B);
  D.24010 = (long unsigned int) D.24009;
  D.23998 = (void *) D.24010;
  return D.23998;
  <D.22492>:
  D.24005 = &class->byval_arg;
  D.24011 = mono_type_is_reference (D.24005);
  if (D.24011 != 0) goto <D.24012>; else goto <D.24013>;
  <D.24012>:
  D.23998 = 1B;
  return D.23998;
  <D.24013>:
  D.24014 = mono_class_is_nullable (class);
  if (D.24014 != 0) goto <D.24015>; else goto <D.24016>;
  <D.24015>:
  D.23998 = 2B;
  return D.23998;
  <D.24016>:
  D.23998 = 0B;
  return D.23998;
  <D.22493>:
  <D.22494>:
  {
    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.24005 = &class->byval_arg;
        D.24017 = mono_type_is_reference (D.24005);
        if (D.24017 != 0) goto <D.24018>; else goto <D.24019>;
        <D.24018>:
        size = 8;
        align = 8;
        goto <D.24020>;
        <D.24019>:
        size = mono_class_value_size (class, &align);
        <D.24020>:
        size.67 = (unsigned int) size;
        D.24022 = size.67 + 4294967295;
        if (D.24022 > 1) goto <D.24023>; else goto <D.24024>;
        <D.24023>:
        if (size != 4) goto <D.24025>; else goto <D.24026>;
        <D.24025>:
        if (size != 8) goto <D.24027>; else goto <D.24028>;
        <D.24027>:
        size = 0;
        <D.24028>:
        <D.24026>:
        <D.24024>:
        align.68 = align;
        size.69 = (unsigned int) size;
        if (align.68 < size.69) goto <D.24031>; else goto <D.24032>;
        <D.24031>:
        size = 0;
        <D.24032>:
        if (info_type == 22) goto <D.24033>; else goto <D.24034>;
        <D.24033>:
        D.24035 = memcpy_method[size];
        if (D.24035 == 0B) goto <D.24036>; else goto <D.24037>;
        <D.24036>:
        {
          struct MonoMethod * m;
          char name[32];

          try
            {
              if (size == 0) goto <D.24038>; else goto <D.24039>;
              <D.24038>:
              sprintf (&name, "memcpy");
              goto <D.24040>;
              <D.24039>:
              sprintf (&name, "memcpy_aligned_%d", size);
              <D.24040>:
              D.24041 = mono_defaults.string_class;
              m = mono_class_get_method_from_name (D.24041, &name, 3);
              D.24042 = m == 0B;
              D.24043 = (long int) D.24042;
              D.24044 = __builtin_expect (D.24043, 0);
              if (D.24044 != 0) goto <D.24045>; else goto <D.24046>;
              <D.24045>:
              monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 991, "m");
              <D.24046>:
              mono_memory_barrier ();
              memcpy_method[size] = m;
            }
          finally
            {
              name = {CLOBBER};
            }
        }
        <D.24037>:
        D.24047 = domain_info->memcpy_addr[size];
        if (D.24047 == 0B) goto <D.24048>; else goto <D.24049>;
        <D.24048>:
        {
          void * addr;

          D.24035 = memcpy_method[size];
          addr = mono_compile_method (D.24035);
          mono_memory_barrier ();
          domain_info->memcpy_addr[size] = addr;
        }
        <D.24049>:
        D.23998 = domain_info->memcpy_addr[size];
        return D.23998;
        <D.24034>:
        D.24050 = bzero_method[size];
        if (D.24050 == 0B) goto <D.24051>; else goto <D.24052>;
        <D.24051>:
        {
          struct MonoMethod * m;
          char name[32];

          try
            {
              if (size == 0) goto <D.24053>; else goto <D.24054>;
              <D.24053>:
              sprintf (&name, "bzero");
              goto <D.24055>;
              <D.24054>:
              sprintf (&name, "bzero_aligned_%d", size);
              <D.24055>:
              D.24041 = mono_defaults.string_class;
              m = mono_class_get_method_from_name (D.24041, &name, 2);
              D.24056 = m == 0B;
              D.24057 = (long int) D.24056;
              D.24058 = __builtin_expect (D.24057, 0);
              if (D.24058 != 0) goto <D.24059>; else goto <D.24060>;
              <D.24059>:
              monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1011, "m");
              <D.24060>:
              mono_memory_barrier ();
              bzero_method[size] = m;
            }
          finally
            {
              name = {CLOBBER};
            }
        }
        <D.24052>:
        D.24061 = domain_info->bzero_addr[size];
        if (D.24061 == 0B) goto <D.24062>; else goto <D.24063>;
        <D.24062>:
        {
          void * addr;

          D.24050 = bzero_method[size];
          addr = mono_compile_method (D.24050);
          mono_memory_barrier ();
          domain_info->bzero_addr[size] = addr;
        }
        <D.24063>:
        D.23998 = domain_info->bzero_addr[size];
        return D.23998;
      }
    finally
      {
        align = {CLOBBER};
      }
  }
  <D.22506>:
  <D.22507>:
  {
    struct MonoMethod * method;
    void * addr;
    struct MonoJitInfo * ji;
    struct MonoGenericContext * ctx;

    D.24064 = mono_class_is_nullable (class);
    if (D.24064 == 0) goto <D.24065>; else goto <D.24066>;
    <D.24065>:
    D.23998 = 0B;
    return D.23998;
    <D.24066>:
    if (info_type == 24) goto <D.24067>; else goto <D.24068>;
    <D.24067>:
    method = mono_class_get_method_from_name (class, "Box", 1);
    goto <D.24069>;
    <D.24068>:
    method = mono_class_get_method_from_name (class, "Unbox", 1);
    <D.24069>:
    addr = mono_compile_method (method);
    D.24070 = mono_domain_get ();
    D.24071 = mono_get_addr_from_ftnptr (addr);
    ji = mini_jit_info_table_find (D.24070, D.24071, 0B);
    D.24072 = ji == 0B;
    D.24073 = (long int) D.24072;
    D.24074 = __builtin_expect (D.24073, 0);
    if (D.24074 != 0) goto <D.24075>; else goto <D.24076>;
    <D.24075>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1042, "ji");
    <D.24076>:
    D.24077 = mini_jit_info_is_gsharedvt (ji);
    if (D.24077 != 0) goto <D.24078>; else goto <D.24079>;
    <D.24078>:
    D.23998 = mono_create_static_rgctx_trampoline (method, addr);
    return D.23998;
    <D.24079>:
    {
      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.23998 = addr;
          return D.23998;
        }
      finally
        {
          gsctx = {CLOBBER};
        }
    }
  }
  <D.22516>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1065);
  D.23998 = 0B;
  return D.23998;
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__, __leaf__, __nothrow__))
sprintf (char * restrict __s, const char * restrict __fmt)
{
  int D.24083;
  long unsigned int D.24084;

  D.24084 = __builtin_object_size (__s, 1);
  D.24083 = __builtin___sprintf_chk (__s, 1, D.24084, __fmt, __builtin_va_arg_pack ());
  return D.24083;
}


__attribute__((__gnu_inline__, nothrow, leaf, pure))
strcmp (const char * __s1, const char * __s2)
{
  int iftmp.70;
  int iftmp.71;
  int D.24094;
  char * __p1;
  char * __p2;
  int __ret;

  __p1 = __s1;
  __p2 = __s2;
  __asm__ __volatile__("   slr   0,0
0: clst  %1,%2
   jo    0b
   ipm   %0
   srl   %0,28" : "=d" __ret, "=&a" __p1, "=&a" __p2 : "1" __p1, "2" __p2 : "0", "memory", "cc");
  if (__ret != 0) goto <D.24087>; else goto <D.24088>;
  <D.24087>:
  if (__ret == 1) goto <D.24090>; else goto <D.24091>;
  <D.24090>:
  iftmp.71 = -1;
  goto <D.24092>;
  <D.24091>:
  iftmp.71 = 1;
  <D.24092>:
  iftmp.70 = iftmp.71;
  goto <D.24093>;
  <D.24088>:
  iftmp.70 = 0;
  <D.24093>:
  __ret = iftmp.70;
  D.24094 = __ret;
  return D.24094;
}


ji_is_gsharedvt (struct MonoJitInfo * ji)
{
  long unsigned int D.24099;
  long unsigned int D.24100;
  struct MonoGenericSharingContext * D.24102;
  gboolean * D.24103;
  struct MonoGenericSharingContext * D.24105;
  gboolean * D.24106;
  gboolean D.24107;

  if (ji != 0B) goto <D.24098>; else goto <D.24096>;
  <D.24098>:
  D.24099 = BIT_FIELD_REF <*ji, 64, 256>;
  D.24100 = D.24099 & 70368744177664;
  if (D.24100 != 0) goto <D.24101>; else goto <D.24096>;
  <D.24101>:
  D.24102 = mono_jit_info_get_generic_sharing_context (ji);
  D.24103 = D.24102->var_is_vt;
  if (D.24103 != 0B) goto <D.24097>; else goto <D.24104>;
  <D.24104>:
  D.24105 = mono_jit_info_get_generic_sharing_context (ji);
  D.24106 = D.24105->mvar_is_vt;
  if (D.24106 != 0B) goto <D.24097>; else goto <D.24096>;
  <D.24097>:
  D.24107 = 1;
  return D.24107;
  <D.24096>:
  D.24107 = 0;
  return D.24107;
}


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

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


__attribute__((visibility ("hidden")))
mono_method_fill_runtime_generic_context (struct MonoMethodRuntimeGenericContext * mrgctx, guint8 * caller, guint32 slot)
{
  struct MonoVTable * D.24111;
  struct MonoGenericInst * D.24112;
  void * D.24113;
  void * info;

  D.24111 = mrgctx->class_vtable;
  D.24112 = mrgctx->method_inst;
  info = fill_runtime_generic_context (D.24111, mrgctx, caller, slot, D.24112);
  D.24113 = info;
  return D.24113;
}


__attribute__((visibility ("hidden")))
mono_method_lookup_rgctx (struct MonoVTable * class_vtable, struct MonoGenericInst * method_inst)
{
  struct MonoClass * D.24115;
  struct MonoGenericContainer * D.24116;
  _Bool D.24117;
  long int D.24118;
  long int D.24119;
  long unsigned int D.24122;
  long unsigned int D.24123;
  _Bool D.24124;
  long int D.24125;
  long int D.24126;
  union mono_mutex_t * D.24129;
  _Bool D.24132;
  long int D.24133;
  long int D.24134;
  struct GHashTable * D.24137;
  struct GHashTable * D.24140;
  _Bool D.24145;
  long int D.24146;
  long int D.24147;
  _Bool D.24150;
  long int D.24151;
  long int D.24152;
  struct MonoMethodRuntimeGenericContext * D.24155;
  struct MonoDomain * domain;
  struct MonoMethodRuntimeGenericContext * mrgctx;
  struct MonoMethodRuntimeGenericContext key;

  try
    {
      domain = class_vtable->domain;
      D.24115 = class_vtable->klass;
      D.24116 = D.24115->generic_container;
      D.24117 = D.24116 != 0B;
      D.24118 = (long int) D.24117;
      D.24119 = __builtin_expect (D.24118, 0);
      if (D.24119 != 0) goto <D.24120>; else goto <D.24121>;
      <D.24120>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2002, "!class_vtable->klass->generic_container");
      <D.24121>:
      D.24122 = BIT_FIELD_REF <*method_inst, 64, 0>;
      D.24123 = D.24122 & 512;
      D.24124 = D.24123 != 0;
      D.24125 = (long int) D.24124;
      D.24126 = __builtin_expect (D.24125, 0);
      if (D.24126 != 0) goto <D.24127>; else goto <D.24128>;
      <D.24127>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2003, "!method_inst->is_open");
      <D.24128>:
      {
        int ret;

        D.24129 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.24129);
        if (ret != 0) goto <D.24130>; else goto <D.24131>;
        <D.24130>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.24131>:
        D.24132 = ret != 0;
        D.24133 = (long int) D.24132;
        D.24134 = __builtin_expect (D.24133, 0);
        if (D.24134 != 0) goto <D.24135>; else goto <D.24136>;
        <D.24135>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2005, "ret == 0");
        <D.24136>:
      }
      D.24137 = domain->method_rgctx_hash;
      if (D.24137 == 0B) goto <D.24138>; else goto <D.24139>;
      <D.24138>:
      D.24140 = monoeg_g_hash_table_new (mrgctx_hash_func, mrgctx_equal_func);
      domain->method_rgctx_hash = D.24140;
      <D.24139>:
      key.class_vtable = class_vtable;
      key.method_inst = method_inst;
      D.24137 = domain->method_rgctx_hash;
      mrgctx = monoeg_g_hash_table_lookup (D.24137, &key);
      if (mrgctx == 0B) goto <D.24141>; else goto <D.24142>;
      <D.24141>:
      mrgctx = alloc_rgctx_array (domain, 0, 1);
      mrgctx->class_vtable = class_vtable;
      mrgctx->method_inst = method_inst;
      D.24137 = domain->method_rgctx_hash;
      monoeg_g_hash_table_insert_replace (D.24137, mrgctx, mrgctx, 0);
      <D.24142>:
      {
        int ret;

        D.24129 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.24129);
        if (ret != 0) goto <D.24143>; else goto <D.24144>;
        <D.24143>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.24144>:
        D.24145 = ret != 0;
        D.24146 = (long int) D.24145;
        D.24147 = __builtin_expect (D.24146, 0);
        if (D.24147 != 0) goto <D.24148>; else goto <D.24149>;
        <D.24148>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2031, "ret == 0");
        <D.24149>:
      }
      D.24150 = mrgctx == 0B;
      D.24151 = (long int) D.24150;
      D.24152 = __builtin_expect (D.24151, 0);
      if (D.24152 != 0) goto <D.24153>; else goto <D.24154>;
      <D.24153>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2033, "mrgctx");
      <D.24154>:
      D.24155 = mrgctx;
      return D.24155;
    }
  finally
    {
      key = {CLOBBER};
    }
}


mrgctx_equal_func (const void * a, const void * b)
{
  gboolean D.24158;
  int iftmp.72;
  struct MonoVTable * D.24162;
  struct MonoVTable * D.24163;
  struct MonoGenericInst * D.24165;
  struct MonoGenericInst * D.24166;
  int D.24167;
  const struct MonoMethodRuntimeGenericContext * mrgctx1;
  const struct MonoMethodRuntimeGenericContext * mrgctx2;

  mrgctx1 = a;
  mrgctx2 = b;
  D.24162 = mrgctx1->class_vtable;
  D.24163 = mrgctx2->class_vtable;
  if (D.24162 == D.24163) goto <D.24164>; else goto <D.24160>;
  <D.24164>:
  D.24165 = mrgctx1->method_inst;
  D.24166 = mrgctx2->method_inst;
  D.24167 = mono_metadata_generic_inst_equal (D.24165, D.24166);
  if (D.24167 != 0) goto <D.24168>; else goto <D.24160>;
  <D.24168>:
  iftmp.72 = 1;
  goto <D.24161>;
  <D.24160>:
  iftmp.72 = 0;
  <D.24161>:
  D.24158 = iftmp.72;
  return D.24158;
}


mrgctx_hash_func (const void * key)
{
  guint D.24170;
  struct MonoVTable * D.24171;
  unsigned int D.24172;
  struct MonoGenericInst * D.24173;
  unsigned int D.24174;
  const struct MonoMethodRuntimeGenericContext * mrgctx;

  mrgctx = key;
  D.24171 = mrgctx->class_vtable;
  D.24172 = mono_aligned_addr_hash (D.24171);
  D.24173 = mrgctx->method_inst;
  D.24174 = mono_metadata_generic_inst_hash (D.24173);
  D.24170 = D.24172 ^ D.24174;
  return D.24170;
}


__attribute__((visibility ("hidden")))
mono_generic_context_is_sharable_full (struct MonoGenericContext * context, gboolean allow_type_vars, gboolean allow_partial)
{
  int iftmp.73;
  struct MonoGenericInst * D.24179;
  struct MonoGenericInst * D.24181;
  _Bool D.24183;
  long int D.24184;
  long int D.24185;
  int D.24190;
  gboolean D.24193;
  int D.24196;

  D.24179 = context->class_inst;
  if (D.24179 == 0B) goto <D.24180>; else goto <D.24177>;
  <D.24180>:
  D.24181 = context->method_inst;
  if (D.24181 == 0B) goto <D.24182>; else goto <D.24177>;
  <D.24182>:
  iftmp.73 = 1;
  goto <D.24178>;
  <D.24177>:
  iftmp.73 = 0;
  <D.24178>:
  D.24183 = iftmp.73 != 0;
  D.24184 = (long int) D.24183;
  D.24185 = __builtin_expect (D.24184, 0);
  if (D.24185 != 0) goto <D.24186>; else goto <D.24187>;
  <D.24186>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2051, "context->class_inst || context->method_inst");
  <D.24187>:
  D.24179 = context->class_inst;
  if (D.24179 != 0B) goto <D.24188>; else goto <D.24189>;
  <D.24188>:
  D.24179 = context->class_inst;
  D.24190 = generic_inst_is_sharable (D.24179, allow_type_vars, allow_partial);
  if (D.24190 == 0) goto <D.24191>; else goto <D.24192>;
  <D.24191>:
  D.24193 = 0;
  return D.24193;
  <D.24192>:
  <D.24189>:
  D.24181 = context->method_inst;
  if (D.24181 != 0B) goto <D.24194>; else goto <D.24195>;
  <D.24194>:
  D.24181 = context->method_inst;
  D.24196 = generic_inst_is_sharable (D.24181, allow_type_vars, allow_partial);
  if (D.24196 == 0) goto <D.24197>; else goto <D.24198>;
  <D.24197>:
  D.24193 = 0;
  return D.24193;
  <D.24198>:
  <D.24195>:
  D.24193 = 1;
  return D.24193;
}


generic_inst_is_sharable (struct MonoGenericInst * inst, gboolean allow_type_vars, gboolean allow_partial)
{
  int D.24202;
  unsigned char D.24205;
  long unsigned int D.24211;
  long unsigned int D.24212;
  unsigned char D.24215;
  gboolean D.24218;
  <unnamed-unsigned:22> D.24219;
  int D.24220;
  int i;
  gboolean has_ref;

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

    type = inst->type_argv[i];
    D.24202 = mono_type_is_reference (type);
    if (D.24202 != 0) goto <D.24200>; else goto <D.24203>;
    <D.24203>:
    if (allow_type_vars != 0) goto <D.24204>; else goto <D.24201>;
    <D.24204>:
    D.24205 = type->type;
    if (D.24205 == 19) goto <D.24200>; else goto <D.24206>;
    <D.24206>:
    D.24205 = type->type;
    if (D.24205 == 30) goto <D.24200>; else goto <D.24201>;
    <D.24200>:
    has_ref = 1;
    // predicted unlikely by continue predictor.
    goto <D.22433>;
    <D.24201>:
    if (allow_partial != 0) goto <D.24209>; else goto <D.24210>;
    <D.24209>:
    D.24211 = BIT_FIELD_REF <*type, 64, 64>;
    D.24212 = D.24211 & 8589934592;
    if (D.24212 == 0) goto <D.24213>; else goto <D.24214>;
    <D.24213>:
    D.24205 = type->type;
    D.24215 = D.24205 + 254;
    if (D.24215 <= 11) goto <D.24207>; else goto <D.24216>;
    <D.24216>:
    D.24205 = type->type;
    if (D.24205 == 24) goto <D.24207>; else goto <D.24217>;
    <D.24217>:
    D.24205 = type->type;
    if (D.24205 == 25) goto <D.24207>; else goto <D.24208>;
    <D.24207>:
    // predicted unlikely by continue predictor.
    goto <D.22433>;
    <D.24208>:
    <D.24214>:
    <D.24210>:
    D.24218 = 0;
    return D.24218;
  }
  <D.22433>:
  i = i + 1;
  <D.22435>:
  D.24219 = inst->type_argc;
  D.24220 = (int) D.24219;
  if (D.24220 > i) goto <D.22434>; else goto <D.22436>;
  <D.22436>:
  if (allow_partial != 0) goto <D.24221>; else goto <D.24222>;
  <D.24221>:
  D.24218 = has_ref;
  return D.24218;
  <D.24222>:
  D.24218 = 1;
  return D.24218;
}


__attribute__((visibility ("hidden")))
mono_generic_context_is_sharable (struct MonoGenericContext * context, gboolean allow_type_vars)
{
  gboolean D.24224;
  int D.24225;

  D.24225 = partial_sharing_supported ();
  D.24224 = mono_generic_context_is_sharable_full (context, allow_type_vars, D.24225);
  return D.24224;
}


partial_sharing_supported ()
{
  gboolean D.24229;
  int partial_supported.74;
  int mono_aot_only.75;

  if (0 != 0) goto <D.24227>; else goto <D.24228>;
  <D.24227>:
  D.24229 = 0;
  return D.24229;
  <D.24228>:
  partial_supported.74 = partial_supported;
  if (partial_supported.74 != 0) goto <D.24230>; else goto <D.24233>;
  <D.24233>:
  mono_aot_only.75 = mono_aot_only;
  if (mono_aot_only.75 != 0) goto <D.24230>; else goto <D.24231>;
  <D.24230>:
  D.24229 = 1;
  return D.24229;
  <D.24231>:
  D.24229 = 0;
  return D.24229;
}


__attribute__((visibility ("hidden")))
mono_method_is_generic_impl (struct MonoMethod * method)
{
  long unsigned int D.24236;
  long unsigned int D.24237;
  gboolean D.24240;
  long unsigned int D.24241;
  struct MonoClass * D.24244;
  struct MonoGenericContainer * D.24245;

  D.24236 = BIT_FIELD_REF <*method, 64, 256>;
  D.24237 = D.24236 & 2251799813685248;
  if (D.24237 != 0) goto <D.24238>; else goto <D.24239>;
  <D.24238>:
  D.24240 = 1;
  return D.24240;
  <D.24239>:
  D.24236 = BIT_FIELD_REF <*method, 64, 256>;
  D.24241 = D.24236 & 4467570830351532032;
  if (D.24241 != 0) goto <D.24242>; else goto <D.24243>;
  <D.24242>:
  D.24240 = 0;
  return D.24240;
  <D.24243>:
  D.24244 = method->klass;
  D.24245 = D.24244->generic_container;
  if (D.24245 != 0B) goto <D.24246>; else goto <D.24247>;
  <D.24246>:
  D.24240 = 1;
  return D.24240;
  <D.24247>:
  D.24240 = 0;
  return D.24240;
}


__attribute__((visibility ("hidden")))
mono_method_is_generic_sharable_full (struct MonoMethod * method, gboolean allow_type_vars, gboolean allow_partial, gboolean allow_gsharedvt)
{
  int D.24249;
  gboolean D.24252;
  int D.24253;
  struct MonoClass * D.24256;
  int D.24257;
  int D.24262;
  int D.24265;
  long unsigned int D.24268;
  long unsigned int D.24269;
  int D.24272;
  struct MonoMethod * D.24275;
  _Bool D.24276;
  long int D.24277;
  long int D.24278;
  long unsigned int D.24281;
  long unsigned int D.24282;
  struct MonoGenericContainer * D.24285;
  int D.24286;
  struct MonoGenericClass * D.24289;
  struct MonoGenericContext * D.24292;
  int D.24293;
  int iftmp.76;
  struct MonoClass * D.24300;
  struct MonoGenericContainer * D.24302;
  _Bool D.24303;
  long int D.24304;
  long int D.24305;
  int D.24308;
  struct MonoGenericContainer * D.24311;
  int D.24316;
  int D.24319;

  D.24249 = mono_method_is_generic_impl (method);
  if (D.24249 == 0) goto <D.24250>; else goto <D.24251>;
  <D.24250>:
  D.24252 = 0;
  return D.24252;
  <D.24251>:
  D.24253 = partial_sharing_supported ();
  if (D.24253 == 0) goto <D.24254>; else goto <D.24255>;
  <D.24254>:
  allow_partial = 0;
  <D.24255>:
  D.24256 = method->klass;
  D.24257 = is_async_state_machine_class (D.24256);
  if (D.24257 != 0) goto <D.24258>; else goto <D.24259>;
  <D.24258>:
  D.24252 = 0;
  return D.24252;
  <D.24259>:
  if (allow_gsharedvt != 0) goto <D.24260>; else goto <D.24261>;
  <D.24260>:
  D.24262 = mini_is_gsharedvt_sharable_method (method);
  if (D.24262 != 0) goto <D.24263>; else goto <D.24264>;
  <D.24263>:
  D.24265 = is_async_method (method);
  if (D.24265 != 0) goto <D.24266>; else goto <D.24267>;
  <D.24266>:
  D.24252 = 0;
  return D.24252;
  <D.24267>:
  D.24252 = 1;
  return D.24252;
  <D.24264>:
  <D.24261>:
  D.24268 = BIT_FIELD_REF <*method, 64, 256>;
  D.24269 = D.24268 & 2251799813685248;
  if (D.24269 != 0) goto <D.24270>; else goto <D.24271>;
  <D.24270>:
  {
    struct MonoMethodInflated * inflated;
    struct MonoGenericContext * context;

    inflated = method;
    context = &inflated->context;
    D.24272 = mono_generic_context_is_sharable_full (context, allow_type_vars, allow_partial);
    if (D.24272 == 0) goto <D.24273>; else goto <D.24274>;
    <D.24273>:
    D.24252 = 0;
    return D.24252;
    <D.24274>:
    D.24275 = inflated->declaring;
    D.24276 = D.24275 == 0B;
    D.24277 = (long int) D.24276;
    D.24278 = __builtin_expect (D.24277, 0);
    if (D.24278 != 0) goto <D.24279>; else goto <D.24280>;
    <D.24279>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2216, "inflated->declaring");
    <D.24280>:
    D.24275 = inflated->declaring;
    D.24281 = BIT_FIELD_REF <*D.24275, 64, 256>;
    D.24282 = D.24281 & 4503599627370496;
    if (D.24282 != 0) goto <D.24283>; else goto <D.24284>;
    <D.24283>:
    D.24275 = inflated->declaring;
    D.24285 = mono_method_get_generic_container (D.24275);
    D.24286 = has_constraints (D.24285);
    if (D.24286 != 0) goto <D.24287>; else goto <D.24288>;
    <D.24287>:
    D.24252 = 0;
    return D.24252;
    <D.24288>:
    <D.24284>:
  }
  <D.24271>:
  D.24256 = method->klass;
  D.24289 = D.24256->generic_class;
  if (D.24289 != 0B) goto <D.24290>; else goto <D.24291>;
  <D.24290>:
  D.24256 = method->klass;
  D.24289 = D.24256->generic_class;
  D.24292 = &D.24289->context;
  D.24293 = mono_generic_context_is_sharable_full (D.24292, allow_type_vars, allow_partial);
  if (D.24293 == 0) goto <D.24294>; else goto <D.24295>;
  <D.24294>:
  D.24252 = 0;
  return D.24252;
  <D.24295>:
  D.24256 = method->klass;
  D.24289 = D.24256->generic_class;
  D.24300 = D.24289->container_class;
  if (D.24300 == 0B) goto <D.24297>; else goto <D.24301>;
  <D.24301>:
  D.24256 = method->klass;
  D.24289 = D.24256->generic_class;
  D.24300 = D.24289->container_class;
  D.24302 = D.24300->generic_container;
  if (D.24302 == 0B) goto <D.24297>; else goto <D.24298>;
  <D.24297>:
  iftmp.76 = 1;
  goto <D.24299>;
  <D.24298>:
  iftmp.76 = 0;
  <D.24299>:
  D.24303 = iftmp.76 != 0;
  D.24304 = (long int) D.24303;
  D.24305 = __builtin_expect (D.24304, 0);
  if (D.24305 != 0) goto <D.24306>; else goto <D.24307>;
  <D.24306>:
  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.24307>:
  D.24256 = method->klass;
  D.24289 = D.24256->generic_class;
  D.24300 = D.24289->container_class;
  D.24302 = D.24300->generic_container;
  D.24308 = has_constraints (D.24302);
  if (D.24308 != 0) goto <D.24309>; else goto <D.24310>;
  <D.24309>:
  D.24252 = 0;
  return D.24252;
  <D.24310>:
  <D.24291>:
  D.24256 = method->klass;
  D.24311 = D.24256->generic_container;
  if (D.24311 != 0B) goto <D.24312>; else goto <D.24313>;
  <D.24312>:
  if (allow_type_vars == 0) goto <D.24314>; else goto <D.24315>;
  <D.24314>:
  D.24252 = 0;
  return D.24252;
  <D.24315>:
  <D.24313>:
  D.24316 = is_async_method (method);
  if (D.24316 != 0) goto <D.24317>; else goto <D.24318>;
  <D.24317>:
  D.24319 = mini_method_is_open (method);
  if (D.24319 != 0) goto <D.24320>; else goto <D.24321>;
  <D.24320>:
  D.24252 = 1;
  return D.24252;
  <D.24321>:
  D.24252 = 0;
  return D.24252;
  <D.24318>:
  D.24252 = 1;
  return D.24252;
}


__attribute__((__unused__))
is_async_state_machine_class (struct MonoClass * klass)
{
  gboolean D.24323;
  int iclass_set.77;
  struct MonoImage * D.24327;
  struct MonoClass * iclass.78;
  struct MonoClass * iclass.79;
  long unsigned int D.24332;
  long unsigned int D.24333;
  int D.24336;
  static struct MonoClass * iclass;
  static gboolean iclass_set;

  D.24323 = 0;
  return D.24323;
  iclass_set.77 = iclass_set;
  if (iclass_set.77 == 0) goto <D.24325>; else goto <D.24326>;
  <D.24325>:
  D.24327 = mono_defaults.corlib;
  iclass.78 = mono_class_from_name (D.24327, "System.Runtime.CompilerServices", "IAsyncStateMachine");
  iclass = iclass.78;
  mono_memory_barrier ();
  iclass_set = 1;
  <D.24326>:
  iclass.79 = iclass;
  if (iclass.79 != 0B) goto <D.24330>; else goto <D.24331>;
  <D.24330>:
  D.24332 = BIT_FIELD_REF <*klass, 64, 256>;
  D.24333 = D.24332 & 1152921504606846976;
  if (D.24333 != 0) goto <D.24334>; else goto <D.24335>;
  <D.24334>:
  iclass.79 = iclass;
  D.24336 = mono_class_is_assignable_from (iclass.79, klass);
  if (D.24336 != 0) goto <D.24337>; else goto <D.24338>;
  <D.24337>:
  D.24323 = 1;
  return D.24323;
  <D.24338>:
  <D.24335>:
  <D.24331>:
  D.24323 = 0;
  return D.24323;
}


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

  D.24340 = 0;
  return D.24340;
}


__attribute__((__unused__))
is_async_method (struct MonoMethod * method)
{
  gboolean D.24342;
  int attr_class_set.80;
  struct MonoImage * D.24346;
  struct MonoClass * attr_class.81;
  struct MonoClass * attr_class.82;
  struct MonoType * D.24356;
  unsigned char D.24357;
  struct MonoGenericClass * D.24360;
  struct MonoClass * D.24361;
  const char * D.24363;
  int D.24364;
  int D.24367;
  struct MonoCustomAttrInfo * cattr;
  struct MonoMethodSignature * sig;
  gboolean res;
  static struct MonoClass * attr_class;
  static gboolean attr_class_set;

  res = 0;
  D.24342 = 0;
  return D.24342;
  attr_class_set.80 = attr_class_set;
  if (attr_class_set.80 == 0) goto <D.24344>; else goto <D.24345>;
  <D.24344>:
  D.24346 = mono_defaults.corlib;
  attr_class.81 = mono_class_from_name (D.24346, "System.Runtime.CompilerServices", "AsyncStateMachineAttribute");
  attr_class = attr_class.81;
  mono_memory_barrier ();
  attr_class_set = 1;
  <D.24345>:
  sig = mono_method_signature (method);
  attr_class.82 = attr_class;
  if (attr_class.82 != 0B) goto <D.24352>; else goto <D.24353>;
  <D.24352>:
  if (sig != 0B) goto <D.24354>; else goto <D.24355>;
  <D.24354>:
  D.24356 = sig->ret;
  D.24357 = D.24356->type;
  if (D.24357 == 1) goto <D.24348>; else goto <D.24358>;
  <D.24358>:
  D.24356 = sig->ret;
  D.24357 = D.24356->type;
  if (D.24357 == 18) goto <D.24359>; else goto <D.24349>;
  <D.24359>:
  D.24356 = sig->ret;
  D.24360 = D.24356->data.generic_class;
  D.24361 = D.24360->container_class;
  if (1 != 0) goto <D.24348>; else goto <D.24349>;
  <D.24349>:
  D.24356 = sig->ret;
  D.24357 = D.24356->type;
  if (D.24357 == 21) goto <D.24362>; else goto <D.24350>;
  <D.24362>:
  D.24356 = sig->ret;
  D.24360 = D.24356->data.generic_class;
  D.24361 = D.24360->container_class;
  D.24363 = D.24361->name;
  D.24364 = strcmp (D.24363, "Task`1");
  if (D.24364 == 0) goto <D.24348>; else goto <D.24350>;
  <D.24348>:
  cattr = mono_custom_attrs_from_method (method);
  if (cattr != 0B) goto <D.24365>; else goto <D.24366>;
  <D.24365>:
  attr_class.82 = attr_class;
  D.24367 = mono_custom_attrs_has_attr (cattr, attr_class.82);
  if (D.24367 != 0) goto <D.24368>; else goto <D.24369>;
  <D.24368>:
  res = 1;
  <D.24369>:
  mono_custom_attrs_free (cattr);
  <D.24366>:
  <D.24350>:
  <D.24355>:
  <D.24353>:
  D.24342 = res;
  return D.24342;
}


mini_method_is_open (struct MonoMethod * method)
{
  long unsigned int D.24371;
  long unsigned int D.24372;
  struct MonoGenericInst * D.24375;
  long unsigned int D.24378;
  long unsigned int D.24379;
  gboolean D.24382;
  struct MonoGenericInst * D.24383;
  long unsigned int D.24386;
  long unsigned int D.24387;

  D.24371 = BIT_FIELD_REF <*method, 64, 256>;
  D.24372 = D.24371 & 2251799813685248;
  if (D.24372 != 0) goto <D.24373>; else goto <D.24374>;
  <D.24373>:
  {
    struct MonoGenericContext * ctx;

    ctx = mono_method_get_context (method);
    D.24375 = ctx->class_inst;
    if (D.24375 != 0B) goto <D.24376>; else goto <D.24377>;
    <D.24376>:
    D.24375 = ctx->class_inst;
    D.24378 = BIT_FIELD_REF <*D.24375, 64, 0>;
    D.24379 = D.24378 & 512;
    if (D.24379 != 0) goto <D.24380>; else goto <D.24381>;
    <D.24380>:
    D.24382 = 1;
    return D.24382;
    <D.24381>:
    <D.24377>:
    D.24383 = ctx->method_inst;
    if (D.24383 != 0B) goto <D.24384>; else goto <D.24385>;
    <D.24384>:
    D.24383 = ctx->method_inst;
    D.24386 = BIT_FIELD_REF <*D.24383, 64, 0>;
    D.24387 = D.24386 & 512;
    if (D.24387 != 0) goto <D.24388>; else goto <D.24389>;
    <D.24388>:
    D.24382 = 1;
    return D.24382;
    <D.24389>:
    <D.24385>:
  }
  <D.24374>:
  D.24382 = 0;
  return D.24382;
}


__attribute__((visibility ("hidden")))
mono_method_is_generic_sharable (struct MonoMethod * method, gboolean allow_type_vars)
{
  gboolean D.24391;
  int D.24392;

  D.24392 = partial_sharing_supported ();
  D.24391 = mono_method_is_generic_sharable_full (method, allow_type_vars, D.24392, 1);
  return D.24391;
}


__attribute__((visibility ("hidden")))
mono_method_needs_static_rgctx_invoke (struct MonoMethod * method, gboolean allow_type_vars)
{
  struct MonoClass * D.24394;
  int D.24395;
  gboolean D.24398;
  int D.24399;
  long unsigned int D.24402;
  long unsigned int D.24403;
  struct MonoGenericContext * D.24406;
  struct MonoGenericInst * D.24407;
  int iftmp.83;
  short unsigned int D.24415;
  int D.24416;
  int D.24417;
  long unsigned int D.24419;
  long unsigned int D.24420;
  struct MonoGenericClass * D.24421;
  struct MonoGenericContainer * D.24423;

  D.24394 = method->klass;
  D.24395 = mono_class_generic_sharing_enabled (D.24394);
  if (D.24395 == 0) goto <D.24396>; else goto <D.24397>;
  <D.24396>:
  D.24398 = 0;
  return D.24398;
  <D.24397>:
  D.24399 = mono_method_is_generic_sharable (method, allow_type_vars);
  if (D.24399 == 0) goto <D.24400>; else goto <D.24401>;
  <D.24400>:
  D.24398 = 0;
  return D.24398;
  <D.24401>:
  D.24402 = BIT_FIELD_REF <*method, 64, 256>;
  D.24403 = D.24402 & 2251799813685248;
  if (D.24403 != 0) goto <D.24404>; else goto <D.24405>;
  <D.24404>:
  D.24406 = mono_method_get_context (method);
  D.24407 = D.24406->method_inst;
  if (D.24407 != 0B) goto <D.24408>; else goto <D.24409>;
  <D.24408>:
  D.24398 = 1;
  return D.24398;
  <D.24409>:
  <D.24405>:
  D.24415 = method->flags;
  D.24416 = (int) D.24415;
  D.24417 = D.24416 & 16;
  if (D.24417 != 0) goto <D.24411>; else goto <D.24418>;
  <D.24418>:
  D.24394 = method->klass;
  D.24419 = BIT_FIELD_REF <*D.24394, 64, 256>;
  D.24420 = D.24419 & 1152921504606846976;
  if (D.24420 != 0) goto <D.24411>; else goto <D.24412>;
  <D.24411>:
  D.24394 = method->klass;
  D.24421 = D.24394->generic_class;
  if (D.24421 != 0B) goto <D.24413>; else goto <D.24422>;
  <D.24422>:
  D.24394 = method->klass;
  D.24423 = D.24394->generic_container;
  if (D.24423 != 0B) goto <D.24413>; else goto <D.24412>;
  <D.24413>:
  iftmp.83 = 1;
  goto <D.24414>;
  <D.24412>:
  iftmp.83 = 0;
  <D.24414>:
  D.24398 = iftmp.83;
  return D.24398;
}


__attribute__((visibility ("hidden")))
mono_method_construct_object_context (struct MonoMethod * method)
{
  struct MonoClass * D.24426;
  struct MonoGenericClass * D.24427;
  _Bool D.24428;
  long int D.24429;
  long int D.24430;
  struct MonoGenericContainer * D.24433;
  <unnamed-signed:31> D.24436;
  struct MonoGenericInst * D.24437;
  struct MonoGenericContext * D.24439;
  struct MonoGenericInst * D.24440;
  struct MonoGenericContext * D.24443;
  struct MonoGenericInst * D.24444;
  <unnamed-unsigned:22> D.24445;
  struct MonoGenericInst * D.24446;
  int iftmp.84;
  struct MonoGenericInst * D.24451;
  struct MonoGenericInst * D.24453;
  _Bool D.24455;
  long int D.24456;
  long int D.24457;
  struct MonoGenericContext object_context;

  try
    {
      D.24426 = method->klass;
      D.24427 = D.24426->generic_class;
      D.24428 = D.24427 != 0B;
      D.24429 = (long int) D.24428;
      D.24430 = __builtin_expect (D.24429, 0);
      if (D.24430 != 0) goto <D.24431>; else goto <D.24432>;
      <D.24431>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2298, "!method->klass->generic_class");
      <D.24432>:
      D.24426 = method->klass;
      D.24433 = D.24426->generic_container;
      if (D.24433 != 0B) goto <D.24434>; else goto <D.24435>;
      <D.24434>:
      {
        int type_argc;

        D.24426 = method->klass;
        D.24433 = D.24426->generic_container;
        D.24436 = D.24433->type_argc;
        type_argc = (int) D.24436;
        D.24437 = get_object_generic_inst (type_argc);
        object_context.class_inst = D.24437;
      }
      goto <D.24438>;
      <D.24435>:
      object_context.class_inst = 0B;
      <D.24438>:
      D.24439 = mono_method_get_context_general (method, 1);
      D.24440 = D.24439->method_inst;
      if (D.24440 != 0B) goto <D.24441>; else goto <D.24442>;
      <D.24441>:
      {
        int type_argc;

        D.24443 = mono_method_get_context_general (method, 1);
        D.24444 = D.24443->method_inst;
        D.24445 = D.24444->type_argc;
        type_argc = (int) D.24445;
        D.24446 = get_object_generic_inst (type_argc);
        object_context.method_inst = D.24446;
      }
      goto <D.24447>;
      <D.24442>:
      object_context.method_inst = 0B;
      <D.24447>:
      D.24451 = object_context.class_inst;
      if (D.24451 == 0B) goto <D.24452>; else goto <D.24449>;
      <D.24452>:
      D.24453 = object_context.method_inst;
      if (D.24453 == 0B) goto <D.24454>; else goto <D.24449>;
      <D.24454>:
      iftmp.84 = 1;
      goto <D.24450>;
      <D.24449>:
      iftmp.84 = 0;
      <D.24450>:
      D.24455 = iftmp.84 != 0;
      D.24456 = (long int) D.24455;
      D.24457 = __builtin_expect (D.24456, 0);
      if (D.24457 != 0) goto <D.24458>; else goto <D.24459>;
      <D.24458>:
      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.24459>:
      <retval> = object_context;
      return <retval>;
    }
  finally
    {
      object_context = {CLOBBER};
    }
}


get_object_generic_inst (int type_argc)
{
  long unsigned int D.24462;
  long unsigned int D.24463;
  long unsigned int D.24464;
  long unsigned int D.24465;
  struct MonoType * * D.24466;
  struct MonoClass * D.24467;
  struct MonoType * D.24468;
  struct MonoGenericInst * D.24469;
  struct MonoType * * type_argv;
  int i;

  D.24462 = (long unsigned int) type_argc;
  D.24463 = D.24462 * 8;
  type_argv = __builtin_alloca (D.24463);
  i = 0;
  goto <D.22925>;
  <D.22924>:
  D.24464 = (long unsigned int) i;
  D.24465 = D.24464 * 8;
  D.24466 = type_argv + D.24465;
  D.24467 = mono_defaults.object_class;
  D.24468 = &D.24467->byval_arg;
  *D.24466 = D.24468;
  i = i + 1;
  <D.22925>:
  if (i < type_argc) goto <D.22924>; else goto <D.22926>;
  <D.22926>:
  D.24469 = mono_metadata_get_generic_inst (type_argc, type_argv);
  return D.24469;
}


__attribute__((visibility ("hidden")))
mono_set_generic_sharing_supported (gboolean supported)
{
  gshared_supported = supported;
}


__attribute__((visibility ("hidden")))
mono_set_generic_sharing_vt_supported (gboolean supported)
{
  gsharedvt_supported = supported;
}


__attribute__((visibility ("hidden")))
mono_set_partial_sharing_supported (gboolean supported)
{
  partial_supported = supported;
}


__attribute__((visibility ("hidden")))
mono_class_generic_sharing_enabled (struct MonoClass * class)
{
  int inited.85;
  int gshared_supported.86;
  int D.24480;
  int D.24484;
  int D.24488;
  int D.24492;
  int generic_sharing.87;
  gboolean D.24499;
  struct MonoImage * D.24500;
  struct MonoImage * D.24501;
  _Bool D.24502;
  struct MonoClass * D.24505;
  const char * D.24506;
  static int generic_sharing = 0;
  static gboolean inited = 0;

  inited.85 = inited;
  if (inited.85 == 0) goto <D.24472>; else goto <D.24473>;
  <D.24472>:
  {
    const char * option;

    gshared_supported.86 = gshared_supported;
    if (gshared_supported.86 != 0) goto <D.24475>; else goto <D.24476>;
    <D.24475>:
    generic_sharing = 3;
    goto <D.24477>;
    <D.24476>:
    generic_sharing = 0;
    <D.24477>:
    option = monoeg_g_getenv ("MONO_GENERIC_SHARING");
    if (option != 0B) goto <D.24478>; else goto <D.24479>;
    <D.24478>:
    D.24480 = strcmp (option, "corlib");
    if (D.24480 == 0) goto <D.24481>; else goto <D.24482>;
    <D.24481>:
    generic_sharing = 2;
    goto <D.24483>;
    <D.24482>:
    D.24484 = strcmp (option, "collections");
    if (D.24484 == 0) goto <D.24485>; else goto <D.24486>;
    <D.24485>:
    generic_sharing = 1;
    goto <D.24487>;
    <D.24486>:
    D.24488 = strcmp (option, "all");
    if (D.24488 == 0) goto <D.24489>; else goto <D.24490>;
    <D.24489>:
    generic_sharing = 3;
    goto <D.24491>;
    <D.24490>:
    D.24492 = strcmp (option, "none");
    if (D.24492 == 0) goto <D.24493>; else goto <D.24494>;
    <D.24493>:
    generic_sharing = 0;
    goto <D.24495>;
    <D.24494>:
    monoeg_g_log (0B, 16, "Unknown generic sharing option `%s\'.", option);
    <D.24495>:
    <D.24491>:
    <D.24487>:
    <D.24483>:
    <D.24479>:
    gshared_supported.86 = gshared_supported;
    if (gshared_supported.86 == 0) goto <D.24496>; else goto <D.24497>;
    <D.24496>:
    generic_sharing = 0;
    <D.24497>:
    inited = 1;
  }
  <D.24473>:
  generic_sharing.87 = generic_sharing;
  switch (generic_sharing.87) <default: <D.22957>, case 0: <D.22950>, case 1: <D.22953>, case 2: <D.22952>, case 3: <D.22951>>
  <D.22950>:
  D.24499 = 0;
  return D.24499;
  <D.22951>:
  D.24499 = 1;
  return D.24499;
  <D.22952>:
  D.24500 = class->image;
  D.24501 = mono_defaults.corlib;
  D.24502 = D.24500 == D.24501;
  D.24499 = (gboolean) D.24502;
  return D.24499;
  <D.22953>:
  D.24500 = class->image;
  D.24501 = mono_defaults.corlib;
  if (D.24500 != D.24501) goto <D.24503>; else goto <D.24504>;
  <D.24503>:
  D.24499 = 0;
  return D.24499;
  <D.24504>:
  goto <D.22955>;
  <D.22954>:
  class = class->nested_in;
  <D.22955>:
  D.24505 = class->nested_in;
  if (D.24505 != 0B) goto <D.22954>; else goto <D.22956>;
  <D.22956>:
  D.24506 = class->name_space;
  D.24499 = monoeg_g_str_has_prefix (D.24506, "System.Collections.Generic");
  return D.24499;
  <D.22957>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 2398);
  D.24499 = 0;
  return D.24499;
}


__attribute__((visibility ("hidden")))
mono_get_generic_context_from_code (guint8 * code)
{
  struct MonoDomain * D.24508;
  _Bool D.24509;
  long int D.24510;
  long int D.24511;
  struct MonoGenericSharingContext * D.24514;
  struct MonoJitInfo * jit_info;

  D.24508 = mono_domain_get ();
  jit_info = mini_jit_info_table_find (D.24508, code, 0B);
  D.24509 = jit_info == 0B;
  D.24510 = (long int) D.24509;
  D.24511 = __builtin_expect (D.24510, 0);
  if (D.24511 != 0) goto <D.24512>; else goto <D.24513>;
  <D.24512>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2414, "jit_info");
  <D.24513>:
  D.24514 = mono_jit_info_get_generic_sharing_context (jit_info);
  return D.24514;
}


__attribute__((visibility ("hidden")))
mini_method_get_context (struct MonoMethod * method)
{
  struct MonoGenericContext * D.24516;

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


__attribute__((visibility ("hidden")))
mono_method_check_context_used (struct MonoMethod * method)
{
  struct MonoClass * D.24520;
  unsigned char D.24521;
  int D.24525;
  int D.24526;
  struct MonoGenericContext * method_context;
  int context_used;

  method_context = mini_method_get_context (method);
  context_used = 0;
  if (method_context == 0B) goto <D.24518>; else goto <D.24519>;
  <D.24518>:
  D.24520 = method->klass;
  D.24521 = D.24520->rank;
  if (D.24521 != 0) goto <D.24522>; else goto <D.24523>;
  <D.24522>:
  D.24520 = method->klass;
  context_used = mono_class_check_context_used (D.24520);
  <D.24523>:
  goto <D.24524>;
  <D.24519>:
  context_used = mono_generic_context_check_used (method_context);
  D.24520 = method->klass;
  D.24525 = mono_class_check_context_used (D.24520);
  context_used = D.24525 | context_used;
  <D.24524>:
  D.24526 = context_used;
  return D.24526;
}


__attribute__((visibility ("hidden")))
mono_generic_context_equal_deep (struct MonoGenericContext * context1, struct MonoGenericContext * context2)
{
  gboolean D.24528;
  int iftmp.88;
  struct MonoGenericInst * D.24532;
  struct MonoGenericInst * D.24533;
  int D.24534;
  struct MonoGenericInst * D.24536;
  struct MonoGenericInst * D.24537;
  int D.24538;

  D.24532 = context1->class_inst;
  D.24533 = context2->class_inst;
  D.24534 = generic_inst_equal (D.24532, D.24533);
  if (D.24534 != 0) goto <D.24535>; else goto <D.24530>;
  <D.24535>:
  D.24536 = context1->method_inst;
  D.24537 = context2->method_inst;
  D.24538 = generic_inst_equal (D.24536, D.24537);
  if (D.24538 != 0) goto <D.24539>; else goto <D.24530>;
  <D.24539>:
  iftmp.88 = 1;
  goto <D.24531>;
  <D.24530>:
  iftmp.88 = 0;
  <D.24531>:
  D.24528 = iftmp.88;
  return D.24528;
}


generic_inst_equal (struct MonoGenericInst * inst1, struct MonoGenericInst * inst2)
{
  _Bool D.24543;
  long int D.24544;
  long int D.24545;
  gboolean D.24548;
  _Bool D.24549;
  long int D.24550;
  long int D.24551;
  long unsigned int D.24554;
  long unsigned int D.24555;
  long unsigned int D.24556;
  long unsigned int D.24557;
  struct MonoType * D.24560;
  struct MonoType * D.24561;
  int D.24562;
  <unnamed-unsigned:22> D.24565;
  int D.24566;
  int i;

  if (inst1 == 0B) goto <D.24541>; else goto <D.24542>;
  <D.24541>:
  D.24543 = inst2 != 0B;
  D.24544 = (long int) D.24543;
  D.24545 = __builtin_expect (D.24544, 0);
  if (D.24545 != 0) goto <D.24546>; else goto <D.24547>;
  <D.24546>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2458, "!inst2");
  <D.24547>:
  D.24548 = 1;
  return D.24548;
  <D.24542>:
  D.24549 = inst2 == 0B;
  D.24550 = (long int) D.24549;
  D.24551 = __builtin_expect (D.24550, 0);
  if (D.24551 != 0) goto <D.24552>; else goto <D.24553>;
  <D.24552>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2462, "inst2");
  <D.24553>:
  D.24554 = BIT_FIELD_REF <*inst1, 64, 0>;
  D.24555 = BIT_FIELD_REF <*inst2, 64, 0>;
  D.24556 = D.24554 ^ D.24555;
  D.24557 = D.24556 & 4294966272;
  if (D.24557 != 0) goto <D.24558>; else goto <D.24559>;
  <D.24558>:
  D.24548 = 0;
  return D.24548;
  <D.24559>:
  i = 0;
  goto <D.22976>;
  <D.22975>:
  D.24560 = inst1->type_argv[i];
  D.24561 = inst2->type_argv[i];
  D.24562 = mono_metadata_type_equal (D.24560, D.24561);
  if (D.24562 == 0) goto <D.24563>; else goto <D.24564>;
  <D.24563>:
  D.24548 = 0;
  return D.24548;
  <D.24564>:
  i = i + 1;
  <D.22976>:
  D.24565 = inst1->type_argc;
  D.24566 = (int) D.24565;
  if (D.24566 > i) goto <D.22975>; else goto <D.22977>;
  <D.22977>:
  D.24548 = 1;
  return D.24548;
}


__attribute__((visibility ("hidden")))
mini_class_get_container_class (struct MonoClass * class)
{
  struct MonoGenericClass * D.24568;
  struct MonoClass * D.24571;
  struct MonoGenericContainer * D.24572;
  _Bool D.24573;
  long int D.24574;
  long int D.24575;

  D.24568 = class->generic_class;
  if (D.24568 != 0B) goto <D.24569>; else goto <D.24570>;
  <D.24569>:
  D.24568 = class->generic_class;
  D.24571 = D.24568->container_class;
  return D.24571;
  <D.24570>:
  D.24572 = class->generic_container;
  D.24573 = D.24572 == 0B;
  D.24574 = (long int) D.24573;
  D.24575 = __builtin_expect (D.24574, 0);
  if (D.24575 != 0) goto <D.24576>; else goto <D.24577>;
  <D.24576>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2502, "class->generic_container");
  <D.24577>:
  D.24571 = class;
  return D.24571;
}


__attribute__((visibility ("hidden")))
mini_class_get_context (struct MonoClass * class)
{
  struct MonoGenericClass * D.24579;
  struct MonoGenericContext * D.24582;
  struct MonoGenericContainer * D.24583;
  _Bool D.24584;
  long int D.24585;
  long int D.24586;

  D.24579 = class->generic_class;
  if (D.24579 != 0B) goto <D.24580>; else goto <D.24581>;
  <D.24580>:
  D.24579 = class->generic_class;
  D.24582 = &D.24579->context;
  return D.24582;
  <D.24581>:
  D.24583 = class->generic_container;
  D.24584 = D.24583 == 0B;
  D.24585 = (long int) D.24584;
  D.24586 = __builtin_expect (D.24585, 0);
  if (D.24586 != 0) goto <D.24587>; else goto <D.24588>;
  <D.24587>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2518, "class->generic_container");
  <D.24588>:
  D.24583 = class->generic_container;
  D.24582 = &D.24583->context;
  return D.24582;
}


__attribute__((visibility ("hidden")))
mini_get_basic_type_from_generic (struct MonoGenericSharingContext * gsctx, struct MonoType * type)
{
  long unsigned int D.24592;
  long unsigned int D.24593;
  unsigned char D.24595;
  int D.24597;
  struct MonoType * D.24599;

  D.24592 = BIT_FIELD_REF <*type, 64, 64>;
  D.24593 = D.24592 & 8589934592;
  if (D.24593 == 0) goto <D.24594>; else goto <D.24590>;
  <D.24594>:
  D.24595 = type->type;
  if (D.24595 == 19) goto <D.24591>; else goto <D.24596>;
  <D.24596>:
  D.24595 = type->type;
  if (D.24595 == 30) goto <D.24591>; else goto <D.24590>;
  <D.24591>:
  D.24597 = mini_is_gsharedvt_type_gsctx (gsctx, type);
  if (D.24597 != 0) goto <D.24598>; else goto <D.24590>;
  <D.24598>:
  D.24599 = type;
  return D.24599;
  <D.24590>:
  D.24599 = mono_type_get_basic_type_from_generic (type);
  return D.24599;
}


__attribute__((visibility ("hidden")))
mini_type_get_underlying_type (struct MonoGenericSharingContext * gsctx, struct MonoType * type)
{
  long unsigned int D.24601;
  long unsigned int D.24602;
  struct MonoType * D.24605;
  struct MonoClass * D.24606;
  unsigned char D.24611;
  int D.24613;
  struct MonoType * D.24616;

  D.24601 = BIT_FIELD_REF <*type, 64, 64>;
  D.24602 = D.24601 & 8589934592;
  if (D.24602 != 0) goto <D.24603>; else goto <D.24604>;
  <D.24603>:
  D.24606 = mono_defaults.int_class;
  D.24605 = &D.24606->byval_arg;
  return D.24605;
  <D.24604>:
  D.24601 = BIT_FIELD_REF <*type, 64, 64>;
  D.24602 = D.24601 & 8589934592;
  if (D.24602 == 0) goto <D.24609>; else goto <D.24610>;
  <D.24609>:
  D.24611 = type->type;
  if (D.24611 == 19) goto <D.24607>; else goto <D.24612>;
  <D.24612>:
  D.24611 = type->type;
  if (D.24611 == 30) goto <D.24607>; else goto <D.24608>;
  <D.24607>:
  D.24613 = mini_is_gsharedvt_type_gsctx (gsctx, type);
  if (D.24613 != 0) goto <D.24614>; else goto <D.24615>;
  <D.24614>:
  D.24605 = type;
  return D.24605;
  <D.24615>:
  <D.24608>:
  <D.24610>:
  D.24616 = mono_type_get_underlying_type (type);
  D.24605 = mini_get_basic_type_from_generic (gsctx, D.24616);
  return D.24605;
}


__attribute__((visibility ("hidden")))
mini_type_stack_size (struct MonoGenericSharingContext * gsctx, struct MonoType * t, int * align)
{
  int D.24618;
  gboolean allow_open;

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


__attribute__((visibility ("hidden")))
mini_type_stack_size_full (struct MonoGenericSharingContext * gsctx, struct MonoType * t, guint32 * align, gboolean pinvoke)
{
  int ialign.89;
  unsigned int ialign.90;
  int D.24628;
  int size;

  if (pinvoke != 0) goto <D.24620>; else goto <D.24621>;
  <D.24620>:
  size = mono_type_native_stack_size (t, align);
  goto <D.24622>;
  <D.24621>:
  {
    int ialign;

    try
      {
        if (align != 0B) goto <D.24623>; else goto <D.24624>;
        <D.24623>:
        size = mini_type_stack_size (gsctx, t, &ialign);
        ialign.89 = ialign;
        ialign.90 = (unsigned int) ialign.89;
        *align = ialign.90;
        goto <D.24627>;
        <D.24624>:
        size = mini_type_stack_size (gsctx, t, 0B);
        <D.24627>:
      }
    finally
      {
        ialign = {CLOBBER};
      }
  }
  <D.24622>:
  D.24628 = size;
  return D.24628;
}


__attribute__((visibility ("hidden")))
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.91;
  struct GHashTable * D.24633;
  struct GHashTable * old_hash;

  generic_subclass_hash.91 = generic_subclass_hash;
  if (generic_subclass_hash.91 == 0B) goto <D.24631>; else goto <D.24632>;
  <D.24631>:
  return;
  <D.24632>:
  mono_loader_lock ();
  old_hash = generic_subclass_hash;
  D.24633 = monoeg_g_hash_table_new (mono_aligned_addr_hash, 0B);
  generic_subclass_hash = D.24633;
  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.24635;
  struct MonoImage * D.24638;
  _Bool D.24639;
  long int D.24640;
  long int D.24641;
  struct MonoRuntimeGenericContextTemplate * D.24644;
  struct GHashTable * generic_subclass_hash.92;
  struct MonoClass * new_list;

  D.24635 = class->image;
  if (D.24635 == image) goto <D.24636>; else goto <D.24637>;
  <D.24636>:
  goto <D.22279>;
  <D.22278>:
  D.24638 = subclass->image;
  D.24639 = D.24638 != image;
  D.24640 = (long int) D.24639;
  D.24641 = __builtin_expect (D.24640, 0);
  if (D.24641 != 0) goto <D.24642>; else goto <D.24643>;
  <D.24642>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 285, "subclass->image == image");
  <D.24643>:
  D.24644 = class_lookup_rgctx_template (subclass);
  subclass = D.24644->next_subclass;
  <D.22279>:
  if (subclass != 0B) goto <D.22278>; else goto <D.22280>;
  <D.22280>:
  return;
  <D.24637>:
  new_list = 0B;
  goto <D.22284>;
  <D.22283>:
  {
    struct MonoRuntimeGenericContextTemplate * subclass_template;
    struct MonoClass * next;

    subclass_template = class_lookup_rgctx_template (subclass);
    next = subclass_template->next_subclass;
    D.24638 = subclass->image;
    if (D.24638 != image) goto <D.24645>; else goto <D.24646>;
    <D.24645>:
    subclass_template->next_subclass = new_list;
    new_list = subclass;
    <D.24646>:
    subclass = next;
  }
  <D.22284>:
  if (subclass != 0B) goto <D.22283>; else goto <D.22285>;
  <D.22285>:
  if (new_list != 0B) goto <D.24647>; else goto <D.24648>;
  <D.24647>:
  generic_subclass_hash.92 = generic_subclass_hash;
  monoeg_g_hash_table_insert_replace (generic_subclass_hash.92, class, new_list, 0);
  <D.24648>:
}


__attribute__((visibility ("hidden")))
mono_generic_sharing_cleanup ()
{
  struct GHashTable * generic_subclass_hash.93;

  mono_remove_image_unload_hook (mono_class_unregister_image_generic_subclasses, 0B);
  generic_subclass_hash.93 = generic_subclass_hash;
  if (generic_subclass_hash.93 != 0B) goto <D.24652>; else goto <D.24653>;
  <D.24652>:
  generic_subclass_hash.93 = generic_subclass_hash;
  monoeg_g_hash_table_destroy (generic_subclass_hash.93);
  <D.24653>:
}


mini_type_var_is_vt (struct MonoCompile * cfg, struct MonoType * type)
{
  unsigned char D.24654;
  struct MonoGenericSharingContext * D.24658;
  gboolean * D.24659;
  struct MonoGenericParam * D.24661;
  short unsigned int D.24662;
  long unsigned int D.24663;
  long unsigned int D.24664;
  gboolean * D.24665;
  int D.24666;
  gboolean D.24668;
  gboolean * D.24672;
  gboolean * D.24674;
  int D.24675;

  D.24654 = type->type;
  if (D.24654 == 19) goto <D.24655>; else goto <D.24656>;
  <D.24655>:
  D.24658 = cfg->generic_sharing_context;
  D.24659 = D.24658->var_is_vt;
  if (D.24659 != 0B) goto <D.24660>; else goto <D.24657>;
  <D.24660>:
  D.24658 = cfg->generic_sharing_context;
  D.24659 = D.24658->var_is_vt;
  D.24661 = type->data.generic_param;
  D.24662 = D.24661->num;
  D.24663 = (long unsigned int) D.24662;
  D.24664 = D.24663 * 4;
  D.24665 = D.24659 + D.24664;
  D.24666 = *D.24665;
  if (D.24666 != 0) goto <D.24667>; else goto <D.24657>;
  <D.24667>:
  D.24668 = 1;
  return D.24668;
  <D.24657>:
  D.24668 = 0;
  return D.24668;
  <D.24656>:
  D.24654 = type->type;
  if (D.24654 == 30) goto <D.24669>; else goto <D.24670>;
  <D.24669>:
  D.24658 = cfg->generic_sharing_context;
  D.24672 = D.24658->mvar_is_vt;
  if (D.24672 != 0B) goto <D.24673>; else goto <D.24671>;
  <D.24673>:
  D.24658 = cfg->generic_sharing_context;
  D.24672 = D.24658->mvar_is_vt;
  D.24661 = type->data.generic_param;
  D.24662 = D.24661->num;
  D.24663 = (long unsigned int) D.24662;
  D.24664 = D.24663 * 4;
  D.24674 = D.24672 + D.24664;
  D.24675 = *D.24674;
  if (D.24675 != 0) goto <D.24676>; else goto <D.24671>;
  <D.24676>:
  D.24668 = 1;
  return D.24668;
  <D.24671>:
  D.24668 = 0;
  return D.24668;
  <D.24670>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 2651);
  D.24668 = 0;
  return D.24668;
}


__attribute__((visibility ("hidden")))
mini_type_is_reference (struct MonoCompile * cfg, struct MonoType * type)
{
  int D.24678;
  gboolean D.24681;
  struct MonoGenericSharingContext * D.24682;
  int iftmp.94;
  unsigned char D.24689;
  int D.24691;

  D.24678 = mono_type_is_reference (type);
  if (D.24678 != 0) goto <D.24679>; else goto <D.24680>;
  <D.24679>:
  D.24681 = 1;
  return D.24681;
  <D.24680>:
  D.24682 = cfg->generic_sharing_context;
  if (D.24682 == 0B) goto <D.24683>; else goto <D.24684>;
  <D.24683>:
  D.24681 = 0;
  return D.24681;
  <D.24684>:
  D.24689 = type->type;
  if (D.24689 == 19) goto <D.24686>; else goto <D.24690>;
  <D.24690>:
  D.24689 = type->type;
  if (D.24689 == 30) goto <D.24686>; else goto <D.24687>;
  <D.24686>:
  D.24691 = mini_type_var_is_vt (cfg, type);
  if (D.24691 == 0) goto <D.24692>; else goto <D.24687>;
  <D.24692>:
  iftmp.94 = 1;
  goto <D.24688>;
  <D.24687>:
  iftmp.94 = 0;
  <D.24688>:
  D.24681 = iftmp.94;
  return D.24681;
}


__attribute__((visibility ("hidden")))
mini_method_get_rgctx (struct MonoMethod * m)
{
  struct MonoGenericContext * D.24694;
  struct MonoGenericInst * D.24695;
  void * D.24698;
  struct MonoDomain * D.24699;
  struct MonoClass * D.24700;
  struct MonoVTable * D.24701;
  struct MonoGenericContext * D.24702;
  struct MonoGenericInst * D.24703;
  struct MonoDomain * D.24704;

  D.24694 = mini_method_get_context (m);
  D.24695 = D.24694->method_inst;
  if (D.24695 != 0B) goto <D.24696>; else goto <D.24697>;
  <D.24696>:
  D.24699 = mono_domain_get ();
  D.24700 = m->klass;
  D.24701 = mono_class_vtable (D.24699, D.24700);
  D.24702 = mini_method_get_context (m);
  D.24703 = D.24702->method_inst;
  D.24698 = mono_method_lookup_rgctx (D.24701, D.24703);
  return D.24698;
  <D.24697>:
  D.24704 = mono_domain_get ();
  D.24700 = m->klass;
  D.24698 = mono_class_vtable (D.24704, D.24700);
  return D.24698;
}


mini_type_is_vtype (struct MonoCompile * cfg, struct MonoType * t)
{
  gboolean D.24706;
  int iftmp.95;
  int D.24711;
  int D.24713;

  D.24711 = mono_type_is_struct (t);
  if (D.24711 != 0) goto <D.24708>; else goto <D.24712>;
  <D.24712>:
  D.24713 = mini_is_gsharedvt_variable_type (cfg, t);
  if (D.24713 != 0) goto <D.24708>; else goto <D.24709>;
  <D.24708>:
  iftmp.95 = 1;
  goto <D.24710>;
  <D.24709>:
  iftmp.95 = 0;
  <D.24710>:
  D.24706 = iftmp.95;
  return D.24706;
}


__attribute__((visibility ("hidden")))
mini_class_is_generic_sharable (struct MonoClass * klass)
{
  struct MonoGenericClass * D.24715;
  int D.24718;
  gboolean D.24721;
  int iftmp.96;
  struct MonoGenericContext * D.24726;
  int D.24727;

  D.24715 = klass->generic_class;
  if (D.24715 != 0B) goto <D.24716>; else goto <D.24717>;
  <D.24716>:
  D.24718 = is_async_state_machine_class (klass);
  if (D.24718 != 0) goto <D.24719>; else goto <D.24720>;
  <D.24719>:
  D.24721 = 0;
  return D.24721;
  <D.24720>:
  <D.24717>:
  D.24715 = klass->generic_class;
  if (D.24715 != 0B) goto <D.24725>; else goto <D.24723>;
  <D.24725>:
  D.24715 = klass->generic_class;
  D.24726 = &D.24715->context;
  D.24727 = mono_generic_context_is_sharable (D.24726, 0);
  if (D.24727 != 0) goto <D.24728>; else goto <D.24723>;
  <D.24728>:
  iftmp.96 = 1;
  goto <D.24724>;
  <D.24723>:
  iftmp.96 = 0;
  <D.24724>:
  D.24721 = iftmp.96;
  return D.24721;
}


__attribute__((visibility ("hidden")))
mini_is_gsharedvt_variable_klass (struct MonoCompile * cfg, struct MonoClass * klass)
{
  gboolean D.24730;
  struct MonoType * D.24731;

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


__attribute__((visibility ("hidden")))
mini_is_gsharedvt_type_gsctx (struct MonoGenericSharingContext * gsctx, struct MonoType * t)
{
  gboolean D.24733;

  D.24733 = 0;
  return D.24733;
}


__attribute__((visibility ("hidden")))
mini_is_gsharedvt_type (struct MonoCompile * cfg, struct MonoType * t)
{
  gboolean D.24735;

  D.24735 = 0;
  return D.24735;
}


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

  D.24737 = 0;
  return D.24737;
}


__attribute__((visibility ("hidden")))
mini_is_gsharedvt_signature (struct MonoCompile * cfg, struct MonoMethodSignature * sig)
{
  gboolean D.24739;

  D.24739 = 0;
  return D.24739;
}


__attribute__((visibility ("hidden")))
mini_is_gsharedvt_variable_type (struct MonoCompile * cfg, struct MonoType * t)
{
  gboolean D.24741;

  D.24741 = 0;
  return D.24741;
}


__attribute__((visibility ("hidden")))
mini_is_gsharedvt_sharable_method (struct MonoMethod * method)
{
  gboolean D.24743;

  D.24743 = 0;
  return D.24743;
}


__attribute__((visibility ("hidden")))
mini_is_gsharedvt_variable_signature (struct MonoMethodSignature * sig)
{
  gboolean D.24745;

  D.24745 = 0;
  return D.24745;
}


