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

  D.16429 = mono_domain_get ();
  D.16428 = mono_exception_from_name_domain (D.16429, image, name_space, name);
  return D.16428;
}


mono_exception_from_name_domain (struct MonoDomain * domain, struct MonoImage * image, const char * name_space, const char * name)
{
  _Bool D.16431;
  long int D.16432;
  long int D.16433;
  struct MonoException * D.16440;
  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.16431 = o == 0B;
  D.16432 = (long int) D.16431;
  D.16433 = __builtin_expect (D.16432, 0);
  if (D.16433 != 0) goto <D.16434>; else goto <D.16435>;
  <D.16434>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 66, "o != NULL");
  <D.16435>:
  if (domain != caller_domain) goto <D.16436>; else goto <D.16437>;
  <D.16436>:
  mono_domain_set_internal (domain);
  <D.16437>:
  mono_runtime_object_init (o);
  if (domain != caller_domain) goto <D.16438>; else goto <D.16439>;
  <D.16438>:
  mono_domain_set_internal (caller_domain);
  <D.16439>:
  D.16440 = o;
  return D.16440;
}


mono_exception_from_token (struct MonoImage * image, guint32 token)
{
  struct MonoDomain * D.16442;
  _Bool D.16443;
  long int D.16444;
  long int D.16445;
  struct MonoException * D.16448;
  struct MonoClass * klass;
  struct MonoObject * o;

  klass = mono_class_get (image, token);
  D.16442 = mono_domain_get ();
  o = mono_object_new (D.16442, klass);
  D.16443 = o == 0B;
  D.16444 = (long int) D.16443;
  D.16445 = __builtin_expect (D.16444, 0);
  if (D.16445 != 0) goto <D.16446>; else goto <D.16447>;
  <D.16446>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 96, "o != NULL");
  <D.16447>:
  mono_runtime_object_init (o);
  D.16448 = o;
  return D.16448;
}


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

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


