package miggy.cpupoet;

public abstract class Core extends CoreALU {
  private static final int reset = 0;

  protected static final int dbrr = 1;

  private static final int halt = 2;

  private static final int bevtf32 = 3;

  private static final int bevtr32 = 4;

  private static final int bevtw32 = 5;

  private static final int bevt = 6;

  private static final int berr = 7;

  private static final int aerr = 8;

  private static final int trap8000 = 9;

  private static final int resume_trap8000 = 10;

  private static final int resume_berr = 11;

  private static final int trap2000 = 12;

  private static final int trapill = 13;

  private static final int trap0000 = 14;

  private static final int enter_trap0000 = 15;

  private static final int uninitialized = 17;

  private static final int interrupt = 19;

  private static final int enter_irq = 21;

  private static final int execute_trap = 22;

  private static final int resume_prefetch = 23;

  private static final int resume = 24;

  private static final int resume_notrace = 25;

  protected static final int op_stop = 26;

  private static final int op_stop_loop = 27;

  private static final int ea_resume_write8 = 28;

  private static final int ea_resume_write16 = 31;

  private static final int ea_resume_write32 = 34;

  protected static final int op_imm16 = 37;

  protected static final int op_imm32 = 39;

  protected static final int ea_aid8 = 41;

  protected static final int ea_aid16 = 42;

  protected static final int ea_aid32 = 43;

  protected static final int ea_ais8_read = 44;

  protected static final int ea_ais8 = 45;

  private static final int ea_read8 = 46;

  protected static final int ea_ais16_read = 48;

  protected static final int ea_ais16 = 49;

  private static final int ea_read16 = 50;

  protected static final int ea_ais32_read = 52;

  protected static final int ea_ais32 = 53;

  private static final int ea_read32 = 54;

  protected static final int ea_aipd8_read = 56;

  protected static final int ea_aipd8 = 57;

  protected static final int ea_aipd16_read = 58;

  protected static final int ea_aipd16 = 59;

  protected static final int ea_aipd32_read = 60;

  protected static final int ea_aipd32 = 61;

  protected static final int ea_aips8_read = 62;

  protected static final int ea_aips8 = 63;

  protected static final int ea_aips16_read = 64;

  protected static final int ea_aips16 = 65;

  protected static final int ea_aips32_read = 66;

  protected static final int ea_aips32 = 67;

  protected static final int ea_paid8_read = 68;

  protected static final int ea_paid8 = 69;

  private static final int ead_read8 = 70;

  protected static final int ea_paid16_read = 72;

  protected static final int ea_paid16 = 73;

  private static final int ead_read16 = 74;

  protected static final int ea_paid32_read = 76;

  protected static final int ea_paid32 = 77;

  private static final int ead_read32 = 78;

  protected static final int ea_pais8_read = 80;

  protected static final int ea_pais8 = 81;

  protected static final int ea_pais16_read = 82;

  protected static final int ea_pais16 = 83;

  protected static final int ea_pais32_read = 84;

  protected static final int ea_pais32 = 85;

  protected static final int ea_dad8 = 86;

  protected static final int ea_dad16 = 88;

  protected static final int ea_dad32 = 90;

  protected static final int ea_das8_read = 92;

  protected static final int ea_das8 = 93;

  protected static final int ea_das16_read = 95;

  protected static final int ea_das16 = 96;

  protected static final int ea_das32_read = 98;

  protected static final int ea_das32 = 99;

  protected static final int ea_daid8 = 101;

  private static final int ea_daid8_base = 103;

  private static final int ea_daid8_no_base = 104;

  private static final int ea_daid8_outer = 106;

  private static final int ea_daid8_fetch = 107;

  protected static final int ea_daid16 = 108;

  private static final int ea_daid16_base = 110;

  private static final int ea_daid16_no_base = 111;

  private static final int ea_daid16_outer = 113;

  private static final int ea_daid16_fetch = 114;

  protected static final int ea_daid32 = 115;

  private static final int ea_daid32_base = 117;

  private static final int ea_daid32_no_base = 118;

  private static final int ea_daid32_outer = 120;

  private static final int ea_daid32_fetch = 121;

  private static final int ea_daix_imm32 = 122;

  private static final int ea_dais_imm16 = 123;

  protected static final int ea_dais8_read = 124;

  protected static final int ea_dais8 = 125;

  private static final int ea_dais8_base = 127;

  private static final int ea_dais8_no_base = 128;

  private static final int ea_dais8_outer = 130;

  private static final int ea_dais8_fetch = 131;

  protected static final int ea_dais16_read = 132;

  protected static final int ea_dais16 = 133;

  private static final int ea_dais16_base = 135;

  private static final int ea_dais16_no_base = 136;

  private static final int ea_dais16_outer = 138;

  private static final int ea_dais16_fetch = 139;

  protected static final int ea_dais32_read = 140;

  protected static final int ea_dais32 = 141;

  private static final int ea_dais32_base = 143;

  private static final int ea_dais32_no_base = 144;

  private static final int ea_dais32_outer = 146;

  private static final int ea_dais32_fetch = 147;

  protected static final int ea_dpc8_read = 148;

  private static final int eapc_read8 = 150;

  protected static final int ea_dpc16_read = 152;

  protected static final int ea_dpc16 = 153;

  private static final int eapc_read16 = 155;

  protected static final int ea_dpc32_read = 157;

  protected static final int ea_dpc32 = 158;

  private static final int eapc_read32 = 160;

  protected static final int ea_dpci8_read = 162;

  private static final int ea_dpci8_base = 164;

  private static final int ea_dpci8_no_base = 165;

  private static final int ea_dpci8_outer = 167;

  private static final int ea_dpci8_fetch = 168;

  protected static final int ea_dpci16_read = 169;

  protected static final int ea_dpci16 = 170;

  private static final int ea_dpci16_base = 172;

  private static final int ea_dpci16_no_base = 173;

  private static final int ea_dpci16_outer = 175;

  private static final int ea_dpci16_fetch = 176;

  protected static final int ea_dpci32_read = 177;

  protected static final int ea_dpci32 = 178;

  private static final int ea_dpci32_base = 180;

  private static final int ea_dpci32_no_base = 181;

  private static final int ea_dpci32_outer = 183;

  private static final int ea_dpci32_fetch = 184;

  protected static final int ea_adr16d8 = 185;

  protected static final int ea_adr16d16 = 187;

  protected static final int ea_adr16d32 = 189;

  protected static final int ea_adr16s8_read = 191;

  protected static final int ea_adr16s8 = 192;

  protected static final int ea_adr16s16_read = 194;

  protected static final int ea_adr16s16 = 195;

  protected static final int ea_adr16s32_read = 197;

  protected static final int ea_adr16s32 = 198;

  protected static final int ea_adr32d8 = 200;

  protected static final int ea_adr32d16 = 201;

  protected static final int ea_adr32d32 = 202;

  protected static final int ea_adr32s8_read = 204;

  protected static final int ea_adr32s8 = 205;

  protected static final int ea_adr32s16_read = 207;

  protected static final int ea_adr32s16 = 208;

  protected static final int ea_adr32s32_read = 210;

  protected static final int ea_adr32s32 = 211;

  protected static final int ea_imm8_read = 213;

  protected static final int ea_imm16_read = 215;

  protected static final int ea_imm32_read = 217;

  protected static final int op_movepw_dd_das = 219;

  protected static final int op_movepw_das_dd = 223;

  protected static final int op_movepl_dd_das = 226;

  protected static final int op_movepl_das_dd = 232;

  protected static final int op_clrb_ds = 237;

  protected static final int op_clrw_ds = 238;

  protected static final int op_clrl_ds = 239;

  protected static final int op_clrb_ea = 240;

  protected static final int op_clrw_ea = 241;

  protected static final int op_clrl_ea = 242;

  protected static final int op_lea_ea_ad = 243;

  protected static final int op_pea = 244;

  protected static final int op_swap_ds = 246;

  protected static final int op_extw_ds = 247;

  protected static final int op_extl_ds = 248;

  protected static final int op_extbl_ds = 249;

  protected static final int op_exg_dd_ds = 250;

  protected static final int op_exg_ad_as = 251;

  protected static final int op_exg_dd_as = 252;

  protected static final int op_scc_b_ds = 253;

  protected static final int op_scc_b_ea = 254;

  protected static final int op_chk_w_ds = 255;

  protected static final int op_chk_w_ea = 256;

  protected static final int op_link_as_imm16 = 257;

  protected static final int op_link_as_imm32 = 259;

  protected static final int op_unlk_as = 261;

  protected static final int op_move_usp_as = 263;

  protected static final int op_move_as_usp = 264;

  protected static final int op_movec_cr_rz = 265;

  protected static final int op_movec_rz_cr = 267;

  protected static final int op_movemw_rr_ea = 269;

  protected static final int op_movemw_rr_pais = 273;

  protected static final int op_moveml_rr_ea = 277;

  protected static final int op_moveml_rr_pais = 281;

  protected static final int op_movemw_ea_rr = 285;

  protected static final int op_movemw_aips_rr = 290;

  protected static final int op_moveml_ea_rr = 295;

  protected static final int op_moveml_aips_rr = 300;

  protected static final int op_bcc8 = 305;

  protected static final int op_bra8 = 306;

  protected static final int op_bcc16 = 307;

  protected static final int op_bra16 = 308;

  protected static final int op_bcc32 = 309;

  protected static final int op_bra32 = 310;

  protected static final int op_bsr8 = 311;

  protected static final int op_bsr16 = 313;

  protected static final int op_bsr32 = 315;

  protected static final int op_dbcc = 317;

  protected static final int op_bkpt = 319;

  protected static final int op_illegal = 320;

  protected static final int op_jmp = 321;

  protected static final int op_jsr = 322;

  protected static final int op_linea = 324;

  protected static final int op_linef = 325;

  protected static final int op_nop = 326;

  protected static final int op_rte = 327;

  private static final int check_vob = 328;

  private static final int rteill = 329;

  private static final int exit_trap = 330;

  private static final int rte0000 = 331;

  private static final int rte1000 = 332;

  private static final int rte2000 = 333;

  private static final int rte8000 = 334;

  protected static final int op_rtr = 335;

  protected static final int op_rts = 338;

  protected static final int op_reset = 340;

  protected static final int op_trap = 341;

  protected static final int op_trapv = 342;

  protected static final int op_trapcc = 343;

  protected static final int op_trapcc16 = 344;

  protected static final int op_trapcc32 = 345;

  protected static final int gen_orb_dt_ds = 346;

  protected static final int gen_orb_im_ea = 347;

  protected static final int gen_orw_dt_ds = 348;

  protected static final int gen_orw_im_ea = 349;

  protected static final int gen_orl_dt_ds = 350;

  protected static final int gen_orl_im_ea = 351;

  protected static final int gen_orb_dt_ccr = 352;

  protected static final int gen_orw_dt_sr = 353;

  protected static final int gen_btstl_dd_ds = 354;

  protected static final int gen_btstb_dd_ea = 355;

  protected static final int gen_bchgl_dd_ds = 356;

  protected static final int gen_bchgb_dd_ea = 357;

  protected static final int gen_bclrl_dd_ds = 358;

  protected static final int gen_bclrb_dd_ea = 359;

  protected static final int gen_bsetl_dd_ds = 360;

  protected static final int gen_bsetb_dd_ea = 361;

  protected static final int gen_andb_dt_ds = 362;

  protected static final int gen_andb_im_ea = 363;

  protected static final int gen_andw_dt_ds = 364;

  protected static final int gen_andw_im_ea = 365;

  protected static final int gen_andl_dt_ds = 366;

  protected static final int gen_andl_im_ea = 367;

  protected static final int gen_andb_dt_ccr = 368;

  protected static final int gen_andw_dt_sr = 369;

  protected static final int gen_subb_dt_ds = 370;

  protected static final int gen_subb_im_ea = 371;

  protected static final int gen_subw_dt_ds = 372;

  protected static final int gen_subw_im_ea = 373;

  protected static final int gen_subl_dt_ds = 374;

  protected static final int gen_subl_im_ea = 375;

  protected static final int gen_addb_dt_ds = 376;

  protected static final int gen_addb_im_ea = 377;

  protected static final int gen_addw_dt_ds = 378;

  protected static final int gen_addw_im_ea = 379;

  protected static final int gen_addl_dt_ds = 380;

  protected static final int gen_addl_im_ea = 381;

  protected static final int gen_btstl_dt_ds = 382;

  protected static final int gen_btstb_im_ea = 383;

  protected static final int gen_bchgl_dt_ds = 384;

  protected static final int gen_bchgb_im_ea = 385;

  protected static final int gen_bclrl_dt_ds = 386;

  protected static final int gen_bclrb_im_ea = 387;

  protected static final int gen_bsetl_dt_ds = 388;

  protected static final int gen_bsetb_im_ea = 389;

  protected static final int gen_eorb_dt_ds = 390;

  protected static final int gen_eorb_im_ea = 391;

  protected static final int gen_eorw_dt_ds = 392;

  protected static final int gen_eorw_im_ea = 393;

  protected static final int gen_eorl_dt_ds = 394;

  protected static final int gen_eorl_im_ea = 395;

  protected static final int gen_eorb_dt_ccr = 396;

  protected static final int gen_eorw_dt_sr = 397;

  protected static final int gen_cmpb_dt_ds = 398;

  protected static final int gen_cmpb_im_ea = 399;

  protected static final int gen_cmpw_dt_ds = 400;

  protected static final int gen_cmpw_im_ea = 401;

  protected static final int gen_cmpl_dt_ds = 402;

  protected static final int gen_cmpl_im_ea = 403;

  protected static final int gen_moveb_ds_ea = 404;

  protected static final int gen_moveb_dt_dd = 405;

  protected static final int gen_moveb_ds_dd = 406;

  protected static final int gen_moveb_dt_ea = 407;

  protected static final int gen_movel_ds_ea = 408;

  protected static final int gen_movel_as_ea = 409;

  protected static final int gen_movel_dt_dd = 410;

  protected static final int gen_movel_ds_dd = 411;

  protected static final int gen_movel_as_dd = 412;

  protected static final int gen_movel_dt_ea = 413;

  protected static final int gen_movel_ds_ad = 414;

  protected static final int gen_movel_as_ad = 415;

  protected static final int gen_movel_dt_ad = 416;

  protected static final int gen_movew_ds_ea = 417;

  protected static final int gen_movew_as_ea = 418;

  protected static final int gen_movew_dt_dd = 419;

  protected static final int gen_movew_ds_dd = 420;

  protected static final int gen_movew_as_dd = 421;

  protected static final int gen_movew_dt_ea = 422;

  protected static final int gen_movew_ds_ad = 423;

  protected static final int gen_movew_as_ad = 424;

  protected static final int gen_movew_dt_ad = 425;

  protected static final int gen_negxb_ds = 426;

  protected static final int gen_negxb_ea = 427;

  protected static final int gen_negxw_ds = 428;

  protected static final int gen_negxw_ea = 429;

  protected static final int gen_negxl_ds = 430;

  protected static final int gen_negxl_ea = 431;

  protected static final int gen_movew_sr_ds = 432;

  protected static final int gen_movew_sr_ea = 433;

  protected static final int gen_movew_ccr_ds = 434;

  protected static final int gen_movew_ccr_ea = 435;

  protected static final int gen_movew_ds_ccr = 436;

  protected static final int gen_movew_dt_ccr = 437;

  protected static final int gen_movew_ds_sr = 438;

  protected static final int gen_movew_dt_sr = 439;

  protected static final int gen_negb_ds = 440;

  protected static final int gen_negb_ea = 441;

  protected static final int gen_negw_ds = 442;

  protected static final int gen_negl_ea = 443;

  protected static final int gen_negl_ds = 444;

  protected static final int gen_notb_ds = 445;

  protected static final int gen_notb_ea = 446;

  protected static final int gen_notw_ds = 447;

  protected static final int gen_notw_ea = 448;

  protected static final int gen_notl_ds = 449;

  protected static final int gen_notl_ea = 450;

  protected static final int gen_nbcdb_ds = 451;

  protected static final int gen_nbcdb_ea = 452;

  protected static final int gen_tstb_ds = 453;

  protected static final int gen_tstb_ea = 454;

  protected static final int gen_tstw_ds = 455;

  protected static final int gen_tstw_ea = 456;

  protected static final int gen_tstl_ds = 457;

  protected static final int gen_tstl_ea = 458;

  protected static final int gen_addb_ir_ds = 459;

  protected static final int gen_addb_ir_ea = 460;

  protected static final int gen_addw_ir_ds = 461;

  protected static final int gen_addw_ir_as = 462;

  protected static final int gen_addw_ir_ea = 463;

  protected static final int gen_addl_ir_ds = 464;

  protected static final int gen_addl_ir_as = 465;

  protected static final int gen_addl_ir_ea = 466;

  protected static final int gen_subb_ir_ds = 467;

  protected static final int gen_subb_ir_ea = 468;

  protected static final int gen_subw_ir_ds = 469;

  protected static final int gen_subw_ir_as = 470;

  protected static final int gen_subw_ir_ea = 471;

  protected static final int gen_subl_ir_ds = 472;

  protected static final int gen_subl_ir_as = 473;

  protected static final int gen_subl_ir_ea = 474;

  protected static final int gen_movel_im_dd = 475;

  protected static final int gen_orb_ds_dd = 476;

  protected static final int gen_orb_dt_dd = 477;

  protected static final int gen_orw_ds_dd = 478;

  protected static final int gen_orw_dt_dd = 479;

  protected static final int gen_orl_ds_dd = 480;

  protected static final int gen_orl_dt_dd = 481;

  protected static final int gen_sbcdb_ds_dd = 482;

  protected static final int gen_sbcdb_im_ea = 483;

  protected static final int gen_orb_dd_ea = 484;

  protected static final int gen_orw_dd_ea = 485;

  protected static final int gen_orl_dd_ea = 486;

  protected static final int gen_subb_ds_dd = 487;

  protected static final int gen_subb_dt_dd = 488;

  protected static final int gen_subw_ds_dd = 489;

  protected static final int gen_subw_as_dd = 490;

  protected static final int gen_subw_dt_dd = 491;

  protected static final int gen_subl_ds_dd = 492;

