__attribute__((visibility ("hidden")))
mono_loader_init ()
{
  int inited.0;
  static gboolean inited;

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


mono_native_tls_alloc (pthread_key_t * key, void * destructor)
{
  int D.18751;
  void (*<Tc6>) (void *) destructor.1;
  int D.18753;
  _Bool D.18754;

  destructor.1 = (void (*<Tc6>) (void *)) destructor;
  D.18753 = pthread_key_create (key, destructor.1);
  D.18754 = D.18753 == 0;
  D.18751 = (int) D.18754;
  return D.18751;
}


__attribute__((visibility ("hidden")))
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.18759;
  char * D.18760;
  char * D.18761;
  char * D.18762;

  goto <D.18388>;
  <D.18387>:
  {
    struct MonoDllMap * next;

    next = map->next;
    D.18759 = map->dll;
    monoeg_g_free (D.18759);
    D.18760 = map->target;
    monoeg_g_free (D.18760);
    D.18761 = map->func;
    monoeg_g_free (D.18761);
    D.18762 = map->target_func;
    monoeg_g_free (D.18762);
    monoeg_g_free (map);
    map = next;
  }
  <D.18388>:
  if (map != 0B) goto <D.18387>; else goto <D.18389>;
  <D.18389>:
}


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


__attribute__((visibility ("hidden")))
mono_loader_set_error_assembly_load (const char * assembly_name, gboolean ref_only)
{
  struct MonoLoaderError * D.18763;
  gchar * D.18766;
  struct MonoLoaderError * error;

  D.18763 = mono_loader_get_last_error ();
  if (D.18763 != 0B) goto <D.18764>; else goto <D.18765>;
  <D.18764>:
  return;
  <D.18765>:
  error = monoeg_malloc0 (56);
  error->exception_type = 8;
  D.18766 = monoeg_strdup (assembly_name);
  error->assembly_name = D.18766;
  error->ref_only = ref_only;
  if (ref_only != 0) goto <D.18767>; else goto <D.18768>;
  <D.18767>:
  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.18769>;
  <D.18768>:
  mono_trace (16, 1, "Could not load file or assembly \'%s\' or one of its dependencies.", assembly_name);
  <D.18769>:
  set_loader_error (error);
}


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

  if (str != 0B) goto <D.18771>; else goto <D.18772>;
  <D.18771>:
  D.18773 = __strdup (str);
  return D.18773;
  <D.18772>:
  D.18773 = 0B;
  return D.18773;
}


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.18776;
  int D.18777;
  _Bool D.18778;

  D.18777 = pthread_setspecific (key, value);
  D.18778 = D.18777 == 0;
  D.18776 = (int) D.18778;
  return D.18776;
}


__attribute__((visibility ("hidden")))
mono_loader_set_error_type_load (const char * class_name, const char * assembly_name)
{
  struct MonoLoaderError * D.18780;
  gchar * D.18783;
  gchar * D.18784;
  struct MonoLoaderError * error;

  D.18780 = mono_loader_get_last_error ();
  if (D.18780 != 0B) goto <D.18781>; else goto <D.18782>;
  <D.18781>:
  return;
  <D.18782>:
  error = monoeg_malloc0 (56);
  error->exception_type = 7;
  D.18783 = monoeg_strdup (class_name);
  error->class_name = D.18783;
  D.18784 = monoeg_strdup (assembly_name);
  error->assembly_name = D.18784;
  mono_trace (16, 2, "The class %s could not be loaded, used in %s", class_name, assembly_name);
  set_loader_error (error);
}


__attribute__((visibility ("hidden")))
mono_loader_set_error_method_load (const char * class_name, const char * member_name)
{
  struct MonoLoaderError * D.18786;
  gchar * D.18789;
  struct MonoLoaderError * error;

  D.18786 = mono_loader_get_last_error ();
  if (D.18786 != 0B) goto <D.18787>; else goto <D.18788>;
  <D.18787>:
  return;
  <D.18788>:
  error = monoeg_malloc0 (56);
  error->exception_type = 5;
  D.18789 = monoeg_strdup (class_name);
  error->class_name = D.18789;
  error->member_name = member_name;
  set_loader_error (error);
}


__attribute__((visibility ("hidden")))
mono_loader_set_error_field_load (struct MonoClass * klass, const char * member_name)
{
  struct MonoLoaderError * D.18791;
  struct MonoLoaderError * error;

  D.18791 = mono_loader_get_last_error ();
  if (D.18791 != 0B) goto <D.18792>; else goto <D.18793>;
  <D.18792>:
  return;
  <D.18793>:
  error = monoeg_malloc0 (56);
  error->exception_type = 6;
  error->klass = klass;
  error->member_name = member_name;
  set_loader_error (error);
}


__attribute__((visibility ("hidden")))
mono_loader_set_error_bad_image (char * msg)
{
  struct MonoLoaderError * D.18795;
  struct MonoLoaderError * error;

  D.18795 = mono_loader_get_last_error ();
  if (D.18795 != 0B) goto <D.18796>; else goto <D.18797>;
  <D.18796>:
  return;
  <D.18797>:
  error = monoeg_malloc0 (56);
  error->exception_type = 12;
  error->msg = msg;
  set_loader_error (error);
}


__attribute__((visibility ("hidden")))
mono_loader_get_last_error ()
{
  struct MonoLoaderError * D.18799;
  unsigned int loader_error_thread_id.6;

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


__attribute__((visibility ("hidden")))
mono_loader_clear_error ()
{
  unsigned int loader_error_thread_id.7;
  char * D.18805;
  char * D.18806;
  char * D.18807;
  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.18803>; else goto <D.18804>;
  <D.18803>:
  D.18805 = ex->class_name;
  monoeg_g_free (D.18805);
  D.18806 = ex->assembly_name;
  monoeg_g_free (D.18806);
  D.18807 = ex->msg;
  monoeg_g_free (D.18807);
  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.18804>:
}


__attribute__((visibility ("hidden")))
mono_loader_error_prepare_exception (struct MonoLoaderError * error)
{
  unsigned char D.18808;
  int D.18809;
  char * D.18810;
  char * D.18811;
  struct MonoDomain * D.18812;
  const char * D.18813;
  struct MonoClass * D.18814;
  int D.18818;
  struct MonoDomain * D.18822;
  struct MonoString * D.18823;
  char * D.18824;
  struct MonoException * D.18825;
  struct MonoException * ex;

  ex = 0B;
  D.18808 = error->exception_type;
  D.18809 = (int) D.18808;
  switch (D.18809) <default: <D.18122>, case 5: <D.18111>, case 6: <D.18114>, case 7: <D.18106>, case 8: <D.18117>, case 12: <D.18120>>
  <D.18106>:
  {
    char * cname;
    char * aname;
    struct MonoString * class_name;

    D.18810 = error->class_name;
    cname = monoeg_strdup (D.18810);
    D.18811 = error->assembly_name;
    aname = monoeg_strdup (D.18811);
    mono_loader_clear_error ();
    D.18812 = mono_domain_get ();
    class_name = mono_string_new (D.18812, cname);
    ex = mono_get_exception_type_load (class_name, aname);
    monoeg_g_free (cname);
    monoeg_g_free (aname);
    goto <D.18110>;
  }
  <D.18111>:
  {
    char * cname;
    char * aname;

    D.18810 = error->class_name;
    cname = monoeg_strdup (D.18810);
    D.18813 = error->member_name;
    aname = monoeg_strdup (D.18813);
    mono_loader_clear_error ();
    ex = mono_get_exception_missing_method (cname, aname);
    monoeg_g_free (cname);
    monoeg_g_free (aname);
    goto <D.18110>;
  }
  <D.18114>:
  {
    char * class_name;
    char * cmembername;

    D.18813 = error->member_name;
    cmembername = monoeg_strdup (D.18813);
    D.18814 = error->klass;
    if (D.18814 != 0B) goto <D.18815>; else goto <D.18816>;
    <D.18815>:
    D.18814 = error->klass;
    class_name = mono_type_get_full_name (D.18814);
    goto <D.18817>;
    <D.18816>:
    class_name = monoeg_strdup ("");
    <D.18817>:
    mono_loader_clear_error ();
    ex = mono_get_exception_missing_field (class_name, cmembername);
    monoeg_g_free (class_name);
    monoeg_g_free (cmembername);
    goto <D.18110>;
  }
  <D.18117>:
  {
    char * msg;
    char * filename;

    D.18818 = error->ref_only;
    if (D.18818 != 0) goto <D.18819>; else goto <D.18820>;
    <D.18819>:
    D.18811 = 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.18811);
    goto <D.18821>;
    <D.18820>:
    D.18811 = error->assembly_name;
    msg = monoeg_g_strdup_printf ("Could not load file or assembly \'%s\' or one of its dependencies.", D.18811);
    <D.18821>:
    D.18811 = error->assembly_name;
    filename = monoeg_strdup (D.18811);
    mono_loader_clear_error ();
    D.18822 = mono_domain_get ();
    D.18823 = mono_string_new (D.18822, filename);
    ex = mono_get_exception_file_not_found2 (msg, D.18823);
    monoeg_g_free (msg);
    monoeg_g_free (filename);
    goto <D.18110>;
  }
  <D.18120>:
  {
    char * msg;

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


mono_field_from_token (struct MonoImage * image, guint32 token, struct MonoClass * * retklass, struct MonoGenericContext * context)
{
  long unsigned int D.18827;
  long unsigned int D.18828;
  struct MonoClass * D.18834;
  struct MonoClass * handle_class.8;
  char * D.18836;
  gchar * D.18837;
  struct MonoClassField * D.18838;
  struct MonoClass * D.18839;
  struct GHashTable * D.18840;
  long unsigned int D.18841;
  const void * D.18842;
  struct MonoClass * D.18845;
  unsigned int D.18846;
  unsigned int D.18850;
  unsigned int D.18853;
  struct MonoGenericClass * D.18862;
  struct MonoGenericContainer * D.18865;
  void * D.18868;
  struct MonoClass * k;
  guint32 type;
  struct MonoClassField * field;

  D.18827 = BIT_FIELD_REF <*image, 64, 192>;
  D.18828 = D.18827 & 268435456;
  if (D.18828 != 0) goto <D.18829>; else goto <D.18830>;
  <D.18829>:
  {
    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.18831>; else goto <D.18833>;
        <D.18833>:
        D.18834 = mono_defaults.fieldhandle_class;
        handle_class.8 = handle_class;
        if (D.18834 != handle_class.8) goto <D.18831>; else goto <D.18832>;
        <D.18831>:
        D.18836 = image->name;
        D.18837 = monoeg_g_strdup_printf ("Bad field token 0x%08x on image %s.", token, D.18836);
        mono_loader_set_error_bad_image (D.18837);
        D.18838 = 0B;
        return D.18838;
        <D.18832>:
        D.18839 = result->parent;
        *retklass = D.18839;
        D.18838 = result;
        return D.18838;
      }
    finally
      {
        handle_class = {CLOBBER};
      }
  }
  <D.18830>:
  mono_image_lock (image);
  D.18840 = image->field_cache;
  D.18841 = (long unsigned int) token;
  D.18842 = (const void *) D.18841;
  field = monoeg_g_hash_table_lookup (D.18840, D.18842);
  if (field != 0B) goto <D.18843>; else goto <D.18844>;
  <D.18843>:
  D.18845 = field->parent;
  *retklass = D.18845;
  mono_image_unlock (image);
  D.18838 = field;
  return D.18838;
  <D.18844>:
  mono_image_unlock (image);
  D.18846 = token >> 24;
  if (D.18846 == 10) goto <D.18847>; else goto <D.18848>;
  <D.18847>:
  field = field_from_memberref (image, token, retklass, context);
  goto <D.18849>;
  <D.18848>:
  D.18850 = token & 16777215;
  type = mono_metadata_typedef_from_field (image, D.18850);
  if (type == 0) goto <D.18851>; else goto <D.18852>;
  <D.18851>:
  D.18838 = 0B;
  return D.18838;
  <D.18852>:
  D.18853 = type | 33554432;
  k = mono_class_get (image, D.18853);
  if (k == 0B) goto <D.18854>; else goto <D.18855>;
  <D.18854>:
  D.18838 = 0B;
  return D.18838;
  <D.18855>:
  mono_class_init (k);
  if (retklass != 0B) goto <D.18856>; else goto <D.18857>;
  <D.18856>:
  *retklass = k;
  <D.18857>:
  field = mono_class_get_field (k, token);
  <D.18849>:
  mono_image_lock (image);
  if (field != 0B) goto <D.18858>; else goto <D.18859>;
  <D.18858>:
  D.18845 = field->parent;
  if (D.18845 != 0B) goto <D.18860>; else goto <D.18861>;
  <D.18860>:
  D.18845 = field->parent;
  D.18862 = D.18845->generic_class;
  if (D.18862 == 0B) goto <D.18863>; else goto <D.18864>;
  <D.18863>:
  D.18845 = field->parent;
  D.18865 = D.18845->generic_container;
  if (D.18865 == 0B) goto <D.18866>; else goto <D.18867>;
  <D.18866>:
  D.18840 = image->field_cache;
  D.18841 = (long unsigned int) token;
  D.18868 = (void *) D.18841;
  monoeg_g_hash_table_insert_replace (D.18840, D.18868, field, 0);
  <D.18867>:
  <D.18864>:
  <D.18861>:
  <D.18859>:
  mono_image_unlock (image);
  D.18838 = field;
  return D.18838;
}


field_from_memberref (struct MonoImage * image, guint32 token, struct MonoClass * * retklass, struct MonoGenericContext * context)
{
  struct MonoTableInfo * D.18871;
  unsigned int D.18872;
  int D.18873;
  unsigned int D.18874;
  unsigned int D.18875;
  unsigned int D.18876;
  int D.18877;
  char * D.18880;
  gchar * D.18881;
  struct MonoClassField * D.18882;
  unsigned int D.18883;
  unsigned int D.18884;
  unsigned int D.18885;
  unsigned int D.18888;
  const char * D.18889;
  const char * ptr.9;
  const char * ptr.10;
  const char * ptr.11;
  const char * ptr.12;
  char D.18894;
  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.18871 = tables + 160;
      D.18872 = idx + 4294967295;
      D.18873 = (int) D.18872;
      mono_metadata_decode_row (D.18871, D.18873, &cols, 3);
      D.18874 = cols[0];
      nindex = D.18874 >> 3;
      D.18874 = cols[0];
      class = D.18874 & 7;
      D.18875 = cols[1];
      fname = mono_metadata_string_heap (image, D.18875);
      D.18876 = cols[2];
      D.18877 = mono_verifier_verify_memberref_field_signature (image, D.18876, 0B);
      if (D.18877 == 0) goto <D.18878>; else goto <D.18879>;
      <D.18878>:
      D.18880 = image->name;
      D.18881 = monoeg_g_strdup_printf ("Bad field signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, D.18880);
      mono_loader_set_error_bad_image (D.18881);
      D.18882 = 0B;
      return D.18882;
      <D.18879>:
      switch (class) <default: <D.18155>, case 0: <D.18151>, case 1: <D.18153>, case 4: <D.18154>>
      <D.18151>:
      class_table = 33554432;
      D.18883 = nindex | 33554432;
      klass = mono_class_get (image, D.18883);
      goto <D.18152>;
      <D.18153>:
      class_table = 16777216;
      D.18884 = nindex | 16777216;
      klass = mono_class_from_typeref (image, D.18884);
      goto <D.18152>;
      <D.18154>:
      class_table = 452984832;
      D.18885 = nindex | 452984832;
      klass = mono_class_get_full (image, D.18885, context);
      goto <D.18152>;
      <D.18155>:
      monoeg_g_log (0B, 16, "field load from %x", class);
      D.18882 = 0B;
      return D.18882;
      <D.18152>:
      if (klass == 0B) goto <D.18886>; else goto <D.18887>;
      <D.18886>:
      {
        char * name;

        D.18888 = class_table | nindex;
        name = mono_class_name_from_token (image, D.18888);
        D.18888 = class_table | nindex;
        monoeg_g_log (0B, 16, "Missing field %s in class %s (type token %d)", fname, name, D.18888);
        D.18889 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.18889);
        monoeg_g_free (name);
        D.18882 = 0B;
        return D.18882;
      }
      <D.18887>:
      D.18876 = cols[2];
      ptr.9 = mono_metadata_blob_heap (image, D.18876);
      ptr = ptr.9;
      ptr.10 = ptr;
      mono_metadata_decode_blob_size (ptr.10, &ptr);
      ptr.10 = ptr;
      ptr.11 = ptr.10;
      ptr.12 = ptr.11 + 1;
      ptr = ptr.12;
      D.18894 = *ptr.11;
      if (D.18894 != 6) goto <D.18895>; else goto <D.18896>;
      <D.18895>:
      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.18882 = 0B;
      return D.18882;
      <D.18896>:
      D.18876 = cols[2];
      sig_type = find_cached_memberref_sig (image, D.18876);
      if (sig_type == 0B) goto <D.18897>; else goto <D.18898>;
      <D.18897>:
      ptr.10 = ptr;
      sig_type = mono_metadata_parse_type (image, 0, 0, ptr.10, &ptr);
      if (sig_type == 0B) goto <D.18899>; else goto <D.18900>;
      <D.18899>:
      mono_loader_set_error_field_load (klass, fname);
      D.18882 = 0B;
      return D.18882;
      <D.18900>:
      D.18876 = cols[2];
      sig_type = cache_memberref_sig (image, D.18876, sig_type);
      <D.18898>:
      mono_class_init (klass);
      if (retklass != 0B) goto <D.18901>; else goto <D.18902>;
      <D.18901>:
      *retklass = klass;
      <D.18902>:
      field = mono_class_get_field_from_name_full (klass, fname, sig_type);
      if (field == 0B) goto <D.18903>; else goto <D.18904>;
      <D.18903>:
      mono_loader_set_error_field_load (klass, fname);
      <D.18904>:
      D.18882 = field;
      return D.18882;
    }
  finally
    {
      cols = {CLOBBER};
      ptr = {CLOBBER};
    }
}


find_cached_memberref_sig (struct MonoImage * image, guint32 sig_idx)
{
  struct GHashTable * D.18907;
  long unsigned int D.18908;
  const void * D.18909;
  void * D.18910;
  void * res;

  mono_loader_lock ();
  D.18907 = image->memberref_signatures;
  D.18908 = (long unsigned int) sig_idx;
  D.18909 = (const void *) D.18908;
  res = monoeg_g_hash_table_lookup (D.18907, D.18909);
  mono_loader_unlock ();
  D.18910 = res;
  return D.18910;
}


cache_memberref_sig (struct MonoImage * image, guint32 sig_idx, void * sig)
{
  struct GHashTable * D.18912;
  long unsigned int D.18913;
  const void * D.18914;
  void * D.18918;
  unsigned int memberref_sig_cache_size.13;
  unsigned int D.18920;
  void * D.18921;
  void * prev_sig;

  mono_loader_lock ();
  D.18912 = image->memberref_signatures;
  D.18913 = (long unsigned int) sig_idx;
  D.18914 = (const void *) D.18913;
  prev_sig = monoeg_g_hash_table_lookup (D.18912, D.18914);
  if (prev_sig != 0B) goto <D.18915>; else goto <D.18916>;
  <D.18915>:
  sig = prev_sig;
  goto <D.18917>;
  <D.18916>:
  D.18912 = image->memberref_signatures;
  D.18913 = (long unsigned int) sig_idx;
  D.18918 = (void *) D.18913;
  monoeg_g_hash_table_insert_replace (D.18912, D.18918, sig, 0);
  memberref_sig_cache_size.13 = memberref_sig_cache_size;
  D.18920 = memberref_sig_cache_size.13 + 32;
  memberref_sig_cache_size = D.18920;
  <D.18917>:
  mono_loader_unlock ();
  D.18921 = sig;
  return D.18921;
}


__attribute__((visibility ("hidden")))
mono_inflate_generic_signature (struct MonoMethodSignature * sig, struct MonoGenericContext * context, struct MonoError * error)
{
  int D.18923;
  struct MonoMethodSignature * D.18926;
  struct MonoMethodSignature * res;
  struct MonoMethodSignature * cached;

  res = inflate_generic_signature_checked (0B, sig, context, error);
  D.18923 = mono_error_ok (error);
  if (D.18923 == 0) goto <D.18924>; else goto <D.18925>;
  <D.18924>:
  D.18926 = 0B;
  return D.18926;
  <D.18925>:
  cached = mono_metadata_get_inflated_signature (res, context);
  if (cached != res) goto <D.18927>; else goto <D.18928>;
  <D.18927>:
  mono_metadata_free_inflated_signature (res);
  <D.18928>:
  D.18926 = cached;
  return D.18926;
}


