mono_exception_from_name (struct MonoImage * image, const char * name_space, const char * name)
{
  struct MonoException * D.18615;
  struct MonoDomain * D.18616;

  D.18616 = mono_domain_get ();
  D.18615 = mono_exception_from_name_domain (D.18616, image, name_space, name);
  return D.18615;
}


mono_exception_from_name_domain (struct MonoDomain * domain, struct MonoImage * image, const char * name_space, const char * name)
{
  _Bool D.18618;
  long int D.18619;
  long int D.18620;
  struct MonoException * D.18627;
  struct MonoClass * klass;
  struct MonoObject * o;
  struct MonoDomain * caller_domain;

  caller_domain = mono_domain_get ();
  klass = mono_class_from_name (image, name_space, name);
  o = mono_object_new (domain, klass);
  D.18618 = o == 0B;
  D.18619 = (long int) D.18618;
  D.18620 = __builtin_expect (D.18619, 0);
  if (D.18620 != 0) goto <D.18621>; else goto <D.18622>;
  <D.18621>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 66, "o != NULL");
  <D.18622>:
  if (domain != caller_domain) goto <D.18623>; else goto <D.18624>;
  <D.18623>:
  mono_domain_set_internal (domain);
  <D.18624>:
  mono_runtime_object_init (o);
  if (domain != caller_domain) goto <D.18625>; else goto <D.18626>;
  <D.18625>:
  mono_domain_set_internal (caller_domain);
  <D.18626>:
  D.18627 = o;
  return D.18627;
}


mono_exception_from_token (struct MonoImage * image, guint32 token)
{
  struct MonoDomain * D.18629;
  _Bool D.18630;
  long int D.18631;
  long int D.18632;
  struct MonoException * D.18635;
  struct MonoClass * klass;
  struct MonoObject * o;

  klass = mono_class_get (image, token);
  D.18629 = mono_domain_get ();
  o = mono_object_new (D.18629, klass);
  D.18630 = o == 0B;
  D.18631 = (long int) D.18630;
  D.18632 = __builtin_expect (D.18631, 0);
  if (D.18632 != 0) goto <D.18633>; else goto <D.18634>;
  <D.18633>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 96, "o != NULL");
  <D.18634>:
  mono_runtime_object_init (o);
  D.18635 = o;
  return D.18635;
}


mono_exception_from_name_two_strings (struct MonoImage * image, const char * name_space, const char * name, struct MonoString * a1, struct MonoString * a2)
{
  struct MonoException * D.18637;
  struct MonoClass * klass;

  klass = mono_class_from_name (image, name_space, name);
  D.18637 = create_exception_two_strings (klass, a1, a2);
  return D.18637;
}


