mono_profiler_startup (const char * desc)
{
  struct GHashTable * D.14040;
  struct GHashTable * D.14041;
  struct GHashTable * D.14042;
  struct MonoProfiler * prof;

  prof = monoeg_malloc0 (32);
  pthread_mutex_init (&mismatched_files_section, 0B);
  D.14040 = monoeg_g_hash_table_new (mismatched_files_guint32_hash, mismatched_files_guint32_equal);
  prof->mismatched_files_hash = D.14040;
  D.14041 = monoeg_g_hash_table_new (0B, 0B);
  prof->saved_strings_hash = D.14041;
  D.14042 = monoeg_g_hash_table_new (mismatched_files_guint32_hash, mismatched_files_guint32_equal);
  prof->string_locations_hash = D.14042;
  mono_profiler_install (prof, profiler_shutdown);
  mono_profiler_install_runtime_initialized (runtime_initialized_cb);
  mono_profiler_install_iomap (mono_portability_iomap_event);
  mono_profiler_install_allocation (mono_portability_remember_alloc);
  mono_profiler_set_events (262272);
}


mono_portability_remember_alloc (struct MonoProfiler * prof, struct MonoObject * obj, struct MonoClass * klass)
{
  struct MonoClass * string_class.0;
  struct MonoDomain * D.14050;

  string_class.0 = string_class;
  if (klass != string_class.0) goto <D.14048>; else goto <D.14049>;
  <D.14048>:
  return;
  <D.14049>:
  D.14050 = mono_object_get_domain (obj);
  mono_portability_remember_string (prof, D.14050, obj);
}


mono_portability_remember_string (struct MonoProfiler * prof, struct MonoDomain * domain, struct MonoString * str)
{
  int runtime_initialized.1;
  void *[64] * D.14058;
  int D.14059;
  int D.14060;
  struct GHashTable * D.14063;
  struct _SavedString * D.14066;
  struct SavedString * head;
  struct SavedString * entry;

  if (str == 0B) goto <D.14053>; else goto <D.14055>;
  <D.14055>:
  if (domain == 0B) goto <D.14053>; else goto <D.14056>;
  <D.14056>:
  runtime_initialized.1 = runtime_initialized;
  if (runtime_initialized.1 == 0) goto <D.14053>; else goto <D.14054>;
  <D.14053>:
  return;
  <D.14054>:
  entry = monoeg_malloc0 (544);
  entry->string = str;
  entry->domain = domain;
  D.14058 = &entry->stack;
  D.14059 = mono_stack_backtrace (prof, domain, D.14058, 64);
  entry->stack_entries = D.14059;
  D.14060 = entry->stack_entries;
  if (D.14060 == 0) goto <D.14061>; else goto <D.14062>;
  <D.14061>:
  monoeg_g_free (entry);
  return;
  <D.14062>:
  pthread_mutex_lock (&mismatched_files_section);
  D.14063 = prof->saved_strings_hash;
  head = monoeg_g_hash_table_lookup (D.14063, str);
  if (head != 0B) goto <D.14064>; else goto <D.14065>;
  <D.14064>:
  goto <D.14010>;
  <D.14009>:
  head = head->next;
  <D.14010>:
  D.14066 = head->next;
  if (D.14066 != 0B) goto <D.14009>; else goto <D.14011>;
  <D.14011>:
  head->next = entry;
  goto <D.14067>;
  <D.14065>:
  D.14063 = prof->saved_strings_hash;
  monoeg_g_hash_table_insert_replace (D.14063, str, entry, 0);
  <D.14067>:
  pthread_mutex_unlock (&mismatched_files_section);
}


mono_stack_backtrace (struct MonoProfiler * prof, struct MonoDomain * domain, void * * stack, int size)
{
  int D.14072;
  struct StackWalkData data;

  try
    {
      data.prof = prof;
      data.stack = stack;
      data.stack_size = size;
      data.frame_count = 0;
      mono_stack_walk_no_il (stack_walk_func, &data);
      D.14072 = data.frame_count;
      return D.14072;
    }
  finally
    {
      data = {CLOBBER};
    }
}


stack_walk_func (struct MonoMethod * method, gint32 native_offset, gint32 il_offset, gboolean managed, void * data)
{
  int D.14076;
  int D.14077;
  gboolean D.14080;
  void * * D.14081;
  int D.14082;
  int D.14083;
  long unsigned int D.14084;
  long unsigned int D.14085;
  void * * D.14086;
  struct StackWalkData * swdata;
  struct MonoStackBacktraceInfo * info;

  swdata = data;
  D.14076 = swdata->frame_count;
  D.14077 = swdata->stack_size;
  if (D.14076 >= D.14077) goto <D.14078>; else goto <D.14079>;
  <D.14078>:
  D.14080 = 1;
  return D.14080;
  <D.14079>:
  info = monoeg_malloc (16);
  info->method = method;
  info->native_offset = native_offset;
  D.14081 = swdata->stack;
  D.14076 = swdata->frame_count;
  D.14082 = D.14076;
  D.14083 = D.14082 + 1;
  swdata->frame_count = D.14083;
  D.14084 = (long unsigned int) D.14082;
  D.14085 = D.14084 * 8;
  D.14086 = D.14081 + D.14085;
  *D.14086 = info;
  D.14080 = 0;
  return D.14080;
}


