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

  inited.0 = inited;
  if (inited.0 == 0) goto <D.20909>; else goto <D.20910>;
  <D.20909>:
  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.20910>:
}


mono_native_tls_alloc (pthread_key_t * key, void * destructor)
{
  int D.20911;
  void (*<Tc1>) (void *) destructor.1;
  int D.20913;
  _Bool D.20914;

  destructor.1 = (void (*<Tc1>) (void *)) destructor;
  D.20913 = pthread_key_create (key, destructor.1);
  D.20914 = D.20913 == 0;
  D.20911 = (int) D.20914;
  return D.20911;
}


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.20919;
  char * D.20920;
  char * D.20921;
  char * D.20922;

  goto <D.20528>;
  <D.20527>:
  {
    struct MonoDllMap * next;

    next = map->next;
    D.20919 = map->dll;
    monoeg_g_free (D.20919);
    D.20920 = map->target;
    monoeg_g_free (D.20920);
    D.20921 = map->func;
    monoeg_g_free (D.20921);
    D.20922 = map->target_func;
    monoeg_g_free (D.20922);
    monoeg_g_free (map);
    map = next;
  }
  <D.20528>:
  if (map != 0B) goto <D.20527>; else goto <D.20529>;
  <D.20529>:
}


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.20923;
  gchar * D.20926;
  struct MonoLoaderError * error;

  D.20923 = mono_loader_get_last_error ();
  if (D.20923 != 0B) goto <D.20924>; else goto <D.20925>;
  <D.20924>:
  return;
  <D.20925>:
  error = monoeg_malloc0 (28);
  error->exception_type = 8;
  D.20926 = monoeg_strdup (assembly_name);
  error->assembly_name = D.20926;
  error->ref_only = ref_only;
  if (ref_only != 0) goto <D.20927>; else goto <D.20928>;
  <D.20927>:
  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.20929>;
  <D.20928>:
  mono_trace (16, 1, "Could not load file or assembly \'%s\' or one of its dependencies.", assembly_name);
  <D.20929>:
  set_loader_error (error);
}


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

  if (str != 0B) goto <D.20931>; else goto <D.20932>;
  <D.20931>:
  D.20933 = __strdup (str);
  return D.20933;
  <D.20932>:
  D.20933 = 0B;
  return D.20933;
}


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.20936;
  int D.20937;
  _Bool D.20938;

  D.20937 = pthread_setspecific (key, value);
  D.20938 = D.20937 == 0;
  D.20936 = (int) D.20938;
  return D.20936;
}


mono_loader_set_error_type_load (const char * class_name, const char * assembly_name)
{
  struct MonoLoaderError * D.20940;
  gchar * D.20943;
  gchar * D.20944;
  struct MonoLoaderError * error;

  D.20940 = mono_loader_get_last_error ();
  if (D.20940 != 0B) goto <D.20941>; else goto <D.20942>;
  <D.20941>:
  return;
  <D.20942>:
  error = monoeg_malloc0 (28);
  error->exception_type = 7;
  D.20943 = monoeg_strdup (class_name);
  error->class_name = D.20943;
  D.20944 = monoeg_strdup (assembly_name);
  error->assembly_name = D.20944;
  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.20946;
  gchar * D.20949;
  struct MonoLoaderError * error;

  D.20946 = mono_loader_get_last_error ();
  if (D.20946 != 0B) goto <D.20947>; else goto <D.20948>;
  <D.20947>:
  return;
  <D.20948>:
  error = monoeg_malloc0 (28);
  error->exception_type = 5;
  D.20949 = monoeg_strdup (class_name);
  error->class_name = D.20949;
  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.20951;
  struct MonoLoaderError * error;

  D.20951 = mono_loader_get_last_error ();
  if (D.20951 != 0B) goto <D.20952>; else goto <D.20953>;
  <D.20952>:
  return;
  <D.20953>:
  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.20955;
  struct MonoLoaderError * error;

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


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

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


mono_loader_clear_error ()
{
  unsigned int loader_error_thread_id.7;
  char * D.20965;
  char * D.20966;
  char * D.20967;
  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.20963>; else goto <D.20964>;
  <D.20963>:
  D.20965 = ex->class_name;
  monoeg_g_free (D.20965);
  D.20966 = ex->assembly_name;
  monoeg_g_free (D.20966);
  D.20967 = ex->msg;
  monoeg_g_free (D.20967);
  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.20964>:
}


mono_loader_error_prepare_exception (struct MonoLoaderError * error)
{
  unsigned char D.20968;
  int D.20969;
  char * D.20970;
  char * D.20971;
  struct MonoDomain * D.20972;
  const char * D.20973;
  struct MonoClass * D.20974;
  int D.20978;
  struct MonoDomain * D.20982;
  struct MonoString * D.20983;
  char * D.20984;
  struct MonoException * D.20985;
  struct MonoException * ex;

  ex = 0B;
  D.20968 = error->exception_type;
  D.20969 = (int) D.20968;
  switch (D.20969) <default: <D.20163>, case 5: <D.20152>, case 6: <D.20155>, case 7: <D.20147>, case 8: <D.20158>, case 12: <D.20161>>
  <D.20147>:
  {
    char * cname;
    char * aname;
    struct MonoString * class_name;

    D.20970 = error->class_name;
    cname = monoeg_strdup (D.20970);
    D.20971 = error->assembly_name;
    aname = monoeg_strdup (D.20971);
    mono_loader_clear_error ();
    D.20972 = mono_domain_get ();
    class_name = mono_string_new (D.20972, cname);
    ex = mono_get_exception_type_load (class_name, aname);
    monoeg_g_free (cname);
    monoeg_g_free (aname);
    goto <D.20151>;
  }
  <D.20152>:
  {
    char * cname;
    char * aname;

    D.20970 = error->class_name;
    cname = monoeg_strdup (D.20970);
    D.20973 = error->member_name;
    aname = monoeg_strdup (D.20973);
    mono_loader_clear_error ();
    ex = mono_get_exception_missing_method (cname, aname);
    monoeg_g_free (cname);
    monoeg_g_free (aname);
    goto <D.20151>;
  }
  <D.20155>:
  {
    char * class_name;
    char * cmembername;

    D.20973 = error->member_name;
    cmembername = monoeg_strdup (D.20973);
    D.20974 = error->klass;
    if (D.20974 != 0B) goto <D.20975>; else goto <D.20976>;
    <D.20975>:
    D.20974 = error->klass;
    class_name = mono_type_get_full_name (D.20974);
    goto <D.20977>;
    <D.20976>:
    class_name = monoeg_strdup ("");
    <D.20977>:
    mono_loader_clear_error ();
    ex = mono_get_exception_missing_field (class_name, cmembername);
    monoeg_g_free (class_name);
    monoeg_g_free (cmembername);
    goto <D.20151>;
  }
  <D.20158>:
  {
    char * msg;
    char * filename;

    D.20978 = error->ref_only;
    if (D.20978 != 0) goto <D.20979>; else goto <D.20980>;
    <D.20979>:
    D.20971 = 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.20971);
    goto <D.20981>;
    <D.20980>:
    D.20971 = error->assembly_name;
    msg = monoeg_g_strdup_printf ("Could not load file or assembly \'%s\' or one of its dependencies.", D.20971);
    <D.20981>:
    D.20971 = error->assembly_name;
    filename = monoeg_strdup (D.20971);
    mono_loader_clear_error ();
    D.20982 = mono_domain_get ();
    D.20983 = mono_string_new (D.20982, filename);
    ex = mono_get_exception_file_not_found2 (msg, D.20983);
    monoeg_g_free (msg);
    monoeg_g_free (filename);
    goto <D.20151>;
  }
  <D.20161>:
  {
    char * msg;

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


mono_field_from_token (struct MonoImage * image, guint32 token, struct MonoClass * * retklass, struct MonoGenericContext * context)
{
  unsigned char D.20987;
  unsigned char D.20988;
  struct MonoClass * D.20994;
  struct MonoClass * handle_class.8;
  char * D.20996;
  gchar * D.20997;
  struct MonoClassField * D.20998;
  struct MonoClass * D.20999;
  struct GHashTable * D.21000;
  const void * token.9;
  struct MonoClass * D.21004;
  unsigned int D.21005;
  unsigned int D.21009;
  unsigned int D.21012;
  struct MonoGenericClass * D.21021;
  struct MonoGenericContainer * D.21024;
  void * token.10;
  struct MonoClass * k;
  guint32 type;
  struct MonoClassField * field;

  D.20987 = BIT_FIELD_REF <*image, 8, 128>;
  D.20988 = D.20987 & 8;
  if (D.20988 != 0) goto <D.20989>; else goto <D.20990>;
  <D.20989>:
  {
    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.20991>; else goto <D.20993>;
        <D.20993>:
        D.20994 = mono_defaults.fieldhandle_class;
        handle_class.8 = handle_class;
        if (D.20994 != handle_class.8) goto <D.20991>; else goto <D.20992>;
        <D.20991>:
        D.20996 = image->name;
        D.20997 = monoeg_g_strdup_printf ("Bad field token 0x%08x on image %s.", token, D.20996);
        mono_loader_set_error_bad_image (D.20997);
        D.20998 = 0B;
        return D.20998;
        <D.20992>:
        D.20999 = result->parent;
        *retklass = D.20999;
        D.20998 = result;
        return D.20998;
      }
    finally
      {
        handle_class = {CLOBBER};
      }
  }
  <D.20990>:
  mono_image_lock (image);
  D.21000 = image->field_cache;
  token.9 = (const void *) token;
  field = monoeg_g_hash_table_lookup (D.21000, token.9);
  if (field != 0B) goto <D.21002>; else goto <D.21003>;
  <D.21002>:
  D.21004 = field->parent;
  *retklass = D.21004;
  mono_image_unlock (image);
  D.20998 = field;
  return D.20998;
  <D.21003>:
  mono_image_unlock (image);
  D.21005 = token >> 24;
  if (D.21005 == 10) goto <D.21006>; else goto <D.21007>;
  <D.21006>:
  field = field_from_memberref (image, token, retklass, context);
  goto <D.21008>;
  <D.21007>:
  D.21009 = token & 16777215;
  type = mono_metadata_typedef_from_field (image, D.21009);
  if (type == 0) goto <D.21010>; else goto <D.21011>;
  <D.21010>:
  D.20998 = 0B;
  return D.20998;
  <D.21011>:
  D.21012 = type | 33554432;
  k = mono_class_get (image, D.21012);
  if (k == 0B) goto <D.21013>; else goto <D.21014>;
  <D.21013>:
  D.20998 = 0B;
  return D.20998;
  <D.21014>:
  mono_class_init (k);
  if (retklass != 0B) goto <D.21015>; else goto <D.21016>;
  <D.21015>:
  *retklass = k;
  <D.21016>:
  field = mono_class_get_field (k, token);
  <D.21008>:
  mono_image_lock (image);
  if (field != 0B) goto <D.21017>; else goto <D.21018>;
  <D.21017>:
  D.21004 = field->parent;
  if (D.21004 != 0B) goto <D.21019>; else goto <D.21020>;
  <D.21019>:
  D.21004 = field->parent;
  D.21021 = D.21004->generic_class;
  if (D.21021 == 0B) goto <D.21022>; else goto <D.21023>;
  <D.21022>:
  D.21004 = field->parent;
  D.21024 = D.21004->generic_container;
  if (D.21024 == 0B) goto <D.21025>; else goto <D.21026>;
  <D.21025>:
  D.21000 = image->field_cache;
  token.10 = (void *) token;
  monoeg_g_hash_table_insert_replace (D.21000, token.10, field, 0);
  <D.21026>:
  <D.21023>:
  <D.21020>:
  <D.21018>:
  mono_image_unlock (image);
  D.20998 = field;
  return D.20998;
}


field_from_memberref (struct MonoImage * image, guint32 token, struct MonoClass * * retklass, struct MonoGenericContext * context)
{
  const struct MonoTableInfo * D.21030;
  unsigned int D.21031;
  int D.21032;
  unsigned int D.21033;
  unsigned int D.21034;
  unsigned int D.21035;
  int D.21036;
  char * D.21039;
  gchar * D.21040;
  struct MonoClassField * D.21041;
  unsigned int D.21042;
  unsigned int D.21043;
  unsigned int D.21044;
  unsigned int D.21047;
  const char * D.21048;
  const char * ptr.11;
  const char * ptr.12;
  const char * ptr.13;
  const char * ptr.14;
  char D.21053;
  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.21030 = tables + 120;
      D.21031 = idx + 4294967295;
      D.21032 = (int) D.21031;
      mono_metadata_decode_row (D.21030, D.21032, &cols, 3);
      D.21033 = cols[0];
      nindex = D.21033 >> 3;
      D.21033 = cols[0];
      class = D.21033 & 7;
      D.21034 = cols[1];
      fname = mono_metadata_string_heap (image, D.21034);
      D.21035 = cols[2];
      D.21036 = mono_verifier_verify_memberref_field_signature (image, D.21035, 0B);
      if (D.21036 == 0) goto <D.21037>; else goto <D.21038>;
      <D.21037>:
      D.21039 = image->name;
      D.21040 = monoeg_g_strdup_printf ("Bad field signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, D.21039);
      mono_loader_set_error_bad_image (D.21040);
      D.21041 = 0B;
      return D.21041;
      <D.21038>:
      switch (class) <default: <D.20196>, case 0: <D.20192>, case 1: <D.20194>, case 4: <D.20195>>
      <D.20192>:
      class_table = 33554432;
      D.21042 = nindex | 33554432;
      klass = mono_class_get (image, D.21042);
      goto <D.20193>;
      <D.20194>:
      class_table = 16777216;
      D.21043 = nindex | 16777216;
      klass = mono_class_from_typeref (image, D.21043);
      goto <D.20193>;
      <D.20195>:
      class_table = 452984832;
      D.21044 = nindex | 452984832;
      klass = mono_class_get_full (image, D.21044, context);
      goto <D.20193>;
      <D.20196>:
      monoeg_g_log (0B, 16, "field load from %x", class);
      D.21041 = 0B;
      return D.21041;
      <D.20193>:
      if (klass == 0B) goto <D.21045>; else goto <D.21046>;
      <D.21045>:
      {
        char * name;

        D.21047 = class_table | nindex;
        name = mono_class_name_from_token (image, D.21047);
        D.21047 = class_table | nindex;
        monoeg_g_log (0B, 16, "Missing field %s in class %s (type token %d)", fname, name, D.21047);
        D.21048 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.21048);
        monoeg_g_free (name);
        D.21041 = 0B;
        return D.21041;
      }
      <D.21046>:
      D.21035 = cols[2];
      ptr.11 = mono_metadata_blob_heap (image, D.21035);
      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.21053 = *ptr.13;
      if (D.21053 != 6) goto <D.21054>; else goto <D.21055>;
      <D.21054>:
      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.21041 = 0B;
      return D.21041;
      <D.21055>:
      D.21035 = cols[2];
      sig_type = find_cached_memberref_sig (image, D.21035);
      if (sig_type == 0B) goto <D.21056>; else goto <D.21057>;
      <D.21056>:
      ptr.12 = ptr;
      sig_type = mono_metadata_parse_type (image, 0, 0, ptr.12, &ptr);
      if (sig_type == 0B) goto <D.21058>; else goto <D.21059>;
      <D.21058>:
      mono_loader_set_error_field_load (klass, fname);
      D.21041 = 0B;
      return D.21041;
      <D.21059>:
      D.21035 = cols[2];
      sig_type = cache_memberref_sig (image, D.21035, sig_type);
      <D.21057>:
      mono_class_init (klass);
      if (retklass != 0B) goto <D.21060>; else goto <D.21061>;
      <D.21060>:
      *retklass = klass;
      <D.21061>:
      field = mono_class_get_field_from_name_full (klass, fname, sig_type);
      if (field == 0B) goto <D.21062>; else goto <D.21063>;
      <D.21062>:
      mono_loader_set_error_field_load (klass, fname);
      <D.21063>:
      D.21041 = field;
      return D.21041;
    }
  finally
    {
      cols = {CLOBBER};
      ptr = {CLOBBER};
    }
}


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

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


cache_memberref_sig (struct MonoImage * image, guint32 sig_idx, void * sig)
{
  struct GHashTable * D.21070;
  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.21078;
  void * prev_sig;

  mono_loader_lock ();
  D.21070 = image->memberref_signatures;
  sig_idx.16 = (const void *) sig_idx;
  prev_sig = monoeg_g_hash_table_lookup (D.21070, sig_idx.16);
  if (prev_sig != 0B) goto <D.21072>; else goto <D.21073>;
  <D.21072>:
  sig = prev_sig;
  goto <D.21074>;
  <D.21073>:
  D.21070 = image->memberref_signatures;
  sig_idx.17 = (void *) sig_idx;
  monoeg_g_hash_table_insert_replace (D.21070, 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.21074>:
  mono_loader_unlock ();
  D.21078 = sig;
  return D.21078;
}


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

  res = inflate_generic_signature_checked (0B, sig, context, error);
  D.21080 = mono_error_ok (error);
  if (D.21080 == 0) goto <D.21081>; else goto <D.21082>;
  <D.21081>:
  D.21083 = 0B;
  return D.21083;
  <D.21082>:
  cached = mono_metadata_get_inflated_signature (res, context);
  if (cached != res) goto <D.21084>; else goto <D.21085>;
  <D.21084>:
  mono_metadata_free_inflated_signature (res);
  <D.21085>:
  D.21083 = cached;
  return D.21083;
}


inflate_generic_signature_checked (struct MonoImage * image, struct MonoMethodSignature * sig, struct MonoGenericContext * context, struct MonoError * error)
{
  struct MonoMethodSignature * D.21089;
  short unsigned int D.21090;
  unsigned int D.21091;
  unsigned int D.21092;
  unsigned int D.21093;
  struct MonoType * D.21094;
  struct MonoType * D.21095;
  int D.21096;
  struct MonoType * D.21098;
  struct MonoType * D.21099;
  struct MonoType * D.21100;
  int D.21101;
  struct MonoType * D.21105;
  int D.21106;
  <unnamed-unsigned:1> D.21107;
  <unnamed-unsigned:1> D.21108;
  <unnamed-unsigned:6> D.21109;
  <unnamed-unsigned:1> D.21110;
  short unsigned int D.21111;
  short int D.21112;
  unsigned char D.21113;
  <unnamed-unsigned:1> D.21114;
  struct MonoMethodSignature * res;
  gboolean is_open;
  int i;
  void fail = <<< error >>>;

  mono_error_init (error);
  if (context == 0B) goto <D.21087>; else goto <D.21088>;
  <D.21087>:
  D.21089 = sig;
  return D.21089;
  <D.21088>:
  D.21090 = sig->param_count;
  D.21091 = (unsigned int) D.21090;
  D.21092 = D.21091 + 3;
  D.21093 = D.21092 * 4;
  res = monoeg_malloc0 (D.21093);
  D.21090 = sig->param_count;
  res->param_count = D.21090;
  res->sentinelpos = -1;
  D.21094 = sig->ret;
  D.21095 = mono_class_inflate_generic_type_checked (D.21094, context, error);
  res->ret = D.21095;
  D.21096 = mono_error_ok (error);
  if (D.21096 == 0) goto fail; else goto <D.21097>;
  <D.21097>:
  D.21098 = res->ret;
  is_open = mono_class_is_open_constructed_type (D.21098);
  i = 0;
  goto <D.20350>;
  <D.20349>:
  D.21099 = sig->params[i];
  D.21100 = mono_class_inflate_generic_type_checked (D.21099, context, error);
  res->params[i] = D.21100;
  D.21101 = mono_error_ok (error);
  if (D.21101 == 0) goto fail; else goto <D.21102>;
  <D.21102>:
  if (is_open == 0) goto <D.21103>; else goto <D.21104>;
  <D.21103>:
  D.21105 = res->params[i];
  is_open = mono_class_is_open_constructed_type (D.21105);
  <D.21104>:
  i = i + 1;
  <D.20350>:
  D.21090 = sig->param_count;
  D.21106 = (int) D.21090;
  if (D.21106 > i) goto <D.20349>; else goto <D.20351>;
  <D.20351>:
  D.21107 = sig->hasthis;
  res->hasthis = D.21107;
  D.21108 = sig->explicit_this;
  res->explicit_this = D.21108;
  D.21109 = sig->call_convention;
  res->call_convention = D.21109;
  D.21110 = sig->pinvoke;
  res->pinvoke = D.21110;
  D.21111 = sig->generic_param_count;
  res->generic_param_count = D.21111;
  D.21112 = sig->sentinelpos;
  res->sentinelpos = D.21112;
  D.21113 = (unsigned char) is_open;
  D.21114 = (<unnamed-unsigned:1>) D.21113;
  res->has_type_parameters = D.21114;
  res->is_inflated = 1;
  D.21089 = res;
  return D.21089;
  fail:
  D.21098 = res->ret;
  if (D.21098 != 0B) goto <D.21115>; else goto <D.21116>;
  <D.21115>:
  D.21098 = res->ret;
  mono_metadata_free_type (D.21098);
  <D.21116>:
  i = 0;
  goto <D.20353>;
  <D.20352>:
  D.21105 = res->params[i];
  if (D.21105 != 0B) goto <D.21117>; else goto <D.21118>;
  <D.21117>:
  D.21105 = res->params[i];
  mono_metadata_free_type (D.21105);
  <D.21118>:
  i = i + 1;
  <D.20353>:
  D.21090 = sig->param_count;
  D.21106 = (int) D.21090;
  if (D.21106 > i) goto <D.20352>; else goto <D.20354>;
  <D.20354>:
  monoeg_g_free (res);
  D.21089 = 0B;
  return D.21089;
}