create_exception_two_strings (struct MonoClass * klass, struct MonoString * a1, struct MonoString * a2)
{
  int D.16202;
  int iftmp.0;
  int D.16198;
  const char[6] * D.16457;
  unsigned char D.16458;
  int D.16459;
  unsigned char D.16460;
  int D.16461;
  _Bool D.16462;
  _Bool D.16463;
  _Bool D.16464;
  const unsigned char * D.16467;
  unsigned char D.16468;
  int D.16469;
  const unsigned char * D.16470;
  unsigned char D.16471;
  int D.16472;
  _Bool D.16473;
  _Bool D.16474;
  const unsigned char * D.16477;
  unsigned char D.16478;
  int D.16479;
  const unsigned char * D.16480;
  unsigned char D.16481;
  int D.16482;
  _Bool D.16483;
  _Bool D.16484;
  const unsigned char * D.16487;
  unsigned char D.16488;
  int D.16489;
  const unsigned char * D.16490;
  unsigned char D.16491;
  int D.16492;
  const char * D.16494;
  short unsigned int D.16497;
  int D.16498;
  struct MonoType * D.16501;
  unsigned char D.16502;
  struct MonoType * D.16507;
  unsigned char D.16508;
  struct MonoException * D.16511;
  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.16452>; else goto <D.16453>;
      <D.16452>:
      count = count + 1;
      <D.16453>:
      o = mono_object_new (domain, klass);
      iter = 0B;
      goto <D.16203>;
      <D.16205>:
      {
        struct MonoMethodSignature * sig;

        {
          size_t __s1_len;
          size_t __s2_len;

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

            __s2 = mono_method_get_name (m);
            D.16457 = ".ctor";
            D.16458 = MEM[(const unsigned char *)D.16457];
            D.16459 = (int) D.16458;
            D.16460 = *__s2;
            D.16461 = (int) D.16460;
            __result = D.16459 - D.16461;
            {
              D.16462 = __s1_len != 0;
              D.16463 = __result == 0;
              D.16464 = D.16462 & D.16463;
              if (D.16464 != 0) goto <D.16465>; else goto <D.16466>;
              <D.16465>:
              D.16467 = &MEM[(void *)".ctor" + 1B];
              D.16468 = *D.16467;
              D.16469 = (int) D.16468;
              D.16470 = __s2 + 1;
              D.16471 = *D.16470;
              D.16472 = (int) D.16471;
              __result = D.16469 - D.16472;
              D.16473 = __s1_len > 1;
              D.16463 = __result == 0;
              D.16474 = D.16473 & D.16463;
              if (D.16474 != 0) goto <D.16475>; else goto <D.16476>;
              <D.16475>:
              D.16477 = &MEM[(void *)".ctor" + 2B];
              D.16478 = *D.16477;
              D.16479 = (int) D.16478;
              D.16480 = __s2 + 2;
              D.16481 = *D.16480;
              D.16482 = (int) D.16481;
              __result = D.16479 - D.16482;
              D.16483 = __s1_len > 2;
              D.16463 = __result == 0;
              D.16484 = D.16483 & D.16463;
              if (D.16484 != 0) goto <D.16485>; else goto <D.16486>;
              <D.16485>:
              D.16487 = &MEM[(void *)".ctor" + 3B];
              D.16488 = *D.16487;
              D.16489 = (int) D.16488;
              D.16490 = __s2 + 3;
              D.16491 = *D.16490;
              D.16492 = (int) D.16491;
              __result = D.16489 - D.16492;
              <D.16486>:
              <D.16476>:
              <D.16466>:
            }
            D.16198 = __result;
          }
          iftmp.0 = D.16198;
          goto <D.16493>;
          <D.16456>:
          D.16494 = mono_method_get_name (m);
          iftmp.0 = __builtin_strcmp (".ctor", D.16494);
          <D.16493>:
          D.16202 = iftmp.0;
        }
        if (D.16202 != 0) goto <D.16495>; else goto <D.16496>;
        <D.16495>:
        // predicted unlikely by continue predictor.
        goto <D.16203>;
        <D.16496>:
        sig = mono_method_signature (m);
        D.16497 = sig->param_count;
        D.16498 = (int) D.16497;
        if (D.16498 != count) goto <D.16499>; else goto <D.16500>;
        <D.16499>:
        // predicted unlikely by continue predictor.
        goto <D.16203>;
        <D.16500>:
        D.16501 = sig->params[0];
        D.16502 = D.16501->type;
        if (D.16502 != 14) goto <D.16503>; else goto <D.16504>;
        <D.16503>:
        // predicted unlikely by continue predictor.
        goto <D.16203>;
        <D.16504>:
        if (count == 2) goto <D.16505>; else goto <D.16506>;
        <D.16505>:
        D.16507 = sig->params[1];
        D.16508 = D.16507->type;
        if (D.16508 != 14) goto <D.16509>; else goto <D.16510>;
        <D.16509>:
        // predicted unlikely by continue predictor.
        goto <D.16203>;
        <D.16510>:
        <D.16506>:
        method = m;
        goto <D.16204>;
      }
      <D.16203>:
      m = mono_class_get_methods (klass, &iter);
      if (m != 0B) goto <D.16205>; else goto <D.16204>;
      <D.16204>:
      args[0] = a1;
      args[1] = a2;
      mono_runtime_invoke (method, o, &args, 0B);
      D.16511 = o;
      return D.16511;
    }
  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.16516;
  struct MonoString * D.16517;
  struct MonoString * * D.16518;
  struct MonoException * D.16519;
  struct MonoException * ex;

  ex = mono_exception_from_name (image, name_space, name);
  if (msg != 0B) goto <D.16514>; else goto <D.16515>;
  <D.16514>:
  D.16516 = mono_object_get_domain (ex);
  D.16517 = mono_string_new (D.16516, msg);
  D.16518 = &ex->message;
  mono_gc_wbarrier_set_field (ex, D.16518, D.16517);
  <D.16515>:
  D.16519 = ex;
  return D.16519;
}


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

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


mono_get_exception_divide_by_zero ()
{
  struct MonoException * D.16523;
  struct MonoImage * D.16524;

  D.16524 = mono_get_corlib ();
  D.16523 = mono_exception_from_name (D.16524, "System", "DivideByZeroException");
  return D.16523;
}


mono_get_exception_security ()
{
  struct MonoException * D.16526;
  struct MonoImage * D.16527;

  D.16527 = mono_get_corlib ();
  D.16526 = mono_exception_from_name (D.16527, "System.Security", "SecurityException");
  return D.16526;
}


mono_get_exception_thread_abort ()
{
  struct MonoException * D.16529;
  struct MonoImage * D.16530;

  D.16530 = mono_get_corlib ();
  D.16529 = mono_exception_from_name (D.16530, "System.Threading", "ThreadAbortException");
  return D.16529;
}


mono_get_exception_thread_interrupted ()
{
  struct MonoException * D.16532;
  struct MonoImage * D.16533;

  D.16533 = mono_get_corlib ();
  D.16532 = mono_exception_from_name (D.16533, "System.Threading", "ThreadInterruptedException");
  return D.16532;
}


mono_get_exception_arithmetic ()
{
  struct MonoException * D.16535;
  struct MonoImage * D.16536;

  D.16536 = mono_get_corlib ();
  D.16535 = mono_exception_from_name (D.16536, "System", "ArithmeticException");
  return D.16535;
}


mono_get_exception_overflow ()
{
  struct MonoException * D.16538;
  struct MonoImage * D.16539;

  D.16539 = mono_get_corlib ();
  D.16538 = mono_exception_from_name (D.16539, "System", "OverflowException");
  return D.16538;
}


