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;
  struct MonoDomain * D.23218;
  void * try_more_restore_tramp.10;
  struct MonoDomain * D.23220;
  void * restore_stack_protection_tramp.11;
  void * D.23222;
  void (*<T255d>) (struct MonoException *) D.23223;
  struct MonoRuntimeExceptionHandlingCallbacks cbs;

  try
    {
      mono_aot_only.0 = mono_aot_only;
      if (mono_aot_only.0 != 0) goto <D.23206>; else goto <D.23207>;
      <D.23206>:
      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.23212>;
      <D.23207>:
      {
        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.23212>:
      D.23218 = mono_domain_get ();
      try_more_restore_tramp.10 = mono_create_specific_trampoline (try_more_restore, 8, D.23218, 0B);
      try_more_restore_tramp = try_more_restore_tramp.10;
      D.23220 = mono_domain_get ();
      restore_stack_protection_tramp.11 = mono_create_specific_trampoline (restore_stack_protection, 8, D.23220, 0B);
      restore_stack_protection_tramp = restore_stack_protection_tramp.11;
      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.23222 = mono_get_throw_exception ();
      D.23223 = (void (*<T255d>) (struct MonoException *)) D.23222;
      cbs.mono_raise_exception = D.23223;
      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.12;
  int D.23229;

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

    mono_jit_tls_id.12 = mono_jit_tls_id;
    jit_tls = pthread_getspecific (mono_jit_tls_id.12);
    if (jit_tls != 0B) goto <D.23227>; else goto <D.23228>;
    <D.23227>:
    D.23229 = jit_tls->orig_ex_ctx_set;
    if (D.23229 != 0) goto <D.23230>; else goto <D.23231>;
    <D.23230>:
    start_ctx = &jit_tls->orig_ex_ctx;
    <D.23231>:
    <D.23228>:
  }
  <D.23225>:
  mono_walk_stack_with_ctx (func, start_ctx, unwind_options, user_data);
}


restore_stack_protection ()
{
  unsigned int mono_jit_tls_id.13;
  struct MonoDomain * D.23233;
  int D.23234;
  void * try_more_restore_tramp.14;
  struct MonoJitTlsData * jit_tls;
  struct MonoException * ex;

  mono_jit_tls_id.13 = mono_jit_tls_id;
  jit_tls = pthread_getspecific (mono_jit_tls_id.13);
  D.23233 = mono_domain_get ();
  ex = D.23233->stack_overflow_ex;
  D.23234 = try_restore_stack_protection (jit_tls, 4096);
  if (D.23234 != 0) goto <D.23235>; else goto <D.23236>;
  <D.23235>:
  jit_tls->restore_stack_prot = 0B;
  goto <D.23237>;
  <D.23236>:
  try_more_restore_tramp.14 = try_more_restore_tramp;
  jit_tls->restore_stack_prot = try_more_restore_tramp.14;
  <D.23237>:
  ex->trace_ips = 0B;
  ex->stack_trace = 0B;
  mono_raise_exception (ex);
}


try_restore_stack_protection (struct MonoJitTlsData * jit_tls, int extra_bytes)
{
  unsigned int D.23239;
  int unprotect_size.15;
  int D.23241;
  int unprotect_size.16;
  int unprotect_size.17;
  void * D.23245;
  sizetype unprotect_size.18;
  char * D.23247;
  sizetype extra_bytes.19;
  sizetype D.23249;
  char * D.23250;
  unsigned int unprotect_size.20;
  gboolean D.23254;
  unsigned int unprotect_size.21;
  _Bool D.23256;
  gint32 unprotect_size;

  try
    {
      D.23239 = jit_tls->stack_ovf_guard_size;
      unprotect_size.15 = (int) D.23239;
      unprotect_size = unprotect_size.15;
      goto <D.23016>;
      <D.23015>:
      D.23241 = mono_pagesize ();
      unprotect_size.16 = unprotect_size;
      unprotect_size.17 = unprotect_size.16 - D.23241;
      unprotect_size = unprotect_size.17;
      <D.23016>:
      unprotect_size.16 = unprotect_size;
      if (unprotect_size.16 >= 0) goto <D.23244>; else goto <D.23017>;
      <D.23244>:
      D.23245 = jit_tls->stack_ovf_guard_base;
      unprotect_size.16 = unprotect_size;
      unprotect_size.18 = (sizetype) unprotect_size.16;
      D.23247 = D.23245 + unprotect_size.18;
      extra_bytes.19 = (sizetype) extra_bytes;
      D.23249 = -extra_bytes.19;
      D.23250 = &unprotect_size + D.23249;
      if (D.23247 > D.23250) goto <D.23015>; else goto <D.23017>;
      <D.23017>:
      unprotect_size.16 = unprotect_size;
      if (unprotect_size.16 != 0) goto <D.23251>; else goto <D.23252>;
      <D.23251>:
      unprotect_size.16 = unprotect_size;
      unprotect_size.20 = (unsigned int) unprotect_size.16;
      D.23245 = jit_tls->stack_ovf_guard_base;
      mono_mprotect (D.23245, unprotect_size.20, 0);
      <D.23252>:
      unprotect_size.16 = unprotect_size;
      unprotect_size.21 = (unsigned int) unprotect_size.16;
      D.23239 = jit_tls->stack_ovf_guard_size;
      D.23256 = unprotect_size.21 == D.23239;
      D.23254 = (gboolean) D.23256;
      return D.23254;
    }
  finally
    {
      unprotect_size = {CLOBBER};
    }
}


try_more_restore ()
{
  unsigned int mono_jit_tls_id.22;
  int D.23260;
  struct MonoJitTlsData * jit_tls;

  mono_jit_tls_id.22 = mono_jit_tls_id;
  jit_tls = pthread_getspecific (mono_jit_tls_id.22);
  D.23260 = try_restore_stack_protection (jit_tls, 500);
  if (D.23260 != 0) goto <D.23261>; else goto <D.23262>;
  <D.23261>:
  jit_tls->restore_stack_prot = 0B;
  <D.23262>:
}


mono_get_throw_exception ()
{
  void * throw_exception_func.23;
  _Bool D.23264;
  long int D.23265;
  long int D.23266;
  void * D.23269;

  throw_exception_func.23 = throw_exception_func;
  D.23264 = throw_exception_func.23 == 0B;
  D.23265 = (long int) D.23264;
  D.23266 = __builtin_expect (D.23265, 0);
  if (D.23266 != 0) goto <D.23267>; else goto <D.23268>;
  <D.23267>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 117, "throw_exception_func");
  <D.23268>:
  D.23269 = throw_exception_func;
  return D.23269;
}


mono_get_rethrow_exception ()
{
  void * rethrow_exception_func.24;
  _Bool D.23272;
  long int D.23273;
  long int D.23274;
  void * D.23277;

  rethrow_exception_func.24 = rethrow_exception_func;
  D.23272 = rethrow_exception_func.24 == 0B;
  D.23273 = (long int) D.23272;
  D.23274 = __builtin_expect (D.23273, 0);
  if (D.23274 != 0) goto <D.23275>; else goto <D.23276>;
  <D.23275>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 124, "rethrow_exception_func");
  <D.23276>:
  D.23277 = rethrow_exception_func;
  return D.23277;
}


mono_get_call_filter ()
{
  void * call_filter_func.25;
  _Bool D.23280;
  long int D.23281;
  long int D.23282;
  void * D.23285;

  call_filter_func.25 = call_filter_func;
  D.23280 = call_filter_func.25 == 0B;
  D.23281 = (long int) D.23280;
  D.23282 = __builtin_expect (D.23281, 0);
  if (D.23282 != 0) goto <D.23283>; else goto <D.23284>;
  <D.23283>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 131, "call_filter_func");
  <D.23284>:
  D.23285 = call_filter_func;
  return D.23285;
}


mono_get_restore_context ()
{
  void * restore_context_func.26;
  _Bool D.23288;
  long int D.23289;
  long int D.23290;
  void * D.23293;

  restore_context_func.26 = restore_context_func;
  D.23288 = restore_context_func.26 == 0B;
  D.23289 = (long int) D.23288;
  D.23290 = __builtin_expect (D.23289, 0);
  if (D.23290 != 0) goto <D.23291>; else goto <D.23292>;
  <D.23291>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 138, "restore_context_func");
  <D.23292>:
  D.23293 = restore_context_func;
  return D.23293;
}


mono_get_throw_corlib_exception ()
{
  void * throw_corlib_exception_func.27;
  void * D.23298;
  int mono_aot_only.28;
  struct MonoTrampInfo * info.29;
  void * code;
  struct MonoTrampInfo * info;

  try
    {
      code = 0B;
      throw_corlib_exception_func.27 = throw_corlib_exception_func;
      if (throw_corlib_exception_func.27 != 0B) goto <D.23296>; else goto <D.23297>;
      <D.23296>:
      D.23298 = throw_corlib_exception_func;
      return D.23298;
      <D.23297>:
      mono_aot_only.28 = mono_aot_only;
      if (mono_aot_only.28 != 0) goto <D.23300>; else goto <D.23301>;
      <D.23300>:
      code = mono_aot_get_trampoline ("throw_corlib_exception");
      goto <D.23302>;
      <D.23301>:
      code = mono_arch_get_throw_corlib_exception (&info, 0);
      info.29 = info;
      mono_tramp_info_register (info.29);
      <D.23302>:
      mono_memory_barrier ();
      throw_corlib_exception_func = code;
      D.23298 = throw_corlib_exception_func;
      return D.23298;
    }
  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.23306;
  struct MonoJitInfo * D.23315;
  int managed2.30;
  unsigned char D.23324;
  unsigned char D.23325;
  int D.23328;
  int D.23333;
  sizetype D.23334;
  const char * D.23335;
  int real_ip.31;
  int start.32;
  unsigned char D.23343;
  _Bool D.23344;
  _Bool D.23345;
  _Bool D.23346;
  unsigned int offset.33;
  char * D.23352;
  struct MonoMethod * D.23355;
  gchar * D.23356;
  gboolean managed2;
  void * ip;
  struct MonoJitInfo * ji;
  struct MonoMethod * method;

  try
    {
      D.23306 = ctx->eip;
      ip = (void *) D.23306;
      method = 0B;
      if (trace != 0B) goto <D.23307>; else goto <D.23308>;
      <D.23307>:
      *trace = 0B;
      <D.23308>:
      if (native_offset != 0B) goto <D.23309>; else goto <D.23310>;
      <D.23309>:
      *native_offset = -1;
      <D.23310>:
      if (managed != 0B) goto <D.23311>; else goto <D.23312>;
      <D.23311>:
      *managed = 0;
      <D.23312>:
      ji = find_jit_info (domain, jit_tls, res, prev_ji, ctx, new_ctx, lmf, &managed2);
      if (ji == 4294967295B) goto <D.23313>; else goto <D.23314>;
      <D.23313>:
      D.23315 = ji;
      return D.23315;
      <D.23314>:
      if (ji != 0B) goto <D.23316>; else goto <D.23317>;
      <D.23316>:
      method = jinfo_get_method (ji);
      <D.23317>:
      managed2.30 = managed2;
      if (managed2.30 != 0) goto <D.23318>; else goto <D.23322>;
      <D.23322>:
      if (ji != 0B) goto <D.23323>; else goto <D.23319>;
      <D.23323>:
      D.23324 = BIT_FIELD_REF <*method, 8, 160>;
      D.23325 = D.23324 & 124;
      if (D.23325 != 0) goto <D.23318>; else goto <D.23319>;
      <D.23318>:
      {
        const char * real_ip;
        const char * start;
        gint32 offset;

        start = ji->code_start;
        managed2.30 = managed2;
        if (managed2.30 == 0) goto <D.23326>; else goto <D.23327>;
        <D.23326>:
        D.23328 = new_ctx->eip;
        real_ip = (const char *) D.23328;
        goto <D.23329>;
        <D.23327>:
        real_ip = ip;
        <D.23329>:
        if (real_ip >= start) goto <D.23332>; else goto <D.23330>;
        <D.23332>:
        D.23333 = ji->code_size;
        D.23334 = (sizetype) D.23333;
        D.23335 = start + D.23334;
        if (D.23335 >= real_ip) goto <D.23336>; else goto <D.23330>;
        <D.23336>:
        real_ip.31 = (int) real_ip;
        start.32 = (int) start;
        offset = real_ip.31 - start.32;
        goto <D.23331>;
        <D.23330>:
        offset = -1;
        <D.23331>:
        if (native_offset != 0B) goto <D.23339>; else goto <D.23340>;
        <D.23339>:
        *native_offset = offset;
        <D.23340>:
        if (managed != 0B) goto <D.23341>; else goto <D.23342>;
        <D.23341>:
        D.23324 = BIT_FIELD_REF <*method, 8, 160>;
        D.23343 = D.23324 & 124;
        D.23344 = D.23343 == 0;
        D.23345 = D.23343 == 68;
        D.23346 = D.23344 | D.23345;
        if (D.23346 != 0) goto <D.23347>; else goto <D.23348>;
        <D.23347>:
        *managed = 1;
        <D.23348>:
        <D.23342>:
        if (trace != 0B) goto <D.23349>; else goto <D.23350>;
        <D.23349>:
        offset.33 = (unsigned int) offset;
        D.23352 = mono_debug_print_stack_frame (method, offset.33, domain);
        *trace = D.23352;
        <D.23350>:
      }
      goto <D.23320>;
      <D.23319>:
      if (trace != 0B) goto <D.23353>; else goto <D.23354>;
      <D.23353>:
      {
        char * fname;

        D.23355 = jinfo_get_method (res);
        fname = mono_method_full_name (D.23355, 1);
        D.23356 = monoeg_g_strdup_printf ("in (unmanaged) %s", fname);
        *trace = D.23356;
        monoeg_g_free (fname);
      }
      <D.23354>:
      <D.23320>:
      D.23315 = ji;
      return D.23315;
    }
  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.23359;
  void * D.23363;
  int D.23365;
  sizetype D.23366;
  guint8 * D.23367;
  struct MonoJitInfo * D.23373;
  <unnamed type> D.23374;
  struct MonoJitInfo * D.23377;
  struct MonoMethod * D.23380;
  struct StackFrameInfo frame;
  struct MonoJitInfo * ji;
  gboolean err;
  void * ip;

  try
    {
      D.23359 = ctx->eip;
      ip = (void *) D.23359;
      if (prev_ji != 0B) goto <D.23362>; else goto <D.23360>;
      <D.23362>:
      D.23363 = prev_ji->code_start;
      if (D.23363 < ip) goto <D.23364>; else goto <D.23360>;
      <D.23364>:
      D.23363 = prev_ji->code_start;
      D.23365 = prev_ji->code_size;
      D.23366 = (sizetype) D.23365;
      D.23367 = D.23363 + D.23366;
      if (D.23367 > ip) goto <D.23368>; else goto <D.23360>;
      <D.23368>:
      ji = prev_ji;
      goto <D.23361>;
      <D.23360>:
      ji = mini_jit_info_table_find (domain, ip, 0B);
      <D.23361>:
      if (managed != 0B) goto <D.23369>; else goto <D.23370>;
      <D.23369>:
      *managed = 0;
      <D.23370>:
      err = mono_arch_find_jit_info (domain, jit_tls, ji, ctx, new_ctx, lmf, 0B, &frame);
      if (err == 0) goto <D.23371>; else goto <D.23372>;
      <D.23371>:
      D.23373 = 4294967295B;
      return D.23373;
      <D.23372>:
      D.23374 = frame.type;
      switch (D.23374) <default: <D.22524>, case 0: <D.22520>, case 1: <D.22522>, case 2: <D.22521>>
      <D.22520>:
      if (managed != 0B) goto <D.23375>; else goto <D.23376>;
      <D.23375>:
      *managed = 1;
      <D.23376>:
      D.23373 = frame.ji;
      return D.23373;
      <D.22521>:
      D.23377 = frame.ji;
      if (D.23377 != 0B) goto <D.23378>; else goto <D.23379>;
      <D.23378>:
      D.23373 = frame.ji;
      return D.23373;
      <D.23379>:
      memset (res, 0, 28);
      D.23380 = frame.method;
      res->d.method = D.23380;
      D.23373 = res;
      return D.23373;
      <D.22522>:
      {
        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, 36);
            D.23373 = ji;
            return D.23373;
          }
        finally
          {
            tmp_ctx = {CLOBBER};
          }
      }
      <D.22524>:
      monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 246);
      D.23373 = 0B;
      return D.23373;
    }
  finally
    {
      frame = {CLOBBER};
    }
}


memset (void * __dest, int __ch, size_t __len)
{
  int D.23386;
  int D.23391;
  void * D.23393;
  unsigned int D.23394;

  D.23386 = __builtin_constant_p (__len);
  if (D.23386 != 0) goto <D.23387>; else goto <D.23388>;
  <D.23387>:
  if (__len == 0) goto <D.23389>; else goto <D.23390>;
  <D.23389>:
  D.23391 = __builtin_constant_p (__ch);
  if (D.23391 == 0) goto <D.23384>; else goto <D.23392>;
  <D.23392>:
  if (__ch != 0) goto <D.23384>; else goto <D.23385>;
  <D.23384>:
  __warn_memset_zero_len ();
  D.23393 = __dest;
  return D.23393;
  <D.23385>:
  <D.23390>:
  <D.23388>:
  D.23394 = __builtin_object_size (__dest, 0);
  D.23393 = __builtin___memset_chk (__dest, __ch, __len, D.23394);
  return D.23393;
}


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

  D.23397 = __builtin_object_size (__dest, 0);
  D.23396 = __builtin___memcpy_chk (__dest, __src, __len, D.23397);
  return D.23396;
}


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

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


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.23401;
  void * D.23407;
  int D.23409;
  sizetype D.23410;
  guint8 * D.23411;
  struct MonoDomain * target_domain.34;
  gboolean D.23420;
  struct MonoJitInfo * D.23421;
  unsigned char D.23424;
  unsigned char D.23425;
  <unnamed type> D.23428;
  unsigned char D.23433;
  unsigned char D.23434;
  _Bool D.23435;
  _Bool D.23436;
  _Bool D.23437;
  int D.23448;
  unsigned char D.23451;
  int D.23454;
  int D.23459;
  sizetype D.23460;
  const char * D.23461;
  int real_ip.35;
  int start.36;
  int D.23465;
  int D.23468;
  unsigned int D.23469;
  char * D.23470;
  struct MonoMethod * D.23473;
  gchar * D.23476;
  gboolean err;
  void * ip;
  struct MonoJitInfo * ji;
  struct MonoDomain * target_domain;
  struct MonoMethod * method;
  gboolean async;

  try
    {
      D.23401 = ctx->eip;
      ip = (void *) D.23401;
      target_domain = domain;
      method = 0B;
      async = mono_thread_info_is_async_context ();
      if (trace != 0B) goto <D.23402>; else goto <D.23403>;
      <D.23402>:
      *trace = 0B;
      <D.23403>:
      if (prev_ji != 0B) goto <D.23406>; else goto <D.23404>;
      <D.23406>:
      D.23407 = prev_ji->code_start;
      if (D.23407 < ip) goto <D.23408>; else goto <D.23404>;
      <D.23408>:
      D.23407 = prev_ji->code_start;
      D.23409 = prev_ji->code_size;
      D.23410 = (sizetype) D.23409;
      D.23411 = D.23407 + D.23410;
      if (D.23411 > ip) goto <D.23412>; else goto <D.23404>;
      <D.23412>:
      ji = prev_ji;
      goto <D.23405>;
      <D.23404>:
      ji = mini_jit_info_table_find (domain, ip, &target_domain);
      <D.23405>:
      target_domain.34 = target_domain;
      if (target_domain.34 == 0B) goto <D.23414>; else goto <D.23415>;
      <D.23414>:
      target_domain = domain;
      <D.23415>:
      if (save_locations != 0B) goto <D.23416>; else goto <D.23417>;
      <D.23416>:
      memset (save_locations, 0, 32);
      <D.23417>:
      target_domain.34 = target_domain;
      err = mono_arch_find_jit_info (target_domain.34, jit_tls, ji, ctx, new_ctx, lmf, save_locations, frame);
      if (err == 0) goto <D.23418>; else goto <D.23419>;
      <D.23418>:
      D.23420 = 0;
      return D.23420;
      <D.23419>:
      D.23421 = frame->ji;
      if (D.23421 != 0B) goto <D.23422>; else goto <D.23423>;
      <D.23422>:
      D.23421 = frame->ji;
      D.23424 = BIT_FIELD_REF <*D.23421, 8, 184>;
      D.23425 = D.23424 & 1;
      if (D.23425 == 0) goto <D.23426>; else goto <D.23427>;
      <D.23426>:
      D.23421 = frame->ji;
      method = jinfo_get_method (D.23421);
      <D.23427>:
      <D.23423>:
      D.23428 = frame->type;
      if (D.23428 == 0) goto <D.23429>; else goto <D.23430>;
      <D.23429>:
      if (method != 0B) goto <D.23431>; else goto <D.23432>;
      <D.23431>:
      D.23433 = BIT_FIELD_REF <*method, 8, 160>;
      D.23434 = D.23433 & 124;
      D.23435 = D.23434 == 0;
      D.23436 = D.23434 == 68;
      D.23437 = D.23435 | D.23436;
      if (D.23437 != 0) goto <D.23438>; else goto <D.23439>;
      <D.23438>:
      frame->managed = 1;
      <D.23439>:
      <D.23432>:
      <D.23430>:
      D.23428 = frame->type;
      if (D.23428 == 2) goto <D.23440>; else goto <D.23441>;
      <D.23440>:
      frame->ji = 0B;
      frame->method = 0B;
      <D.23441>:
      frame->native_offset = -1;
      target_domain.34 = target_domain;
      frame->domain = target_domain.34;
      frame->async_context = async;
      ji = frame->ji;
      D.23428 = frame->type;
      if (D.23428 == 0) goto <D.23442>; else goto <D.23443>;
      <D.23442>:
      frame->method = method;
      <D.23443>:
      if (ji != 0B) goto <D.23447>; else goto <D.23444>;
      <D.23447>:
      D.23448 = frame->managed;
      if (D.23448 != 0) goto <D.23445>; else goto <D.23449>;
      <D.23449>:
      if (method != 0B) goto <D.23450>; else goto <D.23444>;
      <D.23450>:
      D.23433 = BIT_FIELD_REF <*method, 8, 160>;
      D.23451 = D.23433 & 124;
      if (D.23451 != 0) goto <D.23445>; else goto <D.23444>;
      <D.23445>:
      {
        const char * real_ip;
        const char * start;

        start = ji->code_start;
        D.23448 = frame->managed;
        if (D.23448 == 0) goto <D.23452>; else goto <D.23453>;
        <D.23452>:
        D.23454 = new_ctx->eip;
        real_ip = (const char *) D.23454;
        goto <D.23455>;
        <D.23453>:
        real_ip = ip;
        <D.23455>:
        if (real_ip >= start) goto <D.23458>; else goto <D.23456>;
        <D.23458>:
        D.23459 = ji->code_size;
        D.23460 = (sizetype) D.23459;
        D.23461 = start + D.23460;
        if (D.23461 >= real_ip) goto <D.23462>; else goto <D.23456>;
        <D.23462>:
        real_ip.35 = (int) real_ip;
        start.36 = (int) start;
        D.23465 = real_ip.35 - start.36;
        frame->native_offset = D.23465;
        goto <D.23457>;
        <D.23456>:
        frame->native_offset = -1;
        <D.23457>:
        if (trace != 0B) goto <D.23466>; else goto <D.23467>;
        <D.23466>:
        D.23468 = frame->native_offset;
        D.23469 = (unsigned int) D.23468;
        D.23470 = mono_debug_print_stack_frame (method, D.23469, domain);
        *trace = D.23470;
        <D.23467>:
      }
      goto <D.23446>;
      <D.23444>:
      if (trace != 0B) goto <D.23471>; else goto <D.23472>;
      <D.23471>:
      D.23473 = frame->method;
      if (D.23473 != 0B) goto <D.23474>; else goto <D.23475>;
      <D.23474>:
      {
        char * fname;

        D.23473 = frame->method;
        fname = mono_method_full_name (D.23473, 1);
        D.23476 = monoeg_g_strdup_printf ("in (unmanaged) %s", fname);
        *trace = D.23476;
        monoeg_g_free (fname);
      }
      <D.23475>:
      <D.23472>:
      <D.23446>:
      D.23420 = 1;
      return D.23420;
    }
  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.23481;
  unsigned int D.23482;
  unsigned int D.23483;
  int D.23484;
  unsigned int D.23485;
  char * D.23486;
  int D.23487;
  unsigned int D.23488;
  char * D.23489;
  int D.23492;
  int ip.37;
  void * D.23497;
  int D.23498;
  int D.23499;
  unsigned int D.23500;
  int D.23501;
  _Bool D.23504;
  struct MonoDomain * domain;
  struct MonoArray * ta;
  int len;
  int i;

  domain = mono_domain_get ();
  ta = ex->trace_ips;
  if (ta == 0B) goto <D.23479>; else goto <D.23480>;
  <D.23479>:
  D.23481 = 0;
  return D.23481;
  <D.23480>:
  D.23482 = mono_array_length (ta);
  D.23483 = D.23482 >> 1;
  len = (int) D.23483;
  i = 0;
  goto <D.22612>;
  <D.22611>:
  {
    void * ip;
    void * generic_info;
    struct MonoJitInfo * ji;

    D.23484 = i * 2;
    D.23485 = (unsigned int) D.23484;
    D.23486 = mono_array_addr_with_size (ta, 4, D.23485);
    ip = MEM[(void * *)D.23486];
    D.23484 = i * 2;
    D.23487 = D.23484 + 1;
    D.23488 = (unsigned int) D.23487;
    D.23489 = mono_array_addr_with_size (ta, 4, D.23488);
    generic_info = MEM[(void * *)D.23489];
    ji = mono_jit_info_table_find (domain, ip);
    if (ji == 0B) goto <D.23490>; else goto <D.23491>;
    <D.23490>:
    D.23492 = func (0B, ip, 0, 0, user_data);
    if (D.23492 != 0) goto <D.23493>; else goto <D.23494>;
    <D.23493>:
    D.23481 = 1;
    return D.23481;
    <D.23494>:
    goto <D.23495>;
    <D.23491>:
    {
      struct MonoMethod * method;

      method = get_method_from_stack_frame (ji, generic_info);
      ip.37 = (int) ip;
      D.23497 = ji->code_start;
      D.23498 = (int) D.23497;
      D.23499 = ip.37 - D.23498;
      D.23500 = (unsigned int) D.23499;
      D.23497 = ji->code_start;
      D.23501 = func (method, D.23497, D.23500, 1, user_data);
      if (D.23501 != 0) goto <D.23502>; else goto <D.23503>;
      <D.23502>:
      D.23481 = 1;
      return D.23481;
      <D.23503>:
    }
    <D.23495>:
  }
  i = i + 1;
  <D.22612>:
  if (i < len) goto <D.22611>; else goto <D.22613>;
  <D.22613>:
  D.23504 = len > 0;
  D.23481 = (gboolean) D.23504;
  return D.23481;
}