mono_method_get_signature_full (struct MonoMethod * method, struct MonoImage * image, guint32 token, struct MonoGenericContext * context)
{
  unsigned int D.21120;
  int token.20;
  _Bool D.21122;
  _Bool D.21123;
  _Bool D.21124;
  struct MonoMethodSignature * D.21127;
  short unsigned int D.21132;
  int D.21133;
  int D.21134;
  unsigned char D.21136;
  unsigned char D.21137;
  struct MonoClass * D.21138;
  struct MonoGenericClass * D.21139;
  unsigned char D.21142;
  unsigned char D.21143;
  struct MonoTableInfo * D.21147;
  int D.21148;
  unsigned int D.21149;
  unsigned int sig_idx.21;
  int D.21153;
  unsigned int D.21156;
  unsigned int D.21157;
  char * D.21158;
  gchar * D.21159;
  unsigned int sig_idx.22;
  const char * ptr.23;
  const char * ptr.24;
  int D.21165;
  gchar * D.21168;
  int D.21171;
  const char * D.21174;
  gchar * D.21175;
  unsigned int D.21179;
  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.21120 = token >> 24;
      table = (int) D.21120;
      token.20 = (int) token;
      idx = token.20 & 16777215;
      D.21122 = table == 0;
      D.21123 = table == 6;
      D.21124 = D.21122 | D.21123;
      if (D.21124 != 0) goto <D.21125>; else goto <D.21126>;
      <D.21125>:
      D.21127 = mono_method_signature (method);
      return D.21127;
      <D.21126>:
      if (table == 43) goto <D.21128>; else goto <D.21129>;
      <D.21128>:
      D.21132 = method->flags;
      D.21133 = (int) D.21132;
      D.21134 = D.21133 & 8192;
      if (D.21134 != 0) goto <D.21130>; else goto <D.21135>;
      <D.21135>:
      D.21136 = BIT_FIELD_REF <*method, 8, 168>;
      D.21137 = D.21136 & 16;
      if (D.21137 == 0) goto <D.21130>; else goto <D.21131>;
      <D.21130>:
      D.21127 = 0B;
      return D.21127;
      <D.21131>:
      D.21127 = mono_method_signature (method);
      return D.21127;
      <D.21129>:
      D.21138 = method->klass;
      D.21139 = D.21138->generic_class;
      if (D.21139 != 0B) goto <D.21140>; else goto <D.21141>;
      <D.21140>:
      D.21127 = mono_method_signature (method);
      return D.21127;
      <D.21141>:
      D.21142 = BIT_FIELD_REF <*image, 8, 128>;
      D.21143 = D.21142 & 8;
      if (D.21143 != 0) goto <D.21144>; else goto <D.21145>;
      <D.21144>:
      sig = mono_reflection_lookup_signature (image, method, token);
      goto <D.21146>;
      <D.21145>:
      D.21147 = &image->tables[10];
      D.21148 = idx + -1;
      mono_metadata_decode_row (D.21147, D.21148, &cols, 3);
      D.21149 = cols[2];
      sig_idx = (int) D.21149;
      sig_idx.21 = (unsigned int) sig_idx;
      sig = find_cached_memberref_sig (image, sig_idx.21);
      if (sig == 0B) goto <D.21151>; else goto <D.21152>;
      <D.21151>:
      sig_idx.21 = (unsigned int) sig_idx;
      D.21153 = mono_verifier_verify_memberref_method_signature (image, sig_idx.21, 0B);
      if (D.21153 == 0) goto <D.21154>; else goto <D.21155>;
      <D.21154>:
      {
        guint32 class;
        const char * fname;

        D.21156 = cols[0];
        class = D.21156 & 7;
        D.21157 = cols[1];
        fname = mono_metadata_string_heap (image, D.21157);
        D.21158 = image->name;
        D.21159 = monoeg_g_strdup_printf ("Bad method signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, D.21158);
        mono_loader_set_error_bad_image (D.21159);
        D.21127 = 0B;
        return D.21127;
      }
      <D.21155>:
      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.21163>; else goto <D.21164>;
      <D.21163>:
      D.21127 = 0B;
      return D.21127;
      <D.21164>:
      sig_idx.21 = (unsigned int) sig_idx;
      sig = cache_memberref_sig (image, sig_idx.21, sig);
      <D.21152>:
      D.21165 = mono_verifier_is_sig_compatible (image, method, sig);
      if (D.21165 == 0) goto <D.21166>; else goto <D.21167>;
      <D.21166>:
      {
        guint32 class;
        const char * fname;

        D.21156 = cols[0];
        class = D.21156 & 7;
        D.21157 = cols[1];
        fname = mono_metadata_string_heap (image, D.21157);
        D.21158 = image->name;
        D.21168 = monoeg_g_strdup_printf ("Incompatible method signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, D.21158);
        mono_loader_set_error_bad_image (D.21168);
        D.21127 = 0B;
        return D.21127;
      }
      <D.21167>:
      <D.21146>:
      if (context != 0B) goto <D.21169>; else goto <D.21170>;
      <D.21169>:
      {
        struct MonoError error;
        struct MonoMethodSignature * cached;

        try
          {
            sig = inflate_generic_signature_checked (image, sig, context, &error);
            D.21171 = mono_error_ok (&error);
            if (D.21171 == 0) goto <D.21172>; else goto <D.21173>;
            <D.21172>:
            D.21174 = mono_error_get_message (&error);
            D.21175 = monoeg_g_strdup_printf ("Could not inflate signature %s", D.21174);
            mono_loader_set_error_bad_image (D.21175);
            mono_error_cleanup (&error);
            D.21127 = 0B;
            return D.21127;
            <D.21173>:
            cached = mono_metadata_get_inflated_signature (sig, context);
            if (cached != sig) goto <D.21176>; else goto <D.21177>;
            <D.21176>:
            mono_metadata_free_inflated_signature (sig);
            goto <D.21178>;
            <D.21177>:
            D.21179 = mono_metadata_signature_size (cached);
            inflated_signatures_size.25 = inflated_signatures_size;
            inflated_signatures_size.26 = D.21179 + inflated_signatures_size.25;
            inflated_signatures_size = inflated_signatures_size.26;
            <D.21178>:
            sig = cached;
          }
        finally
          {
            error = {CLOBBER};
          }
      }
      <D.21170>:
      D.21127 = sig;
      return D.21127;
    }
  finally
    {
      cols = {CLOBBER};
      ptr = {CLOBBER};
    }
}


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

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


mono_method_search_in_array_class (struct MonoClass * klass, const char * name, struct MonoMethodSignature * sig)
{
  unsigned char D.21188;
  _Bool D.21189;
  long int D.21190;
  long int D.21191;
  struct MonoMethod * * D.21194;
  unsigned int i.27;
  unsigned int D.21196;
  struct MonoMethod * * D.21197;
  int D.20414;
  const char * D.21198;
  short unsigned int D.21201;
  struct MonoMethodSignature * D.21202;
  short unsigned int D.21203;
  struct MonoMethod * D.21206;
  unsigned int i.28;
  unsigned int D.21208;
  int i;

  mono_class_setup_methods (klass);
  D.21188 = klass->exception_type;
  D.21189 = D.21188 != 0;
  D.21190 = (long int) D.21189;
  D.21191 = __builtin_expect (D.21190, 0);
  if (D.21191 != 0) goto <D.21192>; else goto <D.21193>;
  <D.21192>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 932, "!klass->exception_type");
  <D.21193>:
  i = 0;
  goto <D.20416>;
  <D.20415>:
  {
    struct MonoMethod * method;

    D.21194 = klass->methods;
    i.27 = (unsigned int) i;
    D.21196 = i.27 * 4;
    D.21197 = D.21194 + D.21196;
    method = *D.21197;
    {
      size_t __s1_len;
      size_t __s2_len;

      D.21198 = method->name;
      D.20414 = __builtin_strcmp (D.21198, name);
    }
    if (D.20414 == 0) goto <D.21199>; else goto <D.21200>;
    <D.21199>:
    D.21201 = sig->param_count;
    D.21202 = method->signature;
    D.21203 = D.21202->param_count;
    if (D.21201 == D.21203) goto <D.21204>; else goto <D.21205>;
    <D.21204>:
    D.21206 = method;
    return D.21206;
    <D.21205>:
    <D.21200>:
  }
  i = i + 1;
  <D.20416>:
  i.28 = (unsigned int) i;
  D.21208 = klass->method.count;
  if (i.28 < D.21208) goto <D.20415>; else goto <D.20417>;
  <D.20417>:
  D.21206 = 0B;
  return D.21206;
}


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.21246;
  struct MonoDllMap * entry;

  mono_loader_init ();
  mono_loader_lock ();
  if (assembly == 0B) goto <D.21210>; else goto <D.21211>;
  <D.21210>:
  entry = monoeg_malloc0 (20);
  if (dll != 0B) goto <D.21213>; else goto <D.21214>;
  <D.21213>:
  iftmp.29 = monoeg_strdup (dll);
  goto <D.21215>;
  <D.21214>:
  iftmp.29 = 0B;
  <D.21215>:
  entry->dll = iftmp.29;
  if (tdll != 0B) goto <D.21217>; else goto <D.21218>;
  <D.21217>:
  iftmp.30 = monoeg_strdup (tdll);
  goto <D.21219>;
  <D.21218>:
  iftmp.30 = 0B;
  <D.21219>:
  entry->target = iftmp.30;
  if (func != 0B) goto <D.21221>; else goto <D.21222>;
  <D.21221>:
  iftmp.31 = monoeg_strdup (func);
  goto <D.21223>;
  <D.21222>:
  iftmp.31 = 0B;
  <D.21223>:
  entry->func = iftmp.31;
  if (tfunc != 0B) goto <D.21225>; else goto <D.21226>;
  <D.21225>:
  iftmp.32 = monoeg_strdup (tfunc);
  goto <D.21227>;
  <D.21226>:
  iftmp.32 = 0B;
  <D.21227>:
  entry->target_func = iftmp.32;
  global_dll_map.33 = global_dll_map;
  entry->next = global_dll_map.33;
  global_dll_map = entry;
  goto <D.21229>;
  <D.21211>:
  entry = mono_image_alloc0 (assembly, 20);
  if (dll != 0B) goto <D.21231>; else goto <D.21232>;
  <D.21231>:
  iftmp.34 = mono_image_strdup (assembly, dll);
  goto <D.21233>;
  <D.21232>:
  iftmp.34 = 0B;
  <D.21233>:
  entry->dll = iftmp.34;
  if (tdll != 0B) goto <D.21235>; else goto <D.21236>;
  <D.21235>:
  iftmp.35 = mono_image_strdup (assembly, tdll);
  goto <D.21237>;
  <D.21236>:
  iftmp.35 = 0B;
  <D.21237>:
  entry->target = iftmp.35;
  if (func != 0B) goto <D.21239>; else goto <D.21240>;
  <D.21239>:
  iftmp.36 = mono_image_strdup (assembly, func);
  goto <D.21241>;
  <D.21240>:
  iftmp.36 = 0B;
  <D.21241>:
  entry->func = iftmp.36;
  if (tfunc != 0B) goto <D.21243>; else goto <D.21244>;
  <D.21243>:
  iftmp.37 = mono_image_strdup (assembly, tfunc);
  goto <D.21245>;
  <D.21244>:
  iftmp.37 = 0B;
  <D.21245>:
  entry->target_func = iftmp.37;
  D.21246 = assembly->dll_map;
  entry->next = D.21246;
  assembly->dll_map = entry;
  <D.21229>:
  mono_loader_unlock ();
}