mono_portability_iomap_event (struct MonoProfiler * prof, const char * report, const char * pathname, const char * new_pathname)
{
  int runtime_initialized.2;
  unsigned int hash.3;
  struct GHashTable * D.14093;
  gchar * D.14096;
  gchar * D.14097;
  unsigned int hash.4;
  gchar * D.14102;
  unsigned int pathnameHash.5;
  long unsigned int D.14104;
  unsigned int D.14106;
  unsigned int D.14107;
  guint32 hash;
  guint32 pathnameHash;
  struct MismatchedFilesStats * stats;

  try
    {
      runtime_initialized.2 = runtime_initialized;
      if (runtime_initialized.2 == 0) goto <D.14090>; else goto <D.14091>;
      <D.14090>:
      return;
      <D.14091>:
      pthread_mutex_lock (&mismatched_files_section);
      hash.3 = calc_strings_hash (pathname, new_pathname, &pathnameHash);
      hash = hash.3;
      D.14093 = prof->mismatched_files_hash;
      stats = monoeg_g_hash_table_lookup (D.14093, &hash);
      if (stats == 0B) goto <D.14094>; else goto <D.14095>;
      <D.14094>:
      {
        guint32 * hashptr;

        stats = monoeg_malloc (24);
        stats->count = 1;
        D.14096 = monoeg_strdup (pathname);
        stats->requestedName = D.14096;
        D.14097 = monoeg_strdup (new_pathname);
        stats->actualName = D.14097;
        hashptr = monoeg_malloc (4);
        if (hashptr != 0B) goto <D.14098>; else goto <D.14099>;
        <D.14098>:
        hash.4 = hash;
        *hashptr = hash.4;
        D.14093 = prof->mismatched_files_hash;
        monoeg_g_hash_table_insert_replace (D.14093, hashptr, stats, 0);
        goto <D.14101>;
        <D.14099>:
        monoeg_g_log (0B, 4, "Out of memory allocating integer pointer for mismatched files hash table.");
        <D.14028>:
        goto <D.14028>;
        <D.14101>:
        D.14102 = stats->requestedName;
        pathnameHash.5 = pathnameHash;
        D.14102 = stats->requestedName;
        D.14104 = strlen (D.14102);
        store_string_location (prof, D.14102, pathnameHash.5, D.14104);
        pthread_mutex_unlock (&mismatched_files_section);
        print_report ("%s -     Found file path: \'%s\'\n", report, new_pathname);
      }
      goto <D.14105>;
      <D.14095>:
      pthread_mutex_unlock (&mismatched_files_section);
      D.14106 = stats->count;
      D.14107 = D.14106 + 1;
      stats->count = D.14107;
      <D.14105>:
    }
  finally
    {
      hash = {CLOBBER};
      pathnameHash = {CLOBBER};
    }
}


calc_strings_hash (const gchar * str1, const gchar * str2, guint32 * str1hash)
{
  guint32 D.14120;
  guint32 hash;

  hash = do_calc_string_hash (0, str1);
  if (str1hash != 0B) goto <D.14118>; else goto <D.14119>;
  <D.14118>:
  *str1hash = hash;
  <D.14119>:
  D.14120 = do_calc_string_hash (hash, str2);
  return D.14120;
}


do_calc_string_hash (guint32 hash, const gchar * str)
{
  long unsigned int D.14124;
  sizetype D.14125;
  unsigned int D.14126;
  unsigned int D.14127;
  char D.14128;
  unsigned int D.14129;
  gchar * D.14130;
  char D.14131;
  unsigned int D.14132;
  guint32 D.14135;
  guint32 ret;
  gchar * cc;
  gchar * end;

  ret = hash;
  cc = str;
  D.14124 = strlen (str);
  D.14125 = D.14124 + 18446744073709551615;
  end = str + D.14125;
  goto <D.13858>;
  <D.13857>:
  D.14126 = ret << 5;
  D.14127 = D.14126 - ret;
  D.14128 = *cc;
  D.14129 = (unsigned int) D.14128;
  ret = D.14127 + D.14129;
  D.14126 = ret << 5;
  D.14127 = D.14126 - ret;
  D.14130 = cc + 1;
  D.14131 = *D.14130;
  D.14132 = (unsigned int) D.14131;
  ret = D.14127 + D.14132;
  cc = cc + 2;
  <D.13858>:
  if (cc < end) goto <D.13857>; else goto <D.13859>;
  <D.13859>:
  end = end + 1;
  if (cc < end) goto <D.14133>; else goto <D.14134>;
  <D.14133>:
  D.14126 = ret << 5;
  D.14127 = D.14126 - ret;
  D.14128 = *cc;
  D.14129 = (unsigned int) D.14128;
  ret = D.14127 + D.14129;
  <D.14134>:
  D.14135 = ret;
  return D.14135;
}


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

  if (str != 0B) goto <D.14137>; else goto <D.14138>;
  <D.14137>:
  D.14139 = __strdup (str);
  return D.14139;
  <D.14138>:
  D.14139 = 0B;
  return D.14139;
}


