__attribute__((visibility ("hidden")))
mono_exceptions_init ()
{
  int mono_aot_only.0;
  void * D.23497;
  void * D.23498;
  void * D.23499;
  void * D.23500;
  void * D.23502;
  struct MonoTrampInfo * info.1;
  void * D.23504;
  void * D.23505;
  void * D.23506;
  void * D.23507;
  void (*<T2750>) (struct MonoException *) D.23508;
  struct MonoRuntimeExceptionHandlingCallbacks cbs;

  try
    {
      mono_aot_only.0 = mono_aot_only;
      if (mono_aot_only.0 != 0) goto <D.23495>; else goto <D.23496>;
      <D.23495>:
      D.23497 = mono_aot_get_trampoline ("restore_context");
      restore_context_func = D.23497;
      D.23498 = mono_aot_get_trampoline ("call_filter");
      call_filter_func = D.23498;
      D.23499 = mono_aot_get_trampoline ("throw_exception");
      throw_exception_func = D.23499;
      D.23500 = mono_aot_get_trampoline ("rethrow_exception");
      rethrow_exception_func = D.23500;
      goto <D.23501>;
      <D.23496>:
      {
        struct MonoTrampInfo * info;

        try
          {
            D.23502 = mono_arch_get_restore_context (&info, 0);
            restore_context_func = D.23502;
            info.1 = info;
            mono_tramp_info_register (info.1);
            D.23504 = mono_arch_get_call_filter (&info, 0);
            call_filter_func = D.23504;
            info.1 = info;
            mono_tramp_info_register (info.1);
            D.23505 = mono_arch_get_throw_exception (&info, 0);
            throw_exception_func = D.23505;
            info.1 = info;
            mono_tramp_info_register (info.1);
            D.23506 = mono_arch_get_rethrow_exception (&info, 0);
            rethrow_exception_func = D.23506;
            info.1 = info;
            mono_tramp_info_register (info.1);
          }
        finally
          {
            info = {CLOBBER};
          }
      }
      <D.23501>:
      cbs.mono_walk_stack_with_ctx = mono_runtime_walk_stack_with_ctx;
      cbs.mono_walk_stack_with_state = mono_walk_stack_with_state;
      D.23507 = mono_get_throw_exception ();
      D.23508 = (void (*<T2750>) (struct MonoException *)) D.23507;
      cbs.mono_raise_exception = D.23508;
      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.2;
  int D.23514;

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

    mono_jit_tls_id.2 = mono_jit_tls_id;
    jit_tls = pthread_getspecific (mono_jit_tls_id.2);
    if (jit_tls != 0B) goto <D.23512>; else goto <D.23513>;
    <D.23512>:
    D.23514 = jit_tls->orig_ex_ctx_set;
    if (D.23514 != 0) goto <D.23515>; else goto <D.23516>;
    <D.23515>:
    start_ctx = &jit_tls->orig_ex_ctx;
    <D.23516>:
    <D.23513>:
  }
  <D.23510>:
  mono_walk_stack_with_ctx (func, start_ctx, unwind_options, user_data);
}


__attribute__((visibility ("hidden")))
mono_get_throw_exception ()
{
  void * throw_exception_func.3;
  _Bool D.23518;
  long int D.23519;
  long int D.23520;
  void * D.23523;

  throw_exception_func.3 = throw_exception_func;
  D.23518 = throw_exception_func.3 == 0B;
  D.23519 = (long int) D.23518;
  D.23520 = __builtin_expect (D.23519, 0);
  if (D.23520 != 0) goto <D.23521>; else goto <D.23522>;
  <D.23521>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 117, "throw_exception_func");
  <D.23522>:
  D.23523 = throw_exception_func;
  return D.23523;
}


__attribute__((visibility ("hidden")))
mono_get_rethrow_exception ()
{
  void * rethrow_exception_func.4;
  _Bool D.23526;
  long int D.23527;
  long int D.23528;
  void * D.23531;

  rethrow_exception_func.4 = rethrow_exception_func;
  D.23526 = rethrow_exception_func.4 == 0B;
  D.23527 = (long int) D.23526;
  D.23528 = __builtin_expect (D.23527, 0);
  if (D.23528 != 0) goto <D.23529>; else goto <D.23530>;
  <D.23529>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 124, "rethrow_exception_func");
  <D.23530>:
  D.23531 = rethrow_exception_func;
  return D.23531;
}


__attribute__((visibility ("hidden")))
mono_get_call_filter ()
{
  void * call_filter_func.5;
  _Bool D.23534;
  long int D.23535;
  long int D.23536;
  void * D.23539;

  call_filter_func.5 = call_filter_func;
  D.23534 = call_filter_func.5 == 0B;
  D.23535 = (long int) D.23534;
  D.23536 = __builtin_expect (D.23535, 0);
  if (D.23536 != 0) goto <D.23537>; else goto <D.23538>;
  <D.23537>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 131, "call_filter_func");
  <D.23538>:
  D.23539 = call_filter_func;
  return D.23539;
}


__attribute__((visibility ("hidden")))
mono_get_restore_context ()
{
  void * restore_context_func.6;
  _Bool D.23542;
  long int D.23543;
  long int D.23544;
  void * D.23547;

  restore_context_func.6 = restore_context_func;
  D.23542 = restore_context_func.6 == 0B;
  D.23543 = (long int) D.23542;
  D.23544 = __builtin_expect (D.23543, 0);
  if (D.23544 != 0) goto <D.23545>; else goto <D.23546>;
  <D.23545>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 138, "restore_context_func");
  <D.23546>:
  D.23547 = restore_context_func;
  return D.23547;
}


__attribute__((visibility ("hidden")))
mono_get_throw_corlib_exception ()
{
  void * throw_corlib_exception_func.7;
  void * D.23552;
  int mono_aot_only.8;
  struct MonoTrampInfo * info.9;
  void * code;
  struct MonoTrampInfo * info;

  try
    {
      code = 0B;
      throw_corlib_exception_func.7 = throw_corlib_exception_func;
      if (throw_corlib_exception_func.7 != 0B) goto <D.23550>; else goto <D.23551>;
      <D.23550>:
      D.23552 = throw_corlib_exception_func;
      return D.23552;
      <D.23551>:
      mono_aot_only.8 = mono_aot_only;
      if (mono_aot_only.8 != 0) goto <D.23554>; else goto <D.23555>;
      <D.23554>:
      code = mono_aot_get_trampoline ("throw_corlib_exception");
      goto <D.23556>;
      <D.23555>:
      code = mono_arch_get_throw_corlib_exception (&info, 0);
      info.9 = info;
      mono_tramp_info_register (info.9);
      <D.23556>:
      mono_memory_barrier ();
      throw_corlib_exception_func = code;
      D.23552 = throw_corlib_exception_func;
      return D.23552;
    }
  finally
    {
      info = {CLOBBER};
    }
}


mono_memory_barrier ()
{
  __sync_synchronize ();
}


__attribute__((visibility ("hidden")))
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.23560;
  struct MonoJitInfo * D.23569;
  int managed2.10;
  long unsigned int D.23578;
  long unsigned int D.23579;
  long unsigned int D.23582;
  int D.23587;
  sizetype D.23588;
  const char * D.23589;
  long int real_ip.11;
  long int start.12;
  long int D.23593;
  unsigned int offset.13;
  char * D.23604;
  struct MonoMethod * D.23607;
  gchar * D.23608;
  gboolean managed2;
  void * ip;
  struct MonoJitInfo * ji;
  struct MonoMethod * method;

  try
    {
      D.23560 = ctx->uc_mcontext.psw.addr;
      ip = (void *) D.23560;
      method = 0B;
      if (trace != 0B) goto <D.23561>; else goto <D.23562>;
      <D.23561>:
      *trace = 0B;
      <D.23562>:
      if (native_offset != 0B) goto <D.23563>; else goto <D.23564>;
      <D.23563>:
      *native_offset = -1;
      <D.23564>:
      if (managed != 0B) goto <D.23565>; else goto <D.23566>;
      <D.23565>:
      *managed = 0;
      <D.23566>:
      ji = find_jit_info (domain, jit_tls, res, prev_ji, ctx, new_ctx, lmf, &managed2);
      if (ji == -1B) goto <D.23567>; else goto <D.23568>;
      <D.23567>:
      D.23569 = ji;
      return D.23569;
      <D.23568>:
      if (ji != 0B) goto <D.23570>; else goto <D.23571>;
      <D.23570>:
      method = jinfo_get_method (ji);
      <D.23571>:
      managed2.10 = managed2;
      if (managed2.10 != 0) goto <D.23572>; else goto <D.23576>;
      <D.23576>:
      if (ji != 0B) goto <D.23577>; else goto <D.23573>;
      <D.23577>:
      D.23578 = BIT_FIELD_REF <*method, 64, 256>;
      D.23579 = D.23578 & 4467570830351532032;
      if (D.23579 != 0) goto <D.23572>; else goto <D.23573>;
      <D.23572>:
      {
        const char * real_ip;
        const char * start;
        gint32 offset;

        start = ji->code_start;
        managed2.10 = managed2;
        if (managed2.10 == 0) goto <D.23580>; else goto <D.23581>;
        <D.23580>:
        D.23582 = new_ctx->uc_mcontext.psw.addr;
        real_ip = (const char *) D.23582;
        goto <D.23583>;
        <D.23581>:
        real_ip = ip;
        <D.23583>:
        if (real_ip >= start) goto <D.23586>; else goto <D.23584>;
        <D.23586>:
        D.23587 = ji->code_size;
        D.23588 = (sizetype) D.23587;
        D.23589 = start + D.23588;
        if (D.23589 >= real_ip) goto <D.23590>; else goto <D.23584>;
        <D.23590>:
        real_ip.11 = (long int) real_ip;
        start.12 = (long int) start;
        D.23593 = real_ip.11 - start.12;
        offset = (gint32) D.23593;
        goto <D.23585>;
        <D.23584>:
        offset = -1;
        <D.23585>:
        if (native_offset != 0B) goto <D.23594>; else goto <D.23595>;
        <D.23594>:
        *native_offset = offset;
        <D.23595>:
        if (managed != 0B) goto <D.23596>; else goto <D.23597>;
        <D.23596>:
        D.23578 = BIT_FIELD_REF <*method, 64, 256>;
        D.23579 = D.23578 & 4467570830351532032;
        if (D.23579 == 0) goto <D.23598>; else goto <D.23600>;
        <D.23600>:
        D.23578 = BIT_FIELD_REF <*method, 64, 256>;
        D.23579 = D.23578 & 4467570830351532032;
        if (D.23579 == 2449958197289549824) goto <D.23598>; else goto <D.23599>;
        <D.23598>:
        *managed = 1;
        <D.23599>:
        <D.23597>:
        if (trace != 0B) goto <D.23601>; else goto <D.23602>;
        <D.23601>:
        offset.13 = (unsigned int) offset;
        D.23604 = mono_debug_print_stack_frame (method, offset.13, domain);
        *trace = D.23604;
        <D.23602>:
      }
      goto <D.23574>;
      <D.23573>:
      if (trace != 0B) goto <D.23605>; else goto <D.23606>;
      <D.23605>:
      {
        char * fname;

        D.23607 = jinfo_get_method (res);
        fname = mono_method_full_name (D.23607, 1);
        D.23608 = monoeg_g_strdup_printf ("in (unmanaged) %s", fname);
        *trace = D.23608;
        monoeg_g_free (fname);
      }
      <D.23606>:
      <D.23574>:
      D.23569 = ji;
      return D.23569;
    }
  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.23611;
  void * D.23615;
  int D.23617;
  sizetype D.23618;
  guint8 * D.23619;
  struct MonoJitInfo * D.23625;
  <unnamed type> D.23626;
  struct MonoJitInfo * D.23629;
  struct MonoMethod * D.23632;
  struct StackFrameInfo frame;
  struct MonoJitInfo * ji;
  gboolean err;
  void * ip;

  try
    {
      D.23611 = ctx->uc_mcontext.psw.addr;
      ip = (void *) D.23611;
      if (prev_ji != 0B) goto <D.23614>; else goto <D.23612>;
      <D.23614>:
      D.23615 = prev_ji->code_start;
      if (D.23615 < ip) goto <D.23616>; else goto <D.23612>;
      <D.23616>:
      D.23615 = prev_ji->code_start;
      D.23617 = prev_ji->code_size;
      D.23618 = (sizetype) D.23617;
      D.23619 = D.23615 + D.23618;
      if (D.23619 > ip) goto <D.23620>; else goto <D.23612>;
      <D.23620>:
      ji = prev_ji;
      goto <D.23613>;
      <D.23612>:
      ji = mini_jit_info_table_find (domain, ip, 0B);
      <D.23613>:
      if (managed != 0B) goto <D.23621>; else goto <D.23622>;
      <D.23621>:
      *managed = 0;
      <D.23622>:
      err = mono_arch_find_jit_info (domain, jit_tls, ji, ctx, new_ctx, lmf, 0B, &frame);
      if (err == 0) goto <D.23623>; else goto <D.23624>;
      <D.23623>:
      D.23625 = -1B;
      return D.23625;
      <D.23624>:
      D.23626 = frame.type;
      switch (D.23626) <default: <D.22887>, case 0: <D.22883>, case 1: <D.22885>, case 2: <D.22884>>
      <D.22883>:
      if (managed != 0B) goto <D.23627>; else goto <D.23628>;
      <D.23627>:
      *managed = 1;
      <D.23628>:
      D.23625 = frame.ji;
      return D.23625;
      <D.22884>:
      D.23629 = frame.ji;
      if (D.23629 != 0B) goto <D.23630>; else goto <D.23631>;
      <D.23630>:
      D.23625 = frame.ji;
      return D.23625;
      <D.23631>:
      memset (res, 0, 48);
      D.23632 = frame.method;
      res->d.method = D.23632;
      D.23625 = res;
      return D.23625;
      <D.22885>:
      {
        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, 512);
            D.23625 = ji;
            return D.23625;
          }
        finally
          {
            tmp_ctx = {CLOBBER};
          }
      }
      <D.22887>:
      monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 246);
      D.23625 = 0B;
      return D.23625;
    }
  finally
    {
      frame = {CLOBBER};
    }
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__, __nothrow__, __leaf__))
memset (void * __dest, int __ch, size_t __len)
{
  void * D.23636;
  long unsigned int D.23637;

  D.23637 = __builtin_object_size (__dest, 0);
  D.23636 = __builtin___memset_chk (__dest, __ch, __len, D.23637);
  return D.23636;
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__, __nothrow__, __leaf__))
memcpy (void * restrict __dest, const void * restrict __src, size_t __len)
{
  void * D.23639;
  long unsigned int D.23640;

  D.23640 = __builtin_object_size (__dest, 0);
  D.23639 = __builtin___memcpy_chk (__dest, __src, __len, D.23640);
  return D.23639;
}


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

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


__attribute__((visibility ("hidden")))
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.23644;
  void * D.23650;
  int D.23652;
  sizetype D.23653;
  guint8 * D.23654;
  struct MonoDomain * target_domain.14;
  gboolean D.23663;
  struct MonoJitInfo * D.23664;
  long unsigned int D.23667;
  long unsigned int D.23668;
  <unnamed type> D.23671;
  long unsigned int D.23678;
  long unsigned int D.23679;
  int D.23689;
  long unsigned int D.23694;
  int D.23699;
  sizetype D.23700;
  const char * D.23701;
  long int real_ip.15;
  long int start.16;
  long int D.23705;
  int D.23706;
  int D.23709;
  unsigned int D.23710;
  char * D.23711;
  struct MonoMethod * D.23714;
  gchar * D.23717;
  gboolean err;
  void * ip;
  struct MonoJitInfo * ji;
  struct MonoDomain * target_domain;
  struct MonoMethod * method;
  gboolean async;

  try
    {
      D.23644 = ctx->uc_mcontext.psw.addr;
      ip = (void *) D.23644;
      target_domain = domain;
      method = 0B;
      async = mono_thread_info_is_async_context ();
      if (trace != 0B) goto <D.23645>; else goto <D.23646>;
      <D.23645>:
      *trace = 0B;
      <D.23646>:
      if (prev_ji != 0B) goto <D.23649>; else goto <D.23647>;
      <D.23649>:
      D.23650 = prev_ji->code_start;
      if (D.23650 < ip) goto <D.23651>; else goto <D.23647>;
      <D.23651>:
      D.23650 = prev_ji->code_start;
      D.23652 = prev_ji->code_size;
      D.23653 = (sizetype) D.23652;
      D.23654 = D.23650 + D.23653;
      if (D.23654 > ip) goto <D.23655>; else goto <D.23647>;
      <D.23655>:
      ji = prev_ji;
      goto <D.23648>;
      <D.23647>:
      ji = mini_jit_info_table_find (domain, ip, &target_domain);
      <D.23648>:
      target_domain.14 = target_domain;
      if (target_domain.14 == 0B) goto <D.23657>; else goto <D.23658>;
      <D.23657>:
      target_domain = domain;
      <D.23658>:
      if (save_locations != 0B) goto <D.23659>; else goto <D.23660>;
      <D.23659>:
      memset (save_locations, 0, 128);
      <D.23660>:
      target_domain.14 = target_domain;
      err = mono_arch_find_jit_info (target_domain.14, jit_tls, ji, ctx, new_ctx, lmf, save_locations, frame);
      if (err == 0) goto <D.23661>; else goto <D.23662>;
      <D.23661>:
      D.23663 = 0;
      return D.23663;
      <D.23662>:
      D.23664 = frame->ji;
      if (D.23664 != 0B) goto <D.23665>; else goto <D.23666>;
      <D.23665>:
      D.23664 = frame->ji;
      D.23667 = BIT_FIELD_REF <*D.23664, 64, 256>;
      D.23668 = D.23667 & 549755813888;
      if (D.23668 == 0) goto <D.23669>; else goto <D.23670>;
      <D.23669>:
      D.23664 = frame->ji;
      method = jinfo_get_method (D.23664);
      <D.23670>:
      <D.23666>:
      D.23671 = frame->type;
      if (D.23671 == 0) goto <D.23672>; else goto <D.23673>;
      <D.23672>:
      if (method != 0B) goto <D.23674>; else goto <D.23675>;
      <D.23674>:
      D.23678 = BIT_FIELD_REF <*method, 64, 256>;
      D.23679 = D.23678 & 4467570830351532032;
      if (D.23679 == 0) goto <D.23676>; else goto <D.23680>;
      <D.23680>:
      D.23678 = BIT_FIELD_REF <*method, 64, 256>;
      D.23679 = D.23678 & 4467570830351532032;
      if (D.23679 == 2449958197289549824) goto <D.23676>; else goto <D.23677>;
      <D.23676>:
      frame->managed = 1;
      <D.23677>:
      <D.23675>:
      <D.23673>:
      D.23671 = frame->type;
      if (D.23671 == 2) goto <D.23681>; else goto <D.23682>;
      <D.23681>:
      frame->ji = 0B;
      frame->method = 0B;
      <D.23682>:
      frame->native_offset = -1;
      target_domain.14 = target_domain;
      frame->domain = target_domain.14;
      frame->async_context = async;
      ji = frame->ji;
      D.23671 = frame->type;
      if (D.23671 == 0) goto <D.23683>; else goto <D.23684>;
      <D.23683>:
      frame->method = method;
      <D.23684>:
      if (ji != 0B) goto <D.23688>; else goto <D.23685>;
      <D.23688>:
      D.23689 = frame->managed;
      if (D.23689 != 0) goto <D.23686>; else goto <D.23690>;
      <D.23690>:
      if (method != 0B) goto <D.23691>; else goto <D.23685>;
      <D.23691>:
      D.23678 = BIT_FIELD_REF <*method, 64, 256>;
      D.23679 = D.23678 & 4467570830351532032;
      if (D.23679 != 0) goto <D.23686>; else goto <D.23685>;
      <D.23686>:
      {
        const char * real_ip;
        const char * start;

        start = ji->code_start;
        D.23689 = frame->managed;
        if (D.23689 == 0) goto <D.23692>; else goto <D.23693>;
        <D.23692>:
        D.23694 = new_ctx->uc_mcontext.psw.addr;
        real_ip = (const char *) D.23694;
        goto <D.23695>;
        <D.23693>:
        real_ip = ip;
        <D.23695>:
        if (real_ip >= start) goto <D.23698>; else goto <D.23696>;
        <D.23698>:
        D.23699 = ji->code_size;
        D.23700 = (sizetype) D.23699;
        D.23701 = start + D.23700;
        if (D.23701 >= real_ip) goto <D.23702>; else goto <D.23696>;
        <D.23702>:
        real_ip.15 = (long int) real_ip;
        start.16 = (long int) start;
        D.23705 = real_ip.15 - start.16;
        D.23706 = (int) D.23705;
        frame->native_offset = D.23706;
        goto <D.23697>;
        <D.23696>:
        frame->native_offset = -1;
        <D.23697>:
        if (trace != 0B) goto <D.23707>; else goto <D.23708>;
        <D.23707>:
        D.23709 = frame->native_offset;
        D.23710 = (unsigned int) D.23709;
        D.23711 = mono_debug_print_stack_frame (method, D.23710, domain);
        *trace = D.23711;
        <D.23708>:
      }
      goto <D.23687>;
      <D.23685>:
      if (trace != 0B) goto <D.23712>; else goto <D.23713>;
      <D.23712>:
      D.23714 = frame->method;
      if (D.23714 != 0B) goto <D.23715>; else goto <D.23716>;
      <D.23715>:
      {
        char * fname;

        D.23714 = frame->method;
        fname = mono_method_full_name (D.23714, 1);
        D.23717 = monoeg_g_strdup_printf ("in (unmanaged) %s", fname);
        *trace = D.23717;
        monoeg_g_free (fname);
      }
      <D.23716>:
      <D.23713>:
      <D.23687>:
      D.23663 = 1;
      return D.23663;
    }
  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.23722;
  long unsigned int D.23723;
  long unsigned int D.23724;
  int D.23725;
  long unsigned int D.23726;
  char * D.23727;
  int D.23728;
  long unsigned int D.23729;
  char * D.23730;
  int D.23733;
  void * D.23737;
  long int ip.17;
  long int D.23739;
  long int D.23740;
  long unsigned int D.23741;
  int D.23742;
  _Bool D.23745;
  struct MonoDomain * domain;
  struct MonoArray * ta;
  int len;
  int i;

  domain = mono_domain_get ();
  ta = ex->trace_ips;
  if (ta == 0B) goto <D.23720>; else goto <D.23721>;
  <D.23720>:
  D.23722 = 0;
  return D.23722;
  <D.23721>:
  D.23723 = mono_array_length (ta);
  D.23724 = D.23723 >> 1;
  len = (int) D.23724;
  i = 0;
  goto <D.22975>;
  <D.22974>:
  {
    void * ip;
    void * generic_info;
    struct MonoJitInfo * ji;

    D.23725 = i * 2;
    D.23726 = (long unsigned int) D.23725;
    D.23727 = mono_array_addr_with_size (ta, 8, D.23726);
    ip = MEM[(void * *)D.23727];
    D.23725 = i * 2;
    D.23728 = D.23725 + 1;
    D.23729 = (long unsigned int) D.23728;
    D.23730 = mono_array_addr_with_size (ta, 8, D.23729);
    generic_info = MEM[(void * *)D.23730];
    ji = mono_jit_info_table_find (domain, ip);
    if (ji == 0B) goto <D.23731>; else goto <D.23732>;
    <D.23731>:
    D.23733 = func (0B, ip, 0, 0, user_data);
    if (D.23733 != 0) goto <D.23734>; else goto <D.23735>;
    <D.23734>:
    D.23722 = 1;
    return D.23722;
    <D.23735>:
    goto <D.23736>;
    <D.23732>:
    {
      struct MonoMethod * method;

      method = get_method_from_stack_frame (ji, generic_info);
      D.23737 = ji->code_start;
      ip.17 = (long int) ip;
      D.23737 = ji->code_start;
      D.23739 = (long int) D.23737;
      D.23740 = ip.17 - D.23739;
      D.23741 = (long unsigned int) D.23740;
      D.23742 = func (method, D.23737, D.23741, 1, user_data);
      if (D.23742 != 0) goto <D.23743>; else goto <D.23744>;
      <D.23743>:
      D.23722 = 1;
      return D.23722;
      <D.23744>:
    }
    <D.23736>:
  }
  i = i + 1;
  <D.22975>:
  if (i < len) goto <D.22974>; else goto <D.22976>;
  <D.22976>:
  D.23745 = len > 0;
  D.23722 = (gboolean) D.23745;
  return D.23722;
}


