mono_create_static_rgctx_trampoline (struct MonoMethod * m, void * addr)
{
  union mono_mutex_t * D.22761;
  _Bool D.22764;
  long int D.22765;
  long int D.22766;
  void * D.22769;
  struct GHashTable * D.22770;
  struct GHashTable * D.22773;
  _Bool D.22776;
  long int D.22777;
  long int D.22778;
  void * D.22783;
  int mono_aot_only.0;
  _Bool D.22790;
  long int D.22791;
  long int D.22792;
  _Bool D.22797;
  long int D.22798;
  long int D.22799;
  unsigned int static_rgctx_trampolines.1;
  unsigned int static_rgctx_trampolines.2;
  void * ctx;
  void * res;
  struct MonoDomain * domain;
  struct RgctxTrampInfo tmp_info;
  struct RgctxTrampInfo * info;

  try
    {
      ctx = mini_method_get_rgctx (m);
      domain = mono_domain_get ();
      {
        int ret;

        D.22761 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.22761);
        if (ret != 0) goto <D.22762>; else goto <D.22763>;
        <D.22762>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.22763>:
        D.22764 = ret != 0;
        D.22765 = (long int) D.22764;
        D.22766 = __builtin_expect (D.22765, 0);
        if (D.22766 != 0) goto <D.22767>; else goto <D.22768>;
        <D.22767>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 96, "ret == 0");
        <D.22768>:
      }
      D.22769 = domain->runtime_info;
      D.22770 = MEM[(struct MonoJitDomainInfo *)D.22769].static_rgctx_trampoline_hash;
      if (D.22770 == 0B) goto <D.22771>; else goto <D.22772>;
      <D.22771>:
      D.22769 = domain->runtime_info;
      D.22773 = monoeg_g_hash_table_new (rgctx_tramp_info_hash, rgctx_tramp_info_equal);
      MEM[(struct MonoJitDomainInfo *)D.22769].static_rgctx_trampoline_hash = D.22773;
      <D.22772>:
      tmp_info.m = m;
      tmp_info.addr = addr;
      D.22769 = domain->runtime_info;
      D.22770 = MEM[(struct MonoJitDomainInfo *)D.22769].static_rgctx_trampoline_hash;
      res = monoeg_g_hash_table_lookup (D.22770, &tmp_info);
      {
        int ret;

        D.22761 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.22761);
        if (ret != 0) goto <D.22774>; else goto <D.22775>;
        <D.22774>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.22775>:
        D.22776 = ret != 0;
        D.22777 = (long int) D.22776;
        D.22778 = __builtin_expect (D.22777, 0);
        if (D.22778 != 0) goto <D.22779>; else goto <D.22780>;
        <D.22779>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 103, "ret == 0");
        <D.22780>:
      }
      if (res != 0B) goto <D.22781>; else goto <D.22782>;
      <D.22781>:
      D.22783 = res;
      return D.22783;
      <D.22782>:
      mono_aot_only.0 = mono_aot_only;
      if (mono_aot_only.0 != 0) goto <D.22785>; else goto <D.22786>;
      <D.22785>:
      res = mono_aot_get_static_rgctx_trampoline (ctx, addr);
      goto <D.22787>;
      <D.22786>:
      res = mono_arch_get_static_rgctx_trampoline (m, ctx, addr);
      <D.22787>:
      {
        int ret;

        D.22761 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.22761);
        if (ret != 0) goto <D.22788>; else goto <D.22789>;
        <D.22788>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.22789>:
        D.22790 = ret != 0;
        D.22791 = (long int) D.22790;
        D.22792 = __builtin_expect (D.22791, 0);
        if (D.22792 != 0) goto <D.22793>; else goto <D.22794>;
        <D.22793>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 112, "ret == 0");
        <D.22794>:
      }
      info = mono_domain_alloc (domain, 16);
      info->m = m;
      info->addr = addr;
      D.22769 = domain->runtime_info;
      D.22770 = MEM[(struct MonoJitDomainInfo *)D.22769].static_rgctx_trampoline_hash;
      monoeg_g_hash_table_insert_replace (D.22770, info, res, 0);
      {
        int ret;

        D.22761 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.22761);
        if (ret != 0) goto <D.22795>; else goto <D.22796>;
        <D.22795>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.22796>:
        D.22797 = ret != 0;
        D.22798 = (long int) D.22797;
        D.22799 = __builtin_expect (D.22798, 0);
        if (D.22799 != 0) goto <D.22800>; else goto <D.22801>;
        <D.22800>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 118, "ret == 0");
        <D.22801>:
      }
      static_rgctx_trampolines.1 = static_rgctx_trampolines;
      static_rgctx_trampolines.2 = static_rgctx_trampolines.1 + 1;
      static_rgctx_trampolines = static_rgctx_trampolines.2;
      D.22783 = res;
      return D.22783;
    }
  finally
    {
      tmp_info = {CLOBBER};
    }
}


rgctx_tramp_info_equal (const void * ka, const void * kb)
{
  struct MonoMethod * D.22807;
  struct MonoMethod * D.22808;
  void * D.22810;
  void * D.22811;
  gint D.22813;
  const struct RgctxTrampInfo * i1;
  const struct RgctxTrampInfo * i2;

  i1 = ka;
  i2 = kb;
  D.22807 = i1->m;
  D.22808 = i2->m;
  if (D.22807 == D.22808) goto <D.22809>; else goto <D.22806>;
  <D.22809>:
  D.22810 = i1->addr;
  D.22811 = i2->addr;
  if (D.22810 == D.22811) goto <D.22812>; else goto <D.22806>;
  <D.22812>:
  D.22813 = 1;
  return D.22813;
  <D.22806>:
  D.22813 = 0;
  return D.22813;
}


rgctx_tramp_info_hash (const void * data)
{
  guint D.22815;
  struct MonoMethod * D.22816;
  long int D.22817;
  unsigned int D.22818;
  void * D.22819;
  long int D.22820;
  unsigned int D.22821;
  const struct RgctxTrampInfo * info;

  info = data;
  D.22816 = info->m;
  D.22817 = (long int) D.22816;
  D.22818 = (unsigned int) D.22817;
  D.22819 = info->addr;
  D.22820 = (long int) D.22819;
  D.22821 = (unsigned int) D.22820;
  D.22815 = D.22818 ^ D.22821;
  return D.22815;
}


mini_jit_info_is_gsharedvt (struct MonoJitInfo * ji)
{
  unsigned char D.22826;
  unsigned char D.22827;
  struct MonoGenericSharingContext * D.22829;
  gboolean * D.22830;
  struct MonoGenericSharingContext * D.22832;
  gboolean * D.22833;
  gboolean D.22834;

  if (ji != 0B) goto <D.22825>; else goto <D.22823>;
  <D.22825>:
  D.22826 = BIT_FIELD_REF <*ji, 8, 272>;
  D.22827 = D.22826 & 2;
  if (D.22827 != 0) goto <D.22828>; else goto <D.22823>;
  <D.22828>:
  D.22829 = mono_jit_info_get_generic_sharing_context (ji);
  D.22830 = D.22829->var_is_vt;
  if (D.22830 != 0B) goto <D.22824>; else goto <D.22831>;
  <D.22831>:
  D.22832 = mono_jit_info_get_generic_sharing_context (ji);
  D.22833 = D.22832->mvar_is_vt;
  if (D.22833 != 0B) goto <D.22824>; else goto <D.22823>;
  <D.22824>:
  D.22834 = 1;
  return D.22834;
  <D.22823>:
  D.22834 = 0;
  return D.22834;
}


mini_add_method_trampoline (struct MonoMethod * orig_method, struct MonoMethod * m, void * compiled_method, gboolean add_static_rgctx_tramp, gboolean add_unbox_tramp)
{
  void * D.22836;
  struct MonoDomain * D.22837;
  unsigned char D.22838;
  unsigned char D.22839;
  <unnamed type> D.22844;
  <unnamed type> D.22852;
  unsigned char D.22859;
  unsigned char D.22860;
  _Bool D.22861;
  long int D.22862;
  long int D.22863;
  int mono_aot_only.3;
  unsigned int unbox_trampolines.4;
  unsigned int unbox_trampolines.5;
  struct MonoMethodSignature * D.22878;
  int D.22879;
  _Bool D.22882;
  _Bool D.22883;
  _Bool D.22884;
  void * D.22887;
  void * addr;
  gboolean callee_gsharedvt;
  gboolean callee_array_helper;
  struct MonoMethod * jmethod;
  struct MonoJitInfo * ji;

  addr = compiled_method;
  jmethod = 0B;
  D.22836 = mono_get_addr_from_ftnptr (compiled_method);
  D.22837 = mono_domain_get ();
  ji = mini_jit_info_table_find (D.22837, D.22836, 0B);
  callee_gsharedvt = mini_jit_info_is_gsharedvt (ji);
  callee_array_helper = 0;
  D.22838 = BIT_FIELD_REF <*m, 8, 256>;
  D.22839 = D.22838 & 124;
  if (D.22839 == 28) goto <D.22840>; else goto <D.22841>;
  <D.22840>:
  {
    struct WrapperInfo * info;

    info = mono_marshal_get_wrapper_info (m);
    if (info != 0B) goto <D.22842>; else goto <D.22843>;
    <D.22842>:
    D.22844 = info->subtype;
    if (D.22844 == 21) goto <D.22845>; else goto <D.22846>;
    <D.22845>:
    callee_array_helper = 1;
    m = info->d.generic_array_helper.method;
    <D.22846>:
    <D.22843>:
  }
  goto <D.22847>;
  <D.22841>:
  D.22838 = BIT_FIELD_REF <*m, 8, 256>;
  D.22839 = D.22838 & 124;
  if (D.22839 == 100) goto <D.22848>; else goto <D.22849>;
  <D.22848>:
  {
    struct WrapperInfo * info;

    info = mono_marshal_get_wrapper_info (m);
    if (info != 0B) goto <D.22850>; else goto <D.22851>;
    <D.22850>:
    D.22852 = info->subtype;
    if (D.22852 == 17) goto <D.22853>; else goto <D.22854>;
    <D.22853>:
    m = info->d.synchronized_inner.method;
    <D.22854>:
    <D.22851>:
  }
  <D.22849>:
  <D.22847>:
  if (orig_method == 0B) goto <D.22855>; else goto <D.22856>;
  <D.22855>:
  orig_method = m;
  <D.22856>:
  if (callee_gsharedvt != 0) goto <D.22857>; else goto <D.22858>;
  <D.22857>:
  D.22859 = BIT_FIELD_REF <*m, 8, 264>;
  D.22860 = D.22859 & 16;
  D.22861 = D.22860 == 0;
  D.22862 = (long int) D.22861;
  D.22863 = __builtin_expect (D.22862, 0);
  if (D.22863 != 0) goto <D.22864>; else goto <D.22865>;
  <D.22864>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 324, "m->is_inflated");
  <D.22865>:
  <D.22858>:
  addr = compiled_method;
  if (add_unbox_tramp != 0) goto <D.22866>; else goto <D.22867>;
  <D.22866>:
  mono_aot_only.3 = mono_aot_only;
  if (mono_aot_only.3 != 0) goto <D.22869>; else goto <D.22870>;
  <D.22869>:
  addr = mono_aot_get_unbox_trampoline (m);
  goto <D.22871>;
  <D.22870>:
  unbox_trampolines.4 = unbox_trampolines;
  unbox_trampolines.5 = unbox_trampolines.4 + 1;
  unbox_trampolines = unbox_trampolines.5;
  addr = mono_arch_get_unbox_trampoline (m, addr);
  <D.22871>:
  <D.22867>:
  if (ji != 0B) goto <D.22874>; else goto <D.22875>;
  <D.22874>:
  jmethod = jinfo_get_method (ji);
  <D.22875>:
  if (callee_gsharedvt != 0) goto <D.22876>; else goto <D.22877>;
  <D.22876>:
  D.22878 = mono_method_signature (jmethod);
  D.22879 = mini_is_gsharedvt_variable_signature (D.22878);
  if (D.22879 != 0) goto <D.22880>; else goto <D.22881>;
  <D.22880>:
  {
    struct MonoGenericSharingContext * gsctx;
    struct MonoMethodSignature * sig;
    struct MonoMethodSignature * gsig;

    gsctx = mono_jit_info_get_generic_sharing_context (ji);
    sig = mono_method_signature (m);
    gsig = mono_method_signature (jmethod);
    addr = mini_get_gsharedvt_wrapper (1, addr, sig, gsig, gsctx, -1, 0);
  }
  <D.22881>:
  <D.22877>:
  D.22882 = add_static_rgctx_tramp != 0;
  D.22883 = callee_array_helper == 0;
  D.22884 = D.22882 & D.22883;
  if (D.22884 != 0) goto <D.22885>; else goto <D.22886>;
  <D.22885>:
  addr = mono_create_static_rgctx_trampoline (m, addr);
  <D.22886>:
  D.22887 = addr;
  return D.22887;
}


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

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


mono_magic_trampoline (mgreg_t * regs, guint8 * code, void * arg, guint8 * tramp)
{
  unsigned int trampoline_calls.6;
  unsigned int trampoline_calls.7;
  void * D.22893;

  trampoline_calls.6 = trampoline_calls;
  trampoline_calls.7 = trampoline_calls.6 + 1;
  trampoline_calls = trampoline_calls.7;
  D.22893 = common_call_trampoline (regs, code, arg, tramp, 0B, 0B, 0);
  return D.22893;
}


