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

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


mono_native_tls_alloc (pthread_key_t * key, void * destructor)
{
  int D.19254;
  void (*<Tbf>) (void *) destructor.1;
  int D.19256;
  _Bool D.19257;

  destructor.1 = (void (*<Tbf>) (void *)) destructor;
  D.19256 = pthread_key_create (key, destructor.1);
  D.19257 = D.19256 == 0;
  D.19254 = (int) D.19257;
  return D.19254;
}


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.19262;
  char * D.19263;
  char * D.19264;
  char * D.19265;

  goto <D.18873>;
  <D.18872>:
  {
    struct MonoDllMap * next;

    next = map->next;
    D.19262 = map->dll;
    monoeg_g_free (D.19262);
    D.19263 = map->target;
    monoeg_g_free (D.19263);
    D.19264 = map->func;
    monoeg_g_free (D.19264);
    D.19265 = map->target_func;
    monoeg_g_free (D.19265);
    monoeg_g_free (map);
    map = next;
  }
  <D.18873>:
  if (map != 0B) goto <D.18872>; else goto <D.18874>;
  <D.18874>:
}


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

  D.19266 = mono_loader_get_last_error ();
  if (D.19266 != 0B) goto <D.19267>; else goto <D.19268>;
  <D.19267>:
  return;
  <D.19268>:
  error = monoeg_malloc0 (56);
  error->exception_type = 8;
  D.19269 = monoeg_strdup (assembly_name);
  error->assembly_name = D.19269;
  error->ref_only = ref_only;
  if (ref_only != 0) goto <D.19270>; else goto <D.19271>;
  <D.19270>:
  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.19272>;
  <D.19271>:
  mono_trace (16, 1, "Could not load file or assembly \'%s\' or one of its dependencies.", assembly_name);
  <D.19272>:
  set_loader_error (error);
}


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

  if (str != 0B) goto <D.19274>; else goto <D.19275>;
  <D.19274>:
  D.19276 = __strdup (str);
  return D.19276;
  <D.19275>:
  D.19276 = 0B;
  return D.19276;
}


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.19279;
  int D.19280;
  _Bool D.19281;

  D.19280 = pthread_setspecific (key, value);
  D.19281 = D.19280 == 0;
  D.19279 = (int) D.19281;
  return D.19279;
}


mono_loader_set_error_type_load (const char * class_name, const char * assembly_name)
{
  struct MonoLoaderError * D.19283;
  gchar * D.19286;
  gchar * D.19287;
  struct MonoLoaderError * error;

  D.19283 = mono_loader_get_last_error ();
  if (D.19283 != 0B) goto <D.19284>; else goto <D.19285>;
  <D.19284>:
  return;
  <D.19285>:
  error = monoeg_malloc0 (56);
  error->exception_type = 7;
  D.19286 = monoeg_strdup (class_name);
  error->class_name = D.19286;
  D.19287 = monoeg_strdup (assembly_name);
  error->assembly_name = D.19287;
  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.19289;
  gchar * D.19292;
  struct MonoLoaderError * error;

  D.19289 = mono_loader_get_last_error ();
  if (D.19289 != 0B) goto <D.19290>; else goto <D.19291>;
  <D.19290>:
  return;
  <D.19291>:
  error = monoeg_malloc0 (56);
  error->exception_type = 5;
  D.19292 = monoeg_strdup (class_name);
  error->class_name = D.19292;
  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.19294;
  struct MonoLoaderError * error;

  D.19294 = mono_loader_get_last_error ();
  if (D.19294 != 0B) goto <D.19295>; else goto <D.19296>;
  <D.19295>:
  return;
  <D.19296>:
  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.19298;
  struct MonoLoaderError * error;

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


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

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


mono_loader_clear_error ()
{
  unsigned int loader_error_thread_id.7;
  char * D.19308;
  char * D.19309;
  char * D.19310;
  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.19306>; else goto <D.19307>;
  <D.19306>:
  D.19308 = ex->class_name;
  monoeg_g_free (D.19308);
  D.19309 = ex->assembly_name;
  monoeg_g_free (D.19309);
  D.19310 = ex->msg;
  monoeg_g_free (D.19310);
  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.19307>:
}


mono_loader_error_prepare_exception (struct MonoLoaderError * error)
{
  unsigned char D.19311;
  int D.19312;
  char * D.19313;
  char * D.19314;
  struct MonoDomain * D.19315;
  const char * D.19316;
  struct MonoClass * D.19317;
  int D.19321;
  struct MonoDomain * D.19325;
  struct MonoString * D.19326;
  char * D.19327;
  struct MonoException * D.19328;
  struct MonoException * ex;

  ex = 0B;
  D.19311 = error->exception_type;
  D.19312 = (int) D.19311;
  switch (D.19312) <default: <D.18508>, case 5: <D.18497>, case 6: <D.18500>, case 7: <D.18492>, case 8: <D.18503>, case 12: <D.18506>>
  <D.18492>:
  {
    char * cname;
    char * aname;
    struct MonoString * class_name;

    D.19313 = error->class_name;
    cname = monoeg_strdup (D.19313);
    D.19314 = error->assembly_name;
    aname = monoeg_strdup (D.19314);
    mono_loader_clear_error ();
    D.19315 = mono_domain_get ();
    class_name = mono_string_new (D.19315, cname);
    ex = mono_get_exception_type_load (class_name, aname);
    monoeg_g_free (cname);
    monoeg_g_free (aname);
    goto <D.18496>;
  }
  <D.18497>:
  {
    char * cname;
    char * aname;

    D.19313 = error->class_name;
    cname = monoeg_strdup (D.19313);
    D.19316 = error->member_name;
    aname = monoeg_strdup (D.19316);
    mono_loader_clear_error ();
    ex = mono_get_exception_missing_method (cname, aname);
    monoeg_g_free (cname);
    monoeg_g_free (aname);
    goto <D.18496>;
  }
  <D.18500>:
  {
    char * class_name;
    char * cmembername;

    D.19316 = error->member_name;
    cmembername = monoeg_strdup (D.19316);
    D.19317 = error->klass;
    if (D.19317 != 0B) goto <D.19318>; else goto <D.19319>;
    <D.19318>:
    D.19317 = error->klass;
    class_name = mono_type_get_full_name (D.19317);
    goto <D.19320>;
    <D.19319>:
    class_name = monoeg_strdup ("");
    <D.19320>:
    mono_loader_clear_error ();
    ex = mono_get_exception_missing_field (class_name, cmembername);
    monoeg_g_free (class_name);
    monoeg_g_free (cmembername);
    goto <D.18496>;
  }
  <D.18503>:
  {
    char * msg;
    char * filename;

    D.19321 = error->ref_only;
    if (D.19321 != 0) goto <D.19322>; else goto <D.19323>;
    <D.19322>:
    D.19314 = 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.19314);
    goto <D.19324>;
    <D.19323>:
    D.19314 = error->assembly_name;
    msg = monoeg_g_strdup_printf ("Could not load file or assembly \'%s\' or one of its dependencies.", D.19314);
    <D.19324>:
    D.19314 = error->assembly_name;
    filename = monoeg_strdup (D.19314);
    mono_loader_clear_error ();
    D.19325 = mono_domain_get ();
    D.19326 = mono_string_new (D.19325, filename);
    ex = mono_get_exception_file_not_found2 (msg, D.19326);
    monoeg_g_free (msg);
    monoeg_g_free (filename);
    goto <D.18496>;
  }
  <D.18506>:
  {
    char * msg;

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


mono_field_from_token (struct MonoImage * image, guint32 token, struct MonoClass * * retklass, struct MonoGenericContext * context)
{
  long unsigned int D.19330;
  long unsigned int D.19331;
  struct MonoClass * D.19337;
  struct MonoClass * handle_class.8;
  char * D.19339;
  gchar * D.19340;
  struct MonoClassField * D.19341;
  struct MonoClass * D.19342;
  struct GHashTable * D.19343;
  long unsigned int D.19344;
  const void * D.19345;
  struct MonoClass * D.19348;
  unsigned int D.19349;
  unsigned int D.19353;
  unsigned int D.19356;
  struct MonoGenericClass * D.19365;
  struct MonoGenericContainer * D.19368;
  void * D.19371;
  struct MonoClass * k;
  guint32 type;
  struct MonoClassField * field;

  D.19330 = BIT_FIELD_REF <*image, 64, 192>;
  D.19331 = D.19330 & 34359738368;
  if (D.19331 != 0) goto <D.19332>; else goto <D.19333>;
  <D.19332>:
  {
    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.19334>; else goto <D.19336>;
        <D.19336>:
        D.19337 = mono_defaults.fieldhandle_class;
        handle_class.8 = handle_class;
        if (D.19337 != handle_class.8) goto <D.19334>; else goto <D.19335>;
        <D.19334>:
        D.19339 = image->name;
        D.19340 = monoeg_g_strdup_printf ("Bad field token 0x%08x on image %s.", token, D.19339);
        mono_loader_set_error_bad_image (D.19340);
        D.19341 = 0B;
        return D.19341;
        <D.19335>:
        D.19342 = result->parent;
        *retklass = D.19342;
        D.19341 = result;
        return D.19341;
      }
    finally
      {
        handle_class = {CLOBBER};
      }
  }
  <D.19333>:
  mono_image_lock (image);
  D.19343 = image->field_cache;
  D.19344 = (long unsigned int) token;
  D.19345 = (const void *) D.19344;
  field = monoeg_g_hash_table_lookup (D.19343, D.19345);
  if (field != 0B) goto <D.19346>; else goto <D.19347>;
  <D.19346>:
  D.19348 = field->parent;
  *retklass = D.19348;
  mono_image_unlock (image);
  D.19341 = field;
  return D.19341;
  <D.19347>:
  mono_image_unlock (image);
  D.19349 = token >> 24;
  if (D.19349 == 10) goto <D.19350>; else goto <D.19351>;
  <D.19350>:
  field = field_from_memberref (image, token, retklass, context);
  goto <D.19352>;
  <D.19351>:
  D.19353 = token & 16777215;
  type = mono_metadata_typedef_from_field (image, D.19353);
  if (type == 0) goto <D.19354>; else goto <D.19355>;
  <D.19354>:
  D.19341 = 0B;
  return D.19341;
  <D.19355>:
  D.19356 = type | 33554432;
  k = mono_class_get (image, D.19356);
  if (k == 0B) goto <D.19357>; else goto <D.19358>;
  <D.19357>:
  D.19341 = 0B;
  return D.19341;
  <D.19358>:
  mono_class_init (k);
  if (retklass != 0B) goto <D.19359>; else goto <D.19360>;
  <D.19359>:
  *retklass = k;
  <D.19360>:
  field = mono_class_get_field (k, token);
  <D.19352>:
  mono_image_lock (image);
  if (field != 0B) goto <D.19361>; else goto <D.19362>;
  <D.19361>:
  D.19348 = field->parent;
  if (D.19348 != 0B) goto <D.19363>; else goto <D.19364>;
  <D.19363>:
  D.19348 = field->parent;
  D.19365 = D.19348->generic_class;
  if (D.19365 == 0B) goto <D.19366>; else goto <D.19367>;
  <D.19366>:
  D.19348 = field->parent;
  D.19368 = D.19348->generic_container;
  if (D.19368 == 0B) goto <D.19369>; else goto <D.19370>;
  <D.19369>:
  D.19343 = image->field_cache;
  D.19344 = (long unsigned int) token;
  D.19371 = (void *) D.19344;
  monoeg_g_hash_table_insert_replace (D.19343, D.19371, field, 0);
  <D.19370>:
  <D.19367>:
  <D.19364>:
  <D.19362>:
  mono_image_unlock (image);
  D.19341 = field;
  return D.19341;
}


field_from_memberref (struct MonoImage * image, guint32 token, struct MonoClass * * retklass, struct MonoGenericContext * context)
{
  const struct MonoTableInfo * D.19374;
  unsigned int D.19375;
  int D.19376;
  unsigned int D.19377;
  unsigned int D.19378;
  unsigned int D.19379;
  int D.19380;
  char * D.19383;
  gchar * D.19384;
  struct MonoClassField * D.19385;
  unsigned int D.19386;
  unsigned int D.19387;
  unsigned int D.19388;
  unsigned int D.19391;
  const char * D.19392;
  const char * ptr.9;
  const char * ptr.10;
  const char * ptr.11;
  const char * ptr.12;
  char D.19397;
  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.19374 = tables + 160;
      D.19375 = idx + 4294967295;
      D.19376 = (int) D.19375;
      mono_metadata_decode_row (D.19374, D.19376, &cols, 3);
      D.19377 = cols[0];
      nindex = D.19377 >> 3;
      D.19377 = cols[0];
      class = D.19377 & 7;
      D.19378 = cols[1];
      fname = mono_metadata_string_heap (image, D.19378);
      D.19379 = cols[2];
      D.19380 = mono_verifier_verify_memberref_field_signature (image, D.19379, 0B);
      if (D.19380 == 0) goto <D.19381>; else goto <D.19382>;
      <D.19381>:
      D.19383 = image->name;
      D.19384 = monoeg_g_strdup_printf ("Bad field signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, D.19383);
      mono_loader_set_error_bad_image (D.19384);
      D.19385 = 0B;
      return D.19385;
      <D.19382>:
      switch (class) <default: <D.18541>, case 0: <D.18537>, case 1: <D.18539>, case 4: <D.18540>>
      <D.18537>:
      class_table = 33554432;
      D.19386 = nindex | 33554432;
      klass = mono_class_get (image, D.19386);
      goto <D.18538>;
      <D.18539>:
      class_table = 16777216;
      D.19387 = nindex | 16777216;
      klass = mono_class_from_typeref (image, D.19387);
      goto <D.18538>;
      <D.18540>:
      class_table = 452984832;
      D.19388 = nindex | 452984832;
      klass = mono_class_get_full (image, D.19388, context);
      goto <D.18538>;
      <D.18541>:
      monoeg_g_log (0B, 16, "field load from %x", class);
      D.19385 = 0B;
      return D.19385;
      <D.18538>:
      if (klass == 0B) goto <D.19389>; else goto <D.19390>;
      <D.19389>:
      {
        char * name;

        D.19391 = class_table | nindex;
        name = mono_class_name_from_token (image, D.19391);
        D.19391 = class_table | nindex;
        monoeg_g_log (0B, 16, "Missing field %s in class %s (type token %d)", fname, name, D.19391);
        D.19392 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.19392);
        monoeg_g_free (name);
        D.19385 = 0B;
        return D.19385;
      }
      <D.19390>:
      D.19379 = cols[2];
      ptr.9 = mono_metadata_blob_heap (image, D.19379);
      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.19397 = *ptr.11;
      if (D.19397 != 6) goto <D.19398>; else goto <D.19399>;
      <D.19398>:
      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.19385 = 0B;
      return D.19385;
      <D.19399>:
      D.19379 = cols[2];
      sig_type = find_cached_memberref_sig (image, D.19379);
      if (sig_type == 0B) goto <D.19400>; else goto <D.19401>;
      <D.19400>:
      ptr.10 = ptr;
      sig_type = mono_metadata_parse_type (image, 0, 0, ptr.10, &ptr);
      if (sig_type == 0B) goto <D.19402>; else goto <D.19403>;
      <D.19402>:
      mono_loader_set_error_field_load (klass, fname);
      D.19385 = 0B;
      return D.19385;
      <D.19403>:
      D.19379 = cols[2];
      sig_type = cache_memberref_sig (image, D.19379, sig_type);
      <D.19401>:
      mono_class_init (klass);
      if (retklass != 0B) goto <D.19404>; else goto <D.19405>;
      <D.19404>:
      *retklass = klass;
      <D.19405>:
      field = mono_class_get_field_from_name_full (klass, fname, sig_type);
      if (field == 0B) goto <D.19406>; else goto <D.19407>;
      <D.19406>:
      mono_loader_set_error_field_load (klass, fname);
      <D.19407>:
      D.19385 = field;
      return D.19385;
    }
  finally
    {
      cols = {CLOBBER};
      ptr = {CLOBBER};
    }
}


find_cached_memberref_sig (struct MonoImage * image, guint32 sig_idx)
{
  struct GHashTable * D.19410;
  long unsigned int D.19411;
  const void * D.19412;
  void * D.19413;
  void * res;

  mono_loader_lock ();
  D.19410 = image->memberref_signatures;
  D.19411 = (long unsigned int) sig_idx;
  D.19412 = (const void *) D.19411;
  res = monoeg_g_hash_table_lookup (D.19410, D.19412);
  mono_loader_unlock ();
  D.19413 = res;
  return D.19413;
}


cache_memberref_sig (struct MonoImage * image, guint32 sig_idx, void * sig)
{
  struct GHashTable * D.19415;
  long unsigned int D.19416;
  const void * D.19417;
  void * D.19421;
  unsigned int memberref_sig_cache_size.13;
  unsigned int memberref_sig_cache_size.14;
  void * D.19424;
  void * prev_sig;

  mono_loader_lock ();
  D.19415 = image->memberref_signatures;
  D.19416 = (long unsigned int) sig_idx;
  D.19417 = (const void *) D.19416;
  prev_sig = monoeg_g_hash_table_lookup (D.19415, D.19417);
  if (prev_sig != 0B) goto <D.19418>; else goto <D.19419>;
  <D.19418>:
  sig = prev_sig;
  goto <D.19420>;
  <D.19419>:
  D.19415 = image->memberref_signatures;
  D.19416 = (long unsigned int) sig_idx;
  D.19421 = (void *) D.19416;
  monoeg_g_hash_table_insert_replace (D.19415, D.19421, 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.19420>:
  mono_loader_unlock ();
  D.19424 = sig;
  return D.19424;
}


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

  res = inflate_generic_signature_checked (0B, sig, context, error);
  D.19426 = mono_error_ok (error);
  if (D.19426 == 0) goto <D.19427>; else goto <D.19428>;
  <D.19427>:
  D.19429 = 0B;
  return D.19429;
  <D.19428>:
  cached = mono_metadata_get_inflated_signature (res, context);
  if (cached != res) goto <D.19430>; else goto <D.19431>;
  <D.19430>:
  mono_metadata_free_inflated_signature (res);
  <D.19431>:
  D.19429 = cached;
  return D.19429;
}


inflate_generic_signature_checked (struct MonoImage * image, struct MonoMethodSignature * sig, struct MonoGenericContext * context, struct MonoError * error)
{
  struct MonoMethodSignature * D.19435;
  short unsigned int D.19436;
  long unsigned int D.19437;
  long unsigned int D.19438;
  long unsigned int D.19439;
  struct MonoType * D.19440;
  struct MonoType * D.19441;
  int D.19442;
  struct MonoType * D.19444;
  struct MonoType * D.19445;
  struct MonoType * D.19446;
  int D.19447;
  struct MonoType * D.19451;
  int D.19452;
  <unnamed-unsigned:1> D.19453;
  <unnamed-unsigned:1> D.19454;
  <unnamed-unsigned:6> D.19455;
  <unnamed-unsigned:1> D.19456;
  short unsigned int D.19457;
  short int D.19458;
  unsigned char D.19459;
  <unnamed-unsigned:1> D.19460;
  struct MonoMethodSignature * res;
  gboolean is_open;
  int i;
  void fail = <<< error >>>;

  mono_error_init (error);
  if (context == 0B) goto <D.19433>; else goto <D.19434>;
  <D.19433>:
  D.19435 = sig;
  return D.19435;
  <D.19434>:
  D.19436 = sig->param_count;
  D.19437 = (long unsigned int) D.19436;
  D.19438 = D.19437 + 2;
  D.19439 = D.19438 * 8;
  res = monoeg_malloc0 (D.19439);
  D.19436 = sig->param_count;
  res->param_count = D.19436;
  res->sentinelpos = -1;
  D.19440 = sig->ret;
  D.19441 = mono_class_inflate_generic_type_checked (D.19440, context, error);
  res->ret = D.19441;
  D.19442 = mono_error_ok (error);
  if (D.19442 == 0) goto fail; else goto <D.19443>;
  <D.19443>:
  D.19444 = res->ret;
  is_open = mono_class_is_open_constructed_type (D.19444);
  i = 0;
  goto <D.18695>;
  <D.18694>:
  D.19445 = sig->params[i];
  D.19446 = mono_class_inflate_generic_type_checked (D.19445, context, error);
  res->params[i] = D.19446;
  D.19447 = mono_error_ok (error);
  if (D.19447 == 0) goto fail; else goto <D.19448>;
  <D.19448>:
  if (is_open == 0) goto <D.19449>; else goto <D.19450>;
  <D.19449>:
  D.19451 = res->params[i];
  is_open = mono_class_is_open_constructed_type (D.19451);
  <D.19450>:
  i = i + 1;
  <D.18695>:
  D.19436 = sig->param_count;
  D.19452 = (int) D.19436;
  if (D.19452 > i) goto <D.18694>; else goto <D.18696>;
  <D.18696>:
  D.19453 = sig->hasthis;
  res->hasthis = D.19453;
  D.19454 = sig->explicit_this;
  res->explicit_this = D.19454;
  D.19455 = sig->call_convention;
  res->call_convention = D.19455;
  D.19456 = sig->pinvoke;
  res->pinvoke = D.19456;
  D.19457 = sig->generic_param_count;
  res->generic_param_count = D.19457;
  D.19458 = sig->sentinelpos;
  res->sentinelpos = D.19458;
  D.19459 = (unsigned char) is_open;
  D.19460 = (<unnamed-unsigned:1>) D.19459;
  res->has_type_parameters = D.19460;
  res->is_inflated = 1;
  D.19435 = res;
  return D.19435;
  fail:
  D.19444 = res->ret;
  if (D.19444 != 0B) goto <D.19461>; else goto <D.19462>;
  <D.19461>:
  D.19444 = res->ret;
  mono_metadata_free_type (D.19444);
  <D.19462>:
  i = 0;
  goto <D.18698>;
  <D.18697>:
  D.19451 = res->params[i];
  if (D.19451 != 0B) goto <D.19463>; else goto <D.19464>;
  <D.19463>:
  D.19451 = res->params[i];
  mono_metadata_free_type (D.19451);
  <D.19464>:
  i = i + 1;
  <D.18698>:
  D.19436 = sig->param_count;
  D.19452 = (int) D.19436;
  if (D.19452 > i) goto <D.18697>; else goto <D.18699>;
  <D.18699>:
  monoeg_g_free (res);
  D.19435 = 0B;
  return D.19435;
}