get_method_from_stack_frame (struct MonoJitInfo * ji, void * generic_info)
{
  long unsigned int D.23749;
  long unsigned int D.23750;
  struct MonoGenericJitInfo * D.23752;
  long unsigned int D.23753;
  long unsigned int D.23754;
  struct MonoMethod * D.23755;
  struct MonoGenericContext context;
  struct MonoMethod * method;

  try
    {
      D.23749 = BIT_FIELD_REF <*ji, 64, 256>;
      D.23750 = D.23749 & 70368744177664;
      if (D.23750 == 0) goto <D.23747>; else goto <D.23751>;
      <D.23751>:
      D.23752 = mono_jit_info_get_generic_jit_info (ji);
      D.23753 = BIT_FIELD_REF <*D.23752, 64, 192>;
      D.23754 = D.23753 & 8388608;
      if (D.23754 == 0) goto <D.23747>; else goto <D.23748>;
      <D.23747>:
      D.23755 = jinfo_get_method (ji);
      return D.23755;
      <D.23748>:
      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.23755 = method;
      return D.23755;
    }
  finally
    {
      context = {CLOBBER};
    }
}


get_generic_context_from_stack_frame (struct MonoJitInfo * ji, void * generic_info)
{
  _Bool D.23759;
  long int D.23760;
  long int D.23761;
  long unsigned int D.23764;
  long unsigned int D.23765;
  _Bool D.23766;
  long int D.23767;
  long int D.23768;
  struct MonoGenericContext * D.23771;
  struct MonoGenericInst * D.23772;
  struct MonoVTable * D.23775;
  struct MonoGenericInst * D.23776;
  struct MonoGenericInst * D.23777;
  _Bool D.23778;
  long int D.23779;
  long int D.23780;
  short unsigned int D.23787;
  int D.23788;
  int D.23789;
  struct MonoClass * D.23791;
  long unsigned int D.23792;
  long unsigned int D.23793;
  struct MonoGenericClass * D.23794;
  _Bool D.23798;
  long int D.23799;
  long int D.23800;
  struct MonoGenericClass * D.23804;
  struct MonoClass * D.23806;
  struct MonoGenericContainer * D.23810;
  struct MonoGenericContext * D.23811;
  struct MonoGenericInst * D.23812;
  int D.23815;
  _Bool D.23816;
  long int D.23817;
  long int D.23818;
  int D.23822;
  _Bool D.23823;
  long int D.23824;
  long int D.23825;
  struct MonoGenericContext context;
  struct MonoClass * class;
  struct MonoClass * method_container_class;
  struct MonoMethod * method;

  try
    {
      context.class_inst = 0B;
      context.method_inst = 0B;
      D.23759 = generic_info == 0B;
      D.23760 = (long int) D.23759;
      D.23761 = __builtin_expect (D.23760, 0);
      if (D.23761 != 0) goto <D.23762>; else goto <D.23763>;
      <D.23762>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 489, "generic_info");
      <D.23763>:
      method = jinfo_get_method (ji);
      D.23764 = BIT_FIELD_REF <*method, 64, 256>;
      D.23765 = D.23764 & 2251799813685248;
      D.23766 = D.23765 == 0;
      D.23767 = (long int) D.23766;
      D.23768 = __builtin_expect (D.23767, 0);
      if (D.23768 != 0) goto <D.23769>; else goto <D.23770>;
      <D.23769>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 492, "method->is_inflated");
      <D.23770>:
      D.23771 = mono_method_get_context (method);
      D.23772 = D.23771->method_inst;
      if (D.23772 != 0B) goto <D.23773>; else goto <D.23774>;
      <D.23773>:
      {
        struct MonoMethodRuntimeGenericContext * mrgctx;

        mrgctx = generic_info;
        D.23775 = mrgctx->class_vtable;
        class = D.23775->klass;
        D.23776 = mrgctx->method_inst;
        context.method_inst = D.23776;
        D.23777 = context.method_inst;
        D.23778 = D.23777 == 0B;
        D.23779 = (long int) D.23778;
        D.23780 = __builtin_expect (D.23779, 0);
        if (D.23780 != 0) goto <D.23781>; else goto <D.23782>;
        <D.23781>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 498, "context.method_inst");
        <D.23782>:
      }
      goto <D.23783>;
      <D.23774>:
      D.23787 = method->flags;
      D.23788 = (int) D.23787;
      D.23789 = D.23788 & 16;
      if (D.23789 != 0) goto <D.23784>; else goto <D.23790>;
      <D.23790>:
      D.23791 = method->klass;
      D.23792 = BIT_FIELD_REF <*D.23791, 64, 256>;
      D.23793 = D.23792 & 1152921504606846976;
      if (D.23793 != 0) goto <D.23784>; else goto <D.23785>;
      <D.23784>:
      {
        struct MonoVTable * vtable;

        vtable = generic_info;
        class = vtable->klass;
      }
      goto <D.23786>;
      <D.23785>:
      class = generic_info;
      <D.23786>:
      <D.23783>:
      D.23791 = method->klass;
      D.23794 = D.23791->generic_class;
      if (D.23794 != 0B) goto <D.23795>; else goto <D.23796>;
      <D.23795>:
      D.23791 = method->klass;
      D.23794 = D.23791->generic_class;
      method_container_class = D.23794->container_class;
      goto <D.23797>;
      <D.23796>:
      method_container_class = method->klass;
      <D.23797>:
      goto <D.22953>;
      <D.22952>:
      class = class->parent;
      D.23798 = class == 0B;
      D.23799 = (long int) D.23798;
      D.23800 = __builtin_expect (D.23799, 0);
      if (D.23800 != 0) goto <D.23801>; else goto <D.23802>;
      <D.23801>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 516, "class");
      <D.23802>:
      <D.22953>:
      D.23791 = method->klass;
      if (D.23791 != class) goto <D.23803>; else goto <D.22954>;
      <D.23803>:
      D.23804 = class->generic_class;
      if (D.23804 == 0B) goto <D.22952>; else goto <D.23805>;
      <D.23805>:
      D.23804 = class->generic_class;
      D.23806 = D.23804->container_class;
      if (D.23806 != method_container_class) goto <D.22952>; else goto <D.22954>;
      <D.22954>:
      D.23804 = class->generic_class;
      if (D.23804 != 0B) goto <D.23807>; else goto <D.23809>;
      <D.23809>:
      D.23810 = class->generic_container;
      if (D.23810 != 0B) goto <D.23807>; else goto <D.23808>;
      <D.23807>:
      D.23811 = mini_class_get_context (class);
      D.23812 = D.23811->class_inst;
      context.class_inst = D.23812;
      <D.23808>:
      D.23804 = class->generic_class;
      if (D.23804 != 0B) goto <D.23813>; else goto <D.23814>;
      <D.23813>:
      D.23804 = class->generic_class;
      D.23806 = D.23804->container_class;
      D.23815 = mono_class_has_parent_and_ignore_generics (D.23806, method_container_class);
      D.23816 = D.23815 == 0;
      D.23817 = (long int) D.23816;
      D.23818 = __builtin_expect (D.23817, 0);
      if (D.23818 != 0) goto <D.23819>; else goto <D.23820>;
      <D.23819>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 523, "mono_class_has_parent_and_ignore_generics (class->generic_class->container_class, method_container_class)");
      <D.23820>:
      goto <D.23821>;
      <D.23814>:
      D.23822 = mono_class_has_parent_and_ignore_generics (class, method_container_class);
      D.23823 = D.23822 == 0;
      D.23824 = (long int) D.23823;
      D.23825 = __builtin_expect (D.23824, 0);
      if (D.23825 != 0) goto <D.23826>; else goto <D.23827>;
      <D.23826>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 525, "mono_class_has_parent_and_ignore_generics (class, method_container_class)");
      <D.23827>:
      <D.23821>:
      <retval> = context;
      return <retval>;
    }
  finally
    {
      context = {CLOBBER};
    }
}


__attribute__((visibility ("hidden")))
ves_icall_System_Exception_get_trace (struct MonoException * ex)
{
  struct MonoString * D.23832;
  long unsigned int D.23833;
  long unsigned int D.23834;
  int D.23835;
  long unsigned int D.23836;
  char * D.23837;
  int D.23838;
  long unsigned int D.23839;
  char * D.23840;
  long int ip.18;
  void * D.23845;
  long int D.23846;
  long int D.23847;
  unsigned int address.19;
  struct MonoVTable * D.23849;
  struct MonoDomain * D.23850;
  char * D.23851;
  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.23830>; else goto <D.23831>;
  <D.23830>:
  D.23832 = 0B;
  return D.23832;
  <D.23831>:
  D.23833 = mono_array_length (ta);
  D.23834 = D.23833 >> 1;
  len = (int) D.23834;
  trace_str = monoeg_g_string_new ("");
  i = 0;
  goto <D.22993>;
  <D.22992>:
  {
    struct MonoJitInfo * ji;
    void * ip;
    void * generic_info;

    D.23835 = i * 2;
    D.23836 = (long unsigned int) D.23835;
    D.23837 = mono_array_addr_with_size (ta, 8, D.23836);
    ip = MEM[(void * *)D.23837];
    D.23835 = i * 2;
    D.23838 = D.23835 + 1;
    D.23839 = (long unsigned int) D.23838;
    D.23840 = mono_array_addr_with_size (ta, 8, D.23839);
    generic_info = MEM[(void * *)D.23840];
    ji = mono_jit_info_table_find (domain, ip);
    if (ji == 0B) goto <D.23841>; else goto <D.23842>;
    <D.23841>:
    monoeg_g_string_append_printf (trace_str, "in (unmanaged) %p\n", ip);
    goto <D.23843>;
    <D.23842>:
    {
      gchar * location;
      gint32 address;
      struct MonoMethod * method;

      method = get_method_from_stack_frame (ji, generic_info);
      ip.18 = (long int) ip;
      D.23845 = ji->code_start;
      D.23846 = (long int) D.23845;
      D.23847 = ip.18 - D.23846;
      address = (gint32) D.23847;
      address.19 = (unsigned int) address;
      D.23849 = ex->object.vtable;
      D.23850 = D.23849->domain;
      location = mono_debug_print_stack_frame (method, address.19, D.23850);
      monoeg_g_string_append_printf (trace_str, "%s\n", location);
      monoeg_g_free (location);
    }
    <D.23843>:
  }
  i = i + 1;
  <D.22993>:
  if (i < len) goto <D.22992>; else goto <D.22994>;
  <D.22994>:
  D.23849 = ex->object.vtable;
  D.23850 = D.23849->domain;
  D.23851 = trace_str->str;
  res = mono_string_new (D.23850, D.23851);
  monoeg_g_string_free (trace_str, 1);
  D.23832 = res;
  return D.23832;
}


__attribute__((visibility ("hidden")))
ves_icall_get_trace (struct MonoException * exc, gint32 skip, MonoBoolean need_file_info)
{
  struct MonoArray * D.23855;
  struct MonoClass * D.23856;
  long unsigned int D.23857;
  long unsigned int D.23858;
  uintptr_t iftmp.20;
  int D.23862;
  int D.23864;
  long unsigned int D.23865;
  char * D.23866;
  int D.23867;
  long unsigned int D.23868;
  char * D.23869;
  long unsigned int D.23872;
  _Bool D.23873;
  long int D.23874;
  long int D.23875;
  struct MonoMethod * D.23878;
  long unsigned int D.23879;
  long unsigned int D.23880;
  struct MonoString * * D.23883;
  struct MonoString * D.23884;
  struct MonoReflectionMethod * * D.23886;
  struct MonoReflectionMethod * D.23887;
  long int ip.21;
  void * D.23889;
  long int D.23890;
  long int D.23891;
  int D.23892;
  struct MonoMethod * D.23893;
  int D.23894;
  unsigned int D.23895;
  unsigned int D.23898;
  int D.23899;
  char * D.23906;
  struct MonoString * * D.23908;
  struct MonoString * D.23909;
  unsigned int D.23910;
  int D.23911;
  unsigned int D.23912;
  int D.23913;
  int D.23914;
  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.23853>; else goto <D.23854>;
  <D.23853>:
  D.23856 = mono_defaults.stack_frame_class;
  D.23855 = mono_array_new (domain, D.23856, 0);
  return D.23855;
  <D.23854>:
  D.23857 = mono_array_length (ta);
  D.23858 = D.23857 >> 1;
  len = (int) D.23858;
  D.23856 = mono_defaults.stack_frame_class;
  if (len > skip) goto <D.23860>; else goto <D.23861>;
  <D.23860>:
  D.23862 = len - skip;
  iftmp.20 = (uintptr_t) D.23862;
  goto <D.23863>;
  <D.23861>:
  iftmp.20 = 0;
  <D.23863>:
  res = mono_array_new (domain, D.23856, iftmp.20);
  i = skip;
  goto <D.23016>;
  <D.23015>:
  {
    struct MonoJitInfo * ji;
    struct MonoStackFrame * sf;
    void * ip;
    void * generic_info;
    struct MonoMethod * method;

    D.23856 = mono_defaults.stack_frame_class;
    sf = mono_object_new (domain, D.23856);
    D.23864 = i * 2;
    D.23865 = (long unsigned int) D.23864;
    D.23866 = mono_array_addr_with_size (ta, 8, D.23865);
    ip = MEM[(void * *)D.23866];
    D.23864 = i * 2;
    D.23867 = D.23864 + 1;
    D.23868 = (long unsigned int) D.23867;
    D.23869 = mono_array_addr_with_size (ta, 8, D.23868);
    generic_info = MEM[(void * *)D.23869];
    ji = mono_jit_info_table_find (domain, ip);
    if (ji == 0B) goto <D.23870>; else goto <D.23871>;
    <D.23870>:
    {
      void * * __p;

      D.23872 = (long unsigned int) i;
      __p = mono_array_addr_with_size (res, 8, D.23872);
      mono_gc_wbarrier_set_arrayref (res, __p, sf);
    }
    // predicted unlikely by continue predictor.
    goto <D.23012>;
    <D.23871>:
    D.23873 = ji == 0B;
    D.23874 = (long int) D.23873;
    D.23875 = __builtin_expect (D.23874, 0);
    if (D.23875 != 0) goto <D.23876>; else goto <D.23877>;
    <D.23876>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 664, "ji != NULL");
    <D.23877>:
    method = get_method_from_stack_frame (ji, generic_info);
    D.23878 = jinfo_get_method (ji);
    D.23879 = BIT_FIELD_REF <*D.23878, 64, 256>;
    D.23880 = D.23879 & 4467570830351532032;
    if (D.23880 != 0) goto <D.23881>; else goto <D.23882>;
    <D.23881>:
    {
      char * s;

      sf->method = 0B;
      s = mono_method_full_name (method, 1);
      D.23883 = &sf->internal_method_name;
      D.23884 = mono_string_new (domain, s);
      mono_gc_wbarrier_set_field (sf, D.23883, D.23884);
      monoeg_g_free (s);
    }
    goto <D.23885>;
    <D.23882>:
    D.23886 = &sf->method;
    D.23887 = mono_method_get_object (domain, method, 0B);
    mono_gc_wbarrier_set_field (sf, D.23886, D.23887);
    <D.23885>:
    ip.21 = (long int) ip;
    D.23889 = ji->code_start;
    D.23890 = (long int) D.23889;
    D.23891 = ip.21 - D.23890;
    D.23892 = (int) D.23891;
    sf->native_offset = D.23892;
    D.23893 = jinfo_get_method (ji);
    D.23894 = sf->native_offset;
    D.23895 = (unsigned int) D.23894;
    location = mono_debug_lookup_source_location (D.23893, D.23895, domain);
    if (location != 0B) goto <D.23896>; else goto <D.23897>;
    <D.23896>:
    D.23898 = location->il_offset;
    D.23899 = (int) D.23898;
    sf->il_offset = D.23899;
    goto <D.23900>;
    <D.23897>:
    sf->il_offset = 0;
    <D.23900>:
    if (need_file_info != 0) goto <D.23901>; else goto <D.23902>;
    <D.23901>:
    if (location != 0B) goto <D.23905>; else goto <D.23903>;
    <D.23905>:
    D.23906 = location->source_file;
    if (D.23906 != 0B) goto <D.23907>; else goto <D.23903>;
    <D.23907>:
    D.23908 = &sf->filename;
    D.23906 = location->source_file;
    D.23909 = mono_string_new (domain, D.23906);
    mono_gc_wbarrier_set_field (sf, D.23908, D.23909);
    D.23910 = location->row;
    D.23911 = (int) D.23910;
    sf->line = D.23911;
    D.23912 = location->column;
    D.23913 = (int) D.23912;
    sf->column = D.23913;
    goto <D.23904>;
    <D.23903>:
    sf->column = 0;
    D.23914 = sf->column;
    sf->line = D.23914;
    sf->filename = 0B;
    <D.23904>:
    <D.23902>:
    mono_debug_free_source_location (location);
    {
      void * * __p;

      D.23872 = (long unsigned int) i;
      __p = mono_array_addr_with_size (res, 8, D.23872);
      mono_gc_wbarrier_set_arrayref (res, __p, sf);
    }
  }
  <D.23012>:
  i = i + 1;
  <D.23016>:
  if (i < len) goto <D.23015>; else goto <D.23017>;
  <D.23017>:
  D.23855 = res;
  return D.23855;
}