mono_lookup_pinvoke_call (struct MonoMethod * method, const char * * exc_class, const char * * exc_arg)
{
  struct MonoClass * D.21247;
  short unsigned int D.21248;
  int D.21249;
  int D.21250;
  _Bool D.21251;
  long int D.21252;
  long int D.21253;
  void * D.21258;
  void * D.21261;
  struct MonoImage * D.21262;
  unsigned char D.21263;
  unsigned char D.21264;
  struct GHashTable * D.21267;
  char * import.38;
  short unsigned int D.21274;
  int D.21276;
  <unnamed-unsigned:24> D.21277;
  int D.21278;
  int D.21279;
  unsigned int D.21282;
  <unnamed-unsigned:24> D.21284;
  unsigned int D.21285;
  unsigned int D.21286;
  short unsigned int D.21287;
  unsigned int D.21288;
  const char * import.39;
  unsigned int D.21290;
  int D.21291;
  const char * import.40;
  struct GHashTable * D.21295;
  struct GHashTable * D.21298;
  struct GHashTable * D.21299;
  const char * new_scope.41;
  struct GHashTable * D.21301;
  int D.20575;
  int iftmp.42;
  int D.20574;
  const char[11] * D.21311;
  unsigned char D.21312;
  int D.21313;
  unsigned char D.21314;
  int D.21315;
  _Bool D.21316;
  _Bool D.21317;
  _Bool D.21318;
  const unsigned char * D.21321;
  unsigned char D.21322;
  int D.21323;
  const unsigned char * D.21324;
  unsigned char D.21325;
  int D.21326;
  _Bool D.21327;
  _Bool D.21328;
  const unsigned char * D.21331;
  unsigned char D.21332;
  int D.21333;
  const unsigned char * D.21334;
  unsigned char D.21335;
  int D.21336;
  _Bool D.21337;
  _Bool D.21338;
  const unsigned char * D.21341;
  unsigned char D.21342;
  int D.21343;
  const unsigned char * D.21344;
  unsigned char D.21345;
  int D.21346;
  struct MonoDl * internal_module.43;
  struct MonoDl * internal_module.44;
  char * D.21354;
  unsigned int D.21355;
  sizetype D.21356;
  const char * D.21357;
  unsigned int D.21360;
  sizetype D.21361;
  char * D.21362;
  char * D.21366;
  char * D.21370;
  int D.21376;
  int D.21378;
  int D.21380;
  int D.21382;
  _Bool D.21389;
  _Bool D.21390;
  _Bool D.21391;
  char * error_msg.45;
  _Bool D.21398;
  _Bool D.21399;
  char * D.21402;
  char * iftmp.46;
  void * D.21431;
  gchar * D.21434;
  gchar * D.21435;
  gchar * D.21436;
  short unsigned int D.21437;
  int D.21438;
  int D.21439;
  void * * D.21442;
  char * error_msg.47;
  int D.21447;
  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.21247 = method->klass;
      image = D.21247->image;
      piinfo = method;
      tables = &image->tables;
      im = tables + 336;
      mr = tables + 312;
      import = 0B;
      found_name = 0B;
      module = 0B;
      cached = 0;
      D.21248 = method->flags;
      D.21249 = (int) D.21248;
      D.21250 = D.21249 & 8192;
      D.21251 = D.21250 == 0;
      D.21252 = (long int) D.21251;
      D.21253 = __builtin_expect (D.21252, 0);
      if (D.21253 != 0) goto <D.21254>; else goto <D.21255>;
      <D.21254>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1344, "method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL");
      <D.21255>:
      if (exc_class != 0B) goto <D.21256>; else goto <D.21257>;
      <D.21256>:
      *exc_class = 0B;
      *exc_arg = 0B;
      <D.21257>:
      D.21258 = piinfo->addr;
      if (D.21258 != 0B) goto <D.21259>; else goto <D.21260>;
      <D.21259>:
      D.21261 = piinfo->addr;
      return D.21261;
      <D.21260>:
      D.21247 = method->klass;
      D.21262 = D.21247->image;
      D.21263 = BIT_FIELD_REF <*D.21262, 8, 128>;
      D.21264 = D.21263 & 8;
      if (D.21264 != 0) goto <D.21265>; else goto <D.21266>;
      <D.21265>:
      {
        struct MonoReflectionMethodAux * method_aux;

        D.21247 = method->klass;
        D.21262 = D.21247->image;
        D.21267 = MEM[(struct MonoDynamicImage *)D.21262].method_aux_hash;
        method_aux = monoeg_g_hash_table_lookup (D.21267, method);
        if (method_aux == 0B) goto <D.21268>; else goto <D.21269>;
        <D.21268>:
        D.21261 = 0B;
        return D.21261;
        <D.21269>:
        import.38 = method_aux->dllentry;
        import = import.38;
        orig_scope = method_aux->dll;
      }
      goto <D.21271>;
      <D.21266>:
      D.21274 = piinfo->implmap_idx;
      if (D.21274 == 0) goto <D.21272>; else goto <D.21275>;
      <D.21275>:
      D.21274 = piinfo->implmap_idx;
      D.21276 = (int) D.21274;
      D.21277 = im->rows;
      D.21278 = (int) D.21277;
      if (D.21276 > D.21278) goto <D.21272>; else goto <D.21273>;
      <D.21272>:
      D.21261 = 0B;
      return D.21261;
      <D.21273>:
      D.21274 = piinfo->implmap_idx;
      D.21276 = (int) D.21274;
      D.21279 = D.21276 + -1;
      mono_metadata_decode_row (im, D.21279, &im_cols, 4);
      D.21282 = im_cols[3];
      if (D.21282 == 0) goto <D.21280>; else goto <D.21283>;
      <D.21283>:
      D.21282 = im_cols[3];
      D.21284 = mr->rows;
      D.21285 = (unsigned int) D.21284;
      if (D.21282 > D.21285) goto <D.21280>; else goto <D.21281>;
      <D.21280>:
      D.21261 = 0B;
      return D.21261;
      <D.21281>:
      D.21286 = im_cols[0];
      D.21287 = (short unsigned int) D.21286;
      piinfo->piflags = D.21287;
      D.21288 = im_cols[2];
      import.39 = mono_metadata_string_heap (image, D.21288);
      import = import.39;
      D.21282 = im_cols[3];
      D.21290 = D.21282 + 4294967295;
      D.21291 = (int) D.21290;
      scope_token = mono_metadata_decode_row_col (mr, D.21291, 0);
      orig_scope = mono_metadata_string_heap (image, scope_token);
      <D.21271>:
      import.40 = import;
      mono_dllmap_lookup (image, orig_scope, import.40, &new_scope, &import);
      if (module == 0B) goto <D.21293>; else goto <D.21294>;
      <D.21293>:
      mono_loader_lock ();
      D.21295 = image->pinvoke_scopes;
      if (D.21295 == 0B) goto <D.21296>; else goto <D.21297>;
      <D.21296>:
      D.21298 = monoeg_g_hash_table_new_full (monoeg_g_str_hash, monoeg_g_str_equal, monoeg_g_free, 0B);
      image->pinvoke_scopes = D.21298;
      D.21299 = 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.21299;
      <D.21297>:
      D.21295 = image->pinvoke_scopes;
      new_scope.41 = new_scope;
      module = monoeg_g_hash_table_lookup (D.21295, new_scope.41);
      D.21301 = image->pinvoke_scope_filenames;
      new_scope.41 = new_scope;
      found_name = monoeg_g_hash_table_lookup (D.21301, new_scope.41);
      mono_loader_unlock ();
      if (module != 0B) goto <D.21302>; else goto <D.21303>;
      <D.21302>:
      cached = 1;
      <D.21303>:
      if (found_name != 0B) goto <D.21304>; else goto <D.21305>;
      <D.21304>:
      found_name = monoeg_strdup (found_name);
      <D.21305>:
      <D.21294>:
      if (module == 0B) goto <D.21306>; else goto <D.21307>;
      <D.21306>:
      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.21309>; else goto <D.21310>;
        <D.21309>:
        {
          const unsigned char * __s2;
          int __result;

          __s2 = new_scope;
          D.21311 = "__Internal";
          D.21312 = MEM[(const unsigned char *)D.21311];
          D.21313 = (int) D.21312;
          D.21314 = *__s2;
          D.21315 = (int) D.21314;
          __result = D.21313 - D.21315;
          {
            D.21316 = __s2_len != 0;
            D.21317 = __result == 0;
            D.21318 = D.21316 & D.21317;
            if (D.21318 != 0) goto <D.21319>; else goto <D.21320>;
            <D.21319>:
            D.21321 = &MEM[(void *)"__Internal" + 1B];
            D.21322 = *D.21321;
            D.21323 = (int) D.21322;
            D.21324 = __s2 + 1;
            D.21325 = *D.21324;
            D.21326 = (int) D.21325;
            __result = D.21323 - D.21326;
            D.21327 = __s2_len > 1;
            D.21317 = __result == 0;
            D.21328 = D.21327 & D.21317;
            if (D.21328 != 0) goto <D.21329>; else goto <D.21330>;
            <D.21329>:
            D.21331 = &MEM[(void *)"__Internal" + 2B];
            D.21332 = *D.21331;
            D.21333 = (int) D.21332;
            D.21334 = __s2 + 2;
            D.21335 = *D.21334;
            D.21336 = (int) D.21335;
            __result = D.21333 - D.21336;
            D.21337 = __s2_len > 2;
            D.21317 = __result == 0;
            D.21338 = D.21337 & D.21317;
            if (D.21338 != 0) goto <D.21339>; else goto <D.21340>;
            <D.21339>:
            D.21341 = &MEM[(void *)"__Internal" + 3B];
            D.21342 = *D.21341;
            D.21343 = (int) D.21342;
            D.21344 = __s2 + 3;
            D.21345 = *D.21344;
            D.21346 = (int) D.21345;
            __result = D.21343 - D.21346;
            <D.21340>:
            <D.21330>:
            <D.21320>:
          }
          D.20574 = __result;
        }
        iftmp.42 = -D.20574;
        goto <D.21347>;
        <D.21310>:
        new_scope.41 = new_scope;
        iftmp.42 = __builtin_strcmp (new_scope.41, "__Internal");
        <D.21347>:
        D.20575 = iftmp.42;
      }
      if (D.20575 == 0) goto <D.21348>; else goto <D.21349>;
      <D.21348>:
      internal_module.43 = internal_module;
      if (internal_module.43 == 0B) goto <D.21351>; else goto <D.21352>;
      <D.21351>:
      internal_module.44 = mono_dl_open (0B, 1, &error_msg);
      internal_module = internal_module.44;
      <D.21352>:
      module = internal_module;
      <D.21349>:
      <D.21307>:
      i = 0;
      goto <D.20598>;
      <D.20597>:
      {
        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.20585>, case 0: <D.20579>, case 1: <D.20581>, case 2: <D.20583>>
        <D.20579>:
        new_scope.41 = new_scope;
        file_name = monoeg_strdup (new_scope.41);
        goto <D.20580>;
        <D.20581>:
        new_scope.41 = new_scope;
        D.21354 = strstr (new_scope.41, ".dll");
        new_scope.41 = new_scope;
        new_scope.41 = new_scope;
        D.21355 = strlen (new_scope.41);
        D.21356 = D.21355 + 4294967292;
        D.21357 = new_scope.41 + D.21356;
        if (D.21354 == D.21357) goto <D.21358>; else goto <D.21359>;
        <D.21358>:
        new_scope.41 = new_scope;
        file_name = monoeg_strdup (new_scope.41);
        new_scope.41 = new_scope;
        D.21360 = strlen (new_scope.41);
        D.21361 = D.21360 + 4294967292;
        D.21362 = file_name + D.21361;
        *D.21362 = 0;
        goto <D.21363>;
        <D.21359>:
        // predicted unlikely by continue predictor.
        goto <D.20582>;
        <D.21363>:
        goto <D.20580>;
        <D.20583>:
        if (is_absolute != 0) goto <D.21364>; else goto <D.21365>;
        <D.21364>:
        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.21366 = strstr (base_name, "lib");
        if (D.21366 != base_name) goto <D.21367>; else goto <D.21368>;
        <D.21367>:
        {
          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.20580>;
        }
        <D.21368>:
        goto <D.21369>;
        <D.21365>:
        new_scope.41 = new_scope;
        D.21370 = strstr (new_scope.41, "lib");
        new_scope.41 = new_scope;
        if (D.21370 != new_scope.41) goto <D.21371>; else goto <D.21372>;
        <D.21371>:
        new_scope.41 = new_scope;
        file_name = monoeg_g_strdup_printf ("lib%s", new_scope.41);
        goto <D.20580>;
        <D.21372>:
        <D.21369>:
        // predicted unlikely by continue predictor.
        goto <D.20582>;
        <D.20585>:
        new_scope.41 = new_scope;
        D.21376 = monoeg_ascii_strcasecmp ("user32.dll", new_scope.41);
        if (D.21376 == 0) goto <D.21373>; else goto <D.21377>;
        <D.21377>:
        new_scope.41 = new_scope;
        D.21378 = monoeg_ascii_strcasecmp ("kernel32.dll", new_scope.41);
        if (D.21378 == 0) goto <D.21373>; else goto <D.21379>;
        <D.21379>:
        new_scope.41 = new_scope;
        D.21380 = monoeg_ascii_strcasecmp ("user32", new_scope.41);
        if (D.21380 == 0) goto <D.21373>; else goto <D.21381>;
        <D.21381>:
        new_scope.41 = new_scope;
        D.21382 = monoeg_ascii_strcasecmp ("kernel", new_scope.41);
        if (D.21382 == 0) goto <D.21373>; else goto <D.21374>;
        <D.21373>:
        file_name = monoeg_strdup ("libMonoSupportW.so");
        goto <D.21375>;
        <D.21374>:
        // predicted unlikely by continue predictor.
        goto <D.20582>;
        <D.21375>:
        goto <D.20580>;
        <D.20580>:
        if (is_absolute != 0) goto <D.21383>; else goto <D.21384>;
        <D.21383>:
        if (dir_name == 0B) goto <D.21385>; else goto <D.21386>;
        <D.21385>:
        dir_name = monoeg_g_path_get_dirname (file_name);
        <D.21386>:
        if (base_name == 0B) goto <D.21387>; else goto <D.21388>;
        <D.21387>:
        base_name = monoeg_g_path_get_basename (file_name);
        <D.21388>:
        <D.21384>:
        D.21389 = module == 0B;
        D.21390 = is_absolute != 0;
        D.21391 = D.21389 & D.21390;
        if (D.21391 != 0) goto <D.21392>; else goto <D.21393>;
        <D.21392>:
        module = cached_module_load (file_name, 1, &error_msg);
        if (module == 0B) goto <D.21394>; else goto <D.21395>;
        <D.21394>:
        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.21397>;
        <D.21395>:
        found_name = monoeg_strdup (file_name);
        <D.21397>:
        <D.21393>:
        D.21389 = module == 0B;
        D.21398 = is_absolute == 0;
        D.21399 = D.21389 & D.21398;
        if (D.21399 != 0) goto <D.21400>; else goto <D.21401>;
        <D.21400>:
        {
          void * iter;
          char * mdirname;

          try
            {
              iter = 0B;
              D.21402 = image->name;
              mdirname = monoeg_g_path_get_dirname (D.21402);
              goto <D.20590>;
              <D.20589>:
              module = cached_module_load (full_name, 1, &error_msg);
              if (module == 0B) goto <D.21403>; else goto <D.21404>;
              <D.21403>:
              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.21405>;
              <D.21404>:
              found_name = monoeg_strdup (full_name);
              <D.21405>:
              monoeg_g_free (full_name);
              if (module != 0B) goto <D.20588>; else goto <D.21406>;
              <D.21406>:
              <D.20590>:
              full_name = mono_dl_build_path (mdirname, file_name, &iter);
              if (full_name != 0B) goto <D.20589>; else goto <D.20588>;
              <D.20588>:
              monoeg_g_free (mdirname);
            }
          finally
            {
              iter = {CLOBBER};
            }
        }
        <D.21401>:
        if (module == 0B) goto <D.21407>; else goto <D.21408>;
        <D.21407>:
        {
          void * iter;
          char * file_or_base;

          try
            {
              iter = 0B;
              if (is_absolute != 0) goto <D.21410>; else goto <D.21411>;
              <D.21410>:
              iftmp.46 = base_name;
              goto <D.21412>;
              <D.21411>:
              iftmp.46 = file_name;
              <D.21412>:
              file_or_base = iftmp.46;
              goto <D.20595>;
              <D.20594>:
              module = cached_module_load (full_name, 1, &error_msg);
              if (module == 0B) goto <D.21413>; else goto <D.21414>;
              <D.21413>:
              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.21415>;
              <D.21414>:
              found_name = monoeg_strdup (full_name);
              <D.21415>:
              monoeg_g_free (full_name);
              if (module != 0B) goto <D.20593>; else goto <D.21416>;
              <D.21416>:
              <D.20595>:
              full_name = mono_dl_build_path (dir_name, file_or_base, &iter);
              if (full_name != 0B) goto <D.20594>; else goto <D.20593>;
              <D.20593>:
            }
          finally
            {
              iter = {CLOBBER};
            }
        }
        <D.21408>:
        if (module == 0B) goto <D.21417>; else goto <D.21418>;
        <D.21417>:
        module = cached_module_load (file_name, 1, &error_msg);
        if (module == 0B) goto <D.21419>; else goto <D.21420>;
        <D.21419>:
        error_msg.45 = error_msg;
        mono_trace (64, 4, "DllImport error loading library \'%s\': \'%s\'.", file_name, error_msg.45);
        goto <D.21421>;
        <D.21420>:
        found_name = monoeg_strdup (file_name);
        <D.21421>:
        <D.21418>:
        monoeg_g_free (file_name);
        if (is_absolute != 0) goto <D.21422>; else goto <D.21423>;
        <D.21422>:
        monoeg_g_free (base_name);
        monoeg_g_free (dir_name);
        <D.21423>:
        if (module != 0B) goto <D.20596>; else goto <D.21424>;
        <D.21424>:
      }
      <D.20582>:
      i = i + 1;
      <D.20598>:
      if (i <= 3) goto <D.20597>; else goto <D.20596>;
      <D.20596>:
      if (module == 0B) goto <D.21425>; else goto <D.21426>;
      <D.21425>:
      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.21427>; else goto <D.21428>;
      <D.21427>:
      *exc_class = "DllNotFoundException";
      new_scope.41 = new_scope;
      *exc_arg = new_scope.41;
      <D.21428>:
      D.21261 = 0B;
      return D.21261;
      <D.21426>:
      if (cached == 0) goto <D.21429>; else goto <D.21430>;
      <D.21429>:
      mono_trace (64, 4, "DllImport loaded library \'%s\'.", found_name);
      mono_loader_lock ();
      D.21295 = image->pinvoke_scopes;
      new_scope.41 = new_scope;
      D.21431 = monoeg_g_hash_table_lookup (D.21295, new_scope.41);
      if (D.21431 == 0B) goto <D.21432>; else goto <D.21433>;
      <D.21432>:
      D.21295 = image->pinvoke_scopes;
      new_scope.41 = new_scope;
      D.21434 = monoeg_strdup (new_scope.41);
      monoeg_g_hash_table_insert_replace (D.21295, D.21434, module, 0);
      D.21301 = image->pinvoke_scope_filenames;
      new_scope.41 = new_scope;
      D.21435 = monoeg_strdup (new_scope.41);
      D.21436 = monoeg_strdup (found_name);
      monoeg_g_hash_table_insert_replace (D.21301, D.21435, D.21436, 0);
      <D.21433>:
      mono_loader_unlock ();
      <D.21430>:
      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.21437 = piinfo->piflags;
      D.21438 = (int) D.21437;
      D.21439 = D.21438 & 1;
      if (D.21439 != 0) goto <D.21440>; else goto <D.21441>;
      <D.21440>:
      import.40 = import;
      D.21442 = &piinfo->addr;
      error_msg.47 = mono_dl_symbol (module, import.40, D.21442);
      error_msg = error_msg.47;
      goto <D.21444>;
      <D.21441>:
      {
        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.20618>;
        <D.20617>:
        mangle_stdcall = 0;
        goto <D.20615>;
        <D.20614>:
        {
          gboolean need_param_count;

          need_param_count = 0;
          mangle_param_count = 0;
          goto <D.20612>;
          <D.20611>:
          D.21258 = piinfo->addr;
          if (D.21258 != 0B) goto <D.21445>; else goto <D.21446>;
          <D.21445>:
          // predicted unlikely by continue predictor.
          goto <D.20605>;
          <D.21446>:
          mangled_name = import;
          D.21437 = piinfo->piflags;
          D.21438 = (int) D.21437;
          D.21447 = D.21438 & 6;
          switch (D.21447) <default: <D.20610>, case 2: <D.20609>, case 4: <D.20606>, case 6: <D.20608>>
          <D.20606>:
          if (mangle_charset == 0) goto <D.21448>; else goto <D.21449>;
          <D.21448>:
          import.40 = import;
          mangled_name = monoeg_g_strconcat (import.40, "W", 0B);
          <D.21449>:
          goto <D.20607>;
          <D.20608>:
          if (mangle_charset == 1) goto <D.21450>; else goto <D.21451>;
          <D.21450>:
          import.40 = import;
          mangled_name = monoeg_g_strconcat (import.40, "A", 0B);
          <D.21451>:
          goto <D.20607>;
          <D.20609>:
          <D.20610>:
          if (mangle_charset == 1) goto <D.21452>; else goto <D.21453>;
          <D.21452>:
          import.40 = import;
          mangled_name = monoeg_g_strconcat (import.40, "A", 0B);
          <D.21453>:
          goto <D.20607>;
          <D.20607>:
          mangled_name2 = mangled_name;
          mono_trace (64, 4, "Probing \'%s\'.", mangled_name2);
          D.21442 = &piinfo->addr;
          error_msg.48 = mono_dl_symbol (module, mangled_name2, D.21442);
          error_msg = error_msg.48;
          error_msg.45 = error_msg;
          monoeg_g_free (error_msg.45);
          error_msg = 0B;
          D.21258 = piinfo->addr;
          if (D.21258 != 0B) goto <D.21455>; else goto <D.21456>;
          <D.21455>:
          mono_trace (64, 4, "Found as \'%s\'.", mangled_name2);
          <D.21456>:
          if (mangled_name != mangled_name2) goto <D.21457>; else goto <D.21458>;
          <D.21457>:
          monoeg_g_free (mangled_name2);
          <D.21458>:
          import.40 = import;
          if (mangled_name != import.40) goto <D.21459>; else goto <D.21460>;
          <D.21459>:
          monoeg_g_free (mangled_name);
          <D.21460>:
          <D.20605>:
          mangle_param_count = mangle_param_count + 4;
          <D.20612>:
          if (need_param_count != 0) goto <D.21462>; else goto <D.21463>;
          <D.21462>:
          iftmp.49 = 256;
          goto <D.21464>;
          <D.21463>:
          iftmp.49 = 0;
          <D.21464>:
          if (iftmp.49 >= mangle_param_count) goto <D.20611>; else goto <D.20613>;
          <D.20613>:
        }
        mangle_stdcall = mangle_stdcall + 1;
        <D.20615>:
        if (mangle_stdcall <= 1) goto <D.20614>; else goto <D.20616>;
        <D.20616>:
        mangle_charset = mangle_charset + 1;
        <D.20618>:
        if (mangle_charset <= 1) goto <D.20617>; else goto <D.20619>;
        <D.20619>:
      }
      <D.21444>:
      D.21258 = piinfo->addr;
      if (D.21258 == 0B) goto <D.21465>; else goto <D.21466>;
      <D.21465>:
      error_msg.45 = error_msg;
      monoeg_g_free (error_msg.45);
      if (exc_class != 0B) goto <D.21467>; else goto <D.21468>;
      <D.21467>:
      *exc_class = "EntryPointNotFoundException";
      import.40 = import;
      *exc_arg = import.40;
      <D.21468>:
      D.21261 = 0B;
      return D.21261;
      <D.21466>:
      D.21261 = piinfo->addr;
      return D.21261;
    }
  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.21473;
  int D.21478;
  struct MonoDllMap * global_dll_map.50;
  int res;

  if (assembly != 0B) goto <D.21471>; else goto <D.21472>;
  <D.21471>:
  D.21473 = assembly->dll_map;
  if (D.21473 != 0B) goto <D.21474>; else goto <D.21475>;
  <D.21474>:
  D.21473 = assembly->dll_map;
  res = mono_dllmap_lookup_list (D.21473, dll, func, rdll, rfunc);
  if (res != 0) goto <D.21476>; else goto <D.21477>;
  <D.21476>:
  D.21478 = res;
  return D.21478;
  <D.21477>:
  <D.21475>:
  <D.21472>:
  global_dll_map.50 = global_dll_map;
  D.21478 = mono_dllmap_lookup_list (global_dll_map.50, dll, func, rdll, rfunc);
  return D.21478;
}


mono_dllmap_lookup_list (struct MonoDllMap * dll_map, const char * dll, const char * func, const char * * rdll, const char * * rfunc)
{
  int D.21483;
  char * D.21486;
  char D.21487;
  char * D.21489;
  char D.21490;
  const gchar * D.21492;
  int D.21493;
  int D.20494;
  char * D.21500;
  char * D.21503;
  int D.20503;
  char * D.21508;
  int found;

  found = 0;
  *rdll = dll;
  if (dll_map == 0B) goto <D.21481>; else goto <D.21482>;
  <D.21481>:
  D.21483 = 0;
  return D.21483;
  <D.21482>:
  mono_loader_lock ();
  goto <D.20506>;
  <D.20505>:
  D.21486 = dll_map->dll;
  D.21487 = *D.21486;
  if (D.21487 == 105) goto <D.21488>; else goto <D.21484>;
  <D.21488>:
  D.21486 = dll_map->dll;
  D.21489 = D.21486 + 1;
  D.21490 = *D.21489;
  if (D.21490 == 58) goto <D.21491>; else goto <D.21484>;
  <D.21491>:
  D.21486 = dll_map->dll;
  D.21492 = D.21486 + 2;
  D.21493 = monoeg_ascii_strcasecmp (D.21492, dll);
  if (D.21493 != 0) goto <D.21494>; else goto <D.21495>;
  <D.21494>:
  // predicted unlikely by continue predictor.
  goto <D.20485>;
  <D.21495>:
  goto <D.21485>;
  <D.21484>:
  {
    size_t __s1_len;
    size_t __s2_len;

    D.21486 = dll_map->dll;
    D.20494 = __builtin_strcmp (D.21486, dll);
  }
  if (D.20494 != 0) goto <D.21496>; else goto <D.21497>;
  <D.21496>:
  // predicted unlikely by continue predictor.
  goto <D.20485>;
  <D.21497>:
  <D.21485>:
  if (found == 0) goto <D.21498>; else goto <D.21499>;
  <D.21498>:
  D.21500 = dll_map->target;
  if (D.21500 != 0B) goto <D.21501>; else goto <D.21502>;
  <D.21501>:
  D.21500 = dll_map->target;
  *rdll = D.21500;
  found = 1;
  <D.21502>:
  <D.21499>:
  D.21503 = dll_map->func;
  if (D.21503 != 0B) goto <D.21504>; else goto <D.21505>;
  <D.21504>:
  {
    size_t __s1_len;
    size_t __s2_len;

    D.21503 = dll_map->func;
    D.20503 = __builtin_strcmp (D.21503, func);
  }
  if (D.20503 == 0) goto <D.21506>; else goto <D.21507>;
  <D.21506>:
  D.21508 = dll_map->target_func;
  *rfunc = D.21508;
  goto <D.20504>;
  <D.21507>:
  <D.21505>:
  <D.20485>:
  dll_map = dll_map->next;
  <D.20506>:
  if (dll_map != 0B) goto <D.20505>; else goto <D.20504>;
  <D.20504>:
  mono_loader_unlock ();
  D.21483 = found;
  return D.21483;
}


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

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


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.21520;
  gchar * D.21523;
  struct MonoDl * res;

  if (err != 0B) goto <D.21512>; else goto <D.21513>;
  <D.21512>:
  *err = 0B;
  <D.21513>:
  mono_loader_lock ();
  global_module_map.51 = global_module_map;
  if (global_module_map.51 == 0B) goto <D.21515>; else goto <D.21516>;
  <D.21515>:
  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.21516>:
  global_module_map.51 = global_module_map;
  res = monoeg_g_hash_table_lookup (global_module_map.51, name);
  if (res != 0B) goto <D.21518>; else goto <D.21519>;
  <D.21518>:
  mono_loader_unlock ();
  D.21520 = res;
  return D.21520;
  <D.21519>:
  res = mono_dl_open (name, flags, err);
  if (res != 0B) goto <D.21521>; else goto <D.21522>;
  <D.21521>:
  global_module_map.51 = global_module_map;
  D.21523 = monoeg_strdup (name);
  monoeg_g_hash_table_insert_replace (global_module_map.51, D.21523, res, 0);
  <D.21522>:
  mono_loader_unlock ();
  D.21520 = res;
  return D.21520;
}


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

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


