mono_debug_init (MonoDebugFormat format)
{
  int mono_debug_initialized.0;
  _Bool D.17305;
  long int D.17306;
  long int D.17307;
  void * D.17312;
  struct MonoSymbolTable * mono_symbol_table.1;
  struct GHashTable * D.17314;
  struct GHashTable * D.17315;
  struct MonoDebugDataTable * D.17316;

  mono_debug_initialized.0 = mono_debug_initialized;
  D.17305 = mono_debug_initialized.0 != 0;
  D.17306 = (long int) D.17305;
  D.17307 = __builtin_expect (D.17306, 0);
  if (D.17307 != 0) goto <D.17308>; else goto <D.17309>;
  <D.17308>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 228, "!mono_debug_initialized");
  <D.17309>:
  if (format == 2) goto <D.17310>; else goto <D.17311>;
  <D.17310>:
  monoeg_g_log (0B, 4, "The mdb debugger is no longer supported.");
  <D.16978>:
  goto <D.16978>;
  <D.17311>:
  mono_debug_initialized = 1;
  mono_debug_format = format;
  mono_gc_base_init ();
  mono_debugger_initialize ();
  mono_debugger_lock ();
  D.17312 = monoeg_malloc0 (48);
  mono_symbol_table = D.17312;
  mono_symbol_table.1 = mono_symbol_table;
  mono_symbol_table.1->magic = 8862914395094897703;
  mono_symbol_table.1 = mono_symbol_table;
  mono_symbol_table.1->version = 81;
  mono_symbol_table.1 = mono_symbol_table;
  mono_symbol_table.1->total_size = 48;
  D.17314 = monoeg_g_hash_table_new_full (0B, 0B, 0B, free_debug_handle);
  mono_debug_handles = D.17314;
  D.17315 = monoeg_g_hash_table_new_full (0B, 0B, 0B, free_data_table);
  data_table_hash = D.17315;
  mono_debugger_class_init_func = mono_debug_add_type;
  mono_install_assembly_load_hook (mono_debug_add_assembly, 0B);
  mono_symbol_table.1 = mono_symbol_table;
  D.17316 = create_data_table (0B);
  mono_symbol_table.1->global_data_table = D.17316;
  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.17317>; else goto <D.17318>;
  <D.17317>:
  mono_debug_open_image (image, 0B, 0);
  <D.17318>:
  mono_debugger_unlock ();
}


open_symfile_from_bundle (struct MonoImage * image)
{
  const char * D.17319;
  const char * D.17320;
  int D.17321;
  struct MonoDebugHandle * D.17324;
  const mono_byte * D.17325;
  int D.17326;
  struct BundledSymfile * bsymfile;

  bsymfile = bundled_symfiles;
  goto <D.17298>;
  <D.17297>:
  D.17319 = bsymfile->aname;
  D.17320 = image->module_name;
  D.17321 = strcmp (D.17319, D.17320);
  if (D.17321 != 0) goto <D.17322>; else goto <D.17323>;
  <D.17322>:
  // predicted unlikely by continue predictor.
  goto <D.17296>;
  <D.17323>:
  D.17325 = bsymfile->raw_contents;
  D.17326 = bsymfile->size;
  D.17324 = mono_debug_open_image (image, D.17325, D.17326);
  return D.17324;
  <D.17296>:
  bsymfile = bsymfile->next;
  <D.17298>:
  if (bsymfile != 0B) goto <D.17297>; else goto <D.17299>;
  <D.17299>:
  D.17324 = 0B;
  return D.17324;
}


__attribute__((__gnu_inline__, nothrow, leaf, pure))
strcmp (const char * __s1, const char * __s2)
{
  int iftmp.2;
  int iftmp.3;
  int D.17336;
  char * __p1;
  char * __p2;
  int __ret;

  __p1 = __s1;
  __p2 = __s2;
  __asm__ __volatile__("   slr   0,0
0: clst  %1,%2
   jo    0b
   ipm   %0
   srl   %0,28" : "=d" __ret, "=&a" __p1, "=&a" __p2 : "1" __p1, "2" __p2 : "0", "memory", "cc");
  if (__ret != 0) goto <D.17329>; else goto <D.17330>;
  <D.17329>:
  if (__ret == 1) goto <D.17332>; else goto <D.17333>;
  <D.17332>:
  iftmp.3 = -1;
  goto <D.17334>;
  <D.17333>:
  iftmp.3 = 1;
  <D.17334>:
  iftmp.2 = iftmp.3;
  goto <D.17335>;
  <D.17330>:
  iftmp.2 = 0;
  <D.17335>:
  __ret = iftmp.2;
  D.17336 = __ret;
  return D.17336;
}


mono_debug_open_image (struct MonoImage * image, const guint8 * raw_contents, int size)
{
  int D.17338;
  struct MonoDebugHandle * D.17341;
  int next_symbol_file_id.4;
  int D.17345;
  unsigned int next_symbol_file_id.5;
  const char * D.17347;
  gchar * D.17348;
  struct MonoDebugDataTable * D.17349;
  struct MonoSymbolFile * D.17350;
  struct MonoSymbolTable * mono_symbol_table.6;
  struct MonoDebugList * * D.17352;
  struct GHashTable * mono_debug_handles.7;
  struct MonoDebugHandle * handle;

  D.17338 = mono_image_is_dynamic (image);
  if (D.17338 != 0) goto <D.17339>; else goto <D.17340>;
  <D.17339>:
  D.17341 = 0B;
  return D.17341;
  <D.17340>:
  mono_debugger_lock ();
  handle = _mono_debug_get_image (image);
  if (handle != 0B) goto <D.17342>; else goto <D.17343>;
  <D.17342>:
  mono_debugger_unlock ();
  D.17341 = handle;
  return D.17341;
  <D.17343>:
  handle = monoeg_malloc0 (40);
  next_symbol_file_id.4 = next_symbol_file_id;
  D.17345 = next_symbol_file_id.4 + 1;
  next_symbol_file_id = D.17345;
  next_symbol_file_id.4 = next_symbol_file_id;
  next_symbol_file_id.5 = (unsigned int) next_symbol_file_id.4;
  handle->index = next_symbol_file_id.5;
  handle->image = image;
  mono_image_addref (image);
  D.17347 = mono_image_get_filename (image);
  D.17348 = monoeg_strdup (D.17347);
  handle->image_file = D.17348;
  D.17349 = create_data_table (0B);
  handle->type_table = D.17349;
  D.17350 = mono_debug_open_mono_symbols (handle, raw_contents, size, 0);
  handle->symfile = D.17350;
  mono_symbol_table.6 = mono_symbol_table;
  D.17352 = &mono_symbol_table.6->symbol_files;
  mono_debug_list_add (D.17352, handle);
  mono_debug_handles.7 = mono_debug_handles;
  monoeg_g_hash_table_insert_replace (mono_debug_handles.7, image, handle, 0);
  mono_debugger_unlock ();
  D.17341 = handle;
  return D.17341;
}


_mono_debug_get_image (struct MonoImage * image)
{
  struct MonoDebugHandle * D.17355;
  struct GHashTable * mono_debug_handles.8;

  mono_debug_handles.8 = mono_debug_handles;
  D.17355 = monoeg_g_hash_table_lookup (mono_debug_handles.8, image);
  return D.17355;
}


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

  if (str != 0B) goto <D.17358>; else goto <D.17359>;
  <D.17358>:
  D.17360 = __strdup (str);
  return D.17360;
  <D.17359>:
  D.17360 = 0B;
  return D.17360;
}