mono_get_exception_null_reference ()
{
  struct MonoException * D.16541;
  struct MonoImage * D.16542;

  D.16542 = mono_get_corlib ();
  D.16541 = mono_exception_from_name (D.16542, "System", "NullReferenceException");
  return D.16541;
}


mono_get_exception_execution_engine (const char * msg)
{
  struct MonoException * D.16544;
  struct MonoImage * D.16545;

  D.16545 = mono_get_corlib ();
  D.16544 = mono_exception_from_name_msg (D.16545, "System", "ExecutionEngineException", msg);
  return D.16544;
}


mono_get_exception_serialization (const char * msg)
{
  struct MonoException * D.16547;
  struct MonoImage * D.16548;

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


mono_get_exception_invalid_cast ()
{
  struct MonoException * D.16550;
  struct MonoImage * D.16551;

  D.16551 = mono_get_corlib ();
  D.16550 = mono_exception_from_name (D.16551, "System", "InvalidCastException");
  return D.16550;
}


mono_get_exception_invalid_operation (const char * msg)
{
  struct MonoException * D.16553;
  struct MonoImage * D.16554;

  D.16554 = mono_get_corlib ();
  D.16553 = mono_exception_from_name_msg (D.16554, "System", "InvalidOperationException", msg);
  return D.16553;
}


mono_get_exception_index_out_of_range ()
{
  struct MonoException * D.16556;
  struct MonoImage * D.16557;

  D.16557 = mono_get_corlib ();
  D.16556 = mono_exception_from_name (D.16557, "System", "IndexOutOfRangeException");
  return D.16556;
}


mono_get_exception_array_type_mismatch ()
{
  struct MonoException * D.16559;
  struct MonoImage * D.16560;

  D.16560 = mono_get_corlib ();
  D.16559 = mono_exception_from_name (D.16560, "System", "ArrayTypeMismatchException");
  return D.16559;
}


mono_get_exception_type_load (struct MonoString * class_name, char * assembly_name)
{
  struct MonoString * iftmp.1;
  struct MonoDomain * D.16565;
  struct MonoDomain * D.16567;
  struct MonoException * D.16568;
  struct MonoImage * D.16569;
  struct MonoString * s;

  if (assembly_name != 0B) goto <D.16563>; else goto <D.16564>;
  <D.16563>:
  D.16565 = mono_domain_get ();
  iftmp.1 = mono_string_new (D.16565, assembly_name);
  goto <D.16566>;
  <D.16564>:
  D.16567 = mono_domain_get ();
  iftmp.1 = mono_string_new (D.16567, "");
  <D.16566>:
  s = iftmp.1;
  D.16569 = mono_get_corlib ();
  D.16568 = mono_exception_from_name_two_strings (D.16569, "System", "TypeLoadException", class_name, s);
  return D.16568;
}


mono_get_exception_not_implemented (const char * msg)
{
  struct MonoException * D.16571;
  struct MonoImage * D.16572;

  D.16572 = mono_get_corlib ();
  D.16571 = mono_exception_from_name_msg (D.16572, "System", "NotImplementedException", msg);
  return D.16571;
}


mono_get_exception_not_supported (const char * msg)
{
  struct MonoException * D.16574;
  struct MonoImage * D.16575;

  D.16575 = mono_get_corlib ();
  D.16574 = mono_exception_from_name_msg (D.16575, "System", "NotSupportedException", msg);
  return D.16574;
}


mono_get_exception_missing_method (const char * class_name, const char * member_name)
{
  struct MonoDomain * D.16577;
  struct MonoDomain * D.16578;
  struct MonoException * D.16579;
  struct MonoImage * D.16580;
  struct MonoString * s1;
  struct MonoString * s2;

  D.16577 = mono_domain_get ();
  s1 = mono_string_new (D.16577, class_name);
  D.16578 = mono_domain_get ();
  s2 = mono_string_new (D.16578, member_name);
  D.16580 = mono_get_corlib ();
  D.16579 = mono_exception_from_name_two_strings (D.16580, "System", "MissingMethodException", s1, s2);
  return D.16579;
}


mono_get_exception_missing_field (const char * class_name, const char * member_name)
{
  struct MonoDomain * D.16582;
  struct MonoDomain * D.16583;
  struct MonoException * D.16584;
  struct MonoImage * D.16585;
  struct MonoString * s1;
  struct MonoString * s2;

  D.16582 = mono_domain_get ();
  s1 = mono_string_new (D.16582, class_name);
  D.16583 = mono_domain_get ();
  s2 = mono_string_new (D.16583, member_name);
  D.16585 = mono_get_corlib ();
  D.16584 = mono_exception_from_name_two_strings (D.16585, "System", "MissingFieldException", s1, s2);
  return D.16584;
}


mono_get_exception_argument_null (const char * arg)
{
  struct MonoImage * D.16587;
  struct MonoDomain * D.16590;
  struct MonoString * D.16591;
  struct MonoString * * D.16592;
  struct MonoException * D.16593;
  struct MonoException * ex;

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

    argex = ex;
    D.16590 = mono_object_get_domain (ex);
    D.16591 = mono_string_new (D.16590, arg);
    D.16592 = &argex->param_name;
    mono_gc_wbarrier_set_field (argex, D.16592, D.16591);
  }
  <D.16589>:
  D.16593 = ex;
  return D.16593;
}


