mono_ldftn (struct MonoMethod * method)
{
  struct MonoDomain * D.23771;
  void * D.23772;
  struct MonoDomain * D.23773;
  void * addr;

  D.23771 = mono_domain_get ();
  addr = mono_create_jump_trampoline (D.23771, method, 0);
  D.23773 = mono_domain_get ();
  D.23772 = mono_create_ftnptr (D.23773, addr);
  return D.23772;
}


mono_ldvirtfn (struct MonoObject * obj, struct MonoMethod * method)
{
  void * D.23775;

  D.23775 = ldvirtfn_internal (obj, method, 0);
  return D.23775;
}


ldvirtfn_internal (struct MonoObject * obj, struct MonoMethod * method, gboolean gshared)
{
  struct MonoException * D.23779;
  unsigned char D.23782;
  unsigned char D.23783;
  struct MonoGenericContext * D.23786;
  struct MonoGenericInst * D.23787;
  struct MonoClass * D.23790;
  struct MonoGenericClass * D.23791;
  struct MonoGenericInst * D.23794;
  struct MonoGenericContainer * D.23796;
  struct MonoGenericInst * D.23799;
  struct MonoGenericContext * D.23800;
  struct MonoGenericInst * D.23801;
  void * D.23802;
  struct MonoMethod * res;

  if (obj == 0B) goto <D.23777>; else goto <D.23778>;
  <D.23777>:
  D.23779 = mono_get_exception_null_reference ();
  mono_raise_exception (D.23779);
  <D.23778>:
  res = mono_object_get_virtual_method (obj, method);
  if (gshared != 0) goto <D.23780>; else goto <D.23781>;
  <D.23780>:
  D.23782 = BIT_FIELD_REF <*method, 8, 264>;
  D.23783 = D.23782 & 16;
  if (D.23783 != 0) goto <D.23784>; else goto <D.23785>;
  <D.23784>:
  D.23786 = mono_method_get_context (method);
  D.23787 = D.23786->method_inst;
  if (D.23787 != 0B) goto <D.23788>; else goto <D.23789>;
  <D.23788>:
  {
    struct MonoGenericContext context;

    try
      {
        context.class_inst = 0B;
        context.method_inst = 0B;
        D.23790 = res->klass;
        D.23791 = D.23790->generic_class;
        if (D.23791 != 0B) goto <D.23792>; else goto <D.23793>;
        <D.23792>:
        D.23790 = res->klass;
        D.23791 = D.23790->generic_class;
        D.23794 = D.23791->context.class_inst;
        context.class_inst = D.23794;
        goto <D.23795>;
        <D.23793>:
        D.23790 = res->klass;
        D.23796 = D.23790->generic_container;
        if (D.23796 != 0B) goto <D.23797>; else goto <D.23798>;
        <D.23797>:
        D.23790 = res->klass;
        D.23796 = D.23790->generic_container;
        D.23799 = D.23796->context.class_inst;
        context.class_inst = D.23799;
        <D.23798>:
        <D.23795>:
        D.23800 = mono_method_get_context (method);
        D.23801 = D.23800->method_inst;
        context.method_inst = D.23801;
        res = mono_class_inflate_generic_method (res, &context);
      }
    finally
      {
        context = {CLOBBER};
      }
  }
  <D.23789>:
  <D.23785>:
  <D.23781>:
  D.23802 = mono_ldftn (res);
  return D.23802;
}


mono_ldvirtfn_gshared (struct MonoObject * obj, struct MonoMethod * method)
{
  void * D.23804;

  D.23804 = ldvirtfn_internal (obj, method, 1);
  return D.23804;
}


mono_helper_stelem_ref_check (struct MonoArray * array, struct MonoObject * val)
{
  struct MonoException * D.23808;
  struct MonoVTable * D.23811;
  struct MonoClass * D.23812;
  struct MonoClass * D.23813;
  struct MonoObject * D.23814;
  struct MonoException * D.23817;

  if (array == 0B) goto <D.23806>; else goto <D.23807>;
  <D.23806>:
  D.23808 = mono_get_exception_null_reference ();
  mono_raise_exception (D.23808);
  <D.23807>:
  if (val != 0B) goto <D.23809>; else goto <D.23810>;
  <D.23809>:
  D.23811 = array->obj.vtable;
  D.23812 = D.23811->klass;
  D.23813 = D.23812->element_class;
  D.23814 = mono_object_isinst (val, D.23813);
  if (D.23814 == 0B) goto <D.23815>; else goto <D.23816>;
  <D.23815>:
  D.23817 = mono_get_exception_array_type_mismatch ();
  mono_raise_exception (D.23817);
  <D.23816>:
  <D.23810>:
}


