mono_exceptions_init ()
{
  int mono_aot_only.0;
  void * restore_context_func.1;
  void * call_filter_func.2;
  void * throw_exception_func.3;
  void * rethrow_exception_func.4;
  void * restore_context_func.5;
  struct MonoTrampInfo * info.6;
  void * call_filter_func.7;
  void * throw_exception_func.8;
  void * rethrow_exception_func.9;
  void * D.25719;
  void (*<T2fcc>) (struct MonoException *) D.25720;
  struct MonoRuntimeExceptionHandlingCallbacks cbs;

  try
    {
      mono_aot_only.0 = mono_aot_only;
      if (mono_aot_only.0 != 0) goto <D.25707>; else goto <D.25708>;
      <D.25707>:
      restore_context_func.1 = mono_aot_get_trampoline ("restore_context");
      restore_context_func = restore_context_func.1;
      call_filter_func.2 = mono_aot_get_trampoline ("call_filter");
      call_filter_func = call_filter_func.2;
      throw_exception_func.3 = mono_aot_get_trampoline ("throw_exception");
      throw_exception_func = throw_exception_func.3;
      rethrow_exception_func.4 = mono_aot_get_trampoline ("rethrow_exception");
      rethrow_exception_func = rethrow_exception_func.4;
      goto <D.25713>;
      <D.25708>:
      {
        struct MonoTrampInfo * info;

        try
          {
            restore_context_func.5 = mono_arch_get_restore_context (&info, 0);
            restore_context_func = restore_context_func.5;
            info.6 = info;
            mono_tramp_info_register (info.6);
            call_filter_func.7 = mono_arch_get_call_filter (&info, 0);
            call_filter_func = call_filter_func.7;
            info.6 = info;
            mono_tramp_info_register (info.6);
            throw_exception_func.8 = mono_arch_get_throw_exception (&info, 0);
            throw_exception_func = throw_exception_func.8;
            info.6 = info;
            mono_tramp_info_register (info.6);
            rethrow_exception_func.9 = mono_arch_get_rethrow_exception (&info, 0);
            rethrow_exception_func = rethrow_exception_func.9;
            info.6 = info;
            mono_tramp_info_register (info.6);
          }
        finally
          {
            info = {CLOBBER};
          }
      }
      <D.25713>:
      mono_arch_exceptions_init ();
      cbs.mono_walk_stack_with_ctx = mono_runtime_walk_stack_with_ctx;
      cbs.mono_walk_stack_with_state = mono_walk_stack_with_state;
      D.25719 = mono_get_throw_exception ();
      D.25720 = (void (*<T2fcc>) (struct MonoException *)) D.25719;
      cbs.mono_raise_exception = D.25720;
      cbs.mono_raise_exception_with_ctx = mono_raise_exception_with_ctx;
      cbs.mono_exception_walk_trace = mono_exception_walk_trace;
      cbs.mono_install_handler_block_guard = mono_install_handler_block_guard;
      mono_install_eh_callbacks (&cbs);
    }
  finally
    {
      cbs = {CLOBBER};
    }
}


mono_raise_exception_with_ctx (struct MonoException * exc, struct MonoContext * ctx)
{
  mono_handle_exception (ctx, exc);
  mono_restore_context (ctx);
}


mono_runtime_walk_stack_with_ctx (gboolean (*MonoJitStackWalk) (struct StackFrameInfo *, struct MonoContext *, void *) func, struct MonoContext * start_ctx, MonoUnwindOptions unwind_options, void * user_data)
{
  unsigned int mono_jit_tls_id.10;
  int D.25726;

  if (start_ctx == 0B) goto <D.25721>; else goto <D.25722>;
  <D.25721>:
  {
    struct MonoJitTlsData * jit_tls;

    mono_jit_tls_id.10 = mono_jit_tls_id;
    jit_tls = pthread_getspecific (mono_jit_tls_id.10);
    if (jit_tls != 0B) goto <D.25724>; else goto <D.25725>;
    <D.25724>:
    D.25726 = jit_tls->orig_ex_ctx_set;
    if (D.25726 != 0) goto <D.25727>; else goto <D.25728>;
    <D.25727>:
    start_ctx = &jit_tls->orig_ex_ctx;
    <D.25728>:
    <D.25725>:
  }
  <D.25722>:
  mono_walk_stack_with_ctx (func, start_ctx, unwind_options, user_data);
}


mono_get_throw_exception ()
{
  void * throw_exception_func.11;
  _Bool D.25730;
  long int D.25731;
  long int D.25732;
  void * D.25735;

  throw_exception_func.11 = throw_exception_func;
  D.25730 = throw_exception_func.11 == 0B;
  D.25731 = (long int) D.25730;
  D.25732 = __builtin_expect (D.25731, 0);
  if (D.25732 != 0) goto <D.25733>; else goto <D.25734>;
  <D.25733>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 117, "throw_exception_func");
  <D.25734>:
  D.25735 = throw_exception_func;
  return D.25735;
}


mono_get_rethrow_exception ()
{
  void * rethrow_exception_func.12;
  _Bool D.25738;
  long int D.25739;
  long int D.25740;
  void * D.25743;

  rethrow_exception_func.12 = rethrow_exception_func;
  D.25738 = rethrow_exception_func.12 == 0B;
  D.25739 = (long int) D.25738;
  D.25740 = __builtin_expect (D.25739, 0);
  if (D.25740 != 0) goto <D.25741>; else goto <D.25742>;
  <D.25741>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 124, "rethrow_exception_func");
  <D.25742>:
  D.25743 = rethrow_exception_func;
  return D.25743;
}


mono_get_call_filter ()
{
  void * call_filter_func.13;
  _Bool D.25746;
  long int D.25747;
  long int D.25748;
  void * D.25751;

  call_filter_func.13 = call_filter_func;
  D.25746 = call_filter_func.13 == 0B;
  D.25747 = (long int) D.25746;
  D.25748 = __builtin_expect (D.25747, 0);
  if (D.25748 != 0) goto <D.25749>; else goto <D.25750>;
  <D.25749>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 131, "call_filter_func");
  <D.25750>:
  D.25751 = call_filter_func;
  return D.25751;
}


mono_get_restore_context ()
{
  void * restore_context_func.14;
  _Bool D.25754;
  long int D.25755;
  long int D.25756;
  void * D.25759;

  restore_context_func.14 = restore_context_func;
  D.25754 = restore_context_func.14 == 0B;
  D.25755 = (long int) D.25754;
  D.25756 = __builtin_expect (D.25755, 0);
  if (D.25756 != 0) goto <D.25757>; else goto <D.25758>;
  <D.25757>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 138, "restore_context_func");
  <D.25758>:
  D.25759 = restore_context_func;
  return D.25759;
}


mono_get_throw_corlib_exception ()
{
  void * throw_corlib_exception_func.15;
  void * D.25764;
  int mono_aot_only.16;
  struct MonoTrampInfo * info.17;
  void * code;
  struct MonoTrampInfo * info;

  try
    {
      code = 0B;
      throw_corlib_exception_func.15 = throw_corlib_exception_func;
      if (throw_corlib_exception_func.15 != 0B) goto <D.25762>; else goto <D.25763>;
      <D.25762>:
      D.25764 = throw_corlib_exception_func;
      return D.25764;
      <D.25763>:
      mono_aot_only.16 = mono_aot_only;
      if (mono_aot_only.16 != 0) goto <D.25766>; else goto <D.25767>;
      <D.25766>:
      code = mono_aot_get_trampoline ("throw_corlib_exception");
      goto <D.25768>;
      <D.25767>:
      code = mono_arch_get_throw_corlib_exception (&info, 0);
      info.17 = info;
      mono_tramp_info_register (info.17);
      <D.25768>:
      mono_memory_barrier ();
      throw_corlib_exception_func = code;
      D.25764 = throw_corlib_exception_func;
      return D.25764;
    }
  finally
    {
      info = {CLOBBER};
    }
}


mono_memory_barrier ()
{
  __sync_synchronize ();
}


mono_find_jit_info (struct MonoDomain * domain, struct MonoJitTlsData * jit_tls, struct MonoJitInfo * res, struct MonoJitInfo * prev_ji, struct MonoContext * ctx, struct MonoContext * new_ctx, char * * trace, struct MonoLMF * * lmf, int * native_offset, gboolean * managed)
{
  int D.25772;
  struct MonoJitInfo * D.25781;
  int managed2.18;
  unsigned char D.25790;
  unsigned char D.25791;
  int D.25794;
  int D.25799;
  sizetype D.25800;
  const char * D.25801;
  int real_ip.19;
  int start.20;
  unsigned char D.25809;
  _Bool D.25810;
  _Bool D.25811;
  _Bool D.25812;
  unsigned int offset.21;
  char * D.25818;
  struct MonoMethod * D.25821;
  gchar * D.25822;
  gboolean managed2;
  void * ip;
  struct MonoJitInfo * ji;
  struct MonoMethod * method;

  try
    {
      D.25772 = ctx->pc;
      ip = (void *) D.25772;
      method = 0B;
      if (trace != 0B) goto <D.25773>; else goto <D.25774>;
      <D.25773>:
      *trace = 0B;
      <D.25774>:
      if (native_offset != 0B) goto <D.25775>; else goto <D.25776>;
      <D.25775>:
      *native_offset = -1;
      <D.25776>:
      if (managed != 0B) goto <D.25777>; else goto <D.25778>;
      <D.25777>:
      *managed = 0;
      <D.25778>:
      ji = find_jit_info (domain, jit_tls, res, prev_ji, ctx, new_ctx, lmf, &managed2);
      if (ji == 4294967295B) goto <D.25779>; else goto <D.25780>;
      <D.25779>:
      D.25781 = ji;
      return D.25781;
      <D.25780>:
      if (ji != 0B) goto <D.25782>; else goto <D.25783>;
      <D.25782>:
      method = jinfo_get_method (ji);
      <D.25783>:
      managed2.18 = managed2;
      if (managed2.18 != 0) goto <D.25784>; else goto <D.25788>;
      <D.25788>:
      if (ji != 0B) goto <D.25789>; else goto <D.25785>;
      <D.25789>:
      D.25790 = BIT_FIELD_REF <*method, 8, 160>;
      D.25791 = D.25790 & 124;
      if (D.25791 != 0) goto <D.25784>; else goto <D.25785>;
      <D.25784>:
      {
        const char * real_ip;
        const char * start;
        gint32 offset;

        start = ji->code_start;
        managed2.18 = managed2;
        if (managed2.18 == 0) goto <D.25792>; else goto <D.25793>;
        <D.25792>:
        D.25794 = new_ctx->pc;
        real_ip = (const char *) D.25794;
        goto <D.25795>;
        <D.25793>:
        real_ip = ip;
        <D.25795>:
        if (real_ip >= start) goto <D.25798>; else goto <D.25796>;
        <D.25798>:
        D.25799 = ji->code_size;
        D.25800 = (sizetype) D.25799;
        D.25801 = start + D.25800;
        if (D.25801 >= real_ip) goto <D.25802>; else goto <D.25796>;
        <D.25802>:
        real_ip.19 = (int) real_ip;
        start.20 = (int) start;
        offset = real_ip.19 - start.20;
        goto <D.25797>;
        <D.25796>:
        offset = -1;
        <D.25797>:
        if (native_offset != 0B) goto <D.25805>; else goto <D.25806>;
        <D.25805>:
        *native_offset = offset;
        <D.25806>:
        if (managed != 0B) goto <D.25807>; else goto <D.25808>;
        <D.25807>:
        D.25790 = BIT_FIELD_REF <*method, 8, 160>;
        D.25809 = D.25790 & 124;
        D.25810 = D.25809 == 0;
        D.25811 = D.25809 == 68;
        D.25812 = D.25810 | D.25811;
        if (D.25812 != 0) goto <D.25813>; else goto <D.25814>;
        <D.25813>:
        *managed = 1;
        <D.25814>:
        <D.25808>:
        if (trace != 0B) goto <D.25815>; else goto <D.25816>;
        <D.25815>:
        offset.21 = (unsigned int) offset;
        D.25818 = mono_debug_print_stack_frame (method, offset.21, domain);
        *trace = D.25818;
        <D.25816>:
      }
      goto <D.25786>;
      <D.25785>:
      if (trace != 0B) goto <D.25819>; else goto <D.25820>;
      <D.25819>:
      {
        char * fname;

        D.25821 = jinfo_get_method (res);
        fname = mono_method_full_name (D.25821, 1);
        D.25822 = monoeg_g_strdup_printf ("in (unmanaged) %s", fname);
        *trace = D.25822;
        monoeg_g_free (fname);
      }
      <D.25820>:
      <D.25786>:
      D.25781 = ji;
      return D.25781;
    }
  finally
    {
      managed2 = {CLOBBER};
    }
}


find_jit_info (struct MonoDomain * domain, struct MonoJitTlsData * jit_tls, struct MonoJitInfo * res, struct MonoJitInfo * prev_ji, struct MonoContext * ctx, struct MonoContext * new_ctx, struct MonoLMF * * lmf, gboolean * managed)
{
  int D.25825;
  void * D.25829;
  int D.25831;
  sizetype D.25832;
  guint8 * D.25833;
  struct MonoJitInfo * D.25839;
  <unnamed type> D.25840;
  struct MonoJitInfo * D.25843;
  struct MonoMethod * D.25846;
  struct StackFrameInfo frame;
  struct MonoJitInfo * ji;
  gboolean err;
  void * ip;

  try
    {
      D.25825 = ctx->pc;
      ip = (void *) D.25825;
      if (prev_ji != 0B) goto <D.25828>; else goto <D.25826>;
      <D.25828>:
      D.25829 = prev_ji->code_start;
      if (D.25829 < ip) goto <D.25830>; else goto <D.25826>;
      <D.25830>:
      D.25829 = prev_ji->code_start;
      D.25831 = prev_ji->code_size;
      D.25832 = (sizetype) D.25831;
      D.25833 = D.25829 + D.25832;
      if (D.25833 > ip) goto <D.25834>; else goto <D.25826>;
      <D.25834>:
      ji = prev_ji;
      goto <D.25827>;
      <D.25826>:
      ji = mini_jit_info_table_find (domain, ip, 0B);
      <D.25827>:
      if (managed != 0B) goto <D.25835>; else goto <D.25836>;
      <D.25835>:
      *managed = 0;
      <D.25836>:
      err = mono_arch_find_jit_info (domain, jit_tls, ji, ctx, new_ctx, lmf, 0B, &frame);
      if (err == 0) goto <D.25837>; else goto <D.25838>;
      <D.25837>:
      D.25839 = 4294967295B;
      return D.25839;
      <D.25838>:
      D.25840 = frame.type;
      switch (D.25840) <default: <D.25047>, case 0: <D.25043>, case 1: <D.25045>, case 2: <D.25044>>
      <D.25043>:
      if (managed != 0B) goto <D.25841>; else goto <D.25842>;
      <D.25841>:
      *managed = 1;
      <D.25842>:
      D.25839 = frame.ji;
      return D.25839;
      <D.25044>:
      D.25843 = frame.ji;
      if (D.25843 != 0B) goto <D.25844>; else goto <D.25845>;
      <D.25844>:
      D.25839 = frame.ji;
      return D.25839;
      <D.25845>:
      memset (res, 0, 28);
      D.25846 = frame.method;
      res->d.method = D.25846;
      D.25839 = res;
      return D.25839;
      <D.25045>:
      {
        struct MonoContext tmp_ctx;

        try
          {
            ji = find_jit_info (domain, jit_tls, res, 0B, new_ctx, &tmp_ctx, lmf, managed);
            memcpy (new_ctx, &tmp_ctx, 208);
            D.25839 = ji;
            return D.25839;
          }
        finally
          {
            tmp_ctx = {CLOBBER};
          }
      }
      <D.25047>:
      monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 246);
      D.25839 = 0B;
      return D.25839;
    }
  finally
    {
      frame = {CLOBBER};
    }
}


memset (void * __dest, int __ch, size_t __len)
{
  int D.25852;
  int D.25857;
  void * D.25859;
  unsigned int D.25860;

  D.25852 = __builtin_constant_p (__len);
  if (D.25852 != 0) goto <D.25853>; else goto <D.25854>;
  <D.25853>:
  if (__len == 0) goto <D.25855>; else goto <D.25856>;
  <D.25855>:
  D.25857 = __builtin_constant_p (__ch);
  if (D.25857 == 0) goto <D.25850>; else goto <D.25858>;
  <D.25858>:
  if (__ch != 0) goto <D.25850>; else goto <D.25851>;
  <D.25850>:
  __warn_memset_zero_len ();
  D.25859 = __dest;
  return D.25859;
  <D.25851>:
  <D.25856>:
  <D.25854>:
  D.25860 = __builtin_object_size (__dest, 0);
  D.25859 = __builtin___memset_chk (__dest, __ch, __len, D.25860);
  return D.25859;
}


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

  D.25863 = __builtin_object_size (__dest, 0);
  D.25862 = __builtin___memcpy_chk (__dest, __src, __len, D.25863);
  return D.25862;
}


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

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


mono_find_jit_info_ext (struct MonoDomain * domain, struct MonoJitTlsData * jit_tls, struct MonoJitInfo * prev_ji, struct MonoContext * ctx, struct MonoContext * new_ctx, char * * trace, struct MonoLMF * * lmf, mgreg_t * * save_locations, struct StackFrameInfo * frame)
{
  int D.25867;
  void * D.25873;
  int D.25875;
  sizetype D.25876;
  guint8 * D.25877;
  struct MonoDomain * target_domain.22;
  gboolean D.25886;
  struct MonoJitInfo * D.25887;
  unsigned char D.25890;
  unsigned char D.25891;
  <unnamed type> D.25894;
  unsigned char D.25899;
  unsigned char D.25900;
  _Bool D.25901;
  _Bool D.25902;
  _Bool D.25903;
  int D.25914;
  unsigned char D.25917;
  int D.25920;
  int D.25925;
  sizetype D.25926;
  const char * D.25927;
  int real_ip.23;
  int start.24;
  int D.25931;
  int D.25934;
  unsigned int D.25935;
  char * D.25936;
  struct MonoMethod * D.25939;
  gchar * D.25942;
  gboolean err;
  void * ip;
  struct MonoJitInfo * ji;
  struct MonoDomain * target_domain;
  struct MonoMethod * method;
  gboolean async;

  try
    {
      D.25867 = ctx->pc;
      ip = (void *) D.25867;
      target_domain = domain;
      method = 0B;
      async = mono_thread_info_is_async_context ();
      if (trace != 0B) goto <D.25868>; else goto <D.25869>;
      <D.25868>:
      *trace = 0B;
      <D.25869>:
      if (prev_ji != 0B) goto <D.25872>; else goto <D.25870>;
      <D.25872>:
      D.25873 = prev_ji->code_start;
      if (D.25873 < ip) goto <D.25874>; else goto <D.25870>;
      <D.25874>:
      D.25873 = prev_ji->code_start;
      D.25875 = prev_ji->code_size;
      D.25876 = (sizetype) D.25875;
      D.25877 = D.25873 + D.25876;
      if (D.25877 > ip) goto <D.25878>; else goto <D.25870>;
      <D.25878>:
      ji = prev_ji;
      goto <D.25871>;
      <D.25870>:
      ji = mini_jit_info_table_find (domain, ip, &target_domain);
      <D.25871>:
      target_domain.22 = target_domain;
      if (target_domain.22 == 0B) goto <D.25880>; else goto <D.25881>;
      <D.25880>:
      target_domain = domain;
      <D.25881>:
      if (save_locations != 0B) goto <D.25882>; else goto <D.25883>;
      <D.25882>:
      memset (save_locations, 0, 64);
      <D.25883>:
      target_domain.22 = target_domain;
      err = mono_arch_find_jit_info (target_domain.22, jit_tls, ji, ctx, new_ctx, lmf, save_locations, frame);
      if (err == 0) goto <D.25884>; else goto <D.25885>;
      <D.25884>:
      D.25886 = 0;
      return D.25886;
      <D.25885>:
      D.25887 = frame->ji;
      if (D.25887 != 0B) goto <D.25888>; else goto <D.25889>;
      <D.25888>:
      D.25887 = frame->ji;
      D.25890 = BIT_FIELD_REF <*D.25887, 8, 184>;
      D.25891 = D.25890 & 1;
      if (D.25891 == 0) goto <D.25892>; else goto <D.25893>;
      <D.25892>:
      D.25887 = frame->ji;
      method = jinfo_get_method (D.25887);
      <D.25893>:
      <D.25889>:
      D.25894 = frame->type;
      if (D.25894 == 0) goto <D.25895>; else goto <D.25896>;
      <D.25895>:
      if (method != 0B) goto <D.25897>; else goto <D.25898>;
      <D.25897>:
      D.25899 = BIT_FIELD_REF <*method, 8, 160>;
      D.25900 = D.25899 & 124;
      D.25901 = D.25900 == 0;
      D.25902 = D.25900 == 68;
      D.25903 = D.25901 | D.25902;
      if (D.25903 != 0) goto <D.25904>; else goto <D.25905>;
      <D.25904>:
      frame->managed = 1;
      <D.25905>:
      <D.25898>:
      <D.25896>:
      D.25894 = frame->type;
      if (D.25894 == 2) goto <D.25906>; else goto <D.25907>;
      <D.25906>:
      frame->ji = 0B;
      frame->method = 0B;
      <D.25907>:
      frame->native_offset = -1;
      target_domain.22 = target_domain;
      frame->domain = target_domain.22;
      frame->async_context = async;
      ji = frame->ji;
      D.25894 = frame->type;
      if (D.25894 == 0) goto <D.25908>; else goto <D.25909>;
      <D.25908>:
      frame->method = method;
      <D.25909>:
      if (ji != 0B) goto <D.25913>; else goto <D.25910>;
      <D.25913>:
      D.25914 = frame->managed;
      if (D.25914 != 0) goto <D.25911>; else goto <D.25915>;
      <D.25915>:
      if (method != 0B) goto <D.25916>; else goto <D.25910>;
      <D.25916>:
      D.25899 = BIT_FIELD_REF <*method, 8, 160>;
      D.25917 = D.25899 & 124;
      if (D.25917 != 0) goto <D.25911>; else goto <D.25910>;
      <D.25911>:
      {
        const char * real_ip;
        const char * start;

        start = ji->code_start;
        D.25914 = frame->managed;
        if (D.25914 == 0) goto <D.25918>; else goto <D.25919>;
        <D.25918>:
        D.25920 = new_ctx->pc;
        real_ip = (const char *) D.25920;
        goto <D.25921>;
        <D.25919>:
        real_ip = ip;
        <D.25921>:
        if (real_ip >= start) goto <D.25924>; else goto <D.25922>;
        <D.25924>:
        D.25925 = ji->code_size;
        D.25926 = (sizetype) D.25925;
        D.25927 = start + D.25926;
        if (D.25927 >= real_ip) goto <D.25928>; else goto <D.25922>;
        <D.25928>:
        real_ip.23 = (int) real_ip;
        start.24 = (int) start;
        D.25931 = real_ip.23 - start.24;
        frame->native_offset = D.25931;
        goto <D.25923>;
        <D.25922>:
        frame->native_offset = -1;
        <D.25923>:
        if (trace != 0B) goto <D.25932>; else goto <D.25933>;
        <D.25932>:
        D.25934 = frame->native_offset;
        D.25935 = (unsigned int) D.25934;
        D.25936 = mono_debug_print_stack_frame (method, D.25935, domain);
        *trace = D.25936;
        <D.25933>:
      }
      goto <D.25912>;
      <D.25910>:
      if (trace != 0B) goto <D.25937>; else goto <D.25938>;
      <D.25937>:
      D.25939 = frame->method;
      if (D.25939 != 0B) goto <D.25940>; else goto <D.25941>;
      <D.25940>:
      {
        char * fname;

        D.25939 = frame->method;
        fname = mono_method_full_name (D.25939, 1);
        D.25942 = monoeg_g_strdup_printf ("in (unmanaged) %s", fname);
        *trace = D.25942;
        monoeg_g_free (fname);
      }
      <D.25941>:
      <D.25938>:
      <D.25912>:
      D.25886 = 1;
      return D.25886;
    }
  finally
    {
      target_domain = {CLOBBER};
    }
}


