mono_debug_init (MonoDebugFormat format)
{
  int mono_debug_initialized.0;
  _Bool D.17170;
  long int D.17171;
  long int D.17172;
  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.17181;

  mono_debug_initialized.0 = mono_debug_initialized;
  D.17170 = mono_debug_initialized.0 != 0;
  D.17171 = (long int) D.17170;
  D.17172 = __builtin_expect (D.17171, 0);
  if (D.17172 != 0) goto <D.17173>; else goto <D.17174>;
  <D.17173>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 228, "!mono_debug_initialized");
  <D.17174>:
  if (format == 2) goto <D.17175>; else goto <D.17176>;
  <D.17175>:
  monoeg_g_log (0B, 4, "The mdb debugger is no longer supported.");
  <D.16834>:
  goto <D.16834>;
  <D.17176>:
  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.17181 = create_data_table (0B);
  mono_symbol_table.2->global_data_table = D.17181;
  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.17182>; else goto <D.17183>;
  <D.17182>:
  mono_debug_open_image (image, 0B, 0);
  <D.17183>:
  mono_debugger_unlock ();
}


open_symfile_from_bundle (struct MonoImage * image)
{
  int D.17160;
  const char * D.17184;
  const char * D.17185;
  struct MonoDebugHandle * D.17188;
  int D.17189;
  const mono_byte * D.17190;
  struct BundledSymfile * bsymfile;

  bsymfile = bundled_symfiles;
  goto <D.17163>;
  <D.17162>:
  {
    size_t __s1_len;
    size_t __s2_len;

    D.17184 = image->module_name;
    D.17185 = bsymfile->aname;
    D.17160 = __builtin_strcmp (D.17185, D.17184);
  }
  if (D.17160 != 0) goto <D.17186>; else goto <D.17187>;
  <D.17186>:
  // predicted unlikely by continue predictor.
  goto <D.17161>;
  <D.17187>:
  D.17189 = bsymfile->size;
  D.17190 = bsymfile->raw_contents;
  D.17188 = mono_debug_open_image (image, D.17190, D.17189);
  return D.17188;
  <D.17161>:
  bsymfile = bsymfile->next;
  <D.17163>:
  if (bsymfile != 0B) goto <D.17162>; else goto <D.17164>;
  <D.17164>:
  D.17188 = 0B;
  return D.17188;
}


mono_debug_open_image (struct MonoImage * image, const guint8 * raw_contents, int size)
{
  int D.17192;
  struct MonoDebugHandle * D.17195;
  int next_symbol_file_id.5;
  int next_symbol_file_id.6;
  unsigned int next_symbol_file_id.7;
  const char * D.17201;
  gchar * D.17202;
  struct MonoDebugDataTable * D.17203;
  struct MonoSymbolFile * D.17204;
  struct MonoSymbolTable * mono_symbol_table.8;
  struct MonoDebugList * * D.17206;
  struct GHashTable * mono_debug_handles.9;
  struct MonoDebugHandle * handle;

  D.17192 = mono_image_is_dynamic (image);
  if (D.17192 != 0) goto <D.17193>; else goto <D.17194>;
  <D.17193>:
  D.17195 = 0B;
  return D.17195;
  <D.17194>:
  mono_debugger_lock ();
  handle = _mono_debug_get_image (image);
  if (handle != 0B) goto <D.17196>; else goto <D.17197>;
  <D.17196>:
  mono_debugger_unlock ();
  D.17195 = handle;
  return D.17195;
  <D.17197>:
  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.17201 = mono_image_get_filename (image);
  D.17202 = monoeg_strdup (D.17201);
  handle->image_file = D.17202;
  D.17203 = create_data_table (0B);
  handle->type_table = D.17203;
  D.17204 = mono_debug_open_mono_symbols (handle, raw_contents, size, 0);
  handle->symfile = D.17204;
  mono_symbol_table.8 = mono_symbol_table;
  D.17206 = &mono_symbol_table.8->symbol_files;
  mono_debug_list_add (D.17206, 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.17195 = handle;
  return D.17195;
}


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

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


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

  if (str != 0B) goto <D.17212>; else goto <D.17213>;
  <D.17212>:
  D.17214 = __strdup (str);
  return D.17214;
  <D.17213>:
  D.17214 = 0B;
  return D.17214;
}


mono_debug_add_type (struct MonoClass * klass)
{
  struct MonoGenericClass * D.17218;
  unsigned char D.17220;
  unsigned char D.17222;
  struct MonoImage * D.17224;
  long unsigned int D.17229;
  unsigned char D.17231;
  unsigned char D.17232;
  guint8 * ptr.11;
  unsigned int D.17236;
  int D.17237;
  int D.17238;
  unsigned int D.17239;
  guint8 * ptr.12;
  long int ptr.13;
  long int oldptr.14;
  long int D.17243;
  _Bool D.17244;
  long int D.17245;
  long int D.17246;
  unsigned int D.17249;
  _Bool D.17250;
  long int D.17251;
  long int D.17252;
  struct MonoDebugDataTable * D.17255;
  long unsigned int D.17256;
  guint8[0:] * D.17257;
  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.17218 = klass->generic_class;
      if (D.17218 != 0B) goto <D.17216>; else goto <D.17219>;
      <D.17219>:
      D.17220 = klass->rank;
      if (D.17220 != 0) goto <D.17216>; else goto <D.17221>;
      <D.17221>:
      D.17222 = klass->byval_arg.type;
      if (D.17222 == 19) goto <D.17216>; else goto <D.17223>;
      <D.17223>:
      D.17222 = klass->byval_arg.type;
      if (D.17222 == 30) goto <D.17216>; else goto <D.17217>;
      <D.17216>:
      return;
      <D.17217>:
      mono_debugger_lock ();
      D.17224 = klass->image;
      handle = _mono_debug_get_image (D.17224);
      if (handle == 0B) goto <D.17225>; else goto <D.17226>;
      <D.17225>:
      mono_debugger_unlock ();
      return;
      <D.17226>:
      max_size = 20;
      if (max_size > 8192) goto <D.17227>; else goto <D.17228>;
      <D.17227>:
      D.17229 = (long unsigned int) max_size;
      oldptr = monoeg_malloc (D.17229);
      ptr = oldptr;
      goto <D.17230>;
      <D.17228>:
      oldptr = &buffer;
      ptr = oldptr;
      <D.17230>:
      D.17231 = BIT_FIELD_REF <*klass, 8, 256>;
      D.17232 = D.17231 & 8;
      if (D.17232 != 0) goto <D.17233>; else goto <D.17234>;
      <D.17233>:
      base_offset = -16;
      <D.17234>:
      ptr.11 = ptr;
      D.17236 = klass->type_token;
      write_leb128 (D.17236, ptr.11, &ptr);
      ptr.11 = ptr;
      D.17237 = klass->instance_size;
      D.17238 = D.17237 + base_offset;
      D.17239 = (unsigned int) D.17238;
      write_leb128 (D.17239, 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.17243 = ptr.13 - oldptr.14;
      size = (guint32) D.17243;
      D.17244 = size >= max_size;
      D.17245 = (long int) D.17244;
      D.17246 = __builtin_expect (D.17245, 0);
      if (D.17246 != 0) goto <D.17247>; else goto <D.17248>;
      <D.17247>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 906, "size < max_size");
      <D.17248>:
      total_size = size + 4;
      D.17249 = total_size + 9;
      D.17250 = D.17249 > 16359;
      D.17251 = (long int) D.17250;
      D.17252 = __builtin_expect (D.17251, 0);
      if (D.17252 != 0) goto <D.17253>; else goto <D.17254>;
      <D.17253>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 909, "total_size + 9 < DATA_TABLE_CHUNK_SIZE");
      <D.17254>:
      D.17255 = handle->type_table;
      entry = allocate_data_item (D.17255, 1, total_size);
      entry->size = total_size;
      D.17256 = (long unsigned int) size;
      D.17257 = &entry->data;
      memcpy (D.17257, oldptr, D.17256);
      D.17255 = handle->type_table;
      write_data_item (D.17255, entry);
      if (max_size > 8192) goto <D.17258>; else goto <D.17259>;
      <D.17258>:
      monoeg_g_free (oldptr);
      <D.17259>:
      mono_debugger_unlock ();
    }
  finally
    {
      buffer = {CLOBBER};
      ptr = {CLOBBER};
    }
}


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

  <D.16911>:
  {
    guint8 byte;

    D.17263 = (unsigned char) value;
    byte = D.17263 & 127;
    value = value >> 7;
    if (value != 0) goto <D.17264>; else goto <D.17265>;
    <D.17264>:
    byte = byte | 128;
    <D.17265>:
    ptr.15 = ptr;
    ptr = ptr.15 + 1;
    *ptr.15 = byte;
  }
  if (value != 0) goto <D.16911>; else goto <D.16912>;
  <D.16912>:
  *rptr = ptr;
}