mono_array_new_va (struct MonoMethod * cm)
{
  struct MonoMethodSignature * D.23818;
  short unsigned int D.23819;
  struct MonoClass * D.23820;
  unsigned char D.23821;
  long unsigned int D.23822;
  long unsigned int D.23823;
  long unsigned int D.23824;
  long unsigned int D.23825;
  uintptr_t * D.23826;
  void * addr.0;
  unsigned int D.23830;
  void * D.23832;
  sizetype D.23833;
  unsigned int D.23834;
  void * D.23835;
  void * D.23836;
  long unsigned int D.23837;
  unsigned char D.23840;
  long unsigned int D.23843;
  long unsigned int D.23844;
  int D.23847;
  _Bool D.23848;
  long int D.23849;
  long int D.23850;
  struct MonoArray * D.23853;
  struct MonoDomain * domain;
  struct  ap[1];
  uintptr_t * lengths;
  intptr_t * lower_bounds;
  int pcount;
  int rank;
  int i;
  int d;

  try
    {
      domain = mono_domain_get ();
      D.23818 = mono_method_signature (cm);
      D.23819 = D.23818->param_count;
      pcount = (int) D.23819;
      D.23820 = cm->klass;
      D.23821 = D.23820->rank;
      rank = (int) D.23821;
      __builtin_va_start (&ap, 0);
      D.23822 = (long unsigned int) pcount;
      D.23823 = D.23822 * 8;
      lengths = __builtin_alloca (D.23823);
      i = 0;
      goto <D.23602>;
      <D.23601>:
      D.23824 = (long unsigned int) i;
      D.23825 = D.23824 * 8;
      D.23826 = lengths + D.23825;
      D.23830 = ap.gp_offset;
      if (D.23830 >= 48) goto <D.23828>; else goto <D.23831>;
      <D.23831>:
      D.23832 = ap.reg_save_area;
      D.23830 = ap.gp_offset;
      D.23833 = (sizetype) D.23830;
      addr.0 = D.23832 + D.23833;
      D.23830 = ap.gp_offset;
      D.23834 = D.23830 + 8;
      ap.gp_offset = D.23834;
      goto <D.23829>;
      <D.23828>:
      D.23835 = ap.overflow_arg_area;
      addr.0 = D.23835;
      D.23836 = D.23835 + 8;
      ap.overflow_arg_area = D.23836;
      <D.23829>:
      d = MEM[(int * {ref-all})addr.0];
      D.23837 = (long unsigned int) d;
      *D.23826 = D.23837;
      i = i + 1;
      <D.23602>:
      if (i < pcount) goto <D.23601>; else goto <D.23603>;
      <D.23603>:
      if (rank == pcount) goto <D.23838>; else goto <D.23839>;
      <D.23838>:
      D.23820 = cm->klass;
      D.23840 = D.23820->byval_arg.type;
      if (D.23840 == 20) goto <D.23841>; else goto <D.23842>;
      <D.23841>:
      D.23843 = (long unsigned int) rank;
      D.23844 = D.23843 * 8;
      lower_bounds = __builtin_alloca (D.23844);
      D.23843 = (long unsigned int) rank;
      D.23844 = D.23843 * 8;
      memset (lower_bounds, 0, D.23844);
      goto <D.23845>;
      <D.23842>:
      lower_bounds = 0B;
      <D.23845>:
      goto <D.23846>;
      <D.23839>:
      D.23847 = rank * 2;
      D.23848 = D.23847 != pcount;
      D.23849 = (long int) D.23848;
      D.23850 = __builtin_expect (D.23849, 0);
      if (D.23850 != 0) goto <D.23851>; else goto <D.23852>;
      <D.23851>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "jit-icalls.c", 670, "pcount == (rank * 2)");
      <D.23852>:
      lower_bounds = lengths;
      D.23843 = (long unsigned int) rank;
      D.23844 = D.23843 * 8;
      lengths = lengths + D.23844;
      <D.23846>:
      __builtin_va_end (&ap);
      D.23820 = cm->klass;
      D.23853 = mono_array_new_full (domain, D.23820, lengths, lower_bounds);
      return D.23853;
    }
  finally
    {
      ap = {CLOBBER};
    }
}


memset (void * __dest, int __ch, size_t __len)
{
  int D.23858;
  int D.23863;
  void * D.23865;
  long unsigned int D.23866;

  D.23858 = __builtin_constant_p (__len);
  if (D.23858 != 0) goto <D.23859>; else goto <D.23860>;
  <D.23859>:
  if (__len == 0) goto <D.23861>; else goto <D.23862>;
  <D.23861>:
  D.23863 = __builtin_constant_p (__ch);
  if (D.23863 == 0) goto <D.23856>; else goto <D.23864>;
  <D.23864>:
  if (__ch != 0) goto <D.23856>; else goto <D.23857>;
  <D.23856>:
  __warn_memset_zero_len ();
  D.23865 = __dest;
  return D.23865;
  <D.23857>:
  <D.23862>:
  <D.23860>:
  D.23866 = __builtin_object_size (__dest, 0);
  D.23865 = __builtin___memset_chk (__dest, __ch, __len, D.23866);
  return D.23865;
}


mono_array_new_1 (struct MonoMethod * cm, guint32 length)
{
  struct MonoMethodSignature * D.23868;
  short unsigned int D.23869;
  struct MonoClass * D.23870;
  unsigned char D.23871;
  long unsigned int D.23872;
  _Bool D.23873;
  long int D.23874;
  long int D.23875;
  unsigned char D.23878;
  long unsigned int D.23881;
  long unsigned int D.23882;
  struct MonoArray * D.23884;
  struct MonoDomain * domain;
  uintptr_t lengths[1];
  intptr_t * lower_bounds;
  int pcount;
  int rank;

  try
    {
      domain = mono_domain_get ();
      D.23868 = mono_method_signature (cm);
      D.23869 = D.23868->param_count;
      pcount = (int) D.23869;
      D.23870 = cm->klass;
      D.23871 = D.23870->rank;
      rank = (int) D.23871;
      D.23872 = (long unsigned int) length;
      lengths[0] = D.23872;
      D.23873 = rank != pcount;
      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", "jit-icalls.c", 697, "rank == pcount");
      <D.23877>:
      D.23870 = cm->klass;
      D.23878 = D.23870->byval_arg.type;
      if (D.23878 == 20) goto <D.23879>; else goto <D.23880>;
      <D.23879>:
      D.23881 = (long unsigned int) rank;
      D.23882 = D.23881 * 8;
      lower_bounds = __builtin_alloca (D.23882);
      D.23881 = (long unsigned int) rank;
      D.23882 = D.23881 * 8;
      memset (lower_bounds, 0, D.23882);
      goto <D.23883>;
      <D.23880>:
      lower_bounds = 0B;
      <D.23883>:
      D.23870 = cm->klass;
      D.23884 = mono_array_new_full (domain, D.23870, &lengths, lower_bounds);
      return D.23884;
    }
  finally
    {
      lengths = {CLOBBER};
    }
}


