mono_loader_init ()
{
  int inited.0;
  static gboolean inited;

  inited.0 = inited;
  if (inited.0 == 0) goto <D.18324>; else goto <D.18325>;
  <D.18324>:
  InitializeCriticalSection (&loader_mutex);
  loader_lock_inited = 1;
  mono_native_tls_alloc (&loader_error_thread_id, 0B);
  mono_native_tls_alloc (&loader_lock_nest_id, 0B);
  mono_counters_register ("Inflated signatures size", 2048, &inflated_signatures_size);
  mono_counters_register ("Memberref signature cache size", 1024, &memberref_sig_cache_size);
  mono_counters_register ("MonoMethod size", 1024, &methods_size);
  mono_counters_register ("MonoMethodSignature size", 1024, &signatures_size);
  inited = 1;
  <D.18325>:
}


mono_native_tls_alloc (pthread_key_t * key, void * destructor)
{
  int D.18326;
  void (*<Tc3>) (void *) destructor.1;
  int D.18328;
  _Bool D.18329;

  destructor.1 = (void (*<Tc3>) (void *)) destructor;
  D.18328 = pthread_key_create (key, destructor.1);
  D.18329 = D.18328 == 0;
  D.18326 = (int) D.18329;
  return D.18326;
}


mono_loader_cleanup ()
{
  unsigned int loader_error_thread_id.2;
  unsigned int loader_lock_nest_id.3;

  dllmap_cleanup ();
  loader_error_thread_id.2 = loader_error_thread_id;
  mono_native_tls_free (loader_error_thread_id.2);
  loader_lock_nest_id.3 = loader_lock_nest_id;
  mono_native_tls_free (loader_lock_nest_id.3);
  DeleteCriticalSection (&loader_mutex);
  loader_lock_inited = 0;
}


dllmap_cleanup ()
{
  struct MonoDllMap * global_dll_map.4;

  global_dll_map.4 = global_dll_map;
  free_dllmap (global_dll_map.4);
  global_dll_map = 0B;
}


free_dllmap (struct MonoDllMap * map)
{
  char * D.18334;
  char * D.18335;
  char * D.18336;
  char * D.18337;

  goto <D.17945>;
  <D.17944>:
  {
    struct MonoDllMap * next;

    next = map->next;
    D.18334 = map->dll;
    monoeg_g_free (D.18334);
    D.18335 = map->target;
    monoeg_g_free (D.18335);
    D.18336 = map->func;
    monoeg_g_free (D.18336);
    D.18337 = map->target_func;
    monoeg_g_free (D.18337);
    monoeg_g_free (map);
    map = next;
  }
  <D.17945>:
  if (map != 0B) goto <D.17944>; else goto <D.17946>;
  <D.17946>:
}


mono_native_tls_free (pthread_key_t key)
{
  pthread_key_delete (key);
}


mono_loader_set_error_assembly_load (const char * assembly_name, gboolean ref_only)
{
  struct MonoLoaderError * D.18338;
  gchar * D.18341;
  struct MonoLoaderError * error;

  D.18338 = mono_loader_get_last_error ();
  if (D.18338 != 0B) goto <D.18339>; else goto <D.18340>;
  <D.18339>:
  return;
  <D.18340>:
  error = monoeg_malloc0 (28);
  error->exception_type = 8;
  D.18341 = monoeg_strdup (assembly_name);
  error->assembly_name = D.18341;
  error->ref_only = ref_only;
  if (ref_only != 0) goto <D.18342>; else goto <D.18343>;
  <D.18342>:
  mono_trace (16, 1, "Cannot resolve dependency to assembly \'%s\' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.", assembly_name);
  goto <D.18344>;
  <D.18343>:
  mono_trace (16, 1, "Could not load file or assembly \'%s\' or one of its dependencies.", assembly_name);
  <D.18344>:
  set_loader_error (error);
}


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

  if (str != 0B) goto <D.18346>; else goto <D.18347>;
  <D.18346>:
  D.18348 = __strdup (str);
  return D.18348;
  <D.18347>:
  D.18348 = 0B;
  return D.18348;
}


set_loader_error (struct MonoLoaderError * error)
{
  unsigned int loader_error_thread_id.5;

  mono_loader_clear_error ();
  loader_error_thread_id.5 = loader_error_thread_id;
  mono_native_tls_set_value (loader_error_thread_id.5, error);
}


mono_native_tls_set_value (pthread_key_t key, void * value)
{
  int D.18351;
  int D.18352;
  _Bool D.18353;

  D.18352 = pthread_setspecific (key, value);
  D.18353 = D.18352 == 0;
  D.18351 = (int) D.18353;
  return D.18351;
}


mono_loader_set_error_type_load (const char * class_name, const char * assembly_name)
{
  struct MonoLoaderError * D.18355;
  gchar * D.18358;
  gchar * D.18359;
  struct MonoLoaderError * error;

  D.18355 = mono_loader_get_last_error ();
  if (D.18355 != 0B) goto <D.18356>; else goto <D.18357>;
  <D.18356>:
  return;
  <D.18357>:
  error = monoeg_malloc0 (28);
  error->exception_type = 7;
  D.18358 = monoeg_strdup (class_name);
  error->class_name = D.18358;
  D.18359 = monoeg_strdup (assembly_name);
  error->assembly_name = D.18359;
  mono_trace (16, 2, "The class %s could not be loaded, used in %s", class_name, assembly_name);
  set_loader_error (error);
}


mono_loader_set_error_method_load (const char * class_name, const char * member_name)
{
  struct MonoLoaderError * D.18361;
  gchar * D.18364;
  struct MonoLoaderError * error;

  D.18361 = mono_loader_get_last_error ();
  if (D.18361 != 0B) goto <D.18362>; else goto <D.18363>;
  <D.18362>:
  return;
  <D.18363>:
  error = monoeg_malloc0 (28);
  error->exception_type = 5;
  D.18364 = monoeg_strdup (class_name);
  error->class_name = D.18364;
  error->member_name = member_name;
  set_loader_error (error);
}


mono_loader_set_error_field_load (struct MonoClass * klass, const char * member_name)
{
  struct MonoLoaderError * D.18366;
  struct MonoLoaderError * error;

  D.18366 = mono_loader_get_last_error ();
  if (D.18366 != 0B) goto <D.18367>; else goto <D.18368>;
  <D.18367>:
  return;
  <D.18368>:
  error = monoeg_malloc0 (28);
  error->exception_type = 6;
  error->klass = klass;
  error->member_name = member_name;
  set_loader_error (error);
}


mono_loader_set_error_bad_image (char * msg)
{
  struct MonoLoaderError * D.18370;
  struct MonoLoaderError * error;

  D.18370 = mono_loader_get_last_error ();
  if (D.18370 != 0B) goto <D.18371>; else goto <D.18372>;
  <D.18371>:
  return;
  <D.18372>:
  error = monoeg_malloc0 (28);
  error->exception_type = 12;
  error->msg = msg;
  set_loader_error (error);
}


mono_loader_get_last_error ()
{
  struct MonoLoaderError * D.18374;
  unsigned int loader_error_thread_id.6;

  loader_error_thread_id.6 = loader_error_thread_id;
  D.18374 = pthread_getspecific (loader_error_thread_id.6);
  return D.18374;
}


mono_loader_clear_error ()
{
  unsigned int loader_error_thread_id.7;
  char * D.18380;
  char * D.18381;
  char * D.18382;
  struct MonoLoaderError * ex;

  loader_error_thread_id.7 = loader_error_thread_id;
  ex = pthread_getspecific (loader_error_thread_id.7);
  if (ex != 0B) goto <D.18378>; else goto <D.18379>;
  <D.18378>:
  D.18380 = ex->class_name;
  monoeg_g_free (D.18380);
  D.18381 = ex->assembly_name;
  monoeg_g_free (D.18381);
  D.18382 = ex->msg;
  monoeg_g_free (D.18382);
  monoeg_g_free (ex);
  loader_error_thread_id.7 = loader_error_thread_id;
  mono_native_tls_set_value (loader_error_thread_id.7, 0B);
  <D.18379>:
}


mono_loader_error_prepare_exception (struct MonoLoaderError * error)
{
  unsigned char D.18383;
  int D.18384;
  char * D.18385;
  char * D.18386;
  struct MonoDomain * D.18387;
  const char * D.18388;
  struct MonoClass * D.18389;
  int D.18393;
  struct MonoDomain * D.18397;
  struct MonoString * D.18398;
  char * D.18399;
  struct MonoException * D.18400;
  struct MonoException * ex;

  ex = 0B;
  D.18383 = error->exception_type;
  D.18384 = (int) D.18383;
  switch (D.18384) <default: <D.17580>, case 5: <D.17569>, case 6: <D.17572>, case 7: <D.17564>, case 8: <D.17575>, case 12: <D.17578>>
  <D.17564>:
  {
    char * cname;
    char * aname;
    struct MonoString * class_name;

    D.18385 = error->class_name;
    cname = monoeg_strdup (D.18385);
    D.18386 = error->assembly_name;
    aname = monoeg_strdup (D.18386);
    mono_loader_clear_error ();
    D.18387 = mono_domain_get ();
    class_name = mono_string_new (D.18387, cname);
    ex = mono_get_exception_type_load (class_name, aname);
    monoeg_g_free (cname);
    monoeg_g_free (aname);
    goto <D.17568>;
  }
  <D.17569>:
  {
    char * cname;
    char * aname;

    D.18385 = error->class_name;
    cname = monoeg_strdup (D.18385);
    D.18388 = error->member_name;
    aname = monoeg_strdup (D.18388);
    mono_loader_clear_error ();
    ex = mono_get_exception_missing_method (cname, aname);
    monoeg_g_free (cname);
    monoeg_g_free (aname);
    goto <D.17568>;
  }
  <D.17572>:
  {
    char * class_name;
    char * cmembername;

    D.18388 = error->member_name;
    cmembername = monoeg_strdup (D.18388);
    D.18389 = error->klass;
    if (D.18389 != 0B) goto <D.18390>; else goto <D.18391>;
    <D.18390>:
    D.18389 = error->klass;
    class_name = mono_type_get_full_name (D.18389);
    goto <D.18392>;
    <D.18391>:
    class_name = monoeg_strdup ("");
    <D.18392>:
    mono_loader_clear_error ();
    ex = mono_get_exception_missing_field (class_name, cmembername);
    monoeg_g_free (class_name);
    monoeg_g_free (cmembername);
    goto <D.17568>;
  }
  <D.17575>:
  {
    char * msg;
    char * filename;

    D.18393 = error->ref_only;
    if (D.18393 != 0) goto <D.18394>; else goto <D.18395>;
    <D.18394>:
    D.18386 = error->assembly_name;
    msg = monoeg_g_strdup_printf ("Cannot resolve dependency to assembly \'%s\' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.", D.18386);
    goto <D.18396>;
    <D.18395>:
    D.18386 = error->assembly_name;
    msg = monoeg_g_strdup_printf ("Could not load file or assembly \'%s\' or one of its dependencies.", D.18386);
    <D.18396>:
    D.18386 = error->assembly_name;
    filename = monoeg_strdup (D.18386);
    mono_loader_clear_error ();
    D.18397 = mono_domain_get ();
    D.18398 = mono_string_new (D.18397, filename);
    ex = mono_get_exception_file_not_found2 (msg, D.18398);
    monoeg_g_free (msg);
    monoeg_g_free (filename);
    goto <D.17568>;
  }
  <D.17578>:
  {
    char * msg;

    D.18399 = error->msg;
    msg = monoeg_strdup (D.18399);
    mono_loader_clear_error ();
    ex = mono_get_exception_bad_image_format (msg);
    monoeg_g_free (msg);
    goto <D.17568>;
  }
  <D.17580>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "loader.c", 375);
  <D.17568>:
  D.18400 = ex;
  return D.18400;
}


mono_field_from_token (struct MonoImage * image, guint32 token, struct MonoClass * * retklass, struct MonoGenericContext * context)
{
  unsigned int D.18402;
  unsigned int D.18403;
  struct MonoClass * D.18409;
  struct MonoClass * handle_class.8;
  char * D.18411;
  gchar * D.18412;
  struct MonoClassField * D.18413;
  struct MonoClass * D.18414;
  struct GHashTable * D.18415;
  const void * token.9;
  struct MonoClass * D.18419;
  unsigned int D.18420;
  unsigned int D.18424;
  unsigned int D.18427;
  struct MonoGenericClass * D.18436;
  struct MonoGenericContainer * D.18439;
  void * token.10;
  struct MonoClass * k;
  guint32 type;
  struct MonoClassField * field;

  D.18402 = BIT_FIELD_REF <*image, 32, 128>;
  D.18403 = D.18402 & 8;
  if (D.18403 != 0) goto <D.18404>; else goto <D.18405>;
  <D.18404>:
  {
    struct MonoClassField * result;
    struct MonoClass * handle_class;

    try
      {
        *retklass = 0B;
        result = mono_lookup_dynamic_token_class (image, token, 1, &handle_class, context);
        if (result == 0B) goto <D.18406>; else goto <D.18408>;
        <D.18408>:
        D.18409 = mono_defaults.fieldhandle_class;
        handle_class.8 = handle_class;
        if (D.18409 != handle_class.8) goto <D.18406>; else goto <D.18407>;
        <D.18406>:
        D.18411 = image->name;
        D.18412 = monoeg_g_strdup_printf ("Bad field token 0x%08x on image %s.", token, D.18411);
        mono_loader_set_error_bad_image (D.18412);
        D.18413 = 0B;
        return D.18413;
        <D.18407>:
        D.18414 = result->parent;
        *retklass = D.18414;
        D.18413 = result;
        return D.18413;
      }
    finally
      {
        handle_class = {CLOBBER};
      }
  }
  <D.18405>:
  mono_image_lock (image);
  D.18415 = image->field_cache;
  token.9 = (const void *) token;
  field = monoeg_g_hash_table_lookup (D.18415, token.9);
  if (field != 0B) goto <D.18417>; else goto <D.18418>;
  <D.18417>:
  D.18419 = field->parent;
  *retklass = D.18419;
  mono_image_unlock (image);
  D.18413 = field;
  return D.18413;
  <D.18418>:
  mono_image_unlock (image);
  D.18420 = token >> 24;
  if (D.18420 == 10) goto <D.18421>; else goto <D.18422>;
  <D.18421>:
  field = field_from_memberref (image, token, retklass, context);
  goto <D.18423>;
  <D.18422>:
  D.18424 = token & 16777215;
  type = mono_metadata_typedef_from_field (image, D.18424);
  if (type == 0) goto <D.18425>; else goto <D.18426>;
  <D.18425>:
  D.18413 = 0B;
  return D.18413;
  <D.18426>:
  D.18427 = type | 33554432;
  k = mono_class_get (image, D.18427);
  if (k == 0B) goto <D.18428>; else goto <D.18429>;
  <D.18428>:
  D.18413 = 0B;
  return D.18413;
  <D.18429>:
  mono_class_init (k);
  if (retklass != 0B) goto <D.18430>; else goto <D.18431>;
  <D.18430>:
  *retklass = k;
  <D.18431>:
  field = mono_class_get_field (k, token);
  <D.18423>:
  mono_image_lock (image);
  if (field != 0B) goto <D.18432>; else goto <D.18433>;
  <D.18432>:
  D.18419 = field->parent;
  if (D.18419 != 0B) goto <D.18434>; else goto <D.18435>;
  <D.18434>:
  D.18419 = field->parent;
  D.18436 = D.18419->generic_class;
  if (D.18436 == 0B) goto <D.18437>; else goto <D.18438>;
  <D.18437>:
  D.18419 = field->parent;
  D.18439 = D.18419->generic_container;
  if (D.18439 == 0B) goto <D.18440>; else goto <D.18441>;
  <D.18440>:
  D.18415 = image->field_cache;
  token.10 = (void *) token;
  monoeg_g_hash_table_insert_replace (D.18415, token.10, field, 0);
  <D.18441>:
  <D.18438>:
  <D.18435>:
  <D.18433>:
  mono_image_unlock (image);
  D.18413 = field;
  return D.18413;
}


field_from_memberref (struct MonoImage * image, guint32 token, struct MonoClass * * retklass, struct MonoGenericContext * context)
{
  const struct MonoTableInfo * D.18445;
  unsigned int D.18446;
  int D.18447;
  unsigned int D.18448;
  unsigned int D.18449;
  unsigned int D.18450;
  int D.18451;
  char * D.18454;
  gchar * D.18455;
  struct MonoClassField * D.18456;
  unsigned int D.18457;
  unsigned int D.18458;
  unsigned int D.18459;
  unsigned int D.18462;
  const char * D.18463;
  const char * ptr.11;
  const char * ptr.12;
  const char * ptr.13;
  const char * ptr.14;
  char D.18468;
  struct MonoClass * klass;
  struct MonoClassField * field;
  struct MonoTableInfo * tables;
  struct MonoType * sig_type;
  guint32 cols[6];
  guint32 nindex;
  guint32 class;
  guint32 class_table;
  const char * fname;
  const char * ptr;
  guint32 idx;

  try
    {
      tables = &image->tables;
      idx = token & 16777215;
      D.18445 = tables + 120;
      D.18446 = idx + 4294967295;
      D.18447 = (int) D.18446;
      mono_metadata_decode_row (D.18445, D.18447, &cols, 3);
      D.18448 = cols[0];
      nindex = D.18448 >> 3;
      D.18448 = cols[0];
      class = D.18448 & 7;
      D.18449 = cols[1];
      fname = mono_metadata_string_heap (image, D.18449);
      D.18450 = cols[2];
      D.18451 = mono_verifier_verify_memberref_field_signature (image, D.18450, 0B);
      if (D.18451 == 0) goto <D.18452>; else goto <D.18453>;
      <D.18452>:
      D.18454 = image->name;
      D.18455 = monoeg_g_strdup_printf ("Bad field signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, D.18454);
      mono_loader_set_error_bad_image (D.18455);
      D.18456 = 0B;
      return D.18456;
      <D.18453>:
      switch (class) <default: <D.17613>, case 0: <D.17609>, case 1: <D.17611>, case 4: <D.17612>>
      <D.17609>:
      class_table = 33554432;
      D.18457 = nindex | 33554432;
      klass = mono_class_get (image, D.18457);
      goto <D.17610>;
      <D.17611>:
      class_table = 16777216;
      D.18458 = nindex | 16777216;
      klass = mono_class_from_typeref (image, D.18458);
      goto <D.17610>;
      <D.17612>:
      class_table = 452984832;
      D.18459 = nindex | 452984832;
      klass = mono_class_get_full (image, D.18459, context);
      goto <D.17610>;
      <D.17613>:
      monoeg_g_log (0B, 16, "field load from %x", class);
      D.18456 = 0B;
      return D.18456;
      <D.17610>:
      if (klass == 0B) goto <D.18460>; else goto <D.18461>;
      <D.18460>:
      {
        char * name;

        D.18462 = class_table | nindex;
        name = mono_class_name_from_token (image, D.18462);
        D.18462 = class_table | nindex;
        monoeg_g_log (0B, 16, "Missing field %s in class %s (type token %d)", fname, name, D.18462);
        D.18463 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.18463);
        monoeg_g_free (name);
        D.18456 = 0B;
        return D.18456;
      }
      <D.18461>:
      D.18450 = cols[2];
      ptr.11 = mono_metadata_blob_heap (image, D.18450);
      ptr = ptr.11;
      ptr.12 = ptr;
      mono_metadata_decode_blob_size (ptr.12, &ptr);
      ptr.12 = ptr;
      ptr.13 = ptr.12;
      ptr.14 = ptr.13 + 1;
      ptr = ptr.14;
      D.18468 = *ptr.13;
      if (D.18468 != 6) goto <D.18469>; else goto <D.18470>;
      <D.18469>:
      monoeg_g_log (0B, 16, "Bad field signature class token %08x field name %s token %08x", class, fname, token);
      mono_loader_set_error_field_load (klass, fname);
      D.18456 = 0B;
      return D.18456;
      <D.18470>:
      D.18450 = cols[2];
      sig_type = find_cached_memberref_sig (image, D.18450);
      if (sig_type == 0B) goto <D.18471>; else goto <D.18472>;
      <D.18471>:
      ptr.12 = ptr;
      sig_type = mono_metadata_parse_type (image, 0, 0, ptr.12, &ptr);
      if (sig_type == 0B) goto <D.18473>; else goto <D.18474>;
      <D.18473>:
      mono_loader_set_error_field_load (klass, fname);
      D.18456 = 0B;
      return D.18456;
      <D.18474>:
      D.18450 = cols[2];
      sig_type = cache_memberref_sig (image, D.18450, sig_type);
      <D.18472>:
      mono_class_init (klass);
      if (retklass != 0B) goto <D.18475>; else goto <D.18476>;
      <D.18475>:
      *retklass = klass;
      <D.18476>:
      field = mono_class_get_field_from_name_full (klass, fname, sig_type);
      if (field == 0B) goto <D.18477>; else goto <D.18478>;
      <D.18477>:
      mono_loader_set_error_field_load (klass, fname);
      <D.18478>:
      D.18456 = field;
      return D.18456;
    }
  finally
    {
      cols = {CLOBBER};
      ptr = {CLOBBER};
    }
}


find_cached_memberref_sig (struct MonoImage * image, guint32 sig_idx)
{
  struct GHashTable * D.18481;
  const void * sig_idx.15;
  void * D.18483;
  void * res;

  mono_loader_lock ();
  D.18481 = image->memberref_signatures;
  sig_idx.15 = (const void *) sig_idx;
  res = monoeg_g_hash_table_lookup (D.18481, sig_idx.15);
  mono_loader_unlock ();
  D.18483 = res;
  return D.18483;
}


cache_memberref_sig (struct MonoImage * image, guint32 sig_idx, void * sig)
{
  struct GHashTable * D.18485;
  const void * sig_idx.16;
  void * sig_idx.17;
  unsigned int memberref_sig_cache_size.18;
  unsigned int memberref_sig_cache_size.19;
  void * D.18493;
  void * prev_sig;

  mono_loader_lock ();
  D.18485 = image->memberref_signatures;
  sig_idx.16 = (const void *) sig_idx;
  prev_sig = monoeg_g_hash_table_lookup (D.18485, sig_idx.16);
  if (prev_sig != 0B) goto <D.18487>; else goto <D.18488>;
  <D.18487>:
  sig = prev_sig;
  goto <D.18489>;
  <D.18488>:
  D.18485 = image->memberref_signatures;
  sig_idx.17 = (void *) sig_idx;
  monoeg_g_hash_table_insert_replace (D.18485, sig_idx.17, sig, 0);
  memberref_sig_cache_size.18 = memberref_sig_cache_size;
  memberref_sig_cache_size.19 = memberref_sig_cache_size.18 + 16;
  memberref_sig_cache_size = memberref_sig_cache_size.19;
  <D.18489>:
  mono_loader_unlock ();
  D.18493 = sig;
  return D.18493;
}


mono_inflate_generic_signature (struct MonoMethodSignature * sig, struct MonoGenericContext * context, struct MonoError * error)
{
  int D.18495;
  struct MonoMethodSignature * D.18498;
  struct MonoMethodSignature * res;
  struct MonoMethodSignature * cached;

  res = inflate_generic_signature_checked (0B, sig, context, error);
  D.18495 = mono_error_ok (error);
  if (D.18495 == 0) goto <D.18496>; else goto <D.18497>;
  <D.18496>:
  D.18498 = 0B;
  return D.18498;
  <D.18497>:
  cached = mono_metadata_get_inflated_signature (res, context);
  if (cached != res) goto <D.18499>; else goto <D.18500>;
  <D.18499>:
  mono_metadata_free_inflated_signature (res);
  <D.18500>:
  D.18498 = cached;
  return D.18498;
}


