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

  D.16065 = mono_domain_get ();
  D.16064 = mono_exception_from_name_domain (D.16065, image, name_space, name);
  return D.16064;
}


mono_exception_from_name_domain (struct MonoDomain * domain, struct MonoImage * image, const char * name_space, const char * name)
{
  _Bool D.16067;
  long int D.16068;
  long int D.16069;
  struct MonoException * D.16076;
  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.16067 = o == 0B;
  D.16068 = (long int) D.16067;
  D.16069 = __builtin_expect (D.16068, 0);
  if (D.16069 != 0) goto <D.16070>; else goto <D.16071>;
  <D.16070>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 66, "o != NULL");
  <D.16071>:
  if (domain != caller_domain) goto <D.16072>; else goto <D.16073>;
  <D.16072>:
  mono_domain_set_internal (domain);
  <D.16073>:
  mono_runtime_object_init (o);
  if (domain != caller_domain) goto <D.16074>; else goto <D.16075>;
  <D.16074>:
  mono_domain_set_internal (caller_domain);
  <D.16075>:
  D.16076 = o;
  return D.16076;
}


mono_exception_from_token (struct MonoImage * image, guint32 token)
{
  struct MonoDomain * D.16078;
  _Bool D.16079;
  long int D.16080;
  long int D.16081;
  struct MonoException * D.16084;
  struct MonoClass * klass;
  struct MonoObject * o;

  klass = mono_class_get (image, token);
  D.16078 = mono_domain_get ();
  o = mono_object_new (D.16078, klass);
  D.16079 = o == 0B;
  D.16080 = (long int) D.16079;
  D.16081 = __builtin_expect (D.16080, 0);
  if (D.16081 != 0) goto <D.16082>; else goto <D.16083>;
  <D.16082>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 96, "o != NULL");
  <D.16083>:
  mono_runtime_object_init (o);
  D.16084 = o;
  return D.16084;
}


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

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


create_exception_two_strings (struct MonoClass * klass, struct MonoString * a1, struct MonoString * a2)
{
  int D.15838;
  int iftmp.0;
  int D.15834;
  const char[6] * D.16093;
  unsigned char D.16094;
  int D.16095;
  unsigned char D.16096;
  int D.16097;
  _Bool D.16098;
  _Bool D.16099;
  _Bool D.16100;
  const unsigned char * D.16103;
  unsigned char D.16104;
  int D.16105;
  const unsigned char * D.16106;
  unsigned char D.16107;
  int D.16108;
  _Bool D.16109;
  _Bool D.16110;
  const unsigned char * D.16113;
  unsigned char D.16114;
  int D.16115;
  const unsigned char * D.16116;
  unsigned char D.16117;
  int D.16118;
  _Bool D.16119;
  _Bool D.16120;
  const unsigned char * D.16123;
  unsigned char D.16124;
  int D.16125;
  const unsigned char * D.16126;
  unsigned char D.16127;
  int D.16128;
  const char * D.16130;
  short unsigned int D.16133;
  int D.16134;
  struct MonoType * D.16137;
  unsigned char D.16138;
  struct MonoType * D.16143;
  unsigned char D.16144;
  struct MonoException * D.16147;
  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.16088>; else goto <D.16089>;
      <D.16088>:
      count = count + 1;
      <D.16089>:
      o = mono_object_new (domain, klass);
      iter = 0B;
      goto <D.15839>;
      <D.15841>:
      {
        struct MonoMethodSignature * sig;

        {
          size_t __s1_len;
          size_t __s2_len;

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

            __s2 = mono_method_get_name (m);
            D.16093 = ".ctor";
            D.16094 = MEM[(const unsigned char *)D.16093];
            D.16095 = (int) D.16094;
            D.16096 = *__s2;
            D.16097 = (int) D.16096;
            __result = D.16095 - D.16097;
            {
              D.16098 = __s1_len != 0;
              D.16099 = __result == 0;
              D.16100 = D.16098 & D.16099;
              if (D.16100 != 0) goto <D.16101>; else goto <D.16102>;
              <D.16101>:
              D.16103 = &MEM[(void *)".ctor" + 1B];
              D.16104 = *D.16103;
              D.16105 = (int) D.16104;
              D.16106 = __s2 + 1;
              D.16107 = *D.16106;
              D.16108 = (int) D.16107;
              __result = D.16105 - D.16108;
              D.16109 = __s1_len > 1;
              D.16099 = __result == 0;
              D.16110 = D.16109 & D.16099;
              if (D.16110 != 0) goto <D.16111>; else goto <D.16112>;
              <D.16111>:
              D.16113 = &MEM[(void *)".ctor" + 2B];
              D.16114 = *D.16113;
              D.16115 = (int) D.16114;
              D.16116 = __s2 + 2;
              D.16117 = *D.16116;
              D.16118 = (int) D.16117;
              __result = D.16115 - D.16118;
              D.16119 = __s1_len > 2;
              D.16099 = __result == 0;
              D.16120 = D.16119 & D.16099;
              if (D.16120 != 0) goto <D.16121>; else goto <D.16122>;
              <D.16121>:
              D.16123 = &MEM[(void *)".ctor" + 3B];
              D.16124 = *D.16123;
              D.16125 = (int) D.16124;
              D.16126 = __s2 + 3;
              D.16127 = *D.16126;
              D.16128 = (int) D.16127;
              __result = D.16125 - D.16128;
              <D.16122>:
              <D.16112>:
              <D.16102>:
            }
            D.15834 = __result;
          }
          iftmp.0 = D.15834;
          goto <D.16129>;
          <D.16092>:
          D.16130 = mono_method_get_name (m);
          iftmp.0 = __builtin_strcmp (".ctor", D.16130);
          <D.16129>:
          D.15838 = iftmp.0;
        }
        if (D.15838 != 0) goto <D.16131>; else goto <D.16132>;
        <D.16131>:
        // predicted unlikely by continue predictor.
        goto <D.15839>;
        <D.16132>:
        sig = mono_method_signature (m);
        D.16133 = sig->param_count;
        D.16134 = (int) D.16133;
        if (D.16134 != count) goto <D.16135>; else goto <D.16136>;
        <D.16135>:
        // predicted unlikely by continue predictor.
        goto <D.15839>;
        <D.16136>:
        D.16137 = sig->params[0];
        D.16138 = D.16137->type;
        if (D.16138 != 14) goto <D.16139>; else goto <D.16140>;
        <D.16139>:
        // predicted unlikely by continue predictor.
        goto <D.15839>;
        <D.16140>:
        if (count == 2) goto <D.16141>; else goto <D.16142>;
        <D.16141>:
        D.16143 = sig->params[1];
        D.16144 = D.16143->type;
        if (D.16144 != 14) goto <D.16145>; else goto <D.16146>;
        <D.16145>:
        // predicted unlikely by continue predictor.
        goto <D.15839>;
        <D.16146>:
        <D.16142>:
        method = m;
        goto <D.15840>;
      }
      <D.15839>:
      m = mono_class_get_methods (klass, &iter);
      if (m != 0B) goto <D.15841>; else goto <D.15840>;
      <D.15840>:
      args[0] = a1;
      args[1] = a2;
      mono_runtime_invoke (method, o, &args, 0B);
      D.16147 = o;
      return D.16147;
    }
  finally
    {
      args = {CLOBBER};
      iter = {CLOBBER};
    }
}