__attribute__((visibility ("hidden")))
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.23919;
  void * D.23922;
  long unsigned int D.23923;
  long unsigned int mono_walk_stack_with_ctx.22;
  struct MonoDomain * D.23925;
  struct MonoLMF * D.23926;
  struct MonoContext extra_ctx;
  struct MonoInternalThread * thread;

  try
    {
      thread = mono_thread_internal_current ();
      if (thread == 0B) goto <D.23916>; else goto <D.23918>;
      <D.23918>:
      D.23919 = thread->jit_data;
      if (D.23919 == 0B) goto <D.23916>; else goto <D.23917>;
      <D.23916>:
      return;
      <D.23917>:
      if (start_ctx == 0B) goto <D.23920>; else goto <D.23921>;
      <D.23920>:
      mono_arch_flush_register_windows ();
      {
        struct MonoS390StackFrame * sframe;

        __asm__ __volatile__("lgr   %0,15" : "=r" sframe);
        D.23922 = sframe->prev;
        D.23923 = (long unsigned int) D.23922;
        extra_ctx.uc_mcontext.gregs[15] = D.23923;
        D.23922 = sframe->prev;
        extra_ctx.uc_stack.ss_sp = D.23922;
        D.23922 = sframe->prev;
        D.23923 = (long unsigned int) D.23922;
        extra_ctx.uc_mcontext.gregs[15] = D.23923;
        D.23922 = sframe->prev;
        extra_ctx.uc_stack.ss_sp = D.23922;
        mono_walk_stack_with_ctx.22 = (long unsigned int) mono_walk_stack_with_ctx;
        extra_ctx.uc_mcontext.gregs[14] = mono_walk_stack_with_ctx.22;
        mono_walk_stack_with_ctx.22 = (long unsigned int) mono_walk_stack_with_ctx;
        extra_ctx.uc_mcontext.psw.addr = mono_walk_stack_with_ctx.22;
      }
      start_ctx = &extra_ctx;
      <D.23921>:
      D.23925 = mono_domain_get ();
      D.23919 = thread->jit_data;
      D.23926 = mono_get_lmf ();
      mono_walk_stack_full (func, start_ctx, D.23925, D.23919, D.23926, 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.23;
  _Bool D.23931;
  long int D.23932;
  long int D.23933;
  _Bool D.23936;
  long int D.23937;
  long int D.23938;
  _Bool D.23941;
  long int D.23942;
  long int D.23943;
  _Bool D.23948;
  long int D.23949;
  long int D.23950;
  struct MonoLMF * lmf.24;
  mgreg_t * * iftmp.25;
  unsigned int D.23962;
  struct MonoJitInfo * D.23964;
  struct MonoMethod * D.23966;
  int D.23967;
  unsigned int D.23968;
  gint iftmp.26;
  unsigned int D.23972;
  unsigned int D.23976;
  void * D.23979;
  struct MonoMethod * D.23980;
  struct MonoMethod * D.23981;
  int D.23984;
  mgreg_t * D.23989;
  long unsigned int D.23992;
  void * D.23993;
  void * D.23994;
  gint il_offset;
  gint i;
  struct MonoContext ctx;
  struct MonoContext new_ctx;
  struct StackFrameInfo frame;
  gboolean res;
  mgreg_t * reg_locations[16];
  mgreg_t * new_reg_locations[16];
  gboolean get_reg_locations;
  gboolean async;

  try
    {
      unwind_options.23 = (int) unwind_options;
      get_reg_locations = unwind_options.23 & 4;
      async = mono_thread_info_is_async_context ();
      D.23931 = start_ctx == 0B;
      D.23932 = (long int) D.23931;
      D.23933 = __builtin_expect (D.23932, 0);
      if (D.23933 != 0) goto <D.23934>; else goto <D.23935>;
      <D.23934>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 817, "start_ctx");
      <D.23935>:
      D.23936 = domain == 0B;
      D.23937 = (long int) D.23936;
      D.23938 = __builtin_expect (D.23937, 0);
      if (D.23938 != 0) goto <D.23939>; else goto <D.23940>;
      <D.23939>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 818, "domain");
      <D.23940>:
      D.23941 = jit_tls == 0B;
      D.23942 = (long int) D.23941;
      D.23943 = __builtin_expect (D.23942, 0);
      if (D.23943 != 0) goto <D.23944>; else goto <D.23945>;
      <D.23944>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 819, "jit_tls");
      <D.23945>:
      if (async != 0) goto <D.23946>; else goto <D.23947>;
      <D.23946>:
      D.23948 = unwind_options != 0;
      D.23949 = (long int) D.23948;
      D.23950 = __builtin_expect (D.23949, 0);
      if (D.23950 != 0) goto <D.23951>; else goto <D.23952>;
      <D.23951>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 824, "unwind_options == MONO_UNWIND_NONE");
      <D.23952>:
      <D.23947>:
      memcpy (&ctx, start_ctx, 512);
      memset (&reg_locations, 0, 128);
      goto <D.23071>;
      <D.23070>:
      lmf.24 = lmf;
      frame.lmf = lmf.24;
      if (get_reg_locations != 0) goto <D.23955>; else goto <D.23956>;
      <D.23955>:
      iftmp.25 = &new_reg_locations;
      goto <D.23957>;
      <D.23956>:
      iftmp.25 = 0B;
      <D.23957>:
      res = mono_find_jit_info_ext (domain, jit_tls, 0B, &ctx, &new_ctx, 0B, &lmf, iftmp.25, &frame);
      if (res == 0) goto <D.23958>; else goto <D.23959>;
      <D.23958>:
      return;
      <D.23959>:
      D.23962 = unwind_options & 1;
      if (D.23962 != 0) goto <D.23963>; else goto <D.23960>;
      <D.23963>:
      D.23964 = frame.ji;
      if (D.23964 != 0B) goto <D.23965>; else goto <D.23960>;
      <D.23965>:
      {
        struct MonoDebugSourceLocation * source;

        D.23964 = frame.ji;
        D.23966 = jinfo_get_method (D.23964);
        D.23967 = frame.native_offset;
        D.23968 = (unsigned int) D.23967;
        source = mono_debug_lookup_source_location (D.23966, D.23968, domain);
        if (source != 0B) goto <D.23970>; else goto <D.23971>;
        <D.23970>:
        D.23972 = source->il_offset;
        iftmp.26 = (gint) D.23972;
        goto <D.23973>;
        <D.23971>:
        iftmp.26 = -1;
        <D.23973>:
        il_offset = iftmp.26;
        mono_debug_free_source_location (source);
      }
      goto <D.23961>;
      <D.23960>:
      il_offset = -1;
      <D.23961>:
      frame.il_offset = il_offset;
      D.23976 = unwind_options & 2;
      if (D.23976 != 0) goto <D.23977>; else goto <D.23974>;
      <D.23977>:
      D.23964 = frame.ji;
      if (D.23964 != 0B) goto <D.23978>; else goto <D.23974>;
      <D.23978>:
      D.23964 = frame.ji;
      D.23964 = frame.ji;
      D.23979 = get_generic_info_from_stack_frame (D.23964, &ctx);
      D.23980 = get_method_from_stack_frame (D.23964, D.23979);
      frame.actual_method = D.23980;
      goto <D.23975>;
      <D.23974>:
      D.23981 = frame.method;
      frame.actual_method = D.23981;
      <D.23975>:
      if (get_reg_locations != 0) goto <D.23982>; else goto <D.23983>;
      <D.23982>:
      frame.reg_locations = &reg_locations;
      <D.23983>:
      D.23984 = func (&frame, &ctx, user_data);
      if (D.23984 != 0) goto <D.23985>; else goto <D.23986>;
      <D.23985>:
      return;
      <D.23986>:
      if (get_reg_locations != 0) goto <D.23987>; else goto <D.23988>;
      <D.23987>:
      i = 0;
      goto <D.23068>;
      <D.23067>:
      D.23989 = new_reg_locations[i];
      if (D.23989 != 0B) goto <D.23990>; else goto <D.23991>;
      <D.23990>:
      D.23989 = new_reg_locations[i];
      reg_locations[i] = D.23989;
      <D.23991>:
      i = i + 1;
      <D.23068>:
      if (i <= 15) goto <D.23067>; else goto <D.23069>;
      <D.23069>:
      <D.23988>:
      ctx = new_ctx;
      <D.23071>:
      D.23992 = ctx.uc_mcontext.gregs[15];
      D.23993 = (void *) D.23992;
      D.23994 = jit_tls->end_of_stack;
      if (D.23993 < D.23994) goto <D.23070>; else goto <D.23072>;
      <D.23072>:
    }
  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.23998;
  long unsigned int D.23999;
  void * D.24002;
  long unsigned int D.24003;
  long unsigned int D.24004;
  int D.24007;
  long unsigned int D.24010;
  unsigned int D.24011;
  void * D.24012;
  long int D.24013;
  unsigned int D.24014;
  unsigned int D.24015;
  struct MonoDwarfLocListEntry * D.24016;
  long unsigned int D.24017;
  long unsigned int D.24018;
  int D.24021;
  int D.24024;
  int D.24026;
  int D.24029;
  long int D.24030;
  int D.24032;
  sizetype D.24033;
  long int D.24034;
  sizetype D.24035;
  sizetype D.24036;
  void * * D.24037;
  _Bool D.24038;
  long int D.24039;
  long int D.24040;
  long unsigned int D.24044;
  unsigned char D.24047;
  int D.24048;
  long int D.24049;
  int D.24051;
  sizetype D.24052;
  long int D.24053;
  sizetype D.24054;
  sizetype D.24055;
  void * * D.24056;
  struct MonoGenericContext * D.24057;
  struct MonoGenericInst * D.24058;
  short unsigned int D.24063;
  int D.24064;
  int D.24065;
  struct MonoClass * D.24067;
  long unsigned int D.24068;
  long unsigned int D.24069;
  struct MonoVTable * D.24070;
  struct MonoGenericJitInfo * gi;
  struct MonoMethod * method;
  void * info;

  D.23998 = BIT_FIELD_REF <*ji, 64, 256>;
  D.23999 = D.23998 & 70368744177664;
  if (D.23999 == 0) goto <D.24000>; else goto <D.24001>;
  <D.24000>:
  D.24002 = 0B;
  return D.24002;
  <D.24001>:
  gi = mono_jit_info_get_generic_jit_info (ji);
  D.24003 = BIT_FIELD_REF <*gi, 64, 192>;
  D.24004 = D.24003 & 8388608;
  if (D.24004 == 0) goto <D.24005>; else goto <D.24006>;
  <D.24005>:
  D.24002 = 0B;
  return D.24002;
  <D.24006>:
  info = 0B;
  D.24007 = gi->nlocs;
  if (D.24007 != 0) goto <D.24008>; else goto <D.24009>;
  <D.24008>:
  {
    int offset;
    int i;

    D.24010 = ctx->uc_mcontext.psw.addr;
    D.24011 = (unsigned int) D.24010;
    D.24012 = ji->code_start;
    D.24013 = (long int) D.24012;
    D.24014 = (unsigned int) D.24013;
    D.24015 = D.24011 - D.24014;
    offset = (int) D.24015;
    i = 0;
    goto <D.22940>;
    <D.22939>:
    {
      struct MonoDwarfLocListEntry * entry;

      D.24016 = gi->locations;
      D.24017 = (long unsigned int) i;
      D.24018 = D.24017 * 20;
      entry = D.24016 + D.24018;
      D.24021 = entry->from;
      if (D.24021 <= offset) goto <D.24022>; else goto <D.24023>;
      <D.24022>:
      D.24024 = entry->to;
      if (D.24024 > offset) goto <D.24019>; else goto <D.24025>;
      <D.24025>:
      D.24024 = entry->to;
      if (D.24024 == 0) goto <D.24019>; else goto <D.24020>;
      <D.24019>:
      D.24026 = entry->is_reg;
      if (D.24026 != 0) goto <D.24027>; else goto <D.24028>;
      <D.24027>:
      D.24029 = entry->reg;
      D.24030 = mono_arch_context_get_int_reg (ctx, D.24029);
      info = (void *) D.24030;
      goto <D.24031>;
      <D.24028>:
      D.24032 = entry->offset;
      D.24033 = (sizetype) D.24032;
      D.24029 = entry->reg;
      D.24034 = mono_arch_context_get_int_reg (ctx, D.24029);
      D.24035 = (sizetype) D.24034;
      D.24036 = D.24033 + D.24035;
      D.24037 = (void * *) D.24036;
      info = *D.24037;
      <D.24031>:
      goto <D.22938>;
      <D.24020>:
      <D.24023>:
    }
    i = i + 1;
    <D.22940>:
    D.24007 = gi->nlocs;
    if (D.24007 > i) goto <D.22939>; else goto <D.22938>;
    <D.22938>:
    D.24007 = gi->nlocs;
    D.24038 = D.24007 <= i;
    D.24039 = (long int) D.24038;
    D.24040 = __builtin_expect (D.24039, 0);
    if (D.24040 != 0) goto <D.24041>; else goto <D.24042>;
    <D.24041>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 460, "i < gi->nlocs");
    <D.24042>:
  }
  goto <D.24043>;
  <D.24009>:
  D.24003 = BIT_FIELD_REF <*gi, 64, 192>;
  D.24044 = D.24003 & 4194304;
  if (D.24044 != 0) goto <D.24045>; else goto <D.24046>;
  <D.24045>:
  D.24047 = gi->this_reg;
  D.24048 = (int) D.24047;
  D.24049 = mono_arch_context_get_int_reg (ctx, D.24048);
  info = (void *) D.24049;
  goto <D.24050>;
  <D.24046>:
  D.24051 = gi->this_offset;
  D.24052 = (sizetype) D.24051;
  D.24047 = gi->this_reg;
  D.24048 = (int) D.24047;
  D.24053 = mono_arch_context_get_int_reg (ctx, D.24048);
  D.24054 = (sizetype) D.24053;
  D.24055 = D.24052 + D.24054;
  D.24056 = (void * *) D.24055;
  info = *D.24056;
  <D.24050>:
  <D.24043>:
  method = jinfo_get_method (ji);
  D.24057 = mono_method_get_context (method);
  D.24058 = D.24057->method_inst;
  if (D.24058 != 0B) goto <D.24059>; else goto <D.24060>;
  <D.24059>:
  D.24002 = info;
  return D.24002;
  <D.24060>:
  D.24063 = method->flags;
  D.24064 = (int) D.24063;
  D.24065 = D.24064 & 16;
  if (D.24065 != 0) goto <D.24061>; else goto <D.24066>;
  <D.24066>:
  D.24067 = method->klass;
  D.24068 = BIT_FIELD_REF <*D.24067, 64, 256>;
  D.24069 = D.24068 & 1152921504606846976;
  if (D.24069 != 0) goto <D.24061>; else goto <D.24062>;
  <D.24061>:
  D.24002 = info;
  return D.24002;
  <D.24062>:
  {
    struct MonoObject * this_obj;

    this_obj = info;
    D.24070 = this_obj->vtable;
    D.24002 = D.24070->klass;
    return D.24002;
  }
}


__attribute__((visibility ("hidden")))
mono_walk_stack_with_state (gboolean (*MonoJitStackWalk) (struct StackFrameInfo *, struct MonoContext *, void *) func, struct MonoThreadUnwindState * state, MonoUnwindOptions unwind_options, void * user_data)
{
  int D.24074;
  _Bool D.24075;
  long int D.24076;
  long int D.24077;
  int D.24080;
  int D.24083;
  _Bool D.24084;
  long int D.24085;
  long int D.24086;
  struct MonoContext * D.24089;
  void * D.24090;
  void * D.24091;
  void * D.24092;
  struct MonoThreadUnwindState extra_state;

  try
    {
      if (state == 0B) goto <D.24072>; else goto <D.24073>;
      <D.24072>:
      D.24074 = mono_thread_info_is_async_context ();
      D.24075 = D.24074 != 0;
      D.24076 = (long int) D.24075;
      D.24077 = __builtin_expect (D.24076, 0);
      if (D.24077 != 0) goto <D.24078>; else goto <D.24079>;
      <D.24078>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 765, "!mono_thread_info_is_async_context ()");
      <D.24079>:
      D.24080 = mono_thread_state_init_from_current (&extra_state);
      if (D.24080 == 0) goto <D.24081>; else goto <D.24082>;
      <D.24081>:
      return;
      <D.24082>:
      state = &extra_state;
      <D.24073>:
      D.24083 = state->valid;
      D.24084 = D.24083 == 0;
      D.24085 = (long int) D.24084;
      D.24086 = __builtin_expect (D.24085, 0);
      if (D.24086 != 0) goto <D.24087>; else goto <D.24088>;
      <D.24087>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 771, "state->valid");
      <D.24088>:
      D.24089 = &state->ctx;
      D.24090 = state->unwind_data[0];
      D.24091 = state->unwind_data[2];
      D.24092 = state->unwind_data[1];
      mono_walk_stack_full (func, D.24089, D.24090, D.24091, D.24092, unwind_options, user_data);
    }
  finally
    {
      extra_state = {CLOBBER};
    }
}


__attribute__((visibility ("hidden")))
mono_walk_stack (gboolean (*MonoJitStackWalk) (struct StackFrameInfo *, struct MonoContext *, void *) func, MonoUnwindOptions options, void * user_data)
{
  int D.24096;
  struct MonoThreadUnwindState state;

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


__attribute__((visibility ("hidden")))
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.27;
  struct MonoLMF * lmf.28;
  void * D.24104;
  long unsigned int D.24105;
  long unsigned int ves_icall_get_frame_info.29;
  MonoBoolean D.24109;
  <unnamed type> D.24110;
  unsigned int D.24111;
  int D.24114;
  long unsigned int D.24115;
  long unsigned int D.24116;
  void * D.24123;
  struct MonoReflectionMethod * D.24124;
  int D.24125;
  unsigned int D.24126;
  unsigned int D.24129;
  int D.24130;
  char * D.24136;
  struct MonoString * D.24137;
  unsigned int D.24138;
  int D.24139;
  unsigned int D.24140;
  int D.24141;
  int D.24143;
  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.27 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.27);
      lmf.28 = mono_get_lmf ();
      lmf = lmf.28;
      ji = 0B;
      jmethod = 0B;
      mono_arch_flush_register_windows ();
      {
        struct MonoS390StackFrame * sframe;

        __asm__ __volatile__("lgr   %0,15" : "=r" sframe);
        D.24104 = sframe->prev;
        D.24105 = (long unsigned int) D.24104;
        ctx.uc_mcontext.gregs[15] = D.24105;
        D.24104 = sframe->prev;
        ctx.uc_stack.ss_sp = D.24104;
        D.24104 = sframe->prev;
        D.24105 = (long unsigned int) D.24104;
        ctx.uc_mcontext.gregs[15] = D.24105;
        D.24104 = sframe->prev;
        ctx.uc_stack.ss_sp = D.24104;
        ves_icall_get_frame_info.29 = (long unsigned int) ves_icall_get_frame_info;
        ctx.uc_mcontext.gregs[14] = ves_icall_get_frame_info.29;
        ves_icall_get_frame_info.29 = (long unsigned int) ves_icall_get_frame_info;
        ctx.uc_mcontext.psw.addr = ves_icall_get_frame_info.29;
      }
      new_ctx = ctx;
      <D.23096>:
      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.24107>; else goto <D.24108>;
      <D.24107>:
      D.24109 = 0;
      return D.24109;
      <D.24108>:
      D.24110 = frame.type;
      D.24111 = D.24110 + 4294967295;
      if (D.24111 <= 1) goto <D.24112>; else goto <D.24113>;
      <D.24112>:
      // predicted unlikely by continue predictor.
      goto <D.23095>;
      <D.24113>:
      ji = frame.ji;
      D.24114 = frame.native_offset;
      *native_offset = D.24114;
      jmethod = jinfo_get_method (ji);
      D.24115 = BIT_FIELD_REF <*jmethod, 64, 256>;
      D.24116 = D.24115 & 4467570830351532032;
      if (D.24116 != 0) goto <D.24117>; else goto <D.24118>;
      <D.24117>:
      D.24115 = BIT_FIELD_REF <*jmethod, 64, 256>;
      D.24116 = D.24115 & 4467570830351532032;
      if (D.24116 != 2449958197289549824) goto <D.24119>; else goto <D.24120>;
      <D.24119>:
      D.24115 = BIT_FIELD_REF <*jmethod, 64, 256>;
      D.24116 = D.24115 & 4467570830351532032;
      if (D.24116 != 864691128455135232) goto <D.24121>; else goto <D.24122>;
      <D.24121>:
      // predicted unlikely by continue predictor.
      goto <D.23095>;
      <D.24122>:
      <D.24120>:
      <D.24118>:
      skip = skip + -1;
      <D.23095>:
      if (skip >= 0) goto <D.23096>; else goto <D.23097>;
      <D.23097>:
      D.24123 = get_generic_info_from_stack_frame (ji, &ctx);
      actual_method = get_method_from_stack_frame (ji, D.24123);
      D.24124 = mono_method_get_object (domain, actual_method, 0B);
      mono_gc_wbarrier_generic_store (method, D.24124);
      D.24125 = *native_offset;
      D.24126 = (unsigned int) D.24125;
      location = mono_debug_lookup_source_location (jmethod, D.24126, domain);
      if (location != 0B) goto <D.24127>; else goto <D.24128>;
      <D.24127>:
      D.24129 = location->il_offset;
      D.24130 = (int) D.24129;
      *iloffset = D.24130;
      goto <D.24131>;
      <D.24128>:
      *iloffset = 0;
      <D.24131>:
      if (need_file_info != 0) goto <D.24132>; else goto <D.24133>;
      <D.24132>:
      if (location != 0B) goto <D.24134>; else goto <D.24135>;
      <D.24134>:
      D.24136 = location->source_file;
      D.24137 = mono_string_new (domain, D.24136);
      mono_gc_wbarrier_generic_store (file, D.24137);
      D.24138 = location->row;
      D.24139 = (int) D.24138;
      *line = D.24139;
      D.24140 = location->column;
      D.24141 = (int) D.24140;
      *column = D.24141;
      goto <D.24142>;
      <D.24135>:
      *file = 0B;
      *column = 0;
      D.24143 = *column;
      *line = D.24143;
      <D.24142>:
      <D.24133>:
      mono_debug_free_source_location (location);
      D.24109 = 1;
      return D.24109;
    }
  finally
    {
      lmf = {CLOBBER};
      ctx = {CLOBBER};
      new_ctx = {CLOBBER};
      frame = {CLOBBER};
    }
}


__attribute__((visibility ("hidden")))
ves_icall_System_Security_SecurityFrame_GetSecurityFrame (gint32 skip)
{
  unsigned int skip.30;
  struct MonoSecurityFrame * D.24147;
  struct MonoSecurityFrame * iftmp.31;
  unsigned int D.24149;
  struct MonoFrameSecurityInfo si;

  try
    {
      skip.30 = (unsigned int) skip;
      si.skips = skip.30;
      si.frame = 0B;
      mono_walk_stack (callback_get_first_frame_security_info, 2, &si);
      D.24149 = si.skips;
      if (D.24149 == 0) goto <D.24150>; else goto <D.24151>;
      <D.24150>:
      iftmp.31 = si.frame;
      goto <D.24152>;
      <D.24151>:
      iftmp.31 = 0B;
      <D.24152>:
      D.24147 = iftmp.31;
      return D.24147;
    }
  finally
    {
      si = {CLOBBER};
    }
}