mono_debug_add_type (struct MonoClass * klass)
{
  struct MonoGenericClass * D.17364;
  unsigned char D.17366;
  unsigned char D.17368;
  struct MonoImage * D.17370;
  long unsigned int D.17375;
  long unsigned int D.17377;
  long unsigned int D.17378;
  unsigned int D.17381;
  guint8 * ptr.9;
  int D.17383;
  int D.17384;
  unsigned int D.17385;
  guint8 * ptr.10;
  long int ptr.11;
  long int oldptr.12;
  long int D.17389;
  _Bool D.17390;
  long int D.17391;
  long int D.17392;
  unsigned int D.17395;
  _Bool D.17396;
  long int D.17397;
  long int D.17398;
  struct MonoDebugDataTable * D.17401;
  guint8[0:] * D.17402;
  long unsigned int D.17403;
  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.17364 = klass->generic_class;
      if (D.17364 != 0B) goto <D.17362>; else goto <D.17365>;
      <D.17365>:
      D.17366 = klass->rank;
      if (D.17366 != 0) goto <D.17362>; else goto <D.17367>;
      <D.17367>:
      D.17368 = klass->byval_arg.type;
      if (D.17368 == 19) goto <D.17362>; else goto <D.17369>;
      <D.17369>:
      D.17368 = klass->byval_arg.type;
      if (D.17368 == 30) goto <D.17362>; else goto <D.17363>;
      <D.17362>:
      return;
      <D.17363>:
      mono_debugger_lock ();
      D.17370 = klass->image;
      handle = _mono_debug_get_image (D.17370);
      if (handle == 0B) goto <D.17371>; else goto <D.17372>;
      <D.17371>:
      mono_debugger_unlock ();
      return;
      <D.17372>:
      max_size = 20;
      if (max_size > 8192) goto <D.17373>; else goto <D.17374>;
      <D.17373>:
      D.17375 = (long unsigned int) max_size;
      oldptr = monoeg_malloc (D.17375);
      ptr = oldptr;
      goto <D.17376>;
      <D.17374>:
      oldptr = &buffer;
      ptr = oldptr;
      <D.17376>:
      D.17377 = BIT_FIELD_REF <*klass, 64, 256>;
      D.17378 = D.17377 & 1152921504606846976;
      if (D.17378 != 0) goto <D.17379>; else goto <D.17380>;
      <D.17379>:
      base_offset = -16;
      <D.17380>:
      D.17381 = klass->type_token;
      ptr.9 = ptr;
      write_leb128 (D.17381, ptr.9, &ptr);
      D.17383 = klass->instance_size;
      D.17384 = D.17383 + base_offset;
      D.17385 = (unsigned int) D.17384;
      ptr.9 = ptr;
      write_leb128 (D.17385, ptr.9, &ptr);
      ptr.9 = ptr;
      MEM[(void * *)ptr.9] = klass;
      ptr.9 = ptr;
      ptr.10 = ptr.9 + 8;
      ptr = ptr.10;
      ptr.9 = ptr;
      ptr.11 = (long int) ptr.9;
      oldptr.12 = (long int) oldptr;
      D.17389 = ptr.11 - oldptr.12;
      size = (guint32) D.17389;
      D.17390 = size >= max_size;
      D.17391 = (long int) D.17390;
      D.17392 = __builtin_expect (D.17391, 0);
      if (D.17392 != 0) goto <D.17393>; else goto <D.17394>;
      <D.17393>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 906, "size < max_size");
      <D.17394>:
      total_size = size + 4;
      D.17395 = total_size + 9;
      D.17396 = D.17395 > 16359;
      D.17397 = (long int) D.17396;
      D.17398 = __builtin_expect (D.17397, 0);
      if (D.17398 != 0) goto <D.17399>; else goto <D.17400>;
      <D.17399>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 909, "total_size + 9 < DATA_TABLE_CHUNK_SIZE");
      <D.17400>:
      D.17401 = handle->type_table;
      entry = allocate_data_item (D.17401, 1, total_size);
      entry->size = total_size;
      D.17402 = &entry->data;
      D.17403 = (long unsigned int) size;
      memcpy (D.17402, oldptr, D.17403);
      D.17401 = handle->type_table;
      write_data_item (D.17401, entry);
      if (max_size > 8192) goto <D.17404>; else goto <D.17405>;
      <D.17404>:
      monoeg_g_free (oldptr);
      <D.17405>:
      mono_debugger_unlock ();
    }
  finally
    {
      buffer = {CLOBBER};
      ptr = {CLOBBER};
    }
}


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

  <D.17055>:
  {
    guint8 byte;

    D.17409 = (unsigned char) value;
    byte = D.17409 & 127;
    value = value >> 7;
    if (value != 0) goto <D.17410>; else goto <D.17411>;
    <D.17410>:
    byte = byte | 128;
    <D.17411>:
    ptr.13 = ptr;
    ptr = ptr.13 + 1;
    *ptr.13 = byte;
  }
  if (value != 0) goto <D.17055>; else goto <D.17056>;
  <D.17056>:
  *rptr = ptr;
}


allocate_data_item (struct MonoDebugDataTable * table, MonoDebugDataItemType type, guint32 size)
{
  unsigned int D.17413;
  unsigned int D.17414;
  struct MonoDebugDataChunk * D.17418;
  unsigned int D.17419;
  unsigned int D.17420;
  _Bool D.17421;
  long int D.17422;
  long int D.17423;
  unsigned int D.17426;
  unsigned int D.17427;
  unsigned int D.17428;
  long unsigned int D.17431;
  long unsigned int D.17432;
  guint8 * D.17433;
  guint32 chunk_size;
  guint8 * data;

  D.17413 = size + 7;
  size = D.17413 & 4294967288;
  D.17414 = size + 16;
  if (D.17414 <= 16359) goto <D.17415>; else goto <D.17416>;
  <D.17415>:
  chunk_size = 16360;
  goto <D.17417>;
  <D.17416>:
  chunk_size = size + 16;
  <D.17417>:
  D.17418 = table->current_chunk;
  D.17419 = D.17418->current_offset;
  D.17418 = table->current_chunk;
  D.17420 = D.17418->allocated_size;
  D.17421 = D.17419 != D.17420;
  D.17422 = (long int) D.17421;
  D.17423 = __builtin_expect (D.17422, 0);
  if (D.17423 != 0) goto <D.17424>; else goto <D.17425>;
  <D.17424>:
  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.17425>:
  D.17418 = table->current_chunk;
  D.17420 = D.17418->allocated_size;
  D.17426 = D.17420 + size;
  D.17427 = D.17426 + 8;
  D.17418 = table->current_chunk;
  D.17428 = D.17418->total_size;
  if (D.17427 >= D.17428) goto <D.17429>; else goto <D.17430>;
  <D.17429>:
  {
    struct MonoDebugDataChunk * new_chunk;

    D.17431 = (long unsigned int) chunk_size;
    D.17432 = D.17431 + 24;
    new_chunk = monoeg_malloc0 (D.17432);
    new_chunk->total_size = chunk_size;
    D.17418 = table->current_chunk;
    D.17418->next = new_chunk;
    table->current_chunk = new_chunk;
  }
  <D.17430>:
  D.17418 = table->current_chunk;
  D.17418 = table->current_chunk;
  D.17420 = D.17418->allocated_size;
  data = &D.17418->data[D.17420];
  D.17418 = table->current_chunk;
  D.17418 = table->current_chunk;
  D.17420 = D.17418->allocated_size;
  D.17426 = D.17420 + size;
  D.17427 = D.17426 + 8;
  D.17418->allocated_size = D.17427;
  MEM[(guint32 *)data] = size;
  data = data + 4;
  MEM[(guint32 *)data] = type;
  data = data + 4;
  D.17433 = data;
  return D.17433;
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__, __nothrow__, __leaf__))
memcpy (void * restrict __dest, const void * restrict __src, size_t __len)
{
  void * D.17435;
  long unsigned int D.17436;

  D.17436 = __builtin_object_size (__dest, 0);
  D.17435 = __builtin___memcpy_chk (__dest, __src, __len, D.17436);
  return D.17435;
}


write_data_item (struct MonoDebugDataTable * table, const guint8 * data)
{
  unsigned int D.17438;
  unsigned int D.17439;
  unsigned int D.17440;
  unsigned int D.17441;
  _Bool D.17442;
  long int D.17443;
  long int D.17444;
  struct MonoDebugDataChunk * current_chunk;
  guint32 size;

  current_chunk = table->current_chunk;
  size = MEM[(guint32 *)data + -8B];
  D.17438 = current_chunk->current_offset;
  D.17439 = D.17438 + size;
  D.17440 = D.17439 + 8;
  D.17441 = current_chunk->allocated_size;
  D.17442 = D.17440 != D.17441;
  D.17443 = (long int) D.17442;
  D.17444 = __builtin_expect (D.17443, 0);
  if (D.17444 != 0) goto <D.17445>; else goto <D.17446>;
  <D.17445>:
  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.17446>:
  D.17441 = current_chunk->allocated_size;
  current_chunk->current_offset = D.17441;
}


free_data_table (struct MonoDebugDataTable * table)
{
  struct GHashTable * D.17447;
  struct GHashTable * D.17448;
  struct MonoDebugDataChunk * D.17449;
  struct MonoSymbolTable * mono_symbol_table.14;
  struct MonoDebugList * * D.17451;
  struct MonoDebugDataChunk * chunk;
  struct MonoDebugDataChunk * next_chunk;

  D.17447 = table->method_hash;
  monoeg_g_hash_table_foreach (D.17447, free_header_data, 0B);
  D.17447 = table->method_hash;
  monoeg_g_hash_table_destroy (D.17447);
  D.17448 = table->method_address_hash;
  monoeg_g_hash_table_destroy (D.17448);
  table->method_hash = 0B;
  table->method_address_hash = 0B;
  chunk = table->first_chunk;
  goto <D.16965>;
  <D.16964>:
  next_chunk = chunk->next;
  monoeg_g_free (chunk);
  chunk = next_chunk;
  <D.16965>:
  if (chunk != 0B) goto <D.16964>; else goto <D.16966>;
  <D.16966>:
  table->current_chunk = 0B;
  D.17449 = table->current_chunk;
  table->first_chunk = D.17449;
  mono_symbol_table.14 = mono_symbol_table;
  D.17451 = &mono_symbol_table.14->data_tables;
  mono_debug_list_remove (D.17451, table);
  monoeg_g_free (table);
}


free_header_data (void * key, void * value, void * user_data)
{
  struct MonoDebugWrapperData * D.17452;
  const gchar * D.17455;
  struct GSList * D.17456;
  struct MonoDebugMethodHeader * header;

  header = value;
  D.17452 = header->wrapper_data;
  if (D.17452 != 0B) goto <D.17453>; else goto <D.17454>;
  <D.17453>:
  D.17452 = header->wrapper_data;
  D.17455 = D.17452->method_name;
  monoeg_g_free (D.17455);
  D.17452 = header->wrapper_data;
  monoeg_g_free (D.17452);
  <D.17454>:
  D.17456 = header->address_list;
  monoeg_g_slist_free (D.17456);
}


