mono_generic_context_check_used (struct MonoGenericContext * context)
{
  struct MonoGenericInst * D.23199;
  int D.23200;
  struct MonoGenericInst * D.23201;
  int D.23202;
  int D.23203;
  int context_used;

  context_used = 0;
  D.23199 = context->class_inst;
  D.23200 = inst_check_context_used (D.23199);
  context_used = D.23200 | context_used;
  D.23201 = context->method_inst;
  D.23202 = inst_check_context_used (D.23201);
  context_used = D.23202 | context_used;
  D.23203 = context_used;
  return D.23203;
}


inst_check_context_used (struct MonoGenericInst * inst)
{
  int D.23207;
  struct MonoType * D.23208;
  int D.23209;
  <unnamed-unsigned:22> D.23210;
  int D.23211;
  int context_used;
  int i;

  context_used = 0;
  if (inst == 0B) goto <D.23205>; else goto <D.23206>;
  <D.23205>:
  D.23207 = 0;
  return D.23207;
  <D.23206>:
  i = 0;
  goto <D.22290>;
  <D.22289>:
  D.23208 = inst->type_argv[i];
  D.23209 = type_check_context_used (D.23208, 1);
  context_used = D.23209 | context_used;
  i = i + 1;
  <D.22290>:
  D.23210 = inst->type_argc;
  D.23211 = (int) D.23210;
  if (D.23211 > i) goto <D.22289>; else goto <D.22291>;
  <D.22291>:
  D.23207 = context_used;
  return D.23207;
}


type_check_context_used (struct MonoType * type, gboolean recursive)
{
  int D.23213;
  int D.23214;
  struct MonoClass * D.23215;
  struct MonoArrayType * D.23216;
  struct MonoClass * D.23217;
  struct MonoClass * D.23220;
  struct MonoClass * D.23223;
  struct MonoGenericContainer * D.23224;
  _Bool D.23225;
  long int D.23226;
  long int D.23227;
  struct MonoGenericContext * D.23230;

  D.23213 = mono_type_get_type (type);
  switch (D.23213) <default: <D.22283>, case 18: <D.22280>, case 19: <D.22276>, case 20: <D.22279>, case 21: <D.22281>, case 29: <D.22278>, case 30: <D.22277>>
  <D.22276>:
  D.23214 = 1;
  return D.23214;
  <D.22277>:
  D.23214 = 2;
  return D.23214;
  <D.22278>:
  D.23215 = mono_type_get_class (type);
  D.23214 = mono_class_check_context_used (D.23215);
  return D.23214;
  <D.22279>:
  D.23216 = mono_type_get_array_type (type);
  D.23217 = D.23216->eklass;
  D.23214 = mono_class_check_context_used (D.23217);
  return D.23214;
  <D.22280>:
  if (recursive != 0) goto <D.23218>; else goto <D.23219>;
  <D.23218>:
  D.23220 = mono_type_get_class (type);
  D.23214 = mono_class_check_context_used (D.23220);
  return D.23214;
  <D.23219>:
  D.23214 = 0;
  return D.23214;
  <D.22281>:
  if (recursive != 0) goto <D.23221>; else goto <D.23222>;
  <D.23221>:
  {
    struct MonoGenericClass * gclass;

    gclass = type->data.generic_class;
    D.23223 = gclass->container_class;
    D.23224 = D.23223->generic_container;
    D.23225 = D.23224 == 0B;
    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", 64, "gclass->container_class->generic_container");
    <D.23229>:
    D.23230 = &gclass->context;
    D.23214 = mono_generic_context_check_used (D.23230);
    return D.23214;
  }
  <D.23222>:
  D.23214 = 0;
  return D.23214;
  <D.22283>:
  D.23214 = 0;
  return D.23214;
}


mono_class_check_context_used (struct MonoClass * class)
{
  struct MonoType * D.23232;
  int D.23233;
  struct MonoType * D.23234;
  int D.23235;
  struct MonoGenericClass * D.23236;
  struct MonoGenericContext * D.23239;
  int D.23240;
  struct MonoGenericContainer * D.23242;
  struct MonoGenericContext * D.23245;
  int D.23246;
  int D.23247;
  int context_used;

  context_used = 0;
  D.23232 = &class->this_arg;
  D.23233 = type_check_context_used (D.23232, 0);
  context_used = D.23233 | context_used;
  D.23234 = &class->byval_arg;
  D.23235 = type_check_context_used (D.23234, 0);
  context_used = D.23235 | context_used;
  D.23236 = class->generic_class;
  if (D.23236 != 0B) goto <D.23237>; else goto <D.23238>;
  <D.23237>:
  D.23236 = class->generic_class;
  D.23239 = &D.23236->context;
  D.23240 = mono_generic_context_check_used (D.23239);
  context_used = D.23240 | context_used;
  goto <D.23241>;
  <D.23238>:
  D.23242 = class->generic_container;
  if (D.23242 != 0B) goto <D.23243>; else goto <D.23244>;
  <D.23243>:
  D.23242 = class->generic_container;
  D.23245 = &D.23242->context;
  D.23246 = mono_generic_context_check_used (D.23245);
  context_used = D.23246 | context_used;
  <D.23244>:
  <D.23241>:
  D.23247 = context_used;
  return D.23247;
}


mono_method_get_declaring_generic_method (struct MonoMethod * method)
{
  unsigned char D.23249;
  unsigned char D.23250;
  _Bool D.23251;
  long int D.23252;
  long int D.23253;
  struct MonoMethod * D.23256;
  struct MonoMethodInflated * inflated;

  D.23249 = BIT_FIELD_REF <*method, 8, 264>;
  D.23250 = D.23249 & 16;
  D.23251 = D.23250 == 0;
  D.23252 = (long int) D.23251;
  D.23253 = __builtin_expect (D.23252, 0);
  if (D.23253 != 0) goto <D.23254>; else goto <D.23255>;
  <D.23254>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 449, "method->is_inflated");
  <D.23255>:
  inflated = method;
  D.23256 = inflated->declaring;
  return D.23256;
}


mono_class_get_method_generic (struct MonoClass * klass, struct MonoMethod * method)
{
  unsigned char D.23258;
  unsigned char D.23259;
  struct MonoGenericClass * D.23263;
  unsigned char D.23268;
  struct MonoMethod * D.23271;
  struct MonoMethod * * D.23272;
  long unsigned int D.23273;
  long unsigned int D.23274;
  struct MonoMethod * * D.23275;
  unsigned char D.23277;
  unsigned char D.23278;
  struct MonoMethod * D.23281;
  unsigned int i.0;
  unsigned int D.23284;
  struct MonoGenericContext * D.23289;
  struct MonoGenericInst * D.23290;
  struct MonoMethod * declaring;
  struct MonoMethod * m;
  int i;

  D.23258 = BIT_FIELD_REF <*method, 8, 264>;
  D.23259 = D.23258 & 16;
  if (D.23259 != 0) goto <D.23260>; else goto <D.23261>;
  <D.23260>:
  declaring = mono_method_get_declaring_generic_method (method);
  goto <D.23262>;
  <D.23261>:
  declaring = method;
  <D.23262>:
  m = 0B;
  D.23263 = klass->generic_class;
  if (D.23263 != 0B) goto <D.23264>; else goto <D.23265>;
  <D.23264>:
  m = mono_class_get_inflated_method (klass, declaring);
  <D.23265>:
  if (m == 0B) goto <D.23266>; else goto <D.23267>;
  <D.23266>:
  mono_class_setup_methods (klass);
  D.23268 = klass->exception_type;
  if (D.23268 != 0) goto <D.23269>; else goto <D.23270>;
  <D.23269>:
  D.23271 = 0B;
  return D.23271;
  <D.23270>:
  i = 0;
  goto <D.22418>;
  <D.22417>:
  D.23272 = klass->methods;
  D.23273 = (long unsigned int) i;
  D.23274 = D.23273 * 8;
  D.23275 = D.23272 + D.23274;
  m = *D.23275;
  if (m == declaring) goto <D.22416>; else goto <D.23276>;
  <D.23276>:
  D.23277 = BIT_FIELD_REF <*m, 8, 264>;
  D.23278 = D.23277 & 16;
  if (D.23278 != 0) goto <D.23279>; else goto <D.23280>;
  <D.23279>:
  D.23281 = mono_method_get_declaring_generic_method (m);
  if (D.23281 == declaring) goto <D.22416>; else goto <D.23282>;
  <D.23282>:
  <D.23280>:
  i = i + 1;
  <D.22418>:
  i.0 = (unsigned int) i;
  D.23284 = klass->method.count;
  if (i.0 < D.23284) goto <D.22417>; else goto <D.22416>;
  <D.22416>:
  i.0 = (unsigned int) i;
  D.23284 = klass->method.count;
  if (i.0 >= D.23284) goto <D.23285>; else goto <D.23286>;
  <D.23285>:
  D.23271 = 0B;
  return D.23271;
  <D.23286>:
  <D.23267>:
  if (method != declaring) goto <D.23287>; else goto <D.23288>;
  <D.23287>:
  {
    struct MonoGenericContext context;

    try
      {
        context.class_inst = 0B;
        D.23289 = mono_method_get_context (method);
        D.23290 = D.23289->method_inst;
        context.method_inst = D.23290;
        m = mono_class_inflate_generic_method (m, &context);
      }
    finally
      {
        context = {CLOBBER};
      }
  }
  <D.23288>:
  D.23271 = m;
  return D.23271;
}


mono_is_partially_sharable_inst (struct MonoGenericInst * inst)
{
  struct MonoType * D.23295;
  int D.23296;
  unsigned char D.23298;
  <unnamed-unsigned:22> D.23300;
  int D.23301;
  gboolean D.23302;
  _Bool D.23303;
  _Bool D.23304;
  _Bool D.23305;
  int i;
  gboolean has_refs;
  gboolean has_non_refs;

  has_refs = 0;
  has_non_refs = 0;
  i = 0;
  goto <D.22524>;
  <D.22523>:
  D.23295 = inst->type_argv[i];
  D.23296 = mono_type_is_reference (D.23295);
  if (D.23296 != 0) goto <D.23292>; else goto <D.23297>;
  <D.23297>:
  D.23295 = inst->type_argv[i];
  D.23298 = D.23295->type;
  if (D.23298 == 19) goto <D.23292>; else goto <D.23299>;
  <D.23299>:
  D.23295 = inst->type_argv[i];
  D.23298 = D.23295->type;
  if (D.23298 == 30) goto <D.23292>; else goto <D.23293>;
  <D.23292>:
  has_refs = 1;
  goto <D.23294>;
  <D.23293>:
  has_non_refs = 1;
  <D.23294>:
  i = i + 1;
  <D.22524>:
  D.23300 = inst->type_argc;
  D.23301 = (int) D.23300;
  if (D.23301 > i) goto <D.22523>; else goto <D.22525>;
  <D.22525>:
  D.23303 = has_refs != 0;
  D.23304 = has_non_refs != 0;
  D.23305 = D.23303 & D.23304;
  D.23302 = (gboolean) D.23305;
  return D.23302;
}


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.1;
  union mono_mutex_t * D.23310;
  _Bool D.23313;
  long int D.23314;
  long int D.23315;
  struct GHashTable * D.23318;
  struct GHashTable * D.23321;
  _Bool D.23324;
  long int D.23325;
  long int D.23326;
  void * D.23331;
  void * tramp_addr.2;
  void * tramp_addr.3;
  int mono_aot_only.4;
  struct MonoDomain * D.23345;
  int num_trampolines.5;
  int num_trampolines.6;
  _Bool D.23350;
  long int D.23351;
  long int D.23352;
  _Bool D.23357;
  long int D.23358;
  long int D.23359;
  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.1 = inited;
      if (inited.1 == 0) goto <D.23308>; else goto <D.23309>;
      <D.23308>:
      mono_counters_register ("GSHAREDVT arg trampolines", 256, &num_trampolines);
      inited = 1;
      <D.23309>:
      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.23310 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23310);
        if (ret != 0) goto <D.23311>; else goto <D.23312>;
        <D.23311>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23312>:
        D.23313 = ret != 0;
        D.23314 = (long int) D.23313;
        D.23315 = __builtin_expect (D.23314, 0);
        if (D.23315 != 0) goto <D.23316>; else goto <D.23317>;
        <D.23316>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1148, "ret == 0");
        <D.23317>:
      }
      D.23318 = domain_info->gsharedvt_arg_tramp_hash;
      if (D.23318 == 0B) goto <D.23319>; else goto <D.23320>;
      <D.23319>:
      D.23321 = monoeg_g_hash_table_new (tramp_info_hash, tramp_info_equal);
      domain_info->gsharedvt_arg_tramp_hash = D.23321;
      <D.23320>:
      D.23318 = domain_info->gsharedvt_arg_tramp_hash;
      res = monoeg_g_hash_table_lookup (D.23318, &tinfo);
      {
        int ret;

        D.23310 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23310);
        if (ret != 0) goto <D.23322>; else goto <D.23323>;
        <D.23322>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23323>:
        D.23324 = ret != 0;
        D.23325 = (long int) D.23324;
        D.23326 = __builtin_expect (D.23325, 0);
        if (D.23326 != 0) goto <D.23327>; else goto <D.23328>;
        <D.23327>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1152, "ret == 0");
        <D.23328>:
      }
      if (res != 0B) goto <D.23329>; else goto <D.23330>;
      <D.23329>:
      D.23331 = res;
      return D.23331;
      <D.23330>:
      info = mono_arch_get_gsharedvt_call_info (addr, normal_sig, gsharedvt_sig, gsctx, gsharedvt_in, vcall_offset, calli);
      if (gsharedvt_in != 0) goto <D.23332>; else goto <D.23333>;
      <D.23332>:
      {
        static void * tramp_addr;
        struct MonoMethod * wrapper;

        tramp_addr.2 = tramp_addr;
        if (tramp_addr.2 == 0B) goto <D.23335>; else goto <D.23336>;
        <D.23335>:
        wrapper = mono_marshal_get_gsharedvt_in_wrapper ();
        addr = mono_compile_method (wrapper);
        mono_memory_barrier ();
        tramp_addr = addr;
        <D.23336>:
        addr = tramp_addr;
      }
      goto <D.23337>;
      <D.23333>:
      {
        static void * tramp_addr;
        struct MonoMethod * wrapper;

        tramp_addr.3 = tramp_addr;
        if (tramp_addr.3 == 0B) goto <D.23339>; else goto <D.23340>;
        <D.23339>:
        wrapper = mono_marshal_get_gsharedvt_out_wrapper ();
        addr = mono_compile_method (wrapper);
        mono_memory_barrier ();
        tramp_addr = addr;
        <D.23340>:
        addr = tramp_addr;
      }
      <D.23337>:
      mono_aot_only.4 = mono_aot_only;
      if (mono_aot_only.4 != 0) goto <D.23342>; else goto <D.23343>;
      <D.23342>:
      addr = mono_aot_get_gsharedvt_arg_trampoline (info, addr);
      goto <D.23344>;
      <D.23343>:
      D.23345 = mono_domain_get ();
      addr = mono_arch_get_gsharedvt_arg_trampoline (D.23345, info, addr);
      <D.23344>:
      num_trampolines.5 = num_trampolines;
      num_trampolines.6 = num_trampolines.5 + 1;
      num_trampolines = num_trampolines.6;
      tramp_info = mono_domain_alloc0 (domain, 56);
      memcpy (tramp_info, &tinfo, 56);
      {
        int ret;

        D.23310 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23310);
        if (ret != 0) goto <D.23348>; else goto <D.23349>;
        <D.23348>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23349>:
        D.23350 = ret != 0;
        D.23351 = (long int) D.23350;
        D.23352 = __builtin_expect (D.23351, 0);
        if (D.23352 != 0) goto <D.23353>; else goto <D.23354>;
        <D.23353>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1193, "ret == 0");
        <D.23354>:
      }
      D.23318 = domain_info->gsharedvt_arg_tramp_hash;
      monoeg_g_hash_table_insert_replace (D.23318, tramp_info, addr, 0);
      {
        int ret;

        D.23310 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23310);
        if (ret != 0) goto <D.23355>; else goto <D.23356>;
        <D.23355>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23356>:
        D.23357 = ret != 0;
        D.23358 = (long int) D.23357;
        D.23359 = __builtin_expect (D.23358, 0);
        if (D.23359 != 0) goto <D.23360>; else goto <D.23361>;
        <D.23360>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1196, "ret == 0");
        <D.23361>:
      }
      D.23331 = addr;
      return D.23331;
    }
  finally
    {
      tinfo = {CLOBBER};
    }
}


tramp_info_equal (const void * a, const void * b)
{
  gboolean D.23364;
  int iftmp.7;
  signed long D.23368;
  long unsigned int D.23369;
  long unsigned int D.23370;
  signed long D.23371;
  long unsigned int D.23372;
  long unsigned int D.23373;
  int D.23375;
  int D.23376;
  void * D.23378;
  void * D.23379;
  struct MonoMethodSignature * D.23381;
  struct MonoMethodSignature * D.23382;
  struct MonoMethodSignature * D.23384;
  struct MonoMethodSignature * D.23385;
  struct MonoGenericInst * D.23387;
  struct MonoGenericInst * D.23388;
  struct MonoGenericInst * D.23390;
  struct MonoGenericInst * D.23391;
  struct GSharedVtTrampInfo * tramp1;
  struct GSharedVtTrampInfo * tramp2;

  tramp1 = a;
  tramp2 = b;
  D.23368 = BIT_FIELD_REF <*tramp1, 64, 0>;
  D.23369 = (long unsigned int) D.23368;
  D.23370 = D.23369;
  D.23371 = BIT_FIELD_REF <*tramp2, 64, 0>;
  D.23372 = (long unsigned int) D.23371;
  D.23373 = D.23372;
  if (D.23370 == D.23373) goto <D.23374>; else goto <D.23366>;
  <D.23374>:
  D.23375 = tramp1->vcall_offset;
  D.23376 = tramp2->vcall_offset;
  if (D.23375 == D.23376) goto <D.23377>; else goto <D.23366>;
  <D.23377>:
  D.23378 = tramp1->addr;
  D.23379 = tramp2->addr;
  if (D.23378 == D.23379) goto <D.23380>; else goto <D.23366>;
  <D.23380>:
  D.23381 = tramp1->sig;
  D.23382 = tramp2->sig;
  if (D.23381 == D.23382) goto <D.23383>; else goto <D.23366>;
  <D.23383>:
  D.23384 = tramp1->gsig;
  D.23385 = tramp2->gsig;
  if (D.23384 == D.23385) goto <D.23386>; else goto <D.23366>;
  <D.23386>:
  D.23387 = tramp1->gsctx.class_inst;
  D.23388 = tramp2->gsctx.class_inst;
  if (D.23387 == D.23388) goto <D.23389>; else goto <D.23366>;
  <D.23389>:
  D.23390 = tramp1->gsctx.method_inst;
  D.23391 = tramp2->gsctx.method_inst;
  if (D.23390 == D.23391) goto <D.23392>; else goto <D.23366>;
  <D.23392>:
  iftmp.7 = 1;
  goto <D.23367>;
  <D.23366>:
  iftmp.7 = 0;
  <D.23367>:
  D.23364 = iftmp.7;
  return D.23364;
}


tramp_info_hash (const void * key)
{
  guint D.23394;
  void * D.23395;
  long int D.23396;
  struct GSharedVtTrampInfo * tramp;

  tramp = key;
  D.23395 = tramp->addr;
  D.23396 = (long int) D.23395;
  D.23394 = (guint) D.23396;
  return D.23394;
}


mono_memory_barrier ()
{
  __sync_synchronize ();
}


memcpy (void * restrict __dest, const void * restrict __src, size_t __len)
{
  void * D.23398;
  long unsigned int D.23399;

  D.23399 = __builtin_object_size (__dest, 0);
  D.23398 = __builtin___memcpy_chk (__dest, __src, __len, D.23399);
  return D.23398;
}


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

  switch (type) <default: <D.22777>, case 0: <D.22752>, case 1: <D.22753>, case 2: <D.22754>, case 3: <D.22755>, case 4: <D.22756>, case 5: <D.22757>, case 6: <D.22759>, case 7: <D.22760>, case 8: <D.22761>, case 9: <D.22762>, case 10: <D.22763>, case 11: <D.22764>, case 12: <D.22765>, case 13: <D.22766>, case 14: <D.22767>, case 15: <D.22769>, case 16: <D.22770>, case 17: <D.22771>, case 18: <D.22772>, case 19: <D.22768>, case 20: <D.22758>, case 22: <D.22773>, case 23: <D.22774>, case 24: <D.22775>, case 25: <D.22776>>
  <D.22752>:
  D.23401 = "STATIC_DATA";
  return D.23401;
  <D.22753>:
  D.23401 = "KLASS";
  return D.23401;
  <D.22754>:
  D.23401 = "VTABLE";
  return D.23401;
  <D.22755>:
  D.23401 = "TYPE";
  return D.23401;
  <D.22756>:
  D.23401 = "REFLECTION_TYPE";
  return D.23401;
  <D.22757>:
  D.23401 = "METHOD";
  return D.23401;
  <D.22758>:
  D.23401 = "GSHAREDVT_INFO";
  return D.23401;
  <D.22759>:
  D.23401 = "GENERIC_METHOD_CODE";
  return D.23401;
  <D.22760>:
  D.23401 = "CLASS_FIELD";
  return D.23401;
  <D.22761>:
  D.23401 = "METHOD_RGCTX";
  return D.23401;
  <D.22762>:
  D.23401 = "METHOD_CONTEXT";
  return D.23401;
  <D.22763>:
  D.23401 = "REMOTING_INVOKE_WITH_CHECK";
  return D.23401;
  <D.22764>:
  D.23401 = "METHOD_DELEGATE_CODE";
  return D.23401;
  <D.22765>:
  D.23401 = "CAST_CACHE";
  return D.23401;
  <D.22766>:
  D.23401 = "ARRAY_ELEMENT_SIZE";
  return D.23401;
  <D.22767>:
  D.23401 = "VALUE_SIZE";
  return D.23401;
  <D.22768>:
  D.23401 = "CLASS_BOX_TYPE";
  return D.23401;
  <D.22769>:
  D.23401 = "FIELD_OFFSET";
  return D.23401;
  <D.22770>:
  D.23401 = "METHOD_GSHAREDVT_OUT_TRAMPOLINE";
  return D.23401;
  <D.22771>:
  D.23401 = "METHOD_GSHAREDVT_OUT_TRAMPOLINE_VIRT";
  return D.23401;
  <D.22772>:
  D.23401 = "SIG_GSHAREDVT_OUT_TRAMPOLINE_CALLI";
  return D.23401;
  <D.22773>:
  D.23401 = "MEMCPY";
  return D.23401;
  <D.22774>:
  D.23401 = "BZERO";
  return D.23401;
  <D.22775>:
  D.23401 = "NULLABLE_CLASS_BOX";
  return D.23401;
  <D.22776>:
  D.23401 = "NULLABLE_CLASS_UNBOX";
  return D.23401;
  <D.22777>:
  D.23401 = "<UNKNOWN RGCTX INFO TYPE>";
  return D.23401;
}


