mono_generic_context_check_used (struct MonoGenericContext * context)
{
  struct MonoGenericInst * D.23289;
  int D.23290;
  struct MonoGenericInst * D.23291;
  int D.23292;
  int D.23293;
  int context_used;

  context_used = 0;
  D.23289 = context->class_inst;
  D.23290 = inst_check_context_used (D.23289);
  context_used = D.23290 | context_used;
  D.23291 = context->method_inst;
  D.23292 = inst_check_context_used (D.23291);
  context_used = D.23292 | context_used;
  D.23293 = context_used;
  return D.23293;
}


inst_check_context_used (struct MonoGenericInst * inst)
{
  int D.23297;
  struct MonoType * D.23298;
  int D.23299;
  <unnamed-unsigned:22> D.23300;
  int D.23301;
  int context_used;
  int i;

  context_used = 0;
  if (inst == 0B) goto <D.23295>; else goto <D.23296>;
  <D.23295>:
  D.23297 = 0;
  return D.23297;
  <D.23296>:
  i = 0;
  goto <D.22380>;
  <D.22379>:
  D.23298 = inst->type_argv[i];
  D.23299 = type_check_context_used (D.23298, 1);
  context_used = D.23299 | context_used;
  i = i + 1;
  <D.22380>:
  D.23300 = inst->type_argc;
  D.23301 = (int) D.23300;
  if (D.23301 > i) goto <D.22379>; else goto <D.22381>;
  <D.22381>:
  D.23297 = context_used;
  return D.23297;
}


type_check_context_used (struct MonoType * type, gboolean recursive)
{
  int D.23303;
  int D.23304;
  struct MonoClass * D.23305;
  struct MonoArrayType * D.23306;
  struct MonoClass * D.23307;
  struct MonoClass * D.23310;
  struct MonoClass * D.23313;
  struct MonoGenericContainer * D.23314;
  _Bool D.23315;
  long int D.23316;
  long int D.23317;
  struct MonoGenericContext * D.23320;

  D.23303 = mono_type_get_type (type);
  switch (D.23303) <default: <D.22373>, case 18: <D.22370>, case 19: <D.22366>, case 20: <D.22369>, case 21: <D.22371>, case 29: <D.22368>, case 30: <D.22367>>
  <D.22366>:
  D.23304 = 1;
  return D.23304;
  <D.22367>:
  D.23304 = 2;
  return D.23304;
  <D.22368>:
  D.23305 = mono_type_get_class (type);
  D.23304 = mono_class_check_context_used (D.23305);
  return D.23304;
  <D.22369>:
  D.23306 = mono_type_get_array_type (type);
  D.23307 = D.23306->eklass;
  D.23304 = mono_class_check_context_used (D.23307);
  return D.23304;
  <D.22370>:
  if (recursive != 0) goto <D.23308>; else goto <D.23309>;
  <D.23308>:
  D.23310 = mono_type_get_class (type);
  D.23304 = mono_class_check_context_used (D.23310);
  return D.23304;
  <D.23309>:
  D.23304 = 0;
  return D.23304;
  <D.22371>:
  if (recursive != 0) goto <D.23311>; else goto <D.23312>;
  <D.23311>:
  {
    struct MonoGenericClass * gclass;

    gclass = type->data.generic_class;
    D.23313 = gclass->container_class;
    D.23314 = D.23313->generic_container;
    D.23315 = D.23314 == 0B;
    D.23316 = (long int) D.23315;
    D.23317 = __builtin_expect (D.23316, 0);
    if (D.23317 != 0) goto <D.23318>; else goto <D.23319>;
    <D.23318>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 64, "gclass->container_class->generic_container");
    <D.23319>:
    D.23320 = &gclass->context;
    D.23304 = mono_generic_context_check_used (D.23320);
    return D.23304;
  }
  <D.23312>:
  D.23304 = 0;
  return D.23304;
  <D.22373>:
  D.23304 = 0;
  return D.23304;
}


mono_class_check_context_used (struct MonoClass * class)
{
  struct MonoType * D.23322;
  int D.23323;
  struct MonoType * D.23324;
  int D.23325;
  struct MonoGenericClass * D.23326;
  struct MonoGenericContext * D.23329;
  int D.23330;
  struct MonoGenericContainer * D.23332;
  struct MonoGenericContext * D.23335;
  int D.23336;
  int D.23337;
  int context_used;

  context_used = 0;
  D.23322 = &class->this_arg;
  D.23323 = type_check_context_used (D.23322, 0);
  context_used = D.23323 | context_used;
  D.23324 = &class->byval_arg;
  D.23325 = type_check_context_used (D.23324, 0);
  context_used = D.23325 | context_used;
  D.23326 = class->generic_class;
  if (D.23326 != 0B) goto <D.23327>; else goto <D.23328>;
  <D.23327>:
  D.23326 = class->generic_class;
  D.23329 = &D.23326->context;
  D.23330 = mono_generic_context_check_used (D.23329);
  context_used = D.23330 | context_used;
  goto <D.23331>;
  <D.23328>:
  D.23332 = class->generic_container;
  if (D.23332 != 0B) goto <D.23333>; else goto <D.23334>;
  <D.23333>:
  D.23332 = class->generic_container;
  D.23335 = &D.23332->context;
  D.23336 = mono_generic_context_check_used (D.23335);
  context_used = D.23336 | context_used;
  <D.23334>:
  <D.23331>:
  D.23337 = context_used;
  return D.23337;
}


mono_method_get_declaring_generic_method (struct MonoMethod * method)
{
  long unsigned int D.23339;
  long unsigned int D.23340;
  _Bool D.23341;
  long int D.23342;
  long int D.23343;
  struct MonoMethod * D.23346;
  struct MonoMethodInflated * inflated;

  D.23339 = BIT_FIELD_REF <*method, 64, 256>;
  D.23340 = D.23339 & 4096;
  D.23341 = D.23340 == 0;
  D.23342 = (long int) D.23341;
  D.23343 = __builtin_expect (D.23342, 0);
  if (D.23343 != 0) goto <D.23344>; else goto <D.23345>;
  <D.23344>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 449, "method->is_inflated");
  <D.23345>:
  inflated = method;
  D.23346 = inflated->declaring;
  return D.23346;
}


mono_class_get_method_generic (struct MonoClass * klass, struct MonoMethod * method)
{
  long unsigned int D.23348;
  long unsigned int D.23349;
  struct MonoGenericClass * D.23353;
  unsigned char D.23358;
  struct MonoMethod * D.23361;
  struct MonoMethod * * D.23362;
  long unsigned int D.23363;
  long unsigned int D.23364;
  struct MonoMethod * * D.23365;
  long unsigned int D.23367;
  long unsigned int D.23368;
  struct MonoMethod * D.23371;
  unsigned int i.0;
  unsigned int D.23374;
  struct MonoGenericContext * D.23379;
  struct MonoGenericInst * D.23380;
  struct MonoMethod * declaring;
  struct MonoMethod * m;
  int i;

  D.23348 = BIT_FIELD_REF <*method, 64, 256>;
  D.23349 = D.23348 & 4096;
  if (D.23349 != 0) goto <D.23350>; else goto <D.23351>;
  <D.23350>:
  declaring = mono_method_get_declaring_generic_method (method);
  goto <D.23352>;
  <D.23351>:
  declaring = method;
  <D.23352>:
  m = 0B;
  D.23353 = klass->generic_class;
  if (D.23353 != 0B) goto <D.23354>; else goto <D.23355>;
  <D.23354>:
  m = mono_class_get_inflated_method (klass, declaring);
  <D.23355>:
  if (m == 0B) goto <D.23356>; else goto <D.23357>;
  <D.23356>:
  mono_class_setup_methods (klass);
  D.23358 = klass->exception_type;
  if (D.23358 != 0) goto <D.23359>; else goto <D.23360>;
  <D.23359>:
  D.23361 = 0B;
  return D.23361;
  <D.23360>:
  i = 0;
  goto <D.22508>;
  <D.22507>:
  D.23362 = klass->methods;
  D.23363 = (long unsigned int) i;
  D.23364 = D.23363 * 8;
  D.23365 = D.23362 + D.23364;
  m = *D.23365;
  if (m == declaring) goto <D.22506>; else goto <D.23366>;
  <D.23366>:
  D.23367 = BIT_FIELD_REF <*m, 64, 256>;
  D.23368 = D.23367 & 4096;
  if (D.23368 != 0) goto <D.23369>; else goto <D.23370>;
  <D.23369>:
  D.23371 = mono_method_get_declaring_generic_method (m);
  if (D.23371 == declaring) goto <D.22506>; else goto <D.23372>;
  <D.23372>:
  <D.23370>:
  i = i + 1;
  <D.22508>:
  i.0 = (unsigned int) i;
  D.23374 = klass->method.count;
  if (i.0 < D.23374) goto <D.22507>; else goto <D.22506>;
  <D.22506>:
  i.0 = (unsigned int) i;
  D.23374 = klass->method.count;
  if (i.0 >= D.23374) goto <D.23375>; else goto <D.23376>;
  <D.23375>:
  D.23361 = 0B;
  return D.23361;
  <D.23376>:
  <D.23357>:
  if (method != declaring) goto <D.23377>; else goto <D.23378>;
  <D.23377>:
  {
    struct MonoGenericContext context;

    try
      {
        context.class_inst = 0B;
        D.23379 = mono_method_get_context (method);
        D.23380 = D.23379->method_inst;
        context.method_inst = D.23380;
        m = mono_class_inflate_generic_method (m, &context);
      }
    finally
      {
        context = {CLOBBER};
      }
  }
  <D.23378>:
  D.23361 = m;
  return D.23361;
}


mono_is_partially_sharable_inst (struct MonoGenericInst * inst)
{
  struct MonoType * D.23385;
  int D.23386;
  unsigned char D.23388;
  <unnamed-unsigned:22> D.23390;
  int D.23391;
  gboolean D.23392;
  int iftmp.1;
  int i;
  gboolean has_refs;
  gboolean has_non_refs;

  has_refs = 0;
  has_non_refs = 0;
  i = 0;
  goto <D.22614>;
  <D.22613>:
  D.23385 = inst->type_argv[i];
  D.23386 = mono_type_is_reference (D.23385);
  if (D.23386 != 0) goto <D.23382>; else goto <D.23387>;
  <D.23387>:
  D.23385 = inst->type_argv[i];
  D.23388 = D.23385->type;
  if (D.23388 == 19) goto <D.23382>; else goto <D.23389>;
  <D.23389>:
  D.23385 = inst->type_argv[i];
  D.23388 = D.23385->type;
  if (D.23388 == 30) goto <D.23382>; else goto <D.23383>;
  <D.23382>:
  has_refs = 1;
  goto <D.23384>;
  <D.23383>:
  has_non_refs = 1;
  <D.23384>:
  i = i + 1;
  <D.22614>:
  D.23390 = inst->type_argc;
  D.23391 = (int) D.23390;
  if (D.23391 > i) goto <D.22613>; else goto <D.22615>;
  <D.22615>:
  if (has_refs != 0) goto <D.23396>; else goto <D.23394>;
  <D.23396>:
  if (has_non_refs != 0) goto <D.23397>; else goto <D.23394>;
  <D.23397>:
  iftmp.1 = 1;
  goto <D.23395>;
  <D.23394>:
  iftmp.1 = 0;
  <D.23395>:
  D.23392 = iftmp.1;
  return D.23392;
}


mini_get_gsharedvt_wrapper (gboolean gsharedvt_in, void * addr, struct MonoMethodSignature * normal_sig, struct MonoMethodSignature * gsharedvt_sig, struct MonoGenericSharingContext * gsctx, gint32 vcall_offset, gboolean calli)
{
  int inited.2;
  union mono_mutex_t * D.23402;
  _Bool D.23405;
  long int D.23406;
  long int D.23407;
  struct GHashTable * D.23410;
  struct GHashTable * D.23413;
  _Bool D.23416;
  long int D.23417;
  long int D.23418;
  void * D.23423;
  void * tramp_addr.3;
  void * tramp_addr.4;
  int mono_aot_only.5;
  struct MonoDomain * D.23437;
  int num_trampolines.6;
  int num_trampolines.7;
  _Bool D.23442;
  long int D.23443;
  long int D.23444;
  _Bool D.23449;
  long int D.23450;
  long int D.23451;
  static gboolean inited = 0;
  static int num_trampolines;
  void * res;
  void * info;
  struct MonoDomain * domain;
  struct MonoJitDomainInfo * domain_info;
  struct GSharedVtTrampInfo * tramp_info;
  struct GSharedVtTrampInfo tinfo;

  try
    {
      domain = mono_domain_get ();
      inited.2 = inited;
      if (inited.2 == 0) goto <D.23400>; else goto <D.23401>;
      <D.23400>:
      mono_counters_register ("GSHAREDVT arg trampolines", 256, &num_trampolines);
      inited = 1;
      <D.23401>:
      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.23402 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23402);
        if (ret != 0) goto <D.23403>; else goto <D.23404>;
        <D.23403>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23404>:
        D.23405 = ret != 0;
        D.23406 = (long int) D.23405;
        D.23407 = __builtin_expect (D.23406, 0);
        if (D.23407 != 0) goto <D.23408>; else goto <D.23409>;
        <D.23408>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1148, "ret == 0");
        <D.23409>:
      }
      D.23410 = domain_info->gsharedvt_arg_tramp_hash;
      if (D.23410 == 0B) goto <D.23411>; else goto <D.23412>;
      <D.23411>:
      D.23413 = monoeg_g_hash_table_new (tramp_info_hash, tramp_info_equal);
      domain_info->gsharedvt_arg_tramp_hash = D.23413;
      <D.23412>:
      D.23410 = domain_info->gsharedvt_arg_tramp_hash;
      res = monoeg_g_hash_table_lookup (D.23410, &tinfo);
      {
        int ret;

        D.23402 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23402);
        if (ret != 0) goto <D.23414>; else goto <D.23415>;
        <D.23414>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23415>:
        D.23416 = ret != 0;
        D.23417 = (long int) D.23416;
        D.23418 = __builtin_expect (D.23417, 0);
        if (D.23418 != 0) goto <D.23419>; else goto <D.23420>;
        <D.23419>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1152, "ret == 0");
        <D.23420>:
      }
      if (res != 0B) goto <D.23421>; else goto <D.23422>;
      <D.23421>:
      D.23423 = res;
      return D.23423;
      <D.23422>:
      info = mono_arch_get_gsharedvt_call_info (addr, normal_sig, gsharedvt_sig, gsctx, gsharedvt_in, vcall_offset, calli);
      if (gsharedvt_in != 0) goto <D.23424>; else goto <D.23425>;
      <D.23424>:
      {
        static void * tramp_addr;
        struct MonoMethod * wrapper;

        tramp_addr.3 = tramp_addr;
        if (tramp_addr.3 == 0B) goto <D.23427>; else goto <D.23428>;
        <D.23427>:
        wrapper = mono_marshal_get_gsharedvt_in_wrapper ();
        addr = mono_compile_method (wrapper);
        mono_memory_barrier ();
        tramp_addr = addr;
        <D.23428>:
        addr = tramp_addr;
      }
      goto <D.23429>;
      <D.23425>:
      {
        static void * tramp_addr;
        struct MonoMethod * wrapper;

        tramp_addr.4 = tramp_addr;
        if (tramp_addr.4 == 0B) goto <D.23431>; else goto <D.23432>;
        <D.23431>:
        wrapper = mono_marshal_get_gsharedvt_out_wrapper ();
        addr = mono_compile_method (wrapper);
        mono_memory_barrier ();
        tramp_addr = addr;
        <D.23432>:
        addr = tramp_addr;
      }
      <D.23429>:
      mono_aot_only.5 = mono_aot_only;
      if (mono_aot_only.5 != 0) goto <D.23434>; else goto <D.23435>;
      <D.23434>:
      addr = mono_aot_get_gsharedvt_arg_trampoline (info, addr);
      goto <D.23436>;
      <D.23435>:
      D.23437 = mono_domain_get ();
      addr = mono_arch_get_gsharedvt_arg_trampoline (D.23437, info, addr);
      <D.23436>:
      num_trampolines.6 = num_trampolines;
      num_trampolines.7 = num_trampolines.6 + 1;
      num_trampolines = num_trampolines.7;
      tramp_info = mono_domain_alloc0 (domain, 56);
      memcpy (tramp_info, &tinfo, 56);
      {
        int ret;

        D.23402 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23402);
        if (ret != 0) goto <D.23440>; else goto <D.23441>;
        <D.23440>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23441>:
        D.23442 = ret != 0;
        D.23443 = (long int) D.23442;
        D.23444 = __builtin_expect (D.23443, 0);
        if (D.23444 != 0) goto <D.23445>; else goto <D.23446>;
        <D.23445>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1193, "ret == 0");
        <D.23446>:
      }
      D.23410 = domain_info->gsharedvt_arg_tramp_hash;
      monoeg_g_hash_table_insert_replace (D.23410, tramp_info, addr, 0);
      {
        int ret;

        D.23402 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23402);
        if (ret != 0) goto <D.23447>; else goto <D.23448>;
        <D.23447>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23448>:
        D.23449 = ret != 0;
        D.23450 = (long int) D.23449;
        D.23451 = __builtin_expect (D.23450, 0);
        if (D.23451 != 0) goto <D.23452>; else goto <D.23453>;
        <D.23452>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1196, "ret == 0");
        <D.23453>:
      }
      D.23423 = addr;
      return D.23423;
    }
  finally
    {
      tinfo = {CLOBBER};
    }
}


tramp_info_equal (const void * a, const void * b)
{
  gboolean D.23456;
  int iftmp.8;
  signed long D.23460;
  long unsigned int D.23461;
  long unsigned int D.23462;
  signed long D.23463;
  long unsigned int D.23464;
  long unsigned int D.23465;
  int D.23467;
  int D.23468;
  void * D.23470;
  void * D.23471;
  struct MonoMethodSignature * D.23473;
  struct MonoMethodSignature * D.23474;
  struct MonoMethodSignature * D.23476;
  struct MonoMethodSignature * D.23477;
  struct MonoGenericInst * D.23479;
  struct MonoGenericInst * D.23480;
  struct MonoGenericInst * D.23482;
  struct MonoGenericInst * D.23483;
  struct GSharedVtTrampInfo * tramp1;
  struct GSharedVtTrampInfo * tramp2;

  tramp1 = a;
  tramp2 = b;
  D.23460 = BIT_FIELD_REF <*tramp1, 64, 0>;
  D.23461 = (long unsigned int) D.23460;
  D.23462 = D.23461;
  D.23463 = BIT_FIELD_REF <*tramp2, 64, 0>;
  D.23464 = (long unsigned int) D.23463;
  D.23465 = D.23464;
  if (D.23462 == D.23465) goto <D.23466>; else goto <D.23458>;
  <D.23466>:
  D.23467 = tramp1->vcall_offset;
  D.23468 = tramp2->vcall_offset;
  if (D.23467 == D.23468) goto <D.23469>; else goto <D.23458>;
  <D.23469>:
  D.23470 = tramp1->addr;
  D.23471 = tramp2->addr;
  if (D.23470 == D.23471) goto <D.23472>; else goto <D.23458>;
  <D.23472>:
  D.23473 = tramp1->sig;
  D.23474 = tramp2->sig;
  if (D.23473 == D.23474) goto <D.23475>; else goto <D.23458>;
  <D.23475>:
  D.23476 = tramp1->gsig;
  D.23477 = tramp2->gsig;
  if (D.23476 == D.23477) goto <D.23478>; else goto <D.23458>;
  <D.23478>:
  D.23479 = tramp1->gsctx.class_inst;
  D.23480 = tramp2->gsctx.class_inst;
  if (D.23479 == D.23480) goto <D.23481>; else goto <D.23458>;
  <D.23481>:
  D.23482 = tramp1->gsctx.method_inst;
  D.23483 = tramp2->gsctx.method_inst;
  if (D.23482 == D.23483) goto <D.23484>; else goto <D.23458>;
  <D.23484>:
  iftmp.8 = 1;
  goto <D.23459>;
  <D.23458>:
  iftmp.8 = 0;
  <D.23459>:
  D.23456 = iftmp.8;
  return D.23456;
}


tramp_info_hash (const void * key)
{
  guint D.23486;
  void * D.23487;
  long int D.23488;
  struct GSharedVtTrampInfo * tramp;

  tramp = key;
  D.23487 = tramp->addr;
  D.23488 = (long int) D.23487;
  D.23486 = (guint) D.23488;
  return D.23486;
}


mono_memory_barrier ()
{
  __sync_synchronize ();
}


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

  D.23491 = __builtin_object_size (__dest, 0);
  D.23490 = __builtin___memcpy_chk (__dest, __src, __len, D.23491);
  return D.23490;
}


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

  switch (type) <default: <D.22867>, case 0: <D.22842>, case 1: <D.22843>, case 2: <D.22844>, case 3: <D.22845>, case 4: <D.22846>, case 5: <D.22847>, case 6: <D.22849>, case 7: <D.22850>, case 8: <D.22851>, case 9: <D.22852>, case 10: <D.22853>, case 11: <D.22854>, case 12: <D.22855>, case 13: <D.22856>, case 14: <D.22857>, case 15: <D.22859>, case 16: <D.22860>, case 17: <D.22861>, case 18: <D.22862>, case 19: <D.22858>, case 20: <D.22848>, case 22: <D.22863>, case 23: <D.22864>, case 24: <D.22865>, case 25: <D.22866>>
  <D.22842>:
  D.23493 = "STATIC_DATA";
  return D.23493;
  <D.22843>:
  D.23493 = "KLASS";
  return D.23493;
  <D.22844>:
  D.23493 = "VTABLE";
  return D.23493;
  <D.22845>:
  D.23493 = "TYPE";
  return D.23493;
  <D.22846>:
  D.23493 = "REFLECTION_TYPE";
  return D.23493;
  <D.22847>:
  D.23493 = "METHOD";
  return D.23493;
  <D.22848>:
  D.23493 = "GSHAREDVT_INFO";
  return D.23493;
  <D.22849>:
  D.23493 = "GENERIC_METHOD_CODE";
  return D.23493;
  <D.22850>:
  D.23493 = "CLASS_FIELD";
  return D.23493;
  <D.22851>:
  D.23493 = "METHOD_RGCTX";
  return D.23493;
  <D.22852>:
  D.23493 = "METHOD_CONTEXT";
  return D.23493;
  <D.22853>:
  D.23493 = "REMOTING_INVOKE_WITH_CHECK";
  return D.23493;
  <D.22854>:
  D.23493 = "METHOD_DELEGATE_CODE";
  return D.23493;
  <D.22855>:
  D.23493 = "CAST_CACHE";
  return D.23493;
  <D.22856>:
  D.23493 = "ARRAY_ELEMENT_SIZE";
  return D.23493;
  <D.22857>:
  D.23493 = "VALUE_SIZE";
  return D.23493;
  <D.22858>:
  D.23493 = "CLASS_BOX_TYPE";
  return D.23493;
  <D.22859>:
  D.23493 = "FIELD_OFFSET";
  return D.23493;
  <D.22860>:
  D.23493 = "METHOD_GSHAREDVT_OUT_TRAMPOLINE";
  return D.23493;
  <D.22861>:
  D.23493 = "METHOD_GSHAREDVT_OUT_TRAMPOLINE_VIRT";
  return D.23493;
  <D.22862>:
  D.23493 = "SIG_GSHAREDVT_OUT_TRAMPOLINE_CALLI";
  return D.23493;
  <D.22863>:
  D.23493 = "MEMCPY";
  return D.23493;
  <D.22864>:
  D.23493 = "BZERO";
  return D.23493;
  <D.22865>:
  D.23493 = "NULLABLE_CLASS_BOX";
  return D.23493;
  <D.22866>:
  D.23493 = "NULLABLE_CLASS_UNBOX";
  return D.23493;
  <D.22867>:
  D.23493 = "<UNKNOWN RGCTX INFO TYPE>";
  return D.23493;
}