create_exception_two_strings (struct MonoClass * klass, struct MonoString * a1, struct MonoString * a2)
{
  int D.18387;
  int iftmp.0;
  int D.18383;
  const char[6] * D.18644;
  unsigned char D.18645;
  int D.18646;
  unsigned char D.18647;
  int D.18648;
  _Bool D.18649;
  _Bool D.18650;
  _Bool D.18651;
  const unsigned char * D.18654;
  unsigned char D.18655;
  int D.18656;
  const unsigned char * D.18657;
  unsigned char D.18658;
  int D.18659;
  _Bool D.18660;
  _Bool D.18661;
  const unsigned char * D.18664;
  unsigned char D.18665;
  int D.18666;
  const unsigned char * D.18667;
  unsigned char D.18668;
  int D.18669;
  _Bool D.18670;
  _Bool D.18671;
  const unsigned char * D.18674;
  unsigned char D.18675;
  int D.18676;
  const unsigned char * D.18677;
  unsigned char D.18678;
  int D.18679;
  const char * D.18681;
  short unsigned int D.18684;
  int D.18685;
  struct MonoType * D.18688;
  unsigned char D.18689;
  struct MonoType * D.18694;
  unsigned char D.18695;
  struct MonoException * D.18698;
  struct MonoDomain * domain;
  struct MonoMethod * method;
  struct MonoObject * o;
  int count;
  void * args[2];
  void * iter;
  struct MonoMethod * m;

  try
    {
      domain = mono_domain_get ();
      method = 0B;
      count = 1;
      if (a2 != 0B) goto <D.18639>; else goto <D.18640>;
      <D.18639>:
      count = count + 1;
      <D.18640>:
      o = mono_object_new (domain, klass);
      iter = 0B;
      goto <D.18388>;
      <D.18390>:
      {
        struct MonoMethodSignature * sig;

        {
          size_t __s1_len;
          size_t __s2_len;

          __s1_len = 5;
          if (__s1_len <= 3) goto <D.18642>; else goto <D.18643>;
          <D.18642>:
          {
            const unsigned char * __s2;
            int __result;

            __s2 = mono_method_get_name (m);
            D.18644 = ".ctor";
            D.18645 = MEM[(const unsigned char *)D.18644];
            D.18646 = (int) D.18645;
            D.18647 = *__s2;
            D.18648 = (int) D.18647;
            __result = D.18646 - D.18648;
            {
              D.18649 = __s1_len != 0;
              D.18650 = __result == 0;
              D.18651 = D.18649 & D.18650;
              if (D.18651 != 0) goto <D.18652>; else goto <D.18653>;
              <D.18652>:
              D.18654 = &MEM[(void *)".ctor" + 1B];
              D.18655 = *D.18654;
              D.18656 = (int) D.18655;
              D.18657 = __s2 + 1;
              D.18658 = *D.18657;
              D.18659 = (int) D.18658;
              __result = D.18656 - D.18659;
              D.18660 = __s1_len > 1;
              D.18650 = __result == 0;
              D.18661 = D.18660 & D.18650;
              if (D.18661 != 0) goto <D.18662>; else goto <D.18663>;
              <D.18662>:
              D.18664 = &MEM[(void *)".ctor" + 2B];
              D.18665 = *D.18664;
              D.18666 = (int) D.18665;
              D.18667 = __s2 + 2;
              D.18668 = *D.18667;
              D.18669 = (int) D.18668;
              __result = D.18666 - D.18669;
              D.18670 = __s1_len > 2;
              D.18650 = __result == 0;
              D.18671 = D.18670 & D.18650;
              if (D.18671 != 0) goto <D.18672>; else goto <D.18673>;
              <D.18672>:
              D.18674 = &MEM[(void *)".ctor" + 3B];
              D.18675 = *D.18674;
              D.18676 = (int) D.18675;
              D.18677 = __s2 + 3;
              D.18678 = *D.18677;
              D.18679 = (int) D.18678;
              __result = D.18676 - D.18679;
              <D.18673>:
              <D.18663>:
              <D.18653>:
            }
            D.18383 = __result;
          }
          iftmp.0 = D.18383;
          goto <D.18680>;
          <D.18643>:
          D.18681 = mono_method_get_name (m);
          iftmp.0 = __builtin_strcmp (".ctor", D.18681);
          <D.18680>:
          D.18387 = iftmp.0;
        }
        if (D.18387 != 0) goto <D.18682>; else goto <D.18683>;
        <D.18682>:
        // predicted unlikely by continue predictor.
        goto <D.18388>;
        <D.18683>:
        sig = mono_method_signature (m);
        D.18684 = sig->param_count;
        D.18685 = (int) D.18684;
        if (D.18685 != count) goto <D.18686>; else goto <D.18687>;
        <D.18686>:
        // predicted unlikely by continue predictor.
        goto <D.18388>;
        <D.18687>:
        D.18688 = sig->params[0];
        D.18689 = D.18688->type;
        if (D.18689 != 14) goto <D.18690>; else goto <D.18691>;
        <D.18690>:
        // predicted unlikely by continue predictor.
        goto <D.18388>;
        <D.18691>:
        if (count == 2) goto <D.18692>; else goto <D.18693>;
        <D.18692>:
        D.18694 = sig->params[1];
        D.18695 = D.18694->type;
        if (D.18695 != 14) goto <D.18696>; else goto <D.18697>;
        <D.18696>:
        // predicted unlikely by continue predictor.
        goto <D.18388>;
        <D.18697>:
        <D.18693>:
        method = m;
        goto <D.18389>;
      }
      <D.18388>:
      m = mono_class_get_methods (klass, &iter);
      if (m != 0B) goto <D.18390>; else goto <D.18389>;
      <D.18389>:
      args[0] = a1;
      args[1] = a2;
      mono_runtime_invoke (method, o, &args, 0B);
      D.18698 = o;
      return D.18698;
    }
  finally
    {
      args = {CLOBBER};
      iter = {CLOBBER};
    }
}


mono_exception_from_name_msg (struct MonoImage * image, const char * name_space, const char * name, const char * msg)
{
  struct MonoString * * D.18703;
  struct MonoDomain * D.18704;
  struct MonoString * D.18705;
  struct MonoException * D.18706;
  struct MonoException * ex;

  ex = mono_exception_from_name (image, name_space, name);
  if (msg != 0B) goto <D.18701>; else goto <D.18702>;
  <D.18701>:
  D.18703 = &ex->message;
  D.18704 = mono_object_get_domain (ex);
  D.18705 = mono_string_new (D.18704, msg);
  mono_gc_wbarrier_set_field (ex, D.18703, D.18705);
  <D.18702>:
  D.18706 = ex;
  return D.18706;
}


mono_exception_from_token_two_strings (struct MonoImage * image, guint32 token, struct MonoString * a1, struct MonoString * a2)
{
  struct MonoException * D.18708;
  struct MonoClass * klass;

  klass = mono_class_get (image, token);
  D.18708 = create_exception_two_strings (klass, a1, a2);
  return D.18708;
}


mono_get_exception_divide_by_zero ()
{
  struct MonoException * D.18710;
  struct MonoImage * D.18711;

  D.18711 = mono_get_corlib ();
  D.18710 = mono_exception_from_name (D.18711, "System", "DivideByZeroException");
  return D.18710;
}


mono_get_exception_security ()
{
  struct MonoException * D.18713;
  struct MonoImage * D.18714;

  D.18714 = mono_get_corlib ();
  D.18713 = mono_exception_from_name (D.18714, "System.Security", "SecurityException");
  return D.18713;
}


mono_get_exception_thread_abort ()
{
  struct MonoException * D.18716;
  struct MonoImage * D.18717;

  D.18717 = mono_get_corlib ();
  D.18716 = mono_exception_from_name (D.18717, "System.Threading", "ThreadAbortException");
  return D.18716;
}


mono_get_exception_thread_interrupted ()
{
  struct MonoException * D.18719;
  struct MonoImage * D.18720;

  D.18720 = mono_get_corlib ();
  D.18719 = mono_exception_from_name (D.18720, "System.Threading", "ThreadInterruptedException");
  return D.18719;
}