inflate_generic_signature_checked (struct MonoImage * image, struct MonoMethodSignature * sig, struct MonoGenericContext * context, struct MonoError * error)
{
  struct MonoMethodSignature * D.18504;
  short unsigned int D.18505;
  unsigned int D.18506;
  unsigned int D.18507;
  unsigned int D.18508;
  struct MonoType * D.18509;
  struct MonoType * D.18510;
  int D.18511;
  struct MonoType * D.18513;
  struct MonoType * D.18514;
  struct MonoType * D.18515;
  int D.18516;
  struct MonoType * D.18520;
  int D.18521;
  <unnamed-unsigned:1> D.18522;
  <unnamed-unsigned:1> D.18523;
  <unnamed-unsigned:6> D.18524;
  <unnamed-unsigned:1> D.18525;
  short unsigned int D.18526;
  short int D.18527;
  unsigned char D.18528;
  <unnamed-unsigned:1> D.18529;
  struct MonoMethodSignature * res;
  gboolean is_open;
  int i;
  void fail = <<< error >>>;

  mono_error_init (error);
  if (context == 0B) goto <D.18502>; else goto <D.18503>;
  <D.18502>:
  D.18504 = sig;
  return D.18504;
  <D.18503>:
  D.18505 = sig->param_count;
  D.18506 = (unsigned int) D.18505;
  D.18507 = D.18506 + 3;
  D.18508 = D.18507 * 4;
  res = monoeg_malloc0 (D.18508);
  D.18505 = sig->param_count;
  res->param_count = D.18505;
  res->sentinelpos = -1;
  D.18509 = sig->ret;
  D.18510 = mono_class_inflate_generic_type_checked (D.18509, context, error);
  res->ret = D.18510;
  D.18511 = mono_error_ok (error);
  if (D.18511 == 0) goto fail; else goto <D.18512>;
  <D.18512>:
  D.18513 = res->ret;
  is_open = mono_class_is_open_constructed_type (D.18513);
  i = 0;
  goto <D.17767>;
  <D.17766>:
  D.18514 = sig->params[i];
  D.18515 = mono_class_inflate_generic_type_checked (D.18514, context, error);
  res->params[i] = D.18515;
  D.18516 = mono_error_ok (error);
  if (D.18516 == 0) goto fail; else goto <D.18517>;
  <D.18517>:
  if (is_open == 0) goto <D.18518>; else goto <D.18519>;
  <D.18518>:
  D.18520 = res->params[i];
  is_open = mono_class_is_open_constructed_type (D.18520);
  <D.18519>:
  i = i + 1;
  <D.17767>:
  D.18505 = sig->param_count;
  D.18521 = (int) D.18505;
  if (D.18521 > i) goto <D.17766>; else goto <D.17768>;
  <D.17768>:
  D.18522 = sig->hasthis;
  res->hasthis = D.18522;
  D.18523 = sig->explicit_this;
  res->explicit_this = D.18523;
  D.18524 = sig->call_convention;
  res->call_convention = D.18524;
  D.18525 = sig->pinvoke;
  res->pinvoke = D.18525;
  D.18526 = sig->generic_param_count;
  res->generic_param_count = D.18526;
  D.18527 = sig->sentinelpos;
  res->sentinelpos = D.18527;
  D.18528 = (unsigned char) is_open;
  D.18529 = (<unnamed-unsigned:1>) D.18528;
  res->has_type_parameters = D.18529;
  res->is_inflated = 1;
  D.18504 = res;
  return D.18504;
  fail:
  D.18513 = res->ret;
  if (D.18513 != 0B) goto <D.18530>; else goto <D.18531>;
  <D.18530>:
  D.18513 = res->ret;
  mono_metadata_free_type (D.18513);
  <D.18531>:
  i = 0;
  goto <D.17770>;
  <D.17769>:
  D.18520 = res->params[i];
  if (D.18520 != 0B) goto <D.18532>; else goto <D.18533>;
  <D.18532>:
  D.18520 = res->params[i];
  mono_metadata_free_type (D.18520);
  <D.18533>:
  i = i + 1;
  <D.17770>:
  D.18505 = sig->param_count;
  D.18521 = (int) D.18505;
  if (D.18521 > i) goto <D.17769>; else goto <D.17771>;
  <D.17771>:
  monoeg_g_free (res);
  D.18504 = 0B;
  return D.18504;
}


mono_method_get_signature_full (struct MonoMethod * method, struct MonoImage * image, guint32 token, struct MonoGenericContext * context)
{
  unsigned int D.18535;
  int token.20;
  struct MonoMethodSignature * D.18540;
  short unsigned int D.18545;
  int D.18546;
  int D.18547;
  unsigned int D.18549;
  unsigned int D.18550;
  struct MonoClass * D.18551;
  struct MonoGenericClass * D.18552;
  unsigned int D.18555;
  unsigned int D.18556;
  struct MonoTableInfo * D.18560;
  int D.18561;
  unsigned int D.18562;
  unsigned int sig_idx.21;
  int D.18566;
  unsigned int D.18569;
  unsigned int D.18570;
  char * D.18571;
  gchar * D.18572;
  unsigned int sig_idx.22;
  const char * ptr.23;
  const char * ptr.24;
  int D.18578;
  gchar * D.18581;
  int D.18584;
  const char * D.18587;
  gchar * D.18588;
  unsigned int D.18592;
  unsigned int inflated_signatures_size.25;
  unsigned int inflated_signatures_size.26;
  int table;
  int idx;
  int sig_idx;
  guint32 cols[3];
  struct MonoMethodSignature * sig;
  const char * ptr;

  try
    {
      D.18535 = token >> 24;
      table = (int) D.18535;
      token.20 = (int) token;
      idx = token.20 & 16777215;
      if (table == 0) goto <D.18537>; else goto <D.18539>;
      <D.18539>:
      if (table == 6) goto <D.18537>; else goto <D.18538>;
      <D.18537>:
      D.18540 = mono_method_signature (method);
      return D.18540;
      <D.18538>:
      if (table == 43) goto <D.18541>; else goto <D.18542>;
      <D.18541>:
      D.18545 = method->flags;
      D.18546 = (int) D.18545;
      D.18547 = D.18546 & 8192;
      if (D.18547 != 0) goto <D.18543>; else goto <D.18548>;
      <D.18548>:
      D.18549 = BIT_FIELD_REF <*method, 32, 160>;
      D.18550 = D.18549 & 4096;
      if (D.18550 == 0) goto <D.18543>; else goto <D.18544>;
      <D.18543>:
      D.18540 = 0B;
      return D.18540;
      <D.18544>:
      D.18540 = mono_method_signature (method);
      return D.18540;
      <D.18542>:
      D.18551 = method->klass;
      D.18552 = D.18551->generic_class;
      if (D.18552 != 0B) goto <D.18553>; else goto <D.18554>;
      <D.18553>:
      D.18540 = mono_method_signature (method);
      return D.18540;
      <D.18554>:
      D.18555 = BIT_FIELD_REF <*image, 32, 128>;
      D.18556 = D.18555 & 8;
      if (D.18556 != 0) goto <D.18557>; else goto <D.18558>;
      <D.18557>:
      sig = mono_reflection_lookup_signature (image, method, token);
      goto <D.18559>;
      <D.18558>:
      D.18560 = &image->tables[10];
      D.18561 = idx + -1;
      mono_metadata_decode_row (D.18560, D.18561, &cols, 3);
      D.18562 = cols[2];
      sig_idx = (int) D.18562;
      sig_idx.21 = (unsigned int) sig_idx;
      sig = find_cached_memberref_sig (image, sig_idx.21);
      if (sig == 0B) goto <D.18564>; else goto <D.18565>;
      <D.18564>:
      sig_idx.21 = (unsigned int) sig_idx;
      D.18566 = mono_verifier_verify_memberref_method_signature (image, sig_idx.21, 0B);
      if (D.18566 == 0) goto <D.18567>; else goto <D.18568>;
      <D.18567>:
      {
        guint32 class;
        const char * fname;

        D.18569 = cols[0];
        class = D.18569 & 7;
        D.18570 = cols[1];
        fname = mono_metadata_string_heap (image, D.18570);
        D.18571 = image->name;
        D.18572 = monoeg_g_strdup_printf ("Bad method signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, D.18571);
        mono_loader_set_error_bad_image (D.18572);
        D.18540 = 0B;
        return D.18540;
      }
      <D.18568>:
      sig_idx.22 = (unsigned int) sig_idx;
      ptr.23 = mono_metadata_blob_heap (image, sig_idx.22);
      ptr = ptr.23;
      ptr.24 = ptr;
      mono_metadata_decode_blob_size (ptr.24, &ptr);
      ptr.24 = ptr;
      sig = mono_metadata_parse_method_signature (image, 0, ptr.24, 0B);
      if (sig == 0B) goto <D.18576>; else goto <D.18577>;
      <D.18576>:
      D.18540 = 0B;
      return D.18540;
      <D.18577>:
      sig_idx.21 = (unsigned int) sig_idx;
      sig = cache_memberref_sig (image, sig_idx.21, sig);
      <D.18565>:
      D.18578 = mono_verifier_is_sig_compatible (image, method, sig);
      if (D.18578 == 0) goto <D.18579>; else goto <D.18580>;
      <D.18579>:
      {
        guint32 class;
        const char * fname;

        D.18569 = cols[0];
        class = D.18569 & 7;
        D.18570 = cols[1];
        fname = mono_metadata_string_heap (image, D.18570);
        D.18571 = image->name;
        D.18581 = monoeg_g_strdup_printf ("Incompatible method signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, D.18571);
        mono_loader_set_error_bad_image (D.18581);
        D.18540 = 0B;
        return D.18540;
      }
      <D.18580>:
      <D.18559>:
      if (context != 0B) goto <D.18582>; else goto <D.18583>;
      <D.18582>:
      {
        struct MonoError error;
        struct MonoMethodSignature * cached;

        try
          {
            sig = inflate_generic_signature_checked (image, sig, context, &error);
            D.18584 = mono_error_ok (&error);
            if (D.18584 == 0) goto <D.18585>; else goto <D.18586>;
            <D.18585>:
            D.18587 = mono_error_get_message (&error);
            D.18588 = monoeg_g_strdup_printf ("Could not inflate signature %s", D.18587);
            mono_loader_set_error_bad_image (D.18588);
            mono_error_cleanup (&error);
            D.18540 = 0B;
            return D.18540;
            <D.18586>:
            cached = mono_metadata_get_inflated_signature (sig, context);
            if (cached != sig) goto <D.18589>; else goto <D.18590>;
            <D.18589>:
            mono_metadata_free_inflated_signature (sig);
            goto <D.18591>;
            <D.18590>:
            D.18592 = mono_metadata_signature_size (cached);
            inflated_signatures_size.25 = inflated_signatures_size;
            inflated_signatures_size.26 = D.18592 + inflated_signatures_size.25;
            inflated_signatures_size = inflated_signatures_size.26;
            <D.18591>:
            sig = cached;
          }
        finally
          {
            error = {CLOBBER};
          }
      }
      <D.18583>:
      D.18540 = sig;
      return D.18540;
    }
  finally
    {
      cols = {CLOBBER};
      ptr = {CLOBBER};
    }
}


mono_method_get_signature (struct MonoMethod * method, struct MonoImage * image, guint32 token)
{
  struct MonoMethodSignature * D.18599;

  D.18599 = mono_method_get_signature_full (method, image, token, 0B);
  return D.18599;
}


mono_method_search_in_array_class (struct MonoClass * klass, const char * name, struct MonoMethodSignature * sig)
{
  unsigned char D.18601;
  _Bool D.18602;
  long int D.18603;
  long int D.18604;
  struct MonoMethod * * D.18607;
  unsigned int i.27;
  unsigned int D.18609;
  struct MonoMethod * * D.18610;
  int D.17831;
  const char * D.18611;
  short unsigned int D.18614;
  struct MonoMethodSignature * D.18615;
  short unsigned int D.18616;
  struct MonoMethod * D.18619;
  unsigned int i.28;
  unsigned int D.18621;
  int i;

  mono_class_setup_methods (klass);
  D.18601 = klass->exception_type;
  D.18602 = D.18601 != 0;
  D.18603 = (long int) D.18602;
  D.18604 = __builtin_expect (D.18603, 0);
  if (D.18604 != 0) goto <D.18605>; else goto <D.18606>;
  <D.18605>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 932, "!klass->exception_type");
  <D.18606>:
  i = 0;
  goto <D.17833>;
  <D.17832>:
  {
    struct MonoMethod * method;

    D.18607 = klass->methods;
    i.27 = (unsigned int) i;
    D.18609 = i.27 * 4;
    D.18610 = D.18607 + D.18609;
    method = *D.18610;
    {
      size_t __s1_len;
      size_t __s2_len;

      D.18611 = method->name;
      D.17831 = __builtin_strcmp (D.18611, name);
    }
    if (D.17831 == 0) goto <D.18612>; else goto <D.18613>;
    <D.18612>:
    D.18614 = sig->param_count;
    D.18615 = method->signature;
    D.18616 = D.18615->param_count;
    if (D.18614 == D.18616) goto <D.18617>; else goto <D.18618>;
    <D.18617>:
    D.18619 = method;
    return D.18619;
    <D.18618>:
    <D.18613>:
  }
  i = i + 1;
  <D.17833>:
  i.28 = (unsigned int) i;
  D.18621 = klass->method.count;
  if (i.28 < D.18621) goto <D.17832>; else goto <D.17834>;
  <D.17834>:
  D.18619 = 0B;
  return D.18619;
}


mono_dllmap_insert (struct MonoImage * assembly, const char * dll, const char * func, const char * tdll, const char * tfunc)
{
  char * iftmp.29;
  char * iftmp.30;
  char * iftmp.31;
  char * iftmp.32;
  struct MonoDllMap * global_dll_map.33;
  char * iftmp.34;
  char * iftmp.35;
  char * iftmp.36;
  char * iftmp.37;
  struct MonoDllMap * D.18659;
  struct MonoDllMap * entry;

  mono_loader_init ();
  mono_loader_lock ();
  if (assembly == 0B) goto <D.18623>; else goto <D.18624>;
  <D.18623>:
  entry = monoeg_malloc0 (20);
  if (dll != 0B) goto <D.18626>; else goto <D.18627>;
  <D.18626>:
  iftmp.29 = monoeg_strdup (dll);
  goto <D.18628>;
  <D.18627>:
  iftmp.29 = 0B;
  <D.18628>:
  entry->dll = iftmp.29;
  if (tdll != 0B) goto <D.18630>; else goto <D.18631>;
  <D.18630>:
  iftmp.30 = monoeg_strdup (tdll);
  goto <D.18632>;
  <D.18631>:
  iftmp.30 = 0B;
  <D.18632>:
  entry->target = iftmp.30;
  if (func != 0B) goto <D.18634>; else goto <D.18635>;
  <D.18634>:
  iftmp.31 = monoeg_strdup (func);
  goto <D.18636>;
  <D.18635>:
  iftmp.31 = 0B;
  <D.18636>:
  entry->func = iftmp.31;
  if (tfunc != 0B) goto <D.18638>; else goto <D.18639>;
  <D.18638>:
  iftmp.32 = monoeg_strdup (tfunc);
  goto <D.18640>;
  <D.18639>:
  iftmp.32 = 0B;
  <D.18640>:
  entry->target_func = iftmp.32;
  global_dll_map.33 = global_dll_map;
  entry->next = global_dll_map.33;
  global_dll_map = entry;
  goto <D.18642>;
  <D.18624>:
  entry = mono_image_alloc0 (assembly, 20);
  if (dll != 0B) goto <D.18644>; else goto <D.18645>;
  <D.18644>:
  iftmp.34 = mono_image_strdup (assembly, dll);
  goto <D.18646>;
  <D.18645>:
  iftmp.34 = 0B;
  <D.18646>:
  entry->dll = iftmp.34;
  if (tdll != 0B) goto <D.18648>; else goto <D.18649>;
  <D.18648>:
  iftmp.35 = mono_image_strdup (assembly, tdll);
  goto <D.18650>;
  <D.18649>:
  iftmp.35 = 0B;
  <D.18650>:
  entry->target = iftmp.35;
  if (func != 0B) goto <D.18652>; else goto <D.18653>;
  <D.18652>:
  iftmp.36 = mono_image_strdup (assembly, func);
  goto <D.18654>;
  <D.18653>:
  iftmp.36 = 0B;
  <D.18654>:
  entry->func = iftmp.36;
  if (tfunc != 0B) goto <D.18656>; else goto <D.18657>;
  <D.18656>:
  iftmp.37 = mono_image_strdup (assembly, tfunc);
  goto <D.18658>;
  <D.18657>:
  iftmp.37 = 0B;
  <D.18658>:
  entry->target_func = iftmp.37;
  D.18659 = assembly->dll_map;
  entry->next = D.18659;
  assembly->dll_map = entry;
  <D.18642>:
  mono_loader_unlock ();
}


mono_lookup_pinvoke_call (struct MonoMethod * method, const char * * exc_class, const char * * exc_arg)
{
  struct MonoClass * D.18660;
  short unsigned int D.18661;
  int D.18662;
  int D.18663;
  _Bool D.18664;
  long int D.18665;
  long int D.18666;
  void * D.18671;
  void * D.18674;
  struct MonoImage * D.18675;
  unsigned int D.18676;
  unsigned int D.18677;
  struct GHashTable * D.18680;
  char * import.38;
  short unsigned int D.18687;
  int D.18689;
  <unnamed-unsigned:24> D.18690;
  int D.18691;
  int D.18692;
  unsigned int D.18695;
  <unnamed-unsigned:24> D.18697;
  unsigned int D.18698;
  unsigned int D.18699;
  short unsigned int D.18700;
  unsigned int D.18701;
  const char * import.39;
  unsigned int D.18703;
  int D.18704;
  const char * import.40;
  struct GHashTable * D.18708;
  struct GHashTable * D.18711;
  struct GHashTable * D.18712;
  const char * new_scope.41;
  struct GHashTable * D.18714;
  int D.17992;
  int iftmp.42;
  int D.17991;
  const char[11] * D.18724;
  unsigned char D.18725;
  int D.18726;
  unsigned char D.18727;
  int D.18728;
  const unsigned char * D.18733;
  unsigned char D.18734;
  int D.18735;
  const unsigned char * D.18736;
  unsigned char D.18737;
  int D.18738;
  const unsigned char * D.18743;
  unsigned char D.18744;
  int D.18745;
  const unsigned char * D.18746;
  unsigned char D.18747;
  int D.18748;
  const unsigned char * D.18753;
  unsigned char D.18754;
  int D.18755;
  const unsigned char * D.18756;
  unsigned char D.18757;
  int D.18758;
  struct MonoDl * internal_module.43;
  struct MonoDl * internal_module.44;
  char * D.18766;
  unsigned int D.18767;
  sizetype D.18768;
  const char * D.18769;
  unsigned int D.18772;
  sizetype D.18773;
  char * D.18774;
  char * D.18778;
  char * D.18782;
  int D.18788;
  int D.18790;
  int D.18792;
  int D.18794;
  char * error_msg.45;
  char * D.18813;
  char * iftmp.46;
  void * D.18842;
  gchar * D.18845;
  gchar * D.18846;
  gchar * D.18847;
  short unsigned int D.18848;
  int D.18849;
  int D.18850;
  void * * D.18853;
  char * error_msg.47;
  int D.18858;
  char * error_msg.48;
  int iftmp.49;
  struct MonoImage * image;
  struct MonoMethodPInvoke * piinfo;
  struct MonoTableInfo * tables;
  struct MonoTableInfo * im;
  struct MonoTableInfo * mr;
  guint32 im_cols[4];
  guint32 scope_token;
  const char * import;
  const char * orig_scope;
  const char * new_scope;
  char * error_msg;
  char * full_name;
  char * file_name;
  char * found_name;
  int i;
  struct MonoDl * module;
  gboolean cached;

  try
    {
      D.18660 = method->klass;
      image = D.18660->image;
      piinfo = method;
      tables = &image->tables;
      im = tables + 336;
      mr = tables + 312;
      import = 0B;
      found_name = 0B;
      module = 0B;
      cached = 0;
      D.18661 = method->flags;
      D.18662 = (int) D.18661;
      D.18663 = D.18662 & 8192;
      D.18664 = D.18663 == 0;
      D.18665 = (long int) D.18664;
      D.18666 = __builtin_expect (D.18665, 0);
      if (D.18666 != 0) goto <D.18667>; else goto <D.18668>;
      <D.18667>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1344, "method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL");
      <D.18668>:
      if (exc_class != 0B) goto <D.18669>; else goto <D.18670>;
      <D.18669>:
      *exc_class = 0B;
      *exc_arg = 0B;
      <D.18670>:
      D.18671 = piinfo->addr;
      if (D.18671 != 0B) goto <D.18672>; else goto <D.18673>;
      <D.18672>:
      D.18674 = piinfo->addr;
      return D.18674;
      <D.18673>:
      D.18660 = method->klass;
      D.18675 = D.18660->image;
      D.18676 = BIT_FIELD_REF <*D.18675, 32, 128>;
      D.18677 = D.18676 & 8;
      if (D.18677 != 0) goto <D.18678>; else goto <D.18679>;
      <D.18678>:
      {
        struct MonoReflectionMethodAux * method_aux;

        D.18660 = method->klass;
        D.18675 = D.18660->image;
        D.18680 = MEM[(struct MonoDynamicImage *)D.18675].method_aux_hash;
        method_aux = monoeg_g_hash_table_lookup (D.18680, method);
        if (method_aux == 0B) goto <D.18681>; else goto <D.18682>;
        <D.18681>:
        D.18674 = 0B;
        return D.18674;
        <D.18682>:
        import.38 = method_aux->dllentry;
        import = import.38;
        orig_scope = method_aux->dll;
      }
      goto <D.18684>;
      <D.18679>:
      D.18687 = piinfo->implmap_idx;
      if (D.18687 == 0) goto <D.18685>; else goto <D.18688>;
      <D.18688>:
      D.18687 = piinfo->implmap_idx;
      D.18689 = (int) D.18687;
      D.18690 = im->rows;
      D.18691 = (int) D.18690;
      if (D.18689 > D.18691) goto <D.18685>; else goto <D.18686>;
      <D.18685>:
      D.18674 = 0B;
      return D.18674;
      <D.18686>:
      D.18687 = piinfo->implmap_idx;
      D.18689 = (int) D.18687;
      D.18692 = D.18689 + -1;
      mono_metadata_decode_row (im, D.18692, &im_cols, 4);
      D.18695 = im_cols[3];
      if (D.18695 == 0) goto <D.18693>; else goto <D.18696>;
      <D.18696>:
      D.18695 = im_cols[3];
      D.18697 = mr->rows;
      D.18698 = (unsigned int) D.18697;
      if (D.18695 > D.18698) goto <D.18693>; else goto <D.18694>;
      <D.18693>:
      D.18674 = 0B;
      return D.18674;
      <D.18694>:
      D.18699 = im_cols[0];
      D.18700 = (short unsigned int) D.18699;
      piinfo->piflags = D.18700;
      D.18701 = im_cols[2];
      import.39 = mono_metadata_string_heap (image, D.18701);
      import = import.39;
      D.18695 = im_cols[3];
      D.18703 = D.18695 + 4294967295;
      D.18704 = (int) D.18703;
      scope_token = mono_metadata_decode_row_col (mr, D.18704, 0);
      orig_scope = mono_metadata_string_heap (image, scope_token);
      <D.18684>:
      import.40 = import;
      mono_dllmap_lookup (image, orig_scope, import.40, &new_scope, &import);
      if (module == 0B) goto <D.18706>; else goto <D.18707>;
      <D.18706>:
      mono_loader_lock ();
      D.18708 = image->pinvoke_scopes;
      if (D.18708 == 0B) goto <D.18709>; else goto <D.18710>;
      <D.18709>:
      D.18711 = monoeg_g_hash_table_new_full (monoeg_g_str_hash, monoeg_g_str_equal, monoeg_g_free, 0B);
      image->pinvoke_scopes = D.18711;
      D.18712 = monoeg_g_hash_table_new_full (monoeg_g_str_hash, monoeg_g_str_equal, monoeg_g_free, monoeg_g_free);
      image->pinvoke_scope_filenames = D.18712;
      <D.18710>:
      D.18708 = image->pinvoke_scopes;
      new_scope.41 = new_scope;
      module = monoeg_g_hash_table_lookup (D.18708, new_scope.41);
      D.18714 = image->pinvoke_scope_filenames;
      new_scope.41 = new_scope;
      found_name = monoeg_g_hash_table_lookup (D.18714, new_scope.41);
      mono_loader_unlock ();
      if (module != 0B) goto <D.18715>; else goto <D.18716>;
      <D.18715>:
      cached = 1;
      <D.18716>:
      if (found_name != 0B) goto <D.18717>; else goto <D.18718>;
      <D.18717>:
      found_name = monoeg_strdup (found_name);
      <D.18718>:
      <D.18707>:
      if (module == 0B) goto <D.18719>; else goto <D.18720>;
      <D.18719>:
      new_scope.41 = new_scope;
      mono_trace (64, 4, "DllImport attempting to load: \'%s\'.", new_scope.41);
      {
        size_t __s1_len;
        size_t __s2_len;

        __s2_len = 10;
        if (__s2_len <= 3) goto <D.18722>; else goto <D.18723>;
        <D.18722>:
        {
          const unsigned char * __s2;
          int __result;

          __s2 = new_scope;
          D.18724 = "__Internal";
          D.18725 = MEM[(const unsigned char *)D.18724];
          D.18726 = (int) D.18725;
          D.18727 = *__s2;
          D.18728 = (int) D.18727;
          __result = D.18726 - D.18728;
          {
            if (__s2_len != 0) goto <D.18729>; else goto <D.18730>;
            <D.18729>:
            if (__result == 0) goto <D.18731>; else goto <D.18732>;
            <D.18731>:
            D.18733 = &MEM[(void *)"__Internal" + 1B];
            D.18734 = *D.18733;
            D.18735 = (int) D.18734;
            D.18736 = __s2 + 1;
            D.18737 = *D.18736;
            D.18738 = (int) D.18737;
            __result = D.18735 - D.18738;
            if (__s2_len > 1) goto <D.18739>; else goto <D.18740>;
            <D.18739>:
            if (__result == 0) goto <D.18741>; else goto <D.18742>;
            <D.18741>:
            D.18743 = &MEM[(void *)"__Internal" + 2B];
            D.18744 = *D.18743;
            D.18745 = (int) D.18744;
            D.18746 = __s2 + 2;
            D.18747 = *D.18746;
            D.18748 = (int) D.18747;
            __result = D.18745 - D.18748;
            if (__s2_len > 2) goto <D.18749>; else goto <D.18750>;
            <D.18749>:
            if (__result == 0) goto <D.18751>; else goto <D.18752>;
            <D.18751>:
            D.18753 = &MEM[(void *)"__Internal" + 3B];
            D.18754 = *D.18753;
            D.18755 = (int) D.18754;
            D.18756 = __s2 + 3;
            D.18757 = *D.18756;
            D.18758 = (int) D.18757;
            __result = D.18755 - D.18758;
            <D.18752>:
            <D.18750>:
            <D.18742>:
            <D.18740>:
            <D.18732>:
            <D.18730>:
          }
          D.17991 = __result;
        }
        iftmp.42 = -D.17991;
        goto <D.18759>;
        <D.18723>:
        new_scope.41 = new_scope;
        iftmp.42 = __builtin_strcmp (new_scope.41, "__Internal");
        <D.18759>:
        D.17992 = iftmp.42;
      }
      if (D.17992 == 0) goto <D.18760>; else goto <D.18761>;
      <D.18760>:
      internal_module.43 = internal_module;
      if (internal_module.43 == 0B) goto <D.18763>; else goto <D.18764>;
      <D.18763>:
      internal_module.44 = mono_dl_open (0B, 1, &error_msg);
      internal_module = internal_module.44;
      <D.18764>:
      module = internal_module;
      <D.18761>:
      <D.18720>:
      i = 0;
      goto <D.18015>;
      <D.18014>:
      {
        char * base_name;
        char * dir_name;
        gboolean is_absolute;

        base_name = 0B;
        dir_name = 0B;
        new_scope.41 = new_scope;
        is_absolute = is_absolute_path (new_scope.41);
        switch (i) <default: <D.18002>, case 0: <D.17996>, case 1: <D.17998>, case 2: <D.18000>>
        <D.17996>:
        new_scope.41 = new_scope;
        file_name = monoeg_strdup (new_scope.41);
        goto <D.17997>;
        <D.17998>:
        new_scope.41 = new_scope;
        D.18766 = strstr (new_scope.41, ".dll");
        new_scope.41 = new_scope;
        new_scope.41 = new_scope;
        D.18767 = strlen (new_scope.41);
        D.18768 = D.18767 + 4294967292;
        D.18769 = new_scope.41 + D.18768;
        if (D.18766 == D.18769) goto <D.18770>; else goto <D.18771>;
        <D.18770>:
        new_scope.41 = new_scope;
        file_name = monoeg_strdup (new_scope.41);
        new_scope.41 = new_scope;
        D.18772 = strlen (new_scope.41);
        D.18773 = D.18772 + 4294967292;
        D.18774 = file_name + D.18773;
        *D.18774 = 0;
        goto <D.18775>;
        <D.18771>:
        // predicted unlikely by continue predictor.
        goto <D.17999>;
        <D.18775>:
        goto <D.17997>;
        <D.18000>:
        if (is_absolute != 0) goto <D.18776>; else goto <D.18777>;
        <D.18776>:
        new_scope.41 = new_scope;
        dir_name = monoeg_g_path_get_dirname (new_scope.41);
        new_scope.41 = new_scope;
        base_name = monoeg_g_path_get_basename (new_scope.41);
        D.18778 = strstr (base_name, "lib");
        if (D.18778 != base_name) goto <D.18779>; else goto <D.18780>;
        <D.18779>:
        {
          char * tmp;

          tmp = monoeg_g_strdup_printf ("lib%s", base_name);
          monoeg_g_free (base_name);
          base_name = tmp;
          file_name = monoeg_g_strdup_printf ("%s%s%s", dir_name, "/", base_name);
          goto <D.17997>;
        }
        <D.18780>:
        goto <D.18781>;
        <D.18777>:
        new_scope.41 = new_scope;
        D.18782 = strstr (new_scope.41, "lib");
        new_scope.41 = new_scope;
        if (D.18782 != new_scope.41) goto <D.18783>; else goto <D.18784>;
        <D.18783>:
        new_scope.41 = new_scope;
        file_name = monoeg_g_strdup_printf ("lib%s", new_scope.41);
        goto <D.17997>;
        <D.18784>:
        <D.18781>:
        // predicted unlikely by continue predictor.
        goto <D.17999>;
        <D.18002>:
        new_scope.41 = new_scope;
        D.18788 = monoeg_ascii_strcasecmp ("user32.dll", new_scope.41);
        if (D.18788 == 0) goto <D.18785>; else goto <D.18789>;
        <D.18789>:
        new_scope.41 = new_scope;
        D.18790 = monoeg_ascii_strcasecmp ("kernel32.dll", new_scope.41);
        if (D.18790 == 0) goto <D.18785>; else goto <D.18791>;
        <D.18791>:
        new_scope.41 = new_scope;
        D.18792 = monoeg_ascii_strcasecmp ("user32", new_scope.41);
        if (D.18792 == 0) goto <D.18785>; else goto <D.18793>;
        <D.18793>:
        new_scope.41 = new_scope;
        D.18794 = monoeg_ascii_strcasecmp ("kernel", new_scope.41);
        if (D.18794 == 0) goto <D.18785>; else goto <D.18786>;
        <D.18785>:
        file_name = monoeg_strdup ("libMonoSupportW.so");
        goto <D.18787>;
        <D.18786>:
        // predicted unlikely by continue predictor.
        goto <D.17999>;
        <D.18787>:
        goto <D.17997>;
        <D.17997>:
        if (is_absolute != 0) goto <D.18795>; else goto <D.18796>;
        <D.18795>:
        if (dir_name == 0B) goto <D.18797>; else goto <D.18798>;
        <D.18797>:
        dir_name = monoeg_g_path_get_dirname (file_name);
        <D.18798>:
        if (base_name == 0B) goto <D.18799>; else goto <D.18800>;
        <D.18799>:
        base_name = monoeg_g_path_get_basename (file_name);
        <D.18800>:
        <D.18796>:
        if (module == 0B) goto <D.18801>; else goto <D.18802>;
        <D.18801>:
        if (is_absolute != 0) goto <D.18803>; else goto <D.18804>;
        <D.18803>:
        module = cached_module_load (file_name, 1, &error_msg);
        if (module == 0B) goto <D.18805>; else goto <D.18806>;
        <D.18805>:
        error_msg.45 = error_msg;
        mono_trace (64, 4, "DllImport error loading library \'%s\': \'%s\'.", file_name, error_msg.45);
        error_msg.45 = error_msg;
        monoeg_g_free (error_msg.45);
        goto <D.18808>;
        <D.18806>:
        found_name = monoeg_strdup (file_name);
        <D.18808>:
        <D.18804>:
        <D.18802>:
        if (module == 0B) goto <D.18809>; else goto <D.18810>;
        <D.18809>:
        if (is_absolute == 0) goto <D.18811>; else goto <D.18812>;
        <D.18811>:
        {
          void * iter;
          char * mdirname;

          try
            {
              iter = 0B;
              D.18813 = image->name;
              mdirname = monoeg_g_path_get_dirname (D.18813);
              goto <D.18007>;
              <D.18006>:
              module = cached_module_load (full_name, 1, &error_msg);
              if (module == 0B) goto <D.18814>; else goto <D.18815>;
              <D.18814>:
              error_msg.45 = error_msg;
              mono_trace (64, 4, "DllImport error loading library \'%s\': \'%s\'.", full_name, error_msg.45);
              error_msg.45 = error_msg;
              monoeg_g_free (error_msg.45);
              goto <D.18816>;
              <D.18815>:
              found_name = monoeg_strdup (full_name);
              <D.18816>:
              monoeg_g_free (full_name);
              if (module != 0B) goto <D.18005>; else goto <D.18817>;
              <D.18817>:
              <D.18007>:
              full_name = mono_dl_build_path (mdirname, file_name, &iter);
              if (full_name != 0B) goto <D.18006>; else goto <D.18005>;
              <D.18005>:
              monoeg_g_free (mdirname);
            }
          finally
            {
              iter = {CLOBBER};
            }
        }
        <D.18812>:
        <D.18810>:
        if (module == 0B) goto <D.18818>; else goto <D.18819>;
        <D.18818>:
        {
          void * iter;
          char * file_or_base;

          try
            {
              iter = 0B;
              if (is_absolute != 0) goto <D.18821>; else goto <D.18822>;
              <D.18821>:
              iftmp.46 = base_name;
              goto <D.18823>;
              <D.18822>:
              iftmp.46 = file_name;
              <D.18823>:
              file_or_base = iftmp.46;
              goto <D.18012>;
              <D.18011>:
              module = cached_module_load (full_name, 1, &error_msg);
              if (module == 0B) goto <D.18824>; else goto <D.18825>;
              <D.18824>:
              error_msg.45 = error_msg;
              mono_trace (64, 4, "DllImport error loading library \'%s\': \'%s\'.", full_name, error_msg.45);
              error_msg.45 = error_msg;
              monoeg_g_free (error_msg.45);
              goto <D.18826>;
              <D.18825>:
              found_name = monoeg_strdup (full_name);
              <D.18826>:
              monoeg_g_free (full_name);
              if (module != 0B) goto <D.18010>; else goto <D.18827>;
              <D.18827>:
              <D.18012>:
              full_name = mono_dl_build_path (dir_name, file_or_base, &iter);
              if (full_name != 0B) goto <D.18011>; else goto <D.18010>;
              <D.18010>:
            }
          finally
            {
              iter = {CLOBBER};
            }
        }
        <D.18819>:
        if (module == 0B) goto <D.18828>; else goto <D.18829>;
        <D.18828>:
        module = cached_module_load (file_name, 1, &error_msg);
        if (module == 0B) goto <D.18830>; else goto <D.18831>;
        <D.18830>:
        error_msg.45 = error_msg;
        mono_trace (64, 4, "DllImport error loading library \'%s\': \'%s\'.", file_name, error_msg.45);
        goto <D.18832>;
        <D.18831>:
        found_name = monoeg_strdup (file_name);
        <D.18832>:
        <D.18829>:
        monoeg_g_free (file_name);
        if (is_absolute != 0) goto <D.18833>; else goto <D.18834>;
        <D.18833>:
        monoeg_g_free (base_name);
        monoeg_g_free (dir_name);
        <D.18834>:
        if (module != 0B) goto <D.18013>; else goto <D.18835>;
        <D.18835>:
      }
      <D.17999>:
      i = i + 1;
      <D.18015>:
      if (i <= 3) goto <D.18014>; else goto <D.18013>;
      <D.18013>:
      if (module == 0B) goto <D.18836>; else goto <D.18837>;
      <D.18836>:
      error_msg.45 = error_msg;
      mono_trace (16, 4, "DllImport unable to load library \'%s\'.", error_msg.45);
      error_msg.45 = error_msg;
      monoeg_g_free (error_msg.45);
      if (exc_class != 0B) goto <D.18838>; else goto <D.18839>;
      <D.18838>:
      *exc_class = "DllNotFoundException";
      new_scope.41 = new_scope;
      *exc_arg = new_scope.41;
      <D.18839>:
      D.18674 = 0B;
      return D.18674;
      <D.18837>:
      if (cached == 0) goto <D.18840>; else goto <D.18841>;
      <D.18840>:
      mono_trace (64, 4, "DllImport loaded library \'%s\'.", found_name);
      mono_loader_lock ();
      D.18708 = image->pinvoke_scopes;
      new_scope.41 = new_scope;
      D.18842 = monoeg_g_hash_table_lookup (D.18708, new_scope.41);
      if (D.18842 == 0B) goto <D.18843>; else goto <D.18844>;
      <D.18843>:
      D.18708 = image->pinvoke_scopes;
      new_scope.41 = new_scope;
      D.18845 = monoeg_strdup (new_scope.41);
      monoeg_g_hash_table_insert_replace (D.18708, D.18845, module, 0);
      D.18714 = image->pinvoke_scope_filenames;
      new_scope.41 = new_scope;
      D.18846 = monoeg_strdup (new_scope.41);
      D.18847 = monoeg_strdup (found_name);
      monoeg_g_hash_table_insert_replace (D.18714, D.18846, D.18847, 0);
      <D.18844>:
      mono_loader_unlock ();
      <D.18841>:
      new_scope.41 = new_scope;
      mono_trace (64, 4, "DllImport searching in: \'%s\' (\'%s\').", new_scope.41, found_name);
      monoeg_g_free (found_name);
      import.40 = import;
      mono_trace (64, 4, "Searching for \'%s\'.", import.40);
      D.18848 = piinfo->piflags;
      D.18849 = (int) D.18848;
      D.18850 = D.18849 & 1;
      if (D.18850 != 0) goto <D.18851>; else goto <D.18852>;
      <D.18851>:
      import.40 = import;
      D.18853 = &piinfo->addr;
      error_msg.47 = mono_dl_symbol (module, import.40, D.18853);
      error_msg = error_msg.47;
      goto <D.18855>;
      <D.18852>:
      {
        char * mangled_name;
        char * mangled_name2;
        int mangle_charset;
        int mangle_stdcall;
        int mangle_param_count;

        mangled_name = 0B;
        mangled_name2 = 0B;
        mangle_charset = 0;
        goto <D.18035>;
        <D.18034>:
        mangle_stdcall = 0;
        goto <D.18032>;
        <D.18031>:
        {
          gboolean need_param_count;

          need_param_count = 0;
          mangle_param_count = 0;
          goto <D.18029>;
          <D.18028>:
          D.18671 = piinfo->addr;
          if (D.18671 != 0B) goto <D.18856>; else goto <D.18857>;
          <D.18856>:
          // predicted unlikely by continue predictor.
          goto <D.18022>;
          <D.18857>:
          mangled_name = import;
          D.18848 = piinfo->piflags;
          D.18849 = (int) D.18848;
          D.18858 = D.18849 & 6;
          switch (D.18858) <default: <D.18027>, case 2: <D.18026>, case 4: <D.18023>, case 6: <D.18025>>
          <D.18023>:
          if (mangle_charset == 0) goto <D.18859>; else goto <D.18860>;
          <D.18859>:
          import.40 = import;
          mangled_name = monoeg_g_strconcat (import.40, "W", 0B);
          <D.18860>:
          goto <D.18024>;
          <D.18025>:
          if (mangle_charset == 1) goto <D.18861>; else goto <D.18862>;
          <D.18861>:
          import.40 = import;
          mangled_name = monoeg_g_strconcat (import.40, "A", 0B);
          <D.18862>:
          goto <D.18024>;
          <D.18026>:
          <D.18027>:
          if (mangle_charset == 1) goto <D.18863>; else goto <D.18864>;
          <D.18863>:
          import.40 = import;
          mangled_name = monoeg_g_strconcat (import.40, "A", 0B);
          <D.18864>:
          goto <D.18024>;
          <D.18024>:
          mangled_name2 = mangled_name;
          mono_trace (64, 4, "Probing \'%s\'.", mangled_name2);
          D.18853 = &piinfo->addr;
          error_msg.48 = mono_dl_symbol (module, mangled_name2, D.18853);
          error_msg = error_msg.48;
          error_msg.45 = error_msg;
          monoeg_g_free (error_msg.45);
          error_msg = 0B;
          D.18671 = piinfo->addr;
          if (D.18671 != 0B) goto <D.18866>; else goto <D.18867>;
          <D.18866>:
          mono_trace (64, 4, "Found as \'%s\'.", mangled_name2);
          <D.18867>:
          if (mangled_name != mangled_name2) goto <D.18868>; else goto <D.18869>;
          <D.18868>:
          monoeg_g_free (mangled_name2);
          <D.18869>:
          import.40 = import;
          if (mangled_name != import.40) goto <D.18870>; else goto <D.18871>;
          <D.18870>:
          monoeg_g_free (mangled_name);
          <D.18871>:
          <D.18022>:
          mangle_param_count = mangle_param_count + 4;
          <D.18029>:
          if (need_param_count != 0) goto <D.18873>; else goto <D.18874>;
          <D.18873>:
          iftmp.49 = 256;
          goto <D.18875>;
          <D.18874>:
          iftmp.49 = 0;
          <D.18875>:
          if (iftmp.49 >= mangle_param_count) goto <D.18028>; else goto <D.18030>;
          <D.18030>:
        }
        mangle_stdcall = mangle_stdcall + 1;
        <D.18032>:
        if (mangle_stdcall <= 1) goto <D.18031>; else goto <D.18033>;
        <D.18033>:
        mangle_charset = mangle_charset + 1;
        <D.18035>:
        if (mangle_charset <= 1) goto <D.18034>; else goto <D.18036>;
        <D.18036>:
      }
      <D.18855>:
      D.18671 = piinfo->addr;
      if (D.18671 == 0B) goto <D.18876>; else goto <D.18877>;
      <D.18876>:
      error_msg.45 = error_msg;
      monoeg_g_free (error_msg.45);
      if (exc_class != 0B) goto <D.18878>; else goto <D.18879>;
      <D.18878>:
      *exc_class = "EntryPointNotFoundException";
      import.40 = import;
      *exc_arg = import.40;
      <D.18879>:
      D.18674 = 0B;
      return D.18674;
      <D.18877>:
      D.18674 = piinfo->addr;
      return D.18674;
    }
  finally
    {
      im_cols = {CLOBBER};
      import = {CLOBBER};
      new_scope = {CLOBBER};
      error_msg = {CLOBBER};
    }
}