mini_rgctx_info_type_to_patch_info_type (MonoRgctxInfoType info_type)
{
  MonoJumpInfoType D.23495;

  switch (info_type) <default: <D.22941>, case 0: <D.22926>, case 1: <D.22927>, case 2: <D.22928>, case 3: <D.22929>, case 4: <D.22930>, case 12: <D.22931>, case 13: <D.22932>, case 14: <D.22933>, case 15: <D.22940>, case 19: <D.22934>, case 21: <D.22939>, case 22: <D.22935>, case 23: <D.22936>, case 24: <D.22937>, case 25: <D.22938>>
  <D.22926>:
  <D.22927>:
  <D.22928>:
  <D.22929>:
  <D.22930>:
  <D.22931>:
  <D.22932>:
  <D.22933>:
  <D.22934>:
  <D.22935>:
  <D.22936>:
  <D.22937>:
  <D.22938>:
  <D.22939>:
  D.23495 = 11;
  return D.23495;
  <D.22940>:
  D.23495 = 13;
  return D.23495;
  <D.22941>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1677);
  D.23495 = 4294967295;
  return D.23495;
}


mono_method_lookup_or_register_info (struct MonoMethod * method, gboolean in_mrgctx, void * data, MonoRgctxInfoType info_type, struct MonoGenericContext * generic_context)
{
  struct MonoGenericContext * D.23499;
  int iftmp.9;
  long unsigned int D.23504;
  long unsigned int D.23505;
  _Bool D.23507;
  long int D.23508;
  long int D.23509;
  <unnamed-unsigned:22> D.23512;
  _Bool D.23513;
  long int D.23514;
  long int D.23515;
  guint32 D.23521;
  unsigned int index.10;
  struct MonoClass * class;
  int type_argc;
  int index;

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

    D.23499 = mono_method_get_context (method);
    method_inst = D.23499->method_inst;
    D.23504 = BIT_FIELD_REF <*method, 64, 256>;
    D.23505 = D.23504 & 4096;
    if (D.23505 == 0) goto <D.23501>; else goto <D.23506>;
    <D.23506>:
    if (method_inst == 0B) goto <D.23501>; else goto <D.23502>;
    <D.23501>:
    iftmp.9 = 1;
    goto <D.23503>;
    <D.23502>:
    iftmp.9 = 0;
    <D.23503>:
    D.23507 = iftmp.9 != 0;
    D.23508 = (long int) D.23507;
    D.23509 = __builtin_expect (D.23508, 0);
    if (D.23509 != 0) goto <D.23510>; else goto <D.23511>;
    <D.23510>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1755, "method->is_inflated && method_inst");
    <D.23511>:
    D.23512 = method_inst->type_argc;
    type_argc = (int) D.23512;
    D.23513 = type_argc <= 0;
    D.23514 = (long int) D.23513;
    D.23515 = __builtin_expect (D.23514, 0);
    if (D.23515 != 0) goto <D.23516>; else goto <D.23517>;
    <D.23516>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1757, "type_argc > 0");
    <D.23517>:
  }
  goto <D.23518>;
  <D.23498>:
  type_argc = 0;
  <D.23518>:
  index = lookup_or_register_info (class, type_argc, data, info_type, generic_context);
  if (in_mrgctx != 0) goto <D.23519>; else goto <D.23520>;
  <D.23519>:
  index.10 = (unsigned int) index;
  D.23521 = index.10 | 2147483648;
  return D.23521;
  <D.23520>:
  D.23521 = (guint32) index;
  return D.23521;
}


lookup_or_register_info (struct MonoClass * class, int type_argc, void * data, MonoRgctxInfoType info_type, struct MonoGenericContext * generic_context)
{
  int D.23524;
  <unnamed type> D.23529;
  void * D.23531;
  int D.23532;
  int D.23535;
  int inited.11;
  int max_slot.12;
  static gboolean inited = 0;
  static int max_slot = 0;
  struct MonoRuntimeGenericContextTemplate * rgctx_template;
  struct MonoRuntimeGenericContextInfoTemplate * oti_list;
  struct MonoRuntimeGenericContextInfoTemplate * oti;
  int i;

  rgctx_template = mono_class_get_runtime_generic_context_template (class);
  class = get_shared_class (class);
  mono_loader_lock ();
  D.23524 = info_has_identity (info_type);
  if (D.23524 != 0) goto <D.23525>; else goto <D.23526>;
  <D.23525>:
  oti_list = get_info_templates (rgctx_template, type_argc);
  oti = oti_list;
  i = 0;
  goto <D.22958>;
  <D.22957>:
  {
    void * inflated_data;

    D.23529 = oti->info_type;
    if (D.23529 != info_type) goto <D.23527>; else goto <D.23530>;
    <D.23530>:
    D.23531 = oti->data;
    if (D.23531 == 0B) goto <D.23527>; else goto <D.23528>;
    <D.23527>:
    // predicted unlikely by continue predictor.
    goto <D.22956>;
    <D.23528>:
    inflated_data = inflate_info (oti, generic_context, class, 1);
    D.23532 = info_equal (data, inflated_data, info_type);
    if (D.23532 != 0) goto <D.23533>; else goto <D.23534>;
    <D.23533>:
    free_inflated_info (info_type, inflated_data);
    mono_loader_unlock ();
    D.23535 = i;
    return D.23535;
    <D.23534>:
    free_inflated_info (info_type, inflated_data);
  }
  <D.22956>:
  oti = oti->next;
  i = i + 1;
  <D.22958>:
  if (oti != 0B) goto <D.22957>; else goto <D.22959>;
  <D.22959>:
  <D.23526>:
  i = register_info (class, type_argc, data, info_type);
  mono_loader_unlock ();
  inited.11 = inited;
  if (inited.11 == 0) goto <D.23537>; else goto <D.23538>;
  <D.23537>:
  mono_counters_register ("RGCTX max slot number", 2048, &max_slot);
  inited = 1;
  <D.23538>:
  max_slot.12 = max_slot;
  if (i > max_slot.12) goto <D.23540>; else goto <D.23541>;
  <D.23540>:
  max_slot = i;
  <D.23541>:
  D.23535 = i;
  return D.23535;
}


mono_class_get_runtime_generic_context_template (struct MonoClass * class)
{
  struct MonoRuntimeGenericContextTemplate * D.23545;
  struct MonoClass * D.23546;
  int D.23549;
  void * D.23550;
  struct MonoClass * D.23553;
  struct MonoType * D.23554;
  struct MonoImage * D.23557;
  int i.13;
  <unnamed type> D.23559;
  struct MonoRuntimeGenericContextTemplate * D.23560;
  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.23543>; else goto <D.23544>;
  <D.23543>:
  D.23545 = template;
  return D.23545;
  <D.23544>:
  template = alloc_template (class);
  mono_loader_lock ();
  D.23546 = class->parent;
  if (D.23546 != 0B) goto <D.23547>; else goto <D.23548>;
  <D.23547>:
  {
    guint32 num_entries;
    int max_argc;
    int type_argc;

    D.23546 = class->parent;
    parent_template = mono_class_get_runtime_generic_context_template (D.23546);
    max_argc = template_get_max_argc (parent_template);
    type_argc = 0;
    goto <D.22633>;
    <D.22632>:
    D.23549 = rgctx_template_num_infos (parent_template, type_argc);
    num_entries = (guint32) D.23549;
    i = 0;
    goto <D.22630>;
    <D.22629>:
    {
      struct MonoRuntimeGenericContextInfoTemplate oti;

      try
        {
          D.23546 = class->parent;
          oti = class_get_rgctx_template_oti (D.23546, type_argc, i, 0, 0, 0B); [return slot optimization]
          D.23550 = oti.data;
          if (D.23550 != 0B) goto <D.23551>; else goto <D.23552>;
          <D.23551>:
          D.23550 = oti.data;
          D.23553 = mono_defaults.object_class;
          D.23554 = &D.23553->byval_arg;
          if (D.23550 != D.23554) goto <D.23555>; else goto <D.23556>;
          <D.23555>:
          D.23557 = class->image;
          i.13 = (int) i;
          D.23550 = oti.data;
          D.23559 = oti.info_type;
          rgctx_template_set_slot (D.23557, template, type_argc, i.13, D.23550, D.23559);
          <D.23556>:
          <D.23552>:
        }
      finally
        {
          oti = {CLOBBER};
        }
    }
    i = i + 1;
    <D.22630>:
    if (i < num_entries) goto <D.22629>; else goto <D.22631>;
    <D.22631>:
    type_argc = type_argc + 1;
    <D.22633>:
    if (type_argc <= max_argc) goto <D.22632>; else goto <D.22634>;
    <D.22634>:
  }
  <D.23548>:
  D.23560 = class_lookup_rgctx_template (class);
  if (D.23560 != 0B) goto <D.23561>; else goto <D.23562>;
  <D.23561>:
  template = class_lookup_rgctx_template (class);
  goto <D.23563>;
  <D.23562>:
  class_set_rgctx_template (class, template);
  D.23546 = class->parent;
  if (D.23546 != 0B) goto <D.23564>; else goto <D.23565>;
  <D.23564>:
  register_generic_subclass (class);
  <D.23565>:
  <D.23563>:
  mono_loader_unlock ();
  D.23545 = template;
  return D.23545;
}


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

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


template_get_max_argc (struct MonoRuntimeGenericContextTemplate * template)
{
  int D.23578;
  struct GSList * D.23579;
  unsigned int D.23580;

  D.23579 = template->method_templates;
  D.23580 = monoeg_g_slist_length (D.23579);
  D.23578 = (int) D.23580;
  return D.23578;
}


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

  i = 0;
  oti = get_info_templates (template, type_argc);
  goto <D.22425>;
  <D.22424>:
  i = i + 1;
  oti = oti->next;
  <D.22425>:
  if (oti != 0B) goto <D.22424>; else goto <D.22426>;
  <D.22426>:
  D.23582 = i;
  return D.23582;
}


class_get_rgctx_template_oti (struct MonoClass * class, int type_argc, guint32 slot, gboolean temporary, gboolean shared, gboolean * do_free)
{
  int iftmp.20;
  _Bool D.23592;
  long int D.23593;
  long int D.23594;
  struct MonoGenericClass * D.23598;
  struct MonoClass * D.23601;
  void * D.23602;
  struct MonoGenericContext * D.23605;
  void * D.23606;
  int tmp_do_free.21;
  <unnamed type> D.23610;
  int slot.22;
  _Bool D.23614;
  long int D.23615;
  long int D.23616;

  if (temporary == 0) goto <D.23586>; else goto <D.23590>;
  <D.23590>:
  if (do_free == 0B) goto <D.23586>; else goto <D.23587>;
  <D.23586>:
  if (temporary != 0) goto <D.23588>; else goto <D.23591>;
  <D.23591>:
  if (do_free != 0B) goto <D.23588>; else goto <D.23587>;
  <D.23588>:
  iftmp.20 = 1;
  goto <D.23589>;
  <D.23587>:
  iftmp.20 = 0;
  <D.23589>:
  D.23592 = iftmp.20 != 0;
  D.23593 = (long int) D.23592;
  D.23594 = __builtin_expect (D.23593, 0);
  if (D.23594 != 0) goto <D.23595>; else goto <D.23596>;
  <D.23595>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 886, "(temporary && do_free) || (!temporary && !do_free)");
  <D.23596>:
  D.23598 = class->generic_class;
  if (D.23598 != 0B) goto <D.23599>; else goto <D.23597>;
  <D.23599>:
  if (shared == 0) goto <D.23600>; else goto <D.23597>;
  <D.23600>:
  {
    struct MonoRuntimeGenericContextInfoTemplate oti;
    gboolean tmp_do_free;

    try
      {
        D.23598 = class->generic_class;
        D.23601 = D.23598->container_class;
        oti = class_get_rgctx_template_oti (D.23601, type_argc, slot, 1, 0, &tmp_do_free);
        D.23602 = oti.data;
        if (D.23602 != 0B) goto <D.23603>; else goto <D.23604>;
        <D.23603>:
        {
          void * info;

          info = oti.data;
          D.23598 = class->generic_class;
          D.23605 = &D.23598->context;
          D.23606 = inflate_info (&oti, D.23605, class, temporary);
          oti.data = D.23606;
          tmp_do_free.21 = tmp_do_free;
          if (tmp_do_free.21 != 0) goto <D.23608>; else goto <D.23609>;
          <D.23608>:
          D.23610 = oti.info_type;
          free_inflated_info (D.23610, info);
          <D.23609>:
        }
        <D.23604>:
        if (temporary != 0) goto <D.23611>; else goto <D.23612>;
        <D.23611>:
        *do_free = 1;
        <D.23612>:
        <retval> = oti;
        return <retval>;
      }
    finally
      {
        oti = {CLOBBER};
        tmp_do_free = {CLOBBER};
      }
  }
  <D.23597>:
  {
    struct MonoRuntimeGenericContextTemplate * template;
    struct MonoRuntimeGenericContextInfoTemplate * oti;

    template = mono_class_get_runtime_generic_context_template (class);
    slot.22 = (int) slot;
    oti = rgctx_template_get_other_slot (template, type_argc, slot.22);
    D.23614 = oti == 0B;
    D.23615 = (long int) D.23614;
    D.23616 = __builtin_expect (D.23615, 0);
    if (D.23616 != 0) goto <D.23617>; else goto <D.23618>;
    <D.23617>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 912, "oti");
    <D.23618>:
    if (temporary != 0) goto <D.23619>; else goto <D.23620>;
    <D.23619>:
    *do_free = 0;
    <D.23620>:
    <retval> = *oti;
    return <retval>;
  }
}


rgctx_template_get_other_slot (struct MonoRuntimeGenericContextTemplate * template, int type_argc, int slot)
{
  _Bool D.23623;
  long int D.23624;
  long int D.23625;
  struct MonoRuntimeGenericContextInfoTemplate * D.23630;
  int i;
  struct MonoRuntimeGenericContextInfoTemplate * oti;

  D.23623 = slot < 0;
  D.23624 = (long int) D.23623;
  D.23625 = __builtin_expect (D.23624, 0);
  if (D.23625 != 0) goto <D.23626>; else goto <D.23627>;
  <D.23626>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 189, "slot >= 0");
  <D.23627>:
  oti = get_info_templates (template, type_argc);
  i = 0;
  goto <D.22416>;
  <D.22415>:
  if (oti == 0B) goto <D.23628>; else goto <D.23629>;
  <D.23628>:
  D.23630 = 0B;
  return D.23630;
  <D.23629>:
  oti = oti->next;
  i = i + 1;
  <D.22416>:
  if (i < slot) goto <D.22415>; else goto <D.22417>;
  <D.22417>:
  D.23630 = oti;
  return D.23630;
}


rgctx_template_set_slot (struct MonoImage * image, struct MonoRuntimeGenericContextTemplate * template, int type_argc, int slot, void * data, MonoRgctxInfoType info_type)
{
  struct MonoRuntimeGenericContextInfoTemplate * list.23;
  int inited.24;
  _Bool D.23636;
  long int D.23637;
  long int D.23638;
  _Bool D.23641;
  long int D.23642;
  long int D.23643;
  struct MonoRuntimeGenericContextInfoTemplate * D.23648;
  struct MonoRuntimeGenericContextInfoTemplate * D.23651;
  void * D.23652;
  _Bool D.23653;
  long int D.23654;
  long int D.23655;
  struct MonoRuntimeGenericContextInfoTemplate * list.25;
  struct MonoClass * D.23659;
  struct MonoType * D.23660;
  int num_markers.26;
  int num_markers.27;
  int num_data.28;
  int num_data.29;
  static gboolean inited = 0;
  static int num_markers = 0;
  static int num_data = 0;
  int i;
  struct MonoRuntimeGenericContextInfoTemplate * list;
  struct MonoRuntimeGenericContextInfoTemplate * * oti;

  try
    {
      list.23 = get_info_templates (template, type_argc);
      list = list.23;
      oti = &list;
      inited.24 = inited;
      if (inited.24 == 0) goto <D.23634>; else goto <D.23635>;
      <D.23634>:
      mono_counters_register ("RGCTX oti num markers", 2048, &num_markers);
      mono_counters_register ("RGCTX oti num data", 2048, &num_data);
      inited = 1;
      <D.23635>:
      D.23636 = slot < 0;
      D.23637 = (long int) D.23636;
      D.23638 = __builtin_expect (D.23637, 0);
      if (D.23638 != 0) goto <D.23639>; else goto <D.23640>;
      <D.23639>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 414, "slot >= 0");
      <D.23640>:
      D.23641 = data == 0B;
      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", 415, "data");
      <D.23645>:
      i = 0;
      goto <D.22493>;
      <D.22492>:
      if (i > 0) goto <D.23646>; else goto <D.23647>;
      <D.23646>:
      D.23648 = *oti;
      oti = &D.23648->next;
      <D.23647>:
      D.23648 = *oti;
      if (D.23648 == 0B) goto <D.23649>; else goto <D.23650>;
      <D.23649>:
      D.23651 = alloc_oti (image);
      *oti = D.23651;
      <D.23650>:
      i = i + 1;
      <D.22493>:
      if (i <= slot) goto <D.22492>; else goto <D.22494>;
      <D.22494>:
      D.23648 = *oti;
      D.23652 = D.23648->data;
      D.23653 = D.23652 != 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", 426, "!(*oti)->data");
      <D.23657>:
      D.23648 = *oti;
      D.23648->data = data;
      D.23648 = *oti;
      D.23648->info_type = info_type;
      list.25 = list;
      set_info_templates (image, template, type_argc, list.25);
      D.23659 = mono_defaults.object_class;
      D.23660 = &D.23659->byval_arg;
      if (D.23660 == data) goto <D.23661>; else goto <D.23662>;
      <D.23661>:
      num_markers.26 = num_markers;
      num_markers.27 = num_markers.26 + 1;
      num_markers = num_markers.27;
      goto <D.23665>;
      <D.23662>:
      num_data.28 = num_data;
      num_data.29 = num_data.28 + 1;
      num_data = num_data.29;
      <D.23665>:
    }
  finally
    {
      list = {CLOBBER};
    }
}


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

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


set_info_templates (struct MonoImage * image, struct MonoRuntimeGenericContextTemplate * template, int type_argc, struct MonoRuntimeGenericContextInfoTemplate * oti)
{
  _Bool D.23678;
  long int D.23679;
  long int D.23680;
  struct GSList * D.23686;
  unsigned int D.23687;
  struct GSList * D.23688;
  int D.23689;
  unsigned int D.23690;
  _Bool D.23691;
  long int D.23692;
  long int D.23693;

  D.23678 = type_argc < 0;
  D.23679 = (long int) D.23678;
  D.23680 = __builtin_expect (D.23679, 0);
  if (D.23680 != 0) goto <D.23681>; else goto <D.23682>;
  <D.23681>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 152, "type_argc >= 0");
  <D.23682>:
  if (type_argc == 0) goto <D.23683>; else goto <D.23684>;
  <D.23683>:
  template->infos = oti;
  goto <D.23685>;
  <D.23684>:
  {
    int length;
    struct GSList * list;

    D.23686 = template->method_templates;
    D.23687 = monoeg_g_slist_length (D.23686);
    length = (int) D.23687;
    goto <D.22403>;
    <D.22402>:
    D.23686 = template->method_templates;
    D.23688 = g_slist_append_image (image, D.23686, 0B);
    template->method_templates = D.23688;
    length = length + 1;
    <D.22403>:
    if (length < type_argc) goto <D.22402>; else goto <D.22404>;
    <D.22404>:
    D.23686 = template->method_templates;
    D.23689 = type_argc + -1;
    D.23690 = (unsigned int) D.23689;
    list = monoeg_g_slist_nth (D.23686, D.23690);
    D.23691 = list == 0B;
    D.23692 = (long int) D.23691;
    D.23693 = __builtin_expect (D.23692, 0);
    if (D.23693 != 0) goto <D.23694>; else goto <D.23695>;
    <D.23694>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 166, "list");
    <D.23695>:
    list->data = oti;
  }
  <D.23685>:
}


class_lookup_rgctx_template (struct MonoClass * class)
{
  struct MonoImage * D.23696;
  struct GHashTable * D.23697;
  struct MonoRuntimeGenericContextTemplate * D.23700;
  struct MonoRuntimeGenericContextTemplate * template;

  D.23696 = class->image;
  D.23697 = D.23696->rgctx_template_hash;
  if (D.23697 == 0B) goto <D.23698>; else goto <D.23699>;
  <D.23698>:
  D.23700 = 0B;
  return D.23700;
  <D.23699>:
  D.23696 = class->image;
  D.23697 = D.23696->rgctx_template_hash;
  template = monoeg_g_hash_table_lookup (D.23697, class);
  D.23700 = template;
  return D.23700;
}


class_set_rgctx_template (struct MonoClass * class, struct MonoRuntimeGenericContextTemplate * rgctx_template)
{
  struct MonoImage * D.23702;
  struct GHashTable * D.23703;
  struct GHashTable * D.23706;

  D.23702 = class->image;
  D.23703 = D.23702->rgctx_template_hash;
  if (D.23703 == 0B) goto <D.23704>; else goto <D.23705>;
  <D.23704>:
  D.23702 = class->image;
  D.23706 = monoeg_g_hash_table_new (mono_aligned_addr_hash, 0B);
  D.23702->rgctx_template_hash = D.23706;
  <D.23705>:
  D.23702 = class->image;
  D.23703 = D.23702->rgctx_template_hash;
  monoeg_g_hash_table_insert_replace (D.23703, class, rgctx_template, 0);
}


register_generic_subclass (struct MonoClass * class)
{
  _Bool D.23707;
  long int D.23708;
  long int D.23709;
  struct MonoGenericClass * D.23712;
  struct GHashTable * generic_subclass_hash.36;
  struct GHashTable * generic_subclass_hash.37;
  struct MonoClass * parent;
  struct MonoClass * subclass;
  struct MonoRuntimeGenericContextTemplate * rgctx_template;

  parent = class->parent;
  rgctx_template = class_lookup_rgctx_template (class);
  D.23707 = rgctx_template == 0B;
  D.23708 = (long int) D.23707;
  D.23709 = __builtin_expect (D.23708, 0);
  if (D.23709 != 0) goto <D.23710>; else goto <D.23711>;
  <D.23710>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 260, "rgctx_template");
  <D.23711>:
  D.23712 = parent->generic_class;
  if (D.23712 != 0B) goto <D.23713>; else goto <D.23714>;
  <D.23713>:
  D.23712 = parent->generic_class;
  parent = D.23712->container_class;
  <D.23714>:
  generic_subclass_hash.36 = generic_subclass_hash;
  if (generic_subclass_hash.36 == 0B) goto <D.23716>; else goto <D.23717>;
  <D.23716>:
  generic_subclass_hash.37 = monoeg_g_hash_table_new (mono_aligned_addr_hash, 0B);
  generic_subclass_hash = generic_subclass_hash.37;
  <D.23717>:
  generic_subclass_hash.36 = generic_subclass_hash;
  subclass = monoeg_g_hash_table_lookup (generic_subclass_hash.36, parent);
  rgctx_template->next_subclass = subclass;
  generic_subclass_hash.36 = generic_subclass_hash;
  monoeg_g_hash_table_insert_replace (generic_subclass_hash.36, parent, class, 0);
}


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

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


