mono_generic_context_check_used (struct MonoGenericContext * context)
{
  struct MonoGenericInst * D.22761;
  int D.22762;
  struct MonoGenericInst * D.22763;
  int D.22764;
  int D.22765;
  int context_used;

  context_used = 0;
  D.22761 = context->class_inst;
  D.22762 = inst_check_context_used (D.22761);
  context_used = D.22762 | context_used;
  D.22763 = context->method_inst;
  D.22764 = inst_check_context_used (D.22763);
  context_used = D.22764 | context_used;
  D.22765 = context_used;
  return D.22765;
}


inst_check_context_used (struct MonoGenericInst * inst)
{
  int D.22769;
  struct MonoType * D.22770;
  int D.22771;
  <unnamed-unsigned:22> D.22772;
  int D.22773;
  int context_used;
  int i;

  context_used = 0;
  if (inst == 0B) goto <D.22767>; else goto <D.22768>;
  <D.22767>:
  D.22769 = 0;
  return D.22769;
  <D.22768>:
  i = 0;
  goto <D.21852>;
  <D.21851>:
  D.22770 = inst->type_argv[i];
  D.22771 = type_check_context_used (D.22770, 1);
  context_used = D.22771 | context_used;
  i = i + 1;
  <D.21852>:
  D.22772 = inst->type_argc;
  D.22773 = (int) D.22772;
  if (D.22773 > i) goto <D.21851>; else goto <D.21853>;
  <D.21853>:
  D.22769 = context_used;
  return D.22769;
}


type_check_context_used (struct MonoType * type, gboolean recursive)
{
  int D.22775;
  int D.22776;
  struct MonoClass * D.22777;
  struct MonoArrayType * D.22778;
  struct MonoClass * D.22779;
  struct MonoClass * D.22782;
  struct MonoClass * D.22785;
  struct MonoGenericContainer * D.22786;
  _Bool D.22787;
  long int D.22788;
  long int D.22789;
  struct MonoGenericContext * D.22792;

  D.22775 = mono_type_get_type (type);
  switch (D.22775) <default: <D.21845>, case 18: <D.21842>, case 19: <D.21838>, case 20: <D.21841>, case 21: <D.21843>, case 29: <D.21840>, case 30: <D.21839>>
  <D.21838>:
  D.22776 = 1;
  return D.22776;
  <D.21839>:
  D.22776 = 2;
  return D.22776;
  <D.21840>:
  D.22777 = mono_type_get_class (type);
  D.22776 = mono_class_check_context_used (D.22777);
  return D.22776;
  <D.21841>:
  D.22778 = mono_type_get_array_type (type);
  D.22779 = D.22778->eklass;
  D.22776 = mono_class_check_context_used (D.22779);
  return D.22776;
  <D.21842>:
  if (recursive != 0) goto <D.22780>; else goto <D.22781>;
  <D.22780>:
  D.22782 = mono_type_get_class (type);
  D.22776 = mono_class_check_context_used (D.22782);
  return D.22776;
  <D.22781>:
  D.22776 = 0;
  return D.22776;
  <D.21843>:
  if (recursive != 0) goto <D.22783>; else goto <D.22784>;
  <D.22783>:
  {
    struct MonoGenericClass * gclass;

    gclass = type->data.generic_class;
    D.22785 = gclass->container_class;
    D.22786 = D.22785->generic_container;
    D.22787 = D.22786 == 0B;
    D.22788 = (long int) D.22787;
    D.22789 = __builtin_expect (D.22788, 0);
    if (D.22789 != 0) goto <D.22790>; else goto <D.22791>;
    <D.22790>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 64, "gclass->container_class->generic_container");
    <D.22791>:
    D.22792 = &gclass->context;
    D.22776 = mono_generic_context_check_used (D.22792);
    return D.22776;
  }
  <D.22784>:
  D.22776 = 0;
  return D.22776;
  <D.21845>:
  D.22776 = 0;
  return D.22776;
}


mono_class_check_context_used (struct MonoClass * class)
{
  struct MonoType * D.22794;
  int D.22795;
  struct MonoType * D.22796;
  int D.22797;
  struct MonoGenericClass * D.22798;
  struct MonoGenericContext * D.22801;
  int D.22802;
  struct MonoGenericContainer * D.22804;
  struct MonoGenericContext * D.22807;
  int D.22808;
  int D.22809;
  int context_used;

  context_used = 0;
  D.22794 = &class->this_arg;
  D.22795 = type_check_context_used (D.22794, 0);
  context_used = D.22795 | context_used;
  D.22796 = &class->byval_arg;
  D.22797 = type_check_context_used (D.22796, 0);
  context_used = D.22797 | context_used;
  D.22798 = class->generic_class;
  if (D.22798 != 0B) goto <D.22799>; else goto <D.22800>;
  <D.22799>:
  D.22798 = class->generic_class;
  D.22801 = &D.22798->context;
  D.22802 = mono_generic_context_check_used (D.22801);
  context_used = D.22802 | context_used;
  goto <D.22803>;
  <D.22800>:
  D.22804 = class->generic_container;
  if (D.22804 != 0B) goto <D.22805>; else goto <D.22806>;
  <D.22805>:
  D.22804 = class->generic_container;
  D.22807 = &D.22804->context;
  D.22808 = mono_generic_context_check_used (D.22807);
  context_used = D.22808 | context_used;
  <D.22806>:
  <D.22803>:
  D.22809 = context_used;
  return D.22809;
}


mono_method_get_declaring_generic_method (struct MonoMethod * method)
{
  unsigned char D.22811;
  unsigned char D.22812;
  _Bool D.22813;
  long int D.22814;
  long int D.22815;
  struct MonoMethod * D.22818;
  struct MonoMethodInflated * inflated;

  D.22811 = BIT_FIELD_REF <*method, 8, 168>;
  D.22812 = D.22811 & 16;
  D.22813 = D.22812 == 0;
  D.22814 = (long int) D.22813;
  D.22815 = __builtin_expect (D.22814, 0);
  if (D.22815 != 0) goto <D.22816>; else goto <D.22817>;
  <D.22816>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 449, "method->is_inflated");
  <D.22817>:
  inflated = method;
  D.22818 = inflated->declaring;
  return D.22818;
}


mono_class_get_method_generic (struct MonoClass * klass, struct MonoMethod * method)
{
  unsigned char D.22820;
  unsigned char D.22821;
  struct MonoGenericClass * D.22825;
  unsigned char D.22830;
  struct MonoMethod * D.22833;
  struct MonoMethod * * D.22834;
  unsigned int i.0;
  unsigned int D.22836;
  struct MonoMethod * * D.22837;
  unsigned char D.22839;
  unsigned char D.22840;
  struct MonoMethod * D.22843;
  unsigned int i.1;
  unsigned int D.22846;
  struct MonoGenericContext * D.22851;
  struct MonoGenericInst * D.22852;
  struct MonoMethod * declaring;
  struct MonoMethod * m;
  int i;

  D.22820 = BIT_FIELD_REF <*method, 8, 168>;
  D.22821 = D.22820 & 16;
  if (D.22821 != 0) goto <D.22822>; else goto <D.22823>;
  <D.22822>:
  declaring = mono_method_get_declaring_generic_method (method);
  goto <D.22824>;
  <D.22823>:
  declaring = method;
  <D.22824>:
  m = 0B;
  D.22825 = klass->generic_class;
  if (D.22825 != 0B) goto <D.22826>; else goto <D.22827>;
  <D.22826>:
  m = mono_class_get_inflated_method (klass, declaring);
  <D.22827>:
  if (m == 0B) goto <D.22828>; else goto <D.22829>;
  <D.22828>:
  mono_class_setup_methods (klass);
  D.22830 = klass->exception_type;
  if (D.22830 != 0) goto <D.22831>; else goto <D.22832>;
  <D.22831>:
  D.22833 = 0B;
  return D.22833;
  <D.22832>:
  i = 0;
  goto <D.21980>;
  <D.21979>:
  D.22834 = klass->methods;
  i.0 = (unsigned int) i;
  D.22836 = i.0 * 4;
  D.22837 = D.22834 + D.22836;
  m = *D.22837;
  if (m == declaring) goto <D.21978>; else goto <D.22838>;
  <D.22838>:
  D.22839 = BIT_FIELD_REF <*m, 8, 168>;
  D.22840 = D.22839 & 16;
  if (D.22840 != 0) goto <D.22841>; else goto <D.22842>;
  <D.22841>:
  D.22843 = mono_method_get_declaring_generic_method (m);
  if (D.22843 == declaring) goto <D.21978>; else goto <D.22844>;
  <D.22844>:
  <D.22842>:
  i = i + 1;
  <D.21980>:
  i.1 = (unsigned int) i;
  D.22846 = klass->method.count;
  if (i.1 < D.22846) goto <D.21979>; else goto <D.21978>;
  <D.21978>:
  i.1 = (unsigned int) i;
  D.22846 = klass->method.count;
  if (i.1 >= D.22846) goto <D.22847>; else goto <D.22848>;
  <D.22847>:
  D.22833 = 0B;
  return D.22833;
  <D.22848>:
  <D.22829>:
  if (method != declaring) goto <D.22849>; else goto <D.22850>;
  <D.22849>:
  {
    struct MonoGenericContext context;

    try
      {
        context.class_inst = 0B;
        D.22851 = mono_method_get_context (method);
        D.22852 = D.22851->method_inst;
        context.method_inst = D.22852;
        m = mono_class_inflate_generic_method (m, &context);
      }
    finally
      {
        context = {CLOBBER};
      }
  }
  <D.22850>:
  D.22833 = m;
  return D.22833;
}


mono_is_partially_sharable_inst (struct MonoGenericInst * inst)
{
  struct MonoType * D.22857;
  int D.22858;
  unsigned char D.22860;
  <unnamed-unsigned:22> D.22862;
  int D.22863;
  gboolean D.22864;
  _Bool D.22865;
  _Bool D.22866;
  _Bool D.22867;
  int i;
  gboolean has_refs;
  gboolean has_non_refs;

  has_refs = 0;
  has_non_refs = 0;
  i = 0;
  goto <D.22086>;
  <D.22085>:
  D.22857 = inst->type_argv[i];
  D.22858 = mono_type_is_reference (D.22857);
  if (D.22858 != 0) goto <D.22854>; else goto <D.22859>;
  <D.22859>:
  D.22857 = inst->type_argv[i];
  D.22860 = D.22857->type;
  if (D.22860 == 19) goto <D.22854>; else goto <D.22861>;
  <D.22861>:
  D.22857 = inst->type_argv[i];
  D.22860 = D.22857->type;
  if (D.22860 == 30) goto <D.22854>; else goto <D.22855>;
  <D.22854>:
  has_refs = 1;
  goto <D.22856>;
  <D.22855>:
  has_non_refs = 1;
  <D.22856>:
  i = i + 1;
  <D.22086>:
  D.22862 = inst->type_argc;
  D.22863 = (int) D.22862;
  if (D.22863 > i) goto <D.22085>; else goto <D.22087>;
  <D.22087>:
  D.22865 = has_refs != 0;
  D.22866 = has_non_refs != 0;
  D.22867 = D.22865 & D.22866;
  D.22864 = (gboolean) D.22867;
  return D.22864;
}


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.22872;
  _Bool D.22875;
  long int D.22876;
  long int D.22877;
  struct GHashTable * D.22880;
  struct GHashTable * D.22883;
  _Bool D.22886;
  long int D.22887;
  long int D.22888;
  void * D.22893;
  void * tramp_addr.3;
  void * tramp_addr.4;
  int mono_aot_only.5;
  struct MonoDomain * D.22907;
  int num_trampolines.6;
  int num_trampolines.7;
  _Bool D.22912;
  long int D.22913;
  long int D.22914;
  _Bool D.22919;
  long int D.22920;
  long int D.22921;
  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.22870>; else goto <D.22871>;
      <D.22870>:
      mono_counters_register ("GSHAREDVT arg trampolines", 256, &num_trampolines);
      inited = 1;
      <D.22871>:
      tinfo.is_in = gsharedvt_in;
      tinfo.calli = calli;
      tinfo.vcall_offset = vcall_offset;
      tinfo.addr = addr;
      tinfo.sig = normal_sig;
      tinfo.gsig = gsharedvt_sig;
      memcpy (&tinfo.gsctx, gsctx, 8);
      domain_info = domain->runtime_info;
      {
        int ret;

        D.22872 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.22872);
        if (ret != 0) goto <D.22873>; else goto <D.22874>;
        <D.22873>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.22874>:
        D.22875 = ret != 0;
        D.22876 = (long int) D.22875;
        D.22877 = __builtin_expect (D.22876, 0);
        if (D.22877 != 0) goto <D.22878>; else goto <D.22879>;
        <D.22878>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1148, "ret == 0");
        <D.22879>:
      }
      D.22880 = domain_info->gsharedvt_arg_tramp_hash;
      if (D.22880 == 0B) goto <D.22881>; else goto <D.22882>;
      <D.22881>:
      D.22883 = monoeg_g_hash_table_new (tramp_info_hash, tramp_info_equal);
      domain_info->gsharedvt_arg_tramp_hash = D.22883;
      <D.22882>:
      D.22880 = domain_info->gsharedvt_arg_tramp_hash;
      res = monoeg_g_hash_table_lookup (D.22880, &tinfo);
      {
        int ret;

        D.22872 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.22872);
        if (ret != 0) goto <D.22884>; else goto <D.22885>;
        <D.22884>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.22885>:
        D.22886 = ret != 0;
        D.22887 = (long int) D.22886;
        D.22888 = __builtin_expect (D.22887, 0);
        if (D.22888 != 0) goto <D.22889>; else goto <D.22890>;
        <D.22889>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1152, "ret == 0");
        <D.22890>:
      }
      if (res != 0B) goto <D.22891>; else goto <D.22892>;
      <D.22891>:
      D.22893 = res;
      return D.22893;
      <D.22892>:
      info = mono_arch_get_gsharedvt_call_info (addr, normal_sig, gsharedvt_sig, gsctx, gsharedvt_in, vcall_offset, calli);
      if (gsharedvt_in != 0) goto <D.22894>; else goto <D.22895>;
      <D.22894>:
      {
        static void * tramp_addr;
        struct MonoMethod * wrapper;

        tramp_addr.3 = tramp_addr;
        if (tramp_addr.3 == 0B) goto <D.22897>; else goto <D.22898>;
        <D.22897>:
        wrapper = mono_marshal_get_gsharedvt_in_wrapper ();
        addr = mono_compile_method (wrapper);
        mono_memory_barrier ();
        tramp_addr = addr;
        <D.22898>:
        addr = tramp_addr;
      }
      goto <D.22899>;
      <D.22895>:
      {
        static void * tramp_addr;
        struct MonoMethod * wrapper;

        tramp_addr.4 = tramp_addr;
        if (tramp_addr.4 == 0B) goto <D.22901>; else goto <D.22902>;
        <D.22901>:
        wrapper = mono_marshal_get_gsharedvt_out_wrapper ();
        addr = mono_compile_method (wrapper);
        mono_memory_barrier ();
        tramp_addr = addr;
        <D.22902>:
        addr = tramp_addr;
      }
      <D.22899>:
      mono_aot_only.5 = mono_aot_only;
      if (mono_aot_only.5 != 0) goto <D.22904>; else goto <D.22905>;
      <D.22904>:
      addr = mono_aot_get_gsharedvt_arg_trampoline (info, addr);
      goto <D.22906>;
      <D.22905>:
      D.22907 = mono_domain_get ();
      addr = mono_arch_get_gsharedvt_arg_trampoline (D.22907, info, addr);
      <D.22906>:
      num_trampolines.6 = num_trampolines;
      num_trampolines.7 = num_trampolines.6 + 1;
      num_trampolines = num_trampolines.7;
      tramp_info = mono_domain_alloc0 (domain, 32);
      memcpy (tramp_info, &tinfo, 32);
      {
        int ret;

        D.22872 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.22872);
        if (ret != 0) goto <D.22910>; else goto <D.22911>;
        <D.22910>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.22911>:
        D.22912 = ret != 0;
        D.22913 = (long int) D.22912;
        D.22914 = __builtin_expect (D.22913, 0);
        if (D.22914 != 0) goto <D.22915>; else goto <D.22916>;
        <D.22915>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1193, "ret == 0");
        <D.22916>:
      }
      D.22880 = domain_info->gsharedvt_arg_tramp_hash;
      monoeg_g_hash_table_insert_replace (D.22880, tramp_info, addr, 0);
      {
        int ret;

        D.22872 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.22872);
        if (ret != 0) goto <D.22917>; else goto <D.22918>;
        <D.22917>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.22918>:
        D.22919 = ret != 0;
        D.22920 = (long int) D.22919;
        D.22921 = __builtin_expect (D.22920, 0);
        if (D.22921 != 0) goto <D.22922>; else goto <D.22923>;
        <D.22922>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1196, "ret == 0");
        <D.22923>:
      }
      D.22893 = addr;
      return D.22893;
    }
  finally
    {
      tinfo = {CLOBBER};
    }
}


tramp_info_equal (const void * a, const void * b)
{
  gboolean D.22926;
  int iftmp.8;
  int D.22930;
  int D.22931;
  int D.22933;
  int D.22934;
  int D.22936;
  int D.22937;
  void * D.22939;
  void * D.22940;
  struct MonoMethodSignature * D.22942;
  struct MonoMethodSignature * D.22943;
  struct MonoMethodSignature * D.22945;
  struct MonoMethodSignature * D.22946;
  struct MonoGenericInst * D.22948;
  struct MonoGenericInst * D.22949;
  struct MonoGenericInst * D.22951;
  struct MonoGenericInst * D.22952;
  struct GSharedVtTrampInfo * tramp1;
  struct GSharedVtTrampInfo * tramp2;

  tramp1 = a;
  tramp2 = b;
  D.22930 = tramp1->is_in;
  D.22931 = tramp2->is_in;
  if (D.22930 == D.22931) goto <D.22932>; else goto <D.22928>;
  <D.22932>:
  D.22933 = tramp1->calli;
  D.22934 = tramp2->calli;
  if (D.22933 == D.22934) goto <D.22935>; else goto <D.22928>;
  <D.22935>:
  D.22936 = tramp1->vcall_offset;
  D.22937 = tramp2->vcall_offset;
  if (D.22936 == D.22937) goto <D.22938>; else goto <D.22928>;
  <D.22938>:
  D.22939 = tramp1->addr;
  D.22940 = tramp2->addr;
  if (D.22939 == D.22940) goto <D.22941>; else goto <D.22928>;
  <D.22941>:
  D.22942 = tramp1->sig;
  D.22943 = tramp2->sig;
  if (D.22942 == D.22943) goto <D.22944>; else goto <D.22928>;
  <D.22944>:
  D.22945 = tramp1->gsig;
  D.22946 = tramp2->gsig;
  if (D.22945 == D.22946) goto <D.22947>; else goto <D.22928>;
  <D.22947>:
  D.22948 = tramp1->gsctx.class_inst;
  D.22949 = tramp2->gsctx.class_inst;
  if (D.22948 == D.22949) goto <D.22950>; else goto <D.22928>;
  <D.22950>:
  D.22951 = tramp1->gsctx.method_inst;
  D.22952 = tramp2->gsctx.method_inst;
  if (D.22951 == D.22952) goto <D.22953>; else goto <D.22928>;
  <D.22953>:
  iftmp.8 = 1;
  goto <D.22929>;
  <D.22928>:
  iftmp.8 = 0;
  <D.22929>:
  D.22926 = iftmp.8;
  return D.22926;
}


tramp_info_hash (const void * key)
{
  guint D.22955;
  void * D.22956;
  struct GSharedVtTrampInfo * tramp;

  tramp = key;
  D.22956 = tramp->addr;
  D.22955 = (guint) D.22956;
  return D.22955;
}


mono_memory_barrier ()
{
  __sync_synchronize ();
}


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

  D.22959 = __builtin_object_size (__dest, 0);
  D.22958 = __builtin___memcpy_chk (__dest, __src, __len, D.22959);
  return D.22958;
}


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

  switch (type) <default: <D.22339>, case 0: <D.22314>, case 1: <D.22315>, case 2: <D.22316>, case 3: <D.22317>, case 4: <D.22318>, case 5: <D.22319>, case 6: <D.22321>, case 7: <D.22322>, case 8: <D.22323>, case 9: <D.22324>, case 10: <D.22325>, case 11: <D.22326>, case 12: <D.22327>, case 13: <D.22328>, case 14: <D.22329>, case 15: <D.22331>, case 16: <D.22332>, case 17: <D.22333>, case 18: <D.22334>, case 19: <D.22330>, case 20: <D.22320>, case 22: <D.22335>, case 23: <D.22336>, case 24: <D.22337>, case 25: <D.22338>>
  <D.22314>:
  D.22961 = "STATIC_DATA";
  return D.22961;
  <D.22315>:
  D.22961 = "KLASS";
  return D.22961;
  <D.22316>:
  D.22961 = "VTABLE";
  return D.22961;
  <D.22317>:
  D.22961 = "TYPE";
  return D.22961;
  <D.22318>:
  D.22961 = "REFLECTION_TYPE";
  return D.22961;
  <D.22319>:
  D.22961 = "METHOD";
  return D.22961;
  <D.22320>:
  D.22961 = "GSHAREDVT_INFO";
  return D.22961;
  <D.22321>:
  D.22961 = "GENERIC_METHOD_CODE";
  return D.22961;
  <D.22322>:
  D.22961 = "CLASS_FIELD";
  return D.22961;
  <D.22323>:
  D.22961 = "METHOD_RGCTX";
  return D.22961;
  <D.22324>:
  D.22961 = "METHOD_CONTEXT";
  return D.22961;
  <D.22325>:
  D.22961 = "REMOTING_INVOKE_WITH_CHECK";
  return D.22961;
  <D.22326>:
  D.22961 = "METHOD_DELEGATE_CODE";
  return D.22961;
  <D.22327>:
  D.22961 = "CAST_CACHE";
  return D.22961;
  <D.22328>:
  D.22961 = "ARRAY_ELEMENT_SIZE";
  return D.22961;
  <D.22329>:
  D.22961 = "VALUE_SIZE";
  return D.22961;
  <D.22330>:
  D.22961 = "CLASS_BOX_TYPE";
  return D.22961;
  <D.22331>:
  D.22961 = "FIELD_OFFSET";
  return D.22961;
  <D.22332>:
  D.22961 = "METHOD_GSHAREDVT_OUT_TRAMPOLINE";
  return D.22961;
  <D.22333>:
  D.22961 = "METHOD_GSHAREDVT_OUT_TRAMPOLINE_VIRT";
  return D.22961;
  <D.22334>:
  D.22961 = "SIG_GSHAREDVT_OUT_TRAMPOLINE_CALLI";
  return D.22961;
  <D.22335>:
  D.22961 = "MEMCPY";
  return D.22961;
  <D.22336>:
  D.22961 = "BZERO";
  return D.22961;
  <D.22337>:
  D.22961 = "NULLABLE_CLASS_BOX";
  return D.22961;
  <D.22338>:
  D.22961 = "NULLABLE_CLASS_UNBOX";
  return D.22961;
  <D.22339>:
  D.22961 = "<UNKNOWN RGCTX INFO TYPE>";
  return D.22961;
}


