mono_debug_open_mono_symbols (struct MonoDebugHandle * handle, const uint8_t * raw_contents, int size, gboolean in_the_debugger)
{
  unsigned int size.0;
  unsigned int size.1;
  gchar * D.14868;
  struct MonoImage * D.14870;
  const char * D.14871;
  gchar * D.14872;
  char * D.14873;
  long long unsigned int D.14876;
  int D.14877;
  int D.14878;
  int * D.14883;
  int D.14884;
  const gchar * D.14885;
  unsigned int D.14887;
  int D.14888;
  void * * D.14889;
  void * D.14890;
  int D.14891;
  struct MonoSymbolFile * D.14894;
  struct MonoSymbolFile * symfile;

  mono_debugger_lock ();
  symfile = monoeg_malloc0 (40);
  if (raw_contents != 0B) goto <D.14864>; else goto <D.14865>;
  <D.14864>:
  {
    unsigned char * p;

    symfile->raw_contents_size = size;
    size.0 = (unsigned int) size;
    p = monoeg_malloc (size.0);
    symfile->raw_contents = p;
    size.1 = (unsigned int) size;
    memcpy (p, raw_contents, size.1);
    D.14868 = monoeg_g_strdup_printf ("LoadedFromMemory");
    symfile->filename = D.14868;
    symfile->was_loaded_from_memory = 1;
  }
  goto <D.14869>;
  <D.14865>:
  {
    struct MonoFileMap * f;

    D.14870 = handle->image;
    D.14871 = mono_image_get_filename (D.14870);
    D.14872 = monoeg_g_strdup_printf ("%s.mdb", D.14871);
    symfile->filename = D.14872;
    symfile->was_loaded_from_memory = 0;
    D.14873 = symfile->filename;
    f = mono_file_map_open (D.14873);
    if (f != 0B) goto <D.14874>; else goto <D.14875>;
    <D.14874>:
    D.14876 = mono_file_map_size (f);
    D.14877 = (int) D.14876;
    symfile->raw_contents_size = D.14877;
    D.14878 = symfile->raw_contents_size;
    if (D.14878 == 0) goto <D.14879>; else goto <D.14880>;
    <D.14879>:
    if (in_the_debugger == 0) goto <D.14881>; else goto <D.14882>;
    <D.14881>:
    D.14873 = symfile->filename;
    D.14883 = __errno_location ();
    D.14884 = *D.14883;
    D.14885 = monoeg_g_strerror (D.14884);
    monoeg_g_log (0B, 16, "stat of %s failed: %s", D.14873, D.14885);
    <D.14882>:
    goto <D.14886>;
    <D.14880>:
    D.14878 = symfile->raw_contents_size;
    D.14887 = (unsigned int) D.14878;
    D.14888 = mono_file_map_fd (f);
    D.14889 = &symfile->raw_contents_handle;
    D.14890 = mono_file_map (D.14887, 17, D.14888, 0, D.14889);
    symfile->raw_contents = D.14890;
    <D.14886>:
    mono_file_map_close (f);
    <D.14875>:
  }
  <D.14869>:
  D.14891 = load_symfile (handle, symfile, in_the_debugger);
  if (D.14891 != 0) goto <D.14892>; else goto <D.14893>;
  <D.14892>:
  mono_debugger_unlock ();
  D.14894 = symfile;
  return D.14894;
  <D.14893>:
  if (in_the_debugger == 0) goto <D.14895>; else goto <D.14896>;
  <D.14895>:
  mono_debug_close_mono_symbol_file (symfile);
  mono_debugger_unlock ();
  D.14894 = 0B;
  return D.14894;
  <D.14896>:
  mono_debugger_unlock ();
  D.14894 = symfile;
  return D.14894;
}


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

  D.14899 = __builtin_object_size (__dest, 0);
  D.14898 = __builtin___memcpy_chk (__dest, __src, __len, D.14899);
  return D.14898;
}


load_symfile (struct MonoDebugHandle * handle, struct MonoSymbolFile * symfile, mono_bool in_the_debugger)
{
  int D.14903;
  char * D.14908;
  unsigned int D.14909;
  unsigned int D.14910;
  int D.14660;
  struct MonoImage * D.14915;
  char * D.14916;
  char * D.14921;
  struct GHashTable * D.14924;
  struct GHashTable * D.14925;
  const char * ptr;
  const char * start;
  gchar * guid;
  uint64_t magic;
  int minor;
  int major;

  start = symfile->raw_contents;
  ptr = start;
  if (ptr == 0B) goto <D.14901>; else goto <D.14902>;
  <D.14901>:
  D.14903 = 0;
  return D.14903;
  <D.14902>:
  magic = mono_read64 (ptr);
  ptr = ptr + 8;
  if (magic != 5037318119232611860) goto <D.14904>; else goto <D.14905>;
  <D.14904>:
  if (in_the_debugger == 0) goto <D.14906>; else goto <D.14907>;
  <D.14906>:
  D.14908 = symfile->filename;
  monoeg_g_log (0B, 16, "Symbol file %s is not a mono symbol file", D.14908);
  <D.14907>:
  D.14903 = 0;
  return D.14903;
  <D.14905>:
  D.14909 = mono_read32 (ptr);
  major = (int) D.14909;
  ptr = ptr + 4;
  D.14910 = mono_read32 (ptr);
  minor = (int) D.14910;
  ptr = ptr + 4;
  if (major != 50) goto <D.14911>; else goto <D.14912>;
  <D.14911>:
  if (in_the_debugger == 0) goto <D.14913>; else goto <D.14914>;
  <D.14913>:
  D.14908 = symfile->filename;
  monoeg_g_log (0B, 16, "Symbol file %s has incorrect version (expected %d.%d, got %d)", D.14908, 50, 0, major);
  <D.14914>:
  D.14903 = 0;
  return D.14903;
  <D.14912>:
  guid = mono_guid_to_string (ptr);
  ptr = ptr + 16;
  {
    size_t __s1_len;
    size_t __s2_len;

    D.14915 = handle->image;
    D.14916 = D.14915->guid;
    D.14660 = __builtin_strcmp (D.14916, guid);
  }
  if (D.14660 != 0) goto <D.14917>; else goto <D.14918>;
  <D.14917>:
  if (in_the_debugger == 0) goto <D.14919>; else goto <D.14920>;
  <D.14919>:
  D.14908 = symfile->filename;
  D.14921 = handle->image_file;
  monoeg_g_log (0B, 16, "Symbol file %s doesn\'t match image %s", D.14908, D.14921);
  <D.14920>:
  if (guid != 0B) goto <D.14922>; else goto <D.14923>;
  <D.14922>:
  monoeg_g_free (guid);
  <D.14923>:
  D.14903 = 0;
  return D.14903;
  <D.14918>:
  symfile->major_version = major;
  symfile->minor_version = minor;
  symfile->offset_table = ptr;
  D.14924 = monoeg_g_hash_table_new_full (0B, 0B, 0B, free_method_info);
  symfile->method_hash = D.14924;
  D.14925 = monoeg_g_hash_table_new_full (0B, 0B, 0B, free_source_info);
  symfile->source_hash = D.14925;
  monoeg_g_free (guid);
  D.14903 = 1;
  return D.14903;
}


free_source_info (struct MonoDebugSourceInfo * sinfo)
{
  char * D.14927;
  guint8 * D.14928;
  guint8 * D.14929;

  D.14927 = sinfo->source_file;
  monoeg_g_free (D.14927);
  D.14928 = sinfo->guid;
  monoeg_g_free (D.14928);
  D.14929 = sinfo->hash;
  monoeg_g_free (D.14929);
  monoeg_g_free (sinfo);
}


free_method_info (struct MonoDebugMethodInfo * minfo)
{
  monoeg_g_free (minfo);
}