mono_exception_walk_trace (struct MonoException * ex, gboolean (*MonoExceptionFrameWalk) (struct MonoMethod *, void *, size_t, gboolean, void *) func, void * user_data)
{
  gboolean D.25947;
  unsigned int D.25948;
  unsigned int D.25949;
  int D.25950;
  unsigned int D.25951;
  char * D.25952;
  int D.25953;
  unsigned int D.25954;
  char * D.25955;
  int D.25958;
  void * D.25962;
  int ip.25;
  int D.25964;
  int D.25965;
  unsigned int D.25966;
  int D.25967;
  _Bool D.25970;
  struct MonoDomain * domain;
  struct MonoArray * ta;
  int len;
  int i;

  domain = mono_domain_get ();
  ta = ex->trace_ips;
  if (ta == 0B) goto <D.25945>; else goto <D.25946>;
  <D.25945>:
  D.25947 = 0;
  return D.25947;
  <D.25946>:
  D.25948 = mono_array_length (ta);
  D.25949 = D.25948 >> 1;
  len = (int) D.25949;
  i = 0;
  goto <D.25135>;
  <D.25134>:
  {
    void * ip;
    void * generic_info;
    struct MonoJitInfo * ji;

    D.25950 = i * 2;
    D.25951 = (unsigned int) D.25950;
    D.25952 = mono_array_addr_with_size (ta, 4, D.25951);
    ip = MEM[(void * *)D.25952];
    D.25950 = i * 2;
    D.25953 = D.25950 + 1;
    D.25954 = (unsigned int) D.25953;
    D.25955 = mono_array_addr_with_size (ta, 4, D.25954);
    generic_info = MEM[(void * *)D.25955];
    ji = mono_jit_info_table_find (domain, ip);
    if (ji == 0B) goto <D.25956>; else goto <D.25957>;
    <D.25956>:
    D.25958 = func (0B, ip, 0, 0, user_data);
    if (D.25958 != 0) goto <D.25959>; else goto <D.25960>;
    <D.25959>:
    D.25947 = 1;
    return D.25947;
    <D.25960>:
    goto <D.25961>;
    <D.25957>:
    {
      struct MonoMethod * method;

      method = get_method_from_stack_frame (ji, generic_info);
      D.25962 = ji->code_start;
      ip.25 = (int) ip;
      D.25962 = ji->code_start;
      D.25964 = (int) D.25962;
      D.25965 = ip.25 - D.25964;
      D.25966 = (unsigned int) D.25965;
      D.25967 = func (method, D.25962, D.25966, 1, user_data);
      if (D.25967 != 0) goto <D.25968>; else goto <D.25969>;
      <D.25968>:
      D.25947 = 1;
      return D.25947;
      <D.25969>:
    }
    <D.25961>:
  }
  i = i + 1;
  <D.25135>:
  if (i < len) goto <D.25134>; else goto <D.25136>;
  <D.25136>:
  D.25970 = len > 0;
  D.25947 = (gboolean) D.25970;
  return D.25947;
}


get_method_from_stack_frame (struct MonoJitInfo * ji, void * generic_info)
{
  unsigned char D.25974;
  unsigned char D.25975;
  struct MonoGenericJitInfo * D.25977;
  unsigned char D.25978;
  unsigned char D.25979;
  struct MonoMethod * D.25980;
  struct MonoGenericContext context;
  struct MonoMethod * method;

  try
    {
      D.25974 = BIT_FIELD_REF <*ji, 8, 176>;
      D.25975 = D.25974 & 2;
      if (D.25975 == 0) goto <D.25972>; else goto <D.25976>;
      <D.25976>:
      D.25977 = mono_jit_info_get_generic_jit_info (ji);
      D.25978 = BIT_FIELD_REF <*D.25977, 8, 136>;
      D.25979 = D.25978 & 1;
      if (D.25979 == 0) goto <D.25972>; else goto <D.25973>;
      <D.25972>:
      D.25980 = jinfo_get_method (ji);
      return D.25980;
      <D.25973>:
      context = get_generic_context_from_stack_frame (ji, generic_info);
      method = jinfo_get_method (ji);
      method = mono_method_get_declaring_generic_method (method);
      method = mono_class_inflate_generic_method (method, &context);
      D.25980 = method;
      return D.25980;
    }
  finally
    {
      context = {CLOBBER};
    }
}


get_generic_context_from_stack_frame (struct MonoJitInfo * ji, void * generic_info)
{
  _Bool D.25984;
  long int D.25985;
  long int D.25986;
  unsigned char D.25989;
  unsigned char D.25990;
  _Bool D.25991;
  long int D.25992;
  long int D.25993;
  struct MonoGenericContext * D.25996;
  struct MonoGenericInst * D.25997;
  struct MonoVTable * D.26000;
  struct MonoGenericInst * D.26001;
  struct MonoGenericInst * D.26002;
  _Bool D.26003;
  long int D.26004;
  long int D.26005;
  short unsigned int D.26012;
  int D.26013;
  int D.26014;
  struct MonoClass * D.26016;
  unsigned char D.26017;
  unsigned char D.26018;
  struct MonoGenericClass * D.26019;
  _Bool D.26023;
  long int D.26024;
  long int D.26025;
  struct MonoGenericClass * D.26029;
  struct MonoClass * D.26031;
  struct MonoGenericContainer * D.26035;
  struct MonoGenericContext * D.26036;
  struct MonoGenericInst * D.26037;
  int D.26040;
  _Bool D.26041;
  long int D.26042;
  long int D.26043;
  int D.26047;
  _Bool D.26048;
  long int D.26049;
  long int D.26050;
  struct MonoGenericContext context;
  struct MonoClass * class;
  struct MonoClass * method_container_class;
  struct MonoMethod * method;

  try
    {
      context.class_inst = 0B;
      context.method_inst = 0B;
      D.25984 = generic_info == 0B;
      D.25985 = (long int) D.25984;
      D.25986 = __builtin_expect (D.25985, 0);
      if (D.25986 != 0) goto <D.25987>; else goto <D.25988>;
      <D.25987>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 489, "generic_info");
      <D.25988>:
      method = jinfo_get_method (ji);
      D.25989 = BIT_FIELD_REF <*method, 8, 168>;
      D.25990 = D.25989 & 16;
      D.25991 = D.25990 == 0;
      D.25992 = (long int) D.25991;
      D.25993 = __builtin_expect (D.25992, 0);
      if (D.25993 != 0) goto <D.25994>; else goto <D.25995>;
      <D.25994>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 492, "method->is_inflated");
      <D.25995>:
      D.25996 = mono_method_get_context (method);
      D.25997 = D.25996->method_inst;
      if (D.25997 != 0B) goto <D.25998>; else goto <D.25999>;
      <D.25998>:
      {
        struct MonoMethodRuntimeGenericContext * mrgctx;

        mrgctx = generic_info;
        D.26000 = mrgctx->class_vtable;
        class = D.26000->klass;
        D.26001 = mrgctx->method_inst;
        context.method_inst = D.26001;
        D.26002 = context.method_inst;
        D.26003 = D.26002 == 0B;
        D.26004 = (long int) D.26003;
        D.26005 = __builtin_expect (D.26004, 0);
        if (D.26005 != 0) goto <D.26006>; else goto <D.26007>;
        <D.26006>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 498, "context.method_inst");
        <D.26007>:
      }
      goto <D.26008>;
      <D.25999>:
      D.26012 = method->flags;
      D.26013 = (int) D.26012;
      D.26014 = D.26013 & 16;
      if (D.26014 != 0) goto <D.26009>; else goto <D.26015>;
      <D.26015>:
      D.26016 = method->klass;
      D.26017 = BIT_FIELD_REF <*D.26016, 8, 160>;
      D.26018 = D.26017 & 8;
      if (D.26018 != 0) goto <D.26009>; else goto <D.26010>;
      <D.26009>:
      {
        struct MonoVTable * vtable;

        vtable = generic_info;
        class = vtable->klass;
      }
      goto <D.26011>;
      <D.26010>:
      class = generic_info;
      <D.26011>:
      <D.26008>:
      D.26016 = method->klass;
      D.26019 = D.26016->generic_class;
      if (D.26019 != 0B) goto <D.26020>; else goto <D.26021>;
      <D.26020>:
      D.26016 = method->klass;
      D.26019 = D.26016->generic_class;
      method_container_class = D.26019->container_class;
      goto <D.26022>;
      <D.26021>:
      method_container_class = method->klass;
      <D.26022>:
      goto <D.25113>;
      <D.25112>:
      class = class->parent;
      D.26023 = class == 0B;
      D.26024 = (long int) D.26023;
      D.26025 = __builtin_expect (D.26024, 0);
      if (D.26025 != 0) goto <D.26026>; else goto <D.26027>;
      <D.26026>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 516, "class");
      <D.26027>:
      <D.25113>:
      D.26016 = method->klass;
      if (D.26016 != class) goto <D.26028>; else goto <D.25114>;
      <D.26028>:
      D.26029 = class->generic_class;
      if (D.26029 == 0B) goto <D.25112>; else goto <D.26030>;
      <D.26030>:
      D.26029 = class->generic_class;
      D.26031 = D.26029->container_class;
      if (D.26031 != method_container_class) goto <D.25112>; else goto <D.25114>;
      <D.25114>:
      D.26029 = class->generic_class;
      if (D.26029 != 0B) goto <D.26032>; else goto <D.26034>;
      <D.26034>:
      D.26035 = class->generic_container;
      if (D.26035 != 0B) goto <D.26032>; else goto <D.26033>;
      <D.26032>:
      D.26036 = mini_class_get_context (class);
      D.26037 = D.26036->class_inst;
      context.class_inst = D.26037;
      <D.26033>:
      D.26029 = class->generic_class;
      if (D.26029 != 0B) goto <D.26038>; else goto <D.26039>;
      <D.26038>:
      D.26029 = class->generic_class;
      D.26031 = D.26029->container_class;
      D.26040 = mono_class_has_parent_and_ignore_generics (D.26031, method_container_class);
      D.26041 = D.26040 == 0;
      D.26042 = (long int) D.26041;
      D.26043 = __builtin_expect (D.26042, 0);
      if (D.26043 != 0) goto <D.26044>; else goto <D.26045>;
      <D.26044>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 523, "mono_class_has_parent_and_ignore_generics (class->generic_class->container_class, method_container_class)");
      <D.26045>:
      goto <D.26046>;
      <D.26039>:
      D.26047 = mono_class_has_parent_and_ignore_generics (class, method_container_class);
      D.26048 = D.26047 == 0;
      D.26049 = (long int) D.26048;
      D.26050 = __builtin_expect (D.26049, 0);
      if (D.26050 != 0) goto <D.26051>; else goto <D.26052>;
      <D.26051>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 525, "mono_class_has_parent_and_ignore_generics (class, method_container_class)");
      <D.26052>:
      <D.26046>:
      <retval> = context;
      return <retval>;
    }
  finally
    {
      context = {CLOBBER};
    }
}


ves_icall_System_Exception_get_trace (struct MonoException * ex)
{
  struct MonoString * D.26057;
  unsigned int D.26058;
  unsigned int D.26059;
  int D.26060;
  unsigned int D.26061;
  char * D.26062;
  int D.26063;
  unsigned int D.26064;
  char * D.26065;
  int ip.26;
  void * D.26070;
  int D.26071;
  unsigned int address.27;
  struct MonoVTable * D.26073;
  struct MonoDomain * D.26074;
  char * D.26075;
  struct MonoDomain * domain;
  struct MonoString * res;
  struct MonoArray * ta;
  int i;
  int len;
  struct GString * trace_str;

  domain = mono_domain_get ();
  ta = ex->trace_ips;
  if (ta == 0B) goto <D.26055>; else goto <D.26056>;
  <D.26055>:
  D.26057 = 0B;
  return D.26057;
  <D.26056>:
  D.26058 = mono_array_length (ta);
  D.26059 = D.26058 >> 1;
  len = (int) D.26059;
  trace_str = monoeg_g_string_new ("");
  i = 0;
  goto <D.25153>;
  <D.25152>:
  {
    struct MonoJitInfo * ji;
    void * ip;
    void * generic_info;

    D.26060 = i * 2;
    D.26061 = (unsigned int) D.26060;
    D.26062 = mono_array_addr_with_size (ta, 4, D.26061);
    ip = MEM[(void * *)D.26062];
    D.26060 = i * 2;
    D.26063 = D.26060 + 1;
    D.26064 = (unsigned int) D.26063;
    D.26065 = mono_array_addr_with_size (ta, 4, D.26064);
    generic_info = MEM[(void * *)D.26065];
    ji = mono_jit_info_table_find (domain, ip);
    if (ji == 0B) goto <D.26066>; else goto <D.26067>;
    <D.26066>:
    monoeg_g_string_append_printf (trace_str, "in (unmanaged) %p\n", ip);
    goto <D.26068>;
    <D.26067>:
    {
      gchar * location;
      gint32 address;
      struct MonoMethod * method;

      method = get_method_from_stack_frame (ji, generic_info);
      ip.26 = (int) ip;
      D.26070 = ji->code_start;
      D.26071 = (int) D.26070;
      address = ip.26 - D.26071;
      address.27 = (unsigned int) address;
      D.26073 = ex->object.vtable;
      D.26074 = D.26073->domain;
      location = mono_debug_print_stack_frame (method, address.27, D.26074);
      monoeg_g_string_append_printf (trace_str, "%s\n", location);
      monoeg_g_free (location);
    }
    <D.26068>:
  }
  i = i + 1;
  <D.25153>:
  if (i < len) goto <D.25152>; else goto <D.25154>;
  <D.25154>:
  D.26073 = ex->object.vtable;
  D.26074 = D.26073->domain;
  D.26075 = trace_str->str;
  res = mono_string_new (D.26074, D.26075);
  monoeg_g_string_free (trace_str, 1);
  D.26057 = res;
  return D.26057;
}


ves_icall_get_trace (struct MonoException * exc, gint32 skip, MonoBoolean need_file_info)
{
  struct MonoArray * D.26079;
  struct MonoClass * D.26080;
  unsigned int D.26081;
  unsigned int D.26082;
  uintptr_t iftmp.28;
  int D.26086;
  int D.26088;
  unsigned int D.26089;
  char * D.26090;
  int D.26091;
  unsigned int D.26092;
  char * D.26093;
  unsigned int i.29;
  _Bool D.26097;
  long int D.26098;
  long int D.26099;
  struct MonoMethod * D.26102;
  unsigned char D.26103;
  unsigned char D.26104;
  struct MonoString * * D.26107;
  struct MonoString * D.26108;
  struct MonoReflectionMethod * * D.26110;
  struct MonoReflectionMethod * D.26111;
  int ip.30;
  void * D.26113;
  int D.26114;
  int D.26115;
  struct MonoMethod * D.26116;
  int D.26117;
  unsigned int D.26118;
  unsigned int D.26121;
  int D.26122;
  char * D.26129;
  struct MonoString * * D.26131;
  struct MonoString * D.26132;
  unsigned int D.26133;
  int D.26134;
  unsigned int D.26135;
  int D.26136;
  int D.26137;
  struct MonoDomain * domain;
  struct MonoArray * res;
  struct MonoArray * ta;
  struct MonoDebugSourceLocation * location;
  int i;
  int len;

  domain = mono_domain_get ();
  ta = exc->trace_ips;
  if (ta == 0B) goto <D.26077>; else goto <D.26078>;
  <D.26077>:
  D.26080 = mono_defaults.stack_frame_class;
  D.26079 = mono_array_new (domain, D.26080, 0);
  return D.26079;
  <D.26078>:
  D.26081 = mono_array_length (ta);
  D.26082 = D.26081 >> 1;
  len = (int) D.26082;
  D.26080 = mono_defaults.stack_frame_class;
  if (len > skip) goto <D.26084>; else goto <D.26085>;
  <D.26084>:
  D.26086 = len - skip;
  iftmp.28 = (uintptr_t) D.26086;
  goto <D.26087>;
  <D.26085>:
  iftmp.28 = 0;
  <D.26087>:
  res = mono_array_new (domain, D.26080, iftmp.28);
  i = skip;
  goto <D.25176>;
  <D.25175>:
  {
    struct MonoJitInfo * ji;
    struct MonoStackFrame * sf;
    void * ip;
    void * generic_info;
    struct MonoMethod * method;

    D.26080 = mono_defaults.stack_frame_class;
    sf = mono_object_new (domain, D.26080);
    D.26088 = i * 2;
    D.26089 = (unsigned int) D.26088;
    D.26090 = mono_array_addr_with_size (ta, 4, D.26089);
    ip = MEM[(void * *)D.26090];
    D.26088 = i * 2;
    D.26091 = D.26088 + 1;
    D.26092 = (unsigned int) D.26091;
    D.26093 = mono_array_addr_with_size (ta, 4, D.26092);
    generic_info = MEM[(void * *)D.26093];
    ji = mono_jit_info_table_find (domain, ip);
    if (ji == 0B) goto <D.26094>; else goto <D.26095>;
    <D.26094>:
    {
      void * * __p;

      i.29 = (unsigned int) i;
      __p = mono_array_addr_with_size (res, 4, i.29);
      mono_gc_wbarrier_set_arrayref (res, __p, sf);
    }
    // predicted unlikely by continue predictor.
    goto <D.25172>;
    <D.26095>:
    D.26097 = ji == 0B;
    D.26098 = (long int) D.26097;
    D.26099 = __builtin_expect (D.26098, 0);
    if (D.26099 != 0) goto <D.26100>; else goto <D.26101>;
    <D.26100>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 664, "ji != NULL");
    <D.26101>:
    method = get_method_from_stack_frame (ji, generic_info);
    D.26102 = jinfo_get_method (ji);
    D.26103 = BIT_FIELD_REF <*D.26102, 8, 160>;
    D.26104 = D.26103 & 124;
    if (D.26104 != 0) goto <D.26105>; else goto <D.26106>;
    <D.26105>:
    {
      char * s;

      sf->method = 0B;
      s = mono_method_full_name (method, 1);
      D.26107 = &sf->internal_method_name;
      D.26108 = mono_string_new (domain, s);
      mono_gc_wbarrier_set_field (sf, D.26107, D.26108);
      monoeg_g_free (s);
    }
    goto <D.26109>;
    <D.26106>:
    D.26110 = &sf->method;
    D.26111 = mono_method_get_object (domain, method, 0B);
    mono_gc_wbarrier_set_field (sf, D.26110, D.26111);
    <D.26109>:
    ip.30 = (int) ip;
    D.26113 = ji->code_start;
    D.26114 = (int) D.26113;
    D.26115 = ip.30 - D.26114;
    sf->native_offset = D.26115;
    D.26116 = jinfo_get_method (ji);
    D.26117 = sf->native_offset;
    D.26118 = (unsigned int) D.26117;
    location = mono_debug_lookup_source_location (D.26116, D.26118, domain);
    if (location != 0B) goto <D.26119>; else goto <D.26120>;
    <D.26119>:
    D.26121 = location->il_offset;
    D.26122 = (int) D.26121;
    sf->il_offset = D.26122;
    goto <D.26123>;
    <D.26120>:
    sf->il_offset = 0;
    <D.26123>:
    if (need_file_info != 0) goto <D.26124>; else goto <D.26125>;
    <D.26124>:
    if (location != 0B) goto <D.26128>; else goto <D.26126>;
    <D.26128>:
    D.26129 = location->source_file;
    if (D.26129 != 0B) goto <D.26130>; else goto <D.26126>;
    <D.26130>:
    D.26131 = &sf->filename;
    D.26129 = location->source_file;
    D.26132 = mono_string_new (domain, D.26129);
    mono_gc_wbarrier_set_field (sf, D.26131, D.26132);
    D.26133 = location->row;
    D.26134 = (int) D.26133;
    sf->line = D.26134;
    D.26135 = location->column;
    D.26136 = (int) D.26135;
    sf->column = D.26136;
    goto <D.26127>;
    <D.26126>:
    sf->column = 0;
    D.26137 = sf->column;
    sf->line = D.26137;
    sf->filename = 0B;
    <D.26127>:
    <D.26125>:
    mono_debug_free_source_location (location);
    {
      void * * __p;

      i.29 = (unsigned int) i;
      __p = mono_array_addr_with_size (res, 4, i.29);
      mono_gc_wbarrier_set_arrayref (res, __p, sf);
    }
  }
  <D.25172>:
  i = i + 1;
  <D.25176>:
  if (i < len) goto <D.25175>; else goto <D.25177>;
  <D.25177>:
  D.26079 = res;
  return D.26079;
}


mono_walk_stack_with_ctx (gboolean (*MonoJitStackWalk) (struct StackFrameInfo *, struct MonoContext *, void *) func, struct MonoContext * start_ctx, MonoUnwindOptions unwind_options, void * user_data)
{
  void * D.26142;
  void * D.26145;
  int D.26146;
  void * D.26147;
  int D.26148;
  int mono_walk_stack_with_ctx.31;
  struct MonoDomain * D.26150;
  struct MonoLMF * D.26151;
  struct MonoContext extra_ctx;
  struct MonoInternalThread * thread;

  try
    {
      thread = mono_thread_internal_current ();
      if (thread == 0B) goto <D.26139>; else goto <D.26141>;
      <D.26141>:
      D.26142 = thread->jit_data;
      if (D.26142 == 0B) goto <D.26139>; else goto <D.26140>;
      <D.26139>:
      return;
      <D.26140>:
      if (start_ctx == 0B) goto <D.26143>; else goto <D.26144>;
      <D.26143>:
      mono_arch_flush_register_windows ();
      D.26145 = __builtin_frame_address (0);
      D.26146 = (int) D.26145;
      extra_ctx.regs[11] = D.26146;
      D.26147 = __builtin_frame_address (0);
      D.26148 = (int) D.26147;
      extra_ctx.regs[13] = D.26148;
      mono_walk_stack_with_ctx.31 = (int) mono_walk_stack_with_ctx;
      extra_ctx.pc = mono_walk_stack_with_ctx.31;
      start_ctx = &extra_ctx;
      <D.26144>:
      D.26150 = mono_domain_get ();
      D.26142 = thread->jit_data;
      D.26151 = mono_get_lmf ();
      mono_walk_stack_full (func, start_ctx, D.26150, D.26142, D.26151, unwind_options, user_data);
    }
  finally
    {
      extra_ctx = {CLOBBER};
    }
}