mini_rgctx_info_type_to_patch_info_type (MonoRgctxInfoType info_type)
{
  MonoJumpInfoType D.23403;

  switch (info_type) <default: <D.22851>, case 0: <D.22836>, case 1: <D.22837>, case 2: <D.22838>, case 3: <D.22839>, case 4: <D.22840>, case 12: <D.22841>, case 13: <D.22842>, case 14: <D.22843>, case 15: <D.22850>, case 19: <D.22844>, case 21: <D.22849>, case 22: <D.22845>, case 23: <D.22846>, case 24: <D.22847>, case 25: <D.22848>>
  <D.22836>:
  <D.22837>:
  <D.22838>:
  <D.22839>:
  <D.22840>:
  <D.22841>:
  <D.22842>:
  <D.22843>:
  <D.22844>:
  <D.22845>:
  <D.22846>:
  <D.22847>:
  <D.22848>:
  <D.22849>:
  D.23403 = 11;
  return D.23403;
  <D.22850>:
  D.23403 = 13;
  return D.23403;
  <D.22851>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1677);
  D.23403 = 4294967295;
  return D.23403;
}


mono_method_lookup_or_register_info (struct MonoMethod * method, gboolean in_mrgctx, void * data, MonoRgctxInfoType info_type, struct MonoGenericContext * generic_context)
{
  struct MonoGenericContext * D.23407;
  int iftmp.8;
  unsigned char D.23412;
  unsigned char D.23413;
  _Bool D.23415;
  long int D.23416;
  long int D.23417;
  <unnamed-unsigned:22> D.23420;
  _Bool D.23421;
  long int D.23422;
  long int D.23423;
  guint32 D.23429;
  unsigned int index.9;
  struct MonoClass * class;
  int type_argc;
  int index;

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

    D.23407 = mono_method_get_context (method);
    method_inst = D.23407->method_inst;
    D.23412 = BIT_FIELD_REF <*method, 8, 264>;
    D.23413 = D.23412 & 16;
    if (D.23413 == 0) goto <D.23409>; else goto <D.23414>;
    <D.23414>:
    if (method_inst == 0B) goto <D.23409>; else goto <D.23410>;
    <D.23409>:
    iftmp.8 = 1;
    goto <D.23411>;
    <D.23410>:
    iftmp.8 = 0;
    <D.23411>:
    D.23415 = iftmp.8 != 0;
    D.23416 = (long int) D.23415;
    D.23417 = __builtin_expect (D.23416, 0);
    if (D.23417 != 0) goto <D.23418>; else goto <D.23419>;
    <D.23418>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1755, "method->is_inflated && method_inst");
    <D.23419>:
    D.23420 = method_inst->type_argc;
    type_argc = (int) D.23420;
    D.23421 = type_argc <= 0;
    D.23422 = (long int) D.23421;
    D.23423 = __builtin_expect (D.23422, 0);
    if (D.23423 != 0) goto <D.23424>; else goto <D.23425>;
    <D.23424>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1757, "type_argc > 0");
    <D.23425>:
  }
  goto <D.23426>;
  <D.23406>:
  type_argc = 0;
  <D.23426>:
  index = lookup_or_register_info (class, type_argc, data, info_type, generic_context);
  if (in_mrgctx != 0) goto <D.23427>; else goto <D.23428>;
  <D.23427>:
  index.9 = (unsigned int) index;
  D.23429 = index.9 | 2147483648;
  return D.23429;
  <D.23428>:
  D.23429 = (guint32) index;
  return D.23429;
}


lookup_or_register_info (struct MonoClass * class, int type_argc, void * data, MonoRgctxInfoType info_type, struct MonoGenericContext * generic_context)
{
  int D.23432;
  <unnamed type> D.23437;
  void * D.23439;
  int D.23440;
  int D.23443;
  int inited.10;
  int max_slot.11;
  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.23432 = info_has_identity (info_type);
  if (D.23432 != 0) goto <D.23433>; else goto <D.23434>;
  <D.23433>:
  oti_list = get_info_templates (rgctx_template, type_argc);
  oti = oti_list;
  i = 0;
  goto <D.22868>;
  <D.22867>:
  {
    void * inflated_data;

    D.23437 = oti->info_type;
    if (D.23437 != info_type) goto <D.23435>; else goto <D.23438>;
    <D.23438>:
    D.23439 = oti->data;
    if (D.23439 == 0B) goto <D.23435>; else goto <D.23436>;
    <D.23435>:
    // predicted unlikely by continue predictor.
    goto <D.22866>;
    <D.23436>:
    inflated_data = inflate_info (oti, generic_context, class, 1);
    D.23440 = info_equal (data, inflated_data, info_type);
    if (D.23440 != 0) goto <D.23441>; else goto <D.23442>;
    <D.23441>:
    free_inflated_info (info_type, inflated_data);
    mono_loader_unlock ();
    D.23443 = i;
    return D.23443;
    <D.23442>:
    free_inflated_info (info_type, inflated_data);
  }
  <D.22866>:
  oti = oti->next;
  i = i + 1;
  <D.22868>:
  if (oti != 0B) goto <D.22867>; else goto <D.22869>;
  <D.22869>:
  <D.23434>:
  i = register_info (class, type_argc, data, info_type);
  mono_loader_unlock ();
  inited.10 = inited;
  if (inited.10 == 0) goto <D.23445>; else goto <D.23446>;
  <D.23445>:
  mono_counters_register ("RGCTX max slot number", 2048, &max_slot);
  inited = 1;
  <D.23446>:
  max_slot.11 = max_slot;
  if (i > max_slot.11) goto <D.23448>; else goto <D.23449>;
  <D.23448>:
  max_slot = i;
  <D.23449>:
  D.23443 = i;
  return D.23443;
}


mono_class_get_runtime_generic_context_template (struct MonoClass * class)
{
  struct MonoRuntimeGenericContextTemplate * D.23453;
  struct MonoClass * D.23454;
  int D.23457;
  void * D.23458;
  struct MonoClass * D.23461;
  struct MonoType * D.23462;
  <unnamed type> D.23465;
  int i.12;
  struct MonoImage * D.23467;
  struct MonoRuntimeGenericContextTemplate * D.23468;
  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.23451>; else goto <D.23452>;
  <D.23451>:
  D.23453 = template;
  return D.23453;
  <D.23452>:
  template = alloc_template (class);
  mono_loader_lock ();
  D.23454 = class->parent;
  if (D.23454 != 0B) goto <D.23455>; else goto <D.23456>;
  <D.23455>:
  {
    guint32 num_entries;
    int max_argc;
    int type_argc;

    D.23454 = class->parent;
    parent_template = mono_class_get_runtime_generic_context_template (D.23454);
    max_argc = template_get_max_argc (parent_template);
    type_argc = 0;
    goto <D.22543>;
    <D.22542>:
    D.23457 = rgctx_template_num_infos (parent_template, type_argc);
    num_entries = (guint32) D.23457;
    i = 0;
    goto <D.22540>;
    <D.22539>:
    {
      struct MonoRuntimeGenericContextInfoTemplate oti;

      try
        {
          D.23454 = class->parent;
          oti = class_get_rgctx_template_oti (D.23454, type_argc, i, 0, 0, 0B); [return slot optimization]
          D.23458 = oti.data;
          if (D.23458 != 0B) goto <D.23459>; else goto <D.23460>;
          <D.23459>:
          D.23458 = oti.data;
          D.23461 = mono_defaults.object_class;
          D.23462 = &D.23461->byval_arg;
          if (D.23458 != D.23462) goto <D.23463>; else goto <D.23464>;
          <D.23463>:
          D.23465 = oti.info_type;
          D.23458 = oti.data;
          i.12 = (int) i;
          D.23467 = class->image;
          rgctx_template_set_slot (D.23467, template, type_argc, i.12, D.23458, D.23465);
          <D.23464>:
          <D.23460>:
        }
      finally
        {
          oti = {CLOBBER};
        }
    }
    i = i + 1;
    <D.22540>:
    if (i < num_entries) goto <D.22539>; else goto <D.22541>;
    <D.22541>:
    type_argc = type_argc + 1;
    <D.22543>:
    if (type_argc <= max_argc) goto <D.22542>; else goto <D.22544>;
    <D.22544>:
  }
  <D.23456>:
  D.23468 = class_lookup_rgctx_template (class);
  if (D.23468 != 0B) goto <D.23469>; else goto <D.23470>;
  <D.23469>:
  template = class_lookup_rgctx_template (class);
  goto <D.23471>;
  <D.23470>:
  class_set_rgctx_template (class, template);
  D.23454 = class->parent;
  if (D.23454 != 0B) goto <D.23472>; else goto <D.23473>;
  <D.23472>:
  register_generic_subclass (class);
  <D.23473>:
  <D.23471>:
  mono_loader_unlock ();
  D.23453 = template;
  return D.23453;
}


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

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


template_get_max_argc (struct MonoRuntimeGenericContextTemplate * template)
{
  int D.23486;
  struct GSList * D.23487;
  unsigned int D.23488;

  D.23487 = template->method_templates;
  D.23488 = monoeg_g_slist_length (D.23487);
  D.23486 = (int) D.23488;
  return D.23486;
}


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

  i = 0;
  oti = get_info_templates (template, type_argc);
  goto <D.22335>;
  <D.22334>:
  i = i + 1;
  oti = oti->next;
  <D.22335>:
  if (oti != 0B) goto <D.22334>; else goto <D.22336>;
  <D.22336>:
  D.23490 = i;
  return D.23490;
}


class_get_rgctx_template_oti (struct MonoClass * class, int type_argc, guint32 slot, gboolean temporary, gboolean shared, gboolean * do_free)
{
  int iftmp.19;
  _Bool D.23496;
  _Bool D.23497;
  _Bool D.23498;
  _Bool D.23500;
  _Bool D.23501;
  _Bool D.23502;
  _Bool D.23504;
  long int D.23505;
  long int D.23506;
  struct MonoGenericClass * D.23510;
  struct MonoClass * D.23513;
  void * D.23514;
  struct MonoGenericContext * D.23517;
  void * D.23518;
  int tmp_do_free.20;
  <unnamed type> D.23522;
  int slot.21;
  _Bool D.23526;
  long int D.23527;
  long int D.23528;

  D.23496 = temporary == 0;
  D.23497 = do_free == 0B;
  D.23498 = D.23496 | D.23497;
  if (D.23498 != 0) goto <D.23499>; else goto <D.23494>;
  <D.23499>:
  D.23500 = temporary != 0;
  D.23501 = do_free != 0B;
  D.23502 = D.23500 | D.23501;
  if (D.23502 != 0) goto <D.23503>; else goto <D.23494>;
  <D.23503>:
  iftmp.19 = 1;
  goto <D.23495>;
  <D.23494>:
  iftmp.19 = 0;
  <D.23495>:
  D.23504 = iftmp.19 != 0;
  D.23505 = (long int) D.23504;
  D.23506 = __builtin_expect (D.23505, 0);
  if (D.23506 != 0) goto <D.23507>; else goto <D.23508>;
  <D.23507>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 886, "(temporary && do_free) || (!temporary && !do_free)");
  <D.23508>:
  D.23510 = class->generic_class;
  if (D.23510 != 0B) goto <D.23511>; else goto <D.23509>;
  <D.23511>:
  if (shared == 0) goto <D.23512>; else goto <D.23509>;
  <D.23512>:
  {
    struct MonoRuntimeGenericContextInfoTemplate oti;
    gboolean tmp_do_free;

    try
      {
        D.23510 = class->generic_class;
        D.23513 = D.23510->container_class;
        oti = class_get_rgctx_template_oti (D.23513, type_argc, slot, 1, 0, &tmp_do_free);
        D.23514 = oti.data;
        if (D.23514 != 0B) goto <D.23515>; else goto <D.23516>;
        <D.23515>:
        {
          void * info;

          info = oti.data;
          D.23510 = class->generic_class;
          D.23517 = &D.23510->context;
          D.23518 = inflate_info (&oti, D.23517, class, temporary);
          oti.data = D.23518;
          tmp_do_free.20 = tmp_do_free;
          if (tmp_do_free.20 != 0) goto <D.23520>; else goto <D.23521>;
          <D.23520>:
          D.23522 = oti.info_type;
          free_inflated_info (D.23522, info);
          <D.23521>:
        }
        <D.23516>:
        if (temporary != 0) goto <D.23523>; else goto <D.23524>;
        <D.23523>:
        *do_free = 1;
        <D.23524>:
        <retval> = oti;
        return <retval>;
      }
    finally
      {
        oti = {CLOBBER};
        tmp_do_free = {CLOBBER};
      }
  }
  <D.23509>:
  {
    struct MonoRuntimeGenericContextTemplate * template;
    struct MonoRuntimeGenericContextInfoTemplate * oti;

    template = mono_class_get_runtime_generic_context_template (class);
    slot.21 = (int) slot;
    oti = rgctx_template_get_other_slot (template, type_argc, slot.21);
    D.23526 = oti == 0B;
    D.23527 = (long int) D.23526;
    D.23528 = __builtin_expect (D.23527, 0);
    if (D.23528 != 0) goto <D.23529>; else goto <D.23530>;
    <D.23529>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 912, "oti");
    <D.23530>:
    if (temporary != 0) goto <D.23531>; else goto <D.23532>;
    <D.23531>:
    *do_free = 0;
    <D.23532>:
    <retval> = *oti;
    return <retval>;
  }
}


rgctx_template_get_other_slot (struct MonoRuntimeGenericContextTemplate * template, int type_argc, int slot)
{
  _Bool D.23535;
  long int D.23536;
  long int D.23537;
  struct MonoRuntimeGenericContextInfoTemplate * D.23542;
  int i;
  struct MonoRuntimeGenericContextInfoTemplate * oti;

  D.23535 = slot < 0;
  D.23536 = (long int) D.23535;
  D.23537 = __builtin_expect (D.23536, 0);
  if (D.23537 != 0) goto <D.23538>; else goto <D.23539>;
  <D.23538>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 189, "slot >= 0");
  <D.23539>:
  oti = get_info_templates (template, type_argc);
  i = 0;
  goto <D.22326>;
  <D.22325>:
  if (oti == 0B) goto <D.23540>; else goto <D.23541>;
  <D.23540>:
  D.23542 = 0B;
  return D.23542;
  <D.23541>:
  oti = oti->next;
  i = i + 1;
  <D.22326>:
  if (i < slot) goto <D.22325>; else goto <D.22327>;
  <D.22327>:
  D.23542 = oti;
  return D.23542;
}


rgctx_template_set_slot (struct MonoImage * image, struct MonoRuntimeGenericContextTemplate * template, int type_argc, int slot, void * data, MonoRgctxInfoType info_type)
{
  struct MonoRuntimeGenericContextInfoTemplate * list.22;
  int inited.23;
  _Bool D.23548;
  long int D.23549;
  long int D.23550;
  _Bool D.23553;
  long int D.23554;
  long int D.23555;
  struct MonoRuntimeGenericContextInfoTemplate * D.23560;
  struct MonoRuntimeGenericContextInfoTemplate * D.23563;
  void * D.23564;
  _Bool D.23565;
  long int D.23566;
  long int D.23567;
  struct MonoRuntimeGenericContextInfoTemplate * list.24;
  struct MonoClass * D.23571;
  struct MonoType * D.23572;
  int num_markers.25;
  int num_markers.26;
  int num_data.27;
  int num_data.28;
  static gboolean inited = 0;
  static int num_markers = 0;
  static int num_data = 0;
  int i;
  struct MonoRuntimeGenericContextInfoTemplate * list;
  struct MonoRuntimeGenericContextInfoTemplate * * oti;

  try
    {
      list.22 = get_info_templates (template, type_argc);
      list = list.22;
      oti = &list;
      inited.23 = inited;
      if (inited.23 == 0) goto <D.23546>; else goto <D.23547>;
      <D.23546>:
      mono_counters_register ("RGCTX oti num markers", 2048, &num_markers);
      mono_counters_register ("RGCTX oti num data", 2048, &num_data);
      inited = 1;
      <D.23547>:
      D.23548 = slot < 0;
      D.23549 = (long int) D.23548;
      D.23550 = __builtin_expect (D.23549, 0);
      if (D.23550 != 0) goto <D.23551>; else goto <D.23552>;
      <D.23551>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 414, "slot >= 0");
      <D.23552>:
      D.23553 = data == 0B;
      D.23554 = (long int) D.23553;
      D.23555 = __builtin_expect (D.23554, 0);
      if (D.23555 != 0) goto <D.23556>; else goto <D.23557>;
      <D.23556>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 415, "data");
      <D.23557>:
      i = 0;
      goto <D.22403>;
      <D.22402>:
      if (i > 0) goto <D.23558>; else goto <D.23559>;
      <D.23558>:
      D.23560 = *oti;
      oti = &D.23560->next;
      <D.23559>:
      D.23560 = *oti;
      if (D.23560 == 0B) goto <D.23561>; else goto <D.23562>;
      <D.23561>:
      D.23563 = alloc_oti (image);
      *oti = D.23563;
      <D.23562>:
      i = i + 1;
      <D.22403>:
      if (i <= slot) goto <D.22402>; else goto <D.22404>;
      <D.22404>:
      D.23560 = *oti;
      D.23564 = D.23560->data;
      D.23565 = D.23564 != 0B;
      D.23566 = (long int) D.23565;
      D.23567 = __builtin_expect (D.23566, 0);
      if (D.23567 != 0) goto <D.23568>; else goto <D.23569>;
      <D.23568>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 426, "!(*oti)->data");
      <D.23569>:
      D.23560 = *oti;
      D.23560->data = data;
      D.23560 = *oti;
      D.23560->info_type = info_type;
      list.24 = list;
      set_info_templates (image, template, type_argc, list.24);
      D.23571 = mono_defaults.object_class;
      D.23572 = &D.23571->byval_arg;
      if (D.23572 == data) goto <D.23573>; else goto <D.23574>;
      <D.23573>:
      num_markers.25 = num_markers;
      num_markers.26 = num_markers.25 + 1;
      num_markers = num_markers.26;
      goto <D.23577>;
      <D.23574>:
      num_data.27 = num_data;
      num_data.28 = num_data.27 + 1;
      num_data = num_data.28;
      <D.23577>:
    }
  finally
    {
      list = {CLOBBER};
    }
}


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

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


set_info_templates (struct MonoImage * image, struct MonoRuntimeGenericContextTemplate * template, int type_argc, struct MonoRuntimeGenericContextInfoTemplate * oti)
{
  _Bool D.23590;
  long int D.23591;
  long int D.23592;
  struct GSList * D.23598;
  unsigned int D.23599;
  struct GSList * D.23600;
  int D.23601;
  unsigned int D.23602;
  _Bool D.23603;
  long int D.23604;
  long int D.23605;

  D.23590 = type_argc < 0;
  D.23591 = (long int) D.23590;
  D.23592 = __builtin_expect (D.23591, 0);
  if (D.23592 != 0) goto <D.23593>; else goto <D.23594>;
  <D.23593>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 152, "type_argc >= 0");
  <D.23594>:
  if (type_argc == 0) goto <D.23595>; else goto <D.23596>;
  <D.23595>:
  template->infos = oti;
  goto <D.23597>;
  <D.23596>:
  {
    int length;
    struct GSList * list;

    D.23598 = template->method_templates;
    D.23599 = monoeg_g_slist_length (D.23598);
    length = (int) D.23599;
    goto <D.22313>;
    <D.22312>:
    D.23598 = template->method_templates;
    D.23600 = g_slist_append_image (image, D.23598, 0B);
    template->method_templates = D.23600;
    length = length + 1;
    <D.22313>:
    if (length < type_argc) goto <D.22312>; else goto <D.22314>;
    <D.22314>:
    D.23601 = type_argc + -1;
    D.23602 = (unsigned int) D.23601;
    D.23598 = template->method_templates;
    list = monoeg_g_slist_nth (D.23598, D.23602);
    D.23603 = list == 0B;
    D.23604 = (long int) D.23603;
    D.23605 = __builtin_expect (D.23604, 0);
    if (D.23605 != 0) goto <D.23606>; else goto <D.23607>;
    <D.23606>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 166, "list");
    <D.23607>:
    list->data = oti;
  }
  <D.23597>:
}


class_lookup_rgctx_template (struct MonoClass * class)
{
  struct MonoImage * D.23608;
  struct GHashTable * D.23609;
  struct MonoRuntimeGenericContextTemplate * D.23612;
  struct MonoRuntimeGenericContextTemplate * template;

  D.23608 = class->image;
  D.23609 = D.23608->rgctx_template_hash;
  if (D.23609 == 0B) goto <D.23610>; else goto <D.23611>;
  <D.23610>:
  D.23612 = 0B;
  return D.23612;
  <D.23611>:
  D.23608 = class->image;
  D.23609 = D.23608->rgctx_template_hash;
  template = monoeg_g_hash_table_lookup (D.23609, class);
  D.23612 = template;
  return D.23612;
}


class_set_rgctx_template (struct MonoClass * class, struct MonoRuntimeGenericContextTemplate * rgctx_template)
{
  struct MonoImage * D.23614;
  struct GHashTable * D.23615;
  struct GHashTable * D.23618;

  D.23614 = class->image;
  D.23615 = D.23614->rgctx_template_hash;
  if (D.23615 == 0B) goto <D.23616>; else goto <D.23617>;
  <D.23616>:
  D.23614 = class->image;
  D.23618 = monoeg_g_hash_table_new (mono_aligned_addr_hash, 0B);
  D.23614->rgctx_template_hash = D.23618;
  <D.23617>:
  D.23614 = class->image;
  D.23615 = D.23614->rgctx_template_hash;
  monoeg_g_hash_table_insert_replace (D.23615, class, rgctx_template, 0);
}


register_generic_subclass (struct MonoClass * class)
{
  _Bool D.23619;
  long int D.23620;
  long int D.23621;
  struct MonoGenericClass * D.23624;
  struct GHashTable * generic_subclass_hash.35;
  struct GHashTable * generic_subclass_hash.36;
  struct MonoClass * parent;
  struct MonoClass * subclass;
  struct MonoRuntimeGenericContextTemplate * rgctx_template;

  parent = class->parent;
  rgctx_template = class_lookup_rgctx_template (class);
  D.23619 = rgctx_template == 0B;
  D.23620 = (long int) D.23619;
  D.23621 = __builtin_expect (D.23620, 0);
  if (D.23621 != 0) goto <D.23622>; else goto <D.23623>;
  <D.23622>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 260, "rgctx_template");
  <D.23623>:
  D.23624 = parent->generic_class;
  if (D.23624 != 0B) goto <D.23625>; else goto <D.23626>;
  <D.23625>:
  D.23624 = parent->generic_class;
  parent = D.23624->container_class;
  <D.23626>:
  generic_subclass_hash.35 = generic_subclass_hash;
  if (generic_subclass_hash.35 == 0B) goto <D.23628>; else goto <D.23629>;
  <D.23628>:
  generic_subclass_hash.36 = monoeg_g_hash_table_new (mono_aligned_addr_hash, 0B);
  generic_subclass_hash = generic_subclass_hash.36;
  <D.23629>:
  generic_subclass_hash.35 = generic_subclass_hash;
  subclass = monoeg_g_hash_table_lookup (generic_subclass_hash.35, parent);
  rgctx_template->next_subclass = subclass;
  generic_subclass_hash.35 = generic_subclass_hash;
  monoeg_g_hash_table_insert_replace (generic_subclass_hash.35, parent, class, 0);
}


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

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


class_uninstantiated (struct MonoClass * class)
{
  struct MonoGenericClass * D.23633;
  struct MonoClass * D.23636;

  D.23633 = class->generic_class;
  if (D.23633 != 0B) goto <D.23634>; else goto <D.23635>;
  <D.23634>:
  D.23633 = class->generic_class;
  D.23636 = D.23633->container_class;
  return D.23636;
  <D.23635>:
  D.23636 = class;
  return D.23636;
}