mini_rgctx_info_type_to_patch_info_type (MonoRgctxInfoType info_type)
{
  MonoJumpInfoType D.22963;

  switch (info_type) <default: <D.22413>, case 0: <D.22398>, case 1: <D.22399>, case 2: <D.22400>, case 3: <D.22401>, case 4: <D.22402>, case 12: <D.22403>, case 13: <D.22404>, case 14: <D.22405>, case 15: <D.22412>, case 19: <D.22406>, case 21: <D.22411>, case 22: <D.22407>, case 23: <D.22408>, case 24: <D.22409>, case 25: <D.22410>>
  <D.22398>:
  <D.22399>:
  <D.22400>:
  <D.22401>:
  <D.22402>:
  <D.22403>:
  <D.22404>:
  <D.22405>:
  <D.22406>:
  <D.22407>:
  <D.22408>:
  <D.22409>:
  <D.22410>:
  <D.22411>:
  D.22963 = 11;
  return D.22963;
  <D.22412>:
  D.22963 = 13;
  return D.22963;
  <D.22413>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1677);
  D.22963 = 4294967295;
  return D.22963;
}


mono_method_lookup_or_register_info (struct MonoMethod * method, gboolean in_mrgctx, void * data, MonoRgctxInfoType info_type, struct MonoGenericContext * generic_context)
{
  struct MonoGenericContext * D.22967;
  int iftmp.9;
  unsigned char D.22972;
  unsigned char D.22973;
  _Bool D.22975;
  long int D.22976;
  long int D.22977;
  <unnamed-unsigned:22> D.22980;
  _Bool D.22981;
  long int D.22982;
  long int D.22983;
  guint32 D.22989;
  unsigned int index.10;
  struct MonoClass * class;
  int type_argc;
  int index;

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

    D.22967 = mono_method_get_context (method);
    method_inst = D.22967->method_inst;
    D.22972 = BIT_FIELD_REF <*method, 8, 168>;
    D.22973 = D.22972 & 16;
    if (D.22973 == 0) goto <D.22969>; else goto <D.22974>;
    <D.22974>:
    if (method_inst == 0B) goto <D.22969>; else goto <D.22970>;
    <D.22969>:
    iftmp.9 = 1;
    goto <D.22971>;
    <D.22970>:
    iftmp.9 = 0;
    <D.22971>:
    D.22975 = iftmp.9 != 0;
    D.22976 = (long int) D.22975;
    D.22977 = __builtin_expect (D.22976, 0);
    if (D.22977 != 0) goto <D.22978>; else goto <D.22979>;
    <D.22978>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1755, "method->is_inflated && method_inst");
    <D.22979>:
    D.22980 = method_inst->type_argc;
    type_argc = (int) D.22980;
    D.22981 = type_argc <= 0;
    D.22982 = (long int) D.22981;
    D.22983 = __builtin_expect (D.22982, 0);
    if (D.22983 != 0) goto <D.22984>; else goto <D.22985>;
    <D.22984>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1757, "type_argc > 0");
    <D.22985>:
  }
  goto <D.22986>;
  <D.22966>:
  type_argc = 0;
  <D.22986>:
  index = lookup_or_register_info (class, type_argc, data, info_type, generic_context);
  if (in_mrgctx != 0) goto <D.22987>; else goto <D.22988>;
  <D.22987>:
  index.10 = (unsigned int) index;
  D.22989 = index.10 | 2147483648;
  return D.22989;
  <D.22988>:
  D.22989 = (guint32) index;
  return D.22989;
}


lookup_or_register_info (struct MonoClass * class, int type_argc, void * data, MonoRgctxInfoType info_type, struct MonoGenericContext * generic_context)
{
  int D.22992;
  <unnamed type> D.22997;
  void * D.22999;
  int D.23000;
  int D.23003;
  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.22992 = info_has_identity (info_type);
  if (D.22992 != 0) goto <D.22993>; else goto <D.22994>;
  <D.22993>:
  oti_list = get_info_templates (rgctx_template, type_argc);
  oti = oti_list;
  i = 0;
  goto <D.22430>;
  <D.22429>:
  {
    void * inflated_data;

    D.22997 = oti->info_type;
    if (D.22997 != info_type) goto <D.22995>; else goto <D.22998>;
    <D.22998>:
    D.22999 = oti->data;
    if (D.22999 == 0B) goto <D.22995>; else goto <D.22996>;
    <D.22995>:
    // predicted unlikely by continue predictor.
    goto <D.22428>;
    <D.22996>:
    inflated_data = inflate_info (oti, generic_context, class, 1);
    D.23000 = info_equal (data, inflated_data, info_type);
    if (D.23000 != 0) goto <D.23001>; else goto <D.23002>;
    <D.23001>:
    free_inflated_info (info_type, inflated_data);
    mono_loader_unlock ();
    D.23003 = i;
    return D.23003;
    <D.23002>:
    free_inflated_info (info_type, inflated_data);
  }
  <D.22428>:
  oti = oti->next;
  i = i + 1;
  <D.22430>:
  if (oti != 0B) goto <D.22429>; else goto <D.22431>;
  <D.22431>:
  <D.22994>:
  i = register_info (class, type_argc, data, info_type);
  mono_loader_unlock ();
  inited.11 = inited;
  if (inited.11 == 0) goto <D.23005>; else goto <D.23006>;
  <D.23005>:
  mono_counters_register ("RGCTX max slot number", 2048, &max_slot);
  inited = 1;
  <D.23006>:
  max_slot.12 = max_slot;
  if (i > max_slot.12) goto <D.23008>; else goto <D.23009>;
  <D.23008>:
  max_slot = i;
  <D.23009>:
  D.23003 = i;
  return D.23003;
}


mono_class_get_runtime_generic_context_template (struct MonoClass * class)
{
  struct MonoRuntimeGenericContextTemplate * D.23013;
  struct MonoClass * D.23014;
  int D.23017;
  void * D.23018;
  struct MonoClass * D.23021;
  struct MonoType * D.23022;
  <unnamed type> D.23025;
  int i.13;
  struct MonoImage * D.23027;
  struct MonoRuntimeGenericContextTemplate * D.23028;
  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.23011>; else goto <D.23012>;
  <D.23011>:
  D.23013 = template;
  return D.23013;
  <D.23012>:
  template = alloc_template (class);
  mono_loader_lock ();
  D.23014 = class->parent;
  if (D.23014 != 0B) goto <D.23015>; else goto <D.23016>;
  <D.23015>:
  {
    guint32 num_entries;
    int max_argc;
    int type_argc;

    D.23014 = class->parent;
    parent_template = mono_class_get_runtime_generic_context_template (D.23014);
    max_argc = template_get_max_argc (parent_template);
    type_argc = 0;
    goto <D.22105>;
    <D.22104>:
    D.23017 = rgctx_template_num_infos (parent_template, type_argc);
    num_entries = (guint32) D.23017;
    i = 0;
    goto <D.22102>;
    <D.22101>:
    {
      struct MonoRuntimeGenericContextInfoTemplate oti;

      try
        {
          D.23014 = class->parent;
          oti = class_get_rgctx_template_oti (D.23014, type_argc, i, 0, 0, 0B); [return slot optimization]
          D.23018 = oti.data;
          if (D.23018 != 0B) goto <D.23019>; else goto <D.23020>;
          <D.23019>:
          D.23018 = oti.data;
          D.23021 = mono_defaults.object_class;
          D.23022 = &D.23021->byval_arg;
          if (D.23018 != D.23022) goto <D.23023>; else goto <D.23024>;
          <D.23023>:
          D.23025 = oti.info_type;
          D.23018 = oti.data;
          i.13 = (int) i;
          D.23027 = class->image;
          rgctx_template_set_slot (D.23027, template, type_argc, i.13, D.23018, D.23025);
          <D.23024>:
          <D.23020>:
        }
      finally
        {
          oti = {CLOBBER};
        }
    }
    i = i + 1;
    <D.22102>:
    if (i < num_entries) goto <D.22101>; else goto <D.22103>;
    <D.22103>:
    type_argc = type_argc + 1;
    <D.22105>:
    if (type_argc <= max_argc) goto <D.22104>; else goto <D.22106>;
    <D.22106>:
  }
  <D.23016>:
  D.23028 = class_lookup_rgctx_template (class);
  if (D.23028 != 0B) goto <D.23029>; else goto <D.23030>;
  <D.23029>:
  template = class_lookup_rgctx_template (class);
  goto <D.23031>;
  <D.23030>:
  class_set_rgctx_template (class, template);
  D.23014 = class->parent;
  if (D.23014 != 0B) goto <D.23032>; else goto <D.23033>;
  <D.23032>:
  register_generic_subclass (class);
  <D.23033>:
  <D.23031>:
  mono_loader_unlock ();
  D.23013 = template;
  return D.23013;
}


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.23042;
  unsigned int size.19;
  struct MonoImage * D.23044;
  static gboolean inited = 0;
  static int num_allocted = 0;
  static int num_bytes = 0;
  int size;

  size = 12;
  inited.14 = inited;
  if (inited.14 == 0) goto <D.23036>; else goto <D.23037>;
  <D.23036>:
  mono_counters_register ("RGCTX template num allocted", 2048, &num_allocted);
  mono_counters_register ("RGCTX template bytes allocted", 2048, &num_bytes);
  inited = 1;
  <D.23037>:
  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;
  size.19 = (unsigned int) size;
  D.23044 = class->image;
  D.23042 = mono_image_alloc0 (D.23044, size.19);
  return D.23042;
}


template_get_max_argc (struct MonoRuntimeGenericContextTemplate * template)
{
  int D.23046;
  struct GSList * D.23047;
  unsigned int D.23048;

  D.23047 = template->method_templates;
  D.23048 = monoeg_g_slist_length (D.23047);
  D.23046 = (int) D.23048;
  return D.23046;
}


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

  i = 0;
  oti = get_info_templates (template, type_argc);
  goto <D.21897>;
  <D.21896>:
  i = i + 1;
  oti = oti->next;
  <D.21897>:
  if (oti != 0B) goto <D.21896>; else goto <D.21898>;
  <D.21898>:
  D.23050 = i;
  return D.23050;
}


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.23056;
  _Bool D.23057;
  _Bool D.23058;
  _Bool D.23060;
  _Bool D.23061;
  _Bool D.23062;
  _Bool D.23064;
  long int D.23065;
  long int D.23066;
  struct MonoGenericClass * D.23070;
  struct MonoClass * D.23073;
  void * D.23074;
  struct MonoGenericContext * D.23077;
  void * D.23078;
  int tmp_do_free.21;
  <unnamed type> D.23082;
  int slot.22;
  _Bool D.23086;
  long int D.23087;
  long int D.23088;

  D.23056 = temporary == 0;
  D.23057 = do_free == 0B;
  D.23058 = D.23056 | D.23057;
  if (D.23058 != 0) goto <D.23059>; else goto <D.23054>;
  <D.23059>:
  D.23060 = temporary != 0;
  D.23061 = do_free != 0B;
  D.23062 = D.23060 | D.23061;
  if (D.23062 != 0) goto <D.23063>; else goto <D.23054>;
  <D.23063>:
  iftmp.20 = 1;
  goto <D.23055>;
  <D.23054>:
  iftmp.20 = 0;
  <D.23055>:
  D.23064 = iftmp.20 != 0;
  D.23065 = (long int) D.23064;
  D.23066 = __builtin_expect (D.23065, 0);
  if (D.23066 != 0) goto <D.23067>; else goto <D.23068>;
  <D.23067>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 886, "(temporary && do_free) || (!temporary && !do_free)");
  <D.23068>:
  D.23070 = class->generic_class;
  if (D.23070 != 0B) goto <D.23071>; else goto <D.23069>;
  <D.23071>:
  if (shared == 0) goto <D.23072>; else goto <D.23069>;
  <D.23072>:
  {
    struct MonoRuntimeGenericContextInfoTemplate oti;
    gboolean tmp_do_free;

    try
      {
        D.23070 = class->generic_class;
        D.23073 = D.23070->container_class;
        oti = class_get_rgctx_template_oti (D.23073, type_argc, slot, 1, 0, &tmp_do_free);
        D.23074 = oti.data;
        if (D.23074 != 0B) goto <D.23075>; else goto <D.23076>;
        <D.23075>:
        {
          void * info;

          info = oti.data;
          D.23070 = class->generic_class;
          D.23077 = &D.23070->context;
          D.23078 = inflate_info (&oti, D.23077, class, temporary);
          oti.data = D.23078;
          tmp_do_free.21 = tmp_do_free;
          if (tmp_do_free.21 != 0) goto <D.23080>; else goto <D.23081>;
          <D.23080>:
          D.23082 = oti.info_type;
          free_inflated_info (D.23082, info);
          <D.23081>:
        }
        <D.23076>:
        if (temporary != 0) goto <D.23083>; else goto <D.23084>;
        <D.23083>:
        *do_free = 1;
        <D.23084>:
        <retval> = oti;
        return <retval>;
      }
    finally
      {
        oti = {CLOBBER};
        tmp_do_free = {CLOBBER};
      }
  }
  <D.23069>:
  {
    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.23086 = oti == 0B;
    D.23087 = (long int) D.23086;
    D.23088 = __builtin_expect (D.23087, 0);
    if (D.23088 != 0) goto <D.23089>; else goto <D.23090>;
    <D.23089>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 912, "oti");
    <D.23090>:
    if (temporary != 0) goto <D.23091>; else goto <D.23092>;
    <D.23091>:
    *do_free = 0;
    <D.23092>:
    <retval> = *oti;
    return <retval>;
  }
}


rgctx_template_get_other_slot (struct MonoRuntimeGenericContextTemplate * template, int type_argc, int slot)
{
  _Bool D.23095;
  long int D.23096;
  long int D.23097;
  struct MonoRuntimeGenericContextInfoTemplate * D.23102;
  int i;
  struct MonoRuntimeGenericContextInfoTemplate * oti;

  D.23095 = slot < 0;
  D.23096 = (long int) D.23095;
  D.23097 = __builtin_expect (D.23096, 0);
  if (D.23097 != 0) goto <D.23098>; else goto <D.23099>;
  <D.23098>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 189, "slot >= 0");
  <D.23099>:
  oti = get_info_templates (template, type_argc);
  i = 0;
  goto <D.21888>;
  <D.21887>:
  if (oti == 0B) goto <D.23100>; else goto <D.23101>;
  <D.23100>:
  D.23102 = 0B;
  return D.23102;
  <D.23101>:
  oti = oti->next;
  i = i + 1;
  <D.21888>:
  if (i < slot) goto <D.21887>; else goto <D.21889>;
  <D.21889>:
  D.23102 = oti;
  return D.23102;
}


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.23108;
  long int D.23109;
  long int D.23110;
  _Bool D.23113;
  long int D.23114;
  long int D.23115;
  struct MonoRuntimeGenericContextInfoTemplate * D.23120;
  struct MonoRuntimeGenericContextInfoTemplate * D.23123;
  void * D.23124;
  _Bool D.23125;
  long int D.23126;
  long int D.23127;
  struct MonoRuntimeGenericContextInfoTemplate * list.25;
  struct MonoClass * D.23131;
  struct MonoType * D.23132;
  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.23106>; else goto <D.23107>;
      <D.23106>:
      mono_counters_register ("RGCTX oti num markers", 2048, &num_markers);
      mono_counters_register ("RGCTX oti num data", 2048, &num_data);
      inited = 1;
      <D.23107>:
      D.23108 = slot < 0;
      D.23109 = (long int) D.23108;
      D.23110 = __builtin_expect (D.23109, 0);
      if (D.23110 != 0) goto <D.23111>; else goto <D.23112>;
      <D.23111>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 414, "slot >= 0");
      <D.23112>:
      D.23113 = data == 0B;
      D.23114 = (long int) D.23113;
      D.23115 = __builtin_expect (D.23114, 0);
      if (D.23115 != 0) goto <D.23116>; else goto <D.23117>;
      <D.23116>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 415, "data");
      <D.23117>:
      i = 0;
      goto <D.21965>;
      <D.21964>:
      if (i > 0) goto <D.23118>; else goto <D.23119>;
      <D.23118>:
      D.23120 = *oti;
      oti = &D.23120->next;
      <D.23119>:
      D.23120 = *oti;
      if (D.23120 == 0B) goto <D.23121>; else goto <D.23122>;
      <D.23121>:
      D.23123 = alloc_oti (image);
      *oti = D.23123;
      <D.23122>:
      i = i + 1;
      <D.21965>:
      if (i <= slot) goto <D.21964>; else goto <D.21966>;
      <D.21966>:
      D.23120 = *oti;
      D.23124 = D.23120->data;
      D.23125 = D.23124 != 0B;
      D.23126 = (long int) D.23125;
      D.23127 = __builtin_expect (D.23126, 0);
      if (D.23127 != 0) goto <D.23128>; else goto <D.23129>;
      <D.23128>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 426, "!(*oti)->data");
      <D.23129>:
      D.23120 = *oti;
      D.23120->data = data;
      D.23120 = *oti;
      D.23120->info_type = info_type;
      list.25 = list;
      set_info_templates (image, template, type_argc, list.25);
      D.23131 = mono_defaults.object_class;
      D.23132 = &D.23131->byval_arg;
      if (D.23132 == data) goto <D.23133>; else goto <D.23134>;
      <D.23133>:
      num_markers.26 = num_markers;
      num_markers.27 = num_markers.26 + 1;
      num_markers = num_markers.27;
      goto <D.23137>;
      <D.23134>:
      num_data.28 = num_data;
      num_data.29 = num_data.28 + 1;
      num_data = num_data.29;
      <D.23137>:
    }
  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.23147;
  unsigned int size.35;
  static gboolean inited = 0;
  static int num_allocted = 0;
  static int num_bytes = 0;
  int size;

  size = 12;
  inited.30 = inited;
  if (inited.30 == 0) goto <D.23141>; else goto <D.23142>;
  <D.23141>:
  mono_counters_register ("RGCTX oti num allocted", 2048, &num_allocted);
  mono_counters_register ("RGCTX oti bytes allocted", 2048, &num_bytes);
  inited = 1;
  <D.23142>:
  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.23147 = mono_image_alloc0 (image, size.35);
  return D.23147;
}


set_info_templates (struct MonoImage * image, struct MonoRuntimeGenericContextTemplate * template, int type_argc, struct MonoRuntimeGenericContextInfoTemplate * oti)
{
  _Bool D.23150;
  long int D.23151;
  long int D.23152;
  struct GSList * D.23158;
  unsigned int D.23159;
  struct GSList * D.23160;
  int D.23161;
  unsigned int D.23162;
  _Bool D.23163;
  long int D.23164;
  long int D.23165;

  D.23150 = type_argc < 0;
  D.23151 = (long int) D.23150;
  D.23152 = __builtin_expect (D.23151, 0);
  if (D.23152 != 0) goto <D.23153>; else goto <D.23154>;
  <D.23153>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 152, "type_argc >= 0");
  <D.23154>:
  if (type_argc == 0) goto <D.23155>; else goto <D.23156>;
  <D.23155>:
  template->infos = oti;
  goto <D.23157>;
  <D.23156>:
  {
    int length;
    struct GSList * list;

    D.23158 = template->method_templates;
    D.23159 = monoeg_g_slist_length (D.23158);
    length = (int) D.23159;
    goto <D.21875>;
    <D.21874>:
    D.23158 = template->method_templates;
    D.23160 = g_slist_append_image (image, D.23158, 0B);
    template->method_templates = D.23160;
    length = length + 1;
    <D.21875>:
    if (length < type_argc) goto <D.21874>; else goto <D.21876>;
    <D.21876>:
    D.23161 = type_argc + -1;
    D.23162 = (unsigned int) D.23161;
    D.23158 = template->method_templates;
    list = monoeg_g_slist_nth (D.23158, D.23162);
    D.23163 = list == 0B;
    D.23164 = (long int) D.23163;
    D.23165 = __builtin_expect (D.23164, 0);
    if (D.23165 != 0) goto <D.23166>; else goto <D.23167>;
    <D.23166>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 166, "list");
    <D.23167>:
    list->data = oti;
  }
  <D.23157>:
}


class_lookup_rgctx_template (struct MonoClass * class)
{
  struct MonoImage * D.23168;
  struct GHashTable * D.23169;
  struct MonoRuntimeGenericContextTemplate * D.23172;
  struct MonoRuntimeGenericContextTemplate * template;

  D.23168 = class->image;
  D.23169 = D.23168->rgctx_template_hash;
  if (D.23169 == 0B) goto <D.23170>; else goto <D.23171>;
  <D.23170>:
  D.23172 = 0B;
  return D.23172;
  <D.23171>:
  D.23168 = class->image;
  D.23169 = D.23168->rgctx_template_hash;
  template = monoeg_g_hash_table_lookup (D.23169, class);
  D.23172 = template;
  return D.23172;
}


class_set_rgctx_template (struct MonoClass * class, struct MonoRuntimeGenericContextTemplate * rgctx_template)
{
  struct MonoImage * D.23174;
  struct GHashTable * D.23175;
  struct GHashTable * D.23178;

  D.23174 = class->image;
  D.23175 = D.23174->rgctx_template_hash;
  if (D.23175 == 0B) goto <D.23176>; else goto <D.23177>;
  <D.23176>:
  D.23174 = class->image;
  D.23178 = monoeg_g_hash_table_new (mono_aligned_addr_hash, 0B);
  D.23174->rgctx_template_hash = D.23178;
  <D.23177>:
  D.23174 = class->image;
  D.23175 = D.23174->rgctx_template_hash;
  monoeg_g_hash_table_insert_replace (D.23175, class, rgctx_template, 0);
}


register_generic_subclass (struct MonoClass * class)
{
  _Bool D.23179;
  long int D.23180;
  long int D.23181;
  struct MonoGenericClass * D.23184;
  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.23179 = rgctx_template == 0B;
  D.23180 = (long int) D.23179;
  D.23181 = __builtin_expect (D.23180, 0);
  if (D.23181 != 0) goto <D.23182>; else goto <D.23183>;
  <D.23182>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 260, "rgctx_template");
  <D.23183>:
  D.23184 = parent->generic_class;
  if (D.23184 != 0B) goto <D.23185>; else goto <D.23186>;
  <D.23185>:
  D.23184 = parent->generic_class;
  parent = D.23184->container_class;
  <D.23186>:
  generic_subclass_hash.36 = generic_subclass_hash;
  if (generic_subclass_hash.36 == 0B) goto <D.23188>; else goto <D.23189>;
  <D.23188>:
  generic_subclass_hash.37 = monoeg_g_hash_table_new (mono_aligned_addr_hash, 0B);
  generic_subclass_hash = generic_subclass_hash.37;
  <D.23189>:
  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.23191;

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


class_uninstantiated (struct MonoClass * class)
{
  struct MonoGenericClass * D.23193;
  struct MonoClass * D.23196;

  D.23193 = class->generic_class;
  if (D.23193 != 0B) goto <D.23194>; else goto <D.23195>;
  <D.23194>:
  D.23193 = class->generic_class;
  D.23196 = D.23193->container_class;
  return D.23196;
  <D.23195>:
  D.23196 = class;
  return D.23196;
}


info_has_identity (MonoRgctxInfoType info_type)
{
  int D.23198;
  _Bool D.23199;

  D.23199 = info_type != 12;
  D.23198 = (int) D.23199;
  return D.23198;
}


get_info_templates (struct MonoRuntimeGenericContextTemplate * template, int type_argc)
{
  _Bool D.23201;
  long int D.23202;
  long int D.23203;
  struct MonoRuntimeGenericContextInfoTemplate * D.23208;
  int D.23209;
  unsigned int D.23210;
  struct GSList * D.23211;

  D.23201 = type_argc < 0;
  D.23202 = (long int) D.23201;
  D.23203 = __builtin_expect (D.23202, 0);
  if (D.23203 != 0) goto <D.23204>; else goto <D.23205>;
  <D.23204>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 139, "type_argc >= 0");
  <D.23205>:
  if (type_argc == 0) goto <D.23206>; else goto <D.23207>;
  <D.23206>:
  D.23208 = template->infos;
  return D.23208;
  <D.23207>:
  D.23209 = type_argc + -1;
  D.23210 = (unsigned int) D.23209;
  D.23211 = template->method_templates;
  D.23208 = monoeg_g_slist_nth_data (D.23211, D.23210);
  return D.23208;
}