mono_array_new_2 (struct MonoMethod * cm, guint32 length1, guint32 length2)
{
  struct MonoMethodSignature * D.23887;
  short unsigned int D.23888;
  struct MonoClass * D.23889;
  unsigned char D.23890;
  long unsigned int D.23891;
  long unsigned int D.23892;
  _Bool D.23893;
  long int D.23894;
  long int D.23895;
  unsigned char D.23898;
  long unsigned int D.23901;
  long unsigned int D.23902;
  struct MonoArray * D.23904;
  struct MonoDomain * domain;
  uintptr_t lengths[2];
  intptr_t * lower_bounds;
  int pcount;
  int rank;

  try
    {
      domain = mono_domain_get ();
      D.23887 = mono_method_signature (cm);
      D.23888 = D.23887->param_count;
      pcount = (int) D.23888;
      D.23889 = cm->klass;
      D.23890 = D.23889->rank;
      rank = (int) D.23890;
      D.23891 = (long unsigned int) length1;
      lengths[0] = D.23891;
      D.23892 = (long unsigned int) length2;
      lengths[1] = D.23892;
      D.23893 = rank != pcount;
      D.23894 = (long int) D.23893;
      D.23895 = __builtin_expect (D.23894, 0);
      if (D.23895 != 0) goto <D.23896>; else goto <D.23897>;
      <D.23896>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "jit-icalls.c", 726, "rank == pcount");
      <D.23897>:
      D.23889 = cm->klass;
      D.23898 = D.23889->byval_arg.type;
      if (D.23898 == 20) goto <D.23899>; else goto <D.23900>;
      <D.23899>:
      D.23901 = (long unsigned int) rank;
      D.23902 = D.23901 * 8;
      lower_bounds = __builtin_alloca (D.23902);
      D.23901 = (long unsigned int) rank;
      D.23902 = D.23901 * 8;
      memset (lower_bounds, 0, D.23902);
      goto <D.23903>;
      <D.23900>:
      lower_bounds = 0B;
      <D.23903>:
      D.23889 = cm->klass;
      D.23904 = mono_array_new_full (domain, D.23889, &lengths, lower_bounds);
      return D.23904;
    }
  finally
    {
      lengths = {CLOBBER};
    }
}


mono_array_new_3 (struct MonoMethod * cm, guint32 length1, guint32 length2, guint32 length3)
{
  struct MonoMethodSignature * D.23907;
  short unsigned int D.23908;
  struct MonoClass * D.23909;
  unsigned char D.23910;
  long unsigned int D.23911;
  long unsigned int D.23912;
  long unsigned int D.23913;
  _Bool D.23914;
  long int D.23915;
  long int D.23916;
  unsigned char D.23919;
  long unsigned int D.23922;
  long unsigned int D.23923;
  struct MonoArray * D.23925;
  struct MonoDomain * domain;
  uintptr_t lengths[3];
  intptr_t * lower_bounds;
  int pcount;
  int rank;

  try
    {
      domain = mono_domain_get ();
      D.23907 = mono_method_signature (cm);
      D.23908 = D.23907->param_count;
      pcount = (int) D.23908;
      D.23909 = cm->klass;
      D.23910 = D.23909->rank;
      rank = (int) D.23910;
      D.23911 = (long unsigned int) length1;
      lengths[0] = D.23911;
      D.23912 = (long unsigned int) length2;
      lengths[1] = D.23912;
      D.23913 = (long unsigned int) length3;
      lengths[2] = D.23913;
      D.23914 = rank != pcount;
      D.23915 = (long int) D.23914;
      D.23916 = __builtin_expect (D.23915, 0);
      if (D.23916 != 0) goto <D.23917>; else goto <D.23918>;
      <D.23917>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "jit-icalls.c", 756, "rank == pcount");
      <D.23918>:
      D.23909 = cm->klass;
      D.23919 = D.23909->byval_arg.type;
      if (D.23919 == 20) goto <D.23920>; else goto <D.23921>;
      <D.23920>:
      D.23922 = (long unsigned int) rank;
      D.23923 = D.23922 * 8;
      lower_bounds = __builtin_alloca (D.23923);
      D.23922 = (long unsigned int) rank;
      D.23923 = D.23922 * 8;
      memset (lower_bounds, 0, D.23923);
      goto <D.23924>;
      <D.23921>:
      lower_bounds = 0B;
      <D.23924>:
      D.23909 = cm->klass;
      D.23925 = mono_array_new_full (domain, D.23909, &lengths, lower_bounds);
      return D.23925;
    }
  finally
    {
      lengths = {CLOBBER};
    }
}


mono_array_new_4 (struct MonoMethod * cm, guint32 length1, guint32 length2, guint32 length3, guint32 length4)
{
  struct MonoMethodSignature * D.23928;
  short unsigned int D.23929;
  struct MonoClass * D.23930;
  unsigned char D.23931;
  long unsigned int D.23932;
  long unsigned int D.23933;
  long unsigned int D.23934;
  long unsigned int D.23935;
  _Bool D.23936;
  long int D.23937;
  long int D.23938;
  unsigned char D.23941;
  long unsigned int D.23944;
  long unsigned int D.23945;
  struct MonoArray * D.23947;
  struct MonoDomain * domain;
  uintptr_t lengths[4];
  intptr_t * lower_bounds;
  int pcount;
  int rank;

  try
    {
      domain = mono_domain_get ();
      D.23928 = mono_method_signature (cm);
      D.23929 = D.23928->param_count;
      pcount = (int) D.23929;
      D.23930 = cm->klass;
      D.23931 = D.23930->rank;
      rank = (int) D.23931;
      D.23932 = (long unsigned int) length1;
      lengths[0] = D.23932;
      D.23933 = (long unsigned int) length2;
      lengths[1] = D.23933;
      D.23934 = (long unsigned int) length3;
      lengths[2] = D.23934;
      D.23935 = (long unsigned int) length4;
      lengths[3] = D.23935;
      D.23936 = rank != pcount;
      D.23937 = (long int) D.23936;
      D.23938 = __builtin_expect (D.23937, 0);
      if (D.23938 != 0) goto <D.23939>; else goto <D.23940>;
      <D.23939>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "jit-icalls.c", 787, "rank == pcount");
      <D.23940>:
      D.23930 = cm->klass;
      D.23941 = D.23930->byval_arg.type;
      if (D.23941 == 20) goto <D.23942>; else goto <D.23943>;
      <D.23942>:
      D.23944 = (long unsigned int) rank;
      D.23945 = D.23944 * 8;
      lower_bounds = __builtin_alloca (D.23945);
      D.23944 = (long unsigned int) rank;
      D.23945 = D.23944 * 8;
      memset (lower_bounds, 0, D.23945);
      goto <D.23946>;
      <D.23943>:
      lower_bounds = 0B;
      <D.23946>:
      D.23930 = cm->klass;
      D.23947 = mono_array_new_full (domain, D.23930, &lengths, lower_bounds);
      return D.23947;
    }
  finally
    {
      lengths = {CLOBBER};
    }
}