allocate_data_item (struct MonoDebugDataTable * table, MonoDebugDataItemType type, guint32 size)
{
  unsigned int D.17267;
  unsigned int D.17268;
  struct MonoDebugDataChunk * D.17272;
  unsigned int D.17273;
  unsigned int D.17274;
  _Bool D.17275;
  long int D.17276;
  long int D.17277;
  unsigned int D.17280;
  unsigned int D.17281;
  unsigned int D.17282;
  long unsigned int D.17285;
  long unsigned int D.17286;
  guint8 * D.17287;
  guint32 chunk_size;
  guint8 * data;

  D.17267 = size + 7;
  size = D.17267 & 4294967288;
  D.17268 = size + 16;
  if (D.17268 <= 16359) goto <D.17269>; else goto <D.17270>;
  <D.17269>:
  chunk_size = 16360;
  goto <D.17271>;
  <D.17270>:
  chunk_size = size + 16;
  <D.17271>:
  D.17272 = table->current_chunk;
  D.17273 = D.17272->current_offset;
  D.17272 = table->current_chunk;
  D.17274 = D.17272->allocated_size;
  D.17275 = D.17273 != D.17274;
  D.17276 = (long int) D.17275;
  D.17277 = __builtin_expect (D.17276, 0);
  if (D.17277 != 0) goto <D.17278>; else goto <D.17279>;
  <D.17278>:
  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.17279>:
  D.17272 = table->current_chunk;
  D.17274 = D.17272->allocated_size;
  D.17280 = D.17274 + size;
  D.17281 = D.17280 + 8;
  D.17272 = table->current_chunk;
  D.17282 = D.17272->total_size;
  if (D.17281 >= D.17282) goto <D.17283>; else goto <D.17284>;
  <D.17283>:
  {
    struct MonoDebugDataChunk * new_chunk;

    D.17285 = (long unsigned int) chunk_size;
    D.17286 = D.17285 + 24;
    new_chunk = monoeg_malloc0 (D.17286);
    new_chunk->total_size = chunk_size;
    D.17272 = table->current_chunk;
    D.17272->next = new_chunk;
    table->current_chunk = new_chunk;
  }
  <D.17284>:
  D.17272 = table->current_chunk;
  D.17272 = table->current_chunk;
  D.17274 = D.17272->allocated_size;
  data = &D.17272->data[D.17274];
  D.17272 = table->current_chunk;
  D.17272 = table->current_chunk;
  D.17274 = D.17272->allocated_size;
  D.17280 = D.17274 + size;
  D.17281 = D.17280 + 8;
  D.17272->allocated_size = D.17281;
  MEM[(guint32 *)data] = size;
  data = data + 4;
  MEM[(guint32 *)data] = type;
  data = data + 4;
  D.17287 = data;
  return D.17287;
}


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

  D.17290 = __builtin_object_size (__dest, 0);
  D.17289 = __builtin___memcpy_chk (__dest, __src, __len, D.17290);
  return D.17289;
}


write_data_item (struct MonoDebugDataTable * table, const guint8 * data)
{
  unsigned int D.17292;
  unsigned int D.17293;
  unsigned int D.17294;
  unsigned int D.17295;
  _Bool D.17296;
  long int D.17297;
  long int D.17298;
  struct MonoDebugDataChunk * current_chunk;
  guint32 size;

  current_chunk = table->current_chunk;
  size = MEM[(guint32 *)data + -8B];
  D.17292 = current_chunk->current_offset;
  D.17293 = D.17292 + size;
  D.17294 = D.17293 + 8;
  D.17295 = current_chunk->allocated_size;
  D.17296 = D.17294 != D.17295;
  D.17297 = (long int) D.17296;
  D.17298 = __builtin_expect (D.17297, 0);
  if (D.17298 != 0) goto <D.17299>; else goto <D.17300>;
  <D.17299>:
  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.17300>:
  D.17295 = current_chunk->allocated_size;
  current_chunk->current_offset = D.17295;
}


free_data_table (struct MonoDebugDataTable * table)
{
  struct GHashTable * D.17301;
  struct GHashTable * D.17302;
  struct MonoDebugDataChunk * D.17303;
  struct MonoSymbolTable * mono_symbol_table.16;
  struct MonoDebugList * * D.17305;
  struct MonoDebugDataChunk * chunk;
  struct MonoDebugDataChunk * next_chunk;

  D.17301 = table->method_hash;
  monoeg_g_hash_table_foreach (D.17301, free_header_data, 0B);
  D.17301 = table->method_hash;
  monoeg_g_hash_table_destroy (D.17301);
  D.17302 = table->method_address_hash;
  monoeg_g_hash_table_destroy (D.17302);
  table->method_hash = 0B;
  table->method_address_hash = 0B;
  chunk = table->first_chunk;
  goto <D.16821>;
  <D.16820>:
  next_chunk = chunk->next;
  monoeg_g_free (chunk);
  chunk = next_chunk;
  <D.16821>:
  if (chunk != 0B) goto <D.16820>; else goto <D.16822>;
  <D.16822>:
  table->current_chunk = 0B;
  D.17303 = table->current_chunk;
  table->first_chunk = D.17303;
  mono_symbol_table.16 = mono_symbol_table;
  D.17305 = &mono_symbol_table.16->data_tables;
  mono_debug_list_remove (D.17305, table);
  monoeg_g_free (table);
}


free_header_data (void * key, void * value, void * user_data)
{
  struct MonoDebugWrapperData * D.17306;
  const gchar * D.17309;
  struct GSList * D.17310;
  struct MonoDebugMethodHeader * header;

  header = value;
  D.17306 = header->wrapper_data;
  if (D.17306 != 0B) goto <D.17307>; else goto <D.17308>;
  <D.17307>:
  D.17306 = header->wrapper_data;
  D.17309 = D.17306->method_name;
  monoeg_g_free (D.17309);
  D.17306 = header->wrapper_data;
  monoeg_g_free (D.17306);
  <D.17308>:
  D.17310 = header->address_list;
  monoeg_g_slist_free (D.17310);
}


free_debug_handle (struct MonoDebugHandle * handle)
{
  struct MonoSymbolFile * D.17311;
  struct MonoDebugDataTable * D.17314;
  struct MonoImage * D.17315;
  char * D.17316;

  D.17311 = handle->symfile;
  if (D.17311 != 0B) goto <D.17312>; else goto <D.17313>;
  <D.17312>:
  D.17311 = handle->symfile;
  mono_debug_close_mono_symbol_file (D.17311);
  <D.17313>:
  D.17314 = handle->type_table;
  free_data_table (D.17314);
  D.17315 = handle->image;
  mono_image_close (D.17315);
  D.17316 = handle->image_file;
  monoeg_g_free (D.17316);
  monoeg_g_free (handle);
}