class_uninstantiated (struct MonoClass * class)
{
  struct MonoGenericClass * D.23721;
  struct MonoClass * D.23724;

  D.23721 = class->generic_class;
  if (D.23721 != 0B) goto <D.23722>; else goto <D.23723>;
  <D.23722>:
  D.23721 = class->generic_class;
  D.23724 = D.23721->container_class;
  return D.23724;
  <D.23723>:
  D.23724 = class;
  return D.23724;
}


info_has_identity (MonoRgctxInfoType info_type)
{
  int D.23726;
  _Bool D.23727;

  D.23727 = info_type != 12;
  D.23726 = (int) D.23727;
  return D.23726;
}


get_info_templates (struct MonoRuntimeGenericContextTemplate * template, int type_argc)
{
  _Bool D.23729;
  long int D.23730;
  long int D.23731;
  struct MonoRuntimeGenericContextInfoTemplate * D.23736;
  struct GSList * D.23737;
  int D.23738;
  unsigned int D.23739;

  D.23729 = type_argc < 0;
  D.23730 = (long int) D.23729;
  D.23731 = __builtin_expect (D.23730, 0);
  if (D.23731 != 0) goto <D.23732>; else goto <D.23733>;
  <D.23732>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 139, "type_argc >= 0");
  <D.23733>:
  if (type_argc == 0) goto <D.23734>; else goto <D.23735>;
  <D.23734>:
  D.23736 = template->infos;
  return D.23736;
  <D.23735>:
  D.23737 = template->method_templates;
  D.23738 = type_argc + -1;
  D.23739 = (unsigned int) D.23738;
  D.23736 = monoeg_g_slist_nth_data (D.23737, D.23739);
  return D.23736;
}


inflate_info (struct MonoRuntimeGenericContextInfoTemplate * oti, struct MonoGenericContext * context, struct MonoClass * class, gboolean temporary)
{
  _Bool D.23741;
  long int D.23742;
  long int D.23743;
  struct MonoClass * D.23746;
  struct MonoType * D.23747;
  void * D.23750;
  struct MonoImage * iftmp.38;
  int D.23755;
  _Bool D.23756;
  long int D.23757;
  long int D.23758;
  struct MonoClass * D.23761;
  struct MonoType * D.23762;
  long unsigned int D.23763;
  long unsigned int D.23764;
  _Bool D.23765;
  long int D.23766;
  long int D.23767;
  unsigned char D.23773;
  const char * D.23775;
  struct MonoMethodSignature * D.23776;
  struct MonoClass * D.23777;
  _Bool D.23778;
  long int D.23779;
  long int D.23780;
  struct GPtrArray * D.23783;
  struct GPtrArray * D.23784;
  void * * D.23785;
  long unsigned int D.23786;
  long unsigned int D.23787;
  void * * D.23788;
  void * D.23789;
  struct GPtrArray * D.23790;
  unsigned int i.39;
  unsigned int D.23792;
  struct MonoClass * D.23793;
  struct MonoType * D.23794;
  struct MonoMethodSignature * D.23795;
  long unsigned int D.23796;
  long unsigned int D.23797;
  _Bool D.23798;
  long int D.23799;
  long int D.23800;
  unsigned char D.23806;
  const char * D.23808;
  struct MonoMethodSignature * D.23809;
  struct MonoClass * D.23810;
  _Bool D.23811;
  long int D.23812;
  long int D.23813;
  struct MonoClass * D.23816;
  struct MonoType * D.23817;
  long int field.40;
  struct MonoClassField * D.23819;
  long int D.23820;
  long int D.23821;
  long int D.23822;
  struct MonoClassField * D.23823;
  _Bool D.23824;
  long int D.23825;
  long int D.23826;
  long unsigned int D.23829;
  long unsigned int D.23830;
  int D.23831;
  _Bool D.23832;
  long int D.23833;
  long int D.23834;
  void * data;
  MonoRgctxInfoType info_type;
  struct MonoError error;

  try
    {
      data = oti->data;
      info_type = oti->info_type;
      D.23741 = data == 0B;
      D.23742 = (long int) D.23741;
      D.23743 = __builtin_expect (D.23742, 0);
      if (D.23743 != 0) goto <D.23744>; else goto <D.23745>;
      <D.23744>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 519, "data");
      <D.23745>:
      D.23746 = mono_defaults.object_class;
      D.23747 = &D.23746->byval_arg;
      if (D.23747 == data) goto <D.23748>; else goto <D.23749>;
      <D.23748>:
      D.23746 = mono_defaults.object_class;
      D.23750 = &D.23746->byval_arg;
      return D.23750;
      <D.23749>:
      switch (info_type) <default: <D.22572>, case 0: <D.22519>, case 1: <D.22520>, case 2: <D.22521>, case 3: <D.22522>, case 4: <D.22523>, case 5: <D.22534>, case 6: <D.22535>, case 7: <D.22561>, case 8: <D.22536>, case 9: <D.22537>, case 10: <D.22538>, case 11: <D.22539>, case 12: <D.22524>, case 13: <D.22525>, case 14: <D.22526>, case 15: <D.22562>, case 16: <D.22553>, case 17: <D.22554>, case 18: <D.22568>, case 19: <D.22527>, case 20: <D.22544>, case 21: <D.22530>, case 22: <D.22528>, case 23: <D.22529>, case 24: <D.22531>, case 25: <D.22532>>
      <D.22519>:
      <D.22520>:
      <D.22521>:
      <D.22522>:
      <D.22523>:
      <D.22524>:
      <D.22525>:
      <D.22526>:
      <D.22527>:
      <D.22528>:
      <D.22529>:
      <D.22530>:
      <D.22531>:
      <D.22532>:
      {
        void * result;

        if (temporary == 0) goto <D.23752>; else goto <D.23753>;
        <D.23752>:
        iftmp.38 = class->image;
        goto <D.23754>;
        <D.23753>:
        iftmp.38 = 0B;
        <D.23754>:
        result = mono_class_inflate_generic_type_with_mempool (iftmp.38, data, context, &error);
        D.23755 = mono_error_ok (&error);
        D.23756 = D.23755 == 0;
        D.23757 = (long int) D.23756;
        D.23758 = __builtin_expect (D.23757, 0);
        if (D.23758 != 0) goto <D.23759>; else goto <D.23760>;
        <D.23759>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 542, "mono_error_ok (&error)");
        <D.23760>:
        D.23750 = result;
        return D.23750;
      }
      <D.22534>:
      <D.22535>:
      <D.22536>:
      <D.22537>:
      <D.22538>:
      <D.22539>:
      {
        struct MonoMethod * method;
        struct MonoMethod * inflated_method;
        struct MonoType * inflated_type;
        struct MonoClass * inflated_class;

        method = data;
        D.23761 = method->klass;
        D.23762 = &D.23761->byval_arg;
        inflated_type = mono_class_inflate_generic_type (D.23762, context);
        inflated_class = mono_class_from_mono_type (inflated_type);
        mono_metadata_free_type (inflated_type);
        mono_class_init (inflated_class);
        D.23763 = BIT_FIELD_REF <*method, 64, 256>;
        D.23764 = D.23763 & 124;
        D.23765 = D.23764 != 0;
        D.23766 = (long int) D.23765;
        D.23767 = __builtin_expect (D.23766, 0);
        if (D.23767 != 0) goto <D.23768>; else goto <D.23769>;
        <D.23768>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 561, "!method->wrapper_type");
        <D.23769>:
        D.23773 = inflated_class->byval_arg.type;
        if (D.23773 == 20) goto <D.23770>; else goto <D.23774>;
        <D.23774>:
        D.23773 = inflated_class->byval_arg.type;
        if (D.23773 == 29) goto <D.23770>; else goto <D.23771>;
        <D.23770>:
        D.23775 = method->name;
        D.23776 = method->signature;
        inflated_method = mono_method_search_in_array_class (inflated_class, D.23775, D.23776);
        goto <D.23772>;
        <D.23771>:
        inflated_method = mono_class_inflate_generic_method (method, context);
        <D.23772>:
        D.23777 = inflated_method->klass;
        mono_class_init (D.23777);
        D.23777 = inflated_method->klass;
        D.23778 = D.23777 != inflated_class;
        D.23779 = (long int) D.23778;
        D.23780 = __builtin_expect (D.23779, 0);
        if (D.23780 != 0) goto <D.23781>; else goto <D.23782>;
        <D.23781>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 571, "inflated_method->klass == inflated_class");
        <D.23782>:
        D.23750 = inflated_method;
        return D.23750;
      }
      <D.22544>:
      {
        struct MonoGSharedVtMethodInfo * info;
        struct MonoGSharedVtMethodInfo * res;
        int i;

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

          D.23784 = info->entries;
          D.23785 = D.23784->pdata;
          D.23786 = (long unsigned int) i;
          D.23787 = D.23786 * 8;
          D.23788 = D.23785 + D.23787;
          otemplate = *D.23788;
          template = monoeg_malloc0 (24);
          memcpy (template, otemplate, 24);
          D.23789 = inflate_info (template, context, class, 0);
          template->data = D.23789;
          D.23790 = res->entries;
          monoeg_g_ptr_array_add (D.23790, template);
        }
        i = i + 1;
        <D.22551>:
        i.39 = (unsigned int) i;
        D.23784 = info->entries;
        D.23792 = D.23784->len;
        if (i.39 < D.23792) goto <D.22550>; else goto <D.22552>;
        <D.22552>:
        D.23750 = res;
        return D.23750;
      }
      <D.22553>:
      <D.22554>:
      {
        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.23793 = method->klass;
        D.23794 = &D.23793->byval_arg;
        inflated_type = mono_class_inflate_generic_type (D.23794, context);
        inflated_class = mono_class_from_mono_type (inflated_type);
        res = monoeg_malloc0 (16);
        D.23795 = info->sig;
        res->sig = D.23795;
        mono_metadata_free_type (inflated_type);
        mono_class_init (inflated_class);
        D.23796 = BIT_FIELD_REF <*method, 64, 256>;
        D.23797 = D.23796 & 124;
        D.23798 = D.23797 != 0;
        D.23799 = (long int) D.23798;
        D.23800 = __builtin_expect (D.23799, 0);
        if (D.23800 != 0) goto <D.23801>; else goto <D.23802>;
        <D.23801>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 616, "!method->wrapper_type");
        <D.23802>:
        D.23806 = inflated_class->byval_arg.type;
        if (D.23806 == 20) goto <D.23803>; else goto <D.23807>;
        <D.23807>:
        D.23806 = inflated_class->byval_arg.type;
        if (D.23806 == 29) goto <D.23803>; else goto <D.23804>;
        <D.23803>:
        D.23808 = method->name;
        D.23809 = method->signature;
        inflated_method = mono_method_search_in_array_class (inflated_class, D.23808, D.23809);
        goto <D.23805>;
        <D.23804>:
        inflated_method = mono_class_inflate_generic_method (method, context);
        <D.23805>:
        D.23810 = inflated_method->klass;
        mono_class_init (D.23810);
        D.23810 = inflated_method->klass;
        D.23811 = D.23810 != inflated_class;
        D.23812 = (long int) D.23811;
        D.23813 = __builtin_expect (D.23812, 0);
        if (D.23813 != 0) goto <D.23814>; else goto <D.23815>;
        <D.23814>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 626, "inflated_method->klass == inflated_class");
        <D.23815>:
        res->method = inflated_method;
        D.23750 = res;
        return D.23750;
      }
      <D.22561>:
      <D.22562>:
      {
        struct MonoClassField * field;
        struct MonoType * inflated_type;
        struct MonoClass * inflated_class;
        int i;
        void * dummy;

        try
          {
            field = data;
            D.23816 = field->parent;
            D.23817 = &D.23816->byval_arg;
            inflated_type = mono_class_inflate_generic_type (D.23817, context);
            inflated_class = mono_class_from_mono_type (inflated_type);
            field.40 = (long int) field;
            D.23816 = field->parent;
            D.23819 = D.23816->fields;
            D.23820 = (long int) D.23819;
            D.23821 = field.40 - D.23820;
            D.23822 = D.23821 /[ex] 32;
            i = (int) D.23822;
            dummy = 0B;
            mono_metadata_free_type (inflated_type);
            mono_class_get_fields (inflated_class, &dummy);
            D.23823 = inflated_class->fields;
            D.23824 = D.23823 == 0B;
            D.23825 = (long int) D.23824;
            D.23826 = __builtin_expect (D.23825, 0);
            if (D.23826 != 0) goto <D.23827>; else goto <D.23828>;
            <D.23827>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 643, "inflated_class->fields");
            <D.23828>:
            D.23823 = inflated_class->fields;
            D.23829 = (long unsigned int) i;
            D.23830 = D.23829 * 32;
            D.23750 = D.23823 + D.23830;
            return D.23750;
          }
        finally
          {
            dummy = {CLOBBER};
          }
      }
      <D.22568>:
      {
        struct MonoMethodSignature * sig;
        struct MonoMethodSignature * isig;
        struct MonoError error;

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


info_equal (void * data1, void * data2, MonoRgctxInfoType info_type)
{
  gboolean D.23841;
  struct MonoClass * D.23842;
  struct MonoClass * D.23843;
  _Bool D.23844;
  _Bool D.23845;

  switch (info_type) <default: <D.22922>, case 0: <D.22897>, case 1: <D.22898>, case 2: <D.22899>, case 3: <D.22900>, case 4: <D.22901>, case 5: <D.22910>, case 6: <D.22912>, case 7: <D.22913>, case 8: <D.22915>, case 9: <D.22916>, case 10: <D.22917>, case 11: <D.22918>, case 12: <D.22902>, case 13: <D.22903>, case 14: <D.22904>, case 15: <D.22914>, case 16: <D.22919>, case 17: <D.22920>, case 18: <D.22921>, case 19: <D.22905>, case 20: <D.22911>, case 22: <D.22906>, case 23: <D.22907>, case 24: <D.22908>, case 25: <D.22909>>
  <D.22897>:
  <D.22898>:
  <D.22899>:
  <D.22900>:
  <D.22901>:
  <D.22902>:
  <D.22903>:
  <D.22904>:
  <D.22905>:
  <D.22906>:
  <D.22907>:
  <D.22908>:
  <D.22909>:
  D.23842 = mono_class_from_mono_type (data1);
  D.23843 = mono_class_from_mono_type (data2);
  D.23844 = D.23842 == D.23843;
  D.23841 = (gboolean) D.23844;
  return D.23841;
  <D.22910>:
  <D.22911>:
  <D.22912>:
  <D.22913>:
  <D.22914>:
  <D.22915>:
  <D.22916>:
  <D.22917>:
  <D.22918>:
  <D.22919>:
  <D.22920>:
  <D.22921>:
  D.23845 = data1 == data2;
  D.23841 = (gboolean) D.23845;
  return D.23841;
  <D.22922>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1644);
  D.23841 = 0;
  return D.23841;
}


free_inflated_info (MonoRgctxInfoType info_type, void * info)
{
  if (info == 0B) goto <D.23847>; else goto <D.23848>;
  <D.23847>:
  return;
  <D.23848>:
  switch (info_type) <default: <D.22584>, case 0: <D.22577>, case 1: <D.22578>, case 2: <D.22579>, case 3: <D.22580>, case 4: <D.22581>, case 12: <D.22582>>
  <D.22577>:
  <D.22578>:
  <D.22579>:
  <D.22580>:
  <D.22581>:
  <D.22582>:
  mono_metadata_free_type (info);
  goto <D.22583>;
  <D.22584>:
  goto <D.22583>;
  <D.22583>:
}


register_info (struct MonoClass * class, int type_argc, void * data, MonoRgctxInfoType info_type)
{
  void * D.23851;
  struct MonoGenericClass * D.23853;
  void * D.23858;
  struct MonoImage * D.23860;
  struct MonoClass * D.23861;
  struct MonoType * D.23862;
  int D.23863;
  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.22886>;
  <D.22885>:
  D.23851 = oti->data;
  if (D.23851 == 0B) goto <D.22884>; else goto <D.23852>;
  <D.23852>:
  i = i + 1;
  oti = oti->next;
  <D.22886>:
  if (oti != 0B) goto <D.22885>; else goto <D.22884>;
  <D.22884>:
  parent = class->parent;
  goto <D.22891>;
  <D.22890>:
  {
    struct MonoRuntimeGenericContextTemplate * parent_template;
    struct MonoRuntimeGenericContextInfoTemplate * oti;

    D.23853 = parent->generic_class;
    if (D.23853 != 0B) goto <D.23854>; else goto <D.23855>;
    <D.23854>:
    D.23853 = parent->generic_class;
    parent = D.23853->container_class;
    <D.23855>:
    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.23856>; else goto <D.23857>;
    <D.23856>:
    D.23858 = oti->data;
    if (D.23858 != 0B) goto <D.22889>; else goto <D.23859>;
    <D.23859>:
    <D.23857>:
    D.23860 = parent->image;
    D.23861 = mono_defaults.object_class;
    D.23862 = &D.23861->byval_arg;
    rgctx_template_set_slot (D.23860, parent_template, type_argc, i, D.23862, 0);
    parent = parent->parent;
  }
  <D.22891>:
  if (parent != 0B) goto <D.22890>; else goto <D.22889>;
  <D.22889>:
  fill_in_rgctx_template_slot (class, type_argc, i, data, info_type);
  D.23863 = i;
  return D.23863;
}


fill_in_rgctx_template_slot (struct MonoClass * class, int type_argc, int index, void * data, MonoRgctxInfoType info_type)
{
  struct MonoImage * D.23865;
  struct GHashTable * generic_subclass_hash.41;
  _Bool D.23870;
  long int D.23871;
  long int D.23872;
  struct MonoClass * D.23875;
  unsigned int index.42;
  void * D.23877;
  _Bool D.23878;
  long int D.23879;
  long int D.23880;
  struct MonoRuntimeGenericContextTemplate * template;
  struct MonoClass * subclass;

  template = mono_class_get_runtime_generic_context_template (class);
  D.23865 = class->image;
  rgctx_template_set_slot (D.23865, template, type_argc, index, data, info_type);
  generic_subclass_hash.41 = generic_subclass_hash;
  if (generic_subclass_hash.41 != 0B) goto <D.23867>; else goto <D.23868>;
  <D.23867>:
  generic_subclass_hash.41 = generic_subclass_hash;
  subclass = monoeg_g_hash_table_lookup (generic_subclass_hash.41, class);
  goto <D.23869>;
  <D.23868>:
  subclass = 0B;
  <D.23869>:
  goto <D.22837>;
  <D.22836>:
  {
    struct MonoRuntimeGenericContextInfoTemplate subclass_oti;
    struct MonoRuntimeGenericContextTemplate * subclass_template;

    try
      {
        subclass_template = class_lookup_rgctx_template (subclass);
        D.23870 = subclass_template == 0B;
        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", 1509, "subclass_template");
        <D.23874>:
        D.23875 = subclass->parent;
        index.42 = (unsigned int) index;
        subclass_oti = class_get_rgctx_template_oti (D.23875, type_argc, index.42, 0, 0, 0B); [return slot optimization]
        D.23877 = subclass_oti.data;
        D.23878 = D.23877 == 0B;
        D.23879 = (long int) D.23878;
        D.23880 = __builtin_expect (D.23879, 0);
        if (D.23880 != 0) goto <D.23881>; else goto <D.23882>;
        <D.23881>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1512, "subclass_oti.data");
        <D.23882>:
        D.23877 = subclass_oti.data;
        fill_in_rgctx_template_slot (subclass, type_argc, index, D.23877, info_type);
        subclass = subclass_template->next_subclass;
      }
    finally
      {
        subclass_oti = {CLOBBER};
      }
  }
  <D.22837>:
  if (subclass != 0B) goto <D.22836>; else goto <D.22838>;
  <D.22838>:
}


mono_class_rgctx_get_array_size (int n, gboolean mrgctx)
{
  unsigned int n.43;
  _Bool D.23884;
  long int D.23885;
  long int D.23886;
  int D.23891;

  n.43 = (unsigned int) n;
  D.23884 = n.43 > 29;
  D.23885 = (long int) D.23884;
  D.23886 = __builtin_expect (D.23885, 0);
  if (D.23886 != 0) goto <D.23887>; else goto <D.23888>;
  <D.23887>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1784, "n >= 0 && n < 30");
  <D.23888>:
  if (mrgctx != 0) goto <D.23889>; else goto <D.23890>;
  <D.23889>:
  D.23891 = 6 << n;
  return D.23891;
  <D.23890>:
  D.23891 = 4 << n;
  return D.23891;
}


mono_class_fill_runtime_generic_context (struct MonoVTable * class_vtable, guint8 * caller, guint32 slot)
{
  union mono_mutex_t * D.23893;
  _Bool D.23896;
  long int D.23897;
  long int D.23898;
  int inited.44;
  int num_alloced.45;
  int num_alloced.46;
  _Bool D.23910;
  long int D.23911;
  long int D.23912;
  void * D.23915;
  static gboolean inited = 0;
  static int num_alloced = 0;
  struct MonoDomain * domain;
  void * * rgctx;
  void * info;

  domain = class_vtable->domain;
  {
    int ret;

    D.23893 = &domain->lock.mutex;
    ret = pthread_mutex_lock (D.23893);
    if (ret != 0) goto <D.23894>; else goto <D.23895>;
    <D.23894>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.23895>:
    D.23896 = ret != 0;
    D.23897 = (long int) D.23896;
    D.23898 = __builtin_expect (D.23897, 0);
    if (D.23898 != 0) goto <D.23899>; else goto <D.23900>;
    <D.23899>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1925, "ret == 0");
    <D.23900>:
  }
  inited.44 = inited;
  if (inited.44 == 0) goto <D.23902>; else goto <D.23903>;
  <D.23902>:
  mono_counters_register ("RGCTX num alloced", 2048, &num_alloced);
  inited = 1;
  <D.23903>:
  rgctx = class_vtable->runtime_generic_context;
  if (rgctx == 0B) goto <D.23904>; else goto <D.23905>;
  <D.23904>:
  rgctx = alloc_rgctx_array (domain, 0, 0);
  class_vtable->runtime_generic_context = rgctx;
  num_alloced.45 = num_alloced;
  num_alloced.46 = num_alloced.45 + 1;
  num_alloced = num_alloced.46;
  <D.23905>:
  {
    int ret;

    D.23893 = &domain->lock.mutex;
    ret = pthread_mutex_unlock (D.23893);
    if (ret != 0) goto <D.23908>; else goto <D.23909>;
    <D.23908>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.23909>:
    D.23910 = ret != 0;
    D.23911 = (long int) D.23910;
    D.23912 = __builtin_expect (D.23911, 0);
    if (D.23912 != 0) goto <D.23913>; else goto <D.23914>;
    <D.23913>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1939, "ret == 0");
    <D.23914>:
  }
  info = fill_runtime_generic_context (class_vtable, rgctx, caller, slot, 0B);
  D.23915 = info;
  return D.23915;
}


