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

  D.16031 = mono_domain_get ();
  D.16030 = mono_exception_from_name_domain (D.16031, image, name_space, name);
  return D.16030;
}


mono_exception_from_name_domain (struct MonoDomain * domain, struct MonoImage * image, const char * name_space, const char * name)
{
  _Bool D.16033;
  long int D.16034;
  long int D.16035;
  struct MonoException * D.16042;
  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.16033 = o == 0B;
  D.16034 = (long int) D.16033;
  D.16035 = __builtin_expect (D.16034, 0);
  if (D.16035 != 0) goto <D.16036>; else goto <D.16037>;
  <D.16036>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 66, "o != NULL");
  <D.16037>:
  if (domain != caller_domain) goto <D.16038>; else goto <D.16039>;
  <D.16038>:
  mono_domain_set_internal (domain);
  <D.16039>:
  mono_runtime_object_init (o);
  if (domain != caller_domain) goto <D.16040>; else goto <D.16041>;
  <D.16040>:
  mono_domain_set_internal (caller_domain);
  <D.16041>:
  D.16042 = o;
  return D.16042;
}


mono_exception_from_token (struct MonoImage * image, guint32 token)
{
  struct MonoDomain * D.16044;
  _Bool D.16045;
  long int D.16046;
  long int D.16047;
  struct MonoException * D.16050;
  struct MonoClass * klass;
  struct MonoObject * o;

  klass = mono_class_get (image, token);
  D.16044 = mono_domain_get ();
  o = mono_object_new (D.16044, klass);
  D.16045 = o == 0B;
  D.16046 = (long int) D.16045;
  D.16047 = __builtin_expect (D.16046, 0);
  if (D.16047 != 0) goto <D.16048>; else goto <D.16049>;
  <D.16048>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 96, "o != NULL");
  <D.16049>:
  mono_runtime_object_init (o);
  D.16050 = o;
  return D.16050;
}


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.16052;
  struct MonoClass * klass;

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