mono_exception_from_name_msg (struct MonoImage * image, const char * name_space, const char * name, const char * msg)
{
  struct MonoDomain * D.16152;
  struct MonoString * D.16153;
  struct MonoString * * D.16154;
  struct MonoException * D.16155;
  struct MonoException * ex;

  ex = mono_exception_from_name (image, name_space, name);
  if (msg != 0B) goto <D.16150>; else goto <D.16151>;
  <D.16150>:
  D.16152 = mono_object_get_domain (ex);
  D.16153 = mono_string_new (D.16152, msg);
  D.16154 = &ex->message;
  mono_gc_wbarrier_set_field (ex, D.16154, D.16153);
  <D.16151>:
  D.16155 = ex;
  return D.16155;
}


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

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


mono_get_exception_divide_by_zero ()
{
  struct MonoException * D.16159;
  struct MonoImage * D.16160;

  D.16160 = mono_get_corlib ();
  D.16159 = mono_exception_from_name (D.16160, "System", "DivideByZeroException");
  return D.16159;
}


mono_get_exception_security ()
{
  struct MonoException * D.16162;
  struct MonoImage * D.16163;

  D.16163 = mono_get_corlib ();
  D.16162 = mono_exception_from_name (D.16163, "System.Security", "SecurityException");
  return D.16162;
}


mono_get_exception_thread_abort ()
{
  struct MonoException * D.16165;
  struct MonoImage * D.16166;

  D.16166 = mono_get_corlib ();
  D.16165 = mono_exception_from_name (D.16166, "System.Threading", "ThreadAbortException");
  return D.16165;
}


mono_get_exception_thread_interrupted ()
{
  struct MonoException * D.16168;
  struct MonoImage * D.16169;

  D.16169 = mono_get_corlib ();
  D.16168 = mono_exception_from_name (D.16169, "System.Threading", "ThreadInterruptedException");
  return D.16168;
}


mono_get_exception_arithmetic ()
{
  struct MonoException * D.16171;
  struct MonoImage * D.16172;

  D.16172 = mono_get_corlib ();
  D.16171 = mono_exception_from_name (D.16172, "System", "ArithmeticException");
  return D.16171;
}