mono_method_get_signature_full (struct MonoMethod * method, struct MonoImage * image, guint32 token, struct MonoGenericContext * context)
{
  unsigned int D.19466;
  int token.15;
  struct MonoMethodSignature * D.19471;
  short unsigned int D.19476;
  int D.19477;
  int D.19478;
  long unsigned int D.19480;
  long unsigned int D.19481;
  struct MonoClass * D.19482;
  struct MonoGenericClass * D.19483;
  long unsigned int D.19486;
  long unsigned int D.19487;
  struct MonoTableInfo * D.19491;
  int D.19492;
  unsigned int D.19493;
  unsigned int sig_idx.16;
  int D.19497;
  unsigned int D.19500;
  unsigned int D.19501;
  char * D.19502;
  gchar * D.19503;
  unsigned int sig_idx.17;
  const char * ptr.18;
  const char * ptr.19;
  int D.19509;
  gchar * D.19512;
  int D.19515;
  const char * D.19518;
  gchar * D.19519;
  unsigned int D.19523;
  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.19466 = token >> 24;
      table = (int) D.19466;
      token.15 = (int) token;
      idx = token.15 & 16777215;
      if (table == 0) goto <D.19468>; else goto <D.19470>;
      <D.19470>:
      if (table == 6) goto <D.19468>; else goto <D.19469>;
      <D.19468>:
      D.19471 = mono_method_signature (method);
      return D.19471;
      <D.19469>:
      if (table == 43) goto <D.19472>; else goto <D.19473>;
      <D.19472>:
      D.19476 = method->flags;
      D.19477 = (int) D.19476;
      D.19478 = D.19477 & 8192;
      if (D.19478 != 0) goto <D.19474>; else goto <D.19479>;
      <D.19479>:
      D.19480 = BIT_FIELD_REF <*method, 64, 256>;
      D.19481 = D.19480 & 4096;
      if (D.19481 == 0) goto <D.19474>; else goto <D.19475>;
      <D.19474>:
      D.19471 = 0B;
      return D.19471;
      <D.19475>:
      D.19471 = mono_method_signature (method);
      return D.19471;
      <D.19473>:
      D.19482 = method->klass;
      D.19483 = D.19482->generic_class;
      if (D.19483 != 0B) goto <D.19484>; else goto <D.19485>;
      <D.19484>:
      D.19471 = mono_method_signature (method);
      return D.19471;
      <D.19485>:
      D.19486 = BIT_FIELD_REF <*image, 64, 192>;
      D.19487 = D.19486 & 34359738368;
      if (D.19487 != 0) goto <D.19488>; else goto <D.19489>;
      <D.19488>:
      sig = mono_reflection_lookup_signature (image, method, token);
      goto <D.19490>;
      <D.19489>:
      D.19491 = &image->tables[10];
      D.19492 = idx + -1;
      mono_metadata_decode_row (D.19491, D.19492, &cols, 3);
      D.19493 = cols[2];
      sig_idx = (int) D.19493;
      sig_idx.16 = (unsigned int) sig_idx;
      sig = find_cached_memberref_sig (image, sig_idx.16);
      if (sig == 0B) goto <D.19495>; else goto <D.19496>;
      <D.19495>:
      sig_idx.16 = (unsigned int) sig_idx;
      D.19497 = mono_verifier_verify_memberref_method_signature (image, sig_idx.16, 0B);
      if (D.19497 == 0) goto <D.19498>; else goto <D.19499>;
      <D.19498>:
      {
        guint32 class;
        const char * fname;

        D.19500 = cols[0];
        class = D.19500 & 7;
        D.19501 = cols[1];
        fname = mono_metadata_string_heap (image, D.19501);
        D.19502 = image->name;
        D.19503 = monoeg_g_strdup_printf ("Bad method signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, D.19502);
        mono_loader_set_error_bad_image (D.19503);
        D.19471 = 0B;
        return D.19471;
      }
      <D.19499>:
      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.19507>; else goto <D.19508>;
      <D.19507>:
      D.19471 = 0B;
      return D.19471;
      <D.19508>:
      sig_idx.16 = (unsigned int) sig_idx;
      sig = cache_memberref_sig (image, sig_idx.16, sig);
      <D.19496>:
      D.19509 = mono_verifier_is_sig_compatible (image, method, sig);
      if (D.19509 == 0) goto <D.19510>; else goto <D.19511>;
      <D.19510>:
      {
        guint32 class;
        const char * fname;

        D.19500 = cols[0];
        class = D.19500 & 7;
        D.19501 = cols[1];
        fname = mono_metadata_string_heap (image, D.19501);
        D.19502 = image->name;
        D.19512 = monoeg_g_strdup_printf ("Incompatible method signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, D.19502);
        mono_loader_set_error_bad_image (D.19512);
        D.19471 = 0B;
        return D.19471;
      }
      <D.19511>:
      <D.19490>:
      if (context != 0B) goto <D.19513>; else goto <D.19514>;
      <D.19513>:
      {
        struct MonoError error;
        struct MonoMethodSignature * cached;

        try
          {
            sig = inflate_generic_signature_checked (image, sig, context, &error);
            D.19515 = mono_error_ok (&error);
            if (D.19515 == 0) goto <D.19516>; else goto <D.19517>;
            <D.19516>:
            D.19518 = mono_error_get_message (&error);
            D.19519 = monoeg_g_strdup_printf ("Could not inflate signature %s", D.19518);
            mono_loader_set_error_bad_image (D.19519);
            mono_error_cleanup (&error);
            D.19471 = 0B;
            return D.19471;
            <D.19517>:
            cached = mono_metadata_get_inflated_signature (sig, context);
            if (cached != sig) goto <D.19520>; else goto <D.19521>;
            <D.19520>:
            mono_metadata_free_inflated_signature (sig);
            goto <D.19522>;
            <D.19521>:
            D.19523 = mono_metadata_signature_size (cached);
            inflated_signatures_size.20 = inflated_signatures_size;
            inflated_signatures_size.21 = D.19523 + inflated_signatures_size.20;
            inflated_signatures_size = inflated_signatures_size.21;
            <D.19522>:
            sig = cached;
          }
        finally
          {
            error = {CLOBBER};
          }
      }
      <D.19514>:
      D.19471 = sig;
      return D.19471;
    }
  finally
    {
      cols = {CLOBBER};
      ptr = {CLOBBER};
    }
}


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

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


mono_method_search_in_array_class (struct MonoClass * klass, const char * name, struct MonoMethodSignature * sig)
{
  unsigned char D.19532;
  _Bool D.19533;
  long int D.19534;
  long int D.19535;
  struct MonoMethod * * D.19538;
  long unsigned int D.19539;
  long unsigned int D.19540;
  struct MonoMethod * * D.19541;
  int D.18759;
  const char * D.19542;
  short unsigned int D.19545;
  struct MonoMethodSignature * D.19546;
  short unsigned int D.19547;
  struct MonoMethod * D.19550;
  unsigned int i.22;
  unsigned int D.19552;
  int i;

  mono_class_setup_methods (klass);
  D.19532 = klass->exception_type;
  D.19533 = D.19532 != 0;
  D.19534 = (long int) D.19533;
  D.19535 = __builtin_expect (D.19534, 0);
  if (D.19535 != 0) goto <D.19536>; else goto <D.19537>;
  <D.19536>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 932, "!klass->exception_type");
  <D.19537>:
  i = 0;
  goto <D.18761>;
  <D.18760>:
  {
    struct MonoMethod * method;

    D.19538 = klass->methods;
    D.19539 = (long unsigned int) i;
    D.19540 = D.19539 * 8;
    D.19541 = D.19538 + D.19540;
    method = *D.19541;
    {
      size_t __s1_len;
      size_t __s2_len;

      D.19542 = method->name;
      D.18759 = __builtin_strcmp (D.19542, name);
    }
    if (D.18759 == 0) goto <D.19543>; else goto <D.19544>;
    <D.19543>:
    D.19545 = sig->param_count;
    D.19546 = method->signature;
    D.19547 = D.19546->param_count;
    if (D.19545 == D.19547) goto <D.19548>; else goto <D.19549>;
    <D.19548>:
    D.19550 = method;
    return D.19550;
    <D.19549>:
    <D.19544>:
  }
  i = i + 1;
  <D.18761>:
  i.22 = (unsigned int) i;
  D.19552 = klass->method.count;
  if (i.22 < D.19552) goto <D.18760>; else goto <D.18762>;
  <D.18762>:
  D.19550 = 0B;
  return D.19550;
}


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

  mono_loader_init ();
  mono_loader_lock ();
  if (assembly == 0B) goto <D.19554>; else goto <D.19555>;
  <D.19554>:
  entry = monoeg_malloc0 (40);
  if (dll != 0B) goto <D.19557>; else goto <D.19558>;
  <D.19557>:
  iftmp.23 = monoeg_strdup (dll);
  goto <D.19559>;
  <D.19558>:
  iftmp.23 = 0B;
  <D.19559>:
  entry->dll = iftmp.23;
  if (tdll != 0B) goto <D.19561>; else goto <D.19562>;
  <D.19561>:
  iftmp.24 = monoeg_strdup (tdll);
  goto <D.19563>;
  <D.19562>:
  iftmp.24 = 0B;
  <D.19563>:
  entry->target = iftmp.24;
  if (func != 0B) goto <D.19565>; else goto <D.19566>;
  <D.19565>:
  iftmp.25 = monoeg_strdup (func);
  goto <D.19567>;
  <D.19566>:
  iftmp.25 = 0B;
  <D.19567>:
  entry->func = iftmp.25;
  if (tfunc != 0B) goto <D.19569>; else goto <D.19570>;
  <D.19569>:
  iftmp.26 = monoeg_strdup (tfunc);
  goto <D.19571>;
  <D.19570>:
  iftmp.26 = 0B;
  <D.19571>:
  entry->target_func = iftmp.26;
  global_dll_map.27 = global_dll_map;
  entry->next = global_dll_map.27;
  global_dll_map = entry;
  goto <D.19573>;
  <D.19555>:
  entry = mono_image_alloc0 (assembly, 40);
  if (dll != 0B) goto <D.19575>; else goto <D.19576>;
  <D.19575>:
  iftmp.28 = mono_image_strdup (assembly, dll);
  goto <D.19577>;
  <D.19576>:
  iftmp.28 = 0B;
  <D.19577>:
  entry->dll = iftmp.28;
  if (tdll != 0B) goto <D.19579>; else goto <D.19580>;
  <D.19579>:
  iftmp.29 = mono_image_strdup (assembly, tdll);
  goto <D.19581>;
  <D.19580>:
  iftmp.29 = 0B;
  <D.19581>:
  entry->target = iftmp.29;
  if (func != 0B) goto <D.19583>; else goto <D.19584>;
  <D.19583>:
  iftmp.30 = mono_image_strdup (assembly, func);
  goto <D.19585>;
  <D.19584>:
  iftmp.30 = 0B;
  <D.19585>:
  entry->func = iftmp.30;
  if (tfunc != 0B) goto <D.19587>; else goto <D.19588>;
  <D.19587>:
  iftmp.31 = mono_image_strdup (assembly, tfunc);
  goto <D.19589>;
  <D.19588>:
  iftmp.31 = 0B;
  <D.19589>:
  entry->target_func = iftmp.31;
  D.19590 = assembly->dll_map;
  entry->next = D.19590;
  assembly->dll_map = entry;
  <D.19573>:
  mono_loader_unlock ();
}