inflate_generic_signature_checked (struct MonoImage * image, struct MonoMethodSignature * sig, struct MonoGenericContext * context, struct MonoError * error)
{
  struct MonoMethodSignature * D.18932;
  short unsigned int D.18933;
  long unsigned int D.18934;
  long unsigned int D.18935;
  long unsigned int D.18936;
  struct MonoType * D.18937;
  struct MonoType * D.18938;
  int D.18939;
  struct MonoType * D.18941;
  struct MonoType * D.18942;
  struct MonoType * D.18943;
  int D.18944;
  struct MonoType * D.18948;
  int D.18949;
  <unnamed-unsigned:1> D.18950;
  <unnamed-unsigned:1> D.18951;
  <unnamed-unsigned:6> D.18952;
  <unnamed-unsigned:1> D.18953;
  short unsigned int D.18954;
  short int D.18955;
  unsigned char D.18956;
  <unnamed-unsigned:1> D.18957;
  struct MonoMethodSignature * res;
  gboolean is_open;
  int i;
  void fail = <<< error >>>;

  mono_error_init (error);
  if (context == 0B) goto <D.18930>; else goto <D.18931>;
  <D.18930>:
  D.18932 = sig;
  return D.18932;
  <D.18931>:
  D.18933 = sig->param_count;
  D.18934 = (long unsigned int) D.18933;
  D.18935 = D.18934 + 2;
  D.18936 = D.18935 * 8;
  res = monoeg_malloc0 (D.18936);
  D.18933 = sig->param_count;
  res->param_count = D.18933;
  res->sentinelpos = -1;
  D.18937 = sig->ret;
  D.18938 = mono_class_inflate_generic_type_checked (D.18937, context, error);
  res->ret = D.18938;
  D.18939 = mono_error_ok (error);
  if (D.18939 == 0) goto fail; else goto <D.18940>;
  <D.18940>:
  D.18941 = res->ret;
  is_open = mono_class_is_open_constructed_type (D.18941);
  i = 0;
  goto <D.18237>;
  <D.18236>:
  D.18942 = sig->params[i];
  D.18943 = mono_class_inflate_generic_type_checked (D.18942, context, error);
  res->params[i] = D.18943;
  D.18944 = mono_error_ok (error);
  if (D.18944 == 0) goto fail; else goto <D.18945>;
  <D.18945>:
  if (is_open == 0) goto <D.18946>; else goto <D.18947>;
  <D.18946>:
  D.18948 = res->params[i];
  is_open = mono_class_is_open_constructed_type (D.18948);
  <D.18947>:
  i = i + 1;
  <D.18237>:
  D.18933 = sig->param_count;
  D.18949 = (int) D.18933;
  if (D.18949 > i) goto <D.18236>; else goto <D.18238>;
  <D.18238>:
  D.18950 = sig->hasthis;
  res->hasthis = D.18950;
  D.18951 = sig->explicit_this;
  res->explicit_this = D.18951;
  D.18952 = sig->call_convention;
  res->call_convention = D.18952;
  D.18953 = sig->pinvoke;
  res->pinvoke = D.18953;
  D.18954 = sig->generic_param_count;
  res->generic_param_count = D.18954;
  D.18955 = sig->sentinelpos;
  res->sentinelpos = D.18955;
  D.18956 = (unsigned char) is_open;
  D.18957 = (<unnamed-unsigned:1>) D.18956;
  res->has_type_parameters = D.18957;
  res->is_inflated = 1;
  D.18932 = res;
  return D.18932;
  fail:
  D.18941 = res->ret;
  if (D.18941 != 0B) goto <D.18958>; else goto <D.18959>;
  <D.18958>:
  D.18941 = res->ret;
  mono_metadata_free_type (D.18941);
  <D.18959>:
  i = 0;
  goto <D.18240>;
  <D.18239>:
  D.18948 = res->params[i];
  if (D.18948 != 0B) goto <D.18960>; else goto <D.18961>;
  <D.18960>:
  D.18948 = res->params[i];
  mono_metadata_free_type (D.18948);
  <D.18961>:
  i = i + 1;
  <D.18240>:
  D.18933 = sig->param_count;
  D.18949 = (int) D.18933;
  if (D.18949 > i) goto <D.18239>; else goto <D.18241>;
  <D.18241>:
  monoeg_g_free (res);
  D.18932 = 0B;
  return D.18932;
}


mono_method_get_signature_full (struct MonoMethod * method, struct MonoImage * image, guint32 token, struct MonoGenericContext * context)
{
  unsigned int D.18963;
  int token.14;
  struct MonoMethodSignature * D.18968;
  short unsigned int D.18973;
  int D.18974;
  int D.18975;
  long unsigned int D.18977;
  long unsigned int D.18978;
  struct MonoClass * D.18979;
  struct MonoGenericClass * D.18980;
  long unsigned int D.18983;
  long unsigned int D.18984;
  struct MonoTableInfo * D.18988;
  int D.18989;
  unsigned int D.18990;
  unsigned int sig_idx.15;
  int D.18994;
  unsigned int D.18997;
  unsigned int D.18998;
  char * D.18999;
  gchar * D.19000;
  unsigned int sig_idx.16;
  const char * ptr.17;
  const char * ptr.18;
  int D.19006;
  gchar * D.19009;
  int D.19012;
  const char * D.19015;
  gchar * D.19016;
  unsigned int D.19020;
  unsigned int inflated_signatures_size.19;
  unsigned int D.19022;
  int table;
  int idx;
  int sig_idx;
  guint32 cols[3];
  struct MonoMethodSignature * sig;
  const char * ptr;

  try
    {
      D.18963 = token >> 24;
      table = (int) D.18963;
      token.14 = (int) token;
      idx = token.14 & 16777215;
      if (table == 0) goto <D.18965>; else goto <D.18967>;
      <D.18967>:
      if (table == 6) goto <D.18965>; else goto <D.18966>;
      <D.18965>:
      D.18968 = mono_method_signature (method);
      return D.18968;
      <D.18966>:
      if (table == 43) goto <D.18969>; else goto <D.18970>;
      <D.18969>:
      D.18973 = method->flags;
      D.18974 = (int) D.18973;
      D.18975 = D.18974 & 8192;
      if (D.18975 != 0) goto <D.18971>; else goto <D.18976>;
      <D.18976>:
      D.18977 = BIT_FIELD_REF <*method, 64, 256>;
      D.18978 = D.18977 & 2251799813685248;
      if (D.18978 == 0) goto <D.18971>; else goto <D.18972>;
      <D.18971>:
      D.18968 = 0B;
      return D.18968;
      <D.18972>:
      D.18968 = mono_method_signature (method);
      return D.18968;
      <D.18970>:
      D.18979 = method->klass;
      D.18980 = D.18979->generic_class;
      if (D.18980 != 0B) goto <D.18981>; else goto <D.18982>;
      <D.18981>:
      D.18968 = mono_method_signature (method);
      return D.18968;
      <D.18982>:
      D.18983 = BIT_FIELD_REF <*image, 64, 192>;
      D.18984 = D.18983 & 268435456;
      if (D.18984 != 0) goto <D.18985>; else goto <D.18986>;
      <D.18985>:
      sig = mono_reflection_lookup_signature (image, method, token);
      goto <D.18987>;
      <D.18986>:
      D.18988 = &image->tables[10];
      D.18989 = idx + -1;
      mono_metadata_decode_row (D.18988, D.18989, &cols, 3);
      D.18990 = cols[2];
      sig_idx = (int) D.18990;
      sig_idx.15 = (unsigned int) sig_idx;
      sig = find_cached_memberref_sig (image, sig_idx.15);
      if (sig == 0B) goto <D.18992>; else goto <D.18993>;
      <D.18992>:
      sig_idx.15 = (unsigned int) sig_idx;
      D.18994 = mono_verifier_verify_memberref_method_signature (image, sig_idx.15, 0B);
      if (D.18994 == 0) goto <D.18995>; else goto <D.18996>;
      <D.18995>:
      {
        guint32 class;
        const char * fname;

        D.18997 = cols[0];
        class = D.18997 & 7;
        D.18998 = cols[1];
        fname = mono_metadata_string_heap (image, D.18998);
        D.18999 = image->name;
        D.19000 = monoeg_g_strdup_printf ("Bad method signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, D.18999);
        mono_loader_set_error_bad_image (D.19000);
        D.18968 = 0B;
        return D.18968;
      }
      <D.18996>:
      sig_idx.16 = (unsigned int) sig_idx;
      ptr.17 = mono_metadata_blob_heap (image, sig_idx.16);
      ptr = ptr.17;
      ptr.18 = ptr;
      mono_metadata_decode_blob_size (ptr.18, &ptr);
      ptr.18 = ptr;
      sig = mono_metadata_parse_method_signature (image, 0, ptr.18, 0B);
      if (sig == 0B) goto <D.19004>; else goto <D.19005>;
      <D.19004>:
      D.18968 = 0B;
      return D.18968;
      <D.19005>:
      sig_idx.15 = (unsigned int) sig_idx;
      sig = cache_memberref_sig (image, sig_idx.15, sig);
      <D.18993>:
      D.19006 = mono_verifier_is_sig_compatible (image, method, sig);
      if (D.19006 == 0) goto <D.19007>; else goto <D.19008>;
      <D.19007>:
      {
        guint32 class;
        const char * fname;

        D.18997 = cols[0];
        class = D.18997 & 7;
        D.18998 = cols[1];
        fname = mono_metadata_string_heap (image, D.18998);
        D.18999 = image->name;
        D.19009 = monoeg_g_strdup_printf ("Incompatible method signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, D.18999);
        mono_loader_set_error_bad_image (D.19009);
        D.18968 = 0B;
        return D.18968;
      }
      <D.19008>:
      <D.18987>:
      if (context != 0B) goto <D.19010>; else goto <D.19011>;
      <D.19010>:
      {
        struct MonoError error;
        struct MonoMethodSignature * cached;

        try
          {
            sig = inflate_generic_signature_checked (image, sig, context, &error);
            D.19012 = mono_error_ok (&error);
            if (D.19012 == 0) goto <D.19013>; else goto <D.19014>;
            <D.19013>:
            D.19015 = mono_error_get_message (&error);
            D.19016 = monoeg_g_strdup_printf ("Could not inflate signature %s", D.19015);
            mono_loader_set_error_bad_image (D.19016);
            mono_error_cleanup (&error);
            D.18968 = 0B;
            return D.18968;
            <D.19014>:
            cached = mono_metadata_get_inflated_signature (sig, context);
            if (cached != sig) goto <D.19017>; else goto <D.19018>;
            <D.19017>:
            mono_metadata_free_inflated_signature (sig);
            goto <D.19019>;
            <D.19018>:
            D.19020 = mono_metadata_signature_size (cached);
            inflated_signatures_size.19 = inflated_signatures_size;
            D.19022 = D.19020 + inflated_signatures_size.19;
            inflated_signatures_size = D.19022;
            <D.19019>:
            sig = cached;
          }
        finally
          {
            error = {CLOBBER};
          }
      }
      <D.19011>:
      D.18968 = sig;
      return D.18968;
    }
  finally
    {
      cols = {CLOBBER};
      ptr = {CLOBBER};
    }
}


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

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


__attribute__((visibility ("hidden")))
mono_method_search_in_array_class (struct MonoClass * klass, const char * name, struct MonoMethodSignature * sig)
{
  unsigned char D.19029;
  _Bool D.19030;
  long int D.19031;
  long int D.19032;
  struct MonoMethod * * D.19035;
  long unsigned int D.19036;
  long unsigned int D.19037;
  struct MonoMethod * * D.19038;
  const char * D.19039;
  int D.19040;
  short unsigned int D.19043;
  struct MonoMethodSignature * D.19044;
  short unsigned int D.19045;
  struct MonoMethod * D.19048;
  unsigned int D.19049;
  unsigned int i.20;
  int i;

  mono_class_setup_methods (klass);
  D.19029 = klass->exception_type;
  D.19030 = D.19029 != 0;
  D.19031 = (long int) D.19030;
  D.19032 = __builtin_expect (D.19031, 0);
  if (D.19032 != 0) goto <D.19033>; else goto <D.19034>;
  <D.19033>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 932, "!klass->exception_type");
  <D.19034>:
  i = 0;
  goto <D.18294>;
  <D.18293>:
  {
    struct MonoMethod * method;

    D.19035 = klass->methods;
    D.19036 = (long unsigned int) i;
    D.19037 = D.19036 * 8;
    D.19038 = D.19035 + D.19037;
    method = *D.19038;
    D.19039 = method->name;
    D.19040 = strcmp (D.19039, name);
    if (D.19040 == 0) goto <D.19041>; else goto <D.19042>;
    <D.19041>:
    D.19043 = sig->param_count;
    D.19044 = method->signature;
    D.19045 = D.19044->param_count;
    if (D.19043 == D.19045) goto <D.19046>; else goto <D.19047>;
    <D.19046>:
    D.19048 = method;
    return D.19048;
    <D.19047>:
    <D.19042>:
  }
  i = i + 1;
  <D.18294>:
  D.19049 = klass->method.count;
  i.20 = (unsigned int) i;
  if (D.19049 > i.20) goto <D.18293>; else goto <D.18295>;
  <D.18295>:
  D.19048 = 0B;
  return D.19048;
}


__attribute__((__gnu_inline__, nothrow, leaf, pure))
strcmp (const char * __s1, const char * __s2)
{
  int iftmp.21;
  int iftmp.22;
  int D.19060;
  char * __p1;
  char * __p2;
  int __ret;

  __p1 = __s1;
  __p2 = __s2;
  __asm__ __volatile__("   slr   0,0
0: clst  %1,%2
   jo    0b
   ipm   %0
   srl   %0,28" : "=d" __ret, "=&a" __p1, "=&a" __p2 : "1" __p1, "2" __p2 : "0", "memory", "cc");
  if (__ret != 0) goto <D.19053>; else goto <D.19054>;
  <D.19053>:
  if (__ret == 1) goto <D.19056>; else goto <D.19057>;
  <D.19056>:
  iftmp.22 = -1;
  goto <D.19058>;
  <D.19057>:
  iftmp.22 = 1;
  <D.19058>:
  iftmp.21 = iftmp.22;
  goto <D.19059>;
  <D.19054>:
  iftmp.21 = 0;
  <D.19059>:
  __ret = iftmp.21;
  D.19060 = __ret;
  return D.19060;
}


mono_dllmap_insert (struct MonoImage * assembly, const char * dll, const char * func, const char * tdll, const char * tfunc)
{
  char * iftmp.23;
  char * iftmp.24;
  char * iftmp.25;
  char * iftmp.26;
  struct MonoDllMap * global_dll_map.27;
  char * iftmp.28;
  char * iftmp.29;
  char * iftmp.30;
  char * iftmp.31;
  struct MonoDllMap * D.19098;
  struct MonoDllMap * entry;

  mono_loader_init ();
  mono_loader_lock ();
  if (assembly == 0B) goto <D.19062>; else goto <D.19063>;
  <D.19062>:
  entry = monoeg_malloc0 (40);
  if (dll != 0B) goto <D.19065>; else goto <D.19066>;
  <D.19065>:
  iftmp.23 = monoeg_strdup (dll);
  goto <D.19067>;
  <D.19066>:
  iftmp.23 = 0B;
  <D.19067>:
  entry->dll = iftmp.23;
  if (tdll != 0B) goto <D.19069>; else goto <D.19070>;
  <D.19069>:
  iftmp.24 = monoeg_strdup (tdll);
  goto <D.19071>;
  <D.19070>:
  iftmp.24 = 0B;
  <D.19071>:
  entry->target = iftmp.24;
  if (func != 0B) goto <D.19073>; else goto <D.19074>;
  <D.19073>:
  iftmp.25 = monoeg_strdup (func);
  goto <D.19075>;
  <D.19074>:
  iftmp.25 = 0B;
  <D.19075>:
  entry->func = iftmp.25;
  if (tfunc != 0B) goto <D.19077>; else goto <D.19078>;
  <D.19077>:
  iftmp.26 = monoeg_strdup (tfunc);
  goto <D.19079>;
  <D.19078>:
  iftmp.26 = 0B;
  <D.19079>:
  entry->target_func = iftmp.26;
  global_dll_map.27 = global_dll_map;
  entry->next = global_dll_map.27;
  global_dll_map = entry;
  goto <D.19081>;
  <D.19063>:
  entry = mono_image_alloc0 (assembly, 40);
  if (dll != 0B) goto <D.19083>; else goto <D.19084>;
  <D.19083>:
  iftmp.28 = mono_image_strdup (assembly, dll);
  goto <D.19085>;
  <D.19084>:
  iftmp.28 = 0B;
  <D.19085>:
  entry->dll = iftmp.28;
  if (tdll != 0B) goto <D.19087>; else goto <D.19088>;
  <D.19087>:
  iftmp.29 = mono_image_strdup (assembly, tdll);
  goto <D.19089>;
  <D.19088>:
  iftmp.29 = 0B;
  <D.19089>:
  entry->target = iftmp.29;
  if (func != 0B) goto <D.19091>; else goto <D.19092>;
  <D.19091>:
  iftmp.30 = mono_image_strdup (assembly, func);
  goto <D.19093>;
  <D.19092>:
  iftmp.30 = 0B;
  <D.19093>:
  entry->func = iftmp.30;
  if (tfunc != 0B) goto <D.19095>; else goto <D.19096>;
  <D.19095>:
  iftmp.31 = mono_image_strdup (assembly, tfunc);
  goto <D.19097>;
  <D.19096>:
  iftmp.31 = 0B;
  <D.19097>:
  entry->target_func = iftmp.31;
  D.19098 = assembly->dll_map;
  entry->next = D.19098;
  assembly->dll_map = entry;
  <D.19081>:
  mono_loader_unlock ();
}


mono_lookup_pinvoke_call (struct MonoMethod * method, const char * * exc_class, const char * * exc_arg)
{
  struct MonoClass * D.19099;
  short unsigned int D.19100;
  int D.19101;
  int D.19102;
  _Bool D.19103;
  long int D.19104;
  long int D.19105;
  void * D.19110;
  void * D.19113;
  struct MonoImage * D.19114;
  long unsigned int D.19115;
  long unsigned int D.19116;
  struct GHashTable * D.19119;
  char * import.32;
  short unsigned int D.19126;
  int D.19128;
  <unnamed-unsigned:24> D.19129;
  int D.19130;
  int D.19131;
  unsigned int D.19134;
  <unnamed-unsigned:24> D.19136;
  unsigned int D.19137;
  unsigned int D.19138;
  short unsigned int D.19139;
  unsigned int D.19140;
  const char * import.33;
  unsigned int D.19142;
  int D.19143;
  const char * import.34;
  struct GHashTable * D.19147;
  struct GHashTable * D.19150;
  struct GHashTable * D.19151;
  const char * new_scope.35;
  struct GHashTable * D.19153;
  int D.19160;
  struct MonoDl * internal_module.36;
  struct MonoDl * D.19166;
  char * D.19167;
  long unsigned int D.19168;
  sizetype D.19169;
  const char * D.19170;
  long unsigned int D.19173;
  sizetype D.19174;
  char * D.19175;
  char * D.19179;
  char * D.19183;
  int D.19189;
  int D.19191;
  int D.19193;
  int D.19195;
  char * error_msg.37;
  char * D.19214;
  char * iftmp.38;
  void * D.19243;
  gchar * D.19246;
  gchar * D.19247;
  gchar * D.19248;
  short unsigned int D.19249;
  int D.19250;
  int D.19251;
  void * * D.19254;
  char * error_msg.39;
  int D.19259;
  char * error_msg.40;
  int iftmp.41;
  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.19099 = method->klass;
      image = D.19099->image;
      piinfo = method;
      tables = &image->tables;
      im = tables + 448;
      mr = tables + 416;
      import = 0B;
      found_name = 0B;
      module = 0B;
      cached = 0;
      D.19100 = method->flags;
      D.19101 = (int) D.19100;
      D.19102 = D.19101 & 8192;
      D.19103 = D.19102 == 0;
      D.19104 = (long int) D.19103;
      D.19105 = __builtin_expect (D.19104, 0);
      if (D.19105 != 0) goto <D.19106>; else goto <D.19107>;
      <D.19106>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1344, "method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL");
      <D.19107>:
      if (exc_class != 0B) goto <D.19108>; else goto <D.19109>;
      <D.19108>:
      *exc_class = 0B;
      *exc_arg = 0B;
      <D.19109>:
      D.19110 = piinfo->addr;
      if (D.19110 != 0B) goto <D.19111>; else goto <D.19112>;
      <D.19111>:
      D.19113 = piinfo->addr;
      return D.19113;
      <D.19112>:
      D.19099 = method->klass;
      D.19114 = D.19099->image;
      D.19115 = BIT_FIELD_REF <*D.19114, 64, 192>;
      D.19116 = D.19115 & 268435456;
      if (D.19116 != 0) goto <D.19117>; else goto <D.19118>;
      <D.19117>:
      {
        struct MonoReflectionMethodAux * method_aux;

        D.19099 = method->klass;
        D.19114 = D.19099->image;
        D.19119 = MEM[(struct MonoDynamicImage *)D.19114].method_aux_hash;
        method_aux = monoeg_g_hash_table_lookup (D.19119, method);
        if (method_aux == 0B) goto <D.19120>; else goto <D.19121>;
        <D.19120>:
        D.19113 = 0B;
        return D.19113;
        <D.19121>:
        import.32 = method_aux->dllentry;
        import = import.32;
        orig_scope = method_aux->dll;
      }
      goto <D.19123>;
      <D.19118>:
      D.19126 = piinfo->implmap_idx;
      if (D.19126 == 0) goto <D.19124>; else goto <D.19127>;
      <D.19127>:
      D.19126 = piinfo->implmap_idx;
      D.19128 = (int) D.19126;
      D.19129 = im->rows;
      D.19130 = (int) D.19129;
      if (D.19128 > D.19130) goto <D.19124>; else goto <D.19125>;
      <D.19124>:
      D.19113 = 0B;
      return D.19113;
      <D.19125>:
      D.19126 = piinfo->implmap_idx;
      D.19128 = (int) D.19126;
      D.19131 = D.19128 + -1;
      mono_metadata_decode_row (im, D.19131, &im_cols, 4);
      D.19134 = im_cols[3];
      if (D.19134 == 0) goto <D.19132>; else goto <D.19135>;
      <D.19135>:
      D.19134 = im_cols[3];
      D.19136 = mr->rows;
      D.19137 = (unsigned int) D.19136;
      if (D.19134 > D.19137) goto <D.19132>; else goto <D.19133>;
      <D.19132>:
      D.19113 = 0B;
      return D.19113;
      <D.19133>:
      D.19138 = im_cols[0];
      D.19139 = (short unsigned int) D.19138;
      piinfo->piflags = D.19139;
      D.19140 = im_cols[2];
      import.33 = mono_metadata_string_heap (image, D.19140);
      import = import.33;
      D.19134 = im_cols[3];
      D.19142 = D.19134 + 4294967295;
      D.19143 = (int) D.19142;
      scope_token = mono_metadata_decode_row_col (mr, D.19143, 0);
      orig_scope = mono_metadata_string_heap (image, scope_token);
      <D.19123>:
      import.34 = import;
      mono_dllmap_lookup (image, orig_scope, import.34, &new_scope, &import);
      if (module == 0B) goto <D.19145>; else goto <D.19146>;
      <D.19145>:
      mono_loader_lock ();
      D.19147 = image->pinvoke_scopes;
      if (D.19147 == 0B) goto <D.19148>; else goto <D.19149>;
      <D.19148>:
      D.19150 = monoeg_g_hash_table_new_full (monoeg_g_str_hash, monoeg_g_str_equal, monoeg_g_free, 0B);
      image->pinvoke_scopes = D.19150;
      D.19151 = 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.19151;
      <D.19149>:
      D.19147 = image->pinvoke_scopes;
      new_scope.35 = new_scope;
      module = monoeg_g_hash_table_lookup (D.19147, new_scope.35);
      D.19153 = image->pinvoke_scope_filenames;
      new_scope.35 = new_scope;
      found_name = monoeg_g_hash_table_lookup (D.19153, new_scope.35);
      mono_loader_unlock ();
      if (module != 0B) goto <D.19154>; else goto <D.19155>;
      <D.19154>:
      cached = 1;
      <D.19155>:
      if (found_name != 0B) goto <D.19156>; else goto <D.19157>;
      <D.19156>:
      found_name = monoeg_strdup (found_name);
      <D.19157>:
      <D.19146>:
      if (module == 0B) goto <D.19158>; else goto <D.19159>;
      <D.19158>:
      new_scope.35 = new_scope;
      mono_trace (64, 4, "DllImport attempting to load: \'%s\'.", new_scope.35);
      new_scope.35 = new_scope;
      D.19160 = strcmp (new_scope.35, "__Internal");
      if (D.19160 == 0) goto <D.19161>; else goto <D.19162>;
      <D.19161>:
      internal_module.36 = internal_module;
      if (internal_module.36 == 0B) goto <D.19164>; else goto <D.19165>;
      <D.19164>:
      D.19166 = mono_dl_open (0B, 1, &error_msg);
      internal_module = D.19166;
      <D.19165>:
      module = internal_module;
      <D.19162>:
      <D.19159>:
      i = 0;
      goto <D.18449>;
      <D.18448>:
      {
        char * base_name;
        char * dir_name;
        gboolean is_absolute;

        base_name = 0B;
        dir_name = 0B;
        new_scope.35 = new_scope;
        is_absolute = is_absolute_path (new_scope.35);
        switch (i) <default: <D.18436>, case 0: <D.18430>, case 1: <D.18432>, case 2: <D.18434>>
        <D.18430>:
        new_scope.35 = new_scope;
        file_name = monoeg_strdup (new_scope.35);
        goto <D.18431>;
        <D.18432>:
        new_scope.35 = new_scope;
        D.19167 = strstr (new_scope.35, ".dll");
        new_scope.35 = new_scope;
        new_scope.35 = new_scope;
        D.19168 = __strlen_g (new_scope.35);
        D.19169 = D.19168 + 18446744073709551612;
        D.19170 = new_scope.35 + D.19169;
        if (D.19167 == D.19170) goto <D.19171>; else goto <D.19172>;
        <D.19171>:
        new_scope.35 = new_scope;
        file_name = monoeg_strdup (new_scope.35);
        new_scope.35 = new_scope;
        D.19173 = __strlen_g (new_scope.35);
        D.19174 = D.19173 + 18446744073709551612;
        D.19175 = file_name + D.19174;
        *D.19175 = 0;
        goto <D.19176>;
        <D.19172>:
        // predicted unlikely by continue predictor.
        goto <D.18433>;
        <D.19176>:
        goto <D.18431>;
        <D.18434>:
        if (is_absolute != 0) goto <D.19177>; else goto <D.19178>;
        <D.19177>:
        new_scope.35 = new_scope;
        dir_name = monoeg_g_path_get_dirname (new_scope.35);
        new_scope.35 = new_scope;
        base_name = monoeg_g_path_get_basename (new_scope.35);
        D.19179 = strstr (base_name, "lib");
        if (D.19179 != base_name) goto <D.19180>; else goto <D.19181>;
        <D.19180>:
        {
          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.18431>;
        }
        <D.19181>:
        goto <D.19182>;
        <D.19178>:
        new_scope.35 = new_scope;
        D.19183 = strstr (new_scope.35, "lib");
        new_scope.35 = new_scope;
        if (D.19183 != new_scope.35) goto <D.19184>; else goto <D.19185>;
        <D.19184>:
        new_scope.35 = new_scope;
        file_name = monoeg_g_strdup_printf ("lib%s", new_scope.35);
        goto <D.18431>;
        <D.19185>:
        <D.19182>:
        // predicted unlikely by continue predictor.
        goto <D.18433>;
        <D.18436>:
        new_scope.35 = new_scope;
        D.19189 = monoeg_ascii_strcasecmp ("user32.dll", new_scope.35);
        if (D.19189 == 0) goto <D.19186>; else goto <D.19190>;
        <D.19190>:
        new_scope.35 = new_scope;
        D.19191 = monoeg_ascii_strcasecmp ("kernel32.dll", new_scope.35);
        if (D.19191 == 0) goto <D.19186>; else goto <D.19192>;
        <D.19192>:
        new_scope.35 = new_scope;
        D.19193 = monoeg_ascii_strcasecmp ("user32", new_scope.35);
        if (D.19193 == 0) goto <D.19186>; else goto <D.19194>;
        <D.19194>:
        new_scope.35 = new_scope;
        D.19195 = monoeg_ascii_strcasecmp ("kernel", new_scope.35);
        if (D.19195 == 0) goto <D.19186>; else goto <D.19187>;
        <D.19186>:
        file_name = monoeg_strdup ("libMonoSupportW.so");
        goto <D.19188>;
        <D.19187>:
        // predicted unlikely by continue predictor.
        goto <D.18433>;
        <D.19188>:
        goto <D.18431>;
        <D.18431>:
        if (is_absolute != 0) goto <D.19196>; else goto <D.19197>;
        <D.19196>:
        if (dir_name == 0B) goto <D.19198>; else goto <D.19199>;
        <D.19198>:
        dir_name = monoeg_g_path_get_dirname (file_name);
        <D.19199>:
        if (base_name == 0B) goto <D.19200>; else goto <D.19201>;
        <D.19200>:
        base_name = monoeg_g_path_get_basename (file_name);
        <D.19201>:
        <D.19197>:
        if (module == 0B) goto <D.19202>; else goto <D.19203>;
        <D.19202>:
        if (is_absolute != 0) goto <D.19204>; else goto <D.19205>;
        <D.19204>:
        module = cached_module_load (file_name, 1, &error_msg);
        if (module == 0B) goto <D.19206>; else goto <D.19207>;
        <D.19206>:
        error_msg.37 = error_msg;
        mono_trace (64, 4, "DllImport error loading library \'%s\': \'%s\'.", file_name, error_msg.37);
        error_msg.37 = error_msg;
        monoeg_g_free (error_msg.37);
        goto <D.19209>;
        <D.19207>:
        found_name = monoeg_strdup (file_name);
        <D.19209>:
        <D.19205>:
        <D.19203>:
        if (module == 0B) goto <D.19210>; else goto <D.19211>;
        <D.19210>:
        if (is_absolute == 0) goto <D.19212>; else goto <D.19213>;
        <D.19212>:
        {
          void * iter;
          char * mdirname;

          try
            {
              iter = 0B;
              D.19214 = image->name;
              mdirname = monoeg_g_path_get_dirname (D.19214);
              goto <D.18441>;
              <D.18440>:
              module = cached_module_load (full_name, 1, &error_msg);
              if (module == 0B) goto <D.19215>; else goto <D.19216>;
              <D.19215>:
              error_msg.37 = error_msg;
              mono_trace (64, 4, "DllImport error loading library \'%s\': \'%s\'.", full_name, error_msg.37);
              error_msg.37 = error_msg;
              monoeg_g_free (error_msg.37);
              goto <D.19217>;
              <D.19216>:
              found_name = monoeg_strdup (full_name);
              <D.19217>:
              monoeg_g_free (full_name);
              if (module != 0B) goto <D.18439>; else goto <D.19218>;
              <D.19218>:
              <D.18441>:
              full_name = mono_dl_build_path (mdirname, file_name, &iter);
              if (full_name != 0B) goto <D.18440>; else goto <D.18439>;
              <D.18439>:
              monoeg_g_free (mdirname);
            }
          finally
            {
              iter = {CLOBBER};
            }
        }
        <D.19213>:
        <D.19211>:
        if (module == 0B) goto <D.19219>; else goto <D.19220>;
        <D.19219>:
        {
          void * iter;
          char * file_or_base;

          try
            {
              iter = 0B;
              if (is_absolute != 0) goto <D.19222>; else goto <D.19223>;
              <D.19222>:
              iftmp.38 = base_name;
              goto <D.19224>;
              <D.19223>:
              iftmp.38 = file_name;
              <D.19224>:
              file_or_base = iftmp.38;
              goto <D.18446>;
              <D.18445>:
              module = cached_module_load (full_name, 1, &error_msg);
              if (module == 0B) goto <D.19225>; else goto <D.19226>;
              <D.19225>:
              error_msg.37 = error_msg;
              mono_trace (64, 4, "DllImport error loading library \'%s\': \'%s\'.", full_name, error_msg.37);
              error_msg.37 = error_msg;
              monoeg_g_free (error_msg.37);
              goto <D.19227>;
              <D.19226>:
              found_name = monoeg_strdup (full_name);
              <D.19227>:
              monoeg_g_free (full_name);
              if (module != 0B) goto <D.18444>; else goto <D.19228>;
              <D.19228>:
              <D.18446>:
              full_name = mono_dl_build_path (dir_name, file_or_base, &iter);
              if (full_name != 0B) goto <D.18445>; else goto <D.18444>;
              <D.18444>:
            }
          finally
            {
              iter = {CLOBBER};
            }
        }
        <D.19220>:
        if (module == 0B) goto <D.19229>; else goto <D.19230>;
        <D.19229>:
        module = cached_module_load (file_name, 1, &error_msg);
        if (module == 0B) goto <D.19231>; else goto <D.19232>;
        <D.19231>:
        error_msg.37 = error_msg;
        mono_trace (64, 4, "DllImport error loading library \'%s\': \'%s\'.", file_name, error_msg.37);
        goto <D.19233>;
        <D.19232>:
        found_name = monoeg_strdup (file_name);
        <D.19233>:
        <D.19230>:
        monoeg_g_free (file_name);
        if (is_absolute != 0) goto <D.19234>; else goto <D.19235>;
        <D.19234>:
        monoeg_g_free (base_name);
        monoeg_g_free (dir_name);
        <D.19235>:
        if (module != 0B) goto <D.18447>; else goto <D.19236>;
        <D.19236>:
      }
      <D.18433>:
      i = i + 1;
      <D.18449>:
      if (i <= 3) goto <D.18448>; else goto <D.18447>;
      <D.18447>:
      if (module == 0B) goto <D.19237>; else goto <D.19238>;
      <D.19237>:
      error_msg.37 = error_msg;
      mono_trace (16, 4, "DllImport unable to load library \'%s\'.", error_msg.37);
      error_msg.37 = error_msg;
      monoeg_g_free (error_msg.37);
      if (exc_class != 0B) goto <D.19239>; else goto <D.19240>;
      <D.19239>:
      *exc_class = "DllNotFoundException";
      new_scope.35 = new_scope;
      *exc_arg = new_scope.35;
      <D.19240>:
      D.19113 = 0B;
      return D.19113;
      <D.19238>:
      if (cached == 0) goto <D.19241>; else goto <D.19242>;
      <D.19241>:
      mono_trace (64, 4, "DllImport loaded library \'%s\'.", found_name);
      mono_loader_lock ();
      D.19147 = image->pinvoke_scopes;
      new_scope.35 = new_scope;
      D.19243 = monoeg_g_hash_table_lookup (D.19147, new_scope.35);
      if (D.19243 == 0B) goto <D.19244>; else goto <D.19245>;
      <D.19244>:
      D.19147 = image->pinvoke_scopes;
      new_scope.35 = new_scope;
      D.19246 = monoeg_strdup (new_scope.35);
      monoeg_g_hash_table_insert_replace (D.19147, D.19246, module, 0);
      D.19153 = image->pinvoke_scope_filenames;
      new_scope.35 = new_scope;
      D.19247 = monoeg_strdup (new_scope.35);
      D.19248 = monoeg_strdup (found_name);
      monoeg_g_hash_table_insert_replace (D.19153, D.19247, D.19248, 0);
      <D.19245>:
      mono_loader_unlock ();
      <D.19242>:
      new_scope.35 = new_scope;
      mono_trace (64, 4, "DllImport searching in: \'%s\' (\'%s\').", new_scope.35, found_name);
      monoeg_g_free (found_name);
      import.34 = import;
      mono_trace (64, 4, "Searching for \'%s\'.", import.34);
      D.19249 = piinfo->piflags;
      D.19250 = (int) D.19249;
      D.19251 = D.19250 & 1;
      if (D.19251 != 0) goto <D.19252>; else goto <D.19253>;
      <D.19252>:
      import.34 = import;
      D.19254 = &piinfo->addr;
      error_msg.39 = mono_dl_symbol (module, import.34, D.19254);
      error_msg = error_msg.39;
      goto <D.19256>;
      <D.19253>:
      {
        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.18469>;
        <D.18468>:
        mangle_stdcall = 0;
        goto <D.18466>;
        <D.18465>:
        {
          gboolean need_param_count;

          need_param_count = 0;
          mangle_param_count = 0;
          goto <D.18463>;
          <D.18462>:
          D.19110 = piinfo->addr;
          if (D.19110 != 0B) goto <D.19257>; else goto <D.19258>;
          <D.19257>:
          // predicted unlikely by continue predictor.
          goto <D.18456>;
          <D.19258>:
          mangled_name = import;
          D.19249 = piinfo->piflags;
          D.19250 = (int) D.19249;
          D.19259 = D.19250 & 6;
          switch (D.19259) <default: <D.18461>, case 2: <D.18460>, case 4: <D.18457>, case 6: <D.18459>>
          <D.18457>:
          if (mangle_charset == 0) goto <D.19260>; else goto <D.19261>;
          <D.19260>:
          import.34 = import;
          mangled_name = monoeg_g_strconcat (import.34, "W", 0B);
          <D.19261>:
          goto <D.18458>;
          <D.18459>:
          if (mangle_charset == 1) goto <D.19262>; else goto <D.19263>;
          <D.19262>:
          import.34 = import;
          mangled_name = monoeg_g_strconcat (import.34, "A", 0B);
          <D.19263>:
          goto <D.18458>;
          <D.18460>:
          <D.18461>:
          if (mangle_charset == 1) goto <D.19264>; else goto <D.19265>;
          <D.19264>:
          import.34 = import;
          mangled_name = monoeg_g_strconcat (import.34, "A", 0B);
          <D.19265>:
          goto <D.18458>;
          <D.18458>:
          mangled_name2 = mangled_name;
          mono_trace (64, 4, "Probing \'%s\'.", mangled_name2);
          D.19254 = &piinfo->addr;
          error_msg.40 = mono_dl_symbol (module, mangled_name2, D.19254);
          error_msg = error_msg.40;
          error_msg.37 = error_msg;
          monoeg_g_free (error_msg.37);
          error_msg = 0B;
          D.19110 = piinfo->addr;
          if (D.19110 != 0B) goto <D.19267>; else goto <D.19268>;
          <D.19267>:
          mono_trace (64, 4, "Found as \'%s\'.", mangled_name2);
          <D.19268>:
          if (mangled_name != mangled_name2) goto <D.19269>; else goto <D.19270>;
          <D.19269>:
          monoeg_g_free (mangled_name2);
          <D.19270>:
          import.34 = import;
          if (mangled_name != import.34) goto <D.19271>; else goto <D.19272>;
          <D.19271>:
          monoeg_g_free (mangled_name);
          <D.19272>:
          <D.18456>:
          mangle_param_count = mangle_param_count + 4;
          <D.18463>:
          if (need_param_count != 0) goto <D.19274>; else goto <D.19275>;
          <D.19274>:
          iftmp.41 = 256;
          goto <D.19276>;
          <D.19275>:
          iftmp.41 = 0;
          <D.19276>:
          if (iftmp.41 >= mangle_param_count) goto <D.18462>; else goto <D.18464>;
          <D.18464>:
        }
        mangle_stdcall = mangle_stdcall + 1;
        <D.18466>:
        if (mangle_stdcall <= 1) goto <D.18465>; else goto <D.18467>;
        <D.18467>:
        mangle_charset = mangle_charset + 1;
        <D.18469>:
        if (mangle_charset <= 1) goto <D.18468>; else goto <D.18470>;
        <D.18470>:
      }
      <D.19256>:
      D.19110 = piinfo->addr;
      if (D.19110 == 0B) goto <D.19277>; else goto <D.19278>;
      <D.19277>:
      error_msg.37 = error_msg;
      monoeg_g_free (error_msg.37);
      if (exc_class != 0B) goto <D.19279>; else goto <D.19280>;
      <D.19279>:
      *exc_class = "EntryPointNotFoundException";
      import.34 = import;
      *exc_arg = import.34;
      <D.19280>:
      D.19113 = 0B;
      return D.19113;
      <D.19278>:
      D.19113 = piinfo->addr;
      return D.19113;
    }
  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.19285;
  int D.19290;
  struct MonoDllMap * global_dll_map.42;
  int res;

  if (assembly != 0B) goto <D.19283>; else goto <D.19284>;
  <D.19283>:
  D.19285 = assembly->dll_map;
  if (D.19285 != 0B) goto <D.19286>; else goto <D.19287>;
  <D.19286>:
  D.19285 = assembly->dll_map;
  res = mono_dllmap_lookup_list (D.19285, dll, func, rdll, rfunc);
  if (res != 0) goto <D.19288>; else goto <D.19289>;
  <D.19288>:
  D.19290 = res;
  return D.19290;
  <D.19289>:
  <D.19287>:
  <D.19284>:
  global_dll_map.42 = global_dll_map;
  D.19290 = mono_dllmap_lookup_list (global_dll_map.42, dll, func, rdll, rfunc);
  return D.19290;
}