create_exception_two_strings (struct MonoClass * klass, struct MonoString * a1, struct MonoString * a2)
{
  int D.15804;
  int iftmp.0;
  int D.15800;
  const char[6] * D.16059;
  unsigned char D.16060;
  int D.16061;
  unsigned char D.16062;
  int D.16063;
  const unsigned char * D.16068;
  unsigned char D.16069;
  int D.16070;
  const unsigned char * D.16071;
  unsigned char D.16072;
  int D.16073;
  const unsigned char * D.16078;
  unsigned char D.16079;
  int D.16080;
  const unsigned char * D.16081;
  unsigned char D.16082;
  int D.16083;
  const unsigned char * D.16088;
  unsigned char D.16089;
  int D.16090;
  const unsigned char * D.16091;
  unsigned char D.16092;
  int D.16093;
  const char * D.16095;
  short unsigned int D.16098;
  int D.16099;
  struct MonoType * D.16102;
  unsigned char D.16103;
  struct MonoType * D.16108;
  unsigned char D.16109;
  struct MonoException * D.16112;
  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.16054>; else goto <D.16055>;
      <D.16054>:
      count = count + 1;
      <D.16055>:
      o = mono_object_new (domain, klass);
      iter = 0B;
      goto <D.15805>;
      <D.15807>:
      {
        struct MonoMethodSignature * sig;

        {
          size_t __s1_len;
          size_t __s2_len;

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

            __s2 = mono_method_get_name (m);
            D.16059 = ".ctor";
            D.16060 = MEM[(const unsigned char *)D.16059];
            D.16061 = (int) D.16060;
            D.16062 = *__s2;
            D.16063 = (int) D.16062;
            __result = D.16061 - D.16063;
            {
              if (__s1_len != 0) goto <D.16064>; else goto <D.16065>;
              <D.16064>:
              if (__result == 0) goto <D.16066>; else goto <D.16067>;
              <D.16066>:
              D.16068 = &MEM[(void *)".ctor" + 1B];
              D.16069 = *D.16068;
              D.16070 = (int) D.16069;
              D.16071 = __s2 + 1;
              D.16072 = *D.16071;
              D.16073 = (int) D.16072;
              __result = D.16070 - D.16073;
              if (__s1_len > 1) goto <D.16074>; else goto <D.16075>;
              <D.16074>:
              if (__result == 0) goto <D.16076>; else goto <D.16077>;
              <D.16076>:
              D.16078 = &MEM[(void *)".ctor" + 2B];
              D.16079 = *D.16078;
              D.16080 = (int) D.16079;
              D.16081 = __s2 + 2;
              D.16082 = *D.16081;
              D.16083 = (int) D.16082;
              __result = D.16080 - D.16083;
              if (__s1_len > 2) goto <D.16084>; else goto <D.16085>;
              <D.16084>:
              if (__result == 0) goto <D.16086>; else goto <D.16087>;
              <D.16086>:
              D.16088 = &MEM[(void *)".ctor" + 3B];
              D.16089 = *D.16088;
              D.16090 = (int) D.16089;
              D.16091 = __s2 + 3;
              D.16092 = *D.16091;
              D.16093 = (int) D.16092;
              __result = D.16090 - D.16093;
              <D.16087>:
              <D.16085>:
              <D.16077>:
              <D.16075>:
              <D.16067>:
              <D.16065>:
            }
            D.15800 = __result;
          }
          iftmp.0 = D.15800;
          goto <D.16094>;
          <D.16058>:
          D.16095 = mono_method_get_name (m);
          iftmp.0 = __builtin_strcmp (".ctor", D.16095);
          <D.16094>:
          D.15804 = iftmp.0;
        }
        if (D.15804 != 0) goto <D.16096>; else goto <D.16097>;
        <D.16096>:
        // predicted unlikely by continue predictor.
        goto <D.15805>;
        <D.16097>:
        sig = mono_method_signature (m);
        D.16098 = sig->param_count;
        D.16099 = (int) D.16098;
        if (D.16099 != count) goto <D.16100>; else goto <D.16101>;
        <D.16100>:
        // predicted unlikely by continue predictor.
        goto <D.15805>;
        <D.16101>:
        D.16102 = sig->params[0];
        D.16103 = D.16102->type;
        if (D.16103 != 14) goto <D.16104>; else goto <D.16105>;
        <D.16104>:
        // predicted unlikely by continue predictor.
        goto <D.15805>;
        <D.16105>:
        if (count == 2) goto <D.16106>; else goto <D.16107>;
        <D.16106>:
        D.16108 = sig->params[1];
        D.16109 = D.16108->type;
        if (D.16109 != 14) goto <D.16110>; else goto <D.16111>;
        <D.16110>:
        // predicted unlikely by continue predictor.
        goto <D.15805>;
        <D.16111>:
        <D.16107>:
        method = m;
        goto <D.15806>;
      }
      <D.15805>:
      m = mono_class_get_methods (klass, &iter);
      if (m != 0B) goto <D.15807>; else goto <D.15806>;
      <D.15806>:
      args[0] = a1;
      args[1] = a2;
      mono_runtime_invoke (method, o, &args, 0B);
      D.16112 = o;
      return D.16112;
    }
  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.16117;
  struct MonoDomain * D.16118;
  struct MonoString * D.16119;
  struct MonoException * D.16120;
  struct MonoException * ex;

  ex = mono_exception_from_name (image, name_space, name);
  if (msg != 0B) goto <D.16115>; else goto <D.16116>;
  <D.16115>:
  D.16117 = &ex->message;
  D.16118 = mono_object_get_domain (ex);
  D.16119 = mono_string_new (D.16118, msg);
  mono_gc_wbarrier_set_field (ex, D.16117, D.16119);
  <D.16116>:
  D.16120 = ex;
  return D.16120;
}


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

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


mono_get_exception_divide_by_zero ()
{
  struct MonoException * D.16124;
  struct MonoImage * D.16125;

  D.16125 = mono_get_corlib ();
  D.16124 = mono_exception_from_name (D.16125, "System", "DivideByZeroException");
  return D.16124;
}


mono_get_exception_security ()
{
  struct MonoException * D.16127;
  struct MonoImage * D.16128;

  D.16128 = mono_get_corlib ();
  D.16127 = mono_exception_from_name (D.16128, "System.Security", "SecurityException");
  return D.16127;
}


mono_get_exception_thread_abort ()
{
  struct MonoException * D.16130;
  struct MonoImage * D.16131;

  D.16131 = mono_get_corlib ();
  D.16130 = mono_exception_from_name (D.16131, "System.Threading", "ThreadAbortException");
  return D.16130;
}


mono_get_exception_thread_interrupted ()
{
  struct MonoException * D.16133;
  struct MonoImage * D.16134;

  D.16134 = mono_get_corlib ();
  D.16133 = mono_exception_from_name (D.16134, "System.Threading", "ThreadInterruptedException");
  return D.16133;
}


mono_get_exception_arithmetic ()
{
  struct MonoException * D.16136;
  struct MonoImage * D.16137;

  D.16137 = mono_get_corlib ();
  D.16136 = mono_exception_from_name (D.16137, "System", "ArithmeticException");
  return D.16136;
}


mono_get_exception_overflow ()
{
  struct MonoException * D.16139;
  struct MonoImage * D.16140;

  D.16140 = mono_get_corlib ();
  D.16139 = mono_exception_from_name (D.16140, "System", "OverflowException");
  return D.16139;
}