mono_walk_stack_full (gboolean (*MonoJitStackWalk) (struct StackFrameInfo *, struct MonoContext *, void *) func, struct MonoContext * start_ctx, struct MonoDomain * domain, struct MonoJitTlsData * jit_tls, struct MonoLMF * lmf, MonoUnwindOptions unwind_options, void * user_data)
{
  int unwind_options.32;
  _Bool D.26156;
  long int D.26157;
  long int D.26158;
  _Bool D.26161;
  long int D.26162;
  long int D.26163;
  _Bool D.26166;
  long int D.26167;
  long int D.26168;
  _Bool D.26173;
  long int D.26174;
  long int D.26175;
  struct MonoLMF * lmf.33;
  mgreg_t * * iftmp.34;
  unsigned int D.26187;
  struct MonoJitInfo * D.26189;
  struct MonoMethod * D.26191;
  int D.26192;
  unsigned int D.26193;
  gint iftmp.35;
  unsigned int D.26197;
  unsigned int D.26201;
  void * D.26204;
  struct MonoMethod * D.26205;
  struct MonoMethod * D.26206;
  int D.26209;
  mgreg_t * D.26214;
  int D.26217;
  void * D.26218;
  void * D.26219;
  gint il_offset;
  gint i;
  struct MonoContext ctx;
  struct MonoContext new_ctx;
  struct StackFrameInfo frame;
  gboolean res;
  mgreg_t * reg_locations[16];
  mgreg_t * new_reg_locations[16];
  gboolean get_reg_locations;
  gboolean async;

  try
    {
      unwind_options.32 = (int) unwind_options;
      get_reg_locations = unwind_options.32 & 4;
      async = mono_thread_info_is_async_context ();
      D.26156 = start_ctx == 0B;
      D.26157 = (long int) D.26156;
      D.26158 = __builtin_expect (D.26157, 0);
      if (D.26158 != 0) goto <D.26159>; else goto <D.26160>;
      <D.26159>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 817, "start_ctx");
      <D.26160>:
      D.26161 = domain == 0B;
      D.26162 = (long int) D.26161;
      D.26163 = __builtin_expect (D.26162, 0);
      if (D.26163 != 0) goto <D.26164>; else goto <D.26165>;
      <D.26164>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 818, "domain");
      <D.26165>:
      D.26166 = jit_tls == 0B;
      D.26167 = (long int) D.26166;
      D.26168 = __builtin_expect (D.26167, 0);
      if (D.26168 != 0) goto <D.26169>; else goto <D.26170>;
      <D.26169>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 819, "jit_tls");
      <D.26170>:
      if (async != 0) goto <D.26171>; else goto <D.26172>;
      <D.26171>:
      D.26173 = unwind_options != 0;
      D.26174 = (long int) D.26173;
      D.26175 = __builtin_expect (D.26174, 0);
      if (D.26175 != 0) goto <D.26176>; else goto <D.26177>;
      <D.26176>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 824, "unwind_options == MONO_UNWIND_NONE");
      <D.26177>:
      <D.26172>:
      memcpy (&ctx, start_ctx, 208);
      memset (&reg_locations, 0, 64);
      goto <D.25230>;
      <D.25229>:
      lmf.33 = lmf;
      frame.lmf = lmf.33;
      if (get_reg_locations != 0) goto <D.26180>; else goto <D.26181>;
      <D.26180>:
      iftmp.34 = &new_reg_locations;
      goto <D.26182>;
      <D.26181>:
      iftmp.34 = 0B;
      <D.26182>:
      res = mono_find_jit_info_ext (domain, jit_tls, 0B, &ctx, &new_ctx, 0B, &lmf, iftmp.34, &frame);
      if (res == 0) goto <D.26183>; else goto <D.26184>;
      <D.26183>:
      return;
      <D.26184>:
      D.26187 = unwind_options & 1;
      if (D.26187 != 0) goto <D.26188>; else goto <D.26185>;
      <D.26188>:
      D.26189 = frame.ji;
      if (D.26189 != 0B) goto <D.26190>; else goto <D.26185>;
      <D.26190>:
      {
        struct MonoDebugSourceLocation * source;

        D.26189 = frame.ji;
        D.26191 = jinfo_get_method (D.26189);
        D.26192 = frame.native_offset;
        D.26193 = (unsigned int) D.26192;
        source = mono_debug_lookup_source_location (D.26191, D.26193, domain);
        if (source != 0B) goto <D.26195>; else goto <D.26196>;
        <D.26195>:
        D.26197 = source->il_offset;
        iftmp.35 = (gint) D.26197;
        goto <D.26198>;
        <D.26196>:
        iftmp.35 = -1;
        <D.26198>:
        il_offset = iftmp.35;
        mono_debug_free_source_location (source);
      }
      goto <D.26186>;
      <D.26185>:
      il_offset = -1;
      <D.26186>:
      frame.il_offset = il_offset;
      D.26201 = unwind_options & 2;
      if (D.26201 != 0) goto <D.26202>; else goto <D.26199>;
      <D.26202>:
      D.26189 = frame.ji;
      if (D.26189 != 0B) goto <D.26203>; else goto <D.26199>;
      <D.26203>:
      D.26189 = frame.ji;
      D.26189 = frame.ji;
      D.26204 = get_generic_info_from_stack_frame (D.26189, &ctx);
      D.26205 = get_method_from_stack_frame (D.26189, D.26204);
      frame.actual_method = D.26205;
      goto <D.26200>;
      <D.26199>:
      D.26206 = frame.method;
      frame.actual_method = D.26206;
      <D.26200>:
      if (get_reg_locations != 0) goto <D.26207>; else goto <D.26208>;
      <D.26207>:
      frame.reg_locations = &reg_locations;
      <D.26208>:
      D.26209 = func (&frame, &ctx, user_data);
      if (D.26209 != 0) goto <D.26210>; else goto <D.26211>;
      <D.26210>:
      return;
      <D.26211>:
      if (get_reg_locations != 0) goto <D.26212>; else goto <D.26213>;
      <D.26212>:
      i = 0;
      goto <D.25227>;
      <D.25226>:
      D.26214 = new_reg_locations[i];
      if (D.26214 != 0B) goto <D.26215>; else goto <D.26216>;
      <D.26215>:
      D.26214 = new_reg_locations[i];
      reg_locations[i] = D.26214;
      <D.26216>:
      i = i + 1;
      <D.25227>:
      if (i <= 15) goto <D.25226>; else goto <D.25228>;
      <D.25228>:
      <D.26213>:
      ctx = new_ctx;
      <D.25230>:
      D.26217 = ctx.regs[13];
      D.26218 = (void *) D.26217;
      D.26219 = jit_tls->end_of_stack;
      if (D.26218 < D.26219) goto <D.25229>; else goto <D.25231>;
      <D.25231>:
    }
  finally
    {
      ctx = {CLOBBER};
      new_ctx = {CLOBBER};
      frame = {CLOBBER};
      reg_locations = {CLOBBER};
      new_reg_locations = {CLOBBER};
    }
}


get_generic_info_from_stack_frame (struct MonoJitInfo * ji, struct MonoContext * ctx)
{
  unsigned char D.26223;
  unsigned char D.26224;
  void * D.26227;
  unsigned char D.26228;
  unsigned char D.26229;
  int D.26232;
  int D.26235;
  void * D.26236;
  int D.26237;
  struct MonoDwarfLocListEntry * D.26238;
  unsigned int i.36;
  unsigned int D.26240;
  int D.26243;
  int D.26246;
  int D.26248;
  int D.26251;
  int D.26252;
  int D.26254;
  sizetype D.26255;
  int D.26256;
  sizetype D.26257;
  sizetype D.26258;
  void * * D.26259;
  _Bool D.26260;
  long int D.26261;
  long int D.26262;
  unsigned char D.26266;
  unsigned char D.26269;
  int D.26270;
  int D.26271;
  int D.26273;
  sizetype D.26274;
  int D.26275;
  sizetype D.26276;
  sizetype D.26277;
  void * * D.26278;
  struct MonoGenericContext * D.26279;
  struct MonoGenericInst * D.26280;
  short unsigned int D.26285;
  int D.26286;
  int D.26287;
  struct MonoClass * D.26289;
  unsigned char D.26290;
  unsigned char D.26291;
  struct MonoVTable * D.26292;
  struct MonoGenericJitInfo * gi;
  struct MonoMethod * method;
  void * info;

  D.26223 = BIT_FIELD_REF <*ji, 8, 176>;
  D.26224 = D.26223 & 2;
  if (D.26224 == 0) goto <D.26225>; else goto <D.26226>;
  <D.26225>:
  D.26227 = 0B;
  return D.26227;
  <D.26226>:
  gi = mono_jit_info_get_generic_jit_info (ji);
  D.26228 = BIT_FIELD_REF <*gi, 8, 136>;
  D.26229 = D.26228 & 1;
  if (D.26229 == 0) goto <D.26230>; else goto <D.26231>;
  <D.26230>:
  D.26227 = 0B;
  return D.26227;
  <D.26231>:
  info = 0B;
  D.26232 = gi->nlocs;
  if (D.26232 != 0) goto <D.26233>; else goto <D.26234>;
  <D.26233>:
  {
    int offset;
    int i;

    D.26235 = ctx->pc;
    D.26236 = ji->code_start;
    D.26237 = (int) D.26236;
    offset = D.26235 - D.26237;
    i = 0;
    goto <D.25100>;
    <D.25099>:
    {
      struct MonoDwarfLocListEntry * entry;

      D.26238 = gi->locations;
      i.36 = (unsigned int) i;
      D.26240 = i.36 * 20;
      entry = D.26238 + D.26240;
      D.26243 = entry->from;
      if (D.26243 <= offset) goto <D.26244>; else goto <D.26245>;
      <D.26244>:
      D.26246 = entry->to;
      if (D.26246 > offset) goto <D.26241>; else goto <D.26247>;
      <D.26247>:
      D.26246 = entry->to;
      if (D.26246 == 0) goto <D.26241>; else goto <D.26242>;
      <D.26241>:
      D.26248 = entry->is_reg;
      if (D.26248 != 0) goto <D.26249>; else goto <D.26250>;
      <D.26249>:
      D.26251 = entry->reg;
      D.26252 = mono_arch_context_get_int_reg (ctx, D.26251);
      info = (void *) D.26252;
      goto <D.26253>;
      <D.26250>:
      D.26254 = entry->offset;
      D.26255 = (sizetype) D.26254;
      D.26251 = entry->reg;
      D.26256 = mono_arch_context_get_int_reg (ctx, D.26251);
      D.26257 = (sizetype) D.26256;
      D.26258 = D.26255 + D.26257;
      D.26259 = (void * *) D.26258;
      info = *D.26259;
      <D.26253>:
      goto <D.25098>;
      <D.26242>:
      <D.26245>:
    }
    i = i + 1;
    <D.25100>:
    D.26232 = gi->nlocs;
    if (D.26232 > i) goto <D.25099>; else goto <D.25098>;
    <D.25098>:
    D.26232 = gi->nlocs;
    D.26260 = D.26232 <= i;
    D.26261 = (long int) D.26260;
    D.26262 = __builtin_expect (D.26261, 0);
    if (D.26262 != 0) goto <D.26263>; else goto <D.26264>;
    <D.26263>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 460, "i < gi->nlocs");
    <D.26264>:
  }
  goto <D.26265>;
  <D.26234>:
  D.26228 = BIT_FIELD_REF <*gi, 8, 136>;
  D.26266 = D.26228 & 2;
  if (D.26266 != 0) goto <D.26267>; else goto <D.26268>;
  <D.26267>:
  D.26269 = gi->this_reg;
  D.26270 = (int) D.26269;
  D.26271 = mono_arch_context_get_int_reg (ctx, D.26270);
  info = (void *) D.26271;
  goto <D.26272>;
  <D.26268>:
  D.26273 = gi->this_offset;
  D.26274 = (sizetype) D.26273;
  D.26269 = gi->this_reg;
  D.26270 = (int) D.26269;
  D.26275 = mono_arch_context_get_int_reg (ctx, D.26270);
  D.26276 = (sizetype) D.26275;
  D.26277 = D.26274 + D.26276;
  D.26278 = (void * *) D.26277;
  info = *D.26278;
  <D.26272>:
  <D.26265>:
  method = jinfo_get_method (ji);
  D.26279 = mono_method_get_context (method);
  D.26280 = D.26279->method_inst;
  if (D.26280 != 0B) goto <D.26281>; else goto <D.26282>;
  <D.26281>:
  D.26227 = info;
  return D.26227;
  <D.26282>:
  D.26285 = method->flags;
  D.26286 = (int) D.26285;
  D.26287 = D.26286 & 16;
  if (D.26287 != 0) goto <D.26283>; else goto <D.26288>;
  <D.26288>:
  D.26289 = method->klass;
  D.26290 = BIT_FIELD_REF <*D.26289, 8, 160>;
  D.26291 = D.26290 & 8;
  if (D.26291 != 0) goto <D.26283>; else goto <D.26284>;
  <D.26283>:
  D.26227 = info;
  return D.26227;
  <D.26284>:
  {
    struct MonoObject * this_obj;

    this_obj = info;
    D.26292 = this_obj->vtable;
    D.26227 = D.26292->klass;
    return D.26227;
  }
}


mono_walk_stack_with_state (gboolean (*MonoJitStackWalk) (struct StackFrameInfo *, struct MonoContext *, void *) func, struct MonoThreadUnwindState * state, MonoUnwindOptions unwind_options, void * user_data)
{
  int D.26296;
  _Bool D.26297;
  long int D.26298;
  long int D.26299;
  int D.26302;
  int D.26305;
  _Bool D.26306;
  long int D.26307;
  long int D.26308;
  struct MonoContext * D.26311;
  void * D.26312;
  void * D.26313;
  void * D.26314;
  struct MonoThreadUnwindState extra_state;

  try
    {
      if (state == 0B) goto <D.26294>; else goto <D.26295>;
      <D.26294>:
      D.26296 = mono_thread_info_is_async_context ();
      D.26297 = D.26296 != 0;
      D.26298 = (long int) D.26297;
      D.26299 = __builtin_expect (D.26298, 0);
      if (D.26299 != 0) goto <D.26300>; else goto <D.26301>;
      <D.26300>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 765, "!mono_thread_info_is_async_context ()");
      <D.26301>:
      D.26302 = mono_thread_state_init_from_current (&extra_state);
      if (D.26302 == 0) goto <D.26303>; else goto <D.26304>;
      <D.26303>:
      return;
      <D.26304>:
      state = &extra_state;
      <D.26295>:
      D.26305 = state->valid;
      D.26306 = D.26305 == 0;
      D.26307 = (long int) D.26306;
      D.26308 = __builtin_expect (D.26307, 0);
      if (D.26308 != 0) goto <D.26309>; else goto <D.26310>;
      <D.26309>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 771, "state->valid");
      <D.26310>:
      D.26311 = &state->ctx;
      D.26312 = state->unwind_data[0];
      D.26313 = state->unwind_data[2];
      D.26314 = state->unwind_data[1];
      mono_walk_stack_full (func, D.26311, D.26312, D.26313, D.26314, unwind_options, user_data);
    }
  finally
    {
      extra_state = {CLOBBER};
    }
}


mono_walk_stack (gboolean (*MonoJitStackWalk) (struct StackFrameInfo *, struct MonoContext *, void *) func, MonoUnwindOptions options, void * user_data)
{
  int D.26318;
  struct MonoThreadUnwindState state;

  try
    {
      D.26318 = mono_thread_state_init_from_current (&state);
      if (D.26318 == 0) goto <D.26319>; else goto <D.26320>;
      <D.26319>:
      return;
      <D.26320>:
      mono_walk_stack_with_state (func, &state, options, user_data);
    }
  finally
    {
      state = {CLOBBER};
    }
}


ves_icall_get_frame_info (gint32 skip, MonoBoolean need_file_info, struct MonoReflectionMethod * * method, gint32 * iloffset, gint32 * native_offset, struct MonoString * * file, gint32 * line, gint32 * column)
{
  unsigned int mono_jit_tls_id.37;
  struct MonoLMF * lmf.38;
  void * D.26326;
  int D.26327;
  void * D.26328;
  int D.26329;
  int ves_icall_get_frame_info.39;
  MonoBoolean D.26333;
  <unnamed type> D.26334;
  unsigned int D.26335;
  int D.26338;
  unsigned char D.26339;
  unsigned char D.26340;
  _Bool D.26341;
  _Bool D.26342;
  _Bool D.26343;
  unsigned char D.26346;
  void * D.26349;
  struct MonoReflectionMethod * D.26350;
  int D.26351;
  unsigned int D.26352;
  unsigned int D.26355;
  int D.26356;
  char * D.26362;
  struct MonoString * D.26363;
  unsigned int D.26364;
  int D.26365;
  unsigned int D.26366;
  int D.26367;
  int D.26369;
  struct MonoDomain * domain;
  struct MonoJitTlsData * jit_tls;
  struct MonoLMF * lmf;
  struct MonoJitInfo * ji;
  struct MonoContext ctx;
  struct MonoContext new_ctx;
  struct MonoDebugSourceLocation * location;
  struct MonoMethod * jmethod;
  struct MonoMethod * actual_method;
  struct StackFrameInfo frame;
  gboolean res;

  try
    {
      domain = mono_domain_get ();
      mono_jit_tls_id.37 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.37);
      lmf.38 = mono_get_lmf ();
      lmf = lmf.38;
      ji = 0B;
      jmethod = 0B;
      mono_arch_flush_register_windows ();
      D.26326 = __builtin_frame_address (0);
      D.26327 = (int) D.26326;
      ctx.regs[11] = D.26327;
      D.26328 = __builtin_frame_address (0);
      D.26329 = (int) D.26328;
      ctx.regs[13] = D.26329;
      ves_icall_get_frame_info.39 = (int) ves_icall_get_frame_info;
      ctx.pc = ves_icall_get_frame_info.39;
      new_ctx = ctx;
      <D.25254>:
      ctx = new_ctx;
      res = mono_find_jit_info_ext (domain, jit_tls, 0B, &ctx, &new_ctx, 0B, &lmf, 0B, &frame);
      if (res == 0) goto <D.26331>; else goto <D.26332>;
      <D.26331>:
      D.26333 = 0;
      return D.26333;
      <D.26332>:
      D.26334 = frame.type;
      D.26335 = D.26334 + 4294967295;
      if (D.26335 <= 1) goto <D.26336>; else goto <D.26337>;
      <D.26336>:
      // predicted unlikely by continue predictor.
      goto <D.25253>;
      <D.26337>:
      ji = frame.ji;
      D.26338 = frame.native_offset;
      *native_offset = D.26338;
      jmethod = jinfo_get_method (ji);
      D.26339 = BIT_FIELD_REF <*jmethod, 8, 160>;
      D.26340 = D.26339 & 124;
      D.26341 = D.26340 != 0;
      D.26342 = D.26340 != 68;
      D.26343 = D.26341 & D.26342;
      if (D.26343 != 0) goto <D.26344>; else goto <D.26345>;
      <D.26344>:
      D.26339 = BIT_FIELD_REF <*jmethod, 8, 160>;
      D.26346 = D.26339 & 124;
      if (D.26346 != 24) goto <D.26347>; else goto <D.26348>;
      <D.26347>:
      // predicted unlikely by continue predictor.
      goto <D.25253>;
      <D.26348>:
      <D.26345>:
      skip = skip + -1;
      <D.25253>:
      if (skip >= 0) goto <D.25254>; else goto <D.25255>;
      <D.25255>:
      D.26349 = get_generic_info_from_stack_frame (ji, &ctx);
      actual_method = get_method_from_stack_frame (ji, D.26349);
      D.26350 = mono_method_get_object (domain, actual_method, 0B);
      mono_gc_wbarrier_generic_store (method, D.26350);
      D.26351 = *native_offset;
      D.26352 = (unsigned int) D.26351;
      location = mono_debug_lookup_source_location (jmethod, D.26352, domain);
      if (location != 0B) goto <D.26353>; else goto <D.26354>;
      <D.26353>:
      D.26355 = location->il_offset;
      D.26356 = (int) D.26355;
      *iloffset = D.26356;
      goto <D.26357>;
      <D.26354>:
      *iloffset = 0;
      <D.26357>:
      if (need_file_info != 0) goto <D.26358>; else goto <D.26359>;
      <D.26358>:
      if (location != 0B) goto <D.26360>; else goto <D.26361>;
      <D.26360>:
      D.26362 = location->source_file;
      D.26363 = mono_string_new (domain, D.26362);
      mono_gc_wbarrier_generic_store (file, D.26363);
      D.26364 = location->row;
      D.26365 = (int) D.26364;
      *line = D.26365;
      D.26366 = location->column;
      D.26367 = (int) D.26366;
      *column = D.26367;
      goto <D.26368>;
      <D.26361>:
      *file = 0B;
      *column = 0;
      D.26369 = *column;
      *line = D.26369;
      <D.26368>:
      <D.26359>:
      mono_debug_free_source_location (location);
      D.26333 = 1;
      return D.26333;
    }
  finally
    {
      lmf = {CLOBBER};
      ctx = {CLOBBER};
      new_ctx = {CLOBBER};
      frame = {CLOBBER};
    }
}


ves_icall_System_Security_SecurityFrame_GetSecurityFrame (gint32 skip)
{
  unsigned int skip.40;
  struct MonoSecurityFrame * D.26373;
  struct MonoSecurityFrame * iftmp.41;
  unsigned int D.26375;
  struct MonoFrameSecurityInfo si;

  try
    {
      skip.40 = (unsigned int) skip;
      si.skips = skip.40;
      si.frame = 0B;
      mono_walk_stack (callback_get_first_frame_security_info, 2, &si);
      D.26375 = si.skips;
      if (D.26375 == 0) goto <D.26376>; else goto <D.26377>;
      <D.26376>:
      iftmp.41 = si.frame;
      goto <D.26378>;
      <D.26377>:
      iftmp.41 = 0B;
      <D.26378>:
      D.26373 = iftmp.41;
      return D.26373;
    }
  finally
    {
      si = {CLOBBER};
    }
}


callback_get_first_frame_security_info (struct StackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  gboolean D.26383;
  unsigned char D.26386;
  unsigned char D.26387;
  _Bool D.26388;
  _Bool D.26389;
  _Bool D.26390;
  unsigned char D.26392;
  unsigned int D.26395;
  unsigned int D.26398;
  struct MonoDomain * D.26399;
  struct MonoSecurityFrame * D.26400;
  struct MonoFrameSecurityInfo * si;
  struct MonoJitInfo * ji;
  struct MonoMethod * method;

  si = data;
  ji = frame->ji;
  if (ji == 0B) goto <D.26381>; else goto <D.26382>;
  <D.26381>:
  D.26383 = 0;
  return D.26383;
  <D.26382>:
  method = jinfo_get_method (ji);
  D.26386 = BIT_FIELD_REF <*method, 8, 160>;
  D.26387 = D.26386 & 124;
  D.26388 = D.26387 == 16;
  D.26389 = D.26387 == 40;
  D.26390 = D.26388 | D.26389;
  if (D.26390 != 0) goto <D.26384>; else goto <D.26391>;
  <D.26391>:
  D.26386 = BIT_FIELD_REF <*method, 8, 160>;
  D.26392 = D.26386 & 124;
  if (D.26392 == 44) goto <D.26384>; else goto <D.26393>;
  <D.26393>:
  D.26386 = BIT_FIELD_REF <*method, 8, 160>;
  D.26392 = D.26386 & 124;
  if (D.26392 == 36) goto <D.26384>; else goto <D.26394>;
  <D.26394>:
  D.26386 = BIT_FIELD_REF <*method, 8, 160>;
  D.26392 = D.26386 & 124;
  if (D.26392 == 32) goto <D.26384>; else goto <D.26385>;
  <D.26384>:
  D.26383 = 0;
  return D.26383;
  <D.26385>:
  D.26395 = si->skips;
  if (D.26395 != 0) goto <D.26396>; else goto <D.26397>;
  <D.26396>:
  D.26395 = si->skips;
  D.26398 = D.26395 + 4294967295;
  si->skips = D.26398;
  D.26383 = 0;
  return D.26383;
  <D.26397>:
  D.26399 = frame->domain;
  D.26400 = mono_declsec_create_frame (D.26399, ji);
  si->frame = D.26400;
  D.26383 = 1;
  return D.26383;
}


ves_icall_System_Security_SecurityFrame_GetSecurityStack (gint32 skip)
{
  unsigned int skip.42;
  struct MonoDomain * D.26403;
  struct MonoClass * D.26404;
  unsigned int D.26405;
  struct MonoArray * D.26406;
  struct MonoArray * D.26407;
  struct MonoSecurityStack ss;

  try
    {
      skip.42 = (unsigned int) skip;
      ss.skips = skip.42;
      ss.count = 0;
      ss.maximum = 6;
      D.26403 = mono_domain_get ();
      D.26404 = mono_defaults.runtimesecurityframe_class;
      D.26405 = ss.maximum;
      D.26406 = mono_array_new (D.26403, D.26404, D.26405);
      ss.stack = D.26406;
      mono_walk_stack (callback_get_stack_frames_security_info, 2, &ss);
      D.26407 = ss.stack;
      return D.26407;
    }
  finally
    {
      ss = {CLOBBER};
    }
}


