mono_create_static_rgctx_trampoline (struct MonoMethod * m, void * addr)
{
  union mono_mutex_t * D.21952;
  _Bool D.21955;
  long int D.21956;
  long int D.21957;
  void * D.21960;
  struct GHashTable * D.21961;
  struct GHashTable * D.21964;
  _Bool D.21967;
  long int D.21968;
  long int D.21969;
  void * D.21974;
  int mono_aot_only.0;
  _Bool D.21981;
  long int D.21982;
  long int D.21983;
  _Bool D.21988;
  long int D.21989;
  long int D.21990;
  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.21952 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.21952);
        if (ret != 0) goto <D.21953>; else goto <D.21954>;
        <D.21953>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.21954>:
        D.21955 = ret != 0;
        D.21956 = (long int) D.21955;
        D.21957 = __builtin_expect (D.21956, 0);
        if (D.21957 != 0) goto <D.21958>; else goto <D.21959>;
        <D.21958>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 96, "ret == 0");
        <D.21959>:
      }
      D.21960 = domain->runtime_info;
      D.21961 = MEM[(struct MonoJitDomainInfo *)D.21960].static_rgctx_trampoline_hash;
      if (D.21961 == 0B) goto <D.21962>; else goto <D.21963>;
      <D.21962>:
      D.21960 = domain->runtime_info;
      D.21964 = monoeg_g_hash_table_new (rgctx_tramp_info_hash, rgctx_tramp_info_equal);
      MEM[(struct MonoJitDomainInfo *)D.21960].static_rgctx_trampoline_hash = D.21964;
      <D.21963>:
      tmp_info.m = m;
      tmp_info.addr = addr;
      D.21960 = domain->runtime_info;
      D.21961 = MEM[(struct MonoJitDomainInfo *)D.21960].static_rgctx_trampoline_hash;
      res = monoeg_g_hash_table_lookup (D.21961, &tmp_info);
      {
        int ret;

        D.21952 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.21952);
        if (ret != 0) goto <D.21965>; else goto <D.21966>;
        <D.21965>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.21966>:
        D.21967 = ret != 0;
        D.21968 = (long int) D.21967;
        D.21969 = __builtin_expect (D.21968, 0);
        if (D.21969 != 0) goto <D.21970>; else goto <D.21971>;
        <D.21970>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 103, "ret == 0");
        <D.21971>:
      }
      if (res != 0B) goto <D.21972>; else goto <D.21973>;
      <D.21972>:
      D.21974 = res;
      return D.21974;
      <D.21973>:
      mono_aot_only.0 = mono_aot_only;
      if (mono_aot_only.0 != 0) goto <D.21976>; else goto <D.21977>;
      <D.21976>:
      res = mono_aot_get_static_rgctx_trampoline (ctx, addr);
      goto <D.21978>;
      <D.21977>:
      res = mono_arch_get_static_rgctx_trampoline (m, ctx, addr);
      <D.21978>:
      {
        int ret;

        D.21952 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.21952);
        if (ret != 0) goto <D.21979>; else goto <D.21980>;
        <D.21979>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.21980>:
        D.21981 = ret != 0;
        D.21982 = (long int) D.21981;
        D.21983 = __builtin_expect (D.21982, 0);
        if (D.21983 != 0) goto <D.21984>; else goto <D.21985>;
        <D.21984>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 112, "ret == 0");
        <D.21985>:
      }
      info = mono_domain_alloc (domain, 8);
      info->m = m;
      info->addr = addr;
      D.21960 = domain->runtime_info;
      D.21961 = MEM[(struct MonoJitDomainInfo *)D.21960].static_rgctx_trampoline_hash;
      monoeg_g_hash_table_insert_replace (D.21961, info, res, 0);
      {
        int ret;

        D.21952 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.21952);
        if (ret != 0) goto <D.21986>; else goto <D.21987>;
        <D.21986>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.21987>:
        D.21988 = ret != 0;
        D.21989 = (long int) D.21988;
        D.21990 = __builtin_expect (D.21989, 0);
        if (D.21990 != 0) goto <D.21991>; else goto <D.21992>;
        <D.21991>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 118, "ret == 0");
        <D.21992>:
      }
      static_rgctx_trampolines.1 = static_rgctx_trampolines;
      static_rgctx_trampolines.2 = static_rgctx_trampolines.1 + 1;
      static_rgctx_trampolines = static_rgctx_trampolines.2;
      D.21974 = res;
      return D.21974;
    }
  finally
    {
      tmp_info = {CLOBBER};
    }
}


rgctx_tramp_info_equal (const void * ka, const void * kb)
{
  struct MonoMethod * D.21998;
  struct MonoMethod * D.21999;
  void * D.22001;
  void * D.22002;
  gint D.22004;
  const struct RgctxTrampInfo * i1;
  const struct RgctxTrampInfo * i2;

  i1 = ka;
  i2 = kb;
  D.21998 = i1->m;
  D.21999 = i2->m;
  if (D.21998 == D.21999) goto <D.22000>; else goto <D.21997>;
  <D.22000>:
  D.22001 = i1->addr;
  D.22002 = i2->addr;
  if (D.22001 == D.22002) goto <D.22003>; else goto <D.21997>;
  <D.22003>:
  D.22004 = 1;
  return D.22004;
  <D.21997>:
  D.22004 = 0;
  return D.22004;
}


rgctx_tramp_info_hash (const void * data)
{
  guint D.22006;
  struct MonoMethod * D.22007;
  unsigned int D.22008;
  void * D.22009;
  unsigned int D.22010;
  const struct RgctxTrampInfo * info;

  info = data;
  D.22007 = info->m;
  D.22008 = (unsigned int) D.22007;
  D.22009 = info->addr;
  D.22010 = (unsigned int) D.22009;
  D.22006 = D.22008 ^ D.22010;
  return D.22006;
}


mini_jit_info_is_gsharedvt (struct MonoJitInfo * ji)
{
  unsigned int D.22015;
  unsigned int D.22016;
  struct MonoGenericSharingContext * D.22018;
  gboolean * D.22019;
  struct MonoGenericSharingContext * D.22021;
  gboolean * D.22022;
  gboolean D.22023;

  if (ji != 0B) goto <D.22014>; else goto <D.22012>;
  <D.22014>:
  D.22015 = BIT_FIELD_REF <*ji, 32, 160>;
  D.22016 = D.22015 & 131072;
  if (D.22016 != 0) goto <D.22017>; else goto <D.22012>;
  <D.22017>:
  D.22018 = mono_jit_info_get_generic_sharing_context (ji);
  D.22019 = D.22018->var_is_vt;
  if (D.22019 != 0B) goto <D.22013>; else goto <D.22020>;
  <D.22020>:
  D.22021 = mono_jit_info_get_generic_sharing_context (ji);
  D.22022 = D.22021->mvar_is_vt;
  if (D.22022 != 0B) goto <D.22013>; else goto <D.22012>;
  <D.22013>:
  D.22023 = 1;
  return D.22023;
  <D.22012>:
  D.22023 = 0;
  return D.22023;
}