mono_debug_close_mono_symbol_file (struct MonoSymbolFile * symfile)
{
  struct GHashTable * D.14932;
  const uint8_t * D.14935;
  int D.14938;
  void * D.14942;
  char * D.14943;

  if (symfile == 0B) goto <D.14930>; else goto <D.14931>;
  <D.14930>:
  return;
  <D.14931>:
  mono_debugger_lock ();
  D.14932 = symfile->method_hash;
  if (D.14932 != 0B) goto <D.14933>; else goto <D.14934>;
  <D.14933>:
  D.14932 = symfile->method_hash;
  monoeg_g_hash_table_destroy (D.14932);
  <D.14934>:
  D.14935 = symfile->raw_contents;
  if (D.14935 != 0B) goto <D.14936>; else goto <D.14937>;
  <D.14936>:
  D.14938 = symfile->was_loaded_from_memory;
  if (D.14938 != 0) goto <D.14939>; else goto <D.14940>;
  <D.14939>:
  D.14935 = symfile->raw_contents;
  monoeg_g_free (D.14935);
  goto <D.14941>;
  <D.14940>:
  D.14935 = symfile->raw_contents;
  D.14942 = symfile->raw_contents_handle;
  mono_file_unmap (D.14935, D.14942);
  <D.14941>:
  <D.14937>:
  D.14943 = symfile->filename;
  if (D.14943 != 0B) goto <D.14944>; else goto <D.14945>;
  <D.14944>:
  D.14943 = symfile->filename;
  monoeg_g_free (D.14943);
  <D.14945>:
  monoeg_g_free (symfile);
  mono_debugger_unlock ();
}


mono_debug_symfile_is_loaded (struct MonoSymbolFile * symfile)
{
  mono_bool D.14947;
  int iftmp.2;
  struct MonoSymbolFileOffsetTable * D.14952;

  if (symfile != 0B) goto <D.14951>; else goto <D.14949>;
  <D.14951>:
  D.14952 = symfile->offset_table;
  if (D.14952 != 0B) goto <D.14953>; else goto <D.14949>;
  <D.14953>:
  iftmp.2 = 1;
  goto <D.14950>;
  <D.14949>:
  iftmp.2 = 0;
  <D.14950>:
  D.14947 = iftmp.2;
  return D.14947;
}


mono_debug_symfile_lookup_location (struct MonoDebugMethodInfo * minfo, uint32_t offset)
{
  struct MonoDebugHandle * D.14955;
  struct MonoDebugSourceLocation * D.14958;
  struct MonoSymbolFileOffsetTable * D.14959;
  uint32_t * D.14960;
  unsigned int D.14961;
  int D.14962;
  uint32_t * D.14963;
  unsigned int D.14964;
  int D.14965;
  uint32_t * D.14966;
  unsigned int D.14967;
  unsigned char D.14968;
  unsigned char D.14969;
  int D.14970;
  int D.14971;
  int D.14972;
  int D.14973;
  const uint8_t * D.14974;
  unsigned int D.14975;
  const unsigned char * ptr.3;
  const unsigned char * ptr.4;
  const unsigned char * ptr.5;
  const unsigned char * ptr.6;
  const unsigned char * ptr.7;
  const unsigned char * ptr.8;
  sizetype D.14984;
  const unsigned char * ptr.9;
  const unsigned char * ptr.10;
  int D.14989;
  int D.14993;
  _Bool D.14994;
  int D.14995;
  unsigned char D.14997;
  int D.15001;
  int offset.11;
  int D.15005;
  int D.15007;
  int D.15008;
  int D.15009;
  int D.15010;
  int D.15011;
  int D.15012;
  int D.15013;
  int D.15014;
  int D.15015;
  int D.15017;
  int D.15018;
  int D.15019;
  int D.15020;
  int D.15021;
  int D.15022;
  int D.15023;
  struct MonoDebugSourceLocation * location;
  struct MonoSymbolFile * symfile;
  const unsigned char * ptr;
  struct StatementMachine stm;
  void out_success = <<< error >>>;
  void error_out = <<< error >>>;

  try
    {
      location = 0B;
      D.14955 = minfo->handle;
      symfile = D.14955->symfile;
      if (symfile == 0B) goto <D.14956>; else goto <D.14957>;
      <D.14956>:
      D.14958 = 0B;
      return D.14958;
      <D.14957>:
      D.14959 = symfile->offset_table;
      D.14960 = &D.14959->_line_number_table_line_base;
      D.14961 = mono_read32 (D.14960);
      D.14962 = (int) D.14961;
      stm.line_base = D.14962;
      D.14959 = symfile->offset_table;
      D.14963 = &D.14959->_line_number_table_line_range;
      D.14964 = mono_read32 (D.14963);
      D.14965 = (int) D.14964;
      stm.line_range = D.14965;
      D.14959 = symfile->offset_table;
      D.14966 = &D.14959->_line_number_table_opcode_base;
      D.14967 = mono_read32 (D.14966);
      D.14968 = (unsigned char) D.14967;
      stm.opcode_base = D.14968;
      D.14969 = stm.opcode_base;
      D.14970 = (int) D.14969;
      D.14971 = 255 - D.14970;
      D.14972 = stm.line_range;
      D.14973 = D.14971 / D.14972;
      stm.max_address_incr = D.14973;
      mono_debugger_lock ();
      D.14974 = symfile->raw_contents;
      D.14975 = minfo->lnt_offset;
      ptr.3 = D.14974 + D.14975;
      ptr = ptr.3;
      stm.symfile = symfile;
      stm.last_offset = 0;
      stm.offset = 0;
      stm.last_file = 0;
      stm.last_line = 0;
      stm.first_file = 0;
      stm.file = 1;
      stm.line = 1;
      stm.is_hidden = 0;
      <D.14736>:
      {
        uint8_t opcode;

        ptr.4 = ptr;
        ptr.5 = ptr.4;
        ptr.6 = ptr.5 + 1;
        ptr = ptr.6;
        opcode = *ptr.5;
        if (opcode == 0) goto <D.14980>; else goto <D.14981>;
        <D.14980>:
        {
          uint8_t size;
          const unsigned char * end_ptr;

          ptr.4 = ptr;
          ptr.7 = ptr.4;
          ptr.8 = ptr.7 + 1;
          ptr = ptr.8;
          size = *ptr.7;
          ptr.4 = ptr;
          D.14984 = (sizetype) size;
          end_ptr = ptr.4 + D.14984;
          ptr.4 = ptr;
          ptr.9 = ptr.4;
          ptr.10 = ptr.9 + 1;
          ptr = ptr.10;
          opcode = *ptr.9;
          if (opcode == 1) goto <D.14987>; else goto <D.14988>;
          <D.14987>:
          D.14989 = check_line (&stm, -1, &location);
          if (D.14989 != 0) goto out_success; else goto <D.14990>;
          <D.14990>:
          goto <D.14726>;
          <D.14988>:
          if (opcode == 64) goto <D.14991>; else goto <D.14992>;
          <D.14991>:
          D.14993 = stm.is_hidden;
          D.14994 = D.14993 == 0;
          D.14995 = (int) D.14994;
          stm.is_hidden = D.14995;
          goto <D.14996>;
          <D.14992>:
          D.14997 = opcode + 192;
          if (D.14997 <= 63) goto <D.14998>; else goto <D.14999>;
          <D.14998>:
          goto <D.15000>;
          <D.14999>:
          D.15001 = (int) opcode;
          monoeg_g_log (0B, 16, "Unknown extended opcode %x in LNT", D.15001);
          <D.15000>:
          <D.14996>:
          ptr = end_ptr;
          // predicted unlikely by continue predictor.
          goto <D.14727>;
        }
        <D.14981>:
        D.14969 = stm.opcode_base;
        if (D.14969 > opcode) goto <D.15002>; else goto <D.15003>;
        <D.15002>:
        D.15001 = (int) opcode;
        switch (D.15001) <default: <D.14734>, case 1: <D.14728>, case 2: <D.14730>, case 3: <D.14731>, case 4: <D.14732>, case 8: <D.14733>>
        <D.14728>:
        offset.11 = (int) offset;
        D.15005 = check_line (&stm, offset.11, &location);
        if (D.15005 != 0) goto out_success; else goto <D.15006>;
        <D.15006>:
        goto <D.14729>;
        <D.14730>:
        ptr.4 = ptr;
        D.15007 = read_leb128 (ptr.4, &ptr);
        D.15008 = stm.offset;
        D.15009 = D.15008 + D.15007;
        stm.offset = D.15009;
        goto <D.14729>;
        <D.14731>:
        ptr.4 = ptr;
        D.15010 = read_leb128 (ptr.4, &ptr);
        D.15011 = stm.line;
        D.15012 = D.15011 + D.15010;
        stm.line = D.15012;
        goto <D.14729>;
        <D.14732>:
        ptr.4 = ptr;
        D.15013 = read_leb128 (ptr.4, &ptr);
        stm.file = D.15013;
        goto <D.14729>;
        <D.14733>:
        D.15008 = stm.offset;
        D.15014 = stm.max_address_incr;
        D.15015 = D.15008 + D.15014;
        stm.offset = D.15015;
        goto <D.14729>;
        <D.14734>:
        D.15001 = (int) opcode;
        monoeg_g_log (0B, 16, "Unknown standard opcode %x in LNT", D.15001);
        goto error_out;
        <D.14729>:
        goto <D.15016>;
        <D.15003>:
        D.14969 = stm.opcode_base;
        opcode = opcode - D.14969;
        D.15008 = stm.offset;
        D.15001 = (int) opcode;
        D.14972 = stm.line_range;
        D.15017 = D.15001 / D.14972;
        D.15018 = D.15008 + D.15017;
        stm.offset = D.15018;
        D.15011 = stm.line;
        D.15019 = stm.line_base;
        D.15001 = (int) opcode;
        D.14972 = stm.line_range;
        D.15020 = D.15001 % D.14972;
        D.15021 = D.15019 + D.15020;
        D.15022 = D.15011 + D.15021;
        stm.line = D.15022;
        offset.11 = (int) offset;
        D.15023 = check_line (&stm, offset.11, &location);
        if (D.15023 != 0) goto out_success; else goto <D.15024>;
        <D.15024>:
        <D.15016>:
      }
      <D.14727>:
      goto <D.14736>;
      <D.14726>:
      error_out:
      mono_debugger_unlock ();
      D.14958 = 0B;
      return D.14958;
      out_success:
      mono_debugger_unlock ();
      D.14958 = location;
      return D.14958;
    }
  finally
    {
      location = {CLOBBER};
      ptr = {CLOBBER};
      stm = {CLOBBER};
    }
}