callback_get_stack_frames_security_info (struct StackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  gboolean D.26412;
  unsigned char D.26415;
  unsigned char D.26416;
  _Bool D.26417;
  _Bool D.26418;
  _Bool D.26419;
  unsigned char D.26421;
  unsigned int D.26424;
  unsigned int D.26427;
  unsigned int D.26428;
  unsigned int D.26429;
  struct MonoArray * D.26432;
  unsigned int D.26433;
  unsigned int D.26434;
  struct MonoDomain * D.26435;
  struct MonoSecurityFrame * D.26436;
  struct MonoSecurityStack * ss;
  struct MonoJitInfo * ji;
  struct MonoMethod * method;

  ss = data;
  ji = frame->ji;
  if (ji == 0B) goto <D.26410>; else goto <D.26411>;
  <D.26410>:
  D.26412 = 0;
  return D.26412;
  <D.26411>:
  method = jinfo_get_method (ji);
  D.26415 = BIT_FIELD_REF <*method, 8, 160>;
  D.26416 = D.26415 & 124;
  D.26417 = D.26416 == 16;
  D.26418 = D.26416 == 40;
  D.26419 = D.26417 | D.26418;
  if (D.26419 != 0) goto <D.26413>; else goto <D.26420>;
  <D.26420>:
  D.26415 = BIT_FIELD_REF <*method, 8, 160>;
  D.26421 = D.26415 & 124;
  if (D.26421 == 44) goto <D.26413>; else goto <D.26422>;
  <D.26422>:
  D.26415 = BIT_FIELD_REF <*method, 8, 160>;
  D.26421 = D.26415 & 124;
  if (D.26421 == 36) goto <D.26413>; else goto <D.26423>;
  <D.26423>:
  D.26415 = BIT_FIELD_REF <*method, 8, 160>;
  D.26421 = D.26415 & 124;
  if (D.26421 == 32) goto <D.26413>; else goto <D.26414>;
  <D.26413>:
  D.26412 = 0;
  return D.26412;
  <D.26414>:
  D.26424 = ss->skips;
  if (D.26424 != 0) goto <D.26425>; else goto <D.26426>;
  <D.26425>:
  D.26424 = ss->skips;
  D.26427 = D.26424 + 4294967295;
  ss->skips = D.26427;
  D.26412 = 0;
  return D.26412;
  <D.26426>:
  D.26428 = ss->count;
  D.26429 = ss->maximum;
  if (D.26428 == D.26429) goto <D.26430>; else goto <D.26431>;
  <D.26430>:
  grow_array (ss);
  <D.26431>:
  {
    void * * __p;

    D.26432 = ss->stack;
    D.26428 = ss->count;
    D.26433 = D.26428;
    D.26434 = D.26433 + 1;
    ss->count = D.26434;
    __p = mono_array_addr_with_size (D.26432, 4, D.26433);
    D.26432 = ss->stack;
    D.26435 = frame->domain;
    D.26436 = mono_declsec_create_frame (D.26435, ji);
    mono_gc_wbarrier_set_arrayref (D.26432, __p, D.26436);
  }
  D.26412 = 0;
  return D.26412;
}


grow_array (struct MonoSecurityStack * stack)
{
  unsigned int D.26438;
  struct MonoClass * D.26439;
  struct MonoArray * D.26440;
  unsigned int i.43;
  char * D.26442;
  unsigned int i.44;
  struct MonoDomain * domain;
  guint32 newsize;
  struct MonoArray * newstack;
  int i;

  domain = mono_domain_get ();
  D.26438 = stack->maximum;
  newsize = D.26438 << 1;
  D.26439 = mono_defaults.runtimesecurityframe_class;
  newstack = mono_array_new (domain, D.26439, newsize);
  i = 0;
  goto <D.25288>;
  <D.25287>:
  {
    void * frame;

    D.26440 = stack->stack;
    i.43 = (unsigned int) i;
    D.26442 = mono_array_addr_with_size (D.26440, 4, i.43);
    frame = MEM[(void * *)D.26442];
    {
      void * * __p;

      i.43 = (unsigned int) i;
      __p = mono_array_addr_with_size (newstack, 4, i.43);
      mono_gc_wbarrier_set_arrayref (newstack, __p, frame);
    }
  }
  i = i + 1;
  <D.25288>:
  i.44 = (unsigned int) i;
  D.26438 = stack->maximum;
  if (i.44 < D.26438) goto <D.25287>; else goto <D.25289>;
  <D.25289>:
  stack->maximum = newsize;
  stack->stack = newstack;
}


mini_jit_info_table_find (struct MonoDomain * domain, char * addr, struct MonoDomain * * out_domain)
{
  struct MonoJitInfo * D.26450;
  struct MonoDomain * D.26451;
  struct MonoDomain * D.26454;
  struct MonoDomain * D.26459;
  void * * iftmp.45;
  void * D.26463;
  void * D.26467;
  struct MonoDomain * D.26470;
  struct MonoJitInfo * ji;
  struct MonoInternalThread * t;
  void * * refs;

  t = mono_thread_internal_current ();
  if (out_domain != 0B) goto <D.26444>; else goto <D.26445>;
  <D.26444>:
  *out_domain = 0B;
  <D.26445>:
  ji = mono_jit_info_table_find (domain, addr);
  if (ji != 0B) goto <D.26446>; else goto <D.26447>;
  <D.26446>:
  if (out_domain != 0B) goto <D.26448>; else goto <D.26449>;
  <D.26448>:
  *out_domain = domain;
  <D.26449>:
  D.26450 = ji;
  return D.26450;
  <D.26447>:
  D.26451 = mono_get_root_domain ();
  if (D.26451 != domain) goto <D.26452>; else goto <D.26453>;
  <D.26452>:
  D.26454 = mono_get_root_domain ();
  ji = mono_jit_info_table_find (D.26454, addr);
  if (ji != 0B) goto <D.26455>; else goto <D.26456>;
  <D.26455>:
  if (out_domain != 0B) goto <D.26457>; else goto <D.26458>;
  <D.26457>:
  D.26459 = mono_get_root_domain ();
  *out_domain = D.26459;
  <D.26458>:
  D.26450 = ji;
  return D.26450;
  <D.26456>:
  <D.26453>:
  if (t == 0B) goto <D.26460>; else goto <D.26461>;
  <D.26460>:
  D.26450 = 0B;
  return D.26450;
  <D.26461>:
  D.26463 = t->appdomain_refs;
  if (D.26463 != 0B) goto <D.26464>; else goto <D.26465>;
  <D.26464>:
  D.26463 = t->appdomain_refs;
  iftmp.45 = MEM[(void * *)D.26463];
  goto <D.26466>;
  <D.26465>:
  iftmp.45 = 0B;
  <D.26466>:
  refs = iftmp.45;
  goto <D.25332>;
  <D.25331>:
  D.26467 = *refs;
  if (D.26467 != domain) goto <D.26468>; else goto <D.26469>;
  <D.26468>:
  D.26467 = *refs;
  D.26470 = mono_get_root_domain ();
  if (D.26467 != D.26470) goto <D.26471>; else goto <D.26472>;
  <D.26471>:
  D.26467 = *refs;
  ji = mono_jit_info_table_find (D.26467, addr);
  if (ji != 0B) goto <D.26473>; else goto <D.26474>;
  <D.26473>:
  if (out_domain != 0B) goto <D.26475>; else goto <D.26476>;
  <D.26475>:
  D.26467 = *refs;
  *out_domain = D.26467;
  <D.26476>:
  D.26450 = ji;
  return D.26450;
  <D.26474>:
  <D.26472>:
  <D.26469>:
  refs = refs + 4;
  <D.25332>:
  if (refs != 0B) goto <D.26477>; else goto <D.25333>;
  <D.26477>:
  D.26467 = *refs;
  if (D.26467 != 0B) goto <D.25331>; else goto <D.25333>;
  <D.25333>:
  D.26450 = 0B;
  return D.26450;
}


mono_debugger_run_finally (struct MonoContext * start_ctx)
{
  unsigned int mono_jit_tls_id.46;
  struct MonoLMF * lmf.47;
  struct MonoJitInfo * D.26481;
  int (*<T4735>) (struct MonoContext *, void *) call_filter.48;
  void * D.26487;
  int (*<T4735>) (struct MonoContext *, void *) call_filter.49;
  int D.26489;
  void * D.26490;
  int D.26491;
  unsigned int D.26494;
  unsigned int D.26495;
  void * D.26498;
  <unnamed-unsigned:15> D.26499;
  int D.26500;
  static int (*<T4735>) (struct MonoContext *, void *) call_filter = 0B;
  struct MonoDomain * domain;
  struct MonoJitTlsData * jit_tls;
  struct MonoLMF * lmf;
  struct MonoContext ctx;
  struct MonoContext new_ctx;
  struct MonoJitInfo * ji;
  struct MonoJitInfo rji;
  int i;

  try
    {
      domain = mono_domain_get ();
      mono_jit_tls_id.46 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.46);
      lmf.47 = mono_get_lmf ();
      lmf = lmf.47;
      ctx = *start_ctx;
      ji = mono_find_jit_info (domain, jit_tls, &rji, 0B, &ctx, &new_ctx, 0B, &lmf, 0B, 0B);
      D.26481 = ji + 4294967295;
      if (D.26481 > 4294967293B) goto <D.26482>; else goto <D.26483>;
      <D.26482>:
      return;
      <D.26483>:
      call_filter.48 = call_filter;
      if (call_filter.48 == 0B) goto <D.26485>; else goto <D.26486>;
      <D.26485>:
      D.26487 = mono_get_call_filter ();
      call_filter.49 = (int (*<T4735>) (struct MonoContext *, void *)) D.26487;
      call_filter = call_filter.49;
      <D.26486>:
      i = 0;
      goto <D.25529>;
      <D.25528>:
      {
        struct MonoJitExceptionInfo * ei;

        ei = &ji->clauses[i];
        D.26489 = ctx.pc;
        D.26490 = (void *) D.26489;
        D.26491 = is_address_protected (ji, ei, D.26490);
        if (D.26491 != 0) goto <D.26492>; else goto <D.26493>;
        <D.26492>:
        D.26494 = ei->flags;
        D.26495 = D.26494 & 2;
        if (D.26495 != 0) goto <D.26496>; else goto <D.26497>;
        <D.26496>:
        call_filter.48 = call_filter;
        D.26498 = ei->handler_start;
        call_filter.48 (&ctx, D.26498);
        <D.26497>:
        <D.26493>:
      }
      i = i + 1;
      <D.25529>:
      D.26499 = ji->num_clauses;
      D.26500 = (int) D.26499;
      if (D.26500 > i) goto <D.25528>; else goto <D.25530>;
      <D.25530>:
    }
  finally
    {
      lmf = {CLOBBER};
      ctx = {CLOBBER};
      new_ctx = {CLOBBER};
      rji = {CLOBBER};
    }
}


is_address_protected (struct MonoJitInfo * ji, struct MonoJitExceptionInfo * ei, void * ip)
{
  void * D.26506;
  void * D.26508;
  gboolean D.26509;
  unsigned char D.26510;
  unsigned char D.26511;
  int ip.50;
  void * D.26515;
  int D.26516;
  int D.26517;
  int ei.51;
  struct MonoJitExceptionInfo[0:] * D.26519;
  int D.26520;
  int D.26521;
  int D.26522;
  int D.26523;
  <unnamed-unsigned:15> D.26524;
  int D.26525;
  _Bool D.26526;
  long int D.26527;
  long int D.26528;
  short unsigned int D.26531;
  unsigned int D.26534;
  short unsigned int D.26537;
  unsigned int D.26538;
  unsigned int D.26539;
  short unsigned int D.26542;
  int D.26543;
  struct MonoTryBlockHoleTableJitInfo * table;
  int i;
  guint32 offset;
  guint16 clause;

  D.26506 = ei->try_start;
  if (D.26506 > ip) goto <D.26504>; else goto <D.26507>;
  <D.26507>:
  D.26508 = ei->try_end;
  if (D.26508 <= ip) goto <D.26504>; else goto <D.26505>;
  <D.26504>:
  D.26509 = 0;
  return D.26509;
  <D.26505>:
  D.26510 = BIT_FIELD_REF <*ji, 8, 176>;
  D.26511 = D.26510 & 4;
  if (D.26511 == 0) goto <D.26512>; else goto <D.26513>;
  <D.26512>:
  D.26509 = 1;
  return D.26509;
  <D.26513>:
  table = mono_jit_info_get_try_block_hole_table_info (ji);
  ip.50 = (int) ip;
  D.26515 = ji->code_start;
  D.26516 = (int) D.26515;
  D.26517 = ip.50 - D.26516;
  offset = (guint32) D.26517;
  ei.51 = (int) ei;
  D.26519 = &ji->clauses;
  D.26520 = (int) D.26519;
  D.26521 = ei.51 - D.26520;
  D.26522 = D.26521 /[ex] 24;
  clause = (guint16) D.26522;
  D.26523 = (int) clause;
  D.26524 = ji->num_clauses;
  D.26525 = (int) D.26524;
  D.26526 = D.26523 >= D.26525;
  D.26527 = (long int) D.26526;
  D.26528 = __builtin_expect (D.26527, 0);
  if (D.26528 != 0) goto <D.26529>; else goto <D.26530>;
  <D.26529>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 183, "clause < ji->num_clauses");
  <D.26530>:
  i = 0;
  goto <D.25027>;
  <D.25026>:
  {
    struct MonoTryBlockHoleJitInfo * hole;

    hole = &table->holes[i];
    D.26531 = hole->clause;
    if (D.26531 == clause) goto <D.26532>; else goto <D.26533>;
    <D.26532>:
    D.26534 = hole->offset;
    if (D.26534 <= offset) goto <D.26535>; else goto <D.26536>;
    <D.26535>:
    D.26534 = hole->offset;
    D.26537 = hole->length;
    D.26538 = (unsigned int) D.26537;
    D.26539 = D.26534 + D.26538;
    if (D.26539 > offset) goto <D.26540>; else goto <D.26541>;
    <D.26540>:
    D.26509 = 0;
    return D.26509;
    <D.26541>:
    <D.26536>:
    <D.26533>:
  }
  i = i + 1;
  <D.25027>:
  D.26542 = table->num_holes;
  D.26543 = (int) D.26542;
  if (D.26543 > i) goto <D.25026>; else goto <D.25028>;
  <D.25028>:
  D.26509 = 1;
  return D.26509;
}


mono_handle_exception (struct MonoContext * ctx, void * obj)
{
  struct MonoPerfCounters * mono_perfcounters.52;
  unsigned int D.26546;
  unsigned int D.26547;
  gboolean D.26548;

  mono_perfcounters.52 = mono_perfcounters;
  D.26546 = mono_perfcounters.52->exceptions_thrown;
  D.26547 = D.26546 + 1;
  mono_perfcounters.52->exceptions_thrown = D.26547;
  D.26548 = mono_handle_exception_internal (ctx, obj, 0, 0B);
  return D.26548;
}