mono_lookup_pinvoke_call (struct MonoMethod * method, const char * * exc_class, const char * * exc_arg)
{
  struct MonoClass * D.19591;
  short unsigned int D.19592;
  int D.19593;
  int D.19594;
  _Bool D.19595;
  long int D.19596;
  long int D.19597;
  void * D.19602;
  void * D.19605;
  struct MonoImage * D.19606;
  long unsigned int D.19607;
  long unsigned int D.19608;
  struct GHashTable * D.19611;
  char * import.32;
  short unsigned int D.19618;
  int D.19620;
  <unnamed-unsigned:24> D.19621;
  int D.19622;
  int D.19623;
  unsigned int D.19626;
  <unnamed-unsigned:24> D.19628;
  unsigned int D.19629;
  unsigned int D.19630;
  short unsigned int D.19631;
  unsigned int D.19632;
  const char * import.33;
  unsigned int D.19634;
  int D.19635;
  const char * import.34;
  struct GHashTable * D.19639;
  struct GHashTable * D.19642;
  struct GHashTable * D.19643;
  const char * new_scope.35;
  struct GHashTable * D.19645;
  int D.18920;
  int iftmp.36;
  int D.18919;
  const char[11] * D.19655;
  unsigned char D.19656;
  int D.19657;
  unsigned char D.19658;
  int D.19659;
  const unsigned char * D.19664;
  unsigned char D.19665;
  int D.19666;
  const unsigned char * D.19667;
  unsigned char D.19668;
  int D.19669;
  const unsigned char * D.19674;
  unsigned char D.19675;
  int D.19676;
  const unsigned char * D.19677;
  unsigned char D.19678;
  int D.19679;
  const unsigned char * D.19684;
  unsigned char D.19685;
  int D.19686;
  const unsigned char * D.19687;
  unsigned char D.19688;
  int D.19689;
  struct MonoDl * internal_module.37;
  struct MonoDl * internal_module.38;
  char * D.19697;
  long unsigned int D.19698;
  sizetype D.19699;
  const char * D.19700;
  long unsigned int D.19703;
  sizetype D.19704;
  char * D.19705;
  char * D.19709;
  char * D.19713;
  int D.19719;
  int D.19721;
  int D.19723;
  int D.19725;
  char * error_msg.39;
  char * D.19744;
  char * iftmp.40;
  void * D.19773;
  gchar * D.19776;
  gchar * D.19777;
  gchar * D.19778;
  short unsigned int D.19779;
  int D.19780;
  int D.19781;
  void * * D.19784;
  char * error_msg.41;
  int D.19789;
  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.19591 = method->klass;
      image = D.19591->image;
      piinfo = method;
      tables = &image->tables;
      im = tables + 448;
      mr = tables + 416;
      import = 0B;
      found_name = 0B;
      module = 0B;
      cached = 0;
      D.19592 = method->flags;
      D.19593 = (int) D.19592;
      D.19594 = D.19593 & 8192;
      D.19595 = D.19594 == 0;
      D.19596 = (long int) D.19595;
      D.19597 = __builtin_expect (D.19596, 0);
      if (D.19597 != 0) goto <D.19598>; else goto <D.19599>;
      <D.19598>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1344, "method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL");
      <D.19599>:
      if (exc_class != 0B) goto <D.19600>; else goto <D.19601>;
      <D.19600>:
      *exc_class = 0B;
      *exc_arg = 0B;
      <D.19601>:
      D.19602 = piinfo->addr;
      if (D.19602 != 0B) goto <D.19603>; else goto <D.19604>;
      <D.19603>:
      D.19605 = piinfo->addr;
      return D.19605;
      <D.19604>:
      D.19591 = method->klass;
      D.19606 = D.19591->image;
      D.19607 = BIT_FIELD_REF <*D.19606, 64, 192>;
      D.19608 = D.19607 & 34359738368;
      if (D.19608 != 0) goto <D.19609>; else goto <D.19610>;
      <D.19609>:
      {
        struct MonoReflectionMethodAux * method_aux;

        D.19591 = method->klass;
        D.19606 = D.19591->image;
        D.19611 = MEM[(struct MonoDynamicImage *)D.19606].method_aux_hash;
        method_aux = monoeg_g_hash_table_lookup (D.19611, method);
        if (method_aux == 0B) goto <D.19612>; else goto <D.19613>;
        <D.19612>:
        D.19605 = 0B;
        return D.19605;
        <D.19613>:
        import.32 = method_aux->dllentry;
        import = import.32;
        orig_scope = method_aux->dll;
      }
      goto <D.19615>;
      <D.19610>:
      D.19618 = piinfo->implmap_idx;
      if (D.19618 == 0) goto <D.19616>; else goto <D.19619>;
      <D.19619>:
      D.19618 = piinfo->implmap_idx;
      D.19620 = (int) D.19618;
      D.19621 = im->rows;
      D.19622 = (int) D.19621;
      if (D.19620 > D.19622) goto <D.19616>; else goto <D.19617>;
      <D.19616>:
      D.19605 = 0B;
      return D.19605;
      <D.19617>:
      D.19618 = piinfo->implmap_idx;
      D.19620 = (int) D.19618;
      D.19623 = D.19620 + -1;
      mono_metadata_decode_row (im, D.19623, &im_cols, 4);
      D.19626 = im_cols[3];
      if (D.19626 == 0) goto <D.19624>; else goto <D.19627>;
      <D.19627>:
      D.19626 = im_cols[3];
      D.19628 = mr->rows;
      D.19629 = (unsigned int) D.19628;
      if (D.19626 > D.19629) goto <D.19624>; else goto <D.19625>;
      <D.19624>:
      D.19605 = 0B;
      return D.19605;
      <D.19625>:
      D.19630 = im_cols[0];
      D.19631 = (short unsigned int) D.19630;
      piinfo->piflags = D.19631;
      D.19632 = im_cols[2];
      import.33 = mono_metadata_string_heap (image, D.19632);
      import = import.33;
      D.19626 = im_cols[3];
      D.19634 = D.19626 + 4294967295;
      D.19635 = (int) D.19634;
      scope_token = mono_metadata_decode_row_col (mr, D.19635, 0);
      orig_scope = mono_metadata_string_heap (image, scope_token);
      <D.19615>:
      import.34 = import;
      mono_dllmap_lookup (image, orig_scope, import.34, &new_scope, &import);
      if (module == 0B) goto <D.19637>; else goto <D.19638>;
      <D.19637>:
      mono_loader_lock ();
      D.19639 = image->pinvoke_scopes;
      if (D.19639 == 0B) goto <D.19640>; else goto <D.19641>;
      <D.19640>:
      D.19642 = monoeg_g_hash_table_new_full (monoeg_g_str_hash, monoeg_g_str_equal, monoeg_g_free, 0B);
      image->pinvoke_scopes = D.19642;
      D.19643 = 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.19643;
      <D.19641>:
      D.19639 = image->pinvoke_scopes;
      new_scope.35 = new_scope;
      module = monoeg_g_hash_table_lookup (D.19639, new_scope.35);
      D.19645 = image->pinvoke_scope_filenames;
      new_scope.35 = new_scope;
      found_name = monoeg_g_hash_table_lookup (D.19645, new_scope.35);
      mono_loader_unlock ();
      if (module != 0B) goto <D.19646>; else goto <D.19647>;
      <D.19646>:
      cached = 1;
      <D.19647>:
      if (found_name != 0B) goto <D.19648>; else goto <D.19649>;
      <D.19648>:
      found_name = monoeg_strdup (found_name);
      <D.19649>:
      <D.19638>:
      if (module == 0B) goto <D.19650>; else goto <D.19651>;
      <D.19650>:
      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.19653>; else goto <D.19654>;
        <D.19653>:
        {
          const unsigned char * __s2;
          int __result;

          __s2 = new_scope;
          D.19655 = "__Internal";
          D.19656 = MEM[(const unsigned char *)D.19655];
          D.19657 = (int) D.19656;
          D.19658 = *__s2;
          D.19659 = (int) D.19658;
          __result = D.19657 - D.19659;
          {
            if (__s2_len != 0) goto <D.19660>; else goto <D.19661>;
            <D.19660>:
            if (__result == 0) goto <D.19662>; else goto <D.19663>;
            <D.19662>:
            D.19664 = &MEM[(void *)"__Internal" + 1B];
            D.19665 = *D.19664;
            D.19666 = (int) D.19665;
            D.19667 = __s2 + 1;
            D.19668 = *D.19667;
            D.19669 = (int) D.19668;
            __result = D.19666 - D.19669;
            if (__s2_len > 1) goto <D.19670>; else goto <D.19671>;
            <D.19670>:
            if (__result == 0) goto <D.19672>; else goto <D.19673>;
            <D.19672>:
            D.19674 = &MEM[(void *)"__Internal" + 2B];
            D.19675 = *D.19674;
            D.19676 = (int) D.19675;
            D.19677 = __s2 + 2;
            D.19678 = *D.19677;
            D.19679 = (int) D.19678;
            __result = D.19676 - D.19679;
            if (__s2_len > 2) goto <D.19680>; else goto <D.19681>;
            <D.19680>:
            if (__result == 0) goto <D.19682>; else goto <D.19683>;
            <D.19682>:
            D.19684 = &MEM[(void *)"__Internal" + 3B];
            D.19685 = *D.19684;
            D.19686 = (int) D.19685;
            D.19687 = __s2 + 3;
            D.19688 = *D.19687;
            D.19689 = (int) D.19688;
            __result = D.19686 - D.19689;
            <D.19683>:
            <D.19681>:
            <D.19673>:
            <D.19671>:
            <D.19663>:
            <D.19661>:
          }
          D.18919 = __result;
        }
        iftmp.36 = -D.18919;
        goto <D.19690>;
        <D.19654>:
        new_scope.35 = new_scope;
        iftmp.36 = __builtin_strcmp (new_scope.35, "__Internal");
        <D.19690>:
        D.18920 = iftmp.36;
      }
      if (D.18920 == 0) goto <D.19691>; else goto <D.19692>;
      <D.19691>:
      internal_module.37 = internal_module;
      if (internal_module.37 == 0B) goto <D.19694>; else goto <D.19695>;
      <D.19694>:
      internal_module.38 = mono_dl_open (0B, 1, &error_msg);
      internal_module = internal_module.38;
      <D.19695>:
      module = internal_module;
      <D.19692>:
      <D.19651>:
      i = 0;
      goto <D.18943>;
      <D.18942>:
      {
        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.18930>, case 0: <D.18924>, case 1: <D.18926>, case 2: <D.18928>>
        <D.18924>:
        new_scope.35 = new_scope;
        file_name = monoeg_strdup (new_scope.35);
        goto <D.18925>;
        <D.18926>:
        new_scope.35 = new_scope;
        D.19697 = strstr (new_scope.35, ".dll");
        new_scope.35 = new_scope;
        new_scope.35 = new_scope;
        D.19698 = strlen (new_scope.35);
        D.19699 = D.19698 + 18446744073709551612;
        D.19700 = new_scope.35 + D.19699;
        if (D.19697 == D.19700) goto <D.19701>; else goto <D.19702>;
        <D.19701>:
        new_scope.35 = new_scope;
        file_name = monoeg_strdup (new_scope.35);
        new_scope.35 = new_scope;
        D.19703 = strlen (new_scope.35);
        D.19704 = D.19703 + 18446744073709551612;
        D.19705 = file_name + D.19704;
        *D.19705 = 0;
        goto <D.19706>;
        <D.19702>:
        // predicted unlikely by continue predictor.
        goto <D.18927>;
        <D.19706>:
        goto <D.18925>;
        <D.18928>:
        if (is_absolute != 0) goto <D.19707>; else goto <D.19708>;
        <D.19707>:
        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.19709 = strstr (base_name, "lib");
        if (D.19709 != base_name) goto <D.19710>; else goto <D.19711>;
        <D.19710>:
        {
          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.18925>;
        }
        <D.19711>:
        goto <D.19712>;
        <D.19708>:
        new_scope.35 = new_scope;
        D.19713 = strstr (new_scope.35, "lib");
        new_scope.35 = new_scope;
        if (D.19713 != new_scope.35) goto <D.19714>; else goto <D.19715>;
        <D.19714>:
        new_scope.35 = new_scope;
        file_name = monoeg_g_strdup_printf ("lib%s", new_scope.35);
        goto <D.18925>;
        <D.19715>:
        <D.19712>:
        // predicted unlikely by continue predictor.
        goto <D.18927>;
        <D.18930>:
        new_scope.35 = new_scope;
        D.19719 = monoeg_ascii_strcasecmp ("user32.dll", new_scope.35);
        if (D.19719 == 0) goto <D.19716>; else goto <D.19720>;
        <D.19720>:
        new_scope.35 = new_scope;
        D.19721 = monoeg_ascii_strcasecmp ("kernel32.dll", new_scope.35);
        if (D.19721 == 0) goto <D.19716>; else goto <D.19722>;
        <D.19722>:
        new_scope.35 = new_scope;
        D.19723 = monoeg_ascii_strcasecmp ("user32", new_scope.35);
        if (D.19723 == 0) goto <D.19716>; else goto <D.19724>;
        <D.19724>:
        new_scope.35 = new_scope;
        D.19725 = monoeg_ascii_strcasecmp ("kernel", new_scope.35);
        if (D.19725 == 0) goto <D.19716>; else goto <D.19717>;
        <D.19716>:
        file_name = monoeg_strdup ("libMonoSupportW.so");
        goto <D.19718>;
        <D.19717>:
        // predicted unlikely by continue predictor.
        goto <D.18927>;
        <D.19718>:
        goto <D.18925>;
        <D.18925>:
        if (is_absolute != 0) goto <D.19726>; else goto <D.19727>;
        <D.19726>:
        if (dir_name == 0B) goto <D.19728>; else goto <D.19729>;
        <D.19728>:
        dir_name = monoeg_g_path_get_dirname (file_name);
        <D.19729>:
        if (base_name == 0B) goto <D.19730>; else goto <D.19731>;
        <D.19730>:
        base_name = monoeg_g_path_get_basename (file_name);
        <D.19731>:
        <D.19727>:
        if (module == 0B) goto <D.19732>; else goto <D.19733>;
        <D.19732>:
        if (is_absolute != 0) goto <D.19734>; else goto <D.19735>;
        <D.19734>:
        module = cached_module_load (file_name, 1, &error_msg);
        if (module == 0B) goto <D.19736>; else goto <D.19737>;
        <D.19736>:
        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.19739>;
        <D.19737>:
        found_name = monoeg_strdup (file_name);
        <D.19739>:
        <D.19735>:
        <D.19733>:
        if (module == 0B) goto <D.19740>; else goto <D.19741>;
        <D.19740>:
        if (is_absolute == 0) goto <D.19742>; else goto <D.19743>;
        <D.19742>:
        {
          void * iter;
          char * mdirname;

          try
            {
              iter = 0B;
              D.19744 = image->name;
              mdirname = monoeg_g_path_get_dirname (D.19744);
              goto <D.18935>;
              <D.18934>:
              module = cached_module_load (full_name, 1, &error_msg);
              if (module == 0B) goto <D.19745>; else goto <D.19746>;
              <D.19745>:
              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.19747>;
              <D.19746>:
              found_name = monoeg_strdup (full_name);
              <D.19747>:
              monoeg_g_free (full_name);
              if (module != 0B) goto <D.18933>; else goto <D.19748>;
              <D.19748>:
              <D.18935>:
              full_name = mono_dl_build_path (mdirname, file_name, &iter);
              if (full_name != 0B) goto <D.18934>; else goto <D.18933>;
              <D.18933>:
              monoeg_g_free (mdirname);
            }
          finally
            {
              iter = {CLOBBER};
            }
        }
        <D.19743>:
        <D.19741>:
        if (module == 0B) goto <D.19749>; else goto <D.19750>;
        <D.19749>:
        {
          void * iter;
          char * file_or_base;

          try
            {
              iter = 0B;
              if (is_absolute != 0) goto <D.19752>; else goto <D.19753>;
              <D.19752>:
              iftmp.40 = base_name;
              goto <D.19754>;
              <D.19753>:
              iftmp.40 = file_name;
              <D.19754>:
              file_or_base = iftmp.40;
              goto <D.18940>;
              <D.18939>:
              module = cached_module_load (full_name, 1, &error_msg);
              if (module == 0B) goto <D.19755>; else goto <D.19756>;
              <D.19755>:
              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.19757>;
              <D.19756>:
              found_name = monoeg_strdup (full_name);
              <D.19757>:
              monoeg_g_free (full_name);
              if (module != 0B) goto <D.18938>; else goto <D.19758>;
              <D.19758>:
              <D.18940>:
              full_name = mono_dl_build_path (dir_name, file_or_base, &iter);
              if (full_name != 0B) goto <D.18939>; else goto <D.18938>;
              <D.18938>:
            }
          finally
            {
              iter = {CLOBBER};
            }
        }
        <D.19750>:
        if (module == 0B) goto <D.19759>; else goto <D.19760>;
        <D.19759>:
        module = cached_module_load (file_name, 1, &error_msg);
        if (module == 0B) goto <D.19761>; else goto <D.19762>;
        <D.19761>:
        error_msg.39 = error_msg;
        mono_trace (64, 4, "DllImport error loading library \'%s\': \'%s\'.", file_name, error_msg.39);
        goto <D.19763>;
        <D.19762>:
        found_name = monoeg_strdup (file_name);
        <D.19763>:
        <D.19760>:
        monoeg_g_free (file_name);
        if (is_absolute != 0) goto <D.19764>; else goto <D.19765>;
        <D.19764>:
        monoeg_g_free (base_name);
        monoeg_g_free (dir_name);
        <D.19765>:
        if (module != 0B) goto <D.18941>; else goto <D.19766>;
        <D.19766>:
      }
      <D.18927>:
      i = i + 1;
      <D.18943>:
      if (i <= 3) goto <D.18942>; else goto <D.18941>;
      <D.18941>:
      if (module == 0B) goto <D.19767>; else goto <D.19768>;
      <D.19767>:
      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.19769>; else goto <D.19770>;
      <D.19769>:
      *exc_class = "DllNotFoundException";
      new_scope.35 = new_scope;
      *exc_arg = new_scope.35;
      <D.19770>:
      D.19605 = 0B;
      return D.19605;
      <D.19768>:
      if (cached == 0) goto <D.19771>; else goto <D.19772>;
      <D.19771>:
      mono_trace (64, 4, "DllImport loaded library \'%s\'.", found_name);
      mono_loader_lock ();
      D.19639 = image->pinvoke_scopes;
      new_scope.35 = new_scope;
      D.19773 = monoeg_g_hash_table_lookup (D.19639, new_scope.35);
      if (D.19773 == 0B) goto <D.19774>; else goto <D.19775>;
      <D.19774>:
      D.19639 = image->pinvoke_scopes;
      new_scope.35 = new_scope;
      D.19776 = monoeg_strdup (new_scope.35);
      monoeg_g_hash_table_insert_replace (D.19639, D.19776, module, 0);
      D.19645 = image->pinvoke_scope_filenames;
      new_scope.35 = new_scope;
      D.19777 = monoeg_strdup (new_scope.35);
      D.19778 = monoeg_strdup (found_name);
      monoeg_g_hash_table_insert_replace (D.19645, D.19777, D.19778, 0);
      <D.19775>:
      mono_loader_unlock ();
      <D.19772>:
      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.19779 = piinfo->piflags;
      D.19780 = (int) D.19779;
      D.19781 = D.19780 & 1;
      if (D.19781 != 0) goto <D.19782>; else goto <D.19783>;
      <D.19782>:
      import.34 = import;
      D.19784 = &piinfo->addr;
      error_msg.41 = mono_dl_symbol (module, import.34, D.19784);
      error_msg = error_msg.41;
      goto <D.19786>;
      <D.19783>:
      {
        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.18963>;
        <D.18962>:
        mangle_stdcall = 0;
        goto <D.18960>;
        <D.18959>:
        {
          gboolean need_param_count;

          need_param_count = 0;
          mangle_param_count = 0;
          goto <D.18957>;
          <D.18956>:
          D.19602 = piinfo->addr;
          if (D.19602 != 0B) goto <D.19787>; else goto <D.19788>;
          <D.19787>:
          // predicted unlikely by continue predictor.
          goto <D.18950>;
          <D.19788>:
          mangled_name = import;
          D.19779 = piinfo->piflags;
          D.19780 = (int) D.19779;
          D.19789 = D.19780 & 6;
          switch (D.19789) <default: <D.18955>, case 2: <D.18954>, case 4: <D.18951>, case 6: <D.18953>>
          <D.18951>:
          if (mangle_charset == 0) goto <D.19790>; else goto <D.19791>;
          <D.19790>:
          import.34 = import;
          mangled_name = monoeg_g_strconcat (import.34, "W", 0B);
          <D.19791>:
          goto <D.18952>;
          <D.18953>:
          if (mangle_charset == 1) goto <D.19792>; else goto <D.19793>;
          <D.19792>:
          import.34 = import;
          mangled_name = monoeg_g_strconcat (import.34, "A", 0B);
          <D.19793>:
          goto <D.18952>;
          <D.18954>:
          <D.18955>:
          if (mangle_charset == 1) goto <D.19794>; else goto <D.19795>;
          <D.19794>:
          import.34 = import;
          mangled_name = monoeg_g_strconcat (import.34, "A", 0B);
          <D.19795>:
          goto <D.18952>;
          <D.18952>:
          mangled_name2 = mangled_name;
          mono_trace (64, 4, "Probing \'%s\'.", mangled_name2);
          D.19784 = &piinfo->addr;
          error_msg.42 = mono_dl_symbol (module, mangled_name2, D.19784);
          error_msg = error_msg.42;
          error_msg.39 = error_msg;
          monoeg_g_free (error_msg.39);
          error_msg = 0B;
          D.19602 = piinfo->addr;
          if (D.19602 != 0B) goto <D.19797>; else goto <D.19798>;
          <D.19797>:
          mono_trace (64, 4, "Found as \'%s\'.", mangled_name2);
          <D.19798>:
          if (mangled_name != mangled_name2) goto <D.19799>; else goto <D.19800>;
          <D.19799>:
          monoeg_g_free (mangled_name2);
          <D.19800>:
          import.34 = import;
          if (mangled_name != import.34) goto <D.19801>; else goto <D.19802>;
          <D.19801>:
          monoeg_g_free (mangled_name);
          <D.19802>:
          <D.18950>:
          mangle_param_count = mangle_param_count + 4;
          <D.18957>:
          if (need_param_count != 0) goto <D.19804>; else goto <D.19805>;
          <D.19804>:
          iftmp.43 = 256;
          goto <D.19806>;
          <D.19805>:
          iftmp.43 = 0;
          <D.19806>:
          if (iftmp.43 >= mangle_param_count) goto <D.18956>; else goto <D.18958>;
          <D.18958>:
        }
        mangle_stdcall = mangle_stdcall + 1;
        <D.18960>:
        if (mangle_stdcall <= 1) goto <D.18959>; else goto <D.18961>;
        <D.18961>:
        mangle_charset = mangle_charset + 1;
        <D.18963>:
        if (mangle_charset <= 1) goto <D.18962>; else goto <D.18964>;
        <D.18964>:
      }
      <D.19786>:
      D.19602 = piinfo->addr;
      if (D.19602 == 0B) goto <D.19807>; else goto <D.19808>;
      <D.19807>:
      error_msg.39 = error_msg;
      monoeg_g_free (error_msg.39);
      if (exc_class != 0B) goto <D.19809>; else goto <D.19810>;
      <D.19809>:
      *exc_class = "EntryPointNotFoundException";
      import.34 = import;
      *exc_arg = import.34;
      <D.19810>:
      D.19605 = 0B;
      return D.19605;
      <D.19808>:
      D.19605 = piinfo->addr;
      return D.19605;
    }
  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.19815;
  int D.19820;
  struct MonoDllMap * global_dll_map.44;
  int res;

  if (assembly != 0B) goto <D.19813>; else goto <D.19814>;
  <D.19813>:
  D.19815 = assembly->dll_map;
  if (D.19815 != 0B) goto <D.19816>; else goto <D.19817>;
  <D.19816>:
  D.19815 = assembly->dll_map;
  res = mono_dllmap_lookup_list (D.19815, dll, func, rdll, rfunc);
  if (res != 0) goto <D.19818>; else goto <D.19819>;
  <D.19818>:
  D.19820 = res;
  return D.19820;
  <D.19819>:
  <D.19817>:
  <D.19814>:
  global_dll_map.44 = global_dll_map;
  D.19820 = mono_dllmap_lookup_list (global_dll_map.44, dll, func, rdll, rfunc);
  return D.19820;
}


mono_dllmap_lookup_list (struct MonoDllMap * dll_map, const char * dll, const char * func, const char * * rdll, const char * * rfunc)
{
  int D.19825;
  char * D.19828;
  char D.19829;
  char * D.19831;
  char D.19832;
  const gchar * D.19834;
  int D.19835;
  int D.18839;
  char * D.19842;
  char * D.19845;
  int D.18848;
  char * D.19850;
  int found;

  found = 0;
  *rdll = dll;
  if (dll_map == 0B) goto <D.19823>; else goto <D.19824>;
  <D.19823>:
  D.19825 = 0;
  return D.19825;
  <D.19824>:
  mono_loader_lock ();
  goto <D.18851>;
  <D.18850>:
  D.19828 = dll_map->dll;
  D.19829 = *D.19828;
  if (D.19829 == 105) goto <D.19830>; else goto <D.19826>;
  <D.19830>:
  D.19828 = dll_map->dll;
  D.19831 = D.19828 + 1;
  D.19832 = *D.19831;
  if (D.19832 == 58) goto <D.19833>; else goto <D.19826>;
  <D.19833>:
  D.19828 = dll_map->dll;
  D.19834 = D.19828 + 2;
  D.19835 = monoeg_ascii_strcasecmp (D.19834, dll);
  if (D.19835 != 0) goto <D.19836>; else goto <D.19837>;
  <D.19836>:
  // predicted unlikely by continue predictor.
  goto <D.18830>;
  <D.19837>:
  goto <D.19827>;
  <D.19826>:
  {
    size_t __s1_len;
    size_t __s2_len;

    D.19828 = dll_map->dll;
    D.18839 = __builtin_strcmp (D.19828, dll);
  }
  if (D.18839 != 0) goto <D.19838>; else goto <D.19839>;
  <D.19838>:
  // predicted unlikely by continue predictor.
  goto <D.18830>;
  <D.19839>:
  <D.19827>:
  if (found == 0) goto <D.19840>; else goto <D.19841>;
  <D.19840>:
  D.19842 = dll_map->target;
  if (D.19842 != 0B) goto <D.19843>; else goto <D.19844>;
  <D.19843>:
  D.19842 = dll_map->target;
  *rdll = D.19842;
  found = 1;
  <D.19844>:
  <D.19841>:
  D.19845 = dll_map->func;
  if (D.19845 != 0B) goto <D.19846>; else goto <D.19847>;
  <D.19846>:
  {
    size_t __s1_len;
    size_t __s2_len;

    D.19845 = dll_map->func;
    D.18848 = __builtin_strcmp (D.19845, func);
  }
  if (D.18848 == 0) goto <D.19848>; else goto <D.19849>;
  <D.19848>:
  D.19850 = dll_map->target_func;
  *rfunc = D.19850;
  goto <D.18849>;
  <D.19849>:
  <D.19847>:
  <D.18830>:
  dll_map = dll_map->next;
  <D.18851>:
  if (dll_map != 0B) goto <D.18850>; else goto <D.18849>;
  <D.18849>:
  mono_loader_unlock ();
  D.19825 = found;
  return D.19825;
}


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

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


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

  if (err != 0B) goto <D.19854>; else goto <D.19855>;
  <D.19854>:
  *err = 0B;
  <D.19855>:
  mono_loader_lock ();
  global_module_map.45 = global_module_map;
  if (global_module_map.45 == 0B) goto <D.19857>; else goto <D.19858>;
  <D.19857>:
  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.19858>:
  global_module_map.45 = global_module_map;
  res = monoeg_g_hash_table_lookup (global_module_map.45, name);
  if (res != 0B) goto <D.19860>; else goto <D.19861>;
  <D.19860>:
  mono_loader_unlock ();
  D.19862 = res;
  return D.19862;
  <D.19861>:
  res = mono_dl_open (name, flags, err);
  if (res != 0B) goto <D.19863>; else goto <D.19864>;
  <D.19863>:
  global_module_map.45 = global_module_map;
  D.19865 = monoeg_strdup (name);
  monoeg_g_hash_table_insert_replace (global_module_map.45, D.19865, res, 0);
  <D.19864>:
  mono_loader_unlock ();
  D.19862 = res;
  return D.19862;
}


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

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