mono_dllmap_lookup_list (struct MonoDllMap * dll_map, const char * dll, const char * func, const char * * rdll, const char * * rfunc)
{
  int D.19295;
  char * D.19298;
  char D.19299;
  char * D.19301;
  char D.19302;
  char * D.19304;
  int D.19305;
  int D.19308;
  char * D.19313;
  char * D.19316;
  int D.19319;
  char * D.19322;
  int found;

  found = 0;
  *rdll = dll;
  if (dll_map == 0B) goto <D.19293>; else goto <D.19294>;
  <D.19293>:
  D.19295 = 0;
  return D.19295;
  <D.19294>:
  mono_loader_lock ();
  goto <D.18366>;
  <D.18365>:
  D.19298 = dll_map->dll;
  D.19299 = *D.19298;
  if (D.19299 == 105) goto <D.19300>; else goto <D.19296>;
  <D.19300>:
  D.19298 = dll_map->dll;
  D.19301 = D.19298 + 1;
  D.19302 = *D.19301;
  if (D.19302 == 58) goto <D.19303>; else goto <D.19296>;
  <D.19303>:
  D.19298 = dll_map->dll;
  D.19304 = D.19298 + 2;
  D.19305 = monoeg_ascii_strcasecmp (D.19304, dll);
  if (D.19305 != 0) goto <D.19306>; else goto <D.19307>;
  <D.19306>:
  // predicted unlikely by continue predictor.
  goto <D.18363>;
  <D.19307>:
  goto <D.19297>;
  <D.19296>:
  D.19298 = dll_map->dll;
  D.19308 = strcmp (D.19298, dll);
  if (D.19308 != 0) goto <D.19309>; else goto <D.19310>;
  <D.19309>:
  // predicted unlikely by continue predictor.
  goto <D.18363>;
  <D.19310>:
  <D.19297>:
  if (found == 0) goto <D.19311>; else goto <D.19312>;
  <D.19311>:
  D.19313 = dll_map->target;
  if (D.19313 != 0B) goto <D.19314>; else goto <D.19315>;
  <D.19314>:
  D.19313 = dll_map->target;
  *rdll = D.19313;
  found = 1;
  <D.19315>:
  <D.19312>:
  D.19316 = dll_map->func;
  if (D.19316 != 0B) goto <D.19317>; else goto <D.19318>;
  <D.19317>:
  D.19316 = dll_map->func;
  D.19319 = strcmp (D.19316, func);
  if (D.19319 == 0) goto <D.19320>; else goto <D.19321>;
  <D.19320>:
  D.19322 = dll_map->target_func;
  *rfunc = D.19322;
  goto <D.18364>;
  <D.19321>:
  <D.19318>:
  <D.18363>:
  dll_map = dll_map->next;
  <D.18366>:
  if (dll_map != 0B) goto <D.18365>; else goto <D.18364>;
  <D.18364>:
  mono_loader_unlock ();
  D.19295 = found;
  return D.19295;
}


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

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


