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.17451;
  struct MonoImage * D.17453;
  const char * D.17454;
  gchar * D.17455;
  char * D.17456;
  long long unsigned int D.17459;
  int D.17460;
  int D.17461;
  int * D.17466;
  int D.17467;
  const gchar * D.17468;
  unsigned int D.17470;
  int D.17471;
  void * * D.17472;
  void * D.17473;
  int D.17474;
  struct MonoSymbolFile * D.17477;
  struct MonoSymbolFile * symfile;

  mono_debugger_lock ();
  symfile = monoeg_malloc0 (40);
  if (raw_contents != 0B) goto <D.17447>; else goto <D.17448>;
  <D.17447>:
  {
    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.17451 = monoeg_g_strdup_printf ("LoadedFromMemory");
    symfile->filename = D.17451;
    symfile->was_loaded_from_memory = 1;
  }
  goto <D.17452>;
  <D.17448>:
  {
    struct MonoFileMap * f;

    D.17453 = handle->image;
    D.17454 = mono_image_get_filename (D.17453);
    D.17455 = monoeg_g_strdup_printf ("%s.mdb", D.17454);
    symfile->filename = D.17455;
    symfile->was_loaded_from_memory = 0;
    D.17456 = symfile->filename;
    f = mono_file_map_open (D.17456);
    if (f != 0B) goto <D.17457>; else goto <D.17458>;
    <D.17457>:
    D.17459 = mono_file_map_size (f);
    D.17460 = (int) D.17459;
    symfile->raw_contents_size = D.17460;
    D.17461 = symfile->raw_contents_size;
    if (D.17461 == 0) goto <D.17462>; else goto <D.17463>;
    <D.17462>:
    if (in_the_debugger == 0) goto <D.17464>; else goto <D.17465>;
    <D.17464>:
    D.17456 = symfile->filename;
    D.17466 = __errno_location ();
    D.17467 = *D.17466;
    D.17468 = monoeg_g_strerror (D.17467);
    monoeg_g_log (0B, 16, "stat of %s failed: %s", D.17456, D.17468);
    <D.17465>:
    goto <D.17469>;
    <D.17463>:
    D.17461 = symfile->raw_contents_size;
    D.17470 = (unsigned int) D.17461;
    D.17471 = mono_file_map_fd (f);
    D.17472 = &symfile->raw_contents_handle;
    D.17473 = mono_file_map (D.17470, 17, D.17471, 0, D.17472);
    symfile->raw_contents = D.17473;
    <D.17469>:
    mono_file_map_close (f);
    <D.17458>:
  }
  <D.17452>:
  D.17474 = load_symfile (handle, symfile, in_the_debugger);
  if (D.17474 != 0) goto <D.17475>; else goto <D.17476>;
  <D.17475>:
  mono_debugger_unlock ();
  D.17477 = symfile;
  return D.17477;
  <D.17476>:
  if (in_the_debugger == 0) goto <D.17478>; else goto <D.17479>;
  <D.17478>:
  mono_debug_close_mono_symbol_file (symfile);
  mono_debugger_unlock ();
  D.17477 = 0B;
  return D.17477;
  <D.17479>:
  mono_debugger_unlock ();
  D.17477 = symfile;
  return D.17477;
}


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

  D.17482 = __builtin_object_size (__dest, 0);
  D.17481 = __builtin___memcpy_chk (__dest, __src, __len, D.17482);
  return D.17481;
}


load_symfile (struct MonoDebugHandle * handle, struct MonoSymbolFile * symfile, mono_bool in_the_debugger)
{
  int D.17486;
  char * D.17491;
  unsigned int D.17492;
  unsigned int D.17493;
  int D.17241;
  struct MonoImage * D.17498;
  char * D.17499;
  char * D.17504;
  struct GHashTable * D.17507;
  struct GHashTable * D.17508;
  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.17484>; else goto <D.17485>;
  <D.17484>:
  D.17486 = 0;
  return D.17486;
  <D.17485>:
  magic = mono_read64 (ptr);
  ptr = ptr + 8;
  if (magic != 5037318119232611860) goto <D.17487>; else goto <D.17488>;
  <D.17487>:
  if (in_the_debugger == 0) goto <D.17489>; else goto <D.17490>;
  <D.17489>:
  D.17491 = symfile->filename;
  monoeg_g_log (0B, 16, "Symbol file %s is not a mono symbol file", D.17491);
  <D.17490>:
  D.17486 = 0;
  return D.17486;
  <D.17488>:
  D.17492 = mono_read32 (ptr);
  major = (int) D.17492;
  ptr = ptr + 4;
  D.17493 = mono_read32 (ptr);
  minor = (int) D.17493;
  ptr = ptr + 4;
  if (major != 50) goto <D.17494>; else goto <D.17495>;
  <D.17494>:
  if (in_the_debugger == 0) goto <D.17496>; else goto <D.17497>;
  <D.17496>:
  D.17491 = symfile->filename;
  monoeg_g_log (0B, 16, "Symbol file %s has incorrect version (expected %d.%d, got %d)", D.17491, 50, 0, major);
  <D.17497>:
  D.17486 = 0;
  return D.17486;
  <D.17495>:
  guid = mono_guid_to_string (ptr);
  ptr = ptr + 16;
  {
    size_t __s1_len;
    size_t __s2_len;

    D.17498 = handle->image;
    D.17499 = D.17498->guid;
    D.17241 = __builtin_strcmp (D.17499, guid);
  }
  if (D.17241 != 0) goto <D.17500>; else goto <D.17501>;
  <D.17500>:
  if (in_the_debugger == 0) goto <D.17502>; else goto <D.17503>;
  <D.17502>:
  D.17491 = symfile->filename;
  D.17504 = handle->image_file;
  monoeg_g_log (0B, 16, "Symbol file %s doesn\'t match image %s", D.17491, D.17504);
  <D.17503>:
  if (guid != 0B) goto <D.17505>; else goto <D.17506>;
  <D.17505>:
  monoeg_g_free (guid);
  <D.17506>:
  D.17486 = 0;
  return D.17486;
  <D.17501>:
  symfile->major_version = major;
  symfile->minor_version = minor;
  symfile->offset_table = ptr;
  D.17507 = monoeg_g_hash_table_new_full (0B, 0B, 0B, free_method_info);
  symfile->method_hash = D.17507;
  D.17508 = monoeg_g_hash_table_new_full (0B, 0B, 0B, free_source_info);
  symfile->source_hash = D.17508;
  monoeg_g_free (guid);
  D.17486 = 1;
  return D.17486;
}