get_method_from_stack_frame (struct MonoJitInfo * ji, void * generic_info)
{
  unsigned char D.23508;
  unsigned char D.23509;
  struct MonoGenericJitInfo * D.23511;
  unsigned char D.23512;
  unsigned char D.23513;
  struct MonoMethod * D.23514;
  struct MonoGenericContext context;
  struct MonoMethod * method;

  try
    {
      D.23508 = BIT_FIELD_REF <*ji, 8, 176>;
      D.23509 = D.23508 & 2;
      if (D.23509 == 0) goto <D.23506>; else goto <D.23510>;
      <D.23510>:
      D.23511 = mono_jit_info_get_generic_jit_info (ji);
      D.23512 = BIT_FIELD_REF <*D.23511, 8, 136>;
      D.23513 = D.23512 & 1;
      if (D.23513 == 0) goto <D.23506>; else goto <D.23507>;
      <D.23506>:
      D.23514 = jinfo_get_method (ji);
      return D.23514;
      <D.23507>:
      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.23514 = method;
      return D.23514;
    }
  finally
    {
      context = {CLOBBER};
    }
}


get_generic_context_from_stack_frame (struct MonoJitInfo * ji, void * generic_info)
{
  _Bool D.23518;
  long int D.23519;
  long int D.23520;
  unsigned char D.23523;
  unsigned char D.23524;
  _Bool D.23525;
  long int D.23526;
  long int D.23527;
  struct MonoGenericContext * D.23530;
  struct MonoGenericInst * D.23531;
  struct MonoVTable * D.23534;
  struct MonoGenericInst * D.23535;
  struct MonoGenericInst * D.23536;
  _Bool D.23537;
  long int D.23538;
  long int D.23539;
  short unsigned int D.23546;
  int D.23547;
  int D.23548;
  struct MonoClass * D.23550;
  unsigned char D.23551;
  unsigned char D.23552;
  struct MonoGenericClass * D.23553;
  _Bool D.23557;
  long int D.23558;
  long int D.23559;
  struct MonoGenericClass * D.23563;
  struct MonoClass * D.23565;
  struct MonoGenericContainer * D.23569;
  struct MonoGenericContext * D.23570;
  struct MonoGenericInst * D.23571;
  int D.23574;
  _Bool D.23575;
  long int D.23576;
  long int D.23577;
  int D.23581;
  _Bool D.23582;
  long int D.23583;
  long int D.23584;
  struct MonoGenericContext context;
  struct MonoClass * class;
  struct MonoClass * method_container_class;
  struct MonoMethod * method;

  try
    {
      context.class_inst = 0B;
      context.method_inst = 0B;
      D.23518 = generic_info == 0B;
      D.23519 = (long int) D.23518;
      D.23520 = __builtin_expect (D.23519, 0);
      if (D.23520 != 0) goto <D.23521>; else goto <D.23522>;
      <D.23521>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 489, "generic_info");
      <D.23522>:
      method = jinfo_get_method (ji);
      D.23523 = BIT_FIELD_REF <*method, 8, 168>;
      D.23524 = D.23523 & 16;
      D.23525 = D.23524 == 0;
      D.23526 = (long int) D.23525;
      D.23527 = __builtin_expect (D.23526, 0);
      if (D.23527 != 0) goto <D.23528>; else goto <D.23529>;
      <D.23528>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 492, "method->is_inflated");
      <D.23529>:
      D.23530 = mono_method_get_context (method);
      D.23531 = D.23530->method_inst;
      if (D.23531 != 0B) goto <D.23532>; else goto <D.23533>;
      <D.23532>:
      {
        struct MonoMethodRuntimeGenericContext * mrgctx;

        mrgctx = generic_info;
        D.23534 = mrgctx->class_vtable;
        class = D.23534->klass;
        D.23535 = mrgctx->method_inst;
        context.method_inst = D.23535;
        D.23536 = context.method_inst;
        D.23537 = D.23536 == 0B;
        D.23538 = (long int) D.23537;
        D.23539 = __builtin_expect (D.23538, 0);
        if (D.23539 != 0) goto <D.23540>; else goto <D.23541>;
        <D.23540>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 498, "context.method_inst");
        <D.23541>:
      }
      goto <D.23542>;
      <D.23533>:
      D.23546 = method->flags;
      D.23547 = (int) D.23546;
      D.23548 = D.23547 & 16;
      if (D.23548 != 0) goto <D.23543>; else goto <D.23549>;
      <D.23549>:
      D.23550 = method->klass;
      D.23551 = BIT_FIELD_REF <*D.23550, 8, 160>;
      D.23552 = D.23551 & 8;
      if (D.23552 != 0) goto <D.23543>; else goto <D.23544>;
      <D.23543>:
      {
        struct MonoVTable * vtable;

        vtable = generic_info;
        class = vtable->klass;
      }
      goto <D.23545>;
      <D.23544>:
      class = generic_info;
      <D.23545>:
      <D.23542>:
      D.23550 = method->klass;
      D.23553 = D.23550->generic_class;
      if (D.23553 != 0B) goto <D.23554>; else goto <D.23555>;
      <D.23554>:
      D.23550 = method->klass;
      D.23553 = D.23550->generic_class;
      method_container_class = D.23553->container_class;
      goto <D.23556>;
      <D.23555>:
      method_container_class = method->klass;
      <D.23556>:
      goto <D.22590>;
      <D.22589>:
      class = class->parent;
      D.23557 = class == 0B;
      D.23558 = (long int) D.23557;
      D.23559 = __builtin_expect (D.23558, 0);
      if (D.23559 != 0) goto <D.23560>; else goto <D.23561>;
      <D.23560>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 516, "class");
      <D.23561>:
      <D.22590>:
      D.23550 = method->klass;
      if (D.23550 != class) goto <D.23562>; else goto <D.22591>;
      <D.23562>:
      D.23563 = class->generic_class;
      if (D.23563 == 0B) goto <D.22589>; else goto <D.23564>;
      <D.23564>:
      D.23563 = class->generic_class;
      D.23565 = D.23563->container_class;
      if (D.23565 != method_container_class) goto <D.22589>; else goto <D.22591>;
      <D.22591>:
      D.23563 = class->generic_class;
      if (D.23563 != 0B) goto <D.23566>; else goto <D.23568>;
      <D.23568>:
      D.23569 = class->generic_container;
      if (D.23569 != 0B) goto <D.23566>; else goto <D.23567>;
      <D.23566>:
      D.23570 = mini_class_get_context (class);
      D.23571 = D.23570->class_inst;
      context.class_inst = D.23571;
      <D.23567>:
      D.23563 = class->generic_class;
      if (D.23563 != 0B) goto <D.23572>; else goto <D.23573>;
      <D.23572>:
      D.23563 = class->generic_class;
      D.23565 = D.23563->container_class;
      D.23574 = mono_class_has_parent_and_ignore_generics (D.23565, method_container_class);
      D.23575 = D.23574 == 0;
      D.23576 = (long int) D.23575;
      D.23577 = __builtin_expect (D.23576, 0);
      if (D.23577 != 0) goto <D.23578>; else goto <D.23579>;
      <D.23578>:
      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.23579>:
      goto <D.23580>;
      <D.23573>:
      D.23581 = mono_class_has_parent_and_ignore_generics (class, method_container_class);
      D.23582 = D.23581 == 0;
      D.23583 = (long int) D.23582;
      D.23584 = __builtin_expect (D.23583, 0);
      if (D.23584 != 0) goto <D.23585>; else goto <D.23586>;
      <D.23585>:
      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.23586>:
      <D.23580>:
      <retval> = context;
      return <retval>;
    }
  finally
    {
      context = {CLOBBER};
    }
}


ves_icall_System_Exception_get_trace (struct MonoException * ex)
{
  struct MonoString * D.23591;
  unsigned int D.23592;
  unsigned int D.23593;
  int D.23594;
  unsigned int D.23595;
  char * D.23596;
  int D.23597;
  unsigned int D.23598;
  char * D.23599;
  int ip.38;
  void * D.23604;
  int D.23605;
  struct MonoVTable * D.23606;
  struct MonoDomain * D.23607;
  unsigned int address.39;
  char * D.23609;
  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.23589>; else goto <D.23590>;
  <D.23589>:
  D.23591 = 0B;
  return D.23591;
  <D.23590>:
  D.23592 = mono_array_length (ta);
  D.23593 = D.23592 >> 1;
  len = (int) D.23593;
  trace_str = monoeg_g_string_new ("");
  i = 0;
  goto <D.22630>;
  <D.22629>:
  {
    struct MonoJitInfo * ji;
    void * ip;
    void * generic_info;

    D.23594 = i * 2;
    D.23595 = (unsigned int) D.23594;
    D.23596 = mono_array_addr_with_size (ta, 4, D.23595);
    ip = MEM[(void * *)D.23596];
    D.23594 = i * 2;
    D.23597 = D.23594 + 1;
    D.23598 = (unsigned int) D.23597;
    D.23599 = mono_array_addr_with_size (ta, 4, D.23598);
    generic_info = MEM[(void * *)D.23599];
    ji = mono_jit_info_table_find (domain, ip);
    if (ji == 0B) goto <D.23600>; else goto <D.23601>;
    <D.23600>:
    monoeg_g_string_append_printf (trace_str, "in (unmanaged) %p\n", ip);
    goto <D.23602>;
    <D.23601>:
    {
      gchar * location;
      gint32 address;
      struct MonoMethod * method;

      method = get_method_from_stack_frame (ji, generic_info);
      ip.38 = (int) ip;
      D.23604 = ji->code_start;
      D.23605 = (int) D.23604;
      address = ip.38 - D.23605;
      D.23606 = ex->object.vtable;
      D.23607 = D.23606->domain;
      address.39 = (unsigned int) address;
      location = mono_debug_print_stack_frame (method, address.39, D.23607);
      monoeg_g_string_append_printf (trace_str, "%s\n", location);
      monoeg_g_free (location);
    }
    <D.23602>:
  }
  i = i + 1;
  <D.22630>:
  if (i < len) goto <D.22629>; else goto <D.22631>;
  <D.22631>:
  D.23609 = trace_str->str;
  D.23606 = ex->object.vtable;
  D.23607 = D.23606->domain;
  res = mono_string_new (D.23607, D.23609);
  monoeg_g_string_free (trace_str, 1);
  D.23591 = res;
  return D.23591;
}