__attribute__((__gnu_inline__))
__strlen_g (const char * __str)
{
  size_t D.19326;
  long int __ptr.43;
  long int __str.44;
  long int D.19329;
  char * __ptr;
  char * __tmp;

  __ptr = 0B;
  __tmp = __str;
  __asm__ __volatile__("   la    0,0
0: srst  %0,%1
   jo    0b
" : "=&a" __ptr, "=&a" __tmp : "0" __ptr, "1" __tmp : "0", "memory", "cc");
  __ptr.43 = (long int) __ptr;
  __str.44 = (long int) __str;
  D.19329 = __ptr.43 - __str.44;
  D.19326 = (size_t) D.19329;
  return D.19326;
}


cached_module_load (const char * name, int flags, char * * err)
{
  struct GHashTable * global_module_map.45;
  struct GHashTable * D.19336;
  struct MonoDl * D.19339;
  gchar * D.19342;
  struct MonoDl * res;

  if (err != 0B) goto <D.19331>; else goto <D.19332>;
  <D.19331>:
  *err = 0B;
  <D.19332>:
  mono_loader_lock ();
  global_module_map.45 = global_module_map;
  if (global_module_map.45 == 0B) goto <D.19334>; else goto <D.19335>;
  <D.19334>:
  D.19336 = monoeg_g_hash_table_new (monoeg_g_str_hash, monoeg_g_str_equal);
  global_module_map = D.19336;
  <D.19335>:
  global_module_map.45 = global_module_map;
  res = monoeg_g_hash_table_lookup (global_module_map.45, name);
  if (res != 0B) goto <D.19337>; else goto <D.19338>;
  <D.19337>:
  mono_loader_unlock ();
  D.19339 = res;
  return D.19339;
  <D.19338>:
  res = mono_dl_open (name, flags, err);
  if (res != 0B) goto <D.19340>; else goto <D.19341>;
  <D.19340>:
  global_module_map.45 = global_module_map;
  D.19342 = monoeg_strdup (name);
  monoeg_g_hash_table_insert_replace (global_module_map.45, D.19342, res, 0);
  <D.19341>:
  mono_loader_unlock ();
  D.19339 = res;
  return D.19339;
}


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

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


mono_get_method_full (struct MonoImage * image, guint32 token, struct MonoClass * klass, struct MonoGenericContext * context)
{
  unsigned int D.19346;
  struct GHashTable * D.19349;
  struct GHashTable * D.19352;
  long int D.19353;
  long int D.19354;
  const void * D.19355;
  long unsigned int D.19357;
  long unsigned int D.19358;
  struct GHashTable * D.19361;
  struct GHashTable * D.19364;
  const void * D.19365;
  struct MonoMethod * D.19368;
  int used_context.46;
  long unsigned int D.19374;
  long unsigned int D.19375;
  void * D.19387;
  void * D.19391;
  struct MonoMethod * result;
  gboolean used_context;

  try
    {
      result = 0B;
      used_context = 0;
      mono_image_lock (image);
      D.19346 = token >> 24;
      if (D.19346 == 6) goto <D.19347>; else goto <D.19348>;
      <D.19347>:
      D.19349 = image->method_cache;
      if (D.19349 == 0B) goto <D.19350>; else goto <D.19351>;
      <D.19350>:
      D.19352 = monoeg_g_hash_table_new (0B, 0B);
      image->method_cache = D.19352;
      <D.19351>:
      D.19349 = image->method_cache;
      D.19353 = (long int) token;
      D.19354 = D.19353 & 16777215;
      D.19355 = (const void *) D.19354;
      result = monoeg_g_hash_table_lookup (D.19349, D.19355);
      goto <D.19356>;
      <D.19348>:
      D.19357 = BIT_FIELD_REF <*image, 64, 192>;
      D.19358 = D.19357 & 268435456;
      if (D.19358 == 0) goto <D.19359>; else goto <D.19360>;
      <D.19359>:
      D.19361 = image->methodref_cache;
      if (D.19361 == 0B) goto <D.19362>; else goto <D.19363>;
      <D.19362>:
      D.19364 = monoeg_g_hash_table_new (0B, 0B);
      image->methodref_cache = D.19364;
      <D.19363>:
      D.19361 = image->methodref_cache;
      D.19353 = (long int) token;
      D.19365 = (const void *) D.19353;
      result = monoeg_g_hash_table_lookup (D.19361, D.19365);
      <D.19360>:
      <D.19356>:
      mono_image_unlock (image);
      if (result != 0B) goto <D.19366>; else goto <D.19367>;
      <D.19366>:
      D.19368 = result;
      return D.19368;
      <D.19367>:
      result = mono_get_method_from_token (image, token, klass, context, &used_context);
      if (result == 0B) goto <D.19369>; else goto <D.19370>;
      <D.19369>:
      D.19368 = 0B;
      return D.19368;
      <D.19370>:
      mono_image_lock (image);
      used_context.46 = used_context;
      if (used_context.46 == 0) goto <D.19372>; else goto <D.19373>;
      <D.19372>:
      D.19374 = BIT_FIELD_REF <*result, 64, 256>;
      D.19375 = D.19374 & 2251799813685248;
      if (D.19375 == 0) goto <D.19376>; else goto <D.19377>;
      <D.19376>:
      {
        struct MonoMethod * result2;

        result2 = 0B;
        D.19346 = token >> 24;
        if (D.19346 == 6) goto <D.19378>; else goto <D.19379>;
        <D.19378>:
        D.19349 = image->method_cache;
        D.19353 = (long int) token;
        D.19354 = D.19353 & 16777215;
        D.19355 = (const void *) D.19354;
        result2 = monoeg_g_hash_table_lookup (D.19349, D.19355);
        goto <D.19380>;
        <D.19379>:
        D.19357 = BIT_FIELD_REF <*image, 64, 192>;
        D.19358 = D.19357 & 268435456;
        if (D.19358 == 0) goto <D.19381>; else goto <D.19382>;
        <D.19381>:
        D.19361 = image->methodref_cache;
        D.19353 = (long int) token;
        D.19365 = (const void *) D.19353;
        result2 = monoeg_g_hash_table_lookup (D.19361, D.19365);
        <D.19382>:
        <D.19380>:
        if (result2 != 0B) goto <D.19383>; else goto <D.19384>;
        <D.19383>:
        mono_image_unlock (image);
        D.19368 = result2;
        return D.19368;
        <D.19384>:
        D.19346 = token >> 24;
        if (D.19346 == 6) goto <D.19385>; else goto <D.19386>;
        <D.19385>:
        D.19349 = image->method_cache;
        D.19353 = (long int) token;
        D.19354 = D.19353 & 16777215;
        D.19387 = (void *) D.19354;
        monoeg_g_hash_table_insert_replace (D.19349, D.19387, result, 0);
        goto <D.19388>;
        <D.19386>:
        D.19357 = BIT_FIELD_REF <*image, 64, 192>;
        D.19358 = D.19357 & 268435456;
        if (D.19358 == 0) goto <D.19389>; else goto <D.19390>;
        <D.19389>:
        D.19361 = image->methodref_cache;
        D.19353 = (long int) token;
        D.19391 = (void *) D.19353;
        monoeg_g_hash_table_insert_replace (D.19361, D.19391, result, 0);
        <D.19390>:
        <D.19388>:
      }
      <D.19377>:
      <D.19373>:
      mono_image_unlock (image);
      D.19368 = result;
      return D.19368;
    }
  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.19394;
  int token.47;
  long unsigned int D.19396;
  long unsigned int D.19397;
  struct MonoClass * D.19402;
  struct MonoClass * handle_class.48;
  char * D.19406;
  gchar * D.19407;
  struct MonoMethod * D.19408;
  unsigned int idx.49;
  gchar * D.19418;
  <unnamed-unsigned:24> D.19421;
  int D.19422;
  gchar * D.19425;
  struct MonoTableInfo * D.19426;
  int D.19427;
  unsigned int D.19431;
  unsigned int D.19432;
  unsigned int D.19434;
  unsigned int D.19435;
  unsigned int methods_size.50;
  unsigned int D.19437;
  long unsigned int D.19438;
  long unsigned int D.19439;
  unsigned int D.19444;
  short unsigned int D.19447;
  short unsigned int D.19448;
  unsigned int D.19449;
  const char * D.19450;
  const char * sig.51;
  unsigned int D.19454;
  const char * sig.52;
  unsigned int D.19456;
  char D.19457;
  int D.19458;
  int D.19459;
  int D.19464;
  struct MonoClass * D.19469;
  struct MonoClass * D.19470;
  const char * D.19473;
  int D.19474;
  unsigned int D.19480;
  unsigned int D.19481;
  short unsigned int D.19482;
  short unsigned int D.19483;
  struct MonoTableInfo * D.19486;
  int D.19487;
  int D.19488;
  unsigned int D.19489;
  short unsigned int D.19490;
  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.19394 = token >> 24;
      table = (int) D.19394;
      token.47 = (int) token;
      idx = token.47 & 16777215;
      tables = &image->tables;
      generic_container = 0B;
      container = 0B;
      sig = 0B;
      D.19396 = BIT_FIELD_REF <*image, 64, 192>;
      D.19397 = D.19396 & 268435456;
      if (D.19397 != 0) goto <D.19398>; else goto <D.19399>;
      <D.19398>:
      {
        struct MonoClass * handle_class;

        try
          {
            result = mono_lookup_dynamic_token_class (image, token, 1, &handle_class, context);
            if (result != 0B) goto <D.19400>; else goto <D.19401>;
            <D.19400>:
            D.19402 = mono_defaults.methodhandle_class;
            handle_class.48 = handle_class;
            if (D.19402 != handle_class.48) goto <D.19404>; else goto <D.19405>;
            <D.19404>:
            D.19406 = image->name;
            D.19407 = monoeg_g_strdup_printf ("Bad method token 0x%08x on image %s.", token, D.19406);
            mono_loader_set_error_bad_image (D.19407);
            D.19408 = 0B;
            return D.19408;
            <D.19405>:
            <D.19401>:
            D.19408 = result;
            return D.19408;
          }
        finally
          {
            handle_class = {CLOBBER};
          }
      }
      <D.19399>:
      if (table != 6) goto <D.19409>; else goto <D.19410>;
      <D.19409>:
      if (table == 43) goto <D.19411>; else goto <D.19412>;
      <D.19411>:
      if (used_context != 0B) goto <D.19413>; else goto <D.19414>;
      <D.19413>:
      *used_context = 1;
      <D.19414>:
      idx.49 = (unsigned int) idx;
      D.19408 = method_from_methodspec (image, context, idx.49);
      return D.19408;
      <D.19412>:
      if (table != 10) goto <D.19416>; else goto <D.19417>;
      <D.19416>:
      monoeg_g_log (0B, 16, "got wrong token: 0x%08x\n", token);
      D.19406 = image->name;
      D.19418 = monoeg_g_strdup_printf ("Bad method token 0x%08x on image %s.", token, D.19406);
      mono_loader_set_error_bad_image (D.19418);
      D.19408 = 0B;
      return D.19408;
      <D.19417>:
      idx.49 = (unsigned int) idx;
      D.19408 = method_from_memberref (image, idx.49, context, used_context);
      return D.19408;
      <D.19410>:
      if (used_context != 0B) goto <D.19419>; else goto <D.19420>;
      <D.19419>:
      *used_context = 0;
      <D.19420>:
      D.19421 = image->tables[6].rows;
      D.19422 = (int) D.19421;
      if (D.19422 < idx) goto <D.19423>; else goto <D.19424>;
      <D.19423>:
      D.19406 = image->name;
      D.19425 = monoeg_g_strdup_printf ("Bad method token 0x%08x on image %s.", token, D.19406);
      mono_loader_set_error_bad_image (D.19425);
      D.19408 = 0B;
      return D.19408;
      <D.19424>:
      D.19426 = &image->tables[6];
      D.19427 = idx + -1;
      mono_metadata_decode_row (D.19426, D.19427, &cols, 6);
      D.19431 = cols[2];
      D.19432 = D.19431 & 8192;
      if (D.19432 != 0) goto <D.19428>; else goto <D.19433>;
      <D.19433>:
      D.19434 = cols[1];
      D.19435 = D.19434 & 4096;
      if (D.19435 != 0) goto <D.19428>; else goto <D.19429>;
      <D.19428>:
      result = mono_image_alloc0 (image, 56);
      goto <D.19430>;
      <D.19429>:
      result = mono_image_alloc0 (image, 40);
      methods_size.50 = methods_size;
      D.19437 = methods_size.50 + 40;
      methods_size = D.19437;
      <D.19430>:
      D.19438 = mono_stats.method_count;
      D.19439 = D.19438 + 1;
      mono_stats.method_count = D.19439;
      if (klass == 0B) goto <D.19440>; else goto <D.19441>;
      <D.19440>:
      {
        guint32 type;

        type = mono_metadata_typedef_from_method (image, token);
        if (type == 0) goto <D.19442>; else goto <D.19443>;
        <D.19442>:
        D.19408 = 0B;
        return D.19408;
        <D.19443>:
        D.19444 = type | 33554432;
        klass = mono_class_get (image, D.19444);
        if (klass == 0B) goto <D.19445>; else goto <D.19446>;
        <D.19445>:
        D.19408 = 0B;
        return D.19408;
        <D.19446>:
      }
      <D.19441>:
      result->slot = -1;
      result->klass = klass;
      D.19431 = cols[2];
      D.19447 = (short unsigned int) D.19431;
      result->flags = D.19447;
      D.19434 = cols[1];
      D.19448 = (short unsigned int) D.19434;
      result->iflags = D.19448;
      result->token = token;
      D.19449 = cols[3];
      D.19450 = mono_metadata_string_heap (image, D.19449);
      result->name = D.19450;
      sig.51 = sig;
      if (sig.51 == 0B) goto <D.19452>; else goto <D.19453>;
      <D.19452>:
      D.19454 = cols[4];
      sig.52 = mono_metadata_blob_heap (image, D.19454);
      sig = sig.52;
      <D.19453>:
      sig.51 = sig;
      D.19456 = mono_metadata_decode_blob_size (sig.51, &sig);
      size = (int) D.19456;
      container = klass->generic_container;
      sig.51 = sig;
      D.19457 = *sig.51;
      D.19458 = (int) D.19457;
      D.19459 = D.19458 & 16;
      if (D.19459 != 0) goto <D.19460>; else goto <D.19461>;
      <D.19460>:
      generic_container = mono_metadata_load_generic_params (image, token, container);
      <D.19461>:
      if (generic_container != 0B) goto <D.19462>; else goto <D.19463>;
      <D.19462>:
      result->is_generic = 1;
      generic_container->owner.method = result;
      D.19464 = mono_metadata_load_generic_param_constraints_full (image, token, generic_container);
      if (D.19464 == 0) goto <D.19465>; else goto <D.19466>;
      <D.19465>:
      D.19408 = 0B;
      return D.19408;
      <D.19466>:
      container = generic_container;
      <D.19463>:
      D.19434 = cols[1];
      D.19435 = D.19434 & 4096;
      if (D.19435 != 0) goto <D.19467>; else goto <D.19468>;
      <D.19467>:
      D.19469 = result->klass;
      D.19470 = mono_defaults.string_class;
      if (D.19469 == D.19470) goto <D.19471>; else goto <D.19472>;
      <D.19471>:
      D.19473 = result->name;
      D.19474 = strcmp (D.19473, ".ctor");
      if (D.19474 == 0) goto <D.19475>; else goto <D.19476>;
      <D.19475>:
      result->string_ctor = 1;
      <D.19476>:
      <D.19472>:
      goto <D.19477>;
      <D.19468>:
      D.19431 = cols[2];
      D.19432 = D.19431 & 8192;
      if (D.19432 != 0) goto <D.19478>; else goto <D.19479>;
      <D.19478>:
      {
        struct MonoMethodPInvoke * piinfo;

        piinfo = result;
        D.19427 = idx + -1;
        D.19480 = (unsigned int) D.19427;
        D.19481 = mono_metadata_implmap_from_method (image, D.19480);
        D.19482 = (short unsigned int) D.19481;
        piinfo->implmap_idx = D.19482;
        D.19483 = piinfo->implmap_idx;
        if (D.19483 != 0) goto <D.19484>; else goto <D.19485>;
        <D.19484>:
        D.19486 = tables + 448;
        D.19483 = piinfo->implmap_idx;
        D.19487 = (int) D.19483;
        D.19488 = D.19487 + -1;
        D.19489 = mono_metadata_decode_row_col (D.19486, D.19488, 0);
        D.19490 = (short unsigned int) D.19489;
        piinfo->piflags = D.19490;
        <D.19485>:
      }
      <D.19479>:
      <D.19477>:
      if (generic_container != 0B) goto <D.19491>; else goto <D.19492>;
      <D.19491>:
      mono_method_set_generic_container (result, generic_container);
      <D.19492>:
      D.19408 = result;
      return D.19408;
    }
  finally
    {
      sig = {CLOBBER};
      cols = {CLOBBER};
    }
}