mono_get_exception_overflow ()
{
  struct MonoException * D.16174;
  struct MonoImage * D.16175;

  D.16175 = mono_get_corlib ();
  D.16174 = mono_exception_from_name (D.16175, "System", "OverflowException");
  return D.16174;
}


mono_get_exception_null_reference ()
{
  struct MonoException * D.16177;
  struct MonoImage * D.16178;

  D.16178 = mono_get_corlib ();
  D.16177 = mono_exception_from_name (D.16178, "System", "NullReferenceException");
  return D.16177;
}


mono_get_exception_execution_engine (const char * msg)
{
  struct MonoException * D.16180;
  struct MonoImage * D.16181;

  D.16181 = mono_get_corlib ();
  D.16180 = mono_exception_from_name_msg (D.16181, "System", "ExecutionEngineException", msg);
  return D.16180;
}


mono_get_exception_serialization (const char * msg)
{
  struct MonoException * D.16183;
  struct MonoImage * D.16184;

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


mono_get_exception_invalid_cast ()
{
  struct MonoException * D.16186;
  struct MonoImage * D.16187;

  D.16187 = mono_get_corlib ();
  D.16186 = mono_exception_from_name (D.16187, "System", "InvalidCastException");
  return D.16186;
}


mono_get_exception_invalid_operation (const char * msg)
{
  struct MonoException * D.16189;
  struct MonoImage * D.16190;

  D.16190 = mono_get_corlib ();
  D.16189 = mono_exception_from_name_msg (D.16190, "System", "InvalidOperationException", msg);
  return D.16189;
}


mono_get_exception_index_out_of_range ()
{
  struct MonoException * D.16192;
  struct MonoImage * D.16193;

  D.16193 = mono_get_corlib ();
  D.16192 = mono_exception_from_name (D.16193, "System", "IndexOutOfRangeException");
  return D.16192;
}


mono_get_exception_array_type_mismatch ()
{
  struct MonoException * D.16195;
  struct MonoImage * D.16196;

  D.16196 = mono_get_corlib ();
  D.16195 = mono_exception_from_name (D.16196, "System", "ArrayTypeMismatchException");
  return D.16195;
}


mono_get_exception_type_load (struct MonoString * class_name, char * assembly_name)
{
  struct MonoString * iftmp.1;
  struct MonoDomain * D.16201;
  struct MonoDomain * D.16203;
  struct MonoException * D.16204;
  struct MonoImage * D.16205;
  struct MonoString * s;

  if (assembly_name != 0B) goto <D.16199>; else goto <D.16200>;
  <D.16199>:
  D.16201 = mono_domain_get ();
  iftmp.1 = mono_string_new (D.16201, assembly_name);
  goto <D.16202>;
  <D.16200>:
  D.16203 = mono_domain_get ();
  iftmp.1 = mono_string_new (D.16203, "");
  <D.16202>:
  s = iftmp.1;
  D.16205 = mono_get_corlib ();
  D.16204 = mono_exception_from_name_two_strings (D.16205, "System", "TypeLoadException", class_name, s);
  return D.16204;
}


mono_get_exception_not_implemented (const char * msg)
{
  struct MonoException * D.16207;
  struct MonoImage * D.16208;

  D.16208 = mono_get_corlib ();
  D.16207 = mono_exception_from_name_msg (D.16208, "System", "NotImplementedException", msg);
  return D.16207;
}


mono_get_exception_not_supported (const char * msg)
{
  struct MonoException * D.16210;
  struct MonoImage * D.16211;

  D.16211 = mono_get_corlib ();
  D.16210 = mono_exception_from_name_msg (D.16211, "System", "NotSupportedException", msg);
  return D.16210;
}


mono_get_exception_missing_method (const char * class_name, const char * member_name)
{
  struct MonoDomain * D.16213;
  struct MonoDomain * D.16214;
  struct MonoException * D.16215;
  struct MonoImage * D.16216;
  struct MonoString * s1;
  struct MonoString * s2;

  D.16213 = mono_domain_get ();
  s1 = mono_string_new (D.16213, class_name);
  D.16214 = mono_domain_get ();
  s2 = mono_string_new (D.16214, member_name);
  D.16216 = mono_get_corlib ();
  D.16215 = mono_exception_from_name_two_strings (D.16216, "System", "MissingMethodException", s1, s2);
  return D.16215;
}


mono_get_exception_missing_field (const char * class_name, const char * member_name)
{
  struct MonoDomain * D.16218;
  struct MonoDomain * D.16219;
  struct MonoException * D.16220;
  struct MonoImage * D.16221;
  struct MonoString * s1;
  struct MonoString * s2;

  D.16218 = mono_domain_get ();
  s1 = mono_string_new (D.16218, class_name);
  D.16219 = mono_domain_get ();
  s2 = mono_string_new (D.16219, member_name);
  D.16221 = mono_get_corlib ();
  D.16220 = mono_exception_from_name_two_strings (D.16221, "System", "MissingFieldException", s1, s2);
  return D.16220;
}


mono_get_exception_argument_null (const char * arg)
{
  struct MonoImage * D.16223;
  struct MonoDomain * D.16226;
  struct MonoString * D.16227;
  struct MonoString * * D.16228;
  struct MonoException * D.16229;
  struct MonoException * ex;

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

    argex = ex;
    D.16226 = mono_object_get_domain (ex);
    D.16227 = mono_string_new (D.16226, arg);
    D.16228 = &argex->param_name;
    mono_gc_wbarrier_set_field (argex, D.16228, D.16227);
  }
  <D.16225>:
  D.16229 = ex;
  return D.16229;
}