mono_class_static_field_address (struct MonoDomain * domain, struct MonoClassField * field)
{
  struct MonoClass * D.23950;
  unsigned char D.23951;
  unsigned char D.23952;
  struct GHashTable * D.23957;
  long int addr.1;
  unsigned int D.23961;
  void * D.23962;
  int D.23963;
  sizetype D.23964;
  void * D.23965;
  struct MonoVTable * vtable;
  void * addr;

  D.23950 = field->parent;
  mono_class_init (D.23950);
  D.23950 = field->parent;
  vtable = mono_class_vtable_full (domain, D.23950, 1);
  D.23951 = BIT_FIELD_REF <*vtable, 8, 344>;
  D.23952 = D.23951 & 2;
  if (D.23952 == 0) goto <D.23953>; else goto <D.23954>;
  <D.23953>:
  mono_runtime_class_init (vtable);
  <D.23954>:
  D.23957 = domain->special_static_fields;
  if (D.23957 != 0B) goto <D.23958>; else goto <D.23955>;
  <D.23958>:
  D.23957 = domain->special_static_fields;
  addr = monoeg_g_hash_table_lookup (D.23957, field);
  if (addr != 0B) goto <D.23959>; else goto <D.23955>;
  <D.23959>:
  addr.1 = (long int) addr;
  D.23961 = (unsigned int) addr.1;
  addr = mono_get_special_static_data (D.23961);
  goto <D.23956>;
  <D.23955>:
  D.23962 = mono_vtable_get_static_field_data (vtable);
  D.23963 = field->offset;
  D.23964 = (sizetype) D.23963;
  addr = D.23962 + D.23964;
  <D.23956>:
  D.23965 = addr;
  return D.23965;
}


mono_ldtoken_wrapper (struct MonoImage * image, int token, struct MonoGenericContext * context)
{
  unsigned int token.2;
  struct MonoClass * handle_class.3;
  void * D.23969;
  struct MonoClass * handle_class;
  void * res;

  try
    {
      token.2 = (unsigned int) token;
      res = mono_ldtoken (image, token.2, &handle_class, context);
      handle_class.3 = handle_class;
      mono_class_init (handle_class.3);
      D.23969 = res;
      return D.23969;
    }
  finally
    {
      handle_class = {CLOBBER};
    }
}


mono_ldtoken_wrapper_generic_shared (struct MonoImage * image, int token, struct MonoMethod * method)
{
  unsigned char D.23972;
  unsigned char D.23973;
  _Bool D.23977;
  long int D.23978;
  long int D.23979;
  void * D.23982;
  struct MonoMethodSignature * sig;
  struct MonoGenericContext * generic_context;

  sig = mono_method_signature (method);
  D.23972 = BIT_FIELD_REF <*sig, 8, 120>;
  D.23973 = D.23972 & 2;
  if (D.23973 != 0) goto <D.23974>; else goto <D.23975>;
  <D.23974>:
  generic_context = mono_method_get_context (method);
  goto <D.23976>;
  <D.23975>:
  {
    struct MonoGenericContainer * generic_container;

    generic_container = mono_method_get_generic_container (method);
    D.23977 = generic_container == 0B;
    D.23978 = (long int) D.23977;
    D.23979 = __builtin_expect (D.23978, 0);
    if (D.23979 != 0) goto <D.23980>; else goto <D.23981>;
    <D.23980>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "jit-icalls.c", 848, "generic_container");
    <D.23981>:
    generic_context = &generic_container->context;
  }
  <D.23976>:
  D.23982 = mono_ldtoken_wrapper (image, token, generic_context);
  return D.23982;
}


mono_fconv_u8 (double v)
{
  guint64 D.23984;

  D.23984 = (guint64) v;
  return D.23984;
}


mono_fconv_u4 (double v)
{
  int D.23988;
  int D.23990;
  guint32 D.23991;

  D.23988 = __isinf (v);
  if (D.23988 != 0) goto <D.23986>; else goto <D.23989>;
  <D.23989>:
  D.23990 = __isnan (v);
  if (D.23990 != 0) goto <D.23986>; else goto <D.23987>;
  <D.23986>:
  D.23991 = 0;
  return D.23991;
  <D.23987>:
  D.23991 = (guint32) v;
  return D.23991;
}


mono_fconv_ovf_i8 (double v)
{
  int D.23995;
  double D.23997;
  double D.23998;
  struct MonoException * D.23999;
  gint64 D.24000;
  gint64 res;

  res = (gint64) v;
  D.23995 = __isnan (v);
  if (D.23995 != 0) goto <D.23993>; else goto <D.23996>;
  <D.23996>:
  D.23997 = trunc (v);
  D.23998 = (double) res;
  if (D.23997 != D.23998) goto <D.23993>; else goto <D.23994>;
  <D.23993>:
  D.23999 = mono_get_exception_overflow ();
  mono_raise_exception (D.23999);
  <D.23994>:
  D.24000 = res;
  return D.24000;
}