mono_dllmap_lookup (struct MonoImage * assembly, const char * dll, const char * func, const char * * rdll, const char * * rfunc)
{
  struct MonoDllMap * D.18884;
  int D.18889;
  struct MonoDllMap * global_dll_map.50;
  int res;

  if (assembly != 0B) goto <D.18882>; else goto <D.18883>;
  <D.18882>:
  D.18884 = assembly->dll_map;
  if (D.18884 != 0B) goto <D.18885>; else goto <D.18886>;
  <D.18885>:
  D.18884 = assembly->dll_map;
  res = mono_dllmap_lookup_list (D.18884, dll, func, rdll, rfunc);
  if (res != 0) goto <D.18887>; else goto <D.18888>;
  <D.18887>:
  D.18889 = res;
  return D.18889;
  <D.18888>:
  <D.18886>:
  <D.18883>:
  global_dll_map.50 = global_dll_map;
  D.18889 = mono_dllmap_lookup_list (global_dll_map.50, dll, func, rdll, rfunc);
  return D.18889;
}


mono_dllmap_lookup_list (struct MonoDllMap * dll_map, const char * dll, const char * func, const char * * rdll, const char * * rfunc)
{
  int D.18894;
  char * D.18897;
  char D.18898;
  char * D.18900;
  char D.18901;
  const gchar * D.18903;
  int D.18904;
  int D.17911;
  char * D.18911;
  char * D.18914;
  int D.17920;
  char * D.18919;
  int found;

  found = 0;
  *rdll = dll;
  if (dll_map == 0B) goto <D.18892>; else goto <D.18893>;
  <D.18892>:
  D.18894 = 0;
  return D.18894;
  <D.18893>:
  mono_loader_lock ();
  goto <D.17923>;
  <D.17922>:
  D.18897 = dll_map->dll;
  D.18898 = *D.18897;
  if (D.18898 == 105) goto <D.18899>; else goto <D.18895>;
  <D.18899>:
  D.18897 = dll_map->dll;
  D.18900 = D.18897 + 1;
  D.18901 = *D.18900;
  if (D.18901 == 58) goto <D.18902>; else goto <D.18895>;
  <D.18902>:
  D.18897 = dll_map->dll;
  D.18903 = D.18897 + 2;
  D.18904 = monoeg_ascii_strcasecmp (D.18903, dll);
  if (D.18904 != 0) goto <D.18905>; else goto <D.18906>;
  <D.18905>:
  // predicted unlikely by continue predictor.
  goto <D.17902>;
  <D.18906>:
  goto <D.18896>;
  <D.18895>:
  {
    size_t __s1_len;
    size_t __s2_len;

    D.18897 = dll_map->dll;
    D.17911 = __builtin_strcmp (D.18897, dll);
  }
  if (D.17911 != 0) goto <D.18907>; else goto <D.18908>;
  <D.18907>:
  // predicted unlikely by continue predictor.
  goto <D.17902>;
  <D.18908>:
  <D.18896>:
  if (found == 0) goto <D.18909>; else goto <D.18910>;
  <D.18909>:
  D.18911 = dll_map->target;
  if (D.18911 != 0B) goto <D.18912>; else goto <D.18913>;
  <D.18912>:
  D.18911 = dll_map->target;
  *rdll = D.18911;
  found = 1;
  <D.18913>:
  <D.18910>:
  D.18914 = dll_map->func;
  if (D.18914 != 0B) goto <D.18915>; else goto <D.18916>;
  <D.18915>:
  {
    size_t __s1_len;
    size_t __s2_len;

    D.18914 = dll_map->func;
    D.17920 = __builtin_strcmp (D.18914, func);
  }
  if (D.17920 == 0) goto <D.18917>; else goto <D.18918>;
  <D.18917>:
  D.18919 = dll_map->target_func;
  *rfunc = D.18919;
  goto <D.17921>;
  <D.18918>:
  <D.18916>:
  <D.17902>:
  dll_map = dll_map->next;
  <D.17923>:
  if (dll_map != 0B) goto <D.17922>; else goto <D.17921>;
  <D.17921>:
  mono_loader_unlock ();
  D.18894 = found;
  return D.18894;
}


is_absolute_path (const char * path)
{
  gboolean D.18921;

  D.18921 = monoeg_g_path_is_absolute (path);
  return D.18921;
}


cached_module_load (const char * name, int flags, char * * err)
{
  struct GHashTable * global_module_map.51;
  struct GHashTable * global_module_map.52;
  struct MonoDl * D.18931;
  gchar * D.18934;
  struct MonoDl * res;

  if (err != 0B) goto <D.18923>; else goto <D.18924>;
  <D.18923>:
  *err = 0B;
  <D.18924>:
  mono_loader_lock ();
  global_module_map.51 = global_module_map;
  if (global_module_map.51 == 0B) goto <D.18926>; else goto <D.18927>;
  <D.18926>:
  global_module_map.52 = monoeg_g_hash_table_new (monoeg_g_str_hash, monoeg_g_str_equal);
  global_module_map = global_module_map.52;
  <D.18927>:
  global_module_map.51 = global_module_map;
  res = monoeg_g_hash_table_lookup (global_module_map.51, name);
  if (res != 0B) goto <D.18929>; else goto <D.18930>;
  <D.18929>:
  mono_loader_unlock ();
  D.18931 = res;
  return D.18931;
  <D.18930>:
  res = mono_dl_open (name, flags, err);
  if (res != 0B) goto <D.18932>; else goto <D.18933>;
  <D.18932>:
  global_module_map.51 = global_module_map;
  D.18934 = monoeg_strdup (name);
  monoeg_g_hash_table_insert_replace (global_module_map.51, D.18934, res, 0);
  <D.18933>:
  mono_loader_unlock ();
  D.18931 = res;
  return D.18931;
}


mono_get_method (struct MonoImage * image, guint32 token, struct MonoClass * klass)
{
  struct MonoMethod * D.18936;

  D.18936 = mono_get_method_full (image, token, klass, 0B);
  return D.18936;
}