store_string_location (struct MonoProfiler * prof, const gchar * string, guint32 hash, size_t len)
{
  struct GHashTable * D.14141;
  unsigned int hash.6;
  struct GHashTable * D.14145;
  struct MonoString * D.14148;
  gchar * D.14149;
  struct StringLocation * location;
  struct SavedString * saved;
  struct SavedStringFindInfo info;
  guint32 * hashptr;

  try
    {
      D.14141 = prof->string_locations_hash;
      location = monoeg_g_hash_table_lookup (D.14141, &hash);
      if (location != 0B) goto <D.14142>; else goto <D.14143>;
      <D.14142>:
      return;
      <D.14143>:
      hash.6 = hash;
      info.hash = hash.6;
      info.len = len;
      D.14145 = prof->saved_strings_hash;
      saved = monoeg_g_hash_table_find (D.14145, saved_strings_find_func, &info);
      hashptr = monoeg_malloc (4);
      hash.6 = hash;
      *hashptr = hash.6;
      location = monoeg_malloc0 (8);
      D.14141 = prof->string_locations_hash;
      monoeg_g_hash_table_insert_replace (D.14141, hashptr, location, 0);
      if (saved == 0B) goto <D.14146>; else goto <D.14147>;
      <D.14146>:
      return;
      <D.14147>:
      D.14145 = prof->saved_strings_hash;
      D.14148 = saved->string;
      monoeg_g_hash_table_remove (D.14145, D.14148);
      D.14149 = build_hint (saved);
      location->hint = D.14149;
    }
  finally
    {
      info = {CLOBBER};
    }
}


saved_strings_find_func (void * key, void * value, void * user_data)
{
  struct MonoString * D.14163;
  int D.14164;
  long unsigned int D.14165;
  long unsigned int D.14166;
  gboolean D.14167;
  unsigned int D.14168;
  struct SavedStringFindInfo * info;
  struct SavedString * saved;
  gchar * utf_str;
  guint32 hash;

  info = user_data;
  saved = value;
  if (info == 0B) goto <D.14159>; else goto <D.14161>;
  <D.14161>:
  if (saved == 0B) goto <D.14159>; else goto <D.14162>;
  <D.14162>:
  D.14163 = saved->string;
  D.14164 = mono_string_length (D.14163);
  D.14165 = (long unsigned int) D.14164;
  D.14166 = info->len;
  if (D.14165 != D.14166) goto <D.14159>; else goto <D.14160>;
  <D.14159>:
  D.14167 = 0;
  return D.14167;
  <D.14160>:
  D.14163 = saved->string;
  utf_str = mono_string_to_utf8 (D.14163);
  hash = do_calc_string_hash (0, utf_str);
  monoeg_g_free (utf_str);
  D.14168 = info->hash;
  if (D.14168 != hash) goto <D.14169>; else goto <D.14170>;
  <D.14169>:
  D.14167 = 0;
  return D.14167;
  <D.14170>:
  D.14167 = 1;
  return D.14167;
}


build_hint (struct SavedString * head)
{
  struct MonoDomain * D.14175;
  void *[64] * D.14176;
  int D.14177;
  struct GString * hint.7;
  long unsigned int D.14183;
  gchar * D.14186;
  struct SavedString * current;
  gchar * tmp;
  struct GString * hint;

  try
    {
      hint = 0B;
      current = head;
      goto <D.13983>;
      <D.13984>:
      D.14175 = current->domain;
      D.14176 = &current->stack;
      D.14177 = current->stack_entries;
      tmp = build_hint_from_stack (D.14175, D.14176, D.14177);
      current = current->next;
      if (tmp == 0B) goto <D.14178>; else goto <D.14179>;
      <D.14178>:
      // predicted unlikely by continue predictor.
      goto <D.13983>;
      <D.14179>:
      append_report (&hint, tmp);
      <D.13983>:
      if (current != 0B) goto <D.13984>; else goto <D.13985>;
      <D.13985>:
      hint.7 = hint;
      if (hint.7 != 0B) goto <D.14181>; else goto <D.14182>;
      <D.14181>:
      hint.7 = hint;
      D.14183 = hint.7->len;
      if (D.14183 != 0) goto <D.14184>; else goto <D.14185>;
      <D.14184>:
      hint.7 = hint;
      D.14186 = monoeg_g_string_free (hint.7, 0);
      return D.14186;
      <D.14185>:
      hint.7 = hint;
      monoeg_g_string_free (hint.7, 0);
      D.14186 = 0B;
      return D.14186;
      <D.14182>:
      D.14186 = 0B;
      return D.14186;
    }
  finally
    {
      hint = {CLOBBER};
    }
}


