print_insn_arg (const char *d,

		unsigned char *buffer,

		unsigned char *p0,

		bfd_vma addr,

		disassemble_info *info)

{

  int val = 0;

  int place = d[1];

  unsigned char *p = p0;

  int regno;

  const char *regname;

  unsigned char *p1;

  double flval;

  int flt_p;

  bfd_signed_vma disp;

  unsigned int uval;



  switch (*d)

    {

    case 'c':		/* Cache identifier.  */

      {

        static const char *const cacheFieldName[] = { "nc", "dc", "ic", "bc" };

        val = fetch_arg (buffer, place, 2, info);

        (*info->fprintf_func) (info->stream, cacheFieldName[val]);

        break;

      }



    case 'a':		/* Address register indirect only. Cf. case '+'.  */

      {

        (*info->fprintf_func)

	  (info->stream,

	   "%s@",

	   reg_names[fetch_arg (buffer, place, 3, info) + 8]);

        break;

      }



    case '_':		/* 32-bit absolute address for move16.  */

      {

        uval = NEXTULONG (p);

	(*info->print_address_func) (uval, info);

        break;

      }



    case 'C':

      (*info->fprintf_func) (info->stream, "%%ccr");

      break;



    case 'S':

      (*info->fprintf_func) (info->stream, "%%sr");

      break;



    case 'U':

      (*info->fprintf_func) (info->stream, "%%usp");

      break;



    case 'E':

      (*info->fprintf_func) (info->stream, "%%acc");

      break;



    case 'G':

      (*info->fprintf_func) (info->stream, "%%macsr");

      break;



    case 'H':

      (*info->fprintf_func) (info->stream, "%%mask");

      break;



    case 'J':

      {

	/* FIXME: There's a problem here, different m68k processors call the

	   same address different names. This table can't get it right

	   because it doesn't know which processor it's disassembling for.  */

	static const struct { const char *name; int value; } names[]

	  = {{"%sfc", 0x000}, {"%dfc", 0x001}, {"%cacr", 0x002},

	     {"%tc",  0x003}, {"%itt0",0x004}, {"%itt1", 0x005},

             {"%dtt0",0x006}, {"%dtt1",0x007}, {"%buscr",0x008},

	     {"%usp", 0x800}, {"%vbr", 0x801}, {"%caar", 0x802},

	     {"%msp", 0x803}, {"%isp", 0x804},

	     {"%flashbar", 0xc04}, {"%rambar", 0xc05}, /* mcf528x added these.  */



	     /* Should we be calling this psr like we do in case 'Y'?  */

	     {"%mmusr",0x805},



             {"%urp", 0x806}, {"%srp", 0x807}, {"%pcr", 0x808}};



	val = fetch_arg (buffer, place, 12, info);

	for (regno = sizeof names / sizeof names[0] - 1; regno >= 0; regno--)

	  if (names[regno].value == val)

	    {

	      (*info->fprintf_func) (info->stream, "%s", names[regno].name);

	      break;

	    }

	if (regno < 0)

	  (*info->fprintf_func) (info->stream, "%d", val);

      }

      break;



    case 'Q':

      val = fetch_arg (buffer, place, 3, info);

      /* 0 means 8, except for the bkpt instruction... */

      if (val == 0 && d[1] != 's')

	val = 8;

      (*info->fprintf_func) (info->stream, "#%d", val);

      break;



    case 'x':

      val = fetch_arg (buffer, place, 3, info);

      /* 0 means -1.  */

      if (val == 0)

	val = -1;

      (*info->fprintf_func) (info->stream, "#%d", val);

      break;



    case 'M':

      if (place == 'h')

	{

	  static const char *const scalefactor_name[] = { "<<", ">>" };

	  val = fetch_arg (buffer, place, 1, info);

	  (*info->fprintf_func) (info->stream, scalefactor_name[val]);

	}

      else

	{

	  val = fetch_arg (buffer, place, 8, info);

	  if (val & 0x80)

	    val = val - 0x100;

	  (*info->fprintf_func) (info->stream, "#%d", val);

	}

      break;



    case 'T':

      val = fetch_arg (buffer, place, 4, info);

      (*info->fprintf_func) (info->stream, "#%d", val);

      break;



    case 'D':

      (*info->fprintf_func) (info->stream, "%s",

			     reg_names[fetch_arg (buffer, place, 3, info)]);

      break;



    case 'A':

      (*info->fprintf_func)

	(info->stream, "%s",

	 reg_names[fetch_arg (buffer, place, 3, info) + 010]);

      break;



    case 'R':

      (*info->fprintf_func)

	(info->stream, "%s",

	 reg_names[fetch_arg (buffer, place, 4, info)]);

      break;



    case 'r':

      regno = fetch_arg (buffer, place, 4, info);

      if (regno > 7)

	(*info->fprintf_func) (info->stream, "%s@", reg_names[regno]);

      else

	(*info->fprintf_func) (info->stream, "@(%s)", reg_names[regno]);

      break;



    case 'F':

      (*info->fprintf_func)

	(info->stream, "%%fp%d",

	 fetch_arg (buffer, place, 3, info));

      break;



    case 'O':

      val = fetch_arg (buffer, place, 6, info);

      if (val & 0x20)

	(*info->fprintf_func) (info->stream, "%s", reg_names[val & 7]);

      else

	(*info->fprintf_func) (info->stream, "%d", val);

      break;



    case '+':

      (*info->fprintf_func)

	(info->stream, "%s@+",

	 reg_names[fetch_arg (buffer, place, 3, info) + 8]);

      break;



    case '-':

      (*info->fprintf_func)

	(info->stream, "%s@-",

	 reg_names[fetch_arg (buffer, place, 3, info) + 8]);

      break;



    case 'k':

      if (place == 'k')

	(*info->fprintf_func)

	  (info->stream, "{%s}",

	   reg_names[fetch_arg (buffer, place, 3, info)]);

      else if (place == 'C')

	{

	  val = fetch_arg (buffer, place, 7, info);

	  if (val > 63)		/* This is a signed constant.  */

	    val -= 128;

	  (*info->fprintf_func) (info->stream, "{#%d}", val);

	}

      else

	return -2;

      break;



    case '#':

    case '^':

      p1 = buffer + (*d == '#' ? 2 : 4);

      if (place == 's')

	val = fetch_arg (buffer, place, 4, info);

      else if (place == 'C')

	val = fetch_arg (buffer, place, 7, info);

      else if (place == '8')

	val = fetch_arg (buffer, place, 3, info);

      else if (place == '3')

	val = fetch_arg (buffer, place, 8, info);

      else if (place == 'b')

	val = NEXTBYTE (p1);

      else if (place == 'w' || place == 'W')

	val = NEXTWORD (p1);

      else if (place == 'l')

	val = NEXTLONG (p1);

      else

	return -2;

      (*info->fprintf_func) (info->stream, "#%d", val);

      break;



    case 'B':

      if (place == 'b')

	disp = NEXTBYTE (p);

      else if (place == 'B')

	disp = COERCE_SIGNED_CHAR (buffer[1]);

      else if (place == 'w' || place == 'W')

	disp = NEXTWORD (p);

      else if (place == 'l' || place == 'L' || place == 'C')

	disp = NEXTLONG (p);

      else if (place == 'g')

	{

	  disp = NEXTBYTE (buffer);

	  if (disp == 0)

	    disp = NEXTWORD (p);

	  else if (disp == -1)

	    disp = NEXTLONG (p);

	}

      else if (place == 'c')

	{

	  if (buffer[1] & 0x40)		/* If bit six is one, long offset.  */

	    disp = NEXTLONG (p);

	  else

	    disp = NEXTWORD (p);

	}

      else

	return -2;



      (*info->print_address_func) (addr + disp, info);

      break;



    case 'd':

      val = NEXTWORD (p);

      (*info->fprintf_func)

	(info->stream, "%s@(%d)",

	 reg_names[fetch_arg (buffer, place, 3, info) + 8], val);

      break;



    case 's':

      (*info->fprintf_func) (info->stream, "%s",

			     fpcr_names[fetch_arg (buffer, place, 3, info)]);

      break;



    case 'e':

      val = fetch_arg(buffer, place, 2, info);

      (*info->fprintf_func) (info->stream, "%%acc%d", val);

      break;



    case 'g':

      val = fetch_arg(buffer, place, 1, info);

      (*info->fprintf_func) (info->stream, "%%accext%s", val==0 ? "01" : "23");

      break;



    case 'i':

      val = fetch_arg(buffer, place, 2, info);

      if (val == 1)

	(*info->fprintf_func) (info->stream, "<<");

      else if (val == 3)

	(*info->fprintf_func) (info->stream, ">>");

      else

	return -1;

      break;



    case 'I':

      /* Get coprocessor ID... */

      val = fetch_arg (buffer, 'd', 3, info);



      if (val != 1)				/* Unusual coprocessor ID?  */

	(*info->fprintf_func) (info->stream, "(cpid=%d) ", val);

      break;



    case '4':

    case '*':

    case '~':

    case '%':

    case ';':

    case '@':

    case '!':

    case '$':

    case '?':

    case '/':

    case '&':

    case '|':

    case '<':

    case '>':

    case 'm':

    case 'n':

    case 'o':

    case 'p':

    case 'q':

    case 'v':

    case 'b':

    case 'w':

    case 'y':

    case 'z':

      if (place == 'd')

	{

	  val = fetch_arg (buffer, 'x', 6, info);

	  val = ((val & 7) << 3) + ((val >> 3) & 7);

	}

      else

	val = fetch_arg (buffer, 's', 6, info);



      /* If the <ea> is invalid for *d, then reject this match.  */

      if (!m68k_valid_ea (*d, val))

	return -1;



      /* Get register number assuming address register.  */

      regno = (val & 7) + 8;

      regname = reg_names[regno];

      switch (val >> 3)

	{

	case 0:

	  (*info->fprintf_func) (info->stream, "%s", reg_names[val]);

	  break;



	case 1:

	  (*info->fprintf_func) (info->stream, "%s", regname);

	  break;



	case 2:

	  (*info->fprintf_func) (info->stream, "%s@", regname);

	  break;



	case 3:

	  (*info->fprintf_func) (info->stream, "%s@+", regname);

	  break;



	case 4:

	  (*info->fprintf_func) (info->stream, "%s@-", regname);

	  break;



	case 5:

	  val = NEXTWORD (p);

	  (*info->fprintf_func) (info->stream, "%s@(%d)", regname, val);

	  break;



	case 6:

	  p = print_indexed (regno, p, addr, info);

	  break;



	case 7:

	  switch (val & 7)

	    {

	    case 0:

	      val = NEXTWORD (p);

	      (*info->print_address_func) (val, info);

	      break;



	    case 1:

	      uval = NEXTULONG (p);

	      (*info->print_address_func) (uval, info);

	      break;



	    case 2:

	      val = NEXTWORD (p);

	      (*info->fprintf_func) (info->stream, "%%pc@(");

	      (*info->print_address_func) (addr + val, info);

	      (*info->fprintf_func) (info->stream, ")");

	      break;



	    case 3:

	      p = print_indexed (-1, p, addr, info);

	      break;



	    case 4:

	      flt_p = 1;	/* Assume it's a float... */

	      switch (place)

	      {

		case 'b':

		  val = NEXTBYTE (p);

		  flt_p = 0;

		  break;



		case 'w':

		  val = NEXTWORD (p);

		  flt_p = 0;

		  break;



		case 'l':

		  val = NEXTLONG (p);

		  flt_p = 0;

		  break;



		case 'f':

		  NEXTSINGLE (flval, p);

		  break;



		case 'F':

		  NEXTDOUBLE (flval, p);

		  break;



		case 'x':

		  NEXTEXTEND (flval, p);

		  break;



		case 'p':

		  flval = NEXTPACKED (p);

		  break;



		default:

		  return -1;

	      }

	      if (flt_p)	/* Print a float? */

		(*info->fprintf_func) (info->stream, "#%g", flval);

	      else

		(*info->fprintf_func) (info->stream, "#%d", val);

	      break;



	    default:

	      return -1;

	    }

	}



      /* If place is '/', then this is the case of the mask bit for

	 mac/emac loads. Now that the arg has been printed, grab the

	 mask bit and if set, add a '&' to the arg.  */

      if (place == '/')

	{

	  val = fetch_arg (buffer, place, 1, info);

	  if (val)

	    info->fprintf_func (info->stream, "&");

	}

      break;



    case 'L':

    case 'l':

	if (place == 'w')

	  {

	    char doneany;

	    p1 = buffer + 2;

	    val = NEXTWORD (p1);

	    /* Move the pointer ahead if this point is farther ahead

	       than the last.  */

	    p = p1 > p ? p1 : p;

	    if (val == 0)

	      {

		(*info->fprintf_func) (info->stream, "#0");

		break;

	      }

	    if (*d == 'l')

	      {

		int newval = 0;



		for (regno = 0; regno < 16; ++regno)

		  if (val & (0x8000 >> regno))

		    newval |= 1 << regno;

		val = newval;

	      }

	    val &= 0xffff;

	    doneany = 0;

	    for (regno = 0; regno < 16; ++regno)

	      if (val & (1 << regno))

		{

		  int first_regno;



		  if (doneany)

		    (*info->fprintf_func) (info->stream, "/");

		  doneany = 1;

		  (*info->fprintf_func) (info->stream, "%s", reg_names[regno]);

		  first_regno = regno;

		  while (val & (1 << (regno + 1)))

		    ++regno;

		  if (regno > first_regno)

		    (*info->fprintf_func) (info->stream, "-%s",

					   reg_names[regno]);

		}

	  }

	else if (place == '3')

	  {

	    /* `fmovem' insn.  */

	    char doneany;

	    val = fetch_arg (buffer, place, 8, info);

	    if (val == 0)

	      {

		(*info->fprintf_func) (info->stream, "#0");

		break;

	      }

	    if (*d == 'l')

	      {

		int newval = 0;



		for (regno = 0; regno < 8; ++regno)

		  if (val & (0x80 >> regno))

		    newval |= 1 << regno;

		val = newval;

	      }

	    val &= 0xff;

	    doneany = 0;

	    for (regno = 0; regno < 8; ++regno)

	      if (val & (1 << regno))

		{

		  int first_regno;

		  if (doneany)

		    (*info->fprintf_func) (info->stream, "/");

		  doneany = 1;

		  (*info->fprintf_func) (info->stream, "%%fp%d", regno);

		  first_regno = regno;

		  while (val & (1 << (regno + 1)))

		    ++regno;

		  if (regno > first_regno)

		    (*info->fprintf_func) (info->stream, "-%%fp%d", regno);

		}

	  }

	else if (place == '8')

	  {

	    /* fmoveml for FP status registers.  */

	    (*info->fprintf_func) (info->stream, "%s",

				   fpcr_names[fetch_arg (buffer, place, 3,

							 info)]);

	  }

	else

	  return -2;

      break;



    case 'X':

      place = '8';

    case 'Y':

    case 'Z':

    case 'W':

    case '0':

    case '1':

    case '2':

    case '3':

      {

	int val = fetch_arg (buffer, place, 5, info);

        const char *name = 0;



	switch (val)

	  {

	  case 2: name = "%tt0"; break;

	  case 3: name = "%tt1"; break;

	  case 0x10: name = "%tc"; break;

	  case 0x11: name = "%drp"; break;

	  case 0x12: name = "%srp"; break;

	  case 0x13: name = "%crp"; break;

	  case 0x14: name = "%cal"; break;

	  case 0x15: name = "%val"; break;

	  case 0x16: name = "%scc"; break;

	  case 0x17: name = "%ac"; break;

 	  case 0x18: name = "%psr"; break;

	  case 0x19: name = "%pcsr"; break;

	  case 0x1c:

	  case 0x1d:

	    {

	      int break_reg = ((buffer[3] >> 2) & 7);



	      (*info->fprintf_func)

		(info->stream, val == 0x1c ? "%%bad%d" : "%%bac%d",

		 break_reg);

	    }

	    break;

	  default:

	    (*info->fprintf_func) (info->stream, "<mmu register %d>", val);

	  }

	if (name)

	  (*info->fprintf_func) (info->stream, "%s", name);

      }

      break;



    case 'f':

      {

	int fc = fetch_arg (buffer, place, 5, info);



	if (fc == 1)

	  (*info->fprintf_func) (info->stream, "%%dfc");

	else if (fc == 0)

	  (*info->fprintf_func) (info->stream, "%%sfc");

	else

	  /* xgettext:c-format */

	  (*info->fprintf_func) (info->stream, _("<function code %d>"), fc);

      }

      break;



    case 'V':

      (*info->fprintf_func) (info->stream, "%%val");

      break;



    case 't':

      {

	int level = fetch_arg (buffer, place, 3, info);



	(*info->fprintf_func) (info->stream, "%d", level);

      }

      break;



    case 'u':

      {

	short is_upper = 0;

	int reg = fetch_arg (buffer, place, 5, info);



	if (reg & 0x10)

	  {

	    is_upper = 1;

	    reg &= 0xf;

	  }

	(*info->fprintf_func) (info->stream, "%s%s",

			       reg_half_names[reg],

			       is_upper ? "u" : "l");

      }

      break;



    default:

      return -2;

    }



  return p - p0;

}

