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

  try
    {
      mono_aot_only.0 = mono_aot_only;
      if (mono_aot_only.0 != 0) goto <D.23693>; else goto <D.23694>;
      <D.23693>:
      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.23699>;
      <D.23694>:
      {
        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.23699>:
      cbs.mono_walk_stack_with_ctx = mono_runtime_walk_stack_with_ctx;
      cbs.mono_walk_stack_with_state = mono_walk_stack_with_state;
      D.23705 = mono_get_throw_exception ();
      D.23706 = (void (*<T2691>) (struct MonoException *)) D.23705;
      cbs.mono_raise_exception = D.23706;
      cbs.mono_raise_exception_with_ctx = mono_raise_exception_with_ctx;
      cbs.mono_exception_walk_trace = mono_exception_walk_trace;
      cbs.mono_install_handler_block_guard = mono_install_handler_block_guard;
      mono_install_eh_callbacks (&cbs);
    }
  finally
    {
      cbs = {CLOBBER};
    }
}


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


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

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

    mono_jit_tls_id.10 = mono_jit_tls_id;
    jit_tls = pthread_getspecific (mono_jit_tls_id.10);
    if (jit_tls != 0B) goto <D.23710>; else goto <D.23711>;
    <D.23710>:
    D.23712 = jit_tls->orig_ex_ctx_set;
    if (D.23712 != 0) goto <D.23713>; else goto <D.23714>;
    <D.23713>:
    start_ctx = &jit_tls->orig_ex_ctx;
    <D.23714>:
    <D.23711>:
  }
  <D.23708>:
  mono_walk_stack_with_ctx (func, start_ctx, unwind_options, user_data);
}


mono_get_throw_exception ()
{
  void * throw_exception_func.11;
  _Bool D.23716;
  long int D.23717;
  long int D.23718;
  void * D.23721;

  throw_exception_func.11 = throw_exception_func;
  D.23716 = throw_exception_func.11 == 0B;
  D.23717 = (long int) D.23716;
  D.23718 = __builtin_expect (D.23717, 0);
  if (D.23718 != 0) goto <D.23719>; else goto <D.23720>;
  <D.23719>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 117, "throw_exception_func");
  <D.23720>:
  D.23721 = throw_exception_func;
  return D.23721;
}


mono_get_rethrow_exception ()
{
  void * rethrow_exception_func.12;
  _Bool D.23724;
  long int D.23725;
  long int D.23726;
  void * D.23729;

  rethrow_exception_func.12 = rethrow_exception_func;
  D.23724 = rethrow_exception_func.12 == 0B;
  D.23725 = (long int) D.23724;
  D.23726 = __builtin_expect (D.23725, 0);
  if (D.23726 != 0) goto <D.23727>; else goto <D.23728>;
  <D.23727>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 124, "rethrow_exception_func");
  <D.23728>:
  D.23729 = rethrow_exception_func;
  return D.23729;
}


mono_get_call_filter ()
{
  void * call_filter_func.13;
  _Bool D.23732;
  long int D.23733;
  long int D.23734;
  void * D.23737;

  call_filter_func.13 = call_filter_func;
  D.23732 = call_filter_func.13 == 0B;
  D.23733 = (long int) D.23732;
  D.23734 = __builtin_expect (D.23733, 0);
  if (D.23734 != 0) goto <D.23735>; else goto <D.23736>;
  <D.23735>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 131, "call_filter_func");
  <D.23736>:
  D.23737 = call_filter_func;
  return D.23737;
}


mono_get_restore_context ()
{
  void * restore_context_func.14;
  _Bool D.23740;
  long int D.23741;
  long int D.23742;
  void * D.23745;

  restore_context_func.14 = restore_context_func;
  D.23740 = restore_context_func.14 == 0B;
  D.23741 = (long int) D.23740;
  D.23742 = __builtin_expect (D.23741, 0);
  if (D.23742 != 0) goto <D.23743>; else goto <D.23744>;
  <D.23743>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 138, "restore_context_func");
  <D.23744>:
  D.23745 = restore_context_func;
  return D.23745;
}


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

  try
    {
      code = 0B;
      throw_corlib_exception_func.15 = throw_corlib_exception_func;
      if (throw_corlib_exception_func.15 != 0B) goto <D.23748>; else goto <D.23749>;
      <D.23748>:
      D.23750 = throw_corlib_exception_func;
      return D.23750;
      <D.23749>:
      mono_aot_only.16 = mono_aot_only;
      if (mono_aot_only.16 != 0) goto <D.23752>; else goto <D.23753>;
      <D.23752>:
      code = mono_aot_get_trampoline ("throw_corlib_exception");
      goto <D.23754>;
      <D.23753>:
      code = mono_arch_get_throw_corlib_exception (&info, 0);
      info.17 = info;
      mono_tramp_info_register (info.17);
      <D.23754>:
      mono_memory_barrier ();
      throw_corlib_exception_func = code;
      D.23750 = throw_corlib_exception_func;
      return D.23750;
    }
  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)
{
  long unsigned int D.23758;
  struct MonoJitInfo * D.23767;
  int managed2.18;
  long unsigned int D.23776;
  long unsigned int D.23777;
  long unsigned int D.23780;
  int D.23785;
  sizetype D.23786;
  const char * D.23787;
  long int real_ip.19;
  long int start.20;
  long int D.23791;
  unsigned int offset.21;
  char * D.23802;
  struct MonoMethod * D.23805;
  gchar * D.23806;
  gboolean managed2;
  void * ip;
  struct MonoJitInfo * ji;
  struct MonoMethod * method;

  try
    {
      D.23758 = ctx->sc_ir;
      ip = (void *) D.23758;
      method = 0B;
      if (trace != 0B) goto <D.23759>; else goto <D.23760>;
      <D.23759>:
      *trace = 0B;
      <D.23760>:
      if (native_offset != 0B) goto <D.23761>; else goto <D.23762>;
      <D.23761>:
      *native_offset = -1;
      <D.23762>:
      if (managed != 0B) goto <D.23763>; else goto <D.23764>;
      <D.23763>:
      *managed = 0;
      <D.23764>:
      ji = find_jit_info (domain, jit_tls, res, prev_ji, ctx, new_ctx, lmf, &managed2);
      if (ji == -1B) goto <D.23765>; else goto <D.23766>;
      <D.23765>:
      D.23767 = ji;
      return D.23767;
      <D.23766>:
      if (ji != 0B) goto <D.23768>; else goto <D.23769>;
      <D.23768>:
      method = jinfo_get_method (ji);
      <D.23769>:
      managed2.18 = managed2;
      if (managed2.18 != 0) goto <D.23770>; else goto <D.23774>;
      <D.23774>:
      if (ji != 0B) goto <D.23775>; else goto <D.23771>;
      <D.23775>:
      D.23776 = BIT_FIELD_REF <*method, 64, 256>;
      D.23777 = D.23776 & 124;
      if (D.23777 != 0) goto <D.23770>; else goto <D.23771>;
      <D.23770>:
      {
        const char * real_ip;
        const char * start;
        gint32 offset;

        start = ji->code_start;
        managed2.18 = managed2;
        if (managed2.18 == 0) goto <D.23778>; else goto <D.23779>;
        <D.23778>:
        D.23780 = new_ctx->sc_ir;
        real_ip = (const char *) D.23780;
        goto <D.23781>;
        <D.23779>:
        real_ip = ip;
        <D.23781>:
        if (real_ip >= start) goto <D.23784>; else goto <D.23782>;
        <D.23784>:
        D.23785 = ji->code_size;
        D.23786 = (sizetype) D.23785;
        D.23787 = start + D.23786;
        if (D.23787 >= real_ip) goto <D.23788>; else goto <D.23782>;
        <D.23788>:
        real_ip.19 = (long int) real_ip;
        start.20 = (long int) start;
        D.23791 = real_ip.19 - start.20;
        offset = (gint32) D.23791;
        goto <D.23783>;
        <D.23782>:
        offset = -1;
        <D.23783>:
        if (native_offset != 0B) goto <D.23792>; else goto <D.23793>;
        <D.23792>:
        *native_offset = offset;
        <D.23793>:
        if (managed != 0B) goto <D.23794>; else goto <D.23795>;
        <D.23794>:
        D.23776 = BIT_FIELD_REF <*method, 64, 256>;
        D.23777 = D.23776 & 124;
        if (D.23777 == 0) goto <D.23796>; else goto <D.23798>;
        <D.23798>:
        D.23776 = BIT_FIELD_REF <*method, 64, 256>;
        D.23777 = D.23776 & 124;
        if (D.23777 == 68) goto <D.23796>; else goto <D.23797>;
        <D.23796>:
        *managed = 1;
        <D.23797>:
        <D.23795>:
        if (trace != 0B) goto <D.23799>; else goto <D.23800>;
        <D.23799>:
        offset.21 = (unsigned int) offset;
        D.23802 = mono_debug_print_stack_frame (method, offset.21, domain);
        *trace = D.23802;
        <D.23800>:
      }
      goto <D.23772>;
      <D.23771>:
      if (trace != 0B) goto <D.23803>; else goto <D.23804>;
      <D.23803>:
      {
        char * fname;

        D.23805 = jinfo_get_method (res);
        fname = mono_method_full_name (D.23805, 1);
        D.23806 = monoeg_g_strdup_printf ("in (unmanaged) %s", fname);
        *trace = D.23806;
        monoeg_g_free (fname);
      }
      <D.23804>:
      <D.23772>:
      D.23767 = ji;
      return D.23767;
    }
  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)
{
  long unsigned int D.23809;
  void * D.23813;
  int D.23815;
  sizetype D.23816;
  guint8 * D.23817;
  struct MonoJitInfo * D.23823;
  <unnamed type> D.23824;
  struct MonoJitInfo * D.23827;
  struct MonoMethod * D.23830;
  struct StackFrameInfo frame;
  struct MonoJitInfo * ji;
  gboolean err;
  void * ip;

  try
    {
      D.23809 = ctx->sc_ir;
      ip = (void *) D.23809;
      if (prev_ji != 0B) goto <D.23812>; else goto <D.23810>;
      <D.23812>:
      D.23813 = prev_ji->code_start;
      if (D.23813 < ip) goto <D.23814>; else goto <D.23810>;
      <D.23814>:
      D.23813 = prev_ji->code_start;
      D.23815 = prev_ji->code_size;
      D.23816 = (sizetype) D.23815;
      D.23817 = D.23813 + D.23816;
      if (D.23817 > ip) goto <D.23818>; else goto <D.23810>;
      <D.23818>:
      ji = prev_ji;
      goto <D.23811>;
      <D.23810>:
      ji = mini_jit_info_table_find (domain, ip, 0B);
      <D.23811>:
      if (managed != 0B) goto <D.23819>; else goto <D.23820>;
      <D.23819>:
      *managed = 0;
      <D.23820>:
      err = mono_arch_find_jit_info (domain, jit_tls, ji, ctx, new_ctx, lmf, 0B, &frame);
      if (err == 0) goto <D.23821>; else goto <D.23822>;
      <D.23821>:
      D.23823 = -1B;
      return D.23823;
      <D.23822>:
      D.23824 = frame.type;
      switch (D.23824) <default: <D.23052>, case 0: <D.23048>, case 1: <D.23050>, case 2: <D.23049>>
      <D.23048>:
      if (managed != 0B) goto <D.23825>; else goto <D.23826>;
      <D.23825>:
      *managed = 1;
      <D.23826>:
      D.23823 = frame.ji;
      return D.23823;
      <D.23049>:
      D.23827 = frame.ji;
      if (D.23827 != 0B) goto <D.23828>; else goto <D.23829>;
      <D.23828>:
      D.23823 = frame.ji;
      return D.23823;
      <D.23829>:
      memset (res, 0, 48);
      D.23830 = frame.method;
      res->d.method = D.23830;
      D.23823 = res;
      return D.23823;
      <D.23050>:
      {
        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, 312);
            D.23823 = ji;
            return D.23823;
          }
        finally
          {
            tmp_ctx = {CLOBBER};
          }
      }
      <D.23052>:
      monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 246);
      D.23823 = 0B;
      return D.23823;
    }
  finally
    {
      frame = {CLOBBER};
    }
}


memset (void * __dest, int __ch, size_t __len)
{
  int D.23836;
  int D.23841;
  void * D.23843;
  long unsigned int D.23844;

  D.23836 = __builtin_constant_p (__len);
  if (D.23836 != 0) goto <D.23837>; else goto <D.23838>;
  <D.23837>:
  if (__len == 0) goto <D.23839>; else goto <D.23840>;
  <D.23839>:
  D.23841 = __builtin_constant_p (__ch);
  if (D.23841 == 0) goto <D.23834>; else goto <D.23842>;
  <D.23842>:
  if (__ch != 0) goto <D.23834>; else goto <D.23835>;
  <D.23834>:
  __warn_memset_zero_len ();
  D.23843 = __dest;
  return D.23843;
  <D.23835>:
  <D.23840>:
  <D.23838>:
  D.23844 = __builtin_object_size (__dest, 0);
  D.23843 = __builtin___memset_chk (__dest, __ch, __len, D.23844);
  return D.23843;
}


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

  D.23847 = __builtin_object_size (__dest, 0);
  D.23846 = __builtin___memcpy_chk (__dest, __src, __len, D.23847);
  return D.23846;
}


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

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


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)
{
  long unsigned int D.23851;
  void * D.23857;
  int D.23859;
  sizetype D.23860;
  guint8 * D.23861;
  struct MonoDomain * target_domain.22;
  gboolean D.23870;
  struct MonoJitInfo * D.23871;
  long unsigned int D.23874;
  long unsigned int D.23875;
  <unnamed type> D.23878;
  long unsigned int D.23885;
  long unsigned int D.23886;
  int D.23896;
  long unsigned int D.23901;
  int D.23906;
  sizetype D.23907;
  const char * D.23908;
  long int real_ip.23;
  long int start.24;
  long int D.23912;
  int D.23913;
  int D.23916;
  unsigned int D.23917;
  char * D.23918;
  struct MonoMethod * D.23921;
  gchar * D.23924;
  gboolean err;
  void * ip;
  struct MonoJitInfo * ji;
  struct MonoDomain * target_domain;
  struct MonoMethod * method;
  gboolean async;

  try
    {
      D.23851 = ctx->sc_ir;
      ip = (void *) D.23851;
      target_domain = domain;
      method = 0B;
      async = mono_thread_info_is_async_context ();
      if (trace != 0B) goto <D.23852>; else goto <D.23853>;
      <D.23852>:
      *trace = 0B;
      <D.23853>:
      if (prev_ji != 0B) goto <D.23856>; else goto <D.23854>;
      <D.23856>:
      D.23857 = prev_ji->code_start;
      if (D.23857 < ip) goto <D.23858>; else goto <D.23854>;
      <D.23858>:
      D.23857 = prev_ji->code_start;
      D.23859 = prev_ji->code_size;
      D.23860 = (sizetype) D.23859;
      D.23861 = D.23857 + D.23860;
      if (D.23861 > ip) goto <D.23862>; else goto <D.23854>;
      <D.23862>:
      ji = prev_ji;
      goto <D.23855>;
      <D.23854>:
      ji = mini_jit_info_table_find (domain, ip, &target_domain);
      <D.23855>:
      target_domain.22 = target_domain;
      if (target_domain.22 == 0B) goto <D.23864>; else goto <D.23865>;
      <D.23864>:
      target_domain = domain;
      <D.23865>:
      if (save_locations != 0B) goto <D.23866>; else goto <D.23867>;
      <D.23866>:
      memset (save_locations, 0, 256);
      <D.23867>:
      target_domain.22 = target_domain;
      err = mono_arch_find_jit_info (target_domain.22, jit_tls, ji, ctx, new_ctx, lmf, save_locations, frame);
      if (err == 0) goto <D.23868>; else goto <D.23869>;
      <D.23868>:
      D.23870 = 0;
      return D.23870;
      <D.23869>:
      D.23871 = frame->ji;
      if (D.23871 != 0B) goto <D.23872>; else goto <D.23873>;
      <D.23872>:
      D.23871 = frame->ji;
      D.23874 = BIT_FIELD_REF <*D.23871, 64, 256>;
      D.23875 = D.23874 & 16777216;
      if (D.23875 == 0) goto <D.23876>; else goto <D.23877>;
      <D.23876>:
      D.23871 = frame->ji;
      method = jinfo_get_method (D.23871);
      <D.23877>:
      <D.23873>:
      D.23878 = frame->type;
      if (D.23878 == 0) goto <D.23879>; else goto <D.23880>;
      <D.23879>:
      if (method != 0B) goto <D.23881>; else goto <D.23882>;
      <D.23881>:
      D.23885 = BIT_FIELD_REF <*method, 64, 256>;
      D.23886 = D.23885 & 124;
      if (D.23886 == 0) goto <D.23883>; else goto <D.23887>;
      <D.23887>:
      D.23885 = BIT_FIELD_REF <*method, 64, 256>;
      D.23886 = D.23885 & 124;
      if (D.23886 == 68) goto <D.23883>; else goto <D.23884>;
      <D.23883>:
      frame->managed = 1;
      <D.23884>:
      <D.23882>:
      <D.23880>:
      D.23878 = frame->type;
      if (D.23878 == 2) goto <D.23888>; else goto <D.23889>;
      <D.23888>:
      frame->ji = 0B;
      frame->method = 0B;
      <D.23889>:
      frame->native_offset = -1;
      target_domain.22 = target_domain;
      frame->domain = target_domain.22;
      frame->async_context = async;
      ji = frame->ji;
      D.23878 = frame->type;
      if (D.23878 == 0) goto <D.23890>; else goto <D.23891>;
      <D.23890>:
      frame->method = method;
      <D.23891>:
      if (ji != 0B) goto <D.23895>; else goto <D.23892>;
      <D.23895>:
      D.23896 = frame->managed;
      if (D.23896 != 0) goto <D.23893>; else goto <D.23897>;
      <D.23897>:
      if (method != 0B) goto <D.23898>; else goto <D.23892>;
      <D.23898>:
      D.23885 = BIT_FIELD_REF <*method, 64, 256>;
      D.23886 = D.23885 & 124;
      if (D.23886 != 0) goto <D.23893>; else goto <D.23892>;
      <D.23893>:
      {
        const char * real_ip;
        const char * start;

        start = ji->code_start;
        D.23896 = frame->managed;
        if (D.23896 == 0) goto <D.23899>; else goto <D.23900>;
        <D.23899>:
        D.23901 = new_ctx->sc_ir;
        real_ip = (const char *) D.23901;
        goto <D.23902>;
        <D.23900>:
        real_ip = ip;
        <D.23902>:
        if (real_ip >= start) goto <D.23905>; else goto <D.23903>;
        <D.23905>:
        D.23906 = ji->code_size;
        D.23907 = (sizetype) D.23906;
        D.23908 = start + D.23907;
        if (D.23908 >= real_ip) goto <D.23909>; else goto <D.23903>;
        <D.23909>:
        real_ip.23 = (long int) real_ip;
        start.24 = (long int) start;
        D.23912 = real_ip.23 - start.24;
        D.23913 = (int) D.23912;
        frame->native_offset = D.23913;
        goto <D.23904>;
        <D.23903>:
        frame->native_offset = -1;
        <D.23904>:
        if (trace != 0B) goto <D.23914>; else goto <D.23915>;
        <D.23914>:
        D.23916 = frame->native_offset;
        D.23917 = (unsigned int) D.23916;
        D.23918 = mono_debug_print_stack_frame (method, D.23917, domain);
        *trace = D.23918;
        <D.23915>:
      }
      goto <D.23894>;
      <D.23892>:
      if (trace != 0B) goto <D.23919>; else goto <D.23920>;
      <D.23919>:
      D.23921 = frame->method;
      if (D.23921 != 0B) goto <D.23922>; else goto <D.23923>;
      <D.23922>:
      {
        char * fname;

        D.23921 = frame->method;
        fname = mono_method_full_name (D.23921, 1);
        D.23924 = monoeg_g_strdup_printf ("in (unmanaged) %s", fname);
        *trace = D.23924;
        monoeg_g_free (fname);
      }
      <D.23923>:
      <D.23920>:
      <D.23894>:
      D.23870 = 1;
      return D.23870;
    }
  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.23929;
  long unsigned int D.23930;
  long unsigned int D.23931;
  int D.23932;
  long unsigned int D.23933;
  char * D.23934;
  int D.23935;
  long unsigned int D.23936;
  char * D.23937;
  int D.23940;
  void * D.23944;
  long int ip.25;
  long int D.23946;
  long int D.23947;
  long unsigned int D.23948;
  int D.23949;
  _Bool D.23952;
  struct MonoDomain * domain;
  struct MonoArray * ta;
  int len;
  int i;

  domain = mono_domain_get ();
  ta = ex->trace_ips;
  if (ta == 0B) goto <D.23927>; else goto <D.23928>;
  <D.23927>:
  D.23929 = 0;
  return D.23929;
  <D.23928>:
  D.23930 = mono_array_length (ta);
  D.23931 = D.23930 >> 1;
  len = (int) D.23931;
  i = 0;
  goto <D.23140>;
  <D.23139>:
  {
    void * ip;
    void * generic_info;
    struct MonoJitInfo * ji;

    D.23932 = i * 2;
    D.23933 = (long unsigned int) D.23932;
    D.23934 = mono_array_addr_with_size (ta, 8, D.23933);
    ip = MEM[(void * *)D.23934];
    D.23932 = i * 2;
    D.23935 = D.23932 + 1;
    D.23936 = (long unsigned int) D.23935;
    D.23937 = mono_array_addr_with_size (ta, 8, D.23936);
    generic_info = MEM[(void * *)D.23937];
    ji = mono_jit_info_table_find (domain, ip);
    if (ji == 0B) goto <D.23938>; else goto <D.23939>;
    <D.23938>:
    D.23940 = func (0B, ip, 0, 0, user_data);
    if (D.23940 != 0) goto <D.23941>; else goto <D.23942>;
    <D.23941>:
    D.23929 = 1;
    return D.23929;
    <D.23942>:
    goto <D.23943>;
    <D.23939>:
    {
      struct MonoMethod * method;

      method = get_method_from_stack_frame (ji, generic_info);
      D.23944 = ji->code_start;
      ip.25 = (long int) ip;
      D.23944 = ji->code_start;
      D.23946 = (long int) D.23944;
      D.23947 = ip.25 - D.23946;
      D.23948 = (long unsigned int) D.23947;
      D.23949 = func (method, D.23944, D.23948, 1, user_data);
      if (D.23949 != 0) goto <D.23950>; else goto <D.23951>;
      <D.23950>:
      D.23929 = 1;
      return D.23929;
      <D.23951>:
    }
    <D.23943>:
  }
  i = i + 1;
  <D.23140>:
  if (i < len) goto <D.23139>; else goto <D.23141>;
  <D.23141>:
  D.23952 = len > 0;
  D.23929 = (gboolean) D.23952;
  return D.23929;
}