mono_get_exception_argument (const char * arg, const char * msg)
{
  struct MonoImage * D.16595;
  struct MonoDomain * D.16598;
  struct MonoString * D.16599;
  struct MonoString * * D.16600;
  struct MonoException * D.16601;
  struct MonoException * ex;

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

    argex = ex;
    D.16598 = mono_object_get_domain (ex);
    D.16599 = mono_string_new (D.16598, arg);
    D.16600 = &argex->param_name;
    mono_gc_wbarrier_set_field (argex, D.16600, D.16599);
  }
  <D.16597>:
  D.16601 = ex;
  return D.16601;
}


mono_get_exception_argument_out_of_range (const char * arg)
{
  struct MonoImage * D.16603;
  struct MonoDomain * D.16606;
  struct MonoString * D.16607;
  struct MonoString * * D.16608;
  struct MonoException * D.16609;
  struct MonoException * ex;

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

    argex = ex;
    D.16606 = mono_object_get_domain (ex);
    D.16607 = mono_string_new (D.16606, arg);
    D.16608 = &argex->param_name;
    mono_gc_wbarrier_set_field (argex, D.16608, D.16607);
  }
  <D.16605>:
  D.16609 = ex;
  return D.16609;
}


mono_get_exception_thread_state (const char * msg)
{
  struct MonoException * D.16611;
  struct MonoImage * D.16612;

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


mono_get_exception_io (const char * msg)
{
  struct MonoException * D.16614;
  struct MonoImage * D.16615;

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


mono_get_exception_file_not_found (struct MonoString * fname)
{
  struct MonoException * D.16617;
  struct MonoImage * D.16618;

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


mono_get_exception_file_not_found2 (const char * msg, struct MonoString * fname)
{
  struct MonoString * iftmp.2;
  struct MonoDomain * D.16623;
  struct MonoException * D.16625;
  struct MonoImage * D.16626;
  struct MonoString * s;

  if (msg != 0B) goto <D.16621>; else goto <D.16622>;
  <D.16621>:
  D.16623 = mono_domain_get ();
  iftmp.2 = mono_string_new (D.16623, msg);
  goto <D.16624>;
  <D.16622>:
  iftmp.2 = 0B;
  <D.16624>:
  s = iftmp.2;
  D.16626 = mono_get_corlib ();
  D.16625 = mono_exception_from_name_two_strings (D.16626, "System.IO", "FileNotFoundException", s, fname);
  return D.16625;
}


mono_get_exception_type_initialization (const gchar * type_name, struct MonoException * inner)
{
  struct MonoImage * D.16628;
  _Bool D.16629;
  long int D.16630;
  long int D.16631;
  int D.16327;
  int iftmp.3;
  int D.16323;
  const char[6] * D.16637;
  unsigned char D.16638;
  int D.16639;
  unsigned char D.16640;
  int D.16641;
  _Bool D.16642;
  _Bool D.16643;
  _Bool D.16644;
  const unsigned char * D.16647;
  unsigned char D.16648;
  int D.16649;
  const unsigned char * D.16650;
  unsigned char D.16651;
  int D.16652;
  _Bool D.16653;
  _Bool D.16654;
  const unsigned char * D.16657;
  unsigned char D.16658;
  int D.16659;
  const unsigned char * D.16660;
  unsigned char D.16661;
  int D.16662;
  _Bool D.16663;
  _Bool D.16664;
  const unsigned char * D.16667;
  unsigned char D.16668;
  int D.16669;
  const unsigned char * D.16670;
  unsigned char D.16671;
  int D.16672;
  const char * D.16674;
  short unsigned int D.16677;
  struct MonoType * D.16680;
  unsigned char D.16681;
  struct MonoType * D.16684;
  struct MonoClass * D.16685;
  struct MonoClass * D.16686;
  _Bool D.16688;
  long int D.16689;
  long int D.16690;
  struct MonoDomain * D.16693;
  struct MonoString * D.16694;
  struct MonoDomain * D.16695;
  struct MonoException * D.16696;
  struct MonoClass * klass;
  void * args[2];
  struct MonoObject * exc;
  struct MonoMethod * method;
  void * iter;

  try
    {
      D.16628 = mono_get_corlib ();
      klass = mono_class_from_name (D.16628, "System", "TypeInitializationException");
      D.16629 = klass == 0B;
      D.16630 = (long int) D.16629;
      D.16631 = __builtin_expect (D.16630, 0);
      if (D.16631 != 0) goto <D.16632>; else goto <D.16633>;
      <D.16632>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 573, "klass");
      <D.16633>:
      mono_class_init (klass);
      iter = 0B;
      goto <D.16331>;
      <D.16330>:
      {
        size_t __s1_len;
        size_t __s2_len;

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

          __s2 = mono_method_get_name (method);
          D.16637 = ".ctor";
          D.16638 = MEM[(const unsigned char *)D.16637];
          D.16639 = (int) D.16638;
          D.16640 = *__s2;
          D.16641 = (int) D.16640;
          __result = D.16639 - D.16641;
          {
            D.16642 = __s1_len != 0;
            D.16643 = __result == 0;
            D.16644 = D.16642 & D.16643;
            if (D.16644 != 0) goto <D.16645>; else goto <D.16646>;
            <D.16645>:
            D.16647 = &MEM[(void *)".ctor" + 1B];
            D.16648 = *D.16647;
            D.16649 = (int) D.16648;
            D.16650 = __s2 + 1;
            D.16651 = *D.16650;
            D.16652 = (int) D.16651;
            __result = D.16649 - D.16652;
            D.16653 = __s1_len > 1;
            D.16643 = __result == 0;
            D.16654 = D.16653 & D.16643;
            if (D.16654 != 0) goto <D.16655>; else goto <D.16656>;
            <D.16655>:
            D.16657 = &MEM[(void *)".ctor" + 2B];
            D.16658 = *D.16657;
            D.16659 = (int) D.16658;
            D.16660 = __s2 + 2;
            D.16661 = *D.16660;
            D.16662 = (int) D.16661;
            __result = D.16659 - D.16662;
            D.16663 = __s1_len > 2;
            D.16643 = __result == 0;
            D.16664 = D.16663 & D.16643;
            if (D.16664 != 0) goto <D.16665>; else goto <D.16666>;
            <D.16665>:
            D.16667 = &MEM[(void *)".ctor" + 3B];
            D.16668 = *D.16667;
            D.16669 = (int) D.16668;
            D.16670 = __s2 + 3;
            D.16671 = *D.16670;
            D.16672 = (int) D.16671;
            __result = D.16669 - D.16672;
            <D.16666>:
            <D.16656>:
            <D.16646>:
          }
          D.16323 = __result;
        }
        iftmp.3 = D.16323;
        goto <D.16673>;
        <D.16636>:
        D.16674 = mono_method_get_name (method);
        iftmp.3 = __builtin_strcmp (".ctor", D.16674);
        <D.16673>:
        D.16327 = iftmp.3;
      }
      if (D.16327 == 0) goto <D.16675>; else goto <D.16676>;
      <D.16675>:
      {
        struct MonoMethodSignature * sig;

        sig = mono_method_signature (method);
        D.16677 = sig->param_count;
        if (D.16677 == 2) goto <D.16678>; else goto <D.16679>;
        <D.16678>:
        D.16680 = sig->params[0];
        D.16681 = D.16680->type;
        if (D.16681 == 14) goto <D.16682>; else goto <D.16683>;
        <D.16682>:
        D.16684 = sig->params[1];
        D.16685 = mono_class_from_mono_type (D.16684);
        D.16686 = mono_defaults.exception_class;
        if (D.16685 == D.16686) goto <D.16329>; else goto <D.16687>;
        <D.16687>:
        <D.16683>:
        <D.16679>:
      }
      <D.16676>:
      method = 0B;
      <D.16331>:
      method = mono_class_get_methods (klass, &iter);
      if (method != 0B) goto <D.16330>; else goto <D.16329>;
      <D.16329>:
      D.16688 = method == 0B;
      D.16689 = (long int) D.16688;
      D.16690 = __builtin_expect (D.16689, 0);
      if (D.16690 != 0) goto <D.16691>; else goto <D.16692>;
      <D.16691>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 587, "method");
      <D.16692>:
      D.16693 = mono_domain_get ();
      D.16694 = mono_string_new (D.16693, type_name);
      args[0] = D.16694;
      args[1] = inner;
      D.16695 = mono_domain_get ();
      exc = mono_object_new (D.16695, klass);
      mono_runtime_invoke (method, exc, &args, 0B);
      D.16696 = exc;
      return D.16696;
    }
  finally
    {
      args = {CLOBBER};
      iter = {CLOBBER};
    }
}