print_insn_arg (const char *d,

		unsigned char *buffer,

		unsigned char *p0,

		bfd_vma addr,

		disassemble_info *info)

{

  int val = 0;

  int place = d[1];

  unsigned char *p = p0;

  int regno;

  const char *regname;

  unsigned char *p1;

  double flval;

  int flt_p;

  bfd_signed_vma disp;

  unsigned int uval;



  switch (*d)

    {

    case 'c':		

      {

        static const char *const cacheFieldName[] = { "nc", "dc", "ic", "bc" };

        val = fetch_arg (buffer, place, 2, info);

        (*info->fprintf_func) (info->stream, cacheFieldName[val]);

        break;

      }



    case 'a':		

      {

        (*info->fprintf_func)

	  (info->stream,

	   "%s@",

	   reg_names[fetch_arg (buffer, place, 3, info) + 8]);

        break;

      }



    case '_':		

      {

        uval = NEXTULONG (p);

	(*info->print_address_func) (uval, info);

        break;

      }



    case 'C':

      (*info->fprintf_func) (info->stream, "%%ccr");

      break;



    case 'S':

      (*info->fprintf_func) (info->stream, "%%sr");

      break;



    case 'U':

      (*info->fprintf_func) (info->stream, "%%usp");

      break;



    case 'E':

      (*info->fprintf_func) (info->stream, "%%acc");

      break;



    case 'G':

      (*info->fprintf_func) (info->stream, "%%macsr");

      break;



    case 'H':

      (*info->fprintf_func) (info->stream, "%%mask");

      break;



    case 'J':

      {

	





	static const struct { const char *name; int value; } names[]

	  = {{"%sfc", 0x000}, {"%dfc", 0x001}, {"%cacr", 0x002},

	     {"%tc",  0x003}, {"%itt0",0x004}, {"%itt1", 0x005},

             {"%dtt0",0x006}, {"%dtt1",0x007}, {"%buscr",0x008},

	     {"%usp", 0x800}, {"%vbr", 0x801}, {"%caar", 0x802},

	     {"%msp", 0x803}, {"%isp", 0x804},

	     {"%flashbar", 0xc04}, {"%rambar", 0xc05}, 



	     

	     {"%mmusr",0x805},



             {"%urp", 0x806}, {"%srp", 0x807}, {"%pcr", 0x808}};



	val = fetch_arg (buffer, place, 12, info);

	for (regno = sizeof names / sizeof names[0] - 1; regno >= 0; regno--)

	  if (names[regno].value == val)

	    {

	      (*info->fprintf_func) (info->stream, "%s", names[regno].name);

	      break;

	    }

	if (regno < 0)

	  (*info->fprintf_func) (info->stream, "%d", val);

      }

      break;



    case 'Q':

      val = fetch_arg (buffer, place, 3, info);

      

      if (val == 0 && d[1] != 's')

	val = 8;

      (*info->fprintf_func) (info->stream, "#%d", val);

      break;



    case 'x':

      val = fetch_arg (buffer, place, 3, info);

      

      if (val == 0)

	val = -1;

      (*info->fprintf_func) (info->stream, "#%d", val);

      break;



    case 'M':

      if (place == 'h')

	{

	  static const char *const scalefactor_name[] = { "<<", ">>" };

	  val = fetch_arg (buffer, place, 1, info);

	  (*info->fprintf_func) (info->stream, scalefactor_name[val]);

	}

      else

	{

	  val = fetch_arg (buffer, place, 8, info);

	  if (val & 0x80)

	    val = val - 0x100;

	  (*info->fprintf_func) (info->stream, "#%d", val);

	}

      break;



    case 'T':

      val = fetch_arg (buffer, place, 4, info);

      (*info->fprintf_func) (info->stream, "#%d", val);

      break;



    case 'D':

      (*info->fprintf_func) (info->stream, "%s",

			     reg_names[fetch_arg (buffer, place, 3, info)]);

      break;



    case 'A':

      (*info->fprintf_func)

	(info->stream, "%s",

	 reg_names[fetch_arg (buffer, place, 3, info) + 010]);

      break;



    case 'R':

      (*info->fprintf_func)

	(info->stream, "%s",

	 reg_names[fetch_arg (buffer, place, 4, info)]);

      break;



    case 'r':

      regno = fetch_arg (buffer, place, 4, info);

      if (regno > 7)

	(*info->fprintf_func) (info->stream, "%s@", reg_names[regno]);

      else

	(*info->fprintf_func) (info->stream, "@(%s)", reg_names[regno]);

      break;



    case 'F':

      (*info->fprintf_func)

	(info->stream, "%%fp%d",

	 fetch_arg (buffer, place, 3, info));

      break;



    case 'O':

      val = fetch_arg (buffer, place, 6, info);

      if (val & 0x20)

	(*info->fprintf_func) (info->stream, "%s", reg_names[val & 7]);

      else

	(*info->fprintf_func) (info->stream, "%d", val);

      break;



    case '+':

      (*info->fprintf_func)

	(info->stream, "%s@+",

	 reg_names[fetch_arg (buffer, place, 3, info) + 8]);

      break;



    case '-':

      (*info->fprintf_func)

	(info->stream, "%s@-",

	 reg_names[fetch_arg (buffer, place, 3, info) + 8]);

      break;



    case 'k':

      if (place == 'k')

	(*info->fprintf_func)

	  (info->stream, "{%s}",

	   reg_names[fetch_arg (buffer, place, 3, info)]);

      else if (place == 'C')

	{

	  val = fetch_arg (buffer, place, 7, info);

	  if (val > 63)		

	    val -= 128;

	  (*info->fprintf_func) (info->stream, "{#%d}", val);

	}

      else

	return -2;

      break;



    case '#':

    case '^':

      p1 = buffer + (*d == '#' ? 2 : 4);

      if (place == 's')

	val = fetch_arg (buffer, place, 4, info);

      else if (place == 'C')

	val = fetch_arg (buffer, place, 7, info);

      else if (place == '8')

	val = fetch_arg (buffer, place, 3, info);

      else if (place == '3')

	val = fetch_arg (buffer, place, 8, info);

      else if (place == 'b')

	val = NEXTBYTE (p1);

      else if (place == 'w' || place == 'W')

	val = NEXTWORD (p1);

      else if (place == 'l')

	val = NEXTLONG (p1);

      else

	return -2;

      (*info->fprintf_func) (info->stream, "#%d", val);

      break;



    case 'B':

      if (place == 'b')

	disp = NEXTBYTE (p);

      else if (place == 'B')

	disp = COERCE_SIGNED_CHAR (buffer[1]);

      else if (place == 'w' || place == 'W')

	disp = NEXTWORD (p);

      else if (place == 'l' || place == 'L' || place == 'C')

	disp = NEXTLONG (p);

      else if (place == 'g')

	{

	  disp = NEXTBYTE (buffer);

	  if (disp == 0)

	    disp = NEXTWORD (p);

	  else if (disp == -1)

	    disp = NEXTLONG (p);

	}

      else if (place == 'c')

	{

	  if (buffer[1] & 0x40)		

	    disp = NEXTLONG (p);

	  else

	    disp = NEXTWORD (p);

	}

      else

	return -2;



      (*info->print_address_func) (addr + disp, info);

      break;



    case 'd':

      val = NEXTWORD (p);

      (*info->fprintf_func)

	(info->stream, "%s@(%d)",

	 reg_names[fetch_arg (buffer, place, 3, info) + 8], val);

      break;



    case 's':

      (*info->fprintf_func) (info->stream, "%s",

			     fpcr_names[fetch_arg (buffer, place, 3, info)]);

      break;



    case 'e':

      val = fetch_arg(buffer, place, 2, info);

      (*info->fprintf_func) (info->stream, "%%acc%d", val);

      break;



    case 'g':

      val = fetch_arg(buffer, place, 1, info);

      (*info->fprintf_func) (info->stream, "%%accext%s", val==0 ? "01" : "23");

      break;



    case 'i':

      val = fetch_arg(buffer, place, 2, info);

      if (val == 1)

	(*info->fprintf_func) (info->stream, "<<");

      else if (val == 3)

	(*info->fprintf_func) (info->stream, ">>");

      else

	return -1;

      break;



    case 'I':

      

      val = fetch_arg (buffer, 'd', 3, info);



      if (val != 1)				

	(*info->fprintf_func) (info->stream, "(cpid=%d) ", val);

      break;



    case '4':

    case '*':

    case '~':

    case '%':

    case ';':

    case '@':

    case '!':

    case '$':

    case '?':

    case '/':

    case '&':

    case '|':

    case '<':

    case '>':

    case 'm':

    case 'n':

    case 'o':

    case 'p':

    case 'q':

    case 'v':

    case 'b':

    case 'w':

    case 'y':

    case 'z':

      if (place == 'd')

	{

	  val = fetch_arg (buffer, 'x', 6, info);

	  val = ((val & 7) << 3) + ((val >> 3) & 7);

	}

      else

	val = fetch_arg (buffer, 's', 6, info);



      

      if (!m68k_valid_ea (*d, val))

	return -1;



      

      regno = (val & 7) + 8;

      regname = reg_names[regno];

      switch (val >> 3)

	{

	case 0:

	  (*info->fprintf_func) (info->stream, "%s", reg_names[val]);

	  break;



	case 1:

	  (*info->fprintf_func) (info->stream, "%s", regname);

	  break;



	case 2:

	  (*info->fprintf_func) (info->stream, "%s@", regname);

	  break;



	case 3:

	  (*info->fprintf_func) (info->stream, "%s@+", regname);

	  break;



	case 4:

	  (*info->fprintf_func) (info->stream, "%s@-", regname);

	  break;



	case 5:

	  val = NEXTWORD (p);

	  (*info->fprintf_func) (info->stream, "%s@(%d)", regname, val);

	  break;



	case 6:

	  p = print_indexed (regno, p, addr, info);

	  break;



	case 7:

	  switch (val & 7)

	    {

	    case 0:

	      val = NEXTWORD (p);

	      (*info->print_address_func) (val, info);

	      break;



	    case 1:

	      uval = NEXTULONG (p);

	      (*info->print_address_func) (uval, info);

	      break;



	    case 2:

	      val = NEXTWORD (p);

	      (*info->fprintf_func) (info->stream, "%%pc@(");

	      (*info->print_address_func) (addr + val, info);

	      (*info->fprintf_func) (info->stream, ")");

	      break;



	    case 3:

	      p = print_indexed (-1, p, addr, info);

	      break;



	    case 4:

	      flt_p = 1;	

	      switch (place)

	      {

		case 'b':

		  val = NEXTBYTE (p);

		  flt_p = 0;

		  break;



		case 'w':

		  val = NEXTWORD (p);

		  flt_p = 0;

		  break;



		case 'l':

		  val = NEXTLONG (p);

		  flt_p = 0;

		  break;



		case 'f':

		  NEXTSINGLE (flval, p);

		  break;



		case 'F':

		  NEXTDOUBLE (flval, p);

		  break;



		case 'x':

		  NEXTEXTEND (flval, p);

		  break;



		case 'p':

		  flval = NEXTPACKED (p);

		  break;



		default:

		  return -1;

	      }

	      if (flt_p)	

		(*info->fprintf_func) (info->stream, "#%g", flval);

	      else

		(*info->fprintf_func) (info->stream, "#%d", val);

	      break;



	    default:

	      return -1;

	    }

	}



      





      if (place == '/')

	{

	  val = fetch_arg (buffer, place, 1, info);

	  if (val)

	    info->fprintf_func (info->stream, "&");

	}

      break;



    case 'L':

    case 'l':

	if (place == 'w')

	  {

	    char doneany;

	    p1 = buffer + 2;

	    val = NEXTWORD (p1);

	    



	    p = p1 > p ? p1 : p;

	    if (val == 0)

	      {

		(*info->fprintf_func) (info->stream, "#0");

		break;

	      }

	    if (*d == 'l')

	      {

		int newval = 0;



		for (regno = 0; regno < 16; ++regno)

		  if (val & (0x8000 >> regno))

		    newval |= 1 << regno;

		val = newval;

	      }

	    val &= 0xffff;

	    doneany = 0;

	    for (regno = 0; regno < 16; ++regno)

	      if (val & (1 << regno))

		{

		  int first_regno;



		  if (doneany)

		    (*info->fprintf_func) (info->stream, "/");

		  doneany = 1;

		  (*info->fprintf_func) (info->stream, "%s", reg_names[regno]);

		  first_regno = regno;

		  while (val & (1 << (regno + 1)))

		    ++regno;

		  if (regno > first_regno)

		    (*info->fprintf_func) (info->stream, "-%s",

					   reg_names[regno]);

		}

	  }

	else if (place == '3')

	  {

	    

	    char doneany;

	    val = fetch_arg (buffer, place, 8, info);

	    if (val == 0)

	      {

		(*info->fprintf_func) (info->stream, "#0");

		break;

	      }

	    if (*d == 'l')

	      {

		int newval = 0;



		for (regno = 0; regno < 8; ++regno)

		  if (val & (0x80 >> regno))

		    newval |= 1 << regno;

		val = newval;

	      }

	    val &= 0xff;

	    doneany = 0;

	    for (regno = 0; regno < 8; ++regno)

	      if (val & (1 << regno))

		{

		  int first_regno;

		  if (doneany)

		    (*info->fprintf_func) (info->stream, "/");

		  doneany = 1;

		  (*info->fprintf_func) (info->stream, "%%fp%d", regno);

		  first_regno = regno;

		  while (val & (1 << (regno + 1)))

		    ++regno;

		  if (regno > first_regno)

		    (*info->fprintf_func) (info->stream, "-%%fp%d", regno);

		}

	  }

	else if (place == '8')

	  {

	    

	    (*info->fprintf_func) (info->stream, "%s",

				   fpcr_names[fetch_arg (buffer, place, 3,

							 info)]);

	  }

	else

	  return -2;

      break;



    case 'X':

      place = '8';

    case 'Y':

    case 'Z':

    case 'W':

    case '0':

    case '1':

    case '2':

    case '3':

      {

	int val = fetch_arg (buffer, place, 5, info);

        const char *name = 0;



	switch (val)

	  {

	  case 2: name = "%tt0"; break;

	  case 3: name = "%tt1"; break;

	  case 0x10: name = "%tc"; break;

	  case 0x11: name = "%drp"; break;

	  case 0x12: name = "%srp"; break;

	  case 0x13: name = "%crp"; break;

	  case 0x14: name = "%cal"; break;

	  case 0x15: name = "%val"; break;

	  case 0x16: name = "%scc"; break;

	  case 0x17: name = "%ac"; break;

 	  case 0x18: name = "%psr"; break;

	  case 0x19: name = "%pcsr"; break;

	  case 0x1c:

	  case 0x1d:

	    {

	      int break_reg = ((buffer[3] >> 2) & 7);



	      (*info->fprintf_func)

		(info->stream, val == 0x1c ? "%%bad%d" : "%%bac%d",

		 break_reg);

	    }

	    break;

	  default:

	    (*info->fprintf_func) (info->stream, "<mmu register %d>", val);

	  }

	if (name)

	  (*info->fprintf_func) (info->stream, "%s", name);

      }

      break;



    case 'f':

      {

	int fc = fetch_arg (buffer, place, 5, info);



	if (fc == 1)

	  (*info->fprintf_func) (info->stream, "%%dfc");

	else if (fc == 0)

	  (*info->fprintf_func) (info->stream, "%%sfc");

	else

	  

	  (*info->fprintf_func) (info->stream, _("<function code %d>"), fc);

      }

      break;



    case 'V':

      (*info->fprintf_func) (info->stream, "%%val");

      break;



    case 't':

      {

	int level = fetch_arg (buffer, place, 3, info);



	(*info->fprintf_func) (info->stream, "%d", level);

      }

      break;



    case 'u':

      {

	short is_upper = 0;

	int reg = fetch_arg (buffer, place, 5, info);



	if (reg & 0x10)

	  {

	    is_upper = 1;

	    reg &= 0xf;

	  }

	(*info->fprintf_func) (info->stream, "%s%s",

			       reg_half_names[reg],

			       is_upper ? "u" : "l");

      }

      break;



    default:

      return -2;

    }



  return p - p0;

}