mono_get_exception_argument (const char * arg, const char * msg)
{
  struct MonoImage * D.16231;
  struct MonoDomain * D.16234;
  struct MonoString * D.16235;
  struct MonoString * * D.16236;
  struct MonoException * D.16237;
  struct MonoException * ex;

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

    argex = ex;
    D.16234 = mono_object_get_domain (ex);
    D.16235 = mono_string_new (D.16234, arg);
    D.16236 = &argex->param_name;
    mono_gc_wbarrier_set_field (argex, D.16236, D.16235);
  }
  <D.16233>:
  D.16237 = ex;
  return D.16237;
}


mono_get_exception_argument_out_of_range (const char * arg)
{
  struct MonoImage * D.16239;
  struct MonoDomain * D.16242;
  struct MonoString * D.16243;
  struct MonoString * * D.16244;
  struct MonoException * D.16245;
  struct MonoException * ex;

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

    argex = ex;
    D.16242 = mono_object_get_domain (ex);
    D.16243 = mono_string_new (D.16242, arg);
    D.16244 = &argex->param_name;
    mono_gc_wbarrier_set_field (argex, D.16244, D.16243);
  }
  <D.16241>:
  D.16245 = ex;
  return D.16245;
}


mono_get_exception_thread_state (const char * msg)
{
  struct MonoException * D.16247;
  struct MonoImage * D.16248;

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


mono_get_exception_io (const char * msg)
{
  struct MonoException * D.16250;
  struct MonoImage * D.16251;

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


mono_get_exception_file_not_found (struct MonoString * fname)
{
  struct MonoException * D.16253;
  struct MonoImage * D.16254;

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


mono_get_exception_file_not_found2 (const char * msg, struct MonoString * fname)
{
  struct MonoString * iftmp.2;
  struct MonoDomain * D.16259;
  struct MonoException * D.16261;
  struct MonoImage * D.16262;
  struct MonoString * s;

  if (msg != 0B) goto <D.16257>; else goto <D.16258>;
  <D.16257>:
  D.16259 = mono_domain_get ();
  iftmp.2 = mono_string_new (D.16259, msg);
  goto <D.16260>;
  <D.16258>:
  iftmp.2 = 0B;
  <D.16260>:
  s = iftmp.2;
  D.16262 = mono_get_corlib ();
  D.16261 = mono_exception_from_name_two_strings (D.16262, "System.IO", "FileNotFoundException", s, fname);
  return D.16261;
}


mono_get_exception_type_initialization (const gchar * type_name, struct MonoException * inner)
{
  struct MonoImage * D.16264;
  _Bool D.16265;
  long int D.16266;
  long int D.16267;
  int D.15963;
  int iftmp.3;
  int D.15959;
  const char[6] * D.16273;
  unsigned char D.16274;
  int D.16275;
  unsigned char D.16276;
  int D.16277;
  _Bool D.16278;
  _Bool D.16279;
  _Bool D.16280;
  const unsigned char * D.16283;
  unsigned char D.16284;
  int D.16285;
  const unsigned char * D.16286;
  unsigned char D.16287;
  int D.16288;
  _Bool D.16289;
  _Bool D.16290;
  const unsigned char * D.16293;
  unsigned char D.16294;
  int D.16295;
  const unsigned char * D.16296;
  unsigned char D.16297;
  int D.16298;
  _Bool D.16299;
  _Bool D.16300;
  const unsigned char * D.16303;
  unsigned char D.16304;
  int D.16305;
  const unsigned char * D.16306;
  unsigned char D.16307;
  int D.16308;
  const char * D.16310;
  short unsigned int D.16313;
  struct MonoType * D.16316;
  unsigned char D.16317;
  struct MonoType * D.16320;
  struct MonoClass * D.16321;
  struct MonoClass * D.16322;
  _Bool D.16324;
  long int D.16325;
  long int D.16326;
  struct MonoDomain * D.16329;
  struct MonoString * D.16330;
  struct MonoDomain * D.16331;
  struct MonoException * D.16332;
  struct MonoClass * klass;
  void * args[2];
  struct MonoObject * exc;
  struct MonoMethod * method;
  void * iter;

  try
    {
      D.16264 = mono_get_corlib ();
      klass = mono_class_from_name (D.16264, "System", "TypeInitializationException");
      D.16265 = klass == 0B;
      D.16266 = (long int) D.16265;
      D.16267 = __builtin_expect (D.16266, 0);
      if (D.16267 != 0) goto <D.16268>; else goto <D.16269>;
      <D.16268>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 573, "klass");
      <D.16269>:
      mono_class_init (klass);
      iter = 0B;
      goto <D.15967>;
      <D.15966>:
      {
        size_t __s1_len;
        size_t __s2_len;

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

          __s2 = mono_method_get_name (method);
          D.16273 = ".ctor";
          D.16274 = MEM[(const unsigned char *)D.16273];
          D.16275 = (int) D.16274;
          D.16276 = *__s2;
          D.16277 = (int) D.16276;
          __result = D.16275 - D.16277;
          {
            D.16278 = __s1_len != 0;
            D.16279 = __result == 0;
            D.16280 = D.16278 & D.16279;
            if (D.16280 != 0) goto <D.16281>; else goto <D.16282>;
            <D.16281>:
            D.16283 = &MEM[(void *)".ctor" + 1B];
            D.16284 = *D.16283;
            D.16285 = (int) D.16284;
            D.16286 = __s2 + 1;
            D.16287 = *D.16286;
            D.16288 = (int) D.16287;
            __result = D.16285 - D.16288;
            D.16289 = __s1_len > 1;
            D.16279 = __result == 0;
            D.16290 = D.16289 & D.16279;
            if (D.16290 != 0) goto <D.16291>; else goto <D.16292>;
            <D.16291>:
            D.16293 = &MEM[(void *)".ctor" + 2B];
            D.16294 = *D.16293;
            D.16295 = (int) D.16294;
            D.16296 = __s2 + 2;
            D.16297 = *D.16296;
            D.16298 = (int) D.16297;
            __result = D.16295 - D.16298;
            D.16299 = __s1_len > 2;
            D.16279 = __result == 0;
            D.16300 = D.16299 & D.16279;
            if (D.16300 != 0) goto <D.16301>; else goto <D.16302>;
            <D.16301>:
            D.16303 = &MEM[(void *)".ctor" + 3B];
            D.16304 = *D.16303;
            D.16305 = (int) D.16304;
            D.16306 = __s2 + 3;
            D.16307 = *D.16306;
            D.16308 = (int) D.16307;
            __result = D.16305 - D.16308;
            <D.16302>:
            <D.16292>:
            <D.16282>:
          }
          D.15959 = __result;
        }
        iftmp.3 = D.15959;
        goto <D.16309>;
        <D.16272>:
        D.16310 = mono_method_get_name (method);
        iftmp.3 = __builtin_strcmp (".ctor", D.16310);
        <D.16309>:
        D.15963 = iftmp.3;
      }
      if (D.15963 == 0) goto <D.16311>; else goto <D.16312>;
      <D.16311>:
      {
        struct MonoMethodSignature * sig;

        sig = mono_method_signature (method);
        D.16313 = sig->param_count;
        if (D.16313 == 2) goto <D.16314>; else goto <D.16315>;
        <D.16314>:
        D.16316 = sig->params[0];
        D.16317 = D.16316->type;
        if (D.16317 == 14) goto <D.16318>; else goto <D.16319>;
        <D.16318>:
        D.16320 = sig->params[1];
        D.16321 = mono_class_from_mono_type (D.16320);
        D.16322 = mono_defaults.exception_class;
        if (D.16321 == D.16322) goto <D.15965>; else goto <D.16323>;
        <D.16323>:
        <D.16319>:
        <D.16315>:
      }
      <D.16312>:
      method = 0B;
      <D.15967>:
      method = mono_class_get_methods (klass, &iter);
      if (method != 0B) goto <D.15966>; else goto <D.15965>;
      <D.15965>:
      D.16324 = method == 0B;
      D.16325 = (long int) D.16324;
      D.16326 = __builtin_expect (D.16325, 0);
      if (D.16326 != 0) goto <D.16327>; else goto <D.16328>;
      <D.16327>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 587, "method");
      <D.16328>:
      D.16329 = mono_domain_get ();
      D.16330 = mono_string_new (D.16329, type_name);
      args[0] = D.16330;
      args[1] = inner;
      D.16331 = mono_domain_get ();
      exc = mono_object_new (D.16331, klass);
      mono_runtime_invoke (method, exc, &args, 0B);
      D.16332 = exc;
      return D.16332;
    }
  finally
    {
      args = {CLOBBER};
      iter = {CLOBBER};
    }
}