info_has_identity (MonoRgctxInfoType info_type)
{
  int D.23638;
  _Bool D.23639;

  D.23639 = info_type != 12;
  D.23638 = (int) D.23639;
  return D.23638;
}


get_info_templates (struct MonoRuntimeGenericContextTemplate * template, int type_argc)
{
  _Bool D.23641;
  long int D.23642;
  long int D.23643;
  struct MonoRuntimeGenericContextInfoTemplate * D.23648;
  int D.23649;
  unsigned int D.23650;
  struct GSList * D.23651;

  D.23641 = type_argc < 0;
  D.23642 = (long int) D.23641;
  D.23643 = __builtin_expect (D.23642, 0);
  if (D.23643 != 0) goto <D.23644>; else goto <D.23645>;
  <D.23644>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 139, "type_argc >= 0");
  <D.23645>:
  if (type_argc == 0) goto <D.23646>; else goto <D.23647>;
  <D.23646>:
  D.23648 = template->infos;
  return D.23648;
  <D.23647>:
  D.23649 = type_argc + -1;
  D.23650 = (unsigned int) D.23649;
  D.23651 = template->method_templates;
  D.23648 = monoeg_g_slist_nth_data (D.23651, D.23650);
  return D.23648;
}


inflate_info (struct MonoRuntimeGenericContextInfoTemplate * oti, struct MonoGenericContext * context, struct MonoClass * class, gboolean temporary)
{
  _Bool D.23653;
  long int D.23654;
  long int D.23655;
  struct MonoClass * D.23658;
  struct MonoType * D.23659;
  void * D.23662;
  struct MonoImage * iftmp.37;
  int D.23667;
  _Bool D.23668;
  long int D.23669;
  long int D.23670;
  struct MonoClass * D.23673;
  struct MonoType * D.23674;
  unsigned char D.23675;
  unsigned char D.23676;
  _Bool D.23677;
  long int D.23678;
  long int D.23679;
  unsigned char D.23682;
  _Bool D.23683;
  _Bool D.23684;
  _Bool D.23685;
  struct MonoMethodSignature * D.23688;
  const char * D.23689;
  struct MonoClass * D.23691;
  _Bool D.23692;
  long int D.23693;
  long int D.23694;
  struct GPtrArray * D.23697;
  struct GPtrArray * D.23698;
  void * * D.23699;
  long unsigned int D.23700;
  long unsigned int D.23701;
  void * * D.23702;
  void * D.23703;
  struct GPtrArray * D.23704;
  unsigned int i.38;
  unsigned int D.23706;
  struct MonoClass * D.23707;
  struct MonoType * D.23708;
  struct MonoMethodSignature * D.23709;
  unsigned char D.23710;
  unsigned char D.23711;
  _Bool D.23712;
  long int D.23713;
  long int D.23714;
  unsigned char D.23717;
  _Bool D.23718;
  _Bool D.23719;
  _Bool D.23720;
  struct MonoMethodSignature * D.23723;
  const char * D.23724;
  struct MonoClass * D.23726;
  _Bool D.23727;
  long int D.23728;
  long int D.23729;
  struct MonoClass * D.23732;
  struct MonoType * D.23733;
  long int field.39;
  struct MonoClassField * D.23735;
  long int D.23736;
  long int D.23737;
  long int D.23738;
  struct MonoClassField * D.23739;
  _Bool D.23740;
  long int D.23741;
  long int D.23742;
  long unsigned int D.23745;
  long unsigned int D.23746;
  int D.23747;
  _Bool D.23748;
  long int D.23749;
  long int D.23750;
  void * data;
  MonoRgctxInfoType info_type;
  struct MonoError error;

  try
    {
      data = oti->data;
      info_type = oti->info_type;
      D.23653 = data == 0B;
      D.23654 = (long int) D.23653;
      D.23655 = __builtin_expect (D.23654, 0);
      if (D.23655 != 0) goto <D.23656>; else goto <D.23657>;
      <D.23656>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 519, "data");
      <D.23657>:
      D.23658 = mono_defaults.object_class;
      D.23659 = &D.23658->byval_arg;
      if (D.23659 == data) goto <D.23660>; else goto <D.23661>;
      <D.23660>:
      D.23658 = mono_defaults.object_class;
      D.23662 = &D.23658->byval_arg;
      return D.23662;
      <D.23661>:
      switch (info_type) <default: <D.22482>, case 0: <D.22429>, case 1: <D.22430>, case 2: <D.22431>, case 3: <D.22432>, case 4: <D.22433>, case 5: <D.22444>, case 6: <D.22445>, case 7: <D.22471>, case 8: <D.22446>, case 9: <D.22447>, case 10: <D.22448>, case 11: <D.22449>, case 12: <D.22434>, case 13: <D.22435>, case 14: <D.22436>, case 15: <D.22472>, case 16: <D.22463>, case 17: <D.22464>, case 18: <D.22478>, case 19: <D.22437>, case 20: <D.22454>, case 21: <D.22440>, case 22: <D.22438>, case 23: <D.22439>, case 24: <D.22441>, case 25: <D.22442>>
      <D.22429>:
      <D.22430>:
      <D.22431>:
      <D.22432>:
      <D.22433>:
      <D.22434>:
      <D.22435>:
      <D.22436>:
      <D.22437>:
      <D.22438>:
      <D.22439>:
      <D.22440>:
      <D.22441>:
      <D.22442>:
      {
        void * result;

        if (temporary == 0) goto <D.23664>; else goto <D.23665>;
        <D.23664>:
        iftmp.37 = class->image;
        goto <D.23666>;
        <D.23665>:
        iftmp.37 = 0B;
        <D.23666>:
        result = mono_class_inflate_generic_type_with_mempool (iftmp.37, data, context, &error);
        D.23667 = mono_error_ok (&error);
        D.23668 = D.23667 == 0;
        D.23669 = (long int) D.23668;
        D.23670 = __builtin_expect (D.23669, 0);
        if (D.23670 != 0) goto <D.23671>; else goto <D.23672>;
        <D.23671>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 542, "mono_error_ok (&error)");
        <D.23672>:
        D.23662 = result;
        return D.23662;
      }
      <D.22444>:
      <D.22445>:
      <D.22446>:
      <D.22447>:
      <D.22448>:
      <D.22449>:
      {
        struct MonoMethod * method;
        struct MonoMethod * inflated_method;
        struct MonoType * inflated_type;
        struct MonoClass * inflated_class;

        method = data;
        D.23673 = method->klass;
        D.23674 = &D.23673->byval_arg;
        inflated_type = mono_class_inflate_generic_type (D.23674, context);
        inflated_class = mono_class_from_mono_type (inflated_type);
        mono_metadata_free_type (inflated_type);
        mono_class_init (inflated_class);
        D.23675 = BIT_FIELD_REF <*method, 8, 256>;
        D.23676 = D.23675 & 124;
        D.23677 = D.23676 != 0;
        D.23678 = (long int) D.23677;
        D.23679 = __builtin_expect (D.23678, 0);
        if (D.23679 != 0) goto <D.23680>; else goto <D.23681>;
        <D.23680>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 561, "!method->wrapper_type");
        <D.23681>:
        D.23682 = inflated_class->byval_arg.type;
        D.23683 = D.23682 == 20;
        D.23684 = D.23682 == 29;
        D.23685 = D.23683 | D.23684;
        if (D.23685 != 0) goto <D.23686>; else goto <D.23687>;
        <D.23686>:
        D.23688 = method->signature;
        D.23689 = method->name;
        inflated_method = mono_method_search_in_array_class (inflated_class, D.23689, D.23688);
        goto <D.23690>;
        <D.23687>:
        inflated_method = mono_class_inflate_generic_method (method, context);
        <D.23690>:
        D.23691 = inflated_method->klass;
        mono_class_init (D.23691);
        D.23691 = inflated_method->klass;
        D.23692 = D.23691 != inflated_class;
        D.23693 = (long int) D.23692;
        D.23694 = __builtin_expect (D.23693, 0);
        if (D.23694 != 0) goto <D.23695>; else goto <D.23696>;
        <D.23695>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 571, "inflated_method->klass == inflated_class");
        <D.23696>:
        D.23662 = inflated_method;
        return D.23662;
      }
      <D.22454>:
      {
        struct MonoGSharedVtMethodInfo * info;
        struct MonoGSharedVtMethodInfo * res;
        int i;

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

          D.23698 = info->entries;
          D.23699 = D.23698->pdata;
          D.23700 = (long unsigned int) i;
          D.23701 = D.23700 * 8;
          D.23702 = D.23699 + D.23701;
          otemplate = *D.23702;
          template = monoeg_malloc0 (24);
          memcpy (template, otemplate, 24);
          D.23703 = inflate_info (template, context, class, 0);
          template->data = D.23703;
          D.23704 = res->entries;
          monoeg_g_ptr_array_add (D.23704, template);
        }
        i = i + 1;
        <D.22461>:
        i.38 = (unsigned int) i;
        D.23698 = info->entries;
        D.23706 = D.23698->len;
        if (i.38 < D.23706) goto <D.22460>; else goto <D.22462>;
        <D.22462>:
        D.23662 = res;
        return D.23662;
      }
      <D.22463>:
      <D.22464>:
      {
        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.23707 = method->klass;
        D.23708 = &D.23707->byval_arg;
        inflated_type = mono_class_inflate_generic_type (D.23708, context);
        inflated_class = mono_class_from_mono_type (inflated_type);
        res = monoeg_malloc0 (16);
        D.23709 = info->sig;
        res->sig = D.23709;
        mono_metadata_free_type (inflated_type);
        mono_class_init (inflated_class);
        D.23710 = BIT_FIELD_REF <*method, 8, 256>;
        D.23711 = D.23710 & 124;
        D.23712 = D.23711 != 0;
        D.23713 = (long int) D.23712;
        D.23714 = __builtin_expect (D.23713, 0);
        if (D.23714 != 0) goto <D.23715>; else goto <D.23716>;
        <D.23715>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 616, "!method->wrapper_type");
        <D.23716>:
        D.23717 = inflated_class->byval_arg.type;
        D.23718 = D.23717 == 20;
        D.23719 = D.23717 == 29;
        D.23720 = D.23718 | D.23719;
        if (D.23720 != 0) goto <D.23721>; else goto <D.23722>;
        <D.23721>:
        D.23723 = method->signature;
        D.23724 = method->name;
        inflated_method = mono_method_search_in_array_class (inflated_class, D.23724, D.23723);
        goto <D.23725>;
        <D.23722>:
        inflated_method = mono_class_inflate_generic_method (method, context);
        <D.23725>:
        D.23726 = inflated_method->klass;
        mono_class_init (D.23726);
        D.23726 = inflated_method->klass;
        D.23727 = D.23726 != inflated_class;
        D.23728 = (long int) D.23727;
        D.23729 = __builtin_expect (D.23728, 0);
        if (D.23729 != 0) goto <D.23730>; else goto <D.23731>;
        <D.23730>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 626, "inflated_method->klass == inflated_class");
        <D.23731>:
        res->method = inflated_method;
        D.23662 = res;
        return D.23662;
      }
      <D.22471>:
      <D.22472>:
      {
        struct MonoClassField * field;
        struct MonoType * inflated_type;
        struct MonoClass * inflated_class;
        int i;
        void * dummy;

        try
          {
            field = data;
            D.23732 = field->parent;
            D.23733 = &D.23732->byval_arg;
            inflated_type = mono_class_inflate_generic_type (D.23733, context);
            inflated_class = mono_class_from_mono_type (inflated_type);
            field.39 = (long int) field;
            D.23732 = field->parent;
            D.23735 = D.23732->fields;
            D.23736 = (long int) D.23735;
            D.23737 = field.39 - D.23736;
            D.23738 = D.23737 /[ex] 32;
            i = (int) D.23738;
            dummy = 0B;
            mono_metadata_free_type (inflated_type);
            mono_class_get_fields (inflated_class, &dummy);
            D.23739 = inflated_class->fields;
            D.23740 = D.23739 == 0B;
            D.23741 = (long int) D.23740;
            D.23742 = __builtin_expect (D.23741, 0);
            if (D.23742 != 0) goto <D.23743>; else goto <D.23744>;
            <D.23743>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 643, "inflated_class->fields");
            <D.23744>:
            D.23739 = inflated_class->fields;
            D.23745 = (long unsigned int) i;
            D.23746 = D.23745 * 32;
            D.23662 = D.23739 + D.23746;
            return D.23662;
          }
        finally
          {
            dummy = {CLOBBER};
          }
      }
      <D.22478>:
      {
        struct MonoMethodSignature * sig;
        struct MonoMethodSignature * isig;
        struct MonoError error;

        try
          {
            sig = data;
            isig = mono_inflate_generic_signature (sig, context, &error);
            D.23747 = mono_error_ok (&error);
            D.23748 = D.23747 == 0;
            D.23749 = (long int) D.23748;
            D.23750 = __builtin_expect (D.23749, 0);
            if (D.23750 != 0) goto <D.23751>; else goto <D.23752>;
            <D.23751>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 653, "mono_error_ok (&error)");
            <D.23752>:
            D.23662 = isig;
            return D.23662;
          }
        finally
          {
            error = {CLOBBER};
          }
      }
      <D.22482>:
      monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 658);
      D.23662 = 0B;
      return D.23662;
    }
  finally
    {
      error = {CLOBBER};
    }
}


info_equal (void * data1, void * data2, MonoRgctxInfoType info_type)
{
  gboolean D.23757;
  struct MonoClass * D.23758;
  struct MonoClass * D.23759;
  _Bool D.23760;
  _Bool D.23761;

  switch (info_type) <default: <D.22832>, case 0: <D.22807>, case 1: <D.22808>, case 2: <D.22809>, case 3: <D.22810>, case 4: <D.22811>, case 5: <D.22820>, case 6: <D.22822>, case 7: <D.22823>, case 8: <D.22825>, case 9: <D.22826>, case 10: <D.22827>, case 11: <D.22828>, case 12: <D.22812>, case 13: <D.22813>, case 14: <D.22814>, case 15: <D.22824>, case 16: <D.22829>, case 17: <D.22830>, case 18: <D.22831>, case 19: <D.22815>, case 20: <D.22821>, case 22: <D.22816>, case 23: <D.22817>, case 24: <D.22818>, case 25: <D.22819>>
  <D.22807>:
  <D.22808>:
  <D.22809>:
  <D.22810>:
  <D.22811>:
  <D.22812>:
  <D.22813>:
  <D.22814>:
  <D.22815>:
  <D.22816>:
  <D.22817>:
  <D.22818>:
  <D.22819>:
  D.23758 = mono_class_from_mono_type (data1);
  D.23759 = mono_class_from_mono_type (data2);
  D.23760 = D.23758 == D.23759;
  D.23757 = (gboolean) D.23760;
  return D.23757;
  <D.22820>:
  <D.22821>:
  <D.22822>:
  <D.22823>:
  <D.22824>:
  <D.22825>:
  <D.22826>:
  <D.22827>:
  <D.22828>:
  <D.22829>:
  <D.22830>:
  <D.22831>:
  D.23761 = data1 == data2;
  D.23757 = (gboolean) D.23761;
  return D.23757;
  <D.22832>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1644);
  D.23757 = 0;
  return D.23757;
}


free_inflated_info (MonoRgctxInfoType info_type, void * info)
{
  if (info == 0B) goto <D.23763>; else goto <D.23764>;
  <D.23763>:
  return;
  <D.23764>:
  switch (info_type) <default: <D.22494>, case 0: <D.22487>, case 1: <D.22488>, case 2: <D.22489>, case 3: <D.22490>, case 4: <D.22491>, case 12: <D.22492>>
  <D.22487>:
  <D.22488>:
  <D.22489>:
  <D.22490>:
  <D.22491>:
  <D.22492>:
  mono_metadata_free_type (info);
  goto <D.22493>;
  <D.22494>:
  goto <D.22493>;
  <D.22493>:
}


register_info (struct MonoClass * class, int type_argc, void * data, MonoRgctxInfoType info_type)
{
  void * D.23767;
  struct MonoGenericClass * D.23769;
  void * D.23774;
  struct MonoClass * D.23776;
  struct MonoType * D.23777;
  struct MonoImage * D.23778;
  int D.23779;
  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.22796>;
  <D.22795>:
  D.23767 = oti->data;
  if (D.23767 == 0B) goto <D.22794>; else goto <D.23768>;
  <D.23768>:
  i = i + 1;
  oti = oti->next;
  <D.22796>:
  if (oti != 0B) goto <D.22795>; else goto <D.22794>;
  <D.22794>:
  parent = class->parent;
  goto <D.22801>;
  <D.22800>:
  {
    struct MonoRuntimeGenericContextTemplate * parent_template;
    struct MonoRuntimeGenericContextInfoTemplate * oti;

    D.23769 = parent->generic_class;
    if (D.23769 != 0B) goto <D.23770>; else goto <D.23771>;
    <D.23770>:
    D.23769 = parent->generic_class;
    parent = D.23769->container_class;
    <D.23771>:
    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.23772>; else goto <D.23773>;
    <D.23772>:
    D.23774 = oti->data;
    if (D.23774 != 0B) goto <D.22799>; else goto <D.23775>;
    <D.23775>:
    <D.23773>:
    D.23776 = mono_defaults.object_class;
    D.23777 = &D.23776->byval_arg;
    D.23778 = parent->image;
    rgctx_template_set_slot (D.23778, parent_template, type_argc, i, D.23777, 0);
    parent = parent->parent;
  }
  <D.22801>:
  if (parent != 0B) goto <D.22800>; else goto <D.22799>;
  <D.22799>:
  fill_in_rgctx_template_slot (class, type_argc, i, data, info_type);
  D.23779 = i;
  return D.23779;
}


fill_in_rgctx_template_slot (struct MonoClass * class, int type_argc, int index, void * data, MonoRgctxInfoType info_type)
{
  struct MonoImage * D.23781;
  struct GHashTable * generic_subclass_hash.40;
  _Bool D.23786;
  long int D.23787;
  long int D.23788;
  unsigned int index.41;
  struct MonoClass * D.23792;
  void * D.23793;
  _Bool D.23794;
  long int D.23795;
  long int D.23796;
  struct MonoRuntimeGenericContextTemplate * template;
  struct MonoClass * subclass;

  template = mono_class_get_runtime_generic_context_template (class);
  D.23781 = class->image;
  rgctx_template_set_slot (D.23781, template, type_argc, index, data, info_type);
  generic_subclass_hash.40 = generic_subclass_hash;
  if (generic_subclass_hash.40 != 0B) goto <D.23783>; else goto <D.23784>;
  <D.23783>:
  generic_subclass_hash.40 = generic_subclass_hash;
  subclass = monoeg_g_hash_table_lookup (generic_subclass_hash.40, class);
  goto <D.23785>;
  <D.23784>:
  subclass = 0B;
  <D.23785>:
  goto <D.22747>;
  <D.22746>:
  {
    struct MonoRuntimeGenericContextInfoTemplate subclass_oti;
    struct MonoRuntimeGenericContextTemplate * subclass_template;

    try
      {
        subclass_template = class_lookup_rgctx_template (subclass);
        D.23786 = subclass_template == 0B;
        D.23787 = (long int) D.23786;
        D.23788 = __builtin_expect (D.23787, 0);
        if (D.23788 != 0) goto <D.23789>; else goto <D.23790>;
        <D.23789>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1509, "subclass_template");
        <D.23790>:
        index.41 = (unsigned int) index;
        D.23792 = subclass->parent;
        subclass_oti = class_get_rgctx_template_oti (D.23792, type_argc, index.41, 0, 0, 0B); [return slot optimization]
        D.23793 = subclass_oti.data;
        D.23794 = D.23793 == 0B;
        D.23795 = (long int) D.23794;
        D.23796 = __builtin_expect (D.23795, 0);
        if (D.23796 != 0) goto <D.23797>; else goto <D.23798>;
        <D.23797>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1512, "subclass_oti.data");
        <D.23798>:
        D.23793 = subclass_oti.data;
        fill_in_rgctx_template_slot (subclass, type_argc, index, D.23793, info_type);
        subclass = subclass_template->next_subclass;
      }
    finally
      {
        subclass_oti = {CLOBBER};
      }
  }
  <D.22747>:
  if (subclass != 0B) goto <D.22746>; else goto <D.22748>;
  <D.22748>:
}


mono_class_rgctx_get_array_size (int n, gboolean mrgctx)
{
  unsigned int n.42;
  _Bool D.23800;
  long int D.23801;
  long int D.23802;
  int D.23807;

  n.42 = (unsigned int) n;
  D.23800 = n.42 > 29;
  D.23801 = (long int) D.23800;
  D.23802 = __builtin_expect (D.23801, 0);
  if (D.23802 != 0) goto <D.23803>; else goto <D.23804>;
  <D.23803>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1784, "n >= 0 && n < 30");
  <D.23804>:
  if (mrgctx != 0) goto <D.23805>; else goto <D.23806>;
  <D.23805>:
  D.23807 = 6 << n;
  return D.23807;
  <D.23806>:
  D.23807 = 4 << n;
  return D.23807;
}


mono_class_fill_runtime_generic_context (struct MonoVTable * class_vtable, guint8 * caller, guint32 slot)
{
  union mono_mutex_t * D.23809;
  _Bool D.23812;
  long int D.23813;
  long int D.23814;
  int inited.43;
  int num_alloced.44;
  int num_alloced.45;
  _Bool D.23826;
  long int D.23827;
  long int D.23828;
  void * D.23831;
  static gboolean inited = 0;
  static int num_alloced = 0;
  struct MonoDomain * domain;
  void * * rgctx;
  void * info;

  domain = class_vtable->domain;
  {
    int ret;

    D.23809 = &domain->lock.mutex;
    ret = pthread_mutex_lock (D.23809);
    if (ret != 0) goto <D.23810>; else goto <D.23811>;
    <D.23810>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.23811>:
    D.23812 = ret != 0;
    D.23813 = (long int) D.23812;
    D.23814 = __builtin_expect (D.23813, 0);
    if (D.23814 != 0) goto <D.23815>; else goto <D.23816>;
    <D.23815>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1925, "ret == 0");
    <D.23816>:
  }
  inited.43 = inited;
  if (inited.43 == 0) goto <D.23818>; else goto <D.23819>;
  <D.23818>:
  mono_counters_register ("RGCTX num alloced", 2048, &num_alloced);
  inited = 1;
  <D.23819>:
  rgctx = class_vtable->runtime_generic_context;
  if (rgctx == 0B) goto <D.23820>; else goto <D.23821>;
  <D.23820>:
  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.23821>:
  {
    int ret;

    D.23809 = &domain->lock.mutex;
    ret = pthread_mutex_unlock (D.23809);
    if (ret != 0) goto <D.23824>; else goto <D.23825>;
    <D.23824>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.23825>:
    D.23826 = ret != 0;
    D.23827 = (long int) D.23826;
    D.23828 = __builtin_expect (D.23827, 0);
    if (D.23828 != 0) goto <D.23829>; else goto <D.23830>;
    <D.23829>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1939, "ret == 0");
    <D.23830>:
  }
  info = fill_runtime_generic_context (class_vtable, rgctx, caller, slot, 0B);
  D.23831 = info;
  return D.23831;
}


