mono_inst_name (int op)
{
  unsigned int op.0;
  unsigned int D.22091;
  const char * D.22094;
  int D.22095;
  short int D.22096;
  sizetype D.22097;

  op.0 = (unsigned int) op;
  D.22091 = op.0 + 4294966983;
  if (D.22091 <= 588) goto <D.22092>; else goto <D.22093>;
  <D.22092>:
  D.22095 = op + -313;
  D.22096 = opidx[D.22095];
  D.22097 = (sizetype) D.22096;
  D.22094 = &opstr + D.22097;
  return D.22094;
  <D.22093>:
  if (op <= 312) goto <D.22098>; else goto <D.22099>;
  <D.22098>:
  D.22094 = mono_opcode_name (op);
  return D.22094;
  <D.22099>:
  monoeg_g_log (0B, 4, "unknown opcode name for %d", op);
  <D.22052>:
  goto <D.22052>;
  D.22094 = 0B;
  return D.22094;
}


mono_blockset_print (struct MonoCompile * cfg, struct MonoBitSet * set, const char * name, guint idom)
{
  unsigned int i.1;
  struct MonoBasicBlock * * D.22106;
  unsigned int i.2;
  unsigned int D.22108;
  struct MonoBasicBlock * * D.22109;
  struct MonoBasicBlock * D.22110;
  int D.22111;
  unsigned int D.22113;
  int i;

  if (name != 0B) goto <D.22101>; else goto <D.22102>;
  <D.22101>:
  monoeg_g_print ("%s:", name);
  <D.22102>:
  i = mono_bitset_find_start (set);
  goto <D.22061>;
  <D.22060>:
  i.1 = (unsigned int) i;
  if (i.1 == idom) goto <D.22104>; else goto <D.22105>;
  <D.22104>:
  D.22106 = cfg->bblocks;
  i.2 = (unsigned int) i;
  D.22108 = i.2 * 4;
  D.22109 = D.22106 + D.22108;
  D.22110 = *D.22109;
  D.22111 = D.22110->block_num;
  monoeg_g_print (" [BB%d]", D.22111);
  goto <D.22112>;
  <D.22105>:
  D.22106 = cfg->bblocks;
  i.2 = (unsigned int) i;
  D.22108 = i.2 * 4;
  D.22109 = D.22106 + D.22108;
  D.22110 = *D.22109;
  D.22111 = D.22110->block_num;
  monoeg_g_print (" BB%d", D.22111);
  <D.22112>:
  i = mono_bitset_find_first (set, i);
  <D.22061>:
  i.1 = (unsigned int) i;
  D.22113 = cfg->num_bblocks;
  if (i.1 < D.22113) goto <D.22114>; else goto <D.22062>;
  <D.22114>:
  if (i >= 0) goto <D.22060>; else goto <D.22062>;
  <D.22062>:
  monoeg_g_print ("\n");
}


