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

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


mono_native_tls_alloc (pthread_key_t * key, void * destructor)
{
  int D.18724;
  void (*<Tc2>) (void *) destructor.1;
  int D.18726;
  _Bool D.18727;

  destructor.1 = (void (*<Tc2>) (void *)) destructor;
  D.18726 = pthread_key_create (key, destructor.1);
  D.18727 = D.18726 == 0;
  D.18724 = (int) D.18727;
  return D.18724;
}


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.18732;
  char * D.18733;
  char * D.18734;
  char * D.18735;

  goto <D.18343>;
  <D.18342>:
  {
    struct MonoDllMap * next;

    next = map->next;
    D.18732 = map->dll;
    monoeg_g_free (D.18732);
    D.18733 = map->target;
    monoeg_g_free (D.18733);
    D.18734 = map->func;
    monoeg_g_free (D.18734);
    D.18735 = map->target_func;
    monoeg_g_free (D.18735);
    monoeg_g_free (map);
    map = next;
  }
  <D.18343>:
  if (map != 0B) goto <D.18342>; else goto <D.18344>;
  <D.18344>:
}


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


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

  D.18736 = mono_loader_get_last_error ();
  if (D.18736 != 0B) goto <D.18737>; else goto <D.18738>;
  <D.18737>:
  return;
  <D.18738>:
  error = monoeg_malloc0 (56);
  error->exception_type = 8;
  D.18739 = monoeg_strdup (assembly_name);
  error->assembly_name = D.18739;
  error->ref_only = ref_only;
  if (ref_only != 0) goto <D.18740>; else goto <D.18741>;
  <D.18740>:
  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.18742>;
  <D.18741>:
  mono_trace (16, 1, "Could not load file or assembly \'%s\' or one of its dependencies.", assembly_name);
  <D.18742>:
  set_loader_error (error);
}


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

  if (str != 0B) goto <D.18744>; else goto <D.18745>;
  <D.18744>:
  D.18746 = __strdup (str);
  return D.18746;
  <D.18745>:
  D.18746 = 0B;
  return D.18746;
}


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.18749;
  int D.18750;
  _Bool D.18751;

  D.18750 = pthread_setspecific (key, value);
  D.18751 = D.18750 == 0;
  D.18749 = (int) D.18751;
  return D.18749;
}


mono_loader_set_error_type_load (const char * class_name, const char * assembly_name)
{
  struct MonoLoaderError * D.18753;
  gchar * D.18756;
  gchar * D.18757;
  struct MonoLoaderError * error;

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


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

  D.18759 = mono_loader_get_last_error ();
  if (D.18759 != 0B) goto <D.18760>; else goto <D.18761>;
  <D.18760>:
  return;
  <D.18761>:
  error = monoeg_malloc0 (56);
  error->exception_type = 5;
  D.18762 = monoeg_strdup (class_name);
  error->class_name = D.18762;
  error->member_name = member_name;
  set_loader_error (error);
}


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

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


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

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


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

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


mono_loader_clear_error ()
{
  unsigned int loader_error_thread_id.7;
  char * D.18778;
  char * D.18779;
  char * D.18780;
  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.18776>; else goto <D.18777>;
  <D.18776>:
  D.18778 = ex->class_name;
  monoeg_g_free (D.18778);
  D.18779 = ex->assembly_name;
  monoeg_g_free (D.18779);
  D.18780 = ex->msg;
  monoeg_g_free (D.18780);
  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.18777>:
}


mono_loader_error_prepare_exception (struct MonoLoaderError * error)
{
  unsigned char D.18781;
  int D.18782;
  char * D.18783;
  char * D.18784;
  struct MonoDomain * D.18785;
  const char * D.18786;
  struct MonoClass * D.18787;
  int D.18791;
  struct MonoDomain * D.18795;
  struct MonoString * D.18796;
  char * D.18797;
  struct MonoException * D.18798;
  struct MonoException * ex;

  ex = 0B;
  D.18781 = error->exception_type;
  D.18782 = (int) D.18781;
  switch (D.18782) <default: <D.17978>, case 5: <D.17967>, case 6: <D.17970>, case 7: <D.17962>, case 8: <D.17973>, case 12: <D.17976>>
  <D.17962>:
  {
    char * cname;
    char * aname;
    struct MonoString * class_name;

    D.18783 = error->class_name;
    cname = monoeg_strdup (D.18783);
    D.18784 = error->assembly_name;
    aname = monoeg_strdup (D.18784);
    mono_loader_clear_error ();
    D.18785 = mono_domain_get ();
    class_name = mono_string_new (D.18785, cname);
    ex = mono_get_exception_type_load (class_name, aname);
    monoeg_g_free (cname);
    monoeg_g_free (aname);
    goto <D.17966>;
  }
  <D.17967>:
  {
    char * cname;
    char * aname;

    D.18783 = error->class_name;
    cname = monoeg_strdup (D.18783);
    D.18786 = error->member_name;
    aname = monoeg_strdup (D.18786);
    mono_loader_clear_error ();
    ex = mono_get_exception_missing_method (cname, aname);
    monoeg_g_free (cname);
    monoeg_g_free (aname);
    goto <D.17966>;
  }
  <D.17970>:
  {
    char * class_name;
    char * cmembername;

    D.18786 = error->member_name;
    cmembername = monoeg_strdup (D.18786);
    D.18787 = error->klass;
    if (D.18787 != 0B) goto <D.18788>; else goto <D.18789>;
    <D.18788>:
    D.18787 = error->klass;
    class_name = mono_type_get_full_name (D.18787);
    goto <D.18790>;
    <D.18789>:
    class_name = monoeg_strdup ("");
    <D.18790>:
    mono_loader_clear_error ();
    ex = mono_get_exception_missing_field (class_name, cmembername);
    monoeg_g_free (class_name);
    monoeg_g_free (cmembername);
    goto <D.17966>;
  }
  <D.17973>:
  {
    char * msg;
    char * filename;

    D.18791 = error->ref_only;
    if (D.18791 != 0) goto <D.18792>; else goto <D.18793>;
    <D.18792>:
    D.18784 = 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.18784);
    goto <D.18794>;
    <D.18793>:
    D.18784 = error->assembly_name;
    msg = monoeg_g_strdup_printf ("Could not load file or assembly \'%s\' or one of its dependencies.", D.18784);
    <D.18794>:
    D.18784 = error->assembly_name;
    filename = monoeg_strdup (D.18784);
    mono_loader_clear_error ();
    D.18795 = mono_domain_get ();
    D.18796 = mono_string_new (D.18795, filename);
    ex = mono_get_exception_file_not_found2 (msg, D.18796);
    monoeg_g_free (msg);
    monoeg_g_free (filename);
    goto <D.17966>;
  }
  <D.17976>:
  {
    char * msg;

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


mono_field_from_token (struct MonoImage * image, guint32 token, struct MonoClass * * retklass, struct MonoGenericContext * context)
{
  unsigned char D.18800;
  unsigned char D.18801;
  struct MonoClass * D.18807;
  struct MonoClass * handle_class.8;
  char * D.18809;
  gchar * D.18810;
  struct MonoClassField * D.18811;
  struct MonoClass * D.18812;
  long unsigned int D.18813;
  const void * D.18814;
  struct GHashTable * D.18815;
  struct MonoClass * D.18818;
  unsigned int D.18819;
  unsigned int D.18823;
  unsigned int D.18826;
  struct MonoGenericClass * D.18835;
  struct MonoGenericContainer * D.18838;
  void * D.18841;
  struct MonoClass * k;
  guint32 type;
  struct MonoClassField * field;

  D.18800 = BIT_FIELD_REF <*image, 8, 224>;
  D.18801 = D.18800 & 8;
  if (D.18801 != 0) goto <D.18802>; else goto <D.18803>;
  <D.18802>:
  {
    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.18804>; else goto <D.18806>;
        <D.18806>:
        D.18807 = mono_defaults.fieldhandle_class;
        handle_class.8 = handle_class;
        if (D.18807 != handle_class.8) goto <D.18804>; else goto <D.18805>;
        <D.18804>:
        D.18809 = image->name;
        D.18810 = monoeg_g_strdup_printf ("Bad field token 0x%08x on image %s.", token, D.18809);
        mono_loader_set_error_bad_image (D.18810);
        D.18811 = 0B;
        return D.18811;
        <D.18805>:
        D.18812 = result->parent;
        *retklass = D.18812;
        D.18811 = result;
        return D.18811;
      }
    finally
      {
        handle_class = {CLOBBER};
      }
  }
  <D.18803>:
  mono_image_lock (image);
  D.18813 = (long unsigned int) token;
  D.18814 = (const void *) D.18813;
  D.18815 = image->field_cache;
  field = monoeg_g_hash_table_lookup (D.18815, D.18814);
  if (field != 0B) goto <D.18816>; else goto <D.18817>;
  <D.18816>:
  D.18818 = field->parent;
  *retklass = D.18818;
  mono_image_unlock (image);
  D.18811 = field;
  return D.18811;
  <D.18817>:
  mono_image_unlock (image);
  D.18819 = token >> 24;
  if (D.18819 == 10) goto <D.18820>; else goto <D.18821>;
  <D.18820>:
  field = field_from_memberref (image, token, retklass, context);
  goto <D.18822>;
  <D.18821>:
  D.18823 = token & 16777215;
  type = mono_metadata_typedef_from_field (image, D.18823);
  if (type == 0) goto <D.18824>; else goto <D.18825>;
  <D.18824>:
  D.18811 = 0B;
  return D.18811;
  <D.18825>:
  D.18826 = type | 33554432;
  k = mono_class_get (image, D.18826);
  if (k == 0B) goto <D.18827>; else goto <D.18828>;
  <D.18827>:
  D.18811 = 0B;
  return D.18811;
  <D.18828>:
  mono_class_init (k);
  if (retklass != 0B) goto <D.18829>; else goto <D.18830>;
  <D.18829>:
  *retklass = k;
  <D.18830>:
  field = mono_class_get_field (k, token);
  <D.18822>:
  mono_image_lock (image);
  if (field != 0B) goto <D.18831>; else goto <D.18832>;
  <D.18831>:
  D.18818 = field->parent;
  if (D.18818 != 0B) goto <D.18833>; else goto <D.18834>;
  <D.18833>:
  D.18818 = field->parent;
  D.18835 = D.18818->generic_class;
  if (D.18835 == 0B) goto <D.18836>; else goto <D.18837>;
  <D.18836>:
  D.18818 = field->parent;
  D.18838 = D.18818->generic_container;
  if (D.18838 == 0B) goto <D.18839>; else goto <D.18840>;
  <D.18839>:
  D.18813 = (long unsigned int) token;
  D.18841 = (void *) D.18813;
  D.18815 = image->field_cache;
  monoeg_g_hash_table_insert_replace (D.18815, D.18841, field, 0);
  <D.18840>:
  <D.18837>:
  <D.18834>:
  <D.18832>:
  mono_image_unlock (image);
  D.18811 = field;
  return D.18811;
}


field_from_memberref (struct MonoImage * image, guint32 token, struct MonoClass * * retklass, struct MonoGenericContext * context)
{
  unsigned int D.18844;
  int D.18845;
  const struct MonoTableInfo * D.18846;
  unsigned int D.18847;
  unsigned int D.18848;
  unsigned int D.18849;
  int D.18850;
  char * D.18853;
  gchar * D.18854;
  struct MonoClassField * D.18855;
  unsigned int D.18856;
  unsigned int D.18857;
  unsigned int D.18858;
  unsigned int D.18861;
  const char * D.18862;
  const char * ptr.9;
  const char * ptr.10;
  const char * ptr.11;
  const char * ptr.12;
  char D.18867;
  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.18844 = idx + 4294967295;
      D.18845 = (int) D.18844;
      D.18846 = tables + 160;
      mono_metadata_decode_row (D.18846, D.18845, &cols, 3);
      D.18847 = cols[0];
      nindex = D.18847 >> 3;
      D.18847 = cols[0];
      class = D.18847 & 7;
      D.18848 = cols[1];
      fname = mono_metadata_string_heap (image, D.18848);
      D.18849 = cols[2];
      D.18850 = mono_verifier_verify_memberref_field_signature (image, D.18849, 0B);
      if (D.18850 == 0) goto <D.18851>; else goto <D.18852>;
      <D.18851>:
      D.18853 = image->name;
      D.18854 = monoeg_g_strdup_printf ("Bad field signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, D.18853);
      mono_loader_set_error_bad_image (D.18854);
      D.18855 = 0B;
      return D.18855;
      <D.18852>:
      switch (class) <default: <D.18011>, case 0: <D.18007>, case 1: <D.18009>, case 4: <D.18010>>
      <D.18007>:
      class_table = 33554432;
      D.18856 = nindex | 33554432;
      klass = mono_class_get (image, D.18856);
      goto <D.18008>;
      <D.18009>:
      class_table = 16777216;
      D.18857 = nindex | 16777216;
      klass = mono_class_from_typeref (image, D.18857);
      goto <D.18008>;
      <D.18010>:
      class_table = 452984832;
      D.18858 = nindex | 452984832;
      klass = mono_class_get_full (image, D.18858, context);
      goto <D.18008>;
      <D.18011>:
      monoeg_g_log (0B, 16, "field load from %x", class);
      D.18855 = 0B;
      return D.18855;
      <D.18008>:
      if (klass == 0B) goto <D.18859>; else goto <D.18860>;
      <D.18859>:
      {
        char * name;

        D.18861 = class_table | nindex;
        name = mono_class_name_from_token (image, D.18861);
        D.18861 = class_table | nindex;
        monoeg_g_log (0B, 16, "Missing field %s in class %s (type token %d)", fname, name, D.18861);
        D.18862 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.18862);
        monoeg_g_free (name);
        D.18855 = 0B;
        return D.18855;
      }
      <D.18860>:
      D.18849 = cols[2];
      ptr.9 = mono_metadata_blob_heap (image, D.18849);
      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.18867 = *ptr.11;
      if (D.18867 != 6) goto <D.18868>; else goto <D.18869>;
      <D.18868>:
      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.18855 = 0B;
      return D.18855;
      <D.18869>:
      D.18849 = cols[2];
      sig_type = find_cached_memberref_sig (image, D.18849);
      if (sig_type == 0B) goto <D.18870>; else goto <D.18871>;
      <D.18870>:
      ptr.10 = ptr;
      sig_type = mono_metadata_parse_type (image, 0, 0, ptr.10, &ptr);
      if (sig_type == 0B) goto <D.18872>; else goto <D.18873>;
      <D.18872>:
      mono_loader_set_error_field_load (klass, fname);
      D.18855 = 0B;
      return D.18855;
      <D.18873>:
      D.18849 = cols[2];
      sig_type = cache_memberref_sig (image, D.18849, sig_type);
      <D.18871>:
      mono_class_init (klass);
      if (retklass != 0B) goto <D.18874>; else goto <D.18875>;
      <D.18874>:
      *retklass = klass;
      <D.18875>:
      field = mono_class_get_field_from_name_full (klass, fname, sig_type);
      if (field == 0B) goto <D.18876>; else goto <D.18877>;
      <D.18876>:
      mono_loader_set_error_field_load (klass, fname);
      <D.18877>:
      D.18855 = field;
      return D.18855;
    }
  finally
    {
      cols = {CLOBBER};
      ptr = {CLOBBER};
    }
}


find_cached_memberref_sig (struct MonoImage * image, guint32 sig_idx)
{
  long unsigned int D.18880;
  const void * D.18881;
  struct GHashTable * D.18882;
  void * D.18883;
  void * res;

  mono_loader_lock ();
  D.18880 = (long unsigned int) sig_idx;
  D.18881 = (const void *) D.18880;
  D.18882 = image->memberref_signatures;
  res = monoeg_g_hash_table_lookup (D.18882, D.18881);
  mono_loader_unlock ();
  D.18883 = res;
  return D.18883;
}


cache_memberref_sig (struct MonoImage * image, guint32 sig_idx, void * sig)
{
  long unsigned int D.18885;
  const void * D.18886;
  struct GHashTable * D.18887;
  void * D.18891;
  unsigned int memberref_sig_cache_size.13;
  unsigned int memberref_sig_cache_size.14;
  void * D.18894;
  void * prev_sig;

  mono_loader_lock ();
  D.18885 = (long unsigned int) sig_idx;
  D.18886 = (const void *) D.18885;
  D.18887 = image->memberref_signatures;
  prev_sig = monoeg_g_hash_table_lookup (D.18887, D.18886);
  if (prev_sig != 0B) goto <D.18888>; else goto <D.18889>;
  <D.18888>:
  sig = prev_sig;
  goto <D.18890>;
  <D.18889>:
  D.18885 = (long unsigned int) sig_idx;
  D.18891 = (void *) D.18885;
  D.18887 = image->memberref_signatures;
  monoeg_g_hash_table_insert_replace (D.18887, D.18891, sig, 0);
  memberref_sig_cache_size.13 = memberref_sig_cache_size;
  memberref_sig_cache_size.14 = memberref_sig_cache_size.13 + 32;
  memberref_sig_cache_size = memberref_sig_cache_size.14;
  <D.18890>:
  mono_loader_unlock ();
  D.18894 = sig;
  return D.18894;
}


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

  res = inflate_generic_signature_checked (0B, sig, context, error);
  D.18896 = mono_error_ok (error);
  if (D.18896 == 0) goto <D.18897>; else goto <D.18898>;
  <D.18897>:
  D.18899 = 0B;
  return D.18899;
  <D.18898>:
  cached = mono_metadata_get_inflated_signature (res, context);
  if (cached != res) goto <D.18900>; else goto <D.18901>;
  <D.18900>:
  mono_metadata_free_inflated_signature (res);
  <D.18901>:
  D.18899 = cached;
  return D.18899;
}


inflate_generic_signature_checked (struct MonoImage * image, struct MonoMethodSignature * sig, struct MonoGenericContext * context, struct MonoError * error)
{
  struct MonoMethodSignature * D.18905;
  short unsigned int D.18906;
  long unsigned int D.18907;
  long unsigned int D.18908;
  long unsigned int D.18909;
  struct MonoType * D.18910;
  struct MonoType * D.18911;
  int D.18912;
  struct MonoType * D.18914;
  struct MonoType * D.18915;
  struct MonoType * D.18916;
  int D.18917;
  struct MonoType * D.18921;
  int D.18922;
  <unnamed-unsigned:1> D.18923;
  <unnamed-unsigned:1> D.18924;
  <unnamed-unsigned:6> D.18925;
  <unnamed-unsigned:1> D.18926;
  short unsigned int D.18927;
  short int D.18928;
  unsigned char D.18929;
  <unnamed-unsigned:1> D.18930;
  struct MonoMethodSignature * res;
  gboolean is_open;
  int i;
  void fail = <<< error >>>;

  mono_error_init (error);
  if (context == 0B) goto <D.18903>; else goto <D.18904>;
  <D.18903>:
  D.18905 = sig;
  return D.18905;
  <D.18904>:
  D.18906 = sig->param_count;
  D.18907 = (long unsigned int) D.18906;
  D.18908 = D.18907 + 2;
  D.18909 = D.18908 * 8;
  res = monoeg_malloc0 (D.18909);
  D.18906 = sig->param_count;
  res->param_count = D.18906;
  res->sentinelpos = -1;
  D.18910 = sig->ret;
  D.18911 = mono_class_inflate_generic_type_checked (D.18910, context, error);
  res->ret = D.18911;
  D.18912 = mono_error_ok (error);
  if (D.18912 == 0) goto fail; else goto <D.18913>;
  <D.18913>:
  D.18914 = res->ret;
  is_open = mono_class_is_open_constructed_type (D.18914);
  i = 0;
  goto <D.18165>;
  <D.18164>:
  D.18915 = sig->params[i];
  D.18916 = mono_class_inflate_generic_type_checked (D.18915, context, error);
  res->params[i] = D.18916;
  D.18917 = mono_error_ok (error);
  if (D.18917 == 0) goto fail; else goto <D.18918>;
  <D.18918>:
  if (is_open == 0) goto <D.18919>; else goto <D.18920>;
  <D.18919>:
  D.18921 = res->params[i];
  is_open = mono_class_is_open_constructed_type (D.18921);
  <D.18920>:
  i = i + 1;
  <D.18165>:
  D.18906 = sig->param_count;
  D.18922 = (int) D.18906;
  if (D.18922 > i) goto <D.18164>; else goto <D.18166>;
  <D.18166>:
  D.18923 = sig->hasthis;
  res->hasthis = D.18923;
  D.18924 = sig->explicit_this;
  res->explicit_this = D.18924;
  D.18925 = sig->call_convention;
  res->call_convention = D.18925;
  D.18926 = sig->pinvoke;
  res->pinvoke = D.18926;
  D.18927 = sig->generic_param_count;
  res->generic_param_count = D.18927;
  D.18928 = sig->sentinelpos;
  res->sentinelpos = D.18928;
  D.18929 = (unsigned char) is_open;
  D.18930 = (<unnamed-unsigned:1>) D.18929;
  res->has_type_parameters = D.18930;
  res->is_inflated = 1;
  D.18905 = res;
  return D.18905;
  fail:
  D.18914 = res->ret;
  if (D.18914 != 0B) goto <D.18931>; else goto <D.18932>;
  <D.18931>:
  D.18914 = res->ret;
  mono_metadata_free_type (D.18914);
  <D.18932>:
  i = 0;
  goto <D.18168>;
  <D.18167>:
  D.18921 = res->params[i];
  if (D.18921 != 0B) goto <D.18933>; else goto <D.18934>;
  <D.18933>:
  D.18921 = res->params[i];
  mono_metadata_free_type (D.18921);
  <D.18934>:
  i = i + 1;
  <D.18168>:
  D.18906 = sig->param_count;
  D.18922 = (int) D.18906;
  if (D.18922 > i) goto <D.18167>; else goto <D.18169>;
  <D.18169>:
  monoeg_g_free (res);
  D.18905 = 0B;
  return D.18905;
}