ves_icall_get_trace (struct MonoException * exc, gint32 skip, MonoBoolean need_file_info)
{
  struct MonoArray * D.23613;
  struct MonoClass * D.23614;
  unsigned int D.23615;
  unsigned int D.23616;
  uintptr_t iftmp.40;
  int D.23620;
  int D.23622;
  unsigned int D.23623;
  char * D.23624;
  int D.23625;
  unsigned int D.23626;
  char * D.23627;
  unsigned int i.41;
  _Bool D.23631;
  long int D.23632;
  long int D.23633;
  struct MonoMethod * D.23636;
  unsigned char D.23637;
  unsigned char D.23638;
  struct MonoString * D.23641;
  struct MonoString * * D.23642;
  struct MonoReflectionMethod * D.23644;
  struct MonoReflectionMethod * * D.23645;
  int ip.42;
  void * D.23647;
  int D.23648;
  int D.23649;
  int D.23650;
  unsigned int D.23651;
  struct MonoMethod * D.23652;
  unsigned int D.23655;
  int D.23656;
  char * D.23663;
  struct MonoString * D.23665;
  struct MonoString * * D.23666;
  unsigned int D.23667;
  int D.23668;
  unsigned int D.23669;
  int D.23670;
  int D.23671;
  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.23611>; else goto <D.23612>;
  <D.23611>:
  D.23614 = mono_defaults.stack_frame_class;
  D.23613 = mono_array_new (domain, D.23614, 0);
  return D.23613;
  <D.23612>:
  D.23615 = mono_array_length (ta);
  D.23616 = D.23615 >> 1;
  len = (int) D.23616;
  if (len > skip) goto <D.23618>; else goto <D.23619>;
  <D.23618>:
  D.23620 = len - skip;
  iftmp.40 = (uintptr_t) D.23620;
  goto <D.23621>;
  <D.23619>:
  iftmp.40 = 0;
  <D.23621>:
  D.23614 = mono_defaults.stack_frame_class;
  res = mono_array_new (domain, D.23614, iftmp.40);
  i = skip;
  goto <D.22653>;
  <D.22652>:
  {
    struct MonoJitInfo * ji;
    struct MonoStackFrame * sf;
    void * ip;
    void * generic_info;
    struct MonoMethod * method;

    D.23614 = mono_defaults.stack_frame_class;
    sf = mono_object_new (domain, D.23614);
    D.23622 = i * 2;
    D.23623 = (unsigned int) D.23622;
    D.23624 = mono_array_addr_with_size (ta, 4, D.23623);
    ip = MEM[(void * *)D.23624];
    D.23622 = i * 2;
    D.23625 = D.23622 + 1;
    D.23626 = (unsigned int) D.23625;
    D.23627 = mono_array_addr_with_size (ta, 4, D.23626);
    generic_info = MEM[(void * *)D.23627];
    ji = mono_jit_info_table_find (domain, ip);
    if (ji == 0B) goto <D.23628>; else goto <D.23629>;
    <D.23628>:
    {
      void * * __p;

      i.41 = (unsigned int) i;
      __p = mono_array_addr_with_size (res, 4, i.41);
      mono_gc_wbarrier_set_arrayref (res, __p, sf);
    }
    // predicted unlikely by continue predictor.
    goto <D.22649>;
    <D.23629>:
    D.23631 = ji == 0B;
    D.23632 = (long int) D.23631;
    D.23633 = __builtin_expect (D.23632, 0);
    if (D.23633 != 0) goto <D.23634>; else goto <D.23635>;
    <D.23634>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 664, "ji != NULL");
    <D.23635>:
    method = get_method_from_stack_frame (ji, generic_info);
    D.23636 = jinfo_get_method (ji);
    D.23637 = BIT_FIELD_REF <*D.23636, 8, 160>;
    D.23638 = D.23637 & 124;
    if (D.23638 != 0) goto <D.23639>; else goto <D.23640>;
    <D.23639>:
    {
      char * s;

      sf->method = 0B;
      s = mono_method_full_name (method, 1);
      D.23641 = mono_string_new (domain, s);
      D.23642 = &sf->internal_method_name;
      mono_gc_wbarrier_set_field (sf, D.23642, D.23641);
      monoeg_g_free (s);
    }
    goto <D.23643>;
    <D.23640>:
    D.23644 = mono_method_get_object (domain, method, 0B);
    D.23645 = &sf->method;
    mono_gc_wbarrier_set_field (sf, D.23645, D.23644);
    <D.23643>:
    ip.42 = (int) ip;
    D.23647 = ji->code_start;
    D.23648 = (int) D.23647;
    D.23649 = ip.42 - D.23648;
    sf->native_offset = D.23649;
    D.23650 = sf->native_offset;
    D.23651 = (unsigned int) D.23650;
    D.23652 = jinfo_get_method (ji);
    location = mono_debug_lookup_source_location (D.23652, D.23651, domain);
    if (location != 0B) goto <D.23653>; else goto <D.23654>;
    <D.23653>:
    D.23655 = location->il_offset;
    D.23656 = (int) D.23655;
    sf->il_offset = D.23656;
    goto <D.23657>;
    <D.23654>:
    sf->il_offset = 0;
    <D.23657>:
    if (need_file_info != 0) goto <D.23658>; else goto <D.23659>;
    <D.23658>:
    if (location != 0B) goto <D.23662>; else goto <D.23660>;
    <D.23662>:
    D.23663 = location->source_file;
    if (D.23663 != 0B) goto <D.23664>; else goto <D.23660>;
    <D.23664>:
    D.23663 = location->source_file;
    D.23665 = mono_string_new (domain, D.23663);
    D.23666 = &sf->filename;
    mono_gc_wbarrier_set_field (sf, D.23666, D.23665);
    D.23667 = location->row;
    D.23668 = (int) D.23667;
    sf->line = D.23668;
    D.23669 = location->column;
    D.23670 = (int) D.23669;
    sf->column = D.23670;
    goto <D.23661>;
    <D.23660>:
    sf->column = 0;
    D.23671 = sf->column;
    sf->line = D.23671;
    sf->filename = 0B;
    <D.23661>:
    <D.23659>:
    mono_debug_free_source_location (location);
    {
      void * * __p;

      i.41 = (unsigned int) i;
      __p = mono_array_addr_with_size (res, 4, i.41);
      mono_gc_wbarrier_set_arrayref (res, __p, sf);
    }
  }
  <D.22649>:
  i = i + 1;
  <D.22653>:
  if (i < len) goto <D.22652>; else goto <D.22654>;
  <D.22654>:
  D.23613 = res;
  return D.23613;
}


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.23676;
  int mono_walk_stack_with_ctx.43;
  void * D.23680;
  int D.23681;
  void * D.23682;
  int D.23683;
  struct MonoLMF * D.23684;
  struct MonoDomain * D.23685;
  struct MonoContext extra_ctx;
  struct MonoInternalThread * thread;

  try
    {
      thread = mono_thread_internal_current ();
      if (thread == 0B) goto <D.23673>; else goto <D.23675>;
      <D.23675>:
      D.23676 = thread->jit_data;
      if (D.23676 == 0B) goto <D.23673>; else goto <D.23674>;
      <D.23673>:
      return;
      <D.23674>:
      if (start_ctx == 0B) goto <D.23677>; else goto <D.23678>;
      <D.23677>:
      mono_arch_flush_register_windows ();
      mono_arch_flush_register_windows ();
      mono_walk_stack_with_ctx.43 = (int) mono_walk_stack_with_ctx;
      extra_ctx.eip = mono_walk_stack_with_ctx.43;
      D.23680 = __builtin_frame_address (0);
      D.23681 = (int) D.23680;
      extra_ctx.ebp = D.23681;
      D.23682 = __builtin_frame_address (0);
      D.23683 = (int) D.23682;
      extra_ctx.esp = D.23683;
      start_ctx = &extra_ctx;
      <D.23678>:
      D.23684 = mono_get_lmf ();
      D.23676 = thread->jit_data;
      D.23685 = mono_domain_get ();
      mono_walk_stack_full (func, start_ctx, D.23685, D.23676, D.23684, 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.44;
  _Bool D.23690;
  long int D.23691;
  long int D.23692;
  _Bool D.23695;
  long int D.23696;
  long int D.23697;
  _Bool D.23700;
  long int D.23701;
  long int D.23702;
  _Bool D.23707;
  long int D.23708;
  long int D.23709;
  struct MonoLMF * lmf.45;
  mgreg_t * * iftmp.46;
  unsigned int D.23721;
  struct MonoJitInfo * D.23723;
  int D.23725;
  unsigned int D.23726;
  struct MonoMethod * D.23727;
  gint iftmp.47;
  unsigned int D.23731;
  unsigned int D.23735;
  void * D.23738;
  struct MonoMethod * D.23739;
  struct MonoMethod * D.23740;
  int D.23743;
  mgreg_t * D.23748;
  int D.23751;
  void * D.23752;
  void * D.23753;
  gint il_offset;
  gint i;
  struct MonoContext ctx;
  struct MonoContext new_ctx;
  struct StackFrameInfo frame;
  gboolean res;
  mgreg_t * reg_locations[8];
  mgreg_t * new_reg_locations[8];
  gboolean get_reg_locations;
  gboolean async;

  try
    {
      unwind_options.44 = (int) unwind_options;
      get_reg_locations = unwind_options.44 & 4;
      async = mono_thread_info_is_async_context ();
      D.23690 = start_ctx == 0B;
      D.23691 = (long int) D.23690;
      D.23692 = __builtin_expect (D.23691, 0);
      if (D.23692 != 0) goto <D.23693>; else goto <D.23694>;
      <D.23693>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 817, "start_ctx");
      <D.23694>:
      D.23695 = domain == 0B;
      D.23696 = (long int) D.23695;
      D.23697 = __builtin_expect (D.23696, 0);
      if (D.23697 != 0) goto <D.23698>; else goto <D.23699>;
      <D.23698>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 818, "domain");
      <D.23699>:
      D.23700 = jit_tls == 0B;
      D.23701 = (long int) D.23700;
      D.23702 = __builtin_expect (D.23701, 0);
      if (D.23702 != 0) goto <D.23703>; else goto <D.23704>;
      <D.23703>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 819, "jit_tls");
      <D.23704>:
      if (async != 0) goto <D.23705>; else goto <D.23706>;
      <D.23705>:
      D.23707 = unwind_options != 0;
      D.23708 = (long int) D.23707;
      D.23709 = __builtin_expect (D.23708, 0);
      if (D.23709 != 0) goto <D.23710>; else goto <D.23711>;
      <D.23710>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 824, "unwind_options == MONO_UNWIND_NONE");
      <D.23711>:
      <D.23706>:
      memcpy (&ctx, start_ctx, 36);
      memset (&reg_locations, 0, 32);
      goto <D.22707>;
      <D.22706>:
      lmf.45 = lmf;
      frame.lmf = lmf.45;
      if (get_reg_locations != 0) goto <D.23714>; else goto <D.23715>;
      <D.23714>:
      iftmp.46 = &new_reg_locations;
      goto <D.23716>;
      <D.23715>:
      iftmp.46 = 0B;
      <D.23716>:
      res = mono_find_jit_info_ext (domain, jit_tls, 0B, &ctx, &new_ctx, 0B, &lmf, iftmp.46, &frame);
      if (res == 0) goto <D.23717>; else goto <D.23718>;
      <D.23717>:
      return;
      <D.23718>:
      D.23721 = unwind_options & 1;
      if (D.23721 != 0) goto <D.23722>; else goto <D.23719>;
      <D.23722>:
      D.23723 = frame.ji;
      if (D.23723 != 0B) goto <D.23724>; else goto <D.23719>;
      <D.23724>:
      {
        struct MonoDebugSourceLocation * source;

        D.23725 = frame.native_offset;
        D.23726 = (unsigned int) D.23725;
        D.23723 = frame.ji;
        D.23727 = jinfo_get_method (D.23723);
        source = mono_debug_lookup_source_location (D.23727, D.23726, domain);
        if (source != 0B) goto <D.23729>; else goto <D.23730>;
        <D.23729>:
        D.23731 = source->il_offset;
        iftmp.47 = (gint) D.23731;
        goto <D.23732>;
        <D.23730>:
        iftmp.47 = -1;
        <D.23732>:
        il_offset = iftmp.47;
        mono_debug_free_source_location (source);
      }
      goto <D.23720>;
      <D.23719>:
      il_offset = -1;
      <D.23720>:
      frame.il_offset = il_offset;
      D.23735 = unwind_options & 2;
      if (D.23735 != 0) goto <D.23736>; else goto <D.23733>;
      <D.23736>:
      D.23723 = frame.ji;
      if (D.23723 != 0B) goto <D.23737>; else goto <D.23733>;
      <D.23737>:
      D.23723 = frame.ji;
      D.23738 = get_generic_info_from_stack_frame (D.23723, &ctx);
      D.23723 = frame.ji;
      D.23739 = get_method_from_stack_frame (D.23723, D.23738);
      frame.actual_method = D.23739;
      goto <D.23734>;
      <D.23733>:
      D.23740 = frame.method;
      frame.actual_method = D.23740;
      <D.23734>:
      if (get_reg_locations != 0) goto <D.23741>; else goto <D.23742>;
      <D.23741>:
      frame.reg_locations = &reg_locations;
      <D.23742>:
      D.23743 = func (&frame, &ctx, user_data);
      if (D.23743 != 0) goto <D.23744>; else goto <D.23745>;
      <D.23744>:
      return;
      <D.23745>:
      if (get_reg_locations != 0) goto <D.23746>; else goto <D.23747>;
      <D.23746>:
      i = 0;
      goto <D.22704>;
      <D.22703>:
      D.23748 = new_reg_locations[i];
      if (D.23748 != 0B) goto <D.23749>; else goto <D.23750>;
      <D.23749>:
      D.23748 = new_reg_locations[i];
      reg_locations[i] = D.23748;
      <D.23750>:
      i = i + 1;
      <D.22704>:
      if (i <= 7) goto <D.22703>; else goto <D.22705>;
      <D.22705>:
      <D.23747>:
      ctx = new_ctx;
      <D.22707>:
      D.23751 = ctx.esp;
      D.23752 = (void *) D.23751;
      D.23753 = jit_tls->end_of_stack;
      if (D.23752 < D.23753) goto <D.22706>; else goto <D.22708>;
      <D.22708>:
    }
  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.23757;
  unsigned char D.23758;
  void * D.23761;
  unsigned char D.23762;
  unsigned char D.23763;
  int D.23766;
  int D.23769;
  void * D.23770;
  int D.23771;
  struct MonoDwarfLocListEntry * D.23772;
  unsigned int i.48;
  unsigned int D.23774;
  int D.23777;
  int D.23780;
  int D.23782;
  int D.23785;
  int D.23786;
  int D.23788;
  sizetype D.23789;
  int D.23790;
  sizetype D.23791;
  sizetype D.23792;
  void * * D.23793;
  _Bool D.23794;
  long int D.23795;
  long int D.23796;
  unsigned char D.23800;
  unsigned char D.23803;
  int D.23804;
  int D.23805;
  int D.23807;
  sizetype D.23808;
  int D.23809;
  sizetype D.23810;
  sizetype D.23811;
  void * * D.23812;
  struct MonoGenericContext * D.23813;
  struct MonoGenericInst * D.23814;
  short unsigned int D.23819;
  int D.23820;
  int D.23821;
  struct MonoClass * D.23823;
  unsigned char D.23824;
  unsigned char D.23825;
  struct MonoVTable * D.23826;
  struct MonoGenericJitInfo * gi;
  struct MonoMethod * method;
  void * info;

  D.23757 = BIT_FIELD_REF <*ji, 8, 176>;
  D.23758 = D.23757 & 2;
  if (D.23758 == 0) goto <D.23759>; else goto <D.23760>;
  <D.23759>:
  D.23761 = 0B;
  return D.23761;
  <D.23760>:
  gi = mono_jit_info_get_generic_jit_info (ji);
  D.23762 = BIT_FIELD_REF <*gi, 8, 136>;
  D.23763 = D.23762 & 1;
  if (D.23763 == 0) goto <D.23764>; else goto <D.23765>;
  <D.23764>:
  D.23761 = 0B;
  return D.23761;
  <D.23765>:
  info = 0B;
  D.23766 = gi->nlocs;
  if (D.23766 != 0) goto <D.23767>; else goto <D.23768>;
  <D.23767>:
  {
    int offset;
    int i;

    D.23769 = ctx->eip;
    D.23770 = ji->code_start;
    D.23771 = (int) D.23770;
    offset = D.23769 - D.23771;
    i = 0;
    goto <D.22577>;
    <D.22576>:
    {
      struct MonoDwarfLocListEntry * entry;

      D.23772 = gi->locations;
      i.48 = (unsigned int) i;
      D.23774 = i.48 * 20;
      entry = D.23772 + D.23774;
      D.23777 = entry->from;
      if (D.23777 <= offset) goto <D.23778>; else goto <D.23779>;
      <D.23778>:
      D.23780 = entry->to;
      if (D.23780 > offset) goto <D.23775>; else goto <D.23781>;
      <D.23781>:
      D.23780 = entry->to;
      if (D.23780 == 0) goto <D.23775>; else goto <D.23776>;
      <D.23775>:
      D.23782 = entry->is_reg;
      if (D.23782 != 0) goto <D.23783>; else goto <D.23784>;
      <D.23783>:
      D.23785 = entry->reg;
      D.23786 = mono_arch_context_get_int_reg (ctx, D.23785);
      info = (void *) D.23786;
      goto <D.23787>;
      <D.23784>:
      D.23788 = entry->offset;
      D.23789 = (sizetype) D.23788;
      D.23785 = entry->reg;
      D.23790 = mono_arch_context_get_int_reg (ctx, D.23785);
      D.23791 = (sizetype) D.23790;
      D.23792 = D.23789 + D.23791;
      D.23793 = (void * *) D.23792;
      info = *D.23793;
      <D.23787>:
      goto <D.22575>;
      <D.23776>:
      <D.23779>:
    }
    i = i + 1;
    <D.22577>:
    D.23766 = gi->nlocs;
    if (D.23766 > i) goto <D.22576>; else goto <D.22575>;
    <D.22575>:
    D.23766 = gi->nlocs;
    D.23794 = D.23766 <= i;
    D.23795 = (long int) D.23794;
    D.23796 = __builtin_expect (D.23795, 0);
    if (D.23796 != 0) goto <D.23797>; else goto <D.23798>;
    <D.23797>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 460, "i < gi->nlocs");
    <D.23798>:
  }
  goto <D.23799>;
  <D.23768>:
  D.23762 = BIT_FIELD_REF <*gi, 8, 136>;
  D.23800 = D.23762 & 2;
  if (D.23800 != 0) goto <D.23801>; else goto <D.23802>;
  <D.23801>:
  D.23803 = gi->this_reg;
  D.23804 = (int) D.23803;
  D.23805 = mono_arch_context_get_int_reg (ctx, D.23804);
  info = (void *) D.23805;
  goto <D.23806>;
  <D.23802>:
  D.23807 = gi->this_offset;
  D.23808 = (sizetype) D.23807;
  D.23803 = gi->this_reg;
  D.23804 = (int) D.23803;
  D.23809 = mono_arch_context_get_int_reg (ctx, D.23804);
  D.23810 = (sizetype) D.23809;
  D.23811 = D.23808 + D.23810;
  D.23812 = (void * *) D.23811;
  info = *D.23812;
  <D.23806>:
  <D.23799>:
  method = jinfo_get_method (ji);
  D.23813 = mono_method_get_context (method);
  D.23814 = D.23813->method_inst;
  if (D.23814 != 0B) goto <D.23815>; else goto <D.23816>;
  <D.23815>:
  D.23761 = info;
  return D.23761;
  <D.23816>:
  D.23819 = method->flags;
  D.23820 = (int) D.23819;
  D.23821 = D.23820 & 16;
  if (D.23821 != 0) goto <D.23817>; else goto <D.23822>;
  <D.23822>:
  D.23823 = method->klass;
  D.23824 = BIT_FIELD_REF <*D.23823, 8, 160>;
  D.23825 = D.23824 & 8;
  if (D.23825 != 0) goto <D.23817>; else goto <D.23818>;
  <D.23817>:
  D.23761 = info;
  return D.23761;
  <D.23818>:
  {
    struct MonoObject * this_obj;

    this_obj = info;
    D.23826 = this_obj->vtable;
    D.23761 = D.23826->klass;
    return D.23761;
  }
}


mono_walk_stack_with_state (gboolean (*MonoJitStackWalk) (struct StackFrameInfo *, struct MonoContext *, void *) func, struct MonoThreadUnwindState * state, MonoUnwindOptions unwind_options, void * user_data)
{
  int D.23830;
  _Bool D.23831;
  long int D.23832;
  long int D.23833;
  int D.23836;
  int D.23839;
  _Bool D.23840;
  long int D.23841;
  long int D.23842;
  void * D.23845;
  void * D.23846;
  void * D.23847;
  struct MonoContext * D.23848;
  struct MonoThreadUnwindState extra_state;

  try
    {
      if (state == 0B) goto <D.23828>; else goto <D.23829>;
      <D.23828>:
      D.23830 = mono_thread_info_is_async_context ();
      D.23831 = D.23830 != 0;
      D.23832 = (long int) D.23831;
      D.23833 = __builtin_expect (D.23832, 0);
      if (D.23833 != 0) goto <D.23834>; else goto <D.23835>;
      <D.23834>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 765, "!mono_thread_info_is_async_context ()");
      <D.23835>:
      D.23836 = mono_thread_state_init_from_current (&extra_state);
      if (D.23836 == 0) goto <D.23837>; else goto <D.23838>;
      <D.23837>:
      return;
      <D.23838>:
      state = &extra_state;
      <D.23829>:
      D.23839 = state->valid;
      D.23840 = D.23839 == 0;
      D.23841 = (long int) D.23840;
      D.23842 = __builtin_expect (D.23841, 0);
      if (D.23842 != 0) goto <D.23843>; else goto <D.23844>;
      <D.23843>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 771, "state->valid");
      <D.23844>:
      D.23845 = state->unwind_data[1];
      D.23846 = state->unwind_data[2];
      D.23847 = state->unwind_data[0];
      D.23848 = &state->ctx;
      mono_walk_stack_full (func, D.23848, D.23847, D.23846, D.23845, 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.23852;
  struct MonoThreadUnwindState state;

  try
    {
      D.23852 = mono_thread_state_init_from_current (&state);
      if (D.23852 == 0) goto <D.23853>; else goto <D.23854>;
      <D.23853>:
      return;
      <D.23854>:
      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.49;
  struct MonoLMF * lmf.50;
  int ves_icall_get_frame_info.51;
  void * D.23861;
  int D.23862;
  void * D.23863;
  int D.23864;
  MonoBoolean D.23867;
  <unnamed type> D.23868;
  unsigned int D.23869;
  int D.23872;
  unsigned char D.23873;
  unsigned char D.23874;
  _Bool D.23875;
  _Bool D.23876;
  _Bool D.23877;
  unsigned char D.23880;
  void * D.23883;
  struct MonoReflectionMethod * D.23884;
  int D.23885;
  unsigned int D.23886;
  unsigned int D.23889;
  int D.23890;
  char * D.23896;
  struct MonoString * D.23897;
  unsigned int D.23898;
  int D.23899;
  unsigned int D.23900;
  int D.23901;
  int D.23903;
  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.49 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.49);
      lmf.50 = mono_get_lmf ();
      lmf = lmf.50;
      ji = 0B;
      jmethod = 0B;
      mono_arch_flush_register_windows ();
      mono_arch_flush_register_windows ();
      ves_icall_get_frame_info.51 = (int) ves_icall_get_frame_info;
      ctx.eip = ves_icall_get_frame_info.51;
      D.23861 = __builtin_frame_address (0);
      D.23862 = (int) D.23861;
      ctx.ebp = D.23862;
      D.23863 = __builtin_frame_address (0);
      D.23864 = (int) D.23863;
      ctx.esp = D.23864;
      new_ctx = ctx;
      <D.22731>:
      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.23865>; else goto <D.23866>;
      <D.23865>:
      D.23867 = 0;
      return D.23867;
      <D.23866>:
      D.23868 = frame.type;
      D.23869 = D.23868 + 4294967295;
      if (D.23869 <= 1) goto <D.23870>; else goto <D.23871>;
      <D.23870>:
      // predicted unlikely by continue predictor.
      goto <D.22730>;
      <D.23871>:
      ji = frame.ji;
      D.23872 = frame.native_offset;
      *native_offset = D.23872;
      jmethod = jinfo_get_method (ji);
      D.23873 = BIT_FIELD_REF <*jmethod, 8, 160>;
      D.23874 = D.23873 & 124;
      D.23875 = D.23874 != 0;
      D.23876 = D.23874 != 68;
      D.23877 = D.23875 & D.23876;
      if (D.23877 != 0) goto <D.23878>; else goto <D.23879>;
      <D.23878>:
      D.23873 = BIT_FIELD_REF <*jmethod, 8, 160>;
      D.23880 = D.23873 & 124;
      if (D.23880 != 24) goto <D.23881>; else goto <D.23882>;
      <D.23881>:
      // predicted unlikely by continue predictor.
      goto <D.22730>;
      <D.23882>:
      <D.23879>:
      skip = skip + -1;
      <D.22730>:
      if (skip >= 0) goto <D.22731>; else goto <D.22732>;
      <D.22732>:
      D.23883 = get_generic_info_from_stack_frame (ji, &ctx);
      actual_method = get_method_from_stack_frame (ji, D.23883);
      D.23884 = mono_method_get_object (domain, actual_method, 0B);
      mono_gc_wbarrier_generic_store (method, D.23884);
      D.23885 = *native_offset;
      D.23886 = (unsigned int) D.23885;
      location = mono_debug_lookup_source_location (jmethod, D.23886, domain);
      if (location != 0B) goto <D.23887>; else goto <D.23888>;
      <D.23887>:
      D.23889 = location->il_offset;
      D.23890 = (int) D.23889;
      *iloffset = D.23890;
      goto <D.23891>;
      <D.23888>:
      *iloffset = 0;
      <D.23891>:
      if (need_file_info != 0) goto <D.23892>; else goto <D.23893>;
      <D.23892>:
      if (location != 0B) goto <D.23894>; else goto <D.23895>;
      <D.23894>:
      D.23896 = location->source_file;
      D.23897 = mono_string_new (domain, D.23896);
      mono_gc_wbarrier_generic_store (file, D.23897);
      D.23898 = location->row;
      D.23899 = (int) D.23898;
      *line = D.23899;
      D.23900 = location->column;
      D.23901 = (int) D.23900;
      *column = D.23901;
      goto <D.23902>;
      <D.23895>:
      *file = 0B;
      *column = 0;
      D.23903 = *column;
      *line = D.23903;
      <D.23902>:
      <D.23893>:
      mono_debug_free_source_location (location);
      D.23867 = 1;
      return D.23867;
    }
  finally
    {
      lmf = {CLOBBER};
      ctx = {CLOBBER};
      new_ctx = {CLOBBER};
      frame = {CLOBBER};
    }
}


ves_icall_System_Security_SecurityFrame_GetSecurityFrame (gint32 skip)
{
  unsigned int skip.52;
  struct MonoSecurityFrame * D.23907;
  struct MonoSecurityFrame * iftmp.53;
  unsigned int D.23909;
  struct MonoFrameSecurityInfo si;

  try
    {
      skip.52 = (unsigned int) skip;
      si.skips = skip.52;
      si.frame = 0B;
      mono_walk_stack (callback_get_first_frame_security_info, 2, &si);
      D.23909 = si.skips;
      if (D.23909 == 0) goto <D.23910>; else goto <D.23911>;
      <D.23910>:
      iftmp.53 = si.frame;
      goto <D.23912>;
      <D.23911>:
      iftmp.53 = 0B;
      <D.23912>:
      D.23907 = iftmp.53;
      return D.23907;
    }
  finally
    {
      si = {CLOBBER};
    }
}


callback_get_first_frame_security_info (struct StackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  gboolean D.23917;
  unsigned char D.23920;
  unsigned char D.23921;
  _Bool D.23922;
  _Bool D.23923;
  _Bool D.23924;
  unsigned char D.23926;
  unsigned int D.23929;
  unsigned int D.23932;
  struct MonoDomain * D.23933;
  struct MonoSecurityFrame * D.23934;
  struct MonoFrameSecurityInfo * si;
  struct MonoJitInfo * ji;
  struct MonoMethod * method;

  si = data;
  ji = frame->ji;
  if (ji == 0B) goto <D.23915>; else goto <D.23916>;
  <D.23915>:
  D.23917 = 0;
  return D.23917;
  <D.23916>:
  method = jinfo_get_method (ji);
  D.23920 = BIT_FIELD_REF <*method, 8, 160>;
  D.23921 = D.23920 & 124;
  D.23922 = D.23921 == 16;
  D.23923 = D.23921 == 40;
  D.23924 = D.23922 | D.23923;
  if (D.23924 != 0) goto <D.23918>; else goto <D.23925>;
  <D.23925>:
  D.23920 = BIT_FIELD_REF <*method, 8, 160>;
  D.23926 = D.23920 & 124;
  if (D.23926 == 44) goto <D.23918>; else goto <D.23927>;
  <D.23927>:
  D.23920 = BIT_FIELD_REF <*method, 8, 160>;
  D.23926 = D.23920 & 124;
  if (D.23926 == 36) goto <D.23918>; else goto <D.23928>;
  <D.23928>:
  D.23920 = BIT_FIELD_REF <*method, 8, 160>;
  D.23926 = D.23920 & 124;
  if (D.23926 == 32) goto <D.23918>; else goto <D.23919>;
  <D.23918>:
  D.23917 = 0;
  return D.23917;
  <D.23919>:
  D.23929 = si->skips;
  if (D.23929 != 0) goto <D.23930>; else goto <D.23931>;
  <D.23930>:
  D.23929 = si->skips;
  D.23932 = D.23929 + 4294967295;
  si->skips = D.23932;
  D.23917 = 0;
  return D.23917;
  <D.23931>:
  D.23933 = frame->domain;
  D.23934 = mono_declsec_create_frame (D.23933, ji);
  si->frame = D.23934;
  D.23917 = 1;
  return D.23917;
}


ves_icall_System_Security_SecurityFrame_GetSecurityStack (gint32 skip)
{
  unsigned int skip.54;
  unsigned int D.23937;
  struct MonoClass * D.23938;
  struct MonoDomain * D.23939;
  struct MonoArray * D.23940;
  struct MonoArray * D.23941;
  struct MonoSecurityStack ss;

  try
    {
      skip.54 = (unsigned int) skip;
      ss.skips = skip.54;
      ss.count = 0;
      ss.maximum = 6;
      D.23937 = ss.maximum;
      D.23938 = mono_defaults.runtimesecurityframe_class;
      D.23939 = mono_domain_get ();
      D.23940 = mono_array_new (D.23939, D.23938, D.23937);
      ss.stack = D.23940;
      mono_walk_stack (callback_get_stack_frames_security_info, 2, &ss);
      D.23941 = ss.stack;
      return D.23941;
    }
  finally
    {
      ss = {CLOBBER};
    }
}


callback_get_stack_frames_security_info (struct StackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  gboolean D.23946;
  unsigned char D.23949;
  unsigned char D.23950;
  _Bool D.23951;
  _Bool D.23952;
  _Bool D.23953;
  unsigned char D.23955;
  unsigned int D.23958;
  unsigned int D.23961;
  unsigned int D.23962;
  unsigned int D.23963;
  unsigned int D.23966;
  unsigned int D.23967;
  struct MonoArray * D.23968;
  struct MonoDomain * D.23969;
  struct MonoSecurityFrame * D.23970;
  struct MonoSecurityStack * ss;
  struct MonoJitInfo * ji;
  struct MonoMethod * method;

  ss = data;
  ji = frame->ji;
  if (ji == 0B) goto <D.23944>; else goto <D.23945>;
  <D.23944>:
  D.23946 = 0;
  return D.23946;
  <D.23945>:
  method = jinfo_get_method (ji);
  D.23949 = BIT_FIELD_REF <*method, 8, 160>;
  D.23950 = D.23949 & 124;
  D.23951 = D.23950 == 16;
  D.23952 = D.23950 == 40;
  D.23953 = D.23951 | D.23952;
  if (D.23953 != 0) goto <D.23947>; else goto <D.23954>;
  <D.23954>:
  D.23949 = BIT_FIELD_REF <*method, 8, 160>;
  D.23955 = D.23949 & 124;
  if (D.23955 == 44) goto <D.23947>; else goto <D.23956>;
  <D.23956>:
  D.23949 = BIT_FIELD_REF <*method, 8, 160>;
  D.23955 = D.23949 & 124;
  if (D.23955 == 36) goto <D.23947>; else goto <D.23957>;
  <D.23957>:
  D.23949 = BIT_FIELD_REF <*method, 8, 160>;
  D.23955 = D.23949 & 124;
  if (D.23955 == 32) goto <D.23947>; else goto <D.23948>;
  <D.23947>:
  D.23946 = 0;
  return D.23946;
  <D.23948>:
  D.23958 = ss->skips;
  if (D.23958 != 0) goto <D.23959>; else goto <D.23960>;
  <D.23959>:
  D.23958 = ss->skips;
  D.23961 = D.23958 + 4294967295;
  ss->skips = D.23961;
  D.23946 = 0;
  return D.23946;
  <D.23960>:
  D.23962 = ss->count;
  D.23963 = ss->maximum;
  if (D.23962 == D.23963) goto <D.23964>; else goto <D.23965>;
  <D.23964>:
  grow_array (ss);
  <D.23965>:
  {
    void * * __p;

    D.23962 = ss->count;
    D.23966 = D.23962;
    D.23967 = D.23966 + 1;
    ss->count = D.23967;
    D.23968 = ss->stack;
    __p = mono_array_addr_with_size (D.23968, 4, D.23966);
    D.23969 = frame->domain;
    D.23970 = mono_declsec_create_frame (D.23969, ji);
    D.23968 = ss->stack;
    mono_gc_wbarrier_set_arrayref (D.23968, __p, D.23970);
  }
  D.23946 = 0;
  return D.23946;
}