alloc_rgctx_array (struct MonoDomain * domain, int n, gboolean is_mrgctx)
{
  int D.23833;
  unsigned int D.23834;
  unsigned int D.23835;
  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.23851;
  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.23833 = mono_class_rgctx_get_array_size (n, is_mrgctx);
  D.23834 = (unsigned int) D.23833;
  D.23835 = D.23834 * 8;
  size = (int) D.23835;
  size.46 = (unsigned int) size;
  array = mono_domain_alloc0 (domain, size.46);
  inited.47 = inited;
  if (inited.47 == 0) goto <D.23838>; else goto <D.23839>;
  <D.23838>:
  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.23839>:
  if (is_mrgctx != 0) goto <D.23840>; else goto <D.23841>;
  <D.23840>:
  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.23846>;
  <D.23841>:
  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.23846>:
  D.23851 = array;
  return D.23851;
}


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.23854;
  struct MonoGenericInst * iftmp.57;
  _Bool D.23862;
  long int D.23863;
  long int D.23864;
  union mono_mutex_t * D.23867;
  _Bool D.23870;
  long int D.23871;
  long int D.23872;
  _Bool D.23875;
  int D.23876;
  unsigned int size.58;
  unsigned int D.23880;
  _Bool D.23881;
  _Bool D.23882;
  int D.23886;
  int D.23887;
  unsigned int D.23888;
  unsigned int first_slot.59;
  unsigned int D.23892;
  unsigned int offset.60;
  unsigned int D.23894;
  unsigned int D.23895;
  long unsigned int D.23896;
  long unsigned int D.23897;
  void * * D.23898;
  _Bool D.23903;
  long int D.23904;
  long int D.23905;
  void * D.23908;
  long unsigned int D.23909;
  long unsigned int D.23910;
  void * * D.23911;
  void * D.23912;
  int D.23915;
  void * * D.23916;
  int D.23917;
  void * D.23918;
  _Bool D.23919;
  long int D.23920;
  long int D.23921;
  _Bool D.23926;
  long int D.23927;
  long int D.23928;
  int iftmp.61;
  <unnamed-unsigned:22> D.23934;
  struct MonoClass * D.23936;
  _Bool D.23939;
  long int D.23940;
  long int D.23941;
  _Bool D.23949;
  long int D.23950;
  long int D.23951;
  int do_free.62;
  void * D.23957;
  <unnamed type> D.23958;
  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.23854 = class->generic_class;
      if (D.23854 != 0B) goto <D.23855>; else goto <D.23856>;
      <D.23855>:
      D.23854 = class->generic_class;
      iftmp.56 = &D.23854->context;
      goto <D.23857>;
      <D.23856>:
      iftmp.56 = 0B;
      <D.23857>:
      class_context = iftmp.56;
      if (class_context != 0B) goto <D.23859>; else goto <D.23860>;
      <D.23859>:
      iftmp.57 = class_context->class_inst;
      goto <D.23861>;
      <D.23860>:
      iftmp.57 = 0B;
      <D.23861>:
      context.class_inst = iftmp.57;
      context.method_inst = method_inst;
      D.23862 = rgctx == 0B;
      D.23863 = (long int) D.23862;
      D.23864 = __builtin_expect (D.23863, 0);
      if (D.23864 != 0) goto <D.23865>; else goto <D.23866>;
      <D.23865>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1840, "rgctx");
      <D.23866>:
      {
        int ret;

        D.23867 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23867);
        if (ret != 0) goto <D.23868>; else goto <D.23869>;
        <D.23868>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23869>:
        D.23870 = ret != 0;
        D.23871 = (long int) D.23870;
        D.23872 = __builtin_expect (D.23871, 0);
        if (D.23872 != 0) goto <D.23873>; else goto <D.23874>;
        <D.23873>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1842, "ret == 0");
        <D.23874>:
      }
      first_slot = 0;
      D.23875 = method_inst != 0B;
      D.23876 = (int) D.23875;
      size = mono_class_rgctx_get_array_size (0, D.23876);
      if (method_inst != 0B) goto <D.23877>; else goto <D.23878>;
      <D.23877>:
      size.58 = (unsigned int) size;
      D.23880 = size.58 + 4294967294;
      size = (int) D.23880;
      <D.23878>:
      i = 0;
      <D.22919>:
      {
        int offset;

        D.23875 = method_inst != 0B;
        D.23881 = i == 0;
        D.23882 = D.23875 & D.23881;
        if (D.23882 != 0) goto <D.23883>; else goto <D.23884>;
        <D.23883>:
        offset = 2;
        goto <D.23885>;
        <D.23884>:
        offset = 0;
        <D.23885>:
        D.23886 = first_slot + size;
        D.23887 = D.23886 + -1;
        D.23888 = (unsigned int) D.23887;
        if (D.23888 > slot) goto <D.23889>; else goto <D.23890>;
        <D.23889>:
        first_slot.59 = (unsigned int) first_slot;
        D.23892 = slot - first_slot.59;
        offset.60 = (unsigned int) offset;
        D.23894 = D.23892 + offset.60;
        D.23895 = D.23894 + 1;
        rgctx_index = (int) D.23895;
        D.23896 = (long unsigned int) rgctx_index;
        D.23897 = D.23896 * 8;
        D.23898 = rgctx + D.23897;
        info = *D.23898;
        if (info != 0B) goto <D.23899>; else goto <D.23900>;
        <D.23899>:
        {
          int ret;

          D.23867 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.23867);
          if (ret != 0) goto <D.23901>; else goto <D.23902>;
          <D.23901>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.23902>:
          D.23903 = ret != 0;
          D.23904 = (long int) D.23903;
          D.23905 = __builtin_expect (D.23904, 0);
          if (D.23905 != 0) goto <D.23906>; else goto <D.23907>;
          <D.23906>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1863, "ret == 0");
          <D.23907>:
        }
        D.23908 = info;
        return D.23908;
        <D.23900>:
        goto <D.22918>;
        <D.23890>:
        D.23909 = (long unsigned int) offset;
        D.23910 = D.23909 * 8;
        D.23911 = rgctx + D.23910;
        D.23912 = *D.23911;
        if (D.23912 == 0B) goto <D.23913>; else goto <D.23914>;
        <D.23913>:
        D.23909 = (long unsigned int) offset;
        D.23910 = D.23909 * 8;
        D.23911 = rgctx + D.23910;
        D.23875 = method_inst != 0B;
        D.23876 = (int) D.23875;
        D.23915 = i + 1;
        D.23916 = alloc_rgctx_array (domain, D.23915, D.23876);
        *D.23911 = D.23916;
        <D.23914>:
        D.23909 = (long unsigned int) offset;
        D.23910 = D.23909 * 8;
        D.23911 = rgctx + D.23910;
        rgctx = *D.23911;
        D.23917 = size + -1;
        first_slot = D.23917 + first_slot;
        D.23875 = method_inst != 0B;
        D.23876 = (int) D.23875;
        D.23915 = i + 1;
        size = mono_class_rgctx_get_array_size (D.23915, D.23876);
      }
      i = i + 1;
      goto <D.22919>;
      <D.22918>:
      D.23896 = (long unsigned int) rgctx_index;
      D.23897 = D.23896 * 8;
      D.23898 = rgctx + D.23897;
      D.23918 = *D.23898;
      D.23919 = D.23918 != 0B;
      D.23920 = (long int) D.23919;
      D.23921 = __builtin_expect (D.23920, 0);
      if (D.23921 != 0) goto <D.23922>; else goto <D.23923>;
      <D.23922>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1875, "!rgctx [rgctx_index]");
      <D.23923>:
      {
        int ret;

        D.23867 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23867);
        if (ret != 0) goto <D.23924>; else goto <D.23925>;
        <D.23924>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23925>:
        D.23926 = ret != 0;
        D.23927 = (long int) D.23926;
        D.23928 = __builtin_expect (D.23927, 0);
        if (D.23928 != 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", 1877, "ret == 0");
        <D.23930>:
      }
      if (method_inst != 0B) goto <D.23932>; else goto <D.23933>;
      <D.23932>:
      D.23934 = method_inst->type_argc;
      iftmp.61 = (int) D.23934;
      goto <D.23935>;
      <D.23933>:
      iftmp.61 = 0;
      <D.23935>:
      D.23936 = get_shared_class (class);
      oti = class_get_rgctx_template_oti (D.23936, iftmp.61, slot, 1, 1, &do_free);
      info = instantiate_info (domain, &oti, &context, class, caller);
      {
        int ret;

        D.23867 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23867);
        if (ret != 0) goto <D.23937>; else goto <D.23938>;
        <D.23937>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23938>:
        D.23939 = ret != 0;
        D.23940 = (long int) D.23939;
        D.23941 = __builtin_expect (D.23940, 0);
        if (D.23941 != 0) goto <D.23942>; else goto <D.23943>;
        <D.23942>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1890, "ret == 0");
        <D.23943>:
      }
      D.23896 = (long unsigned int) rgctx_index;
      D.23897 = D.23896 * 8;
      D.23898 = rgctx + D.23897;
      D.23918 = *D.23898;
      if (D.23918 != 0B) goto <D.23944>; else goto <D.23945>;
      <D.23944>:
      D.23896 = (long unsigned int) rgctx_index;
      D.23897 = D.23896 * 8;
      D.23898 = rgctx + D.23897;
      info = *D.23898;
      goto <D.23946>;
      <D.23945>:
      D.23896 = (long unsigned int) rgctx_index;
      D.23897 = D.23896 * 8;
      D.23898 = rgctx + D.23897;
      *D.23898 = info;
      <D.23946>:
      {
        int ret;

        D.23867 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23867);
        if (ret != 0) goto <D.23947>; else goto <D.23948>;
        <D.23947>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23948>:
        D.23949 = ret != 0;
        D.23950 = (long int) D.23949;
        D.23951 = __builtin_expect (D.23950, 0);
        if (D.23951 != 0) goto <D.23952>; else goto <D.23953>;
        <D.23952>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1899, "ret == 0");
        <D.23953>:
      }
      do_free.62 = do_free;
      if (do_free.62 != 0) goto <D.23955>; else goto <D.23956>;
      <D.23955>:
      D.23957 = oti.data;
      D.23958 = oti.info_type;
      free_inflated_info (D.23958, D.23957);
      <D.23956>:
      D.23908 = info;
      return D.23908;
    }
  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.23961;
  void * D.23964;
  <unnamed type> D.23965;
  _Bool D.23966;
  long int D.23967;
  long int D.23968;
  int D.23973;
  struct MonoMethod * D.23974;
  struct MonoClass * D.23976;
  unsigned char D.23977;
  unsigned char D.23978;
  struct MonoType * D.23980;
  short unsigned int D.23981;
  int D.23982;
  int D.23983;
  int D.23985;
  long unsigned int D.23986;
  long unsigned int D.23987;
  unsigned char D.23988;
  unsigned char D.23989;
  _Bool D.23990;
  long int D.23991;
  long int D.23992;
  struct MonoGenericInst * D.23995;
  _Bool D.23996;
  long int D.23997;
  long int D.23998;
  struct MonoClass * D.24001;
  struct MonoException * D.24004;
  unsigned char D.24005;
  unsigned char D.24006;
  _Bool D.24007;
  long int D.24008;
  long int D.24009;
  struct MonoGenericInst * D.24012;
  _Bool D.24013;
  long int D.24014;
  long int D.24015;
  _Bool D.24018;
  long int D.24019;
  long int D.24020;
  void * D.24023;
  struct MonoDomain * D.24024;
  _Bool D.24025;
  long int D.24026;
  long int D.24027;
  _Bool D.24030;
  long int D.24031;
  long int D.24032;
  struct MonoGenericSharingContext * D.24035;
  _Bool D.24036;
  unsigned char D.24037;
  unsigned char D.24038;
  _Bool D.24039;
  long int D.24040;
  long int D.24041;
  struct MonoClass * D.24051;
  struct MonoClass * D.24052;
  struct MonoClass * D.24053;
  int D.22713;
  int iftmp.63;
  int D.22712;
  const char[7] * D.24058;
  unsigned char D.24059;
  int D.24060;
  unsigned char D.24061;
  int D.24062;
  _Bool D.24063;
  _Bool D.24064;
  _Bool D.24065;
  const unsigned char * D.24068;
  unsigned char D.24069;
  int D.24070;
  const unsigned char * D.24071;
  unsigned char D.24072;
  int D.24073;
  _Bool D.24074;
  _Bool D.24075;
  const unsigned char * D.24078;
  unsigned char D.24079;
  int D.24080;
  const unsigned char * D.24081;
  unsigned char D.24082;
  int D.24083;
  _Bool D.24084;
  _Bool D.24085;
  const unsigned char * D.24088;
  unsigned char D.24089;
  int D.24090;
  const unsigned char * D.24091;
  unsigned char D.24092;
  int D.24093;
  const char * D.24095;
  unsigned int D.24097;
  unsigned int D.24098;
  int imt_slot.64;
  int D.24102;
  int D.24104;
  int D.24105;
  unsigned int D.24106;
  unsigned int D.24107;
  void * D.24111;
  struct MonoDomain * D.24112;
  _Bool D.24113;
  long int D.24114;
  long int D.24115;
  _Bool D.24118;
  long int D.24119;
  long int D.24120;
  void * D.24123;
  struct MonoDomain * D.24124;
  _Bool D.24127;
  long int D.24128;
  long int D.24129;
  _Bool D.24132;
  _Bool D.24133;
  _Bool D.24134;
  struct MonoGenericSharingContext * D.24139;
  struct MonoMethodSignature * D.24143;
  struct MonoMethod * D.24147;
  struct MonoGenericSharingContext * D.24148;
  void * D.24149;
  struct GPtrArray * D.24150;
  unsigned int D.24151;
  long unsigned int D.24152;
  long unsigned int D.24153;
  long unsigned int D.24154;
  void * * D.24155;
  long unsigned int D.24156;
  long unsigned int D.24157;
  void * * D.24158;
  <unnamed type> D.24159;
  int align.65;
  unsigned int align.66;
  int D.24164;
  int D.24169;
  int D.24170;
  long int D.24171;
  void * D.24172;
  void * D.24173;
  unsigned int i.67;
  void * data;
  gboolean temporary;

  D.23961 = oti->data;
  if (D.23961 == 0B) goto <D.23962>; else goto <D.23963>;
  <D.23962>:
  D.23964 = 0B;
  return D.23964;
  <D.23963>:
  D.23965 = oti->info_type;
  switch (D.23965) <default: <D.22658>, case 0: <D.22653>, case 1: <D.22654>, case 2: <D.22655>, case 12: <D.22656>>
  <D.22653>:
  <D.22654>:
  <D.22655>:
  <D.22656>:
  temporary = 1;
  goto <D.22657>;
  <D.22658>:
  temporary = 0;
  <D.22657>:
  data = inflate_info (oti, context, class, temporary);
  D.23965 = oti->info_type;
  switch (D.23965) <default: <D.22734>, case 0: <D.22659>, case 1: <D.22660>, case 2: <D.22661>, case 3: <D.22671>, case 4: <D.22672>, case 5: <D.22673>, case 6: <D.22674>, case 7: <D.22678>, case 8: <D.22681>, case 9: <D.22684>, case 10: <D.22676>, case 11: <D.22677>, case 12: <D.22662>, case 13: <D.22663>, case 14: <D.22664>, case 15: <D.22679>, case 16: <D.22692>, case 17: <D.22693>, case 18: <D.22686>, case 19: <D.22665>, case 20: <D.22719>, case 22: <D.22666>, case 23: <D.22667>, case 24: <D.22668>, case 25: <D.22669>>
  <D.22659>:
  <D.22660>:
  <D.22661>:
  <D.22662>:
  <D.22663>:
  <D.22664>:
  <D.22665>:
  <D.22666>:
  <D.22667>:
  <D.22668>:
  <D.22669>:
  {
    struct MonoClass * arg_class;

    arg_class = mono_class_from_mono_type (data);
    D.23965 = oti->info_type;
    free_inflated_info (D.23965, data);
    D.23966 = arg_class == 0B;
    D.23967 = (long int) D.23966;
    D.23968 = __builtin_expect (D.23967, 0);
    if (D.23968 != 0) goto <D.23969>; else goto <D.23970>;
    <D.23969>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1239, "arg_class");
    <D.23970>:
    D.23965 = oti->info_type;
    if (D.23965 == 1) goto <D.23971>; else goto <D.23972>;
    <D.23971>:
    mono_class_compute_gc_descriptor (arg_class);
    <D.23972>:
    D.23965 = oti->info_type;
    D.23964 = class_type_info (domain, arg_class, D.23965);
    return D.23964;
  }
  <D.22671>:
  D.23964 = data;
  return D.23964;
  <D.22672>:
  D.23964 = mono_type_get_object (domain, data);
  return D.23964;
  <D.22673>:
  D.23964 = data;
  return D.23964;
  <D.22674>:
  {
    void * addr;

    addr = mono_compile_method (data);
    D.23973 = mono_method_needs_static_rgctx_invoke (data, 0);
    D.23964 = mini_add_method_trampoline (0B, data, addr, D.23973, 0);
    return D.23964;
  }
  <D.22676>:
  D.23974 = mono_marshal_get_remoting_invoke_with_check (data);
  D.23964 = mono_compile_method (D.23974);
  return D.23964;
  <D.22677>:
  D.23964 = mono_domain_alloc0 (domain, 8);
  return D.23964;
  <D.22678>:
  D.23964 = data;
  return D.23964;
  <D.22679>:
  {
    struct MonoClassField * field;

    field = data;
    D.23976 = field->parent;
    D.23977 = BIT_FIELD_REF <*D.23976, 8, 256>;
    D.23978 = D.23977 & 8;
    if (D.23978 != 0) goto <D.23979>; else goto <D.23975>;
    <D.23979>:
    D.23980 = field->type;
    D.23981 = D.23980->attrs;
    D.23982 = (int) D.23981;
    D.23983 = D.23982 & 16;
    if (D.23983 == 0) goto <D.23984>; else goto <D.23975>;
    <D.23984>:
    D.23985 = field->offset;
    D.23986 = (long unsigned int) D.23985;
    D.23987 = D.23986 + 18446744073709551600;
    D.23964 = (void *) D.23987;
    return D.23964;
    <D.23975>:
    D.23985 = field->offset;
    D.23986 = (long unsigned int) D.23985;
    D.23964 = (void *) D.23986;
    return D.23964;
  }
  <D.22681>:
  {
    struct MonoMethodInflated * method;
    struct MonoVTable * vtable;

    method = data;
    D.23988 = BIT_FIELD_REF <*method, 8, 264>;
    D.23989 = D.23988 & 16;
    D.23990 = D.23989 == 0;
    D.23991 = (long int) D.23990;
    D.23992 = __builtin_expect (D.23991, 0);
    if (D.23992 != 0) goto <D.23993>; else goto <D.23994>;
    <D.23993>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1281, "method->method.method.is_inflated");
    <D.23994>:
    D.23995 = method->context.method_inst;
    D.23996 = D.23995 == 0B;
    D.23997 = (long int) D.23996;
    D.23998 = __builtin_expect (D.23997, 0);
    if (D.23998 != 0) goto <D.23999>; else goto <D.24000>;
    <D.23999>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1282, "method->context.method_inst");
    <D.24000>:
    D.24001 = method->method.method.klass;
    vtable = mono_class_vtable (domain, D.24001);
    if (vtable == 0B) goto <D.24002>; else goto <D.24003>;
    <D.24002>:
    D.24001 = method->method.method.klass;
    D.24004 = mono_class_get_exception_for_failure (D.24001);
    mono_raise_exception (D.24004);
    <D.24003>:
    D.23995 = method->context.method_inst;
    D.23964 = mono_method_lookup_rgctx (vtable, D.23995);
    return D.23964;
  }
  <D.22684>:
  {
    struct MonoMethodInflated * method;

    method = data;
    D.24005 = BIT_FIELD_REF <*method, 8, 264>;
    D.24006 = D.24005 & 16;
    D.24007 = D.24006 == 0;
    D.24008 = (long int) D.24007;
    D.24009 = __builtin_expect (D.24008, 0);
    if (D.24009 != 0) goto <D.24010>; else goto <D.24011>;
    <D.24010>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1293, "method->method.method.is_inflated");
    <D.24011>:
    D.24012 = method->context.method_inst;
    D.24013 = D.24012 == 0B;
    D.24014 = (long int) D.24013;
    D.24015 = __builtin_expect (D.24014, 0);
    if (D.24015 != 0) goto <D.24016>; else goto <D.24017>;
    <D.24016>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1294, "method->context.method_inst");
    <D.24017>:
    D.23964 = method->context.method_inst;
    return D.23964;
  }
  <D.22686>:
  {
    struct MonoMethodSignature * gsig;
    struct MonoMethodSignature * sig;
    void * addr;
    struct MonoJitInfo * caller_ji;
    struct MonoGenericJitInfo * gji;

    gsig = oti->data;
    sig = data;
    D.24018 = caller == 0B;
    D.24019 = (long int) D.24018;
    D.24020 = __builtin_expect (D.24019, 0);
    if (D.24020 != 0) goto <D.24021>; else goto <D.24022>;
    <D.24021>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1310, "caller");
    <D.24022>:
    D.24023 = mono_get_addr_from_ftnptr (caller);
    D.24024 = mono_domain_get ();
    caller_ji = mini_jit_info_table_find (D.24024, D.24023, 0B);
    D.24025 = caller_ji == 0B;
    D.24026 = (long int) D.24025;
    D.24027 = __builtin_expect (D.24026, 0);
    if (D.24027 != 0) goto <D.24028>; else goto <D.24029>;
    <D.24028>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1312, "caller_ji");
    <D.24029>:
    gji = mono_jit_info_get_generic_jit_info (caller_ji);
    D.24030 = gji == 0B;
    D.24031 = (long int) D.24030;
    D.24032 = __builtin_expect (D.24031, 0);
    if (D.24032 != 0) goto <D.24033>; else goto <D.24034>;
    <D.24033>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1314, "gji");
    <D.24034>:
    D.24035 = gji->generic_sharing_context;
    addr = mini_get_gsharedvt_wrapper (0, 0B, sig, gsig, D.24035, -1, 1);
    D.23964 = addr;
    return D.23964;
  }
  <D.22692>:
  <D.22693>:
  {
    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.23965 = oti->info_type;
    D.24036 = D.23965 == 17;
    virtual = (gboolean) D.24036;
    callee_gji = 0B;
    call_sig = call_info->sig;
    method = call_info->method;
    D.24037 = BIT_FIELD_REF <*method, 8, 264>;
    D.24038 = D.24037 & 16;
    D.24039 = D.24038 == 0;
    D.24040 = (long int) D.24039;
    D.24041 = __builtin_expect (D.24040, 0);
    if (D.24041 != 0) goto <D.24042>; else goto <D.24043>;
    <D.24042>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1337, "method->is_inflated");
    <D.24043>:
    if (virtual == 0) goto <D.24044>; else goto <D.24045>;
    <D.24044>:
    addr = mono_compile_method (method);
    goto <D.24046>;
    <D.24045>:
    addr = 0B;
    <D.24046>:
    if (virtual != 0) goto <D.24047>; else goto <D.24048>;
    <D.24047>:
    D.24051 = method->klass;
    D.24052 = D.24051->parent;
    D.24053 = mono_defaults.multicastdelegate_class;
    if (D.24052 == D.24053) goto <D.24054>; else goto <D.24049>;
    <D.24054>:
    {
      size_t __s1_len;
      size_t __s2_len;

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

        __s2 = method->name;
        D.24058 = "Invoke";
        D.24059 = MEM[(const unsigned char *)D.24058];
        D.24060 = (int) D.24059;
        D.24061 = *__s2;
        D.24062 = (int) D.24061;
        __result = D.24060 - D.24062;
        {
          D.24063 = __s2_len != 0;
          D.24064 = __result == 0;
          D.24065 = D.24063 & D.24064;
          if (D.24065 != 0) goto <D.24066>; else goto <D.24067>;
          <D.24066>:
          D.24068 = &MEM[(void *)"Invoke" + 1B];
          D.24069 = *D.24068;
          D.24070 = (int) D.24069;
          D.24071 = __s2 + 1;
          D.24072 = *D.24071;
          D.24073 = (int) D.24072;
          __result = D.24070 - D.24073;
          D.24074 = __s2_len > 1;
          D.24064 = __result == 0;
          D.24075 = D.24074 & D.24064;
          if (D.24075 != 0) goto <D.24076>; else goto <D.24077>;
          <D.24076>:
          D.24078 = &MEM[(void *)"Invoke" + 2B];
          D.24079 = *D.24078;
          D.24080 = (int) D.24079;
          D.24081 = __s2 + 2;
          D.24082 = *D.24081;
          D.24083 = (int) D.24082;
          __result = D.24080 - D.24083;
          D.24084 = __s2_len > 2;
          D.24064 = __result == 0;
          D.24085 = D.24084 & D.24064;
          if (D.24085 != 0) goto <D.24086>; else goto <D.24087>;
          <D.24086>:
          D.24088 = &MEM[(void *)"Invoke" + 3B];
          D.24089 = *D.24088;
          D.24090 = (int) D.24089;
          D.24091 = __s2 + 3;
          D.24092 = *D.24091;
          D.24093 = (int) D.24092;
          __result = D.24090 - D.24093;
          <D.24087>:
          <D.24077>:
          <D.24067>:
        }
        D.22712 = __result;
      }
      iftmp.63 = -D.22712;
      goto <D.24094>;
      <D.24057>:
      D.24095 = method->name;
      iftmp.63 = __builtin_strcmp (D.24095, "Invoke");
      <D.24094>:
      D.22713 = iftmp.63;
    }
    if (D.22713 == 0) goto <D.24096>; else goto <D.24049>;
    <D.24096>:
    vcall_offset = -2;
    goto <D.24050>;
    <D.24049>:
    D.24051 = method->klass;
    D.24097 = D.24051->flags;
    D.24098 = D.24097 & 32;
    if (D.24098 != 0) goto <D.24099>; else goto <D.24100>;
    <D.24099>:
    {
      guint32 imt_slot;

      imt_slot = mono_method_get_imt_slot (method);
      imt_slot.64 = (int) imt_slot;
      D.24102 = imt_slot.64 + -19;
      vcall_offset = D.24102 * 8;
    }
    goto <D.24103>;
    <D.24100>:
    D.24104 = mono_method_get_vtable_index (method);
    D.24105 = D.24104 * 8;
    D.24106 = (unsigned int) D.24105;
    D.24107 = D.24106 + 56;
    vcall_offset = (gint32) D.24107;
    <D.24103>:
    <D.24050>:
    goto <D.24108>;
    <D.24048>:
    vcall_offset = -1;
    <D.24108>:
    D.24018 = caller == 0B;
    D.24019 = (long int) D.24018;
    D.24020 = __builtin_expect (D.24019, 0);
    if (D.24020 != 0) goto <D.24109>; else goto <D.24110>;
    <D.24109>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1364, "caller");
    <D.24110>:
    D.24111 = mono_get_addr_from_ftnptr (caller);
    D.24112 = mono_domain_get ();
    caller_ji = mini_jit_info_table_find (D.24112, D.24111, 0B);
    D.24113 = caller_ji == 0B;
    D.24114 = (long int) D.24113;
    D.24115 = __builtin_expect (D.24114, 0);
    if (D.24115 != 0) goto <D.24116>; else goto <D.24117>;
    <D.24116>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1366, "caller_ji");
    <D.24117>:
    gji = mono_jit_info_get_generic_jit_info (caller_ji);
    D.24118 = gji == 0B;
    D.24119 = (long int) D.24118;
    D.24120 = __builtin_expect (D.24119, 0);
    if (D.24120 != 0) goto <D.24121>; else goto <D.24122>;
    <D.24121>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1368, "gji");
    <D.24122>:
    D.24123 = mono_get_addr_from_ftnptr (addr);
    D.24124 = mono_domain_get ();
    callee_ji = mini_jit_info_table_find (D.24124, D.24123, 0B);
    callee_gsharedvt = ji_is_gsharedvt (callee_ji);
    if (callee_gsharedvt != 0) goto <D.24125>; else goto <D.24126>;
    <D.24125>:
    callee_gji = mono_jit_info_get_generic_jit_info (callee_ji);
    D.24127 = callee_gji == 0B;
    D.24128 = (long int) D.24127;
    D.24129 = __builtin_expect (D.24128, 0);
    if (D.24129 != 0) goto <D.24130>; else goto <D.24131>;
    <D.24130>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1375, "callee_gji");
    <D.24131>:
    <D.24126>:
    D.24132 = virtual != 0;
    D.24133 = callee_gsharedvt == 0;
    D.24134 = D.24132 | D.24133;
    if (D.24134 != 0) goto <D.24135>; else goto <D.24136>;
    <D.24135>:
    {
      struct MonoMethodSignature * sig;
      struct MonoMethodSignature * gsig;

      D.24037 = BIT_FIELD_REF <*method, 8, 264>;
      D.24038 = D.24037 & 16;
      D.24039 = D.24038 == 0;
      D.24040 = (long int) D.24039;
      D.24041 = __builtin_expect (D.24040, 0);
      if (D.24041 != 0) goto <D.24137>; else goto <D.24138>;
      <D.24137>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1392, "method->is_inflated");
      <D.24138>:
      sig = mono_method_signature (method);
      gsig = call_sig;
      D.24139 = gji->generic_sharing_context;
      addr = mini_get_gsharedvt_wrapper (0, addr, sig, gsig, D.24139, vcall_offset, 0);
    }
    goto <D.24140>;
    <D.24136>:
    if (callee_gsharedvt != 0) goto <D.24141>; else goto <D.24142>;
    <D.24141>:
    {
      struct MonoMethodSignature * sig;
      struct MonoMethodSignature * gsig;

      D.24143 = mono_method_signature (method);
      if (D.24143 == call_sig) goto <D.24144>; else goto <D.24145>;
      <D.24144>:
      goto <D.24146>;
      <D.24145>:
      sig = mono_method_signature (method);
      D.24147 = jinfo_get_method (callee_ji);
      gsig = mono_method_signature (D.24147);
      D.24148 = callee_gji->generic_sharing_context;
      D.24149 = callee_ji->code_start;
      addr = mini_get_gsharedvt_wrapper (1, D.24149, sig, gsig, D.24148, -1, 0);
      sig = mono_method_signature (method);
      gsig = call_sig;
      D.24139 = gji->generic_sharing_context;
      addr = mini_get_gsharedvt_wrapper (0, addr, sig, gsig, D.24139, -1, 0);
      <D.24146>:
    }
    <D.24142>:
    <D.24140>:
    D.23964 = addr;
    return D.23964;
  }
  <D.22719>:
  {
    struct MonoGSharedVtMethodInfo * info;
    struct MonoGSharedVtMethodRuntimeInfo * res;
    struct MonoType * t;
    int i;
    int offset;
    int align;
    int size;

    try
      {
        info = data;
        D.24150 = info->entries;
        D.24151 = D.24150->len;
        D.24152 = (long unsigned int) D.24151;
        D.24153 = D.24152 + 1;
        D.24154 = D.24153 * 8;
        res = monoeg_malloc0 (D.24154);
        offset = 0;
        i = 0;
        goto <D.22732>;
        <D.22731>:
        {
          struct MonoRuntimeGenericContextInfoTemplate * template;

          D.24150 = info->entries;
          D.24155 = D.24150->pdata;
          D.24156 = (long unsigned int) i;
          D.24157 = D.24156 * 8;
          D.24158 = D.24155 + D.24157;
          template = *D.24158;
          D.24159 = template->info_type;
          switch (D.24159) <default: <D.22730>, case 21: <D.22728>>
          <D.22728>:
          t = template->data;
          size = mono_type_size (t, &align);
          align.65 = align;
          align.66 = (unsigned int) align.65;
          if (align.66 <= 7) goto <D.24162>; else goto <D.24163>;
          <D.24162>:
          align = 8;
          <D.24163>:
          D.24164 = mono_type_is_struct (t);
          if (D.24164 != 0) goto <D.24165>; else goto <D.24166>;
          <D.24165>:
          align.65 = align;
          align.66 = (unsigned int) align.65;
          if (align.66 <= 15) goto <D.24167>; else goto <D.24168>;
          <D.24167>:
          align = 16;
          <D.24168>:
          <D.24166>:
          align.65 = align;
          D.24169 = align.65 + -1;
          offset = D.24169 + offset;
          align.65 = align;
          D.24170 = -align.65;
          offset = D.24170 & offset;
          D.24171 = (long int) offset;
          D.24172 = (void *) D.24171;
          res->entries[i] = D.24172;
          offset = offset + size;
          goto <D.22729>;
          <D.22730>:
          D.24173 = instantiate_info (domain, template, context, class, 0B);
          res->entries[i] = D.24173;
          goto <D.22729>;
          <D.22729>:
        }
        i = i + 1;
        <D.22732>:
        i.67 = (unsigned int) i;
        D.24150 = info->entries;
        D.24151 = D.24150->len;
        if (i.67 < D.24151) goto <D.22731>; else goto <D.22733>;
        <D.22733>:
        res->locals_size = offset;
        D.23964 = res;
        return D.23964;
      }
    finally
      {
        align = {CLOBBER};
      }
  }
  <D.22734>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1482);
  D.23964 = 0B;
  return D.23964;
}