mono_get_method_full (struct MonoImage * image, guint32 token, struct MonoClass * klass, struct MonoGenericContext * context)
{
  unsigned int D.19869;
  struct GHashTable * D.19872;
  struct GHashTable * D.19875;
  long int D.19876;
  long int D.19877;
  const void * D.19878;
  long unsigned int D.19880;
  long unsigned int D.19881;
  struct GHashTable * D.19884;
  struct GHashTable * D.19887;
  const void * D.19888;
  struct MonoMethod * D.19891;
  int used_context.47;
  long unsigned int D.19897;
  long unsigned int D.19898;
  void * D.19910;
  void * D.19914;
  struct MonoMethod * result;
  gboolean used_context;

  try
    {
      result = 0B;
      used_context = 0;
      mono_image_lock (image);
      D.19869 = token >> 24;
      if (D.19869 == 6) goto <D.19870>; else goto <D.19871>;
      <D.19870>:
      D.19872 = image->method_cache;
      if (D.19872 == 0B) goto <D.19873>; else goto <D.19874>;
      <D.19873>:
      D.19875 = monoeg_g_hash_table_new (0B, 0B);
      image->method_cache = D.19875;
      <D.19874>:
      D.19872 = image->method_cache;
      D.19876 = (long int) token;
      D.19877 = D.19876 & 16777215;
      D.19878 = (const void *) D.19877;
      result = monoeg_g_hash_table_lookup (D.19872, D.19878);
      goto <D.19879>;
      <D.19871>:
      D.19880 = BIT_FIELD_REF <*image, 64, 192>;
      D.19881 = D.19880 & 34359738368;
      if (D.19881 == 0) goto <D.19882>; else goto <D.19883>;
      <D.19882>:
      D.19884 = image->methodref_cache;
      if (D.19884 == 0B) goto <D.19885>; else goto <D.19886>;
      <D.19885>:
      D.19887 = monoeg_g_hash_table_new (0B, 0B);
      image->methodref_cache = D.19887;
      <D.19886>:
      D.19884 = image->methodref_cache;
      D.19876 = (long int) token;
      D.19888 = (const void *) D.19876;
      result = monoeg_g_hash_table_lookup (D.19884, D.19888);
      <D.19883>:
      <D.19879>:
      mono_image_unlock (image);
      if (result != 0B) goto <D.19889>; else goto <D.19890>;
      <D.19889>:
      D.19891 = result;
      return D.19891;
      <D.19890>:
      result = mono_get_method_from_token (image, token, klass, context, &used_context);
      if (result == 0B) goto <D.19892>; else goto <D.19893>;
      <D.19892>:
      D.19891 = 0B;
      return D.19891;
      <D.19893>:
      mono_image_lock (image);
      used_context.47 = used_context;
      if (used_context.47 == 0) goto <D.19895>; else goto <D.19896>;
      <D.19895>:
      D.19897 = BIT_FIELD_REF <*result, 64, 256>;
      D.19898 = D.19897 & 4096;
      if (D.19898 == 0) goto <D.19899>; else goto <D.19900>;
      <D.19899>:
      {
        struct MonoMethod * result2;

        result2 = 0B;
        D.19869 = token >> 24;
        if (D.19869 == 6) goto <D.19901>; else goto <D.19902>;
        <D.19901>:
        D.19872 = image->method_cache;
        D.19876 = (long int) token;
        D.19877 = D.19876 & 16777215;
        D.19878 = (const void *) D.19877;
        result2 = monoeg_g_hash_table_lookup (D.19872, D.19878);
        goto <D.19903>;
        <D.19902>:
        D.19880 = BIT_FIELD_REF <*image, 64, 192>;
        D.19881 = D.19880 & 34359738368;
        if (D.19881 == 0) goto <D.19904>; else goto <D.19905>;
        <D.19904>:
        D.19884 = image->methodref_cache;
        D.19876 = (long int) token;
        D.19888 = (const void *) D.19876;
        result2 = monoeg_g_hash_table_lookup (D.19884, D.19888);
        <D.19905>:
        <D.19903>:
        if (result2 != 0B) goto <D.19906>; else goto <D.19907>;
        <D.19906>:
        mono_image_unlock (image);
        D.19891 = result2;
        return D.19891;
        <D.19907>:
        D.19869 = token >> 24;
        if (D.19869 == 6) goto <D.19908>; else goto <D.19909>;
        <D.19908>:
        D.19872 = image->method_cache;
        D.19876 = (long int) token;
        D.19877 = D.19876 & 16777215;
        D.19910 = (void *) D.19877;
        monoeg_g_hash_table_insert_replace (D.19872, D.19910, result, 0);
        goto <D.19911>;
        <D.19909>:
        D.19880 = BIT_FIELD_REF <*image, 64, 192>;
        D.19881 = D.19880 & 34359738368;
        if (D.19881 == 0) goto <D.19912>; else goto <D.19913>;
        <D.19912>:
        D.19884 = image->methodref_cache;
        D.19876 = (long int) token;
        D.19914 = (void *) D.19876;
        monoeg_g_hash_table_insert_replace (D.19884, D.19914, result, 0);
        <D.19913>:
        <D.19911>:
      }
      <D.19900>:
      <D.19896>:
      mono_image_unlock (image);
      D.19891 = result;
      return D.19891;
    }
  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.19917;
  int token.48;
  long unsigned int D.19919;
  long unsigned int D.19920;
  struct MonoClass * D.19925;
  struct MonoClass * handle_class.49;
  char * D.19929;
  gchar * D.19930;
  struct MonoMethod * D.19931;
  unsigned int idx.50;
  gchar * D.19941;
  <unnamed-unsigned:24> D.19944;
  int D.19945;
  gchar * D.19948;
  struct MonoTableInfo * D.19949;
  int D.19950;
  unsigned int D.19954;
  unsigned int D.19955;
  unsigned int D.19957;
  unsigned int D.19958;
  unsigned int methods_size.51;
  unsigned int methods_size.52;
  long unsigned int D.19961;
  long unsigned int D.19962;
  unsigned int D.19967;
  short unsigned int D.19970;
  short unsigned int D.19971;
  unsigned int D.19972;
  const char * D.19973;
  const char * sig.53;
  unsigned int D.19977;
  const char * sig.54;
  unsigned int D.19979;
  char D.19980;
  int D.19981;
  int D.19982;
  int D.19987;
  struct MonoClass * D.19992;
  struct MonoClass * D.19993;
  int D.18991;
  int iftmp.55;
  int D.18990;
  const char[6] * D.19999;
  unsigned char D.20000;
  int D.20001;
  unsigned char D.20002;
  int D.20003;
  const unsigned char * D.20008;
  unsigned char D.20009;
  int D.20010;
  const unsigned char * D.20011;
  unsigned char D.20012;
  int D.20013;
  const unsigned char * D.20018;
  unsigned char D.20019;
  int D.20020;
  const unsigned char * D.20021;
  unsigned char D.20022;
  int D.20023;
  const unsigned char * D.20028;
  unsigned char D.20029;
  int D.20030;
  const unsigned char * D.20031;
  unsigned char D.20032;
  int D.20033;
  const char * D.20035;
  unsigned int D.20041;
  unsigned int D.20042;
  short unsigned int D.20043;
  short unsigned int D.20044;
  const struct MonoTableInfo * D.20047;
  int D.20048;
  int D.20049;
  unsigned int D.20050;
  short unsigned int D.20051;
  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.19917 = token >> 24;
      table = (int) D.19917;
      token.48 = (int) token;
      idx = token.48 & 16777215;
      tables = &image->tables;
      generic_container = 0B;
      container = 0B;
      sig = 0B;
      D.19919 = BIT_FIELD_REF <*image, 64, 192>;
      D.19920 = D.19919 & 34359738368;
      if (D.19920 != 0) goto <D.19921>; else goto <D.19922>;
      <D.19921>:
      {
        struct MonoClass * handle_class;

        try
          {
            result = mono_lookup_dynamic_token_class (image, token, 1, &handle_class, context);
            if (result != 0B) goto <D.19923>; else goto <D.19924>;
            <D.19923>:
            D.19925 = mono_defaults.methodhandle_class;
            handle_class.49 = handle_class;
            if (D.19925 != handle_class.49) goto <D.19927>; else goto <D.19928>;
            <D.19927>:
            D.19929 = image->name;
            D.19930 = monoeg_g_strdup_printf ("Bad method token 0x%08x on image %s.", token, D.19929);
            mono_loader_set_error_bad_image (D.19930);
            D.19931 = 0B;
            return D.19931;
            <D.19928>:
            <D.19924>:
            D.19931 = result;
            return D.19931;
          }
        finally
          {
            handle_class = {CLOBBER};
          }
      }
      <D.19922>:
      if (table != 6) goto <D.19932>; else goto <D.19933>;
      <D.19932>:
      if (table == 43) goto <D.19934>; else goto <D.19935>;
      <D.19934>:
      if (used_context != 0B) goto <D.19936>; else goto <D.19937>;
      <D.19936>:
      *used_context = 1;
      <D.19937>:
      idx.50 = (unsigned int) idx;
      D.19931 = method_from_methodspec (image, context, idx.50);
      return D.19931;
      <D.19935>:
      if (table != 10) goto <D.19939>; else goto <D.19940>;
      <D.19939>:
      monoeg_g_log (0B, 16, "got wrong token: 0x%08x\n", token);
      D.19929 = image->name;
      D.19941 = monoeg_g_strdup_printf ("Bad method token 0x%08x on image %s.", token, D.19929);
      mono_loader_set_error_bad_image (D.19941);
      D.19931 = 0B;
      return D.19931;
      <D.19940>:
      idx.50 = (unsigned int) idx;
      D.19931 = method_from_memberref (image, idx.50, context, used_context);
      return D.19931;
      <D.19933>:
      if (used_context != 0B) goto <D.19942>; else goto <D.19943>;
      <D.19942>:
      *used_context = 0;
      <D.19943>:
      D.19944 = image->tables[6].rows;
      D.19945 = (int) D.19944;
      if (D.19945 < idx) goto <D.19946>; else goto <D.19947>;
      <D.19946>:
      D.19929 = image->name;
      D.19948 = monoeg_g_strdup_printf ("Bad method token 0x%08x on image %s.", token, D.19929);
      mono_loader_set_error_bad_image (D.19948);
      D.19931 = 0B;
      return D.19931;
      <D.19947>:
      D.19949 = &image->tables[6];
      D.19950 = idx + -1;
      mono_metadata_decode_row (D.19949, D.19950, &cols, 6);
      D.19954 = cols[2];
      D.19955 = D.19954 & 8192;
      if (D.19955 != 0) goto <D.19951>; else goto <D.19956>;
      <D.19956>:
      D.19957 = cols[1];
      D.19958 = D.19957 & 4096;
      if (D.19958 != 0) goto <D.19951>; else goto <D.19952>;
      <D.19951>:
      result = mono_image_alloc0 (image, 56);
      goto <D.19953>;
      <D.19952>:
      result = mono_image_alloc0 (image, 40);
      methods_size.51 = methods_size;
      methods_size.52 = methods_size.51 + 40;
      methods_size = methods_size.52;
      <D.19953>:
      D.19961 = mono_stats.method_count;
      D.19962 = D.19961 + 1;
      mono_stats.method_count = D.19962;
      if (klass == 0B) goto <D.19963>; else goto <D.19964>;
      <D.19963>:
      {
        guint32 type;

        type = mono_metadata_typedef_from_method (image, token);
        if (type == 0) goto <D.19965>; else goto <D.19966>;
        <D.19965>:
        D.19931 = 0B;
        return D.19931;
        <D.19966>:
        D.19967 = type | 33554432;
        klass = mono_class_get (image, D.19967);
        if (klass == 0B) goto <D.19968>; else goto <D.19969>;
        <D.19968>:
        D.19931 = 0B;
        return D.19931;
        <D.19969>:
      }
      <D.19964>:
      result->slot = -1;
      result->klass = klass;
      D.19954 = cols[2];
      D.19970 = (short unsigned int) D.19954;
      result->flags = D.19970;
      D.19957 = cols[1];
      D.19971 = (short unsigned int) D.19957;
      result->iflags = D.19971;
      result->token = token;
      D.19972 = cols[3];
      D.19973 = mono_metadata_string_heap (image, D.19972);
      result->name = D.19973;
      sig.53 = sig;
      if (sig.53 == 0B) goto <D.19975>; else goto <D.19976>;
      <D.19975>:
      D.19977 = cols[4];
      sig.54 = mono_metadata_blob_heap (image, D.19977);
      sig = sig.54;
      <D.19976>:
      sig.53 = sig;
      D.19979 = mono_metadata_decode_blob_size (sig.53, &sig);
      size = (int) D.19979;
      container = klass->generic_container;
      sig.53 = sig;
      D.19980 = *sig.53;
      D.19981 = (int) D.19980;
      D.19982 = D.19981 & 16;
      if (D.19982 != 0) goto <D.19983>; else goto <D.19984>;
      <D.19983>:
      generic_container = mono_metadata_load_generic_params (image, token, container);
      <D.19984>:
      if (generic_container != 0B) goto <D.19985>; else goto <D.19986>;
      <D.19985>:
      result->is_generic = 1;
      generic_container->owner.method = result;
      D.19987 = mono_metadata_load_generic_param_constraints_full (image, token, generic_container);
      if (D.19987 == 0) goto <D.19988>; else goto <D.19989>;
      <D.19988>:
      D.19931 = 0B;
      return D.19931;
      <D.19989>:
      container = generic_container;
      <D.19986>:
      D.19957 = cols[1];
      D.19958 = D.19957 & 4096;
      if (D.19958 != 0) goto <D.19990>; else goto <D.19991>;
      <D.19990>:
      D.19992 = result->klass;
      D.19993 = mono_defaults.string_class;
      if (D.19992 == D.19993) goto <D.19994>; else goto <D.19995>;
      <D.19994>:
      {
        size_t __s1_len;
        size_t __s2_len;

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

          __s2 = result->name;
          D.19999 = ".ctor";
          D.20000 = MEM[(const unsigned char *)D.19999];
          D.20001 = (int) D.20000;
          D.20002 = *__s2;
          D.20003 = (int) D.20002;
          __result = D.20001 - D.20003;
          {
            if (__s2_len != 0) goto <D.20004>; else goto <D.20005>;
            <D.20004>:
            if (__result == 0) goto <D.20006>; else goto <D.20007>;
            <D.20006>:
            D.20008 = &MEM[(void *)".ctor" + 1B];
            D.20009 = *D.20008;
            D.20010 = (int) D.20009;
            D.20011 = __s2 + 1;
            D.20012 = *D.20011;
            D.20013 = (int) D.20012;
            __result = D.20010 - D.20013;
            if (__s2_len > 1) goto <D.20014>; else goto <D.20015>;
            <D.20014>:
            if (__result == 0) goto <D.20016>; else goto <D.20017>;
            <D.20016>:
            D.20018 = &MEM[(void *)".ctor" + 2B];
            D.20019 = *D.20018;
            D.20020 = (int) D.20019;
            D.20021 = __s2 + 2;
            D.20022 = *D.20021;
            D.20023 = (int) D.20022;
            __result = D.20020 - D.20023;
            if (__s2_len > 2) goto <D.20024>; else goto <D.20025>;
            <D.20024>:
            if (__result == 0) goto <D.20026>; else goto <D.20027>;
            <D.20026>:
            D.20028 = &MEM[(void *)".ctor" + 3B];
            D.20029 = *D.20028;
            D.20030 = (int) D.20029;
            D.20031 = __s2 + 3;
            D.20032 = *D.20031;
            D.20033 = (int) D.20032;
            __result = D.20030 - D.20033;
            <D.20027>:
            <D.20025>:
            <D.20017>:
            <D.20015>:
            <D.20007>:
            <D.20005>:
          }
          D.18990 = __result;
        }
        iftmp.55 = -D.18990;
        goto <D.20034>;
        <D.19998>:
        D.20035 = result->name;
        iftmp.55 = __builtin_strcmp (D.20035, ".ctor");
        <D.20034>:
        D.18991 = iftmp.55;
      }
      if (D.18991 == 0) goto <D.20036>; else goto <D.20037>;
      <D.20036>:
      result->string_ctor = 1;
      <D.20037>:
      <D.19995>:
      goto <D.20038>;
      <D.19991>:
      D.19954 = cols[2];
      D.19955 = D.19954 & 8192;
      if (D.19955 != 0) goto <D.20039>; else goto <D.20040>;
      <D.20039>:
      {
        struct MonoMethodPInvoke * piinfo;

        piinfo = result;
        D.19950 = idx + -1;
        D.20041 = (unsigned int) D.19950;
        D.20042 = mono_metadata_implmap_from_method (image, D.20041);
        D.20043 = (short unsigned int) D.20042;
        piinfo->implmap_idx = D.20043;
        D.20044 = piinfo->implmap_idx;
        if (D.20044 != 0) goto <D.20045>; else goto <D.20046>;
        <D.20045>:
        D.20047 = tables + 448;
        D.20044 = piinfo->implmap_idx;
        D.20048 = (int) D.20044;
        D.20049 = D.20048 + -1;
        D.20050 = mono_metadata_decode_row_col (D.20047, D.20049, 0);
        D.20051 = (short unsigned int) D.20050;
        piinfo->piflags = D.20051;
        <D.20046>:
      }
      <D.20040>:
      <D.20038>:
      if (generic_container != 0B) goto <D.20052>; else goto <D.20053>;
      <D.20052>:
      mono_method_set_generic_container (result, generic_container);
      <D.20053>:
      D.19931 = result;
      return D.19931;
    }
  finally
    {
      sig = {CLOBBER};
      cols = {CLOBBER};
    }
}


method_from_methodspec (struct MonoImage * image, struct MonoGenericContext * context, guint32 idx)
{
  const struct MonoTableInfo * D.20057;
  unsigned int D.20058;
  int D.20059;
  unsigned int D.20060;
  int D.20061;
  struct MonoMethod * D.20064;
  const char * ptr.56;
  const char * ptr.57;
  const char * ptr.58;
  _Bool D.20068;
  long int D.20069;
  long int D.20070;
  int param_count.59;
  long unsigned int D.20078;
  long unsigned int D.20079;
  int D.20082;
  unsigned int D.20085;
  unsigned int D.20088;
  struct MonoGenericClass * D.20092;
  long unsigned int D.20095;
  long unsigned int D.20096;
  _Bool D.20097;
  long int D.20098;
  long int D.20099;
  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.20057 = tables + 688;
      D.20058 = idx + 4294967295;
      D.20059 = (int) D.20058;
      mono_metadata_decode_row (D.20057, D.20059, &cols, 2);
      token = cols[0];
      nindex = token >> 1;
      D.20060 = cols[1];
      D.20061 = mono_verifier_verify_methodspec_signature (image, D.20060, 0B);
      if (D.20061 == 0) goto <D.20062>; else goto <D.20063>;
      <D.20062>:
      D.20064 = 0B;
      return D.20064;
      <D.20063>:
      D.20060 = cols[1];
      ptr.56 = mono_metadata_blob_heap (image, D.20060);
      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.20068 = param_count == 0;
      D.20069 = (long int) D.20068;
      D.20070 = __builtin_expect (D.20069, 0);
      if (D.20070 != 0) goto <D.20071>; else goto <D.20072>;
      <D.20071>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1110, "param_count");
      <D.20072>:
      param_count.59 = (int) param_count;
      ptr.57 = ptr;
      inst = mono_metadata_parse_generic_inst (image, 0B, param_count.59, ptr.57, &ptr);
      if (inst == 0B) goto <D.20074>; else goto <D.20075>;
      <D.20074>:
      D.20064 = 0B;
      return D.20064;
      <D.20075>:
      if (context != 0B) goto <D.20076>; else goto <D.20077>;
      <D.20076>:
      D.20078 = BIT_FIELD_REF <*inst, 64, 0>;
      D.20079 = D.20078 & 18014398509481984;
      if (D.20079 != 0) goto <D.20080>; else goto <D.20081>;
      <D.20080>:
      inst = mono_metadata_inflate_generic_inst (inst, context, &error);
      D.20082 = mono_error_ok (&error);
      if (D.20082 == 0) goto <D.20083>; else goto <D.20084>;
      <D.20083>:
      mono_error_cleanup (&error);
      D.20064 = 0B;
      return D.20064;
      <D.20084>:
      <D.20081>:
      <D.20077>:
      D.20085 = token & 1;
      if (D.20085 == 0) goto <D.20086>; else goto <D.20087>;
      <D.20086>:
      D.20088 = nindex | 100663296;
      method = mono_get_method_full (image, D.20088, 0B, context);
      goto <D.20089>;
      <D.20087>:
      method = method_from_memberref (image, nindex, context, 0B);
      <D.20089>:
      if (method == 0B) goto <D.20090>; else goto <D.20091>;
      <D.20090>:
      D.20064 = 0B;
      return D.20064;
      <D.20091>:
      klass = method->klass;
      D.20092 = klass->generic_class;
      if (D.20092 != 0B) goto <D.20093>; else goto <D.20094>;
      <D.20093>:
      D.20095 = BIT_FIELD_REF <*method, 64, 256>;
      D.20096 = D.20095 & 4096;
      D.20097 = D.20096 == 0;
      D.20098 = (long int) D.20097;
      D.20099 = __builtin_expect (D.20098, 0);
      if (D.20099 != 0) goto <D.20100>; else goto <D.20101>;
      <D.20100>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1135, "method->is_inflated");
      <D.20101>:
      method = MEM[(struct MonoMethodInflated *)method].declaring;
      <D.20094>:
      D.20092 = klass->generic_class;
      if (D.20092 != 0B) goto <D.20103>; else goto <D.20104>;
      <D.20103>:
      D.20092 = klass->generic_class;
      iftmp.60 = D.20092->context.class_inst;
      goto <D.20105>;
      <D.20104>:
      iftmp.60 = 0B;
      <D.20105>:
      new_context.class_inst = iftmp.60;
      new_context.method_inst = inst;
      D.20064 = mono_class_inflate_generic_method_full (method, klass, &new_context);
      return D.20064;
    }
  finally
    {
      error = {CLOBBER};
      new_context = {CLOBBER};
      ptr = {CLOBBER};
      cols = {CLOBBER};
    }
}