inflate_info (struct MonoRuntimeGenericContextInfoTemplate * oti, struct MonoGenericContext * context, struct MonoClass * class, gboolean temporary)
{
  _Bool D.23213;
  long int D.23214;
  long int D.23215;
  struct MonoClass * D.23218;
  struct MonoType * D.23219;
  void * D.23222;
  struct MonoImage * iftmp.38;
  int D.23227;
  _Bool D.23228;
  long int D.23229;
  long int D.23230;
  struct MonoClass * D.23233;
  struct MonoType * D.23234;
  unsigned char D.23235;
  unsigned char D.23236;
  _Bool D.23237;
  long int D.23238;
  long int D.23239;
  unsigned char D.23242;
  _Bool D.23243;
  _Bool D.23244;
  _Bool D.23245;
  struct MonoMethodSignature * D.23248;
  const char * D.23249;
  struct MonoClass * D.23251;
  _Bool D.23252;
  long int D.23253;
  long int D.23254;
  struct GPtrArray * D.23257;
  struct GPtrArray * D.23258;
  void * * D.23259;
  unsigned int i.39;
  unsigned int D.23261;
  void * * D.23262;
  void * D.23263;
  struct GPtrArray * D.23264;
  unsigned int i.40;
  unsigned int D.23266;
  struct MonoClass * D.23267;
  struct MonoType * D.23268;
  struct MonoMethodSignature * D.23269;
  unsigned char D.23270;
  unsigned char D.23271;
  _Bool D.23272;
  long int D.23273;
  long int D.23274;
  unsigned char D.23277;
  _Bool D.23278;
  _Bool D.23279;
  _Bool D.23280;
  struct MonoMethodSignature * D.23283;
  const char * D.23284;
  struct MonoClass * D.23286;
  _Bool D.23287;
  long int D.23288;
  long int D.23289;
  struct MonoClass * D.23292;
  struct MonoType * D.23293;
  int field.41;
  struct MonoClassField * D.23295;
  int D.23296;
  int D.23297;
  struct MonoClassField * D.23298;
  _Bool D.23299;
  long int D.23300;
  long int D.23301;
  unsigned int i.42;
  unsigned int D.23305;
  int D.23306;
  _Bool D.23307;
  long int D.23308;
  long int D.23309;
  void * data;
  MonoRgctxInfoType info_type;
  struct MonoError error;

  try
    {
      data = oti->data;
      info_type = oti->info_type;
      D.23213 = data == 0B;
      D.23214 = (long int) D.23213;
      D.23215 = __builtin_expect (D.23214, 0);
      if (D.23215 != 0) goto <D.23216>; else goto <D.23217>;
      <D.23216>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 519, "data");
      <D.23217>:
      D.23218 = mono_defaults.object_class;
      D.23219 = &D.23218->byval_arg;
      if (D.23219 == data) goto <D.23220>; else goto <D.23221>;
      <D.23220>:
      D.23218 = mono_defaults.object_class;
      D.23222 = &D.23218->byval_arg;
      return D.23222;
      <D.23221>:
      switch (info_type) <default: <D.22044>, case 0: <D.21991>, case 1: <D.21992>, case 2: <D.21993>, case 3: <D.21994>, case 4: <D.21995>, case 5: <D.22006>, case 6: <D.22007>, case 7: <D.22033>, case 8: <D.22008>, case 9: <D.22009>, case 10: <D.22010>, case 11: <D.22011>, case 12: <D.21996>, case 13: <D.21997>, case 14: <D.21998>, case 15: <D.22034>, case 16: <D.22025>, case 17: <D.22026>, case 18: <D.22040>, case 19: <D.21999>, case 20: <D.22016>, case 21: <D.22002>, case 22: <D.22000>, case 23: <D.22001>, case 24: <D.22003>, case 25: <D.22004>>
      <D.21991>:
      <D.21992>:
      <D.21993>:
      <D.21994>:
      <D.21995>:
      <D.21996>:
      <D.21997>:
      <D.21998>:
      <D.21999>:
      <D.22000>:
      <D.22001>:
      <D.22002>:
      <D.22003>:
      <D.22004>:
      {
        void * result;

        if (temporary == 0) goto <D.23224>; else goto <D.23225>;
        <D.23224>:
        iftmp.38 = class->image;
        goto <D.23226>;
        <D.23225>:
        iftmp.38 = 0B;
        <D.23226>:
        result = mono_class_inflate_generic_type_with_mempool (iftmp.38, data, context, &error);
        D.23227 = mono_error_ok (&error);
        D.23228 = D.23227 == 0;
        D.23229 = (long int) D.23228;
        D.23230 = __builtin_expect (D.23229, 0);
        if (D.23230 != 0) goto <D.23231>; else goto <D.23232>;
        <D.23231>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 542, "mono_error_ok (&error)");
        <D.23232>:
        D.23222 = result;
        return D.23222;
      }
      <D.22006>:
      <D.22007>:
      <D.22008>:
      <D.22009>:
      <D.22010>:
      <D.22011>:
      {
        struct MonoMethod * method;
        struct MonoMethod * inflated_method;
        struct MonoType * inflated_type;
        struct MonoClass * inflated_class;

        method = data;
        D.23233 = method->klass;
        D.23234 = &D.23233->byval_arg;
        inflated_type = mono_class_inflate_generic_type (D.23234, context);
        inflated_class = mono_class_from_mono_type (inflated_type);
        mono_metadata_free_type (inflated_type);
        mono_class_init (inflated_class);
        D.23235 = BIT_FIELD_REF <*method, 8, 160>;
        D.23236 = D.23235 & 124;
        D.23237 = D.23236 != 0;
        D.23238 = (long int) D.23237;
        D.23239 = __builtin_expect (D.23238, 0);
        if (D.23239 != 0) goto <D.23240>; else goto <D.23241>;
        <D.23240>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 561, "!method->wrapper_type");
        <D.23241>:
        D.23242 = inflated_class->byval_arg.type;
        D.23243 = D.23242 == 20;
        D.23244 = D.23242 == 29;
        D.23245 = D.23243 | D.23244;
        if (D.23245 != 0) goto <D.23246>; else goto <D.23247>;
        <D.23246>:
        D.23248 = method->signature;
        D.23249 = method->name;
        inflated_method = mono_method_search_in_array_class (inflated_class, D.23249, D.23248);
        goto <D.23250>;
        <D.23247>:
        inflated_method = mono_class_inflate_generic_method (method, context);
        <D.23250>:
        D.23251 = inflated_method->klass;
        mono_class_init (D.23251);
        D.23251 = inflated_method->klass;
        D.23252 = D.23251 != inflated_class;
        D.23253 = (long int) D.23252;
        D.23254 = __builtin_expect (D.23253, 0);
        if (D.23254 != 0) goto <D.23255>; else goto <D.23256>;
        <D.23255>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 571, "inflated_method->klass == inflated_class");
        <D.23256>:
        D.23222 = inflated_method;
        return D.23222;
      }
      <D.22016>:
      {
        struct MonoGSharedVtMethodInfo * info;
        struct MonoGSharedVtMethodInfo * res;
        int i;

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

          D.23258 = info->entries;
          D.23259 = D.23258->pdata;
          i.39 = (unsigned int) i;
          D.23261 = i.39 * 4;
          D.23262 = D.23259 + D.23261;
          otemplate = *D.23262;
          template = monoeg_malloc0 (12);
          memcpy (template, otemplate, 12);
          D.23263 = inflate_info (template, context, class, 0);
          template->data = D.23263;
          D.23264 = res->entries;
          monoeg_g_ptr_array_add (D.23264, template);
        }
        i = i + 1;
        <D.22023>:
        i.40 = (unsigned int) i;
        D.23258 = info->entries;
        D.23266 = D.23258->len;
        if (i.40 < D.23266) goto <D.22022>; else goto <D.22024>;
        <D.22024>:
        D.23222 = res;
        return D.23222;
      }
      <D.22025>:
      <D.22026>:
      {
        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.23267 = method->klass;
        D.23268 = &D.23267->byval_arg;
        inflated_type = mono_class_inflate_generic_type (D.23268, context);
        inflated_class = mono_class_from_mono_type (inflated_type);
        res = monoeg_malloc0 (8);
        D.23269 = info->sig;
        res->sig = D.23269;
        mono_metadata_free_type (inflated_type);
        mono_class_init (inflated_class);
        D.23270 = BIT_FIELD_REF <*method, 8, 160>;
        D.23271 = D.23270 & 124;
        D.23272 = D.23271 != 0;
        D.23273 = (long int) D.23272;
        D.23274 = __builtin_expect (D.23273, 0);
        if (D.23274 != 0) goto <D.23275>; else goto <D.23276>;
        <D.23275>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 616, "!method->wrapper_type");
        <D.23276>:
        D.23277 = inflated_class->byval_arg.type;
        D.23278 = D.23277 == 20;
        D.23279 = D.23277 == 29;
        D.23280 = D.23278 | D.23279;
        if (D.23280 != 0) goto <D.23281>; else goto <D.23282>;
        <D.23281>:
        D.23283 = method->signature;
        D.23284 = method->name;
        inflated_method = mono_method_search_in_array_class (inflated_class, D.23284, D.23283);
        goto <D.23285>;
        <D.23282>:
        inflated_method = mono_class_inflate_generic_method (method, context);
        <D.23285>:
        D.23286 = inflated_method->klass;
        mono_class_init (D.23286);
        D.23286 = inflated_method->klass;
        D.23287 = D.23286 != inflated_class;
        D.23288 = (long int) D.23287;
        D.23289 = __builtin_expect (D.23288, 0);
        if (D.23289 != 0) goto <D.23290>; else goto <D.23291>;
        <D.23290>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 626, "inflated_method->klass == inflated_class");
        <D.23291>:
        res->method = inflated_method;
        D.23222 = res;
        return D.23222;
      }
      <D.22033>:
      <D.22034>:
      {
        struct MonoClassField * field;
        struct MonoType * inflated_type;
        struct MonoClass * inflated_class;
        int i;
        void * dummy;

        try
          {
            field = data;
            D.23292 = field->parent;
            D.23293 = &D.23292->byval_arg;
            inflated_type = mono_class_inflate_generic_type (D.23293, context);
            inflated_class = mono_class_from_mono_type (inflated_type);
            field.41 = (int) field;
            D.23292 = field->parent;
            D.23295 = D.23292->fields;
            D.23296 = (int) D.23295;
            D.23297 = field.41 - D.23296;
            i = D.23297 /[ex] 16;
            dummy = 0B;
            mono_metadata_free_type (inflated_type);
            mono_class_get_fields (inflated_class, &dummy);
            D.23298 = inflated_class->fields;
            D.23299 = D.23298 == 0B;
            D.23300 = (long int) D.23299;
            D.23301 = __builtin_expect (D.23300, 0);
            if (D.23301 != 0) goto <D.23302>; else goto <D.23303>;
            <D.23302>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 643, "inflated_class->fields");
            <D.23303>:
            D.23298 = inflated_class->fields;
            i.42 = (unsigned int) i;
            D.23305 = i.42 * 16;
            D.23222 = D.23298 + D.23305;
            return D.23222;
          }
        finally
          {
            dummy = {CLOBBER};
          }
      }
      <D.22040>:
      {
        struct MonoMethodSignature * sig;
        struct MonoMethodSignature * isig;
        struct MonoError error;

        try
          {
            sig = data;
            isig = mono_inflate_generic_signature (sig, context, &error);
            D.23306 = mono_error_ok (&error);
            D.23307 = D.23306 == 0;
            D.23308 = (long int) D.23307;
            D.23309 = __builtin_expect (D.23308, 0);
            if (D.23309 != 0) goto <D.23310>; else goto <D.23311>;
            <D.23310>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 653, "mono_error_ok (&error)");
            <D.23311>:
            D.23222 = isig;
            return D.23222;
          }
        finally
          {
            error = {CLOBBER};
          }
      }
      <D.22044>:
      monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 658);
      D.23222 = 0B;
      return D.23222;
    }
  finally
    {
      error = {CLOBBER};
    }
}


info_equal (void * data1, void * data2, MonoRgctxInfoType info_type)
{
  gboolean D.23316;
  struct MonoClass * D.23317;
  struct MonoClass * D.23318;
  _Bool D.23319;
  _Bool D.23320;

  switch (info_type) <default: <D.22394>, case 0: <D.22369>, case 1: <D.22370>, case 2: <D.22371>, case 3: <D.22372>, case 4: <D.22373>, case 5: <D.22382>, case 6: <D.22384>, case 7: <D.22385>, case 8: <D.22387>, case 9: <D.22388>, case 10: <D.22389>, case 11: <D.22390>, case 12: <D.22374>, case 13: <D.22375>, case 14: <D.22376>, case 15: <D.22386>, case 16: <D.22391>, case 17: <D.22392>, case 18: <D.22393>, case 19: <D.22377>, case 20: <D.22383>, case 22: <D.22378>, case 23: <D.22379>, case 24: <D.22380>, case 25: <D.22381>>
  <D.22369>:
  <D.22370>:
  <D.22371>:
  <D.22372>:
  <D.22373>:
  <D.22374>:
  <D.22375>:
  <D.22376>:
  <D.22377>:
  <D.22378>:
  <D.22379>:
  <D.22380>:
  <D.22381>:
  D.23317 = mono_class_from_mono_type (data1);
  D.23318 = mono_class_from_mono_type (data2);
  D.23319 = D.23317 == D.23318;
  D.23316 = (gboolean) D.23319;
  return D.23316;
  <D.22382>:
  <D.22383>:
  <D.22384>:
  <D.22385>:
  <D.22386>:
  <D.22387>:
  <D.22388>:
  <D.22389>:
  <D.22390>:
  <D.22391>:
  <D.22392>:
  <D.22393>:
  D.23320 = data1 == data2;
  D.23316 = (gboolean) D.23320;
  return D.23316;
  <D.22394>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1644);
  D.23316 = 0;
  return D.23316;
}


free_inflated_info (MonoRgctxInfoType info_type, void * info)
{
  if (info == 0B) goto <D.23322>; else goto <D.23323>;
  <D.23322>:
  return;
  <D.23323>:
  switch (info_type) <default: <D.22056>, case 0: <D.22049>, case 1: <D.22050>, case 2: <D.22051>, case 3: <D.22052>, case 4: <D.22053>, case 12: <D.22054>>
  <D.22049>:
  <D.22050>:
  <D.22051>:
  <D.22052>:
  <D.22053>:
  <D.22054>:
  mono_metadata_free_type (info);
  goto <D.22055>;
  <D.22056>:
  goto <D.22055>;
  <D.22055>:
}


register_info (struct MonoClass * class, int type_argc, void * data, MonoRgctxInfoType info_type)
{
  void * D.23326;
  struct MonoGenericClass * D.23328;
  void * D.23333;
  struct MonoClass * D.23335;
  struct MonoType * D.23336;
  struct MonoImage * D.23337;
  int D.23338;
  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.22358>;
  <D.22357>:
  D.23326 = oti->data;
  if (D.23326 == 0B) goto <D.22356>; else goto <D.23327>;
  <D.23327>:
  i = i + 1;
  oti = oti->next;
  <D.22358>:
  if (oti != 0B) goto <D.22357>; else goto <D.22356>;
  <D.22356>:
  parent = class->parent;
  goto <D.22363>;
  <D.22362>:
  {
    struct MonoRuntimeGenericContextTemplate * parent_template;
    struct MonoRuntimeGenericContextInfoTemplate * oti;

    D.23328 = parent->generic_class;
    if (D.23328 != 0B) goto <D.23329>; else goto <D.23330>;
    <D.23329>:
    D.23328 = parent->generic_class;
    parent = D.23328->container_class;
    <D.23330>:
    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.23331>; else goto <D.23332>;
    <D.23331>:
    D.23333 = oti->data;
    if (D.23333 != 0B) goto <D.22361>; else goto <D.23334>;
    <D.23334>:
    <D.23332>:
    D.23335 = mono_defaults.object_class;
    D.23336 = &D.23335->byval_arg;
    D.23337 = parent->image;
    rgctx_template_set_slot (D.23337, parent_template, type_argc, i, D.23336, 0);
    parent = parent->parent;
  }
  <D.22363>:
  if (parent != 0B) goto <D.22362>; else goto <D.22361>;
  <D.22361>:
  fill_in_rgctx_template_slot (class, type_argc, i, data, info_type);
  D.23338 = i;
  return D.23338;
}


fill_in_rgctx_template_slot (struct MonoClass * class, int type_argc, int index, void * data, MonoRgctxInfoType info_type)
{
  struct MonoImage * D.23340;
  struct GHashTable * generic_subclass_hash.43;
  _Bool D.23345;
  long int D.23346;
  long int D.23347;
  unsigned int index.44;
  struct MonoClass * D.23351;
  void * D.23352;
  _Bool D.23353;
  long int D.23354;
  long int D.23355;
  struct MonoRuntimeGenericContextTemplate * template;
  struct MonoClass * subclass;

  template = mono_class_get_runtime_generic_context_template (class);
  D.23340 = class->image;
  rgctx_template_set_slot (D.23340, template, type_argc, index, data, info_type);
  generic_subclass_hash.43 = generic_subclass_hash;
  if (generic_subclass_hash.43 != 0B) goto <D.23342>; else goto <D.23343>;
  <D.23342>:
  generic_subclass_hash.43 = generic_subclass_hash;
  subclass = monoeg_g_hash_table_lookup (generic_subclass_hash.43, class);
  goto <D.23344>;
  <D.23343>:
  subclass = 0B;
  <D.23344>:
  goto <D.22309>;
  <D.22308>:
  {
    struct MonoRuntimeGenericContextInfoTemplate subclass_oti;
    struct MonoRuntimeGenericContextTemplate * subclass_template;

    try
      {
        subclass_template = class_lookup_rgctx_template (subclass);
        D.23345 = subclass_template == 0B;
        D.23346 = (long int) D.23345;
        D.23347 = __builtin_expect (D.23346, 0);
        if (D.23347 != 0) goto <D.23348>; else goto <D.23349>;
        <D.23348>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1509, "subclass_template");
        <D.23349>:
        index.44 = (unsigned int) index;
        D.23351 = subclass->parent;
        subclass_oti = class_get_rgctx_template_oti (D.23351, type_argc, index.44, 0, 0, 0B); [return slot optimization]
        D.23352 = subclass_oti.data;
        D.23353 = D.23352 == 0B;
        D.23354 = (long int) D.23353;
        D.23355 = __builtin_expect (D.23354, 0);
        if (D.23355 != 0) goto <D.23356>; else goto <D.23357>;
        <D.23356>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1512, "subclass_oti.data");
        <D.23357>:
        D.23352 = subclass_oti.data;
        fill_in_rgctx_template_slot (subclass, type_argc, index, D.23352, info_type);
        subclass = subclass_template->next_subclass;
      }
    finally
      {
        subclass_oti = {CLOBBER};
      }
  }
  <D.22309>:
  if (subclass != 0B) goto <D.22308>; else goto <D.22310>;
  <D.22310>:
}


mono_class_rgctx_get_array_size (int n, gboolean mrgctx)
{
  unsigned int n.45;
  _Bool D.23359;
  long int D.23360;
  long int D.23361;
  int D.23366;

  n.45 = (unsigned int) n;
  D.23359 = n.45 > 29;
  D.23360 = (long int) D.23359;
  D.23361 = __builtin_expect (D.23360, 0);
  if (D.23361 != 0) goto <D.23362>; else goto <D.23363>;
  <D.23362>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1784, "n >= 0 && n < 30");
  <D.23363>:
  if (mrgctx != 0) goto <D.23364>; else goto <D.23365>;
  <D.23364>:
  D.23366 = 6 << n;
  return D.23366;
  <D.23365>:
  D.23366 = 4 << n;
  return D.23366;
}


mono_class_fill_runtime_generic_context (struct MonoVTable * class_vtable, guint8 * caller, guint32 slot)
{
  union mono_mutex_t * D.23368;
  _Bool D.23371;
  long int D.23372;
  long int D.23373;
  int inited.46;
  int num_alloced.47;
  int num_alloced.48;
  _Bool D.23385;
  long int D.23386;
  long int D.23387;
  void * D.23390;
  static gboolean inited = 0;
  static int num_alloced = 0;
  struct MonoDomain * domain;
  void * * rgctx;
  void * info;

  domain = class_vtable->domain;
  {
    int ret;

    D.23368 = &domain->lock.mutex;
    ret = pthread_mutex_lock (D.23368);
    if (ret != 0) goto <D.23369>; else goto <D.23370>;
    <D.23369>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.23370>:
    D.23371 = ret != 0;
    D.23372 = (long int) D.23371;
    D.23373 = __builtin_expect (D.23372, 0);
    if (D.23373 != 0) goto <D.23374>; else goto <D.23375>;
    <D.23374>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1925, "ret == 0");
    <D.23375>:
  }
  inited.46 = inited;
  if (inited.46 == 0) goto <D.23377>; else goto <D.23378>;
  <D.23377>:
  mono_counters_register ("RGCTX num alloced", 2048, &num_alloced);
  inited = 1;
  <D.23378>:
  rgctx = class_vtable->runtime_generic_context;
  if (rgctx == 0B) goto <D.23379>; else goto <D.23380>;
  <D.23379>:
  rgctx = alloc_rgctx_array (domain, 0, 0);
  class_vtable->runtime_generic_context = rgctx;
  num_alloced.47 = num_alloced;
  num_alloced.48 = num_alloced.47 + 1;
  num_alloced = num_alloced.48;
  <D.23380>:
  {
    int ret;

    D.23368 = &domain->lock.mutex;
    ret = pthread_mutex_unlock (D.23368);
    if (ret != 0) goto <D.23383>; else goto <D.23384>;
    <D.23383>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.23384>:
    D.23385 = ret != 0;
    D.23386 = (long int) D.23385;
    D.23387 = __builtin_expect (D.23386, 0);
    if (D.23387 != 0) goto <D.23388>; else goto <D.23389>;
    <D.23388>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1939, "ret == 0");
    <D.23389>:
  }
  info = fill_runtime_generic_context (class_vtable, rgctx, caller, slot, 0B);
  D.23390 = info;
  return D.23390;
}