mini_add_method_trampoline (struct MonoMethod * orig_method, struct MonoMethod * m, void * compiled_method, gboolean add_static_rgctx_tramp, gboolean add_unbox_tramp)
{
  struct MonoDomain * D.22025;
  void * D.22026;
  unsigned int D.22027;
  unsigned int D.22028;
  <unnamed type> D.22033;
  <unnamed type> D.22041;
  unsigned int D.22048;
  _Bool D.22049;
  long int D.22050;
  long int D.22051;
  int mono_aot_only.3;
  unsigned int unbox_trampolines.4;
  unsigned int unbox_trampolines.5;
  struct MonoMethodSignature * D.22066;
  int D.22067;
  void * D.22074;
  void * addr;
  gboolean callee_gsharedvt;
  gboolean callee_array_helper;
  struct MonoMethod * jmethod;
  struct MonoJitInfo * ji;

  addr = compiled_method;
  jmethod = 0B;
  D.22025 = mono_domain_get ();
  D.22026 = mono_get_addr_from_ftnptr (compiled_method);
  ji = mini_jit_info_table_find (D.22025, D.22026, 0B);
  callee_gsharedvt = mini_jit_info_is_gsharedvt (ji);
  callee_array_helper = 0;
  D.22027 = BIT_FIELD_REF <*m, 32, 160>;
  D.22028 = D.22027 & 124;
  if (D.22028 == 28) goto <D.22029>; else goto <D.22030>;
  <D.22029>:
  {
    struct WrapperInfo * info;

    info = mono_marshal_get_wrapper_info (m);
    if (info != 0B) goto <D.22031>; else goto <D.22032>;
    <D.22031>:
    D.22033 = info->subtype;
    if (D.22033 == 21) goto <D.22034>; else goto <D.22035>;
    <D.22034>:
    callee_array_helper = 1;
    m = info->d.generic_array_helper.method;
    <D.22035>:
    <D.22032>:
  }
  goto <D.22036>;
  <D.22030>:
  D.22027 = BIT_FIELD_REF <*m, 32, 160>;
  D.22028 = D.22027 & 124;
  if (D.22028 == 100) goto <D.22037>; else goto <D.22038>;
  <D.22037>:
  {
    struct WrapperInfo * info;

    info = mono_marshal_get_wrapper_info (m);
    if (info != 0B) goto <D.22039>; else goto <D.22040>;
    <D.22039>:
    D.22041 = info->subtype;
    if (D.22041 == 17) goto <D.22042>; else goto <D.22043>;
    <D.22042>:
    m = info->d.synchronized_inner.method;
    <D.22043>:
    <D.22040>:
  }
  <D.22038>:
  <D.22036>:
  if (orig_method == 0B) goto <D.22044>; else goto <D.22045>;
  <D.22044>:
  orig_method = m;
  <D.22045>:
  if (callee_gsharedvt != 0) goto <D.22046>; else goto <D.22047>;
  <D.22046>:
  D.22027 = BIT_FIELD_REF <*m, 32, 160>;
  D.22048 = D.22027 & 4096;
  D.22049 = D.22048 == 0;
  D.22050 = (long int) D.22049;
  D.22051 = __builtin_expect (D.22050, 0);
  if (D.22051 != 0) goto <D.22052>; else goto <D.22053>;
  <D.22052>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 324, "m->is_inflated");
  <D.22053>:
  <D.22047>:
  addr = compiled_method;
  if (add_unbox_tramp != 0) goto <D.22054>; else goto <D.22055>;
  <D.22054>:
  mono_aot_only.3 = mono_aot_only;
  if (mono_aot_only.3 != 0) goto <D.22057>; else goto <D.22058>;
  <D.22057>:
  addr = mono_aot_get_unbox_trampoline (m);
  goto <D.22059>;
  <D.22058>:
  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.22059>:
  <D.22055>:
  if (ji != 0B) goto <D.22062>; else goto <D.22063>;
  <D.22062>:
  jmethod = jinfo_get_method (ji);
  <D.22063>:
  if (callee_gsharedvt != 0) goto <D.22064>; else goto <D.22065>;
  <D.22064>:
  D.22066 = mono_method_signature (jmethod);
  D.22067 = mini_is_gsharedvt_variable_signature (D.22066);
  if (D.22067 != 0) goto <D.22068>; else goto <D.22069>;
  <D.22068>:
  {
    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.22069>:
  <D.22065>:
  if (add_static_rgctx_tramp != 0) goto <D.22070>; else goto <D.22071>;
  <D.22070>:
  if (callee_array_helper == 0) goto <D.22072>; else goto <D.22073>;
  <D.22072>:
  addr = mono_create_static_rgctx_trampoline (m, addr);
  <D.22073>:
  <D.22071>:
  D.22074 = addr;
  return D.22074;
}


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

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


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

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


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.22082;
  _Bool D.22087;
  long int D.22088;
  long int D.22089;
  struct MonoVTable * D.22092;
  struct MonoClass * D.22093;
  struct MonoClass * D.22094;
  unsigned int D.22100;
  unsigned int D.22101;
  struct MonoGenericInst * D.22103;
  int variance_used.8;
  struct MonoClass * D.22108;
  int D.22109;
  _Bool D.22112;
  _Bool D.22113;
  _Bool D.22114;
  void * addr.9;
  struct MonoDomain * D.22118;
  int D.22119;
  void * D.22122;
  struct MonoDomain * D.22123;
  int D.22127;
  struct MonoGenericClass * D.22132;
  struct MonoGenericInst * D.22135;
  struct MonoGenericContainer * D.22137;
  _Bool D.22138;
  long int D.22139;
  long int D.22140;
  unsigned int D.22145;
  unsigned int D.22146;
  _Bool D.22147;
  long int D.22148;
  long int D.22149;
  struct MonoGenericInst * D.22152;
  _Bool D.22155;
  long int D.22156;
  long int D.22157;
  struct MonoGenericContext * D.22163;
  struct MonoGenericInst * D.22164;
  struct MonoVTable * D.22166;
  short unsigned int D.22170;
  int D.22171;
  int D.22172;
  unsigned int D.22174;
  unsigned int D.22175;
  struct MonoVTable * D.22176;
  struct MonoClass * D.22177;
  unsigned int D.22178;
  unsigned int D.22179;
  _Bool D.22180;
  long int D.22181;
  long int D.22182;
  struct MonoClass * * D.22187;
  short unsigned int D.22188;
  sizetype D.22189;
  sizetype D.22190;
  sizetype D.22191;
  struct MonoClass * * D.22192;
  int iftmp.10;
  _Bool D.22198;
  long int D.22199;
  long int D.22200;
  int vtable_slot.11;
  int vt.12;
  int D.22207;
  _Bool D.22208;
  long int D.22209;
  long int D.22210;
  struct MonoClass * D.22213;
  struct MonoMethod * * D.22214;
  unsigned int displacement.13;
  unsigned int D.22216;
  struct MonoMethod * * D.22217;
  unsigned int D.22222;
  struct MonoGenericClass * D.22226;
  struct MonoGenericInst * D.22229;
  struct MonoGenericContainer * D.22231;
  struct MonoGenericInst * D.22234;
  _Bool D.22235;
  long int D.22236;
  long int D.22237;
  _Bool D.22240;
  long int D.22241;
  long int D.22242;
  struct MonoClass * D.22245;
  _Bool D.22246;
  long int D.22247;
  long int D.22248;
  unsigned int D.22251;
  unsigned int D.22252;
  short unsigned int D.22256;
  int D.22257;
  int D.22258;
  int D.22263;
  _Bool D.22266;
  long int D.22267;
  long int D.22268;
  struct MonoClass * D.22275;
  unsigned int D.22276;
  unsigned int D.22277;
  int need_rgctx_tramp.14;
  void * addr.15;
  struct MonoMethod * iftmp.16;
  struct MonoDomain * D.22295;
  void * D.22298;
  struct GHashTable * D.22299;
  union mono_mutex_t * D.22302;
  _Bool D.22305;
  long int D.22306;
  long int D.22307;
  _Bool D.22314;
  long int D.22315;
  long int D.22316;
  int D.22325;
  struct MonoDomain * D.22327;
  int D.22328;
  void * D.22329;
  _Bool D.22330;
  long int D.22331;
  long int D.22332;
  void * D.22335;
  struct MonoDomain * D.22341;
  void * D.22342;
  struct MonoDomain * D.22345;
  unsigned int D.22352;
  unsigned int D.22353;
  unsigned int D.22356;
  unsigned int D.22357;
  struct MonoDomain * D.22367;
  void * D.22368;
  struct MonoDomain * D.22371;
  int D.22384;
  void * D.22387;
  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.22082 = vtable_slot > vt;
      virtual = (gboolean) D.22082;
      orig_vtable_slot = vtable_slot;
      vtable_slot_to_patch = vtable_slot;
      if (vt != 0B) goto <D.22083>; else goto <D.22084>;
      <D.22083>:
      if (vtable_slot < vt) goto <D.22085>; else goto <D.22086>;
      <D.22085>:
      {
        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.22087 = vtable_slot == 0B;
            D.22088 = (long int) D.22087;
            D.22089 = __builtin_expect (D.22088, 0);
            if (D.22089 != 0) goto <D.22090>; else goto <D.22091>;
            <D.22090>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 401, "vtable_slot");
            <D.22091>:
            orig_method = m;
            this_arg = mono_arch_get_this_arg_from_call (regs, code);
            D.22092 = this_arg->vtable;
            D.22093 = D.22092->klass;
            D.22094 = mono_defaults.transparent_proxy_class;
            if (D.22093 == D.22094) goto <D.22095>; else goto <D.22096>;
            <D.22095>:
            m = mono_object_get_virtual_method (this_arg, m);
            vtable_slot_to_patch = 0B;
            goto <D.22097>;
            <D.22096>:
            {
              gboolean lookup_aot;

              D.22100 = BIT_FIELD_REF <*m, 32, 160>;
              D.22101 = D.22100 & 4096;
              if (D.22101 != 0) goto <D.22102>; else goto <D.22098>;
              <D.22102>:
              D.22103 = MEM[(struct MonoMethodInflated *)m].context.method_inst;
              if (D.22103 != 0B) goto <D.22104>; else goto <D.22098>;
              <D.22104>:
              generic_virtual = m;
              need_rgctx_tramp = 1;
              goto <D.22099>;
              <D.22098>:
              variance_used.8 = variance_used;
              if (variance_used.8 != 0) goto <D.22106>; else goto <D.22107>;
              <D.22106>:
              D.22108 = m->klass;
              D.22109 = mono_class_has_variant_generic_params (D.22108);
              if (D.22109 != 0) goto <D.22110>; else goto <D.22111>;
              <D.22110>:
              variant_iface = m;
              <D.22111>:
              <D.22107>:
              <D.22099>:
              addr = 0B;
              D.22112 = generic_virtual == 0B;
              D.22113 = variant_iface == 0B;
              D.22114 = D.22112 & D.22113;
              lookup_aot = (gboolean) D.22114;
              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.22116>; else goto <D.22117>;
              <D.22116>:
              D.22118 = mono_domain_get ();
              D.22119 = mono_domain_owns_vtable_slot (D.22118, vtable_slot);
              if (D.22119 != 0) goto <D.22120>; else goto <D.22121>;
              <D.22120>:
              addr.9 = addr;
              *vtable_slot = addr.9;
              <D.22121>:
              D.22123 = mono_domain_get ();
              addr.9 = addr;
              D.22122 = mono_create_ftnptr (D.22123, addr.9);
              return D.22122;
              <D.22117>:
              m = impl_method;
            }
            <D.22097>:
          }
        finally
          {
            impl_method = {CLOBBER};
          }
      }
      <D.22086>:
      <D.22084>:
      if (virtual != 0) goto <D.22126>; else goto <D.22124>;
      <D.22126>:
      D.22127 = is_generic_method_definition (m);
      if (D.22127 != 0) goto <D.22128>; else goto <D.22124>;
      <D.22128>:
      {
        struct MonoGenericContext context;
        struct MonoMethod * declaring;

        try
          {
            context.class_inst = 0B;
            context.method_inst = 0B;
            D.22100 = BIT_FIELD_REF <*m, 32, 160>;
            D.22101 = D.22100 & 4096;
            if (D.22101 != 0) goto <D.22129>; else goto <D.22130>;
            <D.22129>:
            declaring = mono_method_get_declaring_generic_method (m);
            goto <D.22131>;
            <D.22130>:
            declaring = m;
            <D.22131>:
            D.22108 = m->klass;
            D.22132 = D.22108->generic_class;
            if (D.22132 != 0B) goto <D.22133>; else goto <D.22134>;
            <D.22133>:
            D.22108 = m->klass;
            D.22132 = D.22108->generic_class;
            D.22135 = D.22132->context.class_inst;
            context.class_inst = D.22135;
            goto <D.22136>;
            <D.22134>:
            D.22108 = m->klass;
            D.22137 = D.22108->generic_container;
            D.22138 = D.22137 != 0B;
            D.22139 = (long int) D.22138;
            D.22140 = __builtin_expect (D.22139, 0);
            if (D.22140 != 0) goto <D.22141>; else goto <D.22142>;
            <D.22141>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 464, "!m->klass->generic_container");
            <D.22142>:
            <D.22136>:
            generic_virtual = mono_arch_find_imt_method (regs, code);
            if (generic_virtual != 0B) goto <D.22143>; else goto <D.22144>;
            <D.22143>:
            D.22145 = BIT_FIELD_REF <*generic_virtual, 32, 160>;
            D.22146 = D.22145 & 4096;
            D.22147 = D.22146 == 0;
            D.22148 = (long int) D.22147;
            D.22149 = __builtin_expect (D.22148, 0);
            if (D.22149 != 0) goto <D.22150>; else goto <D.22151>;
            <D.22150>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 470, "generic_virtual->is_inflated");
            <D.22151>:
            D.22152 = MEM[(struct MonoMethodInflated *)generic_virtual].context.method_inst;
            context.method_inst = D.22152;
            <D.22144>:
            m = mono_class_inflate_generic_method (declaring, &context);
            need_rgctx_tramp = 1;
          }
        finally
          {
            context = {CLOBBER};
          }
      }
      goto <D.22125>;
      <D.22124>:
      context_used = mono_method_check_context_used (m);
      if (context_used != 0) goto <D.22153>; else goto <D.22154>;
      <D.22153>:
      {
        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.22155 = code == 0B;
        D.22156 = (long int) D.22155;
        D.22157 = __builtin_expect (D.22156, 0);
        if (D.22157 != 0) goto <D.22158>; else goto <D.22159>;
        <D.22158>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 486, "code");
        <D.22159>:
        D.22100 = BIT_FIELD_REF <*m, 32, 160>;
        D.22101 = D.22100 & 4096;
        if (D.22101 != 0) goto <D.22162>; else goto <D.22160>;
        <D.22162>:
        D.22163 = mono_method_get_context (m);
        D.22164 = D.22163->method_inst;
        if (D.22164 != 0B) goto <D.22165>; else goto <D.22160>;
        <D.22165>:
        {
          struct MonoMethodRuntimeGenericContext * mrgctx;

          mrgctx = mono_arch_find_static_call_vtable (regs, code);
          D.22166 = mrgctx->class_vtable;
          klass = D.22166->klass;
          method_inst = mrgctx->method_inst;
        }
        goto <D.22161>;
        <D.22160>:
        D.22170 = m->flags;
        D.22171 = (int) D.22170;
        D.22172 = D.22171 & 16;
        if (D.22172 != 0) goto <D.22167>; else goto <D.22173>;
        <D.22173>:
        D.22108 = m->klass;
        D.22174 = BIT_FIELD_REF <*D.22108, 32, 160>;
        D.22175 = D.22174 & 8;
        if (D.22175 != 0) goto <D.22167>; else goto <D.22168>;
        <D.22167>:
        {
          struct MonoVTable * vtable;

          vtable = mono_arch_find_static_call_vtable (regs, code);
          klass = vtable->klass;
        }
        goto <D.22169>;
        <D.22168>:
        {
          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.22176 = this_argument->vtable;
          D.22177 = D.22176->klass;
          D.22178 = BIT_FIELD_REF <*D.22177, 32, 160>;
          D.22179 = D.22178 & 1;
          D.22180 = D.22179 == 0;
          D.22181 = (long int) D.22180;
          D.22182 = __builtin_expect (D.22181, 0);
          if (D.22182 != 0) goto <D.22183>; else goto <D.22184>;
          <D.22183>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 512, "this_argument->vtable->klass->inited");
          <D.22184>:
          if (vtable_slot == 0B) goto <D.22185>; else goto <D.22186>;
          <D.22185>:
          D.22176 = this_argument->vtable;
          D.22177 = D.22176->klass;
          mono_class_setup_supertypes (D.22177);
          D.22176 = this_argument->vtable;
          D.22177 = D.22176->klass;
          D.22187 = D.22177->supertypes;
          D.22108 = m->klass;
          D.22188 = D.22108->idepth;
          D.22189 = (sizetype) D.22188;
          D.22190 = D.22189 + 1073741823;
          D.22191 = D.22190 * 4;
          D.22192 = D.22187 + D.22191;
          klass = *D.22192;
          <D.22186>:
        }
        <D.22169>:
        <D.22161>:
        if (vtable_slot == 0B) goto <D.22196>; else goto <D.22194>;
        <D.22196>:
        if (klass == 0B) goto <D.22197>; else goto <D.22194>;
        <D.22197>:
        iftmp.10 = 1;
        goto <D.22195>;
        <D.22194>:
        iftmp.10 = 0;
        <D.22195>:
        D.22198 = iftmp.10 != 0;
        D.22199 = (long int) D.22198;
        D.22200 = __builtin_expect (D.22199, 0);
        if (D.22200 != 0) goto <D.22201>; else goto <D.22202>;
        <D.22201>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 524, "vtable_slot || klass");
        <D.22202>:
        if (vtable_slot != 0B) goto <D.22203>; else goto <D.22204>;
        <D.22203>:
        {
          int displacement;

          vtable_slot.11 = (int) vtable_slot;
          vt.12 = (int) vt;
          D.22207 = vtable_slot.11 - vt.12;
          displacement = D.22207 /[ex] 4;
          monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-trampolines.c", 529);
          D.22208 = displacement <= 0;
          D.22209 = (long int) D.22208;
          D.22210 = __builtin_expect (D.22209, 0);
          if (D.22210 != 0) goto <D.22211>; else goto <D.22212>;
          <D.22211>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 531, "displacement > 0");
          <D.22212>:
          D.22213 = vt->klass;
          D.22214 = D.22213->vtable;
          displacement.13 = (unsigned int) displacement;
          D.22216 = displacement.13 * 4;
          D.22217 = D.22214 + D.22216;
          actual_method = *D.22217;
        }
        <D.22204>:
        if (method_inst != 0B) goto <D.22218>; else goto <D.22221>;
        <D.22221>:
        D.22100 = BIT_FIELD_REF <*m, 32, 160>;
        D.22222 = D.22100 & 124;
        if (D.22222 != 0) goto <D.22218>; else goto <D.22219>;
        <D.22218>:
        {
          struct MonoGenericContext context;

          try
            {
              context.class_inst = 0B;
              context.method_inst = 0B;
              D.22100 = BIT_FIELD_REF <*m, 32, 160>;
              D.22101 = D.22100 & 4096;
              if (D.22101 != 0) goto <D.22223>; else goto <D.22224>;
              <D.22223>:
              declaring = mono_method_get_declaring_generic_method (m);
              goto <D.22225>;
              <D.22224>:
              declaring = m;
              <D.22225>:
              D.22226 = klass->generic_class;
              if (D.22226 != 0B) goto <D.22227>; else goto <D.22228>;
              <D.22227>:
              D.22226 = klass->generic_class;
              D.22229 = D.22226->context.class_inst;
              context.class_inst = D.22229;
              goto <D.22230>;
              <D.22228>:
              D.22231 = klass->generic_container;
              if (D.22231 != 0B) goto <D.22232>; else goto <D.22233>;
              <D.22232>:
              D.22231 = klass->generic_container;
              D.22234 = D.22231->context.class_inst;
              context.class_inst = D.22234;
              <D.22233>:
              <D.22230>:
              context.method_inst = method_inst;
              actual_method = mono_class_inflate_generic_method (declaring, &context);
            }
          finally
            {
              context = {CLOBBER};
            }
        }
        goto <D.22220>;
        <D.22219>:
        actual_method = mono_class_get_method_generic (klass, m);
        <D.22220>:
        D.22235 = klass == 0B;
        D.22236 = (long int) D.22235;
        D.22237 = __builtin_expect (D.22236, 0);
        if (D.22237 != 0) goto <D.22238>; else goto <D.22239>;
        <D.22238>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 555, "klass");
        <D.22239>:
        D.22240 = actual_method == 0B;
        D.22241 = (long int) D.22240;
        D.22242 = __builtin_expect (D.22241, 0);
        if (D.22242 != 0) goto <D.22243>; else goto <D.22244>;
        <D.22243>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 556, "actual_method");
        <D.22244>:
        D.22245 = actual_method->klass;
        D.22246 = D.22245 != klass;
        D.22247 = (long int) D.22246;
        D.22248 = __builtin_expect (D.22247, 0);
        if (D.22248 != 0) goto <D.22249>; else goto <D.22250>;
        <D.22249>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 557, "actual_method->klass == klass");
        <D.22250>:
        D.22251 = BIT_FIELD_REF <*actual_method, 32, 160>;
        D.22252 = D.22251 & 4096;
        if (D.22252 != 0) goto <D.22253>; else goto <D.22254>;
        <D.22253>:
        declaring = mono_method_get_declaring_generic_method (actual_method);
        goto <D.22255>;
        <D.22254>:
        declaring = 0B;
        <D.22255>:
        m = actual_method;
      }
      <D.22154>:
      <D.22125>:
      D.22256 = m->iflags;
      D.22257 = (int) D.22256;
      D.22258 = D.22257 & 32;
      if (D.22258 != 0) goto <D.22259>; else goto <D.22260>;
      <D.22259>:
      m = mono_marshal_get_synchronized_wrapper (m);
      need_rgctx_tramp = 0;
      <D.22260>:
      if (code == 0B) goto <D.22261>; else goto <D.22262>;
      <D.22261>:
      D.22263 = mono_method_needs_static_rgctx_invoke (m, 0);
      if (D.22263 != 0) goto <D.22264>; else goto <D.22265>;
      <D.22264>:
      need_rgctx_tramp = 1;
      <D.22265>:
      <D.22262>:
      compiled_method = mono_compile_method (m);
      addr = compiled_method;
      addr.9 = addr;
      D.22266 = addr.9 == 0B;
      D.22267 = (long int) D.22266;
      D.22268 = __builtin_expect (D.22267, 0);
      if (D.22268 != 0) goto <D.22269>; else goto <D.22270>;
      <D.22269>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 577, "addr");
      <D.22270>:
      if (generic_virtual != 0B) goto <D.22271>; else goto <D.22274>;
      <D.22274>:
      if (variant_iface != 0B) goto <D.22271>; else goto <D.22272>;
      <D.22271>:
      D.22275 = vt->klass;
      D.22276 = BIT_FIELD_REF <*D.22275, 32, 160>;
      D.22277 = D.22276 & 8;
      if (D.22277 != 0) goto <D.22278>; else goto <D.22279>;
      <D.22278>:
      need_unbox_tramp = 1;
      <D.22279>:
      goto <D.22273>;
      <D.22272>:
      if (orig_vtable_slot != 0B) goto <D.22280>; else goto <D.22281>;
      <D.22280>:
      D.22108 = m->klass;
      D.22174 = BIT_FIELD_REF <*D.22108, 32, 160>;
      D.22175 = D.22174 & 8;
      if (D.22175 != 0) goto <D.22282>; else goto <D.22283>;
      <D.22282>:
      need_unbox_tramp = 1;
      <D.22283>:
      <D.22281>:
      <D.22273>:
      need_rgctx_tramp.14 = need_rgctx_tramp;
      addr.15 = mini_add_method_trampoline (orig_method, m, compiled_method, need_rgctx_tramp.14, need_unbox_tramp);
      addr = addr.15;
      if (generic_virtual != 0B) goto <D.22286>; else goto <D.22288>;
      <D.22288>:
      if (variant_iface != 0B) goto <D.22286>; else goto <D.22287>;
      <D.22286>:
      {
        struct MonoMethod * target;

        if (generic_virtual != 0B) goto <D.22290>; else goto <D.22291>;
        <D.22290>:
        iftmp.16 = generic_virtual;
        goto <D.22292>;
        <D.22291>:
        iftmp.16 = variant_iface;
        <D.22292>:
        target = iftmp.16;
        vtable_slot = orig_vtable_slot;
        D.22087 = vtable_slot == 0B;
        D.22088 = (long int) D.22087;
        D.22089 = __builtin_expect (D.22088, 0);
        if (D.22089 != 0) goto <D.22293>; else goto <D.22294>;
        <D.22293>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 593, "vtable_slot");
        <D.22294>:
        D.22295 = mono_domain_get ();
        addr.9 = addr;
        mono_method_add_generic_virtual_invocation (D.22295, vt, vtable_slot, target, addr.9);
        D.22122 = addr;
        return D.22122;
      }
      <D.22287>:
      if (code == 0B) goto <D.22296>; else goto <D.22297>;
      <D.22296>:
      {
        struct MonoDomain * domain;

        domain = mono_domain_get ();
        D.22298 = domain->runtime_info;
        D.22299 = MEM[(struct MonoJitDomainInfo *)D.22298].jump_target_got_slot_hash;
        if (D.22299 != 0B) goto <D.22300>; else goto <D.22301>;
        <D.22300>:
        {
          struct GSList * list;
          struct GSList * tmp;

          {
            int ret;

            D.22302 = &domain->lock.mutex;
            ret = pthread_mutex_lock (D.22302);
            if (ret != 0) goto <D.22303>; else goto <D.22304>;
            <D.22303>:
            monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
            <D.22304>:
            D.22305 = ret != 0;
            D.22306 = (long int) D.22305;
            D.22307 = __builtin_expect (D.22306, 0);
            if (D.22307 != 0) goto <D.22308>; else goto <D.22309>;
            <D.22308>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 614, "ret == 0");
            <D.22309>:
          }
          D.22298 = domain->runtime_info;
          D.22299 = MEM[(struct MonoJitDomainInfo *)D.22298].jump_target_got_slot_hash;
          list = monoeg_g_hash_table_lookup (D.22299, m);
          if (list != 0B) goto <D.22310>; else goto <D.22311>;
          <D.22310>:
          tmp = list;
          goto <D.21710>;
          <D.21709>:
          {
            void * * got_slot;

            got_slot = tmp->data;
            addr.9 = addr;
            *got_slot = addr.9;
          }
          tmp = tmp->next;
          <D.21710>:
          if (tmp != 0B) goto <D.21709>; else goto <D.21711>;
          <D.21711>:
          D.22298 = domain->runtime_info;
          D.22299 = MEM[(struct MonoJitDomainInfo *)D.22298].jump_target_got_slot_hash;
          monoeg_g_hash_table_remove (D.22299, m);
          monoeg_g_slist_free (list);
          <D.22311>:
          {
            int ret;

            D.22302 = &domain->lock.mutex;
            ret = pthread_mutex_unlock (D.22302);
            if (ret != 0) goto <D.22312>; else goto <D.22313>;
            <D.22312>:
            monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
            <D.22313>:
            D.22314 = ret != 0;
            D.22315 = (long int) D.22314;
            D.22316 = __builtin_expect (D.22315, 0);
            if (D.22316 != 0) goto <D.22317>; else goto <D.22318>;
            <D.22317>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 624, "ret == 0");
            <D.22318>:
          }
        }
        <D.22301>:
        D.22122 = addr;
        return D.22122;
      }
      <D.22297>:
      vtable_slot = orig_vtable_slot;
      if (vtable_slot != 0B) goto <D.22319>; else goto <D.22320>;
      <D.22319>:
      if (vtable_slot_to_patch != 0B) goto <D.22323>; else goto <D.22324>;
      <D.22323>:
      D.22325 = mono_aot_is_got_entry (code, vtable_slot_to_patch);
      if (D.22325 != 0) goto <D.22321>; else goto <D.22326>;
      <D.22326>:
      D.22327 = mono_domain_get ();
      D.22328 = mono_domain_owns_vtable_slot (D.22327, vtable_slot_to_patch);
      if (D.22328 != 0) goto <D.22321>; else goto <D.22322>;
      <D.22321>:
      D.22329 = *vtable_slot_to_patch;
      D.22330 = D.22329 == 0B;
      D.22331 = (long int) D.22330;
      D.22332 = __builtin_expect (D.22331, 0);
      if (D.22332 != 0) goto <D.22333>; else goto <D.22334>;
      <D.22333>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 634, "*vtable_slot_to_patch");
      <D.22334>:
      addr.9 = addr;
      D.22335 = mono_get_addr_from_ftnptr (addr.9);
      *vtable_slot_to_patch = D.22335;
      <D.22322>:
      <D.22324>:
      goto <D.22336>;
      <D.22320>:
      {
        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.22337>; else goto <D.22338>;
        <D.22337>:
        if (generic_shared != 0) goto <D.22339>; else goto <D.22340>;
        <D.22339>:
        D.22341 = mono_domain_get ();
        D.22342 = mono_get_addr_from_ftnptr (compiled_method);
        target_ji = mini_jit_info_table_find (D.22341, D.22342, 0B);
        if (ji == 0B) goto <D.22343>; else goto <D.22344>;
        <D.22343>:
        D.22345 = mono_domain_get ();
        ji = mini_jit_info_table_find (D.22345, code, 0B);
        <D.22344>:
        if (ji != 0B) goto <D.22346>; else goto <D.22347>;
        <D.22346>:
        if (target_ji != 0B) goto <D.22348>; else goto <D.22349>;
        <D.22348>:
        if (generic_shared != 0) goto <D.22350>; else goto <D.22351>;
        <D.22350>:
        D.22352 = BIT_FIELD_REF <*ji, 32, 160>;
        D.22353 = D.22352 & 131072;
        if (D.22353 != 0) goto <D.22354>; else goto <D.22355>;
        <D.22354>:
        D.22356 = BIT_FIELD_REF <*target_ji, 32, 160>;
        D.22357 = D.22356 & 131072;
        if (D.22357 == 0) goto <D.22358>; else goto <D.22359>;
        <D.22358>:
        no_patch = 1;
        <D.22359>:
        <D.22355>:
        <D.22351>:
        <D.22349>:
        <D.22347>:
        <D.22340>:
        if (no_patch == 0) goto <D.22360>; else goto <D.22361>;
        <D.22360>:
        addr.9 = addr;
        mono_aot_patch_plt_entry (plt_entry, 0B, regs, addr.9);
        <D.22361>:
        goto <D.22362>;
        <D.22338>:
        if (generic_shared != 0) goto <D.22363>; else goto <D.22364>;
        <D.22363>:
        D.22100 = BIT_FIELD_REF <*m, 32, 160>;
        D.22222 = D.22100 & 124;
        if (D.22222 != 0) goto <D.22365>; else goto <D.22366>;
        <D.22365>:
        m = mono_marshal_method_from_wrapper (m);
        <D.22366>:
        <D.22364>:
        D.22367 = mono_domain_get ();
        D.22368 = mono_get_addr_from_ftnptr (compiled_method);
        target_ji = mini_jit_info_table_find (D.22367, D.22368, 0B);
        if (ji == 0B) goto <D.22369>; else goto <D.22370>;
        <D.22369>:
        D.22371 = mono_domain_get ();
        ji = mini_jit_info_table_find (D.22371, code, 0B);
        <D.22370>:
        if (ji != 0B) goto <D.22372>; else goto <D.22373>;
        <D.22372>:
        if (target_ji != 0B) goto <D.22374>; else goto <D.22375>;
        <D.22374>:
        if (generic_shared != 0) goto <D.22376>; else goto <D.22377>;
        <D.22376>:
        D.22352 = BIT_FIELD_REF <*ji, 32, 160>;
        D.22353 = D.22352 & 131072;
        if (D.22353 != 0) goto <D.22378>; else goto <D.22379>;
        <D.22378>:
        D.22356 = BIT_FIELD_REF <*target_ji, 32, 160>;
        D.22357 = D.22356 & 131072;
        if (D.22357 == 0) goto <D.22380>; else goto <D.22381>;
        <D.22380>:
        no_patch = 1;
        <D.22381>:
        <D.22379>:
        <D.22377>:
        <D.22375>:
        <D.22373>:
        if (no_patch == 0) goto <D.22382>; else goto <D.22383>;
        <D.22382>:
        D.22384 = mono_method_same_domain (ji, target_ji);
        if (D.22384 != 0) goto <D.22385>; else goto <D.22386>;
        <D.22385>:
        D.22387 = ji->code_start;
        addr.9 = addr;
        mono_arch_patch_callsite (D.22387, code, addr.9);
        <D.22386>:
        <D.22383>:
        <D.22362>:
      }
      <D.22336>:
      D.22122 = addr;
      return D.22122;
    }
  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)
{
  int slot.17;
  int vt.18;
  int D.22394;
  void * * D.22397;
  struct MonoClass * D.22398;
  struct MonoClass * D.22399;
  struct MonoType * D.22402;
  char * D.22403;
  struct MonoType * D.22404;
  char * D.22405;
  unsigned int D.22406;
  int D.22407;
  unsigned int D.22410;
  unsigned int D.22411;
  struct MonoGenericInst * D.22413;
  struct MonoMethod * D.22415;
  short int D.22416;
  int D.22417;
  int D.22418;
  struct MonoClass * D.22419;
  struct MonoGenericClass * D.22420;
  struct MonoGenericInst * D.22423;
  unsigned int D.22427;
  unsigned int D.22428;
  struct MonoDomain * D.22430;
  int D.22431;
  int D.22432;
  void * D.22433;
  void * D.22434;
  int D.22438;
  int D.22439;
  int D.22442;
  unsigned int D.22447;
  unsigned int D.22448;
  <unnamed type> D.22453;
  _Bool D.22456;
  long int D.22457;
  long int D.22458;
  unsigned int D.22461;
  int D.22462;
  unsigned int D.22463;
  unsigned int D.22464;
  _Bool D.22467;
  long int D.22468;
  long int D.22469;
  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.17 = (int) slot;
  vt.18 = (int) vt;
  D.22394 = slot.17 - vt.18;
  displacement = D.22394 /[ex] 4;
  if (displacement > 0) goto <D.22395>; else goto <D.22396>;
  <D.22395>:
  D.22397 = slot;
  return D.22397;
  <D.22396>:
  {
    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.22398 = vt->klass;
    D.22399 = imt_method->klass;
    interface_offset = mono_class_interface_offset_with_variance (D.22398, D.22399, variance_used);
    if (interface_offset < 0) goto <D.22400>; else goto <D.22401>;
    <D.22400>:
    D.22398 = vt->klass;
    D.22402 = &D.22398->byval_arg;
    D.22403 = mono_type_get_name_full (D.22402, 0);
    D.22399 = imt_method->klass;
    D.22404 = &D.22399->byval_arg;
    D.22405 = mono_type_get_name_full (D.22404, 0);
    monoeg_g_log (0B, 4, "%s doesn\'t implement interface %s\n", D.22403, D.22405);
    <D.21636>:
    goto <D.21636>;
    <D.22401>:
    D.22406 = mono_method_get_imt_slot (imt_method);
    D.22407 = (int) D.22406;
    mono_vtable_build_imt_slot (vt, D.22407);
    D.22410 = BIT_FIELD_REF <*imt_method, 32, 160>;
    D.22411 = D.22410 & 4096;
    if (D.22411 != 0) goto <D.22412>; else goto <D.22408>;
    <D.22412>:
    D.22413 = MEM[(struct MonoMethodInflated *)imt_method].context.method_inst;
    if (D.22413 != 0B) goto <D.22414>; else goto <D.22408>;
    <D.22414>:
    {
      struct MonoGenericContext context;

      try
        {
          context.class_inst = 0B;
          context.method_inst = 0B;
          D.22398 = vt->klass;
          D.22415 = mono_method_get_declaring_generic_method (imt_method);
          D.22416 = D.22415->slot;
          D.22417 = (int) D.22416;
          D.22418 = D.22417 + interface_offset;
          impl = mono_class_get_vtable_entry (D.22398, D.22418);
          D.22419 = impl->klass;
          D.22420 = D.22419->generic_class;
          if (D.22420 != 0B) goto <D.22421>; else goto <D.22422>;
          <D.22421>:
          D.22419 = impl->klass;
          D.22420 = D.22419->generic_class;
          D.22423 = D.22420->context.class_inst;
          context.class_inst = D.22423;
          <D.22422>:
          D.22413 = MEM[(struct MonoMethodInflated *)imt_method].context.method_inst;
          context.method_inst = D.22413;
          impl = mono_class_inflate_generic_method (impl, &context);
        }
      finally
        {
          context = {CLOBBER};
        }
    }
    goto <D.22409>;
    <D.22408>:
    if (lookup_aot != 0) goto <D.22426>; else goto <D.22424>;
    <D.22426>:
    D.22398 = vt->klass;
    D.22427 = BIT_FIELD_REF <*D.22398, 32, 160>;
    D.22428 = D.22427 & 8;
    if (D.22428 == 0) goto <D.22429>; else goto <D.22424>;
    <D.22429>:
    D.22430 = mono_domain_get ();
    D.22431 = mono_method_get_vtable_slot (imt_method);
    D.22432 = D.22431 + interface_offset;
    D.22433 = mono_aot_get_method_from_vt_slot (D.22430, vt, D.22432);
    *aot_addr = D.22433;
    goto <D.22425>;
    <D.22424>:
    *aot_addr = 0B;
    <D.22425>:
    D.22434 = *aot_addr;
    if (D.22434 != 0B) goto <D.22435>; else goto <D.22436>;
    <D.22435>:
    impl = 0B;
    goto <D.22437>;
    <D.22436>:
    D.22398 = vt->klass;
    D.22438 = mono_method_get_vtable_slot (imt_method);
    D.22439 = D.22438 + interface_offset;
    impl = mono_class_get_vtable_entry (D.22398, D.22439);
    <D.22437>:
    <D.22409>:
    if (impl != 0B) goto <D.22440>; else goto <D.22441>;
    <D.22440>:
    D.22442 = mono_method_needs_static_rgctx_invoke (impl, 0);
    if (D.22442 != 0) goto <D.22443>; else goto <D.22444>;
    <D.22443>:
    *need_rgctx_tramp = 1;
    <D.22444>:
    <D.22441>:
    if (impl != 0B) goto <D.22445>; else goto <D.22446>;
    <D.22445>:
    D.22447 = BIT_FIELD_REF <*impl, 32, 160>;
    D.22448 = D.22447 & 124;
    if (D.22448 == 28) goto <D.22449>; else goto <D.22450>;
    <D.22449>:
    {
      struct WrapperInfo * info;

      info = mono_marshal_get_wrapper_info (impl);
      if (info != 0B) goto <D.22451>; else goto <D.22452>;
      <D.22451>:
      D.22453 = info->subtype;
      if (D.22453 == 21) goto <D.22454>; else goto <D.22455>;
      <D.22454>:
      *need_rgctx_tramp = 1;
      <D.22455>:
      <D.22452>:
    }
    <D.22450>:
    <D.22446>:
    *impl_method = impl;
    D.22456 = imt_slot > 18;
    D.22457 = (long int) D.22456;
    D.22458 = __builtin_expect (D.22457, 0);
    if (D.22458 != 0) goto <D.22459>; else goto <D.22460>;
    <D.22459>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 223, "imt_slot < MONO_IMT_SIZE");
    <D.22460>:
    D.22461 = vt->imt_collisions_bitmap;
    D.22462 = 1 << imt_slot;
    D.22463 = (unsigned int) D.22462;
    D.22464 = D.22461 & D.22463;
    if (D.22464 != 0) goto <D.22465>; else goto <D.22466>;
    <D.22465>:
    {
      int slot;
      int vtable_offset;
      void * * vtable_slot;

      slot = mono_method_get_vtable_index (imt_method);
      D.22467 = slot == -1;
      D.22468 = (long int) D.22467;
      D.22469 = __builtin_expect (D.22468, 0);
      if (D.22469 != 0) goto <D.22470>; else goto <D.22471>;
      <D.22470>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 229, "slot != -1");
      <D.22471>:
      vtable_offset = interface_offset + slot;
      vtable_slot = &vt->vtable[vtable_offset];
      D.22397 = vtable_slot;
      return D.22397;
    }
    <D.22466>:
    D.22397 = slot;
    return D.22397;
  }
}