mono_disassemble_code (struct MonoCompile * cfg, guint8 * code, int size, char * id)
{
  _Bool D.22115;
  long int D.22116;
  long int D.22117;
  const short unsigned int * * D.22123;
  const short unsigned int * D.22124;
  sizetype i.3;
  char * D.22126;
  char D.22127;
  unsigned int D.22128;
  unsigned int D.22129;
  const short unsigned int * D.22130;
  short unsigned int D.22131;
  int D.22132;
  int D.22133;
  int D.22135;
  int D.22139;
  int D.22142;
  void * D.22143;
  int D.22144;
  int D.22145;
  void * D.22146;
  const void * i.4;
  void * D.22150;
  int D.22153;
  guint8 * D.22156;
  unsigned char D.22157;
  unsigned int D.22158;
  char * as_file.5;
  char * o_file.6;
  struct _IO_FILE * stdout.7;
  struct GHashTable * offset_to_bb_hash;
  int i;
  int cindex;
  int bb_num;
  struct FILE * ofd;
  const char * objdump_args;
  char * as_file;
  char * o_file;
  char * cmd;
  int unused;

  try
    {
      offset_to_bb_hash = 0B;
      objdump_args = monoeg_g_getenv ("MONO_OBJDUMP_ARGS");
      i = monoeg_g_file_open_tmp (0B, &as_file, 0B);
      ofd = fdopen (i, "w");
      D.22115 = ofd == 0B;
      D.22116 = (long int) D.22115;
      D.22117 = __builtin_expect (D.22116, 0);
      if (D.22117 != 0) goto <D.22118>; else goto <D.22119>;
      <D.22118>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "helpers.c", 157, "ofd");
      <D.22119>:
      i = 0;
      goto <D.22080>;
      <D.22079>:
      if (i == 0) goto <D.22122>; else goto <D.22120>;
      <D.22122>:
      D.22123 = __ctype_b_loc ();
      D.22124 = *D.22123;
      i.3 = (sizetype) i;
      D.22126 = id + i.3;
      D.22127 = *D.22126;
      D.22128 = (unsigned int) D.22127;
      D.22129 = D.22128 * 2;
      D.22130 = D.22124 + D.22129;
      D.22131 = *D.22130;
      D.22132 = (int) D.22131;
      D.22133 = D.22132 & 2048;
      if (D.22133 != 0) goto <D.22134>; else goto <D.22120>;
      <D.22134>:
      fprintf (ofd, "_");
      goto <D.22121>;
      <D.22120>:
      D.22123 = __ctype_b_loc ();
      D.22124 = *D.22123;
      i.3 = (sizetype) i;
      D.22126 = id + i.3;
      D.22127 = *D.22126;
      D.22128 = (unsigned int) D.22127;
      D.22129 = D.22128 * 2;
      D.22130 = D.22124 + D.22129;
      D.22131 = *D.22130;
      D.22132 = (int) D.22131;
      D.22135 = D.22132 & 8;
      if (D.22135 == 0) goto <D.22136>; else goto <D.22137>;
      <D.22136>:
      fprintf (ofd, "_");
      goto <D.22138>;
      <D.22137>:
      i.3 = (sizetype) i;
      D.22126 = id + i.3;
      D.22127 = *D.22126;
      D.22139 = (int) D.22127;
      fprintf (ofd, "%c", D.22139);
      <D.22138>:
      <D.22121>:
      i = i + 1;
      <D.22080>:
      i.3 = (sizetype) i;
      D.22126 = id + i.3;
      D.22127 = *D.22126;
      if (D.22127 != 0) goto <D.22079>; else goto <D.22081>;
      <D.22081>:
      fprintf (ofd, ":\n");
      if (0 != 0) goto <D.22140>; else goto <D.22141>;
      <D.22140>:
      {
        struct MonoBasicBlock * bb;

        fprintf (ofd, ".stabs\t\"\",100,0,0,.Ltext0\n");
        fprintf (ofd, ".stabs\t\"<BB>\",100,0,0,.Ltext0\n");
        fprintf (ofd, ".Ltext0:\n");
        offset_to_bb_hash = monoeg_g_hash_table_new (0B, 0B);
        bb = cfg->bb_entry;
        goto <D.22084>;
        <D.22083>:
        D.22142 = bb->native_offset;
        D.22143 = (void *) D.22142;
        D.22144 = bb->block_num;
        D.22145 = D.22144 + 1;
        D.22146 = (void *) D.22145;
        monoeg_g_hash_table_insert_replace (offset_to_bb_hash, D.22143, D.22146, 0);
        bb = bb->next_bb;
        <D.22084>:
        if (bb != 0B) goto <D.22083>; else goto <D.22085>;
        <D.22085>:
      }
      <D.22141>:
      cindex = 0;
      i = 0;
      goto <D.22087>;
      <D.22086>:
      if (0 != 0) goto <D.22147>; else goto <D.22148>;
      <D.22147>:
      i.4 = (const void *) i;
      D.22150 = monoeg_g_hash_table_lookup (offset_to_bb_hash, i.4);
      bb_num = (int) D.22150;
      if (bb_num != 0) goto <D.22151>; else goto <D.22152>;
      <D.22151>:
      D.22153 = bb_num + -1;
      fprintf (ofd, "\n.stabd 68,0,%d\n", D.22153);
      cindex = 0;
      <D.22152>:
      <D.22148>:
      if (cindex == 0) goto <D.22154>; else goto <D.22155>;
      <D.22154>:
      i.3 = (sizetype) i;
      D.22156 = code + i.3;
      D.22157 = *D.22156;
      D.22158 = (unsigned int) D.22157;
      fprintf (ofd, "\n.byte %d", D.22158);
      goto <D.22159>;
      <D.22155>:
      i.3 = (sizetype) i;
      D.22156 = code + i.3;
      D.22157 = *D.22156;
      D.22158 = (unsigned int) D.22157;
      fprintf (ofd, ",%d", D.22158);
      <D.22159>:
      cindex = cindex + 1;
      if (cindex == 64) goto <D.22160>; else goto <D.22161>;
      <D.22160>:
      cindex = 0;
      <D.22161>:
      i = i + 1;
      <D.22087>:
      if (i < size) goto <D.22086>; else goto <D.22088>;
      <D.22088>:
      fprintf (ofd, "\n");
      fclose (ofd);
      i = monoeg_g_file_open_tmp (0B, &o_file, 0B);
      close (i);
      as_file.5 = as_file;
      o_file.6 = o_file;
      cmd = monoeg_g_strdup_printf ("as -mips32 %s -o %s", as_file.5, o_file.6);
      unused = system (cmd);
      monoeg_g_free (cmd);
      if (objdump_args == 0B) goto <D.22164>; else goto <D.22165>;
      <D.22164>:
      objdump_args = "";
      <D.22165>:
      stdout.7 = stdout;
      fflush (stdout.7);
      o_file.6 = o_file;
      cmd = monoeg_g_strdup_printf ("objdump -d %s %s", objdump_args, o_file.6);
      unused = system (cmd);
      monoeg_g_free (cmd);
      o_file.6 = o_file;
      unlink (o_file.6);
      as_file.5 = as_file;
      unlink (as_file.5);
      o_file.6 = o_file;
      monoeg_g_free (o_file.6);
      as_file.5 = as_file;
      monoeg_g_free (as_file.5);
    }
  finally
    {
      as_file = {CLOBBER};
      o_file = {CLOBBER};
    }
}


fprintf (struct FILE * restrict __stream, const char * restrict __fmt)
{
  int D.22167;

  D.22167 = __fprintf_chk (__stream, 1, __fmt, __builtin_va_arg_pack ());
  return D.22167;
}