build_hint_from_stack (struct MonoDomain * domain, void * * stack, gint stack_entries)
{
  long unsigned int D.14192;
  long unsigned int D.14193;
  void * * D.14194;
  struct MonoMethod * iftmp.8;
  long unsigned int D.14202;
  long unsigned int D.14203;
  struct MonoClass * D.14206;
  unsigned char D.14211;
  int D.14212;
  struct MonoMethod * iftmp.9;
  int D.14222;
  struct GString * trace.10;
  struct MonoMethod * iftmp.11;
  int D.14235;
  unsigned int D.14236;
  char * D.14239;
  unsigned int D.14240;
  struct GString * trace.12;
  long unsigned int D.14245;
  unsigned int native_offset.13;
  gchar * D.14254;
  gchar * hint;
  struct MonoMethod * method;
  struct MonoMethod * selectedMethod;
  struct MonoAssembly * assembly;
  struct MonoImage * image;
  struct MonoDebugSourceLocation * location;
  struct MonoStackBacktraceInfo * info;
  gboolean use_full_trace;
  char * methodName;
  gint i;
  gint native_offset;
  gint firstAvailable;

  selectedMethod = 0B;
  firstAvailable = -1;
  use_full_trace = 0;
  native_offset = -1;
  i = 0;
  goto <D.13967>;
  <D.13966>:
  D.14192 = (long unsigned int) i;
  D.14193 = D.14192 * 8;
  D.14194 = stack + D.14193;
  info = *D.14194;
  if (info != 0B) goto <D.14196>; else goto <D.14197>;
  <D.14196>:
  iftmp.8 = info->method;
  goto <D.14198>;
  <D.14197>:
  iftmp.8 = 0B;
  <D.14198>:
  method = iftmp.8;
  if (method == 0B) goto <D.14199>; else goto <D.14201>;
  <D.14201>:
  D.14202 = BIT_FIELD_REF <*method, 64, 256>;
  D.14203 = D.14202 & 124;
  if (D.14203 != 0) goto <D.14199>; else goto <D.14200>;
  <D.14199>:
  // predicted unlikely by continue predictor.
  goto <D.13964>;
  <D.14200>:
  if (firstAvailable == -1) goto <D.14204>; else goto <D.14205>;
  <D.14204>:
  firstAvailable = i;
  <D.14205>:
  D.14206 = method->klass;
  image = D.14206->image;
  assembly = image->assembly;
  if (assembly != 0B) goto <D.14210>; else goto <D.14207>;
  <D.14210>:
  D.14211 = assembly->in_gac;
  if (D.14211 != 0) goto <D.14208>; else goto <D.14207>;
  <D.14207>:
  D.14212 = ignore_frame (method);
  if (D.14212 != 0) goto <D.14208>; else goto <D.14209>;
  <D.14208>:
  // predicted unlikely by continue predictor.
  goto <D.13964>;
  <D.14209>:
  selectedMethod = method;
  native_offset = info->native_offset;
  goto <D.13965>;
  <D.13964>:
  i = i + 1;
  <D.13967>:
  if (i < stack_entries) goto <D.13966>; else goto <D.13965>;
  <D.13965>:
  if (selectedMethod == 0B) goto <D.14213>; else goto <D.14214>;
  <D.14213>:
  i = 0;
  goto <D.13971>;
  <D.13970>:
  D.14192 = (long unsigned int) i;
  D.14193 = D.14192 * 8;
  D.14194 = stack + D.14193;
  info = *D.14194;
  if (info != 0B) goto <D.14216>; else goto <D.14217>;
  <D.14216>:
  iftmp.9 = info->method;
  goto <D.14218>;
  <D.14217>:
  iftmp.9 = 0B;
  <D.14218>:
  method = iftmp.9;
  if (method == 0B) goto <D.14219>; else goto <D.14221>;
  <D.14221>:
  D.14222 = ignore_frame (method);
  if (D.14222 != 0) goto <D.14219>; else goto <D.14220>;
  <D.14219>:
  // predicted unlikely by continue predictor.
  goto <D.13968>;
  <D.14220>:
  selectedMethod = method;
  native_offset = info->native_offset;
  goto <D.13969>;
  <D.13968>:
  i = i + 1;
  <D.13971>:
  if (i < stack_entries) goto <D.13970>; else goto <D.13969>;
  <D.13969>:
  if (selectedMethod == 0B) goto <D.14223>; else goto <D.14224>;
  <D.14223>:
  use_full_trace = 1;
  <D.14224>:
  <D.14214>:
  hint = 0B;
  if (use_full_trace != 0) goto <D.14225>; else goto <D.14226>;
  <D.14225>:
  {
    struct GString * trace;

    try
      {
        trace.10 = monoeg_g_string_new ("Full trace:\n");
        trace = trace.10;
        i = firstAvailable;
        goto <D.13975>;
        <D.13974>:
        D.14192 = (long unsigned int) i;
        D.14193 = D.14192 * 8;
        D.14194 = stack + D.14193;
        info = *D.14194;
        if (info != 0B) goto <D.14229>; else goto <D.14230>;
        <D.14229>:
        iftmp.11 = info->method;
        goto <D.14231>;
        <D.14230>:
        iftmp.11 = 0B;
        <D.14231>:
        method = iftmp.11;
        if (method == 0B) goto <D.14232>; else goto <D.14234>;
        <D.14234>:
        D.14202 = BIT_FIELD_REF <*method, 64, 256>;
        D.14203 = D.14202 & 124;
        if (D.14203 != 0) goto <D.14232>; else goto <D.14233>;
        <D.14232>:
        // predicted unlikely by continue predictor.
        goto <D.13973>;
        <D.14233>:
        D.14235 = info->native_offset;
        D.14236 = (unsigned int) D.14235;
        location = mono_debug_lookup_source_location (method, D.14236, domain);
        methodName = mono_method_full_name (method, 1);
        if (location != 0B) goto <D.14237>; else goto <D.14238>;
        <D.14237>:
        D.14239 = location->source_file;
        D.14240 = location->row;
        append_report (&trace, "        %s in %s:%u\n", methodName, D.14239, D.14240);
        mono_debug_free_source_location (location);
        goto <D.14241>;
        <D.14238>:
        append_report (&trace, "        %s\n", methodName);
        <D.14241>:
        monoeg_g_free (methodName);
        <D.13973>:
        i = i + 1;
        <D.13975>:
        if (i < stack_entries) goto <D.13974>; else goto <D.13976>;
        <D.13976>:
        trace.12 = trace;
        if (trace.12 != 0B) goto <D.14243>; else goto <D.14244>;
        <D.14243>:
        trace.12 = trace;
        D.14245 = trace.12->len;
        if (D.14245 != 0) goto <D.14246>; else goto <D.14247>;
        <D.14246>:
        trace.12 = trace;
        hint = monoeg_g_string_free (trace.12, 0);
        goto <D.14248>;
        <D.14247>:
        trace.12 = trace;
        monoeg_g_string_free (trace.12, 1);
        <D.14248>:
        <D.14244>:
      }
    finally
      {
        trace = {CLOBBER};
      }
  }
  goto <D.14249>;
  <D.14226>:
  native_offset.13 = (unsigned int) native_offset;
  location = mono_debug_lookup_source_location (selectedMethod, native_offset.13, domain);
  methodName = mono_method_full_name (selectedMethod, 1);
  if (location != 0B) goto <D.14251>; else goto <D.14252>;
  <D.14251>:
  D.14239 = location->source_file;
  D.14240 = location->row;
  hint = monoeg_g_strdup_printf ("        %s in %s:%u\n", methodName, D.14239, D.14240);
  mono_debug_free_source_location (location);
  goto <D.14253>;
  <D.14252>:
  hint = monoeg_g_strdup_printf ("        %s\n", methodName);
  <D.14253>:
  monoeg_g_free (methodName);
  <D.14249>:
  D.14254 = hint;
  return D.14254;
}