is_generic_method_definition (struct MonoMethod * m)
{
  unsigned int D.22473;
  unsigned int D.22474;
  gboolean D.22477;
  unsigned int D.22478;
  struct MonoGenericInst * D.22481;
  struct MonoMethod * D.22484;
  struct MonoGenericContainer * D.22485;
  struct MonoGenericInst * D.22486;
  struct MonoGenericContext * context;

  D.22473 = BIT_FIELD_REF <*m, 32, 160>;
  D.22474 = D.22473 & 2048;
  if (D.22474 != 0) goto <D.22475>; else goto <D.22476>;
  <D.22475>:
  D.22477 = 1;
  return D.22477;
  <D.22476>:
  D.22473 = BIT_FIELD_REF <*m, 32, 160>;
  D.22478 = D.22473 & 4096;
  if (D.22478 == 0) goto <D.22479>; else goto <D.22480>;
  <D.22479>:
  D.22477 = 0;
  return D.22477;
  <D.22480>:
  context = mono_method_get_context (m);
  D.22481 = context->method_inst;
  if (D.22481 == 0B) goto <D.22482>; else goto <D.22483>;
  <D.22482>:
  D.22477 = 0;
  return D.22477;
  <D.22483>:
  D.22481 = context->method_inst;
  D.22484 = MEM[(struct MonoMethodInflated *)m].declaring;
  D.22485 = mono_method_get_generic_container (D.22484);
  D.22486 = D.22485->context.method_inst;
  if (D.22481 == D.22486) goto <D.22487>; else goto <D.22488>;
  <D.22487>:
  D.22477 = 1;
  return D.22477;
  <D.22488>:
  D.22477 = 0;
  return D.22477;
}


