mono_debug_init (MonoDebugFormat format)
{
  int mono_debug_initialized.0;
  _Bool D.17700;
  long int D.17701;
  long int D.17702;
  void * mono_symbol_table.1;
  struct MonoSymbolTable * mono_symbol_table.2;
  struct GHashTable * mono_debug_handles.3;
  struct GHashTable * data_table_hash.4;
  struct MonoDebugDataTable * D.17711;

  mono_debug_initialized.0 = mono_debug_initialized;
  D.17700 = mono_debug_initialized.0 != 0;
  D.17701 = (long int) D.17700;
  D.17702 = __builtin_expect (D.17701, 0);
  if (D.17702 != 0) goto <D.17703>; else goto <D.17704>;
  <D.17703>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 228, "!mono_debug_initialized");
  <D.17704>:
  if (format == 2) goto <D.17705>; else goto <D.17706>;
  <D.17705>:
  monoeg_g_log (0B, 4, "The mdb debugger is no longer supported.");
  <D.17364>:
  goto <D.17364>;
  <D.17706>:
  mono_debug_initialized = 1;
  mono_debug_format = format;
  mono_gc_base_init ();
  mono_debugger_initialize ();
  mono_debugger_lock ();
  mono_symbol_table.1 = monoeg_malloc0 (48);
  mono_symbol_table = mono_symbol_table.1;
  mono_symbol_table.2 = mono_symbol_table;
  mono_symbol_table.2->magic = 8862914395094897703;
  mono_symbol_table.2 = mono_symbol_table;
  mono_symbol_table.2->version = 81;
  mono_symbol_table.2 = mono_symbol_table;
  mono_symbol_table.2->total_size = 48;
  mono_debug_handles.3 = monoeg_g_hash_table_new_full (0B, 0B, 0B, free_debug_handle);
  mono_debug_handles = mono_debug_handles.3;
  data_table_hash.4 = monoeg_g_hash_table_new_full (0B, 0B, 0B, free_data_table);
  data_table_hash = data_table_hash.4;
  mono_debugger_class_init_func = mono_debug_add_type;
  mono_install_assembly_load_hook (mono_debug_add_assembly, 0B);
  mono_symbol_table.2 = mono_symbol_table;
  D.17711 = create_data_table (0B);
  mono_symbol_table.2->global_data_table = D.17711;
  mono_debugger_unlock ();
}


mono_debug_add_assembly (struct MonoAssembly * assembly, void * user_data)
{
  struct MonoDebugHandle * handle;
  struct MonoImage * image;

  mono_debugger_lock ();
  image = mono_assembly_get_image (assembly);
  handle = open_symfile_from_bundle (image);
  if (handle == 0B) goto <D.17712>; else goto <D.17713>;
  <D.17712>:
  mono_debug_open_image (image, 0B, 0);
  <D.17713>:
  mono_debugger_unlock ();
}


open_symfile_from_bundle (struct MonoImage * image)
{
  int D.17690;
  const char * D.17714;
  const char * D.17715;
  struct MonoDebugHandle * D.17718;
  const mono_byte * D.17719;
  int D.17720;
  struct BundledSymfile * bsymfile;

  bsymfile = bundled_symfiles;
  goto <D.17693>;
  <D.17692>:
  {
    size_t __s1_len;
    size_t __s2_len;

    D.17714 = bsymfile->aname;
    D.17715 = image->module_name;
    D.17690 = __builtin_strcmp (D.17714, D.17715);
  }
  if (D.17690 != 0) goto <D.17716>; else goto <D.17717>;
  <D.17716>:
  // predicted unlikely by continue predictor.
  goto <D.17691>;
  <D.17717>:
  D.17719 = bsymfile->raw_contents;
  D.17720 = bsymfile->size;
  D.17718 = mono_debug_open_image (image, D.17719, D.17720);
  return D.17718;
  <D.17691>:
  bsymfile = bsymfile->next;
  <D.17693>:
  if (bsymfile != 0B) goto <D.17692>; else goto <D.17694>;
  <D.17694>:
  D.17718 = 0B;
  return D.17718;
}


mono_debug_open_image (struct MonoImage * image, const guint8 * raw_contents, int size)
{
  int D.17722;
  struct MonoDebugHandle * D.17725;
  int next_symbol_file_id.5;
  int next_symbol_file_id.6;
  unsigned int next_symbol_file_id.7;
  const char * D.17731;
  gchar * D.17732;
  struct MonoDebugDataTable * D.17733;
  struct MonoSymbolFile * D.17734;
  struct MonoSymbolTable * mono_symbol_table.8;
  struct MonoDebugList * * D.17736;
  struct GHashTable * mono_debug_handles.9;
  struct MonoDebugHandle * handle;

  D.17722 = mono_image_is_dynamic (image);
  if (D.17722 != 0) goto <D.17723>; else goto <D.17724>;
  <D.17723>:
  D.17725 = 0B;
  return D.17725;
  <D.17724>:
  mono_debugger_lock ();
  handle = _mono_debug_get_image (image);
  if (handle != 0B) goto <D.17726>; else goto <D.17727>;
  <D.17726>:
  mono_debugger_unlock ();
  D.17725 = handle;
  return D.17725;
  <D.17727>:
  handle = monoeg_malloc0 (40);
  next_symbol_file_id.5 = next_symbol_file_id;
  next_symbol_file_id.6 = next_symbol_file_id.5 + 1;
  next_symbol_file_id = next_symbol_file_id.6;
  next_symbol_file_id.5 = next_symbol_file_id;
  next_symbol_file_id.7 = (unsigned int) next_symbol_file_id.5;
  handle->index = next_symbol_file_id.7;
  handle->image = image;
  mono_image_addref (image);
  D.17731 = mono_image_get_filename (image);
  D.17732 = monoeg_strdup (D.17731);
  handle->image_file = D.17732;
  D.17733 = create_data_table (0B);
  handle->type_table = D.17733;
  D.17734 = mono_debug_open_mono_symbols (handle, raw_contents, size, 0);
  handle->symfile = D.17734;
  mono_symbol_table.8 = mono_symbol_table;
  D.17736 = &mono_symbol_table.8->symbol_files;
  mono_debug_list_add (D.17736, handle);
  mono_debug_handles.9 = mono_debug_handles;
  monoeg_g_hash_table_insert_replace (mono_debug_handles.9, image, handle, 0);
  mono_debugger_unlock ();
  D.17725 = handle;
  return D.17725;
}


_mono_debug_get_image (struct MonoImage * image)
{
  struct MonoDebugHandle * D.17739;
  struct GHashTable * mono_debug_handles.10;

  mono_debug_handles.10 = mono_debug_handles;
  D.17739 = monoeg_g_hash_table_lookup (mono_debug_handles.10, image);
  return D.17739;
}


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

  if (str != 0B) goto <D.17742>; else goto <D.17743>;
  <D.17742>:
  D.17744 = __strdup (str);
  return D.17744;
  <D.17743>:
  D.17744 = 0B;
  return D.17744;
}


mono_debug_add_type (struct MonoClass * klass)
{
  struct MonoGenericClass * D.17748;
  unsigned char D.17750;
  unsigned char D.17752;
  struct MonoImage * D.17754;
  long unsigned int D.17759;
  long unsigned int D.17761;
  long unsigned int D.17762;
  unsigned int D.17765;
  guint8 * ptr.11;
  int D.17767;
  int D.17768;
  unsigned int D.17769;
  guint8 * ptr.12;
  long int ptr.13;
  long int oldptr.14;
  long int D.17773;
  _Bool D.17774;
  long int D.17775;
  long int D.17776;
  unsigned int D.17779;
  _Bool D.17780;
  long int D.17781;
  long int D.17782;
  struct MonoDebugDataTable * D.17785;
  guint8[0:] * D.17786;
  long unsigned int D.17787;
  struct MonoDebugHandle * handle;
  struct MonoDebugClassEntry * entry;
  guint8 buffer[8192];
  guint8 * ptr;
  guint8 * oldptr;
  guint32 size;
  guint32 total_size;
  guint32 max_size;
  int base_offset;

  try
    {
      base_offset = 0;
      D.17748 = klass->generic_class;
      if (D.17748 != 0B) goto <D.17746>; else goto <D.17749>;
      <D.17749>:
      D.17750 = klass->rank;
      if (D.17750 != 0) goto <D.17746>; else goto <D.17751>;
      <D.17751>:
      D.17752 = klass->byval_arg.type;
      if (D.17752 == 19) goto <D.17746>; else goto <D.17753>;
      <D.17753>:
      D.17752 = klass->byval_arg.type;
      if (D.17752 == 30) goto <D.17746>; else goto <D.17747>;
      <D.17746>:
      return;
      <D.17747>:
      mono_debugger_lock ();
      D.17754 = klass->image;
      handle = _mono_debug_get_image (D.17754);
      if (handle == 0B) goto <D.17755>; else goto <D.17756>;
      <D.17755>:
      mono_debugger_unlock ();
      return;
      <D.17756>:
      max_size = 20;
      if (max_size > 8192) goto <D.17757>; else goto <D.17758>;
      <D.17757>:
      D.17759 = (long unsigned int) max_size;
      oldptr = monoeg_malloc (D.17759);
      ptr = oldptr;
      goto <D.17760>;
      <D.17758>:
      oldptr = &buffer;
      ptr = oldptr;
      <D.17760>:
      D.17761 = BIT_FIELD_REF <*klass, 64, 256>;
      D.17762 = D.17761 & 8;
      if (D.17762 != 0) goto <D.17763>; else goto <D.17764>;
      <D.17763>:
      base_offset = -16;
      <D.17764>:
      D.17765 = klass->type_token;
      ptr.11 = ptr;
      write_leb128 (D.17765, ptr.11, &ptr);
      D.17767 = klass->instance_size;
      D.17768 = D.17767 + base_offset;
      D.17769 = (unsigned int) D.17768;
      ptr.11 = ptr;
      write_leb128 (D.17769, ptr.11, &ptr);
      ptr.11 = ptr;
      MEM[(void * *)ptr.11] = klass;
      ptr.11 = ptr;
      ptr.12 = ptr.11 + 8;
      ptr = ptr.12;
      ptr.11 = ptr;
      ptr.13 = (long int) ptr.11;
      oldptr.14 = (long int) oldptr;
      D.17773 = ptr.13 - oldptr.14;
      size = (guint32) D.17773;
      D.17774 = size >= max_size;
      D.17775 = (long int) D.17774;
      D.17776 = __builtin_expect (D.17775, 0);
      if (D.17776 != 0) goto <D.17777>; else goto <D.17778>;
      <D.17777>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 906, "size < max_size");
      <D.17778>:
      total_size = size + 4;
      D.17779 = total_size + 9;
      D.17780 = D.17779 > 16359;
      D.17781 = (long int) D.17780;
      D.17782 = __builtin_expect (D.17781, 0);
      if (D.17782 != 0) goto <D.17783>; else goto <D.17784>;
      <D.17783>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 909, "total_size + 9 < DATA_TABLE_CHUNK_SIZE");
      <D.17784>:
      D.17785 = handle->type_table;
      entry = allocate_data_item (D.17785, 1, total_size);
      entry->size = total_size;
      D.17786 = &entry->data;
      D.17787 = (long unsigned int) size;
      memcpy (D.17786, oldptr, D.17787);
      D.17785 = handle->type_table;
      write_data_item (D.17785, entry);
      if (max_size > 8192) goto <D.17788>; else goto <D.17789>;
      <D.17788>:
      monoeg_g_free (oldptr);
      <D.17789>:
      mono_debugger_unlock ();
    }
  finally
    {
      buffer = {CLOBBER};
      ptr = {CLOBBER};
    }
}