create_data_table (struct MonoDomain * domain)
{
  int iftmp.17;
  struct GHashTable * D.17321;
  struct GHashTable * D.17322;
  struct MonoDebugDataChunk * D.17323;
  struct MonoSymbolTable * mono_symbol_table.18;
  struct MonoDebugList * * D.17327;
  struct GHashTable * data_table_hash.19;
  struct MonoDebugDataTable * D.17329;
  struct MonoDebugDataTable * table;
  struct MonoDebugDataChunk * chunk;

  table = monoeg_malloc0 (40);
  if (domain != 0B) goto <D.17318>; else goto <D.17319>;
  <D.17318>:
  iftmp.17 = mono_domain_get_id (domain);
  goto <D.17320>;
  <D.17319>:
  iftmp.17 = -1;
  <D.17320>:
  table->domain = iftmp.17;
  D.17321 = monoeg_g_hash_table_new (0B, 0B);
  table->method_address_hash = D.17321;
  D.17322 = monoeg_g_hash_table_new (0B, 0B);
  table->method_hash = D.17322;
  chunk = monoeg_malloc0 (16384);
  chunk->total_size = 16360;
  table->current_chunk = chunk;
  D.17323 = table->current_chunk;
  table->first_chunk = D.17323;
  if (domain != 0B) goto <D.17324>; else goto <D.17325>;
  <D.17324>:
  mono_symbol_table.18 = mono_symbol_table;
  D.17327 = &mono_symbol_table.18->data_tables;
  mono_debug_list_add (D.17327, table);
  data_table_hash.19 = data_table_hash;
  monoeg_g_hash_table_insert_replace (data_table_hash.19, domain, table, 0);
  <D.17325>:
  D.17329 = table;
  return D.17329;
}


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

  mono_debug_initialized.20 = mono_debug_initialized;
  if (mono_debug_initialized.20 == 0) goto <D.17332>; else goto <D.17333>;
  <D.17332>:
  return;
  <D.17333>:
  mono_symbol_table.21 = mono_symbol_table;
  D.17335 = mono_defaults.corlib;
  D.17336 = mono_debug_open_image (D.17335, 0B, 0);
  mono_symbol_table.21->corlib = D.17336;
}


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.17339>; else goto <D.17340>;
  <D.17339>:
  return;
  <D.17340>:
  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.17351;

  mono_debug_handles.23 = mono_debug_handles;
  if (mono_debug_handles.23 != 0B) goto <D.17343>; else goto <D.17344>;
  <D.17343>:
  mono_debug_handles.23 = mono_debug_handles;
  monoeg_g_hash_table_destroy (mono_debug_handles.23);
  <D.17344>:
  mono_debug_handles = 0B;
  data_table_hash.24 = data_table_hash;
  if (data_table_hash.24 != 0B) goto <D.17346>; else goto <D.17347>;
  <D.17346>:
  data_table_hash.24 = data_table_hash;
  monoeg_g_hash_table_destroy (data_table_hash.24);
  data_table_hash = 0B;
  <D.17347>:
  mono_symbol_table.25 = mono_symbol_table;
  if (mono_symbol_table.25 != 0B) goto <D.17349>; else goto <D.17350>;
  <D.17349>:
  mono_symbol_table.25 = mono_symbol_table;
  D.17351 = mono_symbol_table.25->global_data_table;
  if (D.17351 != 0B) goto <D.17352>; else goto <D.17353>;
  <D.17352>:
  mono_symbol_table.25 = mono_symbol_table;
  D.17351 = mono_symbol_table.25->global_data_table;
  free_data_table (D.17351);
  <D.17353>:
  mono_symbol_table.25 = mono_symbol_table;
  monoeg_g_free (mono_symbol_table.25);
  mono_symbol_table = 0B;
  <D.17350>:
}


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.17355>; else goto <D.17356>;
  <D.17355>:
  return;
  <D.17356>:
  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.17364;
  struct MonoDebugDataTable * table;

  mono_debug_initialized.27 = mono_debug_initialized;
  if (mono_debug_initialized.27 == 0) goto <D.17359>; else goto <D.17360>;
  <D.17359>:
  return;
  <D.17360>:
  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.17362>; else goto <D.17363>;
  <D.17362>:
  D.17364 = mono_domain_get_id (domain);
  monoeg_g_log (0B, 16, "mono-debug.c:337:: unloading unknown domain %p / %d", domain, D.17364);
  mono_debugger_unlock ();
  return;
  <D.17363>:
  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.17372;
  struct GHashTable * mono_debug_handles.31;
  struct MonoDebugHandle * handle;

  mono_debug_initialized.29 = mono_debug_initialized;
  if (mono_debug_initialized.29 == 0) goto <D.17367>; else goto <D.17368>;
  <D.17367>:
  return;
  <D.17368>:
  mono_debugger_lock ();
  handle = _mono_debug_get_image (image);
  if (handle == 0B) goto <D.17369>; else goto <D.17370>;
  <D.17369>:
  mono_debugger_unlock ();
  return;
  <D.17370>:
  mono_symbol_table.30 = mono_symbol_table;
  D.17372 = &mono_symbol_table.30->symbol_files;
  mono_debug_list_remove (D.17372, 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.17375;
  struct MonoDebugMethodInfo * minfo;

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


_mono_debug_lookup_method (struct MonoMethod * method)
{
  struct GHashTable * mono_debug_handles.32;
  struct MonoDebugMethodInfo * D.17380;
  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.17378>; else goto <D.17379>;
      <D.17378>:
      D.17380 = 0B;
      return D.17380;
      <D.17379>:
      mono_debug_handles.32 = mono_debug_handles;
      monoeg_g_hash_table_foreach (mono_debug_handles.32, lookup_method_func, &data);
      D.17380 = data.minfo;
      return D.17380;
    }
  finally
    {
      data = {CLOBBER};
    }
}


lookup_method_func (void * key, void * value, void * user_data)
{
  struct MonoDebugMethodInfo * D.17383;
  struct MonoSymbolFile * D.17386;
  struct MonoMethod * D.17389;
  struct MonoDebugMethodInfo * D.17390;
  struct MonoDebugHandle * handle;
  struct LookupMethodData * data;

  handle = value;
  data = user_data;
  D.17383 = data->minfo;
  if (D.17383 != 0B) goto <D.17384>; else goto <D.17385>;
  <D.17384>:
  return;
  <D.17385>:
  D.17386 = handle->symfile;
  if (D.17386 != 0B) goto <D.17387>; else goto <D.17388>;
  <D.17387>:
  D.17389 = data->method;
  D.17390 = mono_debug_symfile_lookup_method (handle, D.17389);
  data->minfo = D.17390;
  <D.17388>:
}