get_method_from_stack_frame (struct MonoJitInfo * ji, void * generic_info)
{
  long unsigned int D.23956;
  long unsigned int D.23957;
  struct MonoGenericJitInfo * D.23959;
  long unsigned int D.23960;
  long unsigned int D.23961;
  struct MonoMethod * D.23962;
  struct MonoGenericContext context;
  struct MonoMethod * method;

  try
    {
      D.23956 = BIT_FIELD_REF <*ji, 64, 256>;
      D.23957 = D.23956 & 131072;
      if (D.23957 == 0) goto <D.23954>; else goto <D.23958>;
      <D.23958>:
      D.23959 = mono_jit_info_get_generic_jit_info (ji);
      D.23960 = BIT_FIELD_REF <*D.23959, 64, 192>;
      D.23961 = D.23960 & 1099511627776;
      if (D.23961 == 0) goto <D.23954>; else goto <D.23955>;
      <D.23954>:
      D.23962 = jinfo_get_method (ji);
      return D.23962;
      <D.23955>:
      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.23962 = method;
      return D.23962;
    }
  finally
    {
      context = {CLOBBER};
    }
}


get_generic_context_from_stack_frame (struct MonoJitInfo * ji, void * generic_info)
{
  _Bool D.23965;
  long int D.23966;
  long int D.23967;
  long unsigned int D.23970;
  long unsigned int D.23971;
  _Bool D.23972;
  long int D.23973;
  long int D.23974;
  struct MonoGenericContext * D.23977;
  struct MonoGenericInst * D.23978;
  struct MonoVTable * D.23981;
  struct MonoGenericInst * D.23982;
  struct MonoGenericInst * D.23983;
  _Bool D.23984;
  long int D.23985;
  long int D.23986;
  short unsigned int D.23993;
  int D.23994;
  int D.23995;
  struct MonoClass * D.23997;
  long unsigned int D.23998;
  long unsigned int D.23999;
  struct MonoGenericClass * D.24000;
  _Bool D.24004;
  long int D.24005;
  long int D.24006;
  struct MonoGenericClass * D.24010;
  struct MonoClass * D.24012;
  struct MonoGenericContainer * D.24016;
  struct MonoGenericContext * D.24017;
  struct MonoGenericInst * D.24018;
  int D.24021;
  _Bool D.24022;
  long int D.24023;
  long int D.24024;
  int D.24028;
  _Bool D.24029;
  long int D.24030;
  long int D.24031;
  struct MonoGenericContext D.24034;
  struct MonoGenericContext context;
  struct MonoClass * class;
  struct MonoClass * method_container_class;
  struct MonoMethod * method;

  try
    {
      context.class_inst = 0B;
      context.method_inst = 0B;
      D.23965 = generic_info == 0B;
      D.23966 = (long int) D.23965;
      D.23967 = __builtin_expect (D.23966, 0);
      if (D.23967 != 0) goto <D.23968>; else goto <D.23969>;
      <D.23968>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 489, "generic_info");
      <D.23969>:
      method = jinfo_get_method (ji);
      D.23970 = BIT_FIELD_REF <*method, 64, 256>;
      D.23971 = D.23970 & 4096;
      D.23972 = D.23971 == 0;
      D.23973 = (long int) D.23972;
      D.23974 = __builtin_expect (D.23973, 0);
      if (D.23974 != 0) goto <D.23975>; else goto <D.23976>;
      <D.23975>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 492, "method->is_inflated");
      <D.23976>:
      D.23977 = mono_method_get_context (method);
      D.23978 = D.23977->method_inst;
      if (D.23978 != 0B) goto <D.23979>; else goto <D.23980>;
      <D.23979>:
      {
        struct MonoMethodRuntimeGenericContext * mrgctx;

        mrgctx = generic_info;
        D.23981 = mrgctx->class_vtable;
        class = D.23981->klass;
        D.23982 = mrgctx->method_inst;
        context.method_inst = D.23982;
        D.23983 = context.method_inst;
        D.23984 = D.23983 == 0B;
        D.23985 = (long int) D.23984;
        D.23986 = __builtin_expect (D.23985, 0);
        if (D.23986 != 0) goto <D.23987>; else goto <D.23988>;
        <D.23987>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 498, "context.method_inst");
        <D.23988>:
      }
      goto <D.23989>;
      <D.23980>:
      D.23993 = method->flags;
      D.23994 = (int) D.23993;
      D.23995 = D.23994 & 16;
      if (D.23995 != 0) goto <D.23990>; else goto <D.23996>;
      <D.23996>:
      D.23997 = method->klass;
      D.23998 = BIT_FIELD_REF <*D.23997, 64, 256>;
      D.23999 = D.23998 & 8;
      if (D.23999 != 0) goto <D.23990>; else goto <D.23991>;
      <D.23990>:
      {
        struct MonoVTable * vtable;

        vtable = generic_info;
        class = vtable->klass;
      }
      goto <D.23992>;
      <D.23991>:
      class = generic_info;
      <D.23992>:
      <D.23989>:
      D.23997 = method->klass;
      D.24000 = D.23997->generic_class;
      if (D.24000 != 0B) goto <D.24001>; else goto <D.24002>;
      <D.24001>:
      D.23997 = method->klass;
      D.24000 = D.23997->generic_class;
      method_container_class = D.24000->container_class;
      goto <D.24003>;
      <D.24002>:
      method_container_class = method->klass;
      <D.24003>:
      goto <D.23118>;
      <D.23117>:
      class = class->parent;
      D.24004 = class == 0B;
      D.24005 = (long int) D.24004;
      D.24006 = __builtin_expect (D.24005, 0);
      if (D.24006 != 0) goto <D.24007>; else goto <D.24008>;
      <D.24007>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 516, "class");
      <D.24008>:
      <D.23118>:
      D.23997 = method->klass;
      if (D.23997 != class) goto <D.24009>; else goto <D.23119>;
      <D.24009>:
      D.24010 = class->generic_class;
      if (D.24010 == 0B) goto <D.23117>; else goto <D.24011>;
      <D.24011>:
      D.24010 = class->generic_class;
      D.24012 = D.24010->container_class;
      if (D.24012 != method_container_class) goto <D.23117>; else goto <D.23119>;
      <D.23119>:
      D.24010 = class->generic_class;
      if (D.24010 != 0B) goto <D.24013>; else goto <D.24015>;
      <D.24015>:
      D.24016 = class->generic_container;
      if (D.24016 != 0B) goto <D.24013>; else goto <D.24014>;
      <D.24013>:
      D.24017 = mini_class_get_context (class);
      D.24018 = D.24017->class_inst;
      context.class_inst = D.24018;
      <D.24014>:
      D.24010 = class->generic_class;
      if (D.24010 != 0B) goto <D.24019>; else goto <D.24020>;
      <D.24019>:
      D.24010 = class->generic_class;
      D.24012 = D.24010->container_class;
      D.24021 = mono_class_has_parent_and_ignore_generics (D.24012, method_container_class);
      D.24022 = D.24021 == 0;
      D.24023 = (long int) D.24022;
      D.24024 = __builtin_expect (D.24023, 0);
      if (D.24024 != 0) goto <D.24025>; else goto <D.24026>;
      <D.24025>:
      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.24026>:
      goto <D.24027>;
      <D.24020>:
      D.24028 = mono_class_has_parent_and_ignore_generics (class, method_container_class);
      D.24029 = D.24028 == 0;
      D.24030 = (long int) D.24029;
      D.24031 = __builtin_expect (D.24030, 0);
      if (D.24031 != 0) goto <D.24032>; else goto <D.24033>;
      <D.24032>:
      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.24033>:
      <D.24027>:
      D.24034 = context;
      return D.24034;
    }
  finally
    {
      context = {CLOBBER};
    }
}


ves_icall_System_Exception_get_trace (struct MonoException * ex)
{
  struct MonoString * D.24039;
  long unsigned int D.24040;
  long unsigned int D.24041;
  int D.24042;
  long unsigned int D.24043;
  char * D.24044;
  int D.24045;
  long unsigned int D.24046;
  char * D.24047;
  long int ip.26;
  void * D.24052;
  long int D.24053;
  long int D.24054;
  unsigned int address.27;
  struct MonoVTable * D.24056;
  struct MonoDomain * D.24057;
  char * D.24058;
  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.24037>; else goto <D.24038>;
  <D.24037>:
  D.24039 = 0B;
  return D.24039;
  <D.24038>:
  D.24040 = mono_array_length (ta);
  D.24041 = D.24040 >> 1;
  len = (int) D.24041;
  trace_str = monoeg_g_string_new ("");
  i = 0;
  goto <D.23158>;
  <D.23157>:
  {
    struct MonoJitInfo * ji;
    void * ip;
    void * generic_info;

    D.24042 = i * 2;
    D.24043 = (long unsigned int) D.24042;
    D.24044 = mono_array_addr_with_size (ta, 8, D.24043);
    ip = MEM[(void * *)D.24044];
    D.24042 = i * 2;
    D.24045 = D.24042 + 1;
    D.24046 = (long unsigned int) D.24045;
    D.24047 = mono_array_addr_with_size (ta, 8, D.24046);
    generic_info = MEM[(void * *)D.24047];
    ji = mono_jit_info_table_find (domain, ip);
    if (ji == 0B) goto <D.24048>; else goto <D.24049>;
    <D.24048>:
    monoeg_g_string_append_printf (trace_str, "in (unmanaged) %p\n", ip);
    goto <D.24050>;
    <D.24049>:
    {
      gchar * location;
      gint32 address;
      struct MonoMethod * method;

      method = get_method_from_stack_frame (ji, generic_info);
      ip.26 = (long int) ip;
      D.24052 = ji->code_start;
      D.24053 = (long int) D.24052;
      D.24054 = ip.26 - D.24053;
      address = (gint32) D.24054;
      address.27 = (unsigned int) address;
      D.24056 = ex->object.vtable;
      D.24057 = D.24056->domain;
      location = mono_debug_print_stack_frame (method, address.27, D.24057);
      monoeg_g_string_append_printf (trace_str, "%s\n", location);
      monoeg_g_free (location);
    }
    <D.24050>:
  }
  i = i + 1;
  <D.23158>:
  if (i < len) goto <D.23157>; else goto <D.23159>;
  <D.23159>:
  D.24056 = ex->object.vtable;
  D.24057 = D.24056->domain;
  D.24058 = trace_str->str;
  res = mono_string_new (D.24057, D.24058);
  monoeg_g_string_free (trace_str, 1);
  D.24039 = res;
  return D.24039;
}


ves_icall_get_trace (struct MonoException * exc, gint32 skip, MonoBoolean need_file_info)
{
  struct MonoArray * D.24062;
  struct MonoClass * D.24063;
  long unsigned int D.24064;
  long unsigned int D.24065;
  uintptr_t iftmp.28;
  int D.24069;
  int D.24071;
  long unsigned int D.24072;
  char * D.24073;
  int D.24074;
  long unsigned int D.24075;
  char * D.24076;
  long unsigned int D.24079;
  _Bool D.24080;
  long int D.24081;
  long int D.24082;
  struct MonoMethod * D.24085;
  long unsigned int D.24086;
  long unsigned int D.24087;
  struct MonoString * * D.24090;
  struct MonoString * D.24091;
  struct MonoReflectionMethod * * D.24093;
  struct MonoReflectionMethod * D.24094;
  long int ip.29;
  void * D.24096;
  long int D.24097;
  long int D.24098;
  int D.24099;
  struct MonoMethod * D.24100;
  int D.24101;
  unsigned int D.24102;
  unsigned int D.24105;
  int D.24106;
  char * D.24113;
  struct MonoString * * D.24115;
  struct MonoString * D.24116;
  unsigned int D.24117;
  int D.24118;
  unsigned int D.24119;
  int D.24120;
  int D.24121;
  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.24060>; else goto <D.24061>;
  <D.24060>:
  D.24063 = mono_defaults.stack_frame_class;
  D.24062 = mono_array_new (domain, D.24063, 0);
  return D.24062;
  <D.24061>:
  D.24064 = mono_array_length (ta);
  D.24065 = D.24064 >> 1;
  len = (int) D.24065;
  D.24063 = mono_defaults.stack_frame_class;
  if (len > skip) goto <D.24067>; else goto <D.24068>;
  <D.24067>:
  D.24069 = len - skip;
  iftmp.28 = (uintptr_t) D.24069;
  goto <D.24070>;
  <D.24068>:
  iftmp.28 = 0;
  <D.24070>:
  res = mono_array_new (domain, D.24063, iftmp.28);
  i = skip;
  goto <D.23181>;
  <D.23180>:
  {
    struct MonoJitInfo * ji;
    struct MonoStackFrame * sf;
    void * ip;
    void * generic_info;
    struct MonoMethod * method;

    D.24063 = mono_defaults.stack_frame_class;
    sf = mono_object_new (domain, D.24063);
    D.24071 = i * 2;
    D.24072 = (long unsigned int) D.24071;
    D.24073 = mono_array_addr_with_size (ta, 8, D.24072);
    ip = MEM[(void * *)D.24073];
    D.24071 = i * 2;
    D.24074 = D.24071 + 1;
    D.24075 = (long unsigned int) D.24074;
    D.24076 = mono_array_addr_with_size (ta, 8, D.24075);
    generic_info = MEM[(void * *)D.24076];
    ji = mono_jit_info_table_find (domain, ip);
    if (ji == 0B) goto <D.24077>; else goto <D.24078>;
    <D.24077>:
    {
      void * * __p;

      D.24079 = (long unsigned int) i;
      __p = mono_array_addr_with_size (res, 8, D.24079);
      mono_gc_wbarrier_set_arrayref (res, __p, sf);
    }
    // predicted unlikely by continue predictor.
    goto <D.23177>;
    <D.24078>:
    D.24080 = ji == 0B;
    D.24081 = (long int) D.24080;
    D.24082 = __builtin_expect (D.24081, 0);
    if (D.24082 != 0) goto <D.24083>; else goto <D.24084>;
    <D.24083>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 664, "ji != NULL");
    <D.24084>:
    method = get_method_from_stack_frame (ji, generic_info);
    D.24085 = jinfo_get_method (ji);
    D.24086 = BIT_FIELD_REF <*D.24085, 64, 256>;
    D.24087 = D.24086 & 124;
    if (D.24087 != 0) goto <D.24088>; else goto <D.24089>;
    <D.24088>:
    {
      char * s;

      sf->method = 0B;
      s = mono_method_full_name (method, 1);
      D.24090 = &sf->internal_method_name;
      D.24091 = mono_string_new (domain, s);
      mono_gc_wbarrier_set_field (sf, D.24090, D.24091);
      monoeg_g_free (s);
    }
    goto <D.24092>;
    <D.24089>:
    D.24093 = &sf->method;
    D.24094 = mono_method_get_object (domain, method, 0B);
    mono_gc_wbarrier_set_field (sf, D.24093, D.24094);
    <D.24092>:
    ip.29 = (long int) ip;
    D.24096 = ji->code_start;
    D.24097 = (long int) D.24096;
    D.24098 = ip.29 - D.24097;
    D.24099 = (int) D.24098;
    sf->native_offset = D.24099;
    D.24100 = jinfo_get_method (ji);
    D.24101 = sf->native_offset;
    D.24102 = (unsigned int) D.24101;
    location = mono_debug_lookup_source_location (D.24100, D.24102, domain);
    if (location != 0B) goto <D.24103>; else goto <D.24104>;
    <D.24103>:
    D.24105 = location->il_offset;
    D.24106 = (int) D.24105;
    sf->il_offset = D.24106;
    goto <D.24107>;
    <D.24104>:
    sf->il_offset = 0;
    <D.24107>:
    if (need_file_info != 0) goto <D.24108>; else goto <D.24109>;
    <D.24108>:
    if (location != 0B) goto <D.24112>; else goto <D.24110>;
    <D.24112>:
    D.24113 = location->source_file;
    if (D.24113 != 0B) goto <D.24114>; else goto <D.24110>;
    <D.24114>:
    D.24115 = &sf->filename;
    D.24113 = location->source_file;
    D.24116 = mono_string_new (domain, D.24113);
    mono_gc_wbarrier_set_field (sf, D.24115, D.24116);
    D.24117 = location->row;
    D.24118 = (int) D.24117;
    sf->line = D.24118;
    D.24119 = location->column;
    D.24120 = (int) D.24119;
    sf->column = D.24120;
    goto <D.24111>;
    <D.24110>:
    sf->column = 0;
    D.24121 = sf->column;
    sf->line = D.24121;
    sf->filename = 0B;
    <D.24111>:
    <D.24109>:
    mono_debug_free_source_location (location);
    {
      void * * __p;

      D.24079 = (long unsigned int) i;
      __p = mono_array_addr_with_size (res, 8, D.24079);
      mono_gc_wbarrier_set_arrayref (res, __p, sf);
    }
  }
  <D.23177>:
  i = i + 1;
  <D.23181>:
  if (i < len) goto <D.23180>; else goto <D.23182>;
  <D.23182>:
  D.24062 = res;
  return D.24062;
}


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.24126;
  long unsigned int r1.30;
  long unsigned int mono_walk_stack_with_ctx.31;
  struct MonoDomain * D.24131;
  struct MonoLMF * D.24132;
  struct MonoContext extra_ctx;
  struct MonoInternalThread * thread;

  try
    {
      thread = mono_thread_internal_current ();
      if (thread == 0B) goto <D.24123>; else goto <D.24125>;
      <D.24125>:
      D.24126 = thread->jit_data;
      if (D.24126 == 0B) goto <D.24123>; else goto <D.24124>;
      <D.24123>:
      return;
      <D.24124>:
      if (start_ctx == 0B) goto <D.24127>; else goto <D.24128>;
      <D.24127>:
      mono_arch_flush_register_windows ();
      {
        void * r1;

        __asm__ __volatile__("mr   %0,1" : "=r" r1);
        r1.30 = (long unsigned int) r1;
        extra_ctx.sc_sp = r1.30;
        mono_walk_stack_with_ctx.31 = (long unsigned int) mono_walk_stack_with_ctx;
        extra_ctx.sc_ir = mono_walk_stack_with_ctx.31;
      }
      start_ctx = &extra_ctx;
      <D.24128>:
      D.24131 = mono_domain_get ();
      D.24126 = thread->jit_data;
      D.24132 = mono_get_lmf ();
      mono_walk_stack_full (func, start_ctx, D.24131, D.24126, D.24132, unwind_options, user_data);
    }
  finally
    {
      extra_ctx = {CLOBBER};
    }
}