free_source_info (struct MonoDebugSourceInfo * sinfo)
{
  char * D.17510;
  guint8 * D.17511;
  guint8 * D.17512;

  D.17510 = sinfo->source_file;
  monoeg_g_free (D.17510);
  D.17511 = sinfo->guid;
  monoeg_g_free (D.17511);
  D.17512 = sinfo->hash;
  monoeg_g_free (D.17512);
  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.17515;
  const uint8_t * D.17518;
  int D.17521;
  void * D.17525;
  char * D.17526;

  if (symfile == 0B) goto <D.17513>; else goto <D.17514>;
  <D.17513>:
  return;
  <D.17514>:
  mono_debugger_lock ();
  D.17515 = symfile->method_hash;
  if (D.17515 != 0B) goto <D.17516>; else goto <D.17517>;
  <D.17516>:
  D.17515 = symfile->method_hash;
  monoeg_g_hash_table_destroy (D.17515);
  <D.17517>:
  D.17518 = symfile->raw_contents;
  if (D.17518 != 0B) goto <D.17519>; else goto <D.17520>;
  <D.17519>:
  D.17521 = symfile->was_loaded_from_memory;
  if (D.17521 != 0) goto <D.17522>; else goto <D.17523>;
  <D.17522>:
  D.17518 = symfile->raw_contents;
  monoeg_g_free (D.17518);
  goto <D.17524>;
  <D.17523>:
  D.17518 = symfile->raw_contents;
  D.17525 = symfile->raw_contents_handle;
  mono_file_unmap (D.17518, D.17525);
  <D.17524>:
  <D.17520>:
  D.17526 = symfile->filename;
  if (D.17526 != 0B) goto <D.17527>; else goto <D.17528>;
  <D.17527>:
  D.17526 = symfile->filename;
  monoeg_g_free (D.17526);
  <D.17528>:
  monoeg_g_free (symfile);
  mono_debugger_unlock ();
}


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

  if (symfile != 0B) goto <D.17534>; else goto <D.17532>;
  <D.17534>:
  D.17535 = symfile->offset_table;
  if (D.17535 != 0B) goto <D.17536>; else goto <D.17532>;
  <D.17536>:
  iftmp.2 = 1;
  goto <D.17533>;
  <D.17532>:
  iftmp.2 = 0;
  <D.17533>:
  D.17530 = iftmp.2;
  return D.17530;
}


mono_debug_symfile_lookup_location (struct MonoDebugMethodInfo * minfo, uint32_t offset)
{
  struct MonoDebugHandle * D.17538;
  struct MonoDebugSourceLocation * D.17541;
  struct MonoSymbolFileOffsetTable * D.17542;
  uint32_t * D.17543;
  unsigned int D.17544;
  int D.17545;
  uint32_t * D.17546;
  unsigned int D.17547;
  int D.17548;
  uint32_t * D.17549;
  unsigned int D.17550;
  unsigned char D.17551;
  unsigned char D.17552;
  int D.17553;
  int D.17554;
  int D.17555;
  int D.17556;
  const uint8_t * D.17557;
  unsigned int D.17558;
  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.17567;
  const unsigned char * ptr.9;
  const unsigned char * ptr.10;
  int D.17572;
  int D.17576;
  _Bool D.17577;
  int D.17578;
  unsigned char D.17580;
  int D.17584;
  int offset.11;
  int D.17588;
  int D.17590;
  int D.17591;
  int D.17592;
  int D.17593;
  int D.17594;
  int D.17595;
  int D.17596;
  int D.17597;
  int D.17598;
  int D.17600;
  int D.17601;
  int D.17602;
  int D.17603;
  int D.17604;
  int D.17605;
  int D.17606;
  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.17538 = minfo->handle;
      symfile = D.17538->symfile;
      if (symfile == 0B) goto <D.17539>; else goto <D.17540>;
      <D.17539>:
      D.17541 = 0B;
      return D.17541;
      <D.17540>:
      D.17542 = symfile->offset_table;
      D.17543 = &D.17542->_line_number_table_line_base;
      D.17544 = mono_read32 (D.17543);
      D.17545 = (int) D.17544;
      stm.line_base = D.17545;
      D.17542 = symfile->offset_table;
      D.17546 = &D.17542->_line_number_table_line_range;
      D.17547 = mono_read32 (D.17546);
      D.17548 = (int) D.17547;
      stm.line_range = D.17548;
      D.17542 = symfile->offset_table;
      D.17549 = &D.17542->_line_number_table_opcode_base;
      D.17550 = mono_read32 (D.17549);
      D.17551 = (unsigned char) D.17550;
      stm.opcode_base = D.17551;
      D.17552 = stm.opcode_base;
      D.17553 = (int) D.17552;
      D.17554 = 255 - D.17553;
      D.17555 = stm.line_range;
      D.17556 = D.17554 / D.17555;
      stm.max_address_incr = D.17556;
      mono_debugger_lock ();
      D.17557 = symfile->raw_contents;
      D.17558 = minfo->lnt_offset;
      ptr.3 = D.17557 + D.17558;
      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.17317>:
      {
        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.17563>; else goto <D.17564>;
        <D.17563>:
        {
          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.17567 = (sizetype) size;
          end_ptr = ptr.4 + D.17567;
          ptr.4 = ptr;
          ptr.9 = ptr.4;
          ptr.10 = ptr.9 + 1;
          ptr = ptr.10;
          opcode = *ptr.9;
          if (opcode == 1) goto <D.17570>; else goto <D.17571>;
          <D.17570>:
          D.17572 = check_line (&stm, -1, &location);
          if (D.17572 != 0) goto out_success; else goto <D.17573>;
          <D.17573>:
          goto <D.17307>;
          <D.17571>:
          if (opcode == 64) goto <D.17574>; else goto <D.17575>;
          <D.17574>:
          D.17576 = stm.is_hidden;
          D.17577 = D.17576 == 0;
          D.17578 = (int) D.17577;
          stm.is_hidden = D.17578;
          goto <D.17579>;
          <D.17575>:
          D.17580 = opcode + 192;
          if (D.17580 <= 63) goto <D.17581>; else goto <D.17582>;
          <D.17581>:
          goto <D.17583>;
          <D.17582>:
          D.17584 = (int) opcode;
          monoeg_g_log (0B, 16, "Unknown extended opcode %x in LNT", D.17584);
          <D.17583>:
          <D.17579>:
          ptr = end_ptr;
          // predicted unlikely by continue predictor.
          goto <D.17308>;
        }
        <D.17564>:
        D.17552 = stm.opcode_base;
        if (D.17552 > opcode) goto <D.17585>; else goto <D.17586>;
        <D.17585>:
        D.17584 = (int) opcode;
        switch (D.17584) <default: <D.17315>, case 1: <D.17309>, case 2: <D.17311>, case 3: <D.17312>, case 4: <D.17313>, case 8: <D.17314>>
        <D.17309>:
        offset.11 = (int) offset;
        D.17588 = check_line (&stm, offset.11, &location);
        if (D.17588 != 0) goto out_success; else goto <D.17589>;
        <D.17589>:
        goto <D.17310>;
        <D.17311>:
        ptr.4 = ptr;
        D.17590 = read_leb128 (ptr.4, &ptr);
        D.17591 = stm.offset;
        D.17592 = D.17591 + D.17590;
        stm.offset = D.17592;
        goto <D.17310>;
        <D.17312>:
        ptr.4 = ptr;
        D.17593 = read_leb128 (ptr.4, &ptr);
        D.17594 = stm.line;
        D.17595 = D.17594 + D.17593;
        stm.line = D.17595;
        goto <D.17310>;
        <D.17313>:
        ptr.4 = ptr;
        D.17596 = read_leb128 (ptr.4, &ptr);
        stm.file = D.17596;
        goto <D.17310>;
        <D.17314>:
        D.17591 = stm.offset;
        D.17597 = stm.max_address_incr;
        D.17598 = D.17591 + D.17597;
        stm.offset = D.17598;
        goto <D.17310>;
        <D.17315>:
        D.17584 = (int) opcode;
        monoeg_g_log (0B, 16, "Unknown standard opcode %x in LNT", D.17584);
        goto error_out;
        <D.17310>:
        goto <D.17599>;
        <D.17586>:
        D.17552 = stm.opcode_base;
        opcode = opcode - D.17552;
        D.17591 = stm.offset;
        D.17584 = (int) opcode;
        D.17555 = stm.line_range;
        D.17600 = D.17584 / D.17555;
        D.17601 = D.17591 + D.17600;
        stm.offset = D.17601;
        D.17594 = stm.line;
        D.17602 = stm.line_base;
        D.17584 = (int) opcode;
        D.17555 = stm.line_range;
        D.17603 = D.17584 % D.17555;
        D.17604 = D.17602 + D.17603;
        D.17605 = D.17594 + D.17604;
        stm.line = D.17605;
        offset.11 = (int) offset;
        D.17606 = check_line (&stm, offset.11, &location);
        if (D.17606 != 0) goto out_success; else goto <D.17607>;
        <D.17607>:
        <D.17599>:
      }
      <D.17308>:
      goto <D.17317>;
      <D.17307>:
      error_out:
      mono_debugger_unlock ();
      D.17541 = 0B;
      return D.17541;
      out_success:
      mono_debugger_unlock ();
      D.17541 = location;
      return D.17541;
    }
  finally
    {
      location = {CLOBBER};
      ptr = {CLOBBER};
      stm = {CLOBBER};
    }
}