alloc_rgctx_array (struct MonoDomain * domain, int n, gboolean is_mrgctx)
{
  int D.23917;
  unsigned int D.23918;
  unsigned int D.23919;
  unsigned int size.47;
  int inited.48;
  int mrgctx_num_alloced.49;
  int mrgctx_num_alloced.50;
  int mrgctx_bytes_alloced.51;
  int mrgctx_bytes_alloced.52;
  int rgctx_num_alloced.53;
  int rgctx_num_alloced.54;
  int rgctx_bytes_alloced.55;
  int rgctx_bytes_alloced.56;
  void * * D.23935;
  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.23917 = mono_class_rgctx_get_array_size (n, is_mrgctx);
  D.23918 = (unsigned int) D.23917;
  D.23919 = D.23918 * 8;
  size = (int) D.23919;
  size.47 = (unsigned int) size;
  array = mono_domain_alloc0 (domain, size.47);
  inited.48 = inited;
  if (inited.48 == 0) goto <D.23922>; else goto <D.23923>;
  <D.23922>:
  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.23923>:
  if (is_mrgctx != 0) goto <D.23924>; else goto <D.23925>;
  <D.23924>:
  mrgctx_num_alloced.49 = mrgctx_num_alloced;
  mrgctx_num_alloced.50 = mrgctx_num_alloced.49 + 1;
  mrgctx_num_alloced = mrgctx_num_alloced.50;
  mrgctx_bytes_alloced.51 = mrgctx_bytes_alloced;
  mrgctx_bytes_alloced.52 = mrgctx_bytes_alloced.51 + size;
  mrgctx_bytes_alloced = mrgctx_bytes_alloced.52;
  goto <D.23930>;
  <D.23925>:
  rgctx_num_alloced.53 = rgctx_num_alloced;
  rgctx_num_alloced.54 = rgctx_num_alloced.53 + 1;
  rgctx_num_alloced = rgctx_num_alloced.54;
  rgctx_bytes_alloced.55 = rgctx_bytes_alloced;
  rgctx_bytes_alloced.56 = rgctx_bytes_alloced.55 + size;
  rgctx_bytes_alloced = rgctx_bytes_alloced.56;
  <D.23930>:
  D.23935 = array;
  return D.23935;
}


fill_runtime_generic_context (struct MonoVTable * class_vtable, void * * rgctx, guint8 * caller, guint32 slot, struct MonoGenericInst * method_inst)
{
  struct MonoGenericContext * iftmp.57;
  struct MonoGenericClass * D.23938;
  struct MonoGenericInst * iftmp.58;
  _Bool D.23946;
  long int D.23947;
  long int D.23948;
  union mono_mutex_t * D.23951;
  _Bool D.23954;
  long int D.23955;
  long int D.23956;
  _Bool D.23959;
  int D.23960;
  unsigned int size.59;
  unsigned int D.23964;
  int D.23969;
  int D.23970;
  unsigned int D.23971;
  unsigned int first_slot.60;
  unsigned int D.23975;
  unsigned int offset.61;
  unsigned int D.23977;
  unsigned int D.23978;
  long unsigned int D.23979;
  long unsigned int D.23980;
  void * * D.23981;
  _Bool D.23986;
  long int D.23987;
  long int D.23988;
  void * D.23991;
  long unsigned int D.23992;
  long unsigned int D.23993;
  void * * D.23994;
  void * D.23995;
  int D.23998;
  void * * D.23999;
  int D.24000;
  void * D.24001;
  _Bool D.24002;
  long int D.24003;
  long int D.24004;
  _Bool D.24009;
  long int D.24010;
  long int D.24011;
  struct MonoClass * D.24014;
  int iftmp.62;
  <unnamed-unsigned:22> D.24018;
  _Bool D.24022;
  long int D.24023;
  long int D.24024;
  _Bool D.24032;
  long int D.24033;
  long int D.24034;
  int do_free.63;
  <unnamed type> D.24040;
  void * D.24041;
  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.23938 = class->generic_class;
      if (D.23938 != 0B) goto <D.23939>; else goto <D.23940>;
      <D.23939>:
      D.23938 = class->generic_class;
      iftmp.57 = &D.23938->context;
      goto <D.23941>;
      <D.23940>:
      iftmp.57 = 0B;
      <D.23941>:
      class_context = iftmp.57;
      if (class_context != 0B) goto <D.23943>; else goto <D.23944>;
      <D.23943>:
      iftmp.58 = class_context->class_inst;
      goto <D.23945>;
      <D.23944>:
      iftmp.58 = 0B;
      <D.23945>:
      context.class_inst = iftmp.58;
      context.method_inst = method_inst;
      D.23946 = rgctx == 0B;
      D.23947 = (long int) D.23946;
      D.23948 = __builtin_expect (D.23947, 0);
      if (D.23948 != 0) goto <D.23949>; else goto <D.23950>;
      <D.23949>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1840, "rgctx");
      <D.23950>:
      {
        int ret;

        D.23951 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23951);
        if (ret != 0) goto <D.23952>; else goto <D.23953>;
        <D.23952>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23953>:
        D.23954 = ret != 0;
        D.23955 = (long int) D.23954;
        D.23956 = __builtin_expect (D.23955, 0);
        if (D.23956 != 0) goto <D.23957>; else goto <D.23958>;
        <D.23957>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1842, "ret == 0");
        <D.23958>:
      }
      first_slot = 0;
      D.23959 = method_inst != 0B;
      D.23960 = (int) D.23959;
      size = mono_class_rgctx_get_array_size (0, D.23960);
      if (method_inst != 0B) goto <D.23961>; else goto <D.23962>;
      <D.23961>:
      size.59 = (unsigned int) size;
      D.23964 = size.59 + 4294967294;
      size = (int) D.23964;
      <D.23962>:
      i = 0;
      <D.23009>:
      {
        int offset;

        if (method_inst != 0B) goto <D.23967>; else goto <D.23965>;
        <D.23967>:
        if (i == 0) goto <D.23968>; else goto <D.23965>;
        <D.23968>:
        offset = 2;
        goto <D.23966>;
        <D.23965>:
        offset = 0;
        <D.23966>:
        D.23969 = first_slot + size;
        D.23970 = D.23969 + -1;
        D.23971 = (unsigned int) D.23970;
        if (D.23971 > slot) goto <D.23972>; else goto <D.23973>;
        <D.23972>:
        first_slot.60 = (unsigned int) first_slot;
        D.23975 = slot - first_slot.60;
        offset.61 = (unsigned int) offset;
        D.23977 = D.23975 + offset.61;
        D.23978 = D.23977 + 1;
        rgctx_index = (int) D.23978;
        D.23979 = (long unsigned int) rgctx_index;
        D.23980 = D.23979 * 8;
        D.23981 = rgctx + D.23980;
        info = *D.23981;
        if (info != 0B) goto <D.23982>; else goto <D.23983>;
        <D.23982>:
        {
          int ret;

          D.23951 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.23951);
          if (ret != 0) goto <D.23984>; else goto <D.23985>;
          <D.23984>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.23985>:
          D.23986 = ret != 0;
          D.23987 = (long int) D.23986;
          D.23988 = __builtin_expect (D.23987, 0);
          if (D.23988 != 0) goto <D.23989>; else goto <D.23990>;
          <D.23989>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1863, "ret == 0");
          <D.23990>:
        }
        D.23991 = info;
        return D.23991;
        <D.23983>:
        goto <D.23008>;
        <D.23973>:
        D.23992 = (long unsigned int) offset;
        D.23993 = D.23992 * 8;
        D.23994 = rgctx + D.23993;
        D.23995 = *D.23994;
        if (D.23995 == 0B) goto <D.23996>; else goto <D.23997>;
        <D.23996>:
        D.23992 = (long unsigned int) offset;
        D.23993 = D.23992 * 8;
        D.23994 = rgctx + D.23993;
        D.23998 = i + 1;
        D.23959 = method_inst != 0B;
        D.23960 = (int) D.23959;
        D.23999 = alloc_rgctx_array (domain, D.23998, D.23960);
        *D.23994 = D.23999;
        <D.23997>:
        D.23992 = (long unsigned int) offset;
        D.23993 = D.23992 * 8;
        D.23994 = rgctx + D.23993;
        rgctx = *D.23994;
        D.24000 = size + -1;
        first_slot = D.24000 + first_slot;
        D.23998 = i + 1;
        D.23959 = method_inst != 0B;
        D.23960 = (int) D.23959;
        size = mono_class_rgctx_get_array_size (D.23998, D.23960);
      }
      i = i + 1;
      goto <D.23009>;
      <D.23008>:
      D.23979 = (long unsigned int) rgctx_index;
      D.23980 = D.23979 * 8;
      D.23981 = rgctx + D.23980;
      D.24001 = *D.23981;
      D.24002 = D.24001 != 0B;
      D.24003 = (long int) D.24002;
      D.24004 = __builtin_expect (D.24003, 0);
      if (D.24004 != 0) goto <D.24005>; else goto <D.24006>;
      <D.24005>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1875, "!rgctx [rgctx_index]");
      <D.24006>:
      {
        int ret;

        D.23951 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23951);
        if (ret != 0) goto <D.24007>; else goto <D.24008>;
        <D.24007>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.24008>:
        D.24009 = ret != 0;
        D.24010 = (long int) D.24009;
        D.24011 = __builtin_expect (D.24010, 0);
        if (D.24011 != 0) goto <D.24012>; else goto <D.24013>;
        <D.24012>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1877, "ret == 0");
        <D.24013>:
      }
      D.24014 = get_shared_class (class);
      if (method_inst != 0B) goto <D.24016>; else goto <D.24017>;
      <D.24016>:
      D.24018 = method_inst->type_argc;
      iftmp.62 = (int) D.24018;
      goto <D.24019>;
      <D.24017>:
      iftmp.62 = 0;
      <D.24019>:
      oti = class_get_rgctx_template_oti (D.24014, iftmp.62, slot, 1, 1, &do_free);
      info = instantiate_info (domain, &oti, &context, class, caller);
      {
        int ret;

        D.23951 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23951);
        if (ret != 0) goto <D.24020>; else goto <D.24021>;
        <D.24020>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.24021>:
        D.24022 = ret != 0;
        D.24023 = (long int) D.24022;
        D.24024 = __builtin_expect (D.24023, 0);
        if (D.24024 != 0) goto <D.24025>; else goto <D.24026>;
        <D.24025>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1890, "ret == 0");
        <D.24026>:
      }
      D.23979 = (long unsigned int) rgctx_index;
      D.23980 = D.23979 * 8;
      D.23981 = rgctx + D.23980;
      D.24001 = *D.23981;
      if (D.24001 != 0B) goto <D.24027>; else goto <D.24028>;
      <D.24027>:
      D.23979 = (long unsigned int) rgctx_index;
      D.23980 = D.23979 * 8;
      D.23981 = rgctx + D.23980;
      info = *D.23981;
      goto <D.24029>;
      <D.24028>:
      D.23979 = (long unsigned int) rgctx_index;
      D.23980 = D.23979 * 8;
      D.23981 = rgctx + D.23980;
      *D.23981 = info;
      <D.24029>:
      {
        int ret;

        D.23951 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23951);
        if (ret != 0) goto <D.24030>; else goto <D.24031>;
        <D.24030>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.24031>:
        D.24032 = ret != 0;
        D.24033 = (long int) D.24032;
        D.24034 = __builtin_expect (D.24033, 0);
        if (D.24034 != 0) goto <D.24035>; else goto <D.24036>;
        <D.24035>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1899, "ret == 0");
        <D.24036>:
      }
      do_free.63 = do_free;
      if (do_free.63 != 0) goto <D.24038>; else goto <D.24039>;
      <D.24038>:
      D.24040 = oti.info_type;
      D.24041 = oti.data;
      free_inflated_info (D.24040, D.24041);
      <D.24039>:
      D.23991 = info;
      return D.23991;
    }
  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.24044;
  void * D.24047;
  <unnamed type> D.24048;
  _Bool D.24049;
  long int D.24050;
  long int D.24051;
  int D.24056;
  struct MonoMethod * D.24057;
  struct MonoClass * D.24059;
  long unsigned int D.24060;
  long unsigned int D.24061;
  struct MonoType * D.24063;
  short unsigned int D.24064;
  int D.24065;
  int D.24066;
  int D.24068;
  long unsigned int D.24069;
  long unsigned int D.24070;
  long unsigned int D.24071;
  long unsigned int D.24072;
  _Bool D.24073;
  long int D.24074;
  long int D.24075;
  struct MonoGenericInst * D.24078;
  _Bool D.24079;
  long int D.24080;
  long int D.24081;
  struct MonoClass * D.24084;
  struct MonoException * D.24087;
  long unsigned int D.24088;
  long unsigned int D.24089;
  _Bool D.24090;
  long int D.24091;
  long int D.24092;
  struct MonoGenericInst * D.24095;
  _Bool D.24096;
  long int D.24097;
  long int D.24098;
  _Bool D.24101;
  long int D.24102;
  long int D.24103;
  struct MonoDomain * D.24106;
  void * D.24107;
  _Bool D.24108;
  long int D.24109;
  long int D.24110;
  _Bool D.24113;
  long int D.24114;
  long int D.24115;
  struct MonoGenericSharingContext * D.24118;
  _Bool D.24119;
  long unsigned int D.24120;
  long unsigned int D.24121;
  _Bool D.24122;
  long int D.24123;
  long int D.24124;
  struct MonoClass * D.24134;
  struct MonoClass * D.24135;
  struct MonoClass * D.24136;
  int D.22803;
  int iftmp.64;
  int D.22802;
  const char[7] * D.24141;
  unsigned char D.24142;
  int D.24143;
  unsigned char D.24144;
  int D.24145;
  const unsigned char * D.24150;
  unsigned char D.24151;
  int D.24152;
  const unsigned char * D.24153;
  unsigned char D.24154;
  int D.24155;
  const unsigned char * D.24160;
  unsigned char D.24161;
  int D.24162;
  const unsigned char * D.24163;
  unsigned char D.24164;
  int D.24165;
  const unsigned char * D.24170;
  unsigned char D.24171;
  int D.24172;
  const unsigned char * D.24173;
  unsigned char D.24174;
  int D.24175;
  const char * D.24177;
  unsigned int D.24179;
  unsigned int D.24180;
  int imt_slot.65;
  int D.24184;
  int D.24186;
  int D.24187;
  unsigned int D.24188;
  unsigned int D.24189;
  struct MonoDomain * D.24193;
  void * D.24194;
  _Bool D.24195;
  long int D.24196;
  long int D.24197;
  _Bool D.24200;
  long int D.24201;
  long int D.24202;
  struct MonoDomain * D.24205;
  void * D.24206;
  _Bool D.24209;
  long int D.24210;
  long int D.24211;
  struct MonoGenericSharingContext * D.24220;
  struct MonoMethodSignature * D.24223;
  struct MonoMethod * D.24227;
  void * D.24228;
  struct MonoGenericSharingContext * D.24229;
  struct GPtrArray * D.24230;
  unsigned int D.24231;
  long unsigned int D.24232;
  long unsigned int D.24233;
  long unsigned int D.24234;
  void * * D.24235;
  long unsigned int D.24236;
  long unsigned int D.24237;
  void * * D.24238;
  <unnamed type> D.24239;
  int align.66;
  unsigned int align.67;
  int D.24244;
  int D.24249;
  int D.24250;
  long int D.24251;
  void * D.24252;
  void * D.24253;
  unsigned int i.68;
  void * data;
  gboolean temporary;

  D.24044 = oti->data;
  if (D.24044 == 0B) goto <D.24045>; else goto <D.24046>;
  <D.24045>:
  D.24047 = 0B;
  return D.24047;
  <D.24046>:
  D.24048 = oti->info_type;
  switch (D.24048) <default: <D.22748>, case 0: <D.22743>, case 1: <D.22744>, case 2: <D.22745>, case 12: <D.22746>>
  <D.22743>:
  <D.22744>:
  <D.22745>:
  <D.22746>:
  temporary = 1;
  goto <D.22747>;
  <D.22748>:
  temporary = 0;
  <D.22747>:
  data = inflate_info (oti, context, class, temporary);
  D.24048 = oti->info_type;
  switch (D.24048) <default: <D.22824>, case 0: <D.22749>, case 1: <D.22750>, case 2: <D.22751>, case 3: <D.22761>, case 4: <D.22762>, case 5: <D.22763>, case 6: <D.22764>, case 7: <D.22768>, case 8: <D.22771>, case 9: <D.22774>, case 10: <D.22766>, case 11: <D.22767>, case 12: <D.22752>, case 13: <D.22753>, case 14: <D.22754>, case 15: <D.22769>, case 16: <D.22782>, case 17: <D.22783>, case 18: <D.22776>, case 19: <D.22755>, case 20: <D.22809>, case 22: <D.22756>, case 23: <D.22757>, case 24: <D.22758>, case 25: <D.22759>>
  <D.22749>:
  <D.22750>:
  <D.22751>:
  <D.22752>:
  <D.22753>:
  <D.22754>:
  <D.22755>:
  <D.22756>:
  <D.22757>:
  <D.22758>:
  <D.22759>:
  {
    struct MonoClass * arg_class;

    arg_class = mono_class_from_mono_type (data);
    D.24048 = oti->info_type;
    free_inflated_info (D.24048, data);
    D.24049 = arg_class == 0B;
    D.24050 = (long int) D.24049;
    D.24051 = __builtin_expect (D.24050, 0);
    if (D.24051 != 0) goto <D.24052>; else goto <D.24053>;
    <D.24052>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1239, "arg_class");
    <D.24053>:
    D.24048 = oti->info_type;
    if (D.24048 == 1) goto <D.24054>; else goto <D.24055>;
    <D.24054>:
    mono_class_compute_gc_descriptor (arg_class);
    <D.24055>:
    D.24048 = oti->info_type;
    D.24047 = class_type_info (domain, arg_class, D.24048);
    return D.24047;
  }
  <D.22761>:
  D.24047 = data;
  return D.24047;
  <D.22762>:
  D.24047 = mono_type_get_object (domain, data);
  return D.24047;
  <D.22763>:
  D.24047 = data;
  return D.24047;
  <D.22764>:
  {
    void * addr;

    addr = mono_compile_method (data);
    D.24056 = mono_method_needs_static_rgctx_invoke (data, 0);
    D.24047 = mini_add_method_trampoline (0B, data, addr, D.24056, 0);
    return D.24047;
  }
  <D.22766>:
  D.24057 = mono_marshal_get_remoting_invoke_with_check (data);
  D.24047 = mono_compile_method (D.24057);
  return D.24047;
  <D.22767>:
  D.24047 = mono_domain_alloc0 (domain, 8);
  return D.24047;
  <D.22768>:
  D.24047 = data;
  return D.24047;
  <D.22769>:
  {
    struct MonoClassField * field;

    field = data;
    D.24059 = field->parent;
    D.24060 = BIT_FIELD_REF <*D.24059, 64, 256>;
    D.24061 = D.24060 & 8;
    if (D.24061 != 0) goto <D.24062>; else goto <D.24058>;
    <D.24062>:
    D.24063 = field->type;
    D.24064 = D.24063->attrs;
    D.24065 = (int) D.24064;
    D.24066 = D.24065 & 16;
    if (D.24066 == 0) goto <D.24067>; else goto <D.24058>;
    <D.24067>:
    D.24068 = field->offset;
    D.24069 = (long unsigned int) D.24068;
    D.24070 = D.24069 + 18446744073709551600;
    D.24047 = (void *) D.24070;
    return D.24047;
    <D.24058>:
    D.24068 = field->offset;
    D.24069 = (long unsigned int) D.24068;
    D.24047 = (void *) D.24069;
    return D.24047;
  }
  <D.22771>:
  {
    struct MonoMethodInflated * method;
    struct MonoVTable * vtable;

    method = data;
    D.24071 = BIT_FIELD_REF <*method, 64, 256>;
    D.24072 = D.24071 & 4096;
    D.24073 = D.24072 == 0;
    D.24074 = (long int) D.24073;
    D.24075 = __builtin_expect (D.24074, 0);
    if (D.24075 != 0) goto <D.24076>; else goto <D.24077>;
    <D.24076>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1281, "method->method.method.is_inflated");
    <D.24077>:
    D.24078 = method->context.method_inst;
    D.24079 = D.24078 == 0B;
    D.24080 = (long int) D.24079;
    D.24081 = __builtin_expect (D.24080, 0);
    if (D.24081 != 0) goto <D.24082>; else goto <D.24083>;
    <D.24082>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1282, "method->context.method_inst");
    <D.24083>:
    D.24084 = method->method.method.klass;
    vtable = mono_class_vtable (domain, D.24084);
    if (vtable == 0B) goto <D.24085>; else goto <D.24086>;
    <D.24085>:
    D.24084 = method->method.method.klass;
    D.24087 = mono_class_get_exception_for_failure (D.24084);
    mono_raise_exception (D.24087);
    <D.24086>:
    D.24078 = method->context.method_inst;
    D.24047 = mono_method_lookup_rgctx (vtable, D.24078);
    return D.24047;
  }
  <D.22774>:
  {
    struct MonoMethodInflated * method;

    method = data;
    D.24088 = BIT_FIELD_REF <*method, 64, 256>;
    D.24089 = D.24088 & 4096;
    D.24090 = D.24089 == 0;
    D.24091 = (long int) D.24090;
    D.24092 = __builtin_expect (D.24091, 0);
    if (D.24092 != 0) goto <D.24093>; else goto <D.24094>;
    <D.24093>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1293, "method->method.method.is_inflated");
    <D.24094>:
    D.24095 = method->context.method_inst;
    D.24096 = D.24095 == 0B;
    D.24097 = (long int) D.24096;
    D.24098 = __builtin_expect (D.24097, 0);
    if (D.24098 != 0) goto <D.24099>; else goto <D.24100>;
    <D.24099>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1294, "method->context.method_inst");
    <D.24100>:
    D.24047 = method->context.method_inst;
    return D.24047;
  }
  <D.22776>:
  {
    struct MonoMethodSignature * gsig;
    struct MonoMethodSignature * sig;
    void * addr;
    struct MonoJitInfo * caller_ji;
    struct MonoGenericJitInfo * gji;

    gsig = oti->data;
    sig = data;
    D.24101 = caller == 0B;
    D.24102 = (long int) D.24101;
    D.24103 = __builtin_expect (D.24102, 0);
    if (D.24103 != 0) goto <D.24104>; else goto <D.24105>;
    <D.24104>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1310, "caller");
    <D.24105>:
    D.24106 = mono_domain_get ();
    D.24107 = mono_get_addr_from_ftnptr (caller);
    caller_ji = mini_jit_info_table_find (D.24106, D.24107, 0B);
    D.24108 = caller_ji == 0B;
    D.24109 = (long int) D.24108;
    D.24110 = __builtin_expect (D.24109, 0);
    if (D.24110 != 0) goto <D.24111>; else goto <D.24112>;
    <D.24111>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1312, "caller_ji");
    <D.24112>:
    gji = mono_jit_info_get_generic_jit_info (caller_ji);
    D.24113 = gji == 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", 1314, "gji");
    <D.24117>:
    D.24118 = gji->generic_sharing_context;
    addr = mini_get_gsharedvt_wrapper (0, 0B, sig, gsig, D.24118, -1, 1);
    D.24047 = addr;
    return D.24047;
  }
  <D.22782>:
  <D.22783>:
  {
    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.24048 = oti->info_type;
    D.24119 = D.24048 == 17;
    virtual = (gboolean) D.24119;
    callee_gji = 0B;
    call_sig = call_info->sig;
    method = call_info->method;
    D.24120 = BIT_FIELD_REF <*method, 64, 256>;
    D.24121 = D.24120 & 4096;
    D.24122 = D.24121 == 0;
    D.24123 = (long int) D.24122;
    D.24124 = __builtin_expect (D.24123, 0);
    if (D.24124 != 0) goto <D.24125>; else goto <D.24126>;
    <D.24125>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1337, "method->is_inflated");
    <D.24126>:
    if (virtual == 0) goto <D.24127>; else goto <D.24128>;
    <D.24127>:
    addr = mono_compile_method (method);
    goto <D.24129>;
    <D.24128>:
    addr = 0B;
    <D.24129>:
    if (virtual != 0) goto <D.24130>; else goto <D.24131>;
    <D.24130>:
    D.24134 = method->klass;
    D.24135 = D.24134->parent;
    D.24136 = mono_defaults.multicastdelegate_class;
    if (D.24135 == D.24136) goto <D.24137>; else goto <D.24132>;
    <D.24137>:
    {
      size_t __s1_len;
      size_t __s2_len;

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

        __s2 = method->name;
        D.24141 = "Invoke";
        D.24142 = MEM[(const unsigned char *)D.24141];
        D.24143 = (int) D.24142;
        D.24144 = *__s2;
        D.24145 = (int) D.24144;
        __result = D.24143 - D.24145;
        {
          if (__s2_len != 0) goto <D.24146>; else goto <D.24147>;
          <D.24146>:
          if (__result == 0) goto <D.24148>; else goto <D.24149>;
          <D.24148>:
          D.24150 = &MEM[(void *)"Invoke" + 1B];
          D.24151 = *D.24150;
          D.24152 = (int) D.24151;
          D.24153 = __s2 + 1;
          D.24154 = *D.24153;
          D.24155 = (int) D.24154;
          __result = D.24152 - D.24155;
          if (__s2_len > 1) goto <D.24156>; else goto <D.24157>;
          <D.24156>:
          if (__result == 0) goto <D.24158>; else goto <D.24159>;
          <D.24158>:
          D.24160 = &MEM[(void *)"Invoke" + 2B];
          D.24161 = *D.24160;
          D.24162 = (int) D.24161;
          D.24163 = __s2 + 2;
          D.24164 = *D.24163;
          D.24165 = (int) D.24164;
          __result = D.24162 - D.24165;
          if (__s2_len > 2) goto <D.24166>; else goto <D.24167>;
          <D.24166>:
          if (__result == 0) goto <D.24168>; else goto <D.24169>;
          <D.24168>:
          D.24170 = &MEM[(void *)"Invoke" + 3B];
          D.24171 = *D.24170;
          D.24172 = (int) D.24171;
          D.24173 = __s2 + 3;
          D.24174 = *D.24173;
          D.24175 = (int) D.24174;
          __result = D.24172 - D.24175;
          <D.24169>:
          <D.24167>:
          <D.24159>:
          <D.24157>:
          <D.24149>:
          <D.24147>:
        }
        D.22802 = __result;
      }
      iftmp.64 = -D.22802;
      goto <D.24176>;
      <D.24140>:
      D.24177 = method->name;
      iftmp.64 = __builtin_strcmp (D.24177, "Invoke");
      <D.24176>:
      D.22803 = iftmp.64;
    }
    if (D.22803 == 0) goto <D.24178>; else goto <D.24132>;
    <D.24178>:
    vcall_offset = -2;
    goto <D.24133>;
    <D.24132>:
    D.24134 = method->klass;
    D.24179 = D.24134->flags;
    D.24180 = D.24179 & 32;
    if (D.24180 != 0) goto <D.24181>; else goto <D.24182>;
    <D.24181>:
    {
      guint32 imt_slot;

      imt_slot = mono_method_get_imt_slot (method);
      imt_slot.65 = (int) imt_slot;
      D.24184 = imt_slot.65 + -19;
      vcall_offset = D.24184 * 8;
    }
    goto <D.24185>;
    <D.24182>:
    D.24186 = mono_method_get_vtable_index (method);
    D.24187 = D.24186 * 8;
    D.24188 = (unsigned int) D.24187;
    D.24189 = D.24188 + 56;
    vcall_offset = (gint32) D.24189;
    <D.24185>:
    <D.24133>:
    goto <D.24190>;
    <D.24131>:
    vcall_offset = -1;
    <D.24190>:
    D.24101 = caller == 0B;
    D.24102 = (long int) D.24101;
    D.24103 = __builtin_expect (D.24102, 0);
    if (D.24103 != 0) goto <D.24191>; else goto <D.24192>;
    <D.24191>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1364, "caller");
    <D.24192>:
    D.24193 = mono_domain_get ();
    D.24194 = mono_get_addr_from_ftnptr (caller);
    caller_ji = mini_jit_info_table_find (D.24193, D.24194, 0B);
    D.24195 = caller_ji == 0B;
    D.24196 = (long int) D.24195;
    D.24197 = __builtin_expect (D.24196, 0);
    if (D.24197 != 0) goto <D.24198>; else goto <D.24199>;
    <D.24198>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1366, "caller_ji");
    <D.24199>:
    gji = mono_jit_info_get_generic_jit_info (caller_ji);
    D.24200 = gji == 0B;
    D.24201 = (long int) D.24200;
    D.24202 = __builtin_expect (D.24201, 0);
    if (D.24202 != 0) goto <D.24203>; else goto <D.24204>;
    <D.24203>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1368, "gji");
    <D.24204>:
    D.24205 = mono_domain_get ();
    D.24206 = mono_get_addr_from_ftnptr (addr);
    callee_ji = mini_jit_info_table_find (D.24205, D.24206, 0B);
    callee_gsharedvt = ji_is_gsharedvt (callee_ji);
    if (callee_gsharedvt != 0) goto <D.24207>; else goto <D.24208>;
    <D.24207>:
    callee_gji = mono_jit_info_get_generic_jit_info (callee_ji);
    D.24209 = callee_gji == 0B;
    D.24210 = (long int) D.24209;
    D.24211 = __builtin_expect (D.24210, 0);
    if (D.24211 != 0) goto <D.24212>; else goto <D.24213>;
    <D.24212>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1375, "callee_gji");
    <D.24213>:
    <D.24208>:
    if (virtual != 0) goto <D.24214>; else goto <D.24217>;
    <D.24217>:
    if (callee_gsharedvt == 0) goto <D.24214>; else goto <D.24215>;
    <D.24214>:
    {
      struct MonoMethodSignature * sig;
      struct MonoMethodSignature * gsig;

      D.24120 = BIT_FIELD_REF <*method, 64, 256>;
      D.24121 = D.24120 & 4096;
      D.24122 = D.24121 == 0;
      D.24123 = (long int) D.24122;
      D.24124 = __builtin_expect (D.24123, 0);
      if (D.24124 != 0) goto <D.24218>; else goto <D.24219>;
      <D.24218>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1392, "method->is_inflated");
      <D.24219>:
      sig = mono_method_signature (method);
      gsig = call_sig;
      D.24220 = gji->generic_sharing_context;
      addr = mini_get_gsharedvt_wrapper (0, addr, sig, gsig, D.24220, vcall_offset, 0);
    }
    goto <D.24216>;
    <D.24215>:
    if (callee_gsharedvt != 0) goto <D.24221>; else goto <D.24222>;
    <D.24221>:
    {
      struct MonoMethodSignature * sig;
      struct MonoMethodSignature * gsig;

      D.24223 = mono_method_signature (method);
      if (D.24223 == call_sig) goto <D.24224>; else goto <D.24225>;
      <D.24224>:
      goto <D.24226>;
      <D.24225>:
      sig = mono_method_signature (method);
      D.24227 = jinfo_get_method (callee_ji);
      gsig = mono_method_signature (D.24227);
      D.24228 = callee_ji->code_start;
      D.24229 = callee_gji->generic_sharing_context;
      addr = mini_get_gsharedvt_wrapper (1, D.24228, sig, gsig, D.24229, -1, 0);
      sig = mono_method_signature (method);
      gsig = call_sig;
      D.24220 = gji->generic_sharing_context;
      addr = mini_get_gsharedvt_wrapper (0, addr, sig, gsig, D.24220, -1, 0);
      <D.24226>:
    }
    <D.24222>:
    <D.24216>:
    D.24047 = addr;
    return D.24047;
  }
  <D.22809>:
  {
    struct MonoGSharedVtMethodInfo * info;
    struct MonoGSharedVtMethodRuntimeInfo * res;
    struct MonoType * t;
    int i;
    int offset;
    int align;
    int size;

    try
      {
        info = data;
        D.24230 = info->entries;
        D.24231 = D.24230->len;
        D.24232 = (long unsigned int) D.24231;
        D.24233 = D.24232 + 1;
        D.24234 = D.24233 * 8;
        res = monoeg_malloc0 (D.24234);
        offset = 0;
        i = 0;
        goto <D.22822>;
        <D.22821>:
        {
          struct MonoRuntimeGenericContextInfoTemplate * template;

          D.24230 = info->entries;
          D.24235 = D.24230->pdata;
          D.24236 = (long unsigned int) i;
          D.24237 = D.24236 * 8;
          D.24238 = D.24235 + D.24237;
          template = *D.24238;
          D.24239 = template->info_type;
          switch (D.24239) <default: <D.22820>, case 21: <D.22818>>
          <D.22818>:
          t = template->data;
          size = mono_type_size (t, &align);
          align.66 = align;
          align.67 = (unsigned int) align.66;
          if (align.67 <= 7) goto <D.24242>; else goto <D.24243>;
          <D.24242>:
          align = 8;
          <D.24243>:
          D.24244 = mono_type_is_struct (t);
          if (D.24244 != 0) goto <D.24245>; else goto <D.24246>;
          <D.24245>:
          align.66 = align;
          align.67 = (unsigned int) align.66;
          if (align.67 <= 15) goto <D.24247>; else goto <D.24248>;
          <D.24247>:
          align = 16;
          <D.24248>:
          <D.24246>:
          align.66 = align;
          D.24249 = align.66 + -1;
          offset = D.24249 + offset;
          align.66 = align;
          D.24250 = -align.66;
          offset = D.24250 & offset;
          D.24251 = (long int) offset;
          D.24252 = (void *) D.24251;
          res->entries[i] = D.24252;
          offset = offset + size;
          goto <D.22819>;
          <D.22820>:
          D.24253 = instantiate_info (domain, template, context, class, 0B);
          res->entries[i] = D.24253;
          goto <D.22819>;
          <D.22819>:
        }
        i = i + 1;
        <D.22822>:
        i.68 = (unsigned int) i;
        D.24230 = info->entries;
        D.24231 = D.24230->len;
        if (i.68 < D.24231) goto <D.22821>; else goto <D.22823>;
        <D.22823>:
        res->locals_size = offset;
        D.24047 = res;
        return D.24047;
      }
    finally
      {
        align = {CLOBBER};
      }
  }
  <D.22824>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1482);
  D.24047 = 0B;
  return D.24047;
}