mono_get_exception_arithmetic ()
{
  struct MonoException * D.18722;
  struct MonoImage * D.18723;

  D.18723 = mono_get_corlib ();
  D.18722 = mono_exception_from_name (D.18723, "System", "ArithmeticException");
  return D.18722;
}


mono_get_exception_overflow ()
{
  struct MonoException * D.18725;
  struct MonoImage * D.18726;

  D.18726 = mono_get_corlib ();
  D.18725 = mono_exception_from_name (D.18726, "System", "OverflowException");
  return D.18725;
}


mono_get_exception_null_reference ()
{
  struct MonoException * D.18728;
  struct MonoImage * D.18729;

  D.18729 = mono_get_corlib ();
  D.18728 = mono_exception_from_name (D.18729, "System", "NullReferenceException");
  return D.18728;
}


mono_get_exception_execution_engine (const char * msg)
{
  struct MonoException * D.18731;
  struct MonoImage * D.18732;

  D.18732 = mono_get_corlib ();
  D.18731 = mono_exception_from_name_msg (D.18732, "System", "ExecutionEngineException", msg);
  return D.18731;
}


mono_get_exception_serialization (const char * msg)
{
  struct MonoException * D.18734;
  struct MonoImage * D.18735;

  D.18735 = mono_get_corlib ();
  D.18734 = mono_exception_from_name_msg (D.18735, "System.Runtime.Serialization", "SerializationException", msg);
  return D.18734;
}


mono_get_exception_invalid_cast ()
{
  struct MonoException * D.18737;
  struct MonoImage * D.18738;

  D.18738 = mono_get_corlib ();
  D.18737 = mono_exception_from_name (D.18738, "System", "InvalidCastException");
  return D.18737;
}


mono_get_exception_invalid_operation (const char * msg)
{
  struct MonoException * D.18740;
  struct MonoImage * D.18741;

  D.18741 = mono_get_corlib ();
  D.18740 = mono_exception_from_name_msg (D.18741, "System", "InvalidOperationException", msg);
  return D.18740;
}


mono_get_exception_index_out_of_range ()
{
  struct MonoException * D.18743;
  struct MonoImage * D.18744;

  D.18744 = mono_get_corlib ();
  D.18743 = mono_exception_from_name (D.18744, "System", "IndexOutOfRangeException");
  return D.18743;
}


mono_get_exception_array_type_mismatch ()
{
  struct MonoException * D.18746;
  struct MonoImage * D.18747;

  D.18747 = mono_get_corlib ();
  D.18746 = mono_exception_from_name (D.18747, "System", "ArrayTypeMismatchException");
  return D.18746;
}


mono_get_exception_type_load (struct MonoString * class_name, char * assembly_name)
{
  struct MonoString * iftmp.1;
  struct MonoDomain * D.18752;
  struct MonoDomain * D.18754;
  struct MonoException * D.18755;
  struct MonoImage * D.18756;
  struct MonoString * s;

  if (assembly_name != 0B) goto <D.18750>; else goto <D.18751>;
  <D.18750>:
  D.18752 = mono_domain_get ();
  iftmp.1 = mono_string_new (D.18752, assembly_name);
  goto <D.18753>;
  <D.18751>:
  D.18754 = mono_domain_get ();
  iftmp.1 = mono_string_new (D.18754, "");
  <D.18753>:
  s = iftmp.1;
  D.18756 = mono_get_corlib ();
  D.18755 = mono_exception_from_name_two_strings (D.18756, "System", "TypeLoadException", class_name, s);
  return D.18755;
}


mono_get_exception_not_implemented (const char * msg)
{
  struct MonoException * D.18758;
  struct MonoImage * D.18759;

  D.18759 = mono_get_corlib ();
  D.18758 = mono_exception_from_name_msg (D.18759, "System", "NotImplementedException", msg);
  return D.18758;
}


mono_get_exception_not_supported (const char * msg)
{
  struct MonoException * D.18761;
  struct MonoImage * D.18762;

  D.18762 = mono_get_corlib ();
  D.18761 = mono_exception_from_name_msg (D.18762, "System", "NotSupportedException", msg);
  return D.18761;
}


mono_get_exception_missing_method (const char * class_name, const char * member_name)
{
  struct MonoDomain * D.18764;
  struct MonoDomain * D.18765;
  struct MonoException * D.18766;
  struct MonoImage * D.18767;
  struct MonoString * s1;
  struct MonoString * s2;

  D.18764 = mono_domain_get ();
  s1 = mono_string_new (D.18764, class_name);
  D.18765 = mono_domain_get ();
  s2 = mono_string_new (D.18765, member_name);
  D.18767 = mono_get_corlib ();
  D.18766 = mono_exception_from_name_two_strings (D.18767, "System", "MissingMethodException", s1, s2);
  return D.18766;
}


mono_get_exception_missing_field (const char * class_name, const char * member_name)
{
  struct MonoDomain * D.18769;
  struct MonoDomain * D.18770;
  struct MonoException * D.18771;
  struct MonoImage * D.18772;
  struct MonoString * s1;
  struct MonoString * s2;

  D.18769 = mono_domain_get ();
  s1 = mono_string_new (D.18769, class_name);
  D.18770 = mono_domain_get ();
  s2 = mono_string_new (D.18770, member_name);
  D.18772 = mono_get_corlib ();
  D.18771 = mono_exception_from_name_two_strings (D.18772, "System", "MissingFieldException", s1, s2);
  return D.18771;
}