read_leb128 (const uint8_t * ptr, const uint8_t * * rptr)
{
  const uint8_t * ptr.12;
  unsigned char D.15028;
  unsigned char b.13;
  int D.15030;
  int D.15031;
  int D.15032;
  int D.15035;
  int ret;
  int shift;
  char b;

  ret = 0;
  shift = 0;
  <D.14683>:
  ptr.12 = ptr;
  ptr = ptr.12 + 1;
  D.15028 = *ptr.12;
  b = (char) D.15028;
  b.13 = (unsigned char) b;
  D.15030 = (int) b.13;
  D.15031 = D.15030 & 127;
  D.15032 = D.15031 << shift;
  ret = D.15032 | ret;
  shift = shift + 7;
  if (b < 0) goto <D.14683>; else goto <D.14684>;
  <D.14684>:
  if (rptr != 0B) goto <D.15033>; else goto <D.15034>;
  <D.15033>:
  *rptr = ptr;
  <D.15034>:
  D.15035 = ret;
  return D.15035;
}


check_line (struct StatementMachine * stm, int offset, struct MonoDebugSourceLocation * * location)
{
  int D.15037;
  unsigned int D.15040;
  int D.15041;
  unsigned int D.15042;
  int D.15043;
  unsigned int D.15046;
  gboolean D.15047;
  unsigned int D.15048;
  struct MonoSymbolFile * D.15051;
  struct MonoSymbolFileOffsetTable * D.15052;
  uint32_t * D.15053;
  unsigned int D.15054;
  unsigned int D.15055;
  unsigned int D.15056;
  unsigned int D.15057;
  const uint8_t * D.15058;
  sizetype offset.14;
  uint32_t * D.15060;
  unsigned int D.15061;
  const uint8_t * D.15062;
  unsigned int D.15063;
  void * D.15066;
  struct MonoDebugSourceLocation * D.15067;
  unsigned int D.15068;
  gchar * source_file;

  source_file = 0B;
  D.15037 = stm->offset;
  if (D.15037 <= offset) goto <D.15038>; else goto <D.15039>;
  <D.15038>:
  D.15037 = stm->offset;
  D.15040 = (unsigned int) D.15037;
  stm->last_offset = D.15040;
  D.15041 = stm->file;
  D.15042 = (unsigned int) D.15041;
  stm->last_file = D.15042;
  D.15043 = stm->line;
  if (D.15043 != 16707566) goto <D.15044>; else goto <D.15045>;
  <D.15044>:
  D.15043 = stm->line;
  D.15046 = (unsigned int) D.15043;
  stm->last_line = D.15046;
  <D.15045>:
  D.15047 = 0;
  return D.15047;
  <D.15039>:
  D.15048 = stm->last_file;
  if (D.15048 != 0) goto <D.15049>; else goto <D.15050>;
  <D.15049>:
  {
    int offset;
    struct MonoSymbolFileSourceEntry * se;

    D.15051 = stm->symfile;
    D.15052 = D.15051->offset_table;
    D.15053 = &D.15052->_source_table_offset;
    D.15054 = mono_read32 (D.15053);
    D.15048 = stm->last_file;
    D.15055 = D.15048 + 536870911;
    D.15056 = D.15055 * 8;
    D.15057 = D.15054 + D.15056;
    offset = (int) D.15057;
    D.15051 = stm->symfile;
    D.15058 = D.15051->raw_contents;
    offset.14 = (sizetype) offset;
    se = D.15058 + offset.14;
    D.15051 = stm->symfile;
    D.15058 = D.15051->raw_contents;
    D.15060 = &se->_data_offset;
    D.15061 = mono_read32 (D.15060);
    D.15062 = D.15058 + D.15061;
    source_file = read_string (D.15062, 0B);
  }
  <D.15050>:
  D.15063 = stm->last_line;
  if (D.15063 == 0) goto <D.15064>; else goto <D.15065>;
  <D.15064>:
  *location = 0B;
  D.15047 = 1;
  return D.15047;
  <D.15065>:
  D.15066 = monoeg_malloc0 (16);
  *location = D.15066;
  D.15067 = *location;
  D.15067->source_file = source_file;
  D.15067 = *location;
  D.15063 = stm->last_line;
  D.15067->row = D.15063;
  D.15067 = *location;
  D.15068 = stm->last_offset;
  D.15067->il_offset = D.15068;
  D.15047 = 1;
  return D.15047;
}


read_string (const uint8_t * ptr, const uint8_t * * endp)
{
  const uint8_t * ptr.15;
  sizetype len.16;
  const uint8_t * ptr.17;
  gchar * D.15075;
  gchar * s;
  int len;

  ptr.15 = ptr;
  len = read_leb128 (ptr.15, &ptr);
  ptr.15 = ptr;
  s = monoeg_g_filename_from_utf8 (ptr.15, len, 0B, 0B, 0B);
  ptr.15 = ptr;
  len.16 = (sizetype) len;
  ptr.17 = ptr.15 + len.16;
  ptr = ptr.17;
  if (endp != 0B) goto <D.15073>; else goto <D.15074>;
  <D.15073>:
  ptr.15 = ptr;
  *endp = ptr.15;
  <D.15074>:
  D.15075 = s;
  return D.15075;
}