class_type_info (struct MonoDomain * domain, struct MonoClass * class, MonoRgctxInfoType info_type)
{
  struct MonoException * D.24259;
  void * D.24260;
  struct MonoException * D.24263;
  void * * * D.24264;
  int D.24265;
  long unsigned int D.24266;
  struct MonoType * D.24267;
  int D.24268;
  int D.24271;
  long unsigned int D.24272;
  int D.24273;
  int D.24276;
  int D.24279;
  unsigned int size.69;
  unsigned int D.24284;
  unsigned int size.70;
  unsigned int align.71;
  struct MonoMethod * D.24297;
  struct MonoClass * D.24303;
  _Bool D.24304;
  long int D.24305;
  long int D.24306;
  void * * D.24309;
  struct MonoMethod * D.24312;
  _Bool D.24318;
  long int D.24319;
  long int D.24320;
  void * * D.24323;
  int D.24326;
  struct MonoDomain * D.24332;
  void * D.24333;
  _Bool D.24334;
  long int D.24335;
  long int D.24336;
  int D.24339;

  switch (info_type) <default: <D.22686>, case 0: <D.22653>, case 1: <D.22655>, case 2: <D.22656>, case 12: <D.22658>, case 13: <D.22660>, case 14: <D.22661>, case 19: <D.22662>, case 22: <D.22663>, case 23: <D.22664>, case 24: <D.22676>, case 25: <D.22677>>
  <D.22653>:
  {
    struct MonoVTable * vtable;

    vtable = mono_class_vtable (domain, class);
    if (vtable == 0B) goto <D.24257>; else goto <D.24258>;
    <D.24257>:
    D.24259 = mono_class_get_exception_for_failure (class);
    mono_raise_exception (D.24259);
    <D.24258>:
    D.24260 = mono_vtable_get_static_field_data (vtable);
    return D.24260;
  }
  <D.22655>:
  D.24260 = class;
  return D.24260;
  <D.22656>:
  {
    struct MonoVTable * vtable;

    vtable = mono_class_vtable (domain, class);
    if (vtable == 0B) goto <D.24261>; else goto <D.24262>;
    <D.24261>:
    D.24263 = mono_class_get_exception_for_failure (class);
    mono_raise_exception (D.24263);
    <D.24262>:
    D.24260 = vtable;
    return D.24260;
  }
  <D.22658>:
  {
    void * * * cache_data;

    cache_data = mono_domain_alloc0 (domain, 16);
    D.24264 = cache_data + 8;
    *D.24264 = class;
    D.24260 = cache_data;
    return D.24260;
  }
  <D.22660>:
  D.24265 = mono_class_array_element_size (class);
  D.24266 = (long unsigned int) D.24265;
  D.24260 = (void *) D.24266;
  return D.24260;
  <D.22661>:
  D.24267 = &class->byval_arg;
  D.24268 = mono_type_is_reference (D.24267);
  if (D.24268 != 0) goto <D.24269>; else goto <D.24270>;
  <D.24269>:
  D.24260 = 8B;
  return D.24260;
  <D.24270>:
  D.24271 = mono_class_value_size (class, 0B);
  D.24272 = (long unsigned int) D.24271;
  D.24260 = (void *) D.24272;
  return D.24260;
  <D.22662>:
  D.24267 = &class->byval_arg;
  D.24273 = mono_type_is_reference (D.24267);
  if (D.24273 != 0) goto <D.24274>; else goto <D.24275>;
  <D.24274>:
  D.24260 = 1B;
  return D.24260;
  <D.24275>:
  D.24276 = mono_class_is_nullable (class);
  if (D.24276 != 0) goto <D.24277>; else goto <D.24278>;
  <D.24277>:
  D.24260 = 2B;
  return D.24260;
  <D.24278>:
  D.24260 = 0B;
  return D.24260;
  <D.22663>:
  <D.22664>:
  {
    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.24267 = &class->byval_arg;
        D.24279 = mono_type_is_reference (D.24267);
        if (D.24279 != 0) goto <D.24280>; else goto <D.24281>;
        <D.24280>:
        size = 8;
        align = 8;
        goto <D.24282>;
        <D.24281>:
        size = mono_class_value_size (class, &align);
        <D.24282>:
        size.69 = (unsigned int) size;
        D.24284 = size.69 + 4294967295;
        if (D.24284 > 1) goto <D.24285>; else goto <D.24286>;
        <D.24285>:
        if (size != 4) goto <D.24287>; else goto <D.24288>;
        <D.24287>:
        if (size != 8) goto <D.24289>; else goto <D.24290>;
        <D.24289>:
        size = 0;
        <D.24290>:
        <D.24288>:
        <D.24286>:
        size.70 = (unsigned int) size;
        align.71 = align;
        if (size.70 > align.71) goto <D.24293>; else goto <D.24294>;
        <D.24293>:
        size = 0;
        <D.24294>:
        if (info_type == 22) goto <D.24295>; else goto <D.24296>;
        <D.24295>:
        D.24297 = memcpy_method[size];
        if (D.24297 == 0B) goto <D.24298>; else goto <D.24299>;
        <D.24298>:
        {
          struct MonoMethod * m;
          char name[32];

          try
            {
              if (size == 0) goto <D.24300>; else goto <D.24301>;
              <D.24300>:
              sprintf (&name, "memcpy");
              goto <D.24302>;
              <D.24301>:
              sprintf (&name, "memcpy_aligned_%d", size);
              <D.24302>:
              D.24303 = mono_defaults.string_class;
              m = mono_class_get_method_from_name (D.24303, &name, 3);
              D.24304 = m == 0B;
              D.24305 = (long int) D.24304;
              D.24306 = __builtin_expect (D.24305, 0);
              if (D.24306 != 0) goto <D.24307>; else goto <D.24308>;
              <D.24307>:
              monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 991, "m");
              <D.24308>:
              mono_memory_barrier ();
              memcpy_method[size] = m;
            }
          finally
            {
              name = {CLOBBER};
            }
        }
        <D.24299>:
        D.24309 = domain_info->memcpy_addr[size];
        if (D.24309 == 0B) goto <D.24310>; else goto <D.24311>;
        <D.24310>:
        {
          void * addr;

          D.24297 = memcpy_method[size];
          addr = mono_compile_method (D.24297);
          mono_memory_barrier ();
          domain_info->memcpy_addr[size] = addr;
        }
        <D.24311>:
        D.24260 = domain_info->memcpy_addr[size];
        return D.24260;
        <D.24296>:
        D.24312 = bzero_method[size];
        if (D.24312 == 0B) goto <D.24313>; else goto <D.24314>;
        <D.24313>:
        {
          struct MonoMethod * m;
          char name[32];

          try
            {
              if (size == 0) goto <D.24315>; else goto <D.24316>;
              <D.24315>:
              sprintf (&name, "bzero");
              goto <D.24317>;
              <D.24316>:
              sprintf (&name, "bzero_aligned_%d", size);
              <D.24317>:
              D.24303 = mono_defaults.string_class;
              m = mono_class_get_method_from_name (D.24303, &name, 2);
              D.24318 = m == 0B;
              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", 1011, "m");
              <D.24322>:
              mono_memory_barrier ();
              bzero_method[size] = m;
            }
          finally
            {
              name = {CLOBBER};
            }
        }
        <D.24314>:
        D.24323 = domain_info->bzero_addr[size];
        if (D.24323 == 0B) goto <D.24324>; else goto <D.24325>;
        <D.24324>:
        {
          void * addr;

          D.24312 = bzero_method[size];
          addr = mono_compile_method (D.24312);
          mono_memory_barrier ();
          domain_info->bzero_addr[size] = addr;
        }
        <D.24325>:
        D.24260 = domain_info->bzero_addr[size];
        return D.24260;
      }
    finally
      {
        align = {CLOBBER};
      }
  }
  <D.22676>:
  <D.22677>:
  {
    struct MonoMethod * method;
    void * addr;
    struct MonoJitInfo * ji;
    struct MonoGenericContext * ctx;

    D.24326 = mono_class_is_nullable (class);
    if (D.24326 == 0) goto <D.24327>; else goto <D.24328>;
    <D.24327>:
    D.24260 = 0B;
    return D.24260;
    <D.24328>:
    if (info_type == 24) goto <D.24329>; else goto <D.24330>;
    <D.24329>:
    method = mono_class_get_method_from_name (class, "Box", 1);
    goto <D.24331>;
    <D.24330>:
    method = mono_class_get_method_from_name (class, "Unbox", 1);
    <D.24331>:
    addr = mono_compile_method (method);
    D.24332 = mono_domain_get ();
    D.24333 = mono_get_addr_from_ftnptr (addr);
    ji = mini_jit_info_table_find (D.24332, D.24333, 0B);
    D.24334 = ji == 0B;
    D.24335 = (long int) D.24334;
    D.24336 = __builtin_expect (D.24335, 0);
    if (D.24336 != 0) goto <D.24337>; else goto <D.24338>;
    <D.24337>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1042, "ji");
    <D.24338>:
    D.24339 = mini_jit_info_is_gsharedvt (ji);
    if (D.24339 != 0) goto <D.24340>; else goto <D.24341>;
    <D.24340>:
    D.24260 = mono_create_static_rgctx_trampoline (method, addr);
    return D.24260;
    <D.24341>:
    {
      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.24260 = addr;
          return D.24260;
        }
      finally
        {
          gsctx = {CLOBBER};
        }
    }
  }
  <D.22686>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1065);
  D.24260 = 0B;
  return D.24260;
}


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

  D.24346 = __builtin_object_size (__s, 1);
  D.24345 = __builtin___sprintf_chk (__s, 1, D.24346, __fmt, __builtin_va_arg_pack ());
  return D.24345;
}


ji_is_gsharedvt (struct MonoJitInfo * ji)
{
  long unsigned int D.24351;
  long unsigned int D.24352;
  struct MonoGenericSharingContext * D.24354;
  gboolean * D.24355;
  struct MonoGenericSharingContext * D.24357;
  gboolean * D.24358;
  gboolean D.24359;

  if (ji != 0B) goto <D.24350>; else goto <D.24348>;
  <D.24350>:
  D.24351 = BIT_FIELD_REF <*ji, 64, 256>;
  D.24352 = D.24351 & 131072;
  if (D.24352 != 0) goto <D.24353>; else goto <D.24348>;
  <D.24353>:
  D.24354 = mono_jit_info_get_generic_sharing_context (ji);
  D.24355 = D.24354->var_is_vt;
  if (D.24355 != 0B) goto <D.24349>; else goto <D.24356>;
  <D.24356>:
  D.24357 = mono_jit_info_get_generic_sharing_context (ji);
  D.24358 = D.24357->mvar_is_vt;
  if (D.24358 != 0B) goto <D.24349>; else goto <D.24348>;
  <D.24349>:
  D.24359 = 1;
  return D.24359;
  <D.24348>:
  D.24359 = 0;
  return D.24359;
}


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

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


mono_method_fill_runtime_generic_context (struct MonoMethodRuntimeGenericContext * mrgctx, guint8 * caller, guint32 slot)
{
  struct MonoVTable * D.24363;
  struct MonoGenericInst * D.24364;
  void * D.24365;
  void * info;

  D.24363 = mrgctx->class_vtable;
  D.24364 = mrgctx->method_inst;
  info = fill_runtime_generic_context (D.24363, mrgctx, caller, slot, D.24364);
  D.24365 = info;
  return D.24365;
}