grow_array (struct MonoSecurityStack * stack)
{
  unsigned int D.23972;
  struct MonoClass * D.23973;
  unsigned int i.55;
  struct MonoArray * D.23975;
  char * D.23976;
  unsigned int i.56;
  struct MonoDomain * domain;
  guint32 newsize;
  struct MonoArray * newstack;
  int i;

  domain = mono_domain_get ();
  D.23972 = stack->maximum;
  newsize = D.23972 << 1;
  D.23973 = mono_defaults.runtimesecurityframe_class;
  newstack = mono_array_new (domain, D.23973, newsize);
  i = 0;
  goto <D.22765>;
  <D.22764>:
  {
    void * frame;

    i.55 = (unsigned int) i;
    D.23975 = stack->stack;
    D.23976 = mono_array_addr_with_size (D.23975, 4, i.55);
    frame = MEM[(void * *)D.23976];
    {
      void * * __p;

      i.55 = (unsigned int) i;
      __p = mono_array_addr_with_size (newstack, 4, i.55);
      mono_gc_wbarrier_set_arrayref (newstack, __p, frame);
    }
  }
  i = i + 1;
  <D.22765>:
  i.56 = (unsigned int) i;
  D.23972 = stack->maximum;
  if (i.56 < D.23972) goto <D.22764>; else goto <D.22766>;
  <D.22766>:
  stack->maximum = newsize;
  stack->stack = newstack;
}


mini_jit_info_table_find (struct MonoDomain * domain, char * addr, struct MonoDomain * * out_domain)
{
  struct MonoJitInfo * D.23984;
  struct MonoDomain * D.23985;
  struct MonoDomain * D.23988;
  struct MonoDomain * D.23993;
  void * * iftmp.57;
  void * D.23997;
  void * D.24001;
  struct MonoDomain * D.24004;
  struct MonoJitInfo * ji;
  struct MonoInternalThread * t;
  void * * refs;

  t = mono_thread_internal_current ();
  if (out_domain != 0B) goto <D.23978>; else goto <D.23979>;
  <D.23978>:
  *out_domain = 0B;
  <D.23979>:
  ji = mono_jit_info_table_find (domain, addr);
  if (ji != 0B) goto <D.23980>; else goto <D.23981>;
  <D.23980>:
  if (out_domain != 0B) goto <D.23982>; else goto <D.23983>;
  <D.23982>:
  *out_domain = domain;
  <D.23983>:
  D.23984 = ji;
  return D.23984;
  <D.23981>:
  D.23985 = mono_get_root_domain ();
  if (D.23985 != domain) goto <D.23986>; else goto <D.23987>;
  <D.23986>:
  D.23988 = mono_get_root_domain ();
  ji = mono_jit_info_table_find (D.23988, addr);
  if (ji != 0B) goto <D.23989>; else goto <D.23990>;
  <D.23989>:
  if (out_domain != 0B) goto <D.23991>; else goto <D.23992>;
  <D.23991>:
  D.23993 = mono_get_root_domain ();
  *out_domain = D.23993;
  <D.23992>:
  D.23984 = ji;
  return D.23984;
  <D.23990>:
  <D.23987>:
  if (t == 0B) goto <D.23994>; else goto <D.23995>;
  <D.23994>:
  D.23984 = 0B;
  return D.23984;
  <D.23995>:
  D.23997 = t->appdomain_refs;
  if (D.23997 != 0B) goto <D.23998>; else goto <D.23999>;
  <D.23998>:
  D.23997 = t->appdomain_refs;
  iftmp.57 = MEM[(void * *)D.23997];
  goto <D.24000>;
  <D.23999>:
  iftmp.57 = 0B;
  <D.24000>:
  refs = iftmp.57;
  goto <D.22809>;
  <D.22808>:
  D.24001 = *refs;
  if (D.24001 != domain) goto <D.24002>; else goto <D.24003>;
  <D.24002>:
  D.24001 = *refs;
  D.24004 = mono_get_root_domain ();
  if (D.24001 != D.24004) goto <D.24005>; else goto <D.24006>;
  <D.24005>:
  D.24001 = *refs;
  ji = mono_jit_info_table_find (D.24001, addr);
  if (ji != 0B) goto <D.24007>; else goto <D.24008>;
  <D.24007>:
  if (out_domain != 0B) goto <D.24009>; else goto <D.24010>;
  <D.24009>:
  D.24001 = *refs;
  *out_domain = D.24001;
  <D.24010>:
  D.23984 = ji;
  return D.23984;
  <D.24008>:
  <D.24006>:
  <D.24003>:
  refs = refs + 4;
  <D.22809>:
  if (refs != 0B) goto <D.24011>; else goto <D.22810>;
  <D.24011>:
  D.24001 = *refs;
  if (D.24001 != 0B) goto <D.22808>; else goto <D.22810>;
  <D.22810>:
  D.23984 = 0B;
  return D.23984;
}


mono_debugger_run_finally (struct MonoContext * start_ctx)
{
  unsigned int mono_jit_tls_id.58;
  struct MonoLMF * lmf.59;
  struct MonoJitInfo * D.24015;
  int (*<T3c86>) (struct MonoContext *, void *) call_filter.60;
  void * D.24021;
  int (*<T3c86>) (struct MonoContext *, void *) call_filter.61;
  int D.24023;
  void * D.24024;
  int D.24025;
  unsigned int D.24028;
  unsigned int D.24029;
  void * D.24032;
  <unnamed-unsigned:15> D.24033;
  int D.24034;
  static int (*<T3c86>) (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.58 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.58);
      lmf.59 = mono_get_lmf ();
      lmf = lmf.59;
      ctx = *start_ctx;
      ji = mono_find_jit_info (domain, jit_tls, &rji, 0B, &ctx, &new_ctx, 0B, &lmf, 0B, 0B);
      D.24015 = ji + 4294967295;
      if (D.24015 > 4294967293B) goto <D.24016>; else goto <D.24017>;
      <D.24016>:
      return;
      <D.24017>:
      call_filter.60 = call_filter;
      if (call_filter.60 == 0B) goto <D.24019>; else goto <D.24020>;
      <D.24019>:
      D.24021 = mono_get_call_filter ();
      call_filter.61 = (int (*<T3c86>) (struct MonoContext *, void *)) D.24021;
      call_filter = call_filter.61;
      <D.24020>:
      i = 0;
      goto <D.22998>;
      <D.22997>:
      {
        struct MonoJitExceptionInfo * ei;

        ei = &ji->clauses[i];
        D.24023 = ctx.eip;
        D.24024 = (void *) D.24023;
        D.24025 = is_address_protected (ji, ei, D.24024);
        if (D.24025 != 0) goto <D.24026>; else goto <D.24027>;
        <D.24026>:
        D.24028 = ei->flags;
        D.24029 = D.24028 & 2;
        if (D.24029 != 0) goto <D.24030>; else goto <D.24031>;
        <D.24030>:
        call_filter.60 = call_filter;
        D.24032 = ei->handler_start;
        call_filter.60 (&ctx, D.24032);
        <D.24031>:
        <D.24027>:
      }
      i = i + 1;
      <D.22998>:
      D.24033 = ji->num_clauses;
      D.24034 = (int) D.24033;
      if (D.24034 > i) goto <D.22997>; else goto <D.22999>;
      <D.22999>:
    }
  finally
    {
      lmf = {CLOBBER};
      ctx = {CLOBBER};
      new_ctx = {CLOBBER};
      rji = {CLOBBER};
    }
}


is_address_protected (struct MonoJitInfo * ji, struct MonoJitExceptionInfo * ei, void * ip)
{
  void * D.24040;
  void * D.24042;
  gboolean D.24043;
  unsigned char D.24044;
  unsigned char D.24045;
  int ip.62;
  void * D.24049;
  int D.24050;
  int D.24051;
  int ei.63;
  struct MonoJitExceptionInfo[0:] * D.24053;
  int D.24054;
  int D.24055;
  int D.24056;
  int D.24057;
  <unnamed-unsigned:15> D.24058;
  int D.24059;
  _Bool D.24060;
  long int D.24061;
  long int D.24062;
  short unsigned int D.24065;
  unsigned int D.24068;
  short unsigned int D.24071;
  unsigned int D.24072;
  unsigned int D.24073;
  short unsigned int D.24076;
  int D.24077;
  struct MonoTryBlockHoleTableJitInfo * table;
  int i;
  guint32 offset;
  guint16 clause;

  D.24040 = ei->try_start;
  if (D.24040 > ip) goto <D.24038>; else goto <D.24041>;
  <D.24041>:
  D.24042 = ei->try_end;
  if (D.24042 <= ip) goto <D.24038>; else goto <D.24039>;
  <D.24038>:
  D.24043 = 0;
  return D.24043;
  <D.24039>:
  D.24044 = BIT_FIELD_REF <*ji, 8, 176>;
  D.24045 = D.24044 & 4;
  if (D.24045 == 0) goto <D.24046>; else goto <D.24047>;
  <D.24046>:
  D.24043 = 1;
  return D.24043;
  <D.24047>:
  table = mono_jit_info_get_try_block_hole_table_info (ji);
  ip.62 = (int) ip;
  D.24049 = ji->code_start;
  D.24050 = (int) D.24049;
  D.24051 = ip.62 - D.24050;
  offset = (guint32) D.24051;
  ei.63 = (int) ei;
  D.24053 = &ji->clauses;
  D.24054 = (int) D.24053;
  D.24055 = ei.63 - D.24054;
  D.24056 = D.24055 /[ex] 24;
  clause = (guint16) D.24056;
  D.24057 = (int) clause;
  D.24058 = ji->num_clauses;
  D.24059 = (int) D.24058;
  D.24060 = D.24057 >= D.24059;
  D.24061 = (long int) D.24060;
  D.24062 = __builtin_expect (D.24061, 0);
  if (D.24062 != 0) goto <D.24063>; else goto <D.24064>;
  <D.24063>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 183, "clause < ji->num_clauses");
  <D.24064>:
  i = 0;
  goto <D.22504>;
  <D.22503>:
  {
    struct MonoTryBlockHoleJitInfo * hole;

    hole = &table->holes[i];
    D.24065 = hole->clause;
    if (D.24065 == clause) goto <D.24066>; else goto <D.24067>;
    <D.24066>:
    D.24068 = hole->offset;
    if (D.24068 <= offset) goto <D.24069>; else goto <D.24070>;
    <D.24069>:
    D.24068 = hole->offset;
    D.24071 = hole->length;
    D.24072 = (unsigned int) D.24071;
    D.24073 = D.24068 + D.24072;
    if (D.24073 > offset) goto <D.24074>; else goto <D.24075>;
    <D.24074>:
    D.24043 = 0;
    return D.24043;
    <D.24075>:
    <D.24070>:
    <D.24067>:
  }
  i = i + 1;
  <D.22504>:
  D.24076 = table->num_holes;
  D.24077 = (int) D.24076;
  if (D.24077 > i) goto <D.22503>; else goto <D.22505>;
  <D.22505>:
  D.24043 = 1;
  return D.24043;
}


mono_handle_exception (struct MonoContext * ctx, void * obj)
{
  struct MonoPerfCounters * mono_perfcounters.64;
  unsigned int D.24080;
  unsigned int D.24081;
  gboolean D.24082;

  mono_perfcounters.64 = mono_perfcounters;
  D.24080 = mono_perfcounters.64->exceptions_thrown;
  D.24081 = D.24080 + 1;
  mono_perfcounters.64->exceptions_thrown = D.24081;
  D.24082 = mono_handle_exception_internal (ctx, obj, 0, 0B);
  return D.24082;
}