mono_debug_symfile_free_location (struct MonoDebugSourceLocation * location)
{
  char * D.15077;

  D.15077 = location->source_file;
  monoeg_g_free (D.15077);
  monoeg_g_free (location);
}


mono_debug_symfile_get_line_numbers_full (struct MonoDebugMethodInfo * minfo, char * * source_file, struct GPtrArray * * source_file_list, int * n_il_offsets, int * * il_offsets, int * * line_numbers, int * * column_numbers, int * * source_files)
{
  struct MonoDebugHandle * D.15088;
  struct MonoSymbolFileOffsetTable * D.15091;
  uint32_t * D.15092;
  unsigned int D.15093;
  int D.15094;
  uint32_t * D.15095;
  unsigned int D.15096;
  int D.15097;
  uint32_t * D.15098;
  unsigned int D.15099;
  unsigned char D.15100;
  unsigned char D.15101;
  int D.15102;
  int D.15103;
  int D.15104;
  int D.15105;
  const uint8_t * D.15106;
  unsigned int D.15107;
  const unsigned char * ptr.18;
  const unsigned char * ptr.19;
  const unsigned char * ptr.20;
  const unsigned char * ptr.21;
  const unsigned char * ptr.22;
  const unsigned char * ptr.23;
  sizetype D.15116;
  const unsigned char * ptr.24;
  const unsigned char * ptr.25;
  unsigned int D.15121;
  int D.15125;
  _Bool D.15126;
  int D.15127;
  unsigned char D.15129;
  int D.15133;
  int D.15136;
  int D.15137;
  int D.15138;
  int D.15139;
  int D.15140;
  int D.15141;
  int D.15142;
  int D.15143;
  int D.15144;
  int D.15146;
  int D.15147;
  int D.15148;
  int D.15149;
  int D.15150;
  int D.15151;
  int D.15152;
  unsigned int D.15155;
  int D.15158;
  struct MonoSymbolFile * D.15163;
  struct MonoSymbolFileOffsetTable * D.15164;
  uint32_t * D.15165;
  unsigned int D.15166;
  int D.15167;
  unsigned int D.15168;
  unsigned int D.15169;
  unsigned int D.15170;
  const uint8_t * D.15171;
  sizetype offset.26;
  uint32_t * D.15175;
  unsigned int D.15176;
  const uint8_t * D.15177;
  gchar * D.15178;
  struct GPtrArray * D.15181;
  unsigned int D.15184;
  void * D.15185;
  void * * D.15186;
  unsigned int D.15187;
  void * * D.15188;
  void * D.15189;
  struct GPtrArray * D.15194;
  int * D.15197;
  int * D.15198;
  unsigned int D.15199;
  unsigned int D.15200;
  int D.15201;
  int D.15208;
  void * D.15213;
  void * D.15214;
  int * D.15215;
  int * D.15216;
  void * * D.15217;
  void * * D.15218;
  void * D.15219;
  int D.15220;
  int * D.15221;
  int * D.15222;
  void * * D.15223;
  void * * D.15224;
  void * D.15225;
  int D.15226;
  void * D.15231;
  int * D.15232;
  int * D.15233;
  int D.15234;
  struct MonoSymbolFile * symfile;
  const unsigned char * ptr;
  struct StatementMachine stm;
  uint32_t i;
  struct GPtrArray * il_offset_array;
  struct GPtrArray * line_number_array;
  struct GPtrArray * source_file_array;
  gboolean has_column_info;

  try
    {
      if (source_file_list != 0B) goto <D.15078>; else goto <D.15079>;
      <D.15078>:
      *source_file_list = 0B;
      <D.15079>:
      if (n_il_offsets != 0B) goto <D.15080>; else goto <D.15081>;
      <D.15080>:
      *n_il_offsets = 0;
      <D.15081>:
      if (source_files != 0B) goto <D.15082>; else goto <D.15083>;
      <D.15082>:
      *source_files = 0B;
      <D.15083>:
      if (source_file != 0B) goto <D.15084>; else goto <D.15085>;
      <D.15084>:
      *source_file = 0B;
      <D.15085>:
      if (column_numbers != 0B) goto <D.15086>; else goto <D.15087>;
      <D.15086>:
      *column_numbers = 0B;
      <D.15087>:
      D.15088 = minfo->handle;
      symfile = D.15088->symfile;
      if (symfile == 0B) goto <D.15089>; else goto <D.15090>;
      <D.15089>:
      return;
      <D.15090>:
      has_column_info = method_has_column_info (minfo);
      il_offset_array = monoeg_g_ptr_array_new ();
      line_number_array = monoeg_g_ptr_array_new ();
      source_file_array = monoeg_g_ptr_array_new ();
      D.15091 = symfile->offset_table;
      D.15092 = &D.15091->_line_number_table_line_base;
      D.15093 = mono_read32 (D.15092);
      D.15094 = (int) D.15093;
      stm.line_base = D.15094;
      D.15091 = symfile->offset_table;
      D.15095 = &D.15091->_line_number_table_line_range;
      D.15096 = mono_read32 (D.15095);
      D.15097 = (int) D.15096;
      stm.line_range = D.15097;
      D.15091 = symfile->offset_table;
      D.15098 = &D.15091->_line_number_table_opcode_base;
      D.15099 = mono_read32 (D.15098);
      D.15100 = (unsigned char) D.15099;
      stm.opcode_base = D.15100;
      D.15101 = stm.opcode_base;
      D.15102 = (int) D.15101;
      D.15103 = 255 - D.15102;
      D.15104 = stm.line_range;
      D.15105 = D.15103 / D.15104;
      stm.max_address_incr = D.15105;
      mono_debugger_lock ();
      D.15106 = symfile->raw_contents;
      D.15107 = minfo->lnt_offset;
      ptr.18 = D.15106 + D.15107;
      ptr = ptr.18;
      stm.symfile = symfile;
      stm.last_offset = 0;
      stm.offset = 0;
      stm.last_file = 0;
      stm.last_line = 0;
      stm.first_file = 0;
      stm.file = 1;
      stm.line = 1;
      stm.is_hidden = 0;
      <D.14790>:
      {
        uint8_t opcode;

        ptr.19 = ptr;
        ptr.20 = ptr.19;
        ptr.21 = ptr.20 + 1;
        ptr = ptr.21;
        opcode = *ptr.20;
        if (opcode == 0) goto <D.15112>; else goto <D.15113>;
        <D.15112>:
        {
          uint8_t size;
          const unsigned char * end_ptr;

          ptr.19 = ptr;
          ptr.22 = ptr.19;
          ptr.23 = ptr.22 + 1;
          ptr = ptr.23;
          size = *ptr.22;
          ptr.19 = ptr;
          D.15116 = (sizetype) size;
          end_ptr = ptr.19 + D.15116;
          ptr.19 = ptr;
          ptr.24 = ptr.19;
          ptr.25 = ptr.24 + 1;
          ptr = ptr.25;
          opcode = *ptr.24;
          if (opcode == 1) goto <D.15119>; else goto <D.15120>;
          <D.15119>:
          D.15121 = il_offset_array->len;
          if (D.15121 == 0) goto <D.14781>; else goto <D.15122>;
          <D.15122>:
          add_line (&stm, il_offset_array, line_number_array, source_file_array);
          goto <D.14781>;
          <D.15120>:
          if (opcode == 64) goto <D.15123>; else goto <D.15124>;
          <D.15123>:
          D.15125 = stm.is_hidden;
          D.15126 = D.15125 == 0;
          D.15127 = (int) D.15126;
          stm.is_hidden = D.15127;
          goto <D.15128>;
          <D.15124>:
          D.15129 = opcode + 192;
          if (D.15129 <= 63) goto <D.15130>; else goto <D.15131>;
          <D.15130>:
          goto <D.15132>;
          <D.15131>:
          D.15133 = (int) opcode;
          monoeg_g_log (0B, 16, "Unknown extended opcode %x in LNT", D.15133);
          <D.15132>:
          <D.15128>:
          ptr = end_ptr;
          // predicted unlikely by continue predictor.
          goto <D.14782>;
        }
        <D.15113>:
        D.15101 = stm.opcode_base;
        if (D.15101 > opcode) goto <D.15134>; else goto <D.15135>;
        <D.15134>:
        D.15133 = (int) opcode;
        switch (D.15133) <default: <D.14789>, case 1: <D.14783>, case 2: <D.14785>, case 3: <D.14786>, case 4: <D.14787>, case 8: <D.14788>>
        <D.14783>:
        add_line (&stm, il_offset_array, line_number_array, source_file_array);
        goto <D.14784>;
        <D.14785>:
        ptr.19 = ptr;
        D.15136 = read_leb128 (ptr.19, &ptr);
        D.15137 = stm.offset;
        D.15138 = D.15137 + D.15136;
        stm.offset = D.15138;
        goto <D.14784>;
        <D.14786>:
        ptr.19 = ptr;
        D.15139 = read_leb128 (ptr.19, &ptr);
        D.15140 = stm.line;
        D.15141 = D.15140 + D.15139;
        stm.line = D.15141;
        goto <D.14784>;
        <D.14787>:
        ptr.19 = ptr;
        D.15142 = read_leb128 (ptr.19, &ptr);
        stm.file = D.15142;
        goto <D.14784>;
        <D.14788>:
        D.15137 = stm.offset;
        D.15143 = stm.max_address_incr;
        D.15144 = D.15137 + D.15143;
        stm.offset = D.15144;
        goto <D.14784>;
        <D.14789>:
        D.15133 = (int) opcode;
        monoeg_g_log (0B, 16, "Unknown standard opcode %x in LNT", D.15133);
        monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "debug-mono-symfile.c", 599);
        <D.14784>:
        goto <D.15145>;
        <D.15135>:
        D.15101 = stm.opcode_base;
        opcode = opcode - D.15101;
        D.15137 = stm.offset;
        D.15133 = (int) opcode;
        D.15104 = stm.line_range;
        D.15146 = D.15133 / D.15104;
        D.15147 = D.15137 + D.15146;
        stm.offset = D.15147;
        D.15140 = stm.line;
        D.15148 = stm.line_base;
        D.15133 = (int) opcode;
        D.15104 = stm.line_range;
        D.15149 = D.15133 % D.15104;
        D.15150 = D.15148 + D.15149;
        D.15151 = D.15140 + D.15150;
        stm.line = D.15151;
        add_line (&stm, il_offset_array, line_number_array, source_file_array);
        <D.15145>:
      }
      <D.14782>:
      goto <D.14790>;
      <D.14781>:
      D.15152 = stm.file;
      if (D.15152 == 0) goto <D.15153>; else goto <D.15154>;
      <D.15153>:
      D.15155 = stm.first_file;
      if (D.15155 != 0) goto <D.15156>; else goto <D.15157>;
      <D.15156>:
      D.15155 = stm.first_file;
      D.15158 = (int) D.15155;
      stm.file = D.15158;
      <D.15157>:
      <D.15154>:
      D.15152 = stm.file;
      if (D.15152 != 0) goto <D.15159>; else goto <D.15160>;
      <D.15159>:
      if (source_file != 0B) goto <D.15161>; else goto <D.15162>;
      <D.15161>:
      {
        int offset;
        struct MonoSymbolFileSourceEntry * se;

        D.15163 = stm.symfile;
        D.15164 = D.15163->offset_table;
        D.15165 = &D.15164->_source_table_offset;
        D.15166 = mono_read32 (D.15165);
        D.15152 = stm.file;
        D.15167 = D.15152 + -1;
        D.15168 = (unsigned int) D.15167;
        D.15169 = D.15168 * 8;
        D.15170 = D.15166 + D.15169;
        offset = (int) D.15170;
        D.15163 = stm.symfile;
        D.15171 = D.15163->raw_contents;
        offset.26 = (sizetype) offset;
        se = D.15171 + offset.26;
        if (source_file != 0B) goto <D.15173>; else goto <D.15174>;
        <D.15173>:
        D.15163 = stm.symfile;
        D.15171 = D.15163->raw_contents;
        D.15175 = &se->_data_offset;
        D.15176 = mono_read32 (D.15175);
        D.15177 = D.15171 + D.15176;
        D.15178 = read_string (D.15177, 0B);
        *source_file = D.15178;
        <D.15174>:
      }
      <D.15162>:
      <D.15160>:
      if (source_file_list != 0B) goto <D.15179>; else goto <D.15180>;
      <D.15179>:
      {
        int file;
        int last_file;

        last_file = 0;
        D.15181 = monoeg_g_ptr_array_new ();
        *source_file_list = D.15181;
        if (source_files != 0B) goto <D.15182>; else goto <D.15183>;
        <D.15182>:
        D.15121 = il_offset_array->len;
        D.15184 = D.15121 * 4;
        D.15185 = monoeg_malloc (D.15184);
        *source_files = D.15185;
        <D.15183>:
        i = 0;
        goto <D.14797>;
        <D.14796>:
        D.15186 = source_file_array->pdata;
        D.15187 = i * 4;
        D.15188 = D.15186 + D.15187;
        D.15189 = *D.15188;
        file = (int) D.15189;
        if (file != 0) goto <D.15190>; else goto <D.15191>;
        <D.15190>:
        if (file != last_file) goto <D.15192>; else goto <D.15193>;
        <D.15192>:
        {
          struct MonoDebugSourceInfo * info;

          info = get_source_info (symfile, file);
          D.15194 = *source_file_list;
          monoeg_g_ptr_array_add (D.15194, info);
        }
        <D.15193>:
        <D.15191>:
        last_file = file;
        if (source_files != 0B) goto <D.15195>; else goto <D.15196>;
        <D.15195>:
        D.15197 = *source_files;
        D.15187 = i * 4;
        D.15198 = D.15197 + D.15187;
        D.15194 = *source_file_list;
        D.15199 = D.15194->len;
        D.15200 = D.15199 + 4294967295;
        D.15201 = (int) D.15200;
        *D.15198 = D.15201;
        <D.15196>:
        i = i + 1;
        <D.14797>:
        D.15121 = il_offset_array->len;
        if (D.15121 > i) goto <D.14796>; else goto <D.14798>;
        <D.14798>:
        D.15194 = *source_file_list;
        D.15199 = D.15194->len;
        if (D.15199 == 0) goto <D.15202>; else goto <D.15203>;
        <D.15202>:
        D.15152 = stm.file;
        if (D.15152 != 0) goto <D.15204>; else goto <D.15205>;
        <D.15204>:
        {
          struct MonoDebugSourceInfo * info;

          D.15152 = stm.file;
          info = get_source_info (symfile, D.15152);
          D.15194 = *source_file_list;
          monoeg_g_ptr_array_add (D.15194, info);
        }
        <D.15205>:
        <D.15203>:
      }
      <D.15180>:
      if (n_il_offsets != 0B) goto <D.15206>; else goto <D.15207>;
      <D.15206>:
      D.15121 = il_offset_array->len;
      D.15208 = (int) D.15121;
      *n_il_offsets = D.15208;
      <D.15207>:
      if (il_offsets != 0B) goto <D.15209>; else goto <D.15210>;
      <D.15209>:
      if (line_numbers != 0B) goto <D.15211>; else goto <D.15212>;
      <D.15211>:
      D.15121 = il_offset_array->len;
      D.15184 = D.15121 * 4;
      D.15213 = monoeg_malloc (D.15184);
      *il_offsets = D.15213;
      D.15121 = il_offset_array->len;
      D.15184 = D.15121 * 4;
      D.15214 = monoeg_malloc (D.15184);
      *line_numbers = D.15214;
      i = 0;
      goto <D.14801>;
      <D.14800>:
      D.15215 = *il_offsets;
      D.15187 = i * 4;
      D.15216 = D.15215 + D.15187;
      D.15217 = il_offset_array->pdata;
      D.15187 = i * 4;
      D.15218 = D.15217 + D.15187;
      D.15219 = *D.15218;
      D.15220 = (int) D.15219;
      *D.15216 = D.15220;
      D.15221 = *line_numbers;
      D.15187 = i * 4;
      D.15222 = D.15221 + D.15187;
      D.15223 = line_number_array->pdata;
      D.15187 = i * 4;
      D.15224 = D.15223 + D.15187;
      D.15225 = *D.15224;
      D.15226 = (int) D.15225;
      *D.15222 = D.15226;
      i = i + 1;
      <D.14801>:
      D.15121 = il_offset_array->len;
      if (D.15121 > i) goto <D.14800>; else goto <D.14802>;
      <D.14802>:
      <D.15212>:
      <D.15210>:
      if (column_numbers != 0B) goto <D.15227>; else goto <D.15228>;
      <D.15227>:
      if (has_column_info != 0) goto <D.15229>; else goto <D.15230>;
      <D.15229>:
      D.15121 = il_offset_array->len;
      D.15184 = D.15121 * 4;
      D.15231 = monoeg_malloc (D.15184);
      *column_numbers = D.15231;
      i = 0;
      goto <D.14804>;
      <D.14803>:
      D.15232 = *column_numbers;
      D.15187 = i * 4;
      D.15233 = D.15232 + D.15187;
      ptr.19 = ptr;
      D.15234 = read_leb128 (ptr.19, &ptr);
      *D.15233 = D.15234;
      i = i + 1;
      <D.14804>:
      D.15121 = il_offset_array->len;
      if (D.15121 > i) goto <D.14803>; else goto <D.14805>;
      <D.14805>:
      <D.15230>:
      <D.15228>:
      monoeg_g_ptr_array_free (il_offset_array, 1);
      monoeg_g_ptr_array_free (line_number_array, 1);
      mono_debugger_unlock ();
      return;
    }
  finally
    {
      ptr = {CLOBBER};
      stm = {CLOBBER};
    }
}