method_from_methodspec (struct MonoImage * image, struct MonoGenericContext * context, guint32 idx)
{
  struct MonoTableInfo * D.19496;
  unsigned int D.19497;
  int D.19498;
  unsigned int D.19499;
  int D.19500;
  struct MonoMethod * D.19503;
  const char * ptr.53;
  const char * ptr.54;
  const char * ptr.55;
  _Bool D.19507;
  long int D.19508;
  long int D.19509;
  int param_count.56;
  long unsigned int D.19517;
  long unsigned int D.19518;
  int D.19521;
  unsigned int D.19524;
  unsigned int D.19527;
  struct MonoGenericClass * D.19531;
  long unsigned int D.19534;
  long unsigned int D.19535;
  _Bool D.19536;
  long int D.19537;
  long int D.19538;
  struct MonoGenericInst * iftmp.57;
  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.19496 = tables + 688;
      D.19497 = idx + 4294967295;
      D.19498 = (int) D.19497;
      mono_metadata_decode_row (D.19496, D.19498, &cols, 2);
      token = cols[0];
      nindex = token >> 1;
      D.19499 = cols[1];
      D.19500 = mono_verifier_verify_methodspec_signature (image, D.19499, 0B);
      if (D.19500 == 0) goto <D.19501>; else goto <D.19502>;
      <D.19501>:
      D.19503 = 0B;
      return D.19503;
      <D.19502>:
      D.19499 = cols[1];
      ptr.53 = mono_metadata_blob_heap (image, D.19499);
      ptr = ptr.53;
      ptr.54 = ptr;
      mono_metadata_decode_value (ptr.54, &ptr);
      ptr.54 = ptr;
      ptr.55 = ptr.54 + 1;
      ptr = ptr.55;
      ptr.54 = ptr;
      param_count = mono_metadata_decode_value (ptr.54, &ptr);
      D.19507 = param_count == 0;
      D.19508 = (long int) D.19507;
      D.19509 = __builtin_expect (D.19508, 0);
      if (D.19509 != 0) goto <D.19510>; else goto <D.19511>;
      <D.19510>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1110, "param_count");
      <D.19511>:
      param_count.56 = (int) param_count;
      ptr.54 = ptr;
      inst = mono_metadata_parse_generic_inst (image, 0B, param_count.56, ptr.54, &ptr);
      if (inst == 0B) goto <D.19513>; else goto <D.19514>;
      <D.19513>:
      D.19503 = 0B;
      return D.19503;
      <D.19514>:
      if (context != 0B) goto <D.19515>; else goto <D.19516>;
      <D.19515>:
      D.19517 = BIT_FIELD_REF <*inst, 64, 0>;
      D.19518 = D.19517 & 512;
      if (D.19518 != 0) goto <D.19519>; else goto <D.19520>;
      <D.19519>:
      inst = mono_metadata_inflate_generic_inst (inst, context, &error);
      D.19521 = mono_error_ok (&error);
      if (D.19521 == 0) goto <D.19522>; else goto <D.19523>;
      <D.19522>:
      mono_error_cleanup (&error);
      D.19503 = 0B;
      return D.19503;
      <D.19523>:
      <D.19520>:
      <D.19516>:
      D.19524 = token & 1;
      if (D.19524 == 0) goto <D.19525>; else goto <D.19526>;
      <D.19525>:
      D.19527 = nindex | 100663296;
      method = mono_get_method_full (image, D.19527, 0B, context);
      goto <D.19528>;
      <D.19526>:
      method = method_from_memberref (image, nindex, context, 0B);
      <D.19528>:
      if (method == 0B) goto <D.19529>; else goto <D.19530>;
      <D.19529>:
      D.19503 = 0B;
      return D.19503;
      <D.19530>:
      klass = method->klass;
      D.19531 = klass->generic_class;
      if (D.19531 != 0B) goto <D.19532>; else goto <D.19533>;
      <D.19532>:
      D.19534 = BIT_FIELD_REF <*method, 64, 256>;
      D.19535 = D.19534 & 2251799813685248;
      D.19536 = D.19535 == 0;
      D.19537 = (long int) D.19536;
      D.19538 = __builtin_expect (D.19537, 0);
      if (D.19538 != 0) goto <D.19539>; else goto <D.19540>;
      <D.19539>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1135, "method->is_inflated");
      <D.19540>:
      method = MEM[(struct MonoMethodInflated *)method].declaring;
      <D.19533>:
      D.19531 = klass->generic_class;
      if (D.19531 != 0B) goto <D.19542>; else goto <D.19543>;
      <D.19542>:
      D.19531 = klass->generic_class;
      iftmp.57 = D.19531->context.class_inst;
      goto <D.19544>;
      <D.19543>:
      iftmp.57 = 0B;
      <D.19544>:
      new_context.class_inst = iftmp.57;
      new_context.method_inst = inst;
      D.19503 = mono_class_inflate_generic_method_full (method, klass, &new_context);
      return D.19503;
    }
  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)
{
  struct MonoTableInfo * D.19547;
  unsigned int D.19548;
  int D.19549;
  unsigned int D.19550;
  unsigned int D.19551;
  _Bool D.19554;
  int D.19555;
  unsigned int D.19556;
  char * D.19559;
  const char * D.19560;
  struct MonoMethod * D.19561;
  unsigned int D.19562;
  unsigned int D.19565;
  unsigned int D.19568;
  _Bool D.19569;
  long int D.19570;
  long int D.19571;
  int D.19574;
  const char * D.19577;
  const char * ptr.58;
  const char * ptr.59;
  unsigned char D.19584;
  struct MonoClass * iftmp.60;
  struct MonoGenericClass * D.19590;
  struct MonoType * D.19596;
  short unsigned int D.19597;
  int D.19600;
  struct MonoImage * D.19601;
  char * D.19602;
  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.19547 = tables + 160;
      D.19548 = idx + 4294967295;
      D.19549 = (int) D.19548;
      mono_metadata_decode_row (D.19547, D.19549, &cols, 3);
      D.19550 = cols[0];
      nindex = D.19550 >> 3;
      D.19550 = cols[0];
      class = D.19550 & 7;
      D.19551 = cols[1];
      mname = mono_metadata_string_heap (image, D.19551);
      if (used_context != 0B) goto <D.19552>; else goto <D.19553>;
      <D.19552>:
      D.19554 = class == 4;
      D.19555 = (int) D.19554;
      *used_context = D.19555;
      <D.19553>:
      switch (class) <default: <D.18320>, case 0: <D.18317>, case 1: <D.18312>, case 3: <D.18319>, case 4: <D.18315>>
      <D.18312>:
      D.19556 = nindex | 16777216;
      klass = mono_class_from_typeref (image, D.19556);
      if (klass == 0B) goto <D.19557>; else goto <D.19558>;
      <D.19557>:
      {
        char * name;

        D.19556 = nindex | 16777216;
        name = mono_class_name_from_token (image, D.19556);
        D.19559 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s in assembly %s, type %s", mname, D.19559, name);
        D.19560 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.19560);
        monoeg_g_free (name);
        D.19561 = 0B;
        return D.19561;
      }
      <D.19558>:
      goto <D.18314>;
      <D.18315>:
      D.19562 = nindex | 452984832;
      klass = mono_class_get_full (image, D.19562, typespec_context);
      if (klass == 0B) goto <D.19563>; else goto <D.19564>;
      <D.19563>:
      {
        char * name;

        D.19562 = nindex | 452984832;
        name = mono_class_name_from_token (image, D.19562);
        D.19559 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s in assembly %s, type %s", mname, D.19559, name);
        D.19560 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.19560);
        monoeg_g_free (name);
        D.19561 = 0B;
        return D.19561;
      }
      <D.19564>:
      goto <D.18314>;
      <D.18317>:
      D.19565 = nindex | 33554432;
      klass = mono_class_get (image, D.19565);
      if (klass == 0B) goto <D.19566>; else goto <D.19567>;
      <D.19566>:
      {
        char * name;

        D.19565 = nindex | 33554432;
        name = mono_class_name_from_token (image, D.19565);
        D.19559 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s in assembly %s, type %s", mname, D.19559, name);
        D.19560 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.19560);
        monoeg_g_free (name);
        D.19561 = 0B;
        return D.19561;
      }
      <D.19567>:
      goto <D.18314>;
      <D.18319>:
      D.19568 = nindex | 100663296;
      D.19561 = mono_get_method (image, D.19568, 0B);
      return D.19561;
      <D.18320>:
      {
        char * message;

        message = monoeg_g_strdup_printf ("Memberref parent unknown: class: %d, index %d", class, nindex);
        mono_loader_set_error_method_load ("", message);
        D.19561 = 0B;
        return D.19561;
      }
      <D.18314>:
      D.19569 = klass == 0B;
      D.19570 = (long int) D.19569;
      D.19571 = __builtin_expect (D.19570, 0);
      if (D.19571 != 0) goto <D.19572>; else goto <D.19573>;
      <D.19572>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1016, "klass");
      <D.19573>:
      mono_class_init (klass);
      sig_idx = cols[2];
      D.19574 = mono_verifier_verify_memberref_method_signature (image, sig_idx, 0B);
      if (D.19574 == 0) goto <D.19575>; else goto <D.19576>;
      <D.19575>:
      D.19577 = klass->name;
      mono_loader_set_error_method_load (D.19577, mname);
      D.19561 = 0B;
      return D.19561;
      <D.19576>:
      ptr.58 = mono_metadata_blob_heap (image, sig_idx);
      ptr = ptr.58;
      ptr.59 = ptr;
      mono_metadata_decode_blob_size (ptr.59, &ptr);
      sig = find_cached_memberref_sig (image, sig_idx);
      if (sig == 0B) goto <D.19580>; else goto <D.19581>;
      <D.19580>:
      ptr.59 = ptr;
      sig = mono_metadata_parse_method_signature (image, 0, ptr.59, 0B);
      if (sig == 0B) goto <D.19582>; else goto <D.19583>;
      <D.19582>:
      D.19561 = 0B;
      return D.19561;
      <D.19583>:
      sig = cache_memberref_sig (image, sig_idx, sig);
      <D.19581>:
      switch (class) <default: <D.18328>, case 0: <D.18323>, case 1: <D.18322>, case 4: <D.18325>>
      <D.18322>:
      <D.18323>:
      method = find_method (klass, 0B, mname, sig, klass);
      goto <D.18324>;
      <D.18325>:
      {
        struct MonoType * type;

        type = &klass->byval_arg;
        D.19584 = type->type;
        if (D.19584 != 20) goto <D.19585>; else goto <D.19586>;
        <D.19585>:
        D.19584 = type->type;
        if (D.19584 != 29) goto <D.19587>; else goto <D.19588>;
        <D.19587>:
        {
          struct MonoClass * in_class;

          D.19590 = klass->generic_class;
          if (D.19590 != 0B) goto <D.19591>; else goto <D.19592>;
          <D.19591>:
          D.19590 = klass->generic_class;
          iftmp.60 = D.19590->container_class;
          goto <D.19593>;
          <D.19592>:
          iftmp.60 = klass;
          <D.19593>:
          in_class = iftmp.60;
          method = find_method (in_class, 0B, mname, sig, klass);
          goto <D.18324>;
        }
        <D.19588>:
        <D.19586>:
        method = mono_method_search_in_array_class (klass, mname, sig);
        goto <D.18324>;
      }
      <D.18328>:
      monoeg_g_log (0B, 4, "Memberref parent unknown: class: %d, index %d", class, nindex);
      <D.18329>:
      goto <D.18329>;
      monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "loader.c", 1061);
      <D.18324>:
      if (method == 0B) goto <D.19594>; else goto <D.19595>;
      <D.19594>:
      {
        char * msig;
        char * class_name;
        struct GString * s;

        msig = mono_signature_get_desc (sig, 0);
        D.19596 = &klass->byval_arg;
        class_name = mono_type_get_name (D.19596);
        s = monoeg_g_string_new (mname);
        D.19597 = sig->generic_param_count;
        if (D.19597 != 0) goto <D.19598>; else goto <D.19599>;
        <D.19598>:
        D.19597 = sig->generic_param_count;
        D.19600 = (int) D.19597;
        monoeg_g_string_append_printf (s, "<[%d]>", D.19600);
        <D.19599>:
        monoeg_g_string_append_printf (s, "(%s)", msig);
        monoeg_g_free (msig);
        msig = monoeg_g_string_free (s, 0);
        D.19601 = klass->image;
        D.19602 = D.19601->name;
        D.19559 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s::%s in assembly %s, referenced in assembly %s", class_name, msig, D.19602, D.19559);
        mono_loader_set_error_method_load (class_name, mname);
        monoeg_g_free (msig);
        monoeg_g_free (class_name);
      }
      <D.19595>:
      D.19561 = method;
      return D.19561;
    }
  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.61;
  unsigned int D.19609;
  unsigned int D.19610;
  unsigned char D.19612;
  struct MonoType * D.19616;
  const char * D.19619;
  char D.19621;
  _Bool D.19624;
  long int D.19625;
  long int D.19626;
  char D.19630;
  int D.19633;
  int D.19635;
  short unsigned int D.19637;
  short unsigned int D.19638;
  struct MonoClass * * D.19641;
  long unsigned int D.19642;
  long unsigned int D.19643;
  struct MonoClass * * D.19644;
  struct MonoClass * * D.19645;
  struct MonoClass * * D.19646;
  struct MonoType * D.19647;
  const char * D.19650;
  char D.19652;
  const char * iftmp.62;
  int D.19659;
  _Bool D.19660;
  _Bool D.19661;
  _Bool D.19662;
  long int D.19663;
  long int D.19664;
  struct MonoClass * D.19669;
  struct MonoMethod * D.19670;
  int i;
  char * qname;
  char * fqname;
  char * class_name;
  gboolean is_interface;
  struct MonoMethod * result;
  void out = <<< error >>>;

  result = 0B;
  D.19609 = in_class->flags;
  D.19610 = D.19609 & 32;
  if (D.19610 != 0) goto <D.19606>; else goto <D.19611>;
  <D.19611>:
  D.19612 = in_class->byval_arg.type;
  if (D.19612 == 19) goto <D.19606>; else goto <D.19613>;
  <D.19613>:
  D.19612 = in_class->byval_arg.type;
  if (D.19612 == 30) goto <D.19606>; else goto <D.19607>;
  <D.19606>:
  iftmp.61 = 1;
  goto <D.19608>;
  <D.19607>:
  iftmp.61 = 0;
  <D.19608>:
  is_interface = iftmp.61;
  if (ic != 0B) goto <D.19614>; else goto <D.19615>;
  <D.19614>:
  D.19616 = &ic->byval_arg;
  class_name = mono_type_get_name_full (D.19616, 0);
  qname = monoeg_g_strconcat (class_name, ".", name, 0B);
  D.19619 = ic->name_space;
  if (D.19619 != 0B) goto <D.19620>; else goto <D.19617>;
  <D.19620>:
  D.19619 = ic->name_space;
  D.19621 = *D.19619;
  if (D.19621 != 0) goto <D.19622>; else goto <D.19617>;
  <D.19622>:
  D.19619 = ic->name_space;
  fqname = monoeg_g_strconcat (D.19619, ".", class_name, ".", name, 0B);
  goto <D.19618>;
  <D.19617>:
  fqname = 0B;
  <D.19618>:
  goto <D.19623>;
  <D.19615>:
  fqname = 0B;
  qname = fqname;
  class_name = qname;
  <D.19623>:
  goto <D.18216>;
  <D.18225>:
  D.19624 = from_class == 0B;
  D.19625 = (long int) D.19624;
  D.19626 = __builtin_expect (D.19625, 0);
  if (D.19626 != 0) goto <D.19627>; else goto <D.19628>;
  <D.19627>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 684, "from_class");
  <D.19628>:
  result = find_method_in_class (in_class, name, qname, fqname, sig, from_class);
  if (result != 0B) goto out; else goto <D.19629>;
  <D.19629>:
  D.19630 = *name;
  if (D.19630 == 46) goto <D.19631>; else goto <D.19632>;
  <D.19631>:
  D.19633 = strcmp (name, ".ctor");
  if (D.19633 == 0) goto <D.18215>; else goto <D.19634>;
  <D.19634>:
  D.19635 = strcmp (name, ".cctor");
  if (D.19635 == 0) goto <D.18215>; else goto <D.19636>;
  <D.19636>:
  <D.19632>:
  D.19637 = from_class->interface_offsets_count;
  D.19638 = in_class->interface_offsets_count;
  if (D.19637 != D.19638) goto <D.19639>; else goto <D.19640>;
  <D.19639>:
  in_class = in_class->parent;
  from_class = from_class->parent;
  // predicted unlikely by continue predictor.
  goto <D.18216>;
  <D.19640>:
  i = 0;
  goto <D.18223>;
  <D.18222>:
  {
    struct MonoClass * in_ic;
    struct MonoClass * from_ic;
    char * ic_qname;
    char * ic_fqname;
    char * ic_class_name;

    D.19641 = in_class->interfaces_packed;
    D.19642 = (long unsigned int) i;
    D.19643 = D.19642 * 8;
    D.19644 = D.19641 + D.19643;
    in_ic = *D.19644;
    D.19645 = from_class->interfaces_packed;
    D.19642 = (long unsigned int) i;
    D.19643 = D.19642 * 8;
    D.19646 = D.19645 + D.19643;
    from_ic = *D.19646;
    D.19647 = &in_ic->byval_arg;
    ic_class_name = mono_type_get_name_full (D.19647, 0);
    ic_qname = monoeg_g_strconcat (ic_class_name, ".", name, 0B);
    D.19650 = in_ic->name_space;
    if (D.19650 != 0B) goto <D.19651>; else goto <D.19648>;
    <D.19651>:
    D.19650 = in_ic->name_space;
    D.19652 = *D.19650;
    if (D.19652 != 0) goto <D.19653>; else goto <D.19648>;
    <D.19653>:
    D.19650 = in_ic->name_space;
    ic_fqname = monoeg_g_strconcat (D.19650, ".", ic_class_name, ".", name, 0B);
    goto <D.19649>;
    <D.19648>:
    ic_fqname = 0B;
    <D.19649>:
    if (ic != 0B) goto <D.19655>; else goto <D.19656>;
    <D.19655>:
    iftmp.62 = name;
    goto <D.19657>;
    <D.19656>:
    iftmp.62 = 0B;
    <D.19657>:
    result = find_method_in_class (in_ic, iftmp.62, 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.19658>;
    <D.19658>:
  }
  i = i + 1;
  <D.18223>:
  D.19638 = in_class->interface_offsets_count;
  D.19659 = (int) D.19638;
  if (D.19659 > i) goto <D.18222>; else goto <D.18224>;
  <D.18224>:
  in_class = in_class->parent;
  from_class = from_class->parent;
  <D.18216>:
  if (in_class != 0B) goto <D.18225>; else goto <D.18215>;
  <D.18215>:
  D.19660 = in_class == 0B;
  D.19624 = from_class == 0B;
  D.19661 = D.19660 ^ D.19624;
  D.19662 = D.19661;
  D.19663 = (long int) D.19662;
  D.19664 = __builtin_expect (D.19663, 0);
  if (D.19664 != 0) goto <D.19665>; else goto <D.19666>;
  <D.19665>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 725, "!in_class == !from_class");
  <D.19666>:
  if (is_interface != 0) goto <D.19667>; else goto <D.19668>;
  <D.19667>:
  D.19669 = mono_defaults.object_class;
  D.19669 = mono_defaults.object_class;
  result = find_method_in_class (D.19669, name, qname, fqname, sig, D.19669);
  <D.19668>:
  out:
  monoeg_g_free (class_name);
  monoeg_g_free (fqname);
  monoeg_g_free (qname);
  D.19670 = result;
  return D.19670;
}


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.19672;
  struct MonoImage * D.19675;
  long unsigned int D.19676;
  long unsigned int D.19677;
  struct MonoMethod * * D.19680;
  unsigned char D.19683;
  struct MonoGenericClass * D.19688;
  unsigned int D.19691;
  unsigned int i.63;
  unsigned int D.19693;
  int D.19694;
  unsigned int D.19695;
  int D.19701;
  int D.19703;
  int D.19705;
  unsigned int D.19706;
  unsigned int D.19707;
  long unsigned int D.19712;
  long unsigned int D.19713;
  int D.19716;
  struct MonoMethod * D.19719;
  unsigned int D.19720;
  long unsigned int D.19723;
  long unsigned int D.19724;
  struct MonoMethod * * D.19725;
  const char * D.19733;
  int D.19734;
  int D.19736;
  int D.19738;
  int D.19743;
  int D.19746;
  int i;

  D.19672 = klass->type_token;
  if (D.19672 != 0) goto <D.19673>; else goto <D.19674>;
  <D.19673>:
  D.19675 = klass->image;
  D.19676 = BIT_FIELD_REF <*D.19675, 64, 192>;
  D.19677 = D.19676 & 268435456;
  if (D.19677 == 0) goto <D.19678>; else goto <D.19679>;
  <D.19678>:
  D.19680 = klass->methods;
  if (D.19680 == 0B) goto <D.19681>; else goto <D.19682>;
  <D.19681>:
  D.19683 = klass->rank;
  if (D.19683 == 0) goto <D.19684>; else goto <D.19685>;
  <D.19684>:
  if (klass == from_class) goto <D.19686>; else goto <D.19687>;
  <D.19686>:
  D.19688 = from_class->generic_class;
  if (D.19688 == 0B) goto <D.19689>; else goto <D.19690>;
  <D.19689>:
  i = 0;
  goto <D.18193>;
  <D.18192>:
  {
    guint32 cols[6];
    struct MonoMethod * method;
    const char * m_name;
    struct MonoMethodSignature * other_sig;

    try
      {
        D.19675 = klass->image;
        D.19691 = klass->method.first;
        i.63 = (unsigned int) i;
        D.19693 = D.19691 + i.63;
        D.19694 = (int) D.19693;
        mono_metadata_decode_table_row (D.19675, 6, D.19694, &cols, 6);
        D.19675 = klass->image;
        D.19695 = cols[3];
        m_name = mono_metadata_string_heap (D.19675, D.19695);
        if (fqname == 0B) goto <D.19699>; else goto <D.19700>;
        <D.19700>:
        D.19701 = strcmp (m_name, fqname);
        if (D.19701 != 0) goto <D.19699>; else goto <D.19697>;
        <D.19699>:
        if (qname == 0B) goto <D.19698>; else goto <D.19702>;
        <D.19702>:
        D.19703 = strcmp (m_name, qname);
        if (D.19703 != 0) goto <D.19698>; else goto <D.19697>;
        <D.19698>:
        if (name == 0B) goto <D.19696>; else goto <D.19704>;
        <D.19704>:
        D.19705 = strcmp (m_name, name);
        if (D.19705 != 0) goto <D.19696>; else goto <D.19697>;
        <D.19696>:
        // predicted unlikely by continue predictor.
        goto <D.18191>;
        <D.19697>:
        D.19675 = klass->image;
        D.19691 = klass->method.first;
        i.63 = (unsigned int) i;
        D.19693 = D.19691 + i.63;
        D.19706 = D.19693 + 1;
        D.19707 = D.19706 | 100663296;
        method = mono_get_method (D.19675, D.19707, klass);
        if (method != 0B) goto <D.19708>; else goto <D.19709>;
        <D.19708>:
        other_sig = mono_method_signature (method);
        if (other_sig != 0B) goto <D.19710>; else goto <D.19711>;
        <D.19710>:
        D.19712 = BIT_FIELD_REF <*sig, 64, 64>;
        D.19713 = D.19712 & 64512;
        if (D.19713 != 5120) goto <D.19714>; else goto <D.19715>;
        <D.19714>:
        D.19716 = mono_metadata_signature_equal (sig, other_sig);
        if (D.19716 != 0) goto <D.19717>; else goto <D.19718>;
        <D.19717>:
        D.19719 = method;
        return D.19719;
        <D.19718>:
        <D.19715>:
        <D.19711>:
        <D.19709>:
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.18191>:
  i = i + 1;
  <D.18193>:
  D.19720 = klass->method.count;
  i.63 = (unsigned int) i;
  if (D.19720 > i.63) goto <D.18192>; else goto <D.18194>;
  <D.18194>:
  <D.19690>:
  <D.19687>:
  <D.19685>:
  <D.19682>:
  <D.19679>:
  <D.19674>:
  mono_class_setup_methods (klass);
  D.19680 = klass->methods;
  if (D.19680 == 0B) goto <D.19721>; else goto <D.19722>;
  <D.19721>:
  D.19719 = 0B;
  return D.19719;
  <D.19722>:
  i = 0;
  goto <D.18200>;
  <D.18199>:
  {
    struct MonoMethod * m;
    struct MonoMethodSignature * msig;

    D.19680 = klass->methods;
    D.19723 = (long unsigned int) i;
    D.19724 = D.19723 * 8;
    D.19725 = D.19680 + D.19724;
    m = *D.19725;
    if (m == 0B) goto <D.19726>; else goto <D.19727>;
    <D.19726>:
    // predicted unlikely by continue predictor.
    goto <D.18197>;
    <D.19727>:
    if (fqname == 0B) goto <D.19731>; else goto <D.19732>;
    <D.19732>:
    D.19733 = m->name;
    D.19734 = strcmp (D.19733, fqname);
    if (D.19734 != 0) goto <D.19731>; else goto <D.19729>;
    <D.19731>:
    if (qname == 0B) goto <D.19730>; else goto <D.19735>;
    <D.19735>:
    D.19733 = m->name;
    D.19736 = strcmp (D.19733, qname);
    if (D.19736 != 0) goto <D.19730>; else goto <D.19729>;
    <D.19730>:
    if (name == 0B) goto <D.19728>; else goto <D.19737>;
    <D.19737>:
    D.19733 = m->name;
    D.19738 = strcmp (D.19733, name);
    if (D.19738 != 0) goto <D.19728>; else goto <D.19729>;
    <D.19728>:
    // predicted unlikely by continue predictor.
    goto <D.18197>;
    <D.19729>:
    msig = mono_method_signature (m);
    if (msig == 0B) goto <D.19739>; else goto <D.19740>;
    <D.19739>:
    // predicted unlikely by continue predictor.
    goto <D.18197>;
    <D.19740>:
    D.19712 = BIT_FIELD_REF <*sig, 64, 64>;
    D.19713 = D.19712 & 64512;
    if (D.19713 == 5120) goto <D.19741>; else goto <D.19742>;
    <D.19741>:
    D.19743 = mono_metadata_signature_vararg_match (sig, msig);
    if (D.19743 != 0) goto <D.18198>; else goto <D.19744>;
    <D.19744>:
    goto <D.19745>;
    <D.19742>:
    D.19746 = mono_metadata_signature_equal (sig, msig);
    if (D.19746 != 0) goto <D.18198>; else goto <D.19747>;
    <D.19747>:
    <D.19745>:
  }
  <D.18197>:
  i = i + 1;
  <D.18200>:
  D.19720 = klass->method.count;
  i.63 = (unsigned int) i;
  if (D.19720 > i.63) goto <D.18199>; else goto <D.18198>;
  <D.18198>:
  D.19720 = klass->method.count;
  i.63 = (unsigned int) i;
  if (D.19720 > i.63) goto <D.19748>; else goto <D.19749>;
  <D.19748>:
  D.19719 = mono_class_get_method_by_index (from_class, i);
  return D.19719;
  <D.19749>:
  D.19719 = 0B;
  return D.19719;
}


mono_metadata_signature_vararg_match (struct MonoMethodSignature * sig1, struct MonoMethodSignature * sig2)
{
  long unsigned int D.19756;
  long unsigned int D.19757;
  long unsigned int D.19758;
  long unsigned int D.19759;
  short int D.19761;
  short int D.19762;
  gboolean D.19763;
  int D.19764;
  int D.19767;
  struct MonoType * D.19768;
  struct MonoType * D.19769;
  int D.19770;
  int i;

  D.19756 = BIT_FIELD_REF <*sig1, 64, 64>;
  D.19757 = BIT_FIELD_REF <*sig2, 64, 64>;
  D.19758 = D.19756 ^ D.19757;
  D.19759 = D.19758 & 512;
  if (D.19759 != 0) goto <D.19754>; else goto <D.19760>;
  <D.19760>:
  D.19761 = sig1->sentinelpos;
  D.19762 = sig2->sentinelpos;
  if (D.19761 != D.19762) goto <D.19754>; else goto <D.19755>;
  <D.19754>:
  D.19763 = 0;
  return D.19763;
  <D.19755>:
  i = 0;
  goto <D.18176>;
  <D.18175>:
  {
    struct MonoType * p1;
    struct MonoType * p2;

    p1 = sig1->params[i];
    p2 = sig2->params[i];
    D.19764 = mono_metadata_type_equal (p1, p2);
    if (D.19764 == 0) goto <D.19765>; else goto <D.19766>;
    <D.19765>:
    D.19763 = 0;
    return D.19763;
    <D.19766>:
  }
  i = i + 1;
  <D.18176>:
  D.19761 = sig1->sentinelpos;
  D.19767 = (int) D.19761;
  if (D.19767 > i) goto <D.18175>; else goto <D.18177>;
  <D.18177>:
  D.19768 = sig1->ret;
  D.19769 = sig2->ret;
  D.19770 = mono_metadata_type_equal (D.19768, D.19769);
  if (D.19770 == 0) goto <D.19771>; else goto <D.19772>;
  <D.19771>:
  D.19763 = 0;
  return D.19763;
  <D.19772>:
  D.19763 = 1;
  return D.19763;
}


__attribute__((visibility ("hidden")))
mono_get_method_constrained_with_method (struct MonoImage * image, struct MonoMethod * method, struct MonoClass * constrained_class, struct MonoGenericContext * context)
{
  _Bool D.19774;
  long int D.19775;
  long int D.19776;
  struct MonoMethod * D.19779;
  struct MonoMethod * result;

  D.19774 = method == 0B;
  D.19775 = (long int) D.19774;
  D.19776 = __builtin_expect (D.19775, 0);
  if (D.19776 != 0) goto <D.19777>; else goto <D.19778>;
  <D.19777>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1932, "method");
  <D.19778>:
  mono_loader_lock ();
  result = get_method_constrained (image, method, constrained_class, context);
  mono_loader_unlock ();
  D.19779 = result;
  return D.19779;
}