mono_get_exception_synchronization_lock (const char * msg)
{
  struct MonoException * D.16335;
  struct MonoImage * D.16336;

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


mono_get_exception_cannot_unload_appdomain (const char * msg)
{
  struct MonoException * D.16338;
  struct MonoImage * D.16339;

  D.16339 = mono_get_corlib ();
  D.16338 = mono_exception_from_name_msg (D.16339, "System", "CannotUnloadAppDomainException", msg);
  return D.16338;
}


mono_get_exception_appdomain_unloaded ()
{
  struct MonoException * D.16341;
  struct MonoImage * D.16342;

  D.16342 = mono_get_corlib ();
  D.16341 = mono_exception_from_name (D.16342, "System", "AppDomainUnloadedException");
  return D.16341;
}


mono_get_exception_bad_image_format (const char * msg)
{
  struct MonoException * D.16344;
  struct MonoImage * D.16345;

  D.16345 = mono_get_corlib ();
  D.16344 = mono_exception_from_name_msg (D.16345, "System", "BadImageFormatException", msg);
  return D.16344;
}


mono_get_exception_bad_image_format2 (const char * msg, struct MonoString * fname)
{
  struct MonoString * iftmp.4;
  struct MonoDomain * D.16350;
  struct MonoException * D.16352;
  struct MonoImage * D.16353;
  struct MonoString * s;

  if (msg != 0B) goto <D.16348>; else goto <D.16349>;
  <D.16348>:
  D.16350 = mono_domain_get ();
  iftmp.4 = mono_string_new (D.16350, msg);
  goto <D.16351>;
  <D.16349>:
  iftmp.4 = 0B;
  <D.16351>:
  s = iftmp.4;
  D.16353 = mono_get_corlib ();
  D.16352 = mono_exception_from_name_two_strings (D.16353, "System", "BadImageFormatException", s, fname);
  return D.16352;
}


mono_get_exception_stack_overflow ()
{
  struct MonoException * D.16355;
  struct MonoImage * D.16356;

  D.16356 = mono_get_corlib ();
  D.16355 = mono_exception_from_name (D.16356, "System", "StackOverflowException");
  return D.16355;
}


mono_get_exception_out_of_memory ()
{
  struct MonoException * D.16358;
  struct MonoImage * D.16359;

  D.16359 = mono_get_corlib ();
  D.16358 = mono_exception_from_name (D.16359, "System", "OutOfMemoryException");
  return D.16358;
}


mono_get_exception_field_access ()
{
  struct MonoException * D.16361;
  struct MonoImage * D.16362;

  D.16362 = mono_get_corlib ();
  D.16361 = mono_exception_from_name (D.16362, "System", "FieldAccessException");
  return D.16361;
}


mono_get_exception_field_access_msg (const char * msg)
{
  struct MonoException * D.16364;
  struct MonoImage * D.16365;

  D.16365 = mono_get_corlib ();
  D.16364 = mono_exception_from_name_msg (D.16365, "System", "FieldAccessException", msg);
  return D.16364;
}


mono_get_exception_method_access ()
{
  struct MonoException * D.16367;
  struct MonoImage * D.16368;

  D.16368 = mono_get_corlib ();
  D.16367 = mono_exception_from_name (D.16368, "System", "MethodAccessException");
  return D.16367;
}


mono_get_exception_method_access_msg (const char * msg)
{
  struct MonoException * D.16370;
  struct MonoImage * D.16371;

  D.16371 = mono_get_corlib ();
  D.16370 = mono_exception_from_name_msg (D.16371, "System", "MethodAccessException", msg);
  return D.16370;
}


mono_get_exception_reflection_type_load (struct MonoArray * types, struct MonoArray * exceptions)
{
  struct MonoImage * D.16373;
  _Bool D.16374;
  long int D.16375;
  long int D.16376;
  int D.16020;
  int iftmp.5;
  int D.16016;
  const char[6] * D.16382;
  unsigned char D.16383;
  int D.16384;
  unsigned char D.16385;
  int D.16386;
  _Bool D.16387;
  _Bool D.16388;
  _Bool D.16389;
  const unsigned char * D.16392;
  unsigned char D.16393;
  int D.16394;
  const unsigned char * D.16395;
  unsigned char D.16396;
  int D.16397;
  _Bool D.16398;
  _Bool D.16399;
  const unsigned char * D.16402;
  unsigned char D.16403;
  int D.16404;
  const unsigned char * D.16405;
  unsigned char D.16406;
  int D.16407;
  _Bool D.16408;
  _Bool D.16409;
  const unsigned char * D.16412;
  unsigned char D.16413;
  int D.16414;
  const unsigned char * D.16415;
  unsigned char D.16416;
  int D.16417;
  const char * D.16419;
  short unsigned int D.16422;
  struct MonoType * D.16425;
  unsigned char D.16426;
  struct MonoType * D.16429;
  unsigned char D.16430;
  _Bool D.16432;
  long int D.16433;
  long int D.16434;
  struct MonoDomain * D.16437;
  struct MonoException * D.16438;
  struct MonoClass * klass;
  void * args[2];
  struct MonoObject * exc;
  struct MonoMethod * method;
  void * iter;

  try
    {
      D.16373 = mono_get_corlib ();
      klass = mono_class_from_name (D.16373, "System.Reflection", "ReflectionTypeLoadException");
      D.16374 = klass == 0B;
      D.16375 = (long int) D.16374;
      D.16376 = __builtin_expect (D.16375, 0);
      if (D.16376 != 0) goto <D.16377>; else goto <D.16378>;
      <D.16377>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 746, "klass");
      <D.16378>:
      mono_class_init (klass);
      iter = 0B;
      goto <D.16024>;
      <D.16023>:
      {
        size_t __s1_len;
        size_t __s2_len;

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

          __s2 = mono_method_get_name (method);
          D.16382 = ".ctor";
          D.16383 = MEM[(const unsigned char *)D.16382];
          D.16384 = (int) D.16383;
          D.16385 = *__s2;
          D.16386 = (int) D.16385;
          __result = D.16384 - D.16386;
          {
            D.16387 = __s1_len != 0;
            D.16388 = __result == 0;
            D.16389 = D.16387 & D.16388;
            if (D.16389 != 0) goto <D.16390>; else goto <D.16391>;
            <D.16390>:
            D.16392 = &MEM[(void *)".ctor" + 1B];
            D.16393 = *D.16392;
            D.16394 = (int) D.16393;
            D.16395 = __s2 + 1;
            D.16396 = *D.16395;
            D.16397 = (int) D.16396;
            __result = D.16394 - D.16397;
            D.16398 = __s1_len > 1;
            D.16388 = __result == 0;
            D.16399 = D.16398 & D.16388;
            if (D.16399 != 0) goto <D.16400>; else goto <D.16401>;
            <D.16400>:
            D.16402 = &MEM[(void *)".ctor" + 2B];
            D.16403 = *D.16402;
            D.16404 = (int) D.16403;
            D.16405 = __s2 + 2;
            D.16406 = *D.16405;
            D.16407 = (int) D.16406;
            __result = D.16404 - D.16407;
            D.16408 = __s1_len > 2;
            D.16388 = __result == 0;
            D.16409 = D.16408 & D.16388;
            if (D.16409 != 0) goto <D.16410>; else goto <D.16411>;
            <D.16410>:
            D.16412 = &MEM[(void *)".ctor" + 3B];
            D.16413 = *D.16412;
            D.16414 = (int) D.16413;
            D.16415 = __s2 + 3;
            D.16416 = *D.16415;
            D.16417 = (int) D.16416;
            __result = D.16414 - D.16417;
            <D.16411>:
            <D.16401>:
            <D.16391>:
          }
          D.16016 = __result;
        }
        iftmp.5 = D.16016;
        goto <D.16418>;
        <D.16381>:
        D.16419 = mono_method_get_name (method);
        iftmp.5 = __builtin_strcmp (".ctor", D.16419);
        <D.16418>:
        D.16020 = iftmp.5;
      }
      if (D.16020 == 0) goto <D.16420>; else goto <D.16421>;
      <D.16420>:
      {
        struct MonoMethodSignature * sig;

        sig = mono_method_signature (method);
        D.16422 = sig->param_count;
        if (D.16422 == 2) goto <D.16423>; else goto <D.16424>;
        <D.16423>:
        D.16425 = sig->params[0];
        D.16426 = D.16425->type;
        if (D.16426 == 29) goto <D.16427>; else goto <D.16428>;
        <D.16427>:
        D.16429 = sig->params[1];
        D.16430 = D.16429->type;
        if (D.16430 == 29) goto <D.16022>; else goto <D.16431>;
        <D.16431>:
        <D.16428>:
        <D.16424>:
      }
      <D.16421>:
      method = 0B;
      <D.16024>:
      method = mono_class_get_methods (klass, &iter);
      if (method != 0B) goto <D.16023>; else goto <D.16022>;
      <D.16022>:
      D.16432 = method == 0B;
      D.16433 = (long int) D.16432;
      D.16434 = __builtin_expect (D.16433, 0);
      if (D.16434 != 0) goto <D.16435>; else goto <D.16436>;
      <D.16435>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 760, "method");
      <D.16436>:
      args[0] = types;
      args[1] = exceptions;
      D.16437 = mono_domain_get ();
      exc = mono_object_new (D.16437, klass);
      mono_runtime_invoke (method, exc, &args, 0B);
      D.16438 = exc;
      return D.16438;
    }
  finally
    {
      args = {CLOBBER};
      iter = {CLOBBER};
    }
}