mono_get_method_full (struct MonoImage * image, guint32 token, struct MonoClass * klass, struct MonoGenericContext * context)
{
  unsigned int D.21527;
  struct GHashTable * D.21530;
  struct GHashTable * D.21533;
  unsigned int D.21534;
  const void * D.21535;
  unsigned char D.21537;
  unsigned char D.21538;
  struct GHashTable * D.21541;
  struct GHashTable * D.21544;
  const void * token.53;
  struct MonoMethod * D.21548;
  int used_context.54;
  unsigned char D.21554;
  unsigned char D.21555;
  void * D.21567;
  void * token.55;
  struct MonoMethod * result;
  gboolean used_context;

  try
    {
      result = 0B;
      used_context = 0;
      mono_image_lock (image);
      D.21527 = token >> 24;
      if (D.21527 == 6) goto <D.21528>; else goto <D.21529>;
      <D.21528>:
      D.21530 = image->method_cache;
      if (D.21530 == 0B) goto <D.21531>; else goto <D.21532>;
      <D.21531>:
      D.21533 = monoeg_g_hash_table_new (0B, 0B);
      image->method_cache = D.21533;
      <D.21532>:
      D.21530 = image->method_cache;
      D.21534 = token & 16777215;
      D.21535 = (const void *) D.21534;
      result = monoeg_g_hash_table_lookup (D.21530, D.21535);
      goto <D.21536>;
      <D.21529>:
      D.21537 = BIT_FIELD_REF <*image, 8, 128>;
      D.21538 = D.21537 & 8;
      if (D.21538 == 0) goto <D.21539>; else goto <D.21540>;
      <D.21539>:
      D.21541 = image->methodref_cache;
      if (D.21541 == 0B) goto <D.21542>; else goto <D.21543>;
      <D.21542>:
      D.21544 = monoeg_g_hash_table_new (0B, 0B);
      image->methodref_cache = D.21544;
      <D.21543>:
      D.21541 = image->methodref_cache;
      token.53 = (const void *) token;
      result = monoeg_g_hash_table_lookup (D.21541, token.53);
      <D.21540>:
      <D.21536>:
      mono_image_unlock (image);
      if (result != 0B) goto <D.21546>; else goto <D.21547>;
      <D.21546>:
      D.21548 = result;
      return D.21548;
      <D.21547>:
      result = mono_get_method_from_token (image, token, klass, context, &used_context);
      if (result == 0B) goto <D.21549>; else goto <D.21550>;
      <D.21549>:
      D.21548 = 0B;
      return D.21548;
      <D.21550>:
      mono_image_lock (image);
      used_context.54 = used_context;
      if (used_context.54 == 0) goto <D.21552>; else goto <D.21553>;
      <D.21552>:
      D.21554 = BIT_FIELD_REF <*result, 8, 168>;
      D.21555 = D.21554 & 16;
      if (D.21555 == 0) goto <D.21556>; else goto <D.21557>;
      <D.21556>:
      {
        struct MonoMethod * result2;

        result2 = 0B;
        D.21527 = token >> 24;
        if (D.21527 == 6) goto <D.21558>; else goto <D.21559>;
        <D.21558>:
        D.21530 = image->method_cache;
        D.21534 = token & 16777215;
        D.21535 = (const void *) D.21534;
        result2 = monoeg_g_hash_table_lookup (D.21530, D.21535);
        goto <D.21560>;
        <D.21559>:
        D.21537 = BIT_FIELD_REF <*image, 8, 128>;
        D.21538 = D.21537 & 8;
        if (D.21538 == 0) goto <D.21561>; else goto <D.21562>;
        <D.21561>:
        D.21541 = image->methodref_cache;
        token.53 = (const void *) token;
        result2 = monoeg_g_hash_table_lookup (D.21541, token.53);
        <D.21562>:
        <D.21560>:
        if (result2 != 0B) goto <D.21563>; else goto <D.21564>;
        <D.21563>:
        mono_image_unlock (image);
        D.21548 = result2;
        return D.21548;
        <D.21564>:
        D.21527 = token >> 24;
        if (D.21527 == 6) goto <D.21565>; else goto <D.21566>;
        <D.21565>:
        D.21530 = image->method_cache;
        D.21534 = token & 16777215;
        D.21567 = (void *) D.21534;
        monoeg_g_hash_table_insert_replace (D.21530, D.21567, result, 0);
        goto <D.21568>;
        <D.21566>:
        D.21537 = BIT_FIELD_REF <*image, 8, 128>;
        D.21538 = D.21537 & 8;
        if (D.21538 == 0) goto <D.21569>; else goto <D.21570>;
        <D.21569>:
        D.21541 = image->methodref_cache;
        token.55 = (void *) token;
        monoeg_g_hash_table_insert_replace (D.21541, token.55, result, 0);
        <D.21570>:
        <D.21568>:
      }
      <D.21557>:
      <D.21553>:
      mono_image_unlock (image);
      D.21548 = result;
      return D.21548;
    }
  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.21574;
  int token.56;
  unsigned char D.21576;
  unsigned char D.21577;
  struct MonoClass * D.21582;
  struct MonoClass * handle_class.57;
  char * D.21586;
  gchar * D.21587;
  struct MonoMethod * D.21588;
  unsigned int idx.58;
  gchar * D.21598;
  <unnamed-unsigned:24> D.21601;
  int D.21602;
  gchar * D.21605;
  struct MonoTableInfo * D.21606;
  int D.21607;
  unsigned int D.21611;
  unsigned int D.21612;
  unsigned int D.21614;
  unsigned int D.21615;
  unsigned int methods_size.59;
  unsigned int methods_size.60;
  long unsigned int D.21618;
  long unsigned int D.21619;
  unsigned int D.21624;
  short unsigned int D.21627;
  short unsigned int D.21628;
  unsigned int D.21629;
  const char * D.21630;
  const char * sig.61;
  unsigned int D.21634;
  const char * sig.62;
  unsigned int D.21636;
  char D.21637;
  int D.21638;
  int D.21639;
  int D.21644;
  struct MonoClass * D.21649;
  struct MonoClass * D.21650;
  int D.20646;
  int iftmp.63;
  int D.20645;
  const char[6] * D.21656;
  unsigned char D.21657;
  int D.21658;
  unsigned char D.21659;
  int D.21660;
  _Bool D.21661;
  _Bool D.21662;
  _Bool D.21663;
  const unsigned char * D.21666;
  unsigned char D.21667;
  int D.21668;
  const unsigned char * D.21669;
  unsigned char D.21670;
  int D.21671;
  _Bool D.21672;
  _Bool D.21673;
  const unsigned char * D.21676;
  unsigned char D.21677;
  int D.21678;
  const unsigned char * D.21679;
  unsigned char D.21680;
  int D.21681;
  _Bool D.21682;
  _Bool D.21683;
  const unsigned char * D.21686;
  unsigned char D.21687;
  int D.21688;
  const unsigned char * D.21689;
  unsigned char D.21690;
  int D.21691;
  const char * D.21693;
  unsigned int D.21699;
  unsigned int D.21700;
  short unsigned int D.21701;
  short unsigned int D.21702;
  const struct MonoTableInfo * D.21705;
  int D.21706;
  int D.21707;
  unsigned int D.21708;
  short unsigned int D.21709;
  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.21574 = token >> 24;
      table = (int) D.21574;
      token.56 = (int) token;
      idx = token.56 & 16777215;
      tables = &image->tables;
      generic_container = 0B;
      container = 0B;
      sig = 0B;
      D.21576 = BIT_FIELD_REF <*image, 8, 128>;
      D.21577 = D.21576 & 8;
      if (D.21577 != 0) goto <D.21578>; else goto <D.21579>;
      <D.21578>:
      {
        struct MonoClass * handle_class;

        try
          {
            result = mono_lookup_dynamic_token_class (image, token, 1, &handle_class, context);
            if (result != 0B) goto <D.21580>; else goto <D.21581>;
            <D.21580>:
            D.21582 = mono_defaults.methodhandle_class;
            handle_class.57 = handle_class;
            if (D.21582 != handle_class.57) goto <D.21584>; else goto <D.21585>;
            <D.21584>:
            D.21586 = image->name;
            D.21587 = monoeg_g_strdup_printf ("Bad method token 0x%08x on image %s.", token, D.21586);
            mono_loader_set_error_bad_image (D.21587);
            D.21588 = 0B;
            return D.21588;
            <D.21585>:
            <D.21581>:
            D.21588 = result;
            return D.21588;
          }
        finally
          {
            handle_class = {CLOBBER};
          }
      }
      <D.21579>:
      if (table != 6) goto <D.21589>; else goto <D.21590>;
      <D.21589>:
      if (table == 43) goto <D.21591>; else goto <D.21592>;
      <D.21591>:
      if (used_context != 0B) goto <D.21593>; else goto <D.21594>;
      <D.21593>:
      *used_context = 1;
      <D.21594>:
      idx.58 = (unsigned int) idx;
      D.21588 = method_from_methodspec (image, context, idx.58);
      return D.21588;
      <D.21592>:
      if (table != 10) goto <D.21596>; else goto <D.21597>;
      <D.21596>:
      monoeg_g_log (0B, 16, "got wrong token: 0x%08x\n", token);
      D.21586 = image->name;
      D.21598 = monoeg_g_strdup_printf ("Bad method token 0x%08x on image %s.", token, D.21586);
      mono_loader_set_error_bad_image (D.21598);
      D.21588 = 0B;
      return D.21588;
      <D.21597>:
      idx.58 = (unsigned int) idx;
      D.21588 = method_from_memberref (image, idx.58, context, used_context);
      return D.21588;
      <D.21590>:
      if (used_context != 0B) goto <D.21599>; else goto <D.21600>;
      <D.21599>:
      *used_context = 0;
      <D.21600>:
      D.21601 = image->tables[6].rows;
      D.21602 = (int) D.21601;
      if (D.21602 < idx) goto <D.21603>; else goto <D.21604>;
      <D.21603>:
      D.21586 = image->name;
      D.21605 = monoeg_g_strdup_printf ("Bad method token 0x%08x on image %s.", token, D.21586);
      mono_loader_set_error_bad_image (D.21605);
      D.21588 = 0B;
      return D.21588;
      <D.21604>:
      D.21606 = &image->tables[6];
      D.21607 = idx + -1;
      mono_metadata_decode_row (D.21606, D.21607, &cols, 6);
      D.21611 = cols[2];
      D.21612 = D.21611 & 8192;
      if (D.21612 != 0) goto <D.21608>; else goto <D.21613>;
      <D.21613>:
      D.21614 = cols[1];
      D.21615 = D.21614 & 4096;
      if (D.21615 != 0) goto <D.21608>; else goto <D.21609>;
      <D.21608>:
      result = mono_image_alloc0 (image, 32);
      goto <D.21610>;
      <D.21609>:
      result = mono_image_alloc0 (image, 24);
      methods_size.59 = methods_size;
      methods_size.60 = methods_size.59 + 24;
      methods_size = methods_size.60;
      <D.21610>:
      D.21618 = mono_stats.method_count;
      D.21619 = D.21618 + 1;
      mono_stats.method_count = D.21619;
      if (klass == 0B) goto <D.21620>; else goto <D.21621>;
      <D.21620>:
      {
        guint32 type;

        type = mono_metadata_typedef_from_method (image, token);
        if (type == 0) goto <D.21622>; else goto <D.21623>;
        <D.21622>:
        D.21588 = 0B;
        return D.21588;
        <D.21623>:
        D.21624 = type | 33554432;
        klass = mono_class_get (image, D.21624);
        if (klass == 0B) goto <D.21625>; else goto <D.21626>;
        <D.21625>:
        D.21588 = 0B;
        return D.21588;
        <D.21626>:
      }
      <D.21621>:
      result->slot = -1;
      result->klass = klass;
      D.21611 = cols[2];
      D.21627 = (short unsigned int) D.21611;
      result->flags = D.21627;
      D.21614 = cols[1];
      D.21628 = (short unsigned int) D.21614;
      result->iflags = D.21628;
      result->token = token;
      D.21629 = cols[3];
      D.21630 = mono_metadata_string_heap (image, D.21629);
      result->name = D.21630;
      sig.61 = sig;
      if (sig.61 == 0B) goto <D.21632>; else goto <D.21633>;
      <D.21632>:
      D.21634 = cols[4];
      sig.62 = mono_metadata_blob_heap (image, D.21634);
      sig = sig.62;
      <D.21633>:
      sig.61 = sig;
      D.21636 = mono_metadata_decode_blob_size (sig.61, &sig);
      size = (int) D.21636;
      container = klass->generic_container;
      sig.61 = sig;
      D.21637 = *sig.61;
      D.21638 = (int) D.21637;
      D.21639 = D.21638 & 16;
      if (D.21639 != 0) goto <D.21640>; else goto <D.21641>;
      <D.21640>:
      generic_container = mono_metadata_load_generic_params (image, token, container);
      <D.21641>:
      if (generic_container != 0B) goto <D.21642>; else goto <D.21643>;
      <D.21642>:
      result->is_generic = 1;
      generic_container->owner.method = result;
      D.21644 = mono_metadata_load_generic_param_constraints_full (image, token, generic_container);
      if (D.21644 == 0) goto <D.21645>; else goto <D.21646>;
      <D.21645>:
      D.21588 = 0B;
      return D.21588;
      <D.21646>:
      container = generic_container;
      <D.21643>:
      D.21614 = cols[1];
      D.21615 = D.21614 & 4096;
      if (D.21615 != 0) goto <D.21647>; else goto <D.21648>;
      <D.21647>:
      D.21649 = result->klass;
      D.21650 = mono_defaults.string_class;
      if (D.21649 == D.21650) goto <D.21651>; else goto <D.21652>;
      <D.21651>:
      {
        size_t __s1_len;
        size_t __s2_len;

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

          __s2 = result->name;
          D.21656 = ".ctor";
          D.21657 = MEM[(const unsigned char *)D.21656];
          D.21658 = (int) D.21657;
          D.21659 = *__s2;
          D.21660 = (int) D.21659;
          __result = D.21658 - D.21660;
          {
            D.21661 = __s2_len != 0;
            D.21662 = __result == 0;
            D.21663 = D.21661 & D.21662;
            if (D.21663 != 0) goto <D.21664>; else goto <D.21665>;
            <D.21664>:
            D.21666 = &MEM[(void *)".ctor" + 1B];
            D.21667 = *D.21666;
            D.21668 = (int) D.21667;
            D.21669 = __s2 + 1;
            D.21670 = *D.21669;
            D.21671 = (int) D.21670;
            __result = D.21668 - D.21671;
            D.21672 = __s2_len > 1;
            D.21662 = __result == 0;
            D.21673 = D.21672 & D.21662;
            if (D.21673 != 0) goto <D.21674>; else goto <D.21675>;
            <D.21674>:
            D.21676 = &MEM[(void *)".ctor" + 2B];
            D.21677 = *D.21676;
            D.21678 = (int) D.21677;
            D.21679 = __s2 + 2;
            D.21680 = *D.21679;
            D.21681 = (int) D.21680;
            __result = D.21678 - D.21681;
            D.21682 = __s2_len > 2;
            D.21662 = __result == 0;
            D.21683 = D.21682 & D.21662;
            if (D.21683 != 0) goto <D.21684>; else goto <D.21685>;
            <D.21684>:
            D.21686 = &MEM[(void *)".ctor" + 3B];
            D.21687 = *D.21686;
            D.21688 = (int) D.21687;
            D.21689 = __s2 + 3;
            D.21690 = *D.21689;
            D.21691 = (int) D.21690;
            __result = D.21688 - D.21691;
            <D.21685>:
            <D.21675>:
            <D.21665>:
          }
          D.20645 = __result;
        }
        iftmp.63 = -D.20645;
        goto <D.21692>;
        <D.21655>:
        D.21693 = result->name;
        iftmp.63 = __builtin_strcmp (D.21693, ".ctor");
        <D.21692>:
        D.20646 = iftmp.63;
      }
      if (D.20646 == 0) goto <D.21694>; else goto <D.21695>;
      <D.21694>:
      result->string_ctor = 1;
      <D.21695>:
      <D.21652>:
      goto <D.21696>;
      <D.21648>:
      D.21611 = cols[2];
      D.21612 = D.21611 & 8192;
      if (D.21612 != 0) goto <D.21697>; else goto <D.21698>;
      <D.21697>:
      {
        struct MonoMethodPInvoke * piinfo;

        piinfo = result;
        D.21607 = idx + -1;
        D.21699 = (unsigned int) D.21607;
        D.21700 = mono_metadata_implmap_from_method (image, D.21699);
        D.21701 = (short unsigned int) D.21700;
        piinfo->implmap_idx = D.21701;
        D.21702 = piinfo->implmap_idx;
        if (D.21702 != 0) goto <D.21703>; else goto <D.21704>;
        <D.21703>:
        D.21705 = tables + 336;
        D.21702 = piinfo->implmap_idx;
        D.21706 = (int) D.21702;
        D.21707 = D.21706 + -1;
        D.21708 = mono_metadata_decode_row_col (D.21705, D.21707, 0);
        D.21709 = (short unsigned int) D.21708;
        piinfo->piflags = D.21709;
        <D.21704>:
      }
      <D.21698>:
      <D.21696>:
      if (generic_container != 0B) goto <D.21710>; else goto <D.21711>;
      <D.21710>:
      mono_method_set_generic_container (result, generic_container);
      <D.21711>:
      D.21588 = result;
      return D.21588;
    }
  finally
    {
      sig = {CLOBBER};
      cols = {CLOBBER};
    }
}