write_leb128 (guint32 value, guint8 * ptr, guint8 * * rptr)
{
  unsigned char D.17793;
  guint8 * ptr.15;

  <D.17441>:
  {
    guint8 byte;

    D.17793 = (unsigned char) value;
    byte = D.17793 & 127;
    value = value >> 7;
    if (value != 0) goto <D.17794>; else goto <D.17795>;
    <D.17794>:
    byte = byte | 128;
    <D.17795>:
    ptr.15 = ptr;
    ptr = ptr.15 + 1;
    *ptr.15 = byte;
  }
  if (value != 0) goto <D.17441>; else goto <D.17442>;
  <D.17442>:
  *rptr = ptr;
}


allocate_data_item (struct MonoDebugDataTable * table, MonoDebugDataItemType type, guint32 size)
{
  unsigned int D.17797;
  unsigned int D.17798;
  struct MonoDebugDataChunk * D.17802;
  unsigned int D.17803;
  unsigned int D.17804;
  _Bool D.17805;
  long int D.17806;
  long int D.17807;
  unsigned int D.17810;
  unsigned int D.17811;
  unsigned int D.17812;
  long unsigned int D.17815;
  long unsigned int D.17816;
  guint8 * D.17817;
  guint32 chunk_size;
  guint8 * data;

  D.17797 = size + 7;
  size = D.17797 & 4294967288;
  D.17798 = size + 16;
  if (D.17798 <= 16359) goto <D.17799>; else goto <D.17800>;
  <D.17799>:
  chunk_size = 16360;
  goto <D.17801>;
  <D.17800>:
  chunk_size = size + 16;
  <D.17801>:
  D.17802 = table->current_chunk;
  D.17803 = D.17802->current_offset;
  D.17802 = table->current_chunk;
  D.17804 = D.17802->allocated_size;
  D.17805 = D.17803 != D.17804;
  D.17806 = (long int) D.17805;
  D.17807 = __builtin_expect (D.17806, 0);
  if (D.17807 != 0) goto <D.17808>; else goto <D.17809>;
  <D.17808>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 442, "table->current_chunk->current_offset == table->current_chunk->allocated_size");
  <D.17809>:
  D.17802 = table->current_chunk;
  D.17804 = D.17802->allocated_size;
  D.17810 = D.17804 + size;
  D.17811 = D.17810 + 8;
  D.17802 = table->current_chunk;
  D.17812 = D.17802->total_size;
  if (D.17811 >= D.17812) goto <D.17813>; else goto <D.17814>;
  <D.17813>:
  {
    struct MonoDebugDataChunk * new_chunk;

    D.17815 = (long unsigned int) chunk_size;
    D.17816 = D.17815 + 24;
    new_chunk = monoeg_malloc0 (D.17816);
    new_chunk->total_size = chunk_size;
    D.17802 = table->current_chunk;
    D.17802->next = new_chunk;
    table->current_chunk = new_chunk;
  }
  <D.17814>:
  D.17802 = table->current_chunk;
  D.17802 = table->current_chunk;
  D.17804 = D.17802->allocated_size;
  data = &D.17802->data[D.17804];
  D.17802 = table->current_chunk;
  D.17802 = table->current_chunk;
  D.17804 = D.17802->allocated_size;
  D.17810 = D.17804 + size;
  D.17811 = D.17810 + 8;
  D.17802->allocated_size = D.17811;
  MEM[(guint32 *)data] = size;
  data = data + 4;
  MEM[(guint32 *)data] = type;
  data = data + 4;
  D.17817 = data;
  return D.17817;
}


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

  D.17820 = __builtin_object_size (__dest, 0);
  D.17819 = __builtin___memcpy_chk (__dest, __src, __len, D.17820);
  return D.17819;
}


write_data_item (struct MonoDebugDataTable * table, const guint8 * data)
{
  unsigned int D.17822;
  unsigned int D.17823;
  unsigned int D.17824;
  unsigned int D.17825;
  _Bool D.17826;
  long int D.17827;
  long int D.17828;
  struct MonoDebugDataChunk * current_chunk;
  guint32 size;

  current_chunk = table->current_chunk;
  size = MEM[(guint32 *)data + -8B];
  D.17822 = current_chunk->current_offset;
  D.17823 = D.17822 + size;
  D.17824 = D.17823 + 8;
  D.17825 = current_chunk->allocated_size;
  D.17826 = D.17824 != D.17825;
  D.17827 = (long int) D.17826;
  D.17828 = __builtin_expect (D.17827, 0);
  if (D.17828 != 0) goto <D.17829>; else goto <D.17830>;
  <D.17829>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 470, "current_chunk->current_offset + size + 8 == current_chunk->allocated_size");
  <D.17830>:
  D.17825 = current_chunk->allocated_size;
  current_chunk->current_offset = D.17825;
}


free_data_table (struct MonoDebugDataTable * table)
{
  struct GHashTable * D.17831;
  struct GHashTable * D.17832;
  struct MonoDebugDataChunk * D.17833;
  struct MonoSymbolTable * mono_symbol_table.16;
  struct MonoDebugList * * D.17835;
  struct MonoDebugDataChunk * chunk;
  struct MonoDebugDataChunk * next_chunk;

  D.17831 = table->method_hash;
  monoeg_g_hash_table_foreach (D.17831, free_header_data, 0B);
  D.17831 = table->method_hash;
  monoeg_g_hash_table_destroy (D.17831);
  D.17832 = table->method_address_hash;
  monoeg_g_hash_table_destroy (D.17832);
  table->method_hash = 0B;
  table->method_address_hash = 0B;
  chunk = table->first_chunk;
  goto <D.17351>;
  <D.17350>:
  next_chunk = chunk->next;
  monoeg_g_free (chunk);
  chunk = next_chunk;
  <D.17351>:
  if (chunk != 0B) goto <D.17350>; else goto <D.17352>;
  <D.17352>:
  table->current_chunk = 0B;
  D.17833 = table->current_chunk;
  table->first_chunk = D.17833;
  mono_symbol_table.16 = mono_symbol_table;
  D.17835 = &mono_symbol_table.16->data_tables;
  mono_debug_list_remove (D.17835, table);
  monoeg_g_free (table);
}


free_header_data (void * key, void * value, void * user_data)
{
  struct MonoDebugWrapperData * D.17836;
  const gchar * D.17839;
  struct GSList * D.17840;
  struct MonoDebugMethodHeader * header;

  header = value;
  D.17836 = header->wrapper_data;
  if (D.17836 != 0B) goto <D.17837>; else goto <D.17838>;
  <D.17837>:
  D.17836 = header->wrapper_data;
  D.17839 = D.17836->method_name;
  monoeg_g_free (D.17839);
  D.17836 = header->wrapper_data;
  monoeg_g_free (D.17836);
  <D.17838>:
  D.17840 = header->address_list;
  monoeg_g_slist_free (D.17840);
}


free_debug_handle (struct MonoDebugHandle * handle)
{
  struct MonoSymbolFile * D.17841;
  struct MonoDebugDataTable * D.17844;
  struct MonoImage * D.17845;
  char * D.17846;

  D.17841 = handle->symfile;
  if (D.17841 != 0B) goto <D.17842>; else goto <D.17843>;
  <D.17842>:
  D.17841 = handle->symfile;
  mono_debug_close_mono_symbol_file (D.17841);
  <D.17843>:
  D.17844 = handle->type_table;
  free_data_table (D.17844);
  D.17845 = handle->image;
  mono_image_close (D.17845);
  D.17846 = handle->image_file;
  monoeg_g_free (D.17846);
  monoeg_g_free (handle);
}