mono_get_exception_runtime_wrapped (struct MonoObject * wrapped_exception)
{
  struct MonoImage * D.16441;
  struct MonoObject * * D.16442;
  struct MonoException * D.16443;
  struct MonoRuntimeWrappedException * ex;

  D.16441 = mono_get_corlib ();
  ex = mono_exception_from_name (D.16441, "System.Runtime.CompilerServices", "RuntimeWrappedException");
  D.16442 = &ex->wrapped_exception;
  mono_gc_wbarrier_set_field (ex, D.16442, wrapped_exception);
  D.16443 = ex;
  return D.16443;
}


mono_exception_get_managed_backtrace (struct MonoException * exc)
{
  struct MonoRuntimeExceptionHandlingCallbacks * D.16445;
  gboolean (*<T251f>) (struct MonoException *, gboolean (*MonoInternalExceptionFrameWalk) (struct MonoMethod *, void *, size_t, gboolean, void *), void *) D.16446;
  int D.16447;
  char * D.16450;
  struct GString * text;

  text = monoeg_g_string_new_len (0B, 20);
  D.16445 = mono_get_eh_callbacks ();
  D.16446 = D.16445->mono_exception_walk_trace;
  D.16447 = D.16446 (exc, append_frame_and_continue, text);
  if (D.16447 == 0) goto <D.16448>; else goto <D.16449>;
  <D.16448>:
  monoeg_g_string_append (text, "managed backtrace not available\n");
  <D.16449>:
  D.16450 = monoeg_g_string_free (text, 0);
  return D.16450;
}


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

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