method_has_column_info (struct MonoDebugMethodInfo * minfo)
{
  struct MonoDebugHandle * D.15237;
  gboolean D.15240;
  const uint8_t * D.15241;
  unsigned int D.15242;
  const unsigned char * ptr.27;
  const unsigned char * ptr.28;
  int D.15245;
  unsigned int D.15246;
  _Bool D.15247;
  struct MonoSymbolFile * symfile;
  const unsigned char * ptr;
  guint32 flags;

  try
    {
      D.15237 = minfo->handle;
      symfile = D.15237->symfile;
      if (symfile == 0B) goto <D.15238>; else goto <D.15239>;
      <D.15238>:
      D.15240 = 0;
      return D.15240;
      <D.15239>:
      D.15241 = symfile->raw_contents;
      D.15242 = minfo->data_offset;
      ptr.27 = D.15241 + D.15242;
      ptr = ptr.27;
      ptr.28 = ptr;
      read_leb128 (ptr.28, &ptr);
      ptr.28 = ptr;
      read_leb128 (ptr.28, &ptr);
      ptr.28 = ptr;
      read_leb128 (ptr.28, &ptr);
      ptr.28 = ptr;
      read_leb128 (ptr.28, &ptr);
      ptr.28 = ptr;
      read_leb128 (ptr.28, &ptr);
      ptr.28 = ptr;
      read_leb128 (ptr.28, &ptr);
      ptr.28 = ptr;
      D.15245 = read_leb128 (ptr.28, &ptr);
      flags = (guint32) D.15245;
      D.15246 = flags & 2;
      D.15247 = D.15246 != 0;
      D.15240 = (gboolean) D.15247;
      return D.15240;
    }
  finally
    {
      ptr = {CLOBBER};
    }
}