mono_get_method_full (struct MonoImage * image, guint32 token, struct MonoClass * klass, struct MonoGenericContext * context)
{
  unsigned int D.18938;
  struct GHashTable * D.18941;
  struct GHashTable * D.18944;
  unsigned int D.18945;
  const void * D.18946;
  unsigned int D.18948;
  unsigned int D.18949;
  struct GHashTable * D.18952;
  struct GHashTable * D.18955;
  const void * token.53;
  struct MonoMethod * D.18959;
  int used_context.54;
  unsigned int D.18965;
  unsigned int D.18966;
  void * D.18978;
  void * token.55;
  struct MonoMethod * result;
  gboolean used_context;

  try
    {
      result = 0B;
      used_context = 0;
      mono_image_lock (image);
      D.18938 = token >> 24;
      if (D.18938 == 6) goto <D.18939>; else goto <D.18940>;
      <D.18939>:
      D.18941 = image->method_cache;
      if (D.18941 == 0B) goto <D.18942>; else goto <D.18943>;
      <D.18942>:
      D.18944 = monoeg_g_hash_table_new (0B, 0B);
      image->method_cache = D.18944;
      <D.18943>:
      D.18941 = image->method_cache;
      D.18945 = token & 16777215;
      D.18946 = (const void *) D.18945;
      result = monoeg_g_hash_table_lookup (D.18941, D.18946);
      goto <D.18947>;
      <D.18940>:
      D.18948 = BIT_FIELD_REF <*image, 32, 128>;
      D.18949 = D.18948 & 8;
      if (D.18949 == 0) goto <D.18950>; else goto <D.18951>;
      <D.18950>:
      D.18952 = image->methodref_cache;
      if (D.18952 == 0B) goto <D.18953>; else goto <D.18954>;
      <D.18953>:
      D.18955 = monoeg_g_hash_table_new (0B, 0B);
      image->methodref_cache = D.18955;
      <D.18954>:
      D.18952 = image->methodref_cache;
      token.53 = (const void *) token;
      result = monoeg_g_hash_table_lookup (D.18952, token.53);
      <D.18951>:
      <D.18947>:
      mono_image_unlock (image);
      if (result != 0B) goto <D.18957>; else goto <D.18958>;
      <D.18957>:
      D.18959 = result;
      return D.18959;
      <D.18958>:
      result = mono_get_method_from_token (image, token, klass, context, &used_context);
      if (result == 0B) goto <D.18960>; else goto <D.18961>;
      <D.18960>:
      D.18959 = 0B;
      return D.18959;
      <D.18961>:
      mono_image_lock (image);
      used_context.54 = used_context;
      if (used_context.54 == 0) goto <D.18963>; else goto <D.18964>;
      <D.18963>:
      D.18965 = BIT_FIELD_REF <*result, 32, 160>;
      D.18966 = D.18965 & 4096;
      if (D.18966 == 0) goto <D.18967>; else goto <D.18968>;
      <D.18967>:
      {
        struct MonoMethod * result2;

        result2 = 0B;
        D.18938 = token >> 24;
        if (D.18938 == 6) goto <D.18969>; else goto <D.18970>;
        <D.18969>:
        D.18941 = image->method_cache;
        D.18945 = token & 16777215;
        D.18946 = (const void *) D.18945;
        result2 = monoeg_g_hash_table_lookup (D.18941, D.18946);
        goto <D.18971>;
        <D.18970>:
        D.18948 = BIT_FIELD_REF <*image, 32, 128>;
        D.18949 = D.18948 & 8;
        if (D.18949 == 0) goto <D.18972>; else goto <D.18973>;
        <D.18972>:
        D.18952 = image->methodref_cache;
        token.53 = (const void *) token;
        result2 = monoeg_g_hash_table_lookup (D.18952, token.53);
        <D.18973>:
        <D.18971>:
        if (result2 != 0B) goto <D.18974>; else goto <D.18975>;
        <D.18974>:
        mono_image_unlock (image);
        D.18959 = result2;
        return D.18959;
        <D.18975>:
        D.18938 = token >> 24;
        if (D.18938 == 6) goto <D.18976>; else goto <D.18977>;
        <D.18976>:
        D.18941 = image->method_cache;
        D.18945 = token & 16777215;
        D.18978 = (void *) D.18945;
        monoeg_g_hash_table_insert_replace (D.18941, D.18978, result, 0);
        goto <D.18979>;
        <D.18977>:
        D.18948 = BIT_FIELD_REF <*image, 32, 128>;
        D.18949 = D.18948 & 8;
        if (D.18949 == 0) goto <D.18980>; else goto <D.18981>;
        <D.18980>:
        D.18952 = image->methodref_cache;
        token.55 = (void *) token;
        monoeg_g_hash_table_insert_replace (D.18952, token.55, result, 0);
        <D.18981>:
        <D.18979>:
      }
      <D.18968>:
      <D.18964>:
      mono_image_unlock (image);
      D.18959 = result;
      return D.18959;
    }
  finally
    {
      used_context = {CLOBBER};
    }
}


mono_get_method_from_token (struct MonoImage * image, guint32 token, struct MonoClass * klass, struct MonoGenericContext * context, gboolean * used_context)
{
  unsigned int D.18985;
  int token.56;
  unsigned int D.18987;
  unsigned int D.18988;
  struct MonoClass * D.18993;
  struct MonoClass * handle_class.57;
  char * D.18997;
  gchar * D.18998;
  struct MonoMethod * D.18999;
  unsigned int idx.58;
  gchar * D.19009;
  <unnamed-unsigned:24> D.19012;
  int D.19013;
  gchar * D.19016;
  struct MonoTableInfo * D.19017;
  int D.19018;
  unsigned int D.19022;
  unsigned int D.19023;
  unsigned int D.19025;
  unsigned int D.19026;
  unsigned int methods_size.59;
  unsigned int methods_size.60;
  long unsigned int D.19029;
  long unsigned int D.19030;
  unsigned int D.19035;
  short unsigned int D.19038;
  short unsigned int D.19039;
  unsigned int D.19040;
  const char * D.19041;
  const char * sig.61;
  unsigned int D.19045;
  const char * sig.62;
  unsigned int D.19047;
  char D.19048;
  unsigned char D.19049;
  int D.19050;
  int D.19051;
  int D.19056;
  struct MonoClass * D.19061;
  struct MonoClass * D.19062;
  int D.18063;
  int iftmp.63;
  int D.18062;
  const char[6] * D.19068;
  unsigned char D.19069;
  int D.19070;
  unsigned char D.19071;
  int D.19072;
  const unsigned char * D.19077;
  unsigned char D.19078;
  int D.19079;
  const unsigned char * D.19080;
  unsigned char D.19081;
  int D.19082;
  const unsigned char * D.19087;
  unsigned char D.19088;
  int D.19089;
  const unsigned char * D.19090;
  unsigned char D.19091;
  int D.19092;
  const unsigned char * D.19097;
  unsigned char D.19098;
  int D.19099;
  const unsigned char * D.19100;
  unsigned char D.19101;
  int D.19102;
  const char * D.19104;
  unsigned int D.19110;
  unsigned int D.19111;
  short unsigned int D.19112;
  short unsigned int D.19113;
  const struct MonoTableInfo * D.19116;
  int D.19117;
  int D.19118;
  unsigned int D.19119;
  short unsigned int D.19120;
  struct MonoMethod * result;
  int table;
  int idx;
  struct MonoTableInfo * tables;
  struct MonoGenericContainer * generic_container;
  struct MonoGenericContainer * container;
  const char * sig;
  int size;
  guint32 cols[6];

  try
    {
      D.18985 = token >> 24;
      table = (int) D.18985;
      token.56 = (int) token;
      idx = token.56 & 16777215;
      tables = &image->tables;
      generic_container = 0B;
      container = 0B;
      sig = 0B;
      D.18987 = BIT_FIELD_REF <*image, 32, 128>;
      D.18988 = D.18987 & 8;
      if (D.18988 != 0) goto <D.18989>; else goto <D.18990>;
      <D.18989>:
      {
        struct MonoClass * handle_class;

        try
          {
            result = mono_lookup_dynamic_token_class (image, token, 1, &handle_class, context);
            if (result != 0B) goto <D.18991>; else goto <D.18992>;
            <D.18991>:
            D.18993 = mono_defaults.methodhandle_class;
            handle_class.57 = handle_class;
            if (D.18993 != handle_class.57) goto <D.18995>; else goto <D.18996>;
            <D.18995>:
            D.18997 = image->name;
            D.18998 = monoeg_g_strdup_printf ("Bad method token 0x%08x on image %s.", token, D.18997);
            mono_loader_set_error_bad_image (D.18998);
            D.18999 = 0B;
            return D.18999;
            <D.18996>:
            <D.18992>:
            D.18999 = result;
            return D.18999;
          }
        finally
          {
            handle_class = {CLOBBER};
          }
      }
      <D.18990>:
      if (table != 6) goto <D.19000>; else goto <D.19001>;
      <D.19000>:
      if (table == 43) goto <D.19002>; else goto <D.19003>;
      <D.19002>:
      if (used_context != 0B) goto <D.19004>; else goto <D.19005>;
      <D.19004>:
      *used_context = 1;
      <D.19005>:
      idx.58 = (unsigned int) idx;
      D.18999 = method_from_methodspec (image, context, idx.58);
      return D.18999;
      <D.19003>:
      if (table != 10) goto <D.19007>; else goto <D.19008>;
      <D.19007>:
      monoeg_g_log (0B, 16, "got wrong token: 0x%08x\n", token);
      D.18997 = image->name;
      D.19009 = monoeg_g_strdup_printf ("Bad method token 0x%08x on image %s.", token, D.18997);
      mono_loader_set_error_bad_image (D.19009);
      D.18999 = 0B;
      return D.18999;
      <D.19008>:
      idx.58 = (unsigned int) idx;
      D.18999 = method_from_memberref (image, idx.58, context, used_context);
      return D.18999;
      <D.19001>:
      if (used_context != 0B) goto <D.19010>; else goto <D.19011>;
      <D.19010>:
      *used_context = 0;
      <D.19011>:
      D.19012 = image->tables[6].rows;
      D.19013 = (int) D.19012;
      if (D.19013 < idx) goto <D.19014>; else goto <D.19015>;
      <D.19014>:
      D.18997 = image->name;
      D.19016 = monoeg_g_strdup_printf ("Bad method token 0x%08x on image %s.", token, D.18997);
      mono_loader_set_error_bad_image (D.19016);
      D.18999 = 0B;
      return D.18999;
      <D.19015>:
      D.19017 = &image->tables[6];
      D.19018 = idx + -1;
      mono_metadata_decode_row (D.19017, D.19018, &cols, 6);
      D.19022 = cols[2];
      D.19023 = D.19022 & 8192;
      if (D.19023 != 0) goto <D.19019>; else goto <D.19024>;
      <D.19024>:
      D.19025 = cols[1];
      D.19026 = D.19025 & 4096;
      if (D.19026 != 0) goto <D.19019>; else goto <D.19020>;
      <D.19019>:
      result = mono_image_alloc0 (image, 32);
      goto <D.19021>;
      <D.19020>:
      result = mono_image_alloc0 (image, 24);
      methods_size.59 = methods_size;
      methods_size.60 = methods_size.59 + 24;
      methods_size = methods_size.60;
      <D.19021>:
      D.19029 = mono_stats.method_count;
      D.19030 = D.19029 + 1;
      mono_stats.method_count = D.19030;
      if (klass == 0B) goto <D.19031>; else goto <D.19032>;
      <D.19031>:
      {
        guint32 type;

        type = mono_metadata_typedef_from_method (image, token);
        if (type == 0) goto <D.19033>; else goto <D.19034>;
        <D.19033>:
        D.18999 = 0B;
        return D.18999;
        <D.19034>:
        D.19035 = type | 33554432;
        klass = mono_class_get (image, D.19035);
        if (klass == 0B) goto <D.19036>; else goto <D.19037>;
        <D.19036>:
        D.18999 = 0B;
        return D.18999;
        <D.19037>:
      }
      <D.19032>:
      result->slot = -1;
      result->klass = klass;
      D.19022 = cols[2];
      D.19038 = (short unsigned int) D.19022;
      result->flags = D.19038;
      D.19025 = cols[1];
      D.19039 = (short unsigned int) D.19025;
      result->iflags = D.19039;
      result->token = token;
      D.19040 = cols[3];
      D.19041 = mono_metadata_string_heap (image, D.19040);
      result->name = D.19041;
      sig.61 = sig;
      if (sig.61 == 0B) goto <D.19043>; else goto <D.19044>;
      <D.19043>:
      D.19045 = cols[4];
      sig.62 = mono_metadata_blob_heap (image, D.19045);
      sig = sig.62;
      <D.19044>:
      sig.61 = sig;
      D.19047 = mono_metadata_decode_blob_size (sig.61, &sig);
      size = (int) D.19047;
      container = klass->generic_container;
      sig.61 = sig;
      D.19048 = *sig.61;
      D.19049 = (unsigned char) D.19048;
      D.19050 = (int) D.19049;
      D.19051 = D.19050 & 16;
      if (D.19051 != 0) goto <D.19052>; else goto <D.19053>;
      <D.19052>:
      generic_container = mono_metadata_load_generic_params (image, token, container);
      <D.19053>:
      if (generic_container != 0B) goto <D.19054>; else goto <D.19055>;
      <D.19054>:
      result->is_generic = 1;
      generic_container->owner.method = result;
      D.19056 = mono_metadata_load_generic_param_constraints_full (image, token, generic_container);
      if (D.19056 == 0) goto <D.19057>; else goto <D.19058>;
      <D.19057>:
      D.18999 = 0B;
      return D.18999;
      <D.19058>:
      container = generic_container;
      <D.19055>:
      D.19025 = cols[1];
      D.19026 = D.19025 & 4096;
      if (D.19026 != 0) goto <D.19059>; else goto <D.19060>;
      <D.19059>:
      D.19061 = result->klass;
      D.19062 = mono_defaults.string_class;
      if (D.19061 == D.19062) goto <D.19063>; else goto <D.19064>;
      <D.19063>:
      {
        size_t __s1_len;
        size_t __s2_len;

        __s2_len = 5;
        if (__s2_len <= 3) goto <D.19066>; else goto <D.19067>;
        <D.19066>:
        {
          const unsigned char * __s2;
          int __result;

          __s2 = result->name;
          D.19068 = ".ctor";
          D.19069 = MEM[(const unsigned char *)D.19068];
          D.19070 = (int) D.19069;
          D.19071 = *__s2;
          D.19072 = (int) D.19071;
          __result = D.19070 - D.19072;
          {
            if (__s2_len != 0) goto <D.19073>; else goto <D.19074>;
            <D.19073>:
            if (__result == 0) goto <D.19075>; else goto <D.19076>;
            <D.19075>:
            D.19077 = &MEM[(void *)".ctor" + 1B];
            D.19078 = *D.19077;
            D.19079 = (int) D.19078;
            D.19080 = __s2 + 1;
            D.19081 = *D.19080;
            D.19082 = (int) D.19081;
            __result = D.19079 - D.19082;
            if (__s2_len > 1) goto <D.19083>; else goto <D.19084>;
            <D.19083>:
            if (__result == 0) goto <D.19085>; else goto <D.19086>;
            <D.19085>:
            D.19087 = &MEM[(void *)".ctor" + 2B];
            D.19088 = *D.19087;
            D.19089 = (int) D.19088;
            D.19090 = __s2 + 2;
            D.19091 = *D.19090;
            D.19092 = (int) D.19091;
            __result = D.19089 - D.19092;
            if (__s2_len > 2) goto <D.19093>; else goto <D.19094>;
            <D.19093>:
            if (__result == 0) goto <D.19095>; else goto <D.19096>;
            <D.19095>:
            D.19097 = &MEM[(void *)".ctor" + 3B];
            D.19098 = *D.19097;
            D.19099 = (int) D.19098;
            D.19100 = __s2 + 3;
            D.19101 = *D.19100;
            D.19102 = (int) D.19101;
            __result = D.19099 - D.19102;
            <D.19096>:
            <D.19094>:
            <D.19086>:
            <D.19084>:
            <D.19076>:
            <D.19074>:
          }
          D.18062 = __result;
        }
        iftmp.63 = -D.18062;
        goto <D.19103>;
        <D.19067>:
        D.19104 = result->name;
        iftmp.63 = __builtin_strcmp (D.19104, ".ctor");
        <D.19103>:
        D.18063 = iftmp.63;
      }
      if (D.18063 == 0) goto <D.19105>; else goto <D.19106>;
      <D.19105>:
      result->string_ctor = 1;
      <D.19106>:
      <D.19064>:
      goto <D.19107>;
      <D.19060>:
      D.19022 = cols[2];
      D.19023 = D.19022 & 8192;
      if (D.19023 != 0) goto <D.19108>; else goto <D.19109>;
      <D.19108>:
      {
        struct MonoMethodPInvoke * piinfo;

        piinfo = result;
        D.19018 = idx + -1;
        D.19110 = (unsigned int) D.19018;
        D.19111 = mono_metadata_implmap_from_method (image, D.19110);
        D.19112 = (short unsigned int) D.19111;
        piinfo->implmap_idx = D.19112;
        D.19113 = piinfo->implmap_idx;
        if (D.19113 != 0) goto <D.19114>; else goto <D.19115>;
        <D.19114>:
        D.19116 = tables + 336;
        D.19113 = piinfo->implmap_idx;
        D.19117 = (int) D.19113;
        D.19118 = D.19117 + -1;
        D.19119 = mono_metadata_decode_row_col (D.19116, D.19118, 0);
        D.19120 = (short unsigned int) D.19119;
        piinfo->piflags = D.19120;
        <D.19115>:
      }
      <D.19109>:
      <D.19107>:
      if (generic_container != 0B) goto <D.19121>; else goto <D.19122>;
      <D.19121>:
      mono_method_set_generic_container (result, generic_container);
      <D.19122>:
      D.18999 = result;
      return D.18999;
    }
  finally
    {
      sig = {CLOBBER};
      cols = {CLOBBER};
    }
}


method_from_methodspec (struct MonoImage * image, struct MonoGenericContext * context, guint32 idx)
{
  const struct MonoTableInfo * D.19126;
  unsigned int D.19127;
  int D.19128;
  unsigned int D.19129;
  int D.19130;
  struct MonoMethod * D.19133;
  const char * ptr.64;
  const char * ptr.65;
  const char * ptr.66;
  _Bool D.19137;
  long int D.19138;
  long int D.19139;
  int param_count.67;
  unsigned int D.19147;
  unsigned int D.19148;
  int D.19151;
  unsigned int D.19154;
  unsigned int D.19157;
  struct MonoGenericClass * D.19161;
  unsigned int D.19164;
  unsigned int D.19165;
  _Bool D.19166;
  long int D.19167;
  long int D.19168;
  struct MonoGenericInst * iftmp.68;
  struct MonoError error;
  struct MonoMethod * method;
  struct MonoClass * klass;
  struct MonoTableInfo * tables;
  struct MonoGenericContext new_context;
  struct MonoGenericInst * inst;
  const char * ptr;
  guint32 cols[2];
  guint32 token;
  guint32 nindex;
  guint32 param_count;

  try
    {
      tables = &image->tables;
      D.19126 = tables + 516;
      D.19127 = idx + 4294967295;
      D.19128 = (int) D.19127;
      mono_metadata_decode_row (D.19126, D.19128, &cols, 2);
      token = cols[0];
      nindex = token >> 1;
      D.19129 = cols[1];
      D.19130 = mono_verifier_verify_methodspec_signature (image, D.19129, 0B);
      if (D.19130 == 0) goto <D.19131>; else goto <D.19132>;
      <D.19131>:
      D.19133 = 0B;
      return D.19133;
      <D.19132>:
      D.19129 = cols[1];
      ptr.64 = mono_metadata_blob_heap (image, D.19129);
      ptr = ptr.64;
      ptr.65 = ptr;
      mono_metadata_decode_value (ptr.65, &ptr);
      ptr.65 = ptr;
      ptr.66 = ptr.65 + 1;
      ptr = ptr.66;
      ptr.65 = ptr;
      param_count = mono_metadata_decode_value (ptr.65, &ptr);
      D.19137 = param_count == 0;
      D.19138 = (long int) D.19137;
      D.19139 = __builtin_expect (D.19138, 0);
      if (D.19139 != 0) goto <D.19140>; else goto <D.19141>;
      <D.19140>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1110, "param_count");
      <D.19141>:
      param_count.67 = (int) param_count;
      ptr.65 = ptr;
      inst = mono_metadata_parse_generic_inst (image, 0B, param_count.67, ptr.65, &ptr);
      if (inst == 0B) goto <D.19143>; else goto <D.19144>;
      <D.19143>:
      D.19133 = 0B;
      return D.19133;
      <D.19144>:
      if (context != 0B) goto <D.19145>; else goto <D.19146>;
      <D.19145>:
      D.19147 = BIT_FIELD_REF <*inst, 32, 32>;
      D.19148 = D.19147 & 4194304;
      if (D.19148 != 0) goto <D.19149>; else goto <D.19150>;
      <D.19149>:
      inst = mono_metadata_inflate_generic_inst (inst, context, &error);
      D.19151 = mono_error_ok (&error);
      if (D.19151 == 0) goto <D.19152>; else goto <D.19153>;
      <D.19152>:
      mono_error_cleanup (&error);
      D.19133 = 0B;
      return D.19133;
      <D.19153>:
      <D.19150>:
      <D.19146>:
      D.19154 = token & 1;
      if (D.19154 == 0) goto <D.19155>; else goto <D.19156>;
      <D.19155>:
      D.19157 = nindex | 100663296;
      method = mono_get_method_full (image, D.19157, 0B, context);
      goto <D.19158>;
      <D.19156>:
      method = method_from_memberref (image, nindex, context, 0B);
      <D.19158>:
      if (method == 0B) goto <D.19159>; else goto <D.19160>;
      <D.19159>:
      D.19133 = 0B;
      return D.19133;
      <D.19160>:
      klass = method->klass;
      D.19161 = klass->generic_class;
      if (D.19161 != 0B) goto <D.19162>; else goto <D.19163>;
      <D.19162>:
      D.19164 = BIT_FIELD_REF <*method, 32, 160>;
      D.19165 = D.19164 & 4096;
      D.19166 = D.19165 == 0;
      D.19167 = (long int) D.19166;
      D.19168 = __builtin_expect (D.19167, 0);
      if (D.19168 != 0) goto <D.19169>; else goto <D.19170>;
      <D.19169>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1135, "method->is_inflated");
      <D.19170>:
      method = MEM[(struct MonoMethodInflated *)method].declaring;
      <D.19163>:
      D.19161 = klass->generic_class;
      if (D.19161 != 0B) goto <D.19172>; else goto <D.19173>;
      <D.19172>:
      D.19161 = klass->generic_class;
      iftmp.68 = D.19161->context.class_inst;
      goto <D.19174>;
      <D.19173>:
      iftmp.68 = 0B;
      <D.19174>:
      new_context.class_inst = iftmp.68;
      new_context.method_inst = inst;
      D.19133 = mono_class_inflate_generic_method_full (method, klass, &new_context);
      return D.19133;
    }
  finally
    {
      error = {CLOBBER};
      new_context = {CLOBBER};
      ptr = {CLOBBER};
      cols = {CLOBBER};
    }
}