mono_debug_add_method (struct MonoMethod * method, struct MonoDebugMethodJitInfo * jit, struct MonoDomain * domain)
{
  struct MonoClass * D.17392;
  struct MonoImage * D.17393;
  short unsigned int D.17397;
  unsigned int D.17398;
  unsigned int D.17399;
  short unsigned int D.17401;
  unsigned int D.17402;
  unsigned int D.17403;
  unsigned char D.17405;
  unsigned char D.17406;
  unsigned int D.17407;
  unsigned int D.17408;
  unsigned int D.17409;
  unsigned int D.17410;
  unsigned int D.17411;
  unsigned int D.17412;
  unsigned int D.17413;
  unsigned int D.17414;
  long unsigned int D.17417;
  guint8 * ptr.33;
  unsigned int D.17420;
  unsigned int D.17421;
  struct MonoDebugLineNumberEntry * D.17422;
  long unsigned int D.17423;
  long unsigned int D.17424;
  unsigned int D.17425;
  int D.17426;
  unsigned int D.17427;
  int D.17428;
  guint8 * ptr.34;
  guint8 * ptr.35;
  struct MonoDebugVarInfo * D.17431;
  _Bool D.17432;
  unsigned char D.17433;
  struct MonoDebugVarInfo * D.17436;
  long unsigned int D.17437;
  struct MonoDebugVarInfo * D.17438;
  struct MonoDebugVarInfo * D.17439;
  struct MonoDebugVarInfo * D.17440;
  guint8 * ptr.36;
  guint8 * ptr.37;
  struct MonoDebugVarInfo * D.17443;
  _Bool D.17444;
  unsigned char D.17445;
  struct MonoDebugVarInfo * D.17448;
  long int ptr.38;
  long int oldptr.39;
  long int D.17451;
  _Bool D.17452;
  long int D.17453;
  long int D.17454;
  unsigned char D.17457;
  unsigned char D.17458;
  long unsigned int D.17461;
  uint32_t iftmp.40;
  int D.17467;
  unsigned int D.17468;
  uint32_t iftmp.41;
  const mono_byte * D.17473;
  unsigned int D.17474;
  long unsigned int D.17475;
  guint8[0:] * D.17476;
  struct MonoMethod * iftmp.42;
  unsigned char D.17480;
  struct GHashTable * D.17484;
  <unnamed-unsigned:5> D.17489;
  unsigned int D.17490;
  char * D.17491;
  struct MonoDebugWrapperData * D.17493;
  struct GSList * D.17494;
  struct GSList * D.17495;
  struct GHashTable * D.17496;
  struct MonoDebugMethodAddress * D.17499;
  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.17392 = method->klass;
      D.17393 = D.17392->image;
      handle = _mono_debug_get_image (D.17393);
      minfo = _mono_debug_lookup_method (method);
      if (minfo == 0B) goto <D.17394>; else goto <D.17396>;
      <D.17396>:
      D.17397 = method->iflags;
      D.17398 = (unsigned int) D.17397;
      D.17399 = D.17398 & 4099;
      if (D.17399 != 0) goto <D.17394>; else goto <D.17400>;
      <D.17400>:
      D.17401 = method->flags;
      D.17402 = (unsigned int) D.17401;
      D.17403 = D.17402 & 9216;
      if (D.17403 != 0) goto <D.17394>; else goto <D.17404>;
      <D.17404>:
      D.17405 = BIT_FIELD_REF <*method, 8, 256>;
      D.17406 = D.17405 & 124;
      if (D.17406 != 0) goto <D.17394>; else goto <D.17395>;
      <D.17394>:
      is_wrapper = 1;
      <D.17395>:
      D.17407 = jit->num_line_numbers;
      D.17408 = D.17407 * 10;
      D.17409 = jit->num_params;
      D.17410 = jit->num_locals;
      D.17411 = D.17409 + D.17410;
      D.17412 = D.17411 + 1;
      D.17413 = D.17412 * 33;
      D.17414 = D.17408 + D.17413;
      max_size = D.17414 + 26;
      if (max_size > 8192) goto <D.17415>; else goto <D.17416>;
      <D.17415>:
      D.17417 = (long unsigned int) max_size;
      oldptr = monoeg_malloc (D.17417);
      ptr = oldptr;
      goto <D.17418>;
      <D.17416>:
      oldptr = &buffer;
      ptr = oldptr;
      <D.17418>:
      ptr.33 = ptr;
      D.17420 = jit->prologue_end;
      write_leb128 (D.17420, ptr.33, &ptr);
      ptr.33 = ptr;
      D.17421 = jit->epilogue_begin;
      write_leb128 (D.17421, ptr.33, &ptr);
      ptr.33 = ptr;
      D.17407 = jit->num_line_numbers;
      write_leb128 (D.17407, ptr.33, &ptr);
      i = 0;
      goto <D.16949>;
      <D.16948>:
      {
        struct MonoDebugLineNumberEntry * lne;

        D.17422 = jit->line_numbers;
        D.17423 = (long unsigned int) i;
        D.17424 = D.17423 * 8;
        lne = D.17422 + D.17424;
        ptr.33 = ptr;
        D.17425 = lne->il_offset;
        D.17426 = (int) D.17425;
        write_sleb128 (D.17426, ptr.33, &ptr);
        ptr.33 = ptr;
        D.17427 = lne->native_offset;
        D.17428 = (int) D.17427;
        write_sleb128 (D.17428, ptr.33, &ptr);
      }
      i = i + 1;
      <D.16949>:
      D.17407 = jit->num_line_numbers;
      if (D.17407 > i) goto <D.16948>; else goto <D.16950>;
      <D.16950>:
      ptr.33 = ptr;
      ptr.34 = ptr.33;
      ptr.35 = ptr.34 + 1;
      ptr = ptr.35;
      D.17431 = jit->this_var;
      D.17432 = D.17431 != 0B;
      D.17433 = (unsigned char) D.17432;
      *ptr.34 = D.17433;
      D.17431 = jit->this_var;
      if (D.17431 != 0B) goto <D.17434>; else goto <D.17435>;
      <D.17434>:
      ptr.33 = ptr;
      D.17431 = jit->this_var;
      write_variable (D.17431, ptr.33, &ptr);
      <D.17435>:
      ptr.33 = ptr;
      D.17409 = jit->num_params;
      write_leb128 (D.17409, ptr.33, &ptr);
      i = 0;
      goto <D.16952>;
      <D.16951>:
      ptr.33 = ptr;
      D.17436 = jit->params;
      D.17423 = (long unsigned int) i;
      D.17437 = D.17423 * 32;
      D.17438 = D.17436 + D.17437;
      write_variable (D.17438, ptr.33, &ptr);
      i = i + 1;
      <D.16952>:
      D.17409 = jit->num_params;
      if (D.17409 > i) goto <D.16951>; else goto <D.16953>;
      <D.16953>:
      ptr.33 = ptr;
      D.17410 = jit->num_locals;
      write_leb128 (D.17410, ptr.33, &ptr);
      i = 0;
      goto <D.16955>;
      <D.16954>:
      ptr.33 = ptr;
      D.17439 = jit->locals;
      D.17423 = (long unsigned int) i;
      D.17437 = D.17423 * 32;
      D.17440 = D.17439 + D.17437;
      write_variable (D.17440, ptr.33, &ptr);
      i = i + 1;
      <D.16955>:
      D.17410 = jit->num_locals;
      if (D.17410 > i) goto <D.16954>; else goto <D.16956>;
      <D.16956>:
      ptr.33 = ptr;
      ptr.36 = ptr.33;
      ptr.37 = ptr.36 + 1;
      ptr = ptr.37;
      D.17443 = jit->gsharedvt_info_var;
      D.17444 = D.17443 != 0B;
      D.17445 = (unsigned char) D.17444;
      *ptr.36 = D.17445;
      D.17443 = jit->gsharedvt_info_var;
      if (D.17443 != 0B) goto <D.17446>; else goto <D.17447>;
      <D.17446>:
      ptr.33 = ptr;
      D.17443 = jit->gsharedvt_info_var;
      write_variable (D.17443, ptr.33, &ptr);
      ptr.33 = ptr;
      D.17448 = jit->gsharedvt_locals_var;
      write_variable (D.17448, ptr.33, &ptr);
      <D.17447>:
      ptr.33 = ptr;
      ptr.38 = (long int) ptr.33;
      oldptr.39 = (long int) oldptr;
      D.17451 = ptr.38 - oldptr.39;
      size = (guint32) D.17451;
      D.17452 = size >= max_size;
      D.17453 = (long int) D.17452;
      D.17454 = __builtin_expect (D.17453, 0);
      if (D.17454 != 0) goto <D.17455>; else goto <D.17456>;
      <D.17455>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 639, "size < max_size");
      <D.17456>:
      total_size = size + 64;
      D.17457 = BIT_FIELD_REF <*method, 8, 264>;
      D.17458 = D.17457 & 2;
      if (D.17458 != 0) goto <D.17459>; else goto <D.17460>;
      <D.17459>:
      D.17461 = (long unsigned int) total_size;
      address = monoeg_malloc0 (D.17461);
      goto <D.17462>;
      <D.17460>:
      address = allocate_data_item (table, 2, total_size);
      <D.17462>:
      address->header.size = total_size;
      if (handle != 0B) goto <D.17464>; else goto <D.17465>;
      <D.17464>:
      iftmp.40 = handle->index;
      goto <D.17466>;
      <D.17465>:
      iftmp.40 = 0;
      <D.17466>:
      address->header.symfile_id = iftmp.40;
      D.17467 = mono_domain_get_id (domain);
      D.17468 = (unsigned int) D.17467;
      address->header.domain_id = D.17468;
      if (is_wrapper == 0) goto <D.17470>; else goto <D.17471>;
      <D.17470>:
      iftmp.41 = minfo->index;
      goto <D.17472>;
      <D.17471>:
      iftmp.41 = 0;
      <D.17472>:
      address->header.method_id = iftmp.41;
      address->header.method = method;
      D.17473 = jit->code_start;
      address->code_start = D.17473;
      D.17474 = jit->code_size;
      address->code_size = D.17474;
      D.17475 = (long unsigned int) size;
      D.17476 = &address->data;
      memcpy (D.17476, oldptr, D.17475);
      if (max_size > 8192) goto <D.17477>; else goto <D.17478>;
      <D.17477>:
      monoeg_g_free (oldptr);
      <D.17478>:
      D.17457 = BIT_FIELD_REF <*method, 8, 264>;
      D.17480 = D.17457 & 16;
      if (D.17480 != 0) goto <D.17481>; else goto <D.17482>;
      <D.17481>:
      iftmp.42 = MEM[(struct MonoMethodInflated *)method].declaring;
      goto <D.17483>;
      <D.17482>:
      iftmp.42 = method;
      <D.17483>:
      declaring = iftmp.42;
      D.17484 = table->method_hash;
      header = monoeg_g_hash_table_lookup (D.17484, declaring);
      if (header == 0B) goto <D.17485>; else goto <D.17486>;
      <D.17485>:
      header = &address->header;
      D.17484 = table->method_hash;
      monoeg_g_hash_table_insert_replace (D.17484, declaring, header, 0);
      if (is_wrapper != 0) goto <D.17487>; else goto <D.17488>;
      <D.17487>:
      {
        struct MonoDebugWrapperData * wrapper;

        wrapper = monoeg_malloc0 (24);
        header->wrapper_data = wrapper;
        D.17489 = method->wrapper_type;
        D.17490 = (unsigned int) D.17489;
        wrapper->wrapper_type = D.17490;
        D.17491 = mono_method_full_name (declaring, 1);
        wrapper->method_name = D.17491;
        wrapper->obsolete_cil_code = "";
      }
      <D.17488>:
      goto <D.17492>;
      <D.17486>:
      D.17493 = header->wrapper_data;
      address->header.wrapper_data = D.17493;
      D.17494 = header->address_list;
      D.17495 = monoeg_g_slist_prepend (D.17494, address);
      header->address_list = D.17495;
      <D.17492>:
      D.17496 = table->method_address_hash;
      monoeg_g_hash_table_insert_replace (D.17496, method, address, 0);
      D.17457 = BIT_FIELD_REF <*method, 8, 264>;
      D.17458 = D.17457 & 2;
      if (D.17458 == 0) goto <D.17497>; else goto <D.17498>;
      <D.17497>:
      write_data_item (table, address);
      <D.17498>:
      mono_debugger_unlock ();
      D.17499 = address;
      return D.17499;
    }
  finally
    {
      buffer = {CLOBBER};
      ptr = {CLOBBER};
    }
}