free_debug_handle (struct MonoDebugHandle * handle)
{
  struct MonoSymbolFile * D.17457;
  struct MonoDebugDataTable * D.17460;
  struct MonoImage * D.17461;
  char * D.17462;

  D.17457 = handle->symfile;
  if (D.17457 != 0B) goto <D.17458>; else goto <D.17459>;
  <D.17458>:
  D.17457 = handle->symfile;
  mono_debug_close_mono_symbol_file (D.17457);
  <D.17459>:
  D.17460 = handle->type_table;
  free_data_table (D.17460);
  D.17461 = handle->image;
  mono_image_close (D.17461);
  D.17462 = handle->image_file;
  monoeg_g_free (D.17462);
  monoeg_g_free (handle);
}


create_data_table (struct MonoDomain * domain)
{
  int iftmp.15;
  struct GHashTable * D.17467;
  struct GHashTable * D.17468;
  struct MonoDebugDataChunk * D.17469;
  struct MonoSymbolTable * mono_symbol_table.16;
  struct MonoDebugList * * D.17473;
  struct GHashTable * data_table_hash.17;
  struct MonoDebugDataTable * D.17475;
  struct MonoDebugDataTable * table;
  struct MonoDebugDataChunk * chunk;

  table = monoeg_malloc0 (40);
  if (domain != 0B) goto <D.17464>; else goto <D.17465>;
  <D.17464>:
  iftmp.15 = mono_domain_get_id (domain);
  goto <D.17466>;
  <D.17465>:
  iftmp.15 = -1;
  <D.17466>:
  table->domain = iftmp.15;
  D.17467 = monoeg_g_hash_table_new (0B, 0B);
  table->method_address_hash = D.17467;
  D.17468 = monoeg_g_hash_table_new (0B, 0B);
  table->method_hash = D.17468;
  chunk = monoeg_malloc0 (16384);
  chunk->total_size = 16360;
  table->current_chunk = chunk;
  D.17469 = table->current_chunk;
  table->first_chunk = D.17469;
  if (domain != 0B) goto <D.17470>; else goto <D.17471>;
  <D.17470>:
  mono_symbol_table.16 = mono_symbol_table;
  D.17473 = &mono_symbol_table.16->data_tables;
  mono_debug_list_add (D.17473, table);
  data_table_hash.17 = data_table_hash;
  monoeg_g_hash_table_insert_replace (data_table_hash.17, domain, table, 0);
  <D.17471>:
  D.17475 = table;
  return D.17475;
}


_mono_debug_init_corlib (struct MonoDomain * domain)
{
  int mono_debug_initialized.18;
  struct MonoSymbolTable * mono_symbol_table.19;
  struct MonoImage * D.17481;
  struct MonoDebugHandle * D.17482;

  mono_debug_initialized.18 = mono_debug_initialized;
  if (mono_debug_initialized.18 == 0) goto <D.17478>; else goto <D.17479>;
  <D.17478>:
  return;
  <D.17479>:
  mono_symbol_table.19 = mono_symbol_table;
  D.17481 = mono_defaults.corlib;
  D.17482 = mono_debug_open_image (D.17481, 0B, 0);
  mono_symbol_table.19->corlib = D.17482;
}


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

  mono_debug_initialized.20 = mono_debug_initialized;
  if (mono_debug_initialized.20 == 0) goto <D.17485>; else goto <D.17486>;
  <D.17485>:
  return;
  <D.17486>:
  mono_debug_open_image (image, raw_contents, size);
}


mono_debug_cleanup ()
{
  struct GHashTable * mono_debug_handles.21;
  struct GHashTable * data_table_hash.22;
  struct MonoSymbolTable * mono_symbol_table.23;
  struct MonoDebugDataTable * D.17497;

  mono_debug_handles.21 = mono_debug_handles;
  if (mono_debug_handles.21 != 0B) goto <D.17489>; else goto <D.17490>;
  <D.17489>:
  mono_debug_handles.21 = mono_debug_handles;
  monoeg_g_hash_table_destroy (mono_debug_handles.21);
  <D.17490>:
  mono_debug_handles = 0B;
  data_table_hash.22 = data_table_hash;
  if (data_table_hash.22 != 0B) goto <D.17492>; else goto <D.17493>;
  <D.17492>:
  data_table_hash.22 = data_table_hash;
  monoeg_g_hash_table_destroy (data_table_hash.22);
  data_table_hash = 0B;
  <D.17493>:
  mono_symbol_table.23 = mono_symbol_table;
  if (mono_symbol_table.23 != 0B) goto <D.17495>; else goto <D.17496>;
  <D.17495>:
  mono_symbol_table.23 = mono_symbol_table;
  D.17497 = mono_symbol_table.23->global_data_table;
  if (D.17497 != 0B) goto <D.17498>; else goto <D.17499>;
  <D.17498>:
  mono_symbol_table.23 = mono_symbol_table;
  D.17497 = mono_symbol_table.23->global_data_table;
  free_data_table (D.17497);
  <D.17499>:
  mono_symbol_table.23 = mono_symbol_table;
  monoeg_g_free (mono_symbol_table.23);
  mono_symbol_table = 0B;
  <D.17496>:
}


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

  mono_debug_initialized.24 = mono_debug_initialized;
  if (mono_debug_initialized.24 == 0) goto <D.17501>; else goto <D.17502>;
  <D.17501>:
  return;
  <D.17502>:
  mono_debugger_lock ();
  table = create_data_table (domain);
  mono_debugger_unlock ();
}


mono_debug_domain_unload (struct MonoDomain * domain)
{
  int mono_debug_initialized.25;
  struct GHashTable * data_table_hash.26;
  int D.17510;
  struct MonoDebugDataTable * table;

  mono_debug_initialized.25 = mono_debug_initialized;
  if (mono_debug_initialized.25 == 0) goto <D.17505>; else goto <D.17506>;
  <D.17505>:
  return;
  <D.17506>:
  mono_debugger_lock ();
  data_table_hash.26 = data_table_hash;
  table = monoeg_g_hash_table_lookup (data_table_hash.26, domain);
  if (table == 0B) goto <D.17508>; else goto <D.17509>;
  <D.17508>:
  D.17510 = mono_domain_get_id (domain);
  monoeg_g_log (0B, 16, "mono-debug.c:337:: unloading unknown domain %p / %d", domain, D.17510);
  mono_debugger_unlock ();
  return;
  <D.17509>:
  data_table_hash.26 = data_table_hash;
  monoeg_g_hash_table_remove (data_table_hash.26, domain);
  mono_debugger_unlock ();
}


mono_debug_close_image (struct MonoImage * image)
{
  int mono_debug_initialized.27;
  struct MonoSymbolTable * mono_symbol_table.28;
  struct MonoDebugList * * D.17518;
  struct GHashTable * mono_debug_handles.29;
  struct MonoDebugHandle * handle;

  mono_debug_initialized.27 = mono_debug_initialized;
  if (mono_debug_initialized.27 == 0) goto <D.17513>; else goto <D.17514>;
  <D.17513>:
  return;
  <D.17514>:
  mono_debugger_lock ();
  handle = _mono_debug_get_image (image);
  if (handle == 0B) goto <D.17515>; else goto <D.17516>;
  <D.17515>:
  mono_debugger_unlock ();
  return;
  <D.17516>:
  mono_symbol_table.28 = mono_symbol_table;
  D.17518 = &mono_symbol_table.28->symbol_files;
  mono_debug_list_remove (D.17518, handle);
  mono_debug_handles.29 = mono_debug_handles;
  monoeg_g_hash_table_remove (mono_debug_handles.29, image);
  mono_debugger_unlock ();
}


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

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


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

  try
    {
      data.minfo = 0B;
      data.method = method;
      mono_debug_handles.30 = mono_debug_handles;
      if (mono_debug_handles.30 == 0B) goto <D.17524>; else goto <D.17525>;
      <D.17524>:
      D.17526 = 0B;
      return D.17526;
      <D.17525>:
      mono_debug_handles.30 = mono_debug_handles;
      monoeg_g_hash_table_foreach (mono_debug_handles.30, lookup_method_func, &data);
      D.17526 = data.minfo;
      return D.17526;
    }
  finally
    {
      data = {CLOBBER};
    }
}


lookup_method_func (void * key, void * value, void * user_data)
{
  struct MonoDebugMethodInfo * D.17529;
  struct MonoSymbolFile * D.17532;
  struct MonoMethod * D.17535;
  struct MonoDebugMethodInfo * D.17536;
  struct MonoDebugHandle * handle;
  struct LookupMethodData * data;

  handle = value;
  data = user_data;
  D.17529 = data->minfo;
  if (D.17529 != 0B) goto <D.17530>; else goto <D.17531>;
  <D.17530>:
  return;
  <D.17531>:
  D.17532 = handle->symfile;
  if (D.17532 != 0B) goto <D.17533>; else goto <D.17534>;
  <D.17533>:
  D.17535 = data->method;
  D.17536 = mono_debug_symfile_lookup_method (handle, D.17535);
  data->minfo = D.17536;
  <D.17534>:
}