method_from_methodspec (struct MonoImage * image, struct MonoGenericContext * context, guint32 idx)
{
  const struct MonoTableInfo * D.21715;
  unsigned int D.21716;
  int D.21717;
  unsigned int D.21718;
  int D.21719;
  struct MonoMethod * D.21722;
  const char * ptr.64;
  const char * ptr.65;
  const char * ptr.66;
  _Bool D.21726;
  long int D.21727;
  long int D.21728;
  int param_count.67;
  unsigned char D.21736;
  unsigned char D.21737;
  int D.21740;
  unsigned int D.21743;
  unsigned int D.21746;
  struct MonoGenericClass * D.21750;
  unsigned char D.21753;
  unsigned char D.21754;
  _Bool D.21755;
  long int D.21756;
  long int D.21757;
  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.21715 = tables + 516;
      D.21716 = idx + 4294967295;
      D.21717 = (int) D.21716;
      mono_metadata_decode_row (D.21715, D.21717, &cols, 2);
      token = cols[0];
      nindex = token >> 1;
      D.21718 = cols[1];
      D.21719 = mono_verifier_verify_methodspec_signature (image, D.21718, 0B);
      if (D.21719 == 0) goto <D.21720>; else goto <D.21721>;
      <D.21720>:
      D.21722 = 0B;
      return D.21722;
      <D.21721>:
      D.21718 = cols[1];
      ptr.64 = mono_metadata_blob_heap (image, D.21718);
      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.21726 = param_count == 0;
      D.21727 = (long int) D.21726;
      D.21728 = __builtin_expect (D.21727, 0);
      if (D.21728 != 0) goto <D.21729>; else goto <D.21730>;
      <D.21729>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1110, "param_count");
      <D.21730>:
      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.21732>; else goto <D.21733>;
      <D.21732>:
      D.21722 = 0B;
      return D.21722;
      <D.21733>:
      if (context != 0B) goto <D.21734>; else goto <D.21735>;
      <D.21734>:
      D.21736 = BIT_FIELD_REF <*inst, 8, 48>;
      D.21737 = D.21736 & 64;
      if (D.21737 != 0) goto <D.21738>; else goto <D.21739>;
      <D.21738>:
      inst = mono_metadata_inflate_generic_inst (inst, context, &error);
      D.21740 = mono_error_ok (&error);
      if (D.21740 == 0) goto <D.21741>; else goto <D.21742>;
      <D.21741>:
      mono_error_cleanup (&error);
      D.21722 = 0B;
      return D.21722;
      <D.21742>:
      <D.21739>:
      <D.21735>:
      D.21743 = token & 1;
      if (D.21743 == 0) goto <D.21744>; else goto <D.21745>;
      <D.21744>:
      D.21746 = nindex | 100663296;
      method = mono_get_method_full (image, D.21746, 0B, context);
      goto <D.21747>;
      <D.21745>:
      method = method_from_memberref (image, nindex, context, 0B);
      <D.21747>:
      if (method == 0B) goto <D.21748>; else goto <D.21749>;
      <D.21748>:
      D.21722 = 0B;
      return D.21722;
      <D.21749>:
      klass = method->klass;
      D.21750 = klass->generic_class;
      if (D.21750 != 0B) goto <D.21751>; else goto <D.21752>;
      <D.21751>:
      D.21753 = BIT_FIELD_REF <*method, 8, 168>;
      D.21754 = D.21753 & 16;
      D.21755 = D.21754 == 0;
      D.21756 = (long int) D.21755;
      D.21757 = __builtin_expect (D.21756, 0);
      if (D.21757 != 0) goto <D.21758>; else goto <D.21759>;
      <D.21758>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1135, "method->is_inflated");
      <D.21759>:
      method = MEM[(struct MonoMethodInflated *)method].declaring;
      <D.21752>:
      D.21750 = klass->generic_class;
      if (D.21750 != 0B) goto <D.21761>; else goto <D.21762>;
      <D.21761>:
      D.21750 = klass->generic_class;
      iftmp.68 = D.21750->context.class_inst;
      goto <D.21763>;
      <D.21762>:
      iftmp.68 = 0B;
      <D.21763>:
      new_context.class_inst = iftmp.68;
      new_context.method_inst = inst;
      D.21722 = mono_class_inflate_generic_method_full (method, klass, &new_context);
      return D.21722;
    }
  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.21766;
  unsigned int D.21767;
  int D.21768;
  unsigned int D.21769;
  unsigned int D.21770;
  _Bool D.21773;
  int D.21774;
  unsigned int D.21775;
  char * D.21778;
  const char * D.21779;
  struct MonoMethod * D.21780;
  unsigned int D.21781;
  unsigned int D.21784;
  unsigned int D.21787;
  _Bool D.21788;
  long int D.21789;
  long int D.21790;
  int D.21793;
  const char * D.21796;
  const char * ptr.69;
  const char * ptr.70;
  unsigned char D.21803;
  _Bool D.21804;
  _Bool D.21805;
  _Bool D.21806;
  struct MonoClass * iftmp.71;
  struct MonoGenericClass * D.21810;
  struct MonoType * D.21816;
  short unsigned int D.21817;
  int D.21820;
  struct MonoImage * D.21821;
  char * D.21822;
  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.21766 = tables + 120;
      D.21767 = idx + 4294967295;
      D.21768 = (int) D.21767;
      mono_metadata_decode_row (D.21766, D.21768, &cols, 3);
      D.21769 = cols[0];
      nindex = D.21769 >> 3;
      D.21769 = cols[0];
      class = D.21769 & 7;
      D.21770 = cols[1];
      mname = mono_metadata_string_heap (image, D.21770);
      if (used_context != 0B) goto <D.21771>; else goto <D.21772>;
      <D.21771>:
      D.21773 = class == 4;
      D.21774 = (int) D.21773;
      *used_context = D.21774;
      <D.21772>:
      switch (class) <default: <D.20442>, case 0: <D.20439>, case 1: <D.20434>, case 3: <D.20441>, case 4: <D.20437>>
      <D.20434>:
      D.21775 = nindex | 16777216;
      klass = mono_class_from_typeref (image, D.21775);
      if (klass == 0B) goto <D.21776>; else goto <D.21777>;
      <D.21776>:
      {
        char * name;

        D.21775 = nindex | 16777216;
        name = mono_class_name_from_token (image, D.21775);
        D.21778 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s in assembly %s, type %s", mname, D.21778, name);
        D.21779 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.21779);
        monoeg_g_free (name);
        D.21780 = 0B;
        return D.21780;
      }
      <D.21777>:
      goto <D.20436>;
      <D.20437>:
      D.21781 = nindex | 452984832;
      klass = mono_class_get_full (image, D.21781, typespec_context);
      if (klass == 0B) goto <D.21782>; else goto <D.21783>;
      <D.21782>:
      {
        char * name;

        D.21781 = nindex | 452984832;
        name = mono_class_name_from_token (image, D.21781);
        D.21778 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s in assembly %s, type %s", mname, D.21778, name);
        D.21779 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.21779);
        monoeg_g_free (name);
        D.21780 = 0B;
        return D.21780;
      }
      <D.21783>:
      goto <D.20436>;
      <D.20439>:
      D.21784 = nindex | 33554432;
      klass = mono_class_get (image, D.21784);
      if (klass == 0B) goto <D.21785>; else goto <D.21786>;
      <D.21785>:
      {
        char * name;

        D.21784 = nindex | 33554432;
        name = mono_class_name_from_token (image, D.21784);
        D.21778 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s in assembly %s, type %s", mname, D.21778, name);
        D.21779 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.21779);
        monoeg_g_free (name);
        D.21780 = 0B;
        return D.21780;
      }
      <D.21786>:
      goto <D.20436>;
      <D.20441>:
      D.21787 = nindex | 100663296;
      D.21780 = mono_get_method (image, D.21787, 0B);
      return D.21780;
      <D.20442>:
      {
        char * message;

        message = monoeg_g_strdup_printf ("Memberref parent unknown: class: %d, index %d", class, nindex);
        mono_loader_set_error_method_load ("", message);
        D.21780 = 0B;
        return D.21780;
      }
      <D.20436>:
      D.21788 = klass == 0B;
      D.21789 = (long int) D.21788;
      D.21790 = __builtin_expect (D.21789, 0);
      if (D.21790 != 0) goto <D.21791>; else goto <D.21792>;
      <D.21791>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1016, "klass");
      <D.21792>:
      mono_class_init (klass);
      sig_idx = cols[2];
      D.21793 = mono_verifier_verify_memberref_method_signature (image, sig_idx, 0B);
      if (D.21793 == 0) goto <D.21794>; else goto <D.21795>;
      <D.21794>:
      D.21796 = klass->name;
      mono_loader_set_error_method_load (D.21796, mname);
      D.21780 = 0B;
      return D.21780;
      <D.21795>:
      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.21799>; else goto <D.21800>;
      <D.21799>:
      ptr.70 = ptr;
      sig = mono_metadata_parse_method_signature (image, 0, ptr.70, 0B);
      if (sig == 0B) goto <D.21801>; else goto <D.21802>;
      <D.21801>:
      D.21780 = 0B;
      return D.21780;
      <D.21802>:
      sig = cache_memberref_sig (image, sig_idx, sig);
      <D.21800>:
      switch (class) <default: <D.20450>, case 0: <D.20445>, case 1: <D.20444>, case 4: <D.20447>>
      <D.20444>:
      <D.20445>:
      method = find_method (klass, 0B, mname, sig, klass);
      goto <D.20446>;
      <D.20447>:
      {
        struct MonoType * type;

        type = &klass->byval_arg;
        D.21803 = type->type;
        D.21804 = D.21803 != 20;
        D.21805 = D.21803 != 29;
        D.21806 = D.21804 & D.21805;
        if (D.21806 != 0) goto <D.21807>; else goto <D.21808>;
        <D.21807>:
        {
          struct MonoClass * in_class;

          D.21810 = klass->generic_class;
          if (D.21810 != 0B) goto <D.21811>; else goto <D.21812>;
          <D.21811>:
          D.21810 = klass->generic_class;
          iftmp.71 = D.21810->container_class;
          goto <D.21813>;
          <D.21812>:
          iftmp.71 = klass;
          <D.21813>:
          in_class = iftmp.71;
          method = find_method (in_class, 0B, mname, sig, klass);
          goto <D.20446>;
        }
        <D.21808>:
        method = mono_method_search_in_array_class (klass, mname, sig);
        goto <D.20446>;
      }
      <D.20450>:
      monoeg_g_log (0B, 4, "Memberref parent unknown: class: %d, index %d", class, nindex);
      <D.20451>:
      goto <D.20451>;
      monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "loader.c", 1061);
      <D.20446>:
      if (method == 0B) goto <D.21814>; else goto <D.21815>;
      <D.21814>:
      {
        char * msig;
        char * class_name;
        struct GString * s;

        msig = mono_signature_get_desc (sig, 0);
        D.21816 = &klass->byval_arg;
        class_name = mono_type_get_name (D.21816);
        s = monoeg_g_string_new (mname);
        D.21817 = sig->generic_param_count;
        if (D.21817 != 0) goto <D.21818>; else goto <D.21819>;
        <D.21818>:
        D.21817 = sig->generic_param_count;
        D.21820 = (int) D.21817;
        monoeg_g_string_append_printf (s, "<[%d]>", D.21820);
        <D.21819>:
        monoeg_g_string_append_printf (s, "(%s)", msig);
        monoeg_g_free (msig);
        msig = monoeg_g_string_free (s, 0);
        D.21821 = klass->image;
        D.21822 = D.21821->name;
        D.21778 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s::%s in assembly %s, referenced in assembly %s", class_name, msig, D.21822, D.21778);
        mono_loader_set_error_method_load (class_name, mname);
        monoeg_g_free (msig);
        monoeg_g_free (class_name);
      }
      <D.21815>:
      D.21780 = method;
      return D.21780;
    }
  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.21829;
  unsigned int D.21830;
  unsigned char D.21832;
  struct MonoType * D.21836;
  const char * D.21839;
  char D.21841;
  _Bool D.21844;
  long int D.21845;
  long int D.21846;
  char D.21850;
  int D.20318;
  int iftmp.73;
  int D.20317;
  const char[6] * D.21856;
  unsigned char D.21857;
  int D.21858;
  unsigned char D.21859;
  int D.21860;
  _Bool D.21861;
  _Bool D.21862;
  _Bool D.21863;
  const unsigned char * D.21866;
  unsigned char D.21867;
  int D.21868;
  const unsigned char * D.21869;
  unsigned char D.21870;
  int D.21871;
  _Bool D.21872;
  _Bool D.21873;
  const unsigned char * D.21876;
  unsigned char D.21877;
  int D.21878;
  const unsigned char * D.21879;
  unsigned char D.21880;
  int D.21881;
  _Bool D.21882;
  _Bool D.21883;
  const unsigned char * D.21886;
  unsigned char D.21887;
  int D.21888;
  const unsigned char * D.21889;
  unsigned char D.21890;
  int D.21891;
  int D.20327;
  int iftmp.74;
  int D.20326;
  const char[7] * D.21897;
  unsigned char D.21898;
  int D.21899;
  unsigned char D.21900;
  int D.21901;
  _Bool D.21902;
  _Bool D.21903;
  _Bool D.21904;
  const unsigned char * D.21907;
  unsigned char D.21908;
  int D.21909;
  const unsigned char * D.21910;
  unsigned char D.21911;
  int D.21912;
  _Bool D.21913;
  _Bool D.21914;
  const unsigned char * D.21917;
  unsigned char D.21918;
  int D.21919;
  const unsigned char * D.21920;
  unsigned char D.21921;
  int D.21922;
  _Bool D.21923;
  _Bool D.21924;
  const unsigned char * D.21927;
  unsigned char D.21928;
  int D.21929;
  const unsigned char * D.21930;
  unsigned char D.21931;
  int D.21932;
  short unsigned int D.21935;
  short unsigned int D.21936;
  struct MonoClass * * D.21939;
  unsigned int i.75;
  unsigned int D.21941;
  struct MonoClass * * D.21942;
  struct MonoClass * * D.21943;
  struct MonoClass * * D.21944;
  struct MonoType * D.21945;
  const char * D.21948;
  char D.21950;
  const char * iftmp.76;
  int D.21957;
  _Bool D.21958;
  _Bool D.21959;
  long int D.21960;
  long int D.21961;
  struct MonoClass * D.21966;
  struct MonoMethod * D.21967;
  int i;
  char * qname;
  char * fqname;
  char * class_name;
  gboolean is_interface;
  struct MonoMethod * result;
  void out = <<< error >>>;

  result = 0B;
  D.21829 = in_class->flags;
  D.21830 = D.21829 & 32;
  if (D.21830 != 0) goto <D.21826>; else goto <D.21831>;
  <D.21831>:
  D.21832 = in_class->byval_arg.type;
  if (D.21832 == 19) goto <D.21826>; else goto <D.21833>;
  <D.21833>:
  D.21832 = in_class->byval_arg.type;
  if (D.21832 == 30) goto <D.21826>; else goto <D.21827>;
  <D.21826>:
  iftmp.72 = 1;
  goto <D.21828>;
  <D.21827>:
  iftmp.72 = 0;
  <D.21828>:
  is_interface = iftmp.72;
  if (ic != 0B) goto <D.21834>; else goto <D.21835>;
  <D.21834>:
  D.21836 = &ic->byval_arg;
  class_name = mono_type_get_name_full (D.21836, 0);
  qname = monoeg_g_strconcat (class_name, ".", name, 0B);
  D.21839 = ic->name_space;
  if (D.21839 != 0B) goto <D.21840>; else goto <D.21837>;
  <D.21840>:
  D.21839 = ic->name_space;
  D.21841 = *D.21839;
  if (D.21841 != 0) goto <D.21842>; else goto <D.21837>;
  <D.21842>:
  D.21839 = ic->name_space;
  fqname = monoeg_g_strconcat (D.21839, ".", class_name, ".", name, 0B);
  goto <D.21838>;
  <D.21837>:
  fqname = 0B;
  <D.21838>:
  goto <D.21843>;
  <D.21835>:
  fqname = 0B;
  qname = fqname;
  class_name = qname;
  <D.21843>:
  goto <D.20329>;
  <D.20338>:
  D.21844 = from_class == 0B;
  D.21845 = (long int) D.21844;
  D.21846 = __builtin_expect (D.21845, 0);
  if (D.21846 != 0) goto <D.21847>; else goto <D.21848>;
  <D.21847>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 684, "from_class");
  <D.21848>:
  result = find_method_in_class (in_class, name, qname, fqname, sig, from_class);
  if (result != 0B) goto out; else goto <D.21849>;
  <D.21849>:
  D.21850 = *name;
  if (D.21850 == 46) goto <D.21851>; else goto <D.21852>;
  <D.21851>:
  {
    size_t __s1_len;
    size_t __s2_len;

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

      __s2 = name;
      D.21856 = ".ctor";
      D.21857 = MEM[(const unsigned char *)D.21856];
      D.21858 = (int) D.21857;
      D.21859 = *__s2;
      D.21860 = (int) D.21859;
      __result = D.21858 - D.21860;
      {
        D.21861 = __s2_len != 0;
        D.21862 = __result == 0;
        D.21863 = D.21861 & D.21862;
        if (D.21863 != 0) goto <D.21864>; else goto <D.21865>;
        <D.21864>:
        D.21866 = &MEM[(void *)".ctor" + 1B];
        D.21867 = *D.21866;
        D.21868 = (int) D.21867;
        D.21869 = __s2 + 1;
        D.21870 = *D.21869;
        D.21871 = (int) D.21870;
        __result = D.21868 - D.21871;
        D.21872 = __s2_len > 1;
        D.21862 = __result == 0;
        D.21873 = D.21872 & D.21862;
        if (D.21873 != 0) goto <D.21874>; else goto <D.21875>;
        <D.21874>:
        D.21876 = &MEM[(void *)".ctor" + 2B];
        D.21877 = *D.21876;
        D.21878 = (int) D.21877;
        D.21879 = __s2 + 2;
        D.21880 = *D.21879;
        D.21881 = (int) D.21880;
        __result = D.21878 - D.21881;
        D.21882 = __s2_len > 2;
        D.21862 = __result == 0;
        D.21883 = D.21882 & D.21862;
        if (D.21883 != 0) goto <D.21884>; else goto <D.21885>;
        <D.21884>:
        D.21886 = &MEM[(void *)".ctor" + 3B];
        D.21887 = *D.21886;
        D.21888 = (int) D.21887;
        D.21889 = __s2 + 3;
        D.21890 = *D.21889;
        D.21891 = (int) D.21890;
        __result = D.21888 - D.21891;
        <D.21885>:
        <D.21875>:
        <D.21865>:
      }
      D.20317 = __result;
    }
    iftmp.73 = -D.20317;
    goto <D.21892>;
    <D.21855>:
    iftmp.73 = __builtin_strcmp (name, ".ctor");
    <D.21892>:
    D.20318 = iftmp.73;
  }
  if (D.20318 == 0) goto <D.20328>; else goto <D.21893>;
  <D.21893>:
  {
    size_t __s1_len;
    size_t __s2_len;

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

      __s2 = name;
      D.21897 = ".cctor";
      D.21898 = MEM[(const unsigned char *)D.21897];
      D.21899 = (int) D.21898;
      D.21900 = *__s2;
      D.21901 = (int) D.21900;
      __result = D.21899 - D.21901;
      {
        D.21902 = __s2_len != 0;
        D.21903 = __result == 0;
        D.21904 = D.21902 & D.21903;
        if (D.21904 != 0) goto <D.21905>; else goto <D.21906>;
        <D.21905>:
        D.21907 = &MEM[(void *)".cctor" + 1B];
        D.21908 = *D.21907;
        D.21909 = (int) D.21908;
        D.21910 = __s2 + 1;
        D.21911 = *D.21910;
        D.21912 = (int) D.21911;
        __result = D.21909 - D.21912;
        D.21913 = __s2_len > 1;
        D.21903 = __result == 0;
        D.21914 = D.21913 & D.21903;
        if (D.21914 != 0) goto <D.21915>; else goto <D.21916>;
        <D.21915>:
        D.21917 = &MEM[(void *)".cctor" + 2B];
        D.21918 = *D.21917;
        D.21919 = (int) D.21918;
        D.21920 = __s2 + 2;
        D.21921 = *D.21920;
        D.21922 = (int) D.21921;
        __result = D.21919 - D.21922;
        D.21923 = __s2_len > 2;
        D.21903 = __result == 0;
        D.21924 = D.21923 & D.21903;
        if (D.21924 != 0) goto <D.21925>; else goto <D.21926>;
        <D.21925>:
        D.21927 = &MEM[(void *)".cctor" + 3B];
        D.21928 = *D.21927;
        D.21929 = (int) D.21928;
        D.21930 = __s2 + 3;
        D.21931 = *D.21930;
        D.21932 = (int) D.21931;
        __result = D.21929 - D.21932;
        <D.21926>:
        <D.21916>:
        <D.21906>:
      }
      D.20326 = __result;
    }
    iftmp.74 = -D.20326;
    goto <D.21933>;
    <D.21896>:
    iftmp.74 = __builtin_strcmp (name, ".cctor");
    <D.21933>:
    D.20327 = iftmp.74;
  }
  if (D.20327 == 0) goto <D.20328>; else goto <D.21934>;
  <D.21934>:
  <D.21852>:
  D.21935 = from_class->interface_offsets_count;
  D.21936 = in_class->interface_offsets_count;
  if (D.21935 != D.21936) goto <D.21937>; else goto <D.21938>;
  <D.21937>:
  in_class = in_class->parent;
  from_class = from_class->parent;
  // predicted unlikely by continue predictor.
  goto <D.20329>;
  <D.21938>:
  i = 0;
  goto <D.20336>;
  <D.20335>:
  {
    struct MonoClass * in_ic;
    struct MonoClass * from_ic;
    char * ic_qname;
    char * ic_fqname;
    char * ic_class_name;

    D.21939 = in_class->interfaces_packed;
    i.75 = (unsigned int) i;
    D.21941 = i.75 * 4;
    D.21942 = D.21939 + D.21941;
    in_ic = *D.21942;
    D.21943 = from_class->interfaces_packed;
    i.75 = (unsigned int) i;
    D.21941 = i.75 * 4;
    D.21944 = D.21943 + D.21941;
    from_ic = *D.21944;
    D.21945 = &in_ic->byval_arg;
    ic_class_name = mono_type_get_name_full (D.21945, 0);
    ic_qname = monoeg_g_strconcat (ic_class_name, ".", name, 0B);
    D.21948 = in_ic->name_space;
    if (D.21948 != 0B) goto <D.21949>; else goto <D.21946>;
    <D.21949>:
    D.21948 = in_ic->name_space;
    D.21950 = *D.21948;
    if (D.21950 != 0) goto <D.21951>; else goto <D.21946>;
    <D.21951>:
    D.21948 = in_ic->name_space;
    ic_fqname = monoeg_g_strconcat (D.21948, ".", ic_class_name, ".", name, 0B);
    goto <D.21947>;
    <D.21946>:
    ic_fqname = 0B;
    <D.21947>:
    if (ic != 0B) goto <D.21953>; else goto <D.21954>;
    <D.21953>:
    iftmp.76 = name;
    goto <D.21955>;
    <D.21954>:
    iftmp.76 = 0B;
    <D.21955>:
    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.21956>;
    <D.21956>:
  }
  i = i + 1;
  <D.20336>:
  D.21936 = in_class->interface_offsets_count;
  D.21957 = (int) D.21936;
  if (D.21957 > i) goto <D.20335>; else goto <D.20337>;
  <D.20337>:
  in_class = in_class->parent;
  from_class = from_class->parent;
  <D.20329>:
  if (in_class != 0B) goto <D.20338>; else goto <D.20328>;
  <D.20328>:
  D.21958 = in_class == 0B;
  D.21844 = from_class == 0B;
  D.21959 = D.21958 ^ D.21844;
  D.21960 = (long int) D.21959;
  D.21961 = __builtin_expect (D.21960, 0);
  if (D.21961 != 0) goto <D.21962>; else goto <D.21963>;
  <D.21962>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 725, "!in_class == !from_class");
  <D.21963>:
  if (is_interface != 0) goto <D.21964>; else goto <D.21965>;
  <D.21964>:
  D.21966 = mono_defaults.object_class;
  D.21966 = mono_defaults.object_class;
  result = find_method_in_class (D.21966, name, qname, fqname, sig, D.21966);
  <D.21965>:
  out:
  monoeg_g_free (class_name);
  monoeg_g_free (fqname);
  monoeg_g_free (qname);
  D.21967 = result;
  return D.21967;
}


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.21969;
  struct MonoImage * D.21972;
  unsigned char D.21973;
  unsigned char D.21974;
  struct MonoMethod * * D.21977;
  unsigned char D.21980;
  struct MonoGenericClass * D.21985;
  unsigned int D.21988;
  unsigned int i.77;
  unsigned int D.21990;
  int D.21991;
  unsigned int D.21992;
  int D.20240;
  int D.20249;
  int D.20258;
  unsigned int D.22000;
  unsigned int D.22001;
  unsigned char D.22006;
  unsigned char D.22007;
  int D.22010;
  struct MonoMethod * D.22013;
  unsigned int D.22014;
  unsigned int i.78;
  unsigned int D.22018;
  struct MonoMethod * * D.22019;
  int D.20274;
  const char * D.22027;
  int D.20283;
  int D.20292;
  int D.22034;
  int D.22037;
  int i;

  D.21969 = klass->type_token;
  if (D.21969 != 0) goto <D.21970>; else goto <D.21971>;
  <D.21970>:
  D.21972 = klass->image;
  D.21973 = BIT_FIELD_REF <*D.21972, 8, 128>;
  D.21974 = D.21973 & 8;
  if (D.21974 == 0) goto <D.21975>; else goto <D.21976>;
  <D.21975>:
  D.21977 = klass->methods;
  if (D.21977 == 0B) goto <D.21978>; else goto <D.21979>;
  <D.21978>:
  D.21980 = klass->rank;
  if (D.21980 == 0) goto <D.21981>; else goto <D.21982>;
  <D.21981>:
  if (klass == from_class) goto <D.21983>; else goto <D.21984>;
  <D.21983>:
  D.21985 = from_class->generic_class;
  if (D.21985 == 0B) goto <D.21986>; else goto <D.21987>;
  <D.21986>:
  i = 0;
  goto <D.20261>;
  <D.20260>:
  {
    guint32 cols[6];
    struct MonoMethod * method;
    const char * m_name;
    struct MonoMethodSignature * other_sig;

    try
      {
        D.21972 = klass->image;
        D.21988 = klass->method.first;
        i.77 = (unsigned int) i;
        D.21990 = D.21988 + i.77;
        D.21991 = (int) D.21990;
        mono_metadata_decode_table_row (D.21972, 6, D.21991, &cols, 6);
        D.21972 = klass->image;
        D.21992 = cols[3];
        m_name = mono_metadata_string_heap (D.21972, D.21992);
        if (fqname == 0B) goto <D.21996>; else goto <D.21997>;
        <D.21997>:
        {
          size_t __s1_len;
          size_t __s2_len;

          D.20240 = __builtin_strcmp (m_name, fqname);
        }
        if (D.20240 != 0) goto <D.21996>; else goto <D.21994>;
        <D.21996>:
        if (qname == 0B) goto <D.21995>; else goto <D.21998>;
        <D.21998>:
        {
          size_t __s1_len;
          size_t __s2_len;

          D.20249 = __builtin_strcmp (m_name, qname);
        }
        if (D.20249 != 0) goto <D.21995>; else goto <D.21994>;
        <D.21995>:
        if (name == 0B) goto <D.21993>; else goto <D.21999>;
        <D.21999>:
        {
          size_t __s1_len;
          size_t __s2_len;

          D.20258 = __builtin_strcmp (m_name, name);
        }
        if (D.20258 != 0) goto <D.21993>; else goto <D.21994>;
        <D.21993>:
        // predicted unlikely by continue predictor.
        goto <D.20259>;
        <D.21994>:
        D.21972 = klass->image;
        D.21988 = klass->method.first;
        i.77 = (unsigned int) i;
        D.21990 = D.21988 + i.77;
        D.22000 = D.21990 + 1;
        D.22001 = D.22000 | 100663296;
        method = mono_get_method (D.21972, D.22001, klass);
        if (method != 0B) goto <D.22002>; else goto <D.22003>;
        <D.22002>:
        other_sig = mono_method_signature (method);
        if (other_sig != 0B) goto <D.22004>; else goto <D.22005>;
        <D.22004>:
        D.22006 = BIT_FIELD_REF <*sig, 8, 80>;
        D.22007 = D.22006 & 63;
        if (D.22007 != 5) goto <D.22008>; else goto <D.22009>;
        <D.22008>:
        D.22010 = mono_metadata_signature_equal (sig, other_sig);
        if (D.22010 != 0) goto <D.22011>; else goto <D.22012>;
        <D.22011>:
        D.22013 = method;
        return D.22013;
        <D.22012>:
        <D.22009>:
        <D.22005>:
        <D.22003>:
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.20259>:
  i = i + 1;
  <D.20261>:
  i.77 = (unsigned int) i;
  D.22014 = klass->method.count;
  if (i.77 < D.22014) goto <D.20260>; else goto <D.20262>;
  <D.20262>:
  <D.21987>:
  <D.21984>:
  <D.21982>:
  <D.21979>:
  <D.21976>:
  <D.21971>:
  mono_class_setup_methods (klass);
  D.21977 = klass->methods;
  if (D.21977 == 0B) goto <D.22015>; else goto <D.22016>;
  <D.22015>:
  D.22013 = 0B;
  return D.22013;
  <D.22016>:
  i = 0;
  goto <D.20295>;
  <D.20294>:
  {
    struct MonoMethod * m;
    struct MonoMethodSignature * msig;

    D.21977 = klass->methods;
    i.78 = (unsigned int) i;
    D.22018 = i.78 * 4;
    D.22019 = D.21977 + D.22018;
    m = *D.22019;
    if (m == 0B) goto <D.22020>; else goto <D.22021>;
    <D.22020>:
    // predicted unlikely by continue predictor.
    goto <D.20265>;
    <D.22021>:
    if (fqname == 0B) goto <D.22025>; else goto <D.22026>;
    <D.22026>:
    {
      size_t __s1_len;
      size_t __s2_len;

      D.22027 = m->name;
      D.20274 = __builtin_strcmp (D.22027, fqname);
    }
    if (D.20274 != 0) goto <D.22025>; else goto <D.22023>;
    <D.22025>:
    if (qname == 0B) goto <D.22024>; else goto <D.22028>;
    <D.22028>:
    {
      size_t __s1_len;
      size_t __s2_len;

      D.22027 = m->name;
      D.20283 = __builtin_strcmp (D.22027, qname);
    }
    if (D.20283 != 0) goto <D.22024>; else goto <D.22023>;
    <D.22024>:
    if (name == 0B) goto <D.22022>; else goto <D.22029>;
    <D.22029>:
    {
      size_t __s1_len;
      size_t __s2_len;

      D.22027 = m->name;
      D.20292 = __builtin_strcmp (D.22027, name);
    }
    if (D.20292 != 0) goto <D.22022>; else goto <D.22023>;
    <D.22022>:
    // predicted unlikely by continue predictor.
    goto <D.20265>;
    <D.22023>:
    msig = mono_method_signature (m);
    if (msig == 0B) goto <D.22030>; else goto <D.22031>;
    <D.22030>:
    // predicted unlikely by continue predictor.
    goto <D.20265>;
    <D.22031>:
    D.22006 = BIT_FIELD_REF <*sig, 8, 80>;
    D.22007 = D.22006 & 63;
    if (D.22007 == 5) goto <D.22032>; else goto <D.22033>;
    <D.22032>:
    D.22034 = mono_metadata_signature_vararg_match (sig, msig);
    if (D.22034 != 0) goto <D.20293>; else goto <D.22035>;
    <D.22035>:
    goto <D.22036>;
    <D.22033>:
    D.22037 = mono_metadata_signature_equal (sig, msig);
    if (D.22037 != 0) goto <D.20293>; else goto <D.22038>;
    <D.22038>:
    <D.22036>:
  }
  <D.20265>:
  i = i + 1;
  <D.20295>:
  i.77 = (unsigned int) i;
  D.22014 = klass->method.count;
  if (i.77 < D.22014) goto <D.20294>; else goto <D.20293>;
  <D.20293>:
  i.77 = (unsigned int) i;
  D.22014 = klass->method.count;
  if (i.77 < D.22014) goto <D.22039>; else goto <D.22040>;
  <D.22039>:
  D.22013 = mono_class_get_method_by_index (from_class, i);
  return D.22013;
  <D.22040>:
  D.22013 = 0B;
  return D.22013;
}


mono_metadata_signature_vararg_match (struct MonoMethodSignature * sig1, struct MonoMethodSignature * sig2)
{
  unsigned char D.22047;
  unsigned char D.22048;
  unsigned char D.22049;
  unsigned char D.22050;
  short int D.22052;
  short int D.22053;
  gboolean D.22054;
  int D.22055;
  int D.22058;
  struct MonoType * D.22059;
  struct MonoType * D.22060;
  int D.22061;
  int i;

  D.22047 = BIT_FIELD_REF <*sig1, 8, 80>;
  D.22048 = BIT_FIELD_REF <*sig2, 8, 80>;
  D.22049 = D.22047 ^ D.22048;
  D.22050 = D.22049 & 64;
  if (D.22050 != 0) goto <D.22045>; else goto <D.22051>;
  <D.22051>:
  D.22052 = sig1->sentinelpos;
  D.22053 = sig2->sentinelpos;
  if (D.22052 != D.22053) goto <D.22045>; else goto <D.22046>;
  <D.22045>:
  D.22054 = 0;
  return D.22054;
  <D.22046>:
  i = 0;
  goto <D.20217>;
  <D.20216>:
  {
    struct MonoType * p1;
    struct MonoType * p2;

    p1 = sig1->params[i];
    p2 = sig2->params[i];
    D.22055 = mono_metadata_type_equal (p1, p2);
    if (D.22055 == 0) goto <D.22056>; else goto <D.22057>;
    <D.22056>:
    D.22054 = 0;
    return D.22054;
    <D.22057>:
  }
  i = i + 1;
  <D.20217>:
  D.22052 = sig1->sentinelpos;
  D.22058 = (int) D.22052;
  if (D.22058 > i) goto <D.20216>; else goto <D.20218>;
  <D.20218>:
  D.22059 = sig1->ret;
  D.22060 = sig2->ret;
  D.22061 = mono_metadata_type_equal (D.22059, D.22060);
  if (D.22061 == 0) goto <D.22062>; else goto <D.22063>;
  <D.22062>:
  D.22054 = 0;
  return D.22054;
  <D.22063>:
  D.22054 = 1;
  return D.22054;
}


mono_get_method_constrained_with_method (struct MonoImage * image, struct MonoMethod * method, struct MonoClass * constrained_class, struct MonoGenericContext * context)
{
  _Bool D.22065;
  long int D.22066;
  long int D.22067;
  struct MonoMethod * D.22070;
  struct MonoMethod * result;

  D.22065 = method == 0B;
  D.22066 = (long int) D.22065;
  D.22067 = __builtin_expect (D.22066, 0);
  if (D.22067 != 0) goto <D.22068>; else goto <D.22069>;
  <D.22068>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1932, "method");
  <D.22069>:
  mono_loader_lock ();
  result = get_method_constrained (image, method, constrained_class, context);
  mono_loader_unlock ();
  D.22070 = result;
  return D.22070;
}


