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

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


mono_native_tls_alloc (pthread_key_t * key, void * destructor)
{
  int D.18360;
  void (*<Tbf>) (void *) destructor.1;
  int D.18362;
  _Bool D.18363;

  destructor.1 = (void (*<Tbf>) (void *)) destructor;
  D.18362 = pthread_key_create (key, destructor.1);
  D.18363 = D.18362 == 0;
  D.18360 = (int) D.18363;
  return D.18360;
}


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.18368;
  char * D.18369;
  char * D.18370;
  char * D.18371;

  goto <D.17979>;
  <D.17978>:
  {
    struct MonoDllMap * next;

    next = map->next;
    D.18368 = map->dll;
    monoeg_g_free (D.18368);
    D.18369 = map->target;
    monoeg_g_free (D.18369);
    D.18370 = map->func;
    monoeg_g_free (D.18370);
    D.18371 = map->target_func;
    monoeg_g_free (D.18371);
    monoeg_g_free (map);
    map = next;
  }
  <D.17979>:
  if (map != 0B) goto <D.17978>; else goto <D.17980>;
  <D.17980>:
}


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

  D.18372 = mono_loader_get_last_error ();
  if (D.18372 != 0B) goto <D.18373>; else goto <D.18374>;
  <D.18373>:
  return;
  <D.18374>:
  error = monoeg_malloc0 (28);
  error->exception_type = 8;
  D.18375 = monoeg_strdup (assembly_name);
  error->assembly_name = D.18375;
  error->ref_only = ref_only;
  if (ref_only != 0) goto <D.18376>; else goto <D.18377>;
  <D.18376>:
  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.18378>;
  <D.18377>:
  mono_trace (16, 1, "Could not load file or assembly \'%s\' or one of its dependencies.", assembly_name);
  <D.18378>:
  set_loader_error (error);
}


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

  if (str != 0B) goto <D.18380>; else goto <D.18381>;
  <D.18380>:
  D.18382 = __strdup (str);
  return D.18382;
  <D.18381>:
  D.18382 = 0B;
  return D.18382;
}


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.18385;
  int D.18386;
  _Bool D.18387;

  D.18386 = pthread_setspecific (key, value);
  D.18387 = D.18386 == 0;
  D.18385 = (int) D.18387;
  return D.18385;
}


mono_loader_set_error_type_load (const char * class_name, const char * assembly_name)
{
  struct MonoLoaderError * D.18389;
  gchar * D.18392;
  gchar * D.18393;
  struct MonoLoaderError * error;

  D.18389 = mono_loader_get_last_error ();
  if (D.18389 != 0B) goto <D.18390>; else goto <D.18391>;
  <D.18390>:
  return;
  <D.18391>:
  error = monoeg_malloc0 (28);
  error->exception_type = 7;
  D.18392 = monoeg_strdup (class_name);
  error->class_name = D.18392;
  D.18393 = monoeg_strdup (assembly_name);
  error->assembly_name = D.18393;
  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.18395;
  gchar * D.18398;
  struct MonoLoaderError * error;

  D.18395 = mono_loader_get_last_error ();
  if (D.18395 != 0B) goto <D.18396>; else goto <D.18397>;
  <D.18396>:
  return;
  <D.18397>:
  error = monoeg_malloc0 (28);
  error->exception_type = 5;
  D.18398 = monoeg_strdup (class_name);
  error->class_name = D.18398;
  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.18400;
  struct MonoLoaderError * error;

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


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

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


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

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


mono_loader_clear_error ()
{
  unsigned int loader_error_thread_id.7;
  char * D.18414;
  char * D.18415;
  char * D.18416;
  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.18412>; else goto <D.18413>;
  <D.18412>:
  D.18414 = ex->class_name;
  monoeg_g_free (D.18414);
  D.18415 = ex->assembly_name;
  monoeg_g_free (D.18415);
  D.18416 = ex->msg;
  monoeg_g_free (D.18416);
  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.18413>:
}


mono_loader_error_prepare_exception (struct MonoLoaderError * error)
{
  unsigned char D.18417;
  int D.18418;
  char * D.18419;
  char * D.18420;
  struct MonoDomain * D.18421;
  const char * D.18422;
  struct MonoClass * D.18423;
  int D.18427;
  struct MonoDomain * D.18431;
  struct MonoString * D.18432;
  char * D.18433;
  struct MonoException * D.18434;
  struct MonoException * ex;

  ex = 0B;
  D.18417 = error->exception_type;
  D.18418 = (int) D.18417;
  switch (D.18418) <default: <D.17614>, case 5: <D.17603>, case 6: <D.17606>, case 7: <D.17598>, case 8: <D.17609>, case 12: <D.17612>>
  <D.17598>:
  {
    char * cname;
    char * aname;
    struct MonoString * class_name;

    D.18419 = error->class_name;
    cname = monoeg_strdup (D.18419);
    D.18420 = error->assembly_name;
    aname = monoeg_strdup (D.18420);
    mono_loader_clear_error ();
    D.18421 = mono_domain_get ();
    class_name = mono_string_new (D.18421, cname);
    ex = mono_get_exception_type_load (class_name, aname);
    monoeg_g_free (cname);
    monoeg_g_free (aname);
    goto <D.17602>;
  }
  <D.17603>:
  {
    char * cname;
    char * aname;

    D.18419 = error->class_name;
    cname = monoeg_strdup (D.18419);
    D.18422 = error->member_name;
    aname = monoeg_strdup (D.18422);
    mono_loader_clear_error ();
    ex = mono_get_exception_missing_method (cname, aname);
    monoeg_g_free (cname);
    monoeg_g_free (aname);
    goto <D.17602>;
  }
  <D.17606>:
  {
    char * class_name;
    char * cmembername;

    D.18422 = error->member_name;
    cmembername = monoeg_strdup (D.18422);
    D.18423 = error->klass;
    if (D.18423 != 0B) goto <D.18424>; else goto <D.18425>;
    <D.18424>:
    D.18423 = error->klass;
    class_name = mono_type_get_full_name (D.18423);
    goto <D.18426>;
    <D.18425>:
    class_name = monoeg_strdup ("");
    <D.18426>:
    mono_loader_clear_error ();
    ex = mono_get_exception_missing_field (class_name, cmembername);
    monoeg_g_free (class_name);
    monoeg_g_free (cmembername);
    goto <D.17602>;
  }
  <D.17609>:
  {
    char * msg;
    char * filename;

    D.18427 = error->ref_only;
    if (D.18427 != 0) goto <D.18428>; else goto <D.18429>;
    <D.18428>:
    D.18420 = 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.18420);
    goto <D.18430>;
    <D.18429>:
    D.18420 = error->assembly_name;
    msg = monoeg_g_strdup_printf ("Could not load file or assembly \'%s\' or one of its dependencies.", D.18420);
    <D.18430>:
    D.18420 = error->assembly_name;
    filename = monoeg_strdup (D.18420);
    mono_loader_clear_error ();
    D.18431 = mono_domain_get ();
    D.18432 = mono_string_new (D.18431, filename);
    ex = mono_get_exception_file_not_found2 (msg, D.18432);
    monoeg_g_free (msg);
    monoeg_g_free (filename);
    goto <D.17602>;
  }
  <D.17612>:
  {
    char * msg;

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


mono_field_from_token (struct MonoImage * image, guint32 token, struct MonoClass * * retklass, struct MonoGenericContext * context)
{
  unsigned char D.18436;
  unsigned char D.18437;
  struct MonoClass * D.18443;
  struct MonoClass * handle_class.8;
  char * D.18445;
  gchar * D.18446;
  struct MonoClassField * D.18447;
  struct MonoClass * D.18448;
  const void * token.9;
  struct GHashTable * D.18450;
  struct MonoClass * D.18453;
  unsigned int D.18454;
  unsigned int D.18458;
  unsigned int D.18461;
  struct MonoGenericClass * D.18470;
  struct MonoGenericContainer * D.18473;
  void * token.10;
  struct MonoClass * k;
  guint32 type;
  struct MonoClassField * field;

  D.18436 = BIT_FIELD_REF <*image, 8, 128>;
  D.18437 = D.18436 & 8;
  if (D.18437 != 0) goto <D.18438>; else goto <D.18439>;
  <D.18438>:
  {
    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.18440>; else goto <D.18442>;
        <D.18442>:
        D.18443 = mono_defaults.fieldhandle_class;
        handle_class.8 = handle_class;
        if (D.18443 != handle_class.8) goto <D.18440>; else goto <D.18441>;
        <D.18440>:
        D.18445 = image->name;
        D.18446 = monoeg_g_strdup_printf ("Bad field token 0x%08x on image %s.", token, D.18445);
        mono_loader_set_error_bad_image (D.18446);
        D.18447 = 0B;
        return D.18447;
        <D.18441>:
        D.18448 = result->parent;
        *retklass = D.18448;
        D.18447 = result;
        return D.18447;
      }
    finally
      {
        handle_class = {CLOBBER};
      }
  }
  <D.18439>:
  mono_image_lock (image);
  token.9 = (const void *) token;
  D.18450 = image->field_cache;
  field = monoeg_g_hash_table_lookup (D.18450, token.9);
  if (field != 0B) goto <D.18451>; else goto <D.18452>;
  <D.18451>:
  D.18453 = field->parent;
  *retklass = D.18453;
  mono_image_unlock (image);
  D.18447 = field;
  return D.18447;
  <D.18452>:
  mono_image_unlock (image);
  D.18454 = token >> 24;
  if (D.18454 == 10) goto <D.18455>; else goto <D.18456>;
  <D.18455>:
  field = field_from_memberref (image, token, retklass, context);
  goto <D.18457>;
  <D.18456>:
  D.18458 = token & 16777215;
  type = mono_metadata_typedef_from_field (image, D.18458);
  if (type == 0) goto <D.18459>; else goto <D.18460>;
  <D.18459>:
  D.18447 = 0B;
  return D.18447;
  <D.18460>:
  D.18461 = type | 33554432;
  k = mono_class_get (image, D.18461);
  if (k == 0B) goto <D.18462>; else goto <D.18463>;
  <D.18462>:
  D.18447 = 0B;
  return D.18447;
  <D.18463>:
  mono_class_init (k);
  if (retklass != 0B) goto <D.18464>; else goto <D.18465>;
  <D.18464>:
  *retklass = k;
  <D.18465>:
  field = mono_class_get_field (k, token);
  <D.18457>:
  mono_image_lock (image);
  if (field != 0B) goto <D.18466>; else goto <D.18467>;
  <D.18466>:
  D.18453 = field->parent;
  if (D.18453 != 0B) goto <D.18468>; else goto <D.18469>;
  <D.18468>:
  D.18453 = field->parent;
  D.18470 = D.18453->generic_class;
  if (D.18470 == 0B) goto <D.18471>; else goto <D.18472>;
  <D.18471>:
  D.18453 = field->parent;
  D.18473 = D.18453->generic_container;
  if (D.18473 == 0B) goto <D.18474>; else goto <D.18475>;
  <D.18474>:
  token.10 = (void *) token;
  D.18450 = image->field_cache;
  monoeg_g_hash_table_insert_replace (D.18450, token.10, field, 0);
  <D.18475>:
  <D.18472>:
  <D.18469>:
  <D.18467>:
  mono_image_unlock (image);
  D.18447 = field;
  return D.18447;
}


field_from_memberref (struct MonoImage * image, guint32 token, struct MonoClass * * retklass, struct MonoGenericContext * context)
{
  unsigned int D.18479;
  int D.18480;
  const struct MonoTableInfo * D.18481;
  unsigned int D.18482;
  unsigned int D.18483;
  unsigned int D.18484;
  int D.18485;
  char * D.18488;
  gchar * D.18489;
  struct MonoClassField * D.18490;
  unsigned int D.18491;
  unsigned int D.18492;
  unsigned int D.18493;
  unsigned int D.18496;
  const char * D.18497;
  const char * ptr.11;
  const char * ptr.12;
  const char * ptr.13;
  const char * ptr.14;
  char D.18502;
  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.18479 = idx + 4294967295;
      D.18480 = (int) D.18479;
      D.18481 = tables + 120;
      mono_metadata_decode_row (D.18481, D.18480, &cols, 3);
      D.18482 = cols[0];
      nindex = D.18482 >> 3;
      D.18482 = cols[0];
      class = D.18482 & 7;
      D.18483 = cols[1];
      fname = mono_metadata_string_heap (image, D.18483);
      D.18484 = cols[2];
      D.18485 = mono_verifier_verify_memberref_field_signature (image, D.18484, 0B);
      if (D.18485 == 0) goto <D.18486>; else goto <D.18487>;
      <D.18486>:
      D.18488 = image->name;
      D.18489 = monoeg_g_strdup_printf ("Bad field signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, D.18488);
      mono_loader_set_error_bad_image (D.18489);
      D.18490 = 0B;
      return D.18490;
      <D.18487>:
      switch (class) <default: <D.17647>, case 0: <D.17643>, case 1: <D.17645>, case 4: <D.17646>>
      <D.17643>:
      class_table = 33554432;
      D.18491 = nindex | 33554432;
      klass = mono_class_get (image, D.18491);
      goto <D.17644>;
      <D.17645>:
      class_table = 16777216;
      D.18492 = nindex | 16777216;
      klass = mono_class_from_typeref (image, D.18492);
      goto <D.17644>;
      <D.17646>:
      class_table = 452984832;
      D.18493 = nindex | 452984832;
      klass = mono_class_get_full (image, D.18493, context);
      goto <D.17644>;
      <D.17647>:
      monoeg_g_log (0B, 16, "field load from %x", class);
      D.18490 = 0B;
      return D.18490;
      <D.17644>:
      if (klass == 0B) goto <D.18494>; else goto <D.18495>;
      <D.18494>:
      {
        char * name;

        D.18496 = class_table | nindex;
        name = mono_class_name_from_token (image, D.18496);
        D.18496 = class_table | nindex;
        monoeg_g_log (0B, 16, "Missing field %s in class %s (type token %d)", fname, name, D.18496);
        D.18497 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.18497);
        monoeg_g_free (name);
        D.18490 = 0B;
        return D.18490;
      }
      <D.18495>:
      D.18484 = cols[2];
      ptr.11 = mono_metadata_blob_heap (image, D.18484);
      ptr = ptr.11;
      ptr.12 = ptr;
      mono_metadata_decode_blob_size (ptr.12, &ptr);
      ptr.12 = ptr;
      ptr.13 = ptr.12;
      ptr.14 = ptr.13 + 1;
      ptr = ptr.14;
      D.18502 = *ptr.13;
      if (D.18502 != 6) goto <D.18503>; else goto <D.18504>;
      <D.18503>:
      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.18490 = 0B;
      return D.18490;
      <D.18504>:
      D.18484 = cols[2];
      sig_type = find_cached_memberref_sig (image, D.18484);
      if (sig_type == 0B) goto <D.18505>; else goto <D.18506>;
      <D.18505>:
      ptr.12 = ptr;
      sig_type = mono_metadata_parse_type (image, 0, 0, ptr.12, &ptr);
      if (sig_type == 0B) goto <D.18507>; else goto <D.18508>;
      <D.18507>:
      mono_loader_set_error_field_load (klass, fname);
      D.18490 = 0B;
      return D.18490;
      <D.18508>:
      D.18484 = cols[2];
      sig_type = cache_memberref_sig (image, D.18484, sig_type);
      <D.18506>:
      mono_class_init (klass);
      if (retklass != 0B) goto <D.18509>; else goto <D.18510>;
      <D.18509>:
      *retklass = klass;
      <D.18510>:
      field = mono_class_get_field_from_name_full (klass, fname, sig_type);
      if (field == 0B) goto <D.18511>; else goto <D.18512>;
      <D.18511>:
      mono_loader_set_error_field_load (klass, fname);
      <D.18512>:
      D.18490 = field;
      return D.18490;
    }
  finally
    {
      cols = {CLOBBER};
      ptr = {CLOBBER};
    }
}


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

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


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

  mono_loader_lock ();
  sig_idx.16 = (const void *) sig_idx;
  D.18520 = image->memberref_signatures;
  prev_sig = monoeg_g_hash_table_lookup (D.18520, sig_idx.16);
  if (prev_sig != 0B) goto <D.18521>; else goto <D.18522>;
  <D.18521>:
  sig = prev_sig;
  goto <D.18523>;
  <D.18522>:
  sig_idx.17 = (void *) sig_idx;
  D.18520 = image->memberref_signatures;
  monoeg_g_hash_table_insert_replace (D.18520, sig_idx.17, sig, 0);
  memberref_sig_cache_size.18 = memberref_sig_cache_size;
  memberref_sig_cache_size.19 = memberref_sig_cache_size.18 + 16;
  memberref_sig_cache_size = memberref_sig_cache_size.19;
  <D.18523>:
  mono_loader_unlock ();
  D.18527 = sig;
  return D.18527;
}


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

  res = inflate_generic_signature_checked (0B, sig, context, error);
  D.18529 = mono_error_ok (error);
  if (D.18529 == 0) goto <D.18530>; else goto <D.18531>;
  <D.18530>:
  D.18532 = 0B;
  return D.18532;
  <D.18531>:
  cached = mono_metadata_get_inflated_signature (res, context);
  if (cached != res) goto <D.18533>; else goto <D.18534>;
  <D.18533>:
  mono_metadata_free_inflated_signature (res);
  <D.18534>:
  D.18532 = cached;
  return D.18532;
}


inflate_generic_signature_checked (struct MonoImage * image, struct MonoMethodSignature * sig, struct MonoGenericContext * context, struct MonoError * error)
{
  struct MonoMethodSignature * D.18538;
  short unsigned int D.18539;
  unsigned int D.18540;
  unsigned int D.18541;
  unsigned int D.18542;
  struct MonoType * D.18543;
  struct MonoType * D.18544;
  int D.18545;
  struct MonoType * D.18547;
  struct MonoType * D.18548;
  struct MonoType * D.18549;
  int D.18550;
  struct MonoType * D.18554;
  int D.18555;
  <unnamed-unsigned:1> D.18556;
  <unnamed-unsigned:1> D.18557;
  <unnamed-unsigned:6> D.18558;
  <unnamed-unsigned:1> D.18559;
  short unsigned int D.18560;
  short int D.18561;
  unsigned char D.18562;
  <unnamed-unsigned:1> D.18563;
  struct MonoMethodSignature * res;
  gboolean is_open;
  int i;
  void fail = <<< error >>>;

  mono_error_init (error);
  if (context == 0B) goto <D.18536>; else goto <D.18537>;
  <D.18536>:
  D.18538 = sig;
  return D.18538;
  <D.18537>:
  D.18539 = sig->param_count;
  D.18540 = (unsigned int) D.18539;
  D.18541 = D.18540 + 3;
  D.18542 = D.18541 * 4;
  res = monoeg_malloc0 (D.18542);
  D.18539 = sig->param_count;
  res->param_count = D.18539;
  res->sentinelpos = -1;
  D.18543 = sig->ret;
  D.18544 = mono_class_inflate_generic_type_checked (D.18543, context, error);
  res->ret = D.18544;
  D.18545 = mono_error_ok (error);
  if (D.18545 == 0) goto fail; else goto <D.18546>;
  <D.18546>:
  D.18547 = res->ret;
  is_open = mono_class_is_open_constructed_type (D.18547);
  i = 0;
  goto <D.17801>;
  <D.17800>:
  D.18548 = sig->params[i];
  D.18549 = mono_class_inflate_generic_type_checked (D.18548, context, error);
  res->params[i] = D.18549;
  D.18550 = mono_error_ok (error);
  if (D.18550 == 0) goto fail; else goto <D.18551>;
  <D.18551>:
  if (is_open == 0) goto <D.18552>; else goto <D.18553>;
  <D.18552>:
  D.18554 = res->params[i];
  is_open = mono_class_is_open_constructed_type (D.18554);
  <D.18553>:
  i = i + 1;
  <D.17801>:
  D.18539 = sig->param_count;
  D.18555 = (int) D.18539;
  if (D.18555 > i) goto <D.17800>; else goto <D.17802>;
  <D.17802>:
  D.18556 = sig->hasthis;
  res->hasthis = D.18556;
  D.18557 = sig->explicit_this;
  res->explicit_this = D.18557;
  D.18558 = sig->call_convention;
  res->call_convention = D.18558;
  D.18559 = sig->pinvoke;
  res->pinvoke = D.18559;
  D.18560 = sig->generic_param_count;
  res->generic_param_count = D.18560;
  D.18561 = sig->sentinelpos;
  res->sentinelpos = D.18561;
  D.18562 = (unsigned char) is_open;
  D.18563 = (<unnamed-unsigned:1>) D.18562;
  res->has_type_parameters = D.18563;
  res->is_inflated = 1;
  D.18538 = res;
  return D.18538;
  fail:
  D.18547 = res->ret;
  if (D.18547 != 0B) goto <D.18564>; else goto <D.18565>;
  <D.18564>:
  D.18547 = res->ret;
  mono_metadata_free_type (D.18547);
  <D.18565>:
  i = 0;
  goto <D.17804>;
  <D.17803>:
  D.18554 = res->params[i];
  if (D.18554 != 0B) goto <D.18566>; else goto <D.18567>;
  <D.18566>:
  D.18554 = res->params[i];
  mono_metadata_free_type (D.18554);
  <D.18567>:
  i = i + 1;
  <D.17804>:
  D.18539 = sig->param_count;
  D.18555 = (int) D.18539;
  if (D.18555 > i) goto <D.17803>; else goto <D.17805>;
  <D.17805>:
  monoeg_g_free (res);
  D.18538 = 0B;
  return D.18538;
}