create_data_table (struct MonoDomain * domain)
{
  int iftmp.17;
  struct GHashTable * D.17851;
  struct GHashTable * D.17852;
  struct MonoDebugDataChunk * D.17853;
  struct MonoSymbolTable * mono_symbol_table.18;
  struct MonoDebugList * * D.17857;
  struct GHashTable * data_table_hash.19;
  struct MonoDebugDataTable * D.17859;
  struct MonoDebugDataTable * table;
  struct MonoDebugDataChunk * chunk;

  table = monoeg_malloc0 (40);
  if (domain != 0B) goto <D.17848>; else goto <D.17849>;
  <D.17848>:
  iftmp.17 = mono_domain_get_id (domain);
  goto <D.17850>;
  <D.17849>:
  iftmp.17 = -1;
  <D.17850>:
  table->domain = iftmp.17;
  D.17851 = monoeg_g_hash_table_new (0B, 0B);
  table->method_address_hash = D.17851;
  D.17852 = monoeg_g_hash_table_new (0B, 0B);
  table->method_hash = D.17852;
  chunk = monoeg_malloc0 (16384);
  chunk->total_size = 16360;
  table->current_chunk = chunk;
  D.17853 = table->current_chunk;
  table->first_chunk = D.17853;
  if (domain != 0B) goto <D.17854>; else goto <D.17855>;
  <D.17854>:
  mono_symbol_table.18 = mono_symbol_table;
  D.17857 = &mono_symbol_table.18->data_tables;
  mono_debug_list_add (D.17857, table);
  data_table_hash.19 = data_table_hash;
  monoeg_g_hash_table_insert_replace (data_table_hash.19, domain, table, 0);
  <D.17855>:
  D.17859 = table;
  return D.17859;
}


_mono_debug_init_corlib (struct MonoDomain * domain)
{
  int mono_debug_initialized.20;
  struct MonoSymbolTable * mono_symbol_table.21;
  struct MonoImage * D.17865;
  struct MonoDebugHandle * D.17866;

  mono_debug_initialized.20 = mono_debug_initialized;
  if (mono_debug_initialized.20 == 0) goto <D.17862>; else goto <D.17863>;
  <D.17862>:
  return;
  <D.17863>:
  mono_symbol_table.21 = mono_symbol_table;
  D.17865 = mono_defaults.corlib;
  D.17866 = mono_debug_open_image (D.17865, 0B, 0);
  mono_symbol_table.21->corlib = D.17866;
}


mono_debug_open_image_from_memory (struct MonoImage * image, const guint8 * raw_contents, int size)
{
  int mono_debug_initialized.22;

  mono_debug_initialized.22 = mono_debug_initialized;
  if (mono_debug_initialized.22 == 0) goto <D.17869>; else goto <D.17870>;
  <D.17869>:
  return;
  <D.17870>:
  mono_debug_open_image (image, raw_contents, size);
}


mono_debug_cleanup ()
{
  struct GHashTable * mono_debug_handles.23;
  struct GHashTable * data_table_hash.24;
  struct MonoSymbolTable * mono_symbol_table.25;
  struct MonoDebugDataTable * D.17881;

  mono_debug_handles.23 = mono_debug_handles;
  if (mono_debug_handles.23 != 0B) goto <D.17873>; else goto <D.17874>;
  <D.17873>:
  mono_debug_handles.23 = mono_debug_handles;
  monoeg_g_hash_table_destroy (mono_debug_handles.23);
  <D.17874>:
  mono_debug_handles = 0B;
  data_table_hash.24 = data_table_hash;
  if (data_table_hash.24 != 0B) goto <D.17876>; else goto <D.17877>;
  <D.17876>:
  data_table_hash.24 = data_table_hash;
  monoeg_g_hash_table_destroy (data_table_hash.24);
  data_table_hash = 0B;
  <D.17877>:
  mono_symbol_table.25 = mono_symbol_table;
  if (mono_symbol_table.25 != 0B) goto <D.17879>; else goto <D.17880>;
  <D.17879>:
  mono_symbol_table.25 = mono_symbol_table;
  D.17881 = mono_symbol_table.25->global_data_table;
  if (D.17881 != 0B) goto <D.17882>; else goto <D.17883>;
  <D.17882>:
  mono_symbol_table.25 = mono_symbol_table;
  D.17881 = mono_symbol_table.25->global_data_table;
  free_data_table (D.17881);
  <D.17883>:
  mono_symbol_table.25 = mono_symbol_table;
  monoeg_g_free (mono_symbol_table.25);
  mono_symbol_table = 0B;
  <D.17880>:
}


mono_debug_domain_create (struct MonoDomain * domain)
{
  int mono_debug_initialized.26;
  struct MonoDebugDataTable * table;

  mono_debug_initialized.26 = mono_debug_initialized;
  if (mono_debug_initialized.26 == 0) goto <D.17885>; else goto <D.17886>;
  <D.17885>:
  return;
  <D.17886>:
  mono_debugger_lock ();
  table = create_data_table (domain);
  mono_debugger_unlock ();
}


mono_debug_domain_unload (struct MonoDomain * domain)
{
  int mono_debug_initialized.27;
  struct GHashTable * data_table_hash.28;
  int D.17894;
  struct MonoDebugDataTable * table;

  mono_debug_initialized.27 = mono_debug_initialized;
  if (mono_debug_initialized.27 == 0) goto <D.17889>; else goto <D.17890>;
  <D.17889>:
  return;
  <D.17890>:
  mono_debugger_lock ();
  data_table_hash.28 = data_table_hash;
  table = monoeg_g_hash_table_lookup (data_table_hash.28, domain);
  if (table == 0B) goto <D.17892>; else goto <D.17893>;
  <D.17892>:
  D.17894 = mono_domain_get_id (domain);
  monoeg_g_log (0B, 16, "mono-debug.c:337:: unloading unknown domain %p / %d", domain, D.17894);
  mono_debugger_unlock ();
  return;
  <D.17893>:
  data_table_hash.28 = data_table_hash;
  monoeg_g_hash_table_remove (data_table_hash.28, domain);
  mono_debugger_unlock ();
}


mono_debug_close_image (struct MonoImage * image)
{
  int mono_debug_initialized.29;
  struct MonoSymbolTable * mono_symbol_table.30;
  struct MonoDebugList * * D.17902;
  struct GHashTable * mono_debug_handles.31;
  struct MonoDebugHandle * handle;

  mono_debug_initialized.29 = mono_debug_initialized;
  if (mono_debug_initialized.29 == 0) goto <D.17897>; else goto <D.17898>;
  <D.17897>:
  return;
  <D.17898>:
  mono_debugger_lock ();
  handle = _mono_debug_get_image (image);
  if (handle == 0B) goto <D.17899>; else goto <D.17900>;
  <D.17899>:
  mono_debugger_unlock ();
  return;
  <D.17900>:
  mono_symbol_table.30 = mono_symbol_table;
  D.17902 = &mono_symbol_table.30->symbol_files;
  mono_debug_list_remove (D.17902, handle);
  mono_debug_handles.31 = mono_debug_handles;
  monoeg_g_hash_table_remove (mono_debug_handles.31, image);
  mono_debugger_unlock ();
}


mono_debug_lookup_method (struct MonoMethod * method)
{
  struct MonoDebugMethodInfo * D.17905;
  struct MonoDebugMethodInfo * minfo;

  mono_debugger_lock ();
  minfo = _mono_debug_lookup_method (method);
  mono_debugger_unlock ();
  D.17905 = minfo;
  return D.17905;
}


_mono_debug_lookup_method (struct MonoMethod * method)
{
  struct GHashTable * mono_debug_handles.32;
  struct MonoDebugMethodInfo * D.17910;
  struct LookupMethodData data;

  try
    {
      data.minfo = 0B;
      data.method = method;
      mono_debug_handles.32 = mono_debug_handles;
      if (mono_debug_handles.32 == 0B) goto <D.17908>; else goto <D.17909>;
      <D.17908>:
      D.17910 = 0B;
      return D.17910;
      <D.17909>:
      mono_debug_handles.32 = mono_debug_handles;
      monoeg_g_hash_table_foreach (mono_debug_handles.32, lookup_method_func, &data);
      D.17910 = data.minfo;
      return D.17910;
    }
  finally
    {
      data = {CLOBBER};
    }
}


lookup_method_func (void * key, void * value, void * user_data)
{
  struct MonoDebugMethodInfo * D.17913;
  struct MonoSymbolFile * D.17916;
  struct MonoMethod * D.17919;
  struct MonoDebugMethodInfo * D.17920;
  struct MonoDebugHandle * handle;
  struct LookupMethodData * data;

  handle = value;
  data = user_data;
  D.17913 = data->minfo;
  if (D.17913 != 0B) goto <D.17914>; else goto <D.17915>;
  <D.17914>:
  return;
  <D.17915>:
  D.17916 = handle->symfile;
  if (D.17916 != 0B) goto <D.17917>; else goto <D.17918>;
  <D.17917>:
  D.17919 = data->method;
  D.17920 = mono_debug_symfile_lookup_method (handle, D.17919);
  data->minfo = D.17920;
  <D.17918>:
}