mono_handle_exception_internal (struct MonoContext * ctx, void * obj, gboolean resume, struct MonoJitInfo * * out_ji)
{
  unsigned int mono_jit_tls_id.53;
  struct MonoLMF * lmf.54;
  _Bool D.26552;
  long int D.26553;
  long int D.26554;
  struct MonoString * * D.26559;
  struct MonoString * D.26560;
  struct MonoException * D.26561;
  struct MonoException * D.26565;
  struct MonoClass * D.26568;
  struct MonoObject * D.26569;
  struct MonoObject * D.26572;
  struct MonoClass * D.26578;
  int D.25451;
  int iftmp.55;
  int D.25450;
  struct MonoVTable * D.26584;
  struct MonoClass * D.26585;
  const char[21] * D.26586;
  unsigned char D.26587;
  int D.26588;
  unsigned char D.26589;
  int D.26590;
  _Bool D.26591;
  _Bool D.26592;
  _Bool D.26593;
  const unsigned char * D.26596;
  unsigned char D.26597;
  int D.26598;
  const unsigned char * D.26599;
  unsigned char D.26600;
  int D.26601;
  _Bool D.26602;
  _Bool D.26603;
  const unsigned char * D.26606;
  unsigned char D.26607;
  int D.26608;
  const unsigned char * D.26609;
  unsigned char D.26610;
  int D.26611;
  _Bool D.26612;
  _Bool D.26613;
  const unsigned char * D.26616;
  unsigned char D.26617;
  int D.26618;
  const unsigned char * D.26619;
  unsigned char D.26620;
  int D.26621;
  const char * D.26623;
  struct MonoClass * D.26626;
  struct MonoString * D.26627;
  int D.25463;
  int iftmp.56;
  int D.25462;
  const char[27] * D.26631;
  unsigned char D.26632;
  int D.26633;
  unsigned char D.26634;
  int D.26635;
  _Bool D.26636;
  _Bool D.26637;
  _Bool D.26638;
  const unsigned char * D.26641;
  unsigned char D.26642;
  int D.26643;
  const unsigned char * D.26644;
  unsigned char D.26645;
  int D.26646;
  _Bool D.26647;
  _Bool D.26648;
  const unsigned char * D.26651;
  unsigned char D.26652;
  int D.26653;
  const unsigned char * D.26654;
  unsigned char D.26655;
  int D.26656;
  _Bool D.26657;
  _Bool D.26658;
  const unsigned char * D.26661;
  unsigned char D.26662;
  int D.26663;
  const unsigned char * D.26664;
  unsigned char D.26665;
  int D.26666;
  struct MonoString * D.26670;
  int (*<T4735>) (struct MonoContext *, void *) call_filter.57;
  void * D.26674;
  int (*<T4735>) (struct MonoContext *, void *) call_filter.58;
  void * D.26676;
  _Bool D.26677;
  long int D.26678;
  long int D.26679;
  void (*<T3c6e>) (struct MonoObject *) D.26682;
  _Bool D.26683;
  long int D.26684;
  long int D.26685;
  struct MonoContext * D.26688;
  int D.26691;
  struct MonoMethod * iftmp.59;
  struct MonoVTable * D.26698;
  struct MonoClass * D.26699;
  int D.25483;
  int iftmp.60;
  int D.25482;
  const char[21] * D.26709;
  unsigned char D.26710;
  int D.26711;
  unsigned char D.26712;
  int D.26713;
  _Bool D.26714;
  _Bool D.26715;
  _Bool D.26716;
  const unsigned char * D.26719;
  unsigned char D.26720;
  int D.26721;
  const unsigned char * D.26722;
  unsigned char D.26723;
  int D.26724;
  _Bool D.26725;
  _Bool D.26726;
  const unsigned char * D.26729;
  unsigned char D.26730;
  int D.26731;
  const unsigned char * D.26732;
  unsigned char D.26733;
  int D.26734;
  _Bool D.26735;
  _Bool D.26736;
  const unsigned char * D.26739;
  unsigned char D.26740;
  int D.26741;
  const unsigned char * D.26742;
  unsigned char D.26743;
  int D.26744;
  int D.25492;
  int iftmp.61;
  int D.25491;
  const char[23] * D.26750;
  unsigned char D.26751;
  int D.26752;
  unsigned char D.26753;
  int D.26754;
  _Bool D.26755;
  _Bool D.26756;
  _Bool D.26757;
  const unsigned char * D.26760;
  unsigned char D.26761;
  int D.26762;
  const unsigned char * D.26763;
  unsigned char D.26764;
  int D.26765;
  _Bool D.26766;
  _Bool D.26767;
  const unsigned char * D.26770;
  unsigned char D.26771;
  int D.26772;
  const unsigned char * D.26773;
  unsigned char D.26774;
  int D.26775;
  _Bool D.26776;
  _Bool D.26777;
  const unsigned char * D.26780;
  unsigned char D.26781;
  int D.26782;
  const unsigned char * D.26783;
  unsigned char D.26784;
  int D.26785;
  char * iftmp.62;
  unsigned int D.26793;
  void * D.26794;
  struct MonoVTable * D.26795;
  struct MonoClass * D.26796;
  const char * D.26797;
  const char * D.26798;
  int D.26801;
  struct MonoDebugOptions * D.26806;
  int D.26807;
  struct MonoDebugOptions * D.26810;
  int D.26811;
  struct _IO_FILE * stderr.63;
  struct MonoJitInfo * ji.64;
  struct MonoMethod * D.26819;
  unsigned char D.26820;
  unsigned char D.26821;
  struct MonoJitInfo * prev_ji.65;
  struct MonoMethod * D.26827;
  struct MonoMethod * D.26828;
  struct MonoJitInfo * ji.66;
  struct MonoLMF * lmf.67;
  int first_filter_idx.68;
  <unnamed type> D.26844;
  unsigned int D.26845;
  _Bool D.26848;
  long int D.26849;
  long int D.26850;
  struct MonoJitInfo * ji.69;
  struct MonoLMF * * D.26856;
  struct MonoLMF * lmf.70;
  int D.26862;
  int D.26863;
  int D.26864;
  int D.26866;
  int D.26870;
  void * D.26871;
  int D.26872;
  int D.26878;
  unsigned int D.26880;
  unsigned char D.26883;
  unsigned char D.26884;
  int ex_obj.71;
  int D.26889;
  sizetype D.26890;
  int D.26891;
  sizetype D.26892;
  sizetype D.26893;
  void * * D.26894;
  int first_filter_idx.72;
  _Bool D.26898;
  struct MonoObject * D.26903;
  void * D.26904;
  _Bool D.26905;
  long int D.26906;
  long int D.26907;
  int D.26910;
  int D.26916;
  char * D.26917;
  struct MonoJitInfo * D.26918;
  _Bool D.26919;
  long int D.26920;
  long int D.26921;
  struct MonoJitExceptionInfo * D.26924;
  void * D.26925;
  int D.26926;
  int D.26931;
  int D.26934;
  char * D.26937;
  int D.26938;
  int D.26939;
  struct MonoLMF * * D.26940;
  struct MonoPerfCounters * mono_perfcounters.73;
  unsigned int D.26942;
  unsigned int frame_count.74;
  unsigned int D.26944;
  gboolean D.26947;
  int D.26948;
  int D.26953;
  int D.26956;
  char * D.26959;
  int D.26960;
  int D.26965;
  int D.26968;
  char * D.26971;
  unsigned int D.26972;
  unsigned int D.26973;
  struct MonoLMF * * D.26974;
  int D.26977;
  <unnamed-unsigned:15> D.26978;
  int D.26979;
  struct MonoDomain * domain;
  struct MonoJitInfo * ji;
  struct MonoJitInfo * prev_ji;
  static int (*<T4735>) (struct MonoContext *, void *) call_filter = 0B;
  struct MonoJitTlsData * jit_tls;
  struct MonoLMF * lmf;
  struct MonoException * mono_ex;
  gboolean stack_overflow;
  struct MonoContext initial_ctx;
  struct MonoMethod * method;
  int frame_count;
  gint32 filter_idx;
  gint32 first_filter_idx;
  int i;
  struct MonoObject * ex_obj;
  struct MonoObject * non_exception;

  try
    {
      domain = mono_domain_get ();
      mono_jit_tls_id.53 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.53);
      lmf.54 = mono_get_lmf ();
      lmf = lmf.54;
      stack_overflow = 0;
      frame_count = 0;
      first_filter_idx = 0;
      non_exception = 0B;
      D.26552 = ctx == 0B;
      D.26553 = (long int) D.26552;
      D.26554 = __builtin_expect (D.26553, 0);
      if (D.26554 != 0) goto <D.26555>; else goto <D.26556>;
      <D.26555>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1517, "ctx != NULL");
      <D.26556>:
      if (obj == 0B) goto <D.26557>; else goto <D.26558>;
      <D.26557>:
      {
        struct MonoException * ex;

        ex = mono_get_exception_null_reference ();
        D.26559 = &ex->message;
        D.26560 = mono_string_new (domain, "Object reference not set to an instance of an object");
        mono_gc_wbarrier_set_field (ex, D.26559, D.26560);
        obj = ex;
      }
      <D.26558>:
      D.26561 = domain->stack_overflow_ex;
      if (D.26561 == obj) goto <D.26562>; else goto <D.26563>;
      <D.26562>:
      stack_overflow = 1;
      goto <D.26564>;
      <D.26563>:
      D.26565 = domain->null_reference_ex;
      if (D.26565 == obj) goto <D.26566>; else goto <D.26567>;
      <D.26566>:
      obj = mono_get_exception_null_reference ();
      <D.26567>:
      <D.26564>:
      D.26568 = mono_defaults.exception_class;
      D.26569 = mono_object_isinst (obj, D.26568);
      if (D.26569 == 0B) goto <D.26570>; else goto <D.26571>;
      <D.26570>:
      non_exception = obj;
      obj = mono_get_exception_runtime_wrapped (obj);
      <D.26571>:
      mono_ex = obj;
      D.26568 = mono_defaults.exception_class;
      D.26572 = mono_object_isinst (obj, D.26568);
      if (D.26572 != 0B) goto <D.26573>; else goto <D.26574>;
      <D.26573>:
      mono_ex = obj;
      goto <D.26575>;
      <D.26574>:
      mono_ex = 0B;
      <D.26575>:
      if (mono_ex != 0B) goto <D.26576>; else goto <D.26577>;
      <D.26576>:
      D.26578 = jit_tls->class_cast_from;
      if (D.26578 != 0B) goto <D.26579>; else goto <D.26580>;
      <D.26579>:
      {
        size_t __s1_len;
        size_t __s2_len;

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

          D.26584 = mono_ex->object.vtable;
          D.26585 = D.26584->klass;
          __s2 = D.26585->name;
          D.26586 = "InvalidCastException";
          D.26587 = MEM[(const unsigned char *)D.26586];
          D.26588 = (int) D.26587;
          D.26589 = *__s2;
          D.26590 = (int) D.26589;
          __result = D.26588 - D.26590;
          {
            D.26591 = __s2_len != 0;
            D.26592 = __result == 0;
            D.26593 = D.26591 & D.26592;
            if (D.26593 != 0) goto <D.26594>; else goto <D.26595>;
            <D.26594>:
            D.26596 = &MEM[(void *)"InvalidCastException" + 1B];
            D.26597 = *D.26596;
            D.26598 = (int) D.26597;
            D.26599 = __s2 + 1;
            D.26600 = *D.26599;
            D.26601 = (int) D.26600;
            __result = D.26598 - D.26601;
            D.26602 = __s2_len > 1;
            D.26592 = __result == 0;
            D.26603 = D.26602 & D.26592;
            if (D.26603 != 0) goto <D.26604>; else goto <D.26605>;
            <D.26604>:
            D.26606 = &MEM[(void *)"InvalidCastException" + 2B];
            D.26607 = *D.26606;
            D.26608 = (int) D.26607;
            D.26609 = __s2 + 2;
            D.26610 = *D.26609;
            D.26611 = (int) D.26610;
            __result = D.26608 - D.26611;
            D.26612 = __s2_len > 2;
            D.26592 = __result == 0;
            D.26613 = D.26612 & D.26592;
            if (D.26613 != 0) goto <D.26614>; else goto <D.26615>;
            <D.26614>:
            D.26616 = &MEM[(void *)"InvalidCastException" + 3B];
            D.26617 = *D.26616;
            D.26618 = (int) D.26617;
            D.26619 = __s2 + 3;
            D.26620 = *D.26619;
            D.26621 = (int) D.26620;
            __result = D.26618 - D.26621;
            <D.26615>:
            <D.26605>:
            <D.26595>:
          }
          D.25450 = __result;
        }
        iftmp.55 = -D.25450;
        goto <D.26622>;
        <D.26583>:
        D.26584 = mono_ex->object.vtable;
        D.26585 = D.26584->klass;
        D.26623 = D.26585->name;
        iftmp.55 = __builtin_strcmp (D.26623, "InvalidCastException");
        <D.26622>:
        D.25451 = iftmp.55;
      }
      if (D.25451 == 0) goto <D.26624>; else goto <D.26625>;
      <D.26624>:
      {
        char * from_name;
        char * to_name;
        char * msg;

        D.26578 = jit_tls->class_cast_from;
        from_name = mono_type_get_full_name (D.26578);
        D.26626 = jit_tls->class_cast_to;
        to_name = mono_type_get_full_name (D.26626);
        msg = monoeg_g_strdup_printf ("Unable to cast object of type \'%s\' to type \'%s\'.", from_name, to_name);
        D.26627 = mono_string_new (domain, msg);
        mono_ex->message = D.26627;
        monoeg_g_free (from_name);
        monoeg_g_free (to_name);
        monoeg_g_free (msg);
      }
      <D.26625>:
      {
        size_t __s1_len;
        size_t __s2_len;

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

          D.26584 = mono_ex->object.vtable;
          D.26585 = D.26584->klass;
          __s2 = D.26585->name;
          D.26631 = "ArrayTypeMismatchException";
          D.26632 = MEM[(const unsigned char *)D.26631];
          D.26633 = (int) D.26632;
          D.26634 = *__s2;
          D.26635 = (int) D.26634;
          __result = D.26633 - D.26635;
          {
            D.26636 = __s2_len != 0;
            D.26637 = __result == 0;
            D.26638 = D.26636 & D.26637;
            if (D.26638 != 0) goto <D.26639>; else goto <D.26640>;
            <D.26639>:
            D.26641 = &MEM[(void *)"ArrayTypeMismatchException" + 1B];
            D.26642 = *D.26641;
            D.26643 = (int) D.26642;
            D.26644 = __s2 + 1;
            D.26645 = *D.26644;
            D.26646 = (int) D.26645;
            __result = D.26643 - D.26646;
            D.26647 = __s2_len > 1;
            D.26637 = __result == 0;
            D.26648 = D.26647 & D.26637;
            if (D.26648 != 0) goto <D.26649>; else goto <D.26650>;
            <D.26649>:
            D.26651 = &MEM[(void *)"ArrayTypeMismatchException" + 2B];
            D.26652 = *D.26651;
            D.26653 = (int) D.26652;
            D.26654 = __s2 + 2;
            D.26655 = *D.26654;
            D.26656 = (int) D.26655;
            __result = D.26653 - D.26656;
            D.26657 = __s2_len > 2;
            D.26637 = __result == 0;
            D.26658 = D.26657 & D.26637;
            if (D.26658 != 0) goto <D.26659>; else goto <D.26660>;
            <D.26659>:
            D.26661 = &MEM[(void *)"ArrayTypeMismatchException" + 3B];
            D.26662 = *D.26661;
            D.26663 = (int) D.26662;
            D.26664 = __s2 + 3;
            D.26665 = *D.26664;
            D.26666 = (int) D.26665;
            __result = D.26663 - D.26666;
            <D.26660>:
            <D.26650>:
            <D.26640>:
          }
          D.25462 = __result;
        }
        iftmp.56 = -D.25462;
        goto <D.26667>;
        <D.26630>:
        D.26584 = mono_ex->object.vtable;
        D.26585 = D.26584->klass;
        D.26623 = D.26585->name;
        iftmp.56 = __builtin_strcmp (D.26623, "ArrayTypeMismatchException");
        <D.26667>:
        D.25463 = iftmp.56;
      }
      if (D.25463 == 0) goto <D.26668>; else goto <D.26669>;
      <D.26668>:
      {
        char * from_name;
        char * to_name;
        char * msg;

        D.26578 = jit_tls->class_cast_from;
        from_name = mono_type_get_full_name (D.26578);
        D.26626 = jit_tls->class_cast_to;
        to_name = mono_type_get_full_name (D.26626);
        msg = monoeg_g_strdup_printf ("Source array of type \'%s\' cannot be cast to destination array type \'%s\'.", from_name, to_name);
        D.26670 = mono_string_new (domain, msg);
        mono_ex->message = D.26670;
        monoeg_g_free (from_name);
        monoeg_g_free (to_name);
        monoeg_g_free (msg);
      }
      <D.26669>:
      <D.26580>:
      <D.26577>:
      call_filter.57 = call_filter;
      if (call_filter.57 == 0B) goto <D.26672>; else goto <D.26673>;
      <D.26672>:
      D.26674 = mono_get_call_filter ();
      call_filter.58 = (int (*<T4735>) (struct MonoContext *, void *)) D.26674;
      call_filter = call_filter.58;
      <D.26673>:
      D.26676 = jit_tls->end_of_stack;
      D.26677 = D.26676 == 0B;
      D.26678 = (long int) D.26677;
      D.26679 = __builtin_expect (D.26678, 0);
      if (D.26679 != 0) goto <D.26680>; else goto <D.26681>;
      <D.26680>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1575, "jit_tls->end_of_stack");
      <D.26681>:
      D.26682 = jit_tls->abort_func;
      D.26683 = D.26682 == 0B;
      D.26684 = (long int) D.26683;
      D.26685 = __builtin_expect (D.26684, 0);
      if (D.26685 != 0) goto <D.26686>; else goto <D.26687>;
      <D.26686>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1576, "jit_tls->abort_func");
      <D.26687>:
      D.26688 = &jit_tls->orig_ex_ctx;
      memcpy (D.26688, ctx, 208);
      if (resume == 0) goto <D.26689>; else goto <D.26690>;
      <D.26689>:
      {
        gboolean res;
        struct MonoContext ctx_cp;

        try
          {
            ctx_cp = *ctx;
            D.26691 = mono_trace_is_enabled ();
            if (D.26691 != 0) goto <D.26692>; else goto <D.26693>;
            <D.26692>:
            {
              struct MonoMethod * system_exception_get_message;
              struct MonoMethod * get_message;
              struct MonoObject * message;
              const char * type_name;
              char * msg;
              struct MonoObject * exc;

              try
                {
                  D.26568 = mono_defaults.exception_class;
                  system_exception_get_message = mono_class_get_method_from_name (D.26568, "get_Message", 0);
                  if (system_exception_get_message != 0B) goto <D.26695>; else goto <D.26696>;
                  <D.26695>:
                  iftmp.59 = mono_object_get_virtual_method (obj, system_exception_get_message);
                  goto <D.26697>;
                  <D.26696>:
                  iftmp.59 = 0B;
                  <D.26697>:
                  get_message = iftmp.59;
                  D.26698 = MEM[(struct MonoObject *)mono_ex].vtable;
                  D.26699 = D.26698->klass;
                  type_name = mono_class_get_name (D.26699);
                  msg = 0B;
                  exc = 0B;
                  if (get_message == 0B) goto <D.26700>; else goto <D.26701>;
                  <D.26700>:
                  message = 0B;
                  goto <D.26702>;
                  <D.26701>:
                  {
                    size_t __s1_len;
                    size_t __s2_len;

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

                      __s2 = type_name;
                      D.26709 = "OutOfMemoryException";
                      D.26710 = MEM[(const unsigned char *)D.26709];
                      D.26711 = (int) D.26710;
                      D.26712 = *__s2;
                      D.26713 = (int) D.26712;
                      __result = D.26711 - D.26713;
                      {
                        D.26714 = __s2_len != 0;
                        D.26715 = __result == 0;
                        D.26716 = D.26714 & D.26715;
                        if (D.26716 != 0) goto <D.26717>; else goto <D.26718>;
                        <D.26717>:
                        D.26719 = &MEM[(void *)"OutOfMemoryException" + 1B];
                        D.26720 = *D.26719;
                        D.26721 = (int) D.26720;
                        D.26722 = __s2 + 1;
                        D.26723 = *D.26722;
                        D.26724 = (int) D.26723;
                        __result = D.26721 - D.26724;
                        D.26725 = __s2_len > 1;
                        D.26715 = __result == 0;
                        D.26726 = D.26725 & D.26715;
                        if (D.26726 != 0) goto <D.26727>; else goto <D.26728>;
                        <D.26727>:
                        D.26729 = &MEM[(void *)"OutOfMemoryException" + 2B];
                        D.26730 = *D.26729;
                        D.26731 = (int) D.26730;
                        D.26732 = __s2 + 2;
                        D.26733 = *D.26732;
                        D.26734 = (int) D.26733;
                        __result = D.26731 - D.26734;
                        D.26735 = __s2_len > 2;
                        D.26715 = __result == 0;
                        D.26736 = D.26735 & D.26715;
                        if (D.26736 != 0) goto <D.26737>; else goto <D.26738>;
                        <D.26737>:
                        D.26739 = &MEM[(void *)"OutOfMemoryException" + 3B];
                        D.26740 = *D.26739;
                        D.26741 = (int) D.26740;
                        D.26742 = __s2 + 3;
                        D.26743 = *D.26742;
                        D.26744 = (int) D.26743;
                        __result = D.26741 - D.26744;
                        <D.26738>:
                        <D.26728>:
                        <D.26718>:
                      }
                      D.25482 = __result;
                    }
                    iftmp.60 = -D.25482;
                    goto <D.26745>;
                    <D.26708>:
                    iftmp.60 = __builtin_strcmp (type_name, "OutOfMemoryException");
                    <D.26745>:
                    D.25483 = iftmp.60;
                  }
                  if (D.25483 == 0) goto <D.26703>; else goto <D.26746>;
                  <D.26746>:
                  {
                    size_t __s1_len;
                    size_t __s2_len;

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

                      __s2 = type_name;
                      D.26750 = "StackOverflowException";
                      D.26751 = MEM[(const unsigned char *)D.26750];
                      D.26752 = (int) D.26751;
                      D.26753 = *__s2;
                      D.26754 = (int) D.26753;
                      __result = D.26752 - D.26754;
                      {
                        D.26755 = __s2_len != 0;
                        D.26756 = __result == 0;
                        D.26757 = D.26755 & D.26756;
                        if (D.26757 != 0) goto <D.26758>; else goto <D.26759>;
                        <D.26758>:
                        D.26760 = &MEM[(void *)"StackOverflowException" + 1B];
                        D.26761 = *D.26760;
                        D.26762 = (int) D.26761;
                        D.26763 = __s2 + 1;
                        D.26764 = *D.26763;
                        D.26765 = (int) D.26764;
                        __result = D.26762 - D.26765;
                        D.26766 = __s2_len > 1;
                        D.26756 = __result == 0;
                        D.26767 = D.26766 & D.26756;
                        if (D.26767 != 0) goto <D.26768>; else goto <D.26769>;
                        <D.26768>:
                        D.26770 = &MEM[(void *)"StackOverflowException" + 2B];
                        D.26771 = *D.26770;
                        D.26772 = (int) D.26771;
                        D.26773 = __s2 + 2;
                        D.26774 = *D.26773;
                        D.26775 = (int) D.26774;
                        __result = D.26772 - D.26775;
                        D.26776 = __s2_len > 2;
                        D.26756 = __result == 0;
                        D.26777 = D.26776 & D.26756;
                        if (D.26777 != 0) goto <D.26778>; else goto <D.26779>;
                        <D.26778>:
                        D.26780 = &MEM[(void *)"StackOverflowException" + 3B];
                        D.26781 = *D.26780;
                        D.26782 = (int) D.26781;
                        D.26783 = __s2 + 3;
                        D.26784 = *D.26783;
                        D.26785 = (int) D.26784;
                        __result = D.26782 - D.26785;
                        <D.26779>:
                        <D.26769>:
                        <D.26759>:
                      }
                      D.25491 = __result;
                    }
                    iftmp.61 = -D.25491;
                    goto <D.26786>;
                    <D.26749>:
                    iftmp.61 = __builtin_strcmp (type_name, "StackOverflowException");
                    <D.26786>:
                    D.25492 = iftmp.61;
                  }
                  if (D.25492 == 0) goto <D.26703>; else goto <D.26704>;
                  <D.26703>:
                  message = 0B;
                  msg = monoeg_g_strdup_printf ("(No exception message for: %s)\n", type_name);
                  goto <D.26705>;
                  <D.26704>:
                  message = mono_runtime_invoke (get_message, obj, 0B, &exc);
                  <D.26705>:
                  <D.26702>:
                  if (msg == 0B) goto <D.26787>; else goto <D.26788>;
                  <D.26787>:
                  if (message != 0B) goto <D.26790>; else goto <D.26791>;
                  <D.26790>:
                  iftmp.62 = mono_string_to_utf8 (message);
                  goto <D.26792>;
                  <D.26791>:
                  iftmp.62 = monoeg_strdup ("(System.Exception.Message property not available)");
                  <D.26792>:
                  msg = iftmp.62;
                  <D.26788>:
                  D.26793 = GetCurrentThreadId ();
                  D.26794 = (void *) D.26793;
                  D.26795 = MEM[(struct MonoObject *)obj].vtable;
                  D.26796 = D.26795->klass;
                  D.26797 = D.26796->name_space;
                  D.26795 = MEM[(struct MonoObject *)obj].vtable;
                  D.26796 = D.26795->klass;
                  D.26798 = D.26796->name;
                  monoeg_g_print ("[%p:] EXCEPTION handling: %s.%s: %s\n", D.26794, D.26797, D.26798, msg);
                  monoeg_g_free (msg);
                  if (mono_ex != 0B) goto <D.26799>; else goto <D.26800>;
                  <D.26799>:
                  D.26698 = MEM[(struct MonoObject *)mono_ex].vtable;
                  D.26699 = D.26698->klass;
                  D.26801 = mono_trace_eval_exception (D.26699);
                  if (D.26801 != 0) goto <D.26802>; else goto <D.26803>;
                  <D.26802>:
                  mono_print_thread_dump_from_ctx (ctx);
                  <D.26803>:
                  <D.26800>:
                }
              finally
                {
                  exc = {CLOBBER};
                }
            }
            <D.26693>:
            jit_tls->orig_ex_ctx_set = 1;
            mono_profiler_exception_thrown (obj);
            jit_tls->orig_ex_ctx_set = 0;
            res = mono_handle_exception_internal_first_pass (&ctx_cp, obj, &first_filter_idx, &ji, &prev_ji, non_exception);
            if (res == 0) goto <D.26804>; else goto <D.26805>;
            <D.26804>:
            D.26806 = mini_get_debug_options ();
            D.26807 = D.26806->break_on_exc;
            if (D.26807 != 0) goto <D.26808>; else goto <D.26809>;
            <D.26808>:
            raise (5);
            <D.26809>:
            mono_debugger_agent_handle_exception (obj, ctx, 0B);
            D.26810 = mini_get_debug_options ();
            D.26811 = D.26810->suspend_on_unhandled;
            if (D.26811 != 0) goto <D.26812>; else goto <D.26813>;
            <D.26812>:
            stderr.63 = stderr;
            fprintf (stderr.63, "Unhandled exception, suspending...\n");
            <D.25493>:
            goto <D.25493>;
            <D.26813>:
            mono_unhandled_exception (obj);
            goto <D.26815>;
            <D.26805>:
            {
              gboolean unhandled;

              unhandled = 0;
              ji.64 = ji;
              if (ji.64 != 0B) goto <D.26817>; else goto <D.26818>;
              <D.26817>:
              ji.64 = ji;
              D.26819 = jinfo_get_method (ji.64);
              D.26820 = BIT_FIELD_REF <*D.26819, 8, 160>;
              D.26821 = D.26820 & 124;
              if (D.26821 == 16) goto <D.26822>; else goto <D.26823>;
              <D.26822>:
              prev_ji.65 = prev_ji;
              if (prev_ji.65 != 0B) goto <D.26825>; else goto <D.26826>;
              <D.26825>:
              {
                struct MonoInternalThread * thread;

                thread = mono_thread_internal_current ();
                prev_ji.65 = prev_ji;
                D.26827 = jinfo_get_method (prev_ji.65);
                D.26828 = thread->async_invoke_method;
                if (D.26827 == D.26828) goto <D.26829>; else goto <D.26830>;
                <D.26829>:
                unhandled = 1;
                <D.26830>:
              }
              <D.26826>:
              <D.26823>:
              <D.26818>:
              if (unhandled != 0) goto <D.26831>; else goto <D.26832>;
              <D.26831>:
              mono_debugger_agent_handle_exception (obj, ctx, 0B);
              goto <D.26833>;
              <D.26832>:
              mono_debugger_agent_handle_exception (obj, ctx, &ctx_cp);
              <D.26833>:
            }
            <D.26815>:
          }
        finally
          {
            ctx_cp = {CLOBBER};
          }
      }
      <D.26690>:
      if (out_ji != 0B) goto <D.26834>; else goto <D.26835>;
      <D.26834>:
      *out_ji = 0B;
      <D.26835>:
      filter_idx = 0;
      initial_ctx = *ctx;
      <D.25512>:
      {
        struct MonoContext new_ctx;
        guint32 free_stack;
        int clause_index_start;
        gboolean unwind_res;

        try
          {
            clause_index_start = 0;
            unwind_res = 1;
            if (resume != 0) goto <D.26836>; else goto <D.26837>;
            <D.26836>:
            resume = 0;
            ji.66 = jit_tls->resume_state.ji;
            ji = ji.66;
            new_ctx = jit_tls->resume_state.new_ctx;
            clause_index_start = jit_tls->resume_state.clause_index;
            lmf.67 = jit_tls->resume_state.lmf;
            lmf = lmf.67;
            first_filter_idx.68 = jit_tls->resume_state.first_filter_idx;
            first_filter_idx = first_filter_idx.68;
            filter_idx = jit_tls->resume_state.filter_idx;
            goto <D.26841>;
            <D.26837>:
            {
              struct StackFrameInfo frame;

              try
                {
                  unwind_res = mono_find_jit_info_ext (domain, jit_tls, 0B, ctx, &new_ctx, 0B, &lmf, 0B, &frame);
                  if (unwind_res != 0) goto <D.26842>; else goto <D.26843>;
                  <D.26842>:
                  D.26844 = frame.type;
                  D.26845 = D.26844 + 4294967295;
                  if (D.26845 <= 1) goto <D.26846>; else goto <D.26847>;
                  <D.26846>:
                  *ctx = new_ctx;
                  // predicted unlikely by continue predictor.
                  goto <D.25501>;
                  <D.26847>:
                  D.26844 = frame.type;
                  D.26848 = D.26844 != 0;
                  D.26849 = (long int) D.26848;
                  D.26850 = __builtin_expect (D.26849, 0);
                  if (D.26850 != 0) goto <D.26851>; else goto <D.26852>;
                  <D.26851>:
                  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1683, "frame.type == FRAME_TYPE_MANAGED");
                  <D.26852>:
                  ji.69 = frame.ji;
                  ji = ji.69;
                  <D.26843>:
                }
              finally
                {
                  frame = {CLOBBER};
                }
            }
            <D.26841>:
            if (unwind_res == 0) goto <D.26854>; else goto <D.26855>;
            <D.26854>:
            D.26856 = mono_get_lmf_addr ();
            lmf.70 = lmf;
            *D.26856 = lmf.70;
            D.26682 = jit_tls->abort_func;
            D.26682 (obj);
            monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 1692);
            <D.26855>:
            ji.64 = ji;
            method = jinfo_get_method (ji.64);
            frame_count = frame_count + 1;
            if (stack_overflow != 0) goto <D.26858>; else goto <D.26859>;
            <D.26858>:
            if (1 != 0) goto <D.26860>; else goto <D.26861>;
            <D.26860>:
            D.26862 = ctx->regs[13];
            D.26863 = initial_ctx.regs[13];
            D.26864 = D.26862 - D.26863;
            free_stack = (guint32) D.26864;
            goto <D.26865>;
            <D.26861>:
            D.26863 = initial_ctx.regs[13];
            D.26862 = ctx->regs[13];
            D.26866 = D.26863 - D.26862;
            free_stack = (guint32) D.26866;
            <D.26865>:
            goto <D.26867>;
            <D.26859>:
            free_stack = 16777215;
            <D.26867>:
            i = clause_index_start;
            goto <D.25510>;
            <D.25509>:
            {
              struct MonoJitExceptionInfo * ei;
              gboolean filtered;

              ji.64 = ji;
              ei = &ji.64->clauses[i];
              filtered = 0;
              if (free_stack <= 65536) goto <D.26868>; else goto <D.26869>;
              <D.26868>:
              // predicted unlikely by continue predictor.
              goto <D.25504>;
              <D.26869>:
              ji.64 = ji;
              D.26870 = ctx->pc;
              D.26871 = (void *) D.26870;
              D.26872 = is_address_protected (ji.64, ei, D.26871);
              if (D.26872 != 0) goto <D.26873>; else goto <D.26874>;
              <D.26873>:
              {
                struct MonoClass * catch_class;

                ji.64 = ji;
                catch_class = get_exception_catch_class (ei, ji.64, ctx);
                if (non_exception != 0B) goto <D.26877>; else goto <D.26875>;
                <D.26877>:
                D.26878 = wrap_non_exception_throws (method);
                if (D.26878 == 0) goto <D.26879>; else goto <D.26875>;
                <D.26879>:
                ex_obj = non_exception;
                goto <D.26876>;
                <D.26875>:
                ex_obj = obj;
                <D.26876>:
                D.26880 = ei->flags;
                if (D.26880 <= 1) goto <D.26881>; else goto <D.26882>;
                <D.26881>:
                ji.64 = ji;
                D.26883 = BIT_FIELD_REF <*ji.64, 8, 176>;
                D.26884 = D.26883 & 32;
                if (D.26884 != 0) goto <D.26885>; else goto <D.26886>;
                <D.26885>:
                ex_obj.71 = (int) ex_obj;
                ctx->regs[0] = ex_obj.71;
                goto <D.26888>;
                <D.26886>:
                D.26889 = ei->exvar_offset;
                D.26890 = (sizetype) D.26889;
                D.26891 = ctx->regs[11];
                D.26892 = (sizetype) D.26891;
                D.26893 = D.26890 + D.26892;
                D.26894 = (void * *) D.26893;
                *D.26894 = ex_obj;
                <D.26888>:
                <D.26882>:
                D.26880 = ei->flags;
                if (D.26880 == 1) goto <D.26895>; else goto <D.26896>;
                <D.26895>:
                first_filter_idx.72 = first_filter_idx;
                D.26898 = filter_idx == first_filter_idx.72;
                filtered = (gboolean) D.26898;
                filter_idx = filter_idx + 1;
                <D.26896>:
                D.26880 = ei->flags;
                if (D.26880 == 0) goto <D.26902>; else goto <D.26899>;
                <D.26902>:
                D.26903 = mono_object_isinst (ex_obj, catch_class);
                if (D.26903 != 0B) goto <D.26900>; else goto <D.26899>;
                <D.26899>:
                if (filtered != 0) goto <D.26900>; else goto <D.26901>;
                <D.26900>:
                D.26904 = jit_tls->handler_block_return_address;
                D.26905 = D.26904 != 0B;
                D.26906 = (long int) D.26905;
                D.26907 = __builtin_expect (D.26906, 0);
                if (D.26907 != 0) goto <D.26908>; else goto <D.26909>;
                <D.26908>:
                {
                  gboolean is_outside;
                  void * prot_bp;
                  void * catch_bp;

                  is_outside = 0;
                  D.26910 = jit_tls->handler_block_context.regs[11];
                  prot_bp = (void *) D.26910;
                  D.26891 = ctx->regs[11];
                  catch_bp = (void *) D.26891;
                  if (catch_bp > prot_bp) goto <D.26911>; else goto <D.26912>;
                  <D.26911>:
                  is_outside = 1;
                  goto <D.26913>;
                  <D.26912>:
                  if (catch_bp == prot_bp) goto <D.26914>; else goto <D.26915>;
                  <D.26914>:
                  D.26916 = jit_tls->handler_block_context.pc;
                  D.26917 = (char *) D.26916;
                  D.26918 = mini_jit_info_table_find (domain, D.26917, 0B);
                  ji.64 = ji;
                  D.26919 = D.26918 != ji.64;
                  D.26920 = (long int) D.26919;
                  D.26921 = __builtin_expect (D.26920, 0);
                  if (D.26921 != 0) goto <D.26922>; else goto <D.26923>;
                  <D.26922>:
                  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1778, "ji == mini_jit_info_table_find (domain, MONO_CONTEXT_GET_IP (&jit_tls->handler_block_context), NULL)");
                  <D.26923>:
                  ji.64 = ji;
                  D.26924 = jit_tls->handler_block;
                  D.26925 = ei->handler_start;
                  D.26926 = is_address_protected (ji.64, D.26924, D.26925);
                  if (D.26926 == 0) goto <D.26927>; else goto <D.26928>;
                  <D.26927>:
                  is_outside = 1;
                  <D.26928>:
                  <D.26915>:
                  <D.26913>:
                  if (is_outside != 0) goto <D.26929>; else goto <D.26930>;
                  <D.26929>:
                  jit_tls->handler_block_return_address = 0B;
                  jit_tls->handler_block = 0B;
                  mono_thread_resume_interruption ();
                  <D.26930>:
                }
                <D.26909>:
                D.26931 = mono_trace_is_enabled ();
                if (D.26931 != 0) goto <D.26932>; else goto <D.26933>;
                <D.26932>:
                D.26934 = mono_trace_eval (method);
                if (D.26934 != 0) goto <D.26935>; else goto <D.26936>;
                <D.26935>:
                D.26937 = mono_method_full_name (method, 1);
                monoeg_g_print ("EXCEPTION: catch found at clause %d of %s\n", i, D.26937);
                <D.26936>:
                <D.26933>:
                jit_tls->orig_ex_ctx_set = 1;
                D.26880 = ei->flags;
                D.26938 = (int) D.26880;
                mono_profiler_exception_clause_handler (method, D.26938, i);
                jit_tls->orig_ex_ctx_set = 0;
                D.26925 = ei->handler_start;
                D.26939 = (int) D.26925;
                ctx->pc = D.26939;
                D.26940 = mono_get_lmf_addr ();
                lmf.70 = lmf;
                *D.26940 = lmf.70;
                mono_perfcounters.73 = mono_perfcounters;
                mono_perfcounters.73 = mono_perfcounters;
                D.26942 = mono_perfcounters.73->exceptions_depth;
                frame_count.74 = (unsigned int) frame_count;
                D.26944 = D.26942 + frame_count.74;
                mono_perfcounters.73->exceptions_depth = D.26944;
                D.26561 = domain->stack_overflow_ex;
                if (D.26561 == obj) goto <D.26945>; else goto <D.26946>;
                <D.26945>:
                jit_tls->handling_stack_ovf = 0;
                <D.26946>:
                D.26947 = 0;
                return D.26947;
                <D.26901>:
                ji.64 = ji;
                D.26870 = ctx->pc;
                D.26871 = (void *) D.26870;
                D.26948 = is_address_protected (ji.64, ei, D.26871);
                if (D.26948 != 0) goto <D.26949>; else goto <D.26950>;
                <D.26949>:
                D.26880 = ei->flags;
                if (D.26880 == 4) goto <D.26951>; else goto <D.26952>;
                <D.26951>:
                D.26953 = mono_trace_is_enabled ();
                if (D.26953 != 0) goto <D.26954>; else goto <D.26955>;
                <D.26954>:
                D.26956 = mono_trace_eval (method);
                if (D.26956 != 0) goto <D.26957>; else goto <D.26958>;
                <D.26957>:
                D.26959 = mono_method_full_name (method, 1);
                monoeg_g_print ("EXCEPTION: fault clause %d of %s\n", i, D.26959);
                <D.26958>:
                <D.26955>:
                jit_tls->orig_ex_ctx_set = 1;
                D.26880 = ei->flags;
                D.26938 = (int) D.26880;
                mono_profiler_exception_clause_handler (method, D.26938, i);
                jit_tls->orig_ex_ctx_set = 0;
                call_filter.57 = call_filter;
                D.26925 = ei->handler_start;
                call_filter.57 (ctx, D.26925);
                <D.26952>:
                <D.26950>:
                ji.64 = ji;
                D.26870 = ctx->pc;
                D.26871 = (void *) D.26870;
                D.26960 = is_address_protected (ji.64, ei, D.26871);
                if (D.26960 != 0) goto <D.26961>; else goto <D.26962>;
                <D.26961>:
                D.26880 = ei->flags;
                if (D.26880 == 2) goto <D.26963>; else goto <D.26964>;
                <D.26963>:
                D.26965 = mono_trace_is_enabled ();
                if (D.26965 != 0) goto <D.26966>; else goto <D.26967>;
                <D.26966>:
                D.26968 = mono_trace_eval (method);
                if (D.26968 != 0) goto <D.26969>; else goto <D.26970>;
                <D.26969>:
                D.26971 = mono_method_full_name (method, 1);
                monoeg_g_print ("EXCEPTION: finally clause %d of %s\n", i, D.26971);
                <D.26970>:
                <D.26967>:
                jit_tls->orig_ex_ctx_set = 1;
                D.26880 = ei->flags;
                D.26938 = (int) D.26880;
                mono_profiler_exception_clause_handler (method, D.26938, i);
                jit_tls->orig_ex_ctx_set = 0;
                mono_perfcounters.73 = mono_perfcounters;
                D.26972 = mono_perfcounters.73->exceptions_finallys;
                D.26973 = D.26972 + 1;
                mono_perfcounters.73->exceptions_finallys = D.26973;
                D.26974 = mono_get_lmf_addr ();
                lmf.70 = lmf;
                *D.26974 = lmf.70;
                ji.64 = ji;
                D.26883 = BIT_FIELD_REF <*ji.64, 8, 176>;
                D.26884 = D.26883 & 32;
                if (D.26884 != 0) goto <D.26975>; else goto <D.26976>;
                <D.26975>:
                jit_tls->resume_state.ex_obj = obj;
                ji.64 = ji;
                jit_tls->resume_state.ji = ji.64;
                D.26977 = i + 1;
                jit_tls->resume_state.clause_index = D.26977;
                jit_tls->resume_state.ctx = *ctx;
                jit_tls->resume_state.new_ctx = new_ctx;
                lmf.70 = lmf;
                jit_tls->resume_state.lmf = lmf.70;
                first_filter_idx.72 = first_filter_idx;
                jit_tls->resume_state.first_filter_idx = first_filter_idx.72;
                jit_tls->resume_state.filter_idx = filter_idx;
                D.26925 = ei->handler_start;
                D.26939 = (int) D.26925;
                ctx->pc = D.26939;
                D.26947 = 0;
                return D.26947;
                <D.26976>:
                call_filter.57 = call_filter;
                D.26925 = ei->handler_start;
                call_filter.57 (ctx, D.26925);
                <D.26964>:
                <D.26962>:
              }
              <D.26874>:
            }
            <D.25504>:
            i = i + 1;
            <D.25510>:
            ji.64 = ji;
            D.26978 = ji.64->num_clauses;
            D.26979 = (int) D.26978;
            if (D.26979 > i) goto <D.25509>; else goto <D.25511>;
            <D.25511>:
            jit_tls->orig_ex_ctx_set = 1;
            mono_profiler_exception_method_leave (method);
            jit_tls->orig_ex_ctx_set = 0;
            *ctx = new_ctx;
          }
        finally
          {
            new_ctx = {CLOBBER};
          }
      }
      <D.25501>:
      goto <D.25512>;
      monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 1859);
    }
  finally
    {
      ji = {CLOBBER};
      prev_ji = {CLOBBER};
      lmf = {CLOBBER};
      initial_ctx = {CLOBBER};
      first_filter_idx = {CLOBBER};
    }
}