mono_get_exception_argument_null (const char * arg)
{
  struct MonoImage * D.18774;
  struct MonoString * * D.18777;
  struct MonoDomain * D.18778;
  struct MonoString * D.18779;
  struct MonoException * D.18780;
  struct MonoException * ex;

  D.18774 = mono_get_corlib ();
  ex = mono_exception_from_name (D.18774, "System", "ArgumentNullException");
  if (arg != 0B) goto <D.18775>; else goto <D.18776>;
  <D.18775>:
  {
    struct MonoArgumentException * argex;

    argex = ex;
    D.18777 = &argex->param_name;
    D.18778 = mono_object_get_domain (ex);
    D.18779 = mono_string_new (D.18778, arg);
    mono_gc_wbarrier_set_field (argex, D.18777, D.18779);
  }
  <D.18776>:
  D.18780 = ex;
  return D.18780;
}


mono_get_exception_argument (const char * arg, const char * msg)
{
  struct MonoImage * D.18782;
  struct MonoString * * D.18785;
  struct MonoDomain * D.18786;
  struct MonoString * D.18787;
  struct MonoException * D.18788;
  struct MonoException * ex;

  D.18782 = mono_get_corlib ();
  ex = mono_exception_from_name_msg (D.18782, "System", "ArgumentException", msg);
  if (arg != 0B) goto <D.18783>; else goto <D.18784>;
  <D.18783>:
  {
    struct MonoArgumentException * argex;

    argex = ex;
    D.18785 = &argex->param_name;
    D.18786 = mono_object_get_domain (ex);
    D.18787 = mono_string_new (D.18786, arg);
    mono_gc_wbarrier_set_field (argex, D.18785, D.18787);
  }
  <D.18784>:
  D.18788 = ex;
  return D.18788;
}


mono_get_exception_argument_out_of_range (const char * arg)
{
  struct MonoImage * D.18790;
  struct MonoString * * D.18793;
  struct MonoDomain * D.18794;
  struct MonoString * D.18795;
  struct MonoException * D.18796;
  struct MonoException * ex;

  D.18790 = mono_get_corlib ();
  ex = mono_exception_from_name (D.18790, "System", "ArgumentOutOfRangeException");
  if (arg != 0B) goto <D.18791>; else goto <D.18792>;
  <D.18791>:
  {
    struct MonoArgumentException * argex;

    argex = ex;
    D.18793 = &argex->param_name;
    D.18794 = mono_object_get_domain (ex);
    D.18795 = mono_string_new (D.18794, arg);
    mono_gc_wbarrier_set_field (argex, D.18793, D.18795);
  }
  <D.18792>:
  D.18796 = ex;
  return D.18796;
}


mono_get_exception_thread_state (const char * msg)
{
  struct MonoException * D.18798;
  struct MonoImage * D.18799;

  D.18799 = mono_get_corlib ();
  D.18798 = mono_exception_from_name_msg (D.18799, "System.Threading", "ThreadStateException", msg);
  return D.18798;
}


mono_get_exception_io (const char * msg)
{
  struct MonoException * D.18801;
  struct MonoImage * D.18802;

  D.18802 = mono_get_corlib ();
  D.18801 = mono_exception_from_name_msg (D.18802, "System.IO", "IOException", msg);
  return D.18801;
}


mono_get_exception_file_not_found (struct MonoString * fname)
{
  struct MonoException * D.18804;
  struct MonoImage * D.18805;

  D.18805 = mono_get_corlib ();
  D.18804 = mono_exception_from_name_two_strings (D.18805, "System.IO", "FileNotFoundException", fname, fname);
  return D.18804;
}


mono_get_exception_file_not_found2 (const char * msg, struct MonoString * fname)
{
  struct MonoString * iftmp.2;
  struct MonoDomain * D.18810;
  struct MonoException * D.18812;
  struct MonoImage * D.18813;
  struct MonoString * s;

  if (msg != 0B) goto <D.18808>; else goto <D.18809>;
  <D.18808>:
  D.18810 = mono_domain_get ();
  iftmp.2 = mono_string_new (D.18810, msg);
  goto <D.18811>;
  <D.18809>:
  iftmp.2 = 0B;
  <D.18811>:
  s = iftmp.2;
  D.18813 = mono_get_corlib ();
  D.18812 = mono_exception_from_name_two_strings (D.18813, "System.IO", "FileNotFoundException", s, fname);
  return D.18812;
}