alloc_rgctx_array (struct MonoDomain * domain, int n, gboolean is_mrgctx)
{
  int D.23392;
  unsigned int D.23393;
  unsigned int D.23394;
  unsigned int size.49;
  int inited.50;
  int mrgctx_num_alloced.51;
  int mrgctx_num_alloced.52;
  int mrgctx_bytes_alloced.53;
  int mrgctx_bytes_alloced.54;
  int rgctx_num_alloced.55;
  int rgctx_num_alloced.56;
  int rgctx_bytes_alloced.57;
  int rgctx_bytes_alloced.58;
  void * * D.23410;
  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.23392 = mono_class_rgctx_get_array_size (n, is_mrgctx);
  D.23393 = (unsigned int) D.23392;
  D.23394 = D.23393 * 4;
  size = (int) D.23394;
  size.49 = (unsigned int) size;
  array = mono_domain_alloc0 (domain, size.49);
  inited.50 = inited;
  if (inited.50 == 0) goto <D.23397>; else goto <D.23398>;
  <D.23397>:
  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.23398>:
  if (is_mrgctx != 0) goto <D.23399>; else goto <D.23400>;
  <D.23399>:
  mrgctx_num_alloced.51 = mrgctx_num_alloced;
  mrgctx_num_alloced.52 = mrgctx_num_alloced.51 + 1;
  mrgctx_num_alloced = mrgctx_num_alloced.52;
  mrgctx_bytes_alloced.53 = mrgctx_bytes_alloced;
  mrgctx_bytes_alloced.54 = mrgctx_bytes_alloced.53 + size;
  mrgctx_bytes_alloced = mrgctx_bytes_alloced.54;
  goto <D.23405>;
  <D.23400>:
  rgctx_num_alloced.55 = rgctx_num_alloced;
  rgctx_num_alloced.56 = rgctx_num_alloced.55 + 1;
  rgctx_num_alloced = rgctx_num_alloced.56;
  rgctx_bytes_alloced.57 = rgctx_bytes_alloced;
  rgctx_bytes_alloced.58 = rgctx_bytes_alloced.57 + size;
  rgctx_bytes_alloced = rgctx_bytes_alloced.58;
  <D.23405>:
  D.23410 = array;
  return D.23410;
}


fill_runtime_generic_context (struct MonoVTable * class_vtable, void * * rgctx, guint8 * caller, guint32 slot, struct MonoGenericInst * method_inst)
{
  struct MonoGenericContext * iftmp.59;
  struct MonoGenericClass * D.23413;
  struct MonoGenericInst * iftmp.60;
  _Bool D.23421;
  long int D.23422;
  long int D.23423;
  union mono_mutex_t * D.23426;
  _Bool D.23429;
  long int D.23430;
  long int D.23431;
  _Bool D.23434;
  int D.23435;
  unsigned int size.61;
  unsigned int D.23439;
  _Bool D.23440;
  _Bool D.23441;
  int D.23445;
  int D.23446;
  unsigned int D.23447;
  unsigned int first_slot.62;
  unsigned int D.23451;
  unsigned int offset.63;
  unsigned int D.23453;
  unsigned int D.23454;
  unsigned int rgctx_index.64;
  unsigned int D.23456;
  void * * D.23457;
  _Bool D.23462;
  long int D.23463;
  long int D.23464;
  void * D.23467;
  unsigned int offset.65;
  unsigned int D.23469;
  void * * D.23470;
  void * D.23471;
  int D.23474;
  void * * D.23475;
  int D.23476;
  void * D.23477;
  _Bool D.23478;
  long int D.23479;
  long int D.23480;
  _Bool D.23485;
  long int D.23486;
  long int D.23487;
  int iftmp.66;
  <unnamed-unsigned:22> D.23493;
  struct MonoClass * D.23495;
  _Bool D.23498;
  long int D.23499;
  long int D.23500;
  _Bool D.23508;
  long int D.23509;
  long int D.23510;
  int do_free.67;
  void * D.23516;
  <unnamed type> D.23517;
  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.23413 = class->generic_class;
      if (D.23413 != 0B) goto <D.23414>; else goto <D.23415>;
      <D.23414>:
      D.23413 = class->generic_class;
      iftmp.59 = &D.23413->context;
      goto <D.23416>;
      <D.23415>:
      iftmp.59 = 0B;
      <D.23416>:
      class_context = iftmp.59;
      if (class_context != 0B) goto <D.23418>; else goto <D.23419>;
      <D.23418>:
      iftmp.60 = class_context->class_inst;
      goto <D.23420>;
      <D.23419>:
      iftmp.60 = 0B;
      <D.23420>:
      context.class_inst = iftmp.60;
      context.method_inst = method_inst;
      D.23421 = rgctx == 0B;
      D.23422 = (long int) D.23421;
      D.23423 = __builtin_expect (D.23422, 0);
      if (D.23423 != 0) goto <D.23424>; else goto <D.23425>;
      <D.23424>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1840, "rgctx");
      <D.23425>:
      {
        int ret;

        D.23426 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23426);
        if (ret != 0) goto <D.23427>; else goto <D.23428>;
        <D.23427>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23428>:
        D.23429 = ret != 0;
        D.23430 = (long int) D.23429;
        D.23431 = __builtin_expect (D.23430, 0);
        if (D.23431 != 0) goto <D.23432>; else goto <D.23433>;
        <D.23432>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1842, "ret == 0");
        <D.23433>:
      }
      first_slot = 0;
      D.23434 = method_inst != 0B;
      D.23435 = (int) D.23434;
      size = mono_class_rgctx_get_array_size (0, D.23435);
      if (method_inst != 0B) goto <D.23436>; else goto <D.23437>;
      <D.23436>:
      size.61 = (unsigned int) size;
      D.23439 = size.61 + 4294967294;
      size = (int) D.23439;
      <D.23437>:
      i = 0;
      <D.22481>:
      {
        int offset;

        D.23434 = method_inst != 0B;
        D.23440 = i == 0;
        D.23441 = D.23434 & D.23440;
        if (D.23441 != 0) goto <D.23442>; else goto <D.23443>;
        <D.23442>:
        offset = 2;
        goto <D.23444>;
        <D.23443>:
        offset = 0;
        <D.23444>:
        D.23445 = first_slot + size;
        D.23446 = D.23445 + -1;
        D.23447 = (unsigned int) D.23446;
        if (D.23447 > slot) goto <D.23448>; else goto <D.23449>;
        <D.23448>:
        first_slot.62 = (unsigned int) first_slot;
        D.23451 = slot - first_slot.62;
        offset.63 = (unsigned int) offset;
        D.23453 = D.23451 + offset.63;
        D.23454 = D.23453 + 1;
        rgctx_index = (int) D.23454;
        rgctx_index.64 = (unsigned int) rgctx_index;
        D.23456 = rgctx_index.64 * 4;
        D.23457 = rgctx + D.23456;
        info = *D.23457;
        if (info != 0B) goto <D.23458>; else goto <D.23459>;
        <D.23458>:
        {
          int ret;

          D.23426 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.23426);
          if (ret != 0) goto <D.23460>; else goto <D.23461>;
          <D.23460>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.23461>:
          D.23462 = ret != 0;
          D.23463 = (long int) D.23462;
          D.23464 = __builtin_expect (D.23463, 0);
          if (D.23464 != 0) goto <D.23465>; else goto <D.23466>;
          <D.23465>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1863, "ret == 0");
          <D.23466>:
        }
        D.23467 = info;
        return D.23467;
        <D.23459>:
        goto <D.22480>;
        <D.23449>:
        offset.65 = (unsigned int) offset;
        D.23469 = offset.65 * 4;
        D.23470 = rgctx + D.23469;
        D.23471 = *D.23470;
        if (D.23471 == 0B) goto <D.23472>; else goto <D.23473>;
        <D.23472>:
        offset.65 = (unsigned int) offset;
        D.23469 = offset.65 * 4;
        D.23470 = rgctx + D.23469;
        D.23434 = method_inst != 0B;
        D.23435 = (int) D.23434;
        D.23474 = i + 1;
        D.23475 = alloc_rgctx_array (domain, D.23474, D.23435);
        *D.23470 = D.23475;
        <D.23473>:
        offset.65 = (unsigned int) offset;
        D.23469 = offset.65 * 4;
        D.23470 = rgctx + D.23469;
        rgctx = *D.23470;
        D.23476 = size + -1;
        first_slot = D.23476 + first_slot;
        D.23434 = method_inst != 0B;
        D.23435 = (int) D.23434;
        D.23474 = i + 1;
        size = mono_class_rgctx_get_array_size (D.23474, D.23435);
      }
      i = i + 1;
      goto <D.22481>;
      <D.22480>:
      rgctx_index.64 = (unsigned int) rgctx_index;
      D.23456 = rgctx_index.64 * 4;
      D.23457 = rgctx + D.23456;
      D.23477 = *D.23457;
      D.23478 = D.23477 != 0B;
      D.23479 = (long int) D.23478;
      D.23480 = __builtin_expect (D.23479, 0);
      if (D.23480 != 0) goto <D.23481>; else goto <D.23482>;
      <D.23481>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1875, "!rgctx [rgctx_index]");
      <D.23482>:
      {
        int ret;

        D.23426 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23426);
        if (ret != 0) goto <D.23483>; else goto <D.23484>;
        <D.23483>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23484>:
        D.23485 = ret != 0;
        D.23486 = (long int) D.23485;
        D.23487 = __builtin_expect (D.23486, 0);
        if (D.23487 != 0) goto <D.23488>; else goto <D.23489>;
        <D.23488>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1877, "ret == 0");
        <D.23489>:
      }
      if (method_inst != 0B) goto <D.23491>; else goto <D.23492>;
      <D.23491>:
      D.23493 = method_inst->type_argc;
      iftmp.66 = (int) D.23493;
      goto <D.23494>;
      <D.23492>:
      iftmp.66 = 0;
      <D.23494>:
      D.23495 = get_shared_class (class);
      oti = class_get_rgctx_template_oti (D.23495, iftmp.66, slot, 1, 1, &do_free);
      info = instantiate_info (domain, &oti, &context, class, caller);
      {
        int ret;

        D.23426 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23426);
        if (ret != 0) goto <D.23496>; else goto <D.23497>;
        <D.23496>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23497>:
        D.23498 = ret != 0;
        D.23499 = (long int) D.23498;
        D.23500 = __builtin_expect (D.23499, 0);
        if (D.23500 != 0) goto <D.23501>; else goto <D.23502>;
        <D.23501>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1890, "ret == 0");
        <D.23502>:
      }
      rgctx_index.64 = (unsigned int) rgctx_index;
      D.23456 = rgctx_index.64 * 4;
      D.23457 = rgctx + D.23456;
      D.23477 = *D.23457;
      if (D.23477 != 0B) goto <D.23503>; else goto <D.23504>;
      <D.23503>:
      rgctx_index.64 = (unsigned int) rgctx_index;
      D.23456 = rgctx_index.64 * 4;
      D.23457 = rgctx + D.23456;
      info = *D.23457;
      goto <D.23505>;
      <D.23504>:
      rgctx_index.64 = (unsigned int) rgctx_index;
      D.23456 = rgctx_index.64 * 4;
      D.23457 = rgctx + D.23456;
      *D.23457 = info;
      <D.23505>:
      {
        int ret;

        D.23426 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23426);
        if (ret != 0) goto <D.23506>; else goto <D.23507>;
        <D.23506>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23507>:
        D.23508 = ret != 0;
        D.23509 = (long int) D.23508;
        D.23510 = __builtin_expect (D.23509, 0);
        if (D.23510 != 0) goto <D.23511>; else goto <D.23512>;
        <D.23511>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1899, "ret == 0");
        <D.23512>:
      }
      do_free.67 = do_free;
      if (do_free.67 != 0) goto <D.23514>; else goto <D.23515>;
      <D.23514>:
      D.23516 = oti.data;
      D.23517 = oti.info_type;
      free_inflated_info (D.23517, D.23516);
      <D.23515>:
      D.23467 = info;
      return D.23467;
    }
  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.23520;
  void * D.23523;
  <unnamed type> D.23524;
  _Bool D.23525;
  long int D.23526;
  long int D.23527;
  int D.23532;
  struct MonoMethod * D.23533;
  struct MonoClass * D.23535;
  unsigned char D.23536;
  unsigned char D.23537;
  struct MonoType * D.23539;
  short unsigned int D.23540;
  int D.23541;
  int D.23542;
  int D.23544;
  unsigned int D.23545;
  unsigned int D.23546;
  unsigned char D.23547;
  unsigned char D.23548;
  _Bool D.23549;
  long int D.23550;
  long int D.23551;
  struct MonoGenericInst * D.23554;
  _Bool D.23555;
  long int D.23556;
  long int D.23557;
  struct MonoClass * D.23560;
  struct MonoException * D.23563;
  unsigned char D.23564;
  unsigned char D.23565;
  _Bool D.23566;
  long int D.23567;
  long int D.23568;
  struct MonoGenericInst * D.23571;
  _Bool D.23572;
  long int D.23573;
  long int D.23574;
  _Bool D.23577;
  long int D.23578;
  long int D.23579;
  void * D.23582;
  struct MonoDomain * D.23583;
  _Bool D.23584;
  long int D.23585;
  long int D.23586;
  _Bool D.23589;
  long int D.23590;
  long int D.23591;
  struct MonoGenericSharingContext * D.23594;
  _Bool D.23595;
  unsigned char D.23596;
  unsigned char D.23597;
  _Bool D.23598;
  long int D.23599;
  long int D.23600;
  struct MonoClass * D.23610;
  struct MonoClass * D.23611;
  struct MonoClass * D.23612;
  int D.22275;
  int iftmp.68;
  int D.22274;
  const char[7] * D.23617;
  unsigned char D.23618;
  int D.23619;
  unsigned char D.23620;
  int D.23621;
  _Bool D.23622;
  _Bool D.23623;
  _Bool D.23624;
  const unsigned char * D.23627;
  unsigned char D.23628;
  int D.23629;
  const unsigned char * D.23630;
  unsigned char D.23631;
  int D.23632;
  _Bool D.23633;
  _Bool D.23634;
  const unsigned char * D.23637;
  unsigned char D.23638;
  int D.23639;
  const unsigned char * D.23640;
  unsigned char D.23641;
  int D.23642;
  _Bool D.23643;
  _Bool D.23644;
  const unsigned char * D.23647;
  unsigned char D.23648;
  int D.23649;
  const unsigned char * D.23650;
  unsigned char D.23651;
  int D.23652;
  const char * D.23654;
  unsigned int D.23656;
  unsigned int D.23657;
  int imt_slot.69;
  int D.23661;
  int D.23663;
  int D.23664;
  unsigned int D.23665;
  unsigned int D.23666;
  void * D.23670;
  struct MonoDomain * D.23671;
  _Bool D.23672;
  long int D.23673;
  long int D.23674;
  _Bool D.23677;
  long int D.23678;
  long int D.23679;
  void * D.23682;
  struct MonoDomain * D.23683;
  _Bool D.23686;
  long int D.23687;
  long int D.23688;
  _Bool D.23691;
  _Bool D.23692;
  _Bool D.23693;
  struct MonoGenericSharingContext * D.23698;
  struct MonoMethodSignature * D.23702;
  struct MonoMethod * D.23706;
  struct MonoGenericSharingContext * D.23707;
  void * D.23708;
  struct GPtrArray * D.23709;
  unsigned int D.23710;
  unsigned int D.23711;
  unsigned int D.23712;
  void * * D.23713;
  unsigned int i.70;
  unsigned int D.23715;
  void * * D.23716;
  <unnamed type> D.23717;
  int align.71;
  unsigned int align.72;
  int D.23722;
  int D.23727;
  int D.23728;
  void * offset.73;
  void * D.23730;
  unsigned int i.74;
  void * data;
  gboolean temporary;

  D.23520 = oti->data;
  if (D.23520 == 0B) goto <D.23521>; else goto <D.23522>;
  <D.23521>:
  D.23523 = 0B;
  return D.23523;
  <D.23522>:
  D.23524 = oti->info_type;
  switch (D.23524) <default: <D.22220>, case 0: <D.22215>, case 1: <D.22216>, case 2: <D.22217>, case 12: <D.22218>>
  <D.22215>:
  <D.22216>:
  <D.22217>:
  <D.22218>:
  temporary = 1;
  goto <D.22219>;
  <D.22220>:
  temporary = 0;
  <D.22219>:
  data = inflate_info (oti, context, class, temporary);
  D.23524 = oti->info_type;
  switch (D.23524) <default: <D.22296>, case 0: <D.22221>, case 1: <D.22222>, case 2: <D.22223>, case 3: <D.22233>, case 4: <D.22234>, case 5: <D.22235>, case 6: <D.22236>, case 7: <D.22240>, case 8: <D.22243>, case 9: <D.22246>, case 10: <D.22238>, case 11: <D.22239>, case 12: <D.22224>, case 13: <D.22225>, case 14: <D.22226>, case 15: <D.22241>, case 16: <D.22254>, case 17: <D.22255>, case 18: <D.22248>, case 19: <D.22227>, case 20: <D.22281>, case 22: <D.22228>, case 23: <D.22229>, case 24: <D.22230>, case 25: <D.22231>>
  <D.22221>:
  <D.22222>:
  <D.22223>:
  <D.22224>:
  <D.22225>:
  <D.22226>:
  <D.22227>:
  <D.22228>:
  <D.22229>:
  <D.22230>:
  <D.22231>:
  {
    struct MonoClass * arg_class;

    arg_class = mono_class_from_mono_type (data);
    D.23524 = oti->info_type;
    free_inflated_info (D.23524, data);
    D.23525 = arg_class == 0B;
    D.23526 = (long int) D.23525;
    D.23527 = __builtin_expect (D.23526, 0);
    if (D.23527 != 0) goto <D.23528>; else goto <D.23529>;
    <D.23528>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1239, "arg_class");
    <D.23529>:
    D.23524 = oti->info_type;
    if (D.23524 == 1) goto <D.23530>; else goto <D.23531>;
    <D.23530>:
    mono_class_compute_gc_descriptor (arg_class);
    <D.23531>:
    D.23524 = oti->info_type;
    D.23523 = class_type_info (domain, arg_class, D.23524);
    return D.23523;
  }
  <D.22233>:
  D.23523 = data;
  return D.23523;
  <D.22234>:
  D.23523 = mono_type_get_object (domain, data);
  return D.23523;
  <D.22235>:
  D.23523 = data;
  return D.23523;
  <D.22236>:
  {
    void * addr;

    addr = mono_compile_method (data);
    D.23532 = mono_method_needs_static_rgctx_invoke (data, 0);
    D.23523 = mini_add_method_trampoline (0B, data, addr, D.23532, 0);
    return D.23523;
  }
  <D.22238>:
  D.23533 = mono_marshal_get_remoting_invoke_with_check (data);
  D.23523 = mono_compile_method (D.23533);
  return D.23523;
  <D.22239>:
  D.23523 = mono_domain_alloc0 (domain, 4);
  return D.23523;
  <D.22240>:
  D.23523 = data;
  return D.23523;
  <D.22241>:
  {
    struct MonoClassField * field;

    field = data;
    D.23535 = field->parent;
    D.23536 = BIT_FIELD_REF <*D.23535, 8, 160>;
    D.23537 = D.23536 & 8;
    if (D.23537 != 0) goto <D.23538>; else goto <D.23534>;
    <D.23538>:
    D.23539 = field->type;
    D.23540 = D.23539->attrs;
    D.23541 = (int) D.23540;
    D.23542 = D.23541 & 16;
    if (D.23542 == 0) goto <D.23543>; else goto <D.23534>;
    <D.23543>:
    D.23544 = field->offset;
    D.23545 = (unsigned int) D.23544;
    D.23546 = D.23545 + 4294967288;
    D.23523 = (void *) D.23546;
    return D.23523;
    <D.23534>:
    D.23544 = field->offset;
    D.23523 = (void *) D.23544;
    return D.23523;
  }
  <D.22243>:
  {
    struct MonoMethodInflated * method;
    struct MonoVTable * vtable;

    method = data;
    D.23547 = BIT_FIELD_REF <*method, 8, 168>;
    D.23548 = D.23547 & 16;
    D.23549 = D.23548 == 0;
    D.23550 = (long int) D.23549;
    D.23551 = __builtin_expect (D.23550, 0);
    if (D.23551 != 0) goto <D.23552>; else goto <D.23553>;
    <D.23552>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1281, "method->method.method.is_inflated");
    <D.23553>:
    D.23554 = method->context.method_inst;
    D.23555 = D.23554 == 0B;
    D.23556 = (long int) D.23555;
    D.23557 = __builtin_expect (D.23556, 0);
    if (D.23557 != 0) goto <D.23558>; else goto <D.23559>;
    <D.23558>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1282, "method->context.method_inst");
    <D.23559>:
    D.23560 = method->method.method.klass;
    vtable = mono_class_vtable (domain, D.23560);
    if (vtable == 0B) goto <D.23561>; else goto <D.23562>;
    <D.23561>:
    D.23560 = method->method.method.klass;
    D.23563 = mono_class_get_exception_for_failure (D.23560);
    mono_raise_exception (D.23563);
    <D.23562>:
    D.23554 = method->context.method_inst;
    D.23523 = mono_method_lookup_rgctx (vtable, D.23554);
    return D.23523;
  }
  <D.22246>:
  {
    struct MonoMethodInflated * method;

    method = data;
    D.23564 = BIT_FIELD_REF <*method, 8, 168>;
    D.23565 = D.23564 & 16;
    D.23566 = D.23565 == 0;
    D.23567 = (long int) D.23566;
    D.23568 = __builtin_expect (D.23567, 0);
    if (D.23568 != 0) goto <D.23569>; else goto <D.23570>;
    <D.23569>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1293, "method->method.method.is_inflated");
    <D.23570>:
    D.23571 = method->context.method_inst;
    D.23572 = D.23571 == 0B;
    D.23573 = (long int) D.23572;
    D.23574 = __builtin_expect (D.23573, 0);
    if (D.23574 != 0) goto <D.23575>; else goto <D.23576>;
    <D.23575>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1294, "method->context.method_inst");
    <D.23576>:
    D.23523 = method->context.method_inst;
    return D.23523;
  }
  <D.22248>:
  {
    struct MonoMethodSignature * gsig;
    struct MonoMethodSignature * sig;
    void * addr;
    struct MonoJitInfo * caller_ji;
    struct MonoGenericJitInfo * gji;

    gsig = oti->data;
    sig = data;
    D.23577 = caller == 0B;
    D.23578 = (long int) D.23577;
    D.23579 = __builtin_expect (D.23578, 0);
    if (D.23579 != 0) goto <D.23580>; else goto <D.23581>;
    <D.23580>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1310, "caller");
    <D.23581>:
    D.23582 = mono_get_addr_from_ftnptr (caller);
    D.23583 = mono_domain_get ();
    caller_ji = mini_jit_info_table_find (D.23583, D.23582, 0B);
    D.23584 = caller_ji == 0B;
    D.23585 = (long int) D.23584;
    D.23586 = __builtin_expect (D.23585, 0);
    if (D.23586 != 0) goto <D.23587>; else goto <D.23588>;
    <D.23587>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1312, "caller_ji");
    <D.23588>:
    gji = mono_jit_info_get_generic_jit_info (caller_ji);
    D.23589 = gji == 0B;
    D.23590 = (long int) D.23589;
    D.23591 = __builtin_expect (D.23590, 0);
    if (D.23591 != 0) goto <D.23592>; else goto <D.23593>;
    <D.23592>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1314, "gji");
    <D.23593>:
    D.23594 = gji->generic_sharing_context;
    addr = mini_get_gsharedvt_wrapper (0, 0B, sig, gsig, D.23594, -1, 1);
    D.23523 = addr;
    return D.23523;
  }
  <D.22254>:
  <D.22255>:
  {
    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.23524 = oti->info_type;
    D.23595 = D.23524 == 17;
    virtual = (gboolean) D.23595;
    callee_gji = 0B;
    call_sig = call_info->sig;
    method = call_info->method;
    D.23596 = BIT_FIELD_REF <*method, 8, 168>;
    D.23597 = D.23596 & 16;
    D.23598 = D.23597 == 0;
    D.23599 = (long int) D.23598;
    D.23600 = __builtin_expect (D.23599, 0);
    if (D.23600 != 0) goto <D.23601>; else goto <D.23602>;
    <D.23601>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1337, "method->is_inflated");
    <D.23602>:
    if (virtual == 0) goto <D.23603>; else goto <D.23604>;
    <D.23603>:
    addr = mono_compile_method (method);
    goto <D.23605>;
    <D.23604>:
    addr = 0B;
    <D.23605>:
    if (virtual != 0) goto <D.23606>; else goto <D.23607>;
    <D.23606>:
    D.23610 = method->klass;
    D.23611 = D.23610->parent;
    D.23612 = mono_defaults.multicastdelegate_class;
    if (D.23611 == D.23612) goto <D.23613>; else goto <D.23608>;
    <D.23613>:
    {
      size_t __s1_len;
      size_t __s2_len;

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

        __s2 = method->name;
        D.23617 = "Invoke";
        D.23618 = MEM[(const unsigned char *)D.23617];
        D.23619 = (int) D.23618;
        D.23620 = *__s2;
        D.23621 = (int) D.23620;
        __result = D.23619 - D.23621;
        {
          D.23622 = __s2_len != 0;
          D.23623 = __result == 0;
          D.23624 = D.23622 & D.23623;
          if (D.23624 != 0) goto <D.23625>; else goto <D.23626>;
          <D.23625>:
          D.23627 = &MEM[(void *)"Invoke" + 1B];
          D.23628 = *D.23627;
          D.23629 = (int) D.23628;
          D.23630 = __s2 + 1;
          D.23631 = *D.23630;
          D.23632 = (int) D.23631;
          __result = D.23629 - D.23632;
          D.23633 = __s2_len > 1;
          D.23623 = __result == 0;
          D.23634 = D.23633 & D.23623;
          if (D.23634 != 0) goto <D.23635>; else goto <D.23636>;
          <D.23635>:
          D.23637 = &MEM[(void *)"Invoke" + 2B];
          D.23638 = *D.23637;
          D.23639 = (int) D.23638;
          D.23640 = __s2 + 2;
          D.23641 = *D.23640;
          D.23642 = (int) D.23641;
          __result = D.23639 - D.23642;
          D.23643 = __s2_len > 2;
          D.23623 = __result == 0;
          D.23644 = D.23643 & D.23623;
          if (D.23644 != 0) goto <D.23645>; else goto <D.23646>;
          <D.23645>:
          D.23647 = &MEM[(void *)"Invoke" + 3B];
          D.23648 = *D.23647;
          D.23649 = (int) D.23648;
          D.23650 = __s2 + 3;
          D.23651 = *D.23650;
          D.23652 = (int) D.23651;
          __result = D.23649 - D.23652;
          <D.23646>:
          <D.23636>:
          <D.23626>:
        }
        D.22274 = __result;
      }
      iftmp.68 = -D.22274;
      goto <D.23653>;
      <D.23616>:
      D.23654 = method->name;
      iftmp.68 = __builtin_strcmp (D.23654, "Invoke");
      <D.23653>:
      D.22275 = iftmp.68;
    }
    if (D.22275 == 0) goto <D.23655>; else goto <D.23608>;
    <D.23655>:
    vcall_offset = -2;
    goto <D.23609>;
    <D.23608>:
    D.23610 = method->klass;
    D.23656 = D.23610->flags;
    D.23657 = D.23656 & 32;
    if (D.23657 != 0) goto <D.23658>; else goto <D.23659>;
    <D.23658>:
    {
      guint32 imt_slot;

      imt_slot = mono_method_get_imt_slot (method);
      imt_slot.69 = (int) imt_slot;
      D.23661 = imt_slot.69 + -19;
      vcall_offset = D.23661 * 4;
    }
    goto <D.23662>;
    <D.23659>:
    D.23663 = mono_method_get_vtable_index (method);
    D.23664 = D.23663 * 4;
    D.23665 = (unsigned int) D.23664;
    D.23666 = D.23665 + 32;
    vcall_offset = (gint32) D.23666;
    <D.23662>:
    <D.23609>:
    goto <D.23667>;
    <D.23607>:
    vcall_offset = -1;
    <D.23667>:
    D.23577 = caller == 0B;
    D.23578 = (long int) D.23577;
    D.23579 = __builtin_expect (D.23578, 0);
    if (D.23579 != 0) goto <D.23668>; else goto <D.23669>;
    <D.23668>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1364, "caller");
    <D.23669>:
    D.23670 = mono_get_addr_from_ftnptr (caller);
    D.23671 = mono_domain_get ();
    caller_ji = mini_jit_info_table_find (D.23671, D.23670, 0B);
    D.23672 = caller_ji == 0B;
    D.23673 = (long int) D.23672;
    D.23674 = __builtin_expect (D.23673, 0);
    if (D.23674 != 0) goto <D.23675>; else goto <D.23676>;
    <D.23675>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1366, "caller_ji");
    <D.23676>:
    gji = mono_jit_info_get_generic_jit_info (caller_ji);
    D.23677 = gji == 0B;
    D.23678 = (long int) D.23677;
    D.23679 = __builtin_expect (D.23678, 0);
    if (D.23679 != 0) goto <D.23680>; else goto <D.23681>;
    <D.23680>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1368, "gji");
    <D.23681>:
    D.23682 = mono_get_addr_from_ftnptr (addr);
    D.23683 = mono_domain_get ();
    callee_ji = mini_jit_info_table_find (D.23683, D.23682, 0B);
    callee_gsharedvt = ji_is_gsharedvt (callee_ji);
    if (callee_gsharedvt != 0) goto <D.23684>; else goto <D.23685>;
    <D.23684>:
    callee_gji = mono_jit_info_get_generic_jit_info (callee_ji);
    D.23686 = callee_gji == 0B;
    D.23687 = (long int) D.23686;
    D.23688 = __builtin_expect (D.23687, 0);
    if (D.23688 != 0) goto <D.23689>; else goto <D.23690>;
    <D.23689>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1375, "callee_gji");
    <D.23690>:
    <D.23685>:
    D.23691 = virtual != 0;
    D.23692 = callee_gsharedvt == 0;
    D.23693 = D.23691 | D.23692;
    if (D.23693 != 0) goto <D.23694>; else goto <D.23695>;
    <D.23694>:
    {
      struct MonoMethodSignature * sig;
      struct MonoMethodSignature * gsig;

      D.23596 = BIT_FIELD_REF <*method, 8, 168>;
      D.23597 = D.23596 & 16;
      D.23598 = D.23597 == 0;
      D.23599 = (long int) D.23598;
      D.23600 = __builtin_expect (D.23599, 0);
      if (D.23600 != 0) goto <D.23696>; else goto <D.23697>;
      <D.23696>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1392, "method->is_inflated");
      <D.23697>:
      sig = mono_method_signature (method);
      gsig = call_sig;
      D.23698 = gji->generic_sharing_context;
      addr = mini_get_gsharedvt_wrapper (0, addr, sig, gsig, D.23698, vcall_offset, 0);
    }
    goto <D.23699>;
    <D.23695>:
    if (callee_gsharedvt != 0) goto <D.23700>; else goto <D.23701>;
    <D.23700>:
    {
      struct MonoMethodSignature * sig;
      struct MonoMethodSignature * gsig;

      D.23702 = mono_method_signature (method);
      if (D.23702 == call_sig) goto <D.23703>; else goto <D.23704>;
      <D.23703>:
      goto <D.23705>;
      <D.23704>:
      sig = mono_method_signature (method);
      D.23706 = jinfo_get_method (callee_ji);
      gsig = mono_method_signature (D.23706);
      D.23707 = callee_gji->generic_sharing_context;
      D.23708 = callee_ji->code_start;
      addr = mini_get_gsharedvt_wrapper (1, D.23708, sig, gsig, D.23707, -1, 0);
      sig = mono_method_signature (method);
      gsig = call_sig;
      D.23698 = gji->generic_sharing_context;
      addr = mini_get_gsharedvt_wrapper (0, addr, sig, gsig, D.23698, -1, 0);
      <D.23705>:
    }
    <D.23701>:
    <D.23699>:
    D.23523 = addr;
    return D.23523;
  }
  <D.22281>:
  {
    struct MonoGSharedVtMethodInfo * info;
    struct MonoGSharedVtMethodRuntimeInfo * res;
    struct MonoType * t;
    int i;
    int offset;
    int align;
    int size;

    try
      {
        info = data;
        D.23709 = info->entries;
        D.23710 = D.23709->len;
        D.23711 = D.23710 + 1;
        D.23712 = D.23711 * 4;
        res = monoeg_malloc0 (D.23712);
        offset = 0;
        i = 0;
        goto <D.22294>;
        <D.22293>:
        {
          struct MonoRuntimeGenericContextInfoTemplate * template;

          D.23709 = info->entries;
          D.23713 = D.23709->pdata;
          i.70 = (unsigned int) i;
          D.23715 = i.70 * 4;
          D.23716 = D.23713 + D.23715;
          template = *D.23716;
          D.23717 = template->info_type;
          switch (D.23717) <default: <D.22292>, case 21: <D.22290>>
          <D.22290>:
          t = template->data;
          size = mono_type_size (t, &align);
          align.71 = align;
          align.72 = (unsigned int) align.71;
          if (align.72 <= 3) goto <D.23720>; else goto <D.23721>;
          <D.23720>:
          align = 4;
          <D.23721>:
          D.23722 = mono_type_is_struct (t);
          if (D.23722 != 0) goto <D.23723>; else goto <D.23724>;
          <D.23723>:
          align.71 = align;
          align.72 = (unsigned int) align.71;
          if (align.72 <= 7) goto <D.23725>; else goto <D.23726>;
          <D.23725>:
          align = 8;
          <D.23726>:
          <D.23724>:
          align.71 = align;
          D.23727 = align.71 + -1;
          offset = D.23727 + offset;
          align.71 = align;
          D.23728 = -align.71;
          offset = D.23728 & offset;
          offset.73 = (void *) offset;
          res->entries[i] = offset.73;
          offset = offset + size;
          goto <D.22291>;
          <D.22292>:
          D.23730 = instantiate_info (domain, template, context, class, 0B);
          res->entries[i] = D.23730;
          goto <D.22291>;
          <D.22291>:
        }
        i = i + 1;
        <D.22294>:
        i.74 = (unsigned int) i;
        D.23709 = info->entries;
        D.23710 = D.23709->len;
        if (i.74 < D.23710) goto <D.22293>; else goto <D.22295>;
        <D.22295>:
        res->locals_size = offset;
        D.23523 = res;
        return D.23523;
      }
    finally
      {
        align = {CLOBBER};
      }
  }
  <D.22296>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1482);
  D.23523 = 0B;
  return D.23523;
}