method_from_memberref (struct MonoImage * image, guint32 idx, struct MonoGenericContext * typespec_context, gboolean * used_context)
{
  const struct MonoTableInfo * D.19177;
  unsigned int D.19178;
  int D.19179;
  unsigned int D.19180;
  unsigned int D.19181;
  _Bool D.19184;
  int D.19185;
  unsigned int D.19186;
  char * D.19189;
  const char * D.19190;
  struct MonoMethod * D.19191;
  unsigned int D.19192;
  unsigned int D.19195;
  unsigned int D.19198;
  _Bool D.19199;
  long int D.19200;
  long int D.19201;
  int D.19204;
  const char * D.19207;
  const char * ptr.69;
  const char * ptr.70;
  unsigned char D.19214;
  struct MonoClass * iftmp.71;
  struct MonoGenericClass * D.19220;
  struct MonoType * D.19226;
  short unsigned int D.19227;
  int D.19230;
  struct MonoImage * D.19231;
  char * D.19232;
  struct MonoClass * klass;
  struct MonoMethod * method;
  struct MonoTableInfo * tables;
  guint32 cols[6];
  guint32 nindex;
  guint32 class;
  guint32 sig_idx;
  const char * mname;
  struct MonoMethodSignature * sig;
  const char * ptr;

  try
    {
      klass = 0B;
      method = 0B;
      tables = &image->tables;
      D.19177 = tables + 120;
      D.19178 = idx + 4294967295;
      D.19179 = (int) D.19178;
      mono_metadata_decode_row (D.19177, D.19179, &cols, 3);
      D.19180 = cols[0];
      nindex = D.19180 >> 3;
      D.19180 = cols[0];
      class = D.19180 & 7;
      D.19181 = cols[1];
      mname = mono_metadata_string_heap (image, D.19181);
      if (used_context != 0B) goto <D.19182>; else goto <D.19183>;
      <D.19182>:
      D.19184 = class == 4;
      D.19185 = (int) D.19184;
      *used_context = D.19185;
      <D.19183>:
      switch (class) <default: <D.17859>, case 0: <D.17856>, case 1: <D.17851>, case 3: <D.17858>, case 4: <D.17854>>
      <D.17851>:
      D.19186 = nindex | 16777216;
      klass = mono_class_from_typeref (image, D.19186);
      if (klass == 0B) goto <D.19187>; else goto <D.19188>;
      <D.19187>:
      {
        char * name;

        D.19186 = nindex | 16777216;
        name = mono_class_name_from_token (image, D.19186);
        D.19189 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s in assembly %s, type %s", mname, D.19189, name);
        D.19190 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.19190);
        monoeg_g_free (name);
        D.19191 = 0B;
        return D.19191;
      }
      <D.19188>:
      goto <D.17853>;
      <D.17854>:
      D.19192 = nindex | 452984832;
      klass = mono_class_get_full (image, D.19192, typespec_context);
      if (klass == 0B) goto <D.19193>; else goto <D.19194>;
      <D.19193>:
      {
        char * name;

        D.19192 = nindex | 452984832;
        name = mono_class_name_from_token (image, D.19192);
        D.19189 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s in assembly %s, type %s", mname, D.19189, name);
        D.19190 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.19190);
        monoeg_g_free (name);
        D.19191 = 0B;
        return D.19191;
      }
      <D.19194>:
      goto <D.17853>;
      <D.17856>:
      D.19195 = nindex | 33554432;
      klass = mono_class_get (image, D.19195);
      if (klass == 0B) goto <D.19196>; else goto <D.19197>;
      <D.19196>:
      {
        char * name;

        D.19195 = nindex | 33554432;
        name = mono_class_name_from_token (image, D.19195);
        D.19189 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s in assembly %s, type %s", mname, D.19189, name);
        D.19190 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.19190);
        monoeg_g_free (name);
        D.19191 = 0B;
        return D.19191;
      }
      <D.19197>:
      goto <D.17853>;
      <D.17858>:
      D.19198 = nindex | 100663296;
      D.19191 = mono_get_method (image, D.19198, 0B);
      return D.19191;
      <D.17859>:
      {
        char * message;

        message = monoeg_g_strdup_printf ("Memberref parent unknown: class: %d, index %d", class, nindex);
        mono_loader_set_error_method_load ("", message);
        D.19191 = 0B;
        return D.19191;
      }
      <D.17853>:
      D.19199 = klass == 0B;
      D.19200 = (long int) D.19199;
      D.19201 = __builtin_expect (D.19200, 0);
      if (D.19201 != 0) goto <D.19202>; else goto <D.19203>;
      <D.19202>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1016, "klass");
      <D.19203>:
      mono_class_init (klass);
      sig_idx = cols[2];
      D.19204 = mono_verifier_verify_memberref_method_signature (image, sig_idx, 0B);
      if (D.19204 == 0) goto <D.19205>; else goto <D.19206>;
      <D.19205>:
      D.19207 = klass->name;
      mono_loader_set_error_method_load (D.19207, mname);
      D.19191 = 0B;
      return D.19191;
      <D.19206>:
      ptr.69 = mono_metadata_blob_heap (image, sig_idx);
      ptr = ptr.69;
      ptr.70 = ptr;
      mono_metadata_decode_blob_size (ptr.70, &ptr);
      sig = find_cached_memberref_sig (image, sig_idx);
      if (sig == 0B) goto <D.19210>; else goto <D.19211>;
      <D.19210>:
      ptr.70 = ptr;
      sig = mono_metadata_parse_method_signature (image, 0, ptr.70, 0B);
      if (sig == 0B) goto <D.19212>; else goto <D.19213>;
      <D.19212>:
      D.19191 = 0B;
      return D.19191;
      <D.19213>:
      sig = cache_memberref_sig (image, sig_idx, sig);
      <D.19211>:
      switch (class) <default: <D.17867>, case 0: <D.17862>, case 1: <D.17861>, case 4: <D.17864>>
      <D.17861>:
      <D.17862>:
      method = find_method (klass, 0B, mname, sig, klass);
      goto <D.17863>;
      <D.17864>:
      {
        struct MonoType * type;

        type = &klass->byval_arg;
        D.19214 = type->type;
        if (D.19214 != 20) goto <D.19215>; else goto <D.19216>;
        <D.19215>:
        D.19214 = type->type;
        if (D.19214 != 29) goto <D.19217>; else goto <D.19218>;
        <D.19217>:
        {
          struct MonoClass * in_class;

          D.19220 = klass->generic_class;
          if (D.19220 != 0B) goto <D.19221>; else goto <D.19222>;
          <D.19221>:
          D.19220 = klass->generic_class;
          iftmp.71 = D.19220->container_class;
          goto <D.19223>;
          <D.19222>:
          iftmp.71 = klass;
          <D.19223>:
          in_class = iftmp.71;
          method = find_method (in_class, 0B, mname, sig, klass);
          goto <D.17863>;
        }
        <D.19218>:
        <D.19216>:
        method = mono_method_search_in_array_class (klass, mname, sig);
        goto <D.17863>;
      }
      <D.17867>:
      monoeg_g_log (0B, 4, "Memberref parent unknown: class: %d, index %d", class, nindex);
      <D.17868>:
      goto <D.17868>;
      monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "loader.c", 1061);
      <D.17863>:
      if (method == 0B) goto <D.19224>; else goto <D.19225>;
      <D.19224>:
      {
        char * msig;
        char * class_name;
        struct GString * s;

        msig = mono_signature_get_desc (sig, 0);
        D.19226 = &klass->byval_arg;
        class_name = mono_type_get_name (D.19226);
        s = monoeg_g_string_new (mname);
        D.19227 = sig->generic_param_count;
        if (D.19227 != 0) goto <D.19228>; else goto <D.19229>;
        <D.19228>:
        D.19227 = sig->generic_param_count;
        D.19230 = (int) D.19227;
        monoeg_g_string_append_printf (s, "<[%d]>", D.19230);
        <D.19229>:
        monoeg_g_string_append_printf (s, "(%s)", msig);
        monoeg_g_free (msig);
        msig = monoeg_g_string_free (s, 0);
        D.19231 = klass->image;
        D.19232 = D.19231->name;
        D.19189 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s::%s in assembly %s, referenced in assembly %s", class_name, msig, D.19232, D.19189);
        mono_loader_set_error_method_load (class_name, mname);
        monoeg_g_free (msig);
        monoeg_g_free (class_name);
      }
      <D.19225>:
      D.19191 = method;
      return D.19191;
    }
  finally
    {
      cols = {CLOBBER};
      ptr = {CLOBBER};
    }
}


find_method (struct MonoClass * in_class, struct MonoClass * ic, const char * name, struct MonoMethodSignature * sig, struct MonoClass * from_class)
{
  int iftmp.72;
  unsigned int D.19239;
  unsigned int D.19240;
  unsigned char D.19242;
  struct MonoType * D.19246;
  const char * D.19249;
  char D.19251;
  _Bool D.19254;
  long int D.19255;
  long int D.19256;
  char D.19260;
  int D.17735;
  int iftmp.73;
  int D.17734;
  const char[6] * D.19266;
  unsigned char D.19267;
  int D.19268;
  unsigned char D.19269;
  int D.19270;
  const unsigned char * D.19275;
  unsigned char D.19276;
  int D.19277;
  const unsigned char * D.19278;
  unsigned char D.19279;
  int D.19280;
  const unsigned char * D.19285;
  unsigned char D.19286;
  int D.19287;
  const unsigned char * D.19288;
  unsigned char D.19289;
  int D.19290;
  const unsigned char * D.19295;
  unsigned char D.19296;
  int D.19297;
  const unsigned char * D.19298;
  unsigned char D.19299;
  int D.19300;
  int D.17744;
  int iftmp.74;
  int D.17743;
  const char[7] * D.19306;
  unsigned char D.19307;
  int D.19308;
  unsigned char D.19309;
  int D.19310;
  const unsigned char * D.19315;
  unsigned char D.19316;
  int D.19317;
  const unsigned char * D.19318;
  unsigned char D.19319;
  int D.19320;
  const unsigned char * D.19325;
  unsigned char D.19326;
  int D.19327;
  const unsigned char * D.19328;
  unsigned char D.19329;
  int D.19330;
  const unsigned char * D.19335;
  unsigned char D.19336;
  int D.19337;
  const unsigned char * D.19338;
  unsigned char D.19339;
  int D.19340;
  short unsigned int D.19343;
  short unsigned int D.19344;
  struct MonoClass * * D.19347;
  unsigned int i.75;
  unsigned int D.19349;
  struct MonoClass * * D.19350;
  struct MonoClass * * D.19351;
  struct MonoClass * * D.19352;
  struct MonoType * D.19353;
  const char * D.19356;
  char D.19358;
  const char * iftmp.76;
  int D.19365;
  _Bool D.19366;
  _Bool D.19367;
  long int D.19368;
  long int D.19369;
  struct MonoClass * D.19374;
  struct MonoMethod * D.19375;
  int i;
  char * qname;
  char * fqname;
  char * class_name;
  gboolean is_interface;
  struct MonoMethod * result;
  void out = <<< error >>>;

  result = 0B;
  D.19239 = in_class->flags;
  D.19240 = D.19239 & 32;
  if (D.19240 != 0) goto <D.19236>; else goto <D.19241>;
  <D.19241>:
  D.19242 = in_class->byval_arg.type;
  if (D.19242 == 19) goto <D.19236>; else goto <D.19243>;
  <D.19243>:
  D.19242 = in_class->byval_arg.type;
  if (D.19242 == 30) goto <D.19236>; else goto <D.19237>;
  <D.19236>:
  iftmp.72 = 1;
  goto <D.19238>;
  <D.19237>:
  iftmp.72 = 0;
  <D.19238>:
  is_interface = iftmp.72;
  if (ic != 0B) goto <D.19244>; else goto <D.19245>;
  <D.19244>:
  D.19246 = &ic->byval_arg;
  class_name = mono_type_get_name_full (D.19246, 0);
  qname = monoeg_g_strconcat (class_name, ".", name, 0B);
  D.19249 = ic->name_space;
  if (D.19249 != 0B) goto <D.19250>; else goto <D.19247>;
  <D.19250>:
  D.19249 = ic->name_space;
  D.19251 = *D.19249;
  if (D.19251 != 0) goto <D.19252>; else goto <D.19247>;
  <D.19252>:
  D.19249 = ic->name_space;
  fqname = monoeg_g_strconcat (D.19249, ".", class_name, ".", name, 0B);
  goto <D.19248>;
  <D.19247>:
  fqname = 0B;
  <D.19248>:
  goto <D.19253>;
  <D.19245>:
  fqname = 0B;
  qname = fqname;
  class_name = qname;
  <D.19253>:
  goto <D.17746>;
  <D.17755>:
  D.19254 = from_class == 0B;
  D.19255 = (long int) D.19254;
  D.19256 = __builtin_expect (D.19255, 0);
  if (D.19256 != 0) goto <D.19257>; else goto <D.19258>;
  <D.19257>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 684, "from_class");
  <D.19258>:
  result = find_method_in_class (in_class, name, qname, fqname, sig, from_class);
  if (result != 0B) goto out; else goto <D.19259>;
  <D.19259>:
  D.19260 = *name;
  if (D.19260 == 46) goto <D.19261>; else goto <D.19262>;
  <D.19261>:
  {
    size_t __s1_len;
    size_t __s2_len;

    __s2_len = 5;
    if (__s2_len <= 3) goto <D.19264>; else goto <D.19265>;
    <D.19264>:
    {
      const unsigned char * __s2;
      int __result;

      __s2 = name;
      D.19266 = ".ctor";
      D.19267 = MEM[(const unsigned char *)D.19266];
      D.19268 = (int) D.19267;
      D.19269 = *__s2;
      D.19270 = (int) D.19269;
      __result = D.19268 - D.19270;
      {
        if (__s2_len != 0) goto <D.19271>; else goto <D.19272>;
        <D.19271>:
        if (__result == 0) goto <D.19273>; else goto <D.19274>;
        <D.19273>:
        D.19275 = &MEM[(void *)".ctor" + 1B];
        D.19276 = *D.19275;
        D.19277 = (int) D.19276;
        D.19278 = __s2 + 1;
        D.19279 = *D.19278;
        D.19280 = (int) D.19279;
        __result = D.19277 - D.19280;
        if (__s2_len > 1) goto <D.19281>; else goto <D.19282>;
        <D.19281>:
        if (__result == 0) goto <D.19283>; else goto <D.19284>;
        <D.19283>:
        D.19285 = &MEM[(void *)".ctor" + 2B];
        D.19286 = *D.19285;
        D.19287 = (int) D.19286;
        D.19288 = __s2 + 2;
        D.19289 = *D.19288;
        D.19290 = (int) D.19289;
        __result = D.19287 - D.19290;
        if (__s2_len > 2) goto <D.19291>; else goto <D.19292>;
        <D.19291>:
        if (__result == 0) goto <D.19293>; else goto <D.19294>;
        <D.19293>:
        D.19295 = &MEM[(void *)".ctor" + 3B];
        D.19296 = *D.19295;
        D.19297 = (int) D.19296;
        D.19298 = __s2 + 3;
        D.19299 = *D.19298;
        D.19300 = (int) D.19299;
        __result = D.19297 - D.19300;
        <D.19294>:
        <D.19292>:
        <D.19284>:
        <D.19282>:
        <D.19274>:
        <D.19272>:
      }
      D.17734 = __result;
    }
    iftmp.73 = -D.17734;
    goto <D.19301>;
    <D.19265>:
    iftmp.73 = __builtin_strcmp (name, ".ctor");
    <D.19301>:
    D.17735 = iftmp.73;
  }
  if (D.17735 == 0) goto <D.17745>; else goto <D.19302>;
  <D.19302>:
  {
    size_t __s1_len;
    size_t __s2_len;

    __s2_len = 6;
    if (__s2_len <= 3) goto <D.19304>; else goto <D.19305>;
    <D.19304>:
    {
      const unsigned char * __s2;
      int __result;

      __s2 = name;
      D.19306 = ".cctor";
      D.19307 = MEM[(const unsigned char *)D.19306];
      D.19308 = (int) D.19307;
      D.19309 = *__s2;
      D.19310 = (int) D.19309;
      __result = D.19308 - D.19310;
      {
        if (__s2_len != 0) goto <D.19311>; else goto <D.19312>;
        <D.19311>:
        if (__result == 0) goto <D.19313>; else goto <D.19314>;
        <D.19313>:
        D.19315 = &MEM[(void *)".cctor" + 1B];
        D.19316 = *D.19315;
        D.19317 = (int) D.19316;
        D.19318 = __s2 + 1;
        D.19319 = *D.19318;
        D.19320 = (int) D.19319;
        __result = D.19317 - D.19320;
        if (__s2_len > 1) goto <D.19321>; else goto <D.19322>;
        <D.19321>:
        if (__result == 0) goto <D.19323>; else goto <D.19324>;
        <D.19323>:
        D.19325 = &MEM[(void *)".cctor" + 2B];
        D.19326 = *D.19325;
        D.19327 = (int) D.19326;
        D.19328 = __s2 + 2;
        D.19329 = *D.19328;
        D.19330 = (int) D.19329;
        __result = D.19327 - D.19330;
        if (__s2_len > 2) goto <D.19331>; else goto <D.19332>;
        <D.19331>:
        if (__result == 0) goto <D.19333>; else goto <D.19334>;
        <D.19333>:
        D.19335 = &MEM[(void *)".cctor" + 3B];
        D.19336 = *D.19335;
        D.19337 = (int) D.19336;
        D.19338 = __s2 + 3;
        D.19339 = *D.19338;
        D.19340 = (int) D.19339;
        __result = D.19337 - D.19340;
        <D.19334>:
        <D.19332>:
        <D.19324>:
        <D.19322>:
        <D.19314>:
        <D.19312>:
      }
      D.17743 = __result;
    }
    iftmp.74 = -D.17743;
    goto <D.19341>;
    <D.19305>:
    iftmp.74 = __builtin_strcmp (name, ".cctor");
    <D.19341>:
    D.17744 = iftmp.74;
  }
  if (D.17744 == 0) goto <D.17745>; else goto <D.19342>;
  <D.19342>:
  <D.19262>:
  D.19343 = from_class->interface_offsets_count;
  D.19344 = in_class->interface_offsets_count;
  if (D.19343 != D.19344) goto <D.19345>; else goto <D.19346>;
  <D.19345>:
  in_class = in_class->parent;
  from_class = from_class->parent;
  // predicted unlikely by continue predictor.
  goto <D.17746>;
  <D.19346>:
  i = 0;
  goto <D.17753>;
  <D.17752>:
  {
    struct MonoClass * in_ic;
    struct MonoClass * from_ic;
    char * ic_qname;
    char * ic_fqname;
    char * ic_class_name;

    D.19347 = in_class->interfaces_packed;
    i.75 = (unsigned int) i;
    D.19349 = i.75 * 4;
    D.19350 = D.19347 + D.19349;
    in_ic = *D.19350;
    D.19351 = from_class->interfaces_packed;
    i.75 = (unsigned int) i;
    D.19349 = i.75 * 4;
    D.19352 = D.19351 + D.19349;
    from_ic = *D.19352;
    D.19353 = &in_ic->byval_arg;
    ic_class_name = mono_type_get_name_full (D.19353, 0);
    ic_qname = monoeg_g_strconcat (ic_class_name, ".", name, 0B);
    D.19356 = in_ic->name_space;
    if (D.19356 != 0B) goto <D.19357>; else goto <D.19354>;
    <D.19357>:
    D.19356 = in_ic->name_space;
    D.19358 = *D.19356;
    if (D.19358 != 0) goto <D.19359>; else goto <D.19354>;
    <D.19359>:
    D.19356 = in_ic->name_space;
    ic_fqname = monoeg_g_strconcat (D.19356, ".", ic_class_name, ".", name, 0B);
    goto <D.19355>;
    <D.19354>:
    ic_fqname = 0B;
    <D.19355>:
    if (ic != 0B) goto <D.19361>; else goto <D.19362>;
    <D.19361>:
    iftmp.76 = name;
    goto <D.19363>;
    <D.19362>:
    iftmp.76 = 0B;
    <D.19363>:
    result = find_method_in_class (in_ic, iftmp.76, ic_qname, ic_fqname, sig, from_ic);
    monoeg_g_free (ic_class_name);
    monoeg_g_free (ic_fqname);
    monoeg_g_free (ic_qname);
    if (result != 0B) goto out; else goto <D.19364>;
    <D.19364>:
  }
  i = i + 1;
  <D.17753>:
  D.19344 = in_class->interface_offsets_count;
  D.19365 = (int) D.19344;
  if (D.19365 > i) goto <D.17752>; else goto <D.17754>;
  <D.17754>:
  in_class = in_class->parent;
  from_class = from_class->parent;
  <D.17746>:
  if (in_class != 0B) goto <D.17755>; else goto <D.17745>;
  <D.17745>:
  D.19366 = in_class == 0B;
  D.19254 = from_class == 0B;
  D.19367 = D.19366 ^ D.19254;
  D.19368 = (long int) D.19367;
  D.19369 = __builtin_expect (D.19368, 0);
  if (D.19369 != 0) goto <D.19370>; else goto <D.19371>;
  <D.19370>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 725, "!in_class == !from_class");
  <D.19371>:
  if (is_interface != 0) goto <D.19372>; else goto <D.19373>;
  <D.19372>:
  D.19374 = mono_defaults.object_class;
  D.19374 = mono_defaults.object_class;
  result = find_method_in_class (D.19374, name, qname, fqname, sig, D.19374);
  <D.19373>:
  out:
  monoeg_g_free (class_name);
  monoeg_g_free (fqname);
  monoeg_g_free (qname);
  D.19375 = result;
  return D.19375;
}