method_from_memberref (struct MonoImage * image, guint32 idx, struct MonoGenericContext * typespec_context, gboolean * used_context)
{
  const struct MonoTableInfo * D.20108;
  unsigned int D.20109;
  int D.20110;
  unsigned int D.20111;
  unsigned int D.20112;
  _Bool D.20115;
  int D.20116;
  unsigned int D.20117;
  char * D.20120;
  const char * D.20121;
  struct MonoMethod * D.20122;
  unsigned int D.20123;
  unsigned int D.20126;
  unsigned int D.20129;
  _Bool D.20130;
  long int D.20131;
  long int D.20132;
  int D.20135;
  const char * D.20138;
  const char * ptr.61;
  const char * ptr.62;
  unsigned char D.20145;
  struct MonoClass * iftmp.63;
  struct MonoGenericClass * D.20151;
  struct MonoType * D.20157;
  short unsigned int D.20158;
  int D.20161;
  struct MonoImage * D.20162;
  char * D.20163;
  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.20108 = tables + 160;
      D.20109 = idx + 4294967295;
      D.20110 = (int) D.20109;
      mono_metadata_decode_row (D.20108, D.20110, &cols, 3);
      D.20111 = cols[0];
      nindex = D.20111 >> 3;
      D.20111 = cols[0];
      class = D.20111 & 7;
      D.20112 = cols[1];
      mname = mono_metadata_string_heap (image, D.20112);
      if (used_context != 0B) goto <D.20113>; else goto <D.20114>;
      <D.20113>:
      D.20115 = class == 4;
      D.20116 = (int) D.20115;
      *used_context = D.20116;
      <D.20114>:
      switch (class) <default: <D.18787>, case 0: <D.18784>, case 1: <D.18779>, case 3: <D.18786>, case 4: <D.18782>>
      <D.18779>:
      D.20117 = nindex | 16777216;
      klass = mono_class_from_typeref (image, D.20117);
      if (klass == 0B) goto <D.20118>; else goto <D.20119>;
      <D.20118>:
      {
        char * name;

        D.20117 = nindex | 16777216;
        name = mono_class_name_from_token (image, D.20117);
        D.20120 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s in assembly %s, type %s", mname, D.20120, name);
        D.20121 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.20121);
        monoeg_g_free (name);
        D.20122 = 0B;
        return D.20122;
      }
      <D.20119>:
      goto <D.18781>;
      <D.18782>:
      D.20123 = nindex | 452984832;
      klass = mono_class_get_full (image, D.20123, typespec_context);
      if (klass == 0B) goto <D.20124>; else goto <D.20125>;
      <D.20124>:
      {
        char * name;

        D.20123 = nindex | 452984832;
        name = mono_class_name_from_token (image, D.20123);
        D.20120 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s in assembly %s, type %s", mname, D.20120, name);
        D.20121 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.20121);
        monoeg_g_free (name);
        D.20122 = 0B;
        return D.20122;
      }
      <D.20125>:
      goto <D.18781>;
      <D.18784>:
      D.20126 = nindex | 33554432;
      klass = mono_class_get (image, D.20126);
      if (klass == 0B) goto <D.20127>; else goto <D.20128>;
      <D.20127>:
      {
        char * name;

        D.20126 = nindex | 33554432;
        name = mono_class_name_from_token (image, D.20126);
        D.20120 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s in assembly %s, type %s", mname, D.20120, name);
        D.20121 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.20121);
        monoeg_g_free (name);
        D.20122 = 0B;
        return D.20122;
      }
      <D.20128>:
      goto <D.18781>;
      <D.18786>:
      D.20129 = nindex | 100663296;
      D.20122 = mono_get_method (image, D.20129, 0B);
      return D.20122;
      <D.18787>:
      {
        char * message;

        message = monoeg_g_strdup_printf ("Memberref parent unknown: class: %d, index %d", class, nindex);
        mono_loader_set_error_method_load ("", message);
        D.20122 = 0B;
        return D.20122;
      }
      <D.18781>:
      D.20130 = klass == 0B;
      D.20131 = (long int) D.20130;
      D.20132 = __builtin_expect (D.20131, 0);
      if (D.20132 != 0) goto <D.20133>; else goto <D.20134>;
      <D.20133>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1016, "klass");
      <D.20134>:
      mono_class_init (klass);
      sig_idx = cols[2];
      D.20135 = mono_verifier_verify_memberref_method_signature (image, sig_idx, 0B);
      if (D.20135 == 0) goto <D.20136>; else goto <D.20137>;
      <D.20136>:
      D.20138 = klass->name;
      mono_loader_set_error_method_load (D.20138, mname);
      D.20122 = 0B;
      return D.20122;
      <D.20137>:
      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.20141>; else goto <D.20142>;
      <D.20141>:
      ptr.62 = ptr;
      sig = mono_metadata_parse_method_signature (image, 0, ptr.62, 0B);
      if (sig == 0B) goto <D.20143>; else goto <D.20144>;
      <D.20143>:
      D.20122 = 0B;
      return D.20122;
      <D.20144>:
      sig = cache_memberref_sig (image, sig_idx, sig);
      <D.20142>:
      switch (class) <default: <D.18795>, case 0: <D.18790>, case 1: <D.18789>, case 4: <D.18792>>
      <D.18789>:
      <D.18790>:
      method = find_method (klass, 0B, mname, sig, klass);
      goto <D.18791>;
      <D.18792>:
      {
        struct MonoType * type;

        type = &klass->byval_arg;
        D.20145 = type->type;
        if (D.20145 != 20) goto <D.20146>; else goto <D.20147>;
        <D.20146>:
        D.20145 = type->type;
        if (D.20145 != 29) goto <D.20148>; else goto <D.20149>;
        <D.20148>:
        {
          struct MonoClass * in_class;

          D.20151 = klass->generic_class;
          if (D.20151 != 0B) goto <D.20152>; else goto <D.20153>;
          <D.20152>:
          D.20151 = klass->generic_class;
          iftmp.63 = D.20151->container_class;
          goto <D.20154>;
          <D.20153>:
          iftmp.63 = klass;
          <D.20154>:
          in_class = iftmp.63;
          method = find_method (in_class, 0B, mname, sig, klass);
          goto <D.18791>;
        }
        <D.20149>:
        <D.20147>:
        method = mono_method_search_in_array_class (klass, mname, sig);
        goto <D.18791>;
      }
      <D.18795>:
      monoeg_g_log (0B, 4, "Memberref parent unknown: class: %d, index %d", class, nindex);
      <D.18796>:
      goto <D.18796>;
      monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "loader.c", 1061);
      <D.18791>:
      if (method == 0B) goto <D.20155>; else goto <D.20156>;
      <D.20155>:
      {
        char * msig;
        char * class_name;
        struct GString * s;

        msig = mono_signature_get_desc (sig, 0);
        D.20157 = &klass->byval_arg;
        class_name = mono_type_get_name (D.20157);
        s = monoeg_g_string_new (mname);
        D.20158 = sig->generic_param_count;
        if (D.20158 != 0) goto <D.20159>; else goto <D.20160>;
        <D.20159>:
        D.20158 = sig->generic_param_count;
        D.20161 = (int) D.20158;
        monoeg_g_string_append_printf (s, "<[%d]>", D.20161);
        <D.20160>:
        monoeg_g_string_append_printf (s, "(%s)", msig);
        monoeg_g_free (msig);
        msig = monoeg_g_string_free (s, 0);
        D.20162 = klass->image;
        D.20163 = D.20162->name;
        D.20120 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s::%s in assembly %s, referenced in assembly %s", class_name, msig, D.20163, D.20120);
        mono_loader_set_error_method_load (class_name, mname);
        monoeg_g_free (msig);
        monoeg_g_free (class_name);
      }
      <D.20156>:
      D.20122 = method;
      return D.20122;
    }
  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.20170;
  unsigned int D.20171;
  unsigned char D.20173;
  struct MonoType * D.20177;
  const char * D.20180;
  char D.20182;
  _Bool D.20185;
  long int D.20186;
  long int D.20187;
  char D.20191;
  int D.18663;
  int iftmp.65;
  int D.18662;
  const char[6] * D.20197;
  unsigned char D.20198;
  int D.20199;
  unsigned char D.20200;
  int D.20201;
  const unsigned char * D.20206;
  unsigned char D.20207;
  int D.20208;
  const unsigned char * D.20209;
  unsigned char D.20210;
  int D.20211;
  const unsigned char * D.20216;
  unsigned char D.20217;
  int D.20218;
  const unsigned char * D.20219;
  unsigned char D.20220;
  int D.20221;
  const unsigned char * D.20226;
  unsigned char D.20227;
  int D.20228;
  const unsigned char * D.20229;
  unsigned char D.20230;
  int D.20231;
  int D.18672;
  int iftmp.66;
  int D.18671;
  const char[7] * D.20237;
  unsigned char D.20238;
  int D.20239;
  unsigned char D.20240;
  int D.20241;
  const unsigned char * D.20246;
  unsigned char D.20247;
  int D.20248;
  const unsigned char * D.20249;
  unsigned char D.20250;
  int D.20251;
  const unsigned char * D.20256;
  unsigned char D.20257;
  int D.20258;
  const unsigned char * D.20259;
  unsigned char D.20260;
  int D.20261;
  const unsigned char * D.20266;
  unsigned char D.20267;
  int D.20268;
  const unsigned char * D.20269;
  unsigned char D.20270;
  int D.20271;
  short unsigned int D.20274;
  short unsigned int D.20275;
  struct MonoClass * * D.20278;
  long unsigned int D.20279;
  long unsigned int D.20280;
  struct MonoClass * * D.20281;
  struct MonoClass * * D.20282;
  struct MonoClass * * D.20283;
  struct MonoType * D.20284;
  const char * D.20287;
  char D.20289;
  const char * iftmp.67;
  int D.20296;
  _Bool D.20297;
  _Bool D.20298;
  long int D.20299;
  long int D.20300;
  struct MonoClass * D.20305;
  struct MonoMethod * D.20306;
  int i;
  char * qname;
  char * fqname;
  char * class_name;
  gboolean is_interface;
  struct MonoMethod * result;
  void out = <<< error >>>;

  result = 0B;
  D.20170 = in_class->flags;
  D.20171 = D.20170 & 32;
  if (D.20171 != 0) goto <D.20167>; else goto <D.20172>;
  <D.20172>:
  D.20173 = in_class->byval_arg.type;
  if (D.20173 == 19) goto <D.20167>; else goto <D.20174>;
  <D.20174>:
  D.20173 = in_class->byval_arg.type;
  if (D.20173 == 30) goto <D.20167>; else goto <D.20168>;
  <D.20167>:
  iftmp.64 = 1;
  goto <D.20169>;
  <D.20168>:
  iftmp.64 = 0;
  <D.20169>:
  is_interface = iftmp.64;
  if (ic != 0B) goto <D.20175>; else goto <D.20176>;
  <D.20175>:
  D.20177 = &ic->byval_arg;
  class_name = mono_type_get_name_full (D.20177, 0);
  qname = monoeg_g_strconcat (class_name, ".", name, 0B);
  D.20180 = ic->name_space;
  if (D.20180 != 0B) goto <D.20181>; else goto <D.20178>;
  <D.20181>:
  D.20180 = ic->name_space;
  D.20182 = *D.20180;
  if (D.20182 != 0) goto <D.20183>; else goto <D.20178>;
  <D.20183>:
  D.20180 = ic->name_space;
  fqname = monoeg_g_strconcat (D.20180, ".", class_name, ".", name, 0B);
  goto <D.20179>;
  <D.20178>:
  fqname = 0B;
  <D.20179>:
  goto <D.20184>;
  <D.20176>:
  fqname = 0B;
  qname = fqname;
  class_name = qname;
  <D.20184>:
  goto <D.18674>;
  <D.18683>:
  D.20185 = from_class == 0B;
  D.20186 = (long int) D.20185;
  D.20187 = __builtin_expect (D.20186, 0);
  if (D.20187 != 0) goto <D.20188>; else goto <D.20189>;
  <D.20188>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 684, "from_class");
  <D.20189>:
  result = find_method_in_class (in_class, name, qname, fqname, sig, from_class);
  if (result != 0B) goto out; else goto <D.20190>;
  <D.20190>:
  D.20191 = *name;
  if (D.20191 == 46) goto <D.20192>; else goto <D.20193>;
  <D.20192>:
  {
    size_t __s1_len;
    size_t __s2_len;

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

      __s2 = name;
      D.20197 = ".ctor";
      D.20198 = MEM[(const unsigned char *)D.20197];
      D.20199 = (int) D.20198;
      D.20200 = *__s2;
      D.20201 = (int) D.20200;
      __result = D.20199 - D.20201;
      {
        if (__s2_len != 0) goto <D.20202>; else goto <D.20203>;
        <D.20202>:
        if (__result == 0) goto <D.20204>; else goto <D.20205>;
        <D.20204>:
        D.20206 = &MEM[(void *)".ctor" + 1B];
        D.20207 = *D.20206;
        D.20208 = (int) D.20207;
        D.20209 = __s2 + 1;
        D.20210 = *D.20209;
        D.20211 = (int) D.20210;
        __result = D.20208 - D.20211;
        if (__s2_len > 1) goto <D.20212>; else goto <D.20213>;
        <D.20212>:
        if (__result == 0) goto <D.20214>; else goto <D.20215>;
        <D.20214>:
        D.20216 = &MEM[(void *)".ctor" + 2B];
        D.20217 = *D.20216;
        D.20218 = (int) D.20217;
        D.20219 = __s2 + 2;
        D.20220 = *D.20219;
        D.20221 = (int) D.20220;
        __result = D.20218 - D.20221;
        if (__s2_len > 2) goto <D.20222>; else goto <D.20223>;
        <D.20222>:
        if (__result == 0) goto <D.20224>; else goto <D.20225>;
        <D.20224>:
        D.20226 = &MEM[(void *)".ctor" + 3B];
        D.20227 = *D.20226;
        D.20228 = (int) D.20227;
        D.20229 = __s2 + 3;
        D.20230 = *D.20229;
        D.20231 = (int) D.20230;
        __result = D.20228 - D.20231;
        <D.20225>:
        <D.20223>:
        <D.20215>:
        <D.20213>:
        <D.20205>:
        <D.20203>:
      }
      D.18662 = __result;
    }
    iftmp.65 = -D.18662;
    goto <D.20232>;
    <D.20196>:
    iftmp.65 = __builtin_strcmp (name, ".ctor");
    <D.20232>:
    D.18663 = iftmp.65;
  }
  if (D.18663 == 0) goto <D.18673>; else goto <D.20233>;
  <D.20233>:
  {
    size_t __s1_len;
    size_t __s2_len;

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

      __s2 = name;
      D.20237 = ".cctor";
      D.20238 = MEM[(const unsigned char *)D.20237];
      D.20239 = (int) D.20238;
      D.20240 = *__s2;
      D.20241 = (int) D.20240;
      __result = D.20239 - D.20241;
      {
        if (__s2_len != 0) goto <D.20242>; else goto <D.20243>;
        <D.20242>:
        if (__result == 0) goto <D.20244>; else goto <D.20245>;
        <D.20244>:
        D.20246 = &MEM[(void *)".cctor" + 1B];
        D.20247 = *D.20246;
        D.20248 = (int) D.20247;
        D.20249 = __s2 + 1;
        D.20250 = *D.20249;
        D.20251 = (int) D.20250;
        __result = D.20248 - D.20251;
        if (__s2_len > 1) goto <D.20252>; else goto <D.20253>;
        <D.20252>:
        if (__result == 0) goto <D.20254>; else goto <D.20255>;
        <D.20254>:
        D.20256 = &MEM[(void *)".cctor" + 2B];
        D.20257 = *D.20256;
        D.20258 = (int) D.20257;
        D.20259 = __s2 + 2;
        D.20260 = *D.20259;
        D.20261 = (int) D.20260;
        __result = D.20258 - D.20261;
        if (__s2_len > 2) goto <D.20262>; else goto <D.20263>;
        <D.20262>:
        if (__result == 0) goto <D.20264>; else goto <D.20265>;
        <D.20264>:
        D.20266 = &MEM[(void *)".cctor" + 3B];
        D.20267 = *D.20266;
        D.20268 = (int) D.20267;
        D.20269 = __s2 + 3;
        D.20270 = *D.20269;
        D.20271 = (int) D.20270;
        __result = D.20268 - D.20271;
        <D.20265>:
        <D.20263>:
        <D.20255>:
        <D.20253>:
        <D.20245>:
        <D.20243>:
      }
      D.18671 = __result;
    }
    iftmp.66 = -D.18671;
    goto <D.20272>;
    <D.20236>:
    iftmp.66 = __builtin_strcmp (name, ".cctor");
    <D.20272>:
    D.18672 = iftmp.66;
  }
  if (D.18672 == 0) goto <D.18673>; else goto <D.20273>;
  <D.20273>:
  <D.20193>:
  D.20274 = from_class->interface_offsets_count;
  D.20275 = in_class->interface_offsets_count;
  if (D.20274 != D.20275) goto <D.20276>; else goto <D.20277>;
  <D.20276>:
  in_class = in_class->parent;
  from_class = from_class->parent;
  // predicted unlikely by continue predictor.
  goto <D.18674>;
  <D.20277>:
  i = 0;
  goto <D.18681>;
  <D.18680>:
  {
    struct MonoClass * in_ic;
    struct MonoClass * from_ic;
    char * ic_qname;
    char * ic_fqname;
    char * ic_class_name;

    D.20278 = in_class->interfaces_packed;
    D.20279 = (long unsigned int) i;
    D.20280 = D.20279 * 8;
    D.20281 = D.20278 + D.20280;
    in_ic = *D.20281;
    D.20282 = from_class->interfaces_packed;
    D.20279 = (long unsigned int) i;
    D.20280 = D.20279 * 8;
    D.20283 = D.20282 + D.20280;
    from_ic = *D.20283;
    D.20284 = &in_ic->byval_arg;
    ic_class_name = mono_type_get_name_full (D.20284, 0);
    ic_qname = monoeg_g_strconcat (ic_class_name, ".", name, 0B);
    D.20287 = in_ic->name_space;
    if (D.20287 != 0B) goto <D.20288>; else goto <D.20285>;
    <D.20288>:
    D.20287 = in_ic->name_space;
    D.20289 = *D.20287;
    if (D.20289 != 0) goto <D.20290>; else goto <D.20285>;
    <D.20290>:
    D.20287 = in_ic->name_space;
    ic_fqname = monoeg_g_strconcat (D.20287, ".", ic_class_name, ".", name, 0B);
    goto <D.20286>;
    <D.20285>:
    ic_fqname = 0B;
    <D.20286>:
    if (ic != 0B) goto <D.20292>; else goto <D.20293>;
    <D.20292>:
    iftmp.67 = name;
    goto <D.20294>;
    <D.20293>:
    iftmp.67 = 0B;
    <D.20294>:
    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.20295>;
    <D.20295>:
  }
  i = i + 1;
  <D.18681>:
  D.20275 = in_class->interface_offsets_count;
  D.20296 = (int) D.20275;
  if (D.20296 > i) goto <D.18680>; else goto <D.18682>;
  <D.18682>:
  in_class = in_class->parent;
  from_class = from_class->parent;
  <D.18674>:
  if (in_class != 0B) goto <D.18683>; else goto <D.18673>;
  <D.18673>:
  D.20297 = in_class == 0B;
  D.20185 = from_class == 0B;
  D.20298 = D.20297 ^ D.20185;
  D.20299 = (long int) D.20298;
  D.20300 = __builtin_expect (D.20299, 0);
  if (D.20300 != 0) goto <D.20301>; else goto <D.20302>;
  <D.20301>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 725, "!in_class == !from_class");
  <D.20302>:
  if (is_interface != 0) goto <D.20303>; else goto <D.20304>;
  <D.20303>:
  D.20305 = mono_defaults.object_class;
  D.20305 = mono_defaults.object_class;
  result = find_method_in_class (D.20305, name, qname, fqname, sig, D.20305);
  <D.20304>:
  out:
  monoeg_g_free (class_name);
  monoeg_g_free (fqname);
  monoeg_g_free (qname);
  D.20306 = result;
  return D.20306;
}


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.20308;
  struct MonoImage * D.20311;
  long unsigned int D.20312;
  long unsigned int D.20313;
  struct MonoMethod * * D.20316;
  unsigned char D.20319;
  struct MonoGenericClass * D.20324;
  unsigned int D.20327;
  unsigned int i.68;
  unsigned int D.20329;
  int D.20330;
  unsigned int D.20331;
  int D.18585;
  int D.18594;
  int D.18603;
  unsigned int D.20339;
  unsigned int D.20340;
  long unsigned int D.20345;
  long unsigned int D.20346;
  int D.20349;
  struct MonoMethod * D.20352;
  unsigned int D.20353;
  long unsigned int D.20356;
  long unsigned int D.20357;
  struct MonoMethod * * D.20358;
  int D.18619;
  const char * D.20366;
  int D.18628;
  int D.18637;
  int D.20373;
  int D.20376;
  int i;

  D.20308 = klass->type_token;
  if (D.20308 != 0) goto <D.20309>; else goto <D.20310>;
  <D.20309>:
  D.20311 = klass->image;
  D.20312 = BIT_FIELD_REF <*D.20311, 64, 192>;
  D.20313 = D.20312 & 34359738368;
  if (D.20313 == 0) goto <D.20314>; else goto <D.20315>;
  <D.20314>:
  D.20316 = klass->methods;
  if (D.20316 == 0B) goto <D.20317>; else goto <D.20318>;
  <D.20317>:
  D.20319 = klass->rank;
  if (D.20319 == 0) goto <D.20320>; else goto <D.20321>;
  <D.20320>:
  if (klass == from_class) goto <D.20322>; else goto <D.20323>;
  <D.20322>:
  D.20324 = from_class->generic_class;
  if (D.20324 == 0B) goto <D.20325>; else goto <D.20326>;
  <D.20325>:
  i = 0;
  goto <D.18606>;
  <D.18605>:
  {
    guint32 cols[6];
    struct MonoMethod * method;
    const char * m_name;
    struct MonoMethodSignature * other_sig;

    try
      {
        D.20311 = klass->image;
        D.20327 = klass->method.first;
        i.68 = (unsigned int) i;
        D.20329 = D.20327 + i.68;
        D.20330 = (int) D.20329;
        mono_metadata_decode_table_row (D.20311, 6, D.20330, &cols, 6);
        D.20311 = klass->image;
        D.20331 = cols[3];
        m_name = mono_metadata_string_heap (D.20311, D.20331);
        if (fqname == 0B) goto <D.20335>; else goto <D.20336>;
        <D.20336>:
        {
          size_t __s1_len;
          size_t __s2_len;

          D.18585 = __builtin_strcmp (m_name, fqname);
        }
        if (D.18585 != 0) goto <D.20335>; else goto <D.20333>;
        <D.20335>:
        if (qname == 0B) goto <D.20334>; else goto <D.20337>;
        <D.20337>:
        {
          size_t __s1_len;
          size_t __s2_len;

          D.18594 = __builtin_strcmp (m_name, qname);
        }
        if (D.18594 != 0) goto <D.20334>; else goto <D.20333>;
        <D.20334>:
        if (name == 0B) goto <D.20332>; else goto <D.20338>;
        <D.20338>:
        {
          size_t __s1_len;
          size_t __s2_len;

          D.18603 = __builtin_strcmp (m_name, name);
        }
        if (D.18603 != 0) goto <D.20332>; else goto <D.20333>;
        <D.20332>:
        // predicted unlikely by continue predictor.
        goto <D.18604>;
        <D.20333>:
        D.20311 = klass->image;
        D.20327 = klass->method.first;
        i.68 = (unsigned int) i;
        D.20329 = D.20327 + i.68;
        D.20339 = D.20329 + 1;
        D.20340 = D.20339 | 100663296;
        method = mono_get_method (D.20311, D.20340, klass);
        if (method != 0B) goto <D.20341>; else goto <D.20342>;
        <D.20341>:
        other_sig = mono_method_signature (method);
        if (other_sig != 0B) goto <D.20343>; else goto <D.20344>;
        <D.20343>:
        D.20345 = BIT_FIELD_REF <*sig, 64, 64>;
        D.20346 = D.20345 & 17732923532771328;
        if (D.20346 != 1407374883553280) goto <D.20347>; else goto <D.20348>;
        <D.20347>:
        D.20349 = mono_metadata_signature_equal (sig, other_sig);
        if (D.20349 != 0) goto <D.20350>; else goto <D.20351>;
        <D.20350>:
        D.20352 = method;
        return D.20352;
        <D.20351>:
        <D.20348>:
        <D.20344>:
        <D.20342>:
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.18604>:
  i = i + 1;
  <D.18606>:
  i.68 = (unsigned int) i;
  D.20353 = klass->method.count;
  if (i.68 < D.20353) goto <D.18605>; else goto <D.18607>;
  <D.18607>:
  <D.20326>:
  <D.20323>:
  <D.20321>:
  <D.20318>:
  <D.20315>:
  <D.20310>:
  mono_class_setup_methods (klass);
  D.20316 = klass->methods;
  if (D.20316 == 0B) goto <D.20354>; else goto <D.20355>;
  <D.20354>:
  D.20352 = 0B;
  return D.20352;
  <D.20355>:
  i = 0;
  goto <D.18640>;
  <D.18639>:
  {
    struct MonoMethod * m;
    struct MonoMethodSignature * msig;

    D.20316 = klass->methods;
    D.20356 = (long unsigned int) i;
    D.20357 = D.20356 * 8;
    D.20358 = D.20316 + D.20357;
    m = *D.20358;
    if (m == 0B) goto <D.20359>; else goto <D.20360>;
    <D.20359>:
    // predicted unlikely by continue predictor.
    goto <D.18610>;
    <D.20360>:
    if (fqname == 0B) goto <D.20364>; else goto <D.20365>;
    <D.20365>:
    {
      size_t __s1_len;
      size_t __s2_len;

      D.20366 = m->name;
      D.18619 = __builtin_strcmp (D.20366, fqname);
    }
    if (D.18619 != 0) goto <D.20364>; else goto <D.20362>;
    <D.20364>:
    if (qname == 0B) goto <D.20363>; else goto <D.20367>;
    <D.20367>:
    {
      size_t __s1_len;
      size_t __s2_len;

      D.20366 = m->name;
      D.18628 = __builtin_strcmp (D.20366, qname);
    }
    if (D.18628 != 0) goto <D.20363>; else goto <D.20362>;
    <D.20363>:
    if (name == 0B) goto <D.20361>; else goto <D.20368>;
    <D.20368>:
    {
      size_t __s1_len;
      size_t __s2_len;

      D.20366 = m->name;
      D.18637 = __builtin_strcmp (D.20366, name);
    }
    if (D.18637 != 0) goto <D.20361>; else goto <D.20362>;
    <D.20361>:
    // predicted unlikely by continue predictor.
    goto <D.18610>;
    <D.20362>:
    msig = mono_method_signature (m);
    if (msig == 0B) goto <D.20369>; else goto <D.20370>;
    <D.20369>:
    // predicted unlikely by continue predictor.
    goto <D.18610>;
    <D.20370>:
    D.20345 = BIT_FIELD_REF <*sig, 64, 64>;
    D.20346 = D.20345 & 17732923532771328;
    if (D.20346 == 1407374883553280) goto <D.20371>; else goto <D.20372>;
    <D.20371>:
    D.20373 = mono_metadata_signature_vararg_match (sig, msig);
    if (D.20373 != 0) goto <D.18638>; else goto <D.20374>;
    <D.20374>:
    goto <D.20375>;
    <D.20372>:
    D.20376 = mono_metadata_signature_equal (sig, msig);
    if (D.20376 != 0) goto <D.18638>; else goto <D.20377>;
    <D.20377>:
    <D.20375>:
  }
  <D.18610>:
  i = i + 1;
  <D.18640>:
  i.68 = (unsigned int) i;
  D.20353 = klass->method.count;
  if (i.68 < D.20353) goto <D.18639>; else goto <D.18638>;
  <D.18638>:
  i.68 = (unsigned int) i;
  D.20353 = klass->method.count;
  if (i.68 < D.20353) goto <D.20378>; else goto <D.20379>;
  <D.20378>:
  D.20352 = mono_class_get_method_by_index (from_class, i);
  return D.20352;
  <D.20379>:
  D.20352 = 0B;
  return D.20352;
}


mono_metadata_signature_vararg_match (struct MonoMethodSignature * sig1, struct MonoMethodSignature * sig2)
{
  long unsigned int D.20386;
  long unsigned int D.20387;
  long unsigned int D.20388;
  long unsigned int D.20389;
  short int D.20391;
  short int D.20392;
  gboolean D.20393;
  int D.20394;
  int D.20397;
  struct MonoType * D.20398;
  struct MonoType * D.20399;
  int D.20400;
  int i;

  D.20386 = BIT_FIELD_REF <*sig1, 64, 64>;
  D.20387 = BIT_FIELD_REF <*sig2, 64, 64>;
  D.20388 = D.20386 ^ D.20387;
  D.20389 = D.20388 & 18014398509481984;
  if (D.20389 != 0) goto <D.20384>; else goto <D.20390>;
  <D.20390>:
  D.20391 = sig1->sentinelpos;
  D.20392 = sig2->sentinelpos;
  if (D.20391 != D.20392) goto <D.20384>; else goto <D.20385>;
  <D.20384>:
  D.20393 = 0;
  return D.20393;
  <D.20385>:
  i = 0;
  goto <D.18562>;
  <D.18561>:
  {
    struct MonoType * p1;
    struct MonoType * p2;

    p1 = sig1->params[i];
    p2 = sig2->params[i];
    D.20394 = mono_metadata_type_equal (p1, p2);
    if (D.20394 == 0) goto <D.20395>; else goto <D.20396>;
    <D.20395>:
    D.20393 = 0;
    return D.20393;
    <D.20396>:
  }
  i = i + 1;
  <D.18562>:
  D.20391 = sig1->sentinelpos;
  D.20397 = (int) D.20391;
  if (D.20397 > i) goto <D.18561>; else goto <D.18563>;
  <D.18563>:
  D.20398 = sig1->ret;
  D.20399 = sig2->ret;
  D.20400 = mono_metadata_type_equal (D.20398, D.20399);
  if (D.20400 == 0) goto <D.20401>; else goto <D.20402>;
  <D.20401>:
  D.20393 = 0;
  return D.20393;
  <D.20402>:
  D.20393 = 1;
  return D.20393;
}


mono_get_method_constrained_with_method (struct MonoImage * image, struct MonoMethod * method, struct MonoClass * constrained_class, struct MonoGenericContext * context)
{
  _Bool D.20404;
  long int D.20405;
  long int D.20406;
  struct MonoMethod * D.20409;
  struct MonoMethod * result;

  D.20404 = method == 0B;
  D.20405 = (long int) D.20404;
  D.20406 = __builtin_expect (D.20405, 0);
  if (D.20406 != 0) goto <D.20407>; else goto <D.20408>;
  <D.20407>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1932, "method");
  <D.20408>:
  mono_loader_lock ();
  result = get_method_constrained (image, method, constrained_class, context);
  mono_loader_unlock ();
  D.20409 = result;
  return D.20409;
}