mono_walk_stack_full (gboolean (*MonoJitStackWalk) (struct StackFrameInfo *, struct MonoContext *, void *) func, struct MonoContext * start_ctx, struct MonoDomain * domain, struct MonoJitTlsData * jit_tls, struct MonoLMF * lmf, MonoUnwindOptions unwind_options, void * user_data)
{
  int unwind_options.32;
  _Bool D.24137;
  long int D.24138;
  long int D.24139;
  _Bool D.24142;
  long int D.24143;
  long int D.24144;
  _Bool D.24147;
  long int D.24148;
  long int D.24149;
  _Bool D.24154;
  long int D.24155;
  long int D.24156;
  struct MonoLMF * lmf.33;
  mgreg_t * * iftmp.34;
  unsigned int D.24168;
  struct MonoJitInfo * D.24170;
  struct MonoMethod * D.24172;
  int D.24173;
  unsigned int D.24174;
  gint iftmp.35;
  unsigned int D.24178;
  unsigned int D.24182;
  void * D.24185;
  struct MonoMethod * D.24186;
  struct MonoMethod * D.24187;
  int D.24190;
  mgreg_t * D.24195;
  long unsigned int D.24198;
  void * D.24199;
  void * D.24200;
  gint il_offset;
  gint i;
  struct MonoContext ctx;
  struct MonoContext new_ctx;
  struct StackFrameInfo frame;
  gboolean res;
  mgreg_t * reg_locations[32];
  mgreg_t * new_reg_locations[32];
  gboolean get_reg_locations;
  gboolean async;

  try
    {
      unwind_options.32 = (int) unwind_options;
      get_reg_locations = unwind_options.32 & 4;
      async = mono_thread_info_is_async_context ();
      D.24137 = start_ctx == 0B;
      D.24138 = (long int) D.24137;
      D.24139 = __builtin_expect (D.24138, 0);
      if (D.24139 != 0) goto <D.24140>; else goto <D.24141>;
      <D.24140>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 817, "start_ctx");
      <D.24141>:
      D.24142 = domain == 0B;
      D.24143 = (long int) D.24142;
      D.24144 = __builtin_expect (D.24143, 0);
      if (D.24144 != 0) goto <D.24145>; else goto <D.24146>;
      <D.24145>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 818, "domain");
      <D.24146>:
      D.24147 = jit_tls == 0B;
      D.24148 = (long int) D.24147;
      D.24149 = __builtin_expect (D.24148, 0);
      if (D.24149 != 0) goto <D.24150>; else goto <D.24151>;
      <D.24150>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 819, "jit_tls");
      <D.24151>:
      if (async != 0) goto <D.24152>; else goto <D.24153>;
      <D.24152>:
      D.24154 = unwind_options != 0;
      D.24155 = (long int) D.24154;
      D.24156 = __builtin_expect (D.24155, 0);
      if (D.24156 != 0) goto <D.24157>; else goto <D.24158>;
      <D.24157>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 824, "unwind_options == MONO_UNWIND_NONE");
      <D.24158>:
      <D.24153>:
      memcpy (&ctx, start_ctx, 312);
      memset (&reg_locations, 0, 256);
      goto <D.23236>;
      <D.23235>:
      lmf.33 = lmf;
      frame.lmf = lmf.33;
      if (get_reg_locations != 0) goto <D.24161>; else goto <D.24162>;
      <D.24161>:
      iftmp.34 = &new_reg_locations;
      goto <D.24163>;
      <D.24162>:
      iftmp.34 = 0B;
      <D.24163>:
      res = mono_find_jit_info_ext (domain, jit_tls, 0B, &ctx, &new_ctx, 0B, &lmf, iftmp.34, &frame);
      if (res == 0) goto <D.24164>; else goto <D.24165>;
      <D.24164>:
      return;
      <D.24165>:
      D.24168 = unwind_options & 1;
      if (D.24168 != 0) goto <D.24169>; else goto <D.24166>;
      <D.24169>:
      D.24170 = frame.ji;
      if (D.24170 != 0B) goto <D.24171>; else goto <D.24166>;
      <D.24171>:
      {
        struct MonoDebugSourceLocation * source;

        D.24170 = frame.ji;
        D.24172 = jinfo_get_method (D.24170);
        D.24173 = frame.native_offset;
        D.24174 = (unsigned int) D.24173;
        source = mono_debug_lookup_source_location (D.24172, D.24174, domain);
        if (source != 0B) goto <D.24176>; else goto <D.24177>;
        <D.24176>:
        D.24178 = source->il_offset;
        iftmp.35 = (gint) D.24178;
        goto <D.24179>;
        <D.24177>:
        iftmp.35 = -1;
        <D.24179>:
        il_offset = iftmp.35;
        mono_debug_free_source_location (source);
      }
      goto <D.24167>;
      <D.24166>:
      il_offset = -1;
      <D.24167>:
      frame.il_offset = il_offset;
      D.24182 = unwind_options & 2;
      if (D.24182 != 0) goto <D.24183>; else goto <D.24180>;
      <D.24183>:
      D.24170 = frame.ji;
      if (D.24170 != 0B) goto <D.24184>; else goto <D.24180>;
      <D.24184>:
      D.24170 = frame.ji;
      D.24170 = frame.ji;
      D.24185 = get_generic_info_from_stack_frame (D.24170, &ctx);
      D.24186 = get_method_from_stack_frame (D.24170, D.24185);
      frame.actual_method = D.24186;
      goto <D.24181>;
      <D.24180>:
      D.24187 = frame.method;
      frame.actual_method = D.24187;
      <D.24181>:
      if (get_reg_locations != 0) goto <D.24188>; else goto <D.24189>;
      <D.24188>:
      frame.reg_locations = &reg_locations;
      <D.24189>:
      D.24190 = func (&frame, &ctx, user_data);
      if (D.24190 != 0) goto <D.24191>; else goto <D.24192>;
      <D.24191>:
      return;
      <D.24192>:
      if (get_reg_locations != 0) goto <D.24193>; else goto <D.24194>;
      <D.24193>:
      i = 0;
      goto <D.23233>;
      <D.23232>:
      D.24195 = new_reg_locations[i];
      if (D.24195 != 0B) goto <D.24196>; else goto <D.24197>;
      <D.24196>:
      D.24195 = new_reg_locations[i];
      reg_locations[i] = D.24195;
      <D.24197>:
      i = i + 1;
      <D.23233>:
      if (i <= 31) goto <D.23232>; else goto <D.23234>;
      <D.23234>:
      <D.24194>:
      ctx = new_ctx;
      <D.23236>:
      D.24198 = ctx.sc_sp;
      D.24199 = (void *) D.24198;
      D.24200 = jit_tls->end_of_stack;
      if (D.24199 < D.24200) goto <D.23235>; else goto <D.23237>;
      <D.23237>:
    }
  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)
{
  long unsigned int D.24204;
  long unsigned int D.24205;
  void * D.24208;
  long unsigned int D.24209;
  long unsigned int D.24210;
  int D.24213;
  long unsigned int D.24216;
  unsigned int D.24217;
  void * D.24218;
  long int D.24219;
  unsigned int D.24220;
  unsigned int D.24221;
  struct MonoDwarfLocListEntry * D.24222;
  long unsigned int D.24223;
  long unsigned int D.24224;
  int D.24227;
  int D.24230;
  int D.24232;
  int D.24235;
  long int D.24236;
  int D.24238;
  sizetype D.24239;
  long int D.24240;
  sizetype D.24241;
  sizetype D.24242;
  void * * D.24243;
  _Bool D.24244;
  long int D.24245;
  long int D.24246;
  long unsigned int D.24250;
  unsigned char D.24253;
  int D.24254;
  long int D.24255;
  int D.24257;
  sizetype D.24258;
  long int D.24259;
  sizetype D.24260;
  sizetype D.24261;
  void * * D.24262;
  struct MonoGenericContext * D.24263;
  struct MonoGenericInst * D.24264;
  short unsigned int D.24269;
  int D.24270;
  int D.24271;
  struct MonoClass * D.24273;
  long unsigned int D.24274;
  long unsigned int D.24275;
  struct MonoVTable * D.24276;
  struct MonoGenericJitInfo * gi;
  struct MonoMethod * method;
  void * info;

  D.24204 = BIT_FIELD_REF <*ji, 64, 256>;
  D.24205 = D.24204 & 131072;
  if (D.24205 == 0) goto <D.24206>; else goto <D.24207>;
  <D.24206>:
  D.24208 = 0B;
  return D.24208;
  <D.24207>:
  gi = mono_jit_info_get_generic_jit_info (ji);
  D.24209 = BIT_FIELD_REF <*gi, 64, 192>;
  D.24210 = D.24209 & 1099511627776;
  if (D.24210 == 0) goto <D.24211>; else goto <D.24212>;
  <D.24211>:
  D.24208 = 0B;
  return D.24208;
  <D.24212>:
  info = 0B;
  D.24213 = gi->nlocs;
  if (D.24213 != 0) goto <D.24214>; else goto <D.24215>;
  <D.24214>:
  {
    int offset;
    int i;

    D.24216 = ctx->sc_ir;
    D.24217 = (unsigned int) D.24216;
    D.24218 = ji->code_start;
    D.24219 = (long int) D.24218;
    D.24220 = (unsigned int) D.24219;
    D.24221 = D.24217 - D.24220;
    offset = (int) D.24221;
    i = 0;
    goto <D.23105>;
    <D.23104>:
    {
      struct MonoDwarfLocListEntry * entry;

      D.24222 = gi->locations;
      D.24223 = (long unsigned int) i;
      D.24224 = D.24223 * 20;
      entry = D.24222 + D.24224;
      D.24227 = entry->from;
      if (D.24227 <= offset) goto <D.24228>; else goto <D.24229>;
      <D.24228>:
      D.24230 = entry->to;
      if (D.24230 > offset) goto <D.24225>; else goto <D.24231>;
      <D.24231>:
      D.24230 = entry->to;
      if (D.24230 == 0) goto <D.24225>; else goto <D.24226>;
      <D.24225>:
      D.24232 = entry->is_reg;
      if (D.24232 != 0) goto <D.24233>; else goto <D.24234>;
      <D.24233>:
      D.24235 = entry->reg;
      D.24236 = mono_arch_context_get_int_reg (ctx, D.24235);
      info = (void *) D.24236;
      goto <D.24237>;
      <D.24234>:
      D.24238 = entry->offset;
      D.24239 = (sizetype) D.24238;
      D.24235 = entry->reg;
      D.24240 = mono_arch_context_get_int_reg (ctx, D.24235);
      D.24241 = (sizetype) D.24240;
      D.24242 = D.24239 + D.24241;
      D.24243 = (void * *) D.24242;
      info = *D.24243;
      <D.24237>:
      goto <D.23103>;
      <D.24226>:
      <D.24229>:
    }
    i = i + 1;
    <D.23105>:
    D.24213 = gi->nlocs;
    if (D.24213 > i) goto <D.23104>; else goto <D.23103>;
    <D.23103>:
    D.24213 = gi->nlocs;
    D.24244 = D.24213 <= i;
    D.24245 = (long int) D.24244;
    D.24246 = __builtin_expect (D.24245, 0);
    if (D.24246 != 0) goto <D.24247>; else goto <D.24248>;
    <D.24247>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 460, "i < gi->nlocs");
    <D.24248>:
  }
  goto <D.24249>;
  <D.24215>:
  D.24209 = BIT_FIELD_REF <*gi, 64, 192>;
  D.24250 = D.24209 & 2199023255552;
  if (D.24250 != 0) goto <D.24251>; else goto <D.24252>;
  <D.24251>:
  D.24253 = gi->this_reg;
  D.24254 = (int) D.24253;
  D.24255 = mono_arch_context_get_int_reg (ctx, D.24254);
  info = (void *) D.24255;
  goto <D.24256>;
  <D.24252>:
  D.24257 = gi->this_offset;
  D.24258 = (sizetype) D.24257;
  D.24253 = gi->this_reg;
  D.24254 = (int) D.24253;
  D.24259 = mono_arch_context_get_int_reg (ctx, D.24254);
  D.24260 = (sizetype) D.24259;
  D.24261 = D.24258 + D.24260;
  D.24262 = (void * *) D.24261;
  info = *D.24262;
  <D.24256>:
  <D.24249>:
  method = jinfo_get_method (ji);
  D.24263 = mono_method_get_context (method);
  D.24264 = D.24263->method_inst;
  if (D.24264 != 0B) goto <D.24265>; else goto <D.24266>;
  <D.24265>:
  D.24208 = info;
  return D.24208;
  <D.24266>:
  D.24269 = method->flags;
  D.24270 = (int) D.24269;
  D.24271 = D.24270 & 16;
  if (D.24271 != 0) goto <D.24267>; else goto <D.24272>;
  <D.24272>:
  D.24273 = method->klass;
  D.24274 = BIT_FIELD_REF <*D.24273, 64, 256>;
  D.24275 = D.24274 & 8;
  if (D.24275 != 0) goto <D.24267>; else goto <D.24268>;
  <D.24267>:
  D.24208 = info;
  return D.24208;
  <D.24268>:
  {
    struct MonoObject * this_obj;

    this_obj = info;
    D.24276 = this_obj->vtable;
    D.24208 = D.24276->klass;
    return D.24208;
  }
}


mono_walk_stack_with_state (gboolean (*MonoJitStackWalk) (struct StackFrameInfo *, struct MonoContext *, void *) func, struct MonoThreadUnwindState * state, MonoUnwindOptions unwind_options, void * user_data)
{
  int D.24280;
  _Bool D.24281;
  long int D.24282;
  long int D.24283;
  int D.24286;
  int D.24289;
  _Bool D.24290;
  long int D.24291;
  long int D.24292;
  struct MonoContext * D.24295;
  void * D.24296;
  void * D.24297;
  void * D.24298;
  struct MonoThreadUnwindState extra_state;

  try
    {
      if (state == 0B) goto <D.24278>; else goto <D.24279>;
      <D.24278>:
      D.24280 = mono_thread_info_is_async_context ();
      D.24281 = D.24280 != 0;
      D.24282 = (long int) D.24281;
      D.24283 = __builtin_expect (D.24282, 0);
      if (D.24283 != 0) goto <D.24284>; else goto <D.24285>;
      <D.24284>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 765, "!mono_thread_info_is_async_context ()");
      <D.24285>:
      D.24286 = mono_thread_state_init_from_current (&extra_state);
      if (D.24286 == 0) goto <D.24287>; else goto <D.24288>;
      <D.24287>:
      return;
      <D.24288>:
      state = &extra_state;
      <D.24279>:
      D.24289 = state->valid;
      D.24290 = D.24289 == 0;
      D.24291 = (long int) D.24290;
      D.24292 = __builtin_expect (D.24291, 0);
      if (D.24292 != 0) goto <D.24293>; else goto <D.24294>;
      <D.24293>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 771, "state->valid");
      <D.24294>:
      D.24295 = &state->ctx;
      D.24296 = state->unwind_data[0];
      D.24297 = state->unwind_data[2];
      D.24298 = state->unwind_data[1];
      mono_walk_stack_full (func, D.24295, D.24296, D.24297, D.24298, 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.24302;
  struct MonoThreadUnwindState state;

  try
    {
      D.24302 = mono_thread_state_init_from_current (&state);
      if (D.24302 == 0) goto <D.24303>; else goto <D.24304>;
      <D.24303>:
      return;
      <D.24304>:
      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.36;
  struct MonoLMF * lmf.37;
  long unsigned int r1.38;
  long unsigned int ves_icall_get_frame_info.39;
  MonoBoolean D.24314;
  <unnamed type> D.24315;
  unsigned int D.24316;
  int D.24319;
  long unsigned int D.24320;
  long unsigned int D.24321;
  void * D.24328;
  struct MonoReflectionMethod * D.24329;
  int D.24330;
  unsigned int D.24331;
  unsigned int D.24334;
  int D.24335;
  char * D.24341;
  struct MonoString * D.24342;
  unsigned int D.24343;
  int D.24344;
  unsigned int D.24345;
  int D.24346;
  int D.24348;
  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.36 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.36);
      lmf.37 = mono_get_lmf ();
      lmf = lmf.37;
      ji = 0B;
      jmethod = 0B;
      mono_arch_flush_register_windows ();
      {
        void * r1;

        __asm__ __volatile__("mr   %0,1" : "=r" r1);
        r1.38 = (long unsigned int) r1;
        ctx.sc_sp = r1.38;
        ves_icall_get_frame_info.39 = (long unsigned int) ves_icall_get_frame_info;
        ctx.sc_ir = ves_icall_get_frame_info.39;
      }
      new_ctx = ctx;
      <D.23261>:
      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.24312>; else goto <D.24313>;
      <D.24312>:
      D.24314 = 0;
      return D.24314;
      <D.24313>:
      D.24315 = frame.type;
      D.24316 = D.24315 + 4294967295;
      if (D.24316 <= 1) goto <D.24317>; else goto <D.24318>;
      <D.24317>:
      // predicted unlikely by continue predictor.
      goto <D.23260>;
      <D.24318>:
      ji = frame.ji;
      D.24319 = frame.native_offset;
      *native_offset = D.24319;
      jmethod = jinfo_get_method (ji);
      D.24320 = BIT_FIELD_REF <*jmethod, 64, 256>;
      D.24321 = D.24320 & 124;
      if (D.24321 != 0) goto <D.24322>; else goto <D.24323>;
      <D.24322>:
      D.24320 = BIT_FIELD_REF <*jmethod, 64, 256>;
      D.24321 = D.24320 & 124;
      if (D.24321 != 68) goto <D.24324>; else goto <D.24325>;
      <D.24324>:
      D.24320 = BIT_FIELD_REF <*jmethod, 64, 256>;
      D.24321 = D.24320 & 124;
      if (D.24321 != 24) goto <D.24326>; else goto <D.24327>;
      <D.24326>:
      // predicted unlikely by continue predictor.
      goto <D.23260>;
      <D.24327>:
      <D.24325>:
      <D.24323>:
      skip = skip + -1;
      <D.23260>:
      if (skip >= 0) goto <D.23261>; else goto <D.23262>;
      <D.23262>:
      D.24328 = get_generic_info_from_stack_frame (ji, &ctx);
      actual_method = get_method_from_stack_frame (ji, D.24328);
      D.24329 = mono_method_get_object (domain, actual_method, 0B);
      mono_gc_wbarrier_generic_store (method, D.24329);
      D.24330 = *native_offset;
      D.24331 = (unsigned int) D.24330;
      location = mono_debug_lookup_source_location (jmethod, D.24331, domain);
      if (location != 0B) goto <D.24332>; else goto <D.24333>;
      <D.24332>:
      D.24334 = location->il_offset;
      D.24335 = (int) D.24334;
      *iloffset = D.24335;
      goto <D.24336>;
      <D.24333>:
      *iloffset = 0;
      <D.24336>:
      if (need_file_info != 0) goto <D.24337>; else goto <D.24338>;
      <D.24337>:
      if (location != 0B) goto <D.24339>; else goto <D.24340>;
      <D.24339>:
      D.24341 = location->source_file;
      D.24342 = mono_string_new (domain, D.24341);
      mono_gc_wbarrier_generic_store (file, D.24342);
      D.24343 = location->row;
      D.24344 = (int) D.24343;
      *line = D.24344;
      D.24345 = location->column;
      D.24346 = (int) D.24345;
      *column = D.24346;
      goto <D.24347>;
      <D.24340>:
      *file = 0B;
      *column = 0;
      D.24348 = *column;
      *line = D.24348;
      <D.24347>:
      <D.24338>:
      mono_debug_free_source_location (location);
      D.24314 = 1;
      return D.24314;
    }
  finally
    {
      lmf = {CLOBBER};
      ctx = {CLOBBER};
      new_ctx = {CLOBBER};
      frame = {CLOBBER};
    }
}


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

  try
    {
      skip.40 = (unsigned int) skip;
      si.skips = skip.40;
      si.frame = 0B;
      mono_walk_stack (callback_get_first_frame_security_info, 2, &si);
      D.24354 = si.skips;
      if (D.24354 == 0) goto <D.24355>; else goto <D.24356>;
      <D.24355>:
      iftmp.41 = si.frame;
      goto <D.24357>;
      <D.24356>:
      iftmp.41 = 0B;
      <D.24357>:
      D.24352 = iftmp.41;
      return D.24352;
    }
  finally
    {
      si = {CLOBBER};
    }
}


callback_get_first_frame_security_info (struct StackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  gboolean D.24362;
  long unsigned int D.24365;
  long unsigned int D.24366;
  unsigned int D.24371;
  unsigned int D.24374;
  struct MonoDomain * D.24375;
  struct MonoSecurityFrame * D.24376;
  struct MonoFrameSecurityInfo * si;
  struct MonoJitInfo * ji;
  struct MonoMethod * method;

  si = data;
  ji = frame->ji;
  if (ji == 0B) goto <D.24360>; else goto <D.24361>;
  <D.24360>:
  D.24362 = 0;
  return D.24362;
  <D.24361>:
  method = jinfo_get_method (ji);
  D.24365 = BIT_FIELD_REF <*method, 64, 256>;
  D.24366 = D.24365 & 124;
  if (D.24366 == 16) goto <D.24363>; else goto <D.24367>;
  <D.24367>:
  D.24365 = BIT_FIELD_REF <*method, 64, 256>;
  D.24366 = D.24365 & 124;
  if (D.24366 == 40) goto <D.24363>; else goto <D.24368>;
  <D.24368>:
  D.24365 = BIT_FIELD_REF <*method, 64, 256>;
  D.24366 = D.24365 & 124;
  if (D.24366 == 44) goto <D.24363>; else goto <D.24369>;
  <D.24369>:
  D.24365 = BIT_FIELD_REF <*method, 64, 256>;
  D.24366 = D.24365 & 124;
  if (D.24366 == 36) goto <D.24363>; else goto <D.24370>;
  <D.24370>:
  D.24365 = BIT_FIELD_REF <*method, 64, 256>;
  D.24366 = D.24365 & 124;
  if (D.24366 == 32) goto <D.24363>; else goto <D.24364>;
  <D.24363>:
  D.24362 = 0;
  return D.24362;
  <D.24364>:
  D.24371 = si->skips;
  if (D.24371 != 0) goto <D.24372>; else goto <D.24373>;
  <D.24372>:
  D.24371 = si->skips;
  D.24374 = D.24371 + 4294967295;
  si->skips = D.24374;
  D.24362 = 0;
  return D.24362;
  <D.24373>:
  D.24375 = frame->domain;
  D.24376 = mono_declsec_create_frame (D.24375, ji);
  si->frame = D.24376;
  D.24362 = 1;
  return D.24362;
}


ves_icall_System_Security_SecurityFrame_GetSecurityStack (gint32 skip)
{
  unsigned int skip.42;
  struct MonoDomain * D.24379;
  struct MonoClass * D.24380;
  unsigned int D.24381;
  long unsigned int D.24382;
  struct MonoArray * D.24383;
  struct MonoArray * D.24384;
  struct MonoSecurityStack ss;

  try
    {
      skip.42 = (unsigned int) skip;
      ss.skips = skip.42;
      ss.count = 0;
      ss.maximum = 6;
      D.24379 = mono_domain_get ();
      D.24380 = mono_defaults.runtimesecurityframe_class;
      D.24381 = ss.maximum;
      D.24382 = (long unsigned int) D.24381;
      D.24383 = mono_array_new (D.24379, D.24380, D.24382);
      ss.stack = D.24383;
      mono_walk_stack (callback_get_stack_frames_security_info, 2, &ss);
      D.24384 = ss.stack;
      return D.24384;
    }
  finally
    {
      ss = {CLOBBER};
    }
}