mono_get_exception_type_initialization (const gchar * type_name, struct MonoException * inner)
{
  struct MonoImage * D.18815;
  _Bool D.18816;
  long int D.18817;
  long int D.18818;
  int D.18512;
  int iftmp.3;
  int D.18508;
  const char[6] * D.18824;
  unsigned char D.18825;
  int D.18826;
  unsigned char D.18827;
  int D.18828;
  _Bool D.18829;
  _Bool D.18830;
  _Bool D.18831;
  const unsigned char * D.18834;
  unsigned char D.18835;
  int D.18836;
  const unsigned char * D.18837;
  unsigned char D.18838;
  int D.18839;
  _Bool D.18840;
  _Bool D.18841;
  const unsigned char * D.18844;
  unsigned char D.18845;
  int D.18846;
  const unsigned char * D.18847;
  unsigned char D.18848;
  int D.18849;
  _Bool D.18850;
  _Bool D.18851;
  const unsigned char * D.18854;
  unsigned char D.18855;
  int D.18856;
  const unsigned char * D.18857;
  unsigned char D.18858;
  int D.18859;
  const char * D.18861;
  short unsigned int D.18864;
  struct MonoType * D.18867;
  unsigned char D.18868;
  struct MonoType * D.18871;
  struct MonoClass * D.18872;
  struct MonoClass * D.18873;
  _Bool D.18875;
  long int D.18876;
  long int D.18877;
  struct MonoDomain * D.18880;
  struct MonoString * D.18881;
  struct MonoDomain * D.18882;
  struct MonoException * D.18883;
  struct MonoClass * klass;
  void * args[2];
  struct MonoObject * exc;
  struct MonoMethod * method;
  void * iter;

  try
    {
      D.18815 = mono_get_corlib ();
      klass = mono_class_from_name (D.18815, "System", "TypeInitializationException");
      D.18816 = klass == 0B;
      D.18817 = (long int) D.18816;
      D.18818 = __builtin_expect (D.18817, 0);
      if (D.18818 != 0) goto <D.18819>; else goto <D.18820>;
      <D.18819>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 573, "klass");
      <D.18820>:
      mono_class_init (klass);
      iter = 0B;
      goto <D.18516>;
      <D.18515>:
      {
        size_t __s1_len;
        size_t __s2_len;

        __s1_len = 5;
        if (__s1_len <= 3) goto <D.18822>; else goto <D.18823>;
        <D.18822>:
        {
          const unsigned char * __s2;
          int __result;

          __s2 = mono_method_get_name (method);
          D.18824 = ".ctor";
          D.18825 = MEM[(const unsigned char *)D.18824];
          D.18826 = (int) D.18825;
          D.18827 = *__s2;
          D.18828 = (int) D.18827;
          __result = D.18826 - D.18828;
          {
            D.18829 = __s1_len != 0;
            D.18830 = __result == 0;
            D.18831 = D.18829 & D.18830;
            if (D.18831 != 0) goto <D.18832>; else goto <D.18833>;
            <D.18832>:
            D.18834 = &MEM[(void *)".ctor" + 1B];
            D.18835 = *D.18834;
            D.18836 = (int) D.18835;
            D.18837 = __s2 + 1;
            D.18838 = *D.18837;
            D.18839 = (int) D.18838;
            __result = D.18836 - D.18839;
            D.18840 = __s1_len > 1;
            D.18830 = __result == 0;
            D.18841 = D.18840 & D.18830;
            if (D.18841 != 0) goto <D.18842>; else goto <D.18843>;
            <D.18842>:
            D.18844 = &MEM[(void *)".ctor" + 2B];
            D.18845 = *D.18844;
            D.18846 = (int) D.18845;
            D.18847 = __s2 + 2;
            D.18848 = *D.18847;
            D.18849 = (int) D.18848;
            __result = D.18846 - D.18849;
            D.18850 = __s1_len > 2;
            D.18830 = __result == 0;
            D.18851 = D.18850 & D.18830;
            if (D.18851 != 0) goto <D.18852>; else goto <D.18853>;
            <D.18852>:
            D.18854 = &MEM[(void *)".ctor" + 3B];
            D.18855 = *D.18854;
            D.18856 = (int) D.18855;
            D.18857 = __s2 + 3;
            D.18858 = *D.18857;
            D.18859 = (int) D.18858;
            __result = D.18856 - D.18859;
            <D.18853>:
            <D.18843>:
            <D.18833>:
          }
          D.18508 = __result;
        }
        iftmp.3 = D.18508;
        goto <D.18860>;
        <D.18823>:
        D.18861 = mono_method_get_name (method);
        iftmp.3 = __builtin_strcmp (".ctor", D.18861);
        <D.18860>:
        D.18512 = iftmp.3;
      }
      if (D.18512 == 0) goto <D.18862>; else goto <D.18863>;
      <D.18862>:
      {
        struct MonoMethodSignature * sig;

        sig = mono_method_signature (method);
        D.18864 = sig->param_count;
        if (D.18864 == 2) goto <D.18865>; else goto <D.18866>;
        <D.18865>:
        D.18867 = sig->params[0];
        D.18868 = D.18867->type;
        if (D.18868 == 14) goto <D.18869>; else goto <D.18870>;
        <D.18869>:
        D.18871 = sig->params[1];
        D.18872 = mono_class_from_mono_type (D.18871);
        D.18873 = mono_defaults.exception_class;
        if (D.18872 == D.18873) goto <D.18514>; else goto <D.18874>;
        <D.18874>:
        <D.18870>:
        <D.18866>:
      }
      <D.18863>:
      method = 0B;
      <D.18516>:
      method = mono_class_get_methods (klass, &iter);
      if (method != 0B) goto <D.18515>; else goto <D.18514>;
      <D.18514>:
      D.18875 = method == 0B;
      D.18876 = (long int) D.18875;
      D.18877 = __builtin_expect (D.18876, 0);
      if (D.18877 != 0) goto <D.18878>; else goto <D.18879>;
      <D.18878>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 587, "method");
      <D.18879>:
      D.18880 = mono_domain_get ();
      D.18881 = mono_string_new (D.18880, type_name);
      args[0] = D.18881;
      args[1] = inner;
      D.18882 = mono_domain_get ();
      exc = mono_object_new (D.18882, klass);
      mono_runtime_invoke (method, exc, &args, 0B);
      D.18883 = exc;
      return D.18883;
    }
  finally
    {
      args = {CLOBBER};
      iter = {CLOBBER};
    }
}