get_method_constrained (struct MonoImage * image, struct MonoMethod * method, struct MonoClass * constrained_class, struct MonoGenericContext * context)
{
  struct MonoMethod * D.20413;
  long unsigned int D.20414;
  long unsigned int D.20415;
  short unsigned int D.20418;
  struct MonoMethod * D.20421;
  struct MonoGenericInst * D.20422;
  struct MonoClass * D.20425;
  struct MonoImage * D.20426;
  int D.20427;
  unsigned int D.20434;
  unsigned int D.20435;
  unsigned char D.20437;
  const char * D.20439;
  const char * D.20444;
  const char * D.20445;
  char * D.20446;
  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.20411>; else goto <D.20412>;
  <D.20411>:
  D.20413 = 0B;
  return D.20413;
  <D.20412>:
  D.20414 = BIT_FIELD_REF <*method, 64, 256>;
  D.20415 = D.20414 & 4096;
  if (D.20415 != 0) goto <D.20416>; else goto <D.20417>;
  <D.20416>:
  D.20418 = sig->generic_param_count;
  if (D.20418 != 0) goto <D.20419>; else goto <D.20420>;
  <D.20419>:
  {
    struct MonoMethodInflated * imethod;

    imethod = method;
    D.20421 = imethod->declaring;
    sig = mono_method_signature (D.20421);
    method_context = mono_method_get_context (method);
    original_sig = sig;
    D.20422 = method_context->class_inst;
    if (D.20422 != 0B) goto <D.20423>; else goto <D.20424>;
    <D.20423>:
    {
      struct MonoError error;
      struct MonoGenericContext ctx;

      try
        {
          ctx.method_inst = 0B;
          D.20422 = method_context->class_inst;
          ctx.class_inst = D.20422;
          D.20425 = method->klass;
          D.20426 = D.20425->image;
          sig = inflate_generic_signature_checked (D.20426, sig, &ctx, &error);
          D.20427 = mono_error_ok (&error);
          if (D.20427 == 0) goto <D.20428>; else goto <D.20429>;
          <D.20428>:
          mono_error_cleanup (&error);
          D.20413 = 0B;
          return D.20413;
          <D.20429>:
        }
      finally
        {
          error = {CLOBBER};
          ctx = {CLOBBER};
        }
    }
    <D.20424>:
  }
  <D.20420>:
  <D.20417>:
  D.20425 = method->klass;
  if (D.20425 != constrained_class) goto <D.20432>; else goto <D.20433>;
  <D.20432>:
  D.20425 = method->klass;
  D.20434 = D.20425->flags;
  D.20435 = D.20434 & 32;
  if (D.20435 != 0) goto <D.20430>; else goto <D.20436>;
  <D.20436>:
  D.20425 = method->klass;
  D.20437 = D.20425->byval_arg.type;
  if (D.20437 == 19) goto <D.20430>; else goto <D.20438>;
  <D.20438>:
  D.20425 = method->klass;
  D.20437 = D.20425->byval_arg.type;
  if (D.20437 == 30) goto <D.20430>; else goto <D.20431>;
  <D.20430>:
  ic = method->klass;
  <D.20431>:
  <D.20433>:
  D.20439 = method->name;
  result = find_method (constrained_class, ic, D.20439, sig, constrained_class);
  if (sig != original_sig) goto <D.20440>; else goto <D.20441>;
  <D.20440>:
  mono_metadata_free_inflated_signature (sig);
  <D.20441>:
  if (result == 0B) goto <D.20442>; else goto <D.20443>;
  <D.20442>:
  {
    char * m;

    m = mono_method_full_name (method, 1);
    D.20425 = method->klass;
    D.20444 = D.20425->name_space;
    D.20425 = method->klass;
    D.20445 = D.20425->name;
    D.20439 = method->name;
    D.20446 = image->name;
    monoeg_g_log (0B, 16, "Missing method %s.%s.%s in assembly %s method %s", D.20444, D.20445, D.20439, D.20446, m);
    monoeg_g_free (m);
    D.20413 = 0B;
    return D.20413;
  }
  <D.20443>:
  if (method_context != 0B) goto <D.20447>; else goto <D.20448>;
  <D.20447>:
  result = mono_class_inflate_generic_method (result, method_context);
  <D.20448>:
  D.20413 = result;
  return D.20413;
}


mono_get_method_constrained (struct MonoImage * image, guint32 token, struct MonoClass * constrained_class, struct MonoGenericContext * context, struct MonoMethod * * cil_method)
{
  struct MonoMethod * D.20452;
  struct MonoMethod * D.20453;
  struct MonoMethod * D.20456;
  struct MonoMethod * result;

  mono_loader_lock ();
  D.20452 = mono_get_method_from_token (image, token, 0B, context, 0B);
  *cil_method = D.20452;
  D.20453 = *cil_method;
  if (D.20453 == 0B) goto <D.20454>; else goto <D.20455>;
  <D.20454>:
  mono_loader_unlock ();
  D.20456 = 0B;
  return D.20456;
  <D.20455>:
  D.20453 = *cil_method;
  result = get_method_constrained (image, D.20453, constrained_class, context);
  mono_loader_unlock ();
  D.20456 = result;
  return D.20456;
}


mono_free_method (struct MonoMethod * method)
{
  <unnamed type> D.20458;
  unsigned int D.20459;
  <unnamed type> D.20462;
  struct MonoMethodSignature * D.20465;
  long unsigned int D.20468;
  long unsigned int D.20469;
  struct MonoClass * D.20472;
  struct MonoImage * D.20473;
  const char * D.20474;
  struct MonoMethodHeader * D.20475;
  const unsigned char * D.20478;
  struct MonoType * D.20479;
  short unsigned int D.20480;
  int D.20481;
  struct MonoExceptionClause * D.20482;
  void * D.20483;

  D.20458 = mono_profiler_get_events ();
  D.20459 = D.20458 & 65536;
  if (D.20459 != 0) goto <D.20460>; else goto <D.20461>;
  <D.20460>:
  mono_profiler_method_free (method);
  <D.20461>:
  D.20462 = mono_profiler_get_events ();
  if (D.20462 != 0) goto <D.20463>; else goto <D.20464>;
  <D.20463>:
  return;
  <D.20464>:
  D.20465 = method->signature;
  if (D.20465 != 0B) goto <D.20466>; else goto <D.20467>;
  <D.20466>:
  <D.20467>:
  D.20468 = BIT_FIELD_REF <*method, 64, 256>;
  D.20469 = D.20468 & 512;
  if (D.20469 != 0) goto <D.20470>; else goto <D.20471>;
  <D.20470>:
  {
    struct MonoMethodWrapper * mw;
    int i;

    mw = method;
    mono_marshal_free_dynamic_wrappers (method);
    D.20472 = method->klass;
    D.20473 = D.20472->image;
    mono_image_property_remove (D.20473, method);
    D.20474 = method->name;
    monoeg_g_free (D.20474);
    D.20475 = mw->header;
    if (D.20475 != 0B) goto <D.20476>; else goto <D.20477>;
    <D.20476>:
    D.20475 = mw->header;
    D.20478 = D.20475->code;
    monoeg_g_free (D.20478);
    i = 0;
    goto <D.19043>;
    <D.19042>:
    D.20475 = mw->header;
    D.20479 = D.20475->locals[i];
    monoeg_g_free (D.20479);
    i = i + 1;
    <D.19043>:
    D.20475 = mw->header;
    D.20480 = D.20475->num_locals;
    D.20481 = (int) D.20480;
    if (D.20481 > i) goto <D.19042>; else goto <D.19044>;
    <D.19044>:
    D.20475 = mw->header;
    D.20482 = D.20475->clauses;
    monoeg_g_free (D.20482);
    D.20475 = mw->header;
    monoeg_g_free (D.20475);
    <D.20477>:
    D.20483 = mw->method_data;
    monoeg_g_free (D.20483);
    D.20465 = method->signature;
    monoeg_g_free (D.20465);
    monoeg_g_free (method);
  }
  <D.20471>:
}


mono_method_get_param_names (struct MonoMethod * method, const char * * names)
{
  long unsigned int D.20485;
  long unsigned int D.20486;
  short unsigned int D.20491;
  long unsigned int D.20494;
  long unsigned int D.20495;
  const char * * D.20496;
  int D.20497;
  unsigned char D.20498;
  struct MonoImage * D.20501;
  long unsigned int D.20502;
  long unsigned int D.20503;
  struct MonoClass * D.20506;
  struct MonoImage * D.20507;
  struct GHashTable * D.20508;
  char * * D.20511;
  sizetype D.20514;
  sizetype D.20515;
  sizetype D.20516;
  char * * D.20517;
  char * D.20518;
  struct MonoMethodSignature * D.20521;
  short unsigned int D.20522;
  int D.20523;
  long unsigned int D.20524;
  struct GHashTable * D.20527;
  char * * D.20532;
  char * D.20533;
  unsigned int D.20536;
  int D.20537;
  <unnamed-unsigned:24> D.20538;
  unsigned int D.20539;
  int idx.69;
  unsigned int D.20543;
  <unnamed-unsigned:24> D.20545;
  int D.20546;
  int D.20547;
  unsigned int D.20548;
  unsigned int D.20551;
  unsigned int D.20554;
  long unsigned int D.20555;
  long unsigned int D.20556;
  const char * * D.20557;
  unsigned int D.20558;
  const char * D.20559;
  int i;
  int lastp;
  struct MonoClass * klass;
  struct MonoTableInfo * methodt;
  struct MonoTableInfo * paramt;
  struct MonoMethodSignature * signature;
  guint32 idx;

  D.20485 = BIT_FIELD_REF <*method, 64, 256>;
  D.20486 = D.20485 & 4096;
  if (D.20486 != 0) goto <D.20487>; else goto <D.20488>;
  <D.20487>:
  method = MEM[(struct MonoMethodInflated *)method].declaring;
  <D.20488>:
  signature = mono_method_signature (method);
  if (signature == 0B) goto <D.20489>; else goto <D.20490>;
  <D.20489>:
  return;
  <D.20490>:
  D.20491 = signature->param_count;
  if (D.20491 == 0) goto <D.20492>; else goto <D.20493>;
  <D.20492>:
  return;
  <D.20493>:
  i = 0;
  goto <D.19057>;
  <D.19056>:
  D.20494 = (long unsigned int) i;
  D.20495 = D.20494 * 8;
  D.20496 = names + D.20495;
  *D.20496 = "";
  i = i + 1;
  <D.19057>:
  D.20491 = signature->param_count;
  D.20497 = (int) D.20491;
  if (D.20497 > i) goto <D.19056>; else goto <D.19058>;
  <D.19058>:
  klass = method->klass;
  D.20498 = klass->rank;
  if (D.20498 != 0) goto <D.20499>; else goto <D.20500>;
  <D.20499>:
  return;
  <D.20500>:
  mono_class_init (klass);
  D.20501 = klass->image;
  D.20502 = BIT_FIELD_REF <*D.20501, 64, 192>;
  D.20503 = D.20502 & 34359738368;
  if (D.20503 != 0) goto <D.20504>; else goto <D.20505>;
  <D.20504>:
  {
    struct MonoReflectionMethodAux * method_aux;

    D.20506 = method->klass;
    D.20507 = D.20506->image;
    D.20508 = MEM[(struct MonoDynamicImage *)D.20507].method_aux_hash;
    method_aux = monoeg_g_hash_table_lookup (D.20508, method);
    if (method_aux != 0B) goto <D.20509>; else goto <D.20510>;
    <D.20509>:
    D.20511 = method_aux->param_names;
    if (D.20511 != 0B) goto <D.20512>; else goto <D.20513>;
    <D.20512>:
    i = 0;
    goto <D.19061>;
    <D.19060>:
    D.20511 = method_aux->param_names;
    D.20514 = (sizetype) i;
    D.20515 = D.20514 + 1;
    D.20516 = D.20515 * 8;
    D.20517 = D.20511 + D.20516;
    D.20518 = *D.20517;
    if (D.20518 != 0B) goto <D.20519>; else goto <D.20520>;
    <D.20519>:
    D.20494 = (long unsigned int) i;
    D.20495 = D.20494 * 8;
    D.20496 = names + D.20495;
    D.20511 = method_aux->param_names;
    D.20514 = (sizetype) i;
    D.20515 = D.20514 + 1;
    D.20516 = D.20515 * 8;
    D.20517 = D.20511 + D.20516;
    D.20518 = *D.20517;
    *D.20496 = D.20518;
    <D.20520>:
    i = i + 1;
    <D.19061>:
    D.20521 = mono_method_signature (method);
    D.20522 = D.20521->param_count;
    D.20523 = (int) D.20522;
    if (D.20523 > i) goto <D.19060>; else goto <D.19062>;
    <D.19062>:
    <D.20513>:
    <D.20510>:
    return;
  }
  <D.20505>:
  D.20485 = BIT_FIELD_REF <*method, 64, 256>;
  D.20524 = D.20485 & 124;
  if (D.20524 != 0) goto <D.20525>; else goto <D.20526>;
  <D.20525>:
  {
    char * * pnames;

    pnames = 0B;
    D.20501 = klass->image;
    mono_image_lock (D.20501);
    D.20501 = klass->image;
    D.20527 = D.20501->wrapper_param_names;
    if (D.20527 != 0B) goto <D.20528>; else goto <D.20529>;
    <D.20528>:
    D.20501 = klass->image;
    D.20527 = D.20501->wrapper_param_names;
    pnames = monoeg_g_hash_table_lookup (D.20527, method);
    <D.20529>:
    D.20501 = klass->image;
    mono_image_unlock (D.20501);
    if (pnames != 0B) goto <D.20530>; else goto <D.20531>;
    <D.20530>:
    i = 0;
    goto <D.19065>;
    <D.19064>:
    D.20494 = (long unsigned int) i;
    D.20495 = D.20494 * 8;
    D.20496 = names + D.20495;
    D.20494 = (long unsigned int) i;
    D.20495 = D.20494 * 8;
    D.20532 = pnames + D.20495;
    D.20533 = *D.20532;
    *D.20496 = D.20533;
    i = i + 1;
    <D.19065>:
    D.20491 = signature->param_count;
    D.20497 = (int) D.20491;
    if (D.20497 > i) goto <D.19064>; else goto <D.19066>;
    <D.19066>:
    <D.20531>:
    return;
  }
  <D.20526>:
  D.20501 = klass->image;
  methodt = &D.20501->tables[6];
  D.20501 = klass->image;
  paramt = &D.20501->tables[8];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.20534>; else goto <D.20535>;
  <D.20534>:
  {
    guint32 cols[3];
    guint param_index;

    try
      {
        D.20536 = idx + 4294967295;
        D.20537 = (int) D.20536;
        param_index = mono_metadata_decode_row_col (methodt, D.20537, 5);
        D.20538 = methodt->rows;
        D.20539 = (unsigned int) D.20538;
        if (D.20539 > idx) goto <D.20540>; else goto <D.20541>;
        <D.20540>:
        idx.69 = (int) idx;
        D.20543 = mono_metadata_decode_row_col (methodt, idx.69, 5);
        lastp = (int) D.20543;
        goto <D.20544>;
        <D.20541>:
        D.20545 = paramt->rows;
        D.20546 = (int) D.20545;
        lastp = D.20546 + 1;
        <D.20544>:
        i = (int) param_index;
        goto <D.19070>;
        <D.19069>:
        D.20547 = i + -1;
        mono_metadata_decode_row (paramt, D.20547, &cols, 3);
        D.20548 = cols[1];
        if (D.20548 != 0) goto <D.20549>; else goto <D.20550>;
        <D.20549>:
        D.20548 = cols[1];
        D.20491 = signature->param_count;
        D.20551 = (unsigned int) D.20491;
        if (D.20548 <= D.20551) goto <D.20552>; else goto <D.20553>;
        <D.20552>:
        D.20548 = cols[1];
        D.20554 = D.20548 + 4294967295;
        D.20555 = (long unsigned int) D.20554;
        D.20556 = D.20555 * 8;
        D.20557 = names + D.20556;
        D.20501 = klass->image;
        D.20558 = cols[2];
        D.20559 = mono_metadata_string_heap (D.20501, D.20558);
        *D.20557 = D.20559;
        <D.20553>:
        <D.20550>:
        i = i + 1;
        <D.19070>:
        if (i < lastp) goto <D.19069>; else goto <D.19071>;
        <D.19071>:
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.20535>:
}


mono_method_get_param_token (struct MonoMethod * method, int index)
{
  struct MonoImage * D.20561;
  long unsigned int D.20562;
  long unsigned int D.20563;
  unsigned int D.20568;
  int D.20569;
  uint32_t D.20572;
  unsigned int index.70;
  unsigned int D.20574;
  struct MonoClass * klass;
  struct MonoTableInfo * methodt;
  guint32 idx;

  klass = method->klass;
  mono_class_init (klass);
  D.20561 = klass->image;
  D.20562 = BIT_FIELD_REF <*D.20561, 64, 192>;
  D.20563 = D.20562 & 34359738368;
  if (D.20563 != 0) goto <D.20564>; else goto <D.20565>;
  <D.20564>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "loader.c", 2100);
  <D.20565>:
  D.20561 = klass->image;
  methodt = &D.20561->tables[6];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.20566>; else goto <D.20567>;
  <D.20566>:
  {
    guint param_index;

    D.20568 = idx + 4294967295;
    D.20569 = (int) D.20568;
    param_index = mono_metadata_decode_row_col (methodt, D.20569, 5);
    if (index == -1) goto <D.20570>; else goto <D.20571>;
    <D.20570>:
    D.20572 = 134217728;
    return D.20572;
    <D.20571>:
    index.70 = (unsigned int) index;
    D.20574 = param_index + index.70;
    D.20572 = D.20574 | 134217728;
    return D.20572;
  }
  <D.20567>:
  D.20572 = 0;
  return D.20572;
}


mono_method_get_marshal_info (struct MonoMethod * method, struct MonoMarshalSpec * * mspecs)
{
  _Bool D.20576;
  long int D.20577;
  long int D.20578;
  long unsigned int D.20581;
  long unsigned int D.20582;
  struct MonoMarshalSpec * * D.20583;
  short unsigned int D.20584;
  int D.20585;
  struct MonoClass * D.20586;
  struct MonoImage * D.20587;
  long unsigned int D.20588;
  long unsigned int D.20589;
  struct GHashTable * D.20592;
  struct MonoMarshalSpec * * D.20595;
  struct MonoMarshalSpec * * D.20598;
  struct MonoMarshalSpec * D.20599;
  void * D.20602;
  struct MonoMarshalSpec * D.20603;
  char * D.20604;
  gchar * D.20605;
  char * D.20606;
  gchar * D.20607;
  struct MonoImage * D.20608;
  unsigned int D.20611;
  int D.20612;
  <unnamed-unsigned:24> D.20613;
  unsigned int D.20614;
  int idx.71;
  unsigned int D.20618;
  <unnamed-unsigned:24> D.20620;
  int D.20621;
  int D.20622;
  unsigned int D.20623;
  unsigned int D.20624;
  unsigned int D.20627;
  unsigned int D.20628;
  unsigned int D.20631;
  _Bool D.20632;
  long int D.20633;
  long int D.20634;
  long unsigned int D.20637;
  long unsigned int D.20638;
  struct MonoMarshalSpec * * D.20639;
  struct MonoMarshalSpec * D.20640;
  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.20576 = signature == 0B;
  D.20577 = (long int) D.20576;
  D.20578 = __builtin_expect (D.20577, 0);
  if (D.20578 != 0) goto <D.20579>; else goto <D.20580>;
  <D.20579>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2129, "signature");
  <D.20580>:
  i = 0;
  goto <D.19092>;
  <D.19091>:
  D.20581 = (long unsigned int) i;
  D.20582 = D.20581 * 8;
  D.20583 = mspecs + D.20582;
  *D.20583 = 0B;
  i = i + 1;
  <D.19092>:
  D.20584 = signature->param_count;
  D.20585 = (int) D.20584;
  if (D.20585 >= i) goto <D.19091>; else goto <D.19093>;
  <D.19093>:
  D.20586 = method->klass;
  D.20587 = D.20586->image;
  D.20588 = BIT_FIELD_REF <*D.20587, 64, 192>;
  D.20589 = D.20588 & 34359738368;
  if (D.20589 != 0) goto <D.20590>; else goto <D.20591>;
  <D.20590>:
  {
    struct MonoReflectionMethodAux * method_aux;

    D.20586 = method->klass;
    D.20587 = D.20586->image;
    D.20592 = MEM[(struct MonoDynamicImage *)D.20587].method_aux_hash;
    method_aux = monoeg_g_hash_table_lookup (D.20592, method);
    if (method_aux != 0B) goto <D.20593>; else goto <D.20594>;
    <D.20593>:
    D.20595 = method_aux->param_marshall;
    if (D.20595 != 0B) goto <D.20596>; else goto <D.20597>;
    <D.20596>:
    {
      struct MonoMarshalSpec * * dyn_specs;

      dyn_specs = method_aux->param_marshall;
      i = 0;
      goto <D.19097>;
      <D.19096>:
      D.20581 = (long unsigned int) i;
      D.20582 = D.20581 * 8;
      D.20598 = dyn_specs + D.20582;
      D.20599 = *D.20598;
      if (D.20599 != 0B) goto <D.20600>; else goto <D.20601>;
      <D.20600>:
      D.20581 = (long unsigned int) i;
      D.20582 = D.20581 * 8;
      D.20583 = mspecs + D.20582;
      D.20602 = monoeg_malloc0 (24);
      *D.20583 = D.20602;
      D.20581 = (long unsigned int) i;
      D.20582 = D.20581 * 8;
      D.20583 = mspecs + D.20582;
      D.20603 = *D.20583;
      D.20581 = (long unsigned int) i;
      D.20582 = D.20581 * 8;
      D.20598 = dyn_specs + D.20582;
      D.20599 = *D.20598;
      memcpy (D.20603, D.20599, 24);
      D.20581 = (long unsigned int) i;
      D.20582 = D.20581 * 8;
      D.20583 = mspecs + D.20582;
      D.20603 = *D.20583;
      D.20581 = (long unsigned int) i;
      D.20582 = D.20581 * 8;
      D.20598 = dyn_specs + D.20582;
      D.20599 = *D.20598;
      D.20604 = D.20599->data.custom_data.custom_name;
      D.20605 = monoeg_strdup (D.20604);
      D.20603->data.custom_data.custom_name = D.20605;
      D.20581 = (long unsigned int) i;
      D.20582 = D.20581 * 8;
      D.20583 = mspecs + D.20582;
      D.20603 = *D.20583;
      D.20581 = (long unsigned int) i;
      D.20582 = D.20581 * 8;
      D.20598 = dyn_specs + D.20582;
      D.20599 = *D.20598;
      D.20606 = D.20599->data.custom_data.cookie;
      D.20607 = monoeg_strdup (D.20606);
      D.20603->data.custom_data.cookie = D.20607;
      <D.20601>:
      i = i + 1;
      <D.19097>:
      D.20584 = signature->param_count;
      D.20585 = (int) D.20584;
      if (D.20585 >= i) goto <D.19096>; else goto <D.19098>;
      <D.19098>:
    }
    <D.20597>:
    <D.20594>:
    return;
  }
  <D.20591>:
  mono_class_init (klass);
  D.20608 = klass->image;
  methodt = &D.20608->tables[6];
  D.20608 = klass->image;
  paramt = &D.20608->tables[8];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.20609>; else goto <D.20610>;
  <D.20609>:
  {
    guint32 cols[3];
    guint param_index;

    try
      {
        D.20611 = idx + 4294967295;
        D.20612 = (int) D.20611;
        param_index = mono_metadata_decode_row_col (methodt, D.20612, 5);
        D.20613 = methodt->rows;
        D.20614 = (unsigned int) D.20613;
        if (D.20614 > idx) goto <D.20615>; else goto <D.20616>;
        <D.20615>:
        idx.71 = (int) idx;
        D.20618 = mono_metadata_decode_row_col (methodt, idx.71, 5);
        lastp = (int) D.20618;
        goto <D.20619>;
        <D.20616>:
        D.20620 = paramt->rows;
        D.20621 = (int) D.20620;
        lastp = D.20621 + 1;
        <D.20619>:
        i = (int) param_index;
        goto <D.19103>;
        <D.19102>:
        D.20622 = i + -1;
        mono_metadata_decode_row (paramt, D.20622, &cols, 3);
        D.20623 = cols[0];
        D.20624 = D.20623 & 8192;
        if (D.20624 != 0) goto <D.20625>; else goto <D.20626>;
        <D.20625>:
        D.20627 = cols[1];
        D.20584 = signature->param_count;
        D.20628 = (unsigned int) D.20584;
        if (D.20627 <= D.20628) goto <D.20629>; else goto <D.20630>;
        <D.20629>:
        {
          const char * tp;

          D.20608 = klass->image;
          D.20622 = i + -1;
          D.20631 = (unsigned int) D.20622;
          tp = mono_metadata_get_marshal_info (D.20608, D.20631, 0);
          D.20632 = tp == 0B;
          D.20633 = (long int) D.20632;
          D.20634 = __builtin_expect (D.20633, 0);
          if (D.20634 != 0) goto <D.20635>; else goto <D.20636>;
          <D.20635>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2171, "tp");
          <D.20636>:
          D.20627 = cols[1];
          D.20637 = (long unsigned int) D.20627;
          D.20638 = D.20637 * 8;
          D.20639 = mspecs + D.20638;
          D.20608 = klass->image;
          D.20640 = mono_metadata_parse_marshal_spec (D.20608, tp);
          *D.20639 = D.20640;
        }
        <D.20630>:
        <D.20626>:
        i = i + 1;
        <D.19103>:
        if (i < lastp) goto <D.19102>; else goto <D.19104>;
        <D.19104>:
        return;
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.20610>:
}


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

  D.20644 = __builtin_object_size (__dest, 0);
  D.20643 = __builtin___memcpy_chk (__dest, __src, __len, D.20644);
  return D.20643;
}