FUNC_0 (const char *VAR_0,

		unsigned char *VAR_1,

		unsigned char *VAR_2,

		bfd_vma VAR_3,

		disassemble_info *VAR_4)

{

  int VAR_20 = 0;

  int VAR_6 = VAR_0[1];

  unsigned char *VAR_7 = VAR_2;

  int VAR_8;

  const char *VAR_9;

  unsigned char *VAR_10;

  double VAR_11;

  int VAR_12;

  bfd_signed_vma disp;

  unsigned int VAR_13;



  switch (*VAR_0)

    {

    case 'c':		

      {

        static const char *const VAR_14[] = { "nc", "dc", "ic", "bc" };

        VAR_20 = fetch_arg (VAR_1, VAR_6, 2, VAR_4);

        (*VAR_4->fprintf_func) (VAR_4->stream, VAR_14[VAR_20]);

        break;

      }



    case 'a':		

      {

        (*VAR_4->fprintf_func)

	  (VAR_4->stream,

	   "%s@",

	   reg_names[fetch_arg (VAR_1, VAR_6, 3, VAR_4) + 8]);

        break;

      }



    case '_':		

      {

        VAR_13 = NEXTULONG (VAR_7);

	(*VAR_4->print_address_func) (VAR_13, VAR_4);

        break;

      }



    case 'C':

      (*VAR_4->fprintf_func) (VAR_4->stream, "%%ccr");

      break;



    case 'S':

      (*VAR_4->fprintf_func) (VAR_4->stream, "%%sr");

      break;



    case 'U':

      (*VAR_4->fprintf_func) (VAR_4->stream, "%%usp");

      break;



    case 'E':

      (*VAR_4->fprintf_func) (VAR_4->stream, "%%acc");

      break;



    case 'G':

      (*VAR_4->fprintf_func) (VAR_4->stream, "%%macsr");

      break;



    case 'H':

      (*VAR_4->fprintf_func) (VAR_4->stream, "%%mask");

      break;



    case 'J':

      {

	





	static const struct { const char *VAR_20; int value; } VAR_15[]

	  = {{"%sfc", 0x000}, {"%dfc", 0x001}, {"%cacr", 0x002},

	     {"%tc",  0x003}, {"%itt0",0x004}, {"%itt1", 0x005},

             {"%dtt0",0x006}, {"%dtt1",0x007}, {"%buscr",0x008},

	     {"%usp", 0x800}, {"%vbr", 0x801}, {"%caar", 0x802},

	     {"%msp", 0x803}, {"%isp", 0x804},

	     {"%flashbar", 0xc04}, {"%rambar", 0xc05}, 



	     

	     {"%mmusr",0x805},



             {"%urp", 0x806}, {"%srp", 0x807}, {"%pcr", 0x808}};



	VAR_20 = fetch_arg (VAR_1, VAR_6, 12, VAR_4);

	for (VAR_8 = sizeof VAR_15 / sizeof VAR_15[0] - 1; VAR_8 >= 0; VAR_8--)

	  if (VAR_15[VAR_8].value == VAR_20)

	    {

	      (*VAR_4->fprintf_func) (VAR_4->stream, "%s", VAR_15[VAR_8].VAR_20);

	      break;

	    }

	if (VAR_8 < 0)

	  (*VAR_4->fprintf_func) (VAR_4->stream, "%VAR_0", VAR_20);

      }

      break;



    case 'Q':

      VAR_20 = fetch_arg (VAR_1, VAR_6, 3, VAR_4);

      

      if (VAR_20 == 0 && VAR_0[1] != 's')

	VAR_20 = 8;

      (*VAR_4->fprintf_func) (VAR_4->stream, "#%VAR_0", VAR_20);

      break;



    case 'x':

      VAR_20 = fetch_arg (VAR_1, VAR_6, 3, VAR_4);

      

      if (VAR_20 == 0)

	VAR_20 = -1;

      (*VAR_4->fprintf_func) (VAR_4->stream, "#%VAR_0", VAR_20);

      break;



    case 'M':

      if (VAR_6 == 'h')

	{

	  static const char *const VAR_16[] = { "<<", ">>" };

	  VAR_20 = fetch_arg (VAR_1, VAR_6, 1, VAR_4);

	  (*VAR_4->fprintf_func) (VAR_4->stream, VAR_16[VAR_20]);

	}

      else

	{

	  VAR_20 = fetch_arg (VAR_1, VAR_6, 8, VAR_4);

	  if (VAR_20 & 0x80)

	    VAR_20 = VAR_20 - 0x100;

	  (*VAR_4->fprintf_func) (VAR_4->stream, "#%VAR_0", VAR_20);

	}

      break;



    case 'T':

      VAR_20 = fetch_arg (VAR_1, VAR_6, 4, VAR_4);

      (*VAR_4->fprintf_func) (VAR_4->stream, "#%VAR_0", VAR_20);

      break;



    case 'D':

      (*VAR_4->fprintf_func) (VAR_4->stream, "%s",

			     reg_names[fetch_arg (VAR_1, VAR_6, 3, VAR_4)]);

      break;



    case 'A':

      (*VAR_4->fprintf_func)

	(VAR_4->stream, "%s",

	 reg_names[fetch_arg (VAR_1, VAR_6, 3, VAR_4) + 010]);

      break;



    case 'R':

      (*VAR_4->fprintf_func)

	(VAR_4->stream, "%s",

	 reg_names[fetch_arg (VAR_1, VAR_6, 4, VAR_4)]);

      break;



    case 'r':

      VAR_8 = fetch_arg (VAR_1, VAR_6, 4, VAR_4);

      if (VAR_8 > 7)

	(*VAR_4->fprintf_func) (VAR_4->stream, "%s@", reg_names[VAR_8]);

      else

	(*VAR_4->fprintf_func) (VAR_4->stream, "@(%s)", reg_names[VAR_8]);

      break;



    case 'F':

      (*VAR_4->fprintf_func)

	(VAR_4->stream, "%%fp%VAR_0",

	 fetch_arg (VAR_1, VAR_6, 3, VAR_4));

      break;



    case 'O':

      VAR_20 = fetch_arg (VAR_1, VAR_6, 6, VAR_4);

      if (VAR_20 & 0x20)

	(*VAR_4->fprintf_func) (VAR_4->stream, "%s", reg_names[VAR_20 & 7]);

      else

	(*VAR_4->fprintf_func) (VAR_4->stream, "%VAR_0", VAR_20);

      break;



    case '+':

      (*VAR_4->fprintf_func)

	(VAR_4->stream, "%s@+",

	 reg_names[fetch_arg (VAR_1, VAR_6, 3, VAR_4) + 8]);

      break;



    case '-':

      (*VAR_4->fprintf_func)

	(VAR_4->stream, "%s@-",

	 reg_names[fetch_arg (VAR_1, VAR_6, 3, VAR_4) + 8]);

      break;



    case 'k':

      if (VAR_6 == 'k')

	(*VAR_4->fprintf_func)

	  (VAR_4->stream, "{%s}",

	   reg_names[fetch_arg (VAR_1, VAR_6, 3, VAR_4)]);

      else if (VAR_6 == 'C')

	{

	  VAR_20 = fetch_arg (VAR_1, VAR_6, 7, VAR_4);

	  if (VAR_20 > 63)		

	    VAR_20 -= 128;

	  (*VAR_4->fprintf_func) (VAR_4->stream, "{#%VAR_0}", VAR_20);

	}

      else

	return -2;

      break;



    case '#':

    case '^':

      VAR_10 = VAR_1 + (*VAR_0 == '#' ? 2 : 4);

      if (VAR_6 == 's')

	VAR_20 = fetch_arg (VAR_1, VAR_6, 4, VAR_4);

      else if (VAR_6 == 'C')

	VAR_20 = fetch_arg (VAR_1, VAR_6, 7, VAR_4);

      else if (VAR_6 == '8')

	VAR_20 = fetch_arg (VAR_1, VAR_6, 3, VAR_4);

      else if (VAR_6 == '3')

	VAR_20 = fetch_arg (VAR_1, VAR_6, 8, VAR_4);

      else if (VAR_6 == 'b')

	VAR_20 = NEXTBYTE (VAR_10);

      else if (VAR_6 == 'w' || VAR_6 == 'W')

	VAR_20 = NEXTWORD (VAR_10);

      else if (VAR_6 == 'l')

	VAR_20 = NEXTLONG (VAR_10);

      else

	return -2;

      (*VAR_4->fprintf_func) (VAR_4->stream, "#%VAR_0", VAR_20);

      break;



    case 'B':

      if (VAR_6 == 'b')

	disp = NEXTBYTE (VAR_7);

      else if (VAR_6 == 'B')

	disp = COERCE_SIGNED_CHAR (VAR_1[1]);

      else if (VAR_6 == 'w' || VAR_6 == 'W')

	disp = NEXTWORD (VAR_7);

      else if (VAR_6 == 'l' || VAR_6 == 'L' || VAR_6 == 'C')

	disp = NEXTLONG (VAR_7);

      else if (VAR_6 == 'g')

	{

	  disp = NEXTBYTE (VAR_1);

	  if (disp == 0)

	    disp = NEXTWORD (VAR_7);

	  else if (disp == -1)

	    disp = NEXTLONG (VAR_7);

	}

      else if (VAR_6 == 'c')

	{

	  if (VAR_1[1] & 0x40)		

	    disp = NEXTLONG (VAR_7);

	  else

	    disp = NEXTWORD (VAR_7);

	}

      else

	return -2;



      (*VAR_4->print_address_func) (VAR_3 + disp, VAR_4);

      break;



    case 'VAR_0':

      VAR_20 = NEXTWORD (VAR_7);

      (*VAR_4->fprintf_func)

	(VAR_4->stream, "%s@(%VAR_0)",

	 reg_names[fetch_arg (VAR_1, VAR_6, 3, VAR_4) + 8], VAR_20);

      break;



    case 's':

      (*VAR_4->fprintf_func) (VAR_4->stream, "%s",

			     fpcr_names[fetch_arg (VAR_1, VAR_6, 3, VAR_4)]);

      break;



    case 'e':

      VAR_20 = fetch_arg(VAR_1, VAR_6, 2, VAR_4);

      (*VAR_4->fprintf_func) (VAR_4->stream, "%%acc%VAR_0", VAR_20);

      break;



    case 'g':

      VAR_20 = fetch_arg(VAR_1, VAR_6, 1, VAR_4);

      (*VAR_4->fprintf_func) (VAR_4->stream, "%%accext%s", VAR_20==0 ? "01" : "23");

      break;



    case 'i':

      VAR_20 = fetch_arg(VAR_1, VAR_6, 2, VAR_4);

      if (VAR_20 == 1)

	(*VAR_4->fprintf_func) (VAR_4->stream, "<<");

      else if (VAR_20 == 3)

	(*VAR_4->fprintf_func) (VAR_4->stream, ">>");

      else

	return -1;

      break;



    case 'I':

      

      VAR_20 = fetch_arg (VAR_1, 'VAR_0', 3, VAR_4);



      if (VAR_20 != 1)				

	(*VAR_4->fprintf_func) (VAR_4->stream, "(cpid=%VAR_0) ", VAR_20);

      break;



    case '4':

    case '*':

    case '~':

    case '%':

    case ';':

    case '@':

    case '!':

    case '$':

    case '?':

    case '/':

    case '&':

    case '|':

    case '<':

    case '>':

    case 'm':

    case 'n':

    case 'o':

    case 'VAR_7':

    case 'q':

    case 'v':

    case 'b':

    case 'w':

    case 'y':

    case 'z':

      if (VAR_6 == 'VAR_0')

	{

	  VAR_20 = fetch_arg (VAR_1, 'x', 6, VAR_4);

	  VAR_20 = ((VAR_20 & 7) << 3) + ((VAR_20 >> 3) & 7);

	}

      else

	VAR_20 = fetch_arg (VAR_1, 's', 6, VAR_4);



      

      if (!m68k_valid_ea (*VAR_0, VAR_20))

	return -1;



      

      VAR_8 = (VAR_20 & 7) + 8;

      VAR_9 = reg_names[VAR_8];

      switch (VAR_20 >> 3)

	{

	case 0:

	  (*VAR_4->fprintf_func) (VAR_4->stream, "%s", reg_names[VAR_20]);

	  break;



	case 1:

	  (*VAR_4->fprintf_func) (VAR_4->stream, "%s", VAR_9);

	  break;



	case 2:

	  (*VAR_4->fprintf_func) (VAR_4->stream, "%s@", VAR_9);

	  break;



	case 3:

	  (*VAR_4->fprintf_func) (VAR_4->stream, "%s@+", VAR_9);

	  break;



	case 4:

	  (*VAR_4->fprintf_func) (VAR_4->stream, "%s@-", VAR_9);

	  break;



	case 5:

	  VAR_20 = NEXTWORD (VAR_7);

	  (*VAR_4->fprintf_func) (VAR_4->stream, "%s@(%VAR_0)", VAR_9, VAR_20);

	  break;



	case 6:

	  VAR_7 = print_indexed (VAR_8, VAR_7, VAR_3, VAR_4);

	  break;



	case 7:

	  switch (VAR_20 & 7)

	    {

	    case 0:

	      VAR_20 = NEXTWORD (VAR_7);

	      (*VAR_4->print_address_func) (VAR_20, VAR_4);

	      break;



	    case 1:

	      VAR_13 = NEXTULONG (VAR_7);

	      (*VAR_4->print_address_func) (VAR_13, VAR_4);

	      break;



	    case 2:

	      VAR_20 = NEXTWORD (VAR_7);

	      (*VAR_4->fprintf_func) (VAR_4->stream, "%%pc@(");

	      (*VAR_4->print_address_func) (VAR_3 + VAR_20, VAR_4);

	      (*VAR_4->fprintf_func) (VAR_4->stream, ")");

	      break;



	    case 3:

	      VAR_7 = print_indexed (-1, VAR_7, VAR_3, VAR_4);

	      break;



	    case 4:

	      VAR_12 = 1;	

	      switch (VAR_6)

	      {

		case 'b':

		  VAR_20 = NEXTBYTE (VAR_7);

		  VAR_12 = 0;

		  break;



		case 'w':

		  VAR_20 = NEXTWORD (VAR_7);

		  VAR_12 = 0;

		  break;



		case 'l':

		  VAR_20 = NEXTLONG (VAR_7);

		  VAR_12 = 0;

		  break;



		case 'f':

		  NEXTSINGLE (VAR_11, VAR_7);

		  break;



		case 'F':

		  NEXTDOUBLE (VAR_11, VAR_7);

		  break;



		case 'x':

		  NEXTEXTEND (VAR_11, VAR_7);

		  break;



		case 'VAR_7':

		  VAR_11 = NEXTPACKED (VAR_7);

		  break;



		default:

		  return -1;

	      }

	      if (VAR_12)	

		(*VAR_4->fprintf_func) (VAR_4->stream, "#%g", VAR_11);

	      else

		(*VAR_4->fprintf_func) (VAR_4->stream, "#%VAR_0", VAR_20);

	      break;



	    default:

	      return -1;

	    }

	}



      





      if (VAR_6 == '/')

	{

	  VAR_20 = fetch_arg (VAR_1, VAR_6, 1, VAR_4);

	  if (VAR_20)

	    VAR_4->fprintf_func (VAR_4->stream, "&");

	}

      break;



    case 'L':

    case 'l':

	if (VAR_6 == 'w')

	  {

	    char VAR_20;

	    VAR_10 = VAR_1 + 2;

	    VAR_20 = NEXTWORD (VAR_10);

	    



	    VAR_7 = VAR_10 > VAR_7 ? VAR_10 : VAR_7;

	    if (VAR_20 == 0)

	      {

		(*VAR_4->fprintf_func) (VAR_4->stream, "#0");

		break;

	      }

	    if (*VAR_0 == 'l')

	      {

		int VAR_20 = 0;



		for (VAR_8 = 0; VAR_8 < 16; ++VAR_8)

		  if (VAR_20 & (0x8000 >> VAR_8))

		    VAR_20 |= 1 << VAR_8;

		VAR_20 = VAR_20;

	      }

	    VAR_20 &= 0xffff;

	    VAR_20 = 0;

	    for (VAR_8 = 0; VAR_8 < 16; ++VAR_8)

	      if (VAR_20 & (1 << VAR_8))

		{

		  int VAR_20;



		  if (VAR_20)

		    (*VAR_4->fprintf_func) (VAR_4->stream, "/");

		  VAR_20 = 1;

		  (*VAR_4->fprintf_func) (VAR_4->stream, "%s", reg_names[VAR_8]);

		  VAR_20 = VAR_8;

		  while (VAR_20 & (1 << (VAR_8 + 1)))

		    ++VAR_8;

		  if (VAR_8 > VAR_20)

		    (*VAR_4->fprintf_func) (VAR_4->stream, "-%s",

					   reg_names[VAR_8]);

		}

	  }

	else if (VAR_6 == '3')

	  {

	    

	    char VAR_20;

	    VAR_20 = fetch_arg (VAR_1, VAR_6, 8, VAR_4);

	    if (VAR_20 == 0)

	      {

		(*VAR_4->fprintf_func) (VAR_4->stream, "#0");

		break;

	      }

	    if (*VAR_0 == 'l')

	      {

		int VAR_20 = 0;



		for (VAR_8 = 0; VAR_8 < 8; ++VAR_8)

		  if (VAR_20 & (0x80 >> VAR_8))

		    VAR_20 |= 1 << VAR_8;

		VAR_20 = VAR_20;

	      }

	    VAR_20 &= 0xff;

	    VAR_20 = 0;

	    for (VAR_8 = 0; VAR_8 < 8; ++VAR_8)

	      if (VAR_20 & (1 << VAR_8))

		{

		  int VAR_20;

		  if (VAR_20)

		    (*VAR_4->fprintf_func) (VAR_4->stream, "/");

		  VAR_20 = 1;

		  (*VAR_4->fprintf_func) (VAR_4->stream, "%%fp%VAR_0", VAR_8);

		  VAR_20 = VAR_8;

		  while (VAR_20 & (1 << (VAR_8 + 1)))

		    ++VAR_8;

		  if (VAR_8 > VAR_20)

		    (*VAR_4->fprintf_func) (VAR_4->stream, "-%%fp%VAR_0", VAR_8);

		}

	  }

	else if (VAR_6 == '8')

	  {

	    

	    (*VAR_4->fprintf_func) (VAR_4->stream, "%s",

				   fpcr_names[fetch_arg (VAR_1, VAR_6, 3,

							 VAR_4)]);

	  }

	else

	  return -2;

      break;



    case 'X':

      VAR_6 = '8';

    case 'Y':

    case 'Z':

    case 'W':

    case '0':

    case '1':

    case '2':

    case '3':

      {

	int VAR_20 = fetch_arg (VAR_1, VAR_6, 5, VAR_4);

        const char *VAR_20 = 0;



	switch (VAR_20)

	  {

	  case 2: VAR_20 = "%tt0"; break;

	  case 3: VAR_20 = "%tt1"; break;

	  case 0x10: VAR_20 = "%tc"; break;

	  case 0x11: VAR_20 = "%drp"; break;

	  case 0x12: VAR_20 = "%srp"; break;

	  case 0x13: VAR_20 = "%crp"; break;

	  case 0x14: VAR_20 = "%cal"; break;

	  case 0x15: VAR_20 = "%VAR_20"; break;

	  case 0x16: VAR_20 = "%scc"; break;

	  case 0x17: VAR_20 = "%ac"; break;

 	  case 0x18: VAR_20 = "%psr"; break;

	  case 0x19: VAR_20 = "%pcsr"; break;

	  case 0x1c:

	  case 0x1d:

	    {

	      int VAR_21 = ((VAR_1[3] >> 2) & 7);



	      (*VAR_4->fprintf_func)

		(VAR_4->stream, VAR_20 == 0x1c ? "%%bad%VAR_0" : "%%bac%VAR_0",

		 VAR_21);

	    }

	    break;

	  default:

	    (*VAR_4->fprintf_func) (VAR_4->stream, "<mmu register %VAR_0>", VAR_20);

	  }

	if (VAR_20)

	  (*VAR_4->fprintf_func) (VAR_4->stream, "%s", VAR_20);

      }

      break;



    case 'f':

      {

	int VAR_22 = fetch_arg (VAR_1, VAR_6, 5, VAR_4);



	if (VAR_22 == 1)

	  (*VAR_4->fprintf_func) (VAR_4->stream, "%%dfc");

	else if (VAR_22 == 0)

	  (*VAR_4->fprintf_func) (VAR_4->stream, "%%sfc");

	else

	  

	  (*VAR_4->fprintf_func) (VAR_4->stream, _("<function code %VAR_0>"), VAR_22);

      }

      break;



    case 'V':

      (*VAR_4->fprintf_func) (VAR_4->stream, "%%VAR_20");

      break;



    case 't':

      {

	int VAR_23 = fetch_arg (VAR_1, VAR_6, 3, VAR_4);



	(*VAR_4->fprintf_func) (VAR_4->stream, "%VAR_0", VAR_23);

      }

      break;



    case 'u':

      {

	short VAR_24 = 0;

	int VAR_25 = fetch_arg (VAR_1, VAR_6, 5, VAR_4);



	if (VAR_25 & 0x10)

	  {

	    VAR_24 = 1;

	    VAR_25 &= 0xf;

	  }

	(*VAR_4->fprintf_func) (VAR_4->stream, "%s%s",

			       reg_half_names[VAR_25],

			       VAR_24 ? "u" : "l");

      }

      break;



    default:

      return -2;

    }



  return VAR_7 - VAR_2;

}