mono_debug_add_method (struct MonoMethod * method, struct MonoDebugMethodJitInfo * jit, struct MonoDomain * domain)
{
  struct MonoClass * D.17538;
  struct MonoImage * D.17539;
  short unsigned int D.17543;
  unsigned int D.17544;
  unsigned int D.17545;
  short unsigned int D.17547;
  unsigned int D.17548;
  unsigned int D.17549;
  long unsigned int D.17551;
  long unsigned int D.17552;
  unsigned int D.17553;
  unsigned int D.17554;
  unsigned int D.17555;
  unsigned int D.17556;
  unsigned int D.17557;
  unsigned int D.17558;
  unsigned int D.17559;
  unsigned int D.17560;
  long unsigned int D.17563;
  unsigned int D.17565;
  guint8 * ptr.31;
  unsigned int D.17567;
  struct MonoDebugLineNumberEntry * D.17568;
  long unsigned int D.17569;
  long unsigned int D.17570;
  unsigned int D.17571;
  int D.17572;
  unsigned int D.17573;
  int D.17574;
  guint8 * ptr.32;
  guint8 * ptr.33;
  struct MonoDebugVarInfo * D.17577;
  _Bool D.17578;
  unsigned char D.17579;
  struct MonoDebugVarInfo * D.17582;
  long unsigned int D.17583;
  struct MonoDebugVarInfo * D.17584;
  struct MonoDebugVarInfo * D.17585;
  struct MonoDebugVarInfo * D.17586;
  guint8 * ptr.34;
  guint8 * ptr.35;
  struct MonoDebugVarInfo * D.17589;
  _Bool D.17590;
  unsigned char D.17591;
  struct MonoDebugVarInfo * D.17594;
  long int ptr.36;
  long int oldptr.37;
  long int D.17597;
  _Bool D.17598;
  long int D.17599;
  long int D.17600;
  long unsigned int D.17603;
  long unsigned int D.17606;
  uint32_t iftmp.38;
  int D.17612;
  unsigned int D.17613;
  uint32_t iftmp.39;
  const mono_byte * D.17618;
  unsigned int D.17619;
  guint8[0:] * D.17620;
  long unsigned int D.17621;
  struct MonoMethod * iftmp.40;
  long unsigned int D.17625;
  struct GHashTable * D.17629;
  <unnamed-unsigned:5> D.17634;
  unsigned int D.17635;
  char * D.17636;
  struct MonoDebugWrapperData * D.17638;
  struct GSList * D.17639;
  struct GSList * D.17640;
  struct GHashTable * D.17641;
  struct MonoDebugMethodAddress * D.17644;
  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.17538 = method->klass;
      D.17539 = D.17538->image;
      handle = _mono_debug_get_image (D.17539);
      minfo = _mono_debug_lookup_method (method);
      if (minfo == 0B) goto <D.17540>; else goto <D.17542>;
      <D.17542>:
      D.17543 = method->iflags;
      D.17544 = (unsigned int) D.17543;
      D.17545 = D.17544 & 4099;
      if (D.17545 != 0) goto <D.17540>; else goto <D.17546>;
      <D.17546>:
      D.17547 = method->flags;
      D.17548 = (unsigned int) D.17547;
      D.17549 = D.17548 & 9216;
      if (D.17549 != 0) goto <D.17540>; else goto <D.17550>;
      <D.17550>:
      D.17551 = BIT_FIELD_REF <*method, 64, 256>;
      D.17552 = D.17551 & 4467570830351532032;
      if (D.17552 != 0) goto <D.17540>; else goto <D.17541>;
      <D.17540>:
      is_wrapper = 1;
      <D.17541>:
      D.17553 = jit->num_line_numbers;
      D.17554 = D.17553 * 10;
      D.17555 = jit->num_params;
      D.17556 = jit->num_locals;
      D.17557 = D.17555 + D.17556;
      D.17558 = D.17557 + 1;
      D.17559 = D.17558 * 33;
      D.17560 = D.17554 + D.17559;
      max_size = D.17560 + 26;
      if (max_size > 8192) goto <D.17561>; else goto <D.17562>;
      <D.17561>:
      D.17563 = (long unsigned int) max_size;
      oldptr = monoeg_malloc (D.17563);
      ptr = oldptr;
      goto <D.17564>;
      <D.17562>:
      oldptr = &buffer;
      ptr = oldptr;
      <D.17564>:
      D.17565 = jit->prologue_end;
      ptr.31 = ptr;
      write_leb128 (D.17565, ptr.31, &ptr);
      D.17567 = jit->epilogue_begin;
      ptr.31 = ptr;
      write_leb128 (D.17567, ptr.31, &ptr);
      D.17553 = jit->num_line_numbers;
      ptr.31 = ptr;
      write_leb128 (D.17553, ptr.31, &ptr);
      i = 0;
      goto <D.17093>;
      <D.17092>:
      {
        struct MonoDebugLineNumberEntry * lne;

        D.17568 = jit->line_numbers;
        D.17569 = (long unsigned int) i;
        D.17570 = D.17569 * 8;
        lne = D.17568 + D.17570;
        D.17571 = lne->il_offset;
        D.17572 = (int) D.17571;
        ptr.31 = ptr;
        write_sleb128 (D.17572, ptr.31, &ptr);
        D.17573 = lne->native_offset;
        D.17574 = (int) D.17573;
        ptr.31 = ptr;
        write_sleb128 (D.17574, ptr.31, &ptr);
      }
      i = i + 1;
      <D.17093>:
      D.17553 = jit->num_line_numbers;
      if (D.17553 > i) goto <D.17092>; else goto <D.17094>;
      <D.17094>:
      ptr.31 = ptr;
      ptr.32 = ptr.31;
      ptr.33 = ptr.32 + 1;
      ptr = ptr.33;
      D.17577 = jit->this_var;
      D.17578 = D.17577 != 0B;
      D.17579 = (unsigned char) D.17578;
      *ptr.32 = D.17579;
      D.17577 = jit->this_var;
      if (D.17577 != 0B) goto <D.17580>; else goto <D.17581>;
      <D.17580>:
      D.17577 = jit->this_var;
      ptr.31 = ptr;
      write_variable (D.17577, ptr.31, &ptr);
      <D.17581>:
      D.17555 = jit->num_params;
      ptr.31 = ptr;
      write_leb128 (D.17555, ptr.31, &ptr);
      i = 0;
      goto <D.17096>;
      <D.17095>:
      D.17582 = jit->params;
      D.17569 = (long unsigned int) i;
      D.17583 = D.17569 * 32;
      D.17584 = D.17582 + D.17583;
      ptr.31 = ptr;
      write_variable (D.17584, ptr.31, &ptr);
      i = i + 1;
      <D.17096>:
      D.17555 = jit->num_params;
      if (D.17555 > i) goto <D.17095>; else goto <D.17097>;
      <D.17097>:
      D.17556 = jit->num_locals;
      ptr.31 = ptr;
      write_leb128 (D.17556, ptr.31, &ptr);
      i = 0;
      goto <D.17099>;
      <D.17098>:
      D.17585 = jit->locals;
      D.17569 = (long unsigned int) i;
      D.17583 = D.17569 * 32;
      D.17586 = D.17585 + D.17583;
      ptr.31 = ptr;
      write_variable (D.17586, ptr.31, &ptr);
      i = i + 1;
      <D.17099>:
      D.17556 = jit->num_locals;
      if (D.17556 > i) goto <D.17098>; else goto <D.17100>;
      <D.17100>:
      ptr.31 = ptr;
      ptr.34 = ptr.31;
      ptr.35 = ptr.34 + 1;
      ptr = ptr.35;
      D.17589 = jit->gsharedvt_info_var;
      D.17590 = D.17589 != 0B;
      D.17591 = (unsigned char) D.17590;
      *ptr.34 = D.17591;
      D.17589 = jit->gsharedvt_info_var;
      if (D.17589 != 0B) goto <D.17592>; else goto <D.17593>;
      <D.17592>:
      D.17589 = jit->gsharedvt_info_var;
      ptr.31 = ptr;
      write_variable (D.17589, ptr.31, &ptr);
      D.17594 = jit->gsharedvt_locals_var;
      ptr.31 = ptr;
      write_variable (D.17594, ptr.31, &ptr);
      <D.17593>:
      ptr.31 = ptr;
      ptr.36 = (long int) ptr.31;
      oldptr.37 = (long int) oldptr;
      D.17597 = ptr.36 - oldptr.37;
      size = (guint32) D.17597;
      D.17598 = size >= max_size;
      D.17599 = (long int) D.17598;
      D.17600 = __builtin_expect (D.17599, 0);
      if (D.17600 != 0) goto <D.17601>; else goto <D.17602>;
      <D.17601>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 639, "size < max_size");
      <D.17602>:
      total_size = size + 64;
      D.17551 = BIT_FIELD_REF <*method, 64, 256>;
      D.17603 = D.17551 & 18014398509481984;
      if (D.17603 != 0) goto <D.17604>; else goto <D.17605>;
      <D.17604>:
      D.17606 = (long unsigned int) total_size;
      address = monoeg_malloc0 (D.17606);
      goto <D.17607>;
      <D.17605>:
      address = allocate_data_item (table, 2, total_size);
      <D.17607>:
      address->header.size = total_size;
      if (handle != 0B) goto <D.17609>; else goto <D.17610>;
      <D.17609>:
      iftmp.38 = handle->index;
      goto <D.17611>;
      <D.17610>:
      iftmp.38 = 0;
      <D.17611>:
      address->header.symfile_id = iftmp.38;
      D.17612 = mono_domain_get_id (domain);
      D.17613 = (unsigned int) D.17612;
      address->header.domain_id = D.17613;
      if (is_wrapper == 0) goto <D.17615>; else goto <D.17616>;
      <D.17615>:
      iftmp.39 = minfo->index;
      goto <D.17617>;
      <D.17616>:
      iftmp.39 = 0;
      <D.17617>:
      address->header.method_id = iftmp.39;
      address->header.method = method;
      D.17618 = jit->code_start;
      address->code_start = D.17618;
      D.17619 = jit->code_size;
      address->code_size = D.17619;
      D.17620 = &address->data;
      D.17621 = (long unsigned int) size;
      memcpy (D.17620, oldptr, D.17621);
      if (max_size > 8192) goto <D.17622>; else goto <D.17623>;
      <D.17622>:
      monoeg_g_free (oldptr);
      <D.17623>:
      D.17551 = BIT_FIELD_REF <*method, 64, 256>;
      D.17625 = D.17551 & 2251799813685248;
      if (D.17625 != 0) goto <D.17626>; else goto <D.17627>;
      <D.17626>:
      iftmp.40 = MEM[(struct MonoMethodInflated *)method].declaring;
      goto <D.17628>;
      <D.17627>:
      iftmp.40 = method;
      <D.17628>:
      declaring = iftmp.40;
      D.17629 = table->method_hash;
      header = monoeg_g_hash_table_lookup (D.17629, declaring);
      if (header == 0B) goto <D.17630>; else goto <D.17631>;
      <D.17630>:
      header = &address->header;
      D.17629 = table->method_hash;
      monoeg_g_hash_table_insert_replace (D.17629, declaring, header, 0);
      if (is_wrapper != 0) goto <D.17632>; else goto <D.17633>;
      <D.17632>:
      {
        struct MonoDebugWrapperData * wrapper;

        wrapper = monoeg_malloc0 (24);
        header->wrapper_data = wrapper;
        D.17634 = method->wrapper_type;
        D.17635 = (unsigned int) D.17634;
        wrapper->wrapper_type = D.17635;
        D.17636 = mono_method_full_name (declaring, 1);
        wrapper->method_name = D.17636;
        wrapper->obsolete_cil_code = "";
      }
      <D.17633>:
      goto <D.17637>;
      <D.17631>:
      D.17638 = header->wrapper_data;
      address->header.wrapper_data = D.17638;
      D.17639 = header->address_list;
      D.17640 = monoeg_g_slist_prepend (D.17639, address);
      header->address_list = D.17640;
      <D.17637>:
      D.17641 = table->method_address_hash;
      monoeg_g_hash_table_insert_replace (D.17641, method, address, 0);
      D.17551 = BIT_FIELD_REF <*method, 64, 256>;
      D.17603 = D.17551 & 18014398509481984;
      if (D.17603 == 0) goto <D.17642>; else goto <D.17643>;
      <D.17642>:
      write_data_item (table, address);
      <D.17643>:
      mono_debugger_unlock ();
      D.17644 = address;
      return D.17644;
    }
  finally
    {
      buffer = {CLOBBER};
      ptr = {CLOBBER};
    }
}