common_call_trampoline (mgreg_t * regs, guint8 * code, struct MonoMethod * m, guint8 * tramp, struct MonoVTable * vt, void * * vtable_slot, gboolean need_rgctx_tramp)
{
  _Bool D.22895;
  _Bool D.22896;
  _Bool D.22897;
  _Bool D.22898;
  _Bool D.22901;
  long int D.22902;
  long int D.22903;
  struct MonoVTable * D.22906;
  struct MonoClass * D.22907;
  struct MonoClass * D.22908;
  unsigned char D.22914;
  unsigned char D.22915;
  struct MonoGenericInst * D.22917;
  int variance_used.8;
  struct MonoClass * D.22922;
  int D.22923;
  _Bool D.22926;
  _Bool D.22927;
  _Bool D.22928;
  void * addr.9;
  struct MonoDomain * D.22932;
  int D.22933;
  void * D.22936;
  struct MonoDomain * D.22937;
  int D.22941;
  struct MonoGenericClass * D.22946;
  struct MonoGenericInst * D.22949;
  struct MonoGenericContainer * D.22951;
  _Bool D.22952;
  long int D.22953;
  long int D.22954;
  unsigned char D.22959;
  unsigned char D.22960;
  _Bool D.22961;
  long int D.22962;
  long int D.22963;
  struct MonoGenericInst * D.22966;
  _Bool D.22969;
  long int D.22970;
  long int D.22971;
  struct MonoGenericContext * D.22977;
  struct MonoGenericInst * D.22978;
  struct MonoVTable * D.22980;
  short unsigned int D.22984;
  int D.22985;
  int D.22986;
  unsigned char D.22988;
  unsigned char D.22989;
  struct MonoVTable * D.22990;
  struct MonoClass * D.22991;
  unsigned char D.22992;
  unsigned char D.22993;
  _Bool D.22994;
  long int D.22995;
  long int D.22996;
  struct MonoClass * * D.23001;
  short unsigned int D.23002;
  long unsigned int D.23003;
  long unsigned int D.23004;
  sizetype D.23005;
  struct MonoClass * * D.23006;
  _Bool D.23007;
  _Bool D.23008;
  int D.23009;
  _Bool D.23010;
  long int D.23011;
  long int D.23012;
  long int vtable_slot.10;
  long int vt.11;
  long int D.23019;
  long int D.23020;
  _Bool D.23021;
  long int D.23022;
  long int D.23023;
  struct MonoClass * D.23026;
  struct MonoMethod * * D.23027;
  long unsigned int D.23028;
  long unsigned int D.23029;
  struct MonoMethod * * D.23030;
  unsigned char D.23035;
  unsigned char D.23036;
  struct MonoGenericClass * D.23040;
  struct MonoGenericInst * D.23043;
  struct MonoGenericContainer * D.23045;
  struct MonoGenericInst * D.23048;
  long int D.23049;
  long int D.23050;
  _Bool D.23053;
  long int D.23054;
  long int D.23055;
  struct MonoClass * D.23058;
  _Bool D.23059;
  long int D.23060;
  long int D.23061;
  unsigned char D.23064;
  unsigned char D.23065;
  short unsigned int D.23069;
  int D.23070;
  int D.23071;
  int D.23076;
  _Bool D.23079;
  long int D.23080;
  long int D.23081;
  _Bool D.23084;
  _Bool D.23085;
  _Bool D.23086;
  struct MonoClass * D.23089;
  unsigned char D.23090;
  unsigned char D.23091;
  int need_rgctx_tramp.12;
  void * addr.13;
  struct MonoMethod * iftmp.14;
  struct MonoDomain * D.23109;
  void * D.23112;
  struct GHashTable * D.23113;
  union mono_mutex_t * D.23116;
  _Bool D.23119;
  long int D.23120;
  long int D.23121;
  _Bool D.23128;
  long int D.23129;
  long int D.23130;
  int D.23139;
  struct MonoDomain * D.23141;
  int D.23142;
  void * D.23143;
  _Bool D.23144;
  long int D.23145;
  long int D.23146;
  void * D.23149;
  void * D.23155;
  struct MonoDomain * D.23156;
  struct MonoDomain * D.23159;
  _Bool D.23160;
  _Bool D.23161;
  _Bool D.23162;
  unsigned char D.23167;
  unsigned char D.23168;
  unsigned char D.23171;
  unsigned char D.23172;
  void * D.23182;
  struct MonoDomain * D.23183;
  struct MonoDomain * D.23186;
  int D.23197;
  void * D.23200;
  void * addr;
  void * compiled_method;
  gboolean generic_shared;
  gboolean need_unbox_tramp;
  struct MonoMethod * declaring;
  struct MonoMethod * generic_virtual;
  struct MonoMethod * variant_iface;
  struct MonoMethod * orig_method;
  int context_used;
  gboolean virtual;
  gboolean variance_used;
  void * * orig_vtable_slot;
  void * * vtable_slot_to_patch;
  struct MonoJitInfo * ji;

  try
    {
      generic_shared = 0;
      need_unbox_tramp = 0;
      declaring = 0B;
      generic_virtual = 0B;
      variant_iface = 0B;
      orig_method = 0B;
      variance_used = 0;
      vtable_slot_to_patch = 0B;
      ji = 0B;
      D.22895 = vtable_slot > vt;
      virtual = (gboolean) D.22895;
      orig_vtable_slot = vtable_slot;
      vtable_slot_to_patch = vtable_slot;
      D.22896 = vt != 0B;
      D.22897 = vtable_slot < vt;
      D.22898 = D.22896 & D.22897;
      if (D.22898 != 0) goto <D.22899>; else goto <D.22900>;
      <D.22899>:
      {
        struct MonoMethod * impl_method;
        struct MonoObject * this_arg;

        try
          {
            impl_method = 0B;
            m = mono_arch_find_imt_method (regs, code);
            vtable_slot = orig_vtable_slot;
            D.22901 = vtable_slot == 0B;
            D.22902 = (long int) D.22901;
            D.22903 = __builtin_expect (D.22902, 0);
            if (D.22903 != 0) goto <D.22904>; else goto <D.22905>;
            <D.22904>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 401, "vtable_slot");
            <D.22905>:
            orig_method = m;
            this_arg = mono_arch_get_this_arg_from_call (regs, code);
            D.22906 = this_arg->vtable;
            D.22907 = D.22906->klass;
            D.22908 = mono_defaults.transparent_proxy_class;
            if (D.22907 == D.22908) goto <D.22909>; else goto <D.22910>;
            <D.22909>:
            m = mono_object_get_virtual_method (this_arg, m);
            vtable_slot_to_patch = 0B;
            goto <D.22911>;
            <D.22910>:
            {
              gboolean lookup_aot;

              D.22914 = BIT_FIELD_REF <*m, 8, 264>;
              D.22915 = D.22914 & 16;
              if (D.22915 != 0) goto <D.22916>; else goto <D.22912>;
              <D.22916>:
              D.22917 = MEM[(struct MonoMethodInflated *)m].context.method_inst;
              if (D.22917 != 0B) goto <D.22918>; else goto <D.22912>;
              <D.22918>:
              generic_virtual = m;
              need_rgctx_tramp = 1;
              goto <D.22913>;
              <D.22912>:
              variance_used.8 = variance_used;
              if (variance_used.8 != 0) goto <D.22920>; else goto <D.22921>;
              <D.22920>:
              D.22922 = m->klass;
              D.22923 = mono_class_has_variant_generic_params (D.22922);
              if (D.22923 != 0) goto <D.22924>; else goto <D.22925>;
              <D.22924>:
              variant_iface = m;
              <D.22925>:
              <D.22921>:
              <D.22913>:
              addr = 0B;
              D.22926 = generic_virtual == 0B;
              D.22927 = variant_iface == 0B;
              D.22928 = D.22926 & D.22927;
              lookup_aot = (gboolean) D.22928;
              vtable_slot = mono_convert_imt_slot_to_vtable_slot (vtable_slot, regs, code, m, lookup_aot, &impl_method, &need_rgctx_tramp, &variance_used, &addr);
              vtable_slot_to_patch = vtable_slot;
              addr.9 = addr;
              if (addr.9 != 0B) goto <D.22930>; else goto <D.22931>;
              <D.22930>:
              D.22932 = mono_domain_get ();
              D.22933 = mono_domain_owns_vtable_slot (D.22932, vtable_slot);
              if (D.22933 != 0) goto <D.22934>; else goto <D.22935>;
              <D.22934>:
              addr.9 = addr;
              *vtable_slot = addr.9;
              <D.22935>:
              addr.9 = addr;
              D.22937 = mono_domain_get ();
              D.22936 = mono_create_ftnptr (D.22937, addr.9);
              return D.22936;
              <D.22931>:
              m = impl_method;
            }
            <D.22911>:
          }
        finally
          {
            impl_method = {CLOBBER};
          }
      }
      <D.22900>:
      if (virtual != 0) goto <D.22940>; else goto <D.22938>;
      <D.22940>:
      D.22941 = is_generic_method_definition (m);
      if (D.22941 != 0) goto <D.22942>; else goto <D.22938>;
      <D.22942>:
      {
        struct MonoGenericContext context;
        struct MonoMethod * declaring;

        try
          {
            context.class_inst = 0B;
            context.method_inst = 0B;
            D.22914 = BIT_FIELD_REF <*m, 8, 264>;
            D.22915 = D.22914 & 16;
            if (D.22915 != 0) goto <D.22943>; else goto <D.22944>;
            <D.22943>:
            declaring = mono_method_get_declaring_generic_method (m);
            goto <D.22945>;
            <D.22944>:
            declaring = m;
            <D.22945>:
            D.22922 = m->klass;
            D.22946 = D.22922->generic_class;
            if (D.22946 != 0B) goto <D.22947>; else goto <D.22948>;
            <D.22947>:
            D.22922 = m->klass;
            D.22946 = D.22922->generic_class;
            D.22949 = D.22946->context.class_inst;
            context.class_inst = D.22949;
            goto <D.22950>;
            <D.22948>:
            D.22922 = m->klass;
            D.22951 = D.22922->generic_container;
            D.22952 = D.22951 != 0B;
            D.22953 = (long int) D.22952;
            D.22954 = __builtin_expect (D.22953, 0);
            if (D.22954 != 0) goto <D.22955>; else goto <D.22956>;
            <D.22955>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 464, "!m->klass->generic_container");
            <D.22956>:
            <D.22950>:
            generic_virtual = mono_arch_find_imt_method (regs, code);
            if (generic_virtual != 0B) goto <D.22957>; else goto <D.22958>;
            <D.22957>:
            D.22959 = BIT_FIELD_REF <*generic_virtual, 8, 264>;
            D.22960 = D.22959 & 16;
            D.22961 = D.22960 == 0;
            D.22962 = (long int) D.22961;
            D.22963 = __builtin_expect (D.22962, 0);
            if (D.22963 != 0) goto <D.22964>; else goto <D.22965>;
            <D.22964>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 470, "generic_virtual->is_inflated");
            <D.22965>:
            D.22966 = MEM[(struct MonoMethodInflated *)generic_virtual].context.method_inst;
            context.method_inst = D.22966;
            <D.22958>:
            m = mono_class_inflate_generic_method (declaring, &context);
            need_rgctx_tramp = 1;
          }
        finally
          {
            context = {CLOBBER};
          }
      }
      goto <D.22939>;
      <D.22938>:
      context_used = mono_method_check_context_used (m);
      if (context_used != 0) goto <D.22967>; else goto <D.22968>;
      <D.22967>:
      {
        struct MonoClass * klass;
        struct MonoMethod * actual_method;
        struct MonoVTable * vt;
        struct MonoGenericInst * method_inst;

        klass = 0B;
        actual_method = 0B;
        vt = 0B;
        method_inst = 0B;
        vtable_slot = 0B;
        generic_shared = 1;
        D.22969 = code == 0B;
        D.22970 = (long int) D.22969;
        D.22971 = __builtin_expect (D.22970, 0);
        if (D.22971 != 0) goto <D.22972>; else goto <D.22973>;
        <D.22972>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 486, "code");
        <D.22973>:
        D.22914 = BIT_FIELD_REF <*m, 8, 264>;
        D.22915 = D.22914 & 16;
        if (D.22915 != 0) goto <D.22976>; else goto <D.22974>;
        <D.22976>:
        D.22977 = mono_method_get_context (m);
        D.22978 = D.22977->method_inst;
        if (D.22978 != 0B) goto <D.22979>; else goto <D.22974>;
        <D.22979>:
        {
          struct MonoMethodRuntimeGenericContext * mrgctx;

          mrgctx = mono_arch_find_static_call_vtable (regs, code);
          D.22980 = mrgctx->class_vtable;
          klass = D.22980->klass;
          method_inst = mrgctx->method_inst;
        }
        goto <D.22975>;
        <D.22974>:
        D.22984 = m->flags;
        D.22985 = (int) D.22984;
        D.22986 = D.22985 & 16;
        if (D.22986 != 0) goto <D.22981>; else goto <D.22987>;
        <D.22987>:
        D.22922 = m->klass;
        D.22988 = BIT_FIELD_REF <*D.22922, 8, 256>;
        D.22989 = D.22988 & 8;
        if (D.22989 != 0) goto <D.22981>; else goto <D.22982>;
        <D.22981>:
        {
          struct MonoVTable * vtable;

          vtable = mono_arch_find_static_call_vtable (regs, code);
          klass = vtable->klass;
        }
        goto <D.22983>;
        <D.22982>:
        {
          struct MonoObject * this_argument;

          this_argument = mono_arch_get_this_arg_from_call (regs, code);
          vt = this_argument->vtable;
          vtable_slot = orig_vtable_slot;
          D.22990 = this_argument->vtable;
          D.22991 = D.22990->klass;
          D.22992 = BIT_FIELD_REF <*D.22991, 8, 256>;
          D.22993 = D.22992 & 1;
          D.22994 = D.22993 == 0;
          D.22995 = (long int) D.22994;
          D.22996 = __builtin_expect (D.22995, 0);
          if (D.22996 != 0) goto <D.22997>; else goto <D.22998>;
          <D.22997>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 512, "this_argument->vtable->klass->inited");
          <D.22998>:
          if (vtable_slot == 0B) goto <D.22999>; else goto <D.23000>;
          <D.22999>:
          D.22990 = this_argument->vtable;
          D.22991 = D.22990->klass;
          mono_class_setup_supertypes (D.22991);
          D.22990 = this_argument->vtable;
          D.22991 = D.22990->klass;
          D.23001 = D.22991->supertypes;
          D.22922 = m->klass;
          D.23002 = D.22922->idepth;
          D.23003 = (long unsigned int) D.23002;
          D.23004 = D.23003 * 8;
          D.23005 = D.23004 + 18446744073709551608;
          D.23006 = D.23001 + D.23005;
          klass = *D.23006;
          <D.23000>:
        }
        <D.22983>:
        <D.22975>:
        D.22901 = vtable_slot == 0B;
        D.23007 = klass == 0B;
        D.23008 = D.22901 & D.23007;
        D.23009 = (int) D.23008;
        D.23010 = D.23009 != 0;
        D.23011 = (long int) D.23010;
        D.23012 = __builtin_expect (D.23011, 0);
        if (D.23012 != 0) goto <D.23013>; else goto <D.23014>;
        <D.23013>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 524, "vtable_slot || klass");
        <D.23014>:
        if (vtable_slot != 0B) goto <D.23015>; else goto <D.23016>;
        <D.23015>:
        {
          int displacement;

          vtable_slot.10 = (long int) vtable_slot;
          vt.11 = (long int) vt;
          D.23019 = vtable_slot.10 - vt.11;
          D.23020 = D.23019 /[ex] 8;
          displacement = (int) D.23020;
          monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-trampolines.c", 529);
          D.23021 = displacement <= 0;
          D.23022 = (long int) D.23021;
          D.23023 = __builtin_expect (D.23022, 0);
          if (D.23023 != 0) goto <D.23024>; else goto <D.23025>;
          <D.23024>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 531, "displacement > 0");
          <D.23025>:
          D.23026 = vt->klass;
          D.23027 = D.23026->vtable;
          D.23028 = (long unsigned int) displacement;
          D.23029 = D.23028 * 8;
          D.23030 = D.23027 + D.23029;
          actual_method = *D.23030;
        }
        <D.23016>:
        if (method_inst != 0B) goto <D.23031>; else goto <D.23034>;
        <D.23034>:
        D.23035 = BIT_FIELD_REF <*m, 8, 256>;
        D.23036 = D.23035 & 124;
        if (D.23036 != 0) goto <D.23031>; else goto <D.23032>;
        <D.23031>:
        {
          struct MonoGenericContext context;

          try
            {
              context.class_inst = 0B;
              context.method_inst = 0B;
              D.22914 = BIT_FIELD_REF <*m, 8, 264>;
              D.22915 = D.22914 & 16;
              if (D.22915 != 0) goto <D.23037>; else goto <D.23038>;
              <D.23037>:
              declaring = mono_method_get_declaring_generic_method (m);
              goto <D.23039>;
              <D.23038>:
              declaring = m;
              <D.23039>:
              D.23040 = klass->generic_class;
              if (D.23040 != 0B) goto <D.23041>; else goto <D.23042>;
              <D.23041>:
              D.23040 = klass->generic_class;
              D.23043 = D.23040->context.class_inst;
              context.class_inst = D.23043;
              goto <D.23044>;
              <D.23042>:
              D.23045 = klass->generic_container;
              if (D.23045 != 0B) goto <D.23046>; else goto <D.23047>;
              <D.23046>:
              D.23045 = klass->generic_container;
              D.23048 = D.23045->context.class_inst;
              context.class_inst = D.23048;
              <D.23047>:
              <D.23044>:
              context.method_inst = method_inst;
              actual_method = mono_class_inflate_generic_method (declaring, &context);
            }
          finally
            {
              context = {CLOBBER};
            }
        }
        goto <D.23033>;
        <D.23032>:
        actual_method = mono_class_get_method_generic (klass, m);
        <D.23033>:
        D.23007 = klass == 0B;
        D.23049 = (long int) D.23007;
        D.23050 = __builtin_expect (D.23049, 0);
        if (D.23050 != 0) goto <D.23051>; else goto <D.23052>;
        <D.23051>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 555, "klass");
        <D.23052>:
        D.23053 = actual_method == 0B;
        D.23054 = (long int) D.23053;
        D.23055 = __builtin_expect (D.23054, 0);
        if (D.23055 != 0) goto <D.23056>; else goto <D.23057>;
        <D.23056>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 556, "actual_method");
        <D.23057>:
        D.23058 = actual_method->klass;
        D.23059 = D.23058 != klass;
        D.23060 = (long int) D.23059;
        D.23061 = __builtin_expect (D.23060, 0);
        if (D.23061 != 0) goto <D.23062>; else goto <D.23063>;
        <D.23062>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 557, "actual_method->klass == klass");
        <D.23063>:
        D.23064 = BIT_FIELD_REF <*actual_method, 8, 264>;
        D.23065 = D.23064 & 16;
        if (D.23065 != 0) goto <D.23066>; else goto <D.23067>;
        <D.23066>:
        declaring = mono_method_get_declaring_generic_method (actual_method);
        goto <D.23068>;
        <D.23067>:
        declaring = 0B;
        <D.23068>:
        m = actual_method;
      }
      <D.22968>:
      <D.22939>:
      D.23069 = m->iflags;
      D.23070 = (int) D.23069;
      D.23071 = D.23070 & 32;
      if (D.23071 != 0) goto <D.23072>; else goto <D.23073>;
      <D.23072>:
      m = mono_marshal_get_synchronized_wrapper (m);
      need_rgctx_tramp = 0;
      <D.23073>:
      if (code == 0B) goto <D.23074>; else goto <D.23075>;
      <D.23074>:
      D.23076 = mono_method_needs_static_rgctx_invoke (m, 0);
      if (D.23076 != 0) goto <D.23077>; else goto <D.23078>;
      <D.23077>:
      need_rgctx_tramp = 1;
      <D.23078>:
      <D.23075>:
      compiled_method = mono_compile_method (m);
      addr = compiled_method;
      addr.9 = addr;
      D.23079 = addr.9 == 0B;
      D.23080 = (long int) D.23079;
      D.23081 = __builtin_expect (D.23080, 0);
      if (D.23081 != 0) goto <D.23082>; else goto <D.23083>;
      <D.23082>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 577, "addr");
      <D.23083>:
      D.23084 = generic_virtual != 0B;
      D.23085 = variant_iface != 0B;
      D.23086 = D.23084 | D.23085;
      if (D.23086 != 0) goto <D.23087>; else goto <D.23088>;
      <D.23087>:
      D.23089 = vt->klass;
      D.23090 = BIT_FIELD_REF <*D.23089, 8, 256>;
      D.23091 = D.23090 & 8;
      if (D.23091 != 0) goto <D.23092>; else goto <D.23093>;
      <D.23092>:
      need_unbox_tramp = 1;
      <D.23093>:
      goto <D.23094>;
      <D.23088>:
      if (orig_vtable_slot != 0B) goto <D.23095>; else goto <D.23096>;
      <D.23095>:
      D.22922 = m->klass;
      D.22988 = BIT_FIELD_REF <*D.22922, 8, 256>;
      D.22989 = D.22988 & 8;
      if (D.22989 != 0) goto <D.23097>; else goto <D.23098>;
      <D.23097>:
      need_unbox_tramp = 1;
      <D.23098>:
      <D.23096>:
      <D.23094>:
      need_rgctx_tramp.12 = need_rgctx_tramp;
      addr.13 = mini_add_method_trampoline (orig_method, m, compiled_method, need_rgctx_tramp.12, need_unbox_tramp);
      addr = addr.13;
      D.23084 = generic_virtual != 0B;
      D.23085 = variant_iface != 0B;
      D.23086 = D.23084 | D.23085;
      if (D.23086 != 0) goto <D.23101>; else goto <D.23102>;
      <D.23101>:
      {
        struct MonoMethod * target;

        if (generic_virtual != 0B) goto <D.23104>; else goto <D.23105>;
        <D.23104>:
        iftmp.14 = generic_virtual;
        goto <D.23106>;
        <D.23105>:
        iftmp.14 = variant_iface;
        <D.23106>:
        target = iftmp.14;
        vtable_slot = orig_vtable_slot;
        D.22901 = vtable_slot == 0B;
        D.22902 = (long int) D.22901;
        D.22903 = __builtin_expect (D.22902, 0);
        if (D.22903 != 0) goto <D.23107>; else goto <D.23108>;
        <D.23107>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 593, "vtable_slot");
        <D.23108>:
        addr.9 = addr;
        D.23109 = mono_domain_get ();
        mono_method_add_generic_virtual_invocation (D.23109, vt, vtable_slot, target, addr.9);
        D.22936 = addr;
        return D.22936;
      }
      <D.23102>:
      if (code == 0B) goto <D.23110>; else goto <D.23111>;
      <D.23110>:
      {
        struct MonoDomain * domain;

        domain = mono_domain_get ();
        D.23112 = domain->runtime_info;
        D.23113 = MEM[(struct MonoJitDomainInfo *)D.23112].jump_target_got_slot_hash;
        if (D.23113 != 0B) goto <D.23114>; else goto <D.23115>;
        <D.23114>:
        {
          struct GSList * list;
          struct GSList * tmp;

          {
            int ret;

            D.23116 = &domain->lock.mutex;
            ret = pthread_mutex_lock (D.23116);
            if (ret != 0) goto <D.23117>; else goto <D.23118>;
            <D.23117>:
            monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
            <D.23118>:
            D.23119 = ret != 0;
            D.23120 = (long int) D.23119;
            D.23121 = __builtin_expect (D.23120, 0);
            if (D.23121 != 0) goto <D.23122>; else goto <D.23123>;
            <D.23122>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 614, "ret == 0");
            <D.23123>:
          }
          D.23112 = domain->runtime_info;
          D.23113 = MEM[(struct MonoJitDomainInfo *)D.23112].jump_target_got_slot_hash;
          list = monoeg_g_hash_table_lookup (D.23113, m);
          if (list != 0B) goto <D.23124>; else goto <D.23125>;
          <D.23124>:
          tmp = list;
          goto <D.22469>;
          <D.22468>:
          {
            void * * got_slot;

            got_slot = tmp->data;
            addr.9 = addr;
            *got_slot = addr.9;
          }
          tmp = tmp->next;
          <D.22469>:
          if (tmp != 0B) goto <D.22468>; else goto <D.22470>;
          <D.22470>:
          D.23112 = domain->runtime_info;
          D.23113 = MEM[(struct MonoJitDomainInfo *)D.23112].jump_target_got_slot_hash;
          monoeg_g_hash_table_remove (D.23113, m);
          monoeg_g_slist_free (list);
          <D.23125>:
          {
            int ret;

            D.23116 = &domain->lock.mutex;
            ret = pthread_mutex_unlock (D.23116);
            if (ret != 0) goto <D.23126>; else goto <D.23127>;
            <D.23126>:
            monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
            <D.23127>:
            D.23128 = ret != 0;
            D.23129 = (long int) D.23128;
            D.23130 = __builtin_expect (D.23129, 0);
            if (D.23130 != 0) goto <D.23131>; else goto <D.23132>;
            <D.23131>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 624, "ret == 0");
            <D.23132>:
          }
        }
        <D.23115>:
        D.22936 = addr;
        return D.22936;
      }
      <D.23111>:
      vtable_slot = orig_vtable_slot;
      if (vtable_slot != 0B) goto <D.23133>; else goto <D.23134>;
      <D.23133>:
      if (vtable_slot_to_patch != 0B) goto <D.23137>; else goto <D.23138>;
      <D.23137>:
      D.23139 = mono_aot_is_got_entry (code, vtable_slot_to_patch);
      if (D.23139 != 0) goto <D.23135>; else goto <D.23140>;
      <D.23140>:
      D.23141 = mono_domain_get ();
      D.23142 = mono_domain_owns_vtable_slot (D.23141, vtable_slot_to_patch);
      if (D.23142 != 0) goto <D.23135>; else goto <D.23136>;
      <D.23135>:
      D.23143 = *vtable_slot_to_patch;
      D.23144 = D.23143 == 0B;
      D.23145 = (long int) D.23144;
      D.23146 = __builtin_expect (D.23145, 0);
      if (D.23146 != 0) goto <D.23147>; else goto <D.23148>;
      <D.23147>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 634, "*vtable_slot_to_patch");
      <D.23148>:
      addr.9 = addr;
      D.23149 = mono_get_addr_from_ftnptr (addr.9);
      *vtable_slot_to_patch = D.23149;
      <D.23136>:
      <D.23138>:
      goto <D.23150>;
      <D.23134>:
      {
        guint8 * plt_entry;
        gboolean no_patch;
        struct MonoJitInfo * target_ji;

        plt_entry = mono_aot_get_plt_entry (code);
        no_patch = 0;
        if (plt_entry != 0B) goto <D.23151>; else goto <D.23152>;
        <D.23151>:
        if (generic_shared != 0) goto <D.23153>; else goto <D.23154>;
        <D.23153>:
        D.23155 = mono_get_addr_from_ftnptr (compiled_method);
        D.23156 = mono_domain_get ();
        target_ji = mini_jit_info_table_find (D.23156, D.23155, 0B);
        if (ji == 0B) goto <D.23157>; else goto <D.23158>;
        <D.23157>:
        D.23159 = mono_domain_get ();
        ji = mini_jit_info_table_find (D.23159, code, 0B);
        <D.23158>:
        D.23160 = ji != 0B;
        D.23161 = target_ji != 0B;
        D.23162 = D.23160 & D.23161;
        if (D.23162 != 0) goto <D.23163>; else goto <D.23164>;
        <D.23163>:
        if (generic_shared != 0) goto <D.23165>; else goto <D.23166>;
        <D.23165>:
        D.23167 = BIT_FIELD_REF <*ji, 8, 272>;
        D.23168 = D.23167 & 2;
        if (D.23168 != 0) goto <D.23169>; else goto <D.23170>;
        <D.23169>:
        D.23171 = BIT_FIELD_REF <*target_ji, 8, 272>;
        D.23172 = D.23171 & 2;
        if (D.23172 == 0) goto <D.23173>; else goto <D.23174>;
        <D.23173>:
        no_patch = 1;
        <D.23174>:
        <D.23170>:
        <D.23166>:
        <D.23164>:
        <D.23154>:
        if (no_patch == 0) goto <D.23175>; else goto <D.23176>;
        <D.23175>:
        addr.9 = addr;
        mono_aot_patch_plt_entry (plt_entry, 0B, regs, addr.9);
        <D.23176>:
        goto <D.23177>;
        <D.23152>:
        if (generic_shared != 0) goto <D.23178>; else goto <D.23179>;
        <D.23178>:
        D.23035 = BIT_FIELD_REF <*m, 8, 256>;
        D.23036 = D.23035 & 124;
        if (D.23036 != 0) goto <D.23180>; else goto <D.23181>;
        <D.23180>:
        m = mono_marshal_method_from_wrapper (m);
        <D.23181>:
        <D.23179>:
        D.23182 = mono_get_addr_from_ftnptr (compiled_method);
        D.23183 = mono_domain_get ();
        target_ji = mini_jit_info_table_find (D.23183, D.23182, 0B);
        if (ji == 0B) goto <D.23184>; else goto <D.23185>;
        <D.23184>:
        D.23186 = mono_domain_get ();
        ji = mini_jit_info_table_find (D.23186, code, 0B);
        <D.23185>:
        D.23160 = ji != 0B;
        D.23161 = target_ji != 0B;
        D.23162 = D.23160 & D.23161;
        if (D.23162 != 0) goto <D.23187>; else goto <D.23188>;
        <D.23187>:
        if (generic_shared != 0) goto <D.23189>; else goto <D.23190>;
        <D.23189>:
        D.23167 = BIT_FIELD_REF <*ji, 8, 272>;
        D.23168 = D.23167 & 2;
        if (D.23168 != 0) goto <D.23191>; else goto <D.23192>;
        <D.23191>:
        D.23171 = BIT_FIELD_REF <*target_ji, 8, 272>;
        D.23172 = D.23171 & 2;
        if (D.23172 == 0) goto <D.23193>; else goto <D.23194>;
        <D.23193>:
        no_patch = 1;
        <D.23194>:
        <D.23192>:
        <D.23190>:
        <D.23188>:
        if (no_patch == 0) goto <D.23195>; else goto <D.23196>;
        <D.23195>:
        D.23197 = mono_method_same_domain (ji, target_ji);
        if (D.23197 != 0) goto <D.23198>; else goto <D.23199>;
        <D.23198>:
        addr.9 = addr;
        D.23200 = ji->code_start;
        mono_arch_patch_callsite (D.23200, code, addr.9);
        <D.23199>:
        <D.23196>:
        <D.23177>:
      }
      <D.23150>:
      D.22936 = addr;
      return D.22936;
    }
  finally
    {
      addr = {CLOBBER};
      variance_used = {CLOBBER};
    }
}