mono_method_get_signature_full (struct MonoMethod * method, struct MonoImage * image, guint32 token, struct MonoGenericContext * context)
{
  unsigned int D.18936;
  int token.15;
  _Bool D.18938;
  _Bool D.18939;
  _Bool D.18940;
  struct MonoMethodSignature * D.18943;
  short unsigned int D.18948;
  int D.18949;
  int D.18950;
  unsigned char D.18952;
  unsigned char D.18953;
  struct MonoClass * D.18954;
  struct MonoGenericClass * D.18955;
  unsigned char D.18958;
  unsigned char D.18959;
  int D.18963;
  struct MonoTableInfo * D.18964;
  unsigned int D.18965;
  unsigned int sig_idx.16;
  int D.18969;
  unsigned int D.18972;
  unsigned int D.18973;
  char * D.18974;
  gchar * D.18975;
  unsigned int sig_idx.17;
  const char * ptr.18;
  const char * ptr.19;
  int D.18981;
  gchar * D.18984;
  int D.18987;
  const char * D.18990;
  gchar * D.18991;
  unsigned int D.18995;
  unsigned int inflated_signatures_size.20;
  unsigned int inflated_signatures_size.21;
  int table;
  int idx;
  int sig_idx;
  guint32 cols[3];
  struct MonoMethodSignature * sig;
  const char * ptr;

  try
    {
      D.18936 = token >> 24;
      table = (int) D.18936;
      token.15 = (int) token;
      idx = token.15 & 16777215;
      D.18938 = table == 0;
      D.18939 = table == 6;
      D.18940 = D.18938 | D.18939;
      if (D.18940 != 0) goto <D.18941>; else goto <D.18942>;
      <D.18941>:
      D.18943 = mono_method_signature (method);
      return D.18943;
      <D.18942>:
      if (table == 43) goto <D.18944>; else goto <D.18945>;
      <D.18944>:
      D.18948 = method->flags;
      D.18949 = (int) D.18948;
      D.18950 = D.18949 & 8192;
      if (D.18950 != 0) goto <D.18946>; else goto <D.18951>;
      <D.18951>:
      D.18952 = BIT_FIELD_REF <*method, 8, 264>;
      D.18953 = D.18952 & 16;
      if (D.18953 == 0) goto <D.18946>; else goto <D.18947>;
      <D.18946>:
      D.18943 = 0B;
      return D.18943;
      <D.18947>:
      D.18943 = mono_method_signature (method);
      return D.18943;
      <D.18945>:
      D.18954 = method->klass;
      D.18955 = D.18954->generic_class;
      if (D.18955 != 0B) goto <D.18956>; else goto <D.18957>;
      <D.18956>:
      D.18943 = mono_method_signature (method);
      return D.18943;
      <D.18957>:
      D.18958 = BIT_FIELD_REF <*image, 8, 224>;
      D.18959 = D.18958 & 8;
      if (D.18959 != 0) goto <D.18960>; else goto <D.18961>;
      <D.18960>:
      sig = mono_reflection_lookup_signature (image, method, token);
      goto <D.18962>;
      <D.18961>:
      D.18963 = idx + -1;
      D.18964 = &image->tables[10];
      mono_metadata_decode_row (D.18964, D.18963, &cols, 3);
      D.18965 = cols[2];
      sig_idx = (int) D.18965;
      sig_idx.16 = (unsigned int) sig_idx;
      sig = find_cached_memberref_sig (image, sig_idx.16);
      if (sig == 0B) goto <D.18967>; else goto <D.18968>;
      <D.18967>:
      sig_idx.16 = (unsigned int) sig_idx;
      D.18969 = mono_verifier_verify_memberref_method_signature (image, sig_idx.16, 0B);
      if (D.18969 == 0) goto <D.18970>; else goto <D.18971>;
      <D.18970>:
      {
        guint32 class;
        const char * fname;

        D.18972 = cols[0];
        class = D.18972 & 7;
        D.18973 = cols[1];
        fname = mono_metadata_string_heap (image, D.18973);
        D.18974 = image->name;
        D.18975 = monoeg_g_strdup_printf ("Bad method signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, D.18974);
        mono_loader_set_error_bad_image (D.18975);
        D.18943 = 0B;
        return D.18943;
      }
      <D.18971>:
      sig_idx.17 = (unsigned int) sig_idx;
      ptr.18 = mono_metadata_blob_heap (image, sig_idx.17);
      ptr = ptr.18;
      ptr.19 = ptr;
      mono_metadata_decode_blob_size (ptr.19, &ptr);
      ptr.19 = ptr;
      sig = mono_metadata_parse_method_signature (image, 0, ptr.19, 0B);
      if (sig == 0B) goto <D.18979>; else goto <D.18980>;
      <D.18979>:
      D.18943 = 0B;
      return D.18943;
      <D.18980>:
      sig_idx.16 = (unsigned int) sig_idx;
      sig = cache_memberref_sig (image, sig_idx.16, sig);
      <D.18968>:
      D.18981 = mono_verifier_is_sig_compatible (image, method, sig);
      if (D.18981 == 0) goto <D.18982>; else goto <D.18983>;
      <D.18982>:
      {
        guint32 class;
        const char * fname;

        D.18972 = cols[0];
        class = D.18972 & 7;
        D.18973 = cols[1];
        fname = mono_metadata_string_heap (image, D.18973);
        D.18974 = image->name;
        D.18984 = monoeg_g_strdup_printf ("Incompatible method signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, D.18974);
        mono_loader_set_error_bad_image (D.18984);
        D.18943 = 0B;
        return D.18943;
      }
      <D.18983>:
      <D.18962>:
      if (context != 0B) goto <D.18985>; else goto <D.18986>;
      <D.18985>:
      {
        struct MonoError error;
        struct MonoMethodSignature * cached;

        try
          {
            sig = inflate_generic_signature_checked (image, sig, context, &error);
            D.18987 = mono_error_ok (&error);
            if (D.18987 == 0) goto <D.18988>; else goto <D.18989>;
            <D.18988>:
            D.18990 = mono_error_get_message (&error);
            D.18991 = monoeg_g_strdup_printf ("Could not inflate signature %s", D.18990);
            mono_loader_set_error_bad_image (D.18991);
            mono_error_cleanup (&error);
            D.18943 = 0B;
            return D.18943;
            <D.18989>:
            cached = mono_metadata_get_inflated_signature (sig, context);
            if (cached != sig) goto <D.18992>; else goto <D.18993>;
            <D.18992>:
            mono_metadata_free_inflated_signature (sig);
            goto <D.18994>;
            <D.18993>:
            D.18995 = mono_metadata_signature_size (cached);
            inflated_signatures_size.20 = inflated_signatures_size;
            inflated_signatures_size.21 = D.18995 + inflated_signatures_size.20;
            inflated_signatures_size = inflated_signatures_size.21;
            <D.18994>:
            sig = cached;
          }
        finally
          {
            error = {CLOBBER};
          }
      }
      <D.18986>:
      D.18943 = sig;
      return D.18943;
    }
  finally
    {
      cols = {CLOBBER};
      ptr = {CLOBBER};
    }
}


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

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


mono_method_search_in_array_class (struct MonoClass * klass, const char * name, struct MonoMethodSignature * sig)
{
  unsigned char D.19004;
  _Bool D.19005;
  long int D.19006;
  long int D.19007;
  struct MonoMethod * * D.19010;
  long unsigned int D.19011;
  long unsigned int D.19012;
  struct MonoMethod * * D.19013;
  int D.18229;
  const char * D.19014;
  short unsigned int D.19017;
  struct MonoMethodSignature * D.19018;
  short unsigned int D.19019;
  struct MonoMethod * D.19022;
  unsigned int i.22;
  unsigned int D.19024;
  int i;

  mono_class_setup_methods (klass);
  D.19004 = klass->exception_type;
  D.19005 = D.19004 != 0;
  D.19006 = (long int) D.19005;
  D.19007 = __builtin_expect (D.19006, 0);
  if (D.19007 != 0) goto <D.19008>; else goto <D.19009>;
  <D.19008>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 932, "!klass->exception_type");
  <D.19009>:
  i = 0;
  goto <D.18231>;
  <D.18230>:
  {
    struct MonoMethod * method;

    D.19010 = klass->methods;
    D.19011 = (long unsigned int) i;
    D.19012 = D.19011 * 8;
    D.19013 = D.19010 + D.19012;
    method = *D.19013;
    {
      size_t __s1_len;
      size_t __s2_len;

      D.19014 = method->name;
      D.18229 = __builtin_strcmp (D.19014, name);
    }
    if (D.18229 == 0) goto <D.19015>; else goto <D.19016>;
    <D.19015>:
    D.19017 = sig->param_count;
    D.19018 = method->signature;
    D.19019 = D.19018->param_count;
    if (D.19017 == D.19019) goto <D.19020>; else goto <D.19021>;
    <D.19020>:
    D.19022 = method;
    return D.19022;
    <D.19021>:
    <D.19016>:
  }
  i = i + 1;
  <D.18231>:
  i.22 = (unsigned int) i;
  D.19024 = klass->method.count;
  if (i.22 < D.19024) goto <D.18230>; else goto <D.18232>;
  <D.18232>:
  D.19022 = 0B;
  return D.19022;
}


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

  mono_loader_init ();
  mono_loader_lock ();
  if (assembly == 0B) goto <D.19026>; else goto <D.19027>;
  <D.19026>:
  entry = monoeg_malloc0 (40);
  if (dll != 0B) goto <D.19029>; else goto <D.19030>;
  <D.19029>:
  iftmp.23 = monoeg_strdup (dll);
  goto <D.19031>;
  <D.19030>:
  iftmp.23 = 0B;
  <D.19031>:
  entry->dll = iftmp.23;
  if (tdll != 0B) goto <D.19033>; else goto <D.19034>;
  <D.19033>:
  iftmp.24 = monoeg_strdup (tdll);
  goto <D.19035>;
  <D.19034>:
  iftmp.24 = 0B;
  <D.19035>:
  entry->target = iftmp.24;
  if (func != 0B) goto <D.19037>; else goto <D.19038>;
  <D.19037>:
  iftmp.25 = monoeg_strdup (func);
  goto <D.19039>;
  <D.19038>:
  iftmp.25 = 0B;
  <D.19039>:
  entry->func = iftmp.25;
  if (tfunc != 0B) goto <D.19041>; else goto <D.19042>;
  <D.19041>:
  iftmp.26 = monoeg_strdup (tfunc);
  goto <D.19043>;
  <D.19042>:
  iftmp.26 = 0B;
  <D.19043>:
  entry->target_func = iftmp.26;
  global_dll_map.27 = global_dll_map;
  entry->next = global_dll_map.27;
  global_dll_map = entry;
  goto <D.19045>;
  <D.19027>:
  entry = mono_image_alloc0 (assembly, 40);
  if (dll != 0B) goto <D.19047>; else goto <D.19048>;
  <D.19047>:
  iftmp.28 = mono_image_strdup (assembly, dll);
  goto <D.19049>;
  <D.19048>:
  iftmp.28 = 0B;
  <D.19049>:
  entry->dll = iftmp.28;
  if (tdll != 0B) goto <D.19051>; else goto <D.19052>;
  <D.19051>:
  iftmp.29 = mono_image_strdup (assembly, tdll);
  goto <D.19053>;
  <D.19052>:
  iftmp.29 = 0B;
  <D.19053>:
  entry->target = iftmp.29;
  if (func != 0B) goto <D.19055>; else goto <D.19056>;
  <D.19055>:
  iftmp.30 = mono_image_strdup (assembly, func);
  goto <D.19057>;
  <D.19056>:
  iftmp.30 = 0B;
  <D.19057>:
  entry->func = iftmp.30;
  if (tfunc != 0B) goto <D.19059>; else goto <D.19060>;
  <D.19059>:
  iftmp.31 = mono_image_strdup (assembly, tfunc);
  goto <D.19061>;
  <D.19060>:
  iftmp.31 = 0B;
  <D.19061>:
  entry->target_func = iftmp.31;
  D.19062 = assembly->dll_map;
  entry->next = D.19062;
  assembly->dll_map = entry;
  <D.19045>:
  mono_loader_unlock ();
}