read_leb128 (const uint8_t * ptr, const uint8_t * * rptr)
{
  const uint8_t * ptr.12;
  int D.17611;
  int D.17612;
  int D.17613;
  signed char b.13;
  int D.17617;
  int ret;
  int shift;
  char b;

  ret = 0;
  shift = 0;
  <D.17264>:
  ptr.12 = ptr;
  ptr = ptr.12 + 1;
  b = *ptr.12;
  D.17611 = (int) b;
  D.17612 = D.17611 & 127;
  D.17613 = D.17612 << shift;
  ret = D.17613 | ret;
  shift = shift + 7;
  b.13 = (signed char) b;
  if (b.13 < 0) goto <D.17264>; else goto <D.17265>;
  <D.17265>:
  if (rptr != 0B) goto <D.17615>; else goto <D.17616>;
  <D.17615>:
  *rptr = ptr;
  <D.17616>:
  D.17617 = ret;
  return D.17617;
}


check_line (struct StatementMachine * stm, int offset, struct MonoDebugSourceLocation * * location)
{
  int D.17619;
  unsigned int D.17622;
  int D.17623;
  unsigned int D.17624;
  int D.17625;
  unsigned int D.17628;
  gboolean D.17629;
  unsigned int D.17630;
  struct MonoSymbolFile * D.17633;
  struct MonoSymbolFileOffsetTable * D.17634;
  uint32_t * D.17635;
  unsigned int D.17636;
  unsigned int D.17637;
  unsigned int D.17638;
  unsigned int D.17639;
  const uint8_t * D.17640;
  sizetype offset.14;
  uint32_t * D.17642;
  unsigned int D.17643;
  const uint8_t * D.17644;
  unsigned int D.17645;
  void * D.17648;
  struct MonoDebugSourceLocation * D.17649;
  unsigned int D.17650;
  gchar * source_file;

  source_file = 0B;
  D.17619 = stm->offset;
  if (D.17619 <= offset) goto <D.17620>; else goto <D.17621>;
  <D.17620>:
  D.17619 = stm->offset;
  D.17622 = (unsigned int) D.17619;
  stm->last_offset = D.17622;
  D.17623 = stm->file;
  D.17624 = (unsigned int) D.17623;
  stm->last_file = D.17624;
  D.17625 = stm->line;
  if (D.17625 != 16707566) goto <D.17626>; else goto <D.17627>;
  <D.17626>:
  D.17625 = stm->line;
  D.17628 = (unsigned int) D.17625;
  stm->last_line = D.17628;
  <D.17627>:
  D.17629 = 0;
  return D.17629;
  <D.17621>:
  D.17630 = stm->last_file;
  if (D.17630 != 0) goto <D.17631>; else goto <D.17632>;
  <D.17631>:
  {
    int offset;
    struct MonoSymbolFileSourceEntry * se;

    D.17633 = stm->symfile;
    D.17634 = D.17633->offset_table;
    D.17635 = &D.17634->_source_table_offset;
    D.17636 = mono_read32 (D.17635);
    D.17630 = stm->last_file;
    D.17637 = D.17630 + 536870911;
    D.17638 = D.17637 * 8;
    D.17639 = D.17636 + D.17638;
    offset = (int) D.17639;
    D.17633 = stm->symfile;
    D.17640 = D.17633->raw_contents;
    offset.14 = (sizetype) offset;
    se = D.17640 + offset.14;
    D.17633 = stm->symfile;
    D.17640 = D.17633->raw_contents;
    D.17642 = &se->_data_offset;
    D.17643 = mono_read32 (D.17642);
    D.17644 = D.17640 + D.17643;
    source_file = read_string (D.17644, 0B);
  }
  <D.17632>:
  D.17645 = stm->last_line;
  if (D.17645 == 0) goto <D.17646>; else goto <D.17647>;
  <D.17646>:
  *location = 0B;
  D.17629 = 1;
  return D.17629;
  <D.17647>:
  D.17648 = monoeg_malloc0 (16);
  *location = D.17648;
  D.17649 = *location;
  D.17649->source_file = source_file;
  D.17649 = *location;
  D.17645 = stm->last_line;
  D.17649->row = D.17645;
  D.17649 = *location;
  D.17650 = stm->last_offset;
  D.17649->il_offset = D.17650;
  D.17629 = 1;
  return D.17629;
}


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.17657;
  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.17655>; else goto <D.17656>;
  <D.17655>:
  ptr.15 = ptr;
  *endp = ptr.15;
  <D.17656>:
  D.17657 = s;
  return D.17657;
}


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

  D.17659 = location->source_file;
  monoeg_g_free (D.17659);
  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.17670;
  struct MonoSymbolFileOffsetTable * D.17673;
  uint32_t * D.17674;
  unsigned int D.17675;
  int D.17676;
  uint32_t * D.17677;
  unsigned int D.17678;
  int D.17679;
  uint32_t * D.17680;
  unsigned int D.17681;
  unsigned char D.17682;
  unsigned char D.17683;
  int D.17684;
  int D.17685;
  int D.17686;
  int D.17687;
  const uint8_t * D.17688;
  unsigned int D.17689;
  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.17698;
  const unsigned char * ptr.24;
  const unsigned char * ptr.25;
  unsigned int D.17703;
  int D.17707;
  _Bool D.17708;
  int D.17709;
  unsigned char D.17711;
  int D.17715;
  int D.17718;
  int D.17719;
  int D.17720;
  int D.17721;
  int D.17722;
  int D.17723;
  int D.17724;
  int D.17725;
  int D.17726;
  int D.17728;
  int D.17729;
  int D.17730;
  int D.17731;
  int D.17732;
  int D.17733;
  int D.17734;
  unsigned int D.17737;
  int D.17740;
  struct MonoSymbolFile * D.17745;
  struct MonoSymbolFileOffsetTable * D.17746;
  uint32_t * D.17747;
  unsigned int D.17748;
  int D.17749;
  unsigned int D.17750;
  unsigned int D.17751;
  unsigned int D.17752;
  const uint8_t * D.17753;
  sizetype offset.26;
  uint32_t * D.17757;
  unsigned int D.17758;
  const uint8_t * D.17759;
  gchar * D.17760;
  struct GPtrArray * D.17763;
  unsigned int D.17766;
  void * D.17767;
  void * * D.17768;
  unsigned int D.17769;
  void * * D.17770;
  void * D.17771;
  _Bool D.17772;
  _Bool D.17773;
  _Bool D.17774;
  struct GPtrArray * D.17777;
  int * D.17780;
  int * D.17781;
  unsigned int D.17782;
  unsigned int D.17783;
  int D.17784;
  int D.17791;
  _Bool D.17792;
  _Bool D.17793;
  _Bool D.17794;
  void * D.17797;
  void * D.17798;
  int * D.17799;
  int * D.17800;
  void * * D.17801;
  void * * D.17802;
  void * D.17803;
  int D.17804;
  int * D.17805;
  int * D.17806;
  void * * D.17807;
  void * * D.17808;
  void * D.17809;
  int D.17810;
  _Bool D.17811;
  _Bool D.17812;
  _Bool D.17813;
  void * D.17816;
  int * D.17817;
  int * D.17818;
  int D.17819;
  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.17660>; else goto <D.17661>;
      <D.17660>:
      *source_file_list = 0B;
      <D.17661>:
      if (n_il_offsets != 0B) goto <D.17662>; else goto <D.17663>;
      <D.17662>:
      *n_il_offsets = 0;
      <D.17663>:
      if (source_files != 0B) goto <D.17664>; else goto <D.17665>;
      <D.17664>:
      *source_files = 0B;
      <D.17665>:
      if (source_file != 0B) goto <D.17666>; else goto <D.17667>;
      <D.17666>:
      *source_file = 0B;
      <D.17667>:
      if (column_numbers != 0B) goto <D.17668>; else goto <D.17669>;
      <D.17668>:
      *column_numbers = 0B;
      <D.17669>:
      D.17670 = minfo->handle;
      symfile = D.17670->symfile;
      if (symfile == 0B) goto <D.17671>; else goto <D.17672>;
      <D.17671>:
      return;
      <D.17672>:
      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.17673 = symfile->offset_table;
      D.17674 = &D.17673->_line_number_table_line_base;
      D.17675 = mono_read32 (D.17674);
      D.17676 = (int) D.17675;
      stm.line_base = D.17676;
      D.17673 = symfile->offset_table;
      D.17677 = &D.17673->_line_number_table_line_range;
      D.17678 = mono_read32 (D.17677);
      D.17679 = (int) D.17678;
      stm.line_range = D.17679;
      D.17673 = symfile->offset_table;
      D.17680 = &D.17673->_line_number_table_opcode_base;
      D.17681 = mono_read32 (D.17680);
      D.17682 = (unsigned char) D.17681;
      stm.opcode_base = D.17682;
      D.17683 = stm.opcode_base;
      D.17684 = (int) D.17683;
      D.17685 = 255 - D.17684;
      D.17686 = stm.line_range;
      D.17687 = D.17685 / D.17686;
      stm.max_address_incr = D.17687;
      mono_debugger_lock ();
      D.17688 = symfile->raw_contents;
      D.17689 = minfo->lnt_offset;
      ptr.18 = D.17688 + D.17689;
      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.17371>:
      {
        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.17694>; else goto <D.17695>;
        <D.17694>:
        {
          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.17698 = (sizetype) size;
          end_ptr = ptr.19 + D.17698;
          ptr.19 = ptr;
          ptr.24 = ptr.19;
          ptr.25 = ptr.24 + 1;
          ptr = ptr.25;
          opcode = *ptr.24;
          if (opcode == 1) goto <D.17701>; else goto <D.17702>;
          <D.17701>:
          D.17703 = il_offset_array->len;
          if (D.17703 == 0) goto <D.17362>; else goto <D.17704>;
          <D.17704>:
          add_line (&stm, il_offset_array, line_number_array, source_file_array);
          goto <D.17362>;
          <D.17702>:
          if (opcode == 64) goto <D.17705>; else goto <D.17706>;
          <D.17705>:
          D.17707 = stm.is_hidden;
          D.17708 = D.17707 == 0;
          D.17709 = (int) D.17708;
          stm.is_hidden = D.17709;
          goto <D.17710>;
          <D.17706>:
          D.17711 = opcode + 192;
          if (D.17711 <= 63) goto <D.17712>; else goto <D.17713>;
          <D.17712>:
          goto <D.17714>;
          <D.17713>:
          D.17715 = (int) opcode;
          monoeg_g_log (0B, 16, "Unknown extended opcode %x in LNT", D.17715);
          <D.17714>:
          <D.17710>:
          ptr = end_ptr;
          // predicted unlikely by continue predictor.
          goto <D.17363>;
        }
        <D.17695>:
        D.17683 = stm.opcode_base;
        if (D.17683 > opcode) goto <D.17716>; else goto <D.17717>;
        <D.17716>:
        D.17715 = (int) opcode;
        switch (D.17715) <default: <D.17370>, case 1: <D.17364>, case 2: <D.17366>, case 3: <D.17367>, case 4: <D.17368>, case 8: <D.17369>>
        <D.17364>:
        add_line (&stm, il_offset_array, line_number_array, source_file_array);
        goto <D.17365>;
        <D.17366>:
        ptr.19 = ptr;
        D.17718 = read_leb128 (ptr.19, &ptr);
        D.17719 = stm.offset;
        D.17720 = D.17719 + D.17718;
        stm.offset = D.17720;
        goto <D.17365>;
        <D.17367>:
        ptr.19 = ptr;
        D.17721 = read_leb128 (ptr.19, &ptr);
        D.17722 = stm.line;
        D.17723 = D.17722 + D.17721;
        stm.line = D.17723;
        goto <D.17365>;
        <D.17368>:
        ptr.19 = ptr;
        D.17724 = read_leb128 (ptr.19, &ptr);
        stm.file = D.17724;
        goto <D.17365>;
        <D.17369>:
        D.17719 = stm.offset;
        D.17725 = stm.max_address_incr;
        D.17726 = D.17719 + D.17725;
        stm.offset = D.17726;
        goto <D.17365>;
        <D.17370>:
        D.17715 = (int) opcode;
        monoeg_g_log (0B, 16, "Unknown standard opcode %x in LNT", D.17715);
        monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "debug-mono-symfile.c", 599);
        <D.17365>:
        goto <D.17727>;
        <D.17717>:
        D.17683 = stm.opcode_base;
        opcode = opcode - D.17683;
        D.17719 = stm.offset;
        D.17715 = (int) opcode;
        D.17686 = stm.line_range;
        D.17728 = D.17715 / D.17686;
        D.17729 = D.17719 + D.17728;
        stm.offset = D.17729;
        D.17722 = stm.line;
        D.17730 = stm.line_base;
        D.17715 = (int) opcode;
        D.17686 = stm.line_range;
        D.17731 = D.17715 % D.17686;
        D.17732 = D.17730 + D.17731;
        D.17733 = D.17722 + D.17732;
        stm.line = D.17733;
        add_line (&stm, il_offset_array, line_number_array, source_file_array);
        <D.17727>:
      }
      <D.17363>:
      goto <D.17371>;
      <D.17362>:
      D.17734 = stm.file;
      if (D.17734 == 0) goto <D.17735>; else goto <D.17736>;
      <D.17735>:
      D.17737 = stm.first_file;
      if (D.17737 != 0) goto <D.17738>; else goto <D.17739>;
      <D.17738>:
      D.17737 = stm.first_file;
      D.17740 = (int) D.17737;
      stm.file = D.17740;
      <D.17739>:
      <D.17736>:
      D.17734 = stm.file;
      if (D.17734 != 0) goto <D.17741>; else goto <D.17742>;
      <D.17741>:
      if (source_file != 0B) goto <D.17743>; else goto <D.17744>;
      <D.17743>:
      {
        int offset;
        struct MonoSymbolFileSourceEntry * se;

        D.17745 = stm.symfile;
        D.17746 = D.17745->offset_table;
        D.17747 = &D.17746->_source_table_offset;
        D.17748 = mono_read32 (D.17747);
        D.17734 = stm.file;
        D.17749 = D.17734 + -1;
        D.17750 = (unsigned int) D.17749;
        D.17751 = D.17750 * 8;
        D.17752 = D.17748 + D.17751;
        offset = (int) D.17752;
        D.17745 = stm.symfile;
        D.17753 = D.17745->raw_contents;
        offset.26 = (sizetype) offset;
        se = D.17753 + offset.26;
        if (source_file != 0B) goto <D.17755>; else goto <D.17756>;
        <D.17755>:
        D.17745 = stm.symfile;
        D.17753 = D.17745->raw_contents;
        D.17757 = &se->_data_offset;
        D.17758 = mono_read32 (D.17757);
        D.17759 = D.17753 + D.17758;
        D.17760 = read_string (D.17759, 0B);
        *source_file = D.17760;
        <D.17756>:
      }
      <D.17744>:
      <D.17742>:
      if (source_file_list != 0B) goto <D.17761>; else goto <D.17762>;
      <D.17761>:
      {
        int file;
        int last_file;

        last_file = 0;
        D.17763 = monoeg_g_ptr_array_new ();
        *source_file_list = D.17763;
        if (source_files != 0B) goto <D.17764>; else goto <D.17765>;
        <D.17764>:
        D.17703 = il_offset_array->len;
        D.17766 = D.17703 * 4;
        D.17767 = monoeg_malloc (D.17766);
        *source_files = D.17767;
        <D.17765>:
        i = 0;
        goto <D.17378>;
        <D.17377>:
        D.17768 = source_file_array->pdata;
        D.17769 = i * 4;
        D.17770 = D.17768 + D.17769;
        D.17771 = *D.17770;
        file = (int) D.17771;
        D.17772 = file != 0;
        D.17773 = file != last_file;
        D.17774 = D.17772 & D.17773;
        if (D.17774 != 0) goto <D.17775>; else goto <D.17776>;
        <D.17775>:
        {
          struct MonoDebugSourceInfo * info;

          info = get_source_info (symfile, file);
          D.17777 = *source_file_list;
          monoeg_g_ptr_array_add (D.17777, info);
        }
        <D.17776>:
        last_file = file;
        if (source_files != 0B) goto <D.17778>; else goto <D.17779>;
        <D.17778>:
        D.17780 = *source_files;
        D.17769 = i * 4;
        D.17781 = D.17780 + D.17769;
        D.17777 = *source_file_list;
        D.17782 = D.17777->len;
        D.17783 = D.17782 + 4294967295;
        D.17784 = (int) D.17783;
        *D.17781 = D.17784;
        <D.17779>:
        i = i + 1;
        <D.17378>:
        D.17703 = il_offset_array->len;
        if (D.17703 > i) goto <D.17377>; else goto <D.17379>;
        <D.17379>:
        D.17777 = *source_file_list;
        D.17782 = D.17777->len;
        if (D.17782 == 0) goto <D.17785>; else goto <D.17786>;
        <D.17785>:
        D.17734 = stm.file;
        if (D.17734 != 0) goto <D.17787>; else goto <D.17788>;
        <D.17787>:
        {
          struct MonoDebugSourceInfo * info;

          D.17734 = stm.file;
          info = get_source_info (symfile, D.17734);
          D.17777 = *source_file_list;
          monoeg_g_ptr_array_add (D.17777, info);
        }
        <D.17788>:
        <D.17786>:
      }
      <D.17762>:
      if (n_il_offsets != 0B) goto <D.17789>; else goto <D.17790>;
      <D.17789>:
      D.17703 = il_offset_array->len;
      D.17791 = (int) D.17703;
      *n_il_offsets = D.17791;
      <D.17790>:
      D.17792 = il_offsets != 0B;
      D.17793 = line_numbers != 0B;
      D.17794 = D.17792 & D.17793;
      if (D.17794 != 0) goto <D.17795>; else goto <D.17796>;
      <D.17795>:
      D.17703 = il_offset_array->len;
      D.17766 = D.17703 * 4;
      D.17797 = monoeg_malloc (D.17766);
      *il_offsets = D.17797;
      D.17703 = il_offset_array->len;
      D.17766 = D.17703 * 4;
      D.17798 = monoeg_malloc (D.17766);
      *line_numbers = D.17798;
      i = 0;
      goto <D.17382>;
      <D.17381>:
      D.17799 = *il_offsets;
      D.17769 = i * 4;
      D.17800 = D.17799 + D.17769;
      D.17801 = il_offset_array->pdata;
      D.17769 = i * 4;
      D.17802 = D.17801 + D.17769;
      D.17803 = *D.17802;
      D.17804 = (int) D.17803;
      *D.17800 = D.17804;
      D.17805 = *line_numbers;
      D.17769 = i * 4;
      D.17806 = D.17805 + D.17769;
      D.17807 = line_number_array->pdata;
      D.17769 = i * 4;
      D.17808 = D.17807 + D.17769;
      D.17809 = *D.17808;
      D.17810 = (int) D.17809;
      *D.17806 = D.17810;
      i = i + 1;
      <D.17382>:
      D.17703 = il_offset_array->len;
      if (D.17703 > i) goto <D.17381>; else goto <D.17383>;
      <D.17383>:
      <D.17796>:
      D.17811 = column_numbers != 0B;
      D.17812 = has_column_info != 0;
      D.17813 = D.17811 & D.17812;
      if (D.17813 != 0) goto <D.17814>; else goto <D.17815>;
      <D.17814>:
      D.17703 = il_offset_array->len;
      D.17766 = D.17703 * 4;
      D.17816 = monoeg_malloc (D.17766);
      *column_numbers = D.17816;
      i = 0;
      goto <D.17385>;
      <D.17384>:
      D.17817 = *column_numbers;
      D.17769 = i * 4;
      D.17818 = D.17817 + D.17769;
      ptr.19 = ptr;
      D.17819 = read_leb128 (ptr.19, &ptr);
      *D.17818 = D.17819;
      i = i + 1;
      <D.17385>:
      D.17703 = il_offset_array->len;
      if (D.17703 > i) goto <D.17384>; else goto <D.17386>;
      <D.17386>:
      <D.17815>:
      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.17822;
  gboolean D.17825;
  const uint8_t * D.17826;
  unsigned int D.17827;
  const unsigned char * ptr.27;
  const unsigned char * ptr.28;
  int D.17830;
  unsigned int D.17831;
  _Bool D.17832;
  struct MonoSymbolFile * symfile;
  const unsigned char * ptr;
  guint32 flags;

  try
    {
      D.17822 = minfo->handle;
      symfile = D.17822->symfile;
      if (symfile == 0B) goto <D.17823>; else goto <D.17824>;
      <D.17823>:
      D.17825 = 0;
      return D.17825;
      <D.17824>:
      D.17826 = symfile->raw_contents;
      D.17827 = minfo->data_offset;
      ptr.27 = D.17826 + D.17827;
      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.17830 = read_leb128 (ptr.28, &ptr);
      flags = (guint32) D.17830;
      D.17831 = flags & 2;
      D.17832 = D.17831 != 0;
      D.17825 = (gboolean) D.17832;
      return D.17825;
    }
  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.17835;
  int D.17838;
  void * D.17839;
  void * D.17840;
  int D.17841;
  void * D.17842;
  int D.17843;
  unsigned int D.17846;
  unsigned int D.17849;

  D.17835 = stm->line;
  if (D.17835 > 0) goto <D.17836>; else goto <D.17837>;
  <D.17836>:
  D.17838 = stm->offset;
  D.17839 = (void *) D.17838;
  monoeg_g_ptr_array_add (il_offset_array, D.17839);
  D.17835 = stm->line;
  D.17840 = (void *) D.17835;
  monoeg_g_ptr_array_add (line_number_array, D.17840);
  D.17841 = stm->file;
  D.17842 = (void *) D.17841;
  monoeg_g_ptr_array_add (source_file_array, D.17842);
  <D.17837>:
  D.17843 = stm->is_hidden;
  if (D.17843 == 0) goto <D.17844>; else goto <D.17845>;
  <D.17844>:
  D.17846 = stm->first_file;
  if (D.17846 == 0) goto <D.17847>; else goto <D.17848>;
  <D.17847>:
  D.17841 = stm->file;
  D.17849 = (unsigned int) D.17841;
  stm->first_file = D.17849;
  <D.17848>:
  <D.17845>:
}