mono_convert_imt_slot_to_vtable_slot (void * * slot, mgreg_t * regs, guint8 * code, struct MonoMethod * method, gboolean lookup_aot, struct MonoMethod * * impl_method, gboolean * need_rgctx_tramp, gboolean * variance_used, void * * aot_addr)
{
  long int slot.15;
  long int vt.16;
  long int D.23207;
  long int D.23208;
  void * * D.23211;
  struct MonoClass * D.23212;
  struct MonoClass * D.23213;
  struct MonoType * D.23216;
  char * D.23217;
  struct MonoType * D.23218;
  char * D.23219;
  unsigned int D.23220;
  int D.23221;
  unsigned char D.23224;
  unsigned char D.23225;
  struct MonoGenericInst * D.23227;
  struct MonoMethod * D.23229;
  short int D.23230;
  int D.23231;
  int D.23232;
  struct MonoClass * D.23233;
  struct MonoGenericClass * D.23234;
  struct MonoGenericInst * D.23237;
  unsigned char D.23241;
  unsigned char D.23242;
  int D.23244;
  int D.23245;
  struct MonoDomain * D.23246;
  void * D.23247;
  void * D.23248;
  int D.23252;
  int D.23253;
  int D.23256;
  unsigned char D.23261;
  unsigned char D.23262;
  <unnamed type> D.23267;
  _Bool D.23270;
  long int D.23271;
  long int D.23272;
  unsigned int D.23275;
  int D.23276;
  unsigned int D.23277;
  unsigned int D.23278;
  _Bool D.23281;
  long int D.23282;
  long int D.23283;
  struct MonoObject * this_argument;
  struct MonoVTable * vt;
  int displacement;

  this_argument = mono_arch_get_this_arg_from_call (regs, code);
  vt = this_argument->vtable;
  slot.15 = (long int) slot;
  vt.16 = (long int) vt;
  D.23207 = slot.15 - vt.16;
  D.23208 = D.23207 /[ex] 8;
  displacement = (int) D.23208;
  if (displacement > 0) goto <D.23209>; else goto <D.23210>;
  <D.23209>:
  D.23211 = slot;
  return D.23211;
  <D.23210>:
  {
    struct MonoMethod * imt_method;
    struct MonoMethod * impl;
    int interface_offset;
    int imt_slot;

    imt_method = mono_arch_find_imt_method (regs, code);
    imt_slot = displacement + 19;
    D.23212 = imt_method->klass;
    D.23213 = vt->klass;
    interface_offset = mono_class_interface_offset_with_variance (D.23213, D.23212, variance_used);
    if (interface_offset < 0) goto <D.23214>; else goto <D.23215>;
    <D.23214>:
    D.23212 = imt_method->klass;
    D.23216 = &D.23212->byval_arg;
    D.23217 = mono_type_get_name_full (D.23216, 0);
    D.23213 = vt->klass;
    D.23218 = &D.23213->byval_arg;
    D.23219 = mono_type_get_name_full (D.23218, 0);
    monoeg_g_log (0B, 4, "%s doesn\'t implement interface %s\n", D.23219, D.23217);
    <D.22395>:
    goto <D.22395>;
    <D.23215>:
    D.23220 = mono_method_get_imt_slot (imt_method);
    D.23221 = (int) D.23220;
    mono_vtable_build_imt_slot (vt, D.23221);
    D.23224 = BIT_FIELD_REF <*imt_method, 8, 264>;
    D.23225 = D.23224 & 16;
    if (D.23225 != 0) goto <D.23226>; else goto <D.23222>;
    <D.23226>:
    D.23227 = MEM[(struct MonoMethodInflated *)imt_method].context.method_inst;
    if (D.23227 != 0B) goto <D.23228>; else goto <D.23222>;
    <D.23228>:
    {
      struct MonoGenericContext context;

      try
        {
          context.class_inst = 0B;
          context.method_inst = 0B;
          D.23229 = mono_method_get_declaring_generic_method (imt_method);
          D.23230 = D.23229->slot;
          D.23231 = (int) D.23230;
          D.23232 = D.23231 + interface_offset;
          D.23213 = vt->klass;
          impl = mono_class_get_vtable_entry (D.23213, D.23232);
          D.23233 = impl->klass;
          D.23234 = D.23233->generic_class;
          if (D.23234 != 0B) goto <D.23235>; else goto <D.23236>;
          <D.23235>:
          D.23233 = impl->klass;
          D.23234 = D.23233->generic_class;
          D.23237 = D.23234->context.class_inst;
          context.class_inst = D.23237;
          <D.23236>:
          D.23227 = MEM[(struct MonoMethodInflated *)imt_method].context.method_inst;
          context.method_inst = D.23227;
          impl = mono_class_inflate_generic_method (impl, &context);
        }
      finally
        {
          context = {CLOBBER};
        }
    }
    goto <D.23223>;
    <D.23222>:
    if (lookup_aot != 0) goto <D.23240>; else goto <D.23238>;
    <D.23240>:
    D.23213 = vt->klass;
    D.23241 = BIT_FIELD_REF <*D.23213, 8, 256>;
    D.23242 = D.23241 & 8;
    if (D.23242 == 0) goto <D.23243>; else goto <D.23238>;
    <D.23243>:
    D.23244 = mono_method_get_vtable_slot (imt_method);
    D.23245 = D.23244 + interface_offset;
    D.23246 = mono_domain_get ();
    D.23247 = mono_aot_get_method_from_vt_slot (D.23246, vt, D.23245);
    *aot_addr = D.23247;
    goto <D.23239>;
    <D.23238>:
    *aot_addr = 0B;
    <D.23239>:
    D.23248 = *aot_addr;
    if (D.23248 != 0B) goto <D.23249>; else goto <D.23250>;
    <D.23249>:
    impl = 0B;
    goto <D.23251>;
    <D.23250>:
    D.23252 = mono_method_get_vtable_slot (imt_method);
    D.23253 = D.23252 + interface_offset;
    D.23213 = vt->klass;
    impl = mono_class_get_vtable_entry (D.23213, D.23253);
    <D.23251>:
    <D.23223>:
    if (impl != 0B) goto <D.23254>; else goto <D.23255>;
    <D.23254>:
    D.23256 = mono_method_needs_static_rgctx_invoke (impl, 0);
    if (D.23256 != 0) goto <D.23257>; else goto <D.23258>;
    <D.23257>:
    *need_rgctx_tramp = 1;
    <D.23258>:
    <D.23255>:
    if (impl != 0B) goto <D.23259>; else goto <D.23260>;
    <D.23259>:
    D.23261 = BIT_FIELD_REF <*impl, 8, 256>;
    D.23262 = D.23261 & 124;
    if (D.23262 == 28) goto <D.23263>; else goto <D.23264>;
    <D.23263>:
    {
      struct WrapperInfo * info;

      info = mono_marshal_get_wrapper_info (impl);
      if (info != 0B) goto <D.23265>; else goto <D.23266>;
      <D.23265>:
      D.23267 = info->subtype;
      if (D.23267 == 21) goto <D.23268>; else goto <D.23269>;
      <D.23268>:
      *need_rgctx_tramp = 1;
      <D.23269>:
      <D.23266>:
    }
    <D.23264>:
    <D.23260>:
    *impl_method = impl;
    D.23270 = imt_slot > 18;
    D.23271 = (long int) D.23270;
    D.23272 = __builtin_expect (D.23271, 0);
    if (D.23272 != 0) goto <D.23273>; else goto <D.23274>;
    <D.23273>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 223, "imt_slot < MONO_IMT_SIZE");
    <D.23274>:
    D.23275 = vt->imt_collisions_bitmap;
    D.23276 = 1 << imt_slot;
    D.23277 = (unsigned int) D.23276;
    D.23278 = D.23275 & D.23277;
    if (D.23278 != 0) goto <D.23279>; else goto <D.23280>;
    <D.23279>:
    {
      int slot;
      int vtable_offset;
      void * * vtable_slot;

      slot = mono_method_get_vtable_index (imt_method);
      D.23281 = slot == -1;
      D.23282 = (long int) D.23281;
      D.23283 = __builtin_expect (D.23282, 0);
      if (D.23283 != 0) goto <D.23284>; else goto <D.23285>;
      <D.23284>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 229, "slot != -1");
      <D.23285>:
      vtable_offset = interface_offset + slot;
      vtable_slot = &vt->vtable[vtable_offset];
      D.23211 = vtable_slot;
      return D.23211;
    }
    <D.23280>:
    D.23211 = slot;
    return D.23211;
  }
}