mono_lookup_pinvoke_call (struct MonoMethod * method, const char * * exc_class, const char * * exc_arg)
{
  struct MonoClass * D.19063;
  short unsigned int D.19064;
  int D.19065;
  int D.19066;
  _Bool D.19067;
  long int D.19068;
  long int D.19069;
  void * D.19074;
  void * D.19077;
  struct MonoImage * D.19078;
  unsigned char D.19079;
  unsigned char D.19080;
  struct GHashTable * D.19083;
  char * import.32;
  short unsigned int D.19090;
  int D.19092;
  <unnamed-unsigned:24> D.19093;
  int D.19094;
  int D.19095;
  unsigned int D.19098;
  <unnamed-unsigned:24> D.19100;
  unsigned int D.19101;
  unsigned int D.19102;
  short unsigned int D.19103;
  unsigned int D.19104;
  const char * import.33;
  unsigned int D.19106;
  int D.19107;
  const char * import.34;
  struct GHashTable * D.19111;
  struct GHashTable * D.19114;
  struct GHashTable * D.19115;
  const char * new_scope.35;
  struct GHashTable * D.19117;
  int D.18390;
  int iftmp.36;
  int D.18389;
  const char[11] * D.19127;
  unsigned char D.19128;
  int D.19129;
  unsigned char D.19130;
  int D.19131;
  _Bool D.19132;
  _Bool D.19133;
  _Bool D.19134;
  const unsigned char * D.19137;
  unsigned char D.19138;
  int D.19139;
  const unsigned char * D.19140;
  unsigned char D.19141;
  int D.19142;
  _Bool D.19143;
  _Bool D.19144;
  const unsigned char * D.19147;
  unsigned char D.19148;
  int D.19149;
  const unsigned char * D.19150;
  unsigned char D.19151;
  int D.19152;
  _Bool D.19153;
  _Bool D.19154;
  const unsigned char * D.19157;
  unsigned char D.19158;
  int D.19159;
  const unsigned char * D.19160;
  unsigned char D.19161;
  int D.19162;
  struct MonoDl * internal_module.37;
  struct MonoDl * internal_module.38;
  char * D.19170;
  long unsigned int D.19171;
  sizetype D.19172;
  const char * D.19173;
  long unsigned int D.19176;
  sizetype D.19177;
  char * D.19178;
  char * D.19182;
  char * D.19186;
  int D.19192;
  int D.19194;
  int D.19196;
  int D.19198;
  _Bool D.19205;
  _Bool D.19206;
  _Bool D.19207;
  char * error_msg.39;
  _Bool D.19214;
  _Bool D.19215;
  char * D.19218;
  char * iftmp.40;
  void * D.19247;
  gchar * D.19250;
  gchar * D.19251;
  gchar * D.19252;
  short unsigned int D.19253;
  int D.19254;
  int D.19255;
  void * * D.19258;
  char * error_msg.41;
  int D.19263;
  char * error_msg.42;
  int iftmp.43;
  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.19063 = method->klass;
      image = D.19063->image;
      piinfo = method;
      tables = &image->tables;
      im = tables + 448;
      mr = tables + 416;
      import = 0B;
      found_name = 0B;
      module = 0B;
      cached = 0;
      D.19064 = method->flags;
      D.19065 = (int) D.19064;
      D.19066 = D.19065 & 8192;
      D.19067 = D.19066 == 0;
      D.19068 = (long int) D.19067;
      D.19069 = __builtin_expect (D.19068, 0);
      if (D.19069 != 0) goto <D.19070>; else goto <D.19071>;
      <D.19070>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1344, "method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL");
      <D.19071>:
      if (exc_class != 0B) goto <D.19072>; else goto <D.19073>;
      <D.19072>:
      *exc_class = 0B;
      *exc_arg = 0B;
      <D.19073>:
      D.19074 = piinfo->addr;
      if (D.19074 != 0B) goto <D.19075>; else goto <D.19076>;
      <D.19075>:
      D.19077 = piinfo->addr;
      return D.19077;
      <D.19076>:
      D.19063 = method->klass;
      D.19078 = D.19063->image;
      D.19079 = BIT_FIELD_REF <*D.19078, 8, 224>;
      D.19080 = D.19079 & 8;
      if (D.19080 != 0) goto <D.19081>; else goto <D.19082>;
      <D.19081>:
      {
        struct MonoReflectionMethodAux * method_aux;

        D.19063 = method->klass;
        D.19078 = D.19063->image;
        D.19083 = MEM[(struct MonoDynamicImage *)D.19078].method_aux_hash;
        method_aux = monoeg_g_hash_table_lookup (D.19083, method);
        if (method_aux == 0B) goto <D.19084>; else goto <D.19085>;
        <D.19084>:
        D.19077 = 0B;
        return D.19077;
        <D.19085>:
        import.32 = method_aux->dllentry;
        import = import.32;
        orig_scope = method_aux->dll;
      }
      goto <D.19087>;
      <D.19082>:
      D.19090 = piinfo->implmap_idx;
      if (D.19090 == 0) goto <D.19088>; else goto <D.19091>;
      <D.19091>:
      D.19090 = piinfo->implmap_idx;
      D.19092 = (int) D.19090;
      D.19093 = im->rows;
      D.19094 = (int) D.19093;
      if (D.19092 > D.19094) goto <D.19088>; else goto <D.19089>;
      <D.19088>:
      D.19077 = 0B;
      return D.19077;
      <D.19089>:
      D.19090 = piinfo->implmap_idx;
      D.19092 = (int) D.19090;
      D.19095 = D.19092 + -1;
      mono_metadata_decode_row (im, D.19095, &im_cols, 4);
      D.19098 = im_cols[3];
      if (D.19098 == 0) goto <D.19096>; else goto <D.19099>;
      <D.19099>:
      D.19098 = im_cols[3];
      D.19100 = mr->rows;
      D.19101 = (unsigned int) D.19100;
      if (D.19098 > D.19101) goto <D.19096>; else goto <D.19097>;
      <D.19096>:
      D.19077 = 0B;
      return D.19077;
      <D.19097>:
      D.19102 = im_cols[0];
      D.19103 = (short unsigned int) D.19102;
      piinfo->piflags = D.19103;
      D.19104 = im_cols[2];
      import.33 = mono_metadata_string_heap (image, D.19104);
      import = import.33;
      D.19098 = im_cols[3];
      D.19106 = D.19098 + 4294967295;
      D.19107 = (int) D.19106;
      scope_token = mono_metadata_decode_row_col (mr, D.19107, 0);
      orig_scope = mono_metadata_string_heap (image, scope_token);
      <D.19087>:
      import.34 = import;
      mono_dllmap_lookup (image, orig_scope, import.34, &new_scope, &import);
      if (module == 0B) goto <D.19109>; else goto <D.19110>;
      <D.19109>:
      mono_loader_lock ();
      D.19111 = image->pinvoke_scopes;
      if (D.19111 == 0B) goto <D.19112>; else goto <D.19113>;
      <D.19112>:
      D.19114 = monoeg_g_hash_table_new_full (monoeg_g_str_hash, monoeg_g_str_equal, monoeg_g_free, 0B);
      image->pinvoke_scopes = D.19114;
      D.19115 = 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.19115;
      <D.19113>:
      new_scope.35 = new_scope;
      D.19111 = image->pinvoke_scopes;
      module = monoeg_g_hash_table_lookup (D.19111, new_scope.35);
      new_scope.35 = new_scope;
      D.19117 = image->pinvoke_scope_filenames;
      found_name = monoeg_g_hash_table_lookup (D.19117, new_scope.35);
      mono_loader_unlock ();
      if (module != 0B) goto <D.19118>; else goto <D.19119>;
      <D.19118>:
      cached = 1;
      <D.19119>:
      if (found_name != 0B) goto <D.19120>; else goto <D.19121>;
      <D.19120>:
      found_name = monoeg_strdup (found_name);
      <D.19121>:
      <D.19110>:
      if (module == 0B) goto <D.19122>; else goto <D.19123>;
      <D.19122>:
      new_scope.35 = new_scope;
      mono_trace (64, 4, "DllImport attempting to load: \'%s\'.", new_scope.35);
      {
        size_t __s1_len;
        size_t __s2_len;

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

          __s2 = new_scope;
          D.19127 = "__Internal";
          D.19128 = MEM[(const unsigned char *)D.19127];
          D.19129 = (int) D.19128;
          D.19130 = *__s2;
          D.19131 = (int) D.19130;
          __result = D.19129 - D.19131;
          {
            D.19132 = __s2_len != 0;
            D.19133 = __result == 0;
            D.19134 = D.19132 & D.19133;
            if (D.19134 != 0) goto <D.19135>; else goto <D.19136>;
            <D.19135>:
            D.19137 = &MEM[(void *)"__Internal" + 1B];
            D.19138 = *D.19137;
            D.19139 = (int) D.19138;
            D.19140 = __s2 + 1;
            D.19141 = *D.19140;
            D.19142 = (int) D.19141;
            __result = D.19139 - D.19142;
            D.19143 = __s2_len > 1;
            D.19133 = __result == 0;
            D.19144 = D.19143 & D.19133;
            if (D.19144 != 0) goto <D.19145>; else goto <D.19146>;
            <D.19145>:
            D.19147 = &MEM[(void *)"__Internal" + 2B];
            D.19148 = *D.19147;
            D.19149 = (int) D.19148;
            D.19150 = __s2 + 2;
            D.19151 = *D.19150;
            D.19152 = (int) D.19151;
            __result = D.19149 - D.19152;
            D.19153 = __s2_len > 2;
            D.19133 = __result == 0;
            D.19154 = D.19153 & D.19133;
            if (D.19154 != 0) goto <D.19155>; else goto <D.19156>;
            <D.19155>:
            D.19157 = &MEM[(void *)"__Internal" + 3B];
            D.19158 = *D.19157;
            D.19159 = (int) D.19158;
            D.19160 = __s2 + 3;
            D.19161 = *D.19160;
            D.19162 = (int) D.19161;
            __result = D.19159 - D.19162;
            <D.19156>:
            <D.19146>:
            <D.19136>:
          }
          D.18389 = __result;
        }
        iftmp.36 = -D.18389;
        goto <D.19163>;
        <D.19126>:
        new_scope.35 = new_scope;
        iftmp.36 = __builtin_strcmp (new_scope.35, "__Internal");
        <D.19163>:
        D.18390 = iftmp.36;
      }
      if (D.18390 == 0) goto <D.19164>; else goto <D.19165>;
      <D.19164>:
      internal_module.37 = internal_module;
      if (internal_module.37 == 0B) goto <D.19167>; else goto <D.19168>;
      <D.19167>:
      internal_module.38 = mono_dl_open (0B, 1, &error_msg);
      internal_module = internal_module.38;
      <D.19168>:
      module = internal_module;
      <D.19165>:
      <D.19123>:
      i = 0;
      goto <D.18413>;
      <D.18412>:
      {
        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.18400>, case 0: <D.18394>, case 1: <D.18396>, case 2: <D.18398>>
        <D.18394>:
        new_scope.35 = new_scope;
        file_name = monoeg_strdup (new_scope.35);
        goto <D.18395>;
        <D.18396>:
        new_scope.35 = new_scope;
        D.19170 = strstr (new_scope.35, ".dll");
        new_scope.35 = new_scope;
        new_scope.35 = new_scope;
        D.19171 = strlen (new_scope.35);
        D.19172 = D.19171 + 18446744073709551612;
        D.19173 = new_scope.35 + D.19172;
        if (D.19170 == D.19173) goto <D.19174>; else goto <D.19175>;
        <D.19174>:
        new_scope.35 = new_scope;
        file_name = monoeg_strdup (new_scope.35);
        new_scope.35 = new_scope;
        D.19176 = strlen (new_scope.35);
        D.19177 = D.19176 + 18446744073709551612;
        D.19178 = file_name + D.19177;
        *D.19178 = 0;
        goto <D.19179>;
        <D.19175>:
        // predicted unlikely by continue predictor.
        goto <D.18397>;
        <D.19179>:
        goto <D.18395>;
        <D.18398>:
        if (is_absolute != 0) goto <D.19180>; else goto <D.19181>;
        <D.19180>:
        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.19182 = strstr (base_name, "lib");
        if (D.19182 != base_name) goto <D.19183>; else goto <D.19184>;
        <D.19183>:
        {
          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.18395>;
        }
        <D.19184>:
        goto <D.19185>;
        <D.19181>:
        new_scope.35 = new_scope;
        D.19186 = strstr (new_scope.35, "lib");
        new_scope.35 = new_scope;
        if (D.19186 != new_scope.35) goto <D.19187>; else goto <D.19188>;
        <D.19187>:
        new_scope.35 = new_scope;
        file_name = monoeg_g_strdup_printf ("lib%s", new_scope.35);
        goto <D.18395>;
        <D.19188>:
        <D.19185>:
        // predicted unlikely by continue predictor.
        goto <D.18397>;
        <D.18400>:
        new_scope.35 = new_scope;
        D.19192 = monoeg_ascii_strcasecmp ("user32.dll", new_scope.35);
        if (D.19192 == 0) goto <D.19189>; else goto <D.19193>;
        <D.19193>:
        new_scope.35 = new_scope;
        D.19194 = monoeg_ascii_strcasecmp ("kernel32.dll", new_scope.35);
        if (D.19194 == 0) goto <D.19189>; else goto <D.19195>;
        <D.19195>:
        new_scope.35 = new_scope;
        D.19196 = monoeg_ascii_strcasecmp ("user32", new_scope.35);
        if (D.19196 == 0) goto <D.19189>; else goto <D.19197>;
        <D.19197>:
        new_scope.35 = new_scope;
        D.19198 = monoeg_ascii_strcasecmp ("kernel", new_scope.35);
        if (D.19198 == 0) goto <D.19189>; else goto <D.19190>;
        <D.19189>:
        file_name = monoeg_strdup ("libMonoSupportW.so");
        goto <D.19191>;
        <D.19190>:
        // predicted unlikely by continue predictor.
        goto <D.18397>;
        <D.19191>:
        goto <D.18395>;
        <D.18395>:
        if (is_absolute != 0) goto <D.19199>; else goto <D.19200>;
        <D.19199>:
        if (dir_name == 0B) goto <D.19201>; else goto <D.19202>;
        <D.19201>:
        dir_name = monoeg_g_path_get_dirname (file_name);
        <D.19202>:
        if (base_name == 0B) goto <D.19203>; else goto <D.19204>;
        <D.19203>:
        base_name = monoeg_g_path_get_basename (file_name);
        <D.19204>:
        <D.19200>:
        D.19205 = module == 0B;
        D.19206 = is_absolute != 0;
        D.19207 = D.19205 & D.19206;
        if (D.19207 != 0) goto <D.19208>; else goto <D.19209>;
        <D.19208>:
        module = cached_module_load (file_name, 1, &error_msg);
        if (module == 0B) goto <D.19210>; else goto <D.19211>;
        <D.19210>:
        error_msg.39 = error_msg;
        mono_trace (64, 4, "DllImport error loading library \'%s\': \'%s\'.", file_name, error_msg.39);
        error_msg.39 = error_msg;
        monoeg_g_free (error_msg.39);
        goto <D.19213>;
        <D.19211>:
        found_name = monoeg_strdup (file_name);
        <D.19213>:
        <D.19209>:
        D.19205 = module == 0B;
        D.19214 = is_absolute == 0;
        D.19215 = D.19205 & D.19214;
        if (D.19215 != 0) goto <D.19216>; else goto <D.19217>;
        <D.19216>:
        {
          void * iter;
          char * mdirname;

          try
            {
              iter = 0B;
              D.19218 = image->name;
              mdirname = monoeg_g_path_get_dirname (D.19218);
              goto <D.18405>;
              <D.18404>:
              module = cached_module_load (full_name, 1, &error_msg);
              if (module == 0B) goto <D.19219>; else goto <D.19220>;
              <D.19219>:
              error_msg.39 = error_msg;
              mono_trace (64, 4, "DllImport error loading library \'%s\': \'%s\'.", full_name, error_msg.39);
              error_msg.39 = error_msg;
              monoeg_g_free (error_msg.39);
              goto <D.19221>;
              <D.19220>:
              found_name = monoeg_strdup (full_name);
              <D.19221>:
              monoeg_g_free (full_name);
              if (module != 0B) goto <D.18403>; else goto <D.19222>;
              <D.19222>:
              <D.18405>:
              full_name = mono_dl_build_path (mdirname, file_name, &iter);
              if (full_name != 0B) goto <D.18404>; else goto <D.18403>;
              <D.18403>:
              monoeg_g_free (mdirname);
            }
          finally
            {
              iter = {CLOBBER};
            }
        }
        <D.19217>:
        if (module == 0B) goto <D.19223>; else goto <D.19224>;
        <D.19223>:
        {
          void * iter;
          char * file_or_base;

          try
            {
              iter = 0B;
              if (is_absolute != 0) goto <D.19226>; else goto <D.19227>;
              <D.19226>:
              iftmp.40 = base_name;
              goto <D.19228>;
              <D.19227>:
              iftmp.40 = file_name;
              <D.19228>:
              file_or_base = iftmp.40;
              goto <D.18410>;
              <D.18409>:
              module = cached_module_load (full_name, 1, &error_msg);
              if (module == 0B) goto <D.19229>; else goto <D.19230>;
              <D.19229>:
              error_msg.39 = error_msg;
              mono_trace (64, 4, "DllImport error loading library \'%s\': \'%s\'.", full_name, error_msg.39);
              error_msg.39 = error_msg;
              monoeg_g_free (error_msg.39);
              goto <D.19231>;
              <D.19230>:
              found_name = monoeg_strdup (full_name);
              <D.19231>:
              monoeg_g_free (full_name);
              if (module != 0B) goto <D.18408>; else goto <D.19232>;
              <D.19232>:
              <D.18410>:
              full_name = mono_dl_build_path (dir_name, file_or_base, &iter);
              if (full_name != 0B) goto <D.18409>; else goto <D.18408>;
              <D.18408>:
            }
          finally
            {
              iter = {CLOBBER};
            }
        }
        <D.19224>:
        if (module == 0B) goto <D.19233>; else goto <D.19234>;
        <D.19233>:
        module = cached_module_load (file_name, 1, &error_msg);
        if (module == 0B) goto <D.19235>; else goto <D.19236>;
        <D.19235>:
        error_msg.39 = error_msg;
        mono_trace (64, 4, "DllImport error loading library \'%s\': \'%s\'.", file_name, error_msg.39);
        goto <D.19237>;
        <D.19236>:
        found_name = monoeg_strdup (file_name);
        <D.19237>:
        <D.19234>:
        monoeg_g_free (file_name);
        if (is_absolute != 0) goto <D.19238>; else goto <D.19239>;
        <D.19238>:
        monoeg_g_free (base_name);
        monoeg_g_free (dir_name);
        <D.19239>:
        if (module != 0B) goto <D.18411>; else goto <D.19240>;
        <D.19240>:
      }
      <D.18397>:
      i = i + 1;
      <D.18413>:
      if (i <= 3) goto <D.18412>; else goto <D.18411>;
      <D.18411>:
      if (module == 0B) goto <D.19241>; else goto <D.19242>;
      <D.19241>:
      error_msg.39 = error_msg;
      mono_trace (16, 4, "DllImport unable to load library \'%s\'.", error_msg.39);
      error_msg.39 = error_msg;
      monoeg_g_free (error_msg.39);
      if (exc_class != 0B) goto <D.19243>; else goto <D.19244>;
      <D.19243>:
      *exc_class = "DllNotFoundException";
      new_scope.35 = new_scope;
      *exc_arg = new_scope.35;
      <D.19244>:
      D.19077 = 0B;
      return D.19077;
      <D.19242>:
      if (cached == 0) goto <D.19245>; else goto <D.19246>;
      <D.19245>:
      mono_trace (64, 4, "DllImport loaded library \'%s\'.", found_name);
      mono_loader_lock ();
      new_scope.35 = new_scope;
      D.19111 = image->pinvoke_scopes;
      D.19247 = monoeg_g_hash_table_lookup (D.19111, new_scope.35);
      if (D.19247 == 0B) goto <D.19248>; else goto <D.19249>;
      <D.19248>:
      new_scope.35 = new_scope;
      D.19250 = monoeg_strdup (new_scope.35);
      D.19111 = image->pinvoke_scopes;
      monoeg_g_hash_table_insert_replace (D.19111, D.19250, module, 0);
      D.19251 = monoeg_strdup (found_name);
      new_scope.35 = new_scope;
      D.19252 = monoeg_strdup (new_scope.35);
      D.19117 = image->pinvoke_scope_filenames;
      monoeg_g_hash_table_insert_replace (D.19117, D.19252, D.19251, 0);
      <D.19249>:
      mono_loader_unlock ();
      <D.19246>:
      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.19253 = piinfo->piflags;
      D.19254 = (int) D.19253;
      D.19255 = D.19254 & 1;
      if (D.19255 != 0) goto <D.19256>; else goto <D.19257>;
      <D.19256>:
      D.19258 = &piinfo->addr;
      import.34 = import;
      error_msg.41 = mono_dl_symbol (module, import.34, D.19258);
      error_msg = error_msg.41;
      goto <D.19260>;
      <D.19257>:
      {
        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.18433>;
        <D.18432>:
        mangle_stdcall = 0;
        goto <D.18430>;
        <D.18429>:
        {
          gboolean need_param_count;

          need_param_count = 0;
          mangle_param_count = 0;
          goto <D.18427>;
          <D.18426>:
          D.19074 = piinfo->addr;
          if (D.19074 != 0B) goto <D.19261>; else goto <D.19262>;
          <D.19261>:
          // predicted unlikely by continue predictor.
          goto <D.18420>;
          <D.19262>:
          mangled_name = import;
          D.19253 = piinfo->piflags;
          D.19254 = (int) D.19253;
          D.19263 = D.19254 & 6;
          switch (D.19263) <default: <D.18425>, case 2: <D.18424>, case 4: <D.18421>, case 6: <D.18423>>
          <D.18421>:
          if (mangle_charset == 0) goto <D.19264>; else goto <D.19265>;
          <D.19264>:
          import.34 = import;
          mangled_name = monoeg_g_strconcat (import.34, "W", 0B);
          <D.19265>:
          goto <D.18422>;
          <D.18423>:
          if (mangle_charset == 1) goto <D.19266>; else goto <D.19267>;
          <D.19266>:
          import.34 = import;
          mangled_name = monoeg_g_strconcat (import.34, "A", 0B);
          <D.19267>:
          goto <D.18422>;
          <D.18424>:
          <D.18425>:
          if (mangle_charset == 1) goto <D.19268>; else goto <D.19269>;
          <D.19268>:
          import.34 = import;
          mangled_name = monoeg_g_strconcat (import.34, "A", 0B);
          <D.19269>:
          goto <D.18422>;
          <D.18422>:
          mangled_name2 = mangled_name;
          mono_trace (64, 4, "Probing \'%s\'.", mangled_name2);
          D.19258 = &piinfo->addr;
          error_msg.42 = mono_dl_symbol (module, mangled_name2, D.19258);
          error_msg = error_msg.42;
          error_msg.39 = error_msg;
          monoeg_g_free (error_msg.39);
          error_msg = 0B;
          D.19074 = piinfo->addr;
          if (D.19074 != 0B) goto <D.19271>; else goto <D.19272>;
          <D.19271>:
          mono_trace (64, 4, "Found as \'%s\'.", mangled_name2);
          <D.19272>:
          if (mangled_name != mangled_name2) goto <D.19273>; else goto <D.19274>;
          <D.19273>:
          monoeg_g_free (mangled_name2);
          <D.19274>:
          import.34 = import;
          if (mangled_name != import.34) goto <D.19275>; else goto <D.19276>;
          <D.19275>:
          monoeg_g_free (mangled_name);
          <D.19276>:
          <D.18420>:
          mangle_param_count = mangle_param_count + 4;
          <D.18427>:
          if (need_param_count != 0) goto <D.19278>; else goto <D.19279>;
          <D.19278>:
          iftmp.43 = 256;
          goto <D.19280>;
          <D.19279>:
          iftmp.43 = 0;
          <D.19280>:
          if (iftmp.43 >= mangle_param_count) goto <D.18426>; else goto <D.18428>;
          <D.18428>:
        }
        mangle_stdcall = mangle_stdcall + 1;
        <D.18430>:
        if (mangle_stdcall <= 1) goto <D.18429>; else goto <D.18431>;
        <D.18431>:
        mangle_charset = mangle_charset + 1;
        <D.18433>:
        if (mangle_charset <= 1) goto <D.18432>; else goto <D.18434>;
        <D.18434>:
      }
      <D.19260>:
      D.19074 = piinfo->addr;
      if (D.19074 == 0B) goto <D.19281>; else goto <D.19282>;
      <D.19281>:
      error_msg.39 = error_msg;
      monoeg_g_free (error_msg.39);
      if (exc_class != 0B) goto <D.19283>; else goto <D.19284>;
      <D.19283>:
      *exc_class = "EntryPointNotFoundException";
      import.34 = import;
      *exc_arg = import.34;
      <D.19284>:
      D.19077 = 0B;
      return D.19077;
      <D.19282>:
      D.19077 = piinfo->addr;
      return D.19077;
    }
  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.19289;
  int D.19294;
  struct MonoDllMap * global_dll_map.44;
  int res;

  if (assembly != 0B) goto <D.19287>; else goto <D.19288>;
  <D.19287>:
  D.19289 = assembly->dll_map;
  if (D.19289 != 0B) goto <D.19290>; else goto <D.19291>;
  <D.19290>:
  D.19289 = assembly->dll_map;
  res = mono_dllmap_lookup_list (D.19289, dll, func, rdll, rfunc);
  if (res != 0) goto <D.19292>; else goto <D.19293>;
  <D.19292>:
  D.19294 = res;
  return D.19294;
  <D.19293>:
  <D.19291>:
  <D.19288>:
  global_dll_map.44 = global_dll_map;
  D.19294 = mono_dllmap_lookup_list (global_dll_map.44, dll, func, rdll, rfunc);
  return D.19294;
}


mono_dllmap_lookup_list (struct MonoDllMap * dll_map, const char * dll, const char * func, const char * * rdll, const char * * rfunc)
{
  int D.19299;
  char * D.19302;
  char D.19303;
  char * D.19305;
  char D.19306;
  const gchar * D.19308;
  int D.19309;
  int D.18309;
  char * D.19316;
  char * D.19319;
  int D.18318;
  char * D.19324;
  int found;

  found = 0;
  *rdll = dll;
  if (dll_map == 0B) goto <D.19297>; else goto <D.19298>;
  <D.19297>:
  D.19299 = 0;
  return D.19299;
  <D.19298>:
  mono_loader_lock ();
  goto <D.18321>;
  <D.18320>:
  D.19302 = dll_map->dll;
  D.19303 = *D.19302;
  if (D.19303 == 105) goto <D.19304>; else goto <D.19300>;
  <D.19304>:
  D.19302 = dll_map->dll;
  D.19305 = D.19302 + 1;
  D.19306 = *D.19305;
  if (D.19306 == 58) goto <D.19307>; else goto <D.19300>;
  <D.19307>:
  D.19302 = dll_map->dll;
  D.19308 = D.19302 + 2;
  D.19309 = monoeg_ascii_strcasecmp (D.19308, dll);
  if (D.19309 != 0) goto <D.19310>; else goto <D.19311>;
  <D.19310>:
  // predicted unlikely by continue predictor.
  goto <D.18300>;
  <D.19311>:
  goto <D.19301>;
  <D.19300>:
  {
    size_t __s1_len;
    size_t __s2_len;

    D.19302 = dll_map->dll;
    D.18309 = __builtin_strcmp (D.19302, dll);
  }
  if (D.18309 != 0) goto <D.19312>; else goto <D.19313>;
  <D.19312>:
  // predicted unlikely by continue predictor.
  goto <D.18300>;
  <D.19313>:
  <D.19301>:
  if (found == 0) goto <D.19314>; else goto <D.19315>;
  <D.19314>:
  D.19316 = dll_map->target;
  if (D.19316 != 0B) goto <D.19317>; else goto <D.19318>;
  <D.19317>:
  D.19316 = dll_map->target;
  *rdll = D.19316;
  found = 1;
  <D.19318>:
  <D.19315>:
  D.19319 = dll_map->func;
  if (D.19319 != 0B) goto <D.19320>; else goto <D.19321>;
  <D.19320>:
  {
    size_t __s1_len;
    size_t __s2_len;

    D.19319 = dll_map->func;
    D.18318 = __builtin_strcmp (D.19319, func);
  }
  if (D.18318 == 0) goto <D.19322>; else goto <D.19323>;
  <D.19322>:
  D.19324 = dll_map->target_func;
  *rfunc = D.19324;
  goto <D.18319>;
  <D.19323>:
  <D.19321>:
  <D.18300>:
  dll_map = dll_map->next;
  <D.18321>:
  if (dll_map != 0B) goto <D.18320>; else goto <D.18319>;
  <D.18319>:
  mono_loader_unlock ();
  D.19299 = found;
  return D.19299;
}


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

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


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

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


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

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