mono_method_get_signature_full (struct MonoMethod * method, struct MonoImage * image, guint32 token, struct MonoGenericContext * context)
{
  unsigned int D.18569;
  int token.20;
  _Bool D.18571;
  _Bool D.18572;
  _Bool D.18573;
  struct MonoMethodSignature * D.18576;
  short unsigned int D.18581;
  int D.18582;
  int D.18583;
  unsigned char D.18585;
  unsigned char D.18586;
  struct MonoClass * D.18587;
  struct MonoGenericClass * D.18588;
  unsigned char D.18591;
  unsigned char D.18592;
  int D.18596;
  struct MonoTableInfo * D.18597;
  unsigned int D.18598;
  unsigned int sig_idx.21;
  int D.18602;
  unsigned int D.18605;
  unsigned int D.18606;
  char * D.18607;
  gchar * D.18608;
  unsigned int sig_idx.22;
  const char * ptr.23;
  const char * ptr.24;
  int D.18614;
  gchar * D.18617;
  int D.18620;
  const char * D.18623;
  gchar * D.18624;
  unsigned int D.18628;
  unsigned int inflated_signatures_size.25;
  unsigned int inflated_signatures_size.26;
  int table;
  int idx;
  int sig_idx;
  guint32 cols[3];
  struct MonoMethodSignature * sig;
  const char * ptr;

  try
    {
      D.18569 = token >> 24;
      table = (int) D.18569;
      token.20 = (int) token;
      idx = token.20 & 16777215;
      D.18571 = table == 0;
      D.18572 = table == 6;
      D.18573 = D.18571 | D.18572;
      if (D.18573 != 0) goto <D.18574>; else goto <D.18575>;
      <D.18574>:
      D.18576 = mono_method_signature (method);
      return D.18576;
      <D.18575>:
      if (table == 43) goto <D.18577>; else goto <D.18578>;
      <D.18577>:
      D.18581 = method->flags;
      D.18582 = (int) D.18581;
      D.18583 = D.18582 & 8192;
      if (D.18583 != 0) goto <D.18579>; else goto <D.18584>;
      <D.18584>:
      D.18585 = BIT_FIELD_REF <*method, 8, 168>;
      D.18586 = D.18585 & 16;
      if (D.18586 == 0) goto <D.18579>; else goto <D.18580>;
      <D.18579>:
      D.18576 = 0B;
      return D.18576;
      <D.18580>:
      D.18576 = mono_method_signature (method);
      return D.18576;
      <D.18578>:
      D.18587 = method->klass;
      D.18588 = D.18587->generic_class;
      if (D.18588 != 0B) goto <D.18589>; else goto <D.18590>;
      <D.18589>:
      D.18576 = mono_method_signature (method);
      return D.18576;
      <D.18590>:
      D.18591 = BIT_FIELD_REF <*image, 8, 128>;
      D.18592 = D.18591 & 8;
      if (D.18592 != 0) goto <D.18593>; else goto <D.18594>;
      <D.18593>:
      sig = mono_reflection_lookup_signature (image, method, token);
      goto <D.18595>;
      <D.18594>:
      D.18596 = idx + -1;
      D.18597 = &image->tables[10];
      mono_metadata_decode_row (D.18597, D.18596, &cols, 3);
      D.18598 = cols[2];
      sig_idx = (int) D.18598;
      sig_idx.21 = (unsigned int) sig_idx;
      sig = find_cached_memberref_sig (image, sig_idx.21);
      if (sig == 0B) goto <D.18600>; else goto <D.18601>;
      <D.18600>:
      sig_idx.21 = (unsigned int) sig_idx;
      D.18602 = mono_verifier_verify_memberref_method_signature (image, sig_idx.21, 0B);
      if (D.18602 == 0) goto <D.18603>; else goto <D.18604>;
      <D.18603>:
      {
        guint32 class;
        const char * fname;

        D.18605 = cols[0];
        class = D.18605 & 7;
        D.18606 = cols[1];
        fname = mono_metadata_string_heap (image, D.18606);
        D.18607 = image->name;
        D.18608 = monoeg_g_strdup_printf ("Bad method signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, D.18607);
        mono_loader_set_error_bad_image (D.18608);
        D.18576 = 0B;
        return D.18576;
      }
      <D.18604>:
      sig_idx.22 = (unsigned int) sig_idx;
      ptr.23 = mono_metadata_blob_heap (image, sig_idx.22);
      ptr = ptr.23;
      ptr.24 = ptr;
      mono_metadata_decode_blob_size (ptr.24, &ptr);
      ptr.24 = ptr;
      sig = mono_metadata_parse_method_signature (image, 0, ptr.24, 0B);
      if (sig == 0B) goto <D.18612>; else goto <D.18613>;
      <D.18612>:
      D.18576 = 0B;
      return D.18576;
      <D.18613>:
      sig_idx.21 = (unsigned int) sig_idx;
      sig = cache_memberref_sig (image, sig_idx.21, sig);
      <D.18601>:
      D.18614 = mono_verifier_is_sig_compatible (image, method, sig);
      if (D.18614 == 0) goto <D.18615>; else goto <D.18616>;
      <D.18615>:
      {
        guint32 class;
        const char * fname;

        D.18605 = cols[0];
        class = D.18605 & 7;
        D.18606 = cols[1];
        fname = mono_metadata_string_heap (image, D.18606);
        D.18607 = image->name;
        D.18617 = monoeg_g_strdup_printf ("Incompatible method signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, D.18607);
        mono_loader_set_error_bad_image (D.18617);
        D.18576 = 0B;
        return D.18576;
      }
      <D.18616>:
      <D.18595>:
      if (context != 0B) goto <D.18618>; else goto <D.18619>;
      <D.18618>:
      {
        struct MonoError error;
        struct MonoMethodSignature * cached;

        try
          {
            sig = inflate_generic_signature_checked (image, sig, context, &error);
            D.18620 = mono_error_ok (&error);
            if (D.18620 == 0) goto <D.18621>; else goto <D.18622>;
            <D.18621>:
            D.18623 = mono_error_get_message (&error);
            D.18624 = monoeg_g_strdup_printf ("Could not inflate signature %s", D.18623);
            mono_loader_set_error_bad_image (D.18624);
            mono_error_cleanup (&error);
            D.18576 = 0B;
            return D.18576;
            <D.18622>:
            cached = mono_metadata_get_inflated_signature (sig, context);
            if (cached != sig) goto <D.18625>; else goto <D.18626>;
            <D.18625>:
            mono_metadata_free_inflated_signature (sig);
            goto <D.18627>;
            <D.18626>:
            D.18628 = mono_metadata_signature_size (cached);
            inflated_signatures_size.25 = inflated_signatures_size;
            inflated_signatures_size.26 = D.18628 + inflated_signatures_size.25;
            inflated_signatures_size = inflated_signatures_size.26;
            <D.18627>:
            sig = cached;
          }
        finally
          {
            error = {CLOBBER};
          }
      }
      <D.18619>:
      D.18576 = sig;
      return D.18576;
    }
  finally
    {
      cols = {CLOBBER};
      ptr = {CLOBBER};
    }
}


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

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


mono_method_search_in_array_class (struct MonoClass * klass, const char * name, struct MonoMethodSignature * sig)
{
  unsigned char D.18637;
  _Bool D.18638;
  long int D.18639;
  long int D.18640;
  struct MonoMethod * * D.18643;
  unsigned int i.27;
  unsigned int D.18645;
  struct MonoMethod * * D.18646;
  int D.17865;
  const char * D.18647;
  short unsigned int D.18650;
  struct MonoMethodSignature * D.18651;
  short unsigned int D.18652;
  struct MonoMethod * D.18655;
  unsigned int i.28;
  unsigned int D.18657;
  int i;

  mono_class_setup_methods (klass);
  D.18637 = klass->exception_type;
  D.18638 = D.18637 != 0;
  D.18639 = (long int) D.18638;
  D.18640 = __builtin_expect (D.18639, 0);
  if (D.18640 != 0) goto <D.18641>; else goto <D.18642>;
  <D.18641>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 932, "!klass->exception_type");
  <D.18642>:
  i = 0;
  goto <D.17867>;
  <D.17866>:
  {
    struct MonoMethod * method;

    D.18643 = klass->methods;
    i.27 = (unsigned int) i;
    D.18645 = i.27 * 4;
    D.18646 = D.18643 + D.18645;
    method = *D.18646;
    {
      size_t __s1_len;
      size_t __s2_len;

      D.18647 = method->name;
      D.17865 = __builtin_strcmp (D.18647, name);
    }
    if (D.17865 == 0) goto <D.18648>; else goto <D.18649>;
    <D.18648>:
    D.18650 = sig->param_count;
    D.18651 = method->signature;
    D.18652 = D.18651->param_count;
    if (D.18650 == D.18652) goto <D.18653>; else goto <D.18654>;
    <D.18653>:
    D.18655 = method;
    return D.18655;
    <D.18654>:
    <D.18649>:
  }
  i = i + 1;
  <D.17867>:
  i.28 = (unsigned int) i;
  D.18657 = klass->method.count;
  if (i.28 < D.18657) goto <D.17866>; else goto <D.17868>;
  <D.17868>:
  D.18655 = 0B;
  return D.18655;
}


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

  mono_loader_init ();
  mono_loader_lock ();
  if (assembly == 0B) goto <D.18659>; else goto <D.18660>;
  <D.18659>:
  entry = monoeg_malloc0 (20);
  if (dll != 0B) goto <D.18662>; else goto <D.18663>;
  <D.18662>:
  iftmp.29 = monoeg_strdup (dll);
  goto <D.18664>;
  <D.18663>:
  iftmp.29 = 0B;
  <D.18664>:
  entry->dll = iftmp.29;
  if (tdll != 0B) goto <D.18666>; else goto <D.18667>;
  <D.18666>:
  iftmp.30 = monoeg_strdup (tdll);
  goto <D.18668>;
  <D.18667>:
  iftmp.30 = 0B;
  <D.18668>:
  entry->target = iftmp.30;
  if (func != 0B) goto <D.18670>; else goto <D.18671>;
  <D.18670>:
  iftmp.31 = monoeg_strdup (func);
  goto <D.18672>;
  <D.18671>:
  iftmp.31 = 0B;
  <D.18672>:
  entry->func = iftmp.31;
  if (tfunc != 0B) goto <D.18674>; else goto <D.18675>;
  <D.18674>:
  iftmp.32 = monoeg_strdup (tfunc);
  goto <D.18676>;
  <D.18675>:
  iftmp.32 = 0B;
  <D.18676>:
  entry->target_func = iftmp.32;
  global_dll_map.33 = global_dll_map;
  entry->next = global_dll_map.33;
  global_dll_map = entry;
  goto <D.18678>;
  <D.18660>:
  entry = mono_image_alloc0 (assembly, 20);
  if (dll != 0B) goto <D.18680>; else goto <D.18681>;
  <D.18680>:
  iftmp.34 = mono_image_strdup (assembly, dll);
  goto <D.18682>;
  <D.18681>:
  iftmp.34 = 0B;
  <D.18682>:
  entry->dll = iftmp.34;
  if (tdll != 0B) goto <D.18684>; else goto <D.18685>;
  <D.18684>:
  iftmp.35 = mono_image_strdup (assembly, tdll);
  goto <D.18686>;
  <D.18685>:
  iftmp.35 = 0B;
  <D.18686>:
  entry->target = iftmp.35;
  if (func != 0B) goto <D.18688>; else goto <D.18689>;
  <D.18688>:
  iftmp.36 = mono_image_strdup (assembly, func);
  goto <D.18690>;
  <D.18689>:
  iftmp.36 = 0B;
  <D.18690>:
  entry->func = iftmp.36;
  if (tfunc != 0B) goto <D.18692>; else goto <D.18693>;
  <D.18692>:
  iftmp.37 = mono_image_strdup (assembly, tfunc);
  goto <D.18694>;
  <D.18693>:
  iftmp.37 = 0B;
  <D.18694>:
  entry->target_func = iftmp.37;
  D.18695 = assembly->dll_map;
  entry->next = D.18695;
  assembly->dll_map = entry;
  <D.18678>:
  mono_loader_unlock ();
}