mono_exception_get_native_backtrace (struct MonoException * exc)
{
  char * D.16459;
  unsigned int D.16460;
  int D.16461;
  char * D.16462;
  unsigned int i.6;
  char * D.16464;
  struct MonoDomain * D.16465;
  int ip.7;
  void * D.16469;
  int D.16470;
  int D.16471;
  unsigned int D.16472;
  struct MonoMethod * D.16473;
  unsigned int i.8;
  unsigned int D.16476;
  char * * D.16477;
  char * D.16478;
  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.16457>; else goto <D.16458>;
  <D.16457>:
  D.16459 = monoeg_strdup ("");
  return D.16459;
  <D.16458>:
  domain = mono_domain_get ();
  D.16460 = mono_array_length (arr);
  len = (int) D.16460;
  D.16461 = len * 20;
  text = monoeg_g_string_new_len (0B, D.16461);
  D.16462 = mono_array_addr_with_size (arr, 4, 0);
  messages = backtrace_symbols (D.16462, len);
  i = 0;
  goto <D.16056>;
  <D.16055>:
  {
    void * ip;
    struct MonoJitInfo * ji;

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

      ip.7 = (int) ip;
      D.16469 = ji->code_start;
      D.16470 = (int) D.16469;
      D.16471 = ip.7 - D.16470;
      D.16472 = (unsigned int) D.16471;
      D.16473 = mono_jit_info_get_method (ji);
      msg = mono_debug_print_stack_frame (D.16473, D.16472, domain);
      monoeg_g_string_append_printf (text, "%s\n", msg);
      monoeg_g_free (msg);
    }
    goto <D.16474>;
    <D.16467>:
    i.8 = (unsigned int) i;
    D.16476 = i.8 * 4;
    D.16477 = messages + D.16476;
    D.16478 = *D.16477;
    monoeg_g_string_append_printf (text, "%s\n", D.16478);
    <D.16474>:
  }
  i = i + 1;
  <D.16056>:
  if (i < len) goto <D.16055>; else goto <D.16057>;
  <D.16057>:
  free (messages);
  D.16459 = monoeg_g_string_free (text, 0);
  return D.16459;
}


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

  if (str != 0B) goto <D.16480>; else goto <D.16481>;
  <D.16480>:
  D.16482 = __strdup (str);
  return D.16482;
  <D.16481>:
  D.16482 = 0B;
  return D.16482;
}


ves_icall_Mono_Runtime_GetNativeStackTrace (struct MonoException * exc)
{
  struct MonoException * D.16486;
  struct MonoDomain * D.16487;
  struct MonoString * D.16488;
  char * trace;
  struct MonoString * res;

  if (exc == 0B) goto <D.16484>; else goto <D.16485>;
  <D.16484>:
  D.16486 = mono_get_exception_argument_null ("exception");
  mono_raise_exception (D.16486);
  <D.16485>:
  trace = mono_exception_get_native_backtrace (exc);
  D.16487 = mono_domain_get ();
  res = mono_string_new (D.16487, trace);
  monoeg_g_free (trace);
  D.16488 = res;
  return D.16488;
}