FUNC_0 (const char *VAR_0,
unsigned char *VAR_1,
unsigned char *VAR_2,
bfd_vma VAR_3,
disassemble_info *VAR_4)
{ int VAR_20 = 0; int VAR_6 = VAR_0[1]; unsigned char *VAR_7 = VAR_2; int VAR_8; const char *VAR_9; unsigned char *VAR_10; double VAR_11; int VAR_12; bfd_signed_vma disp; unsigned int VAR_13; switch (*VAR_0)
{ case 'c':
{ static const char *const VAR_14[] = { "nc", "dc", "ic", "bc" }; VAR_20 = fetch_arg (VAR_1, VAR_6, 2, VAR_4); (*VAR_4->fprintf_func) (VAR_4->stream, VAR_14[VAR_20]); break; } case 'a':
{ (*VAR_4->fprintf_func)
(VAR_4->stream,
"%s@",
reg_names[fetch_arg (VAR_1, VAR_6, 3, VAR_4) + 8]); break; } case '_':
{ VAR_13 = NEXTULONG (VAR_7); (*VAR_4->print_address_func) (VAR_13, VAR_4); break; } case 'C':
(*VAR_4->fprintf_func) (VAR_4->stream, "%%ccr"); break; case 'S':
(*VAR_4->fprintf_func) (VAR_4->stream, "%%sr"); break; case 'U':
(*VAR_4->fprintf_func) (VAR_4->stream, "%%usp"); break; case 'E':
(*VAR_4->fprintf_func) (VAR_4->stream, "%%acc"); break; case 'G':
(*VAR_4->fprintf_func) (VAR_4->stream, "%%macsr"); break; case 'H':
(*VAR_4->fprintf_func) (VAR_4->stream, "%%mask"); break; case 'J':
{ static const struct { const char *VAR_20; int value; } VAR_15[] = {{"%sfc", 0x000}, {"%dfc", 0x001}, {"%cacr", 0x002}, {"%tc",  0x003}, {"%itt0",0x004}, {"%itt1", 0x005}, {"%dtt0",0x006}, {"%dtt1",0x007}, {"%buscr",0x008}, {"%usp", 0x800}, {"%vbr", 0x801}, {"%caar", 0x802}, {"%msp", 0x803}, {"%isp", 0x804}, {"%flashbar", 0xc04}, {"%rambar", 0xc05}, {"%mmusr",0x805}, {"%urp", 0x806}, {"%srp", 0x807}, {"%pcr", 0x808}}; VAR_20 = fetch_arg (VAR_1, VAR_6, 12, VAR_4); for (VAR_8 = sizeof VAR_15 / sizeof VAR_15[0] - 1; VAR_8 >= 0; VAR_8--) if (VAR_15[VAR_8].value == VAR_20)
{ (*VAR_4->fprintf_func) (VAR_4->stream, "%s", VAR_15[VAR_8].VAR_20); break; } if (VAR_8 < 0)
(*VAR_4->fprintf_func) (VAR_4->stream, "%VAR_0", VAR_20); } break; case 'Q':
VAR_20 = fetch_arg (VAR_1, VAR_6, 3, VAR_4); if (VAR_20 == 0 && VAR_0[1] != 's')
VAR_20 = 8; (*VAR_4->fprintf_func) (VAR_4->stream, "#%VAR_0", VAR_20); break; case 'x':
VAR_20 = fetch_arg (VAR_1, VAR_6, 3, VAR_4); if (VAR_20 == 0)
VAR_20 = -1; (*VAR_4->fprintf_func) (VAR_4->stream, "#%VAR_0", VAR_20); break; case 'M':
if (VAR_6 == 'h')
{ static const char *const VAR_16[] = { "<<", ">>" }; VAR_20 = fetch_arg (VAR_1, VAR_6, 1, VAR_4); (*VAR_4->fprintf_func) (VAR_4->stream, VAR_16[VAR_20]); } else
{ VAR_20 = fetch_arg (VAR_1, VAR_6, 8, VAR_4); if (VAR_20 & 0x80)
VAR_20 = VAR_20 - 0x100; (*VAR_4->fprintf_func) (VAR_4->stream, "#%VAR_0", VAR_20); } break; case 'T':
VAR_20 = fetch_arg (VAR_1, VAR_6, 4, VAR_4); (*VAR_4->fprintf_func) (VAR_4->stream, "#%VAR_0", VAR_20); break; case 'D':
(*VAR_4->fprintf_func) (VAR_4->stream, "%s",
reg_names[fetch_arg (VAR_1, VAR_6, 3, VAR_4)]); break; case 'A':
(*VAR_4->fprintf_func)
(VAR_4->stream, "%s",
reg_names[fetch_arg (VAR_1, VAR_6, 3, VAR_4) + 010]); break; case 'R':
(*VAR_4->fprintf_func)
(VAR_4->stream, "%s",
reg_names[fetch_arg (VAR_1, VAR_6, 4, VAR_4)]); break; case 'r':
VAR_8 = fetch_arg (VAR_1, VAR_6, 4, VAR_4); if (VAR_8 > 7)
(*VAR_4->fprintf_func) (VAR_4->stream, "%s@", reg_names[VAR_8]); else
(*VAR_4->fprintf_func) (VAR_4->stream, "@(%s)", reg_names[VAR_8]); break; case 'F':
(*VAR_4->fprintf_func)
(VAR_4->stream, "%%fp%VAR_0",
fetch_arg (VAR_1, VAR_6, 3, VAR_4)); break; case 'O':
VAR_20 = fetch_arg (VAR_1, VAR_6, 6, VAR_4); if (VAR_20 & 0x20)
(*VAR_4->fprintf_func) (VAR_4->stream, "%s", reg_names[VAR_20 & 7]); else
(*VAR_4->fprintf_func) (VAR_4->stream, "%VAR_0", VAR_20); break; case '+':
(*VAR_4->fprintf_func)
(VAR_4->stream, "%s@+",
reg_names[fetch_arg (VAR_1, VAR_6, 3, VAR_4) + 8]); break; case '-':
(*VAR_4->fprintf_func)
(VAR_4->stream, "%s@-",
reg_names[fetch_arg (VAR_1, VAR_6, 3, VAR_4) + 8]); break; case 'k':
if (VAR_6 == 'k')
(*VAR_4->fprintf_func)
(VAR_4->stream, "{%s}", reg_names[fetch_arg (VAR_1, VAR_6, 3, VAR_4)]); else if (VAR_6 == 'C')
{ VAR_20 = fetch_arg (VAR_1, VAR_6, 7, VAR_4); if (VAR_20 > 63)
VAR_20 -= 128; (*VAR_4->fprintf_func) (VAR_4->stream, "{#%VAR_0}", VAR_20); } else
return -2; break; case '#':
case '^':
VAR_10 = VAR_1 + (*VAR_0 == '#' ? 2 : 4); if (VAR_6 == 's')
VAR_20 = fetch_arg (VAR_1, VAR_6, 4, VAR_4); else if (VAR_6 == 'C')
VAR_20 = fetch_arg (VAR_1, VAR_6, 7, VAR_4); else if (VAR_6 == '8')
VAR_20 = fetch_arg (VAR_1, VAR_6, 3, VAR_4); else if (VAR_6 == '3')
VAR_20 = fetch_arg (VAR_1, VAR_6, 8, VAR_4); else if (VAR_6 == 'b')
VAR_20 = NEXTBYTE (VAR_10); else if (VAR_6 == 'w' || VAR_6 == 'W')
VAR_20 = NEXTWORD (VAR_10); else if (VAR_6 == 'l')
VAR_20 = NEXTLONG (VAR_10); else
return -2; (*VAR_4->fprintf_func) (VAR_4->stream, "#%VAR_0", VAR_20); break; case 'B':
if (VAR_6 == 'b')
disp = NEXTBYTE (VAR_7); else if (VAR_6 == 'B')
disp = COERCE_SIGNED_CHAR (VAR_1[1]); else if (VAR_6 == 'w' || VAR_6 == 'W')
disp = NEXTWORD (VAR_7); else if (VAR_6 == 'l' || VAR_6 == 'L' || VAR_6 == 'C')
disp = NEXTLONG (VAR_7); else if (VAR_6 == 'g')
{ disp = NEXTBYTE (VAR_1); if (disp == 0)
disp = NEXTWORD (VAR_7); else if (disp == -1)
disp = NEXTLONG (VAR_7); } else if (VAR_6 == 'c')
{ if (VAR_1[1] & 0x40)
disp = NEXTLONG (VAR_7); else
disp = NEXTWORD (VAR_7); } else
return -2; (*VAR_4->print_address_func) (VAR_3 + disp, VAR_4); break; case 'VAR_0':
VAR_20 = NEXTWORD (VAR_7); (*VAR_4->fprintf_func)
(VAR_4->stream, "%s@(%VAR_0)",
reg_names[fetch_arg (VAR_1, VAR_6, 3, VAR_4) + 8], VAR_20); break; case 's':
(*VAR_4->fprintf_func) (VAR_4->stream, "%s",
fpcr_names[fetch_arg (VAR_1, VAR_6, 3, VAR_4)]); break; case 'e':
VAR_20 = fetch_arg(VAR_1, VAR_6, 2, VAR_4); (*VAR_4->fprintf_func) (VAR_4->stream, "%%acc%VAR_0", VAR_20); break; case 'g':
VAR_20 = fetch_arg(VAR_1, VAR_6, 1, VAR_4); (*VAR_4->fprintf_func) (VAR_4->stream, "%%accext%s", VAR_20==0 ? "01" : "23"); break; case 'i':
VAR_20 = fetch_arg(VAR_1, VAR_6, 2, VAR_4); if (VAR_20 == 1)
(*VAR_4->fprintf_func) (VAR_4->stream, "<<"); else if (VAR_20 == 3)
(*VAR_4->fprintf_func) (VAR_4->stream, ">>"); else
return -1; break; case 'I':
VAR_20 = fetch_arg (VAR_1, 'VAR_0', 3, VAR_4); if (VAR_20 != 1)
(*VAR_4->fprintf_func) (VAR_4->stream, "(cpid=%VAR_0) ", VAR_20); break; case '4':
case '*':
case '~':
case '%':
case ';': case '@':
case '!':
case '$':
case '?':
case '/':
case '&':
case '|':
case '<':
case '>':
case 'm':
case 'n':
case 'o':
case 'VAR_7':
case 'q':
case 'v':
case 'b':
case 'w':
case 'y':
case 'z':
if (VAR_6 == 'VAR_0')
{ VAR_20 = fetch_arg (VAR_1, 'x', 6, VAR_4); VAR_20 = ((VAR_20 & 7) << 3) + ((VAR_20 >> 3) & 7); } else
VAR_20 = fetch_arg (VAR_1, 's', 6, VAR_4); if (!m68k_valid_ea (*VAR_0, VAR_20))
return -1; VAR_8 = (VAR_20 & 7) + 8; VAR_9 = reg_names[VAR_8]; switch (VAR_20 >> 3)
{ case 0:
(*VAR_4->fprintf_func) (VAR_4->stream, "%s", reg_names[VAR_20]); break; case 1:
(*VAR_4->fprintf_func) (VAR_4->stream, "%s", VAR_9); break; case 2:
(*VAR_4->fprintf_func) (VAR_4->stream, "%s@", VAR_9); break; case 3:
(*VAR_4->fprintf_func) (VAR_4->stream, "%s@+", VAR_9); break; case 4:
(*VAR_4->fprintf_func) (VAR_4->stream, "%s@-", VAR_9); break; case 5:
VAR_20 = NEXTWORD (VAR_7); (*VAR_4->fprintf_func) (VAR_4->stream, "%s@(%VAR_0)", VAR_9, VAR_20); break; case 6:
VAR_7 = print_indexed (VAR_8, VAR_7, VAR_3, VAR_4); break; case 7:
switch (VAR_20 & 7)
{ case 0:
VAR_20 = NEXTWORD (VAR_7); (*VAR_4->print_address_func) (VAR_20, VAR_4); break; case 1:
VAR_13 = NEXTULONG (VAR_7); (*VAR_4->print_address_func) (VAR_13, VAR_4); break; case 2:
VAR_20 = NEXTWORD (VAR_7); (*VAR_4->fprintf_func) (VAR_4->stream, "%%pc@("); (*VAR_4->print_address_func) (VAR_3 + VAR_20, VAR_4); (*VAR_4->fprintf_func) (VAR_4->stream, ")"); break; case 3:
VAR_7 = print_indexed (-1, VAR_7, VAR_3, VAR_4); break; case 4:
VAR_12 = 1; switch (VAR_6)
{ case 'b':
VAR_20 = NEXTBYTE (VAR_7); VAR_12 = 0; break; case 'w':
VAR_20 = NEXTWORD (VAR_7); VAR_12 = 0; break; case 'l':
VAR_20 = NEXTLONG (VAR_7); VAR_12 = 0; break; case 'f':
NEXTSINGLE (VAR_11, VAR_7); break; case 'F':
NEXTDOUBLE (VAR_11, VAR_7); break; case 'x':
NEXTEXTEND (VAR_11, VAR_7); break; case 'VAR_7':
VAR_11 = NEXTPACKED (VAR_7); break; default:
return -1; } if (VAR_12)
(*VAR_4->fprintf_func) (VAR_4->stream, "#%g", VAR_11); else
(*VAR_4->fprintf_func) (VAR_4->stream, "#%VAR_0", VAR_20); break; default:
return -1; } } if (VAR_6 == '/')
{ VAR_20 = fetch_arg (VAR_1, VAR_6, 1, VAR_4); if (VAR_20)
VAR_4->fprintf_func (VAR_4->stream, "&"); } break; case 'L':
case 'l':
if (VAR_6 == 'w')
{ char VAR_20; VAR_10 = VAR_1 + 2; VAR_20 = NEXTWORD (VAR_10); VAR_7 = VAR_10 > VAR_7 ? VAR_10 : VAR_7; if (VAR_20 == 0)
{ (*VAR_4->fprintf_func) (VAR_4->stream, "#0"); break; } if (*VAR_0 == 'l')
{ int VAR_20 = 0; for (VAR_8 = 0; VAR_8 < 16; ++VAR_8) if (VAR_20 & (0x8000 >> VAR_8))
VAR_20 |= 1 << VAR_8; VAR_20 = VAR_20; } VAR_20 &= 0xffff; VAR_20 = 0; for (VAR_8 = 0; VAR_8 < 16; ++VAR_8) if (VAR_20 & (1 << VAR_8))
{ int VAR_20; if (VAR_20)
(*VAR_4->fprintf_func) (VAR_4->stream, "/"); VAR_20 = 1; (*VAR_4->fprintf_func) (VAR_4->stream, "%s", reg_names[VAR_8]); VAR_20 = VAR_8; while (VAR_20 & (1 << (VAR_8 + 1)))
++VAR_8; if (VAR_8 > VAR_20)
(*VAR_4->fprintf_func) (VAR_4->stream, "-%s",
reg_names[VAR_8]); } } else if (VAR_6 == '3')
{ char VAR_20; VAR_20 = fetch_arg (VAR_1, VAR_6, 8, VAR_4); if (VAR_20 == 0)
{ (*VAR_4->fprintf_func) (VAR_4->stream, "#0"); break; } if (*VAR_0 == 'l')
{ int VAR_20 = 0; for (VAR_8 = 0; VAR_8 < 8; ++VAR_8) if (VAR_20 & (0x80 >> VAR_8))
VAR_20 |= 1 << VAR_8; VAR_20 = VAR_20; } VAR_20 &= 0xff; VAR_20 = 0; for (VAR_8 = 0; VAR_8 < 8; ++VAR_8) if (VAR_20 & (1 << VAR_8))
{ int VAR_20; if (VAR_20)
(*VAR_4->fprintf_func) (VAR_4->stream, "/"); VAR_20 = 1; (*VAR_4->fprintf_func) (VAR_4->stream, "%%fp%VAR_0", VAR_8); VAR_20 = VAR_8; while (VAR_20 & (1 << (VAR_8 + 1)))
++VAR_8; if (VAR_8 > VAR_20)
(*VAR_4->fprintf_func) (VAR_4->stream, "-%%fp%VAR_0", VAR_8); } } else if (VAR_6 == '8')
{ (*VAR_4->fprintf_func) (VAR_4->stream, "%s",
fpcr_names[fetch_arg (VAR_1, VAR_6, 3,
VAR_4)]); } else
return -2; break; case 'X':
VAR_6 = '8'; case 'Y':
case 'Z':
case 'W':
case '0':
case '1':
case '2':
case '3':
{ int VAR_20 = fetch_arg (VAR_1, VAR_6, 5, VAR_4); const char *VAR_20 = 0; switch (VAR_20)
{ case 2: VAR_20 = "%tt0"; break; case 3: VAR_20 = "%tt1"; break; case 0x10: VAR_20 = "%tc"; break; case 0x11: VAR_20 = "%drp"; break; case 0x12: VAR_20 = "%srp"; break; case 0x13: VAR_20 = "%crp"; break; case 0x14: VAR_20 = "%cal"; break; case 0x15: VAR_20 = "%VAR_20"; break; case 0x16: VAR_20 = "%scc"; break; case 0x17: VAR_20 = "%ac"; break; case 0x18: VAR_20 = "%psr"; break; case 0x19: VAR_20 = "%pcsr"; break; case 0x1c:
case 0x1d:
{ int VAR_21 = ((VAR_1[3] >> 2) & 7); (*VAR_4->fprintf_func)
(VAR_4->stream, VAR_20 == 0x1c ? "%%bad%VAR_0" : "%%bac%VAR_0",
VAR_21); } break; default:
(*VAR_4->fprintf_func) (VAR_4->stream, "<mmu register %VAR_0>", VAR_20); } if (VAR_20)
(*VAR_4->fprintf_func) (VAR_4->stream, "%s", VAR_20); } break; case 'f':
{ int VAR_22 = fetch_arg (VAR_1, VAR_6, 5, VAR_4); if (VAR_22 == 1)
(*VAR_4->fprintf_func) (VAR_4->stream, "%%dfc"); else if (VAR_22 == 0)
(*VAR_4->fprintf_func) (VAR_4->stream, "%%sfc"); else
(*VAR_4->fprintf_func) (VAR_4->stream, _("<function code %VAR_0>"), VAR_22); } break; case 'V':
(*VAR_4->fprintf_func) (VAR_4->stream, "%%VAR_20"); break; case 't':
{ int VAR_23 = fetch_arg (VAR_1, VAR_6, 3, VAR_4); (*VAR_4->fprintf_func) (VAR_4->stream, "%VAR_0", VAR_23); } break; case 'u':
{ short VAR_24 = 0; int VAR_25 = fetch_arg (VAR_1, VAR_6, 5, VAR_4); if (VAR_25 & 0x10)
{ VAR_24 = 1; VAR_25 &= 0xf; } (*VAR_4->fprintf_func) (VAR_4->stream, "%s%s",
reg_half_names[VAR_25],
VAR_24 ? "u" : "l"); } break; default:
return -2; } return VAR_7 - VAR_2; }