mono_get_method_full (struct MonoImage * image, guint32 token, struct MonoClass * klass, struct MonoGenericContext * context)
{
  unsigned int D.19343;
  struct GHashTable * D.19346;
  struct GHashTable * D.19349;
  long int D.19350;
  long int D.19351;
  const void * D.19352;
  unsigned char D.19354;
  unsigned char D.19355;
  struct GHashTable * D.19358;
  struct GHashTable * D.19361;
  const void * D.19362;
  struct MonoMethod * D.19365;
  int used_context.47;
  unsigned char D.19371;
  unsigned char D.19372;
  void * D.19384;
  void * D.19388;
  struct MonoMethod * result;
  gboolean used_context;

  try
    {
      result = 0B;
      used_context = 0;
      mono_image_lock (image);
      D.19343 = token >> 24;
      if (D.19343 == 6) goto <D.19344>; else goto <D.19345>;
      <D.19344>:
      D.19346 = image->method_cache;
      if (D.19346 == 0B) goto <D.19347>; else goto <D.19348>;
      <D.19347>:
      D.19349 = monoeg_g_hash_table_new (0B, 0B);
      image->method_cache = D.19349;
      <D.19348>:
      D.19350 = (long int) token;
      D.19351 = D.19350 & 16777215;
      D.19352 = (const void *) D.19351;
      D.19346 = image->method_cache;
      result = monoeg_g_hash_table_lookup (D.19346, D.19352);
      goto <D.19353>;
      <D.19345>:
      D.19354 = BIT_FIELD_REF <*image, 8, 224>;
      D.19355 = D.19354 & 8;
      if (D.19355 == 0) goto <D.19356>; else goto <D.19357>;
      <D.19356>:
      D.19358 = image->methodref_cache;
      if (D.19358 == 0B) goto <D.19359>; else goto <D.19360>;
      <D.19359>:
      D.19361 = monoeg_g_hash_table_new (0B, 0B);
      image->methodref_cache = D.19361;
      <D.19360>:
      D.19350 = (long int) token;
      D.19362 = (const void *) D.19350;
      D.19358 = image->methodref_cache;
      result = monoeg_g_hash_table_lookup (D.19358, D.19362);
      <D.19357>:
      <D.19353>:
      mono_image_unlock (image);
      if (result != 0B) goto <D.19363>; else goto <D.19364>;
      <D.19363>:
      D.19365 = result;
      return D.19365;
      <D.19364>:
      result = mono_get_method_from_token (image, token, klass, context, &used_context);
      if (result == 0B) goto <D.19366>; else goto <D.19367>;
      <D.19366>:
      D.19365 = 0B;
      return D.19365;
      <D.19367>:
      mono_image_lock (image);
      used_context.47 = used_context;
      if (used_context.47 == 0) goto <D.19369>; else goto <D.19370>;
      <D.19369>:
      D.19371 = BIT_FIELD_REF <*result, 8, 264>;
      D.19372 = D.19371 & 16;
      if (D.19372 == 0) goto <D.19373>; else goto <D.19374>;
      <D.19373>:
      {
        struct MonoMethod * result2;

        result2 = 0B;
        D.19343 = token >> 24;
        if (D.19343 == 6) goto <D.19375>; else goto <D.19376>;
        <D.19375>:
        D.19350 = (long int) token;
        D.19351 = D.19350 & 16777215;
        D.19352 = (const void *) D.19351;
        D.19346 = image->method_cache;
        result2 = monoeg_g_hash_table_lookup (D.19346, D.19352);
        goto <D.19377>;
        <D.19376>:
        D.19354 = BIT_FIELD_REF <*image, 8, 224>;
        D.19355 = D.19354 & 8;
        if (D.19355 == 0) goto <D.19378>; else goto <D.19379>;
        <D.19378>:
        D.19350 = (long int) token;
        D.19362 = (const void *) D.19350;
        D.19358 = image->methodref_cache;
        result2 = monoeg_g_hash_table_lookup (D.19358, D.19362);
        <D.19379>:
        <D.19377>:
        if (result2 != 0B) goto <D.19380>; else goto <D.19381>;
        <D.19380>:
        mono_image_unlock (image);
        D.19365 = result2;
        return D.19365;
        <D.19381>:
        D.19343 = token >> 24;
        if (D.19343 == 6) goto <D.19382>; else goto <D.19383>;
        <D.19382>:
        D.19350 = (long int) token;
        D.19351 = D.19350 & 16777215;
        D.19384 = (void *) D.19351;
        D.19346 = image->method_cache;
        monoeg_g_hash_table_insert_replace (D.19346, D.19384, result, 0);
        goto <D.19385>;
        <D.19383>:
        D.19354 = BIT_FIELD_REF <*image, 8, 224>;
        D.19355 = D.19354 & 8;
        if (D.19355 == 0) goto <D.19386>; else goto <D.19387>;
        <D.19386>:
        D.19350 = (long int) token;
        D.19388 = (void *) D.19350;
        D.19358 = image->methodref_cache;
        monoeg_g_hash_table_insert_replace (D.19358, D.19388, result, 0);
        <D.19387>:
        <D.19385>:
      }
      <D.19374>:
      <D.19370>:
      mono_image_unlock (image);
      D.19365 = result;
      return D.19365;
    }
  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.19391;
  int token.48;
  unsigned char D.19393;
  unsigned char D.19394;
  struct MonoClass * D.19399;
  struct MonoClass * handle_class.49;
  char * D.19403;
  gchar * D.19404;
  struct MonoMethod * D.19405;
  unsigned int idx.50;
  gchar * D.19415;
  <unnamed-unsigned:24> D.19418;
  int D.19419;
  gchar * D.19422;
  int D.19423;
  struct MonoTableInfo * D.19424;
  unsigned int D.19428;
  unsigned int D.19429;
  unsigned int D.19431;
  unsigned int D.19432;
  unsigned int methods_size.51;
  unsigned int methods_size.52;
  long unsigned int D.19435;
  long unsigned int D.19436;
  unsigned int D.19441;
  short unsigned int D.19444;
  short unsigned int D.19445;
  unsigned int D.19446;
  const char * D.19447;
  const char * sig.53;
  unsigned int D.19451;
  const char * sig.54;
  unsigned int D.19453;
  char D.19454;
  int D.19455;
  int D.19456;
  int D.19461;
  struct MonoClass * D.19466;
  struct MonoClass * D.19467;
  int D.18461;
  int iftmp.55;
  int D.18460;
  const char[6] * D.19473;
  unsigned char D.19474;
  int D.19475;
  unsigned char D.19476;
  int D.19477;
  _Bool D.19478;
  _Bool D.19479;
  _Bool D.19480;
  const unsigned char * D.19483;
  unsigned char D.19484;
  int D.19485;
  const unsigned char * D.19486;
  unsigned char D.19487;
  int D.19488;
  _Bool D.19489;
  _Bool D.19490;
  const unsigned char * D.19493;
  unsigned char D.19494;
  int D.19495;
  const unsigned char * D.19496;
  unsigned char D.19497;
  int D.19498;
  _Bool D.19499;
  _Bool D.19500;
  const unsigned char * D.19503;
  unsigned char D.19504;
  int D.19505;
  const unsigned char * D.19506;
  unsigned char D.19507;
  int D.19508;
  const char * D.19510;
  unsigned int D.19516;
  unsigned int D.19517;
  short unsigned int D.19518;
  short unsigned int D.19519;
  int D.19522;
  int D.19523;
  const struct MonoTableInfo * D.19524;
  unsigned int D.19525;
  short unsigned int D.19526;
  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.19391 = token >> 24;
      table = (int) D.19391;
      token.48 = (int) token;
      idx = token.48 & 16777215;
      tables = &image->tables;
      generic_container = 0B;
      container = 0B;
      sig = 0B;
      D.19393 = BIT_FIELD_REF <*image, 8, 224>;
      D.19394 = D.19393 & 8;
      if (D.19394 != 0) goto <D.19395>; else goto <D.19396>;
      <D.19395>:
      {
        struct MonoClass * handle_class;

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

        type = mono_metadata_typedef_from_method (image, token);
        if (type == 0) goto <D.19439>; else goto <D.19440>;
        <D.19439>:
        D.19405 = 0B;
        return D.19405;
        <D.19440>:
        D.19441 = type | 33554432;
        klass = mono_class_get (image, D.19441);
        if (klass == 0B) goto <D.19442>; else goto <D.19443>;
        <D.19442>:
        D.19405 = 0B;
        return D.19405;
        <D.19443>:
      }
      <D.19438>:
      result->slot = -1;
      result->klass = klass;
      D.19428 = cols[2];
      D.19444 = (short unsigned int) D.19428;
      result->flags = D.19444;
      D.19431 = cols[1];
      D.19445 = (short unsigned int) D.19431;
      result->iflags = D.19445;
      result->token = token;
      D.19446 = cols[3];
      D.19447 = mono_metadata_string_heap (image, D.19446);
      result->name = D.19447;
      sig.53 = sig;
      if (sig.53 == 0B) goto <D.19449>; else goto <D.19450>;
      <D.19449>:
      D.19451 = cols[4];
      sig.54 = mono_metadata_blob_heap (image, D.19451);
      sig = sig.54;
      <D.19450>:
      sig.53 = sig;
      D.19453 = mono_metadata_decode_blob_size (sig.53, &sig);
      size = (int) D.19453;
      container = klass->generic_container;
      sig.53 = sig;
      D.19454 = *sig.53;
      D.19455 = (int) D.19454;
      D.19456 = D.19455 & 16;
      if (D.19456 != 0) goto <D.19457>; else goto <D.19458>;
      <D.19457>:
      generic_container = mono_metadata_load_generic_params (image, token, container);
      <D.19458>:
      if (generic_container != 0B) goto <D.19459>; else goto <D.19460>;
      <D.19459>:
      result->is_generic = 1;
      generic_container->owner.method = result;
      D.19461 = mono_metadata_load_generic_param_constraints_full (image, token, generic_container);
      if (D.19461 == 0) goto <D.19462>; else goto <D.19463>;
      <D.19462>:
      D.19405 = 0B;
      return D.19405;
      <D.19463>:
      container = generic_container;
      <D.19460>:
      D.19431 = cols[1];
      D.19432 = D.19431 & 4096;
      if (D.19432 != 0) goto <D.19464>; else goto <D.19465>;
      <D.19464>:
      D.19466 = result->klass;
      D.19467 = mono_defaults.string_class;
      if (D.19466 == D.19467) goto <D.19468>; else goto <D.19469>;
      <D.19468>:
      {
        size_t __s1_len;
        size_t __s2_len;

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

          __s2 = result->name;
          D.19473 = ".ctor";
          D.19474 = MEM[(const unsigned char *)D.19473];
          D.19475 = (int) D.19474;
          D.19476 = *__s2;
          D.19477 = (int) D.19476;
          __result = D.19475 - D.19477;
          {
            D.19478 = __s2_len != 0;
            D.19479 = __result == 0;
            D.19480 = D.19478 & D.19479;
            if (D.19480 != 0) goto <D.19481>; else goto <D.19482>;
            <D.19481>:
            D.19483 = &MEM[(void *)".ctor" + 1B];
            D.19484 = *D.19483;
            D.19485 = (int) D.19484;
            D.19486 = __s2 + 1;
            D.19487 = *D.19486;
            D.19488 = (int) D.19487;
            __result = D.19485 - D.19488;
            D.19489 = __s2_len > 1;
            D.19479 = __result == 0;
            D.19490 = D.19489 & D.19479;
            if (D.19490 != 0) goto <D.19491>; else goto <D.19492>;
            <D.19491>:
            D.19493 = &MEM[(void *)".ctor" + 2B];
            D.19494 = *D.19493;
            D.19495 = (int) D.19494;
            D.19496 = __s2 + 2;
            D.19497 = *D.19496;
            D.19498 = (int) D.19497;
            __result = D.19495 - D.19498;
            D.19499 = __s2_len > 2;
            D.19479 = __result == 0;
            D.19500 = D.19499 & D.19479;
            if (D.19500 != 0) goto <D.19501>; else goto <D.19502>;
            <D.19501>:
            D.19503 = &MEM[(void *)".ctor" + 3B];
            D.19504 = *D.19503;
            D.19505 = (int) D.19504;
            D.19506 = __s2 + 3;
            D.19507 = *D.19506;
            D.19508 = (int) D.19507;
            __result = D.19505 - D.19508;
            <D.19502>:
            <D.19492>:
            <D.19482>:
          }
          D.18460 = __result;
        }
        iftmp.55 = -D.18460;
        goto <D.19509>;
        <D.19472>:
        D.19510 = result->name;
        iftmp.55 = __builtin_strcmp (D.19510, ".ctor");
        <D.19509>:
        D.18461 = iftmp.55;
      }
      if (D.18461 == 0) goto <D.19511>; else goto <D.19512>;
      <D.19511>:
      result->string_ctor = 1;
      <D.19512>:
      <D.19469>:
      goto <D.19513>;
      <D.19465>:
      D.19428 = cols[2];
      D.19429 = D.19428 & 8192;
      if (D.19429 != 0) goto <D.19514>; else goto <D.19515>;
      <D.19514>:
      {
        struct MonoMethodPInvoke * piinfo;

        piinfo = result;
        D.19423 = idx + -1;
        D.19516 = (unsigned int) D.19423;
        D.19517 = mono_metadata_implmap_from_method (image, D.19516);
        D.19518 = (short unsigned int) D.19517;
        piinfo->implmap_idx = D.19518;
        D.19519 = piinfo->implmap_idx;
        if (D.19519 != 0) goto <D.19520>; else goto <D.19521>;
        <D.19520>:
        D.19519 = piinfo->implmap_idx;
        D.19522 = (int) D.19519;
        D.19523 = D.19522 + -1;
        D.19524 = tables + 448;
        D.19525 = mono_metadata_decode_row_col (D.19524, D.19523, 0);
        D.19526 = (short unsigned int) D.19525;
        piinfo->piflags = D.19526;
        <D.19521>:
      }
      <D.19515>:
      <D.19513>:
      if (generic_container != 0B) goto <D.19527>; else goto <D.19528>;
      <D.19527>:
      mono_method_set_generic_container (result, generic_container);
      <D.19528>:
      D.19405 = result;
      return D.19405;
    }
  finally
    {
      sig = {CLOBBER};
      cols = {CLOBBER};
    }
}