mono_generic_virtual_remoting_trampoline (mgreg_t * regs, guint8 * code, struct MonoMethod * m, guint8 * tramp)
{
  unsigned int trampoline_calls.19;
  unsigned int trampoline_calls.20;
  unsigned int D.22492;
  unsigned int D.22493;
  _Bool D.22494;
  long int D.22495;
  long int D.22496;
  unsigned int D.22499;
  struct MonoClass * D.22503;
  struct MonoGenericClass * D.22504;
  struct MonoGenericInst * D.22507;
  struct MonoGenericContainer * D.22509;
  _Bool D.22510;
  long int D.22511;
  long int D.22512;
  unsigned int D.22515;
  unsigned int D.22516;
  struct MonoGenericInst * D.22519;
  _Bool D.22520;
  long int D.22521;
  long int D.22522;
  void * D.22525;
  struct MonoGenericContext context;
  struct MonoMethod * imt_method;
  struct MonoMethod * declaring;
  void * addr;

  try
    {
      context.class_inst = 0B;
      context.method_inst = 0B;
      trampoline_calls.19 = trampoline_calls;
      trampoline_calls.20 = trampoline_calls.19 + 1;
      trampoline_calls = trampoline_calls.20;
      D.22492 = BIT_FIELD_REF <*m, 32, 160>;
      D.22493 = D.22492 & 2048;
      D.22494 = D.22493 == 0;
      D.22495 = (long int) D.22494;
      D.22496 = __builtin_expect (D.22495, 0);
      if (D.22496 != 0) goto <D.22497>; else goto <D.22498>;
      <D.22497>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 786, "m->is_generic");
      <D.22498>:
      D.22492 = BIT_FIELD_REF <*m, 32, 160>;
      D.22499 = D.22492 & 4096;
      if (D.22499 != 0) goto <D.22500>; else goto <D.22501>;
      <D.22500>:
      declaring = mono_method_get_declaring_generic_method (m);
      goto <D.22502>;
      <D.22501>:
      declaring = m;
      <D.22502>:
      D.22503 = m->klass;
      D.22504 = D.22503->generic_class;
      if (D.22504 != 0B) goto <D.22505>; else goto <D.22506>;
      <D.22505>:
      D.22503 = m->klass;
      D.22504 = D.22503->generic_class;
      D.22507 = D.22504->context.class_inst;
      context.class_inst = D.22507;
      goto <D.22508>;
      <D.22506>:
      D.22503 = m->klass;
      D.22509 = D.22503->generic_container;
      D.22510 = D.22509 != 0B;
      D.22511 = (long int) D.22510;
      D.22512 = __builtin_expect (D.22511, 0);
      if (D.22512 != 0) goto <D.22513>; else goto <D.22514>;
      <D.22513>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 796, "!m->klass->generic_container");
      <D.22514>:
      <D.22508>:
      imt_method = mono_arch_find_imt_method (regs, code);
      D.22515 = BIT_FIELD_REF <*imt_method, 32, 160>;
      D.22516 = D.22515 & 4096;
      if (D.22516 != 0) goto <D.22517>; else goto <D.22518>;
      <D.22517>:
      D.22519 = MEM[(struct MonoMethodInflated *)imt_method].context.method_inst;
      context.method_inst = D.22519;
      <D.22518>:
      m = mono_class_inflate_generic_method (declaring, &context);
      m = mono_marshal_get_remoting_invoke_with_check (m);
      addr = mono_compile_method (m);
      D.22520 = addr == 0B;
      D.22521 = (long int) D.22520;
      D.22522 = __builtin_expect (D.22521, 0);
      if (D.22522 != 0) goto <D.22523>; else goto <D.22524>;
      <D.22523>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 807, "addr");
      <D.22524>:
      D.22525 = addr;
      return D.22525;
    }
  finally
    {
      context = {CLOBBER};
    }
}