class_type_info (struct MonoDomain * domain, struct MonoClass * class, MonoRgctxInfoType info_type)
{
  struct MonoException * D.24179;
  void * D.24180;
  struct MonoException * D.24183;
  void * * * D.24184;
  int D.24185;
  long unsigned int D.24186;
  struct MonoType * D.24187;
  int D.24188;
  int D.24191;
  long unsigned int D.24192;
  int D.24193;
  int D.24196;
  int D.24199;
  unsigned int size.68;
  unsigned int D.24204;
  _Bool D.24205;
  _Bool D.24206;
  _Bool D.24207;
  unsigned int size.69;
  unsigned int align.70;
  struct MonoMethod * D.24218;
  struct MonoClass * D.24224;
  _Bool D.24225;
  long int D.24226;
  long int D.24227;
  void * * D.24230;
  struct MonoMethod * D.24233;
  _Bool D.24239;
  long int D.24240;
  long int D.24241;
  void * * D.24244;
  int D.24247;
  void * D.24253;
  struct MonoDomain * D.24254;
  _Bool D.24255;
  long int D.24256;
  long int D.24257;
  int D.24260;

  switch (info_type) <default: <D.22596>, case 0: <D.22563>, case 1: <D.22565>, case 2: <D.22566>, case 12: <D.22568>, case 13: <D.22570>, case 14: <D.22571>, case 19: <D.22572>, case 22: <D.22573>, case 23: <D.22574>, case 24: <D.22586>, case 25: <D.22587>>
  <D.22563>:
  {
    struct MonoVTable * vtable;

    vtable = mono_class_vtable (domain, class);
    if (vtable == 0B) goto <D.24177>; else goto <D.24178>;
    <D.24177>:
    D.24179 = mono_class_get_exception_for_failure (class);
    mono_raise_exception (D.24179);
    <D.24178>:
    D.24180 = mono_vtable_get_static_field_data (vtable);
    return D.24180;
  }
  <D.22565>:
  D.24180 = class;
  return D.24180;
  <D.22566>:
  {
    struct MonoVTable * vtable;

    vtable = mono_class_vtable (domain, class);
    if (vtable == 0B) goto <D.24181>; else goto <D.24182>;
    <D.24181>:
    D.24183 = mono_class_get_exception_for_failure (class);
    mono_raise_exception (D.24183);
    <D.24182>:
    D.24180 = vtable;
    return D.24180;
  }
  <D.22568>:
  {
    void * * * cache_data;

    cache_data = mono_domain_alloc0 (domain, 16);
    D.24184 = cache_data + 8;
    *D.24184 = class;
    D.24180 = cache_data;
    return D.24180;
  }
  <D.22570>:
  D.24185 = mono_class_array_element_size (class);
  D.24186 = (long unsigned int) D.24185;
  D.24180 = (void *) D.24186;
  return D.24180;
  <D.22571>:
  D.24187 = &class->byval_arg;
  D.24188 = mono_type_is_reference (D.24187);
  if (D.24188 != 0) goto <D.24189>; else goto <D.24190>;
  <D.24189>:
  D.24180 = 8B;
  return D.24180;
  <D.24190>:
  D.24191 = mono_class_value_size (class, 0B);
  D.24192 = (long unsigned int) D.24191;
  D.24180 = (void *) D.24192;
  return D.24180;
  <D.22572>:
  D.24187 = &class->byval_arg;
  D.24193 = mono_type_is_reference (D.24187);
  if (D.24193 != 0) goto <D.24194>; else goto <D.24195>;
  <D.24194>:
  D.24180 = 1B;
  return D.24180;
  <D.24195>:
  D.24196 = mono_class_is_nullable (class);
  if (D.24196 != 0) goto <D.24197>; else goto <D.24198>;
  <D.24197>:
  D.24180 = 2B;
  return D.24180;
  <D.24198>:
  D.24180 = 0B;
  return D.24180;
  <D.22573>:
  <D.22574>:
  {
    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.24187 = &class->byval_arg;
        D.24199 = mono_type_is_reference (D.24187);
        if (D.24199 != 0) goto <D.24200>; else goto <D.24201>;
        <D.24200>:
        size = 8;
        align = 8;
        goto <D.24202>;
        <D.24201>:
        size = mono_class_value_size (class, &align);
        <D.24202>:
        size.68 = (unsigned int) size;
        D.24204 = size.68 + 4294967295;
        D.24205 = D.24204 > 1;
        D.24206 = size != 4;
        D.24207 = D.24205 & D.24206;
        if (D.24207 != 0) goto <D.24208>; else goto <D.24209>;
        <D.24208>:
        if (size != 8) goto <D.24210>; else goto <D.24211>;
        <D.24210>:
        size = 0;
        <D.24211>:
        <D.24209>:
        size.69 = (unsigned int) size;
        align.70 = align;
        if (size.69 > align.70) goto <D.24214>; else goto <D.24215>;
        <D.24214>:
        size = 0;
        <D.24215>:
        if (info_type == 22) goto <D.24216>; else goto <D.24217>;
        <D.24216>:
        D.24218 = memcpy_method[size];
        if (D.24218 == 0B) goto <D.24219>; else goto <D.24220>;
        <D.24219>:
        {
          struct MonoMethod * m;
          char name[32];

          try
            {
              if (size == 0) goto <D.24221>; else goto <D.24222>;
              <D.24221>:
              sprintf (&name, "memcpy");
              goto <D.24223>;
              <D.24222>:
              sprintf (&name, "memcpy_aligned_%d", size);
              <D.24223>:
              D.24224 = mono_defaults.string_class;
              m = mono_class_get_method_from_name (D.24224, &name, 3);
              D.24225 = m == 0B;
              D.24226 = (long int) D.24225;
              D.24227 = __builtin_expect (D.24226, 0);
              if (D.24227 != 0) goto <D.24228>; else goto <D.24229>;
              <D.24228>:
              monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 991, "m");
              <D.24229>:
              mono_memory_barrier ();
              memcpy_method[size] = m;
            }
          finally
            {
              name = {CLOBBER};
            }
        }
        <D.24220>:
        D.24230 = domain_info->memcpy_addr[size];
        if (D.24230 == 0B) goto <D.24231>; else goto <D.24232>;
        <D.24231>:
        {
          void * addr;

          D.24218 = memcpy_method[size];
          addr = mono_compile_method (D.24218);
          mono_memory_barrier ();
          domain_info->memcpy_addr[size] = addr;
        }
        <D.24232>:
        D.24180 = domain_info->memcpy_addr[size];
        return D.24180;
        <D.24217>:
        D.24233 = bzero_method[size];
        if (D.24233 == 0B) goto <D.24234>; else goto <D.24235>;
        <D.24234>:
        {
          struct MonoMethod * m;
          char name[32];

          try
            {
              if (size == 0) goto <D.24236>; else goto <D.24237>;
              <D.24236>:
              sprintf (&name, "bzero");
              goto <D.24238>;
              <D.24237>:
              sprintf (&name, "bzero_aligned_%d", size);
              <D.24238>:
              D.24224 = mono_defaults.string_class;
              m = mono_class_get_method_from_name (D.24224, &name, 2);
              D.24239 = m == 0B;
              D.24240 = (long int) D.24239;
              D.24241 = __builtin_expect (D.24240, 0);
              if (D.24241 != 0) goto <D.24242>; else goto <D.24243>;
              <D.24242>:
              monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1011, "m");
              <D.24243>:
              mono_memory_barrier ();
              bzero_method[size] = m;
            }
          finally
            {
              name = {CLOBBER};
            }
        }
        <D.24235>:
        D.24244 = domain_info->bzero_addr[size];
        if (D.24244 == 0B) goto <D.24245>; else goto <D.24246>;
        <D.24245>:
        {
          void * addr;

          D.24233 = bzero_method[size];
          addr = mono_compile_method (D.24233);
          mono_memory_barrier ();
          domain_info->bzero_addr[size] = addr;
        }
        <D.24246>:
        D.24180 = domain_info->bzero_addr[size];
        return D.24180;
      }
    finally
      {
        align = {CLOBBER};
      }
  }
  <D.22586>:
  <D.22587>:
  {
    struct MonoMethod * method;
    void * addr;
    struct MonoJitInfo * ji;
    struct MonoGenericContext * ctx;

    D.24247 = mono_class_is_nullable (class);
    if (D.24247 == 0) goto <D.24248>; else goto <D.24249>;
    <D.24248>:
    D.24180 = 0B;
    return D.24180;
    <D.24249>:
    if (info_type == 24) goto <D.24250>; else goto <D.24251>;
    <D.24250>:
    method = mono_class_get_method_from_name (class, "Box", 1);
    goto <D.24252>;
    <D.24251>:
    method = mono_class_get_method_from_name (class, "Unbox", 1);
    <D.24252>:
    addr = mono_compile_method (method);
    D.24253 = mono_get_addr_from_ftnptr (addr);
    D.24254 = mono_domain_get ();
    ji = mini_jit_info_table_find (D.24254, D.24253, 0B);
    D.24255 = ji == 0B;
    D.24256 = (long int) D.24255;
    D.24257 = __builtin_expect (D.24256, 0);
    if (D.24257 != 0) goto <D.24258>; else goto <D.24259>;
    <D.24258>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1042, "ji");
    <D.24259>:
    D.24260 = mini_jit_info_is_gsharedvt (ji);
    if (D.24260 != 0) goto <D.24261>; else goto <D.24262>;
    <D.24261>:
    D.24180 = mono_create_static_rgctx_trampoline (method, addr);
    return D.24180;
    <D.24262>:
    {
      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.24180 = addr;
          return D.24180;
        }
      finally
        {
          gsctx = {CLOBBER};
        }
    }
  }
  <D.22596>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1065);
  D.24180 = 0B;
  return D.24180;
}


sprintf (char * restrict __s, const char * restrict __fmt)
{
  int D.24266;
  long unsigned int D.24267;

  D.24267 = __builtin_object_size (__s, 1);
  D.24266 = __builtin___sprintf_chk (__s, 1, D.24267, __fmt, __builtin_va_arg_pack ());
  return D.24266;
}


ji_is_gsharedvt (struct MonoJitInfo * ji)
{
  unsigned char D.24272;
  unsigned char D.24273;
  struct MonoGenericSharingContext * D.24275;
  gboolean * D.24276;
  struct MonoGenericSharingContext * D.24278;
  gboolean * D.24279;
  gboolean D.24280;

  if (ji != 0B) goto <D.24271>; else goto <D.24269>;
  <D.24271>:
  D.24272 = BIT_FIELD_REF <*ji, 8, 272>;
  D.24273 = D.24272 & 2;
  if (D.24273 != 0) goto <D.24274>; else goto <D.24269>;
  <D.24274>:
  D.24275 = mono_jit_info_get_generic_sharing_context (ji);
  D.24276 = D.24275->var_is_vt;
  if (D.24276 != 0B) goto <D.24270>; else goto <D.24277>;
  <D.24277>:
  D.24278 = mono_jit_info_get_generic_sharing_context (ji);
  D.24279 = D.24278->mvar_is_vt;
  if (D.24279 != 0B) goto <D.24270>; else goto <D.24269>;
  <D.24270>:
  D.24280 = 1;
  return D.24280;
  <D.24269>:
  D.24280 = 0;
  return D.24280;
}


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

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


mono_method_fill_runtime_generic_context (struct MonoMethodRuntimeGenericContext * mrgctx, guint8 * caller, guint32 slot)
{
  struct MonoGenericInst * D.24284;
  struct MonoVTable * D.24285;
  void * D.24286;
  void * info;

  D.24284 = mrgctx->method_inst;
  D.24285 = mrgctx->class_vtable;
  info = fill_runtime_generic_context (D.24285, mrgctx, caller, slot, D.24284);
  D.24286 = info;
  return D.24286;
}


mono_method_lookup_rgctx (struct MonoVTable * class_vtable, struct MonoGenericInst * method_inst)
{
  struct MonoClass * D.24288;
  struct MonoGenericContainer * D.24289;
  _Bool D.24290;
  long int D.24291;
  long int D.24292;
  unsigned char D.24295;
  unsigned char D.24296;
  _Bool D.24297;
  long int D.24298;
  long int D.24299;
  union mono_mutex_t * D.24302;
  _Bool D.24305;
  long int D.24306;
  long int D.24307;
  struct GHashTable * D.24310;
  struct GHashTable * D.24313;
  _Bool D.24318;
  long int D.24319;
  long int D.24320;
  _Bool D.24323;
  long int D.24324;
  long int D.24325;
  struct MonoMethodRuntimeGenericContext * D.24328;
  struct MonoDomain * domain;
  struct MonoMethodRuntimeGenericContext * mrgctx;
  struct MonoMethodRuntimeGenericContext key;

  try
    {
      domain = class_vtable->domain;
      D.24288 = class_vtable->klass;
      D.24289 = D.24288->generic_container;
      D.24290 = D.24289 != 0B;
      D.24291 = (long int) D.24290;
      D.24292 = __builtin_expect (D.24291, 0);
      if (D.24292 != 0) goto <D.24293>; else goto <D.24294>;
      <D.24293>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2002, "!class_vtable->klass->generic_container");
      <D.24294>:
      D.24295 = BIT_FIELD_REF <*method_inst, 8, 48>;
      D.24296 = D.24295 & 64;
      D.24297 = D.24296 != 0;
      D.24298 = (long int) D.24297;
      D.24299 = __builtin_expect (D.24298, 0);
      if (D.24299 != 0) goto <D.24300>; else goto <D.24301>;
      <D.24300>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2003, "!method_inst->is_open");
      <D.24301>:
      {
        int ret;

        D.24302 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.24302);
        if (ret != 0) goto <D.24303>; else goto <D.24304>;
        <D.24303>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.24304>:
        D.24305 = ret != 0;
        D.24306 = (long int) D.24305;
        D.24307 = __builtin_expect (D.24306, 0);
        if (D.24307 != 0) goto <D.24308>; else goto <D.24309>;
        <D.24308>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2005, "ret == 0");
        <D.24309>:
      }
      D.24310 = domain->method_rgctx_hash;
      if (D.24310 == 0B) goto <D.24311>; else goto <D.24312>;
      <D.24311>:
      D.24313 = monoeg_g_hash_table_new (mrgctx_hash_func, mrgctx_equal_func);
      domain->method_rgctx_hash = D.24313;
      <D.24312>:
      key.class_vtable = class_vtable;
      key.method_inst = method_inst;
      D.24310 = domain->method_rgctx_hash;
      mrgctx = monoeg_g_hash_table_lookup (D.24310, &key);
      if (mrgctx == 0B) goto <D.24314>; else goto <D.24315>;
      <D.24314>:
      mrgctx = alloc_rgctx_array (domain, 0, 1);
      mrgctx->class_vtable = class_vtable;
      mrgctx->method_inst = method_inst;
      D.24310 = domain->method_rgctx_hash;
      monoeg_g_hash_table_insert_replace (D.24310, mrgctx, mrgctx, 0);
      <D.24315>:
      {
        int ret;

        D.24302 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.24302);
        if (ret != 0) goto <D.24316>; else goto <D.24317>;
        <D.24316>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.24317>:
        D.24318 = ret != 0;
        D.24319 = (long int) D.24318;
        D.24320 = __builtin_expect (D.24319, 0);
        if (D.24320 != 0) goto <D.24321>; else goto <D.24322>;
        <D.24321>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2031, "ret == 0");
        <D.24322>:
      }
      D.24323 = mrgctx == 0B;
      D.24324 = (long int) D.24323;
      D.24325 = __builtin_expect (D.24324, 0);
      if (D.24325 != 0) goto <D.24326>; else goto <D.24327>;
      <D.24326>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2033, "mrgctx");
      <D.24327>:
      D.24328 = mrgctx;
      return D.24328;
    }
  finally
    {
      key = {CLOBBER};
    }
}