is_generic_method_definition (struct MonoMethod * m)
{
  unsigned char D.23287;
  unsigned char D.23288;
  gboolean D.23291;
  unsigned char D.23292;
  struct MonoGenericInst * D.23295;
  struct MonoMethod * D.23298;
  struct MonoGenericContainer * D.23299;
  struct MonoGenericInst * D.23300;
  struct MonoGenericContext * context;

  D.23287 = BIT_FIELD_REF <*m, 8, 264>;
  D.23288 = D.23287 & 8;
  if (D.23288 != 0) goto <D.23289>; else goto <D.23290>;
  <D.23289>:
  D.23291 = 1;
  return D.23291;
  <D.23290>:
  D.23287 = BIT_FIELD_REF <*m, 8, 264>;
  D.23292 = D.23287 & 16;
  if (D.23292 == 0) goto <D.23293>; else goto <D.23294>;
  <D.23293>:
  D.23291 = 0;
  return D.23291;
  <D.23294>:
  context = mono_method_get_context (m);
  D.23295 = context->method_inst;
  if (D.23295 == 0B) goto <D.23296>; else goto <D.23297>;
  <D.23296>:
  D.23291 = 0;
  return D.23291;
  <D.23297>:
  D.23295 = context->method_inst;
  D.23298 = MEM[(struct MonoMethodInflated *)m].declaring;
  D.23299 = mono_method_get_generic_container (D.23298);
  D.23300 = D.23299->context.method_inst;
  if (D.23295 == D.23300) goto <D.23301>; else goto <D.23302>;
  <D.23301>:
  D.23291 = 1;
  return D.23291;
  <D.23302>:
  D.23291 = 0;
  return D.23291;
}


mono_generic_virtual_remoting_trampoline (mgreg_t * regs, guint8 * code, struct MonoMethod * m, guint8 * tramp)
{
  unsigned int trampoline_calls.17;
  unsigned int trampoline_calls.18;
  unsigned char D.23306;
  unsigned char D.23307;
  _Bool D.23308;
  long int D.23309;
  long int D.23310;
  unsigned char D.23313;
  struct MonoClass * D.23317;
  struct MonoGenericClass * D.23318;
  struct MonoGenericInst * D.23321;
  struct MonoGenericContainer * D.23323;
  _Bool D.23324;
  long int D.23325;
  long int D.23326;
  unsigned char D.23329;
  unsigned char D.23330;
  struct MonoGenericInst * D.23333;
  _Bool D.23334;
  long int D.23335;
  long int D.23336;
  void * D.23339;
  struct MonoGenericContext context;
  struct MonoMethod * imt_method;
  struct MonoMethod * declaring;
  void * addr;

  try
    {
      context.class_inst = 0B;
      context.method_inst = 0B;
      trampoline_calls.17 = trampoline_calls;
      trampoline_calls.18 = trampoline_calls.17 + 1;
      trampoline_calls = trampoline_calls.18;
      D.23306 = BIT_FIELD_REF <*m, 8, 264>;
      D.23307 = D.23306 & 8;
      D.23308 = D.23307 == 0;
      D.23309 = (long int) D.23308;
      D.23310 = __builtin_expect (D.23309, 0);
      if (D.23310 != 0) goto <D.23311>; else goto <D.23312>;
      <D.23311>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 786, "m->is_generic");
      <D.23312>:
      D.23306 = BIT_FIELD_REF <*m, 8, 264>;
      D.23313 = D.23306 & 16;
      if (D.23313 != 0) goto <D.23314>; else goto <D.23315>;
      <D.23314>:
      declaring = mono_method_get_declaring_generic_method (m);
      goto <D.23316>;
      <D.23315>:
      declaring = m;
      <D.23316>:
      D.23317 = m->klass;
      D.23318 = D.23317->generic_class;
      if (D.23318 != 0B) goto <D.23319>; else goto <D.23320>;
      <D.23319>:
      D.23317 = m->klass;
      D.23318 = D.23317->generic_class;
      D.23321 = D.23318->context.class_inst;
      context.class_inst = D.23321;
      goto <D.23322>;
      <D.23320>:
      D.23317 = m->klass;
      D.23323 = D.23317->generic_container;
      D.23324 = D.23323 != 0B;
      D.23325 = (long int) D.23324;
      D.23326 = __builtin_expect (D.23325, 0);
      if (D.23326 != 0) goto <D.23327>; else goto <D.23328>;
      <D.23327>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 796, "!m->klass->generic_container");
      <D.23328>:
      <D.23322>:
      imt_method = mono_arch_find_imt_method (regs, code);
      D.23329 = BIT_FIELD_REF <*imt_method, 8, 264>;
      D.23330 = D.23329 & 16;
      if (D.23330 != 0) goto <D.23331>; else goto <D.23332>;
      <D.23331>:
      D.23333 = MEM[(struct MonoMethodInflated *)imt_method].context.method_inst;
      context.method_inst = D.23333;
      <D.23332>:
      m = mono_class_inflate_generic_method (declaring, &context);
      m = mono_marshal_get_remoting_invoke_with_check (m);
      addr = mono_compile_method (m);
      D.23334 = addr == 0B;
      D.23335 = (long int) D.23334;
      D.23336 = __builtin_expect (D.23335, 0);
      if (D.23336 != 0) goto <D.23337>; else goto <D.23338>;
      <D.23337>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 807, "addr");
      <D.23338>:
      D.23339 = addr;
      return D.23339;
    }
  finally
    {
      context = {CLOBBER};
    }
}


mono_aot_trampoline (mgreg_t * regs, guint8 * code, guint8 * token_info, guint8 * tramp)
{
  unsigned int trampoline_calls.19;
  unsigned int trampoline_calls.20;
  struct MonoDomain * D.23344;
  _Bool D.23347;
  long int D.23348;
  long int D.23349;
  void * D.23352;
  struct MonoDomain * D.23353;
  _Bool D.23354;
  long int D.23355;
  long int D.23356;
  struct MonoImage * image;
  guint32 token;
  struct MonoMethod * method;
  void * addr;
  guint8 * plt_entry;

  method = 0B;
  trampoline_calls.19 = trampoline_calls;
  trampoline_calls.20 = trampoline_calls.19 + 1;
  trampoline_calls = trampoline_calls.20;
  image = MEM[(void * *)token_info];
  token_info = token_info + 8;
  token = MEM[(guint32 *)token_info];
  D.23344 = mono_domain_get ();
  addr = mono_aot_get_method_from_token (D.23344, image, token);
  if (addr == 0B) goto <D.23345>; else goto <D.23346>;
  <D.23345>:
  method = mono_get_method (image, token, 0B);
  D.23347 = method == 0B;
  D.23348 = (long int) D.23347;
  D.23349 = __builtin_expect (D.23348, 0);
  if (D.23349 != 0) goto <D.23350>; else goto <D.23351>;
  <D.23350>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 839, "method");
  <D.23351>:
  D.23352 = mono_magic_trampoline (regs, code, method, tramp);
  return D.23352;
  <D.23346>:
  D.23353 = mono_domain_get ();
  addr = mono_create_ftnptr (D.23353, addr);
  plt_entry = mono_aot_get_plt_entry (code);
  D.23354 = plt_entry == 0B;
  D.23355 = (long int) D.23354;
  D.23356 = __builtin_expect (D.23355, 0);
  if (D.23356 != 0) goto <D.23357>; else goto <D.23358>;
  <D.23357>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 849, "plt_entry");
  <D.23358>:
  mono_aot_patch_plt_entry (plt_entry, 0B, regs, addr);
  D.23352 = addr;
  return D.23352;
}


mono_aot_plt_trampoline (mgreg_t * regs, guint8 * code, guint8 * aot_module, guint8 * tramp)
{
  unsigned int trampoline_calls.21;
  unsigned int trampoline_calls.22;
  struct MonoLoaderError * D.23364;
  struct MonoLoaderError * D.23367;
  struct MonoException * D.23368;
  _Bool D.23369;
  long int D.23370;
  long int D.23371;
  void * D.23374;
  guint32 plt_info_offset;
  void * res;

  plt_info_offset = mono_aot_get_plt_info_offset (regs, code);
  trampoline_calls.21 = trampoline_calls;
  trampoline_calls.22 = trampoline_calls.21 + 1;
  trampoline_calls = trampoline_calls.22;
  res = mono_aot_plt_resolve (aot_module, plt_info_offset, code);
  if (res == 0B) goto <D.23362>; else goto <D.23363>;
  <D.23362>:
  D.23364 = mono_loader_get_last_error ();
  if (D.23364 != 0B) goto <D.23365>; else goto <D.23366>;
  <D.23365>:
  D.23367 = mono_loader_get_last_error ();
  D.23368 = mono_loader_error_prepare_exception (D.23367);
  mono_raise_exception (D.23368);
  <D.23366>:
  D.23369 = res == 0B;
  D.23370 = (long int) D.23369;
  D.23371 = __builtin_expect (D.23370, 0);
  if (D.23371 != 0) goto <D.23372>; else goto <D.23373>;
  <D.23372>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 875, "res");
  <D.23373>:
  <D.23363>:
  D.23374 = res;
  return D.23374;
}


mono_class_init_trampoline (mgreg_t * regs, guint8 * code, struct MonoVTable * vtable, guint8 * tramp)
{
  unsigned int trampoline_calls.23;
  unsigned int trampoline_calls.24;
  unsigned char D.23378;
  unsigned char D.23379;
  guint8 * plt_entry;

  plt_entry = mono_aot_get_plt_entry (code);
  trampoline_calls.23 = trampoline_calls;
  trampoline_calls.24 = trampoline_calls.23 + 1;
  trampoline_calls = trampoline_calls.24;
  mono_runtime_class_init (vtable);
  D.23378 = BIT_FIELD_REF <*vtable, 8, 344>;
  D.23379 = D.23378 & 2;
  if (D.23379 != 0) goto <D.23380>; else goto <D.23381>;
  <D.23380>:
  if (plt_entry != 0B) goto <D.23382>; else goto <D.23383>;
  <D.23382>:
  mono_arch_nullify_plt_entry (plt_entry, regs);
  goto <D.23384>;
  <D.23383>:
  mono_arch_nullify_class_init_trampoline (code, regs);
  <D.23384>:
  <D.23381>:
}


mono_generic_class_init_trampoline (mgreg_t * regs, guint8 * code, struct MonoVTable * vtable, guint8 * tramp)
{
  unsigned int trampoline_calls.25;
  unsigned int trampoline_calls.26;

  trampoline_calls.25 = trampoline_calls;
  trampoline_calls.26 = trampoline_calls.25 + 1;
  trampoline_calls = trampoline_calls.26;
  mono_runtime_class_init (vtable);
}


mono_monitor_enter_trampoline (mgreg_t * regs, guint8 * code, struct MonoObject * obj, guint8 * tramp)
{
  mono_monitor_enter (obj);
}


mono_monitor_exit_trampoline (mgreg_t * regs, guint8 * code, struct MonoObject * obj, guint8 * tramp)
{
  mono_monitor_exit (obj);
}