ignore_frame (struct MonoMethod * method)
{
  long unsigned int D.14268;
  long unsigned int D.14269;
  gboolean D.14272;
  struct MonoImage * D.14273;
  int D.13910;
  int iftmp.14;
  int D.13909;
  const char[9] * D.14279;
  unsigned char D.14280;
  int D.14281;
  unsigned char D.14282;
  int D.14283;
  const unsigned char * D.14288;
  unsigned char D.14289;
  int D.14290;
  const unsigned char * D.14291;
  unsigned char D.14292;
  int D.14293;
  const unsigned char * D.14298;
  unsigned char D.14299;
  int D.14300;
  const unsigned char * D.14301;
  unsigned char D.14302;
  int D.14303;
  const unsigned char * D.14308;
  unsigned char D.14309;
  int D.14310;
  const unsigned char * D.14311;
  unsigned char D.14312;
  int D.14313;
  const char * D.14315;
  int D.13919;
  int iftmp.15;
  int D.13918;
  const char[7] * D.14321;
  unsigned char D.14322;
  int D.14323;
  unsigned char D.14324;
  int D.14325;
  const unsigned char * D.14330;
  unsigned char D.14331;
  int D.14332;
  const unsigned char * D.14333;
  unsigned char D.14334;
  int D.14335;
  const unsigned char * D.14340;
  unsigned char D.14341;
  int D.14342;
  const unsigned char * D.14343;
  unsigned char D.14344;
  int D.14345;
  const unsigned char * D.14350;
  unsigned char D.14351;
  int D.14352;
  const unsigned char * D.14353;
  unsigned char D.14354;
  int D.14355;
  int D.14359;
  int D.14362;
  int D.13946;
  int iftmp.16;
  int D.13945;
  const char[6] * D.14368;
  unsigned char D.14369;
  int D.14370;
  unsigned char D.14371;
  int D.14372;
  const unsigned char * D.14377;
  unsigned char D.14378;
  int D.14379;
  const unsigned char * D.14380;
  unsigned char D.14381;
  int D.14382;
  const unsigned char * D.14387;
  unsigned char D.14388;
  int D.14389;
  const unsigned char * D.14390;
  unsigned char D.14391;
  int D.14392;
  const unsigned char * D.14397;
  unsigned char D.14398;
  int D.14399;
  const unsigned char * D.14400;
  unsigned char D.14401;
  int D.14402;
  struct MonoClass * klass;

  klass = method->klass;
  D.14268 = BIT_FIELD_REF <*method, 64, 256>;
  D.14269 = D.14268 & 124;
  if (D.14269 != 0) goto <D.14270>; else goto <D.14271>;
  <D.14270>:
  D.14272 = 1;
  return D.14272;
  <D.14271>:
  D.14273 = klass->image;
  if (D.14273 != 0B) goto <D.14274>; else goto <D.14275>;
  <D.14274>:
  {
    size_t __s1_len;
    size_t __s2_len;

    __s2_len = 8;
    if (__s2_len <= 3) goto <D.14277>; else goto <D.14278>;
    <D.14277>:
    {
      const unsigned char * __s2;
      int __result;

      D.14273 = klass->image;
      __s2 = D.14273->assembly_name;
      D.14279 = "mscorlib";
      D.14280 = MEM[(const unsigned char *)D.14279];
      D.14281 = (int) D.14280;
      D.14282 = *__s2;
      D.14283 = (int) D.14282;
      __result = D.14281 - D.14283;
      {
        if (__s2_len != 0) goto <D.14284>; else goto <D.14285>;
        <D.14284>:
        if (__result == 0) goto <D.14286>; else goto <D.14287>;
        <D.14286>:
        D.14288 = &MEM[(void *)"mscorlib" + 1B];
        D.14289 = *D.14288;
        D.14290 = (int) D.14289;
        D.14291 = __s2 + 1;
        D.14292 = *D.14291;
        D.14293 = (int) D.14292;
        __result = D.14290 - D.14293;
        if (__s2_len > 1) goto <D.14294>; else goto <D.14295>;
        <D.14294>:
        if (__result == 0) goto <D.14296>; else goto <D.14297>;
        <D.14296>:
        D.14298 = &MEM[(void *)"mscorlib" + 2B];
        D.14299 = *D.14298;
        D.14300 = (int) D.14299;
        D.14301 = __s2 + 2;
        D.14302 = *D.14301;
        D.14303 = (int) D.14302;
        __result = D.14300 - D.14303;
        if (__s2_len > 2) goto <D.14304>; else goto <D.14305>;
        <D.14304>:
        if (__result == 0) goto <D.14306>; else goto <D.14307>;
        <D.14306>:
        D.14308 = &MEM[(void *)"mscorlib" + 3B];
        D.14309 = *D.14308;
        D.14310 = (int) D.14309;
        D.14311 = __s2 + 3;
        D.14312 = *D.14311;
        D.14313 = (int) D.14312;
        __result = D.14310 - D.14313;
        <D.14307>:
        <D.14305>:
        <D.14297>:
        <D.14295>:
        <D.14287>:
        <D.14285>:
      }
      D.13909 = __result;
    }
    iftmp.14 = -D.13909;
    goto <D.14314>;
    <D.14278>:
    D.14273 = klass->image;
    D.14315 = D.14273->assembly_name;
    iftmp.14 = __builtin_strcmp (D.14315, "mscorlib");
    <D.14314>:
    D.13910 = iftmp.14;
  }
  if (D.13910 == 0) goto <D.14316>; else goto <D.14317>;
  <D.14316>:
  D.14272 = 1;
  return D.14272;
  <D.14317>:
  {
    size_t __s1_len;
    size_t __s2_len;

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

      D.14273 = klass->image;
      __s2 = D.14273->assembly_name;
      D.14321 = "System";
      D.14322 = MEM[(const unsigned char *)D.14321];
      D.14323 = (int) D.14322;
      D.14324 = *__s2;
      D.14325 = (int) D.14324;
      __result = D.14323 - D.14325;
      {
        if (__s2_len != 0) goto <D.14326>; else goto <D.14327>;
        <D.14326>:
        if (__result == 0) goto <D.14328>; else goto <D.14329>;
        <D.14328>:
        D.14330 = &MEM[(void *)"System" + 1B];
        D.14331 = *D.14330;
        D.14332 = (int) D.14331;
        D.14333 = __s2 + 1;
        D.14334 = *D.14333;
        D.14335 = (int) D.14334;
        __result = D.14332 - D.14335;
        if (__s2_len > 1) goto <D.14336>; else goto <D.14337>;
        <D.14336>:
        if (__result == 0) goto <D.14338>; else goto <D.14339>;
        <D.14338>:
        D.14340 = &MEM[(void *)"System" + 2B];
        D.14341 = *D.14340;
        D.14342 = (int) D.14341;
        D.14343 = __s2 + 2;
        D.14344 = *D.14343;
        D.14345 = (int) D.14344;
        __result = D.14342 - D.14345;
        if (__s2_len > 2) goto <D.14346>; else goto <D.14347>;
        <D.14346>:
        if (__result == 0) goto <D.14348>; else goto <D.14349>;
        <D.14348>:
        D.14350 = &MEM[(void *)"System" + 3B];
        D.14351 = *D.14350;
        D.14352 = (int) D.14351;
        D.14353 = __s2 + 3;
        D.14354 = *D.14353;
        D.14355 = (int) D.14354;
        __result = D.14352 - D.14355;
        <D.14349>:
        <D.14347>:
        <D.14339>:
        <D.14337>:
        <D.14329>:
        <D.14327>:
      }
      D.13918 = __result;
    }
    iftmp.15 = -D.13918;
    goto <D.14356>;
    <D.14320>:
    D.14273 = klass->image;
    D.14315 = D.14273->assembly_name;
    iftmp.15 = __builtin_strcmp (D.14315, "System");
    <D.14356>:
    D.13919 = iftmp.15;
  }
  if (D.13919 == 0) goto <D.14357>; else goto <D.14358>;
  <D.14357>:
  D.14272 = 1;
  return D.14272;
  <D.14358>:
  D.14273 = klass->image;
  D.14315 = D.14273->assembly_name;
  D.14359 = strncmp (D.14315, "Mono.", 5);
  if (D.14359 == 0) goto <D.14360>; else goto <D.14361>;
  <D.14360>:
  D.14272 = 1;
  return D.14272;
  <D.14361>:
  D.14273 = klass->image;
  D.14315 = D.14273->assembly_name;
  D.14362 = strncmp (D.14315, "System.", 7);
  if (D.14362 == 0) goto <D.14363>; else goto <D.14364>;
  <D.14363>:
  D.14272 = 1;
  return D.14272;
  <D.14364>:
  {
    size_t __s1_len;
    size_t __s2_len;

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

      D.14273 = klass->image;
      __s2 = D.14273->assembly_name;
      D.14368 = "PEAPI";
      D.14369 = MEM[(const unsigned char *)D.14368];
      D.14370 = (int) D.14369;
      D.14371 = *__s2;
      D.14372 = (int) D.14371;
      __result = D.14370 - D.14372;
      {
        if (__s2_len != 0) goto <D.14373>; else goto <D.14374>;
        <D.14373>:
        if (__result == 0) goto <D.14375>; else goto <D.14376>;
        <D.14375>:
        D.14377 = &MEM[(void *)"PEAPI" + 1B];
        D.14378 = *D.14377;
        D.14379 = (int) D.14378;
        D.14380 = __s2 + 1;
        D.14381 = *D.14380;
        D.14382 = (int) D.14381;
        __result = D.14379 - D.14382;
        if (__s2_len > 1) goto <D.14383>; else goto <D.14384>;
        <D.14383>:
        if (__result == 0) goto <D.14385>; else goto <D.14386>;
        <D.14385>:
        D.14387 = &MEM[(void *)"PEAPI" + 2B];
        D.14388 = *D.14387;
        D.14389 = (int) D.14388;
        D.14390 = __s2 + 2;
        D.14391 = *D.14390;
        D.14392 = (int) D.14391;
        __result = D.14389 - D.14392;
        if (__s2_len > 2) goto <D.14393>; else goto <D.14394>;
        <D.14393>:
        if (__result == 0) goto <D.14395>; else goto <D.14396>;
        <D.14395>:
        D.14397 = &MEM[(void *)"PEAPI" + 3B];
        D.14398 = *D.14397;
        D.14399 = (int) D.14398;
        D.14400 = __s2 + 3;
        D.14401 = *D.14400;
        D.14402 = (int) D.14401;
        __result = D.14399 - D.14402;
        <D.14396>:
        <D.14394>:
        <D.14386>:
        <D.14384>:
        <D.14376>:
        <D.14374>:
      }
      D.13945 = __result;
    }
    iftmp.16 = -D.13945;
    goto <D.14403>;
    <D.14367>:
    D.14273 = klass->image;
    D.14315 = D.14273->assembly_name;
    iftmp.16 = __builtin_strcmp (D.14315, "PEAPI");
    <D.14403>:
    D.13946 = iftmp.16;
  }
  if (D.13946 == 0) goto <D.14404>; else goto <D.14405>;
  <D.14404>:
  D.14272 = 1;
  return D.14272;
  <D.14405>:
  <D.14275>:
  D.14272 = 0;
  return D.14272;
}