find_method_in_class (struct MonoClass * klass, const char * name, const char * qname, const char * fqname, struct MonoMethodSignature * sig, struct MonoClass * from_class)
{
  unsigned int D.19377;
  struct MonoImage * D.19380;
  unsigned int D.19381;
  unsigned int D.19382;
  struct MonoMethod * * D.19385;
  unsigned char D.19388;
  struct MonoGenericClass * D.19393;
  unsigned int D.19396;
  unsigned int i.77;
  unsigned int D.19398;
  int D.19399;
  unsigned int D.19400;
  int D.17657;
  int D.17666;
  int D.17675;
  unsigned int D.19408;
  unsigned int D.19409;
  unsigned int D.19414;
  unsigned int D.19415;
  int D.19418;
  struct MonoMethod * D.19421;
  unsigned int D.19422;
  unsigned int i.78;
  unsigned int D.19426;
  struct MonoMethod * * D.19427;
  int D.17691;
  const char * D.19435;
  int D.17700;
  int D.17709;
  int D.19442;
  int D.19445;
  int i;

  D.19377 = klass->type_token;
  if (D.19377 != 0) goto <D.19378>; else goto <D.19379>;
  <D.19378>:
  D.19380 = klass->image;
  D.19381 = BIT_FIELD_REF <*D.19380, 32, 128>;
  D.19382 = D.19381 & 8;
  if (D.19382 == 0) goto <D.19383>; else goto <D.19384>;
  <D.19383>:
  D.19385 = klass->methods;
  if (D.19385 == 0B) goto <D.19386>; else goto <D.19387>;
  <D.19386>:
  D.19388 = klass->rank;
  if (D.19388 == 0) goto <D.19389>; else goto <D.19390>;
  <D.19389>:
  if (klass == from_class) goto <D.19391>; else goto <D.19392>;
  <D.19391>:
  D.19393 = from_class->generic_class;
  if (D.19393 == 0B) goto <D.19394>; else goto <D.19395>;
  <D.19394>:
  i = 0;
  goto <D.17678>;
  <D.17677>:
  {
    guint32 cols[6];
    struct MonoMethod * method;
    const char * m_name;
    struct MonoMethodSignature * other_sig;

    try
      {
        D.19380 = klass->image;
        D.19396 = klass->method.first;
        i.77 = (unsigned int) i;
        D.19398 = D.19396 + i.77;
        D.19399 = (int) D.19398;
        mono_metadata_decode_table_row (D.19380, 6, D.19399, &cols, 6);
        D.19380 = klass->image;
        D.19400 = cols[3];
        m_name = mono_metadata_string_heap (D.19380, D.19400);
        if (fqname == 0B) goto <D.19404>; else goto <D.19405>;
        <D.19405>:
        {
          size_t __s1_len;
          size_t __s2_len;

          D.17657 = __builtin_strcmp (m_name, fqname);
        }
        if (D.17657 != 0) goto <D.19404>; else goto <D.19402>;
        <D.19404>:
        if (qname == 0B) goto <D.19403>; else goto <D.19406>;
        <D.19406>:
        {
          size_t __s1_len;
          size_t __s2_len;

          D.17666 = __builtin_strcmp (m_name, qname);
        }
        if (D.17666 != 0) goto <D.19403>; else goto <D.19402>;
        <D.19403>:
        if (name == 0B) goto <D.19401>; else goto <D.19407>;
        <D.19407>:
        {
          size_t __s1_len;
          size_t __s2_len;

          D.17675 = __builtin_strcmp (m_name, name);
        }
        if (D.17675 != 0) goto <D.19401>; else goto <D.19402>;
        <D.19401>:
        // predicted unlikely by continue predictor.
        goto <D.17676>;
        <D.19402>:
        D.19380 = klass->image;
        D.19396 = klass->method.first;
        i.77 = (unsigned int) i;
        D.19398 = D.19396 + i.77;
        D.19408 = D.19398 + 1;
        D.19409 = D.19408 | 100663296;
        method = mono_get_method (D.19380, D.19409, klass);
        if (method != 0B) goto <D.19410>; else goto <D.19411>;
        <D.19410>:
        other_sig = mono_method_signature (method);
        if (other_sig != 0B) goto <D.19412>; else goto <D.19413>;
        <D.19412>:
        D.19414 = BIT_FIELD_REF <*sig, 32, 64>;
        D.19415 = D.19414 & 4128768;
        if (D.19415 != 327680) goto <D.19416>; else goto <D.19417>;
        <D.19416>:
        D.19418 = mono_metadata_signature_equal (sig, other_sig);
        if (D.19418 != 0) goto <D.19419>; else goto <D.19420>;
        <D.19419>:
        D.19421 = method;
        return D.19421;
        <D.19420>:
        <D.19417>:
        <D.19413>:
        <D.19411>:
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.17676>:
  i = i + 1;
  <D.17678>:
  i.77 = (unsigned int) i;
  D.19422 = klass->method.count;
  if (i.77 < D.19422) goto <D.17677>; else goto <D.17679>;
  <D.17679>:
  <D.19395>:
  <D.19392>:
  <D.19390>:
  <D.19387>:
  <D.19384>:
  <D.19379>:
  mono_class_setup_methods (klass);
  D.19385 = klass->methods;
  if (D.19385 == 0B) goto <D.19423>; else goto <D.19424>;
  <D.19423>:
  D.19421 = 0B;
  return D.19421;
  <D.19424>:
  i = 0;
  goto <D.17712>;
  <D.17711>:
  {
    struct MonoMethod * m;
    struct MonoMethodSignature * msig;

    D.19385 = klass->methods;
    i.78 = (unsigned int) i;
    D.19426 = i.78 * 4;
    D.19427 = D.19385 + D.19426;
    m = *D.19427;
    if (m == 0B) goto <D.19428>; else goto <D.19429>;
    <D.19428>:
    // predicted unlikely by continue predictor.
    goto <D.17682>;
    <D.19429>:
    if (fqname == 0B) goto <D.19433>; else goto <D.19434>;
    <D.19434>:
    {
      size_t __s1_len;
      size_t __s2_len;

      D.19435 = m->name;
      D.17691 = __builtin_strcmp (D.19435, fqname);
    }
    if (D.17691 != 0) goto <D.19433>; else goto <D.19431>;
    <D.19433>:
    if (qname == 0B) goto <D.19432>; else goto <D.19436>;
    <D.19436>:
    {
      size_t __s1_len;
      size_t __s2_len;

      D.19435 = m->name;
      D.17700 = __builtin_strcmp (D.19435, qname);
    }
    if (D.17700 != 0) goto <D.19432>; else goto <D.19431>;
    <D.19432>:
    if (name == 0B) goto <D.19430>; else goto <D.19437>;
    <D.19437>:
    {
      size_t __s1_len;
      size_t __s2_len;

      D.19435 = m->name;
      D.17709 = __builtin_strcmp (D.19435, name);
    }
    if (D.17709 != 0) goto <D.19430>; else goto <D.19431>;
    <D.19430>:
    // predicted unlikely by continue predictor.
    goto <D.17682>;
    <D.19431>:
    msig = mono_method_signature (m);
    if (msig == 0B) goto <D.19438>; else goto <D.19439>;
    <D.19438>:
    // predicted unlikely by continue predictor.
    goto <D.17682>;
    <D.19439>:
    D.19414 = BIT_FIELD_REF <*sig, 32, 64>;
    D.19415 = D.19414 & 4128768;
    if (D.19415 == 327680) goto <D.19440>; else goto <D.19441>;
    <D.19440>:
    D.19442 = mono_metadata_signature_vararg_match (sig, msig);
    if (D.19442 != 0) goto <D.17710>; else goto <D.19443>;
    <D.19443>:
    goto <D.19444>;
    <D.19441>:
    D.19445 = mono_metadata_signature_equal (sig, msig);
    if (D.19445 != 0) goto <D.17710>; else goto <D.19446>;
    <D.19446>:
    <D.19444>:
  }
  <D.17682>:
  i = i + 1;
  <D.17712>:
  i.77 = (unsigned int) i;
  D.19422 = klass->method.count;
  if (i.77 < D.19422) goto <D.17711>; else goto <D.17710>;
  <D.17710>:
  i.77 = (unsigned int) i;
  D.19422 = klass->method.count;
  if (i.77 < D.19422) goto <D.19447>; else goto <D.19448>;
  <D.19447>:
  D.19421 = mono_class_get_method_by_index (from_class, i);
  return D.19421;
  <D.19448>:
  D.19421 = 0B;
  return D.19421;
}


mono_metadata_signature_vararg_match (struct MonoMethodSignature * sig1, struct MonoMethodSignature * sig2)
{
  unsigned int D.19455;
  unsigned int D.19456;
  unsigned int D.19457;
  unsigned int D.19458;
  short int D.19460;
  short int D.19461;
  gboolean D.19462;
  int D.19463;
  int D.19466;
  struct MonoType * D.19467;
  struct MonoType * D.19468;
  int D.19469;
  int i;

  D.19455 = BIT_FIELD_REF <*sig1, 32, 64>;
  D.19456 = BIT_FIELD_REF <*sig2, 32, 64>;
  D.19457 = D.19455 ^ D.19456;
  D.19458 = D.19457 & 4194304;
  if (D.19458 != 0) goto <D.19453>; else goto <D.19459>;
  <D.19459>:
  D.19460 = sig1->sentinelpos;
  D.19461 = sig2->sentinelpos;
  if (D.19460 != D.19461) goto <D.19453>; else goto <D.19454>;
  <D.19453>:
  D.19462 = 0;
  return D.19462;
  <D.19454>:
  i = 0;
  goto <D.17634>;
  <D.17633>:
  {
    struct MonoType * p1;
    struct MonoType * p2;

    p1 = sig1->params[i];
    p2 = sig2->params[i];
    D.19463 = mono_metadata_type_equal (p1, p2);
    if (D.19463 == 0) goto <D.19464>; else goto <D.19465>;
    <D.19464>:
    D.19462 = 0;
    return D.19462;
    <D.19465>:
  }
  i = i + 1;
  <D.17634>:
  D.19460 = sig1->sentinelpos;
  D.19466 = (int) D.19460;
  if (D.19466 > i) goto <D.17633>; else goto <D.17635>;
  <D.17635>:
  D.19467 = sig1->ret;
  D.19468 = sig2->ret;
  D.19469 = mono_metadata_type_equal (D.19467, D.19468);
  if (D.19469 == 0) goto <D.19470>; else goto <D.19471>;
  <D.19470>:
  D.19462 = 0;
  return D.19462;
  <D.19471>:
  D.19462 = 1;
  return D.19462;
}


mono_get_method_constrained_with_method (struct MonoImage * image, struct MonoMethod * method, struct MonoClass * constrained_class, struct MonoGenericContext * context)
{
  _Bool D.19473;
  long int D.19474;
  long int D.19475;
  struct MonoMethod * D.19478;
  struct MonoMethod * result;

  D.19473 = method == 0B;
  D.19474 = (long int) D.19473;
  D.19475 = __builtin_expect (D.19474, 0);
  if (D.19475 != 0) goto <D.19476>; else goto <D.19477>;
  <D.19476>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1932, "method");
  <D.19477>:
  mono_loader_lock ();
  result = get_method_constrained (image, method, constrained_class, context);
  mono_loader_unlock ();
  D.19478 = result;
  return D.19478;
}


get_method_constrained (struct MonoImage * image, struct MonoMethod * method, struct MonoClass * constrained_class, struct MonoGenericContext * context)
{
  struct MonoMethod * D.19482;
  unsigned int D.19483;
  unsigned int D.19484;
  short unsigned int D.19487;
  struct MonoMethod * D.19490;
  struct MonoGenericInst * D.19491;
  struct MonoClass * D.19494;
  struct MonoImage * D.19495;
  int D.19496;
  unsigned int D.19503;
  unsigned int D.19504;
  unsigned char D.19506;
  const char * D.19508;
  const char * D.19513;
  const char * D.19514;
  char * D.19515;
  struct MonoMethod * result;
  struct MonoClass * ic;
  struct MonoGenericContext * method_context;
  struct MonoMethodSignature * sig;
  struct MonoMethodSignature * original_sig;

  ic = 0B;
  method_context = 0B;
  mono_class_init (constrained_class);
  sig = mono_method_signature (method);
  original_sig = sig;
  if (sig == 0B) goto <D.19480>; else goto <D.19481>;
  <D.19480>:
  D.19482 = 0B;
  return D.19482;
  <D.19481>:
  D.19483 = BIT_FIELD_REF <*method, 32, 160>;
  D.19484 = D.19483 & 4096;
  if (D.19484 != 0) goto <D.19485>; else goto <D.19486>;
  <D.19485>:
  D.19487 = sig->generic_param_count;
  if (D.19487 != 0) goto <D.19488>; else goto <D.19489>;
  <D.19488>:
  {
    struct MonoMethodInflated * imethod;

    imethod = method;
    D.19490 = imethod->declaring;
    sig = mono_method_signature (D.19490);
    method_context = mono_method_get_context (method);
    original_sig = sig;
    D.19491 = method_context->class_inst;
    if (D.19491 != 0B) goto <D.19492>; else goto <D.19493>;
    <D.19492>:
    {
      struct MonoError error;
      struct MonoGenericContext ctx;

      try
        {
          ctx.method_inst = 0B;
          D.19491 = method_context->class_inst;
          ctx.class_inst = D.19491;
          D.19494 = method->klass;
          D.19495 = D.19494->image;
          sig = inflate_generic_signature_checked (D.19495, sig, &ctx, &error);
          D.19496 = mono_error_ok (&error);
          if (D.19496 == 0) goto <D.19497>; else goto <D.19498>;
          <D.19497>:
          mono_error_cleanup (&error);
          D.19482 = 0B;
          return D.19482;
          <D.19498>:
        }
      finally
        {
          error = {CLOBBER};
          ctx = {CLOBBER};
        }
    }
    <D.19493>:
  }
  <D.19489>:
  <D.19486>:
  D.19494 = method->klass;
  if (D.19494 != constrained_class) goto <D.19501>; else goto <D.19502>;
  <D.19501>:
  D.19494 = method->klass;
  D.19503 = D.19494->flags;
  D.19504 = D.19503 & 32;
  if (D.19504 != 0) goto <D.19499>; else goto <D.19505>;
  <D.19505>:
  D.19494 = method->klass;
  D.19506 = D.19494->byval_arg.type;
  if (D.19506 == 19) goto <D.19499>; else goto <D.19507>;
  <D.19507>:
  D.19494 = method->klass;
  D.19506 = D.19494->byval_arg.type;
  if (D.19506 == 30) goto <D.19499>; else goto <D.19500>;
  <D.19499>:
  ic = method->klass;
  <D.19500>:
  <D.19502>:
  D.19508 = method->name;
  result = find_method (constrained_class, ic, D.19508, sig, constrained_class);
  if (sig != original_sig) goto <D.19509>; else goto <D.19510>;
  <D.19509>:
  mono_metadata_free_inflated_signature (sig);
  <D.19510>:
  if (result == 0B) goto <D.19511>; else goto <D.19512>;
  <D.19511>:
  {
    char * m;

    m = mono_method_full_name (method, 1);
    D.19494 = method->klass;
    D.19513 = D.19494->name_space;
    D.19494 = method->klass;
    D.19514 = D.19494->name;
    D.19508 = method->name;
    D.19515 = image->name;
    monoeg_g_log (0B, 16, "Missing method %s.%s.%s in assembly %s method %s", D.19513, D.19514, D.19508, D.19515, m);
    monoeg_g_free (m);
    D.19482 = 0B;
    return D.19482;
  }
  <D.19512>:
  if (method_context != 0B) goto <D.19516>; else goto <D.19517>;
  <D.19516>:
  result = mono_class_inflate_generic_method (result, method_context);
  <D.19517>:
  D.19482 = result;
  return D.19482;
}


mono_get_method_constrained (struct MonoImage * image, guint32 token, struct MonoClass * constrained_class, struct MonoGenericContext * context, struct MonoMethod * * cil_method)
{
  struct MonoMethod * D.19521;
  struct MonoMethod * D.19522;
  struct MonoMethod * D.19525;
  struct MonoMethod * result;

  mono_loader_lock ();
  D.19521 = mono_get_method_from_token (image, token, 0B, context, 0B);
  *cil_method = D.19521;
  D.19522 = *cil_method;
  if (D.19522 == 0B) goto <D.19523>; else goto <D.19524>;
  <D.19523>:
  mono_loader_unlock ();
  D.19525 = 0B;
  return D.19525;
  <D.19524>:
  D.19522 = *cil_method;
  result = get_method_constrained (image, D.19522, constrained_class, context);
  mono_loader_unlock ();
  D.19525 = result;
  return D.19525;
}


mono_free_method (struct MonoMethod * method)
{
  <unnamed type> D.19527;
  unsigned int D.19528;
  <unnamed type> D.19531;
  struct MonoMethodSignature * D.19534;
  unsigned int D.19537;
  unsigned int D.19538;
  struct MonoClass * D.19541;
  struct MonoImage * D.19542;
  const char * D.19543;
  struct MonoMethodHeader * D.19544;
  const unsigned char * D.19547;
  struct MonoType * D.19548;
  short unsigned int D.19549;
  int D.19550;
  struct MonoExceptionClause * D.19551;
  void * D.19552;

  D.19527 = mono_profiler_get_events ();
  D.19528 = D.19527 & 65536;
  if (D.19528 != 0) goto <D.19529>; else goto <D.19530>;
  <D.19529>:
  mono_profiler_method_free (method);
  <D.19530>:
  D.19531 = mono_profiler_get_events ();
  if (D.19531 != 0) goto <D.19532>; else goto <D.19533>;
  <D.19532>:
  return;
  <D.19533>:
  D.19534 = method->signature;
  if (D.19534 != 0B) goto <D.19535>; else goto <D.19536>;
  <D.19535>:
  <D.19536>:
  D.19537 = BIT_FIELD_REF <*method, 32, 160>;
  D.19538 = D.19537 & 512;
  if (D.19538 != 0) goto <D.19539>; else goto <D.19540>;
  <D.19539>:
  {
    struct MonoMethodWrapper * mw;
    int i;

    mw = method;
    mono_marshal_free_dynamic_wrappers (method);
    D.19541 = method->klass;
    D.19542 = D.19541->image;
    mono_image_property_remove (D.19542, method);
    D.19543 = method->name;
    monoeg_g_free (D.19543);
    D.19544 = mw->header;
    if (D.19544 != 0B) goto <D.19545>; else goto <D.19546>;
    <D.19545>:
    D.19544 = mw->header;
    D.19547 = D.19544->code;
    monoeg_g_free (D.19547);
    i = 0;
    goto <D.18115>;
    <D.18114>:
    D.19544 = mw->header;
    D.19548 = D.19544->locals[i];
    monoeg_g_free (D.19548);
    i = i + 1;
    <D.18115>:
    D.19544 = mw->header;
    D.19549 = D.19544->num_locals;
    D.19550 = (int) D.19549;
    if (D.19550 > i) goto <D.18114>; else goto <D.18116>;
    <D.18116>:
    D.19544 = mw->header;
    D.19551 = D.19544->clauses;
    monoeg_g_free (D.19551);
    D.19544 = mw->header;
    monoeg_g_free (D.19544);
    <D.19546>:
    D.19552 = mw->method_data;
    monoeg_g_free (D.19552);
    D.19534 = method->signature;
    monoeg_g_free (D.19534);
    monoeg_g_free (method);
  }
  <D.19540>:
}


mono_method_get_param_names (struct MonoMethod * method, const char * * names)
{
  unsigned int D.19554;
  unsigned int D.19555;
  short unsigned int D.19560;
  unsigned int i.79;
  unsigned int D.19564;
  const char * * D.19565;
  int D.19566;
  unsigned char D.19567;
  struct MonoImage * D.19570;
  unsigned int D.19571;
  unsigned int D.19572;
  struct MonoClass * D.19575;
  struct MonoImage * D.19576;
  struct GHashTable * D.19577;
  char * * D.19580;
  sizetype i.80;
  sizetype D.19584;
  sizetype D.19585;
  char * * D.19586;
  char * D.19587;
  struct MonoMethodSignature * D.19590;
  short unsigned int D.19591;
  int D.19592;
  unsigned int D.19593;
  struct GHashTable * D.19596;
  char * * D.19601;
  char * D.19602;
  unsigned int D.19605;
  int D.19606;
  <unnamed-unsigned:24> D.19607;
  unsigned int D.19608;
  int idx.81;
  unsigned int D.19612;
  <unnamed-unsigned:24> D.19614;
  int D.19615;
  int D.19616;
  unsigned int D.19617;
  unsigned int D.19620;
  sizetype D.19623;
  sizetype D.19624;
  const char * * D.19625;
  unsigned int D.19626;
  const char * D.19627;
  int i;
  int lastp;
  struct MonoClass * klass;
  struct MonoTableInfo * methodt;
  struct MonoTableInfo * paramt;
  struct MonoMethodSignature * signature;
  guint32 idx;

  D.19554 = BIT_FIELD_REF <*method, 32, 160>;
  D.19555 = D.19554 & 4096;
  if (D.19555 != 0) goto <D.19556>; else goto <D.19557>;
  <D.19556>:
  method = MEM[(struct MonoMethodInflated *)method].declaring;
  <D.19557>:
  signature = mono_method_signature (method);
  if (signature == 0B) goto <D.19558>; else goto <D.19559>;
  <D.19558>:
  return;
  <D.19559>:
  D.19560 = signature->param_count;
  if (D.19560 == 0) goto <D.19561>; else goto <D.19562>;
  <D.19561>:
  return;
  <D.19562>:
  i = 0;
  goto <D.18129>;
  <D.18128>:
  i.79 = (unsigned int) i;
  D.19564 = i.79 * 4;
  D.19565 = names + D.19564;
  *D.19565 = "";
  i = i + 1;
  <D.18129>:
  D.19560 = signature->param_count;
  D.19566 = (int) D.19560;
  if (D.19566 > i) goto <D.18128>; else goto <D.18130>;
  <D.18130>:
  klass = method->klass;
  D.19567 = klass->rank;
  if (D.19567 != 0) goto <D.19568>; else goto <D.19569>;
  <D.19568>:
  return;
  <D.19569>:
  mono_class_init (klass);
  D.19570 = klass->image;
  D.19571 = BIT_FIELD_REF <*D.19570, 32, 128>;
  D.19572 = D.19571 & 8;
  if (D.19572 != 0) goto <D.19573>; else goto <D.19574>;
  <D.19573>:
  {
    struct MonoReflectionMethodAux * method_aux;

    D.19575 = method->klass;
    D.19576 = D.19575->image;
    D.19577 = MEM[(struct MonoDynamicImage *)D.19576].method_aux_hash;
    method_aux = monoeg_g_hash_table_lookup (D.19577, method);
    if (method_aux != 0B) goto <D.19578>; else goto <D.19579>;
    <D.19578>:
    D.19580 = method_aux->param_names;
    if (D.19580 != 0B) goto <D.19581>; else goto <D.19582>;
    <D.19581>:
    i = 0;
    goto <D.18133>;
    <D.18132>:
    D.19580 = method_aux->param_names;
    i.80 = (sizetype) i;
    D.19584 = i.80 + 1;
    D.19585 = D.19584 * 4;
    D.19586 = D.19580 + D.19585;
    D.19587 = *D.19586;
    if (D.19587 != 0B) goto <D.19588>; else goto <D.19589>;
    <D.19588>:
    i.79 = (unsigned int) i;
    D.19564 = i.79 * 4;
    D.19565 = names + D.19564;
    D.19580 = method_aux->param_names;
    i.80 = (sizetype) i;
    D.19584 = i.80 + 1;
    D.19585 = D.19584 * 4;
    D.19586 = D.19580 + D.19585;
    D.19587 = *D.19586;
    *D.19565 = D.19587;
    <D.19589>:
    i = i + 1;
    <D.18133>:
    D.19590 = mono_method_signature (method);
    D.19591 = D.19590->param_count;
    D.19592 = (int) D.19591;
    if (D.19592 > i) goto <D.18132>; else goto <D.18134>;
    <D.18134>:
    <D.19582>:
    <D.19579>:
    return;
  }
  <D.19574>:
  D.19554 = BIT_FIELD_REF <*method, 32, 160>;
  D.19593 = D.19554 & 124;
  if (D.19593 != 0) goto <D.19594>; else goto <D.19595>;
  <D.19594>:
  {
    char * * pnames;

    pnames = 0B;
    D.19570 = klass->image;
    mono_image_lock (D.19570);
    D.19570 = klass->image;
    D.19596 = D.19570->wrapper_param_names;
    if (D.19596 != 0B) goto <D.19597>; else goto <D.19598>;
    <D.19597>:
    D.19570 = klass->image;
    D.19596 = D.19570->wrapper_param_names;
    pnames = monoeg_g_hash_table_lookup (D.19596, method);
    <D.19598>:
    D.19570 = klass->image;
    mono_image_unlock (D.19570);
    if (pnames != 0B) goto <D.19599>; else goto <D.19600>;
    <D.19599>:
    i = 0;
    goto <D.18137>;
    <D.18136>:
    i.79 = (unsigned int) i;
    D.19564 = i.79 * 4;
    D.19565 = names + D.19564;
    i.79 = (unsigned int) i;
    D.19564 = i.79 * 4;
    D.19601 = pnames + D.19564;
    D.19602 = *D.19601;
    *D.19565 = D.19602;
    i = i + 1;
    <D.18137>:
    D.19560 = signature->param_count;
    D.19566 = (int) D.19560;
    if (D.19566 > i) goto <D.18136>; else goto <D.18138>;
    <D.18138>:
    <D.19600>:
    return;
  }
  <D.19595>:
  D.19570 = klass->image;
  methodt = &D.19570->tables[6];
  D.19570 = klass->image;
  paramt = &D.19570->tables[8];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.19603>; else goto <D.19604>;
  <D.19603>:
  {
    guint32 cols[3];
    guint param_index;

    try
      {
        D.19605 = idx + 4294967295;
        D.19606 = (int) D.19605;
        param_index = mono_metadata_decode_row_col (methodt, D.19606, 5);
        D.19607 = methodt->rows;
        D.19608 = (unsigned int) D.19607;
        if (D.19608 > idx) goto <D.19609>; else goto <D.19610>;
        <D.19609>:
        idx.81 = (int) idx;
        D.19612 = mono_metadata_decode_row_col (methodt, idx.81, 5);
        lastp = (int) D.19612;
        goto <D.19613>;
        <D.19610>:
        D.19614 = paramt->rows;
        D.19615 = (int) D.19614;
        lastp = D.19615 + 1;
        <D.19613>:
        i = (int) param_index;
        goto <D.18142>;
        <D.18141>:
        D.19616 = i + -1;
        mono_metadata_decode_row (paramt, D.19616, &cols, 3);
        D.19617 = cols[1];
        if (D.19617 != 0) goto <D.19618>; else goto <D.19619>;
        <D.19618>:
        D.19617 = cols[1];
        D.19560 = signature->param_count;
        D.19620 = (unsigned int) D.19560;
        if (D.19617 <= D.19620) goto <D.19621>; else goto <D.19622>;
        <D.19621>:
        D.19617 = cols[1];
        D.19623 = D.19617 + 1073741823;
        D.19624 = D.19623 * 4;
        D.19625 = names + D.19624;
        D.19570 = klass->image;
        D.19626 = cols[2];
        D.19627 = mono_metadata_string_heap (D.19570, D.19626);
        *D.19625 = D.19627;
        <D.19622>:
        <D.19619>:
        i = i + 1;
        <D.18142>:
        if (i < lastp) goto <D.18141>; else goto <D.18143>;
        <D.18143>:
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.19604>:
}


mono_method_get_param_token (struct MonoMethod * method, int index)
{
  struct MonoImage * D.19629;
  unsigned int D.19630;
  unsigned int D.19631;
  unsigned int D.19636;
  int D.19637;
  uint32_t D.19640;
  unsigned int index.82;
  unsigned int D.19642;
  struct MonoClass * klass;
  struct MonoTableInfo * methodt;
  guint32 idx;

  klass = method->klass;
  mono_class_init (klass);
  D.19629 = klass->image;
  D.19630 = BIT_FIELD_REF <*D.19629, 32, 128>;
  D.19631 = D.19630 & 8;
  if (D.19631 != 0) goto <D.19632>; else goto <D.19633>;
  <D.19632>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "loader.c", 2100);
  <D.19633>:
  D.19629 = klass->image;
  methodt = &D.19629->tables[6];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.19634>; else goto <D.19635>;
  <D.19634>:
  {
    guint param_index;

    D.19636 = idx + 4294967295;
    D.19637 = (int) D.19636;
    param_index = mono_metadata_decode_row_col (methodt, D.19637, 5);
    if (index == -1) goto <D.19638>; else goto <D.19639>;
    <D.19638>:
    D.19640 = 134217728;
    return D.19640;
    <D.19639>:
    index.82 = (unsigned int) index;
    D.19642 = param_index + index.82;
    D.19640 = D.19642 | 134217728;
    return D.19640;
  }
  <D.19635>:
  D.19640 = 0;
  return D.19640;
}


mono_method_get_marshal_info (struct MonoMethod * method, struct MonoMarshalSpec * * mspecs)
{
  _Bool D.19644;
  long int D.19645;
  long int D.19646;
  unsigned int i.83;
  unsigned int D.19650;
  struct MonoMarshalSpec * * D.19651;
  short unsigned int D.19652;
  int D.19653;
  struct MonoClass * D.19654;
  struct MonoImage * D.19655;
  unsigned int D.19656;
  unsigned int D.19657;
  struct GHashTable * D.19660;
  struct MonoMarshalSpec * * D.19663;
  struct MonoMarshalSpec * * D.19666;
  struct MonoMarshalSpec * D.19667;
  void * D.19670;
  struct MonoMarshalSpec * D.19671;
  char * D.19672;
  gchar * D.19673;
  char * D.19674;
  gchar * D.19675;
  struct MonoImage * D.19676;
  unsigned int D.19679;
  int D.19680;
  <unnamed-unsigned:24> D.19681;
  unsigned int D.19682;
  int idx.84;
  unsigned int D.19686;
  <unnamed-unsigned:24> D.19688;
  int D.19689;
  int D.19690;
  unsigned int D.19691;
  unsigned int D.19692;
  unsigned int D.19695;
  unsigned int D.19696;
  unsigned int D.19699;
  _Bool D.19700;
  long int D.19701;
  long int D.19702;
  unsigned int D.19705;
  struct MonoMarshalSpec * * D.19706;
  struct MonoMarshalSpec * D.19707;
  int i;
  int lastp;
  struct MonoClass * klass;
  struct MonoTableInfo * methodt;
  struct MonoTableInfo * paramt;
  struct MonoMethodSignature * signature;
  guint32 idx;

  klass = method->klass;
  signature = mono_method_signature (method);
  D.19644 = signature == 0B;
  D.19645 = (long int) D.19644;
  D.19646 = __builtin_expect (D.19645, 0);
  if (D.19646 != 0) goto <D.19647>; else goto <D.19648>;
  <D.19647>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2129, "signature");
  <D.19648>:
  i = 0;
  goto <D.18164>;
  <D.18163>:
  i.83 = (unsigned int) i;
  D.19650 = i.83 * 4;
  D.19651 = mspecs + D.19650;
  *D.19651 = 0B;
  i = i + 1;
  <D.18164>:
  D.19652 = signature->param_count;
  D.19653 = (int) D.19652;
  if (D.19653 >= i) goto <D.18163>; else goto <D.18165>;
  <D.18165>:
  D.19654 = method->klass;
  D.19655 = D.19654->image;
  D.19656 = BIT_FIELD_REF <*D.19655, 32, 128>;
  D.19657 = D.19656 & 8;
  if (D.19657 != 0) goto <D.19658>; else goto <D.19659>;
  <D.19658>:
  {
    struct MonoReflectionMethodAux * method_aux;

    D.19654 = method->klass;
    D.19655 = D.19654->image;
    D.19660 = MEM[(struct MonoDynamicImage *)D.19655].method_aux_hash;
    method_aux = monoeg_g_hash_table_lookup (D.19660, method);
    if (method_aux != 0B) goto <D.19661>; else goto <D.19662>;
    <D.19661>:
    D.19663 = method_aux->param_marshall;
    if (D.19663 != 0B) goto <D.19664>; else goto <D.19665>;
    <D.19664>:
    {
      struct MonoMarshalSpec * * dyn_specs;

      dyn_specs = method_aux->param_marshall;
      i = 0;
      goto <D.18169>;
      <D.18168>:
      i.83 = (unsigned int) i;
      D.19650 = i.83 * 4;
      D.19666 = dyn_specs + D.19650;
      D.19667 = *D.19666;
      if (D.19667 != 0B) goto <D.19668>; else goto <D.19669>;
      <D.19668>:
      i.83 = (unsigned int) i;
      D.19650 = i.83 * 4;
      D.19651 = mspecs + D.19650;
      D.19670 = monoeg_malloc0 (16);
      *D.19651 = D.19670;
      i.83 = (unsigned int) i;
      D.19650 = i.83 * 4;
      D.19651 = mspecs + D.19650;
      D.19671 = *D.19651;
      i.83 = (unsigned int) i;
      D.19650 = i.83 * 4;
      D.19666 = dyn_specs + D.19650;
      D.19667 = *D.19666;
      memcpy (D.19671, D.19667, 16);
      i.83 = (unsigned int) i;
      D.19650 = i.83 * 4;
      D.19651 = mspecs + D.19650;
      D.19671 = *D.19651;
      i.83 = (unsigned int) i;
      D.19650 = i.83 * 4;
      D.19666 = dyn_specs + D.19650;
      D.19667 = *D.19666;
      D.19672 = D.19667->data.custom_data.custom_name;
      D.19673 = monoeg_strdup (D.19672);
      D.19671->data.custom_data.custom_name = D.19673;
      i.83 = (unsigned int) i;
      D.19650 = i.83 * 4;
      D.19651 = mspecs + D.19650;
      D.19671 = *D.19651;
      i.83 = (unsigned int) i;
      D.19650 = i.83 * 4;
      D.19666 = dyn_specs + D.19650;
      D.19667 = *D.19666;
      D.19674 = D.19667->data.custom_data.cookie;
      D.19675 = monoeg_strdup (D.19674);
      D.19671->data.custom_data.cookie = D.19675;
      <D.19669>:
      i = i + 1;
      <D.18169>:
      D.19652 = signature->param_count;
      D.19653 = (int) D.19652;
      if (D.19653 >= i) goto <D.18168>; else goto <D.18170>;
      <D.18170>:
    }
    <D.19665>:
    <D.19662>:
    return;
  }
  <D.19659>:
  mono_class_init (klass);
  D.19676 = klass->image;
  methodt = &D.19676->tables[6];
  D.19676 = klass->image;
  paramt = &D.19676->tables[8];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.19677>; else goto <D.19678>;
  <D.19677>:
  {
    guint32 cols[3];
    guint param_index;

    try
      {
        D.19679 = idx + 4294967295;
        D.19680 = (int) D.19679;
        param_index = mono_metadata_decode_row_col (methodt, D.19680, 5);
        D.19681 = methodt->rows;
        D.19682 = (unsigned int) D.19681;
        if (D.19682 > idx) goto <D.19683>; else goto <D.19684>;
        <D.19683>:
        idx.84 = (int) idx;
        D.19686 = mono_metadata_decode_row_col (methodt, idx.84, 5);
        lastp = (int) D.19686;
        goto <D.19687>;
        <D.19684>:
        D.19688 = paramt->rows;
        D.19689 = (int) D.19688;
        lastp = D.19689 + 1;
        <D.19687>:
        i = (int) param_index;
        goto <D.18175>;
        <D.18174>:
        D.19690 = i + -1;
        mono_metadata_decode_row (paramt, D.19690, &cols, 3);
        D.19691 = cols[0];
        D.19692 = D.19691 & 8192;
        if (D.19692 != 0) goto <D.19693>; else goto <D.19694>;
        <D.19693>:
        D.19695 = cols[1];
        D.19652 = signature->param_count;
        D.19696 = (unsigned int) D.19652;
        if (D.19695 <= D.19696) goto <D.19697>; else goto <D.19698>;
        <D.19697>:
        {
          const char * tp;

          D.19676 = klass->image;
          D.19690 = i + -1;
          D.19699 = (unsigned int) D.19690;
          tp = mono_metadata_get_marshal_info (D.19676, D.19699, 0);
          D.19700 = tp == 0B;
          D.19701 = (long int) D.19700;
          D.19702 = __builtin_expect (D.19701, 0);
          if (D.19702 != 0) goto <D.19703>; else goto <D.19704>;
          <D.19703>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2171, "tp");
          <D.19704>:
          D.19695 = cols[1];
          D.19705 = D.19695 * 4;
          D.19706 = mspecs + D.19705;
          D.19676 = klass->image;
          D.19707 = mono_metadata_parse_marshal_spec (D.19676, tp);
          *D.19706 = D.19707;
        }
        <D.19698>:
        <D.19694>:
        i = i + 1;
        <D.18175>:
        if (i < lastp) goto <D.18174>; else goto <D.18176>;
        <D.18176>:
        return;
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.19678>:
}


memcpy (void * restrict __dest, const void * restrict __src, size_t __len)
{
  void * D.19710;
  unsigned int D.19711;

  D.19711 = __builtin_object_size (__dest, 0);
  D.19710 = __builtin___memcpy_chk (__dest, __src, __len, D.19711);
  return D.19710;
}


mono_method_has_marshal_info (struct MonoMethod * method)
{
  struct MonoClass * D.19713;
  struct MonoImage * D.19714;
  unsigned int D.19715;
  unsigned int D.19716;
  struct GHashTable * D.19719;
  unsigned int i.85;
  unsigned int D.19723;
  struct MonoMarshalSpec * * D.19724;
  struct MonoMarshalSpec * D.19725;
  mono_bool D.19728;
  struct MonoMethodSignature * D.19729;
  short unsigned int D.19730;
  int D.19731;
  struct MonoImage * D.19732;
  unsigned int D.19735;
  int D.19736;
  unsigned int D.19737;
  <unnamed-unsigned:24> D.19738;
  unsigned int D.19739;
  int idx.86;
  unsigned int D.19743;
  <unnamed-unsigned:24> D.19745;
  int D.19746;
  int D.19747;
  unsigned int D.19748;
  unsigned int D.19749;
  int i;
  int lastp;
  struct MonoClass * klass;
  struct MonoTableInfo * methodt;
  struct MonoTableInfo * paramt;
  guint32 idx;

  klass = method->klass;
  D.19713 = method->klass;
  D.19714 = D.19713->image;
  D.19715 = BIT_FIELD_REF <*D.19714, 32, 128>;
  D.19716 = D.19715 & 8;
  if (D.19716 != 0) goto <D.19717>; else goto <D.19718>;
  <D.19717>:
  {
    struct MonoReflectionMethodAux * method_aux;
    struct MonoMarshalSpec * * dyn_specs;

    D.19713 = method->klass;
    D.19714 = D.19713->image;
    D.19719 = MEM[(struct MonoDynamicImage *)D.19714].method_aux_hash;
    method_aux = monoeg_g_hash_table_lookup (D.19719, method);
    dyn_specs = method_aux->param_marshall;
    if (dyn_specs != 0B) goto <D.19720>; else goto <D.19721>;
    <D.19720>:
    i = 0;
    goto <D.18189>;
    <D.18188>:
    i.85 = (unsigned int) i;
    D.19723 = i.85 * 4;
    D.19724 = dyn_specs + D.19723;
    D.19725 = *D.19724;
    if (D.19725 != 0B) goto <D.19726>; else goto <D.19727>;
    <D.19726>:
    D.19728 = 1;
    return D.19728;
    <D.19727>:
    i = i + 1;
    <D.18189>:
    D.19729 = mono_method_signature (method);
    D.19730 = D.19729->param_count;
    D.19731 = (int) D.19730;
    if (D.19731 >= i) goto <D.18188>; else goto <D.18190>;
    <D.18190>:
    <D.19721>:
    D.19728 = 0;
    return D.19728;
  }
  <D.19718>:
  mono_class_init (klass);
  D.19732 = klass->image;
  methodt = &D.19732->tables[6];
  D.19732 = klass->image;
  paramt = &D.19732->tables[8];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.19733>; else goto <D.19734>;
  <D.19733>:
  {
    guint32 cols[3];
    guint param_index;

    try
      {
        D.19735 = idx + 4294967295;
        D.19736 = (int) D.19735;
        param_index = mono_metadata_decode_row_col (methodt, D.19736, 5);
        D.19737 = idx + 1;
        D.19738 = methodt->rows;
        D.19739 = (unsigned int) D.19738;
        if (D.19737 < D.19739) goto <D.19740>; else goto <D.19741>;
        <D.19740>:
        idx.86 = (int) idx;
        D.19743 = mono_metadata_decode_row_col (methodt, idx.86, 5);
        lastp = (int) D.19743;
        goto <D.19744>;
        <D.19741>:
        D.19745 = paramt->rows;
        D.19746 = (int) D.19745;
        lastp = D.19746 + 1;
        <D.19744>:
        i = (int) param_index;
        goto <D.18194>;
        <D.18193>:
        D.19747 = i + -1;
        mono_metadata_decode_row (paramt, D.19747, &cols, 3);
        D.19748 = cols[0];
        D.19749 = D.19748 & 8192;
        if (D.19749 != 0) goto <D.19750>; else goto <D.19751>;
        <D.19750>:
        D.19728 = 1;
        return D.19728;
        <D.19751>:
        i = i + 1;
        <D.18194>:
        if (i < lastp) goto <D.18193>; else goto <D.18195>;
        <D.18195>:
        D.19728 = 0;
        return D.19728;
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.19734>:
  D.19728 = 0;
  return D.19728;
}


mono_method_get_wrapper_data (struct MonoMethod * method, guint32 id)
{
  _Bool D.19754;
  long int D.19755;
  long int D.19756;
  unsigned int D.19759;
  unsigned int D.19760;
  _Bool D.19761;
  long int D.19762;
  long int D.19763;
  unsigned int D.19766;
  _Bool D.19769;
  long int D.19770;
  long int D.19771;
  void * D.19774;
  unsigned int D.19775;
  _Bool D.19776;
  long int D.19777;
  long int D.19778;
  void * D.19781;
  unsigned int D.19782;
  void * * D.19783;
  void * * data;

  D.19754 = method == 0B;
  D.19755 = (long int) D.19754;
  D.19756 = __builtin_expect (D.19755, 0);
  if (D.19756 != 0) goto <D.19757>; else goto <D.19758>;
  <D.19757>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2231, "method != NULL");
  <D.19758>:
  D.19759 = BIT_FIELD_REF <*method, 32, 160>;
  D.19760 = D.19759 & 124;
  D.19761 = D.19760 == 0;
  D.19762 = (long int) D.19761;
  D.19763 = __builtin_expect (D.19762, 0);
  if (D.19763 != 0) goto <D.19764>; else goto <D.19765>;
  <D.19764>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2232, "method->wrapper_type != MONO_WRAPPER_NONE");
  <D.19765>:
  D.19759 = BIT_FIELD_REF <*method, 32, 160>;
  D.19766 = D.19759 & 4096;
  if (D.19766 != 0) goto <D.19767>; else goto <D.19768>;
  <D.19767>:
  method = MEM[(struct MonoMethodInflated *)method].declaring;
  <D.19768>:
  data = MEM[(struct MonoMethodWrapper *)method].method_data;
  D.19769 = data == 0B;
  D.19770 = (long int) D.19769;
  D.19771 = __builtin_expect (D.19770, 0);
  if (D.19771 != 0) goto <D.19772>; else goto <D.19773>;
  <D.19772>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2237, "data != NULL");
  <D.19773>:
  D.19774 = *data;
  D.19775 = (unsigned int) D.19774;
  D.19776 = D.19775 < id;
  D.19777 = (long int) D.19776;
  D.19778 = __builtin_expect (D.19777, 0);
  if (D.19778 != 0) goto <D.19779>; else goto <D.19780>;
  <D.19779>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2238, "id <= GPOINTER_TO_UINT (*data)");
  <D.19780>:
  D.19782 = id * 4;
  D.19783 = data + D.19782;
  D.19781 = *D.19783;
  return D.19781;
}