monoeg_strdup (const gchar * str)
{
  gchar * D.26989;

  if (str != 0B) goto <D.26987>; else goto <D.26988>;
  <D.26987>:
  D.26989 = __strdup (str);
  return D.26989;
  <D.26988>:
  D.26989 = 0B;
  return D.26989;
}


mono_handle_exception_internal_first_pass (struct MonoContext * ctx, void * obj, gint32 * out_filter_idx, struct MonoJitInfo * * out_ji, struct MonoJitInfo * * out_prev_ji, struct MonoObject * non_exception)
{
  unsigned int mono_jit_tls_id.75;
  struct MonoLMF * lmf.76;
  _Bool D.26993;
  long int D.26994;
  long int D.26995;
  struct MonoException * D.26998;
  struct MonoClass * D.27001;
  struct MonoObject * D.27002;
  int (*<T4735>) (struct MonoContext *, void *) call_filter.77;
  void * D.27009;
  int (*<T4735>) (struct MonoContext *, void *) call_filter.78;
  void * D.27011;
  _Bool D.27012;
  long int D.27013;
  long int D.27014;
  void (*<T3c6e>) (struct MonoObject *) D.27017;
  _Bool D.27018;
  long int D.27019;
  long int D.27020;
  <unnamed type> D.27033;
  unsigned int D.27034;
  _Bool D.27037;
  long int D.27038;
  long int D.27039;
  _Bool D.27044;
  _Bool D.27045;
  _Bool D.27046;
  struct MonoArray * * D.27049;
  struct MonoClass * D.27050;
  struct MonoArray * D.27051;
  struct MonoArray * * D.27052;
  struct MonoArray * D.27053;
  struct MonoString * * D.27056;
  struct MonoString * D.27057;
  gboolean D.27058;
  struct MonoDebugOptions * D.27059;
  int D.27060;
  unsigned char D.27063;
  unsigned char D.27064;
  char * D.27067;
  _Bool D.27072;
  _Bool D.27073;
  int D.27076;
  void * D.27077;
  void * D.27078;
  unsigned char D.27079;
  unsigned char D.27080;
  int D.27087;
  int D.27088;
  int D.27089;
  int D.27091;
  int D.27095;
  int D.27101;
  unsigned int D.27103;
  unsigned char D.27106;
  _Bool D.27107;
  _Bool D.27108;
  _Bool D.27109;
  struct MonoPerfCounters * mono_perfcounters.79;
  unsigned int D.27111;
  unsigned int D.27112;
  struct MonoArray * D.27117;
  struct MonoArray * D.27118;
  struct MonoString * D.27121;
  unsigned char D.27122;
  unsigned char D.27123;
  int ex_obj.80;
  int D.27128;
  sizetype D.27129;
  int D.27130;
  sizetype D.27131;
  sizetype D.27132;
  void * * D.27133;
  void * D.27134;
  _Bool D.27135;
  _Bool D.27136;
  _Bool D.27137;
  struct MonoArray * D.27148;
  struct MonoArray * D.27149;
  struct MonoString * D.27152;
  void * D.27153;
  int D.27154;
  struct MonoObject * D.27157;
  struct MonoArray * D.27162;
  struct MonoArray * D.27163;
  struct MonoString * D.27166;
  <unnamed-unsigned:15> D.27169;
  int D.27170;
  struct MonoDomain * domain;
  struct MonoJitInfo * ji;
  static int (*<T4735>) (struct MonoContext *, void *) call_filter = 0B;
  struct MonoJitTlsData * jit_tls;
  struct MonoLMF * lmf;
  struct MonoArray * initial_trace_ips;
  struct GList * trace_ips;
  struct MonoException * mono_ex;
  gboolean stack_overflow;
  struct MonoContext initial_ctx;
  struct MonoMethod * method;
  int frame_count;
  gboolean has_dynamic_methods;
  gint32 filter_idx;
  int i;
  struct MonoObject * ex_obj;

  try
    {
      domain = mono_domain_get ();
      ji = 0B;
      mono_jit_tls_id.75 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.75);
      lmf.76 = mono_get_lmf ();
      lmf = lmf.76;
      initial_trace_ips = 0B;
      trace_ips = 0B;
      stack_overflow = 0;
      frame_count = 0;
      has_dynamic_methods = 0;
      D.26993 = ctx == 0B;
      D.26994 = (long int) D.26993;
      D.26995 = __builtin_expect (D.26994, 0);
      if (D.26995 != 0) goto <D.26996>; else goto <D.26997>;
      <D.26996>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1316, "ctx != NULL");
      <D.26997>:
      D.26998 = domain->stack_overflow_ex;
      if (D.26998 == obj) goto <D.26999>; else goto <D.27000>;
      <D.26999>:
      stack_overflow = 1;
      <D.27000>:
      mono_ex = obj;
      initial_trace_ips = mono_ex->trace_ips;
      D.27001 = mono_defaults.exception_class;
      D.27002 = mono_object_isinst (obj, D.27001);
      if (D.27002 != 0B) goto <D.27003>; else goto <D.27004>;
      <D.27003>:
      mono_ex = obj;
      initial_trace_ips = mono_ex->trace_ips;
      goto <D.27005>;
      <D.27004>:
      mono_ex = 0B;
      <D.27005>:
      call_filter.77 = call_filter;
      if (call_filter.77 == 0B) goto <D.27007>; else goto <D.27008>;
      <D.27007>:
      D.27009 = mono_get_call_filter ();
      call_filter.78 = (int (*<T4735>) (struct MonoContext *, void *)) D.27009;
      call_filter = call_filter.78;
      <D.27008>:
      D.27011 = jit_tls->end_of_stack;
      D.27012 = D.27011 == 0B;
      D.27013 = (long int) D.27012;
      D.27014 = __builtin_expect (D.27013, 0);
      if (D.27014 != 0) goto <D.27015>; else goto <D.27016>;
      <D.27015>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1334, "jit_tls->end_of_stack");
      <D.27016>:
      D.27017 = jit_tls->abort_func;
      D.27018 = D.27017 == 0B;
      D.27019 = (long int) D.27018;
      D.27020 = __builtin_expect (D.27019, 0);
      if (D.27020 != 0) goto <D.27021>; else goto <D.27022>;
      <D.27021>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1335, "jit_tls->abort_func");
      <D.27022>:
      if (out_filter_idx != 0B) goto <D.27023>; else goto <D.27024>;
      <D.27023>:
      *out_filter_idx = -1;
      <D.27024>:
      if (out_ji != 0B) goto <D.27025>; else goto <D.27026>;
      <D.27025>:
      *out_ji = 0B;
      <D.27026>:
      if (out_prev_ji != 0B) goto <D.27027>; else goto <D.27028>;
      <D.27027>:
      *out_prev_ji = 0B;
      <D.27028>:
      filter_idx = 0;
      initial_ctx = *ctx;
      <D.25417>:
      {
        struct MonoContext new_ctx;
        guint32 free_stack;
        int clause_index_start;
        gboolean unwind_res;
        struct StackFrameInfo frame;

        try
          {
            clause_index_start = 0;
            unwind_res = 1;
            if (out_prev_ji != 0B) goto <D.27029>; else goto <D.27030>;
            <D.27029>:
            *out_prev_ji = ji;
            <D.27030>:
            unwind_res = mono_find_jit_info_ext (domain, jit_tls, 0B, ctx, &new_ctx, 0B, &lmf, 0B, &frame);
            if (unwind_res != 0) goto <D.27031>; else goto <D.27032>;
            <D.27031>:
            D.27033 = frame.type;
            D.27034 = D.27033 + 4294967295;
            if (D.27034 <= 1) goto <D.27035>; else goto <D.27036>;
            <D.27035>:
            *ctx = new_ctx;
            // predicted unlikely by continue predictor.
            goto <D.25407>;
            <D.27036>:
            D.27033 = frame.type;
            D.27037 = D.27033 != 0;
            D.27038 = (long int) D.27037;
            D.27039 = __builtin_expect (D.27038, 0);
            if (D.27039 != 0) goto <D.27040>; else goto <D.27041>;
            <D.27040>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1363, "frame.type == FRAME_TYPE_MANAGED");
            <D.27041>:
            ji = frame.ji;
            <D.27032>:
            if (unwind_res == 0) goto <D.27042>; else goto <D.27043>;
            <D.27042>:
            D.27044 = mono_ex != 0B;
            D.27045 = initial_trace_ips == 0B;
            D.27046 = D.27044 & D.27045;
            if (D.27046 != 0) goto <D.27047>; else goto <D.27048>;
            <D.27047>:
            trace_ips = monoeg_g_list_reverse (trace_ips);
            D.27049 = &mono_ex->trace_ips;
            D.27050 = mono_defaults.int_class;
            D.27051 = glist_to_array (trace_ips, D.27050);
            mono_gc_wbarrier_set_field (mono_ex, D.27049, D.27051);
            D.27052 = &mono_ex->native_trace_ips;
            D.27053 = build_native_trace ();
            mono_gc_wbarrier_set_field (mono_ex, D.27052, D.27053);
            if (has_dynamic_methods != 0) goto <D.27054>; else goto <D.27055>;
            <D.27054>:
            D.27056 = &mono_ex->stack_trace;
            D.27057 = ves_icall_System_Exception_get_trace (mono_ex);
            mono_gc_wbarrier_set_field (mono_ex, D.27056, D.27057);
            <D.27055>:
            <D.27048>:
            monoeg_g_list_free (trace_ips);
            trace_ips = 0B;
            D.27058 = 0;
            return D.27058;
            <D.27043>:
            frame_count = frame_count + 1;
            method = jinfo_get_method (ji);
            D.27059 = mini_get_debug_options ();
            D.27060 = D.27059->reverse_pinvoke_exceptions;
            if (D.27060 != 0) goto <D.27061>; else goto <D.27062>;
            <D.27061>:
            D.27063 = BIT_FIELD_REF <*method, 8, 160>;
            D.27064 = D.27063 & 124;
            if (D.27064 == 20) goto <D.27065>; else goto <D.27066>;
            <D.27065>:
            D.27067 = mono_method_full_name (method, 1);
            monoeg_g_log (0B, 4, "A native frame was found while unwinding the stack after an exception.\nThe native frame called the managed method:\n%s\n", D.27067);
            <D.25408>:
            goto <D.25408>;
            <D.27066>:
            <D.27062>:
            D.27063 = BIT_FIELD_REF <*method, 8, 160>;
            D.27064 = D.27063 & 124;
            if (D.27064 != 16) goto <D.27068>; else goto <D.27069>;
            <D.27068>:
            if (mono_ex != 0B) goto <D.27070>; else goto <D.27071>;
            <D.27070>:
            D.27045 = initial_trace_ips == 0B;
            D.27072 = frame_count <= 999;
            D.27073 = D.27045 & D.27072;
            if (D.27073 != 0) goto <D.27074>; else goto <D.27075>;
            <D.27074>:
            D.27076 = ctx->pc;
            D.27077 = (void *) D.27076;
            trace_ips = monoeg_g_list_prepend (trace_ips, D.27077);
            D.27078 = get_generic_info_from_stack_frame (ji, ctx);
            trace_ips = monoeg_g_list_prepend (trace_ips, D.27078);
            <D.27075>:
            <D.27071>:
            <D.27069>:
            D.27079 = BIT_FIELD_REF <*method, 8, 168>;
            D.27080 = D.27079 & 2;
            if (D.27080 != 0) goto <D.27081>; else goto <D.27082>;
            <D.27081>:
            has_dynamic_methods = 1;
            <D.27082>:
            if (stack_overflow != 0) goto <D.27083>; else goto <D.27084>;
            <D.27083>:
            if (1 != 0) goto <D.27085>; else goto <D.27086>;
            <D.27085>:
            D.27087 = ctx->regs[13];
            D.27088 = initial_ctx.regs[13];
            D.27089 = D.27087 - D.27088;
            free_stack = (guint32) D.27089;
            goto <D.27090>;
            <D.27086>:
            D.27088 = initial_ctx.regs[13];
            D.27087 = ctx->regs[13];
            D.27091 = D.27088 - D.27087;
            free_stack = (guint32) D.27091;
            <D.27090>:
            goto <D.27092>;
            <D.27084>:
            free_stack = 16777215;
            <D.27092>:
            i = clause_index_start;
            goto <D.25415>;
            <D.25414>:
            {
              struct MonoJitExceptionInfo * ei;
              gboolean filtered;

              ei = &ji->clauses[i];
              filtered = 0;
              if (free_stack <= 65536) goto <D.27093>; else goto <D.27094>;
              <D.27093>:
              // predicted unlikely by continue predictor.
              goto <D.25411>;
              <D.27094>:
              D.27076 = ctx->pc;
              D.27077 = (void *) D.27076;
              D.27095 = is_address_protected (ji, ei, D.27077);
              if (D.27095 != 0) goto <D.27096>; else goto <D.27097>;
              <D.27096>:
              {
                struct MonoClass * catch_class;

                catch_class = get_exception_catch_class (ei, ji, ctx);
                if (non_exception != 0B) goto <D.27100>; else goto <D.27098>;
                <D.27100>:
                D.27101 = wrap_non_exception_throws (method);
                if (D.27101 == 0) goto <D.27102>; else goto <D.27098>;
                <D.27102>:
                ex_obj = non_exception;
                goto <D.27099>;
                <D.27098>:
                ex_obj = obj;
                <D.27099>:
                D.27103 = ei->flags;
                if (D.27103 == 1) goto <D.27104>; else goto <D.27105>;
                <D.27104>:
                {
                  gboolean is_user_frame;

                  D.27063 = BIT_FIELD_REF <*method, 8, 160>;
                  D.27106 = D.27063 & 124;
                  D.27107 = D.27106 == 0;
                  D.27108 = D.27106 == 68;
                  D.27109 = D.27107 | D.27108;
                  is_user_frame = (gboolean) D.27109;
                  mono_perfcounters.79 = mono_perfcounters;
                  D.27111 = mono_perfcounters.79->exceptions_filters;
                  D.27112 = D.27111 + 1;
                  mono_perfcounters.79->exceptions_filters = D.27112;
                  if (is_user_frame != 0) goto <D.27113>; else goto <D.27114>;
                  <D.27113>:
                  D.27044 = mono_ex != 0B;
                  D.27045 = initial_trace_ips == 0B;
                  D.27046 = D.27044 & D.27045;
                  if (D.27046 != 0) goto <D.27115>; else goto <D.27116>;
                  <D.27115>:
                  trace_ips = monoeg_g_list_reverse (trace_ips);
                  D.27049 = &mono_ex->trace_ips;
                  D.27050 = mono_defaults.int_class;
                  D.27117 = glist_to_array (trace_ips, D.27050);
                  mono_gc_wbarrier_set_field (mono_ex, D.27049, D.27117);
                  D.27052 = &mono_ex->native_trace_ips;
                  D.27118 = build_native_trace ();
                  mono_gc_wbarrier_set_field (mono_ex, D.27052, D.27118);
                  if (has_dynamic_methods != 0) goto <D.27119>; else goto <D.27120>;
                  <D.27119>:
                  D.27056 = &mono_ex->stack_trace;
                  D.27121 = ves_icall_System_Exception_get_trace (mono_ex);
                  mono_gc_wbarrier_set_field (mono_ex, D.27056, D.27121);
                  <D.27120>:
                  <D.27116>:
                  monoeg_g_list_free (trace_ips);
                  trace_ips = 0B;
                  <D.27114>:
                  D.27122 = BIT_FIELD_REF <*ji, 8, 176>;
                  D.27123 = D.27122 & 32;
                  if (D.27123 != 0) goto <D.27124>; else goto <D.27125>;
                  <D.27124>:
                  ex_obj.80 = (int) ex_obj;
                  ctx->regs[0] = ex_obj.80;
                  goto <D.27127>;
                  <D.27125>:
                  D.27128 = ei->exvar_offset;
                  D.27129 = (sizetype) D.27128;
                  D.27130 = ctx->regs[11];
                  D.27131 = (sizetype) D.27130;
                  D.27132 = D.27129 + D.27131;
                  D.27133 = (void * *) D.27132;
                  *D.27133 = ex_obj;
                  <D.27127>:
                  mono_debugger_agent_begin_exception_filter (mono_ex, ctx, &initial_ctx);
                  call_filter.77 = call_filter;
                  D.27134 = ei->data.filter;
                  filtered = call_filter.77 (ctx, D.27134);
                  mono_debugger_agent_end_exception_filter (mono_ex, ctx, &initial_ctx);
                  D.27135 = filtered != 0;
                  D.27136 = out_filter_idx != 0B;
                  D.27137 = D.27135 & D.27136;
                  if (D.27137 != 0) goto <D.27138>; else goto <D.27139>;
                  <D.27138>:
                  *out_filter_idx = filter_idx;
                  <D.27139>:
                  if (out_ji != 0B) goto <D.27140>; else goto <D.27141>;
                  <D.27140>:
                  *out_ji = ji;
                  <D.27141>:
                  filter_idx = filter_idx + 1;
                  if (filtered != 0) goto <D.27142>; else goto <D.27143>;
                  <D.27142>:
                  if (is_user_frame == 0) goto <D.27144>; else goto <D.27145>;
                  <D.27144>:
                  D.27044 = mono_ex != 0B;
                  D.27045 = initial_trace_ips == 0B;
                  D.27046 = D.27044 & D.27045;
                  if (D.27046 != 0) goto <D.27146>; else goto <D.27147>;
                  <D.27146>:
                  trace_ips = monoeg_g_list_reverse (trace_ips);
                  D.27049 = &mono_ex->trace_ips;
                  D.27050 = mono_defaults.int_class;
                  D.27148 = glist_to_array (trace_ips, D.27050);
                  mono_gc_wbarrier_set_field (mono_ex, D.27049, D.27148);
                  D.27052 = &mono_ex->native_trace_ips;
                  D.27149 = build_native_trace ();
                  mono_gc_wbarrier_set_field (mono_ex, D.27052, D.27149);
                  if (has_dynamic_methods != 0) goto <D.27150>; else goto <D.27151>;
                  <D.27150>:
                  D.27056 = &mono_ex->stack_trace;
                  D.27152 = ves_icall_System_Exception_get_trace (mono_ex);
                  mono_gc_wbarrier_set_field (mono_ex, D.27056, D.27152);
                  <D.27151>:
                  <D.27147>:
                  monoeg_g_list_free (trace_ips);
                  trace_ips = 0B;
                  <D.27145>:
                  D.27153 = ei->handler_start;
                  D.27154 = (int) D.27153;
                  ctx->pc = D.27154;
                  D.27058 = 1;
                  return D.27058;
                  <D.27143>:
                }
                <D.27105>:
                D.27103 = ei->flags;
                if (D.27103 == 0) goto <D.27155>; else goto <D.27156>;
                <D.27155>:
                D.27157 = mono_object_isinst (ex_obj, catch_class);
                if (D.27157 != 0B) goto <D.27158>; else goto <D.27159>;
                <D.27158>:
                D.27044 = mono_ex != 0B;
                D.27045 = initial_trace_ips == 0B;
                D.27046 = D.27044 & D.27045;
                if (D.27046 != 0) goto <D.27160>; else goto <D.27161>;
                <D.27160>:
                trace_ips = monoeg_g_list_reverse (trace_ips);
                D.27049 = &mono_ex->trace_ips;
                D.27050 = mono_defaults.int_class;
                D.27162 = glist_to_array (trace_ips, D.27050);
                mono_gc_wbarrier_set_field (mono_ex, D.27049, D.27162);
                D.27052 = &mono_ex->native_trace_ips;
                D.27163 = build_native_trace ();
                mono_gc_wbarrier_set_field (mono_ex, D.27052, D.27163);
                if (has_dynamic_methods != 0) goto <D.27164>; else goto <D.27165>;
                <D.27164>:
                D.27056 = &mono_ex->stack_trace;
                D.27166 = ves_icall_System_Exception_get_trace (mono_ex);
                mono_gc_wbarrier_set_field (mono_ex, D.27056, D.27166);
                <D.27165>:
                <D.27161>:
                monoeg_g_list_free (trace_ips);
                trace_ips = 0B;
                if (out_ji != 0B) goto <D.27167>; else goto <D.27168>;
                <D.27167>:
                *out_ji = ji;
                <D.27168>:
                D.27153 = ei->handler_start;
                D.27154 = (int) D.27153;
                ctx->pc = D.27154;
                D.27058 = 1;
                return D.27058;
                <D.27159>:
                <D.27156>:
              }
              <D.27097>:
            }
            <D.25411>:
            i = i + 1;
            <D.25415>:
            D.27169 = ji->num_clauses;
            D.27170 = (int) D.27169;
            if (D.27170 > i) goto <D.25414>; else goto <D.25416>;
            <D.25416>:
            *ctx = new_ctx;
          }
        finally
          {
            new_ctx = {CLOBBER};
            frame = {CLOBBER};
          }
      }
      <D.25407>:
      goto <D.25417>;
      monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 1490);
    }
  finally
    {
      lmf = {CLOBBER};
      initial_ctx = {CLOBBER};
    }
}