mono_handle_exception_internal (struct MonoContext * ctx, void * obj, gboolean resume, struct MonoJitInfo * * out_ji)
{
  unsigned int mono_jit_tls_id.65;
  struct MonoLMF * lmf.66;
  _Bool D.24086;
  long int D.24087;
  long int D.24088;
  struct MonoString * D.24093;
  struct MonoString * * D.24094;
  struct MonoException * D.24095;
  struct MonoException * D.24099;
  struct MonoClass * D.24102;
  struct MonoObject * D.24103;
  struct MonoObject * D.24106;
  struct MonoClass * D.24112;
  int D.22920;
  int iftmp.67;
  int D.22919;
  struct MonoVTable * D.24118;
  struct MonoClass * D.24119;
  const char[21] * D.24120;
  unsigned char D.24121;
  int D.24122;
  unsigned char D.24123;
  int D.24124;
  _Bool D.24125;
  _Bool D.24126;
  _Bool D.24127;
  const unsigned char * D.24130;
  unsigned char D.24131;
  int D.24132;
  const unsigned char * D.24133;
  unsigned char D.24134;
  int D.24135;
  _Bool D.24136;
  _Bool D.24137;
  const unsigned char * D.24140;
  unsigned char D.24141;
  int D.24142;
  const unsigned char * D.24143;
  unsigned char D.24144;
  int D.24145;
  _Bool D.24146;
  _Bool D.24147;
  const unsigned char * D.24150;
  unsigned char D.24151;
  int D.24152;
  const unsigned char * D.24153;
  unsigned char D.24154;
  int D.24155;
  const char * D.24157;
  struct MonoClass * D.24160;
  struct MonoString * D.24161;
  int D.22932;
  int iftmp.68;
  int D.22931;
  const char[27] * D.24165;
  unsigned char D.24166;
  int D.24167;
  unsigned char D.24168;
  int D.24169;
  _Bool D.24170;
  _Bool D.24171;
  _Bool D.24172;
  const unsigned char * D.24175;
  unsigned char D.24176;
  int D.24177;
  const unsigned char * D.24178;
  unsigned char D.24179;
  int D.24180;
  _Bool D.24181;
  _Bool D.24182;
  const unsigned char * D.24185;
  unsigned char D.24186;
  int D.24187;
  const unsigned char * D.24188;
  unsigned char D.24189;
  int D.24190;
  _Bool D.24191;
  _Bool D.24192;
  const unsigned char * D.24195;
  unsigned char D.24196;
  int D.24197;
  const unsigned char * D.24198;
  unsigned char D.24199;
  int D.24200;
  struct MonoString * D.24204;
  int (*<T3c86>) (struct MonoContext *, void *) call_filter.69;
  void * D.24208;
  int (*<T3c86>) (struct MonoContext *, void *) call_filter.70;
  void * D.24210;
  _Bool D.24211;
  long int D.24212;
  long int D.24213;
  void (*<T31c2>) (struct MonoObject *) D.24216;
  _Bool D.24217;
  long int D.24218;
  long int D.24219;
  struct MonoContext * D.24222;
  int D.24225;
  struct MonoMethod * iftmp.71;
  struct MonoVTable * D.24232;
  struct MonoClass * D.24233;
  int D.22952;
  int iftmp.72;
  int D.22951;
  const char[21] * D.24243;
  unsigned char D.24244;
  int D.24245;
  unsigned char D.24246;
  int D.24247;
  _Bool D.24248;
  _Bool D.24249;
  _Bool D.24250;
  const unsigned char * D.24253;
  unsigned char D.24254;
  int D.24255;
  const unsigned char * D.24256;
  unsigned char D.24257;
  int D.24258;
  _Bool D.24259;
  _Bool D.24260;
  const unsigned char * D.24263;
  unsigned char D.24264;
  int D.24265;
  const unsigned char * D.24266;
  unsigned char D.24267;
  int D.24268;
  _Bool D.24269;
  _Bool D.24270;
  const unsigned char * D.24273;
  unsigned char D.24274;
  int D.24275;
  const unsigned char * D.24276;
  unsigned char D.24277;
  int D.24278;
  int D.22961;
  int iftmp.73;
  int D.22960;
  const char[23] * D.24284;
  unsigned char D.24285;
  int D.24286;
  unsigned char D.24287;
  int D.24288;
  _Bool D.24289;
  _Bool D.24290;
  _Bool D.24291;
  const unsigned char * D.24294;
  unsigned char D.24295;
  int D.24296;
  const unsigned char * D.24297;
  unsigned char D.24298;
  int D.24299;
  _Bool D.24300;
  _Bool D.24301;
  const unsigned char * D.24304;
  unsigned char D.24305;
  int D.24306;
  const unsigned char * D.24307;
  unsigned char D.24308;
  int D.24309;
  _Bool D.24310;
  _Bool D.24311;
  const unsigned char * D.24314;
  unsigned char D.24315;
  int D.24316;
  const unsigned char * D.24317;
  unsigned char D.24318;
  int D.24319;
  char * iftmp.74;
  struct MonoVTable * D.24327;
  struct MonoClass * D.24328;
  const char * D.24329;
  const char * D.24330;
  unsigned int D.24331;
  void * D.24332;
  int D.24335;
  struct MonoDebugOptions * D.24340;
  int D.24341;
  struct MonoDebugOptions * D.24344;
  int D.24345;
  struct _IO_FILE * stderr.75;
  struct MonoJitInfo * ji.76;
  struct MonoMethod * D.24353;
  unsigned char D.24354;
  unsigned char D.24355;
  struct MonoJitInfo * prev_ji.77;
  struct MonoMethod * D.24361;
  struct MonoMethod * D.24362;
  struct MonoJitInfo * ji.78;
  struct MonoLMF * lmf.79;
  int first_filter_idx.80;
  <unnamed type> D.24378;
  unsigned int D.24379;
  _Bool D.24382;
  long int D.24383;
  long int D.24384;
  struct MonoJitInfo * ji.81;
  struct MonoLMF * * D.24390;
  struct MonoLMF * lmf.82;
  int D.24396;
  int D.24397;
  int D.24398;
  int D.24400;
  int D.24404;
  void * D.24405;
  int D.24406;
  int D.24412;
  unsigned int D.24414;
  unsigned char D.24417;
  unsigned char D.24418;
  int ex_obj.83;
  int D.24423;
  sizetype D.24424;
  int D.24425;
  sizetype D.24426;
  sizetype D.24427;
  void * * D.24428;
  int first_filter_idx.84;
  _Bool D.24432;
  struct MonoObject * D.24437;
  void * D.24438;
  _Bool D.24439;
  long int D.24440;
  long int D.24441;
  int D.24444;
  int D.24450;
  char * D.24451;
  struct MonoJitInfo * D.24452;
  _Bool D.24453;
  long int D.24454;
  long int D.24455;
  void * D.24458;
  struct MonoJitExceptionInfo * D.24459;
  int D.24460;
  int D.24465;
  int D.24468;
  char * D.24471;
  int D.24472;
  int D.24473;
  struct MonoLMF * * D.24474;
  struct MonoPerfCounters * mono_perfcounters.85;
  unsigned int D.24476;
  unsigned int frame_count.86;
  unsigned int D.24478;
  gboolean D.24481;
  int D.24482;
  int D.24487;
  int D.24490;
  char * D.24493;
  int D.24494;
  int D.24499;
  int D.24502;
  char * D.24505;
  unsigned int D.24506;
  unsigned int D.24507;
  struct MonoLMF * * D.24508;
  int D.24511;
  <unnamed-unsigned:15> D.24512;
  int D.24513;
  struct MonoDomain * domain;
  struct MonoJitInfo * ji;
  struct MonoJitInfo * prev_ji;
  static int (*<T3c86>) (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.65 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.65);
      lmf.66 = mono_get_lmf ();
      lmf = lmf.66;
      stack_overflow = 0;
      frame_count = 0;
      first_filter_idx = 0;
      non_exception = 0B;
      D.24086 = ctx == 0B;
      D.24087 = (long int) D.24086;
      D.24088 = __builtin_expect (D.24087, 0);
      if (D.24088 != 0) goto <D.24089>; else goto <D.24090>;
      <D.24089>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1517, "ctx != NULL");
      <D.24090>:
      if (obj == 0B) goto <D.24091>; else goto <D.24092>;
      <D.24091>:
      {
        struct MonoException * ex;

        ex = mono_get_exception_null_reference ();
        D.24093 = mono_string_new (domain, "Object reference not set to an instance of an object");
        D.24094 = &ex->message;
        mono_gc_wbarrier_set_field (ex, D.24094, D.24093);
        obj = ex;
      }
      <D.24092>:
      D.24095 = domain->stack_overflow_ex;
      if (D.24095 == obj) goto <D.24096>; else goto <D.24097>;
      <D.24096>:
      stack_overflow = 1;
      goto <D.24098>;
      <D.24097>:
      D.24099 = domain->null_reference_ex;
      if (D.24099 == obj) goto <D.24100>; else goto <D.24101>;
      <D.24100>:
      obj = mono_get_exception_null_reference ();
      <D.24101>:
      <D.24098>:
      D.24102 = mono_defaults.exception_class;
      D.24103 = mono_object_isinst (obj, D.24102);
      if (D.24103 == 0B) goto <D.24104>; else goto <D.24105>;
      <D.24104>:
      non_exception = obj;
      obj = mono_get_exception_runtime_wrapped (obj);
      <D.24105>:
      mono_ex = obj;
      D.24102 = mono_defaults.exception_class;
      D.24106 = mono_object_isinst (obj, D.24102);
      if (D.24106 != 0B) goto <D.24107>; else goto <D.24108>;
      <D.24107>:
      mono_ex = obj;
      goto <D.24109>;
      <D.24108>:
      mono_ex = 0B;
      <D.24109>:
      if (mono_ex != 0B) goto <D.24110>; else goto <D.24111>;
      <D.24110>:
      D.24112 = jit_tls->class_cast_from;
      if (D.24112 != 0B) goto <D.24113>; else goto <D.24114>;
      <D.24113>:
      {
        size_t __s1_len;
        size_t __s2_len;

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

          D.24118 = mono_ex->object.vtable;
          D.24119 = D.24118->klass;
          __s2 = D.24119->name;
          D.24120 = "InvalidCastException";
          D.24121 = MEM[(const unsigned char *)D.24120];
          D.24122 = (int) D.24121;
          D.24123 = *__s2;
          D.24124 = (int) D.24123;
          __result = D.24122 - D.24124;
          {
            D.24125 = __s2_len != 0;
            D.24126 = __result == 0;
            D.24127 = D.24125 & D.24126;
            if (D.24127 != 0) goto <D.24128>; else goto <D.24129>;
            <D.24128>:
            D.24130 = &MEM[(void *)"InvalidCastException" + 1B];
            D.24131 = *D.24130;
            D.24132 = (int) D.24131;
            D.24133 = __s2 + 1;
            D.24134 = *D.24133;
            D.24135 = (int) D.24134;
            __result = D.24132 - D.24135;
            D.24136 = __s2_len > 1;
            D.24126 = __result == 0;
            D.24137 = D.24136 & D.24126;
            if (D.24137 != 0) goto <D.24138>; else goto <D.24139>;
            <D.24138>:
            D.24140 = &MEM[(void *)"InvalidCastException" + 2B];
            D.24141 = *D.24140;
            D.24142 = (int) D.24141;
            D.24143 = __s2 + 2;
            D.24144 = *D.24143;
            D.24145 = (int) D.24144;
            __result = D.24142 - D.24145;
            D.24146 = __s2_len > 2;
            D.24126 = __result == 0;
            D.24147 = D.24146 & D.24126;
            if (D.24147 != 0) goto <D.24148>; else goto <D.24149>;
            <D.24148>:
            D.24150 = &MEM[(void *)"InvalidCastException" + 3B];
            D.24151 = *D.24150;
            D.24152 = (int) D.24151;
            D.24153 = __s2 + 3;
            D.24154 = *D.24153;
            D.24155 = (int) D.24154;
            __result = D.24152 - D.24155;
            <D.24149>:
            <D.24139>:
            <D.24129>:
          }
          D.22919 = __result;
        }
        iftmp.67 = -D.22919;
        goto <D.24156>;
        <D.24117>:
        D.24118 = mono_ex->object.vtable;
        D.24119 = D.24118->klass;
        D.24157 = D.24119->name;
        iftmp.67 = __builtin_strcmp (D.24157, "InvalidCastException");
        <D.24156>:
        D.22920 = iftmp.67;
      }
      if (D.22920 == 0) goto <D.24158>; else goto <D.24159>;
      <D.24158>:
      {
        char * from_name;
        char * to_name;
        char * msg;

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

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

          D.24118 = mono_ex->object.vtable;
          D.24119 = D.24118->klass;
          __s2 = D.24119->name;
          D.24165 = "ArrayTypeMismatchException";
          D.24166 = MEM[(const unsigned char *)D.24165];
          D.24167 = (int) D.24166;
          D.24168 = *__s2;
          D.24169 = (int) D.24168;
          __result = D.24167 - D.24169;
          {
            D.24170 = __s2_len != 0;
            D.24171 = __result == 0;
            D.24172 = D.24170 & D.24171;
            if (D.24172 != 0) goto <D.24173>; else goto <D.24174>;
            <D.24173>:
            D.24175 = &MEM[(void *)"ArrayTypeMismatchException" + 1B];
            D.24176 = *D.24175;
            D.24177 = (int) D.24176;
            D.24178 = __s2 + 1;
            D.24179 = *D.24178;
            D.24180 = (int) D.24179;
            __result = D.24177 - D.24180;
            D.24181 = __s2_len > 1;
            D.24171 = __result == 0;
            D.24182 = D.24181 & D.24171;
            if (D.24182 != 0) goto <D.24183>; else goto <D.24184>;
            <D.24183>:
            D.24185 = &MEM[(void *)"ArrayTypeMismatchException" + 2B];
            D.24186 = *D.24185;
            D.24187 = (int) D.24186;
            D.24188 = __s2 + 2;
            D.24189 = *D.24188;
            D.24190 = (int) D.24189;
            __result = D.24187 - D.24190;
            D.24191 = __s2_len > 2;
            D.24171 = __result == 0;
            D.24192 = D.24191 & D.24171;
            if (D.24192 != 0) goto <D.24193>; else goto <D.24194>;
            <D.24193>:
            D.24195 = &MEM[(void *)"ArrayTypeMismatchException" + 3B];
            D.24196 = *D.24195;
            D.24197 = (int) D.24196;
            D.24198 = __s2 + 3;
            D.24199 = *D.24198;
            D.24200 = (int) D.24199;
            __result = D.24197 - D.24200;
            <D.24194>:
            <D.24184>:
            <D.24174>:
          }
          D.22931 = __result;
        }
        iftmp.68 = -D.22931;
        goto <D.24201>;
        <D.24164>:
        D.24118 = mono_ex->object.vtable;
        D.24119 = D.24118->klass;
        D.24157 = D.24119->name;
        iftmp.68 = __builtin_strcmp (D.24157, "ArrayTypeMismatchException");
        <D.24201>:
        D.22932 = iftmp.68;
      }
      if (D.22932 == 0) goto <D.24202>; else goto <D.24203>;
      <D.24202>:
      {
        char * from_name;
        char * to_name;
        char * msg;

        D.24112 = jit_tls->class_cast_from;
        from_name = mono_type_get_full_name (D.24112);
        D.24160 = jit_tls->class_cast_to;
        to_name = mono_type_get_full_name (D.24160);
        msg = monoeg_g_strdup_printf ("Source array of type \'%s\' cannot be cast to destination array type \'%s\'.", from_name, to_name);
        D.24204 = mono_string_new (domain, msg);
        mono_ex->message = D.24204;
        monoeg_g_free (from_name);
        monoeg_g_free (to_name);
        monoeg_g_free (msg);
      }
      <D.24203>:
      <D.24114>:
      <D.24111>:
      call_filter.69 = call_filter;
      if (call_filter.69 == 0B) goto <D.24206>; else goto <D.24207>;
      <D.24206>:
      D.24208 = mono_get_call_filter ();
      call_filter.70 = (int (*<T3c86>) (struct MonoContext *, void *)) D.24208;
      call_filter = call_filter.70;
      <D.24207>:
      D.24210 = jit_tls->end_of_stack;
      D.24211 = D.24210 == 0B;
      D.24212 = (long int) D.24211;
      D.24213 = __builtin_expect (D.24212, 0);
      if (D.24213 != 0) goto <D.24214>; else goto <D.24215>;
      <D.24214>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1575, "jit_tls->end_of_stack");
      <D.24215>:
      D.24216 = jit_tls->abort_func;
      D.24217 = D.24216 == 0B;
      D.24218 = (long int) D.24217;
      D.24219 = __builtin_expect (D.24218, 0);
      if (D.24219 != 0) goto <D.24220>; else goto <D.24221>;
      <D.24220>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1576, "jit_tls->abort_func");
      <D.24221>:
      D.24222 = &jit_tls->orig_ex_ctx;
      memcpy (D.24222, ctx, 36);
      if (resume == 0) goto <D.24223>; else goto <D.24224>;
      <D.24223>:
      {
        gboolean res;
        struct MonoContext ctx_cp;

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

              try
                {
                  D.24102 = mono_defaults.exception_class;
                  system_exception_get_message = mono_class_get_method_from_name (D.24102, "get_Message", 0);
                  if (system_exception_get_message != 0B) goto <D.24229>; else goto <D.24230>;
                  <D.24229>:
                  iftmp.71 = mono_object_get_virtual_method (obj, system_exception_get_message);
                  goto <D.24231>;
                  <D.24230>:
                  iftmp.71 = 0B;
                  <D.24231>:
                  get_message = iftmp.71;
                  D.24232 = MEM[(struct MonoObject *)mono_ex].vtable;
                  D.24233 = D.24232->klass;
                  type_name = mono_class_get_name (D.24233);
                  msg = 0B;
                  exc = 0B;
                  if (get_message == 0B) goto <D.24234>; else goto <D.24235>;
                  <D.24234>:
                  message = 0B;
                  goto <D.24236>;
                  <D.24235>:
                  {
                    size_t __s1_len;
                    size_t __s2_len;

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

                      __s2 = type_name;
                      D.24243 = "OutOfMemoryException";
                      D.24244 = MEM[(const unsigned char *)D.24243];
                      D.24245 = (int) D.24244;
                      D.24246 = *__s2;
                      D.24247 = (int) D.24246;
                      __result = D.24245 - D.24247;
                      {
                        D.24248 = __s2_len != 0;
                        D.24249 = __result == 0;
                        D.24250 = D.24248 & D.24249;
                        if (D.24250 != 0) goto <D.24251>; else goto <D.24252>;
                        <D.24251>:
                        D.24253 = &MEM[(void *)"OutOfMemoryException" + 1B];
                        D.24254 = *D.24253;
                        D.24255 = (int) D.24254;
                        D.24256 = __s2 + 1;
                        D.24257 = *D.24256;
                        D.24258 = (int) D.24257;
                        __result = D.24255 - D.24258;
                        D.24259 = __s2_len > 1;
                        D.24249 = __result == 0;
                        D.24260 = D.24259 & D.24249;
                        if (D.24260 != 0) goto <D.24261>; else goto <D.24262>;
                        <D.24261>:
                        D.24263 = &MEM[(void *)"OutOfMemoryException" + 2B];
                        D.24264 = *D.24263;
                        D.24265 = (int) D.24264;
                        D.24266 = __s2 + 2;
                        D.24267 = *D.24266;
                        D.24268 = (int) D.24267;
                        __result = D.24265 - D.24268;
                        D.24269 = __s2_len > 2;
                        D.24249 = __result == 0;
                        D.24270 = D.24269 & D.24249;
                        if (D.24270 != 0) goto <D.24271>; else goto <D.24272>;
                        <D.24271>:
                        D.24273 = &MEM[(void *)"OutOfMemoryException" + 3B];
                        D.24274 = *D.24273;
                        D.24275 = (int) D.24274;
                        D.24276 = __s2 + 3;
                        D.24277 = *D.24276;
                        D.24278 = (int) D.24277;
                        __result = D.24275 - D.24278;
                        <D.24272>:
                        <D.24262>:
                        <D.24252>:
                      }
                      D.22951 = __result;
                    }
                    iftmp.72 = -D.22951;
                    goto <D.24279>;
                    <D.24242>:
                    iftmp.72 = __builtin_strcmp (type_name, "OutOfMemoryException");
                    <D.24279>:
                    D.22952 = iftmp.72;
                  }
                  if (D.22952 == 0) goto <D.24237>; else goto <D.24280>;
                  <D.24280>:
                  {
                    size_t __s1_len;
                    size_t __s2_len;

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

                      __s2 = type_name;
                      D.24284 = "StackOverflowException";
                      D.24285 = MEM[(const unsigned char *)D.24284];
                      D.24286 = (int) D.24285;
                      D.24287 = *__s2;
                      D.24288 = (int) D.24287;
                      __result = D.24286 - D.24288;
                      {
                        D.24289 = __s2_len != 0;
                        D.24290 = __result == 0;
                        D.24291 = D.24289 & D.24290;
                        if (D.24291 != 0) goto <D.24292>; else goto <D.24293>;
                        <D.24292>:
                        D.24294 = &MEM[(void *)"StackOverflowException" + 1B];
                        D.24295 = *D.24294;
                        D.24296 = (int) D.24295;
                        D.24297 = __s2 + 1;
                        D.24298 = *D.24297;
                        D.24299 = (int) D.24298;
                        __result = D.24296 - D.24299;
                        D.24300 = __s2_len > 1;
                        D.24290 = __result == 0;
                        D.24301 = D.24300 & D.24290;
                        if (D.24301 != 0) goto <D.24302>; else goto <D.24303>;
                        <D.24302>:
                        D.24304 = &MEM[(void *)"StackOverflowException" + 2B];
                        D.24305 = *D.24304;
                        D.24306 = (int) D.24305;
                        D.24307 = __s2 + 2;
                        D.24308 = *D.24307;
                        D.24309 = (int) D.24308;
                        __result = D.24306 - D.24309;
                        D.24310 = __s2_len > 2;
                        D.24290 = __result == 0;
                        D.24311 = D.24310 & D.24290;
                        if (D.24311 != 0) goto <D.24312>; else goto <D.24313>;
                        <D.24312>:
                        D.24314 = &MEM[(void *)"StackOverflowException" + 3B];
                        D.24315 = *D.24314;
                        D.24316 = (int) D.24315;
                        D.24317 = __s2 + 3;
                        D.24318 = *D.24317;
                        D.24319 = (int) D.24318;
                        __result = D.24316 - D.24319;
                        <D.24313>:
                        <D.24303>:
                        <D.24293>:
                      }
                      D.22960 = __result;
                    }
                    iftmp.73 = -D.22960;
                    goto <D.24320>;
                    <D.24283>:
                    iftmp.73 = __builtin_strcmp (type_name, "StackOverflowException");
                    <D.24320>:
                    D.22961 = iftmp.73;
                  }
                  if (D.22961 == 0) goto <D.24237>; else goto <D.24238>;
                  <D.24237>:
                  message = 0B;
                  msg = monoeg_g_strdup_printf ("(No exception message for: %s)\n", type_name);
                  goto <D.24239>;
                  <D.24238>:
                  message = mono_runtime_invoke (get_message, obj, 0B, &exc);
                  <D.24239>:
                  <D.24236>:
                  if (msg == 0B) goto <D.24321>; else goto <D.24322>;
                  <D.24321>:
                  if (message != 0B) goto <D.24324>; else goto <D.24325>;
                  <D.24324>:
                  iftmp.74 = mono_string_to_utf8 (message);
                  goto <D.24326>;
                  <D.24325>:
                  iftmp.74 = monoeg_strdup ("(System.Exception.Message property not available)");
                  <D.24326>:
                  msg = iftmp.74;
                  <D.24322>:
                  D.24327 = MEM[(struct MonoObject *)obj].vtable;
                  D.24328 = D.24327->klass;
                  D.24329 = D.24328->name;
                  D.24327 = MEM[(struct MonoObject *)obj].vtable;
                  D.24328 = D.24327->klass;
                  D.24330 = D.24328->name_space;
                  D.24331 = GetCurrentThreadId ();
                  D.24332 = (void *) D.24331;
                  monoeg_g_print ("[%p:] EXCEPTION handling: %s.%s: %s\n", D.24332, D.24330, D.24329, msg);
                  monoeg_g_free (msg);
                  if (mono_ex != 0B) goto <D.24333>; else goto <D.24334>;
                  <D.24333>:
                  D.24232 = MEM[(struct MonoObject *)mono_ex].vtable;
                  D.24233 = D.24232->klass;
                  D.24335 = mono_trace_eval_exception (D.24233);
                  if (D.24335 != 0) goto <D.24336>; else goto <D.24337>;
                  <D.24336>:
                  mono_print_thread_dump_from_ctx (ctx);
                  <D.24337>:
                  <D.24334>:
                }
              finally
                {
                  exc = {CLOBBER};
                }
            }
            <D.24227>:
            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.24338>; else goto <D.24339>;
            <D.24338>:
            D.24340 = mini_get_debug_options ();
            D.24341 = D.24340->break_on_exc;
            if (D.24341 != 0) goto <D.24342>; else goto <D.24343>;
            <D.24342>:
            __asm__ __volatile__("int $03");
            <D.24343>:
            mono_debugger_agent_handle_exception (obj, ctx, 0B);
            D.24344 = mini_get_debug_options ();
            D.24345 = D.24344->suspend_on_unhandled;
            if (D.24345 != 0) goto <D.24346>; else goto <D.24347>;
            <D.24346>:
            stderr.75 = stderr;
            fprintf (stderr.75, "Unhandled exception, suspending...\n");
            <D.22962>:
            goto <D.22962>;
            <D.24347>:
            mono_unhandled_exception (obj);
            goto <D.24349>;
            <D.24339>:
            {
              gboolean unhandled;

              unhandled = 0;
              ji.76 = ji;
              if (ji.76 != 0B) goto <D.24351>; else goto <D.24352>;
              <D.24351>:
              ji.76 = ji;
              D.24353 = jinfo_get_method (ji.76);
              D.24354 = BIT_FIELD_REF <*D.24353, 8, 160>;
              D.24355 = D.24354 & 124;
              if (D.24355 == 16) goto <D.24356>; else goto <D.24357>;
              <D.24356>:
              prev_ji.77 = prev_ji;
              if (prev_ji.77 != 0B) goto <D.24359>; else goto <D.24360>;
              <D.24359>:
              {
                struct MonoInternalThread * thread;

                thread = mono_thread_internal_current ();
                prev_ji.77 = prev_ji;
                D.24361 = jinfo_get_method (prev_ji.77);
                D.24362 = thread->async_invoke_method;
                if (D.24361 == D.24362) goto <D.24363>; else goto <D.24364>;
                <D.24363>:
                unhandled = 1;
                <D.24364>:
              }
              <D.24360>:
              <D.24357>:
              <D.24352>:
              if (unhandled != 0) goto <D.24365>; else goto <D.24366>;
              <D.24365>:
              mono_debugger_agent_handle_exception (obj, ctx, 0B);
              goto <D.24367>;
              <D.24366>:
              mono_debugger_agent_handle_exception (obj, ctx, &ctx_cp);
              <D.24367>:
            }
            <D.24349>:
          }
        finally
          {
            ctx_cp = {CLOBBER};
          }
      }
      <D.24224>:
      if (out_ji != 0B) goto <D.24368>; else goto <D.24369>;
      <D.24368>:
      *out_ji = 0B;
      <D.24369>:
      filter_idx = 0;
      initial_ctx = *ctx;
      <D.22981>:
      {
        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.24370>; else goto <D.24371>;
            <D.24370>:
            resume = 0;
            ji.78 = jit_tls->resume_state.ji;
            ji = ji.78;
            new_ctx = jit_tls->resume_state.new_ctx;
            clause_index_start = jit_tls->resume_state.clause_index;
            lmf.79 = jit_tls->resume_state.lmf;
            lmf = lmf.79;
            first_filter_idx.80 = jit_tls->resume_state.first_filter_idx;
            first_filter_idx = first_filter_idx.80;
            filter_idx = jit_tls->resume_state.filter_idx;
            goto <D.24375>;
            <D.24371>:
            {
              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.24376>; else goto <D.24377>;
                  <D.24376>:
                  D.24378 = frame.type;
                  D.24379 = D.24378 + 4294967295;
                  if (D.24379 <= 1) goto <D.24380>; else goto <D.24381>;
                  <D.24380>:
                  *ctx = new_ctx;
                  // predicted unlikely by continue predictor.
                  goto <D.22970>;
                  <D.24381>:
                  D.24378 = frame.type;
                  D.24382 = D.24378 != 0;
                  D.24383 = (long int) D.24382;
                  D.24384 = __builtin_expect (D.24383, 0);
                  if (D.24384 != 0) goto <D.24385>; else goto <D.24386>;
                  <D.24385>:
                  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1683, "frame.type == FRAME_TYPE_MANAGED");
                  <D.24386>:
                  ji.81 = frame.ji;
                  ji = ji.81;
                  <D.24377>:
                }
              finally
                {
                  frame = {CLOBBER};
                }
            }
            <D.24375>:
            if (unwind_res == 0) goto <D.24388>; else goto <D.24389>;
            <D.24388>:
            D.24390 = mono_get_lmf_addr ();
            lmf.82 = lmf;
            *D.24390 = lmf.82;
            D.24216 = jit_tls->abort_func;
            D.24216 (obj);
            monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 1692);
            <D.24389>:
            ji.76 = ji;
            method = jinfo_get_method (ji.76);
            frame_count = frame_count + 1;
            if (stack_overflow != 0) goto <D.24392>; else goto <D.24393>;
            <D.24392>:
            if (1 != 0) goto <D.24394>; else goto <D.24395>;
            <D.24394>:
            D.24396 = ctx->esp;
            D.24397 = initial_ctx.esp;
            D.24398 = D.24396 - D.24397;
            free_stack = (guint32) D.24398;
            goto <D.24399>;
            <D.24395>:
            D.24397 = initial_ctx.esp;
            D.24396 = ctx->esp;
            D.24400 = D.24397 - D.24396;
            free_stack = (guint32) D.24400;
            <D.24399>:
            goto <D.24401>;
            <D.24393>:
            free_stack = 16777215;
            <D.24401>:
            i = clause_index_start;
            goto <D.22979>;
            <D.22978>:
            {
              struct MonoJitExceptionInfo * ei;
              gboolean filtered;

              ji.76 = ji;
              ei = &ji.76->clauses[i];
              filtered = 0;
              if (free_stack <= 65536) goto <D.24402>; else goto <D.24403>;
              <D.24402>:
              // predicted unlikely by continue predictor.
              goto <D.22973>;
              <D.24403>:
              D.24404 = ctx->eip;
              D.24405 = (void *) D.24404;
              ji.76 = ji;
              D.24406 = is_address_protected (ji.76, ei, D.24405);
              if (D.24406 != 0) goto <D.24407>; else goto <D.24408>;
              <D.24407>:
              {
                struct MonoClass * catch_class;

                ji.76 = ji;
                catch_class = get_exception_catch_class (ei, ji.76, ctx);
                if (non_exception != 0B) goto <D.24411>; else goto <D.24409>;
                <D.24411>:
                D.24412 = wrap_non_exception_throws (method);
                if (D.24412 == 0) goto <D.24413>; else goto <D.24409>;
                <D.24413>:
                ex_obj = non_exception;
                goto <D.24410>;
                <D.24409>:
                ex_obj = obj;
                <D.24410>:
                D.24414 = ei->flags;
                if (D.24414 <= 1) goto <D.24415>; else goto <D.24416>;
                <D.24415>:
                ji.76 = ji;
                D.24417 = BIT_FIELD_REF <*ji.76, 8, 176>;
                D.24418 = D.24417 & 32;
                if (D.24418 != 0) goto <D.24419>; else goto <D.24420>;
                <D.24419>:
                ex_obj.83 = (int) ex_obj;
                ctx->eax = ex_obj.83;
                goto <D.24422>;
                <D.24420>:
                D.24423 = ei->exvar_offset;
                D.24424 = (sizetype) D.24423;
                D.24425 = ctx->ebp;
                D.24426 = (sizetype) D.24425;
                D.24427 = D.24424 + D.24426;
                D.24428 = (void * *) D.24427;
                *D.24428 = ex_obj;
                <D.24422>:
                <D.24416>:
                D.24414 = ei->flags;
                if (D.24414 == 1) goto <D.24429>; else goto <D.24430>;
                <D.24429>:
                first_filter_idx.84 = first_filter_idx;
                D.24432 = filter_idx == first_filter_idx.84;
                filtered = (gboolean) D.24432;
                filter_idx = filter_idx + 1;
                <D.24430>:
                D.24414 = ei->flags;
                if (D.24414 == 0) goto <D.24436>; else goto <D.24433>;
                <D.24436>:
                D.24437 = mono_object_isinst (ex_obj, catch_class);
                if (D.24437 != 0B) goto <D.24434>; else goto <D.24433>;
                <D.24433>:
                if (filtered != 0) goto <D.24434>; else goto <D.24435>;
                <D.24434>:
                D.24438 = jit_tls->handler_block_return_address;
                D.24439 = D.24438 != 0B;
                D.24440 = (long int) D.24439;
                D.24441 = __builtin_expect (D.24440, 0);
                if (D.24441 != 0) goto <D.24442>; else goto <D.24443>;
                <D.24442>:
                {
                  gboolean is_outside;
                  void * prot_bp;
                  void * catch_bp;

                  is_outside = 0;
                  D.24444 = jit_tls->handler_block_context.ebp;
                  prot_bp = (void *) D.24444;
                  D.24425 = ctx->ebp;
                  catch_bp = (void *) D.24425;
                  if (catch_bp > prot_bp) goto <D.24445>; else goto <D.24446>;
                  <D.24445>:
                  is_outside = 1;
                  goto <D.24447>;
                  <D.24446>:
                  if (catch_bp == prot_bp) goto <D.24448>; else goto <D.24449>;
                  <D.24448>:
                  D.24450 = jit_tls->handler_block_context.eip;
                  D.24451 = (char *) D.24450;
                  D.24452 = mini_jit_info_table_find (domain, D.24451, 0B);
                  ji.76 = ji;
                  D.24453 = D.24452 != ji.76;
                  D.24454 = (long int) D.24453;
                  D.24455 = __builtin_expect (D.24454, 0);
                  if (D.24455 != 0) goto <D.24456>; else goto <D.24457>;
                  <D.24456>:
                  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.24457>:
                  D.24458 = ei->handler_start;
                  D.24459 = jit_tls->handler_block;
                  ji.76 = ji;
                  D.24460 = is_address_protected (ji.76, D.24459, D.24458);
                  if (D.24460 == 0) goto <D.24461>; else goto <D.24462>;
                  <D.24461>:
                  is_outside = 1;
                  <D.24462>:
                  <D.24449>:
                  <D.24447>:
                  if (is_outside != 0) goto <D.24463>; else goto <D.24464>;
                  <D.24463>:
                  jit_tls->handler_block_return_address = 0B;
                  jit_tls->handler_block = 0B;
                  mono_thread_resume_interruption ();
                  <D.24464>:
                }
                <D.24443>:
                D.24465 = mono_trace_is_enabled ();
                if (D.24465 != 0) goto <D.24466>; else goto <D.24467>;
                <D.24466>:
                D.24468 = mono_trace_eval (method);
                if (D.24468 != 0) goto <D.24469>; else goto <D.24470>;
                <D.24469>:
                D.24471 = mono_method_full_name (method, 1);
                monoeg_g_print ("EXCEPTION: catch found at clause %d of %s\n", i, D.24471);
                <D.24470>:
                <D.24467>:
                jit_tls->orig_ex_ctx_set = 1;
                D.24414 = ei->flags;
                D.24472 = (int) D.24414;
                mono_profiler_exception_clause_handler (method, D.24472, i);
                jit_tls->orig_ex_ctx_set = 0;
                D.24458 = ei->handler_start;
                D.24473 = (int) D.24458;
                ctx->eip = D.24473;
                D.24474 = mono_get_lmf_addr ();
                lmf.82 = lmf;
                *D.24474 = lmf.82;
                mono_perfcounters.85 = mono_perfcounters;
                mono_perfcounters.85 = mono_perfcounters;
                D.24476 = mono_perfcounters.85->exceptions_depth;
                frame_count.86 = (unsigned int) frame_count;
                D.24478 = D.24476 + frame_count.86;
                mono_perfcounters.85->exceptions_depth = D.24478;
                D.24095 = domain->stack_overflow_ex;
                if (D.24095 == obj) goto <D.24479>; else goto <D.24480>;
                <D.24479>:
                jit_tls->handling_stack_ovf = 0;
                <D.24480>:
                D.24481 = 0;
                return D.24481;
                <D.24435>:
                D.24404 = ctx->eip;
                D.24405 = (void *) D.24404;
                ji.76 = ji;
                D.24482 = is_address_protected (ji.76, ei, D.24405);
                if (D.24482 != 0) goto <D.24483>; else goto <D.24484>;
                <D.24483>:
                D.24414 = ei->flags;
                if (D.24414 == 4) goto <D.24485>; else goto <D.24486>;
                <D.24485>:
                D.24487 = mono_trace_is_enabled ();
                if (D.24487 != 0) goto <D.24488>; else goto <D.24489>;
                <D.24488>:
                D.24490 = mono_trace_eval (method);
                if (D.24490 != 0) goto <D.24491>; else goto <D.24492>;
                <D.24491>:
                D.24493 = mono_method_full_name (method, 1);
                monoeg_g_print ("EXCEPTION: fault clause %d of %s\n", i, D.24493);
                <D.24492>:
                <D.24489>:
                jit_tls->orig_ex_ctx_set = 1;
                D.24414 = ei->flags;
                D.24472 = (int) D.24414;
                mono_profiler_exception_clause_handler (method, D.24472, i);
                jit_tls->orig_ex_ctx_set = 0;
                call_filter.69 = call_filter;
                D.24458 = ei->handler_start;
                call_filter.69 (ctx, D.24458);
                <D.24486>:
                <D.24484>:
                D.24404 = ctx->eip;
                D.24405 = (void *) D.24404;
                ji.76 = ji;
                D.24494 = is_address_protected (ji.76, ei, D.24405);
                if (D.24494 != 0) goto <D.24495>; else goto <D.24496>;
                <D.24495>:
                D.24414 = ei->flags;
                if (D.24414 == 2) goto <D.24497>; else goto <D.24498>;
                <D.24497>:
                D.24499 = mono_trace_is_enabled ();
                if (D.24499 != 0) goto <D.24500>; else goto <D.24501>;
                <D.24500>:
                D.24502 = mono_trace_eval (method);
                if (D.24502 != 0) goto <D.24503>; else goto <D.24504>;
                <D.24503>:
                D.24505 = mono_method_full_name (method, 1);
                monoeg_g_print ("EXCEPTION: finally clause %d of %s\n", i, D.24505);
                <D.24504>:
                <D.24501>:
                jit_tls->orig_ex_ctx_set = 1;
                D.24414 = ei->flags;
                D.24472 = (int) D.24414;
                mono_profiler_exception_clause_handler (method, D.24472, i);
                jit_tls->orig_ex_ctx_set = 0;
                mono_perfcounters.85 = mono_perfcounters;
                D.24506 = mono_perfcounters.85->exceptions_finallys;
                D.24507 = D.24506 + 1;
                mono_perfcounters.85->exceptions_finallys = D.24507;
                D.24508 = mono_get_lmf_addr ();
                lmf.82 = lmf;
                *D.24508 = lmf.82;
                ji.76 = ji;
                D.24417 = BIT_FIELD_REF <*ji.76, 8, 176>;
                D.24418 = D.24417 & 32;
                if (D.24418 != 0) goto <D.24509>; else goto <D.24510>;
                <D.24509>:
                jit_tls->resume_state.ex_obj = obj;
                ji.76 = ji;
                jit_tls->resume_state.ji = ji.76;
                D.24511 = i + 1;
                jit_tls->resume_state.clause_index = D.24511;
                jit_tls->resume_state.ctx = *ctx;
                jit_tls->resume_state.new_ctx = new_ctx;
                lmf.82 = lmf;
                jit_tls->resume_state.lmf = lmf.82;
                first_filter_idx.84 = first_filter_idx;
                jit_tls->resume_state.first_filter_idx = first_filter_idx.84;
                jit_tls->resume_state.filter_idx = filter_idx;
                D.24458 = ei->handler_start;
                D.24473 = (int) D.24458;
                ctx->eip = D.24473;
                D.24481 = 0;
                return D.24481;
                <D.24510>:
                call_filter.69 = call_filter;
                D.24458 = ei->handler_start;
                call_filter.69 (ctx, D.24458);
                <D.24498>:
                <D.24496>:
              }
              <D.24408>:
            }
            <D.22973>:
            i = i + 1;
            <D.22979>:
            ji.76 = ji;
            D.24512 = ji.76->num_clauses;
            D.24513 = (int) D.24512;
            if (D.24513 > i) goto <D.22978>; else goto <D.22980>;
            <D.22980>:
            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.22970>:
      goto <D.22981>;
      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.24523;

  if (str != 0B) goto <D.24521>; else goto <D.24522>;
  <D.24521>:
  D.24523 = __strdup (str);
  return D.24523;
  <D.24522>:
  D.24523 = 0B;
  return D.24523;
}


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.87;
  struct MonoLMF * lmf.88;
  _Bool D.24527;
  long int D.24528;
  long int D.24529;
  struct MonoException * D.24532;
  struct MonoClass * D.24535;
  struct MonoObject * D.24536;
  int (*<T3c86>) (struct MonoContext *, void *) call_filter.89;
  void * D.24543;
  int (*<T3c86>) (struct MonoContext *, void *) call_filter.90;
  void * D.24545;
  _Bool D.24546;
  long int D.24547;
  long int D.24548;
  void (*<T31c2>) (struct MonoObject *) D.24551;
  _Bool D.24552;
  long int D.24553;
  long int D.24554;
  <unnamed type> D.24567;
  unsigned int D.24568;
  _Bool D.24571;
  long int D.24572;
  long int D.24573;
  _Bool D.24578;
  _Bool D.24579;
  _Bool D.24580;
  struct MonoClass * D.24583;
  struct MonoArray * D.24584;
  struct MonoArray * * D.24585;
  struct MonoArray * D.24586;
  struct MonoArray * * D.24587;
  struct MonoString * D.24590;
  struct MonoString * * D.24591;
  gboolean D.24592;
  struct MonoDebugOptions * D.24593;
  int D.24594;
  unsigned char D.24597;
  unsigned char D.24598;
  char * D.24601;
  _Bool D.24606;
  _Bool D.24607;
  int D.24610;
  void * D.24611;
  void * D.24612;
  unsigned char D.24613;
  unsigned char D.24614;
  int D.24621;
  int D.24622;
  int D.24623;
  int D.24625;
  int D.24629;
  int D.24635;
  unsigned int D.24637;
  unsigned char D.24640;
  _Bool D.24641;
  _Bool D.24642;
  _Bool D.24643;
  struct MonoPerfCounters * mono_perfcounters.91;
  unsigned int D.24645;
  unsigned int D.24646;
  struct MonoArray * D.24651;
  struct MonoArray * D.24652;
  struct MonoString * D.24655;
  unsigned char D.24656;
  unsigned char D.24657;
  int ex_obj.92;
  int D.24662;
  sizetype D.24663;
  int D.24664;
  sizetype D.24665;
  sizetype D.24666;
  void * * D.24667;
  void * D.24668;
  _Bool D.24669;
  _Bool D.24670;
  _Bool D.24671;
  struct MonoArray * D.24682;
  struct MonoArray * D.24683;
  struct MonoString * D.24686;
  void * D.24687;
  int D.24688;
  struct MonoObject * D.24691;
  struct MonoArray * D.24696;
  struct MonoArray * D.24697;
  struct MonoString * D.24700;
  <unnamed-unsigned:15> D.24703;
  int D.24704;
  struct MonoDomain * domain;
  struct MonoJitInfo * ji;
  static int (*<T3c86>) (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.87 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.87);
      lmf.88 = mono_get_lmf ();
      lmf = lmf.88;
      initial_trace_ips = 0B;
      trace_ips = 0B;
      stack_overflow = 0;
      frame_count = 0;
      has_dynamic_methods = 0;
      D.24527 = ctx == 0B;
      D.24528 = (long int) D.24527;
      D.24529 = __builtin_expect (D.24528, 0);
      if (D.24529 != 0) goto <D.24530>; else goto <D.24531>;
      <D.24530>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1316, "ctx != NULL");
      <D.24531>:
      D.24532 = domain->stack_overflow_ex;
      if (D.24532 == obj) goto <D.24533>; else goto <D.24534>;
      <D.24533>:
      stack_overflow = 1;
      <D.24534>:
      mono_ex = obj;
      initial_trace_ips = mono_ex->trace_ips;
      D.24535 = mono_defaults.exception_class;
      D.24536 = mono_object_isinst (obj, D.24535);
      if (D.24536 != 0B) goto <D.24537>; else goto <D.24538>;
      <D.24537>:
      mono_ex = obj;
      initial_trace_ips = mono_ex->trace_ips;
      goto <D.24539>;
      <D.24538>:
      mono_ex = 0B;
      <D.24539>:
      call_filter.89 = call_filter;
      if (call_filter.89 == 0B) goto <D.24541>; else goto <D.24542>;
      <D.24541>:
      D.24543 = mono_get_call_filter ();
      call_filter.90 = (int (*<T3c86>) (struct MonoContext *, void *)) D.24543;
      call_filter = call_filter.90;
      <D.24542>:
      D.24545 = jit_tls->end_of_stack;
      D.24546 = D.24545 == 0B;
      D.24547 = (long int) D.24546;
      D.24548 = __builtin_expect (D.24547, 0);
      if (D.24548 != 0) goto <D.24549>; else goto <D.24550>;
      <D.24549>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1334, "jit_tls->end_of_stack");
      <D.24550>:
      D.24551 = jit_tls->abort_func;
      D.24552 = D.24551 == 0B;
      D.24553 = (long int) D.24552;
      D.24554 = __builtin_expect (D.24553, 0);
      if (D.24554 != 0) goto <D.24555>; else goto <D.24556>;
      <D.24555>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1335, "jit_tls->abort_func");
      <D.24556>:
      if (out_filter_idx != 0B) goto <D.24557>; else goto <D.24558>;
      <D.24557>:
      *out_filter_idx = -1;
      <D.24558>:
      if (out_ji != 0B) goto <D.24559>; else goto <D.24560>;
      <D.24559>:
      *out_ji = 0B;
      <D.24560>:
      if (out_prev_ji != 0B) goto <D.24561>; else goto <D.24562>;
      <D.24561>:
      *out_prev_ji = 0B;
      <D.24562>:
      filter_idx = 0;
      initial_ctx = *ctx;
      <D.22886>:
      {
        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.24563>; else goto <D.24564>;
            <D.24563>:
            *out_prev_ji = ji;
            <D.24564>:
            unwind_res = mono_find_jit_info_ext (domain, jit_tls, 0B, ctx, &new_ctx, 0B, &lmf, 0B, &frame);
            if (unwind_res != 0) goto <D.24565>; else goto <D.24566>;
            <D.24565>:
            D.24567 = frame.type;
            D.24568 = D.24567 + 4294967295;
            if (D.24568 <= 1) goto <D.24569>; else goto <D.24570>;
            <D.24569>:
            *ctx = new_ctx;
            // predicted unlikely by continue predictor.
            goto <D.22876>;
            <D.24570>:
            D.24567 = frame.type;
            D.24571 = D.24567 != 0;
            D.24572 = (long int) D.24571;
            D.24573 = __builtin_expect (D.24572, 0);
            if (D.24573 != 0) goto <D.24574>; else goto <D.24575>;
            <D.24574>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1363, "frame.type == FRAME_TYPE_MANAGED");
            <D.24575>:
            ji = frame.ji;
            <D.24566>:
            if (unwind_res == 0) goto <D.24576>; else goto <D.24577>;
            <D.24576>:
            D.24578 = mono_ex != 0B;
            D.24579 = initial_trace_ips == 0B;
            D.24580 = D.24578 & D.24579;
            if (D.24580 != 0) goto <D.24581>; else goto <D.24582>;
            <D.24581>:
            trace_ips = monoeg_g_list_reverse (trace_ips);
            D.24583 = mono_defaults.int_class;
            D.24584 = glist_to_array (trace_ips, D.24583);
            D.24585 = &mono_ex->trace_ips;
            mono_gc_wbarrier_set_field (mono_ex, D.24585, D.24584);
            D.24586 = build_native_trace ();
            D.24587 = &mono_ex->native_trace_ips;
            mono_gc_wbarrier_set_field (mono_ex, D.24587, D.24586);
            if (has_dynamic_methods != 0) goto <D.24588>; else goto <D.24589>;
            <D.24588>:
            D.24590 = ves_icall_System_Exception_get_trace (mono_ex);
            D.24591 = &mono_ex->stack_trace;
            mono_gc_wbarrier_set_field (mono_ex, D.24591, D.24590);
            <D.24589>:
            <D.24582>:
            monoeg_g_list_free (trace_ips);
            trace_ips = 0B;
            D.24592 = 0;
            return D.24592;
            <D.24577>:
            frame_count = frame_count + 1;
            method = jinfo_get_method (ji);
            D.24593 = mini_get_debug_options ();
            D.24594 = D.24593->reverse_pinvoke_exceptions;
            if (D.24594 != 0) goto <D.24595>; else goto <D.24596>;
            <D.24595>:
            D.24597 = BIT_FIELD_REF <*method, 8, 160>;
            D.24598 = D.24597 & 124;
            if (D.24598 == 20) goto <D.24599>; else goto <D.24600>;
            <D.24599>:
            D.24601 = 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.24601);
            <D.22877>:
            goto <D.22877>;
            <D.24600>:
            <D.24596>:
            D.24597 = BIT_FIELD_REF <*method, 8, 160>;
            D.24598 = D.24597 & 124;
            if (D.24598 != 16) goto <D.24602>; else goto <D.24603>;
            <D.24602>:
            if (mono_ex != 0B) goto <D.24604>; else goto <D.24605>;
            <D.24604>:
            D.24579 = initial_trace_ips == 0B;
            D.24606 = frame_count <= 999;
            D.24607 = D.24579 & D.24606;
            if (D.24607 != 0) goto <D.24608>; else goto <D.24609>;
            <D.24608>:
            D.24610 = ctx->eip;
            D.24611 = (void *) D.24610;
            trace_ips = monoeg_g_list_prepend (trace_ips, D.24611);
            D.24612 = get_generic_info_from_stack_frame (ji, ctx);
            trace_ips = monoeg_g_list_prepend (trace_ips, D.24612);
            <D.24609>:
            <D.24605>:
            <D.24603>:
            D.24613 = BIT_FIELD_REF <*method, 8, 168>;
            D.24614 = D.24613 & 2;
            if (D.24614 != 0) goto <D.24615>; else goto <D.24616>;
            <D.24615>:
            has_dynamic_methods = 1;
            <D.24616>:
            if (stack_overflow != 0) goto <D.24617>; else goto <D.24618>;
            <D.24617>:
            if (1 != 0) goto <D.24619>; else goto <D.24620>;
            <D.24619>:
            D.24621 = ctx->esp;
            D.24622 = initial_ctx.esp;
            D.24623 = D.24621 - D.24622;
            free_stack = (guint32) D.24623;
            goto <D.24624>;
            <D.24620>:
            D.24622 = initial_ctx.esp;
            D.24621 = ctx->esp;
            D.24625 = D.24622 - D.24621;
            free_stack = (guint32) D.24625;
            <D.24624>:
            goto <D.24626>;
            <D.24618>:
            free_stack = 16777215;
            <D.24626>:
            i = clause_index_start;
            goto <D.22884>;
            <D.22883>:
            {
              struct MonoJitExceptionInfo * ei;
              gboolean filtered;

              ei = &ji->clauses[i];
              filtered = 0;
              if (free_stack <= 65536) goto <D.24627>; else goto <D.24628>;
              <D.24627>:
              // predicted unlikely by continue predictor.
              goto <D.22880>;
              <D.24628>:
              D.24610 = ctx->eip;
              D.24611 = (void *) D.24610;
              D.24629 = is_address_protected (ji, ei, D.24611);
              if (D.24629 != 0) goto <D.24630>; else goto <D.24631>;
              <D.24630>:
              {
                struct MonoClass * catch_class;

                catch_class = get_exception_catch_class (ei, ji, ctx);
                if (non_exception != 0B) goto <D.24634>; else goto <D.24632>;
                <D.24634>:
                D.24635 = wrap_non_exception_throws (method);
                if (D.24635 == 0) goto <D.24636>; else goto <D.24632>;
                <D.24636>:
                ex_obj = non_exception;
                goto <D.24633>;
                <D.24632>:
                ex_obj = obj;
                <D.24633>:
                D.24637 = ei->flags;
                if (D.24637 == 1) goto <D.24638>; else goto <D.24639>;
                <D.24638>:
                {
                  gboolean is_user_frame;

                  D.24597 = BIT_FIELD_REF <*method, 8, 160>;
                  D.24640 = D.24597 & 124;
                  D.24641 = D.24640 == 0;
                  D.24642 = D.24640 == 68;
                  D.24643 = D.24641 | D.24642;
                  is_user_frame = (gboolean) D.24643;
                  mono_perfcounters.91 = mono_perfcounters;
                  D.24645 = mono_perfcounters.91->exceptions_filters;
                  D.24646 = D.24645 + 1;
                  mono_perfcounters.91->exceptions_filters = D.24646;
                  if (is_user_frame != 0) goto <D.24647>; else goto <D.24648>;
                  <D.24647>:
                  D.24578 = mono_ex != 0B;
                  D.24579 = initial_trace_ips == 0B;
                  D.24580 = D.24578 & D.24579;
                  if (D.24580 != 0) goto <D.24649>; else goto <D.24650>;
                  <D.24649>:
                  trace_ips = monoeg_g_list_reverse (trace_ips);
                  D.24583 = mono_defaults.int_class;
                  D.24651 = glist_to_array (trace_ips, D.24583);
                  D.24585 = &mono_ex->trace_ips;
                  mono_gc_wbarrier_set_field (mono_ex, D.24585, D.24651);
                  D.24652 = build_native_trace ();
                  D.24587 = &mono_ex->native_trace_ips;
                  mono_gc_wbarrier_set_field (mono_ex, D.24587, D.24652);
                  if (has_dynamic_methods != 0) goto <D.24653>; else goto <D.24654>;
                  <D.24653>:
                  D.24655 = ves_icall_System_Exception_get_trace (mono_ex);
                  D.24591 = &mono_ex->stack_trace;
                  mono_gc_wbarrier_set_field (mono_ex, D.24591, D.24655);
                  <D.24654>:
                  <D.24650>:
                  monoeg_g_list_free (trace_ips);
                  trace_ips = 0B;
                  <D.24648>:
                  D.24656 = BIT_FIELD_REF <*ji, 8, 176>;
                  D.24657 = D.24656 & 32;
                  if (D.24657 != 0) goto <D.24658>; else goto <D.24659>;
                  <D.24658>:
                  ex_obj.92 = (int) ex_obj;
                  ctx->eax = ex_obj.92;
                  goto <D.24661>;
                  <D.24659>:
                  D.24662 = ei->exvar_offset;
                  D.24663 = (sizetype) D.24662;
                  D.24664 = ctx->ebp;
                  D.24665 = (sizetype) D.24664;
                  D.24666 = D.24663 + D.24665;
                  D.24667 = (void * *) D.24666;
                  *D.24667 = ex_obj;
                  <D.24661>:
                  mono_debugger_agent_begin_exception_filter (mono_ex, ctx, &initial_ctx);
                  call_filter.89 = call_filter;
                  D.24668 = ei->data.filter;
                  filtered = call_filter.89 (ctx, D.24668);
                  mono_debugger_agent_end_exception_filter (mono_ex, ctx, &initial_ctx);
                  D.24669 = filtered != 0;
                  D.24670 = out_filter_idx != 0B;
                  D.24671 = D.24669 & D.24670;
                  if (D.24671 != 0) goto <D.24672>; else goto <D.24673>;
                  <D.24672>:
                  *out_filter_idx = filter_idx;
                  <D.24673>:
                  if (out_ji != 0B) goto <D.24674>; else goto <D.24675>;
                  <D.24674>:
                  *out_ji = ji;
                  <D.24675>:
                  filter_idx = filter_idx + 1;
                  if (filtered != 0) goto <D.24676>; else goto <D.24677>;
                  <D.24676>:
                  if (is_user_frame == 0) goto <D.24678>; else goto <D.24679>;
                  <D.24678>:
                  D.24578 = mono_ex != 0B;
                  D.24579 = initial_trace_ips == 0B;
                  D.24580 = D.24578 & D.24579;
                  if (D.24580 != 0) goto <D.24680>; else goto <D.24681>;
                  <D.24680>:
                  trace_ips = monoeg_g_list_reverse (trace_ips);
                  D.24583 = mono_defaults.int_class;
                  D.24682 = glist_to_array (trace_ips, D.24583);
                  D.24585 = &mono_ex->trace_ips;
                  mono_gc_wbarrier_set_field (mono_ex, D.24585, D.24682);
                  D.24683 = build_native_trace ();
                  D.24587 = &mono_ex->native_trace_ips;
                  mono_gc_wbarrier_set_field (mono_ex, D.24587, D.24683);
                  if (has_dynamic_methods != 0) goto <D.24684>; else goto <D.24685>;
                  <D.24684>:
                  D.24686 = ves_icall_System_Exception_get_trace (mono_ex);
                  D.24591 = &mono_ex->stack_trace;
                  mono_gc_wbarrier_set_field (mono_ex, D.24591, D.24686);
                  <D.24685>:
                  <D.24681>:
                  monoeg_g_list_free (trace_ips);
                  trace_ips = 0B;
                  <D.24679>:
                  D.24687 = ei->handler_start;
                  D.24688 = (int) D.24687;
                  ctx->eip = D.24688;
                  D.24592 = 1;
                  return D.24592;
                  <D.24677>:
                }
                <D.24639>:
                D.24637 = ei->flags;
                if (D.24637 == 0) goto <D.24689>; else goto <D.24690>;
                <D.24689>:
                D.24691 = mono_object_isinst (ex_obj, catch_class);
                if (D.24691 != 0B) goto <D.24692>; else goto <D.24693>;
                <D.24692>:
                D.24578 = mono_ex != 0B;
                D.24579 = initial_trace_ips == 0B;
                D.24580 = D.24578 & D.24579;
                if (D.24580 != 0) goto <D.24694>; else goto <D.24695>;
                <D.24694>:
                trace_ips = monoeg_g_list_reverse (trace_ips);
                D.24583 = mono_defaults.int_class;
                D.24696 = glist_to_array (trace_ips, D.24583);
                D.24585 = &mono_ex->trace_ips;
                mono_gc_wbarrier_set_field (mono_ex, D.24585, D.24696);
                D.24697 = build_native_trace ();
                D.24587 = &mono_ex->native_trace_ips;
                mono_gc_wbarrier_set_field (mono_ex, D.24587, D.24697);
                if (has_dynamic_methods != 0) goto <D.24698>; else goto <D.24699>;
                <D.24698>:
                D.24700 = ves_icall_System_Exception_get_trace (mono_ex);
                D.24591 = &mono_ex->stack_trace;
                mono_gc_wbarrier_set_field (mono_ex, D.24591, D.24700);
                <D.24699>:
                <D.24695>:
                monoeg_g_list_free (trace_ips);
                trace_ips = 0B;
                if (out_ji != 0B) goto <D.24701>; else goto <D.24702>;
                <D.24701>:
                *out_ji = ji;
                <D.24702>:
                D.24687 = ei->handler_start;
                D.24688 = (int) D.24687;
                ctx->eip = D.24688;
                D.24592 = 1;
                return D.24592;
                <D.24693>:
                <D.24690>:
              }
              <D.24631>:
            }
            <D.22880>:
            i = i + 1;
            <D.22884>:
            D.24703 = ji->num_clauses;
            D.24704 = (int) D.24703;
            if (D.24704 > i) goto <D.22883>; else goto <D.22885>;
            <D.22885>:
            *ctx = new_ctx;
          }
        finally
          {
            new_ctx = {CLOBBER};
            frame = {CLOBBER};
          }
      }
      <D.22876>:
      goto <D.22886>;
      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.24712;
  unsigned int D.24713;
  unsigned int len.93;
  unsigned int i.94;
  void * D.24716;
  struct MonoDomain * domain;
  struct MonoArray * res;
  int len;
  int i;

  domain = mono_domain_get ();
  if (list == 0B) goto <D.24710>; else goto <D.24711>;
  <D.24710>:
  D.24712 = 0B;
  return D.24712;
  <D.24711>:
  D.24713 = monoeg_g_list_length (list);
  len = (int) D.24713;
  len.93 = (unsigned int) len;
  res = mono_array_new (domain, eclass, len.93);
  i = 0;
  goto <D.22786>;
  <D.22785>:
  {
    void * * __p;

    i.94 = (unsigned int) i;
    __p = mono_array_addr_with_size (res, 4, i.94);
    D.24716 = list->data;
    *__p = D.24716;
  }
  list = list->next;
  i = i + 1;
  <D.22786>:
  if (list != 0B) goto <D.22785>; else goto <D.22787>;
  <D.22787>:
  D.24712 = res;
  return D.24712;
}