mono_lookup_pinvoke_call (struct MonoMethod * method, const char * * exc_class, const char * * exc_arg)
{
  struct MonoClass * D.18696;
  short unsigned int D.18697;
  int D.18698;
  int D.18699;
  _Bool D.18700;
  long int D.18701;
  long int D.18702;
  void * D.18707;
  void * D.18710;
  struct MonoImage * D.18711;
  unsigned char D.18712;
  unsigned char D.18713;
  struct GHashTable * D.18716;
  char * import.38;
  short unsigned int D.18723;
  int D.18725;
  <unnamed-unsigned:24> D.18726;
  int D.18727;
  int D.18728;
  unsigned int D.18731;
  <unnamed-unsigned:24> D.18733;
  unsigned int D.18734;
  unsigned int D.18735;
  short unsigned int D.18736;
  unsigned int D.18737;
  const char * import.39;
  unsigned int D.18739;
  int D.18740;
  const char * import.40;
  struct GHashTable * D.18744;
  struct GHashTable * D.18747;
  struct GHashTable * D.18748;
  const char * new_scope.41;
  struct GHashTable * D.18750;
  int D.18026;
  int iftmp.42;
  int D.18025;
  const char[11] * D.18760;
  unsigned char D.18761;
  int D.18762;
  unsigned char D.18763;
  int D.18764;
  _Bool D.18765;
  _Bool D.18766;
  _Bool D.18767;
  const unsigned char * D.18770;
  unsigned char D.18771;
  int D.18772;
  const unsigned char * D.18773;
  unsigned char D.18774;
  int D.18775;
  _Bool D.18776;
  _Bool D.18777;
  const unsigned char * D.18780;
  unsigned char D.18781;
  int D.18782;
  const unsigned char * D.18783;
  unsigned char D.18784;
  int D.18785;
  _Bool D.18786;
  _Bool D.18787;
  const unsigned char * D.18790;
  unsigned char D.18791;
  int D.18792;
  const unsigned char * D.18793;
  unsigned char D.18794;
  int D.18795;
  struct MonoDl * internal_module.43;
  struct MonoDl * internal_module.44;
  char * D.18803;
  unsigned int D.18804;
  sizetype D.18805;
  const char * D.18806;
  unsigned int D.18809;
  sizetype D.18810;
  char * D.18811;
  char * D.18815;
  char * D.18819;
  int D.18825;
  int D.18827;
  int D.18829;
  int D.18831;
  _Bool D.18838;
  _Bool D.18839;
  _Bool D.18840;
  char * error_msg.45;
  _Bool D.18847;
  _Bool D.18848;
  char * D.18851;
  char * iftmp.46;
  void * D.18880;
  gchar * D.18883;
  gchar * D.18884;
  gchar * D.18885;
  short unsigned int D.18886;
  int D.18887;
  int D.18888;
  void * * D.18891;
  char * error_msg.47;
  int D.18896;
  char * error_msg.48;
  int iftmp.49;
  struct MonoImage * image;
  struct MonoMethodPInvoke * piinfo;
  struct MonoTableInfo * tables;
  struct MonoTableInfo * im;
  struct MonoTableInfo * mr;
  guint32 im_cols[4];
  guint32 scope_token;
  const char * import;
  const char * orig_scope;
  const char * new_scope;
  char * error_msg;
  char * full_name;
  char * file_name;
  char * found_name;
  int i;
  struct MonoDl * module;
  gboolean cached;

  try
    {
      D.18696 = method->klass;
      image = D.18696->image;
      piinfo = method;
      tables = &image->tables;
      im = tables + 336;
      mr = tables + 312;
      import = 0B;
      found_name = 0B;
      module = 0B;
      cached = 0;
      D.18697 = method->flags;
      D.18698 = (int) D.18697;
      D.18699 = D.18698 & 8192;
      D.18700 = D.18699 == 0;
      D.18701 = (long int) D.18700;
      D.18702 = __builtin_expect (D.18701, 0);
      if (D.18702 != 0) goto <D.18703>; else goto <D.18704>;
      <D.18703>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1344, "method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL");
      <D.18704>:
      if (exc_class != 0B) goto <D.18705>; else goto <D.18706>;
      <D.18705>:
      *exc_class = 0B;
      *exc_arg = 0B;
      <D.18706>:
      D.18707 = piinfo->addr;
      if (D.18707 != 0B) goto <D.18708>; else goto <D.18709>;
      <D.18708>:
      D.18710 = piinfo->addr;
      return D.18710;
      <D.18709>:
      D.18696 = method->klass;
      D.18711 = D.18696->image;
      D.18712 = BIT_FIELD_REF <*D.18711, 8, 128>;
      D.18713 = D.18712 & 8;
      if (D.18713 != 0) goto <D.18714>; else goto <D.18715>;
      <D.18714>:
      {
        struct MonoReflectionMethodAux * method_aux;

        D.18696 = method->klass;
        D.18711 = D.18696->image;
        D.18716 = MEM[(struct MonoDynamicImage *)D.18711].method_aux_hash;
        method_aux = monoeg_g_hash_table_lookup (D.18716, method);
        if (method_aux == 0B) goto <D.18717>; else goto <D.18718>;
        <D.18717>:
        D.18710 = 0B;
        return D.18710;
        <D.18718>:
        import.38 = method_aux->dllentry;
        import = import.38;
        orig_scope = method_aux->dll;
      }
      goto <D.18720>;
      <D.18715>:
      D.18723 = piinfo->implmap_idx;
      if (D.18723 == 0) goto <D.18721>; else goto <D.18724>;
      <D.18724>:
      D.18723 = piinfo->implmap_idx;
      D.18725 = (int) D.18723;
      D.18726 = im->rows;
      D.18727 = (int) D.18726;
      if (D.18725 > D.18727) goto <D.18721>; else goto <D.18722>;
      <D.18721>:
      D.18710 = 0B;
      return D.18710;
      <D.18722>:
      D.18723 = piinfo->implmap_idx;
      D.18725 = (int) D.18723;
      D.18728 = D.18725 + -1;
      mono_metadata_decode_row (im, D.18728, &im_cols, 4);
      D.18731 = im_cols[3];
      if (D.18731 == 0) goto <D.18729>; else goto <D.18732>;
      <D.18732>:
      D.18731 = im_cols[3];
      D.18733 = mr->rows;
      D.18734 = (unsigned int) D.18733;
      if (D.18731 > D.18734) goto <D.18729>; else goto <D.18730>;
      <D.18729>:
      D.18710 = 0B;
      return D.18710;
      <D.18730>:
      D.18735 = im_cols[0];
      D.18736 = (short unsigned int) D.18735;
      piinfo->piflags = D.18736;
      D.18737 = im_cols[2];
      import.39 = mono_metadata_string_heap (image, D.18737);
      import = import.39;
      D.18731 = im_cols[3];
      D.18739 = D.18731 + 4294967295;
      D.18740 = (int) D.18739;
      scope_token = mono_metadata_decode_row_col (mr, D.18740, 0);
      orig_scope = mono_metadata_string_heap (image, scope_token);
      <D.18720>:
      import.40 = import;
      mono_dllmap_lookup (image, orig_scope, import.40, &new_scope, &import);
      if (module == 0B) goto <D.18742>; else goto <D.18743>;
      <D.18742>:
      mono_loader_lock ();
      D.18744 = image->pinvoke_scopes;
      if (D.18744 == 0B) goto <D.18745>; else goto <D.18746>;
      <D.18745>:
      D.18747 = monoeg_g_hash_table_new_full (monoeg_g_str_hash, monoeg_g_str_equal, monoeg_g_free, 0B);
      image->pinvoke_scopes = D.18747;
      D.18748 = 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.18748;
      <D.18746>:
      new_scope.41 = new_scope;
      D.18744 = image->pinvoke_scopes;
      module = monoeg_g_hash_table_lookup (D.18744, new_scope.41);
      new_scope.41 = new_scope;
      D.18750 = image->pinvoke_scope_filenames;
      found_name = monoeg_g_hash_table_lookup (D.18750, new_scope.41);
      mono_loader_unlock ();
      if (module != 0B) goto <D.18751>; else goto <D.18752>;
      <D.18751>:
      cached = 1;
      <D.18752>:
      if (found_name != 0B) goto <D.18753>; else goto <D.18754>;
      <D.18753>:
      found_name = monoeg_strdup (found_name);
      <D.18754>:
      <D.18743>:
      if (module == 0B) goto <D.18755>; else goto <D.18756>;
      <D.18755>:
      new_scope.41 = new_scope;
      mono_trace (64, 4, "DllImport attempting to load: \'%s\'.", new_scope.41);
      {
        size_t __s1_len;
        size_t __s2_len;

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

          __s2 = new_scope;
          D.18760 = "__Internal";
          D.18761 = MEM[(const unsigned char *)D.18760];
          D.18762 = (int) D.18761;
          D.18763 = *__s2;
          D.18764 = (int) D.18763;
          __result = D.18762 - D.18764;
          {
            D.18765 = __s2_len != 0;
            D.18766 = __result == 0;
            D.18767 = D.18765 & D.18766;
            if (D.18767 != 0) goto <D.18768>; else goto <D.18769>;
            <D.18768>:
            D.18770 = &MEM[(void *)"__Internal" + 1B];
            D.18771 = *D.18770;
            D.18772 = (int) D.18771;
            D.18773 = __s2 + 1;
            D.18774 = *D.18773;
            D.18775 = (int) D.18774;
            __result = D.18772 - D.18775;
            D.18776 = __s2_len > 1;
            D.18766 = __result == 0;
            D.18777 = D.18776 & D.18766;
            if (D.18777 != 0) goto <D.18778>; else goto <D.18779>;
            <D.18778>:
            D.18780 = &MEM[(void *)"__Internal" + 2B];
            D.18781 = *D.18780;
            D.18782 = (int) D.18781;
            D.18783 = __s2 + 2;
            D.18784 = *D.18783;
            D.18785 = (int) D.18784;
            __result = D.18782 - D.18785;
            D.18786 = __s2_len > 2;
            D.18766 = __result == 0;
            D.18787 = D.18786 & D.18766;
            if (D.18787 != 0) goto <D.18788>; else goto <D.18789>;
            <D.18788>:
            D.18790 = &MEM[(void *)"__Internal" + 3B];
            D.18791 = *D.18790;
            D.18792 = (int) D.18791;
            D.18793 = __s2 + 3;
            D.18794 = *D.18793;
            D.18795 = (int) D.18794;
            __result = D.18792 - D.18795;
            <D.18789>:
            <D.18779>:
            <D.18769>:
          }
          D.18025 = __result;
        }
        iftmp.42 = -D.18025;
        goto <D.18796>;
        <D.18759>:
        new_scope.41 = new_scope;
        iftmp.42 = __builtin_strcmp (new_scope.41, "__Internal");
        <D.18796>:
        D.18026 = iftmp.42;
      }
      if (D.18026 == 0) goto <D.18797>; else goto <D.18798>;
      <D.18797>:
      internal_module.43 = internal_module;
      if (internal_module.43 == 0B) goto <D.18800>; else goto <D.18801>;
      <D.18800>:
      internal_module.44 = mono_dl_open (0B, 1, &error_msg);
      internal_module = internal_module.44;
      <D.18801>:
      module = internal_module;
      <D.18798>:
      <D.18756>:
      i = 0;
      goto <D.18049>;
      <D.18048>:
      {
        char * base_name;
        char * dir_name;
        gboolean is_absolute;

        base_name = 0B;
        dir_name = 0B;
        new_scope.41 = new_scope;
        is_absolute = is_absolute_path (new_scope.41);
        switch (i) <default: <D.18036>, case 0: <D.18030>, case 1: <D.18032>, case 2: <D.18034>>
        <D.18030>:
        new_scope.41 = new_scope;
        file_name = monoeg_strdup (new_scope.41);
        goto <D.18031>;
        <D.18032>:
        new_scope.41 = new_scope;
        D.18803 = strstr (new_scope.41, ".dll");
        new_scope.41 = new_scope;
        new_scope.41 = new_scope;
        D.18804 = strlen (new_scope.41);
        D.18805 = D.18804 + 4294967292;
        D.18806 = new_scope.41 + D.18805;
        if (D.18803 == D.18806) goto <D.18807>; else goto <D.18808>;
        <D.18807>:
        new_scope.41 = new_scope;
        file_name = monoeg_strdup (new_scope.41);
        new_scope.41 = new_scope;
        D.18809 = strlen (new_scope.41);
        D.18810 = D.18809 + 4294967292;
        D.18811 = file_name + D.18810;
        *D.18811 = 0;
        goto <D.18812>;
        <D.18808>:
        // predicted unlikely by continue predictor.
        goto <D.18033>;
        <D.18812>:
        goto <D.18031>;
        <D.18034>:
        if (is_absolute != 0) goto <D.18813>; else goto <D.18814>;
        <D.18813>:
        new_scope.41 = new_scope;
        dir_name = monoeg_g_path_get_dirname (new_scope.41);
        new_scope.41 = new_scope;
        base_name = monoeg_g_path_get_basename (new_scope.41);
        D.18815 = strstr (base_name, "lib");
        if (D.18815 != base_name) goto <D.18816>; else goto <D.18817>;
        <D.18816>:
        {
          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.18031>;
        }
        <D.18817>:
        goto <D.18818>;
        <D.18814>:
        new_scope.41 = new_scope;
        D.18819 = strstr (new_scope.41, "lib");
        new_scope.41 = new_scope;
        if (D.18819 != new_scope.41) goto <D.18820>; else goto <D.18821>;
        <D.18820>:
        new_scope.41 = new_scope;
        file_name = monoeg_g_strdup_printf ("lib%s", new_scope.41);
        goto <D.18031>;
        <D.18821>:
        <D.18818>:
        // predicted unlikely by continue predictor.
        goto <D.18033>;
        <D.18036>:
        new_scope.41 = new_scope;
        D.18825 = monoeg_ascii_strcasecmp ("user32.dll", new_scope.41);
        if (D.18825 == 0) goto <D.18822>; else goto <D.18826>;
        <D.18826>:
        new_scope.41 = new_scope;
        D.18827 = monoeg_ascii_strcasecmp ("kernel32.dll", new_scope.41);
        if (D.18827 == 0) goto <D.18822>; else goto <D.18828>;
        <D.18828>:
        new_scope.41 = new_scope;
        D.18829 = monoeg_ascii_strcasecmp ("user32", new_scope.41);
        if (D.18829 == 0) goto <D.18822>; else goto <D.18830>;
        <D.18830>:
        new_scope.41 = new_scope;
        D.18831 = monoeg_ascii_strcasecmp ("kernel", new_scope.41);
        if (D.18831 == 0) goto <D.18822>; else goto <D.18823>;
        <D.18822>:
        file_name = monoeg_strdup ("libMonoSupportW.so");
        goto <D.18824>;
        <D.18823>:
        // predicted unlikely by continue predictor.
        goto <D.18033>;
        <D.18824>:
        goto <D.18031>;
        <D.18031>:
        if (is_absolute != 0) goto <D.18832>; else goto <D.18833>;
        <D.18832>:
        if (dir_name == 0B) goto <D.18834>; else goto <D.18835>;
        <D.18834>:
        dir_name = monoeg_g_path_get_dirname (file_name);
        <D.18835>:
        if (base_name == 0B) goto <D.18836>; else goto <D.18837>;
        <D.18836>:
        base_name = monoeg_g_path_get_basename (file_name);
        <D.18837>:
        <D.18833>:
        D.18838 = module == 0B;
        D.18839 = is_absolute != 0;
        D.18840 = D.18838 & D.18839;
        if (D.18840 != 0) goto <D.18841>; else goto <D.18842>;
        <D.18841>:
        module = cached_module_load (file_name, 1, &error_msg);
        if (module == 0B) goto <D.18843>; else goto <D.18844>;
        <D.18843>:
        error_msg.45 = error_msg;
        mono_trace (64, 4, "DllImport error loading library \'%s\': \'%s\'.", file_name, error_msg.45);
        error_msg.45 = error_msg;
        monoeg_g_free (error_msg.45);
        goto <D.18846>;
        <D.18844>:
        found_name = monoeg_strdup (file_name);
        <D.18846>:
        <D.18842>:
        D.18838 = module == 0B;
        D.18847 = is_absolute == 0;
        D.18848 = D.18838 & D.18847;
        if (D.18848 != 0) goto <D.18849>; else goto <D.18850>;
        <D.18849>:
        {
          void * iter;
          char * mdirname;

          try
            {
              iter = 0B;
              D.18851 = image->name;
              mdirname = monoeg_g_path_get_dirname (D.18851);
              goto <D.18041>;
              <D.18040>:
              module = cached_module_load (full_name, 1, &error_msg);
              if (module == 0B) goto <D.18852>; else goto <D.18853>;
              <D.18852>:
              error_msg.45 = error_msg;
              mono_trace (64, 4, "DllImport error loading library \'%s\': \'%s\'.", full_name, error_msg.45);
              error_msg.45 = error_msg;
              monoeg_g_free (error_msg.45);
              goto <D.18854>;
              <D.18853>:
              found_name = monoeg_strdup (full_name);
              <D.18854>:
              monoeg_g_free (full_name);
              if (module != 0B) goto <D.18039>; else goto <D.18855>;
              <D.18855>:
              <D.18041>:
              full_name = mono_dl_build_path (mdirname, file_name, &iter);
              if (full_name != 0B) goto <D.18040>; else goto <D.18039>;
              <D.18039>:
              monoeg_g_free (mdirname);
            }
          finally
            {
              iter = {CLOBBER};
            }
        }
        <D.18850>:
        if (module == 0B) goto <D.18856>; else goto <D.18857>;
        <D.18856>:
        {
          void * iter;
          char * file_or_base;

          try
            {
              iter = 0B;
              if (is_absolute != 0) goto <D.18859>; else goto <D.18860>;
              <D.18859>:
              iftmp.46 = base_name;
              goto <D.18861>;
              <D.18860>:
              iftmp.46 = file_name;
              <D.18861>:
              file_or_base = iftmp.46;
              goto <D.18046>;
              <D.18045>:
              module = cached_module_load (full_name, 1, &error_msg);
              if (module == 0B) goto <D.18862>; else goto <D.18863>;
              <D.18862>:
              error_msg.45 = error_msg;
              mono_trace (64, 4, "DllImport error loading library \'%s\': \'%s\'.", full_name, error_msg.45);
              error_msg.45 = error_msg;
              monoeg_g_free (error_msg.45);
              goto <D.18864>;
              <D.18863>:
              found_name = monoeg_strdup (full_name);
              <D.18864>:
              monoeg_g_free (full_name);
              if (module != 0B) goto <D.18044>; else goto <D.18865>;
              <D.18865>:
              <D.18046>:
              full_name = mono_dl_build_path (dir_name, file_or_base, &iter);
              if (full_name != 0B) goto <D.18045>; else goto <D.18044>;
              <D.18044>:
            }
          finally
            {
              iter = {CLOBBER};
            }
        }
        <D.18857>:
        if (module == 0B) goto <D.18866>; else goto <D.18867>;
        <D.18866>:
        module = cached_module_load (file_name, 1, &error_msg);
        if (module == 0B) goto <D.18868>; else goto <D.18869>;
        <D.18868>:
        error_msg.45 = error_msg;
        mono_trace (64, 4, "DllImport error loading library \'%s\': \'%s\'.", file_name, error_msg.45);
        goto <D.18870>;
        <D.18869>:
        found_name = monoeg_strdup (file_name);
        <D.18870>:
        <D.18867>:
        monoeg_g_free (file_name);
        if (is_absolute != 0) goto <D.18871>; else goto <D.18872>;
        <D.18871>:
        monoeg_g_free (base_name);
        monoeg_g_free (dir_name);
        <D.18872>:
        if (module != 0B) goto <D.18047>; else goto <D.18873>;
        <D.18873>:
      }
      <D.18033>:
      i = i + 1;
      <D.18049>:
      if (i <= 3) goto <D.18048>; else goto <D.18047>;
      <D.18047>:
      if (module == 0B) goto <D.18874>; else goto <D.18875>;
      <D.18874>:
      error_msg.45 = error_msg;
      mono_trace (16, 4, "DllImport unable to load library \'%s\'.", error_msg.45);
      error_msg.45 = error_msg;
      monoeg_g_free (error_msg.45);
      if (exc_class != 0B) goto <D.18876>; else goto <D.18877>;
      <D.18876>:
      *exc_class = "DllNotFoundException";
      new_scope.41 = new_scope;
      *exc_arg = new_scope.41;
      <D.18877>:
      D.18710 = 0B;
      return D.18710;
      <D.18875>:
      if (cached == 0) goto <D.18878>; else goto <D.18879>;
      <D.18878>:
      mono_trace (64, 4, "DllImport loaded library \'%s\'.", found_name);
      mono_loader_lock ();
      new_scope.41 = new_scope;
      D.18744 = image->pinvoke_scopes;
      D.18880 = monoeg_g_hash_table_lookup (D.18744, new_scope.41);
      if (D.18880 == 0B) goto <D.18881>; else goto <D.18882>;
      <D.18881>:
      new_scope.41 = new_scope;
      D.18883 = monoeg_strdup (new_scope.41);
      D.18744 = image->pinvoke_scopes;
      monoeg_g_hash_table_insert_replace (D.18744, D.18883, module, 0);
      D.18884 = monoeg_strdup (found_name);
      new_scope.41 = new_scope;
      D.18885 = monoeg_strdup (new_scope.41);
      D.18750 = image->pinvoke_scope_filenames;
      monoeg_g_hash_table_insert_replace (D.18750, D.18885, D.18884, 0);
      <D.18882>:
      mono_loader_unlock ();
      <D.18879>:
      new_scope.41 = new_scope;
      mono_trace (64, 4, "DllImport searching in: \'%s\' (\'%s\').", new_scope.41, found_name);
      monoeg_g_free (found_name);
      import.40 = import;
      mono_trace (64, 4, "Searching for \'%s\'.", import.40);
      D.18886 = piinfo->piflags;
      D.18887 = (int) D.18886;
      D.18888 = D.18887 & 1;
      if (D.18888 != 0) goto <D.18889>; else goto <D.18890>;
      <D.18889>:
      D.18891 = &piinfo->addr;
      import.40 = import;
      error_msg.47 = mono_dl_symbol (module, import.40, D.18891);
      error_msg = error_msg.47;
      goto <D.18893>;
      <D.18890>:
      {
        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.18069>;
        <D.18068>:
        mangle_stdcall = 0;
        goto <D.18066>;
        <D.18065>:
        {
          gboolean need_param_count;

          need_param_count = 0;
          mangle_param_count = 0;
          goto <D.18063>;
          <D.18062>:
          D.18707 = piinfo->addr;
          if (D.18707 != 0B) goto <D.18894>; else goto <D.18895>;
          <D.18894>:
          // predicted unlikely by continue predictor.
          goto <D.18056>;
          <D.18895>:
          mangled_name = import;
          D.18886 = piinfo->piflags;
          D.18887 = (int) D.18886;
          D.18896 = D.18887 & 6;
          switch (D.18896) <default: <D.18061>, case 2: <D.18060>, case 4: <D.18057>, case 6: <D.18059>>
          <D.18057>:
          if (mangle_charset == 0) goto <D.18897>; else goto <D.18898>;
          <D.18897>:
          import.40 = import;
          mangled_name = monoeg_g_strconcat (import.40, "W", 0B);
          <D.18898>:
          goto <D.18058>;
          <D.18059>:
          if (mangle_charset == 1) goto <D.18899>; else goto <D.18900>;
          <D.18899>:
          import.40 = import;
          mangled_name = monoeg_g_strconcat (import.40, "A", 0B);
          <D.18900>:
          goto <D.18058>;
          <D.18060>:
          <D.18061>:
          if (mangle_charset == 1) goto <D.18901>; else goto <D.18902>;
          <D.18901>:
          import.40 = import;
          mangled_name = monoeg_g_strconcat (import.40, "A", 0B);
          <D.18902>:
          goto <D.18058>;
          <D.18058>:
          mangled_name2 = mangled_name;
          mono_trace (64, 4, "Probing \'%s\'.", mangled_name2);
          D.18891 = &piinfo->addr;
          error_msg.48 = mono_dl_symbol (module, mangled_name2, D.18891);
          error_msg = error_msg.48;
          error_msg.45 = error_msg;
          monoeg_g_free (error_msg.45);
          error_msg = 0B;
          D.18707 = piinfo->addr;
          if (D.18707 != 0B) goto <D.18904>; else goto <D.18905>;
          <D.18904>:
          mono_trace (64, 4, "Found as \'%s\'.", mangled_name2);
          <D.18905>:
          if (mangled_name != mangled_name2) goto <D.18906>; else goto <D.18907>;
          <D.18906>:
          monoeg_g_free (mangled_name2);
          <D.18907>:
          import.40 = import;
          if (mangled_name != import.40) goto <D.18908>; else goto <D.18909>;
          <D.18908>:
          monoeg_g_free (mangled_name);
          <D.18909>:
          <D.18056>:
          mangle_param_count = mangle_param_count + 4;
          <D.18063>:
          if (need_param_count != 0) goto <D.18911>; else goto <D.18912>;
          <D.18911>:
          iftmp.49 = 256;
          goto <D.18913>;
          <D.18912>:
          iftmp.49 = 0;
          <D.18913>:
          if (iftmp.49 >= mangle_param_count) goto <D.18062>; else goto <D.18064>;
          <D.18064>:
        }
        mangle_stdcall = mangle_stdcall + 1;
        <D.18066>:
        if (mangle_stdcall <= 1) goto <D.18065>; else goto <D.18067>;
        <D.18067>:
        mangle_charset = mangle_charset + 1;
        <D.18069>:
        if (mangle_charset <= 1) goto <D.18068>; else goto <D.18070>;
        <D.18070>:
      }
      <D.18893>:
      D.18707 = piinfo->addr;
      if (D.18707 == 0B) goto <D.18914>; else goto <D.18915>;
      <D.18914>:
      error_msg.45 = error_msg;
      monoeg_g_free (error_msg.45);
      if (exc_class != 0B) goto <D.18916>; else goto <D.18917>;
      <D.18916>:
      *exc_class = "EntryPointNotFoundException";
      import.40 = import;
      *exc_arg = import.40;
      <D.18917>:
      D.18710 = 0B;
      return D.18710;
      <D.18915>:
      D.18710 = piinfo->addr;
      return D.18710;
    }
  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.18922;
  int D.18927;
  struct MonoDllMap * global_dll_map.50;
  int res;

  if (assembly != 0B) goto <D.18920>; else goto <D.18921>;
  <D.18920>:
  D.18922 = assembly->dll_map;
  if (D.18922 != 0B) goto <D.18923>; else goto <D.18924>;
  <D.18923>:
  D.18922 = assembly->dll_map;
  res = mono_dllmap_lookup_list (D.18922, dll, func, rdll, rfunc);
  if (res != 0) goto <D.18925>; else goto <D.18926>;
  <D.18925>:
  D.18927 = res;
  return D.18927;
  <D.18926>:
  <D.18924>:
  <D.18921>:
  global_dll_map.50 = global_dll_map;
  D.18927 = mono_dllmap_lookup_list (global_dll_map.50, dll, func, rdll, rfunc);
  return D.18927;
}


mono_dllmap_lookup_list (struct MonoDllMap * dll_map, const char * dll, const char * func, const char * * rdll, const char * * rfunc)
{
  int D.18932;
  char * D.18935;
  char D.18936;
  char * D.18938;
  char D.18939;
  const gchar * D.18941;
  int D.18942;
  int D.17945;
  char * D.18949;
  char * D.18952;
  int D.17954;
  char * D.18957;
  int found;

  found = 0;
  *rdll = dll;
  if (dll_map == 0B) goto <D.18930>; else goto <D.18931>;
  <D.18930>:
  D.18932 = 0;
  return D.18932;
  <D.18931>:
  mono_loader_lock ();
  goto <D.17957>;
  <D.17956>:
  D.18935 = dll_map->dll;
  D.18936 = *D.18935;
  if (D.18936 == 105) goto <D.18937>; else goto <D.18933>;
  <D.18937>:
  D.18935 = dll_map->dll;
  D.18938 = D.18935 + 1;
  D.18939 = *D.18938;
  if (D.18939 == 58) goto <D.18940>; else goto <D.18933>;
  <D.18940>:
  D.18935 = dll_map->dll;
  D.18941 = D.18935 + 2;
  D.18942 = monoeg_ascii_strcasecmp (D.18941, dll);
  if (D.18942 != 0) goto <D.18943>; else goto <D.18944>;
  <D.18943>:
  // predicted unlikely by continue predictor.
  goto <D.17936>;
  <D.18944>:
  goto <D.18934>;
  <D.18933>:
  {
    size_t __s1_len;
    size_t __s2_len;

    D.18935 = dll_map->dll;
    D.17945 = __builtin_strcmp (D.18935, dll);
  }
  if (D.17945 != 0) goto <D.18945>; else goto <D.18946>;
  <D.18945>:
  // predicted unlikely by continue predictor.
  goto <D.17936>;
  <D.18946>:
  <D.18934>:
  if (found == 0) goto <D.18947>; else goto <D.18948>;
  <D.18947>:
  D.18949 = dll_map->target;
  if (D.18949 != 0B) goto <D.18950>; else goto <D.18951>;
  <D.18950>:
  D.18949 = dll_map->target;
  *rdll = D.18949;
  found = 1;
  <D.18951>:
  <D.18948>:
  D.18952 = dll_map->func;
  if (D.18952 != 0B) goto <D.18953>; else goto <D.18954>;
  <D.18953>:
  {
    size_t __s1_len;
    size_t __s2_len;

    D.18952 = dll_map->func;
    D.17954 = __builtin_strcmp (D.18952, func);
  }
  if (D.17954 == 0) goto <D.18955>; else goto <D.18956>;
  <D.18955>:
  D.18957 = dll_map->target_func;
  *rfunc = D.18957;
  goto <D.17955>;
  <D.18956>:
  <D.18954>:
  <D.17936>:
  dll_map = dll_map->next;
  <D.17957>:
  if (dll_map != 0B) goto <D.17956>; else goto <D.17955>;
  <D.17955>:
  mono_loader_unlock ();
  D.18932 = found;
  return D.18932;
}


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

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


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

  if (err != 0B) goto <D.18961>; else goto <D.18962>;
  <D.18961>:
  *err = 0B;
  <D.18962>:
  mono_loader_lock ();
  global_module_map.51 = global_module_map;
  if (global_module_map.51 == 0B) goto <D.18964>; else goto <D.18965>;
  <D.18964>:
  global_module_map.52 = monoeg_g_hash_table_new (monoeg_g_str_hash, monoeg_g_str_equal);
  global_module_map = global_module_map.52;
  <D.18965>:
  global_module_map.51 = global_module_map;
  res = monoeg_g_hash_table_lookup (global_module_map.51, name);
  if (res != 0B) goto <D.18967>; else goto <D.18968>;
  <D.18967>:
  mono_loader_unlock ();
  D.18969 = res;
  return D.18969;
  <D.18968>:
  res = mono_dl_open (name, flags, err);
  if (res != 0B) goto <D.18970>; else goto <D.18971>;
  <D.18970>:
  D.18972 = monoeg_strdup (name);
  global_module_map.51 = global_module_map;
  monoeg_g_hash_table_insert_replace (global_module_map.51, D.18972, res, 0);
  <D.18971>:
  mono_loader_unlock ();
  D.18969 = res;
  return D.18969;
}


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

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