lookup_data_table (struct MonoDomain * domain)
{
  struct GHashTable * data_table_hash.43;
  _Bool D.17505;
  long int D.17506;
  long int D.17507;
  struct MonoDebugDataTable * D.17510;
  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.17503>; else goto <D.17504>;
  <D.17503>:
  monoeg_g_log (0B, 4, "lookup_data_table () failed for %p\n", domain);
  <D.16827>:
  goto <D.16827>;
  D.17505 = table == 0B;
  D.17506 = (long int) D.17505;
  D.17507 = __builtin_expect (D.17506, 0);
  if (D.17507 != 0) goto <D.17508>; else goto <D.17509>;
  <D.17508>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 201, "table");
  <D.17509>:
  <D.17504>:
  D.17510 = table;
  return D.17510;
}


write_sleb128 (gint32 value, guint8 * ptr, guint8 * * rptr)
{
  unsigned char D.17512;
  int D.17518;
  int D.17519;
  guint8 * ptr.44;
  gboolean more;

  more = 1;
  goto <D.16921>;
  <D.16920>:
  {
    guint8 byte;

    D.17512 = (unsigned char) value;
    byte = D.17512 & 127;
    value = value >> 7;
    if (value == 0) goto <D.17517>; else goto <D.17513>;
    <D.17517>:
    D.17518 = (int) byte;
    D.17519 = D.17518 & 64;
    if (D.17519 == 0) goto <D.17514>; else goto <D.17513>;
    <D.17513>:
    if (value == -1) goto <D.17520>; else goto <D.17515>;
    <D.17520>:
    D.17518 = (int) byte;
    D.17519 = D.17518 & 64;
    if (D.17519 != 0) goto <D.17514>; else goto <D.17515>;
    <D.17514>:
    more = 0;
    goto <D.17516>;
    <D.17515>:
    byte = byte | 128;
    <D.17516>:
    ptr.44 = ptr;
    ptr = ptr.44 + 1;
    *ptr.44 = byte;
  }
  <D.16921>:
  if (more != 0) goto <D.16920>; else goto <D.16922>;
  <D.16922>:
  *rptr = ptr;
}


write_variable (struct MonoDebugVarInfo * var, guint8 * ptr, guint8 * * rptr)
{
  guint8 * ptr.45;
  unsigned int D.17523;
  unsigned int D.17524;
  int D.17525;
  unsigned int D.17526;
  unsigned int D.17527;
  unsigned int D.17528;
  struct MonoType * D.17529;
  guint8 * ptr.46;

  ptr.45 = ptr;
  D.17523 = var->index;
  write_leb128 (D.17523, ptr.45, &ptr);
  ptr.45 = ptr;
  D.17524 = var->offset;
  D.17525 = (int) D.17524;
  write_sleb128 (D.17525, ptr.45, &ptr);
  ptr.45 = ptr;
  D.17526 = var->size;
  write_leb128 (D.17526, ptr.45, &ptr);
  ptr.45 = ptr;
  D.17527 = var->begin_scope;
  write_leb128 (D.17527, ptr.45, &ptr);
  ptr.45 = ptr;
  D.17528 = var->end_scope;
  write_leb128 (D.17528, ptr.45, &ptr);
  ptr.45 = ptr;
  D.17529 = var->type;
  MEM[(void * *)ptr.45] = D.17529;
  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;
  unsigned char D.17534;
  unsigned char D.17535;
  _Bool D.17536;
  long int D.17537;
  long int D.17538;
  struct MonoMethod * iftmp.48;
  unsigned char D.17542;
  struct GHashTable * D.17546;
  struct GHashTable * D.17547;
  struct MonoDebugWrapperData * D.17550;
  const gchar * D.17553;
  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.17532>; else goto <D.17533>;
  <D.17532>:
  return;
  <D.17533>:
  D.17534 = BIT_FIELD_REF <*method, 8, 264>;
  D.17535 = D.17534 & 2;
  D.17536 = D.17535 == 0;
  D.17537 = (long int) D.17536;
  D.17538 = __builtin_expect (D.17537, 0);
  if (D.17538 != 0) goto <D.17539>; else goto <D.17540>;
  <D.17539>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 703, "method->dynamic");
  <D.17540>:
  mono_debugger_lock ();
  table = lookup_data_table (domain);
  D.17534 = BIT_FIELD_REF <*method, 8, 264>;
  D.17542 = D.17534 & 16;
  if (D.17542 != 0) goto <D.17543>; else goto <D.17544>;
  <D.17543>:
  iftmp.48 = MEM[(struct MonoMethodInflated *)method].declaring;
  goto <D.17545>;
  <D.17544>:
  iftmp.48 = method;
  <D.17545>:
  declaring = iftmp.48;
  D.17546 = table->method_hash;
  monoeg_g_hash_table_remove (D.17546, declaring);
  D.17547 = table->method_address_hash;
  address = monoeg_g_hash_table_lookup (D.17547, method);
  if (address != 0B) goto <D.17548>; else goto <D.17549>;
  <D.17548>:
  header = &address->header;
  D.17550 = header->wrapper_data;
  if (D.17550 != 0B) goto <D.17551>; else goto <D.17552>;
  <D.17551>:
  D.17550 = header->wrapper_data;
  D.17553 = D.17550->method_name;
  monoeg_g_free (D.17553);
  D.17550 = header->wrapper_data;
  monoeg_g_free (D.17550);
  <D.17552>:
  monoeg_g_free (address);
  <D.17549>:
  D.17547 = table->method_address_hash;
  monoeg_g_hash_table_remove (D.17547, 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.17559;
  unsigned int size.51;
  struct MonoDebugDelegateTrampolineEntry * entry;

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


mono_debug_free_method_jit_info (struct MonoDebugMethodJitInfo * jit)
{
  struct MonoDebugLineNumberEntry * D.17564;
  struct MonoDebugVarInfo * D.17565;
  struct MonoDebugVarInfo * D.17566;
  struct MonoDebugVarInfo * D.17567;
  struct MonoDebugVarInfo * D.17568;
  struct MonoDebugVarInfo * D.17569;

  if (jit == 0B) goto <D.17562>; else goto <D.17563>;
  <D.17562>:
  return;
  <D.17563>:
  D.17564 = jit->line_numbers;
  monoeg_g_free (D.17564);
  D.17565 = jit->this_var;
  monoeg_g_free (D.17565);
  D.17566 = jit->params;
  monoeg_g_free (D.17566);
  D.17567 = jit->locals;
  monoeg_g_free (D.17567);
  D.17568 = jit->gsharedvt_info_var;
  monoeg_g_free (D.17568);
  D.17569 = jit->gsharedvt_locals_var;
  monoeg_g_free (D.17569);
  monoeg_g_free (jit);
}


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

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


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

  table = lookup_data_table (domain);
  D.17576 = table->method_address_hash;
  address = monoeg_g_hash_table_lookup (D.17576, method);
  if (address == 0B) goto <D.17577>; else goto <D.17578>;
  <D.17577>:
  D.17579 = 0B;
  return D.17579;
  <D.17578>:
  D.17579 = mono_debug_read_method (address);
  return D.17579;
}