glist_to_array (struct GList * list, struct MonoClass * eclass)
{
  struct MonoArray * D.27178;
  unsigned int D.27179;
  unsigned int len.81;
  unsigned int i.82;
  void * D.27182;
  struct MonoDomain * domain;
  struct MonoArray * res;
  int len;
  int i;

  domain = mono_domain_get ();
  if (list == 0B) goto <D.27176>; else goto <D.27177>;
  <D.27176>:
  D.27178 = 0B;
  return D.27178;
  <D.27177>:
  D.27179 = monoeg_g_list_length (list);
  len = (int) D.27179;
  len.81 = (unsigned int) len;
  res = mono_array_new (domain, eclass, len.81);
  i = 0;
  goto <D.25309>;
  <D.25308>:
  {
    void * * __p;

    i.82 = (unsigned int) i;
    __p = mono_array_addr_with_size (res, 4, i.82);
    D.27182 = list->data;
    *__p = D.27182;
  }
  list = list->next;
  i = i + 1;
  <D.25309>:
  if (list != 0B) goto <D.25308>; else goto <D.25310>;
  <D.25310>:
  D.27178 = res;
  return D.27178;
}


build_native_trace ()
{
  struct MonoArray * D.27186;
  struct MonoDomain * D.27187;
  struct MonoClass * D.27188;
  unsigned int size.83;
  unsigned int i.84;
  void * D.27191;
  struct MonoArray * res;
  void * native_trace[128];
  int size;
  int i;

  try
    {
      size = backtrace (&native_trace, 128);
      if (size == 0) goto <D.27184>; else goto <D.27185>;
      <D.27184>:
      D.27186 = 0B;
      return D.27186;
      <D.27185>:
      D.27187 = mono_domain_get ();
      D.27188 = mono_defaults.int_class;
      size.83 = (unsigned int) size;
      res = mono_array_new (D.27187, D.27188, size.83);
      i = 0;
      goto <D.25374>;
      <D.25373>:
      {
        void * * __p;

        i.84 = (unsigned int) i;
        __p = mono_array_addr_with_size (res, 4, i.84);
        D.27191 = native_trace[i];
        *__p = D.27191;
      }
      i = i + 1;
      <D.25374>:
      if (i < size) goto <D.25373>; else goto <D.25375>;
      <D.25375>:
      D.27186 = res;
      return D.27186;
    }
  finally
    {
      native_trace = {CLOBBER};
    }
}


fprintf (struct FILE * restrict __stream, const char * restrict __fmt)
{
  int D.27194;

  D.27194 = __fprintf_chk (__stream, 1, __fmt, __builtin_va_arg_pack ());
  return D.27194;
}


get_exception_catch_class (struct MonoJitExceptionInfo * ei, struct MonoJitInfo * ji, struct MonoContext * ctx)
{
  unsigned int D.27199;
  struct MonoClass * D.27200;
  unsigned char D.27203;
  unsigned char D.27204;
  struct MonoGenericJitInfo * D.27206;
  unsigned char D.27207;
  unsigned char D.27208;
  void * D.27209;
  struct MonoType * D.27210;
  struct MonoClass * catch_class;
  struct MonoType * inflated_type;
  struct MonoGenericContext context;

  try
    {
      catch_class = ei->data.catch_class;
      if (catch_class == 0B) goto <D.27196>; else goto <D.27198>;
      <D.27198>:
      D.27199 = ei->flags;
      if (D.27199 != 0) goto <D.27196>; else goto <D.27197>;
      <D.27196>:
      D.27200 = 0B;
      return D.27200;
      <D.27197>:
      D.27203 = BIT_FIELD_REF <*ji, 8, 176>;
      D.27204 = D.27203 & 2;
      if (D.27204 == 0) goto <D.27201>; else goto <D.27205>;
      <D.27205>:
      D.27206 = mono_jit_info_get_generic_jit_info (ji);
      D.27207 = BIT_FIELD_REF <*D.27206, 8, 136>;
      D.27208 = D.27207 & 1;
      if (D.27208 == 0) goto <D.27201>; else goto <D.27202>;
      <D.27201>:
      D.27200 = catch_class;
      return D.27200;
      <D.27202>:
      D.27209 = get_generic_info_from_stack_frame (ji, ctx);
      context = get_generic_context_from_stack_frame (ji, D.27209);
      D.27210 = &catch_class->byval_arg;
      inflated_type = mono_class_inflate_generic_type (D.27210, &context);
      catch_class = mono_class_from_mono_type (inflated_type);
      mono_metadata_free_type (inflated_type);
      D.27200 = catch_class;
      return D.27200;
    }
  finally
    {
      context = {CLOBBER};
    }
}


wrap_non_exception_throws (struct MonoMethod * m)
{
  struct MonoClass * D.27213;
  struct MonoImage * D.27214;
  _Bool D.27215;
  long int D.27216;
  long int D.27217;
  unsigned char D.27220;
  gboolean D.27223;
  unsigned char D.27224;
  struct MonoClass * klass.87;
  struct MonoClass * tmp_klass.85;
  struct MonoImage * D.27230;
  struct MonoClass * tmp_klass.86;
  _Bool D.27232;
  long int D.27233;
  long int D.27234;
  struct MonoMethod * D.27241;
  struct MonoClass * D.27243;
  struct MonoClass * klass.88;
  unsigned int D.27245;
  const mono_byte * p.89;
  const gchar * p.90;
  short unsigned int D.27248;
  _Bool D.27249;
  long int D.27250;
  long int D.27251;
  const gchar * p.91;
  short unsigned int D.27255;
  char D.27258;
  const gchar * p.92;
  unsigned int D.27262;
  int D.27263;
  unsigned int D.27264;
  unsigned int name_len.93;
  sizetype name_len.94;
  char * D.27267;
  const gchar * p.95;
  int D.25361;
  int iftmp.96;
  int D.25360;
  const char[23] * D.27272;
  unsigned char D.27273;
  int D.27274;
  unsigned char D.27275;
  int D.27276;
  _Bool D.27277;
  _Bool D.27278;
  _Bool D.27279;
  const unsigned char * D.27282;
  unsigned char D.27283;
  int D.27284;
  const unsigned char * D.27285;
  unsigned char D.27286;
  int D.27287;
  _Bool D.27288;
  _Bool D.27289;
  const unsigned char * D.27292;
  unsigned char D.27293;
  int D.27294;
  const unsigned char * D.27295;
  unsigned char D.27296;
  int D.27297;
  _Bool D.27298;
  _Bool D.27299;
  const unsigned char * D.27302;
  unsigned char D.27303;
  int D.27304;
  const unsigned char * D.27305;
  unsigned char D.27306;
  int D.27307;
  _Bool D.27309;
  long int D.27310;
  long int D.27311;
  int D.27314;
  unsigned char D.27315;
  struct MonoAssembly * ass;
  struct MonoCustomAttrInfo * attrs;
  static struct MonoClass * klass;
  int i;
  gboolean val;

  D.27213 = m->klass;
  D.27214 = D.27213->image;
  ass = D.27214->assembly;
  val = 0;
  D.27215 = ass == 0B;
  D.27216 = (long int) D.27215;
  D.27217 = __builtin_expect (D.27216, 0);
  if (D.27217 != 0) goto <D.27218>; else goto <D.27219>;
  <D.27218>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1196, "ass");
  <D.27219>:
  D.27220 = ass->wrap_non_exception_throws_inited;
  if (D.27220 != 0) goto <D.27221>; else goto <D.27222>;
  <D.27221>:
  D.27224 = ass->wrap_non_exception_throws;
  D.27223 = (gboolean) D.27224;
  return D.27223;
  <D.27222>:
  {
    static struct MonoClass * tmp_klass;

    {
      tmp_klass.85 = tmp_klass;
      if (tmp_klass.85 == 0B) goto <D.27226>; else goto <D.27227>;
      <D.27226>:
      if (0 != 0) goto <D.27228>; else goto <D.27229>;
      <D.27228>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1200, "mono_defaults.corlib == mono_defaults.corlib");
      <D.27229>:
      D.27230 = mono_defaults.corlib;
      tmp_klass.86 = mono_class_from_name (D.27230, "System.Runtime.CompilerServices", "RuntimeCompatibilityAttribute");
      tmp_klass = tmp_klass.86;
      tmp_klass.85 = tmp_klass;
      D.27232 = tmp_klass.85 == 0B;
      D.27233 = (long int) D.27232;
      D.27234 = __builtin_expect (D.27233, 0);
      if (D.27234 != 0) goto <D.27235>; else goto <D.27236>;
      <D.27235>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1200, "tmp_klass");
      <D.27236>:
      <D.27227>:
    }
    klass.87 = tmp_klass;
  }
  klass = klass.87;
  attrs = mono_custom_attrs_from_assembly (ass);
  if (attrs != 0B) goto <D.27237>; else goto <D.27238>;
  <D.27237>:
  i = 0;
  goto <D.25363>;
  <D.25362>:
  {
    struct MonoCustomAttrEntry * attr;
    const gchar * p;
    int len;
    int num_named;
    int named_type;
    int data_type;
    int name_len;
    char * name;

    try
      {
        attr = &attrs->attrs[i];
        D.27241 = attr->ctor;
        if (D.27241 == 0B) goto <D.27239>; else goto <D.27242>;
        <D.27242>:
        D.27241 = attr->ctor;
        D.27243 = D.27241->klass;
        klass.88 = klass;
        if (D.27243 != klass.88) goto <D.27239>; else goto <D.27240>;
        <D.27239>:
        // predicted unlikely by continue predictor.
        goto <D.25352>;
        <D.27240>:
        D.27245 = attr->data_size;
        len = (int) D.27245;
        p.89 = attr->data;
        p = p.89;
        p.90 = p;
        D.27248 = mono_read16 (p.90);
        D.27249 = D.27248 != 1;
        D.27250 = (long int) D.27249;
        D.27251 = __builtin_expect (D.27250, 0);
        if (D.27251 != 0) goto <D.27252>; else goto <D.27253>;
        <D.27252>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1215, "read16 (p) == 0x0001");
        <D.27253>:
        p.90 = p;
        p.91 = p.90 + 2;
        p = p.91;
        p.90 = p;
        D.27255 = mono_read16 (p.90);
        num_named = (int) D.27255;
        if (num_named != 1) goto <D.27256>; else goto <D.27257>;
        <D.27256>:
        // predicted unlikely by continue predictor.
        goto <D.25352>;
        <D.27257>:
        p.90 = p;
        p.91 = p.90 + 2;
        p = p.91;
        p.90 = p;
        D.27258 = *p.90;
        named_type = (int) D.27258;
        p.90 = p;
        p.92 = p.90 + 1;
        p = p.92;
        p.90 = p;
        D.27258 = *p.90;
        data_type = (int) D.27258;
        p.90 = p;
        p.92 = p.90 + 1;
        p = p.92;
        if (named_type != 84) goto <D.27260>; else goto <D.27261>;
        <D.27260>:
        // predicted unlikely by continue predictor.
        goto <D.25352>;
        <D.27261>:
        p.90 = p;
        D.27262 = mono_metadata_decode_blob_size (p.90, &p);
        name_len = (int) D.27262;
        D.27263 = name_len + 1;
        D.27264 = (unsigned int) D.27263;
        name = monoeg_malloc (D.27264);
        p.90 = p;
        name_len.93 = (unsigned int) name_len;
        memcpy (name, p.90, name_len.93);
        name_len.94 = (sizetype) name_len;
        D.27267 = name + name_len.94;
        *D.27267 = 0;
        p.90 = p;
        name_len.94 = (sizetype) name_len;
        p.95 = p.90 + name_len.94;
        p = p.95;
        {
          size_t __s1_len;
          size_t __s2_len;

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

            __s2 = name;
            D.27272 = "WrapNonExceptionThrows";
            D.27273 = MEM[(const unsigned char *)D.27272];
            D.27274 = (int) D.27273;
            D.27275 = *__s2;
            D.27276 = (int) D.27275;
            __result = D.27274 - D.27276;
            {
              D.27277 = __s2_len != 0;
              D.27278 = __result == 0;
              D.27279 = D.27277 & D.27278;
              if (D.27279 != 0) goto <D.27280>; else goto <D.27281>;
              <D.27280>:
              D.27282 = &MEM[(void *)"WrapNonExceptionThrows" + 1B];
              D.27283 = *D.27282;
              D.27284 = (int) D.27283;
              D.27285 = __s2 + 1;
              D.27286 = *D.27285;
              D.27287 = (int) D.27286;
              __result = D.27284 - D.27287;
              D.27288 = __s2_len > 1;
              D.27278 = __result == 0;
              D.27289 = D.27288 & D.27278;
              if (D.27289 != 0) goto <D.27290>; else goto <D.27291>;
              <D.27290>:
              D.27292 = &MEM[(void *)"WrapNonExceptionThrows" + 2B];
              D.27293 = *D.27292;
              D.27294 = (int) D.27293;
              D.27295 = __s2 + 2;
              D.27296 = *D.27295;
              D.27297 = (int) D.27296;
              __result = D.27294 - D.27297;
              D.27298 = __s2_len > 2;
              D.27278 = __result == 0;
              D.27299 = D.27298 & D.27278;
              if (D.27299 != 0) goto <D.27300>; else goto <D.27301>;
              <D.27300>:
              D.27302 = &MEM[(void *)"WrapNonExceptionThrows" + 3B];
              D.27303 = *D.27302;
              D.27304 = (int) D.27303;
              D.27305 = __s2 + 3;
              D.27306 = *D.27305;
              D.27307 = (int) D.27306;
              __result = D.27304 - D.27307;
              <D.27301>:
              <D.27291>:
              <D.27281>:
            }
            D.25360 = __result;
          }
          iftmp.96 = -D.25360;
          goto <D.27308>;
          <D.27271>:
          iftmp.96 = __builtin_strcmp (name, "WrapNonExceptionThrows");
          <D.27308>:
          D.25361 = iftmp.96;
        }
        D.27309 = D.25361 != 0;
        D.27310 = (long int) D.27309;
        D.27311 = __builtin_expect (D.27310, 0);
        if (D.27311 != 0) goto <D.27312>; else goto <D.27313>;
        <D.27312>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1233, "!strcmp (name, \"WrapNonExceptionThrows\")");
        <D.27313>:
        monoeg_g_free (name);
        p.90 = p;
        D.27258 = *p.90;
        val = (gboolean) D.27258;
      }
    finally
      {
        p = {CLOBBER};
      }
  }
  <D.25352>:
  i = i + 1;
  <D.25363>:
  D.27314 = attrs->num_attrs;
  if (D.27314 > i) goto <D.25362>; else goto <D.25364>;
  <D.25364>:
  mono_custom_attrs_free (attrs);
  <D.27238>:
  D.27315 = (unsigned char) val;
  ass->wrap_non_exception_throws = D.27315;
  mono_memory_barrier ();
  ass->wrap_non_exception_throws_inited = 1;
  D.27223 = val;
  return D.27223;
}


mono_setup_altstack (struct MonoJitTlsData * tls)
{

}


mono_free_altstack (struct MonoJitTlsData * tls)
{

}


mono_altstack_restore_prot (mgreg_t * regs, guint8 * code, void * * tramp_data, guint8 * tramp)
{
  void * D.27319;
  void (*<Tf21>) (void) func;

  func = (void (*<Tf21>) (void)) tramp_data;
  func ();
  D.27319 = 0B;
  return D.27319;
}


mono_handle_soft_stack_ovf (struct MonoJitTlsData * jit_tls, struct MonoJitInfo * ji, void * ctx, guint8 * fault_addr)
{
  unsigned int D.27321;
  void * D.27324;
  guint8 * D.27327;
  int D.27330;
  unsigned int D.27331;
  int D.27332;
  unsigned int D.27333;
  guint8 * D.27335;
  sizetype D.27336;
  void * D.27337;
  struct _IO_FILE * stderr.97;
  void * D.27341;
  unsigned int D.27342;
  void * restore_stack_protection_tramp.98;
  gboolean D.27347;

  D.27321 = jit_tls->stack_ovf_guard_size;
  if (D.27321 != 0) goto <D.27322>; else goto <D.27323>;
  <D.27322>:
  D.27324 = jit_tls->stack_ovf_guard_base;
  if (D.27324 <= fault_addr) goto <D.27325>; else goto <D.27326>;
  <D.27325>:
  D.27324 = jit_tls->stack_ovf_guard_base;
  D.27321 = jit_tls->stack_ovf_guard_size;
  D.27327 = D.27324 + D.27321;
  if (D.27327 > fault_addr) goto <D.27328>; else goto <D.27329>;
  <D.27328>:
  {
    guint32 guard_size;
    gboolean handled;

    handled = 0;
    D.27321 = jit_tls->stack_ovf_guard_size;
    D.27330 = mono_pagesize ();
    D.27331 = (unsigned int) D.27330;
    guard_size = D.27321 - D.27331;
    goto <D.25575>;
    <D.25574>:
    D.27332 = mono_pagesize ();
    D.27333 = (unsigned int) D.27332;
    guard_size = guard_size - D.27333;
    <D.25575>:
    if (guard_size != 0) goto <D.27334>; else goto <D.25576>;
    <D.27334>:
    D.27324 = jit_tls->stack_ovf_guard_base;
    D.27335 = D.27324 + guard_size;
    if (D.27335 > fault_addr) goto <D.25574>; else goto <D.25576>;
    <D.25576>:
    D.27321 = jit_tls->stack_ovf_guard_size;
    guard_size = D.27321 - guard_size;
    D.27324 = jit_tls->stack_ovf_guard_base;
    D.27321 = jit_tls->stack_ovf_guard_size;
    D.27336 = D.27321 - guard_size;
    D.27337 = D.27324 + D.27336;
    mono_mprotect (D.27337, guard_size, 3);
    if (handled == 0) goto <D.27338>; else goto <D.27339>;
    <D.27338>:
    stderr.97 = stderr;
    D.27341 = mono_arch_ip_from_context (ctx);
    fprintf (stderr.97, "Stack overflow in unmanaged: IP: %p, fault addr: %p\n", D.27341, fault_addr);
    D.27342 = jit_tls->handling_stack_ovf;
    if (D.27342 == 0) goto <D.27343>; else goto <D.27344>;
    <D.27343>:
    restore_stack_protection_tramp.98 = restore_stack_protection_tramp;
    jit_tls->restore_stack_prot = restore_stack_protection_tramp.98;
    jit_tls->handling_stack_ovf = 1;
    goto <D.27346>;
    <D.27344>:
    <D.27346>:
    <D.27339>:
    D.27347 = 1;
    return D.27347;
  }
  <D.27329>:
  <D.27326>:
  <D.27323>:
  D.27347 = 0;
  return D.27347;
}