mrgctx_equal_func (const void * a, const void * b)
{
  gboolean D.24331;
  int iftmp.71;
  struct MonoVTable * D.24335;
  struct MonoVTable * D.24336;
  struct MonoGenericInst * D.24338;
  struct MonoGenericInst * D.24339;
  int D.24340;
  const struct MonoMethodRuntimeGenericContext * mrgctx1;
  const struct MonoMethodRuntimeGenericContext * mrgctx2;

  mrgctx1 = a;
  mrgctx2 = b;
  D.24335 = mrgctx1->class_vtable;
  D.24336 = mrgctx2->class_vtable;
  if (D.24335 == D.24336) goto <D.24337>; else goto <D.24333>;
  <D.24337>:
  D.24338 = mrgctx2->method_inst;
  D.24339 = mrgctx1->method_inst;
  D.24340 = mono_metadata_generic_inst_equal (D.24339, D.24338);
  if (D.24340 != 0) goto <D.24341>; else goto <D.24333>;
  <D.24341>:
  iftmp.71 = 1;
  goto <D.24334>;
  <D.24333>:
  iftmp.71 = 0;
  <D.24334>:
  D.24331 = iftmp.71;
  return D.24331;
}


mrgctx_hash_func (const void * key)
{
  guint D.24343;
  struct MonoVTable * D.24344;
  unsigned int D.24345;
  struct MonoGenericInst * D.24346;
  unsigned int D.24347;
  const struct MonoMethodRuntimeGenericContext * mrgctx;

  mrgctx = key;
  D.24344 = mrgctx->class_vtable;
  D.24345 = mono_aligned_addr_hash (D.24344);
  D.24346 = mrgctx->method_inst;
  D.24347 = mono_metadata_generic_inst_hash (D.24346);
  D.24343 = D.24345 ^ D.24347;
  return D.24343;
}


mono_generic_context_is_sharable_full (struct MonoGenericContext * context, gboolean allow_type_vars, gboolean allow_partial)
{
  int iftmp.72;
  struct MonoGenericInst * D.24352;
  struct MonoGenericInst * D.24354;
  _Bool D.24356;
  long int D.24357;
  long int D.24358;
  int D.24363;
  gboolean D.24366;
  int D.24369;

  D.24352 = context->class_inst;
  if (D.24352 == 0B) goto <D.24353>; else goto <D.24350>;
  <D.24353>:
  D.24354 = context->method_inst;
  if (D.24354 == 0B) goto <D.24355>; else goto <D.24350>;
  <D.24355>:
  iftmp.72 = 1;
  goto <D.24351>;
  <D.24350>:
  iftmp.72 = 0;
  <D.24351>:
  D.24356 = iftmp.72 != 0;
  D.24357 = (long int) D.24356;
  D.24358 = __builtin_expect (D.24357, 0);
  if (D.24358 != 0) goto <D.24359>; else goto <D.24360>;
  <D.24359>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2051, "context->class_inst || context->method_inst");
  <D.24360>:
  D.24352 = context->class_inst;
  if (D.24352 != 0B) goto <D.24361>; else goto <D.24362>;
  <D.24361>:
  D.24352 = context->class_inst;
  D.24363 = generic_inst_is_sharable (D.24352, allow_type_vars, allow_partial);
  if (D.24363 == 0) goto <D.24364>; else goto <D.24365>;
  <D.24364>:
  D.24366 = 0;
  return D.24366;
  <D.24365>:
  <D.24362>:
  D.24354 = context->method_inst;
  if (D.24354 != 0B) goto <D.24367>; else goto <D.24368>;
  <D.24367>:
  D.24354 = context->method_inst;
  D.24369 = generic_inst_is_sharable (D.24354, allow_type_vars, allow_partial);
  if (D.24369 == 0) goto <D.24370>; else goto <D.24371>;
  <D.24370>:
  D.24366 = 0;
  return D.24366;
  <D.24371>:
  <D.24368>:
  D.24366 = 1;
  return D.24366;
}


generic_inst_is_sharable (struct MonoGenericInst * inst, gboolean allow_type_vars, gboolean allow_partial)
{
  int D.24375;
  unsigned char D.24378;
  _Bool D.24379;
  _Bool D.24380;
  _Bool D.24381;
  unsigned char D.24386;
  unsigned char D.24387;
  unsigned char D.24390;
  unsigned char D.24391;
  _Bool D.24392;
  _Bool D.24393;
  _Bool D.24394;
  unsigned char D.24396;
  gboolean D.24397;
  <unnamed-unsigned:22> D.24398;
  int D.24399;
  int i;
  gboolean has_ref;

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

    type = inst->type_argv[i];
    D.24375 = mono_type_is_reference (type);
    if (D.24375 != 0) goto <D.24373>; else goto <D.24376>;
    <D.24376>:
    if (allow_type_vars != 0) goto <D.24377>; else goto <D.24374>;
    <D.24377>:
    D.24378 = type->type;
    D.24379 = D.24378 == 19;
    D.24380 = D.24378 == 30;
    D.24381 = D.24379 | D.24380;
    if (D.24381 != 0) goto <D.24373>; else goto <D.24374>;
    <D.24373>:
    has_ref = 1;
    // predicted unlikely by continue predictor.
    goto <D.22513>;
    <D.24374>:
    if (allow_partial != 0) goto <D.24384>; else goto <D.24385>;
    <D.24384>:
    D.24386 = BIT_FIELD_REF <*type, 8, 88>;
    D.24387 = D.24386 & 64;
    if (D.24387 == 0) goto <D.24388>; else goto <D.24389>;
    <D.24388>:
    D.24390 = type->type;
    D.24391 = D.24390 + 254;
    D.24392 = D.24391 <= 11;
    D.24393 = D.24390 == 24;
    D.24394 = D.24392 | D.24393;
    if (D.24394 != 0) goto <D.24382>; else goto <D.24395>;
    <D.24395>:
    D.24396 = type->type;
    if (D.24396 == 25) goto <D.24382>; else goto <D.24383>;
    <D.24382>:
    // predicted unlikely by continue predictor.
    goto <D.22513>;
    <D.24383>:
    <D.24389>:
    <D.24385>:
    D.24397 = 0;
    return D.24397;
  }
  <D.22513>:
  i = i + 1;
  <D.22515>:
  D.24398 = inst->type_argc;
  D.24399 = (int) D.24398;
  if (D.24399 > i) goto <D.22514>; else goto <D.22516>;
  <D.22516>:
  if (allow_partial != 0) goto <D.24400>; else goto <D.24401>;
  <D.24400>:
  D.24397 = has_ref;
  return D.24397;
  <D.24401>:
  D.24397 = 1;
  return D.24397;
}


mono_generic_context_is_sharable (struct MonoGenericContext * context, gboolean allow_type_vars)
{
  gboolean D.24403;
  int D.24404;

  D.24404 = partial_sharing_supported ();
  D.24403 = mono_generic_context_is_sharable_full (context, allow_type_vars, D.24404);
  return D.24403;
}


partial_sharing_supported ()
{
  gboolean D.24408;
  int partial_supported.73;
  int mono_aot_only.74;

  if (0 != 0) goto <D.24406>; else goto <D.24407>;
  <D.24406>:
  D.24408 = 0;
  return D.24408;
  <D.24407>:
  partial_supported.73 = partial_supported;
  if (partial_supported.73 != 0) goto <D.24409>; else goto <D.24412>;
  <D.24412>:
  mono_aot_only.74 = mono_aot_only;
  if (mono_aot_only.74 != 0) goto <D.24409>; else goto <D.24410>;
  <D.24409>:
  D.24408 = 1;
  return D.24408;
  <D.24410>:
  D.24408 = 0;
  return D.24408;
}


mono_method_is_generic_impl (struct MonoMethod * method)
{
  unsigned char D.24415;
  unsigned char D.24416;
  gboolean D.24419;
  unsigned char D.24420;
  unsigned char D.24421;
  struct MonoClass * D.24424;
  struct MonoGenericContainer * D.24425;

  D.24415 = BIT_FIELD_REF <*method, 8, 264>;
  D.24416 = D.24415 & 16;
  if (D.24416 != 0) goto <D.24417>; else goto <D.24418>;
  <D.24417>:
  D.24419 = 1;
  return D.24419;
  <D.24418>:
  D.24420 = BIT_FIELD_REF <*method, 8, 256>;
  D.24421 = D.24420 & 124;
  if (D.24421 != 0) goto <D.24422>; else goto <D.24423>;
  <D.24422>:
  D.24419 = 0;
  return D.24419;
  <D.24423>:
  D.24424 = method->klass;
  D.24425 = D.24424->generic_container;
  if (D.24425 != 0B) goto <D.24426>; else goto <D.24427>;
  <D.24426>:
  D.24419 = 1;
  return D.24419;
  <D.24427>:
  D.24419 = 0;
  return D.24419;
}


mono_method_is_generic_sharable_full (struct MonoMethod * method, gboolean allow_type_vars, gboolean allow_partial, gboolean allow_gsharedvt)
{
  int D.24429;
  gboolean D.24432;
  int D.24433;
  struct MonoClass * D.24436;
  int D.24437;
  int D.24442;
  int D.24445;
  unsigned char D.24448;
  unsigned char D.24449;
  int D.24452;
  struct MonoMethod * D.24455;
  _Bool D.24456;
  long int D.24457;
  long int D.24458;
  unsigned char D.24461;
  unsigned char D.24462;
  struct MonoGenericContainer * D.24465;
  int D.24466;
  struct MonoGenericClass * D.24469;
  struct MonoGenericContext * D.24472;
  int D.24473;
  int iftmp.75;
  struct MonoClass * D.24480;
  struct MonoGenericContainer * D.24482;
  _Bool D.24483;
  long int D.24484;
  long int D.24485;
  int D.24488;
  struct MonoGenericContainer * D.24491;
  int D.24496;
  int D.24499;

  D.24429 = mono_method_is_generic_impl (method);
  if (D.24429 == 0) goto <D.24430>; else goto <D.24431>;
  <D.24430>:
  D.24432 = 0;
  return D.24432;
  <D.24431>:
  D.24433 = partial_sharing_supported ();
  if (D.24433 == 0) goto <D.24434>; else goto <D.24435>;
  <D.24434>:
  allow_partial = 0;
  <D.24435>:
  D.24436 = method->klass;
  D.24437 = is_async_state_machine_class (D.24436);
  if (D.24437 != 0) goto <D.24438>; else goto <D.24439>;
  <D.24438>:
  D.24432 = 0;
  return D.24432;
  <D.24439>:
  if (allow_gsharedvt != 0) goto <D.24440>; else goto <D.24441>;
  <D.24440>:
  D.24442 = mini_is_gsharedvt_sharable_method (method);
  if (D.24442 != 0) goto <D.24443>; else goto <D.24444>;
  <D.24443>:
  D.24445 = is_async_method (method);
  if (D.24445 != 0) goto <D.24446>; else goto <D.24447>;
  <D.24446>:
  D.24432 = 0;
  return D.24432;
  <D.24447>:
  D.24432 = 1;
  return D.24432;
  <D.24444>:
  <D.24441>:
  D.24448 = BIT_FIELD_REF <*method, 8, 264>;
  D.24449 = D.24448 & 16;
  if (D.24449 != 0) goto <D.24450>; else goto <D.24451>;
  <D.24450>:
  {
    struct MonoMethodInflated * inflated;
    struct MonoGenericContext * context;

    inflated = method;
    context = &inflated->context;
    D.24452 = mono_generic_context_is_sharable_full (context, allow_type_vars, allow_partial);
    if (D.24452 == 0) goto <D.24453>; else goto <D.24454>;
    <D.24453>:
    D.24432 = 0;
    return D.24432;
    <D.24454>:
    D.24455 = inflated->declaring;
    D.24456 = D.24455 == 0B;
    D.24457 = (long int) D.24456;
    D.24458 = __builtin_expect (D.24457, 0);
    if (D.24458 != 0) goto <D.24459>; else goto <D.24460>;
    <D.24459>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2216, "inflated->declaring");
    <D.24460>:
    D.24455 = inflated->declaring;
    D.24461 = BIT_FIELD_REF <*D.24455, 8, 264>;
    D.24462 = D.24461 & 8;
    if (D.24462 != 0) goto <D.24463>; else goto <D.24464>;
    <D.24463>:
    D.24455 = inflated->declaring;
    D.24465 = mono_method_get_generic_container (D.24455);
    D.24466 = has_constraints (D.24465);
    if (D.24466 != 0) goto <D.24467>; else goto <D.24468>;
    <D.24467>:
    D.24432 = 0;
    return D.24432;
    <D.24468>:
    <D.24464>:
  }
  <D.24451>:
  D.24436 = method->klass;
  D.24469 = D.24436->generic_class;
  if (D.24469 != 0B) goto <D.24470>; else goto <D.24471>;
  <D.24470>:
  D.24436 = method->klass;
  D.24469 = D.24436->generic_class;
  D.24472 = &D.24469->context;
  D.24473 = mono_generic_context_is_sharable_full (D.24472, allow_type_vars, allow_partial);
  if (D.24473 == 0) goto <D.24474>; else goto <D.24475>;
  <D.24474>:
  D.24432 = 0;
  return D.24432;
  <D.24475>:
  D.24436 = method->klass;
  D.24469 = D.24436->generic_class;
  D.24480 = D.24469->container_class;
  if (D.24480 == 0B) goto <D.24477>; else goto <D.24481>;
  <D.24481>:
  D.24436 = method->klass;
  D.24469 = D.24436->generic_class;
  D.24480 = D.24469->container_class;
  D.24482 = D.24480->generic_container;
  if (D.24482 == 0B) goto <D.24477>; else goto <D.24478>;
  <D.24477>:
  iftmp.75 = 1;
  goto <D.24479>;
  <D.24478>:
  iftmp.75 = 0;
  <D.24479>:
  D.24483 = iftmp.75 != 0;
  D.24484 = (long int) D.24483;
  D.24485 = __builtin_expect (D.24484, 0);
  if (D.24485 != 0) goto <D.24486>; else goto <D.24487>;
  <D.24486>:
  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.24487>:
  D.24436 = method->klass;
  D.24469 = D.24436->generic_class;
  D.24480 = D.24469->container_class;
  D.24482 = D.24480->generic_container;
  D.24488 = has_constraints (D.24482);
  if (D.24488 != 0) goto <D.24489>; else goto <D.24490>;
  <D.24489>:
  D.24432 = 0;
  return D.24432;
  <D.24490>:
  <D.24471>:
  D.24436 = method->klass;
  D.24491 = D.24436->generic_container;
  if (D.24491 != 0B) goto <D.24492>; else goto <D.24493>;
  <D.24492>:
  if (allow_type_vars == 0) goto <D.24494>; else goto <D.24495>;
  <D.24494>:
  D.24432 = 0;
  return D.24432;
  <D.24495>:
  <D.24493>:
  D.24496 = is_async_method (method);
  if (D.24496 != 0) goto <D.24497>; else goto <D.24498>;
  <D.24497>:
  D.24499 = mini_method_is_open (method);
  if (D.24499 != 0) goto <D.24500>; else goto <D.24501>;
  <D.24500>:
  D.24432 = 1;
  return D.24432;
  <D.24501>:
  D.24432 = 0;
  return D.24432;
  <D.24498>:
  D.24432 = 1;
  return D.24432;
}


is_async_state_machine_class (struct MonoClass * klass)
{
  gboolean D.24503;
  int iclass_set.76;
  struct MonoImage * D.24507;
  struct MonoClass * iclass.77;
  struct MonoClass * iclass.78;
  unsigned char D.24512;
  unsigned char D.24513;
  int D.24516;
  static struct MonoClass * iclass;
  static gboolean iclass_set;

  D.24503 = 0;
  return D.24503;
  iclass_set.76 = iclass_set;
  if (iclass_set.76 == 0) goto <D.24505>; else goto <D.24506>;
  <D.24505>:
  D.24507 = mono_defaults.corlib;
  iclass.77 = mono_class_from_name (D.24507, "System.Runtime.CompilerServices", "IAsyncStateMachine");
  iclass = iclass.77;
  mono_memory_barrier ();
  iclass_set = 1;
  <D.24506>:
  iclass.78 = iclass;
  if (iclass.78 != 0B) goto <D.24510>; else goto <D.24511>;
  <D.24510>:
  D.24512 = BIT_FIELD_REF <*klass, 8, 256>;
  D.24513 = D.24512 & 8;
  if (D.24513 != 0) goto <D.24514>; else goto <D.24515>;
  <D.24514>:
  iclass.78 = iclass;
  D.24516 = mono_class_is_assignable_from (iclass.78, klass);
  if (D.24516 != 0) goto <D.24517>; else goto <D.24518>;
  <D.24517>:
  D.24503 = 1;
  return D.24503;
  <D.24518>:
  <D.24515>:
  <D.24511>:
  D.24503 = 0;
  return D.24503;
}


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

  D.24520 = 0;
  return D.24520;
}


is_async_method (struct MonoMethod * method)
{
  gboolean D.24522;
  int attr_class_set.79;
  struct MonoImage * D.24526;
  struct MonoClass * attr_class.80;
  struct MonoClass * attr_class.81;
  struct MonoType * D.24536;
  unsigned char D.24537;
  struct MonoGenericClass * D.24540;
  struct MonoClass * D.24541;
  int D.23000;
  int iftmp.82;
  int D.22999;
  const char[7] * D.24546;
  unsigned char D.24547;
  int D.24548;
  unsigned char D.24549;
  int D.24550;
  _Bool D.24551;
  _Bool D.24552;
  _Bool D.24553;
  const unsigned char * D.24556;
  unsigned char D.24557;
  int D.24558;
  const unsigned char * D.24559;
  unsigned char D.24560;
  int D.24561;
  _Bool D.24562;
  _Bool D.24563;
  const unsigned char * D.24566;
  unsigned char D.24567;
  int D.24568;
  const unsigned char * D.24569;
  unsigned char D.24570;
  int D.24571;
  _Bool D.24572;
  _Bool D.24573;
  const unsigned char * D.24576;
  unsigned char D.24577;
  int D.24578;
  const unsigned char * D.24579;
  unsigned char D.24580;
  int D.24581;
  const char * D.24583;
  int D.24586;
  struct MonoCustomAttrInfo * cattr;
  struct MonoMethodSignature * sig;
  gboolean res;
  static struct MonoClass * attr_class;
  static gboolean attr_class_set;

  res = 0;
  D.24522 = 0;
  return D.24522;
  attr_class_set.79 = attr_class_set;
  if (attr_class_set.79 == 0) goto <D.24524>; else goto <D.24525>;
  <D.24524>:
  D.24526 = mono_defaults.corlib;
  attr_class.80 = mono_class_from_name (D.24526, "System.Runtime.CompilerServices", "AsyncStateMachineAttribute");
  attr_class = attr_class.80;
  mono_memory_barrier ();
  attr_class_set = 1;
  <D.24525>:
  sig = mono_method_signature (method);
  attr_class.81 = attr_class;
  if (attr_class.81 != 0B) goto <D.24532>; else goto <D.24533>;
  <D.24532>:
  if (sig != 0B) goto <D.24534>; else goto <D.24535>;
  <D.24534>:
  D.24536 = sig->ret;
  D.24537 = D.24536->type;
  if (D.24537 == 1) goto <D.24528>; else goto <D.24538>;
  <D.24538>:
  D.24536 = sig->ret;
  D.24537 = D.24536->type;
  if (D.24537 == 18) goto <D.24539>; else goto <D.24529>;
  <D.24539>:
  D.24536 = sig->ret;
  D.24540 = D.24536->data.generic_class;
  D.24541 = D.24540->container_class;
  if (1 != 0) goto <D.24528>; else goto <D.24529>;
  <D.24529>:
  D.24536 = sig->ret;
  D.24537 = D.24536->type;
  if (D.24537 == 21) goto <D.24542>; else goto <D.24530>;
  <D.24542>:
  {
    size_t __s1_len;
    size_t __s2_len;

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

      D.24536 = sig->ret;
      D.24540 = D.24536->data.generic_class;
      D.24541 = D.24540->container_class;
      __s2 = D.24541->name;
      D.24546 = "Task`1";
      D.24547 = MEM[(const unsigned char *)D.24546];
      D.24548 = (int) D.24547;
      D.24549 = *__s2;
      D.24550 = (int) D.24549;
      __result = D.24548 - D.24550;
      {
        D.24551 = __s2_len != 0;
        D.24552 = __result == 0;
        D.24553 = D.24551 & D.24552;
        if (D.24553 != 0) goto <D.24554>; else goto <D.24555>;
        <D.24554>:
        D.24556 = &MEM[(void *)"Task`1" + 1B];
        D.24557 = *D.24556;
        D.24558 = (int) D.24557;
        D.24559 = __s2 + 1;
        D.24560 = *D.24559;
        D.24561 = (int) D.24560;
        __result = D.24558 - D.24561;
        D.24562 = __s2_len > 1;
        D.24552 = __result == 0;
        D.24563 = D.24562 & D.24552;
        if (D.24563 != 0) goto <D.24564>; else goto <D.24565>;
        <D.24564>:
        D.24566 = &MEM[(void *)"Task`1" + 2B];
        D.24567 = *D.24566;
        D.24568 = (int) D.24567;
        D.24569 = __s2 + 2;
        D.24570 = *D.24569;
        D.24571 = (int) D.24570;
        __result = D.24568 - D.24571;
        D.24572 = __s2_len > 2;
        D.24552 = __result == 0;
        D.24573 = D.24572 & D.24552;
        if (D.24573 != 0) goto <D.24574>; else goto <D.24575>;
        <D.24574>:
        D.24576 = &MEM[(void *)"Task`1" + 3B];
        D.24577 = *D.24576;
        D.24578 = (int) D.24577;
        D.24579 = __s2 + 3;
        D.24580 = *D.24579;
        D.24581 = (int) D.24580;
        __result = D.24578 - D.24581;
        <D.24575>:
        <D.24565>:
        <D.24555>:
      }
      D.22999 = __result;
    }
    iftmp.82 = -D.22999;
    goto <D.24582>;
    <D.24545>:
    D.24536 = sig->ret;
    D.24540 = D.24536->data.generic_class;
    D.24541 = D.24540->container_class;
    D.24583 = D.24541->name;
    iftmp.82 = __builtin_strcmp (D.24583, "Task`1");
    <D.24582>:
    D.23000 = iftmp.82;
  }
  if (D.23000 == 0) goto <D.24528>; else goto <D.24530>;
  <D.24528>:
  cattr = mono_custom_attrs_from_method (method);
  if (cattr != 0B) goto <D.24584>; else goto <D.24585>;
  <D.24584>:
  attr_class.81 = attr_class;
  D.24586 = mono_custom_attrs_has_attr (cattr, attr_class.81);
  if (D.24586 != 0) goto <D.24587>; else goto <D.24588>;
  <D.24587>:
  res = 1;
  <D.24588>:
  mono_custom_attrs_free (cattr);
  <D.24585>:
  <D.24530>:
  <D.24535>:
  <D.24533>:
  D.24522 = res;
  return D.24522;
}