get_source_info (struct MonoSymbolFile * symfile, int index)
{
  struct GHashTable * D.17850;
  const void * index.29;
  struct MonoSymbolFileOffsetTable * D.17854;
  uint32_t * D.17855;
  unsigned int D.17856;
  int D.17857;
  unsigned int D.17858;
  unsigned int D.17859;
  unsigned int D.17860;
  const uint8_t * D.17861;
  sizetype offset.30;
  uint32_t * D.17863;
  unsigned int D.17864;
  const uint8_t * ptr.31;
  const uint8_t * ptr.32;
  gchar * D.17867;
  void * D.17868;
  guint8 * D.17869;
  const uint8_t * ptr.33;
  void * D.17871;
  guint8 * D.17872;
  void * index.34;
  struct MonoDebugSourceInfo * D.17874;
  struct MonoDebugSourceInfo * info;

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

    try
      {
        D.17854 = symfile->offset_table;
        D.17855 = &D.17854->_source_table_offset;
        D.17856 = mono_read32 (D.17855);
        D.17857 = index + -1;
        D.17858 = (unsigned int) D.17857;
        D.17859 = D.17858 * 8;
        D.17860 = D.17856 + D.17859;
        offset = (int) D.17860;
        D.17861 = symfile->raw_contents;
        offset.30 = (sizetype) offset;
        se = D.17861 + offset.30;
        D.17861 = symfile->raw_contents;
        D.17863 = &se->_data_offset;
        D.17864 = mono_read32 (D.17863);
        ptr.31 = D.17861 + D.17864;
        ptr = ptr.31;
        info = monoeg_malloc0 (12);
        ptr.32 = ptr;
        D.17867 = read_string (ptr.32, &ptr);
        info->source_file = D.17867;
        D.17868 = monoeg_malloc0 (16);
        info->guid = D.17868;
        D.17869 = info->guid;
        ptr.32 = ptr;
        memcpy (D.17869, ptr.32, 16);
        ptr.32 = ptr;
        ptr.33 = ptr.32 + 16;
        ptr = ptr.33;
        D.17871 = monoeg_malloc0 (16);
        info->hash = D.17871;
        D.17872 = info->hash;
        ptr.32 = ptr;
        memcpy (D.17872, ptr.32, 16);
        ptr.32 = ptr;
        ptr.33 = ptr.32 + 16;
        ptr = ptr.33;
        D.17850 = symfile->source_hash;
        index.34 = (void *) index;
        monoeg_g_hash_table_insert_replace (D.17850, index.34, info, 0);
      }
    finally
      {
        ptr = {CLOBBER};
      }
  }
  <D.17853>:
  D.17874 = info;
  return D.17874;
}


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.17879;
  int32_t D.17880;
  unsigned int D.17881;
  unsigned int D.17882;
  unsigned int i.35;
  unsigned int D.17884;
  struct MonoDebugLineNumberEntry * D.17885;
  unsigned int D.17886;
  unsigned int D.17889;
  int i;

  if (jit == 0B) goto <D.17876>; else goto <D.17878>;
  <D.17878>:
  D.17879 = jit->line_numbers;
  if (D.17879 == 0B) goto <D.17876>; else goto <D.17877>;
  <D.17876>:
  D.17880 = -1;
  return D.17880;
  <D.17877>:
  D.17881 = jit->num_line_numbers;
  D.17882 = D.17881 + 4294967295;
  i = (int) D.17882;
  goto <D.17401>;
  <D.17400>:
  {
    struct MonoDebugLineNumberEntry lne;

    try
      {
        D.17879 = jit->line_numbers;
        i.35 = (unsigned int) i;
        D.17884 = i.35 * 8;
        D.17885 = D.17879 + D.17884;
        lne = *D.17885;
        D.17886 = lne.il_offset;
        if (D.17886 <= il_offset) goto <D.17887>; else goto <D.17888>;
        <D.17887>:
        D.17889 = lne.native_offset;
        D.17880 = (int32_t) D.17889;
        return D.17880;
        <D.17888>:
      }
    finally
      {
        lne = {CLOBBER};
      }
  }
  i = i + -1;
  <D.17401>:
  if (i >= 0) goto <D.17400>; else goto <D.17402>;
  <D.17402>:
  D.17880 = 0;
  return D.17880;
}


