diff --git a/build/cpu.js b/build/cpu.js index 5464c3ce..19c3bd6c 100644 --- a/build/cpu.js +++ b/build/cpu.js @@ -2,7 +2,6 @@ /** @constructor */ function v86() { - var cpu = this; /** @type {number } */ this.memory_size = 0; this.segment_is_null = []; @@ -180,7 +179,7 @@ function v86() // it looks pointless to have this here, but // Closure Compiler is able to remove unused functions "use strict"; -(function() +(function(cpu) { var debug = {}; cpu.debug = debug; @@ -425,7 +424,7 @@ function v86() out += i + "=" + Number(!!flg[i]()) + " | "; } } - out += "iopl=" + (cpu.flags >> 12 & 3); + out += "iopl=" + cpu.getiopl(); dbg_log(out); //dbg_log("last operation: " + h(last_op1 | 0) + ", " + h(last_op2 | 0) + " = " + //h(last_result | 0) + " (" + last_op_size + " bit)") @@ -693,7 +692,7 @@ function v86() dbg_log(row); } }; -})(); +})(this); /** @const */ this._state_skip = [ "current_settings", @@ -744,60 +743,1266 @@ function DynamicTranslator(something) * This file contains functions to decode the modrm and sib bytes * * These functions return a virtual address - * - * Gets #included by cpu.macro.js */ "use strict"; -(function() { -v86.prototype.modrm_table16 = Array(0xC0); -v86.prototype.modrm_table32 = Array(0xC0); -v86.prototype.sib_table = Array(0x100); -v86.prototype.modrm_table16[0x00 | 0] = function(cpu) { return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_bx] + cpu.reg16[reg_si]) & 0xFFFF) | 0; }; v86.prototype.modrm_table16[0x40 | 0] = function(cpu) { return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_bx] + cpu.reg16[reg_si]) + cpu.read_imm8s() & 0xFFFF) | 0; }; v86.prototype.modrm_table16[0x80 | 0] = function(cpu) { return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_bx] + cpu.reg16[reg_si]) + cpu.read_imm16() & 0xFFFF) | 0; }; -v86.prototype.modrm_table16[0x00 | 1] = function(cpu) { return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_bx] + cpu.reg16[reg_di]) & 0xFFFF) | 0; }; v86.prototype.modrm_table16[0x40 | 1] = function(cpu) { return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_bx] + cpu.reg16[reg_di]) + cpu.read_imm8s() & 0xFFFF) | 0; }; v86.prototype.modrm_table16[0x80 | 1] = function(cpu) { return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_bx] + cpu.reg16[reg_di]) + cpu.read_imm16() & 0xFFFF) | 0; }; -v86.prototype.modrm_table16[0x00 | 2] = function(cpu) { return cpu.get_seg_prefix_ss() + ((cpu.reg16[reg_bp] + cpu.reg16[reg_si]) & 0xFFFF) | 0; }; v86.prototype.modrm_table16[0x40 | 2] = function(cpu) { return cpu.get_seg_prefix_ss() + ((cpu.reg16[reg_bp] + cpu.reg16[reg_si]) + cpu.read_imm8s() & 0xFFFF) | 0; }; v86.prototype.modrm_table16[0x80 | 2] = function(cpu) { return cpu.get_seg_prefix_ss() + ((cpu.reg16[reg_bp] + cpu.reg16[reg_si]) + cpu.read_imm16() & 0xFFFF) | 0; }; -v86.prototype.modrm_table16[0x00 | 3] = function(cpu) { return cpu.get_seg_prefix_ss() + ((cpu.reg16[reg_bp] + cpu.reg16[reg_di]) & 0xFFFF) | 0; }; v86.prototype.modrm_table16[0x40 | 3] = function(cpu) { return cpu.get_seg_prefix_ss() + ((cpu.reg16[reg_bp] + cpu.reg16[reg_di]) + cpu.read_imm8s() & 0xFFFF) | 0; }; v86.prototype.modrm_table16[0x80 | 3] = function(cpu) { return cpu.get_seg_prefix_ss() + ((cpu.reg16[reg_bp] + cpu.reg16[reg_di]) + cpu.read_imm16() & 0xFFFF) | 0; }; -v86.prototype.modrm_table16[0x00 | 4] = function(cpu) { return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_si]) & 0xFFFF) | 0; }; v86.prototype.modrm_table16[0x40 | 4] = function(cpu) { return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_si]) + cpu.read_imm8s() & 0xFFFF) | 0; }; v86.prototype.modrm_table16[0x80 | 4] = function(cpu) { return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_si]) + cpu.read_imm16() & 0xFFFF) | 0; }; -v86.prototype.modrm_table16[0x00 | 5] = function(cpu) { return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_di]) & 0xFFFF) | 0; }; v86.prototype.modrm_table16[0x40 | 5] = function(cpu) { return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_di]) + cpu.read_imm8s() & 0xFFFF) | 0; }; v86.prototype.modrm_table16[0x80 | 5] = function(cpu) { return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_di]) + cpu.read_imm16() & 0xFFFF) | 0; }; -v86.prototype.modrm_table16[0x00 | 6] = function(cpu) { return cpu.get_seg_prefix_ss() + ((cpu.reg16[reg_bp]) & 0xFFFF) | 0; }; v86.prototype.modrm_table16[0x40 | 6] = function(cpu) { return cpu.get_seg_prefix_ss() + ((cpu.reg16[reg_bp]) + cpu.read_imm8s() & 0xFFFF) | 0; }; v86.prototype.modrm_table16[0x80 | 6] = function(cpu) { return cpu.get_seg_prefix_ss() + ((cpu.reg16[reg_bp]) + cpu.read_imm16() & 0xFFFF) | 0; }; -v86.prototype.modrm_table16[0x00 | 7] = function(cpu) { return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_bx]) & 0xFFFF) | 0; }; v86.prototype.modrm_table16[0x40 | 7] = function(cpu) { return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_bx]) + cpu.read_imm8s() & 0xFFFF) | 0; }; v86.prototype.modrm_table16[0x80 | 7] = function(cpu) { return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_bx]) + cpu.read_imm16() & 0xFFFF) | 0; }; -v86.prototype.modrm_table32[0x00 | 0] = function(cpu) { return (cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax]) | 0; }; v86.prototype.modrm_table32[0x40 | 0] = function(cpu) { return (cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax]) + cpu.read_imm8s() | 0; }; v86.prototype.modrm_table32[0x80 | 0] = function(cpu) { return (cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax]) + cpu.read_imm32s() | 0; };; -v86.prototype.modrm_table32[0x00 | 1] = function(cpu) { return (cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx]) | 0; }; v86.prototype.modrm_table32[0x40 | 1] = function(cpu) { return (cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx]) + cpu.read_imm8s() | 0; }; v86.prototype.modrm_table32[0x80 | 1] = function(cpu) { return (cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx]) + cpu.read_imm32s() | 0; };; -v86.prototype.modrm_table32[0x00 | 2] = function(cpu) { return (cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx]) | 0; }; v86.prototype.modrm_table32[0x40 | 2] = function(cpu) { return (cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx]) + cpu.read_imm8s() | 0; }; v86.prototype.modrm_table32[0x80 | 2] = function(cpu) { return (cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx]) + cpu.read_imm32s() | 0; };; -v86.prototype.modrm_table32[0x00 | 3] = function(cpu) { return (cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx]) | 0; }; v86.prototype.modrm_table32[0x40 | 3] = function(cpu) { return (cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx]) + cpu.read_imm8s() | 0; }; v86.prototype.modrm_table32[0x80 | 3] = function(cpu) { return (cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx]) + cpu.read_imm32s() | 0; };; -v86.prototype.modrm_table32[0x00 | 4] = function(cpu) { return (cpu.sib_table[cpu.read_imm8()](cpu, false)) | 0; }; v86.prototype.modrm_table32[0x40 | 4] = function(cpu) { return (cpu.sib_table[cpu.read_imm8()](cpu, false)) + cpu.read_imm8s() | 0; }; v86.prototype.modrm_table32[0x80 | 4] = function(cpu) { return (cpu.sib_table[cpu.read_imm8()](cpu, false)) + cpu.read_imm32s() | 0; };; -v86.prototype.modrm_table32[0x00 | 5] = function(cpu) { return (cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp]) | 0; }; v86.prototype.modrm_table32[0x40 | 5] = function(cpu) { return (cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp]) + cpu.read_imm8s() | 0; }; v86.prototype.modrm_table32[0x80 | 5] = function(cpu) { return (cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp]) + cpu.read_imm32s() | 0; };; -v86.prototype.modrm_table32[0x00 | 6] = function(cpu) { return (cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi]) | 0; }; v86.prototype.modrm_table32[0x40 | 6] = function(cpu) { return (cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi]) + cpu.read_imm8s() | 0; }; v86.prototype.modrm_table32[0x80 | 6] = function(cpu) { return (cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi]) + cpu.read_imm32s() | 0; };; -v86.prototype.modrm_table32[0x00 | 7] = function(cpu) { return (cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi]) | 0; }; v86.prototype.modrm_table32[0x40 | 7] = function(cpu) { return (cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi]) + cpu.read_imm8s() | 0; }; v86.prototype.modrm_table32[0x80 | 7] = function(cpu) { return (cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi]) + cpu.read_imm32s() | 0; };; -// special cases -v86.prototype.modrm_table16[0x00 | 6] = function(cpu) { return cpu.get_seg_prefix_ds() + cpu.read_imm16() | 0; } -v86.prototype.modrm_table32[0x00 | 5] = function(cpu) { return cpu.get_seg_prefix_ds() + cpu.read_imm32s() | 0; }; -v86.prototype.modrm_table32[0x00 | 4] = function(cpu) { return cpu.sib_table[cpu.read_imm8()](cpu, false) | 0; }; -v86.prototype.modrm_table32[0x40 | 4] = function(cpu) { return cpu.sib_table[cpu.read_imm8()](cpu, true) + cpu.read_imm8s() | 0; }; -v86.prototype.modrm_table32[0x80 | 4] = function(cpu) { return cpu.sib_table[cpu.read_imm8()](cpu, true) + cpu.read_imm32s() | 0; }; -for(var low = 0; low < 8; low++) +(function() { - for(var high = 0; high < 3; high++) + v86.prototype.modrm_table16 = Array(0xC0); + v86.prototype.modrm_table32 = Array(0xC0); + v86.prototype.sib_table = Array(0x100); + v86.prototype.modrm_table16[0x00 | 0] = function(cpu) { - var x = low | high << 6; - for(var i = 1; i < 8; i++) + return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_bx] + cpu.reg16[reg_si]) & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x40 | 0] = function(cpu) + { + return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_bx] + cpu.reg16[reg_si]) + cpu.read_imm8s() & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x80 | 0] = function(cpu) + { + return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_bx] + cpu.reg16[reg_si]) + cpu.read_imm16() & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x00 | 1] = function(cpu) + { + return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_bx] + cpu.reg16[reg_di]) & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x40 | 1] = function(cpu) + { + return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_bx] + cpu.reg16[reg_di]) + cpu.read_imm8s() & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x80 | 1] = function(cpu) + { + return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_bx] + cpu.reg16[reg_di]) + cpu.read_imm16() & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x00 | 2] = function(cpu) + { + return cpu.get_seg_prefix_ss() + ((cpu.reg16[reg_bp] + cpu.reg16[reg_si]) & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x40 | 2] = function(cpu) + { + return cpu.get_seg_prefix_ss() + ((cpu.reg16[reg_bp] + cpu.reg16[reg_si]) + cpu.read_imm8s() & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x80 | 2] = function(cpu) + { + return cpu.get_seg_prefix_ss() + ((cpu.reg16[reg_bp] + cpu.reg16[reg_si]) + cpu.read_imm16() & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x00 | 3] = function(cpu) + { + return cpu.get_seg_prefix_ss() + ((cpu.reg16[reg_bp] + cpu.reg16[reg_di]) & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x40 | 3] = function(cpu) + { + return cpu.get_seg_prefix_ss() + ((cpu.reg16[reg_bp] + cpu.reg16[reg_di]) + cpu.read_imm8s() & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x80 | 3] = function(cpu) + { + return cpu.get_seg_prefix_ss() + ((cpu.reg16[reg_bp] + cpu.reg16[reg_di]) + cpu.read_imm16() & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x00 | 4] = function(cpu) + { + return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_si]) & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x40 | 4] = function(cpu) + { + return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_si]) + cpu.read_imm8s() & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x80 | 4] = function(cpu) + { + return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_si]) + cpu.read_imm16() & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x00 | 5] = function(cpu) + { + return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_di]) & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x40 | 5] = function(cpu) + { + return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_di]) + cpu.read_imm8s() & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x80 | 5] = function(cpu) + { + return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_di]) + cpu.read_imm16() & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x00 | 6] = function(cpu) + { + return cpu.get_seg_prefix_ss() + ((cpu.reg16[reg_bp]) & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x40 | 6] = function(cpu) + { + return cpu.get_seg_prefix_ss() + ((cpu.reg16[reg_bp]) + cpu.read_imm8s() & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x80 | 6] = function(cpu) + { + return cpu.get_seg_prefix_ss() + ((cpu.reg16[reg_bp]) + cpu.read_imm16() & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x00 | 7] = function(cpu) + { + return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_bx]) & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x40 | 7] = function(cpu) + { + return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_bx]) + cpu.read_imm8s() & 0xFFFF) | 0; + }; + v86.prototype.modrm_table16[0x80 | 7] = function(cpu) + { + return cpu.get_seg_prefix_ds() + ((cpu.reg16[reg_bx]) + cpu.read_imm16() & 0xFFFF) | 0; + }; + v86.prototype.modrm_table32[0x00 | 0] = function(cpu) + { + return(cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax]) | 0; + }; + v86.prototype.modrm_table32[0x40 | 0] = function(cpu) + { + return(cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax]) + cpu.read_imm8s() | 0; + }; + v86.prototype.modrm_table32[0x80 | 0] = function(cpu) + { + return(cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax]) + cpu.read_imm32s() | 0; + };; + v86.prototype.modrm_table32[0x00 | 1] = function(cpu) + { + return(cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx]) | 0; + }; + v86.prototype.modrm_table32[0x40 | 1] = function(cpu) + { + return(cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx]) + cpu.read_imm8s() | 0; + }; + v86.prototype.modrm_table32[0x80 | 1] = function(cpu) + { + return(cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx]) + cpu.read_imm32s() | 0; + };; + v86.prototype.modrm_table32[0x00 | 2] = function(cpu) + { + return(cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx]) | 0; + }; + v86.prototype.modrm_table32[0x40 | 2] = function(cpu) + { + return(cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx]) + cpu.read_imm8s() | 0; + }; + v86.prototype.modrm_table32[0x80 | 2] = function(cpu) + { + return(cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx]) + cpu.read_imm32s() | 0; + };; + v86.prototype.modrm_table32[0x00 | 3] = function(cpu) + { + return(cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx]) | 0; + }; + v86.prototype.modrm_table32[0x40 | 3] = function(cpu) + { + return(cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx]) + cpu.read_imm8s() | 0; + }; + v86.prototype.modrm_table32[0x80 | 3] = function(cpu) + { + return(cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx]) + cpu.read_imm32s() | 0; + };; + v86.prototype.modrm_table32[0x00 | 4] = function(cpu) + { + return(cpu.sib_table[cpu.read_imm8()](cpu, false)) | 0; + }; + v86.prototype.modrm_table32[0x40 | 4] = function(cpu) + { + return(cpu.sib_table[cpu.read_imm8()](cpu, false)) + cpu.read_imm8s() | 0; + }; + v86.prototype.modrm_table32[0x80 | 4] = function(cpu) + { + return(cpu.sib_table[cpu.read_imm8()](cpu, false)) + cpu.read_imm32s() | 0; + };; + v86.prototype.modrm_table32[0x00 | 5] = function(cpu) + { + return(cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp]) | 0; + }; + v86.prototype.modrm_table32[0x40 | 5] = function(cpu) + { + return(cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp]) + cpu.read_imm8s() | 0; + }; + v86.prototype.modrm_table32[0x80 | 5] = function(cpu) + { + return(cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp]) + cpu.read_imm32s() | 0; + };; + v86.prototype.modrm_table32[0x00 | 6] = function(cpu) + { + return(cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi]) | 0; + }; + v86.prototype.modrm_table32[0x40 | 6] = function(cpu) + { + return(cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi]) + cpu.read_imm8s() | 0; + }; + v86.prototype.modrm_table32[0x80 | 6] = function(cpu) + { + return(cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi]) + cpu.read_imm32s() | 0; + };; + v86.prototype.modrm_table32[0x00 | 7] = function(cpu) + { + return(cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi]) | 0; + }; + v86.prototype.modrm_table32[0x40 | 7] = function(cpu) + { + return(cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi]) + cpu.read_imm8s() | 0; + }; + v86.prototype.modrm_table32[0x80 | 7] = function(cpu) + { + return(cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi]) + cpu.read_imm32s() | 0; + };; + // special cases + v86.prototype.modrm_table16[0x00 | 6] = function(cpu) + { + return cpu.get_seg_prefix_ds() + cpu.read_imm16() | 0; + } + v86.prototype.modrm_table32[0x00 | 5] = function(cpu) + { + return cpu.get_seg_prefix_ds() + cpu.read_imm32s() | 0; + }; + v86.prototype.modrm_table32[0x00 | 4] = function(cpu) + { + return cpu.sib_table[cpu.read_imm8()](cpu, false) | 0; + }; + v86.prototype.modrm_table32[0x40 | 4] = function(cpu) + { + return cpu.sib_table[cpu.read_imm8()](cpu, true) + cpu.read_imm8s() | 0; + }; + v86.prototype.modrm_table32[0x80 | 4] = function(cpu) + { + return cpu.sib_table[cpu.read_imm8()](cpu, true) + cpu.read_imm32s() | 0; + }; + for(var low = 0; low < 8; low++) + { + for(var high = 0; high < 3; high++) { - v86.prototype.modrm_table32[x | i << 3] = v86.prototype.modrm_table32[x]; - v86.prototype.modrm_table16[x | i << 3] = v86.prototype.modrm_table16[x]; + var x = low | high << 6; + for(var i = 1; i < 8; i++) + { + v86.prototype.modrm_table32[x | i << 3] = v86.prototype.modrm_table32[x]; + v86.prototype.modrm_table16[x | i << 3] = v86.prototype.modrm_table16[x]; + } } } -} -v86.prototype.sib_table[0x00 | 0 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_eax]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x00 | 0 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_eax]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x00 | 0 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_eax]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x00 | 0 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_eax]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x00 | 0 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_eax]) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x00 | 0 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_eax]) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x00 | 0 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_eax]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x00 | 0 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_eax]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0x40 | 0 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x40 | 0 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x40 | 0 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x40 | 0 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x40 | 0 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 1) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x40 | 0 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 1) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x40 | 0 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x40 | 0 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0x80 | 0 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x80 | 0 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x80 | 0 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x80 | 0 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x80 | 0 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 2) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x80 | 0 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 2) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x80 | 0 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x80 | 0 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0xC0 | 0 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0xC0 | 0 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0xC0 | 0 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0xC0 | 0 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0xC0 | 0 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 3) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0xC0 | 0 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 3) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0xC0 | 0 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0xC0 | 0 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_eax] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; };; -v86.prototype.sib_table[0x00 | 1 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_ecx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x00 | 1 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_ecx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x00 | 1 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_ecx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x00 | 1 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_ecx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x00 | 1 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_ecx]) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x00 | 1 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_ecx]) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x00 | 1 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_ecx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x00 | 1 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_ecx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0x40 | 1 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x40 | 1 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x40 | 1 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x40 | 1 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x40 | 1 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 1) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x40 | 1 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 1) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x40 | 1 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x40 | 1 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0x80 | 1 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x80 | 1 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x80 | 1 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x80 | 1 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x80 | 1 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 2) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x80 | 1 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 2) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x80 | 1 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x80 | 1 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0xC0 | 1 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0xC0 | 1 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0xC0 | 1 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0xC0 | 1 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0xC0 | 1 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 3) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0xC0 | 1 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 3) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0xC0 | 1 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0xC0 | 1 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_ecx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; };; -v86.prototype.sib_table[0x00 | 2 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_edx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x00 | 2 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_edx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x00 | 2 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_edx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x00 | 2 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_edx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x00 | 2 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_edx]) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x00 | 2 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_edx]) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x00 | 2 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_edx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x00 | 2 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_edx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0x40 | 2 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x40 | 2 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x40 | 2 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x40 | 2 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x40 | 2 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 1) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x40 | 2 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 1) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x40 | 2 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x40 | 2 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0x80 | 2 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x80 | 2 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x80 | 2 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x80 | 2 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x80 | 2 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 2) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x80 | 2 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 2) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x80 | 2 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x80 | 2 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0xC0 | 2 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0xC0 | 2 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0xC0 | 2 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0xC0 | 2 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0xC0 | 2 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 3) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0xC0 | 2 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 3) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0xC0 | 2 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0xC0 | 2 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_edx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; };; -v86.prototype.sib_table[0x00 | 3 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_ebx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x00 | 3 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_ebx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x00 | 3 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_ebx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x00 | 3 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_ebx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x00 | 3 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_ebx]) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x00 | 3 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_ebx]) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x00 | 3 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_ebx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x00 | 3 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_ebx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0x40 | 3 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x40 | 3 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x40 | 3 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x40 | 3 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x40 | 3 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 1) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x40 | 3 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 1) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x40 | 3 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x40 | 3 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0x80 | 3 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x80 | 3 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x80 | 3 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x80 | 3 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x80 | 3 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 2) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x80 | 3 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 2) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x80 | 3 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x80 | 3 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0xC0 | 3 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0xC0 | 3 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0xC0 | 3 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0xC0 | 3 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0xC0 | 3 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 3) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0xC0 | 3 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 3) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0xC0 | 3 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0xC0 | 3 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_ebx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; };; -v86.prototype.sib_table[0x00 | 4 << 3 | 0] = function(cpu, mod) { return (0) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x00 | 4 << 3 | 1] = function(cpu, mod) { return (0) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x00 | 4 << 3 | 2] = function(cpu, mod) { return (0) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x00 | 4 << 3 | 3] = function(cpu, mod) { return (0) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x00 | 4 << 3 | 4] = function(cpu, mod) { return (0) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x00 | 4 << 3 | 5] = function(cpu, mod) { return (0) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x00 | 4 << 3 | 6] = function(cpu, mod) { return (0) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x00 | 4 << 3 | 7] = function(cpu, mod) { return (0) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0x40 | 4 << 3 | 0] = function(cpu, mod) { return (0 << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x40 | 4 << 3 | 1] = function(cpu, mod) { return (0 << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x40 | 4 << 3 | 2] = function(cpu, mod) { return (0 << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x40 | 4 << 3 | 3] = function(cpu, mod) { return (0 << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x40 | 4 << 3 | 4] = function(cpu, mod) { return (0 << 1) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x40 | 4 << 3 | 5] = function(cpu, mod) { return (0 << 1) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x40 | 4 << 3 | 6] = function(cpu, mod) { return (0 << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x40 | 4 << 3 | 7] = function(cpu, mod) { return (0 << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0x80 | 4 << 3 | 0] = function(cpu, mod) { return (0 << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x80 | 4 << 3 | 1] = function(cpu, mod) { return (0 << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x80 | 4 << 3 | 2] = function(cpu, mod) { return (0 << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x80 | 4 << 3 | 3] = function(cpu, mod) { return (0 << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x80 | 4 << 3 | 4] = function(cpu, mod) { return (0 << 2) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x80 | 4 << 3 | 5] = function(cpu, mod) { return (0 << 2) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x80 | 4 << 3 | 6] = function(cpu, mod) { return (0 << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x80 | 4 << 3 | 7] = function(cpu, mod) { return (0 << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0xC0 | 4 << 3 | 0] = function(cpu, mod) { return (0 << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0xC0 | 4 << 3 | 1] = function(cpu, mod) { return (0 << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0xC0 | 4 << 3 | 2] = function(cpu, mod) { return (0 << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0xC0 | 4 << 3 | 3] = function(cpu, mod) { return (0 << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0xC0 | 4 << 3 | 4] = function(cpu, mod) { return (0 << 3) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0xC0 | 4 << 3 | 5] = function(cpu, mod) { return (0 << 3) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0xC0 | 4 << 3 | 6] = function(cpu, mod) { return (0 << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0xC0 | 4 << 3 | 7] = function(cpu, mod) { return (0 << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; };; -v86.prototype.sib_table[0x00 | 5 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_ebp]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x00 | 5 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_ebp]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x00 | 5 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_ebp]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x00 | 5 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_ebp]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x00 | 5 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_ebp]) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x00 | 5 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_ebp]) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x00 | 5 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_ebp]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x00 | 5 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_ebp]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0x40 | 5 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x40 | 5 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x40 | 5 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x40 | 5 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x40 | 5 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 1) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x40 | 5 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 1) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x40 | 5 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x40 | 5 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0x80 | 5 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x80 | 5 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x80 | 5 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x80 | 5 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x80 | 5 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 2) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x80 | 5 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 2) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x80 | 5 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x80 | 5 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0xC0 | 5 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0xC0 | 5 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0xC0 | 5 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0xC0 | 5 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0xC0 | 5 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 3) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0xC0 | 5 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 3) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0xC0 | 5 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0xC0 | 5 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_ebp] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; };; -v86.prototype.sib_table[0x00 | 6 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_esi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x00 | 6 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_esi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x00 | 6 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_esi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x00 | 6 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_esi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x00 | 6 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_esi]) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x00 | 6 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_esi]) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x00 | 6 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_esi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x00 | 6 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_esi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0x40 | 6 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x40 | 6 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x40 | 6 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x40 | 6 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x40 | 6 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 1) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x40 | 6 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 1) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x40 | 6 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x40 | 6 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0x80 | 6 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x80 | 6 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x80 | 6 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x80 | 6 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x80 | 6 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 2) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x80 | 6 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 2) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x80 | 6 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x80 | 6 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0xC0 | 6 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0xC0 | 6 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0xC0 | 6 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0xC0 | 6 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0xC0 | 6 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 3) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0xC0 | 6 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 3) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0xC0 | 6 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0xC0 | 6 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_esi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; };; -v86.prototype.sib_table[0x00 | 7 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_edi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x00 | 7 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_edi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x00 | 7 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_edi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x00 | 7 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_edi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x00 | 7 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_edi]) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x00 | 7 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_edi]) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x00 | 7 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_edi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x00 | 7 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_edi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0x40 | 7 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x40 | 7 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x40 | 7 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x40 | 7 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x40 | 7 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 1) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x40 | 7 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 1) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x40 | 7 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x40 | 7 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0x80 | 7 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0x80 | 7 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0x80 | 7 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0x80 | 7 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0x80 | 7 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 2) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0x80 | 7 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 2) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0x80 | 7 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0x80 | 7 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; }; v86.prototype.sib_table[0xC0 | 7 << 3 | 0] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; }; v86.prototype.sib_table[0xC0 | 7 << 3 | 1] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; }; v86.prototype.sib_table[0xC0 | 7 << 3 | 2] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; }; v86.prototype.sib_table[0xC0 | 7 << 3 | 3] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; }; v86.prototype.sib_table[0xC0 | 7 << 3 | 4] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 3) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; }; v86.prototype.sib_table[0xC0 | 7 << 3 | 5] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 3) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; }; v86.prototype.sib_table[0xC0 | 7 << 3 | 6] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; }; v86.prototype.sib_table[0xC0 | 7 << 3 | 7] = function(cpu, mod) { return (cpu.reg32s[reg_edi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; };; -v86.prototype.modrm_resolve = function(modrm_byte) -{ - return (this.address_size_32 ? this.modrm_table32 : this.modrm_table16)[modrm_byte](this); -}; + v86.prototype.sib_table[0x00 | 0 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x00 | 0 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x00 | 0 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x00 | 0 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x00 | 0 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax]) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x00 | 0 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax]) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x00 | 0 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x00 | 0 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0x40 | 0 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x40 | 0 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x40 | 0 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x40 | 0 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x40 | 0 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 1) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x40 | 0 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 1) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x40 | 0 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x40 | 0 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0x80 | 0 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x80 | 0 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x80 | 0 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x80 | 0 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x80 | 0 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 2) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x80 | 0 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 2) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x80 | 0 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x80 | 0 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0xC0 | 0 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0xC0 | 0 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0xC0 | 0 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0xC0 | 0 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0xC0 | 0 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 3) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0xC0 | 0 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 3) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0xC0 | 0 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0xC0 | 0 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_eax] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + };; + v86.prototype.sib_table[0x00 | 1 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x00 | 1 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x00 | 1 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x00 | 1 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x00 | 1 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx]) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x00 | 1 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx]) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x00 | 1 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x00 | 1 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0x40 | 1 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x40 | 1 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x40 | 1 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x40 | 1 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x40 | 1 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 1) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x40 | 1 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 1) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x40 | 1 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x40 | 1 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0x80 | 1 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x80 | 1 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x80 | 1 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x80 | 1 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x80 | 1 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 2) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x80 | 1 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 2) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x80 | 1 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x80 | 1 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0xC0 | 1 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0xC0 | 1 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0xC0 | 1 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0xC0 | 1 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0xC0 | 1 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 3) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0xC0 | 1 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 3) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0xC0 | 1 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0xC0 | 1 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_ecx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + };; + v86.prototype.sib_table[0x00 | 2 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x00 | 2 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x00 | 2 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x00 | 2 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x00 | 2 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx]) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x00 | 2 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx]) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x00 | 2 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x00 | 2 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0x40 | 2 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x40 | 2 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x40 | 2 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x40 | 2 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x40 | 2 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 1) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x40 | 2 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 1) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x40 | 2 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x40 | 2 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0x80 | 2 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x80 | 2 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x80 | 2 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x80 | 2 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x80 | 2 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 2) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x80 | 2 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 2) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x80 | 2 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x80 | 2 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0xC0 | 2 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0xC0 | 2 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0xC0 | 2 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0xC0 | 2 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0xC0 | 2 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 3) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0xC0 | 2 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 3) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0xC0 | 2 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0xC0 | 2 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_edx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + };; + v86.prototype.sib_table[0x00 | 3 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x00 | 3 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x00 | 3 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x00 | 3 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x00 | 3 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx]) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x00 | 3 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx]) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x00 | 3 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x00 | 3 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0x40 | 3 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x40 | 3 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x40 | 3 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x40 | 3 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x40 | 3 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 1) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x40 | 3 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 1) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x40 | 3 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x40 | 3 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0x80 | 3 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x80 | 3 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x80 | 3 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x80 | 3 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x80 | 3 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 2) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x80 | 3 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 2) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x80 | 3 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x80 | 3 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0xC0 | 3 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0xC0 | 3 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0xC0 | 3 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0xC0 | 3 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0xC0 | 3 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 3) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0xC0 | 3 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 3) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0xC0 | 3 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0xC0 | 3 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebx] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + };; + v86.prototype.sib_table[0x00 | 4 << 3 | 0] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x00 | 4 << 3 | 1] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x00 | 4 << 3 | 2] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x00 | 4 << 3 | 3] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x00 | 4 << 3 | 4] = function(cpu, mod) + { + return cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x00 | 4 << 3 | 5] = function(cpu, mod) + { + return (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x00 | 4 << 3 | 6] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x00 | 4 << 3 | 7] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0x40 | 4 << 3 | 0] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x40 | 4 << 3 | 1] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x40 | 4 << 3 | 2] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x40 | 4 << 3 | 3] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x40 | 4 << 3 | 4] = function(cpu, mod) + { + return cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x40 | 4 << 3 | 5] = function(cpu, mod) + { + return (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x40 | 4 << 3 | 6] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x40 | 4 << 3 | 7] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0x80 | 4 << 3 | 0] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x80 | 4 << 3 | 1] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x80 | 4 << 3 | 2] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x80 | 4 << 3 | 3] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x80 | 4 << 3 | 4] = function(cpu, mod) + { + return cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x80 | 4 << 3 | 5] = function(cpu, mod) + { + return (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x80 | 4 << 3 | 6] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x80 | 4 << 3 | 7] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0xC0 | 4 << 3 | 0] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0xC0 | 4 << 3 | 1] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0xC0 | 4 << 3 | 2] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0xC0 | 4 << 3 | 3] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0xC0 | 4 << 3 | 4] = function(cpu, mod) + { + return cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0xC0 | 4 << 3 | 5] = function(cpu, mod) + { + return (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0xC0 | 4 << 3 | 6] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0xC0 | 4 << 3 | 7] = function(cpu, mod) + { + return cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + };; + v86.prototype.sib_table[0x00 | 5 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x00 | 5 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x00 | 5 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x00 | 5 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x00 | 5 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp]) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x00 | 5 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp]) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x00 | 5 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x00 | 5 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0x40 | 5 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x40 | 5 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x40 | 5 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x40 | 5 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x40 | 5 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 1) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x40 | 5 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 1) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x40 | 5 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x40 | 5 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0x80 | 5 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x80 | 5 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x80 | 5 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x80 | 5 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x80 | 5 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 2) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x80 | 5 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 2) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x80 | 5 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x80 | 5 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0xC0 | 5 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0xC0 | 5 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0xC0 | 5 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0xC0 | 5 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0xC0 | 5 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 3) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0xC0 | 5 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 3) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0xC0 | 5 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0xC0 | 5 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_ebp] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + };; + v86.prototype.sib_table[0x00 | 6 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x00 | 6 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x00 | 6 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x00 | 6 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x00 | 6 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi]) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x00 | 6 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi]) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x00 | 6 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x00 | 6 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0x40 | 6 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x40 | 6 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x40 | 6 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x40 | 6 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x40 | 6 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 1) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x40 | 6 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 1) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x40 | 6 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x40 | 6 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0x80 | 6 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x80 | 6 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x80 | 6 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x80 | 6 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x80 | 6 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 2) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x80 | 6 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 2) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x80 | 6 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x80 | 6 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0xC0 | 6 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0xC0 | 6 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0xC0 | 6 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0xC0 | 6 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0xC0 | 6 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 3) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0xC0 | 6 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 3) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0xC0 | 6 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0xC0 | 6 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_esi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + };; + v86.prototype.sib_table[0x00 | 7 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x00 | 7 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x00 | 7 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x00 | 7 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x00 | 7 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi]) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x00 | 7 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi]) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x00 | 7 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x00 | 7 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi]) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0x40 | 7 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x40 | 7 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x40 | 7 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x40 | 7 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x40 | 7 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 1) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x40 | 7 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 1) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x40 | 7 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x40 | 7 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 1) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0x80 | 7 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0x80 | 7 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0x80 | 7 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0x80 | 7 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0x80 | 7 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 2) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0x80 | 7 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 2) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0x80 | 7 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0x80 | 7 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 2) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + }; + v86.prototype.sib_table[0xC0 | 7 << 3 | 0] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_eax] | 0; + }; + v86.prototype.sib_table[0xC0 | 7 << 3 | 1] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ecx] | 0; + }; + v86.prototype.sib_table[0xC0 | 7 << 3 | 2] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edx] | 0; + }; + v86.prototype.sib_table[0xC0 | 7 << 3 | 3] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_ebx] | 0; + }; + v86.prototype.sib_table[0xC0 | 7 << 3 | 4] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 3) + cpu.get_seg_prefix_ss() + cpu.reg32s[reg_esp] | 0; + }; + v86.prototype.sib_table[0xC0 | 7 << 3 | 5] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 3) + (mod ? cpu.get_seg_prefix_ss() + cpu.reg32s[reg_ebp] : cpu.get_seg_prefix_ds() + cpu.read_imm32s()) | 0; + }; + v86.prototype.sib_table[0xC0 | 7 << 3 | 6] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_esi] | 0; + }; + v86.prototype.sib_table[0xC0 | 7 << 3 | 7] = function(cpu, mod) + { + return(cpu.reg32s[reg_edi] << 3) + cpu.get_seg_prefix_ds() + cpu.reg32s[reg_edi] | 0; + };; + v86.prototype.modrm_resolve = function(modrm_byte) + { + return(this.address_size_32 ? this.modrm_table32 : this.modrm_table16)[modrm_byte](this); + }; })(); /* * Arithmatic functions @@ -2065,18 +3270,46 @@ table16[0x3C] = table32[0x3C] = function(cpu) { { cpu.sub(cpu.reg8[reg_al], cpu. table16[0x3D] = function(cpu) { { cpu.sub(cpu.reg16[reg_ax], cpu.read_imm16(), OPSIZE_16); } }; table32[0x3D] = function(cpu) { { cpu.sub(cpu.reg32s[reg_eax], cpu.read_imm32s(), OPSIZE_32); } }; table16[0x3E] = table32[0x3E] = function(cpu) { { cpu.seg_prefix(reg_ds); } };; table16[0x3F] = table32[0x3F] = function(cpu) { { cpu.bcd_aas(); } };; -table16[0x40 | 0] = function(cpu) { { cpu.reg16[reg_ax] = cpu.inc(cpu.reg16[reg_ax], OPSIZE_16); } }; table32[0x40 | 0] = function(cpu) { { cpu.reg32s[reg_eax] = cpu.inc(cpu.reg32s[reg_eax], OPSIZE_32); } };; table16[0x40 | 1] = function(cpu) { { cpu.reg16[reg_cx] = cpu.inc(cpu.reg16[reg_cx], OPSIZE_16); } }; table32[0x40 | 1] = function(cpu) { { cpu.reg32s[reg_ecx] = cpu.inc(cpu.reg32s[reg_ecx], OPSIZE_32); } };; table16[0x40 | 2] = function(cpu) { { cpu.reg16[reg_dx] = cpu.inc(cpu.reg16[reg_dx], OPSIZE_16); } }; table32[0x40 | 2] = function(cpu) { { cpu.reg32s[reg_edx] = cpu.inc(cpu.reg32s[reg_edx], OPSIZE_32); } };; table16[0x40 | 3] = function(cpu) { { cpu.reg16[reg_bx] = cpu.inc(cpu.reg16[reg_bx], OPSIZE_16); } }; table32[0x40 | 3] = function(cpu) { { cpu.reg32s[reg_ebx] = cpu.inc(cpu.reg32s[reg_ebx], OPSIZE_32); } };; table16[0x40 | 4] = function(cpu) { { cpu.reg16[reg_sp] = cpu.inc(cpu.reg16[reg_sp], OPSIZE_16); } }; table32[0x40 | 4] = function(cpu) { { cpu.reg32s[reg_esp] = cpu.inc(cpu.reg32s[reg_esp], OPSIZE_32); } };; table16[0x40 | 5] = function(cpu) { { cpu.reg16[reg_bp] = cpu.inc(cpu.reg16[reg_bp], OPSIZE_16); } }; table32[0x40 | 5] = function(cpu) { { cpu.reg32s[reg_ebp] = cpu.inc(cpu.reg32s[reg_ebp], OPSIZE_32); } };; table16[0x40 | 6] = function(cpu) { { cpu.reg16[reg_si] = cpu.inc(cpu.reg16[reg_si], OPSIZE_16); } }; table32[0x40 | 6] = function(cpu) { { cpu.reg32s[reg_esi] = cpu.inc(cpu.reg32s[reg_esi], OPSIZE_32); } };; table16[0x40 | 7] = function(cpu) { { cpu.reg16[reg_di] = cpu.inc(cpu.reg16[reg_di], OPSIZE_16); } }; table32[0x40 | 7] = function(cpu) { { cpu.reg32s[reg_edi] = cpu.inc(cpu.reg32s[reg_edi], OPSIZE_32); } };;; -table16[0x48 | 0] = function(cpu) { { cpu.reg16[reg_ax] = cpu.dec(cpu.reg16[reg_ax], OPSIZE_16); } }; table32[0x48 | 0] = function(cpu) { { cpu.reg32s[reg_eax] = cpu.dec(cpu.reg32s[reg_eax], OPSIZE_32); } };; table16[0x48 | 1] = function(cpu) { { cpu.reg16[reg_cx] = cpu.dec(cpu.reg16[reg_cx], OPSIZE_16); } }; table32[0x48 | 1] = function(cpu) { { cpu.reg32s[reg_ecx] = cpu.dec(cpu.reg32s[reg_ecx], OPSIZE_32); } };; table16[0x48 | 2] = function(cpu) { { cpu.reg16[reg_dx] = cpu.dec(cpu.reg16[reg_dx], OPSIZE_16); } }; table32[0x48 | 2] = function(cpu) { { cpu.reg32s[reg_edx] = cpu.dec(cpu.reg32s[reg_edx], OPSIZE_32); } };; table16[0x48 | 3] = function(cpu) { { cpu.reg16[reg_bx] = cpu.dec(cpu.reg16[reg_bx], OPSIZE_16); } }; table32[0x48 | 3] = function(cpu) { { cpu.reg32s[reg_ebx] = cpu.dec(cpu.reg32s[reg_ebx], OPSIZE_32); } };; table16[0x48 | 4] = function(cpu) { { cpu.reg16[reg_sp] = cpu.dec(cpu.reg16[reg_sp], OPSIZE_16); } }; table32[0x48 | 4] = function(cpu) { { cpu.reg32s[reg_esp] = cpu.dec(cpu.reg32s[reg_esp], OPSIZE_32); } };; table16[0x48 | 5] = function(cpu) { { cpu.reg16[reg_bp] = cpu.dec(cpu.reg16[reg_bp], OPSIZE_16); } }; table32[0x48 | 5] = function(cpu) { { cpu.reg32s[reg_ebp] = cpu.dec(cpu.reg32s[reg_ebp], OPSIZE_32); } };; table16[0x48 | 6] = function(cpu) { { cpu.reg16[reg_si] = cpu.dec(cpu.reg16[reg_si], OPSIZE_16); } }; table32[0x48 | 6] = function(cpu) { { cpu.reg32s[reg_esi] = cpu.dec(cpu.reg32s[reg_esi], OPSIZE_32); } };; table16[0x48 | 7] = function(cpu) { { cpu.reg16[reg_di] = cpu.dec(cpu.reg16[reg_di], OPSIZE_16); } }; table32[0x48 | 7] = function(cpu) { { cpu.reg32s[reg_edi] = cpu.dec(cpu.reg32s[reg_edi], OPSIZE_32); } };;; -table16[0x50 | 0] = function(cpu) { { cpu.push16(cpu.reg16[reg_ax]); } }; table32[0x50 | 0] = function(cpu) { { cpu.push32(cpu.reg32s[reg_eax]); } }; table16[0x50 | 1] = function(cpu) { { cpu.push16(cpu.reg16[reg_cx]); } }; table32[0x50 | 1] = function(cpu) { { cpu.push32(cpu.reg32s[reg_ecx]); } }; table16[0x50 | 2] = function(cpu) { { cpu.push16(cpu.reg16[reg_dx]); } }; table32[0x50 | 2] = function(cpu) { { cpu.push32(cpu.reg32s[reg_edx]); } }; table16[0x50 | 3] = function(cpu) { { cpu.push16(cpu.reg16[reg_bx]); } }; table32[0x50 | 3] = function(cpu) { { cpu.push32(cpu.reg32s[reg_ebx]); } }; table16[0x50 | 4] = function(cpu) { { cpu.push16(cpu.reg16[reg_sp]); } }; table32[0x50 | 4] = function(cpu) { { cpu.push32(cpu.reg32s[reg_esp]); } }; table16[0x50 | 5] = function(cpu) { { cpu.push16(cpu.reg16[reg_bp]); } }; table32[0x50 | 5] = function(cpu) { { cpu.push32(cpu.reg32s[reg_ebp]); } }; table16[0x50 | 6] = function(cpu) { { cpu.push16(cpu.reg16[reg_si]); } }; table32[0x50 | 6] = function(cpu) { { cpu.push32(cpu.reg32s[reg_esi]); } }; table16[0x50 | 7] = function(cpu) { { cpu.push16(cpu.reg16[reg_di]); } }; table32[0x50 | 7] = function(cpu) { { cpu.push32(cpu.reg32s[reg_edi]); } };; -table16[0x58 | 0] = function(cpu) { { cpu.reg16[reg_ax] = cpu.pop16(); } }; table32[0x58 | 0] = function(cpu) { { cpu.reg32s[reg_eax] = cpu.pop32s(); } }; table16[0x58 | 1] = function(cpu) { { cpu.reg16[reg_cx] = cpu.pop16(); } }; table32[0x58 | 1] = function(cpu) { { cpu.reg32s[reg_ecx] = cpu.pop32s(); } }; table16[0x58 | 2] = function(cpu) { { cpu.reg16[reg_dx] = cpu.pop16(); } }; table32[0x58 | 2] = function(cpu) { { cpu.reg32s[reg_edx] = cpu.pop32s(); } }; table16[0x58 | 3] = function(cpu) { { cpu.reg16[reg_bx] = cpu.pop16(); } }; table32[0x58 | 3] = function(cpu) { { cpu.reg32s[reg_ebx] = cpu.pop32s(); } }; table16[0x58 | 4] = function(cpu) { { cpu.reg16[reg_sp] = cpu.pop16(); } }; table32[0x58 | 4] = function(cpu) { { cpu.reg32s[reg_esp] = cpu.pop32s(); } }; table16[0x58 | 5] = function(cpu) { { cpu.reg16[reg_bp] = cpu.pop16(); } }; table32[0x58 | 5] = function(cpu) { { cpu.reg32s[reg_ebp] = cpu.pop32s(); } }; table16[0x58 | 6] = function(cpu) { { cpu.reg16[reg_si] = cpu.pop16(); } }; table32[0x58 | 6] = function(cpu) { { cpu.reg32s[reg_esi] = cpu.pop32s(); } }; table16[0x58 | 7] = function(cpu) { { cpu.reg16[reg_di] = cpu.pop16(); } }; table32[0x58 | 7] = function(cpu) { { cpu.reg32s[reg_edi] = cpu.pop32s(); } };; +table16[0x40] = function(cpu) { { cpu.reg16[reg_ax] = cpu.inc(cpu.reg16[reg_ax], OPSIZE_16); } }; table32[0x40] = function(cpu) { { cpu.reg32s[reg_eax] = cpu.inc(cpu.reg32s[reg_eax], OPSIZE_32); } };; +table16[0x41] = function(cpu) { { cpu.reg16[reg_cx] = cpu.inc(cpu.reg16[reg_cx], OPSIZE_16); } }; table32[0x41] = function(cpu) { { cpu.reg32s[reg_ecx] = cpu.inc(cpu.reg32s[reg_ecx], OPSIZE_32); } };; +table16[0x42] = function(cpu) { { cpu.reg16[reg_dx] = cpu.inc(cpu.reg16[reg_dx], OPSIZE_16); } }; table32[0x42] = function(cpu) { { cpu.reg32s[reg_edx] = cpu.inc(cpu.reg32s[reg_edx], OPSIZE_32); } };; +table16[0x43] = function(cpu) { { cpu.reg16[reg_bx] = cpu.inc(cpu.reg16[reg_bx], OPSIZE_16); } }; table32[0x43] = function(cpu) { { cpu.reg32s[reg_ebx] = cpu.inc(cpu.reg32s[reg_ebx], OPSIZE_32); } };; +table16[0x44] = function(cpu) { { cpu.reg16[reg_sp] = cpu.inc(cpu.reg16[reg_sp], OPSIZE_16); } }; table32[0x44] = function(cpu) { { cpu.reg32s[reg_esp] = cpu.inc(cpu.reg32s[reg_esp], OPSIZE_32); } };; +table16[0x45] = function(cpu) { { cpu.reg16[reg_bp] = cpu.inc(cpu.reg16[reg_bp], OPSIZE_16); } }; table32[0x45] = function(cpu) { { cpu.reg32s[reg_ebp] = cpu.inc(cpu.reg32s[reg_ebp], OPSIZE_32); } };; +table16[0x46] = function(cpu) { { cpu.reg16[reg_si] = cpu.inc(cpu.reg16[reg_si], OPSIZE_16); } }; table32[0x46] = function(cpu) { { cpu.reg32s[reg_esi] = cpu.inc(cpu.reg32s[reg_esi], OPSIZE_32); } };; +table16[0x47] = function(cpu) { { cpu.reg16[reg_di] = cpu.inc(cpu.reg16[reg_di], OPSIZE_16); } }; table32[0x47] = function(cpu) { { cpu.reg32s[reg_edi] = cpu.inc(cpu.reg32s[reg_edi], OPSIZE_32); } };; +table16[0x48] = function(cpu) { { cpu.reg16[reg_ax] = cpu.dec(cpu.reg16[reg_ax], OPSIZE_16); } }; table32[0x48] = function(cpu) { { cpu.reg32s[reg_eax] = cpu.dec(cpu.reg32s[reg_eax], OPSIZE_32); } };; +table16[0x49] = function(cpu) { { cpu.reg16[reg_cx] = cpu.dec(cpu.reg16[reg_cx], OPSIZE_16); } }; table32[0x49] = function(cpu) { { cpu.reg32s[reg_ecx] = cpu.dec(cpu.reg32s[reg_ecx], OPSIZE_32); } };; +table16[0x4A] = function(cpu) { { cpu.reg16[reg_dx] = cpu.dec(cpu.reg16[reg_dx], OPSIZE_16); } }; table32[0x4A] = function(cpu) { { cpu.reg32s[reg_edx] = cpu.dec(cpu.reg32s[reg_edx], OPSIZE_32); } };; +table16[0x4B] = function(cpu) { { cpu.reg16[reg_bx] = cpu.dec(cpu.reg16[reg_bx], OPSIZE_16); } }; table32[0x4B] = function(cpu) { { cpu.reg32s[reg_ebx] = cpu.dec(cpu.reg32s[reg_ebx], OPSIZE_32); } };; +table16[0x4C] = function(cpu) { { cpu.reg16[reg_sp] = cpu.dec(cpu.reg16[reg_sp], OPSIZE_16); } }; table32[0x4C] = function(cpu) { { cpu.reg32s[reg_esp] = cpu.dec(cpu.reg32s[reg_esp], OPSIZE_32); } };; +table16[0x4D] = function(cpu) { { cpu.reg16[reg_bp] = cpu.dec(cpu.reg16[reg_bp], OPSIZE_16); } }; table32[0x4D] = function(cpu) { { cpu.reg32s[reg_ebp] = cpu.dec(cpu.reg32s[reg_ebp], OPSIZE_32); } };; +table16[0x4E] = function(cpu) { { cpu.reg16[reg_si] = cpu.dec(cpu.reg16[reg_si], OPSIZE_16); } }; table32[0x4E] = function(cpu) { { cpu.reg32s[reg_esi] = cpu.dec(cpu.reg32s[reg_esi], OPSIZE_32); } };; +table16[0x4F] = function(cpu) { { cpu.reg16[reg_di] = cpu.dec(cpu.reg16[reg_di], OPSIZE_16); } }; table32[0x4F] = function(cpu) { { cpu.reg32s[reg_edi] = cpu.dec(cpu.reg32s[reg_edi], OPSIZE_32); } };; +table16[0x50] = function(cpu) { { cpu.push16(cpu.reg16[reg_ax]); } }; table32[0x50] = function(cpu) { { cpu.push32(cpu.reg32s[reg_eax]); } }; +table16[0x51] = function(cpu) { { cpu.push16(cpu.reg16[reg_cx]); } }; table32[0x51] = function(cpu) { { cpu.push32(cpu.reg32s[reg_ecx]); } }; +table16[0x52] = function(cpu) { { cpu.push16(cpu.reg16[reg_dx]); } }; table32[0x52] = function(cpu) { { cpu.push32(cpu.reg32s[reg_edx]); } }; +table16[0x53] = function(cpu) { { cpu.push16(cpu.reg16[reg_bx]); } }; table32[0x53] = function(cpu) { { cpu.push32(cpu.reg32s[reg_ebx]); } }; +table16[0x54] = function(cpu) { { cpu.push16(cpu.reg16[reg_sp]); } }; table32[0x54] = function(cpu) { { cpu.push32(cpu.reg32s[reg_esp]); } }; +table16[0x55] = function(cpu) { { cpu.push16(cpu.reg16[reg_bp]); } }; table32[0x55] = function(cpu) { { cpu.push32(cpu.reg32s[reg_ebp]); } }; +table16[0x56] = function(cpu) { { cpu.push16(cpu.reg16[reg_si]); } }; table32[0x56] = function(cpu) { { cpu.push32(cpu.reg32s[reg_esi]); } }; +table16[0x57] = function(cpu) { { cpu.push16(cpu.reg16[reg_di]); } }; table32[0x57] = function(cpu) { { cpu.push32(cpu.reg32s[reg_edi]); } }; +table16[0x58] = function(cpu) { { cpu.reg16[reg_ax] = cpu.pop16(); } }; table32[0x58] = function(cpu) { { cpu.reg32s[reg_eax] = cpu.pop32s(); } }; +table16[0x59] = function(cpu) { { cpu.reg16[reg_cx] = cpu.pop16(); } }; table32[0x59] = function(cpu) { { cpu.reg32s[reg_ecx] = cpu.pop32s(); } }; +table16[0x5A] = function(cpu) { { cpu.reg16[reg_dx] = cpu.pop16(); } }; table32[0x5A] = function(cpu) { { cpu.reg32s[reg_edx] = cpu.pop32s(); } }; +table16[0x5B] = function(cpu) { { cpu.reg16[reg_bx] = cpu.pop16(); } }; table32[0x5B] = function(cpu) { { cpu.reg32s[reg_ebx] = cpu.pop32s(); } }; +table16[0x5C] = function(cpu) { { cpu.reg16[reg_sp] = cpu.pop16(); } }; table32[0x5C] = function(cpu) { { cpu.reg32s[reg_esp] = cpu.pop32s(); } }; +table16[0x5D] = function(cpu) { { cpu.reg16[reg_bp] = cpu.pop16(); } }; table32[0x5D] = function(cpu) { { cpu.reg32s[reg_ebp] = cpu.pop32s(); } }; +table16[0x5E] = function(cpu) { { cpu.reg16[reg_si] = cpu.pop16(); } }; table32[0x5E] = function(cpu) { { cpu.reg32s[reg_esi] = cpu.pop32s(); } }; +table16[0x5F] = function(cpu) { { cpu.reg16[reg_di] = cpu.pop16(); } }; table32[0x5F] = function(cpu) { { cpu.reg32s[reg_edi] = cpu.pop32s(); } }; table16[0x60] = function(cpu) { { cpu.pusha16(); } }; table32[0x60] = function(cpu) { { cpu.pusha32(); } };; table16[0x61] = function(cpu) { { cpu.popa16(); } }; table32[0x61] = function(cpu) { { cpu.popa32(); } };; table16[0x62] = table32[0x62] = function(cpu) { { /* bound*/ dbg_log("Unimplemented BOUND instruction", LOG_CPU); } };; table16[0x63] = table32[0x63] = function(cpu) { var modrm_byte = cpu.read_imm8(); { /* arpl*/ var data; var virt_addr; var phys_addr; var phys_addr_high = 0; var result; if(modrm_byte < 0xC0) { virt_addr = cpu.modrm_resolve(modrm_byte); phys_addr = cpu.translate_address_write(virt_addr); if(cpu.paging && (virt_addr & 0xFFF) === 0xFFF) { phys_addr_high = cpu.translate_address_write(virt_addr + 1); data = cpu.virt_boundary_read16(phys_addr, phys_addr_high); } else { data = cpu.memory.read16(phys_addr); } } else { data = cpu.reg16[modrm_byte << 1 & 14]; } result = cpu.arpl(data, modrm_byte >> 2 & 14); if(modrm_byte < 0xC0) { if(phys_addr_high) { cpu.virt_boundary_write16(phys_addr, phys_addr_high, result); } else { cpu.memory.write16(phys_addr, result); } } else { cpu.reg16[modrm_byte << 1 & 14] = result; }; } };; table16[0x64] = table32[0x64] = function(cpu) { { cpu.seg_prefix(reg_fs); } };; table16[0x65] = table32[0x65] = function(cpu) { { cpu.seg_prefix(reg_gs); } };; -table16[0x66] = table32[0x66] = function(cpu) { { /* Operand-size override prefix*/ dbg_assert(cpu.operand_size_32 === cpu.is_32); cpu.operand_size_32 = !cpu.is_32; cpu.update_operand_size(); cpu.table[cpu.read_imm8()](cpu); cpu.operand_size_32 = cpu.is_32; cpu.update_operand_size(); } };; -table16[0x67] = table32[0x67] = function(cpu) { { /* Address-size override prefix*/ dbg_assert(cpu.address_size_32 === cpu.is_32); cpu.address_size_32 = !cpu.is_32; cpu.update_address_size(); cpu.table[cpu.read_imm8()](cpu); cpu.address_size_32 = cpu.is_32; cpu.update_address_size(); } };; +table16[0x66] = table32[0x66] = function(cpu) { { /* Operand-size override prefix*/ dbg_assert(cpu.operand_size_32 === cpu.is_32); cpu.operand_size_32 = !cpu.is_32; cpu.update_operand_size(); cpu.do_op(); cpu.operand_size_32 = cpu.is_32; cpu.update_operand_size(); } };; +table16[0x67] = table32[0x67] = function(cpu) { { /* Address-size override prefix*/ dbg_assert(cpu.address_size_32 === cpu.is_32); cpu.address_size_32 = !cpu.is_32; cpu.update_address_size(); cpu.do_op(); cpu.address_size_32 = cpu.is_32; cpu.update_address_size(); } };; table16[0x68] = function(cpu) { { cpu.push16(cpu.read_imm16()); } }; table32[0x68] = function(cpu) { { cpu.push32(cpu.read_imm32s()); } };; table16[0x69] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(modrm_byte < 0xC0) { var data = (cpu.safe_read16(cpu.modrm_resolve(modrm_byte)) << 16 >> 16); } else { data = cpu.reg16s[modrm_byte << 1 & 14]; }; cpu.reg16[modrm_byte >> 2 & 14] = cpu.imul_reg16(cpu.read_imm16s(), data); } }; table32[0x69] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(modrm_byte < 0xC0) { var data = cpu.safe_read32s(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg32s[modrm_byte & 7]; }; cpu.reg32s[modrm_byte >> 3 & 7] = cpu.imul_reg32(cpu.read_imm32s(), data); } };; table16[0x6A] = function(cpu) { { cpu.push16(cpu.read_imm8s()); } }; table32[0x6A] = function(cpu) { { cpu.push32(cpu.read_imm8s()); } };; @@ -2102,14 +3335,20 @@ table16[0x8C] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(modrm_byt table16[0x8D] = function(cpu) { var modrm_byte = cpu.read_imm8(); { /* lea*/ if(modrm_byte >= 0xC0) { cpu.trigger_ud(); } var mod = modrm_byte >> 3 & 7; /* override prefix, so modrm_resolve does not return the segment part*/ cpu.segment_prefix = SEG_PREFIX_ZERO; cpu.reg16[mod << 1] = cpu.modrm_resolve(modrm_byte); cpu.segment_prefix = SEG_PREFIX_NONE; } }; table32[0x8D] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(modrm_byte >= 0xC0) { cpu.trigger_ud(); } var mod = modrm_byte >> 3 & 7; cpu.segment_prefix = SEG_PREFIX_ZERO; cpu.reg32s[mod] = cpu.modrm_resolve(modrm_byte); cpu.segment_prefix = SEG_PREFIX_NONE; } };; table16[0x8E] = table32[0x8E] = function(cpu) { var modrm_byte = cpu.read_imm8(); { var mod = modrm_byte >> 3 & 7; if(modrm_byte < 0xC0) { var data = cpu.safe_read16(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg16[modrm_byte << 1 & 14]; }; cpu.switch_seg(mod, data); if(mod === reg_ss) { /* TODO*/ /* run next instruction, so no irqs are handled*/ /* Can't use cpu.cycle, because prefixes are still active*/ } } };; table16[0x8F] = function(cpu) { var modrm_byte = cpu.read_imm8(); { /* pop*/ var sp = cpu.safe_read16(cpu.get_stack_pointer(0)); cpu.stack_reg[cpu.reg_vsp] += 2; if(modrm_byte < 0xC0) { var addr = cpu.modrm_resolve(modrm_byte); cpu.stack_reg[cpu.reg_vsp] -= 2; cpu.safe_write16(addr, sp); cpu.stack_reg[cpu.reg_vsp] += 2; } else { cpu.reg16[modrm_byte << 1 & 14] = sp; } } }; table32[0x8F] = function(cpu) { var modrm_byte = cpu.read_imm8(); { var sp = cpu.safe_read32s(cpu.get_stack_pointer(0)); /* change esp first, then resolve modrm address*/ cpu.stack_reg[cpu.reg_vsp] += 4; if(modrm_byte < 0xC0) { var addr = cpu.modrm_resolve(modrm_byte); /* Before attempting a write that might cause a page fault,*/ /* we must set esp to the old value. Fuck Intel.*/ cpu.stack_reg[cpu.reg_vsp] -= 4; cpu.safe_write32(addr, sp); cpu.stack_reg[cpu.reg_vsp] += 4; } else { cpu.reg32s[modrm_byte & 7] = sp; } } };; -table16[0x90 | 0] = function(cpu) { { cpu.xchg16r(reg_ax) } }; table32[0x90 | 0] = function(cpu) { { cpu.xchg32r(reg_eax) } }; table16[0x90 | 1] = function(cpu) { { cpu.xchg16r(reg_cx) } }; table32[0x90 | 1] = function(cpu) { { cpu.xchg32r(reg_ecx) } }; table16[0x90 | 2] = function(cpu) { { cpu.xchg16r(reg_dx) } }; table32[0x90 | 2] = function(cpu) { { cpu.xchg32r(reg_edx) } }; table16[0x90 | 3] = function(cpu) { { cpu.xchg16r(reg_bx) } }; table32[0x90 | 3] = function(cpu) { { cpu.xchg32r(reg_ebx) } }; table16[0x90 | 4] = function(cpu) { { cpu.xchg16r(reg_sp) } }; table32[0x90 | 4] = function(cpu) { { cpu.xchg32r(reg_esp) } }; table16[0x90 | 5] = function(cpu) { { cpu.xchg16r(reg_bp) } }; table32[0x90 | 5] = function(cpu) { { cpu.xchg32r(reg_ebp) } }; table16[0x90 | 6] = function(cpu) { { cpu.xchg16r(reg_si) } }; table32[0x90 | 6] = function(cpu) { { cpu.xchg32r(reg_esi) } }; table16[0x90 | 7] = function(cpu) { { cpu.xchg16r(reg_di) } }; table32[0x90 | 7] = function(cpu) { { cpu.xchg32r(reg_edi) } }; table16[0x90] = table32[0x90] = function(cpu) { /* nop */ };; +table16[0x91] = function(cpu) { { cpu.xchg16r(reg_cx) } }; table32[0x91] = function(cpu) { { cpu.xchg32r(reg_ecx) } };; +table16[0x92] = function(cpu) { { cpu.xchg16r(reg_dx) } }; table32[0x92] = function(cpu) { { cpu.xchg32r(reg_edx) } };; +table16[0x93] = function(cpu) { { cpu.xchg16r(reg_bx) } }; table32[0x93] = function(cpu) { { cpu.xchg32r(reg_ebx) } };; +table16[0x94] = function(cpu) { { cpu.xchg16r(reg_sp) } }; table32[0x94] = function(cpu) { { cpu.xchg32r(reg_esp) } };; +table16[0x95] = function(cpu) { { cpu.xchg16r(reg_bp) } }; table32[0x95] = function(cpu) { { cpu.xchg32r(reg_ebp) } };; +table16[0x96] = function(cpu) { { cpu.xchg16r(reg_si) } }; table32[0x96] = function(cpu) { { cpu.xchg32r(reg_esi) } };; +table16[0x97] = function(cpu) { { cpu.xchg16r(reg_di) } }; table32[0x97] = function(cpu) { { cpu.xchg32r(reg_edi) } };; table16[0x98] = function(cpu) { { /* cbw */ cpu.reg16[reg_ax] = cpu.reg8s[reg_al]; } }; table32[0x98] = function(cpu) { { /* cwde */ cpu.reg32s[reg_eax] = cpu.reg16s[reg_ax]; } };; table16[0x99] = function(cpu) { { /* cwd */ cpu.reg16[reg_dx] = cpu.reg16s[reg_ax] >> 15; } }; table32[0x99] = function(cpu) { { /* cdq */ cpu.reg32s[reg_edx] = cpu.reg32s[reg_eax] >> 31; } };; table16[0x9A] = function(cpu) { { /* callf*/ var new_ip = cpu.read_imm16(); var new_cs = cpu.read_imm16(); cpu.writable_or_pagefault(cpu.get_stack_pointer(-4), 4); cpu.push16(cpu.sreg[reg_cs]); cpu.push16(cpu.get_real_eip()); cpu.switch_seg(reg_cs, new_cs); cpu.instruction_pointer = cpu.get_seg(reg_cs) + new_ip | 0; cpu.last_instr_jump = true; } }; table32[0x9A] = function(cpu) { { var new_ip = cpu.read_imm32s(); var new_cs = cpu.read_imm16(); cpu.writable_or_pagefault(cpu.get_stack_pointer(-8), 8); cpu.push32(cpu.sreg[reg_cs]); cpu.push32(cpu.get_real_eip()); cpu.switch_seg(reg_cs, new_cs); cpu.instruction_pointer = cpu.get_seg(reg_cs) + new_ip | 0; cpu.last_instr_jump = true; } };; table16[0x9B] = table32[0x9B] = function(cpu) { { /* fwait: check for pending fpu exceptions*/ if((cpu.cr0 & (CR0_MP | CR0_TS)) === (CR0_MP | CR0_TS)) { /* task switched and MP bit is set*/ cpu.trigger_nm(); } else { if(cpu.fpu) { cpu.fpu.fwait(); } else { /* EM bit isn't checked*/ /* If there's no FPU, do nothing*/ } } } };; -table16[0x9C] = function(cpu) { { /* pushf*/ if((cpu.flags & flag_vm) && (cpu.flags >> 12 & 3) < 3) { cpu.trigger_gp(0); } else { cpu.load_eflags(); cpu.push16(cpu.flags); } } }; table32[0x9C] = function(cpu) { { /* pushf*/ if((cpu.flags & flag_vm) && (cpu.flags >> 12 & 3) < 3) { /* trap to virtual 8086 monitor*/ cpu.trigger_gp(0); } else { cpu.load_eflags(); /* vm and rf flag are cleared in image stored on the stack*/ cpu.push32(cpu.flags & ~flag_vm & ~flag_rf); } } };; -table16[0x9D] = function(cpu) { { /* popf*/ if((cpu.flags & flag_vm) && (cpu.flags >> 12 & 3) < 3) { cpu.trigger_gp(0); } cpu.update_eflags((cpu.flags & ~0xFFFF) | cpu.pop16()); cpu.handle_irqs(); } }; table32[0x9D] = function(cpu) { { /* popf*/ if((cpu.flags & flag_vm) && (cpu.flags >> 12 & 3) < 3) { cpu.trigger_gp(0); } cpu.update_eflags(cpu.pop32s()); cpu.handle_irqs(); } };; +table16[0x9C] = function(cpu) { { /* pushf*/ if((cpu.flags & flag_vm) && cpu.getiopl() < 3) { cpu.trigger_gp(0); } else { cpu.load_eflags(); cpu.push16(cpu.flags); } } }; table32[0x9C] = function(cpu) { { /* pushf*/ if((cpu.flags & flag_vm) && cpu.getiopl() < 3) { /* trap to virtual 8086 monitor*/ cpu.trigger_gp(0); } else { cpu.load_eflags(); /* vm and rf flag are cleared in image stored on the stack*/ cpu.push32(cpu.flags & ~flag_vm & ~flag_rf); } } };; +table16[0x9D] = function(cpu) { { /* popf*/ if((cpu.flags & flag_vm) && cpu.getiopl() < 3) { cpu.trigger_gp(0); } cpu.update_eflags((cpu.flags & ~0xFFFF) | cpu.pop16()); cpu.handle_irqs(); } }; table32[0x9D] = function(cpu) { { /* popf*/ if((cpu.flags & flag_vm) && cpu.getiopl() < 3) { cpu.trigger_gp(0); } cpu.update_eflags(cpu.pop32s()); cpu.handle_irqs(); } };; table16[0x9E] = table32[0x9E] = function(cpu) { { /* sahf*/ cpu.flags = (cpu.flags & ~0xFF) | cpu.reg8[reg_ah]; cpu.flags = (cpu.flags & flags_mask) | flags_default; cpu.flags_changed = 0; } };; table16[0x9F] = table32[0x9F] = function(cpu) { { /* lahf*/ cpu.load_eflags(); cpu.reg8[reg_ah] = cpu.flags; } };; table16[0xA0] = table32[0xA0] = function(cpu) { { /* mov*/ var data = cpu.safe_read8(cpu.read_moffs()); cpu.reg8[reg_al] = data; } };; @@ -2128,8 +3367,22 @@ table16[0xAC] = table32[0xAC] = function(cpu) { { lodsb(cpu); } };; table16[0xAD] = function(cpu) { { lodsw(cpu); } }; table32[0xAD] = function(cpu) { { lodsd(cpu); } };; table16[0xAE] = table32[0xAE] = function(cpu) { { scasb(cpu); } };; table16[0xAF] = function(cpu) { { scasw(cpu); } }; table32[0xAF] = function(cpu) { { scasd(cpu); } };; -table16[0xB0 | 0] = table32[0xB0 | 0] = function(cpu) { { cpu.reg8[reg_al] = cpu.read_imm8(); } };; table16[0xB0 | 1] = table32[0xB0 | 1] = function(cpu) { { cpu.reg8[reg_cl] = cpu.read_imm8(); } };; table16[0xB0 | 2] = table32[0xB0 | 2] = function(cpu) { { cpu.reg8[reg_dl] = cpu.read_imm8(); } };; table16[0xB0 | 3] = table32[0xB0 | 3] = function(cpu) { { cpu.reg8[reg_bl] = cpu.read_imm8(); } };; table16[0xB0 | 4] = table32[0xB0 | 4] = function(cpu) { { cpu.reg8[reg_ah] = cpu.read_imm8(); } };; table16[0xB0 | 5] = table32[0xB0 | 5] = function(cpu) { { cpu.reg8[reg_ch] = cpu.read_imm8(); } };; table16[0xB0 | 6] = table32[0xB0 | 6] = function(cpu) { { cpu.reg8[reg_dh] = cpu.read_imm8(); } };; table16[0xB0 | 7] = table32[0xB0 | 7] = function(cpu) { { cpu.reg8[reg_bh] = cpu.read_imm8(); } };;; -table16[0xB8 | 0] = function(cpu) { { cpu.reg16[reg_ax] = cpu.read_imm16(); } }; table32[0xB8 | 0] = function(cpu) { { cpu.reg32s[reg_eax] = cpu.read_imm32s(); } };; table16[0xB8 | 1] = function(cpu) { { cpu.reg16[reg_cx] = cpu.read_imm16(); } }; table32[0xB8 | 1] = function(cpu) { { cpu.reg32s[reg_ecx] = cpu.read_imm32s(); } };; table16[0xB8 | 2] = function(cpu) { { cpu.reg16[reg_dx] = cpu.read_imm16(); } }; table32[0xB8 | 2] = function(cpu) { { cpu.reg32s[reg_edx] = cpu.read_imm32s(); } };; table16[0xB8 | 3] = function(cpu) { { cpu.reg16[reg_bx] = cpu.read_imm16(); } }; table32[0xB8 | 3] = function(cpu) { { cpu.reg32s[reg_ebx] = cpu.read_imm32s(); } };; table16[0xB8 | 4] = function(cpu) { { cpu.reg16[reg_sp] = cpu.read_imm16(); } }; table32[0xB8 | 4] = function(cpu) { { cpu.reg32s[reg_esp] = cpu.read_imm32s(); } };; table16[0xB8 | 5] = function(cpu) { { cpu.reg16[reg_bp] = cpu.read_imm16(); } }; table32[0xB8 | 5] = function(cpu) { { cpu.reg32s[reg_ebp] = cpu.read_imm32s(); } };; table16[0xB8 | 6] = function(cpu) { { cpu.reg16[reg_si] = cpu.read_imm16(); } }; table32[0xB8 | 6] = function(cpu) { { cpu.reg32s[reg_esi] = cpu.read_imm32s(); } };; table16[0xB8 | 7] = function(cpu) { { cpu.reg16[reg_di] = cpu.read_imm16(); } }; table32[0xB8 | 7] = function(cpu) { { cpu.reg32s[reg_edi] = cpu.read_imm32s(); } };;; +table16[0xB0] = table32[0xB0] = function(cpu) { { cpu.reg8[reg_al] = cpu.read_imm8(); } }; +table16[0xB1] = table32[0xB1] = function(cpu) { { cpu.reg8[reg_cl] = cpu.read_imm8(); } }; +table16[0xB2] = table32[0xB2] = function(cpu) { { cpu.reg8[reg_dl] = cpu.read_imm8(); } }; +table16[0xB3] = table32[0xB3] = function(cpu) { { cpu.reg8[reg_bl] = cpu.read_imm8(); } }; +table16[0xB4] = table32[0xB4] = function(cpu) { { cpu.reg8[reg_ah] = cpu.read_imm8(); } }; +table16[0xB5] = table32[0xB5] = function(cpu) { { cpu.reg8[reg_ch] = cpu.read_imm8(); } }; +table16[0xB6] = table32[0xB6] = function(cpu) { { cpu.reg8[reg_dh] = cpu.read_imm8(); } }; +table16[0xB7] = table32[0xB7] = function(cpu) { { cpu.reg8[reg_bh] = cpu.read_imm8(); } }; +table16[0xB8] = function(cpu) { { cpu.reg16[reg_ax] = cpu.read_imm16(); } }; table32[0xB8] = function(cpu) { { cpu.reg32s[reg_eax] = cpu.read_imm32s(); } };; +table16[0xB9] = function(cpu) { { cpu.reg16[reg_cx] = cpu.read_imm16(); } }; table32[0xB9] = function(cpu) { { cpu.reg32s[reg_ecx] = cpu.read_imm32s(); } };; +table16[0xBA] = function(cpu) { { cpu.reg16[reg_dx] = cpu.read_imm16(); } }; table32[0xBA] = function(cpu) { { cpu.reg32s[reg_edx] = cpu.read_imm32s(); } };; +table16[0xBB] = function(cpu) { { cpu.reg16[reg_bx] = cpu.read_imm16(); } }; table32[0xBB] = function(cpu) { { cpu.reg32s[reg_ebx] = cpu.read_imm32s(); } };; +table16[0xBC] = function(cpu) { { cpu.reg16[reg_sp] = cpu.read_imm16(); } }; table32[0xBC] = function(cpu) { { cpu.reg32s[reg_esp] = cpu.read_imm32s(); } };; +table16[0xBD] = function(cpu) { { cpu.reg16[reg_bp] = cpu.read_imm16(); } }; table32[0xBD] = function(cpu) { { cpu.reg32s[reg_ebp] = cpu.read_imm32s(); } };; +table16[0xBE] = function(cpu) { { cpu.reg16[reg_si] = cpu.read_imm16(); } }; table32[0xBE] = function(cpu) { { cpu.reg32s[reg_esi] = cpu.read_imm32s(); } };; +table16[0xBF] = function(cpu) { { cpu.reg16[reg_di] = cpu.read_imm16(); } }; table32[0xBF] = function(cpu) { { cpu.reg32s[reg_edi] = cpu.read_imm32s(); } };; table16[0xC0] = table32[0xC0] = function(cpu) { var modrm_byte = cpu.read_imm8(); { var data2; var data; var addr; var result; if(modrm_byte < 0xC0) { addr = cpu.translate_address_write(cpu.modrm_resolve(modrm_byte)); data = cpu.memory.read8(addr); } else { data = cpu.reg8[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1]; } result = 0; data2 = cpu.read_imm8() & 31; switch(modrm_byte >> 3 & 7) { case 0: result = cpu.rol8(data, data2); break; case 1: result = cpu.ror8(data, data2); break; case 2: result = cpu.rcl8(data, data2); break; case 3: result = cpu.rcr8(data, data2); break; case 4: result = cpu.shl8(data, data2); break; case 5: result = cpu.shr8(data, data2); break; case 6: result = cpu.shl8(data, data2); break; case 7: result = cpu.sar8(data, data2); break; }; if(modrm_byte < 0xC0) { cpu.memory.write8(addr, result); } else { cpu.reg8[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1] = result; } } };; table16[0xC1] = function(cpu) { var modrm_byte = cpu.read_imm8(); { var data2; var data; var virt_addr; var phys_addr; var phys_addr_high = 0; var result; if(modrm_byte < 0xC0) { virt_addr = cpu.modrm_resolve(modrm_byte); phys_addr = cpu.translate_address_write(virt_addr); if(cpu.paging && (virt_addr & 0xFFF) === 0xFFF) { phys_addr_high = cpu.translate_address_write(virt_addr + 1); data = cpu.virt_boundary_read16(phys_addr, phys_addr_high); } else { data = cpu.memory.read16(phys_addr); } } else { data = cpu.reg16[modrm_byte << 1 & 14]; } result = 0; data2 = cpu.read_imm8() & 31; switch(modrm_byte >> 3 & 7) { case 0: result = cpu.rol16(data, data2); break; case 1: result = cpu.ror16(data, data2); break; case 2: result = cpu.rcl16(data, data2); break; case 3: result = cpu.rcr16(data, data2); break; case 4: result = cpu.shl16(data, data2); break; case 5: result = cpu.shr16(data, data2); break; case 6: result = cpu.shl16(data, data2); break; case 7: result = cpu.sar16(data, data2); break; }; if(modrm_byte < 0xC0) { if(phys_addr_high) { cpu.virt_boundary_write16(phys_addr, phys_addr_high, result); } else { cpu.memory.write16(phys_addr, result); } } else { cpu.reg16[modrm_byte << 1 & 14] = result; } } }; table32[0xC1] = function(cpu) { var modrm_byte = cpu.read_imm8(); { var data2; var data; var virt_addr; var phys_addr; var phys_addr_high = 0; var result; if(modrm_byte < 0xC0) { virt_addr = cpu.modrm_resolve(modrm_byte); phys_addr = cpu.translate_address_write(virt_addr); if(cpu.paging && (virt_addr & 0xFFF) >= 0xFFD) { phys_addr_high = cpu.translate_address_write(virt_addr + 3); data = cpu.virt_boundary_read32s(phys_addr, phys_addr_high); } else { data = cpu.memory.read32s(phys_addr); } } else { data = cpu.reg32s[modrm_byte & 7]; } result = 0; data2 = cpu.read_imm8() & 31; switch(modrm_byte >> 3 & 7) { case 0: result = cpu.rol32(data, data2); break; case 1: result = cpu.ror32(data, data2); break; case 2: result = cpu.rcl32(data, data2); break; case 3: result = cpu.rcr32(data, data2); break; case 4: result = cpu.shl32(data, data2); break; case 5: result = cpu.shr32(data, data2); break; case 6: result = cpu.shl32(data, data2); break; case 7: result = cpu.sar32(data, data2); break; }; if(modrm_byte < 0xC0) { if(phys_addr_high) { cpu.virt_boundary_write32(phys_addr, phys_addr_high, result); } else { cpu.memory.write32(phys_addr, result); } } else { cpu.reg32s[modrm_byte & 7] = result; } } };; table16[0xC2] = function(cpu) { { /* retn*/ var imm16 = cpu.read_imm16(); cpu.instruction_pointer = cpu.get_seg(reg_cs) + cpu.pop16() | 0; cpu.stack_reg[cpu.reg_vsp] += imm16; cpu.last_instr_jump = true; } }; table32[0xC2] = function(cpu) { { /* retn*/ var imm16 = cpu.read_imm16(); cpu.instruction_pointer = cpu.get_seg(reg_cs) + cpu.pop32s() | 0; cpu.stack_reg[cpu.reg_vsp] += imm16; cpu.last_instr_jump = true; } };; @@ -2179,18 +3432,18 @@ table16[0xEC] = table32[0xEC] = function(cpu) { { var port = cpu.reg16[reg_dx]; table16[0xED] = function(cpu) { { var port = cpu.reg16[reg_dx]; cpu.test_privileges_for_io(port, 2); cpu.reg16[reg_ax] = cpu.io.port_read16(port); } }; table32[0xED] = function(cpu) { { var port = cpu.reg16[reg_dx]; cpu.test_privileges_for_io(port, 4); cpu.reg32s[reg_eax] = cpu.io.port_read32(port); } };; table16[0xEE] = table32[0xEE] = function(cpu) { { var port = cpu.reg16[reg_dx]; cpu.test_privileges_for_io(port, 1); cpu.io.port_write8(port, cpu.reg8[reg_al]); } };; table16[0xEF] = function(cpu) { { var port = cpu.reg16[reg_dx]; cpu.test_privileges_for_io(port, 2); cpu.io.port_write16(port, cpu.reg16[reg_ax]); } }; table32[0xEF] = function(cpu) { { var port = cpu.reg16[reg_dx]; cpu.test_privileges_for_io(port, 4); cpu.io.port_write32(port, cpu.reg32s[reg_eax]); } };; -table16[0xF0] = table32[0xF0] = function(cpu) { { /* lock*/ /* TODO*/ /* This triggers UD when used with*/ /* some instructions that don't write to memory*/ cpu.table[cpu.read_imm8()](cpu); } };; +table16[0xF0] = table32[0xF0] = function(cpu) { { /* lock*/ /* TODO*/ /* This triggers UD when used with*/ /* some instructions that don't write to memory*/ cpu.do_op(); } };; table16[0xF1] = table32[0xF1] = function(cpu) { { /* INT1*/ /* https://code.google.com/p/corkami/wiki/x86oddities#IceBP*/ throw cpu.debug.unimpl("int1 instruction"); } };; -table16[0xF2] = table32[0xF2] = function(cpu) { { /* repnz*/ dbg_assert(cpu.repeat_string_prefix === REPEAT_STRING_PREFIX_NONE); cpu.repeat_string_prefix = REPEAT_STRING_PREFIX_NZ; cpu.table[cpu.read_imm8()](cpu); cpu.repeat_string_prefix = REPEAT_STRING_PREFIX_NONE; } };; -table16[0xF3] = table32[0xF3] = function(cpu) { { /* repz*/ dbg_assert(cpu.repeat_string_prefix === REPEAT_STRING_PREFIX_NONE); cpu.repeat_string_prefix = REPEAT_STRING_PREFIX_Z; cpu.table[cpu.read_imm8()](cpu); cpu.repeat_string_prefix = REPEAT_STRING_PREFIX_NONE; } };; +table16[0xF2] = table32[0xF2] = function(cpu) { { /* repnz*/ dbg_assert(cpu.repeat_string_prefix === REPEAT_STRING_PREFIX_NONE); cpu.repeat_string_prefix = REPEAT_STRING_PREFIX_NZ; cpu.do_op(); cpu.repeat_string_prefix = REPEAT_STRING_PREFIX_NONE; } };; +table16[0xF3] = table32[0xF3] = function(cpu) { { /* repz*/ dbg_assert(cpu.repeat_string_prefix === REPEAT_STRING_PREFIX_NONE); cpu.repeat_string_prefix = REPEAT_STRING_PREFIX_Z; cpu.do_op(); cpu.repeat_string_prefix = REPEAT_STRING_PREFIX_NONE; } };; table16[0xF4] = table32[0xF4] = function(cpu) { { cpu.hlt_op(); } };; table16[0xF5] = table32[0xF5] = function(cpu) { { /* cmc*/ cpu.flags = (cpu.flags | 1) ^ cpu.getcf(); cpu.flags_changed &= ~1; } };; table16[0xF6] = table32[0xF6] = function(cpu) { var modrm_byte = cpu.read_imm8(); { switch(modrm_byte >> 3 & 7) { case 0: { if(modrm_byte < 0xC0) { var data = cpu.safe_read8(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg8[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1]; }; cpu.and(data, cpu.read_imm8(), OPSIZE_8); }; break; case 1: { if(modrm_byte < 0xC0) { var data = cpu.safe_read8(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg8[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1]; }; cpu.and(data, cpu.read_imm8(), OPSIZE_8); }; break; case 2: { var data; var addr; var result; if(modrm_byte < 0xC0) { addr = cpu.translate_address_write(cpu.modrm_resolve(modrm_byte)); data = cpu.memory.read8(addr); } else { data = cpu.reg8[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1]; } result = ~(data); if(modrm_byte < 0xC0) { cpu.memory.write8(addr, result); } else { cpu.reg8[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1] = result; }; }; break; case 3: { var data; var addr; var result; if(modrm_byte < 0xC0) { addr = cpu.translate_address_write(cpu.modrm_resolve(modrm_byte)); data = cpu.memory.read8(addr); } else { data = cpu.reg8[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1]; } result = cpu.neg(data, OPSIZE_8); if(modrm_byte < 0xC0) { cpu.memory.write8(addr, result); } else { cpu.reg8[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1] = result; }; }; break; case 4: { if(modrm_byte < 0xC0) { var data = cpu.safe_read8(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg8[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1]; }; cpu.mul8(data); }; break; case 5: { if(modrm_byte < 0xC0) { var data = (cpu.safe_read8(cpu.modrm_resolve(modrm_byte)) << 24 >> 24); } else { data = cpu.reg8s[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1]; }; cpu.imul8(data); }; break; case 6: { if(modrm_byte < 0xC0) { var data = cpu.safe_read8(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg8[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1]; }; cpu.div8(data); }; break; case 7: { if(modrm_byte < 0xC0) { var data = (cpu.safe_read8(cpu.modrm_resolve(modrm_byte)) << 24 >> 24); } else { data = cpu.reg8s[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1]; }; cpu.idiv8(data); }; break; } } };; table16[0xF7] = function(cpu) { var modrm_byte = cpu.read_imm8(); { switch(modrm_byte >> 3 & 7) { case 0: { if(modrm_byte < 0xC0) { var data = cpu.safe_read16(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg16[modrm_byte << 1 & 14]; }; cpu.and(data, cpu.read_imm16(), OPSIZE_16); }; break; case 1: { if(modrm_byte < 0xC0) { var data = cpu.safe_read16(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg16[modrm_byte << 1 & 14]; }; cpu.and(data, cpu.read_imm16(), OPSIZE_16); }; break; case 2: { var data; var virt_addr; var phys_addr; var phys_addr_high = 0; var result; if(modrm_byte < 0xC0) { virt_addr = cpu.modrm_resolve(modrm_byte); phys_addr = cpu.translate_address_write(virt_addr); if(cpu.paging && (virt_addr & 0xFFF) === 0xFFF) { phys_addr_high = cpu.translate_address_write(virt_addr + 1); data = cpu.virt_boundary_read16(phys_addr, phys_addr_high); } else { data = cpu.memory.read16(phys_addr); } } else { data = cpu.reg16[modrm_byte << 1 & 14]; } result = ~(data); if(modrm_byte < 0xC0) { if(phys_addr_high) { cpu.virt_boundary_write16(phys_addr, phys_addr_high, result); } else { cpu.memory.write16(phys_addr, result); } } else { cpu.reg16[modrm_byte << 1 & 14] = result; }; }; break; case 3: { var data; var virt_addr; var phys_addr; var phys_addr_high = 0; var result; if(modrm_byte < 0xC0) { virt_addr = cpu.modrm_resolve(modrm_byte); phys_addr = cpu.translate_address_write(virt_addr); if(cpu.paging && (virt_addr & 0xFFF) === 0xFFF) { phys_addr_high = cpu.translate_address_write(virt_addr + 1); data = cpu.virt_boundary_read16(phys_addr, phys_addr_high); } else { data = cpu.memory.read16(phys_addr); } } else { data = cpu.reg16[modrm_byte << 1 & 14]; } result = cpu.neg(data, OPSIZE_16); if(modrm_byte < 0xC0) { if(phys_addr_high) { cpu.virt_boundary_write16(phys_addr, phys_addr_high, result); } else { cpu.memory.write16(phys_addr, result); } } else { cpu.reg16[modrm_byte << 1 & 14] = result; }; }; break; case 4: { if(modrm_byte < 0xC0) { var data = cpu.safe_read16(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg16[modrm_byte << 1 & 14]; }; cpu.mul16(data); }; break; case 5: { if(modrm_byte < 0xC0) { var data = (cpu.safe_read16(cpu.modrm_resolve(modrm_byte)) << 16 >> 16); } else { data = cpu.reg16s[modrm_byte << 1 & 14]; }; cpu.imul16(data); }; break; case 6: { if(modrm_byte < 0xC0) { var data = cpu.safe_read16(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg16[modrm_byte << 1 & 14]; }; cpu.div16(data); }; break; case 7: { if(modrm_byte < 0xC0) { var data = (cpu.safe_read16(cpu.modrm_resolve(modrm_byte)) << 16 >> 16); } else { data = cpu.reg16s[modrm_byte << 1 & 14]; }; cpu.idiv16(data); }; break; } } }; table32[0xF7] = function(cpu) { var modrm_byte = cpu.read_imm8(); { switch(modrm_byte >> 3 & 7) { case 0: { if(modrm_byte < 0xC0) { var data = cpu.safe_read32s(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg32s[modrm_byte & 7]; }; cpu.and(data, cpu.read_imm32s(), OPSIZE_32); }; break; case 1: { if(modrm_byte < 0xC0) { var data = cpu.safe_read32s(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg32s[modrm_byte & 7]; }; cpu.and(data, cpu.read_imm32s(), OPSIZE_32); }; break; case 2: { var data; var virt_addr; var phys_addr; var phys_addr_high = 0; var result; if(modrm_byte < 0xC0) { virt_addr = cpu.modrm_resolve(modrm_byte); phys_addr = cpu.translate_address_write(virt_addr); if(cpu.paging && (virt_addr & 0xFFF) >= 0xFFD) { phys_addr_high = cpu.translate_address_write(virt_addr + 3); data = cpu.virt_boundary_read32s(phys_addr, phys_addr_high); } else { data = cpu.memory.read32s(phys_addr); } } else { data = cpu.reg32s[modrm_byte & 7]; } result = ~(data); if(modrm_byte < 0xC0) { if(phys_addr_high) { cpu.virt_boundary_write32(phys_addr, phys_addr_high, result); } else { cpu.memory.write32(phys_addr, result); } } else { cpu.reg32s[modrm_byte & 7] = result; }; }; break; case 3: { var data; var virt_addr; var phys_addr; var phys_addr_high = 0; var result; if(modrm_byte < 0xC0) { virt_addr = cpu.modrm_resolve(modrm_byte); phys_addr = cpu.translate_address_write(virt_addr); if(cpu.paging && (virt_addr & 0xFFF) >= 0xFFD) { phys_addr_high = cpu.translate_address_write(virt_addr + 3); data = cpu.virt_boundary_read32s(phys_addr, phys_addr_high); } else { data = cpu.memory.read32s(phys_addr); } } else { data = cpu.reg32s[modrm_byte & 7]; } result = cpu.neg(data, OPSIZE_32); if(modrm_byte < 0xC0) { if(phys_addr_high) { cpu.virt_boundary_write32(phys_addr, phys_addr_high, result); } else { cpu.memory.write32(phys_addr, result); } } else { cpu.reg32s[modrm_byte & 7] = result; }; }; break; case 4: { if(modrm_byte < 0xC0) { var data = (cpu.safe_read32s(cpu.modrm_resolve(modrm_byte)) >>> 0); } else { data = cpu.reg32[modrm_byte & 7]; }; cpu.mul32(data); }; break; case 5: { if(modrm_byte < 0xC0) { var data = cpu.safe_read32s(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg32s[modrm_byte & 7]; }; cpu.imul32(data); }; break; case 6: { if(modrm_byte < 0xC0) { var data = (cpu.safe_read32s(cpu.modrm_resolve(modrm_byte)) >>> 0); } else { data = cpu.reg32[modrm_byte & 7]; }; cpu.div32(data); }; break; case 7: { if(modrm_byte < 0xC0) { var data = cpu.safe_read32s(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg32s[modrm_byte & 7]; }; cpu.idiv32(data); }; break; } } };; table16[0xF8] = table32[0xF8] = function(cpu) { { /* clc*/ cpu.flags &= ~flag_carry; cpu.flags_changed &= ~1; } };; table16[0xF9] = table32[0xF9] = function(cpu) { { /* stc*/ cpu.flags |= flag_carry; cpu.flags_changed &= ~1; } };; -table16[0xFA] = table32[0xFA] = function(cpu) { { /* cli*/ /*dbg_log("interrupts off");*/ if(!cpu.protected_mode || ((cpu.flags & flag_vm) ? (cpu.flags >> 12 & 3) === 3 : (cpu.flags >> 12 & 3) >= cpu.cpl)) { cpu.flags &= ~flag_interrupt; } else { if((cpu.flags >> 12 & 3) < 3 && ((cpu.flags & flag_vm) ? (cpu.cr4 & CR4_VME) : (cpu.cpl === 3 && (cpu.cr4 & CR4_PVI)))) { cpu.flags &= ~flag_vif; } else { cpu.trigger_gp(0); } } } };; -table16[0xFB] = table32[0xFB] = function(cpu) { { /* sti*/ /*dbg_log("interrupts on");*/ if(!cpu.protected_mode || ((cpu.flags & flag_vm) ? (cpu.flags >> 12 & 3) === 3 : (cpu.flags >> 12 & 3) >= cpu.cpl)) { cpu.flags |= flag_interrupt; /*cpu.table[cpu.read_imm8()](cpu);*/ cpu.cycle(); cpu.handle_irqs(); } else { if((cpu.flags >> 12 & 3) < 3 && (cpu.flags & flag_vip) === 0 && ((cpu.flags & flag_vm) ? (cpu.cr4 & CR4_VME) : (cpu.cpl === 3 && (cpu.cr4 & CR4_PVI)))) { cpu.flags |= flag_vif; } else { cpu.trigger_gp(0); } } } };; +table16[0xFA] = table32[0xFA] = function(cpu) { { /* cli*/ /*dbg_log("interrupts off");*/ if(!cpu.protected_mode || ((cpu.flags & flag_vm) ? cpu.getiopl() === 3 : cpu.getiopl() >= cpu.cpl)) { cpu.flags &= ~flag_interrupt; } else { if(cpu.getiopl() < 3 && ((cpu.flags & flag_vm) ? (cpu.cr4 & CR4_VME) : (cpu.cpl === 3 && (cpu.cr4 & CR4_PVI)))) { cpu.flags &= ~flag_vif; } else { cpu.trigger_gp(0); } } } };; +table16[0xFB] = table32[0xFB] = function(cpu) { { /* sti*/ /*dbg_log("interrupts on");*/ if(!cpu.protected_mode || ((cpu.flags & flag_vm) ? cpu.getiopl() === 3 : cpu.getiopl() >= cpu.cpl)) { cpu.flags |= flag_interrupt; /*cpu.table[cpu.read_imm8()](cpu);*/ cpu.cycle(); cpu.handle_irqs(); } else { if(cpu.getiopl() < 3 && (cpu.flags & flag_vip) === 0 && ((cpu.flags & flag_vm) ? (cpu.cr4 & CR4_VME) : (cpu.cpl === 3 && (cpu.cr4 & CR4_PVI)))) { cpu.flags |= flag_vif; } else { cpu.trigger_gp(0); } } } };; table16[0xFC] = table32[0xFC] = function(cpu) { { /* cld*/ cpu.flags &= ~flag_direction; } };; table16[0xFD] = table32[0xFD] = function(cpu) { { /* std*/ cpu.flags |= flag_direction; } };; table16[0xFE] = table32[0xFE] = function(cpu) { var modrm_byte = cpu.read_imm8(); { var mod = modrm_byte & 56; if(mod === 0) { var data; var addr; var result; if(modrm_byte < 0xC0) { addr = cpu.translate_address_write(cpu.modrm_resolve(modrm_byte)); data = cpu.memory.read8(addr); } else { data = cpu.reg8[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1]; } result = cpu.inc(data, OPSIZE_8); if(modrm_byte < 0xC0) { cpu.memory.write8(addr, result); } else { cpu.reg8[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1] = result; }; } else if(mod === 8) { var data; var addr; var result; if(modrm_byte < 0xC0) { addr = cpu.translate_address_write(cpu.modrm_resolve(modrm_byte)); data = cpu.memory.read8(addr); } else { data = cpu.reg8[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1]; } result = cpu.dec(data, OPSIZE_8); if(modrm_byte < 0xC0) { cpu.memory.write8(addr, result); } else { cpu.reg8[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1] = result; }; } else { if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();; } } };; @@ -2198,19 +3451,18 @@ table16[0xFF] = function(cpu) { var modrm_byte = cpu.read_imm8(); { switch(modrm // 0F ops start here table0F_16[0x00] = table0F_32[0x00] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(!cpu.protected_mode) { /* No GP, UD is correct here*/ cpu.trigger_ud(); } if(cpu.cpl) { cpu.trigger_gp(0); } switch(modrm_byte >> 3 & 7) { case 0: /* sldt*/ if(modrm_byte < 0xC0) var addr = cpu.modrm_resolve(modrm_byte); var data = cpu.sreg[reg_ldtr]; if(modrm_byte < 0xC0) { cpu.safe_write16(addr, data); } else { cpu.reg16[modrm_byte << 1 & 14] = data; }; break; case 1: /* str*/ if(modrm_byte < 0xC0) var addr = cpu.modrm_resolve(modrm_byte); var data = cpu.sreg[reg_tr]; if(modrm_byte < 0xC0) { cpu.safe_write16(addr, data); } else { cpu.reg16[modrm_byte << 1 & 14] = data; }; break; case 2: /* lldt*/ if(modrm_byte < 0xC0) { var data = cpu.safe_read16(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg16[modrm_byte << 1 & 14]; }; cpu.load_ldt(data); break; case 3: /* ltr*/ if(modrm_byte < 0xC0) { var data = cpu.safe_read16(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg16[modrm_byte << 1 & 14]; }; cpu.load_tr(data); break; default: dbg_log(modrm_byte >> 3 & 7, LOG_CPU); if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();; } } };; table0F_16[0x01] = table0F_32[0x01] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(cpu.cpl) { cpu.trigger_gp(0); } var mod = modrm_byte >> 3 & 7; if(mod === 4) { /* smsw*/ if(modrm_byte < 0xC0) var addr = cpu.modrm_resolve(modrm_byte); var data = cpu.cr0; if(modrm_byte < 0xC0) { cpu.safe_write16(addr, data); } else { cpu.reg16[modrm_byte << 1 & 14] = data; }; return; } else if(mod === 6) { /* lmsw*/ if(modrm_byte < 0xC0) { var data = cpu.safe_read16(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg16[modrm_byte << 1 & 14]; }; var old_cr0 = cpu.cr0; cpu.cr0 = (cpu.cr0 & ~0xF) | (data & 0xF); if(cpu.protected_mode) { /* lmsw cannot be used to switch back*/ cpu.cr0 |= CR0_PE; } /*dbg_log("cr0=" + h(data >>> 0), LOG_CPU);*/ cpu.cr0_changed(old_cr0); return; } if(modrm_byte >= 0xC0) { /* only memory*/ cpu.trigger_ud(); dbg_assert(false); } if((mod === 2 || mod === 3) && cpu.protected_mode) { /* override prefix, so cpu.modrm_resolve does not return the segment part*/ /* only lgdt and lidt and only in protected mode*/ cpu.segment_prefix = SEG_PREFIX_ZERO; } var addr = cpu.modrm_resolve(modrm_byte); cpu.segment_prefix = SEG_PREFIX_NONE; switch(mod) { case 0: /* sgdt*/ cpu.writable_or_pagefault(addr, 6); cpu.safe_write16(addr, cpu.gdtr_size); cpu.safe_write32(addr + 2, cpu.gdtr_offset); break; case 1: /* sidt*/ cpu.writable_or_pagefault(addr, 6); cpu.safe_write16(addr, cpu.idtr_size); cpu.safe_write32(addr + 2, cpu.idtr_offset); break; case 2: /* lgdt*/ var size = cpu.safe_read16(addr); var offset = cpu.safe_read32s(addr + 2); cpu.gdtr_size = size; cpu.gdtr_offset = offset; if(!cpu.operand_size_32) { cpu.gdtr_offset &= 0xFFFFFF; } /*dbg_log("gdt at " + h(cpu.gdtr_offset) + ", " + cpu.gdtr_size + " bytes", LOG_CPU);*/ /*dump_gdt_ldt();*/ break; case 3: /* lidt*/ var size = cpu.safe_read16(addr); var offset = cpu.safe_read32s(addr + 2); cpu.idtr_size = size; cpu.idtr_offset = offset; if(!cpu.operand_size_32) { cpu.idtr_offset &= 0xFFFFFF; } /*dbg_log("[" + h(cpu.instruction_pointer) + "] idt at " + */ /* h(idtr_offset) + ", " + cpu.idtr_size + " bytes " + h(addr), LOG_CPU);*/ break; case 7: /* flush translation lookaside buffer*/ cpu.invlpg(addr); break; default: dbg_log(mod); if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();; } } };; -table0F_16[0x02] = table0F_32[0x02] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();; /* lar*/ } };; -table0F_16[0x03] = table0F_32[0x03] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();; /* lsl*/ } };; +table0F_16[0x02] = table0F_32[0x02] = function(cpu) { var modrm_byte = cpu.read_imm8(); { /* lar*/ if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();; } };; +table0F_16[0x03] = table0F_32[0x03] = function(cpu) { var modrm_byte = cpu.read_imm8(); { /* lsl*/ if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();; } };; table0F_16[0x04] = table0F_32[0x04] = function(cpu) { { if(DEBUG) throw "Possible fault: undefined instruction"; cpu.trigger_ud();} };; table0F_16[0x05] = table0F_32[0x05] = function(cpu) { { if(DEBUG) throw "Possible fault: undefined instruction"; cpu.trigger_ud();} };; table0F_16[0x06] = table0F_32[0x06] = function(cpu) { { /* clts*/ if(cpu.cpl) { cpu.trigger_gp(0); } else { /*dbg_log("clts", LOG_CPU);*/ cpu.cr0 &= ~CR0_TS; /* do something here ?*/ } } };; table0F_16[0x07] = table0F_32[0x07] = function(cpu) { { if(DEBUG) throw "Possible fault: undefined instruction"; cpu.trigger_ud();} };; -// invd -table0F_16[0x08] = table0F_32[0x08] = function(cpu) { { if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();;} };; +table0F_16[0x08] = table0F_32[0x08] = function(cpu) { { /* invd*/ if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();; } }; table0F_16[0x09] = table0F_32[0x09] = function(cpu) { { if(cpu.cpl) { cpu.trigger_gp(0); } /* wbinvd*/ } };; table0F_16[0x0A] = table0F_32[0x0A] = function(cpu) { { if(DEBUG) throw "Possible fault: undefined instruction"; cpu.trigger_ud();} };; table0F_16[0x0B] = table0F_32[0x0B] = function(cpu) { { /* UD2*/ cpu.trigger_ud(); } };; table0F_16[0x0C] = table0F_32[0x0C] = function(cpu) { { if(DEBUG) throw "Possible fault: undefined instruction"; cpu.trigger_ud();} };; -table0F_16[0x0D] = table0F_32[0x0D] = function(cpu) { { if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();;} };; +table0F_16[0x0D] = table0F_32[0x0D] = function(cpu) { { /* nop*/ if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();; } }; table0F_16[0x0E] = table0F_32[0x0E] = function(cpu) { { if(DEBUG) throw "Possible fault: undefined instruction"; cpu.trigger_ud();} };; table0F_16[0x0F] = table0F_32[0x0F] = function(cpu) { { if(DEBUG) throw "Possible fault: undefined instruction"; cpu.trigger_ud();} };; table0F_16[0x10] = table0F_32[0x10] = function(cpu) { { dbg_log("No SSE", LOG_CPU); cpu.trigger_ud();} };; @@ -2249,13 +3501,11 @@ table0F_16[0x2F] = table0F_32[0x2F] = function(cpu) { { dbg_log("No SSE", LOG_CP table0F_16[0x30] = table0F_32[0x30] = function(cpu) { { /* wrmsr - write maschine specific register*/ if(cpu.cpl) { cpu.trigger_gp(0); } var index = cpu.reg32s[reg_ecx]; var low = cpu.reg32s[reg_eax]; var high = cpu.reg32s[reg_edx]; dbg_log("wrmsr ecx=" + h(index >>> 0, 8) + " data=" + h(high >>> 0, 8) + ":" + h(low >>> 0, 8), LOG_CPU); switch(index) { case IA32_SYSENTER_CS: cpu.sysenter_cs = low & 0xFFFF; break; case IA32_SYSENTER_EIP: cpu.sysenter_eip = low; break; case IA32_SYSENTER_ESP: cpu.sysenter_esp = low; break; } } };; table0F_16[0x31] = table0F_32[0x31] = function(cpu) { { /* rdtsc - read timestamp counter*/ if(!cpu.cpl || !(cpu.cr4 & CR4_TSD)) { var n = cpu.microtick() - cpu.tsc_offset; cpu.reg32s[reg_eax] = n * TSC_RATE; cpu.reg32s[reg_edx] = n * (TSC_RATE / 0x100000000); /*dbg_log("rtdsc edx:eax=" + h(cpu.reg32[reg_edx], 8) + ":" + h(cpu.reg32[reg_eax], 8), LOG_CPU);*/ } else { cpu.trigger_gp(0); } } };; table0F_16[0x32] = table0F_32[0x32] = function(cpu) { { /* rdmsr - read maschine specific register*/ if(cpu.cpl) { cpu.trigger_gp(0); } var index = cpu.reg32s[reg_ecx]; dbg_log("rdmsr ecx=" + h(index >>> 0, 8), LOG_CPU); var low = 0; var high = 0; switch(index) { case IA32_SYSENTER_CS: low = cpu.sysenter_cs; break; case IA32_SYSENTER_EIP: low = cpu.sysenter_eip; break; case IA32_SYSENTER_ESP: low = cpu.sysenter_esp; break; } cpu.reg32s[reg_eax] = low; cpu.reg32s[reg_edx] = high; } };; -// rdpmc -table0F_16[0x33] = table0F_32[0x33] = function(cpu) { { if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();;} };; +table0F_16[0x33] = table0F_32[0x33] = function(cpu) { { /* rdpmc*/ if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();; } }; table0F_16[0x34] = table0F_32[0x34] = function(cpu) { { /* sysenter*/ var seg = cpu.sysenter_cs & 0xFFFC; if(!cpu.protected_mode || seg === 0) { cpu.trigger_gp(0); } /*dbg_log("sysenter cs:eip=" + h(seg , 4) + ":" + h(cpu.sysenter_eip >>> 0, 8) + */ /* " ss:esp=" + h(seg + 8, 4) + ":" + h(cpu.sysenter_esp >>> 0, 8), LOG_CPU);*/ cpu.flags &= ~flag_vm & ~flag_interrupt; cpu.instruction_pointer = cpu.sysenter_eip; cpu.reg32s[reg_esp] = cpu.sysenter_esp; cpu.sreg[reg_cs] = seg; cpu.segment_is_null[reg_cs] = 0; cpu.segment_limits[reg_cs] = -1; cpu.segment_offsets[reg_cs] = 0; if(!cpu.is_32) cpu.update_cs_size(true); cpu.cpl = 0; cpu.cpl_changed(); cpu.sreg[reg_ss] = seg + 8; cpu.segment_is_null[reg_ss] = 0; cpu.segment_limits[reg_ss] = -1; cpu.segment_offsets[reg_ss] = 0; cpu.stack_size_32 = true; cpu.stack_reg = cpu.reg32s; cpu.reg_vsp = reg_esp; cpu.reg_vbp = reg_ebp; } };; table0F_16[0x35] = table0F_32[0x35] = function(cpu) { { /* sysexit*/ var seg = cpu.sysenter_cs & 0xFFFC; if(!cpu.protected_mode || cpu.cpl || seg === 0) { cpu.trigger_gp(0); } /*dbg_log("sysexit cs:eip=" + h(seg + 16, 4) + ":" + h(cpu.reg32s[reg_edx] >>> 0, 8) + */ /* " ss:esp=" + h(seg + 24, 4) + ":" + h(cpu.reg32s[reg_ecx] >>> 0, 8), LOG_CPU);*/ cpu.instruction_pointer = cpu.reg32s[reg_edx]; cpu.reg32s[reg_esp] = cpu.reg32s[reg_ecx]; cpu.sreg[reg_cs] = seg + 16 | 3; cpu.segment_is_null[reg_cs] = 0; cpu.segment_limits[reg_cs] = -1; cpu.segment_offsets[reg_cs] = 0; if(!cpu.is_32) cpu.update_cs_size(true); cpu.cpl = 3; cpu.cpl_changed(); cpu.sreg[reg_ss] = seg + 24 | 3; cpu.segment_is_null[reg_ss] = 0; cpu.segment_limits[reg_ss] = -1; cpu.segment_offsets[reg_ss] = 0; cpu.stack_size_32 = true; cpu.stack_reg = cpu.reg32s; cpu.reg_vsp = reg_esp; cpu.reg_vbp = reg_ebp; } };; table0F_16[0x36] = table0F_32[0x36] = function(cpu) { { if(DEBUG) throw "Possible fault: undefined instruction"; cpu.trigger_ud();} };; -// getsec -table0F_16[0x37] = table0F_32[0x37] = function(cpu) { { if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();;} };; +table0F_16[0x37] = table0F_32[0x37] = function(cpu) { { /* getsec*/ if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();; } }; table0F_16[0x38] = table0F_32[0x38] = function(cpu) { { dbg_log("No SSE", LOG_CPU); cpu.trigger_ud();} };; table0F_16[0x39] = table0F_32[0x39] = function(cpu) { { dbg_log("No SSE", LOG_CPU); cpu.trigger_ud();} };; table0F_16[0x3A] = table0F_32[0x3A] = function(cpu) { { dbg_log("No SSE", LOG_CPU); cpu.trigger_ud();} };; @@ -2326,12 +3576,11 @@ table0F_16[0xA6] = table0F_32[0xA6] = function(cpu) { { if(DEBUG) throw "Possibl table0F_16[0xA7] = table0F_32[0xA7] = function(cpu) { { if(DEBUG) throw "Possible fault: undefined instruction"; cpu.trigger_ud();} };; table0F_16[0xA8] = function(cpu) { { cpu.push16(cpu.sreg[reg_gs]); } }; table0F_32[0xA8] = function(cpu) { { cpu.push32(cpu.sreg[reg_gs]); } };; table0F_16[0xA9] = function(cpu) { { cpu.switch_seg(reg_gs, cpu.safe_read16(cpu.get_stack_pointer(0))); cpu.stack_reg[cpu.reg_vsp] += 2; } }; table0F_32[0xA9] = function(cpu) { { cpu.switch_seg(reg_gs, cpu.safe_read16(cpu.get_stack_pointer(0))); cpu.stack_reg[cpu.reg_vsp] += 4; } };;; -// rsm -table0F_16[0xAA] = table0F_32[0xAA] = function(cpu) { { if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();;} };; +table0F_16[0xAA] = table0F_32[0xAA] = function(cpu) { { /* rsm*/ if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();; } }; table0F_16[0xAB] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(modrm_byte < 0xC0) { cpu.bts_mem(cpu.modrm_resolve(modrm_byte), cpu.reg16s[modrm_byte >> 2 & 14]); } else { cpu.reg16[modrm_byte << 1 & 14] = cpu.bts_reg(cpu.reg16[modrm_byte << 1 & 14], cpu.reg16s[modrm_byte >> 2 & 14] & 15); }; } }; table0F_32[0xAB] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(modrm_byte < 0xC0) { cpu.bts_mem(cpu.modrm_resolve(modrm_byte), cpu.reg32s[modrm_byte >> 3 & 7]); } else { cpu.reg32s[modrm_byte & 7] = cpu.bts_reg(cpu.reg32s[modrm_byte & 7], cpu.reg32s[modrm_byte >> 3 & 7] & 31); }; } };; table0F_16[0xAC] = function(cpu) { var modrm_byte = cpu.read_imm8(); { var data; var virt_addr; var phys_addr; var phys_addr_high = 0; var result; if(modrm_byte < 0xC0) { virt_addr = cpu.modrm_resolve(modrm_byte); phys_addr = cpu.translate_address_write(virt_addr); if(cpu.paging && (virt_addr & 0xFFF) === 0xFFF) { phys_addr_high = cpu.translate_address_write(virt_addr + 1); data = cpu.virt_boundary_read16(phys_addr, phys_addr_high); } else { data = cpu.memory.read16(phys_addr); } } else { data = cpu.reg16[modrm_byte << 1 & 14]; } result = cpu.shrd16(data, cpu.reg16[modrm_byte >> 2 & 14], cpu.read_imm8() & 31); if(modrm_byte < 0xC0) { if(phys_addr_high) { cpu.virt_boundary_write16(phys_addr, phys_addr_high, result); } else { cpu.memory.write16(phys_addr, result); } } else { cpu.reg16[modrm_byte << 1 & 14] = result; }; } }; table0F_32[0xAC] = function(cpu) { var modrm_byte = cpu.read_imm8(); { var data; var virt_addr; var phys_addr; var phys_addr_high = 0; var result; if(modrm_byte < 0xC0) { virt_addr = cpu.modrm_resolve(modrm_byte); phys_addr = cpu.translate_address_write(virt_addr); if(cpu.paging && (virt_addr & 0xFFF) >= 0xFFD) { phys_addr_high = cpu.translate_address_write(virt_addr + 3); data = cpu.virt_boundary_read32s(phys_addr, phys_addr_high); } else { data = cpu.memory.read32s(phys_addr); } } else { data = cpu.reg32s[modrm_byte & 7]; } result = cpu.shrd32(data, cpu.reg32s[modrm_byte >> 3 & 7], cpu.read_imm8() & 31); if(modrm_byte < 0xC0) { if(phys_addr_high) { cpu.virt_boundary_write32(phys_addr, phys_addr_high, result); } else { cpu.memory.write32(phys_addr, result); } } else { cpu.reg32s[modrm_byte & 7] = result; }; } };; table0F_16[0xAD] = function(cpu) { var modrm_byte = cpu.read_imm8(); { var data; var virt_addr; var phys_addr; var phys_addr_high = 0; var result; if(modrm_byte < 0xC0) { virt_addr = cpu.modrm_resolve(modrm_byte); phys_addr = cpu.translate_address_write(virt_addr); if(cpu.paging && (virt_addr & 0xFFF) === 0xFFF) { phys_addr_high = cpu.translate_address_write(virt_addr + 1); data = cpu.virt_boundary_read16(phys_addr, phys_addr_high); } else { data = cpu.memory.read16(phys_addr); } } else { data = cpu.reg16[modrm_byte << 1 & 14]; } result = cpu.shrd16(data, cpu.reg16[modrm_byte >> 2 & 14], cpu.reg8[reg_cl] & 31); if(modrm_byte < 0xC0) { if(phys_addr_high) { cpu.virt_boundary_write16(phys_addr, phys_addr_high, result); } else { cpu.memory.write16(phys_addr, result); } } else { cpu.reg16[modrm_byte << 1 & 14] = result; }; } }; table0F_32[0xAD] = function(cpu) { var modrm_byte = cpu.read_imm8(); { var data; var virt_addr; var phys_addr; var phys_addr_high = 0; var result; if(modrm_byte < 0xC0) { virt_addr = cpu.modrm_resolve(modrm_byte); phys_addr = cpu.translate_address_write(virt_addr); if(cpu.paging && (virt_addr & 0xFFF) >= 0xFFD) { phys_addr_high = cpu.translate_address_write(virt_addr + 3); data = cpu.virt_boundary_read32s(phys_addr, phys_addr_high); } else { data = cpu.memory.read32s(phys_addr); } } else { data = cpu.reg32s[modrm_byte & 7]; } result = cpu.shrd32(data, cpu.reg32s[modrm_byte >> 3 & 7], cpu.reg8[reg_cl] & 31); if(modrm_byte < 0xC0) { if(phys_addr_high) { cpu.virt_boundary_write32(phys_addr, phys_addr_high, result); } else { cpu.memory.write32(phys_addr, result); } } else { cpu.reg32s[modrm_byte & 7] = result; }; } };; -table0F_16[0xAE] = table0F_32[0xAE] = function(cpu) { { if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();;} };; +table0F_16[0xAE] = table0F_32[0xAE] = function(cpu) { { /* fxsave, fxrstor, ldmxcsr ...*/ if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();; } }; table0F_16[0xAF] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(modrm_byte < 0xC0) { var data = (cpu.safe_read16(cpu.modrm_resolve(modrm_byte)) << 16 >> 16); } else { data = cpu.reg16s[modrm_byte << 1 & 14]; }; cpu.reg16[modrm_byte >> 2 & 14] = cpu.imul_reg16(cpu.reg16s[modrm_byte >> 2 & 14], data); } }; table0F_32[0xAF] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(modrm_byte < 0xC0) { var data = cpu.safe_read32s(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg32s[modrm_byte & 7]; }; cpu.reg32s[modrm_byte >> 3 & 7] = cpu.imul_reg32(cpu.reg32s[modrm_byte >> 3 & 7], data); } };; table0F_16[0xB0] = table0F_32[0xB0] = function(cpu) { var modrm_byte = cpu.read_imm8(); { /* cmpxchg8*/ if(modrm_byte < 0xC0) { var virt_addr = cpu.modrm_resolve(modrm_byte); cpu.writable_or_pagefault(virt_addr, 1); var data = cpu.safe_read8(virt_addr); } else data = cpu.reg8[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1]; cpu.sub(data, cpu.reg8[reg_al], OPSIZE_8); if(cpu.getzf()) { if(modrm_byte < 0xC0) cpu.safe_write8(virt_addr, cpu.reg8[modrm_byte >> 1 & 0xC | modrm_byte >> 5 & 1]); else cpu.reg8[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1] = cpu.reg8[modrm_byte >> 1 & 0xC | modrm_byte >> 5 & 1]; } else { cpu.reg8[reg_al] = data; } } };; table0F_16[0xB1] = function(cpu) { var modrm_byte = cpu.read_imm8(); { /* cmpxchg16/32*/ if(modrm_byte < 0xC0) { var virt_addr = cpu.modrm_resolve(modrm_byte); cpu.writable_or_pagefault(virt_addr, 2); var data = cpu.safe_read16(virt_addr); } else data = cpu.reg16[modrm_byte << 1 & 14]; cpu.sub(data, cpu.reg16[reg_ax], OPSIZE_16); if(cpu.getzf()) { if(modrm_byte < 0xC0) cpu.safe_write16(virt_addr, cpu.reg16[modrm_byte >> 2 & 14]); else cpu.reg16[modrm_byte << 1 & 14] = cpu.reg16[modrm_byte >> 2 & 14]; } else { cpu.reg16[reg_ax] = data; } } }; table0F_32[0xB1] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(modrm_byte < 0xC0) { var virt_addr = cpu.modrm_resolve(modrm_byte); cpu.writable_or_pagefault(virt_addr, 4); var data = cpu.safe_read32s(virt_addr); } else { data = cpu.reg32s[modrm_byte & 7]; } cpu.sub(data, cpu.reg32s[reg_eax], OPSIZE_32); if(cpu.getzf()) { if(modrm_byte < 0xC0) cpu.safe_write32(virt_addr, cpu.reg32s[modrm_byte >> 3 & 7]); else cpu.reg32s[modrm_byte & 7] = cpu.reg32s[modrm_byte >> 3 & 7]; } else { cpu.reg32s[reg_eax] = data; } } };; @@ -2344,8 +3593,7 @@ table0F_16[0xB5] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(modrm_ table0F_16[0xB6] = function(cpu) { var modrm_byte = cpu.read_imm8(); { /* movzx*/ if(modrm_byte < 0xC0) { var data = cpu.safe_read8(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg8[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1]; }; cpu.reg16[modrm_byte >> 2 & 14] = data; } }; table0F_32[0xB6] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(modrm_byte < 0xC0) { var data = cpu.safe_read8(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg8[modrm_byte << 2 & 0xC | modrm_byte >> 2 & 1]; }; cpu.reg32s[modrm_byte >> 3 & 7] = data; } };; table0F_16[0xB7] = table0F_32[0xB7] = function(cpu) { var modrm_byte = cpu.read_imm8(); { /* movzx*/ if(modrm_byte < 0xC0) { var data = cpu.safe_read16(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg16[modrm_byte << 1 & 14]; }; cpu.reg32s[modrm_byte >> 3 & 7] = data; } };; table0F_16[0xB8] = function(cpu) { var modrm_byte = cpu.read_imm8(); { /* popcnt*/ if(modrm_byte < 0xC0) { var data = cpu.safe_read16(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg16[modrm_byte << 1 & 14]; }; cpu.reg16[modrm_byte >> 2 & 14] = cpu.popcnt(data); } }; table0F_32[0xB8] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(modrm_byte < 0xC0) { var data = cpu.safe_read32s(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg32s[modrm_byte & 7]; }; cpu.reg32s[modrm_byte >> 3 & 7] = cpu.popcnt(data); } };; -// UD -table0F_16[0xB9] = table0F_32[0xB9] = function(cpu) { { if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();;} };; +table0F_16[0xB9] = table0F_32[0xB9] = function(cpu) { { /* UD*/ if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();; } }; table0F_16[0xBA] = function(cpu) { var modrm_byte = cpu.read_imm8(); { /*dbg_log("BA " + mod + " " + imm8);*/ switch(modrm_byte >> 3 & 7) { case 4: if(modrm_byte < 0xC0) { cpu.bt_mem(cpu.modrm_resolve(modrm_byte), cpu.read_imm8() & 15); } else { cpu.bt_reg(cpu.reg16[modrm_byte << 1 & 14], cpu.read_imm8() & 15); } break; case 5: if(modrm_byte < 0xC0) { cpu.bts_mem(cpu.modrm_resolve(modrm_byte), cpu.read_imm8()); } else { cpu.reg16[modrm_byte << 1 & 14] = cpu.bts_reg(cpu.reg16[modrm_byte << 1 & 14], cpu.read_imm8() & 15); }; break; case 6: if(modrm_byte < 0xC0) { cpu.btr_mem(cpu.modrm_resolve(modrm_byte), cpu.read_imm8()); } else { cpu.reg16[modrm_byte << 1 & 14] = cpu.btr_reg(cpu.reg16[modrm_byte << 1 & 14], cpu.read_imm8() & 15); }; break; case 7: if(modrm_byte < 0xC0) { cpu.btc_mem(cpu.modrm_resolve(modrm_byte), cpu.read_imm8()); } else { cpu.reg16[modrm_byte << 1 & 14] = cpu.btc_reg(cpu.reg16[modrm_byte << 1 & 14], cpu.read_imm8() & 15); }; break; default: dbg_log(modrm_byte >> 3 & 7); if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();; } } }; table0F_32[0xBA] = function(cpu) { var modrm_byte = cpu.read_imm8(); { /*dbg_log("BA " + mod + " " + imm8);*/ switch(modrm_byte >> 3 & 7) { case 4: if(modrm_byte < 0xC0) { cpu.bt_mem(cpu.modrm_resolve(modrm_byte), cpu.read_imm8() & 31); } else { cpu.bt_reg(cpu.reg32s[modrm_byte & 7], cpu.read_imm8() & 31); } break; case 5: if(modrm_byte < 0xC0) { cpu.bts_mem(cpu.modrm_resolve(modrm_byte), cpu.read_imm8()); } else { cpu.reg32s[modrm_byte & 7] = cpu.bts_reg(cpu.reg32s[modrm_byte & 7], cpu.read_imm8() & 31); }; break; case 6: if(modrm_byte < 0xC0) { cpu.btr_mem(cpu.modrm_resolve(modrm_byte), cpu.read_imm8()); } else { cpu.reg32s[modrm_byte & 7] = cpu.btr_reg(cpu.reg32s[modrm_byte & 7], cpu.read_imm8() & 31); }; break; case 7: if(modrm_byte < 0xC0) { cpu.btc_mem(cpu.modrm_resolve(modrm_byte), cpu.read_imm8()); } else { cpu.reg32s[modrm_byte & 7] = cpu.btc_reg(cpu.reg32s[modrm_byte & 7], cpu.read_imm8() & 31); }; break; default: dbg_log(modrm_byte >> 3 & 7); if(DEBUG) { dbg_trace(); throw "TODO"; } cpu.trigger_ud();; } } };; table0F_16[0xBB] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(modrm_byte < 0xC0) { cpu.btc_mem(cpu.modrm_resolve(modrm_byte), cpu.reg16s[modrm_byte >> 2 & 14]); } else { cpu.reg16[modrm_byte << 1 & 14] = cpu.btc_reg(cpu.reg16[modrm_byte << 1 & 14], cpu.reg16s[modrm_byte >> 2 & 14] & 15); }; } }; table0F_32[0xBB] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(modrm_byte < 0xC0) { cpu.btc_mem(cpu.modrm_resolve(modrm_byte), cpu.reg32s[modrm_byte >> 3 & 7]); } else { cpu.reg32s[modrm_byte & 7] = cpu.btc_reg(cpu.reg32s[modrm_byte & 7], cpu.reg32s[modrm_byte >> 3 & 7] & 31); }; } };; table0F_16[0xBC] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(modrm_byte < 0xC0) { var data = cpu.safe_read16(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg16[modrm_byte << 1 & 14]; }; cpu.reg16[modrm_byte >> 2 & 14] = cpu.bsf16(cpu.reg16[modrm_byte >> 2 & 14], data); } }; table0F_32[0xBC] = function(cpu) { var modrm_byte = cpu.read_imm8(); { if(modrm_byte < 0xC0) { var data = cpu.safe_read32s(cpu.modrm_resolve(modrm_byte)); } else { data = cpu.reg32s[modrm_byte & 7]; }; cpu.reg32s[modrm_byte >> 3 & 7] = cpu.bsf32(cpu.reg32s[modrm_byte >> 3 & 7], data); } };; @@ -2360,7 +3608,14 @@ table0F_16[0xC4] = table0F_32[0xC4] = function(cpu) { { dbg_log("No SSE", LOG_CP table0F_16[0xC5] = table0F_32[0xC5] = function(cpu) { { dbg_log("No SSE", LOG_CPU); cpu.trigger_ud();} };; table0F_16[0xC6] = table0F_32[0xC6] = function(cpu) { { dbg_log("No SSE", LOG_CPU); cpu.trigger_ud();} };; table0F_16[0xC7] = table0F_32[0xC7] = function(cpu) { var modrm_byte = cpu.read_imm8(); { /* cmpxchg8b*/ if(modrm_byte >= 0xC0) { cpu.trigger_ud(); } var addr = cpu.modrm_resolve(modrm_byte); cpu.writable_or_pagefault(addr, 8); var m64_low = cpu.safe_read32s(addr); var m64_high = cpu.safe_read32s(addr + 4); if(cpu.reg32s[reg_eax] === m64_low && cpu.reg32s[reg_edx] === m64_high) { cpu.flags |= flag_zero; cpu.safe_write32(addr, cpu.reg32s[reg_ebx]); cpu.safe_write32(addr + 4, cpu.reg32s[reg_ecx]); } else { cpu.flags &= ~flag_zero; cpu.reg32s[reg_eax] = m64_low; cpu.reg32s[reg_edx] = m64_high; } cpu.flags_changed &= ~flag_zero; } };; -table0F_16[0xC8 | 0] = table0F_32[0xC8 | 0] = function(cpu) { { cpu.bswap(reg_eax); } };; table0F_16[0xC8 | 1] = table0F_32[0xC8 | 1] = function(cpu) { { cpu.bswap(reg_ecx); } };; table0F_16[0xC8 | 2] = table0F_32[0xC8 | 2] = function(cpu) { { cpu.bswap(reg_edx); } };; table0F_16[0xC8 | 3] = table0F_32[0xC8 | 3] = function(cpu) { { cpu.bswap(reg_ebx); } };; table0F_16[0xC8 | 4] = table0F_32[0xC8 | 4] = function(cpu) { { cpu.bswap(reg_esp); } };; table0F_16[0xC8 | 5] = table0F_32[0xC8 | 5] = function(cpu) { { cpu.bswap(reg_ebp); } };; table0F_16[0xC8 | 6] = table0F_32[0xC8 | 6] = function(cpu) { { cpu.bswap(reg_esi); } };; table0F_16[0xC8 | 7] = table0F_32[0xC8 | 7] = function(cpu) { { cpu.bswap(reg_edi); } };; +table0F_16[0xC8] = table0F_32[0xC8] = function(cpu) { { cpu.bswap(reg_eax); } };; +table0F_16[0xC9] = table0F_32[0xC9] = function(cpu) { { cpu.bswap(reg_ecx); } };; +table0F_16[0xCA] = table0F_32[0xCA] = function(cpu) { { cpu.bswap(reg_edx); } };; +table0F_16[0xCB] = table0F_32[0xCB] = function(cpu) { { cpu.bswap(reg_ebx); } };; +table0F_16[0xCC] = table0F_32[0xCC] = function(cpu) { { cpu.bswap(reg_esp); } };; +table0F_16[0xCD] = table0F_32[0xCD] = function(cpu) { { cpu.bswap(reg_ebp); } };; +table0F_16[0xCE] = table0F_32[0xCE] = function(cpu) { { cpu.bswap(reg_esi); } };; +table0F_16[0xCF] = table0F_32[0xCF] = function(cpu) { { cpu.bswap(reg_edi); } };; table0F_16[0xD0] = table0F_32[0xD0] = function(cpu) { { dbg_log("No SSE", LOG_CPU); cpu.trigger_ud();} };; table0F_16[0xD1] = table0F_32[0xD1] = function(cpu) { { dbg_log("No SSE", LOG_CPU); cpu.trigger_ud();} };; table0F_16[0xD2] = table0F_32[0xD2] = function(cpu) { { dbg_log("No SSE", LOG_CPU); cpu.trigger_ud();} };; @@ -3138,6 +4393,10 @@ v86.prototype.init = function(settings) { this.devices.net = new Ne2k(this, settings.network_adapter); } + if(settings.fs9p) + { + this.devices.virtio = new VirtIO(this, settings.fs9p); + } } if(DEBUG) { @@ -3204,7 +4463,10 @@ v86.prototype.cycle = function() this.timestamp_counter++; this.previous_ip = this.instruction_pointer; var opcode = this.read_imm8(); - if(DEBUG) { this.debug.logop(this.instruction_pointer - 1 >>> 0, opcode); }; + if(DEBUG) + { + this.debug.logop(this.instruction_pointer - 1 >>> 0, opcode); + } // call the instruction this.table[opcode](this); if(this.flags & flag_trap) @@ -3213,6 +4475,10 @@ v86.prototype.cycle = function() dbg_log("Trap flag: Ignored", LOG_CPU); } }; +v86.prototype.do_op = function() +{ + this.table[this.read_imm8()](this) +}; v86.prototype.hlt_loop = function() { //dbg_log("In HLT loop", LOG_CPU); @@ -3464,6 +4730,14 @@ v86.prototype.read_moffs = function() return this.get_seg_prefix(reg_ds) + this.read_imm16() | 0; } }; +v86.prototype.getiopl = function() +{ + return this.flags >> 12 & 3; +}; +v86.prototype.vm86_mode = function() +{ + return !!(this.flags & flag_vm); +}; v86.prototype.get_eflags = function() { return (this.flags & ~flags_all) | !!this.getcf() | !!this.getpf() << 2 | !!this.getaf() << 4 | @@ -3484,7 +4758,7 @@ v86.prototype.update_eflags = function(new_flags) if(this.flags & flag_vm) { // other case needs to be handled in popf or iret - dbg_assert((this.flags >> 12 & 3) === 3); + dbg_assert(this.getiopl() === 3); mask |= flag_iopl; // vip and vif are preserved clear |= flag_vip | flag_vif; @@ -3497,7 +4771,7 @@ v86.prototype.update_eflags = function(new_flags) // cpl > 0 // cannot update iopl mask |= flag_iopl; - if(this.cpl > (this.flags >> 12 & 3)) + if(this.cpl > this.getiopl()) { // cpl > iopl // can update interrupt flag but not iopl @@ -3577,11 +4851,11 @@ v86.prototype.call_interrupt_vector = function(interrupt_nr, is_software_int, er this.in_hlt = false; if(this.protected_mode) { - if((!!(this.flags & flag_vm)) && (this.cr4 & CR4_VME)) + if(this.vm86_mode() && (this.cr4 & CR4_VME)) { throw this.debug.unimpl("VME"); } - if((!!(this.flags & flag_vm)) && is_software_int && (this.flags >> 12 & 3) < 3) + if(this.vm86_mode() && is_software_int && this.getiopl() < 3) { this.trigger_gp(0); } @@ -3796,7 +5070,7 @@ v86.prototype.call_interrupt_vector = function(interrupt_nr, is_software_int, er }; v86.prototype.iret16 = function() { - if(!this.protected_mode || ((!!(this.flags & flag_vm)) && (this.flags >> 12 & 3) === 3)) + if(!this.protected_mode || (this.vm86_mode() && this.getiopl() === 3)) { var ip = this.pop16(); this.switch_seg(reg_cs, this.pop16()); @@ -3807,7 +5081,7 @@ v86.prototype.iret16 = function() } else { - if((!!(this.flags & flag_vm))) + if(this.vm86_mode()) { // vm86 mode, iopl != 3 this.trigger_gp(0); @@ -3818,9 +5092,9 @@ v86.prototype.iret16 = function() }; v86.prototype.iret32 = function() { - if(!this.protected_mode || ((!!(this.flags & flag_vm)) && (this.flags >> 12 & 3) === 3)) + if(!this.protected_mode || (this.vm86_mode() && this.getiopl() === 3)) { - if((!!(this.flags & flag_vm))) dbg_log("iret in vm86 mode iopl=3", LOG_CPU); + if(this.vm86_mode()) dbg_log("iret in vm86 mode iopl=3", LOG_CPU); var ip = this.pop32s(); this.switch_seg(reg_cs, this.pop32s() & 0xFFFF); var new_flags = this.pop32s(); @@ -3829,14 +5103,14 @@ v86.prototype.iret32 = function() this.handle_irqs(); return; } - if((!!(this.flags & flag_vm))) + if(this.vm86_mode()) { // vm86 mode, iopl != 3 this.trigger_gp(0); } if(this.flags & flag_nt) { - if(DEBUG) throw "unimplemented nt"; + if(DEBUG) throw this.debug.unimpl("nt"); } //dbg_log("pop eip from " + h(this.reg32[reg_esp], 8)); this.instruction_pointer = this.pop32s(); @@ -3853,7 +5127,7 @@ v86.prototype.iret32 = function() this.flags |= flag_vm; dbg_log("in vm86 mode now " + " cs:eip=" + h(this.sreg[reg_cs]) + ":" + h(this.instruction_pointer >>> 0) + - " iopl=" + (this.flags >> 12 & 3), LOG_CPU); + " iopl=" + this.getiopl(), LOG_CPU); this.switch_seg(reg_cs, this.sreg[reg_cs]); this.instruction_pointer = this.instruction_pointer + this.get_seg(reg_cs) | 0; var temp_esp = this.pop32s(); @@ -4078,7 +5352,7 @@ v86.prototype.handle_irqs = function() { if(this.devices.pic) { - dbg_assert(!this.page_fault); + //dbg_assert(!this.page_fault); if((this.flags & flag_interrupt) && !this.page_fault) { this.devices.pic.check_irqs(); @@ -4087,7 +5361,7 @@ v86.prototype.handle_irqs = function() }; v86.prototype.test_privileges_for_io = function(port, size) { - if(this.protected_mode && (this.cpl > (this.flags >> 12 & 3) || (this.flags & flag_vm))) + if(this.protected_mode && (this.cpl > this.getiopl() || (this.flags & flag_vm))) { var tsr_size = this.segment_limits[reg_tr], tsr_offset = this.segment_offsets[reg_tr]; @@ -4300,7 +5574,7 @@ v86.prototype.switch_seg = function(reg, selector) { this.protected_mode = (this.cr0 & CR0_PE) === CR0_PE; } - if(!this.protected_mode || (!!(this.flags & flag_vm))) + if(!this.protected_mode || this.vm86_mode()) { this.sreg[reg] = selector; this.segment_is_null[reg] = 0; @@ -4360,7 +5634,7 @@ v86.prototype.switch_seg = function(reg, selector) //if(info.dc_bit && (info.dpl !== info.rpl)) //{ // dbg_log(info + " " + h(selector & ~3), LOG_CPU); - // throw unimpl("#GP handler"); + // throw this.debug.unimpl("#GP handler"); //} if(info.rpl !== this.cpl) { @@ -4793,9 +6067,3 @@ v86.prototype.trigger_pagefault = function(write, user, present) this.call_interrupt_vector(14, false, user << 2 | write << 1 | present); throw MAGIC_CPU_EXCEPTION; }; -if(typeof window === "object") -{ - window["v86"] = v86; - v86.prototype["run"] = v86.prototype.run; - v86.prototype["stop"] = v86.prototype.stop; -} diff --git a/build/v86_all.js b/build/v86_all.js index eda66dd3..803a8d5e 100644 --- a/build/v86_all.js +++ b/build/v86_all.js @@ -1,376 +1,690 @@ -'use strict';var l;(function(){function a(){for(var a=location.search.substr(1).split("&"),b,d={},f=0;f>1)+d(" ",50-(g>>1))+"]"}else a.ge||(a.ge=0),e.textContent=a.ud+" "+d(".",a.ge++%50)}function f(a){document.getElementById(a)||console.log("Element with id `"+a+"` not found");return document.getElementById(a)}function g(){function d(a,b,f){document.title=a.name+" - Virtual x86";if(67108864>a.size){var g=new aa(a);g.onprogress=e.bind(this,{ud:"Loading disk image into memory"})}else g=new ba(a);g.onload=function(){switch(b){case "floppy":t.ob=g;break;case "hd":t.Mb=g;break;case "cdrom":t.nb= -g}f()};g.j()}function g(a,b,d){b.Ja=a.Ja;b.sa=a.sa;a.Id&&(b.Mb=new ca(a.Id,512,a.le));a.ob?b.ob=new da(d):a.nb&&(b.nb=new da(d));k(b,function(b){if(a.state){var f=d.byteLength;if(16>f)throw new ea("Invalid length: "+f);var e=new Int32Array(d,0,4);if(-2039052682!==e[0])throw new ea("Invalid header: "+fa(e[0]>>>0));if(0!==e[1])throw new ea("Version mismatch: dump="+e[1]+" we=0");if(e[2]!==f)throw new ea("Length doesn't match header: real="+f+" header="+e[2]);e=e[3];if(0>e||e+12>=f||e%2)throw new ea("Invalid info block length: "+ -e);for(var g=e/2,k=new Uint16Array(d,16,g),t="",f=0;f -e?a.Ja=e:(alert("Invalid memory size - ignored."),a.Ja=33554432)}a.sa||(e=1048576*parseInt(f("video_memory_size").value,10),65536e?a.sa=e:(alert("Invalid video memory size - ignored."),a.sa=8388608));t(a,d);d.Ba(a);b(d)}else v=k.bind(this,a,b)}function t(a,d){function e(){if(t){var a=Date.now(),b=(d.J-mb)/1E3|0;Ga+=b;ra+=a-ka;ka=a;Aa.textContent=b;sa.textContent=Ga/ra*1E3|0;a=ra/1E3|0;v.textContent=60>a?a+"s":3600>a?(a/60|0)+"m "+String.c(a%60,2)+"s":(a/3600|0)+"h "+String.c((a/60| -0)%60,2)+"m "+String.c(a%60,2)+"s";mb=d.J}setTimeout(e,1E3)}function g(){if(t){var b=d.K.Xb.M;b.rd?(f("info_vga_mode").textContent="graphical",f("info_res").textContent=b.zd+"x"+b.Ad,f("info_bpp").textContent=b.jd):(f("info_vga_mode").textContent="text",f("info_res").textContent="-",f("info_bpp").textContent="-");a.gc&&(f("info_mouse_enabled").textContent=a.gc.enabled?"Yes":"No");d.K.Mb?(b=d.K.Mb.M,f("info_hda_sectors_read").textContent=b.hb,f("info_hda_bytes_read").textContent=b.ab,f("info_hda_sectors_written").textContent= -b.rc,f("info_hda_bytes_written").textContent=b.$b,f("info_hda_status").textContent=b.cb?"Loading ...":"Idle"):f("info_hda").style.display="none";d.K.nb?(b=d.K.nb.M,f("info_cdrom_sectors_read").textContent=b.hb,f("info_cdrom_bytes_read").textContent=b.ab,f("info_cdrom_status").textContent=b.cb?"Loading ...":"Idle"):f("info_cdrom").style.display="none"}setTimeout(g,1E3)}function k(a){a.ctrlKey?window.onbeforeunload=function(){window.onbeforeunload=null;return"CTRL-W cannot be sent to the emulator."}: -window.onbeforeunload=null}f("boot_options").style.display="none";f("loading").style.display="none";f("runtime_options").style.display="block";f("runtime_infos").style.display="block";document.getElementsByClassName("phone_keyboard")[0].style.display="block";f("news")&&(f("news").style.display="none");var t=!0;f("run").onclick=function(){t?(ra+=Date.now()-ka,f("run").value="Run",d.stop()):(f("run").value="Pause",d.Vc(),ka=Date.now());t=!t;f("run").blur()};f("exit").onclick=function(){location.href= -location.pathname};var v=f("running_time"),Aa=f("speed"),sa=f("avg_speed"),ka=Date.now(),ra=0,Ga=0,mb=0;setTimeout(e,1E3);setTimeout(g,0);f("reset").onclick=function(){oa(d);f("reset").blur()};for(var la=["hda","hdb","fda","fdb"],ta=0;tanb.byteLength?Na.onclick=function(a){nb.Gc(function(b){var d=a+".img",f=new Blob([b]);b=document.createElement("a");b.download=d;b.href=window.URL.createObjectURL(f);b.dataset.downloadurl= -["application/octet-stream",b.download,b.href].join(":");document.createEvent?(d=document.createEvent("MouseEvent"),d.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),b.dispatchEvent(d)):b.click()});this.blur()}.bind(Na,la[ta]):Na.style.display="none"}f("ctrlaltdel").onclick=function(){var a=d.K.Sc;a.Db(29);a.Db(56);a.Db(83);a.Db(157);a.Db(184);a.Db(211);f("ctrlaltdel").blur()};f("scale").onchange=function(){var b=parseFloat(this.value);(b||0a;a++)for(var b=0;3>b;b++)for(var d=a|b<<6,e=1;8>e;e++)m.prototype.c[d|e<<3]=m.prototype.c[d],m.prototype.h[d|e<<3]=m.prototype.h[d];m.prototype.e[0]=function(a){return a.a[0]+n(a)+a.a[0]|0};m.prototype.e[1]= -function(a){return a.a[0]+n(a)+a.a[1]|0};m.prototype.e[2]=function(a){return a.a[0]+n(a)+a.a[2]|0};m.prototype.e[3]=function(a){return a.a[0]+n(a)+a.a[3]|0};m.prototype.e[4]=function(a){return a.a[0]+r(a)+a.a[4]|0};m.prototype.e[5]=function(a,b){return a.a[0]+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[6]=function(a){return a.a[0]+n(a)+a.a[6]|0};m.prototype.e[7]=function(a){return a.a[0]+n(a)+a.a[7]|0};m.prototype.e[64]=function(a){return(a.a[0]<<1)+n(a)+a.a[0]|0};m.prototype.e[65]=function(a){return(a.a[0]<< -1)+n(a)+a.a[1]|0};m.prototype.e[66]=function(a){return(a.a[0]<<1)+n(a)+a.a[2]|0};m.prototype.e[67]=function(a){return(a.a[0]<<1)+n(a)+a.a[3]|0};m.prototype.e[68]=function(a){return(a.a[0]<<1)+r(a)+a.a[4]|0};m.prototype.e[69]=function(a,b){return(a.a[0]<<1)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[70]=function(a){return(a.a[0]<<1)+n(a)+a.a[6]|0};m.prototype.e[71]=function(a){return(a.a[0]<<1)+n(a)+a.a[7]|0};m.prototype.e[128]=function(a){return(a.a[0]<<2)+n(a)+a.a[0]|0};m.prototype.e[129]=function(a){return(a.a[0]<< -2)+n(a)+a.a[1]|0};m.prototype.e[130]=function(a){return(a.a[0]<<2)+n(a)+a.a[2]|0};m.prototype.e[131]=function(a){return(a.a[0]<<2)+n(a)+a.a[3]|0};m.prototype.e[132]=function(a){return(a.a[0]<<2)+r(a)+a.a[4]|0};m.prototype.e[133]=function(a,b){return(a.a[0]<<2)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[134]=function(a){return(a.a[0]<<2)+n(a)+a.a[6]|0};m.prototype.e[135]=function(a){return(a.a[0]<<2)+n(a)+a.a[7]|0};m.prototype.e[192]=function(a){return(a.a[0]<<3)+n(a)+a.a[0]|0};m.prototype.e[193]= -function(a){return(a.a[0]<<3)+n(a)+a.a[1]|0};m.prototype.e[194]=function(a){return(a.a[0]<<3)+n(a)+a.a[2]|0};m.prototype.e[195]=function(a){return(a.a[0]<<3)+n(a)+a.a[3]|0};m.prototype.e[196]=function(a){return(a.a[0]<<3)+r(a)+a.a[4]|0};m.prototype.e[197]=function(a,b){return(a.a[0]<<3)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[198]=function(a){return(a.a[0]<<3)+n(a)+a.a[6]|0};m.prototype.e[199]=function(a){return(a.a[0]<<3)+n(a)+a.a[7]|0};m.prototype.e[8]=function(a){return a.a[1]+n(a)+a.a[0]|0}; -m.prototype.e[9]=function(a){return a.a[1]+n(a)+a.a[1]|0};m.prototype.e[10]=function(a){return a.a[1]+n(a)+a.a[2]|0};m.prototype.e[11]=function(a){return a.a[1]+n(a)+a.a[3]|0};m.prototype.e[12]=function(a){return a.a[1]+r(a)+a.a[4]|0};m.prototype.e[13]=function(a,b){return a.a[1]+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[14]=function(a){return a.a[1]+n(a)+a.a[6]|0};m.prototype.e[15]=function(a){return a.a[1]+n(a)+a.a[7]|0};m.prototype.e[72]=function(a){return(a.a[1]<<1)+n(a)+a.a[0]|0};m.prototype.e[73]= -function(a){return(a.a[1]<<1)+n(a)+a.a[1]|0};m.prototype.e[74]=function(a){return(a.a[1]<<1)+n(a)+a.a[2]|0};m.prototype.e[75]=function(a){return(a.a[1]<<1)+n(a)+a.a[3]|0};m.prototype.e[76]=function(a){return(a.a[1]<<1)+r(a)+a.a[4]|0};m.prototype.e[77]=function(a,b){return(a.a[1]<<1)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[78]=function(a){return(a.a[1]<<1)+n(a)+a.a[6]|0};m.prototype.e[79]=function(a){return(a.a[1]<<1)+n(a)+a.a[7]|0};m.prototype.e[136]=function(a){return(a.a[1]<<2)+n(a)+a.a[0]|0}; -m.prototype.e[137]=function(a){return(a.a[1]<<2)+n(a)+a.a[1]|0};m.prototype.e[138]=function(a){return(a.a[1]<<2)+n(a)+a.a[2]|0};m.prototype.e[139]=function(a){return(a.a[1]<<2)+n(a)+a.a[3]|0};m.prototype.e[140]=function(a){return(a.a[1]<<2)+r(a)+a.a[4]|0};m.prototype.e[141]=function(a,b){return(a.a[1]<<2)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[142]=function(a){return(a.a[1]<<2)+n(a)+a.a[6]|0};m.prototype.e[143]=function(a){return(a.a[1]<<2)+n(a)+a.a[7]|0};m.prototype.e[200]=function(a){return(a.a[1]<< -3)+n(a)+a.a[0]|0};m.prototype.e[201]=function(a){return(a.a[1]<<3)+n(a)+a.a[1]|0};m.prototype.e[202]=function(a){return(a.a[1]<<3)+n(a)+a.a[2]|0};m.prototype.e[203]=function(a){return(a.a[1]<<3)+n(a)+a.a[3]|0};m.prototype.e[204]=function(a){return(a.a[1]<<3)+r(a)+a.a[4]|0};m.prototype.e[205]=function(a,b){return(a.a[1]<<3)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[206]=function(a){return(a.a[1]<<3)+n(a)+a.a[6]|0};m.prototype.e[207]=function(a){return(a.a[1]<<3)+n(a)+a.a[7]|0};m.prototype.e[16]=function(a){return a.a[2]+ -n(a)+a.a[0]|0};m.prototype.e[17]=function(a){return a.a[2]+n(a)+a.a[1]|0};m.prototype.e[18]=function(a){return a.a[2]+n(a)+a.a[2]|0};m.prototype.e[19]=function(a){return a.a[2]+n(a)+a.a[3]|0};m.prototype.e[20]=function(a){return a.a[2]+r(a)+a.a[4]|0};m.prototype.e[21]=function(a,b){return a.a[2]+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[22]=function(a){return a.a[2]+n(a)+a.a[6]|0};m.prototype.e[23]=function(a){return a.a[2]+n(a)+a.a[7]|0};m.prototype.e[80]=function(a){return(a.a[2]<<1)+n(a)+a.a[0]| -0};m.prototype.e[81]=function(a){return(a.a[2]<<1)+n(a)+a.a[1]|0};m.prototype.e[82]=function(a){return(a.a[2]<<1)+n(a)+a.a[2]|0};m.prototype.e[83]=function(a){return(a.a[2]<<1)+n(a)+a.a[3]|0};m.prototype.e[84]=function(a){return(a.a[2]<<1)+r(a)+a.a[4]|0};m.prototype.e[85]=function(a,b){return(a.a[2]<<1)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[86]=function(a){return(a.a[2]<<1)+n(a)+a.a[6]|0};m.prototype.e[87]=function(a){return(a.a[2]<<1)+n(a)+a.a[7]|0};m.prototype.e[144]=function(a){return(a.a[2]<< -2)+n(a)+a.a[0]|0};m.prototype.e[145]=function(a){return(a.a[2]<<2)+n(a)+a.a[1]|0};m.prototype.e[146]=function(a){return(a.a[2]<<2)+n(a)+a.a[2]|0};m.prototype.e[147]=function(a){return(a.a[2]<<2)+n(a)+a.a[3]|0};m.prototype.e[148]=function(a){return(a.a[2]<<2)+r(a)+a.a[4]|0};m.prototype.e[149]=function(a,b){return(a.a[2]<<2)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[150]=function(a){return(a.a[2]<<2)+n(a)+a.a[6]|0};m.prototype.e[151]=function(a){return(a.a[2]<<2)+n(a)+a.a[7]|0};m.prototype.e[208]= -function(a){return(a.a[2]<<3)+n(a)+a.a[0]|0};m.prototype.e[209]=function(a){return(a.a[2]<<3)+n(a)+a.a[1]|0};m.prototype.e[210]=function(a){return(a.a[2]<<3)+n(a)+a.a[2]|0};m.prototype.e[211]=function(a){return(a.a[2]<<3)+n(a)+a.a[3]|0};m.prototype.e[212]=function(a){return(a.a[2]<<3)+r(a)+a.a[4]|0};m.prototype.e[213]=function(a,b){return(a.a[2]<<3)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[214]=function(a){return(a.a[2]<<3)+n(a)+a.a[6]|0};m.prototype.e[215]=function(a){return(a.a[2]<<3)+n(a)+a.a[7]| -0};m.prototype.e[24]=function(a){return a.a[3]+n(a)+a.a[0]|0};m.prototype.e[25]=function(a){return a.a[3]+n(a)+a.a[1]|0};m.prototype.e[26]=function(a){return a.a[3]+n(a)+a.a[2]|0};m.prototype.e[27]=function(a){return a.a[3]+n(a)+a.a[3]|0};m.prototype.e[28]=function(a){return a.a[3]+r(a)+a.a[4]|0};m.prototype.e[29]=function(a,b){return a.a[3]+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[30]=function(a){return a.a[3]+n(a)+a.a[6]|0};m.prototype.e[31]=function(a){return a.a[3]+n(a)+a.a[7]|0};m.prototype.e[88]= -function(a){return(a.a[3]<<1)+n(a)+a.a[0]|0};m.prototype.e[89]=function(a){return(a.a[3]<<1)+n(a)+a.a[1]|0};m.prototype.e[90]=function(a){return(a.a[3]<<1)+n(a)+a.a[2]|0};m.prototype.e[91]=function(a){return(a.a[3]<<1)+n(a)+a.a[3]|0};m.prototype.e[92]=function(a){return(a.a[3]<<1)+r(a)+a.a[4]|0};m.prototype.e[93]=function(a,b){return(a.a[3]<<1)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[94]=function(a){return(a.a[3]<<1)+n(a)+a.a[6]|0};m.prototype.e[95]=function(a){return(a.a[3]<<1)+n(a)+a.a[7]|0}; -m.prototype.e[152]=function(a){return(a.a[3]<<2)+n(a)+a.a[0]|0};m.prototype.e[153]=function(a){return(a.a[3]<<2)+n(a)+a.a[1]|0};m.prototype.e[154]=function(a){return(a.a[3]<<2)+n(a)+a.a[2]|0};m.prototype.e[155]=function(a){return(a.a[3]<<2)+n(a)+a.a[3]|0};m.prototype.e[156]=function(a){return(a.a[3]<<2)+r(a)+a.a[4]|0};m.prototype.e[157]=function(a,b){return(a.a[3]<<2)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[158]=function(a){return(a.a[3]<<2)+n(a)+a.a[6]|0};m.prototype.e[159]=function(a){return(a.a[3]<< -2)+n(a)+a.a[7]|0};m.prototype.e[216]=function(a){return(a.a[3]<<3)+n(a)+a.a[0]|0};m.prototype.e[217]=function(a){return(a.a[3]<<3)+n(a)+a.a[1]|0};m.prototype.e[218]=function(a){return(a.a[3]<<3)+n(a)+a.a[2]|0};m.prototype.e[219]=function(a){return(a.a[3]<<3)+n(a)+a.a[3]|0};m.prototype.e[220]=function(a){return(a.a[3]<<3)+r(a)+a.a[4]|0};m.prototype.e[221]=function(a,b){return(a.a[3]<<3)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[222]=function(a){return(a.a[3]<<3)+n(a)+a.a[6]|0};m.prototype.e[223]= -function(a){return(a.a[3]<<3)+n(a)+a.a[7]|0};m.prototype.e[32]=function(a){return 0+n(a)+a.a[0]|0};m.prototype.e[33]=function(a){return 0+n(a)+a.a[1]|0};m.prototype.e[34]=function(a){return 0+n(a)+a.a[2]|0};m.prototype.e[35]=function(a){return 0+n(a)+a.a[3]|0};m.prototype.e[36]=function(a){return 0+r(a)+a.a[4]|0};m.prototype.e[37]=function(a,b){return 0+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[38]=function(a){return 0+n(a)+a.a[6]|0};m.prototype.e[39]=function(a){return 0+n(a)+a.a[7]|0};m.prototype.e[96]= -function(a){return 0+n(a)+a.a[0]|0};m.prototype.e[97]=function(a){return 0+n(a)+a.a[1]|0};m.prototype.e[98]=function(a){return 0+n(a)+a.a[2]|0};m.prototype.e[99]=function(a){return 0+n(a)+a.a[3]|0};m.prototype.e[100]=function(a){return 0+r(a)+a.a[4]|0};m.prototype.e[101]=function(a,b){return 0+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[102]=function(a){return 0+n(a)+a.a[6]|0};m.prototype.e[103]=function(a){return 0+n(a)+a.a[7]|0};m.prototype.e[160]=function(a){return 0+n(a)+a.a[0]|0};m.prototype.e[161]= -function(a){return 0+n(a)+a.a[1]|0};m.prototype.e[162]=function(a){return 0+n(a)+a.a[2]|0};m.prototype.e[163]=function(a){return 0+n(a)+a.a[3]|0};m.prototype.e[164]=function(a){return 0+r(a)+a.a[4]|0};m.prototype.e[165]=function(a,b){return 0+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[166]=function(a){return 0+n(a)+a.a[6]|0};m.prototype.e[167]=function(a){return 0+n(a)+a.a[7]|0};m.prototype.e[224]=function(a){return 0+n(a)+a.a[0]|0};m.prototype.e[225]=function(a){return 0+n(a)+a.a[1]|0};m.prototype.e[226]= -function(a){return 0+n(a)+a.a[2]|0};m.prototype.e[227]=function(a){return 0+n(a)+a.a[3]|0};m.prototype.e[228]=function(a){return 0+r(a)+a.a[4]|0};m.prototype.e[229]=function(a,b){return 0+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[230]=function(a){return 0+n(a)+a.a[6]|0};m.prototype.e[231]=function(a){return 0+n(a)+a.a[7]|0};m.prototype.e[40]=function(a){return a.a[5]+n(a)+a.a[0]|0};m.prototype.e[41]=function(a){return a.a[5]+n(a)+a.a[1]|0};m.prototype.e[42]=function(a){return a.a[5]+n(a)+a.a[2]| -0};m.prototype.e[43]=function(a){return a.a[5]+n(a)+a.a[3]|0};m.prototype.e[44]=function(a){return a.a[5]+r(a)+a.a[4]|0};m.prototype.e[45]=function(a,b){return a.a[5]+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[46]=function(a){return a.a[5]+n(a)+a.a[6]|0};m.prototype.e[47]=function(a){return a.a[5]+n(a)+a.a[7]|0};m.prototype.e[104]=function(a){return(a.a[5]<<1)+n(a)+a.a[0]|0};m.prototype.e[105]=function(a){return(a.a[5]<<1)+n(a)+a.a[1]|0};m.prototype.e[106]=function(a){return(a.a[5]<<1)+n(a)+a.a[2]| -0};m.prototype.e[107]=function(a){return(a.a[5]<<1)+n(a)+a.a[3]|0};m.prototype.e[108]=function(a){return(a.a[5]<<1)+r(a)+a.a[4]|0};m.prototype.e[109]=function(a,b){return(a.a[5]<<1)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[110]=function(a){return(a.a[5]<<1)+n(a)+a.a[6]|0};m.prototype.e[111]=function(a){return(a.a[5]<<1)+n(a)+a.a[7]|0};m.prototype.e[168]=function(a){return(a.a[5]<<2)+n(a)+a.a[0]|0};m.prototype.e[169]=function(a){return(a.a[5]<<2)+n(a)+a.a[1]|0};m.prototype.e[170]=function(a){return(a.a[5]<< -2)+n(a)+a.a[2]|0};m.prototype.e[171]=function(a){return(a.a[5]<<2)+n(a)+a.a[3]|0};m.prototype.e[172]=function(a){return(a.a[5]<<2)+r(a)+a.a[4]|0};m.prototype.e[173]=function(a,b){return(a.a[5]<<2)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[174]=function(a){return(a.a[5]<<2)+n(a)+a.a[6]|0};m.prototype.e[175]=function(a){return(a.a[5]<<2)+n(a)+a.a[7]|0};m.prototype.e[232]=function(a){return(a.a[5]<<3)+n(a)+a.a[0]|0};m.prototype.e[233]=function(a){return(a.a[5]<<3)+n(a)+a.a[1]|0};m.prototype.e[234]= -function(a){return(a.a[5]<<3)+n(a)+a.a[2]|0};m.prototype.e[235]=function(a){return(a.a[5]<<3)+n(a)+a.a[3]|0};m.prototype.e[236]=function(a){return(a.a[5]<<3)+r(a)+a.a[4]|0};m.prototype.e[237]=function(a,b){return(a.a[5]<<3)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[238]=function(a){return(a.a[5]<<3)+n(a)+a.a[6]|0};m.prototype.e[239]=function(a){return(a.a[5]<<3)+n(a)+a.a[7]|0};m.prototype.e[48]=function(a){return a.a[6]+n(a)+a.a[0]|0};m.prototype.e[49]=function(a){return a.a[6]+n(a)+a.a[1]|0};m.prototype.e[50]= -function(a){return a.a[6]+n(a)+a.a[2]|0};m.prototype.e[51]=function(a){return a.a[6]+n(a)+a.a[3]|0};m.prototype.e[52]=function(a){return a.a[6]+r(a)+a.a[4]|0};m.prototype.e[53]=function(a,b){return a.a[6]+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[54]=function(a){return a.a[6]+n(a)+a.a[6]|0};m.prototype.e[55]=function(a){return a.a[6]+n(a)+a.a[7]|0};m.prototype.e[112]=function(a){return(a.a[6]<<1)+n(a)+a.a[0]|0};m.prototype.e[113]=function(a){return(a.a[6]<<1)+n(a)+a.a[1]|0};m.prototype.e[114]=function(a){return(a.a[6]<< -1)+n(a)+a.a[2]|0};m.prototype.e[115]=function(a){return(a.a[6]<<1)+n(a)+a.a[3]|0};m.prototype.e[116]=function(a){return(a.a[6]<<1)+r(a)+a.a[4]|0};m.prototype.e[117]=function(a,b){return(a.a[6]<<1)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[118]=function(a){return(a.a[6]<<1)+n(a)+a.a[6]|0};m.prototype.e[119]=function(a){return(a.a[6]<<1)+n(a)+a.a[7]|0};m.prototype.e[176]=function(a){return(a.a[6]<<2)+n(a)+a.a[0]|0};m.prototype.e[177]=function(a){return(a.a[6]<<2)+n(a)+a.a[1]|0};m.prototype.e[178]= -function(a){return(a.a[6]<<2)+n(a)+a.a[2]|0};m.prototype.e[179]=function(a){return(a.a[6]<<2)+n(a)+a.a[3]|0};m.prototype.e[180]=function(a){return(a.a[6]<<2)+r(a)+a.a[4]|0};m.prototype.e[181]=function(a,b){return(a.a[6]<<2)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[182]=function(a){return(a.a[6]<<2)+n(a)+a.a[6]|0};m.prototype.e[183]=function(a){return(a.a[6]<<2)+n(a)+a.a[7]|0};m.prototype.e[240]=function(a){return(a.a[6]<<3)+n(a)+a.a[0]|0};m.prototype.e[241]=function(a){return(a.a[6]<<3)+n(a)+a.a[1]| -0};m.prototype.e[242]=function(a){return(a.a[6]<<3)+n(a)+a.a[2]|0};m.prototype.e[243]=function(a){return(a.a[6]<<3)+n(a)+a.a[3]|0};m.prototype.e[244]=function(a){return(a.a[6]<<3)+r(a)+a.a[4]|0};m.prototype.e[245]=function(a,b){return(a.a[6]<<3)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[246]=function(a){return(a.a[6]<<3)+n(a)+a.a[6]|0};m.prototype.e[247]=function(a){return(a.a[6]<<3)+n(a)+a.a[7]|0};m.prototype.e[56]=function(a){return a.a[7]+n(a)+a.a[0]|0};m.prototype.e[57]=function(a){return a.a[7]+ -n(a)+a.a[1]|0};m.prototype.e[58]=function(a){return a.a[7]+n(a)+a.a[2]|0};m.prototype.e[59]=function(a){return a.a[7]+n(a)+a.a[3]|0};m.prototype.e[60]=function(a){return a.a[7]+r(a)+a.a[4]|0};m.prototype.e[61]=function(a,b){return a.a[7]+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[62]=function(a){return a.a[7]+n(a)+a.a[6]|0};m.prototype.e[63]=function(a){return a.a[7]+n(a)+a.a[7]|0};m.prototype.e[120]=function(a){return(a.a[7]<<1)+n(a)+a.a[0]|0};m.prototype.e[121]=function(a){return(a.a[7]<<1)+n(a)+ -a.a[1]|0};m.prototype.e[122]=function(a){return(a.a[7]<<1)+n(a)+a.a[2]|0};m.prototype.e[123]=function(a){return(a.a[7]<<1)+n(a)+a.a[3]|0};m.prototype.e[124]=function(a){return(a.a[7]<<1)+r(a)+a.a[4]|0};m.prototype.e[125]=function(a,b){return(a.a[7]<<1)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[126]=function(a){return(a.a[7]<<1)+n(a)+a.a[6]|0};m.prototype.e[127]=function(a){return(a.a[7]<<1)+n(a)+a.a[7]|0};m.prototype.e[184]=function(a){return(a.a[7]<<2)+n(a)+a.a[0]|0};m.prototype.e[185]=function(a){return(a.a[7]<< -2)+n(a)+a.a[1]|0};m.prototype.e[186]=function(a){return(a.a[7]<<2)+n(a)+a.a[2]|0};m.prototype.e[187]=function(a){return(a.a[7]<<2)+n(a)+a.a[3]|0};m.prototype.e[188]=function(a){return(a.a[7]<<2)+r(a)+a.a[4]|0};m.prototype.e[189]=function(a,b){return(a.a[7]<<2)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[190]=function(a){return(a.a[7]<<2)+n(a)+a.a[6]|0};m.prototype.e[191]=function(a){return(a.a[7]<<2)+n(a)+a.a[7]|0};m.prototype.e[248]=function(a){return(a.a[7]<<3)+n(a)+a.a[0]|0};m.prototype.e[249]= -function(a){return(a.a[7]<<3)+n(a)+a.a[1]|0};m.prototype.e[250]=function(a){return(a.a[7]<<3)+n(a)+a.a[2]|0};m.prototype.e[251]=function(a){return(a.a[7]<<3)+n(a)+a.a[3]|0};m.prototype.e[252]=function(a){return(a.a[7]<<3)+r(a)+a.a[4]|0};m.prototype.e[253]=function(a,b){return(a.a[7]<<3)+(b?r(a)+a.a[5]:n(a)+s(a))|0};m.prototype.e[254]=function(a){return(a.a[7]<<3)+n(a)+a.a[6]|0};m.prototype.e[255]=function(a){return(a.a[7]<<3)+n(a)+a.a[7]|0};m.prototype.f=function(a){return(this.$a?this.c:this.h)[a](this)}})(); -"use strict";m.prototype.add=function(a,b,d){this.Ca=a;this.Da=b;this.j=this.u=a+b|0;this.W=d;this.m=2261;return this.u};function xa(a,b,d,e){var f=a.ta();a.Ca=b;a.Da=d;a.j=a.u=(b+d|0)+f|0;a.W=e;a.m=2261;return a.u}m.prototype.sub=function(a,b,d){this.j=a;this.Da=b;this.Ca=this.u=a-b|0;this.W=d;this.m=2261;return this.u};function ya(a,b,d,e){var f=a.ta();a.j=b;a.Da=d;a.Ca=a.u=b-d-f|0;a.W=e;a.m=2261;return a.u} -function Ba(a,b,d){a.d=a.d&-2|a.ta();a.Ca=b;a.Da=1;a.j=a.u=b+1|0;a.W=d;a.m=2260;return a.u}function Ca(a,b,d){a.d=a.d&-2|a.ta();a.j=b;a.Da=1;a.Ca=a.u=b-1|0;a.W=d;a.m=2260;return a.u}function Da(a,b,d){a.Ca=a.u=-b|0;a.m=2261;a.j=0;a.Da=b;a.W=d;return a.u}function Ea(a,b,d){b=b*d;a.d=32767b?a.d|2049:a.d&-2050;a.m=0;return b} -function Fa(a,b,d){var e=!1;0>b&&(e=!0,b=-b|0);0>d&&(e=!e,d=-d|0);var f=b&65535;b=b>>>16;var g=d&65535;d=d>>>16;var k=f*g,g=(k>>>16)+(b*g|0)|0,t=g>>>16,g=(g&65535)+(f*d|0)|0,k=g<<16|k&65535,t=((g>>>16)+(b*d|0)|0)+t|0;e&&(k=-k|0,t=~t+!k|0);a.d=t===k>>31?a.d&-2050:a.d|2049;a.m=0;return k}function w(a,b,d,e){a.u=b&d;a.W=e;a.d&=-2066;a.m=196;return a.u}function Ia(a,b,d,e){a.u=b|d;a.W=e;a.d&=-2066;a.m=196;return a.u}function Ja(a,b,d,e){a.u=b^d;a.W=e;a.d&=-2066;a.m=196;return a.u} -function Ka(a,b,d){if(!d)return b;d&=7;b=b<>8-d;a.m&=-2050;a.d=a.d&-2050|b&1|(b<<11^b<<4)&2048;return b}function La(a,b,d){if(!d)return b;d&=15;b=b<>16-d;a.m&=-2050;a.d=a.d&-2050|b&1|(b<<11^b>>4)&2048;return b}function Ma(a,b,d){if(!d)return b;b=b<>>32-d;a.m&=-2050;a.d=a.d&-2050|b&1|(b<<11^b>>20)&2048;return b}function Pa(a,b,d){d%=9;if(!d)return b;b=b<>9-d;a.m&=-2050;a.d=a.d&-2050|b>>8&1|(b<<3^b<<4)&2048;return b} -function Qa(a,b,d){d%=17;if(!d)return b;b=b<>17-d;a.m&=-2050;a.d=a.d&-2050|b>>16&1|(b>>5^b>>4)&2048;return b}function Ra(a,b,d){if(!d)return b;var e=b<>>33-d);a.m&=-2050;a.d=a.d&-2050|b>>>32-d&1;a.d|=(a.d<<11^e>>20)&2048;return e}function Sa(a,b,d){d&=7;if(!d)return b;b=b>>d|b<<8-d;a.m&=-2050;a.d=a.d&-2050|b>>7&1|(b<<4^b<<5)&2048;return b}function Ta(a,b,d){d&=15;if(!d)return b;b=b>>d|b<<16-d;a.m&=-2050;a.d=a.d&-2050|b>>15&1|(b>>4^b>>3)&2048;return b} -function Ua(a,b,d){if(!d)return b;b=b>>>d|b<<32-d;a.m&=-2050;a.d=a.d&-2050|b>>31&1|(b>>20^b>>19)&2048;return b}function Va(a,b,d){d%=9;if(!d)return b;b=b>>d|a.ta()<<8-d|b<<9-d;a.m&=-2050;a.d=a.d&-2050|b>>8&1|(b<<4^b<<5)&2048;return b}function Wa(a,b,d){d%=17;if(!d)return b;b=b>>d|a.ta()<<16-d|b<<17-d;a.m&=-2050;a.d=a.d&-2050|b>>16&1|(b>>4^b>>3)&2048;return b}function Xa(a,b,d){if(!d)return b;var e=b>>>d|a.ta()<<32-d;1>d-1&1|(e>>20^e>>19)&2048;return e} -function Ya(a,b,d){if(0===d)return b;a.u=b<>8&1|(a.u<<3^a.u<<4)&2048;return a.u}function Za(a,b,d){if(0===d)return b;a.u=b<>16&1|(a.u>>5^a.u>>4)&2048;return a.u}function $a(a,b,d){if(0===d)return b;a.u=b<>>32-d&1;a.d|=(a.d&1^a.u>>31&1)<<11&2048;return a.u}function ab(a,b,d){if(0===d)return b;a.u=b>>d;a.W=7;a.m=212;a.d=a.d&-2050|b>>d-1&1|(b>>7&1)<<11&2048;return a.u} -function bb(a,b,d){if(0===d)return b;a.u=b>>d;a.W=15;a.m=212;a.d=a.d&-2050|b>>d-1&1|b>>4&2048;return a.u}function cb(a,b,d){if(0===d)return b;a.u=b>>>d;a.W=31;a.m=212;a.d=a.d&-2050|b>>>d-1&1|b>>20&2048;return a.u}function db(a,b,d){if(0===d)return b;a.u=b>>d;a.W=7;a.m=212;a.d=a.d&-2050|b>>d-1&1;return a.u}function eb(a,b,d){if(0===d)return b;a.u=b>>d;a.W=15;a.m=212;a.d=a.d&-2050|b>>d-1&1;return a.u}function fb(a,b,d){if(0===d)return b;a.u=b>>d;a.W=31;a.m=212;a.d=a.d&-2050|b>>>d-1&1;return a.u} -function gb(a,b,d,e){if(0===e)return b;16>=e?(a.u=b>>e|d<<16-e,a.d=a.d&-2|b>>e-1&1):(a.u=b<<32-e|d>>e-16,a.d=a.d&-2|d>>e-17&1);a.W=15;a.m=212;a.d=a.d&-2049|(a.u^b)>>4&2048;return a.u}function hb(a,b,d,e){if(0===e)return b;a.u=b>>>e|d<<32-e;a.W=31;a.m=212;a.d=a.d&-2|b>>>e-1&1;a.d=a.d&-2049|(a.u^b)>>20&2048;return a.u} -function ib(a,b,d,e){if(0===e)return b;16>=e?(a.u=b<>>16-e,a.d=a.d&-2|b>>>16-e&1):(a.u=b>>32-e|d<>>32-e&1);a.W=15;a.m=212;a.d=a.d&-2049|(a.d&1^a.u>>15&1)<<11;return a.u}function jb(a,b,d,e){if(0===e)return b;a.u=b<>>32-e;a.W=31;a.m=212;a.d=a.d&-2|b>>>32-e&1;a.d=a.d&-2049|(a.d&1^a.u>>31&1)<<11;return a.u}function kb(a,b,d){a.d=a.d&-2|b>>d&1;a.m&=-2}function lb(a,b,d){a.d=a.d&-2|b>>d&1;a.m&=-2;return b^1<>d&1;a.m&=-2;return b|1<>d&1;a.m&=-2;return b&~(1<>3));a.d=a.d&-2|b>>(d&7)&1;a.m&=-2}function rb(a,b,d){b=y(a,b+(d>>3));var e=a.memory.H(b);d&=7;a.d=a.d&-2|e>>d&1;a.m&=-2;a.memory.O(b,e^1<>3));var e=a.memory.H(b);d&=7;a.d=a.d&-2|e>>d&1;a.m&=-2;a.memory.O(b,e&~(1<>3));var e=a.memory.H(b);d&=7;a.d=a.d&-2|e>>d&1;a.m&=-2;a.memory.O(b,e|1<>1&1431655765),b=(b&858993459)+(b>>2&858993459),16843009*(b+(b>>4)&252645135)>>24;a.d|=64;return 0}"use strict";"use strict";var A=[],B=[],C=[],E=[];m.prototype.da=A;m.prototype.ga=B;m.prototype.U=C;m.prototype.X=E;A[0]=B[0]=function(a){var b=u(a),d,e;192>b?(e=y(a,a.f(b)),d=a.memory.H(e)):d=a.i[b<<2&12|b>>2&1];d=a.add(d,a.i[b>>1&12|b>>5&1],7);192>b?a.memory.O(e,d):a.i[b<<2&12|b>>2&1]=d}; -A[1]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4095===(d&4095)?(f=y(a,d+1),d=F(a,e,f)):d=a.memory.P(e)):d=a.b[b<<1&14];d=a.add(d,a.b[b>>2&14],15);192>b?f?G(a,e,f,d):a.memory.ba(e,d):a.b[b<<1&14]=d};B[1]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4093<=(d&4095)?(f=y(a,d+3),d=H(a,e,f)):d=I(a.memory,e)):d=a.a[b&7];d=a.add(d,a.a[b>>3&7],31);192>b?f?J(a,e,f,d):a.memory.ea(e,d):a.a[b&7]=d}; -A[2]=B[2]=function(a){var b=u(a),d=192>b?x(a,a.f(b)):a.i[b<<2&12|b>>2&1];a.i[b>>1&12|b>>5&1]=a.add(a.i[b>>1&12|b>>5&1],d,7)};A[3]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.b[b>>2&14]=a.add(a.b[b>>2&14],d,15)};B[3]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.a[b>>3&7]=a.add(a.a[b>>3&7],d,31)};A[4]=B[4]=function(a){a.i[0]=a.add(a.i[0],u(a),7)};A[5]=function(a){a.b[0]=a.add(a.b[0],q(a),15)};B[5]=function(a){a.a[0]=a.add(a.a[0],s(a),31)};A[6]=function(a){M(a,a.Q[0])}; -B[6]=function(a){N(a,a.Q[0])};A[7]=function(a){O(a,0,K(a,vb(a,0)));a.t[a.v]+=2};B[7]=function(a){O(a,0,K(a,vb(a,0)));a.t[a.v]+=4};A[8]=B[8]=function(a){var b=u(a),d,e;192>b?(e=y(a,a.f(b)),d=a.memory.H(e)):d=a.i[b<<2&12|b>>2&1];d=Ia(a,d,a.i[b>>1&12|b>>5&1],7);192>b?a.memory.O(e,d):a.i[b<<2&12|b>>2&1]=d}; -A[9]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4095===(d&4095)?(f=y(a,d+1),d=F(a,e,f)):d=a.memory.P(e)):d=a.b[b<<1&14];d=Ia(a,d,a.b[b>>2&14],15);192>b?f?G(a,e,f,d):a.memory.ba(e,d):a.b[b<<1&14]=d};B[9]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4093<=(d&4095)?(f=y(a,d+3),d=H(a,e,f)):d=I(a.memory,e)):d=a.a[b&7];d=Ia(a,d,a.a[b>>3&7],31);192>b?f?J(a,e,f,d):a.memory.ea(e,d):a.a[b&7]=d}; -A[10]=B[10]=function(a){var b=u(a),d=192>b?x(a,a.f(b)):a.i[b<<2&12|b>>2&1];a.i[b>>1&12|b>>5&1]=Ia(a,a.i[b>>1&12|b>>5&1],d,7)};A[11]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.b[b>>2&14]=Ia(a,a.b[b>>2&14],d,15)};B[11]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.a[b>>3&7]=Ia(a,a.a[b>>3&7],d,31)};A[12]=B[12]=function(a){a.i[0]=Ia(a,a.i[0],u(a),7)};A[13]=function(a){a.b[0]=Ia(a,a.b[0],q(a),15)};B[13]=function(a){a.a[0]=Ia(a,a.a[0],s(a),31)};A[14]=function(a){M(a,a.Q[1])}; -B[14]=function(a){N(a,a.Q[1])};A[15]=B[15]=function(a){a.Dd[u(a)](a)};A[16]=B[16]=function(a){var b=u(a),d,e;192>b?(e=y(a,a.f(b)),d=a.memory.H(e)):d=a.i[b<<2&12|b>>2&1];d=xa(a,d,a.i[b>>1&12|b>>5&1],7);192>b?a.memory.O(e,d):a.i[b<<2&12|b>>2&1]=d};A[17]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4095===(d&4095)?(f=y(a,d+1),d=F(a,e,f)):d=a.memory.P(e)):d=a.b[b<<1&14];d=xa(a,d,a.b[b>>2&14],15);192>b?f?G(a,e,f,d):a.memory.ba(e,d):a.b[b<<1&14]=d}; -B[17]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4093<=(d&4095)?(f=y(a,d+3),d=H(a,e,f)):d=I(a.memory,e)):d=a.a[b&7];d=xa(a,d,a.a[b>>3&7],31);192>b?f?J(a,e,f,d):a.memory.ea(e,d):a.a[b&7]=d};A[18]=B[18]=function(a){var b=u(a),d=192>b?x(a,a.f(b)):a.i[b<<2&12|b>>2&1];a.i[b>>1&12|b>>5&1]=xa(a,a.i[b>>1&12|b>>5&1],d,7)};A[19]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.b[b>>2&14]=xa(a,a.b[b>>2&14],d,15)}; -B[19]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.a[b>>3&7]=xa(a,a.a[b>>3&7],d,31)};A[20]=B[20]=function(a){a.i[0]=xa(a,a.i[0],u(a),7)};A[21]=function(a){a.b[0]=xa(a,a.b[0],q(a),15)};B[21]=function(a){a.a[0]=xa(a,a.a[0],s(a),31)};A[22]=function(a){M(a,a.Q[2])};B[22]=function(a){N(a,a.Q[2])};A[23]=function(a){O(a,2,K(a,vb(a,0)));a.t[a.v]+=2};B[23]=function(a){O(a,2,K(a,vb(a,0)));a.t[a.v]+=4}; -A[24]=B[24]=function(a){var b=u(a),d,e;192>b?(e=y(a,a.f(b)),d=a.memory.H(e)):d=a.i[b<<2&12|b>>2&1];d=ya(a,d,a.i[b>>1&12|b>>5&1],7);192>b?a.memory.O(e,d):a.i[b<<2&12|b>>2&1]=d};A[25]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4095===(d&4095)?(f=y(a,d+1),d=F(a,e,f)):d=a.memory.P(e)):d=a.b[b<<1&14];d=ya(a,d,a.b[b>>2&14],15);192>b?f?G(a,e,f,d):a.memory.ba(e,d):a.b[b<<1&14]=d}; -B[25]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4093<=(d&4095)?(f=y(a,d+3),d=H(a,e,f)):d=I(a.memory,e)):d=a.a[b&7];d=ya(a,d,a.a[b>>3&7],31);192>b?f?J(a,e,f,d):a.memory.ea(e,d):a.a[b&7]=d};A[26]=B[26]=function(a){var b=u(a),d=192>b?x(a,a.f(b)):a.i[b<<2&12|b>>2&1];a.i[b>>1&12|b>>5&1]=ya(a,a.i[b>>1&12|b>>5&1],d,7)};A[27]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.b[b>>2&14]=ya(a,a.b[b>>2&14],d,15)}; -B[27]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.a[b>>3&7]=ya(a,a.a[b>>3&7],d,31)};A[28]=B[28]=function(a){a.i[0]=ya(a,a.i[0],u(a),7)};A[29]=function(a){a.b[0]=ya(a,a.b[0],q(a),15)};B[29]=function(a){a.a[0]=ya(a,a.a[0],s(a),31)};A[30]=function(a){M(a,a.Q[3])};B[30]=function(a){N(a,a.Q[3])};A[31]=function(a){O(a,3,K(a,vb(a,0)));a.t[a.v]+=2};B[31]=function(a){O(a,3,K(a,vb(a,0)));a.t[a.v]+=4}; -A[32]=B[32]=function(a){var b=u(a),d,e;192>b?(e=y(a,a.f(b)),d=a.memory.H(e)):d=a.i[b<<2&12|b>>2&1];d=w(a,d,a.i[b>>1&12|b>>5&1],7);192>b?a.memory.O(e,d):a.i[b<<2&12|b>>2&1]=d};A[33]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4095===(d&4095)?(f=y(a,d+1),d=F(a,e,f)):d=a.memory.P(e)):d=a.b[b<<1&14];d=w(a,d,a.b[b>>2&14],15);192>b?f?G(a,e,f,d):a.memory.ba(e,d):a.b[b<<1&14]=d}; -B[33]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4093<=(d&4095)?(f=y(a,d+3),d=H(a,e,f)):d=I(a.memory,e)):d=a.a[b&7];d=w(a,d,a.a[b>>3&7],31);192>b?f?J(a,e,f,d):a.memory.ea(e,d):a.a[b&7]=d};A[34]=B[34]=function(a){var b=u(a),d=192>b?x(a,a.f(b)):a.i[b<<2&12|b>>2&1];a.i[b>>1&12|b>>5&1]=w(a,a.i[b>>1&12|b>>5&1],d,7)};A[35]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.b[b>>2&14]=w(a,a.b[b>>2&14],d,15)}; -B[35]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.a[b>>3&7]=w(a,a.a[b>>3&7],d,31)};A[36]=B[36]=function(a){a.i[0]=w(a,a.i[0],u(a),7)};A[37]=function(a){a.b[0]=w(a,a.b[0],q(a),15)};B[37]=function(a){a.a[0]=w(a,a.a[0],s(a),31)};A[38]=B[38]=function(a){wb(a,0)};A[39]=B[39]=function(a){var b=a.i[0],d=a.ta(),e=xb(a);a.d&=-18;if(9<(b&15)||e)a.i[0]+=6,a.d|=16;if(153b?(e=y(a,a.f(b)),d=a.memory.H(e)):d=a.i[b<<2&12|b>>2&1];d=a.sub(d,a.i[b>>1&12|b>>5&1],7);192>b?a.memory.O(e,d):a.i[b<<2&12|b>>2&1]=d};A[41]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4095===(d&4095)?(f=y(a,d+1),d=F(a,e,f)):d=a.memory.P(e)):d=a.b[b<<1&14];d=a.sub(d,a.b[b>>2&14],15);192>b?f?G(a,e,f,d):a.memory.ba(e,d):a.b[b<<1&14]=d}; -B[41]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4093<=(d&4095)?(f=y(a,d+3),d=H(a,e,f)):d=I(a.memory,e)):d=a.a[b&7];d=a.sub(d,a.a[b>>3&7],31);192>b?f?J(a,e,f,d):a.memory.ea(e,d):a.a[b&7]=d};A[42]=B[42]=function(a){var b=u(a),d=192>b?x(a,a.f(b)):a.i[b<<2&12|b>>2&1];a.i[b>>1&12|b>>5&1]=a.sub(a.i[b>>1&12|b>>5&1],d,7)};A[43]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.b[b>>2&14]=a.sub(a.b[b>>2&14],d,15)}; -B[43]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.a[b>>3&7]=a.sub(a.a[b>>3&7],d,31)};A[44]=B[44]=function(a){a.i[0]=a.sub(a.i[0],u(a),7)};A[45]=function(a){a.b[0]=a.sub(a.b[0],q(a),15)};B[45]=function(a){a.a[0]=a.sub(a.a[0],s(a),31)};A[46]=B[46]=function(a){wb(a,1)};A[47]=B[47]=function(a){var b=a.i[0],d=a.ta();a.d&=-2;9<(b&15)||xb(a)?(a.i[0]-=6,a.d|=16,a.d=a.d&-2|d|a.i[0]>>7):a.d&=-17;if(153b?(e=y(a,a.f(b)),d=a.memory.H(e)):d=a.i[b<<2&12|b>>2&1];d=Ja(a,d,a.i[b>>1&12|b>>5&1],7);192>b?a.memory.O(e,d):a.i[b<<2&12|b>>2&1]=d};A[49]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4095===(d&4095)?(f=y(a,d+1),d=F(a,e,f)):d=a.memory.P(e)):d=a.b[b<<1&14];d=Ja(a,d,a.b[b>>2&14],15);192>b?f?G(a,e,f,d):a.memory.ba(e,d):a.b[b<<1&14]=d}; -B[49]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4093<=(d&4095)?(f=y(a,d+3),d=H(a,e,f)):d=I(a.memory,e)):d=a.a[b&7];d=Ja(a,d,a.a[b>>3&7],31);192>b?f?J(a,e,f,d):a.memory.ea(e,d):a.a[b&7]=d};A[50]=B[50]=function(a){var b=u(a),d=192>b?x(a,a.f(b)):a.i[b<<2&12|b>>2&1];a.i[b>>1&12|b>>5&1]=Ja(a,a.i[b>>1&12|b>>5&1],d,7)};A[51]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.b[b>>2&14]=Ja(a,a.b[b>>2&14],d,15)}; -B[51]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.a[b>>3&7]=Ja(a,a.a[b>>3&7],d,31)};A[52]=B[52]=function(a){a.i[0]=Ja(a,a.i[0],u(a),7)};A[53]=function(a){a.b[0]=Ja(a,a.b[0],q(a),15)};B[53]=function(a){a.a[0]=Ja(a,a.a[0],s(a),31)};A[54]=B[54]=function(a){wb(a,2)};A[55]=B[55]=function(a){9<(a.i[0]&15)||xb(a)?(a.b[0]+=6,a.i[1]+=1,a.d|=17):a.d&=-18;a.i[0]&=15;a.m&=-18};A[56]=B[56]=function(a){var b=u(a),d=192>b?x(a,a.f(b)):a.i[b<<2&12|b>>2&1];a.sub(d,a.i[b>>1&12|b>>5&1],7)}; -A[57]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.sub(d,a.b[b>>2&14],15)};B[57]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.sub(d,a.a[b>>3&7],31)};A[58]=B[58]=function(a){var b=u(a),d=192>b?x(a,a.f(b)):a.i[b<<2&12|b>>2&1];a.sub(a.i[b>>1&12|b>>5&1],d,7)};A[59]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.sub(a.b[b>>2&14],d,15)};B[59]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.sub(a.a[b>>3&7],d,31)};A[60]=B[60]=function(a){a.sub(a.i[0],u(a),7)}; -A[61]=function(a){a.sub(a.b[0],q(a),15)};B[61]=function(a){a.sub(a.a[0],s(a),31)};A[62]=B[62]=function(a){wb(a,3)};A[63]=B[63]=function(a){9<(a.i[0]&15)||xb(a)?(a.b[0]-=6,--a.i[1],a.d|=17):a.d&=-18;a.i[0]&=15;a.m&=-18};A[64]=function(a){a.b[0]=Ba(a,a.b[0],15)};B[64]=function(a){a.a[0]=Ba(a,a.a[0],31)};A[65]=function(a){a.b[2]=Ba(a,a.b[2],15)};B[65]=function(a){a.a[1]=Ba(a,a.a[1],31)};A[66]=function(a){a.b[4]=Ba(a,a.b[4],15)};B[66]=function(a){a.a[2]=Ba(a,a.a[2],31)}; -A[67]=function(a){a.b[6]=Ba(a,a.b[6],15)};B[67]=function(a){a.a[3]=Ba(a,a.a[3],31)};A[68]=function(a){a.b[8]=Ba(a,a.b[8],15)};B[68]=function(a){a.a[4]=Ba(a,a.a[4],31)};A[69]=function(a){a.b[10]=Ba(a,a.b[10],15)};B[69]=function(a){a.a[5]=Ba(a,a.a[5],31)};A[70]=function(a){a.b[12]=Ba(a,a.b[12],15)};B[70]=function(a){a.a[6]=Ba(a,a.a[6],31)};A[71]=function(a){a.b[14]=Ba(a,a.b[14],15)};B[71]=function(a){a.a[7]=Ba(a,a.a[7],31)};A[72]=function(a){a.b[0]=Ca(a,a.b[0],15)}; -B[72]=function(a){a.a[0]=Ca(a,a.a[0],31)};A[73]=function(a){a.b[2]=Ca(a,a.b[2],15)};B[73]=function(a){a.a[1]=Ca(a,a.a[1],31)};A[74]=function(a){a.b[4]=Ca(a,a.b[4],15)};B[74]=function(a){a.a[2]=Ca(a,a.a[2],31)};A[75]=function(a){a.b[6]=Ca(a,a.b[6],15)};B[75]=function(a){a.a[3]=Ca(a,a.a[3],31)};A[76]=function(a){a.b[8]=Ca(a,a.b[8],15)};B[76]=function(a){a.a[4]=Ca(a,a.a[4],31)};A[77]=function(a){a.b[10]=Ca(a,a.b[10],15)};B[77]=function(a){a.a[5]=Ca(a,a.a[5],31)}; -A[78]=function(a){a.b[12]=Ca(a,a.b[12],15)};B[78]=function(a){a.a[6]=Ca(a,a.a[6],31)};A[79]=function(a){a.b[14]=Ca(a,a.b[14],15)};B[79]=function(a){a.a[7]=Ca(a,a.a[7],31)};A[80]=function(a){M(a,a.b[0])};B[80]=function(a){N(a,a.a[0])};A[81]=function(a){M(a,a.b[2])};B[81]=function(a){N(a,a.a[1])};A[82]=function(a){M(a,a.b[4])};B[82]=function(a){N(a,a.a[2])};A[83]=function(a){M(a,a.b[6])};B[83]=function(a){N(a,a.a[3])};A[84]=function(a){M(a,a.b[8])};B[84]=function(a){N(a,a.a[4])}; -A[85]=function(a){M(a,a.b[10])};B[85]=function(a){N(a,a.a[5])};A[86]=function(a){M(a,a.b[12])};B[86]=function(a){N(a,a.a[6])};A[87]=function(a){M(a,a.b[14])};B[87]=function(a){N(a,a.a[7])};A[88]=function(a){a.b[0]=P(a)};B[88]=function(a){a.a[0]=Q(a)};A[89]=function(a){a.b[2]=P(a)};B[89]=function(a){a.a[1]=Q(a)};A[90]=function(a){a.b[4]=P(a)};B[90]=function(a){a.a[2]=Q(a)};A[91]=function(a){a.b[6]=P(a)};B[91]=function(a){a.a[3]=Q(a)};A[92]=function(a){a.b[8]=P(a)};B[92]=function(a){a.a[4]=Q(a)}; -A[93]=function(a){a.b[10]=P(a)};B[93]=function(a){a.a[5]=Q(a)};A[94]=function(a){a.b[12]=P(a)};B[94]=function(a){a.a[6]=Q(a)};A[95]=function(a){a.b[14]=P(a)};B[95]=function(a){a.a[7]=Q(a)};A[96]=function(a){var b=a.b[8];y(a,a.s[2]+b-15|0);M(a,a.b[0]);M(a,a.b[2]);M(a,a.b[4]);M(a,a.b[6]);M(a,b);M(a,a.b[10]);M(a,a.b[12]);M(a,a.b[14])};B[96]=function(a){var b=a.a[4];y(a,a.s[2]+b-31|0);N(a,a.a[0]);N(a,a.a[1]);N(a,a.a[2]);N(a,a.a[3]);N(a,b);N(a,a.a[5]);N(a,a.a[6]);N(a,a.a[7])}; -A[97]=function(a){R(a,a.s[2]+a.t[a.v]+15|0);a.b[14]=P(a);a.b[12]=P(a);a.b[10]=P(a);a.t[a.v]+=2;a.b[6]=P(a);a.b[4]=P(a);a.b[2]=P(a);a.b[0]=P(a)};B[97]=function(a){R(a,a.s[2]+a.t[a.v]+31|0);a.a[7]=Q(a);a.a[6]=Q(a);a.a[5]=Q(a);a.t[a.v]+=4;a.a[3]=Q(a);a.a[2]=Q(a);a.a[1]=Q(a);a.a[0]=Q(a)};A[98]=B[98]=function(){}; -A[99]=B[99]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4095===(d&4095)?(f=y(a,d+1),d=F(a,e,f)):d=a.memory.P(e)):d=a.b[b<<1&14];var g=b>>2&14;a.m&=-65;(d&3)<(a.b[g]&3)?(a.d|=64,d=d&-4|a.b[g]&3):a.d&=-65;192>b?f?G(a,e,f,d):a.memory.ba(e,d):a.b[b<<1&14]=d};A[100]=B[100]=function(a){wb(a,4)};A[101]=B[101]=function(a){wb(a,5)};A[102]=B[102]=function(a){a.Ta=!a.ya;qa(a);a.table[u(a)](a);a.Ta=a.ya;qa(a)};A[103]=B[103]=function(a){a.$a=!a.ya;pa(a);a.table[u(a)](a);a.$a=a.ya;pa(a)}; -A[104]=function(a){M(a,q(a))};B[104]=function(a){N(a,s(a))};A[105]=function(a){var b=u(a),d=192>b?K(a,a.f(b))<<16>>16:a.ja[b<<1&14];a.b[b>>2&14]=Ea(a,q(a)<<16>>16,d)};B[105]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.a[b>>3&7]=Fa(a,s(a),d)};A[106]=function(a){M(a,p(a))};B[106]=function(a){N(a,p(a))};A[107]=function(a){var b=u(a),d=192>b?K(a,a.f(b))<<16>>16:a.ja[b<<1&14];a.b[b>>2&14]=Ea(a,p(a),d)};B[107]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.a[b>>3&7]=Fa(a,p(a),d)}; -A[108]=B[108]=function(a){a:{var b=a.b[4];yb(a,b,1);var d,e=a.d&1024?-1:1,f=!1;d=a.s[0]+a.g[a.n]|0;if(0!==a.T){var g=a.g[a.w]>>>0,k=g;if(0===g)break a;var t=16384,v=e>>31|1;a.r&&(t=Math.min(t,(v>>1^~d)&4095),d=y(a,d));do a.memory.O(d,a.o.Qc(b)),d+=v,f=0!==--g&&!0;while(f&&t--);a.g[a.n]+=e*(k-g)|0;a.g[a.w]=g;a.J+=k-g}else d=y(a,d),a.memory.O(d,a.o.Qc(b)),a.g[a.n]+=e;f&&(a.k=a.V)}}; -A[109]=function(a){a:{var b=a.b[4];yb(a,b,2);var d,e=a.d&1024?-2:2,f=!1;d=a.s[0]+a.g[a.n]|0;if(0!==a.T){var g=a.g[a.w]>>>0,k=g;if(0===g)break a;var t=16384;if(d&1){do S(a,d,a.o.jc(b)),d+=e,a.g[a.n]+=e,f=0!==--a.g[a.w]&&!0;while(f&&t--)}else{var v=e>>31|1;a.r&&(t=Math.min(t,(v>>1^~d)&4095),d=y(a,d),t>>=1);d>>>=1;do Ab(a.memory,d,a.o.jc(b)),d+=v,f=0!==--g&&!0;while(f&&t--);a.g[a.n]+=e*(k-g)|0;a.g[a.w]=g;a.J+=k-g}}else S(a,d,a.o.jc(b)),a.g[a.n]+=e;f&&(a.k=a.V)}}; -B[109]=function(a){a:{var b=a.b[4];yb(a,b,4);var d,e=a.d&1024?-4:4,f=!1;d=a.s[0]+a.g[a.n]|0;if(0!==a.T){var g=a.g[a.w]>>>0,k=g;if(0===g)break a;var t=16384;if(d&3){do U(a,d,a.o.kc(b)),d+=e,a.g[a.n]+=e,f=0!==--a.g[a.w]&&!0;while(f&&t--)}else{var v=e>>31|1;a.r&&(t=Math.min(t,(v>>1^~d)&4095),d=y(a,d),t>>=2);d>>>=2;do Bb(a.memory,d,a.o.kc(b)),d+=v,f=0!==--g&&!0;while(f&&t--);a.g[a.n]+=e*(k-g)|0;a.g[a.w]=g;a.J+=k-g}}else U(a,d,a.o.kc(b)),a.g[a.n]+=e;f&&(a.k=a.V)}}; -A[110]=B[110]=function(a){a:{var b=a.b[4];yb(a,b,1);var d,e=a.d&1024?-1:1,f=!1;d=Cb(a,3)+a.g[a.q]|0;if(0!==a.T){var g=a.g[a.w]>>>0,k=g;if(0===g)break a;var t=16384,v=e>>31|1;a.r&&(t=(v>>1^~d)&4095,d=R(a,d));do a.o.Rc(b,a.memory.H(d)),d+=v,f=0!==--g&&!0;while(f&&t--);a.g[a.q]+=e*(k-g)|0;a.g[a.w]=g;a.J+=k-g}else d=R(a,d),a.o.Rc(b,a.memory.H(d)),a.g[a.q]+=e;f&&(a.k=a.V)}}; -A[111]=function(a){a:{var b=a.b[4];yb(a,b,2);var d,e=a.d&1024?-2:2,f=!1;d=Cb(a,3)+a.g[a.q]|0;if(0!==a.T){var g=a.g[a.w]>>>0,k=g;if(0===g)break a;var t=16384;if(d&1){do a.o.lc(b,K(a,d)),d+=e,a.g[a.q]+=e,f=0!==--a.g[a.w]&&!0;while(f&&t--)}else{var v=e>>31|1;a.r&&(t=(v>>1^~d)&4095,d=R(a,d),t>>=1);d>>>=1;do a.o.lc(b,Db(a.memory,d)),d+=v,f=0!==--g&&!0;while(f&&t--);a.g[a.q]+=e*(k-g)|0;a.g[a.w]=g;a.J+=k-g}}else a.o.lc(b,K(a,d)),a.g[a.q]+=e;f&&(a.k=a.V)}}; -B[111]=function(a){a:{var b=a.b[4];yb(a,b,4);var d,e=a.d&1024?-4:4,f=!1;d=Cb(a,3)+a.g[a.q]|0;if(0!==a.T){var g=a.g[a.w]>>>0,k=g;if(0===g)break a;var t=16384;if(d&3){do a.o.mc(b,L(a,d)),d+=e,a.g[a.q]+=e,f=0!==--a.g[a.w]&&!0;while(f&&t--)}else{var v=e>>31|1;a.r&&(t=(v>>1^~d)&4095,d=R(a,d),t>>=2);d>>>=2;do a.o.mc(b,Eb(a.memory,d)),d+=v,f=0!==--g&&!0;while(f&&t--);a.g[a.q]+=e*(k-g)|0;a.g[a.w]=g;a.J+=k-g}}else a.o.mc(b,L(a,d)),a.g[a.q]+=e;f&&(a.k=a.V)}}; -A[112]=B[112]=function(a){a.Pa()&&(a.k=a.k+p(a)|0);a.k++;a.G=!0};A[113]=B[113]=function(a){a.Pa()||(a.k=a.k+p(a)|0);a.k++;a.G=!0};A[114]=B[114]=function(a){a.Ea()&&(a.k=a.k+p(a)|0);a.k++;a.G=!0};A[115]=B[115]=function(a){a.Ea()||(a.k=a.k+p(a)|0);a.k++;a.G=!0};A[116]=B[116]=function(a){a.Ga()&&(a.k=a.k+p(a)|0);a.k++;a.G=!0};A[117]=B[117]=function(a){a.Ga()||(a.k=a.k+p(a)|0);a.k++;a.G=!0};A[118]=B[118]=function(a){Fb(a)&&(a.k=a.k+p(a)|0);a.k++;a.G=!0}; -A[119]=B[119]=function(a){Fb(a)||(a.k=a.k+p(a)|0);a.k++;a.G=!0};A[120]=B[120]=function(a){a.Qa()&&(a.k=a.k+p(a)|0);a.k++;a.G=!0};A[121]=B[121]=function(a){a.Qa()||(a.k=a.k+p(a)|0);a.k++;a.G=!0};A[122]=B[122]=function(a){a.Fa()&&(a.k=a.k+p(a)|0);a.k++;a.G=!0};A[123]=B[123]=function(a){a.Fa()||(a.k=a.k+p(a)|0);a.k++;a.G=!0};A[124]=B[124]=function(a){Gb(a)&&(a.k=a.k+p(a)|0);a.k++;a.G=!0};A[125]=B[125]=function(a){Gb(a)||(a.k=a.k+p(a)|0);a.k++;a.G=!0}; -A[126]=B[126]=function(a){Hb(a)&&(a.k=a.k+p(a)|0);a.k++;a.G=!0};A[127]=B[127]=function(a){Hb(a)||(a.k=a.k+p(a)|0);a.k++;a.G=!0}; -A[128]=B[128]=function(a){var b=u(a);if(56===(b&56)){var d=192>b?x(a,a.f(b)):a.i[b<<2&12|b>>2&1];a.sub(d,u(a),7)}else{var e,f,g;192>b?(f=y(a,a.f(b)),d=a.memory.H(f)):d=a.i[b<<2&12|b>>2&1];g=0;e=u(a);switch(b>>3&7){case 0:g=a.add(d,e,7);break;case 1:g=Ia(a,d,e,7);break;case 2:g=xa(a,d,e,7);break;case 3:g=ya(a,d,e,7);break;case 4:g=w(a,d,e,7);break;case 5:g=a.sub(d,e,7);break;case 6:g=Ja(a,d,e,7);break;case 7:g=Ib.bind(this,0)(d,e)}192>b?a.memory.O(f,g):a.i[b<<2&12|b>>2&1]=g}}; -A[129]=function(a){var b=u(a);if(56===(b&56)){var d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.sub(d,q(a),15)}else{var e,f,g=0,k;192>b?(d=a.f(b),f=y(a,d),a.r&&4095===(d&4095)?(g=y(a,d+1),d=F(a,f,g)):d=a.memory.P(f)):d=a.b[b<<1&14];k=0;e=q(a);switch(b>>3&7){case 0:k=a.add(d,e,15);break;case 1:k=Ia(a,d,e,15);break;case 2:k=xa(a,d,e,15);break;case 3:k=ya(a,d,e,15);break;case 4:k=w(a,d,e,15);break;case 5:k=a.sub(d,e,15);break;case 6:k=Ja(a,d,e,15);break;case 7:k=Ib.bind(this,0)(d,e)}192>b?g?G(a,f,g,k):a.memory.ba(f, -k):a.b[b<<1&14]=k}}; -B[129]=function(a){var b=u(a);if(56===(b&56)){var d=192>b?L(a,a.f(b)):a.a[b&7];a.sub(d,s(a),31)}else{var e,f,g=0,k;192>b?(d=a.f(b),f=y(a,d),a.r&&4093<=(d&4095)?(g=y(a,d+3),d=H(a,f,g)):d=I(a.memory,f)):d=a.a[b&7];k=0;e=s(a);switch(b>>3&7){case 0:k=a.add(d,e,31);break;case 1:k=Ia(a,d,e,31);break;case 2:k=xa(a,d,e,31);break;case 3:k=ya(a,d,e,31);break;case 4:k=w(a,d,e,31);break;case 5:k=a.sub(d,e,31);break;case 6:k=Ja(a,d,e,31);break;case 7:k=Ib.bind(this,0)(d,e)}192>b?g?J(a,f,g,k):a.memory.ea(f,k): -a.a[b&7]=k}};A[130]=B[130]=function(a){a.table[128](a)}; -A[131]=function(a){var b=u(a);if(56===(b&56)){var d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.sub(d,p(a),15)}else{var e,f,g=0,k;192>b?(d=a.f(b),f=y(a,d),a.r&&4095===(d&4095)?(g=y(a,d+1),d=F(a,f,g)):d=a.memory.P(f)):d=a.b[b<<1&14];k=0;e=p(a);switch(b>>3&7){case 0:k=a.add(d,e,15);break;case 1:k=Ia(a,d,e,15);break;case 2:k=xa(a,d,e,15);break;case 3:k=ya(a,d,e,15);break;case 4:k=w(a,d,e,15);break;case 5:k=a.sub(d,e,15);break;case 6:k=Ja(a,d,e,15);break;case 7:k=Ib.bind(this,0)(d,e)}192>b?g?G(a,f,g,k):a.memory.ba(f, -k):a.b[b<<1&14]=k}}; -B[131]=function(a){var b=u(a);if(56===(b&56)){var d=192>b?L(a,a.f(b)):a.a[b&7];a.sub(d,p(a),31)}else{var e,f,g=0,k;192>b?(d=a.f(b),f=y(a,d),a.r&&4093<=(d&4095)?(g=y(a,d+3),d=H(a,f,g)):d=I(a.memory,f)):d=a.a[b&7];k=0;e=p(a);switch(b>>3&7){case 0:k=a.add(d,e,31);break;case 1:k=Ia(a,d,e,31);break;case 2:k=xa(a,d,e,31);break;case 3:k=ya(a,d,e,31);break;case 4:k=w(a,d,e,31);break;case 5:k=a.sub(d,e,31);break;case 6:k=Ja(a,d,e,31);break;case 7:k=Ib.bind(this,0)(d,e)}192>b?g?J(a,f,g,k):a.memory.ea(f,k): -a.a[b&7]=k}};A[132]=B[132]=function(a){var b=u(a),d=192>b?x(a,a.f(b)):a.i[b<<2&12|b>>2&1];w(a,d,a.i[b>>1&12|b>>5&1],7)};A[133]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];w(a,d,a.b[b>>2&14],15)};B[133]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];w(a,d,a.a[b>>3&7],31)};A[134]=B[134]=function(a){var b=u(a),d,e;192>b?(e=y(a,a.f(b)),d=a.memory.H(e)):d=a.i[b<<2&12|b>>2&1];var f=b>>1&12|b>>5&1,g=a.i[f];a.i[f]=d;192>b?a.memory.O(e,g):a.i[b<<2&12|b>>2&1]=g}; -A[135]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4095===(d&4095)?(f=y(a,d+1),d=F(a,e,f)):d=a.memory.P(e)):d=a.b[b<<1&14];var g=b>>2&14,k=a.b[g];a.b[g]=d;192>b?f?G(a,e,f,k):a.memory.ba(e,k):a.b[b<<1&14]=k};B[135]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4093<=(d&4095)?(f=y(a,d+3),d=H(a,e,f)):d=I(a.memory,e)):d=a.a[b&7];var g=b>>3&7,k=a.a[g];a.a[g]=d;192>b?f?J(a,e,f,k):a.memory.ea(e,k):a.a[b&7]=k}; -A[136]=B[136]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=a.i[b>>1&12|b>>5&1];192>b?Jb(a,d,e):a.i[b<<2&12|b>>2&1]=e};A[137]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=a.b[b>>2&14];192>b?S(a,d,e):a.b[b<<1&14]=e};B[137]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=a.a[b>>3&7];192>b?U(a,d,e):a.fb[b&7]=e};A[138]=B[138]=function(a){var b=u(a),d=192>b?x(a,a.f(b)):a.i[b<<2&12|b>>2&1];a.i[b>>1&12|b>>5&1]=d};A[139]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.b[b>>2&14]=d}; -B[139]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.a[b>>3&7]=d};A[140]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=a.Q[b>>3&7];192>b?S(a,d,e):a.b[b<<1&14]=e};B[140]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=a.Q[b>>3&7];192>b?U(a,d,e):a.fb[b&7]=e};A[141]=function(a){var b=u(a);192<=b&&V(a);a.Ka=9;a.b[(b>>3&7)<<1]=a.f(b);a.Ka=-1};B[141]=function(a){var b=u(a);192<=b&&V(a);a.Ka=9;a.a[b>>3&7]=a.f(b);a.Ka=-1}; -A[142]=B[142]=function(a){var b=u(a),d=b>>3&7,b=192>b?K(a,a.f(b)):a.b[b<<1&14];O(a,d,b)};A[143]=function(a){var b=u(a),d=K(a,vb(a,0));a.t[a.v]+=2;192>b?(b=a.f(b),a.t[a.v]-=2,S(a,b,d),a.t[a.v]+=2):a.b[b<<1&14]=d};B[143]=function(a){var b=u(a),d=L(a,vb(a,0));a.t[a.v]+=4;192>b?(b=a.f(b),a.t[a.v]-=4,U(a,b,d),a.t[a.v]+=4):a.a[b&7]=d};A[144]=function(a){Kb(a,0)};B[144]=function(a){Lb(a,0)};A[145]=function(a){Kb(a,2)};B[145]=function(a){Lb(a,1)};A[146]=function(a){Kb(a,4)};B[146]=function(a){Lb(a,2)}; -A[147]=function(a){Kb(a,6)};B[147]=function(a){Lb(a,3)};A[148]=function(a){Kb(a,8)};B[148]=function(a){Lb(a,4)};A[149]=function(a){Kb(a,10)};B[149]=function(a){Lb(a,5)};A[150]=function(a){Kb(a,12)};B[150]=function(a){Lb(a,6)};A[151]=function(a){Kb(a,14)};B[151]=function(a){Lb(a,7)};A[144]=B[144]=function(){};A[152]=function(a){a.b[0]=a.vb[0]};B[152]=function(a){a.a[0]=a.ja[0]};A[153]=function(a){a.b[4]=a.ja[0]>>15};B[153]=function(a){a.a[2]=a.a[0]>>31}; -A[154]=function(a){var b=q(a),d=q(a);Mb(a,vb(a,-4),4);M(a,a.Q[1]);M(a,Nb(a));O(a,1,d);a.k=a.s[1]+b|0;a.G=!0};B[154]=function(a){var b=s(a),d=q(a);Mb(a,vb(a,-8),8);N(a,a.Q[1]);N(a,Nb(a));O(a,1,d);a.k=a.s[1]+b|0;a.G=!0};A[155]=B[155]=function(a){10===(a.Z&10)&&Ob(a)};A[156]=function(a){a.d&131072&&3>(a.d>>12&3)?W(a,0):(Pb(a),M(a,a.d))};B[156]=function(a){a.d&131072&&3>(a.d>>12&3)?W(a,0):(Pb(a),N(a,a.d&-196609))};A[157]=function(a){a.d&131072&&3>(a.d>>12&3)&&W(a,0);Qb(a,a.d&-65536|P(a));Rb(a)}; -B[157]=function(a){a.d&131072&&3>(a.d>>12&3)&&W(a,0);Qb(a,Q(a));Rb(a)};A[158]=B[158]=function(a){a.d=a.d&-256|a.i[1];a.d=a.d&4161493|2;a.m=0};A[159]=B[159]=function(a){Pb(a);a.i[1]=a.d};A[160]=B[160]=function(a){var b=x(a,Sb(a));a.i[0]=b};A[161]=function(a){var b=K(a,Sb(a));a.b[0]=b};B[161]=function(a){var b=L(a,Sb(a));a.a[0]=b};A[162]=B[162]=function(a){Jb(a,Sb(a),a.i[0])};A[163]=function(a){S(a,Sb(a),a.b[0])};B[163]=function(a){U(a,Sb(a),a.a[0])}; -A[164]=B[164]=function(a){a:{var b,d,e=a.d&1024?-1:1,f=!1;d=a.s[0]+a.g[a.n]|0;b=Cb(a,3)+a.g[a.q]|0;if(0!==a.T){var g=a.g[a.w]>>>0,k=g;if(0===g)break a;var t=16384,v=e>>31|1;a.r&&(t=(v>>1^~b)&4095,b=R(a,b),t=Math.min(t,(v>>1^~d)&4095),d=y(a,d));do a.memory.O(d,a.memory.H(b)),d+=v,b+=v,f=0!==--g&&!0;while(f&&t--);e=e*(k-g)|0;a.g[a.n]+=e;a.g[a.q]+=e;a.g[a.w]=g;a.J+=k-g}else b=R(a,b),d=y(a,d),a.memory.O(d,a.memory.H(b)),a.g[a.n]+=e,a.g[a.q]+=e;f&&(a.k=a.V)}}; -A[165]=function(a){a:{var b,d,e=a.d&1024?-2:2,f=!1;d=a.s[0]+a.g[a.n]|0;b=Cb(a,3)+a.g[a.q]|0;if(0!==a.T){var g=a.g[a.w]>>>0,k=g;if(0===g)break a;var t=16384;if(d&1||b&1){do S(a,d,K(a,b)),d+=e,a.g[a.n]+=e,b+=e,a.g[a.q]+=e,f=0!==--a.g[a.w]&&!0;while(f&&t--)}else{var v=e>>31|1;a.r&&(t=(v>>1^~b)&4095,b=R(a,b),t=Math.min(t,(v>>1^~d)&4095),d=y(a,d),t>>=1);d>>>=1;b>>>=1;do Ab(a.memory,d,Db(a.memory,b)),d+=v,b+=v,f=0!==--g&&!0;while(f&&t--);e=e*(k-g)|0;a.g[a.n]+=e;a.g[a.q]+=e;a.g[a.w]=g;a.J+=k-g}}else S(a, -d,K(a,b)),a.g[a.n]+=e,a.g[a.q]+=e;f&&(a.k=a.V)}}; -B[165]=function(a){a:{if(0!==a.T){var b=Cb(a,3)+a.g[a.q],d=a.s[0]+a.g[a.n],e=a.g[a.w]>>>0;if(!e)break a;var f=a.r?4095:3;if(0===(d&f)&&0===(b&f)&&0===(a.d&1024)&&(f=!1,a.r&&(b=R(a,b),d=y(a,d),1024>=2;a.memory.eb.set(a.memory.eb.subarray(b,b+e),d>>2);f&&(a.k=a.V);break a}}g=a.d&1024?-4:4;f=!1;d=a.s[0]+a.g[a.n]|0;b=Cb(a,3)+a.g[a.q]|0;if(0!==a.T){var k=e=a.g[a.w]>>>0;if(0===e)break a;var t=16384;if(d&3|| -b&3){do U(a,d,L(a,b)),d+=g,a.g[a.n]+=g,b+=g,a.g[a.q]+=g,f=0!==--a.g[a.w]&&!0;while(f&&t--)}else{var v=g>>31|1;a.r&&(t=(v>>1^~b)&4095,b=R(a,b),t=Math.min(t,(v>>1^~d)&4095),d=y(a,d),t>>=2);d>>>=2;b>>>=2;do Bb(a.memory,d,Eb(a.memory,b)),d+=v,b+=v,f=0!==--e&&!0;while(f&&t--);g=g*(k-e)|0;a.g[a.n]+=g;a.g[a.q]+=g;a.g[a.w]=e;a.J+=k-e}}else U(a,d,L(a,b)),a.g[a.n]+=g,a.g[a.q]+=g;f&&(a.k=a.V)}}; -A[166]=B[166]=function(a){a:{var b,d;d=0;var e,f,g=a.d&1024?-1:1,k=!1;d=a.s[0]+a.g[a.n]|0;b=Cb(a,3)+a.g[a.q]|0;if(0!==a.T){var t=a.g[a.w]>>>0,v=t;if(0===t)break a;var z=16384,D=g>>31|1;a.r?(z=(D>>1^~b)&4095,f=R(a,b),z=Math.min(z,(D>>1^~d)&4095),e=R(a,d)):(e=d,f=b);do d=a.memory.H(e),b=a.memory.H(f),e+=D,f+=D,k=0!==--t&&b===d===(2===a.T);while(k&&z--);g=g*(v-t)|0;a.g[a.n]+=g;a.g[a.q]+=g;a.g[a.w]=t;a.J+=v-t}else f=R(a,b),e=R(a,d),d=a.memory.H(e),b=a.memory.H(f),a.g[a.n]+=g,a.g[a.q]+=g;a.sub(b,d,7); -k&&(a.k=a.V)}}; -A[167]=function(a){a:{var b,d,e,f=0,g=a.d&1024?-2:2,k=!1;d=a.s[0]+a.g[a.n]|0;b=Cb(a,3)+a.g[a.q]|0;if(0!==a.T){var t=a.g[a.w]>>>0,v=t;if(0===t)break a;var z=16384;if(d&1||b&1){do f=K(a,d),e=K(a,b),d+=g,a.g[a.n]+=g,b+=g,a.g[a.q]+=g,k=0!==--a.g[a.w]&&e===f===(2===a.T);while(k&&z--)}else{var D=g>>31|1;a.r&&(z=(D>>1^~b)&4095,b=R(a,b),z=Math.min(z,(D>>1^~d)&4095),d=R(a,d),z>>=1);d>>>=1;b>>>=1;do f=Db(a.memory,d),e=Db(a.memory,b),d+=D,b+=D,k=0!==--t&&e===f===(2===a.T);while(k&&z--);g=g*(v-t)|0;a.g[a.n]+= -g;a.g[a.q]+=g;a.g[a.w]=t;a.J+=v-t}}else f=K(a,d),e=K(a,b),a.g[a.n]+=g,a.g[a.q]+=g;a.sub(e,f,15);k&&(a.k=a.V)}}; -B[167]=function(a){a:{var b,d,e,f=0,g=a.d&1024?-4:4,k=!1;d=a.s[0]+a.g[a.n]|0;b=Cb(a,3)+a.g[a.q]|0;if(0!==a.T){var t=a.g[a.w]>>>0,v=t;if(0===t)break a;var z=16384;if(d&3||b&3){do f=L(a,d),e=L(a,b),d+=g,a.g[a.n]+=g,b+=g,a.g[a.q]+=g,k=0!==--a.g[a.w]&&e===f===(2===a.T);while(k&&z--)}else{var D=g>>31|1;a.r&&(z=(D>>1^~b)&4095,b=R(a,b),z=Math.min(z,(D>>1^~d)&4095),d=R(a,d),z>>=2);d>>>=2;b>>>=2;do f=Eb(a.memory,d),e=Eb(a.memory,b),d+=D,b+=D,k=0!==--t&&e===f===(2===a.T);while(k&&z--);g=g*(v-t)|0;a.g[a.n]+= -g;a.g[a.q]+=g;a.g[a.w]=t;a.J+=v-t}}else f=L(a,d),e=L(a,b),a.g[a.n]+=g,a.g[a.q]+=g;a.sub(e,f,31);k&&(a.k=a.V)}};A[168]=B[168]=function(a){w(a,a.i[0],u(a),7)};A[169]=function(a){w(a,a.b[0],q(a),15)};B[169]=function(a){w(a,a.a[0],s(a),31)}; -A[170]=B[170]=function(a){a:{var b=a.i[0],d,e=a.d&1024?-1:1,f=!1;d=a.s[0]+a.g[a.n]|0;if(0!==a.T){var g=a.g[a.w]>>>0,k=g;if(0===g)break a;var t=16384,v=e>>31|1;a.r&&(t=Math.min(t,(v>>1^~d)&4095),d=y(a,d));do a.memory.O(d,b),d+=v,f=0!==--g&&!0;while(f&&t--);a.g[a.n]+=e*(k-g)|0;a.g[a.w]=g;a.J+=k-g}else d=y(a,d),a.memory.O(d,b),a.g[a.n]+=e;f&&(a.k=a.V)}}; -A[171]=function(a){a:{var b=a.b[0],d,e=a.d&1024?-2:2,f=!1;d=a.s[0]+a.g[a.n]|0;if(0!==a.T){var g=a.g[a.w]>>>0,k=g;if(0===g)break a;var t=16384;if(d&1){do S(a,d,b),d+=e,a.g[a.n]+=e,f=0!==--a.g[a.w]&&!0;while(f&&t--)}else{var v=e>>31|1;a.r&&(t=Math.min(t,(v>>1^~d)&4095),d=y(a,d),t>>=1);d>>>=1;do Ab(a.memory,d,b),d+=v,f=0!==--g&&!0;while(f&&t--);a.g[a.n]+=e*(k-g)|0;a.g[a.w]=g;a.J+=k-g}}else S(a,d,b),a.g[a.n]+=e;f&&(a.k=a.V)}}; -B[171]=function(a){a:{var b=a.a[0],d,e=a.d&1024?-4:4,f=!1;d=a.s[0]+a.g[a.n]|0;if(0!==a.T){var g=a.g[a.w]>>>0,k=g;if(0===g)break a;var t=16384;if(d&3){do U(a,d,b),d+=e,a.g[a.n]+=e,f=0!==--a.g[a.w]&&!0;while(f&&t--)}else{var v=e>>31|1;a.r&&(t=Math.min(t,(v>>1^~d)&4095),d=y(a,d),t>>=2);d>>>=2;do Bb(a.memory,d,b),d+=v,f=0!==--g&&!0;while(f&&t--);a.g[a.n]+=e*(k-g)|0;a.g[a.w]=g;a.J+=k-g}}else U(a,d,b),a.g[a.n]+=e;f&&(a.k=a.V)}}; -A[172]=B[172]=function(a){a:{var b,d=a.d&1024?-1:1,e=!1;b=Cb(a,3)+a.g[a.q]|0;if(0!==a.T){var f=a.g[a.w]>>>0,g=f;if(0===f)break a;var k=16384,t=d>>31|1;a.r&&(k=(t>>1^~b)&4095,b=R(a,b));do a.i[0]=a.memory.H(b),b+=t,e=0!==--f&&!0;while(e&&k--);a.g[a.q]+=d*(g-f)|0;a.g[a.w]=f;a.J+=g-f}else b=R(a,b),a.i[0]=a.memory.H(b),a.g[a.q]+=d;e&&(a.k=a.V)}}; -A[173]=function(a){a:{var b,d=a.d&1024?-2:2,e=!1;b=Cb(a,3)+a.g[a.q]|0;if(0!==a.T){var f=a.g[a.w]>>>0,g=f;if(0===f)break a;var k=16384;if(b&1){do a.b[0]=K(a,b),b+=d,a.g[a.q]+=d,e=0!==--a.g[a.w]&&!0;while(e&&k--)}else{var t=d>>31|1;a.r&&(k=(t>>1^~b)&4095,b=R(a,b),k>>=1);b>>>=1;do a.b[0]=Db(a.memory,b),b+=t,e=0!==--f&&!0;while(e&&k--);a.g[a.q]+=d*(g-f)|0;a.g[a.w]=f;a.J+=g-f}}else a.b[0]=K(a,b),a.g[a.q]+=d;e&&(a.k=a.V)}}; -B[173]=function(a){a:{var b,d=a.d&1024?-4:4,e=!1;b=Cb(a,3)+a.g[a.q]|0;if(0!==a.T){var f=a.g[a.w]>>>0,g=f;if(0===f)break a;var k=16384;if(b&3){do a.a[0]=L(a,b),b+=d,a.g[a.q]+=d,e=0!==--a.g[a.w]&&!0;while(e&&k--)}else{var t=d>>31|1;a.r&&(k=(t>>1^~b)&4095,b=R(a,b),k>>=2);b>>>=2;do a.a[0]=Eb(a.memory,b),b+=t,e=0!==--f&&!0;while(e&&k--);a.g[a.q]+=d*(g-f)|0;a.g[a.w]=f;a.J+=g-f}}else a.a[0]=L(a,b),a.g[a.q]+=d;e&&(a.k=a.V)}}; -A[174]=B[174]=function(a){a:{var b,d;b=0;var e,f=a.d&1024?-1:1,g=!1;d=a.i[0];b=a.s[0]+a.g[a.n]|0;if(0!==a.T){var k=a.g[a.w]>>>0,t=k;if(0===k)break a;var v=16384,z=f>>31|1;a.r?(v=Math.min(v,(z>>1^~b)&4095),e=R(a,b)):e=b;do b=a.memory.H(e),e+=z,g=0!==--k&&d===b===(2===a.T);while(g&&v--);a.g[a.n]+=f*(t-k)|0;a.g[a.w]=k;a.J+=t-k}else e=R(a,b),b=a.memory.H(e),a.g[a.n]+=f;a.sub(d,b,7);g&&(a.k=a.V)}}; -A[175]=function(a){a:{var b,d,e=0,f=a.d&1024?-2:2,g=!1;d=a.b[0];b=a.s[0]+a.g[a.n]|0;if(0!==a.T){var k=a.g[a.w]>>>0,t=k;if(0===k)break a;var v=16384;if(b&1){do e=K(a,b),b+=f,a.g[a.n]+=f,g=0!==--a.g[a.w]&&d===e===(2===a.T);while(g&&v--)}else{var z=f>>31|1;a.r&&(v=Math.min(v,(z>>1^~b)&4095),b=R(a,b),v>>=1);b>>>=1;do e=Db(a.memory,b),b+=z,g=0!==--k&&d===e===(2===a.T);while(g&&v--);a.g[a.n]+=f*(t-k)|0;a.g[a.w]=k;a.J+=t-k}}else e=K(a,b),a.g[a.n]+=f;a.sub(d,e,15);g&&(a.k=a.V)}}; -B[175]=function(a){a:{var b,d,e=0,f=a.d&1024?-4:4,g=!1;d=a.a[0];b=a.s[0]+a.g[a.n]|0;if(0!==a.T){var k=a.g[a.w]>>>0,t=k;if(0===k)break a;var v=16384;if(b&3){do e=L(a,b),b+=f,a.g[a.n]+=f,g=0!==--a.g[a.w]&&d===e===(2===a.T);while(g&&v--)}else{var z=f>>31|1;a.r&&(v=Math.min(v,(z>>1^~b)&4095),b=R(a,b),v>>=2);b>>>=2;do e=Eb(a.memory,b),b+=z,g=0!==--k&&d===e===(2===a.T);while(g&&v--);a.g[a.n]+=f*(t-k)|0;a.g[a.w]=k;a.J+=t-k}}else e=L(a,b),a.g[a.n]+=f;a.sub(d,e,31);g&&(a.k=a.V)}}; -A[176]=B[176]=function(a){a.i[0]=u(a)};A[177]=B[177]=function(a){a.i[4]=u(a)};A[178]=B[178]=function(a){a.i[8]=u(a)};A[179]=B[179]=function(a){a.i[12]=u(a)};A[180]=B[180]=function(a){a.i[1]=u(a)};A[181]=B[181]=function(a){a.i[5]=u(a)};A[182]=B[182]=function(a){a.i[9]=u(a)};A[183]=B[183]=function(a){a.i[13]=u(a)};A[184]=function(a){a.b[0]=q(a)};B[184]=function(a){a.a[0]=s(a)};A[185]=function(a){a.b[2]=q(a)};B[185]=function(a){a.a[1]=s(a)};A[186]=function(a){a.b[4]=q(a)};B[186]=function(a){a.a[2]=s(a)}; -A[187]=function(a){a.b[6]=q(a)};B[187]=function(a){a.a[3]=s(a)};A[188]=function(a){a.b[8]=q(a)};B[188]=function(a){a.a[4]=s(a)};A[189]=function(a){a.b[10]=q(a)};B[189]=function(a){a.a[5]=s(a)};A[190]=function(a){a.b[12]=q(a)};B[190]=function(a){a.a[6]=s(a)};A[191]=function(a){a.b[14]=q(a)};B[191]=function(a){a.a[7]=s(a)}; -A[192]=B[192]=function(a){var b=u(a),d,e,f,g;192>b?(f=y(a,a.f(b)),e=a.memory.H(f)):e=a.i[b<<2&12|b>>2&1];g=0;d=u(a)&31;switch(b>>3&7){case 0:g=Ka(a,e,d);break;case 1:g=Sa(a,e,d);break;case 2:g=Pa(a,e,d);break;case 3:g=Va(a,e,d);break;case 4:g=Ya(a,e,d);break;case 5:g=ab(a,e,d);break;case 6:g=Ya(a,e,d);break;case 7:g=db(a,e,d)}192>b?a.memory.O(f,g):a.i[b<<2&12|b>>2&1]=g}; -A[193]=function(a){var b=u(a),d,e,f,g=0,k;192>b?(d=a.f(b),f=y(a,d),a.r&&4095===(d&4095)?(g=y(a,d+1),e=F(a,f,g)):e=a.memory.P(f)):e=a.b[b<<1&14];k=0;d=u(a)&31;switch(b>>3&7){case 0:k=La(a,e,d);break;case 1:k=Ta(a,e,d);break;case 2:k=Qa(a,e,d);break;case 3:k=Wa(a,e,d);break;case 4:k=Za(a,e,d);break;case 5:k=bb(a,e,d);break;case 6:k=Za(a,e,d);break;case 7:k=eb(a,e,d)}192>b?g?G(a,f,g,k):a.memory.ba(f,k):a.b[b<<1&14]=k}; -B[193]=function(a){var b=u(a),d,e,f,g=0,k;192>b?(d=a.f(b),f=y(a,d),a.r&&4093<=(d&4095)?(g=y(a,d+3),e=H(a,f,g)):e=I(a.memory,f)):e=a.a[b&7];k=0;d=u(a)&31;switch(b>>3&7){case 0:k=Ma(a,e,d);break;case 1:k=Ua(a,e,d);break;case 2:k=Ra(a,e,d);break;case 3:k=Xa(a,e,d);break;case 4:k=$a(a,e,d);break;case 5:k=cb(a,e,d);break;case 6:k=$a(a,e,d);break;case 7:k=fb(a,e,d)}192>b?g?J(a,f,g,k):a.memory.ea(f,k):a.a[b&7]=k};A[194]=function(a){var b=q(a);a.k=a.s[1]+P(a)|0;a.t[a.v]+=b;a.G=!0}; -B[194]=function(a){var b=q(a);a.k=a.s[1]+Q(a)|0;a.t[a.v]+=b;a.G=!0};A[195]=function(a){a.k=a.s[1]+P(a)|0;a.G=!0};B[195]=function(a){a.k=a.s[1]+Q(a)|0;a.G=!0};A[196]=function(a){var b=u(a);192<=b&&V(a);Tb(a,0,a.f(b),b>>2&14)};B[196]=function(a){var b=u(a);192<=b&&V(a);Ub(a,0,a.f(b),b>>3&7)};A[197]=function(a){var b=u(a);192<=b&&V(a);Tb(a,3,a.f(b),b>>2&14)};B[197]=function(a){var b=u(a);192<=b&&V(a);Ub(a,3,a.f(b),b>>3&7)}; -A[198]=B[198]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=u(a);192>b?Jb(a,d,e):a.i[b<<2&12|b>>2&1]=e};A[199]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=q(a);192>b?S(a,d,e):a.b[b<<1&14]=e};B[199]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=s(a);192>b?U(a,d,e):a.fb[b&7]=e};A[200]=function(a){var b=q(a),d=u(a)&31,e,f;M(a,a.b[10]);e=a.b[8];if(0>12&3)){var b=P(a);O(a,1,P(a));var d=P(a);a.k=b+a.s[1]|0;Qb(a,d);Rb(a)}else throw a.d&131072&&W(a,0),a.debug.S("16 bit iret in protected mode");a.G=!0}; -B[207]=function(a){a:if(!a.za||a.d&131072&&3===(a.d>>12&3)){var b=Q(a);O(a,1,Q(a)&65535);var d=Q(a);a.k=b+a.s[1]|0;Qb(a,d);Rb(a)}else{a.d&131072&&W(a,0);a.k=Q(a);a.Q[1]=Q(a);d=Q(a);if(d&131072){if(0===a.N){Qb(a,d);a.d|=131072;O(a,1,a.Q[1]);a.k=a.k+a.s[1]|0;var b=Q(a),e=Q(a);O(a,0,Q(a)&65535);O(a,3,Q(a)&65535);O(a,4,Q(a)&65535);O(a,5,Q(a)&65535);a.a[4]=b;O(a,2,e&65535);a.N=3;Wb(a,!1);break a}d&=-131073}var f=Xb(a,a.Q[1]);if(f.sb)throw a.debug.S("is null");if(!f.tb)throw a.debug.S("not present");if(!f.Cb)throw a.debug.S("not exec"); -if(f.xbf.xb)throw a.debug.S("conforming and dpl > rpl");f.xb>a.N?(b=Q(a),e=Q(a),a.a[4]=b,Qb(a,d),a.N=f.xb,O(a,2,e&65535),a.Sa=-1):Qb(a,d);f.size!==a.ya&&Wb(a,f.size);a.Aa[1]=f.Kb;a.s[1]=f.Hb;a.k=a.k+a.s[1]|0;Rb(a);a.G=!0}}; -A[208]=B[208]=function(a){var b=u(a),d,e,f;192>b?(e=y(a,a.f(b)),d=a.memory.H(e)):d=a.i[b<<2&12|b>>2&1];f=0;switch(b>>3&7){case 0:f=Ka(a,d,1);break;case 1:f=Sa(a,d,1);break;case 2:f=Pa(a,d,1);break;case 3:f=Va(a,d,1);break;case 4:f=Ya(a,d,1);break;case 5:f=ab(a,d,1);break;case 6:f=Ya(a,d,1);break;case 7:f=db(a,d,1)}192>b?a.memory.O(e,f):a.i[b<<2&12|b>>2&1]=f}; -A[209]=function(a){var b=u(a),d,e,f=0,g;192>b?(d=a.f(b),e=y(a,d),a.r&&4095===(d&4095)?(f=y(a,d+1),d=F(a,e,f)):d=a.memory.P(e)):d=a.b[b<<1&14];g=0;switch(b>>3&7){case 0:g=La(a,d,1);break;case 1:g=Ta(a,d,1);break;case 2:g=Qa(a,d,1);break;case 3:g=Wa(a,d,1);break;case 4:g=Za(a,d,1);break;case 5:g=bb(a,d,1);break;case 6:g=Za(a,d,1);break;case 7:g=eb(a,d,1)}192>b?f?G(a,e,f,g):a.memory.ba(e,g):a.b[b<<1&14]=g}; -B[209]=function(a){var b=u(a),d,e,f=0,g;192>b?(d=a.f(b),e=y(a,d),a.r&&4093<=(d&4095)?(f=y(a,d+3),d=H(a,e,f)):d=I(a.memory,e)):d=a.a[b&7];g=0;switch(b>>3&7){case 0:g=Ma(a,d,1);break;case 1:g=Ua(a,d,1);break;case 2:g=Ra(a,d,1);break;case 3:g=Xa(a,d,1);break;case 4:g=$a(a,d,1);break;case 5:g=cb(a,d,1);break;case 6:g=$a(a,d,1);break;case 7:g=fb(a,d,1)}192>b?f?J(a,e,f,g):a.memory.ea(e,g):a.a[b&7]=g}; -A[210]=B[210]=function(a){var b=u(a),d,e,f,g;192>b?(f=y(a,a.f(b)),e=a.memory.H(f)):e=a.i[b<<2&12|b>>2&1];g=0;d=a.i[4]&31;switch(b>>3&7){case 0:g=Ka(a,e,d);break;case 1:g=Sa(a,e,d);break;case 2:g=Pa(a,e,d);break;case 3:g=Va(a,e,d);break;case 4:g=Ya(a,e,d);break;case 5:g=ab(a,e,d);break;case 6:g=Ya(a,e,d);break;case 7:g=db(a,e,d)}192>b?a.memory.O(f,g):a.i[b<<2&12|b>>2&1]=g}; -A[211]=function(a){var b=u(a),d,e,f,g=0,k;192>b?(d=a.f(b),f=y(a,d),a.r&&4095===(d&4095)?(g=y(a,d+1),e=F(a,f,g)):e=a.memory.P(f)):e=a.b[b<<1&14];k=0;d=a.i[4]&31;switch(b>>3&7){case 0:k=La(a,e,d);break;case 1:k=Ta(a,e,d);break;case 2:k=Qa(a,e,d);break;case 3:k=Wa(a,e,d);break;case 4:k=Za(a,e,d);break;case 5:k=bb(a,e,d);break;case 6:k=Za(a,e,d);break;case 7:k=eb(a,e,d)}192>b?g?G(a,f,g,k):a.memory.ba(f,k):a.b[b<<1&14]=k}; -B[211]=function(a){var b=u(a),d,e,f,g=0,k;192>b?(d=a.f(b),f=y(a,d),a.r&&4093<=(d&4095)?(g=y(a,d+3),e=H(a,f,g)):e=I(a.memory,f)):e=a.a[b&7];k=0;d=a.i[4]&31;switch(b>>3&7){case 0:k=Ma(a,e,d);break;case 1:k=Ua(a,e,d);break;case 2:k=Ra(a,e,d);break;case 3:k=Xa(a,e,d);break;case 4:k=$a(a,e,d);break;case 5:k=cb(a,e,d);break;case 6:k=$a(a,e,d);break;case 7:k=fb(a,e,d)}192>b?g?J(a,f,g,k):a.memory.ea(f,k):a.a[b&7]=k}; -A[212]=B[212]=function(a){var b=u(a);if(0===b)Yb(a);else{var d=a.i[0];a.i[1]=d/b;a.i[0]=d%b;a.u=a.i[0];a.m=196;a.d&=-2066}};A[213]=B[213]=function(a){var b=u(a);a.u=a.i[0]+a.i[1]*b;a.b[0]=a.u&255;a.W=7;a.m=196;a.d&=-2066};A[214]=B[214]=function(a){a.i[0]=-a.ta()};A[215]=B[215]=function(a){a.i[0]=a.$a?x(a,Cb(a,3)+a.a[3]+a.i[0]):x(a,Cb(a,3)+a.b[6]+a.i[0])}; -A[216]=B[216]=function(a){var b=u(a);a.Z&12&&Ob(a);if(192>b){var d=a.ma;a=a.f(b);b=b>>3&7;a=Zb(d,a);var e=X(d);switch(b){case 0:d.h[d.c]=e+a;break;case 1:d.h[d.c]=e*a;break;case 2:$b(d,a);break;case 3:$b(d,a);Y(d);break;case 4:d.h[d.c]=e-a;break;case 5:d.h[d.c]=a-e;break;case 6:d.h[d.c]=e/a;break;case 7:d.h[d.c]=a/e}}else switch(d=a.ma,a=b>>3&7,b=Z(d,b&7),e=X(d),a){case 0:d.h[d.c]=e+b;break;case 1:d.h[d.c]=e*b;break;case 2:$b(d,b);break;case 3:$b(d,b);Y(d);break;case 4:d.h[d.c]=e-b;break;case 5:d.h[d.c]= -b-e;break;case 6:d.h[d.c]=e/b;break;case 7:d.h[d.c]=b/e}}; -A[217]=B[217]=function(a){var b=u(a);a.Z&12&&Ob(a);if(192>b){var d=a.ma;a=a.f(b);switch(b>>3&7){case 0:b=Zb(d,a);ac(d,b);break;case 1:$(d);break;case 2:b=X(d);d.I[0]=b;U(d.j,a,d.U[0]);break;case 3:b=X(d);d.I[0]=b;U(d.j,a,d.U[0]);Y(d);break;case 4:bc(d,a);break;case 5:d.R=K(d.j,a);break;case 6:cc(d,a);break;case 7:S(d.j,a,d.R)}}else switch(d=a.ma,a=b&7,b>>3&7){case 0:b=Z(d,a);ac(d,b);break;case 1:b=Z(d,a);d.h[d.c+a&7]=X(d);d.h[d.c]=b;break;case 2:switch(a){case 0:break;default:$(d)}break;case 3:$(d); -break;case 4:b=X(d);switch(a){case 0:d.h[d.c]=-b;break;case 1:d.h[d.c]=Math.abs(b);break;case 4:d.l&=-18177;isNaN(b)?d.l|=17664:0===b?d.l|=16384:0>b&&(d.l|=256);break;case 5:d.l&=-18177;d.l|=d.ua[(d.c+0&7)<<3|7]>>7<<9;d.l=d.p>>d.c&1?d.l|16640:isNaN(b)?d.l|256:0===b?d.l|16384:Infinity===b||-Infinity===b?d.l|1280:d.l|1024;break;default:$(d)}break;case 5:ac(d,d.wa[a]);break;case 6:b=X(d);switch(a){case 0:d.h[d.c]=Math.pow(2,b)-1;break;case 1:d.h[d.c+1&7]=Z(d,1)*Math.log(b)/Math.LN2;Y(d);break;case 2:d.h[d.c]= -Math.tan(b);ac(d,1);break;case 3:d.h[d.c+1&7]=Math.atan2(Z(d,1),b);Y(d);break;case 4:$(d);break;case 5:d.h[d.c]=b%Z(d,1);break;case 6:$(d);break;case 7:$(d)}break;case 7:switch(b=X(d),a){case 0:d.h[d.c]=b%Z(d,1);break;case 1:d.h[d.c+1&7]=Z(d,1)*Math.log(b+1)/Math.LN2;Y(d);break;case 2:d.h[d.c]=Math.sqrt(b);break;case 3:d.h[d.c]=Math.sin(b);ac(d,Math.cos(b));break;case 4:d.h[d.c]=dc(d,b);break;case 5:d.h[d.c]=b*Math.pow(2,ec(Z(d,1)));break;case 6:d.h[d.c]=Math.sin(b);break;case 7:d.h[d.c]=Math.cos(b)}}}; -A[218]=B[218]=function(a){var b=u(a);a.Z&12&&Ob(a);if(192>b){var d=a.ma;a=a.f(b);b=b>>3&7;a=L(d.j,a);var e=X(d);switch(b){case 0:d.h[d.c]=e+a;break;case 1:d.h[d.c]=e*a;break;case 2:$b(d,a);break;case 3:$b(d,a);Y(d);break;case 4:d.h[d.c]=e-a;break;case 5:d.h[d.c]=a-e;break;case 6:d.h[d.c]=e/a;break;case 7:d.h[d.c]=a/e}}else switch(d=a.ma,a=b&7,b>>3&7){case 0:d.j.Ea()&&(d.h[d.c]=Z(d,a),d.p&=~(1<b){var d=a.ma;a=a.f(b);switch(b>>3&7){case 0:b=L(d.j,a);ac(d,b);break;case 2:b=dc(d,X(d));2147483647>=b&&-2147483648<=b?U(d.j,a,b):(fc(d),U(d.j,a,-2147483648));break;case 3:b=dc(d,X(d));2147483647>=b&&-2147483648<=b?U(d.j,a,b):(fc(d),U(d.j,a,-2147483648));Y(d);break;case 5:ac(d,gc(d,a));break;case 7:Mb(d.j,a,10);hc(d,a,0);Y(d);break;default:$(d)}}else switch(d=a.ma,a=b&7,b>>3&7){case 0:d.j.Ea()||(d.h[d.c]=Z(d,a),d.p&=~(1<b){var d=a.ma,e=a.f(b);a=b>>3&7;b=kc(d,e);e=X(d);switch(a){case 0:d.h[d.c]=e+b;break;case 1:d.h[d.c]=e*b;break;case 2:$b(d,b);break;case 3:$b(d,b);Y(d);break;case 4:d.h[d.c]=e-b;break;case 5:d.h[d.c]=b-e;break;case 6:d.h[d.c]=e/b;break;case 7:d.h[d.c]=b/e}}else{d=a.ma;a=b>>3&7;var e=b&7,b=d.c+e&7,e=Z(d,e),f=X(d);switch(a){case 0:d.h[b]=e+f;break;case 1:d.h[b]=e*f;break;case 2:$b(d,e);break;case 3:$b(d,e);Y(d);break;case 4:d.h[b]=f-e;break; -case 5:d.h[b]=e-f;break;case 6:d.h[b]=f/e;break;case 7:d.h[b]=e/f}}}; -A[221]=B[221]=function(a){var b=u(a);a.Z&12&&Ob(a);if(192>b){var d=a.ma;a=a.f(b);switch(b>>3&7){case 0:b=kc(d,a);ac(d,b);break;case 1:$(d);break;case 2:lc(d,a);break;case 3:lc(d,a);Y(d);break;case 4:b=a;bc(d,b);b+=28;for(a=0;8>a;a++)d.h[a]=gc(d,b),b+=10;break;case 5:$(d);break;case 6:b=a;Mb(d.j,b,108);cc(d,b);b+=28;for(a=0;8>a;a++)hc(d,b,a-d.c&7),b+=10;ic(d);break;case 7:S(d.j,a,d.l&-14337|d.c<<11)}}else switch(d=a.ma,a=b&7,b>>3&7){case 0:d.p|=1<<(d.c+a&7);break;case 2:d.h[d.c+a&7]=X(d);break;case 3:0!== -a&&(d.h[d.c+a&7]=X(d));Y(d);break;case 4:b=Z(d,a);$b(d,b);break;case 5:b=Z(d,a);$b(d,b);Y(d);break;default:$(d)}}; -A[222]=B[222]=function(a){var b=u(a);a.Z&12&&Ob(a);if(192>b){var d=a.ma,e=a.f(b);a=b>>3&7;b=K(d.j,e)<<16>>16;e=X(d);switch(a){case 0:d.h[d.c]=e+b;break;case 1:d.h[d.c]=e*b;break;case 2:$b(d,b);break;case 3:$b(d,b);Y(d);break;case 4:d.h[d.c]=e-b;break;case 5:d.h[d.c]=b-e;break;case 6:d.h[d.c]=e/b;break;case 7:d.h[d.c]=b/e}}else{d=a.ma;a=b>>3&7;var b=b&7,e=d.c+b&7,f=Z(d,b),g=X(d);switch(a){case 0:d.h[e]=f+g;break;case 1:d.h[e]=f*g;break;case 2:$b(d,f);break;case 3:1===b?($b(d,d.h[e]),Y(d)):$(d);break; -case 4:d.h[e]=g-f;break;case 5:d.h[e]=f-g;break;case 6:d.h[e]=g/f;break;case 7:d.h[e]=f/g}Y(d)}}; -A[223]=B[223]=function(a){var b=u(a);a.Z&12&&Ob(a);if(192>b){var d=a.ma;a=a.f(b);switch(b>>3&7){case 0:a=K(d.j,a)<<16>>16;ac(d,a);break;case 1:$(d);break;case 2:b=dc(d,X(d));32767>=b&&-32768<=b?S(d.j,a,b):(fc(d),S(d.j,a,32768));break;case 3:b=dc(d,X(d));32767>=b&&-32768<=b?S(d.j,a,b):(fc(d),S(d.j,a,32768));Y(d);break;case 4:$(d);break;case 5:b=L(d.j,a)>>>0;a=L(d.j,a+4)>>>0;b+=4294967296*a;a>>31&&(b-=1.8446744073709552E19);ac(d,b);break;case 6:$(d);break;case 7:Mb(d.j,a,8);var b=dc(d,X(d)),e,f;0x7fffffffffffffff> -b&&-9223372036854775808<=b?(e=b|0,f=b/4294967296|0,0===f&&0>b&&(f=-1)):(e=0,f=-2147483648,fc(d));U(d.j,a,e);U(d.j,a+4,f);Y(d)}}else switch(d=a.ma,a=b&7,b>>3&7){case 4:224===b?d.j.b[0]=d.l&-14337|d.c<<11:$(d);break;case 5:a=Z(d,a);jc(d,a);Y(d);break;case 6:jc(d,Z(d,a));Y(d);break;default:$(d)}};A[224]=B[224]=function(a){if(--a.g[a.w]&&!a.pb()){var b=p(a);a.k=a.k+b|0}else a.k++;a.G=!0};A[225]=B[225]=function(a){if(--a.g[a.w]&&a.pb()){var b=p(a);a.k=a.k+b|0}else a.k++;a.G=!0};A[226]=B[226]=function(a){a.loop()}; -A[227]=B[227]=function(a){var b=p(a);0===a.g[a.w]&&(a.k=a.k+b|0);a.G=!0};A[228]=B[228]=function(a){var b=u(a);yb(a,b,1);a.i[0]=a.o.Qc(b)};A[229]=function(a){var b=u(a);yb(a,b,2);a.b[0]=a.o.jc(b)};B[229]=function(a){var b=u(a);yb(a,b,4);a.a[0]=a.o.kc(b)};A[230]=B[230]=function(a){var b=u(a);yb(a,b,1);a.o.Rc(b,a.i[0])};A[231]=function(a){var b=u(a);yb(a,b,2);a.o.lc(b,a.b[0])};B[231]=function(a){var b=u(a);yb(a,b,4);a.o.mc(b,a.a[0])};A[232]=function(a){var b=q(a)<<16>>16;M(a,Nb(a));mc(a,b);a.G=!0}; -B[232]=function(a){var b=s(a);N(a,Nb(a));a.k=a.k+b|0;a.G=!0};A[233]=function(a){var b=q(a)<<16>>16;mc(a,b);a.G=!0};B[233]=function(a){var b=s(a);a.k=a.k+b|0;a.G=!0};A[234]=function(a){var b=q(a);O(a,1,q(a));a.k=b+a.s[1]|0;a.G=!0};B[234]=function(a){var b=s(a);O(a,1,q(a));a.k=b+a.s[1]|0;a.G=!0};A[235]=B[235]=function(a){var b=p(a);a.k=a.k+b|0;a.G=!0};A[236]=B[236]=function(a){var b=a.b[4];yb(a,b,1);a.i[0]=a.o.Qc(b)};A[237]=function(a){var b=a.b[4];yb(a,b,2);a.b[0]=a.o.jc(b)}; -B[237]=function(a){var b=a.b[4];yb(a,b,4);a.a[0]=a.o.kc(b)};A[238]=B[238]=function(a){var b=a.b[4];yb(a,b,1);a.o.Rc(b,a.i[0])};A[239]=function(a){var b=a.b[4];yb(a,b,2);a.o.lc(b,a.b[0])};B[239]=function(a){var b=a.b[4];yb(a,b,4);a.o.mc(b,a.a[0])};A[240]=B[240]=function(a){a.table[u(a)](a)};A[241]=B[241]=function(a){throw a.debug.S("int1 instruction");};A[242]=B[242]=function(a){a.T=1;a.table[u(a)](a);a.T=0};A[243]=B[243]=function(a){a.T=2;a.table[u(a)](a);a.T=0}; -A[244]=B[244]=function(a){a.N&&W(a,0);if(0===(a.d&512))throw a.debug.show("cpu halted"),a.Ub=!0,"HALT";a.dc=!0;throw 233495534;};A[245]=B[245]=function(a){a.d=(a.d|1)^a.ta();a.m&=-2}; -A[246]=B[246]=function(a){var b=u(a);switch(b>>3&7){case 0:var d=192>b?x(a,a.f(b)):a.i[b<<2&12|b>>2&1];w(a,d,u(a),7);break;case 1:d=192>b?x(a,a.f(b)):a.i[b<<2&12|b>>2&1];w(a,d,u(a),7);break;case 2:var e;192>b?(e=y(a,a.f(b)),d=a.memory.H(e)):d=a.i[b<<2&12|b>>2&1];d=~d;192>b?a.memory.O(e,d):a.i[b<<2&12|b>>2&1]=d;break;case 3:192>b?(e=y(a,a.f(b)),d=a.memory.H(e)):d=a.i[b<<2&12|b>>2&1];d=Da(a,d,7);192>b?a.memory.O(e,d):a.i[b<<2&12|b>>2&1]=d;break;case 4:d=192>b?x(a,a.f(b)):a.i[b<<2&12|b>>2&1];b=d*a.i[0]; -a.b[0]=b;a.d=256>b?a.d&-2050:a.d|2049;a.m=0;break;case 5:192>b?d=x(a,a.f(b))<<24>>24:d=a.vb[b<<2&12|b>>2&1];b=d*a.vb[0];a.b[0]=b;a.d=127b?a.d|2049:a.d&-2050;a.m=0;break;case 6:b=d=192>b?x(a,a.f(b)):a.i[b<<2&12|b>>2&1];e=a.b[0];d=e/b|0;256<=d||0===b?Yb(a):(a.i[0]=d,a.i[1]=e%b);break;case 7:192>b?d=x(a,a.f(b))<<24>>24:d=a.vb[b<<2&12|b>>2&1],b=d,e=a.ja[0],d=e/b|0,128<=d||-129>=d||0===b?Yb(a):(a.i[0]=d,a.i[1]=e%b)}}; -A[247]=function(a){var b=u(a);switch(b>>3&7){case 0:var d=192>b?K(a,a.f(b)):a.b[b<<1&14];w(a,d,q(a),15);break;case 1:d=192>b?K(a,a.f(b)):a.b[b<<1&14];w(a,d,q(a),15);break;case 2:var e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4095===(d&4095)?(f=y(a,d+1),d=F(a,e,f)):d=a.memory.P(e)):d=a.b[b<<1&14];d=~d;192>b?f?G(a,e,f,d):a.memory.ba(e,d):a.b[b<<1&14]=d;break;case 3:f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4095===(d&4095)?(f=y(a,d+1),d=F(a,e,f)):d=a.memory.P(e)):d=a.b[b<<1&14];d=Da(a,d,15);192>b?f?G(a,e,f,d):a.memory.ba(e, -d):a.b[b<<1&14]=d;break;case 4:d=192>b?K(a,a.f(b)):a.b[b<<1&14];b=d*a.b[0];e=b>>>16;a.b[0]=b;a.b[4]=e;a.d=0===e?a.d&-2050:a.d|2049;a.m=0;break;case 5:192>b?d=K(a,a.f(b))<<16>>16:d=a.ja[b<<1&14];b=d*a.ja[0];a.b[0]=b;a.b[4]=b>>16;a.d=32767b?a.d|2049:a.d&-2050;a.m=0;break;case 6:b=d=192>b?K(a,a.f(b)):a.b[b<<1&14];e=(a.b[0]|a.b[4]<<16)>>>0;f=e/b|0;65536<=f||0>f||0===b?Yb(a):(a.b[0]=f,a.b[4]=e%b);break;case 7:192>b?d=K(a,a.f(b))<<16>>16:d=a.ja[b<<1&14],b=d,e=a.b[0]|a.b[4]<<16,f=e/b|0,32768<= -f||-32769>=f||0===b?Yb(a):(a.b[0]=f,a.b[4]=e%b)}}; -B[247]=function(a){var b=u(a);switch(b>>3&7){case 0:var d=192>b?L(a,a.f(b)):a.a[b&7];w(a,d,s(a),31);break;case 1:d=192>b?L(a,a.f(b)):a.a[b&7];w(a,d,s(a),31);break;case 2:var e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4093<=(d&4095)?(f=y(a,d+3),d=H(a,e,f)):d=I(a.memory,e)):d=a.a[b&7];d=~d;192>b?f?J(a,e,f,d):a.memory.ea(e,d):a.a[b&7]=d;break;case 3:f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4093<=(d&4095)?(f=y(a,d+3),d=H(a,e,f)):d=I(a.memory,e)):d=a.a[b&7];d=Da(a,d,31);192>b?f?J(a,e,f,d):a.memory.ea(e,d):a.a[b&7]= -d;break;case 4:192>b?d=L(a,a.f(b))>>>0:d=a.fb[b&7];e=a.a[0];b=e&65535;e=e>>>16;var g=d&65535,d=d>>>16,f=b*g,g=(f>>>16)+(e*g|0)|0,k=g>>>16,g=(g&65535)+(b*d|0)|0,k=((g>>>16)+(e*d|0)|0)+k|0;a.a[0]=g<<16|f&65535;a.a[2]=k;a.d=0===k?a.d&-2050:a.d|2049;a.m=0;break;case 5:f=d=192>b?L(a,a.f(b)):a.a[b&7];e=a.a[0];b=!1;0>e&&(b=!0,e=-e|0);0>f&&(b=!b,f=-f|0);d=e&65535;e=e>>>16;var k=f&65535,f=f>>>16,g=d*k,k=(g>>>16)+(e*k|0)|0,t=k>>>16,k=(k&65535)+(d*f|0)|0,g=k<<16|g&65535,t=((k>>>16)+(e*f|0)|0)+t|0;b&&(g=-g|0, -t=~t+!g|0);a.a[0]=g;a.a[2]=t;a.d=t===g>>31?a.d&-2050:a.d|2049;a.m=0;break;case 6:192>b?d=L(a,a.f(b))>>>0:d=a.fb[b&7];b=d;e=a.fb[0];f=a.fb[2];(f>=b||!b)&&Yb(a);d=0;if(1048576f;)k>>>=1,g--;for(;1048576=k&&(f-=k,t=b<>>0,t>e&&f--,e=e-t>>>0,d|=1<>=1;d>>>=0}e+=4294967296*f;f=e%b;d+=e/b|0;4294967296<=d||0===b?Yb(a):(a.a[0]=d,a.a[2]=f);break;case 7:b=d=192>b?L(a,a.f(b)):a.a[b&7];g=a.fb[0];k=a.a[2];e=d=!1;0>b&&(e=!0,b=-b);0>k&&(d=!0,e=!e,g=-g|0,k=~k+!g);(k>=b||!b)&&Yb(a); -f=0;if(1048576k;)v>>>=1,t--;for(;1048576=v){var k=k-v,z=b<>>0;z>g&&k--;g=g-z>>>0;f|=1<>=1}f>>>=0}g+=4294967296*k;k=g%b;f+=g/b|0;e&&(f=-f|0);d&&(k=-k|0);2147483648<=f||-2147483649>=f||0===b?Yb(a):(a.a[0]=f,a.a[2]=k)}};A[248]=B[248]=function(a){a.d&=-2;a.m&=-2};A[249]=B[249]=function(a){a.d|=1;a.m&=-2}; -A[250]=B[250]=function(a){!a.za||(a.d&131072?3===(a.d>>12&3):(a.d>>12&3)>=a.N)?a.d&=-513:3>(a.d>>12&3)&&(a.d&131072?a.Ia&1:3===a.N&&a.Ia&2)?a.d&=-524289:W(a,0)};A[251]=B[251]=function(a){!a.za||(a.d&131072?3===(a.d>>12&3):(a.d>>12&3)>=a.N)?(a.d|=512,nc(a),Rb(a)):3>(a.d>>12&3)&&0===(a.d&1048576)&&(a.d&131072?a.Ia&1:3===a.N&&a.Ia&2)?a.d|=524288:W(a,0)};A[252]=B[252]=function(a){a.d&=-1025};A[253]=B[253]=function(a){a.d|=1024}; -A[254]=B[254]=function(a){var b=u(a),d=b&56;if(0===d){var e;192>b?(e=y(a,a.f(b)),d=a.memory.H(e)):d=a.i[b<<2&12|b>>2&1];d=Ba(a,d,7);192>b?a.memory.O(e,d):a.i[b<<2&12|b>>2&1]=d}else 8===d?(192>b?(e=y(a,a.f(b)),d=a.memory.H(e)):d=a.i[b<<2&12|b>>2&1],d=Ca(a,d,7),192>b?a.memory.O(e,d):a.i[b<<2&12|b>>2&1]=d):V(a)}; -A[255]=function(a){var b=u(a);switch(b>>3&7){case 0:var d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4095===(d&4095)?(f=y(a,d+1),d=F(a,e,f)):d=a.memory.P(e)):d=a.b[b<<1&14];d=Ba(a,d,15);192>b?f?G(a,e,f,d):a.memory.ba(e,d):a.b[b<<1&14]=d;break;case 1:f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4095===(d&4095)?(f=y(a,d+1),d=F(a,e,f)):d=a.memory.P(e)):d=a.b[b<<1&14];d=Ca(a,d,15);192>b?f?G(a,e,f,d):a.memory.ba(e,d):a.b[b<<1&14]=d;break;case 2:d=192>b?K(a,a.f(b)):a.b[b<<1&14];M(a,Nb(a));a.k=a.s[1]+d|0;a.G=!0;break;case 3:192<= -b&&V(a);d=a.f(b);b=K(a,d+2);e=K(a,d);Mb(a,vb(a,-4),4);M(a,a.Q[1]);M(a,Nb(a));O(a,1,b);a.k=a.s[1]+e|0;a.G=!0;break;case 4:d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.k=a.s[1]+d|0;a.G=!0;break;case 5:192<=b&&V(a);d=a.f(b);b=K(a,d+2);e=K(a,d);O(a,1,b);a.k=a.s[1]+e|0;a.G=!0;break;case 6:d=192>b?K(a,a.f(b)):a.b[b<<1&14];M(a,d);break;case 7:V(a)}}; -B[255]=function(a){var b=u(a);switch(b>>3&7){case 0:var d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4093<=(d&4095)?(f=y(a,d+3),d=H(a,e,f)):d=I(a.memory,e)):d=a.a[b&7];d=Ba(a,d,31);192>b?f?J(a,e,f,d):a.memory.ea(e,d):a.a[b&7]=d;break;case 1:f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4093<=(d&4095)?(f=y(a,d+3),d=H(a,e,f)):d=I(a.memory,e)):d=a.a[b&7];d=Ca(a,d,31);192>b?f?J(a,e,f,d):a.memory.ea(e,d):a.a[b&7]=d;break;case 2:d=192>b?L(a,a.f(b)):a.a[b&7];N(a,Nb(a));a.k=a.s[1]+d|0;a.G=!0;break;case 3:192<=b&&V(a);d=a.f(b); -b=K(a,d+4);e=L(a,d);Mb(a,vb(a,-8),8);N(a,a.Q[1]);N(a,Nb(a));O(a,1,b);a.k=a.s[1]+e|0;a.G=!0;break;case 4:d=192>b?L(a,a.f(b)):a.a[b&7];a.k=a.s[1]+d|0;a.G=!0;break;case 5:192<=b&&V(a);d=a.f(b);b=K(a,d+4);e=L(a,d);O(a,1,b);a.k=a.s[1]+e|0;a.G=!0;break;case 6:d=192>b?L(a,a.f(b)):a.a[b&7];N(a,d);break;case 7:V(a)}}; -C[0]=E[0]=function(a){var b=u(a);a.za||V(a);a.N&&W(a,0);switch(b>>3&7){case 0:if(192>b)var d=a.f(b);var e=a.Q[7];192>b?S(a,d,e):a.b[b<<1&14]=e;break;case 1:192>b&&(d=a.f(b));e=a.Q[6];192>b?S(a,d,e):a.b[b<<1&14]=e;break;case 2:b=e=192>b?K(a,a.f(b)):a.b[b<<1&14];d=Xb(a,b);if(d.sb)a.s[7]=0,a.Aa[7]=0;else{if(!d.Pd)throw a.debug.S("LDTR can only be loaded from GDT");if(!d.tb)throw a.debug.S("#GP handler");if(!d.Ob)throw a.debug.S("#GP handler");if(2!==d.type)throw a.debug.S("#GP handler");a.s[7]=d.Hb; -a.Aa[7]=d.Kb;a.Q[7]=b}break;case 3:b=e=192>b?K(a,a.f(b)):a.b[b<<1&14];d=Xb(a,b);if(!d.Pd)throw a.debug.S("TR can only be loaded from GDT");if(d.sb)throw a.debug.S("#GP handler");if(!d.tb)throw a.debug.S("#GP handler");if(!d.Ob)throw a.debug.S("#GP handler");if(9!==d.type)throw a.debug.S("#GP handler");a.s[6]=d.Hb;a.Aa[6]=d.Kb;a.Q[6]=b;a.memory.O(d.Ed+5,a.memory.H(d.Ed+5)|2);break;default:V(a)}}; -C[1]=E[1]=function(a){var b=u(a);a.N&&W(a,0);var d=b>>3&7;if(4===d){if(192>b)var e=a.f(b);d=a.Z;192>b?S(a,e,d):a.b[b<<1&14]=d}else if(6===d)d=192>b?K(a,a.f(b)):a.b[b<<1&14],a.Z=a.Z&-16|d&15,a.za&&(a.Z|=1),oc(a);else switch(192<=b&&V(a),2!==d&&3!==d||!a.za||(a.Ka=9),e=a.f(b),a.Ka=-1,d){case 0:Mb(a,e,6);S(a,e,a.Fc);U(a,e+2,a.Lb);break;case 1:Mb(a,e,6);S(a,e,a.Jc);U(a,e+2,a.Nb);break;case 2:b=K(a,e);e=L(a,e+2);a.Fc=b;a.Lb=e;a.Ta||(a.Lb&=16777215);break;case 3:b=K(a,e);e=L(a,e+2);a.Jc=b;a.Nb=e;a.Ta|| -(a.Nb&=16777215);break;case 7:e=e>>>12;a.Va[e]=0;a.Vb[e]=0;a.Sa=-1;break;default:V(a)}};C[2]=E[2]=function(a){u(a);V(a)};C[3]=E[3]=function(a){u(a);V(a)};C[4]=E[4]=function(a){V(a)};C[5]=E[5]=function(a){V(a)};C[6]=E[6]=function(a){a.N?W(a,0):a.Z&=-9};C[7]=E[7]=function(a){V(a)};C[8]=E[8]=function(a){V(a)};C[9]=E[9]=function(a){a.N&&W(a,0)};C[10]=E[10]=function(a){V(a)};C[11]=E[11]=function(a){V(a)};C[12]=E[12]=function(a){V(a)};C[13]=E[13]=function(a){V(a)};C[14]=E[14]=function(a){V(a)}; -C[15]=E[15]=function(a){V(a)};C[16]=E[16]=function(a){V(a)};C[17]=E[17]=function(a){V(a)};C[18]=E[18]=function(a){V(a)};C[19]=E[19]=function(a){V(a)};C[20]=E[20]=function(a){V(a)};C[21]=E[21]=function(a){V(a)};C[22]=E[22]=function(a){V(a)};C[23]=E[23]=function(a){V(a)};C[24]=E[24]=function(a){var b=u(a);192>b&&a.f(b)};C[25]=E[25]=function(a){V(a)};C[26]=E[26]=function(a){V(a)};C[27]=E[27]=function(a){V(a)};C[28]=E[28]=function(a){V(a)};C[29]=E[29]=function(a){V(a)};C[30]=E[30]=function(a){V(a)}; -C[31]=E[31]=function(a){V(a)};C[32]=E[32]=function(a){var b=u(a);a.N&&W(a,0);switch(b>>3&7){case 0:a.a[b&7]=a.Z;break;case 2:a.a[b&7]=a.bb;break;case 3:a.a[b&7]=a.Cc;break;case 4:a.a[b&7]=a.Ia;break;default:V(a)}};C[33]=E[33]=function(a){var b=u(a);a.N&&W(a,0);a.a[b&7]=a.bc[b>>3&7]}; -C[34]=E[34]=function(a){var b=u(a);a.N&&W(a,0);var d=a.a[b&7];switch(b>>3&7){case 0:a.Z=d;if(-2147483648===(a.Z&-2147483647))throw a.debug.S("#GP handler");oc(a);break;case 2:a.bb=d;break;case 3:a.Cc=d;pc(a);break;case 4:d&-3565568&&W(a,0);(a.Ia^d)&128&&(d&128?pc(a):wa(a));a.Ia=d;a.vd=a.Ia&16?128:0;if(a.Ia&32)throw a.debug.S("PAE");break;default:V(a)}};C[35]=E[35]=function(a){var b=u(a);a.N&&W(a,0);a.bc[b>>3&7]=a.a[b&7]};C[36]=E[36]=function(a){V(a)};C[37]=E[37]=function(a){V(a)};C[38]=E[38]=function(a){V(a)}; -C[39]=E[39]=function(a){V(a)};C[40]=E[40]=function(a){V(a)};C[41]=E[41]=function(a){V(a)};C[42]=E[42]=function(a){V(a)};C[43]=E[43]=function(a){V(a)};C[44]=E[44]=function(a){V(a)};C[45]=E[45]=function(a){V(a)};C[46]=E[46]=function(a){V(a)};C[47]=E[47]=function(a){V(a)};C[48]=E[48]=function(a){a.N&&W(a,0);var b=a.a[0];switch(a.a[1]){case 372:a.sc=b&65535;break;case 374:a.Yc=b;break;case 373:a.Zc=b}}; -C[49]=E[49]=function(a){if(a.N&&a.Ia&4)W(a,0);else{var b=a.Oc()-a.he;a.a[0]=1024*b;a.a[2]=2.384185791015625E-7*b}};C[50]=E[50]=function(a){a.N&&W(a,0);var b=0;switch(a.a[1]){case 372:b=a.sc;break;case 374:b=a.Yc;break;case 373:b=a.Zc}a.a[0]=b;a.a[2]=0};C[51]=E[51]=function(a){V(a)}; -C[52]=E[52]=function(a){var b=a.sc&65532;a.za&&0!==b||W(a,0);a.d&=-131585;a.k=a.Yc;a.a[4]=a.Zc;a.Q[1]=b;a.yb[1]=0;a.Aa[1]=-1;a.s[1]=0;a.ya||Wb(a,!0);a.N=0;a.Sa=-1;a.Q[2]=b+8;a.yb[2]=0;a.Aa[2]=-1;a.s[2]=0;a.Tb=!0;a.t=a.a;a.v=4;a.wb=5};C[53]=E[53]=function(a){var b=a.sc&65532;a.za&&!a.N&&0!==b||W(a,0);a.k=a.a[2];a.a[4]=a.a[1];a.Q[1]=b+16|3;a.yb[1]=0;a.Aa[1]=-1;a.s[1]=0;a.ya||Wb(a,!0);a.N=3;a.Sa=-1;a.Q[2]=b+24|3;a.yb[2]=0;a.Aa[2]=-1;a.s[2]=0;a.Tb=!0;a.t=a.a;a.v=4;a.wb=5};C[54]=E[54]=function(a){V(a)}; -C[55]=E[55]=function(a){V(a)};C[56]=E[56]=function(a){V(a)};C[57]=E[57]=function(a){V(a)};C[58]=E[58]=function(a){V(a)};C[59]=E[59]=function(a){V(a)};C[60]=E[60]=function(a){V(a)};C[61]=E[61]=function(a){V(a)};C[62]=E[62]=function(a){V(a)};C[63]=E[63]=function(a){V(a)};C[64]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.Pa()&&(a.b[b>>2&14]=d)};E[64]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.Pa()&&(a.a[b>>3&7]=d)}; -C[65]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.Pa()||(a.b[b>>2&14]=d)};E[65]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.Pa()||(a.a[b>>3&7]=d)};C[66]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.Ea()&&(a.b[b>>2&14]=d)};E[66]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.Ea()&&(a.a[b>>3&7]=d)};C[67]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.Ea()||(a.b[b>>2&14]=d)}; -E[67]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.Ea()||(a.a[b>>3&7]=d)};C[68]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.Ga()&&(a.b[b>>2&14]=d)};E[68]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.Ga()&&(a.a[b>>3&7]=d)};C[69]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.Ga()||(a.b[b>>2&14]=d)};E[69]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.Ga()||(a.a[b>>3&7]=d)}; -C[70]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];Fb(a)&&(a.b[b>>2&14]=d)};E[70]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];Fb(a)&&(a.a[b>>3&7]=d)};C[71]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];Fb(a)||(a.b[b>>2&14]=d)};E[71]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];Fb(a)||(a.a[b>>3&7]=d)};C[72]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.Qa()&&(a.b[b>>2&14]=d)}; -E[72]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.Qa()&&(a.a[b>>3&7]=d)};C[73]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.Qa()||(a.b[b>>2&14]=d)};E[73]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.Qa()||(a.a[b>>3&7]=d)};C[74]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.Fa()&&(a.b[b>>2&14]=d)};E[74]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.Fa()&&(a.a[b>>3&7]=d)}; -C[75]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.Fa()||(a.b[b>>2&14]=d)};E[75]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.Fa()||(a.a[b>>3&7]=d)};C[76]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];Gb(a)&&(a.b[b>>2&14]=d)};E[76]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];Gb(a)&&(a.a[b>>3&7]=d)};C[77]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];Gb(a)||(a.b[b>>2&14]=d)}; -E[77]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];Gb(a)||(a.a[b>>3&7]=d)};C[78]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];Hb(a)&&(a.b[b>>2&14]=d)};E[78]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];Hb(a)&&(a.a[b>>3&7]=d)};C[79]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];Hb(a)||(a.b[b>>2&14]=d)};E[79]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];Hb(a)||(a.a[b>>3&7]=d)};C[80]=E[80]=function(a){V(a)};C[81]=E[81]=function(a){V(a)};C[82]=E[82]=function(a){V(a)}; -C[83]=E[83]=function(a){V(a)};C[84]=E[84]=function(a){V(a)};C[85]=E[85]=function(a){V(a)};C[86]=E[86]=function(a){V(a)};C[87]=E[87]=function(a){V(a)};C[88]=E[88]=function(a){V(a)};C[89]=E[89]=function(a){V(a)};C[90]=E[90]=function(a){V(a)};C[91]=E[91]=function(a){V(a)};C[92]=E[92]=function(a){V(a)};C[93]=E[93]=function(a){V(a)};C[94]=E[94]=function(a){V(a)};C[95]=E[95]=function(a){V(a)};C[96]=E[96]=function(a){V(a)};C[97]=E[97]=function(a){V(a)};C[98]=E[98]=function(a){V(a)};C[99]=E[99]=function(a){V(a)}; -C[100]=E[100]=function(a){V(a)};C[101]=E[101]=function(a){V(a)};C[102]=E[102]=function(a){V(a)};C[103]=E[103]=function(a){V(a)};C[104]=E[104]=function(a){V(a)};C[105]=E[105]=function(a){V(a)};C[106]=E[106]=function(a){V(a)};C[107]=E[107]=function(a){V(a)};C[108]=E[108]=function(a){V(a)};C[109]=E[109]=function(a){V(a)};C[110]=E[110]=function(a){V(a)};C[111]=E[111]=function(a){V(a)};C[112]=E[112]=function(a){V(a)};C[113]=E[113]=function(a){V(a)};C[114]=E[114]=function(a){V(a)};C[115]=E[115]=function(a){V(a)}; -C[116]=E[116]=function(a){V(a)};C[117]=E[117]=function(a){V(a)};C[118]=E[118]=function(a){V(a)};C[119]=E[119]=function(a){V(a)};C[120]=E[120]=function(a){V(a)};C[121]=E[121]=function(a){V(a)};C[122]=E[122]=function(a){V(a)};C[123]=E[123]=function(a){V(a)};C[124]=E[124]=function(a){V(a)};C[125]=E[125]=function(a){V(a)};C[126]=E[126]=function(a){V(a)};C[127]=E[127]=function(a){V(a)};C[128]=function(a){qc(a,a.Pa())};E[128]=function(a){rc(a,a.Pa())};C[129]=function(a){qc(a,!a.Pa())}; -E[129]=function(a){rc(a,!a.Pa())};C[130]=function(a){qc(a,a.Ea())};E[130]=function(a){rc(a,a.Ea())};C[131]=function(a){qc(a,!a.Ea())};E[131]=function(a){rc(a,!a.Ea())};C[132]=function(a){qc(a,a.Ga())};E[132]=function(a){rc(a,a.Ga())};C[133]=function(a){qc(a,!a.Ga())};E[133]=function(a){rc(a,!a.Ga())};C[134]=function(a){qc(a,Fb(a))};E[134]=function(a){rc(a,Fb(a))};C[135]=function(a){qc(a,!Fb(a))};E[135]=function(a){rc(a,!Fb(a))};C[136]=function(a){qc(a,a.Qa())};E[136]=function(a){rc(a,a.Qa())}; -C[137]=function(a){qc(a,!a.Qa())};E[137]=function(a){rc(a,!a.Qa())};C[138]=function(a){qc(a,a.Fa())};E[138]=function(a){rc(a,a.Fa())};C[139]=function(a){qc(a,!a.Fa())};E[139]=function(a){rc(a,!a.Fa())};C[140]=function(a){qc(a,Gb(a))};E[140]=function(a){rc(a,Gb(a))};C[141]=function(a){qc(a,!Gb(a))};E[141]=function(a){rc(a,!Gb(a))};C[142]=function(a){qc(a,Hb(a))};E[142]=function(a){rc(a,Hb(a))};C[143]=function(a){qc(a,!Hb(a))};E[143]=function(a){rc(a,!Hb(a))}; -C[144]=E[144]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=!a.Pa()^1;192>b?Jb(a,d,e):a.i[b<<2&12|b>>2&1]=e};C[145]=E[145]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=!!a.Pa()^1;192>b?Jb(a,d,e):a.i[b<<2&12|b>>2&1]=e};C[146]=E[146]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=!a.Ea()^1;192>b?Jb(a,d,e):a.i[b<<2&12|b>>2&1]=e};C[147]=E[147]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=!!a.Ea()^1;192>b?Jb(a,d,e):a.i[b<<2&12|b>>2&1]=e}; -C[148]=E[148]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=!a.Ga()^1;192>b?Jb(a,d,e):a.i[b<<2&12|b>>2&1]=e};C[149]=E[149]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=!!a.Ga()^1;192>b?Jb(a,d,e):a.i[b<<2&12|b>>2&1]=e};C[150]=E[150]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=!Fb(a)^1;192>b?Jb(a,d,e):a.i[b<<2&12|b>>2&1]=e};C[151]=E[151]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=!!Fb(a)^1;192>b?Jb(a,d,e):a.i[b<<2&12|b>>2&1]=e}; -C[152]=E[152]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=!a.Qa()^1;192>b?Jb(a,d,e):a.i[b<<2&12|b>>2&1]=e};C[153]=E[153]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=!!a.Qa()^1;192>b?Jb(a,d,e):a.i[b<<2&12|b>>2&1]=e};C[154]=E[154]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=!a.Fa()^1;192>b?Jb(a,d,e):a.i[b<<2&12|b>>2&1]=e};C[155]=E[155]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=!!a.Fa()^1;192>b?Jb(a,d,e):a.i[b<<2&12|b>>2&1]=e}; -C[156]=E[156]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=!Gb(a)^1;192>b?Jb(a,d,e):a.i[b<<2&12|b>>2&1]=e};C[157]=E[157]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=!!Gb(a)^1;192>b?Jb(a,d,e):a.i[b<<2&12|b>>2&1]=e};C[158]=E[158]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=!Hb(a)^1;192>b?Jb(a,d,e):a.i[b<<2&12|b>>2&1]=e};C[159]=E[159]=function(a){var b=u(a);if(192>b)var d=a.f(b);var e=!!Hb(a)^1;192>b?Jb(a,d,e):a.i[b<<2&12|b>>2&1]=e};C[160]=function(a){M(a,a.Q[4])}; -E[160]=function(a){N(a,a.Q[4])};C[161]=function(a){O(a,4,K(a,vb(a,0)));a.t[a.v]+=2};E[161]=function(a){O(a,4,K(a,vb(a,0)));a.t[a.v]+=4};C[162]=E[162]=function(a){var b=0,d=0,e=0,f=0;switch(a.a[0]){case 0:b=5;f=1970169159;e=1231384169;d=1818588270;break;case 1:b=3939;f=0;d=8388608;e=(a.ma?1:0)|43322;break;case 2:b=1717260289;d=f=0;e=8024064;break;case -2147483648:b=5}a.a[0]=b;a.a[1]=d;a.a[2]=e;a.a[3]=f};C[163]=function(a){var b=u(a);192>b?qb(a,a.f(b),a.ja[b>>2&14]):kb(a,a.b[b<<1&14],a.b[b>>2&14]&15)}; -E[163]=function(a){var b=u(a);192>b?qb(a,a.f(b),a.a[b>>3&7]):kb(a,a.a[b&7],a.a[b>>3&7]&31)};C[164]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4095===(d&4095)?(f=y(a,d+1),d=F(a,e,f)):d=a.memory.P(e)):d=a.b[b<<1&14];d=ib(a,d,a.b[b>>2&14],u(a)&31);192>b?f?G(a,e,f,d):a.memory.ba(e,d):a.b[b<<1&14]=d}; -E[164]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4093<=(d&4095)?(f=y(a,d+3),d=H(a,e,f)):d=I(a.memory,e)):d=a.a[b&7];d=jb(a,d,a.a[b>>3&7],u(a)&31);192>b?f?J(a,e,f,d):a.memory.ea(e,d):a.a[b&7]=d};C[165]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4095===(d&4095)?(f=y(a,d+1),d=F(a,e,f)):d=a.memory.P(e)):d=a.b[b<<1&14];d=ib(a,d,a.b[b>>2&14],a.i[4]&31);192>b?f?G(a,e,f,d):a.memory.ba(e,d):a.b[b<<1&14]=d}; -E[165]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4093<=(d&4095)?(f=y(a,d+3),d=H(a,e,f)):d=I(a.memory,e)):d=a.a[b&7];d=jb(a,d,a.a[b>>3&7],a.i[4]&31);192>b?f?J(a,e,f,d):a.memory.ea(e,d):a.a[b&7]=d};C[166]=E[166]=function(a){V(a)};C[167]=E[167]=function(a){V(a)};C[168]=function(a){M(a,a.Q[5])};E[168]=function(a){N(a,a.Q[5])};C[169]=function(a){O(a,5,K(a,vb(a,0)));a.t[a.v]+=2};E[169]=function(a){O(a,5,K(a,vb(a,0)));a.t[a.v]+=4};C[170]=E[170]=function(a){V(a)}; -C[171]=function(a){var b=u(a);192>b?tb(a,a.f(b),a.ja[b>>2&14]):a.b[b<<1&14]=ob(a,a.b[b<<1&14],a.ja[b>>2&14]&15)};E[171]=function(a){var b=u(a);192>b?tb(a,a.f(b),a.a[b>>3&7]):a.a[b&7]=ob(a,a.a[b&7],a.a[b>>3&7]&31)};C[172]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4095===(d&4095)?(f=y(a,d+1),d=F(a,e,f)):d=a.memory.P(e)):d=a.b[b<<1&14];d=gb(a,d,a.b[b>>2&14],u(a)&31);192>b?f?G(a,e,f,d):a.memory.ba(e,d):a.b[b<<1&14]=d}; -E[172]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4093<=(d&4095)?(f=y(a,d+3),d=H(a,e,f)):d=I(a.memory,e)):d=a.a[b&7];d=hb(a,d,a.a[b>>3&7],u(a)&31);192>b?f?J(a,e,f,d):a.memory.ea(e,d):a.a[b&7]=d};C[173]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4095===(d&4095)?(f=y(a,d+1),d=F(a,e,f)):d=a.memory.P(e)):d=a.b[b<<1&14];d=gb(a,d,a.b[b>>2&14],a.i[4]&31);192>b?f?G(a,e,f,d):a.memory.ba(e,d):a.b[b<<1&14]=d}; -E[173]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4093<=(d&4095)?(f=y(a,d+3),d=H(a,e,f)):d=I(a.memory,e)):d=a.a[b&7];d=hb(a,d,a.a[b>>3&7],a.i[4]&31);192>b?f?J(a,e,f,d):a.memory.ea(e,d):a.a[b&7]=d};C[174]=E[174]=function(a){V(a)};C[175]=function(a){var b=u(a),d=192>b?K(a,a.f(b))<<16>>16:a.ja[b<<1&14];a.b[b>>2&14]=Ea(a,a.ja[b>>2&14],d)};E[175]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.a[b>>3&7]=Fa(a,a.a[b>>3&7],d)}; -C[176]=E[176]=function(a){var b=u(a);if(192>b){var d=a.f(b);Mb(a,d,1);var e=x(a,d)}else e=a.i[b<<2&12|b>>2&1];a.sub(e,a.i[0],7);a.pb()?192>b?Jb(a,d,a.i[b>>1&12|b>>5&1]):a.i[b<<2&12|b>>2&1]=a.i[b>>1&12|b>>5&1]:a.i[0]=e};C[177]=function(a){var b=u(a);if(192>b){var d=a.f(b);Mb(a,d,2);var e=K(a,d)}else e=a.b[b<<1&14];a.sub(e,a.b[0],15);a.pb()?192>b?S(a,d,a.b[b>>2&14]):a.b[b<<1&14]=a.b[b>>2&14]:a.b[0]=e}; -E[177]=function(a){var b=u(a);if(192>b){var d=a.f(b);Mb(a,d,4);var e=L(a,d)}else e=a.a[b&7];a.sub(e,a.a[0],31);a.pb()?192>b?U(a,d,a.a[b>>3&7]):a.a[b&7]=a.a[b>>3&7]:a.a[0]=e};C[178]=function(a){var b=u(a);192<=b&&V(a);Tb(a,2,a.f(b),b>>2&14)};E[178]=function(a){var b=u(a);192<=b&&V(a);Ub(a,2,a.f(b),b>>3&7)};C[179]=function(a){var b=u(a);192>b?sb(a,a.f(b),a.ja[b>>2&14]):a.b[b<<1&14]=pb(a,a.b[b<<1&14],a.ja[b>>2&14]&15)}; -E[179]=function(a){var b=u(a);192>b?sb(a,a.f(b),a.a[b>>3&7]):a.a[b&7]=pb(a,a.a[b&7],a.a[b>>3&7]&31)};C[180]=function(a){var b=u(a);192<=b&&V(a);Tb(a,4,a.f(b),b>>2&14)};E[180]=function(a){var b=u(a);192<=b&&V(a);Ub(a,4,a.f(b),b>>3&7)};C[181]=function(a){var b=u(a);192<=b&&V(a);Tb(a,5,a.f(b),b>>2&14)};E[181]=function(a){var b=u(a);192<=b&&V(a);Ub(a,5,a.f(b),b>>3&7)};C[182]=function(a){var b=u(a),d=192>b?x(a,a.f(b)):a.i[b<<2&12|b>>2&1];a.b[b>>2&14]=d}; -E[182]=function(a){var b=u(a),d=192>b?x(a,a.f(b)):a.i[b<<2&12|b>>2&1];a.a[b>>3&7]=d};C[183]=E[183]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.a[b>>3&7]=d};C[184]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14];a.b[b>>2&14]=ub(a,d)};E[184]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7];a.a[b>>3&7]=ub(a,d)};C[185]=E[185]=function(a){V(a)}; -C[186]=function(a){var b=u(a);switch(b>>3&7){case 4:192>b?qb(a,a.f(b),u(a)&15):kb(a,a.b[b<<1&14],u(a)&15);break;case 5:192>b?tb(a,a.f(b),u(a)):a.b[b<<1&14]=ob(a,a.b[b<<1&14],u(a)&15);break;case 6:192>b?sb(a,a.f(b),u(a)):a.b[b<<1&14]=pb(a,a.b[b<<1&14],u(a)&15);break;case 7:192>b?rb(a,a.f(b),u(a)):a.b[b<<1&14]=lb(a,a.b[b<<1&14],u(a)&15);break;default:V(a)}}; -E[186]=function(a){var b=u(a);switch(b>>3&7){case 4:192>b?qb(a,a.f(b),u(a)&31):kb(a,a.a[b&7],u(a)&31);break;case 5:192>b?tb(a,a.f(b),u(a)):a.a[b&7]=ob(a,a.a[b&7],u(a)&31);break;case 6:192>b?sb(a,a.f(b),u(a)):a.a[b&7]=pb(a,a.a[b&7],u(a)&31);break;case 7:192>b?rb(a,a.f(b),u(a)):a.a[b&7]=lb(a,a.a[b&7],u(a)&31);break;default:V(a)}};C[187]=function(a){var b=u(a);192>b?rb(a,a.f(b),a.ja[b>>2&14]):a.b[b<<1&14]=lb(a,a.b[b<<1&14],a.ja[b>>2&14]&15)}; -E[187]=function(a){var b=u(a);192>b?rb(a,a.f(b),a.a[b>>3&7]):a.a[b&7]=lb(a,a.a[b&7],a.a[b>>3&7]&31)};C[188]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14],e=a.b;var f=a.b[b>>2&14];a.m=0;0===d?(a.d|=64,a=f):(a.d&=-65,a=Math.Kc(-d&d));e[b>>2&14]=a};E[188]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7],e=a.a;var f=a.a[b>>3&7];a.m=0;0===d?(a.d|=64,a=f):(a.d&=-65,a=Math.Kc((-d&d)>>>0));e[b>>3&7]=a}; -C[189]=function(a){var b=u(a),d=192>b?K(a,a.f(b)):a.b[b<<1&14],e=a.b;var f=a.b[b>>2&14];a.m=0;0===d?(a.d|=64,a=f):(a.d&=-65,a=Math.Kc(d));e[b>>2&14]=a};E[189]=function(a){var b=u(a),d=192>b?L(a,a.f(b)):a.a[b&7],e=a.a;var f=a.a[b>>3&7];a.m=0;0===d?(a.d|=64,a=f):(a.d&=-65,a=Math.Kc(d>>>0));e[b>>3&7]=a};C[190]=function(a){var b=u(a),d=192>b?x(a,a.f(b))<<24>>24:a.vb[b<<2&12|b>>2&1];a.b[b>>2&14]=d};E[190]=function(a){var b=u(a),d=192>b?x(a,a.f(b))<<24>>24:a.vb[b<<2&12|b>>2&1];a.a[b>>3&7]=d}; -C[191]=E[191]=function(a){var b=u(a),d=192>b?K(a,a.f(b))<<16>>16:a.ja[b<<1&14];a.a[b>>3&7]=d};C[192]=E[192]=function(a){var b=u(a),d,e;192>b?(e=y(a,a.f(b)),d=a.memory.H(e)):d=a.i[b<<2&12|b>>2&1];var f=b>>1&12|b>>5&1,g=a.i[f];a.i[f]=d;d=a.add(d,g,7);192>b?a.memory.O(e,d):a.i[b<<2&12|b>>2&1]=d}; -C[193]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4095===(d&4095)?(f=y(a,d+1),d=F(a,e,f)):d=a.memory.P(e)):d=a.b[b<<1&14];var g=b>>2&14,k=a.b[g];a.b[g]=d;d=a.add(d,k,15);192>b?f?G(a,e,f,d):a.memory.ba(e,d):a.b[b<<1&14]=d};E[193]=function(a){var b=u(a),d,e,f=0;192>b?(d=a.f(b),e=y(a,d),a.r&&4093<=(d&4095)?(f=y(a,d+3),d=H(a,e,f)):d=I(a.memory,e)):d=a.a[b&7];var g=b>>3&7,k=a.a[g];a.a[g]=d;d=a.add(d,k,31);192>b?f?J(a,e,f,d):a.memory.ea(e,d):a.a[b&7]=d};C[194]=E[194]=function(a){V(a)}; -C[195]=E[195]=function(a){V(a)};C[196]=E[196]=function(a){V(a)};C[197]=E[197]=function(a){V(a)};C[198]=E[198]=function(a){V(a)};C[199]=E[199]=function(a){var b=u(a);192<=b&&V(a);b=a.f(b);Mb(a,b,8);var d=L(a,b),e=L(a,b+4);a.a[0]===d&&a.a[2]===e?(a.d|=64,U(a,b,a.a[3]),U(a,b+4,a.a[1])):(a.d&=-65,a.a[0]=d,a.a[2]=e);a.m&=-65};C[200]=E[200]=function(a){sc(a,0)};C[201]=E[201]=function(a){sc(a,1)};C[202]=E[202]=function(a){sc(a,2)};C[203]=E[203]=function(a){sc(a,3)};C[204]=E[204]=function(a){sc(a,4)}; -C[205]=E[205]=function(a){sc(a,5)};C[206]=E[206]=function(a){sc(a,6)};C[207]=E[207]=function(a){sc(a,7)};C[208]=E[208]=function(a){V(a)};C[209]=E[209]=function(a){V(a)};C[210]=E[210]=function(a){V(a)};C[211]=E[211]=function(a){V(a)};C[212]=E[212]=function(a){V(a)};C[213]=E[213]=function(a){V(a)};C[214]=E[214]=function(a){V(a)};C[215]=E[215]=function(a){V(a)};C[216]=E[216]=function(a){V(a)};C[217]=E[217]=function(a){V(a)};C[218]=E[218]=function(a){V(a)};C[219]=E[219]=function(a){V(a)}; -C[220]=E[220]=function(a){V(a)};C[221]=E[221]=function(a){V(a)};C[222]=E[222]=function(a){V(a)};C[223]=E[223]=function(a){V(a)};C[224]=E[224]=function(a){V(a)};C[225]=E[225]=function(a){V(a)};C[226]=E[226]=function(a){V(a)};C[227]=E[227]=function(a){V(a)};C[228]=E[228]=function(a){V(a)};C[229]=E[229]=function(a){V(a)};C[230]=E[230]=function(a){V(a)};C[231]=E[231]=function(a){V(a)};C[232]=E[232]=function(a){V(a)};C[233]=E[233]=function(a){V(a)};C[234]=E[234]=function(a){V(a)};C[235]=E[235]=function(a){V(a)}; -C[236]=E[236]=function(a){V(a)};C[237]=E[237]=function(a){V(a)};C[238]=E[238]=function(a){V(a)};C[239]=E[239]=function(a){V(a)};C[240]=E[240]=function(a){V(a)};C[241]=E[241]=function(a){V(a)};C[242]=E[242]=function(a){V(a)};C[243]=E[243]=function(a){V(a)};C[244]=E[244]=function(a){V(a)};C[245]=E[245]=function(a){V(a)};C[246]=E[246]=function(a){V(a)};C[247]=E[247]=function(a){V(a)};C[248]=E[248]=function(a){V(a)};C[249]=E[249]=function(a){V(a)};C[250]=E[250]=function(a){V(a)};C[251]=E[251]=function(a){V(a)}; -C[252]=E[252]=function(a){V(a)};C[253]=E[253]=function(a){V(a)};C[254]=E[254]=function(a){V(a)};C[255]=E[255]=function(a){V(a)};"use strict";function mc(a,b){var d=a.s[1];a.k-=d;a.k=a.k+b&65535;a.k=a.k+d|0;a.G=!0}function qc(a,b){b?mc(a,q(a)):a.k=a.k+2|0;a.G=!0}function rc(a,b){if(b){var d=s(a);a.k=a.k+d|0}else a.k=a.k+4|0;a.G=!0}l=m.prototype;l.loop=function(){if(--this.g[this.w]){var a=p(this);this.k=this.k+a|0}else this.k++;this.G=!0}; -l.ta=function(){return this.m&1?(this.Ca^(this.Ca^this.Da)&(this.Da^this.j))>>>this.W&1:this.d&1};l.Qd=function(){return this.m&4?154020>>((this.u^this.u>>4)&15)&4:this.d&4};function xb(a){return a.m&16?(a.Ca^a.Da^a.j)&16:a.d&16}l.pb=function(){return this.m&64?(~this.u&this.u-1)>>>this.W&1:this.d&64};l.Hc=function(){return this.m&128?this.u>>>this.W&1:this.d&128};l.cc=function(){return this.m&2048?((this.Ca^this.j)&(this.Da^this.j))>>>this.W&1:this.d&2048};l.Pa=m.prototype.cc;l.Ea=m.prototype.ta; -l.Ga=m.prototype.pb;l.Qa=m.prototype.Hc;l.Fa=m.prototype.Qd;function Fb(a){return a.ta()||a.pb()}function Gb(a){return!a.Hc()!==!a.cc()}function Hb(a){return a.pb()||!a.Hc()!==!a.cc()}function M(a,b){var d=vb(a,-2);S(a,d,b);a.t[a.v]-=2}function N(a,b){var d=vb(a,-4);U(a,d,b);a.t[a.v]-=4}function P(a){var b=K(a,a.s[2]+a.t[a.v]|0);a.t[a.v]+=2;return b}function Q(a){var b=L(a,a.s[2]+a.t[a.v]|0);a.t[a.v]+=4;return b}function Kb(a,b){var d=a.b[0];a.b[0]=a.b[b];a.b[b]=d} -function Lb(a,b){var d=a.a[0];a.a[0]=a.a[b];a.a[b]=d}function Tb(a,b,d,e){var f=K(a,d);d=K(a,d+2|0);O(a,b,d);a.b[e]=f}function Ub(a,b,d,e){var f=L(a,d);d=K(a,d+4|0);O(a,b,d);a.a[e]=f}function sc(a,b){var d=a.a[b];a.a[b]=d>>>24|d<<24|d>>8&65280|d<<8&16711680}l.Vc=function(){this.gb||this.l()};function tc(a){if(a.Ub)a.Ub=a.gb=!1;else{a.gb=!0;try{a.dc?a.L():a.Md()}catch(b){a.Od(b)}}}l.stop=function(){this.gb&&(this.Ub=!0)}; -function oa(a){var b=a.gb;a.Ub=!0;a.gb=!1;setTimeout(function(){a.K.Sc.va();a.K.Xb.va();a.Ba(a.I);b&&a.l()},10)}l.Od=function(a){if(233495534===a)this.C=!1,this.T=0,this.Ka=-1,this.$a=this.ya,pa(this),this.Ta=this.ya,qa(this),this.l();else throw this.gb=!1,console.log(a),console.log(a.stack),a;}; -function uc(a){"undefined"!==typeof setImmediate?a.l=function(){setImmediate(function(){tc(a)})}:"undefined"!==typeof window&&"undefined"!==typeof postMessage?(window.addEventListener("message",function(b){b.source===window&&43605===b.data&&tc(a)},!1),a.l=function(){window.postMessage(43605,"*")}):a.l=function(){setTimeout(function(){tc(a)},0)};"object"===typeof performance&&performance.now?a.Oc=function(){return performance.now()}:a.Oc=Date.now} -l.Ba=function(a){this.R&&(this.R=!1,uc(this));this.I=a;this.Ja=a.Ja||67108864;this.memory=new vc(new ArrayBuffer(this.Ja),this.Ja);this.yb=new Uint8Array(8);this.Aa=new Uint32Array(8);this.s=new Int32Array(8);this.p=new Int32Array(1048576);this.Va=new Uint8Array(1048576);this.Vb=new Uint8Array(1048576);this.a=new Int32Array(8);this.fb=new Uint32Array(this.a.buffer);this.ja=new Int16Array(this.a.buffer);this.b=new Uint16Array(this.a.buffer);this.vb=new Int8Array(this.a.buffer);this.i=new Uint8Array(this.a.buffer); -this.Q=new Uint16Array(8);this.bc=new Int32Array(8);this.za=!1;this.Lb=this.Fc=this.Nb=this.Jc=0;this.C=!1;this.Z=1610612752;this.Ia=this.Cc=this.bb=0;this.bc[6]=-61456;this.bc[7]=1024;this.N=0;this.r=!1;this.vd=0;this.$a=this.Tb=this.Ta=this.ya=!1;this.Sa=-1;qa(this);pa(this);this.t=this.b;this.v=8;this.wb=10;this.V=this.J=0;this.Ub=this.gb=this.dc=!1;this.Yc=this.Zc=this.sc=0;this.Ka=-1;this.T=0;this.d=2;this.W=this.Da=this.Ca=this.j=this.u=this.m=0;this.he=this.Oc();var b=new xc(this.memory);this.o= -b;var d=a.Jd,e=a.ie;if(d){var f=new Uint8Array(d);this.memory.ha.set(f,1048576-d.byteLength);e&&(f=new Uint8Array(e),this.memory.ha.set(f,786432));b.Pc(4293918720,1048576,function(a){return this.memory.ha[a&1048575]}.bind(this),function(a,b){this.memory.ha[a&1048575]=b}.bind(this));this.k=1048560;O(this,2,48);this.b[8]=256}else a.Qb?(this.k=65536,yc(this.memory,new Uint8Array(a.Qb.gg),1048576),yc(this.memory,new Uint8Array(a.Qb.Yf),this.k),a.Qb.root&&(yc(this.memory,new Uint8Array(a.Qb.root),4194304), -this.a[3]=a.Qb.root.byteLength),zc(this.memory,a.Qb.Mf),this.a[0]=this.Ja,this.a[1]=63488,O(this,1,0),O(this,2,0),O(this,3,0),O(this,0,0),O(this,5,0),O(this,4,0),this.za=this.Tb=this.Ta=this.$a=this.ya=!0,qa(this),pa(this),this.g=this.a,this.v=4,this.wb=5,this.Z=1):(O(this,2,48),this.b[8]=256,this.k=0);var g=0;b.B(146,this,function(){return g});b.A(146,this,function(a){g=a});this.K={};a.Ce&&(this.K.$=new Ac(this),this.K.wd=new Bc(this),this.K.Dc=new Cc(this),this.K.Kf=new Dc,this.K.Xb=new Ec(this, -a.Bd,a.sa||8388608),this.K.Sc=new Fc(this,a.Be,a.gc),this.ma=new Gc(this),this.K.eg=a.Cd?new Hc(this,1016,a.Cd):new Hc(this,1016,{uf:function(){},Ba:function(){}}),this.K.ze=new Ic(this,a.ob),a.nb&&(this.K.nb=new Jc(this,a.nb,!0,1)),a.Mb&&(this.K.Mb=new Jc(this,a.Mb,!1,0)),this.K.Yd=new Kc(this),this.K.de=new Lc(this,this.K.ze.type,a.Bc||531),a.He&&(this.K.ag=new Mc(this,a.He)))}; -l.Md=function(){var a=Date.now(),b=a;for(this.K.Xb.Ma(b);33>b-a;){this.K.Yd.Ma(b,!1);this.K.de.Ma(b,!1);Rb(this);for(b=11001;b--;)nc(this);b=Date.now()}this.l()};"undefined"!==typeof window&&(window.c=m.prototype.Md,window.h=m.prototype.Od,window.j=m.prototype.L);function nc(a){a.J++;a.V=a.k;var b=u(a);a.table[b](a)}m.prototype.L=function(){var a=Date.now();this.K.Yd.Ma(a,!1);this.K.de.Ma(a,!1);this.K.Xb.Ma(a);if(this.dc){var b=this;setTimeout(function(){b.L()},0)}else this.l()}; -function oc(a){var b=-2147483648===(a.Z&-2147483648);a.ma||(a.Z|=4);a.Z|=16;b!==a.r&&(a.r=b,wa(a))}function u(a){a.k&-4096^a.Sa&&(a.F=R(a,a.k)^a.k,a.Sa=a.k&-4096);var b=a.memory.ha[a.F^a.k]|0;a.k=a.k+1|0;return b}function p(a){return u(a)<<24>>24}function q(a){if(4094<(a.k^a.Sa)>>>0)return u(a)|u(a)<<8;var b=a.memory.P(a.F^a.k);a.k=a.k+2|0;return b}function s(a){if(4092<(a.k^a.Sa)>>>0)return q(a)|q(a)<<16;var b=I(a.memory,a.F^a.k);a.k=a.k+4|0;return b} -function F(a,b,d){return a.memory.H(b)|a.memory.H(d)<<8}function H(a,b,d){var e;e=b&1?b&2?Db(a.memory,d-2>>1):Db(a.memory,b+1>>1):F(a,b+1,d-1);return a.memory.H(b)|e<<8|a.memory.H(d)<<24}function G(a,b,d,e){a.memory.O(b,e);a.memory.O(d,e>>8)}function J(a,b,d,e){a.memory.O(b,e);a.memory.O(d,e>>24);b&1?b&2?(a.memory.O(d-2,e>>8),a.memory.O(d-1,e>>16)):(a.memory.O(b+1,e>>8),a.memory.O(b+2,e>>16)):(a.memory.O(b+1,e>>8),a.memory.O(d-1,e>>16))}function x(a,b){return a.memory.H(R(a,b))} -function K(a,b){return a.r&&4095===(b&4095)?x(a,b)|x(a,b+1)<<8:a.memory.P(R(a,b))}function L(a,b){return a.r&&4093<=(b&4095)?K(a,b)|K(a,b+2)<<16:I(a.memory,R(a,b))}function Jb(a,b,d){a.memory.O(y(a,b),d)}function S(a,b,d){var e=y(a,b);4095===(b&4095)?G(a,e,y(a,b+1),d):a.memory.ba(e,d)}function U(a,b,d){var e=y(a,b);4093<=(b&4095)?J(a,e,y(a,b+3),d):a.memory.ea(e,d)}function Sb(a){return a.$a?Cb(a,3)+s(a)|0:Cb(a,3)+q(a)|0} -function Pb(a){a.d=a.d&-2262|!!a.ta()|!!a.Qd()<<2|!!xb(a)<<4|!!a.pb()<<6|!!a.Hc()<<7|!!a.cc()<<11;a.m=0}function Qb(a,b){var d=1769472,e=2588629;a.d&131072?(d|=12288,e|=1572864):a.N&&(d|=12288,a.N>(a.d>>12&3)&&(d|=512));a.d=(b^(a.d^b)&d)&e|2;a.m=0}function vb(a,b){return a.s[2]+a.t[a.v]+b|0}function Nb(a){return a.k-a.s[1]|0} -function Vb(a,b,d,e){a.dc=!1;if(a.za){if(a.d&131072&&a.Ia&1)throw a.debug.S("VME");a.d&131072&&d&&3>(a.d>>12&3)&&W(a,0);if((b<<3|7)>a.Jc)throw a.debug.S("#GP handler");var f=a.Nb+(b<<3)|0;a.r&&(f=Nc(a,f));var g=a.memory.P(f)|a.memory.P(f+6)<<16,k=a.memory.P(f+2),f=a.memory.H(f+5),t=f>>5&3;if(0===(f&128))throw a.debug.S("#NP handler");d&&ta.N)throw a.debug.S("#GP handler");if(!d.tb)throw a.debug.S("#NP handler");Pb(a);f=a.d;if(!d.Bb&&d.xaa.Aa[6])throw a.debug.S("#TS handler");v=v+a.s[6]|0;a.r&&(v=Nc(a,v));var t=I(a.memory,v),v=a.memory.P(v+4),z=Xb(a,v);if(z.sb)throw a.debug.S("#TS handler");if(z.xb!==d.xa)throw a.debug.S("#TS handler");if(z.xa!==d.xa||!z.Wc)throw a.debug.S("#TS handler"); -if(!z.tb)throw a.debug.S("#TS handler");var z=a.a[4],D=a.Q[2];a.N=d.xa;a.Sa=-1;a.ya!==d.size&&Wb(a,d.size);a.d&=-196609;a.a[4]=t;O(a,2,v);f&131072&&(N(a,a.Q[5]),N(a,a.Q[4]),N(a,a.Q[3]),N(a,a.Q[0]));N(a,D);N(a,z)}else if(d.Bb||d.xa===a.N)a.d&131072&&W(a,k&-4);else throw a.debug.S("#GP handler");N(a,f);N(a,a.Q[1]);N(a,Nb(a));f&131072&&(O(a,5,0),O(a,4,0),O(a,3,0),O(a,0,0));!1!==e&&N(a,e);a.Q[1]=k;a.ya!==d.size&&Wb(a,d.size);a.Aa[1]=d.Kb;a.s[1]=d.Hb;a.k=a.s[1]+g|0;b?Rb(a):a.d&=-513}else Pb(a),M(a,a.d), -M(a,a.Q[1]),M(a,Nb(a)),a.d&=-513,O(a,1,a.memory.P((b<<2)+2)),a.k=a.s[1]+a.memory.P(b<<2)|0;a.G=!0}function Yb(a){a.k=a.V;Vb(a,0,!1,!1);throw 233495534;}function V(a){a.k=a.V;Vb(a,6,!1,!1);throw 233495534;}function Ob(a){a.k=a.V;Vb(a,7,!1,!1);throw 233495534;}function W(a,b){a.k=a.V;Vb(a,13,!1,b);throw 233495534;}function wb(a,b){a.Ka=b;a.table[u(a)](a);a.Ka=-1}function n(a){return Cb(a,3)}function r(a){return Cb(a,2)}function Cb(a,b){return-1===a.Ka?a.s[b]:9===a.Ka?0:a.s[a.Ka]} -function Rb(a){a.K.$&&a.d&512&&!a.C&&a.K.$.h()}function yb(a,b,d){if(a.za&&(a.N>(a.d>>12&3)||a.d&131072)){var e=a.Aa[6],f=a.s[6];if(103<=e){var g=a.memory.P(Nc(a,f+100+2));if(e>=g+(b+d-1>>3)&&(d=(1<>3)),!((d&65280?a.memory.P(b):a.memory.H(b))&d)))return}W(a,0)}}function Wb(a,b){a.ya=a.Ta=a.$a=b;qa(a);pa(a)}function qa(a){a.Ta?(a.table=a.ga,a.Dd=a.X):(a.table=a.da,a.Dd=a.U)}function pa(a){a.$a?(a.g=a.a,a.w=1,a.q=6,a.n=7):(a.g=a.b,a.w=2,a.q=12,a.n=14)} -function Xb(a,b){var d=0===(b&4),e=b&-8,f,g;f={xb:b&3,Pd:d,sb:!1,td:!0,Hb:0,mb:0,d:0,type:0,xa:0,Ob:!1,tb:!1,Cb:!1,Wc:!1,Bb:!1,size:!1,Kb:0,Vd:!1,Ud:!1,Ed:0};d?(d=a.Lb,g=a.Fc):(d=a.s[7],g=a.Aa[7]);if(0===e)return f.sb=!0,f;if((b|7)>g)return f.td=!1,f;d=d+e|0;a.r&&(d=Nc(a,d));f.Ed=d;f.Hb=a.memory.P(d+2)|a.memory.H(d+4)<<16|a.memory.H(d+7)<<24;f.mb=a.memory.H(d+5);f.d=a.memory.H(d+6)>>4;f.type=f.mb&15;f.xa=f.mb>>5&3;f.Ob=0===(f.mb&16);f.tb=128===(f.mb&128);f.Cb=8===(f.mb&8);f.Wc=2===(f.mb&2);f.Bb=4=== -(f.mb&4);f.size=4===(f.d&4);e=a.memory.P(d)|(a.memory.H(d+6)&15)<<16;f.Kb=f.d&8?(e<<12|4095)>>>0:e;f.Vd=f.Wc&&!f.Cb;f.Ud=f.Wc||!f.Cb;return f} -function O(a,b,d){1===b&&(a.za=1===(a.Z&1));if(!a.za||a.d&131072)a.Q[b]=d,a.yb[b]=0,a.Aa[b]=1048575,a.s[b]=d<<4;else{var e=Xb(a,d);if(2===b){if(e.sb){W(a,0);return}if(!e.td||e.Ob||e.xb!==a.N||!e.Vd||e.xa!==a.N){W(a,d&-4);return}if(!e.tb)throw a.k=a.V,Vb(a,12,!1,d&-4),233495534;(a.Tb=e.size)?(a.t=a.a,a.v=4,a.wb=5):(a.t=a.b,a.v=8,a.wb=10)}else if(1===b){if(!e.Cb)throw a.debug.S("#GP handler");if(e.Ob)throw a.debug.S("load system segment descriptor, type = "+(e.mb&15));if(e.xb!==a.N)throw a.debug.S("privilege change"); -if(!e.Bb&&e.xae.xa&&a.N>e.xa){W(a,d&-4);return}if(!e.tb)throw a.k=a.V,Vb(a,11,!1,d&-4),233495534;}a.yb[b]=0;a.Aa[b]=e.Kb;a.s[b]=e.Hb;a.Q[b]=d}}function pc(a){a.Sa=-1;a.Va.set(a.Vb)}function wa(a){for(var b=new Int32Array(a.Vb.buffer),d=0;262144>d;)b[d++]=b[d++]=b[d++]=b[d++]=0;pc(a)} -function R(a,b){var d;a.r?3===a.N?(d=b>>>12,d=a.Va[d]&4?a.p[d]^b:Oc(a,b,0,1)|b&4095):d=Nc(a,b):d=b;return d}function y(a,b){var d;a.r?3===a.N?(d=b>>>12,d=a.Va[d]&8?a.p[d]^b:Oc(a,b,1,1)|b&4095):(d=b>>>12,d=a.Va[d]&2?a.p[d]^b:Oc(a,b,1,0)|b&4095):d=b;return d}function Nc(a,b){var d=b>>>12;return a.Va[d]&1?a.p[d]^b:Oc(a,b,0,0)|b&4095} -function Oc(a,b,d,e){var f=b>>>12,g=(a.Cc>>>2)+(f>>10),k=a.memory.eb[g],t=!0,v=!0;k&1||(a.bb=b,Pc(a,d,e,0));0===(k&2)&&(t=!1,d&&(e||a.Z&65536)&&(a.bb=b,Pc(a,d,e,1)));0===(k&4)&&(v=!1,e&&(a.bb=b,Pc(a,d,e,1)));if(k&a.vd)a.memory.eb[g]=k|32|d<<6,b=k&4290772992|b&4190208,k=k&256;else{var z=((k&4294963200)>>>2)+(f&1023),D=a.memory.eb[z];0===(D&1)&&(a.bb=b,Pc(a,d,e,0));0===(D&2)&&(t=!1,d&&(e||a.Z&65536)&&(a.bb=b,Pc(a,d,e,1)));0===(D&4)&&(v=!1,e&&(a.bb=b,Pc(a,d,e,1)));a.memory.eb[g]=k|32;a.memory.eb[z]= -D|32|d<<6;b=D&4294963200;k=D&256}a.p[f]=b^f<<12;t=v?t?15:5:t?3:1;a.Va[f]=t;k&&a.Ia&128&&(a.Vb[f]=t);return b}function Mb(a,b,d){if(a.r){var e=3===a.N?1:0,f=e?8:2,g=b>>>12;0===(a.Va[g]&f)&&Oc(a,b,1,e);4096<=(b&4095)+d-1&&0===(a.Va[g+1]&f)&&Oc(a,b+d-1,1,e)}}function Pc(a,b,d,e){if(a.C)throw a.debug.S("Double fault");var f=a.bb>>>12;a.Va[f]=0;a.Vb[f]=0;a.k=a.V;a.C=!0;Vb(a,14,!1,d<<2|b<<1|e);throw 233495534;}"object"===typeof window&&(window.v86=m,m.prototype.run=m.prototype.Vc,m.prototype.stop=m.prototype.stop);function xc(a){function b(){return 255}function d(){return 65535}function e(){return-1}function f(){}var g=a.size;this.c=[];this.K=Array(65536);for(var k=0;65536>k;k++)this.c[k]={H:b,P:d,$d:e,O:f,ba:f,ea:f,rb:void 0};this.B=function(a,b,d,e,f){d&&(this.c[a].H=d);e&&(this.c[a].P=e);f&&(this.c[a].$d=f);this.c[a].rb=b};this.A=function(a,b,d,e,f){d&&(this.c[a].O=d);e&&(this.c[a].ba=e);f&&(this.c[a].ea=f);this.c[a].rb=b};this.ce=function(a,b,d,e,f,g){function k(){return d.call(this)|e.call(this)<<8}function ua(){return f.call(this)| -g.call(this)<<8}function va(){return d.call(this)|e.call(this)<<8|f.call(this)<<16|g.call(this)<<24}f&&g?(this.B(a,b,d,k,va),this.B(a+1,b,e),this.B(a+2,b,f,ua),this.B(a+3,b,g)):(this.B(a,b,d,k),this.B(a+1,b,e))};this.pc=function(a,b,d,e,f,g){function k(a){d.call(this,a&255);e.call(this,a>>8&255)}function ua(a){f.call(this,a&255);g.call(this,a>>8&255)}function va(a){d.call(this,a&255);e.call(this,a>>8&255);f.call(this,a>>16&255);g.call(this,a>>>24)}f&&g?(this.A(a,b,d,k,va),this.A(a+1,b,e),this.A(a+ -2,b,f,ua),this.A(a+3,b,g)):(this.A(a,b,d,k),this.A(a+1,b,e))};this.h=function(b){var d=a.ec[b>>>14];return d(b)|d(b+1)<<8|d(b+2)<<16|d(b+3)<<24};this.j=function(b,d){var e=a.fc[b>>>14];e(b,d&255);e(b+1,d>>8&255);e(b+2,d>>16&255);e(b+3,d>>>24)};this.Pc=function(b,d,e,f,g,k){g||(g=this.h);k||(k=this.j);for(b>>>=14;0>>=0;var e=b+(d>>>0);if(e>=g)return!0;for(b&=-16384;b>14])return!0;b+=16384}return!1};this.Rc=function(a,b){var d=this.c[a];d.O.call(d.rb,b)};this.lc=function(a,b){var d=this.c[a];d.ba.call(d.rb,b)};this.mc=function(a,b){var d=this.c[a];d.ea.call(d.rb,b)};this.Qc=function(a){a=this.c[a];return a.H.call(a.rb)};this.jc=function(a){a=this.c[a];return a.P.call(a.rb)};this.kc=function(a){a=this.c[a];return a.$d.call(a.rb)}};Object.Wf=function(){for(var a=[[1,""],[2,"CPU"],[32768,"DISK"],[4,"FPU"],[8,"MEM"],[16,"DMA"],[32,"IO"],[64,"PS2"],[128,"PIC"],[256,"VGA"],[512,"PIT"],[1024,"MOUS"],[2048,"PCI"],[4096,"BIOS"],[8192,"CD"],[16384,"SERI"],[65536,"RTC"],[131072,"HPET"],[262144,"ACPI"],[524288,"APIC"],[1048576,"NET"],[2097152,"VIO"]],b={},d=0;dRc;Rc++)Rc&Rc-1||Sc++,Qc[Rc]=Sc; -Math.Kc=function(a){var b=a>>>16;if(b){var d=b>>>8;return d?24+Qc[d]:16+Qc[b]}return(d=a>>>8)?8+Qc[d]:Qc[a]};function Tc(a){var b=new Uint8Array(a),d,e;this.length=0;this.push=function(d){this.length!==a&&this.length++;b[e]=d;e=e+1&a-1};this.shift=function(){if(this.length){var e=b[d];d=d+1&a-1;this.length--;return e}return-1};this.c=function(){this.length=e=d=0};this.c()};function Gc(a){this.j=a;this.h=new Float64Array(8);this.ua=new Uint8Array(this.h.buffer);new Int32Array(this.h.buffer);this.p=255;this.c=0;this.R=895;this.pa=this.X=this.ga=this.ra=this.da=this.l=0;this.I=new Float32Array(1);new Uint8Array(this.I.buffer);this.U=new Int32Array(this.I.buffer);this.F=new Float64Array(1);this.L=new Uint8Array(this.F.buffer);this.C=new Int32Array(this.F.buffer);this.na=NaN;this.wa=new Float64Array([1,Math.log(10)/Math.LN2,Math.LOG2E,Math.PI,Math.log(2)/Math.LN10,Math.LN2, -0])}Gc.prototype.Zb=function(){this.I=new Float32Array(1);new Uint8Array(this.I.buffer);this.U=new Int32Array(this.I.buffer);this.F=new Float64Array(1);this.L=new Uint8Array(this.F.buffer);this.C=new Int32Array(this.F.buffer);this.ua=new Uint8Array(this.h.buffer);new Int32Array(this.h.buffer)};function $(a){V(a.j)}function fc(a){a.l|=1}function $b(a,b){var d=X(a);a.l&=-18177;d>b||(a.l=b>d?a.l|256:d===b?a.l|16384:a.l|17664)} -function jc(a,b){var d=a.h[a.c];a.j.m&=-70;a.j.d&=-70;d>b||(a.j.d=b>d?a.j.d|1:d===b?a.j.d|64:a.j.d|69)}function ic(a){a.R=895;a.l=0;a.da=0;a.X=0;a.ga=0;a.p=255;a.c=0}function cc(a,b){if(a.j.Ta){Mb(a.j,b,26);S(a.j,b,a.R);S(a.j,b+4,a.l&-14337|a.c<<11);for(var d=0,e,f=0;8>f;f++)e=a.h[f],a.p>>f&1?d|=3<<(f<<1):0===e?d|=1<<(f<<1):isFinite(e)||(d|=2<<(f<<1));S(a.j,b+8,d);U(a.j,b+12,a.da);S(a.j,b+16,a.ra);S(a.j,b+18,a.ga);U(a.j,b+20,a.X);S(a.j,b+24,a.pa)}else $(a)} -function bc(a,b){if(a.j.Ta){a.R=K(a.j,b);var d=K(a.j,b+4);a.l=d&-14337;a.c=d>>11&7;for(var d=K(a.j,b+8),e=a.p=0;8>e;e++)a.p|=d>>e&d>>e+1&1<>10&3;return 0===d?(d=Math.round(b),.5===d-b&&d%2&&d--,d):1===d||3===d&&0>a.c&1?(a.l&=-513,a.p&=~(1<>b&1?(a.l&=-513,a.l|=65,a.na):a.h[b]}function X(a){return a.p>>a.c&1?(a.l&=-513,a.l|=65,a.na):a.h[a.c]} -function gc(a,b){var d=K(a.j,b+8),e,f=L(a.j,b)>>>0,g=L(a.j,b+4)>>>0;e=d>>15;d&=-32769;if(0===d)return 0;if(!(32767>d))return a.L[7]=127|e<<7,a.L[6]=240|g>>30<<3&8,a.L[5]=0,a.L[4]=0,a.C[0]=0,a.F[0];f+=4294967296*g;e&&(f=-f);return f*Math.pow(2,d-16383-63)} -function hc(a,b,d){a.F[0]=a.h[a.c+d&7];d=a.L[7]&128;var e=(a.L[7]&127)<<4|a.L[6]>>4,f,g;2047===e?(e=32767,f=0,g=2147483648|(a.C[1]&524288)<<11):0===e?g=f=0:(e+=15360,f=a.C[0]<<11,g=2147483648|(a.C[1]&1048575)<<11|a.C[0]>>>21);U(a.j,b,f);U(a.j,b+4,g);S(a.j,b+8,d<<8|e)}function kc(a,b){var d=L(a.j,b),e=L(a.j,b+4);a.C[0]=d;a.C[1]=e;return a.F[0]}function lc(a,b){Mb(a.j,b,8);a.F[0]=Z(a,0);U(a.j,b,a.C[0]);U(a.j,b+4,a.C[1])}function Zb(a,b){a.U[0]=L(a.j,b);return a.I[0]};function Jc(a,b,d,e){0===e?(this.j=496,this.na=14,this.Rb=240):(this.j=496,this.na=14,this.Rb=248);this.da=this.j|516;this.$=a.K.$;this.memory=a.memory;this.buffer=b;this.ia=d?2048:512;this.X=d;this.p=this.L=this.F=this.h=0;this.buffer&&(this.h=this.buffer.byteLength/this.ia,this.h!==(this.h|0)&&(this.h=Math.ceil(this.h)),d?(this.F=1,this.L=0):(this.F=255,this.L=63),this.p=this.h/(this.F+1)/(this.L+1),this.p!==(this.p|0)&&(this.p=Math.ceil(this.p)));this.M={hb:0,rc:0,ab:0,$b:0,cb:!1};this.ic=[134, -128,32,58,5,0,160,2,0,143,1,1,0,0,0,0,this.j&255|1,this.j>>8,0,0,this.da&255|1,this.da>>8,0,0,0,0,0,0,0,0,0,0,1,192,0,0,0,0,0,0,0,0,0,0,67,16,212,130,0,0,0,0,0,0,0,0,0,0,0,0,this.na,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.hc=[{size:8},{size:4},!1,!1,{size:16}];a.K.wd.oc(this);a.o.B(this.j|7,this,this.be);a.o.B(this.da|2,this,this.be);a.o.A(this.j| -7,this,this.je);a.o.A(this.da|2,this,this.je);this.ua=2;this.la=0;this.Y=new Uint8Array(0);this.ld=this.head=this.ka=this.aa=this.I=this.C=this.c=this.sd=0;this.status=80;this.ra=1;this.U=this.R=this.wa=0;this.l=new Uint8Array(0);this.pa=null;this.ga=-1;this.ca=this.nc=0;a.o.B(this.j|0,this,this.zf,this.xf,this.yf);a.o.B(this.j|1,this,this.Af);a.o.B(this.j|2,this,this.wf);a.o.B(this.j|3,this,this.Cf);a.o.B(this.j|4,this,function(){return this.aa&255});a.o.B(this.j|5,this,function(){return this.ka& -255});a.o.B(this.j|6,this,function(){return this.ld});a.o.A(this.j|0,this,this.Fb,this.Ff,this.Gf);a.o.A(this.j|1,this,this.Hf);a.o.A(this.j|2,this,this.Ef);a.o.A(this.j|3,this,this.If);a.o.A(this.j|4,this,function(a){this.aa=(this.aa<<8|a)&65535});a.o.A(this.j|5,this,function(a){this.ka=(this.ka<<8|a)&65535});a.o.A(this.j|6,this,function(a){a&16||(this.ld=a,this.sd=a>>6&1,this.head=a&15)});a.o.A(this.j|7,this,this.La);a.o.B(49156,this,void 0,void 0,this.te);a.o.A(49156,this,void 0,void 0,this.xe); -a.o.B(49152,this,this.ve,void 0,this.ue);a.o.A(49152,this,void 0,void 0,this.ye);a.o.B(49154,this,this.we);a.o.A(49154,this,this.Ld)}Jc.prototype.D=function(){0===(this.ua&2)&&(this.ca|=4,this.$.D(this.na))}; -Jc.prototype.La=function(a){switch(a){case 0:this.D();this.status=80;break;case 8:this.la=0;this.Y=new Uint8Array(0);this.status=80;this.D();break;case 16:this.D();break;case 39:this.D();this.Y=new Uint8Array([0,0,0,0,this.buffer.byteLength&255,this.buffer.byteLength>>8&255,this.buffer.byteLength>>16&255,this.buffer.byteLength>>24&255,0,0,0,0]);this.status=88;break;case 32:case 41:case 36:case 196:Uc(this,a);break;case 48:case 52:case 57:if(48===a){var b=this.c&255,d=this.sd?Vc(this):Wc(this);0=== -b&&(b=256)}else if(52===a||57===a)b=this.c,d=Xc(this),0===b&&(b=65536);a=b*this.ia;d=d*this.ia;this.aa+=b;d+a>this.buffer.byteLength?this.status=255:(this.status=80,this.ga=88,Yc(this,a),this.wa=d,this.pa="do_write");this.D();break;case 144:this.D();this.I=257;this.status=80;break;case 145:this.D();break;case 160:this.X&&(this.status=88,Yc(this,12),this.pa="atapi_handle",this.c=1,this.D());break;case 161:this.X?(Zc(this),this.status=88):this.status=80;this.D();break;case 198:this.ra=this.c;this.D(); -break;case 200:$c(this);break;case 202:ad(this);break;case 225:this.D();break;case 236:if(this.X)break;Zc(this);this.status=88;this.D();break;case 234:this.D();break;case 239:this.D();break;default:this.I=4}}; -Jc.prototype.atapi_handle=function(){this.c=2;switch(this.l[0]){case 0:this.status=64;this.aa=8;this.ka=0;this.D();break;case 3:this.Y=new Uint8Array(Math.min(this.l[4],15));this.status=88;this.Y[0]=240;this.Y[7]=8;this.la=0;this.c=2;this.aa=8;this.ka=0;this.D();break;case 18:this.Y=new Uint8Array(Math.min(this.l[4],36));this.status=88;this.Y.set([5,128,1,49,0,0,0,0,83,79,78,89,32,32,32,32,67,68,45,82,79,77,32,67,68,85,45,49,48,48,48,32,49,46,49,97]);this.la=0;this.c=2;this.D();break;case 30:this.Y= -new Uint8Array(0);this.status=80;this.la=0;this.c=2;this.D();break;case 37:this.Y=new Uint8Array([this.h>>24&255,this.h>>16&255,this.h>>8&255,this.h&255,0,0,this.ia>>8&255,this.ia&255]);this.status=88;this.la=0;this.c=2;this.aa=8;this.ka=0;this.D();break;case 40:this.I&1?bd(this,this.l):cd(this,this.l);break;case 67:this.Y=new Uint8Array(2048);this.Y[0]=0;this.Y[1]=10;this.Y[2]=1;this.Y[3]=1;this.status=88;this.la=0;this.c=2;this.ka=8;this.aa=0;this.D();break;case 70:this.Y=new Uint8Array(this.l[8]| -this.l[7]<<8);this.status=88;this.la=0;this.c=2;this.D();break;case 74:this.Y=new Uint8Array(this.l[8]|this.l[7]<<8);this.status=88;this.la=0;this.c=2;this.D();break;case 81:this.Y=new Uint8Array(0);this.status=80;this.la=0;this.c=2;this.D();break;case 90:this.D();this.status=80;break;default:this.status=80}};Jc.prototype.do_write=function(){this.status=80;this.buffer.set(this.wa,this.l.subarray(0,this.R),function(){this.D()}.bind(this));this.M.rc+=this.R/this.ia|0;this.M.$b+=this.R};l=Jc.prototype; -l.be=function(){var a=this.status;0<=this.ga&&(this.status=this.ga,this.ga=-1);return a};l.je=function(a){this.ua=a;a&4&&(this.X?(this.status=81,this.C=this.I=this.c=1,this.aa=20,this.ka=235):(this.status=81,this.C=this.I=this.c=1,this.aa=60,this.ka=195))};function Yc(a,b){b>a.l.length&&(a.l=new Uint8Array(b));a.R=b;a.U=0} -function cd(a,b){var d=(b[7]<<8|b[8])*a.ia,e=(a.ka&255)<<8|a.aa&255,f=(b[2]<<24|b[3]<<16|b[4]<<8|b[5])*a.ia;e||(e=32768);e=Math.min(d,e);a.aa=e&255;a.ka=e>>8&255;f>=a.buffer.byteLength?(a.status=255,a.D()):(d=Math.min(d,a.buffer.byteLength-f),a.status=128,a.M.cb=!0,a.buffer.get(f,d,function(a){this.Y=a;this.status=88;this.la=0;this.D();this.M.cb=!1;this.M.hb+=d/this.ia|0;this.M.ab+=d}.bind(a)))} -function bd(a,b){var d=(b[7]<<8|b[8])*a.ia,e=(b[2]<<24|b[3]<<16|b[4]<<8|b[5])*a.ia;e>=a.buffer.byteLength?(a.status=255,a.D()):(d=Math.min(d,a.buffer.byteLength-e),a.status=128,a.M.cb=!0,a.buffer.get(e,d,function(a){var b=this.nc,e=0;do{var t=I(this.memory,b),v=this.memory.P(b+4),z=this.memory.H(b+7)&128;v||(v=65536);yc(this.memory,a.subarray(e,e+v),t);e+=v;b+=8}while(!z);this.status=80;this.ca&=-4;this.ca|=4;this.D();this.M.cb=!1;this.M.hb+=d/this.ia|0;this.M.ab+=d}.bind(a)))}l.zf=function(){return dd(this)}; -l.xf=function(){return dd(this)|dd(this)<<8};l.yf=function(){return dd(this)|dd(this)<<8|dd(this)<<16|dd(this)<<24};l.Af=function(){return this.I&255};l.wf=function(){return this.c&255};l.Cf=function(){return this.C&255};function dd(a){if(a.la>8,a.aa=b)}a.la+1>=a.Y.length&&(a.status=80);return a.Y[a.la++]}a.la++;return 0} -l.Fb=function(a){if(!(this.U>=this.R)&&(this.l[this.U++]=a,0===this.U%(512*this.ra)&&this.D(),this.U===this.R))this[this.pa]()};l.Ff=function(a){this.Fb(a&255);this.Fb(a>>8&255)};l.Gf=function(a){this.Fb(a&255);this.Fb(a>>8&255);this.Fb(a>>16&255);this.Fb(a>>24&255)};l.Hf=function(a){this.I=(this.I<<8|a)&65535};l.Ef=function(a){this.c=(this.c<<8|a)&65535};l.If=function(a){this.C=(this.C<<8|a)&65535}; -function Uc(a,b){if(32===b||196===b){var d=a.c&255,e=a.sd?Vc(a):Wc(a);0===d&&(d=256)}else if(36===b||41===b)d=a.c,e=Xc(a),0===d&&(d=65536);var f=d*a.ia,e=e*a.ia;a.aa+=d;e+f>a.buffer.byteLength?(a.status=255,a.D()):(a.status=128,a.M.cb=!0,a.buffer.get(e,f,function(a){this.Y=a;this.status=88;this.la=0;this.D();this.M.cb=!1;this.M.hb+=f/this.ia|0;this.M.ab+=f}.bind(a)))} -function $c(a){var b=a.c&255,d=b*a.ia,e=Vc(a)*a.ia;a.aa+=b;e+d>a.buffer.byteLength?(a.status=255,a.D()):(a.status=128,a.ca|=1,a.M.cb=!0,a.buffer.get(e,d,function(a){var b=this.nc,e=0;do{var t=I(this.memory,b),v=this.memory.P(b+4),z=this.memory.H(b+7)&128;v||(v=65536);yc(this.memory,a.subarray(e,e+v),t);e+=v;b+=8}while(!z);this.status=80;this.ca&=-4;this.ca|=4;this.D();this.M.cb=!1;this.M.hb+=d/this.ia|0;this.M.ab+=d}.bind(a)))} -function ad(a){var b=a.c&255,d=b*a.ia,e=Vc(a)*a.ia;a.aa+=b;if(e+d>a.buffer.byteLength)a.status=255,a.D();else{a.status=128;a.ca|=1;var b=a.nc,f=0,g=0,k=0;do{var t=I(a.memory,b),v=a.memory.P(b+4),z=a.memory.H(b+7)&128;v||(v=65536);a.buffer.set(e+k,a.memory.ha.subarray(t,t+v),function(){g++;g===f&&(this.status=80,this.D(),this.ca&=-4,this.ca|=4)}.bind(a));k+=v;b+=8;f++}while(!z);g===f&&(a.status=80,a.D(),a.ca&=-4,a.ca|=4);a.M.rc+=d/a.ia|0;a.M.$b+=d}} -function Wc(a){return((a.aa&255|a.ka<<8&65280)*a.F+a.head)*a.L+(a.C&255)-1}function Vc(a){return a.C&255|a.aa<<8&65280|a.ka<<16&16711680}function Xc(a){return(a.C&255|a.aa<<8&65280|a.ka<<16&16711680|a.C>>8<<24&4278190080)>>>0} -function Zc(a){a.la=0;a.ld&16?a.Y=new Uint8Array(0):(a.Y=new Uint8Array([64,a.X?133:0,a.p,a.p>>8,0,0,a.F,a.F>>8,0,0,0,0,a.L,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,2,4,0,0,0,0,0,0,0,0,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,255,0,1,0,0,3,0,0,0,2,0,2,7,0,a.p,a.p>>8,a.F,a.F>>8,a.L,0,a.h&255,a.h>>8&255,a.h>>16&255,a.h>>24&255,0,0,a.h&255,a.h>>8&255,a.h>>16&255,a.h>>24&255,0,0,0,4,0,0,30,0,30,0,30,0, -30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,126,0,0,0,0,0,0,116,0,64,0,64,0,116,0,64,0,0,0,0,0,0,0,0,0,0,1,96,0,0,0,0,0,0,0,0,0,0,0,0,a.h&255,a.h>>8&255,a.h>>16&255,a.h>>24&255]),16383>16&255)};function Bc(a){function b(a){var b=d[2]<<8|d[1],e=d[0]&252,f=t[b],b=v[b];f&&3===a&&16<=e&&40>e&&(a=e-16>>2,b=b.hc,a>2]=0))}a=a.o;var d=new Uint8Array(4),e=new Uint8Array(4),f=new Uint8Array(4);new Int32Array(d.buffer);var g=new Int32Array(e.buffer),k=new Int32Array(f.buffer),t=Array(65536),v=Array(65536);a.pc(3324,this,function(){b(0)},function(){b(1)},function(){b(2)},function(){b(3)});a.ce(3324,this,function(){return e[0]},function(){return e[1]},function(){return e[2]},function(){return e[3]}); -a.ce(3320,this,function(){return f[0]},function(){return f[1]},function(){return f[2]},function(){return f[3]});a.pc(3320,this,function(a){d[0]=a},function(a){d[1]=a},function(a){d[2]=a},function(a){d[3]=a;a=d[0]&252;var b=t[d[2]<<8|d[1]];void 0!==b?(k[0]=-2147483648,g[0]=a>2]:-1):(g[0]=-1,k[0]=0)});this.oc=function(a){var b=a.Rb;t[b]=new Int32Array((new Uint8Array(a.ic)).buffer);v[b]=a};this.oc({Rb:0,ic:[134,128,55,18,0,0,0,0,2,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],hc:[]});this.oc({Rb:8,ic:[134,128,0,112,7,0,0,2,0,0,1,6,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],hc:[]})};function Ic(a,b){this.o=a.o;this.$=a.K.$;this.Dc=a.K.Dc;this.h=0;this.U=new Uint8Array(10);this.X=0;this.j=null;this.c=new Uint8Array(10);this.C=this.p=this.l=0;this.L=b;this.F=0;if(b){this.C=b.byteLength;var d,e;if((e={160:{type:1,ib:40,Ua:8,Ra:1},180:{type:1,ib:40,Ua:9,Ra:1},200:{type:1,ib:40,Ua:10,Ra:1},320:{type:1,ib:40,Ua:8,Ra:2},360:{type:1,ib:40,Ua:9,Ra:2},400:{type:1,ib:40,Ua:10,Ra:2},720:{type:3,ib:80,Ua:9,Ra:2},1200:{type:2,ib:80,Ua:15,Ra:2},1440:{type:4,ib:80,Ua:18,Ra:2},1722:{type:5,ib:82, -Ua:21,Ra:2},2880:{type:5,ib:80,Ua:36,Ra:2}}[this.C>>10])&&0===(this.C&1023))this.type=e.type,d=e.Ua,e=e.Ra;else throw"Unknown floppy size: "+fa(b.byteLength);this.I=d;this.R=e;this.o.B(1008,this,this.ef);this.o.B(1010,this,this.ff);this.o.B(1012,this,this.hf);this.o.B(1013,this,this.jf);this.o.B(1015,this,this.lf);this.o.A(1010,this,this.gf);this.o.A(1013,this,this.kf)}else this.type=4}l=Ic.prototype;l.ef=function(){return 0};l.hf=function(){var a=128;this.lthis.I&&(e=1,d++,d>=this.R&&(d=0,a++)),this.F=a,this.l=0,this.p=7,this.c[0]=d<<2|32,this.c[1]=0,this.c[2]=0,this.c[3]=a,this.c[4]=d,this.c[5]=e,this.c[6]=b[4],ed&8&&this.$.D(6))};l.Ae=function(){};l.Bf=function(){this.l=0;this.p=7;this.c[0]=0;this.c[1]=0;this.c[2]=0;this.c[3]=0;this.c[4]=0;this.c[5]=0;this.c[6]=0;ed&8&&this.$.D(6)};function vc(a,b){this.ha=new Uint8Array(a);this.c=new Uint16Array(a);this.eb=new Int32Array(a);this.buffer=a;this.size=b;this.Oa=new Uint8Array(262144);this.ec=[];this.fc=[];this.Mc=[];this.Nc=[]}l=vc.prototype;l.Zb=function(){this.ha=new Uint8Array(this.buffer);this.c=new Uint16Array(this.buffer);this.eb=new Int32Array(this.buffer)};function jd(a,b){var d=a.ec[b>>>14];return d(b)|d(b+1)<<8}function kd(a,b,d){a=a.fc[b>>>14];a(b,d&255);a(b+1,d>>8&255)} -l.H=function(a){return this.Oa[a>>>14]?this.ec[a>>>14](a):this.ha[a]};l.P=function(a){return this.Oa[a>>>14]?jd(this,a):this.ha[a]|this.ha[a+1]<<8};function Db(a,b){return a.Oa[b>>>13]?jd(a,b<<1):a.c[b]}function I(a,b){return a.Oa[b>>>14]?a.Mc[b>>>14](b):a.ha[b]|a.ha[b+1]<<8|a.ha[b+2]<<16|a.ha[b+3]<<24}function Eb(a,b){var d;a.Oa[b>>>12]?(d=b<<2,d=a.Mc[d>>>14](d)):d=a.eb[b];return d}l.O=function(a,b){if(this.Oa[a>>>14])this.fc[a>>>14](a,b);else this.ha[a]=b}; -l.ba=function(a,b){this.Oa[a>>>14]?kd(this,a,b):(this.ha[a]=b,this.ha[a+1]=b>>8)};function Ab(a,b,d){a.Oa[b>>>13]?kd(a,b<<1,d):a.c[b]=d}l.ea=function(a,b){if(this.Oa[a>>>14])this.Nc[a>>>14](a,b);else this.ha[a]=b,this.ha[a+1]=b>>8,this.ha[a+2]=b>>16,this.ha[a+3]=b>>24};function Bb(a,b,d){a.Oa[b>>>12]?(b=b<<2,a.Nc[b>>>14](b,d)):a.eb[b]=d}function yc(a,b,d){a.ha.set(b,d)}function zc(a,b){for(var d=0;da){var d=a>>1;a&1?this.c[d].count=ld(this,this.c[d].count,b):this.c[d].Ha=ld(this,this.c[d].Ha,b)}};l.rf=function(){};l.sf=function(){}; -l.tf=function(){this.h=0};l.qf=function(a){this.c[2].Ha=this.c[2].Ha&65535|a<<16};function hd(a,b,d,e){var f=a.c[2].count+1,g=a.c[2].Ha;if(d+f>b.byteLength)e(!0);else{var k=a.memory;a.c[2].Ha+=f;b.get(d,f,function(a){yc(k,a,g);e(!1)})}}function gd(a,b,d,e){var f=a.c[2].count,g=a.c[2].Ha;d+f>b.byteLength?e(!0):(a.c[2].Ha+=f,b.set(d,new Uint8Array(a.memory.buffer,g,f+1),function(){e(!1)}))}function ld(a,b,d){a.h^=1;return a.h?b&-256|d:b&-65281|d<<8};function Kc(a){this.$=a.K.$;this.C=Date.now();this.j=new Uint8Array(4);this.l=new Uint8Array(4);this.p=new Uint8Array(4);this.L=new Uint8Array(4);this.F=new Uint8Array(4);this.I=new Uint16Array(3);this.h=new Uint16Array(3);this.c=new Uint16Array(3);var b=this.Jb=0;a.o.B(97,this,function(){b^=16;return b|this.Jb<<5});a.o.B(64,this,function(){return md(this,0)});a.o.B(65,this,function(){return md(this,1)});a.o.B(66,this,function(){return md(this,2)});a.o.A(64,this,function(a){nd(this,0,a)});a.o.A(65, -this,function(a){nd(this,1,a)});a.o.A(66,this,function(a){nd(this,2,a)});a.o.A(67,this,this.R)} -Kc.prototype.Ma=function(a,b){var d,e,f=1193.1816666*(a-this.C)>>>0;if(f){this.C+=f/1193.1816666;if(!b&&this.l[0]&&(d=this.c[0]-=f,0>=d))if(this.$.D(0),e=this.p[0],0===e)this.l[0]=0,this.c[0]=0;else if(3===e||2===e)this.c[0]=this.h[0]+d%this.h[0];this.l[2]&&(d=this.c[2]-=f,0>=d&&(e=this.p[2],0===e?(this.Jb=1,this.l[2]=0,this.c[2]=0):2===e?(this.Jb=1,this.c[2]=this.h[2]+d%this.h[2]):3===e&&(this.Jb^=1,this.c[2]=this.h[2]+d%this.h[2])))}}; -function md(a,b){var d=a.F[b];if(d)return a.F[b]--,2===d?a.I[b]&255:a.I[b]>>8;d=a.j[b];3===a.p[b]&&(a.j[b]^=1);return d?a.c[b]&255:a.c[b]>>8}function nd(a,b,d){a.h[b]=a.j[b]?a.h[b]&-256|d:a.h[b]&255|d<<8;3===a.L[b]&&a.j[b]||(a.h[b]||(a.h[b]=65535),a.c[b]=a.h[b],a.l[b]=!0);3===a.L[b]&&(a.j[b]^=1)}Kc.prototype.R=function(a){var b=a>>1&7,d=a>>6&3;a=a>>4&3;3!==d&&(0===a?(this.F[d]=2,this.I[d]=this.c[d]):(6<=b&&(b&=-5),this.j[d]=1===a?0:1,this.p[d]=b,this.L[d]=a,2===d&&(this.Jb=0===b?0:1)))};function Ec(a,b,d){void 0===b?this.c=new od:this.c=b;this.sa=d;this.X=0;this.ad=14;this.$c=15;this.ga=this.Xa=this.da=this.wc=this.Wa=0;this.Ya=!0;this.na=this.jb=!1;this.F=new Int32Array(256);this.U=this.p=this.La=this.wa=this.ua=this.ra=0;this.Ac=80;this.Za;this.kb;this.lb;this.Gb;this.yc=this.gd=this.h=this.I=null;this.R=!1;this.zc=this.C=0;this.ic=[222,16,32,10,7,0,0,0,162,0,0,3,0,0,128,0,8,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,1,0,0];this.Rb= -144;this.hc=[{size:this.sa}];a.K.wd.oc(this);this.M={rd:!1,zd:0,Ad:0,jd:0};this.tc=this.pa=0;this.L=-1;this.bd=new Uint8Array(16);this.xc=-1;this.l=15;this.Hd=0;this.vc=-1;this.dd=this.cd=this.ed=0;this.j=255;this.Fd=0;this.fd=this.Gd=255;a=a.o;a.A(960,this,this.Me);a.B(960,this,this.Le);a.B(961,this,this.Ne);a.A(962,this,this.Oe);a.pc(964,this,this.Qe,this.Se);a.B(964,this,this.Pe);a.B(965,this,this.Re);a.pc(974,this,this.Ye,this.$e);a.B(974,this,this.Xe);a.B(975,this,this.Ze);a.A(967,this,this.Te); -a.A(968,this,this.Ue);a.A(969,this,this.Ve);a.B(972,this,this.We);a.pc(980,this,this.af,this.cf);a.B(981,this,this.bf);a.B(986,this,this.df);this.uc=-1;this.Yb=0;a.A(462,this,void 0,this.Ie);a.A(463,this,void 0,this.Ke);a.B(463,this,void 0,this.Je);void 0===this.sa||262144>this.sa?this.sa=262144:this.sa&65535&&(this.sa|=65535,this.sa++);this.h=new Uint8Array(this.sa);this.gd=new Uint16Array(this.h.buffer);this.yc=new Int32Array(this.h.buffer);this.I=new Uint8Array(this.h.buffer,0,262144);this.Za= -new Uint8Array(this.h.buffer,0,65536);this.kb=new Uint8Array(this.h.buffer,65536,65536);this.lb=new Uint8Array(this.h.buffer,131072,65536);this.Gb=new Uint8Array(this.h.buffer,196608,65536);this.qb(80,25);this.Eb();var e=this;a.Pc(655360,131072,function(a){a-=655360;!e.jb||e.Ya?a=e.I[a]:(a&=65535,e.ra=e.Za[a],e.ua=e.kb[a],e.wa=e.lb[a],e.La=e.Gb[a],a=e.I[e.ed<<16|a]);return a},function(a,b){var d;d=a-655360;if(e.jb)if(e.Ya){var t=d,v=t<<2,z=e.F[b];e.c.qa(v|2,z>>16&255);e.c.qa(v|1,z>>8&255);e.c.qa(v, -z&255);e.I[t]=b}else{if(!(65535=e.da*e.Xa<<3))for(v<<=1,z<<=2,D<<=3,d=(d<<3|7)<<2,T=0;8>T;T++){var za=e.F[e.bd[t>>T&1|v>>T&2|z>>T&4|D>>T&8]];e.c.qa(d|2,za>>16);e.c.qa(d|1,za>>8&255);e.c.qa(d,za&255);d-=4}}}else t=d,98304>t||(z=(t-98304>>1)-e.ga,v=z/e.Wa|0,z%=e.Wa,t&1?(d=b,D=e.I[t&-2]):(D=b,d=e.I[t|1]),e.c.xd(v,z,D,e.F[d>>4&15],e.F[d&15]),e.I[t]=b)});a.Pc(3758096384,this.sa,function(a){return e.h[a& -268435455]},function(a,b){pd(e,a,b)},function(a){a&=268435455;return a&3?e.h[a]|e.h[a+1]<<8|e.h[a+2]<<16|e.h[a+3]<<24:e.yc[a>>2]},function(a,b){var d;d=a&268435455;if(d&3||32!==e.C)pd(e,d,b&255),pd(e,d+1,b>>8&255),pd(e,d+2,b>>16&255),pd(e,d+3,b>>24&255);else if(e.yc[d>>2]=b,e.R&&(d-=e.zc,!(0>d)))switch(e.C){case 32:e.c.Tc(d,b)}})}l=Ec.prototype; -l.Zb=function(){this.gd=new Uint16Array(this.h.buffer);this.yc=new Int32Array(this.h.buffer);this.I=new Uint8Array(this.h.buffer,0,262144);this.Za=new Uint8Array(this.h.buffer,0,65536);this.kb=new Uint8Array(this.h.buffer,65536,65536);this.lb=new Uint8Array(this.h.buffer,131072,65536);this.Gb=new Uint8Array(this.h.buffer,196608,65536);this.c.Xc(this.jb||this.R);this.jb||this.R?this.Sb(this.p,this.U):(this.qb(this.Wa,this.wc),this.Eb(),this.Wb());this.na=!0}; -l.Wb=function(){var a=(this.X-this.ga)/this.Wa|0,b=(this.X-this.ga)%this.Wa,a=Math.min(this.wc-1,a);this.c.Wb(a,b)};function pd(a,b,d){b&=268435455;a.h[b]=d;if(a.R&&(b-=a.zc,!(0>b)))switch(a.C){case 32:3!==(b&3)&&a.c.qa(b,d);break;case 24:a.c.qa((b<<2)/3|0,d);break;case 16:if(b&1){var e=a.gd[b>>1],f;f=255*(d>>3&31)/31|0;d=255*(e>>5&63)/63|0;e=255*(e&31)/31|0;b<<=1;a.c.qa(b,e);a.c.qa(b-1,d);a.c.qa(b-2,f)}break;case 8:e=a.F[d],b=b<<2,a.c.qa(b,e>>16&255),a.c.qa(b|1,e>>8&255),a.c.qa(b|2,e&255)}} -l.Ma=function(){if(this.na)if(this.na=!1,this.R){var a=this.zc,b=this.U*this.p,d=0;if(32===this.C)for(var e=new Int32Array(this.h.buffer),a=a>>2,b=b<<2;de;e++)this.c.Tc(b*this.da+d<<2,this.F[this.bd[this.Za[a]>>e&1|this.kb[a]>>e<<1&2|this.lb[a]>>e<<2&4|this.Gb[a]>> -e<<3&8]]);a++}}else for(a=98304|this.ga<<1,e=0;e>4&15],this.F[d&15]),a+=2;this.c.Ma()};l.va=function(){};l.qb=function(a,b){this.Wa=a;this.wc=b;this.c.qb(a,b)};l.Sb=function(a,b){this.c.Sb(a,b)};l.Eb=function(){this.c.Eb(this.ad,this.$c)}; -function qd(a,b){var d=!1;switch(b){case 3:a.qb(a.Ac,25);break;case 16:a.da=640;a.Xa=350;d=!0;a.Ya=!1;break;case 18:a.da=640;a.Xa=480;d=!0;a.Ya=!1;break;case 19:a.da=320,a.Xa=200,d=!0,a.Ya=!0}a.c.Xc(d);if(a.M.rd=d)a.Sb(a.da,a.Xa),a.M.zd=a.da,a.M.Ad=a.Xa,a.M.jd=8;a.jb=d}l.Me=function(a){-1===this.L?this.L=a:(16>this.L&&(this.bd[this.L]=a),this.L=-1)};l.Le=function(){var a=this.L;this.L=-1;return a};l.Ne=function(){return this.L=-1}; -l.Oe=function(a){this.Gd=a;103===a?qd(this,3):227===a?qd(this,18):99===a?qd(this,19):163===a?qd(this,16):qd(this,3)};l.Qe=function(a){this.xc=a};l.Pe=function(){return this.xc};l.Se=function(a){switch(this.xc){case 2:this.l=a;break;case 4:this.Hd=a}};l.Re=function(){switch(this.xc){case 2:return this.l;case 4:return this.Hd;case 6:return 18}return 0};l.Te=function(){};l.Ue=function(a){this.tc=3*a}; -l.Ve=function(a){var b=this.tc/3|0,d=this.tc%3,e=this.F[b];a=255*a/63&255;this.F[b]=0===d?e&-16711681|a<<16:1===d?e&-65281|a<<8:e&-256|a;this.tc++;this.na=!0};l.We=function(){return this.Gd};l.Ye=function(a){this.vc=a};l.Xe=function(){return this.vc};l.$e=function(a){switch(this.vc){case 3:this.dd=a;break;case 4:this.ed=a;break;case 5:this.cd=a;break;case 8:this.j=a}};l.Ze=function(){switch(this.vc){case 3:return this.dd;case 4:return this.ed;case 5:return this.cd;case 8:return this.j}return 0}; -l.af=function(a){this.pa=a};l.cf=function(a){switch(this.pa){case 2:this.Ac=a;break;case 9:this.Fd=a;7===(a&31)?this.qb(this.Ac,50):this.qb(this.Ac,25);break;case 10:this.ad=a;this.Eb();break;case 11:this.$c=a;this.Eb();break;case 12:this.ga=this.ga&255|a<<8;this.na=!0;break;case 13:this.ga=this.ga&65280|a;this.na=!0;break;case 14:this.X=this.X&255|a<<8;this.Wb();break;case 15:this.X=this.X&65280|a,this.Wb()}}; -l.bf=function(){return 9===this.pa?this.Fd:10===this.pa?this.ad:11===this.pa?this.$c:14===this.pa?this.X>>8:15===this.pa?this.X&255:0};l.df=function(){this.fd^=8;this.L=-1;return this.fd};l.Ie=function(a){this.uc=a}; -l.Ke=function(a){switch(this.uc){case 1:this.p=a;2560d)<<5|(0>b)<<4|8|a.L;a.lb=Date.now();a.U&&(b=vd(b),d=vd(d));a.h.push(e);a.h.push(b);a.h.push(d);sd(a)}function vd(a){var b=a>>31;switch(Math.abs(a)){case 0:case 1:case 3:return a;case 2:return b;case 4:return 6*b;case 5:return 9*b;default:return a<<1}}l.va=function(){this.kb&&this.ra.va();this.I&&this.da.va()}; -l.mf=function(){if(!this.c.length&&!this.h.length)return this.X;(this.c.length&&this.h.length?0!==(this.$.fa&2):this.c.length)?(this.X=this.c.shift(),1<=this.c.length&&td(this)):(this.X=this.h.shift(),1<=this.h.length&&sd(this));return this.X};l.of=function(){var a=16;if(this.h.length||this.c.length)a|=1;this.h.length&&(a|=32);return a}; -l.nf=function(a){if(this.Ya)td(this),this.l=a,this.Ya=!1;else if(this.Za)this.Za=!1,this.h.c(),this.h.push(a),sd(this);else if(this.jb)this.jb=!1,this.h.c(),this.h.push(250),this.ga=a,sd(this);else if(this.Xa)this.Xa=!1,this.h.c(),this.h.push(250),this.R=3>5;1===b?this.fa&=this.fa-1:3===b&&(this.fa&=~(1<<(a&7)))}});a.o.B(d,this,function(){return this.ae?this.Na:this.fa});a.o.A(d|1,this,function(a){0===this.state?this.md?(this.md=!1,this.hd=a&2):this.Lc=~a:1===this.state?(this.qd=a,this.state++): -2===this.state&&(this.state=0)});a.o.B(d|1,this,function(){return~this.Lc&255});this.D=this.j?function(b){8<=b&&(this.c.D(b-8),b=2);this.Na|=1<>16&255;case 53:return this.j.Ja-16777216>>24&255;case 56:return 1|this.Bc>>4&240;case 61:return this.Bc&255;case 91:case 92:case 93:return 0}return 255};Lc.prototype.X=function(a){switch(this.kd){case 10:this.p=a&127;this.I=1E3/(32768>>(this.p&15)-1);break;case 11:this.h=a,this.h&64&&(this.l=Date.now())}this.R=64===(this.h&64)&&0<(this.p&15)};function Hc(a,b,d){this.$=a.K.$;this.Wd="";this.pd=this.Pb=this.Ib=0;this.od=1;this.c=this.ee=this.Ee=this.Xd=0;this.input=new Tc(4096);if(1E3===b||1016===b)this.c=4;else if(1E3===b||1E3===b)this.c=3;else return;d.Ba(function(a){this.input.push(a);this.pd&1&&this.D()}.bind(this));a=a.o;a.A(b,this,function(a){this.Pb&128?this.Ib=this.Ib&-256|a:255!==a&&d&&(d.uf?this.Wd=10===a?"":this.Wd+String.fromCharCode(a):d.vf(String.fromCharCode(a)))});a.A(b|1,this,function(a){this.Pb&128?this.Ib=this.Ib&255| -a<<8:this.pd=a});a.B(b,this,function(){return this.Pb&128?this.Ib&255:this.input.shift()});a.B(b|1,this,function(){return this.Pb&128?this.Ib>>8:this.pd});a.B(b|2,this,function(){var a=this.od;this.od^=1;return a});a.A(b|2,this,function(){});a.B(b|3,this,function(){return this.Pb});a.A(b|3,this,function(a){this.Pb=a});a.B(b|4,this,function(){return this.Xd});a.A(b|4,this,function(a){this.Xd=a});a.B(b|5,this,function(){var a=0;this.input.length&&(a|=1);return a|96});a.A(b|5,this,function(){});a.B(b| -6,this,function(){return this.Ee});a.A(b|6,this,function(){});a.B(b|7,this,function(){return this.ee});a.A(b|7,this,function(a){this.ee=a})}Hc.prototype.D=function(){this.$.D(this.c)};function Dc(){};function ea(a){this.message=a}ea.prototype=Error(); -function ga(a,b,d){if("object"!==typeof b||b instanceof Array||null===b)return b;var e=b.Jf;if(void 0===e){for(var e=Object.keys(b),f=0;fthis.Uc.length&&(this.Uc=new Uint8Array(this.ub))});d.B(47117,this,function(){return 0});d.B(47118,this,function(){return 0});d.B(47119,this,function(){return 0});d.B(47135,this,function(){if(0===(this.oa&192))return xd(this,128),0});d.A(47135,this,function(){});d.B(47111,this,function(){return 0===(this.oa&192)?this.fa:this.ac});d.A(47111,this,function(a){0=== -(this.oa&192)?this.fa&=~a:this.ac=a});d.A(47117,this,function(){});d.A(47118,this,function(){});d.A(47114,this,function(a){0===(this.oa&192)&&(this.ub=this.ub&65280|a&255)});d.A(47115,this,function(a){0===(this.oa&192)&&(this.ub=this.ub&255|a<<8&65280)});d.A(47112,this,function(a){0===(this.oa&192)&&(this.qc=this.qc&65280|a&255)});d.A(47113,this,function(a){0===(this.oa&192)&&(this.qc=this.qc&255|a<<8&65280)});d.A(47119,this,function(a){0===(this.oa&192)&&(this.Rd=a)});d.B(47107,this,function(){return 0=== -(this.oa&192)?this.Kd:0});d.A(47107,this,function(a){0===(this.oa&192)&&(this.Kd=a)});d.B(47108,this,function(){return 0===(this.oa&192)?35:0});d.B(47116,this,function(){return 0===(this.oa&192)?9:0});d.B(47120,this,this.zb,this.pe,this.qe);d.A(47120,this,this.Ab,this.re,this.se)}function xd(a,b){a.fa|=b;a.Rd&b&&a.$.D(11)}l=Mc.prototype;l.Ab=function(a){this.Uc[this.yd++]=a;this.yd===this.ub&&(a=this.Uc.subarray(0,this.ub),xd(this,64),this.oa&=-5,this.h.send(a),xd(this,2))}; -l.re=function(a){this.Ab(a);this.Ab(a>>8)};l.se=function(a){this.Ab(a);this.Ab(a>>8);this.Ab(a>>16);this.Ab(a>>24)};l.zb=function(){return this.c[this.qc++]};l.pe=function(){return this.zb()|this.zb()<<8};l.qe=function(){return this.zb()|this.zb()<<8|this.zb()<<16|this.zb()<<24}; -l.Df=function(a){if(!(this.oa&1)){if(60>a.length){var b=a;a=new Uint8Array(60);a.set(b)}var b=this.ac<<8,d=a.length+4,e=b+4,f=this.ac+1+(d>>8);if(b+d>this.c.length){var g=this.c.length-e;this.c.set(a.subarray(0,g),e);this.c.set(a.subarray(g),76)}else this.c.set(a,e);128<=f&&(f+=-52);this.c[b]=1;this.c[b+1]=f;this.c[b+2]=d;this.c[b+3]=d>>8;this.ac=f;xd(this,1)}};window.requestAnimationFrame||(window.requestAnimationFrame=window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame); -function ia(a){function b(a){a=a.toString(16);return"#"+Array(7-a.length).join("0")+a}function d(){Ga=!0;for(var a=0;a>2,Aa,((ka-sa)/Aa>>2)+1),sa=1E7,ka=0)}function f(a,b,d){b=""+(1===b?"":" scaleX("+b+")")+(1===d?"":" scaleY("+d+")");a.style.webkitTransform=a.style.MozTransform=b}console.assert(a,"1st argument must be a DOM container");var g=a.getElementsByTagName("canvas")[0],k=g.getContext("2d"),t=g.nextElementSibling|| -g.previousElementSibling,v=document.createElement("div"),z,D,T,za,Oa,ua=1,va=1,Aa,sa=0,ka=0,ra,Ga=!0,mb=!1,la,ta,Na,nb=this;a=new Uint16Array([199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,186,191,8976,172,189,188,161,171,187,9617,9618,9619,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576, -9572,9573,9561,9560,9554,9555,9579,9578,9496,9484,9608,9604,9612,9616,9600,945,223,915,960,931,963,181,964,934,920,937,948,8734,966,949,8745,8801,177,8805,8804,8992,8993,247,8776,176,8729,183,8730,8319,178,9632,160]);for(var id=new Uint16Array([32,9786,9787,9829,9830,9827,9824,8226,9688,9675,9689,9794,9792,9834,9835,9788,9658,9668,8597,8252,182,167,9644,8616,8593,8595,8594,8592,8735,8596,9650,9660]),wc=[],zb,Ha=0;256>Ha;Ha++)127Ha?zb=id[Ha]:zb=Ha,wc[Ha]=String.fromCharCode(zb); -k.imageSmoothingEnabled=!1;k.mozImageSmoothingEnabled=!1;k.webkitImageSmoothingEnabled=!1;v.style.position="absolute";v.style.backgroundColor="#ccc";v.style.width="7px";v.style.display="inline-block";t.style.display="block";g.style.display="none";this.Ba=function(){this.qb(80,25)};this.De=function(){try{window.open(g.toDataURL())}catch(a){}};this.xd=function(a,b,d,e,f){a=D.length||(sa=aka?a:ka,D[a+1^3]=b)};this.Tc=function(a,b){sa=aka?a:ka;T[a>>2]=4278190080|b>>16&255|b<<16|b&65280};this.va=function(){};this.Xc=function(a){(mb=a)?(t.style.display="none",g.style.display="block"):(t.style.display="block",g.style.display="none")};this.qb=function(a,b){ra=new Int8Array(b);la=new Int32Array(a*b*3);ta=a;for(Na=b;t.childNodes.length>b;)t.removeChild(t.firstChild);for(;t.childNodes.length= -v.length||0===v[a])return console.log("Missing char in map: "+a.toString(16)),!0;var d=v[a];b||(d|=128);255>8),t(d&255)):t(d);return!1}var g={},k=this,t;this.enabled=!0;var v=new Uint16Array([0,0,0,0,0,0,0,0,14,15,0,0,0,28,0,0,42,29,56,0,58,0,0,0,0,0,0,1,0,0,0,0,57,57417,57425,57423,57415,57419,57416,57421,80,0,0,0,0,82,83,0,11,2,3,4,5,6,7,8,9,10,0,39,0,13,0,0,0,30,48,46,32,18,33,34,35,23,36,37,38,50,49,24,25,16,19,31,20,22,47,17,45,21,44,0,0,0,0,0,82,79,80,81,75,76,77,71,72,73,0,0,0,0,0, -0,59,60,61,62,63,64,65,66,67,68,87,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,69,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,39,13,51,12,52,53,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,43,27,40,0]);this.Ba=function(a){this.va();t=a;window.addEventListener("keyup",b,!1);window.addEventListener("keydown",d,!1);window.addEventListener("blur",e,!1)};this.va=function(){window.removeEventListener("keyup",b,!1);window.removeEventListener("keydown",d, -!1);window.removeEventListener("blur",e,!1)}};function ma(){function a(a){return T.enabled&&T.Ec&&(!a.target||"mousemove"===a.type||"INPUT"!==a.target.nodeName&&"TEXTAREA"!==a.target.nodeName)}function b(b){if(a(b)){var d;d=b.webkitMovementX||b.mozMovementX||0;b=b.webkitMovementY||b.mozMovementY||0;D(.15*d,-(.15*b))}}function d(b){a(b)&&b.preventDefault()}function e(b){a(b)&&g(b,!0)}function f(b){a(b)&&g(b,!1)}function g(a,b){1===a.which?k=b:2===a.which?v=b:3===a.which?t=b:console.log("Unknown event.which: "+a.which);z(k,v,t);a.preventDefault()} -var k=!1,t=!1,v=!1,z,D,T=this;this.enabled=!1;this.Ec=!0;this.va=function(){window.removeEventListener("mousemove",b,!1);document.removeEventListener("contextmenu",d,!1);window.removeEventListener("mousedown",e,!1);window.removeEventListener("mouseup",f,!1)};this.Ba=function(a,g){this.va();z=a;D=g;window.addEventListener("mousemove",b,!1);document.addEventListener("contextmenu",d,!1);window.addEventListener("mousedown",e,!1);window.addEventListener("mouseup",f,!1)}};function na(a){function b(a){f.enabled&&(g(a.keyCode),a.preventDefault())}function d(a){8===a.keyCode&&(g(127),a.preventDefault())}function e(a){for(var b=a.clipboardData.getData("text/plain"),d=0;d>20)+" MB ...");var e=new ArrayBuffer(a.size),f=0,g=new FileReader;this.j=function(){function k(){if(d.onprogress)d.onprogress({loaded:f,total:a.size,lengthComputable:!0});if(f>1)+d(" ",50-(g>>1))+"]"}else a.ticks||(a.ticks=0),e.textContent=a.msg+" "+d(".",a.ticks++%50)}function f(a){document.getElementById(a)||console.log("Element with id `"+a+"` not found");return document.getElementById(a)}function g(){function d(a,c,f){document.title=a.name+" - Virtual x86";if(67108864>a.size){var g=new v86util.SyncFileBuffer(a);g.onprogress=e.bind(this,{msg:"Loading disk image into memory"})}else g=new v86util.AsyncFileBuffer(a);g.onload=function(){switch(c){case "floppy":m.fda= +g;break;case "hd":m.hda=g;break;case "cdrom":m.cdrom=g}f()};g.load()}function g(a,c,d){c.memory_size=a.memory_size;c.vga_memory_size=a.vga_memory_size;a.async_hda&&(c.hda=new v86util.AsyncXHRBuffer(a.async_hda,512,a.async_hda_size));a.filesystem&&(c.fs9p=new FS(a.filesystem.baseurl),a.filesystem.basefs&&c.fs9p.LoadFilesystem({lazyloadimages:[],earlyload:[],basefsURL:a.filesystem.basefs}));a.fda?c.fda=new SyncBuffer(d):a.cdrom&&(c.cdrom=new SyncBuffer(d));k(c,function(c){a.state&&(f("reset").style.display= +"none",c.restore_state(d));c.run()})}if("responseType"in new XMLHttpRequest){var m={load_devices:!0};f("toggle_mouse").onclick=function(){var a=m.mouse_adapter;a&&(a=a.emu_enabled=!a.emu_enabled,f("toggle_mouse").value=(a?"Dis":"En")+"able mouse")};f("lock_mouse").onclick=function(){var a=m.mouse_adapter;if(a&&!a.emu_enabled)f("toggle_mouse").onclick();c(document.body);f("lock_mouse").blur()};v86util.load_file("bios/seabios.bin",function(a){m.bios=a;l&&l()});v86util.load_file("bios/bochs-vgabios-0.7a.bin", +function(a){m.vga_bios=a;l&&l()});f("start_emulation").onclick=function(){function a(){if(0===c.length)k(m,function(a){a.run()});else{var f=c.pop();d(f.file,f.type,a)}}f("boot_options").style.display="none";var c=[];f("floppy_image").files.length&&c.push({file:f("floppy_image").files[0],type:"floppy"});f("cd_image").files.length&&c.push({file:f("cd_image").files[0],type:"cdrom"});f("hd_image").files.length&&c.push({file:f("hd_image").files[0],type:"hd"});a()};for(var q=[{id:"archlinux",state:"http://localhost/v86-images/v86state.bin", +size:75550474,name:"Arch Linux",memory_size:67108864,vga_memory_size:8388608,async_hda:"http://localhost/v86-images/arch3.img",async_hda_size:8589934592,filesystem:{basefs:"http://localhost/v86-images/fs.json",baseurl:"http://localhost/v86-images/arch/"}},{id:"freedos",fda:"images/freedos722.img",size:737280,name:"FreeDOS"},{id:"windows1",fda:"images/windows101.img",size:1474560,name:"Windows"},{id:"linux26",cdrom:"images/linux.iso",size:5666816,name:"Linux"},{id:"kolibrios",fda:"images/kolibri.img", +size:1474560,name:"KolibriOS"},{id:"openbsd",fda:"images/openbsd.img",size:1474560,name:"OpenBSD"},{id:"solos",fda:"images/os8.dsk",size:1474560,name:"Sol OS"}],r=a().profile,t=0;te?a.memory_size=e:(alert("Invalid memory size - ignored."),a.memory_size=33554432)}a.vga_memory_size||(e=1048576*parseInt(f("video_memory_size").value,10),65536e?a.vga_memory_size=e:(alert("Invalid video memory size - ignored."),a.vga_memory_size=8388608));m(a,d);d.init(a);c(d)}else l=k.bind(this,a,c)}function m(a,d){function e(){if(m){var a= +Date.now(),c=(d.timestamp_counter-E)/1E3|0;B+=c;w+=a-u;u=a;A.textContent=c;y.textContent=B/w*1E3|0;a=w/1E3|0;l.textContent=60>a?a+"s":3600>a?(a/60|0)+"m "+String.pad0(a%60,2)+"s":(a/3600|0)+"h "+String.pad0((a/60|0)%60,2)+"m "+String.pad0(a%60,2)+"s";E=d.timestamp_counter}setTimeout(e,1E3)}function g(){if(m){var c=d.devices.vga.stats;c.is_graphical?(f("info_vga_mode").textContent="graphical",f("info_res").textContent=c.res_x+"x"+c.res_y,f("info_bpp").textContent=c.bpp):(f("info_vga_mode").textContent= +"text",f("info_res").textContent="-",f("info_bpp").textContent="-");a.mouse_adapter&&(f("info_mouse_enabled").textContent=a.mouse_adapter.enabled?"Yes":"No");d.devices.hda?(c=d.devices.hda.stats,f("info_hda_sectors_read").textContent=c.sectors_read,f("info_hda_bytes_read").textContent=c.bytes_read,f("info_hda_sectors_written").textContent=c.sectors_written,f("info_hda_bytes_written").textContent=c.bytes_written,f("info_hda_status").textContent=c.loading?"Loading ...":"Idle"):f("info_hda").style.display= +"none";d.devices.cdrom?(c=d.devices.cdrom.stats,f("info_cdrom_sectors_read").textContent=c.sectors_read,f("info_cdrom_bytes_read").textContent=c.bytes_read,f("info_cdrom_status").textContent=c.loading?"Loading ...":"Idle"):f("info_cdrom").style.display="none"}setTimeout(g,1E3)}function k(a){a.ctrlKey?window.onbeforeunload=function(){window.onbeforeunload=null;return"CTRL-W cannot be sent to the emulator."}:window.onbeforeunload=null}f("boot_options").style.display="none";f("loading").style.display= +"none";f("runtime_options").style.display="block";f("runtime_infos").style.display="block";document.getElementsByClassName("phone_keyboard")[0].style.display="block";f("news")&&(f("news").style.display="none");var m=!0;f("run").onclick=function(){m?(w+=Date.now()-u,f("run").value="Run",d.stop()):(f("run").value="Pause",d.run(),u=Date.now());m=!m;f("run").blur()};f("exit").onclick=function(){location.href=location.pathname};var l=f("running_time"),A=f("speed"),y=f("avg_speed"),u=Date.now(),w=0,B=0, +E=0;setTimeout(e,1E3);setTimeout(g,0);f("reset").onclick=function(){d.restart();f("reset").blur()};for(var v=["hda","hdb","fda","fdb"],z=0;zF.byteLength?D.onclick=function(a){F.get_buffer(function(c){var d=a+".img",f=new Blob([c]);c=document.createElement("a");c.download=d;c.href=window.URL.createObjectURL(f);c.dataset.downloadurl=["application/octet-stream",c.download,c.href].join(":");document.createEvent?(d=document.createEvent("MouseEvent"), +d.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)):c.click()});this.blur()}.bind(D,v[z]):D.style.display="none"}f("ctrlaltdel").onclick=function(){var a=d.devices.ps2;a.kbd_send_code(29);a.kbd_send_code(56);a.kbd_send_code(83);a.kbd_send_code(157);a.kbd_send_code(184);a.kbd_send_code(211);f("ctrlaltdel").blur()};f("scale").onchange=function(){var c=parseFloat(this.value);(c||0a;a++)for(var c= +0;3>c;c++)for(var d=a|c<<6,e=1;8>e;e++)v86.prototype.modrm_table32[d|e<<3]=v86.prototype.modrm_table32[d],v86.prototype.modrm_table16[d|e<<3]=v86.prototype.modrm_table16[d];v86.prototype.sib_table[0]=function(a){return a.reg32s[0]+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[1]=function(a){return a.reg32s[0]+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[2]=function(a){return a.reg32s[0]+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[3]=function(a){return a.reg32s[0]+ +a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[4]=function(a){return a.reg32s[0]+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[5]=function(a,c){return a.reg32s[0]+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[6]=function(a){return a.reg32s[0]+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[7]=function(a){return a.reg32s[0]+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[64]=function(a){return(a.reg32s[0]<< +1)+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[65]=function(a){return(a.reg32s[0]<<1)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[66]=function(a){return(a.reg32s[0]<<1)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[67]=function(a){return(a.reg32s[0]<<1)+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[68]=function(a){return(a.reg32s[0]<<1)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[69]=function(a,c){return(a.reg32s[0]<< +1)+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[70]=function(a){return(a.reg32s[0]<<1)+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[71]=function(a){return(a.reg32s[0]<<1)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[128]=function(a){return(a.reg32s[0]<<2)+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[129]=function(a){return(a.reg32s[0]<<2)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[130]= +function(a){return(a.reg32s[0]<<2)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[131]=function(a){return(a.reg32s[0]<<2)+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[132]=function(a){return(a.reg32s[0]<<2)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[133]=function(a,c){return(a.reg32s[0]<<2)+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[134]=function(a){return(a.reg32s[0]<<2)+a.get_seg_prefix_ds()+ +a.reg32s[6]|0};v86.prototype.sib_table[135]=function(a){return(a.reg32s[0]<<2)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[192]=function(a){return(a.reg32s[0]<<3)+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[193]=function(a){return(a.reg32s[0]<<3)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[194]=function(a){return(a.reg32s[0]<<3)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[195]=function(a){return(a.reg32s[0]<<3)+a.get_seg_prefix_ds()+ +a.reg32s[3]|0};v86.prototype.sib_table[196]=function(a){return(a.reg32s[0]<<3)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[197]=function(a,c){return(a.reg32s[0]<<3)+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[198]=function(a){return(a.reg32s[0]<<3)+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[199]=function(a){return(a.reg32s[0]<<3)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[8]=function(a){return a.reg32s[1]+ +a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[9]=function(a){return a.reg32s[1]+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[10]=function(a){return a.reg32s[1]+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[11]=function(a){return a.reg32s[1]+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[12]=function(a){return a.reg32s[1]+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[13]=function(a,c){return a.reg32s[1]+(c?a.get_seg_prefix_ss()+ +a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[14]=function(a){return a.reg32s[1]+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[15]=function(a){return a.reg32s[1]+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[72]=function(a){return(a.reg32s[1]<<1)+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[73]=function(a){return(a.reg32s[1]<<1)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[74]=function(a){return(a.reg32s[1]<< +1)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[75]=function(a){return(a.reg32s[1]<<1)+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[76]=function(a){return(a.reg32s[1]<<1)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[77]=function(a,c){return(a.reg32s[1]<<1)+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[78]=function(a){return(a.reg32s[1]<<1)+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[79]= +function(a){return(a.reg32s[1]<<1)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[136]=function(a){return(a.reg32s[1]<<2)+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[137]=function(a){return(a.reg32s[1]<<2)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[138]=function(a){return(a.reg32s[1]<<2)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[139]=function(a){return(a.reg32s[1]<<2)+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[140]= +function(a){return(a.reg32s[1]<<2)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[141]=function(a,c){return(a.reg32s[1]<<2)+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[142]=function(a){return(a.reg32s[1]<<2)+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[143]=function(a){return(a.reg32s[1]<<2)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[200]=function(a){return(a.reg32s[1]<<3)+a.get_seg_prefix_ds()+ +a.reg32s[0]|0};v86.prototype.sib_table[201]=function(a){return(a.reg32s[1]<<3)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[202]=function(a){return(a.reg32s[1]<<3)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[203]=function(a){return(a.reg32s[1]<<3)+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[204]=function(a){return(a.reg32s[1]<<3)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[205]=function(a,c){return(a.reg32s[1]<<3)+(c?a.get_seg_prefix_ss()+ +a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[206]=function(a){return(a.reg32s[1]<<3)+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[207]=function(a){return(a.reg32s[1]<<3)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[16]=function(a){return a.reg32s[2]+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[17]=function(a){return a.reg32s[2]+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[18]=function(a){return a.reg32s[2]+ +a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[19]=function(a){return a.reg32s[2]+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[20]=function(a){return a.reg32s[2]+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[21]=function(a,c){return a.reg32s[2]+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[22]=function(a){return a.reg32s[2]+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[23]=function(a){return a.reg32s[2]+ +a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[80]=function(a){return(a.reg32s[2]<<1)+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[81]=function(a){return(a.reg32s[2]<<1)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[82]=function(a){return(a.reg32s[2]<<1)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[83]=function(a){return(a.reg32s[2]<<1)+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[84]=function(a){return(a.reg32s[2]<<1)+a.get_seg_prefix_ss()+ +a.reg32s[4]|0};v86.prototype.sib_table[85]=function(a,c){return(a.reg32s[2]<<1)+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[86]=function(a){return(a.reg32s[2]<<1)+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[87]=function(a){return(a.reg32s[2]<<1)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[144]=function(a){return(a.reg32s[2]<<2)+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[145]=function(a){return(a.reg32s[2]<< +2)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[146]=function(a){return(a.reg32s[2]<<2)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[147]=function(a){return(a.reg32s[2]<<2)+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[148]=function(a){return(a.reg32s[2]<<2)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[149]=function(a,c){return(a.reg32s[2]<<2)+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[150]= +function(a){return(a.reg32s[2]<<2)+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[151]=function(a){return(a.reg32s[2]<<2)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[208]=function(a){return(a.reg32s[2]<<3)+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[209]=function(a){return(a.reg32s[2]<<3)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[210]=function(a){return(a.reg32s[2]<<3)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[211]= +function(a){return(a.reg32s[2]<<3)+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[212]=function(a){return(a.reg32s[2]<<3)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[213]=function(a,c){return(a.reg32s[2]<<3)+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[214]=function(a){return(a.reg32s[2]<<3)+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[215]=function(a){return(a.reg32s[2]<<3)+a.get_seg_prefix_ds()+ +a.reg32s[7]|0};v86.prototype.sib_table[24]=function(a){return a.reg32s[3]+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[25]=function(a){return a.reg32s[3]+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[26]=function(a){return a.reg32s[3]+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[27]=function(a){return a.reg32s[3]+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[28]=function(a){return a.reg32s[3]+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[29]= +function(a,c){return a.reg32s[3]+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[30]=function(a){return a.reg32s[3]+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[31]=function(a){return a.reg32s[3]+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[88]=function(a){return(a.reg32s[3]<<1)+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[89]=function(a){return(a.reg32s[3]<<1)+a.get_seg_prefix_ds()+a.reg32s[1]| +0};v86.prototype.sib_table[90]=function(a){return(a.reg32s[3]<<1)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[91]=function(a){return(a.reg32s[3]<<1)+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[92]=function(a){return(a.reg32s[3]<<1)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[93]=function(a,c){return(a.reg32s[3]<<1)+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[94]=function(a){return(a.reg32s[3]<< +1)+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[95]=function(a){return(a.reg32s[3]<<1)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[152]=function(a){return(a.reg32s[3]<<2)+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[153]=function(a){return(a.reg32s[3]<<2)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[154]=function(a){return(a.reg32s[3]<<2)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[155]=function(a){return(a.reg32s[3]<< +2)+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[156]=function(a){return(a.reg32s[3]<<2)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[157]=function(a,c){return(a.reg32s[3]<<2)+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[158]=function(a){return(a.reg32s[3]<<2)+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[159]=function(a){return(a.reg32s[3]<<2)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[216]= +function(a){return(a.reg32s[3]<<3)+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[217]=function(a){return(a.reg32s[3]<<3)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[218]=function(a){return(a.reg32s[3]<<3)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[219]=function(a){return(a.reg32s[3]<<3)+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[220]=function(a){return(a.reg32s[3]<<3)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[221]= +function(a,c){return(a.reg32s[3]<<3)+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[222]=function(a){return(a.reg32s[3]<<3)+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[223]=function(a){return(a.reg32s[3]<<3)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[32]=function(a){return a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[33]=function(a){return a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[34]= +function(a){return a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[35]=function(a){return a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[36]=function(a){return a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[37]=function(a,c){return(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[38]=function(a){return a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[39]=function(a){return a.get_seg_prefix_ds()+ +a.reg32s[7]|0};v86.prototype.sib_table[96]=function(a){return a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[97]=function(a){return a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[98]=function(a){return a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[99]=function(a){return a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[100]=function(a){return a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[101]=function(a,c){return(c?a.get_seg_prefix_ss()+ +a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[102]=function(a){return a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[103]=function(a){return a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[160]=function(a){return a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[161]=function(a){return a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[162]=function(a){return a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[163]= +function(a){return a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[164]=function(a){return a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[165]=function(a,c){return(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[166]=function(a){return a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[167]=function(a){return a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[224]=function(a){return a.get_seg_prefix_ds()+ +a.reg32s[0]|0};v86.prototype.sib_table[225]=function(a){return a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[226]=function(a){return a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[227]=function(a){return a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[228]=function(a){return a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[229]=function(a,c){return(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[230]= +function(a){return a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[231]=function(a){return a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[40]=function(a){return a.reg32s[5]+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[41]=function(a){return a.reg32s[5]+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[42]=function(a){return a.reg32s[5]+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[43]=function(a){return a.reg32s[5]+a.get_seg_prefix_ds()+ +a.reg32s[3]|0};v86.prototype.sib_table[44]=function(a){return a.reg32s[5]+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[45]=function(a,c){return a.reg32s[5]+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[46]=function(a){return a.reg32s[5]+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[47]=function(a){return a.reg32s[5]+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[104]=function(a){return(a.reg32s[5]<< +1)+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[105]=function(a){return(a.reg32s[5]<<1)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[106]=function(a){return(a.reg32s[5]<<1)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[107]=function(a){return(a.reg32s[5]<<1)+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[108]=function(a){return(a.reg32s[5]<<1)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[109]=function(a,c){return(a.reg32s[5]<< +1)+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[110]=function(a){return(a.reg32s[5]<<1)+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[111]=function(a){return(a.reg32s[5]<<1)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[168]=function(a){return(a.reg32s[5]<<2)+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[169]=function(a){return(a.reg32s[5]<<2)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[170]= +function(a){return(a.reg32s[5]<<2)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[171]=function(a){return(a.reg32s[5]<<2)+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[172]=function(a){return(a.reg32s[5]<<2)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[173]=function(a,c){return(a.reg32s[5]<<2)+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[174]=function(a){return(a.reg32s[5]<<2)+a.get_seg_prefix_ds()+ +a.reg32s[6]|0};v86.prototype.sib_table[175]=function(a){return(a.reg32s[5]<<2)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[232]=function(a){return(a.reg32s[5]<<3)+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[233]=function(a){return(a.reg32s[5]<<3)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[234]=function(a){return(a.reg32s[5]<<3)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[235]=function(a){return(a.reg32s[5]<<3)+a.get_seg_prefix_ds()+ +a.reg32s[3]|0};v86.prototype.sib_table[236]=function(a){return(a.reg32s[5]<<3)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[237]=function(a,c){return(a.reg32s[5]<<3)+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[238]=function(a){return(a.reg32s[5]<<3)+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[239]=function(a){return(a.reg32s[5]<<3)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[48]=function(a){return a.reg32s[6]+ +a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[49]=function(a){return a.reg32s[6]+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[50]=function(a){return a.reg32s[6]+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[51]=function(a){return a.reg32s[6]+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[52]=function(a){return a.reg32s[6]+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[53]=function(a,c){return a.reg32s[6]+(c?a.get_seg_prefix_ss()+ +a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[54]=function(a){return a.reg32s[6]+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[55]=function(a){return a.reg32s[6]+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[112]=function(a){return(a.reg32s[6]<<1)+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[113]=function(a){return(a.reg32s[6]<<1)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[114]=function(a){return(a.reg32s[6]<< +1)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[115]=function(a){return(a.reg32s[6]<<1)+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[116]=function(a){return(a.reg32s[6]<<1)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[117]=function(a,c){return(a.reg32s[6]<<1)+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[118]=function(a){return(a.reg32s[6]<<1)+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[119]= +function(a){return(a.reg32s[6]<<1)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[176]=function(a){return(a.reg32s[6]<<2)+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[177]=function(a){return(a.reg32s[6]<<2)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[178]=function(a){return(a.reg32s[6]<<2)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[179]=function(a){return(a.reg32s[6]<<2)+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[180]= +function(a){return(a.reg32s[6]<<2)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[181]=function(a,c){return(a.reg32s[6]<<2)+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[182]=function(a){return(a.reg32s[6]<<2)+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[183]=function(a){return(a.reg32s[6]<<2)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[240]=function(a){return(a.reg32s[6]<<3)+a.get_seg_prefix_ds()+ +a.reg32s[0]|0};v86.prototype.sib_table[241]=function(a){return(a.reg32s[6]<<3)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[242]=function(a){return(a.reg32s[6]<<3)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[243]=function(a){return(a.reg32s[6]<<3)+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[244]=function(a){return(a.reg32s[6]<<3)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[245]=function(a,c){return(a.reg32s[6]<<3)+(c?a.get_seg_prefix_ss()+ +a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[246]=function(a){return(a.reg32s[6]<<3)+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[247]=function(a){return(a.reg32s[6]<<3)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[56]=function(a){return a.reg32s[7]+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[57]=function(a){return a.reg32s[7]+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[58]=function(a){return a.reg32s[7]+ +a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[59]=function(a){return a.reg32s[7]+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[60]=function(a){return a.reg32s[7]+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[61]=function(a,c){return a.reg32s[7]+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[62]=function(a){return a.reg32s[7]+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[63]=function(a){return a.reg32s[7]+ +a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[120]=function(a){return(a.reg32s[7]<<1)+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[121]=function(a){return(a.reg32s[7]<<1)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[122]=function(a){return(a.reg32s[7]<<1)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[123]=function(a){return(a.reg32s[7]<<1)+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[124]=function(a){return(a.reg32s[7]<< +1)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[125]=function(a,c){return(a.reg32s[7]<<1)+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[126]=function(a){return(a.reg32s[7]<<1)+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[127]=function(a){return(a.reg32s[7]<<1)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[184]=function(a){return(a.reg32s[7]<<2)+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[185]= +function(a){return(a.reg32s[7]<<2)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[186]=function(a){return(a.reg32s[7]<<2)+a.get_seg_prefix_ds()+a.reg32s[2]|0};v86.prototype.sib_table[187]=function(a){return(a.reg32s[7]<<2)+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[188]=function(a){return(a.reg32s[7]<<2)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[189]=function(a,c){return(a.reg32s[7]<<2)+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())| +0};v86.prototype.sib_table[190]=function(a){return(a.reg32s[7]<<2)+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[191]=function(a){return(a.reg32s[7]<<2)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.sib_table[248]=function(a){return(a.reg32s[7]<<3)+a.get_seg_prefix_ds()+a.reg32s[0]|0};v86.prototype.sib_table[249]=function(a){return(a.reg32s[7]<<3)+a.get_seg_prefix_ds()+a.reg32s[1]|0};v86.prototype.sib_table[250]=function(a){return(a.reg32s[7]<<3)+a.get_seg_prefix_ds()+a.reg32s[2]| +0};v86.prototype.sib_table[251]=function(a){return(a.reg32s[7]<<3)+a.get_seg_prefix_ds()+a.reg32s[3]|0};v86.prototype.sib_table[252]=function(a){return(a.reg32s[7]<<3)+a.get_seg_prefix_ss()+a.reg32s[4]|0};v86.prototype.sib_table[253]=function(a,c){return(a.reg32s[7]<<3)+(c?a.get_seg_prefix_ss()+a.reg32s[5]:a.get_seg_prefix_ds()+a.read_imm32s())|0};v86.prototype.sib_table[254]=function(a){return(a.reg32s[7]<<3)+a.get_seg_prefix_ds()+a.reg32s[6]|0};v86.prototype.sib_table[255]=function(a){return(a.reg32s[7]<< +3)+a.get_seg_prefix_ds()+a.reg32s[7]|0};v86.prototype.modrm_resolve=function(a){return(this.address_size_32?this.modrm_table32:this.modrm_table16)[a](this)}})();"use strict";v86.prototype.add=function(a,c,d){this.last_op1=a;this.last_op2=c;this.last_add_result=this.last_result=a+c|0;this.last_op_size=d;this.flags_changed=2261;return this.last_result}; +v86.prototype.adc=function(a,c,d){var e=this.getcf();this.last_op1=a;this.last_op2=c;this.last_add_result=this.last_result=(a+c|0)+e|0;this.last_op_size=d;this.flags_changed=2261;return this.last_result};v86.prototype.sub=function(a,c,d){this.last_add_result=a;this.last_op2=c;this.last_op1=this.last_result=a-c|0;this.last_op_size=d;this.flags_changed=2261;return this.last_result}; +v86.prototype.sbb=function(a,c,d){var e=this.getcf();this.last_add_result=a;this.last_op2=c;this.last_op1=this.last_result=a-c-e|0;this.last_op_size=d;this.flags_changed=2261;return this.last_result};v86.prototype.inc=function(a,c){this.flags=this.flags&-2|this.getcf();this.last_op1=a;this.last_op2=1;this.last_add_result=this.last_result=a+1|0;this.last_op_size=c;this.flags_changed=2260;return this.last_result}; +v86.prototype.dec=function(a,c){this.flags=this.flags&-2|this.getcf();this.last_add_result=a;this.last_op2=1;this.last_op1=this.last_result=a-1|0;this.last_op_size=c;this.flags_changed=2260;return this.last_result};v86.prototype.neg=function(a,c){this.last_op1=this.last_result=-a|0;this.flags_changed=2261;this.last_add_result=0;this.last_op2=a;this.last_op_size=c;return this.last_result}; +v86.prototype.mul8=function(a){a=a*this.reg8[0];this.reg16[0]=a;this.flags=256>a?this.flags&-2050:this.flags|2049;this.flags_changed=0};v86.prototype.imul8=function(a){a=a*this.reg8s[0];this.reg16[0]=a;this.flags=127a?this.flags|2049:this.flags&-2050;this.flags_changed=0};v86.prototype.mul16=function(a){a=a*this.reg16[0];var c=a>>>16;this.reg16[0]=a;this.reg16[4]=c;this.flags=0===c?this.flags&-2050:this.flags|2049;this.flags_changed=0}; +v86.prototype.imul16=function(a){a=a*this.reg16s[0];this.reg16[0]=a;this.reg16[4]=a>>16;this.flags=32767a?this.flags|2049:this.flags&-2050;this.flags_changed=0};v86.prototype.imul_reg16=function(a,c){var d=a*c;this.flags=32767d?this.flags|2049:this.flags&-2050;this.flags_changed=0;return d}; +v86.prototype.mul32=function(a){var c=this.reg32s[0],d=c&65535,c=c>>>16,e=a&65535;a=a>>>16;var f=d*e,e=(f>>>16)+(c*e|0)|0,g=e>>>16,e=(e&65535)+(d*a|0)|0,g=((e>>>16)+(c*a|0)|0)+g|0;this.reg32s[0]=e<<16|f&65535;this.reg32s[2]=g;this.flags=0===g?this.flags&-2050:this.flags|2049;this.flags_changed=0}; +v86.prototype.imul32=function(a){var c=this.reg32s[0],d=!1;0>c&&(d=!0,c=-c|0);0>a&&(d=!d,a=-a|0);var e=c&65535,c=c>>>16,f=a&65535;a=a>>>16;var g=e*f,f=(g>>>16)+(c*f|0)|0,k=f>>>16,f=(f&65535)+(e*a|0)|0,g=f<<16|g&65535,k=((f>>>16)+(c*a|0)|0)+k|0;d&&(g=-g|0,k=~k+!g|0);this.reg32s[0]=g;this.reg32s[2]=k;this.flags=k===g>>31?this.flags&-2050:this.flags|2049;this.flags_changed=0}; +v86.prototype.imul_reg32=function(a,c){var d=!1;0>a&&(d=!0,a=-a|0);0>c&&(d=!d,c=-c|0);var e=a&65535,f=a>>>16,g=c&65535,k=c>>>16,m=e*g,g=(m>>>16)+(f*g|0)|0,l=g>>>16,g=(g&65535)+(e*k|0)|0,m=g<<16|m&65535,l=((g>>>16)+(f*k|0)|0)+l|0;d&&(m=-m|0,l=~l+!m|0);this.flags=l===m>>31?this.flags&-2050:this.flags|2049;this.flags_changed=0;return m};v86.prototype.div8=function(a){var c=this.reg16[0],d=c/a|0;256<=d||0===a?this.trigger_de():(this.reg8[0]=d,this.reg8[1]=c%a)}; +v86.prototype.idiv8=function(a){var c=this.reg16s[0],d=c/a|0;128<=d||-129>=d||0===a?this.trigger_de():(this.reg8[0]=d,this.reg8[1]=c%a)};v86.prototype.div16=function(a){var c=(this.reg16[0]|this.reg16[4]<<16)>>>0,d=c/a|0;65536<=d||0>d||0===a?this.trigger_de():(this.reg16[0]=d,this.reg16[4]=c%a)};v86.prototype.idiv16=function(a){var c=this.reg16[0]|this.reg16[4]<<16,d=c/a|0;32768<=d||-32769>=d||0===a?this.trigger_de():(this.reg16[0]=d,this.reg16[4]=c%a)}; +v86.prototype.div32=function(a){var c=this.reg32[0],d=this.reg32[2];(d>=a||!a)&&this.trigger_de();var e=0;if(1048576d;)g>>>=1,f--;for(;1048576=g){var d=d-g,k=a<>>0;k>c&&d--;c=c-k>>>0;e|=1<>=1}e>>>=0}c+=4294967296*d;d=c%a;e+=c/a|0;4294967296<=e||0===a?this.trigger_de():(this.reg32s[0]=e,this.reg32s[2]=d)}; +v86.prototype.idiv32=function(a){var c=this.reg32[0],d=this.reg32s[2],e=!1,f=!1;0>a&&(f=!0,a=-a);0>d&&(e=!0,f=!f,c=-c|0,d=~d+!c);(d>=a||!a)&&this.trigger_de();var g=0;if(1048576d;)m>>>=1,k--;for(;1048576=m){var d=d-m,l=a<>>0;l>c&&d--;c=c-l>>>0;g|=1<>=1}g>>>=0}c+=4294967296*d;d=c%a;g+=c/a|0;f&&(g=-g|0);e&&(d=-d|0);2147483648<=g||-2147483649>=g||0===a?this.trigger_de():(this.reg32s[0]=g,this.reg32s[2]=d)}; +v86.prototype.xadd8=function(a,c){var d=this.reg8[c];this.reg8[c]=a;return this.add(a,d,7)};v86.prototype.xadd16=function(a,c){var d=this.reg16[c];this.reg16[c]=a;return this.add(a,d,15)};v86.prototype.xadd32=function(a,c){var d=this.reg32s[c];this.reg32s[c]=a;return this.add(a,d,31)}; +v86.prototype.bcd_daa=function(){var a=this.reg8[0],c=this.getcf(),d=this.getaf();this.flags&=-18;if(9<(a&15)||d)this.reg8[0]+=6,this.flags|=16;if(153>7):this.flags&=-17;if(153>8-c;this.flags_changed&=-2050;this.flags=this.flags&-2050|d&1|(d<<11^d<<4)&2048;return d}; +v86.prototype.rol16=function(a,c){if(!c)return a;c&=15;var d=a<>16-c;this.flags_changed&=-2050;this.flags=this.flags&-2050|d&1|(d<<11^d>>4)&2048;return d};v86.prototype.rol32=function(a,c){if(!c)return a;var d=a<>>32-c;this.flags_changed&=-2050;this.flags=this.flags&-2050|d&1|(d<<11^d>>20)&2048;return d};v86.prototype.rcl8=function(a,c){c%=9;if(!c)return a;var d=a<>9-c;this.flags_changed&=-2050;this.flags=this.flags&-2050|d>>8&1|(d<<3^d<<4)&2048;return d}; +v86.prototype.rcl16=function(a,c){c%=17;if(!c)return a;var d=a<>17-c;this.flags_changed&=-2050;this.flags=this.flags&-2050|d>>16&1|(d>>5^d>>4)&2048;return d};v86.prototype.rcl32=function(a,c){if(!c)return a;var d=a<>>33-c);this.flags_changed&=-2050;this.flags=this.flags&-2050|a>>>32-c&1;this.flags|=(this.flags<<11^d>>20)&2048;return d}; +v86.prototype.ror8=function(a,c){c&=7;if(!c)return a;var d=a>>c|a<<8-c;this.flags_changed&=-2050;this.flags=this.flags&-2050|d>>7&1|(d<<4^d<<5)&2048;return d};v86.prototype.ror16=function(a,c){c&=15;if(!c)return a;var d=a>>c|a<<16-c;this.flags_changed&=-2050;this.flags=this.flags&-2050|d>>15&1|(d>>4^d>>3)&2048;return d};v86.prototype.ror32=function(a,c){if(!c)return a;var d=a>>>c|a<<32-c;this.flags_changed&=-2050;this.flags=this.flags&-2050|d>>31&1|(d>>20^d>>19)&2048;return d}; +v86.prototype.rcr8=function(a,c){c%=9;if(!c)return a;var d=a>>c|this.getcf()<<8-c|a<<9-c;this.flags_changed&=-2050;this.flags=this.flags&-2050|d>>8&1|(d<<4^d<<5)&2048;return d};v86.prototype.rcr16=function(a,c){c%=17;if(!c)return a;var d=a>>c|this.getcf()<<16-c|a<<17-c;this.flags_changed&=-2050;this.flags=this.flags&-2050|d>>16&1|(d>>4^d>>3)&2048;return d}; +v86.prototype.rcr32=function(a,c){if(!c)return a;var d=a>>>c|this.getcf()<<32-c;1>c-1&1|(d>>20^d>>19)&2048;return d};v86.prototype.shl8=function(a,c){if(0===c)return a;this.last_result=a<>8&1|(this.last_result<<3^this.last_result<<4)&2048;return this.last_result}; +v86.prototype.shl16=function(a,c){if(0===c)return a;this.last_result=a<>16&1|(this.last_result>>5^this.last_result>>4)&2048;return this.last_result};v86.prototype.shl32=function(a,c){if(0===c)return a;this.last_result=a<>>32-c&1;this.flags|=(this.flags&1^this.last_result>>31&1)<<11&2048;return this.last_result}; +v86.prototype.shr8=function(a,c){if(0===c)return a;this.last_result=a>>c;this.last_op_size=7;this.flags_changed=212;this.flags=this.flags&-2050|a>>c-1&1|(a>>7&1)<<11&2048;return this.last_result};v86.prototype.shr16=function(a,c){if(0===c)return a;this.last_result=a>>c;this.last_op_size=15;this.flags_changed=212;this.flags=this.flags&-2050|a>>c-1&1|a>>4&2048;return this.last_result}; +v86.prototype.shr32=function(a,c){if(0===c)return a;this.last_result=a>>>c;this.last_op_size=31;this.flags_changed=212;this.flags=this.flags&-2050|a>>>c-1&1|a>>20&2048;return this.last_result};v86.prototype.sar8=function(a,c){if(0===c)return a;this.last_result=a>>c;this.last_op_size=7;this.flags_changed=212;this.flags=this.flags&-2050|a>>c-1&1;return this.last_result}; +v86.prototype.sar16=function(a,c){if(0===c)return a;this.last_result=a>>c;this.last_op_size=15;this.flags_changed=212;this.flags=this.flags&-2050|a>>c-1&1;return this.last_result};v86.prototype.sar32=function(a,c){if(0===c)return a;this.last_result=a>>c;this.last_op_size=31;this.flags_changed=212;this.flags=this.flags&-2050|a>>>c-1&1;return this.last_result}; +v86.prototype.shrd16=function(a,c,d){if(0===d)return a;16>=d?(this.last_result=a>>d|c<<16-d,this.flags=this.flags&-2|a>>d-1&1):(this.last_result=a<<32-d|c>>d-16,this.flags=this.flags&-2|c>>d-17&1);this.last_op_size=15;this.flags_changed=212;this.flags=this.flags&-2049|(this.last_result^a)>>4&2048;return this.last_result}; +v86.prototype.shrd32=function(a,c,d){if(0===d)return a;this.last_result=a>>>d|c<<32-d;this.last_op_size=31;this.flags_changed=212;this.flags=this.flags&-2|a>>>d-1&1;this.flags=this.flags&-2049|(this.last_result^a)>>20&2048;return this.last_result}; +v86.prototype.shld16=function(a,c,d){if(0===d)return a;16>=d?(this.last_result=a<>>16-d,this.flags=this.flags&-2|a>>>16-d&1):(this.last_result=a>>32-d|c<>>32-d&1);this.last_op_size=15;this.flags_changed=212;this.flags=this.flags&-2049|(this.flags&1^this.last_result>>15&1)<<11;return this.last_result}; +v86.prototype.shld32=function(a,c,d){if(0===d)return a;this.last_result=a<>>32-d;this.last_op_size=31;this.flags_changed=212;this.flags=this.flags&-2|a>>>32-d&1;this.flags=this.flags&-2049|(this.flags&1^this.last_result>>31&1)<<11;return this.last_result};v86.prototype.bt_reg=function(a,c){this.flags=this.flags&-2|a>>c&1;this.flags_changed&=-2};v86.prototype.btc_reg=function(a,c){this.flags=this.flags&-2|a>>c&1;this.flags_changed&=-2;return a^1<>c&1;this.flags_changed&=-2;return a|1<>c&1;this.flags_changed&=-2;return a&~(1<>3));this.flags=this.flags&-2|d>>(c&7)&1;this.flags_changed&=-2}; +v86.prototype.btc_mem=function(a,c){var d=this.translate_address_write(a+(c>>3)),e=this.memory.read8(d);c&=7;this.flags=this.flags&-2|e>>c&1;this.flags_changed&=-2;this.memory.write8(d,e^1<>3)),e=this.memory.read8(d);c&=7;this.flags=this.flags&-2|e>>c&1;this.flags_changed&=-2;this.memory.write8(d,e&~(1<>3)),e=this.memory.read8(d);c&=7;this.flags=this.flags&-2|e>>c&1;this.flags_changed&=-2;this.memory.write8(d,e|1<>>0)}; +v86.prototype.bsr16=function(a,c){this.flags_changed=0;if(0===c)return this.flags|=64,a;this.flags&=-65;return Math.int_log2(c)};v86.prototype.bsr32=function(a,c){this.flags_changed=0;if(0===c)return this.flags|=64,a;this.flags&=-65;return Math.int_log2(c>>>0)};v86.prototype.popcnt=function(a){this.flags_changed=0;this.flags&=-2262;if(a)return a=a-(a>>1&1431655765),a=(a&858993459)+(a>>2&858993459),16843009*(a+(a>>4)&252645135)>>24;this.flags|=64;return 0};"use strict";"use strict"; +var table16=[],table32=[],table0F_16=[],table0F_32=[];v86.prototype.table16=table16;v86.prototype.table32=table32;v86.prototype.table0F_16=table0F_16;v86.prototype.table0F_32=table0F_32;table16[0]=table32[0]=function(a){var c=a.read_imm8(),d,e;192>c?(e=a.translate_address_write(a.modrm_resolve(c)),d=a.memory.read8(e)):d=a.reg8[c<<2&12|c>>2&1];d=a.add(d,a.reg8[c>>1&12|c>>5&1],7);192>c?a.memory.write8(e,d):a.reg8[c<<2&12|c>>2&1]=d}; +table16[1]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4095===(d&4095)?(f=a.translate_address_write(d+1),d=a.virt_boundary_read16(e,f)):d=a.memory.read16(e)):d=a.reg16[c<<1&14];d=a.add(d,a.reg16[c>>2&14],15);192>c?f?a.virt_boundary_write16(e,f,d):a.memory.write16(e,d):a.reg16[c<<1&14]=d}; +table32[1]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(f=a.translate_address_write(d+3),d=a.virt_boundary_read32s(e,f)):d=a.memory.read32s(e)):d=a.reg32s[c&7];d=a.add(d,a.reg32s[c>>3&7],31);192>c?f?a.virt_boundary_write32(e,f,d):a.memory.write32(e,d):a.reg32s[c&7]=d}; +table16[2]=table32[2]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read8(a.modrm_resolve(c)):a.reg8[c<<2&12|c>>2&1];a.reg8[c>>1&12|c>>5&1]=a.add(a.reg8[c>>1&12|c>>5&1],d,7)};table16[3]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.reg16[c>>2&14]=a.add(a.reg16[c>>2&14],d,15)};table32[3]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.reg32s[c>>3&7]=a.add(a.reg32s[c>>3&7],d,31)}; +table16[4]=table32[4]=function(a){a.reg8[0]=a.add(a.reg8[0],a.read_imm8(),7)};table16[5]=function(a){a.reg16[0]=a.add(a.reg16[0],a.read_imm16(),15)};table32[5]=function(a){a.reg32s[0]=a.add(a.reg32s[0],a.read_imm32s(),31)};table16[6]=function(a){a.push16(a.sreg[0])};table32[6]=function(a){a.push32(a.sreg[0])};table16[7]=function(a){a.switch_seg(0,a.safe_read16(a.get_stack_pointer(0)));a.stack_reg[a.reg_vsp]+=2}; +table32[7]=function(a){a.switch_seg(0,a.safe_read16(a.get_stack_pointer(0)));a.stack_reg[a.reg_vsp]+=4};table16[8]=table32[8]=function(a){var c=a.read_imm8(),d,e;192>c?(e=a.translate_address_write(a.modrm_resolve(c)),d=a.memory.read8(e)):d=a.reg8[c<<2&12|c>>2&1];d=a.or(d,a.reg8[c>>1&12|c>>5&1],7);192>c?a.memory.write8(e,d):a.reg8[c<<2&12|c>>2&1]=d}; +table16[9]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4095===(d&4095)?(f=a.translate_address_write(d+1),d=a.virt_boundary_read16(e,f)):d=a.memory.read16(e)):d=a.reg16[c<<1&14];d=a.or(d,a.reg16[c>>2&14],15);192>c?f?a.virt_boundary_write16(e,f,d):a.memory.write16(e,d):a.reg16[c<<1&14]=d}; +table32[9]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(f=a.translate_address_write(d+3),d=a.virt_boundary_read32s(e,f)):d=a.memory.read32s(e)):d=a.reg32s[c&7];d=a.or(d,a.reg32s[c>>3&7],31);192>c?f?a.virt_boundary_write32(e,f,d):a.memory.write32(e,d):a.reg32s[c&7]=d}; +table16[10]=table32[10]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read8(a.modrm_resolve(c)):a.reg8[c<<2&12|c>>2&1];a.reg8[c>>1&12|c>>5&1]=a.or(a.reg8[c>>1&12|c>>5&1],d,7)};table16[11]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.reg16[c>>2&14]=a.or(a.reg16[c>>2&14],d,15)};table32[11]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.reg32s[c>>3&7]=a.or(a.reg32s[c>>3&7],d,31)}; +table16[12]=table32[12]=function(a){a.reg8[0]=a.or(a.reg8[0],a.read_imm8(),7)};table16[13]=function(a){a.reg16[0]=a.or(a.reg16[0],a.read_imm16(),15)};table32[13]=function(a){a.reg32s[0]=a.or(a.reg32s[0],a.read_imm32s(),31)};table16[14]=function(a){a.push16(a.sreg[1])};table32[14]=function(a){a.push32(a.sreg[1])};table16[15]=table32[15]=function(a){a.table0F[a.read_imm8()](a)}; +table16[16]=table32[16]=function(a){var c=a.read_imm8(),d,e;192>c?(e=a.translate_address_write(a.modrm_resolve(c)),d=a.memory.read8(e)):d=a.reg8[c<<2&12|c>>2&1];d=a.adc(d,a.reg8[c>>1&12|c>>5&1],7);192>c?a.memory.write8(e,d):a.reg8[c<<2&12|c>>2&1]=d}; +table16[17]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4095===(d&4095)?(f=a.translate_address_write(d+1),d=a.virt_boundary_read16(e,f)):d=a.memory.read16(e)):d=a.reg16[c<<1&14];d=a.adc(d,a.reg16[c>>2&14],15);192>c?f?a.virt_boundary_write16(e,f,d):a.memory.write16(e,d):a.reg16[c<<1&14]=d}; +table32[17]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(f=a.translate_address_write(d+3),d=a.virt_boundary_read32s(e,f)):d=a.memory.read32s(e)):d=a.reg32s[c&7];d=a.adc(d,a.reg32s[c>>3&7],31);192>c?f?a.virt_boundary_write32(e,f,d):a.memory.write32(e,d):a.reg32s[c&7]=d}; +table16[18]=table32[18]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read8(a.modrm_resolve(c)):a.reg8[c<<2&12|c>>2&1];a.reg8[c>>1&12|c>>5&1]=a.adc(a.reg8[c>>1&12|c>>5&1],d,7)};table16[19]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.reg16[c>>2&14]=a.adc(a.reg16[c>>2&14],d,15)};table32[19]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.reg32s[c>>3&7]=a.adc(a.reg32s[c>>3&7],d,31)}; +table16[20]=table32[20]=function(a){a.reg8[0]=a.adc(a.reg8[0],a.read_imm8(),7)};table16[21]=function(a){a.reg16[0]=a.adc(a.reg16[0],a.read_imm16(),15)};table32[21]=function(a){a.reg32s[0]=a.adc(a.reg32s[0],a.read_imm32s(),31)};table16[22]=function(a){a.push16(a.sreg[2])};table32[22]=function(a){a.push32(a.sreg[2])};table16[23]=function(a){a.switch_seg(2,a.safe_read16(a.get_stack_pointer(0)));a.stack_reg[a.reg_vsp]+=2}; +table32[23]=function(a){a.switch_seg(2,a.safe_read16(a.get_stack_pointer(0)));a.stack_reg[a.reg_vsp]+=4};table16[24]=table32[24]=function(a){var c=a.read_imm8(),d,e;192>c?(e=a.translate_address_write(a.modrm_resolve(c)),d=a.memory.read8(e)):d=a.reg8[c<<2&12|c>>2&1];d=a.sbb(d,a.reg8[c>>1&12|c>>5&1],7);192>c?a.memory.write8(e,d):a.reg8[c<<2&12|c>>2&1]=d}; +table16[25]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4095===(d&4095)?(f=a.translate_address_write(d+1),d=a.virt_boundary_read16(e,f)):d=a.memory.read16(e)):d=a.reg16[c<<1&14];d=a.sbb(d,a.reg16[c>>2&14],15);192>c?f?a.virt_boundary_write16(e,f,d):a.memory.write16(e,d):a.reg16[c<<1&14]=d}; +table32[25]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(f=a.translate_address_write(d+3),d=a.virt_boundary_read32s(e,f)):d=a.memory.read32s(e)):d=a.reg32s[c&7];d=a.sbb(d,a.reg32s[c>>3&7],31);192>c?f?a.virt_boundary_write32(e,f,d):a.memory.write32(e,d):a.reg32s[c&7]=d}; +table16[26]=table32[26]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read8(a.modrm_resolve(c)):a.reg8[c<<2&12|c>>2&1];a.reg8[c>>1&12|c>>5&1]=a.sbb(a.reg8[c>>1&12|c>>5&1],d,7)};table16[27]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.reg16[c>>2&14]=a.sbb(a.reg16[c>>2&14],d,15)};table32[27]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.reg32s[c>>3&7]=a.sbb(a.reg32s[c>>3&7],d,31)}; +table16[28]=table32[28]=function(a){a.reg8[0]=a.sbb(a.reg8[0],a.read_imm8(),7)};table16[29]=function(a){a.reg16[0]=a.sbb(a.reg16[0],a.read_imm16(),15)};table32[29]=function(a){a.reg32s[0]=a.sbb(a.reg32s[0],a.read_imm32s(),31)};table16[30]=function(a){a.push16(a.sreg[3])};table32[30]=function(a){a.push32(a.sreg[3])};table16[31]=function(a){a.switch_seg(3,a.safe_read16(a.get_stack_pointer(0)));a.stack_reg[a.reg_vsp]+=2}; +table32[31]=function(a){a.switch_seg(3,a.safe_read16(a.get_stack_pointer(0)));a.stack_reg[a.reg_vsp]+=4};table16[32]=table32[32]=function(a){var c=a.read_imm8(),d,e;192>c?(e=a.translate_address_write(a.modrm_resolve(c)),d=a.memory.read8(e)):d=a.reg8[c<<2&12|c>>2&1];d=a.and(d,a.reg8[c>>1&12|c>>5&1],7);192>c?a.memory.write8(e,d):a.reg8[c<<2&12|c>>2&1]=d}; +table16[33]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4095===(d&4095)?(f=a.translate_address_write(d+1),d=a.virt_boundary_read16(e,f)):d=a.memory.read16(e)):d=a.reg16[c<<1&14];d=a.and(d,a.reg16[c>>2&14],15);192>c?f?a.virt_boundary_write16(e,f,d):a.memory.write16(e,d):a.reg16[c<<1&14]=d}; +table32[33]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(f=a.translate_address_write(d+3),d=a.virt_boundary_read32s(e,f)):d=a.memory.read32s(e)):d=a.reg32s[c&7];d=a.and(d,a.reg32s[c>>3&7],31);192>c?f?a.virt_boundary_write32(e,f,d):a.memory.write32(e,d):a.reg32s[c&7]=d}; +table16[34]=table32[34]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read8(a.modrm_resolve(c)):a.reg8[c<<2&12|c>>2&1];a.reg8[c>>1&12|c>>5&1]=a.and(a.reg8[c>>1&12|c>>5&1],d,7)};table16[35]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.reg16[c>>2&14]=a.and(a.reg16[c>>2&14],d,15)};table32[35]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.reg32s[c>>3&7]=a.and(a.reg32s[c>>3&7],d,31)}; +table16[36]=table32[36]=function(a){a.reg8[0]=a.and(a.reg8[0],a.read_imm8(),7)};table16[37]=function(a){a.reg16[0]=a.and(a.reg16[0],a.read_imm16(),15)};table32[37]=function(a){a.reg32s[0]=a.and(a.reg32s[0],a.read_imm32s(),31)};table16[38]=table32[38]=function(a){a.seg_prefix(0)};table16[39]=table32[39]=function(a){a.bcd_daa()}; +table16[40]=table32[40]=function(a){var c=a.read_imm8(),d,e;192>c?(e=a.translate_address_write(a.modrm_resolve(c)),d=a.memory.read8(e)):d=a.reg8[c<<2&12|c>>2&1];d=a.sub(d,a.reg8[c>>1&12|c>>5&1],7);192>c?a.memory.write8(e,d):a.reg8[c<<2&12|c>>2&1]=d}; +table16[41]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4095===(d&4095)?(f=a.translate_address_write(d+1),d=a.virt_boundary_read16(e,f)):d=a.memory.read16(e)):d=a.reg16[c<<1&14];d=a.sub(d,a.reg16[c>>2&14],15);192>c?f?a.virt_boundary_write16(e,f,d):a.memory.write16(e,d):a.reg16[c<<1&14]=d}; +table32[41]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(f=a.translate_address_write(d+3),d=a.virt_boundary_read32s(e,f)):d=a.memory.read32s(e)):d=a.reg32s[c&7];d=a.sub(d,a.reg32s[c>>3&7],31);192>c?f?a.virt_boundary_write32(e,f,d):a.memory.write32(e,d):a.reg32s[c&7]=d}; +table16[42]=table32[42]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read8(a.modrm_resolve(c)):a.reg8[c<<2&12|c>>2&1];a.reg8[c>>1&12|c>>5&1]=a.sub(a.reg8[c>>1&12|c>>5&1],d,7)};table16[43]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.reg16[c>>2&14]=a.sub(a.reg16[c>>2&14],d,15)};table32[43]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.reg32s[c>>3&7]=a.sub(a.reg32s[c>>3&7],d,31)}; +table16[44]=table32[44]=function(a){a.reg8[0]=a.sub(a.reg8[0],a.read_imm8(),7)};table16[45]=function(a){a.reg16[0]=a.sub(a.reg16[0],a.read_imm16(),15)};table32[45]=function(a){a.reg32s[0]=a.sub(a.reg32s[0],a.read_imm32s(),31)};table16[46]=table32[46]=function(a){a.seg_prefix(1)};table16[47]=table32[47]=function(a){a.bcd_das()}; +table16[48]=table32[48]=function(a){var c=a.read_imm8(),d,e;192>c?(e=a.translate_address_write(a.modrm_resolve(c)),d=a.memory.read8(e)):d=a.reg8[c<<2&12|c>>2&1];d=a.xor(d,a.reg8[c>>1&12|c>>5&1],7);192>c?a.memory.write8(e,d):a.reg8[c<<2&12|c>>2&1]=d}; +table16[49]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4095===(d&4095)?(f=a.translate_address_write(d+1),d=a.virt_boundary_read16(e,f)):d=a.memory.read16(e)):d=a.reg16[c<<1&14];d=a.xor(d,a.reg16[c>>2&14],15);192>c?f?a.virt_boundary_write16(e,f,d):a.memory.write16(e,d):a.reg16[c<<1&14]=d}; +table32[49]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(f=a.translate_address_write(d+3),d=a.virt_boundary_read32s(e,f)):d=a.memory.read32s(e)):d=a.reg32s[c&7];d=a.xor(d,a.reg32s[c>>3&7],31);192>c?f?a.virt_boundary_write32(e,f,d):a.memory.write32(e,d):a.reg32s[c&7]=d}; +table16[50]=table32[50]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read8(a.modrm_resolve(c)):a.reg8[c<<2&12|c>>2&1];a.reg8[c>>1&12|c>>5&1]=a.xor(a.reg8[c>>1&12|c>>5&1],d,7)};table16[51]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.reg16[c>>2&14]=a.xor(a.reg16[c>>2&14],d,15)};table32[51]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.reg32s[c>>3&7]=a.xor(a.reg32s[c>>3&7],d,31)}; +table16[52]=table32[52]=function(a){a.reg8[0]=a.xor(a.reg8[0],a.read_imm8(),7)};table16[53]=function(a){a.reg16[0]=a.xor(a.reg16[0],a.read_imm16(),15)};table32[53]=function(a){a.reg32s[0]=a.xor(a.reg32s[0],a.read_imm32s(),31)};table16[54]=table32[54]=function(a){a.seg_prefix(2)};table16[55]=table32[55]=function(a){a.bcd_aaa()};table16[56]=table32[56]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read8(a.modrm_resolve(c)):a.reg8[c<<2&12|c>>2&1];a.sub(d,a.reg8[c>>1&12|c>>5&1],7)}; +table16[57]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.sub(d,a.reg16[c>>2&14],15)};table32[57]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.sub(d,a.reg32s[c>>3&7],31)};table16[58]=table32[58]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read8(a.modrm_resolve(c)):a.reg8[c<<2&12|c>>2&1];a.sub(a.reg8[c>>1&12|c>>5&1],d,7)}; +table16[59]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.sub(a.reg16[c>>2&14],d,15)};table32[59]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.sub(a.reg32s[c>>3&7],d,31)};table16[60]=table32[60]=function(a){a.sub(a.reg8[0],a.read_imm8(),7)};table16[61]=function(a){a.sub(a.reg16[0],a.read_imm16(),15)};table32[61]=function(a){a.sub(a.reg32s[0],a.read_imm32s(),31)};table16[62]=table32[62]=function(a){a.seg_prefix(3)}; +table16[63]=table32[63]=function(a){a.bcd_aas()};table16[64]=function(a){a.reg16[0]=a.inc(a.reg16[0],15)};table32[64]=function(a){a.reg32s[0]=a.inc(a.reg32s[0],31)};table16[65]=function(a){a.reg16[2]=a.inc(a.reg16[2],15)};table32[65]=function(a){a.reg32s[1]=a.inc(a.reg32s[1],31)};table16[66]=function(a){a.reg16[4]=a.inc(a.reg16[4],15)};table32[66]=function(a){a.reg32s[2]=a.inc(a.reg32s[2],31)};table16[67]=function(a){a.reg16[6]=a.inc(a.reg16[6],15)}; +table32[67]=function(a){a.reg32s[3]=a.inc(a.reg32s[3],31)};table16[68]=function(a){a.reg16[8]=a.inc(a.reg16[8],15)};table32[68]=function(a){a.reg32s[4]=a.inc(a.reg32s[4],31)};table16[69]=function(a){a.reg16[10]=a.inc(a.reg16[10],15)};table32[69]=function(a){a.reg32s[5]=a.inc(a.reg32s[5],31)};table16[70]=function(a){a.reg16[12]=a.inc(a.reg16[12],15)};table32[70]=function(a){a.reg32s[6]=a.inc(a.reg32s[6],31)};table16[71]=function(a){a.reg16[14]=a.inc(a.reg16[14],15)}; +table32[71]=function(a){a.reg32s[7]=a.inc(a.reg32s[7],31)};table16[72]=function(a){a.reg16[0]=a.dec(a.reg16[0],15)};table32[72]=function(a){a.reg32s[0]=a.dec(a.reg32s[0],31)};table16[73]=function(a){a.reg16[2]=a.dec(a.reg16[2],15)};table32[73]=function(a){a.reg32s[1]=a.dec(a.reg32s[1],31)};table16[74]=function(a){a.reg16[4]=a.dec(a.reg16[4],15)};table32[74]=function(a){a.reg32s[2]=a.dec(a.reg32s[2],31)};table16[75]=function(a){a.reg16[6]=a.dec(a.reg16[6],15)}; +table32[75]=function(a){a.reg32s[3]=a.dec(a.reg32s[3],31)};table16[76]=function(a){a.reg16[8]=a.dec(a.reg16[8],15)};table32[76]=function(a){a.reg32s[4]=a.dec(a.reg32s[4],31)};table16[77]=function(a){a.reg16[10]=a.dec(a.reg16[10],15)};table32[77]=function(a){a.reg32s[5]=a.dec(a.reg32s[5],31)};table16[78]=function(a){a.reg16[12]=a.dec(a.reg16[12],15)};table32[78]=function(a){a.reg32s[6]=a.dec(a.reg32s[6],31)};table16[79]=function(a){a.reg16[14]=a.dec(a.reg16[14],15)}; +table32[79]=function(a){a.reg32s[7]=a.dec(a.reg32s[7],31)};table16[80]=function(a){a.push16(a.reg16[0])};table32[80]=function(a){a.push32(a.reg32s[0])};table16[81]=function(a){a.push16(a.reg16[2])};table32[81]=function(a){a.push32(a.reg32s[1])};table16[82]=function(a){a.push16(a.reg16[4])};table32[82]=function(a){a.push32(a.reg32s[2])};table16[83]=function(a){a.push16(a.reg16[6])};table32[83]=function(a){a.push32(a.reg32s[3])};table16[84]=function(a){a.push16(a.reg16[8])};table32[84]=function(a){a.push32(a.reg32s[4])}; +table16[85]=function(a){a.push16(a.reg16[10])};table32[85]=function(a){a.push32(a.reg32s[5])};table16[86]=function(a){a.push16(a.reg16[12])};table32[86]=function(a){a.push32(a.reg32s[6])};table16[87]=function(a){a.push16(a.reg16[14])};table32[87]=function(a){a.push32(a.reg32s[7])};table16[88]=function(a){a.reg16[0]=a.pop16()};table32[88]=function(a){a.reg32s[0]=a.pop32s()};table16[89]=function(a){a.reg16[2]=a.pop16()};table32[89]=function(a){a.reg32s[1]=a.pop32s()}; +table16[90]=function(a){a.reg16[4]=a.pop16()};table32[90]=function(a){a.reg32s[2]=a.pop32s()};table16[91]=function(a){a.reg16[6]=a.pop16()};table32[91]=function(a){a.reg32s[3]=a.pop32s()};table16[92]=function(a){a.reg16[8]=a.pop16()};table32[92]=function(a){a.reg32s[4]=a.pop32s()};table16[93]=function(a){a.reg16[10]=a.pop16()};table32[93]=function(a){a.reg32s[5]=a.pop32s()};table16[94]=function(a){a.reg16[12]=a.pop16()};table32[94]=function(a){a.reg32s[6]=a.pop32s()}; +table16[95]=function(a){a.reg16[14]=a.pop16()};table32[95]=function(a){a.reg32s[7]=a.pop32s()};table16[96]=function(a){a.pusha16()};table32[96]=function(a){a.pusha32()};table16[97]=function(a){a.popa16()};table32[97]=function(a){a.popa32()};table16[98]=table32[98]=function(){}; +table16[99]=table32[99]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4095===(d&4095)?(f=a.translate_address_write(d+1),d=a.virt_boundary_read16(e,f)):d=a.memory.read16(e)):d=a.reg16[c<<1&14];d=a.arpl(d,c>>2&14);192>c?f?a.virt_boundary_write16(e,f,d):a.memory.write16(e,d):a.reg16[c<<1&14]=d};table16[100]=table32[100]=function(a){a.seg_prefix(4)};table16[101]=table32[101]=function(a){a.seg_prefix(5)}; +table16[102]=table32[102]=function(a){a.operand_size_32=!a.is_32;a.update_operand_size();a.do_op();a.operand_size_32=a.is_32;a.update_operand_size()};table16[103]=table32[103]=function(a){a.address_size_32=!a.is_32;a.update_address_size();a.do_op();a.address_size_32=a.is_32;a.update_address_size()};table16[104]=function(a){a.push16(a.read_imm16())};table32[104]=function(a){a.push32(a.read_imm32s())}; +table16[105]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c))<<16>>16:a.reg16s[c<<1&14];a.reg16[c>>2&14]=a.imul_reg16(a.read_imm16s(),d)};table32[105]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.reg32s[c>>3&7]=a.imul_reg32(a.read_imm32s(),d)};table16[106]=function(a){a.push16(a.read_imm8s())};table32[106]=function(a){a.push32(a.read_imm8s())}; +table16[107]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c))<<16>>16:a.reg16s[c<<1&14];a.reg16[c>>2&14]=a.imul_reg16(a.read_imm8s(),d)};table32[107]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.reg32s[c>>3&7]=a.imul_reg32(a.read_imm8s(),d)}; +table16[108]=table32[108]=function(a){a:{var c=a.reg16[4];a.test_privileges_for_io(c,1);var d,e=a.flags&1024?-1:1,f=!1;d=a.get_seg(0)+a.regv[a.reg_vdi]|0;if(0!==a.repeat_string_prefix){var g=a.regv[a.reg_vcx]>>>0,k=g;if(0===g)break a;var m=16384,l=e>>31|1;a.paging&&(m=Math.min(m,(l>>1^~d)&4095),d=a.translate_address_write(d));do a.memory.write8(d,a.io.port_read8(c)),d+=l,f=0!==--g&&!0;while(f&&m--);a.regv[a.reg_vdi]+=e*(k-g)|0;a.regv[a.reg_vcx]=g;a.timestamp_counter+=k-g}else d=a.translate_address_write(d), +a.memory.write8(d,a.io.port_read8(c)),a.regv[a.reg_vdi]+=e;f&&(a.instruction_pointer=a.previous_ip)}}; +table16[109]=function(a){a:{var c=a.reg16[4];a.test_privileges_for_io(c,2);var d,e=a.flags&1024?-2:2,f=!1;d=a.get_seg(0)+a.regv[a.reg_vdi]|0;if(0!==a.repeat_string_prefix){var g=a.regv[a.reg_vcx]>>>0,k=g;if(0===g)break a;var m=16384;if(d&1){do a.safe_write16(d,a.io.port_read16(c)),d+=e,a.regv[a.reg_vdi]+=e,f=0!==--a.regv[a.reg_vcx]&&!0;while(f&&m--)}else{var l=e>>31|1;a.paging&&(m=Math.min(m,(l>>1^~d)&4095),d=a.translate_address_write(d),m>>=1);d>>>=1;do a.memory.write_aligned16(d,a.io.port_read16(c)), +d+=l,f=0!==--g&&!0;while(f&&m--);a.regv[a.reg_vdi]+=e*(k-g)|0;a.regv[a.reg_vcx]=g;a.timestamp_counter+=k-g}}else a.safe_write16(d,a.io.port_read16(c)),a.regv[a.reg_vdi]+=e;f&&(a.instruction_pointer=a.previous_ip)}}; +table32[109]=function(a){a:{var c=a.reg16[4];a.test_privileges_for_io(c,4);var d,e=a.flags&1024?-4:4,f=!1;d=a.get_seg(0)+a.regv[a.reg_vdi]|0;if(0!==a.repeat_string_prefix){var g=a.regv[a.reg_vcx]>>>0,k=g;if(0===g)break a;var m=16384;if(d&3){do a.safe_write32(d,a.io.port_read32(c)),d+=e,a.regv[a.reg_vdi]+=e,f=0!==--a.regv[a.reg_vcx]&&!0;while(f&&m--)}else{var l=e>>31|1;a.paging&&(m=Math.min(m,(l>>1^~d)&4095),d=a.translate_address_write(d),m>>=2);d>>>=2;do a.memory.write_aligned32(d,a.io.port_read32(c)), +d+=l,f=0!==--g&&!0;while(f&&m--);a.regv[a.reg_vdi]+=e*(k-g)|0;a.regv[a.reg_vcx]=g;a.timestamp_counter+=k-g}}else a.safe_write32(d,a.io.port_read32(c)),a.regv[a.reg_vdi]+=e;f&&(a.instruction_pointer=a.previous_ip)}}; +table16[110]=table32[110]=function(a){a:{var c=a.reg16[4];a.test_privileges_for_io(c,1);var d,e=a.flags&1024?-1:1,f=!1;d=a.get_seg_prefix(3)+a.regv[a.reg_vsi]|0;if(0!==a.repeat_string_prefix){var g=a.regv[a.reg_vcx]>>>0,k=g;if(0===g)break a;var m=16384,l=e>>31|1;a.paging&&(m=(l>>1^~d)&4095,d=a.translate_address_read(d));do a.io.port_write8(c,a.memory.read8(d)),d+=l,f=0!==--g&&!0;while(f&&m--);a.regv[a.reg_vsi]+=e*(k-g)|0;a.regv[a.reg_vcx]=g;a.timestamp_counter+=k-g}else d=a.translate_address_read(d), +a.io.port_write8(c,a.memory.read8(d)),a.regv[a.reg_vsi]+=e;f&&(a.instruction_pointer=a.previous_ip)}}; +table16[111]=function(a){a:{var c=a.reg16[4];a.test_privileges_for_io(c,2);var d,e=a.flags&1024?-2:2,f=!1;d=a.get_seg_prefix(3)+a.regv[a.reg_vsi]|0;if(0!==a.repeat_string_prefix){var g=a.regv[a.reg_vcx]>>>0,k=g;if(0===g)break a;var m=16384;if(d&1){do a.io.port_write16(c,a.safe_read16(d)),d+=e,a.regv[a.reg_vsi]+=e,f=0!==--a.regv[a.reg_vcx]&&!0;while(f&&m--)}else{var l=e>>31|1;a.paging&&(m=(l>>1^~d)&4095,d=a.translate_address_read(d),m>>=1);d>>>=1;do a.io.port_write16(c,a.memory.read_aligned16(d)), +d+=l,f=0!==--g&&!0;while(f&&m--);a.regv[a.reg_vsi]+=e*(k-g)|0;a.regv[a.reg_vcx]=g;a.timestamp_counter+=k-g}}else a.io.port_write16(c,a.safe_read16(d)),a.regv[a.reg_vsi]+=e;f&&(a.instruction_pointer=a.previous_ip)}}; +table32[111]=function(a){a:{var c=a.reg16[4];a.test_privileges_for_io(c,4);var d,e=a.flags&1024?-4:4,f=!1;d=a.get_seg_prefix(3)+a.regv[a.reg_vsi]|0;if(0!==a.repeat_string_prefix){var g=a.regv[a.reg_vcx]>>>0,k=g;if(0===g)break a;var m=16384;if(d&3){do a.io.port_write32(c,a.safe_read32s(d)),d+=e,a.regv[a.reg_vsi]+=e,f=0!==--a.regv[a.reg_vcx]&&!0;while(f&&m--)}else{var l=e>>31|1;a.paging&&(m=(l>>1^~d)&4095,d=a.translate_address_read(d),m>>=2);d>>>=2;do a.io.port_write32(c,a.memory.read_aligned32(d)), +d+=l,f=0!==--g&&!0;while(f&&m--);a.regv[a.reg_vsi]+=e*(k-g)|0;a.regv[a.reg_vcx]=g;a.timestamp_counter+=k-g}}else a.io.port_write32(c,a.safe_read32s(d)),a.regv[a.reg_vsi]+=e;f&&(a.instruction_pointer=a.previous_ip)}};table16[112]=table32[112]=function(a){a.test_o()&&(a.instruction_pointer=a.instruction_pointer+a.read_imm8s()|0);a.instruction_pointer++;a.last_instr_jump=!0}; +table16[113]=table32[113]=function(a){a.test_o()||(a.instruction_pointer=a.instruction_pointer+a.read_imm8s()|0);a.instruction_pointer++;a.last_instr_jump=!0};table16[114]=table32[114]=function(a){a.test_b()&&(a.instruction_pointer=a.instruction_pointer+a.read_imm8s()|0);a.instruction_pointer++;a.last_instr_jump=!0};table16[115]=table32[115]=function(a){a.test_b()||(a.instruction_pointer=a.instruction_pointer+a.read_imm8s()|0);a.instruction_pointer++;a.last_instr_jump=!0}; +table16[116]=table32[116]=function(a){a.test_z()&&(a.instruction_pointer=a.instruction_pointer+a.read_imm8s()|0);a.instruction_pointer++;a.last_instr_jump=!0};table16[117]=table32[117]=function(a){a.test_z()||(a.instruction_pointer=a.instruction_pointer+a.read_imm8s()|0);a.instruction_pointer++;a.last_instr_jump=!0};table16[118]=table32[118]=function(a){a.test_be()&&(a.instruction_pointer=a.instruction_pointer+a.read_imm8s()|0);a.instruction_pointer++;a.last_instr_jump=!0}; +table16[119]=table32[119]=function(a){a.test_be()||(a.instruction_pointer=a.instruction_pointer+a.read_imm8s()|0);a.instruction_pointer++;a.last_instr_jump=!0};table16[120]=table32[120]=function(a){a.test_s()&&(a.instruction_pointer=a.instruction_pointer+a.read_imm8s()|0);a.instruction_pointer++;a.last_instr_jump=!0};table16[121]=table32[121]=function(a){a.test_s()||(a.instruction_pointer=a.instruction_pointer+a.read_imm8s()|0);a.instruction_pointer++;a.last_instr_jump=!0}; +table16[122]=table32[122]=function(a){a.test_p()&&(a.instruction_pointer=a.instruction_pointer+a.read_imm8s()|0);a.instruction_pointer++;a.last_instr_jump=!0};table16[123]=table32[123]=function(a){a.test_p()||(a.instruction_pointer=a.instruction_pointer+a.read_imm8s()|0);a.instruction_pointer++;a.last_instr_jump=!0};table16[124]=table32[124]=function(a){a.test_l()&&(a.instruction_pointer=a.instruction_pointer+a.read_imm8s()|0);a.instruction_pointer++;a.last_instr_jump=!0}; +table16[125]=table32[125]=function(a){a.test_l()||(a.instruction_pointer=a.instruction_pointer+a.read_imm8s()|0);a.instruction_pointer++;a.last_instr_jump=!0};table16[126]=table32[126]=function(a){a.test_le()&&(a.instruction_pointer=a.instruction_pointer+a.read_imm8s()|0);a.instruction_pointer++;a.last_instr_jump=!0};table16[127]=table32[127]=function(a){a.test_le()||(a.instruction_pointer=a.instruction_pointer+a.read_imm8s()|0);a.instruction_pointer++;a.last_instr_jump=!0}; +table16[128]=table32[128]=function(a){var c=a.read_imm8();if(56===(c&56)){var d=192>c?a.safe_read8(a.modrm_resolve(c)):a.reg8[c<<2&12|c>>2&1];a.sub(d,a.read_imm8(),7)}else{var e,f,g;192>c?(f=a.translate_address_write(a.modrm_resolve(c)),d=a.memory.read8(f)):d=a.reg8[c<<2&12|c>>2&1];g=0;e=a.read_imm8();switch(c>>3&7){case 0:g=a.add(d,e,7);break;case 1:g=a.or(d,e,7);break;case 2:g=a.adc(d,e,7);break;case 3:g=a.sbb(d,e,7);break;case 4:g=a.and(d,e,7);break;case 5:g=a.sub(d,e,7);break;case 6:g=a.xor(d, +e,7);break;case 7:g=dbg_assert.bind(this,0)(d,e)}192>c?a.memory.write8(f,g):a.reg8[c<<2&12|c>>2&1]=g}}; +table16[129]=function(a){var c=a.read_imm8();if(56===(c&56)){var d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.sub(d,a.read_imm16(),15)}else{var e,f,g=0,k;192>c?(d=a.modrm_resolve(c),f=a.translate_address_write(d),a.paging&&4095===(d&4095)?(g=a.translate_address_write(d+1),d=a.virt_boundary_read16(f,g)):d=a.memory.read16(f)):d=a.reg16[c<<1&14];k=0;e=a.read_imm16();switch(c>>3&7){case 0:k=a.add(d,e,15);break;case 1:k=a.or(d,e,15);break;case 2:k=a.adc(d,e,15);break;case 3:k=a.sbb(d,e, +15);break;case 4:k=a.and(d,e,15);break;case 5:k=a.sub(d,e,15);break;case 6:k=a.xor(d,e,15);break;case 7:k=dbg_assert.bind(this,0)(d,e)}192>c?g?a.virt_boundary_write16(f,g,k):a.memory.write16(f,k):a.reg16[c<<1&14]=k}}; +table32[129]=function(a){var c=a.read_imm8();if(56===(c&56)){var d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.sub(d,a.read_imm32s(),31)}else{var e,f,g=0,k;192>c?(d=a.modrm_resolve(c),f=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(g=a.translate_address_write(d+3),d=a.virt_boundary_read32s(f,g)):d=a.memory.read32s(f)):d=a.reg32s[c&7];k=0;e=a.read_imm32s();switch(c>>3&7){case 0:k=a.add(d,e,31);break;case 1:k=a.or(d,e,31);break;case 2:k=a.adc(d,e,31);break;case 3:k=a.sbb(d,e,31); +break;case 4:k=a.and(d,e,31);break;case 5:k=a.sub(d,e,31);break;case 6:k=a.xor(d,e,31);break;case 7:k=dbg_assert.bind(this,0)(d,e)}192>c?g?a.virt_boundary_write32(f,g,k):a.memory.write32(f,k):a.reg32s[c&7]=k}};table16[130]=table32[130]=function(a){a.table[128](a)}; +table16[131]=function(a){var c=a.read_imm8();if(56===(c&56)){var d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.sub(d,a.read_imm8s(),15)}else{var e,f,g=0,k;192>c?(d=a.modrm_resolve(c),f=a.translate_address_write(d),a.paging&&4095===(d&4095)?(g=a.translate_address_write(d+1),d=a.virt_boundary_read16(f,g)):d=a.memory.read16(f)):d=a.reg16[c<<1&14];k=0;e=a.read_imm8s();switch(c>>3&7){case 0:k=a.add(d,e,15);break;case 1:k=a.or(d,e,15);break;case 2:k=a.adc(d,e,15);break;case 3:k=a.sbb(d,e, +15);break;case 4:k=a.and(d,e,15);break;case 5:k=a.sub(d,e,15);break;case 6:k=a.xor(d,e,15);break;case 7:k=dbg_assert.bind(this,0)(d,e)}192>c?g?a.virt_boundary_write16(f,g,k):a.memory.write16(f,k):a.reg16[c<<1&14]=k}}; +table32[131]=function(a){var c=a.read_imm8();if(56===(c&56)){var d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.sub(d,a.read_imm8s(),31)}else{var e,f,g=0,k;192>c?(d=a.modrm_resolve(c),f=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(g=a.translate_address_write(d+3),d=a.virt_boundary_read32s(f,g)):d=a.memory.read32s(f)):d=a.reg32s[c&7];k=0;e=a.read_imm8s();switch(c>>3&7){case 0:k=a.add(d,e,31);break;case 1:k=a.or(d,e,31);break;case 2:k=a.adc(d,e,31);break;case 3:k=a.sbb(d,e,31); +break;case 4:k=a.and(d,e,31);break;case 5:k=a.sub(d,e,31);break;case 6:k=a.xor(d,e,31);break;case 7:k=dbg_assert.bind(this,0)(d,e)}192>c?g?a.virt_boundary_write32(f,g,k):a.memory.write32(f,k):a.reg32s[c&7]=k}};table16[132]=table32[132]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read8(a.modrm_resolve(c)):a.reg8[c<<2&12|c>>2&1];a.and(d,a.reg8[c>>1&12|c>>5&1],7)};table16[133]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.and(d,a.reg16[c>>2&14],15)}; +table32[133]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.and(d,a.reg32s[c>>3&7],31)};table16[134]=table32[134]=function(a){var c=a.read_imm8(),d,e;192>c?(e=a.translate_address_write(a.modrm_resolve(c)),d=a.memory.read8(e)):d=a.reg8[c<<2&12|c>>2&1];d=a.xchg8(d,c);192>c?a.memory.write8(e,d):a.reg8[c<<2&12|c>>2&1]=d}; +table16[135]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4095===(d&4095)?(f=a.translate_address_write(d+1),d=a.virt_boundary_read16(e,f)):d=a.memory.read16(e)):d=a.reg16[c<<1&14];d=a.xchg16(d,c);192>c?f?a.virt_boundary_write16(e,f,d):a.memory.write16(e,d):a.reg16[c<<1&14]=d}; +table32[135]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(f=a.translate_address_write(d+3),d=a.virt_boundary_read32s(e,f)):d=a.memory.read32s(e)):d=a.reg32s[c&7];d=a.xchg32(d,c);192>c?f?a.virt_boundary_write32(e,f,d):a.memory.write32(e,d):a.reg32s[c&7]=d}; +table16[136]=table32[136]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=a.reg8[c>>1&12|c>>5&1];192>c?a.safe_write8(d,e):a.reg8[c<<2&12|c>>2&1]=e};table16[137]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=a.reg16[c>>2&14];192>c?a.safe_write16(d,e):a.reg16[c<<1&14]=e};table32[137]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=a.reg32s[c>>3&7];192>c?a.safe_write32(d,e):a.reg32[c&7]=e}; +table16[138]=table32[138]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read8(a.modrm_resolve(c)):a.reg8[c<<2&12|c>>2&1];a.reg8[c>>1&12|c>>5&1]=d};table16[139]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.reg16[c>>2&14]=d};table32[139]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.reg32s[c>>3&7]=d}; +table16[140]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=a.sreg[c>>3&7];192>c?a.safe_write16(d,e):a.reg16[c<<1&14]=e};table32[140]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=a.sreg[c>>3&7];192>c?a.safe_write32(d,e):a.reg32[c&7]=e};table16[141]=function(a){var c=a.read_imm8();192<=c&&a.trigger_ud();a.segment_prefix=9;a.reg16[(c>>3&7)<<1]=a.modrm_resolve(c);a.segment_prefix=-1}; +table32[141]=function(a){var c=a.read_imm8();192<=c&&a.trigger_ud();a.segment_prefix=9;a.reg32s[c>>3&7]=a.modrm_resolve(c);a.segment_prefix=-1};table16[142]=table32[142]=function(a){var c=a.read_imm8(),d=c>>3&7,c=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.switch_seg(d,c)}; +table16[143]=function(a){var c=a.read_imm8(),d=a.safe_read16(a.get_stack_pointer(0));a.stack_reg[a.reg_vsp]+=2;192>c?(c=a.modrm_resolve(c),a.stack_reg[a.reg_vsp]-=2,a.safe_write16(c,d),a.stack_reg[a.reg_vsp]+=2):a.reg16[c<<1&14]=d};table32[143]=function(a){var c=a.read_imm8(),d=a.safe_read32s(a.get_stack_pointer(0));a.stack_reg[a.reg_vsp]+=4;192>c?(c=a.modrm_resolve(c),a.stack_reg[a.reg_vsp]-=4,a.safe_write32(c,d),a.stack_reg[a.reg_vsp]+=4):a.reg32s[c&7]=d};table16[144]=table32[144]=function(){}; +table16[145]=function(a){a.xchg16r(2)};table32[145]=function(a){a.xchg32r(1)};table16[146]=function(a){a.xchg16r(4)};table32[146]=function(a){a.xchg32r(2)};table16[147]=function(a){a.xchg16r(6)};table32[147]=function(a){a.xchg32r(3)};table16[148]=function(a){a.xchg16r(8)};table32[148]=function(a){a.xchg32r(4)};table16[149]=function(a){a.xchg16r(10)};table32[149]=function(a){a.xchg32r(5)};table16[150]=function(a){a.xchg16r(12)};table32[150]=function(a){a.xchg32r(6)};table16[151]=function(a){a.xchg16r(14)}; +table32[151]=function(a){a.xchg32r(7)};table16[152]=function(a){a.reg16[0]=a.reg8s[0]};table32[152]=function(a){a.reg32s[0]=a.reg16s[0]};table16[153]=function(a){a.reg16[4]=a.reg16s[0]>>15};table32[153]=function(a){a.reg32s[2]=a.reg32s[0]>>31};table16[154]=function(a){var c=a.read_imm16(),d=a.read_imm16();a.writable_or_pagefault(a.get_stack_pointer(-4),4);a.push16(a.sreg[1]);a.push16(a.get_real_eip());a.switch_seg(1,d);a.instruction_pointer=a.get_seg(1)+c|0;a.last_instr_jump=!0}; +table32[154]=function(a){var c=a.read_imm32s(),d=a.read_imm16();a.writable_or_pagefault(a.get_stack_pointer(-8),8);a.push32(a.sreg[1]);a.push32(a.get_real_eip());a.switch_seg(1,d);a.instruction_pointer=a.get_seg(1)+c|0;a.last_instr_jump=!0};table16[155]=table32[155]=function(a){10===(a.cr0&10)&&a.trigger_nm()};table16[156]=function(a){a.flags&131072&&3>a.getiopl()?a.trigger_gp(0):(a.load_eflags(),a.push16(a.flags))}; +table32[156]=function(a){a.flags&131072&&3>a.getiopl()?a.trigger_gp(0):(a.load_eflags(),a.push32(a.flags&-196609))};table16[157]=function(a){a.flags&131072&&3>a.getiopl()&&a.trigger_gp(0);a.update_eflags(a.flags&-65536|a.pop16());a.handle_irqs()};table32[157]=function(a){a.flags&131072&&3>a.getiopl()&&a.trigger_gp(0);a.update_eflags(a.pop32s());a.handle_irqs()};table16[158]=table32[158]=function(a){a.flags=a.flags&-256|a.reg8[1];a.flags=a.flags&4161493|2;a.flags_changed=0}; +table16[159]=table32[159]=function(a){a.load_eflags();a.reg8[1]=a.flags};table16[160]=table32[160]=function(a){var c=a.safe_read8(a.read_moffs());a.reg8[0]=c};table16[161]=function(a){var c=a.safe_read16(a.read_moffs());a.reg16[0]=c};table32[161]=function(a){var c=a.safe_read32s(a.read_moffs());a.reg32s[0]=c};table16[162]=table32[162]=function(a){a.safe_write8(a.read_moffs(),a.reg8[0])};table16[163]=function(a){a.safe_write16(a.read_moffs(),a.reg16[0])}; +table32[163]=function(a){a.safe_write32(a.read_moffs(),a.reg32s[0])}; +table16[164]=table32[164]=function(a){a:{var c,d,e=a.flags&1024?-1:1,f=!1;d=a.get_seg(0)+a.regv[a.reg_vdi]|0;c=a.get_seg_prefix(3)+a.regv[a.reg_vsi]|0;if(0!==a.repeat_string_prefix){var g=a.regv[a.reg_vcx]>>>0,k=g;if(0===g)break a;var m=16384,l=e>>31|1;a.paging&&(m=(l>>1^~c)&4095,c=a.translate_address_read(c),m=Math.min(m,(l>>1^~d)&4095),d=a.translate_address_write(d));do a.memory.write8(d,a.memory.read8(c)),d+=l,c+=l,f=0!==--g&&!0;while(f&&m--);e=e*(k-g)|0;a.regv[a.reg_vdi]+=e;a.regv[a.reg_vsi]+= +e;a.regv[a.reg_vcx]=g;a.timestamp_counter+=k-g}else c=a.translate_address_read(c),d=a.translate_address_write(d),a.memory.write8(d,a.memory.read8(c)),a.regv[a.reg_vdi]+=e,a.regv[a.reg_vsi]+=e;f&&(a.instruction_pointer=a.previous_ip)}}; +table16[165]=function(a){a:{var c,d,e=a.flags&1024?-2:2,f=!1;d=a.get_seg(0)+a.regv[a.reg_vdi]|0;c=a.get_seg_prefix(3)+a.regv[a.reg_vsi]|0;if(0!==a.repeat_string_prefix){var g=a.regv[a.reg_vcx]>>>0,k=g;if(0===g)break a;var m=16384;if(d&1||c&1){do a.safe_write16(d,a.safe_read16(c)),d+=e,a.regv[a.reg_vdi]+=e,c+=e,a.regv[a.reg_vsi]+=e,f=0!==--a.regv[a.reg_vcx]&&!0;while(f&&m--)}else{var l=e>>31|1;a.paging&&(m=(l>>1^~c)&4095,c=a.translate_address_read(c),m=Math.min(m,(l>>1^~d)&4095),d=a.translate_address_write(d), +m>>=1);d>>>=1;c>>>=1;do a.memory.write_aligned16(d,a.memory.read_aligned16(c)),d+=l,c+=l,f=0!==--g&&!0;while(f&&m--);e=e*(k-g)|0;a.regv[a.reg_vdi]+=e;a.regv[a.reg_vsi]+=e;a.regv[a.reg_vcx]=g;a.timestamp_counter+=k-g}}else a.safe_write16(d,a.safe_read16(c)),a.regv[a.reg_vdi]+=e,a.regv[a.reg_vsi]+=e;f&&(a.instruction_pointer=a.previous_ip)}}; +table32[165]=function(a){a:{if(0!==a.repeat_string_prefix){var c=a.get_seg_prefix(3)+a.regv[a.reg_vsi],d=a.get_seg(0)+a.regv[a.reg_vdi],e=a.regv[a.reg_vcx]>>>0;if(!e)break a;var f=a.paging?4095:3;if(0===(d&f)&&0===(c&f)&&0===(a.flags&1024)&&(f=!1,a.paging&&(c=a.translate_address_read(c),d=a.translate_address_write(d),1024>=2;a.memory.mem32s.set(a.memory.mem32s.subarray(c, +c+e),d>>2);f&&(a.instruction_pointer=a.previous_ip);break a}}g=a.flags&1024?-4:4;f=!1;d=a.get_seg(0)+a.regv[a.reg_vdi]|0;c=a.get_seg_prefix(3)+a.regv[a.reg_vsi]|0;if(0!==a.repeat_string_prefix){var k=e=a.regv[a.reg_vcx]>>>0;if(0===e)break a;var m=16384;if(d&3||c&3){do a.safe_write32(d,a.safe_read32s(c)),d+=g,a.regv[a.reg_vdi]+=g,c+=g,a.regv[a.reg_vsi]+=g,f=0!==--a.regv[a.reg_vcx]&&!0;while(f&&m--)}else{var l=g>>31|1;a.paging&&(m=(l>>1^~c)&4095,c=a.translate_address_read(c),m=Math.min(m,(l>>1^~d)& +4095),d=a.translate_address_write(d),m>>=2);d>>>=2;c>>>=2;do a.memory.write_aligned32(d,a.memory.read_aligned32(c)),d+=l,c+=l,f=0!==--e&&!0;while(f&&m--);g=g*(k-e)|0;a.regv[a.reg_vdi]+=g;a.regv[a.reg_vsi]+=g;a.regv[a.reg_vcx]=e;a.timestamp_counter+=k-e}}else a.safe_write32(d,a.safe_read32s(c)),a.regv[a.reg_vdi]+=g,a.regv[a.reg_vsi]+=g;f&&(a.instruction_pointer=a.previous_ip)}}; +table16[166]=table32[166]=function(a){a:{var c,d;d=0;var e,f,g=a.flags&1024?-1:1,k=!1;d=a.get_seg(0)+a.regv[a.reg_vdi]|0;c=a.get_seg_prefix(3)+a.regv[a.reg_vsi]|0;if(0!==a.repeat_string_prefix){var m=a.regv[a.reg_vcx]>>>0,l=m;if(0===m)break a;var n=16384,p=g>>31|1;a.paging?(n=(p>>1^~c)&4095,f=a.translate_address_read(c),n=Math.min(n,(p>>1^~d)&4095),e=a.translate_address_read(d)):(e=d,f=c);do d=a.memory.read8(e),c=a.memory.read8(f),e+=p,f+=p,k=0!==--m&&c===d===(2===a.repeat_string_prefix);while(k&& +n--);g=g*(l-m)|0;a.regv[a.reg_vdi]+=g;a.regv[a.reg_vsi]+=g;a.regv[a.reg_vcx]=m;a.timestamp_counter+=l-m}else f=a.translate_address_read(c),e=a.translate_address_read(d),d=a.memory.read8(e),c=a.memory.read8(f),a.regv[a.reg_vdi]+=g,a.regv[a.reg_vsi]+=g;a.sub(c,d,7);k&&(a.instruction_pointer=a.previous_ip)}}; +table16[167]=function(a){a:{var c,d,e,f=0,g=a.flags&1024?-2:2,k=!1;d=a.get_seg(0)+a.regv[a.reg_vdi]|0;c=a.get_seg_prefix(3)+a.regv[a.reg_vsi]|0;if(0!==a.repeat_string_prefix){var m=a.regv[a.reg_vcx]>>>0,l=m;if(0===m)break a;var n=16384;if(d&1||c&1){do f=a.safe_read16(d),e=a.safe_read16(c),d+=g,a.regv[a.reg_vdi]+=g,c+=g,a.regv[a.reg_vsi]+=g,k=0!==--a.regv[a.reg_vcx]&&e===f===(2===a.repeat_string_prefix);while(k&&n--)}else{var p=g>>31|1;a.paging&&(n=(p>>1^~c)&4095,c=a.translate_address_read(c),n=Math.min(n, +(p>>1^~d)&4095),d=a.translate_address_read(d),n>>=1);d>>>=1;c>>>=1;do f=a.memory.read_aligned16(d),e=a.memory.read_aligned16(c),d+=p,c+=p,k=0!==--m&&e===f===(2===a.repeat_string_prefix);while(k&&n--);g=g*(l-m)|0;a.regv[a.reg_vdi]+=g;a.regv[a.reg_vsi]+=g;a.regv[a.reg_vcx]=m;a.timestamp_counter+=l-m}}else f=a.safe_read16(d),e=a.safe_read16(c),a.regv[a.reg_vdi]+=g,a.regv[a.reg_vsi]+=g;a.sub(e,f,15);k&&(a.instruction_pointer=a.previous_ip)}}; +table32[167]=function(a){a:{var c,d,e,f=0,g=a.flags&1024?-4:4,k=!1;d=a.get_seg(0)+a.regv[a.reg_vdi]|0;c=a.get_seg_prefix(3)+a.regv[a.reg_vsi]|0;if(0!==a.repeat_string_prefix){var m=a.regv[a.reg_vcx]>>>0,l=m;if(0===m)break a;var n=16384;if(d&3||c&3){do f=a.safe_read32s(d),e=a.safe_read32s(c),d+=g,a.regv[a.reg_vdi]+=g,c+=g,a.regv[a.reg_vsi]+=g,k=0!==--a.regv[a.reg_vcx]&&e===f===(2===a.repeat_string_prefix);while(k&&n--)}else{var p=g>>31|1;a.paging&&(n=(p>>1^~c)&4095,c=a.translate_address_read(c),n= +Math.min(n,(p>>1^~d)&4095),d=a.translate_address_read(d),n>>=2);d>>>=2;c>>>=2;do f=a.memory.read_aligned32(d),e=a.memory.read_aligned32(c),d+=p,c+=p,k=0!==--m&&e===f===(2===a.repeat_string_prefix);while(k&&n--);g=g*(l-m)|0;a.regv[a.reg_vdi]+=g;a.regv[a.reg_vsi]+=g;a.regv[a.reg_vcx]=m;a.timestamp_counter+=l-m}}else f=a.safe_read32s(d),e=a.safe_read32s(c),a.regv[a.reg_vdi]+=g,a.regv[a.reg_vsi]+=g;a.sub(e,f,31);k&&(a.instruction_pointer=a.previous_ip)}}; +table16[168]=table32[168]=function(a){a.and(a.reg8[0],a.read_imm8(),7)};table16[169]=function(a){a.and(a.reg16[0],a.read_imm16(),15)};table32[169]=function(a){a.and(a.reg32s[0],a.read_imm32s(),31)}; +table16[170]=table32[170]=function(a){a:{var c=a.reg8[0],d,e=a.flags&1024?-1:1,f=!1;d=a.get_seg(0)+a.regv[a.reg_vdi]|0;if(0!==a.repeat_string_prefix){var g=a.regv[a.reg_vcx]>>>0,k=g;if(0===g)break a;var m=16384,l=e>>31|1;a.paging&&(m=Math.min(m,(l>>1^~d)&4095),d=a.translate_address_write(d));do a.memory.write8(d,c),d+=l,f=0!==--g&&!0;while(f&&m--);a.regv[a.reg_vdi]+=e*(k-g)|0;a.regv[a.reg_vcx]=g;a.timestamp_counter+=k-g}else d=a.translate_address_write(d),a.memory.write8(d,c),a.regv[a.reg_vdi]+=e; +f&&(a.instruction_pointer=a.previous_ip)}}; +table16[171]=function(a){a:{var c=a.reg16[0],d,e=a.flags&1024?-2:2,f=!1;d=a.get_seg(0)+a.regv[a.reg_vdi]|0;if(0!==a.repeat_string_prefix){var g=a.regv[a.reg_vcx]>>>0,k=g;if(0===g)break a;var m=16384;if(d&1){do a.safe_write16(d,c),d+=e,a.regv[a.reg_vdi]+=e,f=0!==--a.regv[a.reg_vcx]&&!0;while(f&&m--)}else{var l=e>>31|1;a.paging&&(m=Math.min(m,(l>>1^~d)&4095),d=a.translate_address_write(d),m>>=1);d>>>=1;do a.memory.write_aligned16(d,c),d+=l,f=0!==--g&&!0;while(f&&m--);a.regv[a.reg_vdi]+=e*(k-g)|0;a.regv[a.reg_vcx]= +g;a.timestamp_counter+=k-g}}else a.safe_write16(d,c),a.regv[a.reg_vdi]+=e;f&&(a.instruction_pointer=a.previous_ip)}}; +table32[171]=function(a){a:{var c=a.reg32s[0],d,e=a.flags&1024?-4:4,f=!1;d=a.get_seg(0)+a.regv[a.reg_vdi]|0;if(0!==a.repeat_string_prefix){var g=a.regv[a.reg_vcx]>>>0,k=g;if(0===g)break a;var m=16384;if(d&3){do a.safe_write32(d,c),d+=e,a.regv[a.reg_vdi]+=e,f=0!==--a.regv[a.reg_vcx]&&!0;while(f&&m--)}else{var l=e>>31|1;a.paging&&(m=Math.min(m,(l>>1^~d)&4095),d=a.translate_address_write(d),m>>=2);d>>>=2;do a.memory.write_aligned32(d,c),d+=l,f=0!==--g&&!0;while(f&&m--);a.regv[a.reg_vdi]+=e*(k-g)|0;a.regv[a.reg_vcx]= +g;a.timestamp_counter+=k-g}}else a.safe_write32(d,c),a.regv[a.reg_vdi]+=e;f&&(a.instruction_pointer=a.previous_ip)}}; +table16[172]=table32[172]=function(a){a:{var c,d=a.flags&1024?-1:1,e=!1;c=a.get_seg_prefix(3)+a.regv[a.reg_vsi]|0;if(0!==a.repeat_string_prefix){var f=a.regv[a.reg_vcx]>>>0,g=f;if(0===f)break a;var k=16384,m=d>>31|1;a.paging&&(k=(m>>1^~c)&4095,c=a.translate_address_read(c));do a.reg8[0]=a.memory.read8(c),c+=m,e=0!==--f&&!0;while(e&&k--);a.regv[a.reg_vsi]+=d*(g-f)|0;a.regv[a.reg_vcx]=f;a.timestamp_counter+=g-f}else c=a.translate_address_read(c),a.reg8[0]=a.memory.read8(c),a.regv[a.reg_vsi]+=d;e&&(a.instruction_pointer= +a.previous_ip)}}; +table16[173]=function(a){a:{var c,d=a.flags&1024?-2:2,e=!1;c=a.get_seg_prefix(3)+a.regv[a.reg_vsi]|0;if(0!==a.repeat_string_prefix){var f=a.regv[a.reg_vcx]>>>0,g=f;if(0===f)break a;var k=16384;if(c&1){do a.reg16[0]=a.safe_read16(c),c+=d,a.regv[a.reg_vsi]+=d,e=0!==--a.regv[a.reg_vcx]&&!0;while(e&&k--)}else{var m=d>>31|1;a.paging&&(k=(m>>1^~c)&4095,c=a.translate_address_read(c),k>>=1);c>>>=1;do a.reg16[0]=a.memory.read_aligned16(c),c+=m,e=0!==--f&&!0;while(e&&k--);a.regv[a.reg_vsi]+=d*(g-f)|0;a.regv[a.reg_vcx]= +f;a.timestamp_counter+=g-f}}else a.reg16[0]=a.safe_read16(c),a.regv[a.reg_vsi]+=d;e&&(a.instruction_pointer=a.previous_ip)}}; +table32[173]=function(a){a:{var c,d=a.flags&1024?-4:4,e=!1;c=a.get_seg_prefix(3)+a.regv[a.reg_vsi]|0;if(0!==a.repeat_string_prefix){var f=a.regv[a.reg_vcx]>>>0,g=f;if(0===f)break a;var k=16384;if(c&3){do a.reg32s[0]=a.safe_read32s(c),c+=d,a.regv[a.reg_vsi]+=d,e=0!==--a.regv[a.reg_vcx]&&!0;while(e&&k--)}else{var m=d>>31|1;a.paging&&(k=(m>>1^~c)&4095,c=a.translate_address_read(c),k>>=2);c>>>=2;do a.reg32s[0]=a.memory.read_aligned32(c),c+=m,e=0!==--f&&!0;while(e&&k--);a.regv[a.reg_vsi]+=d*(g-f)|0;a.regv[a.reg_vcx]= +f;a.timestamp_counter+=g-f}}else a.reg32s[0]=a.safe_read32s(c),a.regv[a.reg_vsi]+=d;e&&(a.instruction_pointer=a.previous_ip)}}; +table16[174]=table32[174]=function(a){a:{var c,d;c=0;var e,f=a.flags&1024?-1:1,g=!1;d=a.reg8[0];c=a.get_seg(0)+a.regv[a.reg_vdi]|0;if(0!==a.repeat_string_prefix){var k=a.regv[a.reg_vcx]>>>0,m=k;if(0===k)break a;var l=16384,n=f>>31|1;a.paging?(l=Math.min(l,(n>>1^~c)&4095),e=a.translate_address_read(c)):e=c;do c=a.memory.read8(e),e+=n,g=0!==--k&&d===c===(2===a.repeat_string_prefix);while(g&&l--);a.regv[a.reg_vdi]+=f*(m-k)|0;a.regv[a.reg_vcx]=k;a.timestamp_counter+=m-k}else e=a.translate_address_read(c), +c=a.memory.read8(e),a.regv[a.reg_vdi]+=f;a.sub(d,c,7);g&&(a.instruction_pointer=a.previous_ip)}}; +table16[175]=function(a){a:{var c,d,e=0,f=a.flags&1024?-2:2,g=!1;d=a.reg16[0];c=a.get_seg(0)+a.regv[a.reg_vdi]|0;if(0!==a.repeat_string_prefix){var k=a.regv[a.reg_vcx]>>>0,m=k;if(0===k)break a;var l=16384;if(c&1){do e=a.safe_read16(c),c+=f,a.regv[a.reg_vdi]+=f,g=0!==--a.regv[a.reg_vcx]&&d===e===(2===a.repeat_string_prefix);while(g&&l--)}else{var n=f>>31|1;a.paging&&(l=Math.min(l,(n>>1^~c)&4095),c=a.translate_address_read(c),l>>=1);c>>>=1;do e=a.memory.read_aligned16(c),c+=n,g=0!==--k&&d===e===(2=== +a.repeat_string_prefix);while(g&&l--);a.regv[a.reg_vdi]+=f*(m-k)|0;a.regv[a.reg_vcx]=k;a.timestamp_counter+=m-k}}else e=a.safe_read16(c),a.regv[a.reg_vdi]+=f;a.sub(d,e,15);g&&(a.instruction_pointer=a.previous_ip)}}; +table32[175]=function(a){a:{var c,d,e=0,f=a.flags&1024?-4:4,g=!1;d=a.reg32s[0];c=a.get_seg(0)+a.regv[a.reg_vdi]|0;if(0!==a.repeat_string_prefix){var k=a.regv[a.reg_vcx]>>>0,m=k;if(0===k)break a;var l=16384;if(c&3){do e=a.safe_read32s(c),c+=f,a.regv[a.reg_vdi]+=f,g=0!==--a.regv[a.reg_vcx]&&d===e===(2===a.repeat_string_prefix);while(g&&l--)}else{var n=f>>31|1;a.paging&&(l=Math.min(l,(n>>1^~c)&4095),c=a.translate_address_read(c),l>>=2);c>>>=2;do e=a.memory.read_aligned32(c),c+=n,g=0!==--k&&d===e===(2=== +a.repeat_string_prefix);while(g&&l--);a.regv[a.reg_vdi]+=f*(m-k)|0;a.regv[a.reg_vcx]=k;a.timestamp_counter+=m-k}}else e=a.safe_read32s(c),a.regv[a.reg_vdi]+=f;a.sub(d,e,31);g&&(a.instruction_pointer=a.previous_ip)}};table16[176]=table32[176]=function(a){a.reg8[0]=a.read_imm8()};table16[177]=table32[177]=function(a){a.reg8[4]=a.read_imm8()};table16[178]=table32[178]=function(a){a.reg8[8]=a.read_imm8()};table16[179]=table32[179]=function(a){a.reg8[12]=a.read_imm8()}; +table16[180]=table32[180]=function(a){a.reg8[1]=a.read_imm8()};table16[181]=table32[181]=function(a){a.reg8[5]=a.read_imm8()};table16[182]=table32[182]=function(a){a.reg8[9]=a.read_imm8()};table16[183]=table32[183]=function(a){a.reg8[13]=a.read_imm8()};table16[184]=function(a){a.reg16[0]=a.read_imm16()};table32[184]=function(a){a.reg32s[0]=a.read_imm32s()};table16[185]=function(a){a.reg16[2]=a.read_imm16()};table32[185]=function(a){a.reg32s[1]=a.read_imm32s()}; +table16[186]=function(a){a.reg16[4]=a.read_imm16()};table32[186]=function(a){a.reg32s[2]=a.read_imm32s()};table16[187]=function(a){a.reg16[6]=a.read_imm16()};table32[187]=function(a){a.reg32s[3]=a.read_imm32s()};table16[188]=function(a){a.reg16[8]=a.read_imm16()};table32[188]=function(a){a.reg32s[4]=a.read_imm32s()};table16[189]=function(a){a.reg16[10]=a.read_imm16()};table32[189]=function(a){a.reg32s[5]=a.read_imm32s()};table16[190]=function(a){a.reg16[12]=a.read_imm16()}; +table32[190]=function(a){a.reg32s[6]=a.read_imm32s()};table16[191]=function(a){a.reg16[14]=a.read_imm16()};table32[191]=function(a){a.reg32s[7]=a.read_imm32s()}; +table16[192]=table32[192]=function(a){var c=a.read_imm8(),d,e,f,g;192>c?(f=a.translate_address_write(a.modrm_resolve(c)),e=a.memory.read8(f)):e=a.reg8[c<<2&12|c>>2&1];g=0;d=a.read_imm8()&31;switch(c>>3&7){case 0:g=a.rol8(e,d);break;case 1:g=a.ror8(e,d);break;case 2:g=a.rcl8(e,d);break;case 3:g=a.rcr8(e,d);break;case 4:g=a.shl8(e,d);break;case 5:g=a.shr8(e,d);break;case 6:g=a.shl8(e,d);break;case 7:g=a.sar8(e,d)}192>c?a.memory.write8(f,g):a.reg8[c<<2&12|c>>2&1]=g}; +table16[193]=function(a){var c=a.read_imm8(),d,e,f,g=0,k;192>c?(d=a.modrm_resolve(c),f=a.translate_address_write(d),a.paging&&4095===(d&4095)?(g=a.translate_address_write(d+1),e=a.virt_boundary_read16(f,g)):e=a.memory.read16(f)):e=a.reg16[c<<1&14];k=0;d=a.read_imm8()&31;switch(c>>3&7){case 0:k=a.rol16(e,d);break;case 1:k=a.ror16(e,d);break;case 2:k=a.rcl16(e,d);break;case 3:k=a.rcr16(e,d);break;case 4:k=a.shl16(e,d);break;case 5:k=a.shr16(e,d);break;case 6:k=a.shl16(e,d);break;case 7:k=a.sar16(e, +d)}192>c?g?a.virt_boundary_write16(f,g,k):a.memory.write16(f,k):a.reg16[c<<1&14]=k}; +table32[193]=function(a){var c=a.read_imm8(),d,e,f,g=0,k;192>c?(d=a.modrm_resolve(c),f=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(g=a.translate_address_write(d+3),e=a.virt_boundary_read32s(f,g)):e=a.memory.read32s(f)):e=a.reg32s[c&7];k=0;d=a.read_imm8()&31;switch(c>>3&7){case 0:k=a.rol32(e,d);break;case 1:k=a.ror32(e,d);break;case 2:k=a.rcl32(e,d);break;case 3:k=a.rcr32(e,d);break;case 4:k=a.shl32(e,d);break;case 5:k=a.shr32(e,d);break;case 6:k=a.shl32(e,d);break;case 7:k=a.sar32(e,d)}192> +c?g?a.virt_boundary_write32(f,g,k):a.memory.write32(f,k):a.reg32s[c&7]=k};table16[194]=function(a){var c=a.read_imm16();a.instruction_pointer=a.get_seg(1)+a.pop16()|0;a.stack_reg[a.reg_vsp]+=c;a.last_instr_jump=!0};table32[194]=function(a){var c=a.read_imm16();a.instruction_pointer=a.get_seg(1)+a.pop32s()|0;a.stack_reg[a.reg_vsp]+=c;a.last_instr_jump=!0};table16[195]=function(a){a.instruction_pointer=a.get_seg(1)+a.pop16()|0;a.last_instr_jump=!0}; +table32[195]=function(a){a.instruction_pointer=a.get_seg(1)+a.pop32s()|0;a.last_instr_jump=!0};table16[196]=function(a){var c=a.read_imm8();192<=c&&a.trigger_ud();a.lss16(0,a.modrm_resolve(c),c>>2&14)};table32[196]=function(a){var c=a.read_imm8();192<=c&&a.trigger_ud();a.lss32(0,a.modrm_resolve(c),c>>3&7)};table16[197]=function(a){var c=a.read_imm8();192<=c&&a.trigger_ud();a.lss16(3,a.modrm_resolve(c),c>>2&14)}; +table32[197]=function(a){var c=a.read_imm8();192<=c&&a.trigger_ud();a.lss32(3,a.modrm_resolve(c),c>>3&7)};table16[198]=table32[198]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=a.read_imm8();192>c?a.safe_write8(d,e):a.reg8[c<<2&12|c>>2&1]=e};table16[199]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=a.read_imm16();192>c?a.safe_write16(d,e):a.reg16[c<<1&14]=e}; +table32[199]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=a.read_imm32s();192>c?a.safe_write32(d,e):a.reg32[c&7]=e};table16[200]=function(a){a.enter16()};table32[200]=function(a){a.enter32()};table16[201]=function(a){a.stack_reg[a.reg_vsp]=a.stack_reg[a.reg_vbp];a.reg16[10]=a.pop16()};table32[201]=function(a){a.stack_reg[a.reg_vsp]=a.stack_reg[a.reg_vbp];a.reg32s[5]=a.pop32s()}; +table16[202]=function(a){a.translate_address_read(a.get_seg(2)+a.stack_reg[a.reg_vsp]+4);var c=a.read_imm16(),d=a.pop16();a.switch_seg(1,a.pop16());a.instruction_pointer=a.get_seg(1)+d|0;a.stack_reg[a.reg_vsp]+=c;a.last_instr_jump=!0};table32[202]=function(a){a.translate_address_read(a.get_seg(2)+a.stack_reg[a.reg_vsp]+8);var c=a.read_imm16(),d=a.pop32s();a.switch_seg(1,a.pop32s()&65535);a.instruction_pointer=a.get_seg(1)+d|0;a.stack_reg[a.reg_vsp]+=c;a.last_instr_jump=!0}; +table16[203]=function(a){a.translate_address_read(a.get_seg(2)+a.stack_reg[a.reg_vsp]+4);var c=a.pop16();a.switch_seg(1,a.pop16());a.instruction_pointer=a.get_seg(1)+c|0;a.last_instr_jump=!0};table32[203]=function(a){a.translate_address_read(a.get_seg(2)+a.stack_reg[a.reg_vsp]+8);var c=a.pop32s();a.switch_seg(1,a.pop32s()&65535);a.instruction_pointer=a.get_seg(1)+c|0;a.last_instr_jump=!0};table16[204]=table32[204]=function(a){a.call_interrupt_vector(3,!0,!1)}; +table16[205]=table32[205]=function(a){var c=a.read_imm8();a.call_interrupt_vector(c,!0,!1)};table16[206]=table32[206]=function(a){a.getof()&&a.call_interrupt_vector(4,!0,!1)};table16[207]=function(a){a.iret16()};table32[207]=function(a){a.iret32()}; +table16[208]=table32[208]=function(a){var c=a.read_imm8(),d,e,f;192>c?(e=a.translate_address_write(a.modrm_resolve(c)),d=a.memory.read8(e)):d=a.reg8[c<<2&12|c>>2&1];f=0;switch(c>>3&7){case 0:f=a.rol8(d,1);break;case 1:f=a.ror8(d,1);break;case 2:f=a.rcl8(d,1);break;case 3:f=a.rcr8(d,1);break;case 4:f=a.shl8(d,1);break;case 5:f=a.shr8(d,1);break;case 6:f=a.shl8(d,1);break;case 7:f=a.sar8(d,1)}192>c?a.memory.write8(e,f):a.reg8[c<<2&12|c>>2&1]=f}; +table16[209]=function(a){var c=a.read_imm8(),d,e,f=0,g;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4095===(d&4095)?(f=a.translate_address_write(d+1),d=a.virt_boundary_read16(e,f)):d=a.memory.read16(e)):d=a.reg16[c<<1&14];g=0;switch(c>>3&7){case 0:g=a.rol16(d,1);break;case 1:g=a.ror16(d,1);break;case 2:g=a.rcl16(d,1);break;case 3:g=a.rcr16(d,1);break;case 4:g=a.shl16(d,1);break;case 5:g=a.shr16(d,1);break;case 6:g=a.shl16(d,1);break;case 7:g=a.sar16(d,1)}192>c?f?a.virt_boundary_write16(e, +f,g):a.memory.write16(e,g):a.reg16[c<<1&14]=g}; +table32[209]=function(a){var c=a.read_imm8(),d,e,f=0,g;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(f=a.translate_address_write(d+3),d=a.virt_boundary_read32s(e,f)):d=a.memory.read32s(e)):d=a.reg32s[c&7];g=0;switch(c>>3&7){case 0:g=a.rol32(d,1);break;case 1:g=a.ror32(d,1);break;case 2:g=a.rcl32(d,1);break;case 3:g=a.rcr32(d,1);break;case 4:g=a.shl32(d,1);break;case 5:g=a.shr32(d,1);break;case 6:g=a.shl32(d,1);break;case 7:g=a.sar32(d,1)}192>c?f?a.virt_boundary_write32(e, +f,g):a.memory.write32(e,g):a.reg32s[c&7]=g}; +table16[210]=table32[210]=function(a){var c=a.read_imm8(),d,e,f,g;192>c?(f=a.translate_address_write(a.modrm_resolve(c)),e=a.memory.read8(f)):e=a.reg8[c<<2&12|c>>2&1];g=0;d=a.reg8[4]&31;switch(c>>3&7){case 0:g=a.rol8(e,d);break;case 1:g=a.ror8(e,d);break;case 2:g=a.rcl8(e,d);break;case 3:g=a.rcr8(e,d);break;case 4:g=a.shl8(e,d);break;case 5:g=a.shr8(e,d);break;case 6:g=a.shl8(e,d);break;case 7:g=a.sar8(e,d)}192>c?a.memory.write8(f,g):a.reg8[c<<2&12|c>>2&1]=g}; +table16[211]=function(a){var c=a.read_imm8(),d,e,f,g=0,k;192>c?(d=a.modrm_resolve(c),f=a.translate_address_write(d),a.paging&&4095===(d&4095)?(g=a.translate_address_write(d+1),e=a.virt_boundary_read16(f,g)):e=a.memory.read16(f)):e=a.reg16[c<<1&14];k=0;d=a.reg8[4]&31;switch(c>>3&7){case 0:k=a.rol16(e,d);break;case 1:k=a.ror16(e,d);break;case 2:k=a.rcl16(e,d);break;case 3:k=a.rcr16(e,d);break;case 4:k=a.shl16(e,d);break;case 5:k=a.shr16(e,d);break;case 6:k=a.shl16(e,d);break;case 7:k=a.sar16(e,d)}192> +c?g?a.virt_boundary_write16(f,g,k):a.memory.write16(f,k):a.reg16[c<<1&14]=k}; +table32[211]=function(a){var c=a.read_imm8(),d,e,f,g=0,k;192>c?(d=a.modrm_resolve(c),f=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(g=a.translate_address_write(d+3),e=a.virt_boundary_read32s(f,g)):e=a.memory.read32s(f)):e=a.reg32s[c&7];k=0;d=a.reg8[4]&31;switch(c>>3&7){case 0:k=a.rol32(e,d);break;case 1:k=a.ror32(e,d);break;case 2:k=a.rcl32(e,d);break;case 3:k=a.rcr32(e,d);break;case 4:k=a.shl32(e,d);break;case 5:k=a.shr32(e,d);break;case 6:k=a.shl32(e,d);break;case 7:k=a.sar32(e,d)}192> +c?g?a.virt_boundary_write32(f,g,k):a.memory.write32(f,k):a.reg32s[c&7]=k};table16[212]=table32[212]=function(a){a.bcd_aam()};table16[213]=table32[213]=function(a){a.bcd_aad()};table16[214]=table32[214]=function(a){a.reg8[0]=-a.getcf()};table16[215]=table32[215]=function(a){a.reg8[0]=a.address_size_32?a.safe_read8(a.get_seg_prefix(3)+a.reg32s[3]+a.reg8[0]):a.safe_read8(a.get_seg_prefix(3)+a.reg16[6]+a.reg8[0])}; +table16[216]=table32[216]=function(a){var c=a.read_imm8();a.cr0&12&&a.trigger_nm();192>c?a.fpu.op_D8_mem(c,a.modrm_resolve(c)):a.fpu.op_D8_reg(c)};table16[217]=table32[217]=function(a){var c=a.read_imm8();a.cr0&12&&a.trigger_nm();192>c?a.fpu.op_D9_mem(c,a.modrm_resolve(c)):a.fpu.op_D9_reg(c)};table16[218]=table32[218]=function(a){var c=a.read_imm8();a.cr0&12&&a.trigger_nm();192>c?a.fpu.op_DA_mem(c,a.modrm_resolve(c)):a.fpu.op_DA_reg(c)}; +table16[219]=table32[219]=function(a){var c=a.read_imm8();a.cr0&12&&a.trigger_nm();192>c?a.fpu.op_DB_mem(c,a.modrm_resolve(c)):a.fpu.op_DB_reg(c)};table16[220]=table32[220]=function(a){var c=a.read_imm8();a.cr0&12&&a.trigger_nm();192>c?a.fpu.op_DC_mem(c,a.modrm_resolve(c)):a.fpu.op_DC_reg(c)};table16[221]=table32[221]=function(a){var c=a.read_imm8();a.cr0&12&&a.trigger_nm();192>c?a.fpu.op_DD_mem(c,a.modrm_resolve(c)):a.fpu.op_DD_reg(c)}; +table16[222]=table32[222]=function(a){var c=a.read_imm8();a.cr0&12&&a.trigger_nm();192>c?a.fpu.op_DE_mem(c,a.modrm_resolve(c)):a.fpu.op_DE_reg(c)};table16[223]=table32[223]=function(a){var c=a.read_imm8();a.cr0&12&&a.trigger_nm();192>c?a.fpu.op_DF_mem(c,a.modrm_resolve(c)):a.fpu.op_DF_reg(c)};table16[224]=table32[224]=function(a){a.loopne()};table16[225]=table32[225]=function(a){a.loope()};table16[226]=table32[226]=function(a){a.loop()};table16[227]=table32[227]=function(a){a.jcxz()}; +table16[228]=table32[228]=function(a){var c=a.read_imm8();a.test_privileges_for_io(c,1);a.reg8[0]=a.io.port_read8(c)};table16[229]=function(a){var c=a.read_imm8();a.test_privileges_for_io(c,2);a.reg16[0]=a.io.port_read16(c)};table32[229]=function(a){var c=a.read_imm8();a.test_privileges_for_io(c,4);a.reg32s[0]=a.io.port_read32(c)};table16[230]=table32[230]=function(a){var c=a.read_imm8();a.test_privileges_for_io(c,1);a.io.port_write8(c,a.reg8[0])}; +table16[231]=function(a){var c=a.read_imm8();a.test_privileges_for_io(c,2);a.io.port_write16(c,a.reg16[0])};table32[231]=function(a){var c=a.read_imm8();a.test_privileges_for_io(c,4);a.io.port_write32(c,a.reg32s[0])};table16[232]=function(a){var c=a.read_imm16s();a.push16(a.get_real_eip());a.jmp_rel16(c);a.last_instr_jump=!0};table32[232]=function(a){var c=a.read_imm32s();a.push32(a.get_real_eip());a.instruction_pointer=a.instruction_pointer+c|0;a.last_instr_jump=!0}; +table16[233]=function(a){var c=a.read_imm16s();a.jmp_rel16(c);a.last_instr_jump=!0};table32[233]=function(a){var c=a.read_imm32s();a.instruction_pointer=a.instruction_pointer+c|0;a.last_instr_jump=!0};table16[234]=function(a){var c=a.read_imm16();a.switch_seg(1,a.read_imm16());a.instruction_pointer=c+a.get_seg(1)|0;a.last_instr_jump=!0};table32[234]=function(a){var c=a.read_imm32s();a.switch_seg(1,a.read_imm16());a.instruction_pointer=c+a.get_seg(1)|0;a.last_instr_jump=!0}; +table16[235]=table32[235]=function(a){var c=a.read_imm8s();a.instruction_pointer=a.instruction_pointer+c|0;a.last_instr_jump=!0};table16[236]=table32[236]=function(a){var c=a.reg16[4];a.test_privileges_for_io(c,1);a.reg8[0]=a.io.port_read8(c)};table16[237]=function(a){var c=a.reg16[4];a.test_privileges_for_io(c,2);a.reg16[0]=a.io.port_read16(c)};table32[237]=function(a){var c=a.reg16[4];a.test_privileges_for_io(c,4);a.reg32s[0]=a.io.port_read32(c)}; +table16[238]=table32[238]=function(a){var c=a.reg16[4];a.test_privileges_for_io(c,1);a.io.port_write8(c,a.reg8[0])};table16[239]=function(a){var c=a.reg16[4];a.test_privileges_for_io(c,2);a.io.port_write16(c,a.reg16[0])};table32[239]=function(a){var c=a.reg16[4];a.test_privileges_for_io(c,4);a.io.port_write32(c,a.reg32s[0])};table16[240]=table32[240]=function(a){a.do_op()};table16[241]=table32[241]=function(a){throw a.debug.unimpl("int1 instruction");}; +table16[242]=table32[242]=function(a){a.repeat_string_prefix=1;a.do_op();a.repeat_string_prefix=0};table16[243]=table32[243]=function(a){a.repeat_string_prefix=2;a.do_op();a.repeat_string_prefix=0};table16[244]=table32[244]=function(a){a.hlt_op()};table16[245]=table32[245]=function(a){a.flags=(a.flags|1)^a.getcf();a.flags_changed&=-2}; +table16[246]=table32[246]=function(a){var c=a.read_imm8();switch(c>>3&7){case 0:var d=192>c?a.safe_read8(a.modrm_resolve(c)):a.reg8[c<<2&12|c>>2&1];a.and(d,a.read_imm8(),7);break;case 1:d=192>c?a.safe_read8(a.modrm_resolve(c)):a.reg8[c<<2&12|c>>2&1];a.and(d,a.read_imm8(),7);break;case 2:var e;192>c?(e=a.translate_address_write(a.modrm_resolve(c)),d=a.memory.read8(e)):d=a.reg8[c<<2&12|c>>2&1];d=~d;192>c?a.memory.write8(e,d):a.reg8[c<<2&12|c>>2&1]=d;break;case 3:192>c?(e=a.translate_address_write(a.modrm_resolve(c)), +d=a.memory.read8(e)):d=a.reg8[c<<2&12|c>>2&1];d=a.neg(d,7);192>c?a.memory.write8(e,d):a.reg8[c<<2&12|c>>2&1]=d;break;case 4:d=192>c?a.safe_read8(a.modrm_resolve(c)):a.reg8[c<<2&12|c>>2&1];a.mul8(d);break;case 5:192>c?d=a.safe_read8(a.modrm_resolve(c))<<24>>24:d=a.reg8s[c<<2&12|c>>2&1];a.imul8(d);break;case 6:d=192>c?a.safe_read8(a.modrm_resolve(c)):a.reg8[c<<2&12|c>>2&1];a.div8(d);break;case 7:192>c?d=a.safe_read8(a.modrm_resolve(c))<<24>>24:d=a.reg8s[c<<2&12|c>>2&1],a.idiv8(d)}}; +table16[247]=function(a){var c=a.read_imm8();switch(c>>3&7){case 0:var d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.and(d,a.read_imm16(),15);break;case 1:d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.and(d,a.read_imm16(),15);break;case 2:var e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4095===(d&4095)?(f=a.translate_address_write(d+1),d=a.virt_boundary_read16(e,f)):d=a.memory.read16(e)):d=a.reg16[c<<1&14];d=~d;192>c?f?a.virt_boundary_write16(e, +f,d):a.memory.write16(e,d):a.reg16[c<<1&14]=d;break;case 3:f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4095===(d&4095)?(f=a.translate_address_write(d+1),d=a.virt_boundary_read16(e,f)):d=a.memory.read16(e)):d=a.reg16[c<<1&14];d=a.neg(d,15);192>c?f?a.virt_boundary_write16(e,f,d):a.memory.write16(e,d):a.reg16[c<<1&14]=d;break;case 4:d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.mul16(d);break;case 5:192>c?d=a.safe_read16(a.modrm_resolve(c))<<16>>16:d=a.reg16s[c<< +1&14];a.imul16(d);break;case 6:d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.div16(d);break;case 7:192>c?d=a.safe_read16(a.modrm_resolve(c))<<16>>16:d=a.reg16s[c<<1&14],a.idiv16(d)}}; +table32[247]=function(a){var c=a.read_imm8();switch(c>>3&7){case 0:var d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.and(d,a.read_imm32s(),31);break;case 1:d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.and(d,a.read_imm32s(),31);break;case 2:var e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(f=a.translate_address_write(d+3),d=a.virt_boundary_read32s(e,f)):d=a.memory.read32s(e)):d=a.reg32s[c&7];d=~d;192>c?f?a.virt_boundary_write32(e, +f,d):a.memory.write32(e,d):a.reg32s[c&7]=d;break;case 3:f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(f=a.translate_address_write(d+3),d=a.virt_boundary_read32s(e,f)):d=a.memory.read32s(e)):d=a.reg32s[c&7];d=a.neg(d,31);192>c?f?a.virt_boundary_write32(e,f,d):a.memory.write32(e,d):a.reg32s[c&7]=d;break;case 4:192>c?d=a.safe_read32s(a.modrm_resolve(c))>>>0:d=a.reg32[c&7];a.mul32(d);break;case 5:d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.imul32(d); +break;case 6:192>c?d=a.safe_read32s(a.modrm_resolve(c))>>>0:d=a.reg32[c&7];a.div32(d);break;case 7:d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7],a.idiv32(d)}};table16[248]=table32[248]=function(a){a.flags&=-2;a.flags_changed&=-2};table16[249]=table32[249]=function(a){a.flags|=1;a.flags_changed&=-2}; +table16[250]=table32[250]=function(a){!a.protected_mode||(a.flags&131072?3===a.getiopl():a.getiopl()>=a.cpl)?a.flags&=-513:3>a.getiopl()&&(a.flags&131072?a.cr4&1:3===a.cpl&&a.cr4&2)?a.flags&=-524289:a.trigger_gp(0)};table16[251]=table32[251]=function(a){!a.protected_mode||(a.flags&131072?3===a.getiopl():a.getiopl()>=a.cpl)?(a.flags|=512,a.cycle(),a.handle_irqs()):3>a.getiopl()&&0===(a.flags&1048576)&&(a.flags&131072?a.cr4&1:3===a.cpl&&a.cr4&2)?a.flags|=524288:a.trigger_gp(0)}; +table16[252]=table32[252]=function(a){a.flags&=-1025};table16[253]=table32[253]=function(a){a.flags|=1024}; +table16[254]=table32[254]=function(a){var c=a.read_imm8(),d=c&56;if(0===d){var e;192>c?(e=a.translate_address_write(a.modrm_resolve(c)),d=a.memory.read8(e)):d=a.reg8[c<<2&12|c>>2&1];d=a.inc(d,7);192>c?a.memory.write8(e,d):a.reg8[c<<2&12|c>>2&1]=d}else 8===d?(192>c?(e=a.translate_address_write(a.modrm_resolve(c)),d=a.memory.read8(e)):d=a.reg8[c<<2&12|c>>2&1],d=a.dec(d,7),192>c?a.memory.write8(e,d):a.reg8[c<<2&12|c>>2&1]=d):a.trigger_ud()}; +table16[255]=function(a){var c=a.read_imm8();switch(c>>3&7){case 0:var d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4095===(d&4095)?(f=a.translate_address_write(d+1),d=a.virt_boundary_read16(e,f)):d=a.memory.read16(e)):d=a.reg16[c<<1&14];d=a.inc(d,15);192>c?f?a.virt_boundary_write16(e,f,d):a.memory.write16(e,d):a.reg16[c<<1&14]=d;break;case 1:f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4095===(d&4095)?(f=a.translate_address_write(d+1),d= +a.virt_boundary_read16(e,f)):d=a.memory.read16(e)):d=a.reg16[c<<1&14];d=a.dec(d,15);192>c?f?a.virt_boundary_write16(e,f,d):a.memory.write16(e,d):a.reg16[c<<1&14]=d;break;case 2:d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.push16(a.get_real_eip());a.instruction_pointer=a.get_seg(1)+d|0;a.last_instr_jump=!0;break;case 3:192<=c&&a.trigger_ud();d=a.modrm_resolve(c);c=a.safe_read16(d+2);e=a.safe_read16(d);a.writable_or_pagefault(a.get_stack_pointer(-4),4);a.push16(a.sreg[1]);a.push16(a.get_real_eip()); +a.switch_seg(1,c);a.instruction_pointer=a.get_seg(1)+e|0;a.last_instr_jump=!0;break;case 4:d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.instruction_pointer=a.get_seg(1)+d|0;a.last_instr_jump=!0;break;case 5:192<=c&&a.trigger_ud();d=a.modrm_resolve(c);c=a.safe_read16(d+2);e=a.safe_read16(d);a.switch_seg(1,c);a.instruction_pointer=a.get_seg(1)+e|0;a.last_instr_jump=!0;break;case 6:d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.push16(d);break;case 7:a.trigger_ud()}}; +table32[255]=function(a){var c=a.read_imm8();switch(c>>3&7){case 0:var d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(f=a.translate_address_write(d+3),d=a.virt_boundary_read32s(e,f)):d=a.memory.read32s(e)):d=a.reg32s[c&7];d=a.inc(d,31);192>c?f?a.virt_boundary_write32(e,f,d):a.memory.write32(e,d):a.reg32s[c&7]=d;break;case 1:f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(f=a.translate_address_write(d+3),d=a.virt_boundary_read32s(e, +f)):d=a.memory.read32s(e)):d=a.reg32s[c&7];d=a.dec(d,31);192>c?f?a.virt_boundary_write32(e,f,d):a.memory.write32(e,d):a.reg32s[c&7]=d;break;case 2:d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.push32(a.get_real_eip());a.instruction_pointer=a.get_seg(1)+d|0;a.last_instr_jump=!0;break;case 3:192<=c&&a.trigger_ud();d=a.modrm_resolve(c);c=a.safe_read16(d+4);e=a.safe_read32s(d);a.writable_or_pagefault(a.get_stack_pointer(-8),8);a.push32(a.sreg[1]);a.push32(a.get_real_eip());a.switch_seg(1, +c);a.instruction_pointer=a.get_seg(1)+e|0;a.last_instr_jump=!0;break;case 4:d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.instruction_pointer=a.get_seg(1)+d|0;a.last_instr_jump=!0;break;case 5:192<=c&&a.trigger_ud();d=a.modrm_resolve(c);c=a.safe_read16(d+4);e=a.safe_read32s(d);a.switch_seg(1,c);a.instruction_pointer=a.get_seg(1)+e|0;a.last_instr_jump=!0;break;case 6:d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.push32(d);break;case 7:a.trigger_ud()}}; +table0F_16[0]=table0F_32[0]=function(a){var c=a.read_imm8();a.protected_mode||a.trigger_ud();a.cpl&&a.trigger_gp(0);switch(c>>3&7){case 0:if(192>c)var d=a.modrm_resolve(c);var e=a.sreg[7];192>c?a.safe_write16(d,e):a.reg16[c<<1&14]=e;break;case 1:192>c&&(d=a.modrm_resolve(c));e=a.sreg[6];192>c?a.safe_write16(d,e):a.reg16[c<<1&14]=e;break;case 2:e=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.load_ldt(e);break;case 3:e=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.load_tr(e); +break;default:a.trigger_ud()}}; +table0F_16[1]=table0F_32[1]=function(a){var c=a.read_imm8();a.cpl&&a.trigger_gp(0);var d=c>>3&7;if(4===d){if(192>c)var e=a.modrm_resolve(c);d=a.cr0;192>c?a.safe_write16(e,d):a.reg16[c<<1&14]=d}else if(6===d)d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14],a.cr0=a.cr0&-16|d&15,a.protected_mode&&(a.cr0|=1),a.cr0_changed();else switch(192<=c&&a.trigger_ud(),2!==d&&3!==d||!a.protected_mode||(a.segment_prefix=9),e=a.modrm_resolve(c),a.segment_prefix=-1,d){case 0:a.writable_or_pagefault(e,6); +a.safe_write16(e,a.gdtr_size);a.safe_write32(e+2,a.gdtr_offset);break;case 1:a.writable_or_pagefault(e,6);a.safe_write16(e,a.idtr_size);a.safe_write32(e+2,a.idtr_offset);break;case 2:c=a.safe_read16(e);e=a.safe_read32s(e+2);a.gdtr_size=c;a.gdtr_offset=e;a.operand_size_32||(a.gdtr_offset&=16777215);break;case 3:c=a.safe_read16(e);e=a.safe_read32s(e+2);a.idtr_size=c;a.idtr_offset=e;a.operand_size_32||(a.idtr_offset&=16777215);break;case 7:a.invlpg(e);break;default:a.trigger_ud()}}; +table0F_16[2]=table0F_32[2]=function(a){a.read_imm8();a.trigger_ud()};table0F_16[3]=table0F_32[3]=function(a){a.read_imm8();a.trigger_ud()};table0F_16[4]=table0F_32[4]=function(a){a.trigger_ud()};table0F_16[5]=table0F_32[5]=function(a){a.trigger_ud()};table0F_16[6]=table0F_32[6]=function(a){a.cpl?a.trigger_gp(0):a.cr0&=-9};table0F_16[7]=table0F_32[7]=function(a){a.trigger_ud()};table0F_16[8]=table0F_32[8]=function(a){a.trigger_ud()};table0F_16[9]=table0F_32[9]=function(a){a.cpl&&a.trigger_gp(0)}; +table0F_16[10]=table0F_32[10]=function(a){a.trigger_ud()};table0F_16[11]=table0F_32[11]=function(a){a.trigger_ud()};table0F_16[12]=table0F_32[12]=function(a){a.trigger_ud()};table0F_16[13]=table0F_32[13]=function(a){a.trigger_ud()};table0F_16[14]=table0F_32[14]=function(a){a.trigger_ud()};table0F_16[15]=table0F_32[15]=function(a){a.trigger_ud()};table0F_16[16]=table0F_32[16]=function(a){a.trigger_ud()};table0F_16[17]=table0F_32[17]=function(a){a.trigger_ud()};table0F_16[18]=table0F_32[18]=function(a){a.trigger_ud()}; +table0F_16[19]=table0F_32[19]=function(a){a.trigger_ud()};table0F_16[20]=table0F_32[20]=function(a){a.trigger_ud()};table0F_16[21]=table0F_32[21]=function(a){a.trigger_ud()};table0F_16[22]=table0F_32[22]=function(a){a.trigger_ud()};table0F_16[23]=table0F_32[23]=function(a){a.trigger_ud()};table0F_16[24]=table0F_32[24]=function(a){var c=a.read_imm8();192>c&&a.modrm_resolve(c)};table0F_16[25]=table0F_32[25]=function(a){a.trigger_ud()};table0F_16[26]=table0F_32[26]=function(a){a.trigger_ud()}; +table0F_16[27]=table0F_32[27]=function(a){a.trigger_ud()};table0F_16[28]=table0F_32[28]=function(a){a.trigger_ud()};table0F_16[29]=table0F_32[29]=function(a){a.trigger_ud()};table0F_16[30]=table0F_32[30]=function(a){a.trigger_ud()};table0F_16[31]=table0F_32[31]=function(a){a.trigger_ud()}; +table0F_16[32]=table0F_32[32]=function(a){var c=a.read_imm8();a.cpl&&a.trigger_gp(0);switch(c>>3&7){case 0:a.reg32s[c&7]=a.cr0;break;case 2:a.reg32s[c&7]=a.cr2;break;case 3:a.reg32s[c&7]=a.cr3;break;case 4:a.reg32s[c&7]=a.cr4;break;default:a.trigger_ud()}};table0F_16[33]=table0F_32[33]=function(a){var c=a.read_imm8();a.cpl&&a.trigger_gp(0);a.reg32s[c&7]=a.dreg[c>>3&7]}; +table0F_16[34]=table0F_32[34]=function(a){var c=a.read_imm8();a.cpl&&a.trigger_gp(0);var d=a.reg32s[c&7];switch(c>>3&7){case 0:a.cr0=d;if(-2147483648===(a.cr0&-2147483647))throw a.debug.unimpl("#GP handler");a.cr0_changed();break;case 2:a.cr2=d;break;case 3:a.cr3=d;a.clear_tlb();break;case 4:d&-3565568&&a.trigger_gp(0);(a.cr4^d)&128&&(d&128?a.clear_tlb():a.full_clear_tlb());a.cr4=d;a.page_size_extensions=a.cr4&16?128:0;if(a.cr4&32)throw a.debug.unimpl("PAE");break;default:a.trigger_ud()}}; +table0F_16[35]=table0F_32[35]=function(a){var c=a.read_imm8();a.cpl&&a.trigger_gp(0);a.dreg[c>>3&7]=a.reg32s[c&7]};table0F_16[36]=table0F_32[36]=function(a){a.trigger_ud()};table0F_16[37]=table0F_32[37]=function(a){a.trigger_ud()};table0F_16[38]=table0F_32[38]=function(a){a.trigger_ud()};table0F_16[39]=table0F_32[39]=function(a){a.trigger_ud()};table0F_16[40]=table0F_32[40]=function(a){a.trigger_ud()};table0F_16[41]=table0F_32[41]=function(a){a.trigger_ud()};table0F_16[42]=table0F_32[42]=function(a){a.trigger_ud()}; +table0F_16[43]=table0F_32[43]=function(a){a.trigger_ud()};table0F_16[44]=table0F_32[44]=function(a){a.trigger_ud()};table0F_16[45]=table0F_32[45]=function(a){a.trigger_ud()};table0F_16[46]=table0F_32[46]=function(a){a.trigger_ud()};table0F_16[47]=table0F_32[47]=function(a){a.trigger_ud()};table0F_16[48]=table0F_32[48]=function(a){a.cpl&&a.trigger_gp(0);var c=a.reg32s[0];switch(a.reg32s[1]){case 372:a.sysenter_cs=c&65535;break;case 374:a.sysenter_eip=c;break;case 373:a.sysenter_esp=c}}; +table0F_16[49]=table0F_32[49]=function(a){if(a.cpl&&a.cr4&4)a.trigger_gp(0);else{var c=a.microtick()-a.tsc_offset;a.reg32s[0]=1024*c;a.reg32s[2]=2.384185791015625E-7*c}};table0F_16[50]=table0F_32[50]=function(a){a.cpl&&a.trigger_gp(0);var c=0;switch(a.reg32s[1]){case 372:c=a.sysenter_cs;break;case 374:c=a.sysenter_eip;break;case 373:c=a.sysenter_esp}a.reg32s[0]=c;a.reg32s[2]=0};table0F_16[51]=table0F_32[51]=function(a){a.trigger_ud()}; +table0F_16[52]=table0F_32[52]=function(a){var c=a.sysenter_cs&65532;a.protected_mode&&0!==c||a.trigger_gp(0);a.flags&=-131585;a.instruction_pointer=a.sysenter_eip;a.reg32s[4]=a.sysenter_esp;a.sreg[1]=c;a.segment_is_null[1]=0;a.segment_limits[1]=-1;a.segment_offsets[1]=0;a.is_32||a.update_cs_size(!0);a.cpl=0;a.cpl_changed();a.sreg[2]=c+8;a.segment_is_null[2]=0;a.segment_limits[2]=-1;a.segment_offsets[2]=0;a.stack_size_32=!0;a.stack_reg=a.reg32s;a.reg_vsp=4;a.reg_vbp=5}; +table0F_16[53]=table0F_32[53]=function(a){var c=a.sysenter_cs&65532;a.protected_mode&&!a.cpl&&0!==c||a.trigger_gp(0);a.instruction_pointer=a.reg32s[2];a.reg32s[4]=a.reg32s[1];a.sreg[1]=c+16|3;a.segment_is_null[1]=0;a.segment_limits[1]=-1;a.segment_offsets[1]=0;a.is_32||a.update_cs_size(!0);a.cpl=3;a.cpl_changed();a.sreg[2]=c+24|3;a.segment_is_null[2]=0;a.segment_limits[2]=-1;a.segment_offsets[2]=0;a.stack_size_32=!0;a.stack_reg=a.reg32s;a.reg_vsp=4;a.reg_vbp=5};table0F_16[54]=table0F_32[54]=function(a){a.trigger_ud()}; +table0F_16[55]=table0F_32[55]=function(a){a.trigger_ud()};table0F_16[56]=table0F_32[56]=function(a){a.trigger_ud()};table0F_16[57]=table0F_32[57]=function(a){a.trigger_ud()};table0F_16[58]=table0F_32[58]=function(a){a.trigger_ud()};table0F_16[59]=table0F_32[59]=function(a){a.trigger_ud()};table0F_16[60]=table0F_32[60]=function(a){a.trigger_ud()};table0F_16[61]=table0F_32[61]=function(a){a.trigger_ud()};table0F_16[62]=table0F_32[62]=function(a){a.trigger_ud()};table0F_16[63]=table0F_32[63]=function(a){a.trigger_ud()}; +table0F_16[64]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.test_o()&&(a.reg16[c>>2&14]=d)};table0F_32[64]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.test_o()&&(a.reg32s[c>>3&7]=d)};table0F_16[65]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.test_o()||(a.reg16[c>>2&14]=d)}; +table0F_32[65]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.test_o()||(a.reg32s[c>>3&7]=d)};table0F_16[66]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.test_b()&&(a.reg16[c>>2&14]=d)};table0F_32[66]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.test_b()&&(a.reg32s[c>>3&7]=d)}; +table0F_16[67]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.test_b()||(a.reg16[c>>2&14]=d)};table0F_32[67]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.test_b()||(a.reg32s[c>>3&7]=d)};table0F_16[68]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.test_z()&&(a.reg16[c>>2&14]=d)}; +table0F_32[68]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.test_z()&&(a.reg32s[c>>3&7]=d)};table0F_16[69]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.test_z()||(a.reg16[c>>2&14]=d)};table0F_32[69]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.test_z()||(a.reg32s[c>>3&7]=d)}; +table0F_16[70]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.test_be()&&(a.reg16[c>>2&14]=d)};table0F_32[70]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.test_be()&&(a.reg32s[c>>3&7]=d)};table0F_16[71]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.test_be()||(a.reg16[c>>2&14]=d)}; +table0F_32[71]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.test_be()||(a.reg32s[c>>3&7]=d)};table0F_16[72]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.test_s()&&(a.reg16[c>>2&14]=d)};table0F_32[72]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.test_s()&&(a.reg32s[c>>3&7]=d)}; +table0F_16[73]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.test_s()||(a.reg16[c>>2&14]=d)};table0F_32[73]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.test_s()||(a.reg32s[c>>3&7]=d)};table0F_16[74]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.test_p()&&(a.reg16[c>>2&14]=d)}; +table0F_32[74]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.test_p()&&(a.reg32s[c>>3&7]=d)};table0F_16[75]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.test_p()||(a.reg16[c>>2&14]=d)};table0F_32[75]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.test_p()||(a.reg32s[c>>3&7]=d)}; +table0F_16[76]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.test_l()&&(a.reg16[c>>2&14]=d)};table0F_32[76]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.test_l()&&(a.reg32s[c>>3&7]=d)};table0F_16[77]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.test_l()||(a.reg16[c>>2&14]=d)}; +table0F_32[77]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.test_l()||(a.reg32s[c>>3&7]=d)};table0F_16[78]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.test_le()&&(a.reg16[c>>2&14]=d)};table0F_32[78]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.test_le()&&(a.reg32s[c>>3&7]=d)}; +table0F_16[79]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.test_le()||(a.reg16[c>>2&14]=d)};table0F_32[79]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.test_le()||(a.reg32s[c>>3&7]=d)};table0F_16[80]=table0F_32[80]=function(a){a.trigger_ud()};table0F_16[81]=table0F_32[81]=function(a){a.trigger_ud()};table0F_16[82]=table0F_32[82]=function(a){a.trigger_ud()};table0F_16[83]=table0F_32[83]=function(a){a.trigger_ud()}; +table0F_16[84]=table0F_32[84]=function(a){a.trigger_ud()};table0F_16[85]=table0F_32[85]=function(a){a.trigger_ud()};table0F_16[86]=table0F_32[86]=function(a){a.trigger_ud()};table0F_16[87]=table0F_32[87]=function(a){a.trigger_ud()};table0F_16[88]=table0F_32[88]=function(a){a.trigger_ud()};table0F_16[89]=table0F_32[89]=function(a){a.trigger_ud()};table0F_16[90]=table0F_32[90]=function(a){a.trigger_ud()};table0F_16[91]=table0F_32[91]=function(a){a.trigger_ud()};table0F_16[92]=table0F_32[92]=function(a){a.trigger_ud()}; +table0F_16[93]=table0F_32[93]=function(a){a.trigger_ud()};table0F_16[94]=table0F_32[94]=function(a){a.trigger_ud()};table0F_16[95]=table0F_32[95]=function(a){a.trigger_ud()};table0F_16[96]=table0F_32[96]=function(a){a.trigger_ud()};table0F_16[97]=table0F_32[97]=function(a){a.trigger_ud()};table0F_16[98]=table0F_32[98]=function(a){a.trigger_ud()};table0F_16[99]=table0F_32[99]=function(a){a.trigger_ud()};table0F_16[100]=table0F_32[100]=function(a){a.trigger_ud()};table0F_16[101]=table0F_32[101]=function(a){a.trigger_ud()}; +table0F_16[102]=table0F_32[102]=function(a){a.trigger_ud()};table0F_16[103]=table0F_32[103]=function(a){a.trigger_ud()};table0F_16[104]=table0F_32[104]=function(a){a.trigger_ud()};table0F_16[105]=table0F_32[105]=function(a){a.trigger_ud()};table0F_16[106]=table0F_32[106]=function(a){a.trigger_ud()};table0F_16[107]=table0F_32[107]=function(a){a.trigger_ud()};table0F_16[108]=table0F_32[108]=function(a){a.trigger_ud()};table0F_16[109]=table0F_32[109]=function(a){a.trigger_ud()}; +table0F_16[110]=table0F_32[110]=function(a){a.trigger_ud()};table0F_16[111]=table0F_32[111]=function(a){a.trigger_ud()};table0F_16[112]=table0F_32[112]=function(a){a.trigger_ud()};table0F_16[113]=table0F_32[113]=function(a){a.trigger_ud()};table0F_16[114]=table0F_32[114]=function(a){a.trigger_ud()};table0F_16[115]=table0F_32[115]=function(a){a.trigger_ud()};table0F_16[116]=table0F_32[116]=function(a){a.trigger_ud()};table0F_16[117]=table0F_32[117]=function(a){a.trigger_ud()}; +table0F_16[118]=table0F_32[118]=function(a){a.trigger_ud()};table0F_16[119]=table0F_32[119]=function(a){a.trigger_ud()};table0F_16[120]=table0F_32[120]=function(a){a.trigger_ud()};table0F_16[121]=table0F_32[121]=function(a){a.trigger_ud()};table0F_16[122]=table0F_32[122]=function(a){a.trigger_ud()};table0F_16[123]=table0F_32[123]=function(a){a.trigger_ud()};table0F_16[124]=table0F_32[124]=function(a){a.trigger_ud()};table0F_16[125]=table0F_32[125]=function(a){a.trigger_ud()}; +table0F_16[126]=table0F_32[126]=function(a){a.trigger_ud()};table0F_16[127]=table0F_32[127]=function(a){a.trigger_ud()};table0F_16[128]=function(a){a.jmpcc16(a.test_o())};table0F_32[128]=function(a){a.jmpcc32(a.test_o())};table0F_16[129]=function(a){a.jmpcc16(!a.test_o())};table0F_32[129]=function(a){a.jmpcc32(!a.test_o())};table0F_16[130]=function(a){a.jmpcc16(a.test_b())};table0F_32[130]=function(a){a.jmpcc32(a.test_b())};table0F_16[131]=function(a){a.jmpcc16(!a.test_b())};table0F_32[131]=function(a){a.jmpcc32(!a.test_b())}; +table0F_16[132]=function(a){a.jmpcc16(a.test_z())};table0F_32[132]=function(a){a.jmpcc32(a.test_z())};table0F_16[133]=function(a){a.jmpcc16(!a.test_z())};table0F_32[133]=function(a){a.jmpcc32(!a.test_z())};table0F_16[134]=function(a){a.jmpcc16(a.test_be())};table0F_32[134]=function(a){a.jmpcc32(a.test_be())};table0F_16[135]=function(a){a.jmpcc16(!a.test_be())};table0F_32[135]=function(a){a.jmpcc32(!a.test_be())};table0F_16[136]=function(a){a.jmpcc16(a.test_s())};table0F_32[136]=function(a){a.jmpcc32(a.test_s())}; +table0F_16[137]=function(a){a.jmpcc16(!a.test_s())};table0F_32[137]=function(a){a.jmpcc32(!a.test_s())};table0F_16[138]=function(a){a.jmpcc16(a.test_p())};table0F_32[138]=function(a){a.jmpcc32(a.test_p())};table0F_16[139]=function(a){a.jmpcc16(!a.test_p())};table0F_32[139]=function(a){a.jmpcc32(!a.test_p())};table0F_16[140]=function(a){a.jmpcc16(a.test_l())};table0F_32[140]=function(a){a.jmpcc32(a.test_l())};table0F_16[141]=function(a){a.jmpcc16(!a.test_l())};table0F_32[141]=function(a){a.jmpcc32(!a.test_l())}; +table0F_16[142]=function(a){a.jmpcc16(a.test_le())};table0F_32[142]=function(a){a.jmpcc32(a.test_le())};table0F_16[143]=function(a){a.jmpcc16(!a.test_le())};table0F_32[143]=function(a){a.jmpcc32(!a.test_le())};table0F_16[144]=table0F_32[144]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=!a.test_o()^1;192>c?a.safe_write8(d,e):a.reg8[c<<2&12|c>>2&1]=e}; +table0F_16[145]=table0F_32[145]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=!!a.test_o()^1;192>c?a.safe_write8(d,e):a.reg8[c<<2&12|c>>2&1]=e};table0F_16[146]=table0F_32[146]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=!a.test_b()^1;192>c?a.safe_write8(d,e):a.reg8[c<<2&12|c>>2&1]=e}; +table0F_16[147]=table0F_32[147]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=!!a.test_b()^1;192>c?a.safe_write8(d,e):a.reg8[c<<2&12|c>>2&1]=e};table0F_16[148]=table0F_32[148]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=!a.test_z()^1;192>c?a.safe_write8(d,e):a.reg8[c<<2&12|c>>2&1]=e}; +table0F_16[149]=table0F_32[149]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=!!a.test_z()^1;192>c?a.safe_write8(d,e):a.reg8[c<<2&12|c>>2&1]=e};table0F_16[150]=table0F_32[150]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=!a.test_be()^1;192>c?a.safe_write8(d,e):a.reg8[c<<2&12|c>>2&1]=e}; +table0F_16[151]=table0F_32[151]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=!!a.test_be()^1;192>c?a.safe_write8(d,e):a.reg8[c<<2&12|c>>2&1]=e};table0F_16[152]=table0F_32[152]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=!a.test_s()^1;192>c?a.safe_write8(d,e):a.reg8[c<<2&12|c>>2&1]=e}; +table0F_16[153]=table0F_32[153]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=!!a.test_s()^1;192>c?a.safe_write8(d,e):a.reg8[c<<2&12|c>>2&1]=e};table0F_16[154]=table0F_32[154]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=!a.test_p()^1;192>c?a.safe_write8(d,e):a.reg8[c<<2&12|c>>2&1]=e}; +table0F_16[155]=table0F_32[155]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=!!a.test_p()^1;192>c?a.safe_write8(d,e):a.reg8[c<<2&12|c>>2&1]=e};table0F_16[156]=table0F_32[156]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=!a.test_l()^1;192>c?a.safe_write8(d,e):a.reg8[c<<2&12|c>>2&1]=e}; +table0F_16[157]=table0F_32[157]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=!!a.test_l()^1;192>c?a.safe_write8(d,e):a.reg8[c<<2&12|c>>2&1]=e};table0F_16[158]=table0F_32[158]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=!a.test_le()^1;192>c?a.safe_write8(d,e):a.reg8[c<<2&12|c>>2&1]=e}; +table0F_16[159]=table0F_32[159]=function(a){var c=a.read_imm8();if(192>c)var d=a.modrm_resolve(c);var e=!!a.test_le()^1;192>c?a.safe_write8(d,e):a.reg8[c<<2&12|c>>2&1]=e};table0F_16[160]=function(a){a.push16(a.sreg[4])};table0F_32[160]=function(a){a.push32(a.sreg[4])};table0F_16[161]=function(a){a.switch_seg(4,a.safe_read16(a.get_stack_pointer(0)));a.stack_reg[a.reg_vsp]+=2};table0F_32[161]=function(a){a.switch_seg(4,a.safe_read16(a.get_stack_pointer(0)));a.stack_reg[a.reg_vsp]+=4}; +table0F_16[162]=table0F_32[162]=function(a){a.cpuid()};table0F_16[163]=function(a){var c=a.read_imm8();192>c?a.bt_mem(a.modrm_resolve(c),a.reg16s[c>>2&14]):a.bt_reg(a.reg16[c<<1&14],a.reg16[c>>2&14]&15)};table0F_32[163]=function(a){var c=a.read_imm8();192>c?a.bt_mem(a.modrm_resolve(c),a.reg32s[c>>3&7]):a.bt_reg(a.reg32s[c&7],a.reg32s[c>>3&7]&31)}; +table0F_16[164]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4095===(d&4095)?(f=a.translate_address_write(d+1),d=a.virt_boundary_read16(e,f)):d=a.memory.read16(e)):d=a.reg16[c<<1&14];d=a.shld16(d,a.reg16[c>>2&14],a.read_imm8()&31);192>c?f?a.virt_boundary_write16(e,f,d):a.memory.write16(e,d):a.reg16[c<<1&14]=d}; +table0F_32[164]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(f=a.translate_address_write(d+3),d=a.virt_boundary_read32s(e,f)):d=a.memory.read32s(e)):d=a.reg32s[c&7];d=a.shld32(d,a.reg32s[c>>3&7],a.read_imm8()&31);192>c?f?a.virt_boundary_write32(e,f,d):a.memory.write32(e,d):a.reg32s[c&7]=d}; +table0F_16[165]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4095===(d&4095)?(f=a.translate_address_write(d+1),d=a.virt_boundary_read16(e,f)):d=a.memory.read16(e)):d=a.reg16[c<<1&14];d=a.shld16(d,a.reg16[c>>2&14],a.reg8[4]&31);192>c?f?a.virt_boundary_write16(e,f,d):a.memory.write16(e,d):a.reg16[c<<1&14]=d}; +table0F_32[165]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(f=a.translate_address_write(d+3),d=a.virt_boundary_read32s(e,f)):d=a.memory.read32s(e)):d=a.reg32s[c&7];d=a.shld32(d,a.reg32s[c>>3&7],a.reg8[4]&31);192>c?f?a.virt_boundary_write32(e,f,d):a.memory.write32(e,d):a.reg32s[c&7]=d};table0F_16[166]=table0F_32[166]=function(a){a.trigger_ud()};table0F_16[167]=table0F_32[167]=function(a){a.trigger_ud()}; +table0F_16[168]=function(a){a.push16(a.sreg[5])};table0F_32[168]=function(a){a.push32(a.sreg[5])};table0F_16[169]=function(a){a.switch_seg(5,a.safe_read16(a.get_stack_pointer(0)));a.stack_reg[a.reg_vsp]+=2};table0F_32[169]=function(a){a.switch_seg(5,a.safe_read16(a.get_stack_pointer(0)));a.stack_reg[a.reg_vsp]+=4};table0F_16[170]=table0F_32[170]=function(a){a.trigger_ud()}; +table0F_16[171]=function(a){var c=a.read_imm8();192>c?a.bts_mem(a.modrm_resolve(c),a.reg16s[c>>2&14]):a.reg16[c<<1&14]=a.bts_reg(a.reg16[c<<1&14],a.reg16s[c>>2&14]&15)};table0F_32[171]=function(a){var c=a.read_imm8();192>c?a.bts_mem(a.modrm_resolve(c),a.reg32s[c>>3&7]):a.reg32s[c&7]=a.bts_reg(a.reg32s[c&7],a.reg32s[c>>3&7]&31)}; +table0F_16[172]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4095===(d&4095)?(f=a.translate_address_write(d+1),d=a.virt_boundary_read16(e,f)):d=a.memory.read16(e)):d=a.reg16[c<<1&14];d=a.shrd16(d,a.reg16[c>>2&14],a.read_imm8()&31);192>c?f?a.virt_boundary_write16(e,f,d):a.memory.write16(e,d):a.reg16[c<<1&14]=d}; +table0F_32[172]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(f=a.translate_address_write(d+3),d=a.virt_boundary_read32s(e,f)):d=a.memory.read32s(e)):d=a.reg32s[c&7];d=a.shrd32(d,a.reg32s[c>>3&7],a.read_imm8()&31);192>c?f?a.virt_boundary_write32(e,f,d):a.memory.write32(e,d):a.reg32s[c&7]=d}; +table0F_16[173]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4095===(d&4095)?(f=a.translate_address_write(d+1),d=a.virt_boundary_read16(e,f)):d=a.memory.read16(e)):d=a.reg16[c<<1&14];d=a.shrd16(d,a.reg16[c>>2&14],a.reg8[4]&31);192>c?f?a.virt_boundary_write16(e,f,d):a.memory.write16(e,d):a.reg16[c<<1&14]=d}; +table0F_32[173]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(f=a.translate_address_write(d+3),d=a.virt_boundary_read32s(e,f)):d=a.memory.read32s(e)):d=a.reg32s[c&7];d=a.shrd32(d,a.reg32s[c>>3&7],a.reg8[4]&31);192>c?f?a.virt_boundary_write32(e,f,d):a.memory.write32(e,d):a.reg32s[c&7]=d};table0F_16[174]=table0F_32[174]=function(a){a.trigger_ud()}; +table0F_16[175]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c))<<16>>16:a.reg16s[c<<1&14];a.reg16[c>>2&14]=a.imul_reg16(a.reg16s[c>>2&14],d)};table0F_32[175]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.reg32s[c>>3&7]=a.imul_reg32(a.reg32s[c>>3&7],d)}; +table0F_16[176]=table0F_32[176]=function(a){var c=a.read_imm8();if(192>c){var d=a.modrm_resolve(c);a.writable_or_pagefault(d,1);var e=a.safe_read8(d)}else e=a.reg8[c<<2&12|c>>2&1];a.sub(e,a.reg8[0],7);a.getzf()?192>c?a.safe_write8(d,a.reg8[c>>1&12|c>>5&1]):a.reg8[c<<2&12|c>>2&1]=a.reg8[c>>1&12|c>>5&1]:a.reg8[0]=e}; +table0F_16[177]=function(a){var c=a.read_imm8();if(192>c){var d=a.modrm_resolve(c);a.writable_or_pagefault(d,2);var e=a.safe_read16(d)}else e=a.reg16[c<<1&14];a.sub(e,a.reg16[0],15);a.getzf()?192>c?a.safe_write16(d,a.reg16[c>>2&14]):a.reg16[c<<1&14]=a.reg16[c>>2&14]:a.reg16[0]=e}; +table0F_32[177]=function(a){var c=a.read_imm8();if(192>c){var d=a.modrm_resolve(c);a.writable_or_pagefault(d,4);var e=a.safe_read32s(d)}else e=a.reg32s[c&7];a.sub(e,a.reg32s[0],31);a.getzf()?192>c?a.safe_write32(d,a.reg32s[c>>3&7]):a.reg32s[c&7]=a.reg32s[c>>3&7]:a.reg32s[0]=e};table0F_16[178]=function(a){var c=a.read_imm8();192<=c&&a.trigger_ud();a.lss16(2,a.modrm_resolve(c),c>>2&14)};table0F_32[178]=function(a){var c=a.read_imm8();192<=c&&a.trigger_ud();a.lss32(2,a.modrm_resolve(c),c>>3&7)}; +table0F_16[179]=function(a){var c=a.read_imm8();192>c?a.btr_mem(a.modrm_resolve(c),a.reg16s[c>>2&14]):a.reg16[c<<1&14]=a.btr_reg(a.reg16[c<<1&14],a.reg16s[c>>2&14]&15)};table0F_32[179]=function(a){var c=a.read_imm8();192>c?a.btr_mem(a.modrm_resolve(c),a.reg32s[c>>3&7]):a.reg32s[c&7]=a.btr_reg(a.reg32s[c&7],a.reg32s[c>>3&7]&31)};table0F_16[180]=function(a){var c=a.read_imm8();192<=c&&a.trigger_ud();a.lss16(4,a.modrm_resolve(c),c>>2&14)}; +table0F_32[180]=function(a){var c=a.read_imm8();192<=c&&a.trigger_ud();a.lss32(4,a.modrm_resolve(c),c>>3&7)};table0F_16[181]=function(a){var c=a.read_imm8();192<=c&&a.trigger_ud();a.lss16(5,a.modrm_resolve(c),c>>2&14)};table0F_32[181]=function(a){var c=a.read_imm8();192<=c&&a.trigger_ud();a.lss32(5,a.modrm_resolve(c),c>>3&7)};table0F_16[182]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read8(a.modrm_resolve(c)):a.reg8[c<<2&12|c>>2&1];a.reg16[c>>2&14]=d}; +table0F_32[182]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read8(a.modrm_resolve(c)):a.reg8[c<<2&12|c>>2&1];a.reg32s[c>>3&7]=d};table0F_16[183]=table0F_32[183]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.reg32s[c>>3&7]=d};table0F_16[184]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.reg16[c>>2&14]=a.popcnt(d)}; +table0F_32[184]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.reg32s[c>>3&7]=a.popcnt(d)};table0F_16[185]=table0F_32[185]=function(a){a.trigger_ud()}; +table0F_16[186]=function(a){var c=a.read_imm8();switch(c>>3&7){case 4:192>c?a.bt_mem(a.modrm_resolve(c),a.read_imm8()&15):a.bt_reg(a.reg16[c<<1&14],a.read_imm8()&15);break;case 5:192>c?a.bts_mem(a.modrm_resolve(c),a.read_imm8()):a.reg16[c<<1&14]=a.bts_reg(a.reg16[c<<1&14],a.read_imm8()&15);break;case 6:192>c?a.btr_mem(a.modrm_resolve(c),a.read_imm8()):a.reg16[c<<1&14]=a.btr_reg(a.reg16[c<<1&14],a.read_imm8()&15);break;case 7:192>c?a.btc_mem(a.modrm_resolve(c),a.read_imm8()):a.reg16[c<<1&14]=a.btc_reg(a.reg16[c<< +1&14],a.read_imm8()&15);break;default:a.trigger_ud()}}; +table0F_32[186]=function(a){var c=a.read_imm8();switch(c>>3&7){case 4:192>c?a.bt_mem(a.modrm_resolve(c),a.read_imm8()&31):a.bt_reg(a.reg32s[c&7],a.read_imm8()&31);break;case 5:192>c?a.bts_mem(a.modrm_resolve(c),a.read_imm8()):a.reg32s[c&7]=a.bts_reg(a.reg32s[c&7],a.read_imm8()&31);break;case 6:192>c?a.btr_mem(a.modrm_resolve(c),a.read_imm8()):a.reg32s[c&7]=a.btr_reg(a.reg32s[c&7],a.read_imm8()&31);break;case 7:192>c?a.btc_mem(a.modrm_resolve(c),a.read_imm8()):a.reg32s[c&7]=a.btc_reg(a.reg32s[c&7], +a.read_imm8()&31);break;default:a.trigger_ud()}};table0F_16[187]=function(a){var c=a.read_imm8();192>c?a.btc_mem(a.modrm_resolve(c),a.reg16s[c>>2&14]):a.reg16[c<<1&14]=a.btc_reg(a.reg16[c<<1&14],a.reg16s[c>>2&14]&15)};table0F_32[187]=function(a){var c=a.read_imm8();192>c?a.btc_mem(a.modrm_resolve(c),a.reg32s[c>>3&7]):a.reg32s[c&7]=a.btc_reg(a.reg32s[c&7],a.reg32s[c>>3&7]&31)}; +table0F_16[188]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.reg16[c>>2&14]=a.bsf16(a.reg16[c>>2&14],d)};table0F_32[188]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.reg32s[c>>3&7]=a.bsf32(a.reg32s[c>>3&7],d)};table0F_16[189]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c)):a.reg16[c<<1&14];a.reg16[c>>2&14]=a.bsr16(a.reg16[c>>2&14],d)}; +table0F_32[189]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read32s(a.modrm_resolve(c)):a.reg32s[c&7];a.reg32s[c>>3&7]=a.bsr32(a.reg32s[c>>3&7],d)};table0F_16[190]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read8(a.modrm_resolve(c))<<24>>24:a.reg8s[c<<2&12|c>>2&1];a.reg16[c>>2&14]=d};table0F_32[190]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read8(a.modrm_resolve(c))<<24>>24:a.reg8s[c<<2&12|c>>2&1];a.reg32s[c>>3&7]=d}; +table0F_16[191]=table0F_32[191]=function(a){var c=a.read_imm8(),d=192>c?a.safe_read16(a.modrm_resolve(c))<<16>>16:a.reg16s[c<<1&14];a.reg32s[c>>3&7]=d};table0F_16[192]=table0F_32[192]=function(a){var c=a.read_imm8(),d,e;192>c?(e=a.translate_address_write(a.modrm_resolve(c)),d=a.memory.read8(e)):d=a.reg8[c<<2&12|c>>2&1];d=a.xadd8(d,c>>1&12|c>>5&1);192>c?a.memory.write8(e,d):a.reg8[c<<2&12|c>>2&1]=d}; +table0F_16[193]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4095===(d&4095)?(f=a.translate_address_write(d+1),d=a.virt_boundary_read16(e,f)):d=a.memory.read16(e)):d=a.reg16[c<<1&14];d=a.xadd16(d,c>>2&14);192>c?f?a.virt_boundary_write16(e,f,d):a.memory.write16(e,d):a.reg16[c<<1&14]=d}; +table0F_32[193]=function(a){var c=a.read_imm8(),d,e,f=0;192>c?(d=a.modrm_resolve(c),e=a.translate_address_write(d),a.paging&&4093<=(d&4095)?(f=a.translate_address_write(d+3),d=a.virt_boundary_read32s(e,f)):d=a.memory.read32s(e)):d=a.reg32s[c&7];d=a.xadd32(d,c>>3&7);192>c?f?a.virt_boundary_write32(e,f,d):a.memory.write32(e,d):a.reg32s[c&7]=d};table0F_16[194]=table0F_32[194]=function(a){a.trigger_ud()};table0F_16[195]=table0F_32[195]=function(a){a.trigger_ud()};table0F_16[196]=table0F_32[196]=function(a){a.trigger_ud()}; +table0F_16[197]=table0F_32[197]=function(a){a.trigger_ud()};table0F_16[198]=table0F_32[198]=function(a){a.trigger_ud()};table0F_16[199]=table0F_32[199]=function(a){var c=a.read_imm8();192<=c&&a.trigger_ud();c=a.modrm_resolve(c);a.writable_or_pagefault(c,8);var d=a.safe_read32s(c),e=a.safe_read32s(c+4);a.reg32s[0]===d&&a.reg32s[2]===e?(a.flags|=64,a.safe_write32(c,a.reg32s[3]),a.safe_write32(c+4,a.reg32s[1])):(a.flags&=-65,a.reg32s[0]=d,a.reg32s[2]=e);a.flags_changed&=-65}; +table0F_16[200]=table0F_32[200]=function(a){a.bswap(0)};table0F_16[201]=table0F_32[201]=function(a){a.bswap(1)};table0F_16[202]=table0F_32[202]=function(a){a.bswap(2)};table0F_16[203]=table0F_32[203]=function(a){a.bswap(3)};table0F_16[204]=table0F_32[204]=function(a){a.bswap(4)};table0F_16[205]=table0F_32[205]=function(a){a.bswap(5)};table0F_16[206]=table0F_32[206]=function(a){a.bswap(6)};table0F_16[207]=table0F_32[207]=function(a){a.bswap(7)};table0F_16[208]=table0F_32[208]=function(a){a.trigger_ud()}; +table0F_16[209]=table0F_32[209]=function(a){a.trigger_ud()};table0F_16[210]=table0F_32[210]=function(a){a.trigger_ud()};table0F_16[211]=table0F_32[211]=function(a){a.trigger_ud()};table0F_16[212]=table0F_32[212]=function(a){a.trigger_ud()};table0F_16[213]=table0F_32[213]=function(a){a.trigger_ud()};table0F_16[214]=table0F_32[214]=function(a){a.trigger_ud()};table0F_16[215]=table0F_32[215]=function(a){a.trigger_ud()};table0F_16[216]=table0F_32[216]=function(a){a.trigger_ud()}; +table0F_16[217]=table0F_32[217]=function(a){a.trigger_ud()};table0F_16[218]=table0F_32[218]=function(a){a.trigger_ud()};table0F_16[219]=table0F_32[219]=function(a){a.trigger_ud()};table0F_16[220]=table0F_32[220]=function(a){a.trigger_ud()};table0F_16[221]=table0F_32[221]=function(a){a.trigger_ud()};table0F_16[222]=table0F_32[222]=function(a){a.trigger_ud()};table0F_16[223]=table0F_32[223]=function(a){a.trigger_ud()};table0F_16[224]=table0F_32[224]=function(a){a.trigger_ud()}; +table0F_16[225]=table0F_32[225]=function(a){a.trigger_ud()};table0F_16[226]=table0F_32[226]=function(a){a.trigger_ud()};table0F_16[227]=table0F_32[227]=function(a){a.trigger_ud()};table0F_16[228]=table0F_32[228]=function(a){a.trigger_ud()};table0F_16[229]=table0F_32[229]=function(a){a.trigger_ud()};table0F_16[230]=table0F_32[230]=function(a){a.trigger_ud()};table0F_16[231]=table0F_32[231]=function(a){a.trigger_ud()};table0F_16[232]=table0F_32[232]=function(a){a.trigger_ud()}; +table0F_16[233]=table0F_32[233]=function(a){a.trigger_ud()};table0F_16[234]=table0F_32[234]=function(a){a.trigger_ud()};table0F_16[235]=table0F_32[235]=function(a){a.trigger_ud()};table0F_16[236]=table0F_32[236]=function(a){a.trigger_ud()};table0F_16[237]=table0F_32[237]=function(a){a.trigger_ud()};table0F_16[238]=table0F_32[238]=function(a){a.trigger_ud()};table0F_16[239]=table0F_32[239]=function(a){a.trigger_ud()};table0F_16[240]=table0F_32[240]=function(a){a.trigger_ud()}; +table0F_16[241]=table0F_32[241]=function(a){a.trigger_ud()};table0F_16[242]=table0F_32[242]=function(a){a.trigger_ud()};table0F_16[243]=table0F_32[243]=function(a){a.trigger_ud()};table0F_16[244]=table0F_32[244]=function(a){a.trigger_ud()};table0F_16[245]=table0F_32[245]=function(a){a.trigger_ud()};table0F_16[246]=table0F_32[246]=function(a){a.trigger_ud()};table0F_16[247]=table0F_32[247]=function(a){a.trigger_ud()};table0F_16[248]=table0F_32[248]=function(a){a.trigger_ud()}; +table0F_16[249]=table0F_32[249]=function(a){a.trigger_ud()};table0F_16[250]=table0F_32[250]=function(a){a.trigger_ud()};table0F_16[251]=table0F_32[251]=function(a){a.trigger_ud()};table0F_16[252]=table0F_32[252]=function(a){a.trigger_ud()};table0F_16[253]=table0F_32[253]=function(a){a.trigger_ud()};table0F_16[254]=table0F_32[254]=function(a){a.trigger_ud()};table0F_16[255]=table0F_32[255]=function(a){a.trigger_ud()};"use strict"; +v86.prototype.jmp_rel16=function(a){var c=this.get_seg(1);this.instruction_pointer-=c;this.instruction_pointer=this.instruction_pointer+a&65535;this.instruction_pointer=this.instruction_pointer+c|0;this.last_instr_jump=!0};v86.prototype.jmpcc16=function(a){a?this.jmp_rel16(this.read_imm16()):this.instruction_pointer=this.instruction_pointer+2|0;this.last_instr_jump=!0}; +v86.prototype.jmpcc32=function(a){a?(a=this.read_imm32s(),this.instruction_pointer=this.instruction_pointer+a|0):this.instruction_pointer=this.instruction_pointer+4|0;this.last_instr_jump=!0};v86.prototype.loopne=function(){if(--this.regv[this.reg_vcx]&&!this.getzf()){var a=this.read_imm8s();this.instruction_pointer=this.instruction_pointer+a|0}else this.instruction_pointer++;this.last_instr_jump=!0}; +v86.prototype.loope=function(){if(--this.regv[this.reg_vcx]&&this.getzf()){var a=this.read_imm8s();this.instruction_pointer=this.instruction_pointer+a|0}else this.instruction_pointer++;this.last_instr_jump=!0};v86.prototype.loop=function(){if(--this.regv[this.reg_vcx]){var a=this.read_imm8s();this.instruction_pointer=this.instruction_pointer+a|0}else this.instruction_pointer++;this.last_instr_jump=!0}; +v86.prototype.jcxz=function(){var a=this.read_imm8s();0===this.regv[this.reg_vcx]&&(this.instruction_pointer=this.instruction_pointer+a|0);this.last_instr_jump=!0};v86.prototype.getcf=function(){return this.flags_changed&1?(this.last_op1^(this.last_op1^this.last_op2)&(this.last_op2^this.last_add_result))>>>this.last_op_size&1:this.flags&1};v86.prototype.getpf=function(){return this.flags_changed&4?154020>>((this.last_result^this.last_result>>4)&15)&4:this.flags&4}; +v86.prototype.getaf=function(){return this.flags_changed&16?(this.last_op1^this.last_op2^this.last_add_result)&16:this.flags&16};v86.prototype.getzf=function(){return this.flags_changed&64?(~this.last_result&this.last_result-1)>>>this.last_op_size&1:this.flags&64};v86.prototype.getsf=function(){return this.flags_changed&128?this.last_result>>>this.last_op_size&1:this.flags&128}; +v86.prototype.getof=function(){return this.flags_changed&2048?((this.last_op1^this.last_add_result)&(this.last_op2^this.last_add_result))>>>this.last_op_size&1:this.flags&2048};v86.prototype.test_o=v86.prototype.getof;v86.prototype.test_b=v86.prototype.getcf;v86.prototype.test_z=v86.prototype.getzf;v86.prototype.test_s=v86.prototype.getsf;v86.prototype.test_p=v86.prototype.getpf;v86.prototype.test_be=function(){return this.getcf()||this.getzf()}; +v86.prototype.test_l=function(){return!this.getsf()!==!this.getof()};v86.prototype.test_le=function(){return this.getzf()||!this.getsf()!==!this.getof()};v86.prototype.push16=function(a){var c=this.get_stack_pointer(-2);this.safe_write16(c,a);this.stack_reg[this.reg_vsp]-=2};v86.prototype.push32=function(a){var c=this.get_stack_pointer(-4);this.safe_write32(c,a);this.stack_reg[this.reg_vsp]-=4}; +v86.prototype.pop16=function(){var a=this.get_seg(2)+this.stack_reg[this.reg_vsp]|0,a=this.safe_read16(a);this.stack_reg[this.reg_vsp]+=2;return a};v86.prototype.pop32s=function(){var a=this.get_seg(2)+this.stack_reg[this.reg_vsp]|0,a=this.safe_read32s(a);this.stack_reg[this.reg_vsp]+=4;return a}; +v86.prototype.pusha16=function(){var a=this.reg16[8];this.translate_address_write(this.get_seg(2)+a-15|0);this.push16(this.reg16[0]);this.push16(this.reg16[2]);this.push16(this.reg16[4]);this.push16(this.reg16[6]);this.push16(a);this.push16(this.reg16[10]);this.push16(this.reg16[12]);this.push16(this.reg16[14])}; +v86.prototype.pusha32=function(){var a=this.reg32s[4];this.translate_address_write(this.get_seg(2)+a-31|0);this.push32(this.reg32s[0]);this.push32(this.reg32s[1]);this.push32(this.reg32s[2]);this.push32(this.reg32s[3]);this.push32(a);this.push32(this.reg32s[5]);this.push32(this.reg32s[6]);this.push32(this.reg32s[7])}; +v86.prototype.popa16=function(){this.translate_address_read(this.get_seg(2)+this.stack_reg[this.reg_vsp]+15|0);this.reg16[14]=this.pop16();this.reg16[12]=this.pop16();this.reg16[10]=this.pop16();this.stack_reg[this.reg_vsp]+=2;this.reg16[6]=this.pop16();this.reg16[4]=this.pop16();this.reg16[2]=this.pop16();this.reg16[0]=this.pop16()}; +v86.prototype.popa32=function(){this.translate_address_read(this.get_seg(2)+this.stack_reg[this.reg_vsp]+31|0);this.reg32s[7]=this.pop32s();this.reg32s[6]=this.pop32s();this.reg32s[5]=this.pop32s();this.stack_reg[this.reg_vsp]+=4;this.reg32s[3]=this.pop32s();this.reg32s[2]=this.pop32s();this.reg32s[1]=this.pop32s();this.reg32s[0]=this.pop32s()};v86.prototype.xchg8=function(a,c){var d=c>>1&12|c>>5&1,e=this.reg8[d];this.reg8[d]=a;return e}; +v86.prototype.xchg16=function(a,c){var d=c>>2&14,e=this.reg16[d];this.reg16[d]=a;return e};v86.prototype.xchg16r=function(a){var c=this.reg16[0];this.reg16[0]=this.reg16[a];this.reg16[a]=c};v86.prototype.xchg32=function(a,c){var d=c>>3&7,e=this.reg32s[d];this.reg32s[d]=a;return e};v86.prototype.xchg32r=function(a){var c=this.reg32s[0];this.reg32s[0]=this.reg32s[a];this.reg32s[a]=c}; +v86.prototype.lss16=function(a,c,d){var e=this.safe_read16(c);c=this.safe_read16(c+2|0);this.switch_seg(a,c);this.reg16[d]=e};v86.prototype.lss32=function(a,c,d){var e=this.safe_read32s(c);c=this.safe_read16(c+4|0);this.switch_seg(a,c);this.reg32s[d]=e}; +v86.prototype.enter16=function(){var a=this.read_imm16(),c=this.read_imm8()&31,d,e;this.push16(this.reg16[10]);d=this.reg16[8];if(0>>24|c<<24|c>>8&65280|c<<8&16711680};v86.prototype.run=function(){this.running||this.v86$next_tick()}; +v86.prototype.main_run=function(){if(this.stopped)this.stopped=this.running=!1;else{this.running=!0;try{this.in_hlt?this.hlt_loop():this.do_run()}catch(a){this.exception_cleanup(a)}}};v86.prototype.stop=function(){this.running&&(this.stopped=!0)};v86.prototype.restart=function(){var a=this.running,c=this;this.stopped=!0;this.running=!1;setTimeout(function(){c.devices.ps2.destroy();c.devices.vga.destroy();c.init(c.current_settings);a&&c.v86$next_tick()},10)}; +v86.prototype.exception_cleanup=function(a){if(233495534===a)this.page_fault=!1,this.repeat_string_prefix=0,this.segment_prefix=-1,this.address_size_32=this.is_32,this.update_address_size(),this.operand_size_32=this.is_32,this.update_operand_size(),this.v86$next_tick();else throw this.running=!1,console.log(a),console.log(a.stack),a;};v86.prototype.reboot_internal=function(){this.devices.ps2.destroy();this.devices.vga.destroy();this.init(this.current_settings);throw 233495534;}; +v86.prototype.lazy_init=function(){var a=this;"undefined"!==typeof setImmediate?this.v86$next_tick=function(){setImmediate(function(){a.main_run()})}:"undefined"!==typeof window&&"undefined"!==typeof postMessage?(window.addEventListener("message",function(c){c.source===window&&43605===c.data&&a.main_run()},!1),this.v86$next_tick=function(){window.postMessage(43605,"*")}):this.v86$next_tick=function(){setTimeout(function(){a.main_run()},0)};"object"===typeof performance&&performance.now?this.microtick= +function(){return performance.now()}:this.microtick=Date.now}; +v86.prototype.init=function(a){this.first_init&&(this.first_init=!1,this.lazy_init());this.current_settings=a;this.memory_size=a.memory_size||67108864;this.memory=new Memory(new ArrayBuffer(this.memory_size),this.memory_size);this.segment_is_null=new Uint8Array(8);this.segment_limits=new Uint32Array(8);this.segment_offsets=new Int32Array(8);this.tlb_data=new Int32Array(1048576);this.tlb_info=new Uint8Array(1048576);this.tlb_info_global=new Uint8Array(1048576);this.reg32s=new Int32Array(8);this.reg32= +new Uint32Array(this.reg32s.buffer);this.reg16s=new Int16Array(this.reg32s.buffer);this.reg16=new Uint16Array(this.reg32s.buffer);this.reg8s=new Int8Array(this.reg32s.buffer);this.reg8=new Uint8Array(this.reg32s.buffer);this.sreg=new Uint16Array(8);this.dreg=new Int32Array(8);this.protected_mode=!1;this.gdtr_offset=this.gdtr_size=this.idtr_offset=this.idtr_size=0;this.page_fault=!1;this.cr0=1610612752;this.cr4=this.cr3=this.cr2=0;this.dreg[6]=-61456;this.dreg[7]=1024;this.cpl=0;this.paging=!1;this.page_size_extensions= +0;this.address_size_32=this.stack_size_32=this.operand_size_32=this.is_32=!1;this.paging_changed();this.update_operand_size();this.update_address_size();this.stack_reg=this.reg16;this.reg_vsp=8;this.reg_vbp=10;this.previous_ip=this.timestamp_counter=0;this.stopped=this.running=this.in_hlt=!1;this.sysenter_eip=this.sysenter_esp=this.sysenter_cs=0;this.segment_prefix=-1;this.repeat_string_prefix=0;this.flags=2;this.last_op_size=this.last_op2=this.last_op1=this.last_add_result=this.last_result=this.flags_changed= +0;this.tsc_offset=this.microtick();var c=new IO(this.memory);this.io=c;var d=a.bios,e=a.vga_bios;if(d){var f=new Uint8Array(d);this.memory.mem8.set(f,1048576-d.byteLength);e&&(f=new Uint8Array(e),this.memory.mem8.set(f,786432));c.mmap_register(4293918720,1048576,function(a){return this.memory.mem8[a&1048575]}.bind(this),function(a,c){this.memory.mem8[a&1048575]=c}.bind(this));this.instruction_pointer=1048560;this.switch_seg(2,48);this.reg16[8]=256}else a.linux?(this.instruction_pointer=65536,this.memory.write_blob(new Uint8Array(a.linux.vmlinux), +1048576),this.memory.write_blob(new Uint8Array(a.linux.linuxstart),this.instruction_pointer),a.linux.root&&(this.memory.write_blob(new Uint8Array(a.linux.root),4194304),this.reg32s[3]=a.linux.root.byteLength),this.memory.write_string(a.linux.cmdline),this.reg32s[0]=this.memory_size,this.reg32s[1]=63488,this.switch_seg(1,0),this.switch_seg(2,0),this.switch_seg(3,0),this.switch_seg(0,0),this.switch_seg(5,0),this.switch_seg(4,0),this.protected_mode=this.stack_size_32=this.operand_size_32=this.address_size_32= +this.is_32=!0,this.update_operand_size(),this.update_address_size(),this.regv=this.reg32s,this.reg_vsp=4,this.reg_vbp=5,this.cr0=1):(this.switch_seg(2,48),this.reg16[8]=256,this.instruction_pointer=0);var g=0;c.register_read(146,this,function(){return g});c.register_write(146,this,function(a){g=a});this.devices={};a.load_devices&&(this.devices.pic=new PIC(this),this.devices.pci=new PCI(this),this.devices.dma=new DMA(this),this.devices.acpi=new ACPI,this.devices.vga=new VGAScreen(this,a.screen_adapter, +a.vga_memory_size||8388608),this.devices.ps2=new PS2(this,a.keyboard_adapter,a.mouse_adapter),this.fpu=new FPU(this),this.devices.uart=a.serial_adapter?new UART(this,1016,a.serial_adapter):new UART(this,1016,{put_line:function(){},init:function(){}}),this.devices.fdc=new FloppyController(this,a.fda),a.cdrom&&(this.devices.cdrom=new IDEDevice(this,a.cdrom,!0,1)),a.hda&&(this.devices.hda=new IDEDevice(this,a.hda,!1,0)),this.devices.pit=new PIT(this),this.devices.rtc=new RTC(this,this.devices.fdc.type, +a.boot_order||531),a.network_adapter&&(this.devices.net=new Ne2k(this,a.network_adapter)),a.fs9p&&(this.devices.virtio=new VirtIO(this,a.fs9p)))};v86.prototype.do_run=function(){var a=Date.now(),c=a;for(this.devices.vga.timer(c);33>c-a;){this.devices.pit.timer(c,!1);this.devices.rtc.timer(c,!1);this.handle_irqs();for(c=11001;c--;)this.cycle();c=Date.now()}this.v86$next_tick()}; +"undefined"!==typeof window&&(window.__no_inline1=v86.prototype.do_run,window.__no_inline2=v86.prototype.exception_cleanup,window.__no_inline3=v86.prototype.hlt_loop);v86.prototype.cycle=function(){this.timestamp_counter++;this.previous_ip=this.instruction_pointer;var a=this.read_imm8();this.table[a](this)};v86.prototype.do_op=function(){this.table[this.read_imm8()](this)}; +v86.prototype.hlt_loop=function(){var a=Date.now();this.devices.pit.timer(a,!1);this.devices.rtc.timer(a,!1);this.devices.vga.timer(a);if(this.in_hlt){var c=this;setTimeout(function(){c.hlt_loop()},0)}else this.v86$next_tick()};v86.prototype.cr0_changed=function(){var a=-2147483648===(this.cr0&-2147483648);this.fpu||(this.cr0|=4);this.cr0|=16;a!==this.paging&&(this.paging=a,this.full_clear_tlb())};v86.prototype.paging_changed=function(){this.last_virt_eip=-1}; +v86.prototype.cpl_changed=function(){this.last_virt_eip=-1};v86.prototype.read_imm8=function(){this.instruction_pointer&-4096^this.last_virt_eip&&(this.eip_phys=this.translate_address_read(this.instruction_pointer)^this.instruction_pointer,this.last_virt_eip=this.instruction_pointer&-4096);var a=this.memory.mem8[this.eip_phys^this.instruction_pointer]|0;this.instruction_pointer=this.instruction_pointer+1|0;return a};v86.prototype.read_imm8s=function(){return this.read_imm8()<<24>>24}; +v86.prototype.read_imm16=function(){if(4094<(this.instruction_pointer^this.last_virt_eip)>>>0)return this.read_imm8()|this.read_imm8()<<8;var a=this.memory.read16(this.eip_phys^this.instruction_pointer);this.instruction_pointer=this.instruction_pointer+2|0;return a};v86.prototype.read_imm16s=function(){return this.read_imm16()<<16>>16}; +v86.prototype.read_imm32s=function(){if(4092<(this.instruction_pointer^this.last_virt_eip)>>>0)return this.read_imm16()|this.read_imm16()<<16;var a=this.memory.read32s(this.eip_phys^this.instruction_pointer);this.instruction_pointer=this.instruction_pointer+4|0;return a};v86.prototype.virt_boundary_read16=function(a,c){return this.memory.read8(a)|this.memory.read8(c)<<8}; +v86.prototype.virt_boundary_read32s=function(a,c){var d;d=a&1?a&2?this.memory.read_aligned16(c-2>>1):this.memory.read_aligned16(a+1>>1):this.virt_boundary_read16(a+1,c-1);return this.memory.read8(a)|d<<8|this.memory.read8(c)<<24};v86.prototype.virt_boundary_write16=function(a,c,d){this.memory.write8(a,d);this.memory.write8(c,d>>8)}; +v86.prototype.virt_boundary_write32=function(a,c,d){this.memory.write8(a,d);this.memory.write8(c,d>>24);a&1?a&2?(this.memory.write8(c-2,d>>8),this.memory.write8(c-1,d>>16)):(this.memory.write8(a+1,d>>8),this.memory.write8(a+2,d>>16)):(this.memory.write8(a+1,d>>8),this.memory.write8(c-1,d>>16))};v86.prototype.safe_read8=function(a){return this.memory.read8(this.translate_address_read(a))}; +v86.prototype.safe_read16=function(a){return this.paging&&4095===(a&4095)?this.safe_read8(a)|this.safe_read8(a+1)<<8:this.memory.read16(this.translate_address_read(a))};v86.prototype.safe_read32s=function(a){return this.paging&&4093<=(a&4095)?this.safe_read16(a)|this.safe_read16(a+2)<<16:this.memory.read32s(this.translate_address_read(a))};v86.prototype.safe_write8=function(a,c){this.memory.write8(this.translate_address_write(a),c)}; +v86.prototype.safe_write16=function(a,c){var d=this.translate_address_write(a);4095===(a&4095)?this.virt_boundary_write16(d,this.translate_address_write(a+1),c):this.memory.write16(d,c)};v86.prototype.safe_write32=function(a,c){var d=this.translate_address_write(a);4093<=(a&4095)?this.virt_boundary_write32(d,this.translate_address_write(a+3),c):this.memory.write32(d,c)}; +v86.prototype.read_moffs=function(){return this.address_size_32?this.get_seg_prefix(3)+this.read_imm32s()|0:this.get_seg_prefix(3)+this.read_imm16()|0};v86.prototype.getiopl=function(){return this.flags>>12&3};v86.prototype.vm86_mode=function(){return!!(this.flags&131072)};v86.prototype.get_eflags=function(){return this.flags&-2262|!!this.getcf()|!!this.getpf()<<2|!!this.getaf()<<4|!!this.getzf()<<6|!!this.getsf()<<7|!!this.getof()<<11}; +v86.prototype.load_eflags=function(){this.flags=this.get_eflags();this.flags_changed=0};v86.prototype.update_eflags=function(a){var c=1769472,d=2588629;this.flags&131072?(c|=12288,d|=1572864):this.cpl&&(c|=12288,this.cpl>this.getiopl()&&(c|=512));this.flags=(a^(this.flags^a)&c)&d|2;this.flags_changed=0};v86.prototype.get_stack_pointer=function(a){return this.get_seg(2)+this.stack_reg[this.reg_vsp]+a|0};v86.prototype.get_real_eip=function(){return this.instruction_pointer-this.get_seg(1)|0}; +v86.prototype.call_interrupt_vector=function(a,c,d){this.in_hlt=!1;if(this.protected_mode){if(this.vm86_mode()&&this.cr4&1)throw this.debug.unimpl("VME");this.vm86_mode()&&c&&3>this.getiopl()&&this.trigger_gp(0);if((a<<3|7)>this.idtr_size)throw this.debug.unimpl("#GP handler");var e=this.idtr_offset+(a<<3)|0;this.paging&&(e=this.translate_address_system_read(e));var f=this.memory.read16(e)|this.memory.read16(e+6)<<16,g=this.memory.read16(e+2),e=this.memory.read8(e+5),k=e>>5&3;if(0===(e&128))throw this.debug.unimpl("#NP handler"); +c&&kthis.cpl)throw this.debug.unimpl("#GP handler");if(!c.is_present)throw this.debug.unimpl("#NP handler"); +this.load_eflags();e=this.flags;if(!c.dc_bit&&c.dplthis.segment_limits[6])throw this.debug.unimpl("#TS handler");m=m+this.segment_offsets[6]|0;this.paging&&(m=this.translate_address_system_read(m));var k=this.memory.read32s(m),m=this.memory.read16(m+4),l=this.lookup_segment_selector(m);if(l.is_null)throw this.debug.unimpl("#TS handler");if(l.rpl!==c.dpl)throw this.debug.unimpl("#TS handler");if(l.dpl!==c.dpl||!l.rw_bit)throw this.debug.unimpl("#TS handler");if(!l.is_present)throw this.debug.unimpl("#TS handler"); +var l=this.reg32s[4],n=this.sreg[2];this.cpl=c.dpl;this.cpl_changed();this.is_32!==c.size&&this.update_cs_size(c.size);this.flags&=-196609;this.reg32s[4]=k;this.switch_seg(2,m);e&131072&&(this.push32(this.sreg[5]),this.push32(this.sreg[4]),this.push32(this.sreg[3]),this.push32(this.sreg[0]));this.push32(n);this.push32(l)}else if(c.dc_bit||c.dpl===this.cpl)this.flags&131072&&this.trigger_gp(g&-4);else throw this.debug.unimpl("#GP handler");this.push32(e);this.push32(this.sreg[1]);this.push32(this.get_real_eip()); +e&131072&&(this.switch_seg(5,0),this.switch_seg(4,0),this.switch_seg(3,0),this.switch_seg(0,0));!1!==d&&this.push32(d);this.sreg[1]=g;this.is_32!==c.size&&this.update_cs_size(c.size);this.segment_limits[1]=c.effective_limit;this.segment_offsets[1]=c.base;this.instruction_pointer=this.get_seg(1)+f|0;a?this.handle_irqs():this.flags&=-513}else this.load_eflags(),this.push16(this.flags),this.push16(this.sreg[1]),this.push16(this.get_real_eip()),this.flags&=-513,this.switch_seg(1,this.memory.read16((a<< +2)+2)),this.instruction_pointer=this.get_seg(1)+this.memory.read16(a<<2)|0;this.last_instr_jump=!0};v86.prototype.iret16=function(){if(!this.protected_mode||this.vm86_mode()&&3===this.getiopl()){var a=this.pop16();this.switch_seg(1,this.pop16());var c=this.pop16();this.instruction_pointer=a+this.get_seg(1)|0;this.update_eflags(c);this.handle_irqs()}else throw this.vm86_mode()&&this.trigger_gp(0),this.debug.unimpl("16 bit iret in protected mode");this.last_instr_jump=!0}; +v86.prototype.iret32=function(){if(!this.protected_mode||this.vm86_mode()&&3===this.getiopl()){var a=this.pop32s();this.switch_seg(1,this.pop32s()&65535);var c=this.pop32s();this.instruction_pointer=a+this.get_seg(1)|0;this.update_eflags(c);this.handle_irqs()}else{this.vm86_mode()&&this.trigger_gp(0);this.instruction_pointer=this.pop32s();this.sreg[1]=this.pop32s();c=this.pop32s();if(c&131072){if(0===this.cpl){this.update_eflags(c);this.flags|=131072;this.switch_seg(1,this.sreg[1]);this.instruction_pointer= +this.instruction_pointer+this.get_seg(1)|0;var a=this.pop32s(),d=this.pop32s();this.switch_seg(0,this.pop32s()&65535);this.switch_seg(3,this.pop32s()&65535);this.switch_seg(4,this.pop32s()&65535);this.switch_seg(5,this.pop32s()&65535);this.reg32s[4]=a;this.switch_seg(2,d&65535);this.cpl=3;this.update_cs_size(!1);return}c&=-131073}var e=this.lookup_segment_selector(this.sreg[1]);if(e.is_null)throw this.debug.unimpl("is null");if(!e.is_present)throw this.debug.unimpl("not present");if(!e.is_executable)throw this.debug.unimpl("not exec"); +if(e.rple.rpl)throw this.debug.unimpl("conforming and dpl > rpl");e.rpl>this.cpl?(a=this.pop32s(),d=this.pop32s(),this.reg32s[4]=a,this.update_eflags(c),this.cpl=e.rpl,this.switch_seg(2,d&65535),this.cpl_changed()):this.update_eflags(c);e.size!==this.is_32&&this.update_cs_size(e.size);this.segment_limits[1]=e.effective_limit;this.segment_offsets[1]=e.base;this.instruction_pointer=this.instruction_pointer+this.get_seg(1)|0;this.handle_irqs(); +this.last_instr_jump=!0}};v86.prototype.hlt_op=function(){this.cpl&&this.trigger_gp(0);if(0===(this.flags&512))throw this.debug.show("cpu halted"),this.stopped=!0,"HALT";this.in_hlt=!0;throw 233495534;};v86.prototype.raise_exception=function(a){this.call_interrupt_vector(a,!1,!1);throw 233495534;};v86.prototype.raise_exception_with_code=function(a,c){this.call_interrupt_vector(a,!1,c);throw 233495534;};v86.prototype.trigger_de=function(){this.instruction_pointer=this.previous_ip;this.raise_exception(0)}; +v86.prototype.trigger_ud=function(){this.instruction_pointer=this.previous_ip;this.raise_exception(6)};v86.prototype.trigger_nm=function(){this.instruction_pointer=this.previous_ip;this.raise_exception(7)};v86.prototype.trigger_gp=function(a){this.instruction_pointer=this.previous_ip;this.raise_exception_with_code(13,a)};v86.prototype.trigger_np=function(a){this.instruction_pointer=this.previous_ip;this.raise_exception_with_code(11,a)}; +v86.prototype.trigger_ss=function(a){this.instruction_pointer=this.previous_ip;this.raise_exception_with_code(12,a)};v86.prototype.seg_prefix=function(a){this.segment_prefix=a;this.table[this.read_imm8()](this);this.segment_prefix=-1};v86.prototype.get_seg_prefix_ds=function(){return this.get_seg_prefix(3)};v86.prototype.get_seg_prefix_ss=function(){return this.get_seg_prefix(2)};v86.prototype.get_seg_prefix=function(a){return-1===this.segment_prefix?this.get_seg(a):9===this.segment_prefix?0:this.get_seg(this.segment_prefix)}; +v86.prototype.get_seg=function(a){return this.segment_offsets[a]};v86.prototype.handle_irqs=function(){this.devices.pic&&this.flags&512&&!this.page_fault&&this.devices.pic.check_irqs()}; +v86.prototype.test_privileges_for_io=function(a,c){if(this.protected_mode&&(this.cpl>this.getiopl()||this.flags&131072)){var d=this.segment_limits[6],e=this.segment_offsets[6];if(103<=d){var f=this.memory.read16(this.translate_address_system_read(e+100+2));if(d>=f+(a+c-1>>3)&&(d=(1<>3)),!((d&65280?this.memory.read16(e):this.memory.read8(e))&d)))return}this.trigger_gp(0)}}; +v86.prototype.cpuid=function(){var a=0,c=0,d=0,e=0;switch(this.reg32s[0]){case 0:a=5;e=1970169159;d=1231384169;c=1818588270;break;case 1:a=3939;e=0;c=8388608;d=(this.fpu?1:0)|43322;break;case 2:a=1717260289;c=e=0;d=8024064;break;case -2147483648:a=5}this.reg32s[0]=a;this.reg32s[1]=c;this.reg32s[2]=d;this.reg32s[3]=e};v86.prototype.update_cs_size=function(a){this.is_32=this.operand_size_32=this.address_size_32=a;this.update_operand_size();this.update_address_size()}; +v86.prototype.update_operand_size=function(){this.operand_size_32?(this.table=this.table32,this.table0F=this.table0F_32):(this.table=this.table16,this.table0F=this.table0F_16)};v86.prototype.update_address_size=function(){this.address_size_32?(this.regv=this.reg32s,this.reg_vcx=1,this.reg_vsi=6,this.reg_vdi=7):(this.regv=this.reg16,this.reg_vcx=2,this.reg_vsi=12,this.reg_vdi=14)}; +v86.prototype.lookup_segment_selector=function(a){var c=0===(a&4),d=a&-8,e,f;e={rpl:a&3,from_gdt:c,is_null:!1,is_valid:!0,base:0,access:0,flags:0,type:0,dpl:0,is_system:!1,is_present:!1,is_executable:!1,rw_bit:!1,dc_bit:!1,size:!1,effective_limit:0,is_writable:!1,is_readable:!1,table_offset:0};c?(c=this.gdtr_offset,f=this.gdtr_size):(c=this.segment_offsets[7],f=this.segment_limits[7]);if(0===d)return e.is_null=!0,e;if((a|7)>f)return e.is_valid=!1,e;c=c+d|0;this.paging&&(c=this.translate_address_system_read(c)); +e.table_offset=c;e.base=this.memory.read16(c+2)|this.memory.read8(c+4)<<16|this.memory.read8(c+7)<<24;e.access=this.memory.read8(c+5);e.flags=this.memory.read8(c+6)>>4;e.type=e.access&15;e.dpl=e.access>>5&3;e.is_system=0===(e.access&16);e.is_present=128===(e.access&128);e.is_executable=8===(e.access&8);e.rw_bit=2===(e.access&2);e.dc_bit=4===(e.access&4);e.size=4===(e.flags&4);a=this.memory.read16(c)|(this.memory.read8(c+6)&15)<<16;e.effective_limit=e.flags&8?(a<<12|4095)>>>0:a;e.is_writable=e.rw_bit&& +!e.is_executable;e.is_readable=e.rw_bit||!e.is_executable;return e}; +v86.prototype.switch_seg=function(a,c){1===a&&(this.protected_mode=1===(this.cr0&1));if(!this.protected_mode||this.vm86_mode())this.sreg[a]=c,this.segment_is_null[a]=0,this.segment_limits[a]=1048575,this.segment_offsets[a]=c<<4;else{var d=this.lookup_segment_selector(c);if(2===a){if(d.is_null){this.trigger_gp(0);return}if(!d.is_valid||d.is_system||d.rpl!==this.cpl||!d.is_writable||d.dpl!==this.cpl){this.trigger_gp(c&-4);return}if(!d.is_present){this.trigger_ss(c&-4);return}(this.stack_size_32=d.size)? +(this.stack_reg=this.reg32s,this.reg_vsp=4,this.reg_vbp=5):(this.stack_reg=this.reg16,this.reg_vsp=8,this.reg_vbp=10)}else if(1===a){if(!d.is_executable)throw this.debug.unimpl("#GP handler");if(d.is_system)throw this.debug.unimpl("load system segment descriptor, type = "+(d.access&15));if(d.rpl!==this.cpl)throw this.debug.unimpl("privilege change");if(!d.dc_bit&&d.dpld.dpl&&this.cpl>d.dpl){this.trigger_gp(c&-4);return}if(!d.is_present){this.trigger_np(c&-4);return}}this.segment_is_null[a]=0;this.segment_limits[a]=d.effective_limit;this.segment_offsets[a]=d.base;this.sreg[a]=c}}; +v86.prototype.load_tr=function(a){var c=this.lookup_segment_selector(a);if(!c.from_gdt)throw this.debug.unimpl("TR can only be loaded from GDT");if(c.is_null)throw this.debug.unimpl("#GP handler");if(!c.is_present)throw this.debug.unimpl("#GP handler");if(!c.is_system)throw this.debug.unimpl("#GP handler");if(9!==c.type)throw this.debug.unimpl("#GP handler");this.segment_offsets[6]=c.base;this.segment_limits[6]=c.effective_limit;this.sreg[6]=a;this.memory.write8(c.table_offset+5,this.memory.read8(c.table_offset+ +5)|2)};v86.prototype.load_ldt=function(a){var c=this.lookup_segment_selector(a);if(c.is_null)this.segment_offsets[7]=0,this.segment_limits[7]=0;else{if(!c.from_gdt)throw this.debug.unimpl("LDTR can only be loaded from GDT");if(!c.is_present)throw this.debug.unimpl("#GP handler");if(!c.is_system)throw this.debug.unimpl("#GP handler");if(2!==c.type)throw this.debug.unimpl("#GP handler");this.segment_offsets[7]=c.base;this.segment_limits[7]=c.effective_limit;this.sreg[7]=a}}; +v86.prototype.arpl=function(a,c){this.flags_changed&=-65;if((a&3)<(this.reg16[c]&3))return this.flags|=64,a&-4|this.reg16[c]&3;this.flags&=-65;return a};v86.prototype.clear_tlb=function(){this.last_virt_eip=-1;this.tlb_info.set(this.tlb_info_global)};v86.prototype.full_clear_tlb=function(){for(var a=new Int32Array(this.tlb_info_global.buffer),c=0;262144>c;)a[c++]=a[c++]=a[c++]=a[c++]=0;this.clear_tlb()}; +v86.prototype.invlpg=function(a){a=a>>>12;this.tlb_info[a]=0;this.tlb_info_global[a]=0;this.last_virt_eip=-1};v86.prototype.translate_address_read=function(a){return this.paging?3===this.cpl?this.translate_address_user_read(a):this.translate_address_system_read(a):a};v86.prototype.translate_address_write=function(a){return this.paging?3===this.cpl?this.translate_address_user_write(a):this.translate_address_system_write(a):a}; +v86.prototype.translate_address_user_write=function(a){var c=a>>>12;return this.tlb_info[c]&8?this.tlb_data[c]^a:this.do_page_translation(a,1,1)|a&4095};v86.prototype.translate_address_user_read=function(a){var c=a>>>12;return this.tlb_info[c]&4?this.tlb_data[c]^a:this.do_page_translation(a,0,1)|a&4095};v86.prototype.translate_address_system_write=function(a){var c=a>>>12;return this.tlb_info[c]&2?this.tlb_data[c]^a:this.do_page_translation(a,1,0)|a&4095}; +v86.prototype.translate_address_system_read=function(a){var c=a>>>12;return this.tlb_info[c]&1?this.tlb_data[c]^a:this.do_page_translation(a,0,0)|a&4095}; +v86.prototype.do_page_translation=function(a,c,d){var e=a>>>12,f=(this.cr3>>>2)+(e>>10),g=this.memory.mem32s[f],k=!0,m=!0;g&1||(this.cr2=a,this.trigger_pagefault(c,d,0));0===(g&2)&&(k=!1,c&&(d||this.cr0&65536)&&(this.cr2=a,this.trigger_pagefault(c,d,1)));0===(g&4)&&(m=!1,d&&(this.cr2=a,this.trigger_pagefault(c,d,1)));if(g&this.page_size_extensions)this.memory.mem32s[f]=g|32|c<<6,a=g&4290772992|a&4190208,g=g&256;else{var l=((g&4294963200)>>>2)+(e&1023),n=this.memory.mem32s[l];0===(n&1)&&(this.cr2= +a,this.trigger_pagefault(c,d,0));0===(n&2)&&(k=!1,c&&(d||this.cr0&65536)&&(this.cr2=a,this.trigger_pagefault(c,d,1)));0===(n&4)&&(m=!1,d&&(this.cr2=a,this.trigger_pagefault(c,d,1)));this.memory.mem32s[f]=g|32;this.memory.mem32s[l]=n|32|c<<6;a=n&4294963200;g=n&256}this.tlb_data[e]=a^e<<12;k=m?k?15:5:k?3:1;this.tlb_info[e]=k;g&&this.cr4&128&&(this.tlb_info_global[e]=k);return a}; +v86.prototype.writable_or_pagefault=function(a,c){if(this.paging){var d=3===this.cpl?1:0,e=d?8:2,f=a>>>12;0===(this.tlb_info[f]&e)&&this.do_page_translation(a,1,d);4096<=(a&4095)+c-1&&0===(this.tlb_info[f+1]&e)&&this.do_page_translation(a+c-1,1,d)}}; +v86.prototype.trigger_pagefault=function(a,c,d){if(this.page_fault)throw this.debug.unimpl("Double fault");var e=this.cr2>>>12;this.tlb_info[e]=0;this.tlb_info_global[e]=0;this.instruction_pointer=this.previous_ip;this.page_fault=!0;this.call_interrupt_vector(14,!1,c<<2|a<<1|d);throw 233495534;};function IO(a){function c(){return 255}function d(){return 65535}function e(){return-1}function f(){}var g=a.size;this.IO$ports=[];this.devices=Array(65536);for(var k=0;65536>k;k++)this.IO$ports[k]={read8:c,read16:d,read32:e,write8:f,write16:f,write32:f,device:void 0};this.register_read=function(a,c,d,e,f){d&&(this.IO$ports[a].read8=d);e&&(this.IO$ports[a].read16=e);f&&(this.IO$ports[a].read32=f);this.IO$ports[a].device=c};this.register_write=function(a,c,d,e,f){d&&(this.IO$ports[a].write8=d);e&& +(this.IO$ports[a].write16=e);f&&(this.IO$ports[a].write32=f);this.IO$ports[a].device=c};this.register_read_consecutive=function(a,c,d,e,f,g){function k(){return d.call(this)|e.call(this)<<8}function t(){return f.call(this)|g.call(this)<<8}function x(){return d.call(this)|e.call(this)<<8|f.call(this)<<16|g.call(this)<<24}f&&g?(this.register_read(a,c,d,k,x),this.register_read(a+1,c,e),this.register_read(a+2,c,f,t),this.register_read(a+3,c,g)):(this.register_read(a,c,d,k),this.register_read(a+1,c,e))}; +this.register_write_consecutive=function(a,c,d,e,f,g){function k(a){d.call(this,a&255);e.call(this,a>>8&255)}function t(a){f.call(this,a&255);g.call(this,a>>8&255)}function x(a){d.call(this,a&255);e.call(this,a>>8&255);f.call(this,a>>16&255);g.call(this,a>>>24)}f&&g?(this.register_write(a,c,d,k,x),this.register_write(a+1,c,e),this.register_write(a+2,c,f,t),this.register_write(a+3,c,g)):(this.register_write(a,c,d,k),this.register_write(a+1,c,e))};this.mmap_read32_shim=function(c){var d=a.memory_map_read8[c>>> +14];return d(c)|d(c+1)<<8|d(c+2)<<16|d(c+3)<<24};this.mmap_write32_shim=function(c,d){var e=a.memory_map_write8[c>>>14];e(c,d&255);e(c+1,d>>8&255);e(c+2,d>>16&255);e(c+3,d>>>24)};this.mmap_register=function(c,d,e,f,g,k){g||(g=this.mmap_read32_shim);k||(k=this.mmap_write32_shim);for(c>>>=14;0>>=0;var e=c+(d>>>0);if(e>=g)return!0;for(c&=-16384;c>14])return!0;c+=16384}return!1};this.port_write8=function(a,c){var d=this.IO$ports[a];d.write8.call(d.device,c)};this.port_write16=function(a,c){var d=this.IO$ports[a];d.write16.call(d.device,c)};this.port_write32= +function(a,c){var d=this.IO$ports[a];d.write32.call(d.device,c)};this.port_read8=function(a){a=this.IO$ports[a];return a.read8.call(a.device)};this.port_read16=function(a){a=this.IO$ports[a];return a.read16.call(a.device)};this.port_read32=function(a){a=this.IO$ports[a];return a.read32.call(a.device)}};Object.fromList=function(){for(var a=[[1,""],[2,"CPU"],[32768,"DISK"],[4,"FPU"],[8,"MEM"],[16,"DMA"],[32,"IO"],[64,"PS2"],[128,"PIC"],[256,"VGA"],[512,"PIT"],[1024,"MOUS"],[2048,"PCI"],[4096,"BIOS"],[8192,"CD"],[16384,"SERI"],[65536,"RTC"],[131072,"HPET"],[262144,"ACPI"],[524288,"APIC"],[1048576,"NET"],[2097152,"VIO"]],c={},d=0;di;i++)i&i-1||b++,int_log2_table[i]=b; +Math.int_log2=function(a){var c=a>>>16;if(c){var d=c>>>8;return d?24+int_log2_table[d]:16+int_log2_table[c]}return(d=a>>>8)?8+int_log2_table[d]:int_log2_table[a]};function ByteQueue(a){var c=new Uint8Array(a),d,e;this.length=0;this.push=function(d){this.length!==a&&this.length++;c[e]=d;e=e+1&a-1};this.shift=function(){if(this.length){var e=c[d];d=d+1&a-1;this.length--;return e}return-1};this.ByteQueue$clear=function(){this.length=e=d=0};this.ByteQueue$clear()} +Array.setify=function(a){for(var c={},d=0;da||(this._status_word=a>c?this._status_word|256:c===a?this._status_word|16384:this._status_word|17664)};FPU.prototype._fucom=function(a){this._fcom(a)};FPU.prototype._fcomi=function(a){var c=this._st[this._stack_ptr];this.cpu.flags_changed&=-70;this.cpu.flags&=-70;c>a||(this.cpu.flags=a>c?this.cpu.flags|1:c===a?this.cpu.flags|64:this.cpu.flags|69)}; +FPU.prototype._fucomi=function(a){this._fcomi(a)};FPU.prototype._ftst=function(a){this._status_word&=-18177;isNaN(a)?this._status_word|=17664:0===a?this._status_word|=16384:0>a&&(this._status_word|=256)}; +FPU.prototype._fxam=function(a){this._status_word&=-18177;this._status_word|=this._sign()<<9;this._status_word=this._stack_empty>>this._stack_ptr&1?this._status_word|16640:isNaN(a)?this._status_word|256:0===a?this._status_word|16384:Infinity===a||-Infinity===a?this._status_word|1280:this._status_word|1024};FPU.prototype._finit=function(){this._control_word=895;this._fpu_opcode=this._fpu_dp=this._fpu_ip=this._status_word=0;this._stack_empty=255;this._stack_ptr=0}; +FPU.prototype._load_status_word=function(){return this._status_word&-14337|this._stack_ptr<<11};FPU.prototype._safe_status_word=function(a){this._status_word=a&-14337;this._stack_ptr=a>>11&7};FPU.prototype._load_tag_word=function(){for(var a=0,c,d=0;8>d;d++)c=this._st[d],this._stack_empty>>d&1?a|=3<<(d<<1):0===c?a|=1<<(d<<1):isFinite(c)||(a|=2<<(d<<1));return a};FPU.prototype._safe_tag_word=function(a){for(var c=this._stack_empty=0;8>c;c++)this._stack_empty|=a>>c&a>>c+1&1<c;c++)this._store_m80(a,c-this._stack_ptr&7),a+=10;this._finit()};FPU.prototype._frstor=function(a){this._fldenv(a);a+=28;for(var c=0;8>c;c++)this._st[c]=this._load_m80(a),a+=10};FPU.prototype._integer_round=function(a){var c=this._control_word>>10&3;return 0===c?(c=Math.round(a),.5===c-a&&c%2&&c--,c):1===c||3===c&&0>this._stack_ptr&1?(this._status_word&=-513,this._stack_empty&=~(1<>a&1?(this._status_word&=-513,this._stack_fault(),this.indefinite_nan):this._st[a]};FPU.prototype._get_st0=function(){return this._stack_empty>>this._stack_ptr&1?(this._status_word&=-513,this._stack_fault(),this.indefinite_nan):this._st[this._stack_ptr]}; +FPU.prototype._load_m80=function(a){var c=this.cpu.safe_read16(a+8),d=this.cpu.safe_read32s(a)>>>0,e=this.cpu.safe_read32s(a+4)>>>0;a=c>>15;c&=-32769;if(0===c)return 0;if(!(32767>c))return this.float64_byte[7]=127|a<<7,this.float64_byte[6]=240|e>>30<<3&8,this.float64_byte[5]=0,this.float64_byte[4]=0,this.float64_int[0]=0,this.float64[0];d+=4294967296*e;a&&(d=-d);return d*Math.pow(2,c-16383-63)}; +FPU.prototype._store_m80=function(a,c){this.float64[0]=this._st[this._stack_ptr+c&7];var d=this.float64_byte[7]&128,e=(this.float64_byte[7]&127)<<4|this.float64_byte[6]>>4,f,g;2047===e?(e=32767,f=0,g=2147483648|(this.float64_int[1]&524288)<<11):0===e?g=f=0:(e+=15360,f=this.float64_int[0]<<11,g=2147483648|(this.float64_int[1]&1048575)<<11|this.float64_int[0]>>>21);this.cpu.safe_write32(a,f);this.cpu.safe_write32(a+4,g);this.cpu.safe_write16(a+8,d<<8|e)}; +FPU.prototype._load_m64=function(a){var c=this.cpu.safe_read32s(a);a=this.cpu.safe_read32s(a+4);this.float64_int[0]=c;this.float64_int[1]=a;return this.float64[0]};FPU.prototype._store_m64=function(a){this.cpu.writable_or_pagefault(a,8);this.float64[0]=this._get_sti(0);this.cpu.safe_write32(a,this.float64_int[0]);this.cpu.safe_write32(a+4,this.float64_int[1])};FPU.prototype._load_m32=function(a){this.float32_int[0]=this.cpu.safe_read32s(a);return this.float32[0]}; +FPU.prototype._store_m32=function(a,c){this.float32[0]=c;this.cpu.safe_write32(a,this.float32_int[0])};FPU.prototype._sign=function(){return this._st8[(this._stack_ptr+0&7)<<3|7]>>7}; +FPU.prototype.op_D8_reg=function(a){var c=a>>3&7;a=this._get_sti(a&7);var d=this._get_st0();switch(c){case 0:this._st[this._stack_ptr]=d+a;break;case 1:this._st[this._stack_ptr]=d*a;break;case 2:this._fcom(a);break;case 3:this._fcom(a);this._pop();break;case 4:this._st[this._stack_ptr]=d-a;break;case 5:this._st[this._stack_ptr]=a-d;break;case 6:this._st[this._stack_ptr]=d/a;break;case 7:this._st[this._stack_ptr]=a/d}}; +FPU.prototype.op_D8_mem=function(a,c){var d=a>>3&7,e=this._load_m32(c),f=this._get_st0();switch(d){case 0:this._st[this._stack_ptr]=f+e;break;case 1:this._st[this._stack_ptr]=f*e;break;case 2:this._fcom(e);break;case 3:this._fcom(e);this._pop();break;case 4:this._st[this._stack_ptr]=f-e;break;case 5:this._st[this._stack_ptr]=e-f;break;case 6:this._st[this._stack_ptr]=f/e;break;case 7:this._st[this._stack_ptr]=e/f}}; +FPU.prototype.op_D9_reg=function(a){var c=a&7;switch(a>>3&7){case 0:a=this._get_sti(c);this._push(a);break;case 1:a=this._get_sti(c);this._st[this._stack_ptr+c&7]=this._get_st0();this._st[this._stack_ptr]=a;break;case 2:switch(c){case 0:break;default:this._fpu_unimpl()}break;case 3:this._fpu_unimpl();break;case 4:a=this._get_st0();switch(c){case 0:this._st[this._stack_ptr]=-a;break;case 1:this._st[this._stack_ptr]=Math.abs(a);break;case 4:this._ftst(a);break;case 5:this._fxam(a);break;default:this._fpu_unimpl()}break; +case 5:this._push(this.constants[c]);break;case 6:a=this._get_st0();switch(c){case 0:this._st[this._stack_ptr]=Math.pow(2,a)-1;break;case 1:this._st[this._stack_ptr+1&7]=this._get_sti(1)*Math.log(a)/Math.LN2;this._pop();break;case 2:this._st[this._stack_ptr]=Math.tan(a);this._push(1);break;case 3:this._st[this._stack_ptr+1&7]=Math.atan2(this._get_sti(1),a);this._pop();break;case 4:this._fpu_unimpl();break;case 5:this._st[this._stack_ptr]=a%this._get_sti(1);break;case 6:this._fpu_unimpl();break;case 7:this._fpu_unimpl()}break; +case 7:switch(a=this._get_st0(),c){case 0:this._st[this._stack_ptr]=a%this._get_sti(1);break;case 1:this._st[this._stack_ptr+1&7]=this._get_sti(1)*Math.log(a+1)/Math.LN2;this._pop();break;case 2:this._st[this._stack_ptr]=Math.sqrt(a);break;case 3:this._st[this._stack_ptr]=Math.sin(a);this._push(Math.cos(a));break;case 4:this._st[this._stack_ptr]=this._integer_round(a);break;case 5:this._st[this._stack_ptr]=a*Math.pow(2,this._truncate(this._get_sti(1)));break;case 6:this._st[this._stack_ptr]=Math.sin(a); +break;case 7:this._st[this._stack_ptr]=Math.cos(a)}}};FPU.prototype.op_D9_mem=function(a,c){switch(a>>3&7){case 0:var d=this._load_m32(c);this._push(d);break;case 1:this._fpu_unimpl();break;case 2:this._store_m32(c,this._get_st0());break;case 3:this._store_m32(c,this._get_st0());this._pop();break;case 4:this._fldenv(c);break;case 5:this._control_word=this.cpu.safe_read16(c);break;case 6:this._fstenv(c);break;case 7:this.cpu.safe_write16(c,this._control_word)}}; +FPU.prototype.op_DA_reg=function(a){var c=a&7;switch(a>>3&7){case 0:this.cpu.test_b()&&(this._st[this._stack_ptr]=this._get_sti(c),this._stack_empty&=~(1<>3&7,e=this.cpu.safe_read32s(c),f=this._get_st0();switch(d){case 0:this._st[this._stack_ptr]=f+e;break;case 1:this._st[this._stack_ptr]=f*e;break;case 2:this._fcom(e);break;case 3:this._fcom(e);this._pop();break;case 4:this._st[this._stack_ptr]=f-e;break;case 5:this._st[this._stack_ptr]=e-f;break;case 6:this._st[this._stack_ptr]=f/e;break;case 7:this._st[this._stack_ptr]=e/f}}; +FPU.prototype.op_DB_reg=function(a){var c=a&7;switch(a>>3&7){case 0:this.cpu.test_b()||(this._st[this._stack_ptr]=this._get_sti(c),this._stack_empty&=~(1<>3&7){case 0:var d=this.cpu.safe_read32s(c);this._push(d);break;case 2:d=this._integer_round(this._get_st0());2147483647>=d&&-2147483648<=d?this.cpu.safe_write32(c,d):(this._invalid_arithmatic(),this.cpu.safe_write32(c,-2147483648));break;case 3:d=this._integer_round(this._get_st0());2147483647>=d&&-2147483648<=d?this.cpu.safe_write32(c,d):(this._invalid_arithmatic(),this.cpu.safe_write32(c,-2147483648));this._pop();break;case 5:this._push(this._load_m80(c)); +break;case 7:this.cpu.writable_or_pagefault(c,10);this._store_m80(c,0);this._pop();break;default:this._fpu_unimpl()}};FPU.prototype.op_DC_reg=function(a){var c=a>>3&7,d=a&7;a=this._stack_ptr+d&7;var d=this._get_sti(d),e=this._get_st0();switch(c){case 0:this._st[a]=d+e;break;case 1:this._st[a]=d*e;break;case 2:this._fcom(d);break;case 3:this._fcom(d);this._pop();break;case 4:this._st[a]=e-d;break;case 5:this._st[a]=d-e;break;case 6:this._st[a]=e/d;break;case 7:this._st[a]=d/e}}; +FPU.prototype.op_DC_mem=function(a,c){var d=a>>3&7,e=this._load_m64(c),f=this._get_st0();switch(d){case 0:this._st[this._stack_ptr]=f+e;break;case 1:this._st[this._stack_ptr]=f*e;break;case 2:this._fcom(e);break;case 3:this._fcom(e);this._pop();break;case 4:this._st[this._stack_ptr]=f-e;break;case 5:this._st[this._stack_ptr]=e-f;break;case 6:this._st[this._stack_ptr]=f/e;break;case 7:this._st[this._stack_ptr]=e/f}}; +FPU.prototype.op_DD_reg=function(a){var c=a&7;switch(a>>3&7){case 0:this._stack_empty|=1<<(this._stack_ptr+c&7);break;case 2:this._st[this._stack_ptr+c&7]=this._get_st0();break;case 3:0!==c&&(this._st[this._stack_ptr+c&7]=this._get_st0());this._pop();break;case 4:this._fucom(this._get_sti(c));break;case 5:this._fucom(this._get_sti(c));this._pop();break;default:this._fpu_unimpl()}}; +FPU.prototype.op_DD_mem=function(a,c){switch(a>>3&7){case 0:var d=this._load_m64(c);this._push(d);break;case 1:this._fpu_unimpl();break;case 2:this._store_m64(c);break;case 3:this._store_m64(c);this._pop();break;case 4:this._frstor(c);break;case 5:this._fpu_unimpl();break;case 6:this._fsave(c);break;case 7:this.cpu.safe_write16(c,this._load_status_word())}}; +FPU.prototype.op_DE_reg=function(a){var c=a>>3&7;a=a&7;var d=this._stack_ptr+a&7,e=this._get_sti(a),f=this._get_st0();switch(c){case 0:this._st[d]=e+f;break;case 1:this._st[d]=e*f;break;case 2:this._fcom(e);break;case 3:1===a?(this._fcom(this._st[d]),this._pop()):this._fpu_unimpl();break;case 4:this._st[d]=f-e;break;case 5:this._st[d]=e-f;break;case 6:this._st[d]=f/e;break;case 7:this._st[d]=e/f}this._pop()}; +FPU.prototype.op_DE_mem=function(a,c){var d=a>>3&7,e=this.cpu.safe_read16(c)<<16>>16,f=this._get_st0();switch(d){case 0:this._st[this._stack_ptr]=f+e;break;case 1:this._st[this._stack_ptr]=f*e;break;case 2:this._fcom(e);break;case 3:this._fcom(e);this._pop();break;case 4:this._st[this._stack_ptr]=f-e;break;case 5:this._st[this._stack_ptr]=e-f;break;case 6:this._st[this._stack_ptr]=f/e;break;case 7:this._st[this._stack_ptr]=e/f}}; +FPU.prototype.op_DF_reg=function(a){var c=a&7;switch(a>>3&7){case 4:224===a?this.cpu.reg16[0]=this._load_status_word():this._fpu_unimpl();break;case 5:this._fucomi(this._get_sti(c));this._pop();break;case 6:this._fcomi(this._get_sti(c));this._pop();break;default:this._fpu_unimpl()}}; +FPU.prototype.op_DF_mem=function(a,c){switch(a>>3&7){case 0:var d=this.cpu.safe_read16(c)<<16>>16;this._push(d);break;case 1:this._fpu_unimpl();break;case 2:d=this._integer_round(this._get_st0());32767>=d&&-32768<=d?this.cpu.safe_write16(c,d):(this._invalid_arithmatic(),this.cpu.safe_write16(c,32768));break;case 3:d=this._integer_round(this._get_st0());32767>=d&&-32768<=d?this.cpu.safe_write16(c,d):(this._invalid_arithmatic(),this.cpu.safe_write16(c,32768));this._pop();break;case 4:this._fpu_unimpl(); +break;case 5:var e=this.cpu.safe_read32s(c)>>>0,d=this.cpu.safe_read32s(c+4)>>>0,e=e+4294967296*d;d>>31&&(e-=1.8446744073709552E19);this._push(e);break;case 6:this._fpu_unimpl();break;case 7:this.cpu.writable_or_pagefault(c,8);var d=this._integer_round(this._get_st0()),f;0x7fffffffffffffff>d&&-9223372036854775808<=d?(e=d|0,f=d/4294967296|0,0===f&&0>d&&(f=-1)):(e=0,f=-2147483648,this._invalid_arithmatic());this.cpu.safe_write32(c,e);this.cpu.safe_write32(c+4,f);this._pop()}};function IDEDevice(a,c,d,e){0===e?(this.ata_port=496,this.IDEDevice$irq=14,this.pci_id=240):(this.ata_port=496,this.IDEDevice$irq=14,this.pci_id=248);this.ata_port_high=this.ata_port|516;this.pic=a.devices.pic;this.memory=a.memory;this.buffer=c;this.sector_size=d?2048:512;this.is_atapi=d;this.cylinder_count=this.IDEDevice$sectors_per_track=this.head_count=this.sector_count=0;this.buffer&&(this.sector_count=this.buffer.byteLength/this.sector_size,this.sector_count!==(this.sector_count|0)&&(this.sector_count= +Math.ceil(this.sector_count)),d?(this.head_count=1,this.IDEDevice$sectors_per_track=0):(this.head_count=255,this.IDEDevice$sectors_per_track=63),this.cylinder_count=this.sector_count/(this.head_count+1)/(this.IDEDevice$sectors_per_track+1),this.cylinder_count!==(this.cylinder_count|0)&&(this.cylinder_count=Math.ceil(this.cylinder_count)));this.stats={sectors_read:0,sectors_written:0,bytes_read:0,bytes_written:0,loading:!1};this.pci_space=[134,128,32,58,5,0,160,2,0,143,1,1,0,0,0,0,this.ata_port&255| +1,this.ata_port>>8,0,0,this.ata_port_high&255|1,this.ata_port_high>>8,0,0,0,0,0,0,0,0,0,0,1,192,0,0,0,0,0,0,0,0,0,0,67,16,212,130,0,0,0,0,0,0,0,0,0,0,0,0,this.IDEDevice$irq,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.pci_bars=[{size:8},{size:4},!1,!1,{size:16}];a.devices.pci.register_device(this);a.io.register_read(this.ata_port|7,this,this.read_status); +a.io.register_read(this.ata_port_high|2,this,this.read_status);a.io.register_write(this.ata_port|7,this,this.write_control);a.io.register_write(this.ata_port_high|2,this,this.write_control);this.device_control=2;this.data_pointer=0;this.pio_data=new Uint8Array(0);this.drive_head=this.head=this.cylinder_high=this.cylinder_low=this.lba_count=this.sector=this.bytecount=this.is_lba=0;this.status=80;this.sectors_per_drq=1;this.data_port_current=this.data_port_count=this.write_dest=0;this.data_port_buffer= +new Uint8Array(0);this.data_port_callback=null;this.next_status=-1;this.dma_status=this.prdt_addr=0;a.io.register_read(this.ata_port|0,this,this.read_data_port8,this.read_data_port16,this.read_data_port32);a.io.register_read(this.ata_port|1,this,this.read_lba_port);a.io.register_read(this.ata_port|2,this,this.read_bytecount_port);a.io.register_read(this.ata_port|3,this,this.read_sector_port);a.io.register_read(this.ata_port|4,this,function(){return this.cylinder_low&255});a.io.register_read(this.ata_port| +5,this,function(){return this.cylinder_high&255});a.io.register_read(this.ata_port|6,this,function(){return this.drive_head});a.io.register_write(this.ata_port|0,this,this.write_data_port8,this.write_data_port16,this.write_data_port32);a.io.register_write(this.ata_port|1,this,this.write_lba_port);a.io.register_write(this.ata_port|2,this,this.write_bytecount_port);a.io.register_write(this.ata_port|3,this,this.write_sector_port);a.io.register_write(this.ata_port|4,this,function(a){this.cylinder_low= +(this.cylinder_low<<8|a)&65535});a.io.register_write(this.ata_port|5,this,function(a){this.cylinder_high=(this.cylinder_high<<8|a)&65535});a.io.register_write(this.ata_port|6,this,function(a){a&16||(this.drive_head=a,this.is_lba=a>>6&1,this.head=a&15)});a.io.register_write(this.ata_port|7,this,this.ata_command);a.io.register_read(49156,this,void 0,void 0,this.dma_read_addr);a.io.register_write(49156,this,void 0,void 0,this.dma_set_addr);a.io.register_read(49152,this,this.dma_read_command8,void 0, +this.dma_read_command);a.io.register_write(49152,this,this.dma_write_command8,void 0,this.dma_write_command);a.io.register_read(49154,this,this.dma_read_status);a.io.register_write(49154,this,this.dma_write_status)}IDEDevice.prototype.push_irq=function(){0===(this.device_control&2)&&(this.dma_status|=4,this.pic.push_irq(this.IDEDevice$irq))}; +IDEDevice.prototype.ata_command=function(a){switch(a){case 0:this.push_irq();this.status=80;break;case 8:this.data_pointer=0;this.pio_data=new Uint8Array(0);this.status=80;this.push_irq();break;case 16:this.push_irq();break;case 39:this.push_irq();this.pio_data=new Uint8Array([0,0,0,0,this.buffer.byteLength&255,this.buffer.byteLength>>8&255,this.buffer.byteLength>>16&255,this.buffer.byteLength>>24&255,0,0,0,0]);this.status=88;break;case 32:case 41:case 36:case 196:this.ata_read_sectors(a);break;case 48:case 52:case 57:this.ata_write(a); +break;case 144:this.push_irq();this.lba_count=257;this.status=80;break;case 145:this.push_irq();break;case 160:this.is_atapi&&(this.status=88,this.allocate_in_buffer(12),this.data_port_callback="atapi_handle",this.bytecount=1,this.push_irq());break;case 161:this.is_atapi?(this.create_identify_packet(),this.status=88):this.status=80;this.push_irq();break;case 198:this.sectors_per_drq=this.bytecount;this.push_irq();break;case 200:this.ata_read_sectors_dma();break;case 202:this.ata_write_dma();break; +case 225:this.push_irq();break;case 236:if(this.is_atapi)break;this.create_identify_packet();this.status=88;this.push_irq();break;case 234:this.push_irq();break;case 239:this.push_irq();break;default:this.lba_count=4}}; +IDEDevice.prototype.atapi_handle=function(){this.bytecount=2;switch(this.data_port_buffer[0]){case 0:this.status=64;this.cylinder_low=8;this.cylinder_high=0;this.push_irq();break;case 3:this.pio_data=new Uint8Array(Math.min(this.data_port_buffer[4],15));this.status=88;this.pio_data[0]=240;this.pio_data[7]=8;this.data_pointer=0;this.bytecount=2;this.cylinder_low=8;this.cylinder_high=0;this.push_irq();break;case 18:this.pio_data=new Uint8Array(Math.min(this.data_port_buffer[4],36));this.status=88;this.pio_data.set([5, +128,1,49,0,0,0,0,83,79,78,89,32,32,32,32,67,68,45,82,79,77,32,67,68,85,45,49,48,48,48,32,49,46,49,97]);this.data_pointer=0;this.bytecount=2;this.push_irq();break;case 30:this.pio_data=new Uint8Array(0);this.status=80;this.data_pointer=0;this.bytecount=2;this.push_irq();break;case 37:this.pio_data=new Uint8Array([this.sector_count>>24&255,this.sector_count>>16&255,this.sector_count>>8&255,this.sector_count&255,0,0,this.sector_size>>8&255,this.sector_size&255]);this.status=88;this.data_pointer=0;this.bytecount= +2;this.cylinder_low=8;this.cylinder_high=0;this.push_irq();break;case 40:this.lba_count&1?this.atapi_read_dma(this.data_port_buffer):this.atapi_read(this.data_port_buffer);break;case 67:this.pio_data=new Uint8Array(2048);this.pio_data[0]=0;this.pio_data[1]=10;this.pio_data[2]=1;this.pio_data[3]=1;this.status=88;this.data_pointer=0;this.bytecount=2;this.cylinder_high=8;this.cylinder_low=0;this.push_irq();break;case 70:this.pio_data=new Uint8Array(this.data_port_buffer[8]|this.data_port_buffer[7]<< +8);this.status=88;this.data_pointer=0;this.bytecount=2;this.push_irq();break;case 74:this.pio_data=new Uint8Array(this.data_port_buffer[8]|this.data_port_buffer[7]<<8);this.status=88;this.data_pointer=0;this.bytecount=2;this.push_irq();break;case 81:this.pio_data=new Uint8Array(0);this.status=80;this.data_pointer=0;this.bytecount=2;this.push_irq();break;case 90:this.push_irq();this.status=80;break;default:this.status=80}}; +IDEDevice.prototype.do_write=function(){this.status=80;this.buffer.set(this.write_dest,this.data_port_buffer.subarray(0,this.data_port_count),function(){this.push_irq()}.bind(this));this.stats.sectors_written+=this.data_port_count/this.sector_size|0;this.stats.bytes_written+=this.data_port_count};IDEDevice.prototype.read_status=function(){var a=this.status;0<=this.next_status&&(this.status=this.next_status,this.next_status=-1);return a}; +IDEDevice.prototype.write_control=function(a){this.device_control=a;a&4&&(this.is_atapi?(this.status=81,this.sector=this.lba_count=this.bytecount=1,this.cylinder_low=20,this.cylinder_high=235):(this.status=81,this.sector=this.lba_count=this.bytecount=1,this.cylinder_low=60,this.cylinder_high=195))};IDEDevice.prototype.allocate_in_buffer=function(a){a>this.data_port_buffer.length&&(this.data_port_buffer=new Uint8Array(a));this.data_port_count=a;this.data_port_current=0}; +IDEDevice.prototype.atapi_read=function(a){var c=(a[7]<<8|a[8])*this.sector_size,d=(this.cylinder_high&255)<<8|this.cylinder_low&255;a=(a[2]<<24|a[3]<<16|a[4]<<8|a[5])*this.sector_size;d||(d=32768);d=Math.min(c,d);this.cylinder_low=d&255;this.cylinder_high=d>>8&255;a>=this.buffer.byteLength?(this.status=255,this.push_irq()):(c=Math.min(c,this.buffer.byteLength-a),this.status=128,this.stats.loading=!0,this.buffer.get(a,c,function(a){this.pio_data=a;this.status=88;this.data_pointer=0;this.push_irq(); +this.stats.loading=!1;this.stats.sectors_read+=c/this.sector_size|0;this.stats.bytes_read+=c}.bind(this)))}; +IDEDevice.prototype.atapi_read_dma=function(a){var c=(a[7]<<8|a[8])*this.sector_size;a=(a[2]<<24|a[3]<<16|a[4]<<8|a[5])*this.sector_size;a>=this.buffer.byteLength?(this.status=255,this.push_irq()):(c=Math.min(c,this.buffer.byteLength-a),this.status=128,this.stats.loading=!0,this.buffer.get(a,c,function(a){var e=this.prdt_addr,f=0;do{var g=this.memory.read32s(e),k=this.memory.read16(e+4),m=this.memory.read8(e+7)&128;k||(k=65536);this.memory.write_blob(a.subarray(f,f+k),g);f+=k;e+=8}while(!m);this.status= +80;this.dma_status&=-4;this.dma_status|=4;this.push_irq();this.stats.loading=!1;this.stats.sectors_read+=c/this.sector_size|0;this.stats.bytes_read+=c}.bind(this)))};IDEDevice.prototype.read_data_port8=function(){return this.read_data()};IDEDevice.prototype.read_data_port16=function(){return this.read_data()|this.read_data()<<8};IDEDevice.prototype.read_data_port32=function(){return this.read_data()|this.read_data()<<8|this.read_data()<<16|this.read_data()<<24}; +IDEDevice.prototype.read_lba_port=function(){return this.lba_count&255};IDEDevice.prototype.read_bytecount_port=function(){return this.bytecount&255};IDEDevice.prototype.read_sector_port=function(){return this.sector&255}; +IDEDevice.prototype.read_data=function(){if(this.data_pointer>8,this.cylinder_low=a)}this.data_pointer+ +1>=this.pio_data.length&&(this.status=80);return this.pio_data[this.data_pointer++]}this.data_pointer++;return 0};IDEDevice.prototype.write_data_port8=function(a){if(!(this.data_port_current>=this.data_port_count)&&(this.data_port_buffer[this.data_port_current++]=a,0===this.data_port_current%(512*this.sectors_per_drq)&&this.push_irq(),this.data_port_current===this.data_port_count))this[this.data_port_callback]()}; +IDEDevice.prototype.write_data_port16=function(a){this.write_data_port8(a&255);this.write_data_port8(a>>8&255)};IDEDevice.prototype.write_data_port32=function(a){this.write_data_port8(a&255);this.write_data_port8(a>>8&255);this.write_data_port8(a>>16&255);this.write_data_port8(a>>24&255)};IDEDevice.prototype.write_lba_port=function(a){this.lba_count=(this.lba_count<<8|a)&65535};IDEDevice.prototype.write_bytecount_port=function(a){this.bytecount=(this.bytecount<<8|a)&65535}; +IDEDevice.prototype.write_sector_port=function(a){this.sector=(this.sector<<8|a)&65535}; +IDEDevice.prototype.ata_read_sectors=function(a){if(32===a||196===a){var c=this.bytecount&255,d=this.is_lba?this.get_lba28():this.get_chs();0===c&&(c=256)}else if(36===a||41===a)c=this.bytecount,d=this.get_lba48(),0===c&&(c=65536);var e=c*this.sector_size;a=d*this.sector_size;this.cylinder_low+=c;a+e>this.buffer.byteLength?(this.status=255,this.push_irq()):(this.status=128,this.stats.loading=!0,this.buffer.get(a,e,function(a){this.pio_data=a;this.status=88;this.data_pointer=0;this.push_irq();this.stats.loading= +!1;this.stats.sectors_read+=e/this.sector_size|0;this.stats.bytes_read+=e}.bind(this)))}; +IDEDevice.prototype.ata_read_sectors_dma=function(){var a=this.bytecount&255,c=a*this.sector_size,d=this.get_lba28()*this.sector_size;this.cylinder_low+=a;d+c>this.buffer.byteLength?(this.status=255,this.push_irq()):(this.status=128,this.dma_status|=1,this.stats.loading=!0,this.buffer.get(d,c,function(a){var d=this.prdt_addr,g=0;do{var k=this.memory.read32s(d),m=this.memory.read16(d+4),l=this.memory.read8(d+7)&128;m||(m=65536);this.memory.write_blob(a.subarray(g,g+m),k);g+=m;d+=8}while(!l);this.status= +80;this.dma_status&=-4;this.dma_status|=4;this.push_irq();this.stats.loading=!1;this.stats.sectors_read+=c/this.sector_size|0;this.stats.bytes_read+=c}.bind(this)))}; +IDEDevice.prototype.ata_write=function(a){if(48===a){var c=this.bytecount&255,d=this.is_lba?this.get_lba28():this.get_chs();0===c&&(c=256)}else if(52===a||57===a)c=this.bytecount,d=this.get_lba48(),0===c&&(c=65536);a=c*this.sector_size;d=d*this.sector_size;this.cylinder_low+=c;d+a>this.buffer.byteLength?this.status=255:(this.status=80,this.next_status=88,this.allocate_in_buffer(a),this.write_dest=d,this.data_port_callback="do_write");this.push_irq()}; +IDEDevice.prototype.ata_write_dma=function(){var a=this.bytecount&255,c=a*this.sector_size,d=this.get_lba28()*this.sector_size;this.cylinder_low+=a;if(d+c>this.buffer.byteLength)this.status=255,this.push_irq();else{this.status=128;this.dma_status|=1;var a=this.prdt_addr,e=0,f=0,g=0;do{var k=this.memory.read32s(a),m=this.memory.read16(a+4),l=this.memory.read8(a+7)&128;m||(m=65536);this.buffer.set(d+g,this.memory.mem8.subarray(k,k+m),function(){f++;f===e&&(this.status=80,this.push_irq(),this.dma_status&= +-4,this.dma_status|=4)}.bind(this));g+=m;a+=8;e++}while(!l);f===e&&(this.status=80,this.push_irq(),this.dma_status&=-4,this.dma_status|=4);this.stats.sectors_written+=c/this.sector_size|0;this.stats.bytes_written+=c}};IDEDevice.prototype.get_chs=function(){return((this.cylinder_low&255|this.cylinder_high<<8&65280)*this.head_count+this.head)*this.IDEDevice$sectors_per_track+(this.sector&255)-1}; +IDEDevice.prototype.get_lba28=function(){return this.sector&255|this.cylinder_low<<8&65280|this.cylinder_high<<16&16711680};IDEDevice.prototype.get_lba48=function(){return(this.sector&255|this.cylinder_low<<8&65280|this.cylinder_high<<16&16711680|this.sector>>8<<24&4278190080)>>>0}; +IDEDevice.prototype.create_identify_packet=function(){this.data_pointer=0;this.drive_head&16?this.pio_data=new Uint8Array(0):(this.pio_data=new Uint8Array([64,this.is_atapi?133:0,this.cylinder_count,this.cylinder_count>>8,0,0,this.head_count,this.head_count>>8,0,0,0,0,this.IDEDevice$sectors_per_track,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,2,4,0,0,0,0,0,0,0,0,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,255,0,1,0,0,3,0,0,0,2,0,2,7,0,this.cylinder_count,this.cylinder_count>>8,this.head_count,this.head_count>>8,this.IDEDevice$sectors_per_track,0,this.sector_count&255,this.sector_count>>8&255,this.sector_count>>16&255,this.sector_count>>24&255,0,0,this.sector_count&255,this.sector_count>>8&255,this.sector_count>>16&255,this.sector_count>>24&255,0,0,0,4,0,0,30,0,30,0,30,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,126,0,0,0,0,0,0,116,0,64,0,64,0,116,0,64,0,0,0,0,0,0,0,0,0,0,1,96,0,0,0,0,0,0, +0,0,0,0,0,0,this.sector_count&255,this.sector_count>>8&255,this.sector_count>>16&255,this.sector_count>>24&255]),16383>16&255)};IDEDevice.prototype.dma_write_command8=function(a){a&1&&this.push_irq()};function PCI(a){function c(a){var c=d[2]<<8|d[1],e=d[0]&252,f=m[c],c=l[c];f&&3===a&&16<=e&&40>e&&(a=e-16>>2,c=c.pci_bars,a>2]=0))}a=a.io;var d=new Uint8Array(4),e=new Uint8Array(4),f=new Uint8Array(4);new Int32Array(d.buffer);var g=new Int32Array(e.buffer),k=new Int32Array(f.buffer),m=Array(65536),l=Array(65536);a.register_write_consecutive(3324,this,function(){c(0)},function(){c(1)},function(){c(2)},function(){c(3)});a.register_read_consecutive(3324,this,function(){return e[0]}, +function(){return e[1]},function(){return e[2]},function(){return e[3]});a.register_read_consecutive(3320,this,function(){return f[0]},function(){return f[1]},function(){return f[2]},function(){return f[3]});a.register_write_consecutive(3320,this,function(a){d[0]=a},function(a){d[1]=a},function(a){d[2]=a},function(a){d[3]=a;a=d[0]&252;var c=m[d[2]<<8|d[1]];void 0!==c?(k[0]=-2147483648,g[0]=a>2]:-1):(g[0]=-1,k[0]=0)});this.register_device=function(a){var c=a.pci_id;m[c]=new Int32Array((new Uint8Array(a.pci_space)).buffer); +l[c]=a};this.register_device({pci_id:0,pci_space:[134,128,55,18,0,0,0,0,2,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],pci_bars:[]});this.register_device({pci_id:8,pci_space:[134,128,0,112,7,0,0,2,0,0,1,6,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],pci_bars:[]})};function FloppyController(a,c){this.io=a.io;this.pic=a.devices.pic;this.dma=a.devices.dma;this.bytes_expecting=0;this.receiving_command=new Uint8Array(10);this.receiving_index=0;this.next_command=null;this.response_data=new Uint8Array(10);this.floppy_size=this.response_length=this.response_index=0;this.fda_image=c;this.last_cylinder=0;if(c){this.floppy_size=c.byteLength;var d,e;if((e={160:{type:1,tracks:40,sectors:8,heads:1},180:{type:1,tracks:40,sectors:9,heads:1},200:{type:1,tracks:40,sectors:10, +heads:1},320:{type:1,tracks:40,sectors:8,heads:2},360:{type:1,tracks:40,sectors:9,heads:2},400:{type:1,tracks:40,sectors:10,heads:2},720:{type:3,tracks:80,sectors:9,heads:2},1200:{type:2,tracks:80,sectors:15,heads:2},1440:{type:4,tracks:80,sectors:18,heads:2},1722:{type:5,tracks:82,sectors:21,heads:2},2880:{type:5,tracks:80,sectors:36,heads:2}}[this.floppy_size>>10])&&0===(this.floppy_size&1023))this.type=e.type,d=e.sectors,e=e.heads;else throw"Unknown floppy size: "+h(c.byteLength);this.FloppyController$sectors_per_track= +d;this.number_of_heads=e;this.io.register_read(1008,this,this.port3F0_read);this.io.register_read(1010,this,this.port3F2_read);this.io.register_read(1012,this,this.port3F4_read);this.io.register_read(1013,this,this.port3F5_read);this.io.register_read(1015,this,this.port3F7_read);this.io.register_write(1010,this,this.port3F2_write);this.io.register_write(1013,this,this.port3F5_write)}else this.type=4}FloppyController.prototype.port3F0_read=function(){return 0}; +FloppyController.prototype.port3F4_read=function(){var a=128;this.response_indexthis.FloppyController$sectors_per_track&&(e=1,d++,d>=this.number_of_heads&&(d=0,a++)),this.last_cylinder=a,this.response_index=0,this.response_length=7,this.response_data[0]=d<<2|32,this.response_data[1]=0,this.response_data[2]=0,this.response_data[3]=a,this.response_data[4]=d,this.response_data[5]=e,this.response_data[6]=c[4],dor&8&&this.pic.push_irq(6))};FloppyController.prototype.fix_drive_data=function(){}; +FloppyController.prototype.read_sector_id=function(){this.response_index=0;this.response_length=7;this.response_data[0]=0;this.response_data[1]=0;this.response_data[2]=0;this.response_data[3]=0;this.response_data[4]=0;this.response_data[5]=0;this.response_data[6]=0;dor&8&&this.pic.push_irq(6)};function Memory(a,c){this.mem8=new Uint8Array(a);this.mem16=new Uint16Array(a);this.mem32s=new Int32Array(a);this.buffer=a;this.size=c;this.memory_map_registered=new Uint8Array(262144);this.memory_map_read8=[];this.memory_map_write8=[];this.memory_map_read32=[];this.memory_map_write32=[]}Memory.prototype._state_restore=function(){this.mem8=new Uint8Array(this.buffer);this.mem16=new Uint16Array(this.buffer);this.mem32s=new Int32Array(this.buffer)}; +Memory.prototype.mmap_read8=function(a){return this.memory_map_read8[a>>>14](a)};Memory.prototype.mmap_write8=function(a,c){this.memory_map_write8[a>>>14](a,c)};Memory.prototype.mmap_read16=function(a){var c=this.memory_map_read8[a>>>14];return c(a)|c(a+1)<<8};Memory.prototype.mmap_write16=function(a,c){var d=this.memory_map_write8[a>>>14];d(a,c&255);d(a+1,c>>8&255)};Memory.prototype.mmap_read32=function(a){return this.memory_map_read32[a>>>14](a)}; +Memory.prototype.mmap_write32=function(a,c){this.memory_map_write32[a>>>14](a,c)};Memory.prototype.read8=function(a){return this.memory_map_registered[a>>>14]?this.mmap_read8(a):this.mem8[a]};Memory.prototype.read16=function(a){return this.memory_map_registered[a>>>14]?this.mmap_read16(a):this.mem8[a]|this.mem8[a+1]<<8};Memory.prototype.read_aligned16=function(a){return this.memory_map_registered[a>>>13]?this.mmap_read16(a<<1):this.mem16[a]}; +Memory.prototype.read32s=function(a){return this.memory_map_registered[a>>>14]?this.mmap_read32(a):this.mem8[a]|this.mem8[a+1]<<8|this.mem8[a+2]<<16|this.mem8[a+3]<<24};Memory.prototype.read_aligned32=function(a){return this.memory_map_registered[a>>>12]?this.mmap_read32(a<<2):this.mem32s[a]};Memory.prototype.write8=function(a,c){this.memory_map_registered[a>>>14]?this.mmap_write8(a,c):this.mem8[a]=c}; +Memory.prototype.write16=function(a,c){this.memory_map_registered[a>>>14]?this.mmap_write16(a,c):(this.mem8[a]=c,this.mem8[a+1]=c>>8)};Memory.prototype.write_aligned16=function(a,c){this.memory_map_registered[a>>>13]?this.mmap_write16(a<<1,c):this.mem16[a]=c};Memory.prototype.write32=function(a,c){this.memory_map_registered[a>>>14]?this.mmap_write32(a,c):(this.mem8[a]=c,this.mem8[a+1]=c>>8,this.mem8[a+2]=c>>16,this.mem8[a+3]=c>>24)}; +Memory.prototype.write_aligned32=function(a,c){this.memory_map_registered[a>>>12]?this.mmap_write32(a<<2,c):this.mem32s[a]=c};Memory.prototype.write_blob=function(a,c){this.mem8.set(a,c)};Memory.prototype.write_string=function(a){for(var c=0;ca){var d=a>>1;a&1?this.channels[d].count=this.flipflop_get(this.channels[d].count,c):this.channels[d].address=this.flipflop_get(this.channels[d].address,c)}};DMA.prototype.portA_write=function(){};DMA.prototype.portB_write=function(){};DMA.prototype.portC_write=function(){this.lsb_msb_flipflop=0};DMA.prototype.port81_write=function(a){this.channels[2].address=this.channels[2].address&65535|a<<16}; +DMA.prototype.do_read=function(a,c,d){var e=this.channels[2].count+1,f=this.channels[2].address;if(c+e>a.byteLength)d(!0);else{var g=this.memory;this.channels[2].address+=e;a.get(c,e,function(a){g.write_blob(a,f);d(!1)})}};DMA.prototype.do_write=function(a,c,d){var e=this.channels[2].count,f=this.channels[2].address;c+e>a.byteLength?d(!0):(this.channels[2].address+=e,a.set(c,new Uint8Array(this.memory.buffer,f,e+1),function(){d(!1)}))}; +DMA.prototype.flipflop_get=function(a,c){return(this.lsb_msb_flipflop^=1)?a&-256|c:a&-65281|c<<8};function PIT(a){this.pic=a.devices.pic;this.PIT$next_tick=Date.now();this.counter_next_low=new Uint8Array(4);this.counter_enabled=new Uint8Array(4);this.counter_mode=new Uint8Array(4);this.counter_read_mode=new Uint8Array(4);this.counter_latch=new Uint8Array(4);this.counter_latch_value=new Uint16Array(3);this.counter_reload=new Uint16Array(3);this.counter_current=new Uint16Array(3);var c=this.counter2_out=0;a.io.register_read(97,this,function(){c^=16;return c|this.counter2_out<<5});a.io.register_read(64, +this,function(){return this.counter_read(0)});a.io.register_read(65,this,function(){return this.counter_read(1)});a.io.register_read(66,this,function(){return this.counter_read(2)});a.io.register_write(64,this,function(a){this.counter_write(0,a)});a.io.register_write(65,this,function(a){this.counter_write(1,a)});a.io.register_write(66,this,function(a){this.counter_write(2,a)});a.io.register_write(67,this,this.port43_write)} +PIT.prototype.timer=function(a,c){var d,e,f=1193.1816666*(a-this.PIT$next_tick)>>>0;if(f){this.PIT$next_tick+=f/1193.1816666;if(!c&&this.counter_enabled[0]&&(d=this.counter_current[0]-=f,0>=d))if(this.pic.push_irq(0),e=this.counter_mode[0],0===e)this.counter_enabled[0]=0,this.counter_current[0]=0;else if(3===e||2===e)this.counter_current[0]=this.counter_reload[0]+d%this.counter_reload[0];this.counter_enabled[2]&&(d=this.counter_current[2]-=f,0>=d&&(e=this.counter_mode[2],0===e?(this.counter2_out= +1,this.counter_enabled[2]=0,this.counter_current[2]=0):2===e?(this.counter2_out=1,this.counter_current[2]=this.counter_reload[2]+d%this.counter_reload[2]):3===e&&(this.counter2_out^=1,this.counter_current[2]=this.counter_reload[2]+d%this.counter_reload[2])))}}; +PIT.prototype.counter_read=function(a){var c=this.counter_latch[a];if(c)return this.counter_latch[a]--,2===c?this.counter_latch_value[a]&255:this.counter_latch_value[a]>>8;c=this.counter_next_low[a];3===this.counter_mode[a]&&(this.counter_next_low[a]^=1);return c?this.counter_current[a]&255:this.counter_current[a]>>8}; +PIT.prototype.counter_write=function(a,c){this.counter_reload[a]=this.counter_next_low[a]?this.counter_reload[a]&-256|c:this.counter_reload[a]&255|c<<8;3===this.counter_read_mode[a]&&this.counter_next_low[a]||(this.counter_reload[a]||(this.counter_reload[a]=65535),this.counter_current[a]=this.counter_reload[a],this.counter_enabled[a]=!0);3===this.counter_read_mode[a]&&(this.counter_next_low[a]^=1)}; +PIT.prototype.port43_write=function(a){var c=a>>1&7,d=a>>6&3;a=a>>4&3;3!==d&&(0===a?(this.counter_latch[d]=2,this.counter_latch_value[d]=this.counter_current[d]):(6<=c&&(c&=-5),this.counter_next_low[d]=1===a?0:1,this.counter_mode[d]=c,this.counter_read_mode[d]=a,2===d&&(this.counter2_out=0===c?0:1)))};function VGAScreen(a,c,d){void 0===c?this.VGAScreen$adapter=new VGADummyAdapter:this.VGAScreen$adapter=c;this.vga_memory_size=d;this.cursor_address=0;this.cursor_scanline_start=14;this.cursor_scanline_end=15;this.start_address=this.screen_height=this.screen_width=this.max_rows=this.max_cols=0;this.graphical_mode_is_linear=!0;this.do_complete_redraw=this.graphical_mode=!1;this.vga256_palette=new Int32Array(256);this.svga_height=this.svga_width=this.latch3=this.latch2=this.latch1=this.latch0=0;this.text_mode_width= +80;this.plane0;this.plane1;this.plane2;this.plane3;this.svga_memory32=this.svga_memory16=this.svga_memory=this.vga_memory=null;this.svga_enabled=!1;this.svga_offset=this.svga_bpp=0;this.pci_space=[222,16,32,10,7,0,0,0,162,0,0,3,0,0,128,0,8,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,1,0,0];this.pci_id=144;this.pci_bars=[{size:this.vga_memory_size}];a.devices.pci.register_device(this);this.stats={is_graphical:!1,res_x:0,res_y:0,bpp:0};this.dac_color_index= +this.index_crtc=0;this.attribute_controller_index=-1;this.dac_map=new Uint8Array(16);this.sequencer_index=-1;this.plane_write_bm=15;this.sequencer_memory_mode=0;this.graphics_index=-1;this.planar_rotate_reg=this.planar_mode=this.plane_read=0;this.planar_bitmap=255;this.max_scan_line=0;this.port_3DA_value=this.miscellaneous_output_register=255;a=a.io;a.register_write(960,this,this.port3C0_write);a.register_read(960,this,this.port3C0_read);a.register_read(961,this,this.port3C1_read);a.register_write(962, +this,this.port3C2_write);a.register_write_consecutive(964,this,this.port3C4_write,this.port3C5_write);a.register_read(964,this,this.port3C4_read);a.register_read(965,this,this.port3C5_read);a.register_write_consecutive(974,this,this.port3CE_write,this.port3CF_write);a.register_read(974,this,this.port3CE_read);a.register_read(975,this,this.port3CF_read);a.register_write(967,this,this.port3C7_write);a.register_write(968,this,this.port3C8_write);a.register_write(969,this,this.port3C9_write);a.register_read(972, +this,this.port3CC_read);a.register_write_consecutive(980,this,this.port3D4_write,this.port3D5_write);a.register_read(981,this,this.port3D5_read);a.register_read(986,this,this.port3DA_read);this.dispi_index=-1;this.dispi_enable_value=0;a.register_write(462,this,void 0,this.port1CE_write);a.register_write(463,this,void 0,this.port1CF_write);a.register_read(463,this,void 0,this.port1CF_read);void 0===this.vga_memory_size||262144>this.vga_memory_size?this.vga_memory_size=262144:this.vga_memory_size&65535&& +(this.vga_memory_size|=65535,this.vga_memory_size++);this.svga_memory=new Uint8Array(this.vga_memory_size);this.svga_memory16=new Uint16Array(this.svga_memory.buffer);this.svga_memory32=new Int32Array(this.svga_memory.buffer);this.vga_memory=new Uint8Array(this.svga_memory.buffer,0,262144);this.plane0=new Uint8Array(this.svga_memory.buffer,0,65536);this.plane1=new Uint8Array(this.svga_memory.buffer,65536,65536);this.plane2=new Uint8Array(this.svga_memory.buffer,131072,65536);this.plane3=new Uint8Array(this.svga_memory.buffer, +196608,65536);this.set_size_text(80,25);this.update_cursor_scanline();var e=this;a.mmap_register(655360,131072,function(a){return e.vga_memory_read(a)},function(a,c){e.vga_memory_write(a,c)});a.mmap_register(3758096384,this.vga_memory_size,function(a){return e.svga_memory_read8(a)},function(a,c){e.svga_memory_write8(a,c)},function(a){return e.svga_memory_read32(a)},function(a,c){e.svga_memory_write32(a,c)})} +VGAScreen.prototype._state_restore=function(){this.svga_memory16=new Uint16Array(this.svga_memory.buffer);this.svga_memory32=new Int32Array(this.svga_memory.buffer);this.vga_memory=new Uint8Array(this.svga_memory.buffer,0,262144);this.plane0=new Uint8Array(this.svga_memory.buffer,0,65536);this.plane1=new Uint8Array(this.svga_memory.buffer,65536,65536);this.plane2=new Uint8Array(this.svga_memory.buffer,131072,65536);this.plane3=new Uint8Array(this.svga_memory.buffer,196608,65536);this.VGAScreen$adapter.set_mode(this.graphical_mode|| +this.svga_enabled);this.graphical_mode||this.svga_enabled?this.set_size_graphical(this.svga_width,this.svga_height):(this.set_size_text(this.max_cols,this.max_rows),this.update_cursor_scanline(),this.update_cursor());this.do_complete_redraw=!0}; +VGAScreen.prototype.vga_memory_read=function(a){a-=655360;if(!this.graphical_mode||this.graphical_mode_is_linear)return this.vga_memory[a];a&=65535;this.latch0=this.plane0[a];this.latch1=this.plane1[a];this.latch2=this.plane2[a];this.latch3=this.plane3[a];return this.vga_memory[this.plane_read<<16|a]}; +VGAScreen.prototype.vga_memory_write=function(a,c){a-=655360;this.graphical_mode?this.graphical_mode_is_linear?this.vga_memory_write_graphical_linear(a,c):this.vga_memory_write_graphical_planar(a,c):this.vga_memory_write_text_mode(a,c)}; +VGAScreen.prototype.vga_memory_write_graphical_linear=function(a,c){var d=a<<2,e=this.vga256_palette[c];this.VGAScreen$adapter.put_pixel_linear(d|2,e>>16&255);this.VGAScreen$adapter.put_pixel_linear(d|1,e>>8&255);this.VGAScreen$adapter.put_pixel_linear(d,e&255);this.vga_memory[a]=c}; +VGAScreen.prototype.vga_memory_write_graphical_planar=function(a,c){if(!(65535=this.screen_width*this.screen_height<<3)){e<<=1;f<<=2;g<<=3;for(var k=(a<<3|7)<<2,m=0;8>m;m++){var l=this.vga256_palette[this.dac_map[d>> +m&1|e>>m&2|f>>m&4|g>>m&8]];this.VGAScreen$adapter.put_pixel_linear(k|2,l>>16);this.VGAScreen$adapter.put_pixel_linear(k|1,l>>8&255);this.VGAScreen$adapter.put_pixel_linear(k,l&255);k-=4}}}};VGAScreen.prototype.text_mode_redraw=function(){for(var a=98304|this.start_address<<1,c,d,e=0;e>4&15],this.vga256_palette[d&15]),a+=2}; +VGAScreen.prototype.graphical_planar_redraw=function(){for(var a=0,c=0;ce;e++)this.VGAScreen$adapter.put_pixel_linear32(c*this.screen_width+d<<2,this.vga256_palette[this.dac_map[this.plane0[a]>>e&1|this.plane1[a]>>e<<1&2|this.plane2[a]>>e<<2&4|this.plane3[a]>>e<<3&8]]);a++}}; +VGAScreen.prototype.vga_memory_write_text_mode=function(a,c){if(!(98304>a)){var d=(a-98304>>1)-this.start_address,e=d/this.max_cols|0,d=d%this.max_cols,f,g;a&1?(g=c,f=this.vga_memory[a&-2]):(f=c,g=this.vga_memory[a|1]);this.VGAScreen$adapter.put_char(e,d,f,this.vga256_palette[g>>4&15],this.vga256_palette[g&15]);this.vga_memory[a]=c}}; +VGAScreen.prototype.update_cursor=function(){var a=(this.cursor_address-this.start_address)/this.max_cols|0,c=(this.cursor_address-this.start_address)%this.max_cols,a=Math.min(this.max_rows-1,a);this.VGAScreen$adapter.update_cursor(a,c)};VGAScreen.prototype.svga_memory_read8=function(a){return this.svga_memory[a&268435455]}; +VGAScreen.prototype.svga_memory_read32=function(a){a&=268435455;return a&3?this.svga_memory[a]|this.svga_memory[a+1]<<8|this.svga_memory[a+2]<<16|this.svga_memory[a+3]<<24:this.svga_memory32[a>>2]}; +VGAScreen.prototype.svga_memory_write8=function(a,c){a&=268435455;this.svga_memory[a]=c;if(this.svga_enabled&&(a-=this.svga_offset,!(0>a)))switch(this.svga_bpp){case 32:3!==(a&3)&&this.VGAScreen$adapter.put_pixel_linear(a,c);break;case 24:this.VGAScreen$adapter.put_pixel_linear((a<<2)/3|0,c);break;case 16:if(a&1){var d=this.svga_memory16[a>>1],e,f;f=255*(c>>3&31)/31|0;e=255*(d>>5&63)/63|0;d=255*(d&31)/31|0;a<<=1;this.VGAScreen$adapter.put_pixel_linear(a,d);this.VGAScreen$adapter.put_pixel_linear(a- +1,e);this.VGAScreen$adapter.put_pixel_linear(a-2,f)}break;case 8:e=this.vga256_palette[c],f=a<<2,this.VGAScreen$adapter.put_pixel_linear(f,e>>16&255),this.VGAScreen$adapter.put_pixel_linear(f|1,e>>8&255),this.VGAScreen$adapter.put_pixel_linear(f|2,e&255)}}; +VGAScreen.prototype.svga_memory_write32=function(a,c){a&=268435455;if(a&3||32!==this.svga_bpp)this.svga_memory_write8(a,c&255),this.svga_memory_write8(a+1,c>>8&255),this.svga_memory_write8(a+2,c>>16&255),this.svga_memory_write8(a+3,c>>24&255);else if(this.svga_memory32[a>>2]=c,this.svga_enabled&&(a-=this.svga_offset,!(0>a)))switch(this.svga_bpp){case 32:this.VGAScreen$adapter.put_pixel_linear32(a,c)}}; +VGAScreen.prototype.svga_redraw=function(){var a=this.svga_offset,c=this.svga_height*this.svga_width,d=0;if(32===this.svga_bpp)for(var e=new Int32Array(this.svga_memory.buffer),a=a>>2,c=c<<2;dthis.attribute_controller_index&&(this.dac_map[this.attribute_controller_index]=a),this.attribute_controller_index=-1)};VGAScreen.prototype.port3C0_read=function(){var a=this.attribute_controller_index;this.attribute_controller_index=-1;return a}; +VGAScreen.prototype.port3C1_read=function(){return this.attribute_controller_index=-1};VGAScreen.prototype.port3C2_write=function(a){this.miscellaneous_output_register=a;this.switch_video_mode(a)};VGAScreen.prototype.port3C4_write=function(a){this.sequencer_index=a};VGAScreen.prototype.port3C4_read=function(){return this.sequencer_index};VGAScreen.prototype.port3C5_write=function(a){switch(this.sequencer_index){case 2:this.plane_write_bm=a;break;case 4:this.sequencer_memory_mode=a}}; +VGAScreen.prototype.port3C5_read=function(){switch(this.sequencer_index){case 2:return this.plane_write_bm;case 4:return this.sequencer_memory_mode;case 6:return 18}return 0};VGAScreen.prototype.port3C7_write=function(){};VGAScreen.prototype.port3C8_write=function(a){this.dac_color_index=3*a}; +VGAScreen.prototype.port3C9_write=function(a){var c=this.dac_color_index/3|0,d=this.dac_color_index%3,e=this.vga256_palette[c];a=255*a/63&255;this.vga256_palette[c]=0===d?e&-16711681|a<<16:1===d?e&-65281|a<<8:e&-256|a;this.dac_color_index++;this.do_complete_redraw=!0};VGAScreen.prototype.port3CC_read=function(){return this.miscellaneous_output_register};VGAScreen.prototype.port3CE_write=function(a){this.graphics_index=a};VGAScreen.prototype.port3CE_read=function(){return this.graphics_index}; +VGAScreen.prototype.port3CF_write=function(a){switch(this.graphics_index){case 3:this.planar_rotate_reg=a;break;case 4:this.plane_read=a;break;case 5:this.planar_mode=a;break;case 8:this.planar_bitmap=a}};VGAScreen.prototype.port3CF_read=function(){switch(this.graphics_index){case 3:return this.planar_rotate_reg;case 4:return this.plane_read;case 5:return this.planar_mode;case 8:return this.planar_bitmap}return 0};VGAScreen.prototype.port3D4_write=function(a){this.index_crtc=a}; +VGAScreen.prototype.port3D5_write=function(a){switch(this.index_crtc){case 2:this.text_mode_width=a;break;case 9:this.max_scan_line=a;7===(a&31)?this.set_size_text(this.text_mode_width,50):this.set_size_text(this.text_mode_width,25);break;case 10:this.cursor_scanline_start=a;this.update_cursor_scanline();break;case 11:this.cursor_scanline_end=a;this.update_cursor_scanline();break;case 12:this.start_address=this.start_address&255|a<<8;this.do_complete_redraw=!0;break;case 13:this.start_address=this.start_address& +65280|a;this.do_complete_redraw=!0;break;case 14:this.cursor_address=this.cursor_address&255|a<<8;this.update_cursor();break;case 15:this.cursor_address=this.cursor_address&65280|a,this.update_cursor()}};VGAScreen.prototype.port3D5_read=function(){return 9===this.index_crtc?this.max_scan_line:10===this.index_crtc?this.cursor_scanline_start:11===this.index_crtc?this.cursor_scanline_end:14===this.index_crtc?this.cursor_address>>8:15===this.index_crtc?this.cursor_address&255:0}; +VGAScreen.prototype.port3DA_read=function(){this.port_3DA_value^=8;this.attribute_controller_index=-1;return this.port_3DA_value};VGAScreen.prototype.switch_video_mode=function(a){103===a?this.set_video_mode(3):227===a?this.set_video_mode(18):99===a?this.set_video_mode(19):163===a?this.set_video_mode(16):this.set_video_mode(3)};VGAScreen.prototype.svga_bytes_per_line=function(){return this.svga_width*(15===this.svga_bpp?16:this.svga_bpp)/8}; +VGAScreen.prototype.port1CE_write=function(a){this.dispi_index=a}; +VGAScreen.prototype.port1CF_write=function(a){switch(this.dispi_index){case 1:this.svga_width=a;2560c)<<5|(0>a)<<4|8|this.mouse_clicks,e=a,f=c;this.last_mouse_packet=Date.now();this.scaling2&&(e=this.apply_scaling2(e),f=this.apply_scaling2(f));this.mouse_buffer.push(d);this.mouse_buffer.push(e);this.mouse_buffer.push(f);this.mouse_irq()}; +PS2.prototype.apply_scaling2=function(a){var c=a>>31;switch(Math.abs(a)){case 0:case 1:case 3:return a;case 2:return c;case 4:return 6*c;case 5:return 9*c;default:return a<<1}};PS2.prototype.destroy=function(){this.have_keyboard&&this.keyboard.destroy();this.have_mouse&&this.mouse.destroy()}; +PS2.prototype.port60_read=function(){if(!this.kbd_buffer.length&&!this.mouse_buffer.length)return this.last_port60_byte;(this.kbd_buffer.length&&this.mouse_buffer.length?0!==(this.pic.isr&2):this.kbd_buffer.length)?(this.last_port60_byte=this.kbd_buffer.shift(),1<=this.kbd_buffer.length&&this.kbd_irq()):(this.last_port60_byte=this.mouse_buffer.shift(),1<=this.mouse_buffer.length&&this.mouse_irq());return this.last_port60_byte}; +PS2.prototype.port64_read=function(){var a=16;if(this.mouse_buffer.length||this.kbd_buffer.length)a|=1;this.mouse_buffer.length&&(a|=32);return a}; +PS2.prototype.port60_write=function(a){if(this.read_command_register)this.kbd_irq(),this.command_register=a,this.read_command_register=!1;else if(this.read_output_register)this.read_output_register=!1,this.mouse_buffer.ByteQueue$clear(),this.mouse_buffer.push(a),this.mouse_irq();else if(this.next_read_sample)this.next_read_sample=!1,this.mouse_buffer.ByteQueue$clear(),this.mouse_buffer.push(250),this.sample_rate=a,this.mouse_irq();else if(this.next_read_resolution)this.next_read_resolution=!1,this.mouse_buffer.ByteQueue$clear(), +this.mouse_buffer.push(250),this.resolution=3>5;1===c?this.isr&=this.isr-1:3===c&&(this.isr&=~(1<<(a&7)))}});a.io.register_read(d,this,function(){return this.read_irr?this.irr:this.isr});a.io.register_write(d|1,this,function(a){0===this.state?this.expect_icw4?(this.expect_icw4=!1,this.auto_eoi=a&2):this.irq_mask=~a:1===this.state?(this.irq_map=a,this.state++):2===this.state&&(this.state=0)});a.io.register_read(d|1,this,function(){return~this.irq_mask& +255});this.push_irq=this.is_master?function(c){8<=c&&(this.slave.push_irq(c-8),c=2);this.irr|=1<>16&255;case 53:return this.cpu.memory_size-16777216>>24&255;case 56:return 1|this.boot_order>>4&240;case 61:return this.boot_order&255;case 91:case 92:case 93:return 0}return 255}; +RTC.prototype.cmos_write=function(a){switch(this.cmos_index){case 10:this.cmos_a=a&127;this.periodic_interrupt_time=1E3/(32768>>(this.cmos_a&15)-1);break;case 11:this.cmos_b=a,this.cmos_b&64&&(this.RTC$next_interrupt=Date.now())}this.periodic_interrupt=64===(this.cmos_b&64)&&0<(this.cmos_a&15)};function UART(a,c,d){this.pic=a.devices.pic;this.interrupts=0;this.line="";this.ier=this.line_control=this.baud_rate=0;this.iir=1;this.UART$irq=this.scratch_register=this.modem_status=this.modem_control=0;this.input=new ByteQueue(4096);if(1E3===c||1016===c)this.UART$irq=4;else if(1E3===c||1E3===c)this.UART$irq=3;else return;d.init(function(a){this.input.push(a);this.interrupts|=4096;this.ier&1&&(this.iir=12,this.push_irq())}.bind(this));a=a.io;a.register_write(c,this,function(a){this.line_control& +128?this.baud_rate=this.baud_rate&-256|a:(this.ier&2&&this.push_irq(),255!==a&&d&&(d.put_line?this.line=10===a?"":this.line+String.fromCharCode(a):d.put_str(String.fromCharCode(a))))});a.register_write(c|1,this,function(a){this.line_control&128?this.baud_rate=this.baud_rate&255|a<<8:this.ier=a});a.register_read(c,this,function(){return this.line_control&128?this.baud_rate&255:this.input.shift()});a.register_read(c|1,this,function(){return this.line_control&128?this.baud_rate>>8:this.ier});a.register_read(c| +2,this,function(){var a=this.iir&15|192;2===this.iir?this.clear_interrupt(2):12===this.iir&&this.clear_interrupt(12);return a});a.register_write(c|2,this,function(){});a.register_read(c|3,this,function(){return this.line_control});a.register_write(c|3,this,function(a){this.line_control=a});a.register_read(c|4,this,function(){return this.modem_control});a.register_write(c|4,this,function(a){this.modem_control=a});a.register_read(c|5,this,function(){var a=0;this.input.length&&(a|=1);return a|96});a.register_write(c| +5,this,function(){});a.register_read(c|6,this,function(){return this.modem_status});a.register_write(c|6,this,function(){});a.register_read(c|7,this,function(){return this.scratch_register});a.register_write(c|7,this,function(a){this.scratch_register=a})}UART.prototype.push_irq=function(){this.pic.push_irq(this.UART$irq)};UART.prototype.clear_interrupt=function(a){this.interrupts&=~(1<c)throw new StateLoadError("Invalid length: "+c);var d=new Int32Array(a,0,4);if(-2039052682!==d[0])throw new StateLoadError("Invalid header: "+h(d[0]>>>0));if(0!==d[1])throw new StateLoadError("Version mismatch: dump="+d[1]+" we=0");if(d[2]!==c)throw new StateLoadError("Length doesn't match header: real="+c+" header="+d[2]);d=d[3];if(0>d||d+12>=c||d%2)throw new StateLoadError("Invalid info block length: "+d);for(var e=d/2,f=new Uint16Array(a, +16,e),g="",c=0;cthis.remote_buffer.length&&(this.remote_buffer=new Uint8Array(this.rcnt))});d.register_read(47117,this,function(){return 0}); +d.register_read(47118,this,function(){return 0});d.register_read(47119,this,function(){return 0});d.register_read(47135,this,function(){if(0===(this.cr&192))return this.do_interrupt(128),0});d.register_write(47135,this,function(){});d.register_read(47111,this,function(){return 0===(this.cr&192)?this.isr:this.curpg});d.register_write(47111,this,function(a){0===(this.cr&192)?this.isr&=~a:this.curpg=a});d.register_write(47117,this,function(){});d.register_write(47118,this,function(){});d.register_write(47114, +this,function(a){0===(this.cr&192)&&(this.rcnt=this.rcnt&65280|a&255)});d.register_write(47115,this,function(a){0===(this.cr&192)&&(this.rcnt=this.rcnt&255|a<<8&65280)});d.register_write(47112,this,function(a){0===(this.cr&192)&&(this.rsar=this.rsar&65280|a&255)});d.register_write(47113,this,function(a){0===(this.cr&192)&&(this.rsar=this.rsar&255|a<<8&65280)});d.register_write(47119,this,function(a){0===(this.cr&192)&&(this.imr=a)});d.register_read(47107,this,function(){return 0===(this.cr&192)?this.boundary: +0});d.register_write(47107,this,function(a){0===(this.cr&192)&&(this.boundary=a)});d.register_read(47108,this,function(){return 0===(this.cr&192)?35:0});d.register_read(47116,this,function(){return 0===(this.cr&192)?9:0});d.register_read(47120,this,this.data_port_read,this.data_port_read16,this.data_port_read32);d.register_write(47120,this,this.data_port_write,this.data_port_write16,this.data_port_write32)}Ne2k.prototype.do_interrupt=function(a){this.isr|=a;this.imr&a&&this.pic.push_irq(11)}; +Ne2k.prototype.data_port_write=function(a){this.remote_buffer[this.remote_pointer++]=a;this.remote_pointer===this.rcnt&&(a=this.remote_buffer.subarray(0,this.rcnt),this.do_interrupt(64),this.cr&=-5,this.Ne2k$adapter.send(a),this.do_interrupt(2))};Ne2k.prototype.data_port_write16=function(a){this.data_port_write(a);this.data_port_write(a>>8)};Ne2k.prototype.data_port_write32=function(a){this.data_port_write(a);this.data_port_write(a>>8);this.data_port_write(a>>16);this.data_port_write(a>>24)}; +Ne2k.prototype.data_port_read=function(){return this.receive_buffer[this.rsar++]};Ne2k.prototype.data_port_read16=function(){return this.data_port_read()|this.data_port_read()<<8};Ne2k.prototype.data_port_read32=function(){return this.data_port_read()|this.data_port_read()<<8|this.data_port_read()<<16|this.data_port_read()<<24}; +Ne2k.prototype.receive=function(a){if(!(this.cr&1)){if(60>a.length){var c=a;a=new Uint8Array(60);a.set(c)}var c=this.curpg<<8,d=a.length+4,e=c+4,f=this.curpg+1+(d>>8);if(c+d>this.receive_buffer.length){var g=this.receive_buffer.length-e;this.receive_buffer.set(a.subarray(0,g),e);this.receive_buffer.set(a.subarray(g),76)}else this.receive_buffer.set(a,e);128<=f&&(f+=-52);this.receive_buffer[c]=1;this.receive_buffer[c+1]=f;this.receive_buffer[c+2]=d;this.receive_buffer[c+3]=d>>8;this.curpg=f;this.do_interrupt(1)}};function VirtIO(a,c){this.pci_space=[244,26,9,16,7,5,16,0,0,0,2,0,0,0,0,0,1,168,0,0,0,16,191,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,244,26,9,0,0,0,0,0,64,0,0,0,0,0,0,0,12,1,0,0];this.pci_id=48;this.pci_bars=[{size:131072}];a.devices.pci.register_device(this);var d=a.io;d.register_read(43008,this,void 0,void 0,function(){return 1});d.register_write(43012,this,void 0,void 0,function(){});d.register_write(43022,this,void 0,function(a){this.queue_select=a},void 0);d.register_read(43020,this,void 0, +function(){return this.queue_size},void 0);d.register_read(43016,this,void 0,void 0,function(){return 0===this.queue_select?this.queue_address:0});d.register_write(43016,this,void 0,void 0,function(a){this.queue_address=a});d.register_write(43026,this,function(a){this.device_status=a});d.register_read(43026,this,function(){return this.device_status});d.register_read(43027,this,function(){var a=this.isr;this.isr=0;return a});d.register_write(43024,this,void 0,function(){var a=(this.queue_address<< +12)+16*this.queue_size,c=a+4;this.memory.read16(a);for(var a=this.memory.read16(a+2),d=this.queue_size-1,a=a&d;this.last_idx!==a;){var e=this.memory.read16(c+2*this.last_idx);this.handle_descriptor(e);this.last_idx=this.last_idx+1&d}});this.pic=a.devices.pic;this.last_idx=this.isr=this.device_status=this.queue_select=0;this.queue_size=32;this.queue_address=0;this.memory=a.memory;for(var e=0;128>e;e++)d.register_read(43028+e,this,function(a){return this.device.configspace[a]}.bind(this,e),void 0,void 0), +d.register_write(43028+e,this,function(){}.bind(this,e),void 0,void 0);this.device=new Virtio9p(c);this.device.SendReply=this.device_reply.bind(this);this._state_restore=function(){this.device.SendReply=this.device_reply.bind(this)}} +VirtIO.prototype.handle_descriptor=function(a){var c=a,d=this.queue_address<<12,e=0,f=[];do{var g=d+16*c,k=this.memory.read16(g+12);if(k&2)break;var m=this.memory.read32s(g),c=this.memory.read32s(g+4),l=this.memory.read32s(g+8)>>>0;f.push({addr_low:m,addr_high:c,len:l});if(k&1)c=this.memory.read16(g+14);else{c=-1;break}}while(1);var n=-1,p=0;this.device.ReceiveRequest({start:a,next:c},function(){if(p>=n){if(e===f.length)return 0;var a=f[e++];m=a.addr_low;n=a.len;p=0}return this.memory.read8(m+p++)}.bind(this))}; +VirtIO.prototype.device_reply=function(a){if(-1!==a.next){var c=this.device.replybuffersize,d=a.next,e=this.queue_address<<12,f=0,g=[];do{var d=e+16*d,k=this.memory.read16(d+12);if(0===(k&2))break;var m=this.memory.read32s(d),l=this.memory.read32s(d+4),n=this.memory.read32s(d+8)>>>0;g.push({addr_low:m,addr_high:l,len:n});if(k&1)d=this.memory.read16(d+14);else break}while(1);k=-1;for(e=l=0;e=k){if(f===g.length)return 0;k=g[f++];m=k.addr_low;k=k.len;l=0}this.memory.write8(m+ +l++,d)}f=(this.queue_address<<12)+580;f=f+4095&-4096;this.memory.read16(f);g=this.memory.read16(f+2);this.memory.write16(f+2,g+1);f=f+4+8*(g&31);this.memory.write32(f,a.start);this.memory.write32(f+4,c);this.isr|=1;this.pic.push_irq(12)}};var S_IFDIR=16384;function FS(a){this.inodes=[];this.events=[];this.baseurl=a;this.filesinloadingqueue=this.qidnumber=0;this.OnLoaded=function(){};this.userinfo=[];this.inodedata={};this.CreateDirectory("",-1)}FS.prototype.LoadFilesystem=function(a){this.userinfo=a;this.LoadFSXML(this.userinfo.basefsURL);this.OnLoaded=function(){}.bind(this)};FS.prototype.AddEvent=function(a,c){0==this.inodes[a].status?c():this.events.push({id:a,OnEvent:c})}; +FS.prototype.HandleEvent=function(a){0==this.filesinloadingqueue&&(this.OnLoaded(),this.OnLoaded=function(){});for(var c=this.events.length-1;0<=c;c--)this.events[c].id==a&&(this.events[c].OnEvent(),this.events.splice(c,1))};FS.prototype.LoadFSXML=function(a){LoadXMLResource(a,this.OnJSONLoaded.bind(this),function(a){throw a;})}; +FS.prototype.OnJSONLoaded=function(a){function c(a,d){var k=e.CreateInode();k.name=a.name;k.uid=a.uid||0;k.gid=a.gid||0;k.atime=Math.floor(a.atime)||k.atime;k.ctime=Math.floor(a.ctime)||k.ctime;k.mtime=Math.floor(a.mtime)||k.mtime;k.parentid=d;k.mode=a.mode&511;k.size=a.size||0;switch(a.type){case "dir":k.updatedir=!0;k.mode|=S_IFDIR;var m=e.inodes.length;e.PushInode(k);for(var k=a.children,l=0;l>8;this.PushInode(d);return this.inodes.length-1}; +FS.prototype.CreateFile=function(a,c){var d=this.CreateInode();d.name=a;d.parentid=c;d.uid=this.inodes[c].uid;d.gid=this.inodes[c].gid;d.qid.type=128;d.mode=this.inodes[c].mode&438|32768;this.PushInode(d);return this.inodes.length-1};FS.prototype.CreateNode=function(a,c,d,e){var f=this.CreateInode();f.name=a;f.parentid=c;f.major=d;f.minor=e;f.uid=this.inodes[c].uid;f.gid=this.inodes[c].gid;f.qid.type=192;f.mode=this.inodes[c].mode&438;this.PushInode(f);return this.inodes.length-1}; +FS.prototype.CreateSymlink=function(a,c,d){var e=this.CreateInode();e.name=a;e.parentid=c;e.uid=this.inodes[c].uid;e.gid=this.inodes[c].gid;e.qid.type=160;e.symlink=d;e.mode=40960;this.PushInode(e);return this.inodes.length-1};FS.prototype.OpenInode=function(a){var c=this.GetInode(a);(c.mode&61440)==S_IFDIR&&this.FillDirectory(a);return 2==c.status?(this.LoadFile(a),!1):!0}; +FS.prototype.CloseInode=function(a){var c=this.GetInode(a);4==c.status&&(-1==c.status,delete this.inodedata[a],c.waswritten=!0,c.size=0)}; +FS.prototype.Rename=function(a,c,d,e){if(a==d&&c==e)return!0;c=this.Search(a,c);if(-1==c)return!1;var f=this.Search(d,e);-1!=f&&this.Unlink(f);f=this.inodes[c];if(this.inodes[f.parentid].firstid==c)this.inodes[f.parentid].firstid=f.nextid;else{var g=this.FindPreviousID(c);this.inodes[g].nextid=f.nextid}f.parentid=d;f.name=e;f.qid.version++;f.nextid=this.inodes[f.parentid].firstid;this.inodes[f.parentid].firstid=c;this.inodes[a].updatedir=!0;return this.inodes[d].updatedir=!0}; +FS.prototype.Write=function(a,c,d,e){var f=this.inodes[a],g=this.inodedata[a];f.waswritten=!0;!g||g.lengtha||a>this.inodes.length?0:this.inodes[a]}; +FS.prototype.ChangeSize=function(a,c){var d=this.GetInode(a),e=this.inodedata[a];if(c!=d.size){var f=this.inodedata[a]=new Uint8Array(c);d.size=c;d.waswritten=!0;if(e)for(var d=Math.min(e.length,d.size),g=0;g>12,"."],g,e);e+=Marshall(["Q","d","b","s"],[this.inodes[d].qid,e+13+8+1+2+2,this.inodes[d].mode>>12,".."],g,e);for(f=this.inodes[a].firstid;-1!= +f;)e+=Marshall(["Q","d","b","s"],[this.inodes[f].qid,e+13+8+1+2+UTF8Length(this.inodes[f].name),this.inodes[f].mode>>12,this.inodes[f].name],g,e),f=this.inodes[f].nextid;c.updatedir=!1}};FS.prototype.PrepareCAPs=function(a){a=this.GetInode(a);if(a.caps)return a.caps.length;a.caps=new Uint8Array(12);a.caps[0]=0;a.caps[1]=0;a.caps[2]=0;a.caps[3]=1;a.caps[4]=255;a.caps[5]=255;a.caps[6]=255;a.caps[7]=255;a.caps[8]=255;a.caps[9]=255;a.caps[10]=255;a.caps[11]=255;return a.caps.length};function LoadXMLResource(a,c,d){var e=new XMLHttpRequest;e.open("GET",a,!0);e.onreadystatechange=function(){4==e.readyState&&(200!=e.status&&0!=e.status?d("Error: Could not load XML file "+a):c(e.responseText))};e.send(null)} +function LoadBinaryResource(a,c,d){var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onreadystatechange=function(){if(4==e.readyState)if(200!=e.status&&0!=e.status)d("Error: Could not load file "+a);else{var f=e.response;f?c(f):d("Error: No data received from: "+a)}};e.send(null)};function Marshall(a,c,d,e){for(var f,g=0,k=0;k>8&255;d[e++]=f>>16&255;d[e++]=f>>24&255;g+=4;break;case "d":d[e++]=f&255;d[e++]=f>>8&255;d[e++]=f>>16&255;d[e++]=f>>24&255;d[e++]=0;d[e++]=0;d[e++]=0;d[e++]=0;g+=8;break;case "h":d[e++]=f&255;d[e++]=f>>8;g+=2;break;case "b":d[e++]=f;g+=1;break;case "s":var m=e,l=0;d[e++]=0;d[e++]=0;var g=g+2,n;for(n in f)UnicodeToUTF8Stream(f.charCodeAt(n)).forEach(function(a){d[e++]=a;g+=1;l++});d[m+0]= +l&255;d[m+1]=l>>8&255;break;case "Q":Marshall(["b","w","d"],[f.type,f.version,f.path],d,e),e+=13,g+=13}return g} +function Unmarshall2(a,c){for(var d=[],e=0;e>>0);d.push(f);break;case "d":f=c();f+=c()<<8;f+=c()<<16;f+=c()<<24>>>0;c();c();c();c();d.push(f);break;case "h":f=c();d.push(f+(c()<<8));break;case "b":d.push(c());break;case "s":for(var f=c(),f=f+(c()<<8),g="",k=new UTF8StreamToUnicode,m=0;mthis.UTF8StreamToUnicode$stream[0])return this.ofs=0,this.UTF8StreamToUnicode$stream[0];break;case 2:if(192==(this.UTF8StreamToUnicode$stream[0]&224)&&128==(this.UTF8StreamToUnicode$stream[1]&192))return this.ofs=0,(this.UTF8StreamToUnicode$stream[0]&31)<<6|this.UTF8StreamToUnicode$stream[1]&63}return-1}} +function UnicodeToUTF8Stream(a){if(128>a)return[a];if(2048>a)return[192|a>>6&31,128|a&63]}function UTF8Length(a){for(var c=0,d=0;da.charCodeAt(d)?1:2;return c};window.requestAnimationFrame||(window.requestAnimationFrame=window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame); +function ScreenAdapter(a){function c(a){a=a.toString(16);return"#"+Array(7-a.length).join("0")+a}function d(){B=!0;for(var a=0;a>2,A,((u-y)/A>>2)+1),y=1E7,u=0)}function f(a,c,d){c=""+(1===c?"":" scaleX("+c+")")+(1===d?"":" scaleY("+d+")");a.style.webkitTransform=a.style.MozTransform=c}console.assert(a,"1st argument must be a DOM container");var g=a.getElementsByTagName("canvas")[0],k=g.getContext("2d"),m= +g.nextElementSibling||g.previousElementSibling,l=document.createElement("div"),n,p,s,q,r,t=1,x=1,A,y=0,u=0,w,B=!0,E=!1,v,z,D,F=this;a=new Uint16Array([199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,186,191,8976,172,189,188,161,171,187,9617,9618,9619,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575, +9576,9572,9573,9561,9560,9554,9555,9579,9578,9496,9484,9608,9604,9612,9616,9600,945,223,915,960,931,963,181,964,934,920,937,948,8734,966,949,8745,8801,177,8805,8804,8992,8993,247,8776,176,8729,183,8730,8319,178,9632,160]);for(var I=new Uint16Array([32,9786,9787,9829,9830,9827,9824,8226,9688,9675,9689,9794,9792,9834,9835,9788,9658,9668,8597,8252,182,167,9644,8616,8593,8595,8594,8592,8735,8596,9650,9660]),H=[],G,C=0;256>C;C++)127C?G=I[C]:G=C,H[C]=String.fromCharCode(G);k.imageSmoothingEnabled= +!1;k.mozImageSmoothingEnabled=!1;k.webkitImageSmoothingEnabled=!1;l.style.position="absolute";l.style.backgroundColor="#ccc";l.style.width="7px";l.style.display="inline-block";m.style.display="block";g.style.display="none";this.init=function(){this.set_size_text(80,25)};this.make_screenshot=function(){try{window.open(g.toDataURL())}catch(a){}};this.put_char=function(a,c,d,e,f){a=p.length||(y=au?a:u,p[a+1^3]=c)};this.put_pixel_linear32=function(a,c){y=au?a:u;s[a>>2]=4278190080|c>>16&255|c<<16|c&65280};this.destroy=function(){};this.set_mode=function(a){(E=a)?(m.style.display="none",g.style.display="block"):(m.style.display="block",g.style.display="none")};this.set_size_text=function(a,c){w=new Int8Array(c);v=new Int32Array(a*c*3);z=a;for(D=c;m.childNodes.length>c;)m.removeChild(m.firstChild);for(;m.childNodes.length=l.length||0===l[a])return console.log("Missing char in map: "+a.toString(16)),!0;var d=l[a];c||(d|=128);255>8),m(d&255)):m(d);return!1}var g={},k=this,m;this.enabled=!0;var l=new Uint16Array([0,0,0,0,0,0,0,0,14,15,0,0,0,28,0,0,42,29,56,0,58,0,0,0,0,0,0,1,0,0,0,0,57,57417,57425,57423,57415,57419,57416,57421,80,0,0,0,0,82,83,0,11,2,3,4,5,6,7,8,9,10,0,39,0,13,0,0,0,30,48,46,32,18,33,34,35,23,36,37,38,50,49,24,25,16,19,31,20,22,47,17,45,21,44,0,0,0,0,0,82,79,80,81,75,76,77,71,72,73,0, +0,0,0,0,0,59,60,61,62,63,64,65,66,67,68,87,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,69,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,39,13,51,12,52,53,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,43,27,40,0]);this.init=function(a){this.destroy();m=a;window.addEventListener("keyup",c,!1);window.addEventListener("keydown",d,!1);window.addEventListener("blur",e,!1)};this.destroy=function(){window.removeEventListener("keyup",c,!1);window.removeEventListener("keydown", +d,!1);window.removeEventListener("blur",e,!1)}};function MouseAdapter(){function a(a){return s.enabled&&s.emu_enabled&&(!a.target||"mousemove"===a.type||"INPUT"!==a.target.nodeName&&"TEXTAREA"!==a.target.nodeName)}function c(c){if(a(c)){var d;d=c.webkitMovementX||c.mozMovementX||0;c=c.webkitMovementY||c.mozMovementY||0;p(.15*d,-(.15*c))}}function d(c){a(c)&&c.preventDefault()}function e(c){a(c)&&g(c,!0)}function f(c){a(c)&&g(c,!1)}function g(a,c){1===a.which?k=c:2===a.which?l=c:3===a.which?m=c:console.log("Unknown event.which: "+a.which);n(k,l, +m);a.preventDefault()}var k=!1,m=!1,l=!1,n,p,s=this;this.enabled=!1;this.emu_enabled=!0;this.destroy=function(){window.removeEventListener("mousemove",c,!1);document.removeEventListener("contextmenu",d,!1);window.removeEventListener("mousedown",e,!1);window.removeEventListener("mouseup",f,!1)};this.init=function(a,g){this.destroy();n=a;p=g;window.addEventListener("mousemove",c,!1);document.addEventListener("contextmenu",d,!1);window.addEventListener("mousedown",e,!1);window.addEventListener("mouseup", +f,!1)}};function SerialAdapter(a){function c(a){f.enabled&&(g(a.keyCode),a.preventDefault())}function d(a){8===a.keyCode&&(g(127),a.preventDefault())}function e(a){for(var c=a.clipboardData.getData("text/plain"),d=0;dDate.now()||(this.last_connect_attempt=Date.now(),this.socket=new WebSocket(this.url),this.socket.binaryType="arraybuffer",this.socket.onopen=this.handle_open.bind(this),this.socket.onmessage=this.handle_message.bind(this),this.socket.onclose=this.handle_close.bind(this),this.socket.onerror=this.handle_error.bind(this))}; +NetworkAdapter.prototype.send=function(a){this.socket&&1===this.socket.readyState?this.socket.send(a):(this.send_queue.push(a),128>20)+" MB ...");var e=new ArrayBuffer(a.size), +l=0,n=new FileReader;this.load=function(){function p(){if(d.onprogress)d.onprogress({loaded:l,total:a.size,lengthComputable:!0});if(l