  protected static final int gen_subl_as_dd = 493;

  protected static final int gen_subl_dt_dd = 494;

  protected static final int gen_subb_dd_ea = 495;

  protected static final int gen_subw_dd_ea = 496;

  protected static final int gen_subl_dd_ea = 497;

  protected static final int gen_subxb_ds_dd = 498;

  protected static final int gen_subxb_im_ea = 499;

  protected static final int gen_subxw_ds_dd = 500;

  protected static final int gen_subxw_im_ea = 501;

  protected static final int gen_subxl_ds_dd = 502;

  protected static final int gen_subxl_im_ea = 503;

  protected static final int gen_subw_ds_ad = 504;

  protected static final int gen_subw_as_ad = 505;

  protected static final int gen_subw_dt_ad = 506;

  protected static final int gen_subl_ds_ad = 507;

  protected static final int gen_subl_as_ad = 508;

  protected static final int gen_subl_dt_ad = 509;

  protected static final int gen_cmpb_ds_dd = 510;

  protected static final int gen_cmpb_dt_dd = 511;

  protected static final int gen_cmpw_ds_dd = 512;

  protected static final int gen_cmpw_as_dd = 513;

  protected static final int gen_cmpw_dt_dd = 514;

  protected static final int gen_cmpl_ds_dd = 515;

  protected static final int gen_cmpl_as_dd = 516;

  protected static final int gen_cmpl_dt_dd = 517;

  protected static final int gen_cmpw_ds_ad = 518;

  protected static final int gen_cmpw_as_ad = 519;

  protected static final int gen_cmpw_dt_ad = 520;

  protected static final int gen_cmpl_ds_ad = 521;

  protected static final int gen_cmpl_as_ad = 522;

  protected static final int gen_cmpl_dt_ad = 523;

  protected static final int gen_cmpmb_im_ea = 524;

  protected static final int gen_cmpmw_im_ea = 525;

  protected static final int gen_cmpml_im_ea = 526;

  protected static final int gen_eorb_dd_ds = 527;

  protected static final int gen_eorb_dd_ea = 528;

  protected static final int gen_eorw_dd_ds = 529;

  protected static final int gen_eorw_dd_ea = 530;

  protected static final int gen_eorl_dd_ds = 531;

  protected static final int gen_eorl_dd_ea = 532;

  protected static final int gen_andb_ds_dd = 533;

  protected static final int gen_andb_dt_dd = 534;

  protected static final int gen_andw_ds_dd = 535;

  protected static final int gen_andw_dt_dd = 536;

  protected static final int gen_andl_ds_dd = 537;

  protected static final int gen_andl_dt_dd = 538;

  protected static final int gen_andb_dd_ea = 539;

  protected static final int gen_andw_dd_ea = 540;

  protected static final int gen_andl_dd_ea = 541;

  protected static final int gen_abcdb_ds_dd = 542;

  protected static final int gen_abcdb_im_ea = 543;

  protected static final int gen_addb_ds_dd = 544;

  protected static final int gen_addb_dt_dd = 545;

  protected static final int gen_addw_ds_dd = 546;

  protected static final int gen_addw_as_dd = 547;

  protected static final int gen_addw_dt_dd = 548;

  protected static final int gen_addl_ds_dd = 549;

  protected static final int gen_addl_as_dd = 550;

  protected static final int gen_addl_dt_dd = 551;

  protected static final int gen_addb_dd_ea = 552;

  protected static final int gen_addw_dd_ea = 553;

  protected static final int gen_addl_dd_ea = 554;

  protected static final int gen_addxb_ds_dd = 555;

  protected static final int gen_addxb_im_ea = 556;

  protected static final int gen_addxw_ds_dd = 557;

  protected static final int gen_addxw_im_ea = 558;

  protected static final int gen_addxl_ds_dd = 559;

  protected static final int gen_addxl_im_ea = 560;

  protected static final int gen_addw_ds_ad = 561;

  protected static final int gen_addw_as_ad = 562;

  protected static final int gen_addw_dt_ad = 563;

  protected static final int gen_addl_ds_ad = 564;

  protected static final int gen_addl_as_ad = 565;

  protected static final int gen_addl_dt_ad = 566;

  protected static final int gen_asrb_ir_ds = 567;

  protected static final int gen_asrb_dd_ds = 568;

  protected static final int gen_asrw_ir_ds = 569;

  protected static final int gen_asrw_dd_ds = 570;

  protected static final int gen_asrl_ir_ds = 571;

  protected static final int gen_asrl_dd_ds = 572;

  protected static final int gen_asrw_ea = 573;

  protected static final int gen_aslb_ir_ds = 574;

  protected static final int gen_aslb_dd_ds = 575;

  protected static final int gen_aslw_ir_ds = 576;

  protected static final int gen_aslw_dd_ds = 577;

  protected static final int gen_asll_ir_ds = 578;

  protected static final int gen_asll_dd_ds = 579;

  protected static final int gen_aslw_ea = 580;

  protected static final int gen_lsrb_ir_ds = 581;

  protected static final int gen_lsrb_dd_ds = 582;

  protected static final int gen_lsrw_ir_ds = 583;

  protected static final int gen_lsrw_dd_ds = 584;

  protected static final int gen_lsrl_ir_ds = 585;

  protected static final int gen_lsrl_dd_ds = 586;

  protected static final int gen_lsrw_ea = 587;

  protected static final int gen_lslb_ir_ds = 588;

  protected static final int gen_lslb_dd_ds = 589;

  protected static final int gen_lslw_ir_ds = 590;

  protected static final int gen_lslw_dd_ds = 591;

  protected static final int gen_lsll_ir_ds = 592;

  protected static final int gen_lsll_dd_ds = 593;

  protected static final int gen_lslw_ea = 594;

  protected static final int gen_rorb_ir_ds = 595;

  protected static final int gen_rorb_dd_ds = 596;

  protected static final int gen_rorw_ir_ds = 597;

  protected static final int gen_rorw_dd_ds = 598;

  protected static final int gen_rorl_ir_ds = 599;

  protected static final int gen_rorl_dd_ds = 600;

  protected static final int gen_rorw_ea = 601;

  protected static final int gen_rolb_ir_ds = 602;

  protected static final int gen_rolb_dd_ds = 603;

  protected static final int gen_rolw_ir_ds = 604;

  protected static final int gen_rolw_dd_ds = 605;

  protected static final int gen_roll_ir_ds = 606;

  protected static final int gen_roll_dd_ds = 607;

  protected static final int gen_rolw_ea = 608;

  public static final int BKPT_EXIT = 0x00010000;

  public static final int BKPT_RPIR = 0x00020000;

  public static final int LINEA_EXIT = 0x00010000;

  public static final int LINEA_SKIP = 0x00020000;

  public static final int ILL_EXIT = 0x00010000;

  public static final int ILL_SKIP = 0x00020000;

  public static final int TRACE_EXIT = 0x8000;

  public static final int TRACE_IGNR = 0x4000;

  public static final int IRQ_EXIT = 0x8000;

  public static final int IRQ_IERR = 0x4000;

  public static final int IRQ_DFLT = 0x0000;

  public static final int IRQ_AVEC = 0x1000;

  public static final int IRQ_SPUR = 0x2000;

  public static final int IRQ_IGNR = 0x3000;

  protected int pc;

  protected int scan;

  protected int alub;

  protected int irb;

  protected int ir;

  protected int mpc = reset;

  protected int cip;

  protected int au;

  protected int at;

  protected int dt;

  protected int slice = 0;

  public final void pulse_reset() {
    ssw |= SSW_RS;
  }

  public final void set_pending_irq(int level) {
    level = (level << 8) & SR_I;
    sswi = (sswi & ~SR_I) | level;
  }

  private static final int select_rte(int vob) {
    switch((vob & 0xf000) >> 12) {
      case 0:
      return rte0000;
      case 1:
      return rte1000;
      case 2:
      return rte2000;
      case 8:
      return rte8000;
      default:
      return rteill;
    }
  }