mono_get_exception_null_reference ()
{
  struct MonoException * D.16142;
  struct MonoImage * D.16143;

  D.16143 = mono_get_corlib ();
  D.16142 = mono_exception_from_name (D.16143, "System", "NullReferenceException");
  return D.16142;
}


mono_get_exception_execution_engine (const char * msg)
{
  struct MonoException * D.16145;
  struct MonoImage * D.16146;

  D.16146 = mono_get_corlib ();
  D.16145 = mono_exception_from_name_msg (D.16146, "System", "ExecutionEngineException", msg);
  return D.16145;
}


mono_get_exception_serialization (const char * msg)
{
  struct MonoException * D.16148;
  struct MonoImage * D.16149;

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


mono_get_exception_invalid_cast ()
{
  struct MonoException * D.16151;
  struct MonoImage * D.16152;

  D.16152 = mono_get_corlib ();
  D.16151 = mono_exception_from_name (D.16152, "System", "InvalidCastException");
  return D.16151;
}


mono_get_exception_invalid_operation (const char * msg)
{
  struct MonoException * D.16154;
  struct MonoImage * D.16155;

  D.16155 = mono_get_corlib ();
  D.16154 = mono_exception_from_name_msg (D.16155, "System", "InvalidOperationException", msg);
  return D.16154;
}


mono_get_exception_index_out_of_range ()
{
  struct MonoException * D.16157;
  struct MonoImage * D.16158;

  D.16158 = mono_get_corlib ();
  D.16157 = mono_exception_from_name (D.16158, "System", "IndexOutOfRangeException");
  return D.16157;
}


mono_get_exception_array_type_mismatch ()
{
  struct MonoException * D.16160;
  struct MonoImage * D.16161;

  D.16161 = mono_get_corlib ();
  D.16160 = mono_exception_from_name (D.16161, "System", "ArrayTypeMismatchException");
  return D.16160;
}


mono_get_exception_type_load (struct MonoString * class_name, char * assembly_name)
{
  struct MonoString * iftmp.1;
  struct MonoDomain * D.16166;
  struct MonoDomain * D.16168;
  struct MonoException * D.16169;
  struct MonoImage * D.16170;
  struct MonoString * s;

  if (assembly_name != 0B) goto <D.16164>; else goto <D.16165>;
  <D.16164>:
  D.16166 = mono_domain_get ();
  iftmp.1 = mono_string_new (D.16166, assembly_name);
  goto <D.16167>;
  <D.16165>:
  D.16168 = mono_domain_get ();
  iftmp.1 = mono_string_new (D.16168, "");
  <D.16167>:
  s = iftmp.1;
  D.16170 = mono_get_corlib ();
  D.16169 = mono_exception_from_name_two_strings (D.16170, "System", "TypeLoadException", class_name, s);
  return D.16169;
}


mono_get_exception_not_implemented (const char * msg)
{
  struct MonoException * D.16172;
  struct MonoImage * D.16173;

  D.16173 = mono_get_corlib ();
  D.16172 = mono_exception_from_name_msg (D.16173, "System", "NotImplementedException", msg);
  return D.16172;
}


mono_get_exception_not_supported (const char * msg)
{
  struct MonoException * D.16175;
  struct MonoImage * D.16176;

  D.16176 = mono_get_corlib ();
  D.16175 = mono_exception_from_name_msg (D.16176, "System", "NotSupportedException", msg);
  return D.16175;
}


mono_get_exception_missing_method (const char * class_name, const char * member_name)
{
  struct MonoDomain * D.16178;
  struct MonoDomain * D.16179;
  struct MonoException * D.16180;
  struct MonoImage * D.16181;
  struct MonoString * s1;
  struct MonoString * s2;

  D.16178 = mono_domain_get ();
  s1 = mono_string_new (D.16178, class_name);
  D.16179 = mono_domain_get ();
  s2 = mono_string_new (D.16179, member_name);
  D.16181 = mono_get_corlib ();
  D.16180 = mono_exception_from_name_two_strings (D.16181, "System", "MissingMethodException", s1, s2);
  return D.16180;
}


mono_get_exception_missing_field (const char * class_name, const char * member_name)
{
  struct MonoDomain * D.16183;
  struct MonoDomain * D.16184;
  struct MonoException * D.16185;
  struct MonoImage * D.16186;
  struct MonoString * s1;
  struct MonoString * s2;

  D.16183 = mono_domain_get ();
  s1 = mono_string_new (D.16183, class_name);
  D.16184 = mono_domain_get ();
  s2 = mono_string_new (D.16184, member_name);
  D.16186 = mono_get_corlib ();
  D.16185 = mono_exception_from_name_two_strings (D.16186, "System", "MissingFieldException", s1, s2);
  return D.16185;
}


mono_get_exception_argument_null (const char * arg)
{
  struct MonoImage * D.16188;
  struct MonoString * * D.16191;
  struct MonoDomain * D.16192;
  struct MonoString * D.16193;
  struct MonoException * D.16194;
  struct MonoException * ex;

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

    argex = ex;
    D.16191 = &argex->param_name;
    D.16192 = mono_object_get_domain (ex);
    D.16193 = mono_string_new (D.16192, arg);
    mono_gc_wbarrier_set_field (argex, D.16191, D.16193);
  }
  <D.16190>:
  D.16194 = ex;
  return D.16194;
}