mono_get_exception_synchronization_lock (const char * msg)
{
  struct MonoException * D.16699;
  struct MonoImage * D.16700;

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


mono_get_exception_cannot_unload_appdomain (const char * msg)
{
  struct MonoException * D.16702;
  struct MonoImage * D.16703;

  D.16703 = mono_get_corlib ();
  D.16702 = mono_exception_from_name_msg (D.16703, "System", "CannotUnloadAppDomainException", msg);
  return D.16702;
}


mono_get_exception_appdomain_unloaded ()
{
  struct MonoException * D.16705;
  struct MonoImage * D.16706;

  D.16706 = mono_get_corlib ();
  D.16705 = mono_exception_from_name (D.16706, "System", "AppDomainUnloadedException");
  return D.16705;
}


mono_get_exception_bad_image_format (const char * msg)
{
  struct MonoException * D.16708;
  struct MonoImage * D.16709;

  D.16709 = mono_get_corlib ();
  D.16708 = mono_exception_from_name_msg (D.16709, "System", "BadImageFormatException", msg);
  return D.16708;
}


mono_get_exception_bad_image_format2 (const char * msg, struct MonoString * fname)
{
  struct MonoString * iftmp.4;
  struct MonoDomain * D.16714;
  struct MonoException * D.16716;
  struct MonoImage * D.16717;
  struct MonoString * s;

  if (msg != 0B) goto <D.16712>; else goto <D.16713>;
  <D.16712>:
  D.16714 = mono_domain_get ();
  iftmp.4 = mono_string_new (D.16714, msg);
  goto <D.16715>;
  <D.16713>:
  iftmp.4 = 0B;
  <D.16715>:
  s = iftmp.4;
  D.16717 = mono_get_corlib ();
  D.16716 = mono_exception_from_name_two_strings (D.16717, "System", "BadImageFormatException", s, fname);
  return D.16716;
}


mono_get_exception_stack_overflow ()
{
  struct MonoException * D.16719;
  struct MonoImage * D.16720;

  D.16720 = mono_get_corlib ();
  D.16719 = mono_exception_from_name (D.16720, "System", "StackOverflowException");
  return D.16719;
}


mono_get_exception_out_of_memory ()
{
  struct MonoException * D.16722;
  struct MonoImage * D.16723;

  D.16723 = mono_get_corlib ();
  D.16722 = mono_exception_from_name (D.16723, "System", "OutOfMemoryException");
  return D.16722;
}


mono_get_exception_field_access ()
{
  struct MonoException * D.16725;
  struct MonoImage * D.16726;

  D.16726 = mono_get_corlib ();
  D.16725 = mono_exception_from_name (D.16726, "System", "FieldAccessException");
  return D.16725;
}


mono_get_exception_field_access_msg (const char * msg)
{
  struct MonoException * D.16728;
  struct MonoImage * D.16729;

  D.16729 = mono_get_corlib ();
  D.16728 = mono_exception_from_name_msg (D.16729, "System", "FieldAccessException", msg);
  return D.16728;
}


mono_get_exception_method_access ()
{
  struct MonoException * D.16731;
  struct MonoImage * D.16732;

  D.16732 = mono_get_corlib ();
  D.16731 = mono_exception_from_name (D.16732, "System", "MethodAccessException");
  return D.16731;
}


mono_get_exception_method_access_msg (const char * msg)
{
  struct MonoException * D.16734;
  struct MonoImage * D.16735;

  D.16735 = mono_get_corlib ();
  D.16734 = mono_exception_from_name_msg (D.16735, "System", "MethodAccessException", msg);
  return D.16734;
}


mono_get_exception_reflection_type_load (struct MonoArray * types, struct MonoArray * exceptions)
{
  struct MonoImage * D.16737;
  _Bool D.16738;
  long int D.16739;
  long int D.16740;
  int D.16384;
  int iftmp.5;
  int D.16380;
  const char[6] * D.16746;
  unsigned char D.16747;
  int D.16748;
  unsigned char D.16749;
  int D.16750;
  _Bool D.16751;
  _Bool D.16752;
  _Bool D.16753;
  const unsigned char * D.16756;
  unsigned char D.16757;
  int D.16758;
  const unsigned char * D.16759;
  unsigned char D.16760;
  int D.16761;
  _Bool D.16762;
  _Bool D.16763;
  const unsigned char * D.16766;
  unsigned char D.16767;
  int D.16768;
  const unsigned char * D.16769;
  unsigned char D.16770;
  int D.16771;
  _Bool D.16772;
  _Bool D.16773;
  const unsigned char * D.16776;
  unsigned char D.16777;
  int D.16778;
  const unsigned char * D.16779;
  unsigned char D.16780;
  int D.16781;
  const char * D.16783;
  short unsigned int D.16786;
  struct MonoType * D.16789;
  unsigned char D.16790;
  struct MonoType * D.16793;
  unsigned char D.16794;
  _Bool D.16796;
  long int D.16797;
  long int D.16798;
  struct MonoDomain * D.16801;
  struct MonoException * D.16802;
  struct MonoClass * klass;
  void * args[2];
  struct MonoObject * exc;
  struct MonoMethod * method;
  void * iter;

  try
    {
      D.16737 = mono_get_corlib ();
      klass = mono_class_from_name (D.16737, "System.Reflection", "ReflectionTypeLoadException");
      D.16738 = klass == 0B;
      D.16739 = (long int) D.16738;
      D.16740 = __builtin_expect (D.16739, 0);
      if (D.16740 != 0) goto <D.16741>; else goto <D.16742>;
      <D.16741>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 746, "klass");
      <D.16742>:
      mono_class_init (klass);
      iter = 0B;
      goto <D.16388>;
      <D.16387>:
      {
        size_t __s1_len;
        size_t __s2_len;

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

          __s2 = mono_method_get_name (method);
          D.16746 = ".ctor";
          D.16747 = MEM[(const unsigned char *)D.16746];
          D.16748 = (int) D.16747;
          D.16749 = *__s2;
          D.16750 = (int) D.16749;
          __result = D.16748 - D.16750;
          {
            D.16751 = __s1_len != 0;
            D.16752 = __result == 0;
            D.16753 = D.16751 & D.16752;
            if (D.16753 != 0) goto <D.16754>; else goto <D.16755>;
            <D.16754>:
            D.16756 = &MEM[(void *)".ctor" + 1B];
            D.16757 = *D.16756;
            D.16758 = (int) D.16757;
            D.16759 = __s2 + 1;
            D.16760 = *D.16759;
            D.16761 = (int) D.16760;
            __result = D.16758 - D.16761;
            D.16762 = __s1_len > 1;
            D.16752 = __result == 0;
            D.16763 = D.16762 & D.16752;
            if (D.16763 != 0) goto <D.16764>; else goto <D.16765>;
            <D.16764>:
            D.16766 = &MEM[(void *)".ctor" + 2B];
            D.16767 = *D.16766;
            D.16768 = (int) D.16767;
            D.16769 = __s2 + 2;
            D.16770 = *D.16769;
            D.16771 = (int) D.16770;
            __result = D.16768 - D.16771;
            D.16772 = __s1_len > 2;
            D.16752 = __result == 0;
            D.16773 = D.16772 & D.16752;
            if (D.16773 != 0) goto <D.16774>; else goto <D.16775>;
            <D.16774>:
            D.16776 = &MEM[(void *)".ctor" + 3B];
            D.16777 = *D.16776;
            D.16778 = (int) D.16777;
            D.16779 = __s2 + 3;
            D.16780 = *D.16779;
            D.16781 = (int) D.16780;
            __result = D.16778 - D.16781;
            <D.16775>:
            <D.16765>:
            <D.16755>:
          }
          D.16380 = __result;
        }
        iftmp.5 = D.16380;
        goto <D.16782>;
        <D.16745>:
        D.16783 = mono_method_get_name (method);
        iftmp.5 = __builtin_strcmp (".ctor", D.16783);
        <D.16782>:
        D.16384 = iftmp.5;
      }
      if (D.16384 == 0) goto <D.16784>; else goto <D.16785>;
      <D.16784>:
      {
        struct MonoMethodSignature * sig;

        sig = mono_method_signature (method);
        D.16786 = sig->param_count;
        if (D.16786 == 2) goto <D.16787>; else goto <D.16788>;
        <D.16787>:
        D.16789 = sig->params[0];
        D.16790 = D.16789->type;
        if (D.16790 == 29) goto <D.16791>; else goto <D.16792>;
        <D.16791>:
        D.16793 = sig->params[1];
        D.16794 = D.16793->type;
        if (D.16794 == 29) goto <D.16386>; else goto <D.16795>;
        <D.16795>:
        <D.16792>:
        <D.16788>:
      }
      <D.16785>:
      method = 0B;
      <D.16388>:
      method = mono_class_get_methods (klass, &iter);
      if (method != 0B) goto <D.16387>; else goto <D.16386>;
      <D.16386>:
      D.16796 = method == 0B;
      D.16797 = (long int) D.16796;
      D.16798 = __builtin_expect (D.16797, 0);
      if (D.16798 != 0) goto <D.16799>; else goto <D.16800>;
      <D.16799>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "exception.c", 760, "method");
      <D.16800>:
      args[0] = types;
      args[1] = exceptions;
      D.16801 = mono_domain_get ();
      exc = mono_object_new (D.16801, klass);
      mono_runtime_invoke (method, exc, &args, 0B);
      D.16802 = exc;
      return D.16802;
    }
  finally
    {
      args = {CLOBBER};
      iter = {CLOBBER};
    }
}