mono_debug_add_method (struct MonoMethod * method, struct MonoDebugMethodJitInfo * jit, struct MonoDomain * domain)
{
  struct MonoClass * D.17922;
  struct MonoImage * D.17923;
  short unsigned int D.17927;
  unsigned int D.17928;
  unsigned int D.17929;
  short unsigned int D.17931;
  unsigned int D.17932;
  unsigned int D.17933;
  long unsigned int D.17935;
  long unsigned int D.17936;
  unsigned int D.17937;
  unsigned int D.17938;
  unsigned int D.17939;
  unsigned int D.17940;
  unsigned int D.17941;
  unsigned int D.17942;
  unsigned int D.17943;
  unsigned int D.17944;
  long unsigned int D.17947;
  unsigned int D.17949;
  guint8 * ptr.33;
  unsigned int D.17951;
  struct MonoDebugLineNumberEntry * D.17952;
  long unsigned int D.17953;
  long unsigned int D.17954;
  unsigned int D.17955;
  int D.17956;
  unsigned int D.17957;
  int D.17958;
  guint8 * ptr.34;
  guint8 * ptr.35;
  struct MonoDebugVarInfo * D.17961;
  _Bool D.17962;
  unsigned char D.17963;
  struct MonoDebugVarInfo * D.17966;
  long unsigned int D.17967;
  struct MonoDebugVarInfo * D.17968;
  struct MonoDebugVarInfo * D.17969;
  struct MonoDebugVarInfo * D.17970;
  guint8 * ptr.36;
  guint8 * ptr.37;
  struct MonoDebugVarInfo * D.17973;
  _Bool D.17974;
  unsigned char D.17975;
  struct MonoDebugVarInfo * D.17978;
  long int ptr.38;
  long int oldptr.39;
  long int D.17981;
  _Bool D.17982;
  long int D.17983;
  long int D.17984;
  long unsigned int D.17987;
  long unsigned int D.17990;
  uint32_t iftmp.40;
  int D.17996;
  unsigned int D.17997;
  uint32_t iftmp.41;
  const mono_byte * D.18002;
  unsigned int D.18003;
  guint8[0:] * D.18004;
  long unsigned int D.18005;
  struct MonoMethod * iftmp.42;
  long unsigned int D.18009;
  struct GHashTable * D.18013;
  <unnamed-unsigned:5> D.18018;
  unsigned int D.18019;
  char * D.18020;
  struct MonoDebugWrapperData * D.18022;
  struct GSList * D.18023;
  struct GSList * D.18024;
  struct GHashTable * D.18025;
  struct MonoDebugMethodAddress * D.18028;
  struct MonoMethod * declaring;
  struct MonoDebugDataTable * table;
  struct MonoDebugMethodHeader * header;
  struct MonoDebugMethodAddress * address;
  struct MonoDebugMethodInfo * minfo;
  struct MonoDebugHandle * handle;
  guint8 buffer[8192];
  guint8 * ptr;
  guint8 * oldptr;
  guint32 i;
  guint32 size;
  guint32 total_size;
  guint32 max_size;
  gboolean is_wrapper;

  try
    {
      is_wrapper = 0;
      mono_debugger_lock ();
      table = lookup_data_table (domain);
      D.17922 = method->klass;
      D.17923 = D.17922->image;
      handle = _mono_debug_get_image (D.17923);
      minfo = _mono_debug_lookup_method (method);
      if (minfo == 0B) goto <D.17924>; else goto <D.17926>;
      <D.17926>:
      D.17927 = method->iflags;
      D.17928 = (unsigned int) D.17927;
      D.17929 = D.17928 & 4099;
      if (D.17929 != 0) goto <D.17924>; else goto <D.17930>;
      <D.17930>:
      D.17931 = method->flags;
      D.17932 = (unsigned int) D.17931;
      D.17933 = D.17932 & 9216;
      if (D.17933 != 0) goto <D.17924>; else goto <D.17934>;
      <D.17934>:
      D.17935 = BIT_FIELD_REF <*method, 64, 256>;
      D.17936 = D.17935 & 124;
      if (D.17936 != 0) goto <D.17924>; else goto <D.17925>;
      <D.17924>:
      is_wrapper = 1;
      <D.17925>:
      D.17937 = jit->num_line_numbers;
      D.17938 = D.17937 * 10;
      D.17939 = jit->num_params;
      D.17940 = jit->num_locals;
      D.17941 = D.17939 + D.17940;
      D.17942 = D.17941 + 1;
      D.17943 = D.17942 * 33;
      D.17944 = D.17938 + D.17943;
      max_size = D.17944 + 26;
      if (max_size > 8192) goto <D.17945>; else goto <D.17946>;
      <D.17945>:
      D.17947 = (long unsigned int) max_size;
      oldptr = monoeg_malloc (D.17947);
      ptr = oldptr;
      goto <D.17948>;
      <D.17946>:
      oldptr = &buffer;
      ptr = oldptr;
      <D.17948>:
      D.17949 = jit->prologue_end;
      ptr.33 = ptr;
      write_leb128 (D.17949, ptr.33, &ptr);
      D.17951 = jit->epilogue_begin;
      ptr.33 = ptr;
      write_leb128 (D.17951, ptr.33, &ptr);
      D.17937 = jit->num_line_numbers;
      ptr.33 = ptr;
      write_leb128 (D.17937, ptr.33, &ptr);
      i = 0;
      goto <D.17479>;
      <D.17478>:
      {
        struct MonoDebugLineNumberEntry * lne;

        D.17952 = jit->line_numbers;
        D.17953 = (long unsigned int) i;
        D.17954 = D.17953 * 8;
        lne = D.17952 + D.17954;
        D.17955 = lne->il_offset;
        D.17956 = (int) D.17955;
        ptr.33 = ptr;
        write_sleb128 (D.17956, ptr.33, &ptr);
        D.17957 = lne->native_offset;
        D.17958 = (int) D.17957;
        ptr.33 = ptr;
        write_sleb128 (D.17958, ptr.33, &ptr);
      }
      i = i + 1;
      <D.17479>:
      D.17937 = jit->num_line_numbers;
      if (D.17937 > i) goto <D.17478>; else goto <D.17480>;
      <D.17480>:
      ptr.33 = ptr;
      ptr.34 = ptr.33;
      ptr.35 = ptr.34 + 1;
      ptr = ptr.35;
      D.17961 = jit->this_var;
      D.17962 = D.17961 != 0B;
      D.17963 = (unsigned char) D.17962;
      *ptr.34 = D.17963;
      D.17961 = jit->this_var;
      if (D.17961 != 0B) goto <D.17964>; else goto <D.17965>;
      <D.17964>:
      D.17961 = jit->this_var;
      ptr.33 = ptr;
      write_variable (D.17961, ptr.33, &ptr);
      <D.17965>:
      D.17939 = jit->num_params;
      ptr.33 = ptr;
      write_leb128 (D.17939, ptr.33, &ptr);
      i = 0;
      goto <D.17482>;
      <D.17481>:
      D.17966 = jit->params;
      D.17953 = (long unsigned int) i;
      D.17967 = D.17953 * 32;
      D.17968 = D.17966 + D.17967;
      ptr.33 = ptr;
      write_variable (D.17968, ptr.33, &ptr);
      i = i + 1;
      <D.17482>:
      D.17939 = jit->num_params;
      if (D.17939 > i) goto <D.17481>; else goto <D.17483>;
      <D.17483>:
      D.17940 = jit->num_locals;
      ptr.33 = ptr;
      write_leb128 (D.17940, ptr.33, &ptr);
      i = 0;
      goto <D.17485>;
      <D.17484>:
      D.17969 = jit->locals;
      D.17953 = (long unsigned int) i;
      D.17967 = D.17953 * 32;
      D.17970 = D.17969 + D.17967;
      ptr.33 = ptr;
      write_variable (D.17970, ptr.33, &ptr);
      i = i + 1;
      <D.17485>:
      D.17940 = jit->num_locals;
      if (D.17940 > i) goto <D.17484>; else goto <D.17486>;
      <D.17486>:
      ptr.33 = ptr;
      ptr.36 = ptr.33;
      ptr.37 = ptr.36 + 1;
      ptr = ptr.37;
      D.17973 = jit->gsharedvt_info_var;
      D.17974 = D.17973 != 0B;
      D.17975 = (unsigned char) D.17974;
      *ptr.36 = D.17975;
      D.17973 = jit->gsharedvt_info_var;
      if (D.17973 != 0B) goto <D.17976>; else goto <D.17977>;
      <D.17976>:
      D.17973 = jit->gsharedvt_info_var;
      ptr.33 = ptr;
      write_variable (D.17973, ptr.33, &ptr);
      D.17978 = jit->gsharedvt_locals_var;
      ptr.33 = ptr;
      write_variable (D.17978, ptr.33, &ptr);
      <D.17977>:
      ptr.33 = ptr;
      ptr.38 = (long int) ptr.33;
      oldptr.39 = (long int) oldptr;
      D.17981 = ptr.38 - oldptr.39;
      size = (guint32) D.17981;
      D.17982 = size >= max_size;
      D.17983 = (long int) D.17982;
      D.17984 = __builtin_expect (D.17983, 0);
      if (D.17984 != 0) goto <D.17985>; else goto <D.17986>;
      <D.17985>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 639, "size < max_size");
      <D.17986>:
      total_size = size + 64;
      D.17935 = BIT_FIELD_REF <*method, 64, 256>;
      D.17987 = D.17935 & 512;
      if (D.17987 != 0) goto <D.17988>; else goto <D.17989>;
      <D.17988>:
      D.17990 = (long unsigned int) total_size;
      address = monoeg_malloc0 (D.17990);
      goto <D.17991>;
      <D.17989>:
      address = allocate_data_item (table, 2, total_size);
      <D.17991>:
      address->header.size = total_size;
      if (handle != 0B) goto <D.17993>; else goto <D.17994>;
      <D.17993>:
      iftmp.40 = handle->index;
      goto <D.17995>;
      <D.17994>:
      iftmp.40 = 0;
      <D.17995>:
      address->header.symfile_id = iftmp.40;
      D.17996 = mono_domain_get_id (domain);
      D.17997 = (unsigned int) D.17996;
      address->header.domain_id = D.17997;
      if (is_wrapper == 0) goto <D.17999>; else goto <D.18000>;
      <D.17999>:
      iftmp.41 = minfo->index;
      goto <D.18001>;
      <D.18000>:
      iftmp.41 = 0;
      <D.18001>:
      address->header.method_id = iftmp.41;
      address->header.method = method;
      D.18002 = jit->code_start;
      address->code_start = D.18002;
      D.18003 = jit->code_size;
      address->code_size = D.18003;
      D.18004 = &address->data;
      D.18005 = (long unsigned int) size;
      memcpy (D.18004, oldptr, D.18005);
      if (max_size > 8192) goto <D.18006>; else goto <D.18007>;
      <D.18006>:
      monoeg_g_free (oldptr);
      <D.18007>:
      D.17935 = BIT_FIELD_REF <*method, 64, 256>;
      D.18009 = D.17935 & 4096;
      if (D.18009 != 0) goto <D.18010>; else goto <D.18011>;
      <D.18010>:
      iftmp.42 = MEM[(struct MonoMethodInflated *)method].declaring;
      goto <D.18012>;
      <D.18011>:
      iftmp.42 = method;
      <D.18012>:
      declaring = iftmp.42;
      D.18013 = table->method_hash;
      header = monoeg_g_hash_table_lookup (D.18013, declaring);
      if (header == 0B) goto <D.18014>; else goto <D.18015>;
      <D.18014>:
      header = &address->header;
      D.18013 = table->method_hash;
      monoeg_g_hash_table_insert_replace (D.18013, declaring, header, 0);
      if (is_wrapper != 0) goto <D.18016>; else goto <D.18017>;
      <D.18016>:
      {
        struct MonoDebugWrapperData * wrapper;

        wrapper = monoeg_malloc0 (24);
        header->wrapper_data = wrapper;
        D.18018 = method->wrapper_type;
        D.18019 = (unsigned int) D.18018;
        wrapper->wrapper_type = D.18019;
        D.18020 = mono_method_full_name (declaring, 1);
        wrapper->method_name = D.18020;
        wrapper->obsolete_cil_code = "";
      }
      <D.18017>:
      goto <D.18021>;
      <D.18015>:
      D.18022 = header->wrapper_data;
      address->header.wrapper_data = D.18022;
      D.18023 = header->address_list;
      D.18024 = monoeg_g_slist_prepend (D.18023, address);
      header->address_list = D.18024;
      <D.18021>:
      D.18025 = table->method_address_hash;
      monoeg_g_hash_table_insert_replace (D.18025, method, address, 0);
      D.17935 = BIT_FIELD_REF <*method, 64, 256>;
      D.17987 = D.17935 & 512;
      if (D.17987 == 0) goto <D.18026>; else goto <D.18027>;
      <D.18026>:
      write_data_item (table, address);
      <D.18027>:
      mono_debugger_unlock ();
      D.18028 = address;
      return D.18028;
    }
  finally
    {
      buffer = {CLOBBER};
      ptr = {CLOBBER};
    }
}