method_from_methodspec (struct MonoImage * image, struct MonoGenericContext * context, guint32 idx)
{
  unsigned int D.19532;
  int D.19533;
  const struct MonoTableInfo * D.19534;
  unsigned int D.19535;
  int D.19536;
  struct MonoMethod * D.19539;
  const char * ptr.56;
  const char * ptr.57;
  const char * ptr.58;
  _Bool D.19543;
  long int D.19544;
  long int D.19545;
  int param_count.59;
  unsigned char D.19553;
  unsigned char D.19554;
  int D.19557;
  unsigned int D.19560;
  unsigned int D.19563;
  struct MonoGenericClass * D.19567;
  unsigned char D.19570;
  unsigned char D.19571;
  _Bool D.19572;
  long int D.19573;
  long int D.19574;
  struct MonoGenericInst * iftmp.60;
  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.19532 = idx + 4294967295;
      D.19533 = (int) D.19532;
      D.19534 = tables + 688;
      mono_metadata_decode_row (D.19534, D.19533, &cols, 2);
      token = cols[0];
      nindex = token >> 1;
      D.19535 = cols[1];
      D.19536 = mono_verifier_verify_methodspec_signature (image, D.19535, 0B);
      if (D.19536 == 0) goto <D.19537>; else goto <D.19538>;
      <D.19537>:
      D.19539 = 0B;
      return D.19539;
      <D.19538>:
      D.19535 = cols[1];
      ptr.56 = mono_metadata_blob_heap (image, D.19535);
      ptr = ptr.56;
      ptr.57 = ptr;
      mono_metadata_decode_value (ptr.57, &ptr);
      ptr.57 = ptr;
      ptr.58 = ptr.57 + 1;
      ptr = ptr.58;
      ptr.57 = ptr;
      param_count = mono_metadata_decode_value (ptr.57, &ptr);
      D.19543 = param_count == 0;
      D.19544 = (long int) D.19543;
      D.19545 = __builtin_expect (D.19544, 0);
      if (D.19545 != 0) goto <D.19546>; else goto <D.19547>;
      <D.19546>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1110, "param_count");
      <D.19547>:
      ptr.57 = ptr;
      param_count.59 = (int) param_count;
      inst = mono_metadata_parse_generic_inst (image, 0B, param_count.59, ptr.57, &ptr);
      if (inst == 0B) goto <D.19549>; else goto <D.19550>;
      <D.19549>:
      D.19539 = 0B;
      return D.19539;
      <D.19550>:
      if (context != 0B) goto <D.19551>; else goto <D.19552>;
      <D.19551>:
      D.19553 = BIT_FIELD_REF <*inst, 8, 48>;
      D.19554 = D.19553 & 64;
      if (D.19554 != 0) goto <D.19555>; else goto <D.19556>;
      <D.19555>:
      inst = mono_metadata_inflate_generic_inst (inst, context, &error);
      D.19557 = mono_error_ok (&error);
      if (D.19557 == 0) goto <D.19558>; else goto <D.19559>;
      <D.19558>:
      mono_error_cleanup (&error);
      D.19539 = 0B;
      return D.19539;
      <D.19559>:
      <D.19556>:
      <D.19552>:
      D.19560 = token & 1;
      if (D.19560 == 0) goto <D.19561>; else goto <D.19562>;
      <D.19561>:
      D.19563 = nindex | 100663296;
      method = mono_get_method_full (image, D.19563, 0B, context);
      goto <D.19564>;
      <D.19562>:
      method = method_from_memberref (image, nindex, context, 0B);
      <D.19564>:
      if (method == 0B) goto <D.19565>; else goto <D.19566>;
      <D.19565>:
      D.19539 = 0B;
      return D.19539;
      <D.19566>:
      klass = method->klass;
      D.19567 = klass->generic_class;
      if (D.19567 != 0B) goto <D.19568>; else goto <D.19569>;
      <D.19568>:
      D.19570 = BIT_FIELD_REF <*method, 8, 264>;
      D.19571 = D.19570 & 16;
      D.19572 = D.19571 == 0;
      D.19573 = (long int) D.19572;
      D.19574 = __builtin_expect (D.19573, 0);
      if (D.19574 != 0) goto <D.19575>; else goto <D.19576>;
      <D.19575>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1135, "method->is_inflated");
      <D.19576>:
      method = MEM[(struct MonoMethodInflated *)method].declaring;
      <D.19569>:
      D.19567 = klass->generic_class;
      if (D.19567 != 0B) goto <D.19578>; else goto <D.19579>;
      <D.19578>:
      D.19567 = klass->generic_class;
      iftmp.60 = D.19567->context.class_inst;
      goto <D.19580>;
      <D.19579>:
      iftmp.60 = 0B;
      <D.19580>:
      new_context.class_inst = iftmp.60;
      new_context.method_inst = inst;
      D.19539 = mono_class_inflate_generic_method_full (method, klass, &new_context);
      return D.19539;
    }
  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)
{
  unsigned int D.19583;
  int D.19584;
  const struct MonoTableInfo * D.19585;
  unsigned int D.19586;
  unsigned int D.19587;
  _Bool D.19590;
  int D.19591;
  unsigned int D.19592;
  char * D.19595;
  const char * D.19596;
  struct MonoMethod * D.19597;
  unsigned int D.19598;
  unsigned int D.19601;
  unsigned int D.19604;
  _Bool D.19605;
  long int D.19606;
  long int D.19607;
  int D.19610;
  const char * D.19613;
  const char * ptr.61;
  const char * ptr.62;
  unsigned char D.19620;
  _Bool D.19621;
  _Bool D.19622;
  _Bool D.19623;
  struct MonoClass * iftmp.63;
  struct MonoGenericClass * D.19627;
  struct MonoType * D.19633;
  short unsigned int D.19634;
  int D.19637;
  struct MonoImage * D.19638;
  char * D.19639;
  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.19583 = idx + 4294967295;
      D.19584 = (int) D.19583;
      D.19585 = tables + 160;
      mono_metadata_decode_row (D.19585, D.19584, &cols, 3);
      D.19586 = cols[0];
      nindex = D.19586 >> 3;
      D.19586 = cols[0];
      class = D.19586 & 7;
      D.19587 = cols[1];
      mname = mono_metadata_string_heap (image, D.19587);
      if (used_context != 0B) goto <D.19588>; else goto <D.19589>;
      <D.19588>:
      D.19590 = class == 4;
      D.19591 = (int) D.19590;
      *used_context = D.19591;
      <D.19589>:
      switch (class) <default: <D.18257>, case 0: <D.18254>, case 1: <D.18249>, case 3: <D.18256>, case 4: <D.18252>>
      <D.18249>:
      D.19592 = nindex | 16777216;
      klass = mono_class_from_typeref (image, D.19592);
      if (klass == 0B) goto <D.19593>; else goto <D.19594>;
      <D.19593>:
      {
        char * name;

        D.19592 = nindex | 16777216;
        name = mono_class_name_from_token (image, D.19592);
        D.19595 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s in assembly %s, type %s", mname, D.19595, name);
        D.19596 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.19596);
        monoeg_g_free (name);
        D.19597 = 0B;
        return D.19597;
      }
      <D.19594>:
      goto <D.18251>;
      <D.18252>:
      D.19598 = nindex | 452984832;
      klass = mono_class_get_full (image, D.19598, typespec_context);
      if (klass == 0B) goto <D.19599>; else goto <D.19600>;
      <D.19599>:
      {
        char * name;

        D.19598 = nindex | 452984832;
        name = mono_class_name_from_token (image, D.19598);
        D.19595 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s in assembly %s, type %s", mname, D.19595, name);
        D.19596 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.19596);
        monoeg_g_free (name);
        D.19597 = 0B;
        return D.19597;
      }
      <D.19600>:
      goto <D.18251>;
      <D.18254>:
      D.19601 = nindex | 33554432;
      klass = mono_class_get (image, D.19601);
      if (klass == 0B) goto <D.19602>; else goto <D.19603>;
      <D.19602>:
      {
        char * name;

        D.19601 = nindex | 33554432;
        name = mono_class_name_from_token (image, D.19601);
        D.19595 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s in assembly %s, type %s", mname, D.19595, name);
        D.19596 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.19596);
        monoeg_g_free (name);
        D.19597 = 0B;
        return D.19597;
      }
      <D.19603>:
      goto <D.18251>;
      <D.18256>:
      D.19604 = nindex | 100663296;
      D.19597 = mono_get_method (image, D.19604, 0B);
      return D.19597;
      <D.18257>:
      {
        char * message;

        message = monoeg_g_strdup_printf ("Memberref parent unknown: class: %d, index %d", class, nindex);
        mono_loader_set_error_method_load ("", message);
        D.19597 = 0B;
        return D.19597;
      }
      <D.18251>:
      D.19605 = klass == 0B;
      D.19606 = (long int) D.19605;
      D.19607 = __builtin_expect (D.19606, 0);
      if (D.19607 != 0) goto <D.19608>; else goto <D.19609>;
      <D.19608>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1016, "klass");
      <D.19609>:
      mono_class_init (klass);
      sig_idx = cols[2];
      D.19610 = mono_verifier_verify_memberref_method_signature (image, sig_idx, 0B);
      if (D.19610 == 0) goto <D.19611>; else goto <D.19612>;
      <D.19611>:
      D.19613 = klass->name;
      mono_loader_set_error_method_load (D.19613, mname);
      D.19597 = 0B;
      return D.19597;
      <D.19612>:
      ptr.61 = mono_metadata_blob_heap (image, sig_idx);
      ptr = ptr.61;
      ptr.62 = ptr;
      mono_metadata_decode_blob_size (ptr.62, &ptr);
      sig = find_cached_memberref_sig (image, sig_idx);
      if (sig == 0B) goto <D.19616>; else goto <D.19617>;
      <D.19616>:
      ptr.62 = ptr;
      sig = mono_metadata_parse_method_signature (image, 0, ptr.62, 0B);
      if (sig == 0B) goto <D.19618>; else goto <D.19619>;
      <D.19618>:
      D.19597 = 0B;
      return D.19597;
      <D.19619>:
      sig = cache_memberref_sig (image, sig_idx, sig);
      <D.19617>:
      switch (class) <default: <D.18265>, case 0: <D.18260>, case 1: <D.18259>, case 4: <D.18262>>
      <D.18259>:
      <D.18260>:
      method = find_method (klass, 0B, mname, sig, klass);
      goto <D.18261>;
      <D.18262>:
      {
        struct MonoType * type;

        type = &klass->byval_arg;
        D.19620 = type->type;
        D.19621 = D.19620 != 20;
        D.19622 = D.19620 != 29;
        D.19623 = D.19621 & D.19622;
        if (D.19623 != 0) goto <D.19624>; else goto <D.19625>;
        <D.19624>:
        {
          struct MonoClass * in_class;

          D.19627 = klass->generic_class;
          if (D.19627 != 0B) goto <D.19628>; else goto <D.19629>;
          <D.19628>:
          D.19627 = klass->generic_class;
          iftmp.63 = D.19627->container_class;
          goto <D.19630>;
          <D.19629>:
          iftmp.63 = klass;
          <D.19630>:
          in_class = iftmp.63;
          method = find_method (in_class, 0B, mname, sig, klass);
          goto <D.18261>;
        }
        <D.19625>:
        method = mono_method_search_in_array_class (klass, mname, sig);
        goto <D.18261>;
      }
      <D.18265>:
      monoeg_g_log (0B, 4, "Memberref parent unknown: class: %d, index %d", class, nindex);
      <D.18266>:
      goto <D.18266>;
      monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "loader.c", 1061);
      <D.18261>:
      if (method == 0B) goto <D.19631>; else goto <D.19632>;
      <D.19631>:
      {
        char * msig;
        char * class_name;
        struct GString * s;

        msig = mono_signature_get_desc (sig, 0);
        D.19633 = &klass->byval_arg;
        class_name = mono_type_get_name (D.19633);
        s = monoeg_g_string_new (mname);
        D.19634 = sig->generic_param_count;
        if (D.19634 != 0) goto <D.19635>; else goto <D.19636>;
        <D.19635>:
        D.19634 = sig->generic_param_count;
        D.19637 = (int) D.19634;
        monoeg_g_string_append_printf (s, "<[%d]>", D.19637);
        <D.19636>:
        monoeg_g_string_append_printf (s, "(%s)", msig);
        monoeg_g_free (msig);
        msig = monoeg_g_string_free (s, 0);
        D.19595 = image->name;
        D.19638 = klass->image;
        D.19639 = D.19638->name;
        monoeg_g_log (0B, 16, "Missing method %s::%s in assembly %s, referenced in assembly %s", class_name, msig, D.19639, D.19595);
        mono_loader_set_error_method_load (class_name, mname);
        monoeg_g_free (msig);
        monoeg_g_free (class_name);
      }
      <D.19632>:
      D.19597 = method;
      return D.19597;
    }
  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.64;
  unsigned int D.19646;
  unsigned int D.19647;
  unsigned char D.19649;
  struct MonoType * D.19653;
  const char * D.19656;
  char D.19658;
  _Bool D.19661;
  long int D.19662;
  long int D.19663;
  char D.19667;
  int D.18133;
  int iftmp.65;
  int D.18132;
  const char[6] * D.19673;
  unsigned char D.19674;
  int D.19675;
  unsigned char D.19676;
  int D.19677;
  _Bool D.19678;
  _Bool D.19679;
  _Bool D.19680;
  const unsigned char * D.19683;
  unsigned char D.19684;
  int D.19685;
  const unsigned char * D.19686;
  unsigned char D.19687;
  int D.19688;
  _Bool D.19689;
  _Bool D.19690;
  const unsigned char * D.19693;
  unsigned char D.19694;
  int D.19695;
  const unsigned char * D.19696;
  unsigned char D.19697;
  int D.19698;
  _Bool D.19699;
  _Bool D.19700;
  const unsigned char * D.19703;
  unsigned char D.19704;
  int D.19705;
  const unsigned char * D.19706;
  unsigned char D.19707;
  int D.19708;
  int D.18142;
  int iftmp.66;
  int D.18141;
  const char[7] * D.19714;
  unsigned char D.19715;
  int D.19716;
  unsigned char D.19717;
  int D.19718;
  _Bool D.19719;
  _Bool D.19720;
  _Bool D.19721;
  const unsigned char * D.19724;
  unsigned char D.19725;
  int D.19726;
  const unsigned char * D.19727;
  unsigned char D.19728;
  int D.19729;
  _Bool D.19730;
  _Bool D.19731;
  const unsigned char * D.19734;
  unsigned char D.19735;
  int D.19736;
  const unsigned char * D.19737;
  unsigned char D.19738;
  int D.19739;
  _Bool D.19740;
  _Bool D.19741;
  const unsigned char * D.19744;
  unsigned char D.19745;
  int D.19746;
  const unsigned char * D.19747;
  unsigned char D.19748;
  int D.19749;
  short unsigned int D.19752;
  short unsigned int D.19753;
  struct MonoClass * * D.19756;
  long unsigned int D.19757;
  long unsigned int D.19758;
  struct MonoClass * * D.19759;
  struct MonoClass * * D.19760;
  struct MonoClass * * D.19761;
  struct MonoType * D.19762;
  const char * D.19765;
  char D.19767;
  const char * iftmp.67;
  int D.19774;
  _Bool D.19775;
  _Bool D.19776;
  long int D.19777;
  long int D.19778;
  struct MonoClass * D.19783;
  struct MonoMethod * D.19784;
  int i;
  char * qname;
  char * fqname;
  char * class_name;
  gboolean is_interface;
  struct MonoMethod * result;
  void out = <<< error >>>;

  result = 0B;
  D.19646 = in_class->flags;
  D.19647 = D.19646 & 32;
  if (D.19647 != 0) goto <D.19643>; else goto <D.19648>;
  <D.19648>:
  D.19649 = in_class->byval_arg.type;
  if (D.19649 == 19) goto <D.19643>; else goto <D.19650>;
  <D.19650>:
  D.19649 = in_class->byval_arg.type;
  if (D.19649 == 30) goto <D.19643>; else goto <D.19644>;
  <D.19643>:
  iftmp.64 = 1;
  goto <D.19645>;
  <D.19644>:
  iftmp.64 = 0;
  <D.19645>:
  is_interface = iftmp.64;
  if (ic != 0B) goto <D.19651>; else goto <D.19652>;
  <D.19651>:
  D.19653 = &ic->byval_arg;
  class_name = mono_type_get_name_full (D.19653, 0);
  qname = monoeg_g_strconcat (class_name, ".", name, 0B);
  D.19656 = ic->name_space;
  if (D.19656 != 0B) goto <D.19657>; else goto <D.19654>;
  <D.19657>:
  D.19656 = ic->name_space;
  D.19658 = *D.19656;
  if (D.19658 != 0) goto <D.19659>; else goto <D.19654>;
  <D.19659>:
  D.19656 = ic->name_space;
  fqname = monoeg_g_strconcat (D.19656, ".", class_name, ".", name, 0B);
  goto <D.19655>;
  <D.19654>:
  fqname = 0B;
  <D.19655>:
  goto <D.19660>;
  <D.19652>:
  fqname = 0B;
  qname = fqname;
  class_name = qname;
  <D.19660>:
  goto <D.18144>;
  <D.18153>:
  D.19661 = from_class == 0B;
  D.19662 = (long int) D.19661;
  D.19663 = __builtin_expect (D.19662, 0);
  if (D.19663 != 0) goto <D.19664>; else goto <D.19665>;
  <D.19664>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 684, "from_class");
  <D.19665>:
  result = find_method_in_class (in_class, name, qname, fqname, sig, from_class);
  if (result != 0B) goto out; else goto <D.19666>;
  <D.19666>:
  D.19667 = *name;
  if (D.19667 == 46) goto <D.19668>; else goto <D.19669>;
  <D.19668>:
  {
    size_t __s1_len;
    size_t __s2_len;

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

      __s2 = name;
      D.19673 = ".ctor";
      D.19674 = MEM[(const unsigned char *)D.19673];
      D.19675 = (int) D.19674;
      D.19676 = *__s2;
      D.19677 = (int) D.19676;
      __result = D.19675 - D.19677;
      {
        D.19678 = __s2_len != 0;
        D.19679 = __result == 0;
        D.19680 = D.19678 & D.19679;
        if (D.19680 != 0) goto <D.19681>; else goto <D.19682>;
        <D.19681>:
        D.19683 = &MEM[(void *)".ctor" + 1B];
        D.19684 = *D.19683;
        D.19685 = (int) D.19684;
        D.19686 = __s2 + 1;
        D.19687 = *D.19686;
        D.19688 = (int) D.19687;
        __result = D.19685 - D.19688;
        D.19689 = __s2_len > 1;
        D.19679 = __result == 0;
        D.19690 = D.19689 & D.19679;
        if (D.19690 != 0) goto <D.19691>; else goto <D.19692>;
        <D.19691>:
        D.19693 = &MEM[(void *)".ctor" + 2B];
        D.19694 = *D.19693;
        D.19695 = (int) D.19694;
        D.19696 = __s2 + 2;
        D.19697 = *D.19696;
        D.19698 = (int) D.19697;
        __result = D.19695 - D.19698;
        D.19699 = __s2_len > 2;
        D.19679 = __result == 0;
        D.19700 = D.19699 & D.19679;
        if (D.19700 != 0) goto <D.19701>; else goto <D.19702>;
        <D.19701>:
        D.19703 = &MEM[(void *)".ctor" + 3B];
        D.19704 = *D.19703;
        D.19705 = (int) D.19704;
        D.19706 = __s2 + 3;
        D.19707 = *D.19706;
        D.19708 = (int) D.19707;
        __result = D.19705 - D.19708;
        <D.19702>:
        <D.19692>:
        <D.19682>:
      }
      D.18132 = __result;
    }
    iftmp.65 = -D.18132;
    goto <D.19709>;
    <D.19672>:
    iftmp.65 = __builtin_strcmp (name, ".ctor");
    <D.19709>:
    D.18133 = iftmp.65;
  }
  if (D.18133 == 0) goto <D.18143>; else goto <D.19710>;
  <D.19710>:
  {
    size_t __s1_len;
    size_t __s2_len;

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

      __s2 = name;
      D.19714 = ".cctor";
      D.19715 = MEM[(const unsigned char *)D.19714];
      D.19716 = (int) D.19715;
      D.19717 = *__s2;
      D.19718 = (int) D.19717;
      __result = D.19716 - D.19718;
      {
        D.19719 = __s2_len != 0;
        D.19720 = __result == 0;
        D.19721 = D.19719 & D.19720;
        if (D.19721 != 0) goto <D.19722>; else goto <D.19723>;
        <D.19722>:
        D.19724 = &MEM[(void *)".cctor" + 1B];
        D.19725 = *D.19724;
        D.19726 = (int) D.19725;
        D.19727 = __s2 + 1;
        D.19728 = *D.19727;
        D.19729 = (int) D.19728;
        __result = D.19726 - D.19729;
        D.19730 = __s2_len > 1;
        D.19720 = __result == 0;
        D.19731 = D.19730 & D.19720;
        if (D.19731 != 0) goto <D.19732>; else goto <D.19733>;
        <D.19732>:
        D.19734 = &MEM[(void *)".cctor" + 2B];
        D.19735 = *D.19734;
        D.19736 = (int) D.19735;
        D.19737 = __s2 + 2;
        D.19738 = *D.19737;
        D.19739 = (int) D.19738;
        __result = D.19736 - D.19739;
        D.19740 = __s2_len > 2;
        D.19720 = __result == 0;
        D.19741 = D.19740 & D.19720;
        if (D.19741 != 0) goto <D.19742>; else goto <D.19743>;
        <D.19742>:
        D.19744 = &MEM[(void *)".cctor" + 3B];
        D.19745 = *D.19744;
        D.19746 = (int) D.19745;
        D.19747 = __s2 + 3;
        D.19748 = *D.19747;
        D.19749 = (int) D.19748;
        __result = D.19746 - D.19749;
        <D.19743>:
        <D.19733>:
        <D.19723>:
      }
      D.18141 = __result;
    }
    iftmp.66 = -D.18141;
    goto <D.19750>;
    <D.19713>:
    iftmp.66 = __builtin_strcmp (name, ".cctor");
    <D.19750>:
    D.18142 = iftmp.66;
  }
  if (D.18142 == 0) goto <D.18143>; else goto <D.19751>;
  <D.19751>:
  <D.19669>:
  D.19752 = from_class->interface_offsets_count;
  D.19753 = in_class->interface_offsets_count;
  if (D.19752 != D.19753) goto <D.19754>; else goto <D.19755>;
  <D.19754>:
  in_class = in_class->parent;
  from_class = from_class->parent;
  // predicted unlikely by continue predictor.
  goto <D.18144>;
  <D.19755>:
  i = 0;
  goto <D.18151>;
  <D.18150>:
  {
    struct MonoClass * in_ic;
    struct MonoClass * from_ic;
    char * ic_qname;
    char * ic_fqname;
    char * ic_class_name;

    D.19756 = in_class->interfaces_packed;
    D.19757 = (long unsigned int) i;
    D.19758 = D.19757 * 8;
    D.19759 = D.19756 + D.19758;
    in_ic = *D.19759;
    D.19760 = from_class->interfaces_packed;
    D.19757 = (long unsigned int) i;
    D.19758 = D.19757 * 8;
    D.19761 = D.19760 + D.19758;
    from_ic = *D.19761;
    D.19762 = &in_ic->byval_arg;
    ic_class_name = mono_type_get_name_full (D.19762, 0);
    ic_qname = monoeg_g_strconcat (ic_class_name, ".", name, 0B);
    D.19765 = in_ic->name_space;
    if (D.19765 != 0B) goto <D.19766>; else goto <D.19763>;
    <D.19766>:
    D.19765 = in_ic->name_space;
    D.19767 = *D.19765;
    if (D.19767 != 0) goto <D.19768>; else goto <D.19763>;
    <D.19768>:
    D.19765 = in_ic->name_space;
    ic_fqname = monoeg_g_strconcat (D.19765, ".", ic_class_name, ".", name, 0B);
    goto <D.19764>;
    <D.19763>:
    ic_fqname = 0B;
    <D.19764>:
    if (ic != 0B) goto <D.19770>; else goto <D.19771>;
    <D.19770>:
    iftmp.67 = name;
    goto <D.19772>;
    <D.19771>:
    iftmp.67 = 0B;
    <D.19772>:
    result = find_method_in_class (in_ic, iftmp.67, 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.19773>;
    <D.19773>:
  }
  i = i + 1;
  <D.18151>:
  D.19753 = in_class->interface_offsets_count;
  D.19774 = (int) D.19753;
  if (D.19774 > i) goto <D.18150>; else goto <D.18152>;
  <D.18152>:
  in_class = in_class->parent;
  from_class = from_class->parent;
  <D.18144>:
  if (in_class != 0B) goto <D.18153>; else goto <D.18143>;
  <D.18143>:
  D.19775 = in_class == 0B;
  D.19661 = from_class == 0B;
  D.19776 = D.19775 ^ D.19661;
  D.19777 = (long int) D.19776;
  D.19778 = __builtin_expect (D.19777, 0);
  if (D.19778 != 0) goto <D.19779>; else goto <D.19780>;
  <D.19779>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 725, "!in_class == !from_class");
  <D.19780>:
  if (is_interface != 0) goto <D.19781>; else goto <D.19782>;
  <D.19781>:
  D.19783 = mono_defaults.object_class;
  D.19783 = mono_defaults.object_class;
  result = find_method_in_class (D.19783, name, qname, fqname, sig, D.19783);
  <D.19782>:
  out:
  monoeg_g_free (class_name);
  monoeg_g_free (fqname);
  monoeg_g_free (qname);
  D.19784 = result;
  return D.19784;
}


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.19786;
  struct MonoImage * D.19789;
  unsigned char D.19790;
  unsigned char D.19791;
  struct MonoMethod * * D.19794;
  unsigned char D.19797;
  struct MonoGenericClass * D.19802;
  unsigned int D.19805;
  unsigned int i.68;
  unsigned int D.19807;
  int D.19808;
  unsigned int D.19809;
  int D.18055;
  int D.18064;
  int D.18073;
  unsigned int D.19817;
  unsigned int D.19818;
  unsigned char D.19823;
  unsigned char D.19824;
  int D.19827;
  struct MonoMethod * D.19830;
  unsigned int D.19831;
  long unsigned int D.19834;
  long unsigned int D.19835;
  struct MonoMethod * * D.19836;
  int D.18089;
  const char * D.19844;
  int D.18098;
  int D.18107;
  int D.19851;
  int D.19854;
  int i;

  D.19786 = klass->type_token;
  if (D.19786 != 0) goto <D.19787>; else goto <D.19788>;
  <D.19787>:
  D.19789 = klass->image;
  D.19790 = BIT_FIELD_REF <*D.19789, 8, 224>;
  D.19791 = D.19790 & 8;
  if (D.19791 == 0) goto <D.19792>; else goto <D.19793>;
  <D.19792>:
  D.19794 = klass->methods;
  if (D.19794 == 0B) goto <D.19795>; else goto <D.19796>;
  <D.19795>:
  D.19797 = klass->rank;
  if (D.19797 == 0) goto <D.19798>; else goto <D.19799>;
  <D.19798>:
  if (klass == from_class) goto <D.19800>; else goto <D.19801>;
  <D.19800>:
  D.19802 = from_class->generic_class;
  if (D.19802 == 0B) goto <D.19803>; else goto <D.19804>;
  <D.19803>:
  i = 0;
  goto <D.18076>;
  <D.18075>:
  {
    guint32 cols[6];
    struct MonoMethod * method;
    const char * m_name;
    struct MonoMethodSignature * other_sig;

    try
      {
        D.19805 = klass->method.first;
        i.68 = (unsigned int) i;
        D.19807 = D.19805 + i.68;
        D.19808 = (int) D.19807;
        D.19789 = klass->image;
        mono_metadata_decode_table_row (D.19789, 6, D.19808, &cols, 6);
        D.19809 = cols[3];
        D.19789 = klass->image;
        m_name = mono_metadata_string_heap (D.19789, D.19809);
        if (fqname == 0B) goto <D.19813>; else goto <D.19814>;
        <D.19814>:
        {
          size_t __s1_len;
          size_t __s2_len;

          D.18055 = __builtin_strcmp (m_name, fqname);
        }
        if (D.18055 != 0) goto <D.19813>; else goto <D.19811>;
        <D.19813>:
        if (qname == 0B) goto <D.19812>; else goto <D.19815>;
        <D.19815>:
        {
          size_t __s1_len;
          size_t __s2_len;

          D.18064 = __builtin_strcmp (m_name, qname);
        }
        if (D.18064 != 0) goto <D.19812>; else goto <D.19811>;
        <D.19812>:
        if (name == 0B) goto <D.19810>; else goto <D.19816>;
        <D.19816>:
        {
          size_t __s1_len;
          size_t __s2_len;

          D.18073 = __builtin_strcmp (m_name, name);
        }
        if (D.18073 != 0) goto <D.19810>; else goto <D.19811>;
        <D.19810>:
        // predicted unlikely by continue predictor.
        goto <D.18074>;
        <D.19811>:
        D.19805 = klass->method.first;
        i.68 = (unsigned int) i;
        D.19807 = D.19805 + i.68;
        D.19817 = D.19807 + 1;
        D.19818 = D.19817 | 100663296;
        D.19789 = klass->image;
        method = mono_get_method (D.19789, D.19818, klass);
        if (method != 0B) goto <D.19819>; else goto <D.19820>;
        <D.19819>:
        other_sig = mono_method_signature (method);
        if (other_sig != 0B) goto <D.19821>; else goto <D.19822>;
        <D.19821>:
        D.19823 = BIT_FIELD_REF <*sig, 8, 112>;
        D.19824 = D.19823 & 63;
        if (D.19824 != 5) goto <D.19825>; else goto <D.19826>;
        <D.19825>:
        D.19827 = mono_metadata_signature_equal (sig, other_sig);
        if (D.19827 != 0) goto <D.19828>; else goto <D.19829>;
        <D.19828>:
        D.19830 = method;
        return D.19830;
        <D.19829>:
        <D.19826>:
        <D.19822>:
        <D.19820>:
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.18074>:
  i = i + 1;
  <D.18076>:
  i.68 = (unsigned int) i;
  D.19831 = klass->method.count;
  if (i.68 < D.19831) goto <D.18075>; else goto <D.18077>;
  <D.18077>:
  <D.19804>:
  <D.19801>:
  <D.19799>:
  <D.19796>:
  <D.19793>:
  <D.19788>:
  mono_class_setup_methods (klass);
  D.19794 = klass->methods;
  if (D.19794 == 0B) goto <D.19832>; else goto <D.19833>;
  <D.19832>:
  D.19830 = 0B;
  return D.19830;
  <D.19833>:
  i = 0;
  goto <D.18110>;
  <D.18109>:
  {
    struct MonoMethod * m;
    struct MonoMethodSignature * msig;

    D.19794 = klass->methods;
    D.19834 = (long unsigned int) i;
    D.19835 = D.19834 * 8;
    D.19836 = D.19794 + D.19835;
    m = *D.19836;
    if (m == 0B) goto <D.19837>; else goto <D.19838>;
    <D.19837>:
    // predicted unlikely by continue predictor.
    goto <D.18080>;
    <D.19838>:
    if (fqname == 0B) goto <D.19842>; else goto <D.19843>;
    <D.19843>:
    {
      size_t __s1_len;
      size_t __s2_len;

      D.19844 = m->name;
      D.18089 = __builtin_strcmp (D.19844, fqname);
    }
    if (D.18089 != 0) goto <D.19842>; else goto <D.19840>;
    <D.19842>:
    if (qname == 0B) goto <D.19841>; else goto <D.19845>;
    <D.19845>:
    {
      size_t __s1_len;
      size_t __s2_len;

      D.19844 = m->name;
      D.18098 = __builtin_strcmp (D.19844, qname);
    }
    if (D.18098 != 0) goto <D.19841>; else goto <D.19840>;
    <D.19841>:
    if (name == 0B) goto <D.19839>; else goto <D.19846>;
    <D.19846>:
    {
      size_t __s1_len;
      size_t __s2_len;

      D.19844 = m->name;
      D.18107 = __builtin_strcmp (D.19844, name);
    }
    if (D.18107 != 0) goto <D.19839>; else goto <D.19840>;
    <D.19839>:
    // predicted unlikely by continue predictor.
    goto <D.18080>;
    <D.19840>:
    msig = mono_method_signature (m);
    if (msig == 0B) goto <D.19847>; else goto <D.19848>;
    <D.19847>:
    // predicted unlikely by continue predictor.
    goto <D.18080>;
    <D.19848>:
    D.19823 = BIT_FIELD_REF <*sig, 8, 112>;
    D.19824 = D.19823 & 63;
    if (D.19824 == 5) goto <D.19849>; else goto <D.19850>;
    <D.19849>:
    D.19851 = mono_metadata_signature_vararg_match (sig, msig);
    if (D.19851 != 0) goto <D.18108>; else goto <D.19852>;
    <D.19852>:
    goto <D.19853>;
    <D.19850>:
    D.19854 = mono_metadata_signature_equal (sig, msig);
    if (D.19854 != 0) goto <D.18108>; else goto <D.19855>;
    <D.19855>:
    <D.19853>:
  }
  <D.18080>:
  i = i + 1;
  <D.18110>:
  i.68 = (unsigned int) i;
  D.19831 = klass->method.count;
  if (i.68 < D.19831) goto <D.18109>; else goto <D.18108>;
  <D.18108>:
  i.68 = (unsigned int) i;
  D.19831 = klass->method.count;
  if (i.68 < D.19831) goto <D.19856>; else goto <D.19857>;
  <D.19856>:
  D.19830 = mono_class_get_method_by_index (from_class, i);
  return D.19830;
  <D.19857>:
  D.19830 = 0B;
  return D.19830;
}


mono_metadata_signature_vararg_match (struct MonoMethodSignature * sig1, struct MonoMethodSignature * sig2)
{
  unsigned char D.19864;
  unsigned char D.19865;
  unsigned char D.19866;
  unsigned char D.19867;
  short int D.19869;
  short int D.19870;
  gboolean D.19871;
  int D.19872;
  int D.19875;
  struct MonoType * D.19876;
  struct MonoType * D.19877;
  int D.19878;
  int i;

  D.19864 = BIT_FIELD_REF <*sig1, 8, 112>;
  D.19865 = BIT_FIELD_REF <*sig2, 8, 112>;
  D.19866 = D.19864 ^ D.19865;
  D.19867 = D.19866 & 64;
  if (D.19867 != 0) goto <D.19862>; else goto <D.19868>;
  <D.19868>:
  D.19869 = sig1->sentinelpos;
  D.19870 = sig2->sentinelpos;
  if (D.19869 != D.19870) goto <D.19862>; else goto <D.19863>;
  <D.19862>:
  D.19871 = 0;
  return D.19871;
  <D.19863>:
  i = 0;
  goto <D.18032>;
  <D.18031>:
  {
    struct MonoType * p1;
    struct MonoType * p2;

    p1 = sig1->params[i];
    p2 = sig2->params[i];
    D.19872 = mono_metadata_type_equal (p1, p2);
    if (D.19872 == 0) goto <D.19873>; else goto <D.19874>;
    <D.19873>:
    D.19871 = 0;
    return D.19871;
    <D.19874>:
  }
  i = i + 1;
  <D.18032>:
  D.19869 = sig1->sentinelpos;
  D.19875 = (int) D.19869;
  if (D.19875 > i) goto <D.18031>; else goto <D.18033>;
  <D.18033>:
  D.19876 = sig2->ret;
  D.19877 = sig1->ret;
  D.19878 = mono_metadata_type_equal (D.19877, D.19876);
  if (D.19878 == 0) goto <D.19879>; else goto <D.19880>;
  <D.19879>:
  D.19871 = 0;
  return D.19871;
  <D.19880>:
  D.19871 = 1;
  return D.19871;
}


mono_get_method_constrained_with_method (struct MonoImage * image, struct MonoMethod * method, struct MonoClass * constrained_class, struct MonoGenericContext * context)
{
  _Bool D.19882;
  long int D.19883;
  long int D.19884;
  struct MonoMethod * D.19887;
  struct MonoMethod * result;

  D.19882 = method == 0B;
  D.19883 = (long int) D.19882;
  D.19884 = __builtin_expect (D.19883, 0);
  if (D.19884 != 0) goto <D.19885>; else goto <D.19886>;
  <D.19885>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1932, "method");
  <D.19886>:
  mono_loader_lock ();
  result = get_method_constrained (image, method, constrained_class, context);
  mono_loader_unlock ();
  D.19887 = result;
  return D.19887;
}