mono_get_exception_argument (const char * arg, const char * msg)
{
  struct MonoImage * D.16196;
  struct MonoString * * D.16199;
  struct MonoDomain * D.16200;
  struct MonoString * D.16201;
  struct MonoException * D.16202;
  struct MonoException * ex;

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

    argex = ex;
    D.16199 = &argex->param_name;
    D.16200 = mono_object_get_domain (ex);
    D.16201 = mono_string_new (D.16200, arg);
    mono_gc_wbarrier_set_field (argex, D.16199, D.16201);
  }
  <D.16198>:
  D.16202 = ex;
  return D.16202;
}


mono_get_exception_argument_out_of_range (const char * arg)
{
  struct MonoImage * D.16204;
  struct MonoString * * D.16207;
  struct MonoDomain * D.16208;
  struct MonoString * D.16209;
  struct MonoException * D.16210;
  struct MonoException * ex;

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

    argex = ex;
    D.16207 = &argex->param_name;
    D.16208 = mono_object_get_domain (ex);
    D.16209 = mono_string_new (D.16208, arg);
    mono_gc_wbarrier_set_field (argex, D.16207, D.16209);
  }
  <D.16206>:
  D.16210 = ex;
  return D.16210;
}


mono_get_exception_thread_state (const char * msg)
{
  struct MonoException * D.16212;
  struct MonoImage * D.16213;

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


mono_get_exception_io (const char * msg)
{
  struct MonoException * D.16215;
  struct MonoImage * D.16216;

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


mono_get_exception_file_not_found (struct MonoString * fname)
{
  struct MonoException * D.16218;
  struct MonoImage * D.16219;

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


mono_get_exception_file_not_found2 (const char * msg, struct MonoString * fname)
{
  struct MonoString * iftmp.2;
  struct MonoDomain * D.16224;
  struct MonoException * D.16226;
  struct MonoImage * D.16227;
  struct MonoString * s;

  if (msg != 0B) goto <D.16222>; else goto <D.16223>;
  <D.16222>:
  D.16224 = mono_domain_get ();
  iftmp.2 = mono_string_new (D.16224, msg);
  goto <D.16225>;
  <D.16223>:
  iftmp.2 = 0B;
  <D.16225>:
  s = iftmp.2;
  D.16227 = mono_get_corlib ();
  D.16226 = mono_exception_from_name_two_strings (D.16227, "System.IO", "FileNotFoundException", s, fname);
  return D.16226;
}


mono_get_exception_type_initialization (const gchar * type_name, struct MonoException * inner)
{
  struct MonoImage * D.16229;
  _Bool D.16230;
  long int D.16231;
  long int D.16232;
  int D.15929;
  int iftmp.3;
  int D.15925;
  const char[6] * D.16238;
  unsigned char D.16239;
  int D.16240;
  unsigned char D.16241;
  int D.16242;
  const unsigned char * D.16247;
  unsigned char D.16248;
  int D.16249;
  const unsigned char * D.16250;
  unsigned char D.16251;
  int D.16252;
  const unsigned char * D.16257;
  unsigned char D.16258;
  int D.16259;
  const unsigned char * D.16260;
  unsigned char D.16261;
  int D.16262;
  const unsigned char * D.16267;
  unsigned char D.16268;
  int D.16269;
  const unsigned char * D.16270;
  unsigned char D.16271;
  int D.16272;
  const char * D.16274;
  short unsigned int D.16277;
  struct MonoType * D.16280;
  unsigned char D.16281;
  struct MonoType * D.16284;
  struct MonoClass * D.16285;
  struct MonoClass * D.16286;
  _Bool D.16288;
  long int D.16289;
  long int D.16290;
  struct MonoDomain * D.16293;
  struct MonoString * D.16294;
  struct MonoDomain * D.16295;
  struct MonoException * D.16296;
  struct MonoClass * klass;
  void * args[2];
  struct MonoObject * exc;
  struct MonoMethod * method;
  void * iter;

  try
    {
      D.16229 = mono_get_corlib ();
      klass = mono_class_from_name (D.16229, "System", "TypeInitializationException");
      D.16230 = klass == 0B;
      D.16231 = (long int) D.16230;
      D.16232 = __builtin_expect (D.16231, 0);
      if (D.16232 != 0) goto <D.16233>; else goto <D.16234>;
      <D.16233>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 573, "klass");
      <D.16234>:
      mono_class_init (klass);
      iter = 0B;
      goto <D.15933>;
      <D.15932>:
      {
        size_t __s1_len;
        size_t __s2_len;

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

          __s2 = mono_method_get_name (method);
          D.16238 = ".ctor";
          D.16239 = MEM[(const unsigned char *)D.16238];
          D.16240 = (int) D.16239;
          D.16241 = *__s2;
          D.16242 = (int) D.16241;
          __result = D.16240 - D.16242;
          {
            if (__s1_len != 0) goto <D.16243>; else goto <D.16244>;
            <D.16243>:
            if (__result == 0) goto <D.16245>; else goto <D.16246>;
            <D.16245>:
            D.16247 = &MEM[(void *)".ctor" + 1B];
            D.16248 = *D.16247;
            D.16249 = (int) D.16248;
            D.16250 = __s2 + 1;
            D.16251 = *D.16250;
            D.16252 = (int) D.16251;
            __result = D.16249 - D.16252;
            if (__s1_len > 1) goto <D.16253>; else goto <D.16254>;
            <D.16253>:
            if (__result == 0) goto <D.16255>; else goto <D.16256>;
            <D.16255>:
            D.16257 = &MEM[(void *)".ctor" + 2B];
            D.16258 = *D.16257;
            D.16259 = (int) D.16258;
            D.16260 = __s2 + 2;
            D.16261 = *D.16260;
            D.16262 = (int) D.16261;
            __result = D.16259 - D.16262;
            if (__s1_len > 2) goto <D.16263>; else goto <D.16264>;
            <D.16263>:
            if (__result == 0) goto <D.16265>; else goto <D.16266>;
            <D.16265>:
            D.16267 = &MEM[(void *)".ctor" + 3B];
            D.16268 = *D.16267;
            D.16269 = (int) D.16268;
            D.16270 = __s2 + 3;
            D.16271 = *D.16270;
            D.16272 = (int) D.16271;
            __result = D.16269 - D.16272;
            <D.16266>:
            <D.16264>:
            <D.16256>:
            <D.16254>:
            <D.16246>:
            <D.16244>:
          }
          D.15925 = __result;
        }
        iftmp.3 = D.15925;
        goto <D.16273>;
        <D.16237>:
        D.16274 = mono_method_get_name (method);
        iftmp.3 = __builtin_strcmp (".ctor", D.16274);
        <D.16273>:
        D.15929 = iftmp.3;
      }
      if (D.15929 == 0) goto <D.16275>; else goto <D.16276>;
      <D.16275>:
      {
        struct MonoMethodSignature * sig;

        sig = mono_method_signature (method);
        D.16277 = sig->param_count;
        if (D.16277 == 2) goto <D.16278>; else goto <D.16279>;
        <D.16278>:
        D.16280 = sig->params[0];
        D.16281 = D.16280->type;
        if (D.16281 == 14) goto <D.16282>; else goto <D.16283>;
        <D.16282>:
        D.16284 = sig->params[1];
        D.16285 = mono_class_from_mono_type (D.16284);
        D.16286 = mono_defaults.exception_class;
        if (D.16285 == D.16286) goto <D.15931>; else goto <D.16287>;
        <D.16287>:
        <D.16283>:
        <D.16279>:
      }
      <D.16276>:
      method = 0B;
      <D.15933>:
      method = mono_class_get_methods (klass, &iter);
      if (method != 0B) goto <D.15932>; else goto <D.15931>;
      <D.15931>:
      D.16288 = method == 0B;
      D.16289 = (long int) D.16288;
      D.16290 = __builtin_expect (D.16289, 0);
      if (D.16290 != 0) goto <D.16291>; else goto <D.16292>;
      <D.16291>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 587, "method");
      <D.16292>:
      D.16293 = mono_domain_get ();
      D.16294 = mono_string_new (D.16293, type_name);
      args[0] = D.16294;
      args[1] = inner;
      D.16295 = mono_domain_get ();
      exc = mono_object_new (D.16295, klass);
      mono_runtime_invoke (method, exc, &args, 0B);
      D.16296 = exc;
      return D.16296;
    }
  finally
    {
      args = {CLOBBER};
      iter = {CLOBBER};
    }
}