mono_delegate_trampoline (mgreg_t * regs, guint8 * code, void * * tramp_data, guint8 * tramp)
{
  unsigned int trampoline_calls.27;
  unsigned int trampoline_calls.28;
  struct MonoMethod * D.23389;
  struct MonoObject * D.23394;
  struct MonoVTable * D.23396;
  struct MonoClass * D.23397;
  struct MonoClass * D.23398;
  struct MonoRemoteClass * D.23400;
  struct MonoClass * D.23401;
  struct MonoClass * D.23402;
  unsigned char D.23405;
  unsigned char D.23406;
  unsigned char D.23411;
  unsigned char D.23412;
  struct MonoClass * D.23415;
  unsigned char D.23416;
  unsigned char D.23417;
  int mono_aot_only.29;
  void * D.23425;
  void * D.23426;
  int iftmp.30;
  short unsigned int D.23440;
  unsigned int D.23441;
  unsigned int D.23442;
  unsigned int D.23445;
  unsigned int D.23446;
  short unsigned int D.23451;
  int D.23452;
  int D.23453;
  int D.23458;
  _Bool D.23461;
  _Bool D.23462;
  _Bool D.23463;
  guint8 * * D.23469;
  guint8 * D.23471;
  void * D.23480;
  struct MonoMulticastDelegate * D.23481;
  _Bool D.23482;
  int D.23483;
  int D.23489;
  int D.23490;
  struct MonoMethodSignature * D.23492;
  short unsigned int D.23493;
  int D.23494;
  struct MonoMethodSignature * D.23495;
  short unsigned int D.23496;
  int D.23497;
  int D.23498;
  guint8 * iftmp.31;
  void * D.23506;
  void * D.23507;
  int D.23508;
  void * D.23509;
  struct MonoDomain * domain;
  struct MonoDelegate * delegate;
  struct MonoJitInfo * ji;
  struct MonoMethod * m;
  struct MonoMethod * method;
  gboolean multicast;
  gboolean callvirt;
  gboolean need_rgctx_tramp;
  gboolean need_unbox_tramp;
  gboolean enable_caching;
  struct MonoMethod * invoke;
  guint8 * impl_this;
  guint8 * impl_nothis;
  struct MonoError err;
  struct MonoMethodSignature * sig;
  void * addr;
  void * compiled_method;

  try
    {
      domain = mono_domain_get ();
      method = 0B;
      callvirt = 0;
      need_rgctx_tramp = 0;
      need_unbox_tramp = 0;
      enable_caching = 1;
      invoke = *tramp_data;
      impl_this = MEM[(void * *)tramp_data + 8B];
      impl_nothis = MEM[(void * *)tramp_data + 16B];
      trampoline_calls.27 = trampoline_calls;
      trampoline_calls.28 = trampoline_calls.27 + 1;
      trampoline_calls = trampoline_calls.28;
      delegate = mono_arch_get_this_arg_from_call (regs, code);
      D.23389 = delegate->method;
      if (D.23389 != 0B) goto <D.23390>; else goto <D.23391>;
      <D.23390>:
      method = delegate->method;
      D.23394 = delegate->target;
      if (D.23394 != 0B) goto <D.23395>; else goto <D.23392>;
      <D.23395>:
      D.23394 = delegate->target;
      D.23396 = D.23394->vtable;
      D.23397 = D.23396->klass;
      D.23398 = mono_defaults.transparent_proxy_class;
      if (D.23397 == D.23398) goto <D.23399>; else goto <D.23392>;
      <D.23399>:
      D.23394 = delegate->target;
      D.23400 = MEM[(struct MonoTransparentProxy *)D.23394].remote_class;
      D.23401 = D.23400->proxy_class;
      D.23402 = mono_class_get_com_object_class ();
      if (D.23401 != D.23402) goto <D.23403>; else goto <D.23404>;
      <D.23403>:
      D.23394 = delegate->target;
      D.23400 = MEM[(struct MonoTransparentProxy *)D.23394].remote_class;
      D.23401 = D.23400->proxy_class;
      D.23405 = BIT_FIELD_REF <*D.23401, 8, 280>;
      D.23406 = D.23405 & 64;
      if (D.23406 == 0) goto <D.23407>; else goto <D.23408>;
      <D.23407>:
      method = mono_marshal_get_remoting_invoke (method);
      <D.23408>:
      <D.23404>:
      goto <D.23393>;
      <D.23392>:
      mono_error_init (&err);
      sig = mono_method_signature_checked (method, &err);
      if (sig == 0B) goto <D.23409>; else goto <D.23410>;
      <D.23409>:
      mono_error_raise_exception (&err);
      <D.23410>:
      D.23411 = BIT_FIELD_REF <*sig, 8, 112>;
      D.23412 = D.23411 & 64;
      if (D.23412 != 0) goto <D.23413>; else goto <D.23414>;
      <D.23413>:
      D.23415 = method->klass;
      D.23416 = BIT_FIELD_REF <*D.23415, 8, 256>;
      D.23417 = D.23416 & 8;
      if (D.23417 != 0) goto <D.23418>; else goto <D.23419>;
      <D.23418>:
      mono_aot_only.29 = mono_aot_only;
      if (mono_aot_only.29 != 0) goto <D.23421>; else goto <D.23422>;
      <D.23421>:
      need_unbox_tramp = 1;
      goto <D.23423>;
      <D.23422>:
      method = mono_marshal_get_unbox_wrapper (method);
      <D.23423>:
      <D.23419>:
      <D.23414>:
      <D.23393>:
      goto <D.23424>;
      <D.23391>:
      D.23425 = delegate->method_ptr;
      D.23426 = mono_get_addr_from_ftnptr (D.23425);
      ji = mono_jit_info_table_find (domain, D.23426);
      if (ji != 0B) goto <D.23427>; else goto <D.23428>;
      <D.23427>:
      method = jinfo_get_method (ji);
      <D.23428>:
      <D.23424>:
      if (method != 0B) goto <D.23429>; else goto <D.23430>;
      <D.23429>:
      mono_error_init (&err);
      sig = mono_method_signature_checked (method, &err);
      if (sig == 0B) goto <D.23431>; else goto <D.23432>;
      <D.23431>:
      mono_error_raise_exception (&err);
      <D.23432>:
      D.23394 = delegate->target;
      if (D.23394 == 0B) goto <D.23436>; else goto <D.23434>;
      <D.23436>:
      D.23411 = BIT_FIELD_REF <*sig, 8, 112>;
      D.23412 = D.23411 & 64;
      if (D.23412 != 0) goto <D.23437>; else goto <D.23434>;
      <D.23437>:
      iftmp.30 = 1;
      goto <D.23435>;
      <D.23434>:
      iftmp.30 = 0;
      <D.23435>:
      callvirt = iftmp.30;
      D.23394 = delegate->target;
      if (D.23394 != 0B) goto <D.23438>; else goto <D.23439>;
      <D.23438>:
      D.23440 = method->flags;
      D.23441 = (unsigned int) D.23440;
      D.23442 = D.23441 & 1088;
      if (D.23442 == 1088) goto <D.23443>; else goto <D.23444>;
      <D.23443>:
      D.23415 = method->klass;
      D.23445 = D.23415->flags;
      D.23446 = D.23445 & 128;
      if (D.23446 != 0) goto <D.23447>; else goto <D.23448>;
      <D.23447>:
      D.23394 = delegate->target;
      method = mono_object_get_virtual_method (D.23394, method);
      enable_caching = 0;
      <D.23448>:
      <D.23444>:
      <D.23439>:
      <D.23430>:
      if (method != 0B) goto <D.23449>; else goto <D.23450>;
      <D.23449>:
      D.23451 = method->iflags;
      D.23452 = (int) D.23451;
      D.23453 = D.23452 & 32;
      if (D.23453 != 0) goto <D.23454>; else goto <D.23455>;
      <D.23454>:
      method = mono_marshal_get_synchronized_wrapper (method);
      <D.23455>:
      <D.23450>:
      if (method != 0B) goto <D.23456>; else goto <D.23457>;
      <D.23456>:
      D.23458 = mono_method_needs_static_rgctx_invoke (method, 0);
      if (D.23458 != 0) goto <D.23459>; else goto <D.23460>;
      <D.23459>:
      need_rgctx_tramp = 1;
      <D.23460>:
      <D.23457>:
      D.23461 = method != 0B;
      D.23462 = callvirt == 0;
      D.23463 = D.23461 & D.23462;
      if (D.23463 != 0) goto <D.23464>; else goto <D.23465>;
      <D.23464>:
      if (enable_caching != 0) goto <D.23468>; else goto <D.23466>;
      <D.23468>:
      D.23469 = delegate->method_code;
      if (D.23469 != 0B) goto <D.23470>; else goto <D.23466>;
      <D.23470>:
      D.23469 = delegate->method_code;
      D.23471 = *D.23469;
      if (D.23471 != 0B) goto <D.23472>; else goto <D.23466>;
      <D.23472>:
      D.23469 = delegate->method_code;
      D.23471 = *D.23469;
      delegate->method_ptr = D.23471;
      goto <D.23467>;
      <D.23466>:
      addr = mono_compile_method (method);
      compiled_method = addr;
      addr = mini_add_method_trampoline (0B, method, compiled_method, need_rgctx_tramp, need_unbox_tramp);
      delegate->method_ptr = addr;
      if (enable_caching != 0) goto <D.23473>; else goto <D.23474>;
      <D.23473>:
      D.23469 = delegate->method_code;
      if (D.23469 != 0B) goto <D.23475>; else goto <D.23476>;
      <D.23475>:
      D.23469 = delegate->method_code;
      D.23425 = delegate->method_ptr;
      *D.23469 = D.23425;
      <D.23476>:
      <D.23474>:
      <D.23467>:
      goto <D.23477>;
      <D.23465>:
      if (need_rgctx_tramp != 0) goto <D.23478>; else goto <D.23479>;
      <D.23478>:
      D.23425 = delegate->method_ptr;
      D.23480 = mono_create_static_rgctx_trampoline (method, D.23425);
      delegate->method_ptr = D.23480;
      <D.23479>:
      <D.23477>:
      D.23481 = MEM[(struct MonoMulticastDelegate *)delegate].prev;
      D.23482 = D.23481 != 0B;
      multicast = (gboolean) D.23482;
      D.23483 = multicast | callvirt;
      if (D.23483 == 0) goto <D.23484>; else goto <D.23485>;
      <D.23484>:
      if (method != 0B) goto <D.23488>; else goto <D.23486>;
      <D.23488>:
      D.23440 = method->flags;
      D.23489 = (int) D.23440;
      D.23490 = D.23489 & 16;
      if (D.23490 != 0) goto <D.23491>; else goto <D.23486>;
      <D.23491>:
      D.23492 = mono_method_signature (method);
      D.23493 = D.23492->param_count;
      D.23494 = (int) D.23493;
      D.23495 = mono_method_signature (invoke);
      D.23496 = D.23495->param_count;
      D.23497 = (int) D.23496;
      D.23498 = D.23497 + 1;
      if (D.23494 == D.23498) goto <D.23499>; else goto <D.23486>;
      <D.23499>:
      code = impl_this;
      goto <D.23487>;
      <D.23486>:
      D.23394 = delegate->target;
      if (D.23394 != 0B) goto <D.23501>; else goto <D.23502>;
      <D.23501>:
      iftmp.31 = impl_this;
      goto <D.23503>;
      <D.23502>:
      iftmp.31 = impl_nothis;
      <D.23503>:
      code = iftmp.31;
      <D.23487>:
      if (code != 0B) goto <D.23504>; else goto <D.23505>;
      <D.23504>:
      D.23506 = mono_get_addr_from_ftnptr (code);
      delegate->invoke_impl = D.23506;
      D.23507 = code;
      return D.23507;
      <D.23505>:
      <D.23485>:
      m = mono_marshal_get_delegate_invoke (invoke, delegate);
      code = mono_compile_method (m);
      D.23508 = mono_method_needs_static_rgctx_invoke (m, 0);
      code = mini_add_method_trampoline (0B, m, code, D.23508, 0);
      D.23509 = mono_get_addr_from_ftnptr (code);
      delegate->invoke_impl = D.23509;
      D.23507 = code;
      return D.23507;
    }
  finally
    {
      err = {CLOBBER};
    }
}


mono_create_handler_block_trampoline ()
{
  void * code.32;
  void * D.23515;
  int mono_aot_only.33;
  _Bool D.23523;
  long int D.23524;
  long int D.23525;
  _Bool D.23532;
  long int D.23533;
  long int D.23534;
  static void * code;

  code.32 = code;
  if (code.32 != 0B) goto <D.23513>; else goto <D.23514>;
  <D.23513>:
  mono_memory_barrier ();
  D.23515 = code;
  return D.23515;
  <D.23514>:
  mono_aot_only.33 = mono_aot_only;
  if (mono_aot_only.33 != 0) goto <D.23517>; else goto <D.23518>;
  <D.23517>:
  if (1 != 0) goto <D.23519>; else goto <D.23520>;
  <D.23519>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1137, "0");
  <D.23520>:
  D.23515 = code;
  return D.23515;
  <D.23518>:
  {
    int ret;

    ret = pthread_mutex_lock (&trampolines_mutex.mutex);
    if (ret != 0) goto <D.23521>; else goto <D.23522>;
    <D.23521>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.23522>:
    D.23523 = ret != 0;
    D.23524 = (long int) D.23523;
    D.23525 = __builtin_expect (D.23524, 0);
    if (D.23525 != 0) goto <D.23526>; else goto <D.23527>;
    <D.23526>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1141, "ret == 0");
    <D.23527>:
  }
  code.32 = code;
  if (code.32 == 0B) goto <D.23528>; else goto <D.23529>;
  <D.23528>:
  {
    void * tmp;

    tmp = mono_arch_create_handler_block_trampoline ();
    mono_memory_barrier ();
    code = tmp;
  }
  <D.23529>:
  {
    int ret;

    ret = pthread_mutex_unlock (&trampolines_mutex.mutex);
    if (ret != 0) goto <D.23530>; else goto <D.23531>;
    <D.23530>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.23531>:
    D.23532 = ret != 0;
    D.23533 = (long int) D.23532;
    D.23534 = __builtin_expect (D.23533, 0);
    if (D.23534 != 0) goto <D.23535>; else goto <D.23536>;
    <D.23535>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1148, "ret == 0");
    <D.23536>:
  }
  D.23515 = code;
  return D.23515;
}


mono_memory_barrier ()
{
  __sync_synchronize ();
}


mono_get_trampoline_func (MonoTrampolineType tramp_type)
{
  const void * D.23538;

  switch (tramp_type) <default: <D.22617>, case 0: <D.22603>, case 1: <D.22604>, case 2: <D.22605>, case 3: <D.22606>, case 4: <D.22607>, case 5: <D.22608>, case 6: <D.22609>, case 7: <D.22610>, case 8: <D.22611>, case 9: <D.22612>, case 10: <D.22613>, case 11: <D.22614>, case 12: <D.22615>, case 13: <D.22616>>
  <D.22603>:
  <D.22604>:
  D.23538 = mono_magic_trampoline;
  return D.23538;
  <D.22605>:
  D.23538 = mono_class_init_trampoline;
  return D.23538;
  <D.22606>:
  D.23538 = mono_generic_class_init_trampoline;
  return D.23538;
  <D.22607>:
  D.23538 = mono_rgctx_lazy_fetch_trampoline;
  return D.23538;
  <D.22608>:
  D.23538 = mono_aot_trampoline;
  return D.23538;
  <D.22609>:
  D.23538 = mono_aot_plt_trampoline;
  return D.23538;
  <D.22610>:
  D.23538 = mono_delegate_trampoline;
  return D.23538;
  <D.22611>:
  D.23538 = mono_altstack_restore_prot;
  return D.23538;
  <D.22612>:
  D.23538 = mono_generic_virtual_remoting_trampoline;
  return D.23538;
  <D.22613>:
  D.23538 = mono_monitor_enter_trampoline;
  return D.23538;
  <D.22614>:
  D.23538 = mono_monitor_exit_trampoline;
  return D.23538;
  <D.22615>:
  D.23538 = mono_vcall_trampoline;
  return D.23538;
  <D.22616>:
  D.23538 = mono_handler_block_guard_trampoline;
  return D.23538;
  <D.22617>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-trampolines.c", 1200);
  D.23538 = 0B;
  return D.23538;
}


mono_handler_block_guard_trampoline (mgreg_t * regs, guint8 * code, void * * tramp_data, guint8 * tramp)
{
  unsigned int mono_jit_tls_id.34;
  struct MonoContext * D.23541;
  void * D.23542;
  long int D.23543;
  void * D.23549;
  struct MonoContext ctx;
  struct MonoException * exc;
  struct MonoJitTlsData * jit_tls;
  void * resume_ip;

  try
    {
      mono_jit_tls_id.34 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.34);
      resume_ip = jit_tls->handler_block_return_address;
      D.23541 = &jit_tls->handler_block_context;
      memcpy (&ctx, D.23541, 136);
      D.23542 = jit_tls->handler_block_return_address;
      D.23543 = (long int) D.23542;
      ctx.rip = D.23543;
      jit_tls->handler_block_return_address = 0B;
      jit_tls->handler_block = 0B;
      if (resume_ip == 0B) goto <D.23544>; else goto <D.23545>;
      <D.23544>:
      exc = mono_get_exception_execution_engine ("Invalid internal state, resuming abort after handler block but no resume ip found");
      goto <D.23546>;
      <D.23545>:
      exc = mono_thread_resume_interruption ();
      <D.23546>:
      if (exc != 0B) goto <D.23547>; else goto <D.23548>;
      <D.23547>:
      mono_handle_exception (&ctx, exc);
      mono_restore_context (&ctx);
      <D.23548>:
      D.23549 = resume_ip;
      return D.23549;
    }
  finally
    {
      ctx = {CLOBBER};
    }
}


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

  D.23553 = __builtin_object_size (__dest, 0);
  D.23552 = __builtin___memcpy_chk (__dest, __src, __len, D.23553);
  return D.23552;
}


mono_vcall_trampoline (mgreg_t * regs, guint8 * code, int slot, guint8 * tramp)
{
  unsigned int trampoline_calls.35;
  unsigned int trampoline_calls.36;
  _Bool D.23557;
  long int D.23558;
  long int D.23559;
  struct MonoDomain * D.23564;
  struct MonoClass * D.23567;
  unsigned char D.23568;
  unsigned char D.23569;
  struct MonoDomain * D.23572;
  int D.23573;
  void * D.23576;
  struct MonoDomain * D.23577;
  long unsigned int D.23579;
  long unsigned int D.23580;
  struct MonoObject * this;
  struct MonoVTable * vt;
  void * * vtable_slot;
  struct MonoMethod * m;
  gboolean need_rgctx_tramp;
  void * addr;

  need_rgctx_tramp = 0;
  trampoline_calls.35 = trampoline_calls;
  trampoline_calls.36 = trampoline_calls.35 + 1;
  trampoline_calls = trampoline_calls.36;
  this = mono_arch_get_this_arg_from_call (regs, code);
  D.23557 = this == 0B;
  D.23558 = (long int) D.23557;
  D.23559 = __builtin_expect (D.23558, 0);
  if (D.23559 != 0) goto <D.23560>; else goto <D.23561>;
  <D.23560>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 732, "this");
  <D.23561>:
  vt = this->vtable;
  if (slot >= 0) goto <D.23562>; else goto <D.23563>;
  <D.23562>:
  vtable_slot = &vt->vtable[slot];
  D.23564 = mono_domain_get ();
  addr = mono_aot_get_method_from_vt_slot (D.23564, vt, slot);
  if (addr != 0B) goto <D.23565>; else goto <D.23566>;
  <D.23565>:
  D.23567 = vt->klass;
  D.23568 = BIT_FIELD_REF <*D.23567, 8, 256>;
  D.23569 = D.23568 & 8;
  if (D.23569 == 0) goto <D.23570>; else goto <D.23571>;
  <D.23570>:
  D.23572 = mono_domain_get ();
  D.23573 = mono_domain_owns_vtable_slot (D.23572, vtable_slot);
  if (D.23573 != 0) goto <D.23574>; else goto <D.23575>;
  <D.23574>:
  *vtable_slot = addr;
  <D.23575>:
  D.23577 = mono_domain_get ();
  D.23576 = mono_create_ftnptr (D.23577, addr);
  return D.23576;
  <D.23571>:
  <D.23566>:
  D.23567 = vt->klass;
  m = mono_class_get_vtable_entry (D.23567, slot);
  need_rgctx_tramp = mono_method_needs_static_rgctx_invoke (m, 0);
  goto <D.23578>;
  <D.23563>:
  D.23579 = (long unsigned int) slot;
  D.23580 = D.23579 * 8;
  vtable_slot = vt + D.23580;
  m = 0B;
  need_rgctx_tramp = 0;
  <D.23578>:
  D.23576 = common_call_trampoline (regs, code, m, tramp, vt, vtable_slot, need_rgctx_tramp);
  return D.23576;
}