mono_get_exception_synchronization_lock (const char * msg)
{
  struct MonoException * D.18886;
  struct MonoImage * D.18887;

  D.18887 = mono_get_corlib ();
  D.18886 = mono_exception_from_name_msg (D.18887, "System.Threading", "SynchronizationLockException", msg);
  return D.18886;
}


mono_get_exception_cannot_unload_appdomain (const char * msg)
{
  struct MonoException * D.18889;
  struct MonoImage * D.18890;

  D.18890 = mono_get_corlib ();
  D.18889 = mono_exception_from_name_msg (D.18890, "System", "CannotUnloadAppDomainException", msg);
  return D.18889;
}


mono_get_exception_appdomain_unloaded ()
{
  struct MonoException * D.18892;
  struct MonoImage * D.18893;

  D.18893 = mono_get_corlib ();
  D.18892 = mono_exception_from_name (D.18893, "System", "AppDomainUnloadedException");
  return D.18892;
}


mono_get_exception_bad_image_format (const char * msg)
{
  struct MonoException * D.18895;
  struct MonoImage * D.18896;

  D.18896 = mono_get_corlib ();
  D.18895 = mono_exception_from_name_msg (D.18896, "System", "BadImageFormatException", msg);
  return D.18895;
}


mono_get_exception_bad_image_format2 (const char * msg, struct MonoString * fname)
{
  struct MonoString * iftmp.4;
  struct MonoDomain * D.18901;
  struct MonoException * D.18903;
  struct MonoImage * D.18904;
  struct MonoString * s;

  if (msg != 0B) goto <D.18899>; else goto <D.18900>;
  <D.18899>:
  D.18901 = mono_domain_get ();
  iftmp.4 = mono_string_new (D.18901, msg);
  goto <D.18902>;
  <D.18900>:
  iftmp.4 = 0B;
  <D.18902>:
  s = iftmp.4;
  D.18904 = mono_get_corlib ();
  D.18903 = mono_exception_from_name_two_strings (D.18904, "System", "BadImageFormatException", s, fname);
  return D.18903;
}


mono_get_exception_stack_overflow ()
{
  struct MonoException * D.18906;
  struct MonoImage * D.18907;

  D.18907 = mono_get_corlib ();
  D.18906 = mono_exception_from_name (D.18907, "System", "StackOverflowException");
  return D.18906;
}


mono_get_exception_out_of_memory ()
{
  struct MonoException * D.18909;
  struct MonoImage * D.18910;

  D.18910 = mono_get_corlib ();
  D.18909 = mono_exception_from_name (D.18910, "System", "OutOfMemoryException");
  return D.18909;
}


mono_get_exception_field_access ()
{
  struct MonoException * D.18912;
  struct MonoImage * D.18913;

  D.18913 = mono_get_corlib ();
  D.18912 = mono_exception_from_name (D.18913, "System", "FieldAccessException");
  return D.18912;
}


mono_get_exception_field_access_msg (const char * msg)
{
  struct MonoException * D.18915;
  struct MonoImage * D.18916;

  D.18916 = mono_get_corlib ();
  D.18915 = mono_exception_from_name_msg (D.18916, "System", "FieldAccessException", msg);
  return D.18915;
}


mono_get_exception_method_access ()
{
  struct MonoException * D.18918;
  struct MonoImage * D.18919;

  D.18919 = mono_get_corlib ();
  D.18918 = mono_exception_from_name (D.18919, "System", "MethodAccessException");
  return D.18918;
}


mono_get_exception_method_access_msg (const char * msg)
{
  struct MonoException * D.18921;
  struct MonoImage * D.18922;

  D.18922 = mono_get_corlib ();
  D.18921 = mono_exception_from_name_msg (D.18922, "System", "MethodAccessException", msg);
  return D.18921;
}