mono_get_exception_synchronization_lock (const char * msg)
{
  struct MonoException * D.16299;
  struct MonoImage * D.16300;

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


mono_get_exception_cannot_unload_appdomain (const char * msg)
{
  struct MonoException * D.16302;
  struct MonoImage * D.16303;

  D.16303 = mono_get_corlib ();
  D.16302 = mono_exception_from_name_msg (D.16303, "System", "CannotUnloadAppDomainException", msg);
  return D.16302;
}


mono_get_exception_appdomain_unloaded ()
{
  struct MonoException * D.16305;
  struct MonoImage * D.16306;

  D.16306 = mono_get_corlib ();
  D.16305 = mono_exception_from_name (D.16306, "System", "AppDomainUnloadedException");
  return D.16305;
}


mono_get_exception_bad_image_format (const char * msg)
{
  struct MonoException * D.16308;
  struct MonoImage * D.16309;

  D.16309 = mono_get_corlib ();
  D.16308 = mono_exception_from_name_msg (D.16309, "System", "BadImageFormatException", msg);
  return D.16308;
}


mono_get_exception_bad_image_format2 (const char * msg, struct MonoString * fname)
{
  struct MonoString * iftmp.4;
  struct MonoDomain * D.16314;
  struct MonoException * D.16316;
  struct MonoImage * D.16317;
  struct MonoString * s;

  if (msg != 0B) goto <D.16312>; else goto <D.16313>;
  <D.16312>:
  D.16314 = mono_domain_get ();
  iftmp.4 = mono_string_new (D.16314, msg);
  goto <D.16315>;
  <D.16313>:
  iftmp.4 = 0B;
  <D.16315>:
  s = iftmp.4;
  D.16317 = mono_get_corlib ();
  D.16316 = mono_exception_from_name_two_strings (D.16317, "System", "BadImageFormatException", s, fname);
  return D.16316;
}


mono_get_exception_stack_overflow ()
{
  struct MonoException * D.16319;
  struct MonoImage * D.16320;

  D.16320 = mono_get_corlib ();
  D.16319 = mono_exception_from_name (D.16320, "System", "StackOverflowException");
  return D.16319;
}


mono_get_exception_out_of_memory ()
{
  struct MonoException * D.16322;
  struct MonoImage * D.16323;

  D.16323 = mono_get_corlib ();
  D.16322 = mono_exception_from_name (D.16323, "System", "OutOfMemoryException");
  return D.16322;
}


mono_get_exception_field_access ()
{
  struct MonoException * D.16325;
  struct MonoImage * D.16326;

  D.16326 = mono_get_corlib ();
  D.16325 = mono_exception_from_name (D.16326, "System", "FieldAccessException");
  return D.16325;
}


mono_get_exception_field_access_msg (const char * msg)
{
  struct MonoException * D.16328;
  struct MonoImage * D.16329;

  D.16329 = mono_get_corlib ();
  D.16328 = mono_exception_from_name_msg (D.16329, "System", "FieldAccessException", msg);
  return D.16328;
}


mono_get_exception_method_access ()
{
  struct MonoException * D.16331;
  struct MonoImage * D.16332;

  D.16332 = mono_get_corlib ();
  D.16331 = mono_exception_from_name (D.16332, "System", "MethodAccessException");
  return D.16331;
}


mono_get_exception_method_access_msg (const char * msg)
{
  struct MonoException * D.16334;
  struct MonoImage * D.16335;

  D.16335 = mono_get_corlib ();
  D.16334 = mono_exception_from_name_msg (D.16335, "System", "MethodAccessException", msg);
  return D.16334;
}


mono_get_exception_reflection_type_load (struct MonoArray * types, struct MonoArray * exceptions)
{
  struct MonoImage * D.16337;
  _Bool D.16338;
  long int D.16339;
  long int D.16340;
  int D.15986;
  int iftmp.5;
  int D.15982;
  const char[6] * D.16346;
  unsigned char D.16347;
  int D.16348;
  unsigned char D.16349;
  int D.16350;
  const unsigned char * D.16355;
  unsigned char D.16356;
  int D.16357;
  const unsigned char * D.16358;
  unsigned char D.16359;
  int D.16360;
  const unsigned char * D.16365;
  unsigned char D.16366;
  int D.16367;
  const unsigned char * D.16368;
  unsigned char D.16369;
  int D.16370;
  const unsigned char * D.16375;
  unsigned char D.16376;
  int D.16377;
  const unsigned char * D.16378;
  unsigned char D.16379;
  int D.16380;
  const char * D.16382;
  short unsigned int D.16385;
  struct MonoType * D.16388;
  unsigned char D.16389;
  struct MonoType * D.16392;
  unsigned char D.16393;
  _Bool D.16395;
  long int D.16396;
  long int D.16397;
  struct MonoDomain * D.16400;
  struct MonoException * D.16401;
  struct MonoClass * klass;
  void * args[2];
  struct MonoObject * exc;
  struct MonoMethod * method;
  void * iter;

  try
    {
      D.16337 = mono_get_corlib ();
      klass = mono_class_from_name (D.16337, "System.Reflection", "ReflectionTypeLoadException");
      D.16338 = klass == 0B;
      D.16339 = (long int) D.16338;
      D.16340 = __builtin_expect (D.16339, 0);
      if (D.16340 != 0) goto <D.16341>; else goto <D.16342>;
      <D.16341>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 746, "klass");
      <D.16342>:
      mono_class_init (klass);
      iter = 0B;
      goto <D.15990>;
      <D.15989>:
      {
        size_t __s1_len;
        size_t __s2_len;

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

          __s2 = mono_method_get_name (method);
          D.16346 = ".ctor";
          D.16347 = MEM[(const unsigned char *)D.16346];
          D.16348 = (int) D.16347;
          D.16349 = *__s2;
          D.16350 = (int) D.16349;
          __result = D.16348 - D.16350;
          {
            if (__s1_len != 0) goto <D.16351>; else goto <D.16352>;
            <D.16351>:
            if (__result == 0) goto <D.16353>; else goto <D.16354>;
            <D.16353>:
            D.16355 = &MEM[(void *)".ctor" + 1B];
            D.16356 = *D.16355;
            D.16357 = (int) D.16356;
            D.16358 = __s2 + 1;
            D.16359 = *D.16358;
            D.16360 = (int) D.16359;
            __result = D.16357 - D.16360;
            if (__s1_len > 1) goto <D.16361>; else goto <D.16362>;
            <D.16361>:
            if (__result == 0) goto <D.16363>; else goto <D.16364>;
            <D.16363>:
            D.16365 = &MEM[(void *)".ctor" + 2B];
            D.16366 = *D.16365;
            D.16367 = (int) D.16366;
            D.16368 = __s2 + 2;
            D.16369 = *D.16368;
            D.16370 = (int) D.16369;
            __result = D.16367 - D.16370;
            if (__s1_len > 2) goto <D.16371>; else goto <D.16372>;
            <D.16371>:
            if (__result == 0) goto <D.16373>; else goto <D.16374>;
            <D.16373>:
            D.16375 = &MEM[(void *)".ctor" + 3B];
            D.16376 = *D.16375;
            D.16377 = (int) D.16376;
            D.16378 = __s2 + 3;
            D.16379 = *D.16378;
            D.16380 = (int) D.16379;
            __result = D.16377 - D.16380;
            <D.16374>:
            <D.16372>:
            <D.16364>:
            <D.16362>:
            <D.16354>:
            <D.16352>:
          }
          D.15982 = __result;
        }
        iftmp.5 = D.15982;
        goto <D.16381>;
        <D.16345>:
        D.16382 = mono_method_get_name (method);
        iftmp.5 = __builtin_strcmp (".ctor", D.16382);
        <D.16381>:
        D.15986 = iftmp.5;
      }
      if (D.15986 == 0) goto <D.16383>; else goto <D.16384>;
      <D.16383>:
      {
        struct MonoMethodSignature * sig;

        sig = mono_method_signature (method);
        D.16385 = sig->param_count;
        if (D.16385 == 2) goto <D.16386>; else goto <D.16387>;
        <D.16386>:
        D.16388 = sig->params[0];
        D.16389 = D.16388->type;
        if (D.16389 == 29) goto <D.16390>; else goto <D.16391>;
        <D.16390>:
        D.16392 = sig->params[1];
        D.16393 = D.16392->type;
        if (D.16393 == 29) goto <D.15988>; else goto <D.16394>;
        <D.16394>:
        <D.16391>:
        <D.16387>:
      }
      <D.16384>:
      method = 0B;
      <D.15990>:
      method = mono_class_get_methods (klass, &iter);
      if (method != 0B) goto <D.15989>; else goto <D.15988>;
      <D.15988>:
      D.16395 = method == 0B;
      D.16396 = (long int) D.16395;
      D.16397 = __builtin_expect (D.16396, 0);
      if (D.16397 != 0) goto <D.16398>; else goto <D.16399>;
      <D.16398>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 760, "method");
      <D.16399>:
      args[0] = types;
      args[1] = exceptions;
      D.16400 = mono_domain_get ();
      exc = mono_object_new (D.16400, klass);
      mono_runtime_invoke (method, exc, &args, 0B);
      D.16401 = exc;
      return D.16401;
    }
  finally
    {
      args = {CLOBBER};
      iter = {CLOBBER};
    }
}