lookup_data_table (struct MonoDomain * domain)
{
  struct GHashTable * data_table_hash.43;
  _Bool D.18034;
  long int D.18035;
  long int D.18036;
  struct MonoDebugDataTable * D.18039;
  struct MonoDebugDataTable * table;

  data_table_hash.43 = data_table_hash;
  table = monoeg_g_hash_table_lookup (data_table_hash.43, domain);
  if (table == 0B) goto <D.18032>; else goto <D.18033>;
  <D.18032>:
  monoeg_g_log (0B, 4, "lookup_data_table () failed for %p\n", domain);
  <D.17357>:
  goto <D.17357>;
  D.18034 = table == 0B;
  D.18035 = (long int) D.18034;
  D.18036 = __builtin_expect (D.18035, 0);
  if (D.18036 != 0) goto <D.18037>; else goto <D.18038>;
  <D.18037>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 201, "table");
  <D.18038>:
  <D.18033>:
  D.18039 = table;
  return D.18039;
}


write_sleb128 (gint32 value, guint8 * ptr, guint8 * * rptr)
{
  unsigned char D.18041;
  int D.18047;
  int D.18048;
  guint8 * ptr.44;
  gboolean more;

  more = 1;
  goto <D.17451>;
  <D.17450>:
  {
    guint8 byte;

    D.18041 = (unsigned char) value;
    byte = D.18041 & 127;
    value = value >> 7;
    if (value == 0) goto <D.18046>; else goto <D.18042>;
    <D.18046>:
    D.18047 = (int) byte;
    D.18048 = D.18047 & 64;
    if (D.18048 == 0) goto <D.18043>; else goto <D.18042>;
    <D.18042>:
    if (value == -1) goto <D.18049>; else goto <D.18044>;
    <D.18049>:
    D.18047 = (int) byte;
    D.18048 = D.18047 & 64;
    if (D.18048 != 0) goto <D.18043>; else goto <D.18044>;
    <D.18043>:
    more = 0;
    goto <D.18045>;
    <D.18044>:
    byte = byte | 128;
    <D.18045>:
    ptr.44 = ptr;
    ptr = ptr.44 + 1;
    *ptr.44 = byte;
  }
  <D.17451>:
  if (more != 0) goto <D.17450>; else goto <D.17452>;
  <D.17452>:
  *rptr = ptr;
}


write_variable (struct MonoDebugVarInfo * var, guint8 * ptr, guint8 * * rptr)
{
  unsigned int D.18051;
  guint8 * ptr.45;
  unsigned int D.18053;
  int D.18054;
  unsigned int D.18055;
  unsigned int D.18056;
  unsigned int D.18057;
  struct MonoType * D.18058;
  guint8 * ptr.46;

  D.18051 = var->index;
  ptr.45 = ptr;
  write_leb128 (D.18051, ptr.45, &ptr);
  D.18053 = var->offset;
  D.18054 = (int) D.18053;
  ptr.45 = ptr;
  write_sleb128 (D.18054, ptr.45, &ptr);
  D.18055 = var->size;
  ptr.45 = ptr;
  write_leb128 (D.18055, ptr.45, &ptr);
  D.18056 = var->begin_scope;
  ptr.45 = ptr;
  write_leb128 (D.18056, ptr.45, &ptr);
  D.18057 = var->end_scope;
  ptr.45 = ptr;
  write_leb128 (D.18057, ptr.45, &ptr);
  ptr.45 = ptr;
  D.18058 = var->type;
  MEM[(void * *)ptr.45] = D.18058;
  ptr.45 = ptr;
  ptr.46 = ptr.45 + 8;
  ptr = ptr.46;
  ptr.45 = ptr;
  *rptr = ptr.45;
}


mono_debug_remove_method (struct MonoMethod * method, struct MonoDomain * domain)
{
  int mono_debug_initialized.47;
  long unsigned int D.18063;
  long unsigned int D.18064;
  _Bool D.18065;
  long int D.18066;
  long int D.18067;
  struct MonoMethod * iftmp.48;
  long unsigned int D.18071;
  struct GHashTable * D.18075;
  struct GHashTable * D.18076;
  struct MonoDebugWrapperData * D.18079;
  const gchar * D.18082;
  struct MonoMethod * declaring;
  struct MonoDebugDataTable * table;
  struct MonoDebugMethodHeader * header;
  struct MonoDebugMethodAddress * address;

  mono_debug_initialized.47 = mono_debug_initialized;
  if (mono_debug_initialized.47 == 0) goto <D.18061>; else goto <D.18062>;
  <D.18061>:
  return;
  <D.18062>:
  D.18063 = BIT_FIELD_REF <*method, 64, 256>;
  D.18064 = D.18063 & 512;
  D.18065 = D.18064 == 0;
  D.18066 = (long int) D.18065;
  D.18067 = __builtin_expect (D.18066, 0);
  if (D.18067 != 0) goto <D.18068>; else goto <D.18069>;
  <D.18068>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 703, "method->dynamic");
  <D.18069>:
  mono_debugger_lock ();
  table = lookup_data_table (domain);
  D.18063 = BIT_FIELD_REF <*method, 64, 256>;
  D.18071 = D.18063 & 4096;
  if (D.18071 != 0) goto <D.18072>; else goto <D.18073>;
  <D.18072>:
  iftmp.48 = MEM[(struct MonoMethodInflated *)method].declaring;
  goto <D.18074>;
  <D.18073>:
  iftmp.48 = method;
  <D.18074>:
  declaring = iftmp.48;
  D.18075 = table->method_hash;
  monoeg_g_hash_table_remove (D.18075, declaring);
  D.18076 = table->method_address_hash;
  address = monoeg_g_hash_table_lookup (D.18076, method);
  if (address != 0B) goto <D.18077>; else goto <D.18078>;
  <D.18077>:
  header = &address->header;
  D.18079 = header->wrapper_data;
  if (D.18079 != 0B) goto <D.18080>; else goto <D.18081>;
  <D.18080>:
  D.18079 = header->wrapper_data;
  D.18082 = D.18079->method_name;
  monoeg_g_free (D.18082);
  D.18079 = header->wrapper_data;
  monoeg_g_free (D.18079);
  <D.18081>:
  monoeg_g_free (address);
  <D.18078>:
  D.18076 = table->method_address_hash;
  monoeg_g_hash_table_remove (D.18076, method);
  mono_debugger_unlock ();
}


mono_debug_add_delegate_trampoline (void * code, int size)
{
  int mono_debug_initialized.49;
  struct MonoSymbolTable * mono_symbol_table.50;
  struct MonoDebugDataTable * D.18088;
  unsigned int size.51;
  struct MonoDebugDelegateTrampolineEntry * entry;

  mono_debug_initialized.49 = mono_debug_initialized;
  if (mono_debug_initialized.49 == 0) goto <D.18085>; else goto <D.18086>;
  <D.18085>:
  return;
  <D.18086>:
  mono_debugger_lock ();
  mono_symbol_table.50 = mono_symbol_table;
  D.18088 = mono_symbol_table.50->global_data_table;
  entry = allocate_data_item (D.18088, 3, 16);
  entry->code = code;
  size.51 = (unsigned int) size;
  entry->size = size.51;
  mono_symbol_table.50 = mono_symbol_table;
  D.18088 = mono_symbol_table.50->global_data_table;
  write_data_item (D.18088, entry);
  mono_debugger_unlock ();
}