append_report (struct GString * * report, const gchar * format)
{
  struct GString * D.14407;
  struct GString * D.14410;
  char * ap.17;
  char * ap;

  try
    {
      D.14407 = *report;
      if (D.14407 == 0B) goto <D.14408>; else goto <D.14409>;
      <D.14408>:
      D.14410 = monoeg_g_string_new ("");
      *report = D.14410;
      <D.14409>:
      __builtin_va_start (&ap, 0);
      D.14407 = *report;
      ap.17 = ap;
      monoeg_g_string_append_vprintf (D.14407, format, ap.17);
      __builtin_va_end (&ap);
    }
  finally
    {
      ap = {CLOBBER};
    }
}


print_report (const gchar * format)
{
  struct _IO_FILE * stdout.18;
  char * ap.19;
  struct MonoImage * D.14417;
  struct MonoClass * klass;
  struct MonoProperty * prop;
  struct MonoString * str;
  char * stack_trace;
  char * ap;

  try
    {
      stdout.18 = stdout;
      fprintf (stdout.18, "-=-=-=-=-=-=- MONO_IOMAP REPORT -=-=-=-=-=-=-\n");
      __builtin_va_start (&ap, 0);
      stdout.18 = stdout;
      ap.19 = ap;
      vfprintf (stdout.18, format, ap.19);
      stdout.18 = stdout;
      fprintf (stdout.18, "\n");
      __builtin_va_end (&ap);
      D.14417 = mono_get_corlib ();
      klass = mono_class_from_name (D.14417, "System", "Environment");
      mono_class_init (klass);
      prop = mono_class_get_property_from_name (klass, "StackTrace");
      str = mono_property_get_value (prop, 0B, 0B, 0B);
      stack_trace = mono_string_to_utf8 (str);
      stdout.18 = stdout;
      fprintf (stdout.18, "-= Stack Trace =-\n%s\n\n", stack_trace);
      monoeg_g_free (stack_trace);
      stdout.18 = stdout;
      fflush (stdout.18);
    }
  finally
    {
      ap = {CLOBBER};
    }
}