callback_get_stack_frames_security_info (struct StackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  gboolean D.24389;
  long unsigned int D.24392;
  long unsigned int D.24393;
  unsigned int D.24398;
  unsigned int D.24401;
  unsigned int D.24402;
  unsigned int D.24403;
  struct MonoArray * D.24406;
  unsigned int D.24407;
  unsigned int D.24408;
  long unsigned int D.24409;
  struct MonoDomain * D.24410;
  struct MonoSecurityFrame * D.24411;
  struct MonoSecurityStack * ss;
  struct MonoJitInfo * ji;
  struct MonoMethod * method;

  ss = data;
  ji = frame->ji;
  if (ji == 0B) goto <D.24387>; else goto <D.24388>;
  <D.24387>:
  D.24389 = 0;
  return D.24389;
  <D.24388>:
  method = jinfo_get_method (ji);
  D.24392 = BIT_FIELD_REF <*method, 64, 256>;
  D.24393 = D.24392 & 124;
  if (D.24393 == 16) goto <D.24390>; else goto <D.24394>;
  <D.24394>:
  D.24392 = BIT_FIELD_REF <*method, 64, 256>;
  D.24393 = D.24392 & 124;
  if (D.24393 == 40) goto <D.24390>; else goto <D.24395>;
  <D.24395>:
  D.24392 = BIT_FIELD_REF <*method, 64, 256>;
  D.24393 = D.24392 & 124;
  if (D.24393 == 44) goto <D.24390>; else goto <D.24396>;
  <D.24396>:
  D.24392 = BIT_FIELD_REF <*method, 64, 256>;
  D.24393 = D.24392 & 124;
  if (D.24393 == 36) goto <D.24390>; else goto <D.24397>;
  <D.24397>:
  D.24392 = BIT_FIELD_REF <*method, 64, 256>;
  D.24393 = D.24392 & 124;
  if (D.24393 == 32) goto <D.24390>; else goto <D.24391>;
  <D.24390>:
  D.24389 = 0;
  return D.24389;
  <D.24391>:
  D.24398 = ss->skips;
  if (D.24398 != 0) goto <D.24399>; else goto <D.24400>;
  <D.24399>:
  D.24398 = ss->skips;
  D.24401 = D.24398 + 4294967295;
  ss->skips = D.24401;
  D.24389 = 0;
  return D.24389;
  <D.24400>:
  D.24402 = ss->count;
  D.24403 = ss->maximum;
  if (D.24402 == D.24403) goto <D.24404>; else goto <D.24405>;
  <D.24404>:
  grow_array (ss);
  <D.24405>:
  {
    void * * __p;

    D.24406 = ss->stack;
    D.24402 = ss->count;
    D.24407 = D.24402;
    D.24408 = D.24407 + 1;
    ss->count = D.24408;
    D.24409 = (long unsigned int) D.24407;
    __p = mono_array_addr_with_size (D.24406, 8, D.24409);
    D.24406 = ss->stack;
    D.24410 = frame->domain;
    D.24411 = mono_declsec_create_frame (D.24410, ji);
    mono_gc_wbarrier_set_arrayref (D.24406, __p, D.24411);
  }
  D.24389 = 0;
  return D.24389;
}


grow_array (struct MonoSecurityStack * stack)
{
  unsigned int D.24413;
  struct MonoClass * D.24414;
  long unsigned int D.24415;
  struct MonoArray * D.24416;
  long unsigned int D.24417;
  char * D.24418;
  unsigned int i.43;
  struct MonoDomain * domain;
  guint32 newsize;
  struct MonoArray * newstack;
  int i;

  domain = mono_domain_get ();
  D.24413 = stack->maximum;
  newsize = D.24413 << 1;
  D.24414 = mono_defaults.runtimesecurityframe_class;
  D.24415 = (long unsigned int) newsize;
  newstack = mono_array_new (domain, D.24414, D.24415);
  i = 0;
  goto <D.23295>;
  <D.23294>:
  {
    void * frame;

    D.24416 = stack->stack;
    D.24417 = (long unsigned int) i;
    D.24418 = mono_array_addr_with_size (D.24416, 8, D.24417);
    frame = MEM[(void * *)D.24418];
    {
      void * * __p;

      D.24417 = (long unsigned int) i;
      __p = mono_array_addr_with_size (newstack, 8, D.24417);
      mono_gc_wbarrier_set_arrayref (newstack, __p, frame);
    }
  }
  i = i + 1;
  <D.23295>:
  i.43 = (unsigned int) i;
  D.24413 = stack->maximum;
  if (i.43 < D.24413) goto <D.23294>; else goto <D.23296>;
  <D.23296>:
  stack->maximum = newsize;
  stack->stack = newstack;
}


mini_jit_info_table_find (struct MonoDomain * domain, char * addr, struct MonoDomain * * out_domain)
{
  struct MonoJitInfo * D.24426;
  struct MonoDomain * D.24427;
  struct MonoDomain * D.24430;
  struct MonoDomain * D.24435;
  void * * iftmp.44;
  void * D.24439;
  void * D.24443;
  struct MonoDomain * D.24446;
  struct MonoJitInfo * ji;
  struct MonoInternalThread * t;
  void * * refs;

  t = mono_thread_internal_current ();
  if (out_domain != 0B) goto <D.24420>; else goto <D.24421>;
  <D.24420>:
  *out_domain = 0B;
  <D.24421>:
  ji = mono_jit_info_table_find (domain, addr);
  if (ji != 0B) goto <D.24422>; else goto <D.24423>;
  <D.24422>:
  if (out_domain != 0B) goto <D.24424>; else goto <D.24425>;
  <D.24424>:
  *out_domain = domain;
  <D.24425>:
  D.24426 = ji;
  return D.24426;
  <D.24423>:
  D.24427 = mono_get_root_domain ();
  if (D.24427 != domain) goto <D.24428>; else goto <D.24429>;
  <D.24428>:
  D.24430 = mono_get_root_domain ();
  ji = mono_jit_info_table_find (D.24430, addr);
  if (ji != 0B) goto <D.24431>; else goto <D.24432>;
  <D.24431>:
  if (out_domain != 0B) goto <D.24433>; else goto <D.24434>;
  <D.24433>:
  D.24435 = mono_get_root_domain ();
  *out_domain = D.24435;
  <D.24434>:
  D.24426 = ji;
  return D.24426;
  <D.24432>:
  <D.24429>:
  if (t == 0B) goto <D.24436>; else goto <D.24437>;
  <D.24436>:
  D.24426 = 0B;
  return D.24426;
  <D.24437>:
  D.24439 = t->appdomain_refs;
  if (D.24439 != 0B) goto <D.24440>; else goto <D.24441>;
  <D.24440>:
  D.24439 = t->appdomain_refs;
  iftmp.44 = MEM[(void * *)D.24439];
  goto <D.24442>;
  <D.24441>:
  iftmp.44 = 0B;
  <D.24442>:
  refs = iftmp.44;
  goto <D.23339>;
  <D.23338>:
  D.24443 = *refs;
  if (D.24443 != domain) goto <D.24444>; else goto <D.24445>;
  <D.24444>:
  D.24443 = *refs;
  D.24446 = mono_get_root_domain ();
  if (D.24443 != D.24446) goto <D.24447>; else goto <D.24448>;
  <D.24447>:
  D.24443 = *refs;
  ji = mono_jit_info_table_find (D.24443, addr);
  if (ji != 0B) goto <D.24449>; else goto <D.24450>;
  <D.24449>:
  if (out_domain != 0B) goto <D.24451>; else goto <D.24452>;
  <D.24451>:
  D.24443 = *refs;
  *out_domain = D.24443;
  <D.24452>:
  D.24426 = ji;
  return D.24426;
  <D.24450>:
  <D.24448>:
  <D.24445>:
  refs = refs + 8;
  <D.23339>:
  if (refs != 0B) goto <D.24453>; else goto <D.23340>;
  <D.24453>:
  D.24443 = *refs;
  if (D.24443 != 0B) goto <D.23338>; else goto <D.23340>;
  <D.23340>:
  D.24426 = 0B;
  return D.24426;
}


mono_debugger_run_finally (struct MonoContext * start_ctx)
{
  unsigned int mono_jit_tls_id.45;
  struct MonoLMF * lmf.46;
  struct MonoJitInfo * D.24457;
  int (*<T3daa>) (struct MonoContext *, void *) call_filter.47;
  void * D.24463;
  int (*<T3daa>) (struct MonoContext *, void *) call_filter.48;
  long unsigned int D.24465;
  void * D.24466;
  int D.24467;
  unsigned int D.24470;
  unsigned int D.24471;
  void * D.24474;
  <unnamed-unsigned:15> D.24475;
  int D.24476;
  static int (*<T3daa>) (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.45 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.45);
      lmf.46 = mono_get_lmf ();
      lmf = lmf.46;
      ctx = *start_ctx;
      ji = mono_find_jit_info (domain, jit_tls, &rji, 0B, &ctx, &new_ctx, 0B, &lmf, 0B, 0B);
      D.24457 = ji + 18446744073709551615;
      if (D.24457 > -3B) goto <D.24458>; else goto <D.24459>;
      <D.24458>:
      return;
      <D.24459>:
      call_filter.47 = call_filter;
      if (call_filter.47 == 0B) goto <D.24461>; else goto <D.24462>;
      <D.24461>:
      D.24463 = mono_get_call_filter ();
      call_filter.48 = (int (*<T3daa>) (struct MonoContext *, void *)) D.24463;
      call_filter = call_filter.48;
      <D.24462>:
      i = 0;
      goto <D.23528>;
      <D.23527>:
      {
        struct MonoJitExceptionInfo * ei;

        ei = &ji->clauses[i];
        D.24465 = ctx.sc_ir;
        D.24466 = (void *) D.24465;
        D.24467 = is_address_protected (ji, ei, D.24466);
        if (D.24467 != 0) goto <D.24468>; else goto <D.24469>;
        <D.24468>:
        D.24470 = ei->flags;
        D.24471 = D.24470 & 2;
        if (D.24471 != 0) goto <D.24472>; else goto <D.24473>;
        <D.24472>:
        call_filter.47 = call_filter;
        D.24474 = ei->handler_start;
        call_filter.47 (&ctx, D.24474);
        <D.24473>:
        <D.24469>:
      }
      i = i + 1;
      <D.23528>:
      D.24475 = ji->num_clauses;
      D.24476 = (int) D.24475;
      if (D.24476 > i) goto <D.23527>; else goto <D.23529>;
      <D.23529>:
    }
  finally
    {
      lmf = {CLOBBER};
      ctx = {CLOBBER};
      new_ctx = {CLOBBER};
      rji = {CLOBBER};
    }
}


is_address_protected (struct MonoJitInfo * ji, struct MonoJitExceptionInfo * ei, void * ip)
{
  void * D.24482;
  void * D.24484;
  gboolean D.24485;
  long unsigned int D.24486;
  long unsigned int D.24487;
  long int ip.49;
  void * D.24491;
  long int D.24492;
  long int D.24493;
  long int ei.50;
  struct MonoJitExceptionInfo[0:] * D.24495;
  long int D.24496;
  long int D.24497;
  long int D.24498;
  int D.24499;
  <unnamed-unsigned:15> D.24500;
  int D.24501;
  _Bool D.24502;
  long int D.24503;
  long int D.24504;
  short unsigned int D.24507;
  unsigned int D.24510;
  short unsigned int D.24513;
  unsigned int D.24514;
  unsigned int D.24515;
  short unsigned int D.24518;
  int D.24519;
  struct MonoTryBlockHoleTableJitInfo * table;
  int i;
  guint32 offset;
  guint16 clause;

  D.24482 = ei->try_start;
  if (D.24482 > ip) goto <D.24480>; else goto <D.24483>;
  <D.24483>:
  D.24484 = ei->try_end;
  if (D.24484 <= ip) goto <D.24480>; else goto <D.24481>;
  <D.24480>:
  D.24485 = 0;
  return D.24485;
  <D.24481>:
  D.24486 = BIT_FIELD_REF <*ji, 64, 256>;
  D.24487 = D.24486 & 262144;
  if (D.24487 == 0) goto <D.24488>; else goto <D.24489>;
  <D.24488>:
  D.24485 = 1;
  return D.24485;
  <D.24489>:
  table = mono_jit_info_get_try_block_hole_table_info (ji);
  ip.49 = (long int) ip;
  D.24491 = ji->code_start;
  D.24492 = (long int) D.24491;
  D.24493 = ip.49 - D.24492;
  offset = (guint32) D.24493;
  ei.50 = (long int) ei;
  D.24495 = &ji->clauses;
  D.24496 = (long int) D.24495;
  D.24497 = ei.50 - D.24496;
  D.24498 = D.24497 /[ex] 40;
  clause = (guint16) D.24498;
  D.24499 = (int) clause;
  D.24500 = ji->num_clauses;
  D.24501 = (int) D.24500;
  D.24502 = D.24499 >= D.24501;
  D.24503 = (long int) D.24502;
  D.24504 = __builtin_expect (D.24503, 0);
  if (D.24504 != 0) goto <D.24505>; else goto <D.24506>;
  <D.24505>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 183, "clause < ji->num_clauses");
  <D.24506>:
  i = 0;
  goto <D.23032>;
  <D.23031>:
  {
    struct MonoTryBlockHoleJitInfo * hole;

    hole = &table->holes[i];
    D.24507 = hole->clause;
    if (D.24507 == clause) goto <D.24508>; else goto <D.24509>;
    <D.24508>:
    D.24510 = hole->offset;
    if (D.24510 <= offset) goto <D.24511>; else goto <D.24512>;
    <D.24511>:
    D.24510 = hole->offset;
    D.24513 = hole->length;
    D.24514 = (unsigned int) D.24513;
    D.24515 = D.24510 + D.24514;
    if (D.24515 > offset) goto <D.24516>; else goto <D.24517>;
    <D.24516>:
    D.24485 = 0;
    return D.24485;
    <D.24517>:
    <D.24512>:
    <D.24509>:
  }
  i = i + 1;
  <D.23032>:
  D.24518 = table->num_holes;
  D.24519 = (int) D.24518;
  if (D.24519 > i) goto <D.23031>; else goto <D.23033>;
  <D.23033>:
  D.24485 = 1;
  return D.24485;
}


mono_handle_exception (struct MonoContext * ctx, void * obj)
{
  struct MonoPerfCounters * mono_perfcounters.51;
  unsigned int D.24522;
  unsigned int D.24523;
  gboolean D.24524;

  mono_perfcounters.51 = mono_perfcounters;
  D.24522 = mono_perfcounters.51->exceptions_thrown;
  D.24523 = D.24522 + 1;
  mono_perfcounters.51->exceptions_thrown = D.24523;
  D.24524 = mono_handle_exception_internal (ctx, obj, 0, 0B);
  return D.24524;
}