mini_method_is_open (struct MonoMethod * method)
{
  unsigned char D.24590;
  unsigned char D.24591;
  struct MonoGenericInst * D.24594;
  unsigned char D.24597;
  unsigned char D.24598;
  gboolean D.24601;
  struct MonoGenericInst * D.24602;
  unsigned char D.24605;
  unsigned char D.24606;

  D.24590 = BIT_FIELD_REF <*method, 8, 264>;
  D.24591 = D.24590 & 16;
  if (D.24591 != 0) goto <D.24592>; else goto <D.24593>;
  <D.24592>:
  {
    struct MonoGenericContext * ctx;

    ctx = mono_method_get_context (method);
    D.24594 = ctx->class_inst;
    if (D.24594 != 0B) goto <D.24595>; else goto <D.24596>;
    <D.24595>:
    D.24594 = ctx->class_inst;
    D.24597 = BIT_FIELD_REF <*D.24594, 8, 48>;
    D.24598 = D.24597 & 64;
    if (D.24598 != 0) goto <D.24599>; else goto <D.24600>;
    <D.24599>:
    D.24601 = 1;
    return D.24601;
    <D.24600>:
    <D.24596>:
    D.24602 = ctx->method_inst;
    if (D.24602 != 0B) goto <D.24603>; else goto <D.24604>;
    <D.24603>:
    D.24602 = ctx->method_inst;
    D.24605 = BIT_FIELD_REF <*D.24602, 8, 48>;
    D.24606 = D.24605 & 64;
    if (D.24606 != 0) goto <D.24607>; else goto <D.24608>;
    <D.24607>:
    D.24601 = 1;
    return D.24601;
    <D.24608>:
    <D.24604>:
  }
  <D.24593>:
  D.24601 = 0;
  return D.24601;
}


mono_method_is_generic_sharable (struct MonoMethod * method, gboolean allow_type_vars)
{
  gboolean D.24610;
  int D.24611;

  D.24611 = partial_sharing_supported ();
  D.24610 = mono_method_is_generic_sharable_full (method, allow_type_vars, D.24611, 1);
  return D.24610;
}


mono_method_needs_static_rgctx_invoke (struct MonoMethod * method, gboolean allow_type_vars)
{
  struct MonoClass * D.24613;
  int D.24614;
  gboolean D.24617;
  int D.24618;
  unsigned char D.24621;
  unsigned char D.24622;
  struct MonoGenericContext * D.24625;
  struct MonoGenericInst * D.24626;
  int iftmp.83;
  short unsigned int D.24634;
  int D.24635;
  int D.24636;
  unsigned char D.24638;
  unsigned char D.24639;
  struct MonoGenericClass * D.24640;
  struct MonoGenericContainer * D.24642;

  D.24613 = method->klass;
  D.24614 = mono_class_generic_sharing_enabled (D.24613);
  if (D.24614 == 0) goto <D.24615>; else goto <D.24616>;
  <D.24615>:
  D.24617 = 0;
  return D.24617;
  <D.24616>:
  D.24618 = mono_method_is_generic_sharable (method, allow_type_vars);
  if (D.24618 == 0) goto <D.24619>; else goto <D.24620>;
  <D.24619>:
  D.24617 = 0;
  return D.24617;
  <D.24620>:
  D.24621 = BIT_FIELD_REF <*method, 8, 264>;
  D.24622 = D.24621 & 16;
  if (D.24622 != 0) goto <D.24623>; else goto <D.24624>;
  <D.24623>:
  D.24625 = mono_method_get_context (method);
  D.24626 = D.24625->method_inst;
  if (D.24626 != 0B) goto <D.24627>; else goto <D.24628>;
  <D.24627>:
  D.24617 = 1;
  return D.24617;
  <D.24628>:
  <D.24624>:
  D.24634 = method->flags;
  D.24635 = (int) D.24634;
  D.24636 = D.24635 & 16;
  if (D.24636 != 0) goto <D.24630>; else goto <D.24637>;
  <D.24637>:
  D.24613 = method->klass;
  D.24638 = BIT_FIELD_REF <*D.24613, 8, 256>;
  D.24639 = D.24638 & 8;
  if (D.24639 != 0) goto <D.24630>; else goto <D.24631>;
  <D.24630>:
  D.24613 = method->klass;
  D.24640 = D.24613->generic_class;
  if (D.24640 != 0B) goto <D.24632>; else goto <D.24641>;
  <D.24641>:
  D.24613 = method->klass;
  D.24642 = D.24613->generic_container;
  if (D.24642 != 0B) goto <D.24632>; else goto <D.24631>;
  <D.24632>:
  iftmp.83 = 1;
  goto <D.24633>;
  <D.24631>:
  iftmp.83 = 0;
  <D.24633>:
  D.24617 = iftmp.83;
  return D.24617;
}


mono_method_construct_object_context (struct MonoMethod * method)
{
  struct MonoClass * D.24644;
  struct MonoGenericClass * D.24645;
  _Bool D.24646;
  long int D.24647;
  long int D.24648;
  struct MonoGenericContainer * D.24651;
  <unnamed-signed:31> D.24654;
  struct MonoGenericInst * D.24655;
  struct MonoGenericContext * D.24657;
  struct MonoGenericInst * D.24658;
  struct MonoGenericContext * D.24661;
  struct MonoGenericInst * D.24662;
  <unnamed-unsigned:22> D.24663;
  struct MonoGenericInst * D.24664;
  int iftmp.84;
  struct MonoGenericInst * D.24669;
  struct MonoGenericInst * D.24671;
  _Bool D.24673;
  long int D.24674;
  long int D.24675;
  struct MonoGenericContext D.24678;
  struct MonoGenericContext object_context;

  try
    {
      D.24644 = method->klass;
      D.24645 = D.24644->generic_class;
      D.24646 = D.24645 != 0B;
      D.24647 = (long int) D.24646;
      D.24648 = __builtin_expect (D.24647, 0);
      if (D.24648 != 0) goto <D.24649>; else goto <D.24650>;
      <D.24649>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2298, "!method->klass->generic_class");
      <D.24650>:
      D.24644 = method->klass;
      D.24651 = D.24644->generic_container;
      if (D.24651 != 0B) goto <D.24652>; else goto <D.24653>;
      <D.24652>:
      {
        int type_argc;

        D.24644 = method->klass;
        D.24651 = D.24644->generic_container;
        D.24654 = D.24651->type_argc;
        type_argc = (int) D.24654;
        D.24655 = get_object_generic_inst (type_argc);
        object_context.class_inst = D.24655;
      }
      goto <D.24656>;
      <D.24653>:
      object_context.class_inst = 0B;
      <D.24656>:
      D.24657 = mono_method_get_context_general (method, 1);
      D.24658 = D.24657->method_inst;
      if (D.24658 != 0B) goto <D.24659>; else goto <D.24660>;
      <D.24659>:
      {
        int type_argc;

        D.24661 = mono_method_get_context_general (method, 1);
        D.24662 = D.24661->method_inst;
        D.24663 = D.24662->type_argc;
        type_argc = (int) D.24663;
        D.24664 = get_object_generic_inst (type_argc);
        object_context.method_inst = D.24664;
      }
      goto <D.24665>;
      <D.24660>:
      object_context.method_inst = 0B;
      <D.24665>:
      D.24669 = object_context.class_inst;
      if (D.24669 == 0B) goto <D.24670>; else goto <D.24667>;
      <D.24670>:
      D.24671 = object_context.method_inst;
      if (D.24671 == 0B) goto <D.24672>; else goto <D.24667>;
      <D.24672>:
      iftmp.84 = 1;
      goto <D.24668>;
      <D.24667>:
      iftmp.84 = 0;
      <D.24668>:
      D.24673 = iftmp.84 != 0;
      D.24674 = (long int) D.24673;
      D.24675 = __builtin_expect (D.24674, 0);
      if (D.24675 != 0) goto <D.24676>; else goto <D.24677>;
      <D.24676>:
      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.24677>:
      D.24678 = object_context;
      return D.24678;
    }
  finally
    {
      object_context = {CLOBBER};
    }
}


get_object_generic_inst (int type_argc)
{
  long unsigned int D.24681;
  long unsigned int D.24682;
  long unsigned int D.24683;
  long unsigned int D.24684;
  struct MonoType * * D.24685;
  struct MonoClass * D.24686;
  struct MonoType * D.24687;
  struct MonoGenericInst * D.24688;
  struct MonoType * * type_argv;
  int i;

  D.24681 = (long unsigned int) type_argc;
  D.24682 = D.24681 * 8;
  type_argv = __builtin_alloca (D.24682);
  i = 0;
  goto <D.23023>;
  <D.23022>:
  D.24683 = (long unsigned int) i;
  D.24684 = D.24683 * 8;
  D.24685 = type_argv + D.24684;
  D.24686 = mono_defaults.object_class;
  D.24687 = &D.24686->byval_arg;
  *D.24685 = D.24687;
  i = i + 1;
  <D.23023>:
  if (i < type_argc) goto <D.23022>; else goto <D.23024>;
  <D.23024>:
  D.24688 = mono_metadata_get_generic_inst (type_argc, type_argv);
  return D.24688;
}


mono_set_generic_sharing_supported (gboolean supported)
{
  gshared_supported = supported;
}


mono_set_generic_sharing_vt_supported (gboolean supported)
{
  gsharedvt_supported = supported;
}


mono_set_partial_sharing_supported (gboolean supported)
{
  partial_supported = supported;
}


mono_class_generic_sharing_enabled (struct MonoClass * class)
{
  int inited.85;
  int gshared_supported.86;
  int D.23056;
  int iftmp.87;
  int D.23055;
  const char[7] * D.24702;
  unsigned char D.24703;
  int D.24704;
  unsigned char D.24705;
  int D.24706;
  _Bool D.24707;
  _Bool D.24708;
  _Bool D.24709;
  const unsigned char * D.24712;
  unsigned char D.24713;
  int D.24714;
  const unsigned char * D.24715;
  unsigned char D.24716;
  int D.24717;
  _Bool D.24718;
  _Bool D.24719;
  const unsigned char * D.24722;
  unsigned char D.24723;
  int D.24724;
  const unsigned char * D.24725;
  unsigned char D.24726;
  int D.24727;
  _Bool D.24728;
  _Bool D.24729;
  const unsigned char * D.24732;
  unsigned char D.24733;
  int D.24734;
  const unsigned char * D.24735;
  unsigned char D.24736;
  int D.24737;
  int D.23065;
  int iftmp.88;
  int D.23064;
  const char[12] * D.24745;
  unsigned char D.24746;
  int D.24747;
  unsigned char D.24748;
  int D.24749;
  _Bool D.24750;
  _Bool D.24751;
  _Bool D.24752;
  const unsigned char * D.24755;
  unsigned char D.24756;
  int D.24757;
  const unsigned char * D.24758;
  unsigned char D.24759;
  int D.24760;
  _Bool D.24761;
  _Bool D.24762;
  const unsigned char * D.24765;
  unsigned char D.24766;
  int D.24767;
  const unsigned char * D.24768;
  unsigned char D.24769;
  int D.24770;
  _Bool D.24771;
  _Bool D.24772;
  const unsigned char * D.24775;
  unsigned char D.24776;
  int D.24777;
  const unsigned char * D.24778;
  unsigned char D.24779;
  int D.24780;
  int D.23074;
  int iftmp.89;
  int D.23073;
  const char[4] * D.24788;
  unsigned char D.24789;
  int D.24790;
  unsigned char D.24791;
  int D.24792;
  _Bool D.24793;
  _Bool D.24794;
  _Bool D.24795;
  const unsigned char * D.24798;
  unsigned char D.24799;
  int D.24800;
  const unsigned char * D.24801;
  unsigned char D.24802;
  int D.24803;
  _Bool D.24804;
  _Bool D.24805;
  const unsigned char * D.24808;
  unsigned char D.24809;
  int D.24810;
  const unsigned char * D.24811;
  unsigned char D.24812;
  int D.24813;
  _Bool D.24814;
  _Bool D.24815;
  const unsigned char * D.24818;
  unsigned char D.24819;
  int D.24820;
  const unsigned char * D.24821;
  unsigned char D.24822;
  int D.24823;
  int D.23083;
  int iftmp.90;
  int D.23082;
  const char[5] * D.24831;
  unsigned char D.24832;
  int D.24833;
  unsigned char D.24834;
  int D.24835;
  _Bool D.24836;
  _Bool D.24837;
  _Bool D.24838;
  const unsigned char * D.24841;
  unsigned char D.24842;
  int D.24843;
  const unsigned char * D.24844;
  unsigned char D.24845;
  int D.24846;
  _Bool D.24847;
  _Bool D.24848;
  const unsigned char * D.24851;
  unsigned char D.24852;
  int D.24853;
  const unsigned char * D.24854;
  unsigned char D.24855;
  int D.24856;
  _Bool D.24857;
  _Bool D.24858;
  const unsigned char * D.24861;
  unsigned char D.24862;
  int D.24863;
  const unsigned char * D.24864;
  unsigned char D.24865;
  int D.24866;
  int generic_sharing.91;
  gboolean D.24874;
  struct MonoImage * D.24875;
  struct MonoImage * D.24876;
  _Bool D.24877;
  struct MonoClass * D.24880;
  const char * D.24881;
  static int generic_sharing = 0;
  static gboolean inited = 0;

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

    gshared_supported.86 = gshared_supported;
    if (gshared_supported.86 != 0) goto <D.24694>; else goto <D.24695>;
    <D.24694>:
    generic_sharing = 3;
    goto <D.24696>;
    <D.24695>:
    generic_sharing = 0;
    <D.24696>:
    option = monoeg_g_getenv ("MONO_GENERIC_SHARING");
    if (option != 0B) goto <D.24697>; else goto <D.24698>;
    <D.24697>:
    {
      size_t __s1_len;
      size_t __s2_len;

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

        __s2 = option;
        D.24702 = "corlib";
        D.24703 = MEM[(const unsigned char *)D.24702];
        D.24704 = (int) D.24703;
        D.24705 = *__s2;
        D.24706 = (int) D.24705;
        __result = D.24704 - D.24706;
        {
          D.24707 = __s2_len != 0;
          D.24708 = __result == 0;
          D.24709 = D.24707 & D.24708;
          if (D.24709 != 0) goto <D.24710>; else goto <D.24711>;
          <D.24710>:
          D.24712 = &MEM[(void *)"corlib" + 1B];
          D.24713 = *D.24712;
          D.24714 = (int) D.24713;
          D.24715 = __s2 + 1;
          D.24716 = *D.24715;
          D.24717 = (int) D.24716;
          __result = D.24714 - D.24717;
          D.24718 = __s2_len > 1;
          D.24708 = __result == 0;
          D.24719 = D.24718 & D.24708;
          if (D.24719 != 0) goto <D.24720>; else goto <D.24721>;
          <D.24720>:
          D.24722 = &MEM[(void *)"corlib" + 2B];
          D.24723 = *D.24722;
          D.24724 = (int) D.24723;
          D.24725 = __s2 + 2;
          D.24726 = *D.24725;
          D.24727 = (int) D.24726;
          __result = D.24724 - D.24727;
          D.24728 = __s2_len > 2;
          D.24708 = __result == 0;
          D.24729 = D.24728 & D.24708;
          if (D.24729 != 0) goto <D.24730>; else goto <D.24731>;
          <D.24730>:
          D.24732 = &MEM[(void *)"corlib" + 3B];
          D.24733 = *D.24732;
          D.24734 = (int) D.24733;
          D.24735 = __s2 + 3;
          D.24736 = *D.24735;
          D.24737 = (int) D.24736;
          __result = D.24734 - D.24737;
          <D.24731>:
          <D.24721>:
          <D.24711>:
        }
        D.23055 = __result;
      }
      iftmp.87 = -D.23055;
      goto <D.24738>;
      <D.24701>:
      iftmp.87 = __builtin_strcmp (option, "corlib");
      <D.24738>:
      D.23056 = iftmp.87;
    }
    if (D.23056 == 0) goto <D.24739>; else goto <D.24740>;
    <D.24739>:
    generic_sharing = 2;
    goto <D.24741>;
    <D.24740>:
    {
      size_t __s1_len;
      size_t __s2_len;

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

        __s2 = option;
        D.24745 = "collections";
        D.24746 = MEM[(const unsigned char *)D.24745];
        D.24747 = (int) D.24746;
        D.24748 = *__s2;
        D.24749 = (int) D.24748;
        __result = D.24747 - D.24749;
        {
          D.24750 = __s2_len != 0;
          D.24751 = __result == 0;
          D.24752 = D.24750 & D.24751;
          if (D.24752 != 0) goto <D.24753>; else goto <D.24754>;
          <D.24753>:
          D.24755 = &MEM[(void *)"collections" + 1B];
          D.24756 = *D.24755;
          D.24757 = (int) D.24756;
          D.24758 = __s2 + 1;
          D.24759 = *D.24758;
          D.24760 = (int) D.24759;
          __result = D.24757 - D.24760;
          D.24761 = __s2_len > 1;
          D.24751 = __result == 0;
          D.24762 = D.24761 & D.24751;
          if (D.24762 != 0) goto <D.24763>; else goto <D.24764>;
          <D.24763>:
          D.24765 = &MEM[(void *)"collections" + 2B];
          D.24766 = *D.24765;
          D.24767 = (int) D.24766;
          D.24768 = __s2 + 2;
          D.24769 = *D.24768;
          D.24770 = (int) D.24769;
          __result = D.24767 - D.24770;
          D.24771 = __s2_len > 2;
          D.24751 = __result == 0;
          D.24772 = D.24771 & D.24751;
          if (D.24772 != 0) goto <D.24773>; else goto <D.24774>;
          <D.24773>:
          D.24775 = &MEM[(void *)"collections" + 3B];
          D.24776 = *D.24775;
          D.24777 = (int) D.24776;
          D.24778 = __s2 + 3;
          D.24779 = *D.24778;
          D.24780 = (int) D.24779;
          __result = D.24777 - D.24780;
          <D.24774>:
          <D.24764>:
          <D.24754>:
        }
        D.23064 = __result;
      }
      iftmp.88 = -D.23064;
      goto <D.24781>;
      <D.24744>:
      iftmp.88 = __builtin_strcmp (option, "collections");
      <D.24781>:
      D.23065 = iftmp.88;
    }
    if (D.23065 == 0) goto <D.24782>; else goto <D.24783>;
    <D.24782>:
    generic_sharing = 1;
    goto <D.24784>;
    <D.24783>:
    {
      size_t __s1_len;
      size_t __s2_len;

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

        __s2 = option;
        D.24788 = "all";
        D.24789 = MEM[(const unsigned char *)D.24788];
        D.24790 = (int) D.24789;
        D.24791 = *__s2;
        D.24792 = (int) D.24791;
        __result = D.24790 - D.24792;
        {
          D.24793 = __s2_len != 0;
          D.24794 = __result == 0;
          D.24795 = D.24793 & D.24794;
          if (D.24795 != 0) goto <D.24796>; else goto <D.24797>;
          <D.24796>:
          D.24798 = &MEM[(void *)"all" + 1B];
          D.24799 = *D.24798;
          D.24800 = (int) D.24799;
          D.24801 = __s2 + 1;
          D.24802 = *D.24801;
          D.24803 = (int) D.24802;
          __result = D.24800 - D.24803;
          D.24804 = __s2_len > 1;
          D.24794 = __result == 0;
          D.24805 = D.24804 & D.24794;
          if (D.24805 != 0) goto <D.24806>; else goto <D.24807>;
          <D.24806>:
          D.24808 = &MEM[(void *)"all" + 2B];
          D.24809 = *D.24808;
          D.24810 = (int) D.24809;
          D.24811 = __s2 + 2;
          D.24812 = *D.24811;
          D.24813 = (int) D.24812;
          __result = D.24810 - D.24813;
          D.24814 = __s2_len > 2;
          D.24794 = __result == 0;
          D.24815 = D.24814 & D.24794;
          if (D.24815 != 0) goto <D.24816>; else goto <D.24817>;
          <D.24816>:
          D.24818 = &MEM[(void *)"all" + 3B];
          D.24819 = *D.24818;
          D.24820 = (int) D.24819;
          D.24821 = __s2 + 3;
          D.24822 = *D.24821;
          D.24823 = (int) D.24822;
          __result = D.24820 - D.24823;
          <D.24817>:
          <D.24807>:
          <D.24797>:
        }
        D.23073 = __result;
      }
      iftmp.89 = -D.23073;
      goto <D.24824>;
      <D.24787>:
      iftmp.89 = __builtin_strcmp (option, "all");
      <D.24824>:
      D.23074 = iftmp.89;
    }
    if (D.23074 == 0) goto <D.24825>; else goto <D.24826>;
    <D.24825>:
    generic_sharing = 3;
    goto <D.24827>;
    <D.24826>:
    {
      size_t __s1_len;
      size_t __s2_len;

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

        __s2 = option;
        D.24831 = "none";
        D.24832 = MEM[(const unsigned char *)D.24831];
        D.24833 = (int) D.24832;
        D.24834 = *__s2;
        D.24835 = (int) D.24834;
        __result = D.24833 - D.24835;
        {
          D.24836 = __s2_len != 0;
          D.24837 = __result == 0;
          D.24838 = D.24836 & D.24837;
          if (D.24838 != 0) goto <D.24839>; else goto <D.24840>;
          <D.24839>:
          D.24841 = &MEM[(void *)"none" + 1B];
          D.24842 = *D.24841;
          D.24843 = (int) D.24842;
          D.24844 = __s2 + 1;
          D.24845 = *D.24844;
          D.24846 = (int) D.24845;
          __result = D.24843 - D.24846;
          D.24847 = __s2_len > 1;
          D.24837 = __result == 0;
          D.24848 = D.24847 & D.24837;
          if (D.24848 != 0) goto <D.24849>; else goto <D.24850>;
          <D.24849>:
          D.24851 = &MEM[(void *)"none" + 2B];
          D.24852 = *D.24851;
          D.24853 = (int) D.24852;
          D.24854 = __s2 + 2;
          D.24855 = *D.24854;
          D.24856 = (int) D.24855;
          __result = D.24853 - D.24856;
          D.24857 = __s2_len > 2;
          D.24837 = __result == 0;
          D.24858 = D.24857 & D.24837;
          if (D.24858 != 0) goto <D.24859>; else goto <D.24860>;
          <D.24859>:
          D.24861 = &MEM[(void *)"none" + 3B];
          D.24862 = *D.24861;
          D.24863 = (int) D.24862;
          D.24864 = __s2 + 3;
          D.24865 = *D.24864;
          D.24866 = (int) D.24865;
          __result = D.24863 - D.24866;
          <D.24860>:
          <D.24850>:
          <D.24840>:
        }
        D.23082 = __result;
      }
      iftmp.90 = -D.23082;
      goto <D.24867>;
      <D.24830>:
      iftmp.90 = __builtin_strcmp (option, "none");
      <D.24867>:
      D.23083 = iftmp.90;
    }
    if (D.23083 == 0) goto <D.24868>; else goto <D.24869>;
    <D.24868>:
    generic_sharing = 0;
    goto <D.24870>;
    <D.24869>:
    monoeg_g_log (0B, 16, "Unknown generic sharing option `%s\'.", option);
    <D.24870>:
    <D.24827>:
    <D.24784>:
    <D.24741>:
    <D.24698>:
    gshared_supported.86 = gshared_supported;
    if (gshared_supported.86 == 0) goto <D.24871>; else goto <D.24872>;
    <D.24871>:
    generic_sharing = 0;
    <D.24872>:
    inited = 1;
  }
  <D.24692>:
  generic_sharing.91 = generic_sharing;
  switch (generic_sharing.91) <default: <D.23091>, case 0: <D.23084>, case 1: <D.23087>, case 2: <D.23086>, case 3: <D.23085>>
  <D.23084>:
  D.24874 = 0;
  return D.24874;
  <D.23085>:
  D.24874 = 1;
  return D.24874;
  <D.23086>:
  D.24875 = class->image;
  D.24876 = mono_defaults.corlib;
  D.24877 = D.24875 == D.24876;
  D.24874 = (gboolean) D.24877;
  return D.24874;
  <D.23087>:
  D.24875 = class->image;
  D.24876 = mono_defaults.corlib;
  if (D.24875 != D.24876) goto <D.24878>; else goto <D.24879>;
  <D.24878>:
  D.24874 = 0;
  return D.24874;
  <D.24879>:
  goto <D.23089>;
  <D.23088>:
  class = class->nested_in;
  <D.23089>:
  D.24880 = class->nested_in;
  if (D.24880 != 0B) goto <D.23088>; else goto <D.23090>;
  <D.23090>:
  D.24881 = class->name_space;
  D.24874 = monoeg_g_str_has_prefix (D.24881, "System.Collections.Generic");
  return D.24874;
  <D.23091>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 2398);
  D.24874 = 0;
  return D.24874;
}