mono_rgctx_lazy_fetch_trampoline (mgreg_t * regs, guint8 * code, void * data, guint8 * tramp)
{
  long int data.37;
  mgreg_t * D.23583;
  long int D.23584;
  signed int slot.38;
  _Bool D.23586;
  unsigned int trampoline_calls.39;
  unsigned int trampoline_calls.40;
  int inited.41;
  int num_lookups.42;
  int num_lookups.43;
  void * D.23596;
  static gboolean inited = 0;
  static int num_lookups = 0;
  guint32 slot;
  mgreg_t * r;
  void * arg;
  guint32 index;
  gboolean mrgctx;

  data.37 = (long int) data;
  slot = (guint32) data.37;
  r = regs;
  D.23583 = r + 56;
  D.23584 = *D.23583;
  arg = (void *) D.23584;
  index = slot & 2147483647;
  slot.38 = (signed int) slot;
  D.23586 = slot.38 < 0;
  mrgctx = (gboolean) D.23586;
  trampoline_calls.39 = trampoline_calls;
  trampoline_calls.40 = trampoline_calls.39 + 1;
  trampoline_calls = trampoline_calls.40;
  inited.41 = inited;
  if (inited.41 == 0) goto <D.23590>; else goto <D.23591>;
  <D.23590>:
  mono_counters_register ("RGCTX unmanaged lookups", 2048, &num_lookups);
  inited = 1;
  <D.23591>:
  num_lookups.42 = num_lookups;
  num_lookups.43 = num_lookups.42 + 1;
  num_lookups = num_lookups.43;
  if (mrgctx != 0) goto <D.23594>; else goto <D.23595>;
  <D.23594>:
  D.23596 = mono_method_fill_runtime_generic_context (arg, code, index);
  return D.23596;
  <D.23595>:
  D.23596 = mono_class_fill_runtime_generic_context (arg, code, index);
  return D.23596;
}


mono_trampolines_init ()
{
  int mono_aot_only.44;
  guchar * D.23601;
  guchar * D.23602;
  guchar * D.23603;
  guchar * D.23604;
  guchar * D.23605;
  guchar * D.23606;
  guchar * D.23607;
  guchar * D.23608;
  guchar * D.23609;
  guchar * D.23610;
  guchar * D.23611;
  guchar * D.23612;
  guchar * D.23613;
  guchar * D.23614;

  InitializeCriticalSection (&trampolines_mutex);
  mono_aot_only.44 = mono_aot_only;
  if (mono_aot_only.44 != 0) goto <D.23599>; else goto <D.23600>;
  <D.23599>:
  return;
  <D.23600>:
  D.23601 = create_trampoline_code (0);
  mono_trampoline_code[0] = D.23601;
  D.23602 = create_trampoline_code (1);
  mono_trampoline_code[1] = D.23602;
  D.23603 = create_trampoline_code (2);
  mono_trampoline_code[2] = D.23603;
  D.23604 = create_trampoline_code (3);
  mono_trampoline_code[3] = D.23604;
  D.23605 = create_trampoline_code (4);
  mono_trampoline_code[4] = D.23605;
  D.23606 = create_trampoline_code (5);
  mono_trampoline_code[5] = D.23606;
  D.23607 = create_trampoline_code (6);
  mono_trampoline_code[6] = D.23607;
  D.23608 = create_trampoline_code (7);
  mono_trampoline_code[7] = D.23608;
  D.23609 = create_trampoline_code (8);
  mono_trampoline_code[8] = D.23609;
  D.23610 = create_trampoline_code (9);
  mono_trampoline_code[9] = D.23610;
  D.23611 = create_trampoline_code (10);
  mono_trampoline_code[10] = D.23611;
  D.23612 = create_trampoline_code (11);
  mono_trampoline_code[11] = D.23612;
  D.23613 = create_trampoline_code (12);
  mono_trampoline_code[12] = D.23613;
  D.23614 = create_trampoline_code (13);
  mono_trampoline_code[13] = D.23614;
  mono_create_handler_block_trampoline ();
  mono_counters_register ("Calls to trampolines", 256, &trampoline_calls);
  mono_counters_register ("JIT trampolines", 256, &jit_trampolines);
  mono_counters_register ("Unbox trampolines", 256, &unbox_trampolines);
  mono_counters_register ("Static rgctx trampolines", 256, &static_rgctx_trampolines);
}


create_trampoline_code (MonoTrampolineType tramp_type)
{
  struct MonoTrampInfo * info.45;
  guchar * D.23617;
  struct MonoTrampInfo * info;
  guchar * code;

  try
    {
      code = mono_arch_create_generic_trampoline (tramp_type, &info, 0);
      info.45 = info;
      mono_tramp_info_register (info.45);
      D.23617 = code;
      return D.23617;
    }
  finally
    {
      info = {CLOBBER};
    }
}


mono_trampolines_cleanup ()
{
  struct GHashTable * class_init_hash_addr.46;
  struct GHashTable * rgctx_lazy_fetch_trampoline_hash.47;
  struct GHashTable * rgctx_lazy_fetch_trampoline_hash_addr.48;

  class_init_hash_addr.46 = class_init_hash_addr;
  if (class_init_hash_addr.46 != 0B) goto <D.23621>; else goto <D.23622>;
  <D.23621>:
  class_init_hash_addr.46 = class_init_hash_addr;
  monoeg_g_hash_table_destroy (class_init_hash_addr.46);
  <D.23622>:
  rgctx_lazy_fetch_trampoline_hash.47 = rgctx_lazy_fetch_trampoline_hash;
  if (rgctx_lazy_fetch_trampoline_hash.47 != 0B) goto <D.23624>; else goto <D.23625>;
  <D.23624>:
  rgctx_lazy_fetch_trampoline_hash.47 = rgctx_lazy_fetch_trampoline_hash;
  monoeg_g_hash_table_destroy (rgctx_lazy_fetch_trampoline_hash.47);
  <D.23625>:
  rgctx_lazy_fetch_trampoline_hash_addr.48 = rgctx_lazy_fetch_trampoline_hash_addr;
  if (rgctx_lazy_fetch_trampoline_hash_addr.48 != 0B) goto <D.23627>; else goto <D.23628>;
  <D.23627>:
  rgctx_lazy_fetch_trampoline_hash_addr.48 = rgctx_lazy_fetch_trampoline_hash_addr;
  monoeg_g_hash_table_destroy (rgctx_lazy_fetch_trampoline_hash_addr.48);
  <D.23628>:
  DeleteCriticalSection (&trampolines_mutex);
}


mono_get_trampoline_code (MonoTrampolineType tramp_type)
{
  guint8 * D.23629;
  _Bool D.23630;
  long int D.23631;
  long int D.23632;
  guint8 * D.23635;

  D.23629 = mono_trampoline_code[tramp_type];
  D.23630 = D.23629 == 0B;
  D.23631 = (long int) D.23630;
  D.23632 = __builtin_expect (D.23631, 0);
  if (D.23632 != 0) goto <D.23633>; else goto <D.23634>;
  <D.23633>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1271, "mono_trampoline_code [tramp_type]");
  <D.23634>:
  D.23635 = mono_trampoline_code[tramp_type];
  return D.23635;
}


mono_create_specific_trampoline (void * arg1, MonoTrampolineType tramp_type, struct MonoDomain * domain, guint32 * code_len)
{
  int mono_aot_only.49;
  void * D.23640;
  struct MonoImage * D.23641;

  mono_aot_only.49 = mono_aot_only;
  if (mono_aot_only.49 != 0) goto <D.23638>; else goto <D.23639>;
  <D.23638>:
  D.23641 = mono_defaults.corlib;
  D.23640 = mono_aot_create_specific_trampoline (D.23641, arg1, tramp_type, domain, code_len);
  return D.23640;
  <D.23639>:
  D.23640 = mono_arch_create_specific_trampoline (arg1, tramp_type, domain, code_len);
  return D.23640;
}


mono_create_class_init_trampoline (struct MonoVTable * vtable)
{
  struct MonoClass * D.23643;
  struct MonoGenericContainer * D.23644;
  _Bool D.23645;
  long int D.23646;
  long int D.23647;
  union mono_mutex_t * D.23650;
  _Bool D.23653;
  long int D.23654;
  long int D.23655;
  void * D.23658;
  struct GHashTable * D.23659;
  _Bool D.23662;
  long int D.23663;
  long int D.23664;
  void * D.23669;
  _Bool D.23672;
  long int D.23673;
  long int D.23674;
  _Bool D.23679;
  long int D.23680;
  long int D.23681;
  _Bool D.23686;
  long int D.23687;
  long int D.23688;
  struct GHashTable * class_init_hash_addr.50;
  struct GHashTable * class_init_hash_addr.51;
  _Bool D.23697;
  long int D.23698;
  long int D.23699;
  void * code;
  void * ptr;
  struct MonoDomain * domain;

  domain = vtable->domain;
  D.23643 = vtable->klass;
  D.23644 = D.23643->generic_container;
  D.23645 = D.23644 != 0B;
  D.23646 = (long int) D.23645;
  D.23647 = __builtin_expect (D.23646, 0);
  if (D.23647 != 0) goto <D.23648>; else goto <D.23649>;
  <D.23648>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1291, "!vtable->klass->generic_container");
  <D.23649>:
  {
    int ret;

    D.23650 = &domain->lock.mutex;
    ret = pthread_mutex_lock (D.23650);
    if (ret != 0) goto <D.23651>; else goto <D.23652>;
    <D.23651>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.23652>:
    D.23653 = ret != 0;
    D.23654 = (long int) D.23653;
    D.23655 = __builtin_expect (D.23654, 0);
    if (D.23655 != 0) goto <D.23656>; else goto <D.23657>;
    <D.23656>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1294, "ret == 0");
    <D.23657>:
  }
  D.23658 = domain->runtime_info;
  D.23659 = MEM[(struct MonoJitDomainInfo *)D.23658].class_init_trampoline_hash;
  ptr = monoeg_g_hash_table_lookup (D.23659, vtable);
  {
    int ret;

    D.23650 = &domain->lock.mutex;
    ret = pthread_mutex_unlock (D.23650);
    if (ret != 0) goto <D.23660>; else goto <D.23661>;
    <D.23660>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.23661>:
    D.23662 = ret != 0;
    D.23663 = (long int) D.23662;
    D.23664 = __builtin_expect (D.23663, 0);
    if (D.23664 != 0) goto <D.23665>; else goto <D.23666>;
    <D.23665>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1298, "ret == 0");
    <D.23666>:
  }
  if (ptr != 0B) goto <D.23667>; else goto <D.23668>;
  <D.23667>:
  D.23669 = ptr;
  return D.23669;
  <D.23668>:
  code = mono_create_specific_trampoline (vtable, 2, domain, 0B);
  ptr = mono_create_ftnptr (domain, code);
  {
    int ret;

    D.23650 = &domain->lock.mutex;
    ret = pthread_mutex_lock (D.23650);
    if (ret != 0) goto <D.23670>; else goto <D.23671>;
    <D.23670>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.23671>:
    D.23672 = ret != 0;
    D.23673 = (long int) D.23672;
    D.23674 = __builtin_expect (D.23673, 0);
    if (D.23674 != 0) goto <D.23675>; else goto <D.23676>;
    <D.23675>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1307, "ret == 0");
    <D.23676>:
  }
  D.23658 = domain->runtime_info;
  D.23659 = MEM[(struct MonoJitDomainInfo *)D.23658].class_init_trampoline_hash;
  monoeg_g_hash_table_insert_replace (D.23659, vtable, ptr, 0);
  {
    int ret;

    D.23650 = &domain->lock.mutex;
    ret = pthread_mutex_unlock (D.23650);
    if (ret != 0) goto <D.23677>; else goto <D.23678>;
    <D.23677>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.23678>:
    D.23679 = ret != 0;
    D.23680 = (long int) D.23679;
    D.23681 = __builtin_expect (D.23680, 0);
    if (D.23681 != 0) goto <D.23682>; else goto <D.23683>;
    <D.23682>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1310, "ret == 0");
    <D.23683>:
  }
  {
    int ret;

    ret = pthread_mutex_lock (&trampolines_mutex.mutex);
    if (ret != 0) goto <D.23684>; else goto <D.23685>;
    <D.23684>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.23685>:
    D.23686 = ret != 0;
    D.23687 = (long int) D.23686;
    D.23688 = __builtin_expect (D.23687, 0);
    if (D.23688 != 0) goto <D.23689>; else goto <D.23690>;
    <D.23689>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1312, "ret == 0");
    <D.23690>:
  }
  class_init_hash_addr.50 = class_init_hash_addr;
  if (class_init_hash_addr.50 == 0B) goto <D.23692>; else goto <D.23693>;
  <D.23692>:
  class_init_hash_addr.51 = monoeg_g_hash_table_new (0B, 0B);
  class_init_hash_addr = class_init_hash_addr.51;
  <D.23693>:
  class_init_hash_addr.50 = class_init_hash_addr;
  monoeg_g_hash_table_insert_replace (class_init_hash_addr.50, ptr, vtable, 0);
  {
    int ret;

    ret = pthread_mutex_unlock (&trampolines_mutex.mutex);
    if (ret != 0) goto <D.23695>; else goto <D.23696>;
    <D.23695>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.23696>:
    D.23697 = ret != 0;
    D.23698 = (long int) D.23697;
    D.23699 = __builtin_expect (D.23698, 0);
    if (D.23699 != 0) goto <D.23700>; else goto <D.23701>;
    <D.23700>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1316, "ret == 0");
    <D.23701>:
  }
  D.23669 = ptr;
  return D.23669;
}


mono_create_generic_class_init_trampoline ()
{
  _Bool D.23705;
  long int D.23706;
  long int D.23707;
  void * code.52;
  int mono_aot_only.53;
  void * D.23716;
  void * code.54;
  void * code.55;
  struct MonoTrampInfo * info.56;
  _Bool D.23723;
  long int D.23724;
  long int D.23725;
  void * D.23728;
  static void * code;
  struct MonoTrampInfo * info;

  try
    {
      {
        int ret;

        ret = pthread_mutex_lock (&trampolines_mutex.mutex);
        if (ret != 0) goto <D.23703>; else goto <D.23704>;
        <D.23703>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23704>:
        D.23705 = ret != 0;
        D.23706 = (long int) D.23705;
        D.23707 = __builtin_expect (D.23706, 0);
        if (D.23707 != 0) goto <D.23708>; else goto <D.23709>;
        <D.23708>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1328, "ret == 0");
        <D.23709>:
      }
      code.52 = code;
      if (code.52 == 0B) goto <D.23711>; else goto <D.23712>;
      <D.23711>:
      mono_aot_only.53 = mono_aot_only;
      if (mono_aot_only.53 != 0) goto <D.23714>; else goto <D.23715>;
      <D.23714>:
      D.23716 = mono_aot_get_trampoline ("generic_class_init_trampoline");
      code.54 = mono_get_addr_from_ftnptr (D.23716);
      code = code.54;
      goto <D.23718>;
      <D.23715>:
      code.55 = mono_arch_create_generic_class_init_trampoline (&info, 0);
      code = code.55;
      info.56 = info;
      mono_tramp_info_register (info.56);
      <D.23718>:
      <D.23712>:
      {
        int ret;

        ret = pthread_mutex_unlock (&trampolines_mutex.mutex);
        if (ret != 0) goto <D.23721>; else goto <D.23722>;
        <D.23721>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23722>:
        D.23723 = ret != 0;
        D.23724 = (long int) D.23723;
        D.23725 = __builtin_expect (D.23724, 0);
        if (D.23725 != 0) goto <D.23726>; else goto <D.23727>;
        <D.23726>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1340, "ret == 0");
        <D.23727>:
      }
      D.23728 = code;
      return D.23728;
    }
  finally
    {
      info = {CLOBBER};
    }
}