callback_get_first_frame_security_info (struct StackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  gboolean D.24157;
  long unsigned int D.24160;
  long unsigned int D.24161;
  unsigned int D.24166;
  unsigned int D.24169;
  struct MonoDomain * D.24170;
  struct MonoSecurityFrame * D.24171;
  struct MonoFrameSecurityInfo * si;
  struct MonoJitInfo * ji;
  struct MonoMethod * method;

  si = data;
  ji = frame->ji;
  if (ji == 0B) goto <D.24155>; else goto <D.24156>;
  <D.24155>:
  D.24157 = 0;
  return D.24157;
  <D.24156>:
  method = jinfo_get_method (ji);
  D.24160 = BIT_FIELD_REF <*method, 64, 256>;
  D.24161 = D.24160 & 4467570830351532032;
  if (D.24161 == 576460752303423488) goto <D.24158>; else goto <D.24162>;
  <D.24162>:
  D.24160 = BIT_FIELD_REF <*method, 64, 256>;
  D.24161 = D.24160 & 4467570830351532032;
  if (D.24161 == 1441151880758558720) goto <D.24158>; else goto <D.24163>;
  <D.24163>:
  D.24160 = BIT_FIELD_REF <*method, 64, 256>;
  D.24161 = D.24160 & 4467570830351532032;
  if (D.24161 == 1585267068834414592) goto <D.24158>; else goto <D.24164>;
  <D.24164>:
  D.24160 = BIT_FIELD_REF <*method, 64, 256>;
  D.24161 = D.24160 & 4467570830351532032;
  if (D.24161 == 1297036692682702848) goto <D.24158>; else goto <D.24165>;
  <D.24165>:
  D.24160 = BIT_FIELD_REF <*method, 64, 256>;
  D.24161 = D.24160 & 4467570830351532032;
  if (D.24161 == 1152921504606846976) goto <D.24158>; else goto <D.24159>;
  <D.24158>:
  D.24157 = 0;
  return D.24157;
  <D.24159>:
  D.24166 = si->skips;
  if (D.24166 != 0) goto <D.24167>; else goto <D.24168>;
  <D.24167>:
  D.24166 = si->skips;
  D.24169 = D.24166 + 4294967295;
  si->skips = D.24169;
  D.24157 = 0;
  return D.24157;
  <D.24168>:
  D.24170 = frame->domain;
  D.24171 = mono_declsec_create_frame (D.24170, ji);
  si->frame = D.24171;
  D.24157 = 1;
  return D.24157;
}


__attribute__((visibility ("hidden")))
ves_icall_System_Security_SecurityFrame_GetSecurityStack (gint32 skip)
{
  unsigned int skip.32;
  struct MonoDomain * D.24174;
  struct MonoClass * D.24175;
  unsigned int D.24176;
  long unsigned int D.24177;
  struct MonoArray * D.24178;
  struct MonoArray * D.24179;
  struct MonoSecurityStack ss;

  try
    {
      skip = skip + -1;
      skip.32 = (unsigned int) skip;
      ss.skips = skip.32;
      ss.count = 0;
      ss.maximum = 6;
      D.24174 = mono_domain_get ();
      D.24175 = mono_defaults.runtimesecurityframe_class;
      D.24176 = ss.maximum;
      D.24177 = (long unsigned int) D.24176;
      D.24178 = mono_array_new (D.24174, D.24175, D.24177);
      ss.stack = D.24178;
      mono_walk_stack (callback_get_stack_frames_security_info, 2, &ss);
      D.24179 = ss.stack;
      return D.24179;
    }
  finally
    {
      ss = {CLOBBER};
    }
}


callback_get_stack_frames_security_info (struct StackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  gboolean D.24184;
  long unsigned int D.24187;
  long unsigned int D.24188;
  unsigned int D.24193;
  unsigned int D.24196;
  unsigned int D.24197;
  unsigned int D.24198;
  struct MonoArray * D.24201;
  unsigned int D.24202;
  unsigned int D.24203;
  long unsigned int D.24204;
  struct MonoDomain * D.24205;
  struct MonoSecurityFrame * D.24206;
  struct MonoSecurityStack * ss;
  struct MonoJitInfo * ji;
  struct MonoMethod * method;

  ss = data;
  ji = frame->ji;
  if (ji == 0B) goto <D.24182>; else goto <D.24183>;
  <D.24182>:
  D.24184 = 0;
  return D.24184;
  <D.24183>:
  method = jinfo_get_method (ji);
  D.24187 = BIT_FIELD_REF <*method, 64, 256>;
  D.24188 = D.24187 & 4467570830351532032;
  if (D.24188 == 576460752303423488) goto <D.24185>; else goto <D.24189>;
  <D.24189>:
  D.24187 = BIT_FIELD_REF <*method, 64, 256>;
  D.24188 = D.24187 & 4467570830351532032;
  if (D.24188 == 1441151880758558720) goto <D.24185>; else goto <D.24190>;
  <D.24190>:
  D.24187 = BIT_FIELD_REF <*method, 64, 256>;
  D.24188 = D.24187 & 4467570830351532032;
  if (D.24188 == 1585267068834414592) goto <D.24185>; else goto <D.24191>;
  <D.24191>:
  D.24187 = BIT_FIELD_REF <*method, 64, 256>;
  D.24188 = D.24187 & 4467570830351532032;
  if (D.24188 == 1297036692682702848) goto <D.24185>; else goto <D.24192>;
  <D.24192>:
  D.24187 = BIT_FIELD_REF <*method, 64, 256>;
  D.24188 = D.24187 & 4467570830351532032;
  if (D.24188 == 1152921504606846976) goto <D.24185>; else goto <D.24186>;
  <D.24185>:
  D.24184 = 0;
  return D.24184;
  <D.24186>:
  D.24193 = ss->skips;
  if (D.24193 != 0) goto <D.24194>; else goto <D.24195>;
  <D.24194>:
  D.24193 = ss->skips;
  D.24196 = D.24193 + 4294967295;
  ss->skips = D.24196;
  D.24184 = 0;
  return D.24184;
  <D.24195>:
  D.24197 = ss->count;
  D.24198 = ss->maximum;
  if (D.24197 == D.24198) goto <D.24199>; else goto <D.24200>;
  <D.24199>:
  grow_array (ss);
  <D.24200>:
  {
    void * * __p;

    D.24201 = ss->stack;
    D.24197 = ss->count;
    D.24202 = D.24197;
    D.24203 = D.24202 + 1;
    ss->count = D.24203;
    D.24204 = (long unsigned int) D.24202;
    __p = mono_array_addr_with_size (D.24201, 8, D.24204);
    D.24201 = ss->stack;
    D.24205 = frame->domain;
    D.24206 = mono_declsec_create_frame (D.24205, ji);
    mono_gc_wbarrier_set_arrayref (D.24201, __p, D.24206);
  }
  D.24184 = 0;
  return D.24184;
}


grow_array (struct MonoSecurityStack * stack)
{
  unsigned int D.24208;
  struct MonoClass * D.24209;
  long unsigned int D.24210;
  struct MonoArray * D.24211;
  long unsigned int D.24212;
  char * D.24213;
  unsigned int i.33;
  struct MonoDomain * domain;
  guint32 newsize;
  struct MonoArray * newstack;
  int i;

  domain = mono_domain_get ();
  D.24208 = stack->maximum;
  newsize = D.24208 << 1;
  D.24209 = mono_defaults.runtimesecurityframe_class;
  D.24210 = (long unsigned int) newsize;
  newstack = mono_array_new (domain, D.24209, D.24210);
  i = 0;
  goto <D.23130>;
  <D.23129>:
  {
    void * frame;

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

      D.24212 = (long unsigned int) i;
      __p = mono_array_addr_with_size (newstack, 8, D.24212);
      mono_gc_wbarrier_set_arrayref (newstack, __p, frame);
    }
  }
  i = i + 1;
  <D.23130>:
  D.24208 = stack->maximum;
  i.33 = (unsigned int) i;
  if (D.24208 > i.33) goto <D.23129>; else goto <D.23131>;
  <D.23131>:
  stack->maximum = newsize;
  stack->stack = newstack;
}


__attribute__((visibility ("hidden")))
mini_jit_info_table_find (struct MonoDomain * domain, char * addr, struct MonoDomain * * out_domain)
{
  struct MonoJitInfo * D.24221;
  struct MonoDomain * D.24222;
  struct MonoDomain * D.24225;
  struct MonoDomain * D.24230;
  void * * iftmp.34;
  void * D.24234;
  void * D.24238;
  struct MonoDomain * D.24241;
  struct MonoJitInfo * ji;
  struct MonoInternalThread * t;
  void * * refs;

  t = mono_thread_internal_current ();
  if (out_domain != 0B) goto <D.24215>; else goto <D.24216>;
  <D.24215>:
  *out_domain = 0B;
  <D.24216>:
  ji = mono_jit_info_table_find (domain, addr);
  if (ji != 0B) goto <D.24217>; else goto <D.24218>;
  <D.24217>:
  if (out_domain != 0B) goto <D.24219>; else goto <D.24220>;
  <D.24219>:
  *out_domain = domain;
  <D.24220>:
  D.24221 = ji;
  return D.24221;
  <D.24218>:
  D.24222 = mono_get_root_domain ();
  if (D.24222 != domain) goto <D.24223>; else goto <D.24224>;
  <D.24223>:
  D.24225 = mono_get_root_domain ();
  ji = mono_jit_info_table_find (D.24225, addr);
  if (ji != 0B) goto <D.24226>; else goto <D.24227>;
  <D.24226>:
  if (out_domain != 0B) goto <D.24228>; else goto <D.24229>;
  <D.24228>:
  D.24230 = mono_get_root_domain ();
  *out_domain = D.24230;
  <D.24229>:
  D.24221 = ji;
  return D.24221;
  <D.24227>:
  <D.24224>:
  if (t == 0B) goto <D.24231>; else goto <D.24232>;
  <D.24231>:
  D.24221 = 0B;
  return D.24221;
  <D.24232>:
  D.24234 = t->appdomain_refs;
  if (D.24234 != 0B) goto <D.24235>; else goto <D.24236>;
  <D.24235>:
  D.24234 = t->appdomain_refs;
  iftmp.34 = MEM[(void * *)D.24234];
  goto <D.24237>;
  <D.24236>:
  iftmp.34 = 0B;
  <D.24237>:
  refs = iftmp.34;
  goto <D.23174>;
  <D.23173>:
  D.24238 = *refs;
  if (D.24238 != domain) goto <D.24239>; else goto <D.24240>;
  <D.24239>:
  D.24238 = *refs;
  D.24241 = mono_get_root_domain ();
  if (D.24238 != D.24241) goto <D.24242>; else goto <D.24243>;
  <D.24242>:
  D.24238 = *refs;
  ji = mono_jit_info_table_find (D.24238, addr);
  if (ji != 0B) goto <D.24244>; else goto <D.24245>;
  <D.24244>:
  if (out_domain != 0B) goto <D.24246>; else goto <D.24247>;
  <D.24246>:
  D.24238 = *refs;
  *out_domain = D.24238;
  <D.24247>:
  D.24221 = ji;
  return D.24221;
  <D.24245>:
  <D.24243>:
  <D.24240>:
  refs = refs + 8;
  <D.23174>:
  if (refs != 0B) goto <D.24248>; else goto <D.23175>;
  <D.24248>:
  D.24238 = *refs;
  if (D.24238 != 0B) goto <D.23173>; else goto <D.23175>;
  <D.23175>:
  D.24221 = 0B;
  return D.24221;
}


mono_debugger_run_finally (struct MonoContext * start_ctx)
{
  unsigned int mono_jit_tls_id.35;
  struct MonoLMF * lmf.36;
  struct MonoJitInfo * D.24252;
  int (*<T3e7a>) (struct MonoContext *, void *) call_filter.37;
  void * D.24258;
  int (*<T3e7a>) (struct MonoContext *, void *) call_filter.38;
  long unsigned int D.24260;
  void * D.24261;
  int D.24262;
  unsigned int D.24265;
  unsigned int D.24266;
  void * D.24269;
  <unnamed-unsigned:15> D.24270;
  int D.24271;
  static int (*<T3e7a>) (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.35 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.35);
      lmf.36 = mono_get_lmf ();
      lmf = lmf.36;
      ctx = *start_ctx;
      ji = mono_find_jit_info (domain, jit_tls, &rji, 0B, &ctx, &new_ctx, 0B, &lmf, 0B, 0B);
      D.24252 = ji + 18446744073709551615;
      if (D.24252 > -3B) goto <D.24253>; else goto <D.24254>;
      <D.24253>:
      return;
      <D.24254>:
      call_filter.37 = call_filter;
      if (call_filter.37 == 0B) goto <D.24256>; else goto <D.24257>;
      <D.24256>:
      D.24258 = mono_get_call_filter ();
      call_filter.38 = (int (*<T3e7a>) (struct MonoContext *, void *)) D.24258;
      call_filter = call_filter.38;
      <D.24257>:
      i = 0;
      goto <D.23318>;
      <D.23317>:
      {
        struct MonoJitExceptionInfo * ei;

        ei = &ji->clauses[i];
        D.24260 = ctx.uc_mcontext.psw.addr;
        D.24261 = (void *) D.24260;
        D.24262 = is_address_protected (ji, ei, D.24261);
        if (D.24262 != 0) goto <D.24263>; else goto <D.24264>;
        <D.24263>:
        D.24265 = ei->flags;
        D.24266 = D.24265 & 2;
        if (D.24266 != 0) goto <D.24267>; else goto <D.24268>;
        <D.24267>:
        call_filter.37 = call_filter;
        D.24269 = ei->handler_start;
        call_filter.37 (&ctx, D.24269);
        <D.24268>:
        <D.24264>:
      }
      i = i + 1;
      <D.23318>:
      D.24270 = ji->num_clauses;
      D.24271 = (int) D.24270;
      if (D.24271 > i) goto <D.23317>; else goto <D.23319>;
      <D.23319>:
    }
  finally
    {
      lmf = {CLOBBER};
      ctx = {CLOBBER};
      new_ctx = {CLOBBER};
      rji = {CLOBBER};
    }
}


is_address_protected (struct MonoJitInfo * ji, struct MonoJitExceptionInfo * ei, void * ip)
{
  void * D.24277;
  void * D.24279;
  gboolean D.24280;
  long unsigned int D.24281;
  long unsigned int D.24282;
  long int ip.39;
  void * D.24286;
  long int D.24287;
  long int D.24288;
  long int ei.40;
  struct MonoJitExceptionInfo[0:] * D.24290;
  long int D.24291;
  long int D.24292;
  long int D.24293;
  int D.24294;
  <unnamed-unsigned:15> D.24295;
  int D.24296;
  _Bool D.24297;
  long int D.24298;
  long int D.24299;
  short unsigned int D.24302;
  unsigned int D.24305;
  short unsigned int D.24308;
  unsigned int D.24309;
  unsigned int D.24310;
  short unsigned int D.24313;
  int D.24314;
  struct MonoTryBlockHoleTableJitInfo * table;
  int i;
  guint32 offset;
  guint16 clause;

  D.24277 = ei->try_start;
  if (D.24277 > ip) goto <D.24275>; else goto <D.24278>;
  <D.24278>:
  D.24279 = ei->try_end;
  if (D.24279 <= ip) goto <D.24275>; else goto <D.24276>;
  <D.24275>:
  D.24280 = 0;
  return D.24280;
  <D.24276>:
  D.24281 = BIT_FIELD_REF <*ji, 64, 256>;
  D.24282 = D.24281 & 35184372088832;
  if (D.24282 == 0) goto <D.24283>; else goto <D.24284>;
  <D.24283>:
  D.24280 = 1;
  return D.24280;
  <D.24284>:
  table = mono_jit_info_get_try_block_hole_table_info (ji);
  ip.39 = (long int) ip;
  D.24286 = ji->code_start;
  D.24287 = (long int) D.24286;
  D.24288 = ip.39 - D.24287;
  offset = (guint32) D.24288;
  ei.40 = (long int) ei;
  D.24290 = &ji->clauses;
  D.24291 = (long int) D.24290;
  D.24292 = ei.40 - D.24291;
  D.24293 = D.24292 /[ex] 40;
  clause = (guint16) D.24293;
  D.24294 = (int) clause;
  D.24295 = ji->num_clauses;
  D.24296 = (int) D.24295;
  D.24297 = D.24294 >= D.24296;
  D.24298 = (long int) D.24297;
  D.24299 = __builtin_expect (D.24298, 0);
  if (D.24299 != 0) goto <D.24300>; else goto <D.24301>;
  <D.24300>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 183, "clause < ji->num_clauses");
  <D.24301>:
  i = 0;
  goto <D.22867>;
  <D.22866>:
  {
    struct MonoTryBlockHoleJitInfo * hole;

    hole = &table->holes[i];
    D.24302 = hole->clause;
    if (D.24302 == clause) goto <D.24303>; else goto <D.24304>;
    <D.24303>:
    D.24305 = hole->offset;
    if (D.24305 <= offset) goto <D.24306>; else goto <D.24307>;
    <D.24306>:
    D.24305 = hole->offset;
    D.24308 = hole->length;
    D.24309 = (unsigned int) D.24308;
    D.24310 = D.24305 + D.24309;
    if (D.24310 > offset) goto <D.24311>; else goto <D.24312>;
    <D.24311>:
    D.24280 = 0;
    return D.24280;
    <D.24312>:
    <D.24307>:
    <D.24304>:
  }
  i = i + 1;
  <D.22867>:
  D.24313 = table->num_holes;
  D.24314 = (int) D.24313;
  if (D.24314 > i) goto <D.22866>; else goto <D.22868>;
  <D.22868>:
  D.24280 = 1;
  return D.24280;
}


__attribute__((visibility ("hidden")))
mono_handle_exception (struct MonoContext * ctx, void * obj)
{
  struct MonoPerfCounters * mono_perfcounters.41;
  unsigned int D.24317;
  unsigned int D.24318;
  gboolean D.24319;

  mono_perfcounters.41 = mono_perfcounters;
  D.24317 = mono_perfcounters.41->exceptions_thrown;
  D.24318 = D.24317 + 1;
  mono_perfcounters.41->exceptions_thrown = D.24318;
  D.24319 = mono_handle_exception_internal (ctx, obj, 0, 0B);
  return D.24319;
}