mono_handle_exception_internal (struct MonoContext * ctx, void * obj, gboolean resume, struct MonoJitInfo * * out_ji)
{
  unsigned int mono_jit_tls_id.52;
  struct MonoLMF * lmf.53;
  _Bool D.24528;
  long int D.24529;
  long int D.24530;
  struct MonoString * * D.24535;
  struct MonoString * D.24536;
  struct MonoException * D.24537;
  struct MonoException * D.24541;
  struct MonoClass * D.24544;
  struct MonoObject * D.24545;
  struct MonoObject * D.24548;
  struct MonoClass * D.24554;
  int D.23450;
  int iftmp.54;
  int D.23449;
  struct MonoVTable * D.24560;
  struct MonoClass * D.24561;
  const char[21] * D.24562;
  unsigned char D.24563;
  int D.24564;
  unsigned char D.24565;
  int D.24566;
  const unsigned char * D.24571;
  unsigned char D.24572;
  int D.24573;
  const unsigned char * D.24574;
  unsigned char D.24575;
  int D.24576;
  const unsigned char * D.24581;
  unsigned char D.24582;
  int D.24583;
  const unsigned char * D.24584;
  unsigned char D.24585;
  int D.24586;
  const unsigned char * D.24591;
  unsigned char D.24592;
  int D.24593;
  const unsigned char * D.24594;
  unsigned char D.24595;
  int D.24596;
  const char * D.24598;
  struct MonoClass * D.24601;
  struct MonoString * D.24602;
  int D.23462;
  int iftmp.55;
  int D.23461;
  const char[27] * D.24606;
  unsigned char D.24607;
  int D.24608;
  unsigned char D.24609;
  int D.24610;
  const unsigned char * D.24615;
  unsigned char D.24616;
  int D.24617;
  const unsigned char * D.24618;
  unsigned char D.24619;
  int D.24620;
  const unsigned char * D.24625;
  unsigned char D.24626;
  int D.24627;
  const unsigned char * D.24628;
  unsigned char D.24629;
  int D.24630;
  const unsigned char * D.24635;
  unsigned char D.24636;
  int D.24637;
  const unsigned char * D.24638;
  unsigned char D.24639;
  int D.24640;
  struct MonoString * D.24644;
  int (*<T3daa>) (struct MonoContext *, void *) call_filter.56;
  void * D.24648;
  int (*<T3daa>) (struct MonoContext *, void *) call_filter.57;
  void * D.24650;
  _Bool D.24651;
  long int D.24652;
  long int D.24653;
  void (*<T32de>) (struct MonoObject *) D.24656;
  _Bool D.24657;
  long int D.24658;
  long int D.24659;
  struct MonoContext * D.24662;
  int D.24665;
  struct MonoMethod * iftmp.58;
  struct MonoVTable * D.24672;
  struct MonoClass * D.24673;
  int D.23482;
  int iftmp.59;
  int D.23481;
  const char[21] * D.24683;
  unsigned char D.24684;
  int D.24685;
  unsigned char D.24686;
  int D.24687;
  const unsigned char * D.24692;
  unsigned char D.24693;
  int D.24694;
  const unsigned char * D.24695;
  unsigned char D.24696;
  int D.24697;
  const unsigned char * D.24702;
  unsigned char D.24703;
  int D.24704;
  const unsigned char * D.24705;
  unsigned char D.24706;
  int D.24707;
  const unsigned char * D.24712;
  unsigned char D.24713;
  int D.24714;
  const unsigned char * D.24715;
  unsigned char D.24716;
  int D.24717;
  int D.23491;
  int iftmp.60;
  int D.23490;
  const char[23] * D.24723;
  unsigned char D.24724;
  int D.24725;
  unsigned char D.24726;
  int D.24727;
  const unsigned char * D.24732;
  unsigned char D.24733;
  int D.24734;
  const unsigned char * D.24735;
  unsigned char D.24736;
  int D.24737;
  const unsigned char * D.24742;
  unsigned char D.24743;
  int D.24744;
  const unsigned char * D.24745;
  unsigned char D.24746;
  int D.24747;
  const unsigned char * D.24752;
  unsigned char D.24753;
  int D.24754;
  const unsigned char * D.24755;
  unsigned char D.24756;
  int D.24757;
  char * iftmp.61;
  long unsigned int D.24765;
  void * D.24766;
  struct MonoVTable * D.24767;
  struct MonoClass * D.24768;
  const char * D.24769;
  const char * D.24770;
  int D.24773;
  struct MonoDebugOptions * D.24778;
  int D.24779;
  struct MonoDebugOptions * D.24782;
  int D.24783;
  struct _IO_FILE * stderr.62;
  struct MonoJitInfo * ji.63;
  struct MonoMethod * D.24791;
  long unsigned int D.24792;
  long unsigned int D.24793;
  struct MonoJitInfo * prev_ji.64;
  struct MonoMethod * D.24799;
  struct MonoMethod * D.24800;
  struct MonoJitInfo * ji.65;
  struct MonoLMF * lmf.66;
  int first_filter_idx.67;
  <unnamed type> D.24816;
  unsigned int D.24817;
  _Bool D.24820;
  long int D.24821;
  long int D.24822;
  struct MonoJitInfo * ji.68;
  struct MonoLMF * * D.24828;
  struct MonoLMF * lmf.69;
  long unsigned int D.24834;
  unsigned int D.24835;
  long unsigned int D.24836;
  unsigned int D.24837;
  long unsigned int D.24842;
  void * D.24843;
  int D.24844;
  int D.24850;
  unsigned int D.24852;
  long unsigned int D.24855;
  long unsigned int D.24856;
  int D.24859;
  sizetype D.24860;
  long int D.24861;
  sizetype D.24862;
  sizetype D.24863;
  void * * D.24864;
  int first_filter_idx.70;
  _Bool D.24868;
  struct MonoObject * D.24873;
  void * D.24874;
  _Bool D.24875;
  long int D.24876;
  long int D.24877;
  long int D.24880;
  long unsigned int D.24886;
  char * D.24887;
  struct MonoJitInfo * D.24888;
  _Bool D.24889;
  long int D.24890;
  long int D.24891;
  struct MonoJitExceptionInfo * D.24894;
  void * D.24895;
  int D.24896;
  int D.24901;
  int D.24904;
  char * D.24907;
  int D.24908;
  long unsigned int D.24909;
  struct MonoLMF * * D.24910;
  struct MonoPerfCounters * mono_perfcounters.71;
  unsigned int D.24912;
  unsigned int frame_count.72;
  unsigned int D.24914;
  gboolean D.24917;
  int D.24918;
  int D.24923;
  int D.24926;
  char * D.24929;
  int D.24930;
  int D.24935;
  int D.24938;
  char * D.24941;
  unsigned int D.24942;
  unsigned int D.24943;
  struct MonoLMF * * D.24944;
  int D.24947;
  <unnamed-unsigned:15> D.24948;
  int D.24949;
  struct MonoDomain * domain;
  struct MonoJitInfo * ji;
  struct MonoJitInfo * prev_ji;
  static int (*<T3daa>) (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.52 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.52);
      lmf.53 = mono_get_lmf ();
      lmf = lmf.53;
      stack_overflow = 0;
      frame_count = 0;
      first_filter_idx = 0;
      non_exception = 0B;
      D.24528 = ctx == 0B;
      D.24529 = (long int) D.24528;
      D.24530 = __builtin_expect (D.24529, 0);
      if (D.24530 != 0) goto <D.24531>; else goto <D.24532>;
      <D.24531>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1517, "ctx != NULL");
      <D.24532>:
      if (obj == 0B) goto <D.24533>; else goto <D.24534>;
      <D.24533>:
      {
        struct MonoException * ex;

        ex = mono_get_exception_null_reference ();
        D.24535 = &ex->message;
        D.24536 = mono_string_new (domain, "Object reference not set to an instance of an object");
        mono_gc_wbarrier_set_field (ex, D.24535, D.24536);
        obj = ex;
      }
      <D.24534>:
      D.24537 = domain->stack_overflow_ex;
      if (D.24537 == obj) goto <D.24538>; else goto <D.24539>;
      <D.24538>:
      stack_overflow = 1;
      goto <D.24540>;
      <D.24539>:
      D.24541 = domain->null_reference_ex;
      if (D.24541 == obj) goto <D.24542>; else goto <D.24543>;
      <D.24542>:
      obj = mono_get_exception_null_reference ();
      <D.24543>:
      <D.24540>:
      D.24544 = mono_defaults.exception_class;
      D.24545 = mono_object_isinst (obj, D.24544);
      if (D.24545 == 0B) goto <D.24546>; else goto <D.24547>;
      <D.24546>:
      non_exception = obj;
      obj = mono_get_exception_runtime_wrapped (obj);
      <D.24547>:
      mono_ex = obj;
      D.24544 = mono_defaults.exception_class;
      D.24548 = mono_object_isinst (obj, D.24544);
      if (D.24548 != 0B) goto <D.24549>; else goto <D.24550>;
      <D.24549>:
      mono_ex = obj;
      goto <D.24551>;
      <D.24550>:
      mono_ex = 0B;
      <D.24551>:
      if (mono_ex != 0B) goto <D.24552>; else goto <D.24553>;
      <D.24552>:
      D.24554 = jit_tls->class_cast_from;
      if (D.24554 != 0B) goto <D.24555>; else goto <D.24556>;
      <D.24555>:
      {
        size_t __s1_len;
        size_t __s2_len;

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

          D.24560 = mono_ex->object.vtable;
          D.24561 = D.24560->klass;
          __s2 = D.24561->name;
          D.24562 = "InvalidCastException";
          D.24563 = MEM[(const unsigned char *)D.24562];
          D.24564 = (int) D.24563;
          D.24565 = *__s2;
          D.24566 = (int) D.24565;
          __result = D.24564 - D.24566;
          {
            if (__s2_len != 0) goto <D.24567>; else goto <D.24568>;
            <D.24567>:
            if (__result == 0) goto <D.24569>; else goto <D.24570>;
            <D.24569>:
            D.24571 = &MEM[(void *)"InvalidCastException" + 1B];
            D.24572 = *D.24571;
            D.24573 = (int) D.24572;
            D.24574 = __s2 + 1;
            D.24575 = *D.24574;
            D.24576 = (int) D.24575;
            __result = D.24573 - D.24576;
            if (__s2_len > 1) goto <D.24577>; else goto <D.24578>;
            <D.24577>:
            if (__result == 0) goto <D.24579>; else goto <D.24580>;
            <D.24579>:
            D.24581 = &MEM[(void *)"InvalidCastException" + 2B];
            D.24582 = *D.24581;
            D.24583 = (int) D.24582;
            D.24584 = __s2 + 2;
            D.24585 = *D.24584;
            D.24586 = (int) D.24585;
            __result = D.24583 - D.24586;
            if (__s2_len > 2) goto <D.24587>; else goto <D.24588>;
            <D.24587>:
            if (__result == 0) goto <D.24589>; else goto <D.24590>;
            <D.24589>:
            D.24591 = &MEM[(void *)"InvalidCastException" + 3B];
            D.24592 = *D.24591;
            D.24593 = (int) D.24592;
            D.24594 = __s2 + 3;
            D.24595 = *D.24594;
            D.24596 = (int) D.24595;
            __result = D.24593 - D.24596;
            <D.24590>:
            <D.24588>:
            <D.24580>:
            <D.24578>:
            <D.24570>:
            <D.24568>:
          }
          D.23449 = __result;
        }
        iftmp.54 = -D.23449;
        goto <D.24597>;
        <D.24559>:
        D.24560 = mono_ex->object.vtable;
        D.24561 = D.24560->klass;
        D.24598 = D.24561->name;
        iftmp.54 = __builtin_strcmp (D.24598, "InvalidCastException");
        <D.24597>:
        D.23450 = iftmp.54;
      }
      if (D.23450 == 0) goto <D.24599>; else goto <D.24600>;
      <D.24599>:
      {
        char * from_name;
        char * to_name;
        char * msg;

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

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

          D.24560 = mono_ex->object.vtable;
          D.24561 = D.24560->klass;
          __s2 = D.24561->name;
          D.24606 = "ArrayTypeMismatchException";
          D.24607 = MEM[(const unsigned char *)D.24606];
          D.24608 = (int) D.24607;
          D.24609 = *__s2;
          D.24610 = (int) D.24609;
          __result = D.24608 - D.24610;
          {
            if (__s2_len != 0) goto <D.24611>; else goto <D.24612>;
            <D.24611>:
            if (__result == 0) goto <D.24613>; else goto <D.24614>;
            <D.24613>:
            D.24615 = &MEM[(void *)"ArrayTypeMismatchException" + 1B];
            D.24616 = *D.24615;
            D.24617 = (int) D.24616;
            D.24618 = __s2 + 1;
            D.24619 = *D.24618;
            D.24620 = (int) D.24619;
            __result = D.24617 - D.24620;
            if (__s2_len > 1) goto <D.24621>; else goto <D.24622>;
            <D.24621>:
            if (__result == 0) goto <D.24623>; else goto <D.24624>;
            <D.24623>:
            D.24625 = &MEM[(void *)"ArrayTypeMismatchException" + 2B];
            D.24626 = *D.24625;
            D.24627 = (int) D.24626;
            D.24628 = __s2 + 2;
            D.24629 = *D.24628;
            D.24630 = (int) D.24629;
            __result = D.24627 - D.24630;
            if (__s2_len > 2) goto <D.24631>; else goto <D.24632>;
            <D.24631>:
            if (__result == 0) goto <D.24633>; else goto <D.24634>;
            <D.24633>:
            D.24635 = &MEM[(void *)"ArrayTypeMismatchException" + 3B];
            D.24636 = *D.24635;
            D.24637 = (int) D.24636;
            D.24638 = __s2 + 3;
            D.24639 = *D.24638;
            D.24640 = (int) D.24639;
            __result = D.24637 - D.24640;
            <D.24634>:
            <D.24632>:
            <D.24624>:
            <D.24622>:
            <D.24614>:
            <D.24612>:
          }
          D.23461 = __result;
        }
        iftmp.55 = -D.23461;
        goto <D.24641>;
        <D.24605>:
        D.24560 = mono_ex->object.vtable;
        D.24561 = D.24560->klass;
        D.24598 = D.24561->name;
        iftmp.55 = __builtin_strcmp (D.24598, "ArrayTypeMismatchException");
        <D.24641>:
        D.23462 = iftmp.55;
      }
      if (D.23462 == 0) goto <D.24642>; else goto <D.24643>;
      <D.24642>:
      {
        char * from_name;
        char * to_name;
        char * msg;

        D.24554 = jit_tls->class_cast_from;
        from_name = mono_type_get_full_name (D.24554);
        D.24601 = jit_tls->class_cast_to;
        to_name = mono_type_get_full_name (D.24601);
        msg = monoeg_g_strdup_printf ("Source array of type \'%s\' cannot be cast to destination array type \'%s\'.", from_name, to_name);
        D.24644 = mono_string_new (domain, msg);
        mono_ex->message = D.24644;
        monoeg_g_free (from_name);
        monoeg_g_free (to_name);
        monoeg_g_free (msg);
      }
      <D.24643>:
      <D.24556>:
      <D.24553>:
      call_filter.56 = call_filter;
      if (call_filter.56 == 0B) goto <D.24646>; else goto <D.24647>;
      <D.24646>:
      D.24648 = mono_get_call_filter ();
      call_filter.57 = (int (*<T3daa>) (struct MonoContext *, void *)) D.24648;
      call_filter = call_filter.57;
      <D.24647>:
      D.24650 = jit_tls->end_of_stack;
      D.24651 = D.24650 == 0B;
      D.24652 = (long int) D.24651;
      D.24653 = __builtin_expect (D.24652, 0);
      if (D.24653 != 0) goto <D.24654>; else goto <D.24655>;
      <D.24654>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1575, "jit_tls->end_of_stack");
      <D.24655>:
      D.24656 = jit_tls->abort_func;
      D.24657 = D.24656 == 0B;
      D.24658 = (long int) D.24657;
      D.24659 = __builtin_expect (D.24658, 0);
      if (D.24659 != 0) goto <D.24660>; else goto <D.24661>;
      <D.24660>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1576, "jit_tls->abort_func");
      <D.24661>:
      D.24662 = &jit_tls->orig_ex_ctx;
      memcpy (D.24662, ctx, 312);
      if (resume == 0) goto <D.24663>; else goto <D.24664>;
      <D.24663>:
      {
        gboolean res;
        struct MonoContext ctx_cp;

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

              try
                {
                  D.24544 = mono_defaults.exception_class;
                  system_exception_get_message = mono_class_get_method_from_name (D.24544, "get_Message", 0);
                  if (system_exception_get_message != 0B) goto <D.24669>; else goto <D.24670>;
                  <D.24669>:
                  iftmp.58 = mono_object_get_virtual_method (obj, system_exception_get_message);
                  goto <D.24671>;
                  <D.24670>:
                  iftmp.58 = 0B;
                  <D.24671>:
                  get_message = iftmp.58;
                  D.24672 = MEM[(struct MonoObject *)mono_ex].vtable;
                  D.24673 = D.24672->klass;
                  type_name = mono_class_get_name (D.24673);
                  msg = 0B;
                  exc = 0B;
                  if (get_message == 0B) goto <D.24674>; else goto <D.24675>;
                  <D.24674>:
                  message = 0B;
                  goto <D.24676>;
                  <D.24675>:
                  {
                    size_t __s1_len;
                    size_t __s2_len;

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

                      __s2 = type_name;
                      D.24683 = "OutOfMemoryException";
                      D.24684 = MEM[(const unsigned char *)D.24683];
                      D.24685 = (int) D.24684;
                      D.24686 = *__s2;
                      D.24687 = (int) D.24686;
                      __result = D.24685 - D.24687;
                      {
                        if (__s2_len != 0) goto <D.24688>; else goto <D.24689>;
                        <D.24688>:
                        if (__result == 0) goto <D.24690>; else goto <D.24691>;
                        <D.24690>:
                        D.24692 = &MEM[(void *)"OutOfMemoryException" + 1B];
                        D.24693 = *D.24692;
                        D.24694 = (int) D.24693;
                        D.24695 = __s2 + 1;
                        D.24696 = *D.24695;
                        D.24697 = (int) D.24696;
                        __result = D.24694 - D.24697;
                        if (__s2_len > 1) goto <D.24698>; else goto <D.24699>;
                        <D.24698>:
                        if (__result == 0) goto <D.24700>; else goto <D.24701>;
                        <D.24700>:
                        D.24702 = &MEM[(void *)"OutOfMemoryException" + 2B];
                        D.24703 = *D.24702;
                        D.24704 = (int) D.24703;
                        D.24705 = __s2 + 2;
                        D.24706 = *D.24705;
                        D.24707 = (int) D.24706;
                        __result = D.24704 - D.24707;
                        if (__s2_len > 2) goto <D.24708>; else goto <D.24709>;
                        <D.24708>:
                        if (__result == 0) goto <D.24710>; else goto <D.24711>;
                        <D.24710>:
                        D.24712 = &MEM[(void *)"OutOfMemoryException" + 3B];
                        D.24713 = *D.24712;
                        D.24714 = (int) D.24713;
                        D.24715 = __s2 + 3;
                        D.24716 = *D.24715;
                        D.24717 = (int) D.24716;
                        __result = D.24714 - D.24717;
                        <D.24711>:
                        <D.24709>:
                        <D.24701>:
                        <D.24699>:
                        <D.24691>:
                        <D.24689>:
                      }
                      D.23481 = __result;
                    }
                    iftmp.59 = -D.23481;
                    goto <D.24718>;
                    <D.24682>:
                    iftmp.59 = __builtin_strcmp (type_name, "OutOfMemoryException");
                    <D.24718>:
                    D.23482 = iftmp.59;
                  }
                  if (D.23482 == 0) goto <D.24677>; else goto <D.24719>;
                  <D.24719>:
                  {
                    size_t __s1_len;
                    size_t __s2_len;

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

                      __s2 = type_name;
                      D.24723 = "StackOverflowException";
                      D.24724 = MEM[(const unsigned char *)D.24723];
                      D.24725 = (int) D.24724;
                      D.24726 = *__s2;
                      D.24727 = (int) D.24726;
                      __result = D.24725 - D.24727;
                      {
                        if (__s2_len != 0) goto <D.24728>; else goto <D.24729>;
                        <D.24728>:
                        if (__result == 0) goto <D.24730>; else goto <D.24731>;
                        <D.24730>:
                        D.24732 = &MEM[(void *)"StackOverflowException" + 1B];
                        D.24733 = *D.24732;
                        D.24734 = (int) D.24733;
                        D.24735 = __s2 + 1;
                        D.24736 = *D.24735;
                        D.24737 = (int) D.24736;
                        __result = D.24734 - D.24737;
                        if (__s2_len > 1) goto <D.24738>; else goto <D.24739>;
                        <D.24738>:
                        if (__result == 0) goto <D.24740>; else goto <D.24741>;
                        <D.24740>:
                        D.24742 = &MEM[(void *)"StackOverflowException" + 2B];
                        D.24743 = *D.24742;
                        D.24744 = (int) D.24743;
                        D.24745 = __s2 + 2;
                        D.24746 = *D.24745;
                        D.24747 = (int) D.24746;
                        __result = D.24744 - D.24747;
                        if (__s2_len > 2) goto <D.24748>; else goto <D.24749>;
                        <D.24748>:
                        if (__result == 0) goto <D.24750>; else goto <D.24751>;
                        <D.24750>:
                        D.24752 = &MEM[(void *)"StackOverflowException" + 3B];
                        D.24753 = *D.24752;
                        D.24754 = (int) D.24753;
                        D.24755 = __s2 + 3;
                        D.24756 = *D.24755;
                        D.24757 = (int) D.24756;
                        __result = D.24754 - D.24757;
                        <D.24751>:
                        <D.24749>:
                        <D.24741>:
                        <D.24739>:
                        <D.24731>:
                        <D.24729>:
                      }
                      D.23490 = __result;
                    }
                    iftmp.60 = -D.23490;
                    goto <D.24758>;
                    <D.24722>:
                    iftmp.60 = __builtin_strcmp (type_name, "StackOverflowException");
                    <D.24758>:
                    D.23491 = iftmp.60;
                  }
                  if (D.23491 == 0) goto <D.24677>; else goto <D.24678>;
                  <D.24677>:
                  message = 0B;
                  msg = monoeg_g_strdup_printf ("(No exception message for: %s)\n", type_name);
                  goto <D.24679>;
                  <D.24678>:
                  message = mono_runtime_invoke (get_message, obj, 0B, &exc);
                  <D.24679>:
                  <D.24676>:
                  if (msg == 0B) goto <D.24759>; else goto <D.24760>;
                  <D.24759>:
                  if (message != 0B) goto <D.24762>; else goto <D.24763>;
                  <D.24762>:
                  iftmp.61 = mono_string_to_utf8 (message);
                  goto <D.24764>;
                  <D.24763>:
                  iftmp.61 = monoeg_strdup ("(System.Exception.Message property not available)");
                  <D.24764>:
                  msg = iftmp.61;
                  <D.24760>:
                  D.24765 = GetCurrentThreadId ();
                  D.24766 = (void *) D.24765;
                  D.24767 = MEM[(struct MonoObject *)obj].vtable;
                  D.24768 = D.24767->klass;
                  D.24769 = D.24768->name_space;
                  D.24767 = MEM[(struct MonoObject *)obj].vtable;
                  D.24768 = D.24767->klass;
                  D.24770 = D.24768->name;
                  monoeg_g_print ("[%p:] EXCEPTION handling: %s.%s: %s\n", D.24766, D.24769, D.24770, msg);
                  monoeg_g_free (msg);
                  if (mono_ex != 0B) goto <D.24771>; else goto <D.24772>;
                  <D.24771>:
                  D.24672 = MEM[(struct MonoObject *)mono_ex].vtable;
                  D.24673 = D.24672->klass;
                  D.24773 = mono_trace_eval_exception (D.24673);
                  if (D.24773 != 0) goto <D.24774>; else goto <D.24775>;
                  <D.24774>:
                  mono_print_thread_dump_from_ctx (ctx);
                  <D.24775>:
                  <D.24772>:
                }
              finally
                {
                  exc = {CLOBBER};
                }
            }
            <D.24667>:
            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.24776>; else goto <D.24777>;
            <D.24776>:
            D.24778 = mini_get_debug_options ();
            D.24779 = D.24778->break_on_exc;
            if (D.24779 != 0) goto <D.24780>; else goto <D.24781>;
            <D.24780>:
            raise (5);
            <D.24781>:
            mono_debugger_agent_handle_exception (obj, ctx, 0B);
            D.24782 = mini_get_debug_options ();
            D.24783 = D.24782->suspend_on_unhandled;
            if (D.24783 != 0) goto <D.24784>; else goto <D.24785>;
            <D.24784>:
            stderr.62 = stderr;
            fprintf (stderr.62, "Unhandled exception, suspending...\n");
            <D.23492>:
            goto <D.23492>;
            <D.24785>:
            mono_unhandled_exception (obj);
            goto <D.24787>;
            <D.24777>:
            {
              gboolean unhandled;

              unhandled = 0;
              ji.63 = ji;
              if (ji.63 != 0B) goto <D.24789>; else goto <D.24790>;
              <D.24789>:
              ji.63 = ji;
              D.24791 = jinfo_get_method (ji.63);
              D.24792 = BIT_FIELD_REF <*D.24791, 64, 256>;
              D.24793 = D.24792 & 124;
              if (D.24793 == 16) goto <D.24794>; else goto <D.24795>;
              <D.24794>:
              prev_ji.64 = prev_ji;
              if (prev_ji.64 != 0B) goto <D.24797>; else goto <D.24798>;
              <D.24797>:
              {
                struct MonoInternalThread * thread;

                thread = mono_thread_internal_current ();
                prev_ji.64 = prev_ji;
                D.24799 = jinfo_get_method (prev_ji.64);
                D.24800 = thread->async_invoke_method;
                if (D.24799 == D.24800) goto <D.24801>; else goto <D.24802>;
                <D.24801>:
                unhandled = 1;
                <D.24802>:
              }
              <D.24798>:
              <D.24795>:
              <D.24790>:
              if (unhandled != 0) goto <D.24803>; else goto <D.24804>;
              <D.24803>:
              mono_debugger_agent_handle_exception (obj, ctx, 0B);
              goto <D.24805>;
              <D.24804>:
              mono_debugger_agent_handle_exception (obj, ctx, &ctx_cp);
              <D.24805>:
            }
            <D.24787>:
          }
        finally
          {
            ctx_cp = {CLOBBER};
          }
      }
      <D.24664>:
      if (out_ji != 0B) goto <D.24806>; else goto <D.24807>;
      <D.24806>:
      *out_ji = 0B;
      <D.24807>:
      filter_idx = 0;
      initial_ctx = *ctx;
      <D.23511>:
      {
        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.24808>; else goto <D.24809>;
            <D.24808>:
            resume = 0;
            ji.65 = jit_tls->resume_state.ji;
            ji = ji.65;
            new_ctx = jit_tls->resume_state.new_ctx;
            clause_index_start = jit_tls->resume_state.clause_index;
            lmf.66 = jit_tls->resume_state.lmf;
            lmf = lmf.66;
            first_filter_idx.67 = jit_tls->resume_state.first_filter_idx;
            first_filter_idx = first_filter_idx.67;
            filter_idx = jit_tls->resume_state.filter_idx;
            goto <D.24813>;
            <D.24809>:
            {
              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.24814>; else goto <D.24815>;
                  <D.24814>:
                  D.24816 = frame.type;
                  D.24817 = D.24816 + 4294967295;
                  if (D.24817 <= 1) goto <D.24818>; else goto <D.24819>;
                  <D.24818>:
                  *ctx = new_ctx;
                  // predicted unlikely by continue predictor.
                  goto <D.23500>;
                  <D.24819>:
                  D.24816 = frame.type;
                  D.24820 = D.24816 != 0;
                  D.24821 = (long int) D.24820;
                  D.24822 = __builtin_expect (D.24821, 0);
                  if (D.24822 != 0) goto <D.24823>; else goto <D.24824>;
                  <D.24823>:
                  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1683, "frame.type == FRAME_TYPE_MANAGED");
                  <D.24824>:
                  ji.68 = frame.ji;
                  ji = ji.68;
                  <D.24815>:
                }
              finally
                {
                  frame = {CLOBBER};
                }
            }
            <D.24813>:
            if (unwind_res == 0) goto <D.24826>; else goto <D.24827>;
            <D.24826>:
            D.24828 = mono_get_lmf_addr ();
            lmf.69 = lmf;
            *D.24828 = lmf.69;
            D.24656 = jit_tls->abort_func;
            D.24656 (obj);
            monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 1692);
            <D.24827>:
            ji.63 = ji;
            method = jinfo_get_method (ji.63);
            frame_count = frame_count + 1;
            if (stack_overflow != 0) goto <D.24830>; else goto <D.24831>;
            <D.24830>:
            if (1 != 0) goto <D.24832>; else goto <D.24833>;
            <D.24832>:
            D.24834 = ctx->sc_sp;
            D.24835 = (unsigned int) D.24834;
            D.24836 = initial_ctx.sc_sp;
            D.24837 = (unsigned int) D.24836;
            free_stack = D.24835 - D.24837;
            goto <D.24838>;
            <D.24833>:
            D.24836 = initial_ctx.sc_sp;
            D.24837 = (unsigned int) D.24836;
            D.24834 = ctx->sc_sp;
            D.24835 = (unsigned int) D.24834;
            free_stack = D.24837 - D.24835;
            <D.24838>:
            goto <D.24839>;
            <D.24831>:
            free_stack = 16777215;
            <D.24839>:
            i = clause_index_start;
            goto <D.23509>;
            <D.23508>:
            {
              struct MonoJitExceptionInfo * ei;
              gboolean filtered;

              ji.63 = ji;
              ei = &ji.63->clauses[i];
              filtered = 0;
              if (free_stack <= 65536) goto <D.24840>; else goto <D.24841>;
              <D.24840>:
              // predicted unlikely by continue predictor.
              goto <D.23503>;
              <D.24841>:
              ji.63 = ji;
              D.24842 = ctx->sc_ir;
              D.24843 = (void *) D.24842;
              D.24844 = is_address_protected (ji.63, ei, D.24843);
              if (D.24844 != 0) goto <D.24845>; else goto <D.24846>;
              <D.24845>:
              {
                struct MonoClass * catch_class;

                ji.63 = ji;
                catch_class = get_exception_catch_class (ei, ji.63, ctx);
                if (non_exception != 0B) goto <D.24849>; else goto <D.24847>;
                <D.24849>:
                D.24850 = wrap_non_exception_throws (method);
                if (D.24850 == 0) goto <D.24851>; else goto <D.24847>;
                <D.24851>:
                ex_obj = non_exception;
                goto <D.24848>;
                <D.24847>:
                ex_obj = obj;
                <D.24848>:
                D.24852 = ei->flags;
                if (D.24852 <= 1) goto <D.24853>; else goto <D.24854>;
                <D.24853>:
                ji.63 = ji;
                D.24855 = BIT_FIELD_REF <*ji.63, 64, 256>;
                D.24856 = D.24855 & 2097152;
                if (D.24856 != 0) goto <D.24857>; else goto <D.24858>;
                <D.24857>:
                monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 1737);
                <D.24858>:
                D.24859 = ei->exvar_offset;
                D.24860 = (sizetype) D.24859;
                D.24861 = ctx->regs[18];
                D.24862 = (sizetype) D.24861;
                D.24863 = D.24860 + D.24862;
                D.24864 = (void * *) D.24863;
                *D.24864 = ex_obj;
                <D.24854>:
                D.24852 = ei->flags;
                if (D.24852 == 1) goto <D.24865>; else goto <D.24866>;
                <D.24865>:
                first_filter_idx.70 = first_filter_idx;
                D.24868 = filter_idx == first_filter_idx.70;
                filtered = (gboolean) D.24868;
                filter_idx = filter_idx + 1;
                <D.24866>:
                D.24852 = ei->flags;
                if (D.24852 == 0) goto <D.24872>; else goto <D.24869>;
                <D.24872>:
                D.24873 = mono_object_isinst (ex_obj, catch_class);
                if (D.24873 != 0B) goto <D.24870>; else goto <D.24869>;
                <D.24869>:
                if (filtered != 0) goto <D.24870>; else goto <D.24871>;
                <D.24870>:
                D.24874 = jit_tls->handler_block_return_address;
                D.24875 = D.24874 != 0B;
                D.24876 = (long int) D.24875;
                D.24877 = __builtin_expect (D.24876, 0);
                if (D.24877 != 0) goto <D.24878>; else goto <D.24879>;
                <D.24878>:
                {
                  gboolean is_outside;
                  void * prot_bp;
                  void * catch_bp;

                  is_outside = 0;
                  D.24880 = jit_tls->handler_block_context.regs[18];
                  prot_bp = (void *) D.24880;
                  D.24861 = ctx->regs[18];
                  catch_bp = (void *) D.24861;
                  if (catch_bp > prot_bp) goto <D.24881>; else goto <D.24882>;
                  <D.24881>:
                  is_outside = 1;
                  goto <D.24883>;
                  <D.24882>:
                  if (catch_bp == prot_bp) goto <D.24884>; else goto <D.24885>;
                  <D.24884>:
                  D.24886 = jit_tls->handler_block_context.sc_ir;
                  D.24887 = (char *) D.24886;
                  D.24888 = mini_jit_info_table_find (domain, D.24887, 0B);
                  ji.63 = ji;
                  D.24889 = D.24888 != ji.63;
                  D.24890 = (long int) D.24889;
                  D.24891 = __builtin_expect (D.24890, 0);
                  if (D.24891 != 0) goto <D.24892>; else goto <D.24893>;
                  <D.24892>:
                  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.24893>:
                  ji.63 = ji;
                  D.24894 = jit_tls->handler_block;
                  D.24895 = ei->handler_start;
                  D.24896 = is_address_protected (ji.63, D.24894, D.24895);
                  if (D.24896 == 0) goto <D.24897>; else goto <D.24898>;
                  <D.24897>:
                  is_outside = 1;
                  <D.24898>:
                  <D.24885>:
                  <D.24883>:
                  if (is_outside != 0) goto <D.24899>; else goto <D.24900>;
                  <D.24899>:
                  jit_tls->handler_block_return_address = 0B;
                  jit_tls->handler_block = 0B;
                  mono_thread_resume_interruption ();
                  <D.24900>:
                }
                <D.24879>:
                D.24901 = mono_trace_is_enabled ();
                if (D.24901 != 0) goto <D.24902>; else goto <D.24903>;
                <D.24902>:
                D.24904 = mono_trace_eval (method);
                if (D.24904 != 0) goto <D.24905>; else goto <D.24906>;
                <D.24905>:
                D.24907 = mono_method_full_name (method, 1);
                monoeg_g_print ("EXCEPTION: catch found at clause %d of %s\n", i, D.24907);
                <D.24906>:
                <D.24903>:
                jit_tls->orig_ex_ctx_set = 1;
                D.24852 = ei->flags;
                D.24908 = (int) D.24852;
                mono_profiler_exception_clause_handler (method, D.24908, i);
                jit_tls->orig_ex_ctx_set = 0;
                D.24895 = ei->handler_start;
                D.24909 = (long unsigned int) D.24895;
                ctx->sc_ir = D.24909;
                D.24910 = mono_get_lmf_addr ();
                lmf.69 = lmf;
                *D.24910 = lmf.69;
                mono_perfcounters.71 = mono_perfcounters;
                mono_perfcounters.71 = mono_perfcounters;
                D.24912 = mono_perfcounters.71->exceptions_depth;
                frame_count.72 = (unsigned int) frame_count;
                D.24914 = D.24912 + frame_count.72;
                mono_perfcounters.71->exceptions_depth = D.24914;
                D.24537 = domain->stack_overflow_ex;
                if (D.24537 == obj) goto <D.24915>; else goto <D.24916>;
                <D.24915>:
                jit_tls->handling_stack_ovf = 0;
                <D.24916>:
                D.24917 = 0;
                return D.24917;
                <D.24871>:
                ji.63 = ji;
                D.24842 = ctx->sc_ir;
                D.24843 = (void *) D.24842;
                D.24918 = is_address_protected (ji.63, ei, D.24843);
                if (D.24918 != 0) goto <D.24919>; else goto <D.24920>;
                <D.24919>:
                D.24852 = ei->flags;
                if (D.24852 == 4) goto <D.24921>; else goto <D.24922>;
                <D.24921>:
                D.24923 = mono_trace_is_enabled ();
                if (D.24923 != 0) goto <D.24924>; else goto <D.24925>;
                <D.24924>:
                D.24926 = mono_trace_eval (method);
                if (D.24926 != 0) goto <D.24927>; else goto <D.24928>;
                <D.24927>:
                D.24929 = mono_method_full_name (method, 1);
                monoeg_g_print ("EXCEPTION: fault clause %d of %s\n", i, D.24929);
                <D.24928>:
                <D.24925>:
                jit_tls->orig_ex_ctx_set = 1;
                D.24852 = ei->flags;
                D.24908 = (int) D.24852;
                mono_profiler_exception_clause_handler (method, D.24908, i);
                jit_tls->orig_ex_ctx_set = 0;
                call_filter.56 = call_filter;
                D.24895 = ei->handler_start;
                call_filter.56 (ctx, D.24895);
                <D.24922>:
                <D.24920>:
                ji.63 = ji;
                D.24842 = ctx->sc_ir;
                D.24843 = (void *) D.24842;
                D.24930 = is_address_protected (ji.63, ei, D.24843);
                if (D.24930 != 0) goto <D.24931>; else goto <D.24932>;
                <D.24931>:
                D.24852 = ei->flags;
                if (D.24852 == 2) goto <D.24933>; else goto <D.24934>;
                <D.24933>:
                D.24935 = mono_trace_is_enabled ();
                if (D.24935 != 0) goto <D.24936>; else goto <D.24937>;
                <D.24936>:
                D.24938 = mono_trace_eval (method);
                if (D.24938 != 0) goto <D.24939>; else goto <D.24940>;
                <D.24939>:
                D.24941 = mono_method_full_name (method, 1);
                monoeg_g_print ("EXCEPTION: finally clause %d of %s\n", i, D.24941);
                <D.24940>:
                <D.24937>:
                jit_tls->orig_ex_ctx_set = 1;
                D.24852 = ei->flags;
                D.24908 = (int) D.24852;
                mono_profiler_exception_clause_handler (method, D.24908, i);
                jit_tls->orig_ex_ctx_set = 0;
                mono_perfcounters.71 = mono_perfcounters;
                D.24942 = mono_perfcounters.71->exceptions_finallys;
                D.24943 = D.24942 + 1;
                mono_perfcounters.71->exceptions_finallys = D.24943;
                D.24944 = mono_get_lmf_addr ();
                lmf.69 = lmf;
                *D.24944 = lmf.69;
                ji.63 = ji;
                D.24855 = BIT_FIELD_REF <*ji.63, 64, 256>;
                D.24856 = D.24855 & 2097152;
                if (D.24856 != 0) goto <D.24945>; else goto <D.24946>;
                <D.24945>:
                jit_tls->resume_state.ex_obj = obj;
                ji.63 = ji;
                jit_tls->resume_state.ji = ji.63;
                D.24947 = i + 1;
                jit_tls->resume_state.clause_index = D.24947;
                jit_tls->resume_state.ctx = *ctx;
                jit_tls->resume_state.new_ctx = new_ctx;
                lmf.69 = lmf;
                jit_tls->resume_state.lmf = lmf.69;
                first_filter_idx.70 = first_filter_idx;
                jit_tls->resume_state.first_filter_idx = first_filter_idx.70;
                jit_tls->resume_state.filter_idx = filter_idx;
                D.24895 = ei->handler_start;
                D.24909 = (long unsigned int) D.24895;
                ctx->sc_ir = D.24909;
                D.24917 = 0;
                return D.24917;
                <D.24946>:
                call_filter.56 = call_filter;
                D.24895 = ei->handler_start;
                call_filter.56 (ctx, D.24895);
                <D.24934>:
                <D.24932>:
              }
              <D.24846>:
            }
            <D.23503>:
            i = i + 1;
            <D.23509>:
            ji.63 = ji;
            D.24948 = ji.63->num_clauses;
            D.24949 = (int) D.24948;
            if (D.24949 > i) goto <D.23508>; else goto <D.23510>;
            <D.23510>:
            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.23500>:
      goto <D.23511>;
      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.24959;

  if (str != 0B) goto <D.24957>; else goto <D.24958>;
  <D.24957>:
  D.24959 = __strdup (str);
  return D.24959;
  <D.24958>:
  D.24959 = 0B;
  return D.24959;
}


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.73;
  struct MonoLMF * lmf.74;
  _Bool D.24963;
  long int D.24964;
  long int D.24965;
  struct MonoException * D.24968;
  struct MonoClass * D.24971;
  struct MonoObject * D.24972;
  int (*<T3daa>) (struct MonoContext *, void *) call_filter.75;
  void * D.24979;
  int (*<T3daa>) (struct MonoContext *, void *) call_filter.76;
  void * D.24981;
  _Bool D.24982;
  long int D.24983;
  long int D.24984;
  void (*<T32de>) (struct MonoObject *) D.24987;
  _Bool D.24988;
  long int D.24989;
  long int D.24990;
  <unnamed type> D.25003;
  unsigned int D.25004;
  _Bool D.25007;
  long int D.25008;
  long int D.25009;
  struct MonoArray * * D.25018;
  struct MonoClass * D.25019;
  struct MonoArray * D.25020;
  struct MonoArray * * D.25021;
  struct MonoArray * D.25022;
  struct MonoString * * D.25025;
  struct MonoString * D.25026;
  gboolean D.25027;
  struct MonoDebugOptions * D.25028;
  int D.25029;
  long unsigned int D.25032;
  long unsigned int D.25033;
  char * D.25036;
  long unsigned int D.25045;
  void * D.25046;
  void * D.25047;
  long unsigned int D.25048;
  long unsigned int D.25055;
  unsigned int D.25056;
  long unsigned int D.25057;
  unsigned int D.25058;
  int D.25063;
  int D.25069;
  unsigned int D.25071;
  int iftmp.77;
  struct MonoPerfCounters * mono_perfcounters.78;
  unsigned int D.25080;
  unsigned int D.25081;
  struct MonoArray * D.25088;
  struct MonoArray * D.25089;
  struct MonoString * D.25092;
  long unsigned int D.25093;
  long unsigned int D.25094;
  int D.25097;
  sizetype D.25098;
  long int D.25099;
  sizetype D.25100;
  sizetype D.25101;
  void * * D.25102;
  void * D.25103;
  struct MonoArray * D.25118;
  struct MonoArray * D.25119;
  struct MonoString * D.25122;
  void * D.25123;
  long unsigned int D.25124;
  struct MonoObject * D.25127;
  struct MonoArray * D.25134;
  struct MonoArray * D.25135;
  struct MonoString * D.25138;
  <unnamed-unsigned:15> D.25141;
  int D.25142;
  struct MonoDomain * domain;
  struct MonoJitInfo * ji;
  static int (*<T3daa>) (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.73 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.73);
      lmf.74 = mono_get_lmf ();
      lmf = lmf.74;
      initial_trace_ips = 0B;
      trace_ips = 0B;
      stack_overflow = 0;
      frame_count = 0;
      has_dynamic_methods = 0;
      D.24963 = ctx == 0B;
      D.24964 = (long int) D.24963;
      D.24965 = __builtin_expect (D.24964, 0);
      if (D.24965 != 0) goto <D.24966>; else goto <D.24967>;
      <D.24966>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1316, "ctx != NULL");
      <D.24967>:
      D.24968 = domain->stack_overflow_ex;
      if (D.24968 == obj) goto <D.24969>; else goto <D.24970>;
      <D.24969>:
      stack_overflow = 1;
      <D.24970>:
      mono_ex = obj;
      initial_trace_ips = mono_ex->trace_ips;
      D.24971 = mono_defaults.exception_class;
      D.24972 = mono_object_isinst (obj, D.24971);
      if (D.24972 != 0B) goto <D.24973>; else goto <D.24974>;
      <D.24973>:
      mono_ex = obj;
      initial_trace_ips = mono_ex->trace_ips;
      goto <D.24975>;
      <D.24974>:
      mono_ex = 0B;
      <D.24975>:
      call_filter.75 = call_filter;
      if (call_filter.75 == 0B) goto <D.24977>; else goto <D.24978>;
      <D.24977>:
      D.24979 = mono_get_call_filter ();
      call_filter.76 = (int (*<T3daa>) (struct MonoContext *, void *)) D.24979;
      call_filter = call_filter.76;
      <D.24978>:
      D.24981 = jit_tls->end_of_stack;
      D.24982 = D.24981 == 0B;
      D.24983 = (long int) D.24982;
      D.24984 = __builtin_expect (D.24983, 0);
      if (D.24984 != 0) goto <D.24985>; else goto <D.24986>;
      <D.24985>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1334, "jit_tls->end_of_stack");
      <D.24986>:
      D.24987 = jit_tls->abort_func;
      D.24988 = D.24987 == 0B;
      D.24989 = (long int) D.24988;
      D.24990 = __builtin_expect (D.24989, 0);
      if (D.24990 != 0) goto <D.24991>; else goto <D.24992>;
      <D.24991>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1335, "jit_tls->abort_func");
      <D.24992>:
      if (out_filter_idx != 0B) goto <D.24993>; else goto <D.24994>;
      <D.24993>:
      *out_filter_idx = -1;
      <D.24994>:
      if (out_ji != 0B) goto <D.24995>; else goto <D.24996>;
      <D.24995>:
      *out_ji = 0B;
      <D.24996>:
      if (out_prev_ji != 0B) goto <D.24997>; else goto <D.24998>;
      <D.24997>:
      *out_prev_ji = 0B;
      <D.24998>:
      filter_idx = 0;
      initial_ctx = *ctx;
      <D.23416>:
      {
        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.24999>; else goto <D.25000>;
            <D.24999>:
            *out_prev_ji = ji;
            <D.25000>:
            unwind_res = mono_find_jit_info_ext (domain, jit_tls, 0B, ctx, &new_ctx, 0B, &lmf, 0B, &frame);
            if (unwind_res != 0) goto <D.25001>; else goto <D.25002>;
            <D.25001>:
            D.25003 = frame.type;
            D.25004 = D.25003 + 4294967295;
            if (D.25004 <= 1) goto <D.25005>; else goto <D.25006>;
            <D.25005>:
            *ctx = new_ctx;
            // predicted unlikely by continue predictor.
            goto <D.23406>;
            <D.25006>:
            D.25003 = frame.type;
            D.25007 = D.25003 != 0;
            D.25008 = (long int) D.25007;
            D.25009 = __builtin_expect (D.25008, 0);
            if (D.25009 != 0) goto <D.25010>; else goto <D.25011>;
            <D.25010>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1363, "frame.type == FRAME_TYPE_MANAGED");
            <D.25011>:
            ji = frame.ji;
            <D.25002>:
            if (unwind_res == 0) goto <D.25012>; else goto <D.25013>;
            <D.25012>:
            if (mono_ex != 0B) goto <D.25014>; else goto <D.25015>;
            <D.25014>:
            if (initial_trace_ips == 0B) goto <D.25016>; else goto <D.25017>;
            <D.25016>:
            trace_ips = monoeg_g_list_reverse (trace_ips);
            D.25018 = &mono_ex->trace_ips;
            D.25019 = mono_defaults.int_class;
            D.25020 = glist_to_array (trace_ips, D.25019);
            mono_gc_wbarrier_set_field (mono_ex, D.25018, D.25020);
            D.25021 = &mono_ex->native_trace_ips;
            D.25022 = build_native_trace ();
            mono_gc_wbarrier_set_field (mono_ex, D.25021, D.25022);
            if (has_dynamic_methods != 0) goto <D.25023>; else goto <D.25024>;
            <D.25023>:
            D.25025 = &mono_ex->stack_trace;
            D.25026 = ves_icall_System_Exception_get_trace (mono_ex);
            mono_gc_wbarrier_set_field (mono_ex, D.25025, D.25026);
            <D.25024>:
            <D.25017>:
            <D.25015>:
            monoeg_g_list_free (trace_ips);
            trace_ips = 0B;
            D.25027 = 0;
            return D.25027;
            <D.25013>:
            frame_count = frame_count + 1;
            method = jinfo_get_method (ji);
            D.25028 = mini_get_debug_options ();
            D.25029 = D.25028->reverse_pinvoke_exceptions;
            if (D.25029 != 0) goto <D.25030>; else goto <D.25031>;
            <D.25030>:
            D.25032 = BIT_FIELD_REF <*method, 64, 256>;
            D.25033 = D.25032 & 124;
            if (D.25033 == 20) goto <D.25034>; else goto <D.25035>;
            <D.25034>:
            D.25036 = 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.25036);
            <D.23407>:
            goto <D.23407>;
            <D.25035>:
            <D.25031>:
            D.25032 = BIT_FIELD_REF <*method, 64, 256>;
            D.25033 = D.25032 & 124;
            if (D.25033 != 16) goto <D.25037>; else goto <D.25038>;
            <D.25037>:
            if (mono_ex != 0B) goto <D.25039>; else goto <D.25040>;
            <D.25039>:
            if (initial_trace_ips == 0B) goto <D.25041>; else goto <D.25042>;
            <D.25041>:
            if (frame_count <= 999) goto <D.25043>; else goto <D.25044>;
            <D.25043>:
            D.25045 = ctx->sc_ir;
            D.25046 = (void *) D.25045;
            trace_ips = monoeg_g_list_prepend (trace_ips, D.25046);
            D.25047 = get_generic_info_from_stack_frame (ji, ctx);
            trace_ips = monoeg_g_list_prepend (trace_ips, D.25047);
            <D.25044>:
            <D.25042>:
            <D.25040>:
            <D.25038>:
            D.25032 = BIT_FIELD_REF <*method, 64, 256>;
            D.25048 = D.25032 & 512;
            if (D.25048 != 0) goto <D.25049>; else goto <D.25050>;
            <D.25049>:
            has_dynamic_methods = 1;
            <D.25050>:
            if (stack_overflow != 0) goto <D.25051>; else goto <D.25052>;
            <D.25051>:
            if (1 != 0) goto <D.25053>; else goto <D.25054>;
            <D.25053>:
            D.25055 = ctx->sc_sp;
            D.25056 = (unsigned int) D.25055;
            D.25057 = initial_ctx.sc_sp;
            D.25058 = (unsigned int) D.25057;
            free_stack = D.25056 - D.25058;
            goto <D.25059>;
            <D.25054>:
            D.25057 = initial_ctx.sc_sp;
            D.25058 = (unsigned int) D.25057;
            D.25055 = ctx->sc_sp;
            D.25056 = (unsigned int) D.25055;
            free_stack = D.25058 - D.25056;
            <D.25059>:
            goto <D.25060>;
            <D.25052>:
            free_stack = 16777215;
            <D.25060>:
            i = clause_index_start;
            goto <D.23414>;
            <D.23413>:
            {
              struct MonoJitExceptionInfo * ei;
              gboolean filtered;

              ei = &ji->clauses[i];
              filtered = 0;
              if (free_stack <= 65536) goto <D.25061>; else goto <D.25062>;
              <D.25061>:
              // predicted unlikely by continue predictor.
              goto <D.23410>;
              <D.25062>:
              D.25045 = ctx->sc_ir;
              D.25046 = (void *) D.25045;
              D.25063 = is_address_protected (ji, ei, D.25046);
              if (D.25063 != 0) goto <D.25064>; else goto <D.25065>;
              <D.25064>:
              {
                struct MonoClass * catch_class;

                catch_class = get_exception_catch_class (ei, ji, ctx);
                if (non_exception != 0B) goto <D.25068>; else goto <D.25066>;
                <D.25068>:
                D.25069 = wrap_non_exception_throws (method);
                if (D.25069 == 0) goto <D.25070>; else goto <D.25066>;
                <D.25070>:
                ex_obj = non_exception;
                goto <D.25067>;
                <D.25066>:
                ex_obj = obj;
                <D.25067>:
                D.25071 = ei->flags;
                if (D.25071 == 1) goto <D.25072>; else goto <D.25073>;
                <D.25072>:
                {
                  gboolean is_user_frame;

                  D.25032 = BIT_FIELD_REF <*method, 64, 256>;
                  D.25033 = D.25032 & 124;
                  if (D.25033 == 0) goto <D.25075>; else goto <D.25078>;
                  <D.25078>:
                  D.25032 = BIT_FIELD_REF <*method, 64, 256>;
                  D.25033 = D.25032 & 124;
                  if (D.25033 == 68) goto <D.25075>; else goto <D.25076>;
                  <D.25075>:
                  iftmp.77 = 1;
                  goto <D.25077>;
                  <D.25076>:
                  iftmp.77 = 0;
                  <D.25077>:
                  is_user_frame = iftmp.77;
                  mono_perfcounters.78 = mono_perfcounters;
                  D.25080 = mono_perfcounters.78->exceptions_filters;
                  D.25081 = D.25080 + 1;
                  mono_perfcounters.78->exceptions_filters = D.25081;
                  if (is_user_frame != 0) goto <D.25082>; else goto <D.25083>;
                  <D.25082>:
                  if (mono_ex != 0B) goto <D.25084>; else goto <D.25085>;
                  <D.25084>:
                  if (initial_trace_ips == 0B) goto <D.25086>; else goto <D.25087>;
                  <D.25086>:
                  trace_ips = monoeg_g_list_reverse (trace_ips);
                  D.25018 = &mono_ex->trace_ips;
                  D.25019 = mono_defaults.int_class;
                  D.25088 = glist_to_array (trace_ips, D.25019);
                  mono_gc_wbarrier_set_field (mono_ex, D.25018, D.25088);
                  D.25021 = &mono_ex->native_trace_ips;
                  D.25089 = build_native_trace ();
                  mono_gc_wbarrier_set_field (mono_ex, D.25021, D.25089);
                  if (has_dynamic_methods != 0) goto <D.25090>; else goto <D.25091>;
                  <D.25090>:
                  D.25025 = &mono_ex->stack_trace;
                  D.25092 = ves_icall_System_Exception_get_trace (mono_ex);
                  mono_gc_wbarrier_set_field (mono_ex, D.25025, D.25092);
                  <D.25091>:
                  <D.25087>:
                  <D.25085>:
                  monoeg_g_list_free (trace_ips);
                  trace_ips = 0B;
                  <D.25083>:
                  D.25093 = BIT_FIELD_REF <*ji, 64, 256>;
                  D.25094 = D.25093 & 2097152;
                  if (D.25094 != 0) goto <D.25095>; else goto <D.25096>;
                  <D.25095>:
                  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 1449);
                  <D.25096>:
                  D.25097 = ei->exvar_offset;
                  D.25098 = (sizetype) D.25097;
                  D.25099 = ctx->regs[18];
                  D.25100 = (sizetype) D.25099;
                  D.25101 = D.25098 + D.25100;
                  D.25102 = (void * *) D.25101;
                  *D.25102 = ex_obj;
                  mono_debugger_agent_begin_exception_filter (mono_ex, ctx, &initial_ctx);
                  call_filter.75 = call_filter;
                  D.25103 = ei->data.filter;
                  filtered = call_filter.75 (ctx, D.25103);
                  mono_debugger_agent_end_exception_filter (mono_ex, ctx, &initial_ctx);
                  if (filtered != 0) goto <D.25104>; else goto <D.25105>;
                  <D.25104>:
                  if (out_filter_idx != 0B) goto <D.25106>; else goto <D.25107>;
                  <D.25106>:
                  *out_filter_idx = filter_idx;
                  <D.25107>:
                  <D.25105>:
                  if (out_ji != 0B) goto <D.25108>; else goto <D.25109>;
                  <D.25108>:
                  *out_ji = ji;
                  <D.25109>:
                  filter_idx = filter_idx + 1;
                  if (filtered != 0) goto <D.25110>; else goto <D.25111>;
                  <D.25110>:
                  if (is_user_frame == 0) goto <D.25112>; else goto <D.25113>;
                  <D.25112>:
                  if (mono_ex != 0B) goto <D.25114>; else goto <D.25115>;
                  <D.25114>:
                  if (initial_trace_ips == 0B) goto <D.25116>; else goto <D.25117>;
                  <D.25116>:
                  trace_ips = monoeg_g_list_reverse (trace_ips);
                  D.25018 = &mono_ex->trace_ips;
                  D.25019 = mono_defaults.int_class;
                  D.25118 = glist_to_array (trace_ips, D.25019);
                  mono_gc_wbarrier_set_field (mono_ex, D.25018, D.25118);
                  D.25021 = &mono_ex->native_trace_ips;
                  D.25119 = build_native_trace ();
                  mono_gc_wbarrier_set_field (mono_ex, D.25021, D.25119);
                  if (has_dynamic_methods != 0) goto <D.25120>; else goto <D.25121>;
                  <D.25120>:
                  D.25025 = &mono_ex->stack_trace;
                  D.25122 = ves_icall_System_Exception_get_trace (mono_ex);
                  mono_gc_wbarrier_set_field (mono_ex, D.25025, D.25122);
                  <D.25121>:
                  <D.25117>:
                  <D.25115>:
                  monoeg_g_list_free (trace_ips);
                  trace_ips = 0B;
                  <D.25113>:
                  D.25123 = ei->handler_start;
                  D.25124 = (long unsigned int) D.25123;
                  ctx->sc_ir = D.25124;
                  D.25027 = 1;
                  return D.25027;
                  <D.25111>:
                }
                <D.25073>:
                D.25071 = ei->flags;
                if (D.25071 == 0) goto <D.25125>; else goto <D.25126>;
                <D.25125>:
                D.25127 = mono_object_isinst (ex_obj, catch_class);
                if (D.25127 != 0B) goto <D.25128>; else goto <D.25129>;
                <D.25128>:
                if (mono_ex != 0B) goto <D.25130>; else goto <D.25131>;
                <D.25130>:
                if (initial_trace_ips == 0B) goto <D.25132>; else goto <D.25133>;
                <D.25132>:
                trace_ips = monoeg_g_list_reverse (trace_ips);
                D.25018 = &mono_ex->trace_ips;
                D.25019 = mono_defaults.int_class;
                D.25134 = glist_to_array (trace_ips, D.25019);
                mono_gc_wbarrier_set_field (mono_ex, D.25018, D.25134);
                D.25021 = &mono_ex->native_trace_ips;
                D.25135 = build_native_trace ();
                mono_gc_wbarrier_set_field (mono_ex, D.25021, D.25135);
                if (has_dynamic_methods != 0) goto <D.25136>; else goto <D.25137>;
                <D.25136>:
                D.25025 = &mono_ex->stack_trace;
                D.25138 = ves_icall_System_Exception_get_trace (mono_ex);
                mono_gc_wbarrier_set_field (mono_ex, D.25025, D.25138);
                <D.25137>:
                <D.25133>:
                <D.25131>:
                monoeg_g_list_free (trace_ips);
                trace_ips = 0B;
                if (out_ji != 0B) goto <D.25139>; else goto <D.25140>;
                <D.25139>:
                *out_ji = ji;
                <D.25140>:
                D.25123 = ei->handler_start;
                D.25124 = (long unsigned int) D.25123;
                ctx->sc_ir = D.25124;
                D.25027 = 1;
                return D.25027;
                <D.25129>:
                <D.25126>:
              }
              <D.25065>:
            }
            <D.23410>:
            i = i + 1;
            <D.23414>:
            D.25141 = ji->num_clauses;
            D.25142 = (int) D.25141;
            if (D.25142 > i) goto <D.23413>; else goto <D.23415>;
            <D.23415>:
            *ctx = new_ctx;
          }
        finally
          {
            new_ctx = {CLOBBER};
            frame = {CLOBBER};
          }
      }
      <D.23406>:
      goto <D.23416>;
      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.25150;
  unsigned int D.25151;
  long unsigned int D.25152;
  long unsigned int D.25153;
  void * D.25154;
  struct MonoDomain * domain;
  struct MonoArray * res;
  int len;
  int i;

  domain = mono_domain_get ();
  if (list == 0B) goto <D.25148>; else goto <D.25149>;
  <D.25148>:
  D.25150 = 0B;
  return D.25150;
  <D.25149>:
  D.25151 = monoeg_g_list_length (list);
  len = (int) D.25151;
  D.25152 = (long unsigned int) len;
  res = mono_array_new (domain, eclass, D.25152);
  i = 0;
  goto <D.23316>;
  <D.23315>:
  {
    void * * __p;

    D.25153 = (long unsigned int) i;
    __p = mono_array_addr_with_size (res, 8, D.25153);
    D.25154 = list->data;
    *__p = D.25154;
  }
  list = list->next;
  i = i + 1;
  <D.23316>:
  if (list != 0B) goto <D.23315>; else goto <D.23317>;
  <D.23317>:
  D.25150 = res;
  return D.25150;
}