mono_method_lookup_rgctx (struct MonoVTable * class_vtable, struct MonoGenericInst * method_inst)
{
  struct MonoClass * D.24367;
  struct MonoGenericContainer * D.24368;
  _Bool D.24369;
  long int D.24370;
  long int D.24371;
  long unsigned int D.24374;
  long unsigned int D.24375;
  _Bool D.24376;
  long int D.24377;
  long int D.24378;
  union mono_mutex_t * D.24381;
  _Bool D.24384;
  long int D.24385;
  long int D.24386;
  struct GHashTable * D.24389;
  struct GHashTable * D.24392;
  _Bool D.24397;
  long int D.24398;
  long int D.24399;
  _Bool D.24402;
  long int D.24403;
  long int D.24404;
  struct MonoMethodRuntimeGenericContext * D.24407;
  struct MonoDomain * domain;
  struct MonoMethodRuntimeGenericContext * mrgctx;
  struct MonoMethodRuntimeGenericContext key;

  try
    {
      domain = class_vtable->domain;
      D.24367 = class_vtable->klass;
      D.24368 = D.24367->generic_container;
      D.24369 = D.24368 != 0B;
      D.24370 = (long int) D.24369;
      D.24371 = __builtin_expect (D.24370, 0);
      if (D.24371 != 0) goto <D.24372>; else goto <D.24373>;
      <D.24372>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2002, "!class_vtable->klass->generic_container");
      <D.24373>:
      D.24374 = BIT_FIELD_REF <*method_inst, 64, 0>;
      D.24375 = D.24374 & 18014398509481984;
      D.24376 = D.24375 != 0;
      D.24377 = (long int) D.24376;
      D.24378 = __builtin_expect (D.24377, 0);
      if (D.24378 != 0) goto <D.24379>; else goto <D.24380>;
      <D.24379>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2003, "!method_inst->is_open");
      <D.24380>:
      {
        int ret;

        D.24381 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.24381);
        if (ret != 0) goto <D.24382>; else goto <D.24383>;
        <D.24382>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.24383>:
        D.24384 = ret != 0;
        D.24385 = (long int) D.24384;
        D.24386 = __builtin_expect (D.24385, 0);
        if (D.24386 != 0) goto <D.24387>; else goto <D.24388>;
        <D.24387>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2005, "ret == 0");
        <D.24388>:
      }
      D.24389 = domain->method_rgctx_hash;
      if (D.24389 == 0B) goto <D.24390>; else goto <D.24391>;
      <D.24390>:
      D.24392 = monoeg_g_hash_table_new (mrgctx_hash_func, mrgctx_equal_func);
      domain->method_rgctx_hash = D.24392;
      <D.24391>:
      key.class_vtable = class_vtable;
      key.method_inst = method_inst;
      D.24389 = domain->method_rgctx_hash;
      mrgctx = monoeg_g_hash_table_lookup (D.24389, &key);
      if (mrgctx == 0B) goto <D.24393>; else goto <D.24394>;
      <D.24393>:
      mrgctx = alloc_rgctx_array (domain, 0, 1);
      mrgctx->class_vtable = class_vtable;
      mrgctx->method_inst = method_inst;
      D.24389 = domain->method_rgctx_hash;
      monoeg_g_hash_table_insert_replace (D.24389, mrgctx, mrgctx, 0);
      <D.24394>:
      {
        int ret;

        D.24381 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.24381);
        if (ret != 0) goto <D.24395>; else goto <D.24396>;
        <D.24395>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.24396>:
        D.24397 = ret != 0;
        D.24398 = (long int) D.24397;
        D.24399 = __builtin_expect (D.24398, 0);
        if (D.24399 != 0) goto <D.24400>; else goto <D.24401>;
        <D.24400>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2031, "ret == 0");
        <D.24401>:
      }
      D.24402 = mrgctx == 0B;
      D.24403 = (long int) D.24402;
      D.24404 = __builtin_expect (D.24403, 0);
      if (D.24404 != 0) goto <D.24405>; else goto <D.24406>;
      <D.24405>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2033, "mrgctx");
      <D.24406>:
      D.24407 = mrgctx;
      return D.24407;
    }
  finally
    {
      key = {CLOBBER};
    }
}


mrgctx_equal_func (const void * a, const void * b)
{
  gboolean D.24410;
  int iftmp.72;
  struct MonoVTable * D.24414;
  struct MonoVTable * D.24415;
  struct MonoGenericInst * D.24417;
  struct MonoGenericInst * D.24418;
  int D.24419;
  const struct MonoMethodRuntimeGenericContext * mrgctx1;
  const struct MonoMethodRuntimeGenericContext * mrgctx2;

  mrgctx1 = a;
  mrgctx2 = b;
  D.24414 = mrgctx1->class_vtable;
  D.24415 = mrgctx2->class_vtable;
  if (D.24414 == D.24415) goto <D.24416>; else goto <D.24412>;
  <D.24416>:
  D.24417 = mrgctx1->method_inst;
  D.24418 = mrgctx2->method_inst;
  D.24419 = mono_metadata_generic_inst_equal (D.24417, D.24418);
  if (D.24419 != 0) goto <D.24420>; else goto <D.24412>;
  <D.24420>:
  iftmp.72 = 1;
  goto <D.24413>;
  <D.24412>:
  iftmp.72 = 0;
  <D.24413>:
  D.24410 = iftmp.72;
  return D.24410;
}


mrgctx_hash_func (const void * key)
{
  guint D.24422;
  struct MonoVTable * D.24423;
  unsigned int D.24424;
  struct MonoGenericInst * D.24425;
  unsigned int D.24426;
  const struct MonoMethodRuntimeGenericContext * mrgctx;

  mrgctx = key;
  D.24423 = mrgctx->class_vtable;
  D.24424 = mono_aligned_addr_hash (D.24423);
  D.24425 = mrgctx->method_inst;
  D.24426 = mono_metadata_generic_inst_hash (D.24425);
  D.24422 = D.24424 ^ D.24426;
  return D.24422;
}


mono_generic_context_is_sharable_full (struct MonoGenericContext * context, gboolean allow_type_vars, gboolean allow_partial)
{
  int iftmp.73;
  struct MonoGenericInst * D.24431;
  struct MonoGenericInst * D.24433;
  _Bool D.24435;
  long int D.24436;
  long int D.24437;
  int D.24442;
  gboolean D.24445;
  int D.24448;

  D.24431 = context->class_inst;
  if (D.24431 == 0B) goto <D.24432>; else goto <D.24429>;
  <D.24432>:
  D.24433 = context->method_inst;
  if (D.24433 == 0B) goto <D.24434>; else goto <D.24429>;
  <D.24434>:
  iftmp.73 = 1;
  goto <D.24430>;
  <D.24429>:
  iftmp.73 = 0;
  <D.24430>:
  D.24435 = iftmp.73 != 0;
  D.24436 = (long int) D.24435;
  D.24437 = __builtin_expect (D.24436, 0);
  if (D.24437 != 0) goto <D.24438>; else goto <D.24439>;
  <D.24438>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2051, "context->class_inst || context->method_inst");
  <D.24439>:
  D.24431 = context->class_inst;
  if (D.24431 != 0B) goto <D.24440>; else goto <D.24441>;
  <D.24440>:
  D.24431 = context->class_inst;
  D.24442 = generic_inst_is_sharable (D.24431, allow_type_vars, allow_partial);
  if (D.24442 == 0) goto <D.24443>; else goto <D.24444>;
  <D.24443>:
  D.24445 = 0;
  return D.24445;
  <D.24444>:
  <D.24441>:
  D.24433 = context->method_inst;
  if (D.24433 != 0B) goto <D.24446>; else goto <D.24447>;
  <D.24446>:
  D.24433 = context->method_inst;
  D.24448 = generic_inst_is_sharable (D.24433, allow_type_vars, allow_partial);
  if (D.24448 == 0) goto <D.24449>; else goto <D.24450>;
  <D.24449>:
  D.24445 = 0;
  return D.24445;
  <D.24450>:
  <D.24447>:
  D.24445 = 1;
  return D.24445;
}


generic_inst_is_sharable (struct MonoGenericInst * inst, gboolean allow_type_vars, gboolean allow_partial)
{
  int D.24454;
  unsigned char D.24457;
  long unsigned int D.24463;
  long unsigned int D.24464;
  unsigned char D.24467;
  gboolean D.24470;
  <unnamed-unsigned:22> D.24471;
  int D.24472;
  int i;
  gboolean has_ref;

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

    type = inst->type_argv[i];
    D.24454 = mono_type_is_reference (type);
    if (D.24454 != 0) goto <D.24452>; else goto <D.24455>;
    <D.24455>:
    if (allow_type_vars != 0) goto <D.24456>; else goto <D.24453>;
    <D.24456>:
    D.24457 = type->type;
    if (D.24457 == 19) goto <D.24452>; else goto <D.24458>;
    <D.24458>:
    D.24457 = type->type;
    if (D.24457 == 30) goto <D.24452>; else goto <D.24453>;
    <D.24452>:
    has_ref = 1;
    // predicted unlikely by continue predictor.
    goto <D.22603>;
    <D.24453>:
    if (allow_partial != 0) goto <D.24461>; else goto <D.24462>;
    <D.24461>:
    D.24463 = BIT_FIELD_REF <*type, 64, 64>;
    D.24464 = D.24463 & 1073741824;
    if (D.24464 == 0) goto <D.24465>; else goto <D.24466>;
    <D.24465>:
    D.24457 = type->type;
    D.24467 = D.24457 + 254;
    if (D.24467 <= 11) goto <D.24459>; else goto <D.24468>;
    <D.24468>:
    D.24457 = type->type;
    if (D.24457 == 24) goto <D.24459>; else goto <D.24469>;
    <D.24469>:
    D.24457 = type->type;
    if (D.24457 == 25) goto <D.24459>; else goto <D.24460>;
    <D.24459>:
    // predicted unlikely by continue predictor.
    goto <D.22603>;
    <D.24460>:
    <D.24466>:
    <D.24462>:
    D.24470 = 0;
    return D.24470;
  }
  <D.22603>:
  i = i + 1;
  <D.22605>:
  D.24471 = inst->type_argc;
  D.24472 = (int) D.24471;
  if (D.24472 > i) goto <D.22604>; else goto <D.22606>;
  <D.22606>:
  if (allow_partial != 0) goto <D.24473>; else goto <D.24474>;
  <D.24473>:
  D.24470 = has_ref;
  return D.24470;
  <D.24474>:
  D.24470 = 1;
  return D.24470;
}


mono_generic_context_is_sharable (struct MonoGenericContext * context, gboolean allow_type_vars)
{
  gboolean D.24476;
  int D.24477;

  D.24477 = partial_sharing_supported ();
  D.24476 = mono_generic_context_is_sharable_full (context, allow_type_vars, D.24477);
  return D.24476;
}


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

  if (0 != 0) goto <D.24479>; else goto <D.24480>;
  <D.24479>:
  D.24481 = 0;
  return D.24481;
  <D.24480>:
  partial_supported.74 = partial_supported;
  if (partial_supported.74 != 0) goto <D.24482>; else goto <D.24485>;
  <D.24485>:
  mono_aot_only.75 = mono_aot_only;
  if (mono_aot_only.75 != 0) goto <D.24482>; else goto <D.24483>;
  <D.24482>:
  D.24481 = 1;
  return D.24481;
  <D.24483>:
  D.24481 = 0;
  return D.24481;
}


mono_method_is_generic_impl (struct MonoMethod * method)
{
  long unsigned int D.24488;
  long unsigned int D.24489;
  gboolean D.24492;
  long unsigned int D.24493;
  struct MonoClass * D.24496;
  struct MonoGenericContainer * D.24497;

  D.24488 = BIT_FIELD_REF <*method, 64, 256>;
  D.24489 = D.24488 & 4096;
  if (D.24489 != 0) goto <D.24490>; else goto <D.24491>;
  <D.24490>:
  D.24492 = 1;
  return D.24492;
  <D.24491>:
  D.24488 = BIT_FIELD_REF <*method, 64, 256>;
  D.24493 = D.24488 & 124;
  if (D.24493 != 0) goto <D.24494>; else goto <D.24495>;
  <D.24494>:
  D.24492 = 0;
  return D.24492;
  <D.24495>:
  D.24496 = method->klass;
  D.24497 = D.24496->generic_container;
  if (D.24497 != 0B) goto <D.24498>; else goto <D.24499>;
  <D.24498>:
  D.24492 = 1;
  return D.24492;
  <D.24499>:
  D.24492 = 0;
  return D.24492;
}


mono_method_is_generic_sharable_full (struct MonoMethod * method, gboolean allow_type_vars, gboolean allow_partial, gboolean allow_gsharedvt)
{
  int D.24501;
  gboolean D.24504;
  int D.24505;
  struct MonoClass * D.24508;
  int D.24509;
  int D.24514;
  int D.24517;
  long unsigned int D.24520;
  long unsigned int D.24521;
  int D.24524;
  struct MonoMethod * D.24527;
  _Bool D.24528;
  long int D.24529;
  long int D.24530;
  long unsigned int D.24533;
  long unsigned int D.24534;
  struct MonoGenericContainer * D.24537;
  int D.24538;
  struct MonoGenericClass * D.24541;
  struct MonoGenericContext * D.24544;
  int D.24545;
  int iftmp.76;
  struct MonoClass * D.24552;
  struct MonoGenericContainer * D.24554;
  _Bool D.24555;
  long int D.24556;
  long int D.24557;
  int D.24560;
  struct MonoGenericContainer * D.24563;
  int D.24568;
  int D.24571;

  D.24501 = mono_method_is_generic_impl (method);
  if (D.24501 == 0) goto <D.24502>; else goto <D.24503>;
  <D.24502>:
  D.24504 = 0;
  return D.24504;
  <D.24503>:
  D.24505 = partial_sharing_supported ();
  if (D.24505 == 0) goto <D.24506>; else goto <D.24507>;
  <D.24506>:
  allow_partial = 0;
  <D.24507>:
  D.24508 = method->klass;
  D.24509 = is_async_state_machine_class (D.24508);
  if (D.24509 != 0) goto <D.24510>; else goto <D.24511>;
  <D.24510>:
  D.24504 = 0;
  return D.24504;
  <D.24511>:
  if (allow_gsharedvt != 0) goto <D.24512>; else goto <D.24513>;
  <D.24512>:
  D.24514 = mini_is_gsharedvt_sharable_method (method);
  if (D.24514 != 0) goto <D.24515>; else goto <D.24516>;
  <D.24515>:
  D.24517 = is_async_method (method);
  if (D.24517 != 0) goto <D.24518>; else goto <D.24519>;
  <D.24518>:
  D.24504 = 0;
  return D.24504;
  <D.24519>:
  D.24504 = 1;
  return D.24504;
  <D.24516>:
  <D.24513>:
  D.24520 = BIT_FIELD_REF <*method, 64, 256>;
  D.24521 = D.24520 & 4096;
  if (D.24521 != 0) goto <D.24522>; else goto <D.24523>;
  <D.24522>:
  {
    struct MonoMethodInflated * inflated;
    struct MonoGenericContext * context;

    inflated = method;
    context = &inflated->context;
    D.24524 = mono_generic_context_is_sharable_full (context, allow_type_vars, allow_partial);
    if (D.24524 == 0) goto <D.24525>; else goto <D.24526>;
    <D.24525>:
    D.24504 = 0;
    return D.24504;
    <D.24526>:
    D.24527 = inflated->declaring;
    D.24528 = D.24527 == 0B;
    D.24529 = (long int) D.24528;
    D.24530 = __builtin_expect (D.24529, 0);
    if (D.24530 != 0) goto <D.24531>; else goto <D.24532>;
    <D.24531>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2216, "inflated->declaring");
    <D.24532>:
    D.24527 = inflated->declaring;
    D.24533 = BIT_FIELD_REF <*D.24527, 64, 256>;
    D.24534 = D.24533 & 2048;
    if (D.24534 != 0) goto <D.24535>; else goto <D.24536>;
    <D.24535>:
    D.24527 = inflated->declaring;
    D.24537 = mono_method_get_generic_container (D.24527);
    D.24538 = has_constraints (D.24537);
    if (D.24538 != 0) goto <D.24539>; else goto <D.24540>;
    <D.24539>:
    D.24504 = 0;
    return D.24504;
    <D.24540>:
    <D.24536>:
  }
  <D.24523>:
  D.24508 = method->klass;
  D.24541 = D.24508->generic_class;
  if (D.24541 != 0B) goto <D.24542>; else goto <D.24543>;
  <D.24542>:
  D.24508 = method->klass;
  D.24541 = D.24508->generic_class;
  D.24544 = &D.24541->context;
  D.24545 = mono_generic_context_is_sharable_full (D.24544, allow_type_vars, allow_partial);
  if (D.24545 == 0) goto <D.24546>; else goto <D.24547>;
  <D.24546>:
  D.24504 = 0;
  return D.24504;
  <D.24547>:
  D.24508 = method->klass;
  D.24541 = D.24508->generic_class;
  D.24552 = D.24541->container_class;
  if (D.24552 == 0B) goto <D.24549>; else goto <D.24553>;
  <D.24553>:
  D.24508 = method->klass;
  D.24541 = D.24508->generic_class;
  D.24552 = D.24541->container_class;
  D.24554 = D.24552->generic_container;
  if (D.24554 == 0B) goto <D.24549>; else goto <D.24550>;
  <D.24549>:
  iftmp.76 = 1;
  goto <D.24551>;
  <D.24550>:
  iftmp.76 = 0;
  <D.24551>:
  D.24555 = iftmp.76 != 0;
  D.24556 = (long int) D.24555;
  D.24557 = __builtin_expect (D.24556, 0);
  if (D.24557 != 0) goto <D.24558>; else goto <D.24559>;
  <D.24558>:
  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.24559>:
  D.24508 = method->klass;
  D.24541 = D.24508->generic_class;
  D.24552 = D.24541->container_class;
  D.24554 = D.24552->generic_container;
  D.24560 = has_constraints (D.24554);
  if (D.24560 != 0) goto <D.24561>; else goto <D.24562>;
  <D.24561>:
  D.24504 = 0;
  return D.24504;
  <D.24562>:
  <D.24543>:
  D.24508 = method->klass;
  D.24563 = D.24508->generic_container;
  if (D.24563 != 0B) goto <D.24564>; else goto <D.24565>;
  <D.24564>:
  if (allow_type_vars == 0) goto <D.24566>; else goto <D.24567>;
  <D.24566>:
  D.24504 = 0;
  return D.24504;
  <D.24567>:
  <D.24565>:
  D.24568 = is_async_method (method);
  if (D.24568 != 0) goto <D.24569>; else goto <D.24570>;
  <D.24569>:
  D.24571 = mini_method_is_open (method);
  if (D.24571 != 0) goto <D.24572>; else goto <D.24573>;
  <D.24572>:
  D.24504 = 1;
  return D.24504;
  <D.24573>:
  D.24504 = 0;
  return D.24504;
  <D.24570>:
  D.24504 = 1;
  return D.24504;
}


is_async_state_machine_class (struct MonoClass * klass)
{
  gboolean D.24575;
  int iclass_set.77;
  struct MonoImage * D.24579;
  struct MonoClass * iclass.78;
  struct MonoClass * iclass.79;
  long unsigned int D.24584;
  long unsigned int D.24585;
  int D.24588;
  static struct MonoClass * iclass;
  static gboolean iclass_set;

  D.24575 = 0;
  return D.24575;
  iclass_set.77 = iclass_set;
  if (iclass_set.77 == 0) goto <D.24577>; else goto <D.24578>;
  <D.24577>:
  D.24579 = mono_defaults.corlib;
  iclass.78 = mono_class_from_name (D.24579, "System.Runtime.CompilerServices", "IAsyncStateMachine");
  iclass = iclass.78;
  mono_memory_barrier ();
  iclass_set = 1;
  <D.24578>:
  iclass.79 = iclass;
  if (iclass.79 != 0B) goto <D.24582>; else goto <D.24583>;
  <D.24582>:
  D.24584 = BIT_FIELD_REF <*klass, 64, 256>;
  D.24585 = D.24584 & 8;
  if (D.24585 != 0) goto <D.24586>; else goto <D.24587>;
  <D.24586>:
  iclass.79 = iclass;
  D.24588 = mono_class_is_assignable_from (iclass.79, klass);
  if (D.24588 != 0) goto <D.24589>; else goto <D.24590>;
  <D.24589>:
  D.24575 = 1;
  return D.24575;
  <D.24590>:
  <D.24587>:
  <D.24583>:
  D.24575 = 0;
  return D.24575;
}


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

  D.24592 = 0;
  return D.24592;
}


is_async_method (struct MonoMethod * method)
{
  gboolean D.24594;
  int attr_class_set.80;
  struct MonoImage * D.24598;
  struct MonoClass * attr_class.81;
  struct MonoClass * attr_class.82;
  struct MonoType * D.24608;
  unsigned char D.24609;
  struct MonoGenericClass * D.24612;
  struct MonoClass * D.24613;
  int D.23090;
  int iftmp.83;
  int D.23089;
  const char[7] * D.24618;
  unsigned char D.24619;
  int D.24620;
  unsigned char D.24621;
  int D.24622;
  const unsigned char * D.24627;
  unsigned char D.24628;
  int D.24629;
  const unsigned char * D.24630;
  unsigned char D.24631;
  int D.24632;
  const unsigned char * D.24637;
  unsigned char D.24638;
  int D.24639;
  const unsigned char * D.24640;
  unsigned char D.24641;
  int D.24642;
  const unsigned char * D.24647;
  unsigned char D.24648;
  int D.24649;
  const unsigned char * D.24650;
  unsigned char D.24651;
  int D.24652;
  const char * D.24654;
  int D.24657;
  struct MonoCustomAttrInfo * cattr;
  struct MonoMethodSignature * sig;
  gboolean res;
  static struct MonoClass * attr_class;
  static gboolean attr_class_set;

  res = 0;
  D.24594 = 0;
  return D.24594;
  attr_class_set.80 = attr_class_set;
  if (attr_class_set.80 == 0) goto <D.24596>; else goto <D.24597>;
  <D.24596>:
  D.24598 = mono_defaults.corlib;
  attr_class.81 = mono_class_from_name (D.24598, "System.Runtime.CompilerServices", "AsyncStateMachineAttribute");
  attr_class = attr_class.81;
  mono_memory_barrier ();
  attr_class_set = 1;
  <D.24597>:
  sig = mono_method_signature (method);
  attr_class.82 = attr_class;
  if (attr_class.82 != 0B) goto <D.24604>; else goto <D.24605>;
  <D.24604>:
  if (sig != 0B) goto <D.24606>; else goto <D.24607>;
  <D.24606>:
  D.24608 = sig->ret;
  D.24609 = D.24608->type;
  if (D.24609 == 1) goto <D.24600>; else goto <D.24610>;
  <D.24610>:
  D.24608 = sig->ret;
  D.24609 = D.24608->type;
  if (D.24609 == 18) goto <D.24611>; else goto <D.24601>;
  <D.24611>:
  D.24608 = sig->ret;
  D.24612 = D.24608->data.generic_class;
  D.24613 = D.24612->container_class;
  if (1 != 0) goto <D.24600>; else goto <D.24601>;
  <D.24601>:
  D.24608 = sig->ret;
  D.24609 = D.24608->type;
  if (D.24609 == 21) goto <D.24614>; else goto <D.24602>;
  <D.24614>:
  {
    size_t __s1_len;
    size_t __s2_len;

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

      D.24608 = sig->ret;
      D.24612 = D.24608->data.generic_class;
      D.24613 = D.24612->container_class;
      __s2 = D.24613->name;
      D.24618 = "Task`1";
      D.24619 = MEM[(const unsigned char *)D.24618];
      D.24620 = (int) D.24619;
      D.24621 = *__s2;
      D.24622 = (int) D.24621;
      __result = D.24620 - D.24622;
      {
        if (__s2_len != 0) goto <D.24623>; else goto <D.24624>;
        <D.24623>:
        if (__result == 0) goto <D.24625>; else goto <D.24626>;
        <D.24625>:
        D.24627 = &MEM[(void *)"Task`1" + 1B];
        D.24628 = *D.24627;
        D.24629 = (int) D.24628;
        D.24630 = __s2 + 1;
        D.24631 = *D.24630;
        D.24632 = (int) D.24631;
        __result = D.24629 - D.24632;
        if (__s2_len > 1) goto <D.24633>; else goto <D.24634>;
        <D.24633>:
        if (__result == 0) goto <D.24635>; else goto <D.24636>;
        <D.24635>:
        D.24637 = &MEM[(void *)"Task`1" + 2B];
        D.24638 = *D.24637;
        D.24639 = (int) D.24638;
        D.24640 = __s2 + 2;
        D.24641 = *D.24640;
        D.24642 = (int) D.24641;
        __result = D.24639 - D.24642;
        if (__s2_len > 2) goto <D.24643>; else goto <D.24644>;
        <D.24643>:
        if (__result == 0) goto <D.24645>; else goto <D.24646>;
        <D.24645>:
        D.24647 = &MEM[(void *)"Task`1" + 3B];
        D.24648 = *D.24647;
        D.24649 = (int) D.24648;
        D.24650 = __s2 + 3;
        D.24651 = *D.24650;
        D.24652 = (int) D.24651;
        __result = D.24649 - D.24652;
        <D.24646>:
        <D.24644>:
        <D.24636>:
        <D.24634>:
        <D.24626>:
        <D.24624>:
      }
      D.23089 = __result;
    }
    iftmp.83 = -D.23089;
    goto <D.24653>;
    <D.24617>:
    D.24608 = sig->ret;
    D.24612 = D.24608->data.generic_class;
    D.24613 = D.24612->container_class;
    D.24654 = D.24613->name;
    iftmp.83 = __builtin_strcmp (D.24654, "Task`1");
    <D.24653>:
    D.23090 = iftmp.83;
  }
  if (D.23090 == 0) goto <D.24600>; else goto <D.24602>;
  <D.24600>:
  cattr = mono_custom_attrs_from_method (method);
  if (cattr != 0B) goto <D.24655>; else goto <D.24656>;
  <D.24655>:
  attr_class.82 = attr_class;
  D.24657 = mono_custom_attrs_has_attr (cattr, attr_class.82);
  if (D.24657 != 0) goto <D.24658>; else goto <D.24659>;
  <D.24658>:
  res = 1;
  <D.24659>:
  mono_custom_attrs_free (cattr);
  <D.24656>:
  <D.24602>:
  <D.24607>:
  <D.24605>:
  D.24594 = res;
  return D.24594;
}