  public final int execute(int cycles) {
    MacroPLA decoded = MacroPLA.decode(ir);
    int slice = Math.max(0, cycles);
    int consumed = 0;
    if ((sswi & SSWI_PSLC) != 0) {
      slice += this.slice;
    }
    if (slice > 0) {
      boolean sngl = false;
      boolean exit = false;
      int sp = spi(sr);
      int elapsed = 0;
      int nmpc = 0;
      int hdlr = 0;
      int ipend = 0;
      int tvn = 0;
      int aob = 0;
      int dob = 0;
      int dib = 0;
      int vat1 = 0;
      int vat2 = 0;
      int vat3 = 0;
      int vdt1 = 0;
      int vdt2 = 0;
      int vdt3 = 0;
      int rx = 0;
      int ry = 0;
      int rz = 0;
      consumed = slice;
      if ((ssw & (SSW_RS | SSW_HL)) != 0) {
        nmpc = mpc;
        mpc = halt;
      }
      while (true) {
        switch(mpc) {
          case 0: /* reset */
          elapsed += 16;
          sr = (sr & ~0xd000) | 0x2700;
          sp = spi(sr);
          ssw &= ~0x0018;
          sswi &= ~0xc802;
          vbr = 0x00000000;
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x91c6;
          dar[sp] = fetch32(aob = 0x00000000);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x91c6;
          pc = fetch32(aob = 0x00000004);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          mpc = resume_berr;
          continue;
          case 1: /* dbrr */
          ssw |= 0x0008;
          sswi |= 0x0002;
          nmpc = halt;
          case 2: /* halt */
          if ((ssw & 0x0010) != 0) {
            mpc = reset;
            continue;
          } else if ((ssw & 0x0008) != 0) {
            elapsed += Math.max(0, slice - elapsed);
          }
          break;
          case 3: /* bevtf32 */
          if ((ssw & 0x0020) != 0) {
            ssw &= ~0x0040;
            mpc = berr;
            continue;
          } else if ((ssw & 0x0040) == 0) {
            dib <<= 16;
            ssw = (ssw & ~0x0080) | 0x0040;
            dib |= fetch16(aob += 2) & 0xffff;
            if ((ssw & 0x0030) == 0) {
              mpc = nmpc;
              continue;
            }
          }
          mpc = bevt;
          continue;
          case 4: /* bevtr32 */
          if ((ssw & 0x0020) != 0) {
            ssw &= ~0x0040;
            mpc = berr;
            continue;
          } else if ((ssw & 0x0040) == 0) {
            dib <<= 16;
            ssw = (ssw & ~0x0080) | 0x0040;
            dib |= read16(aob += 2) & 0xffff;
            if ((ssw & 0x0030) == 0) {
              mpc = nmpc;
              continue;
            }
          }
          case 5: /* bevtw32 */
          if ((ssw & 0x0020) != 0) {
            ssw &= ~0x0040;
            mpc = berr;
            continue;
          } else if ((ssw & 0x0040) == 0) {
            ssw &= ~0x0080;
            write16(aob += 2, dob);
            if ((ssw & 0x0030) == 0) {
              ssw &= ~0xbfe7;
              break;
            }
          }
          mpc = bevt;
          continue;
          case 6: /* bevt */
          if ((ssw & 0x0020) == 0) {
            mpc = halt;
            continue;
          }
          case 7: /* berr */
          elapsed += 6;
          vdt1 = ((sswi & 0xc800) << 16) | ((tvn & 0x3fc) << 14) | ((ssw ^ ~0x8000) & 0xffdf);
          tvn = 8;
          mpc = trap8000;
          continue;
          case 8: /* aerr */
          elapsed += 6;
          vdt1 = ((sswi & 0xc800) << 16) | ((tvn & 0x3fc) << 14) | ((ssw ^ ~0x8000) & 0xffdf);
          tvn = 12;
          case 9: /* trap8000 */
          if ((vdt1 & 0x0200) == 0) {
            if ((aob & 0x000000001) != 0) {
              aob -= 1;
              vdt1 &= ~0x0400;
            } else {
              vdt1 |= 0x0400;
              if ((vdt1 & 0x0100) == 0) {
                dob <<= 8;
              }
            }
          }
          vat1 = at;
          vat2 = au;
          vat3 = aob;
          vdt2 = dob;
          vdt3 = dib;
          sp = spi(sr | 0x2000);
          au = dar[sp] - 58;
          dar[sp] = au;
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x8005;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = dbrr;
            continue;
          }
          write16(aob, dob = sr);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x80c5;
          write32(aob = au + 0x0002, dob = pc);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x80c5;
          write32(aob = au + 0x000a, dob = vat3);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          if ((vdt1 & 0x0100) == 0) {
            if ((vdt1 & 0x0080) == 0) {
              elapsed += 8;
              ssw = (ssw & 0x0018) | 0x80c5;
              write32(aob = au + 0x0010, dob = vdt2);
              if ((ssw & 0x0030) != 0) {
                mpc = dbrr;
                continue;
              }
            } else {
              elapsed += 4;
              ssw = (ssw & 0x0018) | 0x8005;
              write16(aob = au + 0x0010, dob = vdt2);
              if ((ssw & 0x0030) != 0) {
                mpc = dbrr;
                continue;
              }
            }
          } else if ((vdt1 & 0x00c0) == 0x0040) {
            elapsed += 4;
            ssw = (ssw & 0x0018) | 0x8005;
            write16(aob = au + 0x0012, dob = vdt3 >> 16);
            if ((ssw & 0x0030) != 0) {
              mpc = dbrr;
              continue;
            }
          }
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x8005;
          write16(aob = au + 0x0018, dob = irb);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x8005;
          write16(aob = au + 0x001a, dob = nmpc);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x8005;
          write16(aob = au + 0x001c, dob = scan);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x80c5;
          write32(aob = au + 0x001e, dob = alub);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x80c5;
          write32(aob = au + 0x0022, dob = vat1);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x80c5;
          write32(aob = au + 0x0026, dob = vat2);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x8005;
          write16(aob = au + 0x002e, dob = vdt1 >> 16);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x8005;
          write16(aob = au + 0x0030, dob = ir);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x80c5;
          write32(aob = au + 0x0032, dob = dt);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x80c5;
          write32(aob = au + 0x0036, dob = cip);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          case 10: /* resume_trap8000 */
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x8005;
          write16(aob = au + 0x0006, dob = 0x8000 | tvn);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x8005;
          write16(aob = au + 0x0008, dob = vdt1);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          sr = (sr & ~0xc000) | 0x2000;
          sswi &= ~0xc800;
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x91c5;
          if (((aob = tvn + vbr) & 0x000000001) != 0) {
            mpc = dbrr;
            continue;
          }
          pc = read32(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          case 11: /* resume_berr */
          scan = 0;
          tvn = 0;
          nmpc = resume;
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0xa106;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = dbrr;
            continue;
          }
          irb = fetch16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          ssw &= ~0xbfe7;
          break;
          case 12: /* trap2000 */
          sp = spi(sr | 0x2000);
          au = dar[sp] - 12;
          dar[sp] = au;
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x8005;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = dbrr;
            continue;
          }
          write16(aob, dob = sr);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x80c5;
          write32(aob = au + 0x0002, dob = pc + scan);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x8005;
          write16(aob = au + 0x0006, dob = 0x2000 | tvn);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x80c5;
          write32(aob = au + 0x0008, dob = cip);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          mpc = enter_trap0000;
          continue;
          case 13: /* trapill */
          pc = cip;
          scan = 0;
          case 14: /* trap0000 */
          sp = spi(sr | 0x2000);
          au = dar[sp] - 8;
          dar[sp] = au;
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x8005;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = dbrr;
            continue;
          }
          write16(aob, dob = sr);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x80c5;
          write32(aob = au + 0x0002, dob = pc + scan);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x8005;
          write16(aob = au + 0x0006, dob = tvn);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          case 15: /* enter_trap0000 */
          sr = (sr & ~0xc000) | 0x2000;
          sswi &= ~0xc800;
          nmpc = 16;
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x91c5;
          if (((aob = tvn + vbr) & 0x000000001) != 0) {
            mpc = dbrr;
            continue;
          }
          dib = read32(aob);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtr32;
            continue;
          }
          case 16:
          pc = dib;
          mpc = execute_trap;
          continue;
          case 17: /* uninitialized */
          tvn = 60;
          nmpc = 18;
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x91c5;
          if (((aob = tvn + vbr) & 0x000000001) != 0) {
            mpc = dbrr;
            continue;
          }
          dib = read32(aob);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtr32;
            continue;
          }
          case 18:
          pc = dib;
          mpc = enter_irq;
          continue;
          case 19: /* interrupt */
          elapsed += 10;
          hdlr = handle_interrupt((sswi & 0x0700) >> 8);
          exit |= (hdlr & 0x8000) != 0;
          if ((hdlr & 0x3000) != 0x3000) {
            sswi &= ~0x0700;
            sp = spi(sr);
            mpc = resume;
            continue;
          } else if ((hdlr & 0x3000) == 0x2000) {
            tvn = 96;
          } else if ((hdlr & 0x3000) == 0x1000) {
            tvn = 96 + (sswi & 0x0700) >> 6;
          } else if ((hdlr & 0x4000) != 0) {
            tvn = 96;
          } else if ((sswi & 0x0004) != 0) {
            tvn = 96 + (sswi & 0x0700) >> 6;
          } else {
            tvn = (hdlr & 0xff) << 2;
          }
          sp = spi(sr | 0x2000);
          au = dar[sp] - 8;
          dar[sp] = au;
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x8005;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = dbrr;
            continue;
          }
          write16(aob, dob = sr);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x80c5;
          write32(aob = au + 0x0002, dob = pc);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          sr |= 0x2000;
          if ((sr & 0x1000) != 0) {
            sp = spi(sr & ~0x1000);
            at = dar[sp] - 8;
            dar[sp] = at;
            elapsed += 4;
            ssw = (ssw & 0x0018) | 0x8005;
            if (((aob = at) & 0x000000001) != 0) {
              mpc = dbrr;
              continue;
            }
            write16(aob, dob = sr);
            if ((ssw & 0x0030) != 0) {
              mpc = dbrr;
              continue;
            }
            elapsed += 8;
            ssw = (ssw & 0x0018) | 0x80c5;
            write32(aob = at + 0x0002, dob = pc);
            if ((ssw & 0x0030) != 0) {
              mpc = dbrr;
              continue;
            }
          }
          sr = (sswi & 0x0700) | (sr & ~0xd700);
          sswi &= ~0xcf00;
          nmpc = 20;
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x91c5;
          if (((aob = tvn + vbr) & 0x000000001) != 0) {
            mpc = dbrr;
            continue;
          }
          dib = read32(aob);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtr32;
            continue;
          }
          case 20:
          pc = dib;
          if (pc == 0x00000000) {
            mpc = uninitialized;
            continue;
          }
          case 21: /* enter_irq */
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x8005;
          write16(aob = au + 0x0006, dob = tvn);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          if ((sr & 0x1000) != 0) {
            elapsed += 4;
            ssw = (ssw & 0x0018) | 0x8005;
            write16(aob = at + 0x0006, dob = 0x1000 | tvn);
            if ((ssw & 0x0030) != 0) {
              mpc = dbrr;
              continue;
            }
            sr &= ~0x1000;
          }
          case 22: /* execute_trap */
          scan = 0;
          tvn = 0;
          case 23: /* resume_prefetch */
          nmpc = resume;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          ssw &= ~0xbfe7;
          case 24: /* resume */
          if ((ssw & 0x0018) != 0) {
            nmpc = resume;
            mpc = halt;
            continue;
          } else if ((sswi & 0x0010) != 0) {
            exit |= sngl;
            sngl |= true;
            if (exit) {
              nmpc = resume;
              break;
            }
          } else if ((sswi & 0xc000) != 0) {
            elapsed += 6;
            hdlr = handle_trace(cip);
            exit |= (hdlr & 0x8000) != 0;
            if ((hdlr & 0x4000) == 0) {
              tvn = 36;
              mpc = (sswi & 0x0008) != 0 ? trap2000 : trap0000;
              continue;
            }
            sswi &= ~0xc000;
          }
          case 25: /* resume_notrace */
          ipend = sswi & 0x0700;
          if ((ipend == 0x0700) || ((sr & 0x0700) < ipend)) {
            mpc = interrupt;
            continue;
          }
          cip = pc + scan;
          pc = cip + 2;
          scan = 0;
          ir = irb & 0xffff;
          decoded = MacroPLA.decode(ir);
          nmpc = decoded.a1;
          sswi |= (sr & 0x8000);
          break;
          case 26: /* op_stop */
          if ((sr & 0x2000) == 0) {
            elapsed += 6;
            tvn = 32;
            mpc = trapill;
            continue;
          }
          sr = dt & 0xf71f;
          nmpc = op_stop_loop;
          case 27: /* op_stop_loop */
          if ((ssw & 0x0018) != 0) {
            nmpc = op_stop_loop;
            mpc = halt;
            continue;
          } else if ((sswi & 0xc000) != 0) {
            elapsed += 6;
            hdlr = handle_trace(cip);
            exit |= (hdlr & 0x8000) != 0;
            if ((hdlr & 0x4000) == 0) {
              tvn = 36;
              mpc = (sswi & 0x0008) != 0 ? trap2000 : trap0000;
              continue;
            }
            sswi &= ~0xc000;
            mpc = resume_notrace;
            continue;
          }
          ipend = sswi & 0x0700;
          if ((ipend == 0x0700) || ((sr & 0x0700) < ipend)) {
            mpc = interrupt;
            continue;
          }
          elapsed += Math.max(0, slice - elapsed);
          break;
          case 28: /* ea_resume_write8 */
          nmpc = 29;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 29:
          nmpc = 30;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x8201;
          write8(aob = at, dob = dt);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 30:
          ssw &= ~0xbfe7;
          mpc = resume;
          continue;
          case 31: /* ea_resume_write16 */
          nmpc = 32;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 32:
          nmpc = 33;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x8001;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          write16(aob, dob = dt);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 33:
          ssw &= ~0xbfe7;
          mpc = resume;
          continue;
          case 34: /* ea_resume_write32 */
          nmpc = 35;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 35:
          nmpc = 36;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x80c1;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          write32(aob, dob = dt);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtw32;
            continue;
          }
          case 36:
          ssw &= ~0xbfe7;
          mpc = resume;
          continue;
          case 37: /* op_imm16 */
          nmpc = 38;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 38:
          dt = dib;
          nmpc = decoded.a2;
          ssw &= ~0xbfe7;
          break;
          case 39: /* op_imm32 */
          nmpc = 40;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c2;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch32(aob);
          scan += 4;
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtf32;
            continue;
          }
          case 40:
          dt = dib;
          nmpc = decoded.a2;
          ssw &= ~0xbfe7;
          break;
          case 41: /* ea_aid8 */
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          at = dar[rx];
          elapsed += 2;
          nmpc = decoded.a2;
          break;
          case 42: /* ea_aid16 */
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          at = dar[rx];
          elapsed += 2;
          nmpc = decoded.a2;
          break;
          case 43: /* ea_aid32 */
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          at = dar[rx];
          elapsed += 2;
          nmpc = decoded.a2;
          break;
          case 44: /* ea_ais8_read */
          sswi |= 0x0800;
          case 45: /* ea_ais8 */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          at = dar[ry];
          if ((sswi & 0x0800) == 0) {
            elapsed += 2;
            nmpc = decoded.a3;
            break;
          }
          case 46: /* ea_read8 */
          sswi &= ~0x0800;
          alub = dt;
          nmpc = 47;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9301;
          dib = read8(aob = at);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          if ((ssw & 0x0600) == 0x0600) {
            dib >>= 8;
          }
          case 47:
          dt = dib;
          ssw &= ~0xbfe7;
          nmpc = decoded.a3;
          break;
          case 48: /* ea_ais16_read */
          sswi |= 0x0800;
          case 49: /* ea_ais16 */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          at = dar[ry];
          if ((sswi & 0x0800) == 0) {
            elapsed += 2;
            nmpc = decoded.a3;
            break;
          }
          case 50: /* ea_read16 */
          sswi &= ~0x0800;
          alub = dt;
          nmpc = 51;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9101;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 51:
          dt = dib;
          ssw &= ~0xbfe7;
          nmpc = decoded.a3;
          break;
          case 52: /* ea_ais32_read */
          sswi |= 0x0800;
          case 53: /* ea_ais32 */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          at = dar[ry];
          if ((sswi & 0x0800) == 0) {
            elapsed += 2;
            nmpc = decoded.a3;
            break;
          }
          case 54: /* ea_read32 */
          sswi &= ~0x0800;
          alub = dt;
          nmpc = 55;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c1;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read32(aob);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtr32;
            continue;
          }
          case 55:
          dt = dib;
          ssw &= ~0xbfe7;
          nmpc = decoded.a3;
          break;
          case 56: /* ea_aipd8_read */
          sswi |= 0x0800;
          case 57: /* ea_aipd8 */
          rx = (ir >> 9) & 0x0007;
          if (rx == 7) {
            at = dar[sp];
            dar[sp] += 2;
          } else {
            rx |= 8;
            at = dar[rx];
            dar[rx] += 1;
          }
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a2;
            break;
          }
          mpc = ead_read8;
          continue;
          case 58: /* ea_aipd16_read */
          sswi |= 0x0800;
          case 59: /* ea_aipd16 */
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          at = dar[rx];
          dar[rx] += 2;
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a2;
            break;
          }
          mpc = ead_read16;
          continue;
          case 60: /* ea_aipd32_read */
          sswi |= 0x0800;
          case 61: /* ea_aipd32 */
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          at = dar[rx];
          dar[rx] += 4;
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a2;
            break;
          }
          mpc = ead_read32;
          continue;
          case 62: /* ea_aips8_read */
          sswi |= 0x0800;
          case 63: /* ea_aips8 */
          ry = ir & 0x0007;
          if (ry == 7) {
            at = dar[sp];
            dar[sp] += 2;
          } else {
            ry |= 8;
            at = dar[ry];
            dar[ry] += 1;
          }
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a3;
            break;
          }
          mpc = ea_read8;
          continue;
          case 64: /* ea_aips16_read */
          sswi |= 0x0800;
          case 65: /* ea_aips16 */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          at = dar[ry];
          dar[ry] += 2;
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a3;
            break;
          }
          mpc = ea_read16;
          continue;
          case 66: /* ea_aips32_read */
          sswi |= 0x0800;
          case 67: /* ea_aips32 */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          at = dar[ry];
          dar[ry] += 4;
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a3;
            break;
          }
          mpc = ea_read32;
          continue;
          case 68: /* ea_paid8_read */
          sswi |= 0x0800;
          case 69: /* ea_paid8 */
          rx = (ir >> 9) & 0x0007;
          if (rx == 7) {
            dar[sp] -= 2;
            at = dar[sp];
          } else {
            rx |= 8;
            dar[rx] -= 1;
            at = dar[rx];
          }
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a2;
            break;
          }
          elapsed += 2;
          case 70: /* ead_read8 */
          sswi &= ~0x0800;
          alub = dt;
          nmpc = 71;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9301;
          dib = read8(aob = at);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          if ((ssw & 0x0600) == 0x0600) {
            dib >>= 8;
          }
          case 71:
          dt = dib;
          ssw &= ~0xbfe7;
          nmpc = decoded.a2;
          break;
          case 72: /* ea_paid16_read */
          sswi |= 0x0800;
          case 73: /* ea_paid16 */
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] -= 2;
          at = dar[rx];
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a2;
            break;
          }
          elapsed += 2;
          case 74: /* ead_read16 */
          sswi &= ~0x0800;
          alub = dt;
          nmpc = 75;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9101;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 75:
          dt = dib;
          ssw &= ~0xbfe7;
          nmpc = decoded.a2;
          break;
          case 76: /* ea_paid32_read */
          sswi |= 0x0800;
          case 77: /* ea_paid32 */
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] -= 4;
          at = dar[rx];
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a2;
            break;
          }
          elapsed += 2;
          case 78: /* ead_read32 */
          sswi &= ~0x0800;
          alub = dt;
          nmpc = 79;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c1;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read32(aob);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtr32;
            continue;
          }
          case 79:
          dt = dib;
          ssw &= ~0xbfe7;
          nmpc = decoded.a2;
          break;
          case 80: /* ea_pais8_read */
          sswi |= 0x0800;
          case 81: /* ea_pais8 */
          ry = ir & 0x0007;
          if (ry == 7) {
            dar[sp] -= 2;
            at = dar[sp];
          } else {
            ry |= 8;
            dar[ry] -= 1;
            at = dar[ry];
          }
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a3;
            break;
          }
          elapsed += 2;
          mpc = ea_read8;
          continue;
          case 82: /* ea_pais16_read */
          sswi |= 0x0800;
          case 83: /* ea_pais16 */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          dar[ry] -= 2;
          at = dar[ry];
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a3;
            break;
          }
          elapsed += 2;
          mpc = ea_read16;
          continue;
          case 84: /* ea_pais32_read */
          sswi |= 0x0800;
          case 85: /* ea_pais32 */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          dar[ry] -= 4;
          at = dar[ry];
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a3;
            break;
          }
          elapsed += 2;
          mpc = ea_read32;
          continue;
          case 86: /* ea_dad8 */
          nmpc = 87;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 87:
          at = dib;
          ssw &= ~0xbfe7;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          at = ((short) at) + dar[rx];
          elapsed += 4;
          nmpc = decoded.a2;
          break;
          case 88: /* ea_dad16 */
          nmpc = 89;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 89:
          at = dib;
          ssw &= ~0xbfe7;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          at = ((short) at) + dar[rx];
          elapsed += 4;
          nmpc = decoded.a2;
          break;
          case 90: /* ea_dad32 */
          nmpc = 91;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 91:
          at = dib;
          ssw &= ~0xbfe7;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          at = ((short) at) + dar[rx];
          nmpc = decoded.a2;
          break;
          case 92: /* ea_das8_read */
          sswi |= 0x0800;
          case 93: /* ea_das8 */
          nmpc = 94;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 94:
          at = dib;
          ssw &= ~0xbfe7;
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          at = ((short) at) + dar[ry];
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a3;
            break;
          }
          mpc = ea_read8;
          continue;
          case 95: /* ea_das16_read */
          sswi |= 0x0800;
          case 96: /* ea_das16 */
          nmpc = 97;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 97:
          at = dib;
          ssw &= ~0xbfe7;
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          at = ((short) at) + dar[ry];
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a3;
            break;
          }
          mpc = ea_read16;
          continue;
          case 98: /* ea_das32_read */
          sswi |= 0x0800;
          case 99: /* ea_das32 */
          nmpc = 100;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 100:
          at = dib;
          ssw &= ~0xbfe7;
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          at = ((short) at) + dar[ry];
          if ((sswi & 0x0800) == 0) {
            nmpc = decoded.a3;
            break;
          }
          mpc = ea_read32;
          continue;
          case 101: /* ea_daid8 */
          au = pc + scan;
          nmpc = 102;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 102:
          ssw &= ~0xbfe7;
          if ((sswi & 0x0020) != 0) {
            irb &= 0xf8ff;
          }
          if ((irb & 0x0100) == 0) {
            at = (byte) irb;
            rx = (ir >> 9) & 0x0007;
            rx = rx == 7 ? sp : rx | 8;
            at += dar[rx];
            rz = (irb >> 12) & 0x000f;
            if (rz == 0x000f) {
              rz = sp;
            }
            au = (irb & 0x0800) == 0 ? (short) dar[rz] : dar[rz];
            at += au << ((irb & 0x0600) >> 9);
            mpc = ea_daid8_fetch;
            continue;
          }
          at = 0;
          if ((irb & 0x0080) == 0) {
            rx = (ir >> 9) & 0x0007;
            rx = rx == 7 ? sp : rx | 8;
            at += dar[rx];
          }
          if ((irb & 0x0040) == 0) {
            rz = (irb >> 12) & 0x000f;
            if (rz == 0x000f) {
              rz = sp;
            }
            au = (irb & 0x0800) == 0 ? (short) dar[rz] : dar[rz];
            au <<= ((irb & 0x0600) >> 9);
          }
          nmpc = ea_daid8_base;
          if ((irb & 0x0020) == 0) {
            mpc = ea_daid8_no_base;
            continue;
          } else if ((irb & 0x0010) == 0) {
            mpc = ea_dais_imm16;
            continue;
          }
          mpc = ea_daix_imm32;
          continue;
          case 103: /* ea_daid8_base */
          at += dib;
          ssw &= ~0xbfe7;
          case 104: /* ea_daid8_no_base */
          if ((irb & 0x0004) == 0) {
            at += au;
            au = 0;
            if ((irb & 0x0007) == 0) {
              mpc = ea_daid8_fetch;
              continue;
            }
          }
          nmpc = 105;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c1;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read32(aob);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtr32;
            continue;
          }
          case 105:
          at = dib;
          at += au;
          ssw &= ~0xbfe7;
          nmpc = ea_daid8_outer;
          if ((irb & 0x0002) == 0) {
            mpc = ea_daid8_fetch;
            continue;
          } else if ((irb & 0x0001) == 0) {
            mpc = ea_dais_imm16;
            continue;
          }
          mpc = ea_daix_imm32;
          continue;
          case 106: /* ea_daid8_outer */
          at += dib;
          ssw &= ~0xbfe7;
          case 107: /* ea_daid8_fetch */
          elapsed += 4;
          nmpc = decoded.a2;
          break;
          case 108: /* ea_daid16 */
          au = pc + scan;
          nmpc = 109;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 109:
          ssw &= ~0xbfe7;
          if ((sswi & 0x0020) != 0) {
            irb &= 0xf8ff;
          }
          if ((irb & 0x0100) == 0) {
            at = (byte) irb;
            rx = (ir >> 9) & 0x0007;
            rx = rx == 7 ? sp : rx | 8;
            at += dar[rx];
            rz = (irb >> 12) & 0x000f;
            if (rz == 0x000f) {
              rz = sp;
            }
            au = (irb & 0x0800) == 0 ? (short) dar[rz] : dar[rz];
            at += au << ((irb & 0x0600) >> 9);
            mpc = ea_daid16_fetch;
            continue;
          }
          at = 0;
          if ((irb & 0x0080) == 0) {
            rx = (ir >> 9) & 0x0007;
            rx = rx == 7 ? sp : rx | 8;
            at += dar[rx];
          }
          if ((irb & 0x0040) == 0) {
            rz = (irb >> 12) & 0x000f;
            if (rz == 0x000f) {
              rz = sp;
            }
            au = (irb & 0x0800) == 0 ? (short) dar[rz] : dar[rz];
            au <<= ((irb & 0x0600) >> 9);
          }
          nmpc = ea_daid16_base;
          if ((irb & 0x0020) == 0) {
            mpc = ea_daid16_no_base;
            continue;
          } else if ((irb & 0x0010) == 0) {
            mpc = ea_dais_imm16;
            continue;
          }
          mpc = ea_daix_imm32;
          continue;
          case 110: /* ea_daid16_base */
          at += dib;
          ssw &= ~0xbfe7;
          case 111: /* ea_daid16_no_base */
          if ((irb & 0x0004) == 0) {
            at += au;
            au = 0;
            if ((irb & 0x0007) == 0) {
              mpc = ea_daid16_fetch;
              continue;
            }
          }
          nmpc = 112;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c1;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read32(aob);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtr32;
            continue;
          }
          case 112:
          at = dib;
          at += au;
          ssw &= ~0xbfe7;
          nmpc = ea_daid16_outer;
          if ((irb & 0x0002) == 0) {
            mpc = ea_daid16_fetch;
            continue;
          } else if ((irb & 0x0001) == 0) {
            mpc = ea_dais_imm16;
            continue;
          }
          mpc = ea_daix_imm32;
          continue;
          case 113: /* ea_daid16_outer */
          at += dib;
          ssw &= ~0xbfe7;
          case 114: /* ea_daid16_fetch */
          elapsed += 4;
          nmpc = decoded.a2;
          break;
          case 115: /* ea_daid32 */
          au = pc + scan;
          nmpc = 116;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 116:
          ssw &= ~0xbfe7;
          if ((sswi & 0x0020) != 0) {
            irb &= 0xf8ff;
          }
          if ((irb & 0x0100) == 0) {
            at = (byte) irb;
            rx = (ir >> 9) & 0x0007;
            rx = rx == 7 ? sp : rx | 8;
            at += dar[rx];
            rz = (irb >> 12) & 0x000f;
            if (rz == 0x000f) {
              rz = sp;
            }
            au = (irb & 0x0800) == 0 ? (short) dar[rz] : dar[rz];
            at += au << ((irb & 0x0600) >> 9);
            mpc = ea_daid32_fetch;
            continue;
          }
          at = 0;
          if ((irb & 0x0080) == 0) {
            rx = (ir >> 9) & 0x0007;
            rx = rx == 7 ? sp : rx | 8;
            at += dar[rx];
          }
          if ((irb & 0x0040) == 0) {
            rz = (irb >> 12) & 0x000f;
            if (rz == 0x000f) {
              rz = sp;
            }
            au = (irb & 0x0800) == 0 ? (short) dar[rz] : dar[rz];
            au <<= ((irb & 0x0600) >> 9);
          }
          nmpc = ea_daid32_base;
          if ((irb & 0x0020) == 0) {
            mpc = ea_daid32_no_base;
            continue;
          } else if ((irb & 0x0010) == 0) {
            mpc = ea_dais_imm16;
            continue;
          }
          mpc = ea_daix_imm32;
          continue;
          case 117: /* ea_daid32_base */
          at += dib;
          ssw &= ~0xbfe7;
          case 118: /* ea_daid32_no_base */
          if ((irb & 0x0004) == 0) {
            at += au;
            au = 0;
            if ((irb & 0x0007) == 0) {
              mpc = ea_daid32_fetch;
              continue;
            }
          }
          nmpc = 119;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c1;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read32(aob);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtr32;
            continue;
          }
          case 119:
          at = dib;
          at += au;
          ssw &= ~0xbfe7;
          nmpc = ea_daid32_outer;
          if ((irb & 0x0002) == 0) {
            mpc = ea_daid32_fetch;
            continue;
          } else if ((irb & 0x0001) == 0) {
            mpc = ea_dais_imm16;
            continue;
          }
          mpc = ea_daix_imm32;
          continue;
          case 120: /* ea_daid32_outer */
          at += dib;
          ssw &= ~0xbfe7;
          case 121: /* ea_daid32_fetch */
          elapsed += 4;
          nmpc = decoded.a2;
          break;
          case 122: /* ea_daix_imm32 */
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c2;
          dib = fetch32(aob = pc + scan);
          scan += 4;
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtf32;
            continue;
          }
          break;
          case 123: /* ea_dais_imm16 */
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          dib = fetch16(aob = pc + scan);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          break;
          case 124: /* ea_dais8_read */
          sswi |= 0x0800;
          case 125: /* ea_dais8 */
          au = pc + scan;
          nmpc = 126;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 126:
          ssw &= ~0xbfe7;
          if ((sswi & 0x0020) != 0) {
            irb &= 0xf8ff;
          }
          if ((irb & 0x0100) == 0) {
            at = (byte) irb;
            ry = ir & 0x0007;
            ry = ry == 7 ? sp : ry | 8;
            at += dar[ry];
            rz = (irb >> 12) & 0x000f;
            if (rz == 0x000f) {
              rz = sp;
            }
            au = (irb & 0x0800) == 0 ? (short) dar[rz] : dar[rz];
            at += au << ((irb & 0x0600) >> 9);
            mpc = ea_dais8_fetch;
            continue;
          }
          at = 0;
          if ((irb & 0x0080) == 0) {
            ry = ir & 0x0007;
            ry = ry == 7 ? sp : ry | 8;
            at += dar[ry];
          }
          if ((irb & 0x0040) == 0) {
            rz = (irb >> 12) & 0x000f;
            if (rz == 0x000f) {
              rz = sp;
            }
            au = (irb & 0x0800) == 0 ? (short) dar[rz] : dar[rz];
            au <<= ((irb & 0x0600) >> 9);
          }
          nmpc = ea_dais8_base;
          if ((irb & 0x0020) == 0) {
            mpc = ea_dais8_no_base;
            continue;
          } else if ((irb & 0x0010) == 0) {
            mpc = ea_dais_imm16;
            continue;
          }
          mpc = ea_daix_imm32;
          continue;
          case 127: /* ea_dais8_base */
          at += dib;
          ssw &= ~0xbfe7;
          case 128: /* ea_dais8_no_base */
          if ((irb & 0x0004) == 0) {
            at += au;
            au = 0;
            if ((irb & 0x0007) == 0) {
              mpc = ea_dais8_fetch;
              continue;
            }
          }
          nmpc = 129;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c1;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read32(aob);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtr32;
            continue;
          }
          case 129:
          at = dib;
          at += au;
          ssw &= ~0xbfe7;
          nmpc = ea_dais8_outer;
          if ((irb & 0x0002) == 0) {
            mpc = ea_dais8_fetch;
            continue;
          } else if ((irb & 0x0001) == 0) {
            mpc = ea_dais_imm16;
            continue;
          }
          mpc = ea_daix_imm32;
          continue;
          case 130: /* ea_dais8_outer */
          at += dib;
          ssw &= ~0xbfe7;
          case 131: /* ea_dais8_fetch */
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a3;
            break;
          }
          elapsed += 2;
          mpc = ea_read8;
          continue;
          case 132: /* ea_dais16_read */
          sswi |= 0x0800;
          case 133: /* ea_dais16 */
          au = pc + scan;
          nmpc = 134;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 134:
          ssw &= ~0xbfe7;
          if ((sswi & 0x0020) != 0) {
            irb &= 0xf8ff;
          }
          if ((irb & 0x0100) == 0) {
            at = (byte) irb;
            ry = ir & 0x0007;
            ry = ry == 7 ? sp : ry | 8;
            at += dar[ry];
            rz = (irb >> 12) & 0x000f;
            if (rz == 0x000f) {
              rz = sp;
            }
            au = (irb & 0x0800) == 0 ? (short) dar[rz] : dar[rz];
            at += au << ((irb & 0x0600) >> 9);
            mpc = ea_dais16_fetch;
            continue;
          }
          at = 0;
          if ((irb & 0x0080) == 0) {
            ry = ir & 0x0007;
            ry = ry == 7 ? sp : ry | 8;
            at += dar[ry];
          }
          if ((irb & 0x0040) == 0) {
            rz = (irb >> 12) & 0x000f;
            if (rz == 0x000f) {
              rz = sp;
            }
            au = (irb & 0x0800) == 0 ? (short) dar[rz] : dar[rz];
            au <<= ((irb & 0x0600) >> 9);
          }
          nmpc = ea_dais16_base;
          if ((irb & 0x0020) == 0) {
            mpc = ea_dais16_no_base;
            continue;
          } else if ((irb & 0x0010) == 0) {
            mpc = ea_dais_imm16;
            continue;
          }
          mpc = ea_daix_imm32;
          continue;
          case 135: /* ea_dais16_base */
          at += dib;
          ssw &= ~0xbfe7;
          case 136: /* ea_dais16_no_base */
          if ((irb & 0x0004) == 0) {
            at += au;
            au = 0;
            if ((irb & 0x0007) == 0) {
              mpc = ea_dais16_fetch;
              continue;
            }
          }
          nmpc = 137;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c1;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read32(aob);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtr32;
            continue;
          }
          case 137:
          at = dib;
          at += au;
          ssw &= ~0xbfe7;
          nmpc = ea_dais16_outer;
          if ((irb & 0x0002) == 0) {
            mpc = ea_dais16_fetch;
            continue;
          } else if ((irb & 0x0001) == 0) {
            mpc = ea_dais_imm16;
            continue;
          }
          mpc = ea_daix_imm32;
          continue;
          case 138: /* ea_dais16_outer */
          at += dib;
          ssw &= ~0xbfe7;
          case 139: /* ea_dais16_fetch */
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a3;
            break;
          }
          elapsed += 2;
          mpc = ea_read16;
          continue;
          case 140: /* ea_dais32_read */
          sswi |= 0x0800;
          case 141: /* ea_dais32 */
          au = pc + scan;
          nmpc = 142;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 142:
          ssw &= ~0xbfe7;
          if ((sswi & 0x0020) != 0) {
            irb &= 0xf8ff;
          }
          if ((irb & 0x0100) == 0) {
            at = (byte) irb;
            ry = ir & 0x0007;
            ry = ry == 7 ? sp : ry | 8;
            at += dar[ry];
            rz = (irb >> 12) & 0x000f;
            if (rz == 0x000f) {
              rz = sp;
            }
            au = (irb & 0x0800) == 0 ? (short) dar[rz] : dar[rz];
            at += au << ((irb & 0x0600) >> 9);
            mpc = ea_dais32_fetch;
            continue;
          }
          at = 0;
          if ((irb & 0x0080) == 0) {
            ry = ir & 0x0007;
            ry = ry == 7 ? sp : ry | 8;
            at += dar[ry];
          }
          if ((irb & 0x0040) == 0) {
            rz = (irb >> 12) & 0x000f;
            if (rz == 0x000f) {
              rz = sp;
            }
            au = (irb & 0x0800) == 0 ? (short) dar[rz] : dar[rz];
            au <<= ((irb & 0x0600) >> 9);
          }
          nmpc = ea_dais32_base;
          if ((irb & 0x0020) == 0) {
            mpc = ea_dais32_no_base;
            continue;
          } else if ((irb & 0x0010) == 0) {
            mpc = ea_dais_imm16;
            continue;
          }
          mpc = ea_daix_imm32;
          continue;
          case 143: /* ea_dais32_base */
          at += dib;
          ssw &= ~0xbfe7;
          case 144: /* ea_dais32_no_base */
          if ((irb & 0x0004) == 0) {
            at += au;
            au = 0;
            if ((irb & 0x0007) == 0) {
              mpc = ea_dais32_fetch;
              continue;
            }
          }
          nmpc = 145;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c1;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read32(aob);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtr32;
            continue;
          }
          case 145:
          at = dib;
          at += au;
          ssw &= ~0xbfe7;
          nmpc = ea_dais32_outer;
          if ((irb & 0x0002) == 0) {
            mpc = ea_dais32_fetch;
            continue;
          } else if ((irb & 0x0001) == 0) {
            mpc = ea_dais_imm16;
            continue;
          }
          mpc = ea_daix_imm32;
          continue;
          case 146: /* ea_dais32_outer */
          at += dib;
          ssw &= ~0xbfe7;
          case 147: /* ea_dais32_fetch */
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a3;
            break;
          }
          elapsed += 2;
          mpc = ea_read32;
          continue;
          case 148: /* ea_dpc8_read */
          au = pc + scan;
          nmpc = 149;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 149:
          at = dib;
          at = ((short) at) + au;
          case 150: /* eapc_read8 */
          sswi &= ~0x0800;
          alub = dt;
          nmpc = 151;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9302;
          dib = read8(aob = at);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          if ((ssw & 0x0600) == 0x0600) {
            dib >>= 8;
          }
          case 151:
          dt = (byte) dib;
          ssw &= ~0xbfe7;
          nmpc = decoded.a3;
          break;
          case 152: /* ea_dpc16_read */
          sswi |= 0x0800;
          case 153: /* ea_dpc16 */
          au = pc + scan;
          nmpc = 154;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 154:
          at = dib;
          at = ((short) at) + au;
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a3;
            break;
          }
          case 155: /* eapc_read16 */
          sswi &= ~0x0800;
          alub = dt;
          nmpc = 156;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 156:
          dt = (short) dib;
          ssw &= ~0xbfe7;
          nmpc = decoded.a3;
          break;
          case 157: /* ea_dpc32_read */
          sswi |= 0x0800;
          case 158: /* ea_dpc32 */
          au = pc + scan;
          nmpc = 159;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 159:
          at = dib;
          at = ((short) at) + au;
          if ((sswi & 0x0800) == 0) {
            nmpc = decoded.a3;
            break;
          }
          case 160: /* eapc_read32 */
          sswi &= ~0x0800;
          alub = dt;
          nmpc = 161;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c2;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch32(aob);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtf32;
            continue;
          }
          case 161:
          dt = dib;
          ssw &= ~0xbfe7;
          nmpc = decoded.a3;
          break;
          case 162: /* ea_dpci8_read */
          au = pc + scan;
          nmpc = 163;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 163:
          ssw &= ~0xbfe7;
          if ((sswi & 0x0020) != 0) {
            irb &= 0xf8ff;
          }
          if ((irb & 0x0100) == 0) {
            at = (byte) irb;
            at += au;
            rz = (irb >> 12) & 0x000f;
            if (rz == 0x000f) {
              rz = sp;
            }
            au = (irb & 0x0800) == 0 ? (short) dar[rz] : dar[rz];
            at += au << ((irb & 0x0600) >> 9);
            mpc = ea_dpci8_fetch;
            continue;
          }
          at = 0;
          if ((irb & 0x0080) == 0) {
            at += au;
          }
          if ((irb & 0x0040) == 0) {
            rz = (irb >> 12) & 0x000f;
            if (rz == 0x000f) {
              rz = sp;
            }
            au = (irb & 0x0800) == 0 ? (short) dar[rz] : dar[rz];
            au <<= ((irb & 0x0600) >> 9);
          }
          nmpc = ea_dpci8_base;
          if ((irb & 0x0020) == 0) {
            mpc = ea_dpci8_no_base;
            continue;
          } else if ((irb & 0x0010) == 0) {
            mpc = ea_dais_imm16;
            continue;
          }
          mpc = ea_daix_imm32;
          continue;
          case 164: /* ea_dpci8_base */
          at += dib;
          ssw &= ~0xbfe7;
          case 165: /* ea_dpci8_no_base */
          if ((irb & 0x0004) == 0) {
            at += au;
            au = 0;
            if ((irb & 0x0007) == 0) {
              mpc = ea_dpci8_fetch;
              continue;
            }
          }
          nmpc = 166;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c1;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read32(aob);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtr32;
            continue;
          }
          case 166:
          at = dib;
          at += au;
          ssw &= ~0xbfe7;
          nmpc = ea_dpci8_outer;
          if ((irb & 0x0002) == 0) {
            mpc = ea_dpci8_fetch;
            continue;
          } else if ((irb & 0x0001) == 0) {
            mpc = ea_dais_imm16;
            continue;
          }
          mpc = ea_daix_imm32;
          continue;
          case 167: /* ea_dpci8_outer */
          at += dib;
          ssw &= ~0xbfe7;
          case 168: /* ea_dpci8_fetch */
          elapsed += 2;
          mpc = eapc_read8;
          continue;
          case 169: /* ea_dpci16_read */
          sswi |= 0x0800;
          case 170: /* ea_dpci16 */
          au = pc + scan;
          nmpc = 171;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 171:
          ssw &= ~0xbfe7;
          if ((sswi & 0x0020) != 0) {
            irb &= 0xf8ff;
          }
          if ((irb & 0x0100) == 0) {
            at = (byte) irb;
            at += au;
            rz = (irb >> 12) & 0x000f;
            if (rz == 0x000f) {
              rz = sp;
            }
            au = (irb & 0x0800) == 0 ? (short) dar[rz] : dar[rz];
            at += au << ((irb & 0x0600) >> 9);
            mpc = ea_dpci16_fetch;
            continue;
          }
          at = 0;
          if ((irb & 0x0080) == 0) {
            at += au;
          }
          if ((irb & 0x0040) == 0) {
            rz = (irb >> 12) & 0x000f;
            if (rz == 0x000f) {
              rz = sp;
            }
            au = (irb & 0x0800) == 0 ? (short) dar[rz] : dar[rz];
            au <<= ((irb & 0x0600) >> 9);
          }
          nmpc = ea_dpci16_base;
          if ((irb & 0x0020) == 0) {
            mpc = ea_dpci16_no_base;
            continue;
          } else if ((irb & 0x0010) == 0) {
            mpc = ea_dais_imm16;
            continue;
          }
          mpc = ea_daix_imm32;
          continue;
          case 172: /* ea_dpci16_base */
          at += dib;
          ssw &= ~0xbfe7;
          case 173: /* ea_dpci16_no_base */
          if ((irb & 0x0004) == 0) {
            at += au;
            au = 0;
            if ((irb & 0x0007) == 0) {
              mpc = ea_dpci16_fetch;
              continue;
            }
          }
          nmpc = 174;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c1;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read32(aob);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtr32;
            continue;
          }
          case 174:
          at = dib;
          at += au;
          ssw &= ~0xbfe7;
          nmpc = ea_dpci16_outer;
          if ((irb & 0x0002) == 0) {
            mpc = ea_dpci16_fetch;
            continue;
          } else if ((irb & 0x0001) == 0) {
            mpc = ea_dais_imm16;
            continue;
          }
          mpc = ea_daix_imm32;
          continue;
          case 175: /* ea_dpci16_outer */
          at += dib;
          ssw &= ~0xbfe7;
          case 176: /* ea_dpci16_fetch */
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a3;
            break;
          }
          elapsed += 2;
          mpc = eapc_read16;
          continue;
          case 177: /* ea_dpci32_read */
          sswi |= 0x0800;
          case 178: /* ea_dpci32 */
          au = pc + scan;
          nmpc = 179;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 179:
          ssw &= ~0xbfe7;
          if ((sswi & 0x0020) != 0) {
            irb &= 0xf8ff;
          }
          if ((irb & 0x0100) == 0) {
            at = (byte) irb;
            at += au;
            rz = (irb >> 12) & 0x000f;
            if (rz == 0x000f) {
              rz = sp;
            }
            au = (irb & 0x0800) == 0 ? (short) dar[rz] : dar[rz];
            at += au << ((irb & 0x0600) >> 9);
            mpc = ea_dpci32_fetch;
            continue;
          }
          at = 0;
          if ((irb & 0x0080) == 0) {
            at += au;
          }
          if ((irb & 0x0040) == 0) {
            rz = (irb >> 12) & 0x000f;
            if (rz == 0x000f) {
              rz = sp;
            }
            au = (irb & 0x0800) == 0 ? (short) dar[rz] : dar[rz];
            au <<= ((irb & 0x0600) >> 9);
          }
          nmpc = ea_dpci32_base;
          if ((irb & 0x0020) == 0) {
            mpc = ea_dpci32_no_base;
            continue;
          } else if ((irb & 0x0010) == 0) {
            mpc = ea_dais_imm16;
            continue;
          }
          mpc = ea_daix_imm32;
          continue;
          case 180: /* ea_dpci32_base */
          at += dib;
          ssw &= ~0xbfe7;
          case 181: /* ea_dpci32_no_base */
          if ((irb & 0x0004) == 0) {
            at += au;
            au = 0;
            if ((irb & 0x0007) == 0) {
              mpc = ea_dpci32_fetch;
              continue;
            }
          }
          nmpc = 182;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c1;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read32(aob);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtr32;
            continue;
          }
          case 182:
          at = dib;
          at += au;
          ssw &= ~0xbfe7;
          nmpc = ea_dpci32_outer;
          if ((irb & 0x0002) == 0) {
            mpc = ea_dpci32_fetch;
            continue;
          } else if ((irb & 0x0001) == 0) {
            mpc = ea_dais_imm16;
            continue;
          }
          mpc = ea_daix_imm32;
          continue;
          case 183: /* ea_dpci32_outer */
          at += dib;
          ssw &= ~0xbfe7;
          case 184: /* ea_dpci32_fetch */
          if ((sswi & 0x0800) == 0) {
            elapsed += 4;
            nmpc = decoded.a3;
            break;
          }
          elapsed += 2;
          mpc = eapc_read32;
          continue;
          case 185: /* ea_adr16d8 */
          nmpc = 186;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 186:
          ssw &= ~0xbfe7;
          at = (short) dib;
          nmpc = decoded.a2;
          break;
          case 187: /* ea_adr16d16 */
          nmpc = 188;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 188:
          ssw &= ~0xbfe7;
          at = (short) dib;
          nmpc = decoded.a2;
          break;
          case 189: /* ea_adr16d32 */
          nmpc = 190;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 190:
          ssw &= ~0xbfe7;
          at = (short) dib;
          nmpc = decoded.a2;
          break;
          case 191: /* ea_adr16s8_read */
          sswi |= 0x0800;
          case 192: /* ea_adr16s8 */
          nmpc = 193;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 193:
          at = (short) dib;
          if ((sswi & 0x0800) == 0) {
            ssw &= ~0xbfe7;
            nmpc = decoded.a3;
            break;
          }
          mpc = ea_read8;
          continue;
          case 194: /* ea_adr16s16_read */
          sswi |= 0x0800;
          case 195: /* ea_adr16s16 */
          nmpc = 196;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 196:
          at = (short) dib;
          if ((sswi & 0x0800) == 0) {
            ssw &= ~0xbfe7;
            nmpc = decoded.a3;
            break;
          }
          mpc = ea_read16;
          continue;
          case 197: /* ea_adr16s32_read */
          sswi |= 0x0800;
          case 198: /* ea_adr16s32 */
          nmpc = 199;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 199:
          at = (short) dib;
          if ((sswi & 0x0800) == 0) {
            ssw &= ~0xbfe7;
            nmpc = decoded.a3;
            break;
          }
          mpc = ea_read32;
          continue;
          case 200: /* ea_adr32d8 */
          case 201: /* ea_adr32d16 */
          case 202: /* ea_adr32d32 */
          nmpc = 203;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c2;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch32(aob);
          scan += 4;
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtf32;
            continue;
          }
          case 203:
          at = dib;
          ssw &= ~0xbfe7;
          nmpc = decoded.a2;
          break;
          case 204: /* ea_adr32s8_read */
          sswi |= 0x0800;
          case 205: /* ea_adr32s8 */
          nmpc = 206;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c2;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch32(aob);
          scan += 4;
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtf32;
            continue;
          }
          case 206:
          at = dib;
          if ((sswi & 0x0800) == 0) {
            ssw &= ~0xbfe7;
            nmpc = decoded.a3;
            break;
          }
          mpc = ea_read8;
          continue;
          case 207: /* ea_adr32s16_read */
          sswi |= 0x0800;
          case 208: /* ea_adr32s16 */
          nmpc = 209;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c2;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch32(aob);
          scan += 4;
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtf32;
            continue;
          }
          case 209:
          at = dib;
          if ((sswi & 0x0800) == 0) {
            ssw &= ~0xbfe7;
            nmpc = decoded.a3;
            break;
          }
          mpc = ea_read16;
          continue;
          case 210: /* ea_adr32s32_read */
          sswi |= 0x0800;
          case 211: /* ea_adr32s32 */
          nmpc = 212;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c2;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch32(aob);
          scan += 4;
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtf32;
            continue;
          }
          case 212:
          at = dib;
          if ((sswi & 0x0800) == 0) {
            ssw &= ~0xbfe7;
            nmpc = decoded.a3;
            break;
          }
          mpc = ea_read32;
          continue;
          case 213: /* ea_imm8_read */
          nmpc = 214;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 214:
          ssw &= ~0xbfe7;
          dt = (byte) dib;
          nmpc = decoded.a3;
          break;
          case 215: /* ea_imm16_read */
          nmpc = 216;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 216:
          ssw &= ~0xbfe7;
          dt = (short) dib;
          nmpc = decoded.a3;
          break;
          case 217: /* ea_imm32_read */
          nmpc = 218;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c2;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch32(aob);
          scan += 4;
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtf32;
            continue;
          }
          case 218:
          dt = dib;
          ssw &= ~0xbfe7;
          nmpc = decoded.a3;
          break;
          case 219: /* op_movepw_dd_das */
          rx = (ir >> 9) & 0x0007;
          dt = dar[rx];
          nmpc = 220;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 220:
          nmpc = 221;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x8201;
          write8(aob = at, dob = dt >> 8);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 221:
          nmpc = 222;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x8201;
          write8(aob = at + 0x0002, dob = dt);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 222:
          mpc = resume;
          continue;
          case 223: /* op_movepw_das_dd */
          rx = (ir >> 9) & 0x0007;
          nmpc = 224;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9301;
          dib = read8(aob = at);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          if ((ssw & 0x0600) == 0x0600) {
            dib >>= 8;
          }
          case 224:
          dt = dib;
          nmpc = 225;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9301;
          dib = read8(aob = at + 0x0002);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          if ((ssw & 0x0600) == 0x0600) {
            dib >>= 8;
          }
          case 225:
          dt = (dt << 8) | (dib & 0xff);
          dar[rx] = (dar[rx] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 226: /* op_movepl_dd_das */
          rx = (ir >> 9) & 0x0007;
          dt = dar[rx];
          nmpc = 227;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 227:
          nmpc = 228;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x8201;
          write8(aob = at, dob = dt >> 24);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 228:
          nmpc = 229;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x8201;
          write8(aob = at + 0x0002, dob = dt >> 16);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 229:
          nmpc = 230;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x8201;
          write8(aob = at + 0x0004, dob = dt >> 8);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 230:
          nmpc = 231;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x8201;
          write8(aob = at + 0x0006, dob = dt);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 231:
          mpc = resume;
          continue;
          case 232: /* op_movepl_das_dd */
          rx = (ir >> 9) & 0x0007;
          nmpc = 233;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9301;
          dib = read8(aob = at);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          if ((ssw & 0x0600) == 0x0600) {
            dib >>= 8;
          }
          case 233:
          dt = dib;
          nmpc = 234;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9301;
          dib = read8(aob = at + 0x0002);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          if ((ssw & 0x0600) == 0x0600) {
            dib >>= 8;
          }
          case 234:
          dt = (dt << 8) | (dib & 0xff);
          nmpc = 235;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9301;
          dib = read8(aob = at + 0x0004);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          if ((ssw & 0x0600) == 0x0600) {
            dib >>= 8;
          }
          case 235:
          dt = (dt << 8) | (dib & 0xff);
          nmpc = 236;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9301;
          dib = read8(aob = at + 0x0006);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          if ((ssw & 0x0600) == 0x0600) {
            dib >>= 8;
          }
          case 236:
          dt = (dt << 8) | (dib & 0xff);
          dar[rx] = dt;
          mpc = resume_prefetch;
          continue;
          case 237: /* op_clrb_ds */
          ry = ir & 0x0007;
          dar[ry] &= ~0xff;
          mpc = resume_prefetch;
          continue;
          case 238: /* op_clrw_ds */
          ry = ir & 0x0007;
          dar[ry] &= ~0xffff;
          mpc = resume_prefetch;
          continue;
          case 239: /* op_clrl_ds */
          ry = ir & 0x0007;
          dar[ry] = 0;
          mpc = resume_prefetch;
          continue;
          case 240: /* op_clrb_ea */
          dt = 0;
          mpc = ea_resume_write8;
          continue;
          case 241: /* op_clrw_ea */
          dt = 0;
          mpc = ea_resume_write16;
          continue;
          case 242: /* op_clrl_ea */
          dt = 0;
          mpc = ea_resume_write32;
          continue;
          case 243: /* op_lea_ea_ad */
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] = at;
          mpc = resume_prefetch;
          continue;
          case 244: /* op_pea */
          au = dar[sp] - 4;
          dar[sp] = au;
          nmpc = 245;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x80c1;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          write32(aob, dob = at);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtw32;
            continue;
          }
          case 245:
          mpc = resume_prefetch;
          continue;
          case 246: /* op_swap_ds */
          ry = ir & 0x0007;
          dar[ry] = (dar[ry] << 16) | (dar[ry] >>> 16);
          long_tst(dar[ry]);
          mpc = resume_prefetch;
          continue;
          case 247: /* op_extw_ds */
          ry = ir & 0x0007;
          dar[ry] = (dar[ry] & ~0xffff) | (((byte) dar[ry]) & 0xffff);
          word_tst(dar[ry]);
          mpc = resume_prefetch;
          continue;
          case 248: /* op_extl_ds */
          ry = ir & 0x0007;
          dar[ry] = (short) dar[ry];
          long_tst(dar[ry]);
          mpc = resume_prefetch;
          continue;
          case 249: /* op_extbl_ds */
          ry = ir & 0x0007;
          dar[ry] = (byte) dar[ry];
          long_tst(dar[ry]);
          mpc = resume_prefetch;
          continue;
          case 250: /* op_exg_dd_ds */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = dar[ry];
          dar[ry] = dar[rx];
          dar[rx] = dt;
          mpc = resume_prefetch;
          continue;
          case 251: /* op_exg_ad_as */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dt = dar[ry];
          dar[ry] = dar[rx];
          dar[rx] = dt;
          mpc = resume_prefetch;
          continue;
          case 252: /* op_exg_dd_as */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          rx = (ir >> 9) & 0x0007;
          dt = dar[ry];
          dar[ry] = dar[rx];
          dar[rx] = dt;
          mpc = resume_prefetch;
          continue;
          case 253: /* op_scc_b_ds */
          ry = ir & 0x0007;
          if (testCC((ir & 0x0f00) >> 8)) {
            dar[ry] |= 0xff;
          } else {
            dar[ry] &= ~0xff;
          }
          mpc = resume_prefetch;
          continue;
          case 254: /* op_scc_b_ea */
          dt = testCC((ir & 0x0f00) >> 8) ? -1 : 0;
          mpc = ea_resume_write8;
          continue;
          case 255: /* op_chk_w_ds */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          if (word_chk(dar[ry], dar[rx])) {
            tvn = 24;
            mpc = (sswi & 0x0008) != 0 ? trap2000 : trap0000;
          }
          mpc = resume_prefetch;
          continue;
          case 256: /* op_chk_w_ea */
          rx = (ir >> 9) & 0x0007;
          if (word_chk(dt, dar[rx])) {
            tvn = 24;
            mpc = (sswi & 0x0008) != 0 ? trap2000 : trap0000;
          }
          mpc = resume_prefetch;
          continue;
          case 257: /* op_link_as_imm16 */
          au = dar[sp] - 4;
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          nmpc = 258;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x80c1;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          write32(aob, dob = dar[ry]);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtw32;
            continue;
          }
          case 258:
          dar[ry] = au;
          dar[sp] = au + ((short) dt);
          mpc = resume_prefetch;
          continue;
          case 259: /* op_link_as_imm32 */
          au = dar[sp] - 4;
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          nmpc = 260;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x80c1;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          write32(aob, dob = dar[ry]);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtw32;
            continue;
          }
          case 260:
          dar[ry] = au;
          dar[sp] = au + dt;
          mpc = resume_prefetch;
          continue;
          case 261: /* op_unlk_as */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          au = dar[ry];
          nmpc = 262;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c1;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read32(aob);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtr32;
            continue;
          }
          case 262:
          dar[sp] = au + 4;
          dar[ry] = dib;
          mpc = resume_prefetch;
          continue;
          case 263: /* op_move_usp_as */
          if ((sr & 0x2000) == 0) {
            elapsed += 6;
            tvn = 32;
            mpc = trapill;
            continue;
          }
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          dar[ry] = dar[15];
          mpc = resume_prefetch;
          continue;
          case 264: /* op_move_as_usp */
          if ((sr & 0x2000) == 0) {
            elapsed += 6;
            tvn = 32;
            mpc = trapill;
            continue;
          }
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          dar[15] = dar[ry];
          mpc = resume_prefetch;
          continue;
          case 265: /* op_movec_cr_rz */
          if ((sr & 0x2000) == 0) {
            elapsed += 6;
            tvn = 32;
            mpc = trapill;
            continue;
          }
          nmpc = 266;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 266:
          ssw &= ~0xbfe7;
          rz = (irb >> 12) & 0x000f;
          if (rz == 0x000f) {
            rz = sp;
          }
          dt = irb & 0x0fff;
          if (dt == 0x000) {
            dar[rz] = sfc;
          } else if (dt == 0x001) {
            dar[rz] = dfc;
          } else if (dt == 0x800) {
            dar[rz] = dar[15];
          } else if (dt == 0x801) {
            dar[rz] = vbr;
          } else if (dt == 0x803) {
            dar[rz] = dar[17];
          } else if (dt == 0x804) {
            dar[rz] = dar[16];
          } else {
            tvn = 16;
            mpc = trapill;
            continue;
          }
          mpc = resume_prefetch;
          continue;
          case 267: /* op_movec_rz_cr */
          if ((sr & 0x2000) == 0) {
            elapsed += 6;
            tvn = 32;
            mpc = trapill;
            continue;
          }
          nmpc = 268;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 268:
          ssw &= ~0xbfe7;
          rz = (irb >> 12) & 0x000f;
          if (rz == 0x000f) {
            rz = sp;
          }
          dt = irb & 0x0fff;
          if (dt == 0x000) {
            sfc = dar[rz] & 0x7;
          } else if (dt == 0x001) {
            dfc = dar[rz] & 0x7;
          } else if (dt == 0x800) {
            dar[15] = dar[rz];
          } else if (dt == 0x801) {
            vbr = dar[rz];
          } else if (dt == 0x803) {
            dar[17] = dar[rz];
          } else if (dt == 0x804) {
            dar[16] = dar[rz];
          } else {
            tvn = 16;
            mpc = trapill;
            continue;
          }
          mpc = resume_prefetch;
          continue;
          case 269: /* op_movemw_rr_ea */
          nmpc = 270;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 270:
          dt = dib;
          nmpc = 271;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 271:
          alub = 0;
          nmpc = 272;
          case 272:
          if (alub >= 16) {
            ssw &= ~0xbfe7;
            mpc = resume;
            continue;
          } else if ((dt & (1 << alub)) == 0) {
            alub += 1;
            mpc = 272;
            continue;
          }
          rz = alub == 15 ? sp : alub;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x8001;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          write16(aob, dob = dar[rz]);
          alub += 1;
          at += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          mpc = 272;
          continue;
          case 273: /* op_movemw_rr_pais */
          nmpc = 274;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 274:
          dt = dib;
          nmpc = 275;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 275:
          alub = 0;
          nmpc = 276;
          case 276:
          if (alub >= 16) {
            ssw &= ~0xbfe7;
            ry = ir & 0x0007;
            ry = ry == 7 ? sp : ry | 8;
            dar[ry] = at;
            mpc = resume;
            continue;
          } else if ((dt & (1 << alub)) == 0) {
            alub += 1;
            mpc = 276;
            continue;
          }
          rz = alub == 0 ? sp : 15 - alub;
          at -= 2;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x8001;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          write16(aob, dob = dar[rz]);
          alub += 1;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          mpc = 276;
          continue;
          case 277: /* op_moveml_rr_ea */
          nmpc = 278;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 278:
          dt = dib;
          nmpc = 279;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 279:
          alub = 0;
          nmpc = 280;
          case 280:
          if (alub >= 16) {
            ssw &= ~0xbfe7;
            mpc = resume;
            continue;
          } else if ((dt & (1 << alub)) == 0) {
            alub += 1;
            mpc = 280;
            continue;
          }
          rz = alub == 15 ? sp : alub;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x80c1;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          write32(aob, dob = dar[rz]);
          alub += 1;
          at += 4;
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtw32;
            continue;
          }
          mpc = 280;
          continue;
          case 281: /* op_moveml_rr_pais */
          nmpc = 282;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 282:
          dt = dib;
          nmpc = 283;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 283:
          alub = 0;
          nmpc = 284;
          case 284:
          if (alub >= 16) {
            ssw &= ~0xbfe7;
            ry = ir & 0x0007;
            ry = ry == 7 ? sp : ry | 8;
            dar[ry] = at;
            mpc = resume;
            continue;
          } else if ((dt & (1 << alub)) == 0) {
            alub += 1;
            mpc = 284;
            continue;
          }
          rz = alub == 0 ? sp : 15 - alub;
          at -= 4;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x80c1;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          write32(aob, dob = dar[rz]);
          alub += 1;
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtw32;
            continue;
          }
          mpc = 284;
          continue;
          case 285: /* op_movemw_ea_rr */
          nmpc = 286;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 286:
          dt = dib;
          nmpc = 287;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 287:
          alub = 0;
          nmpc = 288;
          case 288:
          if (alub >= 16) {
            ssw &= ~0xbfe7;
            mpc = resume;
            continue;
          } else if ((dt & (1 << alub)) == 0) {
            alub += 1;
            mpc = 288;
            continue;
          }
          rz = alub == 15 ? sp : alub;
          nmpc = 289;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9100;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read16(aob);
          alub += 1;
          at += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 289:
          dar[rz] = (short) dib;
          mpc = 288;
          continue;
          case 290: /* op_movemw_aips_rr */
          nmpc = 291;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 291:
          dt = dib;
          nmpc = 292;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 292:
          alub = 0;
          nmpc = 293;
          case 293:
          if (alub >= 16) {
            ssw &= ~0xbfe7;
            ry = ir & 0x0007;
            ry = ry == 7 ? sp : ry | 8;
            dar[ry] = at;
            mpc = resume;
            continue;
          } else if ((dt & (1 << alub)) == 0) {
            alub += 1;
            mpc = 293;
            continue;
          }
          rz = alub == 15 ? sp : alub;
          nmpc = 294;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9100;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read16(aob);
          alub += 1;
          at += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 294:
          dar[rz] = (short) dib;
          mpc = 293;
          continue;
          case 295: /* op_moveml_ea_rr */
          nmpc = 296;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 296:
          dt = dib;
          nmpc = 297;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 297:
          alub = 0;
          nmpc = 298;
          case 298:
          if (alub >= 16) {
            ssw &= ~0xbfe7;
            mpc = resume;
            continue;
          } else if ((dt & (1 << alub)) == 0) {
            alub += 1;
            mpc = 298;
            continue;
          }
          rz = alub == 15 ? sp : alub;
          nmpc = 299;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c0;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read32(aob);
          alub += 1;
          at += 4;
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtr32;
            continue;
          }
          case 299:
          dar[rz] = dib;
          mpc = 298;
          continue;
          case 300: /* op_moveml_aips_rr */
          nmpc = 301;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          scan += 2;
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 301:
          dt = dib;
          nmpc = 302;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0xa102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          irb = fetch16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 302:
          alub = 0;
          nmpc = 303;
          case 303:
          if (alub >= 16) {
            ssw &= ~0xbfe7;
            ry = ir & 0x0007;
            ry = ry == 7 ? sp : ry | 8;
            dar[ry] = at;
            mpc = resume;
            continue;
          } else if ((dt & (1 << alub)) == 0) {
            alub += 1;
            mpc = 303;
            continue;
          }
          rz = alub == 15 ? sp : alub;
          nmpc = 304;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c0;
          if (((aob = at) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read32(aob);
          alub += 1;
          at += 4;
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtr32;
            continue;
          }
          case 304:
          dar[rz] = dib;
          mpc = 303;
          continue;
          case 305: /* op_bcc8 */
          if (!testCC((ir & 0x0f00) >> 8)) {
            elapsed += 2;
            mpc = resume_prefetch;
            continue;
          }
          case 306: /* op_bra8 */
          elapsed += 2;
          scan = (byte) ir;
          sswi |= (sr & 0x4000);
          mpc = resume_prefetch;
          continue;
          case 307: /* op_bcc16 */
          if (!testCC((ir & 0x0f00) >> 8)) {
            elapsed += 2;
            mpc = resume_prefetch;
            continue;
          }
          case 308: /* op_bra16 */
          elapsed += 2;
          scan = (short) dt;
          sswi |= (sr & 0x4000);
          mpc = resume_prefetch;
          continue;
          case 309: /* op_bcc32 */
          if (!testCC((ir & 0x0f00) >> 8)) {
            elapsed += 2;
            mpc = resume_prefetch;
            continue;
          }
          case 310: /* op_bra32 */
          elapsed += 2;
          scan = dt;
          sswi |= (sr & 0x4000);
          mpc = resume_prefetch;
          continue;
          case 311: /* op_bsr8 */
          elapsed += 2;
          au = dar[sp] - 4;
          dar[sp] = au;
          nmpc = 312;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x80c1;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          write32(aob, dob = pc + scan);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtw32;
            continue;
          }
          case 312:
          scan = (byte) ir;
          sswi |= (sr & 0x4000);
          mpc = resume_prefetch;
          continue;
          case 313: /* op_bsr16 */
          elapsed += 2;
          au = dar[sp] - 4;
          dar[sp] = au;
          nmpc = 314;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x80c1;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          write32(aob, dob = pc + scan);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtw32;
            continue;
          }
          case 314:
          scan = (short) dt;
          sswi |= (sr & 0x4000);
          mpc = resume_prefetch;
          continue;
          case 315: /* op_bsr32 */
          elapsed += 2;
          au = dar[sp] - 4;
          dar[sp] = au;
          nmpc = 316;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x80c1;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          write32(aob, dob = pc + scan);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtw32;
            continue;
          }
          case 316:
          scan = dt;
          sswi |= (sr & 0x4000);
          mpc = resume_prefetch;
          continue;
          case 317: /* op_dbcc */
          if (testCC((ir & 0x0f00) >> 8)) {
            elapsed += 2;
            scan += 2;
            mpc = resume_prefetch;
            continue;
          }
          ry = ir & 0x0007;
          dar[ry] = (dar[ry] & ~0xffff) | ((dt = ((short) dar[ry]) - 1) & 0xffff);
          if (dt == -1) {
            elapsed += 4;
            scan += 2;
            mpc = resume_prefetch;
            continue;
          }
          nmpc = 318;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9102;
          if (((aob = pc + scan) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = fetch16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 318:
          scan += (short) dib;
          elapsed += 2;
          mpc = resume_prefetch;
          continue;
          case 319: /* op_bkpt */
          elapsed += 6;
          hdlr = handle_bkpt(cip, ir & 0x0007);
          exit |= (hdlr & 0x00010000) != 0;
          if ((hdlr & 0x00020000) != 0) {
            ir = hdlr & 0xffff;
            sp = spi(sr);
            decoded = MacroPLA.decode(ir);
            nmpc = decoded.a1;
            break;
          }
          tvn = 16;
          mpc = trapill;
          continue;
          case 320: /* op_illegal */
          elapsed += 6;
          hdlr = handle_illegal(cip, ir);
          exit |= (hdlr & 0x00010000) != 0;
          if ((hdlr & 0x00020000) != 0) {
            scan += (short) hdlr;
            sp = spi(sr);
            mpc = resume_prefetch;
            continue;
          }
          tvn = 16;
          mpc = trapill;
          continue;
          case 321: /* op_jmp */
          pc = at;
          scan = 0;
          sswi |= (sr & 0x4000);
          mpc = resume_prefetch;
          continue;
          case 322: /* op_jsr */
          au = dar[sp] - 4;
          dar[sp] = au;
          nmpc = 323;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x80c1;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          write32(aob, dob = pc + scan);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtw32;
            continue;
          }
          case 323:
          pc = at;
          scan = 0;
          sswi |= (sr & 0x4000);
          mpc = resume_prefetch;
          continue;
          case 324: /* op_linea */
          elapsed += 6;
          hdlr = handle_linea(cip, ir & 0x0fff);
          exit |= (hdlr & 0x00010000) != 0;
          if ((hdlr & 0x00020000) != 0) {
            scan += (short) hdlr;
            sp = spi(sr);
            mpc = resume_prefetch;
            continue;
          }
          tvn = 40;
          mpc = trapill;
          continue;
          case 325: /* op_linef */
          elapsed += 6;
          tvn = 44;
          mpc = trapill;
          continue;
          case 326: /* op_nop */
          mpc = resume_prefetch;
          continue;
          case 327: /* op_rte */
          if ((sr & 0x2000) == 0) {
            elapsed += 6;
            tvn = 32;
            mpc = trapill;
            continue;
          }
          au = dar[sp];
          case 328: /* check_vob */
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x9105;
          if (((aob = au + 0x0006) & 0x000000001) != 0) {
            mpc = dbrr;
            continue;
          }
          dib = read16(aob);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          mpc = select_rte(dib);
          continue;
          case 329: /* rteill */
          elapsed += 6;
          tvn = 56;
          mpc = trapill;
          continue;
          case 330: /* exit_trap */
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x91c5;
          pc = read32(aob = au + 0x0002);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x9105;
          dib = read16(aob = au);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          sr = dib & 0xf71f;
          sp = spi(sr);
          scan = 0;
          mpc = resume_prefetch;
          continue;
          case 331: /* rte0000 */
          dar[sp] = au + 8;
          mpc = exit_trap;
          continue;
          case 332: /* rte1000 */
          dar[sp] = au + 8;
          au = dar[sp = spi(sr | 0x1000)];
          mpc = check_vob;
          continue;
          case 333: /* rte2000 */
          dar[sp] = au + 12;
          mpc = exit_trap;
          continue;
          case 334: /* rte8000 */
          elapsed += 6;
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x91c5;
          cip = read32(aob = au + 0x0036);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x91c5;
          dt = read32(aob = au + 0x0032);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x9105;
          ir = read16(aob = au + 0x0030);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          decoded = MacroPLA.decode(ir);
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x9105;
          dib = read16(aob = au + 0x002e);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          vdt1 = dib << 16;
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x91c5;
          vat2 = read32(aob = au + 0x0026);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x91c5;
          vat1 = read32(aob = au + 0x0022);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x91c5;
          alub = read32(aob = au + 0x001e);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x9105;
          scan = read16(aob = au + 0x001c);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x9105;
          nmpc = read16(aob = au + 0x001a);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x9105;
          irb = read16(aob = au + 0x0018);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x91c5;
          vat3 = read32(aob = au + 0x000a);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x9105;
          dib = read16(aob = au + 0x0008);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          vdt1 |= dib & 0xffff;
          elapsed += 8;
          ssw = (ssw & 0x0018) | 0x91c5;
          pc = read32(aob = au + 0x0002);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          if ((vdt1 & 0x8000) == 0) {
            elapsed += 2;
            if ((vdt1 & 0x0800) != 0) {
              nmpc = decoded.a3;
              vdt1 &= ~0xbfe7;
            } else {
              if ((vdt1 & 0x0100) == 0) {
                if ((vdt1 & 0x0080) != 0) {
                  elapsed += 8;
                  ssw = (ssw & 0x0018) | 0x91c5;
                  vdt2 = read32(aob = au + 0x0010);
                  if ((ssw & 0x0030) != 0) {
                    mpc = dbrr;
                    continue;
                  }
                } else {
                  elapsed += 4;
                  ssw = (ssw & 0x0018) | 0x9105;
                  vdt2 = read16(aob = au + 0x0010);
                  if ((ssw & 0x0030) != 0) {
                    mpc = dbrr;
                    continue;
                  }
                }
              } else if ((vdt1 & 0x00c0) == 0x0040) {
                elapsed += 4;
                ssw = (ssw & 0x0018) | 0x9105;
                vdt3 = read16(aob = au + 0x0012);
                if ((ssw & 0x0030) != 0) {
                  mpc = dbrr;
                  continue;
                }
                vdt3 <<= 16;
              }
              ssw = (ssw & 0x0018) | ((vdt1 ^ ~0x8000) & 0xbfc7);
              if ((ssw & 0x0280) == 0x0200) {
                if ((ssw & 0x0400) == 0) {
                  vat3 += 1;
                } else {
                  ssw &= ~0x0400;
                  vdt2 >>= 8;
                }
                if ((ssw & 0x1100) == 0x1100) {
                  vdt3 = read8(vat3);
                } else if ((ssw & 0x1100) == 0) {
                  write8(vat3, vdt2);
                }
              } else if ((vat3 & 0x000000001) != 0) {
                elapsed += 6;
                tvn = 12;
                mpc = resume_trap8000;
                continue;
              } else if ((ssw & 0x0080) == 0) {
                if ((ssw & 0x3100) == 0x2100) {
                  if ((ssw & 0x0003) == 0x0002) {
                    irb = fetch16(vat3);
                  } else {
                    irb = read16(vat3);
                  }
                } else if ((ssw & 0x3140) == 0x1140) {
                  if ((ssw & 0x0003) == 0x0002) {
                    vdt3 = (vdt3 & ~0xffff) | fetch16(vat3) & 0xffff;
                  } else {
                    vdt3 = (vdt3 & ~0xffff) | read16(vat3) & 0xffff;
                  }
                } else if ((ssw & 0x3100) == 0x1100) {
                  if ((ssw & 0x0003) == 0x0002) {
                    vdt3 = fetch16(vat3);
                  } else {
                    vdt3 = read16(vat3);
                  }
                } else if ((ssw & 0x3100) == 0) {
                  write16(vat3, vdt2);
                }
              } else {
                if ((ssw & 0x3100) == 0x2100) {
                  if ((ssw & 0x0003) == 0x0002) {
                    vdt3 = fetch32(vat3);
                  } else {
                    vdt3 = read32(vat3);
                  }
                } else if ((ssw & 0x3100) == 0) {
                  write32(vat3, vdt2);
                }
              }
              vdt1 = (vdt1 & ~0xffff) | ((ssw ^ ~0x8000) & 0xffdf);
              if ((ssw & 0x0020) != 0) {
                elapsed += 6;
                tvn = 8;
                mpc = resume_trap8000;
                continue;
              }
            }
          } else if ((vdt1 & 0x0100) != 0) {
            if ((vdt1 & 0x0040) != 0) {
              elapsed += 8;
              ssw = (ssw & 0x0018) | 0x91c5;
              vdt3 = read32(aob = au + 0x0012);
              if ((ssw & 0x0030) != 0) {
                mpc = dbrr;
                continue;
              }
            } else {
              elapsed += 4;
              ssw = (ssw & 0x0018) | 0x9105;
              vdt3 = read16(aob = au + 0x0014);
              if ((ssw & 0x0030) != 0) {
                mpc = dbrr;
                continue;
              }
            }
          }
          elapsed += 4;
          ssw = (ssw & 0x0018) | 0x9105;
          dib = read16(aob = au);
          if ((ssw & 0x0030) != 0) {
            mpc = dbrr;
            continue;
          }
          sr = dib & 0xf71f;
          dar[sp] = au + 58;
          sp = spi(sr);
          au = vat1;
          at = vat2;
          aob = vat3;
          dob = vdt2;
          dib = vdt3;
          tvn = (vdt1 >> 14) & 0x3fc;
          sswi = (sswi & ~0xc800) | ((vdt1 >> 16) & 0xc800);
          ssw = (ssw & 0x0018) | ((vdt1 ^ ~0x8000) & 0xbfc7);
          if ((ssw & 0x80c0) == 0x8080) {
            if ((ssw & 0x0100) != 0) {
              mpc = (ssw & 0x0003) == 0x0002 ? bevtf32 : bevtr32;
            } else {
              mpc = bevtw32;
            }
            continue;
          }
          break;
          case 335: /* op_rtr */
          au = dar[sp];
          nmpc = 336;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c1;
          if (((aob = au + 0x0002) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read32(aob);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtr32;
            continue;
          }
          case 336:
          pc = dib;
          nmpc = 337;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x9101;
          dib = read16(aob = au);
          if ((ssw & 0x0030) != 0) {
            mpc = bevt;
            continue;
          }
          case 337:
          ssw &= ~0xbfe7;
          sr = (sr & ~0x001f) | (dib & 0x001f);
          scan = 0;
          dar[sp] = au + 6;
          sswi |= (sr & 0x4000);
          mpc = resume_prefetch;
          continue;
          case 338: /* op_rts */
          au = dar[sp];
          nmpc = 339;
          elapsed += 4;
          ssw = (ssw & 0x0018) | ((sr >> 11) & 0x0004) | 0x91c1;
          if (((aob = au) & 0x000000001) != 0) {
            mpc = aerr;
            continue;
          }
          dib = read32(aob);
          if ((ssw & 0x0070) != 0x0040) {
            mpc = bevtr32;
            continue;
          }
          case 339:
          pc = dib;
          ssw &= ~0xbfe7;
          scan = 0;
          dar[sp] = au + 4;
          sswi |= (sr & 0x4000);
          mpc = resume_prefetch;
          continue;
          case 340: /* op_reset */
          elapsed += 126;
          mpc = resume_prefetch;
          continue;
          case 341: /* op_trap */
          elapsed += 6;
          tvn = (32 + (ir & 0x000f)) << 2;
          mpc = trap0000;
          continue;
          case 342: /* op_trapv */
          if ((sr & 0x0002) != 0) {
            elapsed += 4;
            tvn = 28;
            mpc = (sswi & 0x0008) != 0 ? trap2000 : trap0000;
            continue;
          }
          mpc = resume_prefetch;
          continue;
          case 343: /* op_trapcc */
          if (!testCC((ir & 0x0f00) >> 8)) {
            mpc = resume_prefetch;
            continue;
          }
          elapsed += 4;
          tvn = 28;
          mpc = trap2000;
          continue;
          case 344: /* op_trapcc16 */
          scan += 2;
          if (!testCC((ir & 0x0f00) >> 8)) {
            mpc = resume_prefetch;
            continue;
          }
          elapsed += 4;
          tvn = 28;
          mpc = trap2000;
          continue;
          case 345: /* op_trapcc32 */
          scan += 4;
          if (!testCC((ir & 0x0f00) >> 8)) {
            mpc = resume_prefetch;
            continue;
          }
          elapsed += 4;
          tvn = 28;
          mpc = trap2000;
          continue;
          case 346: /* gen_orb_dt_ds */
          ry = ir & 0x0007;
          dt = byte_or(dt, dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 347: /* gen_orb_im_ea */
          dt = byte_or(alub, dt);
          mpc = ea_resume_write8;
          continue;
          case 348: /* gen_orw_dt_ds */
          ry = ir & 0x0007;
          dt = word_or(dt, dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 349: /* gen_orw_im_ea */
          dt = word_or(alub, dt);
          mpc = ea_resume_write16;
          continue;
          case 350: /* gen_orl_dt_ds */
          ry = ir & 0x0007;
          dt = long_or(dt, dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 351: /* gen_orl_im_ea */
          dt = long_or(alub, dt);
          mpc = ea_resume_write32;
          continue;
          case 352: /* gen_orb_dt_ccr */
          sr = (sr & ~0xff) | ((sr | dt) & 0x1f);
          mpc = resume_prefetch;
          continue;
          case 353: /* gen_orw_dt_sr */
          if ((sr & 0x2000) == 0) {
            elapsed += 6;
            tvn = 32;
            mpc = trapill;
            continue;
          }
          sr = (sr | dt) & 0xf71f;
          mpc = resume_prefetch;
          continue;
          case 354: /* gen_btstl_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          long_btst(dar[rx], dar[ry]);
          mpc = resume_prefetch;
          continue;
          case 355: /* gen_btstb_dd_ea */
          rx = (ir >> 9) & 0x0007;
          byte_btst(dar[rx], dt);
          mpc = resume_prefetch;
          continue;
          case 356: /* gen_bchgl_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = long_bchg(dar[rx], dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 357: /* gen_bchgb_dd_ea */
          rx = (ir >> 9) & 0x0007;
          dt = byte_bchg(dar[rx], dt);
          mpc = ea_resume_write8;
          continue;
          case 358: /* gen_bclrl_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = long_bclr(dar[rx], dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 359: /* gen_bclrb_dd_ea */
          rx = (ir >> 9) & 0x0007;
          dt = byte_bclr(dar[rx], dt);
          mpc = ea_resume_write8;
          continue;
          case 360: /* gen_bsetl_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = long_bset(dar[rx], dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 361: /* gen_bsetb_dd_ea */
          rx = (ir >> 9) & 0x0007;
          dt = byte_bset(dar[rx], dt);
          mpc = ea_resume_write8;
          continue;
          case 362: /* gen_andb_dt_ds */
          ry = ir & 0x0007;
          dt = byte_and(dt, dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 363: /* gen_andb_im_ea */
          dt = byte_and(alub, dt);
          mpc = ea_resume_write8;
          continue;
          case 364: /* gen_andw_dt_ds */
          ry = ir & 0x0007;
          dt = word_and(dt, dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 365: /* gen_andw_im_ea */
          dt = word_and(alub, dt);
          mpc = ea_resume_write16;
          continue;
          case 366: /* gen_andl_dt_ds */
          ry = ir & 0x0007;
          dt = long_and(dt, dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 367: /* gen_andl_im_ea */
          dt = long_and(alub, dt);
          mpc = ea_resume_write32;
          continue;
          case 368: /* gen_andb_dt_ccr */
          sr = (sr & ~0xff) | (sr & dt & 0x1f);
          mpc = resume_prefetch;
          continue;
          case 369: /* gen_andw_dt_sr */
          if ((sr & 0x2000) == 0) {
            elapsed += 6;
            tvn = 32;
            mpc = trapill;
            continue;
          }
          sr = sr & dt;
          mpc = resume_prefetch;
          continue;
          case 370: /* gen_subb_dt_ds */
          ry = ir & 0x0007;
          dt = byte_sub(dt, dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 371: /* gen_subb_im_ea */
          dt = byte_sub(alub, dt);
          mpc = ea_resume_write8;
          continue;
          case 372: /* gen_subw_dt_ds */
          ry = ir & 0x0007;
          dt = word_sub(dt, dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 373: /* gen_subw_im_ea */
          dt = word_sub(alub, dt);
          mpc = ea_resume_write16;
          continue;
          case 374: /* gen_subl_dt_ds */
          ry = ir & 0x0007;
          dt = long_sub(dt, dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 375: /* gen_subl_im_ea */
          dt = long_sub(alub, dt);
          mpc = ea_resume_write32;
          continue;
          case 376: /* gen_addb_dt_ds */
          ry = ir & 0x0007;
          dt = byte_add(dt, dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 377: /* gen_addb_im_ea */
          dt = byte_add(alub, dt);
          mpc = ea_resume_write8;
          continue;
          case 378: /* gen_addw_dt_ds */
          ry = ir & 0x0007;
          dt = word_add(dt, dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 379: /* gen_addw_im_ea */
          dt = word_add(alub, dt);
          mpc = ea_resume_write16;
          continue;
          case 380: /* gen_addl_dt_ds */
          ry = ir & 0x0007;
          dt = long_add(dt, dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 381: /* gen_addl_im_ea */
          dt = long_add(alub, dt);
          mpc = ea_resume_write32;
          continue;
          case 382: /* gen_btstl_dt_ds */
          ry = ir & 0x0007;
          long_btst(dt, dar[ry]);
          mpc = resume_prefetch;
          continue;
          case 383: /* gen_btstb_im_ea */
          byte_btst(alub, dt);
          mpc = resume_prefetch;
          continue;
          case 384: /* gen_bchgl_dt_ds */
          ry = ir & 0x0007;
          dt = long_bchg(dt, dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 385: /* gen_bchgb_im_ea */
          dt = byte_bchg(alub, dt);
          mpc = ea_resume_write8;
          continue;
          case 386: /* gen_bclrl_dt_ds */
          ry = ir & 0x0007;
          dt = long_bclr(dt, dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 387: /* gen_bclrb_im_ea */
          dt = byte_bclr(alub, dt);
          mpc = ea_resume_write8;
          continue;
          case 388: /* gen_bsetl_dt_ds */
          ry = ir & 0x0007;
          dt = long_bset(dt, dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 389: /* gen_bsetb_im_ea */
          dt = byte_bset(alub, dt);
          mpc = ea_resume_write8;
          continue;
          case 390: /* gen_eorb_dt_ds */
          ry = ir & 0x0007;
          dt = byte_eor(dt, dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 391: /* gen_eorb_im_ea */
          dt = byte_eor(alub, dt);
          mpc = ea_resume_write8;
          continue;
          case 392: /* gen_eorw_dt_ds */
          ry = ir & 0x0007;
          dt = word_eor(dt, dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 393: /* gen_eorw_im_ea */
          dt = word_eor(alub, dt);
          mpc = ea_resume_write16;
          continue;
          case 394: /* gen_eorl_dt_ds */
          ry = ir & 0x0007;
          dt = long_eor(dt, dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 395: /* gen_eorl_im_ea */
          dt = long_eor(alub, dt);
          mpc = ea_resume_write32;
          continue;
          case 396: /* gen_eorb_dt_ccr */
          sr = (sr & ~0xff) | ((sr ^ dt) & 0x1f);
          mpc = resume_prefetch;
          continue;
          case 397: /* gen_eorw_dt_sr */
          if ((sr & 0x2000) == 0) {
            elapsed += 6;
            tvn = 32;
            mpc = trapill;
            continue;
          }
          sr = (sr ^ dt) & 0xf71f;
          mpc = resume_prefetch;
          continue;
          case 398: /* gen_cmpb_dt_ds */
          ry = ir & 0x0007;
          byte_cmp(dt, dar[ry]);
          mpc = resume_prefetch;
          continue;
          case 399: /* gen_cmpb_im_ea */
          byte_cmp(alub, dt);
          mpc = resume_prefetch;
          continue;
          case 400: /* gen_cmpw_dt_ds */
          ry = ir & 0x0007;
          word_cmp(dt, dar[ry]);
          mpc = resume_prefetch;
          continue;
          case 401: /* gen_cmpw_im_ea */
          word_cmp(alub, dt);
          mpc = resume_prefetch;
          continue;
          case 402: /* gen_cmpl_dt_ds */
          ry = ir & 0x0007;
          long_cmp(dt, dar[ry]);
          mpc = resume_prefetch;
          continue;
          case 403: /* gen_cmpl_im_ea */
          long_cmp(alub, dt);
          mpc = resume_prefetch;
          continue;
          case 404: /* gen_moveb_ds_ea */
          ry = ir & 0x0007;
          byte_tst(dar[ry]);
          dt = dar[ry];
          mpc = ea_resume_write8;
          continue;
          case 405: /* gen_moveb_dt_dd */
          rx = (ir >> 9) & 0x0007;
          byte_tst(dt);
          dar[rx] = (dar[rx] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 406: /* gen_moveb_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          byte_tst(dar[ry]);
          dar[rx] = (dar[rx] & ~0xff) | (dar[ry] & 0xff);
          mpc = resume_prefetch;
          continue;
          case 407: /* gen_moveb_dt_ea */
          byte_tst(dt);
          mpc = ea_resume_write8;
          continue;
          case 408: /* gen_movel_ds_ea */
          ry = ir & 0x0007;
          long_tst(dar[ry]);
          dt = dar[ry];
          mpc = ea_resume_write32;
          continue;
          case 409: /* gen_movel_as_ea */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          long_tst(dar[ry]);
          dt = dar[ry];
          mpc = ea_resume_write32;
          continue;
          case 410: /* gen_movel_dt_dd */
          rx = (ir >> 9) & 0x0007;
          long_tst(dt);
          dar[rx] = dt;
          mpc = resume_prefetch;
          continue;
          case 411: /* gen_movel_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          long_tst(dar[ry]);
          dar[rx] = dar[ry];
          mpc = resume_prefetch;
          continue;
          case 412: /* gen_movel_as_dd */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          rx = (ir >> 9) & 0x0007;
          long_tst(dar[ry]);
          dar[rx] = dar[ry];
          mpc = resume_prefetch;
          continue;
          case 413: /* gen_movel_dt_ea */
          long_tst(dt);
          mpc = ea_resume_write32;
          continue;
          case 414: /* gen_movel_ds_ad */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] = dar[ry];
          mpc = resume_prefetch;
          continue;
          case 415: /* gen_movel_as_ad */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] = dar[ry];
          mpc = resume_prefetch;
          continue;
          case 416: /* gen_movel_dt_ad */
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] = dt;
          mpc = resume_prefetch;
          continue;
          case 417: /* gen_movew_ds_ea */
          ry = ir & 0x0007;
          word_tst(dar[ry]);
          dt = dar[ry];
          mpc = ea_resume_write16;
          continue;
          case 418: /* gen_movew_as_ea */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          word_tst(dar[ry]);
          dt = dar[ry];
          mpc = ea_resume_write16;
          continue;
          case 419: /* gen_movew_dt_dd */
          rx = (ir >> 9) & 0x0007;
          word_tst(dt);
          dar[rx] = (dar[rx] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 420: /* gen_movew_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          word_tst(dar[ry]);
          dar[rx] = (dar[rx] & ~0xffff) | (dar[ry] & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 421: /* gen_movew_as_dd */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          rx = (ir >> 9) & 0x0007;
          word_tst(dar[ry]);
          dar[rx] = (dar[rx] & ~0xffff) | (dar[ry] & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 422: /* gen_movew_dt_ea */
          word_tst(dt);
          mpc = ea_resume_write16;
          continue;
          case 423: /* gen_movew_ds_ad */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] = (short) dar[ry];
          mpc = resume_prefetch;
          continue;
          case 424: /* gen_movew_as_ad */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] = (short) dar[ry];
          mpc = resume_prefetch;
          continue;
          case 425: /* gen_movew_dt_ad */
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] = (short) dt;
          mpc = resume_prefetch;
          continue;
          case 426: /* gen_negxb_ds */
          ry = ir & 0x0007;
          dt = byte_negx(dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 427: /* gen_negxb_ea */
          dt = byte_negx(dt);
          mpc = ea_resume_write8;
          continue;
          case 428: /* gen_negxw_ds */
          ry = ir & 0x0007;
          dt = word_negx(dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 429: /* gen_negxw_ea */
          dt = word_negx(dt);
          mpc = ea_resume_write16;
          continue;
          case 430: /* gen_negxl_ds */
          ry = ir & 0x0007;
          dt = long_negx(dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 431: /* gen_negxl_ea */
          dt = long_negx(dt);
          mpc = ea_resume_write32;
          continue;
          case 432: /* gen_movew_sr_ds */
          if ((sr & 0x2000) == 0) {
            elapsed += 6;
            tvn = 32;
            mpc = trapill;
            continue;
          }
          ry = ir & 0x0007;
          dar[ry] = (dar[ry] & ~0xffff) | (sr & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 433: /* gen_movew_sr_ea */
          if ((sr & 0x2000) == 0) {
            elapsed += 6;
            tvn = 32;
            mpc = trapill;
            continue;
          }
          dt = (sr & 0xf71f);
          mpc = ea_resume_write16;
          continue;
          case 434: /* gen_movew_ccr_ds */
          ry = ir & 0x0007;
          dar[ry] = (dar[ry] & ~0xffff) | (sr & 0x001f);
          mpc = resume_prefetch;
          continue;
          case 435: /* gen_movew_ccr_ea */
          dt = (sr & 0x001f);
          mpc = ea_resume_write16;
          continue;
          case 436: /* gen_movew_ds_ccr */
          ry = ir & 0x0007;
          sr = (sr & ~0xff) | (dar[ry] & 0x001f);
          mpc = resume_prefetch;
          continue;
          case 437: /* gen_movew_dt_ccr */
          sr = (sr & ~0xff) | (dt & 0x001f);
          mpc = resume_prefetch;
          continue;
          case 438: /* gen_movew_ds_sr */
          if ((sr & 0x2000) == 0) {
            elapsed += 6;
            tvn = 32;
            mpc = trapill;
            continue;
          }
          ry = ir & 0x0007;
          sr = dar[ry] & 0xf71f;
          mpc = resume_prefetch;
          continue;
          case 439: /* gen_movew_dt_sr */
          if ((sr & 0x2000) == 0) {
            elapsed += 6;
            tvn = 32;
            mpc = trapill;
            continue;
          }
          sr = dt & 0xf71f;
          mpc = resume_prefetch;
          continue;
          case 440: /* gen_negb_ds */
          ry = ir & 0x0007;
          dt = byte_neg(dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 441: /* gen_negb_ea */
          dt = byte_neg(dt);
          mpc = ea_resume_write8;
          continue;
          case 442: /* gen_negw_ds */
          ry = ir & 0x0007;
          dt = word_neg(dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 443: /* gen_negl_ea */
          dt = long_neg(dt);
          mpc = ea_resume_write32;
          continue;
          case 444: /* gen_negl_ds */
          ry = ir & 0x0007;
          dt = long_neg(dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 445: /* gen_notb_ds */
          ry = ir & 0x0007;
          dt = byte_not(dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 446: /* gen_notb_ea */
          dt = byte_not(dt);
          mpc = ea_resume_write8;
          continue;
          case 447: /* gen_notw_ds */
          ry = ir & 0x0007;
          dt = word_not(dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 448: /* gen_notw_ea */
          dt = word_not(dt);
          mpc = ea_resume_write16;
          continue;
          case 449: /* gen_notl_ds */
          ry = ir & 0x0007;
          dt = long_not(dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 450: /* gen_notl_ea */
          dt = long_not(dt);
          mpc = ea_resume_write32;
          continue;
          case 451: /* gen_nbcdb_ds */
          ry = ir & 0x0007;
          dt = byte_nbcd(dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 452: /* gen_nbcdb_ea */
          dt = byte_nbcd(dt);
          mpc = ea_resume_write8;
          continue;
          case 453: /* gen_tstb_ds */
          ry = ir & 0x0007;
          byte_tst(dar[ry]);
          mpc = resume_prefetch;
          continue;
          case 454: /* gen_tstb_ea */
          byte_tst(dt);
          mpc = resume_prefetch;
          continue;
          case 455: /* gen_tstw_ds */
          ry = ir & 0x0007;
          word_tst(dar[ry]);
          mpc = resume_prefetch;
          continue;
          case 456: /* gen_tstw_ea */
          word_tst(dt);
          mpc = resume_prefetch;
          continue;
          case 457: /* gen_tstl_ds */
          ry = ir & 0x0007;
          long_tst(dar[ry]);
          mpc = resume_prefetch;
          continue;
          case 458: /* gen_tstl_ea */
          long_tst(dt);
          mpc = resume_prefetch;
          continue;
          case 459: /* gen_addb_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = byte_add(alub, dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 460: /* gen_addb_ir_ea */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          dt = byte_add(alub, dt);
          mpc = ea_resume_write8;
          continue;
          case 461: /* gen_addw_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = word_add(alub, dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 462: /* gen_addw_ir_as */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          dar[ry] = dar[ry] + ((short) alub);
          mpc = resume_prefetch;
          continue;
          case 463: /* gen_addw_ir_ea */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          dt = word_add(alub, dt);
          mpc = ea_resume_write16;
          continue;
          case 464: /* gen_addl_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = long_add(alub, dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 465: /* gen_addl_ir_as */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          dar[ry] = dar[ry] + alub;
          mpc = resume_prefetch;
          continue;
          case 466: /* gen_addl_ir_ea */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          dt = long_add(alub, dt);
          mpc = ea_resume_write32;
          continue;
          case 467: /* gen_subb_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = byte_sub(alub, dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 468: /* gen_subb_ir_ea */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          dt = byte_sub(alub, dt);
          mpc = ea_resume_write8;
          continue;
          case 469: /* gen_subw_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = word_sub(alub, dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 470: /* gen_subw_ir_as */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          dar[ry] = dar[ry] - ((short) alub);
          mpc = resume_prefetch;
          continue;
          case 471: /* gen_subw_ir_ea */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          dt = word_sub(alub, dt);
          mpc = ea_resume_write16;
          continue;
          case 472: /* gen_subl_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = long_sub(alub, dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 473: /* gen_subl_ir_as */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          dar[ry] = dar[ry] - alub;
          mpc = resume_prefetch;
          continue;
          case 474: /* gen_subl_ir_ea */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          dt = long_sub(alub, dt);
          mpc = ea_resume_write32;
          continue;
          case 475: /* gen_movel_im_dd */
          dt = (byte) ir;
          rx = (ir >> 9) & 0x0007;
          long_tst(dt);
          dar[rx] = dt;
          mpc = resume_prefetch;
          continue;
          case 476: /* gen_orb_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = byte_or(dar[ry], dar[rx]);
          dar[rx] = (dar[rx] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 477: /* gen_orb_dt_dd */
          rx = (ir >> 9) & 0x0007;
          dt = byte_or(dt, dar[rx]);
          dar[rx] = (dar[rx] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 478: /* gen_orw_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = word_or(dar[ry], dar[rx]);
          dar[rx] = (dar[rx] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 479: /* gen_orw_dt_dd */
          rx = (ir >> 9) & 0x0007;
          dt = word_or(dt, dar[rx]);
          dar[rx] = (dar[rx] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 480: /* gen_orl_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = long_or(dar[ry], dar[rx]);
          dar[rx] = dt;
          mpc = resume_prefetch;
          continue;
          case 481: /* gen_orl_dt_dd */
          rx = (ir >> 9) & 0x0007;
          dt = long_or(dt, dar[rx]);
          dar[rx] = dt;
          mpc = resume_prefetch;
          continue;
          case 482: /* gen_sbcdb_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = byte_sbcd(dar[ry], dar[rx]);
          dar[rx] = (dar[rx] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 483: /* gen_sbcdb_im_ea */
          dt = byte_sbcd(alub, dt);
          mpc = ea_resume_write8;
          continue;
          case 484: /* gen_orb_dd_ea */
          rx = (ir >> 9) & 0x0007;
          dt = byte_or(dar[rx], dt);
          mpc = ea_resume_write8;
          continue;
          case 485: /* gen_orw_dd_ea */
          rx = (ir >> 9) & 0x0007;
          dt = word_or(dar[rx], dt);
          mpc = ea_resume_write16;
          continue;
          case 486: /* gen_orl_dd_ea */
          rx = (ir >> 9) & 0x0007;
          dt = long_or(dar[rx], dt);
          mpc = ea_resume_write32;
          continue;
          case 487: /* gen_subb_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = byte_sub(dar[ry], dar[rx]);
          dar[rx] = (dar[rx] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 488: /* gen_subb_dt_dd */
          rx = (ir >> 9) & 0x0007;
          dt = byte_sub(dt, dar[rx]);
          dar[rx] = (dar[rx] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 489: /* gen_subw_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = word_sub(dar[ry], dar[rx]);
          dar[rx] = (dar[rx] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 490: /* gen_subw_as_dd */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          rx = (ir >> 9) & 0x0007;
          dt = word_sub(dar[ry], dar[rx]);
          dar[rx] = (dar[rx] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 491: /* gen_subw_dt_dd */
          rx = (ir >> 9) & 0x0007;
          dt = word_sub(dt, dar[rx]);
          dar[rx] = (dar[rx] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 492: /* gen_subl_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = long_sub(dar[ry], dar[rx]);
          dar[rx] = dt;
          mpc = resume_prefetch;
          continue;
          case 493: /* gen_subl_as_dd */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          rx = (ir >> 9) & 0x0007;
          dt = long_sub(dar[ry], dar[rx]);
          dar[rx] = dt;
          mpc = resume_prefetch;
          continue;
          case 494: /* gen_subl_dt_dd */
          rx = (ir >> 9) & 0x0007;
          dt = long_sub(dt, dar[rx]);
          dar[rx] = dt;
          mpc = resume_prefetch;
          continue;
          case 495: /* gen_subb_dd_ea */
          rx = (ir >> 9) & 0x0007;
          dt = byte_sub(dar[rx], dt);
          mpc = ea_resume_write8;
          continue;
          case 496: /* gen_subw_dd_ea */
          rx = (ir >> 9) & 0x0007;
          dt = word_sub(dar[rx], dt);
          mpc = ea_resume_write16;
          continue;
          case 497: /* gen_subl_dd_ea */
          rx = (ir >> 9) & 0x0007;
          dt = long_sub(dar[rx], dt);
          mpc = ea_resume_write32;
          continue;
          case 498: /* gen_subxb_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = byte_subx(dar[ry], dar[rx]);
          dar[rx] = (dar[rx] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 499: /* gen_subxb_im_ea */
          dt = byte_subx(alub, dt);
          mpc = ea_resume_write8;
          continue;
          case 500: /* gen_subxw_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = word_subx(dar[ry], dar[rx]);
          dar[rx] = (dar[rx] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 501: /* gen_subxw_im_ea */
          dt = word_subx(alub, dt);
          mpc = ea_resume_write16;
          continue;
          case 502: /* gen_subxl_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = long_subx(dar[ry], dar[rx]);
          dar[rx] = dt;
          mpc = resume_prefetch;
          continue;
          case 503: /* gen_subxl_im_ea */
          dt = long_subx(alub, dt);
          mpc = ea_resume_write32;
          continue;
          case 504: /* gen_subw_ds_ad */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] = dar[rx] - ((short) dar[ry]);
          mpc = resume_prefetch;
          continue;
          case 505: /* gen_subw_as_ad */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] = dar[rx] - ((short) dar[ry]);
          mpc = resume_prefetch;
          continue;
          case 506: /* gen_subw_dt_ad */
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] = dar[rx] - ((short) dt);
          mpc = resume_prefetch;
          continue;
          case 507: /* gen_subl_ds_ad */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] = dar[rx] - dar[ry];
          mpc = resume_prefetch;
          continue;
          case 508: /* gen_subl_as_ad */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] = dar[rx] - dar[ry];
          mpc = resume_prefetch;
          continue;
          case 509: /* gen_subl_dt_ad */
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] = dar[rx] - dt;
          mpc = resume_prefetch;
          continue;
          case 510: /* gen_cmpb_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          byte_cmp(dar[ry], dar[rx]);
          mpc = resume_prefetch;
          continue;
          case 511: /* gen_cmpb_dt_dd */
          rx = (ir >> 9) & 0x0007;
          byte_cmp(dt, dar[rx]);
          mpc = resume_prefetch;
          continue;
          case 512: /* gen_cmpw_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          word_cmp(dar[ry], dar[rx]);
          mpc = resume_prefetch;
          continue;
          case 513: /* gen_cmpw_as_dd */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          rx = (ir >> 9) & 0x0007;
          word_cmp(dar[ry], dar[rx]);
          mpc = resume_prefetch;
          continue;
          case 514: /* gen_cmpw_dt_dd */
          rx = (ir >> 9) & 0x0007;
          word_cmp(dt, dar[rx]);
          mpc = resume_prefetch;
          continue;
          case 515: /* gen_cmpl_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          long_cmp(dar[ry], dar[rx]);
          mpc = resume_prefetch;
          continue;
          case 516: /* gen_cmpl_as_dd */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          rx = (ir >> 9) & 0x0007;
          long_cmp(dar[ry], dar[rx]);
          mpc = resume_prefetch;
          continue;
          case 517: /* gen_cmpl_dt_dd */
          rx = (ir >> 9) & 0x0007;
          long_cmp(dt, dar[rx]);
          mpc = resume_prefetch;
          continue;
          case 518: /* gen_cmpw_ds_ad */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          long_cmp((short) dar[ry], dar[rx]);
          mpc = resume_prefetch;
          continue;
          case 519: /* gen_cmpw_as_ad */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          long_cmp((short) dar[ry], dar[rx]);
          mpc = resume_prefetch;
          continue;
          case 520: /* gen_cmpw_dt_ad */
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          long_cmp((short) dt, dar[rx]);
          mpc = resume_prefetch;
          continue;
          case 521: /* gen_cmpl_ds_ad */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          long_cmp(dar[ry], dar[rx]);
          mpc = resume_prefetch;
          continue;
          case 522: /* gen_cmpl_as_ad */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          long_cmp(dar[ry], dar[rx]);
          mpc = resume_prefetch;
          continue;
          case 523: /* gen_cmpl_dt_ad */
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          long_cmp(dt, dar[rx]);
          mpc = resume_prefetch;
          continue;
          case 524: /* gen_cmpmb_im_ea */
          byte_cmp(alub, dt);
          mpc = resume_prefetch;
          continue;
          case 525: /* gen_cmpmw_im_ea */
          word_cmp(alub, dt);
          mpc = resume_prefetch;
          continue;
          case 526: /* gen_cmpml_im_ea */
          long_cmp(alub, dt);
          mpc = resume_prefetch;
          continue;
          case 527: /* gen_eorb_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = byte_eor(dar[rx], dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 528: /* gen_eorb_dd_ea */
          rx = (ir >> 9) & 0x0007;
          dt = byte_eor(dar[rx], dt);
          mpc = ea_resume_write8;
          continue;
          case 529: /* gen_eorw_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = word_eor(dar[rx], dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 530: /* gen_eorw_dd_ea */
          rx = (ir >> 9) & 0x0007;
          dt = word_eor(dar[rx], dt);
          mpc = ea_resume_write16;
          continue;
          case 531: /* gen_eorl_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = long_eor(dar[rx], dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 532: /* gen_eorl_dd_ea */
          rx = (ir >> 9) & 0x0007;
          dt = long_eor(dar[rx], dt);
          mpc = ea_resume_write32;
          continue;
          case 533: /* gen_andb_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = byte_and(dar[ry], dar[rx]);
          dar[rx] = (dar[rx] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 534: /* gen_andb_dt_dd */
          rx = (ir >> 9) & 0x0007;
          dt = byte_and(dt, dar[rx]);
          dar[rx] = (dar[rx] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 535: /* gen_andw_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = word_and(dar[ry], dar[rx]);
          dar[rx] = (dar[rx] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 536: /* gen_andw_dt_dd */
          rx = (ir >> 9) & 0x0007;
          dt = word_and(dt, dar[rx]);
          dar[rx] = (dar[rx] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 537: /* gen_andl_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = long_and(dar[ry], dar[rx]);
          dar[rx] = dt;
          mpc = resume_prefetch;
          continue;
          case 538: /* gen_andl_dt_dd */
          rx = (ir >> 9) & 0x0007;
          dt = long_and(dt, dar[rx]);
          dar[rx] = dt;
          mpc = resume_prefetch;
          continue;
          case 539: /* gen_andb_dd_ea */
          rx = (ir >> 9) & 0x0007;
          dt = byte_and(dar[rx], dt);
          mpc = ea_resume_write8;
          continue;
          case 540: /* gen_andw_dd_ea */
          rx = (ir >> 9) & 0x0007;
          dt = word_and(dar[rx], dt);
          mpc = ea_resume_write16;
          continue;
          case 541: /* gen_andl_dd_ea */
          rx = (ir >> 9) & 0x0007;
          dt = long_and(dar[rx], dt);
          mpc = ea_resume_write32;
          continue;
          case 542: /* gen_abcdb_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = byte_abcd(dar[ry], dar[rx]);
          dar[rx] = (dar[rx] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 543: /* gen_abcdb_im_ea */
          dt = byte_abcd(alub, dt);
          mpc = ea_resume_write8;
          continue;
          case 544: /* gen_addb_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = byte_add(dar[ry], dar[rx]);
          dar[rx] = (dar[rx] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 545: /* gen_addb_dt_dd */
          rx = (ir >> 9) & 0x0007;
          dt = byte_add(dt, dar[rx]);
          dar[rx] = (dar[rx] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 546: /* gen_addw_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = word_add(dar[ry], dar[rx]);
          dar[rx] = (dar[rx] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 547: /* gen_addw_as_dd */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          rx = (ir >> 9) & 0x0007;
          dt = word_add(dar[ry], dar[rx]);
          dar[rx] = (dar[rx] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 548: /* gen_addw_dt_dd */
          rx = (ir >> 9) & 0x0007;
          dt = word_add(dt, dar[rx]);
          dar[rx] = (dar[rx] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 549: /* gen_addl_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = long_add(dar[ry], dar[rx]);
          dar[rx] = dt;
          mpc = resume_prefetch;
          continue;
          case 550: /* gen_addl_as_dd */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          rx = (ir >> 9) & 0x0007;
          dt = long_add(dar[ry], dar[rx]);
          dar[rx] = dt;
          mpc = resume_prefetch;
          continue;
          case 551: /* gen_addl_dt_dd */
          rx = (ir >> 9) & 0x0007;
          dt = long_add(dt, dar[rx]);
          dar[rx] = dt;
          mpc = resume_prefetch;
          continue;
          case 552: /* gen_addb_dd_ea */
          rx = (ir >> 9) & 0x0007;
          dt = byte_add(dar[rx], dt);
          mpc = ea_resume_write8;
          continue;
          case 553: /* gen_addw_dd_ea */
          rx = (ir >> 9) & 0x0007;
          dt = word_add(dar[rx], dt);
          mpc = ea_resume_write16;
          continue;
          case 554: /* gen_addl_dd_ea */
          rx = (ir >> 9) & 0x0007;
          dt = long_add(dar[rx], dt);
          mpc = ea_resume_write32;
          continue;
          case 555: /* gen_addxb_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = byte_addx(dar[ry], dar[rx]);
          dar[rx] = (dar[rx] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 556: /* gen_addxb_im_ea */
          dt = byte_addx(alub, dt);
          mpc = ea_resume_write8;
          continue;
          case 557: /* gen_addxw_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = word_addx(dar[ry], dar[rx]);
          dar[rx] = (dar[rx] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 558: /* gen_addxw_im_ea */
          dt = word_addx(alub, dt);
          mpc = ea_resume_write16;
          continue;
          case 559: /* gen_addxl_ds_dd */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          dt = long_addx(dar[ry], dar[rx]);
          dar[rx] = dt;
          mpc = resume_prefetch;
          continue;
          case 560: /* gen_addxl_im_ea */
          dt = long_addx(alub, dt);
          mpc = ea_resume_write32;
          continue;
          case 561: /* gen_addw_ds_ad */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] = dar[rx] + ((short) dar[ry]);
          mpc = resume_prefetch;
          continue;
          case 562: /* gen_addw_as_ad */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] = dar[rx] + ((short) dar[ry]);
          mpc = resume_prefetch;
          continue;
          case 563: /* gen_addw_dt_ad */
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] = dar[rx] + ((short) dt);
          mpc = resume_prefetch;
          continue;
          case 564: /* gen_addl_ds_ad */
          ry = ir & 0x0007;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] = dar[rx] + dar[ry];
          mpc = resume_prefetch;
          continue;
          case 565: /* gen_addl_as_ad */
          ry = ir & 0x0007;
          ry = ry == 7 ? sp : ry | 8;
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] = dar[rx] + dar[ry];
          mpc = resume_prefetch;
          continue;
          case 566: /* gen_addl_dt_ad */
          rx = (ir >> 9) & 0x0007;
          rx = rx == 7 ? sp : rx | 8;
          dar[rx] = dar[rx] + dt;
          mpc = resume_prefetch;
          continue;
          case 567: /* gen_asrb_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = byte_asr(alub, dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 568: /* gen_asrb_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = byte_asr(dar[rx], dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 569: /* gen_asrw_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = word_asr(alub, dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 570: /* gen_asrw_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = word_asr(dar[rx], dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 571: /* gen_asrl_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = long_asr(alub, dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 572: /* gen_asrl_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = long_asr(dar[rx], dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 573: /* gen_asrw_ea */
          dt = word_asr(1, dt);
          mpc = ea_resume_write16;
          continue;
          case 574: /* gen_aslb_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = byte_asl(alub, dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 575: /* gen_aslb_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = byte_asl(dar[rx], dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 576: /* gen_aslw_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = word_asl(alub, dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 577: /* gen_aslw_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = word_asl(dar[rx], dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 578: /* gen_asll_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = long_asl(alub, dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 579: /* gen_asll_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = long_asl(dar[rx], dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 580: /* gen_aslw_ea */
          dt = word_asl(1, dt);
          mpc = ea_resume_write16;
          continue;
          case 581: /* gen_lsrb_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = byte_lsr(alub, dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 582: /* gen_lsrb_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = byte_lsr(dar[rx], dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 583: /* gen_lsrw_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = word_lsr(alub, dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 584: /* gen_lsrw_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = word_lsr(dar[rx], dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 585: /* gen_lsrl_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = long_lsr(alub, dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 586: /* gen_lsrl_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = long_lsr(dar[rx], dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 587: /* gen_lsrw_ea */
          dt = word_lsr(1, dt);
          mpc = ea_resume_write16;
          continue;
          case 588: /* gen_lslb_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = byte_lsl(alub, dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 589: /* gen_lslb_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = byte_lsl(dar[rx], dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 590: /* gen_lslw_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = word_lsl(alub, dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 591: /* gen_lslw_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = word_lsl(dar[rx], dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 592: /* gen_lsll_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = long_lsl(alub, dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 593: /* gen_lsll_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = long_lsl(dar[rx], dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 594: /* gen_lslw_ea */
          dt = word_lsl(1, dt);
          mpc = ea_resume_write16;
          continue;
          case 595: /* gen_rorb_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = byte_ror(alub, dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 596: /* gen_rorb_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = byte_ror(dar[rx], dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 597: /* gen_rorw_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = word_ror(alub, dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 598: /* gen_rorw_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = word_ror(dar[rx], dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 599: /* gen_rorl_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = long_ror(alub, dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 600: /* gen_rorl_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = long_ror(dar[rx], dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 601: /* gen_rorw_ea */
          dt = word_ror(1, dt);
          mpc = ea_resume_write16;
          continue;
          case 602: /* gen_rolb_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = byte_rol(alub, dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 603: /* gen_rolb_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = byte_rol(dar[rx], dar[ry]);
          dar[ry] = (dar[ry] & ~0xff) | (dt & 0xff);
          mpc = resume_prefetch;
          continue;
          case 604: /* gen_rolw_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = word_rol(alub, dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 605: /* gen_rolw_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = word_rol(dar[rx], dar[ry]);
          dar[ry] = (dar[ry] & ~0xffff) | (dt & 0xffff);
          mpc = resume_prefetch;
          continue;
          case 606: /* gen_roll_ir_ds */
          alub = (ir >> 9) & 0x0007;
          if (alub == 0) {
            alub = 8;
          }
          ry = ir & 0x0007;
          dt = long_rol(alub, dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 607: /* gen_roll_dd_ds */
          rx = (ir >> 9) & 0x0007;
          ry = ir & 0x0007;
          dt = long_rol(dar[rx], dar[ry]);
          dar[ry] = dt;
          mpc = resume_prefetch;
          continue;
          case 608: /* gen_rolw_ea */
          dt = word_rol(1, dt);
          mpc = ea_resume_write16;
          continue;
          default:
          mpc = dbrr;
          continue;
        }
        mpc = nmpc;
        slice -= elapsed;
        elapsed = 0;
        if (exit || (slice <= 0)) {
          break;
        }
      }
      consumed -= slice;
    }
    if ((sswi & SSWI_PSLC) != 0) {
      this.slice = slice;
    }
    return consumed;
  }

  public abstract int fetch16(int aob);

  public abstract int fetch32(int aob);

  public abstract byte read8(int aob);

  public abstract short read16(int aob);

  public abstract int read32(int aob);

  public abstract void write8(int aob, int dob);

  public abstract void write16(int aob, int dob);

  public abstract void write32(int aob, int dob);

  public int handle_bkpt(int pc, int data) {
    return 0;
  }

  public int handle_illegal(int pc, int ir) {
    return 0;
  }

  public int handle_interrupt(int level) {
    return IRQ_DFLT;
  }

  public int handle_linea(int pc, int data) {
    return 0;
  }

  public void handle_reset() {
  }

  public int handle_trace(int pc) {
    return 0;
  }
}