build_native_trace ()
{
  struct MonoArray * D.25156;

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


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

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


get_exception_catch_class (struct MonoJitExceptionInfo * ei, struct MonoJitInfo * ji, struct MonoContext * ctx)
{
  unsigned int D.25163;
  struct MonoClass * D.25164;
  long unsigned int D.25167;
  long unsigned int D.25168;
  struct MonoGenericJitInfo * D.25170;
  long unsigned int D.25171;
  long unsigned int D.25172;
  void * D.25173;
  struct MonoType * D.25174;
  struct MonoClass * catch_class;
  struct MonoType * inflated_type;
  struct MonoGenericContext context;

  try
    {
      catch_class = ei->data.catch_class;
      if (catch_class == 0B) goto <D.25160>; else goto <D.25162>;
      <D.25162>:
      D.25163 = ei->flags;
      if (D.25163 != 0) goto <D.25160>; else goto <D.25161>;
      <D.25160>:
      D.25164 = 0B;
      return D.25164;
      <D.25161>:
      D.25167 = BIT_FIELD_REF <*ji, 64, 256>;
      D.25168 = D.25167 & 131072;
      if (D.25168 == 0) goto <D.25165>; else goto <D.25169>;
      <D.25169>:
      D.25170 = mono_jit_info_get_generic_jit_info (ji);
      D.25171 = BIT_FIELD_REF <*D.25170, 64, 192>;
      D.25172 = D.25171 & 1099511627776;
      if (D.25172 == 0) goto <D.25165>; else goto <D.25166>;
      <D.25165>:
      D.25164 = catch_class;
      return D.25164;
      <D.25166>:
      D.25173 = get_generic_info_from_stack_frame (ji, ctx);
      context = get_generic_context_from_stack_frame (ji, D.25173);
      D.25174 = &catch_class->byval_arg;
      inflated_type = mono_class_inflate_generic_type (D.25174, &context);
      catch_class = mono_class_from_mono_type (inflated_type);
      mono_metadata_free_type (inflated_type);
      D.25164 = catch_class;
      return D.25164;
    }
  finally
    {
      context = {CLOBBER};
    }
}


wrap_non_exception_throws (struct MonoMethod * m)
{
  struct MonoClass * D.25177;
  struct MonoImage * D.25178;
  _Bool D.25179;
  long int D.25180;
  long int D.25181;
  unsigned char D.25184;
  gboolean D.25187;
  unsigned char D.25188;
  struct MonoClass * klass.81;
  struct MonoClass * tmp_klass.79;
  struct MonoImage * D.25194;
  struct MonoClass * tmp_klass.80;
  _Bool D.25196;
  long int D.25197;
  long int D.25198;
  struct MonoMethod * D.25205;
  struct MonoClass * D.25207;
  struct MonoClass * klass.82;
  unsigned int D.25209;
  const mono_byte * p.83;
  const gchar * p.84;
  short unsigned int D.25212;
  _Bool D.25213;
  long int D.25214;
  long int D.25215;
  const gchar * p.85;
  char D.25221;
  const gchar * p.86;
  unsigned int D.25225;
  int D.25226;
  long unsigned int D.25227;
  long unsigned int D.25228;
  sizetype D.25229;
  char * D.25230;
  const gchar * p.87;
  int D.23368;
  int iftmp.88;
  int D.23367;
  const char[23] * D.25235;
  unsigned char D.25236;
  int D.25237;
  unsigned char D.25238;
  int D.25239;
  const unsigned char * D.25244;
  unsigned char D.25245;
  int D.25246;
  const unsigned char * D.25247;
  unsigned char D.25248;
  int D.25249;
  const unsigned char * D.25254;
  unsigned char D.25255;
  int D.25256;
  const unsigned char * D.25257;
  unsigned char D.25258;
  int D.25259;
  const unsigned char * D.25264;
  unsigned char D.25265;
  int D.25266;
  const unsigned char * D.25267;
  unsigned char D.25268;
  int D.25269;
  _Bool D.25271;
  long int D.25272;
  long int D.25273;
  int D.25276;
  unsigned char D.25277;
  struct MonoAssembly * ass;
  struct MonoCustomAttrInfo * attrs;
  static struct MonoClass * klass;
  int i;
  gboolean val;

  D.25177 = m->klass;
  D.25178 = D.25177->image;
  ass = D.25178->assembly;
  val = 0;
  D.25179 = ass == 0B;
  D.25180 = (long int) D.25179;
  D.25181 = __builtin_expect (D.25180, 0);
  if (D.25181 != 0) goto <D.25182>; else goto <D.25183>;
  <D.25182>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1196, "ass");
  <D.25183>:
  D.25184 = ass->wrap_non_exception_throws_inited;
  if (D.25184 != 0) goto <D.25185>; else goto <D.25186>;
  <D.25185>:
  D.25188 = ass->wrap_non_exception_throws;
  D.25187 = (gboolean) D.25188;
  return D.25187;
  <D.25186>:
  {
    static struct MonoClass * tmp_klass;

    {
      tmp_klass.79 = tmp_klass;
      if (tmp_klass.79 == 0B) goto <D.25190>; else goto <D.25191>;
      <D.25190>:
      if (0 != 0) goto <D.25192>; else goto <D.25193>;
      <D.25192>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1200, "mono_defaults.corlib == mono_defaults.corlib");
      <D.25193>:
      D.25194 = mono_defaults.corlib;
      tmp_klass.80 = mono_class_from_name (D.25194, "System.Runtime.CompilerServices", "RuntimeCompatibilityAttribute");
      tmp_klass = tmp_klass.80;
      tmp_klass.79 = tmp_klass;
      D.25196 = tmp_klass.79 == 0B;
      D.25197 = (long int) D.25196;
      D.25198 = __builtin_expect (D.25197, 0);
      if (D.25198 != 0) goto <D.25199>; else goto <D.25200>;
      <D.25199>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1200, "tmp_klass");
      <D.25200>:
      <D.25191>:
    }
    klass.81 = tmp_klass;
  }
  klass = klass.81;
  attrs = mono_custom_attrs_from_assembly (ass);
  if (attrs != 0B) goto <D.25201>; else goto <D.25202>;
  <D.25201>:
  i = 0;
  goto <D.23370>;
  <D.23369>:
  {
    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.25205 = attr->ctor;
        if (D.25205 == 0B) goto <D.25203>; else goto <D.25206>;
        <D.25206>:
        D.25205 = attr->ctor;
        D.25207 = D.25205->klass;
        klass.82 = klass;
        if (D.25207 != klass.82) goto <D.25203>; else goto <D.25204>;
        <D.25203>:
        // predicted unlikely by continue predictor.
        goto <D.23359>;
        <D.25204>:
        D.25209 = attr->data_size;
        len = (int) D.25209;
        p.83 = attr->data;
        p = p.83;
        p.84 = p;
        D.25212 = MEM[(const guint16 *)p.84];
        D.25213 = D.25212 != 1;
        D.25214 = (long int) D.25213;
        D.25215 = __builtin_expect (D.25214, 0);
        if (D.25215 != 0) goto <D.25216>; else goto <D.25217>;
        <D.25216>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1215, "read16 (p) == 0x0001");
        <D.25217>:
        p.84 = p;
        p.85 = p.84 + 2;
        p = p.85;
        p.84 = p;
        D.25212 = MEM[(const guint16 *)p.84];
        num_named = (int) D.25212;
        if (num_named != 1) goto <D.25219>; else goto <D.25220>;
        <D.25219>:
        // predicted unlikely by continue predictor.
        goto <D.23359>;
        <D.25220>:
        p.84 = p;
        p.85 = p.84 + 2;
        p = p.85;
        p.84 = p;
        D.25221 = *p.84;
        named_type = (int) D.25221;
        p.84 = p;
        p.86 = p.84 + 1;
        p = p.86;
        p.84 = p;
        D.25221 = *p.84;
        data_type = (int) D.25221;
        p.84 = p;
        p.86 = p.84 + 1;
        p = p.86;
        if (named_type != 84) goto <D.25223>; else goto <D.25224>;
        <D.25223>:
        // predicted unlikely by continue predictor.
        goto <D.23359>;
        <D.25224>:
        p.84 = p;
        D.25225 = mono_metadata_decode_blob_size (p.84, &p);
        name_len = (int) D.25225;
        D.25226 = name_len + 1;
        D.25227 = (long unsigned int) D.25226;
        name = monoeg_malloc (D.25227);
        p.84 = p;
        D.25228 = (long unsigned int) name_len;
        memcpy (name, p.84, D.25228);
        D.25229 = (sizetype) name_len;
        D.25230 = name + D.25229;
        *D.25230 = 0;
        p.84 = p;
        D.25229 = (sizetype) name_len;
        p.87 = p.84 + D.25229;
        p = p.87;
        {
          size_t __s1_len;
          size_t __s2_len;

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

            __s2 = name;
            D.25235 = "WrapNonExceptionThrows";
            D.25236 = MEM[(const unsigned char *)D.25235];
            D.25237 = (int) D.25236;
            D.25238 = *__s2;
            D.25239 = (int) D.25238;
            __result = D.25237 - D.25239;
            {
              if (__s2_len != 0) goto <D.25240>; else goto <D.25241>;
              <D.25240>:
              if (__result == 0) goto <D.25242>; else goto <D.25243>;
              <D.25242>:
              D.25244 = &MEM[(void *)"WrapNonExceptionThrows" + 1B];
              D.25245 = *D.25244;
              D.25246 = (int) D.25245;
              D.25247 = __s2 + 1;
              D.25248 = *D.25247;
              D.25249 = (int) D.25248;
              __result = D.25246 - D.25249;
              if (__s2_len > 1) goto <D.25250>; else goto <D.25251>;
              <D.25250>:
              if (__result == 0) goto <D.25252>; else goto <D.25253>;
              <D.25252>:
              D.25254 = &MEM[(void *)"WrapNonExceptionThrows" + 2B];
              D.25255 = *D.25254;
              D.25256 = (int) D.25255;
              D.25257 = __s2 + 2;
              D.25258 = *D.25257;
              D.25259 = (int) D.25258;
              __result = D.25256 - D.25259;
              if (__s2_len > 2) goto <D.25260>; else goto <D.25261>;
              <D.25260>:
              if (__result == 0) goto <D.25262>; else goto <D.25263>;
              <D.25262>:
              D.25264 = &MEM[(void *)"WrapNonExceptionThrows" + 3B];
              D.25265 = *D.25264;
              D.25266 = (int) D.25265;
              D.25267 = __s2 + 3;
              D.25268 = *D.25267;
              D.25269 = (int) D.25268;
              __result = D.25266 - D.25269;
              <D.25263>:
              <D.25261>:
              <D.25253>:
              <D.25251>:
              <D.25243>:
              <D.25241>:
            }
            D.23367 = __result;
          }
          iftmp.88 = -D.23367;
          goto <D.25270>;
          <D.25234>:
          iftmp.88 = __builtin_strcmp (name, "WrapNonExceptionThrows");
          <D.25270>:
          D.23368 = iftmp.88;
        }
        D.25271 = D.23368 != 0;
        D.25272 = (long int) D.25271;
        D.25273 = __builtin_expect (D.25272, 0);
        if (D.25273 != 0) goto <D.25274>; else goto <D.25275>;
        <D.25274>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1233, "!strcmp (name, \"WrapNonExceptionThrows\")");
        <D.25275>:
        monoeg_g_free (name);
        p.84 = p;
        D.25221 = *p.84;
        val = (gboolean) D.25221;
      }
    finally
      {
        p = {CLOBBER};
      }
  }
  <D.23359>:
  i = i + 1;
  <D.23370>:
  D.25276 = attrs->num_attrs;
  if (D.25276 > i) goto <D.23369>; else goto <D.23371>;
  <D.23371>:
  mono_custom_attrs_free (attrs);
  <D.25202>:
  D.25277 = (unsigned char) val;
  ass->wrap_non_exception_throws = D.25277;
  mono_memory_barrier ();
  ass->wrap_non_exception_throws_inited = 1;
  D.25187 = val;
  return D.25187;
}


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.25281;
  void (*<T553>) (void) func;

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