mono_debug_free_method_jit_info (struct MonoDebugMethodJitInfo * jit)
{
  struct MonoDebugLineNumberEntry * D.18093;
  struct MonoDebugVarInfo * D.18094;
  struct MonoDebugVarInfo * D.18095;
  struct MonoDebugVarInfo * D.18096;
  struct MonoDebugVarInfo * D.18097;
  struct MonoDebugVarInfo * D.18098;

  if (jit == 0B) goto <D.18091>; else goto <D.18092>;
  <D.18091>:
  return;
  <D.18092>:
  D.18093 = jit->line_numbers;
  monoeg_g_free (D.18093);
  D.18094 = jit->this_var;
  monoeg_g_free (D.18094);
  D.18095 = jit->params;
  monoeg_g_free (D.18095);
  D.18096 = jit->locals;
  monoeg_g_free (D.18096);
  D.18097 = jit->gsharedvt_info_var;
  monoeg_g_free (D.18097);
  D.18098 = jit->gsharedvt_locals_var;
  monoeg_g_free (D.18098);
  monoeg_g_free (jit);
}


mono_debug_find_method (struct MonoMethod * method, struct MonoDomain * domain)
{
  <unnamed type> mono_debug_format.52;
  struct MonoDebugMethodJitInfo * D.18103;
  struct MonoDebugMethodJitInfo * res;

  mono_debug_format.52 = mono_debug_format;
  if (mono_debug_format.52 == 0) goto <D.18101>; else goto <D.18102>;
  <D.18101>:
  D.18103 = 0B;
  return D.18103;
  <D.18102>:
  mono_debugger_lock ();
  res = find_method (method, domain);
  mono_debugger_unlock ();
  D.18103 = res;
  return D.18103;
}


find_method (struct MonoMethod * method, struct MonoDomain * domain)
{
  struct GHashTable * D.18105;
  struct MonoDebugMethodJitInfo * D.18108;
  struct MonoDebugDataTable * table;
  struct MonoDebugMethodAddress * address;

  table = lookup_data_table (domain);
  D.18105 = table->method_address_hash;
  address = monoeg_g_hash_table_lookup (D.18105, method);
  if (address == 0B) goto <D.18106>; else goto <D.18107>;
  <D.18106>:
  D.18108 = 0B;
  return D.18108;
  <D.18107>:
  D.18108 = mono_debug_read_method (address);
  return D.18108;
}


mono_debug_read_method (struct MonoDebugMethodAddress * address)
{
  const guint8 * D.18110;
  unsigned int D.18111;
  const guint8 * D.18112;
  guint8[0:] * ptr.53;
  guint8 * ptr.54;
  unsigned int D.18115;
  unsigned int D.18116;
  unsigned int D.18117;
  unsigned int D.18118;
  long unsigned int D.18119;
  long unsigned int D.18120;
  void * D.18121;
  struct MonoDebugLineNumberEntry * D.18122;
  long unsigned int D.18123;
  long unsigned int D.18124;
  int D.18125;
  unsigned int D.18126;
  int D.18127;
  unsigned int D.18128;
  guint8 * ptr.55;
  guint8 * ptr.56;
  unsigned char D.18131;
  void * D.18134;
  struct MonoDebugVarInfo * D.18135;
  unsigned int D.18136;
  unsigned int D.18137;
  long unsigned int D.18138;
  long unsigned int D.18139;
  void * D.18140;
  struct MonoDebugVarInfo * D.18141;
  long unsigned int D.18142;
  struct MonoDebugVarInfo * D.18143;
  unsigned int D.18144;
  unsigned int D.18145;
  long unsigned int D.18146;
  long unsigned int D.18147;
  void * D.18148;
  struct MonoDebugVarInfo * D.18149;
  struct MonoDebugVarInfo * D.18150;
  guint8 * ptr.57;
  guint8 * ptr.58;
  unsigned char D.18153;
  void * D.18156;
  void * D.18157;
  struct MonoDebugVarInfo * D.18158;
  struct MonoDebugVarInfo * D.18159;
  struct MonoDebugMethodJitInfo * D.18160;
  struct MonoDebugMethodJitInfo * jit;
  guint32 i;
  guint8 * ptr;

  try
    {
      jit = monoeg_malloc0 (104);
      D.18110 = address->code_start;
      jit->code_start = D.18110;
      D.18111 = address->code_size;
      jit->code_size = D.18111;
      D.18112 = address->wrapper_addr;
      jit->wrapper_addr = D.18112;
      ptr.53 = &address->data;
      ptr = ptr.53;
      ptr.54 = ptr;
      D.18115 = read_leb128 (ptr.54, &ptr);
      jit->prologue_end = D.18115;
      ptr.54 = ptr;
      D.18116 = read_leb128 (ptr.54, &ptr);
      jit->epilogue_begin = D.18116;
      ptr.54 = ptr;
      D.18117 = read_leb128 (ptr.54, &ptr);
      jit->num_line_numbers = D.18117;
      D.18118 = jit->num_line_numbers;
      D.18119 = (long unsigned int) D.18118;
      D.18120 = D.18119 * 8;
      D.18121 = monoeg_malloc0 (D.18120);
      jit->line_numbers = D.18121;
      i = 0;
      goto <D.17536>;
      <D.17535>:
      {
        struct MonoDebugLineNumberEntry * lne;

        D.18122 = jit->line_numbers;
        D.18123 = (long unsigned int) i;
        D.18124 = D.18123 * 8;
        lne = D.18122 + D.18124;
        ptr.54 = ptr;
        D.18125 = read_sleb128 (ptr.54, &ptr);
        D.18126 = (unsigned int) D.18125;
        lne->il_offset = D.18126;
        ptr.54 = ptr;
        D.18127 = read_sleb128 (ptr.54, &ptr);
        D.18128 = (unsigned int) D.18127;
        lne->native_offset = D.18128;
      }
      i = i + 1;
      <D.17536>:
      D.18118 = jit->num_line_numbers;
      if (D.18118 > i) goto <D.17535>; else goto <D.17537>;
      <D.17537>:
      ptr.54 = ptr;
      ptr.55 = ptr.54;
      ptr.56 = ptr.55 + 1;
      ptr = ptr.56;
      D.18131 = *ptr.55;
      if (D.18131 != 0) goto <D.18132>; else goto <D.18133>;
      <D.18132>:
      D.18134 = monoeg_malloc0 (32);
      jit->this_var = D.18134;
      D.18135 = jit->this_var;
      ptr.54 = ptr;
      read_variable (D.18135, ptr.54, &ptr);
      <D.18133>:
      ptr.54 = ptr;
      D.18136 = read_leb128 (ptr.54, &ptr);
      jit->num_params = D.18136;
      D.18137 = jit->num_params;
      D.18138 = (long unsigned int) D.18137;
      D.18139 = D.18138 * 32;
      D.18140 = monoeg_malloc0 (D.18139);
      jit->params = D.18140;
      i = 0;
      goto <D.17539>;
      <D.17538>:
      D.18141 = jit->params;
      D.18123 = (long unsigned int) i;
      D.18142 = D.18123 * 32;
      D.18143 = D.18141 + D.18142;
      ptr.54 = ptr;
      read_variable (D.18143, ptr.54, &ptr);
      i = i + 1;
      <D.17539>:
      D.18137 = jit->num_params;
      if (D.18137 > i) goto <D.17538>; else goto <D.17540>;
      <D.17540>:
      ptr.54 = ptr;
      D.18144 = read_leb128 (ptr.54, &ptr);
      jit->num_locals = D.18144;
      D.18145 = jit->num_locals;
      D.18146 = (long unsigned int) D.18145;
      D.18147 = D.18146 * 32;
      D.18148 = monoeg_malloc0 (D.18147);
      jit->locals = D.18148;
      i = 0;
      goto <D.17542>;
      <D.17541>:
      D.18149 = jit->locals;
      D.18123 = (long unsigned int) i;
      D.18142 = D.18123 * 32;
      D.18150 = D.18149 + D.18142;
      ptr.54 = ptr;
      read_variable (D.18150, ptr.54, &ptr);
      i = i + 1;
      <D.17542>:
      D.18145 = jit->num_locals;
      if (D.18145 > i) goto <D.17541>; else goto <D.17543>;
      <D.17543>:
      ptr.54 = ptr;
      ptr.57 = ptr.54;
      ptr.58 = ptr.57 + 1;
      ptr = ptr.58;
      D.18153 = *ptr.57;
      if (D.18153 != 0) goto <D.18154>; else goto <D.18155>;
      <D.18154>:
      D.18156 = monoeg_malloc0 (32);
      jit->gsharedvt_info_var = D.18156;
      D.18157 = monoeg_malloc0 (32);
      jit->gsharedvt_locals_var = D.18157;
      D.18158 = jit->gsharedvt_info_var;
      ptr.54 = ptr;
      read_variable (D.18158, ptr.54, &ptr);
      D.18159 = jit->gsharedvt_locals_var;
      ptr.54 = ptr;
      read_variable (D.18159, ptr.54, &ptr);
      <D.18155>:
      D.18160 = jit;
      return D.18160;
    }
  finally
    {
      ptr = {CLOBBER};
    }
}