lookup_data_table (struct MonoDomain * domain)
{
  struct GHashTable * data_table_hash.41;
  _Bool D.17650;
  long int D.17651;
  long int D.17652;
  struct MonoDebugDataTable * D.17655;
  struct MonoDebugDataTable * table;

  data_table_hash.41 = data_table_hash;
  table = monoeg_g_hash_table_lookup (data_table_hash.41, domain);
  if (table == 0B) goto <D.17648>; else goto <D.17649>;
  <D.17648>:
  monoeg_g_log (0B, 4, "lookup_data_table () failed for %p\n", domain);
  <D.16971>:
  goto <D.16971>;
  D.17650 = table == 0B;
  D.17651 = (long int) D.17650;
  D.17652 = __builtin_expect (D.17651, 0);
  if (D.17652 != 0) goto <D.17653>; else goto <D.17654>;
  <D.17653>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 201, "table");
  <D.17654>:
  <D.17649>:
  D.17655 = table;
  return D.17655;
}


write_sleb128 (gint32 value, guint8 * ptr, guint8 * * rptr)
{
  unsigned char D.17657;
  int D.17663;
  int D.17664;
  guint8 * ptr.42;
  gboolean more;

  more = 1;
  goto <D.17065>;
  <D.17064>:
  {
    guint8 byte;

    D.17657 = (unsigned char) value;
    byte = D.17657 & 127;
    value = value >> 7;
    if (value == 0) goto <D.17662>; else goto <D.17658>;
    <D.17662>:
    D.17663 = (int) byte;
    D.17664 = D.17663 & 64;
    if (D.17664 == 0) goto <D.17659>; else goto <D.17658>;
    <D.17658>:
    if (value == -1) goto <D.17665>; else goto <D.17660>;
    <D.17665>:
    D.17663 = (int) byte;
    D.17664 = D.17663 & 64;
    if (D.17664 != 0) goto <D.17659>; else goto <D.17660>;
    <D.17659>:
    more = 0;
    goto <D.17661>;
    <D.17660>:
    byte = byte | 128;
    <D.17661>:
    ptr.42 = ptr;
    ptr = ptr.42 + 1;
    *ptr.42 = byte;
  }
  <D.17065>:
  if (more != 0) goto <D.17064>; else goto <D.17066>;
  <D.17066>:
  *rptr = ptr;
}


write_variable (struct MonoDebugVarInfo * var, guint8 * ptr, guint8 * * rptr)
{
  unsigned int D.17667;
  guint8 * ptr.43;
  unsigned int D.17669;
  int D.17670;
  unsigned int D.17671;
  unsigned int D.17672;
  unsigned int D.17673;
  struct MonoType * D.17674;
  guint8 * ptr.44;

  D.17667 = var->index;
  ptr.43 = ptr;
  write_leb128 (D.17667, ptr.43, &ptr);
  D.17669 = var->offset;
  D.17670 = (int) D.17669;
  ptr.43 = ptr;
  write_sleb128 (D.17670, ptr.43, &ptr);
  D.17671 = var->size;
  ptr.43 = ptr;
  write_leb128 (D.17671, ptr.43, &ptr);
  D.17672 = var->begin_scope;
  ptr.43 = ptr;
  write_leb128 (D.17672, ptr.43, &ptr);
  D.17673 = var->end_scope;
  ptr.43 = ptr;
  write_leb128 (D.17673, ptr.43, &ptr);
  ptr.43 = ptr;
  D.17674 = var->type;
  MEM[(void * *)ptr.43] = D.17674;
  ptr.43 = ptr;
  ptr.44 = ptr.43 + 8;
  ptr = ptr.44;
  ptr.43 = ptr;
  *rptr = ptr.43;
}


mono_debug_remove_method (struct MonoMethod * method, struct MonoDomain * domain)
{
  int mono_debug_initialized.45;
  long unsigned int D.17679;
  long unsigned int D.17680;
  _Bool D.17681;
  long int D.17682;
  long int D.17683;
  struct MonoMethod * iftmp.46;
  long unsigned int D.17687;
  struct GHashTable * D.17691;
  struct GHashTable * D.17692;
  struct MonoDebugWrapperData * D.17695;
  const gchar * D.17698;
  struct MonoMethod * declaring;
  struct MonoDebugDataTable * table;
  struct MonoDebugMethodHeader * header;
  struct MonoDebugMethodAddress * address;

  mono_debug_initialized.45 = mono_debug_initialized;
  if (mono_debug_initialized.45 == 0) goto <D.17677>; else goto <D.17678>;
  <D.17677>:
  return;
  <D.17678>:
  D.17679 = BIT_FIELD_REF <*method, 64, 256>;
  D.17680 = D.17679 & 18014398509481984;
  D.17681 = D.17680 == 0;
  D.17682 = (long int) D.17681;
  D.17683 = __builtin_expect (D.17682, 0);
  if (D.17683 != 0) goto <D.17684>; else goto <D.17685>;
  <D.17684>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-debug.c", 703, "method->dynamic");
  <D.17685>:
  mono_debugger_lock ();
  table = lookup_data_table (domain);
  D.17679 = BIT_FIELD_REF <*method, 64, 256>;
  D.17687 = D.17679 & 2251799813685248;
  if (D.17687 != 0) goto <D.17688>; else goto <D.17689>;
  <D.17688>:
  iftmp.46 = MEM[(struct MonoMethodInflated *)method].declaring;
  goto <D.17690>;
  <D.17689>:
  iftmp.46 = method;
  <D.17690>:
  declaring = iftmp.46;
  D.17691 = table->method_hash;
  monoeg_g_hash_table_remove (D.17691, declaring);
  D.17692 = table->method_address_hash;
  address = monoeg_g_hash_table_lookup (D.17692, method);
  if (address != 0B) goto <D.17693>; else goto <D.17694>;
  <D.17693>:
  header = &address->header;
  D.17695 = header->wrapper_data;
  if (D.17695 != 0B) goto <D.17696>; else goto <D.17697>;
  <D.17696>:
  D.17695 = header->wrapper_data;
  D.17698 = D.17695->method_name;
  monoeg_g_free (D.17698);
  D.17695 = header->wrapper_data;
  monoeg_g_free (D.17695);
  <D.17697>:
  monoeg_g_free (address);
  <D.17694>:
  D.17692 = table->method_address_hash;
  monoeg_g_hash_table_remove (D.17692, method);
  mono_debugger_unlock ();
}