mono_handle_soft_stack_ovf (struct MonoJitTlsData * jit_tls, struct MonoJitInfo * ji, void * ctx, guint8 * fault_addr)
{
  unsigned int D.25283;
  void * D.25286;
  sizetype D.25289;
  guint8 * D.25290;
  int D.25293;
  int D.25294;
  unsigned int D.25295;
  int D.25296;
  unsigned int D.25297;
  sizetype D.25299;
  guint8 * D.25300;
  sizetype D.25301;
  void * D.25302;
  long unsigned int D.25303;
  struct _IO_FILE * stderr.89;
  void * D.25307;
  unsigned int D.25308;
  void * restore_stack_protection_tramp.90;
  gboolean D.25313;

  D.25283 = jit_tls->stack_ovf_guard_size;
  if (D.25283 != 0) goto <D.25284>; else goto <D.25285>;
  <D.25284>:
  D.25286 = jit_tls->stack_ovf_guard_base;
  if (D.25286 <= fault_addr) goto <D.25287>; else goto <D.25288>;
  <D.25287>:
  D.25286 = jit_tls->stack_ovf_guard_base;
  D.25283 = jit_tls->stack_ovf_guard_size;
  D.25289 = (sizetype) D.25283;
  D.25290 = D.25286 + D.25289;
  if (D.25290 > fault_addr) goto <D.25291>; else goto <D.25292>;
  <D.25291>:
  {
    guint32 guard_size;
    gboolean handled;

    handled = 0;
    D.25283 = jit_tls->stack_ovf_guard_size;
    D.25293 = mono_pagesize ();
    D.25294 = D.25293 * -2;
    D.25295 = (unsigned int) D.25294;
    guard_size = D.25283 + D.25295;
    goto <D.23574>;
    <D.23573>:
    D.25296 = mono_pagesize ();
    D.25297 = (unsigned int) D.25296;
    guard_size = guard_size - D.25297;
    <D.23574>:
    if (guard_size != 0) goto <D.25298>; else goto <D.23575>;
    <D.25298>:
    D.25286 = jit_tls->stack_ovf_guard_base;
    D.25299 = (sizetype) guard_size;
    D.25300 = D.25286 + D.25299;
    if (D.25300 > fault_addr) goto <D.23573>; else goto <D.23575>;
    <D.23575>:
    D.25283 = jit_tls->stack_ovf_guard_size;
    guard_size = D.25283 - guard_size;
    D.25286 = jit_tls->stack_ovf_guard_base;
    D.25283 = jit_tls->stack_ovf_guard_size;
    D.25289 = (sizetype) D.25283;
    D.25299 = (sizetype) guard_size;
    D.25301 = D.25289 - D.25299;
    D.25302 = D.25286 + D.25301;
    D.25303 = (long unsigned int) guard_size;
    mono_mprotect (D.25302, D.25303, 3);
    if (handled == 0) goto <D.25304>; else goto <D.25305>;
    <D.25304>:
    stderr.89 = stderr;
    D.25307 = mono_arch_ip_from_context (ctx);
    fprintf (stderr.89, "Stack overflow in unmanaged: IP: %p, fault addr: %p\n", D.25307, fault_addr);
    D.25308 = jit_tls->handling_stack_ovf;
    if (D.25308 == 0) goto <D.25309>; else goto <D.25310>;
    <D.25309>:
    restore_stack_protection_tramp.90 = restore_stack_protection_tramp;
    jit_tls->restore_stack_prot = restore_stack_protection_tramp.90;
    jit_tls->handling_stack_ovf = 1;
    goto <D.25312>;
    <D.25310>:
    <D.25312>:
    <D.25305>:
    D.25313 = 1;
    return D.25313;
  }
  <D.25292>:
  <D.25288>:
  <D.25285>:
  D.25313 = 0;
  return D.25313;
}