class_type_info (struct MonoDomain * domain, struct MonoClass * class, MonoRgctxInfoType info_type)
{
  struct MonoException * D.23736;
  void * D.23737;
  struct MonoException * D.23740;
  void * * * D.23741;
  int D.23742;
  struct MonoType * D.23743;
  int D.23744;
  int D.23747;
  int D.23748;
  int D.23751;
  int D.23754;
  unsigned int size.75;
  unsigned int D.23759;
  _Bool D.23760;
  _Bool D.23761;
  _Bool D.23762;
  unsigned int size.76;
  unsigned int align.77;
  struct MonoMethod * D.23773;
  struct MonoClass * D.23779;
  _Bool D.23780;
  long int D.23781;
  long int D.23782;
  void * * D.23785;
  struct MonoMethod * D.23788;
  _Bool D.23794;
  long int D.23795;
  long int D.23796;
  void * * D.23799;
  int D.23802;
  void * D.23808;
  struct MonoDomain * D.23809;
  _Bool D.23810;
  long int D.23811;
  long int D.23812;
  int D.23815;

  switch (info_type) <default: <D.22158>, case 0: <D.22125>, case 1: <D.22127>, case 2: <D.22128>, case 12: <D.22130>, case 13: <D.22132>, case 14: <D.22133>, case 19: <D.22134>, case 22: <D.22135>, case 23: <D.22136>, case 24: <D.22148>, case 25: <D.22149>>
  <D.22125>:
  {
    struct MonoVTable * vtable;

    vtable = mono_class_vtable (domain, class);
    if (vtable == 0B) goto <D.23734>; else goto <D.23735>;
    <D.23734>:
    D.23736 = mono_class_get_exception_for_failure (class);
    mono_raise_exception (D.23736);
    <D.23735>:
    D.23737 = mono_vtable_get_static_field_data (vtable);
    return D.23737;
  }
  <D.22127>:
  D.23737 = class;
  return D.23737;
  <D.22128>:
  {
    struct MonoVTable * vtable;

    vtable = mono_class_vtable (domain, class);
    if (vtable == 0B) goto <D.23738>; else goto <D.23739>;
    <D.23738>:
    D.23740 = mono_class_get_exception_for_failure (class);
    mono_raise_exception (D.23740);
    <D.23739>:
    D.23737 = vtable;
    return D.23737;
  }
  <D.22130>:
  {
    void * * * cache_data;

    cache_data = mono_domain_alloc0 (domain, 8);
    D.23741 = cache_data + 4;
    *D.23741 = class;
    D.23737 = cache_data;
    return D.23737;
  }
  <D.22132>:
  D.23742 = mono_class_array_element_size (class);
  D.23737 = (void *) D.23742;
  return D.23737;
  <D.22133>:
  D.23743 = &class->byval_arg;
  D.23744 = mono_type_is_reference (D.23743);
  if (D.23744 != 0) goto <D.23745>; else goto <D.23746>;
  <D.23745>:
  D.23737 = 4B;
  return D.23737;
  <D.23746>:
  D.23747 = mono_class_value_size (class, 0B);
  D.23737 = (void *) D.23747;
  return D.23737;
  <D.22134>:
  D.23743 = &class->byval_arg;
  D.23748 = mono_type_is_reference (D.23743);
  if (D.23748 != 0) goto <D.23749>; else goto <D.23750>;
  <D.23749>:
  D.23737 = 1B;
  return D.23737;
  <D.23750>:
  D.23751 = mono_class_is_nullable (class);
  if (D.23751 != 0) goto <D.23752>; else goto <D.23753>;
  <D.23752>:
  D.23737 = 2B;
  return D.23737;
  <D.23753>:
  D.23737 = 0B;
  return D.23737;
  <D.22135>:
  <D.22136>:
  {
    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.23743 = &class->byval_arg;
        D.23754 = mono_type_is_reference (D.23743);
        if (D.23754 != 0) goto <D.23755>; else goto <D.23756>;
        <D.23755>:
        size = 4;
        align = 4;
        goto <D.23757>;
        <D.23756>:
        size = mono_class_value_size (class, &align);
        <D.23757>:
        size.75 = (unsigned int) size;
        D.23759 = size.75 + 4294967295;
        D.23760 = D.23759 > 1;
        D.23761 = size != 4;
        D.23762 = D.23760 & D.23761;
        if (D.23762 != 0) goto <D.23763>; else goto <D.23764>;
        <D.23763>:
        if (size != 8) goto <D.23765>; else goto <D.23766>;
        <D.23765>:
        size = 0;
        <D.23766>:
        <D.23764>:
        size.76 = (unsigned int) size;
        align.77 = align;
        if (size.76 > align.77) goto <D.23769>; else goto <D.23770>;
        <D.23769>:
        size = 0;
        <D.23770>:
        if (info_type == 22) goto <D.23771>; else goto <D.23772>;
        <D.23771>:
        D.23773 = memcpy_method[size];
        if (D.23773 == 0B) goto <D.23774>; else goto <D.23775>;
        <D.23774>:
        {
          struct MonoMethod * m;
          char name[32];

          try
            {
              if (size == 0) goto <D.23776>; else goto <D.23777>;
              <D.23776>:
              sprintf (&name, "memcpy");
              goto <D.23778>;
              <D.23777>:
              sprintf (&name, "memcpy_aligned_%d", size);
              <D.23778>:
              D.23779 = mono_defaults.string_class;
              m = mono_class_get_method_from_name (D.23779, &name, 3);
              D.23780 = m == 0B;
              D.23781 = (long int) D.23780;
              D.23782 = __builtin_expect (D.23781, 0);
              if (D.23782 != 0) goto <D.23783>; else goto <D.23784>;
              <D.23783>:
              monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 991, "m");
              <D.23784>:
              mono_memory_barrier ();
              memcpy_method[size] = m;
            }
          finally
            {
              name = {CLOBBER};
            }
        }
        <D.23775>:
        D.23785 = domain_info->memcpy_addr[size];
        if (D.23785 == 0B) goto <D.23786>; else goto <D.23787>;
        <D.23786>:
        {
          void * addr;

          D.23773 = memcpy_method[size];
          addr = mono_compile_method (D.23773);
          mono_memory_barrier ();
          domain_info->memcpy_addr[size] = addr;
        }
        <D.23787>:
        D.23737 = domain_info->memcpy_addr[size];
        return D.23737;
        <D.23772>:
        D.23788 = bzero_method[size];
        if (D.23788 == 0B) goto <D.23789>; else goto <D.23790>;
        <D.23789>:
        {
          struct MonoMethod * m;
          char name[32];

          try
            {
              if (size == 0) goto <D.23791>; else goto <D.23792>;
              <D.23791>:
              sprintf (&name, "bzero");
              goto <D.23793>;
              <D.23792>:
              sprintf (&name, "bzero_aligned_%d", size);
              <D.23793>:
              D.23779 = mono_defaults.string_class;
              m = mono_class_get_method_from_name (D.23779, &name, 2);
              D.23794 = m == 0B;
              D.23795 = (long int) D.23794;
              D.23796 = __builtin_expect (D.23795, 0);
              if (D.23796 != 0) goto <D.23797>; else goto <D.23798>;
              <D.23797>:
              monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1011, "m");
              <D.23798>:
              mono_memory_barrier ();
              bzero_method[size] = m;
            }
          finally
            {
              name = {CLOBBER};
            }
        }
        <D.23790>:
        D.23799 = domain_info->bzero_addr[size];
        if (D.23799 == 0B) goto <D.23800>; else goto <D.23801>;
        <D.23800>:
        {
          void * addr;

          D.23788 = bzero_method[size];
          addr = mono_compile_method (D.23788);
          mono_memory_barrier ();
          domain_info->bzero_addr[size] = addr;
        }
        <D.23801>:
        D.23737 = domain_info->bzero_addr[size];
        return D.23737;
      }
    finally
      {
        align = {CLOBBER};
      }
  }
  <D.22148>:
  <D.22149>:
  {
    struct MonoMethod * method;
    void * addr;
    struct MonoJitInfo * ji;
    struct MonoGenericContext * ctx;

    D.23802 = mono_class_is_nullable (class);
    if (D.23802 == 0) goto <D.23803>; else goto <D.23804>;
    <D.23803>:
    D.23737 = 0B;
    return D.23737;
    <D.23804>:
    if (info_type == 24) goto <D.23805>; else goto <D.23806>;
    <D.23805>:
    method = mono_class_get_method_from_name (class, "Box", 1);
    goto <D.23807>;
    <D.23806>:
    method = mono_class_get_method_from_name (class, "Unbox", 1);
    <D.23807>:
    addr = mono_compile_method (method);
    D.23808 = mono_get_addr_from_ftnptr (addr);
    D.23809 = mono_domain_get ();
    ji = mini_jit_info_table_find (D.23809, D.23808, 0B);
    D.23810 = ji == 0B;
    D.23811 = (long int) D.23810;
    D.23812 = __builtin_expect (D.23811, 0);
    if (D.23812 != 0) goto <D.23813>; else goto <D.23814>;
    <D.23813>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 1042, "ji");
    <D.23814>:
    D.23815 = mini_jit_info_is_gsharedvt (ji);
    if (D.23815 != 0) goto <D.23816>; else goto <D.23817>;
    <D.23816>:
    D.23737 = mono_create_static_rgctx_trampoline (method, addr);
    return D.23737;
    <D.23817>:
    {
      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.23737 = addr;
          return D.23737;
        }
      finally
        {
          gsctx = {CLOBBER};
        }
    }
  }
  <D.22158>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 1065);
  D.23737 = 0B;
  return D.23737;
}


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

  D.23822 = __builtin_object_size (__s, 1);
  D.23821 = __builtin___sprintf_chk (__s, 1, D.23822, __fmt, __builtin_va_arg_pack ());
  return D.23821;
}


ji_is_gsharedvt (struct MonoJitInfo * ji)
{
  unsigned char D.23827;
  unsigned char D.23828;
  struct MonoGenericSharingContext * D.23830;
  gboolean * D.23831;
  struct MonoGenericSharingContext * D.23833;
  gboolean * D.23834;
  gboolean D.23835;

  if (ji != 0B) goto <D.23826>; else goto <D.23824>;
  <D.23826>:
  D.23827 = BIT_FIELD_REF <*ji, 8, 176>;
  D.23828 = D.23827 & 2;
  if (D.23828 != 0) goto <D.23829>; else goto <D.23824>;
  <D.23829>:
  D.23830 = mono_jit_info_get_generic_sharing_context (ji);
  D.23831 = D.23830->var_is_vt;
  if (D.23831 != 0B) goto <D.23825>; else goto <D.23832>;
  <D.23832>:
  D.23833 = mono_jit_info_get_generic_sharing_context (ji);
  D.23834 = D.23833->mvar_is_vt;
  if (D.23834 != 0B) goto <D.23825>; else goto <D.23824>;
  <D.23825>:
  D.23835 = 1;
  return D.23835;
  <D.23824>:
  D.23835 = 0;
  return D.23835;
}


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

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


mono_method_fill_runtime_generic_context (struct MonoMethodRuntimeGenericContext * mrgctx, guint8 * caller, guint32 slot)
{
  struct MonoGenericInst * D.23839;
  struct MonoVTable * D.23840;
  void * D.23841;
  void * info;

  D.23839 = mrgctx->method_inst;
  D.23840 = mrgctx->class_vtable;
  info = fill_runtime_generic_context (D.23840, mrgctx, caller, slot, D.23839);
  D.23841 = info;
  return D.23841;
}