mono_debug_symfile_lookup_method (struct MonoDebugHandle * handle, struct MonoMethod * method)
{
  struct GHashTable * D.17893;
  struct MonoDebugMethodInfo * D.17896;
  struct MonoImage * D.17897;
  struct MonoClass * D.17898;
  struct MonoImage * D.17899;
  const uint8_t * D.17904;
  struct MonoSymbolFileOffsetTable * D.17905;
  uint32_t * D.17906;
  unsigned int D.17907;
  unsigned int D.17908;
  const void * D.17909;
  uint32_t * D.17910;
  unsigned int D.17911;
  int ie.36;
  int first_ie.37;
  int D.17916;
  int D.17917;
  int D.17918;
  unsigned int D.17919;
  uint32_t * D.17920;
  unsigned int D.17921;
  uint32_t * D.17922;
  unsigned int D.17923;
  struct MonoSymbolFileMethodEntry * first_ie;
  struct MonoSymbolFileMethodEntry * ie;
  struct MonoDebugMethodInfo * minfo;
  struct MonoSymbolFile * symfile;

  symfile = handle->symfile;
  D.17893 = symfile->method_hash;
  if (D.17893 == 0B) goto <D.17894>; else goto <D.17895>;
  <D.17894>:
  D.17896 = 0B;
  return D.17896;
  <D.17895>:
  D.17897 = handle->image;
  D.17898 = mono_method_get_class (method);
  D.17899 = mono_class_get_image (D.17898);
  if (D.17897 != D.17899) goto <D.17900>; else goto <D.17901>;
  <D.17900>:
  D.17896 = 0B;
  return D.17896;
  <D.17901>:
  mono_debugger_lock ();
  D.17893 = symfile->method_hash;
  minfo = monoeg_g_hash_table_lookup (D.17893, method);
  if (minfo != 0B) goto <D.17902>; else goto <D.17903>;
  <D.17902>:
  mono_debugger_unlock ();
  D.17896 = minfo;
  return D.17896;
  <D.17903>:
  D.17904 = symfile->raw_contents;
  D.17905 = symfile->offset_table;
  D.17906 = &D.17905->_method_table_offset;
  D.17907 = mono_read32 (D.17906);
  first_ie = D.17904 + D.17907;
  D.17908 = mono_method_get_token (method);
  D.17909 = (const void *) D.17908;
  D.17905 = symfile->offset_table;
  D.17910 = &D.17905->_method_count;
  D.17911 = mono_read32 (D.17910);
  ie = mono_binary_search (D.17909, first_ie, D.17911, 12, compare_method);
  if (ie == 0B) goto <D.17912>; else goto <D.17913>;
  <D.17912>:
  mono_debugger_unlock ();
  D.17896 = 0B;
  return D.17896;
  <D.17913>:
  minfo = monoeg_malloc0 (20);
  ie.36 = (int) ie;
  first_ie.37 = (int) first_ie;
  D.17916 = ie.36 - first_ie.37;
  D.17917 = D.17916 /[ex] 12;
  D.17918 = D.17917 + 1;
  D.17919 = (unsigned int) D.17918;
  minfo->index = D.17919;
  minfo->method = method;
  minfo->handle = handle;
  D.17920 = &ie->_data_offset;
  D.17921 = mono_read32 (D.17920);
  minfo->data_offset = D.17921;
  D.17922 = &ie->_line_number_table;
  D.17923 = mono_read32 (D.17922);
  minfo->lnt_offset = D.17923;
  D.17893 = symfile->method_hash;
  monoeg_g_hash_table_insert_replace (D.17893, method, minfo, 0);
  mono_debugger_unlock ();
  D.17896 = minfo;
  return D.17896;
}