mini_method_is_open (struct MonoMethod * method)
{
  long unsigned int D.24661;
  long unsigned int D.24662;
  struct MonoGenericInst * D.24665;
  long unsigned int D.24668;
  long unsigned int D.24669;
  gboolean D.24672;
  struct MonoGenericInst * D.24673;
  long unsigned int D.24676;
  long unsigned int D.24677;

  D.24661 = BIT_FIELD_REF <*method, 64, 256>;
  D.24662 = D.24661 & 4096;
  if (D.24662 != 0) goto <D.24663>; else goto <D.24664>;
  <D.24663>:
  {
    struct MonoGenericContext * ctx;

    ctx = mono_method_get_context (method);
    D.24665 = ctx->class_inst;
    if (D.24665 != 0B) goto <D.24666>; else goto <D.24667>;
    <D.24666>:
    D.24665 = ctx->class_inst;
    D.24668 = BIT_FIELD_REF <*D.24665, 64, 0>;
    D.24669 = D.24668 & 18014398509481984;
    if (D.24669 != 0) goto <D.24670>; else goto <D.24671>;
    <D.24670>:
    D.24672 = 1;
    return D.24672;
    <D.24671>:
    <D.24667>:
    D.24673 = ctx->method_inst;
    if (D.24673 != 0B) goto <D.24674>; else goto <D.24675>;
    <D.24674>:
    D.24673 = ctx->method_inst;
    D.24676 = BIT_FIELD_REF <*D.24673, 64, 0>;
    D.24677 = D.24676 & 18014398509481984;
    if (D.24677 != 0) goto <D.24678>; else goto <D.24679>;
    <D.24678>:
    D.24672 = 1;
    return D.24672;
    <D.24679>:
    <D.24675>:
  }
  <D.24664>:
  D.24672 = 0;
  return D.24672;
}


mono_method_is_generic_sharable (struct MonoMethod * method, gboolean allow_type_vars)
{
  gboolean D.24681;
  int D.24682;

  D.24682 = partial_sharing_supported ();
  D.24681 = mono_method_is_generic_sharable_full (method, allow_type_vars, D.24682, 1);
  return D.24681;
}


mono_method_needs_static_rgctx_invoke (struct MonoMethod * method, gboolean allow_type_vars)
{
  struct MonoClass * D.24684;
  int D.24685;
  gboolean D.24688;
  int D.24689;
  long unsigned int D.24692;
  long unsigned int D.24693;
  struct MonoGenericContext * D.24696;
  struct MonoGenericInst * D.24697;
  int iftmp.84;
  short unsigned int D.24705;
  int D.24706;
  int D.24707;
  long unsigned int D.24709;
  long unsigned int D.24710;
  struct MonoGenericClass * D.24711;
  struct MonoGenericContainer * D.24713;

  D.24684 = method->klass;
  D.24685 = mono_class_generic_sharing_enabled (D.24684);
  if (D.24685 == 0) goto <D.24686>; else goto <D.24687>;
  <D.24686>:
  D.24688 = 0;
  return D.24688;
  <D.24687>:
  D.24689 = mono_method_is_generic_sharable (method, allow_type_vars);
  if (D.24689 == 0) goto <D.24690>; else goto <D.24691>;
  <D.24690>:
  D.24688 = 0;
  return D.24688;
  <D.24691>:
  D.24692 = BIT_FIELD_REF <*method, 64, 256>;
  D.24693 = D.24692 & 4096;
  if (D.24693 != 0) goto <D.24694>; else goto <D.24695>;
  <D.24694>:
  D.24696 = mono_method_get_context (method);
  D.24697 = D.24696->method_inst;
  if (D.24697 != 0B) goto <D.24698>; else goto <D.24699>;
  <D.24698>:
  D.24688 = 1;
  return D.24688;
  <D.24699>:
  <D.24695>:
  D.24705 = method->flags;
  D.24706 = (int) D.24705;
  D.24707 = D.24706 & 16;
  if (D.24707 != 0) goto <D.24701>; else goto <D.24708>;
  <D.24708>:
  D.24684 = method->klass;
  D.24709 = BIT_FIELD_REF <*D.24684, 64, 256>;
  D.24710 = D.24709 & 8;
  if (D.24710 != 0) goto <D.24701>; else goto <D.24702>;
  <D.24701>:
  D.24684 = method->klass;
  D.24711 = D.24684->generic_class;
  if (D.24711 != 0B) goto <D.24703>; else goto <D.24712>;
  <D.24712>:
  D.24684 = method->klass;
  D.24713 = D.24684->generic_container;
  if (D.24713 != 0B) goto <D.24703>; else goto <D.24702>;
  <D.24703>:
  iftmp.84 = 1;
  goto <D.24704>;
  <D.24702>:
  iftmp.84 = 0;
  <D.24704>:
  D.24688 = iftmp.84;
  return D.24688;
}


mono_method_construct_object_context (struct MonoMethod * method)
{
  struct MonoClass * D.24715;
  struct MonoGenericClass * D.24716;
  _Bool D.24717;
  long int D.24718;
  long int D.24719;
  struct MonoGenericContainer * D.24722;
  <unnamed-signed:31> D.24725;
  struct MonoGenericInst * D.24726;
  struct MonoGenericContext * D.24728;
  struct MonoGenericInst * D.24729;
  struct MonoGenericContext * D.24732;
  struct MonoGenericInst * D.24733;
  <unnamed-unsigned:22> D.24734;
  struct MonoGenericInst * D.24735;
  int iftmp.85;
  struct MonoGenericInst * D.24740;
  struct MonoGenericInst * D.24742;
  _Bool D.24744;
  long int D.24745;
  long int D.24746;
  struct MonoGenericContext D.24749;
  struct MonoGenericContext object_context;

  try
    {
      D.24715 = method->klass;
      D.24716 = D.24715->generic_class;
      D.24717 = D.24716 != 0B;
      D.24718 = (long int) D.24717;
      D.24719 = __builtin_expect (D.24718, 0);
      if (D.24719 != 0) goto <D.24720>; else goto <D.24721>;
      <D.24720>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2298, "!method->klass->generic_class");
      <D.24721>:
      D.24715 = method->klass;
      D.24722 = D.24715->generic_container;
      if (D.24722 != 0B) goto <D.24723>; else goto <D.24724>;
      <D.24723>:
      {
        int type_argc;

        D.24715 = method->klass;
        D.24722 = D.24715->generic_container;
        D.24725 = D.24722->type_argc;
        type_argc = (int) D.24725;
        D.24726 = get_object_generic_inst (type_argc);
        object_context.class_inst = D.24726;
      }
      goto <D.24727>;
      <D.24724>:
      object_context.class_inst = 0B;
      <D.24727>:
      D.24728 = mono_method_get_context_general (method, 1);
      D.24729 = D.24728->method_inst;
      if (D.24729 != 0B) goto <D.24730>; else goto <D.24731>;
      <D.24730>:
      {
        int type_argc;

        D.24732 = mono_method_get_context_general (method, 1);
        D.24733 = D.24732->method_inst;
        D.24734 = D.24733->type_argc;
        type_argc = (int) D.24734;
        D.24735 = get_object_generic_inst (type_argc);
        object_context.method_inst = D.24735;
      }
      goto <D.24736>;
      <D.24731>:
      object_context.method_inst = 0B;
      <D.24736>:
      D.24740 = object_context.class_inst;
      if (D.24740 == 0B) goto <D.24741>; else goto <D.24738>;
      <D.24741>:
      D.24742 = object_context.method_inst;
      if (D.24742 == 0B) goto <D.24743>; else goto <D.24738>;
      <D.24743>:
      iftmp.85 = 1;
      goto <D.24739>;
      <D.24738>:
      iftmp.85 = 0;
      <D.24739>:
      D.24744 = iftmp.85 != 0;
      D.24745 = (long int) D.24744;
      D.24746 = __builtin_expect (D.24745, 0);
      if (D.24746 != 0) goto <D.24747>; else goto <D.24748>;
      <D.24747>:
      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.24748>:
      D.24749 = object_context;
      return D.24749;
    }
  finally
    {
      object_context = {CLOBBER};
    }
}


get_object_generic_inst (int type_argc)
{
  long unsigned int D.24752;
  long unsigned int D.24753;
  long unsigned int D.24754;
  long unsigned int D.24755;
  struct MonoType * * D.24756;
  struct MonoClass * D.24757;
  struct MonoType * D.24758;
  struct MonoGenericInst * D.24759;
  struct MonoType * * type_argv;
  int i;

  D.24752 = (long unsigned int) type_argc;
  D.24753 = D.24752 * 8;
  type_argv = __builtin_alloca (D.24753);
  i = 0;
  goto <D.23113>;
  <D.23112>:
  D.24754 = (long unsigned int) i;
  D.24755 = D.24754 * 8;
  D.24756 = type_argv + D.24755;
  D.24757 = mono_defaults.object_class;
  D.24758 = &D.24757->byval_arg;
  *D.24756 = D.24758;
  i = i + 1;
  <D.23113>:
  if (i < type_argc) goto <D.23112>; else goto <D.23114>;
  <D.23114>:
  D.24759 = mono_metadata_get_generic_inst (type_argc, type_argv);
  return D.24759;
}


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.86;
  int gshared_supported.87;
  int D.23146;
  int iftmp.88;
  int D.23145;
  const char[7] * D.24773;
  unsigned char D.24774;
  int D.24775;
  unsigned char D.24776;
  int D.24777;
  const unsigned char * D.24782;
  unsigned char D.24783;
  int D.24784;
  const unsigned char * D.24785;
  unsigned char D.24786;
  int D.24787;
  const unsigned char * D.24792;
  unsigned char D.24793;
  int D.24794;
  const unsigned char * D.24795;
  unsigned char D.24796;
  int D.24797;
  const unsigned char * D.24802;
  unsigned char D.24803;
  int D.24804;
  const unsigned char * D.24805;
  unsigned char D.24806;
  int D.24807;
  int D.23155;
  int iftmp.89;
  int D.23154;
  const char[12] * D.24815;
  unsigned char D.24816;
  int D.24817;
  unsigned char D.24818;
  int D.24819;
  const unsigned char * D.24824;
  unsigned char D.24825;
  int D.24826;
  const unsigned char * D.24827;
  unsigned char D.24828;
  int D.24829;
  const unsigned char * D.24834;
  unsigned char D.24835;
  int D.24836;
  const unsigned char * D.24837;
  unsigned char D.24838;
  int D.24839;
  const unsigned char * D.24844;
  unsigned char D.24845;
  int D.24846;
  const unsigned char * D.24847;
  unsigned char D.24848;
  int D.24849;
  int D.23164;
  int iftmp.90;
  int D.23163;
  const char[4] * D.24857;
  unsigned char D.24858;
  int D.24859;
  unsigned char D.24860;
  int D.24861;
  const unsigned char * D.24866;
  unsigned char D.24867;
  int D.24868;
  const unsigned char * D.24869;
  unsigned char D.24870;
  int D.24871;
  const unsigned char * D.24876;
  unsigned char D.24877;
  int D.24878;
  const unsigned char * D.24879;
  unsigned char D.24880;
  int D.24881;
  const unsigned char * D.24886;
  unsigned char D.24887;
  int D.24888;
  const unsigned char * D.24889;
  unsigned char D.24890;
  int D.24891;
  int D.23173;
  int iftmp.91;
  int D.23172;
  const char[5] * D.24899;
  unsigned char D.24900;
  int D.24901;
  unsigned char D.24902;
  int D.24903;
  const unsigned char * D.24908;
  unsigned char D.24909;
  int D.24910;
  const unsigned char * D.24911;
  unsigned char D.24912;
  int D.24913;
  const unsigned char * D.24918;
  unsigned char D.24919;
  int D.24920;
  const unsigned char * D.24921;
  unsigned char D.24922;
  int D.24923;
  const unsigned char * D.24928;
  unsigned char D.24929;
  int D.24930;
  const unsigned char * D.24931;
  unsigned char D.24932;
  int D.24933;
  int generic_sharing.92;
  gboolean D.24941;
  struct MonoImage * D.24942;
  struct MonoImage * D.24943;
  _Bool D.24944;
  struct MonoClass * D.24947;
  const char * D.24948;
  static int generic_sharing = 0;
  static gboolean inited = 0;

  inited.86 = inited;
  if (inited.86 == 0) goto <D.24762>; else goto <D.24763>;
  <D.24762>:
  {
    const char * option;

    gshared_supported.87 = gshared_supported;
    if (gshared_supported.87 != 0) goto <D.24765>; else goto <D.24766>;
    <D.24765>:
    generic_sharing = 3;
    goto <D.24767>;
    <D.24766>:
    generic_sharing = 0;
    <D.24767>:
    option = monoeg_g_getenv ("MONO_GENERIC_SHARING");
    if (option != 0B) goto <D.24768>; else goto <D.24769>;
    <D.24768>:
    {
      size_t __s1_len;
      size_t __s2_len;

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

        __s2 = option;
        D.24773 = "corlib";
        D.24774 = MEM[(const unsigned char *)D.24773];
        D.24775 = (int) D.24774;
        D.24776 = *__s2;
        D.24777 = (int) D.24776;
        __result = D.24775 - D.24777;
        {
          if (__s2_len != 0) goto <D.24778>; else goto <D.24779>;
          <D.24778>:
          if (__result == 0) goto <D.24780>; else goto <D.24781>;
          <D.24780>:
          D.24782 = &MEM[(void *)"corlib" + 1B];
          D.24783 = *D.24782;
          D.24784 = (int) D.24783;
          D.24785 = __s2 + 1;
          D.24786 = *D.24785;
          D.24787 = (int) D.24786;
          __result = D.24784 - D.24787;
          if (__s2_len > 1) goto <D.24788>; else goto <D.24789>;
          <D.24788>:
          if (__result == 0) goto <D.24790>; else goto <D.24791>;
          <D.24790>:
          D.24792 = &MEM[(void *)"corlib" + 2B];
          D.24793 = *D.24792;
          D.24794 = (int) D.24793;
          D.24795 = __s2 + 2;
          D.24796 = *D.24795;
          D.24797 = (int) D.24796;
          __result = D.24794 - D.24797;
          if (__s2_len > 2) goto <D.24798>; else goto <D.24799>;
          <D.24798>:
          if (__result == 0) goto <D.24800>; else goto <D.24801>;
          <D.24800>:
          D.24802 = &MEM[(void *)"corlib" + 3B];
          D.24803 = *D.24802;
          D.24804 = (int) D.24803;
          D.24805 = __s2 + 3;
          D.24806 = *D.24805;
          D.24807 = (int) D.24806;
          __result = D.24804 - D.24807;
          <D.24801>:
          <D.24799>:
          <D.24791>:
          <D.24789>:
          <D.24781>:
          <D.24779>:
        }
        D.23145 = __result;
      }
      iftmp.88 = -D.23145;
      goto <D.24808>;
      <D.24772>:
      iftmp.88 = __builtin_strcmp (option, "corlib");
      <D.24808>:
      D.23146 = iftmp.88;
    }
    if (D.23146 == 0) goto <D.24809>; else goto <D.24810>;
    <D.24809>:
    generic_sharing = 2;
    goto <D.24811>;
    <D.24810>:
    {
      size_t __s1_len;
      size_t __s2_len;

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

        __s2 = option;
        D.24815 = "collections";
        D.24816 = MEM[(const unsigned char *)D.24815];
        D.24817 = (int) D.24816;
        D.24818 = *__s2;
        D.24819 = (int) D.24818;
        __result = D.24817 - D.24819;
        {
          if (__s2_len != 0) goto <D.24820>; else goto <D.24821>;
          <D.24820>:
          if (__result == 0) goto <D.24822>; else goto <D.24823>;
          <D.24822>:
          D.24824 = &MEM[(void *)"collections" + 1B];
          D.24825 = *D.24824;
          D.24826 = (int) D.24825;
          D.24827 = __s2 + 1;
          D.24828 = *D.24827;
          D.24829 = (int) D.24828;
          __result = D.24826 - D.24829;
          if (__s2_len > 1) goto <D.24830>; else goto <D.24831>;
          <D.24830>:
          if (__result == 0) goto <D.24832>; else goto <D.24833>;
          <D.24832>:
          D.24834 = &MEM[(void *)"collections" + 2B];
          D.24835 = *D.24834;
          D.24836 = (int) D.24835;
          D.24837 = __s2 + 2;
          D.24838 = *D.24837;
          D.24839 = (int) D.24838;
          __result = D.24836 - D.24839;
          if (__s2_len > 2) goto <D.24840>; else goto <D.24841>;
          <D.24840>:
          if (__result == 0) goto <D.24842>; else goto <D.24843>;
          <D.24842>:
          D.24844 = &MEM[(void *)"collections" + 3B];
          D.24845 = *D.24844;
          D.24846 = (int) D.24845;
          D.24847 = __s2 + 3;
          D.24848 = *D.24847;
          D.24849 = (int) D.24848;
          __result = D.24846 - D.24849;
          <D.24843>:
          <D.24841>:
          <D.24833>:
          <D.24831>:
          <D.24823>:
          <D.24821>:
        }
        D.23154 = __result;
      }
      iftmp.89 = -D.23154;
      goto <D.24850>;
      <D.24814>:
      iftmp.89 = __builtin_strcmp (option, "collections");
      <D.24850>:
      D.23155 = iftmp.89;
    }
    if (D.23155 == 0) goto <D.24851>; else goto <D.24852>;
    <D.24851>:
    generic_sharing = 1;
    goto <D.24853>;
    <D.24852>:
    {
      size_t __s1_len;
      size_t __s2_len;

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

        __s2 = option;
        D.24857 = "all";
        D.24858 = MEM[(const unsigned char *)D.24857];
        D.24859 = (int) D.24858;
        D.24860 = *__s2;
        D.24861 = (int) D.24860;
        __result = D.24859 - D.24861;
        {
          if (__s2_len != 0) goto <D.24862>; else goto <D.24863>;
          <D.24862>:
          if (__result == 0) goto <D.24864>; else goto <D.24865>;
          <D.24864>:
          D.24866 = &MEM[(void *)"all" + 1B];
          D.24867 = *D.24866;
          D.24868 = (int) D.24867;
          D.24869 = __s2 + 1;
          D.24870 = *D.24869;
          D.24871 = (int) D.24870;
          __result = D.24868 - D.24871;
          if (__s2_len > 1) goto <D.24872>; else goto <D.24873>;
          <D.24872>:
          if (__result == 0) goto <D.24874>; else goto <D.24875>;
          <D.24874>:
          D.24876 = &MEM[(void *)"all" + 2B];
          D.24877 = *D.24876;
          D.24878 = (int) D.24877;
          D.24879 = __s2 + 2;
          D.24880 = *D.24879;
          D.24881 = (int) D.24880;
          __result = D.24878 - D.24881;
          if (__s2_len > 2) goto <D.24882>; else goto <D.24883>;
          <D.24882>:
          if (__result == 0) goto <D.24884>; else goto <D.24885>;
          <D.24884>:
          D.24886 = &MEM[(void *)"all" + 3B];
          D.24887 = *D.24886;
          D.24888 = (int) D.24887;
          D.24889 = __s2 + 3;
          D.24890 = *D.24889;
          D.24891 = (int) D.24890;
          __result = D.24888 - D.24891;
          <D.24885>:
          <D.24883>:
          <D.24875>:
          <D.24873>:
          <D.24865>:
          <D.24863>:
        }
        D.23163 = __result;
      }
      iftmp.90 = -D.23163;
      goto <D.24892>;
      <D.24856>:
      iftmp.90 = __builtin_strcmp (option, "all");
      <D.24892>:
      D.23164 = iftmp.90;
    }
    if (D.23164 == 0) goto <D.24893>; else goto <D.24894>;
    <D.24893>:
    generic_sharing = 3;
    goto <D.24895>;
    <D.24894>:
    {
      size_t __s1_len;
      size_t __s2_len;

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

        __s2 = option;
        D.24899 = "none";
        D.24900 = MEM[(const unsigned char *)D.24899];
        D.24901 = (int) D.24900;
        D.24902 = *__s2;
        D.24903 = (int) D.24902;
        __result = D.24901 - D.24903;
        {
          if (__s2_len != 0) goto <D.24904>; else goto <D.24905>;
          <D.24904>:
          if (__result == 0) goto <D.24906>; else goto <D.24907>;
          <D.24906>:
          D.24908 = &MEM[(void *)"none" + 1B];
          D.24909 = *D.24908;
          D.24910 = (int) D.24909;
          D.24911 = __s2 + 1;
          D.24912 = *D.24911;
          D.24913 = (int) D.24912;
          __result = D.24910 - D.24913;
          if (__s2_len > 1) goto <D.24914>; else goto <D.24915>;
          <D.24914>:
          if (__result == 0) goto <D.24916>; else goto <D.24917>;
          <D.24916>:
          D.24918 = &MEM[(void *)"none" + 2B];
          D.24919 = *D.24918;
          D.24920 = (int) D.24919;
          D.24921 = __s2 + 2;
          D.24922 = *D.24921;
          D.24923 = (int) D.24922;
          __result = D.24920 - D.24923;
          if (__s2_len > 2) goto <D.24924>; else goto <D.24925>;
          <D.24924>:
          if (__result == 0) goto <D.24926>; else goto <D.24927>;
          <D.24926>:
          D.24928 = &MEM[(void *)"none" + 3B];
          D.24929 = *D.24928;
          D.24930 = (int) D.24929;
          D.24931 = __s2 + 3;
          D.24932 = *D.24931;
          D.24933 = (int) D.24932;
          __result = D.24930 - D.24933;
          <D.24927>:
          <D.24925>:
          <D.24917>:
          <D.24915>:
          <D.24907>:
          <D.24905>:
        }
        D.23172 = __result;
      }
      iftmp.91 = -D.23172;
      goto <D.24934>;
      <D.24898>:
      iftmp.91 = __builtin_strcmp (option, "none");
      <D.24934>:
      D.23173 = iftmp.91;
    }
    if (D.23173 == 0) goto <D.24935>; else goto <D.24936>;
    <D.24935>:
    generic_sharing = 0;
    goto <D.24937>;
    <D.24936>:
    monoeg_g_log (0B, 16, "Unknown generic sharing option `%s\'.", option);
    <D.24937>:
    <D.24895>:
    <D.24853>:
    <D.24811>:
    <D.24769>:
    gshared_supported.87 = gshared_supported;
    if (gshared_supported.87 == 0) goto <D.24938>; else goto <D.24939>;
    <D.24938>:
    generic_sharing = 0;
    <D.24939>:
    inited = 1;
  }
  <D.24763>:
  generic_sharing.92 = generic_sharing;
  switch (generic_sharing.92) <default: <D.23181>, case 0: <D.23174>, case 1: <D.23177>, case 2: <D.23176>, case 3: <D.23175>>
  <D.23174>:
  D.24941 = 0;
  return D.24941;
  <D.23175>:
  D.24941 = 1;
  return D.24941;
  <D.23176>:
  D.24942 = class->image;
  D.24943 = mono_defaults.corlib;
  D.24944 = D.24942 == D.24943;
  D.24941 = (gboolean) D.24944;
  return D.24941;
  <D.23177>:
  D.24942 = class->image;
  D.24943 = mono_defaults.corlib;
  if (D.24942 != D.24943) goto <D.24945>; else goto <D.24946>;
  <D.24945>:
  D.24941 = 0;
  return D.24941;
  <D.24946>:
  goto <D.23179>;
  <D.23178>:
  class = class->nested_in;
  <D.23179>:
  D.24947 = class->nested_in;
  if (D.24947 != 0B) goto <D.23178>; else goto <D.23180>;
  <D.23180>:
  D.24948 = class->name_space;
  D.24941 = monoeg_g_str_has_prefix (D.24948, "System.Collections.Generic");
  return D.24941;
  <D.23181>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 2398);
  D.24941 = 0;
  return D.24941;
}