mono_method_lookup_rgctx (struct MonoVTable * class_vtable, struct MonoGenericInst * method_inst)
{
  struct MonoClass * D.23843;
  struct MonoGenericContainer * D.23844;
  _Bool D.23845;
  long int D.23846;
  long int D.23847;
  unsigned char D.23850;
  unsigned char D.23851;
  _Bool D.23852;
  long int D.23853;
  long int D.23854;
  union mono_mutex_t * D.23857;
  _Bool D.23860;
  long int D.23861;
  long int D.23862;
  struct GHashTable * D.23865;
  struct GHashTable * D.23868;
  _Bool D.23873;
  long int D.23874;
  long int D.23875;
  _Bool D.23878;
  long int D.23879;
  long int D.23880;
  struct MonoMethodRuntimeGenericContext * D.23883;
  struct MonoDomain * domain;
  struct MonoMethodRuntimeGenericContext * mrgctx;
  struct MonoMethodRuntimeGenericContext key;

  try
    {
      domain = class_vtable->domain;
      D.23843 = class_vtable->klass;
      D.23844 = D.23843->generic_container;
      D.23845 = D.23844 != 0B;
      D.23846 = (long int) D.23845;
      D.23847 = __builtin_expect (D.23846, 0);
      if (D.23847 != 0) goto <D.23848>; else goto <D.23849>;
      <D.23848>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2002, "!class_vtable->klass->generic_container");
      <D.23849>:
      D.23850 = BIT_FIELD_REF <*method_inst, 8, 48>;
      D.23851 = D.23850 & 64;
      D.23852 = D.23851 != 0;
      D.23853 = (long int) D.23852;
      D.23854 = __builtin_expect (D.23853, 0);
      if (D.23854 != 0) goto <D.23855>; else goto <D.23856>;
      <D.23855>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2003, "!method_inst->is_open");
      <D.23856>:
      {
        int ret;

        D.23857 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23857);
        if (ret != 0) goto <D.23858>; else goto <D.23859>;
        <D.23858>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23859>:
        D.23860 = ret != 0;
        D.23861 = (long int) D.23860;
        D.23862 = __builtin_expect (D.23861, 0);
        if (D.23862 != 0) goto <D.23863>; else goto <D.23864>;
        <D.23863>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2005, "ret == 0");
        <D.23864>:
      }
      D.23865 = domain->method_rgctx_hash;
      if (D.23865 == 0B) goto <D.23866>; else goto <D.23867>;
      <D.23866>:
      D.23868 = monoeg_g_hash_table_new (mrgctx_hash_func, mrgctx_equal_func);
      domain->method_rgctx_hash = D.23868;
      <D.23867>:
      key.class_vtable = class_vtable;
      key.method_inst = method_inst;
      D.23865 = domain->method_rgctx_hash;
      mrgctx = monoeg_g_hash_table_lookup (D.23865, &key);
      if (mrgctx == 0B) goto <D.23869>; else goto <D.23870>;
      <D.23869>:
      mrgctx = alloc_rgctx_array (domain, 0, 1);
      mrgctx->class_vtable = class_vtable;
      mrgctx->method_inst = method_inst;
      D.23865 = domain->method_rgctx_hash;
      monoeg_g_hash_table_insert_replace (D.23865, mrgctx, mrgctx, 0);
      <D.23870>:
      {
        int ret;

        D.23857 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23857);
        if (ret != 0) goto <D.23871>; else goto <D.23872>;
        <D.23871>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23872>:
        D.23873 = ret != 0;
        D.23874 = (long int) D.23873;
        D.23875 = __builtin_expect (D.23874, 0);
        if (D.23875 != 0) goto <D.23876>; else goto <D.23877>;
        <D.23876>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2031, "ret == 0");
        <D.23877>:
      }
      D.23878 = mrgctx == 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", 2033, "mrgctx");
      <D.23882>:
      D.23883 = mrgctx;
      return D.23883;
    }
  finally
    {
      key = {CLOBBER};
    }
}


mrgctx_equal_func (const void * a, const void * b)
{
  gboolean D.23886;
  int iftmp.78;
  struct MonoVTable * D.23890;
  struct MonoVTable * D.23891;
  struct MonoGenericInst * D.23893;
  struct MonoGenericInst * D.23894;
  int D.23895;
  const struct MonoMethodRuntimeGenericContext * mrgctx1;
  const struct MonoMethodRuntimeGenericContext * mrgctx2;

  mrgctx1 = a;
  mrgctx2 = b;
  D.23890 = mrgctx1->class_vtable;
  D.23891 = mrgctx2->class_vtable;
  if (D.23890 == D.23891) goto <D.23892>; else goto <D.23888>;
  <D.23892>:
  D.23893 = mrgctx2->method_inst;
  D.23894 = mrgctx1->method_inst;
  D.23895 = mono_metadata_generic_inst_equal (D.23894, D.23893);
  if (D.23895 != 0) goto <D.23896>; else goto <D.23888>;
  <D.23896>:
  iftmp.78 = 1;
  goto <D.23889>;
  <D.23888>:
  iftmp.78 = 0;
  <D.23889>:
  D.23886 = iftmp.78;
  return D.23886;
}


mrgctx_hash_func (const void * key)
{
  guint D.23898;
  struct MonoVTable * D.23899;
  unsigned int D.23900;
  struct MonoGenericInst * D.23901;
  unsigned int D.23902;
  const struct MonoMethodRuntimeGenericContext * mrgctx;

  mrgctx = key;
  D.23899 = mrgctx->class_vtable;
  D.23900 = mono_aligned_addr_hash (D.23899);
  D.23901 = mrgctx->method_inst;
  D.23902 = mono_metadata_generic_inst_hash (D.23901);
  D.23898 = D.23900 ^ D.23902;
  return D.23898;
}


mono_generic_context_is_sharable_full (struct MonoGenericContext * context, gboolean allow_type_vars, gboolean allow_partial)
{
  int iftmp.79;
  struct MonoGenericInst * D.23907;
  struct MonoGenericInst * D.23909;
  _Bool D.23911;
  long int D.23912;
  long int D.23913;
  int D.23918;
  gboolean D.23921;
  int D.23924;

  D.23907 = context->class_inst;
  if (D.23907 == 0B) goto <D.23908>; else goto <D.23905>;
  <D.23908>:
  D.23909 = context->method_inst;
  if (D.23909 == 0B) goto <D.23910>; else goto <D.23905>;
  <D.23910>:
  iftmp.79 = 1;
  goto <D.23906>;
  <D.23905>:
  iftmp.79 = 0;
  <D.23906>:
  D.23911 = iftmp.79 != 0;
  D.23912 = (long int) D.23911;
  D.23913 = __builtin_expect (D.23912, 0);
  if (D.23913 != 0) goto <D.23914>; else goto <D.23915>;
  <D.23914>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2051, "context->class_inst || context->method_inst");
  <D.23915>:
  D.23907 = context->class_inst;
  if (D.23907 != 0B) goto <D.23916>; else goto <D.23917>;
  <D.23916>:
  D.23907 = context->class_inst;
  D.23918 = generic_inst_is_sharable (D.23907, allow_type_vars, allow_partial);
  if (D.23918 == 0) goto <D.23919>; else goto <D.23920>;
  <D.23919>:
  D.23921 = 0;
  return D.23921;
  <D.23920>:
  <D.23917>:
  D.23909 = context->method_inst;
  if (D.23909 != 0B) goto <D.23922>; else goto <D.23923>;
  <D.23922>:
  D.23909 = context->method_inst;
  D.23924 = generic_inst_is_sharable (D.23909, allow_type_vars, allow_partial);
  if (D.23924 == 0) goto <D.23925>; else goto <D.23926>;
  <D.23925>:
  D.23921 = 0;
  return D.23921;
  <D.23926>:
  <D.23923>:
  D.23921 = 1;
  return D.23921;
}


generic_inst_is_sharable (struct MonoGenericInst * inst, gboolean allow_type_vars, gboolean allow_partial)
{
  int D.23930;
  unsigned char D.23933;
  _Bool D.23934;
  _Bool D.23935;
  _Bool D.23936;
  unsigned char D.23941;
  unsigned char D.23942;
  unsigned char D.23945;
  unsigned char D.23946;
  _Bool D.23947;
  _Bool D.23948;
  _Bool D.23949;
  unsigned char D.23951;
  gboolean D.23952;
  <unnamed-unsigned:22> D.23953;
  int D.23954;
  int i;
  gboolean has_ref;

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

    type = inst->type_argv[i];
    D.23930 = mono_type_is_reference (type);
    if (D.23930 != 0) goto <D.23928>; else goto <D.23931>;
    <D.23931>:
    if (allow_type_vars != 0) goto <D.23932>; else goto <D.23929>;
    <D.23932>:
    D.23933 = type->type;
    D.23934 = D.23933 == 19;
    D.23935 = D.23933 == 30;
    D.23936 = D.23934 | D.23935;
    if (D.23936 != 0) goto <D.23928>; else goto <D.23929>;
    <D.23928>:
    has_ref = 1;
    // predicted unlikely by continue predictor.
    goto <D.22075>;
    <D.23929>:
    if (allow_partial != 0) goto <D.23939>; else goto <D.23940>;
    <D.23939>:
    D.23941 = BIT_FIELD_REF <*type, 8, 56>;
    D.23942 = D.23941 & 64;
    if (D.23942 == 0) goto <D.23943>; else goto <D.23944>;
    <D.23943>:
    D.23945 = type->type;
    D.23946 = D.23945 + 254;
    D.23947 = D.23946 <= 11;
    D.23948 = D.23945 == 24;
    D.23949 = D.23947 | D.23948;
    if (D.23949 != 0) goto <D.23937>; else goto <D.23950>;
    <D.23950>:
    D.23951 = type->type;
    if (D.23951 == 25) goto <D.23937>; else goto <D.23938>;
    <D.23937>:
    // predicted unlikely by continue predictor.
    goto <D.22075>;
    <D.23938>:
    <D.23944>:
    <D.23940>:
    D.23952 = 0;
    return D.23952;
  }
  <D.22075>:
  i = i + 1;
  <D.22077>:
  D.23953 = inst->type_argc;
  D.23954 = (int) D.23953;
  if (D.23954 > i) goto <D.22076>; else goto <D.22078>;
  <D.22078>:
  if (allow_partial != 0) goto <D.23955>; else goto <D.23956>;
  <D.23955>:
  D.23952 = has_ref;
  return D.23952;
  <D.23956>:
  D.23952 = 1;
  return D.23952;
}


mono_generic_context_is_sharable (struct MonoGenericContext * context, gboolean allow_type_vars)
{
  gboolean D.23958;
  int D.23959;

  D.23959 = partial_sharing_supported ();
  D.23958 = mono_generic_context_is_sharable_full (context, allow_type_vars, D.23959);
  return D.23958;
}


partial_sharing_supported ()
{
  gboolean D.23963;
  int partial_supported.80;
  int mono_aot_only.81;

  if (0 != 0) goto <D.23961>; else goto <D.23962>;
  <D.23961>:
  D.23963 = 0;
  return D.23963;
  <D.23962>:
  partial_supported.80 = partial_supported;
  if (partial_supported.80 != 0) goto <D.23964>; else goto <D.23967>;
  <D.23967>:
  mono_aot_only.81 = mono_aot_only;
  if (mono_aot_only.81 != 0) goto <D.23964>; else goto <D.23965>;
  <D.23964>:
  D.23963 = 1;
  return D.23963;
  <D.23965>:
  D.23963 = 0;
  return D.23963;
}


mono_method_is_generic_impl (struct MonoMethod * method)
{
  unsigned char D.23970;
  unsigned char D.23971;
  gboolean D.23974;
  unsigned char D.23975;
  unsigned char D.23976;
  struct MonoClass * D.23979;
  struct MonoGenericContainer * D.23980;

  D.23970 = BIT_FIELD_REF <*method, 8, 168>;
  D.23971 = D.23970 & 16;
  if (D.23971 != 0) goto <D.23972>; else goto <D.23973>;
  <D.23972>:
  D.23974 = 1;
  return D.23974;
  <D.23973>:
  D.23975 = BIT_FIELD_REF <*method, 8, 160>;
  D.23976 = D.23975 & 124;
  if (D.23976 != 0) goto <D.23977>; else goto <D.23978>;
  <D.23977>:
  D.23974 = 0;
  return D.23974;
  <D.23978>:
  D.23979 = method->klass;
  D.23980 = D.23979->generic_container;
  if (D.23980 != 0B) goto <D.23981>; else goto <D.23982>;
  <D.23981>:
  D.23974 = 1;
  return D.23974;
  <D.23982>:
  D.23974 = 0;
  return D.23974;
}


mono_method_is_generic_sharable_full (struct MonoMethod * method, gboolean allow_type_vars, gboolean allow_partial, gboolean allow_gsharedvt)
{
  int D.23984;
  gboolean D.23987;
  int D.23988;
  struct MonoClass * D.23991;
  int D.23992;
  int D.23997;
  int D.24000;
  unsigned char D.24003;
  unsigned char D.24004;
  int D.24007;
  struct MonoMethod * D.24010;
  _Bool D.24011;
  long int D.24012;
  long int D.24013;
  unsigned char D.24016;
  unsigned char D.24017;
  struct MonoGenericContainer * D.24020;
  int D.24021;
  struct MonoGenericClass * D.24024;
  struct MonoGenericContext * D.24027;
  int D.24028;
  int iftmp.82;
  struct MonoClass * D.24035;
  struct MonoGenericContainer * D.24037;
  _Bool D.24038;
  long int D.24039;
  long int D.24040;
  int D.24043;
  struct MonoGenericContainer * D.24046;
  int D.24051;
  int D.24054;

  D.23984 = mono_method_is_generic_impl (method);
  if (D.23984 == 0) goto <D.23985>; else goto <D.23986>;
  <D.23985>:
  D.23987 = 0;
  return D.23987;
  <D.23986>:
  D.23988 = partial_sharing_supported ();
  if (D.23988 == 0) goto <D.23989>; else goto <D.23990>;
  <D.23989>:
  allow_partial = 0;
  <D.23990>:
  D.23991 = method->klass;
  D.23992 = is_async_state_machine_class (D.23991);
  if (D.23992 != 0) goto <D.23993>; else goto <D.23994>;
  <D.23993>:
  D.23987 = 0;
  return D.23987;
  <D.23994>:
  if (allow_gsharedvt != 0) goto <D.23995>; else goto <D.23996>;
  <D.23995>:
  D.23997 = mini_is_gsharedvt_sharable_method (method);
  if (D.23997 != 0) goto <D.23998>; else goto <D.23999>;
  <D.23998>:
  D.24000 = is_async_method (method);
  if (D.24000 != 0) goto <D.24001>; else goto <D.24002>;
  <D.24001>:
  D.23987 = 0;
  return D.23987;
  <D.24002>:
  D.23987 = 1;
  return D.23987;
  <D.23999>:
  <D.23996>:
  D.24003 = BIT_FIELD_REF <*method, 8, 168>;
  D.24004 = D.24003 & 16;
  if (D.24004 != 0) goto <D.24005>; else goto <D.24006>;
  <D.24005>:
  {
    struct MonoMethodInflated * inflated;
    struct MonoGenericContext * context;

    inflated = method;
    context = &inflated->context;
    D.24007 = mono_generic_context_is_sharable_full (context, allow_type_vars, allow_partial);
    if (D.24007 == 0) goto <D.24008>; else goto <D.24009>;
    <D.24008>:
    D.23987 = 0;
    return D.23987;
    <D.24009>:
    D.24010 = inflated->declaring;
    D.24011 = D.24010 == 0B;
    D.24012 = (long int) D.24011;
    D.24013 = __builtin_expect (D.24012, 0);
    if (D.24013 != 0) goto <D.24014>; else goto <D.24015>;
    <D.24014>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2216, "inflated->declaring");
    <D.24015>:
    D.24010 = inflated->declaring;
    D.24016 = BIT_FIELD_REF <*D.24010, 8, 168>;
    D.24017 = D.24016 & 8;
    if (D.24017 != 0) goto <D.24018>; else goto <D.24019>;
    <D.24018>:
    D.24010 = inflated->declaring;
    D.24020 = mono_method_get_generic_container (D.24010);
    D.24021 = has_constraints (D.24020);
    if (D.24021 != 0) goto <D.24022>; else goto <D.24023>;
    <D.24022>:
    D.23987 = 0;
    return D.23987;
    <D.24023>:
    <D.24019>:
  }
  <D.24006>:
  D.23991 = method->klass;
  D.24024 = D.23991->generic_class;
  if (D.24024 != 0B) goto <D.24025>; else goto <D.24026>;
  <D.24025>:
  D.23991 = method->klass;
  D.24024 = D.23991->generic_class;
  D.24027 = &D.24024->context;
  D.24028 = mono_generic_context_is_sharable_full (D.24027, allow_type_vars, allow_partial);
  if (D.24028 == 0) goto <D.24029>; else goto <D.24030>;
  <D.24029>:
  D.23987 = 0;
  return D.23987;
  <D.24030>:
  D.23991 = method->klass;
  D.24024 = D.23991->generic_class;
  D.24035 = D.24024->container_class;
  if (D.24035 == 0B) goto <D.24032>; else goto <D.24036>;
  <D.24036>:
  D.23991 = method->klass;
  D.24024 = D.23991->generic_class;
  D.24035 = D.24024->container_class;
  D.24037 = D.24035->generic_container;
  if (D.24037 == 0B) goto <D.24032>; else goto <D.24033>;
  <D.24032>:
  iftmp.82 = 1;
  goto <D.24034>;
  <D.24033>:
  iftmp.82 = 0;
  <D.24034>:
  D.24038 = iftmp.82 != 0;
  D.24039 = (long int) D.24038;
  D.24040 = __builtin_expect (D.24039, 0);
  if (D.24040 != 0) goto <D.24041>; else goto <D.24042>;
  <D.24041>:
  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.24042>:
  D.23991 = method->klass;
  D.24024 = D.23991->generic_class;
  D.24035 = D.24024->container_class;
  D.24037 = D.24035->generic_container;
  D.24043 = has_constraints (D.24037);
  if (D.24043 != 0) goto <D.24044>; else goto <D.24045>;
  <D.24044>:
  D.23987 = 0;
  return D.23987;
  <D.24045>:
  <D.24026>:
  D.23991 = method->klass;
  D.24046 = D.23991->generic_container;
  if (D.24046 != 0B) goto <D.24047>; else goto <D.24048>;
  <D.24047>:
  if (allow_type_vars == 0) goto <D.24049>; else goto <D.24050>;
  <D.24049>:
  D.23987 = 0;
  return D.23987;
  <D.24050>:
  <D.24048>:
  D.24051 = is_async_method (method);
  if (D.24051 != 0) goto <D.24052>; else goto <D.24053>;
  <D.24052>:
  D.24054 = mini_method_is_open (method);
  if (D.24054 != 0) goto <D.24055>; else goto <D.24056>;
  <D.24055>:
  D.23987 = 1;
  return D.23987;
  <D.24056>:
  D.23987 = 0;
  return D.23987;
  <D.24053>:
  D.23987 = 1;
  return D.23987;
}


is_async_state_machine_class (struct MonoClass * klass)
{
  gboolean D.24058;
  int iclass_set.83;
  struct MonoImage * D.24062;
  struct MonoClass * iclass.84;
  struct MonoClass * iclass.85;
  unsigned char D.24067;
  unsigned char D.24068;
  int D.24071;
  static struct MonoClass * iclass;
  static gboolean iclass_set;

  D.24058 = 0;
  return D.24058;
  iclass_set.83 = iclass_set;
  if (iclass_set.83 == 0) goto <D.24060>; else goto <D.24061>;
  <D.24060>:
  D.24062 = mono_defaults.corlib;
  iclass.84 = mono_class_from_name (D.24062, "System.Runtime.CompilerServices", "IAsyncStateMachine");
  iclass = iclass.84;
  mono_memory_barrier ();
  iclass_set = 1;
  <D.24061>:
  iclass.85 = iclass;
  if (iclass.85 != 0B) goto <D.24065>; else goto <D.24066>;
  <D.24065>:
  D.24067 = BIT_FIELD_REF <*klass, 8, 160>;
  D.24068 = D.24067 & 8;
  if (D.24068 != 0) goto <D.24069>; else goto <D.24070>;
  <D.24069>:
  iclass.85 = iclass;
  D.24071 = mono_class_is_assignable_from (iclass.85, klass);
  if (D.24071 != 0) goto <D.24072>; else goto <D.24073>;
  <D.24072>:
  D.24058 = 1;
  return D.24058;
  <D.24073>:
  <D.24070>:
  <D.24066>:
  D.24058 = 0;
  return D.24058;
}


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

  D.24075 = 0;
  return D.24075;
}


is_async_method (struct MonoMethod * method)
{
  gboolean D.24077;
  int attr_class_set.86;
  struct MonoImage * D.24081;
  struct MonoClass * attr_class.87;
  struct MonoClass * attr_class.88;
  struct MonoType * D.24091;
  unsigned char D.24092;
  struct MonoGenericClass * D.24095;
  struct MonoClass * D.24096;
  int D.22562;
  int iftmp.89;
  int D.22561;
  const char[7] * D.24101;
  unsigned char D.24102;
  int D.24103;
  unsigned char D.24104;
  int D.24105;
  _Bool D.24106;
  _Bool D.24107;
  _Bool D.24108;
  const unsigned char * D.24111;
  unsigned char D.24112;
  int D.24113;
  const unsigned char * D.24114;
  unsigned char D.24115;
  int D.24116;
  _Bool D.24117;
  _Bool D.24118;
  const unsigned char * D.24121;
  unsigned char D.24122;
  int D.24123;
  const unsigned char * D.24124;
  unsigned char D.24125;
  int D.24126;
  _Bool D.24127;
  _Bool D.24128;
  const unsigned char * D.24131;
  unsigned char D.24132;
  int D.24133;
  const unsigned char * D.24134;
  unsigned char D.24135;
  int D.24136;
  const char * D.24138;
  int D.24141;
  struct MonoCustomAttrInfo * cattr;
  struct MonoMethodSignature * sig;
  gboolean res;
  static struct MonoClass * attr_class;
  static gboolean attr_class_set;

  res = 0;
  D.24077 = 0;
  return D.24077;
  attr_class_set.86 = attr_class_set;
  if (attr_class_set.86 == 0) goto <D.24079>; else goto <D.24080>;
  <D.24079>:
  D.24081 = mono_defaults.corlib;
  attr_class.87 = mono_class_from_name (D.24081, "System.Runtime.CompilerServices", "AsyncStateMachineAttribute");
  attr_class = attr_class.87;
  mono_memory_barrier ();
  attr_class_set = 1;
  <D.24080>:
  sig = mono_method_signature (method);
  attr_class.88 = attr_class;
  if (attr_class.88 != 0B) goto <D.24087>; else goto <D.24088>;
  <D.24087>:
  if (sig != 0B) goto <D.24089>; else goto <D.24090>;
  <D.24089>:
  D.24091 = sig->ret;
  D.24092 = D.24091->type;
  if (D.24092 == 1) goto <D.24083>; else goto <D.24093>;
  <D.24093>:
  D.24091 = sig->ret;
  D.24092 = D.24091->type;
  if (D.24092 == 18) goto <D.24094>; else goto <D.24084>;
  <D.24094>:
  D.24091 = sig->ret;
  D.24095 = D.24091->data.generic_class;
  D.24096 = D.24095->container_class;
  if (1 != 0) goto <D.24083>; else goto <D.24084>;
  <D.24084>:
  D.24091 = sig->ret;
  D.24092 = D.24091->type;
  if (D.24092 == 21) goto <D.24097>; else goto <D.24085>;
  <D.24097>:
  {
    size_t __s1_len;
    size_t __s2_len;

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

      D.24091 = sig->ret;
      D.24095 = D.24091->data.generic_class;
      D.24096 = D.24095->container_class;
      __s2 = D.24096->name;
      D.24101 = "Task`1";
      D.24102 = MEM[(const unsigned char *)D.24101];
      D.24103 = (int) D.24102;
      D.24104 = *__s2;
      D.24105 = (int) D.24104;
      __result = D.24103 - D.24105;
      {
        D.24106 = __s2_len != 0;
        D.24107 = __result == 0;
        D.24108 = D.24106 & D.24107;
        if (D.24108 != 0) goto <D.24109>; else goto <D.24110>;
        <D.24109>:
        D.24111 = &MEM[(void *)"Task`1" + 1B];
        D.24112 = *D.24111;
        D.24113 = (int) D.24112;
        D.24114 = __s2 + 1;
        D.24115 = *D.24114;
        D.24116 = (int) D.24115;
        __result = D.24113 - D.24116;
        D.24117 = __s2_len > 1;
        D.24107 = __result == 0;
        D.24118 = D.24117 & D.24107;
        if (D.24118 != 0) goto <D.24119>; else goto <D.24120>;
        <D.24119>:
        D.24121 = &MEM[(void *)"Task`1" + 2B];
        D.24122 = *D.24121;
        D.24123 = (int) D.24122;
        D.24124 = __s2 + 2;
        D.24125 = *D.24124;
        D.24126 = (int) D.24125;
        __result = D.24123 - D.24126;
        D.24127 = __s2_len > 2;
        D.24107 = __result == 0;
        D.24128 = D.24127 & D.24107;
        if (D.24128 != 0) goto <D.24129>; else goto <D.24130>;
        <D.24129>:
        D.24131 = &MEM[(void *)"Task`1" + 3B];
        D.24132 = *D.24131;
        D.24133 = (int) D.24132;
        D.24134 = __s2 + 3;
        D.24135 = *D.24134;
        D.24136 = (int) D.24135;
        __result = D.24133 - D.24136;
        <D.24130>:
        <D.24120>:
        <D.24110>:
      }
      D.22561 = __result;
    }
    iftmp.89 = -D.22561;
    goto <D.24137>;
    <D.24100>:
    D.24091 = sig->ret;
    D.24095 = D.24091->data.generic_class;
    D.24096 = D.24095->container_class;
    D.24138 = D.24096->name;
    iftmp.89 = __builtin_strcmp (D.24138, "Task`1");
    <D.24137>:
    D.22562 = iftmp.89;
  }
  if (D.22562 == 0) goto <D.24083>; else goto <D.24085>;
  <D.24083>:
  cattr = mono_custom_attrs_from_method (method);
  if (cattr != 0B) goto <D.24139>; else goto <D.24140>;
  <D.24139>:
  attr_class.88 = attr_class;
  D.24141 = mono_custom_attrs_has_attr (cattr, attr_class.88);
  if (D.24141 != 0) goto <D.24142>; else goto <D.24143>;
  <D.24142>:
  res = 1;
  <D.24143>:
  mono_custom_attrs_free (cattr);
  <D.24140>:
  <D.24085>:
  <D.24090>:
  <D.24088>:
  D.24077 = res;
  return D.24077;
}