mono_get_exception_runtime_wrapped (struct MonoObject * wrapped_exception)
{
  struct MonoImage * D.16404;
  struct MonoObject * * D.16405;
  struct MonoException * D.16406;
  struct MonoRuntimeWrappedException * ex;

  D.16404 = mono_get_corlib ();
  ex = mono_exception_from_name (D.16404, "System.Runtime.CompilerServices", "RuntimeWrappedException");
  D.16405 = &ex->wrapped_exception;
  mono_gc_wbarrier_set_field (ex, D.16405, wrapped_exception);
  D.16406 = ex;
  return D.16406;
}


mono_exception_get_managed_backtrace (struct MonoException * exc)
{
  struct MonoRuntimeExceptionHandlingCallbacks * D.16408;
  gboolean (*<T251b>) (struct MonoException *, gboolean (*MonoInternalExceptionFrameWalk) (struct MonoMethod *, void *, size_t, gboolean, void *), void *) D.16409;
  int D.16410;
  char * D.16413;
  struct GString * text;

  text = monoeg_g_string_new_len (0B, 20);
  D.16408 = mono_get_eh_callbacks ();
  D.16409 = D.16408->mono_exception_walk_trace;
  D.16410 = D.16409 (exc, append_frame_and_continue, text);
  if (D.16410 == 0) goto <D.16411>; else goto <D.16412>;
  <D.16411>:
  monoeg_g_string_append (text, "managed backtrace not available\n");
  <D.16412>:
  D.16413 = monoeg_g_string_free (text, 0);
  return D.16413;
}


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

  domain = mono_domain_get ();
  text = user_data;
  if (method != 0B) goto <D.16415>; else goto <D.16416>;
  <D.16415>:
  {
    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.16417>;
  <D.16416>:
  monoeg_g_string_append_printf (text, "<unknown native frame 0x%x>\n", ip);
  <D.16417>:
  D.16418 = 0;
  return D.16418;
}