get_method_constrained (struct MonoImage * image, struct MonoMethod * method, struct MonoClass * constrained_class, struct MonoGenericContext * context)
{
  struct MonoMethod * D.19783;
  long unsigned int D.19784;
  long unsigned int D.19785;
  short unsigned int D.19788;
  struct MonoMethod * D.19791;
  struct MonoGenericInst * D.19792;
  struct MonoClass * D.19795;
  struct MonoImage * D.19796;
  int D.19797;
  unsigned int D.19804;
  unsigned int D.19805;
  unsigned char D.19807;
  const char * D.19809;
  const char * D.19814;
  const char * D.19815;
  char * D.19816;
  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.19781>; else goto <D.19782>;
  <D.19781>:
  D.19783 = 0B;
  return D.19783;
  <D.19782>:
  D.19784 = BIT_FIELD_REF <*method, 64, 256>;
  D.19785 = D.19784 & 2251799813685248;
  if (D.19785 != 0) goto <D.19786>; else goto <D.19787>;
  <D.19786>:
  D.19788 = sig->generic_param_count;
  if (D.19788 != 0) goto <D.19789>; else goto <D.19790>;
  <D.19789>:
  {
    struct MonoMethodInflated * imethod;

    imethod = method;
    D.19791 = imethod->declaring;
    sig = mono_method_signature (D.19791);
    method_context = mono_method_get_context (method);
    original_sig = sig;
    D.19792 = method_context->class_inst;
    if (D.19792 != 0B) goto <D.19793>; else goto <D.19794>;
    <D.19793>:
    {
      struct MonoError error;
      struct MonoGenericContext ctx;

      try
        {
          ctx.method_inst = 0B;
          D.19792 = method_context->class_inst;
          ctx.class_inst = D.19792;
          D.19795 = method->klass;
          D.19796 = D.19795->image;
          sig = inflate_generic_signature_checked (D.19796, sig, &ctx, &error);
          D.19797 = mono_error_ok (&error);
          if (D.19797 == 0) goto <D.19798>; else goto <D.19799>;
          <D.19798>:
          mono_error_cleanup (&error);
          D.19783 = 0B;
          return D.19783;
          <D.19799>:
        }
      finally
        {
          error = {CLOBBER};
          ctx = {CLOBBER};
        }
    }
    <D.19794>:
  }
  <D.19790>:
  <D.19787>:
  D.19795 = method->klass;
  if (D.19795 != constrained_class) goto <D.19802>; else goto <D.19803>;
  <D.19802>:
  D.19795 = method->klass;
  D.19804 = D.19795->flags;
  D.19805 = D.19804 & 32;
  if (D.19805 != 0) goto <D.19800>; else goto <D.19806>;
  <D.19806>:
  D.19795 = method->klass;
  D.19807 = D.19795->byval_arg.type;
  if (D.19807 == 19) goto <D.19800>; else goto <D.19808>;
  <D.19808>:
  D.19795 = method->klass;
  D.19807 = D.19795->byval_arg.type;
  if (D.19807 == 30) goto <D.19800>; else goto <D.19801>;
  <D.19800>:
  ic = method->klass;
  <D.19801>:
  <D.19803>:
  D.19809 = method->name;
  result = find_method (constrained_class, ic, D.19809, sig, constrained_class);
  if (sig != original_sig) goto <D.19810>; else goto <D.19811>;
  <D.19810>:
  mono_metadata_free_inflated_signature (sig);
  <D.19811>:
  if (result == 0B) goto <D.19812>; else goto <D.19813>;
  <D.19812>:
  {
    char * m;

    m = mono_method_full_name (method, 1);
    D.19795 = method->klass;
    D.19814 = D.19795->name_space;
    D.19795 = method->klass;
    D.19815 = D.19795->name;
    D.19809 = method->name;
    D.19816 = image->name;
    monoeg_g_log (0B, 16, "Missing method %s.%s.%s in assembly %s method %s", D.19814, D.19815, D.19809, D.19816, m);
    monoeg_g_free (m);
    D.19783 = 0B;
    return D.19783;
  }
  <D.19813>:
  if (method_context != 0B) goto <D.19817>; else goto <D.19818>;
  <D.19817>:
  result = mono_class_inflate_generic_method (result, method_context);
  <D.19818>:
  D.19783 = result;
  return D.19783;
}


mono_get_method_constrained (struct MonoImage * image, guint32 token, struct MonoClass * constrained_class, struct MonoGenericContext * context, struct MonoMethod * * cil_method)
{
  struct MonoMethod * D.19822;
  struct MonoMethod * D.19823;
  struct MonoMethod * D.19826;
  struct MonoMethod * result;

  mono_loader_lock ();
  D.19822 = mono_get_method_from_token (image, token, 0B, context, 0B);
  *cil_method = D.19822;
  D.19823 = *cil_method;
  if (D.19823 == 0B) goto <D.19824>; else goto <D.19825>;
  <D.19824>:
  mono_loader_unlock ();
  D.19826 = 0B;
  return D.19826;
  <D.19825>:
  D.19823 = *cil_method;
  result = get_method_constrained (image, D.19823, constrained_class, context);
  mono_loader_unlock ();
  D.19826 = result;
  return D.19826;
}


mono_free_method (struct MonoMethod * method)
{
  <unnamed type> D.19828;
  unsigned int D.19829;
  <unnamed type> D.19832;
  struct MonoMethodSignature * D.19835;
  long unsigned int D.19838;
  long unsigned int D.19839;
  struct MonoClass * D.19842;
  struct MonoImage * D.19843;
  const char * D.19844;
  struct MonoMethodHeader * D.19845;
  const unsigned char * D.19848;
  struct MonoType * D.19849;
  short unsigned int D.19850;
  int D.19851;
  struct MonoExceptionClause * D.19852;
  void * D.19853;

  D.19828 = mono_profiler_get_events ();
  D.19829 = D.19828 & 65536;
  if (D.19829 != 0) goto <D.19830>; else goto <D.19831>;
  <D.19830>:
  mono_profiler_method_free (method);
  <D.19831>:
  D.19832 = mono_profiler_get_events ();
  if (D.19832 != 0) goto <D.19833>; else goto <D.19834>;
  <D.19833>:
  return;
  <D.19834>:
  D.19835 = method->signature;
  if (D.19835 != 0B) goto <D.19836>; else goto <D.19837>;
  <D.19836>:
  <D.19837>:
  D.19838 = BIT_FIELD_REF <*method, 64, 256>;
  D.19839 = D.19838 & 18014398509481984;
  if (D.19839 != 0) goto <D.19840>; else goto <D.19841>;
  <D.19840>:
  {
    struct MonoMethodWrapper * mw;
    int i;

    mw = method;
    mono_marshal_free_dynamic_wrappers (method);
    D.19842 = method->klass;
    D.19843 = D.19842->image;
    mono_image_property_remove (D.19843, method);
    D.19844 = method->name;
    monoeg_g_free (D.19844);
    D.19845 = mw->header;
    if (D.19845 != 0B) goto <D.19846>; else goto <D.19847>;
    <D.19846>:
    D.19845 = mw->header;
    D.19848 = D.19845->code;
    monoeg_g_free (D.19848);
    i = 0;
    goto <D.18540>;
    <D.18539>:
    D.19845 = mw->header;
    D.19849 = D.19845->locals[i];
    monoeg_g_free (D.19849);
    i = i + 1;
    <D.18540>:
    D.19845 = mw->header;
    D.19850 = D.19845->num_locals;
    D.19851 = (int) D.19850;
    if (D.19851 > i) goto <D.18539>; else goto <D.18541>;
    <D.18541>:
    D.19845 = mw->header;
    D.19852 = D.19845->clauses;
    monoeg_g_free (D.19852);
    D.19845 = mw->header;
    monoeg_g_free (D.19845);
    <D.19847>:
    D.19853 = mw->method_data;
    monoeg_g_free (D.19853);
    D.19835 = method->signature;
    monoeg_g_free (D.19835);
    monoeg_g_free (method);
  }
  <D.19841>:
}


mono_method_get_param_names (struct MonoMethod * method, const char * * names)
{
  long unsigned int D.19855;
  long unsigned int D.19856;
  short unsigned int D.19861;
  long unsigned int D.19864;
  long unsigned int D.19865;
  const char * * D.19866;
  int D.19867;
  unsigned char D.19868;
  struct MonoImage * D.19871;
  long unsigned int D.19872;
  long unsigned int D.19873;
  struct MonoClass * D.19876;
  struct MonoImage * D.19877;
  struct GHashTable * D.19878;
  char * * D.19881;
  sizetype D.19884;
  sizetype D.19885;
  sizetype D.19886;
  char * * D.19887;
  char * D.19888;
  struct MonoMethodSignature * D.19891;
  short unsigned int D.19892;
  int D.19893;
  long unsigned int D.19894;
  struct GHashTable * D.19897;
  char * * D.19902;
  char * D.19903;
  unsigned int D.19906;
  int D.19907;
  <unnamed-unsigned:24> D.19908;
  unsigned int D.19909;
  int idx.64;
  unsigned int D.19913;
  <unnamed-unsigned:24> D.19915;
  int D.19916;
  int D.19917;
  unsigned int D.19918;
  unsigned int D.19921;
  unsigned int D.19924;
  long unsigned int D.19925;
  long unsigned int D.19926;
  const char * * D.19927;
  unsigned int D.19928;
  const char * D.19929;
  int i;
  int lastp;
  struct MonoClass * klass;
  struct MonoTableInfo * methodt;
  struct MonoTableInfo * paramt;
  struct MonoMethodSignature * signature;
  guint32 idx;

  D.19855 = BIT_FIELD_REF <*method, 64, 256>;
  D.19856 = D.19855 & 2251799813685248;
  if (D.19856 != 0) goto <D.19857>; else goto <D.19858>;
  <D.19857>:
  method = MEM[(struct MonoMethodInflated *)method].declaring;
  <D.19858>:
  signature = mono_method_signature (method);
  if (signature == 0B) goto <D.19859>; else goto <D.19860>;
  <D.19859>:
  return;
  <D.19860>:
  D.19861 = signature->param_count;
  if (D.19861 == 0) goto <D.19862>; else goto <D.19863>;
  <D.19862>:
  return;
  <D.19863>:
  i = 0;
  goto <D.18554>;
  <D.18553>:
  D.19864 = (long unsigned int) i;
  D.19865 = D.19864 * 8;
  D.19866 = names + D.19865;
  *D.19866 = "";
  i = i + 1;
  <D.18554>:
  D.19861 = signature->param_count;
  D.19867 = (int) D.19861;
  if (D.19867 > i) goto <D.18553>; else goto <D.18555>;
  <D.18555>:
  klass = method->klass;
  D.19868 = klass->rank;
  if (D.19868 != 0) goto <D.19869>; else goto <D.19870>;
  <D.19869>:
  return;
  <D.19870>:
  mono_class_init (klass);
  D.19871 = klass->image;
  D.19872 = BIT_FIELD_REF <*D.19871, 64, 192>;
  D.19873 = D.19872 & 268435456;
  if (D.19873 != 0) goto <D.19874>; else goto <D.19875>;
  <D.19874>:
  {
    struct MonoReflectionMethodAux * method_aux;

    D.19876 = method->klass;
    D.19877 = D.19876->image;
    D.19878 = MEM[(struct MonoDynamicImage *)D.19877].method_aux_hash;
    method_aux = monoeg_g_hash_table_lookup (D.19878, method);
    if (method_aux != 0B) goto <D.19879>; else goto <D.19880>;
    <D.19879>:
    D.19881 = method_aux->param_names;
    if (D.19881 != 0B) goto <D.19882>; else goto <D.19883>;
    <D.19882>:
    i = 0;
    goto <D.18558>;
    <D.18557>:
    D.19881 = method_aux->param_names;
    D.19884 = (sizetype) i;
    D.19885 = D.19884 + 1;
    D.19886 = D.19885 * 8;
    D.19887 = D.19881 + D.19886;
    D.19888 = *D.19887;
    if (D.19888 != 0B) goto <D.19889>; else goto <D.19890>;
    <D.19889>:
    D.19864 = (long unsigned int) i;
    D.19865 = D.19864 * 8;
    D.19866 = names + D.19865;
    D.19881 = method_aux->param_names;
    D.19884 = (sizetype) i;
    D.19885 = D.19884 + 1;
    D.19886 = D.19885 * 8;
    D.19887 = D.19881 + D.19886;
    D.19888 = *D.19887;
    *D.19866 = D.19888;
    <D.19890>:
    i = i + 1;
    <D.18558>:
    D.19891 = mono_method_signature (method);
    D.19892 = D.19891->param_count;
    D.19893 = (int) D.19892;
    if (D.19893 > i) goto <D.18557>; else goto <D.18559>;
    <D.18559>:
    <D.19883>:
    <D.19880>:
    return;
  }
  <D.19875>:
  D.19855 = BIT_FIELD_REF <*method, 64, 256>;
  D.19894 = D.19855 & 4467570830351532032;
  if (D.19894 != 0) goto <D.19895>; else goto <D.19896>;
  <D.19895>:
  {
    char * * pnames;

    pnames = 0B;
    D.19871 = klass->image;
    mono_image_lock (D.19871);
    D.19871 = klass->image;
    D.19897 = D.19871->wrapper_param_names;
    if (D.19897 != 0B) goto <D.19898>; else goto <D.19899>;
    <D.19898>:
    D.19871 = klass->image;
    D.19897 = D.19871->wrapper_param_names;
    pnames = monoeg_g_hash_table_lookup (D.19897, method);
    <D.19899>:
    D.19871 = klass->image;
    mono_image_unlock (D.19871);
    if (pnames != 0B) goto <D.19900>; else goto <D.19901>;
    <D.19900>:
    i = 0;
    goto <D.18562>;
    <D.18561>:
    D.19864 = (long unsigned int) i;
    D.19865 = D.19864 * 8;
    D.19866 = names + D.19865;
    D.19864 = (long unsigned int) i;
    D.19865 = D.19864 * 8;
    D.19902 = pnames + D.19865;
    D.19903 = *D.19902;
    *D.19866 = D.19903;
    i = i + 1;
    <D.18562>:
    D.19861 = signature->param_count;
    D.19867 = (int) D.19861;
    if (D.19867 > i) goto <D.18561>; else goto <D.18563>;
    <D.18563>:
    <D.19901>:
    return;
  }
  <D.19896>:
  D.19871 = klass->image;
  methodt = &D.19871->tables[6];
  D.19871 = klass->image;
  paramt = &D.19871->tables[8];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.19904>; else goto <D.19905>;
  <D.19904>:
  {
    guint32 cols[3];
    guint param_index;

    try
      {
        D.19906 = idx + 4294967295;
        D.19907 = (int) D.19906;
        param_index = mono_metadata_decode_row_col (methodt, D.19907, 5);
        D.19908 = methodt->rows;
        D.19909 = (unsigned int) D.19908;
        if (D.19909 > idx) goto <D.19910>; else goto <D.19911>;
        <D.19910>:
        idx.64 = (int) idx;
        D.19913 = mono_metadata_decode_row_col (methodt, idx.64, 5);
        lastp = (int) D.19913;
        goto <D.19914>;
        <D.19911>:
        D.19915 = paramt->rows;
        D.19916 = (int) D.19915;
        lastp = D.19916 + 1;
        <D.19914>:
        i = (int) param_index;
        goto <D.18567>;
        <D.18566>:
        D.19917 = i + -1;
        mono_metadata_decode_row (paramt, D.19917, &cols, 3);
        D.19918 = cols[1];
        if (D.19918 != 0) goto <D.19919>; else goto <D.19920>;
        <D.19919>:
        D.19918 = cols[1];
        D.19861 = signature->param_count;
        D.19921 = (unsigned int) D.19861;
        if (D.19918 <= D.19921) goto <D.19922>; else goto <D.19923>;
        <D.19922>:
        D.19918 = cols[1];
        D.19924 = D.19918 + 4294967295;
        D.19925 = (long unsigned int) D.19924;
        D.19926 = D.19925 * 8;
        D.19927 = names + D.19926;
        D.19871 = klass->image;
        D.19928 = cols[2];
        D.19929 = mono_metadata_string_heap (D.19871, D.19928);
        *D.19927 = D.19929;
        <D.19923>:
        <D.19920>:
        i = i + 1;
        <D.18567>:
        if (i < lastp) goto <D.18566>; else goto <D.18568>;
        <D.18568>:
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.19905>:
}


mono_method_get_param_token (struct MonoMethod * method, int index)
{
  struct MonoImage * D.19931;
  long unsigned int D.19932;
  long unsigned int D.19933;
  unsigned int D.19938;
  int D.19939;
  uint32_t D.19942;
  unsigned int index.65;
  unsigned int D.19944;
  struct MonoClass * klass;
  struct MonoTableInfo * methodt;
  guint32 idx;

  klass = method->klass;
  mono_class_init (klass);
  D.19931 = klass->image;
  D.19932 = BIT_FIELD_REF <*D.19931, 64, 192>;
  D.19933 = D.19932 & 268435456;
  if (D.19933 != 0) goto <D.19934>; else goto <D.19935>;
  <D.19934>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "loader.c", 2100);
  <D.19935>:
  D.19931 = klass->image;
  methodt = &D.19931->tables[6];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.19936>; else goto <D.19937>;
  <D.19936>:
  {
    guint param_index;

    D.19938 = idx + 4294967295;
    D.19939 = (int) D.19938;
    param_index = mono_metadata_decode_row_col (methodt, D.19939, 5);
    if (index == -1) goto <D.19940>; else goto <D.19941>;
    <D.19940>:
    D.19942 = 134217728;
    return D.19942;
    <D.19941>:
    index.65 = (unsigned int) index;
    D.19944 = param_index + index.65;
    D.19942 = D.19944 | 134217728;
    return D.19942;
  }
  <D.19937>:
  D.19942 = 0;
  return D.19942;
}


mono_method_get_marshal_info (struct MonoMethod * method, struct MonoMarshalSpec * * mspecs)
{
  _Bool D.19946;
  long int D.19947;
  long int D.19948;
  long unsigned int D.19951;
  long unsigned int D.19952;
  struct MonoMarshalSpec * * D.19953;
  short unsigned int D.19954;
  int D.19955;
  struct MonoClass * D.19956;
  struct MonoImage * D.19957;
  long unsigned int D.19958;
  long unsigned int D.19959;
  struct GHashTable * D.19962;
  struct MonoMarshalSpec * * D.19965;
  struct MonoMarshalSpec * * D.19968;
  struct MonoMarshalSpec * D.19969;
  void * D.19972;
  struct MonoMarshalSpec * D.19973;
  char * D.19974;
  gchar * D.19975;
  char * D.19976;
  gchar * D.19977;
  struct MonoImage * D.19978;
  unsigned int D.19981;
  int D.19982;
  <unnamed-unsigned:24> D.19983;
  unsigned int D.19984;
  int idx.66;
  unsigned int D.19988;
  <unnamed-unsigned:24> D.19990;
  int D.19991;
  int D.19992;
  unsigned int D.19993;
  unsigned int D.19994;
  unsigned int D.19997;
  unsigned int D.19998;
  unsigned int D.20001;
  _Bool D.20002;
  long int D.20003;
  long int D.20004;
  long unsigned int D.20007;
  long unsigned int D.20008;
  struct MonoMarshalSpec * * D.20009;
  struct MonoMarshalSpec * D.20010;
  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.19946 = signature == 0B;
  D.19947 = (long int) D.19946;
  D.19948 = __builtin_expect (D.19947, 0);
  if (D.19948 != 0) goto <D.19949>; else goto <D.19950>;
  <D.19949>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2129, "signature");
  <D.19950>:
  i = 0;
  goto <D.18589>;
  <D.18588>:
  D.19951 = (long unsigned int) i;
  D.19952 = D.19951 * 8;
  D.19953 = mspecs + D.19952;
  *D.19953 = 0B;
  i = i + 1;
  <D.18589>:
  D.19954 = signature->param_count;
  D.19955 = (int) D.19954;
  if (D.19955 >= i) goto <D.18588>; else goto <D.18590>;
  <D.18590>:
  D.19956 = method->klass;
  D.19957 = D.19956->image;
  D.19958 = BIT_FIELD_REF <*D.19957, 64, 192>;
  D.19959 = D.19958 & 268435456;
  if (D.19959 != 0) goto <D.19960>; else goto <D.19961>;
  <D.19960>:
  {
    struct MonoReflectionMethodAux * method_aux;

    D.19956 = method->klass;
    D.19957 = D.19956->image;
    D.19962 = MEM[(struct MonoDynamicImage *)D.19957].method_aux_hash;
    method_aux = monoeg_g_hash_table_lookup (D.19962, method);
    if (method_aux != 0B) goto <D.19963>; else goto <D.19964>;
    <D.19963>:
    D.19965 = method_aux->param_marshall;
    if (D.19965 != 0B) goto <D.19966>; else goto <D.19967>;
    <D.19966>:
    {
      struct MonoMarshalSpec * * dyn_specs;

      dyn_specs = method_aux->param_marshall;
      i = 0;
      goto <D.18594>;
      <D.18593>:
      D.19951 = (long unsigned int) i;
      D.19952 = D.19951 * 8;
      D.19968 = dyn_specs + D.19952;
      D.19969 = *D.19968;
      if (D.19969 != 0B) goto <D.19970>; else goto <D.19971>;
      <D.19970>:
      D.19951 = (long unsigned int) i;
      D.19952 = D.19951 * 8;
      D.19953 = mspecs + D.19952;
      D.19972 = monoeg_malloc0 (24);
      *D.19953 = D.19972;
      D.19951 = (long unsigned int) i;
      D.19952 = D.19951 * 8;
      D.19953 = mspecs + D.19952;
      D.19973 = *D.19953;
      D.19951 = (long unsigned int) i;
      D.19952 = D.19951 * 8;
      D.19968 = dyn_specs + D.19952;
      D.19969 = *D.19968;
      memcpy (D.19973, D.19969, 24);
      D.19951 = (long unsigned int) i;
      D.19952 = D.19951 * 8;
      D.19953 = mspecs + D.19952;
      D.19973 = *D.19953;
      D.19951 = (long unsigned int) i;
      D.19952 = D.19951 * 8;
      D.19968 = dyn_specs + D.19952;
      D.19969 = *D.19968;
      D.19974 = D.19969->data.custom_data.custom_name;
      D.19975 = monoeg_strdup (D.19974);
      D.19973->data.custom_data.custom_name = D.19975;
      D.19951 = (long unsigned int) i;
      D.19952 = D.19951 * 8;
      D.19953 = mspecs + D.19952;
      D.19973 = *D.19953;
      D.19951 = (long unsigned int) i;
      D.19952 = D.19951 * 8;
      D.19968 = dyn_specs + D.19952;
      D.19969 = *D.19968;
      D.19976 = D.19969->data.custom_data.cookie;
      D.19977 = monoeg_strdup (D.19976);
      D.19973->data.custom_data.cookie = D.19977;
      <D.19971>:
      i = i + 1;
      <D.18594>:
      D.19954 = signature->param_count;
      D.19955 = (int) D.19954;
      if (D.19955 >= i) goto <D.18593>; else goto <D.18595>;
      <D.18595>:
    }
    <D.19967>:
    <D.19964>:
    return;
  }
  <D.19961>:
  mono_class_init (klass);
  D.19978 = klass->image;
  methodt = &D.19978->tables[6];
  D.19978 = klass->image;
  paramt = &D.19978->tables[8];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.19979>; else goto <D.19980>;
  <D.19979>:
  {
    guint32 cols[3];
    guint param_index;

    try
      {
        D.19981 = idx + 4294967295;
        D.19982 = (int) D.19981;
        param_index = mono_metadata_decode_row_col (methodt, D.19982, 5);
        D.19983 = methodt->rows;
        D.19984 = (unsigned int) D.19983;
        if (D.19984 > idx) goto <D.19985>; else goto <D.19986>;
        <D.19985>:
        idx.66 = (int) idx;
        D.19988 = mono_metadata_decode_row_col (methodt, idx.66, 5);
        lastp = (int) D.19988;
        goto <D.19989>;
        <D.19986>:
        D.19990 = paramt->rows;
        D.19991 = (int) D.19990;
        lastp = D.19991 + 1;
        <D.19989>:
        i = (int) param_index;
        goto <D.18600>;
        <D.18599>:
        D.19992 = i + -1;
        mono_metadata_decode_row (paramt, D.19992, &cols, 3);
        D.19993 = cols[0];
        D.19994 = D.19993 & 8192;
        if (D.19994 != 0) goto <D.19995>; else goto <D.19996>;
        <D.19995>:
        D.19997 = cols[1];
        D.19954 = signature->param_count;
        D.19998 = (unsigned int) D.19954;
        if (D.19997 <= D.19998) goto <D.19999>; else goto <D.20000>;
        <D.19999>:
        {
          const char * tp;

          D.19978 = klass->image;
          D.19992 = i + -1;
          D.20001 = (unsigned int) D.19992;
          tp = mono_metadata_get_marshal_info (D.19978, D.20001, 0);
          D.20002 = tp == 0B;
          D.20003 = (long int) D.20002;
          D.20004 = __builtin_expect (D.20003, 0);
          if (D.20004 != 0) goto <D.20005>; else goto <D.20006>;
          <D.20005>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2171, "tp");
          <D.20006>:
          D.19997 = cols[1];
          D.20007 = (long unsigned int) D.19997;
          D.20008 = D.20007 * 8;
          D.20009 = mspecs + D.20008;
          D.19978 = klass->image;
          D.20010 = mono_metadata_parse_marshal_spec (D.19978, tp);
          *D.20009 = D.20010;
        }
        <D.20000>:
        <D.19996>:
        i = i + 1;
        <D.18600>:
        if (i < lastp) goto <D.18599>; else goto <D.18601>;
        <D.18601>:
        return;
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.19980>:
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__, __nothrow__, __leaf__))
memcpy (void * restrict __dest, const void * restrict __src, size_t __len)
{
  void * D.20013;
  long unsigned int D.20014;

  D.20014 = __builtin_object_size (__dest, 0);
  D.20013 = __builtin___memcpy_chk (__dest, __src, __len, D.20014);
  return D.20013;
}