compare_method (const void * key, const void * object)
{
  int D.17925;
  uint32_t * D.17926;
  unsigned int D.17927;
  unsigned int D.17928;
  uint32_t token;
  struct MonoSymbolFileMethodEntry * me;

  token = (uint32_t) key;
  me = object;
  D.17926 = &me->_token;
  D.17927 = mono_read32 (D.17926);
  D.17928 = token - D.17927;
  D.17925 = (int) D.17928;
  return D.17925;
}


mono_debug_symfile_lookup_locals (struct MonoDebugMethodInfo * minfo)
{
  struct MonoDebugHandle * D.17930;
  struct MonoDebugLocalsInfo * D.17933;
  const uint8_t * D.17934;
  unsigned int D.17935;
  const uint8_t * p.38;
  const uint8_t * p.39;
  sizetype code_block_table_offset.40;
  const uint8_t * p.41;
  int D.17940;
  int D.17941;
  unsigned int D.17942;
  unsigned int D.17943;
  void * D.17944;
  struct MonoDebugCodeBlock * D.17945;
  unsigned int i.42;
  unsigned int D.17947;
  struct MonoDebugCodeBlock * D.17948;
  int D.17949;
  int D.17950;
  int D.17951;
  int D.17952;
  sizetype locals_offset.43;
  const uint8_t * p.44;
  unsigned int num_locals.45;
  unsigned int D.17956;
  void * D.17957;
  struct MonoDebugLocalVar * D.17958;
  unsigned int D.17959;
  struct MonoDebugLocalVar * D.17960;
  int D.17961;
  int D.17962;
  unsigned int D.17963;
  void * D.17964;
  char * D.17965;
  unsigned int len.46;
  sizetype len.47;
  char * D.17968;
  const uint8_t * p.48;
  sizetype block_index.49;
  sizetype D.17975;
  sizetype D.17976;
  struct MonoDebugCodeBlock * D.17977;
  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.17930 = minfo->handle;
      symfile = D.17930->symfile;
      if (symfile == 0B) goto <D.17931>; else goto <D.17932>;
      <D.17931>:
      D.17933 = 0B;
      return D.17933;
      <D.17932>:
      D.17934 = symfile->raw_contents;
      D.17935 = minfo->data_offset;
      p.38 = D.17934 + D.17935;
      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.17934 = symfile->raw_contents;
      code_block_table_offset.40 = (sizetype) code_block_table_offset;
      p.41 = D.17934 + code_block_table_offset.40;
      p = p.41;
      p.39 = p;
      D.17940 = read_leb128 (p.39, &p);
      res->num_blocks = D.17940;
      D.17941 = res->num_blocks;
      D.17942 = (unsigned int) D.17941;
      D.17943 = D.17942 * 16;
      D.17944 = monoeg_malloc0 (D.17943);
      res->code_blocks = D.17944;
      i = 0;
      goto <D.17432>;
      <D.17431>:
      D.17945 = res->code_blocks;
      i.42 = (unsigned int) i;
      D.17947 = i.42 * 16;
      D.17948 = D.17945 + D.17947;
      p.39 = p;
      D.17949 = read_leb128 (p.39, &p);
      D.17948->type = D.17949;
      D.17945 = res->code_blocks;
      i.42 = (unsigned int) i;
      D.17947 = i.42 * 16;
      D.17948 = D.17945 + D.17947;
      p.39 = p;
      D.17950 = read_leb128 (p.39, &p);
      D.17948->parent = D.17950;
      D.17945 = res->code_blocks;
      i.42 = (unsigned int) i;
      D.17947 = i.42 * 16;
      D.17948 = D.17945 + D.17947;
      p.39 = p;
      D.17951 = read_leb128 (p.39, &p);
      D.17948->start_offset = D.17951;
      D.17945 = res->code_blocks;
      i.42 = (unsigned int) i;
      D.17947 = i.42 * 16;
      D.17948 = D.17945 + D.17947;
      p.39 = p;
      D.17952 = read_leb128 (p.39, &p);
      D.17948->end_offset = D.17952;
      i = i + 1;
      <D.17432>:
      D.17941 = res->num_blocks;
      if (D.17941 > i) goto <D.17431>; else goto <D.17433>;
      <D.17433>:
      D.17934 = symfile->raw_contents;
      locals_offset.43 = (sizetype) locals_offset;
      p.44 = D.17934 + 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.17956 = num_locals.45 * 12;
      D.17957 = monoeg_malloc0 (D.17956);
      res->locals = D.17957;
      i = 0;
      goto <D.17435>;
      <D.17434>:
      D.17958 = res->locals;
      i.42 = (unsigned int) i;
      D.17959 = i.42 * 12;
      D.17960 = D.17958 + D.17959;
      p.39 = p;
      D.17961 = read_leb128 (p.39, &p);
      D.17960->index = D.17961;
      p.39 = p;
      len = read_leb128 (p.39, &p);
      D.17958 = res->locals;
      i.42 = (unsigned int) i;
      D.17959 = i.42 * 12;
      D.17960 = D.17958 + D.17959;
      D.17962 = len + 1;
      D.17963 = (unsigned int) D.17962;
      D.17964 = monoeg_malloc (D.17963);
      D.17960->name = D.17964;
      D.17958 = res->locals;
      i.42 = (unsigned int) i;
      D.17959 = i.42 * 12;
      D.17960 = D.17958 + D.17959;
      D.17965 = D.17960->name;
      p.39 = p;
      len.46 = (unsigned int) len;
      memcpy (D.17965, p.39, len.46);
      D.17958 = res->locals;
      i.42 = (unsigned int) i;
      D.17959 = i.42 * 12;
      D.17960 = D.17958 + D.17959;
      D.17965 = D.17960->name;
      len.47 = (sizetype) len;
      D.17968 = D.17965 + len.47;
      *D.17968 = 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.17970>; else goto <D.17971>;
      <D.17970>:
      D.17941 = res->num_blocks;
      if (D.17941 >= block_index) goto <D.17972>; else goto <D.17973>;
      <D.17972>:
      D.17958 = res->locals;
      i.42 = (unsigned int) i;
      D.17959 = i.42 * 12;
      D.17960 = D.17958 + D.17959;
      D.17945 = res->code_blocks;
      block_index.49 = (sizetype) block_index;
      D.17975 = block_index.49 + 268435455;
      D.17976 = D.17975 * 16;
      D.17977 = D.17945 + D.17976;
      D.17960->block = D.17977;
      <D.17973>:
      <D.17971>:
      i = i + 1;
      <D.17435>:
      if (i < num_locals) goto <D.17434>; else goto <D.17436>;
      <D.17436>:
      D.17933 = res;
      return D.17933;
    }
  finally
    {
      p = {CLOBBER};
    }
}


mono_debug_symfile_free_locals (struct MonoDebugLocalsInfo * info)
{
  struct MonoDebugLocalVar * D.17980;
  unsigned int i.50;
  unsigned int D.17982;
  struct MonoDebugLocalVar * D.17983;
  char * D.17984;
  int D.17985;
  struct MonoDebugCodeBlock * D.17986;
  int i;

  i = 0;
  goto <D.17442>;
  <D.17441>:
  D.17980 = info->locals;
  i.50 = (unsigned int) i;
  D.17982 = i.50 * 12;
  D.17983 = D.17980 + D.17982;
  D.17984 = D.17983->name;
  monoeg_g_free (D.17984);
  i = i + 1;
  <D.17442>:
  D.17985 = info->num_locals;
  if (D.17985 > i) goto <D.17441>; else goto <D.17443>;
  <D.17443>:
  D.17980 = info->locals;
  monoeg_g_free (D.17980);
  D.17986 = info->code_blocks;
  monoeg_g_free (D.17986);
  monoeg_g_free (info);
}