mono_debug_read_method (struct MonoDebugMethodAddress * address)
{
  const guint8 * D.17581;
  unsigned int D.17582;
  const guint8 * D.17583;
  guint8[0:] * ptr.53;
  guint8 * ptr.54;
  unsigned int D.17586;
  unsigned int D.17587;
  unsigned int D.17588;
  unsigned int D.17589;
  long unsigned int D.17590;
  long unsigned int D.17591;
  void * D.17592;
  struct MonoDebugLineNumberEntry * D.17593;
  long unsigned int D.17594;
  long unsigned int D.17595;
  int D.17596;
  unsigned int D.17597;
  int D.17598;
  unsigned int D.17599;
  guint8 * ptr.55;
  guint8 * ptr.56;
  unsigned char D.17602;
  void * D.17605;
  struct MonoDebugVarInfo * D.17606;
  unsigned int D.17607;
  unsigned int D.17608;
  long unsigned int D.17609;
  long unsigned int D.17610;
  void * D.17611;
  struct MonoDebugVarInfo * D.17612;
  long unsigned int D.17613;
  struct MonoDebugVarInfo * D.17614;
  unsigned int D.17615;
  unsigned int D.17616;
  long unsigned int D.17617;
  long unsigned int D.17618;
  void * D.17619;
  struct MonoDebugVarInfo * D.17620;
  struct MonoDebugVarInfo * D.17621;
  guint8 * ptr.57;
  guint8 * ptr.58;
  unsigned char D.17624;
  void * D.17627;
  void * D.17628;
  struct MonoDebugVarInfo * D.17629;
  struct MonoDebugVarInfo * D.17630;
  struct MonoDebugMethodJitInfo * D.17631;
  struct MonoDebugMethodJitInfo * jit;
  guint32 i;
  guint8 * ptr;

  try
    {
      jit = monoeg_malloc0 (104);
      D.17581 = address->code_start;
      jit->code_start = D.17581;
      D.17582 = address->code_size;
      jit->code_size = D.17582;
      D.17583 = address->wrapper_addr;
      jit->wrapper_addr = D.17583;
      ptr.53 = &address->data;
      ptr = ptr.53;
      ptr.54 = ptr;
      D.17586 = read_leb128 (ptr.54, &ptr);
      jit->prologue_end = D.17586;
      ptr.54 = ptr;
      D.17587 = read_leb128 (ptr.54, &ptr);
      jit->epilogue_begin = D.17587;
      ptr.54 = ptr;
      D.17588 = read_leb128 (ptr.54, &ptr);
      jit->num_line_numbers = D.17588;
      D.17589 = jit->num_line_numbers;
      D.17590 = (long unsigned int) D.17589;
      D.17591 = D.17590 * 8;
      D.17592 = monoeg_malloc0 (D.17591);
      jit->line_numbers = D.17592;
      i = 0;
      goto <D.17006>;
      <D.17005>:
      {
        struct MonoDebugLineNumberEntry * lne;

        D.17593 = jit->line_numbers;
        D.17594 = (long unsigned int) i;
        D.17595 = D.17594 * 8;
        lne = D.17593 + D.17595;
        ptr.54 = ptr;
        D.17596 = read_sleb128 (ptr.54, &ptr);
        D.17597 = (unsigned int) D.17596;
        lne->il_offset = D.17597;
        ptr.54 = ptr;
        D.17598 = read_sleb128 (ptr.54, &ptr);
        D.17599 = (unsigned int) D.17598;
        lne->native_offset = D.17599;
      }
      i = i + 1;
      <D.17006>:
      D.17589 = jit->num_line_numbers;
      if (D.17589 > i) goto <D.17005>; else goto <D.17007>;
      <D.17007>:
      ptr.54 = ptr;
      ptr.55 = ptr.54;
      ptr.56 = ptr.55 + 1;
      ptr = ptr.56;
      D.17602 = *ptr.55;
      if (D.17602 != 0) goto <D.17603>; else goto <D.17604>;
      <D.17603>:
      D.17605 = monoeg_malloc0 (32);
      jit->this_var = D.17605;
      ptr.54 = ptr;
      D.17606 = jit->this_var;
      read_variable (D.17606, ptr.54, &ptr);
      <D.17604>:
      ptr.54 = ptr;
      D.17607 = read_leb128 (ptr.54, &ptr);
      jit->num_params = D.17607;
      D.17608 = jit->num_params;
      D.17609 = (long unsigned int) D.17608;
      D.17610 = D.17609 * 32;
      D.17611 = monoeg_malloc0 (D.17610);
      jit->params = D.17611;
      i = 0;
      goto <D.17009>;
      <D.17008>:
      ptr.54 = ptr;
      D.17612 = jit->params;
      D.17594 = (long unsigned int) i;
      D.17613 = D.17594 * 32;
      D.17614 = D.17612 + D.17613;
      read_variable (D.17614, ptr.54, &ptr);
      i = i + 1;
      <D.17009>:
      D.17608 = jit->num_params;
      if (D.17608 > i) goto <D.17008>; else goto <D.17010>;
      <D.17010>:
      ptr.54 = ptr;
      D.17615 = read_leb128 (ptr.54, &ptr);
      jit->num_locals = D.17615;
      D.17616 = jit->num_locals;
      D.17617 = (long unsigned int) D.17616;
      D.17618 = D.17617 * 32;
      D.17619 = monoeg_malloc0 (D.17618);
      jit->locals = D.17619;
      i = 0;
      goto <D.17012>;
      <D.17011>:
      ptr.54 = ptr;
      D.17620 = jit->locals;
      D.17594 = (long unsigned int) i;
      D.17613 = D.17594 * 32;
      D.17621 = D.17620 + D.17613;
      read_variable (D.17621, ptr.54, &ptr);
      i = i + 1;
      <D.17012>:
      D.17616 = jit->num_locals;
      if (D.17616 > i) goto <D.17011>; else goto <D.17013>;
      <D.17013>:
      ptr.54 = ptr;
      ptr.57 = ptr.54;
      ptr.58 = ptr.57 + 1;
      ptr = ptr.58;
      D.17624 = *ptr.57;
      if (D.17624 != 0) goto <D.17625>; else goto <D.17626>;
      <D.17625>:
      D.17627 = monoeg_malloc0 (32);
      jit->gsharedvt_info_var = D.17627;
      D.17628 = monoeg_malloc0 (32);
      jit->gsharedvt_locals_var = D.17628;
      ptr.54 = ptr;
      D.17629 = jit->gsharedvt_info_var;
      read_variable (D.17629, ptr.54, &ptr);
      ptr.54 = ptr;
      D.17630 = jit->gsharedvt_locals_var;
      read_variable (D.17630, ptr.54, &ptr);
      <D.17626>:
      D.17631 = jit;
      return D.17631;
    }
  finally
    {
      ptr = {CLOBBER};
    }
}