mono_fconv_ovf_u8 (double v)
{
  int D.24004;
  double D.24006;
  double D.24007;
  struct MonoException * D.24008;
  guint64 D.24009;
  guint64 res;

  res = (guint64) v;
  D.24004 = __isnan (v);
  if (D.24004 != 0) goto <D.24002>; else goto <D.24005>;
  <D.24005>:
  D.24006 = trunc (v);
  D.24007 = (double) res;
  if (D.24006 != D.24007) goto <D.24002>; else goto <D.24003>;
  <D.24002>:
  D.24008 = mono_get_exception_overflow ();
  mono_raise_exception (D.24008);
  <D.24003>:
  D.24009 = res;
  return D.24009;
}


mono_conv_to_r8_un (guint32 a)
{
  double D.24011;

  D.24011 = (double) a;
  return D.24011;
}


mono_helper_compile_generic_method (struct MonoObject * obj, struct MonoMethod * method, void * * this_arg)
{
  int D.24013;
  int D.24014;
  struct MonoException * D.24017;
  struct MonoClass * D.24018;
  struct MonoGenericContainer * D.24019;
  _Bool D.24020;
  long int D.24021;
  long int D.24022;
  int iftmp.4;
  struct MonoGenericClass * D.24028;
  struct MonoGenericInst * D.24030;
  unsigned char D.24031;
  unsigned char D.24032;
  _Bool D.24034;
  long int D.24035;
  long int D.24036;
  int iftmp.5;
  struct MonoGenericInst * D.24042;
  unsigned char D.24044;
  unsigned char D.24045;
  _Bool D.24047;
  long int D.24048;
  long int D.24049;
  int D.24052;
  struct MonoVTable * D.24053;
  struct MonoClass * D.24054;
  unsigned char D.24055;
  unsigned char D.24056;
  void * D.24059;
  void * D.24061;
  struct MonoMethod * vmethod;
  void * addr;
  struct MonoGenericContext * context;

  context = mono_method_get_context (method);
  D.24013 = mono_jit_stats.generic_virtual_invocations;
  D.24014 = D.24013 + 1;
  mono_jit_stats.generic_virtual_invocations = D.24014;
  if (obj == 0B) goto <D.24015>; else goto <D.24016>;
  <D.24015>:
  D.24017 = mono_get_exception_null_reference ();
  mono_raise_exception (D.24017);
  <D.24016>:
  vmethod = mono_object_get_virtual_method (obj, method);
  D.24018 = vmethod->klass;
  D.24019 = D.24018->generic_container;
  D.24020 = D.24019 != 0B;
  D.24021 = (long int) D.24020;
  D.24022 = __builtin_expect (D.24021, 0);
  if (D.24022 != 0) goto <D.24023>; else goto <D.24024>;
  <D.24023>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "jit-icalls.c", 993, "!vmethod->klass->generic_container");
  <D.24024>:
  D.24018 = vmethod->klass;
  D.24028 = D.24018->generic_class;
  if (D.24028 != 0B) goto <D.24029>; else goto <D.24026>;
  <D.24029>:
  D.24018 = vmethod->klass;
  D.24028 = D.24018->generic_class;
  D.24030 = D.24028->context.class_inst;
  D.24031 = BIT_FIELD_REF <*D.24030, 8, 48>;
  D.24032 = D.24031 & 64;
  if (D.24032 != 0) goto <D.24033>; else goto <D.24026>;
  <D.24033>:
  iftmp.4 = 1;
  goto <D.24027>;
  <D.24026>:
  iftmp.4 = 0;
  <D.24027>:
  D.24034 = iftmp.4 != 0;
  D.24035 = (long int) D.24034;
  D.24036 = __builtin_expect (D.24035, 0);
  if (D.24036 != 0) goto <D.24037>; else goto <D.24038>;
  <D.24037>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "jit-icalls.c", 994, "!vmethod->klass->generic_class || !vmethod->klass->generic_class->context.class_inst->is_open");
  <D.24038>:
  D.24042 = context->method_inst;
  if (D.24042 != 0B) goto <D.24043>; else goto <D.24040>;
  <D.24043>:
  D.24042 = context->method_inst;
  D.24044 = BIT_FIELD_REF <*D.24042, 8, 48>;
  D.24045 = D.24044 & 64;
  if (D.24045 != 0) goto <D.24046>; else goto <D.24040>;
  <D.24046>:
  iftmp.5 = 1;
  goto <D.24041>;
  <D.24040>:
  iftmp.5 = 0;
  <D.24041>:
  D.24047 = iftmp.5 != 0;
  D.24048 = (long int) D.24047;
  D.24049 = __builtin_expect (D.24048, 0);
  if (D.24049 != 0) goto <D.24050>; else goto <D.24051>;
  <D.24050>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "jit-icalls.c", 995, "!context->method_inst || !context->method_inst->is_open");
  <D.24051>:
  addr = mono_compile_method (vmethod);
  D.24052 = mono_method_needs_static_rgctx_invoke (vmethod, 0);
  addr = mini_add_method_trampoline (0B, vmethod, addr, D.24052, 0);
  D.24053 = obj->vtable;
  D.24054 = D.24053->klass;
  D.24055 = BIT_FIELD_REF <*D.24054, 8, 256>;
  D.24056 = D.24055 & 8;
  if (D.24056 != 0) goto <D.24057>; else goto <D.24058>;
  <D.24057>:
  D.24059 = mono_object_unbox (obj);
  *this_arg = D.24059;
  goto <D.24060>;
  <D.24058>:
  *this_arg = obj;
  <D.24060>:
  D.24061 = addr;
  return D.24061;
}