mono_get_method_full (struct MonoImage * image, guint32 token, struct MonoClass * klass, struct MonoGenericContext * context)
{
  unsigned int D.18976;
  struct GHashTable * D.18979;
  struct GHashTable * D.18982;
  unsigned int D.18983;
  const void * D.18984;
  unsigned char D.18986;
  unsigned char D.18987;
  struct GHashTable * D.18990;
  struct GHashTable * D.18993;
  const void * token.53;
  struct MonoMethod * D.18997;
  int used_context.54;
  unsigned char D.19003;
  unsigned char D.19004;
  void * D.19016;
  void * token.55;
  struct MonoMethod * result;
  gboolean used_context;

  try
    {
      result = 0B;
      used_context = 0;
      mono_image_lock (image);
      D.18976 = token >> 24;
      if (D.18976 == 6) goto <D.18977>; else goto <D.18978>;
      <D.18977>:
      D.18979 = image->method_cache;
      if (D.18979 == 0B) goto <D.18980>; else goto <D.18981>;
      <D.18980>:
      D.18982 = monoeg_g_hash_table_new (0B, 0B);
      image->method_cache = D.18982;
      <D.18981>:
      D.18983 = token & 16777215;
      D.18984 = (const void *) D.18983;
      D.18979 = image->method_cache;
      result = monoeg_g_hash_table_lookup (D.18979, D.18984);
      goto <D.18985>;
      <D.18978>:
      D.18986 = BIT_FIELD_REF <*image, 8, 128>;
      D.18987 = D.18986 & 8;
      if (D.18987 == 0) goto <D.18988>; else goto <D.18989>;
      <D.18988>:
      D.18990 = image->methodref_cache;
      if (D.18990 == 0B) goto <D.18991>; else goto <D.18992>;
      <D.18991>:
      D.18993 = monoeg_g_hash_table_new (0B, 0B);
      image->methodref_cache = D.18993;
      <D.18992>:
      token.53 = (const void *) token;
      D.18990 = image->methodref_cache;
      result = monoeg_g_hash_table_lookup (D.18990, token.53);
      <D.18989>:
      <D.18985>:
      mono_image_unlock (image);
      if (result != 0B) goto <D.18995>; else goto <D.18996>;
      <D.18995>:
      D.18997 = result;
      return D.18997;
      <D.18996>:
      result = mono_get_method_from_token (image, token, klass, context, &used_context);
      if (result == 0B) goto <D.18998>; else goto <D.18999>;
      <D.18998>:
      D.18997 = 0B;
      return D.18997;
      <D.18999>:
      mono_image_lock (image);
      used_context.54 = used_context;
      if (used_context.54 == 0) goto <D.19001>; else goto <D.19002>;
      <D.19001>:
      D.19003 = BIT_FIELD_REF <*result, 8, 168>;
      D.19004 = D.19003 & 16;
      if (D.19004 == 0) goto <D.19005>; else goto <D.19006>;
      <D.19005>:
      {
        struct MonoMethod * result2;

        result2 = 0B;
        D.18976 = token >> 24;
        if (D.18976 == 6) goto <D.19007>; else goto <D.19008>;
        <D.19007>:
        D.18983 = token & 16777215;
        D.18984 = (const void *) D.18983;
        D.18979 = image->method_cache;
        result2 = monoeg_g_hash_table_lookup (D.18979, D.18984);
        goto <D.19009>;
        <D.19008>:
        D.18986 = BIT_FIELD_REF <*image, 8, 128>;
        D.18987 = D.18986 & 8;
        if (D.18987 == 0) goto <D.19010>; else goto <D.19011>;
        <D.19010>:
        token.53 = (const void *) token;
        D.18990 = image->methodref_cache;
        result2 = monoeg_g_hash_table_lookup (D.18990, token.53);
        <D.19011>:
        <D.19009>:
        if (result2 != 0B) goto <D.19012>; else goto <D.19013>;
        <D.19012>:
        mono_image_unlock (image);
        D.18997 = result2;
        return D.18997;
        <D.19013>:
        D.18976 = token >> 24;
        if (D.18976 == 6) goto <D.19014>; else goto <D.19015>;
        <D.19014>:
        D.18983 = token & 16777215;
        D.19016 = (void *) D.18983;
        D.18979 = image->method_cache;
        monoeg_g_hash_table_insert_replace (D.18979, D.19016, result, 0);
        goto <D.19017>;
        <D.19015>:
        D.18986 = BIT_FIELD_REF <*image, 8, 128>;
        D.18987 = D.18986 & 8;
        if (D.18987 == 0) goto <D.19018>; else goto <D.19019>;
        <D.19018>:
        token.55 = (void *) token;
        D.18990 = image->methodref_cache;
        monoeg_g_hash_table_insert_replace (D.18990, token.55, result, 0);
        <D.19019>:
        <D.19017>:
      }
      <D.19006>:
      <D.19002>:
      mono_image_unlock (image);
      D.18997 = result;
      return D.18997;
    }
  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.19023;
  int token.56;
  unsigned char D.19025;
  unsigned char D.19026;
  struct MonoClass * D.19031;
  struct MonoClass * handle_class.57;
  char * D.19035;
  gchar * D.19036;
  struct MonoMethod * D.19037;
  unsigned int idx.58;
  gchar * D.19047;
  <unnamed-unsigned:24> D.19050;
  int D.19051;
  gchar * D.19054;
  int D.19055;
  struct MonoTableInfo * D.19056;
  unsigned int D.19060;
  unsigned int D.19061;
  unsigned int D.19063;
  unsigned int D.19064;
  unsigned int methods_size.59;
  unsigned int methods_size.60;
  long unsigned int D.19067;
  long unsigned int D.19068;
  unsigned int D.19073;
  short unsigned int D.19076;
  short unsigned int D.19077;
  unsigned int D.19078;
  const char * D.19079;
  const char * sig.61;
  unsigned int D.19083;
  const char * sig.62;
  unsigned int D.19085;
  char D.19086;
  int D.19087;
  int D.19088;
  int D.19093;
  struct MonoClass * D.19098;
  struct MonoClass * D.19099;
  int D.18097;
  int iftmp.63;
  int D.18096;
  const char[6] * D.19105;
  unsigned char D.19106;
  int D.19107;
  unsigned char D.19108;
  int D.19109;
  _Bool D.19110;
  _Bool D.19111;
  _Bool D.19112;
  const unsigned char * D.19115;
  unsigned char D.19116;
  int D.19117;
  const unsigned char * D.19118;
  unsigned char D.19119;
  int D.19120;
  _Bool D.19121;
  _Bool D.19122;
  const unsigned char * D.19125;
  unsigned char D.19126;
  int D.19127;
  const unsigned char * D.19128;
  unsigned char D.19129;
  int D.19130;
  _Bool D.19131;
  _Bool D.19132;
  const unsigned char * D.19135;
  unsigned char D.19136;
  int D.19137;
  const unsigned char * D.19138;
  unsigned char D.19139;
  int D.19140;
  const char * D.19142;
  unsigned int D.19148;
  unsigned int D.19149;
  short unsigned int D.19150;
  short unsigned int D.19151;
  int D.19154;
  int D.19155;
  const struct MonoTableInfo * D.19156;
  unsigned int D.19157;
  short unsigned int D.19158;
  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.19023 = token >> 24;
      table = (int) D.19023;
      token.56 = (int) token;
      idx = token.56 & 16777215;
      tables = &image->tables;
      generic_container = 0B;
      container = 0B;
      sig = 0B;
      D.19025 = BIT_FIELD_REF <*image, 8, 128>;
      D.19026 = D.19025 & 8;
      if (D.19026 != 0) goto <D.19027>; else goto <D.19028>;
      <D.19027>:
      {
        struct MonoClass * handle_class;

        try
          {
            result = mono_lookup_dynamic_token_class (image, token, 1, &handle_class, context);
            if (result != 0B) goto <D.19029>; else goto <D.19030>;
            <D.19029>:
            D.19031 = mono_defaults.methodhandle_class;
            handle_class.57 = handle_class;
            if (D.19031 != handle_class.57) goto <D.19033>; else goto <D.19034>;
            <D.19033>:
            D.19035 = image->name;
            D.19036 = monoeg_g_strdup_printf ("Bad method token 0x%08x on image %s.", token, D.19035);
            mono_loader_set_error_bad_image (D.19036);
            D.19037 = 0B;
            return D.19037;
            <D.19034>:
            <D.19030>:
            D.19037 = result;
            return D.19037;
          }
        finally
          {
            handle_class = {CLOBBER};
          }
      }
      <D.19028>:
      if (table != 6) goto <D.19038>; else goto <D.19039>;
      <D.19038>:
      if (table == 43) goto <D.19040>; else goto <D.19041>;
      <D.19040>:
      if (used_context != 0B) goto <D.19042>; else goto <D.19043>;
      <D.19042>:
      *used_context = 1;
      <D.19043>:
      idx.58 = (unsigned int) idx;
      D.19037 = method_from_methodspec (image, context, idx.58);
      return D.19037;
      <D.19041>:
      if (table != 10) goto <D.19045>; else goto <D.19046>;
      <D.19045>:
      monoeg_g_log (0B, 16, "got wrong token: 0x%08x\n", token);
      D.19035 = image->name;
      D.19047 = monoeg_g_strdup_printf ("Bad method token 0x%08x on image %s.", token, D.19035);
      mono_loader_set_error_bad_image (D.19047);
      D.19037 = 0B;
      return D.19037;
      <D.19046>:
      idx.58 = (unsigned int) idx;
      D.19037 = method_from_memberref (image, idx.58, context, used_context);
      return D.19037;
      <D.19039>:
      if (used_context != 0B) goto <D.19048>; else goto <D.19049>;
      <D.19048>:
      *used_context = 0;
      <D.19049>:
      D.19050 = image->tables[6].rows;
      D.19051 = (int) D.19050;
      if (D.19051 < idx) goto <D.19052>; else goto <D.19053>;
      <D.19052>:
      D.19035 = image->name;
      D.19054 = monoeg_g_strdup_printf ("Bad method token 0x%08x on image %s.", token, D.19035);
      mono_loader_set_error_bad_image (D.19054);
      D.19037 = 0B;
      return D.19037;
      <D.19053>:
      D.19055 = idx + -1;
      D.19056 = &image->tables[6];
      mono_metadata_decode_row (D.19056, D.19055, &cols, 6);
      D.19060 = cols[2];
      D.19061 = D.19060 & 8192;
      if (D.19061 != 0) goto <D.19057>; else goto <D.19062>;
      <D.19062>:
      D.19063 = cols[1];
      D.19064 = D.19063 & 4096;
      if (D.19064 != 0) goto <D.19057>; else goto <D.19058>;
      <D.19057>:
      result = mono_image_alloc0 (image, 32);
      goto <D.19059>;
      <D.19058>:
      result = mono_image_alloc0 (image, 24);
      methods_size.59 = methods_size;
      methods_size.60 = methods_size.59 + 24;
      methods_size = methods_size.60;
      <D.19059>:
      D.19067 = mono_stats.method_count;
      D.19068 = D.19067 + 1;
      mono_stats.method_count = D.19068;
      if (klass == 0B) goto <D.19069>; else goto <D.19070>;
      <D.19069>:
      {
        guint32 type;

        type = mono_metadata_typedef_from_method (image, token);
        if (type == 0) goto <D.19071>; else goto <D.19072>;
        <D.19071>:
        D.19037 = 0B;
        return D.19037;
        <D.19072>:
        D.19073 = type | 33554432;
        klass = mono_class_get (image, D.19073);
        if (klass == 0B) goto <D.19074>; else goto <D.19075>;
        <D.19074>:
        D.19037 = 0B;
        return D.19037;
        <D.19075>:
      }
      <D.19070>:
      result->slot = -1;
      result->klass = klass;
      D.19060 = cols[2];
      D.19076 = (short unsigned int) D.19060;
      result->flags = D.19076;
      D.19063 = cols[1];
      D.19077 = (short unsigned int) D.19063;
      result->iflags = D.19077;
      result->token = token;
      D.19078 = cols[3];
      D.19079 = mono_metadata_string_heap (image, D.19078);
      result->name = D.19079;
      sig.61 = sig;
      if (sig.61 == 0B) goto <D.19081>; else goto <D.19082>;
      <D.19081>:
      D.19083 = cols[4];
      sig.62 = mono_metadata_blob_heap (image, D.19083);
      sig = sig.62;
      <D.19082>:
      sig.61 = sig;
      D.19085 = mono_metadata_decode_blob_size (sig.61, &sig);
      size = (int) D.19085;
      container = klass->generic_container;
      sig.61 = sig;
      D.19086 = *sig.61;
      D.19087 = (int) D.19086;
      D.19088 = D.19087 & 16;
      if (D.19088 != 0) goto <D.19089>; else goto <D.19090>;
      <D.19089>:
      generic_container = mono_metadata_load_generic_params (image, token, container);
      <D.19090>:
      if (generic_container != 0B) goto <D.19091>; else goto <D.19092>;
      <D.19091>:
      result->is_generic = 1;
      generic_container->owner.method = result;
      D.19093 = mono_metadata_load_generic_param_constraints_full (image, token, generic_container);
      if (D.19093 == 0) goto <D.19094>; else goto <D.19095>;
      <D.19094>:
      D.19037 = 0B;
      return D.19037;
      <D.19095>:
      container = generic_container;
      <D.19092>:
      D.19063 = cols[1];
      D.19064 = D.19063 & 4096;
      if (D.19064 != 0) goto <D.19096>; else goto <D.19097>;
      <D.19096>:
      D.19098 = result->klass;
      D.19099 = mono_defaults.string_class;
      if (D.19098 == D.19099) goto <D.19100>; else goto <D.19101>;
      <D.19100>:
      {
        size_t __s1_len;
        size_t __s2_len;

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

          __s2 = result->name;
          D.19105 = ".ctor";
          D.19106 = MEM[(const unsigned char *)D.19105];
          D.19107 = (int) D.19106;
          D.19108 = *__s2;
          D.19109 = (int) D.19108;
          __result = D.19107 - D.19109;
          {
            D.19110 = __s2_len != 0;
            D.19111 = __result == 0;
            D.19112 = D.19110 & D.19111;
            if (D.19112 != 0) goto <D.19113>; else goto <D.19114>;
            <D.19113>:
            D.19115 = &MEM[(void *)".ctor" + 1B];
            D.19116 = *D.19115;
            D.19117 = (int) D.19116;
            D.19118 = __s2 + 1;
            D.19119 = *D.19118;
            D.19120 = (int) D.19119;
            __result = D.19117 - D.19120;
            D.19121 = __s2_len > 1;
            D.19111 = __result == 0;
            D.19122 = D.19121 & D.19111;
            if (D.19122 != 0) goto <D.19123>; else goto <D.19124>;
            <D.19123>:
            D.19125 = &MEM[(void *)".ctor" + 2B];
            D.19126 = *D.19125;
            D.19127 = (int) D.19126;
            D.19128 = __s2 + 2;
            D.19129 = *D.19128;
            D.19130 = (int) D.19129;
            __result = D.19127 - D.19130;
            D.19131 = __s2_len > 2;
            D.19111 = __result == 0;
            D.19132 = D.19131 & D.19111;
            if (D.19132 != 0) goto <D.19133>; else goto <D.19134>;
            <D.19133>:
            D.19135 = &MEM[(void *)".ctor" + 3B];
            D.19136 = *D.19135;
            D.19137 = (int) D.19136;
            D.19138 = __s2 + 3;
            D.19139 = *D.19138;
            D.19140 = (int) D.19139;
            __result = D.19137 - D.19140;
            <D.19134>:
            <D.19124>:
            <D.19114>:
          }
          D.18096 = __result;
        }
        iftmp.63 = -D.18096;
        goto <D.19141>;
        <D.19104>:
        D.19142 = result->name;
        iftmp.63 = __builtin_strcmp (D.19142, ".ctor");
        <D.19141>:
        D.18097 = iftmp.63;
      }
      if (D.18097 == 0) goto <D.19143>; else goto <D.19144>;
      <D.19143>:
      result->string_ctor = 1;
      <D.19144>:
      <D.19101>:
      goto <D.19145>;
      <D.19097>:
      D.19060 = cols[2];
      D.19061 = D.19060 & 8192;
      if (D.19061 != 0) goto <D.19146>; else goto <D.19147>;
      <D.19146>:
      {
        struct MonoMethodPInvoke * piinfo;

        piinfo = result;
        D.19055 = idx + -1;
        D.19148 = (unsigned int) D.19055;
        D.19149 = mono_metadata_implmap_from_method (image, D.19148);
        D.19150 = (short unsigned int) D.19149;
        piinfo->implmap_idx = D.19150;
        D.19151 = piinfo->implmap_idx;
        if (D.19151 != 0) goto <D.19152>; else goto <D.19153>;
        <D.19152>:
        D.19151 = piinfo->implmap_idx;
        D.19154 = (int) D.19151;
        D.19155 = D.19154 + -1;
        D.19156 = tables + 336;
        D.19157 = mono_metadata_decode_row_col (D.19156, D.19155, 0);
        D.19158 = (short unsigned int) D.19157;
        piinfo->piflags = D.19158;
        <D.19153>:
      }
      <D.19147>:
      <D.19145>:
      if (generic_container != 0B) goto <D.19159>; else goto <D.19160>;
      <D.19159>:
      mono_method_set_generic_container (result, generic_container);
      <D.19160>:
      D.19037 = result;
      return D.19037;
    }
  finally
    {
      sig = {CLOBBER};
      cols = {CLOBBER};
    }
}


method_from_methodspec (struct MonoImage * image, struct MonoGenericContext * context, guint32 idx)
{
  unsigned int D.19164;
  int D.19165;
  const struct MonoTableInfo * D.19166;
  unsigned int D.19167;
  int D.19168;
  struct MonoMethod * D.19171;
  const char * ptr.64;
  const char * ptr.65;
  const char * ptr.66;
  _Bool D.19175;
  long int D.19176;
  long int D.19177;
  int param_count.67;
  unsigned char D.19185;
  unsigned char D.19186;
  int D.19189;
  unsigned int D.19192;
  unsigned int D.19195;
  struct MonoGenericClass * D.19199;
  unsigned char D.19202;
  unsigned char D.19203;
  _Bool D.19204;
  long int D.19205;
  long int D.19206;
  struct MonoGenericInst * iftmp.68;
  struct MonoError error;
  struct MonoMethod * method;
  struct MonoClass * klass;
  struct MonoTableInfo * tables;
  struct MonoGenericContext new_context;
  struct MonoGenericInst * inst;
  const char * ptr;
  guint32 cols[2];
  guint32 token;
  guint32 nindex;
  guint32 param_count;

  try
    {
      tables = &image->tables;
      D.19164 = idx + 4294967295;
      D.19165 = (int) D.19164;
      D.19166 = tables + 516;
      mono_metadata_decode_row (D.19166, D.19165, &cols, 2);
      token = cols[0];
      nindex = token >> 1;
      D.19167 = cols[1];
      D.19168 = mono_verifier_verify_methodspec_signature (image, D.19167, 0B);
      if (D.19168 == 0) goto <D.19169>; else goto <D.19170>;
      <D.19169>:
      D.19171 = 0B;
      return D.19171;
      <D.19170>:
      D.19167 = cols[1];
      ptr.64 = mono_metadata_blob_heap (image, D.19167);
      ptr = ptr.64;
      ptr.65 = ptr;
      mono_metadata_decode_value (ptr.65, &ptr);
      ptr.65 = ptr;
      ptr.66 = ptr.65 + 1;
      ptr = ptr.66;
      ptr.65 = ptr;
      param_count = mono_metadata_decode_value (ptr.65, &ptr);
      D.19175 = param_count == 0;
      D.19176 = (long int) D.19175;
      D.19177 = __builtin_expect (D.19176, 0);
      if (D.19177 != 0) goto <D.19178>; else goto <D.19179>;
      <D.19178>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1110, "param_count");
      <D.19179>:
      ptr.65 = ptr;
      param_count.67 = (int) param_count;
      inst = mono_metadata_parse_generic_inst (image, 0B, param_count.67, ptr.65, &ptr);
      if (inst == 0B) goto <D.19181>; else goto <D.19182>;
      <D.19181>:
      D.19171 = 0B;
      return D.19171;
      <D.19182>:
      if (context != 0B) goto <D.19183>; else goto <D.19184>;
      <D.19183>:
      D.19185 = BIT_FIELD_REF <*inst, 8, 48>;
      D.19186 = D.19185 & 64;
      if (D.19186 != 0) goto <D.19187>; else goto <D.19188>;
      <D.19187>:
      inst = mono_metadata_inflate_generic_inst (inst, context, &error);
      D.19189 = mono_error_ok (&error);
      if (D.19189 == 0) goto <D.19190>; else goto <D.19191>;
      <D.19190>:
      mono_error_cleanup (&error);
      D.19171 = 0B;
      return D.19171;
      <D.19191>:
      <D.19188>:
      <D.19184>:
      D.19192 = token & 1;
      if (D.19192 == 0) goto <D.19193>; else goto <D.19194>;
      <D.19193>:
      D.19195 = nindex | 100663296;
      method = mono_get_method_full (image, D.19195, 0B, context);
      goto <D.19196>;
      <D.19194>:
      method = method_from_memberref (image, nindex, context, 0B);
      <D.19196>:
      if (method == 0B) goto <D.19197>; else goto <D.19198>;
      <D.19197>:
      D.19171 = 0B;
      return D.19171;
      <D.19198>:
      klass = method->klass;
      D.19199 = klass->generic_class;
      if (D.19199 != 0B) goto <D.19200>; else goto <D.19201>;
      <D.19200>:
      D.19202 = BIT_FIELD_REF <*method, 8, 168>;
      D.19203 = D.19202 & 16;
      D.19204 = D.19203 == 0;
      D.19205 = (long int) D.19204;
      D.19206 = __builtin_expect (D.19205, 0);
      if (D.19206 != 0) goto <D.19207>; else goto <D.19208>;
      <D.19207>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1135, "method->is_inflated");
      <D.19208>:
      method = MEM[(struct MonoMethodInflated *)method].declaring;
      <D.19201>:
      D.19199 = klass->generic_class;
      if (D.19199 != 0B) goto <D.19210>; else goto <D.19211>;
      <D.19210>:
      D.19199 = klass->generic_class;
      iftmp.68 = D.19199->context.class_inst;
      goto <D.19212>;
      <D.19211>:
      iftmp.68 = 0B;
      <D.19212>:
      new_context.class_inst = iftmp.68;
      new_context.method_inst = inst;
      D.19171 = mono_class_inflate_generic_method_full (method, klass, &new_context);
      return D.19171;
    }
  finally
    {
      error = {CLOBBER};
      new_context = {CLOBBER};
      ptr = {CLOBBER};
      cols = {CLOBBER};
    }
}