mono_get_generic_context_from_code (guint8 * code)
{
  struct MonoDomain * D.24883;
  _Bool D.24884;
  long int D.24885;
  long int D.24886;
  struct MonoGenericSharingContext * D.24889;
  struct MonoJitInfo * jit_info;

  D.24883 = mono_domain_get ();
  jit_info = mini_jit_info_table_find (D.24883, code, 0B);
  D.24884 = jit_info == 0B;
  D.24885 = (long int) D.24884;
  D.24886 = __builtin_expect (D.24885, 0);
  if (D.24886 != 0) goto <D.24887>; else goto <D.24888>;
  <D.24887>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2414, "jit_info");
  <D.24888>:
  D.24889 = mono_jit_info_get_generic_sharing_context (jit_info);
  return D.24889;
}


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

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


mono_method_check_context_used (struct MonoMethod * method)
{
  struct MonoClass * D.24895;
  unsigned char D.24896;
  int D.24900;
  int D.24901;
  struct MonoGenericContext * method_context;
  int context_used;

  method_context = mini_method_get_context (method);
  context_used = 0;
  if (method_context == 0B) goto <D.24893>; else goto <D.24894>;
  <D.24893>:
  D.24895 = method->klass;
  D.24896 = D.24895->rank;
  if (D.24896 != 0) goto <D.24897>; else goto <D.24898>;
  <D.24897>:
  D.24895 = method->klass;
  context_used = mono_class_check_context_used (D.24895);
  <D.24898>:
  goto <D.24899>;
  <D.24894>:
  context_used = mono_generic_context_check_used (method_context);
  D.24895 = method->klass;
  D.24900 = mono_class_check_context_used (D.24895);
  context_used = D.24900 | context_used;
  <D.24899>:
  D.24901 = context_used;
  return D.24901;
}


mono_generic_context_equal_deep (struct MonoGenericContext * context1, struct MonoGenericContext * context2)
{
  gboolean D.24903;
  int iftmp.92;
  struct MonoGenericInst * D.24907;
  struct MonoGenericInst * D.24908;
  int D.24909;
  struct MonoGenericInst * D.24911;
  struct MonoGenericInst * D.24912;
  int D.24913;

  D.24907 = context2->class_inst;
  D.24908 = context1->class_inst;
  D.24909 = generic_inst_equal (D.24908, D.24907);
  if (D.24909 != 0) goto <D.24910>; else goto <D.24905>;
  <D.24910>:
  D.24911 = context2->method_inst;
  D.24912 = context1->method_inst;
  D.24913 = generic_inst_equal (D.24912, D.24911);
  if (D.24913 != 0) goto <D.24914>; else goto <D.24905>;
  <D.24914>:
  iftmp.92 = 1;
  goto <D.24906>;
  <D.24905>:
  iftmp.92 = 0;
  <D.24906>:
  D.24903 = iftmp.92;
  return D.24903;
}


generic_inst_equal (struct MonoGenericInst * inst1, struct MonoGenericInst * inst2)
{
  _Bool D.24918;
  long int D.24919;
  long int D.24920;
  gboolean D.24923;
  _Bool D.24924;
  long int D.24925;
  long int D.24926;
  unsigned int D.24929;
  unsigned int D.24930;
  unsigned int D.24931;
  unsigned int D.24932;
  struct MonoType * D.24935;
  struct MonoType * D.24936;
  int D.24937;
  <unnamed-unsigned:22> D.24940;
  int D.24941;
  int i;

  if (inst1 == 0B) goto <D.24916>; else goto <D.24917>;
  <D.24916>:
  D.24918 = inst2 != 0B;
  D.24919 = (long int) D.24918;
  D.24920 = __builtin_expect (D.24919, 0);
  if (D.24920 != 0) goto <D.24921>; else goto <D.24922>;
  <D.24921>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2458, "!inst2");
  <D.24922>:
  D.24923 = 1;
  return D.24923;
  <D.24917>:
  D.24924 = inst2 == 0B;
  D.24925 = (long int) D.24924;
  D.24926 = __builtin_expect (D.24925, 0);
  if (D.24926 != 0) goto <D.24927>; else goto <D.24928>;
  <D.24927>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2462, "inst2");
  <D.24928>:
  D.24929 = BIT_FIELD_REF <*inst1, 32, 32>;
  D.24930 = BIT_FIELD_REF <*inst2, 32, 32>;
  D.24931 = D.24929 ^ D.24930;
  D.24932 = D.24931 & 4194303;
  if (D.24932 != 0) goto <D.24933>; else goto <D.24934>;
  <D.24933>:
  D.24923 = 0;
  return D.24923;
  <D.24934>:
  i = 0;
  goto <D.23110>;
  <D.23109>:
  D.24935 = inst2->type_argv[i];
  D.24936 = inst1->type_argv[i];
  D.24937 = mono_metadata_type_equal (D.24936, D.24935);
  if (D.24937 == 0) goto <D.24938>; else goto <D.24939>;
  <D.24938>:
  D.24923 = 0;
  return D.24923;
  <D.24939>:
  i = i + 1;
  <D.23110>:
  D.24940 = inst1->type_argc;
  D.24941 = (int) D.24940;
  if (D.24941 > i) goto <D.23109>; else goto <D.23111>;
  <D.23111>:
  D.24923 = 1;
  return D.24923;
}


mini_class_get_container_class (struct MonoClass * class)
{
  struct MonoGenericClass * D.24943;
  struct MonoClass * D.24946;
  struct MonoGenericContainer * D.24947;
  _Bool D.24948;
  long int D.24949;
  long int D.24950;

  D.24943 = class->generic_class;
  if (D.24943 != 0B) goto <D.24944>; else goto <D.24945>;
  <D.24944>:
  D.24943 = class->generic_class;
  D.24946 = D.24943->container_class;
  return D.24946;
  <D.24945>:
  D.24947 = class->generic_container;
  D.24948 = D.24947 == 0B;
  D.24949 = (long int) D.24948;
  D.24950 = __builtin_expect (D.24949, 0);
  if (D.24950 != 0) goto <D.24951>; else goto <D.24952>;
  <D.24951>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2502, "class->generic_container");
  <D.24952>:
  D.24946 = class;
  return D.24946;
}


mini_class_get_context (struct MonoClass * class)
{
  struct MonoGenericClass * D.24954;
  struct MonoGenericContext * D.24957;
  struct MonoGenericContainer * D.24958;
  _Bool D.24959;
  long int D.24960;
  long int D.24961;

  D.24954 = class->generic_class;
  if (D.24954 != 0B) goto <D.24955>; else goto <D.24956>;
  <D.24955>:
  D.24954 = class->generic_class;
  D.24957 = &D.24954->context;
  return D.24957;
  <D.24956>:
  D.24958 = class->generic_container;
  D.24959 = D.24958 == 0B;
  D.24960 = (long int) D.24959;
  D.24961 = __builtin_expect (D.24960, 0);
  if (D.24961 != 0) goto <D.24962>; else goto <D.24963>;
  <D.24962>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2518, "class->generic_container");
  <D.24963>:
  D.24958 = class->generic_container;
  D.24957 = &D.24958->context;
  return D.24957;
}


mini_get_basic_type_from_generic (struct MonoGenericSharingContext * gsctx, struct MonoType * type)
{
  unsigned char D.24966;
  unsigned char D.24967;
  unsigned char D.24969;
  _Bool D.24970;
  _Bool D.24971;
  _Bool D.24972;
  int D.24974;
  struct MonoType * D.24976;

  D.24966 = BIT_FIELD_REF <*type, 8, 88>;
  D.24967 = D.24966 & 64;
  if (D.24967 == 0) goto <D.24968>; else goto <D.24965>;
  <D.24968>:
  D.24969 = type->type;
  D.24970 = D.24969 == 19;
  D.24971 = D.24969 == 30;
  D.24972 = D.24970 | D.24971;
  if (D.24972 != 0) goto <D.24973>; else goto <D.24965>;
  <D.24973>:
  D.24974 = mini_is_gsharedvt_type_gsctx (gsctx, type);
  if (D.24974 != 0) goto <D.24975>; else goto <D.24965>;
  <D.24975>:
  D.24976 = type;
  return D.24976;
  <D.24965>:
  D.24976 = mono_type_get_basic_type_from_generic (type);
  return D.24976;
}


mini_type_get_underlying_type (struct MonoGenericSharingContext * gsctx, struct MonoType * type)
{
  unsigned char D.24978;
  unsigned char D.24979;
  struct MonoType * D.24982;
  struct MonoClass * D.24983;
  unsigned char D.24986;
  _Bool D.24987;
  _Bool D.24988;
  _Bool D.24989;
  int D.24992;
  struct MonoType * D.24995;

  D.24978 = BIT_FIELD_REF <*type, 8, 88>;
  D.24979 = D.24978 & 64;
  if (D.24979 != 0) goto <D.24980>; else goto <D.24981>;
  <D.24980>:
  D.24983 = mono_defaults.int_class;
  D.24982 = &D.24983->byval_arg;
  return D.24982;
  <D.24981>:
  D.24978 = BIT_FIELD_REF <*type, 8, 88>;
  D.24979 = D.24978 & 64;
  if (D.24979 == 0) goto <D.24984>; else goto <D.24985>;
  <D.24984>:
  D.24986 = type->type;
  D.24987 = D.24986 == 19;
  D.24988 = D.24986 == 30;
  D.24989 = D.24987 | D.24988;
  if (D.24989 != 0) goto <D.24990>; else goto <D.24991>;
  <D.24990>:
  D.24992 = mini_is_gsharedvt_type_gsctx (gsctx, type);
  if (D.24992 != 0) goto <D.24993>; else goto <D.24994>;
  <D.24993>:
  D.24982 = type;
  return D.24982;
  <D.24994>:
  <D.24991>:
  <D.24985>:
  D.24995 = mono_type_get_underlying_type (type);
  D.24982 = mini_get_basic_type_from_generic (gsctx, D.24995);
  return D.24982;
}


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

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


mini_type_stack_size_full (struct MonoGenericSharingContext * gsctx, struct MonoType * t, guint32 * align, gboolean pinvoke)
{
  int ialign.93;
  unsigned int ialign.94;
  int D.25007;
  int size;

  if (pinvoke != 0) goto <D.24999>; else goto <D.25000>;
  <D.24999>:
  size = mono_type_native_stack_size (t, align);
  goto <D.25001>;
  <D.25000>:
  {
    int ialign;

    try
      {
        if (align != 0B) goto <D.25002>; else goto <D.25003>;
        <D.25002>:
        size = mini_type_stack_size (gsctx, t, &ialign);
        ialign.93 = ialign;
        ialign.94 = (unsigned int) ialign.93;
        *align = ialign.94;
        goto <D.25006>;
        <D.25003>:
        size = mini_type_stack_size (gsctx, t, 0B);
        <D.25006>:
      }
    finally
      {
        ialign = {CLOBBER};
      }
  }
  <D.25001>:
  D.25007 = size;
  return D.25007;
}


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.95;
  struct GHashTable * generic_subclass_hash.96;
  struct GHashTable * old_hash;

  generic_subclass_hash.95 = generic_subclass_hash;
  if (generic_subclass_hash.95 == 0B) goto <D.25010>; else goto <D.25011>;
  <D.25010>:
  return;
  <D.25011>:
  mono_loader_lock ();
  old_hash = generic_subclass_hash;
  generic_subclass_hash.96 = monoeg_g_hash_table_new (mono_aligned_addr_hash, 0B);
  generic_subclass_hash = generic_subclass_hash.96;
  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.25014;
  struct MonoImage * D.25017;
  _Bool D.25018;
  long int D.25019;
  long int D.25020;
  struct MonoRuntimeGenericContextTemplate * D.25023;
  struct GHashTable * generic_subclass_hash.97;
  struct MonoClass * new_list;

  D.25014 = class->image;
  if (D.25014 == image) goto <D.25015>; else goto <D.25016>;
  <D.25015>:
  goto <D.22359>;
  <D.22358>:
  D.25017 = subclass->image;
  D.25018 = D.25017 != image;
  D.25019 = (long int) D.25018;
  D.25020 = __builtin_expect (D.25019, 0);
  if (D.25020 != 0) goto <D.25021>; else goto <D.25022>;
  <D.25021>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 285, "subclass->image == image");
  <D.25022>:
  D.25023 = class_lookup_rgctx_template (subclass);
  subclass = D.25023->next_subclass;
  <D.22359>:
  if (subclass != 0B) goto <D.22358>; else goto <D.22360>;
  <D.22360>:
  return;
  <D.25016>:
  new_list = 0B;
  goto <D.22364>;
  <D.22363>:
  {
    struct MonoRuntimeGenericContextTemplate * subclass_template;
    struct MonoClass * next;

    subclass_template = class_lookup_rgctx_template (subclass);
    next = subclass_template->next_subclass;
    D.25017 = subclass->image;
    if (D.25017 != image) goto <D.25024>; else goto <D.25025>;
    <D.25024>:
    subclass_template->next_subclass = new_list;
    new_list = subclass;
    <D.25025>:
    subclass = next;
  }
  <D.22364>:
  if (subclass != 0B) goto <D.22363>; else goto <D.22365>;
  <D.22365>:
  if (new_list != 0B) goto <D.25026>; else goto <D.25027>;
  <D.25026>:
  generic_subclass_hash.97 = generic_subclass_hash;
  monoeg_g_hash_table_insert_replace (generic_subclass_hash.97, class, new_list, 0);
  <D.25027>:
}


mono_generic_sharing_cleanup ()
{
  struct GHashTable * generic_subclass_hash.98;

  mono_remove_image_unload_hook (mono_class_unregister_image_generic_subclasses, 0B);
  generic_subclass_hash.98 = generic_subclass_hash;
  if (generic_subclass_hash.98 != 0B) goto <D.25031>; else goto <D.25032>;
  <D.25031>:
  generic_subclass_hash.98 = generic_subclass_hash;
  monoeg_g_hash_table_destroy (generic_subclass_hash.98);
  <D.25032>:
}


mini_type_var_is_vt (struct MonoCompile * cfg, struct MonoType * type)
{
  unsigned char D.25033;
  struct MonoGenericSharingContext * D.25037;
  gboolean * D.25038;
  struct MonoGenericParam * D.25040;
  short unsigned int D.25041;
  long unsigned int D.25042;
  long unsigned int D.25043;
  gboolean * D.25044;
  int D.25045;
  gboolean D.25047;
  gboolean * D.25051;
  gboolean * D.25053;
  int D.25054;

  D.25033 = type->type;
  if (D.25033 == 19) goto <D.25034>; else goto <D.25035>;
  <D.25034>:
  D.25037 = cfg->generic_sharing_context;
  D.25038 = D.25037->var_is_vt;
  if (D.25038 != 0B) goto <D.25039>; else goto <D.25036>;
  <D.25039>:
  D.25037 = cfg->generic_sharing_context;
  D.25038 = D.25037->var_is_vt;
  D.25040 = type->data.generic_param;
  D.25041 = D.25040->num;
  D.25042 = (long unsigned int) D.25041;
  D.25043 = D.25042 * 4;
  D.25044 = D.25038 + D.25043;
  D.25045 = *D.25044;
  if (D.25045 != 0) goto <D.25046>; else goto <D.25036>;
  <D.25046>:
  D.25047 = 1;
  return D.25047;
  <D.25036>:
  D.25047 = 0;
  return D.25047;
  <D.25035>:
  D.25033 = type->type;
  if (D.25033 == 30) goto <D.25048>; else goto <D.25049>;
  <D.25048>:
  D.25037 = cfg->generic_sharing_context;
  D.25051 = D.25037->mvar_is_vt;
  if (D.25051 != 0B) goto <D.25052>; else goto <D.25050>;
  <D.25052>:
  D.25037 = cfg->generic_sharing_context;
  D.25051 = D.25037->mvar_is_vt;
  D.25040 = type->data.generic_param;
  D.25041 = D.25040->num;
  D.25042 = (long unsigned int) D.25041;
  D.25043 = D.25042 * 4;
  D.25053 = D.25051 + D.25043;
  D.25054 = *D.25053;
  if (D.25054 != 0) goto <D.25055>; else goto <D.25050>;
  <D.25055>:
  D.25047 = 1;
  return D.25047;
  <D.25050>:
  D.25047 = 0;
  return D.25047;
  <D.25049>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 2651);
  D.25047 = 0;
  return D.25047;
}


mini_type_is_reference (struct MonoCompile * cfg, struct MonoType * type)
{
  int D.25057;
  gboolean D.25060;
  struct MonoGenericSharingContext * D.25061;
  int iftmp.99;
  unsigned char D.25067;
  _Bool D.25068;
  _Bool D.25069;
  _Bool D.25070;
  int D.25072;

  D.25057 = mono_type_is_reference (type);
  if (D.25057 != 0) goto <D.25058>; else goto <D.25059>;
  <D.25058>:
  D.25060 = 1;
  return D.25060;
  <D.25059>:
  D.25061 = cfg->generic_sharing_context;
  if (D.25061 == 0B) goto <D.25062>; else goto <D.25063>;
  <D.25062>:
  D.25060 = 0;
  return D.25060;
  <D.25063>:
  D.25067 = type->type;
  D.25068 = D.25067 == 19;
  D.25069 = D.25067 == 30;
  D.25070 = D.25068 | D.25069;
  if (D.25070 != 0) goto <D.25071>; else goto <D.25065>;
  <D.25071>:
  D.25072 = mini_type_var_is_vt (cfg, type);
  if (D.25072 == 0) goto <D.25073>; else goto <D.25065>;
  <D.25073>:
  iftmp.99 = 1;
  goto <D.25066>;
  <D.25065>:
  iftmp.99 = 0;
  <D.25066>:
  D.25060 = iftmp.99;
  return D.25060;
}


mini_method_get_rgctx (struct MonoMethod * m)
{
  struct MonoGenericContext * D.25075;
  struct MonoGenericInst * D.25076;
  void * D.25079;
  struct MonoGenericContext * D.25080;
  struct MonoGenericInst * D.25081;
  struct MonoClass * D.25082;
  struct MonoDomain * D.25083;
  struct MonoVTable * D.25084;
  struct MonoDomain * D.25085;

  D.25075 = mini_method_get_context (m);
  D.25076 = D.25075->method_inst;
  if (D.25076 != 0B) goto <D.25077>; else goto <D.25078>;
  <D.25077>:
  D.25080 = mini_method_get_context (m);
  D.25081 = D.25080->method_inst;
  D.25082 = m->klass;
  D.25083 = mono_domain_get ();
  D.25084 = mono_class_vtable (D.25083, D.25082);
  D.25079 = mono_method_lookup_rgctx (D.25084, D.25081);
  return D.25079;
  <D.25078>:
  D.25082 = m->klass;
  D.25085 = mono_domain_get ();
  D.25079 = mono_class_vtable (D.25085, D.25082);
  return D.25079;
}


mini_type_is_vtype (struct MonoCompile * cfg, struct MonoType * t)
{
  gboolean D.25087;
  int iftmp.100;
  int D.25092;
  int D.25094;

  D.25092 = mono_type_is_struct (t);
  if (D.25092 != 0) goto <D.25089>; else goto <D.25093>;
  <D.25093>:
  D.25094 = mini_is_gsharedvt_variable_type (cfg, t);
  if (D.25094 != 0) goto <D.25089>; else goto <D.25090>;
  <D.25089>:
  iftmp.100 = 1;
  goto <D.25091>;
  <D.25090>:
  iftmp.100 = 0;
  <D.25091>:
  D.25087 = iftmp.100;
  return D.25087;
}


mini_class_is_generic_sharable (struct MonoClass * klass)
{
  struct MonoGenericClass * D.25096;
  int D.25099;
  gboolean D.25102;
  int iftmp.101;
  struct MonoGenericContext * D.25107;
  int D.25108;

  D.25096 = klass->generic_class;
  if (D.25096 != 0B) goto <D.25097>; else goto <D.25098>;
  <D.25097>:
  D.25099 = is_async_state_machine_class (klass);
  if (D.25099 != 0) goto <D.25100>; else goto <D.25101>;
  <D.25100>:
  D.25102 = 0;
  return D.25102;
  <D.25101>:
  <D.25098>:
  D.25096 = klass->generic_class;
  if (D.25096 != 0B) goto <D.25106>; else goto <D.25104>;
  <D.25106>:
  D.25096 = klass->generic_class;
  D.25107 = &D.25096->context;
  D.25108 = mono_generic_context_is_sharable (D.25107, 0);
  if (D.25108 != 0) goto <D.25109>; else goto <D.25104>;
  <D.25109>:
  iftmp.101 = 1;
  goto <D.25105>;
  <D.25104>:
  iftmp.101 = 0;
  <D.25105>:
  D.25102 = iftmp.101;
  return D.25102;
}


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

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


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

  D.25114 = 0;
  return D.25114;
}


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

  D.25116 = 0;
  return D.25116;
}


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

  D.25118 = 0;
  return D.25118;
}


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

  D.25120 = 0;
  return D.25120;
}


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

  D.25122 = 0;
  return D.25122;
}


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

  D.25124 = 0;
  return D.25124;
}


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

  D.25126 = 0;
  return D.25126;
}