mono_helper_ldstr (struct MonoImage * image, guint32 idx)
{
  struct MonoString * D.24063;
  struct MonoDomain * D.24064;

  D.24064 = mono_domain_get ();
  D.24063 = mono_ldstr (D.24064, image, idx);
  return D.24063;
}


mono_helper_ldstr_mscorlib (guint32 idx)
{
  struct MonoString * D.24066;
  struct MonoImage * D.24067;
  struct MonoDomain * D.24068;

  D.24067 = mono_defaults.corlib;
  D.24068 = mono_domain_get ();
  D.24066 = mono_ldstr (D.24068, D.24067, idx);
  return D.24066;
}


mono_helper_newobj_mscorlib (guint32 idx)
{
  unsigned int D.24070;
  struct MonoImage * D.24071;
  _Bool D.24072;
  long int D.24073;
  long int D.24074;
  struct MonoObject * D.24077;
  struct MonoDomain * D.24078;
  struct MonoClass * klass;

  D.24070 = idx | 33554432;
  D.24071 = mono_defaults.corlib;
  klass = mono_class_get (D.24071, D.24070);
  D.24072 = klass == 0B;
  D.24073 = (long int) D.24072;
  D.24074 = __builtin_expect (D.24073, 0);
  if (D.24074 != 0) goto <D.24075>; else goto <D.24076>;
  <D.24075>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "jit-icalls.c", 1027, "klass");
  <D.24076>:
  D.24078 = mono_domain_get ();
  D.24077 = mono_object_new (D.24078, klass);
  return D.24077;
}


mono_break ()
{

}


mono_create_corlib_exception_0 (guint32 token)
{
  struct MonoException * D.24080;
  struct MonoImage * D.24081;

  D.24081 = mono_defaults.corlib;
  D.24080 = mono_exception_from_token (D.24081, token);
  return D.24080;
}


mono_create_corlib_exception_1 (guint32 token, struct MonoString * arg)
{
  struct MonoException * D.24083;
  struct MonoImage * D.24084;

  D.24084 = mono_defaults.corlib;
  D.24083 = mono_exception_from_token_two_strings (D.24084, token, arg, 0B);
  return D.24083;
}


mono_create_corlib_exception_2 (guint32 token, struct MonoString * arg1, struct MonoString * arg2)
{
  struct MonoException * D.24086;
  struct MonoImage * D.24087;

  D.24087 = mono_defaults.corlib;
  D.24086 = mono_exception_from_token_two_strings (D.24087, token, arg1, arg2);
  return D.24086;
}


mono_object_castclass_unbox (struct MonoObject * obj, struct MonoClass * klass)
{
  struct MonoDebugOptions * D.24089;
  int D.24090;
  unsigned int mono_jit_tls_id.6;
  struct MonoObject * D.24096;
  unsigned char D.24097;
  unsigned char D.24098;
  struct MonoVTable * D.24101;
  struct MonoClass * D.24102;
  struct MonoClass * D.24103;
  struct MonoObject * D.24106;
  struct MonoDebugOptions * D.24109;
  int D.24110;
  struct MonoImage * D.24113;
  struct MonoException * D.24114;
  struct MonoJitTlsData * jit_tls;

  jit_tls = 0B;
  D.24089 = mini_get_debug_options ();
  D.24090 = D.24089->better_cast_details;
  if (D.24090 != 0) goto <D.24091>; else goto <D.24092>;
  <D.24091>:
  mono_jit_tls_id.6 = mono_jit_tls_id;
  jit_tls = pthread_getspecific (mono_jit_tls_id.6);
  jit_tls->class_cast_from = 0B;
  <D.24092>:
  if (obj == 0B) goto <D.24094>; else goto <D.24095>;
  <D.24094>:
  D.24096 = 0B;
  return D.24096;
  <D.24095>:
  D.24097 = BIT_FIELD_REF <*klass, 8, 256>;
  D.24098 = D.24097 & 16;
  if (D.24098 != 0) goto <D.24099>; else goto <D.24100>;
  <D.24099>:
  D.24101 = obj->vtable;
  D.24102 = D.24101->klass;
  D.24103 = klass->element_class;
  if (D.24102 == D.24103) goto <D.24104>; else goto <D.24105>;
  <D.24104>:
  D.24096 = obj;
  return D.24096;
  <D.24105>:
  <D.24100>:
  D.24106 = mono_object_isinst (obj, klass);
  if (D.24106 != 0B) goto <D.24107>; else goto <D.24108>;
  <D.24107>:
  D.24096 = obj;
  return D.24096;
  <D.24108>:
  D.24109 = mini_get_debug_options ();
  D.24110 = D.24109->better_cast_details;
  if (D.24110 != 0) goto <D.24111>; else goto <D.24112>;
  <D.24111>:
  D.24101 = obj->vtable;
  D.24102 = D.24101->klass;
  jit_tls->class_cast_from = D.24102;
  jit_tls->class_cast_to = klass;
  <D.24112>:
  D.24113 = mono_defaults.corlib;
  D.24114 = mono_exception_from_name (D.24113, "System", "InvalidCastException");
  mono_raise_exception (D.24114);
  D.24096 = 0B;
  return D.24096;
}