method_from_memberref (struct MonoImage * image, guint32 idx, struct MonoGenericContext * typespec_context, gboolean * used_context)
{
  unsigned int D.19215;
  int D.19216;
  const struct MonoTableInfo * D.19217;
  unsigned int D.19218;
  unsigned int D.19219;
  _Bool D.19222;
  int D.19223;
  unsigned int D.19224;
  char * D.19227;
  const char * D.19228;
  struct MonoMethod * D.19229;
  unsigned int D.19230;
  unsigned int D.19233;
  unsigned int D.19236;
  _Bool D.19237;
  long int D.19238;
  long int D.19239;
  int D.19242;
  const char * D.19245;
  const char * ptr.69;
  const char * ptr.70;
  unsigned char D.19252;
  _Bool D.19253;
  _Bool D.19254;
  _Bool D.19255;
  struct MonoClass * iftmp.71;
  struct MonoGenericClass * D.19259;
  struct MonoType * D.19265;
  short unsigned int D.19266;
  int D.19269;
  struct MonoImage * D.19270;
  char * D.19271;
  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.19215 = idx + 4294967295;
      D.19216 = (int) D.19215;
      D.19217 = tables + 120;
      mono_metadata_decode_row (D.19217, D.19216, &cols, 3);
      D.19218 = cols[0];
      nindex = D.19218 >> 3;
      D.19218 = cols[0];
      class = D.19218 & 7;
      D.19219 = cols[1];
      mname = mono_metadata_string_heap (image, D.19219);
      if (used_context != 0B) goto <D.19220>; else goto <D.19221>;
      <D.19220>:
      D.19222 = class == 4;
      D.19223 = (int) D.19222;
      *used_context = D.19223;
      <D.19221>:
      switch (class) <default: <D.17893>, case 0: <D.17890>, case 1: <D.17885>, case 3: <D.17892>, case 4: <D.17888>>
      <D.17885>:
      D.19224 = nindex | 16777216;
      klass = mono_class_from_typeref (image, D.19224);
      if (klass == 0B) goto <D.19225>; else goto <D.19226>;
      <D.19225>:
      {
        char * name;

        D.19224 = nindex | 16777216;
        name = mono_class_name_from_token (image, D.19224);
        D.19227 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s in assembly %s, type %s", mname, D.19227, name);
        D.19228 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.19228);
        monoeg_g_free (name);
        D.19229 = 0B;
        return D.19229;
      }
      <D.19226>:
      goto <D.17887>;
      <D.17888>:
      D.19230 = nindex | 452984832;
      klass = mono_class_get_full (image, D.19230, typespec_context);
      if (klass == 0B) goto <D.19231>; else goto <D.19232>;
      <D.19231>:
      {
        char * name;

        D.19230 = nindex | 452984832;
        name = mono_class_name_from_token (image, D.19230);
        D.19227 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s in assembly %s, type %s", mname, D.19227, name);
        D.19228 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.19228);
        monoeg_g_free (name);
        D.19229 = 0B;
        return D.19229;
      }
      <D.19232>:
      goto <D.17887>;
      <D.17890>:
      D.19233 = nindex | 33554432;
      klass = mono_class_get (image, D.19233);
      if (klass == 0B) goto <D.19234>; else goto <D.19235>;
      <D.19234>:
      {
        char * name;

        D.19233 = nindex | 33554432;
        name = mono_class_name_from_token (image, D.19233);
        D.19227 = image->name;
        monoeg_g_log (0B, 16, "Missing method %s in assembly %s, type %s", mname, D.19227, name);
        D.19228 = image->assembly_name;
        mono_loader_set_error_type_load (name, D.19228);
        monoeg_g_free (name);
        D.19229 = 0B;
        return D.19229;
      }
      <D.19235>:
      goto <D.17887>;
      <D.17892>:
      D.19236 = nindex | 100663296;
      D.19229 = mono_get_method (image, D.19236, 0B);
      return D.19229;
      <D.17893>:
      {
        char * message;

        message = monoeg_g_strdup_printf ("Memberref parent unknown: class: %d, index %d", class, nindex);
        mono_loader_set_error_method_load ("", message);
        D.19229 = 0B;
        return D.19229;
      }
      <D.17887>:
      D.19237 = klass == 0B;
      D.19238 = (long int) D.19237;
      D.19239 = __builtin_expect (D.19238, 0);
      if (D.19239 != 0) goto <D.19240>; else goto <D.19241>;
      <D.19240>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1016, "klass");
      <D.19241>:
      mono_class_init (klass);
      sig_idx = cols[2];
      D.19242 = mono_verifier_verify_memberref_method_signature (image, sig_idx, 0B);
      if (D.19242 == 0) goto <D.19243>; else goto <D.19244>;
      <D.19243>:
      D.19245 = klass->name;
      mono_loader_set_error_method_load (D.19245, mname);
      D.19229 = 0B;
      return D.19229;
      <D.19244>:
      ptr.69 = mono_metadata_blob_heap (image, sig_idx);
      ptr = ptr.69;
      ptr.70 = ptr;
      mono_metadata_decode_blob_size (ptr.70, &ptr);
      sig = find_cached_memberref_sig (image, sig_idx);
      if (sig == 0B) goto <D.19248>; else goto <D.19249>;
      <D.19248>:
      ptr.70 = ptr;
      sig = mono_metadata_parse_method_signature (image, 0, ptr.70, 0B);
      if (sig == 0B) goto <D.19250>; else goto <D.19251>;
      <D.19250>:
      D.19229 = 0B;
      return D.19229;
      <D.19251>:
      sig = cache_memberref_sig (image, sig_idx, sig);
      <D.19249>:
      switch (class) <default: <D.17901>, case 0: <D.17896>, case 1: <D.17895>, case 4: <D.17898>>
      <D.17895>:
      <D.17896>:
      method = find_method (klass, 0B, mname, sig, klass);
      goto <D.17897>;
      <D.17898>:
      {
        struct MonoType * type;

        type = &klass->byval_arg;
        D.19252 = type->type;
        D.19253 = D.19252 != 20;
        D.19254 = D.19252 != 29;
        D.19255 = D.19253 & D.19254;
        if (D.19255 != 0) goto <D.19256>; else goto <D.19257>;
        <D.19256>:
        {
          struct MonoClass * in_class;

          D.19259 = klass->generic_class;
          if (D.19259 != 0B) goto <D.19260>; else goto <D.19261>;
          <D.19260>:
          D.19259 = klass->generic_class;
          iftmp.71 = D.19259->container_class;
          goto <D.19262>;
          <D.19261>:
          iftmp.71 = klass;
          <D.19262>:
          in_class = iftmp.71;
          method = find_method (in_class, 0B, mname, sig, klass);
          goto <D.17897>;
        }
        <D.19257>:
        method = mono_method_search_in_array_class (klass, mname, sig);
        goto <D.17897>;
      }
      <D.17901>:
      monoeg_g_log (0B, 4, "Memberref parent unknown: class: %d, index %d", class, nindex);
      <D.17902>:
      goto <D.17902>;
      monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "loader.c", 1061);
      <D.17897>:
      if (method == 0B) goto <D.19263>; else goto <D.19264>;
      <D.19263>:
      {
        char * msig;
        char * class_name;
        struct GString * s;

        msig = mono_signature_get_desc (sig, 0);
        D.19265 = &klass->byval_arg;
        class_name = mono_type_get_name (D.19265);
        s = monoeg_g_string_new (mname);
        D.19266 = sig->generic_param_count;
        if (D.19266 != 0) goto <D.19267>; else goto <D.19268>;
        <D.19267>:
        D.19266 = sig->generic_param_count;
        D.19269 = (int) D.19266;
        monoeg_g_string_append_printf (s, "<[%d]>", D.19269);
        <D.19268>:
        monoeg_g_string_append_printf (s, "(%s)", msig);
        monoeg_g_free (msig);
        msig = monoeg_g_string_free (s, 0);
        D.19227 = image->name;
        D.19270 = klass->image;
        D.19271 = D.19270->name;
        monoeg_g_log (0B, 16, "Missing method %s::%s in assembly %s, referenced in assembly %s", class_name, msig, D.19271, D.19227);
        mono_loader_set_error_method_load (class_name, mname);
        monoeg_g_free (msig);
        monoeg_g_free (class_name);
      }
      <D.19264>:
      D.19229 = method;
      return D.19229;
    }
  finally
    {
      cols = {CLOBBER};
      ptr = {CLOBBER};
    }
}


find_method (struct MonoClass * in_class, struct MonoClass * ic, const char * name, struct MonoMethodSignature * sig, struct MonoClass * from_class)
{
  int iftmp.72;
  unsigned int D.19278;
  unsigned int D.19279;
  unsigned char D.19281;
  struct MonoType * D.19285;
  const char * D.19288;
  char D.19290;
  _Bool D.19293;
  long int D.19294;
  long int D.19295;
  char D.19299;
  int D.17769;
  int iftmp.73;
  int D.17768;
  const char[6] * D.19305;
  unsigned char D.19306;
  int D.19307;
  unsigned char D.19308;
  int D.19309;
  _Bool D.19310;
  _Bool D.19311;
  _Bool D.19312;
  const unsigned char * D.19315;
  unsigned char D.19316;
  int D.19317;
  const unsigned char * D.19318;
  unsigned char D.19319;
  int D.19320;
  _Bool D.19321;
  _Bool D.19322;
  const unsigned char * D.19325;
  unsigned char D.19326;
  int D.19327;
  const unsigned char * D.19328;
  unsigned char D.19329;
  int D.19330;
  _Bool D.19331;
  _Bool D.19332;
  const unsigned char * D.19335;
  unsigned char D.19336;
  int D.19337;
  const unsigned char * D.19338;
  unsigned char D.19339;
  int D.19340;
  int D.17778;
  int iftmp.74;
  int D.17777;
  const char[7] * D.19346;
  unsigned char D.19347;
  int D.19348;
  unsigned char D.19349;
  int D.19350;
  _Bool D.19351;
  _Bool D.19352;
  _Bool D.19353;
  const unsigned char * D.19356;
  unsigned char D.19357;
  int D.19358;
  const unsigned char * D.19359;
  unsigned char D.19360;
  int D.19361;
  _Bool D.19362;
  _Bool D.19363;
  const unsigned char * D.19366;
  unsigned char D.19367;
  int D.19368;
  const unsigned char * D.19369;
  unsigned char D.19370;
  int D.19371;
  _Bool D.19372;
  _Bool D.19373;
  const unsigned char * D.19376;
  unsigned char D.19377;
  int D.19378;
  const unsigned char * D.19379;
  unsigned char D.19380;
  int D.19381;
  short unsigned int D.19384;
  short unsigned int D.19385;
  struct MonoClass * * D.19388;
  unsigned int i.75;
  unsigned int D.19390;
  struct MonoClass * * D.19391;
  struct MonoClass * * D.19392;
  struct MonoClass * * D.19393;
  struct MonoType * D.19394;
  const char * D.19397;
  char D.19399;
  const char * iftmp.76;
  int D.19406;
  _Bool D.19407;
  _Bool D.19408;
  long int D.19409;
  long int D.19410;
  struct MonoClass * D.19415;
  struct MonoMethod * D.19416;
  int i;
  char * qname;
  char * fqname;
  char * class_name;
  gboolean is_interface;
  struct MonoMethod * result;
  void out = <<< error >>>;

  result = 0B;
  D.19278 = in_class->flags;
  D.19279 = D.19278 & 32;
  if (D.19279 != 0) goto <D.19275>; else goto <D.19280>;
  <D.19280>:
  D.19281 = in_class->byval_arg.type;
  if (D.19281 == 19) goto <D.19275>; else goto <D.19282>;
  <D.19282>:
  D.19281 = in_class->byval_arg.type;
  if (D.19281 == 30) goto <D.19275>; else goto <D.19276>;
  <D.19275>:
  iftmp.72 = 1;
  goto <D.19277>;
  <D.19276>:
  iftmp.72 = 0;
  <D.19277>:
  is_interface = iftmp.72;
  if (ic != 0B) goto <D.19283>; else goto <D.19284>;
  <D.19283>:
  D.19285 = &ic->byval_arg;
  class_name = mono_type_get_name_full (D.19285, 0);
  qname = monoeg_g_strconcat (class_name, ".", name, 0B);
  D.19288 = ic->name_space;
  if (D.19288 != 0B) goto <D.19289>; else goto <D.19286>;
  <D.19289>:
  D.19288 = ic->name_space;
  D.19290 = *D.19288;
  if (D.19290 != 0) goto <D.19291>; else goto <D.19286>;
  <D.19291>:
  D.19288 = ic->name_space;
  fqname = monoeg_g_strconcat (D.19288, ".", class_name, ".", name, 0B);
  goto <D.19287>;
  <D.19286>:
  fqname = 0B;
  <D.19287>:
  goto <D.19292>;
  <D.19284>:
  fqname = 0B;
  qname = fqname;
  class_name = qname;
  <D.19292>:
  goto <D.17780>;
  <D.17789>:
  D.19293 = from_class == 0B;
  D.19294 = (long int) D.19293;
  D.19295 = __builtin_expect (D.19294, 0);
  if (D.19295 != 0) goto <D.19296>; else goto <D.19297>;
  <D.19296>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 684, "from_class");
  <D.19297>:
  result = find_method_in_class (in_class, name, qname, fqname, sig, from_class);
  if (result != 0B) goto out; else goto <D.19298>;
  <D.19298>:
  D.19299 = *name;
  if (D.19299 == 46) goto <D.19300>; else goto <D.19301>;
  <D.19300>:
  {
    size_t __s1_len;
    size_t __s2_len;

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

      __s2 = name;
      D.19305 = ".ctor";
      D.19306 = MEM[(const unsigned char *)D.19305];
      D.19307 = (int) D.19306;
      D.19308 = *__s2;
      D.19309 = (int) D.19308;
      __result = D.19307 - D.19309;
      {
        D.19310 = __s2_len != 0;
        D.19311 = __result == 0;
        D.19312 = D.19310 & D.19311;
        if (D.19312 != 0) goto <D.19313>; else goto <D.19314>;
        <D.19313>:
        D.19315 = &MEM[(void *)".ctor" + 1B];
        D.19316 = *D.19315;
        D.19317 = (int) D.19316;
        D.19318 = __s2 + 1;
        D.19319 = *D.19318;
        D.19320 = (int) D.19319;
        __result = D.19317 - D.19320;
        D.19321 = __s2_len > 1;
        D.19311 = __result == 0;
        D.19322 = D.19321 & D.19311;
        if (D.19322 != 0) goto <D.19323>; else goto <D.19324>;
        <D.19323>:
        D.19325 = &MEM[(void *)".ctor" + 2B];
        D.19326 = *D.19325;
        D.19327 = (int) D.19326;
        D.19328 = __s2 + 2;
        D.19329 = *D.19328;
        D.19330 = (int) D.19329;
        __result = D.19327 - D.19330;
        D.19331 = __s2_len > 2;
        D.19311 = __result == 0;
        D.19332 = D.19331 & D.19311;
        if (D.19332 != 0) goto <D.19333>; else goto <D.19334>;
        <D.19333>:
        D.19335 = &MEM[(void *)".ctor" + 3B];
        D.19336 = *D.19335;
        D.19337 = (int) D.19336;
        D.19338 = __s2 + 3;
        D.19339 = *D.19338;
        D.19340 = (int) D.19339;
        __result = D.19337 - D.19340;
        <D.19334>:
        <D.19324>:
        <D.19314>:
      }
      D.17768 = __result;
    }
    iftmp.73 = -D.17768;
    goto <D.19341>;
    <D.19304>:
    iftmp.73 = __builtin_strcmp (name, ".ctor");
    <D.19341>:
    D.17769 = iftmp.73;
  }
  if (D.17769 == 0) goto <D.17779>; else goto <D.19342>;
  <D.19342>:
  {
    size_t __s1_len;
    size_t __s2_len;

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

      __s2 = name;
      D.19346 = ".cctor";
      D.19347 = MEM[(const unsigned char *)D.19346];
      D.19348 = (int) D.19347;
      D.19349 = *__s2;
      D.19350 = (int) D.19349;
      __result = D.19348 - D.19350;
      {
        D.19351 = __s2_len != 0;
        D.19352 = __result == 0;
        D.19353 = D.19351 & D.19352;
        if (D.19353 != 0) goto <D.19354>; else goto <D.19355>;
        <D.19354>:
        D.19356 = &MEM[(void *)".cctor" + 1B];
        D.19357 = *D.19356;
        D.19358 = (int) D.19357;
        D.19359 = __s2 + 1;
        D.19360 = *D.19359;
        D.19361 = (int) D.19360;
        __result = D.19358 - D.19361;
        D.19362 = __s2_len > 1;
        D.19352 = __result == 0;
        D.19363 = D.19362 & D.19352;
        if (D.19363 != 0) goto <D.19364>; else goto <D.19365>;
        <D.19364>:
        D.19366 = &MEM[(void *)".cctor" + 2B];
        D.19367 = *D.19366;
        D.19368 = (int) D.19367;
        D.19369 = __s2 + 2;
        D.19370 = *D.19369;
        D.19371 = (int) D.19370;
        __result = D.19368 - D.19371;
        D.19372 = __s2_len > 2;
        D.19352 = __result == 0;
        D.19373 = D.19372 & D.19352;
        if (D.19373 != 0) goto <D.19374>; else goto <D.19375>;
        <D.19374>:
        D.19376 = &MEM[(void *)".cctor" + 3B];
        D.19377 = *D.19376;
        D.19378 = (int) D.19377;
        D.19379 = __s2 + 3;
        D.19380 = *D.19379;
        D.19381 = (int) D.19380;
        __result = D.19378 - D.19381;
        <D.19375>:
        <D.19365>:
        <D.19355>:
      }
      D.17777 = __result;
    }
    iftmp.74 = -D.17777;
    goto <D.19382>;
    <D.19345>:
    iftmp.74 = __builtin_strcmp (name, ".cctor");
    <D.19382>:
    D.17778 = iftmp.74;
  }
  if (D.17778 == 0) goto <D.17779>; else goto <D.19383>;
  <D.19383>:
  <D.19301>:
  D.19384 = from_class->interface_offsets_count;
  D.19385 = in_class->interface_offsets_count;
  if (D.19384 != D.19385) goto <D.19386>; else goto <D.19387>;
  <D.19386>:
  in_class = in_class->parent;
  from_class = from_class->parent;
  // predicted unlikely by continue predictor.
  goto <D.17780>;
  <D.19387>:
  i = 0;
  goto <D.17787>;
  <D.17786>:
  {
    struct MonoClass * in_ic;
    struct MonoClass * from_ic;
    char * ic_qname;
    char * ic_fqname;
    char * ic_class_name;

    D.19388 = in_class->interfaces_packed;
    i.75 = (unsigned int) i;
    D.19390 = i.75 * 4;
    D.19391 = D.19388 + D.19390;
    in_ic = *D.19391;
    D.19392 = from_class->interfaces_packed;
    i.75 = (unsigned int) i;
    D.19390 = i.75 * 4;
    D.19393 = D.19392 + D.19390;
    from_ic = *D.19393;
    D.19394 = &in_ic->byval_arg;
    ic_class_name = mono_type_get_name_full (D.19394, 0);
    ic_qname = monoeg_g_strconcat (ic_class_name, ".", name, 0B);
    D.19397 = in_ic->name_space;
    if (D.19397 != 0B) goto <D.19398>; else goto <D.19395>;
    <D.19398>:
    D.19397 = in_ic->name_space;
    D.19399 = *D.19397;
    if (D.19399 != 0) goto <D.19400>; else goto <D.19395>;
    <D.19400>:
    D.19397 = in_ic->name_space;
    ic_fqname = monoeg_g_strconcat (D.19397, ".", ic_class_name, ".", name, 0B);
    goto <D.19396>;
    <D.19395>:
    ic_fqname = 0B;
    <D.19396>:
    if (ic != 0B) goto <D.19402>; else goto <D.19403>;
    <D.19402>:
    iftmp.76 = name;
    goto <D.19404>;
    <D.19403>:
    iftmp.76 = 0B;
    <D.19404>:
    result = find_method_in_class (in_ic, iftmp.76, ic_qname, ic_fqname, sig, from_ic);
    monoeg_g_free (ic_class_name);
    monoeg_g_free (ic_fqname);
    monoeg_g_free (ic_qname);
    if (result != 0B) goto out; else goto <D.19405>;
    <D.19405>:
  }
  i = i + 1;
  <D.17787>:
  D.19385 = in_class->interface_offsets_count;
  D.19406 = (int) D.19385;
  if (D.19406 > i) goto <D.17786>; else goto <D.17788>;
  <D.17788>:
  in_class = in_class->parent;
  from_class = from_class->parent;
  <D.17780>:
  if (in_class != 0B) goto <D.17789>; else goto <D.17779>;
  <D.17779>:
  D.19407 = in_class == 0B;
  D.19293 = from_class == 0B;
  D.19408 = D.19407 ^ D.19293;
  D.19409 = (long int) D.19408;
  D.19410 = __builtin_expect (D.19409, 0);
  if (D.19410 != 0) goto <D.19411>; else goto <D.19412>;
  <D.19411>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 725, "!in_class == !from_class");
  <D.19412>:
  if (is_interface != 0) goto <D.19413>; else goto <D.19414>;
  <D.19413>:
  D.19415 = mono_defaults.object_class;
  D.19415 = mono_defaults.object_class;
  result = find_method_in_class (D.19415, name, qname, fqname, sig, D.19415);
  <D.19414>:
  out:
  monoeg_g_free (class_name);
  monoeg_g_free (fqname);
  monoeg_g_free (qname);
  D.19416 = result;
  return D.19416;
}


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.19418;
  struct MonoImage * D.19421;
  unsigned char D.19422;
  unsigned char D.19423;
  struct MonoMethod * * D.19426;
  unsigned char D.19429;
  struct MonoGenericClass * D.19434;
  unsigned int D.19437;
  unsigned int i.77;
  unsigned int D.19439;
  int D.19440;
  unsigned int D.19441;
  int D.17691;
  int D.17700;
  int D.17709;
  unsigned int D.19449;
  unsigned int D.19450;
  unsigned char D.19455;
  unsigned char D.19456;
  int D.19459;
  struct MonoMethod * D.19462;
  unsigned int D.19463;
  unsigned int i.78;
  unsigned int D.19467;
  struct MonoMethod * * D.19468;
  int D.17725;
  const char * D.19476;
  int D.17734;
  int D.17743;
  int D.19483;
  int D.19486;
  int i;

  D.19418 = klass->type_token;
  if (D.19418 != 0) goto <D.19419>; else goto <D.19420>;
  <D.19419>:
  D.19421 = klass->image;
  D.19422 = BIT_FIELD_REF <*D.19421, 8, 128>;
  D.19423 = D.19422 & 8;
  if (D.19423 == 0) goto <D.19424>; else goto <D.19425>;
  <D.19424>:
  D.19426 = klass->methods;
  if (D.19426 == 0B) goto <D.19427>; else goto <D.19428>;
  <D.19427>:
  D.19429 = klass->rank;
  if (D.19429 == 0) goto <D.19430>; else goto <D.19431>;
  <D.19430>:
  if (klass == from_class) goto <D.19432>; else goto <D.19433>;
  <D.19432>:
  D.19434 = from_class->generic_class;
  if (D.19434 == 0B) goto <D.19435>; else goto <D.19436>;
  <D.19435>:
  i = 0;
  goto <D.17712>;
  <D.17711>:
  {
    guint32 cols[6];
    struct MonoMethod * method;
    const char * m_name;
    struct MonoMethodSignature * other_sig;

    try
      {
        D.19437 = klass->method.first;
        i.77 = (unsigned int) i;
        D.19439 = D.19437 + i.77;
        D.19440 = (int) D.19439;
        D.19421 = klass->image;
        mono_metadata_decode_table_row (D.19421, 6, D.19440, &cols, 6);
        D.19441 = cols[3];
        D.19421 = klass->image;
        m_name = mono_metadata_string_heap (D.19421, D.19441);
        if (fqname == 0B) goto <D.19445>; else goto <D.19446>;
        <D.19446>:
        {
          size_t __s1_len;
          size_t __s2_len;

          D.17691 = __builtin_strcmp (m_name, fqname);
        }
        if (D.17691 != 0) goto <D.19445>; else goto <D.19443>;
        <D.19445>:
        if (qname == 0B) goto <D.19444>; else goto <D.19447>;
        <D.19447>:
        {
          size_t __s1_len;
          size_t __s2_len;

          D.17700 = __builtin_strcmp (m_name, qname);
        }
        if (D.17700 != 0) goto <D.19444>; else goto <D.19443>;
        <D.19444>:
        if (name == 0B) goto <D.19442>; else goto <D.19448>;
        <D.19448>:
        {
          size_t __s1_len;
          size_t __s2_len;

          D.17709 = __builtin_strcmp (m_name, name);
        }
        if (D.17709 != 0) goto <D.19442>; else goto <D.19443>;
        <D.19442>:
        // predicted unlikely by continue predictor.
        goto <D.17710>;
        <D.19443>:
        D.19437 = klass->method.first;
        i.77 = (unsigned int) i;
        D.19439 = D.19437 + i.77;
        D.19449 = D.19439 + 1;
        D.19450 = D.19449 | 100663296;
        D.19421 = klass->image;
        method = mono_get_method (D.19421, D.19450, klass);
        if (method != 0B) goto <D.19451>; else goto <D.19452>;
        <D.19451>:
        other_sig = mono_method_signature (method);
        if (other_sig != 0B) goto <D.19453>; else goto <D.19454>;
        <D.19453>:
        D.19455 = BIT_FIELD_REF <*sig, 8, 80>;
        D.19456 = D.19455 & 63;
        if (D.19456 != 5) goto <D.19457>; else goto <D.19458>;
        <D.19457>:
        D.19459 = mono_metadata_signature_equal (sig, other_sig);
        if (D.19459 != 0) goto <D.19460>; else goto <D.19461>;
        <D.19460>:
        D.19462 = method;
        return D.19462;
        <D.19461>:
        <D.19458>:
        <D.19454>:
        <D.19452>:
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.17710>:
  i = i + 1;
  <D.17712>:
  i.77 = (unsigned int) i;
  D.19463 = klass->method.count;
  if (i.77 < D.19463) goto <D.17711>; else goto <D.17713>;
  <D.17713>:
  <D.19436>:
  <D.19433>:
  <D.19431>:
  <D.19428>:
  <D.19425>:
  <D.19420>:
  mono_class_setup_methods (klass);
  D.19426 = klass->methods;
  if (D.19426 == 0B) goto <D.19464>; else goto <D.19465>;
  <D.19464>:
  D.19462 = 0B;
  return D.19462;
  <D.19465>:
  i = 0;
  goto <D.17746>;
  <D.17745>:
  {
    struct MonoMethod * m;
    struct MonoMethodSignature * msig;

    D.19426 = klass->methods;
    i.78 = (unsigned int) i;
    D.19467 = i.78 * 4;
    D.19468 = D.19426 + D.19467;
    m = *D.19468;
    if (m == 0B) goto <D.19469>; else goto <D.19470>;
    <D.19469>:
    // predicted unlikely by continue predictor.
    goto <D.17716>;
    <D.19470>:
    if (fqname == 0B) goto <D.19474>; else goto <D.19475>;
    <D.19475>:
    {
      size_t __s1_len;
      size_t __s2_len;

      D.19476 = m->name;
      D.17725 = __builtin_strcmp (D.19476, fqname);
    }
    if (D.17725 != 0) goto <D.19474>; else goto <D.19472>;
    <D.19474>:
    if (qname == 0B) goto <D.19473>; else goto <D.19477>;
    <D.19477>:
    {
      size_t __s1_len;
      size_t __s2_len;

      D.19476 = m->name;
      D.17734 = __builtin_strcmp (D.19476, qname);
    }
    if (D.17734 != 0) goto <D.19473>; else goto <D.19472>;
    <D.19473>:
    if (name == 0B) goto <D.19471>; else goto <D.19478>;
    <D.19478>:
    {
      size_t __s1_len;
      size_t __s2_len;

      D.19476 = m->name;
      D.17743 = __builtin_strcmp (D.19476, name);
    }
    if (D.17743 != 0) goto <D.19471>; else goto <D.19472>;
    <D.19471>:
    // predicted unlikely by continue predictor.
    goto <D.17716>;
    <D.19472>:
    msig = mono_method_signature (m);
    if (msig == 0B) goto <D.19479>; else goto <D.19480>;
    <D.19479>:
    // predicted unlikely by continue predictor.
    goto <D.17716>;
    <D.19480>:
    D.19455 = BIT_FIELD_REF <*sig, 8, 80>;
    D.19456 = D.19455 & 63;
    if (D.19456 == 5) goto <D.19481>; else goto <D.19482>;
    <D.19481>:
    D.19483 = mono_metadata_signature_vararg_match (sig, msig);
    if (D.19483 != 0) goto <D.17744>; else goto <D.19484>;
    <D.19484>:
    goto <D.19485>;
    <D.19482>:
    D.19486 = mono_metadata_signature_equal (sig, msig);
    if (D.19486 != 0) goto <D.17744>; else goto <D.19487>;
    <D.19487>:
    <D.19485>:
  }
  <D.17716>:
  i = i + 1;
  <D.17746>:
  i.77 = (unsigned int) i;
  D.19463 = klass->method.count;
  if (i.77 < D.19463) goto <D.17745>; else goto <D.17744>;
  <D.17744>:
  i.77 = (unsigned int) i;
  D.19463 = klass->method.count;
  if (i.77 < D.19463) goto <D.19488>; else goto <D.19489>;
  <D.19488>:
  D.19462 = mono_class_get_method_by_index (from_class, i);
  return D.19462;
  <D.19489>:
  D.19462 = 0B;
  return D.19462;
}


mono_metadata_signature_vararg_match (struct MonoMethodSignature * sig1, struct MonoMethodSignature * sig2)
{
  unsigned char D.19496;
  unsigned char D.19497;
  unsigned char D.19498;
  unsigned char D.19499;
  short int D.19501;
  short int D.19502;
  gboolean D.19503;
  int D.19504;
  int D.19507;
  struct MonoType * D.19508;
  struct MonoType * D.19509;
  int D.19510;
  int i;

  D.19496 = BIT_FIELD_REF <*sig1, 8, 80>;
  D.19497 = BIT_FIELD_REF <*sig2, 8, 80>;
  D.19498 = D.19496 ^ D.19497;
  D.19499 = D.19498 & 64;
  if (D.19499 != 0) goto <D.19494>; else goto <D.19500>;
  <D.19500>:
  D.19501 = sig1->sentinelpos;
  D.19502 = sig2->sentinelpos;
  if (D.19501 != D.19502) goto <D.19494>; else goto <D.19495>;
  <D.19494>:
  D.19503 = 0;
  return D.19503;
  <D.19495>:
  i = 0;
  goto <D.17668>;
  <D.17667>:
  {
    struct MonoType * p1;
    struct MonoType * p2;

    p1 = sig1->params[i];
    p2 = sig2->params[i];
    D.19504 = mono_metadata_type_equal (p1, p2);
    if (D.19504 == 0) goto <D.19505>; else goto <D.19506>;
    <D.19505>:
    D.19503 = 0;
    return D.19503;
    <D.19506>:
  }
  i = i + 1;
  <D.17668>:
  D.19501 = sig1->sentinelpos;
  D.19507 = (int) D.19501;
  if (D.19507 > i) goto <D.17667>; else goto <D.17669>;
  <D.17669>:
  D.19508 = sig2->ret;
  D.19509 = sig1->ret;
  D.19510 = mono_metadata_type_equal (D.19509, D.19508);
  if (D.19510 == 0) goto <D.19511>; else goto <D.19512>;
  <D.19511>:
  D.19503 = 0;
  return D.19503;
  <D.19512>:
  D.19503 = 1;
  return D.19503;
}


mono_get_method_constrained_with_method (struct MonoImage * image, struct MonoMethod * method, struct MonoClass * constrained_class, struct MonoGenericContext * context)
{
  _Bool D.19514;
  long int D.19515;
  long int D.19516;
  struct MonoMethod * D.19519;
  struct MonoMethod * result;

  D.19514 = method == 0B;
  D.19515 = (long int) D.19514;
  D.19516 = __builtin_expect (D.19515, 0);
  if (D.19516 != 0) goto <D.19517>; else goto <D.19518>;
  <D.19517>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 1932, "method");
  <D.19518>:
  mono_loader_lock ();
  result = get_method_constrained (image, method, constrained_class, context);
  mono_loader_unlock ();
  D.19519 = result;
  return D.19519;
}