mono_class_init_trampoline (mgreg_t * regs, guint8 * code, struct MonoVTable * vtable, guint8 * tramp)
{
  unsigned int trampoline_calls.21;
  unsigned int trampoline_calls.22;
  unsigned int D.22530;
  unsigned int D.22531;
  guint8 * plt_entry;

  plt_entry = mono_aot_get_plt_entry (code);
  trampoline_calls.21 = trampoline_calls;
  trampoline_calls.22 = trampoline_calls.21 + 1;
  trampoline_calls = trampoline_calls.22;
  mono_runtime_class_init (vtable);
  D.22530 = BIT_FIELD_REF <*vtable, 32, 160>;
  D.22531 = D.22530 & 33554432;
  if (D.22531 != 0) goto <D.22532>; else goto <D.22533>;
  <D.22532>:
  if (plt_entry != 0B) goto <D.22534>; else goto <D.22535>;
  <D.22534>:
  mono_arch_nullify_plt_entry (plt_entry, regs);
  goto <D.22536>;
  <D.22535>:
  mono_arch_nullify_class_init_trampoline (code, regs);
  <D.22536>:
  <D.22533>:
}


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

  trampoline_calls.23 = trampoline_calls;
  trampoline_calls.24 = trampoline_calls.23 + 1;
  trampoline_calls = trampoline_calls.24;
  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.25;
  unsigned int trampoline_calls.26;
  struct MonoMethod * D.22541;
  struct MonoObject * D.22546;
  struct MonoVTable * D.22548;
  struct MonoClass * D.22549;
  struct MonoClass * D.22550;
  struct MonoRemoteClass * D.22552;
  struct MonoClass * D.22553;
  struct MonoClass * D.22554;
  unsigned int D.22557;
  unsigned int D.22558;
  unsigned int D.22563;
  unsigned int D.22564;
  struct MonoClass * D.22567;
  unsigned int D.22568;
  unsigned int D.22569;
  int mono_aot_only.27;
  void * D.22577;
  void * D.22578;
  int iftmp.28;
  short unsigned int D.22592;
  unsigned int D.22593;
  unsigned int D.22594;
  unsigned int D.22597;
  unsigned int D.22598;
  short unsigned int D.22603;
  int D.22604;
  int D.22605;
  int D.22610;
  guint8 * * D.22620;
  guint8 * D.22622;
  void * D.22630;
  struct MonoMulticastDelegate * D.22631;
  _Bool D.22632;
  int D.22640;
  int D.22641;
  struct MonoMethodSignature * D.22643;
  short unsigned int D.22644;
  int D.22645;
  struct MonoMethodSignature * D.22646;
  short unsigned int D.22647;
  int D.22648;
  int D.22649;
  guint8 * iftmp.29;
  void * D.22657;
  void * D.22658;
  int D.22659;
  void * D.22660;
  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 + 4B];
      impl_nothis = MEM[(void * *)tramp_data + 8B];
      trampoline_calls.25 = trampoline_calls;
      trampoline_calls.26 = trampoline_calls.25 + 1;
      trampoline_calls = trampoline_calls.26;
      delegate = mono_arch_get_this_arg_from_call (regs, code);
      D.22541 = delegate->method;
      if (D.22541 != 0B) goto <D.22542>; else goto <D.22543>;
      <D.22542>:
      method = delegate->method;
      D.22546 = delegate->target;
      if (D.22546 != 0B) goto <D.22547>; else goto <D.22544>;
      <D.22547>:
      D.22546 = delegate->target;
      D.22548 = D.22546->vtable;
      D.22549 = D.22548->klass;
      D.22550 = mono_defaults.transparent_proxy_class;
      if (D.22549 == D.22550) goto <D.22551>; else goto <D.22544>;
      <D.22551>:
      D.22546 = delegate->target;
      D.22552 = MEM[(struct MonoTransparentProxy *)D.22546].remote_class;
      D.22553 = D.22552->proxy_class;
      D.22554 = mono_class_get_com_object_class ();
      if (D.22553 != D.22554) goto <D.22555>; else goto <D.22556>;
      <D.22555>:
      D.22546 = delegate->target;
      D.22552 = MEM[(struct MonoTransparentProxy *)D.22546].remote_class;
      D.22553 = D.22552->proxy_class;
      D.22557 = BIT_FIELD_REF <*D.22553, 32, 160>;
      D.22558 = D.22557 & 1073741824;
      if (D.22558 == 0) goto <D.22559>; else goto <D.22560>;
      <D.22559>:
      method = mono_marshal_get_remoting_invoke (method);
      <D.22560>:
      <D.22556>:
      goto <D.22545>;
      <D.22544>:
      mono_error_init (&err);
      sig = mono_method_signature_checked (method, &err);
      if (sig == 0B) goto <D.22561>; else goto <D.22562>;
      <D.22561>:
      mono_error_raise_exception (&err);
      <D.22562>:
      D.22563 = BIT_FIELD_REF <*sig, 32, 64>;
      D.22564 = D.22563 & 4194304;
      if (D.22564 != 0) goto <D.22565>; else goto <D.22566>;
      <D.22565>:
      D.22567 = method->klass;
      D.22568 = BIT_FIELD_REF <*D.22567, 32, 160>;
      D.22569 = D.22568 & 8;
      if (D.22569 != 0) goto <D.22570>; else goto <D.22571>;
      <D.22570>:
      mono_aot_only.27 = mono_aot_only;
      if (mono_aot_only.27 != 0) goto <D.22573>; else goto <D.22574>;
      <D.22573>:
      need_unbox_tramp = 1;
      goto <D.22575>;
      <D.22574>:
      method = mono_marshal_get_unbox_wrapper (method);
      <D.22575>:
      <D.22571>:
      <D.22566>:
      <D.22545>:
      goto <D.22576>;
      <D.22543>:
      D.22577 = delegate->method_ptr;
      D.22578 = mono_get_addr_from_ftnptr (D.22577);
      ji = mono_jit_info_table_find (domain, D.22578);
      if (ji != 0B) goto <D.22579>; else goto <D.22580>;
      <D.22579>:
      method = jinfo_get_method (ji);
      <D.22580>:
      <D.22576>:
      if (method != 0B) goto <D.22581>; else goto <D.22582>;
      <D.22581>:
      mono_error_init (&err);
      sig = mono_method_signature_checked (method, &err);
      if (sig == 0B) goto <D.22583>; else goto <D.22584>;
      <D.22583>:
      mono_error_raise_exception (&err);
      <D.22584>:
      D.22546 = delegate->target;
      if (D.22546 == 0B) goto <D.22588>; else goto <D.22586>;
      <D.22588>:
      D.22563 = BIT_FIELD_REF <*sig, 32, 64>;
      D.22564 = D.22563 & 4194304;
      if (D.22564 != 0) goto <D.22589>; else goto <D.22586>;
      <D.22589>:
      iftmp.28 = 1;
      goto <D.22587>;
      <D.22586>:
      iftmp.28 = 0;
      <D.22587>:
      callvirt = iftmp.28;
      D.22546 = delegate->target;
      if (D.22546 != 0B) goto <D.22590>; else goto <D.22591>;
      <D.22590>:
      D.22592 = method->flags;
      D.22593 = (unsigned int) D.22592;
      D.22594 = D.22593 & 1088;
      if (D.22594 == 1088) goto <D.22595>; else goto <D.22596>;
      <D.22595>:
      D.22567 = method->klass;
      D.22597 = D.22567->flags;
      D.22598 = D.22597 & 128;
      if (D.22598 != 0) goto <D.22599>; else goto <D.22600>;
      <D.22599>:
      D.22546 = delegate->target;
      method = mono_object_get_virtual_method (D.22546, method);
      enable_caching = 0;
      <D.22600>:
      <D.22596>:
      <D.22591>:
      <D.22582>:
      if (method != 0B) goto <D.22601>; else goto <D.22602>;
      <D.22601>:
      D.22603 = method->iflags;
      D.22604 = (int) D.22603;
      D.22605 = D.22604 & 32;
      if (D.22605 != 0) goto <D.22606>; else goto <D.22607>;
      <D.22606>:
      method = mono_marshal_get_synchronized_wrapper (method);
      <D.22607>:
      <D.22602>:
      if (method != 0B) goto <D.22608>; else goto <D.22609>;
      <D.22608>:
      D.22610 = mono_method_needs_static_rgctx_invoke (method, 0);
      if (D.22610 != 0) goto <D.22611>; else goto <D.22612>;
      <D.22611>:
      need_rgctx_tramp = 1;
      <D.22612>:
      <D.22609>:
      if (method != 0B) goto <D.22615>; else goto <D.22613>;
      <D.22615>:
      if (callvirt == 0) goto <D.22616>; else goto <D.22613>;
      <D.22616>:
      if (enable_caching != 0) goto <D.22619>; else goto <D.22617>;
      <D.22619>:
      D.22620 = delegate->method_code;
      if (D.22620 != 0B) goto <D.22621>; else goto <D.22617>;
      <D.22621>:
      D.22620 = delegate->method_code;
      D.22622 = *D.22620;
      if (D.22622 != 0B) goto <D.22623>; else goto <D.22617>;
      <D.22623>:
      D.22620 = delegate->method_code;
      D.22622 = *D.22620;
      delegate->method_ptr = D.22622;
      goto <D.22618>;
      <D.22617>:
      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.22624>; else goto <D.22625>;
      <D.22624>:
      D.22620 = delegate->method_code;
      if (D.22620 != 0B) goto <D.22626>; else goto <D.22627>;
      <D.22626>:
      D.22620 = delegate->method_code;
      D.22577 = delegate->method_ptr;
      *D.22620 = D.22577;
      <D.22627>:
      <D.22625>:
      <D.22618>:
      goto <D.22614>;
      <D.22613>:
      if (need_rgctx_tramp != 0) goto <D.22628>; else goto <D.22629>;
      <D.22628>:
      D.22577 = delegate->method_ptr;
      D.22630 = mono_create_static_rgctx_trampoline (method, D.22577);
      delegate->method_ptr = D.22630;
      <D.22629>:
      <D.22614>:
      D.22631 = MEM[(struct MonoMulticastDelegate *)delegate].prev;
      D.22632 = D.22631 != 0B;
      multicast = (gboolean) D.22632;
      if (multicast == 0) goto <D.22633>; else goto <D.22634>;
      <D.22633>:
      if (callvirt == 0) goto <D.22635>; else goto <D.22636>;
      <D.22635>:
      if (method != 0B) goto <D.22639>; else goto <D.22637>;
      <D.22639>:
      D.22592 = method->flags;
      D.22640 = (int) D.22592;
      D.22641 = D.22640 & 16;
      if (D.22641 != 0) goto <D.22642>; else goto <D.22637>;
      <D.22642>:
      D.22643 = mono_method_signature (method);
      D.22644 = D.22643->param_count;
      D.22645 = (int) D.22644;
      D.22646 = mono_method_signature (invoke);
      D.22647 = D.22646->param_count;
      D.22648 = (int) D.22647;
      D.22649 = D.22648 + 1;
      if (D.22645 == D.22649) goto <D.22650>; else goto <D.22637>;
      <D.22650>:
      code = impl_this;
      goto <D.22638>;
      <D.22637>:
      D.22546 = delegate->target;
      if (D.22546 != 0B) goto <D.22652>; else goto <D.22653>;
      <D.22652>:
      iftmp.29 = impl_this;
      goto <D.22654>;
      <D.22653>:
      iftmp.29 = impl_nothis;
      <D.22654>:
      code = iftmp.29;
      <D.22638>:
      if (code != 0B) goto <D.22655>; else goto <D.22656>;
      <D.22655>:
      D.22657 = mono_get_addr_from_ftnptr (code);
      delegate->invoke_impl = D.22657;
      D.22658 = code;
      return D.22658;
      <D.22656>:
      <D.22636>:
      <D.22634>:
      m = mono_marshal_get_delegate_invoke (invoke, delegate);
      code = mono_compile_method (m);
      D.22659 = mono_method_needs_static_rgctx_invoke (m, 0);
      code = mini_add_method_trampoline (0B, m, code, D.22659, 0);
      D.22660 = mono_get_addr_from_ftnptr (code);
      delegate->invoke_impl = D.22660;
      D.22658 = code;
      return D.22658;
    }
  finally
    {
      err = {CLOBBER};
    }
}


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

  switch (tramp_type) <default: <D.21819>, case 0: <D.21808>, case 1: <D.21809>, case 2: <D.21810>, case 3: <D.21811>, case 4: <D.21812>, case 7: <D.21813>, case 8: <D.21814>, case 9: <D.21815>, case 10: <D.21816>, case 11: <D.21817>, case 12: <D.21818>>
  <D.21808>:
  <D.21809>:
  D.22663 = mono_magic_trampoline;
  return D.22663;
  <D.21810>:
  D.22663 = mono_class_init_trampoline;
  return D.22663;
  <D.21811>:
  D.22663 = mono_generic_class_init_trampoline;
  return D.22663;
  <D.21812>:
  D.22663 = mono_rgctx_lazy_fetch_trampoline;
  return D.22663;
  <D.21813>:
  D.22663 = mono_delegate_trampoline;
  return D.22663;
  <D.21814>:
  D.22663 = mono_altstack_restore_prot;
  return D.22663;
  <D.21815>:
  D.22663 = mono_generic_virtual_remoting_trampoline;
  return D.22663;
  <D.21816>:
  D.22663 = mono_monitor_enter_trampoline;
  return D.22663;
  <D.21817>:
  D.22663 = mono_monitor_exit_trampoline;
  return D.22663;
  <D.21818>:
  D.22663 = mono_vcall_trampoline;
  return D.22663;
  <D.21819>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-trampolines.c", 1200);
  D.22663 = 0B;
  return D.22663;
}


mono_vcall_trampoline (mgreg_t * regs, guint8 * code, int slot, guint8 * tramp)
{
  unsigned int trampoline_calls.30;
  unsigned int trampoline_calls.31;
  _Bool D.22667;
  long int D.22668;
  long int D.22669;
  struct MonoDomain * D.22674;
  struct MonoClass * D.22677;
  unsigned int D.22678;
  unsigned int D.22679;
  struct MonoDomain * D.22682;
  int D.22683;
  void * D.22686;
  struct MonoDomain * D.22687;
  unsigned int slot.32;
  unsigned int D.22690;
  struct MonoObject * this;
  struct MonoVTable * vt;
  void * * vtable_slot;
  struct MonoMethod * m;
  gboolean need_rgctx_tramp;
  void * addr;

  need_rgctx_tramp = 0;
  trampoline_calls.30 = trampoline_calls;
  trampoline_calls.31 = trampoline_calls.30 + 1;
  trampoline_calls = trampoline_calls.31;
  this = mono_arch_get_this_arg_from_call (regs, code);
  D.22667 = this == 0B;
  D.22668 = (long int) D.22667;
  D.22669 = __builtin_expect (D.22668, 0);
  if (D.22669 != 0) goto <D.22670>; else goto <D.22671>;
  <D.22670>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 732, "this");
  <D.22671>:
  vt = this->vtable;
  if (slot >= 0) goto <D.22672>; else goto <D.22673>;
  <D.22672>:
  vtable_slot = &vt->vtable[slot];
  D.22674 = mono_domain_get ();
  addr = mono_aot_get_method_from_vt_slot (D.22674, vt, slot);
  if (addr != 0B) goto <D.22675>; else goto <D.22676>;
  <D.22675>:
  D.22677 = vt->klass;
  D.22678 = BIT_FIELD_REF <*D.22677, 32, 160>;
  D.22679 = D.22678 & 8;
  if (D.22679 == 0) goto <D.22680>; else goto <D.22681>;
  <D.22680>:
  D.22682 = mono_domain_get ();
  D.22683 = mono_domain_owns_vtable_slot (D.22682, vtable_slot);
  if (D.22683 != 0) goto <D.22684>; else goto <D.22685>;
  <D.22684>:
  *vtable_slot = addr;
  <D.22685>:
  D.22687 = mono_domain_get ();
  D.22686 = mono_create_ftnptr (D.22687, addr);
  return D.22686;
  <D.22681>:
  <D.22676>:
  D.22677 = vt->klass;
  m = mono_class_get_vtable_entry (D.22677, slot);
  need_rgctx_tramp = mono_method_needs_static_rgctx_invoke (m, 0);
  goto <D.22688>;
  <D.22673>:
  slot.32 = (unsigned int) slot;
  D.22690 = slot.32 * 4;
  vtable_slot = vt + D.22690;
  m = 0B;
  need_rgctx_tramp = 0;
  <D.22688>:
  D.22686 = common_call_trampoline (regs, code, m, tramp, vt, vtable_slot, need_rgctx_tramp);
  return D.22686;
}