read_sleb128 (guint8 * ptr, guint8 * * rptr)
{
  guint8 * ptr.59;
  int D.17635;
  int D.17636;
  int shift.60;
  int D.17638;
  signed char byte.61;
  int D.17644;
  int D.17647;
  int D.17648;
  gint32 D.17649;
  gint32 result;
  guint32 shift;

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

    ptr.59 = ptr;
    ptr = ptr.59 + 1;
    byte = *ptr.59;
    D.17635 = (int) byte;
    D.17636 = D.17635 & 127;
    shift.60 = (int) shift;
    D.17638 = D.17636 << shift.60;
    result = D.17638 | result;
    shift = shift + 7;
    byte.61 = (signed char) byte;
    if (byte.61 < 0) goto <D.17640>; else goto <D.17641>;
    <D.17640>:
    // predicted unlikely by continue predictor.
    goto <D.16987>;
    <D.17641>:
    if (shift <= 31) goto <D.17642>; else goto <D.17643>;
    <D.17642>:
    D.17635 = (int) byte;
    D.17644 = D.17635 & 64;
    if (D.17644 != 0) goto <D.17645>; else goto <D.17646>;
    <D.17645>:
    shift.60 = (int) shift;
    D.17647 = 1 << shift.60;
    D.17648 = -D.17647;
    result = D.17648 | result;
    <D.17646>:
    <D.17643>:
    goto <D.16988>;
  }
  <D.16987>:
  goto <D.16989>;
  <D.16988>:
  *rptr = ptr;
  D.17649 = result;
  return D.17649;
}


read_leb128 (guint8 * ptr, guint8 * * rptr)
{
  guint8 * ptr.62;
  int D.17652;
  int D.17653;
  int shift.63;
  int D.17655;
  unsigned int D.17656;
  signed char byte.64;
  guint32 D.17659;
  guint32 result;
  guint32 shift;

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

    ptr.62 = ptr;
    ptr = ptr.62 + 1;
    byte = *ptr.62;
    D.17652 = (int) byte;
    D.17653 = D.17652 & 127;
    shift.63 = (int) shift;
    D.17655 = D.17653 << shift.63;
    D.17656 = (unsigned int) D.17655;
    result = D.17656 | result;
    byte.64 = (signed char) byte;
    if (byte.64 >= 0) goto <D.16978>; else goto <D.17658>;
    <D.17658>:
    shift = shift + 7;
  }
  goto <D.16979>;
  <D.16978>:
  *rptr = ptr;
  D.17659 = result;
  return D.17659;
}


read_variable (struct MonoDebugVarInfo * var, guint8 * ptr, guint8 * * rptr)
{
  guint8 * ptr.65;
  unsigned int D.17662;
  int D.17663;
  unsigned int D.17664;
  unsigned int D.17665;
  unsigned int D.17666;
  unsigned int D.17667;
  void * D.17668;
  guint8 * ptr.66;

  ptr.65 = ptr;
  D.17662 = read_leb128 (ptr.65, &ptr);
  var->index = D.17662;
  ptr.65 = ptr;
  D.17663 = read_sleb128 (ptr.65, &ptr);
  D.17664 = (unsigned int) D.17663;
  var->offset = D.17664;
  ptr.65 = ptr;
  D.17665 = read_leb128 (ptr.65, &ptr);
  var->size = D.17665;
  ptr.65 = ptr;
  D.17666 = read_leb128 (ptr.65, &ptr);
  var->begin_scope = D.17666;
  ptr.65 = ptr;
  D.17667 = read_leb128 (ptr.65, &ptr);
  var->end_scope = D.17667;
  ptr.65 = ptr;
  D.17668 = MEM[(void * *)ptr.65];
  var->type = D.17668;
  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.17672;
  _Bool D.17673;
  long int D.17674;
  long int D.17675;
  struct MonoMethod * iftmp.69;
  unsigned char D.17679;
  unsigned char D.17680;
  struct GHashTable * data_table_hash.70;
  struct MonoDebugMethodAddressList * D.17687;
  struct GSList * D.17688;
  unsigned int D.17689;
  unsigned int D.17690;
  long unsigned int D.17691;
  long unsigned int D.17692;
  unsigned int D.17693;
  unsigned int D.17694;
  long unsigned int D.17695;
  unsigned int size.71;
  unsigned int count.72;
  void * D.17698;
  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.17672 = mono_debug_debugger_version.68 + 4294967292;
      D.17673 = D.17672 > 1;
      D.17674 = (long int) D.17673;
      D.17675 = __builtin_expect (D.17674, 0);
      if (D.17675 != 0) goto <D.17676>; else goto <D.17677>;
      <D.17676>:
      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.17677>:
      mono_debugger_lock ();
      D.17679 = BIT_FIELD_REF <*method, 8, 264>;
      D.17680 = D.17679 & 16;
      if (D.17680 != 0) goto <D.17681>; else goto <D.17682>;
      <D.17681>:
      iftmp.69 = MEM[(struct MonoMethodInflated *)method].declaring;
      goto <D.17683>;
      <D.17682>:
      iftmp.69 = method;
      <D.17683>:
      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.17685>; else goto <D.17686>;
      <D.17685>:
      mono_debugger_unlock ();
      D.17687 = 0B;
      return D.17687;
      <D.17686>:
      D.17688 = header->address_list;
      D.17689 = monoeg_g_slist_length (D.17688);
      D.17690 = D.17689 + 1;
      count = (int) D.17690;
      D.17691 = (long unsigned int) count;
      D.17692 = D.17691 + 1;
      D.17693 = (unsigned int) D.17692;
      D.17694 = D.17693 * 8;
      size = (int) D.17694;
      D.17695 = (long unsigned int) size;
      info = monoeg_malloc0 (D.17695);
      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.17060>;
      <D.17059>:
      D.17698 = list->data;
      MEM[(void * *)ptr] = D.17698;
      ptr = ptr + 8;
      list = list->next;
      <D.17060>:
      if (list != 0B) goto <D.17059>; else goto <D.17061>;
      <D.17061>:
      mono_debugger_unlock ();
      D.17687 = info;
      return D.17687;
    }
  finally
    {
      data = {CLOBBER};
    }
}


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

  table = value;
  data = user_data;
  D.17701 = data->method;
  D.17702 = table->method_hash;
  header = monoeg_g_hash_table_lookup (D.17702, D.17701);
  if (header != 0B) goto <D.17703>; else goto <D.17704>;
  <D.17703>:
  data->result = header;
  <D.17704>:
}


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

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


il_offset_from_address (struct MonoMethod * method, struct MonoDomain * domain, guint32 native_offset)
{
  struct MonoDebugLineNumberEntry * D.17708;
  unsigned int D.17710;
  unsigned int D.17711;
  long unsigned int D.17712;
  long unsigned int D.17713;
  struct MonoDebugLineNumberEntry * D.17714;
  unsigned int D.17715;
  gint32 D.17718;
  unsigned int D.17719;
  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.17707>;
  <D.17707>:
  D.17708 = jit->line_numbers;
  if (D.17708 == 0B) goto cleanup_and_fail; else goto <D.17709>;
  <D.17709>:
  D.17710 = jit->num_line_numbers;
  D.17711 = D.17710 + 4294967295;
  i = (int) D.17711;
  goto <D.17072>;
  <D.17071>:
  {
    struct MonoDebugLineNumberEntry lne;

    try
      {
        D.17708 = jit->line_numbers;
        D.17712 = (long unsigned int) i;
        D.17713 = D.17712 * 8;
        D.17714 = D.17708 + D.17713;
        lne = *D.17714;
        D.17715 = lne.native_offset;
        if (D.17715 <= native_offset) goto <D.17716>; else goto <D.17717>;
        <D.17716>:
        mono_debug_free_method_jit_info (jit);
        D.17719 = lne.il_offset;
        D.17718 = (gint32) D.17719;
        return D.17718;
        <D.17717>:
      }
    finally
      {
        lne = {CLOBBER};
      }
  }
  i = i + -1;
  <D.17072>:
  if (i >= 0) goto <D.17071>; else goto <D.17073>;
  <D.17073>:
  cleanup_and_fail:
  mono_debug_free_method_jit_info (jit);
  D.17718 = -1;
  return D.17718;
}