get_method_constrained (struct MonoImage * image, struct MonoMethod * method, struct MonoClass * constrained_class, struct MonoGenericContext * context)
{
  struct MonoMethod * D.19523;
  unsigned char D.19524;
  unsigned char D.19525;
  short unsigned int D.19528;
  struct MonoMethod * D.19531;
  struct MonoGenericInst * D.19532;
  struct MonoClass * D.19535;
  struct MonoImage * D.19536;
  int D.19537;
  unsigned int D.19544;
  unsigned int D.19545;
  unsigned char D.19547;
  const char * D.19549;
  char * D.19554;
  const char * D.19555;
  const char * D.19556;
  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.19521>; else goto <D.19522>;
  <D.19521>:
  D.19523 = 0B;
  return D.19523;
  <D.19522>:
  D.19524 = BIT_FIELD_REF <*method, 8, 168>;
  D.19525 = D.19524 & 16;
  if (D.19525 != 0) goto <D.19526>; else goto <D.19527>;
  <D.19526>:
  D.19528 = sig->generic_param_count;
  if (D.19528 != 0) goto <D.19529>; else goto <D.19530>;
  <D.19529>:
  {
    struct MonoMethodInflated * imethod;

    imethod = method;
    D.19531 = imethod->declaring;
    sig = mono_method_signature (D.19531);
    method_context = mono_method_get_context (method);
    original_sig = sig;
    D.19532 = method_context->class_inst;
    if (D.19532 != 0B) goto <D.19533>; else goto <D.19534>;
    <D.19533>:
    {
      struct MonoError error;
      struct MonoGenericContext ctx;

      try
        {
          ctx.method_inst = 0B;
          D.19532 = method_context->class_inst;
          ctx.class_inst = D.19532;
          D.19535 = method->klass;
          D.19536 = D.19535->image;
          sig = inflate_generic_signature_checked (D.19536, sig, &ctx, &error);
          D.19537 = mono_error_ok (&error);
          if (D.19537 == 0) goto <D.19538>; else goto <D.19539>;
          <D.19538>:
          mono_error_cleanup (&error);
          D.19523 = 0B;
          return D.19523;
          <D.19539>:
        }
      finally
        {
          error = {CLOBBER};
          ctx = {CLOBBER};
        }
    }
    <D.19534>:
  }
  <D.19530>:
  <D.19527>:
  D.19535 = method->klass;
  if (D.19535 != constrained_class) goto <D.19542>; else goto <D.19543>;
  <D.19542>:
  D.19535 = method->klass;
  D.19544 = D.19535->flags;
  D.19545 = D.19544 & 32;
  if (D.19545 != 0) goto <D.19540>; else goto <D.19546>;
  <D.19546>:
  D.19535 = method->klass;
  D.19547 = D.19535->byval_arg.type;
  if (D.19547 == 19) goto <D.19540>; else goto <D.19548>;
  <D.19548>:
  D.19535 = method->klass;
  D.19547 = D.19535->byval_arg.type;
  if (D.19547 == 30) goto <D.19540>; else goto <D.19541>;
  <D.19540>:
  ic = method->klass;
  <D.19541>:
  <D.19543>:
  D.19549 = method->name;
  result = find_method (constrained_class, ic, D.19549, sig, constrained_class);
  if (sig != original_sig) goto <D.19550>; else goto <D.19551>;
  <D.19550>:
  mono_metadata_free_inflated_signature (sig);
  <D.19551>:
  if (result == 0B) goto <D.19552>; else goto <D.19553>;
  <D.19552>:
  {
    char * m;

    m = mono_method_full_name (method, 1);
    D.19554 = image->name;
    D.19549 = method->name;
    D.19535 = method->klass;
    D.19555 = D.19535->name;
    D.19535 = method->klass;
    D.19556 = D.19535->name_space;
    monoeg_g_log (0B, 16, "Missing method %s.%s.%s in assembly %s method %s", D.19556, D.19555, D.19549, D.19554, m);
    monoeg_g_free (m);
    D.19523 = 0B;
    return D.19523;
  }
  <D.19553>:
  if (method_context != 0B) goto <D.19557>; else goto <D.19558>;
  <D.19557>:
  result = mono_class_inflate_generic_method (result, method_context);
  <D.19558>:
  D.19523 = result;
  return D.19523;
}


mono_get_method_constrained (struct MonoImage * image, guint32 token, struct MonoClass * constrained_class, struct MonoGenericContext * context, struct MonoMethod * * cil_method)
{
  struct MonoMethod * D.19562;
  struct MonoMethod * D.19563;
  struct MonoMethod * D.19566;
  struct MonoMethod * result;

  mono_loader_lock ();
  D.19562 = mono_get_method_from_token (image, token, 0B, context, 0B);
  *cil_method = D.19562;
  D.19563 = *cil_method;
  if (D.19563 == 0B) goto <D.19564>; else goto <D.19565>;
  <D.19564>:
  mono_loader_unlock ();
  D.19566 = 0B;
  return D.19566;
  <D.19565>:
  D.19563 = *cil_method;
  result = get_method_constrained (image, D.19563, constrained_class, context);
  mono_loader_unlock ();
  D.19566 = result;
  return D.19566;
}


mono_free_method (struct MonoMethod * method)
{
  <unnamed type> D.19568;
  unsigned int D.19569;
  <unnamed type> D.19572;
  struct MonoMethodSignature * D.19575;
  unsigned char D.19578;
  unsigned char D.19579;
  struct MonoClass * D.19582;
  struct MonoImage * D.19583;
  const char * D.19584;
  struct MonoMethodHeader * D.19585;
  const unsigned char * D.19588;
  struct MonoType * D.19589;
  short unsigned int D.19590;
  int D.19591;
  struct MonoExceptionClause * D.19592;
  void * D.19593;

  D.19568 = mono_profiler_get_events ();
  D.19569 = D.19568 & 65536;
  if (D.19569 != 0) goto <D.19570>; else goto <D.19571>;
  <D.19570>:
  mono_profiler_method_free (method);
  <D.19571>:
  D.19572 = mono_profiler_get_events ();
  if (D.19572 != 0) goto <D.19573>; else goto <D.19574>;
  <D.19573>:
  return;
  <D.19574>:
  D.19575 = method->signature;
  if (D.19575 != 0B) goto <D.19576>; else goto <D.19577>;
  <D.19576>:
  <D.19577>:
  D.19578 = BIT_FIELD_REF <*method, 8, 168>;
  D.19579 = D.19578 & 2;
  if (D.19579 != 0) goto <D.19580>; else goto <D.19581>;
  <D.19580>:
  {
    struct MonoMethodWrapper * mw;
    int i;

    mw = method;
    mono_marshal_free_dynamic_wrappers (method);
    D.19582 = method->klass;
    D.19583 = D.19582->image;
    mono_image_property_remove (D.19583, method);
    D.19584 = method->name;
    monoeg_g_free (D.19584);
    D.19585 = mw->header;
    if (D.19585 != 0B) goto <D.19586>; else goto <D.19587>;
    <D.19586>:
    D.19585 = mw->header;
    D.19588 = D.19585->code;
    monoeg_g_free (D.19588);
    i = 0;
    goto <D.18149>;
    <D.18148>:
    D.19585 = mw->header;
    D.19589 = D.19585->locals[i];
    monoeg_g_free (D.19589);
    i = i + 1;
    <D.18149>:
    D.19585 = mw->header;
    D.19590 = D.19585->num_locals;
    D.19591 = (int) D.19590;
    if (D.19591 > i) goto <D.18148>; else goto <D.18150>;
    <D.18150>:
    D.19585 = mw->header;
    D.19592 = D.19585->clauses;
    monoeg_g_free (D.19592);
    D.19585 = mw->header;
    monoeg_g_free (D.19585);
    <D.19587>:
    D.19593 = mw->method_data;
    monoeg_g_free (D.19593);
    D.19575 = method->signature;
    monoeg_g_free (D.19575);
    monoeg_g_free (method);
  }
  <D.19581>:
}


mono_method_get_param_names (struct MonoMethod * method, const char * * names)
{
  unsigned char D.19595;
  unsigned char D.19596;
  short unsigned int D.19601;
  unsigned int i.79;
  unsigned int D.19605;
  const char * * D.19606;
  int D.19607;
  unsigned char D.19608;
  struct MonoImage * D.19611;
  unsigned char D.19612;
  unsigned char D.19613;
  struct MonoClass * D.19616;
  struct MonoImage * D.19617;
  struct GHashTable * D.19618;
  char * * D.19621;
  sizetype i.80;
  sizetype D.19625;
  sizetype D.19626;
  char * * D.19627;
  char * D.19628;
  struct MonoMethodSignature * D.19631;
  short unsigned int D.19632;
  int D.19633;
  unsigned char D.19634;
  unsigned char D.19635;
  struct GHashTable * D.19638;
  char * * D.19643;
  char * D.19644;
  unsigned int D.19647;
  int D.19648;
  <unnamed-unsigned:24> D.19649;
  unsigned int D.19650;
  int idx.81;
  unsigned int D.19654;
  <unnamed-unsigned:24> D.19656;
  int D.19657;
  int D.19658;
  unsigned int D.19659;
  unsigned int D.19662;
  sizetype D.19665;
  sizetype D.19666;
  const char * * D.19667;
  unsigned int D.19668;
  const char * D.19669;
  int i;
  int lastp;
  struct MonoClass * klass;
  struct MonoTableInfo * methodt;
  struct MonoTableInfo * paramt;
  struct MonoMethodSignature * signature;
  guint32 idx;

  D.19595 = BIT_FIELD_REF <*method, 8, 168>;
  D.19596 = D.19595 & 16;
  if (D.19596 != 0) goto <D.19597>; else goto <D.19598>;
  <D.19597>:
  method = MEM[(struct MonoMethodInflated *)method].declaring;
  <D.19598>:
  signature = mono_method_signature (method);
  if (signature == 0B) goto <D.19599>; else goto <D.19600>;
  <D.19599>:
  return;
  <D.19600>:
  D.19601 = signature->param_count;
  if (D.19601 == 0) goto <D.19602>; else goto <D.19603>;
  <D.19602>:
  return;
  <D.19603>:
  i = 0;
  goto <D.18163>;
  <D.18162>:
  i.79 = (unsigned int) i;
  D.19605 = i.79 * 4;
  D.19606 = names + D.19605;
  *D.19606 = "";
  i = i + 1;
  <D.18163>:
  D.19601 = signature->param_count;
  D.19607 = (int) D.19601;
  if (D.19607 > i) goto <D.18162>; else goto <D.18164>;
  <D.18164>:
  klass = method->klass;
  D.19608 = klass->rank;
  if (D.19608 != 0) goto <D.19609>; else goto <D.19610>;
  <D.19609>:
  return;
  <D.19610>:
  mono_class_init (klass);
  D.19611 = klass->image;
  D.19612 = BIT_FIELD_REF <*D.19611, 8, 128>;
  D.19613 = D.19612 & 8;
  if (D.19613 != 0) goto <D.19614>; else goto <D.19615>;
  <D.19614>:
  {
    struct MonoReflectionMethodAux * method_aux;

    D.19616 = method->klass;
    D.19617 = D.19616->image;
    D.19618 = MEM[(struct MonoDynamicImage *)D.19617].method_aux_hash;
    method_aux = monoeg_g_hash_table_lookup (D.19618, method);
    if (method_aux != 0B) goto <D.19619>; else goto <D.19620>;
    <D.19619>:
    D.19621 = method_aux->param_names;
    if (D.19621 != 0B) goto <D.19622>; else goto <D.19623>;
    <D.19622>:
    i = 0;
    goto <D.18167>;
    <D.18166>:
    D.19621 = method_aux->param_names;
    i.80 = (sizetype) i;
    D.19625 = i.80 + 1;
    D.19626 = D.19625 * 4;
    D.19627 = D.19621 + D.19626;
    D.19628 = *D.19627;
    if (D.19628 != 0B) goto <D.19629>; else goto <D.19630>;
    <D.19629>:
    i.79 = (unsigned int) i;
    D.19605 = i.79 * 4;
    D.19606 = names + D.19605;
    D.19621 = method_aux->param_names;
    i.80 = (sizetype) i;
    D.19625 = i.80 + 1;
    D.19626 = D.19625 * 4;
    D.19627 = D.19621 + D.19626;
    D.19628 = *D.19627;
    *D.19606 = D.19628;
    <D.19630>:
    i = i + 1;
    <D.18167>:
    D.19631 = mono_method_signature (method);
    D.19632 = D.19631->param_count;
    D.19633 = (int) D.19632;
    if (D.19633 > i) goto <D.18166>; else goto <D.18168>;
    <D.18168>:
    <D.19623>:
    <D.19620>:
    return;
  }
  <D.19615>:
  D.19634 = BIT_FIELD_REF <*method, 8, 160>;
  D.19635 = D.19634 & 124;
  if (D.19635 != 0) goto <D.19636>; else goto <D.19637>;
  <D.19636>:
  {
    char * * pnames;

    pnames = 0B;
    D.19611 = klass->image;
    mono_image_lock (D.19611);
    D.19611 = klass->image;
    D.19638 = D.19611->wrapper_param_names;
    if (D.19638 != 0B) goto <D.19639>; else goto <D.19640>;
    <D.19639>:
    D.19611 = klass->image;
    D.19638 = D.19611->wrapper_param_names;
    pnames = monoeg_g_hash_table_lookup (D.19638, method);
    <D.19640>:
    D.19611 = klass->image;
    mono_image_unlock (D.19611);
    if (pnames != 0B) goto <D.19641>; else goto <D.19642>;
    <D.19641>:
    i = 0;
    goto <D.18171>;
    <D.18170>:
    i.79 = (unsigned int) i;
    D.19605 = i.79 * 4;
    D.19606 = names + D.19605;
    i.79 = (unsigned int) i;
    D.19605 = i.79 * 4;
    D.19643 = pnames + D.19605;
    D.19644 = *D.19643;
    *D.19606 = D.19644;
    i = i + 1;
    <D.18171>:
    D.19601 = signature->param_count;
    D.19607 = (int) D.19601;
    if (D.19607 > i) goto <D.18170>; else goto <D.18172>;
    <D.18172>:
    <D.19642>:
    return;
  }
  <D.19637>:
  D.19611 = klass->image;
  methodt = &D.19611->tables[6];
  D.19611 = klass->image;
  paramt = &D.19611->tables[8];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.19645>; else goto <D.19646>;
  <D.19645>:
  {
    guint32 cols[3];
    guint param_index;

    try
      {
        D.19647 = idx + 4294967295;
        D.19648 = (int) D.19647;
        param_index = mono_metadata_decode_row_col (methodt, D.19648, 5);
        D.19649 = methodt->rows;
        D.19650 = (unsigned int) D.19649;
        if (D.19650 > idx) goto <D.19651>; else goto <D.19652>;
        <D.19651>:
        idx.81 = (int) idx;
        D.19654 = mono_metadata_decode_row_col (methodt, idx.81, 5);
        lastp = (int) D.19654;
        goto <D.19655>;
        <D.19652>:
        D.19656 = paramt->rows;
        D.19657 = (int) D.19656;
        lastp = D.19657 + 1;
        <D.19655>:
        i = (int) param_index;
        goto <D.18176>;
        <D.18175>:
        D.19658 = i + -1;
        mono_metadata_decode_row (paramt, D.19658, &cols, 3);
        D.19659 = cols[1];
        if (D.19659 != 0) goto <D.19660>; else goto <D.19661>;
        <D.19660>:
        D.19659 = cols[1];
        D.19601 = signature->param_count;
        D.19662 = (unsigned int) D.19601;
        if (D.19659 <= D.19662) goto <D.19663>; else goto <D.19664>;
        <D.19663>:
        D.19659 = cols[1];
        D.19665 = D.19659 + 1073741823;
        D.19666 = D.19665 * 4;
        D.19667 = names + D.19666;
        D.19668 = cols[2];
        D.19611 = klass->image;
        D.19669 = mono_metadata_string_heap (D.19611, D.19668);
        *D.19667 = D.19669;
        <D.19664>:
        <D.19661>:
        i = i + 1;
        <D.18176>:
        if (i < lastp) goto <D.18175>; else goto <D.18177>;
        <D.18177>:
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.19646>:
}


mono_method_get_param_token (struct MonoMethod * method, int index)
{
  struct MonoImage * D.19671;
  unsigned char D.19672;
  unsigned char D.19673;
  unsigned int D.19678;
  int D.19679;
  uint32_t D.19682;
  unsigned int index.82;
  unsigned int D.19684;
  struct MonoClass * klass;
  struct MonoTableInfo * methodt;
  guint32 idx;

  klass = method->klass;
  mono_class_init (klass);
  D.19671 = klass->image;
  D.19672 = BIT_FIELD_REF <*D.19671, 8, 128>;
  D.19673 = D.19672 & 8;
  if (D.19673 != 0) goto <D.19674>; else goto <D.19675>;
  <D.19674>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "loader.c", 2100);
  <D.19675>:
  D.19671 = klass->image;
  methodt = &D.19671->tables[6];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.19676>; else goto <D.19677>;
  <D.19676>:
  {
    guint param_index;

    D.19678 = idx + 4294967295;
    D.19679 = (int) D.19678;
    param_index = mono_metadata_decode_row_col (methodt, D.19679, 5);
    if (index == -1) goto <D.19680>; else goto <D.19681>;
    <D.19680>:
    D.19682 = 134217728;
    return D.19682;
    <D.19681>:
    index.82 = (unsigned int) index;
    D.19684 = param_index + index.82;
    D.19682 = D.19684 | 134217728;
    return D.19682;
  }
  <D.19677>:
  D.19682 = 0;
  return D.19682;
}


mono_method_get_marshal_info (struct MonoMethod * method, struct MonoMarshalSpec * * mspecs)
{
  _Bool D.19686;
  long int D.19687;
  long int D.19688;
  unsigned int i.83;
  unsigned int D.19692;
  struct MonoMarshalSpec * * D.19693;
  short unsigned int D.19694;
  int D.19695;
  struct MonoClass * D.19696;
  struct MonoImage * D.19697;
  unsigned char D.19698;
  unsigned char D.19699;
  struct GHashTable * D.19702;
  struct MonoMarshalSpec * * D.19705;
  struct MonoMarshalSpec * * D.19708;
  struct MonoMarshalSpec * D.19709;
  void * D.19712;
  struct MonoMarshalSpec * D.19713;
  char * D.19714;
  gchar * D.19715;
  char * D.19716;
  gchar * D.19717;
  struct MonoImage * D.19718;
  unsigned int D.19721;
  int D.19722;
  <unnamed-unsigned:24> D.19723;
  unsigned int D.19724;
  int idx.84;
  unsigned int D.19728;
  <unnamed-unsigned:24> D.19730;
  int D.19731;
  int D.19732;
  unsigned int D.19733;
  unsigned int D.19734;
  unsigned int D.19737;
  unsigned int D.19738;
  unsigned int D.19741;
  _Bool D.19742;
  long int D.19743;
  long int D.19744;
  unsigned int D.19747;
  struct MonoMarshalSpec * * D.19748;
  struct MonoMarshalSpec * D.19749;
  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.19686 = signature == 0B;
  D.19687 = (long int) D.19686;
  D.19688 = __builtin_expect (D.19687, 0);
  if (D.19688 != 0) goto <D.19689>; else goto <D.19690>;
  <D.19689>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2129, "signature");
  <D.19690>:
  i = 0;
  goto <D.18198>;
  <D.18197>:
  i.83 = (unsigned int) i;
  D.19692 = i.83 * 4;
  D.19693 = mspecs + D.19692;
  *D.19693 = 0B;
  i = i + 1;
  <D.18198>:
  D.19694 = signature->param_count;
  D.19695 = (int) D.19694;
  if (D.19695 >= i) goto <D.18197>; else goto <D.18199>;
  <D.18199>:
  D.19696 = method->klass;
  D.19697 = D.19696->image;
  D.19698 = BIT_FIELD_REF <*D.19697, 8, 128>;
  D.19699 = D.19698 & 8;
  if (D.19699 != 0) goto <D.19700>; else goto <D.19701>;
  <D.19700>:
  {
    struct MonoReflectionMethodAux * method_aux;

    D.19696 = method->klass;
    D.19697 = D.19696->image;
    D.19702 = MEM[(struct MonoDynamicImage *)D.19697].method_aux_hash;
    method_aux = monoeg_g_hash_table_lookup (D.19702, method);
    if (method_aux != 0B) goto <D.19703>; else goto <D.19704>;
    <D.19703>:
    D.19705 = method_aux->param_marshall;
    if (D.19705 != 0B) goto <D.19706>; else goto <D.19707>;
    <D.19706>:
    {
      struct MonoMarshalSpec * * dyn_specs;

      dyn_specs = method_aux->param_marshall;
      i = 0;
      goto <D.18203>;
      <D.18202>:
      i.83 = (unsigned int) i;
      D.19692 = i.83 * 4;
      D.19708 = dyn_specs + D.19692;
      D.19709 = *D.19708;
      if (D.19709 != 0B) goto <D.19710>; else goto <D.19711>;
      <D.19710>:
      i.83 = (unsigned int) i;
      D.19692 = i.83 * 4;
      D.19693 = mspecs + D.19692;
      D.19712 = monoeg_malloc0 (16);
      *D.19693 = D.19712;
      i.83 = (unsigned int) i;
      D.19692 = i.83 * 4;
      D.19708 = dyn_specs + D.19692;
      D.19709 = *D.19708;
      i.83 = (unsigned int) i;
      D.19692 = i.83 * 4;
      D.19693 = mspecs + D.19692;
      D.19713 = *D.19693;
      memcpy (D.19713, D.19709, 16);
      i.83 = (unsigned int) i;
      D.19692 = i.83 * 4;
      D.19693 = mspecs + D.19692;
      D.19713 = *D.19693;
      i.83 = (unsigned int) i;
      D.19692 = i.83 * 4;
      D.19708 = dyn_specs + D.19692;
      D.19709 = *D.19708;
      D.19714 = D.19709->data.custom_data.custom_name;
      D.19715 = monoeg_strdup (D.19714);
      D.19713->data.custom_data.custom_name = D.19715;
      i.83 = (unsigned int) i;
      D.19692 = i.83 * 4;
      D.19693 = mspecs + D.19692;
      D.19713 = *D.19693;
      i.83 = (unsigned int) i;
      D.19692 = i.83 * 4;
      D.19708 = dyn_specs + D.19692;
      D.19709 = *D.19708;
      D.19716 = D.19709->data.custom_data.cookie;
      D.19717 = monoeg_strdup (D.19716);
      D.19713->data.custom_data.cookie = D.19717;
      <D.19711>:
      i = i + 1;
      <D.18203>:
      D.19694 = signature->param_count;
      D.19695 = (int) D.19694;
      if (D.19695 >= i) goto <D.18202>; else goto <D.18204>;
      <D.18204>:
    }
    <D.19707>:
    <D.19704>:
    return;
  }
  <D.19701>:
  mono_class_init (klass);
  D.19718 = klass->image;
  methodt = &D.19718->tables[6];
  D.19718 = klass->image;
  paramt = &D.19718->tables[8];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.19719>; else goto <D.19720>;
  <D.19719>:
  {
    guint32 cols[3];
    guint param_index;

    try
      {
        D.19721 = idx + 4294967295;
        D.19722 = (int) D.19721;
        param_index = mono_metadata_decode_row_col (methodt, D.19722, 5);
        D.19723 = methodt->rows;
        D.19724 = (unsigned int) D.19723;
        if (D.19724 > idx) goto <D.19725>; else goto <D.19726>;
        <D.19725>:
        idx.84 = (int) idx;
        D.19728 = mono_metadata_decode_row_col (methodt, idx.84, 5);
        lastp = (int) D.19728;
        goto <D.19729>;
        <D.19726>:
        D.19730 = paramt->rows;
        D.19731 = (int) D.19730;
        lastp = D.19731 + 1;
        <D.19729>:
        i = (int) param_index;
        goto <D.18209>;
        <D.18208>:
        D.19732 = i + -1;
        mono_metadata_decode_row (paramt, D.19732, &cols, 3);
        D.19733 = cols[0];
        D.19734 = D.19733 & 8192;
        if (D.19734 != 0) goto <D.19735>; else goto <D.19736>;
        <D.19735>:
        D.19737 = cols[1];
        D.19694 = signature->param_count;
        D.19738 = (unsigned int) D.19694;
        if (D.19737 <= D.19738) goto <D.19739>; else goto <D.19740>;
        <D.19739>:
        {
          const char * tp;

          D.19732 = i + -1;
          D.19741 = (unsigned int) D.19732;
          D.19718 = klass->image;
          tp = mono_metadata_get_marshal_info (D.19718, D.19741, 0);
          D.19742 = tp == 0B;
          D.19743 = (long int) D.19742;
          D.19744 = __builtin_expect (D.19743, 0);
          if (D.19744 != 0) goto <D.19745>; else goto <D.19746>;
          <D.19745>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2171, "tp");
          <D.19746>:
          D.19737 = cols[1];
          D.19747 = D.19737 * 4;
          D.19748 = mspecs + D.19747;
          D.19718 = klass->image;
          D.19749 = mono_metadata_parse_marshal_spec (D.19718, tp);
          *D.19748 = D.19749;
        }
        <D.19740>:
        <D.19736>:
        i = i + 1;
        <D.18209>:
        if (i < lastp) goto <D.18208>; else goto <D.18210>;
        <D.18210>:
        return;
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.19720>:
}


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

  D.19753 = __builtin_object_size (__dest, 0);
  D.19752 = __builtin___memcpy_chk (__dest, __src, __len, D.19753);
  return D.19752;
}