get_method_constrained (struct MonoImage * image, struct MonoMethod * method, struct MonoClass * constrained_class, struct MonoGenericContext * context)
{
  struct MonoMethod * D.19891;
  unsigned char D.19892;
  unsigned char D.19893;
  short unsigned int D.19896;
  struct MonoMethod * D.19899;
  struct MonoGenericInst * D.19900;
  struct MonoClass * D.19903;
  struct MonoImage * D.19904;
  int D.19905;
  unsigned int D.19912;
  unsigned int D.19913;
  unsigned char D.19915;
  const char * D.19917;
  char * D.19922;
  const char * D.19923;
  const char * D.19924;
  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.19889>; else goto <D.19890>;
  <D.19889>:
  D.19891 = 0B;
  return D.19891;
  <D.19890>:
  D.19892 = BIT_FIELD_REF <*method, 8, 264>;
  D.19893 = D.19892 & 16;
  if (D.19893 != 0) goto <D.19894>; else goto <D.19895>;
  <D.19894>:
  D.19896 = sig->generic_param_count;
  if (D.19896 != 0) goto <D.19897>; else goto <D.19898>;
  <D.19897>:
  {
    struct MonoMethodInflated * imethod;

    imethod = method;
    D.19899 = imethod->declaring;
    sig = mono_method_signature (D.19899);
    method_context = mono_method_get_context (method);
    original_sig = sig;
    D.19900 = method_context->class_inst;
    if (D.19900 != 0B) goto <D.19901>; else goto <D.19902>;
    <D.19901>:
    {
      struct MonoError error;
      struct MonoGenericContext ctx;

      try
        {
          ctx.method_inst = 0B;
          D.19900 = method_context->class_inst;
          ctx.class_inst = D.19900;
          D.19903 = method->klass;
          D.19904 = D.19903->image;
          sig = inflate_generic_signature_checked (D.19904, sig, &ctx, &error);
          D.19905 = mono_error_ok (&error);
          if (D.19905 == 0) goto <D.19906>; else goto <D.19907>;
          <D.19906>:
          mono_error_cleanup (&error);
          D.19891 = 0B;
          return D.19891;
          <D.19907>:
        }
      finally
        {
          error = {CLOBBER};
          ctx = {CLOBBER};
        }
    }
    <D.19902>:
  }
  <D.19898>:
  <D.19895>:
  D.19903 = method->klass;
  if (D.19903 != constrained_class) goto <D.19910>; else goto <D.19911>;
  <D.19910>:
  D.19903 = method->klass;
  D.19912 = D.19903->flags;
  D.19913 = D.19912 & 32;
  if (D.19913 != 0) goto <D.19908>; else goto <D.19914>;
  <D.19914>:
  D.19903 = method->klass;
  D.19915 = D.19903->byval_arg.type;
  if (D.19915 == 19) goto <D.19908>; else goto <D.19916>;
  <D.19916>:
  D.19903 = method->klass;
  D.19915 = D.19903->byval_arg.type;
  if (D.19915 == 30) goto <D.19908>; else goto <D.19909>;
  <D.19908>:
  ic = method->klass;
  <D.19909>:
  <D.19911>:
  D.19917 = method->name;
  result = find_method (constrained_class, ic, D.19917, sig, constrained_class);
  if (sig != original_sig) goto <D.19918>; else goto <D.19919>;
  <D.19918>:
  mono_metadata_free_inflated_signature (sig);
  <D.19919>:
  if (result == 0B) goto <D.19920>; else goto <D.19921>;
  <D.19920>:
  {
    char * m;

    m = mono_method_full_name (method, 1);
    D.19922 = image->name;
    D.19917 = method->name;
    D.19903 = method->klass;
    D.19923 = D.19903->name;
    D.19903 = method->klass;
    D.19924 = D.19903->name_space;
    monoeg_g_log (0B, 16, "Missing method %s.%s.%s in assembly %s method %s", D.19924, D.19923, D.19917, D.19922, m);
    monoeg_g_free (m);
    D.19891 = 0B;
    return D.19891;
  }
  <D.19921>:
  if (method_context != 0B) goto <D.19925>; else goto <D.19926>;
  <D.19925>:
  result = mono_class_inflate_generic_method (result, method_context);
  <D.19926>:
  D.19891 = result;
  return D.19891;
}


mono_get_method_constrained (struct MonoImage * image, guint32 token, struct MonoClass * constrained_class, struct MonoGenericContext * context, struct MonoMethod * * cil_method)
{
  struct MonoMethod * D.19930;
  struct MonoMethod * D.19931;
  struct MonoMethod * D.19934;
  struct MonoMethod * result;

  mono_loader_lock ();
  D.19930 = mono_get_method_from_token (image, token, 0B, context, 0B);
  *cil_method = D.19930;
  D.19931 = *cil_method;
  if (D.19931 == 0B) goto <D.19932>; else goto <D.19933>;
  <D.19932>:
  mono_loader_unlock ();
  D.19934 = 0B;
  return D.19934;
  <D.19933>:
  D.19931 = *cil_method;
  result = get_method_constrained (image, D.19931, constrained_class, context);
  mono_loader_unlock ();
  D.19934 = result;
  return D.19934;
}


mono_free_method (struct MonoMethod * method)
{
  <unnamed type> D.19936;
  unsigned int D.19937;
  <unnamed type> D.19940;
  struct MonoMethodSignature * D.19943;
  unsigned char D.19946;
  unsigned char D.19947;
  struct MonoClass * D.19950;
  struct MonoImage * D.19951;
  const char * D.19952;
  struct MonoMethodHeader * D.19953;
  const unsigned char * D.19956;
  struct MonoType * D.19957;
  short unsigned int D.19958;
  int D.19959;
  struct MonoExceptionClause * D.19960;
  void * D.19961;

  D.19936 = mono_profiler_get_events ();
  D.19937 = D.19936 & 65536;
  if (D.19937 != 0) goto <D.19938>; else goto <D.19939>;
  <D.19938>:
  mono_profiler_method_free (method);
  <D.19939>:
  D.19940 = mono_profiler_get_events ();
  if (D.19940 != 0) goto <D.19941>; else goto <D.19942>;
  <D.19941>:
  return;
  <D.19942>:
  D.19943 = method->signature;
  if (D.19943 != 0B) goto <D.19944>; else goto <D.19945>;
  <D.19944>:
  <D.19945>:
  D.19946 = BIT_FIELD_REF <*method, 8, 264>;
  D.19947 = D.19946 & 2;
  if (D.19947 != 0) goto <D.19948>; else goto <D.19949>;
  <D.19948>:
  {
    struct MonoMethodWrapper * mw;
    int i;

    mw = method;
    mono_marshal_free_dynamic_wrappers (method);
    D.19950 = method->klass;
    D.19951 = D.19950->image;
    mono_image_property_remove (D.19951, method);
    D.19952 = method->name;
    monoeg_g_free (D.19952);
    D.19953 = mw->header;
    if (D.19953 != 0B) goto <D.19954>; else goto <D.19955>;
    <D.19954>:
    D.19953 = mw->header;
    D.19956 = D.19953->code;
    monoeg_g_free (D.19956);
    i = 0;
    goto <D.18513>;
    <D.18512>:
    D.19953 = mw->header;
    D.19957 = D.19953->locals[i];
    monoeg_g_free (D.19957);
    i = i + 1;
    <D.18513>:
    D.19953 = mw->header;
    D.19958 = D.19953->num_locals;
    D.19959 = (int) D.19958;
    if (D.19959 > i) goto <D.18512>; else goto <D.18514>;
    <D.18514>:
    D.19953 = mw->header;
    D.19960 = D.19953->clauses;
    monoeg_g_free (D.19960);
    D.19953 = mw->header;
    monoeg_g_free (D.19953);
    <D.19955>:
    D.19961 = mw->method_data;
    monoeg_g_free (D.19961);
    D.19943 = method->signature;
    monoeg_g_free (D.19943);
    monoeg_g_free (method);
  }
  <D.19949>:
}