build_native_trace ()
{
  struct MonoArray * D.24718;

  D.24718 = 0B;
  return D.24718;
}


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

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


get_exception_catch_class (struct MonoJitExceptionInfo * ei, struct MonoJitInfo * ji, struct MonoContext * ctx)
{
  unsigned int D.24725;
  struct MonoClass * D.24726;
  unsigned char D.24729;
  unsigned char D.24730;
  struct MonoGenericJitInfo * D.24732;
  unsigned char D.24733;
  unsigned char D.24734;
  void * D.24735;
  struct MonoType * D.24736;
  struct MonoClass * catch_class;
  struct MonoType * inflated_type;
  struct MonoGenericContext context;

  try
    {
      catch_class = ei->data.catch_class;
      if (catch_class == 0B) goto <D.24722>; else goto <D.24724>;
      <D.24724>:
      D.24725 = ei->flags;
      if (D.24725 != 0) goto <D.24722>; else goto <D.24723>;
      <D.24722>:
      D.24726 = 0B;
      return D.24726;
      <D.24723>:
      D.24729 = BIT_FIELD_REF <*ji, 8, 176>;
      D.24730 = D.24729 & 2;
      if (D.24730 == 0) goto <D.24727>; else goto <D.24731>;
      <D.24731>:
      D.24732 = mono_jit_info_get_generic_jit_info (ji);
      D.24733 = BIT_FIELD_REF <*D.24732, 8, 136>;
      D.24734 = D.24733 & 1;
      if (D.24734 == 0) goto <D.24727>; else goto <D.24728>;
      <D.24727>:
      D.24726 = catch_class;
      return D.24726;
      <D.24728>:
      D.24735 = get_generic_info_from_stack_frame (ji, ctx);
      context = get_generic_context_from_stack_frame (ji, D.24735);
      D.24736 = &catch_class->byval_arg;
      inflated_type = mono_class_inflate_generic_type (D.24736, &context);
      catch_class = mono_class_from_mono_type (inflated_type);
      mono_metadata_free_type (inflated_type);
      D.24726 = catch_class;
      return D.24726;
    }
  finally
    {
      context = {CLOBBER};
    }
}