add_line (struct StatementMachine * stm, struct GPtrArray * il_offset_array, struct GPtrArray * line_number_array, struct GPtrArray * source_file_array)
{
  int D.15250;
  int D.15253;
  void * D.15254;
  void * D.15255;
  int D.15256;
  void * D.15257;
  int D.15258;
  unsigned int D.15261;
  unsigned int D.15264;

  D.15250 = stm->line;
  if (D.15250 > 0) goto <D.15251>; else goto <D.15252>;
  <D.15251>:
  D.15253 = stm->offset;
  D.15254 = (void *) D.15253;
  monoeg_g_ptr_array_add (il_offset_array, D.15254);
  D.15250 = stm->line;
  D.15255 = (void *) D.15250;
  monoeg_g_ptr_array_add (line_number_array, D.15255);
  D.15256 = stm->file;
  D.15257 = (void *) D.15256;
  monoeg_g_ptr_array_add (source_file_array, D.15257);
  <D.15252>:
  D.15258 = stm->is_hidden;
  if (D.15258 == 0) goto <D.15259>; else goto <D.15260>;
  <D.15259>:
  D.15261 = stm->first_file;
  if (D.15261 == 0) goto <D.15262>; else goto <D.15263>;
  <D.15262>:
  D.15256 = stm->file;
  D.15264 = (unsigned int) D.15256;
  stm->first_file = D.15264;
  <D.15263>:
  <D.15260>:
}


get_source_info (struct MonoSymbolFile * symfile, int index)
{
  struct GHashTable * D.15265;
  const void * index.29;
  struct MonoSymbolFileOffsetTable * D.15269;
  uint32_t * D.15270;
  unsigned int D.15271;
  int D.15272;
  unsigned int D.15273;
  unsigned int D.15274;
  unsigned int D.15275;
  const uint8_t * D.15276;
  sizetype offset.30;
  uint32_t * D.15278;
  unsigned int D.15279;
  const uint8_t * ptr.31;
  const uint8_t * ptr.32;
  gchar * D.15282;
  void * D.15283;
  guint8 * D.15284;
  const uint8_t * ptr.33;
  void * D.15286;
  guint8 * D.15287;
  void * index.34;
  struct MonoDebugSourceInfo * D.15289;
  struct MonoDebugSourceInfo * info;

  D.15265 = symfile->source_hash;
  index.29 = (const void *) index;
  info = monoeg_g_hash_table_lookup (D.15265, index.29);
  if (info == 0B) goto <D.15267>; else goto <D.15268>;
  <D.15267>:
  {
    int offset;
    struct MonoSymbolFileSourceEntry * se;
    const uint8_t * ptr;

    try
      {
        D.15269 = symfile->offset_table;
        D.15270 = &D.15269->_source_table_offset;
        D.15271 = mono_read32 (D.15270);
        D.15272 = index + -1;
        D.15273 = (unsigned int) D.15272;
        D.15274 = D.15273 * 8;
        D.15275 = D.15271 + D.15274;
        offset = (int) D.15275;
        D.15276 = symfile->raw_contents;
        offset.30 = (sizetype) offset;
        se = D.15276 + offset.30;
        D.15276 = symfile->raw_contents;
        D.15278 = &se->_data_offset;
        D.15279 = mono_read32 (D.15278);
        ptr.31 = D.15276 + D.15279;
        ptr = ptr.31;
        info = monoeg_malloc0 (12);
        ptr.32 = ptr;
        D.15282 = read_string (ptr.32, &ptr);
        info->source_file = D.15282;
        D.15283 = monoeg_malloc0 (16);
        info->guid = D.15283;
        D.15284 = info->guid;
        ptr.32 = ptr;
        memcpy (D.15284, ptr.32, 16);
        ptr.32 = ptr;
        ptr.33 = ptr.32 + 16;
        ptr = ptr.33;
        D.15286 = monoeg_malloc0 (16);
        info->hash = D.15286;
        D.15287 = info->hash;
        ptr.32 = ptr;
        memcpy (D.15287, ptr.32, 16);
        ptr.32 = ptr;
        ptr.33 = ptr.32 + 16;
        ptr = ptr.33;
        D.15265 = symfile->source_hash;
        index.34 = (void *) index;
        monoeg_g_hash_table_insert_replace (D.15265, index.34, info, 0);
      }
    finally
      {
        ptr = {CLOBBER};
      }
  }
  <D.15268>:
  D.15289 = info;
  return D.15289;
}