mono_object_castclass_with_cache (struct MonoObject * obj, struct MonoClass * klass, void * * cache)
{
  struct MonoDebugOptions * D.24116;
  int D.24117;
  unsigned int mono_jit_tls_id.7;
  struct MonoObject * D.24123;
  struct MonoObject * D.24126;
  struct MonoDebugOptions * D.24129;
  int D.24130;
  struct MonoVTable * D.24133;
  struct MonoClass * D.24134;
  struct MonoImage * D.24135;
  struct MonoException * D.24136;
  struct MonoJitTlsData * jit_tls;
  void * cached_vtable;
  void * obj_vtable;

  jit_tls = 0B;
  D.24116 = mini_get_debug_options ();
  D.24117 = D.24116->better_cast_details;
  if (D.24117 != 0) goto <D.24118>; else goto <D.24119>;
  <D.24118>:
  mono_jit_tls_id.7 = mono_jit_tls_id;
  jit_tls = pthread_getspecific (mono_jit_tls_id.7);
  jit_tls->class_cast_from = 0B;
  <D.24119>:
  if (obj == 0B) goto <D.24121>; else goto <D.24122>;
  <D.24121>:
  D.24123 = 0B;
  return D.24123;
  <D.24122>:
  cached_vtable = *cache;
  obj_vtable = obj->vtable;
  if (cached_vtable == obj_vtable) goto <D.24124>; else goto <D.24125>;
  <D.24124>:
  D.24123 = obj;
  return D.24123;
  <D.24125>:
  D.24126 = mono_object_isinst (obj, klass);
  if (D.24126 != 0B) goto <D.24127>; else goto <D.24128>;
  <D.24127>:
  *cache = obj_vtable;
  D.24123 = obj;
  return D.24123;
  <D.24128>:
  D.24129 = mini_get_debug_options ();
  D.24130 = D.24129->better_cast_details;
  if (D.24130 != 0) goto <D.24131>; else goto <D.24132>;
  <D.24131>:
  D.24133 = obj->vtable;
  D.24134 = D.24133->klass;
  jit_tls->class_cast_from = D.24134;
  jit_tls->class_cast_to = klass;
  <D.24132>:
  D.24135 = mono_defaults.corlib;
  D.24136 = mono_exception_from_name (D.24135, "System", "InvalidCastException");
  mono_raise_exception (D.24136);
  D.24123 = 0B;
  return D.24123;
}


mono_object_isinst_with_cache (struct MonoObject * obj, struct MonoClass * klass, void * * cache)
{
  struct MonoObject * D.24140;
  void * D.24141;
  struct MonoVTable * D.24142;
  long unsigned int D.24143;
  struct MonoObject * iftmp.8;
  long unsigned int D.24147;
  struct MonoObject * D.24151;
  void * obj_vtable.9;
  long unsigned int D.24155;
  void * D.24156;
  size_t cached_vtable;
  size_t obj_vtable;

  if (obj == 0B) goto <D.24138>; else goto <D.24139>;
  <D.24138>:
  D.24140 = 0B;
  return D.24140;
  <D.24139>:
  D.24141 = *cache;
  cached_vtable = (size_t) D.24141;
  D.24142 = obj->vtable;
  obj_vtable = (size_t) D.24142;
  D.24143 = cached_vtable & 18446744073709551614;
  if (D.24143 == obj_vtable) goto <D.24144>; else goto <D.24145>;
  <D.24144>:
  D.24147 = cached_vtable & 1;
  if (D.24147 == 0) goto <D.24148>; else goto <D.24149>;
  <D.24148>:
  iftmp.8 = obj;
  goto <D.24150>;
  <D.24149>:
  iftmp.8 = 0B;
  <D.24150>:
  D.24140 = iftmp.8;
  return D.24140;
  <D.24145>:
  D.24151 = mono_object_isinst (obj, klass);
  if (D.24151 != 0B) goto <D.24152>; else goto <D.24153>;
  <D.24152>:
  obj_vtable.9 = (void *) obj_vtable;
  *cache = obj_vtable.9;
  D.24140 = obj;
  return D.24140;
  <D.24153>:
  D.24155 = obj_vtable | 1;
  D.24156 = (void *) D.24155;
  *cache = D.24156;
  D.24140 = 0B;
  return D.24140;
}


mono_get_native_calli_wrapper (struct MonoImage * image, struct MonoMethodSignature * sig, void * func)
{
  short unsigned int D.24158;
  int D.24159;
  int D.24160;
  long unsigned int D.24161;
  long unsigned int D.24162;
  void * D.24163;
  struct MonoMarshalSpec * * mspecs;
  struct MonoMethodPInvoke piinfo;
  struct MonoMethod * m;

  try
    {
      D.24158 = sig->param_count;
      D.24159 = (int) D.24158;
      D.24160 = D.24159 + 1;
      D.24161 = (long unsigned int) D.24160;
      D.24162 = D.24161 * 8;
      mspecs = monoeg_malloc0 (D.24162);
      memset (&piinfo, 0, 56);
      m = mono_marshal_get_native_func_wrapper (image, sig, &piinfo, mspecs, func);
      D.24163 = mono_compile_method (m);
      return D.24163;
    }
  finally
    {
      piinfo = {CLOBBER};
    }
}


mono_gsharedvt_constrained_call (void * mp, struct MonoMethod * cmethod, struct MonoClass * klass, gboolean deref_arg, void * * args)
{
  _Bool D.24166;
  _Bool D.24167;
  _Bool D.24168;
  void * D.24171;
  void * D.24172;
  unsigned char D.24173;
  unsigned char D.24174;
  void * this_arg.10;
  struct MonoObject * D.24178;
  struct MonoMethod * m;
  void * this_arg;
  void * new_args[16];

  try
    {
      m = constrained_gsharedvt_call_setup (mp, cmethod, klass, &this_arg);
      D.24166 = args != 0B;
      D.24167 = deref_arg != 0;
      D.24168 = D.24166 & D.24167;
      if (D.24168 != 0) goto <D.24169>; else goto <D.24170>;
      <D.24169>:
      D.24171 = *args;
      D.24172 = MEM[(void * *)D.24171];
      new_args[0] = D.24172;
      args = &new_args;
      <D.24170>:
      D.24173 = BIT_FIELD_REF <*m, 8, 256>;
      D.24174 = D.24173 & 124;
      if (D.24174 == 24) goto <D.24175>; else goto <D.24176>;
      <D.24175>:
      args = &new_args;
      this_arg.10 = this_arg;
      *args = this_arg.10;
      this_arg = 0B;
      <D.24176>:
      this_arg.10 = this_arg;
      D.24178 = mono_runtime_invoke (m, this_arg.10, args, 0B);
      return D.24178;
    }
  finally
    {
      this_arg = {CLOBBER};
      new_args = {CLOBBER};
    }
}