wrap_non_exception_throws (struct MonoMethod * m)
{
  struct MonoClass * D.24739;
  struct MonoImage * D.24740;
  _Bool D.24741;
  long int D.24742;
  long int D.24743;
  unsigned char D.24746;
  gboolean D.24749;
  unsigned char D.24750;
  struct MonoClass * klass.97;
  struct MonoClass * tmp_klass.95;
  struct MonoImage * D.24756;
  struct MonoClass * tmp_klass.96;
  _Bool D.24758;
  long int D.24759;
  long int D.24760;
  struct MonoMethod * D.24767;
  struct MonoClass * D.24769;
  struct MonoClass * klass.98;
  unsigned int D.24771;
  const mono_byte * p.99;
  const gchar * p.100;
  short unsigned int D.24774;
  _Bool D.24775;
  long int D.24776;
  long int D.24777;
  const gchar * p.101;
  char D.24783;
  const gchar * p.102;
  unsigned int D.24787;
  int D.24788;
  unsigned int D.24789;
  unsigned int name_len.103;
  sizetype name_len.104;
  char * D.24792;
  const gchar * p.105;
  int D.22838;
  int iftmp.106;
  int D.22837;
  const char[23] * D.24797;
  unsigned char D.24798;
  int D.24799;
  unsigned char D.24800;
  int D.24801;
  _Bool D.24802;
  _Bool D.24803;
  _Bool D.24804;
  const unsigned char * D.24807;
  unsigned char D.24808;
  int D.24809;
  const unsigned char * D.24810;
  unsigned char D.24811;
  int D.24812;
  _Bool D.24813;
  _Bool D.24814;
  const unsigned char * D.24817;
  unsigned char D.24818;
  int D.24819;
  const unsigned char * D.24820;
  unsigned char D.24821;
  int D.24822;
  _Bool D.24823;
  _Bool D.24824;
  const unsigned char * D.24827;
  unsigned char D.24828;
  int D.24829;
  const unsigned char * D.24830;
  unsigned char D.24831;
  int D.24832;
  _Bool D.24834;
  long int D.24835;
  long int D.24836;
  int D.24839;
  unsigned char D.24840;
  struct MonoAssembly * ass;
  struct MonoCustomAttrInfo * attrs;
  static struct MonoClass * klass;
  int i;
  gboolean val;

  D.24739 = m->klass;
  D.24740 = D.24739->image;
  ass = D.24740->assembly;
  val = 0;
  D.24741 = ass == 0B;
  D.24742 = (long int) D.24741;
  D.24743 = __builtin_expect (D.24742, 0);
  if (D.24743 != 0) goto <D.24744>; else goto <D.24745>;
  <D.24744>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1196, "ass");
  <D.24745>:
  D.24746 = ass->wrap_non_exception_throws_inited;
  if (D.24746 != 0) goto <D.24747>; else goto <D.24748>;
  <D.24747>:
  D.24750 = ass->wrap_non_exception_throws;
  D.24749 = (gboolean) D.24750;
  return D.24749;
  <D.24748>:
  {
    static struct MonoClass * tmp_klass;

    {
      tmp_klass.95 = tmp_klass;
      if (tmp_klass.95 == 0B) goto <D.24752>; else goto <D.24753>;
      <D.24752>:
      if (0 != 0) goto <D.24754>; else goto <D.24755>;
      <D.24754>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1200, "mono_defaults.corlib == mono_defaults.corlib");
      <D.24755>:
      D.24756 = mono_defaults.corlib;
      tmp_klass.96 = mono_class_from_name (D.24756, "System.Runtime.CompilerServices", "RuntimeCompatibilityAttribute");
      tmp_klass = tmp_klass.96;
      tmp_klass.95 = tmp_klass;
      D.24758 = tmp_klass.95 == 0B;
      D.24759 = (long int) D.24758;
      D.24760 = __builtin_expect (D.24759, 0);
      if (D.24760 != 0) goto <D.24761>; else goto <D.24762>;
      <D.24761>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1200, "tmp_klass");
      <D.24762>:
      <D.24753>:
    }
    klass.97 = tmp_klass;
  }
  klass = klass.97;
  attrs = mono_custom_attrs_from_assembly (ass);
  if (attrs != 0B) goto <D.24763>; else goto <D.24764>;
  <D.24763>:
  i = 0;
  goto <D.22840>;
  <D.22839>:
  {
    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.24767 = attr->ctor;
        if (D.24767 == 0B) goto <D.24765>; else goto <D.24768>;
        <D.24768>:
        D.24767 = attr->ctor;
        D.24769 = D.24767->klass;
        klass.98 = klass;
        if (D.24769 != klass.98) goto <D.24765>; else goto <D.24766>;
        <D.24765>:
        // predicted unlikely by continue predictor.
        goto <D.22829>;
        <D.24766>:
        D.24771 = attr->data_size;
        len = (int) D.24771;
        p.99 = attr->data;
        p = p.99;
        p.100 = p;
        D.24774 = MEM[(const guint16 *)p.100];
        D.24775 = D.24774 != 1;
        D.24776 = (long int) D.24775;
        D.24777 = __builtin_expect (D.24776, 0);
        if (D.24777 != 0) goto <D.24778>; else goto <D.24779>;
        <D.24778>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1215, "read16 (p) == 0x0001");
        <D.24779>:
        p.100 = p;
        p.101 = p.100 + 2;
        p = p.101;
        p.100 = p;
        D.24774 = MEM[(const guint16 *)p.100];
        num_named = (int) D.24774;
        if (num_named != 1) goto <D.24781>; else goto <D.24782>;
        <D.24781>:
        // predicted unlikely by continue predictor.
        goto <D.22829>;
        <D.24782>:
        p.100 = p;
        p.101 = p.100 + 2;
        p = p.101;
        p.100 = p;
        D.24783 = *p.100;
        named_type = (int) D.24783;
        p.100 = p;
        p.102 = p.100 + 1;
        p = p.102;
        p.100 = p;
        D.24783 = *p.100;
        data_type = (int) D.24783;
        p.100 = p;
        p.102 = p.100 + 1;
        p = p.102;
        if (named_type != 84) goto <D.24785>; else goto <D.24786>;
        <D.24785>:
        // predicted unlikely by continue predictor.
        goto <D.22829>;
        <D.24786>:
        p.100 = p;
        D.24787 = mono_metadata_decode_blob_size (p.100, &p);
        name_len = (int) D.24787;
        D.24788 = name_len + 1;
        D.24789 = (unsigned int) D.24788;
        name = monoeg_malloc (D.24789);
        name_len.103 = (unsigned int) name_len;
        p.100 = p;
        memcpy (name, p.100, name_len.103);
        name_len.104 = (sizetype) name_len;
        D.24792 = name + name_len.104;
        *D.24792 = 0;
        p.100 = p;
        name_len.104 = (sizetype) name_len;
        p.105 = p.100 + name_len.104;
        p = p.105;
        {
          size_t __s1_len;
          size_t __s2_len;

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

            __s2 = name;
            D.24797 = "WrapNonExceptionThrows";
            D.24798 = MEM[(const unsigned char *)D.24797];
            D.24799 = (int) D.24798;
            D.24800 = *__s2;
            D.24801 = (int) D.24800;
            __result = D.24799 - D.24801;
            {
              D.24802 = __s2_len != 0;
              D.24803 = __result == 0;
              D.24804 = D.24802 & D.24803;
              if (D.24804 != 0) goto <D.24805>; else goto <D.24806>;
              <D.24805>:
              D.24807 = &MEM[(void *)"WrapNonExceptionThrows" + 1B];
              D.24808 = *D.24807;
              D.24809 = (int) D.24808;
              D.24810 = __s2 + 1;
              D.24811 = *D.24810;
              D.24812 = (int) D.24811;
              __result = D.24809 - D.24812;
              D.24813 = __s2_len > 1;
              D.24803 = __result == 0;
              D.24814 = D.24813 & D.24803;
              if (D.24814 != 0) goto <D.24815>; else goto <D.24816>;
              <D.24815>:
              D.24817 = &MEM[(void *)"WrapNonExceptionThrows" + 2B];
              D.24818 = *D.24817;
              D.24819 = (int) D.24818;
              D.24820 = __s2 + 2;
              D.24821 = *D.24820;
              D.24822 = (int) D.24821;
              __result = D.24819 - D.24822;
              D.24823 = __s2_len > 2;
              D.24803 = __result == 0;
              D.24824 = D.24823 & D.24803;
              if (D.24824 != 0) goto <D.24825>; else goto <D.24826>;
              <D.24825>:
              D.24827 = &MEM[(void *)"WrapNonExceptionThrows" + 3B];
              D.24828 = *D.24827;
              D.24829 = (int) D.24828;
              D.24830 = __s2 + 3;
              D.24831 = *D.24830;
              D.24832 = (int) D.24831;
              __result = D.24829 - D.24832;
              <D.24826>:
              <D.24816>:
              <D.24806>:
            }
            D.22837 = __result;
          }
          iftmp.106 = -D.22837;
          goto <D.24833>;
          <D.24796>:
          iftmp.106 = __builtin_strcmp (name, "WrapNonExceptionThrows");
          <D.24833>:
          D.22838 = iftmp.106;
        }
        D.24834 = D.22838 != 0;
        D.24835 = (long int) D.24834;
        D.24836 = __builtin_expect (D.24835, 0);
        if (D.24836 != 0) goto <D.24837>; else goto <D.24838>;
        <D.24837>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1233, "!strcmp (name, \"WrapNonExceptionThrows\")");
        <D.24838>:
        monoeg_g_free (name);
        p.100 = p;
        D.24783 = *p.100;
        val = (gboolean) D.24783;
      }
    finally
      {
        p = {CLOBBER};
      }
  }
  <D.22829>:
  i = i + 1;
  <D.22840>:
  D.24839 = attrs->num_attrs;
  if (D.24839 > i) goto <D.22839>; else goto <D.22841>;
  <D.22841>:
  mono_custom_attrs_free (attrs);
  <D.24764>:
  D.24840 = (unsigned char) val;
  ass->wrap_non_exception_throws = D.24840;
  mono_memory_barrier ();
  ass->wrap_non_exception_throws_inited = 1;
  D.24749 = val;
  return D.24749;
}


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.24844;
  void (*<T479>) (void) func;

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


mono_handle_soft_stack_ovf (struct MonoJitTlsData * jit_tls, struct MonoJitInfo * ji, void * ctx, guint8 * fault_addr)
{
  unsigned int D.24846;
  void * D.24849;
  guint8 * D.24852;
  int D.24855;
  unsigned int D.24856;
  int D.24857;
  unsigned int D.24858;
  guint8 * D.24860;
  sizetype D.24861;
  void * D.24862;
  void * D.24865;
  struct _IO_FILE * stderr.107;
  unsigned int D.24867;
  void * restore_stack_protection_tramp.108;
  gboolean D.24872;

  D.24846 = jit_tls->stack_ovf_guard_size;
  if (D.24846 != 0) goto <D.24847>; else goto <D.24848>;
  <D.24847>:
  D.24849 = jit_tls->stack_ovf_guard_base;
  if (D.24849 <= fault_addr) goto <D.24850>; else goto <D.24851>;
  <D.24850>:
  D.24849 = jit_tls->stack_ovf_guard_base;
  D.24846 = jit_tls->stack_ovf_guard_size;
  D.24852 = D.24849 + D.24846;
  if (D.24852 > fault_addr) goto <D.24853>; else goto <D.24854>;
  <D.24853>:
  {
    guint32 guard_size;
    gboolean handled;

    handled = 0;
    D.24846 = jit_tls->stack_ovf_guard_size;
    D.24855 = mono_pagesize ();
    D.24856 = (unsigned int) D.24855;
    guard_size = D.24846 - D.24856;
    goto <D.23044>;
    <D.23043>:
    D.24857 = mono_pagesize ();
    D.24858 = (unsigned int) D.24857;
    guard_size = guard_size - D.24858;
    <D.23044>:
    if (guard_size != 0) goto <D.24859>; else goto <D.23045>;
    <D.24859>:
    D.24849 = jit_tls->stack_ovf_guard_base;
    D.24860 = D.24849 + guard_size;
    if (D.24860 > fault_addr) goto <D.23043>; else goto <D.23045>;
    <D.23045>:
    D.24846 = jit_tls->stack_ovf_guard_size;
    guard_size = D.24846 - guard_size;
    D.24849 = jit_tls->stack_ovf_guard_base;
    D.24846 = jit_tls->stack_ovf_guard_size;
    D.24861 = D.24846 - guard_size;
    D.24862 = D.24849 + D.24861;
    mono_mprotect (D.24862, guard_size, 3);
    if (handled == 0) goto <D.24863>; else goto <D.24864>;
    <D.24863>:
    D.24865 = mono_arch_ip_from_context (ctx);
    stderr.107 = stderr;
    fprintf (stderr.107, "Stack overflow in unmanaged: IP: %p, fault addr: %p\n", D.24865, fault_addr);
    D.24867 = jit_tls->handling_stack_ovf;
    if (D.24867 == 0) goto <D.24868>; else goto <D.24869>;
    <D.24868>:
    restore_stack_protection_tramp.108 = restore_stack_protection_tramp;
    jit_tls->restore_stack_prot = restore_stack_protection_tramp.108;
    jit_tls->handling_stack_ovf = 1;
    goto <D.24871>;
    <D.24869>:
    <D.24871>:
    <D.24864>:
    D.24872 = 1;
    return D.24872;
  }
  <D.24854>:
  <D.24851>:
  <D.24848>:
  D.24872 = 0;
  return D.24872;
}


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

  try
    {
      D.24874 = mono_arch_ip_from_context (ctx);
      stderr.109 = stderr;
      fprintf (stderr.109, "Stack overflow: IP: %p, fault addr: %p\n", D.24874, fault_addr);
      mono_arch_sigctx_to_monoctx (ctx, &mctx);
      stderr.109 = stderr;
      fprintf (stderr.109, "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.24876;
  int D.24881;
  int D.24884;
  gboolean D.24885;
  struct MonoMethod * D.24886;
  struct MonoDomain * D.24889;
  int D.24890;
  unsigned int D.24891;
  struct _IO_FILE * stderr.110;
  struct MonoMethod * method;
  struct PrintOverflowUserData * user_data;
  gchar * location;

  method = 0B;
  user_data = data;
  D.24876 = frame->ji;
  if (D.24876 != 0B) goto <D.24877>; else goto <D.24878>;
  <D.24877>:
  D.24876 = frame->ji;
  method = jinfo_get_method (D.24876);
  <D.24878>:
  if (method != 0B) goto <D.24879>; else goto <D.24880>;
  <D.24879>:
  D.24881 = user_data->count;
  if (D.24881 == 0) goto <D.24882>; else goto <D.24883>;
  <D.24882>:
  D.24881 = user_data->count;
  D.24884 = D.24881 + 1;
  user_data->count = D.24884;
  D.24885 = 0;
  return D.24885;
  <D.24883>:
  D.24886 = user_data->omethod;
  if (D.24886 == method) goto <D.24887>; else goto <D.24888>;
  <D.24887>:
  D.24885 = 0;
  return D.24885;
  <D.24888>:
  D.24889 = mono_domain_get ();
  D.24890 = frame->native_offset;
  D.24891 = (unsigned int) D.24890;
  location = mono_debug_print_stack_frame (method, D.24891, D.24889);
  stderr.110 = stderr;
  fprintf (stderr.110, "  %s\n", location);
  monoeg_g_free (location);
  D.24881 = user_data->count;
  if (D.24881 == 1) goto <D.24893>; else goto <D.24894>;
  <D.24893>:
  stderr.110 = stderr;
  fprintf (stderr.110, "  <...>\n");
  user_data->omethod = method;
  goto <D.24895>;
  <D.24894>:
  user_data->omethod = 0B;
  <D.24895>:
  D.24881 = user_data->count;
  D.24884 = D.24881 + 1;
  user_data->count = D.24884;
  goto <D.24896>;
  <D.24880>:
  D.24890 = frame->native_offset;
  stderr.110 = stderr;
  fprintf (stderr.110, "  at <unknown> <0x%05x>\n", D.24890);
  <D.24896>:
  D.24885 = 0;
  return D.24885;
}


mono_handle_native_sigsegv (int signal, void * ctx)
{
  unsigned int mono_jit_tls_id.111;
  const char * iftmp.112;
  int handling_sigsegv.113;
  struct MonoDebugOptions * D.24906;
  int D.24907;
  struct _IO_FILE * stderr.114;
  struct MonoInternalThread * D.24913;
  unsigned int i.115;
  unsigned int D.24917;
  char * * D.24918;
  char * D.24919;
  struct MonoDebugOptions * D.24920;
  int D.24921;
  int D.24926;
  _Bool D.24927;
  long int D.24928;
  long int D.24929;
  struct sigaction sa;
  struct MonoJitTlsData * jit_tls;
  const char * signal_str;

  try
    {
      mono_jit_tls_id.111 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.111);
      if (signal == 11) goto <D.24900>; else goto <D.24901>;
      <D.24900>:
      iftmp.112 = "SIGSEGV";
      goto <D.24902>;
      <D.24901>:
      iftmp.112 = "SIGABRT";
      <D.24902>:
      signal_str = iftmp.112;
      handling_sigsegv.113 = handling_sigsegv;
      if (handling_sigsegv.113 != 0) goto <D.24904>; else goto <D.24905>;
      <D.24904>:
      return;
      <D.24905>:
      D.24906 = mini_get_debug_options ();
      D.24907 = D.24906->suspend_on_sigsegv;
      if (D.24907 != 0) goto <D.24908>; else goto <D.24909>;
      <D.24908>:
      stderr.114 = stderr;
      fprintf (stderr.114, "Received SIGSEGV, suspending...\n");
      <D.23089>:
      sleep (0);
      goto <D.23089>;
      <D.24909>:
      handling_sigsegv = 1;
      if (jit_tls != 0B) goto <D.24911>; else goto <D.24912>;
      <D.24911>:
      D.24913 = mono_thread_internal_current ();
      if (D.24913 != 0B) goto <D.24914>; else goto <D.24915>;
      <D.24914>:
      stderr.114 = stderr;
      fprintf (stderr.114, "Stacktrace:\n\n");
      mono_walk_stack (print_stack_frame_to_stderr, 1, 0B);
      <D.24915>:
      <D.24912>:
      {
        void * array[256];
        char * * names;
        int i;
        int size;

        try
          {
            stderr.114 = stderr;
            fprintf (stderr.114, "\nNative stacktrace:\n\n");
            size = backtrace (&array, 256);
            names = backtrace_symbols (&array, size);
            i = 0;
            goto <D.23095>;
            <D.23094>:
            i.115 = (unsigned int) i;
            D.24917 = i.115 * 4;
            D.24918 = names + D.24917;
            D.24919 = *D.24918;
            stderr.114 = stderr;
            fprintf (stderr.114, "\t%s\n", D.24919);
            i = i + 1;
            <D.23095>:
            if (i < size) goto <D.23094>; else goto <D.23096>;
            <D.23096>:
            free (names);
            D.24920 = mini_get_debug_options ();
            D.24921 = D.24920->no_gdb_backtrace;
            if (D.24921 == 0) goto <D.24922>; else goto <D.24923>;
            <D.24922>:
            {
              pid_t pid;
              int status;
              pid_t crashed_pid;

              try
                {
                  crashed_pid = getpid ();
                  pid = mono_runtime_syscall_fork ();
                  if (pid == 0) goto <D.24924>; else goto <D.24925>;
                  <D.24924>:
                  dup2 (2, 1);
                  mono_gdb_render_native_backtraces (crashed_pid);
                  exit (1);
                  <D.24925>:
                  stderr.114 = stderr;
                  fprintf (stderr.114, "\nDebug info from gdb:\n\n");
                  waitpid (pid, &status, 0);
                }
              finally
                {
                  status = {CLOBBER};
                }
            }
            <D.24923>:
          }
        finally
          {
            array = {CLOBBER};
          }
      }
      stderr.114 = stderr;
      fprintf (stderr.114, "\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.24926 = sigaction (6, &sa, 0B);
      D.24927 = D.24926 == -1;
      D.24928 = (long int) D.24927;
      D.24929 = __builtin_expect (D.24928, 0);
      if (D.24929 != 0) goto <D.24930>; else goto <D.24931>;
      <D.24930>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 2327, "sigaction (SIGABRT, &sa, NULL) != -1");
      <D.24931>:
      abort ();
    }
  finally
    {
      sa = {CLOBBER};
    }
}