mono_rgctx_lazy_fetch_trampoline (mgreg_t * regs, guint8 * code, void * data, guint8 * tramp)
{
  mgreg_t * D.22692;
  int D.22693;
  signed int slot.33;
  _Bool D.22695;
  unsigned int trampoline_calls.34;
  unsigned int trampoline_calls.35;
  int inited.36;
  int num_lookups.37;
  int num_lookups.38;
  void * D.22705;
  static gboolean inited = 0;
  static int num_lookups = 0;
  guint32 slot;
  mgreg_t * r;
  void * arg;
  guint32 index;
  gboolean mrgctx;

  slot = (guint32) data;
  r = regs;
  D.22692 = r + 16;
  D.22693 = *D.22692;
  arg = (void *) D.22693;
  index = slot & 2147483647;
  slot.33 = (signed int) slot;
  D.22695 = slot.33 < 0;
  mrgctx = (gboolean) D.22695;
  trampoline_calls.34 = trampoline_calls;
  trampoline_calls.35 = trampoline_calls.34 + 1;
  trampoline_calls = trampoline_calls.35;
  inited.36 = inited;
  if (inited.36 == 0) goto <D.22699>; else goto <D.22700>;
  <D.22699>:
  mono_counters_register ("RGCTX unmanaged lookups", 2048, &num_lookups);
  inited = 1;
  <D.22700>:
  num_lookups.37 = num_lookups;
  num_lookups.38 = num_lookups.37 + 1;
  num_lookups = num_lookups.38;
  if (mrgctx != 0) goto <D.22703>; else goto <D.22704>;
  <D.22703>:
  D.22705 = mono_method_fill_runtime_generic_context (arg, code, index);
  return D.22705;
  <D.22704>:
  D.22705 = mono_class_fill_runtime_generic_context (arg, code, index);
  return D.22705;
}


mono_trampolines_init ()
{
  int mono_aot_only.39;
  guchar * D.22710;
  guchar * D.22711;
  guchar * D.22712;
  guchar * D.22713;
  guchar * D.22714;
  guchar * D.22715;
  guchar * D.22716;
  guchar * D.22717;
  guchar * D.22718;
  guchar * D.22719;
  guchar * D.22720;

  InitializeCriticalSection (&trampolines_mutex);
  mono_aot_only.39 = mono_aot_only;
  if (mono_aot_only.39 != 0) goto <D.22708>; else goto <D.22709>;
  <D.22708>:
  return;
  <D.22709>:
  D.22710 = create_trampoline_code (0);
  mono_trampoline_code[0] = D.22710;
  D.22711 = create_trampoline_code (1);
  mono_trampoline_code[1] = D.22711;
  D.22712 = create_trampoline_code (2);
  mono_trampoline_code[2] = D.22712;
  D.22713 = create_trampoline_code (3);
  mono_trampoline_code[3] = D.22713;
  D.22714 = create_trampoline_code (4);
  mono_trampoline_code[4] = D.22714;
  D.22715 = create_trampoline_code (7);
  mono_trampoline_code[7] = D.22715;
  D.22716 = create_trampoline_code (8);
  mono_trampoline_code[8] = D.22716;
  D.22717 = create_trampoline_code (9);
  mono_trampoline_code[9] = D.22717;
  D.22718 = create_trampoline_code (10);
  mono_trampoline_code[10] = D.22718;
  D.22719 = create_trampoline_code (11);
  mono_trampoline_code[11] = D.22719;
  D.22720 = create_trampoline_code (12);
  mono_trampoline_code[12] = D.22720;
  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.40;
  guchar * D.22723;
  struct MonoTrampInfo * info;
  guchar * code;

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


mono_trampolines_cleanup ()
{
  struct GHashTable * class_init_hash_addr.41;
  struct GHashTable * rgctx_lazy_fetch_trampoline_hash.42;
  struct GHashTable * rgctx_lazy_fetch_trampoline_hash_addr.43;

  class_init_hash_addr.41 = class_init_hash_addr;
  if (class_init_hash_addr.41 != 0B) goto <D.22727>; else goto <D.22728>;
  <D.22727>:
  class_init_hash_addr.41 = class_init_hash_addr;
  monoeg_g_hash_table_destroy (class_init_hash_addr.41);
  <D.22728>:
  rgctx_lazy_fetch_trampoline_hash.42 = rgctx_lazy_fetch_trampoline_hash;
  if (rgctx_lazy_fetch_trampoline_hash.42 != 0B) goto <D.22730>; else goto <D.22731>;
  <D.22730>:
  rgctx_lazy_fetch_trampoline_hash.42 = rgctx_lazy_fetch_trampoline_hash;
  monoeg_g_hash_table_destroy (rgctx_lazy_fetch_trampoline_hash.42);
  <D.22731>:
  rgctx_lazy_fetch_trampoline_hash_addr.43 = rgctx_lazy_fetch_trampoline_hash_addr;
  if (rgctx_lazy_fetch_trampoline_hash_addr.43 != 0B) goto <D.22733>; else goto <D.22734>;
  <D.22733>:
  rgctx_lazy_fetch_trampoline_hash_addr.43 = rgctx_lazy_fetch_trampoline_hash_addr;
  monoeg_g_hash_table_destroy (rgctx_lazy_fetch_trampoline_hash_addr.43);
  <D.22734>:
  DeleteCriticalSection (&trampolines_mutex);
}


mono_get_trampoline_code (MonoTrampolineType tramp_type)
{
  guint8 * D.22735;
  _Bool D.22736;
  long int D.22737;
  long int D.22738;
  guint8 * D.22741;

  D.22735 = mono_trampoline_code[tramp_type];
  D.22736 = D.22735 == 0B;
  D.22737 = (long int) D.22736;
  D.22738 = __builtin_expect (D.22737, 0);
  if (D.22738 != 0) goto <D.22739>; else goto <D.22740>;
  <D.22739>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1271, "mono_trampoline_code [tramp_type]");
  <D.22740>:
  D.22741 = mono_trampoline_code[tramp_type];
  return D.22741;
}


mono_create_specific_trampoline (void * arg1, MonoTrampolineType tramp_type, struct MonoDomain * domain, guint32 * code_len)
{
  int mono_aot_only.44;
  void * D.22746;
  struct MonoImage * D.22747;

  mono_aot_only.44 = mono_aot_only;
  if (mono_aot_only.44 != 0) goto <D.22744>; else goto <D.22745>;
  <D.22744>:
  D.22747 = mono_defaults.corlib;
  D.22746 = mono_aot_create_specific_trampoline (D.22747, arg1, tramp_type, domain, code_len);
  return D.22746;
  <D.22745>:
  D.22746 = mono_arch_create_specific_trampoline (arg1, tramp_type, domain, code_len);
  return D.22746;
}


mono_create_class_init_trampoline (struct MonoVTable * vtable)
{
  struct MonoClass * D.22749;
  struct MonoGenericContainer * D.22750;
  _Bool D.22751;
  long int D.22752;
  long int D.22753;
  union mono_mutex_t * D.22756;
  _Bool D.22759;
  long int D.22760;
  long int D.22761;
  void * D.22764;
  struct GHashTable * D.22765;
  _Bool D.22768;
  long int D.22769;
  long int D.22770;
  void * D.22775;
  _Bool D.22778;
  long int D.22779;
  long int D.22780;
  _Bool D.22785;
  long int D.22786;
  long int D.22787;
  _Bool D.22792;
  long int D.22793;
  long int D.22794;
  struct GHashTable * class_init_hash_addr.45;
  struct GHashTable * class_init_hash_addr.46;
  _Bool D.22803;
  long int D.22804;
  long int D.22805;
  void * code;
  void * ptr;
  struct MonoDomain * domain;

  domain = vtable->domain;
  D.22749 = vtable->klass;
  D.22750 = D.22749->generic_container;
  D.22751 = D.22750 != 0B;
  D.22752 = (long int) D.22751;
  D.22753 = __builtin_expect (D.22752, 0);
  if (D.22753 != 0) goto <D.22754>; else goto <D.22755>;
  <D.22754>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1291, "!vtable->klass->generic_container");
  <D.22755>:
  {
    int ret;

    D.22756 = &domain->lock.mutex;
    ret = pthread_mutex_lock (D.22756);
    if (ret != 0) goto <D.22757>; else goto <D.22758>;
    <D.22757>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.22758>:
    D.22759 = ret != 0;
    D.22760 = (long int) D.22759;
    D.22761 = __builtin_expect (D.22760, 0);
    if (D.22761 != 0) goto <D.22762>; else goto <D.22763>;
    <D.22762>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1294, "ret == 0");
    <D.22763>:
  }
  D.22764 = domain->runtime_info;
  D.22765 = MEM[(struct MonoJitDomainInfo *)D.22764].class_init_trampoline_hash;
  ptr = monoeg_g_hash_table_lookup (D.22765, vtable);
  {
    int ret;

    D.22756 = &domain->lock.mutex;
    ret = pthread_mutex_unlock (D.22756);
    if (ret != 0) goto <D.22766>; else goto <D.22767>;
    <D.22766>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.22767>:
    D.22768 = ret != 0;
    D.22769 = (long int) D.22768;
    D.22770 = __builtin_expect (D.22769, 0);
    if (D.22770 != 0) goto <D.22771>; else goto <D.22772>;
    <D.22771>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1298, "ret == 0");
    <D.22772>:
  }
  if (ptr != 0B) goto <D.22773>; else goto <D.22774>;
  <D.22773>:
  D.22775 = ptr;
  return D.22775;
  <D.22774>:
  code = mono_create_specific_trampoline (vtable, 2, domain, 0B);
  ptr = mono_create_ftnptr (domain, code);
  {
    int ret;

    D.22756 = &domain->lock.mutex;
    ret = pthread_mutex_lock (D.22756);
    if (ret != 0) goto <D.22776>; else goto <D.22777>;
    <D.22776>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.22777>:
    D.22778 = ret != 0;
    D.22779 = (long int) D.22778;
    D.22780 = __builtin_expect (D.22779, 0);
    if (D.22780 != 0) goto <D.22781>; else goto <D.22782>;
    <D.22781>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1307, "ret == 0");
    <D.22782>:
  }
  D.22764 = domain->runtime_info;
  D.22765 = MEM[(struct MonoJitDomainInfo *)D.22764].class_init_trampoline_hash;
  monoeg_g_hash_table_insert_replace (D.22765, vtable, ptr, 0);
  {
    int ret;

    D.22756 = &domain->lock.mutex;
    ret = pthread_mutex_unlock (D.22756);
    if (ret != 0) goto <D.22783>; else goto <D.22784>;
    <D.22783>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.22784>:
    D.22785 = ret != 0;
    D.22786 = (long int) D.22785;
    D.22787 = __builtin_expect (D.22786, 0);
    if (D.22787 != 0) goto <D.22788>; else goto <D.22789>;
    <D.22788>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1310, "ret == 0");
    <D.22789>:
  }
  {
    int ret;

    ret = pthread_mutex_lock (&trampolines_mutex.mutex);
    if (ret != 0) goto <D.22790>; else goto <D.22791>;
    <D.22790>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.22791>:
    D.22792 = ret != 0;
    D.22793 = (long int) D.22792;
    D.22794 = __builtin_expect (D.22793, 0);
    if (D.22794 != 0) goto <D.22795>; else goto <D.22796>;
    <D.22795>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1312, "ret == 0");
    <D.22796>:
  }
  class_init_hash_addr.45 = class_init_hash_addr;
  if (class_init_hash_addr.45 == 0B) goto <D.22798>; else goto <D.22799>;
  <D.22798>:
  class_init_hash_addr.46 = monoeg_g_hash_table_new (0B, 0B);
  class_init_hash_addr = class_init_hash_addr.46;
  <D.22799>:
  class_init_hash_addr.45 = class_init_hash_addr;
  monoeg_g_hash_table_insert_replace (class_init_hash_addr.45, ptr, vtable, 0);
  {
    int ret;

    ret = pthread_mutex_unlock (&trampolines_mutex.mutex);
    if (ret != 0) goto <D.22801>; else goto <D.22802>;
    <D.22801>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.22802>:
    D.22803 = ret != 0;
    D.22804 = (long int) D.22803;
    D.22805 = __builtin_expect (D.22804, 0);
    if (D.22805 != 0) goto <D.22806>; else goto <D.22807>;
    <D.22806>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1316, "ret == 0");
    <D.22807>:
  }
  D.22775 = ptr;
  return D.22775;
}


mono_create_generic_class_init_trampoline ()
{
  _Bool D.22811;
  long int D.22812;
  long int D.22813;
  void * code.47;
  int mono_aot_only.48;
  void * D.22822;
  void * code.49;
  void * code.50;
  struct MonoTrampInfo * info.51;
  _Bool D.22829;
  long int D.22830;
  long int D.22831;
  void * D.22834;
  static void * code;
  struct MonoTrampInfo * info;

  try
    {
      {
        int ret;

        ret = pthread_mutex_lock (&trampolines_mutex.mutex);
        if (ret != 0) goto <D.22809>; else goto <D.22810>;
        <D.22809>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.22810>:
        D.22811 = ret != 0;
        D.22812 = (long int) D.22811;
        D.22813 = __builtin_expect (D.22812, 0);
        if (D.22813 != 0) goto <D.22814>; else goto <D.22815>;
        <D.22814>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1328, "ret == 0");
        <D.22815>:
      }
      code.47 = code;
      if (code.47 == 0B) goto <D.22817>; else goto <D.22818>;
      <D.22817>:
      mono_aot_only.48 = mono_aot_only;
      if (mono_aot_only.48 != 0) goto <D.22820>; else goto <D.22821>;
      <D.22820>:
      D.22822 = mono_aot_get_trampoline ("generic_class_init_trampoline");
      code.49 = mono_get_addr_from_ftnptr (D.22822);
      code = code.49;
      goto <D.22824>;
      <D.22821>:
      code.50 = mono_arch_create_generic_class_init_trampoline (&info, 0);
      code = code.50;
      info.51 = info;
      mono_tramp_info_register (info.51);
      <D.22824>:
      <D.22818>:
      {
        int ret;

        ret = pthread_mutex_unlock (&trampolines_mutex.mutex);
        if (ret != 0) goto <D.22827>; else goto <D.22828>;
        <D.22827>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.22828>:
        D.22829 = ret != 0;
        D.22830 = (long int) D.22829;
        D.22831 = __builtin_expect (D.22830, 0);
        if (D.22831 != 0) goto <D.22832>; else goto <D.22833>;
        <D.22832>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1340, "ret == 0");
        <D.22833>:
      }
      D.22834 = code;
      return D.22834;
    }
  finally
    {
      info = {CLOBBER};
    }
}