read_sleb128 (guint8 * ptr, guint8 * * rptr)
{
  guint8 * ptr.59;
  int D.18164;
  int D.18165;
  int shift.60;
  int D.18167;
  signed char byte.61;
  int D.18173;
  int D.18176;
  int D.18177;
  gint32 D.18178;
  gint32 result;
  guint32 shift;

  result = 0;
  shift = 0;
  <D.17519>:
  {
    guint8 byte;

    ptr.59 = ptr;
    ptr = ptr.59 + 1;
    byte = *ptr.59;
    D.18164 = (int) byte;
    D.18165 = D.18164 & 127;
    shift.60 = (int) shift;
    D.18167 = D.18165 << shift.60;
    result = D.18167 | result;
    shift = shift + 7;
    byte.61 = (signed char) byte;
    if (byte.61 < 0) goto <D.18169>; else goto <D.18170>;
    <D.18169>:
    // predicted unlikely by continue predictor.
    goto <D.17517>;
    <D.18170>:
    if (shift <= 31) goto <D.18171>; else goto <D.18172>;
    <D.18171>:
    D.18164 = (int) byte;
    D.18173 = D.18164 & 64;
    if (D.18173 != 0) goto <D.18174>; else goto <D.18175>;
    <D.18174>:
    shift.60 = (int) shift;
    D.18176 = 1 << shift.60;
    D.18177 = -D.18176;
    result = D.18177 | result;
    <D.18175>:
    <D.18172>:
    goto <D.17518>;
  }
  <D.17517>:
  goto <D.17519>;
  <D.17518>:
  *rptr = ptr;
  D.18178 = result;
  return D.18178;
}


read_leb128 (guint8 * ptr, guint8 * * rptr)
{
  guint8 * ptr.62;
  int D.18181;
  int D.18182;
  int shift.63;
  int D.18184;
  unsigned int D.18185;
  signed char byte.64;
  guint32 D.18188;
  guint32 result;
  guint32 shift;

  result = 0;
  shift = 0;
  <D.17509>:
  {
    guint8 byte;

    ptr.62 = ptr;
    ptr = ptr.62 + 1;
    byte = *ptr.62;
    D.18181 = (int) byte;
    D.18182 = D.18181 & 127;
    shift.63 = (int) shift;
    D.18184 = D.18182 << shift.63;
    D.18185 = (unsigned int) D.18184;
    result = D.18185 | result;
    byte.64 = (signed char) byte;
    if (byte.64 >= 0) goto <D.17508>; else goto <D.18187>;
    <D.18187>:
    shift = shift + 7;
  }
  goto <D.17509>;
  <D.17508>:
  *rptr = ptr;
  D.18188 = result;
  return D.18188;
}


read_variable (struct MonoDebugVarInfo * var, guint8 * ptr, guint8 * * rptr)
{
  guint8 * ptr.65;
  unsigned int D.18191;
  int D.18192;
  unsigned int D.18193;
  unsigned int D.18194;
  unsigned int D.18195;
  unsigned int D.18196;
  void * D.18197;
  guint8 * ptr.66;

  ptr.65 = ptr;
  D.18191 = read_leb128 (ptr.65, &ptr);
  var->index = D.18191;
  ptr.65 = ptr;
  D.18192 = read_sleb128 (ptr.65, &ptr);
  D.18193 = (unsigned int) D.18192;
  var->offset = D.18193;
  ptr.65 = ptr;
  D.18194 = read_leb128 (ptr.65, &ptr);
  var->size = D.18194;
  ptr.65 = ptr;
  D.18195 = read_leb128 (ptr.65, &ptr);
  var->begin_scope = D.18195;
  ptr.65 = ptr;
  D.18196 = read_leb128 (ptr.65, &ptr);
  var->end_scope = D.18196;
  ptr.65 = ptr;
  D.18197 = MEM[(void * *)ptr.65];
  var->type = D.18197;
  ptr.65 = ptr;
  ptr.66 = ptr.65 + 8;
  ptr = ptr.66;
  ptr.65 = ptr;
  *rptr = ptr.65;
}


mono_debug_lookup_method_addresses (struct MonoMethod * method)
{
  int mono_debug_debugger_version.67;
  unsigned int mono_debug_debugger_version.68;
  unsigned int D.18201;
  _Bool D.18202;
  long int D.18203;
  long int D.18204;
  struct MonoMethod * iftmp.69;
  long unsigned int D.18208;
  long unsigned int D.18209;
  struct GHashTable * data_table_hash.70;
  struct MonoDebugMethodAddressList * D.18216;
  struct GSList * D.18217;
  unsigned int D.18218;
  unsigned int D.18219;
  long unsigned int D.18220;
  long unsigned int D.18221;
  unsigned int D.18222;
  unsigned int D.18223;
  long unsigned int D.18224;
  unsigned int size.71;
  unsigned int count.72;
  void * D.18227;
  struct MonoDebugMethodAddressList * info;
  struct MonoDebugMethodHeader * header;
  struct LookupMethodAddressData data;
  struct MonoMethod * declaring;
  int count;
  int size;
  struct GSList * list;
  guint8 * ptr;

  try
    {
      header = 0B;
      mono_debug_debugger_version.67 = mono_debug_debugger_version;
      mono_debug_debugger_version.68 = (unsigned int) mono_debug_debugger_version.67;
      D.18201 = mono_debug_debugger_version.68 + 4294967292;
      D.18202 = D.18201 > 1;
      D.18203 = (long int) D.18202;
      D.18204 = __builtin_expect (D.18203, 0);
      if (D.18204 != 0) goto <D.18205>; else goto <D.18206>;
      <D.18205>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 984, "(mono_debug_debugger_version == 4) || (mono_debug_debugger_version == 5)");
      <D.18206>:
      mono_debugger_lock ();
      D.18208 = BIT_FIELD_REF <*method, 64, 256>;
      D.18209 = D.18208 & 4096;
      if (D.18209 != 0) goto <D.18210>; else goto <D.18211>;
      <D.18210>:
      iftmp.69 = MEM[(struct MonoMethodInflated *)method].declaring;
      goto <D.18212>;
      <D.18211>:
      iftmp.69 = method;
      <D.18212>:
      declaring = iftmp.69;
      data.method = declaring;
      data.result = 0B;
      data_table_hash.70 = data_table_hash;
      monoeg_g_hash_table_foreach (data_table_hash.70, lookup_method_address_func, &data);
      header = data.result;
      if (header == 0B) goto <D.18214>; else goto <D.18215>;
      <D.18214>:
      mono_debugger_unlock ();
      D.18216 = 0B;
      return D.18216;
      <D.18215>:
      D.18217 = header->address_list;
      D.18218 = monoeg_g_slist_length (D.18217);
      D.18219 = D.18218 + 1;
      count = (int) D.18219;
      D.18220 = (long unsigned int) count;
      D.18221 = D.18220 + 1;
      D.18222 = (unsigned int) D.18221;
      D.18223 = D.18222 * 8;
      size = (int) D.18223;
      D.18224 = (long unsigned int) size;
      info = monoeg_malloc0 (D.18224);
      size.71 = (unsigned int) size;
      info->size = size.71;
      count.72 = (unsigned int) count;
      info->count = count.72;
      ptr = &info->data;
      MEM[(void * *)ptr] = header;
      ptr = ptr + 8;
      list = header->address_list;
      goto <D.17590>;
      <D.17589>:
      D.18227 = list->data;
      MEM[(void * *)ptr] = D.18227;
      ptr = ptr + 8;
      list = list->next;
      <D.17590>:
      if (list != 0B) goto <D.17589>; else goto <D.17591>;
      <D.17591>:
      mono_debugger_unlock ();
      D.18216 = info;
      return D.18216;
    }
  finally
    {
      data = {CLOBBER};
    }
}


lookup_method_address_func (void * key, void * value, void * user_data)
{
  struct GHashTable * D.18230;
  struct MonoMethod * D.18231;
  struct MonoDebugDataTable * table;
  struct LookupMethodAddressData * data;
  struct MonoDebugMethodHeader * header;

  table = value;
  data = user_data;
  D.18230 = table->method_hash;
  D.18231 = data->method;
  header = monoeg_g_hash_table_lookup (D.18230, D.18231);
  if (header != 0B) goto <D.18232>; else goto <D.18233>;
  <D.18232>:
  data->result = header;
  <D.18233>:
}


mono_debug_il_offset_from_address (struct MonoMethod * method, struct MonoDomain * domain, guint32 native_offset)
{
  int32_t D.18234;
  gint32 res;

  mono_debugger_lock ();
  res = il_offset_from_address (method, domain, native_offset);
  mono_debugger_unlock ();
  D.18234 = res;
  return D.18234;
}


il_offset_from_address (struct MonoMethod * method, struct MonoDomain * domain, guint32 native_offset)
{
  struct MonoDebugLineNumberEntry * D.18237;
  unsigned int D.18239;
  unsigned int D.18240;
  long unsigned int D.18241;
  long unsigned int D.18242;
  struct MonoDebugLineNumberEntry * D.18243;
  unsigned int D.18244;
  gint32 D.18247;
  unsigned int D.18248;
  struct MonoDebugMethodJitInfo * jit;
  int i;
  void cleanup_and_fail = <<< error >>>;

  jit = find_method (method, domain);
  if (jit == 0B) goto cleanup_and_fail; else goto <D.18236>;
  <D.18236>:
  D.18237 = jit->line_numbers;
  if (D.18237 == 0B) goto cleanup_and_fail; else goto <D.18238>;
  <D.18238>:
  D.18239 = jit->num_line_numbers;
  D.18240 = D.18239 + 4294967295;
  i = (int) D.18240;
  goto <D.17602>;
  <D.17601>:
  {
    struct MonoDebugLineNumberEntry lne;

    try
      {
        D.18237 = jit->line_numbers;
        D.18241 = (long unsigned int) i;
        D.18242 = D.18241 * 8;
        D.18243 = D.18237 + D.18242;
        lne = *D.18243;
        D.18244 = lne.native_offset;
        if (D.18244 <= native_offset) goto <D.18245>; else goto <D.18246>;
        <D.18245>:
        mono_debug_free_method_jit_info (jit);
        D.18248 = lne.il_offset;
        D.18247 = (gint32) D.18248;
        return D.18247;
        <D.18246>:
      }
    finally
      {
        lne = {CLOBBER};
      }
  }
  i = i + -1;
  <D.17602>:
  if (i >= 0) goto <D.17601>; else goto <D.17603>;
  <D.17603>:
  cleanup_and_fail:
  mono_debug_free_method_jit_info (jit);
  D.18247 = -1;
  return D.18247;
}