get_method_constrained (struct MonoImage * image, struct MonoMethod * method, struct MonoClass * constrained_class, struct MonoGenericContext * context)
{
  struct MonoMethod * D.22074;
  unsigned char D.22075;
  unsigned char D.22076;
  short unsigned int D.22079;
  struct MonoMethod * D.22082;
  struct MonoGenericInst * D.22083;
  struct MonoClass * D.22086;
  struct MonoImage * D.22087;
  int D.22088;
  unsigned int D.22095;
  unsigned int D.22096;
  unsigned char D.22098;
  const char * D.22100;
  const char * D.22105;
  const char * D.22106;
  char * D.22107;
  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.22072>; else goto <D.22073>;
  <D.22072>:
  D.22074 = 0B;
  return D.22074;
  <D.22073>:
  D.22075 = BIT_FIELD_REF <*method, 8, 168>;
  D.22076 = D.22075 & 16;
  if (D.22076 != 0) goto <D.22077>; else goto <D.22078>;
  <D.22077>:
  D.22079 = sig->generic_param_count;
  if (D.22079 != 0) goto <D.22080>; else goto <D.22081>;
  <D.22080>:
  {
    struct MonoMethodInflated * imethod;

    imethod = method;
    D.22082 = imethod->declaring;
    sig = mono_method_signature (D.22082);
    method_context = mono_method_get_context (method);
    original_sig = sig;
    D.22083 = method_context->class_inst;
    if (D.22083 != 0B) goto <D.22084>; else goto <D.22085>;
    <D.22084>:
    {
      struct MonoError error;
      struct MonoGenericContext ctx;

      try
        {
          ctx.method_inst = 0B;
          D.22083 = method_context->class_inst;
          ctx.class_inst = D.22083;
          D.22086 = method->klass;
          D.22087 = D.22086->image;
          sig = inflate_generic_signature_checked (D.22087, sig, &ctx, &error);
          D.22088 = mono_error_ok (&error);
          if (D.22088 == 0) goto <D.22089>; else goto <D.22090>;
          <D.22089>:
          mono_error_cleanup (&error);
          D.22074 = 0B;
          return D.22074;
          <D.22090>:
        }
      finally
        {
          error = {CLOBBER};
          ctx = {CLOBBER};
        }
    }
    <D.22085>:
  }
  <D.22081>:
  <D.22078>:
  D.22086 = method->klass;
  if (D.22086 != constrained_class) goto <D.22093>; else goto <D.22094>;
  <D.22093>:
  D.22086 = method->klass;
  D.22095 = D.22086->flags;
  D.22096 = D.22095 & 32;
  if (D.22096 != 0) goto <D.22091>; else goto <D.22097>;
  <D.22097>:
  D.22086 = method->klass;
  D.22098 = D.22086->byval_arg.type;
  if (D.22098 == 19) goto <D.22091>; else goto <D.22099>;
  <D.22099>:
  D.22086 = method->klass;
  D.22098 = D.22086->byval_arg.type;
  if (D.22098 == 30) goto <D.22091>; else goto <D.22092>;
  <D.22091>:
  ic = method->klass;
  <D.22092>:
  <D.22094>:
  D.22100 = method->name;
  result = find_method (constrained_class, ic, D.22100, sig, constrained_class);
  if (sig != original_sig) goto <D.22101>; else goto <D.22102>;
  <D.22101>:
  mono_metadata_free_inflated_signature (sig);
  <D.22102>:
  if (result == 0B) goto <D.22103>; else goto <D.22104>;
  <D.22103>:
  {
    char * m;

    m = mono_method_full_name (method, 1);
    D.22086 = method->klass;
    D.22105 = D.22086->name_space;
    D.22086 = method->klass;
    D.22106 = D.22086->name;
    D.22100 = method->name;
    D.22107 = image->name;
    monoeg_g_log (0B, 16, "Missing method %s.%s.%s in assembly %s method %s", D.22105, D.22106, D.22100, D.22107, m);
    monoeg_g_free (m);
    D.22074 = 0B;
    return D.22074;
  }
  <D.22104>:
  if (method_context != 0B) goto <D.22108>; else goto <D.22109>;
  <D.22108>:
  result = mono_class_inflate_generic_method (result, method_context);
  <D.22109>:
  D.22074 = result;
  return D.22074;
}


mono_get_method_constrained (struct MonoImage * image, guint32 token, struct MonoClass * constrained_class, struct MonoGenericContext * context, struct MonoMethod * * cil_method)
{
  struct MonoMethod * D.22113;
  struct MonoMethod * D.22114;
  struct MonoMethod * D.22117;
  struct MonoMethod * result;

  mono_loader_lock ();
  D.22113 = mono_get_method_from_token (image, token, 0B, context, 0B);
  *cil_method = D.22113;
  D.22114 = *cil_method;
  if (D.22114 == 0B) goto <D.22115>; else goto <D.22116>;
  <D.22115>:
  mono_loader_unlock ();
  D.22117 = 0B;
  return D.22117;
  <D.22116>:
  D.22114 = *cil_method;
  result = get_method_constrained (image, D.22114, constrained_class, context);
  mono_loader_unlock ();
  D.22117 = result;
  return D.22117;
}


mono_free_method (struct MonoMethod * method)
{
  <unnamed type> D.22119;
  unsigned int D.22120;
  <unnamed type> D.22123;
  struct MonoMethodSignature * D.22126;
  unsigned char D.22129;
  unsigned char D.22130;
  struct MonoClass * D.22133;
  struct MonoImage * D.22134;
  const char * D.22135;
  struct MonoMethodHeader * D.22136;
  const unsigned char * D.22139;
  struct MonoType * D.22140;
  short unsigned int D.22141;
  int D.22142;
  struct MonoExceptionClause * D.22143;
  void * D.22144;

  D.22119 = mono_profiler_get_events ();
  D.22120 = D.22119 & 65536;
  if (D.22120 != 0) goto <D.22121>; else goto <D.22122>;
  <D.22121>:
  mono_profiler_method_free (method);
  <D.22122>:
  D.22123 = mono_profiler_get_events ();
  if (D.22123 != 0) goto <D.22124>; else goto <D.22125>;
  <D.22124>:
  return;
  <D.22125>:
  D.22126 = method->signature;
  if (D.22126 != 0B) goto <D.22127>; else goto <D.22128>;
  <D.22127>:
  <D.22128>:
  D.22129 = BIT_FIELD_REF <*method, 8, 168>;
  D.22130 = D.22129 & 2;
  if (D.22130 != 0) goto <D.22131>; else goto <D.22132>;
  <D.22131>:
  {
    struct MonoMethodWrapper * mw;
    int i;

    mw = method;
    mono_marshal_free_dynamic_wrappers (method);
    D.22133 = method->klass;
    D.22134 = D.22133->image;
    mono_image_property_remove (D.22134, method);
    D.22135 = method->name;
    monoeg_g_free (D.22135);
    D.22136 = mw->header;
    if (D.22136 != 0B) goto <D.22137>; else goto <D.22138>;
    <D.22137>:
    D.22136 = mw->header;
    D.22139 = D.22136->code;
    monoeg_g_free (D.22139);
    i = 0;
    goto <D.20698>;
    <D.20697>:
    D.22136 = mw->header;
    D.22140 = D.22136->locals[i];
    monoeg_g_free (D.22140);
    i = i + 1;
    <D.20698>:
    D.22136 = mw->header;
    D.22141 = D.22136->num_locals;
    D.22142 = (int) D.22141;
    if (D.22142 > i) goto <D.20697>; else goto <D.20699>;
    <D.20699>:
    D.22136 = mw->header;
    D.22143 = D.22136->clauses;
    monoeg_g_free (D.22143);
    D.22136 = mw->header;
    monoeg_g_free (D.22136);
    <D.22138>:
    D.22144 = mw->method_data;
    monoeg_g_free (D.22144);
    D.22126 = method->signature;
    monoeg_g_free (D.22126);
    monoeg_g_free (method);
  }
  <D.22132>:
}


mono_method_get_param_names (struct MonoMethod * method, const char * * names)
{
  unsigned char D.22146;
  unsigned char D.22147;
  short unsigned int D.22152;
  unsigned int i.79;
  unsigned int D.22156;
  const char * * D.22157;
  int D.22158;
  unsigned char D.22159;
  struct MonoImage * D.22162;
  unsigned char D.22163;
  unsigned char D.22164;
  struct MonoClass * D.22167;
  struct MonoImage * D.22168;
  struct GHashTable * D.22169;
  char * * D.22172;
  sizetype i.80;
  sizetype D.22176;
  sizetype D.22177;
  char * * D.22178;
  char * D.22179;
  struct MonoMethodSignature * D.22182;
  short unsigned int D.22183;
  int D.22184;
  unsigned char D.22185;
  unsigned char D.22186;
  struct GHashTable * D.22189;
  char * * D.22194;
  char * D.22195;
  unsigned int D.22198;
  int D.22199;
  <unnamed-unsigned:24> D.22200;
  unsigned int D.22201;
  int idx.81;
  unsigned int D.22205;
  <unnamed-unsigned:24> D.22207;
  int D.22208;
  int D.22209;
  unsigned int D.22210;
  unsigned int D.22213;
  sizetype D.22216;
  sizetype D.22217;
  const char * * D.22218;
  unsigned int D.22219;
  const char * D.22220;
  int i;
  int lastp;
  struct MonoClass * klass;
  struct MonoTableInfo * methodt;
  struct MonoTableInfo * paramt;
  struct MonoMethodSignature * signature;
  guint32 idx;

  D.22146 = BIT_FIELD_REF <*method, 8, 168>;
  D.22147 = D.22146 & 16;
  if (D.22147 != 0) goto <D.22148>; else goto <D.22149>;
  <D.22148>:
  method = MEM[(struct MonoMethodInflated *)method].declaring;
  <D.22149>:
  signature = mono_method_signature (method);
  if (signature == 0B) goto <D.22150>; else goto <D.22151>;
  <D.22150>:
  return;
  <D.22151>:
  D.22152 = signature->param_count;
  if (D.22152 == 0) goto <D.22153>; else goto <D.22154>;
  <D.22153>:
  return;
  <D.22154>:
  i = 0;
  goto <D.20712>;
  <D.20711>:
  i.79 = (unsigned int) i;
  D.22156 = i.79 * 4;
  D.22157 = names + D.22156;
  *D.22157 = "";
  i = i + 1;
  <D.20712>:
  D.22152 = signature->param_count;
  D.22158 = (int) D.22152;
  if (D.22158 > i) goto <D.20711>; else goto <D.20713>;
  <D.20713>:
  klass = method->klass;
  D.22159 = klass->rank;
  if (D.22159 != 0) goto <D.22160>; else goto <D.22161>;
  <D.22160>:
  return;
  <D.22161>:
  mono_class_init (klass);
  D.22162 = klass->image;
  D.22163 = BIT_FIELD_REF <*D.22162, 8, 128>;
  D.22164 = D.22163 & 8;
  if (D.22164 != 0) goto <D.22165>; else goto <D.22166>;
  <D.22165>:
  {
    struct MonoReflectionMethodAux * method_aux;

    D.22167 = method->klass;
    D.22168 = D.22167->image;
    D.22169 = MEM[(struct MonoDynamicImage *)D.22168].method_aux_hash;
    method_aux = monoeg_g_hash_table_lookup (D.22169, method);
    if (method_aux != 0B) goto <D.22170>; else goto <D.22171>;
    <D.22170>:
    D.22172 = method_aux->param_names;
    if (D.22172 != 0B) goto <D.22173>; else goto <D.22174>;
    <D.22173>:
    i = 0;
    goto <D.20716>;
    <D.20715>:
    D.22172 = method_aux->param_names;
    i.80 = (sizetype) i;
    D.22176 = i.80 + 1;
    D.22177 = D.22176 * 4;
    D.22178 = D.22172 + D.22177;
    D.22179 = *D.22178;
    if (D.22179 != 0B) goto <D.22180>; else goto <D.22181>;
    <D.22180>:
    i.79 = (unsigned int) i;
    D.22156 = i.79 * 4;
    D.22157 = names + D.22156;
    D.22172 = method_aux->param_names;
    i.80 = (sizetype) i;
    D.22176 = i.80 + 1;
    D.22177 = D.22176 * 4;
    D.22178 = D.22172 + D.22177;
    D.22179 = *D.22178;
    *D.22157 = D.22179;
    <D.22181>:
    i = i + 1;
    <D.20716>:
    D.22182 = mono_method_signature (method);
    D.22183 = D.22182->param_count;
    D.22184 = (int) D.22183;
    if (D.22184 > i) goto <D.20715>; else goto <D.20717>;
    <D.20717>:
    <D.22174>:
    <D.22171>:
    return;
  }
  <D.22166>:
  D.22185 = BIT_FIELD_REF <*method, 8, 160>;
  D.22186 = D.22185 & 124;
  if (D.22186 != 0) goto <D.22187>; else goto <D.22188>;
  <D.22187>:
  {
    char * * pnames;

    pnames = 0B;
    D.22162 = klass->image;
    mono_image_lock (D.22162);
    D.22162 = klass->image;
    D.22189 = D.22162->wrapper_param_names;
    if (D.22189 != 0B) goto <D.22190>; else goto <D.22191>;
    <D.22190>:
    D.22162 = klass->image;
    D.22189 = D.22162->wrapper_param_names;
    pnames = monoeg_g_hash_table_lookup (D.22189, method);
    <D.22191>:
    D.22162 = klass->image;
    mono_image_unlock (D.22162);
    if (pnames != 0B) goto <D.22192>; else goto <D.22193>;
    <D.22192>:
    i = 0;
    goto <D.20720>;
    <D.20719>:
    i.79 = (unsigned int) i;
    D.22156 = i.79 * 4;
    D.22157 = names + D.22156;
    i.79 = (unsigned int) i;
    D.22156 = i.79 * 4;
    D.22194 = pnames + D.22156;
    D.22195 = *D.22194;
    *D.22157 = D.22195;
    i = i + 1;
    <D.20720>:
    D.22152 = signature->param_count;
    D.22158 = (int) D.22152;
    if (D.22158 > i) goto <D.20719>; else goto <D.20721>;
    <D.20721>:
    <D.22193>:
    return;
  }
  <D.22188>:
  D.22162 = klass->image;
  methodt = &D.22162->tables[6];
  D.22162 = klass->image;
  paramt = &D.22162->tables[8];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.22196>; else goto <D.22197>;
  <D.22196>:
  {
    guint32 cols[3];
    guint param_index;

    try
      {
        D.22198 = idx + 4294967295;
        D.22199 = (int) D.22198;
        param_index = mono_metadata_decode_row_col (methodt, D.22199, 5);
        D.22200 = methodt->rows;
        D.22201 = (unsigned int) D.22200;
        if (D.22201 > idx) goto <D.22202>; else goto <D.22203>;
        <D.22202>:
        idx.81 = (int) idx;
        D.22205 = mono_metadata_decode_row_col (methodt, idx.81, 5);
        lastp = (int) D.22205;
        goto <D.22206>;
        <D.22203>:
        D.22207 = paramt->rows;
        D.22208 = (int) D.22207;
        lastp = D.22208 + 1;
        <D.22206>:
        i = (int) param_index;
        goto <D.20725>;
        <D.20724>:
        D.22209 = i + -1;
        mono_metadata_decode_row (paramt, D.22209, &cols, 3);
        D.22210 = cols[1];
        if (D.22210 != 0) goto <D.22211>; else goto <D.22212>;
        <D.22211>:
        D.22210 = cols[1];
        D.22152 = signature->param_count;
        D.22213 = (unsigned int) D.22152;
        if (D.22210 <= D.22213) goto <D.22214>; else goto <D.22215>;
        <D.22214>:
        D.22210 = cols[1];
        D.22216 = D.22210 + 1073741823;
        D.22217 = D.22216 * 4;
        D.22218 = names + D.22217;
        D.22162 = klass->image;
        D.22219 = cols[2];
        D.22220 = mono_metadata_string_heap (D.22162, D.22219);
        *D.22218 = D.22220;
        <D.22215>:
        <D.22212>:
        i = i + 1;
        <D.20725>:
        if (i < lastp) goto <D.20724>; else goto <D.20726>;
        <D.20726>:
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.22197>:
}


mono_method_get_param_token (struct MonoMethod * method, int index)
{
  struct MonoImage * D.22222;
  unsigned char D.22223;
  unsigned char D.22224;
  unsigned int D.22229;
  int D.22230;
  uint32_t D.22233;
  unsigned int index.82;
  unsigned int D.22235;
  struct MonoClass * klass;
  struct MonoTableInfo * methodt;
  guint32 idx;

  klass = method->klass;
  mono_class_init (klass);
  D.22222 = klass->image;
  D.22223 = BIT_FIELD_REF <*D.22222, 8, 128>;
  D.22224 = D.22223 & 8;
  if (D.22224 != 0) goto <D.22225>; else goto <D.22226>;
  <D.22225>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "loader.c", 2100);
  <D.22226>:
  D.22222 = klass->image;
  methodt = &D.22222->tables[6];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.22227>; else goto <D.22228>;
  <D.22227>:
  {
    guint param_index;

    D.22229 = idx + 4294967295;
    D.22230 = (int) D.22229;
    param_index = mono_metadata_decode_row_col (methodt, D.22230, 5);
    if (index == -1) goto <D.22231>; else goto <D.22232>;
    <D.22231>:
    D.22233 = 134217728;
    return D.22233;
    <D.22232>:
    index.82 = (unsigned int) index;
    D.22235 = param_index + index.82;
    D.22233 = D.22235 | 134217728;
    return D.22233;
  }
  <D.22228>:
  D.22233 = 0;
  return D.22233;
}


mono_method_get_marshal_info (struct MonoMethod * method, struct MonoMarshalSpec * * mspecs)
{
  _Bool D.22237;
  long int D.22238;
  long int D.22239;
  unsigned int i.83;
  unsigned int D.22243;
  struct MonoMarshalSpec * * D.22244;
  short unsigned int D.22245;
  int D.22246;
  struct MonoClass * D.22247;
  struct MonoImage * D.22248;
  unsigned char D.22249;
  unsigned char D.22250;
  struct GHashTable * D.22253;
  struct MonoMarshalSpec * * D.22256;
  struct MonoMarshalSpec * * D.22259;
  struct MonoMarshalSpec * D.22260;
  void * D.22263;
  struct MonoMarshalSpec * D.22264;
  char * D.22265;
  gchar * D.22266;
  char * D.22267;
  gchar * D.22268;
  struct MonoImage * D.22269;
  unsigned int D.22272;
  int D.22273;
  <unnamed-unsigned:24> D.22274;
  unsigned int D.22275;
  int idx.84;
  unsigned int D.22279;
  <unnamed-unsigned:24> D.22281;
  int D.22282;
  int D.22283;
  unsigned int D.22284;
  unsigned int D.22285;
  unsigned int D.22288;
  unsigned int D.22289;
  unsigned int D.22292;
  _Bool D.22293;
  long int D.22294;
  long int D.22295;
  unsigned int D.22298;
  struct MonoMarshalSpec * * D.22299;
  struct MonoMarshalSpec * D.22300;
  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.22237 = signature == 0B;
  D.22238 = (long int) D.22237;
  D.22239 = __builtin_expect (D.22238, 0);
  if (D.22239 != 0) goto <D.22240>; else goto <D.22241>;
  <D.22240>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2129, "signature");
  <D.22241>:
  i = 0;
  goto <D.20747>;
  <D.20746>:
  i.83 = (unsigned int) i;
  D.22243 = i.83 * 4;
  D.22244 = mspecs + D.22243;
  *D.22244 = 0B;
  i = i + 1;
  <D.20747>:
  D.22245 = signature->param_count;
  D.22246 = (int) D.22245;
  if (D.22246 >= i) goto <D.20746>; else goto <D.20748>;
  <D.20748>:
  D.22247 = method->klass;
  D.22248 = D.22247->image;
  D.22249 = BIT_FIELD_REF <*D.22248, 8, 128>;
  D.22250 = D.22249 & 8;
  if (D.22250 != 0) goto <D.22251>; else goto <D.22252>;
  <D.22251>:
  {
    struct MonoReflectionMethodAux * method_aux;

    D.22247 = method->klass;
    D.22248 = D.22247->image;
    D.22253 = MEM[(struct MonoDynamicImage *)D.22248].method_aux_hash;
    method_aux = monoeg_g_hash_table_lookup (D.22253, method);
    if (method_aux != 0B) goto <D.22254>; else goto <D.22255>;
    <D.22254>:
    D.22256 = method_aux->param_marshall;
    if (D.22256 != 0B) goto <D.22257>; else goto <D.22258>;
    <D.22257>:
    {
      struct MonoMarshalSpec * * dyn_specs;

      dyn_specs = method_aux->param_marshall;
      i = 0;
      goto <D.20752>;
      <D.20751>:
      i.83 = (unsigned int) i;
      D.22243 = i.83 * 4;
      D.22259 = dyn_specs + D.22243;
      D.22260 = *D.22259;
      if (D.22260 != 0B) goto <D.22261>; else goto <D.22262>;
      <D.22261>:
      i.83 = (unsigned int) i;
      D.22243 = i.83 * 4;
      D.22244 = mspecs + D.22243;
      D.22263 = monoeg_malloc0 (16);
      *D.22244 = D.22263;
      i.83 = (unsigned int) i;
      D.22243 = i.83 * 4;
      D.22244 = mspecs + D.22243;
      D.22264 = *D.22244;
      i.83 = (unsigned int) i;
      D.22243 = i.83 * 4;
      D.22259 = dyn_specs + D.22243;
      D.22260 = *D.22259;
      memcpy (D.22264, D.22260, 16);
      i.83 = (unsigned int) i;
      D.22243 = i.83 * 4;
      D.22244 = mspecs + D.22243;
      D.22264 = *D.22244;
      i.83 = (unsigned int) i;
      D.22243 = i.83 * 4;
      D.22259 = dyn_specs + D.22243;
      D.22260 = *D.22259;
      D.22265 = D.22260->data.custom_data.custom_name;
      D.22266 = monoeg_strdup (D.22265);
      D.22264->data.custom_data.custom_name = D.22266;
      i.83 = (unsigned int) i;
      D.22243 = i.83 * 4;
      D.22244 = mspecs + D.22243;
      D.22264 = *D.22244;
      i.83 = (unsigned int) i;
      D.22243 = i.83 * 4;
      D.22259 = dyn_specs + D.22243;
      D.22260 = *D.22259;
      D.22267 = D.22260->data.custom_data.cookie;
      D.22268 = monoeg_strdup (D.22267);
      D.22264->data.custom_data.cookie = D.22268;
      <D.22262>:
      i = i + 1;
      <D.20752>:
      D.22245 = signature->param_count;
      D.22246 = (int) D.22245;
      if (D.22246 >= i) goto <D.20751>; else goto <D.20753>;
      <D.20753>:
    }
    <D.22258>:
    <D.22255>:
    return;
  }
  <D.22252>:
  mono_class_init (klass);
  D.22269 = klass->image;
  methodt = &D.22269->tables[6];
  D.22269 = klass->image;
  paramt = &D.22269->tables[8];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.22270>; else goto <D.22271>;
  <D.22270>:
  {
    guint32 cols[3];
    guint param_index;

    try
      {
        D.22272 = idx + 4294967295;
        D.22273 = (int) D.22272;
        param_index = mono_metadata_decode_row_col (methodt, D.22273, 5);
        D.22274 = methodt->rows;
        D.22275 = (unsigned int) D.22274;
        if (D.22275 > idx) goto <D.22276>; else goto <D.22277>;
        <D.22276>:
        idx.84 = (int) idx;
        D.22279 = mono_metadata_decode_row_col (methodt, idx.84, 5);
        lastp = (int) D.22279;
        goto <D.22280>;
        <D.22277>:
        D.22281 = paramt->rows;
        D.22282 = (int) D.22281;
        lastp = D.22282 + 1;
        <D.22280>:
        i = (int) param_index;
        goto <D.20758>;
        <D.20757>:
        D.22283 = i + -1;
        mono_metadata_decode_row (paramt, D.22283, &cols, 3);
        D.22284 = cols[0];
        D.22285 = D.22284 & 8192;
        if (D.22285 != 0) goto <D.22286>; else goto <D.22287>;
        <D.22286>:
        D.22288 = cols[1];
        D.22245 = signature->param_count;
        D.22289 = (unsigned int) D.22245;
        if (D.22288 <= D.22289) goto <D.22290>; else goto <D.22291>;
        <D.22290>:
        {
          const char * tp;

          D.22269 = klass->image;
          D.22283 = i + -1;
          D.22292 = (unsigned int) D.22283;
          tp = mono_metadata_get_marshal_info (D.22269, D.22292, 0);
          D.22293 = tp == 0B;
          D.22294 = (long int) D.22293;
          D.22295 = __builtin_expect (D.22294, 0);
          if (D.22295 != 0) goto <D.22296>; else goto <D.22297>;
          <D.22296>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2171, "tp");
          <D.22297>:
          D.22288 = cols[1];
          D.22298 = D.22288 * 4;
          D.22299 = mspecs + D.22298;
          D.22269 = klass->image;
          D.22300 = mono_metadata_parse_marshal_spec (D.22269, tp);
          *D.22299 = D.22300;
        }
        <D.22291>:
        <D.22287>:
        i = i + 1;
        <D.20758>:
        if (i < lastp) goto <D.20757>; else goto <D.20759>;
        <D.20759>:
        return;
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.22271>:
}


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

  D.22304 = __builtin_object_size (__dest, 0);
  D.22303 = __builtin___memcpy_chk (__dest, __src, __len, D.22304);
  return D.22303;
}