mono_method_has_marshal_info (struct MonoMethod * method)
{
  struct MonoClass * D.20646;
  struct MonoImage * D.20647;
  long unsigned int D.20648;
  long unsigned int D.20649;
  struct GHashTable * D.20652;
  long unsigned int D.20655;
  long unsigned int D.20656;
  struct MonoMarshalSpec * * D.20657;
  struct MonoMarshalSpec * D.20658;
  mono_bool D.20661;
  struct MonoMethodSignature * D.20662;
  short unsigned int D.20663;
  int D.20664;
  struct MonoImage * D.20665;
  unsigned int D.20668;
  int D.20669;
  unsigned int D.20670;
  <unnamed-unsigned:24> D.20671;
  unsigned int D.20672;
  int idx.72;
  unsigned int D.20676;
  <unnamed-unsigned:24> D.20678;
  int D.20679;
  int D.20680;
  unsigned int D.20681;
  unsigned int D.20682;
  int i;
  int lastp;
  struct MonoClass * klass;
  struct MonoTableInfo * methodt;
  struct MonoTableInfo * paramt;
  guint32 idx;

  klass = method->klass;
  D.20646 = method->klass;
  D.20647 = D.20646->image;
  D.20648 = BIT_FIELD_REF <*D.20647, 64, 192>;
  D.20649 = D.20648 & 34359738368;
  if (D.20649 != 0) goto <D.20650>; else goto <D.20651>;
  <D.20650>:
  {
    struct MonoReflectionMethodAux * method_aux;
    struct MonoMarshalSpec * * dyn_specs;

    D.20646 = method->klass;
    D.20647 = D.20646->image;
    D.20652 = MEM[(struct MonoDynamicImage *)D.20647].method_aux_hash;
    method_aux = monoeg_g_hash_table_lookup (D.20652, method);
    dyn_specs = method_aux->param_marshall;
    if (dyn_specs != 0B) goto <D.20653>; else goto <D.20654>;
    <D.20653>:
    i = 0;
    goto <D.19117>;
    <D.19116>:
    D.20655 = (long unsigned int) i;
    D.20656 = D.20655 * 8;
    D.20657 = dyn_specs + D.20656;
    D.20658 = *D.20657;
    if (D.20658 != 0B) goto <D.20659>; else goto <D.20660>;
    <D.20659>:
    D.20661 = 1;
    return D.20661;
    <D.20660>:
    i = i + 1;
    <D.19117>:
    D.20662 = mono_method_signature (method);
    D.20663 = D.20662->param_count;
    D.20664 = (int) D.20663;
    if (D.20664 >= i) goto <D.19116>; else goto <D.19118>;
    <D.19118>:
    <D.20654>:
    D.20661 = 0;
    return D.20661;
  }
  <D.20651>:
  mono_class_init (klass);
  D.20665 = klass->image;
  methodt = &D.20665->tables[6];
  D.20665 = klass->image;
  paramt = &D.20665->tables[8];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.20666>; else goto <D.20667>;
  <D.20666>:
  {
    guint32 cols[3];
    guint param_index;

    try
      {
        D.20668 = idx + 4294967295;
        D.20669 = (int) D.20668;
        param_index = mono_metadata_decode_row_col (methodt, D.20669, 5);
        D.20670 = idx + 1;
        D.20671 = methodt->rows;
        D.20672 = (unsigned int) D.20671;
        if (D.20670 < D.20672) goto <D.20673>; else goto <D.20674>;
        <D.20673>:
        idx.72 = (int) idx;
        D.20676 = mono_metadata_decode_row_col (methodt, idx.72, 5);
        lastp = (int) D.20676;
        goto <D.20677>;
        <D.20674>:
        D.20678 = paramt->rows;
        D.20679 = (int) D.20678;
        lastp = D.20679 + 1;
        <D.20677>:
        i = (int) param_index;
        goto <D.19122>;
        <D.19121>:
        D.20680 = i + -1;
        mono_metadata_decode_row (paramt, D.20680, &cols, 3);
        D.20681 = cols[0];
        D.20682 = D.20681 & 8192;
        if (D.20682 != 0) goto <D.20683>; else goto <D.20684>;
        <D.20683>:
        D.20661 = 1;
        return D.20661;
        <D.20684>:
        i = i + 1;
        <D.19122>:
        if (i < lastp) goto <D.19121>; else goto <D.19123>;
        <D.19123>:
        D.20661 = 0;
        return D.20661;
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.20667>:
  D.20661 = 0;
  return D.20661;
}


mono_method_get_wrapper_data (struct MonoMethod * method, guint32 id)
{
  _Bool D.20687;
  long int D.20688;
  long int D.20689;
  long unsigned int D.20692;
  long unsigned int D.20693;
  _Bool D.20694;
  long int D.20695;
  long int D.20696;
  long unsigned int D.20699;
  _Bool D.20702;
  long int D.20703;
  long int D.20704;
  void * D.20707;
  long int D.20708;
  unsigned int D.20709;
  _Bool D.20710;
  long int D.20711;
  long int D.20712;
  void * D.20715;
  long unsigned int D.20716;
  long unsigned int D.20717;
  void * * D.20718;
  void * * data;

  D.20687 = method == 0B;
  D.20688 = (long int) D.20687;
  D.20689 = __builtin_expect (D.20688, 0);
  if (D.20689 != 0) goto <D.20690>; else goto <D.20691>;
  <D.20690>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2231, "method != NULL");
  <D.20691>:
  D.20692 = BIT_FIELD_REF <*method, 64, 256>;
  D.20693 = D.20692 & 124;
  D.20694 = D.20693 == 0;
  D.20695 = (long int) D.20694;
  D.20696 = __builtin_expect (D.20695, 0);
  if (D.20696 != 0) goto <D.20697>; else goto <D.20698>;
  <D.20697>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2232, "method->wrapper_type != MONO_WRAPPER_NONE");
  <D.20698>:
  D.20692 = BIT_FIELD_REF <*method, 64, 256>;
  D.20699 = D.20692 & 4096;
  if (D.20699 != 0) goto <D.20700>; else goto <D.20701>;
  <D.20700>:
  method = MEM[(struct MonoMethodInflated *)method].declaring;
  <D.20701>:
  data = MEM[(struct MonoMethodWrapper *)method].method_data;
  D.20702 = data == 0B;
  D.20703 = (long int) D.20702;
  D.20704 = __builtin_expect (D.20703, 0);
  if (D.20704 != 0) goto <D.20705>; else goto <D.20706>;
  <D.20705>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2237, "data != NULL");
  <D.20706>:
  D.20707 = *data;
  D.20708 = (long int) D.20707;
  D.20709 = (unsigned int) D.20708;
  D.20710 = D.20709 < id;
  D.20711 = (long int) D.20710;
  D.20712 = __builtin_expect (D.20711, 0);
  if (D.20712 != 0) goto <D.20713>; else goto <D.20714>;
  <D.20713>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2238, "id <= GPOINTER_TO_UINT (*data)");
  <D.20714>:
  D.20716 = (long unsigned int) id;
  D.20717 = D.20716 * 8;
  D.20718 = data + D.20717;
  D.20715 = *D.20718;
  return D.20715;
}


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

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


stack_walk_adapter (struct MonoStackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  <unnamed type> D.20722;
  gboolean D.20723;
  struct MonoJitInfo * D.20724;
  _Bool D.20725;
  long int D.20726;
  long int D.20727;
  mono_bool (*<T10f3>) (struct MonoMethod *, int32_t, int32_t, mono_bool, void *) D.20730;
  struct MonoMethod * D.20731;
  int D.20732;
  int D.20733;
  int D.20734;
  void * D.20735;
  struct StackWalkUserData * d;

  d = data;
  D.20722 = frame->type;
  switch (D.20722) <default: <D.19142>, case 0: <D.19141>, case 1: <D.19139>, case 2: <D.19140>>
  <D.19139>:
  <D.19140>:
  D.20723 = 0;
  return D.20723;
  <D.19141>:
  D.20724 = frame->ji;
  D.20725 = D.20724 == 0B;
  D.20726 = (long int) D.20725;
  D.20727 = __builtin_expect (D.20726, 0);
  if (D.20727 != 0) goto <D.20728>; else goto <D.20729>;
  <D.20728>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2257, "frame->ji");
  <D.20729>:
  D.20730 = d->func;
  D.20724 = frame->ji;
  D.20731 = mono_jit_info_get_method (D.20724);
  D.20732 = frame->native_offset;
  D.20733 = frame->il_offset;
  D.20734 = frame->managed;
  D.20735 = d->user_data;
  D.20723 = D.20730 (D.20731, D.20732, D.20733, D.20734, D.20735);
  return D.20723;
  <D.19142>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "loader.c", 2261);
  D.20723 = 0;
  return D.20723;
}


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

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


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

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


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

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


mono_loader_lock ()
{
  _Bool D.20746;
  long int D.20747;
  long int D.20748;
  int loader_lock_track_ownership.73;
  _Bool D.20752;
  long int D.20753;
  long int D.20754;
  unsigned int loader_lock_nest_id.74;
  void * D.20758;
  long int D.20759;
  unsigned int D.20760;
  unsigned int D.20761;
  long unsigned int D.20762;
  void * D.20763;

  {
    int ret;

    ret = pthread_mutex_lock (&loader_mutex.mutex);
    if (ret != 0) goto <D.20744>; else goto <D.20745>;
    <D.20744>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.20745>:
    D.20746 = ret != 0;
    D.20747 = (long int) D.20746;
    D.20748 = __builtin_expect (D.20747, 0);
    if (D.20748 != 0) goto <D.20749>; else goto <D.20750>;
    <D.20749>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2308, "ret == 0");
    <D.20750>:
  }
  loader_lock_track_ownership.73 = loader_lock_track_ownership;
  D.20752 = loader_lock_track_ownership.73 != 0;
  D.20753 = (long int) D.20752;
  D.20754 = __builtin_expect (D.20753, 0);
  if (D.20754 != 0) goto <D.20755>; else goto <D.20756>;
  <D.20755>:
  loader_lock_nest_id.74 = loader_lock_nest_id;
  loader_lock_nest_id.74 = loader_lock_nest_id;
  D.20758 = pthread_getspecific (loader_lock_nest_id.74);
  D.20759 = (long int) D.20758;
  D.20760 = (unsigned int) D.20759;
  D.20761 = D.20760 + 1;
  D.20762 = (long unsigned int) D.20761;
  D.20763 = (void *) D.20762;
  mono_native_tls_set_value (loader_lock_nest_id.74, D.20763);
  <D.20756>:
}


mono_loader_unlock ()
{
  _Bool D.20766;
  long int D.20767;
  long int D.20768;
  int loader_lock_track_ownership.75;
  _Bool D.20772;
  long int D.20773;
  long int D.20774;
  unsigned int loader_lock_nest_id.76;
  void * D.20778;
  long int D.20779;
  unsigned int D.20780;
  unsigned int D.20781;
  long unsigned int D.20782;
  void * D.20783;

  {
    int ret;

    ret = pthread_mutex_unlock (&loader_mutex.mutex);
    if (ret != 0) goto <D.20764>; else goto <D.20765>;
    <D.20764>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.20765>:
    D.20766 = ret != 0;
    D.20767 = (long int) D.20766;
    D.20768 = __builtin_expect (D.20767, 0);
    if (D.20768 != 0) goto <D.20769>; else goto <D.20770>;
    <D.20769>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2317, "ret == 0");
    <D.20770>:
  }
  loader_lock_track_ownership.75 = loader_lock_track_ownership;
  D.20772 = loader_lock_track_ownership.75 != 0;
  D.20773 = (long int) D.20772;
  D.20774 = __builtin_expect (D.20773, 0);
  if (D.20774 != 0) goto <D.20775>; else goto <D.20776>;
  <D.20775>:
  loader_lock_nest_id.76 = loader_lock_nest_id;
  loader_lock_nest_id.76 = loader_lock_nest_id;
  D.20778 = pthread_getspecific (loader_lock_nest_id.76);
  D.20779 = (long int) D.20778;
  D.20780 = (unsigned int) D.20779;
  D.20781 = D.20780 + 4294967295;
  D.20782 = (long unsigned int) D.20781;
  D.20783 = (void *) D.20782;
  mono_native_tls_set_value (loader_lock_nest_id.76, D.20783);
  <D.20776>:
}


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.20785;
  long int D.20786;
  long int D.20787;
  gboolean D.20790;
  unsigned int loader_lock_nest_id.78;
  void * D.20792;
  long int D.20793;
  unsigned int D.20794;
  _Bool D.20795;

  loader_lock_track_ownership.77 = loader_lock_track_ownership;
  D.20785 = loader_lock_track_ownership.77 == 0;
  D.20786 = (long int) D.20785;
  D.20787 = __builtin_expect (D.20786, 0);
  if (D.20787 != 0) goto <D.20788>; else goto <D.20789>;
  <D.20788>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2345, "loader_lock_track_ownership");
  <D.20789>:
  loader_lock_nest_id.78 = loader_lock_nest_id;
  D.20792 = pthread_getspecific (loader_lock_nest_id.78);
  D.20793 = (long int) D.20792;
  D.20794 = (unsigned int) D.20793;
  D.20795 = D.20794 != 0;
  D.20790 = (gboolean) D.20795;
  return D.20790;
}


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


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