mono_debug_lookup_source_location (struct MonoMethod * method, guint32 address, struct MonoDomain * domain)
{
  <unnamed type> mono_debug_format.73;
  struct MonoDebugSourceLocation * D.18255;
  struct MonoDebugHandle * D.18259;
  struct MonoSymbolFile * D.18261;
  int D.18263;
  unsigned int offset.74;
  struct MonoDebugMethodInfo * minfo;
  struct MonoDebugSourceLocation * location;
  gint32 offset;

  mono_debug_format.73 = mono_debug_format;
  if (mono_debug_format.73 == 0) goto <D.18253>; else goto <D.18254>;
  <D.18253>:
  D.18255 = 0B;
  return D.18255;
  <D.18254>:
  mono_debugger_lock ();
  minfo = _mono_debug_lookup_method (method);
  if (minfo == 0B) goto <D.18256>; else goto <D.18258>;
  <D.18258>:
  D.18259 = minfo->handle;
  if (D.18259 == 0B) goto <D.18256>; else goto <D.18260>;
  <D.18260>:
  D.18259 = minfo->handle;
  D.18261 = D.18259->symfile;
  if (D.18261 == 0B) goto <D.18256>; else goto <D.18262>;
  <D.18262>:
  D.18259 = minfo->handle;
  D.18261 = D.18259->symfile;
  D.18263 = mono_debug_symfile_is_loaded (D.18261);
  if (D.18263 == 0) goto <D.18256>; else goto <D.18257>;
  <D.18256>:
  mono_debugger_unlock ();
  D.18255 = 0B;
  return D.18255;
  <D.18257>:
  offset = il_offset_from_address (method, domain, address);
  if (offset < 0) goto <D.18264>; else goto <D.18265>;
  <D.18264>:
  mono_debugger_unlock ();
  D.18255 = 0B;
  return D.18255;
  <D.18265>:
  offset.74 = (unsigned int) offset;
  location = mono_debug_symfile_lookup_location (minfo, offset.74);
  mono_debugger_unlock ();
  D.18255 = location;
  return D.18255;
}


mono_debug_lookup_locals (struct MonoMethod * method)
{
  <unnamed type> mono_debug_format.75;
  struct MonoDebugLocalsInfo * D.18271;
  struct MonoDebugHandle * D.18275;
  struct MonoSymbolFile * D.18277;
  int D.18279;
  struct MonoDebugMethodInfo * minfo;
  struct MonoDebugLocalsInfo * res;

  mono_debug_format.75 = mono_debug_format;
  if (mono_debug_format.75 == 0) goto <D.18269>; else goto <D.18270>;
  <D.18269>:
  D.18271 = 0B;
  return D.18271;
  <D.18270>:
  mono_debugger_lock ();
  minfo = _mono_debug_lookup_method (method);
  if (minfo == 0B) goto <D.18272>; else goto <D.18274>;
  <D.18274>:
  D.18275 = minfo->handle;
  if (D.18275 == 0B) goto <D.18272>; else goto <D.18276>;
  <D.18276>:
  D.18275 = minfo->handle;
  D.18277 = D.18275->symfile;
  if (D.18277 == 0B) goto <D.18272>; else goto <D.18278>;
  <D.18278>:
  D.18275 = minfo->handle;
  D.18277 = D.18275->symfile;
  D.18279 = mono_debug_symfile_is_loaded (D.18277);
  if (D.18279 == 0) goto <D.18272>; else goto <D.18273>;
  <D.18272>:
  mono_debugger_unlock ();
  D.18271 = 0B;
  return D.18271;
  <D.18273>:
  res = mono_debug_symfile_lookup_locals (minfo);
  mono_debugger_unlock ();
  D.18271 = res;
  return D.18271;
}


mono_debug_free_source_location (struct MonoDebugSourceLocation * location)
{
  char * D.18283;

  if (location != 0B) goto <D.18281>; else goto <D.18282>;
  <D.18281>:
  D.18283 = location->source_file;
  monoeg_g_free (D.18283);
  monoeg_g_free (location);
  <D.18282>:
}


mono_debug_print_stack_frame (struct MonoMethod * method, guint32 native_offset, struct MonoDomain * domain)
{
  char D.18284;
  int mono_debug_initialized.76;
  char * D.18296;
  unsigned int D.18297;
  char * D.18298;
  unsigned int D.18299;
  struct MonoDebugSourceLocation * location;
  gchar * fname;
  gchar * ptr;
  gchar * res;
  int offset;

  fname = mono_method_full_name (method, 1);
  ptr = fname;
  goto <D.17637>;
  <D.17636>:
  D.18284 = *ptr;
  if (D.18284 == 58) goto <D.18285>; else goto <D.18286>;
  <D.18285>:
  *ptr = 46;
  <D.18286>:
  ptr = ptr + 1;
  <D.17637>:
  D.18284 = *ptr;
  if (D.18284 != 0) goto <D.17636>; else goto <D.17638>;
  <D.17638>:
  location = mono_debug_lookup_source_location (method, native_offset, domain);
  if (location == 0B) goto <D.18287>; else goto <D.18288>;
  <D.18287>:
  mono_debug_initialized.76 = mono_debug_initialized;
  if (mono_debug_initialized.76 != 0) goto <D.18290>; else goto <D.18291>;
  <D.18290>:
  mono_debugger_lock ();
  offset = il_offset_from_address (method, domain, native_offset);
  mono_debugger_unlock ();
  goto <D.18292>;
  <D.18291>:
  offset = -1;
  <D.18292>:
  if (offset < 0) goto <D.18293>; else goto <D.18294>;
  <D.18293>:
  res = monoeg_g_strdup_printf ("at %s <0x%05x>", fname, native_offset);
  goto <D.18295>;
  <D.18294>:
  res = monoeg_g_strdup_printf ("at %s <IL 0x%05x, 0x%05x>", fname, offset, native_offset);
  <D.18295>:
  monoeg_g_free (fname);
  D.18296 = res;
  return D.18296;
  <D.18288>:
  D.18297 = location->il_offset;
  D.18298 = location->source_file;
  D.18299 = location->row;
  res = monoeg_g_strdup_printf ("at %s [0x%05x] in %s:%d", fname, D.18297, D.18298, D.18299);
  monoeg_g_free (fname);
  mono_debug_free_source_location (location);
  D.18296 = res;
  return D.18296;
}


mono_debug_list_add (struct MonoDebugList * * list, const void * data)
{
  struct MonoDebugList * D.18301;
  struct MonoDebugList * element;
  struct MonoDebugList * * ptr;

  element = monoeg_malloc0 (16);
  element->data = data;
  ptr = list;
  goto <D.17646>;
  <D.17645>:
  D.18301 = *ptr;
  ptr = &D.18301->next;
  <D.17646>:
  D.18301 = *ptr;
  if (D.18301 != 0B) goto <D.17645>; else goto <D.17647>;
  <D.17647>:
  *ptr = element;
}


mono_debug_list_remove (struct MonoDebugList * * list, const void * data)
{
  struct MonoDebugList * D.18302;
  const void * D.18303;
  struct MonoDebugList * * ptr;
  struct MonoDebugList * next;

  ptr = list;
  goto <D.17657>;
  <D.17656>:
  D.18302 = *ptr;
  D.18303 = D.18302->data;
  if (D.18303 != data) goto <D.18304>; else goto <D.18305>;
  <D.18304>:
  // predicted unlikely by continue predictor.
  goto <D.17654>;
  <D.18305>:
  D.18302 = *ptr;
  next = D.18302->next;
  D.18302 = *ptr;
  monoeg_g_free (D.18302);
  *ptr = next;
  goto <D.17655>;
  <D.17654>:
  D.18302 = *ptr;
  ptr = &D.18302->next;
  <D.17657>:
  D.18302 = *ptr;
  if (D.18302 != 0B) goto <D.17656>; else goto <D.17655>;
  <D.17655>:
}


mono_set_is_debugger_attached (gboolean attached)
{
  is_attached = attached;
}


mono_is_debugger_attached ()
{
  mono_bool D.18306;

  D.18306 = is_attached;
  return D.18306;
}


mono_register_symfile_for_assembly (const char * assembly_name, const mono_byte * raw_contents, int size)
{
  struct BundledSymfile * bundled_symfiles.77;
  struct BundledSymfile * bsymfile;

  bsymfile = monoeg_malloc0 (32);
  bsymfile->aname = assembly_name;
  bsymfile->raw_contents = raw_contents;
  bsymfile->size = size;
  bundled_symfiles.77 = bundled_symfiles;
  bsymfile->next = bundled_symfiles.77;
  bundled_symfiles = bsymfile;
}


mono_debug_enabled ()
{
  mono_bool D.18309;
  <unnamed type> mono_debug_format.78;
  _Bool D.18311;

  mono_debug_format.78 = mono_debug_format;
  D.18311 = mono_debug_format.78 != 0;
  D.18309 = (mono_bool) D.18311;
  return D.18309;
}