mono_method_has_marshal_info (struct MonoMethod * method)
{
  struct MonoClass * D.22306;
  struct MonoImage * D.22307;
  unsigned char D.22308;
  unsigned char D.22309;
  struct GHashTable * D.22312;
  unsigned int i.85;
  unsigned int D.22316;
  struct MonoMarshalSpec * * D.22317;
  struct MonoMarshalSpec * D.22318;
  mono_bool D.22321;
  struct MonoMethodSignature * D.22322;
  short unsigned int D.22323;
  int D.22324;
  struct MonoImage * D.22325;
  unsigned int D.22328;
  int D.22329;
  unsigned int D.22330;
  <unnamed-unsigned:24> D.22331;
  unsigned int D.22332;
  int idx.86;
  unsigned int D.22336;
  <unnamed-unsigned:24> D.22338;
  int D.22339;
  int D.22340;
  unsigned int D.22341;
  unsigned int D.22342;
  int i;
  int lastp;
  struct MonoClass * klass;
  struct MonoTableInfo * methodt;
  struct MonoTableInfo * paramt;
  guint32 idx;

  klass = method->klass;
  D.22306 = method->klass;
  D.22307 = D.22306->image;
  D.22308 = BIT_FIELD_REF <*D.22307, 8, 128>;
  D.22309 = D.22308 & 8;
  if (D.22309 != 0) goto <D.22310>; else goto <D.22311>;
  <D.22310>:
  {
    struct MonoReflectionMethodAux * method_aux;
    struct MonoMarshalSpec * * dyn_specs;

    D.22306 = method->klass;
    D.22307 = D.22306->image;
    D.22312 = MEM[(struct MonoDynamicImage *)D.22307].method_aux_hash;
    method_aux = monoeg_g_hash_table_lookup (D.22312, method);
    dyn_specs = method_aux->param_marshall;
    if (dyn_specs != 0B) goto <D.22313>; else goto <D.22314>;
    <D.22313>:
    i = 0;
    goto <D.20772>;
    <D.20771>:
    i.85 = (unsigned int) i;
    D.22316 = i.85 * 4;
    D.22317 = dyn_specs + D.22316;
    D.22318 = *D.22317;
    if (D.22318 != 0B) goto <D.22319>; else goto <D.22320>;
    <D.22319>:
    D.22321 = 1;
    return D.22321;
    <D.22320>:
    i = i + 1;
    <D.20772>:
    D.22322 = mono_method_signature (method);
    D.22323 = D.22322->param_count;
    D.22324 = (int) D.22323;
    if (D.22324 >= i) goto <D.20771>; else goto <D.20773>;
    <D.20773>:
    <D.22314>:
    D.22321 = 0;
    return D.22321;
  }
  <D.22311>:
  mono_class_init (klass);
  D.22325 = klass->image;
  methodt = &D.22325->tables[6];
  D.22325 = klass->image;
  paramt = &D.22325->tables[8];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.22326>; else goto <D.22327>;
  <D.22326>:
  {
    guint32 cols[3];
    guint param_index;

    try
      {
        D.22328 = idx + 4294967295;
        D.22329 = (int) D.22328;
        param_index = mono_metadata_decode_row_col (methodt, D.22329, 5);
        D.22330 = idx + 1;
        D.22331 = methodt->rows;
        D.22332 = (unsigned int) D.22331;
        if (D.22330 < D.22332) goto <D.22333>; else goto <D.22334>;
        <D.22333>:
        idx.86 = (int) idx;
        D.22336 = mono_metadata_decode_row_col (methodt, idx.86, 5);
        lastp = (int) D.22336;
        goto <D.22337>;
        <D.22334>:
        D.22338 = paramt->rows;
        D.22339 = (int) D.22338;
        lastp = D.22339 + 1;
        <D.22337>:
        i = (int) param_index;
        goto <D.20777>;
        <D.20776>:
        D.22340 = i + -1;
        mono_metadata_decode_row (paramt, D.22340, &cols, 3);
        D.22341 = cols[0];
        D.22342 = D.22341 & 8192;
        if (D.22342 != 0) goto <D.22343>; else goto <D.22344>;
        <D.22343>:
        D.22321 = 1;
        return D.22321;
        <D.22344>:
        i = i + 1;
        <D.20777>:
        if (i < lastp) goto <D.20776>; else goto <D.20778>;
        <D.20778>:
        D.22321 = 0;
        return D.22321;
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.22327>:
  D.22321 = 0;
  return D.22321;
}


mono_method_get_wrapper_data (struct MonoMethod * method, guint32 id)
{
  _Bool D.22347;
  long int D.22348;
  long int D.22349;
  unsigned char D.22352;
  unsigned char D.22353;
  _Bool D.22354;
  long int D.22355;
  long int D.22356;
  unsigned char D.22359;
  unsigned char D.22360;
  _Bool D.22363;
  long int D.22364;
  long int D.22365;
  void * D.22368;
  unsigned int D.22369;
  _Bool D.22370;
  long int D.22371;
  long int D.22372;
  void * D.22375;
  unsigned int D.22376;
  void * * D.22377;
  void * * data;

  D.22347 = method == 0B;
  D.22348 = (long int) D.22347;
  D.22349 = __builtin_expect (D.22348, 0);
  if (D.22349 != 0) goto <D.22350>; else goto <D.22351>;
  <D.22350>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2231, "method != NULL");
  <D.22351>:
  D.22352 = BIT_FIELD_REF <*method, 8, 160>;
  D.22353 = D.22352 & 124;
  D.22354 = D.22353 == 0;
  D.22355 = (long int) D.22354;
  D.22356 = __builtin_expect (D.22355, 0);
  if (D.22356 != 0) goto <D.22357>; else goto <D.22358>;
  <D.22357>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2232, "method->wrapper_type != MONO_WRAPPER_NONE");
  <D.22358>:
  D.22359 = BIT_FIELD_REF <*method, 8, 168>;
  D.22360 = D.22359 & 16;
  if (D.22360 != 0) goto <D.22361>; else goto <D.22362>;
  <D.22361>:
  method = MEM[(struct MonoMethodInflated *)method].declaring;
  <D.22362>:
  data = MEM[(struct MonoMethodWrapper *)method].method_data;
  D.22363 = data == 0B;
  D.22364 = (long int) D.22363;
  D.22365 = __builtin_expect (D.22364, 0);
  if (D.22365 != 0) goto <D.22366>; else goto <D.22367>;
  <D.22366>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2237, "data != NULL");
  <D.22367>:
  D.22368 = *data;
  D.22369 = (unsigned int) D.22368;
  D.22370 = D.22369 < id;
  D.22371 = (long int) D.22370;
  D.22372 = __builtin_expect (D.22371, 0);
  if (D.22372 != 0) goto <D.22373>; else goto <D.22374>;
  <D.22373>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2238, "id <= GPOINTER_TO_UINT (*data)");
  <D.22374>:
  D.22376 = id * 4;
  D.22377 = data + D.22376;
  D.22375 = *D.22377;
  return D.22375;
}


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

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


stack_walk_adapter (struct MonoStackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  <unnamed type> D.22381;
  gboolean D.22382;
  struct MonoJitInfo * D.22383;
  _Bool D.22384;
  long int D.22385;
  long int D.22386;
  mono_bool (*<T1aa9>) (struct MonoMethod *, int32_t, int32_t, mono_bool, void *) D.22389;
  struct MonoMethod * D.22390;
  int D.22391;
  int D.22392;
  int D.22393;
  void * D.22394;
  struct StackWalkUserData * d;

  d = data;
  D.22381 = frame->type;
  switch (D.22381) <default: <D.20797>, case 0: <D.20796>, case 1: <D.20794>, case 2: <D.20795>>
  <D.20794>:
  <D.20795>:
  D.22382 = 0;
  return D.22382;
  <D.20796>:
  D.22383 = frame->ji;
  D.22384 = D.22383 == 0B;
  D.22385 = (long int) D.22384;
  D.22386 = __builtin_expect (D.22385, 0);
  if (D.22386 != 0) goto <D.22387>; else goto <D.22388>;
  <D.22387>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2257, "frame->ji");
  <D.22388>:
  D.22389 = d->func;
  D.22383 = frame->ji;
  D.22390 = mono_jit_info_get_method (D.22383);
  D.22391 = frame->native_offset;
  D.22392 = frame->il_offset;
  D.22393 = frame->managed;
  D.22394 = d->user_data;
  D.22382 = D.22389 (D.22390, D.22391, D.22392, D.22393, D.22394);
  return D.22382;
  <D.20797>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "loader.c", 2261);
  D.22382 = 0;
  return D.22382;
}


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

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


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

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


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

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


mono_loader_lock ()
{
  _Bool D.22405;
  long int D.22406;
  long int D.22407;
  int loader_lock_track_ownership.87;
  _Bool D.22411;
  long int D.22412;
  long int D.22413;
  unsigned int loader_lock_nest_id.88;
  void * D.22417;
  unsigned int D.22418;
  unsigned int D.22419;
  void * D.22420;

  {
    int ret;

    ret = pthread_mutex_lock (&loader_mutex.mutex);
    if (ret != 0) goto <D.22403>; else goto <D.22404>;
    <D.22403>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.22404>:
    D.22405 = ret != 0;
    D.22406 = (long int) D.22405;
    D.22407 = __builtin_expect (D.22406, 0);
    if (D.22407 != 0) goto <D.22408>; else goto <D.22409>;
    <D.22408>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2308, "ret == 0");
    <D.22409>:
  }
  loader_lock_track_ownership.87 = loader_lock_track_ownership;
  D.22411 = loader_lock_track_ownership.87 != 0;
  D.22412 = (long int) D.22411;
  D.22413 = __builtin_expect (D.22412, 0);
  if (D.22413 != 0) goto <D.22414>; else goto <D.22415>;
  <D.22414>:
  loader_lock_nest_id.88 = loader_lock_nest_id;
  loader_lock_nest_id.88 = loader_lock_nest_id;
  D.22417 = pthread_getspecific (loader_lock_nest_id.88);
  D.22418 = (unsigned int) D.22417;
  D.22419 = D.22418 + 1;
  D.22420 = (void *) D.22419;
  mono_native_tls_set_value (loader_lock_nest_id.88, D.22420);
  <D.22415>:
}


mono_loader_unlock ()
{
  _Bool D.22423;
  long int D.22424;
  long int D.22425;
  int loader_lock_track_ownership.89;
  _Bool D.22429;
  long int D.22430;
  long int D.22431;
  unsigned int loader_lock_nest_id.90;
  void * D.22435;
  unsigned int D.22436;
  unsigned int D.22437;
  void * D.22438;

  {
    int ret;

    ret = pthread_mutex_unlock (&loader_mutex.mutex);
    if (ret != 0) goto <D.22421>; else goto <D.22422>;
    <D.22421>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.22422>:
    D.22423 = ret != 0;
    D.22424 = (long int) D.22423;
    D.22425 = __builtin_expect (D.22424, 0);
    if (D.22425 != 0) goto <D.22426>; else goto <D.22427>;
    <D.22426>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2317, "ret == 0");
    <D.22427>:
  }
  loader_lock_track_ownership.89 = loader_lock_track_ownership;
  D.22429 = loader_lock_track_ownership.89 != 0;
  D.22430 = (long int) D.22429;
  D.22431 = __builtin_expect (D.22430, 0);
  if (D.22431 != 0) goto <D.22432>; else goto <D.22433>;
  <D.22432>:
  loader_lock_nest_id.90 = loader_lock_nest_id;
  loader_lock_nest_id.90 = loader_lock_nest_id;
  D.22435 = pthread_getspecific (loader_lock_nest_id.90);
  D.22436 = (unsigned int) D.22435;
  D.22437 = D.22436 + 4294967295;
  D.22438 = (void *) D.22437;
  mono_native_tls_set_value (loader_lock_nest_id.90, D.22438);
  <D.22433>:
}


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.22440;
  long int D.22441;
  long int D.22442;
  gboolean D.22445;
  unsigned int loader_lock_nest_id.92;
  void * D.22447;
  unsigned int D.22448;
  _Bool D.22449;

  loader_lock_track_ownership.91 = loader_lock_track_ownership;
  D.22440 = loader_lock_track_ownership.91 == 0;
  D.22441 = (long int) D.22440;
  D.22442 = __builtin_expect (D.22441, 0);
  if (D.22442 != 0) goto <D.22443>; else goto <D.22444>;
  <D.22443>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2345, "loader_lock_track_ownership");
  <D.22444>:
  loader_lock_nest_id.92 = loader_lock_nest_id;
  D.22447 = pthread_getspecific (loader_lock_nest_id.92);
  D.22448 = (unsigned int) D.22447;
  D.22449 = D.22448 != 0;
  D.22445 = (gboolean) D.22449;
  return D.22445;
}


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.22452>; else goto <D.22453>;
  <D.22452>:
  mono_loader_lock ();
  <D.22453>:
}


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.22455>; else goto <D.22456>;
  <D.22455>:
  mono_loader_unlock ();
  <D.22456>:
}