mono_method_signature_checked (struct MonoMethod * m, struct MonoError * error)
{
  struct MonoMethodSignature * D.20803;
  struct MonoMethodSignature * D.20806;
  long unsigned int D.20809;
  long unsigned int D.20810;
  struct MonoMethod * D.20813;
  struct MonoClass * D.20814;
  struct MonoImage * D.20815;
  struct MonoGenericContext * D.20816;
  int D.20817;
  unsigned int D.20820;
  unsigned int inflated_signatures_size.81;
  unsigned int inflated_signatures_size.82;
  unsigned int D.20823;
  unsigned int D.20824;
  _Bool D.20825;
  long int D.20826;
  long int D.20827;
  int D.20830;
  struct MonoClass * D.20831;
  struct MonoTableInfo * D.20832;
  int D.20833;
  struct MonoGenericClass * D.20834;
  _Bool D.20835;
  long int D.20836;
  long int D.20837;
  int iftmp.83;
  short unsigned int D.20845;
  int D.20846;
  int D.20847;
  short unsigned int D.20849;
  int D.20850;
  int D.20851;
  int D.20854;
  struct GHashTable * D.20859;
  int D.20862;
  unsigned int D.20865;
  const char * sig_body.84;
  unsigned int D.20871;
  unsigned int signatures_size.85;
  unsigned int signatures_size.86;
  short unsigned int D.20874;
  long unsigned int D.20880;
  long unsigned int D.20881;
  const char * D.20882;
  char * D.20883;
  <unnamed-signed:31> D.20884;
  int D.20885;
  int D.20886;
  long unsigned int D.20894;
  short unsigned int D.20902;
  int D.20903;
  int D.20904;
  unsigned char D.20905;
  <unnamed-unsigned:6> D.20906;
  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.20803 = m->signature;
  if (D.20803 != 0B) goto <D.20804>; else goto <D.20805>;
  <D.20804>:
  D.20806 = m->signature;
  return D.20806;
  <D.20805>:
  mono_loader_lock ();
  D.20803 = m->signature;
  if (D.20803 != 0B) goto <D.20807>; else goto <D.20808>;
  <D.20807>:
  mono_loader_unlock ();
  D.20806 = m->signature;
  return D.20806;
  <D.20808>:
  D.20809 = BIT_FIELD_REF <*m, 64, 256>;
  D.20810 = D.20809 & 4096;
  if (D.20810 != 0) goto <D.20811>; else goto <D.20812>;
  <D.20811>:
  {
    struct MonoMethodInflated * imethod;

    imethod = m;
    D.20813 = imethod->declaring;
    signature = mono_method_signature (D.20813);
    D.20813 = imethod->declaring;
    D.20814 = D.20813->klass;
    D.20815 = D.20814->image;
    D.20816 = mono_method_get_context (m);
    signature = inflate_generic_signature_checked (D.20815, signature, D.20816, error);
    D.20817 = mono_error_ok (error);
    if (D.20817 == 0) goto <D.20818>; else goto <D.20819>;
    <D.20818>:
    mono_loader_unlock ();
    D.20806 = 0B;
    return D.20806;
    <D.20819>:
    D.20820 = mono_metadata_signature_size (signature);
    inflated_signatures_size.81 = inflated_signatures_size;
    inflated_signatures_size.82 = D.20820 + inflated_signatures_size.81;
    inflated_signatures_size = inflated_signatures_size.82;
    mono_memory_barrier ();
    m->signature = signature;
    mono_loader_unlock ();
    D.20806 = m->signature;
    return D.20806;
  }
  <D.20812>:
  D.20823 = m->token;
  D.20824 = D.20823 >> 24;
  D.20825 = D.20824 != 6;
  D.20826 = (long int) D.20825;
  D.20827 = __builtin_expect (D.20826, 0);
  if (D.20827 != 0) goto <D.20828>; else goto <D.20829>;
  <D.20828>:
  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.20829>:
  D.20823 = m->token;
  D.20830 = (int) D.20823;
  idx = D.20830 & 16777215;
  D.20831 = m->klass;
  img = D.20831->image;
  D.20832 = &img->tables[6];
  D.20833 = idx + -1;
  sig_offset = mono_metadata_decode_row_col (D.20832, D.20833, 4);
  sig = mono_metadata_blob_heap (img, sig_offset);
  D.20831 = m->klass;
  D.20834 = D.20831->generic_class;
  D.20835 = D.20834 != 0B;
  D.20836 = (long int) D.20835;
  D.20837 = __builtin_expect (D.20836, 0);
  if (D.20837 != 0) goto <D.20838>; else goto <D.20839>;
  <D.20838>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2425, "!m->klass->generic_class");
  <D.20839>:
  container = mono_method_get_generic_container (m);
  if (container == 0B) goto <D.20840>; else goto <D.20841>;
  <D.20840>:
  D.20831 = m->klass;
  container = D.20831->generic_container;
  <D.20841>:
  D.20845 = m->iflags;
  D.20846 = (int) D.20845;
  D.20847 = D.20846 & 4096;
  if (D.20847 == 0) goto <D.20848>; else goto <D.20843>;
  <D.20848>:
  D.20849 = m->flags;
  D.20850 = (int) D.20849;
  D.20851 = D.20850 & 8192;
  if (D.20851 == 0) goto <D.20852>; else goto <D.20843>;
  <D.20852>:
  if (container == 0B) goto <D.20853>; else goto <D.20843>;
  <D.20853>:
  iftmp.83 = 1;
  goto <D.20844>;
  <D.20843>:
  iftmp.83 = 0;
  <D.20844>:
  can_cache_signature = iftmp.83;
  D.20854 = mono_metadata_method_has_param_attrs (img, idx);
  if (D.20854 != 0) goto <D.20855>; else goto <D.20856>;
  <D.20855>:
  can_cache_signature = 0;
  <D.20856>:
  if (can_cache_signature != 0) goto <D.20857>; else goto <D.20858>;
  <D.20857>:
  D.20859 = img->method_signatures;
  signature = monoeg_g_hash_table_lookup (D.20859, sig);
  <D.20858>:
  if (signature == 0B) goto <D.20860>; else goto <D.20861>;
  <D.20860>:
  {
    const char * sig_body;

    try
      {
        D.20862 = mono_verifier_verify_method_signature (img, sig_offset, error);
        if (D.20862 == 0) goto <D.20863>; else goto <D.20864>;
        <D.20863>:
        mono_loader_unlock ();
        D.20806 = 0B;
        return D.20806;
        <D.20864>:
        D.20865 = mono_metadata_decode_blob_size (sig, &sig_body);
        size = (int) D.20865;
        sig_body.84 = sig_body;
        signature = mono_metadata_parse_method_signature_full (img, container, idx, sig_body.84, 0B);
        if (signature == 0B) goto <D.20867>; else goto <D.20868>;
        <D.20867>:
        mono_error_set_from_loader_error (error);
        mono_loader_unlock ();
        D.20806 = 0B;
        return D.20806;
        <D.20868>:
        if (can_cache_signature != 0) goto <D.20869>; else goto <D.20870>;
        <D.20869>:
        D.20859 = img->method_signatures;
        monoeg_g_hash_table_insert_replace (D.20859, sig, signature, 0);
        <D.20870>:
        D.20871 = mono_metadata_signature_size (signature);
        signatures_size.85 = signatures_size;
        signatures_size.86 = D.20871 + signatures_size.85;
        signatures_size = signatures_size.86;
      }
    finally
      {
        sig_body = {CLOBBER};
      }
  }
  <D.20861>:
  D.20874 = signature->generic_param_count;
  if (D.20874 != 0) goto <D.20875>; else goto <D.20876>;
  <D.20875>:
  if (container == 0B) goto <D.20877>; else goto <D.20879>;
  <D.20879>:
  D.20880 = BIT_FIELD_REF <*container, 64, 256>;
  D.20881 = D.20880 & 2147483648;
  if (D.20881 == 0) goto <D.20877>; else goto <D.20878>;
  <D.20877>:
  mono_loader_unlock ();
  D.20831 = m->klass;
  D.20882 = m->name;
  D.20883 = img->name;
  mono_error_set_method_load (error, D.20831, D.20882, "Signature claims method has generic parameters, but generic_params table says it doesn\'t for method 0x%08x from image %s", idx, D.20883);
  D.20806 = 0B;
  return D.20806;
  <D.20878>:
  D.20884 = container->type_argc;
  D.20885 = (int) D.20884;
  D.20874 = signature->generic_param_count;
  D.20886 = (int) D.20874;
  if (D.20885 != D.20886) goto <D.20887>; else goto <D.20888>;
  <D.20887>:
  mono_loader_unlock ();
  D.20831 = m->klass;
  D.20882 = m->name;
  D.20874 = signature->generic_param_count;
  D.20886 = (int) D.20874;
  D.20884 = container->type_argc;
  D.20885 = (int) D.20884;
  D.20883 = img->name;
  mono_error_set_method_load (error, D.20831, D.20882, "Inconsistent generic parameter count.  Signature says %d, generic_params table says %d for method 0x%08x from image %s", D.20886, D.20885, idx, D.20883);
  D.20806 = 0B;
  return D.20806;
  <D.20888>:
  goto <D.20889>;
  <D.20876>:
  if (container != 0B) goto <D.20890>; else goto <D.20891>;
  <D.20890>:
  D.20880 = BIT_FIELD_REF <*container, 64, 256>;
  D.20881 = D.20880 & 2147483648;
  if (D.20881 != 0) goto <D.20892>; else goto <D.20893>;
  <D.20892>:
  D.20880 = BIT_FIELD_REF <*container, 64, 256>;
  D.20894 = D.20880 & 2147483647;
  if (D.20894 != 0) goto <D.20895>; else goto <D.20896>;
  <D.20895>:
  mono_loader_unlock ();
  D.20831 = m->klass;
  D.20882 = m->name;
  D.20883 = img->name;
  mono_error_set_method_load (error, D.20831, D.20882, "generic_params table claims method has generic parameters, but signature says it doesn\'t for method 0x%08x from image %s", idx, D.20883);
  D.20806 = 0B;
  return D.20806;
  <D.20896>:
  <D.20893>:
  <D.20891>:
  <D.20889>:
  D.20845 = m->iflags;
  D.20846 = (int) D.20845;
  D.20847 = D.20846 & 4096;
  if (D.20847 != 0) goto <D.20897>; else goto <D.20898>;
  <D.20897>:
  signature->pinvoke = 1;
  goto <D.20899>;
  <D.20898>:
  D.20849 = m->flags;
  D.20850 = (int) D.20849;
  D.20851 = D.20850 & 8192;
  if (D.20851 != 0) goto <D.20900>; else goto <D.20901>;
  <D.20900>:
  {
    MonoCallConvention conv;
    struct MonoMethodPInvoke * piinfo;

    conv = 0;
    piinfo = m;
    signature->pinvoke = 1;
    D.20902 = piinfo->piflags;
    D.20903 = (int) D.20902;
    D.20904 = D.20903 & 1792;
    switch (D.20904) <default: <D.19211>, case 0: <D.19202>, case 10: <D.19210>, case 16: <D.19209>, case 256: <D.19203>, case 512: <D.19205>, case 768: <D.19206>, case 1024: <D.19207>, case 1280: <D.19208>>
    <D.19202>:
    <D.19203>:
    conv = 0;
    goto <D.19204>;
    <D.19205>:
    conv = 1;
    goto <D.19204>;
    <D.19206>:
    conv = 2;
    goto <D.19204>;
    <D.19207>:
    conv = 3;
    goto <D.19204>;
    <D.19208>:
    conv = 4;
    goto <D.19204>;
    <D.19209>:
    <D.19210>:
    <D.19211>:
    mono_loader_unlock ();
    D.20831 = m->klass;
    D.20882 = m->name;
    D.20902 = piinfo->piflags;
    D.20903 = (int) D.20902;
    D.20883 = img->name;
    mono_error_set_method_load (error, D.20831, D.20882, "unsupported calling convention : 0x%04x for method 0x%08x from image %s", D.20903, idx, D.20883);
    D.20806 = 0B;
    return D.20806;
    <D.19204>:
    D.20905 = (unsigned char) conv;
    D.20906 = (<unnamed-unsigned:6>) D.20905;
    signature->call_convention = D.20906;
  }
  <D.20901>:
  <D.20899>:
  mono_memory_barrier ();
  m->signature = signature;
  mono_loader_unlock ();
  D.20806 = m->signature;
  return D.20806;
}


mono_memory_barrier ()
{
  __sync_synchronize ();
}


mono_method_signature (struct MonoMethod * m)
{
  struct MonoClass * D.20912;
  const char * D.20913;
  const char * D.20914;
  struct MonoMethodSignature * D.20915;
  struct MonoError error;
  struct MonoMethodSignature * sig;

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

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


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

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


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

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


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

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


mono_method_get_header (struct MonoMethod * method)
{
  short unsigned int D.20926;
  int D.20927;
  int D.20928;
  short unsigned int D.20930;
  unsigned int D.20931;
  unsigned int D.20932;
  int D.20934;
  struct MonoMethodHeader * D.20935;
  long unsigned int D.20936;
  long unsigned int D.20937;
  struct MonoMethodHeader * D.20940;
  struct MonoMethod * D.20943;
  struct MonoGenericContext * D.20946;
  struct MonoMethodHeader * D.20947;
  long unsigned int D.20948;
  struct MonoMethodHeader * D.20951;
  _Bool D.20952;
  long int D.20953;
  long int D.20954;
  unsigned int D.20957;
  unsigned int D.20958;
  _Bool D.20959;
  long int D.20960;
  long int D.20961;
  int D.20964;
  struct MonoClass * D.20965;
  struct MonoTableInfo * D.20966;
  int D.20967;
  int D.20968;
  struct MonoGenericContainer * D.20973;
  int idx;
  guint32 rva;
  struct MonoImage * img;
  void * loc;
  struct MonoMethodHeader * header;

  D.20926 = method->flags;
  D.20927 = (int) D.20926;
  D.20928 = D.20927 & 1024;
  if (D.20928 != 0) goto <D.20924>; else goto <D.20929>;
  <D.20929>:
  D.20930 = method->iflags;
  D.20931 = (unsigned int) D.20930;
  D.20932 = D.20931 & 4099;
  if (D.20932 != 0) goto <D.20924>; else goto <D.20933>;
  <D.20933>:
  D.20926 = method->flags;
  D.20927 = (int) D.20926;
  D.20934 = D.20927 & 8192;
  if (D.20934 != 0) goto <D.20924>; else goto <D.20925>;
  <D.20924>:
  D.20935 = 0B;
  return D.20935;
  <D.20925>:
  D.20936 = BIT_FIELD_REF <*method, 64, 256>;
  D.20937 = D.20936 & 4096;
  if (D.20937 != 0) goto <D.20938>; else goto <D.20939>;
  <D.20938>:
  {
    struct MonoMethodInflated * imethod;
    struct MonoMethodHeader * header;

    imethod = method;
    mono_loader_lock ();
    D.20940 = imethod->header;
    if (D.20940 != 0B) goto <D.20941>; else goto <D.20942>;
    <D.20941>:
    mono_loader_unlock ();
    D.20935 = imethod->header;
    return D.20935;
    <D.20942>:
    D.20943 = imethod->declaring;
    header = mono_method_get_header (D.20943);
    if (header == 0B) goto <D.20944>; else goto <D.20945>;
    <D.20944>:
    mono_loader_unlock ();
    D.20935 = 0B;
    return D.20935;
    <D.20945>:
    D.20946 = mono_method_get_context (method);
    D.20947 = inflate_generic_header (header, D.20946);
    imethod->header = D.20947;
    mono_loader_unlock ();
    mono_metadata_free_mh (header);
    D.20935 = imethod->header;
    return D.20935;
  }
  <D.20939>:
  D.20936 = BIT_FIELD_REF <*method, 64, 256>;
  D.20948 = D.20936 & 1148;
  if (D.20948 != 0) goto <D.20949>; else goto <D.20950>;
  <D.20949>:
  {
    struct MonoMethodWrapper * mw;

    mw = method;
    D.20951 = mw->header;
    D.20952 = D.20951 == 0B;
    D.20953 = (long int) D.20952;
    D.20954 = __builtin_expect (D.20953, 0);
    if (D.20954 != 0) goto <D.20955>; else goto <D.20956>;
    <D.20955>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2599, "mw->header");
    <D.20956>:
    D.20935 = mw->header;
    return D.20935;
  }
  <D.20950>:
  D.20957 = method->token;
  D.20958 = D.20957 >> 24;
  D.20959 = D.20958 != 6;
  D.20960 = (long int) D.20959;
  D.20961 = __builtin_expect (D.20960, 0);
  if (D.20961 != 0) goto <D.20962>; else goto <D.20963>;
  <D.20962>:
  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.20963>:
  D.20957 = method->token;
  D.20964 = (int) D.20957;
  idx = D.20964 & 16777215;
  D.20965 = method->klass;
  img = D.20965->image;
  D.20966 = &img->tables[6];
  D.20967 = idx + -1;
  rva = mono_metadata_decode_row_col (D.20966, D.20967, 0);
  D.20968 = mono_verifier_verify_method_header (img, rva, 0B);
  if (D.20968 == 0) goto <D.20969>; else goto <D.20970>;
  <D.20969>:
  D.20935 = 0B;
  return D.20935;
  <D.20970>:
  loc = mono_image_rva_map (img, rva);
  if (loc == 0B) goto <D.20971>; else goto <D.20972>;
  <D.20971>:
  D.20935 = 0B;
  return D.20935;
  <D.20972>:
  D.20973 = mono_method_get_generic_container (method);
  header = mono_metadata_parse_mh_full (img, D.20973, loc);
  D.20935 = header;
  return D.20935;
}


inflate_generic_header (struct MonoMethodHeader * header, struct MonoGenericContext * context)
{
  short unsigned int D.20975;
  long unsigned int D.20976;
  long unsigned int D.20977;
  long unsigned int D.20978;
  const unsigned char * D.20979;
  unsigned int D.20980;
  <unnamed-unsigned:15> D.20981;
  <unnamed-unsigned:15> D.20982;
  <unnamed-unsigned:1> D.20983;
  struct MonoExceptionClause * D.20984;
  struct MonoType * D.20985;
  struct MonoType * D.20986;
  int D.20987;
  long unsigned int D.20988;
  long unsigned int D.20989;
  <unnamed-unsigned:15> D.20992;
  unsigned int D.20993;
  unsigned int D.20994;
  void * D.20995;
  struct MonoExceptionClause * D.20996;
  long unsigned int D.20997;
  long unsigned int D.20998;
  unsigned int D.20999;
  struct MonoClass * D.21002;
  struct MonoClass * D.21003;
  int D.21004;
  struct MonoMethodHeader * D.21005;
  struct MonoMethodHeader * res;
  int i;

  D.20975 = header->num_locals;
  D.20976 = (long unsigned int) D.20975;
  D.20977 = D.20976 + 4;
  D.20978 = D.20977 * 8;
  res = monoeg_malloc0 (D.20978);
  D.20979 = header->code;
  res->code = D.20979;
  D.20980 = header->code_size;
  res->code_size = D.20980;
  D.20981 = header->max_stack;
  res->max_stack = D.20981;
  D.20982 = header->num_clauses;
  res->num_clauses = D.20982;
  D.20983 = header->init_locals;
  res->init_locals = D.20983;
  D.20975 = header->num_locals;
  res->num_locals = D.20975;
  D.20984 = header->clauses;
  res->clauses = D.20984;
  i = 0;
  goto <D.18714>;
  <D.18713>:
  D.20985 = header->locals[i];
  D.20986 = mono_class_inflate_generic_type (D.20985, context);
  res->locals[i] = D.20986;
  i = i + 1;
  <D.18714>:
  D.20975 = header->num_locals;
  D.20987 = (int) D.20975;
  if (D.20987 > i) goto <D.18713>; else goto <D.18715>;
  <D.18715>:
  D.20988 = BIT_FIELD_REF <*res, 64, 64>;
  D.20989 = D.20988 & 9223090561878065152;
  if (D.20989 != 0) goto <D.20990>; else goto <D.20991>;
  <D.20990>:
  D.20984 = header->clauses;
  D.20992 = res->num_clauses;
  D.20993 = (unsigned int) D.20992;
  D.20994 = D.20993 * 32;
  D.20995 = monoeg_g_memdup (D.20984, D.20994);
  res->clauses = D.20995;
  i = 0;
  goto <D.18719>;
  <D.18718>:
  {
    struct MonoExceptionClause * clause;

    D.20996 = res->clauses;
    D.20997 = (long unsigned int) i;
    D.20998 = D.20997 * 32;
    clause = D.20996 + D.20998;
    D.20999 = clause->flags;
    if (D.20999 != 0) goto <D.21000>; else goto <D.21001>;
    <D.21000>:
    // predicted unlikely by continue predictor.
    goto <D.18717>;
    <D.21001>:
    D.21002 = clause->data.catch_class;
    D.21003 = mono_class_inflate_generic_class (D.21002, context);
    clause->data.catch_class = D.21003;
  }
  <D.18717>:
  i = i + 1;
  <D.18719>:
  D.20982 = header->num_clauses;
  D.21004 = (int) D.20982;
  if (D.21004 > i) goto <D.18718>; else goto <D.18720>;
  <D.18720>:
  <D.20991>:
  D.21005 = res;
  return D.21005;
}


mono_method_get_flags (struct MonoMethod * method, guint32 * iflags)
{
  short unsigned int D.21009;
  unsigned int D.21010;
  uint32_t D.21011;
  short unsigned int D.21012;

  if (iflags != 0B) goto <D.21007>; else goto <D.21008>;
  <D.21007>:
  D.21009 = method->iflags;
  D.21010 = (unsigned int) D.21009;
  *iflags = D.21010;
  <D.21008>:
  D.21012 = method->flags;
  D.21011 = (uint32_t) D.21012;
  return D.21011;
}


mono_method_get_index (struct MonoMethod * method)
{
  unsigned char D.21014;
  uint32_t D.21017;
  unsigned int D.21018;
  unsigned char D.21021;
  struct MonoMethod * * D.21024;
  long unsigned int D.21025;
  long unsigned int D.21026;
  struct MonoMethod * * D.21027;
  struct MonoMethod * D.21028;
  struct MonoImage * D.21031;
  long unsigned int D.21032;
  long unsigned int D.21033;
  unsigned int D.21036;
  unsigned int i.87;
  unsigned int D.21038;
  unsigned int D.21039;
  unsigned int D.21040;
  struct MonoClass * klass;
  int i;

  klass = method->klass;
  D.21014 = klass->rank;
  if (D.21014 != 0) goto <D.21015>; else goto <D.21016>;
  <D.21015>:
  D.21017 = 0;
  return D.21017;
  <D.21016>:
  D.21018 = method->token;
  if (D.21018 != 0) goto <D.21019>; else goto <D.21020>;
  <D.21019>:
  D.21018 = method->token;
  D.21017 = D.21018 & 16777215;
  return D.21017;
  <D.21020>:
  mono_class_setup_methods (klass);
  D.21021 = klass->exception_type;
  if (D.21021 != 0) goto <D.21022>; else goto <D.21023>;
  <D.21022>:
  D.21017 = 0;
  return D.21017;
  <D.21023>:
  i = 0;
  goto <D.19248>;
  <D.19247>:
  D.21024 = klass->methods;
  D.21025 = (long unsigned int) i;
  D.21026 = D.21025 * 8;
  D.21027 = D.21024 + D.21026;
  D.21028 = *D.21027;
  if (D.21028 == method) goto <D.21029>; else goto <D.21030>;
  <D.21029>:
  D.21031 = klass->image;
  D.21032 = BIT_FIELD_REF <*D.21031, 64, 192>;
  D.21033 = D.21032 & 137438953472;
  if (D.21033 != 0) goto <D.21034>; else goto <D.21035>;
  <D.21034>:
  D.21031 = klass->image;
  D.21036 = klass->method.first;
  i.87 = (unsigned int) i;
  D.21038 = D.21036 + i.87;
  D.21039 = D.21038 + 1;
  D.21017 = mono_metadata_translate_token_index (D.21031, 6, D.21039);
  return D.21017;
  <D.21035>:
  D.21036 = klass->method.first;
  i.87 = (unsigned int) i;
  D.21038 = D.21036 + i.87;
  D.21017 = D.21038 + 1;
  return D.21017;
  <D.21030>:
  i = i + 1;
  <D.19248>:
  i.87 = (unsigned int) i;
  D.21040 = klass->method.count;
  if (i.87 < D.21040) goto <D.19247>; else goto <D.19249>;
  <D.19249>:
  D.21017 = 0;
  return D.21017;
}