constrained_gsharedvt_call_setup (void * mp, struct MonoMethod * cmethod, struct MonoClass * klass, void * * this_arg)
{
  unsigned int D.24181;
  unsigned int D.24182;
  struct MonoException * D.24185;
  struct MonoMethodSignature * D.24186;
  unsigned char D.24187;
  unsigned char D.24188;
  struct MonoMethod * * D.24192;
  _Bool D.24193;
  long int D.24194;
  long int D.24195;
  struct MonoClass * D.24198;
  unsigned int D.24199;
  unsigned int D.24200;
  _Bool D.24203;
  long int D.24204;
  long int D.24205;
  long unsigned int D.24208;
  long unsigned int D.24209;
  struct MonoMethod * * D.24210;
  unsigned char D.24214;
  unsigned char D.24215;
  struct MonoClass * D.24217;
  struct MonoClass * D.24218;
  struct MonoClass * D.24220;
  struct MonoClass * D.24221;
  struct MonoDomain * D.24223;
  struct MonoObject * D.24224;
  void * D.24228;
  struct MonoMethod * D.24229;
  struct MonoMethod * m;
  int vt_slot;

  D.24181 = klass->flags;
  D.24182 = D.24181 & 32;
  if (D.24182 != 0) goto <D.24183>; else goto <D.24184>;
  <D.24183>:
  D.24185 = mono_get_exception_execution_engine ("Not yet supported.");
  mono_raise_exception (D.24185);
  <D.24184>:
  D.24186 = mono_method_signature (cmethod);
  D.24187 = BIT_FIELD_REF <*D.24186, 8, 120>;
  D.24188 = D.24187 & 1;
  if (D.24188 != 0) goto <D.24189>; else goto <D.24190>;
  <D.24189>:
  m = mono_marshal_get_native_wrapper (cmethod, 1, 0);
  goto <D.24191>;
  <D.24190>:
  mono_class_setup_vtable (klass);
  D.24192 = klass->vtable;
  D.24193 = D.24192 == 0B;
  D.24194 = (long int) D.24193;
  D.24195 = __builtin_expect (D.24194, 0);
  if (D.24195 != 0) goto <D.24196>; else goto <D.24197>;
  <D.24196>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "jit-icalls.c", 1180, "klass->vtable");
  <D.24197>:
  vt_slot = mono_method_get_vtable_slot (cmethod);
  D.24198 = cmethod->klass;
  D.24199 = D.24198->flags;
  D.24200 = D.24199 & 32;
  if (D.24200 != 0) goto <D.24201>; else goto <D.24202>;
  <D.24201>:
  {
    int iface_offset;

    D.24198 = cmethod->klass;
    iface_offset = mono_class_interface_offset (klass, D.24198);
    D.24203 = iface_offset == -1;
    D.24204 = (long int) D.24203;
    D.24205 = __builtin_expect (D.24204, 0);
    if (D.24205 != 0) goto <D.24206>; else goto <D.24207>;
    <D.24206>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "jit-icalls.c", 1186, "iface_offset != -1");
    <D.24207>:
    vt_slot = vt_slot + iface_offset;
  }
  <D.24202>:
  D.24192 = klass->vtable;
  D.24208 = (long unsigned int) vt_slot;
  D.24209 = D.24208 * 8;
  D.24210 = D.24192 + D.24209;
  m = *D.24210;
  <D.24191>:
  D.24214 = BIT_FIELD_REF <*klass, 8, 256>;
  D.24215 = D.24214 & 8;
  if (D.24215 != 0) goto <D.24216>; else goto <D.24211>;
  <D.24216>:
  D.24217 = m->klass;
  D.24218 = mono_defaults.object_class;
  if (D.24217 == D.24218) goto <D.24212>; else goto <D.24219>;
  <D.24219>:
  D.24217 = m->klass;
  D.24220 = mono_defaults.enum_class;
  D.24221 = D.24220->parent;
  if (D.24217 == D.24221) goto <D.24212>; else goto <D.24222>;
  <D.24222>:
  D.24217 = m->klass;
  D.24220 = mono_defaults.enum_class;
  if (D.24217 == D.24220) goto <D.24212>; else goto <D.24211>;
  <D.24212>:
  D.24223 = mono_domain_get ();
  D.24224 = mono_value_box (D.24223, klass, mp);
  *this_arg = D.24224;
  goto <D.24213>;
  <D.24211>:
  D.24214 = BIT_FIELD_REF <*klass, 8, 256>;
  D.24215 = D.24214 & 8;
  if (D.24215 != 0) goto <D.24225>; else goto <D.24226>;
  <D.24225>:
  *this_arg = mp;
  goto <D.24227>;
  <D.24226>:
  D.24228 = MEM[(void * *)mp];
  *this_arg = D.24228;
  <D.24227>:
  <D.24213>:
  D.24229 = m;
  return D.24229;
}


mono_gsharedvt_value_copy (void * dest, void * src, struct MonoClass * klass)
{
  unsigned char D.24231;
  unsigned char D.24232;
  struct MonoObject * D.24236;

  D.24231 = BIT_FIELD_REF <*klass, 8, 256>;
  D.24232 = D.24231 & 8;
  if (D.24232 != 0) goto <D.24233>; else goto <D.24234>;
  <D.24233>:
  mono_value_copy (dest, src, klass);
  goto <D.24235>;
  <D.24234>:
  D.24236 = MEM[(struct MonoObject * *)src];
  mono_gc_wbarrier_generic_store (dest, D.24236);
  <D.24235>:
}