mono_stack_walk (mono_bool (*MonoStackWalk) (struct MonoMethod *, int32_t, int32_t, mono_bool, void *) func, void * user_data)
{
  struct MonoRuntimeExceptionHandlingCallbacks * D.19785;
  void (*<T274b>) (gboolean (*MonoInternalStackWalk) (struct MonoStackFrameInfo *, struct MonoContext *, void *), struct MonoContext *, MonoUnwindOptions, void *) D.19786;
  struct StackWalkUserData ud;

  try
    {
      ud.func = func;
      ud.user_data = user_data;
      D.19785 = mono_get_eh_callbacks ();
      D.19786 = D.19785->mono_walk_stack_with_ctx;
      D.19786 (stack_walk_adapter, 0B, 3, &ud);
    }
  finally
    {
      ud = {CLOBBER};
    }
}


stack_walk_adapter (struct MonoStackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  <unnamed type> D.19787;
  gboolean D.19788;
  struct MonoJitInfo * D.19789;
  _Bool D.19790;
  long int D.19791;
  long int D.19792;
  mono_bool (*<T101a>) (struct MonoMethod *, int32_t, int32_t, mono_bool, void *) D.19795;
  struct MonoMethod * D.19796;
  int D.19797;
  int D.19798;
  int D.19799;
  void * D.19800;
  struct StackWalkUserData * d;

  d = data;
  D.19787 = frame->type;
  switch (D.19787) <default: <D.18214>, case 0: <D.18213>, case 1: <D.18211>, case 2: <D.18212>>
  <D.18211>:
  <D.18212>:
  D.19788 = 0;
  return D.19788;
  <D.18213>:
  D.19789 = frame->ji;
  D.19790 = D.19789 == 0B;
  D.19791 = (long int) D.19790;
  D.19792 = __builtin_expect (D.19791, 0);
  if (D.19792 != 0) goto <D.19793>; else goto <D.19794>;
  <D.19793>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2257, "frame->ji");
  <D.19794>:
  D.19795 = d->func;
  D.19789 = frame->ji;
  D.19796 = mono_jit_info_get_method (D.19789);
  D.19797 = frame->native_offset;
  D.19798 = frame->il_offset;
  D.19799 = frame->managed;
  D.19800 = d->user_data;
  D.19788 = D.19795 (D.19796, D.19797, D.19798, D.19799, D.19800);
  return D.19788;
  <D.18214>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "loader.c", 2261);
  D.19788 = 0;
  return D.19788;
}


mono_stack_walk_no_il (mono_bool (*MonoStackWalk) (struct MonoMethod *, int32_t, int32_t, mono_bool, void *) func, void * user_data)
{
  struct MonoRuntimeExceptionHandlingCallbacks * D.19802;
  void (*<T274b>) (gboolean (*MonoInternalStackWalk) (struct MonoStackFrameInfo *, struct MonoContext *, void *), struct MonoContext *, MonoUnwindOptions, void *) D.19803;
  struct StackWalkUserData ud;

  try
    {
      ud.func = func;
      ud.user_data = user_data;
      D.19802 = mono_get_eh_callbacks ();
      D.19803 = D.19802->mono_walk_stack_with_ctx;
      D.19803 (stack_walk_adapter, 0B, 2, &ud);
    }
  finally
    {
      ud = {CLOBBER};
    }
}


mono_method_get_last_managed ()
{
  struct MonoMethod * D.19804;
  struct MonoMethod * m;

  try
    {
      m = 0B;
      mono_stack_walk_no_il (last_managed, &m);
      D.19804 = m;
      return D.19804;
    }
  finally
    {
      m = {CLOBBER};
    }
}


last_managed (struct MonoMethod * m, gint no, gint ilo, gboolean managed, void * data)
{
  gboolean D.19807;
  struct MonoMethod * * dest;

  dest = data;
  *dest = m;
  D.19807 = managed;
  return D.19807;
}


mono_loader_lock ()
{
  _Bool D.19811;
  long int D.19812;
  long int D.19813;
  int loader_lock_track_ownership.87;
  _Bool D.19817;
  long int D.19818;
  long int D.19819;
  unsigned int loader_lock_nest_id.88;
  void * D.19823;
  unsigned int D.19824;
  unsigned int D.19825;
  void * D.19826;

  {
    int ret;

    ret = pthread_mutex_lock (&loader_mutex.mutex);
    if (ret != 0) goto <D.19809>; else goto <D.19810>;
    <D.19809>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.19810>:
    D.19811 = ret != 0;
    D.19812 = (long int) D.19811;
    D.19813 = __builtin_expect (D.19812, 0);
    if (D.19813 != 0) goto <D.19814>; else goto <D.19815>;
    <D.19814>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2308, "ret == 0");
    <D.19815>:
  }
  loader_lock_track_ownership.87 = loader_lock_track_ownership;
  D.19817 = loader_lock_track_ownership.87 != 0;
  D.19818 = (long int) D.19817;
  D.19819 = __builtin_expect (D.19818, 0);
  if (D.19819 != 0) goto <D.19820>; else goto <D.19821>;
  <D.19820>:
  loader_lock_nest_id.88 = loader_lock_nest_id;
  loader_lock_nest_id.88 = loader_lock_nest_id;
  D.19823 = pthread_getspecific (loader_lock_nest_id.88);
  D.19824 = (unsigned int) D.19823;
  D.19825 = D.19824 + 1;
  D.19826 = (void *) D.19825;
  mono_native_tls_set_value (loader_lock_nest_id.88, D.19826);
  <D.19821>:
}


mono_loader_unlock ()
{
  _Bool D.19829;
  long int D.19830;
  long int D.19831;
  int loader_lock_track_ownership.89;
  _Bool D.19835;
  long int D.19836;
  long int D.19837;
  unsigned int loader_lock_nest_id.90;
  void * D.19841;
  unsigned int D.19842;
  unsigned int D.19843;
  void * D.19844;

  {
    int ret;

    ret = pthread_mutex_unlock (&loader_mutex.mutex);
    if (ret != 0) goto <D.19827>; else goto <D.19828>;
    <D.19827>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.19828>:
    D.19829 = ret != 0;
    D.19830 = (long int) D.19829;
    D.19831 = __builtin_expect (D.19830, 0);
    if (D.19831 != 0) goto <D.19832>; else goto <D.19833>;
    <D.19832>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2317, "ret == 0");
    <D.19833>:
  }
  loader_lock_track_ownership.89 = loader_lock_track_ownership;
  D.19835 = loader_lock_track_ownership.89 != 0;
  D.19836 = (long int) D.19835;
  D.19837 = __builtin_expect (D.19836, 0);
  if (D.19837 != 0) goto <D.19838>; else goto <D.19839>;
  <D.19838>:
  loader_lock_nest_id.90 = loader_lock_nest_id;
  loader_lock_nest_id.90 = loader_lock_nest_id;
  D.19841 = pthread_getspecific (loader_lock_nest_id.90);
  D.19842 = (unsigned int) D.19841;
  D.19843 = D.19842 + 4294967295;
  D.19844 = (void *) D.19843;
  mono_native_tls_set_value (loader_lock_nest_id.90, D.19844);
  <D.19839>:
}


mono_loader_lock_track_ownership (gboolean track)
{
  loader_lock_track_ownership = track;
}


mono_loader_lock_is_owned_by_self ()
{
  int loader_lock_track_ownership.91;
  _Bool D.19846;
  long int D.19847;
  long int D.19848;
  gboolean D.19851;
  unsigned int loader_lock_nest_id.92;
  void * D.19853;
  unsigned int D.19854;
  _Bool D.19855;

  loader_lock_track_ownership.91 = loader_lock_track_ownership;
  D.19846 = loader_lock_track_ownership.91 == 0;
  D.19847 = (long int) D.19846;
  D.19848 = __builtin_expect (D.19847, 0);
  if (D.19848 != 0) goto <D.19849>; else goto <D.19850>;
  <D.19849>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2345, "loader_lock_track_ownership");
  <D.19850>:
  loader_lock_nest_id.92 = loader_lock_nest_id;
  D.19853 = pthread_getspecific (loader_lock_nest_id.92);
  D.19854 = (unsigned int) D.19853;
  D.19855 = D.19854 != 0;
  D.19851 = (gboolean) D.19855;
  return D.19851;
}


mono_loader_lock_if_inited ()
{
  int loader_lock_inited.93;

  loader_lock_inited.93 = loader_lock_inited;
  if (loader_lock_inited.93 != 0) goto <D.19858>; else goto <D.19859>;
  <D.19858>:
  mono_loader_lock ();
  <D.19859>:
}


mono_loader_unlock_if_inited ()
{
  int loader_lock_inited.94;

  loader_lock_inited.94 = loader_lock_inited;
  if (loader_lock_inited.94 != 0) goto <D.19861>; else goto <D.19862>;
  <D.19861>:
  mono_loader_unlock ();
  <D.19862>:
}