mono_get_exception_reflection_type_load (struct MonoArray * types, struct MonoArray * exceptions)
{
  struct MonoImage * D.18924;
  _Bool D.18925;
  long int D.18926;
  long int D.18927;
  int D.18569;
  int iftmp.5;
  int D.18565;
  const char[6] * D.18933;
  unsigned char D.18934;
  int D.18935;
  unsigned char D.18936;
  int D.18937;
  _Bool D.18938;
  _Bool D.18939;
  _Bool D.18940;
  const unsigned char * D.18943;
  unsigned char D.18944;
  int D.18945;
  const unsigned char * D.18946;
  unsigned char D.18947;
  int D.18948;
  _Bool D.18949;
  _Bool D.18950;
  const unsigned char * D.18953;
  unsigned char D.18954;
  int D.18955;
  const unsigned char * D.18956;
  unsigned char D.18957;
  int D.18958;
  _Bool D.18959;
  _Bool D.18960;
  const unsigned char * D.18963;
  unsigned char D.18964;
  int D.18965;
  const unsigned char * D.18966;
  unsigned char D.18967;
  int D.18968;
  const char * D.18970;
  short unsigned int D.18973;
  struct MonoType * D.18976;
  unsigned char D.18977;
  struct MonoType * D.18980;
  unsigned char D.18981;
  _Bool D.18983;
  long int D.18984;
  long int D.18985;
  struct MonoDomain * D.18988;
  struct MonoException * D.18989;
  struct MonoClass * klass;
  void * args[2];
  struct MonoObject * exc;
  struct MonoMethod * method;
  void * iter;

  try
    {
      D.18924 = mono_get_corlib ();
      klass = mono_class_from_name (D.18924, "System.Reflection", "ReflectionTypeLoadException");
      D.18925 = klass == 0B;
      D.18926 = (long int) D.18925;
      D.18927 = __builtin_expect (D.18926, 0);
      if (D.18927 != 0) goto <D.18928>; else goto <D.18929>;
      <D.18928>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 746, "klass");
      <D.18929>:
      mono_class_init (klass);
      iter = 0B;
      goto <D.18573>;
      <D.18572>:
      {
        size_t __s1_len;
        size_t __s2_len;

        __s1_len = 5;
        if (__s1_len <= 3) goto <D.18931>; else goto <D.18932>;
        <D.18931>:
        {
          const unsigned char * __s2;
          int __result;

          __s2 = mono_method_get_name (method);
          D.18933 = ".ctor";
          D.18934 = MEM[(const unsigned char *)D.18933];
          D.18935 = (int) D.18934;
          D.18936 = *__s2;
          D.18937 = (int) D.18936;
          __result = D.18935 - D.18937;
          {
            D.18938 = __s1_len != 0;
            D.18939 = __result == 0;
            D.18940 = D.18938 & D.18939;
            if (D.18940 != 0) goto <D.18941>; else goto <D.18942>;
            <D.18941>:
            D.18943 = &MEM[(void *)".ctor" + 1B];
            D.18944 = *D.18943;
            D.18945 = (int) D.18944;
            D.18946 = __s2 + 1;
            D.18947 = *D.18946;
            D.18948 = (int) D.18947;
            __result = D.18945 - D.18948;
            D.18949 = __s1_len > 1;
            D.18939 = __result == 0;
            D.18950 = D.18949 & D.18939;
            if (D.18950 != 0) goto <D.18951>; else goto <D.18952>;
            <D.18951>:
            D.18953 = &MEM[(void *)".ctor" + 2B];
            D.18954 = *D.18953;
            D.18955 = (int) D.18954;
            D.18956 = __s2 + 2;
            D.18957 = *D.18956;
            D.18958 = (int) D.18957;
            __result = D.18955 - D.18958;
            D.18959 = __s1_len > 2;
            D.18939 = __result == 0;
            D.18960 = D.18959 & D.18939;
            if (D.18960 != 0) goto <D.18961>; else goto <D.18962>;
            <D.18961>:
            D.18963 = &MEM[(void *)".ctor" + 3B];
            D.18964 = *D.18963;
            D.18965 = (int) D.18964;
            D.18966 = __s2 + 3;
            D.18967 = *D.18966;
            D.18968 = (int) D.18967;
            __result = D.18965 - D.18968;
            <D.18962>:
            <D.18952>:
            <D.18942>:
          }
          D.18565 = __result;
        }
        iftmp.5 = D.18565;
        goto <D.18969>;
        <D.18932>:
        D.18970 = mono_method_get_name (method);
        iftmp.5 = __builtin_strcmp (".ctor", D.18970);
        <D.18969>:
        D.18569 = iftmp.5;
      }
      if (D.18569 == 0) goto <D.18971>; else goto <D.18972>;
      <D.18971>:
      {
        struct MonoMethodSignature * sig;

        sig = mono_method_signature (method);
        D.18973 = sig->param_count;
        if (D.18973 == 2) goto <D.18974>; else goto <D.18975>;
        <D.18974>:
        D.18976 = sig->params[0];
        D.18977 = D.18976->type;
        if (D.18977 == 29) goto <D.18978>; else goto <D.18979>;
        <D.18978>:
        D.18980 = sig->params[1];
        D.18981 = D.18980->type;
        if (D.18981 == 29) goto <D.18571>; else goto <D.18982>;
        <D.18982>:
        <D.18979>:
        <D.18975>:
      }
      <D.18972>:
      method = 0B;
      <D.18573>:
      method = mono_class_get_methods (klass, &iter);
      if (method != 0B) goto <D.18572>; else goto <D.18571>;
      <D.18571>:
      D.18983 = method == 0B;
      D.18984 = (long int) D.18983;
      D.18985 = __builtin_expect (D.18984, 0);
      if (D.18985 != 0) goto <D.18986>; else goto <D.18987>;
      <D.18986>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 760, "method");
      <D.18987>:
      args[0] = types;
      args[1] = exceptions;
      D.18988 = mono_domain_get ();
      exc = mono_object_new (D.18988, klass);
      mono_runtime_invoke (method, exc, &args, 0B);
      D.18989 = exc;
      return D.18989;
    }
  finally
    {
      args = {CLOBBER};
      iter = {CLOBBER};
    }
}


mono_get_exception_runtime_wrapped (struct MonoObject * wrapped_exception)
{
  struct MonoImage * D.18992;
  struct MonoObject * * D.18993;
  struct MonoException * D.18994;
  struct MonoRuntimeWrappedException * ex;

  D.18992 = mono_get_corlib ();
  ex = mono_exception_from_name (D.18992, "System.Runtime.CompilerServices", "RuntimeWrappedException");
  D.18993 = &ex->wrapped_exception;
  mono_gc_wbarrier_set_field (ex, D.18993, wrapped_exception);
  D.18994 = ex;
  return D.18994;
}