mono_handle_hard_stack_ovf (struct MonoJitTlsData * jit_tls, struct MonoJitInfo * ji, void * ctx, guint8 * fault_addr)
{
  struct _IO_FILE * stderr.91;
  void * D.25316;
  struct MonoMethod * D.25320;
  struct MonoMethod * D.25322;
  char * D.25323;

  stderr.91 = stderr;
  D.25316 = mono_arch_ip_from_context (ctx);
  fprintf (stderr.91, "Stack overflow: IP: %p, fault addr: %p\n", D.25316, fault_addr);
  if (ji != 0B) goto <D.25319>; else goto <D.25317>;
  <D.25319>:
  D.25320 = jinfo_get_method (ji);
  if (D.25320 != 0B) goto <D.25321>; else goto <D.25317>;
  <D.25321>:
  stderr.91 = stderr;
  D.25322 = jinfo_get_method (ji);
  D.25323 = mono_method_full_name (D.25322, 1);
  fprintf (stderr.91, "At %s\n", D.25323);
  goto <D.25318>;
  <D.25317>:
  stderr.91 = stderr;
  fprintf (stderr.91, "At <unmanaged>.\n");
  <D.25318>:
  _exit (1);
}


mono_handle_native_sigsegv (int signal, void * ctx)
{
  unsigned int mono_jit_tls_id.92;
  const char * iftmp.93;
  int handling_sigsegv.94;
  struct MonoDebugOptions * D.25332;
  int D.25333;
  struct _IO_FILE * stderr.95;
  struct MonoInternalThread * D.25339;
  long unsigned int D.25342;
  long unsigned int D.25343;
  char * * D.25344;
  char * D.25345;
  struct MonoDebugOptions * D.25346;
  int D.25347;
  int D.25352;
  _Bool D.25353;
  long int D.25354;
  long int D.25355;
  struct sigaction sa;
  struct MonoJitTlsData * jit_tls;
  const char * signal_str;

  try
    {
      mono_jit_tls_id.92 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.92);
      if (signal == 11) goto <D.25326>; else goto <D.25327>;
      <D.25326>:
      iftmp.93 = "SIGSEGV";
      goto <D.25328>;
      <D.25327>:
      iftmp.93 = "SIGABRT";
      <D.25328>:
      signal_str = iftmp.93;
      handling_sigsegv.94 = handling_sigsegv;
      if (handling_sigsegv.94 != 0) goto <D.25330>; else goto <D.25331>;
      <D.25330>:
      return;
      <D.25331>:
      D.25332 = mini_get_debug_options ();
      D.25333 = D.25332->suspend_on_sigsegv;
      if (D.25333 != 0) goto <D.25334>; else goto <D.25335>;
      <D.25334>:
      stderr.95 = stderr;
      fprintf (stderr.95, "Received SIGSEGV, suspending...\n");
      <D.23609>:
      sleep (0);
      goto <D.23609>;
      <D.25335>:
      handling_sigsegv = 1;
      if (jit_tls != 0B) goto <D.25337>; else goto <D.25338>;
      <D.25337>:
      D.25339 = mono_thread_internal_current ();
      if (D.25339 != 0B) goto <D.25340>; else goto <D.25341>;
      <D.25340>:
      stderr.95 = stderr;
      fprintf (stderr.95, "Stacktrace:\n\n");
      mono_walk_stack (print_stack_frame_to_stderr, 1, 0B);
      <D.25341>:
      <D.25338>:
      {
        void * array[256];
        char * * names;
        int i;
        int size;

        try
          {
            stderr.95 = stderr;
            fprintf (stderr.95, "\nNative stacktrace:\n\n");
            size = backtrace (&array, 256);
            names = backtrace_symbols (&array, size);
            i = 0;
            goto <D.23615>;
            <D.23614>:
            stderr.95 = stderr;
            D.25342 = (long unsigned int) i;
            D.25343 = D.25342 * 8;
            D.25344 = names + D.25343;
            D.25345 = *D.25344;
            fprintf (stderr.95, "\t%s\n", D.25345);
            i = i + 1;
            <D.23615>:
            if (i < size) goto <D.23614>; else goto <D.23616>;
            <D.23616>:
            free (names);
            D.25346 = mini_get_debug_options ();
            D.25347 = D.25346->no_gdb_backtrace;
            if (D.25347 == 0) goto <D.25348>; else goto <D.25349>;
            <D.25348>:
            {
              pid_t pid;
              int status;
              pid_t crashed_pid;

              try
                {
                  crashed_pid = getpid ();
                  pid = mono_runtime_syscall_fork ();
                  if (pid == 0) goto <D.25350>; else goto <D.25351>;
                  <D.25350>:
                  dup2 (2, 1);
                  mono_gdb_render_native_backtraces (crashed_pid);
                  exit (1);
                  <D.25351>:
                  stderr.95 = stderr;
                  fprintf (stderr.95, "\nDebug info from gdb:\n\n");
                  waitpid (pid, &status, 0);
                }
              finally
                {
                  status = {CLOBBER};
                }
            }
            <D.25349>:
          }
        finally
          {
            array = {CLOBBER};
          }
      }
      stderr.95 = stderr;
      fprintf (stderr.95, "\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.25352 = sigaction (6, &sa, 0B);
      D.25353 = D.25352 == -1;
      D.25354 = (long int) D.25353;
      D.25355 = __builtin_expect (D.25354, 0);
      if (D.25355 != 0) goto <D.25356>; else goto <D.25357>;
      <D.25356>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 2327, "sigaction (SIGABRT, &sa, NULL) != -1");
      <D.25357>:
      abort ();
    }
  finally
    {
      sa = {CLOBBER};
    }
}


print_stack_frame_to_stderr (struct StackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  struct MonoJitInfo * D.25360;
  int D.25365;
  unsigned int D.25366;
  struct MonoDomain * D.25367;
  struct _IO_FILE * stderr.96;
  gboolean D.25370;
  struct MonoMethod * method;

  method = 0B;
  D.25360 = frame->ji;
  if (D.25360 != 0B) goto <D.25361>; else goto <D.25362>;
  <D.25361>:
  D.25360 = frame->ji;
  method = jinfo_get_method (D.25360);
  <D.25362>:
  if (method != 0B) goto <D.25363>; else goto <D.25364>;
  <D.25363>:
  {
    gchar * location;

    D.25365 = frame->native_offset;
    D.25366 = (unsigned int) D.25365;
    D.25367 = mono_domain_get ();
    location = mono_debug_print_stack_frame (method, D.25366, D.25367);
    stderr.96 = stderr;
    fprintf (stderr.96, "  %s\n", location);
    monoeg_g_free (location);
  }
  goto <D.25369>;
  <D.25364>:
  stderr.96 = stderr;
  D.25365 = frame->native_offset;
  fprintf (stderr.96, "  at <unknown> <0x%05x>\n", D.25365);
  <D.25369>:
  D.25370 = 0;
  return D.25370;
}


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.25372;
  unsigned int D.25375;
  long int D.25376;
  struct GError * error.97;
  _Bool D.25378;
  long int D.25379;
  long int D.25380;
  unsigned char D.25384;
  long unsigned int D.25388;
  void * D.25389;
  struct _IO_FILE * stdout.98;
  char * D.25391;
  struct MonoInternalThread * thread;
  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.25372 = thread->name;
      if (D.25372 != 0B) goto <D.25373>; else goto <D.25374>;
      <D.25373>:
      D.25372 = thread->name;
      D.25375 = thread->name_len;
      D.25376 = (long int) D.25375;
      name = monoeg_g_utf16_to_utf8 (D.25372, D.25376, 0B, 0B, &error);
      error.97 = error;
      D.25378 = error.97 != 0B;
      D.25379 = (long int) D.25378;
      D.25380 = __builtin_expect (D.25379, 0);
      if (D.25380 != 0) goto <D.25381>; else goto <D.25382>;
      <D.25381>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 2352, "!error");
      <D.25382>:
      monoeg_g_string_append_printf (text, "\n\"%s\"", name);
      monoeg_g_free (name);
      goto <D.25383>;
      <D.25374>:
      D.25384 = thread->threadpool_thread;
      if (D.25384 != 0) goto <D.25385>; else goto <D.25386>;
      <D.25385>:
      monoeg_g_string_append (text, "\n\"<threadpool thread>\"");
      goto <D.25387>;
      <D.25386>:
      monoeg_g_string_append (text, "\n\"<unnamed thread>\"");
      <D.25387>:
      <D.25383>:
      wapi_desc = wapi_current_thread_desc ();
      D.25388 = thread->tid;
      D.25389 = (void *) D.25388;
      monoeg_g_string_append_printf (text, " tid=0x%p this=0x%p %s\n", D.25389, thread, wapi_desc);
      free (wapi_desc);
      stdout.98 = stdout;
      fprintf (stdout.98, "\t<Stack traces in thread dumps not supported on this platform>\n");
      stdout.98 = stdout;
      D.25391 = text->str;
      fprintf (stdout.98, "%s\n", D.25391);
      monoeg_g_string_free (text, 1);
      stdout.98 = stdout;
      fflush (stdout.98);
    }
  finally
    {
      error = {CLOBBER};
    }
}


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.99;
  long unsigned int D.25393;
  long unsigned int D.25394;
  void * D.25395;
  struct MonoJitTlsData * jit_tls;
  struct MonoContext new_ctx;

  try
    {
      mono_jit_tls_id.99 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.99);
      D.25393 = jit_tls->resume_state.ctx.sc_ir;
      ctx->sc_ir = D.25393;
      D.25394 = jit_tls->resume_state.ctx.sc_sp;
      ctx->sc_sp = D.25394;
      new_ctx = *ctx;
      D.25395 = jit_tls->resume_state.ex_obj;
      mono_handle_exception_internal (&new_ctx, D.25395, 1, 0B);
      mono_restore_context (&new_ctx);
    }
  finally
    {
      new_ctx = {CLOBBER};
    }
}


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

  D.25396 = 0;
  return D.25396;
}


mono_set_cast_details (struct MonoClass * from, struct MonoClass * to)
{
  struct MonoDebugOptions * D.25398;
  int D.25399;
  unsigned int mono_jit_tls_id.100;
  struct MonoJitTlsData * jit_tls;

  jit_tls = 0B;
  D.25398 = mini_get_debug_options ();
  D.25399 = D.25398->better_cast_details;
  if (D.25399 != 0) goto <D.25400>; else goto <D.25401>;
  <D.25400>:
  mono_jit_tls_id.100 = mono_jit_tls_id;
  jit_tls = pthread_getspecific (mono_jit_tls_id.100);
  jit_tls->class_cast_from = from;
  jit_tls->class_cast_to = to;
  <D.25401>:
}


mono_thread_state_init_from_sigctx (struct MonoThreadUnwindState * ctx, void * sigctx)
{
  gboolean D.25403;

  monoeg_g_log (0B, 4, "Implement mono_arch_sigctx_to_monoctx for the current target");
  <D.23652>:
  goto <D.23652>;
  D.25403 = 0;
  return D.25403;
}


mono_thread_state_init_from_monoctx (struct MonoThreadUnwindState * ctx, struct MonoContext * mctx)
{
  void * D.25408;
  gboolean D.25409;
  struct MonoDomain * D.25410;
  struct MonoLMF * D.25411;
  struct MonoInternalThread * thread;

  thread = mono_thread_internal_current ();
  if (thread == 0B) goto <D.25405>; else goto <D.25407>;
  <D.25407>:
  D.25408 = thread->jit_data;
  if (D.25408 == 0B) goto <D.25405>; else goto <D.25406>;
  <D.25405>:
  ctx->valid = 0;
  D.25409 = 0;
  return D.25409;
  <D.25406>:
  ctx->ctx = *mctx;
  D.25410 = mono_domain_get ();
  ctx->unwind_data[0] = D.25410;
  D.25411 = mono_get_lmf ();
  ctx->unwind_data[1] = D.25411;
  D.25408 = thread->jit_data;
  ctx->unwind_data[2] = D.25408;
  ctx->valid = 1;
  D.25409 = 1;
  return D.25409;
}


mono_thread_state_init_from_current (struct MonoThreadUnwindState * ctx)
{
  void * D.25416;
  gboolean D.25417;
  long unsigned int r1.101;
  long unsigned int mono_thread_state_init_from_current.102;
  struct MonoDomain * D.25420;
  struct MonoLMF * D.25421;
  struct MonoInternalThread * thread;

  thread = mono_thread_internal_current ();
  mono_arch_flush_register_windows ();
  if (thread == 0B) goto <D.25413>; else goto <D.25415>;
  <D.25415>:
  D.25416 = thread->jit_data;
  if (D.25416 == 0B) goto <D.25413>; else goto <D.25414>;
  <D.25413>:
  ctx->valid = 0;
  D.25417 = 0;
  return D.25417;
  <D.25414>:
  {
    void * r1;

    __asm__ __volatile__("mr   %0,1" : "=r" r1);
    r1.101 = (long unsigned int) r1;
    ctx->ctx.sc_sp = r1.101;
    mono_thread_state_init_from_current.102 = (long unsigned int) mono_thread_state_init_from_current;
    ctx->ctx.sc_ir = mono_thread_state_init_from_current.102;
  }
  D.25420 = mono_domain_get ();
  ctx->unwind_data[0] = D.25420;
  D.25421 = mono_get_lmf ();
  ctx->unwind_data[1] = D.25421;
  D.25416 = thread->jit_data;
  ctx->unwind_data[2] = D.25416;
  ctx->valid = 1;
  D.25417 = 1;
  return D.25417;
}


mono_setup_async_callback (struct MonoContext * ctx, void (*<Tbf>) (void *) async_cb, void * user_data)
{
  monoeg_g_log (0B, 4, "This target doesn\'t support mono_arch_setup_async_callback");
  <D.23673>:
  goto <D.23673>;
}


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 (*<T39bf>) (struct MonoObject *, void *) unhandled_exception_hook.103;
  void * unhandled_exception_hook_data.104;
  struct MonoObject * other.105;
  struct _IO_FILE * stderr.106;
  int D.25436;

  unhandled_exception_hook.103 = unhandled_exception_hook;
  if (unhandled_exception_hook.103 != 0B) goto <D.25424>; else goto <D.25425>;
  <D.25424>:
  unhandled_exception_hook.103 = unhandled_exception_hook;
  unhandled_exception_hook_data.104 = unhandled_exception_hook_data;
  unhandled_exception_hook.103 (exc, unhandled_exception_hook_data.104);
  goto <D.25427>;
  <D.25425>:
  {
    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.25428>; else goto <D.25429>;
        <D.25428>:
        msg = mono_string_to_utf8 (str);
        goto <D.25430>;
        <D.25429>:
        other.105 = other;
        if (other.105 != 0B) goto <D.25432>; else goto <D.25433>;
        <D.25432>:
        {
          char * original_backtrace;
          char * nested_backtrace;

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


mono_restore_context (struct MonoContext * ctx)
{
  void (*<T3ed0>) (struct MonoContext *) restore_context.107;
  void * D.25440;
  void (*<T3ed0>) (struct MonoContext *) restore_context.108;
  static void (*<T3ed0>) (struct MonoContext *) restore_context;

  restore_context.107 = restore_context;
  if (restore_context.107 == 0B) goto <D.25438>; else goto <D.25439>;
  <D.25438>:
  D.25440 = mono_get_restore_context ();
  restore_context.108 = (void (*<T3ed0>) (struct MonoContext *)) D.25440;
  restore_context = restore_context.108;
  <D.25439>:
  restore_context.107 = restore_context;
  restore_context.107 (ctx);
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 2709);
}