mono_get_exception_runtime_wrapped (struct MonoObject * wrapped_exception)
{
  struct MonoImage * D.16805;
  struct MonoObject * * D.16806;
  struct MonoException * D.16807;
  struct MonoRuntimeWrappedException * ex;

  D.16805 = mono_get_corlib ();
  ex = mono_exception_from_name (D.16805, "System.Runtime.CompilerServices", "RuntimeWrappedException");
  D.16806 = &ex->wrapped_exception;
  mono_gc_wbarrier_set_field (ex, D.16806, wrapped_exception);
  D.16807 = ex;
  return D.16807;
}


mono_exception_get_managed_backtrace (struct MonoException * exc)
{
  struct MonoRuntimeExceptionHandlingCallbacks * D.16809;
  gboolean (*<T25cb>) (struct MonoException *, gboolean (*MonoInternalExceptionFrameWalk) (struct MonoMethod *, void *, size_t, gboolean, void *), void *) D.16810;
  int D.16811;
  char * D.16814;
  struct GString * text;

  text = monoeg_g_string_new_len (0B, 20);
  D.16809 = mono_get_eh_callbacks ();
  D.16810 = D.16809->mono_exception_walk_trace;
  D.16811 = D.16810 (exc, append_frame_and_continue, text);
  if (D.16811 == 0) goto <D.16812>; else goto <D.16813>;
  <D.16812>:
  monoeg_g_string_append (text, "managed backtrace not available\n");
  <D.16813>:
  D.16814 = monoeg_g_string_free (text, 0);
  return D.16814;
}


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

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

    D.16818 = (unsigned int) native_offset;
    msg = mono_debug_print_stack_frame (method, D.16818, domain);
    monoeg_g_string_append_printf (text, "%s\n", msg);
    monoeg_g_free (msg);
  }
  goto <D.16819>;
  <D.16817>:
  monoeg_g_string_append_printf (text, "<unknown native frame 0x%x>\n", ip);
  <D.16819>:
  D.16820 = 0;
  return D.16820;
}