mono_handle_exception_internal (struct MonoContext * ctx, void * obj, gboolean resume, struct MonoJitInfo * * out_ji)
{
  unsigned int mono_jit_tls_id.42;
  struct MonoLMF * lmf.43;
  _Bool D.24323;
  long int D.24324;
  long int D.24325;
  struct MonoString * * D.24330;
  struct MonoString * D.24331;
  struct MonoException * D.24332;
  struct MonoException * D.24336;
  struct MonoClass * D.24339;
  struct MonoObject * D.24340;
  struct MonoObject * D.24343;
  struct MonoClass * D.24349;
  struct MonoVTable * D.24352;
  struct MonoClass * D.24353;
  const char * D.24354;
  int D.24355;
  struct MonoClass * D.24358;
  struct MonoString * D.24359;
  int D.24360;
  struct MonoString * D.24363;
  int (*<T3e7a>) (struct MonoContext *, void *) call_filter.44;
  void * D.24367;
  int (*<T3e7a>) (struct MonoContext *, void *) call_filter.45;
  void * D.24369;
  _Bool D.24370;
  long int D.24371;
  long int D.24372;
  void (*<T33d5>) (struct MonoObject *) D.24375;
  _Bool D.24376;
  long int D.24377;
  long int D.24378;
  struct MonoContext * D.24381;
  int D.24384;
  struct MonoMethod * iftmp.46;
  struct MonoVTable * D.24391;
  struct MonoClass * D.24392;
  int D.24399;
  int D.24401;
  char * iftmp.47;
  long unsigned int D.24408;
  void * D.24409;
  struct MonoVTable * D.24410;
  struct MonoClass * D.24411;
  const char * D.24412;
  const char * D.24413;
  int D.24416;
  struct MonoDebugOptions * D.24421;
  int D.24422;
  struct MonoDebugOptions * D.24425;
  int D.24426;
  struct _IO_FILE * stderr.48;
  struct MonoJitInfo * ji.49;
  struct MonoMethod * D.24434;
  long unsigned int D.24435;
  long unsigned int D.24436;
  struct MonoJitInfo * prev_ji.50;
  struct MonoMethod * D.24442;
  struct MonoMethod * D.24443;
  struct MonoJitInfo * ji.51;
  struct MonoLMF * lmf.52;
  int first_filter_idx.53;
  <unnamed type> D.24459;
  unsigned int D.24460;
  _Bool D.24463;
  long int D.24464;
  long int D.24465;
  struct MonoJitInfo * ji.54;
  struct MonoLMF * * D.24471;
  struct MonoLMF * lmf.55;
  long unsigned int D.24477;
  unsigned int D.24478;
  long unsigned int D.24479;
  unsigned int D.24480;
  long unsigned int D.24485;
  void * D.24486;
  int D.24487;
  int D.24493;
  unsigned int D.24495;
  long unsigned int D.24498;
  long unsigned int D.24499;
  int D.24502;
  sizetype D.24503;
  long unsigned int D.24504;
  sizetype D.24505;
  void * * D.24506;
  int first_filter_idx.56;
  _Bool D.24510;
  struct MonoObject * D.24515;
  void * D.24516;
  _Bool D.24517;
  long int D.24518;
  long int D.24519;
  long unsigned int D.24522;
  long unsigned int D.24528;
  char * D.24529;
  struct MonoJitInfo * D.24530;
  _Bool D.24531;
  long int D.24532;
  long int D.24533;
  struct MonoJitExceptionInfo * D.24536;
  void * D.24537;
  int D.24538;
  int D.24543;
  int D.24546;
  char * D.24549;
  int D.24550;
  long unsigned int D.24551;
  struct MonoLMF * * D.24552;
  struct MonoPerfCounters * mono_perfcounters.57;
  unsigned int D.24554;
  unsigned int frame_count.58;
  unsigned int D.24556;
  gboolean D.24559;
  int D.24560;
  int D.24565;
  int D.24568;
  char * D.24571;
  int D.24572;
  int D.24577;
  int D.24580;
  char * D.24583;
  unsigned int D.24584;
  unsigned int D.24585;
  struct MonoLMF * * D.24586;
  int D.24589;
  <unnamed-unsigned:15> D.24590;
  int D.24591;
  struct MonoDomain * domain;
  struct MonoJitInfo * ji;
  struct MonoJitInfo * prev_ji;
  static int (*<T3e7a>) (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.42 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.42);
      lmf.43 = mono_get_lmf ();
      lmf = lmf.43;
      stack_overflow = 0;
      frame_count = 0;
      first_filter_idx = 0;
      non_exception = 0B;
      D.24323 = ctx == 0B;
      D.24324 = (long int) D.24323;
      D.24325 = __builtin_expect (D.24324, 0);
      if (D.24325 != 0) goto <D.24326>; else goto <D.24327>;
      <D.24326>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1517, "ctx != NULL");
      <D.24327>:
      if (obj == 0B) goto <D.24328>; else goto <D.24329>;
      <D.24328>:
      {
        struct MonoException * ex;

        ex = mono_get_exception_null_reference ();
        D.24330 = &ex->message;
        D.24331 = mono_string_new (domain, "Object reference not set to an instance of an object");
        mono_gc_wbarrier_set_field (ex, D.24330, D.24331);
        obj = ex;
      }
      <D.24329>:
      D.24332 = domain->stack_overflow_ex;
      if (D.24332 == obj) goto <D.24333>; else goto <D.24334>;
      <D.24333>:
      stack_overflow = 1;
      goto <D.24335>;
      <D.24334>:
      D.24336 = domain->null_reference_ex;
      if (D.24336 == obj) goto <D.24337>; else goto <D.24338>;
      <D.24337>:
      obj = mono_get_exception_null_reference ();
      <D.24338>:
      <D.24335>:
      D.24339 = mono_defaults.exception_class;
      D.24340 = mono_object_isinst (obj, D.24339);
      if (D.24340 == 0B) goto <D.24341>; else goto <D.24342>;
      <D.24341>:
      non_exception = obj;
      obj = mono_get_exception_runtime_wrapped (obj);
      <D.24342>:
      mono_ex = obj;
      D.24339 = mono_defaults.exception_class;
      D.24343 = mono_object_isinst (obj, D.24339);
      if (D.24343 != 0B) goto <D.24344>; else goto <D.24345>;
      <D.24344>:
      mono_ex = obj;
      goto <D.24346>;
      <D.24345>:
      mono_ex = 0B;
      <D.24346>:
      if (mono_ex != 0B) goto <D.24347>; else goto <D.24348>;
      <D.24347>:
      D.24349 = jit_tls->class_cast_from;
      if (D.24349 != 0B) goto <D.24350>; else goto <D.24351>;
      <D.24350>:
      D.24352 = mono_ex->object.vtable;
      D.24353 = D.24352->klass;
      D.24354 = D.24353->name;
      D.24355 = strcmp (D.24354, "InvalidCastException");
      if (D.24355 == 0) goto <D.24356>; else goto <D.24357>;
      <D.24356>:
      {
        char * from_name;
        char * to_name;
        char * msg;

        D.24349 = jit_tls->class_cast_from;
        from_name = mono_type_get_full_name (D.24349);
        D.24358 = jit_tls->class_cast_to;
        to_name = mono_type_get_full_name (D.24358);
        msg = monoeg_g_strdup_printf ("Unable to cast object of type \'%s\' to type \'%s\'.", from_name, to_name);
        D.24359 = mono_string_new (domain, msg);
        mono_ex->message = D.24359;
        monoeg_g_free (from_name);
        monoeg_g_free (to_name);
        monoeg_g_free (msg);
      }
      <D.24357>:
      D.24352 = mono_ex->object.vtable;
      D.24353 = D.24352->klass;
      D.24354 = D.24353->name;
      D.24360 = strcmp (D.24354, "ArrayTypeMismatchException");
      if (D.24360 == 0) goto <D.24361>; else goto <D.24362>;
      <D.24361>:
      {
        char * from_name;
        char * to_name;
        char * msg;

        D.24349 = jit_tls->class_cast_from;
        from_name = mono_type_get_full_name (D.24349);
        D.24358 = jit_tls->class_cast_to;
        to_name = mono_type_get_full_name (D.24358);
        msg = monoeg_g_strdup_printf ("Source array of type \'%s\' cannot be cast to destination array type \'%s\'.", from_name, to_name);
        D.24363 = mono_string_new (domain, msg);
        mono_ex->message = D.24363;
        monoeg_g_free (from_name);
        monoeg_g_free (to_name);
        monoeg_g_free (msg);
      }
      <D.24362>:
      <D.24351>:
      <D.24348>:
      call_filter.44 = call_filter;
      if (call_filter.44 == 0B) goto <D.24365>; else goto <D.24366>;
      <D.24365>:
      D.24367 = mono_get_call_filter ();
      call_filter.45 = (int (*<T3e7a>) (struct MonoContext *, void *)) D.24367;
      call_filter = call_filter.45;
      <D.24366>:
      D.24369 = jit_tls->end_of_stack;
      D.24370 = D.24369 == 0B;
      D.24371 = (long int) D.24370;
      D.24372 = __builtin_expect (D.24371, 0);
      if (D.24372 != 0) goto <D.24373>; else goto <D.24374>;
      <D.24373>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1575, "jit_tls->end_of_stack");
      <D.24374>:
      D.24375 = jit_tls->abort_func;
      D.24376 = D.24375 == 0B;
      D.24377 = (long int) D.24376;
      D.24378 = __builtin_expect (D.24377, 0);
      if (D.24378 != 0) goto <D.24379>; else goto <D.24380>;
      <D.24379>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1576, "jit_tls->abort_func");
      <D.24380>:
      D.24381 = &jit_tls->orig_ex_ctx;
      memcpy (D.24381, ctx, 512);
      if (resume == 0) goto <D.24382>; else goto <D.24383>;
      <D.24382>:
      {
        gboolean res;
        struct MonoContext ctx_cp;

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

              try
                {
                  D.24339 = mono_defaults.exception_class;
                  system_exception_get_message = mono_class_get_method_from_name (D.24339, "get_Message", 0);
                  if (system_exception_get_message != 0B) goto <D.24388>; else goto <D.24389>;
                  <D.24388>:
                  iftmp.46 = mono_object_get_virtual_method (obj, system_exception_get_message);
                  goto <D.24390>;
                  <D.24389>:
                  iftmp.46 = 0B;
                  <D.24390>:
                  get_message = iftmp.46;
                  D.24391 = MEM[(struct MonoObject *)mono_ex].vtable;
                  D.24392 = D.24391->klass;
                  type_name = mono_class_get_name (D.24392);
                  msg = 0B;
                  exc = 0B;
                  if (get_message == 0B) goto <D.24393>; else goto <D.24394>;
                  <D.24393>:
                  message = 0B;
                  goto <D.24395>;
                  <D.24394>:
                  D.24399 = strcmp (type_name, "OutOfMemoryException");
                  if (D.24399 == 0) goto <D.24396>; else goto <D.24400>;
                  <D.24400>:
                  D.24401 = strcmp (type_name, "StackOverflowException");
                  if (D.24401 == 0) goto <D.24396>; else goto <D.24397>;
                  <D.24396>:
                  message = 0B;
                  msg = monoeg_g_strdup_printf ("(No exception message for: %s)\n", type_name);
                  goto <D.24398>;
                  <D.24397>:
                  message = mono_runtime_invoke (get_message, obj, 0B, &exc);
                  <D.24398>:
                  <D.24395>:
                  if (msg == 0B) goto <D.24402>; else goto <D.24403>;
                  <D.24402>:
                  if (message != 0B) goto <D.24405>; else goto <D.24406>;
                  <D.24405>:
                  iftmp.47 = mono_string_to_utf8 (message);
                  goto <D.24407>;
                  <D.24406>:
                  iftmp.47 = monoeg_strdup ("(System.Exception.Message property not available)");
                  <D.24407>:
                  msg = iftmp.47;
                  <D.24403>:
                  D.24408 = GetCurrentThreadId ();
                  D.24409 = (void *) D.24408;
                  D.24410 = MEM[(struct MonoObject *)obj].vtable;
                  D.24411 = D.24410->klass;
                  D.24412 = D.24411->name_space;
                  D.24410 = MEM[(struct MonoObject *)obj].vtable;
                  D.24411 = D.24410->klass;
                  D.24413 = D.24411->name;
                  monoeg_g_print ("[%p:] EXCEPTION handling: %s.%s: %s\n", D.24409, D.24412, D.24413, msg);
                  monoeg_g_free (msg);
                  if (mono_ex != 0B) goto <D.24414>; else goto <D.24415>;
                  <D.24414>:
                  D.24391 = MEM[(struct MonoObject *)mono_ex].vtable;
                  D.24392 = D.24391->klass;
                  D.24416 = mono_trace_eval_exception (D.24392);
                  if (D.24416 != 0) goto <D.24417>; else goto <D.24418>;
                  <D.24417>:
                  mono_print_thread_dump_from_ctx (ctx);
                  <D.24418>:
                  <D.24415>:
                }
              finally
                {
                  exc = {CLOBBER};
                }
            }
            <D.24386>:
            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.24419>; else goto <D.24420>;
            <D.24419>:
            D.24421 = mini_get_debug_options ();
            D.24422 = D.24421->break_on_exc;
            if (D.24422 != 0) goto <D.24423>; else goto <D.24424>;
            <D.24423>:
            raise (5);
            <D.24424>:
            mono_debugger_agent_handle_exception (obj, ctx, 0B);
            D.24425 = mini_get_debug_options ();
            D.24426 = D.24425->suspend_on_unhandled;
            if (D.24426 != 0) goto <D.24427>; else goto <D.24428>;
            <D.24427>:
            stderr.48 = stderr;
            fprintf (stderr.48, "Unhandled exception, suspending...\n");
            <D.23282>:
            goto <D.23282>;
            <D.24428>:
            mono_unhandled_exception (obj);
            goto <D.24430>;
            <D.24420>:
            {
              gboolean unhandled;

              unhandled = 0;
              ji.49 = ji;
              if (ji.49 != 0B) goto <D.24432>; else goto <D.24433>;
              <D.24432>:
              ji.49 = ji;
              D.24434 = jinfo_get_method (ji.49);
              D.24435 = BIT_FIELD_REF <*D.24434, 64, 256>;
              D.24436 = D.24435 & 4467570830351532032;
              if (D.24436 == 576460752303423488) goto <D.24437>; else goto <D.24438>;
              <D.24437>:
              prev_ji.50 = prev_ji;
              if (prev_ji.50 != 0B) goto <D.24440>; else goto <D.24441>;
              <D.24440>:
              {
                struct MonoInternalThread * thread;

                thread = mono_thread_internal_current ();
                prev_ji.50 = prev_ji;
                D.24442 = jinfo_get_method (prev_ji.50);
                D.24443 = thread->async_invoke_method;
                if (D.24442 == D.24443) goto <D.24444>; else goto <D.24445>;
                <D.24444>:
                unhandled = 1;
                <D.24445>:
              }
              <D.24441>:
              <D.24438>:
              <D.24433>:
              if (unhandled != 0) goto <D.24446>; else goto <D.24447>;
              <D.24446>:
              mono_debugger_agent_handle_exception (obj, ctx, 0B);
              goto <D.24448>;
              <D.24447>:
              mono_debugger_agent_handle_exception (obj, ctx, &ctx_cp);
              <D.24448>:
            }
            <D.24430>:
          }
        finally
          {
            ctx_cp = {CLOBBER};
          }
      }
      <D.24383>:
      if (out_ji != 0B) goto <D.24449>; else goto <D.24450>;
      <D.24449>:
      *out_ji = 0B;
      <D.24450>:
      filter_idx = 0;
      initial_ctx = *ctx;
      <D.23301>:
      {
        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.24451>; else goto <D.24452>;
            <D.24451>:
            resume = 0;
            ji.51 = jit_tls->resume_state.ji;
            ji = ji.51;
            new_ctx = jit_tls->resume_state.new_ctx;
            clause_index_start = jit_tls->resume_state.clause_index;
            lmf.52 = jit_tls->resume_state.lmf;
            lmf = lmf.52;
            first_filter_idx.53 = jit_tls->resume_state.first_filter_idx;
            first_filter_idx = first_filter_idx.53;
            filter_idx = jit_tls->resume_state.filter_idx;
            goto <D.24456>;
            <D.24452>:
            {
              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.24457>; else goto <D.24458>;
                  <D.24457>:
                  D.24459 = frame.type;
                  D.24460 = D.24459 + 4294967295;
                  if (D.24460 <= 1) goto <D.24461>; else goto <D.24462>;
                  <D.24461>:
                  *ctx = new_ctx;
                  // predicted unlikely by continue predictor.
                  goto <D.23290>;
                  <D.24462>:
                  D.24459 = frame.type;
                  D.24463 = D.24459 != 0;
                  D.24464 = (long int) D.24463;
                  D.24465 = __builtin_expect (D.24464, 0);
                  if (D.24465 != 0) goto <D.24466>; else goto <D.24467>;
                  <D.24466>:
                  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1683, "frame.type == FRAME_TYPE_MANAGED");
                  <D.24467>:
                  ji.54 = frame.ji;
                  ji = ji.54;
                  <D.24458>:
                }
              finally
                {
                  frame = {CLOBBER};
                }
            }
            <D.24456>:
            if (unwind_res == 0) goto <D.24469>; else goto <D.24470>;
            <D.24469>:
            D.24471 = mono_get_lmf_addr ();
            lmf.55 = lmf;
            *D.24471 = lmf.55;
            D.24375 = jit_tls->abort_func;
            D.24375 (obj);
            monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 1692);
            <D.24470>:
            ji.49 = ji;
            method = jinfo_get_method (ji.49);
            frame_count = frame_count + 1;
            if (stack_overflow != 0) goto <D.24473>; else goto <D.24474>;
            <D.24473>:
            if (1 != 0) goto <D.24475>; else goto <D.24476>;
            <D.24475>:
            D.24477 = ctx->uc_mcontext.gregs[15];
            D.24478 = (unsigned int) D.24477;
            D.24479 = initial_ctx.uc_mcontext.gregs[15];
            D.24480 = (unsigned int) D.24479;
            free_stack = D.24478 - D.24480;
            goto <D.24481>;
            <D.24476>:
            D.24479 = initial_ctx.uc_mcontext.gregs[15];
            D.24480 = (unsigned int) D.24479;
            D.24477 = ctx->uc_mcontext.gregs[15];
            D.24478 = (unsigned int) D.24477;
            free_stack = D.24480 - D.24478;
            <D.24481>:
            goto <D.24482>;
            <D.24474>:
            free_stack = 16777215;
            <D.24482>:
            i = clause_index_start;
            goto <D.23299>;
            <D.23298>:
            {
              struct MonoJitExceptionInfo * ei;
              gboolean filtered;

              ji.49 = ji;
              ei = &ji.49->clauses[i];
              filtered = 0;
              if (free_stack <= 65536) goto <D.24483>; else goto <D.24484>;
              <D.24483>:
              // predicted unlikely by continue predictor.
              goto <D.23293>;
              <D.24484>:
              ji.49 = ji;
              D.24485 = ctx->uc_mcontext.psw.addr;
              D.24486 = (void *) D.24485;
              D.24487 = is_address_protected (ji.49, ei, D.24486);
              if (D.24487 != 0) goto <D.24488>; else goto <D.24489>;
              <D.24488>:
              {
                struct MonoClass * catch_class;

                ji.49 = ji;
                catch_class = get_exception_catch_class (ei, ji.49, ctx);
                if (non_exception != 0B) goto <D.24492>; else goto <D.24490>;
                <D.24492>:
                D.24493 = wrap_non_exception_throws (method);
                if (D.24493 == 0) goto <D.24494>; else goto <D.24490>;
                <D.24494>:
                ex_obj = non_exception;
                goto <D.24491>;
                <D.24490>:
                ex_obj = obj;
                <D.24491>:
                D.24495 = ei->flags;
                if (D.24495 <= 1) goto <D.24496>; else goto <D.24497>;
                <D.24496>:
                ji.49 = ji;
                D.24498 = BIT_FIELD_REF <*ji.49, 64, 256>;
                D.24499 = D.24498 & 4398046511104;
                if (D.24499 != 0) goto <D.24500>; else goto <D.24501>;
                <D.24500>:
                monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 1737);
                <D.24501>:
                D.24502 = ei->exvar_offset;
                D.24503 = (sizetype) D.24502;
                D.24504 = ctx->uc_mcontext.gregs[11];
                D.24505 = D.24503 + D.24504;
                D.24506 = (void * *) D.24505;
                *D.24506 = ex_obj;
                <D.24497>:
                D.24495 = ei->flags;
                if (D.24495 == 1) goto <D.24507>; else goto <D.24508>;
                <D.24507>:
                first_filter_idx.56 = first_filter_idx;
                D.24510 = filter_idx == first_filter_idx.56;
                filtered = (gboolean) D.24510;
                filter_idx = filter_idx + 1;
                <D.24508>:
                D.24495 = ei->flags;
                if (D.24495 == 0) goto <D.24514>; else goto <D.24511>;
                <D.24514>:
                D.24515 = mono_object_isinst (ex_obj, catch_class);
                if (D.24515 != 0B) goto <D.24512>; else goto <D.24511>;
                <D.24511>:
                if (filtered != 0) goto <D.24512>; else goto <D.24513>;
                <D.24512>:
                D.24516 = jit_tls->handler_block_return_address;
                D.24517 = D.24516 != 0B;
                D.24518 = (long int) D.24517;
                D.24519 = __builtin_expect (D.24518, 0);
                if (D.24519 != 0) goto <D.24520>; else goto <D.24521>;
                <D.24520>:
                {
                  gboolean is_outside;
                  void * prot_bp;
                  void * catch_bp;

                  is_outside = 0;
                  D.24522 = jit_tls->handler_block_context.uc_mcontext.gregs[11];
                  prot_bp = (void *) D.24522;
                  D.24504 = ctx->uc_mcontext.gregs[11];
                  catch_bp = (void *) D.24504;
                  if (catch_bp > prot_bp) goto <D.24523>; else goto <D.24524>;
                  <D.24523>:
                  is_outside = 1;
                  goto <D.24525>;
                  <D.24524>:
                  if (catch_bp == prot_bp) goto <D.24526>; else goto <D.24527>;
                  <D.24526>:
                  D.24528 = jit_tls->handler_block_context.uc_mcontext.psw.addr;
                  D.24529 = (char *) D.24528;
                  D.24530 = mini_jit_info_table_find (domain, D.24529, 0B);
                  ji.49 = ji;
                  D.24531 = D.24530 != ji.49;
                  D.24532 = (long int) D.24531;
                  D.24533 = __builtin_expect (D.24532, 0);
                  if (D.24533 != 0) goto <D.24534>; else goto <D.24535>;
                  <D.24534>:
                  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.24535>:
                  ji.49 = ji;
                  D.24536 = jit_tls->handler_block;
                  D.24537 = ei->handler_start;
                  D.24538 = is_address_protected (ji.49, D.24536, D.24537);
                  if (D.24538 == 0) goto <D.24539>; else goto <D.24540>;
                  <D.24539>:
                  is_outside = 1;
                  <D.24540>:
                  <D.24527>:
                  <D.24525>:
                  if (is_outside != 0) goto <D.24541>; else goto <D.24542>;
                  <D.24541>:
                  jit_tls->handler_block_return_address = 0B;
                  jit_tls->handler_block = 0B;
                  mono_thread_resume_interruption ();
                  <D.24542>:
                }
                <D.24521>:
                D.24543 = mono_trace_is_enabled ();
                if (D.24543 != 0) goto <D.24544>; else goto <D.24545>;
                <D.24544>:
                D.24546 = mono_trace_eval (method);
                if (D.24546 != 0) goto <D.24547>; else goto <D.24548>;
                <D.24547>:
                D.24549 = mono_method_full_name (method, 1);
                monoeg_g_print ("EXCEPTION: catch found at clause %d of %s\n", i, D.24549);
                <D.24548>:
                <D.24545>:
                jit_tls->orig_ex_ctx_set = 1;
                D.24495 = ei->flags;
                D.24550 = (int) D.24495;
                mono_profiler_exception_clause_handler (method, D.24550, i);
                jit_tls->orig_ex_ctx_set = 0;
                D.24537 = ei->handler_start;
                D.24551 = (long unsigned int) D.24537;
                ctx->uc_mcontext.gregs[14] = D.24551;
                D.24537 = ei->handler_start;
                D.24551 = (long unsigned int) D.24537;
                ctx->uc_mcontext.psw.addr = D.24551;
                D.24552 = mono_get_lmf_addr ();
                lmf.55 = lmf;
                *D.24552 = lmf.55;
                mono_perfcounters.57 = mono_perfcounters;
                mono_perfcounters.57 = mono_perfcounters;
                D.24554 = mono_perfcounters.57->exceptions_depth;
                frame_count.58 = (unsigned int) frame_count;
                D.24556 = D.24554 + frame_count.58;
                mono_perfcounters.57->exceptions_depth = D.24556;
                D.24332 = domain->stack_overflow_ex;
                if (D.24332 == obj) goto <D.24557>; else goto <D.24558>;
                <D.24557>:
                jit_tls->handling_stack_ovf = 0;
                <D.24558>:
                D.24559 = 0;
                return D.24559;
                <D.24513>:
                ji.49 = ji;
                D.24485 = ctx->uc_mcontext.psw.addr;
                D.24486 = (void *) D.24485;
                D.24560 = is_address_protected (ji.49, ei, D.24486);
                if (D.24560 != 0) goto <D.24561>; else goto <D.24562>;
                <D.24561>:
                D.24495 = ei->flags;
                if (D.24495 == 4) goto <D.24563>; else goto <D.24564>;
                <D.24563>:
                D.24565 = mono_trace_is_enabled ();
                if (D.24565 != 0) goto <D.24566>; else goto <D.24567>;
                <D.24566>:
                D.24568 = mono_trace_eval (method);
                if (D.24568 != 0) goto <D.24569>; else goto <D.24570>;
                <D.24569>:
                D.24571 = mono_method_full_name (method, 1);
                monoeg_g_print ("EXCEPTION: fault clause %d of %s\n", i, D.24571);
                <D.24570>:
                <D.24567>:
                jit_tls->orig_ex_ctx_set = 1;
                D.24495 = ei->flags;
                D.24550 = (int) D.24495;
                mono_profiler_exception_clause_handler (method, D.24550, i);
                jit_tls->orig_ex_ctx_set = 0;
                call_filter.44 = call_filter;
                D.24537 = ei->handler_start;
                call_filter.44 (ctx, D.24537);
                <D.24564>:
                <D.24562>:
                ji.49 = ji;
                D.24485 = ctx->uc_mcontext.psw.addr;
                D.24486 = (void *) D.24485;
                D.24572 = is_address_protected (ji.49, ei, D.24486);
                if (D.24572 != 0) goto <D.24573>; else goto <D.24574>;
                <D.24573>:
                D.24495 = ei->flags;
                if (D.24495 == 2) goto <D.24575>; else goto <D.24576>;
                <D.24575>:
                D.24577 = mono_trace_is_enabled ();
                if (D.24577 != 0) goto <D.24578>; else goto <D.24579>;
                <D.24578>:
                D.24580 = mono_trace_eval (method);
                if (D.24580 != 0) goto <D.24581>; else goto <D.24582>;
                <D.24581>:
                D.24583 = mono_method_full_name (method, 1);
                monoeg_g_print ("EXCEPTION: finally clause %d of %s\n", i, D.24583);
                <D.24582>:
                <D.24579>:
                jit_tls->orig_ex_ctx_set = 1;
                D.24495 = ei->flags;
                D.24550 = (int) D.24495;
                mono_profiler_exception_clause_handler (method, D.24550, i);
                jit_tls->orig_ex_ctx_set = 0;
                mono_perfcounters.57 = mono_perfcounters;
                D.24584 = mono_perfcounters.57->exceptions_finallys;
                D.24585 = D.24584 + 1;
                mono_perfcounters.57->exceptions_finallys = D.24585;
                D.24586 = mono_get_lmf_addr ();
                lmf.55 = lmf;
                *D.24586 = lmf.55;
                ji.49 = ji;
                D.24498 = BIT_FIELD_REF <*ji.49, 64, 256>;
                D.24499 = D.24498 & 4398046511104;
                if (D.24499 != 0) goto <D.24587>; else goto <D.24588>;
                <D.24587>:
                jit_tls->resume_state.ex_obj = obj;
                ji.49 = ji;
                jit_tls->resume_state.ji = ji.49;
                D.24589 = i + 1;
                jit_tls->resume_state.clause_index = D.24589;
                jit_tls->resume_state.ctx = *ctx;
                jit_tls->resume_state.new_ctx = new_ctx;
                lmf.55 = lmf;
                jit_tls->resume_state.lmf = lmf.55;
                first_filter_idx.56 = first_filter_idx;
                jit_tls->resume_state.first_filter_idx = first_filter_idx.56;
                jit_tls->resume_state.filter_idx = filter_idx;
                D.24537 = ei->handler_start;
                D.24551 = (long unsigned int) D.24537;
                ctx->uc_mcontext.gregs[14] = D.24551;
                D.24537 = ei->handler_start;
                D.24551 = (long unsigned int) D.24537;
                ctx->uc_mcontext.psw.addr = D.24551;
                D.24559 = 0;
                return D.24559;
                <D.24588>:
                call_filter.44 = call_filter;
                D.24537 = ei->handler_start;
                call_filter.44 (ctx, D.24537);
                <D.24576>:
                <D.24574>:
              }
              <D.24489>:
            }
            <D.23293>:
            i = i + 1;
            <D.23299>:
            ji.49 = ji;
            D.24590 = ji.49->num_clauses;
            D.24591 = (int) D.24590;
            if (D.24591 > i) goto <D.23298>; else goto <D.23300>;
            <D.23300>:
            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.23290>:
      goto <D.23301>;
      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};
    }
}