mono_method_signature_checked (struct MonoMethod * m, struct MonoError * error)
{
  struct MonoMethodSignature * D.22457;
  struct MonoMethodSignature * D.22460;
  unsigned char D.22463;
  unsigned char D.22464;
  struct MonoMethod * D.22467;
  struct MonoClass * D.22468;
  struct MonoImage * D.22469;
  struct MonoGenericContext * D.22470;
  int D.22471;
  unsigned int D.22474;
  unsigned int inflated_signatures_size.95;
  unsigned int inflated_signatures_size.96;
  unsigned int D.22477;
  unsigned int D.22478;
  _Bool D.22479;
  long int D.22480;
  long int D.22481;
  int D.22484;
  struct MonoClass * D.22485;
  struct MonoTableInfo * D.22486;
  int D.22487;
  struct MonoGenericClass * D.22488;
  _Bool D.22489;
  long int D.22490;
  long int D.22491;
  int iftmp.97;
  short unsigned int D.22499;
  int D.22500;
  int D.22501;
  short unsigned int D.22503;
  int D.22504;
  int D.22505;
  int D.22508;
  struct GHashTable * D.22513;
  int D.22516;
  unsigned int D.22519;
  const char * sig_body.98;
  unsigned int D.22525;
  unsigned int signatures_size.99;
  unsigned int signatures_size.100;
  short unsigned int D.22528;
  unsigned char D.22534;
  unsigned char D.22535;
  const char * D.22536;
  char * D.22537;
  <unnamed-signed:31> D.22538;
  int D.22539;
  int D.22540;
  unsigned int D.22548;
  unsigned int D.22549;
  short unsigned int D.22557;
  int D.22558;
  int D.22559;
  unsigned char D.22560;
  <unnamed-unsigned:6> D.22561;
  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.22457 = m->signature;
  if (D.22457 != 0B) goto <D.22458>; else goto <D.22459>;
  <D.22458>:
  D.22460 = m->signature;
  return D.22460;
  <D.22459>:
  mono_loader_lock ();
  D.22457 = m->signature;
  if (D.22457 != 0B) goto <D.22461>; else goto <D.22462>;
  <D.22461>:
  mono_loader_unlock ();
  D.22460 = m->signature;
  return D.22460;
  <D.22462>:
  D.22463 = BIT_FIELD_REF <*m, 8, 168>;
  D.22464 = D.22463 & 16;
  if (D.22464 != 0) goto <D.22465>; else goto <D.22466>;
  <D.22465>:
  {
    struct MonoMethodInflated * imethod;

    imethod = m;
    D.22467 = imethod->declaring;
    signature = mono_method_signature (D.22467);
    D.22467 = imethod->declaring;
    D.22468 = D.22467->klass;
    D.22469 = D.22468->image;
    D.22470 = mono_method_get_context (m);
    signature = inflate_generic_signature_checked (D.22469, signature, D.22470, error);
    D.22471 = mono_error_ok (error);
    if (D.22471 == 0) goto <D.22472>; else goto <D.22473>;
    <D.22472>:
    mono_loader_unlock ();
    D.22460 = 0B;
    return D.22460;
    <D.22473>:
    D.22474 = mono_metadata_signature_size (signature);
    inflated_signatures_size.95 = inflated_signatures_size;
    inflated_signatures_size.96 = D.22474 + inflated_signatures_size.95;
    inflated_signatures_size = inflated_signatures_size.96;
    mono_memory_barrier ();
    m->signature = signature;
    mono_loader_unlock ();
    D.22460 = m->signature;
    return D.22460;
  }
  <D.22466>:
  D.22477 = m->token;
  D.22478 = D.22477 >> 24;
  D.22479 = D.22478 != 6;
  D.22480 = (long int) D.22479;
  D.22481 = __builtin_expect (D.22480, 0);
  if (D.22481 != 0) goto <D.22482>; else goto <D.22483>;
  <D.22482>:
  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.22483>:
  D.22477 = m->token;
  D.22484 = (int) D.22477;
  idx = D.22484 & 16777215;
  D.22485 = m->klass;
  img = D.22485->image;
  D.22486 = &img->tables[6];
  D.22487 = idx + -1;
  sig_offset = mono_metadata_decode_row_col (D.22486, D.22487, 4);
  sig = mono_metadata_blob_heap (img, sig_offset);
  D.22485 = m->klass;
  D.22488 = D.22485->generic_class;
  D.22489 = D.22488 != 0B;
  D.22490 = (long int) D.22489;
  D.22491 = __builtin_expect (D.22490, 0);
  if (D.22491 != 0) goto <D.22492>; else goto <D.22493>;
  <D.22492>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2425, "!m->klass->generic_class");
  <D.22493>:
  container = mono_method_get_generic_container (m);
  if (container == 0B) goto <D.22494>; else goto <D.22495>;
  <D.22494>:
  D.22485 = m->klass;
  container = D.22485->generic_container;
  <D.22495>:
  D.22499 = m->iflags;
  D.22500 = (int) D.22499;
  D.22501 = D.22500 & 4096;
  if (D.22501 == 0) goto <D.22502>; else goto <D.22497>;
  <D.22502>:
  D.22503 = m->flags;
  D.22504 = (int) D.22503;
  D.22505 = D.22504 & 8192;
  if (D.22505 == 0) goto <D.22506>; else goto <D.22497>;
  <D.22506>:
  if (container == 0B) goto <D.22507>; else goto <D.22497>;
  <D.22507>:
  iftmp.97 = 1;
  goto <D.22498>;
  <D.22497>:
  iftmp.97 = 0;
  <D.22498>:
  can_cache_signature = iftmp.97;
  D.22508 = mono_metadata_method_has_param_attrs (img, idx);
  if (D.22508 != 0) goto <D.22509>; else goto <D.22510>;
  <D.22509>:
  can_cache_signature = 0;
  <D.22510>:
  if (can_cache_signature != 0) goto <D.22511>; else goto <D.22512>;
  <D.22511>:
  D.22513 = img->method_signatures;
  signature = monoeg_g_hash_table_lookup (D.22513, sig);
  <D.22512>:
  if (signature == 0B) goto <D.22514>; else goto <D.22515>;
  <D.22514>:
  {
    const char * sig_body;

    try
      {
        D.22516 = mono_verifier_verify_method_signature (img, sig_offset, error);
        if (D.22516 == 0) goto <D.22517>; else goto <D.22518>;
        <D.22517>:
        mono_loader_unlock ();
        D.22460 = 0B;
        return D.22460;
        <D.22518>:
        D.22519 = mono_metadata_decode_blob_size (sig, &sig_body);
        size = (int) D.22519;
        sig_body.98 = sig_body;
        signature = mono_metadata_parse_method_signature_full (img, container, idx, sig_body.98, 0B);
        if (signature == 0B) goto <D.22521>; else goto <D.22522>;
        <D.22521>:
        mono_error_set_from_loader_error (error);
        mono_loader_unlock ();
        D.22460 = 0B;
        return D.22460;
        <D.22522>:
        if (can_cache_signature != 0) goto <D.22523>; else goto <D.22524>;
        <D.22523>:
        D.22513 = img->method_signatures;
        monoeg_g_hash_table_insert_replace (D.22513, sig, signature, 0);
        <D.22524>:
        D.22525 = mono_metadata_signature_size (signature);
        signatures_size.99 = signatures_size;
        signatures_size.100 = D.22525 + signatures_size.99;
        signatures_size = signatures_size.100;
      }
    finally
      {
        sig_body = {CLOBBER};
      }
  }
  <D.22515>:
  D.22528 = signature->generic_param_count;
  if (D.22528 != 0) goto <D.22529>; else goto <D.22530>;
  <D.22529>:
  if (container == 0B) goto <D.22531>; else goto <D.22533>;
  <D.22533>:
  D.22534 = BIT_FIELD_REF <*container, 8, 152>;
  D.22535 = D.22534 & 128;
  if (D.22535 == 0) goto <D.22531>; else goto <D.22532>;
  <D.22531>:
  mono_loader_unlock ();
  D.22485 = m->klass;
  D.22536 = m->name;
  D.22537 = img->name;
  mono_error_set_method_load (error, D.22485, D.22536, "Signature claims method has generic parameters, but generic_params table says it doesn\'t for method 0x%08x from image %s", idx, D.22537);
  D.22460 = 0B;
  return D.22460;
  <D.22532>:
  D.22538 = container->type_argc;
  D.22539 = (int) D.22538;
  D.22528 = signature->generic_param_count;
  D.22540 = (int) D.22528;
  if (D.22539 != D.22540) goto <D.22541>; else goto <D.22542>;
  <D.22541>:
  mono_loader_unlock ();
  D.22485 = m->klass;
  D.22536 = m->name;
  D.22528 = signature->generic_param_count;
  D.22540 = (int) D.22528;
  D.22538 = container->type_argc;
  D.22539 = (int) D.22538;
  D.22537 = img->name;
  mono_error_set_method_load (error, D.22485, D.22536, "Inconsistent generic parameter count.  Signature says %d, generic_params table says %d for method 0x%08x from image %s", D.22540, D.22539, idx, D.22537);
  D.22460 = 0B;
  return D.22460;
  <D.22542>:
  goto <D.22543>;
  <D.22530>:
  if (container != 0B) goto <D.22544>; else goto <D.22545>;
  <D.22544>:
  D.22534 = BIT_FIELD_REF <*container, 8, 152>;
  D.22535 = D.22534 & 128;
  if (D.22535 != 0) goto <D.22546>; else goto <D.22547>;
  <D.22546>:
  D.22548 = BIT_FIELD_REF <*container, 32, 128>;
  D.22549 = D.22548 & 2147483647;
  if (D.22549 != 0) goto <D.22550>; else goto <D.22551>;
  <D.22550>:
  mono_loader_unlock ();
  D.22485 = m->klass;
  D.22536 = m->name;
  D.22537 = img->name;
  mono_error_set_method_load (error, D.22485, D.22536, "generic_params table claims method has generic parameters, but signature says it doesn\'t for method 0x%08x from image %s", idx, D.22537);
  D.22460 = 0B;
  return D.22460;
  <D.22551>:
  <D.22547>:
  <D.22545>:
  <D.22543>:
  D.22499 = m->iflags;
  D.22500 = (int) D.22499;
  D.22501 = D.22500 & 4096;
  if (D.22501 != 0) goto <D.22552>; else goto <D.22553>;
  <D.22552>:
  signature->pinvoke = 1;
  goto <D.22554>;
  <D.22553>:
  D.22503 = m->flags;
  D.22504 = (int) D.22503;
  D.22505 = D.22504 & 8192;
  if (D.22505 != 0) goto <D.22555>; else goto <D.22556>;
  <D.22555>:
  {
    MonoCallConvention conv;
    struct MonoMethodPInvoke * piinfo;

    conv = 0;
    piinfo = m;
    signature->pinvoke = 1;
    D.22557 = piinfo->piflags;
    D.22558 = (int) D.22557;
    D.22559 = D.22558 & 1792;
    switch (D.22559) <default: <D.20866>, case 0: <D.20857>, case 10: <D.20865>, case 16: <D.20864>, case 256: <D.20858>, case 512: <D.20860>, case 768: <D.20861>, case 1024: <D.20862>, case 1280: <D.20863>>
    <D.20857>:
    <D.20858>:
    conv = 0;
    goto <D.20859>;
    <D.20860>:
    conv = 1;
    goto <D.20859>;
    <D.20861>:
    conv = 2;
    goto <D.20859>;
    <D.20862>:
    conv = 3;
    goto <D.20859>;
    <D.20863>:
    conv = 4;
    goto <D.20859>;
    <D.20864>:
    <D.20865>:
    <D.20866>:
    mono_loader_unlock ();
    D.22485 = m->klass;
    D.22536 = m->name;
    D.22557 = piinfo->piflags;
    D.22558 = (int) D.22557;
    D.22537 = img->name;
    mono_error_set_method_load (error, D.22485, D.22536, "unsupported calling convention : 0x%04x for method 0x%08x from image %s", D.22558, idx, D.22537);
    D.22460 = 0B;
    return D.22460;
    <D.20859>:
    D.22560 = (unsigned char) conv;
    D.22561 = (<unnamed-unsigned:6>) D.22560;
    signature->call_convention = D.22561;
  }
  <D.22556>:
  <D.22554>:
  mono_memory_barrier ();
  m->signature = signature;
  mono_loader_unlock ();
  D.22460 = m->signature;
  return D.22460;
}


mono_memory_barrier ()
{
  __sync_synchronize ();
}


mono_method_signature (struct MonoMethod * m)
{
  struct MonoClass * D.22567;
  const char * D.22568;
  const char * D.22569;
  struct MonoMethodSignature * D.22570;
  struct MonoError error;
  struct MonoMethodSignature * sig;

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

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


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

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


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

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


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

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


mono_method_get_header (struct MonoMethod * method)
{
  short unsigned int D.22581;
  int D.22582;
  int D.22583;
  short unsigned int D.22585;
  unsigned int D.22586;
  unsigned int D.22587;
  int D.22589;
  struct MonoMethodHeader * D.22590;
  unsigned char D.22591;
  unsigned char D.22592;
  struct MonoMethodHeader * D.22595;
  struct MonoMethod * D.22598;
  struct MonoGenericContext * D.22601;
  struct MonoMethodHeader * D.22602;
  short unsigned int D.22603;
  short unsigned int D.22604;
  struct MonoMethodHeader * D.22607;
  _Bool D.22608;
  long int D.22609;
  long int D.22610;
  unsigned int D.22613;
  unsigned int D.22614;
  _Bool D.22615;
  long int D.22616;
  long int D.22617;
  int D.22620;
  struct MonoClass * D.22621;
  struct MonoTableInfo * D.22622;
  int D.22623;
  int D.22624;
  struct MonoGenericContainer * D.22629;
  int idx;
  guint32 rva;
  struct MonoImage * img;
  void * loc;
  struct MonoMethodHeader * header;

  D.22581 = method->flags;
  D.22582 = (int) D.22581;
  D.22583 = D.22582 & 1024;
  if (D.22583 != 0) goto <D.22579>; else goto <D.22584>;
  <D.22584>:
  D.22585 = method->iflags;
  D.22586 = (unsigned int) D.22585;
  D.22587 = D.22586 & 4099;
  if (D.22587 != 0) goto <D.22579>; else goto <D.22588>;
  <D.22588>:
  D.22581 = method->flags;
  D.22582 = (int) D.22581;
  D.22589 = D.22582 & 8192;
  if (D.22589 != 0) goto <D.22579>; else goto <D.22580>;
  <D.22579>:
  D.22590 = 0B;
  return D.22590;
  <D.22580>:
  D.22591 = BIT_FIELD_REF <*method, 8, 168>;
  D.22592 = D.22591 & 16;
  if (D.22592 != 0) goto <D.22593>; else goto <D.22594>;
  <D.22593>:
  {
    struct MonoMethodInflated * imethod;
    struct MonoMethodHeader * header;

    imethod = method;
    mono_loader_lock ();
    D.22595 = imethod->header;
    if (D.22595 != 0B) goto <D.22596>; else goto <D.22597>;
    <D.22596>:
    mono_loader_unlock ();
    D.22590 = imethod->header;
    return D.22590;
    <D.22597>:
    D.22598 = imethod->declaring;
    header = mono_method_get_header (D.22598);
    if (header == 0B) goto <D.22599>; else goto <D.22600>;
    <D.22599>:
    mono_loader_unlock ();
    D.22590 = 0B;
    return D.22590;
    <D.22600>:
    D.22601 = mono_method_get_context (method);
    D.22602 = inflate_generic_header (header, D.22601);
    imethod->header = D.22602;
    mono_loader_unlock ();
    mono_metadata_free_mh (header);
    D.22590 = imethod->header;
    return D.22590;
  }
  <D.22594>:
  D.22603 = BIT_FIELD_REF <*method, 16, 160>;
  D.22604 = D.22603 & 1148;
  if (D.22604 != 0) goto <D.22605>; else goto <D.22606>;
  <D.22605>:
  {
    struct MonoMethodWrapper * mw;

    mw = method;
    D.22607 = mw->header;
    D.22608 = D.22607 == 0B;
    D.22609 = (long int) D.22608;
    D.22610 = __builtin_expect (D.22609, 0);
    if (D.22610 != 0) goto <D.22611>; else goto <D.22612>;
    <D.22611>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2599, "mw->header");
    <D.22612>:
    D.22590 = mw->header;
    return D.22590;
  }
  <D.22606>:
  D.22613 = method->token;
  D.22614 = D.22613 >> 24;
  D.22615 = D.22614 != 6;
  D.22616 = (long int) D.22615;
  D.22617 = __builtin_expect (D.22616, 0);
  if (D.22617 != 0) goto <D.22618>; else goto <D.22619>;
  <D.22618>:
  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.22619>:
  D.22613 = method->token;
  D.22620 = (int) D.22613;
  idx = D.22620 & 16777215;
  D.22621 = method->klass;
  img = D.22621->image;
  D.22622 = &img->tables[6];
  D.22623 = idx + -1;
  rva = mono_metadata_decode_row_col (D.22622, D.22623, 0);
  D.22624 = mono_verifier_verify_method_header (img, rva, 0B);
  if (D.22624 == 0) goto <D.22625>; else goto <D.22626>;
  <D.22625>:
  D.22590 = 0B;
  return D.22590;
  <D.22626>:
  loc = mono_image_rva_map (img, rva);
  if (loc == 0B) goto <D.22627>; else goto <D.22628>;
  <D.22627>:
  D.22590 = 0B;
  return D.22590;
  <D.22628>:
  D.22629 = mono_method_get_generic_container (method);
  header = mono_metadata_parse_mh_full (img, D.22629, loc);
  D.22590 = header;
  return D.22590;
}


inflate_generic_header (struct MonoMethodHeader * header, struct MonoGenericContext * context)
{
  short unsigned int D.22631;
  unsigned int D.22632;
  unsigned int D.22633;
  unsigned int D.22634;
  const unsigned char * D.22635;
  unsigned int D.22636;
  <unnamed-unsigned:15> D.22637;
  <unnamed-unsigned:15> D.22638;
  <unnamed-unsigned:1> D.22639;
  struct MonoExceptionClause * D.22640;
  struct MonoType * D.22641;
  struct MonoType * D.22642;
  int D.22643;
  short unsigned int D.22644;
  short unsigned int D.22645;
  <unnamed-unsigned:15> D.22648;
  unsigned int D.22649;
  unsigned int D.22650;
  void * D.22651;
  struct MonoExceptionClause * D.22652;
  unsigned int i.101;
  unsigned int D.22654;
  unsigned int D.22655;
  struct MonoClass * D.22658;
  struct MonoClass * D.22659;
  int D.22660;
  struct MonoMethodHeader * D.22661;
  struct MonoMethodHeader * res;
  int i;

  D.22631 = header->num_locals;
  D.22632 = (unsigned int) D.22631;
  D.22633 = D.22632 + 5;
  D.22634 = D.22633 * 4;
  res = monoeg_malloc0 (D.22634);
  D.22635 = header->code;
  res->code = D.22635;
  D.22636 = header->code_size;
  res->code_size = D.22636;
  D.22637 = header->max_stack;
  res->max_stack = D.22637;
  D.22638 = header->num_clauses;
  res->num_clauses = D.22638;
  D.22639 = header->init_locals;
  res->init_locals = D.22639;
  D.22631 = header->num_locals;
  res->num_locals = D.22631;
  D.22640 = header->clauses;
  res->clauses = D.22640;
  i = 0;
  goto <D.20369>;
  <D.20368>:
  D.22641 = header->locals[i];
  D.22642 = mono_class_inflate_generic_type (D.22641, context);
  res->locals[i] = D.22642;
  i = i + 1;
  <D.20369>:
  D.22631 = header->num_locals;
  D.22643 = (int) D.22631;
  if (D.22643 > i) goto <D.20368>; else goto <D.20370>;
  <D.20370>:
  D.22644 = BIT_FIELD_REF <*res, 16, 80>;
  D.22645 = D.22644 & 32767;
  if (D.22645 != 0) goto <D.22646>; else goto <D.22647>;
  <D.22646>:
  D.22640 = header->clauses;
  D.22648 = res->num_clauses;
  D.22649 = (unsigned int) D.22648;
  D.22650 = D.22649 * 24;
  D.22651 = monoeg_g_memdup (D.22640, D.22650);
  res->clauses = D.22651;
  i = 0;
  goto <D.20374>;
  <D.20373>:
  {
    struct MonoExceptionClause * clause;

    D.22652 = res->clauses;
    i.101 = (unsigned int) i;
    D.22654 = i.101 * 24;
    clause = D.22652 + D.22654;
    D.22655 = clause->flags;
    if (D.22655 != 0) goto <D.22656>; else goto <D.22657>;
    <D.22656>:
    // predicted unlikely by continue predictor.
    goto <D.20372>;
    <D.22657>:
    D.22658 = clause->data.catch_class;
    D.22659 = mono_class_inflate_generic_class (D.22658, context);
    clause->data.catch_class = D.22659;
  }
  <D.20372>:
  i = i + 1;
  <D.20374>:
  D.22638 = header->num_clauses;
  D.22660 = (int) D.22638;
  if (D.22660 > i) goto <D.20373>; else goto <D.20375>;
  <D.20375>:
  <D.22647>:
  D.22661 = res;
  return D.22661;
}


mono_method_get_flags (struct MonoMethod * method, guint32 * iflags)
{
  short unsigned int D.22665;
  unsigned int D.22666;
  uint32_t D.22667;
  short unsigned int D.22668;

  if (iflags != 0B) goto <D.22663>; else goto <D.22664>;
  <D.22663>:
  D.22665 = method->iflags;
  D.22666 = (unsigned int) D.22665;
  *iflags = D.22666;
  <D.22664>:
  D.22668 = method->flags;
  D.22667 = (uint32_t) D.22668;
  return D.22667;
}


mono_method_get_index (struct MonoMethod * method)
{
  unsigned char D.22670;
  uint32_t D.22673;
  unsigned int D.22674;
  unsigned char D.22677;
  struct MonoMethod * * D.22680;
  unsigned int i.102;
  unsigned int D.22682;
  struct MonoMethod * * D.22683;
  struct MonoMethod * D.22684;
  struct MonoImage * D.22687;
  unsigned char D.22688;
  unsigned char D.22689;
  unsigned int D.22692;
  unsigned int i.103;
  unsigned int D.22694;
  unsigned int D.22695;
  unsigned int D.22696;
  struct MonoClass * klass;
  int i;

  klass = method->klass;
  D.22670 = klass->rank;
  if (D.22670 != 0) goto <D.22671>; else goto <D.22672>;
  <D.22671>:
  D.22673 = 0;
  return D.22673;
  <D.22672>:
  D.22674 = method->token;
  if (D.22674 != 0) goto <D.22675>; else goto <D.22676>;
  <D.22675>:
  D.22674 = method->token;
  D.22673 = D.22674 & 16777215;
  return D.22673;
  <D.22676>:
  mono_class_setup_methods (klass);
  D.22677 = klass->exception_type;
  if (D.22677 != 0) goto <D.22678>; else goto <D.22679>;
  <D.22678>:
  D.22673 = 0;
  return D.22673;
  <D.22679>:
  i = 0;
  goto <D.20903>;
  <D.20902>:
  D.22680 = klass->methods;
  i.102 = (unsigned int) i;
  D.22682 = i.102 * 4;
  D.22683 = D.22680 + D.22682;
  D.22684 = *D.22683;
  if (D.22684 == method) goto <D.22685>; else goto <D.22686>;
  <D.22685>:
  D.22687 = klass->image;
  D.22688 = BIT_FIELD_REF <*D.22687, 8, 128>;
  D.22689 = D.22688 & 32;
  if (D.22689 != 0) goto <D.22690>; else goto <D.22691>;
  <D.22690>:
  D.22687 = klass->image;
  D.22692 = klass->method.first;
  i.103 = (unsigned int) i;
  D.22694 = D.22692 + i.103;
  D.22695 = D.22694 + 1;
  D.22673 = mono_metadata_translate_token_index (D.22687, 6, D.22695);
  return D.22673;
  <D.22691>:
  D.22692 = klass->method.first;
  i.103 = (unsigned int) i;
  D.22694 = D.22692 + i.103;
  D.22673 = D.22694 + 1;
  return D.22673;
  <D.22686>:
  i = i + 1;
  <D.20903>:
  i.103 = (unsigned int) i;
  D.22696 = klass->method.count;
  if (i.103 < D.22696) goto <D.20902>; else goto <D.20904>;
  <D.20904>:
  D.22673 = 0;
  return D.22673;
}