mono_method_has_marshal_info (struct MonoMethod * method)
{
  struct MonoClass * D.19755;
  struct MonoImage * D.19756;
  unsigned char D.19757;
  unsigned char D.19758;
  struct GHashTable * D.19761;
  unsigned int i.85;
  unsigned int D.19765;
  struct MonoMarshalSpec * * D.19766;
  struct MonoMarshalSpec * D.19767;
  mono_bool D.19770;
  struct MonoMethodSignature * D.19771;
  short unsigned int D.19772;
  int D.19773;
  struct MonoImage * D.19774;
  unsigned int D.19777;
  int D.19778;
  unsigned int D.19779;
  <unnamed-unsigned:24> D.19780;
  unsigned int D.19781;
  int idx.86;
  unsigned int D.19785;
  <unnamed-unsigned:24> D.19787;
  int D.19788;
  int D.19789;
  unsigned int D.19790;
  unsigned int D.19791;
  int i;
  int lastp;
  struct MonoClass * klass;
  struct MonoTableInfo * methodt;
  struct MonoTableInfo * paramt;
  guint32 idx;

  klass = method->klass;
  D.19755 = method->klass;
  D.19756 = D.19755->image;
  D.19757 = BIT_FIELD_REF <*D.19756, 8, 128>;
  D.19758 = D.19757 & 8;
  if (D.19758 != 0) goto <D.19759>; else goto <D.19760>;
  <D.19759>:
  {
    struct MonoReflectionMethodAux * method_aux;
    struct MonoMarshalSpec * * dyn_specs;

    D.19755 = method->klass;
    D.19756 = D.19755->image;
    D.19761 = MEM[(struct MonoDynamicImage *)D.19756].method_aux_hash;
    method_aux = monoeg_g_hash_table_lookup (D.19761, method);
    dyn_specs = method_aux->param_marshall;
    if (dyn_specs != 0B) goto <D.19762>; else goto <D.19763>;
    <D.19762>:
    i = 0;
    goto <D.18223>;
    <D.18222>:
    i.85 = (unsigned int) i;
    D.19765 = i.85 * 4;
    D.19766 = dyn_specs + D.19765;
    D.19767 = *D.19766;
    if (D.19767 != 0B) goto <D.19768>; else goto <D.19769>;
    <D.19768>:
    D.19770 = 1;
    return D.19770;
    <D.19769>:
    i = i + 1;
    <D.18223>:
    D.19771 = mono_method_signature (method);
    D.19772 = D.19771->param_count;
    D.19773 = (int) D.19772;
    if (D.19773 >= i) goto <D.18222>; else goto <D.18224>;
    <D.18224>:
    <D.19763>:
    D.19770 = 0;
    return D.19770;
  }
  <D.19760>:
  mono_class_init (klass);
  D.19774 = klass->image;
  methodt = &D.19774->tables[6];
  D.19774 = klass->image;
  paramt = &D.19774->tables[8];
  idx = mono_method_get_index (method);
  if (idx != 0) goto <D.19775>; else goto <D.19776>;
  <D.19775>:
  {
    guint32 cols[3];
    guint param_index;

    try
      {
        D.19777 = idx + 4294967295;
        D.19778 = (int) D.19777;
        param_index = mono_metadata_decode_row_col (methodt, D.19778, 5);
        D.19779 = idx + 1;
        D.19780 = methodt->rows;
        D.19781 = (unsigned int) D.19780;
        if (D.19779 < D.19781) goto <D.19782>; else goto <D.19783>;
        <D.19782>:
        idx.86 = (int) idx;
        D.19785 = mono_metadata_decode_row_col (methodt, idx.86, 5);
        lastp = (int) D.19785;
        goto <D.19786>;
        <D.19783>:
        D.19787 = paramt->rows;
        D.19788 = (int) D.19787;
        lastp = D.19788 + 1;
        <D.19786>:
        i = (int) param_index;
        goto <D.18228>;
        <D.18227>:
        D.19789 = i + -1;
        mono_metadata_decode_row (paramt, D.19789, &cols, 3);
        D.19790 = cols[0];
        D.19791 = D.19790 & 8192;
        if (D.19791 != 0) goto <D.19792>; else goto <D.19793>;
        <D.19792>:
        D.19770 = 1;
        return D.19770;
        <D.19793>:
        i = i + 1;
        <D.18228>:
        if (i < lastp) goto <D.18227>; else goto <D.18229>;
        <D.18229>:
        D.19770 = 0;
        return D.19770;
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  <D.19776>:
  D.19770 = 0;
  return D.19770;
}


mono_method_get_wrapper_data (struct MonoMethod * method, guint32 id)
{
  _Bool D.19796;
  long int D.19797;
  long int D.19798;
  unsigned char D.19801;
  unsigned char D.19802;
  _Bool D.19803;
  long int D.19804;
  long int D.19805;
  unsigned char D.19808;
  unsigned char D.19809;
  _Bool D.19812;
  long int D.19813;
  long int D.19814;
  void * D.19817;
  unsigned int D.19818;
  _Bool D.19819;
  long int D.19820;
  long int D.19821;
  void * D.19824;
  unsigned int D.19825;
  void * * D.19826;
  void * * data;

  D.19796 = method == 0B;
  D.19797 = (long int) D.19796;
  D.19798 = __builtin_expect (D.19797, 0);
  if (D.19798 != 0) goto <D.19799>; else goto <D.19800>;
  <D.19799>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2231, "method != NULL");
  <D.19800>:
  D.19801 = BIT_FIELD_REF <*method, 8, 160>;
  D.19802 = D.19801 & 124;
  D.19803 = D.19802 == 0;
  D.19804 = (long int) D.19803;
  D.19805 = __builtin_expect (D.19804, 0);
  if (D.19805 != 0) goto <D.19806>; else goto <D.19807>;
  <D.19806>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2232, "method->wrapper_type != MONO_WRAPPER_NONE");
  <D.19807>:
  D.19808 = BIT_FIELD_REF <*method, 8, 168>;
  D.19809 = D.19808 & 16;
  if (D.19809 != 0) goto <D.19810>; else goto <D.19811>;
  <D.19810>:
  method = MEM[(struct MonoMethodInflated *)method].declaring;
  <D.19811>:
  data = MEM[(struct MonoMethodWrapper *)method].method_data;
  D.19812 = data == 0B;
  D.19813 = (long int) D.19812;
  D.19814 = __builtin_expect (D.19813, 0);
  if (D.19814 != 0) goto <D.19815>; else goto <D.19816>;
  <D.19815>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2237, "data != NULL");
  <D.19816>:
  D.19817 = *data;
  D.19818 = (unsigned int) D.19817;
  D.19819 = D.19818 < id;
  D.19820 = (long int) D.19819;
  D.19821 = __builtin_expect (D.19820, 0);
  if (D.19821 != 0) goto <D.19822>; else goto <D.19823>;
  <D.19822>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2238, "id <= GPOINTER_TO_UINT (*data)");
  <D.19823>:
  D.19825 = id * 4;
  D.19826 = data + D.19825;
  D.19824 = *D.19826;
  return D.19824;
}


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

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


stack_walk_adapter (struct MonoStackFrameInfo * frame, struct MonoContext * ctx, void * data)
{
  <unnamed type> D.19830;
  gboolean D.19831;
  struct MonoJitInfo * D.19832;
  _Bool D.19833;
  long int D.19834;
  long int D.19835;
  mono_bool (*<T1011>) (struct MonoMethod *, int32_t, int32_t, mono_bool, void *) D.19838;
  void * D.19839;
  int D.19840;
  int D.19841;
  int D.19842;
  struct MonoMethod * D.19843;
  struct StackWalkUserData * d;

  d = data;
  D.19830 = frame->type;
  switch (D.19830) <default: <D.18248>, case 0: <D.18247>, case 1: <D.18245>, case 2: <D.18246>>
  <D.18245>:
  <D.18246>:
  D.19831 = 0;
  return D.19831;
  <D.18247>:
  D.19832 = frame->ji;
  D.19833 = D.19832 == 0B;
  D.19834 = (long int) D.19833;
  D.19835 = __builtin_expect (D.19834, 0);
  if (D.19835 != 0) goto <D.19836>; else goto <D.19837>;
  <D.19836>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2257, "frame->ji");
  <D.19837>:
  D.19838 = d->func;
  D.19839 = d->user_data;
  D.19840 = frame->managed;
  D.19841 = frame->il_offset;
  D.19842 = frame->native_offset;
  D.19832 = frame->ji;
  D.19843 = mono_jit_info_get_method (D.19832);
  D.19831 = D.19838 (D.19843, D.19842, D.19841, D.19840, D.19839);
  return D.19831;
  <D.18248>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "loader.c", 2261);
  D.19831 = 0;
  return D.19831;
}


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

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


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

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


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

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


mono_loader_lock ()
{
  _Bool D.19854;
  long int D.19855;
  long int D.19856;
  int loader_lock_track_ownership.87;
  _Bool D.19860;
  long int D.19861;
  long int D.19862;
  unsigned int loader_lock_nest_id.88;
  void * D.19866;
  unsigned int D.19867;
  unsigned int D.19868;
  void * D.19869;

  {
    int ret;

    ret = pthread_mutex_lock (&loader_mutex.mutex);
    if (ret != 0) goto <D.19852>; else goto <D.19853>;
    <D.19852>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.19853>:
    D.19854 = ret != 0;
    D.19855 = (long int) D.19854;
    D.19856 = __builtin_expect (D.19855, 0);
    if (D.19856 != 0) goto <D.19857>; else goto <D.19858>;
    <D.19857>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2308, "ret == 0");
    <D.19858>:
  }
  loader_lock_track_ownership.87 = loader_lock_track_ownership;
  D.19860 = loader_lock_track_ownership.87 != 0;
  D.19861 = (long int) D.19860;
  D.19862 = __builtin_expect (D.19861, 0);
  if (D.19862 != 0) goto <D.19863>; else goto <D.19864>;
  <D.19863>:
  loader_lock_nest_id.88 = loader_lock_nest_id;
  D.19866 = pthread_getspecific (loader_lock_nest_id.88);
  D.19867 = (unsigned int) D.19866;
  D.19868 = D.19867 + 1;
  D.19869 = (void *) D.19868;
  loader_lock_nest_id.88 = loader_lock_nest_id;
  mono_native_tls_set_value (loader_lock_nest_id.88, D.19869);
  <D.19864>:
}


mono_loader_unlock ()
{
  _Bool D.19872;
  long int D.19873;
  long int D.19874;
  int loader_lock_track_ownership.89;
  _Bool D.19878;
  long int D.19879;
  long int D.19880;
  unsigned int loader_lock_nest_id.90;
  void * D.19884;
  unsigned int D.19885;
  unsigned int D.19886;
  void * D.19887;

  {
    int ret;

    ret = pthread_mutex_unlock (&loader_mutex.mutex);
    if (ret != 0) goto <D.19870>; else goto <D.19871>;
    <D.19870>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.19871>:
    D.19872 = ret != 0;
    D.19873 = (long int) D.19872;
    D.19874 = __builtin_expect (D.19873, 0);
    if (D.19874 != 0) goto <D.19875>; else goto <D.19876>;
    <D.19875>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2317, "ret == 0");
    <D.19876>:
  }
  loader_lock_track_ownership.89 = loader_lock_track_ownership;
  D.19878 = loader_lock_track_ownership.89 != 0;
  D.19879 = (long int) D.19878;
  D.19880 = __builtin_expect (D.19879, 0);
  if (D.19880 != 0) goto <D.19881>; else goto <D.19882>;
  <D.19881>:
  loader_lock_nest_id.90 = loader_lock_nest_id;
  D.19884 = pthread_getspecific (loader_lock_nest_id.90);
  D.19885 = (unsigned int) D.19884;
  D.19886 = D.19885 + 4294967295;
  D.19887 = (void *) D.19886;
  loader_lock_nest_id.90 = loader_lock_nest_id;
  mono_native_tls_set_value (loader_lock_nest_id.90, D.19887);
  <D.19882>:
}


mono_loader_lock_track_ownership (gboolean track)
{
  loader_lock_track_ownership = track;
}


mono_loader_lock_is_owned_by_self ()
{
  int loader_lock_track_ownership.91;
  _Bool D.19889;
  long int D.19890;
  long int D.19891;
  gboolean D.19894;
  unsigned int loader_lock_nest_id.92;
  void * D.19896;
  unsigned int D.19897;
  _Bool D.19898;

  loader_lock_track_ownership.91 = loader_lock_track_ownership;
  D.19889 = loader_lock_track_ownership.91 == 0;
  D.19890 = (long int) D.19889;
  D.19891 = __builtin_expect (D.19890, 0);
  if (D.19891 != 0) goto <D.19892>; else goto <D.19893>;
  <D.19892>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2345, "loader_lock_track_ownership");
  <D.19893>:
  loader_lock_nest_id.92 = loader_lock_nest_id;
  D.19896 = pthread_getspecific (loader_lock_nest_id.92);
  D.19897 = (unsigned int) D.19896;
  D.19898 = D.19897 != 0;
  D.19894 = (gboolean) D.19898;
  return D.19894;
}