mono_method_get_param_names (struct MonoMethod * method, const char * * names)
{
  unsigned char D.19963;
  unsigned char D.19964;
  short unsigned int D.19969;
  long unsigned int D.19972;
  long unsigned int D.19973;
  const char * * D.19974;
  int D.19975;
  unsigned char D.19976;
  struct MonoImage * D.19979;
  unsigned char D.19980;
  unsigned char D.19981;
  struct MonoClass * D.19984;
  struct MonoImage * D.19985;
  struct GHashTable * D.19986;
  char * * D.19989;
  sizetype D.19992;
  sizetype D.19993;
  sizetype D.19994;
  char * * D.19995;
  char * D.19996;
  struct MonoMethodSignature * D.19999;
  short unsigned int D.20000;
  int D.20001;
  unsigned char D.20002;
  unsigned char D.20003;
  struct GHashTable * D.20006;
  char * * D.20011;
  char * D.20012;
  unsigned int D.20015;
  int D.20016;
  <unnamed-unsigned:24> D.20017;
  unsigned int D.20018;
  int idx.69;
  unsigned int D.20022;
  <unnamed-unsigned:24> D.20024;
  int D.20025;
  int D.20026;
  unsigned int D.20027;
  unsigned int D.20030;
  unsigned int D.20033;
  long unsigned int D.20034;
  long unsigned int D.20035;
  const char * * D.20036;
  unsigned int D.20037;
  const char * D.20038;
  int i;
  int lastp;
  struct MonoClass * klass;
  struct MonoTableInfo * methodt;
  struct MonoTableInfo * paramt;
  struct MonoMethodSignature * signature;
  guint32 idx;

  D.19963 = BIT_FIELD_REF <*method, 8, 264>;
  D.19964 = D.19963 & 16;
  if (D.19964 != 0) goto <D.19965>; else goto <D.19966>;
  <D.19965>:
  method = MEM[(struct MonoMethodInflated *)method].declaring;
  <D.19966>:
  signature = mono_method_signature (method);
  if (signature == 0B) goto <D.19967>; else goto <D.19968>;
  <D.19967>:
  return;
  <D.19968>:
  D.19969 = signature->param_count;
  if (D.19969 == 0) goto <D.19970>; else goto <D.19971>;
  <D.19970>:
  return;
  <D.19971>:
  i = 0;
  goto <D.18527>;
  <D.18526>:
  D.19972 = (long unsigned int) i;
  D.19973 = D.19972 * 8;
  D.19974 = names + D.19973;
  *D.19974 = "";
  i = i + 1;
  <D.18527>:
  D.19969 = signature->param_count;
  D.19975 = (int) D.19969;
  if (D.19975 > i) goto <D.18526>; else goto <D.18528>;
  <D.18528>:
  klass = method->klass;
  D.19976 = klass->rank;
  if (D.19976 != 0) goto <D.19977>; else goto <D.19978>;
  <D.19977>:
  return;
  <D.19978>:
  mono_class_init (klass);
  D.19979 = klass->image;
  D.19980 = BIT_FIELD_REF <*D.19979, 8, 224>;
  D.19981 = D.19980 & 8;
  if (D.19981 != 0) goto <D.19982>; else goto <D.19983>;
  <D.19982>:
  {
    struct MonoReflectionMethodAux * method_aux;

    D.19984 = method->klass;
    D.19985 = D.19984->image;
    D.19986 = MEM[(struct MonoDynamicImage *)D.19985].method_aux_hash;
    method_aux = monoeg_g_hash_table_lookup (D.19986, method);
    if (method_aux != 0B) goto <D.19987>; else goto <D.19988>;
    <D.19987>:
    D.19989 = method_aux->param_names;
    if (D.19989 != 0B) goto <D.19990>; else goto <D.19991>;
    <D.19990>:
    i = 0;
    goto <D.18531>;
    <D.18530>:
    D.19989 = method_aux->param_names;
    D.19992 = (sizetype) i;
    D.19993 = D.19992 + 1;
    D.19994 = D.19993 * 8;
    D.19995 = D.19989 + D.19994;
    D.19996 = *D.19995;
    if (D.19996 != 0B) goto <D.19997>; else goto <D.19998>;
    <D.19997>:
    D.19972 = (long unsigned int) i;
    D.19973 = D.19972 * 8;
    D.19974 = names + D.19973;
    D.19989 = method_aux->param_names;
    D.19992 = (sizetype) i;
    D.19993 = D.19992 + 1;
    D.19994 = D.19993 * 8;
    D.19995 = D.19989 + D.19994;
    D.19996 = *D.19995;
    *D.19974 = D.19996;
    <D.19998>:
    i = i + 1;
    <D.18531>:
    D.19999 = mono_method_signature (method);
    D.20000 = D.19999->param_count;
    D.20001 = (int) D.20000;
    if (D.20001 > i) goto <D.18530>; else goto <D.18532>;
    <D.18532>:
    <D.19991>:
    <D.19988>:
    return;
  }
  <D.19983>:
  D.20002 = BIT_FIELD_REF <*method, 8, 256>;
  D.20003 = D.20002 & 124;
  if (D.20003 != 0) goto <D.20004>; else goto <D.20005>;
  <D.20004>:
  {
    char * * pnames;

    pnames = 0B;
    D.19979 = klass->image;
    mono_image_lock (D.19979);
    D.19979 = klass->image;
    D.20006 = D.19979->wrapper_param_names;
    if (D.20006 != 0B) goto <D.20007>; else goto <D.20008>;
    <D.20007>:
    D.19979 = klass->image;
    D.20006 = D.19979->wrapper_param_names;
    pnames = monoeg_g_hash_table_lookup (D.20006, method);
    <D.20008>:
    D.19979 = klass->image;
    mono_image_unlock (D.19979);
    if (pnames != 0B) goto <D.20009>; else goto <D.20010>;
    <D.20009>:
    i = 0;
    goto <D.18535>;
    <D.18534>:
    D.19972 = (long unsigned int) i;
    D.19973 = D.19972 * 8;
    D.19974 = names + D.19973;
    D.19972 = (long unsigned int) i;
    D.19973 = D.19972 * 8;
    D.20011 = pnames + D.19973;
    D.20012 = *D.20011;
    *D.19974 = D.20012;
    i = i + 1;
    <D.18535>:
    D.19969 = signature->param_count;
    D.19975 = (int) D.19969;
    if (D.19975 > i) goto <D.18534>; else goto <D.18536>;
    <D.18536>:
    <D.20010>:
    return;
  }
  <D.20005>:
  D.19979 = klass->image;
  methodt = &D.19979->tables[6];
  D.19979 = klass->image;
  paramt = &D.19979->tables[8];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.20013>; else goto <D.20014>;
  <D.20013>:
  {
    guint32 cols[3];
    guint param_index;

    try
      {
        D.20015 = idx + 4294967295;
        D.20016 = (int) D.20015;
        param_index = mono_metadata_decode_row_col (methodt, D.20016, 5);
        D.20017 = methodt->rows;
        D.20018 = (unsigned int) D.20017;
        if (D.20018 > idx) goto <D.20019>; else goto <D.20020>;
        <D.20019>:
        idx.69 = (int) idx;
        D.20022 = mono_metadata_decode_row_col (methodt, idx.69, 5);
        lastp = (int) D.20022;
        goto <D.20023>;
        <D.20020>:
        D.20024 = paramt->rows;
        D.20025 = (int) D.20024;
        lastp = D.20025 + 1;
        <D.20023>:
        i = (int) param_index;
        goto <D.18540>;
        <D.18539>:
        D.20026 = i + -1;
        mono_metadata_decode_row (paramt, D.20026, &cols, 3);
        D.20027 = cols[1];
        if (D.20027 != 0) goto <D.20028>; else goto <D.20029>;
        <D.20028>:
        D.20027 = cols[1];
        D.19969 = signature->param_count;
        D.20030 = (unsigned int) D.19969;
        if (D.20027 <= D.20030) goto <D.20031>; else goto <D.20032>;
        <D.20031>:
        D.20027 = cols[1];
        D.20033 = D.20027 + 4294967295;
        D.20034 = (long unsigned int) D.20033;
        D.20035 = D.20034 * 8;
        D.20036 = names + D.20035;
        D.20037 = cols[2];
        D.19979 = klass->image;
        D.20038 = mono_metadata_string_heap (D.19979, D.20037);
        *D.20036 = D.20038;
        <D.20032>:
        <D.20029>:
        i = i + 1;
        <D.18540>:
        if (i < lastp) goto <D.18539>; else goto <D.18541>;
        <D.18541>:
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.20014>:
}


mono_method_get_param_token (struct MonoMethod * method, int index)
{
  struct MonoImage * D.20040;
  unsigned char D.20041;
  unsigned char D.20042;
  unsigned int D.20047;
  int D.20048;
  uint32_t D.20051;
  unsigned int index.70;
  unsigned int D.20053;
  struct MonoClass * klass;
  struct MonoTableInfo * methodt;
  guint32 idx;

  klass = method->klass;
  mono_class_init (klass);
  D.20040 = klass->image;
  D.20041 = BIT_FIELD_REF <*D.20040, 8, 224>;
  D.20042 = D.20041 & 8;
  if (D.20042 != 0) goto <D.20043>; else goto <D.20044>;
  <D.20043>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "loader.c", 2100);
  <D.20044>:
  D.20040 = klass->image;
  methodt = &D.20040->tables[6];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.20045>; else goto <D.20046>;
  <D.20045>:
  {
    guint param_index;

    D.20047 = idx + 4294967295;
    D.20048 = (int) D.20047;
    param_index = mono_metadata_decode_row_col (methodt, D.20048, 5);
    if (index == -1) goto <D.20049>; else goto <D.20050>;
    <D.20049>:
    D.20051 = 134217728;
    return D.20051;
    <D.20050>:
    index.70 = (unsigned int) index;
    D.20053 = param_index + index.70;
    D.20051 = D.20053 | 134217728;
    return D.20051;
  }
  <D.20046>:
  D.20051 = 0;
  return D.20051;
}


mono_method_get_marshal_info (struct MonoMethod * method, struct MonoMarshalSpec * * mspecs)
{
  _Bool D.20055;
  long int D.20056;
  long int D.20057;
  long unsigned int D.20060;
  long unsigned int D.20061;
  struct MonoMarshalSpec * * D.20062;
  short unsigned int D.20063;
  int D.20064;
  struct MonoClass * D.20065;
  struct MonoImage * D.20066;
  unsigned char D.20067;
  unsigned char D.20068;
  struct GHashTable * D.20071;
  struct MonoMarshalSpec * * D.20074;
  struct MonoMarshalSpec * * D.20077;
  struct MonoMarshalSpec * D.20078;
  void * D.20081;
  struct MonoMarshalSpec * D.20082;
  char * D.20083;
  gchar * D.20084;
  char * D.20085;
  gchar * D.20086;
  struct MonoImage * D.20087;
  unsigned int D.20090;
  int D.20091;
  <unnamed-unsigned:24> D.20092;
  unsigned int D.20093;
  int idx.71;
  unsigned int D.20097;
  <unnamed-unsigned:24> D.20099;
  int D.20100;
  int D.20101;
  unsigned int D.20102;
  unsigned int D.20103;
  unsigned int D.20106;
  unsigned int D.20107;
  unsigned int D.20110;
  _Bool D.20111;
  long int D.20112;
  long int D.20113;
  long unsigned int D.20116;
  long unsigned int D.20117;
  struct MonoMarshalSpec * * D.20118;
  struct MonoMarshalSpec * D.20119;
  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.20055 = signature == 0B;
  D.20056 = (long int) D.20055;
  D.20057 = __builtin_expect (D.20056, 0);
  if (D.20057 != 0) goto <D.20058>; else goto <D.20059>;
  <D.20058>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2129, "signature");
  <D.20059>:
  i = 0;
  goto <D.18562>;
  <D.18561>:
  D.20060 = (long unsigned int) i;
  D.20061 = D.20060 * 8;
  D.20062 = mspecs + D.20061;
  *D.20062 = 0B;
  i = i + 1;
  <D.18562>:
  D.20063 = signature->param_count;
  D.20064 = (int) D.20063;
  if (D.20064 >= i) goto <D.18561>; else goto <D.18563>;
  <D.18563>:
  D.20065 = method->klass;
  D.20066 = D.20065->image;
  D.20067 = BIT_FIELD_REF <*D.20066, 8, 224>;
  D.20068 = D.20067 & 8;
  if (D.20068 != 0) goto <D.20069>; else goto <D.20070>;
  <D.20069>:
  {
    struct MonoReflectionMethodAux * method_aux;

    D.20065 = method->klass;
    D.20066 = D.20065->image;
    D.20071 = MEM[(struct MonoDynamicImage *)D.20066].method_aux_hash;
    method_aux = monoeg_g_hash_table_lookup (D.20071, method);
    if (method_aux != 0B) goto <D.20072>; else goto <D.20073>;
    <D.20072>:
    D.20074 = method_aux->param_marshall;
    if (D.20074 != 0B) goto <D.20075>; else goto <D.20076>;
    <D.20075>:
    {
      struct MonoMarshalSpec * * dyn_specs;

      dyn_specs = method_aux->param_marshall;
      i = 0;
      goto <D.18567>;
      <D.18566>:
      D.20060 = (long unsigned int) i;
      D.20061 = D.20060 * 8;
      D.20077 = dyn_specs + D.20061;
      D.20078 = *D.20077;
      if (D.20078 != 0B) goto <D.20079>; else goto <D.20080>;
      <D.20079>:
      D.20060 = (long unsigned int) i;
      D.20061 = D.20060 * 8;
      D.20062 = mspecs + D.20061;
      D.20081 = monoeg_malloc0 (24);
      *D.20062 = D.20081;
      D.20060 = (long unsigned int) i;
      D.20061 = D.20060 * 8;
      D.20077 = dyn_specs + D.20061;
      D.20078 = *D.20077;
      D.20060 = (long unsigned int) i;
      D.20061 = D.20060 * 8;
      D.20062 = mspecs + D.20061;
      D.20082 = *D.20062;
      memcpy (D.20082, D.20078, 24);
      D.20060 = (long unsigned int) i;
      D.20061 = D.20060 * 8;
      D.20062 = mspecs + D.20061;
      D.20082 = *D.20062;
      D.20060 = (long unsigned int) i;
      D.20061 = D.20060 * 8;
      D.20077 = dyn_specs + D.20061;
      D.20078 = *D.20077;
      D.20083 = D.20078->data.custom_data.custom_name;
      D.20084 = monoeg_strdup (D.20083);
      D.20082->data.custom_data.custom_name = D.20084;
      D.20060 = (long unsigned int) i;
      D.20061 = D.20060 * 8;
      D.20062 = mspecs + D.20061;
      D.20082 = *D.20062;
      D.20060 = (long unsigned int) i;
      D.20061 = D.20060 * 8;
      D.20077 = dyn_specs + D.20061;
      D.20078 = *D.20077;
      D.20085 = D.20078->data.custom_data.cookie;
      D.20086 = monoeg_strdup (D.20085);
      D.20082->data.custom_data.cookie = D.20086;
      <D.20080>:
      i = i + 1;
      <D.18567>:
      D.20063 = signature->param_count;
      D.20064 = (int) D.20063;
      if (D.20064 >= i) goto <D.18566>; else goto <D.18568>;
      <D.18568>:
    }
    <D.20076>:
    <D.20073>:
    return;
  }
  <D.20070>:
  mono_class_init (klass);
  D.20087 = klass->image;
  methodt = &D.20087->tables[6];
  D.20087 = klass->image;
  paramt = &D.20087->tables[8];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.20088>; else goto <D.20089>;
  <D.20088>:
  {
    guint32 cols[3];
    guint param_index;

    try
      {
        D.20090 = idx + 4294967295;
        D.20091 = (int) D.20090;
        param_index = mono_metadata_decode_row_col (methodt, D.20091, 5);
        D.20092 = methodt->rows;
        D.20093 = (unsigned int) D.20092;
        if (D.20093 > idx) goto <D.20094>; else goto <D.20095>;
        <D.20094>:
        idx.71 = (int) idx;
        D.20097 = mono_metadata_decode_row_col (methodt, idx.71, 5);
        lastp = (int) D.20097;
        goto <D.20098>;
        <D.20095>:
        D.20099 = paramt->rows;
        D.20100 = (int) D.20099;
        lastp = D.20100 + 1;
        <D.20098>:
        i = (int) param_index;
        goto <D.18573>;
        <D.18572>:
        D.20101 = i + -1;
        mono_metadata_decode_row (paramt, D.20101, &cols, 3);
        D.20102 = cols[0];
        D.20103 = D.20102 & 8192;
        if (D.20103 != 0) goto <D.20104>; else goto <D.20105>;
        <D.20104>:
        D.20106 = cols[1];
        D.20063 = signature->param_count;
        D.20107 = (unsigned int) D.20063;
        if (D.20106 <= D.20107) goto <D.20108>; else goto <D.20109>;
        <D.20108>:
        {
          const char * tp;

          D.20101 = i + -1;
          D.20110 = (unsigned int) D.20101;
          D.20087 = klass->image;
          tp = mono_metadata_get_marshal_info (D.20087, D.20110, 0);
          D.20111 = tp == 0B;
          D.20112 = (long int) D.20111;
          D.20113 = __builtin_expect (D.20112, 0);
          if (D.20113 != 0) goto <D.20114>; else goto <D.20115>;
          <D.20114>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2171, "tp");
          <D.20115>:
          D.20106 = cols[1];
          D.20116 = (long unsigned int) D.20106;
          D.20117 = D.20116 * 8;
          D.20118 = mspecs + D.20117;
          D.20087 = klass->image;
          D.20119 = mono_metadata_parse_marshal_spec (D.20087, tp);
          *D.20118 = D.20119;
        }
        <D.20109>:
        <D.20105>:
        i = i + 1;
        <D.18573>:
        if (i < lastp) goto <D.18572>; else goto <D.18574>;
        <D.18574>:
        return;
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.20089>:
}


memcpy (void * restrict __dest, const void * restrict __src, size_t __len)
{
  void * D.20122;
  long unsigned int D.20123;

  D.20123 = __builtin_object_size (__dest, 0);
  D.20122 = __builtin___memcpy_chk (__dest, __src, __len, D.20123);
  return D.20122;
}


mono_method_has_marshal_info (struct MonoMethod * method)
{
  struct MonoClass * D.20125;
  struct MonoImage * D.20126;
  unsigned char D.20127;
  unsigned char D.20128;
  struct GHashTable * D.20131;
  long unsigned int D.20134;
  long unsigned int D.20135;
  struct MonoMarshalSpec * * D.20136;
  struct MonoMarshalSpec * D.20137;
  mono_bool D.20140;
  struct MonoMethodSignature * D.20141;
  short unsigned int D.20142;
  int D.20143;
  struct MonoImage * D.20144;
  unsigned int D.20147;
  int D.20148;
  unsigned int D.20149;
  <unnamed-unsigned:24> D.20150;
  unsigned int D.20151;
  int idx.72;
  unsigned int D.20155;
  <unnamed-unsigned:24> D.20157;
  int D.20158;
  int D.20159;
  unsigned int D.20160;
  unsigned int D.20161;
  int i;
  int lastp;
  struct MonoClass * klass;
  struct MonoTableInfo * methodt;
  struct MonoTableInfo * paramt;
  guint32 idx;

  klass = method->klass;
  D.20125 = method->klass;
  D.20126 = D.20125->image;
  D.20127 = BIT_FIELD_REF <*D.20126, 8, 224>;
  D.20128 = D.20127 & 8;
  if (D.20128 != 0) goto <D.20129>; else goto <D.20130>;
  <D.20129>:
  {
    struct MonoReflectionMethodAux * method_aux;
    struct MonoMarshalSpec * * dyn_specs;

    D.20125 = method->klass;
    D.20126 = D.20125->image;
    D.20131 = MEM[(struct MonoDynamicImage *)D.20126].method_aux_hash;
    method_aux = monoeg_g_hash_table_lookup (D.20131, method);
    dyn_specs = method_aux->param_marshall;
    if (dyn_specs != 0B) goto <D.20132>; else goto <D.20133>;
    <D.20132>:
    i = 0;
    goto <D.18587>;
    <D.18586>:
    D.20134 = (long unsigned int) i;
    D.20135 = D.20134 * 8;
    D.20136 = dyn_specs + D.20135;
    D.20137 = *D.20136;
    if (D.20137 != 0B) goto <D.20138>; else goto <D.20139>;
    <D.20138>:
    D.20140 = 1;
    return D.20140;
    <D.20139>:
    i = i + 1;
    <D.18587>:
    D.20141 = mono_method_signature (method);
    D.20142 = D.20141->param_count;
    D.20143 = (int) D.20142;
    if (D.20143 >= i) goto <D.18586>; else goto <D.18588>;
    <D.18588>:
    <D.20133>:
    D.20140 = 0;
    return D.20140;
  }
  <D.20130>:
  mono_class_init (klass);
  D.20144 = klass->image;
  methodt = &D.20144->tables[6];
  D.20144 = klass->image;
  paramt = &D.20144->tables[8];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.20145>; else goto <D.20146>;
  <D.20145>:
  {
    guint32 cols[3];
    guint param_index;

    try
      {
        D.20147 = idx + 4294967295;
        D.20148 = (int) D.20147;
        param_index = mono_metadata_decode_row_col (methodt, D.20148, 5);
        D.20149 = idx + 1;
        D.20150 = methodt->rows;
        D.20151 = (unsigned int) D.20150;
        if (D.20149 < D.20151) goto <D.20152>; else goto <D.20153>;
        <D.20152>:
        idx.72 = (int) idx;
        D.20155 = mono_metadata_decode_row_col (methodt, idx.72, 5);
        lastp = (int) D.20155;
        goto <D.20156>;
        <D.20153>:
        D.20157 = paramt->rows;
        D.20158 = (int) D.20157;
        lastp = D.20158 + 1;
        <D.20156>:
        i = (int) param_index;
        goto <D.18592>;
        <D.18591>:
        D.20159 = i + -1;
        mono_metadata_decode_row (paramt, D.20159, &cols, 3);
        D.20160 = cols[0];
        D.20161 = D.20160 & 8192;
        if (D.20161 != 0) goto <D.20162>; else goto <D.20163>;
        <D.20162>:
        D.20140 = 1;
        return D.20140;
        <D.20163>:
        i = i + 1;
        <D.18592>:
        if (i < lastp) goto <D.18591>; else goto <D.18593>;
        <D.18593>:
        D.20140 = 0;
        return D.20140;
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.20146>:
  D.20140 = 0;
  return D.20140;
}


mono_method_get_wrapper_data (struct MonoMethod * method, guint32 id)
{
  _Bool D.20166;
  long int D.20167;
  long int D.20168;
  unsigned char D.20171;
  unsigned char D.20172;
  _Bool D.20173;
  long int D.20174;
  long int D.20175;
  unsigned char D.20178;
  unsigned char D.20179;
  _Bool D.20182;
  long int D.20183;
  long int D.20184;
  void * D.20187;
  long int D.20188;
  unsigned int D.20189;
  _Bool D.20190;
  long int D.20191;
  long int D.20192;
  void * D.20195;
  long unsigned int D.20196;
  long unsigned int D.20197;
  void * * D.20198;
  void * * data;

  D.20166 = method == 0B;
  D.20167 = (long int) D.20166;
  D.20168 = __builtin_expect (D.20167, 0);
  if (D.20168 != 0) goto <D.20169>; else goto <D.20170>;
  <D.20169>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2231, "method != NULL");
  <D.20170>:
  D.20171 = BIT_FIELD_REF <*method, 8, 256>;
  D.20172 = D.20171 & 124;
  D.20173 = D.20172 == 0;
  D.20174 = (long int) D.20173;
  D.20175 = __builtin_expect (D.20174, 0);
  if (D.20175 != 0) goto <D.20176>; else goto <D.20177>;
  <D.20176>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2232, "method->wrapper_type != MONO_WRAPPER_NONE");
  <D.20177>:
  D.20178 = BIT_FIELD_REF <*method, 8, 264>;
  D.20179 = D.20178 & 16;
  if (D.20179 != 0) goto <D.20180>; else goto <D.20181>;
  <D.20180>:
  method = MEM[(struct MonoMethodInflated *)method].declaring;
  <D.20181>:
  data = MEM[(struct MonoMethodWrapper *)method].method_data;
  D.20182 = data == 0B;
  D.20183 = (long int) D.20182;
  D.20184 = __builtin_expect (D.20183, 0);
  if (D.20184 != 0) goto <D.20185>; else goto <D.20186>;
  <D.20185>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2237, "data != NULL");
  <D.20186>:
  D.20187 = *data;
  D.20188 = (long int) D.20187;
  D.20189 = (unsigned int) D.20188;
  D.20190 = D.20189 < id;
  D.20191 = (long int) D.20190;
  D.20192 = __builtin_expect (D.20191, 0);
  if (D.20192 != 0) goto <D.20193>; else goto <D.20194>;
  <D.20193>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2238, "id <= GPOINTER_TO_UINT (*data)");
  <D.20194>:
  D.20196 = (long unsigned int) id;
  D.20197 = D.20196 * 8;
  D.20198 = data + D.20197;
  D.20195 = *D.20198;
  return D.20195;
}


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

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


stack_walk_adapter (struct MonoStackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  <unnamed type> D.20202;
  gboolean D.20203;
  struct MonoJitInfo * D.20204;
  _Bool D.20205;
  long int D.20206;
  long int D.20207;
  mono_bool (*<T10be>) (struct MonoMethod *, int32_t, int32_t, mono_bool, void *) D.20210;
  void * D.20211;
  int D.20212;
  int D.20213;
  int D.20214;
  struct MonoMethod * D.20215;
  struct StackWalkUserData * d;

  d = data;
  D.20202 = frame->type;
  switch (D.20202) <default: <D.18612>, case 0: <D.18611>, case 1: <D.18609>, case 2: <D.18610>>
  <D.18609>:
  <D.18610>:
  D.20203 = 0;
  return D.20203;
  <D.18611>:
  D.20204 = frame->ji;
  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", 2257, "frame->ji");
  <D.20209>:
  D.20210 = d->func;
  D.20211 = d->user_data;
  D.20212 = frame->managed;
  D.20213 = frame->il_offset;
  D.20214 = frame->native_offset;
  D.20204 = frame->ji;
  D.20215 = mono_jit_info_get_method (D.20204);
  D.20203 = D.20210 (D.20215, D.20214, D.20213, D.20212, D.20211);
  return D.20203;
  <D.18612>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "loader.c", 2261);
  D.20203 = 0;
  return D.20203;
}


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

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


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

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


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

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


mono_loader_lock ()
{
  _Bool D.20226;
  long int D.20227;
  long int D.20228;
  int loader_lock_track_ownership.73;
  _Bool D.20232;
  long int D.20233;
  long int D.20234;
  unsigned int loader_lock_nest_id.74;
  void * D.20238;
  long int D.20239;
  unsigned int D.20240;
  unsigned int D.20241;
  long unsigned int D.20242;
  void * D.20243;

  {
    int ret;

    ret = pthread_mutex_lock (&loader_mutex.mutex);
    if (ret != 0) goto <D.20224>; else goto <D.20225>;
    <D.20224>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.20225>:
    D.20226 = ret != 0;
    D.20227 = (long int) D.20226;
    D.20228 = __builtin_expect (D.20227, 0);
    if (D.20228 != 0) goto <D.20229>; else goto <D.20230>;
    <D.20229>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2308, "ret == 0");
    <D.20230>:
  }
  loader_lock_track_ownership.73 = loader_lock_track_ownership;
  D.20232 = loader_lock_track_ownership.73 != 0;
  D.20233 = (long int) D.20232;
  D.20234 = __builtin_expect (D.20233, 0);
  if (D.20234 != 0) goto <D.20235>; else goto <D.20236>;
  <D.20235>:
  loader_lock_nest_id.74 = loader_lock_nest_id;
  D.20238 = pthread_getspecific (loader_lock_nest_id.74);
  D.20239 = (long int) D.20238;
  D.20240 = (unsigned int) D.20239;
  D.20241 = D.20240 + 1;
  D.20242 = (long unsigned int) D.20241;
  D.20243 = (void *) D.20242;
  loader_lock_nest_id.74 = loader_lock_nest_id;
  mono_native_tls_set_value (loader_lock_nest_id.74, D.20243);
  <D.20236>:
}


mono_loader_unlock ()
{
  _Bool D.20246;
  long int D.20247;
  long int D.20248;
  int loader_lock_track_ownership.75;
  _Bool D.20252;
  long int D.20253;
  long int D.20254;
  unsigned int loader_lock_nest_id.76;
  void * D.20258;
  long int D.20259;
  unsigned int D.20260;
  unsigned int D.20261;
  long unsigned int D.20262;
  void * D.20263;

  {
    int ret;

    ret = pthread_mutex_unlock (&loader_mutex.mutex);
    if (ret != 0) goto <D.20244>; else goto <D.20245>;
    <D.20244>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.20245>:
    D.20246 = ret != 0;
    D.20247 = (long int) D.20246;
    D.20248 = __builtin_expect (D.20247, 0);
    if (D.20248 != 0) goto <D.20249>; else goto <D.20250>;
    <D.20249>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2317, "ret == 0");
    <D.20250>:
  }
  loader_lock_track_ownership.75 = loader_lock_track_ownership;
  D.20252 = loader_lock_track_ownership.75 != 0;
  D.20253 = (long int) D.20252;
  D.20254 = __builtin_expect (D.20253, 0);
  if (D.20254 != 0) goto <D.20255>; else goto <D.20256>;
  <D.20255>:
  loader_lock_nest_id.76 = loader_lock_nest_id;
  D.20258 = pthread_getspecific (loader_lock_nest_id.76);
  D.20259 = (long int) D.20258;
  D.20260 = (unsigned int) D.20259;
  D.20261 = D.20260 + 4294967295;
  D.20262 = (long unsigned int) D.20261;
  D.20263 = (void *) D.20262;
  loader_lock_nest_id.76 = loader_lock_nest_id;
  mono_native_tls_set_value (loader_lock_nest_id.76, D.20263);
  <D.20256>:
}


mono_loader_lock_track_ownership (gboolean track)
{
  loader_lock_track_ownership = track;
}


mono_loader_lock_is_owned_by_self ()
{
  int loader_lock_track_ownership.77;
  _Bool D.20265;
  long int D.20266;
  long int D.20267;
  gboolean D.20270;
  unsigned int loader_lock_nest_id.78;
  void * D.20272;
  long int D.20273;
  unsigned int D.20274;
  _Bool D.20275;

  loader_lock_track_ownership.77 = loader_lock_track_ownership;
  D.20265 = loader_lock_track_ownership.77 == 0;
  D.20266 = (long int) D.20265;
  D.20267 = __builtin_expect (D.20266, 0);
  if (D.20267 != 0) goto <D.20268>; else goto <D.20269>;
  <D.20268>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2345, "loader_lock_track_ownership");
  <D.20269>:
  loader_lock_nest_id.78 = loader_lock_nest_id;
  D.20272 = pthread_getspecific (loader_lock_nest_id.78);
  D.20273 = (long int) D.20272;
  D.20274 = (unsigned int) D.20273;
  D.20275 = D.20274 != 0;
  D.20270 = (gboolean) D.20275;
  return D.20270;
}


mono_loader_lock_if_inited ()
{
  int loader_lock_inited.79;

  loader_lock_inited.79 = loader_lock_inited;
  if (loader_lock_inited.79 != 0) goto <D.20278>; else goto <D.20279>;
  <D.20278>:
  mono_loader_lock ();
  <D.20279>:
}


mono_loader_unlock_if_inited ()
{
  int loader_lock_inited.80;

  loader_lock_inited.80 = loader_lock_inited;
  if (loader_lock_inited.80 != 0) goto <D.20281>; else goto <D.20282>;
  <D.20281>:
  mono_loader_unlock ();
  <D.20282>:
}