mono_exception_get_native_backtrace (struct MonoException * exc)
{
  char * D.16824;
  long unsigned int D.16825;
  int D.16826;
  long int D.16827;
  char * D.16828;
  long unsigned int D.16829;
  char * D.16830;
  struct MonoDomain * D.16831;
  long int ip.6;
  void * D.16835;
  long int D.16836;
  long int D.16837;
  unsigned int D.16838;
  struct MonoMethod * D.16839;
  long unsigned int D.16841;
  long unsigned int D.16842;
  char * * D.16843;
  char * D.16844;
  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.16822>; else goto <D.16823>;
  <D.16822>:
  D.16824 = monoeg_strdup ("");
  return D.16824;
  <D.16823>:
  domain = mono_domain_get ();
  D.16825 = mono_array_length (arr);
  len = (int) D.16825;
  D.16826 = len * 20;
  D.16827 = (long int) D.16826;
  text = monoeg_g_string_new_len (0B, D.16827);
  D.16828 = mono_array_addr_with_size (arr, 8, 0);
  messages = backtrace_symbols (D.16828, len);
  i = 0;
  goto <D.16420>;
  <D.16419>:
  {
    void * ip;
    struct MonoJitInfo * ji;

    D.16829 = (long unsigned int) i;
    D.16830 = mono_array_addr_with_size (arr, 8, D.16829);
    ip = MEM[(void * *)D.16830];
    D.16831 = mono_domain_get ();
    ji = mono_jit_info_table_find (D.16831, ip);
    if (ji != 0B) goto <D.16832>; else goto <D.16833>;
    <D.16832>:
    {
      char * msg;

      ip.6 = (long int) ip;
      D.16835 = ji->code_start;
      D.16836 = (long int) D.16835;
      D.16837 = ip.6 - D.16836;
      D.16838 = (unsigned int) D.16837;
      D.16839 = mono_jit_info_get_method (ji);
      msg = mono_debug_print_stack_frame (D.16839, D.16838, domain);
      monoeg_g_string_append_printf (text, "%s\n", msg);
      monoeg_g_free (msg);
    }
    goto <D.16840>;
    <D.16833>:
    D.16841 = (long unsigned int) i;
    D.16842 = D.16841 * 8;
    D.16843 = messages + D.16842;
    D.16844 = *D.16843;
    monoeg_g_string_append_printf (text, "%s\n", D.16844);
    <D.16840>:
  }
  i = i + 1;
  <D.16420>:
  if (i < len) goto <D.16419>; else goto <D.16421>;
  <D.16421>:
  free (messages);
  D.16824 = monoeg_g_string_free (text, 0);
  return D.16824;
}


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

  if (str != 0B) goto <D.16846>; else goto <D.16847>;
  <D.16846>:
  D.16848 = __strdup (str);
  return D.16848;
  <D.16847>:
  D.16848 = 0B;
  return D.16848;
}


ves_icall_Mono_Runtime_GetNativeStackTrace (struct MonoException * exc)
{
  struct MonoException * D.16852;
  struct MonoDomain * D.16853;
  struct MonoString * D.16854;
  char * trace;
  struct MonoString * res;

  if (exc == 0B) goto <D.16850>; else goto <D.16851>;
  <D.16850>:
  D.16852 = mono_get_exception_argument_null ("exception");
  mono_raise_exception (D.16852);
  <D.16851>:
  trace = mono_exception_get_native_backtrace (exc);
  D.16853 = mono_domain_get ();
  res = mono_string_new (D.16853, trace);
  monoeg_g_free (trace);
  D.16854 = res;
  return D.16854;
}