mini_method_is_open (struct MonoMethod * method)
{
  unsigned char D.24145;
  unsigned char D.24146;
  struct MonoGenericInst * D.24149;
  unsigned char D.24152;
  unsigned char D.24153;
  gboolean D.24156;
  struct MonoGenericInst * D.24157;
  unsigned char D.24160;
  unsigned char D.24161;

  D.24145 = BIT_FIELD_REF <*method, 8, 168>;
  D.24146 = D.24145 & 16;
  if (D.24146 != 0) goto <D.24147>; else goto <D.24148>;
  <D.24147>:
  {
    struct MonoGenericContext * ctx;

    ctx = mono_method_get_context (method);
    D.24149 = ctx->class_inst;
    if (D.24149 != 0B) goto <D.24150>; else goto <D.24151>;
    <D.24150>:
    D.24149 = ctx->class_inst;
    D.24152 = BIT_FIELD_REF <*D.24149, 8, 48>;
    D.24153 = D.24152 & 64;
    if (D.24153 != 0) goto <D.24154>; else goto <D.24155>;
    <D.24154>:
    D.24156 = 1;
    return D.24156;
    <D.24155>:
    <D.24151>:
    D.24157 = ctx->method_inst;
    if (D.24157 != 0B) goto <D.24158>; else goto <D.24159>;
    <D.24158>:
    D.24157 = ctx->method_inst;
    D.24160 = BIT_FIELD_REF <*D.24157, 8, 48>;
    D.24161 = D.24160 & 64;
    if (D.24161 != 0) goto <D.24162>; else goto <D.24163>;
    <D.24162>:
    D.24156 = 1;
    return D.24156;
    <D.24163>:
    <D.24159>:
  }
  <D.24148>:
  D.24156 = 0;
  return D.24156;
}


mono_method_is_generic_sharable (struct MonoMethod * method, gboolean allow_type_vars)
{
  gboolean D.24165;
  int D.24166;

  D.24166 = partial_sharing_supported ();
  D.24165 = mono_method_is_generic_sharable_full (method, allow_type_vars, D.24166, 1);
  return D.24165;
}


mono_method_needs_static_rgctx_invoke (struct MonoMethod * method, gboolean allow_type_vars)
{
  struct MonoClass * D.24168;
  int D.24169;
  gboolean D.24172;
  int D.24173;
  unsigned char D.24176;
  unsigned char D.24177;
  struct MonoGenericContext * D.24180;
  struct MonoGenericInst * D.24181;
  int iftmp.90;
  short unsigned int D.24189;
  int D.24190;
  int D.24191;
  unsigned char D.24193;
  unsigned char D.24194;
  struct MonoGenericClass * D.24195;
  struct MonoGenericContainer * D.24197;

  D.24168 = method->klass;
  D.24169 = mono_class_generic_sharing_enabled (D.24168);
  if (D.24169 == 0) goto <D.24170>; else goto <D.24171>;
  <D.24170>:
  D.24172 = 0;
  return D.24172;
  <D.24171>:
  D.24173 = mono_method_is_generic_sharable (method, allow_type_vars);
  if (D.24173 == 0) goto <D.24174>; else goto <D.24175>;
  <D.24174>:
  D.24172 = 0;
  return D.24172;
  <D.24175>:
  D.24176 = BIT_FIELD_REF <*method, 8, 168>;
  D.24177 = D.24176 & 16;
  if (D.24177 != 0) goto <D.24178>; else goto <D.24179>;
  <D.24178>:
  D.24180 = mono_method_get_context (method);
  D.24181 = D.24180->method_inst;
  if (D.24181 != 0B) goto <D.24182>; else goto <D.24183>;
  <D.24182>:
  D.24172 = 1;
  return D.24172;
  <D.24183>:
  <D.24179>:
  D.24189 = method->flags;
  D.24190 = (int) D.24189;
  D.24191 = D.24190 & 16;
  if (D.24191 != 0) goto <D.24185>; else goto <D.24192>;
  <D.24192>:
  D.24168 = method->klass;
  D.24193 = BIT_FIELD_REF <*D.24168, 8, 160>;
  D.24194 = D.24193 & 8;
  if (D.24194 != 0) goto <D.24185>; else goto <D.24186>;
  <D.24185>:
  D.24168 = method->klass;
  D.24195 = D.24168->generic_class;
  if (D.24195 != 0B) goto <D.24187>; else goto <D.24196>;
  <D.24196>:
  D.24168 = method->klass;
  D.24197 = D.24168->generic_container;
  if (D.24197 != 0B) goto <D.24187>; else goto <D.24186>;
  <D.24187>:
  iftmp.90 = 1;
  goto <D.24188>;
  <D.24186>:
  iftmp.90 = 0;
  <D.24188>:
  D.24172 = iftmp.90;
  return D.24172;
}


mono_method_construct_object_context (struct MonoMethod * method)
{
  struct MonoClass * D.24200;
  struct MonoGenericClass * D.24201;
  _Bool D.24202;
  long int D.24203;
  long int D.24204;
  struct MonoGenericContainer * D.24207;
  <unnamed-signed:31> D.24210;
  struct MonoGenericInst * D.24211;
  struct MonoGenericContext * D.24213;
  struct MonoGenericInst * D.24214;
  struct MonoGenericContext * D.24217;
  struct MonoGenericInst * D.24218;
  <unnamed-unsigned:22> D.24219;
  struct MonoGenericInst * D.24220;
  int iftmp.91;
  struct MonoGenericInst * D.24225;
  struct MonoGenericInst * D.24227;
  _Bool D.24229;
  long int D.24230;
  long int D.24231;
  struct MonoGenericContext object_context;

  try
    {
      D.24200 = method->klass;
      D.24201 = D.24200->generic_class;
      D.24202 = D.24201 != 0B;
      D.24203 = (long int) D.24202;
      D.24204 = __builtin_expect (D.24203, 0);
      if (D.24204 != 0) goto <D.24205>; else goto <D.24206>;
      <D.24205>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2298, "!method->klass->generic_class");
      <D.24206>:
      D.24200 = method->klass;
      D.24207 = D.24200->generic_container;
      if (D.24207 != 0B) goto <D.24208>; else goto <D.24209>;
      <D.24208>:
      {
        int type_argc;

        D.24200 = method->klass;
        D.24207 = D.24200->generic_container;
        D.24210 = D.24207->type_argc;
        type_argc = (int) D.24210;
        D.24211 = get_object_generic_inst (type_argc);
        object_context.class_inst = D.24211;
      }
      goto <D.24212>;
      <D.24209>:
      object_context.class_inst = 0B;
      <D.24212>:
      D.24213 = mono_method_get_context_general (method, 1);
      D.24214 = D.24213->method_inst;
      if (D.24214 != 0B) goto <D.24215>; else goto <D.24216>;
      <D.24215>:
      {
        int type_argc;

        D.24217 = mono_method_get_context_general (method, 1);
        D.24218 = D.24217->method_inst;
        D.24219 = D.24218->type_argc;
        type_argc = (int) D.24219;
        D.24220 = get_object_generic_inst (type_argc);
        object_context.method_inst = D.24220;
      }
      goto <D.24221>;
      <D.24216>:
      object_context.method_inst = 0B;
      <D.24221>:
      D.24225 = object_context.class_inst;
      if (D.24225 == 0B) goto <D.24226>; else goto <D.24223>;
      <D.24226>:
      D.24227 = object_context.method_inst;
      if (D.24227 == 0B) goto <D.24228>; else goto <D.24223>;
      <D.24228>:
      iftmp.91 = 1;
      goto <D.24224>;
      <D.24223>:
      iftmp.91 = 0;
      <D.24224>:
      D.24229 = iftmp.91 != 0;
      D.24230 = (long int) D.24229;
      D.24231 = __builtin_expect (D.24230, 0);
      if (D.24231 != 0) goto <D.24232>; else goto <D.24233>;
      <D.24232>:
      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.24233>:
      <retval> = object_context;
      return <retval>;
    }
  finally
    {
      object_context = {CLOBBER};
    }
}


get_object_generic_inst (int type_argc)
{
  unsigned int type_argc.92;
  unsigned int D.24237;
  unsigned int i.93;
  unsigned int D.24239;
  struct MonoType * * D.24240;
  struct MonoClass * D.24241;
  struct MonoType * D.24242;
  struct MonoGenericInst * D.24243;
  struct MonoType * * type_argv;
  int i;

  type_argc.92 = (unsigned int) type_argc;
  D.24237 = type_argc.92 * 4;
  type_argv = __builtin_alloca (D.24237);
  i = 0;
  goto <D.22585>;
  <D.22584>:
  i.93 = (unsigned int) i;
  D.24239 = i.93 * 4;
  D.24240 = type_argv + D.24239;
  D.24241 = mono_defaults.object_class;
  D.24242 = &D.24241->byval_arg;
  *D.24240 = D.24242;
  i = i + 1;
  <D.22585>:
  if (i < type_argc) goto <D.22584>; else goto <D.22586>;
  <D.22586>:
  D.24243 = mono_metadata_get_generic_inst (type_argc, type_argv);
  return D.24243;
}


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.94;
  int gshared_supported.95;
  int D.22618;
  int iftmp.96;
  int D.22617;
  const char[7] * D.24257;
  unsigned char D.24258;
  int D.24259;
  unsigned char D.24260;
  int D.24261;
  _Bool D.24262;
  _Bool D.24263;
  _Bool D.24264;
  const unsigned char * D.24267;
  unsigned char D.24268;
  int D.24269;
  const unsigned char * D.24270;
  unsigned char D.24271;
  int D.24272;
  _Bool D.24273;
  _Bool D.24274;
  const unsigned char * D.24277;
  unsigned char D.24278;
  int D.24279;
  const unsigned char * D.24280;
  unsigned char D.24281;
  int D.24282;
  _Bool D.24283;
  _Bool D.24284;
  const unsigned char * D.24287;
  unsigned char D.24288;
  int D.24289;
  const unsigned char * D.24290;
  unsigned char D.24291;
  int D.24292;
  int D.22627;
  int iftmp.97;
  int D.22626;
  const char[12] * D.24300;
  unsigned char D.24301;
  int D.24302;
  unsigned char D.24303;
  int D.24304;
  _Bool D.24305;
  _Bool D.24306;
  _Bool D.24307;
  const unsigned char * D.24310;
  unsigned char D.24311;
  int D.24312;
  const unsigned char * D.24313;
  unsigned char D.24314;
  int D.24315;
  _Bool D.24316;
  _Bool D.24317;
  const unsigned char * D.24320;
  unsigned char D.24321;
  int D.24322;
  const unsigned char * D.24323;
  unsigned char D.24324;
  int D.24325;
  _Bool D.24326;
  _Bool D.24327;
  const unsigned char * D.24330;
  unsigned char D.24331;
  int D.24332;
  const unsigned char * D.24333;
  unsigned char D.24334;
  int D.24335;
  int D.22636;
  int iftmp.98;
  int D.22635;
  const char[4] * D.24343;
  unsigned char D.24344;
  int D.24345;
  unsigned char D.24346;
  int D.24347;
  _Bool D.24348;
  _Bool D.24349;
  _Bool D.24350;
  const unsigned char * D.24353;
  unsigned char D.24354;
  int D.24355;
  const unsigned char * D.24356;
  unsigned char D.24357;
  int D.24358;
  _Bool D.24359;
  _Bool D.24360;
  const unsigned char * D.24363;
  unsigned char D.24364;
  int D.24365;
  const unsigned char * D.24366;
  unsigned char D.24367;
  int D.24368;
  _Bool D.24369;
  _Bool D.24370;
  const unsigned char * D.24373;
  unsigned char D.24374;
  int D.24375;
  const unsigned char * D.24376;
  unsigned char D.24377;
  int D.24378;
  int D.22645;
  int iftmp.99;
  int D.22644;
  const char[5] * D.24386;
  unsigned char D.24387;
  int D.24388;
  unsigned char D.24389;
  int D.24390;
  _Bool D.24391;
  _Bool D.24392;
  _Bool D.24393;
  const unsigned char * D.24396;
  unsigned char D.24397;
  int D.24398;
  const unsigned char * D.24399;
  unsigned char D.24400;
  int D.24401;
  _Bool D.24402;
  _Bool D.24403;
  const unsigned char * D.24406;
  unsigned char D.24407;
  int D.24408;
  const unsigned char * D.24409;
  unsigned char D.24410;
  int D.24411;
  _Bool D.24412;
  _Bool D.24413;
  const unsigned char * D.24416;
  unsigned char D.24417;
  int D.24418;
  const unsigned char * D.24419;
  unsigned char D.24420;
  int D.24421;
  int generic_sharing.100;
  gboolean D.24429;
  struct MonoImage * D.24430;
  struct MonoImage * D.24431;
  _Bool D.24432;
  struct MonoClass * D.24435;
  const char * D.24436;
  static int generic_sharing = 0;
  static gboolean inited = 0;

  inited.94 = inited;
  if (inited.94 == 0) goto <D.24246>; else goto <D.24247>;
  <D.24246>:
  {
    const char * option;

    gshared_supported.95 = gshared_supported;
    if (gshared_supported.95 != 0) goto <D.24249>; else goto <D.24250>;
    <D.24249>:
    generic_sharing = 3;
    goto <D.24251>;
    <D.24250>:
    generic_sharing = 0;
    <D.24251>:
    option = monoeg_g_getenv ("MONO_GENERIC_SHARING");
    if (option != 0B) goto <D.24252>; else goto <D.24253>;
    <D.24252>:
    {
      size_t __s1_len;
      size_t __s2_len;

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

        __s2 = option;
        D.24257 = "corlib";
        D.24258 = MEM[(const unsigned char *)D.24257];
        D.24259 = (int) D.24258;
        D.24260 = *__s2;
        D.24261 = (int) D.24260;
        __result = D.24259 - D.24261;
        {
          D.24262 = __s2_len != 0;
          D.24263 = __result == 0;
          D.24264 = D.24262 & D.24263;
          if (D.24264 != 0) goto <D.24265>; else goto <D.24266>;
          <D.24265>:
          D.24267 = &MEM[(void *)"corlib" + 1B];
          D.24268 = *D.24267;
          D.24269 = (int) D.24268;
          D.24270 = __s2 + 1;
          D.24271 = *D.24270;
          D.24272 = (int) D.24271;
          __result = D.24269 - D.24272;
          D.24273 = __s2_len > 1;
          D.24263 = __result == 0;
          D.24274 = D.24273 & D.24263;
          if (D.24274 != 0) goto <D.24275>; else goto <D.24276>;
          <D.24275>:
          D.24277 = &MEM[(void *)"corlib" + 2B];
          D.24278 = *D.24277;
          D.24279 = (int) D.24278;
          D.24280 = __s2 + 2;
          D.24281 = *D.24280;
          D.24282 = (int) D.24281;
          __result = D.24279 - D.24282;
          D.24283 = __s2_len > 2;
          D.24263 = __result == 0;
          D.24284 = D.24283 & D.24263;
          if (D.24284 != 0) goto <D.24285>; else goto <D.24286>;
          <D.24285>:
          D.24287 = &MEM[(void *)"corlib" + 3B];
          D.24288 = *D.24287;
          D.24289 = (int) D.24288;
          D.24290 = __s2 + 3;
          D.24291 = *D.24290;
          D.24292 = (int) D.24291;
          __result = D.24289 - D.24292;
          <D.24286>:
          <D.24276>:
          <D.24266>:
        }
        D.22617 = __result;
      }
      iftmp.96 = -D.22617;
      goto <D.24293>;
      <D.24256>:
      iftmp.96 = __builtin_strcmp (option, "corlib");
      <D.24293>:
      D.22618 = iftmp.96;
    }
    if (D.22618 == 0) goto <D.24294>; else goto <D.24295>;
    <D.24294>:
    generic_sharing = 2;
    goto <D.24296>;
    <D.24295>:
    {
      size_t __s1_len;
      size_t __s2_len;

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

        __s2 = option;
        D.24300 = "collections";
        D.24301 = MEM[(const unsigned char *)D.24300];
        D.24302 = (int) D.24301;
        D.24303 = *__s2;
        D.24304 = (int) D.24303;
        __result = D.24302 - D.24304;
        {
          D.24305 = __s2_len != 0;
          D.24306 = __result == 0;
          D.24307 = D.24305 & D.24306;
          if (D.24307 != 0) goto <D.24308>; else goto <D.24309>;
          <D.24308>:
          D.24310 = &MEM[(void *)"collections" + 1B];
          D.24311 = *D.24310;
          D.24312 = (int) D.24311;
          D.24313 = __s2 + 1;
          D.24314 = *D.24313;
          D.24315 = (int) D.24314;
          __result = D.24312 - D.24315;
          D.24316 = __s2_len > 1;
          D.24306 = __result == 0;
          D.24317 = D.24316 & D.24306;
          if (D.24317 != 0) goto <D.24318>; else goto <D.24319>;
          <D.24318>:
          D.24320 = &MEM[(void *)"collections" + 2B];
          D.24321 = *D.24320;
          D.24322 = (int) D.24321;
          D.24323 = __s2 + 2;
          D.24324 = *D.24323;
          D.24325 = (int) D.24324;
          __result = D.24322 - D.24325;
          D.24326 = __s2_len > 2;
          D.24306 = __result == 0;
          D.24327 = D.24326 & D.24306;
          if (D.24327 != 0) goto <D.24328>; else goto <D.24329>;
          <D.24328>:
          D.24330 = &MEM[(void *)"collections" + 3B];
          D.24331 = *D.24330;
          D.24332 = (int) D.24331;
          D.24333 = __s2 + 3;
          D.24334 = *D.24333;
          D.24335 = (int) D.24334;
          __result = D.24332 - D.24335;
          <D.24329>:
          <D.24319>:
          <D.24309>:
        }
        D.22626 = __result;
      }
      iftmp.97 = -D.22626;
      goto <D.24336>;
      <D.24299>:
      iftmp.97 = __builtin_strcmp (option, "collections");
      <D.24336>:
      D.22627 = iftmp.97;
    }
    if (D.22627 == 0) goto <D.24337>; else goto <D.24338>;
    <D.24337>:
    generic_sharing = 1;
    goto <D.24339>;
    <D.24338>:
    {
      size_t __s1_len;
      size_t __s2_len;

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

        __s2 = option;
        D.24343 = "all";
        D.24344 = MEM[(const unsigned char *)D.24343];
        D.24345 = (int) D.24344;
        D.24346 = *__s2;
        D.24347 = (int) D.24346;
        __result = D.24345 - D.24347;
        {
          D.24348 = __s2_len != 0;
          D.24349 = __result == 0;
          D.24350 = D.24348 & D.24349;
          if (D.24350 != 0) goto <D.24351>; else goto <D.24352>;
          <D.24351>:
          D.24353 = &MEM[(void *)"all" + 1B];
          D.24354 = *D.24353;
          D.24355 = (int) D.24354;
          D.24356 = __s2 + 1;
          D.24357 = *D.24356;
          D.24358 = (int) D.24357;
          __result = D.24355 - D.24358;
          D.24359 = __s2_len > 1;
          D.24349 = __result == 0;
          D.24360 = D.24359 & D.24349;
          if (D.24360 != 0) goto <D.24361>; else goto <D.24362>;
          <D.24361>:
          D.24363 = &MEM[(void *)"all" + 2B];
          D.24364 = *D.24363;
          D.24365 = (int) D.24364;
          D.24366 = __s2 + 2;
          D.24367 = *D.24366;
          D.24368 = (int) D.24367;
          __result = D.24365 - D.24368;
          D.24369 = __s2_len > 2;
          D.24349 = __result == 0;
          D.24370 = D.24369 & D.24349;
          if (D.24370 != 0) goto <D.24371>; else goto <D.24372>;
          <D.24371>:
          D.24373 = &MEM[(void *)"all" + 3B];
          D.24374 = *D.24373;
          D.24375 = (int) D.24374;
          D.24376 = __s2 + 3;
          D.24377 = *D.24376;
          D.24378 = (int) D.24377;
          __result = D.24375 - D.24378;
          <D.24372>:
          <D.24362>:
          <D.24352>:
        }
        D.22635 = __result;
      }
      iftmp.98 = -D.22635;
      goto <D.24379>;
      <D.24342>:
      iftmp.98 = __builtin_strcmp (option, "all");
      <D.24379>:
      D.22636 = iftmp.98;
    }
    if (D.22636 == 0) goto <D.24380>; else goto <D.24381>;
    <D.24380>:
    generic_sharing = 3;
    goto <D.24382>;
    <D.24381>:
    {
      size_t __s1_len;
      size_t __s2_len;

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

        __s2 = option;
        D.24386 = "none";
        D.24387 = MEM[(const unsigned char *)D.24386];
        D.24388 = (int) D.24387;
        D.24389 = *__s2;
        D.24390 = (int) D.24389;
        __result = D.24388 - D.24390;
        {
          D.24391 = __s2_len != 0;
          D.24392 = __result == 0;
          D.24393 = D.24391 & D.24392;
          if (D.24393 != 0) goto <D.24394>; else goto <D.24395>;
          <D.24394>:
          D.24396 = &MEM[(void *)"none" + 1B];
          D.24397 = *D.24396;
          D.24398 = (int) D.24397;
          D.24399 = __s2 + 1;
          D.24400 = *D.24399;
          D.24401 = (int) D.24400;
          __result = D.24398 - D.24401;
          D.24402 = __s2_len > 1;
          D.24392 = __result == 0;
          D.24403 = D.24402 & D.24392;
          if (D.24403 != 0) goto <D.24404>; else goto <D.24405>;
          <D.24404>:
          D.24406 = &MEM[(void *)"none" + 2B];
          D.24407 = *D.24406;
          D.24408 = (int) D.24407;
          D.24409 = __s2 + 2;
          D.24410 = *D.24409;
          D.24411 = (int) D.24410;
          __result = D.24408 - D.24411;
          D.24412 = __s2_len > 2;
          D.24392 = __result == 0;
          D.24413 = D.24412 & D.24392;
          if (D.24413 != 0) goto <D.24414>; else goto <D.24415>;
          <D.24414>:
          D.24416 = &MEM[(void *)"none" + 3B];
          D.24417 = *D.24416;
          D.24418 = (int) D.24417;
          D.24419 = __s2 + 3;
          D.24420 = *D.24419;
          D.24421 = (int) D.24420;
          __result = D.24418 - D.24421;
          <D.24415>:
          <D.24405>:
          <D.24395>:
        }
        D.22644 = __result;
      }
      iftmp.99 = -D.22644;
      goto <D.24422>;
      <D.24385>:
      iftmp.99 = __builtin_strcmp (option, "none");
      <D.24422>:
      D.22645 = iftmp.99;
    }
    if (D.22645 == 0) goto <D.24423>; else goto <D.24424>;
    <D.24423>:
    generic_sharing = 0;
    goto <D.24425>;
    <D.24424>:
    monoeg_g_log (0B, 16, "Unknown generic sharing option `%s\'.", option);
    <D.24425>:
    <D.24382>:
    <D.24339>:
    <D.24296>:
    <D.24253>:
    gshared_supported.95 = gshared_supported;
    if (gshared_supported.95 == 0) goto <D.24426>; else goto <D.24427>;
    <D.24426>:
    generic_sharing = 0;
    <D.24427>:
    inited = 1;
  }
  <D.24247>:
  generic_sharing.100 = generic_sharing;
  switch (generic_sharing.100) <default: <D.22653>, case 0: <D.22646>, case 1: <D.22649>, case 2: <D.22648>, case 3: <D.22647>>
  <D.22646>:
  D.24429 = 0;
  return D.24429;
  <D.22647>:
  D.24429 = 1;
  return D.24429;
  <D.22648>:
  D.24430 = class->image;
  D.24431 = mono_defaults.corlib;
  D.24432 = D.24430 == D.24431;
  D.24429 = (gboolean) D.24432;
  return D.24429;
  <D.22649>:
  D.24430 = class->image;
  D.24431 = mono_defaults.corlib;
  if (D.24430 != D.24431) goto <D.24433>; else goto <D.24434>;
  <D.24433>:
  D.24429 = 0;
  return D.24429;
  <D.24434>:
  goto <D.22651>;
  <D.22650>:
  class = class->nested_in;
  <D.22651>:
  D.24435 = class->nested_in;
  if (D.24435 != 0B) goto <D.22650>; else goto <D.22652>;
  <D.22652>:
  D.24436 = class->name_space;
  D.24429 = monoeg_g_str_has_prefix (D.24436, "System.Collections.Generic");
  return D.24429;
  <D.22653>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 2398);
  D.24429 = 0;
  return D.24429;
}