mono_exception_get_managed_backtrace (struct MonoException * exc)
{
  struct MonoRuntimeExceptionHandlingCallbacks * D.18996;
  gboolean (*<T2f8c>) (struct MonoException *, gboolean (*MonoInternalExceptionFrameWalk) (struct MonoMethod *, void *, size_t, gboolean, void *), void *) D.18997;
  int D.18998;
  char * D.19001;
  struct GString * text;

  text = monoeg_g_string_new_len (0B, 20);
  D.18996 = mono_get_eh_callbacks ();
  D.18997 = D.18996->mono_exception_walk_trace;
  D.18998 = D.18997 (exc, append_frame_and_continue, text);
  if (D.18998 == 0) goto <D.18999>; else goto <D.19000>;
  <D.18999>:
  monoeg_g_string_append (text, "managed backtrace not available\n");
  <D.19000>:
  D.19001 = monoeg_g_string_free (text, 0);
  return D.19001;
}


append_frame_and_continue (struct MonoMethod * method, void * ip, size_t native_offset, gboolean managed, void * user_data)
{
  gboolean D.19006;
  struct MonoDomain * domain;
  struct GString * text;

  domain = mono_domain_get ();
  text = user_data;
  if (method != 0B) goto <D.19003>; else goto <D.19004>;
  <D.19003>:
  {
    char * msg;

    msg = mono_debug_print_stack_frame (method, native_offset, domain);
    monoeg_g_string_append_printf (text, "%s\n", msg);
    monoeg_g_free (msg);
  }
  goto <D.19005>;
  <D.19004>:
  monoeg_g_string_append_printf (text, "<unknown native frame 0x%x>\n", ip);
  <D.19005>:
  D.19006 = 0;
  return D.19006;
}


mono_exception_get_native_backtrace (struct MonoException * exc)
{
  char * D.19010;
  unsigned int D.19011;
  int D.19012;
  char * D.19013;
  unsigned int i.6;
  char * D.19015;
  struct MonoDomain * D.19016;
  struct MonoMethod * D.19019;
  int ip.7;
  void * D.19021;
  int D.19022;
  int D.19023;
  unsigned int D.19024;
  unsigned int i.8;
  unsigned int D.19027;
  char * * D.19028;
  char * D.19029;
  struct MonoDomain * domain;
  struct MonoArray * arr;
  int i;
  int len;
  struct GString * text;
  char * * messages;

  arr = exc->native_trace_ips;
  if (arr == 0B) goto <D.19008>; else goto <D.19009>;
  <D.19008>:
  D.19010 = monoeg_strdup ("");
  return D.19010;
  <D.19009>:
  domain = mono_domain_get ();
  D.19011 = mono_array_length (arr);
  len = (int) D.19011;
  D.19012 = len * 20;
  text = monoeg_g_string_new_len (0B, D.19012);
  D.19013 = mono_array_addr_with_size (arr, 4, 0);
  messages = backtrace_symbols (D.19013, len);
  i = 0;
  goto <D.18605>;
  <D.18604>:
  {
    void * ip;
    struct MonoJitInfo * ji;

    i.6 = (unsigned int) i;
    D.19015 = mono_array_addr_with_size (arr, 4, i.6);
    ip = MEM[(void * *)D.19015];
    D.19016 = mono_domain_get ();
    ji = mono_jit_info_table_find (D.19016, ip);
    if (ji != 0B) goto <D.19017>; else goto <D.19018>;
    <D.19017>:
    {
      char * msg;

      D.19019 = mono_jit_info_get_method (ji);
      ip.7 = (int) ip;
      D.19021 = ji->code_start;
      D.19022 = (int) D.19021;
      D.19023 = ip.7 - D.19022;
      D.19024 = (unsigned int) D.19023;
      msg = mono_debug_print_stack_frame (D.19019, D.19024, domain);
      monoeg_g_string_append_printf (text, "%s\n", msg);
      monoeg_g_free (msg);
    }
    goto <D.19025>;
    <D.19018>:
    i.8 = (unsigned int) i;
    D.19027 = i.8 * 4;
    D.19028 = messages + D.19027;
    D.19029 = *D.19028;
    monoeg_g_string_append_printf (text, "%s\n", D.19029);
    <D.19025>:
  }
  i = i + 1;
  <D.18605>:
  if (i < len) goto <D.18604>; else goto <D.18606>;
  <D.18606>:
  free (messages);
  D.19010 = monoeg_g_string_free (text, 0);
  return D.19010;
}


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

  if (str != 0B) goto <D.19031>; else goto <D.19032>;
  <D.19031>:
  D.19033 = __strdup (str);
  return D.19033;
  <D.19032>:
  D.19033 = 0B;
  return D.19033;
}


ves_icall_Mono_Runtime_GetNativeStackTrace (struct MonoException * exc)
{
  struct MonoException * D.19037;
  struct MonoDomain * D.19038;
  struct MonoString * D.19039;
  char * trace;
  struct MonoString * res;

  if (exc == 0B) goto <D.19035>; else goto <D.19036>;
  <D.19035>:
  D.19037 = mono_get_exception_argument_null ("exception");
  mono_raise_exception (D.19037);
  <D.19036>:
  trace = mono_exception_get_native_backtrace (exc);
  D.19038 = mono_domain_get ();
  res = mono_string_new (D.19038, trace);
  monoeg_g_free (trace);
  D.19039 = res;
  return D.19039;
}