mono_create_jump_trampoline (struct MonoDomain * domain, struct MonoMethod * method, gboolean add_sync_wrapper)
{
  struct MonoJitInfo * ji.57;
  unsigned char D.23734;
  unsigned char D.23735;
  short unsigned int D.23738;
  int D.23739;
  int D.23740;
  void * D.23743;
  union mono_mutex_t * D.23744;
  _Bool D.23747;
  long int D.23748;
  long int D.23749;
  void * D.23752;
  struct GHashTable * D.23753;
  _Bool D.23756;
  long int D.23757;
  long int D.23758;
  struct MonoDomain * D.23763;
  unsigned int code_size.58;
  _Bool D.23765;
  long int D.23766;
  long int D.23767;
  void * ji.59;
  int code_size.60;
  _Bool D.23774;
  long int D.23775;
  long int D.23776;
  void * D.23779;
  _Bool D.23782;
  long int D.23783;
  long int D.23784;
  struct MonoJitInfo * ji;
  void * code;
  guint32 code_size;

  try
    {
      code_size = 0;
      code = mono_jit_find_compiled_method_with_jit_info (domain, method, &ji);
      if (code != 0B) goto <D.23731>; else goto <D.23732>;
      <D.23731>:
      ji.57 = ji;
      D.23734 = BIT_FIELD_REF <*ji.57, 8, 272>;
      D.23735 = D.23734 & 2;
      if (D.23735 == 0) goto <D.23736>; else goto <D.23737>;
      <D.23736>:
      D.23738 = method->iflags;
      D.23739 = (int) D.23738;
      D.23740 = D.23739 & 32;
      if (D.23740 == 0) goto <D.23741>; else goto <D.23742>;
      <D.23741>:
      D.23743 = code;
      return D.23743;
      <D.23742>:
      <D.23737>:
      <D.23732>:
      {
        int ret;

        D.23744 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23744);
        if (ret != 0) goto <D.23745>; else goto <D.23746>;
        <D.23745>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23746>:
        D.23747 = ret != 0;
        D.23748 = (long int) D.23747;
        D.23749 = __builtin_expect (D.23748, 0);
        if (D.23749 != 0) goto <D.23750>; else goto <D.23751>;
        <D.23750>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1365, "ret == 0");
        <D.23751>:
      }
      D.23752 = domain->runtime_info;
      D.23753 = MEM[(struct MonoJitDomainInfo *)D.23752].jump_trampoline_hash;
      code = monoeg_g_hash_table_lookup (D.23753, method);
      {
        int ret;

        D.23744 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23744);
        if (ret != 0) goto <D.23754>; else goto <D.23755>;
        <D.23754>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23755>:
        D.23756 = ret != 0;
        D.23757 = (long int) D.23756;
        D.23758 = __builtin_expect (D.23757, 0);
        if (D.23758 != 0) goto <D.23759>; else goto <D.23760>;
        <D.23759>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1367, "ret == 0");
        <D.23760>:
      }
      if (code != 0B) goto <D.23761>; else goto <D.23762>;
      <D.23761>:
      D.23743 = code;
      return D.23743;
      <D.23762>:
      D.23763 = mono_domain_get ();
      code = mono_create_specific_trampoline (method, 1, D.23763, &code_size);
      code_size.58 = code_size;
      D.23765 = code_size.58 == 0;
      D.23766 = (long int) D.23765;
      D.23767 = __builtin_expect (D.23766, 0);
      if (D.23767 != 0) goto <D.23768>; else goto <D.23769>;
      <D.23768>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1372, "code_size");
      <D.23769>:
      ji.59 = mono_domain_alloc0 (domain, 48);
      ji = ji.59;
      ji.57 = ji;
      ji.57->code_start = code;
      ji.57 = ji;
      code_size.58 = code_size;
      code_size.60 = (int) code_size.58;
      ji.57->code_size = code_size.60;
      ji.57 = ji;
      ji.57->d.method = method;
      ji.57 = ji;
      mono_jit_info_table_add (domain, ji.57);
      {
        int ret;

        D.23744 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23744);
        if (ret != 0) goto <D.23772>; else goto <D.23773>;
        <D.23772>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23773>:
        D.23774 = ret != 0;
        D.23775 = (long int) D.23774;
        D.23776 = __builtin_expect (D.23775, 0);
        if (D.23776 != 0) goto <D.23777>; else goto <D.23778>;
        <D.23777>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1386, "ret == 0");
        <D.23778>:
      }
      ji.57 = ji;
      D.23779 = ji.57->code_start;
      D.23752 = domain->runtime_info;
      D.23753 = MEM[(struct MonoJitDomainInfo *)D.23752].jump_trampoline_hash;
      monoeg_g_hash_table_insert_replace (D.23753, method, D.23779, 0);
      {
        int ret;

        D.23744 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23744);
        if (ret != 0) goto <D.23780>; else goto <D.23781>;
        <D.23780>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23781>:
        D.23782 = ret != 0;
        D.23783 = (long int) D.23782;
        D.23784 = __builtin_expect (D.23783, 0);
        if (D.23784 != 0) goto <D.23785>; else goto <D.23786>;
        <D.23785>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1388, "ret == 0");
        <D.23786>:
      }
      ji.57 = ji;
      D.23743 = ji.57->code_start;
      return D.23743;
    }
  finally
    {
      ji = {CLOBBER};
      code_size = {CLOBBER};
    }
}


mono_create_jit_trampoline_in_domain (struct MonoDomain * domain, struct MonoMethod * method)
{
  int mono_aot_only.61;
  void * D.23794;
  union mono_mutex_t * D.23795;
  _Bool D.23798;
  long int D.23799;
  long int D.23800;
  void * D.23803;
  struct GHashTable * D.23804;
  _Bool D.23807;
  long int D.23808;
  long int D.23809;
  _Bool D.23816;
  long int D.23817;
  long int D.23818;
  _Bool D.23823;
  long int D.23824;
  long int D.23825;
  unsigned int jit_trampolines.62;
  unsigned int jit_trampolines.63;
  void * tramp;

  mono_aot_only.61 = mono_aot_only;
  if (mono_aot_only.61 != 0) goto <D.23790>; else goto <D.23791>;
  <D.23790>:
  {
    void * code;

    code = mono_jit_find_compiled_method (domain, method);
    if (code != 0B) goto <D.23792>; else goto <D.23793>;
    <D.23792>:
    D.23794 = code;
    return D.23794;
    <D.23793>:
  }
  <D.23791>:
  {
    int ret;

    D.23795 = &domain->lock.mutex;
    ret = pthread_mutex_lock (D.23795);
    if (ret != 0) goto <D.23796>; else goto <D.23797>;
    <D.23796>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.23797>:
    D.23798 = ret != 0;
    D.23799 = (long int) D.23798;
    D.23800 = __builtin_expect (D.23799, 0);
    if (D.23800 != 0) goto <D.23801>; else goto <D.23802>;
    <D.23801>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1406, "ret == 0");
    <D.23802>:
  }
  D.23803 = domain->runtime_info;
  D.23804 = MEM[(struct MonoJitDomainInfo *)D.23803].jit_trampoline_hash;
  tramp = monoeg_g_hash_table_lookup (D.23804, method);
  {
    int ret;

    D.23795 = &domain->lock.mutex;
    ret = pthread_mutex_unlock (D.23795);
    if (ret != 0) goto <D.23805>; else goto <D.23806>;
    <D.23805>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.23806>:
    D.23807 = ret != 0;
    D.23808 = (long int) D.23807;
    D.23809 = __builtin_expect (D.23808, 0);
    if (D.23809 != 0) goto <D.23810>; else goto <D.23811>;
    <D.23810>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1408, "ret == 0");
    <D.23811>:
  }
  if (tramp != 0B) goto <D.23812>; else goto <D.23813>;
  <D.23812>:
  D.23794 = tramp;
  return D.23794;
  <D.23813>:
  tramp = mono_create_specific_trampoline (method, 0, domain, 0B);
  {
    int ret;

    D.23795 = &domain->lock.mutex;
    ret = pthread_mutex_lock (D.23795);
    if (ret != 0) goto <D.23814>; else goto <D.23815>;
    <D.23814>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.23815>:
    D.23816 = ret != 0;
    D.23817 = (long int) D.23816;
    D.23818 = __builtin_expect (D.23817, 0);
    if (D.23818 != 0) goto <D.23819>; else goto <D.23820>;
    <D.23819>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1414, "ret == 0");
    <D.23820>:
  }
  D.23803 = domain->runtime_info;
  D.23804 = MEM[(struct MonoJitDomainInfo *)D.23803].jit_trampoline_hash;
  monoeg_g_hash_table_insert_replace (D.23804, method, tramp, 0);
  {
    int ret;

    D.23795 = &domain->lock.mutex;
    ret = pthread_mutex_unlock (D.23795);
    if (ret != 0) goto <D.23821>; else goto <D.23822>;
    <D.23821>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.23822>:
    D.23823 = ret != 0;
    D.23824 = (long int) D.23823;
    D.23825 = __builtin_expect (D.23824, 0);
    if (D.23825 != 0) goto <D.23826>; else goto <D.23827>;
    <D.23826>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1416, "ret == 0");
    <D.23827>:
  }
  jit_trampolines.62 = jit_trampolines;
  jit_trampolines.63 = jit_trampolines.62 + 1;
  jit_trampolines = jit_trampolines.63;
  D.23794 = tramp;
  return D.23794;
}


mono_create_jit_trampoline (struct MonoMethod * method)
{
  void * D.23831;
  struct MonoDomain * D.23832;

  D.23832 = mono_domain_get ();
  D.23831 = mono_create_jit_trampoline_in_domain (D.23832, method);
  return D.23831;
}


mono_create_jit_trampoline_from_token (struct MonoImage * image, guint32 token)
{
  unsigned int jit_trampolines.64;
  unsigned int jit_trampolines.65;
  void * D.23836;
  void * tramp;
  struct MonoDomain * domain;
  guint8 * buf;
  guint8 * start;

  domain = mono_domain_get ();
  start = mono_domain_alloc0 (domain, 16);
  buf = start;
  MEM[(void * *)buf] = image;
  buf = buf + 8;
  MEM[(guint32 *)buf] = token;
  tramp = mono_create_specific_trampoline (start, 5, domain, 0B);
  jit_trampolines.64 = jit_trampolines;
  jit_trampolines.65 = jit_trampolines.64 + 1;
  jit_trampolines = jit_trampolines.65;
  D.23836 = tramp;
  return D.23836;
}


mono_create_delegate_trampoline (struct MonoDomain * domain, struct MonoClass * klass)
{
  union mono_mutex_t * D.23838;
  _Bool D.23841;
  long int D.23842;
  long int D.23843;
  void * D.23846;
  struct GHashTable * D.23847;
  _Bool D.23850;
  long int D.23851;
  long int D.23852;
  void * D.23857;
  _Bool D.23858;
  long int D.23859;
  long int D.23860;
  void * * D.23863;
  struct MonoMethodSignature * D.23864;
  void * D.23865;
  void * * D.23866;
  struct MonoMethodSignature * D.23867;
  void * D.23868;
  unsigned int code_size.66;
  _Bool D.23870;
  long int D.23871;
  long int D.23872;
  _Bool D.23877;
  long int D.23878;
  long int D.23879;
  _Bool D.23884;
  long int D.23885;
  long int D.23886;
  void * ptr;
  guint32 code_size;
  void * * tramp_data;
  struct MonoMethod * invoke;

  try
    {
      code_size = 0;
      {
        int ret;

        D.23838 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23838);
        if (ret != 0) goto <D.23839>; else goto <D.23840>;
        <D.23839>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23840>:
        D.23841 = ret != 0;
        D.23842 = (long int) D.23841;
        D.23843 = __builtin_expect (D.23842, 0);
        if (D.23843 != 0) goto <D.23844>; else goto <D.23845>;
        <D.23844>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1459, "ret == 0");
        <D.23845>:
      }
      D.23846 = domain->runtime_info;
      D.23847 = MEM[(struct MonoJitDomainInfo *)D.23846].delegate_trampoline_hash;
      ptr = monoeg_g_hash_table_lookup (D.23847, klass);
      {
        int ret;

        D.23838 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23838);
        if (ret != 0) goto <D.23848>; else goto <D.23849>;
        <D.23848>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23849>:
        D.23850 = ret != 0;
        D.23851 = (long int) D.23850;
        D.23852 = __builtin_expect (D.23851, 0);
        if (D.23852 != 0) goto <D.23853>; else goto <D.23854>;
        <D.23853>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1461, "ret == 0");
        <D.23854>:
      }
      if (ptr != 0B) goto <D.23855>; else goto <D.23856>;
      <D.23855>:
      D.23857 = ptr;
      return D.23857;
      <D.23856>:
      invoke = mono_get_delegate_invoke (klass);
      D.23858 = invoke == 0B;
      D.23859 = (long int) D.23858;
      D.23860 = __builtin_expect (D.23859, 0);
      if (D.23860 != 0) goto <D.23861>; else goto <D.23862>;
      <D.23861>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1467, "invoke");
      <D.23862>:
      tramp_data = mono_domain_alloc (domain, 24);
      *tramp_data = invoke;
      D.23863 = tramp_data + 8;
      D.23864 = mono_method_signature (invoke);
      D.23865 = mono_arch_get_delegate_invoke_impl (D.23864, 1);
      *D.23863 = D.23865;
      D.23866 = tramp_data + 16;
      D.23867 = mono_method_signature (invoke);
      D.23868 = mono_arch_get_delegate_invoke_impl (D.23867, 0);
      *D.23866 = D.23868;
      ptr = mono_create_specific_trampoline (tramp_data, 7, domain, &code_size);
      code_size.66 = code_size;
      D.23870 = code_size.66 == 0;
      D.23871 = (long int) D.23870;
      D.23872 = __builtin_expect (D.23871, 0);
      if (D.23872 != 0) goto <D.23873>; else goto <D.23874>;
      <D.23873>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1475, "code_size");
      <D.23874>:
      {
        int ret;

        D.23838 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.23838);
        if (ret != 0) goto <D.23875>; else goto <D.23876>;
        <D.23875>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23876>:
        D.23877 = ret != 0;
        D.23878 = (long int) D.23877;
        D.23879 = __builtin_expect (D.23878, 0);
        if (D.23879 != 0) goto <D.23880>; else goto <D.23881>;
        <D.23880>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1478, "ret == 0");
        <D.23881>:
      }
      D.23846 = domain->runtime_info;
      D.23847 = MEM[(struct MonoJitDomainInfo *)D.23846].delegate_trampoline_hash;
      monoeg_g_hash_table_insert_replace (D.23847, klass, ptr, 0);
      {
        int ret;

        D.23838 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.23838);
        if (ret != 0) goto <D.23882>; else goto <D.23883>;
        <D.23882>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23883>:
        D.23884 = ret != 0;
        D.23885 = (long int) D.23884;
        D.23886 = __builtin_expect (D.23885, 0);
        if (D.23886 != 0) goto <D.23887>; else goto <D.23888>;
        <D.23887>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1481, "ret == 0");
        <D.23888>:
      }
      D.23857 = ptr;
      return D.23857;
    }
  finally
    {
      code_size = {CLOBBER};
    }
}