mono_loader_lock_if_inited ()
{
  int loader_lock_inited.93;

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


mono_loader_unlock_if_inited ()
{
  int loader_lock_inited.94;

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


mono_method_signature_checked (struct MonoMethod * m, struct MonoError * error)
{
  struct MonoMethodSignature * D.19906;
  struct MonoMethodSignature * D.19909;
  unsigned char D.19912;
  unsigned char D.19913;
  struct MonoMethod * D.19916;
  struct MonoGenericContext * D.19917;
  struct MonoClass * D.19918;
  struct MonoImage * D.19919;
  int D.19920;
  unsigned int D.19923;
  unsigned int inflated_signatures_size.95;
  unsigned int inflated_signatures_size.96;
  unsigned int D.19926;
  unsigned int D.19927;
  _Bool D.19928;
  long int D.19929;
  long int D.19930;
  int D.19933;
  struct MonoClass * D.19934;
  int D.19935;
  struct MonoTableInfo * D.19936;
  struct MonoGenericClass * D.19937;
  _Bool D.19938;
  long int D.19939;
  long int D.19940;
  int iftmp.97;
  short unsigned int D.19948;
  int D.19949;
  int D.19950;
  short unsigned int D.19952;
  int D.19953;
  int D.19954;
  int D.19957;
  struct GHashTable * D.19962;
  int D.19965;
  unsigned int D.19968;
  const char * sig_body.98;
  unsigned int D.19974;
  unsigned int signatures_size.99;
  unsigned int signatures_size.100;
  short unsigned int D.19977;
  unsigned char D.19983;
  unsigned char D.19984;
  char * D.19985;
  const char * D.19986;
  <unnamed-signed:31> D.19987;
  int D.19988;
  int D.19989;
  unsigned int D.19997;
  unsigned int D.19998;
  short unsigned int D.20006;
  int D.20007;
  int D.20008;
  unsigned char D.20009;
  <unnamed-unsigned:6> D.20010;
  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.19906 = m->signature;
  if (D.19906 != 0B) goto <D.19907>; else goto <D.19908>;
  <D.19907>:
  D.19909 = m->signature;
  return D.19909;
  <D.19908>:
  mono_loader_lock ();
  D.19906 = m->signature;
  if (D.19906 != 0B) goto <D.19910>; else goto <D.19911>;
  <D.19910>:
  mono_loader_unlock ();
  D.19909 = m->signature;
  return D.19909;
  <D.19911>:
  D.19912 = BIT_FIELD_REF <*m, 8, 168>;
  D.19913 = D.19912 & 16;
  if (D.19913 != 0) goto <D.19914>; else goto <D.19915>;
  <D.19914>:
  {
    struct MonoMethodInflated * imethod;

    imethod = m;
    D.19916 = imethod->declaring;
    signature = mono_method_signature (D.19916);
    D.19917 = mono_method_get_context (m);
    D.19916 = imethod->declaring;
    D.19918 = D.19916->klass;
    D.19919 = D.19918->image;
    signature = inflate_generic_signature_checked (D.19919, signature, D.19917, error);
    D.19920 = mono_error_ok (error);
    if (D.19920 == 0) goto <D.19921>; else goto <D.19922>;
    <D.19921>:
    mono_loader_unlock ();
    D.19909 = 0B;
    return D.19909;
    <D.19922>:
    D.19923 = mono_metadata_signature_size (signature);
    inflated_signatures_size.95 = inflated_signatures_size;
    inflated_signatures_size.96 = D.19923 + inflated_signatures_size.95;
    inflated_signatures_size = inflated_signatures_size.96;
    mono_memory_barrier ();
    m->signature = signature;
    mono_loader_unlock ();
    D.19909 = m->signature;
    return D.19909;
  }
  <D.19915>:
  D.19926 = m->token;
  D.19927 = D.19926 >> 24;
  D.19928 = D.19927 != 6;
  D.19929 = (long int) D.19928;
  D.19930 = __builtin_expect (D.19929, 0);
  if (D.19930 != 0) goto <D.19931>; else goto <D.19932>;
  <D.19931>:
  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.19932>:
  D.19926 = m->token;
  D.19933 = (int) D.19926;
  idx = D.19933 & 16777215;
  D.19934 = m->klass;
  img = D.19934->image;
  D.19935 = idx + -1;
  D.19936 = &img->tables[6];
  sig_offset = mono_metadata_decode_row_col (D.19936, D.19935, 4);
  sig = mono_metadata_blob_heap (img, sig_offset);
  D.19934 = m->klass;
  D.19937 = D.19934->generic_class;
  D.19938 = D.19937 != 0B;
  D.19939 = (long int) D.19938;
  D.19940 = __builtin_expect (D.19939, 0);
  if (D.19940 != 0) goto <D.19941>; else goto <D.19942>;
  <D.19941>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2425, "!m->klass->generic_class");
  <D.19942>:
  container = mono_method_get_generic_container (m);
  if (container == 0B) goto <D.19943>; else goto <D.19944>;
  <D.19943>:
  D.19934 = m->klass;
  container = D.19934->generic_container;
  <D.19944>:
  D.19948 = m->iflags;
  D.19949 = (int) D.19948;
  D.19950 = D.19949 & 4096;
  if (D.19950 == 0) goto <D.19951>; else goto <D.19946>;
  <D.19951>:
  D.19952 = m->flags;
  D.19953 = (int) D.19952;
  D.19954 = D.19953 & 8192;
  if (D.19954 == 0) goto <D.19955>; else goto <D.19946>;
  <D.19955>:
  if (container == 0B) goto <D.19956>; else goto <D.19946>;
  <D.19956>:
  iftmp.97 = 1;
  goto <D.19947>;
  <D.19946>:
  iftmp.97 = 0;
  <D.19947>:
  can_cache_signature = iftmp.97;
  D.19957 = mono_metadata_method_has_param_attrs (img, idx);
  if (D.19957 != 0) goto <D.19958>; else goto <D.19959>;
  <D.19958>:
  can_cache_signature = 0;
  <D.19959>:
  if (can_cache_signature != 0) goto <D.19960>; else goto <D.19961>;
  <D.19960>:
  D.19962 = img->method_signatures;
  signature = monoeg_g_hash_table_lookup (D.19962, sig);
  <D.19961>:
  if (signature == 0B) goto <D.19963>; else goto <D.19964>;
  <D.19963>:
  {
    const char * sig_body;

    try
      {
        D.19965 = mono_verifier_verify_method_signature (img, sig_offset, error);
        if (D.19965 == 0) goto <D.19966>; else goto <D.19967>;
        <D.19966>:
        mono_loader_unlock ();
        D.19909 = 0B;
        return D.19909;
        <D.19967>:
        D.19968 = mono_metadata_decode_blob_size (sig, &sig_body);
        size = (int) D.19968;
        sig_body.98 = sig_body;
        signature = mono_metadata_parse_method_signature_full (img, container, idx, sig_body.98, 0B);
        if (signature == 0B) goto <D.19970>; else goto <D.19971>;
        <D.19970>:
        mono_error_set_from_loader_error (error);
        mono_loader_unlock ();
        D.19909 = 0B;
        return D.19909;
        <D.19971>:
        if (can_cache_signature != 0) goto <D.19972>; else goto <D.19973>;
        <D.19972>:
        D.19962 = img->method_signatures;
        monoeg_g_hash_table_insert_replace (D.19962, sig, signature, 0);
        <D.19973>:
        D.19974 = mono_metadata_signature_size (signature);
        signatures_size.99 = signatures_size;
        signatures_size.100 = D.19974 + signatures_size.99;
        signatures_size = signatures_size.100;
      }
    finally
      {
        sig_body = {CLOBBER};
      }
  }
  <D.19964>:
  D.19977 = signature->generic_param_count;
  if (D.19977 != 0) goto <D.19978>; else goto <D.19979>;
  <D.19978>:
  if (container == 0B) goto <D.19980>; else goto <D.19982>;
  <D.19982>:
  D.19983 = BIT_FIELD_REF <*container, 8, 152>;
  D.19984 = D.19983 & 128;
  if (D.19984 == 0) goto <D.19980>; else goto <D.19981>;
  <D.19980>:
  mono_loader_unlock ();
  D.19985 = img->name;
  D.19986 = m->name;
  D.19934 = m->klass;
  mono_error_set_method_load (error, D.19934, D.19986, "Signature claims method has generic parameters, but generic_params table says it doesn\'t for method 0x%08x from image %s", idx, D.19985);
  D.19909 = 0B;
  return D.19909;
  <D.19981>:
  D.19987 = container->type_argc;
  D.19988 = (int) D.19987;
  D.19977 = signature->generic_param_count;
  D.19989 = (int) D.19977;
  if (D.19988 != D.19989) goto <D.19990>; else goto <D.19991>;
  <D.19990>:
  mono_loader_unlock ();
  D.19985 = img->name;
  D.19987 = container->type_argc;
  D.19988 = (int) D.19987;
  D.19977 = signature->generic_param_count;
  D.19989 = (int) D.19977;
  D.19986 = m->name;
  D.19934 = m->klass;
  mono_error_set_method_load (error, D.19934, D.19986, "Inconsistent generic parameter count.  Signature says %d, generic_params table says %d for method 0x%08x from image %s", D.19989, D.19988, idx, D.19985);
  D.19909 = 0B;
  return D.19909;
  <D.19991>:
  goto <D.19992>;
  <D.19979>:
  if (container != 0B) goto <D.19993>; else goto <D.19994>;
  <D.19993>:
  D.19983 = BIT_FIELD_REF <*container, 8, 152>;
  D.19984 = D.19983 & 128;
  if (D.19984 != 0) goto <D.19995>; else goto <D.19996>;
  <D.19995>:
  D.19997 = BIT_FIELD_REF <*container, 32, 128>;
  D.19998 = D.19997 & 2147483647;
  if (D.19998 != 0) goto <D.19999>; else goto <D.20000>;
  <D.19999>:
  mono_loader_unlock ();
  D.19985 = img->name;
  D.19986 = m->name;
  D.19934 = m->klass;
  mono_error_set_method_load (error, D.19934, D.19986, "generic_params table claims method has generic parameters, but signature says it doesn\'t for method 0x%08x from image %s", idx, D.19985);
  D.19909 = 0B;
  return D.19909;
  <D.20000>:
  <D.19996>:
  <D.19994>:
  <D.19992>:
  D.19948 = m->iflags;
  D.19949 = (int) D.19948;
  D.19950 = D.19949 & 4096;
  if (D.19950 != 0) goto <D.20001>; else goto <D.20002>;
  <D.20001>:
  signature->pinvoke = 1;
  goto <D.20003>;
  <D.20002>:
  D.19952 = m->flags;
  D.19953 = (int) D.19952;
  D.19954 = D.19953 & 8192;
  if (D.19954 != 0) goto <D.20004>; else goto <D.20005>;
  <D.20004>:
  {
    MonoCallConvention conv;
    struct MonoMethodPInvoke * piinfo;

    conv = 0;
    piinfo = m;
    signature->pinvoke = 1;
    D.20006 = piinfo->piflags;
    D.20007 = (int) D.20006;
    D.20008 = D.20007 & 1792;
    switch (D.20008) <default: <D.18317>, case 0: <D.18308>, case 10: <D.18316>, case 16: <D.18315>, case 256: <D.18309>, case 512: <D.18311>, case 768: <D.18312>, case 1024: <D.18313>, case 1280: <D.18314>>
    <D.18308>:
    <D.18309>:
    conv = 0;
    goto <D.18310>;
    <D.18311>:
    conv = 1;
    goto <D.18310>;
    <D.18312>:
    conv = 2;
    goto <D.18310>;
    <D.18313>:
    conv = 3;
    goto <D.18310>;
    <D.18314>:
    conv = 4;
    goto <D.18310>;
    <D.18315>:
    <D.18316>:
    <D.18317>:
    mono_loader_unlock ();
    D.19985 = img->name;
    D.20006 = piinfo->piflags;
    D.20007 = (int) D.20006;
    D.19986 = m->name;
    D.19934 = m->klass;
    mono_error_set_method_load (error, D.19934, D.19986, "unsupported calling convention : 0x%04x for method 0x%08x from image %s", D.20007, idx, D.19985);
    D.19909 = 0B;
    return D.19909;
    <D.18310>:
    D.20009 = (unsigned char) conv;
    D.20010 = (<unnamed-unsigned:6>) D.20009;
    signature->call_convention = D.20010;
  }
  <D.20005>:
  <D.20003>:
  mono_memory_barrier ();
  m->signature = signature;
  mono_loader_unlock ();
  D.19909 = m->signature;
  return D.19909;
}


mono_memory_barrier ()
{
  __sync_synchronize ();
}


mono_method_signature (struct MonoMethod * m)
{
  struct MonoClass * D.20016;
  const char * D.20017;
  const char * D.20018;
  struct MonoMethodSignature * D.20019;
  struct MonoError error;
  struct MonoMethodSignature * sig;

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

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


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

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


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

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


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

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


mono_method_get_header (struct MonoMethod * method)
{
  short unsigned int D.20030;
  int D.20031;
  int D.20032;
  short unsigned int D.20034;
  unsigned int D.20035;
  unsigned int D.20036;
  int D.20038;
  struct MonoMethodHeader * D.20039;
  unsigned char D.20040;
  unsigned char D.20041;
  struct MonoMethodHeader * D.20044;
  struct MonoMethod * D.20047;
  struct MonoGenericContext * D.20050;
  struct MonoMethodHeader * D.20051;
  short unsigned int D.20052;
  short unsigned int D.20053;
  struct MonoMethodHeader * D.20056;
  _Bool D.20057;
  long int D.20058;
  long int D.20059;
  unsigned int D.20062;
  unsigned int D.20063;
  _Bool D.20064;
  long int D.20065;
  long int D.20066;
  int D.20069;
  struct MonoClass * D.20070;
  int D.20071;
  struct MonoTableInfo * D.20072;
  int D.20073;
  struct MonoGenericContainer * D.20078;
  int idx;
  guint32 rva;
  struct MonoImage * img;
  void * loc;
  struct MonoMethodHeader * header;

  D.20030 = method->flags;
  D.20031 = (int) D.20030;
  D.20032 = D.20031 & 1024;
  if (D.20032 != 0) goto <D.20028>; else goto <D.20033>;
  <D.20033>:
  D.20034 = method->iflags;
  D.20035 = (unsigned int) D.20034;
  D.20036 = D.20035 & 4099;
  if (D.20036 != 0) goto <D.20028>; else goto <D.20037>;
  <D.20037>:
  D.20030 = method->flags;
  D.20031 = (int) D.20030;
  D.20038 = D.20031 & 8192;
  if (D.20038 != 0) goto <D.20028>; else goto <D.20029>;
  <D.20028>:
  D.20039 = 0B;
  return D.20039;
  <D.20029>:
  D.20040 = BIT_FIELD_REF <*method, 8, 168>;
  D.20041 = D.20040 & 16;
  if (D.20041 != 0) goto <D.20042>; else goto <D.20043>;
  <D.20042>:
  {
    struct MonoMethodInflated * imethod;
    struct MonoMethodHeader * header;

    imethod = method;
    mono_loader_lock ();
    D.20044 = imethod->header;
    if (D.20044 != 0B) goto <D.20045>; else goto <D.20046>;
    <D.20045>:
    mono_loader_unlock ();
    D.20039 = imethod->header;
    return D.20039;
    <D.20046>:
    D.20047 = imethod->declaring;
    header = mono_method_get_header (D.20047);
    if (header == 0B) goto <D.20048>; else goto <D.20049>;
    <D.20048>:
    mono_loader_unlock ();
    D.20039 = 0B;
    return D.20039;
    <D.20049>:
    D.20050 = mono_method_get_context (method);
    D.20051 = inflate_generic_header (header, D.20050);
    imethod->header = D.20051;
    mono_loader_unlock ();
    mono_metadata_free_mh (header);
    D.20039 = imethod->header;
    return D.20039;
  }
  <D.20043>:
  D.20052 = BIT_FIELD_REF <*method, 16, 160>;
  D.20053 = D.20052 & 1148;
  if (D.20053 != 0) goto <D.20054>; else goto <D.20055>;
  <D.20054>:
  {
    struct MonoMethodWrapper * mw;

    mw = method;
    D.20056 = mw->header;
    D.20057 = D.20056 == 0B;
    D.20058 = (long int) D.20057;
    D.20059 = __builtin_expect (D.20058, 0);
    if (D.20059 != 0) goto <D.20060>; else goto <D.20061>;
    <D.20060>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2599, "mw->header");
    <D.20061>:
    D.20039 = mw->header;
    return D.20039;
  }
  <D.20055>:
  D.20062 = method->token;
  D.20063 = D.20062 >> 24;
  D.20064 = D.20063 != 6;
  D.20065 = (long int) D.20064;
  D.20066 = __builtin_expect (D.20065, 0);
  if (D.20066 != 0) goto <D.20067>; else goto <D.20068>;
  <D.20067>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "loader.c", 2607, "mono_metadata_token_table (method->token) == MONO_TABLE_METHOD");
  <D.20068>:
  D.20062 = method->token;
  D.20069 = (int) D.20062;
  idx = D.20069 & 16777215;
  D.20070 = method->klass;
  img = D.20070->image;
  D.20071 = idx + -1;
  D.20072 = &img->tables[6];
  rva = mono_metadata_decode_row_col (D.20072, D.20071, 0);
  D.20073 = mono_verifier_verify_method_header (img, rva, 0B);
  if (D.20073 == 0) goto <D.20074>; else goto <D.20075>;
  <D.20074>:
  D.20039 = 0B;
  return D.20039;
  <D.20075>:
  loc = mono_image_rva_map (img, rva);
  if (loc == 0B) goto <D.20076>; else goto <D.20077>;
  <D.20076>:
  D.20039 = 0B;
  return D.20039;
  <D.20077>:
  D.20078 = mono_method_get_generic_container (method);
  header = mono_metadata_parse_mh_full (img, D.20078, loc);
  D.20039 = header;
  return D.20039;
}


inflate_generic_header (struct MonoMethodHeader * header, struct MonoGenericContext * context)
{
  short unsigned int D.20080;
  unsigned int D.20081;
  unsigned int D.20082;
  unsigned int D.20083;
  const unsigned char * D.20084;
  unsigned int D.20085;
  <unnamed-unsigned:15> D.20086;
  <unnamed-unsigned:15> D.20087;
  <unnamed-unsigned:1> D.20088;
  struct MonoExceptionClause * D.20089;
  struct MonoType * D.20090;
  struct MonoType * D.20091;
  int D.20092;
  short unsigned int D.20093;
  short unsigned int D.20094;
  <unnamed-unsigned:15> D.20097;
  unsigned int D.20098;
  unsigned int D.20099;
  void * D.20100;
  struct MonoExceptionClause * D.20101;
  unsigned int i.101;
  unsigned int D.20103;
  unsigned int D.20104;
  struct MonoClass * D.20107;
  struct MonoClass * D.20108;
  int D.20109;
  struct MonoMethodHeader * D.20110;
  struct MonoMethodHeader * res;
  int i;

  D.20080 = header->num_locals;
  D.20081 = (unsigned int) D.20080;
  D.20082 = D.20081 + 5;
  D.20083 = D.20082 * 4;
  res = monoeg_malloc0 (D.20083);
  D.20084 = header->code;
  res->code = D.20084;
  D.20085 = header->code_size;
  res->code_size = D.20085;
  D.20086 = header->max_stack;
  res->max_stack = D.20086;
  D.20087 = header->num_clauses;
  res->num_clauses = D.20087;
  D.20088 = header->init_locals;
  res->init_locals = D.20088;
  D.20080 = header->num_locals;
  res->num_locals = D.20080;
  D.20089 = header->clauses;
  res->clauses = D.20089;
  i = 0;
  goto <D.17820>;
  <D.17819>:
  D.20090 = header->locals[i];
  D.20091 = mono_class_inflate_generic_type (D.20090, context);
  res->locals[i] = D.20091;
  i = i + 1;
  <D.17820>:
  D.20080 = header->num_locals;
  D.20092 = (int) D.20080;
  if (D.20092 > i) goto <D.17819>; else goto <D.17821>;
  <D.17821>:
  D.20093 = BIT_FIELD_REF <*res, 16, 80>;
  D.20094 = D.20093 & 32767;
  if (D.20094 != 0) goto <D.20095>; else goto <D.20096>;
  <D.20095>:
  D.20097 = res->num_clauses;
  D.20098 = (unsigned int) D.20097;
  D.20099 = D.20098 * 24;
  D.20089 = header->clauses;
  D.20100 = monoeg_g_memdup (D.20089, D.20099);
  res->clauses = D.20100;
  i = 0;
  goto <D.17825>;
  <D.17824>:
  {
    struct MonoExceptionClause * clause;

    D.20101 = res->clauses;
    i.101 = (unsigned int) i;
    D.20103 = i.101 * 24;
    clause = D.20101 + D.20103;
    D.20104 = clause->flags;
    if (D.20104 != 0) goto <D.20105>; else goto <D.20106>;
    <D.20105>:
    // predicted unlikely by continue predictor.
    goto <D.17823>;
    <D.20106>:
    D.20107 = clause->data.catch_class;
    D.20108 = mono_class_inflate_generic_class (D.20107, context);
    clause->data.catch_class = D.20108;
  }
  <D.17823>:
  i = i + 1;
  <D.17825>:
  D.20087 = header->num_clauses;
  D.20109 = (int) D.20087;
  if (D.20109 > i) goto <D.17824>; else goto <D.17826>;
  <D.17826>:
  <D.20096>:
  D.20110 = res;
  return D.20110;
}


mono_method_get_flags (struct MonoMethod * method, guint32 * iflags)
{
  short unsigned int D.20114;
  unsigned int D.20115;
  uint32_t D.20116;
  short unsigned int D.20117;

  if (iflags != 0B) goto <D.20112>; else goto <D.20113>;
  <D.20112>:
  D.20114 = method->iflags;
  D.20115 = (unsigned int) D.20114;
  *iflags = D.20115;
  <D.20113>:
  D.20117 = method->flags;
  D.20116 = (uint32_t) D.20117;
  return D.20116;
}


mono_method_get_index (struct MonoMethod * method)
{
  unsigned char D.20119;
  uint32_t D.20122;
  unsigned int D.20123;
  unsigned char D.20126;
  struct MonoMethod * * D.20129;
  unsigned int i.102;
  unsigned int D.20131;
  struct MonoMethod * * D.20132;
  struct MonoMethod * D.20133;
  struct MonoImage * D.20136;
  unsigned char D.20137;
  unsigned char D.20138;
  unsigned int D.20141;
  unsigned int i.103;
  unsigned int D.20143;
  unsigned int D.20144;
  unsigned int D.20145;
  struct MonoClass * klass;
  int i;

  klass = method->klass;
  D.20119 = klass->rank;
  if (D.20119 != 0) goto <D.20120>; else goto <D.20121>;
  <D.20120>:
  D.20122 = 0;
  return D.20122;
  <D.20121>:
  D.20123 = method->token;
  if (D.20123 != 0) goto <D.20124>; else goto <D.20125>;
  <D.20124>:
  D.20123 = method->token;
  D.20122 = D.20123 & 16777215;
  return D.20122;
  <D.20125>:
  mono_class_setup_methods (klass);
  D.20126 = klass->exception_type;
  if (D.20126 != 0) goto <D.20127>; else goto <D.20128>;
  <D.20127>:
  D.20122 = 0;
  return D.20122;
  <D.20128>:
  i = 0;
  goto <D.18354>;
  <D.18353>:
  D.20129 = klass->methods;
  i.102 = (unsigned int) i;
  D.20131 = i.102 * 4;
  D.20132 = D.20129 + D.20131;
  D.20133 = *D.20132;
  if (D.20133 == method) goto <D.20134>; else goto <D.20135>;
  <D.20134>:
  D.20136 = klass->image;
  D.20137 = BIT_FIELD_REF <*D.20136, 8, 128>;
  D.20138 = D.20137 & 32;
  if (D.20138 != 0) goto <D.20139>; else goto <D.20140>;
  <D.20139>:
  D.20141 = klass->method.first;
  i.103 = (unsigned int) i;
  D.20143 = D.20141 + i.103;
  D.20144 = D.20143 + 1;
  D.20136 = klass->image;
  D.20122 = mono_metadata_translate_token_index (D.20136, 6, D.20144);
  return D.20122;
  <D.20140>:
  D.20141 = klass->method.first;
  i.103 = (unsigned int) i;
  D.20143 = D.20141 + i.103;
  D.20122 = D.20143 + 1;
  return D.20122;
  <D.20135>:
  i = i + 1;
  <D.18354>:
  i.103 = (unsigned int) i;
  D.20145 = klass->method.count;
  if (i.103 < D.20145) goto <D.18353>; else goto <D.18355>;
  <D.18355>:
  D.20122 = 0;
  return D.20122;
}