mono_debug_symfile_get_line_numbers (struct MonoDebugMethodInfo * minfo, char * * source_file, int * n_il_offsets, int * * il_offsets, int * * line_numbers)
{
  mono_debug_symfile_get_line_numbers_full (minfo, source_file, 0B, n_il_offsets, il_offsets, line_numbers, 0B, 0B);
}


_mono_debug_address_from_il_offset (struct MonoDebugMethodJitInfo * jit, uint32_t il_offset)
{
  struct MonoDebugLineNumberEntry * D.15294;
  int32_t D.15295;
  unsigned int D.15296;
  unsigned int D.15297;
  unsigned int i.35;
  unsigned int D.15299;
  struct MonoDebugLineNumberEntry * D.15300;
  unsigned int D.15301;
  unsigned int D.15304;
  int i;

  if (jit == 0B) goto <D.15291>; else goto <D.15293>;
  <D.15293>:
  D.15294 = jit->line_numbers;
  if (D.15294 == 0B) goto <D.15291>; else goto <D.15292>;
  <D.15291>:
  D.15295 = -1;
  return D.15295;
  <D.15292>:
  D.15296 = jit->num_line_numbers;
  D.15297 = D.15296 + 4294967295;
  i = (int) D.15297;
  goto <D.14820>;
  <D.14819>:
  {
    struct MonoDebugLineNumberEntry lne;

    try
      {
        D.15294 = jit->line_numbers;
        i.35 = (unsigned int) i;
        D.15299 = i.35 * 8;
        D.15300 = D.15294 + D.15299;
        lne = *D.15300;
        D.15301 = lne.il_offset;
        if (D.15301 <= il_offset) goto <D.15302>; else goto <D.15303>;
        <D.15302>:
        D.15304 = lne.native_offset;
        D.15295 = (int32_t) D.15304;
        return D.15295;
        <D.15303>:
      }
    finally
      {
        lne = {CLOBBER};
      }
  }
  i = i + -1;
  <D.14820>:
  if (i >= 0) goto <D.14819>; else goto <D.14821>;
  <D.14821>:
  D.15295 = 0;
  return D.15295;
}


mono_debug_symfile_lookup_method (struct MonoDebugHandle * handle, struct MonoMethod * method)
{
  struct GHashTable * D.15308;
  struct MonoDebugMethodInfo * D.15311;
  struct MonoImage * D.15312;
  struct MonoClass * D.15313;
  struct MonoImage * D.15314;
  const uint8_t * D.15319;
  struct MonoSymbolFileOffsetTable * D.15320;
  uint32_t * D.15321;
  unsigned int D.15322;
  unsigned int D.15323;
  const void * D.15324;
  uint32_t * D.15325;
  unsigned int D.15326;
  int ie.36;
  int first_ie.37;
  int D.15331;
  int D.15332;
  int D.15333;
  unsigned int D.15334;
  uint32_t * D.15335;
  unsigned int D.15336;
  uint32_t * D.15337;
  unsigned int D.15338;
  struct MonoSymbolFileMethodEntry * first_ie;
  struct MonoSymbolFileMethodEntry * ie;
  struct MonoDebugMethodInfo * minfo;
  struct MonoSymbolFile * symfile;

  symfile = handle->symfile;
  D.15308 = symfile->method_hash;
  if (D.15308 == 0B) goto <D.15309>; else goto <D.15310>;
  <D.15309>:
  D.15311 = 0B;
  return D.15311;
  <D.15310>:
  D.15312 = handle->image;
  D.15313 = mono_method_get_class (method);
  D.15314 = mono_class_get_image (D.15313);
  if (D.15312 != D.15314) goto <D.15315>; else goto <D.15316>;
  <D.15315>:
  D.15311 = 0B;
  return D.15311;
  <D.15316>:
  mono_debugger_lock ();
  D.15308 = symfile->method_hash;
  minfo = monoeg_g_hash_table_lookup (D.15308, method);
  if (minfo != 0B) goto <D.15317>; else goto <D.15318>;
  <D.15317>:
  mono_debugger_unlock ();
  D.15311 = minfo;
  return D.15311;
  <D.15318>:
  D.15319 = symfile->raw_contents;
  D.15320 = symfile->offset_table;
  D.15321 = &D.15320->_method_table_offset;
  D.15322 = mono_read32 (D.15321);
  first_ie = D.15319 + D.15322;
  D.15323 = mono_method_get_token (method);
  D.15324 = (const void *) D.15323;
  D.15320 = symfile->offset_table;
  D.15325 = &D.15320->_method_count;
  D.15326 = mono_read32 (D.15325);
  ie = mono_binary_search (D.15324, first_ie, D.15326, 12, compare_method);
  if (ie == 0B) goto <D.15327>; else goto <D.15328>;
  <D.15327>:
  mono_debugger_unlock ();
  D.15311 = 0B;
  return D.15311;
  <D.15328>:
  minfo = monoeg_malloc0 (20);
  ie.36 = (int) ie;
  first_ie.37 = (int) first_ie;
  D.15331 = ie.36 - first_ie.37;
  D.15332 = D.15331 /[ex] 12;
  D.15333 = D.15332 + 1;
  D.15334 = (unsigned int) D.15333;
  minfo->index = D.15334;
  minfo->method = method;
  minfo->handle = handle;
  D.15335 = &ie->_data_offset;
  D.15336 = mono_read32 (D.15335);
  minfo->data_offset = D.15336;
  D.15337 = &ie->_line_number_table;
  D.15338 = mono_read32 (D.15337);
  minfo->lnt_offset = D.15338;
  D.15308 = symfile->method_hash;
  monoeg_g_hash_table_insert_replace (D.15308, method, minfo, 0);
  mono_debugger_unlock ();
  D.15311 = minfo;
  return D.15311;
}


compare_method (const void * key, const void * object)
{
  int D.15340;
  uint32_t * D.15341;
  unsigned int D.15342;
  unsigned int D.15343;
  uint32_t token;
  struct MonoSymbolFileMethodEntry * me;

  token = (uint32_t) key;
  me = object;
  D.15341 = &me->_token;
  D.15342 = mono_read32 (D.15341);
  D.15343 = token - D.15342;
  D.15340 = (int) D.15343;
  return D.15340;
}