print_stack_frame_to_stderr (struct StackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  struct MonoJitInfo * D.24934;
  struct MonoDomain * D.24939;
  int D.24940;
  unsigned int D.24941;
  struct _IO_FILE * stderr.116;
  gboolean D.24944;
  struct MonoMethod * method;

  method = 0B;
  D.24934 = frame->ji;
  if (D.24934 != 0B) goto <D.24935>; else goto <D.24936>;
  <D.24935>:
  D.24934 = frame->ji;
  method = jinfo_get_method (D.24934);
  <D.24936>:
  if (method != 0B) goto <D.24937>; else goto <D.24938>;
  <D.24937>:
  {
    gchar * location;

    D.24939 = mono_domain_get ();
    D.24940 = frame->native_offset;
    D.24941 = (unsigned int) D.24940;
    location = mono_debug_print_stack_frame (method, D.24941, D.24939);
    stderr.116 = stderr;
    fprintf (stderr.116, "  %s\n", location);
    monoeg_g_free (location);
  }
  goto <D.24943>;
  <D.24938>:
  D.24940 = frame->native_offset;
  stderr.116 = stderr;
  fprintf (stderr.116, "  at <unknown> <0x%05x>\n", D.24940);
  <D.24943>:
  D.24944 = 0;
  return D.24944;
}


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.24946;
  unsigned int D.24949;
  long int D.24950;
  struct GError * error.117;
  _Bool D.24952;
  long int D.24953;
  long int D.24954;
  unsigned char D.24958;
  long long unsigned int D.24962;
  unsigned int D.24963;
  void * D.24964;
  int mono_print_thread_dump.118;
  void * D.24971;
  int D.24972;
  void * D.24973;
  int D.24974;
  char * D.24976;
  struct _IO_FILE * stdout.119;
  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.24946 = thread->name;
      if (D.24946 != 0B) goto <D.24947>; else goto <D.24948>;
      <D.24947>:
      D.24949 = thread->name_len;
      D.24950 = (long int) D.24949;
      D.24946 = thread->name;
      name = monoeg_g_utf16_to_utf8 (D.24946, D.24950, 0B, 0B, &error);
      error.117 = error;
      D.24952 = error.117 != 0B;
      D.24953 = (long int) D.24952;
      D.24954 = __builtin_expect (D.24953, 0);
      if (D.24954 != 0) goto <D.24955>; else goto <D.24956>;
      <D.24955>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 2352, "!error");
      <D.24956>:
      monoeg_g_string_append_printf (text, "\n\"%s\"", name);
      monoeg_g_free (name);
      goto <D.24957>;
      <D.24948>:
      D.24958 = thread->threadpool_thread;
      if (D.24958 != 0) goto <D.24959>; else goto <D.24960>;
      <D.24959>:
      monoeg_g_string_append (text, "\n\"<threadpool thread>\"");
      goto <D.24961>;
      <D.24960>:
      monoeg_g_string_append (text, "\n\"<unnamed thread>\"");
      <D.24961>:
      <D.24957>:
      wapi_desc = wapi_current_thread_desc ();
      D.24962 = thread->tid;
      D.24963 = (unsigned int) D.24962;
      D.24964 = (void *) D.24963;
      monoeg_g_string_append_printf (text, " tid=0x%p this=0x%p %s\n", D.24964, thread, wapi_desc);
      free (wapi_desc);
      if (start_ctx != 0B) goto <D.24965>; else goto <D.24966>;
      <D.24965>:
      memcpy (&ctx, start_ctx, 36);
      goto <D.24967>;
      <D.24966>:
      if (sigctx == 0B) goto <D.24968>; else goto <D.24969>;
      <D.24968>:
      mono_arch_flush_register_windows ();
      mono_print_thread_dump.118 = (int) mono_print_thread_dump;
      ctx.eip = mono_print_thread_dump.118;
      D.24971 = __builtin_frame_address (0);
      D.24972 = (int) D.24971;
      ctx.ebp = D.24972;
      D.24973 = __builtin_frame_address (0);
      D.24974 = (int) D.24973;
      ctx.esp = D.24974;
      goto <D.24975>;
      <D.24969>:
      mono_arch_sigctx_to_monoctx (sigctx, &ctx);
      <D.24975>:
      <D.24967>:
      mono_walk_stack_with_ctx (print_stack_frame_to_string, &ctx, 3, text);
      D.24976 = text->str;
      stdout.119 = stdout;
      fprintf (stdout.119, "%s\n", D.24976);
      monoeg_g_string_free (text, 1);
      stdout.119 = stdout;
      fflush (stdout.119);
    }
  finally
    {
      ctx = {CLOBBER};
      error = {CLOBBER};
    }
}


print_stack_frame_to_string (struct StackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  struct MonoJitInfo * D.24978;
  struct MonoDomain * D.24983;
  int D.24984;
  unsigned int D.24985;
  gboolean D.24987;
  struct GString * p;
  struct MonoMethod * method;

  p = data;
  method = 0B;
  D.24978 = frame->ji;
  if (D.24978 != 0B) goto <D.24979>; else goto <D.24980>;
  <D.24979>:
  D.24978 = frame->ji;
  method = jinfo_get_method (D.24978);
  <D.24980>:
  if (method != 0B) goto <D.24981>; else goto <D.24982>;
  <D.24981>:
  {
    gchar * location;

    D.24983 = mono_domain_get ();
    D.24984 = frame->native_offset;
    D.24985 = (unsigned int) D.24984;
    location = mono_debug_print_stack_frame (method, D.24985, D.24983);
    monoeg_g_string_append_printf (p, "  %s\n", location);
    monoeg_g_free (location);
  }
  goto <D.24986>;
  <D.24982>:
  D.24984 = frame->native_offset;
  monoeg_g_string_append_printf (p, "  at <unknown> <0x%05x>\n", D.24984);
  <D.24986>:
  D.24987 = 0;
  return D.24987;
}


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.120;
  int D.24990;
  int D.24991;
  void * D.24992;
  struct MonoJitTlsData * jit_tls;
  struct MonoContext new_ctx;

  try
    {
      mono_jit_tls_id.120 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.120);
      D.24990 = jit_tls->resume_state.ctx.eip;
      ctx->eip = D.24990;
      D.24991 = jit_tls->resume_state.ctx.esp;
      ctx->esp = D.24991;
      new_ctx = *ctx;
      D.24992 = jit_tls->resume_state.ex_obj;
      mono_handle_exception_internal (&new_ctx, D.24992, 1, 0B);
      mono_restore_context (&new_ctx);
    }
  finally
    {
      new_ctx = {CLOBBER};
    }
}


mono_install_handler_block_guard (struct MonoThreadUnwindState * ctx)
{
  int mono_aot_only.121;
  gboolean D.24996;
  void * D.25000;
  struct MonoJitInfo * D.25001;
  struct MonoContext * D.25004;
  struct MonoJitExceptionInfo * D.25007;
  struct FindHandlerBlockData data;
  struct MonoJitTlsData * jit_tls;
  void * resume_ip;

  try
    {
      data = {};
      jit_tls = ctx->unwind_data[2];
      mono_aot_only.121 = mono_aot_only;
      if (mono_aot_only.121 != 0) goto <D.24994>; else goto <D.24995>;
      <D.24994>:
      D.24996 = 0;
      return D.24996;
      <D.24995>:
      if (jit_tls == 0B) goto <D.24997>; else goto <D.24999>;
      <D.24999>:
      D.25000 = jit_tls->handler_block_return_address;
      if (D.25000 != 0B) goto <D.24997>; else goto <D.24998>;
      <D.24997>:
      D.24996 = 0;
      return D.24996;
      <D.24998>:
      mono_thread_info_set_is_async_context (1);
      mono_walk_stack_with_state (find_last_handler_block, ctx, 0, &data);
      mono_thread_info_set_is_async_context (0);
      D.25001 = data.ji;
      if (D.25001 == 0B) goto <D.25002>; else goto <D.25003>;
      <D.25002>:
      D.24996 = 0;
      return D.24996;
      <D.25003>:
      D.25004 = &jit_tls->handler_block_context;
      memcpy (D.25004, &data.ctx, 36);
      D.25001 = data.ji;
      resume_ip = install_handler_block_guard (D.25001, &data.ctx);
      if (resume_ip == 0B) goto <D.25005>; else goto <D.25006>;
      <D.25005>:
      D.24996 = 0;
      return D.24996;
      <D.25006>:
      jit_tls->handler_block_return_address = resume_ip;
      D.25007 = data.ei;
      jit_tls->handler_block = D.25007;
      D.24996 = 1;
      return D.24996;
    }
  finally
    {
      data = {CLOBBER};
    }
}


find_last_handler_block (struct StackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  gboolean D.25012;
  int D.25013;
  sizetype i.122;
  unsigned int D.25015;
  void * D.25018;
  void * D.25021;
  <unnamed-unsigned:15> D.25024;
  int D.25025;
  int i;
  void * ip;
  struct FindHandlerBlockData * pdata;
  struct MonoJitInfo * ji;

  pdata = data;
  ji = frame->ji;
  if (ji == 0B) goto <D.25010>; else goto <D.25011>;
  <D.25010>:
  D.25012 = 0;
  return D.25012;
  <D.25011>:
  D.25013 = ctx->eip;
  ip = (void *) D.25013;
  i = 0;
  goto <D.23139>;
  <D.23138>:
  {
    struct MonoJitExceptionInfo * ei;

    i.122 = (sizetype) i;
    ei = &ji->clauses[i.122];
    D.25015 = ei->flags;
    if (D.25015 != 2) goto <D.25016>; else goto <D.25017>;
    <D.25016>:
    // predicted unlikely by continue predictor.
    goto <D.23136>;
    <D.25017>:
    D.25018 = ei->handler_start;
    if (D.25018 < ip) goto <D.25019>; else goto <D.25020>;
    <D.25019>:
    D.25021 = ei->data.handler_end;
    if (D.25021 > ip) goto <D.25022>; else goto <D.25023>;
    <D.25022>:
    pdata->ji = ji;
    pdata->ei = ei;
    pdata->ctx = *ctx;
    goto <D.23137>;
    <D.25023>:
    <D.25020>:
  }
  <D.23136>:
  i = i + 1;
  <D.23139>:
  D.25024 = ji->num_clauses;
  D.25025 = (int) D.25024;
  if (D.25025 > i) goto <D.23138>; else goto <D.23137>;
  <D.23137>:
  D.25012 = 0;
  return D.25012;
}


install_handler_block_guard (struct MonoJitInfo * ji, struct MonoContext * ctx)
{
  int D.25027;
  unsigned int D.25028;
  void * D.25031;
  void * D.25034;
  <unnamed-unsigned:15> D.25036;
  int D.25037;
  void * D.25040;
  void * D.25043;
  int i;
  struct MonoJitExceptionInfo * clause;
  void * ip;

  clause = 0B;
  D.25027 = ctx->eip;
  ip = (void *) D.25027;
  i = 0;
  goto <D.23150>;
  <D.23149>:
  clause = &ji->clauses[i];
  D.25028 = clause->flags;
  if (D.25028 != 2) goto <D.25029>; else goto <D.25030>;
  <D.25029>:
  // predicted unlikely by continue predictor.
  goto <D.23147>;
  <D.25030>:
  D.25031 = clause->handler_start;
  if (D.25031 < ip) goto <D.25032>; else goto <D.25033>;
  <D.25032>:
  D.25034 = clause->data.handler_end;
  if (D.25034 > ip) goto <D.23148>; else goto <D.25035>;
  <D.25035>:
  <D.25033>:
  <D.23147>:
  i = i + 1;
  <D.23150>:
  D.25036 = ji->num_clauses;
  D.25037 = (int) D.25036;
  if (D.25037 > i) goto <D.23149>; else goto <D.23148>;
  <D.23148>:
  D.25036 = ji->num_clauses;
  D.25037 = (int) D.25036;
  if (D.25037 == i) goto <D.25038>; else goto <D.25039>;
  <D.25038>:
  D.25040 = 0B;
  return D.25040;
  <D.25039>:
  D.25031 = clause->handler_start;
  if (D.25031 == ip) goto <D.25041>; else goto <D.25042>;
  <D.25041>:
  D.25040 = 0B;
  return D.25040;
  <D.25042>:
  D.25043 = mono_create_handler_block_trampoline ();
  D.25040 = mono_arch_install_handler_block_guard (ji, clause, ctx, D.25043);
  return D.25040;
}


mono_set_cast_details (struct MonoClass * from, struct MonoClass * to)
{
  struct MonoDebugOptions * D.25045;
  int D.25046;
  unsigned int mono_jit_tls_id.123;
  struct MonoJitTlsData * jit_tls;

  jit_tls = 0B;
  D.25045 = mini_get_debug_options ();
  D.25046 = D.25045->better_cast_details;
  if (D.25046 != 0) goto <D.25047>; else goto <D.25048>;
  <D.25047>:
  mono_jit_tls_id.123 = mono_jit_tls_id;
  jit_tls = pthread_getspecific (mono_jit_tls_id.123);
  jit_tls->class_cast_from = from;
  jit_tls->class_cast_to = to;
  <D.25048>:
}


mono_thread_state_init_from_sigctx (struct MonoThreadUnwindState * ctx, void * sigctx)
{
  void * D.25053;
  gboolean D.25054;
  struct MonoContext * D.25057;
  struct MonoDomain * D.25059;
  struct MonoLMF * D.25060;
  struct MonoInternalThread * thread;

  thread = mono_thread_internal_current ();
  if (thread == 0B) goto <D.25050>; else goto <D.25052>;
  <D.25052>:
  D.25053 = thread->jit_data;
  if (D.25053 == 0B) goto <D.25050>; else goto <D.25051>;
  <D.25050>:
  ctx->valid = 0;
  D.25054 = 0;
  return D.25054;
  <D.25051>:
  if (sigctx != 0B) goto <D.25055>; else goto <D.25056>;
  <D.25055>:
  D.25057 = &ctx->ctx;
  mono_arch_sigctx_to_monoctx (sigctx, D.25057);
  goto <D.25058>;
  <D.25056>:
  D.25057 = &ctx->ctx;
  __asm__ __volatile__("movl $0x0, 0x00(%0)
mov %%ebx, 0x04(%0)
mov %%ecx, 0x08(%0)
mov %%edx, 0x0c(%0)
mov %%ebp, 0x10(%0)
mov %%esp, 0x14(%0)
mov %%esi, 0x18(%0)
mov %%edi, 0x1c(%0)
call 1f
1: pop 0x20(%0)
" :  : "a" D.25057 : "memory");
  <D.25058>:
  D.25059 = mono_domain_get ();
  ctx->unwind_data[0] = D.25059;
  D.25060 = mono_get_lmf ();
  ctx->unwind_data[1] = D.25060;
  D.25053 = thread->jit_data;
  ctx->unwind_data[2] = D.25053;
  ctx->valid = 1;
  D.25054 = 1;
  return D.25054;
}


mono_thread_state_init_from_monoctx (struct MonoThreadUnwindState * ctx, struct MonoContext * mctx)
{
  void * D.25065;
  gboolean D.25066;
  struct MonoDomain * D.25067;
  struct MonoLMF * D.25068;
  struct MonoInternalThread * thread;

  thread = mono_thread_internal_current ();
  if (thread == 0B) goto <D.25062>; else goto <D.25064>;
  <D.25064>:
  D.25065 = thread->jit_data;
  if (D.25065 == 0B) goto <D.25062>; else goto <D.25063>;
  <D.25062>:
  ctx->valid = 0;
  D.25066 = 0;
  return D.25066;
  <D.25063>:
  ctx->ctx = *mctx;
  D.25067 = mono_domain_get ();
  ctx->unwind_data[0] = D.25067;
  D.25068 = mono_get_lmf ();
  ctx->unwind_data[1] = D.25068;
  D.25065 = thread->jit_data;
  ctx->unwind_data[2] = D.25065;
  ctx->valid = 1;
  D.25066 = 1;
  return D.25066;
}


mono_thread_state_init_from_current (struct MonoThreadUnwindState * ctx)
{
  void * D.25073;
  gboolean D.25074;
  int mono_thread_state_init_from_current.124;
  void * D.25076;
  int D.25077;
  void * D.25078;
  int D.25079;
  struct MonoDomain * D.25080;
  struct MonoLMF * D.25081;
  struct MonoInternalThread * thread;

  thread = mono_thread_internal_current ();
  mono_arch_flush_register_windows ();
  if (thread == 0B) goto <D.25070>; else goto <D.25072>;
  <D.25072>:
  D.25073 = thread->jit_data;
  if (D.25073 == 0B) goto <D.25070>; else goto <D.25071>;
  <D.25070>:
  ctx->valid = 0;
  D.25074 = 0;
  return D.25074;
  <D.25071>:
  mono_arch_flush_register_windows ();
  mono_thread_state_init_from_current.124 = (int) mono_thread_state_init_from_current;
  ctx->ctx.eip = mono_thread_state_init_from_current.124;
  D.25076 = __builtin_frame_address (0);
  D.25077 = (int) D.25076;
  ctx->ctx.ebp = D.25077;
  D.25078 = __builtin_frame_address (0);
  D.25079 = (int) D.25078;
  ctx->ctx.esp = D.25079;
  D.25080 = mono_domain_get ();
  ctx->unwind_data[0] = D.25080;
  D.25081 = mono_get_lmf ();
  ctx->unwind_data[1] = D.25081;
  D.25073 = thread->jit_data;
  ctx->unwind_data[2] = D.25073;
  ctx->valid = 1;
  D.25074 = 1;
  return D.25074;
}


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

  mono_jit_tls_id.125 = mono_jit_tls_id;
  jit_tls = pthread_getspecific (mono_jit_tls_id.125);
  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 (*<T38a3>) (struct MonoObject *, void *) unhandled_exception_hook.126;
  void * unhandled_exception_hook_data.127;
  struct MonoObject * other.128;
  struct _IO_FILE * stderr.129;
  int D.25097;

  unhandled_exception_hook.126 = unhandled_exception_hook;
  if (unhandled_exception_hook.126 != 0B) goto <D.25085>; else goto <D.25086>;
  <D.25085>:
  unhandled_exception_hook.126 = unhandled_exception_hook;
  unhandled_exception_hook_data.127 = unhandled_exception_hook_data;
  unhandled_exception_hook.126 (exc, unhandled_exception_hook_data.127);
  goto <D.25088>;
  <D.25086>:
  {
    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.25089>; else goto <D.25090>;
        <D.25089>:
        msg = mono_string_to_utf8 (str);
        goto <D.25091>;
        <D.25090>:
        other.128 = other;
        if (other.128 != 0B) goto <D.25093>; else goto <D.25094>;
        <D.25093>:
        {
          char * original_backtrace;
          char * nested_backtrace;

          original_backtrace = mono_exception_get_managed_backtrace (exc);
          other.128 = other;
          nested_backtrace = mono_exception_get_managed_backtrace (other.128);
          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.25095>;
        <D.25094>:
        msg = monoeg_strdup ("Nested exception trying to figure out what went wrong");
        <D.25095>:
        <D.25091>:
        stderr.129 = stderr;
        fprintf (stderr.129, "[ERROR] FATAL UNHANDLED EXCEPTION: %s\n", msg);
        monoeg_g_free (msg);
        D.25097 = mono_environment_exitcode_get ();
        exit (D.25097);
      }
    finally
      {
        other = {CLOBBER};
      }
  }
  <D.25088>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 2693);
}


mono_restore_context (struct MonoContext * ctx)
{
  void (*<T3da8>) (struct MonoContext *) restore_context.130;
  void * D.25101;
  void (*<T3da8>) (struct MonoContext *) restore_context.131;
  static void (*<T3da8>) (struct MonoContext *) restore_context;

  restore_context.130 = restore_context;
  if (restore_context.130 == 0B) goto <D.25099>; else goto <D.25100>;
  <D.25099>:
  D.25101 = mono_get_restore_context ();
  restore_context.131 = (void (*<T3da8>) (struct MonoContext *)) D.25101;
  restore_context = restore_context.131;
  <D.25100>:
  restore_context.130 = restore_context;
  restore_context.130 (ctx);
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 2709);
}