vfprintf (struct FILE * restrict __stream, const char * restrict __fmt, char * __ap)
{
  int D.14425;

  D.14425 = __vfprintf_chk (__stream, 1, __fmt, __ap);
  return D.14425;
}


fprintf (struct FILE * restrict __stream, const char * restrict __fmt)
{
  int D.14428;

  D.14428 = __fprintf_chk (__stream, 1, __fmt, __builtin_va_arg_pack ());
  return D.14428;
}


runtime_initialized_cb (struct MonoProfiler * prof)
{
  struct MonoClass * string_class.20;

  runtime_initialized = 1;
  string_class.20 = mono_get_string_class ();
  string_class = string_class.20;
}


profiler_shutdown (struct MonoProfiler * prof)
{
  print_mismatched_stats (prof);
  pthread_mutex_destroy (&mismatched_files_section);
}


print_mismatched_stats (struct MonoProfiler * prof)
{
  struct GHashTable * D.14435;
  unsigned int D.14437;
  struct GHashTable * D.14438;
  unsigned int D.14439;
  _Bool D.14440;
  int D.14441;
  struct _IO_FILE * stdout.21;

  D.14435 = prof->mismatched_files_hash;
  if (D.14435 == 0B) goto <D.14433>; else goto <D.14436>;
  <D.14436>:
  D.14435 = prof->mismatched_files_hash;
  D.14437 = monoeg_g_hash_table_size (D.14435);
  if (D.14437 == 0) goto <D.14433>; else goto <D.14434>;
  <D.14433>:
  return;
  <D.14434>:
  D.14438 = prof->string_locations_hash;
  D.14439 = monoeg_g_hash_table_size (D.14438);
  D.14440 = D.14439 != 0;
  D.14441 = (int) D.14440;
  prof->may_have_locations = D.14441;
  stdout.21 = stdout;
  fprintf (stdout.21, "\n-=-=-=-=-=-=-= MONO_IOMAP Stats -=-=-=-=-=-=-=\n");
  D.14435 = prof->mismatched_files_hash;
  monoeg_g_hash_table_foreach (D.14435, mismatched_stats_foreach_func, prof);
  stdout.21 = stdout;
  fflush (stdout.21);
}