__attribute__((__gnu_inline__, nothrow, leaf, pure))
strcmp (const char * __s1, const char * __s2)
{
  int iftmp.59;
  int iftmp.60;
  int D.24607;
  char * __p1;
  char * __p2;
  int __ret;

  __p1 = __s1;
  __p2 = __s2;
  __asm__ __volatile__("   slr   0,0
0: clst  %1,%2
   jo    0b
   ipm   %0
   srl   %0,28" : "=d" __ret, "=&a" __p1, "=&a" __p2 : "1" __p1, "2" __p2 : "0", "memory", "cc");
  if (__ret != 0) goto <D.24600>; else goto <D.24601>;
  <D.24600>:
  if (__ret == 1) goto <D.24603>; else goto <D.24604>;
  <D.24603>:
  iftmp.60 = -1;
  goto <D.24605>;
  <D.24604>:
  iftmp.60 = 1;
  <D.24605>:
  iftmp.59 = iftmp.60;
  goto <D.24606>;
  <D.24601>:
  iftmp.59 = 0;
  <D.24606>:
  __ret = iftmp.59;
  D.24607 = __ret;
  return D.24607;
}


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

  if (str != 0B) goto <D.24609>; else goto <D.24610>;
  <D.24609>:
  D.24611 = __strdup (str);
  return D.24611;
  <D.24610>:
  D.24611 = 0B;
  return D.24611;
}


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.61;
  struct MonoLMF * lmf.62;
  _Bool D.24615;
  long int D.24616;
  long int D.24617;
  struct MonoException * D.24620;
  struct MonoClass * D.24623;
  struct MonoObject * D.24624;
  int (*<T3e7a>) (struct MonoContext *, void *) call_filter.63;
  void * D.24631;
  int (*<T3e7a>) (struct MonoContext *, void *) call_filter.64;
  void * D.24633;
  _Bool D.24634;
  long int D.24635;
  long int D.24636;
  void (*<T33d5>) (struct MonoObject *) D.24639;
  _Bool D.24640;
  long int D.24641;
  long int D.24642;
  <unnamed type> D.24655;
  unsigned int D.24656;
  _Bool D.24659;
  long int D.24660;
  long int D.24661;
  struct MonoArray * * D.24670;
  struct MonoClass * D.24671;
  struct MonoArray * D.24672;
  struct MonoArray * * D.24673;
  struct MonoArray * D.24674;
  struct MonoString * * D.24677;
  struct MonoString * D.24678;
  gboolean D.24679;
  struct MonoDebugOptions * D.24680;
  int D.24681;
  long unsigned int D.24684;
  long unsigned int D.24685;
  char * D.24688;
  long unsigned int D.24697;
  void * D.24698;
  void * D.24699;
  long unsigned int D.24700;
  long unsigned int D.24707;
  unsigned int D.24708;
  long unsigned int D.24709;
  unsigned int D.24710;
  int D.24715;
  int D.24721;
  unsigned int D.24723;
  int iftmp.65;
  struct MonoPerfCounters * mono_perfcounters.66;
  unsigned int D.24732;
  unsigned int D.24733;
  struct MonoArray * D.24740;
  struct MonoArray * D.24741;
  struct MonoString * D.24744;
  long unsigned int D.24745;
  long unsigned int D.24746;
  int D.24749;
  sizetype D.24750;
  long unsigned int D.24751;
  sizetype D.24752;
  void * * D.24753;
  void * D.24754;
  struct MonoArray * D.24769;
  struct MonoArray * D.24770;
  struct MonoString * D.24773;
  void * D.24774;
  long unsigned int D.24775;
  struct MonoObject * D.24778;
  struct MonoArray * D.24785;
  struct MonoArray * D.24786;
  struct MonoString * D.24789;
  <unnamed-unsigned:15> D.24792;
  int D.24793;
  struct MonoDomain * domain;
  struct MonoJitInfo * ji;
  static int (*<T3e7a>) (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.61 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.61);
      lmf.62 = mono_get_lmf ();
      lmf = lmf.62;
      initial_trace_ips = 0B;
      trace_ips = 0B;
      stack_overflow = 0;
      frame_count = 0;
      has_dynamic_methods = 0;
      D.24615 = ctx == 0B;
      D.24616 = (long int) D.24615;
      D.24617 = __builtin_expect (D.24616, 0);
      if (D.24617 != 0) goto <D.24618>; else goto <D.24619>;
      <D.24618>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1316, "ctx != NULL");
      <D.24619>:
      D.24620 = domain->stack_overflow_ex;
      if (D.24620 == obj) goto <D.24621>; else goto <D.24622>;
      <D.24621>:
      stack_overflow = 1;
      <D.24622>:
      mono_ex = obj;
      initial_trace_ips = mono_ex->trace_ips;
      D.24623 = mono_defaults.exception_class;
      D.24624 = mono_object_isinst (obj, D.24623);
      if (D.24624 != 0B) goto <D.24625>; else goto <D.24626>;
      <D.24625>:
      mono_ex = obj;
      initial_trace_ips = mono_ex->trace_ips;
      goto <D.24627>;
      <D.24626>:
      mono_ex = 0B;
      <D.24627>:
      call_filter.63 = call_filter;
      if (call_filter.63 == 0B) goto <D.24629>; else goto <D.24630>;
      <D.24629>:
      D.24631 = mono_get_call_filter ();
      call_filter.64 = (int (*<T3e7a>) (struct MonoContext *, void *)) D.24631;
      call_filter = call_filter.64;
      <D.24630>:
      D.24633 = jit_tls->end_of_stack;
      D.24634 = D.24633 == 0B;
      D.24635 = (long int) D.24634;
      D.24636 = __builtin_expect (D.24635, 0);
      if (D.24636 != 0) goto <D.24637>; else goto <D.24638>;
      <D.24637>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1334, "jit_tls->end_of_stack");
      <D.24638>:
      D.24639 = jit_tls->abort_func;
      D.24640 = D.24639 == 0B;
      D.24641 = (long int) D.24640;
      D.24642 = __builtin_expect (D.24641, 0);
      if (D.24642 != 0) goto <D.24643>; else goto <D.24644>;
      <D.24643>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1335, "jit_tls->abort_func");
      <D.24644>:
      if (out_filter_idx != 0B) goto <D.24645>; else goto <D.24646>;
      <D.24645>:
      *out_filter_idx = -1;
      <D.24646>:
      if (out_ji != 0B) goto <D.24647>; else goto <D.24648>;
      <D.24647>:
      *out_ji = 0B;
      <D.24648>:
      if (out_prev_ji != 0B) goto <D.24649>; else goto <D.24650>;
      <D.24649>:
      *out_prev_ji = 0B;
      <D.24650>:
      filter_idx = 0;
      initial_ctx = *ctx;
      <D.23242>:
      {
        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.24651>; else goto <D.24652>;
            <D.24651>:
            *out_prev_ji = ji;
            <D.24652>:
            unwind_res = mono_find_jit_info_ext (domain, jit_tls, 0B, ctx, &new_ctx, 0B, &lmf, 0B, &frame);
            if (unwind_res != 0) goto <D.24653>; else goto <D.24654>;
            <D.24653>:
            D.24655 = frame.type;
            D.24656 = D.24655 + 4294967295;
            if (D.24656 <= 1) goto <D.24657>; else goto <D.24658>;
            <D.24657>:
            *ctx = new_ctx;
            // predicted unlikely by continue predictor.
            goto <D.23232>;
            <D.24658>:
            D.24655 = frame.type;
            D.24659 = D.24655 != 0;
            D.24660 = (long int) D.24659;
            D.24661 = __builtin_expect (D.24660, 0);
            if (D.24661 != 0) goto <D.24662>; else goto <D.24663>;
            <D.24662>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1363, "frame.type == FRAME_TYPE_MANAGED");
            <D.24663>:
            ji = frame.ji;
            <D.24654>:
            if (unwind_res == 0) goto <D.24664>; else goto <D.24665>;
            <D.24664>:
            if (mono_ex != 0B) goto <D.24666>; else goto <D.24667>;
            <D.24666>:
            if (initial_trace_ips == 0B) goto <D.24668>; else goto <D.24669>;
            <D.24668>:
            trace_ips = monoeg_g_list_reverse (trace_ips);
            D.24670 = &mono_ex->trace_ips;
            D.24671 = mono_defaults.int_class;
            D.24672 = glist_to_array (trace_ips, D.24671);
            mono_gc_wbarrier_set_field (mono_ex, D.24670, D.24672);
            D.24673 = &mono_ex->native_trace_ips;
            D.24674 = build_native_trace ();
            mono_gc_wbarrier_set_field (mono_ex, D.24673, D.24674);
            if (has_dynamic_methods != 0) goto <D.24675>; else goto <D.24676>;
            <D.24675>:
            D.24677 = &mono_ex->stack_trace;
            D.24678 = ves_icall_System_Exception_get_trace (mono_ex);
            mono_gc_wbarrier_set_field (mono_ex, D.24677, D.24678);
            <D.24676>:
            <D.24669>:
            <D.24667>:
            monoeg_g_list_free (trace_ips);
            trace_ips = 0B;
            D.24679 = 0;
            return D.24679;
            <D.24665>:
            frame_count = frame_count + 1;
            method = jinfo_get_method (ji);
            D.24680 = mini_get_debug_options ();
            D.24681 = D.24680->reverse_pinvoke_exceptions;
            if (D.24681 != 0) goto <D.24682>; else goto <D.24683>;
            <D.24682>:
            D.24684 = BIT_FIELD_REF <*method, 64, 256>;
            D.24685 = D.24684 & 4467570830351532032;
            if (D.24685 == 720575940379279360) goto <D.24686>; else goto <D.24687>;
            <D.24686>:
            D.24688 = 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.24688);
            <D.23233>:
            goto <D.23233>;
            <D.24687>:
            <D.24683>:
            D.24684 = BIT_FIELD_REF <*method, 64, 256>;
            D.24685 = D.24684 & 4467570830351532032;
            if (D.24685 != 576460752303423488) goto <D.24689>; else goto <D.24690>;
            <D.24689>:
            if (mono_ex != 0B) goto <D.24691>; else goto <D.24692>;
            <D.24691>:
            if (initial_trace_ips == 0B) goto <D.24693>; else goto <D.24694>;
            <D.24693>:
            if (frame_count <= 999) goto <D.24695>; else goto <D.24696>;
            <D.24695>:
            D.24697 = ctx->uc_mcontext.psw.addr;
            D.24698 = (void *) D.24697;
            trace_ips = monoeg_g_list_prepend (trace_ips, D.24698);
            D.24699 = get_generic_info_from_stack_frame (ji, ctx);
            trace_ips = monoeg_g_list_prepend (trace_ips, D.24699);
            <D.24696>:
            <D.24694>:
            <D.24692>:
            <D.24690>:
            D.24684 = BIT_FIELD_REF <*method, 64, 256>;
            D.24700 = D.24684 & 18014398509481984;
            if (D.24700 != 0) goto <D.24701>; else goto <D.24702>;
            <D.24701>:
            has_dynamic_methods = 1;
            <D.24702>:
            if (stack_overflow != 0) goto <D.24703>; else goto <D.24704>;
            <D.24703>:
            if (1 != 0) goto <D.24705>; else goto <D.24706>;
            <D.24705>:
            D.24707 = ctx->uc_mcontext.gregs[15];
            D.24708 = (unsigned int) D.24707;
            D.24709 = initial_ctx.uc_mcontext.gregs[15];
            D.24710 = (unsigned int) D.24709;
            free_stack = D.24708 - D.24710;
            goto <D.24711>;
            <D.24706>:
            D.24709 = initial_ctx.uc_mcontext.gregs[15];
            D.24710 = (unsigned int) D.24709;
            D.24707 = ctx->uc_mcontext.gregs[15];
            D.24708 = (unsigned int) D.24707;
            free_stack = D.24710 - D.24708;
            <D.24711>:
            goto <D.24712>;
            <D.24704>:
            free_stack = 16777215;
            <D.24712>:
            i = clause_index_start;
            goto <D.23240>;
            <D.23239>:
            {
              struct MonoJitExceptionInfo * ei;
              gboolean filtered;

              ei = &ji->clauses[i];
              filtered = 0;
              if (free_stack <= 65536) goto <D.24713>; else goto <D.24714>;
              <D.24713>:
              // predicted unlikely by continue predictor.
              goto <D.23236>;
              <D.24714>:
              D.24697 = ctx->uc_mcontext.psw.addr;
              D.24698 = (void *) D.24697;
              D.24715 = is_address_protected (ji, ei, D.24698);
              if (D.24715 != 0) goto <D.24716>; else goto <D.24717>;
              <D.24716>:
              {
                struct MonoClass * catch_class;

                catch_class = get_exception_catch_class (ei, ji, ctx);
                if (non_exception != 0B) goto <D.24720>; else goto <D.24718>;
                <D.24720>:
                D.24721 = wrap_non_exception_throws (method);
                if (D.24721 == 0) goto <D.24722>; else goto <D.24718>;
                <D.24722>:
                ex_obj = non_exception;
                goto <D.24719>;
                <D.24718>:
                ex_obj = obj;
                <D.24719>:
                D.24723 = ei->flags;
                if (D.24723 == 1) goto <D.24724>; else goto <D.24725>;
                <D.24724>:
                {
                  gboolean is_user_frame;

                  D.24684 = BIT_FIELD_REF <*method, 64, 256>;
                  D.24685 = D.24684 & 4467570830351532032;
                  if (D.24685 == 0) goto <D.24727>; else goto <D.24730>;
                  <D.24730>:
                  D.24684 = BIT_FIELD_REF <*method, 64, 256>;
                  D.24685 = D.24684 & 4467570830351532032;
                  if (D.24685 == 2449958197289549824) goto <D.24727>; else goto <D.24728>;
                  <D.24727>:
                  iftmp.65 = 1;
                  goto <D.24729>;
                  <D.24728>:
                  iftmp.65 = 0;
                  <D.24729>:
                  is_user_frame = iftmp.65;
                  mono_perfcounters.66 = mono_perfcounters;
                  D.24732 = mono_perfcounters.66->exceptions_filters;
                  D.24733 = D.24732 + 1;
                  mono_perfcounters.66->exceptions_filters = D.24733;
                  if (is_user_frame != 0) goto <D.24734>; else goto <D.24735>;
                  <D.24734>:
                  if (mono_ex != 0B) goto <D.24736>; else goto <D.24737>;
                  <D.24736>:
                  if (initial_trace_ips == 0B) goto <D.24738>; else goto <D.24739>;
                  <D.24738>:
                  trace_ips = monoeg_g_list_reverse (trace_ips);
                  D.24670 = &mono_ex->trace_ips;
                  D.24671 = mono_defaults.int_class;
                  D.24740 = glist_to_array (trace_ips, D.24671);
                  mono_gc_wbarrier_set_field (mono_ex, D.24670, D.24740);
                  D.24673 = &mono_ex->native_trace_ips;
                  D.24741 = build_native_trace ();
                  mono_gc_wbarrier_set_field (mono_ex, D.24673, D.24741);
                  if (has_dynamic_methods != 0) goto <D.24742>; else goto <D.24743>;
                  <D.24742>:
                  D.24677 = &mono_ex->stack_trace;
                  D.24744 = ves_icall_System_Exception_get_trace (mono_ex);
                  mono_gc_wbarrier_set_field (mono_ex, D.24677, D.24744);
                  <D.24743>:
                  <D.24739>:
                  <D.24737>:
                  monoeg_g_list_free (trace_ips);
                  trace_ips = 0B;
                  <D.24735>:
                  D.24745 = BIT_FIELD_REF <*ji, 64, 256>;
                  D.24746 = D.24745 & 4398046511104;
                  if (D.24746 != 0) goto <D.24747>; else goto <D.24748>;
                  <D.24747>:
                  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 1449);
                  <D.24748>:
                  D.24749 = ei->exvar_offset;
                  D.24750 = (sizetype) D.24749;
                  D.24751 = ctx->uc_mcontext.gregs[11];
                  D.24752 = D.24750 + D.24751;
                  D.24753 = (void * *) D.24752;
                  *D.24753 = ex_obj;
                  mono_debugger_agent_begin_exception_filter (mono_ex, ctx, &initial_ctx);
                  call_filter.63 = call_filter;
                  D.24754 = ei->data.filter;
                  filtered = call_filter.63 (ctx, D.24754);
                  mono_debugger_agent_end_exception_filter (mono_ex, ctx, &initial_ctx);
                  if (filtered != 0) goto <D.24755>; else goto <D.24756>;
                  <D.24755>:
                  if (out_filter_idx != 0B) goto <D.24757>; else goto <D.24758>;
                  <D.24757>:
                  *out_filter_idx = filter_idx;
                  <D.24758>:
                  <D.24756>:
                  if (out_ji != 0B) goto <D.24759>; else goto <D.24760>;
                  <D.24759>:
                  *out_ji = ji;
                  <D.24760>:
                  filter_idx = filter_idx + 1;
                  if (filtered != 0) goto <D.24761>; else goto <D.24762>;
                  <D.24761>:
                  if (is_user_frame == 0) goto <D.24763>; else goto <D.24764>;
                  <D.24763>:
                  if (mono_ex != 0B) goto <D.24765>; else goto <D.24766>;
                  <D.24765>:
                  if (initial_trace_ips == 0B) goto <D.24767>; else goto <D.24768>;
                  <D.24767>:
                  trace_ips = monoeg_g_list_reverse (trace_ips);
                  D.24670 = &mono_ex->trace_ips;
                  D.24671 = mono_defaults.int_class;
                  D.24769 = glist_to_array (trace_ips, D.24671);
                  mono_gc_wbarrier_set_field (mono_ex, D.24670, D.24769);
                  D.24673 = &mono_ex->native_trace_ips;
                  D.24770 = build_native_trace ();
                  mono_gc_wbarrier_set_field (mono_ex, D.24673, D.24770);
                  if (has_dynamic_methods != 0) goto <D.24771>; else goto <D.24772>;
                  <D.24771>:
                  D.24677 = &mono_ex->stack_trace;
                  D.24773 = ves_icall_System_Exception_get_trace (mono_ex);
                  mono_gc_wbarrier_set_field (mono_ex, D.24677, D.24773);
                  <D.24772>:
                  <D.24768>:
                  <D.24766>:
                  monoeg_g_list_free (trace_ips);
                  trace_ips = 0B;
                  <D.24764>:
                  D.24774 = ei->handler_start;
                  D.24775 = (long unsigned int) D.24774;
                  ctx->uc_mcontext.gregs[14] = D.24775;
                  D.24774 = ei->handler_start;
                  D.24775 = (long unsigned int) D.24774;
                  ctx->uc_mcontext.psw.addr = D.24775;
                  D.24679 = 1;
                  return D.24679;
                  <D.24762>:
                }
                <D.24725>:
                D.24723 = ei->flags;
                if (D.24723 == 0) goto <D.24776>; else goto <D.24777>;
                <D.24776>:
                D.24778 = mono_object_isinst (ex_obj, catch_class);
                if (D.24778 != 0B) goto <D.24779>; else goto <D.24780>;
                <D.24779>:
                if (mono_ex != 0B) goto <D.24781>; else goto <D.24782>;
                <D.24781>:
                if (initial_trace_ips == 0B) goto <D.24783>; else goto <D.24784>;
                <D.24783>:
                trace_ips = monoeg_g_list_reverse (trace_ips);
                D.24670 = &mono_ex->trace_ips;
                D.24671 = mono_defaults.int_class;
                D.24785 = glist_to_array (trace_ips, D.24671);
                mono_gc_wbarrier_set_field (mono_ex, D.24670, D.24785);
                D.24673 = &mono_ex->native_trace_ips;
                D.24786 = build_native_trace ();
                mono_gc_wbarrier_set_field (mono_ex, D.24673, D.24786);
                if (has_dynamic_methods != 0) goto <D.24787>; else goto <D.24788>;
                <D.24787>:
                D.24677 = &mono_ex->stack_trace;
                D.24789 = ves_icall_System_Exception_get_trace (mono_ex);
                mono_gc_wbarrier_set_field (mono_ex, D.24677, D.24789);
                <D.24788>:
                <D.24784>:
                <D.24782>:
                monoeg_g_list_free (trace_ips);
                trace_ips = 0B;
                if (out_ji != 0B) goto <D.24790>; else goto <D.24791>;
                <D.24790>:
                *out_ji = ji;
                <D.24791>:
                D.24774 = ei->handler_start;
                D.24775 = (long unsigned int) D.24774;
                ctx->uc_mcontext.gregs[14] = D.24775;
                D.24774 = ei->handler_start;
                D.24775 = (long unsigned int) D.24774;
                ctx->uc_mcontext.psw.addr = D.24775;
                D.24679 = 1;
                return D.24679;
                <D.24780>:
                <D.24777>:
              }
              <D.24717>:
            }
            <D.23236>:
            i = i + 1;
            <D.23240>:
            D.24792 = ji->num_clauses;
            D.24793 = (int) D.24792;
            if (D.24793 > i) goto <D.23239>; else goto <D.23241>;
            <D.23241>:
            *ctx = new_ctx;
          }
        finally
          {
            new_ctx = {CLOBBER};
            frame = {CLOBBER};
          }
      }
      <D.23232>:
      goto <D.23242>;
      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.24801;
  unsigned int D.24802;
  long unsigned int D.24803;
  long unsigned int D.24804;
  void * D.24805;
  struct MonoDomain * domain;
  struct MonoArray * res;
  int len;
  int i;

  domain = mono_domain_get ();
  if (list == 0B) goto <D.24799>; else goto <D.24800>;
  <D.24799>:
  D.24801 = 0B;
  return D.24801;
  <D.24800>:
  D.24802 = monoeg_g_list_length (list);
  len = (int) D.24802;
  D.24803 = (long unsigned int) len;
  res = mono_array_new (domain, eclass, D.24803);
  i = 0;
  goto <D.23151>;
  <D.23150>:
  {
    void * * __p;

    D.24804 = (long unsigned int) i;
    __p = mono_array_addr_with_size (res, 8, D.24804);
    D.24805 = list->data;
    *__p = D.24805;
  }
  list = list->next;
  i = i + 1;
  <D.23151>:
  if (list != 0B) goto <D.23150>; else goto <D.23152>;
  <D.23152>:
  D.24801 = res;
  return D.24801;
}