mono_exception_get_native_backtrace (struct MonoException * exc)
{
  char * D.16422;
  unsigned int D.16423;
  int D.16424;
  char * D.16425;
  unsigned int i.6;
  char * D.16427;
  struct MonoDomain * D.16428;
  struct MonoMethod * D.16431;
  int ip.7;
  void * D.16433;
  int D.16434;
  int D.16435;
  unsigned int D.16436;
  unsigned int i.8;
  unsigned int D.16439;
  char * * D.16440;
  char * D.16441;
  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.16420>; else goto <D.16421>;
  <D.16420>:
  D.16422 = monoeg_strdup ("");
  return D.16422;
  <D.16421>:
  domain = mono_domain_get ();
  D.16423 = mono_array_length (arr);
  len = (int) D.16423;
  D.16424 = len * 20;
  text = monoeg_g_string_new_len (0B, D.16424);
  D.16425 = mono_array_addr_with_size (arr, 4, 0);
  messages = backtrace_symbols (D.16425, len);
  i = 0;
  goto <D.16022>;
  <D.16021>:
  {
    void * ip;
    struct MonoJitInfo * ji;

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

      D.16431 = mono_jit_info_get_method (ji);
      ip.7 = (int) ip;
      D.16433 = ji->code_start;
      D.16434 = (int) D.16433;
      D.16435 = ip.7 - D.16434;
      D.16436 = (unsigned int) D.16435;
      msg = mono_debug_print_stack_frame (D.16431, D.16436, domain);
      monoeg_g_string_append_printf (text, "%s\n", msg);
      monoeg_g_free (msg);
    }
    goto <D.16437>;
    <D.16430>:
    i.8 = (unsigned int) i;
    D.16439 = i.8 * 4;
    D.16440 = messages + D.16439;
    D.16441 = *D.16440;
    monoeg_g_string_append_printf (text, "%s\n", D.16441);
    <D.16437>:
  }
  i = i + 1;
  <D.16022>:
  if (i < len) goto <D.16021>; else goto <D.16023>;
  <D.16023>:
  free (messages);
  D.16422 = monoeg_g_string_free (text, 0);
  return D.16422;
}


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

  if (str != 0B) goto <D.16443>; else goto <D.16444>;
  <D.16443>:
  D.16445 = __strdup (str);
  return D.16445;
  <D.16444>:
  D.16445 = 0B;
  return D.16445;
}


ves_icall_Mono_Runtime_GetNativeStackTrace (struct MonoException * exc)
{
  struct MonoException * D.16449;
  struct MonoDomain * D.16450;
  struct MonoString * D.16451;
  char * trace;
  struct MonoString * res;

  if (exc == 0B) goto <D.16447>; else goto <D.16448>;
  <D.16447>:
  D.16449 = mono_get_exception_argument_null ("exception");
  mono_raise_exception (D.16449);
  <D.16448>:
  trace = mono_exception_get_native_backtrace (exc);
  D.16450 = mono_domain_get ();
  res = mono_string_new (D.16450, trace);
  monoeg_g_free (trace);
  D.16451 = res;
  return D.16451;
}