mono_method_has_marshal_info (struct MonoMethod * method)
{
  struct MonoClass * D.20016;
  struct MonoImage * D.20017;
  long unsigned int D.20018;
  long unsigned int D.20019;
  struct GHashTable * D.20022;
  long unsigned int D.20025;
  long unsigned int D.20026;
  struct MonoMarshalSpec * * D.20027;
  struct MonoMarshalSpec * D.20028;
  mono_bool D.20031;
  struct MonoMethodSignature * D.20032;
  short unsigned int D.20033;
  int D.20034;
  struct MonoImage * D.20035;
  unsigned int D.20038;
  int D.20039;
  unsigned int D.20040;
  <unnamed-unsigned:24> D.20041;
  unsigned int D.20042;
  int idx.67;
  unsigned int D.20046;
  <unnamed-unsigned:24> D.20048;
  int D.20049;
  int D.20050;
  unsigned int D.20051;
  unsigned int D.20052;
  int i;
  int lastp;
  struct MonoClass * klass;
  struct MonoTableInfo * methodt;
  struct MonoTableInfo * paramt;
  guint32 idx;

  klass = method->klass;
  D.20016 = method->klass;
  D.20017 = D.20016->image;
  D.20018 = BIT_FIELD_REF <*D.20017, 64, 192>;
  D.20019 = D.20018 & 268435456;
  if (D.20019 != 0) goto <D.20020>; else goto <D.20021>;
  <D.20020>:
  {
    struct MonoReflectionMethodAux * method_aux;
    struct MonoMarshalSpec * * dyn_specs;

    D.20016 = method->klass;
    D.20017 = D.20016->image;
    D.20022 = MEM[(struct MonoDynamicImage *)D.20017].method_aux_hash;
    method_aux = monoeg_g_hash_table_lookup (D.20022, method);
    dyn_specs = method_aux->param_marshall;
    if (dyn_specs != 0B) goto <D.20023>; else goto <D.20024>;
    <D.20023>:
    i = 0;
    goto <D.18614>;
    <D.18613>:
    D.20025 = (long unsigned int) i;
    D.20026 = D.20025 * 8;
    D.20027 = dyn_specs + D.20026;
    D.20028 = *D.20027;
    if (D.20028 != 0B) goto <D.20029>; else goto <D.20030>;
    <D.20029>:
    D.20031 = 1;
    return D.20031;
    <D.20030>:
    i = i + 1;
    <D.18614>:
    D.20032 = mono_method_signature (method);
    D.20033 = D.20032->param_count;
    D.20034 = (int) D.20033;
    if (D.20034 >= i) goto <D.18613>; else goto <D.18615>;
    <D.18615>:
    <D.20024>:
    D.20031 = 0;
    return D.20031;
  }
  <D.20021>:
  mono_class_init (klass);
  D.20035 = klass->image;
  methodt = &D.20035->tables[6];
  D.20035 = klass->image;
  paramt = &D.20035->tables[8];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.20036>; else goto <D.20037>;
  <D.20036>:
  {
    guint32 cols[3];
    guint param_index;

    try
      {
        D.20038 = idx + 4294967295;
        D.20039 = (int) D.20038;
        param_index = mono_metadata_decode_row_col (methodt, D.20039, 5);
        D.20040 = idx + 1;
        D.20041 = methodt->rows;
        D.20042 = (unsigned int) D.20041;
        if (D.20040 < D.20042) goto <D.20043>; else goto <D.20044>;
        <D.20043>:
        idx.67 = (int) idx;
        D.20046 = mono_metadata_decode_row_col (methodt, idx.67, 5);
        lastp = (int) D.20046;
        goto <D.20047>;
        <D.20044>:
        D.20048 = paramt->rows;
        D.20049 = (int) D.20048;
        lastp = D.20049 + 1;
        <D.20047>:
        i = (int) param_index;
        goto <D.18619>;
        <D.18618>:
        D.20050 = i + -1;
        mono_metadata_decode_row (paramt, D.20050, &cols, 3);
        D.20051 = cols[0];
        D.20052 = D.20051 & 8192;
        if (D.20052 != 0) goto <D.20053>; else goto <D.20054>;
        <D.20053>:
        D.20031 = 1;
        return D.20031;
        <D.20054>:
        i = i + 1;
        <D.18619>:
        if (i < lastp) goto <D.18618>; else goto <D.18620>;
        <D.18620>:
        D.20031 = 0;
        return D.20031;
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.20037>:
  D.20031 = 0;
  return D.20031;
}


__attribute__((visibility ("hidden")))
mono_method_get_wrapper_data (struct MonoMethod * method, guint32 id)
{
  _Bool D.20057;
  long int D.20058;
  long int D.20059;
  long unsigned int D.20062;
  long unsigned int D.20063;
  _Bool D.20064;
  long int D.20065;
  long int D.20066;
  long unsigned int D.20069;
  _Bool D.20072;
  long int D.20073;
  long int D.20074;
  void * D.20077;
  long int D.20078;
  unsigned int D.20079;
  _Bool D.20080;
  long int D.20081;
  long int D.20082;
  void * D.20085;
  long unsigned int D.20086;
  long unsigned int D.20087;
  void * * D.20088;
  void * * data;

  D.20057 = method == 0B;
  D.20058 = (long int) D.20057;
  D.20059 = __builtin_expect (D.20058, 0);
  if (D.20059 != 0) goto <D.20060>; else goto <D.20061>;
  <D.20060>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2231, "method != NULL");
  <D.20061>:
  D.20062 = BIT_FIELD_REF <*method, 64, 256>;
  D.20063 = D.20062 & 4467570830351532032;
  D.20064 = D.20063 == 0;
  D.20065 = (long int) D.20064;
  D.20066 = __builtin_expect (D.20065, 0);
  if (D.20066 != 0) goto <D.20067>; else goto <D.20068>;
  <D.20067>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2232, "method->wrapper_type != MONO_WRAPPER_NONE");
  <D.20068>:
  D.20062 = BIT_FIELD_REF <*method, 64, 256>;
  D.20069 = D.20062 & 2251799813685248;
  if (D.20069 != 0) goto <D.20070>; else goto <D.20071>;
  <D.20070>:
  method = MEM[(struct MonoMethodInflated *)method].declaring;
  <D.20071>:
  data = MEM[(struct MonoMethodWrapper *)method].method_data;
  D.20072 = data == 0B;
  D.20073 = (long int) D.20072;
  D.20074 = __builtin_expect (D.20073, 0);
  if (D.20074 != 0) goto <D.20075>; else goto <D.20076>;
  <D.20075>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2237, "data != NULL");
  <D.20076>:
  D.20077 = *data;
  D.20078 = (long int) D.20077;
  D.20079 = (unsigned int) D.20078;
  D.20080 = D.20079 < id;
  D.20081 = (long int) D.20080;
  D.20082 = __builtin_expect (D.20081, 0);
  if (D.20082 != 0) goto <D.20083>; else goto <D.20084>;
  <D.20083>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2238, "id <= GPOINTER_TO_UINT (*data)");
  <D.20084>:
  D.20086 = (long unsigned int) id;
  D.20087 = D.20086 * 8;
  D.20088 = data + D.20087;
  D.20085 = *D.20088;
  return D.20085;
}


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

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


stack_walk_adapter (struct MonoStackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  <unnamed type> D.20092;
  gboolean D.20093;
  struct MonoJitInfo * D.20094;
  _Bool D.20095;
  long int D.20096;
  long int D.20097;
  mono_bool (*<T11c9>) (struct MonoMethod *, int32_t, int32_t, mono_bool, void *) D.20100;
  struct MonoMethod * D.20101;
  int D.20102;
  int D.20103;
  int D.20104;
  void * D.20105;
  struct StackWalkUserData * d;

  d = data;
  D.20092 = frame->type;
  switch (D.20092) <default: <D.18639>, case 0: <D.18638>, case 1: <D.18636>, case 2: <D.18637>>
  <D.18636>:
  <D.18637>:
  D.20093 = 0;
  return D.20093;
  <D.18638>:
  D.20094 = frame->ji;
  D.20095 = D.20094 == 0B;
  D.20096 = (long int) D.20095;
  D.20097 = __builtin_expect (D.20096, 0);
  if (D.20097 != 0) goto <D.20098>; else goto <D.20099>;
  <D.20098>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2257, "frame->ji");
  <D.20099>:
  D.20100 = d->func;
  D.20094 = frame->ji;
  D.20101 = mono_jit_info_get_method (D.20094);
  D.20102 = frame->native_offset;
  D.20103 = frame->il_offset;
  D.20104 = frame->managed;
  D.20105 = d->user_data;
  D.20093 = D.20100 (D.20101, D.20102, D.20103, D.20104, D.20105);
  return D.20093;
  <D.18639>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "loader.c", 2261);
  D.20093 = 0;
  return D.20093;
}


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

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


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

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


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

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


__attribute__((visibility ("hidden")))
mono_loader_lock ()
{
  _Bool D.20116;
  long int D.20117;
  long int D.20118;
  int loader_lock_track_ownership.68;
  _Bool D.20122;
  long int D.20123;
  long int D.20124;
  unsigned int loader_lock_nest_id.69;
  void * D.20128;
  long int D.20129;
  unsigned int D.20130;
  unsigned int D.20131;
  long unsigned int D.20132;
  void * D.20133;

  {
    int ret;

    ret = pthread_mutex_lock (&loader_mutex.mutex);
    if (ret != 0) goto <D.20114>; else goto <D.20115>;
    <D.20114>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.20115>:
    D.20116 = ret != 0;
    D.20117 = (long int) D.20116;
    D.20118 = __builtin_expect (D.20117, 0);
    if (D.20118 != 0) goto <D.20119>; else goto <D.20120>;
    <D.20119>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2308, "ret == 0");
    <D.20120>:
  }
  loader_lock_track_ownership.68 = loader_lock_track_ownership;
  D.20122 = loader_lock_track_ownership.68 != 0;
  D.20123 = (long int) D.20122;
  D.20124 = __builtin_expect (D.20123, 0);
  if (D.20124 != 0) goto <D.20125>; else goto <D.20126>;
  <D.20125>:
  loader_lock_nest_id.69 = loader_lock_nest_id;
  loader_lock_nest_id.69 = loader_lock_nest_id;
  D.20128 = pthread_getspecific (loader_lock_nest_id.69);
  D.20129 = (long int) D.20128;
  D.20130 = (unsigned int) D.20129;
  D.20131 = D.20130 + 1;
  D.20132 = (long unsigned int) D.20131;
  D.20133 = (void *) D.20132;
  mono_native_tls_set_value (loader_lock_nest_id.69, D.20133);
  <D.20126>:
}


__attribute__((visibility ("hidden")))
mono_loader_unlock ()
{
  _Bool D.20136;
  long int D.20137;
  long int D.20138;
  int loader_lock_track_ownership.70;
  _Bool D.20142;
  long int D.20143;
  long int D.20144;
  unsigned int loader_lock_nest_id.71;
  void * D.20148;
  long int D.20149;
  unsigned int D.20150;
  unsigned int D.20151;
  long unsigned int D.20152;
  void * D.20153;

  {
    int ret;

    ret = pthread_mutex_unlock (&loader_mutex.mutex);
    if (ret != 0) goto <D.20134>; else goto <D.20135>;
    <D.20134>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.20135>:
    D.20136 = ret != 0;
    D.20137 = (long int) D.20136;
    D.20138 = __builtin_expect (D.20137, 0);
    if (D.20138 != 0) goto <D.20139>; else goto <D.20140>;
    <D.20139>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2317, "ret == 0");
    <D.20140>:
  }
  loader_lock_track_ownership.70 = loader_lock_track_ownership;
  D.20142 = loader_lock_track_ownership.70 != 0;
  D.20143 = (long int) D.20142;
  D.20144 = __builtin_expect (D.20143, 0);
  if (D.20144 != 0) goto <D.20145>; else goto <D.20146>;
  <D.20145>:
  loader_lock_nest_id.71 = loader_lock_nest_id;
  loader_lock_nest_id.71 = loader_lock_nest_id;
  D.20148 = pthread_getspecific (loader_lock_nest_id.71);
  D.20149 = (long int) D.20148;
  D.20150 = (unsigned int) D.20149;
  D.20151 = D.20150 + 4294967295;
  D.20152 = (long unsigned int) D.20151;
  D.20153 = (void *) D.20152;
  mono_native_tls_set_value (loader_lock_nest_id.71, D.20153);
  <D.20146>:
}


__attribute__((visibility ("hidden")))
mono_loader_lock_track_ownership (gboolean track)
{
  loader_lock_track_ownership = track;
}


__attribute__((visibility ("hidden")))
mono_loader_lock_is_owned_by_self ()
{
  int loader_lock_track_ownership.72;
  _Bool D.20155;
  long int D.20156;
  long int D.20157;
  gboolean D.20160;
  unsigned int loader_lock_nest_id.73;
  void * D.20162;
  long int D.20163;
  unsigned int D.20164;
  _Bool D.20165;

  loader_lock_track_ownership.72 = loader_lock_track_ownership;
  D.20155 = loader_lock_track_ownership.72 == 0;
  D.20156 = (long int) D.20155;
  D.20157 = __builtin_expect (D.20156, 0);
  if (D.20157 != 0) goto <D.20158>; else goto <D.20159>;
  <D.20158>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2345, "loader_lock_track_ownership");
  <D.20159>:
  loader_lock_nest_id.73 = loader_lock_nest_id;
  D.20162 = pthread_getspecific (loader_lock_nest_id.73);
  D.20163 = (long int) D.20162;
  D.20164 = (unsigned int) D.20163;
  D.20165 = D.20164 != 0;
  D.20160 = (gboolean) D.20165;
  return D.20160;
}


__attribute__((visibility ("hidden")))
mono_loader_lock_if_inited ()
{
  int loader_lock_inited.74;

  loader_lock_inited.74 = loader_lock_inited;
  if (loader_lock_inited.74 != 0) goto <D.20168>; else goto <D.20169>;
  <D.20168>:
  mono_loader_lock ();
  <D.20169>:
}


__attribute__((visibility ("hidden")))
mono_loader_unlock_if_inited ()
{
  int loader_lock_inited.75;

  loader_lock_inited.75 = loader_lock_inited;
  if (loader_lock_inited.75 != 0) goto <D.20171>; else goto <D.20172>;
  <D.20171>:
  mono_loader_unlock ();
  <D.20172>:
}