mono_debug_add_delegate_trampoline (void * code, int size)
{
  int mono_debug_initialized.47;
  struct MonoSymbolTable * mono_symbol_table.48;
  struct MonoDebugDataTable * D.17704;
  unsigned int size.49;
  struct MonoDebugDelegateTrampolineEntry * entry;

  mono_debug_initialized.47 = mono_debug_initialized;
  if (mono_debug_initialized.47 == 0) goto <D.17701>; else goto <D.17702>;
  <D.17701>:
  return;
  <D.17702>:
  mono_debugger_lock ();
  mono_symbol_table.48 = mono_symbol_table;
  D.17704 = mono_symbol_table.48->global_data_table;
  entry = allocate_data_item (D.17704, 3, 16);
  entry->code = code;
  size.49 = (unsigned int) size;
  entry->size = size.49;
  mono_symbol_table.48 = mono_symbol_table;
  D.17704 = mono_symbol_table.48->global_data_table;
  write_data_item (D.17704, entry);
  mono_debugger_unlock ();
}


mono_debug_free_method_jit_info (struct MonoDebugMethodJitInfo * jit)
{
  struct MonoDebugLineNumberEntry * D.17709;
  struct MonoDebugVarInfo * D.17710;
  struct MonoDebugVarInfo * D.17711;
  struct MonoDebugVarInfo * D.17712;
  struct MonoDebugVarInfo * D.17713;
  struct MonoDebugVarInfo * D.17714;

  if (jit == 0B) goto <D.17707>; else goto <D.17708>;
  <D.17707>:
  return;
  <D.17708>:
  D.17709 = jit->line_numbers;
  monoeg_g_free (D.17709);
  D.17710 = jit->this_var;
  monoeg_g_free (D.17710);
  D.17711 = jit->params;
  monoeg_g_free (D.17711);
  D.17712 = jit->locals;
  monoeg_g_free (D.17712);
  D.17713 = jit->gsharedvt_info_var;
  monoeg_g_free (D.17713);
  D.17714 = jit->gsharedvt_locals_var;
  monoeg_g_free (D.17714);
  monoeg_g_free (jit);
}


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

  mono_debug_format.50 = mono_debug_format;
  if (mono_debug_format.50 == 0) goto <D.17717>; else goto <D.17718>;
  <D.17717>:
  D.17719 = 0B;
  return D.17719;
  <D.17718>:
  mono_debugger_lock ();
  res = find_method (method, domain);
  mono_debugger_unlock ();
  D.17719 = res;
  return D.17719;
}


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

  table = lookup_data_table (domain);
  D.17721 = table->method_address_hash;
  address = monoeg_g_hash_table_lookup (D.17721, method);
  if (address == 0B) goto <D.17722>; else goto <D.17723>;
  <D.17722>:
  D.17724 = 0B;
  return D.17724;
  <D.17723>:
  D.17724 = mono_debug_read_method (address);
  return D.17724;
}


mono_debug_read_method (struct MonoDebugMethodAddress * address)
{
  const guint8 * D.17726;
  unsigned int D.17727;
  const guint8 * D.17728;
  guint8[0:] * ptr.51;
  guint8 * ptr.52;
  unsigned int D.17731;
  unsigned int D.17732;
  unsigned int D.17733;
  unsigned int D.17734;
  long unsigned int D.17735;
  long unsigned int D.17736;
  void * D.17737;
  struct MonoDebugLineNumberEntry * D.17738;
  long unsigned int D.17739;
  long unsigned int D.17740;
  int D.17741;
  unsigned int D.17742;
  int D.17743;
  unsigned int D.17744;
  guint8 * ptr.53;
  guint8 * ptr.54;
  unsigned char D.17747;
  void * D.17750;
  struct MonoDebugVarInfo * D.17751;
  unsigned int D.17752;
  unsigned int D.17753;
  long unsigned int D.17754;
  long unsigned int D.17755;
  void * D.17756;
  struct MonoDebugVarInfo * D.17757;
  long unsigned int D.17758;
  struct MonoDebugVarInfo * D.17759;
  unsigned int D.17760;
  unsigned int D.17761;
  long unsigned int D.17762;
  long unsigned int D.17763;
  void * D.17764;
  struct MonoDebugVarInfo * D.17765;
  struct MonoDebugVarInfo * D.17766;
  guint8 * ptr.55;
  guint8 * ptr.56;
  unsigned char D.17769;
  void * D.17772;
  void * D.17773;
  struct MonoDebugVarInfo * D.17774;
  struct MonoDebugVarInfo * D.17775;
  struct MonoDebugMethodJitInfo * D.17776;
  struct MonoDebugMethodJitInfo * jit;
  guint32 i;
  guint8 * ptr;

  try
    {
      jit = monoeg_malloc0 (104);
      D.17726 = address->code_start;
      jit->code_start = D.17726;
      D.17727 = address->code_size;
      jit->code_size = D.17727;
      D.17728 = address->wrapper_addr;
      jit->wrapper_addr = D.17728;
      ptr.51 = &address->data;
      ptr = ptr.51;
      ptr.52 = ptr;
      D.17731 = read_leb128 (ptr.52, &ptr);
      jit->prologue_end = D.17731;
      ptr.52 = ptr;
      D.17732 = read_leb128 (ptr.52, &ptr);
      jit->epilogue_begin = D.17732;
      ptr.52 = ptr;
      D.17733 = read_leb128 (ptr.52, &ptr);
      jit->num_line_numbers = D.17733;
      D.17734 = jit->num_line_numbers;
      D.17735 = (long unsigned int) D.17734;
      D.17736 = D.17735 * 8;
      D.17737 = monoeg_malloc0 (D.17736);
      jit->line_numbers = D.17737;
      i = 0;
      goto <D.17150>;
      <D.17149>:
      {
        struct MonoDebugLineNumberEntry * lne;

        D.17738 = jit->line_numbers;
        D.17739 = (long unsigned int) i;
        D.17740 = D.17739 * 8;
        lne = D.17738 + D.17740;
        ptr.52 = ptr;
        D.17741 = read_sleb128 (ptr.52, &ptr);
        D.17742 = (unsigned int) D.17741;
        lne->il_offset = D.17742;
        ptr.52 = ptr;
        D.17743 = read_sleb128 (ptr.52, &ptr);
        D.17744 = (unsigned int) D.17743;
        lne->native_offset = D.17744;
      }
      i = i + 1;
      <D.17150>:
      D.17734 = jit->num_line_numbers;
      if (D.17734 > i) goto <D.17149>; else goto <D.17151>;
      <D.17151>:
      ptr.52 = ptr;
      ptr.53 = ptr.52;
      ptr.54 = ptr.53 + 1;
      ptr = ptr.54;
      D.17747 = *ptr.53;
      if (D.17747 != 0) goto <D.17748>; else goto <D.17749>;
      <D.17748>:
      D.17750 = monoeg_malloc0 (32);
      jit->this_var = D.17750;
      D.17751 = jit->this_var;
      ptr.52 = ptr;
      read_variable (D.17751, ptr.52, &ptr);
      <D.17749>:
      ptr.52 = ptr;
      D.17752 = read_leb128 (ptr.52, &ptr);
      jit->num_params = D.17752;
      D.17753 = jit->num_params;
      D.17754 = (long unsigned int) D.17753;
      D.17755 = D.17754 * 32;
      D.17756 = monoeg_malloc0 (D.17755);
      jit->params = D.17756;
      i = 0;
      goto <D.17153>;
      <D.17152>:
      D.17757 = jit->params;
      D.17739 = (long unsigned int) i;
      D.17758 = D.17739 * 32;
      D.17759 = D.17757 + D.17758;
      ptr.52 = ptr;
      read_variable (D.17759, ptr.52, &ptr);
      i = i + 1;
      <D.17153>:
      D.17753 = jit->num_params;
      if (D.17753 > i) goto <D.17152>; else goto <D.17154>;
      <D.17154>:
      ptr.52 = ptr;
      D.17760 = read_leb128 (ptr.52, &ptr);
      jit->num_locals = D.17760;
      D.17761 = jit->num_locals;
      D.17762 = (long unsigned int) D.17761;
      D.17763 = D.17762 * 32;
      D.17764 = monoeg_malloc0 (D.17763);
      jit->locals = D.17764;
      i = 0;
      goto <D.17156>;
      <D.17155>:
      D.17765 = jit->locals;
      D.17739 = (long unsigned int) i;
      D.17758 = D.17739 * 32;
      D.17766 = D.17765 + D.17758;
      ptr.52 = ptr;
      read_variable (D.17766, ptr.52, &ptr);
      i = i + 1;
      <D.17156>:
      D.17761 = jit->num_locals;
      if (D.17761 > i) goto <D.17155>; else goto <D.17157>;
      <D.17157>:
      ptr.52 = ptr;
      ptr.55 = ptr.52;
      ptr.56 = ptr.55 + 1;
      ptr = ptr.56;
      D.17769 = *ptr.55;
      if (D.17769 != 0) goto <D.17770>; else goto <D.17771>;
      <D.17770>:
      D.17772 = monoeg_malloc0 (32);
      jit->gsharedvt_info_var = D.17772;
      D.17773 = monoeg_malloc0 (32);
      jit->gsharedvt_locals_var = D.17773;
      D.17774 = jit->gsharedvt_info_var;
      ptr.52 = ptr;
      read_variable (D.17774, ptr.52, &ptr);
      D.17775 = jit->gsharedvt_locals_var;
      ptr.52 = ptr;
      read_variable (D.17775, ptr.52, &ptr);
      <D.17771>:
      D.17776 = jit;
      return D.17776;
    }
  finally
    {
      ptr = {CLOBBER};
    }
}