mono_create_jump_trampoline (struct MonoDomain * domain, struct MonoMethod * method, gboolean add_sync_wrapper)
{
  struct MonoJitInfo * ji.52;
  unsigned int D.22840;
  unsigned int D.22841;
  short unsigned int D.22844;
  int D.22845;
  int D.22846;
  void * D.22849;
  union mono_mutex_t * D.22850;
  _Bool D.22853;
  long int D.22854;
  long int D.22855;
  void * D.22858;
  struct GHashTable * D.22859;
  _Bool D.22862;
  long int D.22863;
  long int D.22864;
  struct MonoDomain * D.22869;
  unsigned int code_size.53;
  _Bool D.22871;
  long int D.22872;
  long int D.22873;
  void * ji.54;
  int code_size.55;
  _Bool D.22880;
  long int D.22881;
  long int D.22882;
  void * D.22885;
  _Bool D.22888;
  long int D.22889;
  long int D.22890;
  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.22837>; else goto <D.22838>;
      <D.22837>:
      ji.52 = ji;
      D.22840 = BIT_FIELD_REF <*ji.52, 32, 160>;
      D.22841 = D.22840 & 131072;
      if (D.22841 == 0) goto <D.22842>; else goto <D.22843>;
      <D.22842>:
      D.22844 = method->iflags;
      D.22845 = (int) D.22844;
      D.22846 = D.22845 & 32;
      if (D.22846 == 0) goto <D.22847>; else goto <D.22848>;
      <D.22847>:
      D.22849 = code;
      return D.22849;
      <D.22848>:
      <D.22843>:
      <D.22838>:
      {
        int ret;

        D.22850 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.22850);
        if (ret != 0) goto <D.22851>; else goto <D.22852>;
        <D.22851>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.22852>:
        D.22853 = ret != 0;
        D.22854 = (long int) D.22853;
        D.22855 = __builtin_expect (D.22854, 0);
        if (D.22855 != 0) goto <D.22856>; else goto <D.22857>;
        <D.22856>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1365, "ret == 0");
        <D.22857>:
      }
      D.22858 = domain->runtime_info;
      D.22859 = MEM[(struct MonoJitDomainInfo *)D.22858].jump_trampoline_hash;
      code = monoeg_g_hash_table_lookup (D.22859, method);
      {
        int ret;

        D.22850 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.22850);
        if (ret != 0) goto <D.22860>; else goto <D.22861>;
        <D.22860>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.22861>:
        D.22862 = ret != 0;
        D.22863 = (long int) D.22862;
        D.22864 = __builtin_expect (D.22863, 0);
        if (D.22864 != 0) goto <D.22865>; else goto <D.22866>;
        <D.22865>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1367, "ret == 0");
        <D.22866>:
      }
      if (code != 0B) goto <D.22867>; else goto <D.22868>;
      <D.22867>:
      D.22849 = code;
      return D.22849;
      <D.22868>:
      D.22869 = mono_domain_get ();
      code = mono_create_specific_trampoline (method, 1, D.22869, &code_size);
      code_size.53 = code_size;
      D.22871 = code_size.53 == 0;
      D.22872 = (long int) D.22871;
      D.22873 = __builtin_expect (D.22872, 0);
      if (D.22873 != 0) goto <D.22874>; else goto <D.22875>;
      <D.22874>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1372, "code_size");
      <D.22875>:
      ji.54 = mono_domain_alloc0 (domain, 28);
      ji = ji.54;
      ji.52 = ji;
      ji.52->code_start = code;
      ji.52 = ji;
      code_size.53 = code_size;
      code_size.55 = (int) code_size.53;
      ji.52->code_size = code_size.55;
      ji.52 = ji;
      ji.52->d.method = method;
      ji.52 = ji;
      mono_jit_info_table_add (domain, ji.52);
      {
        int ret;

        D.22850 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.22850);
        if (ret != 0) goto <D.22878>; else goto <D.22879>;
        <D.22878>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.22879>:
        D.22880 = ret != 0;
        D.22881 = (long int) D.22880;
        D.22882 = __builtin_expect (D.22881, 0);
        if (D.22882 != 0) goto <D.22883>; else goto <D.22884>;
        <D.22883>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1386, "ret == 0");
        <D.22884>:
      }
      D.22858 = domain->runtime_info;
      D.22859 = MEM[(struct MonoJitDomainInfo *)D.22858].jump_trampoline_hash;
      ji.52 = ji;
      D.22885 = ji.52->code_start;
      monoeg_g_hash_table_insert_replace (D.22859, method, D.22885, 0);
      {
        int ret;

        D.22850 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.22850);
        if (ret != 0) goto <D.22886>; else goto <D.22887>;
        <D.22886>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.22887>:
        D.22888 = ret != 0;
        D.22889 = (long int) D.22888;
        D.22890 = __builtin_expect (D.22889, 0);
        if (D.22890 != 0) goto <D.22891>; else goto <D.22892>;
        <D.22891>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1388, "ret == 0");
        <D.22892>:
      }
      ji.52 = ji;
      D.22849 = ji.52->code_start;
      return D.22849;
    }
  finally
    {
      ji = {CLOBBER};
      code_size = {CLOBBER};
    }
}


mono_create_jit_trampoline_in_domain (struct MonoDomain * domain, struct MonoMethod * method)
{
  int mono_aot_only.56;
  void * D.22900;
  union mono_mutex_t * D.22901;
  _Bool D.22904;
  long int D.22905;
  long int D.22906;
  void * D.22909;
  struct GHashTable * D.22910;
  _Bool D.22913;
  long int D.22914;
  long int D.22915;
  _Bool D.22922;
  long int D.22923;
  long int D.22924;
  _Bool D.22929;
  long int D.22930;
  long int D.22931;
  unsigned int jit_trampolines.57;
  unsigned int jit_trampolines.58;
  void * tramp;

  mono_aot_only.56 = mono_aot_only;
  if (mono_aot_only.56 != 0) goto <D.22896>; else goto <D.22897>;
  <D.22896>:
  {
    void * code;

    code = mono_jit_find_compiled_method (domain, method);
    if (code != 0B) goto <D.22898>; else goto <D.22899>;
    <D.22898>:
    D.22900 = code;
    return D.22900;
    <D.22899>:
  }
  <D.22897>:
  {
    int ret;

    D.22901 = &domain->lock.mutex;
    ret = pthread_mutex_lock (D.22901);
    if (ret != 0) goto <D.22902>; else goto <D.22903>;
    <D.22902>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.22903>:
    D.22904 = ret != 0;
    D.22905 = (long int) D.22904;
    D.22906 = __builtin_expect (D.22905, 0);
    if (D.22906 != 0) goto <D.22907>; else goto <D.22908>;
    <D.22907>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1406, "ret == 0");
    <D.22908>:
  }
  D.22909 = domain->runtime_info;
  D.22910 = MEM[(struct MonoJitDomainInfo *)D.22909].jit_trampoline_hash;
  tramp = monoeg_g_hash_table_lookup (D.22910, method);
  {
    int ret;

    D.22901 = &domain->lock.mutex;
    ret = pthread_mutex_unlock (D.22901);
    if (ret != 0) goto <D.22911>; else goto <D.22912>;
    <D.22911>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.22912>:
    D.22913 = ret != 0;
    D.22914 = (long int) D.22913;
    D.22915 = __builtin_expect (D.22914, 0);
    if (D.22915 != 0) goto <D.22916>; else goto <D.22917>;
    <D.22916>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1408, "ret == 0");
    <D.22917>:
  }
  if (tramp != 0B) goto <D.22918>; else goto <D.22919>;
  <D.22918>:
  D.22900 = tramp;
  return D.22900;
  <D.22919>:
  tramp = mono_create_specific_trampoline (method, 0, domain, 0B);
  {
    int ret;

    D.22901 = &domain->lock.mutex;
    ret = pthread_mutex_lock (D.22901);
    if (ret != 0) goto <D.22920>; else goto <D.22921>;
    <D.22920>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.22921>:
    D.22922 = ret != 0;
    D.22923 = (long int) D.22922;
    D.22924 = __builtin_expect (D.22923, 0);
    if (D.22924 != 0) goto <D.22925>; else goto <D.22926>;
    <D.22925>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1414, "ret == 0");
    <D.22926>:
  }
  D.22909 = domain->runtime_info;
  D.22910 = MEM[(struct MonoJitDomainInfo *)D.22909].jit_trampoline_hash;
  monoeg_g_hash_table_insert_replace (D.22910, method, tramp, 0);
  {
    int ret;

    D.22901 = &domain->lock.mutex;
    ret = pthread_mutex_unlock (D.22901);
    if (ret != 0) goto <D.22927>; else goto <D.22928>;
    <D.22927>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.22928>:
    D.22929 = ret != 0;
    D.22930 = (long int) D.22929;
    D.22931 = __builtin_expect (D.22930, 0);
    if (D.22931 != 0) goto <D.22932>; else goto <D.22933>;
    <D.22932>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1416, "ret == 0");
    <D.22933>:
  }
  jit_trampolines.57 = jit_trampolines;
  jit_trampolines.58 = jit_trampolines.57 + 1;
  jit_trampolines = jit_trampolines.58;
  D.22900 = tramp;
  return D.22900;
}


mono_create_jit_trampoline (struct MonoMethod * method)
{
  void * D.22937;
  struct MonoDomain * D.22938;

  D.22938 = mono_domain_get ();
  D.22937 = mono_create_jit_trampoline_in_domain (D.22938, method);
  return D.22937;
}


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

  domain = mono_domain_get ();
  start = mono_domain_alloc0 (domain, 8);
  buf = start;
  MEM[(void * *)buf] = image;
  buf = buf + 4;
  MEM[(guint32 *)buf] = token;
  tramp = mono_create_specific_trampoline (start, 5, domain, 0B);
  jit_trampolines.59 = jit_trampolines;
  jit_trampolines.60 = jit_trampolines.59 + 1;
  jit_trampolines = jit_trampolines.60;
  D.22942 = tramp;
  return D.22942;
}


mono_create_delegate_trampoline (struct MonoDomain * domain, struct MonoClass * klass)
{
  union mono_mutex_t * D.22944;
  _Bool D.22947;
  long int D.22948;
  long int D.22949;
  void * D.22952;
  struct GHashTable * D.22953;
  _Bool D.22956;
  long int D.22957;
  long int D.22958;
  void * D.22963;
  _Bool D.22964;
  long int D.22965;
  long int D.22966;
  void * * D.22969;
  struct MonoMethodSignature * D.22970;
  void * D.22971;
  void * * D.22972;
  struct MonoMethodSignature * D.22973;
  void * D.22974;
  unsigned int code_size.61;
  _Bool D.22976;
  long int D.22977;
  long int D.22978;
  _Bool D.22983;
  long int D.22984;
  long int D.22985;
  _Bool D.22990;
  long int D.22991;
  long int D.22992;
  void * ptr;
  guint32 code_size;
  void * * tramp_data;
  struct MonoMethod * invoke;

  try
    {
      code_size = 0;
      {
        int ret;

        D.22944 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.22944);
        if (ret != 0) goto <D.22945>; else goto <D.22946>;
        <D.22945>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.22946>:
        D.22947 = ret != 0;
        D.22948 = (long int) D.22947;
        D.22949 = __builtin_expect (D.22948, 0);
        if (D.22949 != 0) goto <D.22950>; else goto <D.22951>;
        <D.22950>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1459, "ret == 0");
        <D.22951>:
      }
      D.22952 = domain->runtime_info;
      D.22953 = MEM[(struct MonoJitDomainInfo *)D.22952].delegate_trampoline_hash;
      ptr = monoeg_g_hash_table_lookup (D.22953, klass);
      {
        int ret;

        D.22944 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.22944);
        if (ret != 0) goto <D.22954>; else goto <D.22955>;
        <D.22954>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.22955>:
        D.22956 = ret != 0;
        D.22957 = (long int) D.22956;
        D.22958 = __builtin_expect (D.22957, 0);
        if (D.22958 != 0) goto <D.22959>; else goto <D.22960>;
        <D.22959>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1461, "ret == 0");
        <D.22960>:
      }
      if (ptr != 0B) goto <D.22961>; else goto <D.22962>;
      <D.22961>:
      D.22963 = ptr;
      return D.22963;
      <D.22962>:
      invoke = mono_get_delegate_invoke (klass);
      D.22964 = invoke == 0B;
      D.22965 = (long int) D.22964;
      D.22966 = __builtin_expect (D.22965, 0);
      if (D.22966 != 0) goto <D.22967>; else goto <D.22968>;
      <D.22967>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1467, "invoke");
      <D.22968>:
      tramp_data = mono_domain_alloc (domain, 12);
      *tramp_data = invoke;
      D.22969 = tramp_data + 4;
      D.22970 = mono_method_signature (invoke);
      D.22971 = mono_arch_get_delegate_invoke_impl (D.22970, 1);
      *D.22969 = D.22971;
      D.22972 = tramp_data + 8;
      D.22973 = mono_method_signature (invoke);
      D.22974 = mono_arch_get_delegate_invoke_impl (D.22973, 0);
      *D.22972 = D.22974;
      ptr = mono_create_specific_trampoline (tramp_data, 7, domain, &code_size);
      code_size.61 = code_size;
      D.22976 = code_size.61 == 0;
      D.22977 = (long int) D.22976;
      D.22978 = __builtin_expect (D.22977, 0);
      if (D.22978 != 0) goto <D.22979>; else goto <D.22980>;
      <D.22979>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1475, "code_size");
      <D.22980>:
      {
        int ret;

        D.22944 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.22944);
        if (ret != 0) goto <D.22981>; else goto <D.22982>;
        <D.22981>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.22982>:
        D.22983 = ret != 0;
        D.22984 = (long int) D.22983;
        D.22985 = __builtin_expect (D.22984, 0);
        if (D.22985 != 0) goto <D.22986>; else goto <D.22987>;
        <D.22986>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1478, "ret == 0");
        <D.22987>:
      }
      D.22952 = domain->runtime_info;
      D.22953 = MEM[(struct MonoJitDomainInfo *)D.22952].delegate_trampoline_hash;
      monoeg_g_hash_table_insert_replace (D.22953, klass, ptr, 0);
      {
        int ret;

        D.22944 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.22944);
        if (ret != 0) goto <D.22988>; else goto <D.22989>;
        <D.22988>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.22989>:
        D.22990 = ret != 0;
        D.22991 = (long int) D.22990;
        D.22992 = __builtin_expect (D.22991, 0);
        if (D.22992 != 0) goto <D.22993>; else goto <D.22994>;
        <D.22993>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1481, "ret == 0");
        <D.22994>:
      }
      D.22963 = ptr;
      return D.22963;
    }
  finally
    {
      code_size = {CLOBBER};
    }
}