mono_debug_lookup_source_location (struct MonoMethod * method, guint32 address, struct MonoDomain * domain)
{
  <unnamed type> mono_debug_format.73;
  struct MonoDebugSourceLocation * D.17726;
  struct MonoDebugHandle * D.17730;
  struct MonoSymbolFile * D.17732;
  int D.17734;
  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.17724>; else goto <D.17725>;
  <D.17724>:
  D.17726 = 0B;
  return D.17726;
  <D.17725>:
  mono_debugger_lock ();
  minfo = _mono_debug_lookup_method (method);
  if (minfo == 0B) goto <D.17727>; else goto <D.17729>;
  <D.17729>:
  D.17730 = minfo->handle;
  if (D.17730 == 0B) goto <D.17727>; else goto <D.17731>;
  <D.17731>:
  D.17730 = minfo->handle;
  D.17732 = D.17730->symfile;
  if (D.17732 == 0B) goto <D.17727>; else goto <D.17733>;
  <D.17733>:
  D.17730 = minfo->handle;
  D.17732 = D.17730->symfile;
  D.17734 = mono_debug_symfile_is_loaded (D.17732);
  if (D.17734 == 0) goto <D.17727>; else goto <D.17728>;
  <D.17727>:
  mono_debugger_unlock ();
  D.17726 = 0B;
  return D.17726;
  <D.17728>:
  offset = il_offset_from_address (method, domain, address);
  if (offset < 0) goto <D.17735>; else goto <D.17736>;
  <D.17735>:
  mono_debugger_unlock ();
  D.17726 = 0B;
  return D.17726;
  <D.17736>:
  offset.74 = (unsigned int) offset;
  location = mono_debug_symfile_lookup_location (minfo, offset.74);
  mono_debugger_unlock ();
  D.17726 = location;
  return D.17726;
}


mono_debug_lookup_locals (struct MonoMethod * method)
{
  <unnamed type> mono_debug_format.75;
  struct MonoDebugLocalsInfo * D.17742;
  struct MonoDebugHandle * D.17746;
  struct MonoSymbolFile * D.17748;
  int D.17750;
  struct MonoDebugMethodInfo * minfo;
  struct MonoDebugLocalsInfo * res;

  mono_debug_format.75 = mono_debug_format;
  if (mono_debug_format.75 == 0) goto <D.17740>; else goto <D.17741>;
  <D.17740>:
  D.17742 = 0B;
  return D.17742;
  <D.17741>:
  mono_debugger_lock ();
  minfo = _mono_debug_lookup_method (method);
  if (minfo == 0B) goto <D.17743>; else goto <D.17745>;
  <D.17745>:
  D.17746 = minfo->handle;
  if (D.17746 == 0B) goto <D.17743>; else goto <D.17747>;
  <D.17747>:
  D.17746 = minfo->handle;
  D.17748 = D.17746->symfile;
  if (D.17748 == 0B) goto <D.17743>; else goto <D.17749>;
  <D.17749>:
  D.17746 = minfo->handle;
  D.17748 = D.17746->symfile;
  D.17750 = mono_debug_symfile_is_loaded (D.17748);
  if (D.17750 == 0) goto <D.17743>; else goto <D.17744>;
  <D.17743>:
  mono_debugger_unlock ();
  D.17742 = 0B;
  return D.17742;
  <D.17744>:
  res = mono_debug_symfile_lookup_locals (minfo);
  mono_debugger_unlock ();
  D.17742 = res;
  return D.17742;
}


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

  if (location != 0B) goto <D.17752>; else goto <D.17753>;
  <D.17752>:
  D.17754 = location->source_file;
  monoeg_g_free (D.17754);
  monoeg_g_free (location);
  <D.17753>:
}


mono_debug_print_stack_frame (struct MonoMethod * method, guint32 native_offset, struct MonoDomain * domain)
{
  char D.17755;
  int mono_debug_initialized.76;
  char * D.17767;
  unsigned int D.17768;
  char * D.17769;
  unsigned int D.17770;
  struct MonoDebugSourceLocation * location;
  gchar * fname;
  gchar * ptr;
  gchar * res;
  int offset;

  fname = mono_method_full_name (method, 1);
  ptr = fname;
  goto <D.17107>;
  <D.17106>:
  D.17755 = *ptr;
  if (D.17755 == 58) goto <D.17756>; else goto <D.17757>;
  <D.17756>:
  *ptr = 46;
  <D.17757>:
  ptr = ptr + 1;
  <D.17107>:
  D.17755 = *ptr;
  if (D.17755 != 0) goto <D.17106>; else goto <D.17108>;
  <D.17108>:
  location = mono_debug_lookup_source_location (method, native_offset, domain);
  if (location == 0B) goto <D.17758>; else goto <D.17759>;
  <D.17758>:
  mono_debug_initialized.76 = mono_debug_initialized;
  if (mono_debug_initialized.76 != 0) goto <D.17761>; else goto <D.17762>;
  <D.17761>:
  mono_debugger_lock ();
  offset = il_offset_from_address (method, domain, native_offset);
  mono_debugger_unlock ();
  goto <D.17763>;
  <D.17762>:
  offset = -1;
  <D.17763>:
  if (offset < 0) goto <D.17764>; else goto <D.17765>;
  <D.17764>:
  res = monoeg_g_strdup_printf ("at %s <0x%05x>", fname, native_offset);
  goto <D.17766>;
  <D.17765>:
  res = monoeg_g_strdup_printf ("at %s <IL 0x%05x, 0x%05x>", fname, offset, native_offset);
  <D.17766>:
  monoeg_g_free (fname);
  D.17767 = res;
  return D.17767;
  <D.17759>:
  D.17768 = location->row;
  D.17769 = location->source_file;
  D.17770 = location->il_offset;
  res = monoeg_g_strdup_printf ("at %s [0x%05x] in %s:%d", fname, D.17770, D.17769, D.17768);
  monoeg_g_free (fname);
  mono_debug_free_source_location (location);
  D.17767 = res;
  return D.17767;
}


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

  element = monoeg_malloc0 (16);
  element->data = data;
  ptr = list;
  goto <D.17116>;
  <D.17115>:
  D.17772 = *ptr;
  ptr = &D.17772->next;
  <D.17116>:
  D.17772 = *ptr;
  if (D.17772 != 0B) goto <D.17115>; else goto <D.17117>;
  <D.17117>:
  *ptr = element;
}


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

  ptr = list;
  goto <D.17127>;
  <D.17126>:
  D.17773 = *ptr;
  D.17774 = D.17773->data;
  if (D.17774 != data) goto <D.17775>; else goto <D.17776>;
  <D.17775>:
  // predicted unlikely by continue predictor.
  goto <D.17124>;
  <D.17776>:
  D.17773 = *ptr;
  next = D.17773->next;
  D.17773 = *ptr;
  monoeg_g_free (D.17773);
  *ptr = next;
  goto <D.17125>;
  <D.17124>:
  D.17773 = *ptr;
  ptr = &D.17773->next;
  <D.17127>:
  D.17773 = *ptr;
  if (D.17773 != 0B) goto <D.17126>; else goto <D.17125>;
  <D.17125>:
}


mono_set_is_debugger_attached (gboolean attached)
{
  is_attached = attached;
}


mono_is_debugger_attached ()
{
  mono_bool D.17777;

  D.17777 = is_attached;
  return D.17777;
}


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.17780;
  <unnamed type> mono_debug_format.78;
  _Bool D.17782;

  mono_debug_format.78 = mono_debug_format;
  D.17782 = mono_debug_format.78 != 0;
  D.17780 = (mono_bool) D.17782;
  return D.17780;
}