mono_method_signature_checked (struct MonoMethod * m, struct MonoError * error)
{
  struct MonoMethodSignature * D.19863;
  struct MonoMethodSignature * D.19866;
  unsigned int D.19869;
  unsigned int D.19870;
  struct MonoMethod * D.19873;
  struct MonoClass * D.19874;
  struct MonoImage * D.19875;
  struct MonoGenericContext * D.19876;
  int D.19877;
  unsigned int D.19880;
  unsigned int inflated_signatures_size.95;
  unsigned int inflated_signatures_size.96;
  unsigned int D.19883;
  unsigned int D.19884;
  _Bool D.19885;
  long int D.19886;
  long int D.19887;
  int D.19890;
  struct MonoClass * D.19891;
  struct MonoTableInfo * D.19892;
  int D.19893;
  struct MonoGenericClass * D.19894;
  _Bool D.19895;
  long int D.19896;
  long int D.19897;
  int iftmp.97;
  short unsigned int D.19905;
  int D.19906;
  int D.19907;
  short unsigned int D.19909;
  int D.19910;
  int D.19911;
  int D.19914;
  struct GHashTable * D.19919;
  int D.19922;
  unsigned int D.19925;
  const char * sig_body.98;
  unsigned int D.19931;
  unsigned int signatures_size.99;
  unsigned int signatures_size.100;
  short unsigned int D.19934;
  unsigned int D.19940;
  unsigned int D.19941;
  const char * D.19942;
  char * D.19943;
  <unnamed-signed:31> D.19944;
  int D.19945;
  int D.19946;
  unsigned int D.19954;
  short unsigned int D.19962;
  int D.19963;
  int D.19964;
  unsigned char D.19965;
  <unnamed-unsigned:6> D.19966;
  int idx;
  int size;
  struct MonoImage * img;
  const char * sig;
  gboolean can_cache_signature;
  struct MonoGenericContainer * container;
  struct MonoMethodSignature * signature;
  guint32 sig_offset;

  signature = 0B;
  mono_error_init (error);
  D.19863 = m->signature;
  if (D.19863 != 0B) goto <D.19864>; else goto <D.19865>;
  <D.19864>:
  D.19866 = m->signature;
  return D.19866;
  <D.19865>:
  mono_loader_lock ();
  D.19863 = m->signature;
  if (D.19863 != 0B) goto <D.19867>; else goto <D.19868>;
  <D.19867>:
  mono_loader_unlock ();
  D.19866 = m->signature;
  return D.19866;
  <D.19868>:
  D.19869 = BIT_FIELD_REF <*m, 32, 160>;
  D.19870 = D.19869 & 4096;
  if (D.19870 != 0) goto <D.19871>; else goto <D.19872>;
  <D.19871>:
  {
    struct MonoMethodInflated * imethod;

    imethod = m;
    D.19873 = imethod->declaring;
    signature = mono_method_signature (D.19873);
    D.19873 = imethod->declaring;
    D.19874 = D.19873->klass;
    D.19875 = D.19874->image;
    D.19876 = mono_method_get_context (m);
    signature = inflate_generic_signature_checked (D.19875, signature, D.19876, error);
    D.19877 = mono_error_ok (error);
    if (D.19877 == 0) goto <D.19878>; else goto <D.19879>;
    <D.19878>:
    mono_loader_unlock ();
    D.19866 = 0B;
    return D.19866;
    <D.19879>:
    D.19880 = mono_metadata_signature_size (signature);
    inflated_signatures_size.95 = inflated_signatures_size;
    inflated_signatures_size.96 = D.19880 + inflated_signatures_size.95;
    inflated_signatures_size = inflated_signatures_size.96;
    mono_memory_barrier ();
    m->signature = signature;
    mono_loader_unlock ();
    D.19866 = m->signature;
    return D.19866;
  }
  <D.19872>:
  D.19883 = m->token;
  D.19884 = D.19883 >> 24;
  D.19885 = D.19884 != 6;
  D.19886 = (long int) D.19885;
  D.19887 = __builtin_expect (D.19886, 0);
  if (D.19887 != 0) goto <D.19888>; else goto <D.19889>;
  <D.19888>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2419, "mono_metadata_token_table (m->token) == MONO_TABLE_METHOD");
  <D.19889>:
  D.19883 = m->token;
  D.19890 = (int) D.19883;
  idx = D.19890 & 16777215;
  D.19891 = m->klass;
  img = D.19891->image;
  D.19892 = &img->tables[6];
  D.19893 = idx + -1;
  sig_offset = mono_metadata_decode_row_col (D.19892, D.19893, 4);
  sig = mono_metadata_blob_heap (img, sig_offset);
  D.19891 = m->klass;
  D.19894 = D.19891->generic_class;
  D.19895 = D.19894 != 0B;
  D.19896 = (long int) D.19895;
  D.19897 = __builtin_expect (D.19896, 0);
  if (D.19897 != 0) goto <D.19898>; else goto <D.19899>;
  <D.19898>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2425, "!m->klass->generic_class");
  <D.19899>:
  container = mono_method_get_generic_container (m);
  if (container == 0B) goto <D.19900>; else goto <D.19901>;
  <D.19900>:
  D.19891 = m->klass;
  container = D.19891->generic_container;
  <D.19901>:
  D.19905 = m->iflags;
  D.19906 = (int) D.19905;
  D.19907 = D.19906 & 4096;
  if (D.19907 == 0) goto <D.19908>; else goto <D.19903>;
  <D.19908>:
  D.19909 = m->flags;
  D.19910 = (int) D.19909;
  D.19911 = D.19910 & 8192;
  if (D.19911 == 0) goto <D.19912>; else goto <D.19903>;
  <D.19912>:
  if (container == 0B) goto <D.19913>; else goto <D.19903>;
  <D.19913>:
  iftmp.97 = 1;
  goto <D.19904>;
  <D.19903>:
  iftmp.97 = 0;
  <D.19904>:
  can_cache_signature = iftmp.97;
  D.19914 = mono_metadata_method_has_param_attrs (img, idx);
  if (D.19914 != 0) goto <D.19915>; else goto <D.19916>;
  <D.19915>:
  can_cache_signature = 0;
  <D.19916>:
  if (can_cache_signature != 0) goto <D.19917>; else goto <D.19918>;
  <D.19917>:
  D.19919 = img->method_signatures;
  signature = monoeg_g_hash_table_lookup (D.19919, sig);
  <D.19918>:
  if (signature == 0B) goto <D.19920>; else goto <D.19921>;
  <D.19920>:
  {
    const char * sig_body;

    try
      {
        D.19922 = mono_verifier_verify_method_signature (img, sig_offset, error);
        if (D.19922 == 0) goto <D.19923>; else goto <D.19924>;
        <D.19923>:
        mono_loader_unlock ();
        D.19866 = 0B;
        return D.19866;
        <D.19924>:
        D.19925 = mono_metadata_decode_blob_size (sig, &sig_body);
        size = (int) D.19925;
        sig_body.98 = sig_body;
        signature = mono_metadata_parse_method_signature_full (img, container, idx, sig_body.98, 0B);
        if (signature == 0B) goto <D.19927>; else goto <D.19928>;
        <D.19927>:
        mono_error_set_from_loader_error (error);
        mono_loader_unlock ();
        D.19866 = 0B;
        return D.19866;
        <D.19928>:
        if (can_cache_signature != 0) goto <D.19929>; else goto <D.19930>;
        <D.19929>:
        D.19919 = img->method_signatures;
        monoeg_g_hash_table_insert_replace (D.19919, sig, signature, 0);
        <D.19930>:
        D.19931 = mono_metadata_signature_size (signature);
        signatures_size.99 = signatures_size;
        signatures_size.100 = D.19931 + signatures_size.99;
        signatures_size = signatures_size.100;
      }
    finally
      {
        sig_body = {CLOBBER};
      }
  }
  <D.19921>:
  D.19934 = signature->generic_param_count;
  if (D.19934 != 0) goto <D.19935>; else goto <D.19936>;
  <D.19935>:
  if (container == 0B) goto <D.19937>; else goto <D.19939>;
  <D.19939>:
  D.19940 = BIT_FIELD_REF <*container, 32, 128>;
  D.19941 = D.19940 & 2147483648;
  if (D.19941 == 0) goto <D.19937>; else goto <D.19938>;
  <D.19937>:
  mono_loader_unlock ();
  D.19891 = m->klass;
  D.19942 = m->name;
  D.19943 = img->name;
  mono_error_set_method_load (error, D.19891, D.19942, "Signature claims method has generic parameters, but generic_params table says it doesn\'t for method 0x%08x from image %s", idx, D.19943);
  D.19866 = 0B;
  return D.19866;
  <D.19938>:
  D.19944 = container->type_argc;
  D.19945 = (int) D.19944;
  D.19934 = signature->generic_param_count;
  D.19946 = (int) D.19934;
  if (D.19945 != D.19946) goto <D.19947>; else goto <D.19948>;
  <D.19947>:
  mono_loader_unlock ();
  D.19891 = m->klass;
  D.19942 = m->name;
  D.19934 = signature->generic_param_count;
  D.19946 = (int) D.19934;
  D.19944 = container->type_argc;
  D.19945 = (int) D.19944;
  D.19943 = img->name;
  mono_error_set_method_load (error, D.19891, D.19942, "Inconsistent generic parameter count.  Signature says %d, generic_params table says %d for method 0x%08x from image %s", D.19946, D.19945, idx, D.19943);
  D.19866 = 0B;
  return D.19866;
  <D.19948>:
  goto <D.19949>;
  <D.19936>:
  if (container != 0B) goto <D.19950>; else goto <D.19951>;
  <D.19950>:
  D.19940 = BIT_FIELD_REF <*container, 32, 128>;
  D.19941 = D.19940 & 2147483648;
  if (D.19941 != 0) goto <D.19952>; else goto <D.19953>;
  <D.19952>:
  D.19940 = BIT_FIELD_REF <*container, 32, 128>;
  D.19954 = D.19940 & 2147483647;
  if (D.19954 != 0) goto <D.19955>; else goto <D.19956>;
  <D.19955>:
  mono_loader_unlock ();
  D.19891 = m->klass;
  D.19942 = m->name;
  D.19943 = img->name;
  mono_error_set_method_load (error, D.19891, D.19942, "generic_params table claims method has generic parameters, but signature says it doesn\'t for method 0x%08x from image %s", idx, D.19943);
  D.19866 = 0B;
  return D.19866;
  <D.19956>:
  <D.19953>:
  <D.19951>:
  <D.19949>:
  D.19905 = m->iflags;
  D.19906 = (int) D.19905;
  D.19907 = D.19906 & 4096;
  if (D.19907 != 0) goto <D.19957>; else goto <D.19958>;
  <D.19957>:
  signature->pinvoke = 1;
  goto <D.19959>;
  <D.19958>:
  D.19909 = m->flags;
  D.19910 = (int) D.19909;
  D.19911 = D.19910 & 8192;
  if (D.19911 != 0) goto <D.19960>; else goto <D.19961>;
  <D.19960>:
  {
    MonoCallConvention conv;
    struct MonoMethodPInvoke * piinfo;

    conv = 0;
    piinfo = m;
    signature->pinvoke = 1;
    D.19962 = piinfo->piflags;
    D.19963 = (int) D.19962;
    D.19964 = D.19963 & 1792;
    switch (D.19964) <default: <D.18283>, case 0: <D.18274>, case 10: <D.18282>, case 16: <D.18281>, case 256: <D.18275>, case 512: <D.18277>, case 768: <D.18278>, case 1024: <D.18279>, case 1280: <D.18280>>
    <D.18274>:
    <D.18275>:
    conv = 0;
    goto <D.18276>;
    <D.18277>:
    conv = 1;
    goto <D.18276>;
    <D.18278>:
    conv = 2;
    goto <D.18276>;
    <D.18279>:
    conv = 3;
    goto <D.18276>;
    <D.18280>:
    conv = 4;
    goto <D.18276>;
    <D.18281>:
    <D.18282>:
    <D.18283>:
    mono_loader_unlock ();
    D.19891 = m->klass;
    D.19942 = m->name;
    D.19962 = piinfo->piflags;
    D.19963 = (int) D.19962;
    D.19943 = img->name;
    mono_error_set_method_load (error, D.19891, D.19942, "unsupported calling convention : 0x%04x for method 0x%08x from image %s", D.19963, idx, D.19943);
    D.19866 = 0B;
    return D.19866;
    <D.18276>:
    D.19965 = (unsigned char) conv;
    D.19966 = (<unnamed-unsigned:6>) D.19965;
    signature->call_convention = D.19966;
  }
  <D.19961>:
  <D.19959>:
  mono_memory_barrier ();
  m->signature = signature;
  mono_loader_unlock ();
  D.19866 = m->signature;
  return D.19866;
}


mono_memory_barrier ()
{
  __sync_synchronize ();
}


mono_method_signature (struct MonoMethod * m)
{
  struct MonoClass * D.19972;
  const char * D.19973;
  const char * D.19974;
  struct MonoMethodSignature * D.19975;
  struct MonoError error;
  struct MonoMethodSignature * sig;

  try
    {
      sig = mono_method_signature_checked (m, &error);
      if (sig == 0B) goto <D.19970>; else goto <D.19971>;
      <D.19970>:
      {
        char * type_name;

        D.19972 = m->klass;
        type_name = mono_type_get_full_name (D.19972);
        D.19973 = m->name;
        D.19974 = mono_error_get_message (&error);
        monoeg_g_log (0B, 16, "Could not load signature of %s:%s due to: %s", type_name, D.19973, D.19974);
        monoeg_g_free (type_name);
        mono_error_cleanup (&error);
      }
      <D.19971>:
      D.19975 = sig;
      return D.19975;
    }
  finally
    {
      error = {CLOBBER};
    }
}


mono_method_get_name (struct MonoMethod * method)
{
  const char * D.19978;

  D.19978 = method->name;
  return D.19978;
}


mono_method_get_class (struct MonoMethod * method)
{
  struct MonoClass * D.19980;

  D.19980 = method->klass;
  return D.19980;
}


mono_method_get_token (struct MonoMethod * method)
{
  uint32_t D.19982;

  D.19982 = method->token;
  return D.19982;
}


mono_method_get_header (struct MonoMethod * method)
{
  short unsigned int D.19986;
  int D.19987;
  int D.19988;
  short unsigned int D.19990;
  unsigned int D.19991;
  unsigned int D.19992;
  int D.19994;
  struct MonoMethodHeader * D.19995;
  unsigned int D.19996;
  unsigned int D.19997;
  struct MonoMethodHeader * D.20000;
  struct MonoMethod * D.20003;
  struct MonoGenericContext * D.20006;
  struct MonoMethodHeader * D.20007;
  unsigned int D.20008;
  struct MonoMethodHeader * D.20011;
  _Bool D.20012;
  long int D.20013;
  long int D.20014;
  unsigned int D.20017;
  unsigned int D.20018;
  _Bool D.20019;
  long int D.20020;
  long int D.20021;
  int D.20024;
  struct MonoClass * D.20025;
  struct MonoTableInfo * D.20026;
  int D.20027;
  int D.20028;
  struct MonoGenericContainer * D.20033;
  int idx;
  guint32 rva;
  struct MonoImage * img;
  void * loc;
  struct MonoMethodHeader * header;

  D.19986 = method->flags;
  D.19987 = (int) D.19986;
  D.19988 = D.19987 & 1024;
  if (D.19988 != 0) goto <D.19984>; else goto <D.19989>;
  <D.19989>:
  D.19990 = method->iflags;
  D.19991 = (unsigned int) D.19990;
  D.19992 = D.19991 & 4099;
  if (D.19992 != 0) goto <D.19984>; else goto <D.19993>;
  <D.19993>:
  D.19986 = method->flags;
  D.19987 = (int) D.19986;
  D.19994 = D.19987 & 8192;
  if (D.19994 != 0) goto <D.19984>; else goto <D.19985>;
  <D.19984>:
  D.19995 = 0B;
  return D.19995;
  <D.19985>:
  D.19996 = BIT_FIELD_REF <*method, 32, 160>;
  D.19997 = D.19996 & 4096;
  if (D.19997 != 0) goto <D.19998>; else goto <D.19999>;
  <D.19998>:
  {
    struct MonoMethodInflated * imethod;
    struct MonoMethodHeader * header;

    imethod = method;
    mono_loader_lock ();
    D.20000 = imethod->header;
    if (D.20000 != 0B) goto <D.20001>; else goto <D.20002>;
    <D.20001>:
    mono_loader_unlock ();
    D.19995 = imethod->header;
    return D.19995;
    <D.20002>:
    D.20003 = imethod->declaring;
    header = mono_method_get_header (D.20003);
    if (header == 0B) goto <D.20004>; else goto <D.20005>;
    <D.20004>:
    mono_loader_unlock ();
    D.19995 = 0B;
    return D.19995;
    <D.20005>:
    D.20006 = mono_method_get_context (method);
    D.20007 = inflate_generic_header (header, D.20006);
    imethod->header = D.20007;
    mono_loader_unlock ();
    mono_metadata_free_mh (header);
    D.19995 = imethod->header;
    return D.19995;
  }
  <D.19999>:
  D.19996 = BIT_FIELD_REF <*method, 32, 160>;
  D.20008 = D.19996 & 1148;
  if (D.20008 != 0) goto <D.20009>; else goto <D.20010>;
  <D.20009>:
  {
    struct MonoMethodWrapper * mw;

    mw = method;
    D.20011 = mw->header;
    D.20012 = D.20011 == 0B;
    D.20013 = (long int) D.20012;
    D.20014 = __builtin_expect (D.20013, 0);
    if (D.20014 != 0) goto <D.20015>; else goto <D.20016>;
    <D.20015>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2599, "mw->header");
    <D.20016>:
    D.19995 = mw->header;
    return D.19995;
  }
  <D.20010>:
  D.20017 = method->token;
  D.20018 = D.20017 >> 24;
  D.20019 = D.20018 != 6;
  D.20020 = (long int) D.20019;
  D.20021 = __builtin_expect (D.20020, 0);
  if (D.20021 != 0) goto <D.20022>; else goto <D.20023>;
  <D.20022>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2607, "mono_metadata_token_table (method->token) == MONO_TABLE_METHOD");
  <D.20023>:
  D.20017 = method->token;
  D.20024 = (int) D.20017;
  idx = D.20024 & 16777215;
  D.20025 = method->klass;
  img = D.20025->image;
  D.20026 = &img->tables[6];
  D.20027 = idx + -1;
  rva = mono_metadata_decode_row_col (D.20026, D.20027, 0);
  D.20028 = mono_verifier_verify_method_header (img, rva, 0B);
  if (D.20028 == 0) goto <D.20029>; else goto <D.20030>;
  <D.20029>:
  D.19995 = 0B;
  return D.19995;
  <D.20030>:
  loc = mono_image_rva_map (img, rva);
  if (loc == 0B) goto <D.20031>; else goto <D.20032>;
  <D.20031>:
  D.19995 = 0B;
  return D.19995;
  <D.20032>:
  D.20033 = mono_method_get_generic_container (method);
  header = mono_metadata_parse_mh_full (img, D.20033, loc);
  D.19995 = header;
  return D.19995;
}


inflate_generic_header (struct MonoMethodHeader * header, struct MonoGenericContext * context)
{
  short unsigned int D.20035;
  unsigned int D.20036;
  unsigned int D.20037;
  unsigned int D.20038;
  const unsigned char * D.20039;
  unsigned int D.20040;
  <unnamed-unsigned:15> D.20041;
  <unnamed-unsigned:15> D.20042;
  <unnamed-unsigned:1> D.20043;
  struct MonoExceptionClause * D.20044;
  struct MonoType * D.20045;
  struct MonoType * D.20046;
  int D.20047;
  unsigned int D.20048;
  unsigned int D.20049;
  <unnamed-unsigned:15> D.20052;
  unsigned int D.20053;
  unsigned int D.20054;
  void * D.20055;
  struct MonoExceptionClause * D.20056;
  unsigned int i.101;
  unsigned int D.20058;
  unsigned int D.20059;
  struct MonoClass * D.20062;
  struct MonoClass * D.20063;
  int D.20064;
  struct MonoMethodHeader * D.20065;
  struct MonoMethodHeader * res;
  int i;

  D.20035 = header->num_locals;
  D.20036 = (unsigned int) D.20035;
  D.20037 = D.20036 + 5;
  D.20038 = D.20037 * 4;
  res = monoeg_malloc0 (D.20038);
  D.20039 = header->code;
  res->code = D.20039;
  D.20040 = header->code_size;
  res->code_size = D.20040;
  D.20041 = header->max_stack;
  res->max_stack = D.20041;
  D.20042 = header->num_clauses;
  res->num_clauses = D.20042;
  D.20043 = header->init_locals;
  res->init_locals = D.20043;
  D.20035 = header->num_locals;
  res->num_locals = D.20035;
  D.20044 = header->clauses;
  res->clauses = D.20044;
  i = 0;
  goto <D.17786>;
  <D.17785>:
  D.20045 = header->locals[i];
  D.20046 = mono_class_inflate_generic_type (D.20045, context);
  res->locals[i] = D.20046;
  i = i + 1;
  <D.17786>:
  D.20035 = header->num_locals;
  D.20047 = (int) D.20035;
  if (D.20047 > i) goto <D.17785>; else goto <D.17787>;
  <D.17787>:
  D.20048 = BIT_FIELD_REF <*res, 32, 64>;
  D.20049 = D.20048 & 2147418112;
  if (D.20049 != 0) goto <D.20050>; else goto <D.20051>;
  <D.20050>:
  D.20044 = header->clauses;
  D.20052 = res->num_clauses;
  D.20053 = (unsigned int) D.20052;
  D.20054 = D.20053 * 24;
  D.20055 = monoeg_g_memdup (D.20044, D.20054);
  res->clauses = D.20055;
  i = 0;
  goto <D.17791>;
  <D.17790>:
  {
    struct MonoExceptionClause * clause;

    D.20056 = res->clauses;
    i.101 = (unsigned int) i;
    D.20058 = i.101 * 24;
    clause = D.20056 + D.20058;
    D.20059 = clause->flags;
    if (D.20059 != 0) goto <D.20060>; else goto <D.20061>;
    <D.20060>:
    // predicted unlikely by continue predictor.
    goto <D.17789>;
    <D.20061>:
    D.20062 = clause->data.catch_class;
    D.20063 = mono_class_inflate_generic_class (D.20062, context);
    clause->data.catch_class = D.20063;
  }
  <D.17789>:
  i = i + 1;
  <D.17791>:
  D.20042 = header->num_clauses;
  D.20064 = (int) D.20042;
  if (D.20064 > i) goto <D.17790>; else goto <D.17792>;
  <D.17792>:
  <D.20051>:
  D.20065 = res;
  return D.20065;
}


mono_method_get_flags (struct MonoMethod * method, guint32 * iflags)
{
  short unsigned int D.20069;
  unsigned int D.20070;
  uint32_t D.20071;
  short unsigned int D.20072;

  if (iflags != 0B) goto <D.20067>; else goto <D.20068>;
  <D.20067>:
  D.20069 = method->iflags;
  D.20070 = (unsigned int) D.20069;
  *iflags = D.20070;
  <D.20068>:
  D.20072 = method->flags;
  D.20071 = (uint32_t) D.20072;
  return D.20071;
}


mono_method_get_index (struct MonoMethod * method)
{
  unsigned char D.20074;
  uint32_t D.20077;
  unsigned int D.20078;
  unsigned char D.20081;
  struct MonoMethod * * D.20084;
  unsigned int i.102;
  unsigned int D.20086;
  struct MonoMethod * * D.20087;
  struct MonoMethod * D.20088;
  struct MonoImage * D.20091;
  unsigned int D.20092;
  unsigned int D.20093;
  unsigned int D.20096;
  unsigned int i.103;
  unsigned int D.20098;
  unsigned int D.20099;
  unsigned int D.20100;
  struct MonoClass * klass;
  int i;

  klass = method->klass;
  D.20074 = klass->rank;
  if (D.20074 != 0) goto <D.20075>; else goto <D.20076>;
  <D.20075>:
  D.20077 = 0;
  return D.20077;
  <D.20076>:
  D.20078 = method->token;
  if (D.20078 != 0) goto <D.20079>; else goto <D.20080>;
  <D.20079>:
  D.20078 = method->token;
  D.20077 = D.20078 & 16777215;
  return D.20077;
  <D.20080>:
  mono_class_setup_methods (klass);
  D.20081 = klass->exception_type;
  if (D.20081 != 0) goto <D.20082>; else goto <D.20083>;
  <D.20082>:
  D.20077 = 0;
  return D.20077;
  <D.20083>:
  i = 0;
  goto <D.18320>;
  <D.18319>:
  D.20084 = klass->methods;
  i.102 = (unsigned int) i;
  D.20086 = i.102 * 4;
  D.20087 = D.20084 + D.20086;
  D.20088 = *D.20087;
  if (D.20088 == method) goto <D.20089>; else goto <D.20090>;
  <D.20089>:
  D.20091 = klass->image;
  D.20092 = BIT_FIELD_REF <*D.20091, 32, 128>;
  D.20093 = D.20092 & 32;
  if (D.20093 != 0) goto <D.20094>; else goto <D.20095>;
  <D.20094>:
  D.20091 = klass->image;
  D.20096 = klass->method.first;
  i.103 = (unsigned int) i;
  D.20098 = D.20096 + i.103;
  D.20099 = D.20098 + 1;
  D.20077 = mono_metadata_translate_token_index (D.20091, 6, D.20099);
  return D.20077;
  <D.20095>:
  D.20096 = klass->method.first;
  i.103 = (unsigned int) i;
  D.20098 = D.20096 + i.103;
  D.20077 = D.20098 + 1;
  return D.20077;
  <D.20090>:
  i = i + 1;
  <D.18320>:
  i.103 = (unsigned int) i;
  D.20100 = klass->method.count;
  if (i.103 < D.20100) goto <D.18319>; else goto <D.18321>;
  <D.18321>:
  D.20077 = 0;
  return D.20077;
}