mono_get_generic_context_from_code (guint8 * code)
{
  struct MonoDomain * D.24438;
  _Bool D.24439;
  long int D.24440;
  long int D.24441;
  struct MonoGenericSharingContext * D.24444;
  struct MonoJitInfo * jit_info;

  D.24438 = mono_domain_get ();
  jit_info = mini_jit_info_table_find (D.24438, code, 0B);
  D.24439 = jit_info == 0B;
  D.24440 = (long int) D.24439;
  D.24441 = __builtin_expect (D.24440, 0);
  if (D.24441 != 0) goto <D.24442>; else goto <D.24443>;
  <D.24442>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2414, "jit_info");
  <D.24443>:
  D.24444 = mono_jit_info_get_generic_sharing_context (jit_info);
  return D.24444;
}


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

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


mono_method_check_context_used (struct MonoMethod * method)
{
  struct MonoClass * D.24450;
  unsigned char D.24451;
  int D.24455;
  int D.24456;
  struct MonoGenericContext * method_context;
  int context_used;

  method_context = mini_method_get_context (method);
  context_used = 0;
  if (method_context == 0B) goto <D.24448>; else goto <D.24449>;
  <D.24448>:
  D.24450 = method->klass;
  D.24451 = D.24450->rank;
  if (D.24451 != 0) goto <D.24452>; else goto <D.24453>;
  <D.24452>:
  D.24450 = method->klass;
  context_used = mono_class_check_context_used (D.24450);
  <D.24453>:
  goto <D.24454>;
  <D.24449>:
  context_used = mono_generic_context_check_used (method_context);
  D.24450 = method->klass;
  D.24455 = mono_class_check_context_used (D.24450);
  context_used = D.24455 | context_used;
  <D.24454>:
  D.24456 = context_used;
  return D.24456;
}


mono_generic_context_equal_deep (struct MonoGenericContext * context1, struct MonoGenericContext * context2)
{
  gboolean D.24458;
  int iftmp.101;
  struct MonoGenericInst * D.24462;
  struct MonoGenericInst * D.24463;
  int D.24464;
  struct MonoGenericInst * D.24466;
  struct MonoGenericInst * D.24467;
  int D.24468;

  D.24462 = context2->class_inst;
  D.24463 = context1->class_inst;
  D.24464 = generic_inst_equal (D.24463, D.24462);
  if (D.24464 != 0) goto <D.24465>; else goto <D.24460>;
  <D.24465>:
  D.24466 = context2->method_inst;
  D.24467 = context1->method_inst;
  D.24468 = generic_inst_equal (D.24467, D.24466);
  if (D.24468 != 0) goto <D.24469>; else goto <D.24460>;
  <D.24469>:
  iftmp.101 = 1;
  goto <D.24461>;
  <D.24460>:
  iftmp.101 = 0;
  <D.24461>:
  D.24458 = iftmp.101;
  return D.24458;
}


generic_inst_equal (struct MonoGenericInst * inst1, struct MonoGenericInst * inst2)
{
  _Bool D.24473;
  long int D.24474;
  long int D.24475;
  gboolean D.24478;
  _Bool D.24479;
  long int D.24480;
  long int D.24481;
  unsigned int D.24484;
  unsigned int D.24485;
  unsigned int D.24486;
  unsigned int D.24487;
  struct MonoType * D.24490;
  struct MonoType * D.24491;
  int D.24492;
  <unnamed-unsigned:22> D.24495;
  int D.24496;
  int i;

  if (inst1 == 0B) goto <D.24471>; else goto <D.24472>;
  <D.24471>:
  D.24473 = inst2 != 0B;
  D.24474 = (long int) D.24473;
  D.24475 = __builtin_expect (D.24474, 0);
  if (D.24475 != 0) goto <D.24476>; else goto <D.24477>;
  <D.24476>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2458, "!inst2");
  <D.24477>:
  D.24478 = 1;
  return D.24478;
  <D.24472>:
  D.24479 = inst2 == 0B;
  D.24480 = (long int) D.24479;
  D.24481 = __builtin_expect (D.24480, 0);
  if (D.24481 != 0) goto <D.24482>; else goto <D.24483>;
  <D.24482>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2462, "inst2");
  <D.24483>:
  D.24484 = BIT_FIELD_REF <*inst1, 32, 32>;
  D.24485 = BIT_FIELD_REF <*inst2, 32, 32>;
  D.24486 = D.24484 ^ D.24485;
  D.24487 = D.24486 & 4194303;
  if (D.24487 != 0) goto <D.24488>; else goto <D.24489>;
  <D.24488>:
  D.24478 = 0;
  return D.24478;
  <D.24489>:
  i = 0;
  goto <D.22672>;
  <D.22671>:
  D.24490 = inst2->type_argv[i];
  D.24491 = inst1->type_argv[i];
  D.24492 = mono_metadata_type_equal (D.24491, D.24490);
  if (D.24492 == 0) goto <D.24493>; else goto <D.24494>;
  <D.24493>:
  D.24478 = 0;
  return D.24478;
  <D.24494>:
  i = i + 1;
  <D.22672>:
  D.24495 = inst1->type_argc;
  D.24496 = (int) D.24495;
  if (D.24496 > i) goto <D.22671>; else goto <D.22673>;
  <D.22673>:
  D.24478 = 1;
  return D.24478;
}


mini_class_get_container_class (struct MonoClass * class)
{
  struct MonoGenericClass * D.24498;
  struct MonoClass * D.24501;
  struct MonoGenericContainer * D.24502;
  _Bool D.24503;
  long int D.24504;
  long int D.24505;

  D.24498 = class->generic_class;
  if (D.24498 != 0B) goto <D.24499>; else goto <D.24500>;
  <D.24499>:
  D.24498 = class->generic_class;
  D.24501 = D.24498->container_class;
  return D.24501;
  <D.24500>:
  D.24502 = class->generic_container;
  D.24503 = D.24502 == 0B;
  D.24504 = (long int) D.24503;
  D.24505 = __builtin_expect (D.24504, 0);
  if (D.24505 != 0) goto <D.24506>; else goto <D.24507>;
  <D.24506>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2502, "class->generic_container");
  <D.24507>:
  D.24501 = class;
  return D.24501;
}


mini_class_get_context (struct MonoClass * class)
{
  struct MonoGenericClass * D.24509;
  struct MonoGenericContext * D.24512;
  struct MonoGenericContainer * D.24513;
  _Bool D.24514;
  long int D.24515;
  long int D.24516;

  D.24509 = class->generic_class;
  if (D.24509 != 0B) goto <D.24510>; else goto <D.24511>;
  <D.24510>:
  D.24509 = class->generic_class;
  D.24512 = &D.24509->context;
  return D.24512;
  <D.24511>:
  D.24513 = class->generic_container;
  D.24514 = D.24513 == 0B;
  D.24515 = (long int) D.24514;
  D.24516 = __builtin_expect (D.24515, 0);
  if (D.24516 != 0) goto <D.24517>; else goto <D.24518>;
  <D.24517>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 2518, "class->generic_container");
  <D.24518>:
  D.24513 = class->generic_container;
  D.24512 = &D.24513->context;
  return D.24512;
}


mini_get_basic_type_from_generic (struct MonoGenericSharingContext * gsctx, struct MonoType * type)
{
  unsigned char D.24521;
  unsigned char D.24522;
  unsigned char D.24524;
  _Bool D.24525;
  _Bool D.24526;
  _Bool D.24527;
  int D.24529;
  struct MonoType * D.24531;

  D.24521 = BIT_FIELD_REF <*type, 8, 56>;
  D.24522 = D.24521 & 64;
  if (D.24522 == 0) goto <D.24523>; else goto <D.24520>;
  <D.24523>:
  D.24524 = type->type;
  D.24525 = D.24524 == 19;
  D.24526 = D.24524 == 30;
  D.24527 = D.24525 | D.24526;
  if (D.24527 != 0) goto <D.24528>; else goto <D.24520>;
  <D.24528>:
  D.24529 = mini_is_gsharedvt_type_gsctx (gsctx, type);
  if (D.24529 != 0) goto <D.24530>; else goto <D.24520>;
  <D.24530>:
  D.24531 = type;
  return D.24531;
  <D.24520>:
  D.24531 = mono_type_get_basic_type_from_generic (type);
  return D.24531;
}


mini_type_get_underlying_type (struct MonoGenericSharingContext * gsctx, struct MonoType * type)
{
  unsigned char D.24533;
  unsigned char D.24534;
  struct MonoType * D.24537;
  struct MonoClass * D.24538;
  unsigned char D.24541;
  _Bool D.24542;
  _Bool D.24543;
  _Bool D.24544;
  int D.24547;
  struct MonoType * D.24550;

  D.24533 = BIT_FIELD_REF <*type, 8, 56>;
  D.24534 = D.24533 & 64;
  if (D.24534 != 0) goto <D.24535>; else goto <D.24536>;
  <D.24535>:
  D.24538 = mono_defaults.int_class;
  D.24537 = &D.24538->byval_arg;
  return D.24537;
  <D.24536>:
  D.24533 = BIT_FIELD_REF <*type, 8, 56>;
  D.24534 = D.24533 & 64;
  if (D.24534 == 0) goto <D.24539>; else goto <D.24540>;
  <D.24539>:
  D.24541 = type->type;
  D.24542 = D.24541 == 19;
  D.24543 = D.24541 == 30;
  D.24544 = D.24542 | D.24543;
  if (D.24544 != 0) goto <D.24545>; else goto <D.24546>;
  <D.24545>:
  D.24547 = mini_is_gsharedvt_type_gsctx (gsctx, type);
  if (D.24547 != 0) goto <D.24548>; else goto <D.24549>;
  <D.24548>:
  D.24537 = type;
  return D.24537;
  <D.24549>:
  <D.24546>:
  <D.24540>:
  D.24550 = mono_type_get_underlying_type (type);
  D.24537 = mini_get_basic_type_from_generic (gsctx, D.24550);
  return D.24537;
}


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

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


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

  if (pinvoke != 0) goto <D.24554>; else goto <D.24555>;
  <D.24554>:
  size = mono_type_native_stack_size (t, align);
  goto <D.24556>;
  <D.24555>:
  {
    int ialign;

    try
      {
        if (align != 0B) goto <D.24557>; else goto <D.24558>;
        <D.24557>:
        size = mini_type_stack_size (gsctx, t, &ialign);
        ialign.102 = ialign;
        ialign.103 = (unsigned int) ialign.102;
        *align = ialign.103;
        goto <D.24561>;
        <D.24558>:
        size = mini_type_stack_size (gsctx, t, 0B);
        <D.24561>:
      }
    finally
      {
        ialign = {CLOBBER};
      }
  }
  <D.24556>:
  D.24562 = size;
  return D.24562;
}


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.104;
  struct GHashTable * generic_subclass_hash.105;
  struct GHashTable * old_hash;

  generic_subclass_hash.104 = generic_subclass_hash;
  if (generic_subclass_hash.104 == 0B) goto <D.24565>; else goto <D.24566>;
  <D.24565>:
  return;
  <D.24566>:
  mono_loader_lock ();
  old_hash = generic_subclass_hash;
  generic_subclass_hash.105 = monoeg_g_hash_table_new (mono_aligned_addr_hash, 0B);
  generic_subclass_hash = generic_subclass_hash.105;
  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.24569;
  struct MonoImage * D.24572;
  _Bool D.24573;
  long int D.24574;
  long int D.24575;
  struct MonoRuntimeGenericContextTemplate * D.24578;
  struct GHashTable * generic_subclass_hash.106;
  struct MonoClass * new_list;

  D.24569 = class->image;
  if (D.24569 == image) goto <D.24570>; else goto <D.24571>;
  <D.24570>:
  goto <D.21921>;
  <D.21920>:
  D.24572 = subclass->image;
  D.24573 = D.24572 != image;
  D.24574 = (long int) D.24573;
  D.24575 = __builtin_expect (D.24574, 0);
  if (D.24575 != 0) goto <D.24576>; else goto <D.24577>;
  <D.24576>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-generic-sharing.c", 285, "subclass->image == image");
  <D.24577>:
  D.24578 = class_lookup_rgctx_template (subclass);
  subclass = D.24578->next_subclass;
  <D.21921>:
  if (subclass != 0B) goto <D.21920>; else goto <D.21922>;
  <D.21922>:
  return;
  <D.24571>:
  new_list = 0B;
  goto <D.21926>;
  <D.21925>:
  {
    struct MonoRuntimeGenericContextTemplate * subclass_template;
    struct MonoClass * next;

    subclass_template = class_lookup_rgctx_template (subclass);
    next = subclass_template->next_subclass;
    D.24572 = subclass->image;
    if (D.24572 != image) goto <D.24579>; else goto <D.24580>;
    <D.24579>:
    subclass_template->next_subclass = new_list;
    new_list = subclass;
    <D.24580>:
    subclass = next;
  }
  <D.21926>:
  if (subclass != 0B) goto <D.21925>; else goto <D.21927>;
  <D.21927>:
  if (new_list != 0B) goto <D.24581>; else goto <D.24582>;
  <D.24581>:
  generic_subclass_hash.106 = generic_subclass_hash;
  monoeg_g_hash_table_insert_replace (generic_subclass_hash.106, class, new_list, 0);
  <D.24582>:
}


mono_generic_sharing_cleanup ()
{
  struct GHashTable * generic_subclass_hash.107;

  mono_remove_image_unload_hook (mono_class_unregister_image_generic_subclasses, 0B);
  generic_subclass_hash.107 = generic_subclass_hash;
  if (generic_subclass_hash.107 != 0B) goto <D.24586>; else goto <D.24587>;
  <D.24586>:
  generic_subclass_hash.107 = generic_subclass_hash;
  monoeg_g_hash_table_destroy (generic_subclass_hash.107);
  <D.24587>:
}


mini_type_var_is_vt (struct MonoCompile * cfg, struct MonoType * type)
{
  unsigned char D.24588;
  struct MonoGenericSharingContext * D.24592;
  gboolean * D.24593;
  struct MonoGenericParam * D.24595;
  short unsigned int D.24596;
  unsigned int D.24597;
  unsigned int D.24598;
  gboolean * D.24599;
  int D.24600;
  gboolean D.24602;
  gboolean * D.24606;
  gboolean * D.24608;
  int D.24609;

  D.24588 = type->type;
  if (D.24588 == 19) goto <D.24589>; else goto <D.24590>;
  <D.24589>:
  D.24592 = cfg->generic_sharing_context;
  D.24593 = D.24592->var_is_vt;
  if (D.24593 != 0B) goto <D.24594>; else goto <D.24591>;
  <D.24594>:
  D.24592 = cfg->generic_sharing_context;
  D.24593 = D.24592->var_is_vt;
  D.24595 = type->data.generic_param;
  D.24596 = D.24595->num;
  D.24597 = (unsigned int) D.24596;
  D.24598 = D.24597 * 4;
  D.24599 = D.24593 + D.24598;
  D.24600 = *D.24599;
  if (D.24600 != 0) goto <D.24601>; else goto <D.24591>;
  <D.24601>:
  D.24602 = 1;
  return D.24602;
  <D.24591>:
  D.24602 = 0;
  return D.24602;
  <D.24590>:
  D.24588 = type->type;
  if (D.24588 == 30) goto <D.24603>; else goto <D.24604>;
  <D.24603>:
  D.24592 = cfg->generic_sharing_context;
  D.24606 = D.24592->mvar_is_vt;
  if (D.24606 != 0B) goto <D.24607>; else goto <D.24605>;
  <D.24607>:
  D.24592 = cfg->generic_sharing_context;
  D.24606 = D.24592->mvar_is_vt;
  D.24595 = type->data.generic_param;
  D.24596 = D.24595->num;
  D.24597 = (unsigned int) D.24596;
  D.24598 = D.24597 * 4;
  D.24608 = D.24606 + D.24598;
  D.24609 = *D.24608;
  if (D.24609 != 0) goto <D.24610>; else goto <D.24605>;
  <D.24610>:
  D.24602 = 1;
  return D.24602;
  <D.24605>:
  D.24602 = 0;
  return D.24602;
  <D.24604>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-generic-sharing.c", 2651);
  D.24602 = 0;
  return D.24602;
}


mini_type_is_reference (struct MonoCompile * cfg, struct MonoType * type)
{
  int D.24612;
  gboolean D.24615;
  struct MonoGenericSharingContext * D.24616;
  int iftmp.108;
  unsigned char D.24622;
  _Bool D.24623;
  _Bool D.24624;
  _Bool D.24625;
  int D.24627;

  D.24612 = mono_type_is_reference (type);
  if (D.24612 != 0) goto <D.24613>; else goto <D.24614>;
  <D.24613>:
  D.24615 = 1;
  return D.24615;
  <D.24614>:
  D.24616 = cfg->generic_sharing_context;
  if (D.24616 == 0B) goto <D.24617>; else goto <D.24618>;
  <D.24617>:
  D.24615 = 0;
  return D.24615;
  <D.24618>:
  D.24622 = type->type;
  D.24623 = D.24622 == 19;
  D.24624 = D.24622 == 30;
  D.24625 = D.24623 | D.24624;
  if (D.24625 != 0) goto <D.24626>; else goto <D.24620>;
  <D.24626>:
  D.24627 = mini_type_var_is_vt (cfg, type);
  if (D.24627 == 0) goto <D.24628>; else goto <D.24620>;
  <D.24628>:
  iftmp.108 = 1;
  goto <D.24621>;
  <D.24620>:
  iftmp.108 = 0;
  <D.24621>:
  D.24615 = iftmp.108;
  return D.24615;
}


mini_method_get_rgctx (struct MonoMethod * m)
{
  struct MonoGenericContext * D.24630;
  struct MonoGenericInst * D.24631;
  void * D.24634;
  struct MonoGenericContext * D.24635;
  struct MonoGenericInst * D.24636;
  struct MonoClass * D.24637;
  struct MonoDomain * D.24638;
  struct MonoVTable * D.24639;
  struct MonoDomain * D.24640;

  D.24630 = mini_method_get_context (m);
  D.24631 = D.24630->method_inst;
  if (D.24631 != 0B) goto <D.24632>; else goto <D.24633>;
  <D.24632>:
  D.24635 = mini_method_get_context (m);
  D.24636 = D.24635->method_inst;
  D.24637 = m->klass;
  D.24638 = mono_domain_get ();
  D.24639 = mono_class_vtable (D.24638, D.24637);
  D.24634 = mono_method_lookup_rgctx (D.24639, D.24636);
  return D.24634;
  <D.24633>:
  D.24637 = m->klass;
  D.24640 = mono_domain_get ();
  D.24634 = mono_class_vtable (D.24640, D.24637);
  return D.24634;
}


mini_type_is_vtype (struct MonoCompile * cfg, struct MonoType * t)
{
  gboolean D.24642;
  int iftmp.109;
  int D.24647;
  int D.24649;

  D.24647 = mono_type_is_struct (t);
  if (D.24647 != 0) goto <D.24644>; else goto <D.24648>;
  <D.24648>:
  D.24649 = mini_is_gsharedvt_variable_type (cfg, t);
  if (D.24649 != 0) goto <D.24644>; else goto <D.24645>;
  <D.24644>:
  iftmp.109 = 1;
  goto <D.24646>;
  <D.24645>:
  iftmp.109 = 0;
  <D.24646>:
  D.24642 = iftmp.109;
  return D.24642;
}


mini_class_is_generic_sharable (struct MonoClass * klass)
{
  struct MonoGenericClass * D.24651;
  int D.24654;
  gboolean D.24657;
  int iftmp.110;
  struct MonoGenericContext * D.24662;
  int D.24663;

  D.24651 = klass->generic_class;
  if (D.24651 != 0B) goto <D.24652>; else goto <D.24653>;
  <D.24652>:
  D.24654 = is_async_state_machine_class (klass);
  if (D.24654 != 0) goto <D.24655>; else goto <D.24656>;
  <D.24655>:
  D.24657 = 0;
  return D.24657;
  <D.24656>:
  <D.24653>:
  D.24651 = klass->generic_class;
  if (D.24651 != 0B) goto <D.24661>; else goto <D.24659>;
  <D.24661>:
  D.24651 = klass->generic_class;
  D.24662 = &D.24651->context;
  D.24663 = mono_generic_context_is_sharable (D.24662, 0);
  if (D.24663 != 0) goto <D.24664>; else goto <D.24659>;
  <D.24664>:
  iftmp.110 = 1;
  goto <D.24660>;
  <D.24659>:
  iftmp.110 = 0;
  <D.24660>:
  D.24657 = iftmp.110;
  return D.24657;
}


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

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


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

  D.24669 = 0;
  return D.24669;
}


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

  D.24671 = 0;
  return D.24671;
}


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

  D.24673 = 0;
  return D.24673;
}


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

  D.24675 = 0;
  return D.24675;
}


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

  D.24677 = 0;
  return D.24677;
}


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

  D.24679 = 0;
  return D.24679;
}


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

  D.24681 = 0;
  return D.24681;
}