read_sleb128 (guint8 * ptr, guint8 * * rptr)
{
  guint8 * ptr.57;
  int D.17780;
  int D.17781;
  int D.17782;
  signed char byte.58;
  int D.17788;
  int D.17791;
  int D.17792;
  gint32 D.17793;
  gint32 result;
  guint32 shift;

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

    ptr.57 = ptr;
    ptr = ptr.57 + 1;
    byte = *ptr.57;
    D.17780 = (int) byte;
    D.17781 = D.17780 & 127;
    D.17782 = D.17781 << shift;
    result = D.17782 | result;
    shift = shift + 7;
    byte.58 = (signed char) byte;
    if (byte.58 < 0) goto <D.17784>; else goto <D.17785>;
    <D.17784>:
    // predicted unlikely by continue predictor.
    goto <D.17131>;
    <D.17785>:
    if (shift <= 31) goto <D.17786>; else goto <D.17787>;
    <D.17786>:
    D.17780 = (int) byte;
    D.17788 = D.17780 & 64;
    if (D.17788 != 0) goto <D.17789>; else goto <D.17790>;
    <D.17789>:
    D.17791 = 1 << shift;
    D.17792 = -D.17791;
    result = D.17792 | result;
    <D.17790>:
    <D.17787>:
    goto <D.17132>;
  }
  <D.17131>:
  goto <D.17133>;
  <D.17132>:
  *rptr = ptr;
  D.17793 = result;
  return D.17793;
}


read_leb128 (guint8 * ptr, guint8 * * rptr)
{
  guint8 * ptr.59;
  int D.17796;
  int D.17797;
  int D.17798;
  unsigned int D.17799;
  signed char byte.60;
  guint32 D.17802;
  guint32 result;
  guint32 shift;

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

    ptr.59 = ptr;
    ptr = ptr.59 + 1;
    byte = *ptr.59;
    D.17796 = (int) byte;
    D.17797 = D.17796 & 127;
    D.17798 = D.17797 << shift;
    D.17799 = (unsigned int) D.17798;
    result = D.17799 | result;
    byte.60 = (signed char) byte;
    if (byte.60 >= 0) goto <D.17122>; else goto <D.17801>;
    <D.17801>:
    shift = shift + 7;
  }
  goto <D.17123>;
  <D.17122>:
  *rptr = ptr;
  D.17802 = result;
  return D.17802;
}


read_variable (struct MonoDebugVarInfo * var, guint8 * ptr, guint8 * * rptr)
{
  guint8 * ptr.61;
  unsigned int D.17805;
  int D.17806;
  unsigned int D.17807;
  unsigned int D.17808;
  unsigned int D.17809;
  unsigned int D.17810;
  void * D.17811;
  guint8 * ptr.62;

  ptr.61 = ptr;
  D.17805 = read_leb128 (ptr.61, &ptr);
  var->index = D.17805;
  ptr.61 = ptr;
  D.17806 = read_sleb128 (ptr.61, &ptr);
  D.17807 = (unsigned int) D.17806;
  var->offset = D.17807;
  ptr.61 = ptr;
  D.17808 = read_leb128 (ptr.61, &ptr);
  var->size = D.17808;
  ptr.61 = ptr;
  D.17809 = read_leb128 (ptr.61, &ptr);
  var->begin_scope = D.17809;
  ptr.61 = ptr;
  D.17810 = read_leb128 (ptr.61, &ptr);
  var->end_scope = D.17810;
  ptr.61 = ptr;
  D.17811 = MEM[(void * *)ptr.61];
  var->type = D.17811;
  ptr.61 = ptr;
  ptr.62 = ptr.61 + 8;
  ptr = ptr.62;
  ptr.61 = ptr;
  *rptr = ptr.61;
}


mono_debug_lookup_method_addresses (struct MonoMethod * method)
{
  int mono_debug_debugger_version.63;
  unsigned int mono_debug_debugger_version.64;
  unsigned int D.17815;
  _Bool D.17816;
  long int D.17817;
  long int D.17818;
  struct MonoMethod * iftmp.65;
  long unsigned int D.17822;
  long unsigned int D.17823;
  struct GHashTable * data_table_hash.66;
  struct MonoDebugMethodAddressList * D.17830;
  struct GSList * D.17831;
  unsigned int D.17832;
  unsigned int D.17833;
  long unsigned int D.17834;
  long unsigned int D.17835;
  unsigned int D.17836;
  unsigned int D.17837;
  long unsigned int D.17838;
  unsigned int size.67;
  unsigned int count.68;
  void * D.17841;
  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.63 = mono_debug_debugger_version;
      mono_debug_debugger_version.64 = (unsigned int) mono_debug_debugger_version.63;
      D.17815 = mono_debug_debugger_version.64 + 4294967292;
      D.17816 = D.17815 > 1;
      D.17817 = (long int) D.17816;
      D.17818 = __builtin_expect (D.17817, 0);
      if (D.17818 != 0) goto <D.17819>; else goto <D.17820>;
      <D.17819>:
      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.17820>:
      mono_debugger_lock ();
      D.17822 = BIT_FIELD_REF <*method, 64, 256>;
      D.17823 = D.17822 & 2251799813685248;
      if (D.17823 != 0) goto <D.17824>; else goto <D.17825>;
      <D.17824>:
      iftmp.65 = MEM[(struct MonoMethodInflated *)method].declaring;
      goto <D.17826>;
      <D.17825>:
      iftmp.65 = method;
      <D.17826>:
      declaring = iftmp.65;
      data.method = declaring;
      data.result = 0B;
      data_table_hash.66 = data_table_hash;
      monoeg_g_hash_table_foreach (data_table_hash.66, lookup_method_address_func, &data);
      header = data.result;
      if (header == 0B) goto <D.17828>; else goto <D.17829>;
      <D.17828>:
      mono_debugger_unlock ();
      D.17830 = 0B;
      return D.17830;
      <D.17829>:
      D.17831 = header->address_list;
      D.17832 = monoeg_g_slist_length (D.17831);
      D.17833 = D.17832 + 1;
      count = (int) D.17833;
      D.17834 = (long unsigned int) count;
      D.17835 = D.17834 + 1;
      D.17836 = (unsigned int) D.17835;
      D.17837 = D.17836 * 8;
      size = (int) D.17837;
      D.17838 = (long unsigned int) size;
      info = monoeg_malloc0 (D.17838);
      size.67 = (unsigned int) size;
      info->size = size.67;
      count.68 = (unsigned int) count;
      info->count = count.68;
      ptr = &info->data;
      MEM[(void * *)ptr] = header;
      ptr = ptr + 8;
      list = header->address_list;
      goto <D.17204>;
      <D.17203>:
      D.17841 = list->data;
      MEM[(void * *)ptr] = D.17841;
      ptr = ptr + 8;
      list = list->next;
      <D.17204>:
      if (list != 0B) goto <D.17203>; else goto <D.17205>;
      <D.17205>:
      mono_debugger_unlock ();
      D.17830 = info;
      return D.17830;
    }
  finally
    {
      data = {CLOBBER};
    }
}


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

  table = value;
  data = user_data;
  D.17844 = table->method_hash;
  D.17845 = data->method;
  header = monoeg_g_hash_table_lookup (D.17844, D.17845);
  if (header != 0B) goto <D.17846>; else goto <D.17847>;
  <D.17846>:
  data->result = header;
  <D.17847>:
}


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

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