mismatched_stats_foreach_func (void * key, void * value, void * user_data)
{
  gchar * D.14446;
  unsigned int hash.22;
  struct _IO_FILE * stdout.23;
  unsigned int D.14449;
  gchar * D.14450;
  int D.14451;
  struct GHashTable * D.14454;
  gchar * D.14455;
  char D.14458;
  struct MismatchedFilesStats * stats;
  struct StringLocation * location;
  struct MonoProfiler * prof;
  guint32 hash;
  gboolean bannerShown;

  try
    {
      stats = value;
      prof = user_data;
      bannerShown = 0;
      D.14446 = stats->requestedName;
      hash.22 = do_calc_string_hash (0, D.14446);
      hash = hash.22;
      stdout.23 = stdout;
      D.14449 = stats->count;
      D.14446 = stats->requestedName;
      D.14450 = stats->actualName;
      fprintf (stdout.23, "    Count: %u\nRequested: %s\n   Actual: %s\n", D.14449, D.14446, D.14450);
      D.14451 = prof->may_have_locations;
      if (D.14451 == 0) goto <D.14452>; else goto <D.14453>;
      <D.14452>:
      stdout.23 = stdout;
      fprintf (stdout.23, "\n");
      return;
      <D.14453>:
      D.14454 = prof->string_locations_hash;
      location = monoeg_g_hash_table_lookup (D.14454, &hash);
      goto <D.13838>;
      <D.13837>:
      D.14455 = location->hint;
      if (D.14455 != 0B) goto <D.14456>; else goto <D.14457>;
      <D.14456>:
      D.14455 = location->hint;
      D.14458 = MEM[(const char *)D.14455];
      if (D.14458 != 0) goto <D.14459>; else goto <D.14460>;
      <D.14459>:
      if (bannerShown == 0) goto <D.14461>; else goto <D.14462>;
      <D.14461>:
      stdout.23 = stdout;
      fprintf (stdout.23, "Locations:\n");
      bannerShown = 1;
      <D.14462>:
      stdout.23 = stdout;
      D.14455 = location->hint;
      fprintf (stdout.23, "%s", D.14455);
      <D.14460>:
      <D.14457>:
      location = location->next;
      if (location != 0B) goto <D.14463>; else goto <D.14464>;
      <D.14463>:
      stdout.23 = stdout;
      fprintf (stdout.23, "        --\n");
      <D.14464>:
      <D.13838>:
      if (location != 0B) goto <D.13837>; else goto <D.13839>;
      <D.13839>:
      stdout.23 = stdout;
      fprintf (stdout.23, "\n");
    }
  finally
    {
      hash = {CLOBBER};
    }
}


mismatched_files_guint32_equal (const void * key1, const void * key2)
{
  gboolean D.14474;
  unsigned int D.14475;
  unsigned int D.14476;
  _Bool D.14477;

  if (key1 == 0B) goto <D.14471>; else goto <D.14473>;
  <D.14473>:
  if (key2 == 0B) goto <D.14471>; else goto <D.14472>;
  <D.14471>:
  D.14474 = 0;
  return D.14474;
  <D.14472>:
  D.14475 = MEM[(guint32 *)key1];
  D.14476 = MEM[(guint32 *)key2];
  D.14477 = D.14475 == D.14476;
  D.14474 = (gboolean) D.14477;
  return D.14474;
}


mismatched_files_guint32_hash (const void * key)
{
  guint D.14481;

  if (key == 0B) goto <D.14479>; else goto <D.14480>;
  <D.14479>:
  D.14481 = 0;
  return D.14481;
  <D.14480>:
  D.14481 = MEM[(guint32 *)key];
  return D.14481;
}