build_native_trace ()
{
  struct MonoArray * D.24807;

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


__attribute__((__artificial__, __gnu_inline__, __always_inline__))
fprintf (struct FILE * restrict __stream, const char * restrict __fmt)
{
  int D.24809;

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


get_exception_catch_class (struct MonoJitExceptionInfo * ei, struct MonoJitInfo * ji, struct MonoContext * ctx)
{
  unsigned int D.24814;
  struct MonoClass * D.24815;
  long unsigned int D.24818;
  long unsigned int D.24819;
  struct MonoGenericJitInfo * D.24821;
  long unsigned int D.24822;
  long unsigned int D.24823;
  void * D.24824;
  struct MonoType * D.24825;
  struct MonoClass * catch_class;
  struct MonoType * inflated_type;
  struct MonoGenericContext context;

  try
    {
      catch_class = ei->data.catch_class;
      if (catch_class == 0B) goto <D.24811>; else goto <D.24813>;
      <D.24813>:
      D.24814 = ei->flags;
      if (D.24814 != 0) goto <D.24811>; else goto <D.24812>;
      <D.24811>:
      D.24815 = 0B;
      return D.24815;
      <D.24812>:
      D.24818 = BIT_FIELD_REF <*ji, 64, 256>;
      D.24819 = D.24818 & 70368744177664;
      if (D.24819 == 0) goto <D.24816>; else goto <D.24820>;
      <D.24820>:
      D.24821 = mono_jit_info_get_generic_jit_info (ji);
      D.24822 = BIT_FIELD_REF <*D.24821, 64, 192>;
      D.24823 = D.24822 & 8388608;
      if (D.24823 == 0) goto <D.24816>; else goto <D.24817>;
      <D.24816>:
      D.24815 = catch_class;
      return D.24815;
      <D.24817>:
      D.24824 = get_generic_info_from_stack_frame (ji, ctx);
      context = get_generic_context_from_stack_frame (ji, D.24824);
      D.24825 = &catch_class->byval_arg;
      inflated_type = mono_class_inflate_generic_type (D.24825, &context);
      catch_class = mono_class_from_mono_type (inflated_type);
      mono_metadata_free_type (inflated_type);
      D.24815 = catch_class;
      return D.24815;
    }
  finally
    {
      context = {CLOBBER};
    }
}


wrap_non_exception_throws (struct MonoMethod * m)
{
  struct MonoClass * D.24828;
  struct MonoImage * D.24829;
  _Bool D.24830;
  long int D.24831;
  long int D.24832;
  unsigned char D.24835;
  gboolean D.24838;
  unsigned char D.24839;
  struct MonoClass * klass.69;
  struct MonoClass * tmp_klass.67;
  struct MonoImage * D.24845;
  struct MonoClass * tmp_klass.68;
  _Bool D.24847;
  long int D.24848;
  long int D.24849;
  struct MonoMethod * D.24856;
  struct MonoClass * D.24858;
  struct MonoClass * klass.70;
  unsigned int D.24860;
  const mono_byte * p.71;
  const gchar * p.72;
  short unsigned int D.24863;
  short unsigned int D.24864;
  int D.24865;
  int D.24866;
  int D.24867;
  int D.24868;
  int D.24869;
  _Bool D.24870;
  long int D.24871;
  long int D.24872;
  const gchar * p.73;
  char D.24878;
  const gchar * p.74;
  unsigned int D.24882;
  int D.24883;
  long unsigned int D.24884;
  long unsigned int D.24885;
  sizetype D.24886;
  char * D.24887;
  const gchar * p.75;
  int D.24889;
  _Bool D.24890;
  long int D.24891;
  long int D.24892;
  int D.24895;
  unsigned char D.24896;
  struct MonoAssembly * ass;
  struct MonoCustomAttrInfo * attrs;
  static struct MonoClass * klass;
  int i;
  gboolean val;

  D.24828 = m->klass;
  D.24829 = D.24828->image;
  ass = D.24829->assembly;
  val = 0;
  D.24830 = ass == 0B;
  D.24831 = (long int) D.24830;
  D.24832 = __builtin_expect (D.24831, 0);
  if (D.24832 != 0) goto <D.24833>; else goto <D.24834>;
  <D.24833>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1196, "ass");
  <D.24834>:
  D.24835 = ass->wrap_non_exception_throws_inited;
  if (D.24835 != 0) goto <D.24836>; else goto <D.24837>;
  <D.24836>:
  D.24839 = ass->wrap_non_exception_throws;
  D.24838 = (gboolean) D.24839;
  return D.24838;
  <D.24837>:
  {
    static struct MonoClass * tmp_klass;

    {
      tmp_klass.67 = tmp_klass;
      if (tmp_klass.67 == 0B) goto <D.24841>; else goto <D.24842>;
      <D.24841>:
      if (0 != 0) goto <D.24843>; else goto <D.24844>;
      <D.24843>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1200, "mono_defaults.corlib == mono_defaults.corlib");
      <D.24844>:
      D.24845 = mono_defaults.corlib;
      tmp_klass.68 = mono_class_from_name (D.24845, "System.Runtime.CompilerServices", "RuntimeCompatibilityAttribute");
      tmp_klass = tmp_klass.68;
      tmp_klass.67 = tmp_klass;
      D.24847 = tmp_klass.67 == 0B;
      D.24848 = (long int) D.24847;
      D.24849 = __builtin_expect (D.24848, 0);
      if (D.24849 != 0) goto <D.24850>; else goto <D.24851>;
      <D.24850>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1200, "tmp_klass");
      <D.24851>:
      <D.24842>:
    }
    klass.69 = tmp_klass;
  }
  klass = klass.69;
  attrs = mono_custom_attrs_from_assembly (ass);
  if (attrs != 0B) goto <D.24852>; else goto <D.24853>;
  <D.24852>:
  i = 0;
  goto <D.23196>;
  <D.23195>:
  {
    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.24856 = attr->ctor;
        if (D.24856 == 0B) goto <D.24854>; else goto <D.24857>;
        <D.24857>:
        D.24856 = attr->ctor;
        D.24858 = D.24856->klass;
        klass.70 = klass;
        if (D.24858 != klass.70) goto <D.24854>; else goto <D.24855>;
        <D.24854>:
        // predicted unlikely by continue predictor.
        goto <D.23194>;
        <D.24855>:
        D.24860 = attr->data_size;
        len = (int) D.24860;
        p.71 = attr->data;
        p = p.71;
        p.72 = p;
        D.24863 = MEM[(const guint16 *)p.72];
        D.24864 = D.24863 >> 8;
        D.24865 = (int) D.24864;
        p.72 = p;
        D.24863 = MEM[(const guint16 *)p.72];
        D.24866 = (int) D.24863;
        D.24867 = D.24866 << 8;
        D.24868 = D.24867 & 65535;
        D.24869 = D.24865 | D.24868;
        D.24870 = D.24869 != 1;
        D.24871 = (long int) D.24870;
        D.24872 = __builtin_expect (D.24871, 0);
        if (D.24872 != 0) goto <D.24873>; else goto <D.24874>;
        <D.24873>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1215, "read16 (p) == 0x0001");
        <D.24874>:
        p.72 = p;
        p.73 = p.72 + 2;
        p = p.73;
        p.72 = p;
        D.24863 = MEM[(const guint16 *)p.72];
        D.24864 = D.24863 >> 8;
        D.24865 = (int) D.24864;
        p.72 = p;
        D.24863 = MEM[(const guint16 *)p.72];
        D.24866 = (int) D.24863;
        D.24867 = D.24866 << 8;
        D.24868 = D.24867 & 65535;
        num_named = D.24865 | D.24868;
        if (num_named != 1) goto <D.24876>; else goto <D.24877>;
        <D.24876>:
        // predicted unlikely by continue predictor.
        goto <D.23194>;
        <D.24877>:
        p.72 = p;
        p.73 = p.72 + 2;
        p = p.73;
        p.72 = p;
        D.24878 = *p.72;
        named_type = (int) D.24878;
        p.72 = p;
        p.74 = p.72 + 1;
        p = p.74;
        p.72 = p;
        D.24878 = *p.72;
        data_type = (int) D.24878;
        p.72 = p;
        p.74 = p.72 + 1;
        p = p.74;
        if (named_type != 84) goto <D.24880>; else goto <D.24881>;
        <D.24880>:
        // predicted unlikely by continue predictor.
        goto <D.23194>;
        <D.24881>:
        p.72 = p;
        D.24882 = mono_metadata_decode_blob_size (p.72, &p);
        name_len = (int) D.24882;
        D.24883 = name_len + 1;
        D.24884 = (long unsigned int) D.24883;
        name = monoeg_malloc (D.24884);
        p.72 = p;
        D.24885 = (long unsigned int) name_len;
        memcpy (name, p.72, D.24885);
        D.24886 = (sizetype) name_len;
        D.24887 = name + D.24886;
        *D.24887 = 0;
        p.72 = p;
        D.24886 = (sizetype) name_len;
        p.75 = p.72 + D.24886;
        p = p.75;
        D.24889 = strcmp (name, "WrapNonExceptionThrows");
        D.24890 = D.24889 != 0;
        D.24891 = (long int) D.24890;
        D.24892 = __builtin_expect (D.24891, 0);
        if (D.24892 != 0) goto <D.24893>; else goto <D.24894>;
        <D.24893>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 1233, "!strcmp (name, \"WrapNonExceptionThrows\")");
        <D.24894>:
        monoeg_g_free (name);
        p.72 = p;
        D.24878 = *p.72;
        val = (gboolean) D.24878;
      }
    finally
      {
        p = {CLOBBER};
      }
  }
  <D.23194>:
  i = i + 1;
  <D.23196>:
  D.24895 = attrs->num_attrs;
  if (D.24895 > i) goto <D.23195>; else goto <D.23197>;
  <D.23197>:
  mono_custom_attrs_free (attrs);
  <D.24853>:
  D.24896 = (unsigned char) val;
  ass->wrap_non_exception_throws = D.24896;
  mono_memory_barrier ();
  ass->wrap_non_exception_throws_inited = 1;
  D.24838 = val;
  return D.24838;
}


__attribute__((visibility ("hidden")))
mono_setup_altstack (struct MonoJitTlsData * tls)
{

}


__attribute__((visibility ("hidden")))
mono_free_altstack (struct MonoJitTlsData * tls)
{

}