mono_debug_symfile_lookup_locals (struct MonoDebugMethodInfo * minfo)
{
  struct MonoDebugHandle * D.15345;
  struct MonoDebugLocalsInfo * D.15348;
  const uint8_t * D.15349;
  unsigned int D.15350;
  const uint8_t * p.38;
  const uint8_t * p.39;
  sizetype code_block_table_offset.40;
  const uint8_t * p.41;
  int D.15355;
  int D.15356;
  unsigned int D.15357;
  unsigned int D.15358;
  void * D.15359;
  struct MonoDebugCodeBlock * D.15360;
  unsigned int i.42;
  unsigned int D.15362;
  struct MonoDebugCodeBlock * D.15363;
  int D.15364;
  int D.15365;
  int D.15366;
  int D.15367;
  sizetype locals_offset.43;
  const uint8_t * p.44;
  unsigned int num_locals.45;
  unsigned int D.15371;
  void * D.15372;
  struct MonoDebugLocalVar * D.15373;
  unsigned int D.15374;
  struct MonoDebugLocalVar * D.15375;
  int D.15376;
  int D.15377;
  unsigned int D.15378;
  void * D.15379;
  char * D.15380;
  unsigned int len.46;
  sizetype len.47;
  char * D.15383;
  const uint8_t * p.48;
  sizetype block_index.49;
  sizetype D.15390;
  sizetype D.15391;
  struct MonoDebugCodeBlock * D.15392;
  struct MonoSymbolFile * symfile;
  const uint8_t * p;
  int i;
  int len;
  int compile_unit_index;
  int locals_offset;
  int num_locals;
  int block_index;
  int namespace_id;
  int code_block_table_offset;
  struct MonoDebugLocalsInfo * res;

  try
    {
      D.15345 = minfo->handle;
      symfile = D.15345->symfile;
      if (symfile == 0B) goto <D.15346>; else goto <D.15347>;
      <D.15346>:
      D.15348 = 0B;
      return D.15348;
      <D.15347>:
      D.15349 = symfile->raw_contents;
      D.15350 = minfo->data_offset;
      p.38 = D.15349 + D.15350;
      p = p.38;
      p.39 = p;
      compile_unit_index = read_leb128 (p.39, &p);
      p.39 = p;
      locals_offset = read_leb128 (p.39, &p);
      p.39 = p;
      namespace_id = read_leb128 (p.39, &p);
      p.39 = p;
      code_block_table_offset = read_leb128 (p.39, &p);
      res = monoeg_malloc0 (16);
      D.15349 = symfile->raw_contents;
      code_block_table_offset.40 = (sizetype) code_block_table_offset;
      p.41 = D.15349 + code_block_table_offset.40;
      p = p.41;
      p.39 = p;
      D.15355 = read_leb128 (p.39, &p);
      res->num_blocks = D.15355;
      D.15356 = res->num_blocks;
      D.15357 = (unsigned int) D.15356;
      D.15358 = D.15357 * 16;
      D.15359 = monoeg_malloc0 (D.15358);
      res->code_blocks = D.15359;
      i = 0;
      goto <D.14851>;
      <D.14850>:
      D.15360 = res->code_blocks;
      i.42 = (unsigned int) i;
      D.15362 = i.42 * 16;
      D.15363 = D.15360 + D.15362;
      p.39 = p;
      D.15364 = read_leb128 (p.39, &p);
      D.15363->type = D.15364;
      D.15360 = res->code_blocks;
      i.42 = (unsigned int) i;
      D.15362 = i.42 * 16;
      D.15363 = D.15360 + D.15362;
      p.39 = p;
      D.15365 = read_leb128 (p.39, &p);
      D.15363->parent = D.15365;
      D.15360 = res->code_blocks;
      i.42 = (unsigned int) i;
      D.15362 = i.42 * 16;
      D.15363 = D.15360 + D.15362;
      p.39 = p;
      D.15366 = read_leb128 (p.39, &p);
      D.15363->start_offset = D.15366;
      D.15360 = res->code_blocks;
      i.42 = (unsigned int) i;
      D.15362 = i.42 * 16;
      D.15363 = D.15360 + D.15362;
      p.39 = p;
      D.15367 = read_leb128 (p.39, &p);
      D.15363->end_offset = D.15367;
      i = i + 1;
      <D.14851>:
      D.15356 = res->num_blocks;
      if (D.15356 > i) goto <D.14850>; else goto <D.14852>;
      <D.14852>:
      D.15349 = symfile->raw_contents;
      locals_offset.43 = (sizetype) locals_offset;
      p.44 = D.15349 + locals_offset.43;
      p = p.44;
      p.39 = p;
      num_locals = read_leb128 (p.39, &p);
      res->num_locals = num_locals;
      num_locals.45 = (unsigned int) num_locals;
      D.15371 = num_locals.45 * 12;
      D.15372 = monoeg_malloc0 (D.15371);
      res->locals = D.15372;
      i = 0;
      goto <D.14854>;
      <D.14853>:
      D.15373 = res->locals;
      i.42 = (unsigned int) i;
      D.15374 = i.42 * 12;
      D.15375 = D.15373 + D.15374;
      p.39 = p;
      D.15376 = read_leb128 (p.39, &p);
      D.15375->index = D.15376;
      p.39 = p;
      len = read_leb128 (p.39, &p);
      D.15373 = res->locals;
      i.42 = (unsigned int) i;
      D.15374 = i.42 * 12;
      D.15375 = D.15373 + D.15374;
      D.15377 = len + 1;
      D.15378 = (unsigned int) D.15377;
      D.15379 = monoeg_malloc (D.15378);
      D.15375->name = D.15379;
      D.15373 = res->locals;
      i.42 = (unsigned int) i;
      D.15374 = i.42 * 12;
      D.15375 = D.15373 + D.15374;
      D.15380 = D.15375->name;
      p.39 = p;
      len.46 = (unsigned int) len;
      memcpy (D.15380, p.39, len.46);
      D.15373 = res->locals;
      i.42 = (unsigned int) i;
      D.15374 = i.42 * 12;
      D.15375 = D.15373 + D.15374;
      D.15380 = D.15375->name;
      len.47 = (sizetype) len;
      D.15383 = D.15380 + len.47;
      *D.15383 = 0;
      p.39 = p;
      len.47 = (sizetype) len;
      p.48 = p.39 + len.47;
      p = p.48;
      p.39 = p;
      block_index = read_leb128 (p.39, &p);
      if (block_index > 0) goto <D.15385>; else goto <D.15386>;
      <D.15385>:
      D.15356 = res->num_blocks;
      if (D.15356 >= block_index) goto <D.15387>; else goto <D.15388>;
      <D.15387>:
      D.15373 = res->locals;
      i.42 = (unsigned int) i;
      D.15374 = i.42 * 12;
      D.15375 = D.15373 + D.15374;
      D.15360 = res->code_blocks;
      block_index.49 = (sizetype) block_index;
      D.15390 = block_index.49 + 268435455;
      D.15391 = D.15390 * 16;
      D.15392 = D.15360 + D.15391;
      D.15375->block = D.15392;
      <D.15388>:
      <D.15386>:
      i = i + 1;
      <D.14854>:
      if (i < num_locals) goto <D.14853>; else goto <D.14855>;
      <D.14855>:
      D.15348 = res;
      return D.15348;
    }
  finally
    {
      p = {CLOBBER};
    }
}


mono_debug_symfile_free_locals (struct MonoDebugLocalsInfo * info)
{
  struct MonoDebugLocalVar * D.15395;
  unsigned int i.50;
  unsigned int D.15397;
  struct MonoDebugLocalVar * D.15398;
  char * D.15399;
  int D.15400;
  struct MonoDebugCodeBlock * D.15401;
  int i;

  i = 0;
  goto <D.14861>;
  <D.14860>:
  D.15395 = info->locals;
  i.50 = (unsigned int) i;
  D.15397 = i.50 * 12;
  D.15398 = D.15395 + D.15397;
  D.15399 = D.15398->name;
  monoeg_g_free (D.15399);
  i = i + 1;
  <D.14861>:
  D.15400 = info->num_locals;
  if (D.15400 > i) goto <D.14860>; else goto <D.14862>;
  <D.14862>:
  D.15395 = info->locals;
  monoeg_g_free (D.15395);
  D.15401 = info->code_blocks;
  monoeg_g_free (D.15401);
  monoeg_g_free (info);
}