mono_create_rgctx_lazy_fetch_trampoline (guint32 offset)
{
  _Bool D.22999;
  long int D.23000;
  long int D.23001;
  struct GHashTable * rgctx_lazy_fetch_trampoline_hash.62;
  const void * offset.63;
  _Bool D.23011;
  long int D.23012;
  long int D.23013;
  void * D.23018;
  int mono_aot_only.64;
  struct MonoTrampInfo * info.65;
  struct MonoDomain * D.23024;
  _Bool D.23027;
  long int D.23028;
  long int D.23029;
  struct GHashTable * rgctx_lazy_fetch_trampoline_hash.66;
  struct GHashTable * rgctx_lazy_fetch_trampoline_hash_addr.67;
  void * offset.68;
  _Bool D.23037;
  long int D.23038;
  long int D.23039;
  struct GHashTable * rgctx_lazy_fetch_trampoline_hash_addr.69;
  unsigned int D.23043;
  void * D.23044;
  _Bool D.23047;
  long int D.23048;
  long int D.23049;
  int inited.70;
  int num_trampolines.71;
  int num_trampolines.72;
  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.22997>; else goto <D.22998>;
        <D.22997>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.22998>:
        D.22999 = ret != 0;
        D.23000 = (long int) D.22999;
        D.23001 = __builtin_expect (D.23000, 0);
        if (D.23001 != 0) goto <D.23002>; else goto <D.23003>;
        <D.23002>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1498, "ret == 0");
        <D.23003>:
      }
      rgctx_lazy_fetch_trampoline_hash.62 = rgctx_lazy_fetch_trampoline_hash;
      if (rgctx_lazy_fetch_trampoline_hash.62 != 0B) goto <D.23005>; else goto <D.23006>;
      <D.23005>:
      rgctx_lazy_fetch_trampoline_hash.62 = rgctx_lazy_fetch_trampoline_hash;
      offset.63 = (const void *) offset;
      tramp = monoeg_g_hash_table_lookup (rgctx_lazy_fetch_trampoline_hash.62, offset.63);
      goto <D.23008>;
      <D.23006>:
      tramp = 0B;
      <D.23008>:
      {
        int ret;

        ret = pthread_mutex_unlock (&trampolines_mutex.mutex);
        if (ret != 0) goto <D.23009>; else goto <D.23010>;
        <D.23009>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23010>:
        D.23011 = ret != 0;
        D.23012 = (long int) D.23011;
        D.23013 = __builtin_expect (D.23012, 0);
        if (D.23013 != 0) goto <D.23014>; else goto <D.23015>;
        <D.23014>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1503, "ret == 0");
        <D.23015>:
      }
      if (tramp != 0B) goto <D.23016>; else goto <D.23017>;
      <D.23016>:
      D.23018 = tramp;
      return D.23018;
      <D.23017>:
      mono_aot_only.64 = mono_aot_only;
      if (mono_aot_only.64 != 0) goto <D.23020>; else goto <D.23021>;
      <D.23020>:
      ptr = mono_aot_get_lazy_fetch_trampoline (offset);
      goto <D.23022>;
      <D.23021>:
      tramp = mono_arch_create_rgctx_lazy_fetch_trampoline (offset, &info, 0);
      info.65 = info;
      mono_tramp_info_register (info.65);
      D.23024 = mono_get_root_domain ();
      ptr = mono_create_ftnptr (D.23024, tramp);
      <D.23022>:
      {
        int ret;

        ret = pthread_mutex_lock (&trampolines_mutex.mutex);
        if (ret != 0) goto <D.23025>; else goto <D.23026>;
        <D.23025>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.23026>:
        D.23027 = ret != 0;
        D.23028 = (long int) D.23027;
        D.23029 = __builtin_expect (D.23028, 0);
        if (D.23029 != 0) goto <D.23030>; else goto <D.23031>;
        <D.23030>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1515, "ret == 0");
        <D.23031>:
      }
      rgctx_lazy_fetch_trampoline_hash.62 = rgctx_lazy_fetch_trampoline_hash;
      if (rgctx_lazy_fetch_trampoline_hash.62 == 0B) goto <D.23032>; else goto <D.23033>;
      <D.23032>:
      rgctx_lazy_fetch_trampoline_hash.66 = monoeg_g_hash_table_new (0B, 0B);
      rgctx_lazy_fetch_trampoline_hash = rgctx_lazy_fetch_trampoline_hash.66;
      rgctx_lazy_fetch_trampoline_hash_addr.67 = monoeg_g_hash_table_new (0B, 0B);
      rgctx_lazy_fetch_trampoline_hash_addr = rgctx_lazy_fetch_trampoline_hash_addr.67;
      <D.23033>:
      rgctx_lazy_fetch_trampoline_hash.62 = rgctx_lazy_fetch_trampoline_hash;
      offset.68 = (void *) offset;
      monoeg_g_hash_table_insert_replace (rgctx_lazy_fetch_trampoline_hash.62, offset.68, ptr, 0);
      D.23037 = offset == 4294967295;
      D.23038 = (long int) D.23037;
      D.23039 = __builtin_expect (D.23038, 0);
      if (D.23039 != 0) goto <D.23040>; else goto <D.23041>;
      <D.23040>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1521, "offset != -1");
      <D.23041>:
      rgctx_lazy_fetch_trampoline_hash_addr.69 = rgctx_lazy_fetch_trampoline_hash_addr;
      D.23043 = offset + 1;
      D.23044 = (void *) D.23043;
      monoeg_g_hash_table_insert_replace (rgctx_lazy_fetch_trampoline_hash_addr.69, ptr, D.23044, 0);
      {
        int ret;

        ret = pthread_mutex_unlock (&trampolines_mutex.mutex);
        if (ret != 0) goto <D.23045>; else goto <D.23046>;
        <D.23045>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.23046>:
        D.23047 = ret != 0;
        D.23048 = (long int) D.23047;
        D.23049 = __builtin_expect (D.23048, 0);
        if (D.23049 != 0) goto <D.23050>; else goto <D.23051>;
        <D.23050>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1523, "ret == 0");
        <D.23051>:
      }
      inited.70 = inited;
      if (inited.70 == 0) goto <D.23053>; else goto <D.23054>;
      <D.23053>:
      mono_counters_register ("RGCTX num lazy fetch trampolines", 2048, &num_trampolines);
      inited = 1;
      <D.23054>:
      num_trampolines.71 = num_trampolines;
      num_trampolines.72 = num_trampolines.71 + 1;
      num_trampolines = num_trampolines.72;
      D.23018 = ptr;
      return D.23018;
    }
  finally
    {
      info = {CLOBBER};
    }
}


mono_create_monitor_enter_trampoline ()
{
  int mono_aot_only.73;
  void * code.74;
  void * code.75;
  void * D.23066;
  static void * code;

  mono_aot_only.73 = mono_aot_only;
  if (mono_aot_only.73 != 0) goto <D.23060>; else goto <D.23061>;
  <D.23060>:
  code.74 = code;
  if (code.74 == 0B) goto <D.23063>; else goto <D.23064>;
  <D.23063>:
  code.75 = mono_aot_get_trampoline ("monitor_enter_trampoline");
  code = code.75;
  <D.23064>:
  D.23066 = code;
  return D.23066;
  <D.23061>:
  code = 0B;
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-trampolines.c", 1559);
  D.23066 = code;
  return D.23066;
}


mono_create_monitor_exit_trampoline ()
{
  int mono_aot_only.76;
  void * code.77;
  void * code.78;
  void * D.23075;
  static void * code;

  mono_aot_only.76 = mono_aot_only;
  if (mono_aot_only.76 != 0) goto <D.23069>; else goto <D.23070>;
  <D.23069>:
  code.77 = code;
  if (code.77 == 0B) goto <D.23072>; else goto <D.23073>;
  <D.23072>:
  code.78 = mono_aot_get_trampoline ("monitor_exit_trampoline");
  code = code.78;
  <D.23073>:
  D.23075 = code;
  return D.23075;
  <D.23070>:
  code = 0B;
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-trampolines.c", 1589);
  D.23075 = code;
  return D.23075;
}


mono_find_class_init_trampoline_by_addr (const void * addr)
{
  _Bool D.23079;
  long int D.23080;
  long int D.23081;
  struct GHashTable * class_init_hash_addr.79;
  _Bool D.23090;
  long int D.23091;
  long int D.23092;
  struct MonoVTable * D.23095;
  struct MonoVTable * res;

  {
    int ret;

    ret = pthread_mutex_lock (&trampolines_mutex.mutex);
    if (ret != 0) goto <D.23077>; else goto <D.23078>;
    <D.23077>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.23078>:
    D.23079 = ret != 0;
    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", 1619, "ret == 0");
    <D.23083>:
  }
  class_init_hash_addr.79 = class_init_hash_addr;
  if (class_init_hash_addr.79 != 0B) goto <D.23085>; else goto <D.23086>;
  <D.23085>:
  class_init_hash_addr.79 = class_init_hash_addr;
  res = monoeg_g_hash_table_lookup (class_init_hash_addr.79, addr);
  goto <D.23087>;
  <D.23086>:
  res = 0B;
  <D.23087>:
  {
    int ret;

    ret = pthread_mutex_unlock (&trampolines_mutex.mutex);
    if (ret != 0) goto <D.23088>; else goto <D.23089>;
    <D.23088>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.23089>:
    D.23090 = ret != 0;
    D.23091 = (long int) D.23090;
    D.23092 = __builtin_expect (D.23091, 0);
    if (D.23092 != 0) goto <D.23093>; else goto <D.23094>;
    <D.23093>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1624, "ret == 0");
    <D.23094>:
  }
  D.23095 = res;
  return D.23095;
}


mono_find_rgctx_lazy_fetch_trampoline_by_addr (const void * addr)
{
  _Bool D.23099;
  long int D.23100;
  long int D.23101;
  struct GHashTable * rgctx_lazy_fetch_trampoline_hash_addr.80;
  void * D.23107;
  _Bool D.23114;
  long int D.23115;
  long int D.23116;
  guint32 D.23119;
  int offset;

  {
    int ret;

    ret = pthread_mutex_lock (&trampolines_mutex.mutex);
    if (ret != 0) goto <D.23097>; else goto <D.23098>;
    <D.23097>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.23098>:
    D.23099 = ret != 0;
    D.23100 = (long int) D.23099;
    D.23101 = __builtin_expect (D.23100, 0);
    if (D.23101 != 0) goto <D.23102>; else goto <D.23103>;
    <D.23102>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1633, "ret == 0");
    <D.23103>:
  }
  rgctx_lazy_fetch_trampoline_hash_addr.80 = rgctx_lazy_fetch_trampoline_hash_addr;
  if (rgctx_lazy_fetch_trampoline_hash_addr.80 != 0B) goto <D.23105>; else goto <D.23106>;
  <D.23105>:
  rgctx_lazy_fetch_trampoline_hash_addr.80 = rgctx_lazy_fetch_trampoline_hash_addr;
  D.23107 = monoeg_g_hash_table_lookup (rgctx_lazy_fetch_trampoline_hash_addr.80, addr);
  offset = (int) D.23107;
  if (offset != 0) goto <D.23108>; else goto <D.23109>;
  <D.23108>:
  offset = offset + -1;
  goto <D.23110>;
  <D.23109>:
  offset = -1;
  <D.23110>:
  goto <D.23111>;
  <D.23106>:
  offset = -1;
  <D.23111>:
  {
    int ret;

    ret = pthread_mutex_unlock (&trampolines_mutex.mutex);
    if (ret != 0) goto <D.23112>; else goto <D.23113>;
    <D.23112>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.23113>:
    D.23114 = ret != 0;
    D.23115 = (long int) D.23114;
    D.23116 = __builtin_expect (D.23115, 0);
    if (D.23116 != 0) goto <D.23117>; else goto <D.23118>;
    <D.23117>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-trampolines.c", 1644, "ret == 0");
    <D.23118>:
  }
  D.23119 = (guint32) offset;
  return D.23119;
}


mono_get_generic_trampoline_name (MonoTrampolineType tramp_type)
{
  char * D.23121;
  const char * D.23122;

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


mono_get_rgctx_fetch_trampoline_name (int slot)
{
  _Bool D.23124;
  char * D.23125;
  const char * iftmp.81;
  gboolean mrgctx;
  int index;

  D.23124 = slot < 0;
  mrgctx = (gboolean) D.23124;
  index = slot & 2147483647;
  if (mrgctx != 0) goto <D.23127>; else goto <D.23128>;
  <D.23127>:
  iftmp.81 = "mrgctx";
  goto <D.23129>;
  <D.23128>:
  iftmp.81 = "rgctx";
  <D.23129>:
  D.23125 = monoeg_g_strdup_printf ("rgctx_fetch_trampoline_%s_%d", iftmp.81, index);
  return D.23125;
}


mini_get_nullified_class_init_trampoline ()
{
  void * nullified_class_init_trampoline.82;
  int mono_aot_only.83;
  struct MonoTrampInfo * info.84;
  void * D.23139;
  static void * nullified_class_init_trampoline;

  nullified_class_init_trampoline.82 = nullified_class_init_trampoline;
  if (nullified_class_init_trampoline.82 == 0B) goto <D.23132>; else goto <D.23133>;
  <D.23132>:
  {
    void * tramp;
    struct MonoTrampInfo * info;

    try
      {
        mono_aot_only.83 = mono_aot_only;
        if (mono_aot_only.83 != 0) goto <D.23135>; else goto <D.23136>;
        <D.23135>:
        tramp = mono_aot_get_trampoline ("nullified_class_init_trampoline");
        goto <D.23137>;
        <D.23136>:
        tramp = mono_arch_get_nullified_class_init_trampoline (&info);
        info.84 = info;
        mono_tramp_info_register (info.84);
        <D.23137>:
        mono_memory_barrier ();
        nullified_class_init_trampoline = tramp;
      }
    finally
      {
        info = {CLOBBER};
      }
  }
  <D.23133>:
  D.23139 = nullified_class_init_trampoline;
  return D.23139;
}


mono_memory_barrier ()
{
  __sync_synchronize ();
}