mono_create_rgctx_lazy_fetch_trampoline (guint32 offset)
{
  _Bool D.23893;
  long int D.23894;
  long int D.23895;
  struct GHashTable * rgctx_lazy_fetch_trampoline_hash.67;
  long unsigned int D.23901;
  const void * D.23902;
  _Bool D.23906;
  long int D.23907;
  long int D.23908;
  void * D.23913;
  int mono_aot_only.68;
  struct MonoTrampInfo * info.69;
  struct MonoDomain * D.23919;
  _Bool D.23922;
  long int D.23923;
  long int D.23924;
  struct GHashTable * rgctx_lazy_fetch_trampoline_hash.70;
  struct GHashTable * rgctx_lazy_fetch_trampoline_hash_addr.71;
  void * D.23931;
  _Bool D.23932;
  long int D.23933;
  long int D.23934;
  unsigned int D.23937;
  long unsigned int D.23938;
  void * D.23939;
  struct GHashTable * rgctx_lazy_fetch_trampoline_hash_addr.72;
  _Bool D.23943;
  long int D.23944;
  long int D.23945;
  int inited.73;
  int num_trampolines.74;
  int num_trampolines.75;
  static gboolean inited = 0;
  static int num_trampolines = 0;
  struct MonoTrampInfo * info;
  void * tramp;
  void * ptr;

  try
    {
      {
        int ret;

        ret = pthread_mutex_lock (&trampolines_mutex.mutex);
        if (ret != 0) goto <D.23891>; else goto <D.23892>;
        <D.23891>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23892>:
        D.23893 = ret != 0;
        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", "mini-trampolines.c", 1498, "ret == 0");
        <D.23897>:
      }
      rgctx_lazy_fetch_trampoline_hash.67 = rgctx_lazy_fetch_trampoline_hash;
      if (rgctx_lazy_fetch_trampoline_hash.67 != 0B) goto <D.23899>; else goto <D.23900>;
      <D.23899>:
      D.23901 = (long unsigned int) offset;
      D.23902 = (const void *) D.23901;
      rgctx_lazy_fetch_trampoline_hash.67 = rgctx_lazy_fetch_trampoline_hash;
      tramp = monoeg_g_hash_table_lookup (rgctx_lazy_fetch_trampoline_hash.67, D.23902);
      goto <D.23903>;
      <D.23900>:
      tramp = 0B;
      <D.23903>:
      {
        int ret;

        ret = pthread_mutex_unlock (&trampolines_mutex.mutex);
        if (ret != 0) goto <D.23904>; else goto <D.23905>;
        <D.23904>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23905>:
        D.23906 = ret != 0;
        D.23907 = (long int) D.23906;
        D.23908 = __builtin_expect (D.23907, 0);
        if (D.23908 != 0) goto <D.23909>; else goto <D.23910>;
        <D.23909>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1503, "ret == 0");
        <D.23910>:
      }
      if (tramp != 0B) goto <D.23911>; else goto <D.23912>;
      <D.23911>:
      D.23913 = tramp;
      return D.23913;
      <D.23912>:
      mono_aot_only.68 = mono_aot_only;
      if (mono_aot_only.68 != 0) goto <D.23915>; else goto <D.23916>;
      <D.23915>:
      ptr = mono_aot_get_lazy_fetch_trampoline (offset);
      goto <D.23917>;
      <D.23916>:
      tramp = mono_arch_create_rgctx_lazy_fetch_trampoline (offset, &info, 0);
      info.69 = info;
      mono_tramp_info_register (info.69);
      D.23919 = mono_get_root_domain ();
      ptr = mono_create_ftnptr (D.23919, tramp);
      <D.23917>:
      {
        int ret;

        ret = pthread_mutex_lock (&trampolines_mutex.mutex);
        if (ret != 0) goto <D.23920>; else goto <D.23921>;
        <D.23920>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23921>:
        D.23922 = ret != 0;
        D.23923 = (long int) D.23922;
        D.23924 = __builtin_expect (D.23923, 0);
        if (D.23924 != 0) goto <D.23925>; else goto <D.23926>;
        <D.23925>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1515, "ret == 0");
        <D.23926>:
      }
      rgctx_lazy_fetch_trampoline_hash.67 = rgctx_lazy_fetch_trampoline_hash;
      if (rgctx_lazy_fetch_trampoline_hash.67 == 0B) goto <D.23927>; else goto <D.23928>;
      <D.23927>:
      rgctx_lazy_fetch_trampoline_hash.70 = monoeg_g_hash_table_new (0B, 0B);
      rgctx_lazy_fetch_trampoline_hash = rgctx_lazy_fetch_trampoline_hash.70;
      rgctx_lazy_fetch_trampoline_hash_addr.71 = monoeg_g_hash_table_new (0B, 0B);
      rgctx_lazy_fetch_trampoline_hash_addr = rgctx_lazy_fetch_trampoline_hash_addr.71;
      <D.23928>:
      D.23901 = (long unsigned int) offset;
      D.23931 = (void *) D.23901;
      rgctx_lazy_fetch_trampoline_hash.67 = rgctx_lazy_fetch_trampoline_hash;
      monoeg_g_hash_table_insert_replace (rgctx_lazy_fetch_trampoline_hash.67, D.23931, ptr, 0);
      D.23932 = offset == 4294967295;
      D.23933 = (long int) D.23932;
      D.23934 = __builtin_expect (D.23933, 0);
      if (D.23934 != 0) goto <D.23935>; else goto <D.23936>;
      <D.23935>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1521, "offset != -1");
      <D.23936>:
      D.23937 = offset + 1;
      D.23938 = (long unsigned int) D.23937;
      D.23939 = (void *) D.23938;
      rgctx_lazy_fetch_trampoline_hash_addr.72 = rgctx_lazy_fetch_trampoline_hash_addr;
      monoeg_g_hash_table_insert_replace (rgctx_lazy_fetch_trampoline_hash_addr.72, ptr, D.23939, 0);
      {
        int ret;

        ret = pthread_mutex_unlock (&trampolines_mutex.mutex);
        if (ret != 0) goto <D.23941>; else goto <D.23942>;
        <D.23941>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23942>:
        D.23943 = ret != 0;
        D.23944 = (long int) D.23943;
        D.23945 = __builtin_expect (D.23944, 0);
        if (D.23945 != 0) goto <D.23946>; else goto <D.23947>;
        <D.23946>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1523, "ret == 0");
        <D.23947>:
      }
      inited.73 = inited;
      if (inited.73 == 0) goto <D.23949>; else goto <D.23950>;
      <D.23949>:
      mono_counters_register ("RGCTX num lazy fetch trampolines", 2048, &num_trampolines);
      inited = 1;
      <D.23950>:
      num_trampolines.74 = num_trampolines;
      num_trampolines.75 = num_trampolines.74 + 1;
      num_trampolines = num_trampolines.75;
      D.23913 = ptr;
      return D.23913;
    }
  finally
    {
      info = {CLOBBER};
    }
}


mono_create_monitor_enter_trampoline ()
{
  int mono_aot_only.76;
  void * code.77;
  void * code.78;
  void * D.23962;
  _Bool D.23965;
  long int D.23966;
  long int D.23967;
  void * code.79;
  struct MonoTrampInfo * info.80;
  _Bool D.23976;
  long int D.23977;
  long int D.23978;
  static void * code;

  mono_aot_only.76 = mono_aot_only;
  if (mono_aot_only.76 != 0) goto <D.23956>; else goto <D.23957>;
  <D.23956>:
  code.77 = code;
  if (code.77 == 0B) goto <D.23959>; else goto <D.23960>;
  <D.23959>:
  code.78 = mono_aot_get_trampoline ("monitor_enter_trampoline");
  code = code.78;
  <D.23960>:
  D.23962 = code;
  return D.23962;
  <D.23957>:
  {
    int ret;

    ret = pthread_mutex_lock (&trampolines_mutex.mutex);
    if (ret != 0) goto <D.23963>; else goto <D.23964>;
    <D.23963>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.23964>:
    D.23965 = ret != 0;
    D.23966 = (long int) D.23965;
    D.23967 = __builtin_expect (D.23966, 0);
    if (D.23967 != 0) goto <D.23968>; else goto <D.23969>;
    <D.23968>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1547, "ret == 0");
    <D.23969>:
  }
  code.77 = code;
  if (code.77 == 0B) goto <D.23970>; else goto <D.23971>;
  <D.23970>:
  {
    struct MonoTrampInfo * info;

    try
      {
        code.79 = mono_arch_create_monitor_enter_trampoline (&info, 0);
        code = code.79;
        info.80 = info;
        mono_tramp_info_register (info.80);
      }
    finally
      {
        info = {CLOBBER};
      }
  }
  <D.23971>:
  {
    int ret;

    ret = pthread_mutex_unlock (&trampolines_mutex.mutex);
    if (ret != 0) goto <D.23974>; else goto <D.23975>;
    <D.23974>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.23975>:
    D.23976 = ret != 0;
    D.23977 = (long int) D.23976;
    D.23978 = __builtin_expect (D.23977, 0);
    if (D.23978 != 0) goto <D.23979>; else goto <D.23980>;
    <D.23979>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1556, "ret == 0");
    <D.23980>:
  }
  D.23962 = code;
  return D.23962;
}


mono_create_monitor_exit_trampoline ()
{
  int mono_aot_only.81;
  void * code.82;
  void * code.83;
  void * D.23989;
  _Bool D.23992;
  long int D.23993;
  long int D.23994;
  void * code.84;
  struct MonoTrampInfo * info.85;
  _Bool D.24003;
  long int D.24004;
  long int D.24005;
  static void * code;

  mono_aot_only.81 = mono_aot_only;
  if (mono_aot_only.81 != 0) goto <D.23983>; else goto <D.23984>;
  <D.23983>:
  code.82 = code;
  if (code.82 == 0B) goto <D.23986>; else goto <D.23987>;
  <D.23986>:
  code.83 = mono_aot_get_trampoline ("monitor_exit_trampoline");
  code = code.83;
  <D.23987>:
  D.23989 = code;
  return D.23989;
  <D.23984>:
  {
    int ret;

    ret = pthread_mutex_lock (&trampolines_mutex.mutex);
    if (ret != 0) goto <D.23990>; else goto <D.23991>;
    <D.23990>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.23991>:
    D.23992 = ret != 0;
    D.23993 = (long int) D.23992;
    D.23994 = __builtin_expect (D.23993, 0);
    if (D.23994 != 0) goto <D.23995>; else goto <D.23996>;
    <D.23995>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1577, "ret == 0");
    <D.23996>:
  }
  code.82 = code;
  if (code.82 == 0B) goto <D.23997>; else goto <D.23998>;
  <D.23997>:
  {
    struct MonoTrampInfo * info;

    try
      {
        code.84 = mono_arch_create_monitor_exit_trampoline (&info, 0);
        code = code.84;
        info.85 = info;
        mono_tramp_info_register (info.85);
      }
    finally
      {
        info = {CLOBBER};
      }
  }
  <D.23998>:
  {
    int ret;

    ret = pthread_mutex_unlock (&trampolines_mutex.mutex);
    if (ret != 0) goto <D.24001>; else goto <D.24002>;
    <D.24001>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.24002>:
    D.24003 = ret != 0;
    D.24004 = (long int) D.24003;
    D.24005 = __builtin_expect (D.24004, 0);
    if (D.24005 != 0) goto <D.24006>; else goto <D.24007>;
    <D.24006>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1586, "ret == 0");
    <D.24007>:
  }
  D.23989 = code;
  return D.23989;
}


mono_create_llvm_imt_trampoline (struct MonoDomain * domain, struct MonoMethod * m, int vt_offset)
{
  void * D.24009;

  D.24009 = mono_arch_get_llvm_imt_trampoline (domain, m, vt_offset);
  return D.24009;
}


mono_find_class_init_trampoline_by_addr (const void * addr)
{
  _Bool D.24013;
  long int D.24014;
  long int D.24015;
  struct GHashTable * class_init_hash_addr.86;
  _Bool D.24024;
  long int D.24025;
  long int D.24026;
  struct MonoVTable * D.24029;
  struct MonoVTable * res;

  {
    int ret;

    ret = pthread_mutex_lock (&trampolines_mutex.mutex);
    if (ret != 0) goto <D.24011>; else goto <D.24012>;
    <D.24011>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.24012>:
    D.24013 = ret != 0;
    D.24014 = (long int) D.24013;
    D.24015 = __builtin_expect (D.24014, 0);
    if (D.24015 != 0) goto <D.24016>; else goto <D.24017>;
    <D.24016>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1619, "ret == 0");
    <D.24017>:
  }
  class_init_hash_addr.86 = class_init_hash_addr;
  if (class_init_hash_addr.86 != 0B) goto <D.24019>; else goto <D.24020>;
  <D.24019>:
  class_init_hash_addr.86 = class_init_hash_addr;
  res = monoeg_g_hash_table_lookup (class_init_hash_addr.86, addr);
  goto <D.24021>;
  <D.24020>:
  res = 0B;
  <D.24021>:
  {
    int ret;

    ret = pthread_mutex_unlock (&trampolines_mutex.mutex);
    if (ret != 0) goto <D.24022>; else goto <D.24023>;
    <D.24022>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.24023>:
    D.24024 = ret != 0;
    D.24025 = (long int) D.24024;
    D.24026 = __builtin_expect (D.24025, 0);
    if (D.24026 != 0) goto <D.24027>; else goto <D.24028>;
    <D.24027>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1624, "ret == 0");
    <D.24028>:
  }
  D.24029 = res;
  return D.24029;
}


mono_find_rgctx_lazy_fetch_trampoline_by_addr (const void * addr)
{
  _Bool D.24033;
  long int D.24034;
  long int D.24035;
  struct GHashTable * rgctx_lazy_fetch_trampoline_hash_addr.87;
  void * D.24041;
  long int D.24042;
  _Bool D.24049;
  long int D.24050;
  long int D.24051;
  guint32 D.24054;
  int offset;

  {
    int ret;

    ret = pthread_mutex_lock (&trampolines_mutex.mutex);
    if (ret != 0) goto <D.24031>; else goto <D.24032>;
    <D.24031>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.24032>:
    D.24033 = ret != 0;
    D.24034 = (long int) D.24033;
    D.24035 = __builtin_expect (D.24034, 0);
    if (D.24035 != 0) goto <D.24036>; else goto <D.24037>;
    <D.24036>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1633, "ret == 0");
    <D.24037>:
  }
  rgctx_lazy_fetch_trampoline_hash_addr.87 = rgctx_lazy_fetch_trampoline_hash_addr;
  if (rgctx_lazy_fetch_trampoline_hash_addr.87 != 0B) goto <D.24039>; else goto <D.24040>;
  <D.24039>:
  rgctx_lazy_fetch_trampoline_hash_addr.87 = rgctx_lazy_fetch_trampoline_hash_addr;
  D.24041 = monoeg_g_hash_table_lookup (rgctx_lazy_fetch_trampoline_hash_addr.87, addr);
  D.24042 = (long int) D.24041;
  offset = (int) D.24042;
  if (offset != 0) goto <D.24043>; else goto <D.24044>;
  <D.24043>:
  offset = offset + -1;
  goto <D.24045>;
  <D.24044>:
  offset = -1;
  <D.24045>:
  goto <D.24046>;
  <D.24040>:
  offset = -1;
  <D.24046>:
  {
    int ret;

    ret = pthread_mutex_unlock (&trampolines_mutex.mutex);
    if (ret != 0) goto <D.24047>; else goto <D.24048>;
    <D.24047>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.24048>:
    D.24049 = ret != 0;
    D.24050 = (long int) D.24049;
    D.24051 = __builtin_expect (D.24050, 0);
    if (D.24051 != 0) goto <D.24052>; else goto <D.24053>;
    <D.24052>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1644, "ret == 0");
    <D.24053>:
  }
  D.24054 = (guint32) offset;
  return D.24054;
}


mono_get_generic_trampoline_name (MonoTrampolineType tramp_type)
{
  char * D.24056;
  const char * D.24057;

  D.24057 = tramp_names[tramp_type];
  D.24056 = monoeg_g_strdup_printf ("generic_trampoline_%s", D.24057);
  return D.24056;
}


mono_get_rgctx_fetch_trampoline_name (int slot)
{
  _Bool D.24059;
  char * D.24060;
  const char * iftmp.88;
  gboolean mrgctx;
  int index;

  D.24059 = slot < 0;
  mrgctx = (gboolean) D.24059;
  index = slot & 2147483647;
  if (mrgctx != 0) goto <D.24062>; else goto <D.24063>;
  <D.24062>:
  iftmp.88 = "mrgctx";
  goto <D.24064>;
  <D.24063>:
  iftmp.88 = "rgctx";
  <D.24064>:
  D.24060 = monoeg_g_strdup_printf ("rgctx_fetch_trampoline_%s_%d", iftmp.88, index);
  return D.24060;
}


mini_get_nullified_class_init_trampoline ()
{
  void * nullified_class_init_trampoline.89;
  int mono_aot_only.90;
  struct MonoTrampInfo * info.91;
  void * D.24074;
  static void * nullified_class_init_trampoline;

  nullified_class_init_trampoline.89 = nullified_class_init_trampoline;
  if (nullified_class_init_trampoline.89 == 0B) goto <D.24067>; else goto <D.24068>;
  <D.24067>:
  {
    void * tramp;
    struct MonoTrampInfo * info;

    try
      {
        mono_aot_only.90 = mono_aot_only;
        if (mono_aot_only.90 != 0) goto <D.24070>; else goto <D.24071>;
        <D.24070>:
        tramp = mono_aot_get_trampoline ("nullified_class_init_trampoline");
        goto <D.24072>;
        <D.24071>:
        tramp = mono_arch_get_nullified_class_init_trampoline (&info);
        info.91 = info;
        mono_tramp_info_register (info.91);
        <D.24072>:
        mono_memory_barrier ();
        nullified_class_init_trampoline = tramp;
      }
    finally
      {
        info = {CLOBBER};
      }
  }
  <D.24068>:
  D.24074 = nullified_class_init_trampoline;
  return D.24074;
}