mono_method_signature_checked (struct MonoMethod * m, struct MonoError * error)
{
  struct MonoMethodSignature * D.20283;
  struct MonoMethodSignature * D.20286;
  unsigned char D.20289;
  unsigned char D.20290;
  struct MonoMethod * D.20293;
  struct MonoGenericContext * D.20294;
  struct MonoClass * D.20295;
  struct MonoImage * D.20296;
  int D.20297;
  unsigned int D.20300;
  unsigned int inflated_signatures_size.81;
  unsigned int inflated_signatures_size.82;
  unsigned int D.20303;
  unsigned int D.20304;
  _Bool D.20305;
  long int D.20306;
  long int D.20307;
  int D.20310;
  struct MonoClass * D.20311;
  int D.20312;
  struct MonoTableInfo * D.20313;
  struct MonoGenericClass * D.20314;
  _Bool D.20315;
  long int D.20316;
  long int D.20317;
  int iftmp.83;
  short unsigned int D.20325;
  int D.20326;
  int D.20327;
  short unsigned int D.20329;
  int D.20330;
  int D.20331;
  int D.20334;
  struct GHashTable * D.20339;
  int D.20342;
  unsigned int D.20345;
  const char * sig_body.84;
  unsigned int D.20351;
  unsigned int signatures_size.85;
  unsigned int signatures_size.86;
  short unsigned int D.20354;
  unsigned char D.20360;
  unsigned char D.20361;
  char * D.20362;
  const char * D.20363;
  <unnamed-signed:31> D.20364;
  int D.20365;
  int D.20366;
  unsigned int D.20374;
  unsigned int D.20375;
  short unsigned int D.20383;
  int D.20384;
  int D.20385;
  unsigned char D.20386;
  <unnamed-unsigned:6> D.20387;
  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.20283 = m->signature;
  if (D.20283 != 0B) goto <D.20284>; else goto <D.20285>;
  <D.20284>:
  D.20286 = m->signature;
  return D.20286;
  <D.20285>:
  mono_loader_lock ();
  D.20283 = m->signature;
  if (D.20283 != 0B) goto <D.20287>; else goto <D.20288>;
  <D.20287>:
  mono_loader_unlock ();
  D.20286 = m->signature;
  return D.20286;
  <D.20288>:
  D.20289 = BIT_FIELD_REF <*m, 8, 264>;
  D.20290 = D.20289 & 16;
  if (D.20290 != 0) goto <D.20291>; else goto <D.20292>;
  <D.20291>:
  {
    struct MonoMethodInflated * imethod;

    imethod = m;
    D.20293 = imethod->declaring;
    signature = mono_method_signature (D.20293);
    D.20294 = mono_method_get_context (m);
    D.20293 = imethod->declaring;
    D.20295 = D.20293->klass;
    D.20296 = D.20295->image;
    signature = inflate_generic_signature_checked (D.20296, signature, D.20294, error);
    D.20297 = mono_error_ok (error);
    if (D.20297 == 0) goto <D.20298>; else goto <D.20299>;
    <D.20298>:
    mono_loader_unlock ();
    D.20286 = 0B;
    return D.20286;
    <D.20299>:
    D.20300 = mono_metadata_signature_size (signature);
    inflated_signatures_size.81 = inflated_signatures_size;
    inflated_signatures_size.82 = D.20300 + inflated_signatures_size.81;
    inflated_signatures_size = inflated_signatures_size.82;
    mono_memory_barrier ();
    m->signature = signature;
    mono_loader_unlock ();
    D.20286 = m->signature;
    return D.20286;
  }
  <D.20292>:
  D.20303 = m->token;
  D.20304 = D.20303 >> 24;
  D.20305 = D.20304 != 6;
  D.20306 = (long int) D.20305;
  D.20307 = __builtin_expect (D.20306, 0);
  if (D.20307 != 0) goto <D.20308>; else goto <D.20309>;
  <D.20308>:
  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.20309>:
  D.20303 = m->token;
  D.20310 = (int) D.20303;
  idx = D.20310 & 16777215;
  D.20311 = m->klass;
  img = D.20311->image;
  D.20312 = idx + -1;
  D.20313 = &img->tables[6];
  sig_offset = mono_metadata_decode_row_col (D.20313, D.20312, 4);
  sig = mono_metadata_blob_heap (img, sig_offset);
  D.20311 = m->klass;
  D.20314 = D.20311->generic_class;
  D.20315 = D.20314 != 0B;
  D.20316 = (long int) D.20315;
  D.20317 = __builtin_expect (D.20316, 0);
  if (D.20317 != 0) goto <D.20318>; else goto <D.20319>;
  <D.20318>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2425, "!m->klass->generic_class");
  <D.20319>:
  container = mono_method_get_generic_container (m);
  if (container == 0B) goto <D.20320>; else goto <D.20321>;
  <D.20320>:
  D.20311 = m->klass;
  container = D.20311->generic_container;
  <D.20321>:
  D.20325 = m->iflags;
  D.20326 = (int) D.20325;
  D.20327 = D.20326 & 4096;
  if (D.20327 == 0) goto <D.20328>; else goto <D.20323>;
  <D.20328>:
  D.20329 = m->flags;
  D.20330 = (int) D.20329;
  D.20331 = D.20330 & 8192;
  if (D.20331 == 0) goto <D.20332>; else goto <D.20323>;
  <D.20332>:
  if (container == 0B) goto <D.20333>; else goto <D.20323>;
  <D.20333>:
  iftmp.83 = 1;
  goto <D.20324>;
  <D.20323>:
  iftmp.83 = 0;
  <D.20324>:
  can_cache_signature = iftmp.83;
  D.20334 = mono_metadata_method_has_param_attrs (img, idx);
  if (D.20334 != 0) goto <D.20335>; else goto <D.20336>;
  <D.20335>:
  can_cache_signature = 0;
  <D.20336>:
  if (can_cache_signature != 0) goto <D.20337>; else goto <D.20338>;
  <D.20337>:
  D.20339 = img->method_signatures;
  signature = monoeg_g_hash_table_lookup (D.20339, sig);
  <D.20338>:
  if (signature == 0B) goto <D.20340>; else goto <D.20341>;
  <D.20340>:
  {
    const char * sig_body;

    try
      {
        D.20342 = mono_verifier_verify_method_signature (img, sig_offset, error);
        if (D.20342 == 0) goto <D.20343>; else goto <D.20344>;
        <D.20343>:
        mono_loader_unlock ();
        D.20286 = 0B;
        return D.20286;
        <D.20344>:
        D.20345 = mono_metadata_decode_blob_size (sig, &sig_body);
        size = (int) D.20345;
        sig_body.84 = sig_body;
        signature = mono_metadata_parse_method_signature_full (img, container, idx, sig_body.84, 0B);
        if (signature == 0B) goto <D.20347>; else goto <D.20348>;
        <D.20347>:
        mono_error_set_from_loader_error (error);
        mono_loader_unlock ();
        D.20286 = 0B;
        return D.20286;
        <D.20348>:
        if (can_cache_signature != 0) goto <D.20349>; else goto <D.20350>;
        <D.20349>:
        D.20339 = img->method_signatures;
        monoeg_g_hash_table_insert_replace (D.20339, sig, signature, 0);
        <D.20350>:
        D.20351 = mono_metadata_signature_size (signature);
        signatures_size.85 = signatures_size;
        signatures_size.86 = D.20351 + signatures_size.85;
        signatures_size = signatures_size.86;
      }
    finally
      {
        sig_body = {CLOBBER};
      }
  }
  <D.20341>:
  D.20354 = signature->generic_param_count;
  if (D.20354 != 0) goto <D.20355>; else goto <D.20356>;
  <D.20355>:
  if (container == 0B) goto <D.20357>; else goto <D.20359>;
  <D.20359>:
  D.20360 = BIT_FIELD_REF <*container, 8, 280>;
  D.20361 = D.20360 & 128;
  if (D.20361 == 0) goto <D.20357>; else goto <D.20358>;
  <D.20357>:
  mono_loader_unlock ();
  D.20362 = img->name;
  D.20363 = m->name;
  D.20311 = m->klass;
  mono_error_set_method_load (error, D.20311, D.20363, "Signature claims method has generic parameters, but generic_params table says it doesn\'t for method 0x%08x from image %s", idx, D.20362);
  D.20286 = 0B;
  return D.20286;
  <D.20358>:
  D.20364 = container->type_argc;
  D.20365 = (int) D.20364;
  D.20354 = signature->generic_param_count;
  D.20366 = (int) D.20354;
  if (D.20365 != D.20366) goto <D.20367>; else goto <D.20368>;
  <D.20367>:
  mono_loader_unlock ();
  D.20362 = img->name;
  D.20364 = container->type_argc;
  D.20365 = (int) D.20364;
  D.20354 = signature->generic_param_count;
  D.20366 = (int) D.20354;
  D.20363 = m->name;
  D.20311 = m->klass;
  mono_error_set_method_load (error, D.20311, D.20363, "Inconsistent generic parameter count.  Signature says %d, generic_params table says %d for method 0x%08x from image %s", D.20366, D.20365, idx, D.20362);
  D.20286 = 0B;
  return D.20286;
  <D.20368>:
  goto <D.20369>;
  <D.20356>:
  if (container != 0B) goto <D.20370>; else goto <D.20371>;
  <D.20370>:
  D.20360 = BIT_FIELD_REF <*container, 8, 280>;
  D.20361 = D.20360 & 128;
  if (D.20361 != 0) goto <D.20372>; else goto <D.20373>;
  <D.20372>:
  D.20374 = BIT_FIELD_REF <*container, 32, 256>;
  D.20375 = D.20374 & 2147483647;
  if (D.20375 != 0) goto <D.20376>; else goto <D.20377>;
  <D.20376>:
  mono_loader_unlock ();
  D.20362 = img->name;
  D.20363 = m->name;
  D.20311 = m->klass;
  mono_error_set_method_load (error, D.20311, D.20363, "generic_params table claims method has generic parameters, but signature says it doesn\'t for method 0x%08x from image %s", idx, D.20362);
  D.20286 = 0B;
  return D.20286;
  <D.20377>:
  <D.20373>:
  <D.20371>:
  <D.20369>:
  D.20325 = m->iflags;
  D.20326 = (int) D.20325;
  D.20327 = D.20326 & 4096;
  if (D.20327 != 0) goto <D.20378>; else goto <D.20379>;
  <D.20378>:
  signature->pinvoke = 1;
  goto <D.20380>;
  <D.20379>:
  D.20329 = m->flags;
  D.20330 = (int) D.20329;
  D.20331 = D.20330 & 8192;
  if (D.20331 != 0) goto <D.20381>; else goto <D.20382>;
  <D.20381>:
  {
    MonoCallConvention conv;
    struct MonoMethodPInvoke * piinfo;

    conv = 0;
    piinfo = m;
    signature->pinvoke = 1;
    D.20383 = piinfo->piflags;
    D.20384 = (int) D.20383;
    D.20385 = D.20384 & 1792;
    switch (D.20385) <default: <D.18681>, case 0: <D.18672>, case 10: <D.18680>, case 16: <D.18679>, case 256: <D.18673>, case 512: <D.18675>, case 768: <D.18676>, case 1024: <D.18677>, case 1280: <D.18678>>
    <D.18672>:
    <D.18673>:
    conv = 0;
    goto <D.18674>;
    <D.18675>:
    conv = 1;
    goto <D.18674>;
    <D.18676>:
    conv = 2;
    goto <D.18674>;
    <D.18677>:
    conv = 3;
    goto <D.18674>;
    <D.18678>:
    conv = 4;
    goto <D.18674>;
    <D.18679>:
    <D.18680>:
    <D.18681>:
    mono_loader_unlock ();
    D.20362 = img->name;
    D.20383 = piinfo->piflags;
    D.20384 = (int) D.20383;
    D.20363 = m->name;
    D.20311 = m->klass;
    mono_error_set_method_load (error, D.20311, D.20363, "unsupported calling convention : 0x%04x for method 0x%08x from image %s", D.20384, idx, D.20362);
    D.20286 = 0B;
    return D.20286;
    <D.18674>:
    D.20386 = (unsigned char) conv;
    D.20387 = (<unnamed-unsigned:6>) D.20386;
    signature->call_convention = D.20387;
  }
  <D.20382>:
  <D.20380>:
  mono_memory_barrier ();
  m->signature = signature;
  mono_loader_unlock ();
  D.20286 = m->signature;
  return D.20286;
}


mono_memory_barrier ()
{
  __sync_synchronize ();
}


mono_method_signature (struct MonoMethod * m)
{
  struct MonoClass * D.20393;
  const char * D.20394;
  const char * D.20395;
  struct MonoMethodSignature * D.20396;
  struct MonoError error;
  struct MonoMethodSignature * sig;

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

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


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

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


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

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


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

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


mono_method_get_header (struct MonoMethod * method)
{
  short unsigned int D.20407;
  int D.20408;
  int D.20409;
  short unsigned int D.20411;
  unsigned int D.20412;
  unsigned int D.20413;
  int D.20415;
  struct MonoMethodHeader * D.20416;
  unsigned char D.20417;
  unsigned char D.20418;
  struct MonoMethodHeader * D.20421;
  struct MonoMethod * D.20424;
  struct MonoGenericContext * D.20427;
  struct MonoMethodHeader * D.20428;
  short unsigned int D.20429;
  short unsigned int D.20430;
  struct MonoMethodHeader * D.20433;
  _Bool D.20434;
  long int D.20435;
  long int D.20436;
  unsigned int D.20439;
  unsigned int D.20440;
  _Bool D.20441;
  long int D.20442;
  long int D.20443;
  int D.20446;
  struct MonoClass * D.20447;
  int D.20448;
  struct MonoTableInfo * D.20449;
  int D.20450;
  struct MonoGenericContainer * D.20455;
  int idx;
  guint32 rva;
  struct MonoImage * img;
  void * loc;
  struct MonoMethodHeader * header;

  D.20407 = method->flags;
  D.20408 = (int) D.20407;
  D.20409 = D.20408 & 1024;
  if (D.20409 != 0) goto <D.20405>; else goto <D.20410>;
  <D.20410>:
  D.20411 = method->iflags;
  D.20412 = (unsigned int) D.20411;
  D.20413 = D.20412 & 4099;
  if (D.20413 != 0) goto <D.20405>; else goto <D.20414>;
  <D.20414>:
  D.20407 = method->flags;
  D.20408 = (int) D.20407;
  D.20415 = D.20408 & 8192;
  if (D.20415 != 0) goto <D.20405>; else goto <D.20406>;
  <D.20405>:
  D.20416 = 0B;
  return D.20416;
  <D.20406>:
  D.20417 = BIT_FIELD_REF <*method, 8, 264>;
  D.20418 = D.20417 & 16;
  if (D.20418 != 0) goto <D.20419>; else goto <D.20420>;
  <D.20419>:
  {
    struct MonoMethodInflated * imethod;
    struct MonoMethodHeader * header;

    imethod = method;
    mono_loader_lock ();
    D.20421 = imethod->header;
    if (D.20421 != 0B) goto <D.20422>; else goto <D.20423>;
    <D.20422>:
    mono_loader_unlock ();
    D.20416 = imethod->header;
    return D.20416;
    <D.20423>:
    D.20424 = imethod->declaring;
    header = mono_method_get_header (D.20424);
    if (header == 0B) goto <D.20425>; else goto <D.20426>;
    <D.20425>:
    mono_loader_unlock ();
    D.20416 = 0B;
    return D.20416;
    <D.20426>:
    D.20427 = mono_method_get_context (method);
    D.20428 = inflate_generic_header (header, D.20427);
    imethod->header = D.20428;
    mono_loader_unlock ();
    mono_metadata_free_mh (header);
    D.20416 = imethod->header;
    return D.20416;
  }
  <D.20420>:
  D.20429 = BIT_FIELD_REF <*method, 16, 256>;
  D.20430 = D.20429 & 1148;
  if (D.20430 != 0) goto <D.20431>; else goto <D.20432>;
  <D.20431>:
  {
    struct MonoMethodWrapper * mw;

    mw = method;
    D.20433 = mw->header;
    D.20434 = D.20433 == 0B;
    D.20435 = (long int) D.20434;
    D.20436 = __builtin_expect (D.20435, 0);
    if (D.20436 != 0) goto <D.20437>; else goto <D.20438>;
    <D.20437>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2599, "mw->header");
    <D.20438>:
    D.20416 = mw->header;
    return D.20416;
  }
  <D.20432>:
  D.20439 = method->token;
  D.20440 = D.20439 >> 24;
  D.20441 = D.20440 != 6;
  D.20442 = (long int) D.20441;
  D.20443 = __builtin_expect (D.20442, 0);
  if (D.20443 != 0) goto <D.20444>; else goto <D.20445>;
  <D.20444>:
  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.20445>:
  D.20439 = method->token;
  D.20446 = (int) D.20439;
  idx = D.20446 & 16777215;
  D.20447 = method->klass;
  img = D.20447->image;
  D.20448 = idx + -1;
  D.20449 = &img->tables[6];
  rva = mono_metadata_decode_row_col (D.20449, D.20448, 0);
  D.20450 = mono_verifier_verify_method_header (img, rva, 0B);
  if (D.20450 == 0) goto <D.20451>; else goto <D.20452>;
  <D.20451>:
  D.20416 = 0B;
  return D.20416;
  <D.20452>:
  loc = mono_image_rva_map (img, rva);
  if (loc == 0B) goto <D.20453>; else goto <D.20454>;
  <D.20453>:
  D.20416 = 0B;
  return D.20416;
  <D.20454>:
  D.20455 = mono_method_get_generic_container (method);
  header = mono_metadata_parse_mh_full (img, D.20455, loc);
  D.20416 = header;
  return D.20416;
}


inflate_generic_header (struct MonoMethodHeader * header, struct MonoGenericContext * context)
{
  short unsigned int D.20457;
  long unsigned int D.20458;
  long unsigned int D.20459;
  long unsigned int D.20460;
  const unsigned char * D.20461;
  unsigned int D.20462;
  <unnamed-unsigned:15> D.20463;
  <unnamed-unsigned:15> D.20464;
  <unnamed-unsigned:1> D.20465;
  struct MonoExceptionClause * D.20466;
  struct MonoType * D.20467;
  struct MonoType * D.20468;
  int D.20469;
  short unsigned int D.20470;
  short unsigned int D.20471;
  <unnamed-unsigned:15> D.20474;
  unsigned int D.20475;
  unsigned int D.20476;
  void * D.20477;
  struct MonoExceptionClause * D.20478;
  long unsigned int D.20479;
  long unsigned int D.20480;
  unsigned int D.20481;
  struct MonoClass * D.20484;
  struct MonoClass * D.20485;
  int D.20486;
  struct MonoMethodHeader * D.20487;
  struct MonoMethodHeader * res;
  int i;

  D.20457 = header->num_locals;
  D.20458 = (long unsigned int) D.20457;
  D.20459 = D.20458 + 4;
  D.20460 = D.20459 * 8;
  res = monoeg_malloc0 (D.20460);
  D.20461 = header->code;
  res->code = D.20461;
  D.20462 = header->code_size;
  res->code_size = D.20462;
  D.20463 = header->max_stack;
  res->max_stack = D.20463;
  D.20464 = header->num_clauses;
  res->num_clauses = D.20464;
  D.20465 = header->init_locals;
  res->init_locals = D.20465;
  D.20457 = header->num_locals;
  res->num_locals = D.20457;
  D.20466 = header->clauses;
  res->clauses = D.20466;
  i = 0;
  goto <D.18184>;
  <D.18183>:
  D.20467 = header->locals[i];
  D.20468 = mono_class_inflate_generic_type (D.20467, context);
  res->locals[i] = D.20468;
  i = i + 1;
  <D.18184>:
  D.20457 = header->num_locals;
  D.20469 = (int) D.20457;
  if (D.20469 > i) goto <D.18183>; else goto <D.18185>;
  <D.18185>:
  D.20470 = BIT_FIELD_REF <*res, 16, 112>;
  D.20471 = D.20470 & 32767;
  if (D.20471 != 0) goto <D.20472>; else goto <D.20473>;
  <D.20472>:
  D.20474 = res->num_clauses;
  D.20475 = (unsigned int) D.20474;
  D.20476 = D.20475 * 32;
  D.20466 = header->clauses;
  D.20477 = monoeg_g_memdup (D.20466, D.20476);
  res->clauses = D.20477;
  i = 0;
  goto <D.18189>;
  <D.18188>:
  {
    struct MonoExceptionClause * clause;

    D.20478 = res->clauses;
    D.20479 = (long unsigned int) i;
    D.20480 = D.20479 * 32;
    clause = D.20478 + D.20480;
    D.20481 = clause->flags;
    if (D.20481 != 0) goto <D.20482>; else goto <D.20483>;
    <D.20482>:
    // predicted unlikely by continue predictor.
    goto <D.18187>;
    <D.20483>:
    D.20484 = clause->data.catch_class;
    D.20485 = mono_class_inflate_generic_class (D.20484, context);
    clause->data.catch_class = D.20485;
  }
  <D.18187>:
  i = i + 1;
  <D.18189>:
  D.20464 = header->num_clauses;
  D.20486 = (int) D.20464;
  if (D.20486 > i) goto <D.18188>; else goto <D.18190>;
  <D.18190>:
  <D.20473>:
  D.20487 = res;
  return D.20487;
}


mono_method_get_flags (struct MonoMethod * method, guint32 * iflags)
{
  short unsigned int D.20491;
  unsigned int D.20492;
  uint32_t D.20493;
  short unsigned int D.20494;

  if (iflags != 0B) goto <D.20489>; else goto <D.20490>;
  <D.20489>:
  D.20491 = method->iflags;
  D.20492 = (unsigned int) D.20491;
  *iflags = D.20492;
  <D.20490>:
  D.20494 = method->flags;
  D.20493 = (uint32_t) D.20494;
  return D.20493;
}


mono_method_get_index (struct MonoMethod * method)
{
  unsigned char D.20496;
  uint32_t D.20499;
  unsigned int D.20500;
  unsigned char D.20503;
  struct MonoMethod * * D.20506;
  long unsigned int D.20507;
  long unsigned int D.20508;
  struct MonoMethod * * D.20509;
  struct MonoMethod * D.20510;
  struct MonoImage * D.20513;
  unsigned char D.20514;
  unsigned char D.20515;
  unsigned int D.20518;
  unsigned int i.87;
  unsigned int D.20520;
  unsigned int D.20521;
  unsigned int D.20522;
  struct MonoClass * klass;
  int i;

  klass = method->klass;
  D.20496 = klass->rank;
  if (D.20496 != 0) goto <D.20497>; else goto <D.20498>;
  <D.20497>:
  D.20499 = 0;
  return D.20499;
  <D.20498>:
  D.20500 = method->token;
  if (D.20500 != 0) goto <D.20501>; else goto <D.20502>;
  <D.20501>:
  D.20500 = method->token;
  D.20499 = D.20500 & 16777215;
  return D.20499;
  <D.20502>:
  mono_class_setup_methods (klass);
  D.20503 = klass->exception_type;
  if (D.20503 != 0) goto <D.20504>; else goto <D.20505>;
  <D.20504>:
  D.20499 = 0;
  return D.20499;
  <D.20505>:
  i = 0;
  goto <D.18718>;
  <D.18717>:
  D.20506 = klass->methods;
  D.20507 = (long unsigned int) i;
  D.20508 = D.20507 * 8;
  D.20509 = D.20506 + D.20508;
  D.20510 = *D.20509;
  if (D.20510 == method) goto <D.20511>; else goto <D.20512>;
  <D.20511>:
  D.20513 = klass->image;
  D.20514 = BIT_FIELD_REF <*D.20513, 8, 224>;
  D.20515 = D.20514 & 32;
  if (D.20515 != 0) goto <D.20516>; else goto <D.20517>;
  <D.20516>:
  D.20518 = klass->method.first;
  i.87 = (unsigned int) i;
  D.20520 = D.20518 + i.87;
  D.20521 = D.20520 + 1;
  D.20513 = klass->image;
  D.20499 = mono_metadata_translate_token_index (D.20513, 6, D.20521);
  return D.20499;
  <D.20517>:
  D.20518 = klass->method.first;
  i.87 = (unsigned int) i;
  D.20520 = D.20518 + i.87;
  D.20499 = D.20520 + 1;
  return D.20499;
  <D.20512>:
  i = i + 1;
  <D.18718>:
  i.87 = (unsigned int) i;
  D.20522 = klass->method.count;
  if (i.87 < D.20522) goto <D.18717>; else goto <D.18719>;
  <D.18719>:
  D.20499 = 0;
  return D.20499;
}