mono_get_generic_context_from_code (guint8 * code)
{
  struct MonoDomain * D.24950;
  _Bool D.24951;
  long int D.24952;
  long int D.24953;
  struct MonoGenericSharingContext * D.24956;
  struct MonoJitInfo * jit_info;

  D.24950 = mono_domain_get ();
  jit_info = mini_jit_info_table_find (D.24950, code, 0B);
  D.24951 = jit_info == 0B;
  D.24952 = (long int) D.24951;
  D.24953 = __builtin_expect (D.24952, 0);
  if (D.24953 != 0) goto <D.24954>; else goto <D.24955>;
  <D.24954>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2414, "jit_info");
  <D.24955>:
  D.24956 = mono_jit_info_get_generic_sharing_context (jit_info);
  return D.24956;
}


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

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


mono_method_check_context_used (struct MonoMethod * method)
{
  struct MonoClass * D.24962;
  unsigned char D.24963;
  int D.24967;
  int D.24968;
  struct MonoGenericContext * method_context;
  int context_used;

  method_context = mini_method_get_context (method);
  context_used = 0;
  if (method_context == 0B) goto <D.24960>; else goto <D.24961>;
  <D.24960>:
  D.24962 = method->klass;
  D.24963 = D.24962->rank;
  if (D.24963 != 0) goto <D.24964>; else goto <D.24965>;
  <D.24964>:
  D.24962 = method->klass;
  context_used = mono_class_check_context_used (D.24962);
  <D.24965>:
  goto <D.24966>;
  <D.24961>:
  context_used = mono_generic_context_check_used (method_context);
  D.24962 = method->klass;
  D.24967 = mono_class_check_context_used (D.24962);
  context_used = D.24967 | context_used;
  <D.24966>:
  D.24968 = context_used;
  return D.24968;
}


mono_generic_context_equal_deep (struct MonoGenericContext * context1, struct MonoGenericContext * context2)
{
  gboolean D.24970;
  int iftmp.93;
  struct MonoGenericInst * D.24974;
  struct MonoGenericInst * D.24975;
  int D.24976;
  struct MonoGenericInst * D.24978;
  struct MonoGenericInst * D.24979;
  int D.24980;

  D.24974 = context1->class_inst;
  D.24975 = context2->class_inst;
  D.24976 = generic_inst_equal (D.24974, D.24975);
  if (D.24976 != 0) goto <D.24977>; else goto <D.24972>;
  <D.24977>:
  D.24978 = context1->method_inst;
  D.24979 = context2->method_inst;
  D.24980 = generic_inst_equal (D.24978, D.24979);
  if (D.24980 != 0) goto <D.24981>; else goto <D.24972>;
  <D.24981>:
  iftmp.93 = 1;
  goto <D.24973>;
  <D.24972>:
  iftmp.93 = 0;
  <D.24973>:
  D.24970 = iftmp.93;
  return D.24970;
}


generic_inst_equal (struct MonoGenericInst * inst1, struct MonoGenericInst * inst2)
{
  _Bool D.24985;
  long int D.24986;
  long int D.24987;
  gboolean D.24990;
  _Bool D.24991;
  long int D.24992;
  long int D.24993;
  long unsigned int D.24996;
  long unsigned int D.24997;
  long unsigned int D.24998;
  long unsigned int D.24999;
  struct MonoType * D.25002;
  struct MonoType * D.25003;
  int D.25004;
  <unnamed-unsigned:22> D.25007;
  int D.25008;
  int i;

  if (inst1 == 0B) goto <D.24983>; else goto <D.24984>;
  <D.24983>:
  D.24985 = inst2 != 0B;
  D.24986 = (long int) D.24985;
  D.24987 = __builtin_expect (D.24986, 0);
  if (D.24987 != 0) goto <D.24988>; else goto <D.24989>;
  <D.24988>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2458, "!inst2");
  <D.24989>:
  D.24990 = 1;
  return D.24990;
  <D.24984>:
  D.24991 = inst2 == 0B;
  D.24992 = (long int) D.24991;
  D.24993 = __builtin_expect (D.24992, 0);
  if (D.24993 != 0) goto <D.24994>; else goto <D.24995>;
  <D.24994>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2462, "inst2");
  <D.24995>:
  D.24996 = BIT_FIELD_REF <*inst1, 64, 0>;
  D.24997 = BIT_FIELD_REF <*inst2, 64, 0>;
  D.24998 = D.24996 ^ D.24997;
  D.24999 = D.24998 & 18014394214514688;
  if (D.24999 != 0) goto <D.25000>; else goto <D.25001>;
  <D.25000>:
  D.24990 = 0;
  return D.24990;
  <D.25001>:
  i = 0;
  goto <D.23200>;
  <D.23199>:
  D.25002 = inst1->type_argv[i];
  D.25003 = inst2->type_argv[i];
  D.25004 = mono_metadata_type_equal (D.25002, D.25003);
  if (D.25004 == 0) goto <D.25005>; else goto <D.25006>;
  <D.25005>:
  D.24990 = 0;
  return D.24990;
  <D.25006>:
  i = i + 1;
  <D.23200>:
  D.25007 = inst1->type_argc;
  D.25008 = (int) D.25007;
  if (D.25008 > i) goto <D.23199>; else goto <D.23201>;
  <D.23201>:
  D.24990 = 1;
  return D.24990;
}


mini_class_get_container_class (struct MonoClass * class)
{
  struct MonoGenericClass * D.25010;
  struct MonoClass * D.25013;
  struct MonoGenericContainer * D.25014;
  _Bool D.25015;
  long int D.25016;
  long int D.25017;

  D.25010 = class->generic_class;
  if (D.25010 != 0B) goto <D.25011>; else goto <D.25012>;
  <D.25011>:
  D.25010 = class->generic_class;
  D.25013 = D.25010->container_class;
  return D.25013;
  <D.25012>:
  D.25014 = class->generic_container;
  D.25015 = D.25014 == 0B;
  D.25016 = (long int) D.25015;
  D.25017 = __builtin_expect (D.25016, 0);
  if (D.25017 != 0) goto <D.25018>; else goto <D.25019>;
  <D.25018>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2502, "class->generic_container");
  <D.25019>:
  D.25013 = class;
  return D.25013;
}


mini_class_get_context (struct MonoClass * class)
{
  struct MonoGenericClass * D.25021;
  struct MonoGenericContext * D.25024;
  struct MonoGenericContainer * D.25025;
  _Bool D.25026;
  long int D.25027;
  long int D.25028;

  D.25021 = class->generic_class;
  if (D.25021 != 0B) goto <D.25022>; else goto <D.25023>;
  <D.25022>:
  D.25021 = class->generic_class;
  D.25024 = &D.25021->context;
  return D.25024;
  <D.25023>:
  D.25025 = class->generic_container;
  D.25026 = D.25025 == 0B;
  D.25027 = (long int) D.25026;
  D.25028 = __builtin_expect (D.25027, 0);
  if (D.25028 != 0) goto <D.25029>; else goto <D.25030>;
  <D.25029>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2518, "class->generic_container");
  <D.25030>:
  D.25025 = class->generic_container;
  D.25024 = &D.25025->context;
  return D.25024;
}


mini_get_basic_type_from_generic (struct MonoGenericSharingContext * gsctx, struct MonoType * type)
{
  long unsigned int D.25034;
  long unsigned int D.25035;
  unsigned char D.25037;
  int D.25039;
  struct MonoType * D.25041;

  D.25034 = BIT_FIELD_REF <*type, 64, 64>;
  D.25035 = D.25034 & 1073741824;
  if (D.25035 == 0) goto <D.25036>; else goto <D.25032>;
  <D.25036>:
  D.25037 = type->type;
  if (D.25037 == 19) goto <D.25033>; else goto <D.25038>;
  <D.25038>:
  D.25037 = type->type;
  if (D.25037 == 30) goto <D.25033>; else goto <D.25032>;
  <D.25033>:
  D.25039 = mini_is_gsharedvt_type_gsctx (gsctx, type);
  if (D.25039 != 0) goto <D.25040>; else goto <D.25032>;
  <D.25040>:
  D.25041 = type;
  return D.25041;
  <D.25032>:
  D.25041 = mono_type_get_basic_type_from_generic (type);
  return D.25041;
}


mini_type_get_underlying_type (struct MonoGenericSharingContext * gsctx, struct MonoType * type)
{
  long unsigned int D.25043;
  long unsigned int D.25044;
  struct MonoType * D.25047;
  struct MonoClass * D.25048;
  unsigned char D.25053;
  int D.25055;
  struct MonoType * D.25058;

  D.25043 = BIT_FIELD_REF <*type, 64, 64>;
  D.25044 = D.25043 & 1073741824;
  if (D.25044 != 0) goto <D.25045>; else goto <D.25046>;
  <D.25045>:
  D.25048 = mono_defaults.int_class;
  D.25047 = &D.25048->byval_arg;
  return D.25047;
  <D.25046>:
  D.25043 = BIT_FIELD_REF <*type, 64, 64>;
  D.25044 = D.25043 & 1073741824;
  if (D.25044 == 0) goto <D.25051>; else goto <D.25052>;
  <D.25051>:
  D.25053 = type->type;
  if (D.25053 == 19) goto <D.25049>; else goto <D.25054>;
  <D.25054>:
  D.25053 = type->type;
  if (D.25053 == 30) goto <D.25049>; else goto <D.25050>;
  <D.25049>:
  D.25055 = mini_is_gsharedvt_type_gsctx (gsctx, type);
  if (D.25055 != 0) goto <D.25056>; else goto <D.25057>;
  <D.25056>:
  D.25047 = type;
  return D.25047;
  <D.25057>:
  <D.25050>:
  <D.25052>:
  D.25058 = mono_type_get_underlying_type (type);
  D.25047 = mini_get_basic_type_from_generic (gsctx, D.25058);
  return D.25047;
}


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

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


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

  if (pinvoke != 0) goto <D.25062>; else goto <D.25063>;
  <D.25062>:
  size = mono_type_native_stack_size (t, align);
  goto <D.25064>;
  <D.25063>:
  {
    int ialign;

    try
      {
        if (align != 0B) goto <D.25065>; else goto <D.25066>;
        <D.25065>:
        size = mini_type_stack_size (gsctx, t, &ialign);
        ialign.94 = ialign;
        ialign.95 = (unsigned int) ialign.94;
        *align = ialign.95;
        goto <D.25069>;
        <D.25066>:
        size = mini_type_stack_size (gsctx, t, 0B);
        <D.25069>:
      }
    finally
      {
        ialign = {CLOBBER};
      }
  }
  <D.25064>:
  D.25070 = size;
  return D.25070;
}


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

  generic_subclass_hash.96 = generic_subclass_hash;
  if (generic_subclass_hash.96 == 0B) goto <D.25073>; else goto <D.25074>;
  <D.25073>:
  return;
  <D.25074>:
  mono_loader_lock ();
  old_hash = generic_subclass_hash;
  generic_subclass_hash.97 = monoeg_g_hash_table_new (mono_aligned_addr_hash, 0B);
  generic_subclass_hash = generic_subclass_hash.97;
  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.25077;
  struct MonoImage * D.25080;
  _Bool D.25081;
  long int D.25082;
  long int D.25083;
  struct MonoRuntimeGenericContextTemplate * D.25086;
  struct GHashTable * generic_subclass_hash.98;
  struct MonoClass * new_list;

  D.25077 = class->image;
  if (D.25077 == image) goto <D.25078>; else goto <D.25079>;
  <D.25078>:
  goto <D.22449>;
  <D.22448>:
  D.25080 = subclass->image;
  D.25081 = D.25080 != image;
  D.25082 = (long int) D.25081;
  D.25083 = __builtin_expect (D.25082, 0);
  if (D.25083 != 0) goto <D.25084>; else goto <D.25085>;
  <D.25084>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 285, "subclass->image == image");
  <D.25085>:
  D.25086 = class_lookup_rgctx_template (subclass);
  subclass = D.25086->next_subclass;
  <D.22449>:
  if (subclass != 0B) goto <D.22448>; else goto <D.22450>;
  <D.22450>:
  return;
  <D.25079>:
  new_list = 0B;
  goto <D.22454>;
  <D.22453>:
  {
    struct MonoRuntimeGenericContextTemplate * subclass_template;
    struct MonoClass * next;

    subclass_template = class_lookup_rgctx_template (subclass);
    next = subclass_template->next_subclass;
    D.25080 = subclass->image;
    if (D.25080 != image) goto <D.25087>; else goto <D.25088>;
    <D.25087>:
    subclass_template->next_subclass = new_list;
    new_list = subclass;
    <D.25088>:
    subclass = next;
  }
  <D.22454>:
  if (subclass != 0B) goto <D.22453>; else goto <D.22455>;
  <D.22455>:
  if (new_list != 0B) goto <D.25089>; else goto <D.25090>;
  <D.25089>:
  generic_subclass_hash.98 = generic_subclass_hash;
  monoeg_g_hash_table_insert_replace (generic_subclass_hash.98, class, new_list, 0);
  <D.25090>:
}


mono_generic_sharing_cleanup ()
{
  struct GHashTable * generic_subclass_hash.99;

  mono_remove_image_unload_hook (mono_class_unregister_image_generic_subclasses, 0B);
  generic_subclass_hash.99 = generic_subclass_hash;
  if (generic_subclass_hash.99 != 0B) goto <D.25094>; else goto <D.25095>;
  <D.25094>:
  generic_subclass_hash.99 = generic_subclass_hash;
  monoeg_g_hash_table_destroy (generic_subclass_hash.99);
  <D.25095>:
}


mini_type_var_is_vt (struct MonoCompile * cfg, struct MonoType * type)
{
  unsigned char D.25096;
  struct MonoGenericSharingContext * D.25100;
  gboolean * D.25101;
  struct MonoGenericParam * D.25103;
  short unsigned int D.25104;
  long unsigned int D.25105;
  long unsigned int D.25106;
  gboolean * D.25107;
  int D.25108;
  gboolean D.25110;
  gboolean * D.25114;
  gboolean * D.25116;
  int D.25117;

  D.25096 = type->type;
  if (D.25096 == 19) goto <D.25097>; else goto <D.25098>;
  <D.25097>:
  D.25100 = cfg->generic_sharing_context;
  D.25101 = D.25100->var_is_vt;
  if (D.25101 != 0B) goto <D.25102>; else goto <D.25099>;
  <D.25102>:
  D.25100 = cfg->generic_sharing_context;
  D.25101 = D.25100->var_is_vt;
  D.25103 = type->data.generic_param;
  D.25104 = D.25103->num;
  D.25105 = (long unsigned int) D.25104;
  D.25106 = D.25105 * 4;
  D.25107 = D.25101 + D.25106;
  D.25108 = *D.25107;
  if (D.25108 != 0) goto <D.25109>; else goto <D.25099>;
  <D.25109>:
  D.25110 = 1;
  return D.25110;
  <D.25099>:
  D.25110 = 0;
  return D.25110;
  <D.25098>:
  D.25096 = type->type;
  if (D.25096 == 30) goto <D.25111>; else goto <D.25112>;
  <D.25111>:
  D.25100 = cfg->generic_sharing_context;
  D.25114 = D.25100->mvar_is_vt;
  if (D.25114 != 0B) goto <D.25115>; else goto <D.25113>;
  <D.25115>:
  D.25100 = cfg->generic_sharing_context;
  D.25114 = D.25100->mvar_is_vt;
  D.25103 = type->data.generic_param;
  D.25104 = D.25103->num;
  D.25105 = (long unsigned int) D.25104;
  D.25106 = D.25105 * 4;
  D.25116 = D.25114 + D.25106;
  D.25117 = *D.25116;
  if (D.25117 != 0) goto <D.25118>; else goto <D.25113>;
  <D.25118>:
  D.25110 = 1;
  return D.25110;
  <D.25113>:
  D.25110 = 0;
  return D.25110;
  <D.25112>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 2651);
  D.25110 = 0;
  return D.25110;
}


mini_type_is_reference (struct MonoCompile * cfg, struct MonoType * type)
{
  int D.25120;
  gboolean D.25123;
  struct MonoGenericSharingContext * D.25124;
  int iftmp.100;
  unsigned char D.25131;
  int D.25133;

  D.25120 = mono_type_is_reference (type);
  if (D.25120 != 0) goto <D.25121>; else goto <D.25122>;
  <D.25121>:
  D.25123 = 1;
  return D.25123;
  <D.25122>:
  D.25124 = cfg->generic_sharing_context;
  if (D.25124 == 0B) goto <D.25125>; else goto <D.25126>;
  <D.25125>:
  D.25123 = 0;
  return D.25123;
  <D.25126>:
  D.25131 = type->type;
  if (D.25131 == 19) goto <D.25128>; else goto <D.25132>;
  <D.25132>:
  D.25131 = type->type;
  if (D.25131 == 30) goto <D.25128>; else goto <D.25129>;
  <D.25128>:
  D.25133 = mini_type_var_is_vt (cfg, type);
  if (D.25133 == 0) goto <D.25134>; else goto <D.25129>;
  <D.25134>:
  iftmp.100 = 1;
  goto <D.25130>;
  <D.25129>:
  iftmp.100 = 0;
  <D.25130>:
  D.25123 = iftmp.100;
  return D.25123;
}


mini_method_get_rgctx (struct MonoMethod * m)
{
  struct MonoGenericContext * D.25136;
  struct MonoGenericInst * D.25137;
  void * D.25140;
  struct MonoDomain * D.25141;
  struct MonoClass * D.25142;
  struct MonoVTable * D.25143;
  struct MonoGenericContext * D.25144;
  struct MonoGenericInst * D.25145;
  struct MonoDomain * D.25146;

  D.25136 = mini_method_get_context (m);
  D.25137 = D.25136->method_inst;
  if (D.25137 != 0B) goto <D.25138>; else goto <D.25139>;
  <D.25138>:
  D.25141 = mono_domain_get ();
  D.25142 = m->klass;
  D.25143 = mono_class_vtable (D.25141, D.25142);
  D.25144 = mini_method_get_context (m);
  D.25145 = D.25144->method_inst;
  D.25140 = mono_method_lookup_rgctx (D.25143, D.25145);
  return D.25140;
  <D.25139>:
  D.25146 = mono_domain_get ();
  D.25142 = m->klass;
  D.25140 = mono_class_vtable (D.25146, D.25142);
  return D.25140;
}


mini_type_is_vtype (struct MonoCompile * cfg, struct MonoType * t)
{
  gboolean D.25148;
  int iftmp.101;
  int D.25153;
  int D.25155;

  D.25153 = mono_type_is_struct (t);
  if (D.25153 != 0) goto <D.25150>; else goto <D.25154>;
  <D.25154>:
  D.25155 = mini_is_gsharedvt_variable_type (cfg, t);
  if (D.25155 != 0) goto <D.25150>; else goto <D.25151>;
  <D.25150>:
  iftmp.101 = 1;
  goto <D.25152>;
  <D.25151>:
  iftmp.101 = 0;
  <D.25152>:
  D.25148 = iftmp.101;
  return D.25148;
}


mini_class_is_generic_sharable (struct MonoClass * klass)
{
  struct MonoGenericClass * D.25157;
  int D.25160;
  gboolean D.25163;
  int iftmp.102;
  struct MonoGenericContext * D.25168;
  int D.25169;

  D.25157 = klass->generic_class;
  if (D.25157 != 0B) goto <D.25158>; else goto <D.25159>;
  <D.25158>:
  D.25160 = is_async_state_machine_class (klass);
  if (D.25160 != 0) goto <D.25161>; else goto <D.25162>;
  <D.25161>:
  D.25163 = 0;
  return D.25163;
  <D.25162>:
  <D.25159>:
  D.25157 = klass->generic_class;
  if (D.25157 != 0B) goto <D.25167>; else goto <D.25165>;
  <D.25167>:
  D.25157 = klass->generic_class;
  D.25168 = &D.25157->context;
  D.25169 = mono_generic_context_is_sharable (D.25168, 0);
  if (D.25169 != 0) goto <D.25170>; else goto <D.25165>;
  <D.25170>:
  iftmp.102 = 1;
  goto <D.25166>;
  <D.25165>:
  iftmp.102 = 0;
  <D.25166>:
  D.25163 = iftmp.102;
  return D.25163;
}


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

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


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

  D.25175 = 0;
  return D.25175;
}


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

  D.25177 = 0;
  return D.25177;
}


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

  D.25179 = 0;
  return D.25179;
}


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

  D.25181 = 0;
  return D.25181;
}


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

  D.25183 = 0;
  return D.25183;
}


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

  D.25185 = 0;
  return D.25185;
}


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

  D.25187 = 0;
  return D.25187;
}