mono_handle_hard_stack_ovf (struct MonoJitTlsData * jit_tls, struct MonoJitInfo * ji, void * ctx, guint8 * fault_addr)
{
  struct _IO_FILE * stderr.99;
  void * D.27350;
  struct PrintOverflowUserData ud;
  struct MonoContext mctx;

  try
    {
      stderr.99 = stderr;
      D.27350 = mono_arch_ip_from_context (ctx);
      fprintf (stderr.99, "Stack overflow: IP: %p, fault addr: %p\n", D.27350, fault_addr);
      mono_arch_sigctx_to_monoctx (ctx, &mctx);
      stderr.99 = stderr;
      fprintf (stderr.99, "Stacktrace:\n");
      memset (&ud, 0, 8);
      mono_walk_stack_with_ctx (print_overflow_stack_frame, &mctx, 2, &ud);
      _exit (1);
    }
  finally
    {
      ud = {CLOBBER};
      mctx = {CLOBBER};
    }
}


print_overflow_stack_frame (struct StackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  struct MonoJitInfo * D.27351;
  int D.27356;
  int D.27359;
  gboolean D.27360;
  struct MonoMethod * D.27361;
  int D.27364;
  unsigned int D.27365;
  struct MonoDomain * D.27366;
  struct _IO_FILE * stderr.100;
  struct MonoMethod * method;
  struct PrintOverflowUserData * user_data;
  gchar * location;

  method = 0B;
  user_data = data;
  D.27351 = frame->ji;
  if (D.27351 != 0B) goto <D.27352>; else goto <D.27353>;
  <D.27352>:
  D.27351 = frame->ji;
  method = jinfo_get_method (D.27351);
  <D.27353>:
  if (method != 0B) goto <D.27354>; else goto <D.27355>;
  <D.27354>:
  D.27356 = user_data->count;
  if (D.27356 == 0) goto <D.27357>; else goto <D.27358>;
  <D.27357>:
  D.27356 = user_data->count;
  D.27359 = D.27356 + 1;
  user_data->count = D.27359;
  D.27360 = 0;
  return D.27360;
  <D.27358>:
  D.27361 = user_data->omethod;
  if (D.27361 == method) goto <D.27362>; else goto <D.27363>;
  <D.27362>:
  D.27360 = 0;
  return D.27360;
  <D.27363>:
  D.27364 = frame->native_offset;
  D.27365 = (unsigned int) D.27364;
  D.27366 = mono_domain_get ();
  location = mono_debug_print_stack_frame (method, D.27365, D.27366);
  stderr.100 = stderr;
  fprintf (stderr.100, "  %s\n", location);
  monoeg_g_free (location);
  D.27356 = user_data->count;
  if (D.27356 == 1) goto <D.27368>; else goto <D.27369>;
  <D.27368>:
  stderr.100 = stderr;
  fprintf (stderr.100, "  <...>\n");
  user_data->omethod = method;
  goto <D.27370>;
  <D.27369>:
  user_data->omethod = 0B;
  <D.27370>:
  D.27356 = user_data->count;
  D.27359 = D.27356 + 1;
  user_data->count = D.27359;
  goto <D.27371>;
  <D.27355>:
  stderr.100 = stderr;
  D.27364 = frame->native_offset;
  fprintf (stderr.100, "  at <unknown> <0x%05x>\n", D.27364);
  <D.27371>:
  D.27360 = 0;
  return D.27360;
}


mono_handle_native_sigsegv (int signal, void * ctx)
{
  unsigned int mono_jit_tls_id.101;
  const char * iftmp.102;
  int handling_sigsegv.103;
  struct MonoDebugOptions * D.27381;
  int D.27382;
  struct _IO_FILE * stderr.104;
  struct MonoInternalThread * D.27388;
  unsigned int i.105;
  unsigned int D.27392;
  char * * D.27393;
  char * D.27394;
  struct MonoDebugOptions * D.27395;
  int D.27396;
  int D.27401;
  _Bool D.27402;
  long int D.27403;
  long int D.27404;
  struct sigaction sa;
  struct MonoJitTlsData * jit_tls;
  const char * signal_str;

  try
    {
      mono_jit_tls_id.101 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.101);
      if (signal == 11) goto <D.27375>; else goto <D.27376>;
      <D.27375>:
      iftmp.102 = "SIGSEGV";
      goto <D.27377>;
      <D.27376>:
      iftmp.102 = "SIGABRT";
      <D.27377>:
      signal_str = iftmp.102;
      handling_sigsegv.103 = handling_sigsegv;
      if (handling_sigsegv.103 != 0) goto <D.27379>; else goto <D.27380>;
      <D.27379>:
      return;
      <D.27380>:
      D.27381 = mini_get_debug_options ();
      D.27382 = D.27381->suspend_on_sigsegv;
      if (D.27382 != 0) goto <D.27383>; else goto <D.27384>;
      <D.27383>:
      stderr.104 = stderr;
      fprintf (stderr.104, "Received SIGSEGV, suspending...\n");
      <D.25620>:
      sleep (0);
      goto <D.25620>;
      <D.27384>:
      handling_sigsegv = 1;
      if (jit_tls != 0B) goto <D.27386>; else goto <D.27387>;
      <D.27386>:
      D.27388 = mono_thread_internal_current ();
      if (D.27388 != 0B) goto <D.27389>; else goto <D.27390>;
      <D.27389>:
      stderr.104 = stderr;
      fprintf (stderr.104, "Stacktrace:\n\n");
      mono_walk_stack (print_stack_frame_to_stderr, 1, 0B);
      <D.27390>:
      <D.27387>:
      {
        void * array[256];
        char * * names;
        int i;
        int size;

        try
          {
            stderr.104 = stderr;
            fprintf (stderr.104, "\nNative stacktrace:\n\n");
            size = backtrace (&array, 256);
            names = backtrace_symbols (&array, size);
            i = 0;
            goto <D.25626>;
            <D.25625>:
            stderr.104 = stderr;
            i.105 = (unsigned int) i;
            D.27392 = i.105 * 4;
            D.27393 = names + D.27392;
            D.27394 = *D.27393;
            fprintf (stderr.104, "\t%s\n", D.27394);
            i = i + 1;
            <D.25626>:
            if (i < size) goto <D.25625>; else goto <D.25627>;
            <D.25627>:
            free (names);
            D.27395 = mini_get_debug_options ();
            D.27396 = D.27395->no_gdb_backtrace;
            if (D.27396 == 0) goto <D.27397>; else goto <D.27398>;
            <D.27397>:
            {
              pid_t pid;
              int status;
              pid_t crashed_pid;

              try
                {
                  crashed_pid = getpid ();
                  pid = mono_runtime_syscall_fork ();
                  if (pid == 0) goto <D.27399>; else goto <D.27400>;
                  <D.27399>:
                  dup2 (2, 1);
                  mono_gdb_render_native_backtraces (crashed_pid);
                  exit (1);
                  <D.27400>:
                  stderr.104 = stderr;
                  fprintf (stderr.104, "\nDebug info from gdb:\n\n");
                  waitpid (pid, &status, 0);
                }
              finally
                {
                  status = {CLOBBER};
                }
            }
            <D.27398>:
          }
        finally
          {
            array = {CLOBBER};
          }
      }
      stderr.104 = stderr;
      fprintf (stderr.104, "\n=================================================================\nGot a %s while executing native code. This usually indicates\na fatal error in the mono runtime or one of the native libraries \nused by your application.\n=================================================================\n\n", signal_str);
      sa.__sigaction_handler.sa_handler = 0B;
      sigemptyset (&sa.sa_mask);
      sa.sa_flags = 0;
      D.27401 = sigaction (6, &sa, 0B);
      D.27402 = D.27401 == -1;
      D.27403 = (long int) D.27402;
      D.27404 = __builtin_expect (D.27403, 0);
      if (D.27404 != 0) goto <D.27405>; else goto <D.27406>;
      <D.27405>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 2327, "sigaction (SIGABRT, &sa, NULL) != -1");
      <D.27406>:
      abort ();
    }
  finally
    {
      sa = {CLOBBER};
    }
}


print_stack_frame_to_stderr (struct StackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  struct MonoJitInfo * D.27409;
  int D.27414;
  unsigned int D.27415;
  struct MonoDomain * D.27416;
  struct _IO_FILE * stderr.106;
  gboolean D.27419;
  struct MonoMethod * method;

  method = 0B;
  D.27409 = frame->ji;
  if (D.27409 != 0B) goto <D.27410>; else goto <D.27411>;
  <D.27410>:
  D.27409 = frame->ji;
  method = jinfo_get_method (D.27409);
  <D.27411>:
  if (method != 0B) goto <D.27412>; else goto <D.27413>;
  <D.27412>:
  {
    gchar * location;

    D.27414 = frame->native_offset;
    D.27415 = (unsigned int) D.27414;
    D.27416 = mono_domain_get ();
    location = mono_debug_print_stack_frame (method, D.27415, D.27416);
    stderr.106 = stderr;
    fprintf (stderr.106, "  %s\n", location);
    monoeg_g_free (location);
  }
  goto <D.27418>;
  <D.27413>:
  stderr.106 = stderr;
  D.27414 = frame->native_offset;
  fprintf (stderr.106, "  at <unknown> <0x%05x>\n", D.27414);
  <D.27418>:
  D.27419 = 0;
  return D.27419;
}


mono_print_thread_dump (void * sigctx)
{
  mono_print_thread_dump_internal (sigctx, 0B);
}


mono_print_thread_dump_internal (void * sigctx, struct MonoContext * start_ctx)
{
  gunichar2 * D.27421;
  unsigned int D.27424;
  long int D.27425;
  struct GError * error.107;
  _Bool D.27427;
  long int D.27428;
  long int D.27429;
  unsigned char D.27433;
  long long unsigned int D.27437;
  unsigned int D.27438;
  void * D.27439;
  void * D.27445;
  int D.27446;
  void * D.27447;
  int D.27448;
  int mono_print_thread_dump.108;
  struct _IO_FILE * stdout.109;
  char * D.27452;
  struct MonoInternalThread * thread;
  struct MonoContext ctx;
  struct GString * text;
  char * name;
  char * wapi_desc;
  struct GError * error;

  try
    {
      thread = mono_thread_internal_current ();
      text = monoeg_g_string_new (0B);
      error = 0B;
      D.27421 = thread->name;
      if (D.27421 != 0B) goto <D.27422>; else goto <D.27423>;
      <D.27422>:
      D.27421 = thread->name;
      D.27424 = thread->name_len;
      D.27425 = (long int) D.27424;
      name = monoeg_g_utf16_to_utf8 (D.27421, D.27425, 0B, 0B, &error);
      error.107 = error;
      D.27427 = error.107 != 0B;
      D.27428 = (long int) D.27427;
      D.27429 = __builtin_expect (D.27428, 0);
      if (D.27429 != 0) goto <D.27430>; else goto <D.27431>;
      <D.27430>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 2352, "!error");
      <D.27431>:
      monoeg_g_string_append_printf (text, "\n\"%s\"", name);
      monoeg_g_free (name);
      goto <D.27432>;
      <D.27423>:
      D.27433 = thread->threadpool_thread;
      if (D.27433 != 0) goto <D.27434>; else goto <D.27435>;
      <D.27434>:
      monoeg_g_string_append (text, "\n\"<threadpool thread>\"");
      goto <D.27436>;
      <D.27435>:
      monoeg_g_string_append (text, "\n\"<unnamed thread>\"");
      <D.27436>:
      <D.27432>:
      wapi_desc = wapi_current_thread_desc ();
      D.27437 = thread->tid;
      D.27438 = (unsigned int) D.27437;
      D.27439 = (void *) D.27438;
      monoeg_g_string_append_printf (text, " tid=0x%p this=0x%p %s\n", D.27439, thread, wapi_desc);
      free (wapi_desc);
      if (start_ctx != 0B) goto <D.27440>; else goto <D.27441>;
      <D.27440>:
      memcpy (&ctx, start_ctx, 208);
      goto <D.27442>;
      <D.27441>:
      if (sigctx == 0B) goto <D.27443>; else goto <D.27444>;
      <D.27443>:
      D.27445 = __builtin_frame_address (0);
      D.27446 = (int) D.27445;
      ctx.regs[11] = D.27446;
      D.27447 = __builtin_frame_address (0);
      D.27448 = (int) D.27447;
      ctx.regs[13] = D.27448;
      mono_print_thread_dump.108 = (int) mono_print_thread_dump;
      ctx.pc = mono_print_thread_dump.108;
      goto <D.27450>;
      <D.27444>:
      mono_arch_sigctx_to_monoctx (sigctx, &ctx);
      <D.27450>:
      <D.27442>:
      mono_walk_stack_with_ctx (print_stack_frame_to_string, &ctx, 3, text);
      stdout.109 = stdout;
      D.27452 = text->str;
      fprintf (stdout.109, "%s\n", D.27452);
      monoeg_g_string_free (text, 1);
      stdout.109 = stdout;
      fflush (stdout.109);
    }
  finally
    {
      ctx = {CLOBBER};
      error = {CLOBBER};
    }
}


print_stack_frame_to_string (struct StackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  struct MonoJitInfo * D.27453;
  int D.27458;
  unsigned int D.27459;
  struct MonoDomain * D.27460;
  gboolean D.27462;
  struct GString * p;
  struct MonoMethod * method;

  p = data;
  method = 0B;
  D.27453 = frame->ji;
  if (D.27453 != 0B) goto <D.27454>; else goto <D.27455>;
  <D.27454>:
  D.27453 = frame->ji;
  method = jinfo_get_method (D.27453);
  <D.27455>:
  if (method != 0B) goto <D.27456>; else goto <D.27457>;
  <D.27456>:
  {
    gchar * location;

    D.27458 = frame->native_offset;
    D.27459 = (unsigned int) D.27458;
    D.27460 = mono_domain_get ();
    location = mono_debug_print_stack_frame (method, D.27459, D.27460);
    monoeg_g_string_append_printf (p, "  %s\n", location);
    monoeg_g_free (location);
  }
  goto <D.27461>;
  <D.27457>:
  D.27458 = frame->native_offset;
  monoeg_g_string_append_printf (p, "  at <unknown> <0x%05x>\n", D.27458);
  <D.27461>:
  D.27462 = 0;
  return D.27462;
}


mono_print_thread_dump_from_ctx (struct MonoContext * ctx)
{
  mono_print_thread_dump_internal (0B, ctx);
}


mono_resume_unwind (struct MonoContext * ctx)
{
  unsigned int mono_jit_tls_id.110;
  int D.27465;
  int D.27466;
  void * D.27467;
  struct MonoJitTlsData * jit_tls;
  struct MonoContext new_ctx;

  try
    {
      mono_jit_tls_id.110 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.110);
      D.27465 = jit_tls->resume_state.ctx.pc;
      ctx->pc = D.27465;
      D.27466 = jit_tls->resume_state.ctx.regs[13];
      ctx->regs[13] = D.27466;
      new_ctx = *ctx;
      D.27467 = jit_tls->resume_state.ex_obj;
      mono_handle_exception_internal (&new_ctx, D.27467, 1, 0B);
      mono_restore_context (&new_ctx);
    }
  finally
    {
      new_ctx = {CLOBBER};
    }
}


mono_install_handler_block_guard (struct MonoThreadUnwindState * ctx)
{
  gboolean D.27468;

  D.27468 = 0;
  return D.27468;
}


mono_set_cast_details (struct MonoClass * from, struct MonoClass * to)
{
  struct MonoDebugOptions * D.27470;
  int D.27471;
  unsigned int mono_jit_tls_id.111;
  struct MonoJitTlsData * jit_tls;

  jit_tls = 0B;
  D.27470 = mini_get_debug_options ();
  D.27471 = D.27470->better_cast_details;
  if (D.27471 != 0) goto <D.27472>; else goto <D.27473>;
  <D.27472>:
  mono_jit_tls_id.111 = mono_jit_tls_id;
  jit_tls = pthread_getspecific (mono_jit_tls_id.111);
  jit_tls->class_cast_from = from;
  jit_tls->class_cast_to = to;
  <D.27473>:
}


mono_thread_state_init_from_sigctx (struct MonoThreadUnwindState * ctx, void * sigctx)
{
  void * D.27478;
  gboolean D.27479;
  struct MonoContext * D.27482;
  struct MonoDomain * D.27484;
  struct MonoLMF * D.27485;
  struct MonoInternalThread * thread;

  thread = mono_thread_internal_current ();
  if (thread == 0B) goto <D.27475>; else goto <D.27477>;
  <D.27477>:
  D.27478 = thread->jit_data;
  if (D.27478 == 0B) goto <D.27475>; else goto <D.27476>;
  <D.27475>:
  ctx->valid = 0;
  D.27479 = 0;
  return D.27479;
  <D.27476>:
  if (sigctx != 0B) goto <D.27480>; else goto <D.27481>;
  <D.27480>:
  D.27482 = &ctx->ctx;
  mono_arch_sigctx_to_monoctx (sigctx, D.27482);
  goto <D.27483>;
  <D.27481>:
  monoeg_g_log (0B, 4, "Use a null sigctx requires a working mono-context");
  <D.25665>:
  goto <D.25665>;
  <D.27483>:
  D.27484 = mono_domain_get ();
  ctx->unwind_data[0] = D.27484;
  D.27485 = mono_get_lmf ();
  ctx->unwind_data[1] = D.27485;
  D.27478 = thread->jit_data;
  ctx->unwind_data[2] = D.27478;
  ctx->valid = 1;
  D.27479 = 1;
  return D.27479;
}


mono_thread_state_init_from_monoctx (struct MonoThreadUnwindState * ctx, struct MonoContext * mctx)
{
  void * D.27490;
  gboolean D.27491;
  struct MonoDomain * D.27492;
  struct MonoLMF * D.27493;
  struct MonoInternalThread * thread;

  thread = mono_thread_internal_current ();
  if (thread == 0B) goto <D.27487>; else goto <D.27489>;
  <D.27489>:
  D.27490 = thread->jit_data;
  if (D.27490 == 0B) goto <D.27487>; else goto <D.27488>;
  <D.27487>:
  ctx->valid = 0;
  D.27491 = 0;
  return D.27491;
  <D.27488>:
  ctx->ctx = *mctx;
  D.27492 = mono_domain_get ();
  ctx->unwind_data[0] = D.27492;
  D.27493 = mono_get_lmf ();
  ctx->unwind_data[1] = D.27493;
  D.27490 = thread->jit_data;
  ctx->unwind_data[2] = D.27490;
  ctx->valid = 1;
  D.27491 = 1;
  return D.27491;
}


mono_thread_state_init_from_current (struct MonoThreadUnwindState * ctx)
{
  void * D.27498;
  gboolean D.27499;
  void * D.27500;
  int D.27501;
  void * D.27502;
  int D.27503;
  int mono_thread_state_init_from_current.112;
  struct MonoDomain * D.27505;
  struct MonoLMF * D.27506;
  struct MonoInternalThread * thread;

  thread = mono_thread_internal_current ();
  mono_arch_flush_register_windows ();
  if (thread == 0B) goto <D.27495>; else goto <D.27497>;
  <D.27497>:
  D.27498 = thread->jit_data;
  if (D.27498 == 0B) goto <D.27495>; else goto <D.27496>;
  <D.27495>:
  ctx->valid = 0;
  D.27499 = 0;
  return D.27499;
  <D.27496>:
  D.27500 = __builtin_frame_address (0);
  D.27501 = (int) D.27500;
  ctx->ctx.regs[11] = D.27501;
  D.27502 = __builtin_frame_address (0);
  D.27503 = (int) D.27502;
  ctx->ctx.regs[13] = D.27503;
  mono_thread_state_init_from_current.112 = (int) mono_thread_state_init_from_current;
  ctx->ctx.pc = mono_thread_state_init_from_current.112;
  D.27505 = mono_domain_get ();
  ctx->unwind_data[0] = D.27505;
  D.27506 = mono_get_lmf ();
  ctx->unwind_data[1] = D.27506;
  D.27498 = thread->jit_data;
  ctx->unwind_data[2] = D.27498;
  ctx->valid = 1;
  D.27499 = 1;
  return D.27499;
}


mono_setup_async_callback (struct MonoContext * ctx, void (*<Tc1>) (void *) async_cb, void * user_data)
{
  unsigned int mono_jit_tls_id.113;
  struct MonoJitTlsData * jit_tls;

  mono_jit_tls_id.113 = mono_jit_tls_id;
  jit_tls = pthread_getspecific (mono_jit_tls_id.113);
  jit_tls->ex_ctx = *ctx;
  mono_arch_setup_async_callback (ctx, async_cb, user_data);
}


mono_install_unhandled_exception_hook (void (*MonoUnhandledExceptionFunc) (struct MonoObject *, void *) func, void * user_data)
{
  unhandled_exception_hook = func;
  unhandled_exception_hook_data = user_data;
}


mono_invoke_unhandled_exception_hook (struct MonoObject * exc)
{
  void (*<T434f>) (struct MonoObject *, void *) unhandled_exception_hook.114;
  void * unhandled_exception_hook_data.115;
  struct MonoObject * other.116;
  struct _IO_FILE * stderr.117;
  int D.27522;

  unhandled_exception_hook.114 = unhandled_exception_hook;
  if (unhandled_exception_hook.114 != 0B) goto <D.27510>; else goto <D.27511>;
  <D.27510>:
  unhandled_exception_hook.114 = unhandled_exception_hook;
  unhandled_exception_hook_data.115 = unhandled_exception_hook_data;
  unhandled_exception_hook.114 (exc, unhandled_exception_hook_data.115);
  goto <D.27513>;
  <D.27511>:
  {
    struct MonoObject * other;
    struct MonoString * str;
    char * msg;

    try
      {
        other = 0B;
        str = mono_object_to_string (exc, &other);
        msg = 0B;
        if (str != 0B) goto <D.27514>; else goto <D.27515>;
        <D.27514>:
        msg = mono_string_to_utf8 (str);
        goto <D.27516>;
        <D.27515>:
        other.116 = other;
        if (other.116 != 0B) goto <D.27518>; else goto <D.27519>;
        <D.27518>:
        {
          char * original_backtrace;
          char * nested_backtrace;

          original_backtrace = mono_exception_get_managed_backtrace (exc);
          other.116 = other;
          nested_backtrace = mono_exception_get_managed_backtrace (other.116);
          msg = monoeg_g_strdup_printf ("Nested exception detected.\nOriginal Exception: %s\nNested exception:%s\n", original_backtrace, nested_backtrace);
          monoeg_g_free (original_backtrace);
          monoeg_g_free (nested_backtrace);
        }
        goto <D.27520>;
        <D.27519>:
        msg = monoeg_strdup ("Nested exception trying to figure out what went wrong");
        <D.27520>:
        <D.27516>:
        stderr.117 = stderr;
        fprintf (stderr.117, "[ERROR] FATAL UNHANDLED EXCEPTION: %s\n", msg);
        monoeg_g_free (msg);
        D.27522 = mono_environment_exitcode_get ();
        exit (D.27522);
      }
    finally
      {
        other = {CLOBBER};
      }
  }
  <D.27513>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 2693);
}


mono_restore_context (struct MonoContext * ctx)
{
  void (*<T4857>) (struct MonoContext *) restore_context.118;
  void * D.27526;
  void (*<T4857>) (struct MonoContext *) restore_context.119;
  static void (*<T4857>) (struct MonoContext *) restore_context;

  restore_context.118 = restore_context;
  if (restore_context.118 == 0B) goto <D.27524>; else goto <D.27525>;
  <D.27524>:
  D.27526 = mono_get_restore_context ();
  restore_context.119 = (void (*<T4857>) (struct MonoContext *)) D.27526;
  restore_context = restore_context.119;
  <D.27525>:
  restore_context.118 = restore_context;
  restore_context.118 (ctx);
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 2709);
}