__attribute__((visibility ("hidden")))
mono_altstack_restore_prot (mgreg_t * regs, guint8 * code, void * * tramp_data, guint8 * tramp)
{
  void * D.24900;
  void (*<T5d6>) (void) func;

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


__attribute__((visibility ("hidden")))
mono_handle_soft_stack_ovf (struct MonoJitTlsData * jit_tls, struct MonoJitInfo * ji, void * ctx, guint8 * fault_addr)
{
  unsigned int D.24902;
  void * D.24905;
  sizetype D.24908;
  guint8 * D.24909;
  int D.24912;
  int D.24913;
  unsigned int D.24914;
  int D.24915;
  unsigned int D.24916;
  sizetype D.24918;
  guint8 * D.24919;
  sizetype D.24920;
  void * D.24921;
  long unsigned int D.24922;
  struct _IO_FILE * stderr.76;
  void * D.24926;
  unsigned int D.24927;
  void * restore_stack_protection_tramp.77;
  gboolean D.24932;

  D.24902 = jit_tls->stack_ovf_guard_size;
  if (D.24902 != 0) goto <D.24903>; else goto <D.24904>;
  <D.24903>:
  D.24905 = jit_tls->stack_ovf_guard_base;
  if (D.24905 <= fault_addr) goto <D.24906>; else goto <D.24907>;
  <D.24906>:
  D.24905 = jit_tls->stack_ovf_guard_base;
  D.24902 = jit_tls->stack_ovf_guard_size;
  D.24908 = (sizetype) D.24902;
  D.24909 = D.24905 + D.24908;
  if (D.24909 > fault_addr) goto <D.24910>; else goto <D.24911>;
  <D.24910>:
  {
    guint32 guard_size;
    gboolean handled;

    handled = 0;
    D.24902 = jit_tls->stack_ovf_guard_size;
    D.24912 = mono_pagesize ();
    D.24913 = D.24912 * 2;
    D.24914 = (unsigned int) D.24913;
    guard_size = D.24902 - D.24914;
    goto <D.23364>;
    <D.23363>:
    D.24915 = mono_pagesize ();
    D.24916 = (unsigned int) D.24915;
    guard_size = guard_size - D.24916;
    <D.23364>:
    if (guard_size != 0) goto <D.24917>; else goto <D.23365>;
    <D.24917>:
    D.24905 = jit_tls->stack_ovf_guard_base;
    D.24918 = (sizetype) guard_size;
    D.24919 = D.24905 + D.24918;
    if (D.24919 > fault_addr) goto <D.23363>; else goto <D.23365>;
    <D.23365>:
    D.24902 = jit_tls->stack_ovf_guard_size;
    guard_size = D.24902 - guard_size;
    D.24905 = jit_tls->stack_ovf_guard_base;
    D.24902 = jit_tls->stack_ovf_guard_size;
    D.24908 = (sizetype) D.24902;
    D.24918 = (sizetype) guard_size;
    D.24920 = D.24908 - D.24918;
    D.24921 = D.24905 + D.24920;
    D.24922 = (long unsigned int) guard_size;
    mono_mprotect (D.24921, D.24922, 3);
    if (handled == 0) goto <D.24923>; else goto <D.24924>;
    <D.24923>:
    stderr.76 = stderr;
    D.24926 = mono_arch_ip_from_context (ctx);
    fprintf (stderr.76, "Stack overflow in unmanaged: IP: %p, fault addr: %p\n", D.24926, fault_addr);
    D.24927 = jit_tls->handling_stack_ovf;
    if (D.24927 == 0) goto <D.24928>; else goto <D.24929>;
    <D.24928>:
    restore_stack_protection_tramp.77 = restore_stack_protection_tramp;
    jit_tls->restore_stack_prot = restore_stack_protection_tramp.77;
    jit_tls->handling_stack_ovf = 1;
    goto <D.24931>;
    <D.24929>:
    <D.24931>:
    <D.24924>:
    D.24932 = 1;
    return D.24932;
  }
  <D.24911>:
  <D.24907>:
  <D.24904>:
  D.24932 = 0;
  return D.24932;
}


__attribute__((visibility ("hidden")))
mono_handle_hard_stack_ovf (struct MonoJitTlsData * jit_tls, struct MonoJitInfo * ji, void * ctx, guint8 * fault_addr)
{
  struct _IO_FILE * stderr.78;
  void * D.24935;
  struct PrintOverflowUserData ud;
  struct MonoContext mctx;

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


print_overflow_stack_frame (struct StackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  struct MonoJitInfo * D.24936;
  int D.24941;
  int D.24944;
  gboolean D.24945;
  struct MonoMethod * D.24946;
  int D.24949;
  unsigned int D.24950;
  struct MonoDomain * D.24951;
  struct _IO_FILE * stderr.79;
  struct MonoMethod * method;
  struct PrintOverflowUserData * user_data;
  gchar * location;

  method = 0B;
  user_data = data;
  D.24936 = frame->ji;
  if (D.24936 != 0B) goto <D.24937>; else goto <D.24938>;
  <D.24937>:
  D.24936 = frame->ji;
  method = jinfo_get_method (D.24936);
  <D.24938>:
  if (method != 0B) goto <D.24939>; else goto <D.24940>;
  <D.24939>:
  D.24941 = user_data->count;
  if (D.24941 == 0) goto <D.24942>; else goto <D.24943>;
  <D.24942>:
  D.24941 = user_data->count;
  D.24944 = D.24941 + 1;
  user_data->count = D.24944;
  D.24945 = 0;
  return D.24945;
  <D.24943>:
  D.24946 = user_data->omethod;
  if (D.24946 == method) goto <D.24947>; else goto <D.24948>;
  <D.24947>:
  D.24945 = 0;
  return D.24945;
  <D.24948>:
  D.24949 = frame->native_offset;
  D.24950 = (unsigned int) D.24949;
  D.24951 = mono_domain_get ();
  location = mono_debug_print_stack_frame (method, D.24950, D.24951);
  stderr.79 = stderr;
  fprintf (stderr.79, "  %s\n", location);
  monoeg_g_free (location);
  D.24941 = user_data->count;
  if (D.24941 == 1) goto <D.24953>; else goto <D.24954>;
  <D.24953>:
  stderr.79 = stderr;
  fprintf (stderr.79, "  <...>\n");
  user_data->omethod = method;
  goto <D.24955>;
  <D.24954>:
  user_data->omethod = 0B;
  <D.24955>:
  D.24941 = user_data->count;
  D.24944 = D.24941 + 1;
  user_data->count = D.24944;
  goto <D.24956>;
  <D.24940>:
  stderr.79 = stderr;
  D.24949 = frame->native_offset;
  fprintf (stderr.79, "  at <unknown> <0x%05x>\n", D.24949);
  <D.24956>:
  D.24945 = 0;
  return D.24945;
}


__attribute__((visibility ("hidden")))
mono_handle_native_sigsegv (int signal, void * ctx)
{
  unsigned int mono_jit_tls_id.80;
  const char * iftmp.81;
  int handling_sigsegv.82;
  struct MonoDebugOptions * D.24966;
  int D.24967;
  struct _IO_FILE * stderr.83;
  struct MonoInternalThread * D.24973;
  long unsigned int D.24976;
  long unsigned int D.24977;
  char * * D.24978;
  char * D.24979;
  struct MonoDebugOptions * D.24980;
  int D.24981;
  int D.24986;
  _Bool D.24987;
  long int D.24988;
  long int D.24989;
  struct sigaction sa;
  struct MonoJitTlsData * jit_tls;
  const char * signal_str;

  try
    {
      mono_jit_tls_id.80 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.80);
      if (signal == 11) goto <D.24960>; else goto <D.24961>;
      <D.24960>:
      iftmp.81 = "SIGSEGV";
      goto <D.24962>;
      <D.24961>:
      iftmp.81 = "SIGABRT";
      <D.24962>:
      signal_str = iftmp.81;
      handling_sigsegv.82 = handling_sigsegv;
      if (handling_sigsegv.82 != 0) goto <D.24964>; else goto <D.24965>;
      <D.24964>:
      return;
      <D.24965>:
      D.24966 = mini_get_debug_options ();
      D.24967 = D.24966->suspend_on_sigsegv;
      if (D.24967 != 0) goto <D.24968>; else goto <D.24969>;
      <D.24968>:
      stderr.83 = stderr;
      fprintf (stderr.83, "Received SIGSEGV, suspending...\n");
      <D.23409>:
      sleep (0);
      goto <D.23409>;
      <D.24969>:
      handling_sigsegv = 1;
      if (jit_tls != 0B) goto <D.24971>; else goto <D.24972>;
      <D.24971>:
      D.24973 = mono_thread_internal_current ();
      if (D.24973 != 0B) goto <D.24974>; else goto <D.24975>;
      <D.24974>:
      stderr.83 = stderr;
      fprintf (stderr.83, "Stacktrace:\n\n");
      mono_walk_stack (print_stack_frame_to_stderr, 1, 0B);
      <D.24975>:
      <D.24972>:
      {
        void * array[256];
        char * * names;
        int i;
        int size;

        try
          {
            stderr.83 = stderr;
            fprintf (stderr.83, "\nNative stacktrace:\n\n");
            size = backtrace (&array, 256);
            names = backtrace_symbols (&array, size);
            i = 0;
            goto <D.23415>;
            <D.23414>:
            stderr.83 = stderr;
            D.24976 = (long unsigned int) i;
            D.24977 = D.24976 * 8;
            D.24978 = names + D.24977;
            D.24979 = *D.24978;
            fprintf (stderr.83, "\t%s\n", D.24979);
            i = i + 1;
            <D.23415>:
            if (i < size) goto <D.23414>; else goto <D.23416>;
            <D.23416>:
            free (names);
            D.24980 = mini_get_debug_options ();
            D.24981 = D.24980->no_gdb_backtrace;
            if (D.24981 == 0) goto <D.24982>; else goto <D.24983>;
            <D.24982>:
            {
              pid_t pid;
              int status;
              pid_t crashed_pid;

              try
                {
                  crashed_pid = getpid ();
                  pid = mono_runtime_syscall_fork ();
                  if (pid == 0) goto <D.24984>; else goto <D.24985>;
                  <D.24984>:
                  dup2 (2, 1);
                  mono_gdb_render_native_backtraces (crashed_pid);
                  exit (1);
                  <D.24985>:
                  stderr.83 = stderr;
                  fprintf (stderr.83, "\nDebug info from gdb:\n\n");
                  waitpid (pid, &status, 0);
                }
              finally
                {
                  status = {CLOBBER};
                }
            }
            <D.24983>:
          }
        finally
          {
            array = {CLOBBER};
          }
      }
      stderr.83 = stderr;
      fprintf (stderr.83, "\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.24986 = sigaction (6, &sa, 0B);
      D.24987 = D.24986 == -1;
      D.24988 = (long int) D.24987;
      D.24989 = __builtin_expect (D.24988, 0);
      if (D.24989 != 0) goto <D.24990>; else goto <D.24991>;
      <D.24990>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 2327, "sigaction (SIGABRT, &sa, NULL) != -1");
      <D.24991>:
      abort ();
    }
  finally
    {
      sa = {CLOBBER};
    }
}


print_stack_frame_to_stderr (struct StackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  struct MonoJitInfo * D.24994;
  int D.24999;
  unsigned int D.25000;
  struct MonoDomain * D.25001;
  struct _IO_FILE * stderr.84;
  gboolean D.25004;
  struct MonoMethod * method;

  method = 0B;
  D.24994 = frame->ji;
  if (D.24994 != 0B) goto <D.24995>; else goto <D.24996>;
  <D.24995>:
  D.24994 = frame->ji;
  method = jinfo_get_method (D.24994);
  <D.24996>:
  if (method != 0B) goto <D.24997>; else goto <D.24998>;
  <D.24997>:
  {
    gchar * location;

    D.24999 = frame->native_offset;
    D.25000 = (unsigned int) D.24999;
    D.25001 = mono_domain_get ();
    location = mono_debug_print_stack_frame (method, D.25000, D.25001);
    stderr.84 = stderr;
    fprintf (stderr.84, "  %s\n", location);
    monoeg_g_free (location);
  }
  goto <D.25003>;
  <D.24998>:
  stderr.84 = stderr;
  D.24999 = frame->native_offset;
  fprintf (stderr.84, "  at <unknown> <0x%05x>\n", D.24999);
  <D.25003>:
  D.25004 = 0;
  return D.25004;
}


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.25006;
  unsigned int D.25009;
  long int D.25010;
  struct GError * error.85;
  _Bool D.25012;
  long int D.25013;
  long int D.25014;
  unsigned char D.25018;
  long unsigned int D.25022;
  void * D.25023;
  void * D.25029;
  long unsigned int D.25030;
  long unsigned int mono_print_thread_dump.86;
  struct _IO_FILE * stdout.87;
  char * D.25034;
  struct MonoInternalThread * thread;
  struct MonoContext ctx;
  struct GString * text;
  char * name;
  char * wapi_desc;
  struct GError * error;

  try
    {
      thread = mono_thread_internal_current ();
      text = monoeg_g_string_new (0B);
      error = 0B;
      D.25006 = thread->name;
      if (D.25006 != 0B) goto <D.25007>; else goto <D.25008>;
      <D.25007>:
      D.25006 = thread->name;
      D.25009 = thread->name_len;
      D.25010 = (long int) D.25009;
      name = monoeg_g_utf16_to_utf8 (D.25006, D.25010, 0B, 0B, &error);
      error.85 = error;
      D.25012 = error.85 != 0B;
      D.25013 = (long int) D.25012;
      D.25014 = __builtin_expect (D.25013, 0);
      if (D.25014 != 0) goto <D.25015>; else goto <D.25016>;
      <D.25015>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mini-exceptions.c", 2352, "!error");
      <D.25016>:
      monoeg_g_string_append_printf (text, "\n\"%s\"", name);
      monoeg_g_free (name);
      goto <D.25017>;
      <D.25008>:
      D.25018 = thread->threadpool_thread;
      if (D.25018 != 0) goto <D.25019>; else goto <D.25020>;
      <D.25019>:
      monoeg_g_string_append (text, "\n\"<threadpool thread>\"");
      goto <D.25021>;
      <D.25020>:
      monoeg_g_string_append (text, "\n\"<unnamed thread>\"");
      <D.25021>:
      <D.25017>:
      wapi_desc = wapi_current_thread_desc ();
      D.25022 = thread->tid;
      D.25023 = (void *) D.25022;
      monoeg_g_string_append_printf (text, " tid=0x%p this=0x%p %s\n", D.25023, thread, wapi_desc);
      free (wapi_desc);
      if (start_ctx != 0B) goto <D.25024>; else goto <D.25025>;
      <D.25024>:
      memcpy (&ctx, start_ctx, 512);
      goto <D.25026>;
      <D.25025>:
      if (sigctx == 0B) goto <D.25027>; else goto <D.25028>;
      <D.25027>:
      {
        struct MonoS390StackFrame * sframe;

        __asm__ __volatile__("lgr   %0,15" : "=r" sframe);
        D.25029 = sframe->prev;
        D.25030 = (long unsigned int) D.25029;
        ctx.uc_mcontext.gregs[15] = D.25030;
        D.25029 = sframe->prev;
        ctx.uc_stack.ss_sp = D.25029;
        D.25029 = sframe->prev;
        D.25030 = (long unsigned int) D.25029;
        ctx.uc_mcontext.gregs[15] = D.25030;
        D.25029 = sframe->prev;
        ctx.uc_stack.ss_sp = D.25029;
        mono_print_thread_dump.86 = (long unsigned int) mono_print_thread_dump;
        ctx.uc_mcontext.gregs[14] = mono_print_thread_dump.86;
        mono_print_thread_dump.86 = (long unsigned int) mono_print_thread_dump;
        ctx.uc_mcontext.psw.addr = mono_print_thread_dump.86;
      }
      goto <D.25032>;
      <D.25028>:
      mono_arch_sigctx_to_monoctx (sigctx, &ctx);
      <D.25032>:
      <D.25026>:
      mono_walk_stack_with_ctx (print_stack_frame_to_string, &ctx, 3, text);
      stdout.87 = stdout;
      D.25034 = text->str;
      fprintf (stdout.87, "%s\n", D.25034);
      monoeg_g_string_free (text, 1);
      stdout.87 = stdout;
      fflush (stdout.87);
    }
  finally
    {
      ctx = {CLOBBER};
      error = {CLOBBER};
    }
}


__attribute__((__unused__))
print_stack_frame_to_string (struct StackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  struct MonoJitInfo * D.25035;
  int D.25040;
  unsigned int D.25041;
  struct MonoDomain * D.25042;
  gboolean D.25044;
  struct GString * p;
  struct MonoMethod * method;

  p = data;
  method = 0B;
  D.25035 = frame->ji;
  if (D.25035 != 0B) goto <D.25036>; else goto <D.25037>;
  <D.25036>:
  D.25035 = frame->ji;
  method = jinfo_get_method (D.25035);
  <D.25037>:
  if (method != 0B) goto <D.25038>; else goto <D.25039>;
  <D.25038>:
  {
    gchar * location;

    D.25040 = frame->native_offset;
    D.25041 = (unsigned int) D.25040;
    D.25042 = mono_domain_get ();
    location = mono_debug_print_stack_frame (method, D.25041, D.25042);
    monoeg_g_string_append_printf (p, "  %s\n", location);
    monoeg_g_free (location);
  }
  goto <D.25043>;
  <D.25039>:
  D.25040 = frame->native_offset;
  monoeg_g_string_append_printf (p, "  at <unknown> <0x%05x>\n", D.25040);
  <D.25043>:
  D.25044 = 0;
  return D.25044;
}


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


__attribute__((visibility ("hidden")))
mono_resume_unwind (struct MonoContext * ctx)
{
  unsigned int mono_jit_tls_id.88;
  long unsigned int D.25047;
  long unsigned int D.25048;
  void * D.25049;
  void * D.25050;
  struct MonoJitTlsData * jit_tls;
  struct MonoContext new_ctx;

  try
    {
      mono_jit_tls_id.88 = mono_jit_tls_id;
      jit_tls = pthread_getspecific (mono_jit_tls_id.88);
      D.25047 = jit_tls->resume_state.ctx.uc_mcontext.psw.addr;
      ctx->uc_mcontext.gregs[14] = D.25047;
      D.25047 = jit_tls->resume_state.ctx.uc_mcontext.psw.addr;
      ctx->uc_mcontext.psw.addr = D.25047;
      D.25048 = jit_tls->resume_state.ctx.uc_mcontext.gregs[15];
      ctx->uc_mcontext.gregs[15] = D.25048;
      D.25048 = jit_tls->resume_state.ctx.uc_mcontext.gregs[15];
      D.25049 = (void *) D.25048;
      ctx->uc_stack.ss_sp = D.25049;
      new_ctx = *ctx;
      D.25050 = jit_tls->resume_state.ex_obj;
      mono_handle_exception_internal (&new_ctx, D.25050, 1, 0B);
      mono_restore_context (&new_ctx);
    }
  finally
    {
      new_ctx = {CLOBBER};
    }
}


__attribute__((visibility ("hidden")))
mono_install_handler_block_guard (struct MonoThreadUnwindState * ctx)
{
  gboolean D.25051;

  D.25051 = 0;
  return D.25051;
}


__attribute__((visibility ("hidden")))
mono_set_cast_details (struct MonoClass * from, struct MonoClass * to)
{
  struct MonoDebugOptions * D.25053;
  int D.25054;
  unsigned int mono_jit_tls_id.89;
  struct MonoJitTlsData * jit_tls;

  jit_tls = 0B;
  D.25053 = mini_get_debug_options ();
  D.25054 = D.25053->better_cast_details;
  if (D.25054 != 0) goto <D.25055>; else goto <D.25056>;
  <D.25055>:
  mono_jit_tls_id.89 = mono_jit_tls_id;
  jit_tls = pthread_getspecific (mono_jit_tls_id.89);
  jit_tls->class_cast_from = from;
  jit_tls->class_cast_to = to;
  <D.25056>:
}


__attribute__((visibility ("hidden")))
mono_thread_state_init_from_sigctx (struct MonoThreadUnwindState * ctx, void * sigctx)
{
  void * D.25061;
  gboolean D.25062;
  struct MonoContext * D.25065;
  long unsigned int * D.25067;
  struct MonoDomain * D.25068;
  struct MonoLMF * D.25069;
  struct MonoInternalThread * thread;

  thread = mono_thread_internal_current ();
  if (thread == 0B) goto <D.25058>; else goto <D.25060>;
  <D.25060>:
  D.25061 = thread->jit_data;
  if (D.25061 == 0B) goto <D.25058>; else goto <D.25059>;
  <D.25058>:
  ctx->valid = 0;
  D.25062 = 0;
  return D.25062;
  <D.25059>:
  if (sigctx != 0B) goto <D.25063>; else goto <D.25064>;
  <D.25063>:
  D.25065 = &ctx->ctx;
  mono_arch_sigctx_to_monoctx (sigctx, D.25065);
  goto <D.25066>;
  <D.25064>:
  D.25067 = &ctx->ctx.uc_mcontext.gregs[0];
  __asm__ __volatile__("stmg	%%r0,%%r15,0(%0)
" :  : "r" D.25067 : "memory");
  <D.25066>:
  D.25068 = mono_domain_get ();
  ctx->unwind_data[0] = D.25068;
  D.25069 = mono_get_lmf ();
  ctx->unwind_data[1] = D.25069;
  D.25061 = thread->jit_data;
  ctx->unwind_data[2] = D.25061;
  ctx->valid = 1;
  D.25062 = 1;
  return D.25062;
}


__attribute__((visibility ("hidden")))
mono_thread_state_init_from_monoctx (struct MonoThreadUnwindState * ctx, struct MonoContext * mctx)
{
  void * D.25074;
  gboolean D.25075;
  struct MonoDomain * D.25076;
  struct MonoLMF * D.25077;
  struct MonoInternalThread * thread;

  thread = mono_thread_internal_current ();
  if (thread == 0B) goto <D.25071>; else goto <D.25073>;
  <D.25073>:
  D.25074 = thread->jit_data;
  if (D.25074 == 0B) goto <D.25071>; else goto <D.25072>;
  <D.25071>:
  ctx->valid = 0;
  D.25075 = 0;
  return D.25075;
  <D.25072>:
  ctx->ctx = *mctx;
  D.25076 = mono_domain_get ();
  ctx->unwind_data[0] = D.25076;
  D.25077 = mono_get_lmf ();
  ctx->unwind_data[1] = D.25077;
  D.25074 = thread->jit_data;
  ctx->unwind_data[2] = D.25074;
  ctx->valid = 1;
  D.25075 = 1;
  return D.25075;
}


__attribute__((visibility ("hidden")))
mono_thread_state_init_from_current (struct MonoThreadUnwindState * ctx)
{
  void * D.25082;
  gboolean D.25083;
  void * D.25084;
  long unsigned int D.25085;
  long unsigned int mono_thread_state_init_from_current.90;
  struct MonoDomain * D.25087;
  struct MonoLMF * D.25088;
  struct MonoInternalThread * thread;

  thread = mono_thread_internal_current ();
  mono_arch_flush_register_windows ();
  if (thread == 0B) goto <D.25079>; else goto <D.25081>;
  <D.25081>:
  D.25082 = thread->jit_data;
  if (D.25082 == 0B) goto <D.25079>; else goto <D.25080>;
  <D.25079>:
  ctx->valid = 0;
  D.25083 = 0;
  return D.25083;
  <D.25080>:
  {
    struct MonoS390StackFrame * sframe;

    __asm__ __volatile__("lgr   %0,15" : "=r" sframe);
    D.25084 = sframe->prev;
    D.25085 = (long unsigned int) D.25084;
    ctx->ctx.uc_mcontext.gregs[15] = D.25085;
    D.25084 = sframe->prev;
    ctx->ctx.uc_stack.ss_sp = D.25084;
    D.25084 = sframe->prev;
    D.25085 = (long unsigned int) D.25084;
    ctx->ctx.uc_mcontext.gregs[15] = D.25085;
    D.25084 = sframe->prev;
    ctx->ctx.uc_stack.ss_sp = D.25084;
    mono_thread_state_init_from_current.90 = (long unsigned int) mono_thread_state_init_from_current;
    ctx->ctx.uc_mcontext.gregs[14] = mono_thread_state_init_from_current.90;
    mono_thread_state_init_from_current.90 = (long unsigned int) mono_thread_state_init_from_current;
    ctx->ctx.uc_mcontext.psw.addr = mono_thread_state_init_from_current.90;
  }
  D.25087 = mono_domain_get ();
  ctx->unwind_data[0] = D.25087;
  D.25088 = mono_get_lmf ();
  ctx->unwind_data[1] = D.25088;
  D.25082 = thread->jit_data;
  ctx->unwind_data[2] = D.25082;
  ctx->valid = 1;
  D.25083 = 1;
  return D.25083;
}


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


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 (*<T3ab6>) (struct MonoObject *, void *) unhandled_exception_hook.91;
  void * unhandled_exception_hook_data.92;
  struct MonoObject * other.93;
  struct _IO_FILE * stderr.94;
  int D.25103;

  unhandled_exception_hook.91 = unhandled_exception_hook;
  if (unhandled_exception_hook.91 != 0B) goto <D.25091>; else goto <D.25092>;
  <D.25091>:
  unhandled_exception_hook.91 = unhandled_exception_hook;
  unhandled_exception_hook_data.92 = unhandled_exception_hook_data;
  unhandled_exception_hook.91 (exc, unhandled_exception_hook_data.92);
  goto <D.25094>;
  <D.25092>:
  {
    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.25095>; else goto <D.25096>;
        <D.25095>:
        msg = mono_string_to_utf8 (str);
        goto <D.25097>;
        <D.25096>:
        other.93 = other;
        if (other.93 != 0B) goto <D.25099>; else goto <D.25100>;
        <D.25099>:
        {
          char * original_backtrace;
          char * nested_backtrace;

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


__attribute__((visibility ("hidden")))
mono_restore_context (struct MonoContext * ctx)
{
  void (*<T3f08>) (struct MonoContext *) restore_context.95;
  void * D.25107;
  void (*<T3f08>) (struct MonoContext *) restore_context.96;
  static void (*<T3f08>) (struct MonoContext *) restore_context;

  restore_context.95 = restore_context;
  if (restore_context.95 == 0B) goto <D.25105>; else goto <D.25106>;
  <D.25105>:
  D.25107 = mono_get_restore_context ();
  restore_context.96 = (void (*<T3f08>) (struct MonoContext *)) D.25107;
  restore_context = restore_context.96;
  <D.25106>:
  restore_context.95 = restore_context;
  restore_context.95 (ctx);
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "mini-exceptions.c", 2709);
}