__attribute__((visibility ("hidden")))
mono_method_signature_checked (struct MonoMethod * m, struct MonoError * error)
{
  struct MonoMethodSignature * D.20173;
  struct MonoMethodSignature * D.20176;
  long unsigned int D.20179;
  long unsigned int D.20180;
  struct MonoMethod * D.20183;
  struct MonoClass * D.20184;
  struct MonoImage * D.20185;
  struct MonoGenericContext * D.20186;
  int D.20187;
  unsigned int D.20190;
  unsigned int inflated_signatures_size.76;
  unsigned int D.20192;
  unsigned int D.20193;
  unsigned int D.20194;
  _Bool D.20195;
  long int D.20196;
  long int D.20197;
  int D.20200;
  struct MonoClass * D.20201;
  struct MonoTableInfo * D.20202;
  int D.20203;
  struct MonoGenericClass * D.20204;
  _Bool D.20205;
  long int D.20206;
  long int D.20207;
  int iftmp.77;
  short unsigned int D.20215;
  int D.20216;
  int D.20217;
  short unsigned int D.20219;
  int D.20220;
  int D.20221;
  int D.20224;
  struct GHashTable * D.20229;
  int D.20232;
  unsigned int D.20235;
  const char * sig_body.78;
  unsigned int D.20241;
  unsigned int signatures_size.79;
  unsigned int D.20243;
  short unsigned int D.20244;
  long unsigned int D.20250;
  long unsigned int D.20251;
  const char * D.20252;
  char * D.20253;
  <unnamed-signed:31> D.20254;
  int D.20255;
  int D.20256;
  long unsigned int D.20264;
  short unsigned int D.20272;
  int D.20273;
  int D.20274;
  unsigned char D.20275;
  <unnamed-unsigned:6> D.20276;
  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.20173 = m->signature;
  if (D.20173 != 0B) goto <D.20174>; else goto <D.20175>;
  <D.20174>:
  D.20176 = m->signature;
  return D.20176;
  <D.20175>:
  mono_loader_lock ();
  D.20173 = m->signature;
  if (D.20173 != 0B) goto <D.20177>; else goto <D.20178>;
  <D.20177>:
  mono_loader_unlock ();
  D.20176 = m->signature;
  return D.20176;
  <D.20178>:
  D.20179 = BIT_FIELD_REF <*m, 64, 256>;
  D.20180 = D.20179 & 2251799813685248;
  if (D.20180 != 0) goto <D.20181>; else goto <D.20182>;
  <D.20181>:
  {
    struct MonoMethodInflated * imethod;

    imethod = m;
    D.20183 = imethod->declaring;
    signature = mono_method_signature (D.20183);
    D.20183 = imethod->declaring;
    D.20184 = D.20183->klass;
    D.20185 = D.20184->image;
    D.20186 = mono_method_get_context (m);
    signature = inflate_generic_signature_checked (D.20185, signature, D.20186, error);
    D.20187 = mono_error_ok (error);
    if (D.20187 == 0) goto <D.20188>; else goto <D.20189>;
    <D.20188>:
    mono_loader_unlock ();
    D.20176 = 0B;
    return D.20176;
    <D.20189>:
    D.20190 = mono_metadata_signature_size (signature);
    inflated_signatures_size.76 = inflated_signatures_size;
    D.20192 = D.20190 + inflated_signatures_size.76;
    inflated_signatures_size = D.20192;
    mono_memory_barrier ();
    m->signature = signature;
    mono_loader_unlock ();
    D.20176 = m->signature;
    return D.20176;
  }
  <D.20182>:
  D.20193 = m->token;
  D.20194 = D.20193 >> 24;
  D.20195 = D.20194 != 6;
  D.20196 = (long int) D.20195;
  D.20197 = __builtin_expect (D.20196, 0);
  if (D.20197 != 0) goto <D.20198>; else goto <D.20199>;
  <D.20198>:
  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.20199>:
  D.20193 = m->token;
  D.20200 = (int) D.20193;
  idx = D.20200 & 16777215;
  D.20201 = m->klass;
  img = D.20201->image;
  D.20202 = &img->tables[6];
  D.20203 = idx + -1;
  sig_offset = mono_metadata_decode_row_col (D.20202, D.20203, 4);
  sig = mono_metadata_blob_heap (img, sig_offset);
  D.20201 = m->klass;
  D.20204 = D.20201->generic_class;
  D.20205 = D.20204 != 0B;
  D.20206 = (long int) D.20205;
  D.20207 = __builtin_expect (D.20206, 0);
  if (D.20207 != 0) goto <D.20208>; else goto <D.20209>;
  <D.20208>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2425, "!m->klass->generic_class");
  <D.20209>:
  container = mono_method_get_generic_container (m);
  if (container == 0B) goto <D.20210>; else goto <D.20211>;
  <D.20210>:
  D.20201 = m->klass;
  container = D.20201->generic_container;
  <D.20211>:
  D.20215 = m->iflags;
  D.20216 = (int) D.20215;
  D.20217 = D.20216 & 4096;
  if (D.20217 == 0) goto <D.20218>; else goto <D.20213>;
  <D.20218>:
  D.20219 = m->flags;
  D.20220 = (int) D.20219;
  D.20221 = D.20220 & 8192;
  if (D.20221 == 0) goto <D.20222>; else goto <D.20213>;
  <D.20222>:
  if (container == 0B) goto <D.20223>; else goto <D.20213>;
  <D.20223>:
  iftmp.77 = 1;
  goto <D.20214>;
  <D.20213>:
  iftmp.77 = 0;
  <D.20214>:
  can_cache_signature = iftmp.77;
  D.20224 = mono_metadata_method_has_param_attrs (img, idx);
  if (D.20224 != 0) goto <D.20225>; else goto <D.20226>;
  <D.20225>:
  can_cache_signature = 0;
  <D.20226>:
  if (can_cache_signature != 0) goto <D.20227>; else goto <D.20228>;
  <D.20227>:
  D.20229 = img->method_signatures;
  signature = monoeg_g_hash_table_lookup (D.20229, sig);
  <D.20228>:
  if (signature == 0B) goto <D.20230>; else goto <D.20231>;
  <D.20230>:
  {
    const char * sig_body;

    try
      {
        D.20232 = mono_verifier_verify_method_signature (img, sig_offset, error);
        if (D.20232 == 0) goto <D.20233>; else goto <D.20234>;
        <D.20233>:
        mono_loader_unlock ();
        D.20176 = 0B;
        return D.20176;
        <D.20234>:
        D.20235 = mono_metadata_decode_blob_size (sig, &sig_body);
        size = (int) D.20235;
        sig_body.78 = sig_body;
        signature = mono_metadata_parse_method_signature_full (img, container, idx, sig_body.78, 0B);
        if (signature == 0B) goto <D.20237>; else goto <D.20238>;
        <D.20237>:
        mono_error_set_from_loader_error (error);
        mono_loader_unlock ();
        D.20176 = 0B;
        return D.20176;
        <D.20238>:
        if (can_cache_signature != 0) goto <D.20239>; else goto <D.20240>;
        <D.20239>:
        D.20229 = img->method_signatures;
        monoeg_g_hash_table_insert_replace (D.20229, sig, signature, 0);
        <D.20240>:
        D.20241 = mono_metadata_signature_size (signature);
        signatures_size.79 = signatures_size;
        D.20243 = D.20241 + signatures_size.79;
        signatures_size = D.20243;
      }
    finally
      {
        sig_body = {CLOBBER};
      }
  }
  <D.20231>:
  D.20244 = signature->generic_param_count;
  if (D.20244 != 0) goto <D.20245>; else goto <D.20246>;
  <D.20245>:
  if (container == 0B) goto <D.20247>; else goto <D.20249>;
  <D.20249>:
  D.20250 = BIT_FIELD_REF <*container, 64, 256>;
  D.20251 = D.20250 & 4294967296;
  if (D.20251 == 0) goto <D.20247>; else goto <D.20248>;
  <D.20247>:
  mono_loader_unlock ();
  D.20201 = m->klass;
  D.20252 = m->name;
  D.20253 = img->name;
  mono_error_set_method_load (error, D.20201, D.20252, "Signature claims method has generic parameters, but generic_params table says it doesn\'t for method 0x%08x from image %s", idx, D.20253);
  D.20176 = 0B;
  return D.20176;
  <D.20248>:
  D.20254 = container->type_argc;
  D.20255 = (int) D.20254;
  D.20244 = signature->generic_param_count;
  D.20256 = (int) D.20244;
  if (D.20255 != D.20256) goto <D.20257>; else goto <D.20258>;
  <D.20257>:
  mono_loader_unlock ();
  D.20201 = m->klass;
  D.20252 = m->name;
  D.20244 = signature->generic_param_count;
  D.20256 = (int) D.20244;
  D.20254 = container->type_argc;
  D.20255 = (int) D.20254;
  D.20253 = img->name;
  mono_error_set_method_load (error, D.20201, D.20252, "Inconsistent generic parameter count.  Signature says %d, generic_params table says %d for method 0x%08x from image %s", D.20256, D.20255, idx, D.20253);
  D.20176 = 0B;
  return D.20176;
  <D.20258>:
  goto <D.20259>;
  <D.20246>:
  if (container != 0B) goto <D.20260>; else goto <D.20261>;
  <D.20260>:
  D.20250 = BIT_FIELD_REF <*container, 64, 256>;
  D.20251 = D.20250 & 4294967296;
  if (D.20251 != 0) goto <D.20262>; else goto <D.20263>;
  <D.20262>:
  D.20250 = BIT_FIELD_REF <*container, 64, 256>;
  D.20264 = D.20250 & 18446744065119617024;
  if (D.20264 != 0) goto <D.20265>; else goto <D.20266>;
  <D.20265>:
  mono_loader_unlock ();
  D.20201 = m->klass;
  D.20252 = m->name;
  D.20253 = img->name;
  mono_error_set_method_load (error, D.20201, D.20252, "generic_params table claims method has generic parameters, but signature says it doesn\'t for method 0x%08x from image %s", idx, D.20253);
  D.20176 = 0B;
  return D.20176;
  <D.20266>:
  <D.20263>:
  <D.20261>:
  <D.20259>:
  D.20215 = m->iflags;
  D.20216 = (int) D.20215;
  D.20217 = D.20216 & 4096;
  if (D.20217 != 0) goto <D.20267>; else goto <D.20268>;
  <D.20267>:
  signature->pinvoke = 1;
  goto <D.20269>;
  <D.20268>:
  D.20219 = m->flags;
  D.20220 = (int) D.20219;
  D.20221 = D.20220 & 8192;
  if (D.20221 != 0) goto <D.20270>; else goto <D.20271>;
  <D.20270>:
  {
    MonoCallConvention conv;
    struct MonoMethodPInvoke * piinfo;

    conv = 0;
    piinfo = m;
    signature->pinvoke = 1;
    D.20272 = piinfo->piflags;
    D.20273 = (int) D.20272;
    D.20274 = D.20273 & 1792;
    switch (D.20274) <default: <D.18708>, case 0: <D.18699>, case 10: <D.18707>, case 16: <D.18706>, case 256: <D.18700>, case 512: <D.18702>, case 768: <D.18703>, case 1024: <D.18704>, case 1280: <D.18705>>
    <D.18699>:
    <D.18700>:
    conv = 0;
    goto <D.18701>;
    <D.18702>:
    conv = 1;
    goto <D.18701>;
    <D.18703>:
    conv = 2;
    goto <D.18701>;
    <D.18704>:
    conv = 3;
    goto <D.18701>;
    <D.18705>:
    conv = 4;
    goto <D.18701>;
    <D.18706>:
    <D.18707>:
    <D.18708>:
    mono_loader_unlock ();
    D.20201 = m->klass;
    D.20252 = m->name;
    D.20272 = piinfo->piflags;
    D.20273 = (int) D.20272;
    D.20253 = img->name;
    mono_error_set_method_load (error, D.20201, D.20252, "unsupported calling convention : 0x%04x for method 0x%08x from image %s", D.20273, idx, D.20253);
    D.20176 = 0B;
    return D.20176;
    <D.18701>:
    D.20275 = (unsigned char) conv;
    D.20276 = (<unnamed-unsigned:6>) D.20275;
    signature->call_convention = D.20276;
  }
  <D.20271>:
  <D.20269>:
  mono_memory_barrier ();
  m->signature = signature;
  mono_loader_unlock ();
  D.20176 = m->signature;
  return D.20176;
}


mono_memory_barrier ()
{
  __sync_synchronize ();
}


mono_method_signature (struct MonoMethod * m)
{
  struct MonoClass * D.20282;
  const char * D.20283;
  const char * D.20284;
  struct MonoMethodSignature * D.20285;
  struct MonoError error;
  struct MonoMethodSignature * sig;

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

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


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

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


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

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


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

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


mono_method_get_header (struct MonoMethod * method)
{
  short unsigned int D.20296;
  int D.20297;
  int D.20298;
  short unsigned int D.20300;
  unsigned int D.20301;
  unsigned int D.20302;
  int D.20304;
  struct MonoMethodHeader * D.20305;
  long unsigned int D.20306;
  long unsigned int D.20307;
  struct MonoMethodHeader * D.20310;
  struct MonoMethod * D.20313;
  struct MonoGenericContext * D.20316;
  struct MonoMethodHeader * D.20317;
  long unsigned int D.20318;
  struct MonoMethodHeader * D.20321;
  _Bool D.20322;
  long int D.20323;
  long int D.20324;
  unsigned int D.20327;
  unsigned int D.20328;
  _Bool D.20329;
  long int D.20330;
  long int D.20331;
  int D.20334;
  struct MonoClass * D.20335;
  struct MonoTableInfo * D.20336;
  int D.20337;
  int D.20338;
  struct MonoGenericContainer * D.20343;
  int idx;
  guint32 rva;
  struct MonoImage * img;
  void * loc;
  struct MonoMethodHeader * header;

  D.20296 = method->flags;
  D.20297 = (int) D.20296;
  D.20298 = D.20297 & 1024;
  if (D.20298 != 0) goto <D.20294>; else goto <D.20299>;
  <D.20299>:
  D.20300 = method->iflags;
  D.20301 = (unsigned int) D.20300;
  D.20302 = D.20301 & 4099;
  if (D.20302 != 0) goto <D.20294>; else goto <D.20303>;
  <D.20303>:
  D.20296 = method->flags;
  D.20297 = (int) D.20296;
  D.20304 = D.20297 & 8192;
  if (D.20304 != 0) goto <D.20294>; else goto <D.20295>;
  <D.20294>:
  D.20305 = 0B;
  return D.20305;
  <D.20295>:
  D.20306 = BIT_FIELD_REF <*method, 64, 256>;
  D.20307 = D.20306 & 2251799813685248;
  if (D.20307 != 0) goto <D.20308>; else goto <D.20309>;
  <D.20308>:
  {
    struct MonoMethodInflated * imethod;
    struct MonoMethodHeader * header;

    imethod = method;
    mono_loader_lock ();
    D.20310 = imethod->header;
    if (D.20310 != 0B) goto <D.20311>; else goto <D.20312>;
    <D.20311>:
    mono_loader_unlock ();
    D.20305 = imethod->header;
    return D.20305;
    <D.20312>:
    D.20313 = imethod->declaring;
    header = mono_method_get_header (D.20313);
    if (header == 0B) goto <D.20314>; else goto <D.20315>;
    <D.20314>:
    mono_loader_unlock ();
    D.20305 = 0B;
    return D.20305;
    <D.20315>:
    D.20316 = mono_method_get_context (method);
    D.20317 = inflate_generic_header (header, D.20316);
    imethod->header = D.20317;
    mono_loader_unlock ();
    mono_metadata_free_mh (header);
    D.20305 = imethod->header;
    return D.20305;
  }
  <D.20309>:
  D.20306 = BIT_FIELD_REF <*method, 64, 256>;
  D.20318 = D.20306 & 4476578029606273024;
  if (D.20318 != 0) goto <D.20319>; else goto <D.20320>;
  <D.20319>:
  {
    struct MonoMethodWrapper * mw;

    mw = method;
    D.20321 = mw->header;
    D.20322 = D.20321 == 0B;
    D.20323 = (long int) D.20322;
    D.20324 = __builtin_expect (D.20323, 0);
    if (D.20324 != 0) goto <D.20325>; else goto <D.20326>;
    <D.20325>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2599, "mw->header");
    <D.20326>:
    D.20305 = mw->header;
    return D.20305;
  }
  <D.20320>:
  D.20327 = method->token;
  D.20328 = D.20327 >> 24;
  D.20329 = D.20328 != 6;
  D.20330 = (long int) D.20329;
  D.20331 = __builtin_expect (D.20330, 0);
  if (D.20331 != 0) goto <D.20332>; else goto <D.20333>;
  <D.20332>:
  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.20333>:
  D.20327 = method->token;
  D.20334 = (int) D.20327;
  idx = D.20334 & 16777215;
  D.20335 = method->klass;
  img = D.20335->image;
  D.20336 = &img->tables[6];
  D.20337 = idx + -1;
  rva = mono_metadata_decode_row_col (D.20336, D.20337, 0);
  D.20338 = mono_verifier_verify_method_header (img, rva, 0B);
  if (D.20338 == 0) goto <D.20339>; else goto <D.20340>;
  <D.20339>:
  D.20305 = 0B;
  return D.20305;
  <D.20340>:
  loc = mono_image_rva_map (img, rva);
  if (loc == 0B) goto <D.20341>; else goto <D.20342>;
  <D.20341>:
  D.20305 = 0B;
  return D.20305;
  <D.20342>:
  D.20343 = mono_method_get_generic_container (method);
  header = mono_metadata_parse_mh_full (img, D.20343, loc);
  D.20305 = header;
  return D.20305;
}


inflate_generic_header (struct MonoMethodHeader * header, struct MonoGenericContext * context)
{
  short unsigned int D.20345;
  long unsigned int D.20346;
  long unsigned int D.20347;
  long unsigned int D.20348;
  const unsigned char * D.20349;
  unsigned int D.20350;
  <unnamed-unsigned:15> D.20351;
  <unnamed-unsigned:15> D.20352;
  <unnamed-unsigned:1> D.20353;
  struct MonoExceptionClause * D.20354;
  struct MonoType * D.20355;
  struct MonoType * D.20356;
  int D.20357;
  long unsigned int D.20358;
  long unsigned int D.20359;
  <unnamed-unsigned:15> D.20362;
  unsigned int D.20363;
  unsigned int D.20364;
  void * D.20365;
  struct MonoExceptionClause * D.20366;
  long unsigned int D.20367;
  long unsigned int D.20368;
  unsigned int D.20369;
  struct MonoClass * D.20372;
  struct MonoClass * D.20373;
  int D.20374;
  struct MonoMethodHeader * D.20375;
  struct MonoMethodHeader * res;
  int i;

  D.20345 = header->num_locals;
  D.20346 = (long unsigned int) D.20345;
  D.20347 = D.20346 + 4;
  D.20348 = D.20347 * 8;
  res = monoeg_malloc0 (D.20348);
  D.20349 = header->code;
  res->code = D.20349;
  D.20350 = header->code_size;
  res->code_size = D.20350;
  D.20351 = header->max_stack;
  res->max_stack = D.20351;
  D.20352 = header->num_clauses;
  res->num_clauses = D.20352;
  D.20353 = header->init_locals;
  res->init_locals = D.20353;
  D.20345 = header->num_locals;
  res->num_locals = D.20345;
  D.20354 = header->clauses;
  res->clauses = D.20354;
  i = 0;
  goto <D.18256>;
  <D.18255>:
  D.20355 = header->locals[i];
  D.20356 = mono_class_inflate_generic_type (D.20355, context);
  res->locals[i] = D.20356;
  i = i + 1;
  <D.18256>:
  D.20345 = header->num_locals;
  D.20357 = (int) D.20345;
  if (D.20357 > i) goto <D.18255>; else goto <D.18257>;
  <D.18257>:
  D.20358 = BIT_FIELD_REF <*res, 64, 64>;
  D.20359 = D.20358 & 65534;
  if (D.20359 != 0) goto <D.20360>; else goto <D.20361>;
  <D.20360>:
  D.20354 = header->clauses;
  D.20362 = res->num_clauses;
  D.20363 = (unsigned int) D.20362;
  D.20364 = D.20363 * 32;
  D.20365 = monoeg_g_memdup (D.20354, D.20364);
  res->clauses = D.20365;
  i = 0;
  goto <D.18261>;
  <D.18260>:
  {
    struct MonoExceptionClause * clause;

    D.20366 = res->clauses;
    D.20367 = (long unsigned int) i;
    D.20368 = D.20367 * 32;
    clause = D.20366 + D.20368;
    D.20369 = clause->flags;
    if (D.20369 != 0) goto <D.20370>; else goto <D.20371>;
    <D.20370>:
    // predicted unlikely by continue predictor.
    goto <D.18259>;
    <D.20371>:
    D.20372 = clause->data.catch_class;
    D.20373 = mono_class_inflate_generic_class (D.20372, context);
    clause->data.catch_class = D.20373;
  }
  <D.18259>:
  i = i + 1;
  <D.18261>:
  D.20352 = header->num_clauses;
  D.20374 = (int) D.20352;
  if (D.20374 > i) goto <D.18260>; else goto <D.18262>;
  <D.18262>:
  <D.20361>:
  D.20375 = res;
  return D.20375;
}


mono_method_get_flags (struct MonoMethod * method, guint32 * iflags)
{
  short unsigned int D.20379;
  unsigned int D.20380;
  uint32_t D.20381;
  short unsigned int D.20382;

  if (iflags != 0B) goto <D.20377>; else goto <D.20378>;
  <D.20377>:
  D.20379 = method->iflags;
  D.20380 = (unsigned int) D.20379;
  *iflags = D.20380;
  <D.20378>:
  D.20382 = method->flags;
  D.20381 = (uint32_t) D.20382;
  return D.20381;
}


mono_method_get_index (struct MonoMethod * method)
{
  unsigned char D.20384;
  uint32_t D.20387;
  unsigned int D.20388;
  unsigned char D.20391;
  struct MonoMethod * * D.20394;
  long unsigned int D.20395;
  long unsigned int D.20396;
  struct MonoMethod * * D.20397;
  struct MonoMethod * D.20398;
  struct MonoImage * D.20401;
  long unsigned int D.20402;
  long unsigned int D.20403;
  unsigned int D.20406;
  unsigned int i.80;
  unsigned int D.20408;
  unsigned int D.20409;
  unsigned int D.20410;
  struct MonoClass * klass;
  int i;

  klass = method->klass;
  D.20384 = klass->rank;
  if (D.20384 != 0) goto <D.20385>; else goto <D.20386>;
  <D.20385>:
  D.20387 = 0;
  return D.20387;
  <D.20386>:
  D.20388 = method->token;
  if (D.20388 != 0) goto <D.20389>; else goto <D.20390>;
  <D.20389>:
  D.20388 = method->token;
  D.20387 = D.20388 & 16777215;
  return D.20387;
  <D.20390>:
  mono_class_setup_methods (klass);
  D.20391 = klass->exception_type;
  if (D.20391 != 0) goto <D.20392>; else goto <D.20393>;
  <D.20392>:
  D.20387 = 0;
  return D.20387;
  <D.20393>:
  i = 0;
  goto <D.18745>;
  <D.18744>:
  D.20394 = klass->methods;
  D.20395 = (long unsigned int) i;
  D.20396 = D.20395 * 8;
  D.20397 = D.20394 + D.20396;
  D.20398 = *D.20397;
  if (D.20398 == method) goto <D.20399>; else goto <D.20400>;
  <D.20399>:
  D.20401 = klass->image;
  D.20402 = BIT_FIELD_REF <*D.20401, 64, 192>;
  D.20403 = D.20402 & 67108864;
  if (D.20403 != 0) goto <D.20404>; else goto <D.20405>;
  <D.20404>:
  D.20401 = klass->image;
  D.20406 = klass->method.first;
  i.80 = (unsigned int) i;
  D.20408 = D.20406 + i.80;
  D.20409 = D.20408 + 1;
  D.20387 = mono_metadata_translate_token_index (D.20401, 6, D.20409);
  return D.20387;
  <D.20405>:
  D.20406 = klass->method.first;
  i.80 = (unsigned int) i;
  D.20408 = D.20406 + i.80;
  D.20387 = D.20408 + 1;
  return D.20387;
  <D.20400>:
  i = i + 1;
  <D.18745>:
  D.20410 = klass->method.count;
  i.80 = (unsigned int) i;
  if (D.20410 > i.80) goto <D.18744>; else goto <D.18746>;
  <D.18746>:
  D.20387 = 0;
  return D.20387;
}