il_offset_from_address (struct MonoMethod * method, struct MonoDomain * domain, guint32 native_offset)
{
  struct MonoDebugLineNumberEntry * D.17851;
  unsigned int D.17853;
  unsigned int D.17854;
  long unsigned int D.17855;
  long unsigned int D.17856;
  struct MonoDebugLineNumberEntry * D.17857;
  unsigned int D.17858;
  gint32 D.17861;
  unsigned int D.17862;
  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.17850>;
  <D.17850>:
  D.17851 = jit->line_numbers;
  if (D.17851 == 0B) goto cleanup_and_fail; else goto <D.17852>;
  <D.17852>:
  D.17853 = jit->num_line_numbers;
  D.17854 = D.17853 + 4294967295;
  i = (int) D.17854;
  goto <D.17216>;
  <D.17215>:
  {
    struct MonoDebugLineNumberEntry lne;

    try
      {
        D.17851 = jit->line_numbers;
        D.17855 = (long unsigned int) i;
        D.17856 = D.17855 * 8;
        D.17857 = D.17851 + D.17856;
        lne = *D.17857;
        D.17858 = lne.native_offset;
        if (D.17858 <= native_offset) goto <D.17859>; else goto <D.17860>;
        <D.17859>:
        mono_debug_free_method_jit_info (jit);
        D.17862 = lne.il_offset;
        D.17861 = (gint32) D.17862;
        return D.17861;
        <D.17860>:
      }
    finally
      {
        lne = {CLOBBER};
      }
  }
  i = i + -1;
  <D.17216>:
  if (i >= 0) goto <D.17215>; else goto <D.17217>;
  <D.17217>:
  cleanup_and_fail:
  mono_debug_free_method_jit_info (jit);
  D.17861 = -1;
  return D.17861;
}


mono_debug_lookup_source_location (struct MonoMethod * method, guint32 address, struct MonoDomain * domain)
{
  <unnamed type> mono_debug_format.69;
  struct MonoDebugSourceLocation * D.17869;
  struct MonoDebugHandle * D.17873;
  struct MonoSymbolFile * D.17875;
  int D.17877;
  unsigned int offset.70;
  struct MonoDebugMethodInfo * minfo;
  struct MonoDebugSourceLocation * location;
  gint32 offset;

  mono_debug_format.69 = mono_debug_format;
  if (mono_debug_format.69 == 0) goto <D.17867>; else goto <D.17868>;
  <D.17867>:
  D.17869 = 0B;
  return D.17869;
  <D.17868>:
  mono_debugger_lock ();
  minfo = _mono_debug_lookup_method (method);
  if (minfo == 0B) goto <D.17870>; else goto <D.17872>;
  <D.17872>:
  D.17873 = minfo->handle;
  if (D.17873 == 0B) goto <D.17870>; else goto <D.17874>;
  <D.17874>:
  D.17873 = minfo->handle;
  D.17875 = D.17873->symfile;
  if (D.17875 == 0B) goto <D.17870>; else goto <D.17876>;
  <D.17876>:
  D.17873 = minfo->handle;
  D.17875 = D.17873->symfile;
  D.17877 = mono_debug_symfile_is_loaded (D.17875);
  if (D.17877 == 0) goto <D.17870>; else goto <D.17871>;
  <D.17870>:
  mono_debugger_unlock ();
  D.17869 = 0B;
  return D.17869;
  <D.17871>:
  offset = il_offset_from_address (method, domain, address);
  if (offset < 0) goto <D.17878>; else goto <D.17879>;
  <D.17878>:
  mono_debugger_unlock ();
  D.17869 = 0B;
  return D.17869;
  <D.17879>:
  offset.70 = (unsigned int) offset;
  location = mono_debug_symfile_lookup_location (minfo, offset.70);
  mono_debugger_unlock ();
  D.17869 = location;
  return D.17869;
}


mono_debug_lookup_locals (struct MonoMethod * method)
{
  <unnamed type> mono_debug_format.71;
  struct MonoDebugLocalsInfo * D.17885;
  struct MonoDebugHandle * D.17889;
  struct MonoSymbolFile * D.17891;
  int D.17893;
  struct MonoDebugMethodInfo * minfo;
  struct MonoDebugLocalsInfo * res;

  mono_debug_format.71 = mono_debug_format;
  if (mono_debug_format.71 == 0) goto <D.17883>; else goto <D.17884>;
  <D.17883>:
  D.17885 = 0B;
  return D.17885;
  <D.17884>:
  mono_debugger_lock ();
  minfo = _mono_debug_lookup_method (method);
  if (minfo == 0B) goto <D.17886>; else goto <D.17888>;
  <D.17888>:
  D.17889 = minfo->handle;
  if (D.17889 == 0B) goto <D.17886>; else goto <D.17890>;
  <D.17890>:
  D.17889 = minfo->handle;
  D.17891 = D.17889->symfile;
  if (D.17891 == 0B) goto <D.17886>; else goto <D.17892>;
  <D.17892>:
  D.17889 = minfo->handle;
  D.17891 = D.17889->symfile;
  D.17893 = mono_debug_symfile_is_loaded (D.17891);
  if (D.17893 == 0) goto <D.17886>; else goto <D.17887>;
  <D.17886>:
  mono_debugger_unlock ();
  D.17885 = 0B;
  return D.17885;
  <D.17887>:
  res = mono_debug_symfile_lookup_locals (minfo);
  mono_debugger_unlock ();
  D.17885 = res;
  return D.17885;
}


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

  if (location != 0B) goto <D.17895>; else goto <D.17896>;
  <D.17895>:
  D.17897 = location->source_file;
  monoeg_g_free (D.17897);
  monoeg_g_free (location);
  <D.17896>:
}


mono_debug_print_stack_frame (struct MonoMethod * method, guint32 native_offset, struct MonoDomain * domain)
{
  char D.17898;
  int mono_debug_initialized.72;
  char * D.17910;
  unsigned int D.17911;
  char * D.17912;
  unsigned int D.17913;
  struct MonoDebugSourceLocation * location;
  gchar * fname;
  gchar * ptr;
  gchar * res;
  int offset;

  fname = mono_method_full_name (method, 1);
  ptr = fname;
  goto <D.17251>;
  <D.17250>:
  D.17898 = *ptr;
  if (D.17898 == 58) goto <D.17899>; else goto <D.17900>;
  <D.17899>:
  *ptr = 46;
  <D.17900>:
  ptr = ptr + 1;
  <D.17251>:
  D.17898 = *ptr;
  if (D.17898 != 0) goto <D.17250>; else goto <D.17252>;
  <D.17252>:
  location = mono_debug_lookup_source_location (method, native_offset, domain);
  if (location == 0B) goto <D.17901>; else goto <D.17902>;
  <D.17901>:
  mono_debug_initialized.72 = mono_debug_initialized;
  if (mono_debug_initialized.72 != 0) goto <D.17904>; else goto <D.17905>;
  <D.17904>:
  mono_debugger_lock ();
  offset = il_offset_from_address (method, domain, native_offset);
  mono_debugger_unlock ();
  goto <D.17906>;
  <D.17905>:
  offset = -1;
  <D.17906>:
  if (offset < 0) goto <D.17907>; else goto <D.17908>;
  <D.17907>:
  res = monoeg_g_strdup_printf ("at %s <0x%05x>", fname, native_offset);
  goto <D.17909>;
  <D.17908>:
  res = monoeg_g_strdup_printf ("at %s <IL 0x%05x, 0x%05x>", fname, offset, native_offset);
  <D.17909>:
  monoeg_g_free (fname);
  D.17910 = res;
  return D.17910;
  <D.17902>:
  D.17911 = location->il_offset;
  D.17912 = location->source_file;
  D.17913 = location->row;
  res = monoeg_g_strdup_printf ("at %s [0x%05x] in %s:%d", fname, D.17911, D.17912, D.17913);
  monoeg_g_free (fname);
  mono_debug_free_source_location (location);
  D.17910 = res;
  return D.17910;
}


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

  element = monoeg_malloc0 (16);
  element->data = data;
  ptr = list;
  goto <D.17260>;
  <D.17259>:
  D.17915 = *ptr;
  ptr = &D.17915->next;
  <D.17260>:
  D.17915 = *ptr;
  if (D.17915 != 0B) goto <D.17259>; else goto <D.17261>;
  <D.17261>:
  *ptr = element;
}


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

  ptr = list;
  goto <D.17271>;
  <D.17270>:
  D.17916 = *ptr;
  D.17917 = D.17916->data;
  if (D.17917 != data) goto <D.17918>; else goto <D.17919>;
  <D.17918>:
  // predicted unlikely by continue predictor.
  goto <D.17268>;
  <D.17919>:
  D.17916 = *ptr;
  next = D.17916->next;
  D.17916 = *ptr;
  monoeg_g_free (D.17916);
  *ptr = next;
  goto <D.17269>;
  <D.17268>:
  D.17916 = *ptr;
  ptr = &D.17916->next;
  <D.17271>:
  D.17916 = *ptr;
  if (D.17916 != 0B) goto <D.17270>; else goto <D.17269>;
  <D.17269>:
}


mono_set_is_debugger_attached (gboolean attached)
{
  is_attached = attached;
}


mono_is_debugger_attached ()
{
  mono_bool D.17920;

  D.17920 = is_attached;
  return D.17920;
}


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

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


mono_debug_enabled ()
{
  mono_bool D.17923;
  <unnamed type> mono_debug_format.74;
  _Bool D.17925;

  mono_debug_format.74 = mono_debug_format;
  D.17925 = mono_debug_format.74 != 0;
  D.17923 = (mono_bool) D.17925;
  return D.17923;
}


