blob: 99e1c7a9114fd54907da908e81ad2b8507390c0e [file] [log] [blame] [raw]
'use strict';var JSCompiler_prototypeAlias;(function(){function a(a){var b=document.getElementById("log");b.style.display="block";b.textContent+=a+"\n";b.scrollTop=1E9}function b(){for(var a=location.search.substr(1).split("&"),b,c={},e=0;e<a.length;e++)b=a[e].split("="),c[b[0]]=b[1];return c}function c(a){var b=a.requestPointerLock||a.mozRequestPointerLock||a.webkitRequestPointerLock;b&&b.call(a)}function d(a,b){for(var c="";0<b--;)c+=a;return c}function e(a,b){var c=f("loading");c.style.display="block";if(b.lengthComputable||a.total&&"number"===
typeof b.loaded){var e=b.loaded/(b.total||a.total)*100|0,e=Math.min(100,Math.max(0,e));c.textContent=a.msg+" "+e+"% ["+d("#",e>>1)+d(" ",50-(e>>1))+"]"}else a.ticks||(a.ticks=0),c.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,b,c){document.title=a.name+" - Virtual x86";if(67108864>a.size){var f=new SyncFileBuffer(a);f.onprogress=e.bind(this,{msg:"Loading disk image into memory"})}else f=
new AsyncFileBuffer(a);f.onload=function(){switch(b){case "floppy":l.fda=f;break;case "hd":l.hda=f;break;case "cdrom":l.cdrom=f}c()};f.AsyncFileBuffer$load()}function g(a,b,c){b.memory_size=a.memory_size;b.vga_memory_size=a.vga_memory_size;a.async_hda&&(b.hda=new AsyncXHRBuffer(a.async_hda,512,a.async_hda_size));a.fda?b.fda=new SyncBuffer(c):a.cdrom&&(b.cdrom=new SyncBuffer(c));k(b,function(b){if(a.state){var e=c.byteLength;if(16>e)throw new StateLoadError("Invalid length: "+e);var d=new Int32Array(c,
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]!==e)throw new StateLoadError("Length doesn't match header: real="+e+" header="+d[2]);d=d[3];if(0>d||d+12>=e||d%2)throw new StateLoadError("Invalid info block length: "+d);for(var f=d/2,g=new Uint16Array(c,16,f),k="",e=0;e<f-8;)k+=String.fromCharCode(g[e++],g[e++],g[e++],g[e++],g[e++],g[e++],g[e++],g[e++]);for(;e<f;)k+=String.fromCharCode(g[e++]);
f=JSON.parse(k);d=16+d;g=f.buffer_infos;for(e=0;e<g.length;e++)g[e].offset+=d;restore_object(b,f.state,{full:c,infos:g})}b.run()})}if("responseType"in new XMLHttpRequest){var l={load_devices:!0};f("toggle_mouse").onclick=function(){var a=l.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=l.mouse_adapter;if(a&&!a.emu_enabled)f("toggle_mouse").onclick();c(document.body);f("lock_mouse").blur()};load_file("bios/seabios.bin",
function(a){l.bios=a;m&&m()});load_file("bios/bochs-vgabios-0.7a.bin",function(a){l.vga_bios=a;m&&m()});f("start_emulation").onclick=function(){function a(){if(0===b.length)k(l,function(a){a.run()});else{var c=b.pop();d(c.file,c.type,a)}}f("boot_options").style.display="none";var b=[];f("floppy_image").files.length&&b.push({file:f("floppy_image").files[0],type:"floppy"});f("cd_image").files.length&&b.push({file:f("cd_image").files[0],type:"cdrom"});f("hd_image").files.length&&b.push({file:f("hd_image").files[0],
type:"hd"});a()};for(var z=[{id:"archlinux",state:"http://localhost/v86-images/v86state.bin",size:143654912,name:"Arch Linux",memory_size:268435456,vga_memory_size:8388608,async_hda:"http://localhost/v86-images/arch3.img",async_hda_size:8589934592},{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"}],B=b().profile,w=0;w<z.length;w++){var x=z[w],r="start_"+x.id;f(r).onclick=function(a){load_file(a.state||a.fda||a.cdrom,g.bind(this,a,l),e.bind(this,{msg:"Downloading image",total:a.size}));var b;(b=B===a.id?window.history.replaceState:window.history.pushState)&&b.call(window.history,{profile:a.id},"","?profile="+a.id);document.title=a.name+" - Virtual x86";
f(r).blur();f("boot_options").style.display="none"}.bind(this,x);if(B===x.id){f(r).onclick();break}}}else a("Your browser is not supported because it doesn't have XMLHttpRequest.responseType")}function k(b,c){if(b.bios&&b.vga_bios){var e=new v86;b.fdb=void 0;b.screen_adapter=new ScreenAdapter(f("screen_container"));b.keyboard_adapter=new KeyboardAdapter;b.mouse_adapter=new MouseAdapter;b.boot_order=parseInt(f("boot_order").value,16);b.serial_adapter=new SerialAdapter(f("serial"));b.network_adapter=
new NetworkAdapter("ws://localhost:8001/");if(!b.memory_size){var d=1048576*parseInt(f("memory_size").value,10);16777216<=d&&2147483648>d?b.memory_size=d:(a("Invalid memory size - ignored."),b.memory_size=33554432)}b.vga_memory_size||(d=1048576*parseInt(f("video_memory_size").value,10),65536<d&&2147483648>d?b.vga_memory_size=d:(a("Invalid video memory size - ignored."),b.vga_memory_size=8388608));l(b,e);e.init(b);c(e)}else m=k.bind(this,b,c)}function l(a,b){function e(){if(g){var a=Date.now(),c=(b.timestamp_counter-
C)/1E3|0;v+=c;s+=a-p;p=a;l.textContent=c;m.textContent=v/s*1E3|0;a=s/1E3|0;k.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";C=b.timestamp_counter}setTimeout(e,1E3)}function d(){if(g){var c=b.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");b.devices.hda?(c=b.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";b.devices.cdrom?(c=
b.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(d,1E3)}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 g=!0;f("run").onclick=function(){g?(s+=Date.now()-p,f("run").value="Run",b.stop()):(f("run").value="Pause",b.run(),p=Date.now());g=!g;f("run").blur()};f("exit").onclick=function(){location.href=location.pathname};var k=f("running_time"),l=f("speed"),m=f("avg_speed"),p=Date.now(),s=0,v=0,C=0;setTimeout(e,1E3);setTimeout(d,0);f("reset").onclick=function(){JSCompiler_StaticMethods_restart(b);f("reset").blur()};for(var q=["hda","hdb","fda","fdb"],t=0;t<q.length;t++){var A=f("get_"+q[t]+"_image"),
D=a[q[t]];D&&16777216>D.byteLength?A.onclick=function(a){D.get_buffer(function(b){var c=a+".img",e=new Blob([b]);b=document.createElement("a");b.download=c;b.href=window.URL.createObjectURL(e);b.dataset.downloadurl=["application/octet-stream",b.download,b.href].join(":");document.createEvent?(c=document.createEvent("MouseEvent"),c.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),b.dispatchEvent(c)):b.click()});this.blur()}.bind(A,q[t]):A.style.display="none"}f("ctrlaltdel").onclick=
function(){var a=b.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 b=parseFloat(this.value);(b||0<b)&&a.screen_adapter.set_scale(b,b)};f("fullscreen").onclick=function(){var a=document.getElementById("screen_container"),b=a.requestFullScreen||a.webkitRequestFullscreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&(b.call(a),document.getElementsByClassName("phone_keyboard")[0].focus());
c(a)};f("screen_container").onclick=function(){window.getSelection().isCollapsed&&document.getElementsByClassName("phone_keyboard")[0].focus()};f("take_screenshot").onclick=function(){a.screen_adapter.make_screenshot();f("take_screenshot").blur()};a.serial_adapter&&(f("serial").style.display="block")}var m;window.addEventListener("load",g,!1);window.addEventListener("popstate",function(){location.reload()},!1);"complete"===document.readyState&&g()})();function v86(){var a=this;this.memory_size=0;this.segment_is_null=[];this.segment_offsets=[];this.segment_limits=[];this.tlb_data=[];this.tlb_info=[];this.tlb_info_global=[];this.protected_mode=!1;this.gdtr_offset=this.gdtr_size=this.idtr_offset=this.idtr_size=0;this.page_fault=!1;this.page_size_extensions=this.cpl=this.cr4=this.cr3=this.cr2=this.cr0=0;this.stopped=this.running=this.in_hlt=this.address_size_32=this.stack_size_32=this.operand_size_32=this.is_32=!1;this.devices={vga:{timer:function(){},
destroy:function(){}},ps2:{timer:function(){},destroy:function(){}}};this.tsc_offset=this.last_result=this.last_add_result=this.last_op_size=this.last_op2=this.last_op1=this.flags_changed=this.flags=this.repeat_string_prefix=this.sysenter_eip=this.sysenter_esp=this.sysenter_cs=this.eip_phys=this.last_virt_eip=0;this.regv=this.reg16;this.reg_vdi=this.reg_vsi=this.reg_vcx=0;this.table=[];this.table0F=[];this.current_settings={};this.paging=!1;this.timestamp_counter=this.previous_ip=this.instruction_pointer=
0;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.stack_reg=this.reg16;this.reg_vbp=this.reg_vsp=0;this.memory=null;this.segment_prefix=-1;this.last_instr_jump=!1;this.first_init=!0;this.v86$next_tick=function(){};this.microtick=
function(){};this.fpu=this.io=void 0;"use strict";(function(){var b={};a.debug=b;b.step_mode=!1;b.ops={};b.show=function(a){if("undefined"!==typeof document){var b=document.getElementById("log");if(b){b.textContent+=a+"\n";b.style.display="block";b.scrollTop=1E9;return}}console.log(b)};b.init=function(){};b.dump_regs=function(){};b.dump_instructions=function(){};b.dump_regs_short=function(){};b.dump_stack=function(){};b.dump_page_directory=function(){};b.dump_gdt_ldt=function(){};b.dump_idt=function(){};
b.get_memory_dump=function(){};b.memory_hex_dump=function(){};b.used_memory_dump=function(){};b.step=function(){};b.run_until=function(){};b.debugger=function(){};b.unimpl=function(a){a="Unimplemented"+(a?": "+a:"");b.show(a);b.show("Execution stopped");return a};b.logop=function(){}})()}
v86.prototype._state_restore=function(){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);JSCompiler_StaticMethods_update_address_size(this);JSCompiler_StaticMethods_update_operand_size(this);this.stack_size_32?this.stack_reg=this.reg32s:this.stack_reg=this.reg16;JSCompiler_StaticMethods_full_clear_tlb(this);this.timestamp_counter=
0};"use strict";
(function(){v86.prototype.modrm_table16=Array(192);v86.prototype.modrm_table32=Array(192);v86.prototype.sib_table=Array(256);v86.prototype.modrm_table16[0]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+(a.reg16[6]+a.reg16[12]&65535)|0};v86.prototype.modrm_table16[64]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+(a.reg16[6]+a.reg16[12]+JSCompiler_StaticMethods_read_imm8s(a)&65535)|0};v86.prototype.modrm_table16[128]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+(a.reg16[6]+
a.reg16[12]+JSCompiler_StaticMethods_read_imm16(a)&65535)|0};v86.prototype.modrm_table16[1]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+(a.reg16[6]+a.reg16[14]&65535)|0};v86.prototype.modrm_table16[65]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+(a.reg16[6]+a.reg16[14]+JSCompiler_StaticMethods_read_imm8s(a)&65535)|0};v86.prototype.modrm_table16[129]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+(a.reg16[6]+a.reg16[14]+JSCompiler_StaticMethods_read_imm16(a)&
65535)|0};v86.prototype.modrm_table16[2]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ss(a)+(a.reg16[10]+a.reg16[12]&65535)|0};v86.prototype.modrm_table16[66]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ss(a)+(a.reg16[10]+a.reg16[12]+JSCompiler_StaticMethods_read_imm8s(a)&65535)|0};v86.prototype.modrm_table16[130]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ss(a)+(a.reg16[10]+a.reg16[12]+JSCompiler_StaticMethods_read_imm16(a)&65535)|0};v86.prototype.modrm_table16[3]=
function(a){return JSCompiler_StaticMethods_get_seg_prefix_ss(a)+(a.reg16[10]+a.reg16[14]&65535)|0};v86.prototype.modrm_table16[67]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ss(a)+(a.reg16[10]+a.reg16[14]+JSCompiler_StaticMethods_read_imm8s(a)&65535)|0};v86.prototype.modrm_table16[131]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ss(a)+(a.reg16[10]+a.reg16[14]+JSCompiler_StaticMethods_read_imm16(a)&65535)|0};v86.prototype.modrm_table16[4]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
(a.reg16[12]&65535)|0};v86.prototype.modrm_table16[68]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+(a.reg16[12]+JSCompiler_StaticMethods_read_imm8s(a)&65535)|0};v86.prototype.modrm_table16[132]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+(a.reg16[12]+JSCompiler_StaticMethods_read_imm16(a)&65535)|0};v86.prototype.modrm_table16[5]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+(a.reg16[14]&65535)|0};v86.prototype.modrm_table16[69]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
(a.reg16[14]+JSCompiler_StaticMethods_read_imm8s(a)&65535)|0};v86.prototype.modrm_table16[133]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+(a.reg16[14]+JSCompiler_StaticMethods_read_imm16(a)&65535)|0};v86.prototype.modrm_table16[6]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ss(a)+(a.reg16[10]&65535)|0};v86.prototype.modrm_table16[70]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ss(a)+(a.reg16[10]+JSCompiler_StaticMethods_read_imm8s(a)&65535)|0};v86.prototype.modrm_table16[134]=
function(a){return JSCompiler_StaticMethods_get_seg_prefix_ss(a)+(a.reg16[10]+JSCompiler_StaticMethods_read_imm16(a)&65535)|0};v86.prototype.modrm_table16[7]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+(a.reg16[6]&65535)|0};v86.prototype.modrm_table16[71]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+(a.reg16[6]+JSCompiler_StaticMethods_read_imm8s(a)&65535)|0};v86.prototype.modrm_table16[135]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
(a.reg16[6]+JSCompiler_StaticMethods_read_imm16(a)&65535)|0};v86.prototype.modrm_table32[0]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.modrm_table32[64]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]+JSCompiler_StaticMethods_read_imm8s(a)|0};v86.prototype.modrm_table32[128]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]+JSCompiler_StaticMethods_read_imm32s(a)|0};v86.prototype.modrm_table32[1]=
function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.modrm_table32[65]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]+JSCompiler_StaticMethods_read_imm8s(a)|0};v86.prototype.modrm_table32[129]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]+JSCompiler_StaticMethods_read_imm32s(a)|0};v86.prototype.modrm_table32[2]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.modrm_table32[66]=
function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]+JSCompiler_StaticMethods_read_imm8s(a)|0};v86.prototype.modrm_table32[130]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]+JSCompiler_StaticMethods_read_imm32s(a)|0};v86.prototype.modrm_table32[3]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.modrm_table32[67]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]+JSCompiler_StaticMethods_read_imm8s(a)|
0};v86.prototype.modrm_table32[131]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]+JSCompiler_StaticMethods_read_imm32s(a)|0};v86.prototype.modrm_table32[4]=function(a){return a.sib_table[JSCompiler_StaticMethods_read_imm8(a)](a,!1)|0};v86.prototype.modrm_table32[68]=function(a){return a.sib_table[JSCompiler_StaticMethods_read_imm8(a)](a,!1)+JSCompiler_StaticMethods_read_imm8s(a)|0};v86.prototype.modrm_table32[132]=function(a){return a.sib_table[JSCompiler_StaticMethods_read_imm8(a)](a,
!1)+JSCompiler_StaticMethods_read_imm32s(a)|0};v86.prototype.modrm_table32[5]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]|0};v86.prototype.modrm_table32[69]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]+JSCompiler_StaticMethods_read_imm8s(a)|0};v86.prototype.modrm_table32[133]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]+JSCompiler_StaticMethods_read_imm32s(a)|0};v86.prototype.modrm_table32[6]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
a.reg32s[6]|0};v86.prototype.modrm_table32[70]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]+JSCompiler_StaticMethods_read_imm8s(a)|0};v86.prototype.modrm_table32[134]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]+JSCompiler_StaticMethods_read_imm32s(a)|0};v86.prototype.modrm_table32[7]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.modrm_table32[71]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
a.reg32s[7]+JSCompiler_StaticMethods_read_imm8s(a)|0};v86.prototype.modrm_table32[135]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]+JSCompiler_StaticMethods_read_imm32s(a)|0};v86.prototype.modrm_table16[6]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm16(a)|0};v86.prototype.modrm_table32[5]=function(a){return JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a)|0};v86.prototype.modrm_table32[4]=
function(a){return a.sib_table[JSCompiler_StaticMethods_read_imm8(a)](a,!1)|0};v86.prototype.modrm_table32[68]=function(a){return a.sib_table[JSCompiler_StaticMethods_read_imm8(a)](a,!0)+JSCompiler_StaticMethods_read_imm8s(a)|0};v86.prototype.modrm_table32[132]=function(a){return a.sib_table[JSCompiler_StaticMethods_read_imm8(a)](a,!0)+JSCompiler_StaticMethods_read_imm32s(a)|0};for(var a=0;8>a;a++)for(var b=0;3>b;b++)for(var c=a|b<<6,d=1;8>d;d++)v86.prototype.modrm_table32[c|d<<3]=v86.prototype.modrm_table32[c],
v86.prototype.modrm_table16[c|d<<3]=v86.prototype.modrm_table16[c];v86.prototype.sib_table[0]=function(a){return a.reg32s[0]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[1]=function(a){return a.reg32s[0]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[2]=function(a){return a.reg32s[0]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[3]=function(a){return a.reg32s[0]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
a.reg32s[3]|0};v86.prototype.sib_table[4]=function(a){return a.reg32s[0]+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[5]=function(a,b){return a.reg32s[0]+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[6]=function(a){return a.reg32s[0]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[7]=function(a){return a.reg32s[0]+
JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[64]=function(a){return(a.reg32s[0]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[65]=function(a){return(a.reg32s[0]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[66]=function(a){return(a.reg32s[0]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[67]=function(a){return(a.reg32s[0]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
a.reg32s[3]|0};v86.prototype.sib_table[68]=function(a){return(a.reg32s[0]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[69]=function(a,b){return(a.reg32s[0]<<1)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[70]=function(a){return(a.reg32s[0]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[71]=
function(a){return(a.reg32s[0]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[128]=function(a){return(a.reg32s[0]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[129]=function(a){return(a.reg32s[0]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[130]=function(a){return(a.reg32s[0]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[131]=function(a){return(a.reg32s[0]<<
2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[132]=function(a){return(a.reg32s[0]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[133]=function(a,b){return(a.reg32s[0]<<2)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[134]=function(a){return(a.reg32s[0]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
a.reg32s[6]|0};v86.prototype.sib_table[135]=function(a){return(a.reg32s[0]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[192]=function(a){return(a.reg32s[0]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[193]=function(a){return(a.reg32s[0]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[194]=function(a){return(a.reg32s[0]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|
0};v86.prototype.sib_table[195]=function(a){return(a.reg32s[0]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[196]=function(a){return(a.reg32s[0]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[197]=function(a,b){return(a.reg32s[0]<<3)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[198]=function(a){return(a.reg32s[0]<<
3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[199]=function(a){return(a.reg32s[0]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[8]=function(a){return a.reg32s[1]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[9]=function(a){return a.reg32s[1]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[10]=function(a){return a.reg32s[1]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
a.reg32s[2]|0};v86.prototype.sib_table[11]=function(a){return a.reg32s[1]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[12]=function(a){return a.reg32s[1]+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[13]=function(a,b){return a.reg32s[1]+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[14]=function(a){return a.reg32s[1]+
JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[15]=function(a){return a.reg32s[1]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[72]=function(a){return(a.reg32s[1]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[73]=function(a){return(a.reg32s[1]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[74]=function(a){return(a.reg32s[1]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
a.reg32s[2]|0};v86.prototype.sib_table[75]=function(a){return(a.reg32s[1]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[76]=function(a){return(a.reg32s[1]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[77]=function(a,b){return(a.reg32s[1]<<1)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[78]=
function(a){return(a.reg32s[1]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[79]=function(a){return(a.reg32s[1]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[136]=function(a){return(a.reg32s[1]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[137]=function(a){return(a.reg32s[1]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[138]=function(a){return(a.reg32s[1]<<
2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[139]=function(a){return(a.reg32s[1]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[140]=function(a){return(a.reg32s[1]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[141]=function(a,b){return(a.reg32s[1]<<2)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|
0};v86.prototype.sib_table[142]=function(a){return(a.reg32s[1]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[143]=function(a){return(a.reg32s[1]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[200]=function(a){return(a.reg32s[1]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[201]=function(a){return(a.reg32s[1]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};
v86.prototype.sib_table[202]=function(a){return(a.reg32s[1]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[203]=function(a){return(a.reg32s[1]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[204]=function(a){return(a.reg32s[1]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[205]=function(a,b){return(a.reg32s[1]<<3)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:
JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[206]=function(a){return(a.reg32s[1]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[207]=function(a){return(a.reg32s[1]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[16]=function(a){return a.reg32s[2]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[17]=function(a){return a.reg32s[2]+
JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[18]=function(a){return a.reg32s[2]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[19]=function(a){return a.reg32s[2]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[20]=function(a){return a.reg32s[2]+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[21]=function(a,b){return a.reg32s[2]+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+
a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[22]=function(a){return a.reg32s[2]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[23]=function(a){return a.reg32s[2]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[80]=function(a){return(a.reg32s[2]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[81]=function(a){return(a.reg32s[2]<<
1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[82]=function(a){return(a.reg32s[2]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[83]=function(a){return(a.reg32s[2]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[84]=function(a){return(a.reg32s[2]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[85]=function(a,b){return(a.reg32s[2]<<1)+
(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[86]=function(a){return(a.reg32s[2]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[87]=function(a){return(a.reg32s[2]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[144]=function(a){return(a.reg32s[2]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
a.reg32s[0]|0};v86.prototype.sib_table[145]=function(a){return(a.reg32s[2]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[146]=function(a){return(a.reg32s[2]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[147]=function(a){return(a.reg32s[2]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[148]=function(a){return(a.reg32s[2]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|
0};v86.prototype.sib_table[149]=function(a,b){return(a.reg32s[2]<<2)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[150]=function(a){return(a.reg32s[2]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[151]=function(a){return(a.reg32s[2]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[208]=function(a){return(a.reg32s[2]<<
3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[209]=function(a){return(a.reg32s[2]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[210]=function(a){return(a.reg32s[2]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[211]=function(a){return(a.reg32s[2]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[212]=function(a){return(a.reg32s[2]<<3)+
JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[213]=function(a,b){return(a.reg32s[2]<<3)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[214]=function(a){return(a.reg32s[2]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[215]=function(a){return(a.reg32s[2]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
a.reg32s[7]|0};v86.prototype.sib_table[24]=function(a){return a.reg32s[3]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[25]=function(a){return a.reg32s[3]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[26]=function(a){return a.reg32s[3]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[27]=function(a){return a.reg32s[3]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[28]=
function(a){return a.reg32s[3]+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[29]=function(a,b){return a.reg32s[3]+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[30]=function(a){return a.reg32s[3]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[31]=function(a){return a.reg32s[3]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
a.reg32s[7]|0};v86.prototype.sib_table[88]=function(a){return(a.reg32s[3]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[89]=function(a){return(a.reg32s[3]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[90]=function(a){return(a.reg32s[3]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[91]=function(a){return(a.reg32s[3]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|
0};v86.prototype.sib_table[92]=function(a){return(a.reg32s[3]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[93]=function(a,b){return(a.reg32s[3]<<1)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[94]=function(a){return(a.reg32s[3]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[95]=function(a){return(a.reg32s[3]<<
1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[152]=function(a){return(a.reg32s[3]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[153]=function(a){return(a.reg32s[3]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[154]=function(a){return(a.reg32s[3]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[155]=function(a){return(a.reg32s[3]<<2)+
JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[156]=function(a){return(a.reg32s[3]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[157]=function(a,b){return(a.reg32s[3]<<2)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[158]=function(a){return(a.reg32s[3]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
a.reg32s[6]|0};v86.prototype.sib_table[159]=function(a){return(a.reg32s[3]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[216]=function(a){return(a.reg32s[3]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[217]=function(a){return(a.reg32s[3]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[218]=function(a){return(a.reg32s[3]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|
0};v86.prototype.sib_table[219]=function(a){return(a.reg32s[3]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[220]=function(a){return(a.reg32s[3]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[221]=function(a,b){return(a.reg32s[3]<<3)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[222]=function(a){return(a.reg32s[3]<<
3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[223]=function(a){return(a.reg32s[3]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[32]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[33]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[34]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
a.reg32s[2]|0};v86.prototype.sib_table[35]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[36]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[37]=function(a,b){return 0+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[38]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
a.reg32s[6]|0};v86.prototype.sib_table[39]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[96]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[97]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[98]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[99]=function(a){return 0+
JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[100]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[101]=function(a,b){return 0+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[102]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[103]=
function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[160]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[161]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[162]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[163]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
a.reg32s[3]|0};v86.prototype.sib_table[164]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[165]=function(a,b){return 0+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[166]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[167]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
a.reg32s[7]|0};v86.prototype.sib_table[224]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[225]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[226]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[227]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[228]=function(a){return 0+
JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[229]=function(a,b){return 0+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[230]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[231]=function(a){return 0+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[40]=
function(a){return a.reg32s[5]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[41]=function(a){return a.reg32s[5]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[42]=function(a){return a.reg32s[5]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[43]=function(a){return a.reg32s[5]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[44]=function(a){return a.reg32s[5]+
JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[45]=function(a,b){return a.reg32s[5]+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[46]=function(a){return a.reg32s[5]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[47]=function(a){return a.reg32s[5]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|
0};v86.prototype.sib_table[104]=function(a){return(a.reg32s[5]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[105]=function(a){return(a.reg32s[5]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[106]=function(a){return(a.reg32s[5]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[107]=function(a){return(a.reg32s[5]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};
v86.prototype.sib_table[108]=function(a){return(a.reg32s[5]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[109]=function(a,b){return(a.reg32s[5]<<1)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[110]=function(a){return(a.reg32s[5]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[111]=function(a){return(a.reg32s[5]<<
1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[168]=function(a){return(a.reg32s[5]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[169]=function(a){return(a.reg32s[5]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[170]=function(a){return(a.reg32s[5]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[171]=function(a){return(a.reg32s[5]<<2)+
JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[172]=function(a){return(a.reg32s[5]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[173]=function(a,b){return(a.reg32s[5]<<2)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[174]=function(a){return(a.reg32s[5]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
a.reg32s[6]|0};v86.prototype.sib_table[175]=function(a){return(a.reg32s[5]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[232]=function(a){return(a.reg32s[5]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[233]=function(a){return(a.reg32s[5]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[234]=function(a){return(a.reg32s[5]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|
0};v86.prototype.sib_table[235]=function(a){return(a.reg32s[5]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[236]=function(a){return(a.reg32s[5]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[237]=function(a,b){return(a.reg32s[5]<<3)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[238]=function(a){return(a.reg32s[5]<<
3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[239]=function(a){return(a.reg32s[5]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[48]=function(a){return a.reg32s[6]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[49]=function(a){return a.reg32s[6]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[50]=function(a){return a.reg32s[6]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
a.reg32s[2]|0};v86.prototype.sib_table[51]=function(a){return a.reg32s[6]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[52]=function(a){return a.reg32s[6]+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[53]=function(a,b){return a.reg32s[6]+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[54]=function(a){return a.reg32s[6]+
JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[55]=function(a){return a.reg32s[6]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[112]=function(a){return(a.reg32s[6]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[113]=function(a){return(a.reg32s[6]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[114]=function(a){return(a.reg32s[6]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
a.reg32s[2]|0};v86.prototype.sib_table[115]=function(a){return(a.reg32s[6]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[116]=function(a){return(a.reg32s[6]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[117]=function(a,b){return(a.reg32s[6]<<1)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[118]=
function(a){return(a.reg32s[6]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[119]=function(a){return(a.reg32s[6]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[176]=function(a){return(a.reg32s[6]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[177]=function(a){return(a.reg32s[6]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[178]=function(a){return(a.reg32s[6]<<
2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[179]=function(a){return(a.reg32s[6]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[180]=function(a){return(a.reg32s[6]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[181]=function(a,b){return(a.reg32s[6]<<2)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|
0};v86.prototype.sib_table[182]=function(a){return(a.reg32s[6]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[183]=function(a){return(a.reg32s[6]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[240]=function(a){return(a.reg32s[6]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[241]=function(a){return(a.reg32s[6]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};
v86.prototype.sib_table[242]=function(a){return(a.reg32s[6]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[243]=function(a){return(a.reg32s[6]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[244]=function(a){return(a.reg32s[6]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[245]=function(a,b){return(a.reg32s[6]<<3)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:
JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[246]=function(a){return(a.reg32s[6]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[247]=function(a){return(a.reg32s[6]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[56]=function(a){return a.reg32s[7]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[57]=function(a){return a.reg32s[7]+
JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[58]=function(a){return a.reg32s[7]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[59]=function(a){return a.reg32s[7]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[60]=function(a){return a.reg32s[7]+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[61]=function(a,b){return a.reg32s[7]+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+
a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[62]=function(a){return a.reg32s[7]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[63]=function(a){return a.reg32s[7]+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[120]=function(a){return(a.reg32s[7]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[121]=function(a){return(a.reg32s[7]<<
1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[122]=function(a){return(a.reg32s[7]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[123]=function(a){return(a.reg32s[7]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[124]=function(a){return(a.reg32s[7]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[125]=function(a,b){return(a.reg32s[7]<<
1)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[126]=function(a){return(a.reg32s[7]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[127]=function(a){return(a.reg32s[7]<<1)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[184]=function(a){return(a.reg32s[7]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
a.reg32s[0]|0};v86.prototype.sib_table[185]=function(a){return(a.reg32s[7]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[186]=function(a){return(a.reg32s[7]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[187]=function(a){return(a.reg32s[7]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[188]=function(a){return(a.reg32s[7]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|
0};v86.prototype.sib_table[189]=function(a,b){return(a.reg32s[7]<<2)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[190]=function(a){return(a.reg32s[7]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[191]=function(a){return(a.reg32s[7]<<2)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[7]|0};v86.prototype.sib_table[248]=function(a){return(a.reg32s[7]<<
3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[0]|0};v86.prototype.sib_table[249]=function(a){return(a.reg32s[7]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[1]|0};v86.prototype.sib_table[250]=function(a){return(a.reg32s[7]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[2]|0};v86.prototype.sib_table[251]=function(a){return(a.reg32s[7]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[3]|0};v86.prototype.sib_table[252]=function(a){return(a.reg32s[7]<<3)+
JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[4]|0};v86.prototype.sib_table[253]=function(a,b){return(a.reg32s[7]<<3)+(b?JSCompiler_StaticMethods_get_seg_prefix_ss(a)+a.reg32s[5]:JSCompiler_StaticMethods_get_seg_prefix_ds(a)+JSCompiler_StaticMethods_read_imm32s(a))|0};v86.prototype.sib_table[254]=function(a){return(a.reg32s[7]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+a.reg32s[6]|0};v86.prototype.sib_table[255]=function(a){return(a.reg32s[7]<<3)+JSCompiler_StaticMethods_get_seg_prefix_ds(a)+
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,b,c){this.last_op1=a;this.last_op2=b;this.last_add_result=this.last_result=a+b|0;this.last_op_size=c;this.flags_changed=2261;return this.last_result};
function JSCompiler_StaticMethods_adc(a,b,c,d){var e=a.getcf();a.last_op1=b;a.last_op2=c;a.last_add_result=a.last_result=(b+c|0)+e|0;a.last_op_size=d;a.flags_changed=2261;return a.last_result}v86.prototype.sub=function(a,b,c){this.last_add_result=a;this.last_op2=b;this.last_op1=this.last_result=a-b|0;this.last_op_size=c;this.flags_changed=2261;return this.last_result};
function JSCompiler_StaticMethods_sbb(a,b,c,d){var e=a.getcf();a.last_add_result=b;a.last_op2=c;a.last_op1=a.last_result=b-c-e|0;a.last_op_size=d;a.flags_changed=2261;return a.last_result}function JSCompiler_StaticMethods_inc(a,b,c){a.flags=a.flags&-2|a.getcf();a.last_op1=b;a.last_op2=1;a.last_add_result=a.last_result=b+1|0;a.last_op_size=c;a.flags_changed=2260;return a.last_result}
function JSCompiler_StaticMethods_dec(a,b,c){a.flags=a.flags&-2|a.getcf();a.last_add_result=b;a.last_op2=1;a.last_op1=a.last_result=b-1|0;a.last_op_size=c;a.flags_changed=2260;return a.last_result}function JSCompiler_StaticMethods_neg(a,b,c){a.last_op1=a.last_result=-b|0;a.flags_changed=2261;a.last_add_result=0;a.last_op2=b;a.last_op_size=c;return a.last_result}
function JSCompiler_StaticMethods_imul_reg16(a,b,c){b=b*c;a.flags=32767<b||-32768>b?a.flags|2049:a.flags&-2050;a.flags_changed=0;return b}function JSCompiler_StaticMethods_imul_reg32(a,b,c){var d=!1;0>b&&(d=!0,b=-b|0);0>c&&(d=!d,c=-c|0);var e=b&65535;b=b>>>16;var f=c&65535;c=c>>>16;var g=e*f,f=(g>>>16)+(b*f|0)|0,k=f>>>16,f=(f&65535)+(e*c|0)|0,g=f<<16|g&65535,k=((f>>>16)+(b*c|0)|0)+k|0;d&&(g=-g|0,k=~k+!g|0);a.flags=k===g>>31?a.flags&-2050:a.flags|2049;a.flags_changed=0;return g}
function JSCompiler_StaticMethods_and(a,b,c,d){a.last_result=b&c;a.last_op_size=d;a.flags&=-2066;a.flags_changed=196;return a.last_result}function JSCompiler_StaticMethods_or(a,b,c,d){a.last_result=b|c;a.last_op_size=d;a.flags&=-2066;a.flags_changed=196;return a.last_result}function JSCompiler_StaticMethods_xor(a,b,c,d){a.last_result=b^c;a.last_op_size=d;a.flags&=-2066;a.flags_changed=196;return a.last_result}
function JSCompiler_StaticMethods_rol8(a,b,c){if(!c)return b;c&=7;b=b<<c|b>>8-c;a.flags_changed&=-2050;a.flags=a.flags&-2050|b&1|(b<<11^b<<4)&2048;return b}function JSCompiler_StaticMethods_rol16(a,b,c){if(!c)return b;c&=15;b=b<<c|b>>16-c;a.flags_changed&=-2050;a.flags=a.flags&-2050|b&1|(b<<11^b>>4)&2048;return b}function JSCompiler_StaticMethods_rol32(a,b,c){if(!c)return b;b=b<<c|b>>>32-c;a.flags_changed&=-2050;a.flags=a.flags&-2050|b&1|(b<<11^b>>20)&2048;return b}
function JSCompiler_StaticMethods_rcl8(a,b,c){c%=9;if(!c)return b;b=b<<c|a.getcf()<<c-1|b>>9-c;a.flags_changed&=-2050;a.flags=a.flags&-2050|b>>8&1|(b<<3^b<<4)&2048;return b}function JSCompiler_StaticMethods_rcl16(a,b,c){c%=17;if(!c)return b;b=b<<c|a.getcf()<<c-1|b>>17-c;a.flags_changed&=-2050;a.flags=a.flags&-2050|b>>16&1|(b>>5^b>>4)&2048;return b}
function JSCompiler_StaticMethods_rcl32(a,b,c){if(!c)return b;var d=b<<c|a.getcf()<<c-1;1<c&&(d|=b>>>33-c);a.flags_changed&=-2050;a.flags=a.flags&-2050|b>>>32-c&1;a.flags|=(a.flags<<11^d>>20)&2048;return d}function JSCompiler_StaticMethods_ror8(a,b,c){c&=7;if(!c)return b;b=b>>c|b<<8-c;a.flags_changed&=-2050;a.flags=a.flags&-2050|b>>7&1|(b<<4^b<<5)&2048;return b}
function JSCompiler_StaticMethods_ror16(a,b,c){c&=15;if(!c)return b;b=b>>c|b<<16-c;a.flags_changed&=-2050;a.flags=a.flags&-2050|b>>15&1|(b>>4^b>>3)&2048;return b}function JSCompiler_StaticMethods_ror32(a,b,c){if(!c)return b;b=b>>>c|b<<32-c;a.flags_changed&=-2050;a.flags=a.flags&-2050|b>>31&1|(b>>20^b>>19)&2048;return b}function JSCompiler_StaticMethods_rcr8(a,b,c){c%=9;if(!c)return b;b=b>>c|a.getcf()<<8-c|b<<9-c;a.flags_changed&=-2050;a.flags=a.flags&-2050|b>>8&1|(b<<4^b<<5)&2048;return b}
function JSCompiler_StaticMethods_rcr16(a,b,c){c%=17;if(!c)return b;b=b>>c|a.getcf()<<16-c|b<<17-c;a.flags_changed&=-2050;a.flags=a.flags&-2050|b>>16&1|(b>>4^b>>3)&2048;return b}function JSCompiler_StaticMethods_rcr32(a,b,c){if(!c)return b;var d=b>>>c|a.getcf()<<32-c;1<c&&(d|=b<<33-c);a.flags_changed&=-2050;a.flags=a.flags&-2050|b>>c-1&1|(d>>20^d>>19)&2048;return d}
function JSCompiler_StaticMethods_shl8(a,b,c){if(0===c)return b;a.last_result=b<<c;a.last_op_size=7;a.flags_changed=212;a.flags=a.flags&-2050|a.last_result>>8&1|(a.last_result<<3^a.last_result<<4)&2048;return a.last_result}function JSCompiler_StaticMethods_shl16(a,b,c){if(0===c)return b;a.last_result=b<<c;a.last_op_size=15;a.flags_changed=212;a.flags=a.flags&-2050|a.last_result>>16&1|(a.last_result>>5^a.last_result>>4)&2048;return a.last_result}
function JSCompiler_StaticMethods_shl32(a,b,c){if(0===c)return b;a.last_result=b<<c;a.last_op_size=31;a.flags_changed=212;a.flags=a.flags&-2050|b>>>32-c&1;a.flags|=(a.flags&1^a.last_result>>31&1)<<11&2048;return a.last_result}function JSCompiler_StaticMethods_shr8(a,b,c){if(0===c)return b;a.last_result=b>>c;a.last_op_size=7;a.flags_changed=212;a.flags=a.flags&-2050|b>>c-1&1|(b>>7&1)<<11&2048;return a.last_result}
function JSCompiler_StaticMethods_shr16(a,b,c){if(0===c)return b;a.last_result=b>>c;a.last_op_size=15;a.flags_changed=212;a.flags=a.flags&-2050|b>>c-1&1|b>>4&2048;return a.last_result}function JSCompiler_StaticMethods_shr32(a,b,c){if(0===c)return b;a.last_result=b>>>c;a.last_op_size=31;a.flags_changed=212;a.flags=a.flags&-2050|b>>>c-1&1|b>>20&2048;return a.last_result}
function JSCompiler_StaticMethods_sar8(a,b,c){if(0===c)return b;a.last_result=b>>c;a.last_op_size=7;a.flags_changed=212;a.flags=a.flags&-2050|b>>c-1&1;return a.last_result}function JSCompiler_StaticMethods_sar16(a,b,c){if(0===c)return b;a.last_result=b>>c;a.last_op_size=15;a.flags_changed=212;a.flags=a.flags&-2050|b>>c-1&1;return a.last_result}
function JSCompiler_StaticMethods_sar32(a,b,c){if(0===c)return b;a.last_result=b>>c;a.last_op_size=31;a.flags_changed=212;a.flags=a.flags&-2050|b>>>c-1&1;return a.last_result}function JSCompiler_StaticMethods_shrd16(a,b,c,d){if(0===d)return b;16>=d?(a.last_result=b>>d|c<<16-d,a.flags=a.flags&-2|b>>d-1&1):(a.last_result=b<<32-d|c>>d-16,a.flags=a.flags&-2|c>>d-17&1);a.last_op_size=15;a.flags_changed=212;a.flags=a.flags&-2049|(a.last_result^b)>>4&2048;return a.last_result}
function JSCompiler_StaticMethods_shrd32(a,b,c,d){if(0===d)return b;a.last_result=b>>>d|c<<32-d;a.last_op_size=31;a.flags_changed=212;a.flags=a.flags&-2|b>>>d-1&1;a.flags=a.flags&-2049|(a.last_result^b)>>20&2048;return a.last_result}
function JSCompiler_StaticMethods_shld16(a,b,c,d){if(0===d)return b;16>=d?(a.last_result=b<<d|c>>>16-d,a.flags=a.flags&-2|b>>>16-d&1):(a.last_result=b>>32-d|c<<d-16,a.flags=a.flags&-2|c>>>32-d&1);a.last_op_size=15;a.flags_changed=212;a.flags=a.flags&-2049|(a.flags&1^a.last_result>>15&1)<<11;return a.last_result}
function JSCompiler_StaticMethods_shld32(a,b,c,d){if(0===d)return b;a.last_result=b<<d|c>>>32-d;a.last_op_size=31;a.flags_changed=212;a.flags=a.flags&-2|b>>>32-d&1;a.flags=a.flags&-2049|(a.flags&1^a.last_result>>31&1)<<11;return a.last_result}function JSCompiler_StaticMethods_bt_reg(a,b,c){a.flags=a.flags&-2|b>>c&1;a.flags_changed&=-2}function JSCompiler_StaticMethods_btc_reg(a,b,c){a.flags=a.flags&-2|b>>c&1;a.flags_changed&=-2;return b^1<<c}
function JSCompiler_StaticMethods_bts_reg(a,b,c){a.flags=a.flags&-2|b>>c&1;a.flags_changed&=-2;return b|1<<c}function JSCompiler_StaticMethods_btr_reg(a,b,c){a.flags=a.flags&-2|b>>c&1;a.flags_changed&=-2;return b&~(1<<c)}function JSCompiler_StaticMethods_bt_mem(a,b,c){b=JSCompiler_StaticMethods_safe_read8(a,b+(c>>3));a.flags=a.flags&-2|b>>(c&7)&1;a.flags_changed&=-2}
function JSCompiler_StaticMethods_btc_mem(a,b,c){b=JSCompiler_StaticMethods_translate_address_write(a,b+(c>>3));var d=JSCompiler_StaticMethods_read8(a.memory,b);c&=7;a.flags=a.flags&-2|d>>c&1;a.flags_changed&=-2;JSCompiler_StaticMethods_write8(a.memory,b,d^1<<c)}
function JSCompiler_StaticMethods_btr_mem(a,b,c){b=JSCompiler_StaticMethods_translate_address_write(a,b+(c>>3));var d=JSCompiler_StaticMethods_read8(a.memory,b);c&=7;a.flags=a.flags&-2|d>>c&1;a.flags_changed&=-2;JSCompiler_StaticMethods_write8(a.memory,b,d&~(1<<c))}
function JSCompiler_StaticMethods_bts_mem(a,b,c){b=JSCompiler_StaticMethods_translate_address_write(a,b+(c>>3));var d=JSCompiler_StaticMethods_read8(a.memory,b);c&=7;a.flags=a.flags&-2|d>>c&1;a.flags_changed&=-2;JSCompiler_StaticMethods_write8(a.memory,b,d|1<<c)}function JSCompiler_StaticMethods_popcnt(a,b){a.flags_changed=0;a.flags&=-2262;if(b)return b=b-(b>>1&1431655765),b=(b&858993459)+(b>>2&858993459),16843009*(b+(b>>4)&252645135)>>24;a.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 b=JSCompiler_StaticMethods_read_imm8(a),c,d;192>b?(d=JSCompiler_StaticMethods_translate_address_write(a,a.modrm_resolve(b)),c=JSCompiler_StaticMethods_read8(a.memory,d)):c=a.reg8[b<<2&12|b>>2&1];c=a.add(c,a.reg8[b>>1&12|b>>5&1],7);192>b?JSCompiler_StaticMethods_write8(a.memory,d,c):a.reg8[b<<2&12|b>>2&1]=c};
table16[1]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,d,e)):c=JSCompiler_StaticMethods_read16(a.memory,d)):c=a.reg16[b<<1&14];c=a.add(c,a.reg16[b>>2&14],15);192>b?e?JSCompiler_StaticMethods_virt_boundary_write16(a,d,e,c):JSCompiler_StaticMethods_write16(a.memory,
d,c):a.reg16[b<<1&14]=c};
table32[1]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,d,e)):c=JSCompiler_StaticMethods_read32s(a.memory,d)):c=a.reg32s[b&7];c=a.add(c,a.reg32s[b>>3&7],31);192>b?e?JSCompiler_StaticMethods_virt_boundary_write32(a,d,e,c):JSCompiler_StaticMethods_write32(a.memory,d,
c):a.reg32s[b&7]=c};table16[2]=table32[2]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b)):a.reg8[b<<2&12|b>>2&1];a.reg8[b>>1&12|b>>5&1]=a.add(a.reg8[b>>1&12|b>>5&1],c,7)};table16[3]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.reg16[b>>2&14]=a.add(a.reg16[b>>2&14],c,15)};
table32[3]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.reg32s[b>>3&7]=a.add(a.reg32s[b>>3&7],c,31)};table16[4]=table32[4]=function(a){a.reg8[0]=a.add(a.reg8[0],JSCompiler_StaticMethods_read_imm8(a),7)};table16[5]=function(a){a.reg16[0]=a.add(a.reg16[0],JSCompiler_StaticMethods_read_imm16(a),15)};table32[5]=function(a){a.reg32s[0]=a.add(a.reg32s[0],JSCompiler_StaticMethods_read_imm32s(a),31)};
table16[6]=function(a){JSCompiler_StaticMethods_push16(a,a.sreg[0])};table32[6]=function(a){JSCompiler_StaticMethods_push32(a,a.sreg[0])};table16[7]=function(a){JSCompiler_StaticMethods_switch_seg(a,0,JSCompiler_StaticMethods_safe_read16(a,JSCompiler_StaticMethods_get_stack_pointer(a,0)));a.stack_reg[a.reg_vsp]+=2};table32[7]=function(a){JSCompiler_StaticMethods_switch_seg(a,0,JSCompiler_StaticMethods_safe_read16(a,JSCompiler_StaticMethods_get_stack_pointer(a,0)));a.stack_reg[a.reg_vsp]+=4};
table16[8]=table32[8]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d;192>b?(d=JSCompiler_StaticMethods_translate_address_write(a,a.modrm_resolve(b)),c=JSCompiler_StaticMethods_read8(a.memory,d)):c=a.reg8[b<<2&12|b>>2&1];c=JSCompiler_StaticMethods_or(a,c,a.reg8[b>>1&12|b>>5&1],7);192>b?JSCompiler_StaticMethods_write8(a.memory,d,c):a.reg8[b<<2&12|b>>2&1]=c};
table16[9]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,d,e)):c=JSCompiler_StaticMethods_read16(a.memory,d)):c=a.reg16[b<<1&14];c=JSCompiler_StaticMethods_or(a,c,a.reg16[b>>2&14],15);192>b?e?JSCompiler_StaticMethods_virt_boundary_write16(a,d,e,c):JSCompiler_StaticMethods_write16(a.memory,
d,c):a.reg16[b<<1&14]=c};
table32[9]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,d,e)):c=JSCompiler_StaticMethods_read32s(a.memory,d)):c=a.reg32s[b&7];c=JSCompiler_StaticMethods_or(a,c,a.reg32s[b>>3&7],31);192>b?e?JSCompiler_StaticMethods_virt_boundary_write32(a,d,e,c):JSCompiler_StaticMethods_write32(a.memory,
d,c):a.reg32s[b&7]=c};table16[10]=table32[10]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b)):a.reg8[b<<2&12|b>>2&1];a.reg8[b>>1&12|b>>5&1]=JSCompiler_StaticMethods_or(a,a.reg8[b>>1&12|b>>5&1],c,7)};table16[11]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.reg16[b>>2&14]=JSCompiler_StaticMethods_or(a,a.reg16[b>>2&14],c,15)};
table32[11]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.reg32s[b>>3&7]=JSCompiler_StaticMethods_or(a,a.reg32s[b>>3&7],c,31)};table16[12]=table32[12]=function(a){a.reg8[0]=JSCompiler_StaticMethods_or(a,a.reg8[0],JSCompiler_StaticMethods_read_imm8(a),7)};table16[13]=function(a){a.reg16[0]=JSCompiler_StaticMethods_or(a,a.reg16[0],JSCompiler_StaticMethods_read_imm16(a),15)};
table32[13]=function(a){a.reg32s[0]=JSCompiler_StaticMethods_or(a,a.reg32s[0],JSCompiler_StaticMethods_read_imm32s(a),31)};table16[14]=function(a){JSCompiler_StaticMethods_push16(a,a.sreg[1])};table32[14]=function(a){JSCompiler_StaticMethods_push32(a,a.sreg[1])};table16[15]=table32[15]=function(a){a.table0F[JSCompiler_StaticMethods_read_imm8(a)](a)};
table16[16]=table32[16]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d;192>b?(d=JSCompiler_StaticMethods_translate_address_write(a,a.modrm_resolve(b)),c=JSCompiler_StaticMethods_read8(a.memory,d)):c=a.reg8[b<<2&12|b>>2&1];c=JSCompiler_StaticMethods_adc(a,c,a.reg8[b>>1&12|b>>5&1],7);192>b?JSCompiler_StaticMethods_write8(a.memory,d,c):a.reg8[b<<2&12|b>>2&1]=c};
table16[17]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,d,e)):c=JSCompiler_StaticMethods_read16(a.memory,d)):c=a.reg16[b<<1&14];c=JSCompiler_StaticMethods_adc(a,c,a.reg16[b>>2&14],15);192>b?e?JSCompiler_StaticMethods_virt_boundary_write16(a,d,e,c):JSCompiler_StaticMethods_write16(a.memory,
d,c):a.reg16[b<<1&14]=c};
table32[17]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,d,e)):c=JSCompiler_StaticMethods_read32s(a.memory,d)):c=a.reg32s[b&7];c=JSCompiler_StaticMethods_adc(a,c,a.reg32s[b>>3&7],31);192>b?e?JSCompiler_StaticMethods_virt_boundary_write32(a,d,e,c):JSCompiler_StaticMethods_write32(a.memory,
d,c):a.reg32s[b&7]=c};table16[18]=table32[18]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b)):a.reg8[b<<2&12|b>>2&1];a.reg8[b>>1&12|b>>5&1]=JSCompiler_StaticMethods_adc(a,a.reg8[b>>1&12|b>>5&1],c,7)};table16[19]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.reg16[b>>2&14]=JSCompiler_StaticMethods_adc(a,a.reg16[b>>2&14],c,15)};
table32[19]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.reg32s[b>>3&7]=JSCompiler_StaticMethods_adc(a,a.reg32s[b>>3&7],c,31)};table16[20]=table32[20]=function(a){a.reg8[0]=JSCompiler_StaticMethods_adc(a,a.reg8[0],JSCompiler_StaticMethods_read_imm8(a),7)};table16[21]=function(a){a.reg16[0]=JSCompiler_StaticMethods_adc(a,a.reg16[0],JSCompiler_StaticMethods_read_imm16(a),15)};
table32[21]=function(a){a.reg32s[0]=JSCompiler_StaticMethods_adc(a,a.reg32s[0],JSCompiler_StaticMethods_read_imm32s(a),31)};table16[22]=function(a){JSCompiler_StaticMethods_push16(a,a.sreg[2])};table32[22]=function(a){JSCompiler_StaticMethods_push32(a,a.sreg[2])};table16[23]=function(a){JSCompiler_StaticMethods_switch_seg(a,2,JSCompiler_StaticMethods_safe_read16(a,JSCompiler_StaticMethods_get_stack_pointer(a,0)));a.stack_reg[a.reg_vsp]+=2};
table32[23]=function(a){JSCompiler_StaticMethods_switch_seg(a,2,JSCompiler_StaticMethods_safe_read16(a,JSCompiler_StaticMethods_get_stack_pointer(a,0)));a.stack_reg[a.reg_vsp]+=4};
table16[24]=table32[24]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d;192>b?(d=JSCompiler_StaticMethods_translate_address_write(a,a.modrm_resolve(b)),c=JSCompiler_StaticMethods_read8(a.memory,d)):c=a.reg8[b<<2&12|b>>2&1];c=JSCompiler_StaticMethods_sbb(a,c,a.reg8[b>>1&12|b>>5&1],7);192>b?JSCompiler_StaticMethods_write8(a.memory,d,c):a.reg8[b<<2&12|b>>2&1]=c};
table16[25]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,d,e)):c=JSCompiler_StaticMethods_read16(a.memory,d)):c=a.reg16[b<<1&14];c=JSCompiler_StaticMethods_sbb(a,c,a.reg16[b>>2&14],15);192>b?e?JSCompiler_StaticMethods_virt_boundary_write16(a,d,e,c):JSCompiler_StaticMethods_write16(a.memory,
d,c):a.reg16[b<<1&14]=c};
table32[25]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,d,e)):c=JSCompiler_StaticMethods_read32s(a.memory,d)):c=a.reg32s[b&7];c=JSCompiler_StaticMethods_sbb(a,c,a.reg32s[b>>3&7],31);192>b?e?JSCompiler_StaticMethods_virt_boundary_write32(a,d,e,c):JSCompiler_StaticMethods_write32(a.memory,
d,c):a.reg32s[b&7]=c};table16[26]=table32[26]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b)):a.reg8[b<<2&12|b>>2&1];a.reg8[b>>1&12|b>>5&1]=JSCompiler_StaticMethods_sbb(a,a.reg8[b>>1&12|b>>5&1],c,7)};table16[27]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.reg16[b>>2&14]=JSCompiler_StaticMethods_sbb(a,a.reg16[b>>2&14],c,15)};
table32[27]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.reg32s[b>>3&7]=JSCompiler_StaticMethods_sbb(a,a.reg32s[b>>3&7],c,31)};table16[28]=table32[28]=function(a){a.reg8[0]=JSCompiler_StaticMethods_sbb(a,a.reg8[0],JSCompiler_StaticMethods_read_imm8(a),7)};table16[29]=function(a){a.reg16[0]=JSCompiler_StaticMethods_sbb(a,a.reg16[0],JSCompiler_StaticMethods_read_imm16(a),15)};
table32[29]=function(a){a.reg32s[0]=JSCompiler_StaticMethods_sbb(a,a.reg32s[0],JSCompiler_StaticMethods_read_imm32s(a),31)};table16[30]=function(a){JSCompiler_StaticMethods_push16(a,a.sreg[3])};table32[30]=function(a){JSCompiler_StaticMethods_push32(a,a.sreg[3])};table16[31]=function(a){JSCompiler_StaticMethods_switch_seg(a,3,JSCompiler_StaticMethods_safe_read16(a,JSCompiler_StaticMethods_get_stack_pointer(a,0)));a.stack_reg[a.reg_vsp]+=2};
table32[31]=function(a){JSCompiler_StaticMethods_switch_seg(a,3,JSCompiler_StaticMethods_safe_read16(a,JSCompiler_StaticMethods_get_stack_pointer(a,0)));a.stack_reg[a.reg_vsp]+=4};
table16[32]=table32[32]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d;192>b?(d=JSCompiler_StaticMethods_translate_address_write(a,a.modrm_resolve(b)),c=JSCompiler_StaticMethods_read8(a.memory,d)):c=a.reg8[b<<2&12|b>>2&1];c=JSCompiler_StaticMethods_and(a,c,a.reg8[b>>1&12|b>>5&1],7);192>b?JSCompiler_StaticMethods_write8(a.memory,d,c):a.reg8[b<<2&12|b>>2&1]=c};
table16[33]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,d,e)):c=JSCompiler_StaticMethods_read16(a.memory,d)):c=a.reg16[b<<1&14];c=JSCompiler_StaticMethods_and(a,c,a.reg16[b>>2&14],15);192>b?e?JSCompiler_StaticMethods_virt_boundary_write16(a,d,e,c):JSCompiler_StaticMethods_write16(a.memory,
d,c):a.reg16[b<<1&14]=c};
table32[33]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,d,e)):c=JSCompiler_StaticMethods_read32s(a.memory,d)):c=a.reg32s[b&7];c=JSCompiler_StaticMethods_and(a,c,a.reg32s[b>>3&7],31);192>b?e?JSCompiler_StaticMethods_virt_boundary_write32(a,d,e,c):JSCompiler_StaticMethods_write32(a.memory,
d,c):a.reg32s[b&7]=c};table16[34]=table32[34]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b)):a.reg8[b<<2&12|b>>2&1];a.reg8[b>>1&12|b>>5&1]=JSCompiler_StaticMethods_and(a,a.reg8[b>>1&12|b>>5&1],c,7)};table16[35]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.reg16[b>>2&14]=JSCompiler_StaticMethods_and(a,a.reg16[b>>2&14],c,15)};
table32[35]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.reg32s[b>>3&7]=JSCompiler_StaticMethods_and(a,a.reg32s[b>>3&7],c,31)};table16[36]=table32[36]=function(a){a.reg8[0]=JSCompiler_StaticMethods_and(a,a.reg8[0],JSCompiler_StaticMethods_read_imm8(a),7)};table16[37]=function(a){a.reg16[0]=JSCompiler_StaticMethods_and(a,a.reg16[0],JSCompiler_StaticMethods_read_imm16(a),15)};
table32[37]=function(a){a.reg32s[0]=JSCompiler_StaticMethods_and(a,a.reg32s[0],JSCompiler_StaticMethods_read_imm32s(a),31)};table16[38]=table32[38]=function(a){JSCompiler_StaticMethods_seg_prefix(a,0)};table16[39]=table32[39]=function(a){var b=a.reg8[0],c=a.getcf(),d=JSCompiler_StaticMethods_getaf(a);a.flags&=-18;if(9<(b&15)||d)a.reg8[0]+=6,a.flags|=16;if(153<b||c)a.reg8[0]+=96,a.flags|=1;a.last_result=a.reg8[0];a.last_op_size=7;a.last_op1=a.last_op2=0;a.flags_changed=196};
table16[40]=table32[40]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d;192>b?(d=JSCompiler_StaticMethods_translate_address_write(a,a.modrm_resolve(b)),c=JSCompiler_StaticMethods_read8(a.memory,d)):c=a.reg8[b<<2&12|b>>2&1];c=a.sub(c,a.reg8[b>>1&12|b>>5&1],7);192>b?JSCompiler_StaticMethods_write8(a.memory,d,c):a.reg8[b<<2&12|b>>2&1]=c};
table16[41]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,d,e)):c=JSCompiler_StaticMethods_read16(a.memory,d)):c=a.reg16[b<<1&14];c=a.sub(c,a.reg16[b>>2&14],15);192>b?e?JSCompiler_StaticMethods_virt_boundary_write16(a,d,e,c):JSCompiler_StaticMethods_write16(a.memory,
d,c):a.reg16[b<<1&14]=c};
table32[41]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,d,e)):c=JSCompiler_StaticMethods_read32s(a.memory,d)):c=a.reg32s[b&7];c=a.sub(c,a.reg32s[b>>3&7],31);192>b?e?JSCompiler_StaticMethods_virt_boundary_write32(a,d,e,c):JSCompiler_StaticMethods_write32(a.memory,d,
c):a.reg32s[b&7]=c};table16[42]=table32[42]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b)):a.reg8[b<<2&12|b>>2&1];a.reg8[b>>1&12|b>>5&1]=a.sub(a.reg8[b>>1&12|b>>5&1],c,7)};table16[43]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.reg16[b>>2&14]=a.sub(a.reg16[b>>2&14],c,15)};
table32[43]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.reg32s[b>>3&7]=a.sub(a.reg32s[b>>3&7],c,31)};table16[44]=table32[44]=function(a){a.reg8[0]=a.sub(a.reg8[0],JSCompiler_StaticMethods_read_imm8(a),7)};table16[45]=function(a){a.reg16[0]=a.sub(a.reg16[0],JSCompiler_StaticMethods_read_imm16(a),15)};table32[45]=function(a){a.reg32s[0]=a.sub(a.reg32s[0],JSCompiler_StaticMethods_read_imm32s(a),31)};
table16[46]=table32[46]=function(a){JSCompiler_StaticMethods_seg_prefix(a,1)};table16[47]=table32[47]=function(a){var b=a.reg8[0],c=a.getcf();a.flags&=-2;9<(b&15)||JSCompiler_StaticMethods_getaf(a)?(a.reg8[0]-=6,a.flags|=16,a.flags=a.flags&-2|c|a.reg8[0]>>7):a.flags&=-17;if(153<b||c)a.reg8[0]-=96,a.flags|=1;a.last_result=a.reg8[0];a.last_op_size=7;a.last_op1=a.last_op2=0;a.flags_changed=196};
table16[48]=table32[48]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d;192>b?(d=JSCompiler_StaticMethods_translate_address_write(a,a.modrm_resolve(b)),c=JSCompiler_StaticMethods_read8(a.memory,d)):c=a.reg8[b<<2&12|b>>2&1];c=JSCompiler_StaticMethods_xor(a,c,a.reg8[b>>1&12|b>>5&1],7);192>b?JSCompiler_StaticMethods_write8(a.memory,d,c):a.reg8[b<<2&12|b>>2&1]=c};
table16[49]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,d,e)):c=JSCompiler_StaticMethods_read16(a.memory,d)):c=a.reg16[b<<1&14];c=JSCompiler_StaticMethods_xor(a,c,a.reg16[b>>2&14],15);192>b?e?JSCompiler_StaticMethods_virt_boundary_write16(a,d,e,c):JSCompiler_StaticMethods_write16(a.memory,
d,c):a.reg16[b<<1&14]=c};
table32[49]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,d,e)):c=JSCompiler_StaticMethods_read32s(a.memory,d)):c=a.reg32s[b&7];c=JSCompiler_StaticMethods_xor(a,c,a.reg32s[b>>3&7],31);192>b?e?JSCompiler_StaticMethods_virt_boundary_write32(a,d,e,c):JSCompiler_StaticMethods_write32(a.memory,
d,c):a.reg32s[b&7]=c};table16[50]=table32[50]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b)):a.reg8[b<<2&12|b>>2&1];a.reg8[b>>1&12|b>>5&1]=JSCompiler_StaticMethods_xor(a,a.reg8[b>>1&12|b>>5&1],c,7)};table16[51]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.reg16[b>>2&14]=JSCompiler_StaticMethods_xor(a,a.reg16[b>>2&14],c,15)};
table32[51]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.reg32s[b>>3&7]=JSCompiler_StaticMethods_xor(a,a.reg32s[b>>3&7],c,31)};table16[52]=table32[52]=function(a){a.reg8[0]=JSCompiler_StaticMethods_xor(a,a.reg8[0],JSCompiler_StaticMethods_read_imm8(a),7)};table16[53]=function(a){a.reg16[0]=JSCompiler_StaticMethods_xor(a,a.reg16[0],JSCompiler_StaticMethods_read_imm16(a),15)};
table32[53]=function(a){a.reg32s[0]=JSCompiler_StaticMethods_xor(a,a.reg32s[0],JSCompiler_StaticMethods_read_imm32s(a),31)};table16[54]=table32[54]=function(a){JSCompiler_StaticMethods_seg_prefix(a,2)};table16[55]=table32[55]=function(a){9<(a.reg8[0]&15)||JSCompiler_StaticMethods_getaf(a)?(a.reg16[0]+=6,a.reg8[1]+=1,a.flags|=17):a.flags&=-18;a.reg8[0]&=15;a.flags_changed&=-18};
table16[56]=table32[56]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b)):a.reg8[b<<2&12|b>>2&1];a.sub(c,a.reg8[b>>1&12|b>>5&1],7)};table16[57]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.sub(c,a.reg16[b>>2&14],15)};
table32[57]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.sub(c,a.reg32s[b>>3&7],31)};table16[58]=table32[58]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b)):a.reg8[b<<2&12|b>>2&1];a.sub(a.reg8[b>>1&12|b>>5&1],c,7)};
table16[59]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.sub(a.reg16[b>>2&14],c,15)};table32[59]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.sub(a.reg32s[b>>3&7],c,31)};table16[60]=table32[60]=function(a){a.sub(a.reg8[0],JSCompiler_StaticMethods_read_imm8(a),7)};
table16[61]=function(a){a.sub(a.reg16[0],JSCompiler_StaticMethods_read_imm16(a),15)};table32[61]=function(a){a.sub(a.reg32s[0],JSCompiler_StaticMethods_read_imm32s(a),31)};table16[62]=table32[62]=function(a){JSCompiler_StaticMethods_seg_prefix(a,3)};table16[63]=table32[63]=function(a){9<(a.reg8[0]&15)||JSCompiler_StaticMethods_getaf(a)?(a.reg16[0]-=6,--a.reg8[1],a.flags|=17):a.flags&=-18;a.reg8[0]&=15;a.flags_changed&=-18};
table16[64]=function(a){a.reg16[0]=JSCompiler_StaticMethods_inc(a,a.reg16[0],15)};table32[64]=function(a){a.reg32s[0]=JSCompiler_StaticMethods_inc(a,a.reg32s[0],31)};table16[65]=function(a){a.reg16[2]=JSCompiler_StaticMethods_inc(a,a.reg16[2],15)};table32[65]=function(a){a.reg32s[1]=JSCompiler_StaticMethods_inc(a,a.reg32s[1],31)};table16[66]=function(a){a.reg16[4]=JSCompiler_StaticMethods_inc(a,a.reg16[4],15)};table32[66]=function(a){a.reg32s[2]=JSCompiler_StaticMethods_inc(a,a.reg32s[2],31)};
table16[67]=function(a){a.reg16[6]=JSCompiler_StaticMethods_inc(a,a.reg16[6],15)};table32[67]=function(a){a.reg32s[3]=JSCompiler_StaticMethods_inc(a,a.reg32s[3],31)};table16[68]=function(a){a.reg16[8]=JSCompiler_StaticMethods_inc(a,a.reg16[8],15)};table32[68]=function(a){a.reg32s[4]=JSCompiler_StaticMethods_inc(a,a.reg32s[4],31)};table16[69]=function(a){a.reg16[10]=JSCompiler_StaticMethods_inc(a,a.reg16[10],15)};table32[69]=function(a){a.reg32s[5]=JSCompiler_StaticMethods_inc(a,a.reg32s[5],31)};
table16[70]=function(a){a.reg16[12]=JSCompiler_StaticMethods_inc(a,a.reg16[12],15)};table32[70]=function(a){a.reg32s[6]=JSCompiler_StaticMethods_inc(a,a.reg32s[6],31)};table16[71]=function(a){a.reg16[14]=JSCompiler_StaticMethods_inc(a,a.reg16[14],15)};table32[71]=function(a){a.reg32s[7]=JSCompiler_StaticMethods_inc(a,a.reg32s[7],31)};table16[72]=function(a){a.reg16[0]=JSCompiler_StaticMethods_dec(a,a.reg16[0],15)};table32[72]=function(a){a.reg32s[0]=JSCompiler_StaticMethods_dec(a,a.reg32s[0],31)};
table16[73]=function(a){a.reg16[2]=JSCompiler_StaticMethods_dec(a,a.reg16[2],15)};table32[73]=function(a){a.reg32s[1]=JSCompiler_StaticMethods_dec(a,a.reg32s[1],31)};table16[74]=function(a){a.reg16[4]=JSCompiler_StaticMethods_dec(a,a.reg16[4],15)};table32[74]=function(a){a.reg32s[2]=JSCompiler_StaticMethods_dec(a,a.reg32s[2],31)};table16[75]=function(a){a.reg16[6]=JSCompiler_StaticMethods_dec(a,a.reg16[6],15)};table32[75]=function(a){a.reg32s[3]=JSCompiler_StaticMethods_dec(a,a.reg32s[3],31)};
table16[76]=function(a){a.reg16[8]=JSCompiler_StaticMethods_dec(a,a.reg16[8],15)};table32[76]=function(a){a.reg32s[4]=JSCompiler_StaticMethods_dec(a,a.reg32s[4],31)};table16[77]=function(a){a.reg16[10]=JSCompiler_StaticMethods_dec(a,a.reg16[10],15)};table32[77]=function(a){a.reg32s[5]=JSCompiler_StaticMethods_dec(a,a.reg32s[5],31)};table16[78]=function(a){a.reg16[12]=JSCompiler_StaticMethods_dec(a,a.reg16[12],15)};table32[78]=function(a){a.reg32s[6]=JSCompiler_StaticMethods_dec(a,a.reg32s[6],31)};
table16[79]=function(a){a.reg16[14]=JSCompiler_StaticMethods_dec(a,a.reg16[14],15)};table32[79]=function(a){a.reg32s[7]=JSCompiler_StaticMethods_dec(a,a.reg32s[7],31)};table16[80]=function(a){JSCompiler_StaticMethods_push16(a,a.reg16[0])};table32[80]=function(a){JSCompiler_StaticMethods_push32(a,a.reg32s[0])};table16[81]=function(a){JSCompiler_StaticMethods_push16(a,a.reg16[2])};table32[81]=function(a){JSCompiler_StaticMethods_push32(a,a.reg32s[1])};
table16[82]=function(a){JSCompiler_StaticMethods_push16(a,a.reg16[4])};table32[82]=function(a){JSCompiler_StaticMethods_push32(a,a.reg32s[2])};table16[83]=function(a){JSCompiler_StaticMethods_push16(a,a.reg16[6])};table32[83]=function(a){JSCompiler_StaticMethods_push32(a,a.reg32s[3])};table16[84]=function(a){JSCompiler_StaticMethods_push16(a,a.reg16[8])};table32[84]=function(a){JSCompiler_StaticMethods_push32(a,a.reg32s[4])};table16[85]=function(a){JSCompiler_StaticMethods_push16(a,a.reg16[10])};
table32[85]=function(a){JSCompiler_StaticMethods_push32(a,a.reg32s[5])};table16[86]=function(a){JSCompiler_StaticMethods_push16(a,a.reg16[12])};table32[86]=function(a){JSCompiler_StaticMethods_push32(a,a.reg32s[6])};table16[87]=function(a){JSCompiler_StaticMethods_push16(a,a.reg16[14])};table32[87]=function(a){JSCompiler_StaticMethods_push32(a,a.reg32s[7])};table16[88]=function(a){a.reg16[0]=JSCompiler_StaticMethods_pop16(a)};table32[88]=function(a){a.reg32s[0]=JSCompiler_StaticMethods_pop32s(a)};
table16[89]=function(a){a.reg16[2]=JSCompiler_StaticMethods_pop16(a)};table32[89]=function(a){a.reg32s[1]=JSCompiler_StaticMethods_pop32s(a)};table16[90]=function(a){a.reg16[4]=JSCompiler_StaticMethods_pop16(a)};table32[90]=function(a){a.reg32s[2]=JSCompiler_StaticMethods_pop32s(a)};table16[91]=function(a){a.reg16[6]=JSCompiler_StaticMethods_pop16(a)};table32[91]=function(a){a.reg32s[3]=JSCompiler_StaticMethods_pop32s(a)};table16[92]=function(a){a.reg16[8]=JSCompiler_StaticMethods_pop16(a)};
table32[92]=function(a){a.reg32s[4]=JSCompiler_StaticMethods_pop32s(a)};table16[93]=function(a){a.reg16[10]=JSCompiler_StaticMethods_pop16(a)};table32[93]=function(a){a.reg32s[5]=JSCompiler_StaticMethods_pop32s(a)};table16[94]=function(a){a.reg16[12]=JSCompiler_StaticMethods_pop16(a)};table32[94]=function(a){a.reg32s[6]=JSCompiler_StaticMethods_pop32s(a)};table16[95]=function(a){a.reg16[14]=JSCompiler_StaticMethods_pop16(a)};table32[95]=function(a){a.reg32s[7]=JSCompiler_StaticMethods_pop32s(a)};
table16[96]=function(a){var b=a.reg16[8];JSCompiler_StaticMethods_translate_address_write(a,a.segment_offsets[2]+b-15|0);JSCompiler_StaticMethods_push16(a,a.reg16[0]);JSCompiler_StaticMethods_push16(a,a.reg16[2]);JSCompiler_StaticMethods_push16(a,a.reg16[4]);JSCompiler_StaticMethods_push16(a,a.reg16[6]);JSCompiler_StaticMethods_push16(a,b);JSCompiler_StaticMethods_push16(a,a.reg16[10]);JSCompiler_StaticMethods_push16(a,a.reg16[12]);JSCompiler_StaticMethods_push16(a,a.reg16[14])};
table32[96]=function(a){var b=a.reg32s[4];JSCompiler_StaticMethods_translate_address_write(a,a.segment_offsets[2]+b-31|0);JSCompiler_StaticMethods_push32(a,a.reg32s[0]);JSCompiler_StaticMethods_push32(a,a.reg32s[1]);JSCompiler_StaticMethods_push32(a,a.reg32s[2]);JSCompiler_StaticMethods_push32(a,a.reg32s[3]);JSCompiler_StaticMethods_push32(a,b);JSCompiler_StaticMethods_push32(a,a.reg32s[5]);JSCompiler_StaticMethods_push32(a,a.reg32s[6]);JSCompiler_StaticMethods_push32(a,a.reg32s[7])};
table16[97]=function(a){JSCompiler_StaticMethods_translate_address_read(a,a.segment_offsets[2]+a.stack_reg[a.reg_vsp]+15|0);a.reg16[14]=JSCompiler_StaticMethods_pop16(a);a.reg16[12]=JSCompiler_StaticMethods_pop16(a);a.reg16[10]=JSCompiler_StaticMethods_pop16(a);a.stack_reg[a.reg_vsp]+=2;a.reg16[6]=JSCompiler_StaticMethods_pop16(a);a.reg16[4]=JSCompiler_StaticMethods_pop16(a);a.reg16[2]=JSCompiler_StaticMethods_pop16(a);a.reg16[0]=JSCompiler_StaticMethods_pop16(a)};
table32[97]=function(a){JSCompiler_StaticMethods_translate_address_read(a,a.segment_offsets[2]+a.stack_reg[a.reg_vsp]+31|0);a.reg32s[7]=JSCompiler_StaticMethods_pop32s(a);a.reg32s[6]=JSCompiler_StaticMethods_pop32s(a);a.reg32s[5]=JSCompiler_StaticMethods_pop32s(a);a.stack_reg[a.reg_vsp]+=4;a.reg32s[3]=JSCompiler_StaticMethods_pop32s(a);a.reg32s[2]=JSCompiler_StaticMethods_pop32s(a);a.reg32s[1]=JSCompiler_StaticMethods_pop32s(a);a.reg32s[0]=JSCompiler_StaticMethods_pop32s(a)};
table16[98]=table32[98]=function(){};
table16[99]=table32[99]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,d,e)):c=JSCompiler_StaticMethods_read16(a.memory,d)):c=a.reg16[b<<1&14];var f=b>>2&14;a.flags_changed&=-65;(c&3)<(a.reg16[f]&3)?(a.flags|=64,c=c&-4|a.reg16[f]&3):a.flags&=-65;192>b?e?JSCompiler_StaticMethods_virt_boundary_write16(a,
d,e,c):JSCompiler_StaticMethods_write16(a.memory,d,c):a.reg16[b<<1&14]=c};table16[100]=table32[100]=function(a){JSCompiler_StaticMethods_seg_prefix(a,4)};table16[101]=table32[101]=function(a){JSCompiler_StaticMethods_seg_prefix(a,5)};table16[102]=table32[102]=function(a){a.operand_size_32=!a.is_32;JSCompiler_StaticMethods_update_operand_size(a);a.table[JSCompiler_StaticMethods_read_imm8(a)](a);a.operand_size_32=a.is_32;JSCompiler_StaticMethods_update_operand_size(a)};
table16[103]=table32[103]=function(a){a.address_size_32=!a.is_32;JSCompiler_StaticMethods_update_address_size(a);a.table[JSCompiler_StaticMethods_read_imm8(a)](a);a.address_size_32=a.is_32;JSCompiler_StaticMethods_update_address_size(a)};table16[104]=function(a){JSCompiler_StaticMethods_push16(a,JSCompiler_StaticMethods_read_imm16(a))};table32[104]=function(a){JSCompiler_StaticMethods_push32(a,JSCompiler_StaticMethods_read_imm32s(a))};
table16[105]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b))<<16>>16:a.reg16s[b<<1&14];a.reg16[b>>2&14]=JSCompiler_StaticMethods_imul_reg16(a,JSCompiler_StaticMethods_read_imm16(a)<<16>>16,c)};
table32[105]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.reg32s[b>>3&7]=JSCompiler_StaticMethods_imul_reg32(a,JSCompiler_StaticMethods_read_imm32s(a),c)};table16[106]=function(a){JSCompiler_StaticMethods_push16(a,JSCompiler_StaticMethods_read_imm8s(a))};table32[106]=function(a){JSCompiler_StaticMethods_push32(a,JSCompiler_StaticMethods_read_imm8s(a))};
table16[107]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b))<<16>>16:a.reg16s[b<<1&14];a.reg16[b>>2&14]=JSCompiler_StaticMethods_imul_reg16(a,JSCompiler_StaticMethods_read_imm8s(a),c)};
table32[107]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.reg32s[b>>3&7]=JSCompiler_StaticMethods_imul_reg32(a,JSCompiler_StaticMethods_read_imm8s(a),c)};
table16[108]=table32[108]=function(a){a:{var b=a.reg16[4];JSCompiler_StaticMethods_test_privileges_for_io(a,b,1);var c,d=a.flags&1024?-1:1,e=!1;c=a.segment_offsets[0]+a.regv[a.reg_vdi]|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,l=d>>31|1;a.paging&&(k=Math.min(k,(l>>1^~c)&4095),c=JSCompiler_StaticMethods_translate_address_write(a,c));do JSCompiler_StaticMethods_write8(a.memory,c,a.io.port_read8(b)),c+=l,e=0!==--f&&!0;while(e&&k--);a.regv[a.reg_vdi]+=
d*(g-f)|0;a.regv[a.reg_vcx]=f;a.timestamp_counter+=g-f}else c=JSCompiler_StaticMethods_translate_address_write(a,c),JSCompiler_StaticMethods_write8(a.memory,c,a.io.port_read8(b)),a.regv[a.reg_vdi]+=d;e&&(a.instruction_pointer=a.previous_ip)}};
table16[109]=function(a){a:{var b=a.reg16[4];JSCompiler_StaticMethods_test_privileges_for_io(a,b,2);var c,d=a.flags&1024?-2:2,e=!1;c=a.segment_offsets[0]+a.regv[a.reg_vdi]|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 JSCompiler_StaticMethods_safe_write16(a,c,a.io.port_read16(b)),c+=d,a.regv[a.reg_vdi]+=d,e=0!==--a.regv[a.reg_vcx]&&!0;while(e&&k--)}else{var l=d>>31|1;a.paging&&(k=Math.min(k,(l>>1^~c)&4095),c=JSCompiler_StaticMethods_translate_address_write(a,
c),k>>=1);c>>>=1;do JSCompiler_StaticMethods_write_aligned16(a.memory,c,a.io.port_read16(b)),c+=l,e=0!==--f&&!0;while(e&&k--);a.regv[a.reg_vdi]+=d*(g-f)|0;a.regv[a.reg_vcx]=f;a.timestamp_counter+=g-f}}else JSCompiler_StaticMethods_safe_write16(a,c,a.io.port_read16(b)),a.regv[a.reg_vdi]+=d;e&&(a.instruction_pointer=a.previous_ip)}};
table32[109]=function(a){a:{var b=a.reg16[4];JSCompiler_StaticMethods_test_privileges_for_io(a,b,4);var c,d=a.flags&1024?-4:4,e=!1;c=a.segment_offsets[0]+a.regv[a.reg_vdi]|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 JSCompiler_StaticMethods_safe_write32(a,c,a.io.port_read32(b)),c+=d,a.regv[a.reg_vdi]+=d,e=0!==--a.regv[a.reg_vcx]&&!0;while(e&&k--)}else{var l=d>>31|1;a.paging&&(k=Math.min(k,(l>>1^~c)&4095),c=JSCompiler_StaticMethods_translate_address_write(a,
c),k>>=2);c>>>=2;do JSCompiler_StaticMethods_write_aligned32(a.memory,c,a.io.port_read32(b)),c+=l,e=0!==--f&&!0;while(e&&k--);a.regv[a.reg_vdi]+=d*(g-f)|0;a.regv[a.reg_vcx]=f;a.timestamp_counter+=g-f}}else JSCompiler_StaticMethods_safe_write32(a,c,a.io.port_read32(b)),a.regv[a.reg_vdi]+=d;e&&(a.instruction_pointer=a.previous_ip)}};
table16[110]=table32[110]=function(a){a:{var b=a.reg16[4];JSCompiler_StaticMethods_test_privileges_for_io(a,b,1);var c,d=a.flags&1024?-1:1,e=!1;c=JSCompiler_StaticMethods_get_seg_prefix(a,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,l=d>>31|1;a.paging&&(k=(l>>1^~c)&4095,c=JSCompiler_StaticMethods_translate_address_read(a,c));do a.io.port_write8(b,JSCompiler_StaticMethods_read8(a.memory,c)),c+=l,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=JSCompiler_StaticMethods_translate_address_read(a,c),a.io.port_write8(b,JSCompiler_StaticMethods_read8(a.memory,c)),a.regv[a.reg_vsi]+=d;e&&(a.instruction_pointer=a.previous_ip)}};
table16[111]=function(a){a:{var b=a.reg16[4];JSCompiler_StaticMethods_test_privileges_for_io(a,b,2);var c,d=a.flags&1024?-2:2,e=!1;c=JSCompiler_StaticMethods_get_seg_prefix(a,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.io.port_write16(b,JSCompiler_StaticMethods_safe_read16(a,c)),c+=d,a.regv[a.reg_vsi]+=d,e=0!==--a.regv[a.reg_vcx]&&!0;while(e&&k--)}else{var l=d>>31|1;a.paging&&(k=(l>>1^~c)&4095,c=JSCompiler_StaticMethods_translate_address_read(a,
c),k>>=1);c>>>=1;do a.io.port_write16(b,JSCompiler_StaticMethods_read_aligned16(a.memory,c)),c+=l,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.io.port_write16(b,JSCompiler_StaticMethods_safe_read16(a,c)),a.regv[a.reg_vsi]+=d;e&&(a.instruction_pointer=a.previous_ip)}};
table32[111]=function(a){a:{var b=a.reg16[4];JSCompiler_StaticMethods_test_privileges_for_io(a,b,4);var c,d=a.flags&1024?-4:4,e=!1;c=JSCompiler_StaticMethods_get_seg_prefix(a,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.io.port_write32(b,JSCompiler_StaticMethods_safe_read32s(a,c)),c+=d,a.regv[a.reg_vsi]+=d,e=0!==--a.regv[a.reg_vcx]&&!0;while(e&&k--)}else{var l=d>>31|1;a.paging&&(k=(l>>1^~c)&4095,c=JSCompiler_StaticMethods_translate_address_read(a,
c),k>>=2);c>>>=2;do a.io.port_write32(b,JSCompiler_StaticMethods_read_aligned32(a.memory,c)),c+=l,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.io.port_write32(b,JSCompiler_StaticMethods_safe_read32s(a,c)),a.regv[a.reg_vsi]+=d;e&&(a.instruction_pointer=a.previous_ip)}};
table16[112]=table32[112]=function(a){a.test_o()&&(a.instruction_pointer=a.instruction_pointer+JSCompiler_StaticMethods_read_imm8s(a)|0);a.instruction_pointer++;a.last_instr_jump=!0};table16[113]=table32[113]=function(a){a.test_o()||(a.instruction_pointer=a.instruction_pointer+JSCompiler_StaticMethods_read_imm8s(a)|0);a.instruction_pointer++;a.last_instr_jump=!0};
table16[114]=table32[114]=function(a){a.test_b()&&(a.instruction_pointer=a.instruction_pointer+JSCompiler_StaticMethods_read_imm8s(a)|0);a.instruction_pointer++;a.last_instr_jump=!0};table16[115]=table32[115]=function(a){a.test_b()||(a.instruction_pointer=a.instruction_pointer+JSCompiler_StaticMethods_read_imm8s(a)|0);a.instruction_pointer++;a.last_instr_jump=!0};
table16[116]=table32[116]=function(a){a.test_z()&&(a.instruction_pointer=a.instruction_pointer+JSCompiler_StaticMethods_read_imm8s(a)|0);a.instruction_pointer++;a.last_instr_jump=!0};table16[117]=table32[117]=function(a){a.test_z()||(a.instruction_pointer=a.instruction_pointer+JSCompiler_StaticMethods_read_imm8s(a)|0);a.instruction_pointer++;a.last_instr_jump=!0};
table16[118]=table32[118]=function(a){JSCompiler_StaticMethods_test_be(a)&&(a.instruction_pointer=a.instruction_pointer+JSCompiler_StaticMethods_read_imm8s(a)|0);a.instruction_pointer++;a.last_instr_jump=!0};table16[119]=table32[119]=function(a){JSCompiler_StaticMethods_test_be(a)||(a.instruction_pointer=a.instruction_pointer+JSCompiler_StaticMethods_read_imm8s(a)|0);a.instruction_pointer++;a.last_instr_jump=!0};
table16[120]=table32[120]=function(a){a.test_s()&&(a.instruction_pointer=a.instruction_pointer+JSCompiler_StaticMethods_read_imm8s(a)|0);a.instruction_pointer++;a.last_instr_jump=!0};table16[121]=table32[121]=function(a){a.test_s()||(a.instruction_pointer=a.instruction_pointer+JSCompiler_StaticMethods_read_imm8s(a)|0);a.instruction_pointer++;a.last_instr_jump=!0};
table16[122]=table32[122]=function(a){a.test_p()&&(a.instruction_pointer=a.instruction_pointer+JSCompiler_StaticMethods_read_imm8s(a)|0);a.instruction_pointer++;a.last_instr_jump=!0};table16[123]=table32[123]=function(a){a.test_p()||(a.instruction_pointer=a.instruction_pointer+JSCompiler_StaticMethods_read_imm8s(a)|0);a.instruction_pointer++;a.last_instr_jump=!0};
table16[124]=table32[124]=function(a){JSCompiler_StaticMethods_test_l(a)&&(a.instruction_pointer=a.instruction_pointer+JSCompiler_StaticMethods_read_imm8s(a)|0);a.instruction_pointer++;a.last_instr_jump=!0};table16[125]=table32[125]=function(a){JSCompiler_StaticMethods_test_l(a)||(a.instruction_pointer=a.instruction_pointer+JSCompiler_StaticMethods_read_imm8s(a)|0);a.instruction_pointer++;a.last_instr_jump=!0};
table16[126]=table32[126]=function(a){JSCompiler_StaticMethods_test_le(a)&&(a.instruction_pointer=a.instruction_pointer+JSCompiler_StaticMethods_read_imm8s(a)|0);a.instruction_pointer++;a.last_instr_jump=!0};table16[127]=table32[127]=function(a){JSCompiler_StaticMethods_test_le(a)||(a.instruction_pointer=a.instruction_pointer+JSCompiler_StaticMethods_read_imm8s(a)|0);a.instruction_pointer++;a.last_instr_jump=!0};
table16[128]=table32[128]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(56===(b&56)){var c=192>b?JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b)):a.reg8[b<<2&12|b>>2&1];a.sub(c,JSCompiler_StaticMethods_read_imm8(a),7)}else{var d,e,f;192>b?(e=JSCompiler_StaticMethods_translate_address_write(a,a.modrm_resolve(b)),c=JSCompiler_StaticMethods_read8(a.memory,e)):c=a.reg8[b<<2&12|b>>2&1];f=0;d=JSCompiler_StaticMethods_read_imm8(a);switch(b>>3&7){case 0:f=a.add(c,d,7);break;case 1:f=
JSCompiler_StaticMethods_or(a,c,d,7);break;case 2:f=JSCompiler_StaticMethods_adc(a,c,d,7);break;case 3:f=JSCompiler_StaticMethods_sbb(a,c,d,7);break;case 4:f=JSCompiler_StaticMethods_and(a,c,d,7);break;case 5:f=a.sub(c,d,7);break;case 6:f=JSCompiler_StaticMethods_xor(a,c,d,7);break;case 7:f=dbg_assert.bind(this,0)(c,d)}192>b?JSCompiler_StaticMethods_write8(a.memory,e,f):a.reg8[b<<2&12|b>>2&1]=f}};
table16[129]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(56===(b&56)){var c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.sub(c,JSCompiler_StaticMethods_read_imm16(a),15)}else{var d,e,f=0,g;192>b?(c=a.modrm_resolve(b),e=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(f=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,e,f)):c=JSCompiler_StaticMethods_read16(a.memory,
e)):c=a.reg16[b<<1&14];g=0;d=JSCompiler_StaticMethods_read_imm16(a);switch(b>>3&7){case 0:g=a.add(c,d,15);break;case 1:g=JSCompiler_StaticMethods_or(a,c,d,15);break;case 2:g=JSCompiler_StaticMethods_adc(a,c,d,15);break;case 3:g=JSCompiler_StaticMethods_sbb(a,c,d,15);break;case 4:g=JSCompiler_StaticMethods_and(a,c,d,15);break;case 5:g=a.sub(c,d,15);break;case 6:g=JSCompiler_StaticMethods_xor(a,c,d,15);break;case 7:g=dbg_assert.bind(this,0)(c,d)}192>b?f?JSCompiler_StaticMethods_virt_boundary_write16(a,
e,f,g):JSCompiler_StaticMethods_write16(a.memory,e,g):a.reg16[b<<1&14]=g}};
table32[129]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(56===(b&56)){var c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.sub(c,JSCompiler_StaticMethods_read_imm32s(a),31)}else{var d,e,f=0,g;192>b?(c=a.modrm_resolve(b),e=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(f=JSCompiler_StaticMethods_translate_address_write(a,c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,e,f)):c=JSCompiler_StaticMethods_read32s(a.memory,
e)):c=a.reg32s[b&7];g=0;d=JSCompiler_StaticMethods_read_imm32s(a);switch(b>>3&7){case 0:g=a.add(c,d,31);break;case 1:g=JSCompiler_StaticMethods_or(a,c,d,31);break;case 2:g=JSCompiler_StaticMethods_adc(a,c,d,31);break;case 3:g=JSCompiler_StaticMethods_sbb(a,c,d,31);break;case 4:g=JSCompiler_StaticMethods_and(a,c,d,31);break;case 5:g=a.sub(c,d,31);break;case 6:g=JSCompiler_StaticMethods_xor(a,c,d,31);break;case 7:g=dbg_assert.bind(this,0)(c,d)}192>b?f?JSCompiler_StaticMethods_virt_boundary_write32(a,
e,f,g):JSCompiler_StaticMethods_write32(a.memory,e,g):a.reg32s[b&7]=g}};table16[130]=table32[130]=function(a){a.table[128](a)};
table16[131]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(56===(b&56)){var c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.sub(c,JSCompiler_StaticMethods_read_imm8s(a),15)}else{var d,e,f=0,g;192>b?(c=a.modrm_resolve(b),e=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(f=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,e,f)):c=JSCompiler_StaticMethods_read16(a.memory,
e)):c=a.reg16[b<<1&14];g=0;d=JSCompiler_StaticMethods_read_imm8s(a);switch(b>>3&7){case 0:g=a.add(c,d,15);break;case 1:g=JSCompiler_StaticMethods_or(a,c,d,15);break;case 2:g=JSCompiler_StaticMethods_adc(a,c,d,15);break;case 3:g=JSCompiler_StaticMethods_sbb(a,c,d,15);break;case 4:g=JSCompiler_StaticMethods_and(a,c,d,15);break;case 5:g=a.sub(c,d,15);break;case 6:g=JSCompiler_StaticMethods_xor(a,c,d,15);break;case 7:g=dbg_assert.bind(this,0)(c,d)}192>b?f?JSCompiler_StaticMethods_virt_boundary_write16(a,
e,f,g):JSCompiler_StaticMethods_write16(a.memory,e,g):a.reg16[b<<1&14]=g}};
table32[131]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(56===(b&56)){var c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.sub(c,JSCompiler_StaticMethods_read_imm8s(a),31)}else{var d,e,f=0,g;192>b?(c=a.modrm_resolve(b),e=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(f=JSCompiler_StaticMethods_translate_address_write(a,c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,e,f)):c=JSCompiler_StaticMethods_read32s(a.memory,
e)):c=a.reg32s[b&7];g=0;d=JSCompiler_StaticMethods_read_imm8s(a);switch(b>>3&7){case 0:g=a.add(c,d,31);break;case 1:g=JSCompiler_StaticMethods_or(a,c,d,31);break;case 2:g=JSCompiler_StaticMethods_adc(a,c,d,31);break;case 3:g=JSCompiler_StaticMethods_sbb(a,c,d,31);break;case 4:g=JSCompiler_StaticMethods_and(a,c,d,31);break;case 5:g=a.sub(c,d,31);break;case 6:g=JSCompiler_StaticMethods_xor(a,c,d,31);break;case 7:g=dbg_assert.bind(this,0)(c,d)}192>b?f?JSCompiler_StaticMethods_virt_boundary_write32(a,
e,f,g):JSCompiler_StaticMethods_write32(a.memory,e,g):a.reg32s[b&7]=g}};table16[132]=table32[132]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b)):a.reg8[b<<2&12|b>>2&1];JSCompiler_StaticMethods_and(a,c,a.reg8[b>>1&12|b>>5&1],7)};
table16[133]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];JSCompiler_StaticMethods_and(a,c,a.reg16[b>>2&14],15)};table32[133]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];JSCompiler_StaticMethods_and(a,c,a.reg32s[b>>3&7],31)};
table16[134]=table32[134]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d;192>b?(d=JSCompiler_StaticMethods_translate_address_write(a,a.modrm_resolve(b)),c=JSCompiler_StaticMethods_read8(a.memory,d)):c=a.reg8[b<<2&12|b>>2&1];var e=b>>1&12|b>>5&1,f=a.reg8[e];a.reg8[e]=c;192>b?JSCompiler_StaticMethods_write8(a.memory,d,f):a.reg8[b<<2&12|b>>2&1]=f};
table16[135]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,d,e)):c=JSCompiler_StaticMethods_read16(a.memory,d)):c=a.reg16[b<<1&14];var f=b>>2&14,g=a.reg16[f];a.reg16[f]=c;192>b?e?JSCompiler_StaticMethods_virt_boundary_write16(a,d,e,g):JSCompiler_StaticMethods_write16(a.memory,
d,g):a.reg16[b<<1&14]=g};
table32[135]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,d,e)):c=JSCompiler_StaticMethods_read32s(a.memory,d)):c=a.reg32s[b&7];var f=b>>3&7,g=a.reg32s[f];a.reg32s[f]=c;192>b?e?JSCompiler_StaticMethods_virt_boundary_write32(a,d,e,g):JSCompiler_StaticMethods_write32(a.memory,d,
g):a.reg32s[b&7]=g};table16[136]=table32[136]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=a.reg8[b>>1&12|b>>5&1];192>b?JSCompiler_StaticMethods_safe_write8(a,c,d):a.reg8[b<<2&12|b>>2&1]=d};table16[137]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=a.reg16[b>>2&14];192>b?JSCompiler_StaticMethods_safe_write16(a,c,d):a.reg16[b<<1&14]=d};
table32[137]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=a.reg32s[b>>3&7];192>b?JSCompiler_StaticMethods_safe_write32(a,c,d):a.reg32[b&7]=d};table16[138]=table32[138]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b)):a.reg8[b<<2&12|b>>2&1];a.reg8[b>>1&12|b>>5&1]=c};
table16[139]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.reg16[b>>2&14]=c};table32[139]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.reg32s[b>>3&7]=c};
table16[140]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=a.sreg[b>>3&7];192>b?JSCompiler_StaticMethods_safe_write16(a,c,d):a.reg16[b<<1&14]=d};table32[140]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=a.sreg[b>>3&7];192>b?JSCompiler_StaticMethods_safe_write32(a,c,d):a.reg32[b&7]=d};
table16[141]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192<=b&&JSCompiler_StaticMethods_trigger_ud(a);a.segment_prefix=9;a.reg16[(b>>3&7)<<1]=a.modrm_resolve(b);a.segment_prefix=-1};table32[141]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192<=b&&JSCompiler_StaticMethods_trigger_ud(a);a.segment_prefix=9;a.reg32s[b>>3&7]=a.modrm_resolve(b);a.segment_prefix=-1};
table16[142]=table32[142]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=b>>3&7,b=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];JSCompiler_StaticMethods_switch_seg(a,c,b)};
table16[143]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=JSCompiler_StaticMethods_safe_read16(a,JSCompiler_StaticMethods_get_stack_pointer(a,0));a.stack_reg[a.reg_vsp]+=2;192>b?(b=a.modrm_resolve(b),a.stack_reg[a.reg_vsp]-=2,JSCompiler_StaticMethods_safe_write16(a,b,c),a.stack_reg[a.reg_vsp]+=2):a.reg16[b<<1&14]=c};
table32[143]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=JSCompiler_StaticMethods_safe_read32s(a,JSCompiler_StaticMethods_get_stack_pointer(a,0));a.stack_reg[a.reg_vsp]+=4;192>b?(b=a.modrm_resolve(b),a.stack_reg[a.reg_vsp]-=4,JSCompiler_StaticMethods_safe_write32(a,b,c),a.stack_reg[a.reg_vsp]+=4):a.reg32s[b&7]=c};table16[144]=function(a){JSCompiler_StaticMethods_xchg16r(a,0)};table32[144]=function(a){JSCompiler_StaticMethods_xchg32r(a,0)};
table16[145]=function(a){JSCompiler_StaticMethods_xchg16r(a,2)};table32[145]=function(a){JSCompiler_StaticMethods_xchg32r(a,1)};table16[146]=function(a){JSCompiler_StaticMethods_xchg16r(a,4)};table32[146]=function(a){JSCompiler_StaticMethods_xchg32r(a,2)};table16[147]=function(a){JSCompiler_StaticMethods_xchg16r(a,6)};table32[147]=function(a){JSCompiler_StaticMethods_xchg32r(a,3)};table16[148]=function(a){JSCompiler_StaticMethods_xchg16r(a,8)};
table32[148]=function(a){JSCompiler_StaticMethods_xchg32r(a,4)};table16[149]=function(a){JSCompiler_StaticMethods_xchg16r(a,10)};table32[149]=function(a){JSCompiler_StaticMethods_xchg32r(a,5)};table16[150]=function(a){JSCompiler_StaticMethods_xchg16r(a,12)};table32[150]=function(a){JSCompiler_StaticMethods_xchg32r(a,6)};table16[151]=function(a){JSCompiler_StaticMethods_xchg16r(a,14)};table32[151]=function(a){JSCompiler_StaticMethods_xchg32r(a,7)};table16[144]=table32[144]=function(){};
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 b=JSCompiler_StaticMethods_read_imm16(a),c=JSCompiler_StaticMethods_read_imm16(a);JSCompiler_StaticMethods_writable_or_pagefault(a,JSCompiler_StaticMethods_get_stack_pointer(a,-4),4);JSCompiler_StaticMethods_push16(a,a.sreg[1]);JSCompiler_StaticMethods_push16(a,JSCompiler_StaticMethods_get_real_eip(a));JSCompiler_StaticMethods_switch_seg(a,1,c);a.instruction_pointer=a.segment_offsets[1]+b|0;a.last_instr_jump=!0};
table32[154]=function(a){var b=JSCompiler_StaticMethods_read_imm32s(a),c=JSCompiler_StaticMethods_read_imm16(a);JSCompiler_StaticMethods_writable_or_pagefault(a,JSCompiler_StaticMethods_get_stack_pointer(a,-8),8);JSCompiler_StaticMethods_push32(a,a.sreg[1]);JSCompiler_StaticMethods_push32(a,JSCompiler_StaticMethods_get_real_eip(a));JSCompiler_StaticMethods_switch_seg(a,1,c);a.instruction_pointer=a.segment_offsets[1]+b|0;a.last_instr_jump=!0};
table16[155]=table32[155]=function(a){10===(a.cr0&10)&&JSCompiler_StaticMethods_trigger_nm(a)};table16[156]=function(a){a.flags&131072&&3>(a.flags>>12&3)?JSCompiler_StaticMethods_trigger_gp(a,0):(JSCompiler_StaticMethods_load_eflags(a),JSCompiler_StaticMethods_push16(a,a.flags))};table32[156]=function(a){a.flags&131072&&3>(a.flags>>12&3)?JSCompiler_StaticMethods_trigger_gp(a,0):(JSCompiler_StaticMethods_load_eflags(a),JSCompiler_StaticMethods_push32(a,a.flags&-196609))};
table16[157]=function(a){a.flags&131072&&3>(a.flags>>12&3)&&JSCompiler_StaticMethods_trigger_gp(a,0);JSCompiler_StaticMethods_update_eflags(a,a.flags&-65536|JSCompiler_StaticMethods_pop16(a));JSCompiler_StaticMethods_handle_irqs(a)};table32[157]=function(a){a.flags&131072&&3>(a.flags>>12&3)&&JSCompiler_StaticMethods_trigger_gp(a,0);JSCompiler_StaticMethods_update_eflags(a,JSCompiler_StaticMethods_pop32s(a));JSCompiler_StaticMethods_handle_irqs(a)};
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){JSCompiler_StaticMethods_load_eflags(a);a.reg8[1]=a.flags};table16[160]=table32[160]=function(a){var b=JSCompiler_StaticMethods_safe_read8(a,JSCompiler_StaticMethods_read_moffs(a));a.reg8[0]=b};table16[161]=function(a){var b=JSCompiler_StaticMethods_safe_read16(a,JSCompiler_StaticMethods_read_moffs(a));a.reg16[0]=b};
table32[161]=function(a){var b=JSCompiler_StaticMethods_safe_read32s(a,JSCompiler_StaticMethods_read_moffs(a));a.reg32s[0]=b};table16[162]=table32[162]=function(a){JSCompiler_StaticMethods_safe_write8(a,JSCompiler_StaticMethods_read_moffs(a),a.reg8[0])};table16[163]=function(a){JSCompiler_StaticMethods_safe_write16(a,JSCompiler_StaticMethods_read_moffs(a),a.reg16[0])};table32[163]=function(a){JSCompiler_StaticMethods_safe_write32(a,JSCompiler_StaticMethods_read_moffs(a),a.reg32s[0])};
table16[164]=table32[164]=function(a){a:{var b,c,d=a.flags&1024?-1:1,e=!1;c=a.segment_offsets[0]+a.regv[a.reg_vdi]|0;b=JSCompiler_StaticMethods_get_seg_prefix(a,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,l=d>>31|1;a.paging&&(k=(l>>1^~b)&4095,b=JSCompiler_StaticMethods_translate_address_read(a,b),k=Math.min(k,(l>>1^~c)&4095),c=JSCompiler_StaticMethods_translate_address_write(a,c));do JSCompiler_StaticMethods_write8(a.memory,c,
JSCompiler_StaticMethods_read8(a.memory,b)),c+=l,b+=l,e=0!==--f&&!0;while(e&&k--);d=d*(g-f)|0;a.regv[a.reg_vdi]+=d;a.regv[a.reg_vsi]+=d;a.regv[a.reg_vcx]=f;a.timestamp_counter+=g-f}else b=JSCompiler_StaticMethods_translate_address_read(a,b),c=JSCompiler_StaticMethods_translate_address_write(a,c),JSCompiler_StaticMethods_write8(a.memory,c,JSCompiler_StaticMethods_read8(a.memory,b)),a.regv[a.reg_vdi]+=d,a.regv[a.reg_vsi]+=d;e&&(a.instruction_pointer=a.previous_ip)}};
table16[165]=function(a){a:{var b,c,d=a.flags&1024?-2:2,e=!1;c=a.segment_offsets[0]+a.regv[a.reg_vdi]|0;b=JSCompiler_StaticMethods_get_seg_prefix(a,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||b&1){do JSCompiler_StaticMethods_safe_write16(a,c,JSCompiler_StaticMethods_safe_read16(a,b)),c+=d,a.regv[a.reg_vdi]+=d,b+=d,a.regv[a.reg_vsi]+=d,e=0!==--a.regv[a.reg_vcx]&&!0;while(e&&k--)}else{var l=d>>31|1;a.paging&&(k=(l>>1^~b)&
4095,b=JSCompiler_StaticMethods_translate_address_read(a,b),k=Math.min(k,(l>>1^~c)&4095),c=JSCompiler_StaticMethods_translate_address_write(a,c),k>>=1);c>>>=1;b>>>=1;do JSCompiler_StaticMethods_write_aligned16(a.memory,c,JSCompiler_StaticMethods_read_aligned16(a.memory,b)),c+=l,b+=l,e=0!==--f&&!0;while(e&&k--);d=d*(g-f)|0;a.regv[a.reg_vdi]+=d;a.regv[a.reg_vsi]+=d;a.regv[a.reg_vcx]=f;a.timestamp_counter+=g-f}}else JSCompiler_StaticMethods_safe_write16(a,c,JSCompiler_StaticMethods_safe_read16(a,b)),
a.regv[a.reg_vdi]+=d,a.regv[a.reg_vsi]+=d;e&&(a.instruction_pointer=a.previous_ip)}};
table32[165]=function(a){a:{if(0!==a.repeat_string_prefix){var b=JSCompiler_StaticMethods_get_seg_prefix(a,3)+a.regv[a.reg_vsi],c=a.segment_offsets[0]+a.regv[a.reg_vdi],d=a.regv[a.reg_vcx]>>>0;if(!d)break a;var e=a.paging?4095:3;if(0===(c&e)&&0===(b&e)&&0===(a.flags&1024)&&(e=!1,a.paging&&(b=JSCompiler_StaticMethods_translate_address_read(a,b),c=JSCompiler_StaticMethods_translate_address_write(a,c),1024<d&&(d=1024,e=!0)),!a.io.in_mmap_range(b,d)&&!a.io.in_mmap_range(c,d))){var f=d<<2;a.regv[a.reg_vcx]-=
d;a.regv[a.reg_vdi]+=f;a.regv[a.reg_vsi]+=f;b>>=2;a.memory.mem32s.set(a.memory.mem32s.subarray(b,b+d),c>>2);e&&(a.instruction_pointer=a.previous_ip);break a}}f=a.flags&1024?-4:4;e=!1;c=a.segment_offsets[0]+a.regv[a.reg_vdi]|0;b=JSCompiler_StaticMethods_get_seg_prefix(a,3)+a.regv[a.reg_vsi]|0;if(0!==a.repeat_string_prefix){var g=d=a.regv[a.reg_vcx]>>>0;if(0===d)break a;var k=16384;if(c&3||b&3){do JSCompiler_StaticMethods_safe_write32(a,c,JSCompiler_StaticMethods_safe_read32s(a,b)),c+=f,a.regv[a.reg_vdi]+=
f,b+=f,a.regv[a.reg_vsi]+=f,e=0!==--a.regv[a.reg_vcx]&&!0;while(e&&k--)}else{var l=f>>31|1;a.paging&&(k=(l>>1^~b)&4095,b=JSCompiler_StaticMethods_translate_address_read(a,b),k=Math.min(k,(l>>1^~c)&4095),c=JSCompiler_StaticMethods_translate_address_write(a,c),k>>=2);c>>>=2;b>>>=2;do JSCompiler_StaticMethods_write_aligned32(a.memory,c,JSCompiler_StaticMethods_read_aligned32(a.memory,b)),c+=l,b+=l,e=0!==--d&&!0;while(e&&k--);f=f*(g-d)|0;a.regv[a.reg_vdi]+=f;a.regv[a.reg_vsi]+=f;a.regv[a.reg_vcx]=d;a.timestamp_counter+=
g-d}}else JSCompiler_StaticMethods_safe_write32(a,c,JSCompiler_StaticMethods_safe_read32s(a,b)),a.regv[a.reg_vdi]+=f,a.regv[a.reg_vsi]+=f;e&&(a.instruction_pointer=a.previous_ip)}};
table16[166]=table32[166]=function(a){a:{var b,c;c=0;var d,e,f=a.flags&1024?-1:1,g=!1;c=a.segment_offsets[0]+a.regv[a.reg_vdi]|0;b=JSCompiler_StaticMethods_get_seg_prefix(a,3)+a.regv[a.reg_vsi]|0;if(0!==a.repeat_string_prefix){var k=a.regv[a.reg_vcx]>>>0,l=k;if(0===k)break a;var m=16384,n=f>>31|1;a.paging?(m=(n>>1^~b)&4095,e=JSCompiler_StaticMethods_translate_address_read(a,b),m=Math.min(m,(n>>1^~c)&4095),d=JSCompiler_StaticMethods_translate_address_read(a,c)):(d=c,e=b);do c=JSCompiler_StaticMethods_read8(a.memory,
d),b=JSCompiler_StaticMethods_read8(a.memory,e),d+=n,e+=n,g=0!==--k&&b===c===(2===a.repeat_string_prefix);while(g&&m--);f=f*(l-k)|0;a.regv[a.reg_vdi]+=f;a.regv[a.reg_vsi]+=f;a.regv[a.reg_vcx]=k;a.timestamp_counter+=l-k}else e=JSCompiler_StaticMethods_translate_address_read(a,b),d=JSCompiler_StaticMethods_translate_address_read(a,c),c=JSCompiler_StaticMethods_read8(a.memory,d),b=JSCompiler_StaticMethods_read8(a.memory,e),a.regv[a.reg_vdi]+=f,a.regv[a.reg_vsi]+=f;a.sub(b,c,7);g&&(a.instruction_pointer=
a.previous_ip)}};
table16[167]=function(a){a:{var b,c,d,e=0,f=a.flags&1024?-2:2,g=!1;c=a.segment_offsets[0]+a.regv[a.reg_vdi]|0;b=JSCompiler_StaticMethods_get_seg_prefix(a,3)+a.regv[a.reg_vsi]|0;if(0!==a.repeat_string_prefix){var k=a.regv[a.reg_vcx]>>>0,l=k;if(0===k)break a;var m=16384;if(c&1||b&1){do e=JSCompiler_StaticMethods_safe_read16(a,c),d=JSCompiler_StaticMethods_safe_read16(a,b),c+=f,a.regv[a.reg_vdi]+=f,b+=f,a.regv[a.reg_vsi]+=f,g=0!==--a.regv[a.reg_vcx]&&d===e===(2===a.repeat_string_prefix);while(g&&m--)
}else{var n=f>>31|1;a.paging&&(m=(n>>1^~b)&4095,b=JSCompiler_StaticMethods_translate_address_read(a,b),m=Math.min(m,(n>>1^~c)&4095),c=JSCompiler_StaticMethods_translate_address_read(a,c),m>>=1);c>>>=1;b>>>=1;do e=JSCompiler_StaticMethods_read_aligned16(a.memory,c),d=JSCompiler_StaticMethods_read_aligned16(a.memory,b),c+=n,b+=n,g=0!==--k&&d===e===(2===a.repeat_string_prefix);while(g&&m--);f=f*(l-k)|0;a.regv[a.reg_vdi]+=f;a.regv[a.reg_vsi]+=f;a.regv[a.reg_vcx]=k;a.timestamp_counter+=l-k}}else e=JSCompiler_StaticMethods_safe_read16(a,
c),d=JSCompiler_StaticMethods_safe_read16(a,b),a.regv[a.reg_vdi]+=f,a.regv[a.reg_vsi]+=f;a.sub(d,e,15);g&&(a.instruction_pointer=a.previous_ip)}};
table32[167]=function(a){a:{var b,c,d,e=0,f=a.flags&1024?-4:4,g=!1;c=a.segment_offsets[0]+a.regv[a.reg_vdi]|0;b=JSCompiler_StaticMethods_get_seg_prefix(a,3)+a.regv[a.reg_vsi]|0;if(0!==a.repeat_string_prefix){var k=a.regv[a.reg_vcx]>>>0,l=k;if(0===k)break a;var m=16384;if(c&3||b&3){do e=JSCompiler_StaticMethods_safe_read32s(a,c),d=JSCompiler_StaticMethods_safe_read32s(a,b),c+=f,a.regv[a.reg_vdi]+=f,b+=f,a.regv[a.reg_vsi]+=f,g=0!==--a.regv[a.reg_vcx]&&d===e===(2===a.repeat_string_prefix);while(g&&m--)
}else{var n=f>>31|1;a.paging&&(m=(n>>1^~b)&4095,b=JSCompiler_StaticMethods_translate_address_read(a,b),m=Math.min(m,(n>>1^~c)&4095),c=JSCompiler_StaticMethods_translate_address_read(a,c),m>>=2);c>>>=2;b>>>=2;do e=JSCompiler_StaticMethods_read_aligned32(a.memory,c),d=JSCompiler_StaticMethods_read_aligned32(a.memory,b),c+=n,b+=n,g=0!==--k&&d===e===(2===a.repeat_string_prefix);while(g&&m--);f=f*(l-k)|0;a.regv[a.reg_vdi]+=f;a.regv[a.reg_vsi]+=f;a.regv[a.reg_vcx]=k;a.timestamp_counter+=l-k}}else e=JSCompiler_StaticMethods_safe_read32s(a,
c),d=JSCompiler_StaticMethods_safe_read32s(a,b),a.regv[a.reg_vdi]+=f,a.regv[a.reg_vsi]+=f;a.sub(d,e,31);g&&(a.instruction_pointer=a.previous_ip)}};table16[168]=table32[168]=function(a){JSCompiler_StaticMethods_and(a,a.reg8[0],JSCompiler_StaticMethods_read_imm8(a),7)};table16[169]=function(a){JSCompiler_StaticMethods_and(a,a.reg16[0],JSCompiler_StaticMethods_read_imm16(a),15)};table32[169]=function(a){JSCompiler_StaticMethods_and(a,a.reg32s[0],JSCompiler_StaticMethods_read_imm32s(a),31)};
table16[170]=table32[170]=function(a){a:{var b=a.reg8[0],c,d=a.flags&1024?-1:1,e=!1;c=a.segment_offsets[0]+a.regv[a.reg_vdi]|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,l=d>>31|1;a.paging&&(k=Math.min(k,(l>>1^~c)&4095),c=JSCompiler_StaticMethods_translate_address_write(a,c));do JSCompiler_StaticMethods_write8(a.memory,c,b),c+=l,e=0!==--f&&!0;while(e&&k--);a.regv[a.reg_vdi]+=d*(g-f)|0;a.regv[a.reg_vcx]=f;a.timestamp_counter+=g-f}else c=JSCompiler_StaticMethods_translate_address_write(a,
c),JSCompiler_StaticMethods_write8(a.memory,c,b),a.regv[a.reg_vdi]+=d;e&&(a.instruction_pointer=a.previous_ip)}};
table16[171]=function(a){a:{var b=a.reg16[0],c,d=a.flags&1024?-2:2,e=!1;c=a.segment_offsets[0]+a.regv[a.reg_vdi]|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 JSCompiler_StaticMethods_safe_write16(a,c,b),c+=d,a.regv[a.reg_vdi]+=d,e=0!==--a.regv[a.reg_vcx]&&!0;while(e&&k--)}else{var l=d>>31|1;a.paging&&(k=Math.min(k,(l>>1^~c)&4095),c=JSCompiler_StaticMethods_translate_address_write(a,c),k>>=1);c>>>=1;do JSCompiler_StaticMethods_write_aligned16(a.memory,
c,b),c+=l,e=0!==--f&&!0;while(e&&k--);a.regv[a.reg_vdi]+=d*(g-f)|0;a.regv[a.reg_vcx]=f;a.timestamp_counter+=g-f}}else JSCompiler_StaticMethods_safe_write16(a,c,b),a.regv[a.reg_vdi]+=d;e&&(a.instruction_pointer=a.previous_ip)}};
table32[171]=function(a){a:{var b=a.reg32s[0],c,d=a.flags&1024?-4:4,e=!1;c=a.segment_offsets[0]+a.regv[a.reg_vdi]|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 JSCompiler_StaticMethods_safe_write32(a,c,b),c+=d,a.regv[a.reg_vdi]+=d,e=0!==--a.regv[a.reg_vcx]&&!0;while(e&&k--)}else{var l=d>>31|1;a.paging&&(k=Math.min(k,(l>>1^~c)&4095),c=JSCompiler_StaticMethods_translate_address_write(a,c),k>>=2);c>>>=2;do JSCompiler_StaticMethods_write_aligned32(a.memory,
c,b),c+=l,e=0!==--f&&!0;while(e&&k--);a.regv[a.reg_vdi]+=d*(g-f)|0;a.regv[a.reg_vcx]=f;a.timestamp_counter+=g-f}}else JSCompiler_StaticMethods_safe_write32(a,c,b),a.regv[a.reg_vdi]+=d;e&&(a.instruction_pointer=a.previous_ip)}};
table16[172]=table32[172]=function(a){a:{var b,c=a.flags&1024?-1:1,d=!1;b=JSCompiler_StaticMethods_get_seg_prefix(a,3)+a.regv[a.reg_vsi]|0;if(0!==a.repeat_string_prefix){var e=a.regv[a.reg_vcx]>>>0,f=e;if(0===e)break a;var g=16384,k=c>>31|1;a.paging&&(g=(k>>1^~b)&4095,b=JSCompiler_StaticMethods_translate_address_read(a,b));do a.reg8[0]=JSCompiler_StaticMethods_read8(a.memory,b),b+=k,d=0!==--e&&!0;while(d&&g--);a.regv[a.reg_vsi]+=c*(f-e)|0;a.regv[a.reg_vcx]=e;a.timestamp_counter+=f-e}else b=JSCompiler_StaticMethods_translate_address_read(a,
b),a.reg8[0]=JSCompiler_StaticMethods_read8(a.memory,b),a.regv[a.reg_vsi]+=c;d&&(a.instruction_pointer=a.previous_ip)}};
table16[173]=function(a){a:{var b,c=a.flags&1024?-2:2,d=!1;b=JSCompiler_StaticMethods_get_seg_prefix(a,3)+a.regv[a.reg_vsi]|0;if(0!==a.repeat_string_prefix){var e=a.regv[a.reg_vcx]>>>0,f=e;if(0===e)break a;var g=16384;if(b&1){do a.reg16[0]=JSCompiler_StaticMethods_safe_read16(a,b),b+=c,a.regv[a.reg_vsi]+=c,d=0!==--a.regv[a.reg_vcx]&&!0;while(d&&g--)}else{var k=c>>31|1;a.paging&&(g=(k>>1^~b)&4095,b=JSCompiler_StaticMethods_translate_address_read(a,b),g>>=1);b>>>=1;do a.reg16[0]=JSCompiler_StaticMethods_read_aligned16(a.memory,
b),b+=k,d=0!==--e&&!0;while(d&&g--);a.regv[a.reg_vsi]+=c*(f-e)|0;a.regv[a.reg_vcx]=e;a.timestamp_counter+=f-e}}else a.reg16[0]=JSCompiler_StaticMethods_safe_read16(a,b),a.regv[a.reg_vsi]+=c;d&&(a.instruction_pointer=a.previous_ip)}};
table32[173]=function(a){a:{var b,c=a.flags&1024?-4:4,d=!1;b=JSCompiler_StaticMethods_get_seg_prefix(a,3)+a.regv[a.reg_vsi]|0;if(0!==a.repeat_string_prefix){var e=a.regv[a.reg_vcx]>>>0,f=e;if(0===e)break a;var g=16384;if(b&3){do a.reg32s[0]=JSCompiler_StaticMethods_safe_read32s(a,b),b+=c,a.regv[a.reg_vsi]+=c,d=0!==--a.regv[a.reg_vcx]&&!0;while(d&&g--)}else{var k=c>>31|1;a.paging&&(g=(k>>1^~b)&4095,b=JSCompiler_StaticMethods_translate_address_read(a,b),g>>=2);b>>>=2;do a.reg32s[0]=JSCompiler_StaticMethods_read_aligned32(a.memory,
b),b+=k,d=0!==--e&&!0;while(d&&g--);a.regv[a.reg_vsi]+=c*(f-e)|0;a.regv[a.reg_vcx]=e;a.timestamp_counter+=f-e}}else a.reg32s[0]=JSCompiler_StaticMethods_safe_read32s(a,b),a.regv[a.reg_vsi]+=c;d&&(a.instruction_pointer=a.previous_ip)}};
table16[174]=table32[174]=function(a){a:{var b,c;b=0;var d,e=a.flags&1024?-1:1,f=!1;c=a.reg8[0];b=a.segment_offsets[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 l=16384,m=e>>31|1;a.paging?(l=Math.min(l,(m>>1^~b)&4095),d=JSCompiler_StaticMethods_translate_address_read(a,b)):d=b;do b=JSCompiler_StaticMethods_read8(a.memory,d),d+=m,f=0!==--g&&c===b===(2===a.repeat_string_prefix);while(f&&l--);a.regv[a.reg_vdi]+=e*(k-g)|0;a.regv[a.reg_vcx]=
g;a.timestamp_counter+=k-g}else d=JSCompiler_StaticMethods_translate_address_read(a,b),b=JSCompiler_StaticMethods_read8(a.memory,d),a.regv[a.reg_vdi]+=e;a.sub(c,b,7);f&&(a.instruction_pointer=a.previous_ip)}};
table16[175]=function(a){a:{var b,c,d=0,e=a.flags&1024?-2:2,f=!1;c=a.reg16[0];b=a.segment_offsets[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 l=16384;if(b&1){do d=JSCompiler_StaticMethods_safe_read16(a,b),b+=e,a.regv[a.reg_vdi]+=e,f=0!==--a.regv[a.reg_vcx]&&c===d===(2===a.repeat_string_prefix);while(f&&l--)}else{var m=e>>31|1;a.paging&&(l=Math.min(l,(m>>1^~b)&4095),b=JSCompiler_StaticMethods_translate_address_read(a,b),l>>=1);b>>>=1;do d=
JSCompiler_StaticMethods_read_aligned16(a.memory,b),b+=m,f=0!==--g&&c===d===(2===a.repeat_string_prefix);while(f&&l--);a.regv[a.reg_vdi]+=e*(k-g)|0;a.regv[a.reg_vcx]=g;a.timestamp_counter+=k-g}}else d=JSCompiler_StaticMethods_safe_read16(a,b),a.regv[a.reg_vdi]+=e;a.sub(c,d,15);f&&(a.instruction_pointer=a.previous_ip)}};
table32[175]=function(a){a:{var b,c,d=0,e=a.flags&1024?-4:4,f=!1;c=a.reg32s[0];b=a.segment_offsets[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 l=16384;if(b&3){do d=JSCompiler_StaticMethods_safe_read32s(a,b),b+=e,a.regv[a.reg_vdi]+=e,f=0!==--a.regv[a.reg_vcx]&&c===d===(2===a.repeat_string_prefix);while(f&&l--)}else{var m=e>>31|1;a.paging&&(l=Math.min(l,(m>>1^~b)&4095),b=JSCompiler_StaticMethods_translate_address_read(a,b),l>>=2);b>>>=2;
do d=JSCompiler_StaticMethods_read_aligned32(a.memory,b),b+=m,f=0!==--g&&c===d===(2===a.repeat_string_prefix);while(f&&l--);a.regv[a.reg_vdi]+=e*(k-g)|0;a.regv[a.reg_vcx]=g;a.timestamp_counter+=k-g}}else d=JSCompiler_StaticMethods_safe_read32s(a,b),a.regv[a.reg_vdi]+=e;a.sub(c,d,31);f&&(a.instruction_pointer=a.previous_ip)}};table16[176]=table32[176]=function(a){a.reg8[0]=JSCompiler_StaticMethods_read_imm8(a)};table16[177]=table32[177]=function(a){a.reg8[4]=JSCompiler_StaticMethods_read_imm8(a)};
table16[178]=table32[178]=function(a){a.reg8[8]=JSCompiler_StaticMethods_read_imm8(a)};table16[179]=table32[179]=function(a){a.reg8[12]=JSCompiler_StaticMethods_read_imm8(a)};table16[180]=table32[180]=function(a){a.reg8[1]=JSCompiler_StaticMethods_read_imm8(a)};table16[181]=table32[181]=function(a){a.reg8[5]=JSCompiler_StaticMethods_read_imm8(a)};table16[182]=table32[182]=function(a){a.reg8[9]=JSCompiler_StaticMethods_read_imm8(a)};table16[183]=table32[183]=function(a){a.reg8[13]=JSCompiler_StaticMethods_read_imm8(a)};
table16[184]=function(a){a.reg16[0]=JSCompiler_StaticMethods_read_imm16(a)};table32[184]=function(a){a.reg32s[0]=JSCompiler_StaticMethods_read_imm32s(a)};table16[185]=function(a){a.reg16[2]=JSCompiler_StaticMethods_read_imm16(a)};table32[185]=function(a){a.reg32s[1]=JSCompiler_StaticMethods_read_imm32s(a)};table16[186]=function(a){a.reg16[4]=JSCompiler_StaticMethods_read_imm16(a)};table32[186]=function(a){a.reg32s[2]=JSCompiler_StaticMethods_read_imm32s(a)};table16[187]=function(a){a.reg16[6]=JSCompiler_StaticMethods_read_imm16(a)};
table32[187]=function(a){a.reg32s[3]=JSCompiler_StaticMethods_read_imm32s(a)};table16[188]=function(a){a.reg16[8]=JSCompiler_StaticMethods_read_imm16(a)};table32[188]=function(a){a.reg32s[4]=JSCompiler_StaticMethods_read_imm32s(a)};table16[189]=function(a){a.reg16[10]=JSCompiler_StaticMethods_read_imm16(a)};table32[189]=function(a){a.reg32s[5]=JSCompiler_StaticMethods_read_imm32s(a)};table16[190]=function(a){a.reg16[12]=JSCompiler_StaticMethods_read_imm16(a)};
table32[190]=function(a){a.reg32s[6]=JSCompiler_StaticMethods_read_imm32s(a)};table16[191]=function(a){a.reg16[14]=JSCompiler_StaticMethods_read_imm16(a)};table32[191]=function(a){a.reg32s[7]=JSCompiler_StaticMethods_read_imm32s(a)};
table16[192]=table32[192]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e,f;192>b?(e=JSCompiler_StaticMethods_translate_address_write(a,a.modrm_resolve(b)),d=JSCompiler_StaticMethods_read8(a.memory,e)):d=a.reg8[b<<2&12|b>>2&1];f=0;c=JSCompiler_StaticMethods_read_imm8(a)&31;switch(b>>3&7){case 0:f=JSCompiler_StaticMethods_rol8(a,d,c);break;case 1:f=JSCompiler_StaticMethods_ror8(a,d,c);break;case 2:f=JSCompiler_StaticMethods_rcl8(a,d,c);break;case 3:f=JSCompiler_StaticMethods_rcr8(a,d,
c);break;case 4:f=JSCompiler_StaticMethods_shl8(a,d,c);break;case 5:f=JSCompiler_StaticMethods_shr8(a,d,c);break;case 6:f=JSCompiler_StaticMethods_shl8(a,d,c);break;case 7:f=JSCompiler_StaticMethods_sar8(a,d,c)}192>b?JSCompiler_StaticMethods_write8(a.memory,e,f):a.reg8[b<<2&12|b>>2&1]=f};
table16[193]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e,f=0,g;192>b?(c=a.modrm_resolve(b),e=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(f=JSCompiler_StaticMethods_translate_address_write(a,c+1),d=JSCompiler_StaticMethods_virt_boundary_read16(a,e,f)):d=JSCompiler_StaticMethods_read16(a.memory,e)):d=a.reg16[b<<1&14];g=0;c=JSCompiler_StaticMethods_read_imm8(a)&31;switch(b>>3&7){case 0:g=JSCompiler_StaticMethods_rol16(a,d,c);break;case 1:g=JSCompiler_StaticMethods_ror16(a,
d,c);break;case 2:g=JSCompiler_StaticMethods_rcl16(a,d,c);break;case 3:g=JSCompiler_StaticMethods_rcr16(a,d,c);break;case 4:g=JSCompiler_StaticMethods_shl16(a,d,c);break;case 5:g=JSCompiler_StaticMethods_shr16(a,d,c);break;case 6:g=JSCompiler_StaticMethods_shl16(a,d,c);break;case 7:g=JSCompiler_StaticMethods_sar16(a,d,c)}192>b?f?JSCompiler_StaticMethods_virt_boundary_write16(a,e,f,g):JSCompiler_StaticMethods_write16(a.memory,e,g):a.reg16[b<<1&14]=g};
table32[193]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e,f=0,g;192>b?(c=a.modrm_resolve(b),e=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(f=JSCompiler_StaticMethods_translate_address_write(a,c+3),d=JSCompiler_StaticMethods_virt_boundary_read32s(a,e,f)):d=JSCompiler_StaticMethods_read32s(a.memory,e)):d=a.reg32s[b&7];g=0;c=JSCompiler_StaticMethods_read_imm8(a)&31;switch(b>>3&7){case 0:g=JSCompiler_StaticMethods_rol32(a,d,c);break;case 1:g=JSCompiler_StaticMethods_ror32(a,
d,c);break;case 2:g=JSCompiler_StaticMethods_rcl32(a,d,c);break;case 3:g=JSCompiler_StaticMethods_rcr32(a,d,c);break;case 4:g=JSCompiler_StaticMethods_shl32(a,d,c);break;case 5:g=JSCompiler_StaticMethods_shr32(a,d,c);break;case 6:g=JSCompiler_StaticMethods_shl32(a,d,c);break;case 7:g=JSCompiler_StaticMethods_sar32(a,d,c)}192>b?f?JSCompiler_StaticMethods_virt_boundary_write32(a,e,f,g):JSCompiler_StaticMethods_write32(a.memory,e,g):a.reg32s[b&7]=g};
table16[194]=function(a){var b=JSCompiler_StaticMethods_read_imm16(a);a.instruction_pointer=a.segment_offsets[1]+JSCompiler_StaticMethods_pop16(a)|0;a.stack_reg[a.reg_vsp]+=b;a.last_instr_jump=!0};table32[194]=function(a){var b=JSCompiler_StaticMethods_read_imm16(a);a.instruction_pointer=a.segment_offsets[1]+JSCompiler_StaticMethods_pop32s(a)|0;a.stack_reg[a.reg_vsp]+=b;a.last_instr_jump=!0};
table16[195]=function(a){a.instruction_pointer=a.segment_offsets[1]+JSCompiler_StaticMethods_pop16(a)|0;a.last_instr_jump=!0};table32[195]=function(a){a.instruction_pointer=a.segment_offsets[1]+JSCompiler_StaticMethods_pop32s(a)|0;a.last_instr_jump=!0};table16[196]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192<=b&&JSCompiler_StaticMethods_trigger_ud(a);JSCompiler_StaticMethods_lss16(a,0,a.modrm_resolve(b),b>>2&14)};
table32[196]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192<=b&&JSCompiler_StaticMethods_trigger_ud(a);JSCompiler_StaticMethods_lss32(a,0,a.modrm_resolve(b),b>>3&7)};table16[197]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192<=b&&JSCompiler_StaticMethods_trigger_ud(a);JSCompiler_StaticMethods_lss16(a,3,a.modrm_resolve(b),b>>2&14)};
table32[197]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192<=b&&JSCompiler_StaticMethods_trigger_ud(a);JSCompiler_StaticMethods_lss32(a,3,a.modrm_resolve(b),b>>3&7)};table16[198]=table32[198]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=JSCompiler_StaticMethods_read_imm8(a);192>b?JSCompiler_StaticMethods_safe_write8(a,c,d):a.reg8[b<<2&12|b>>2&1]=d};
table16[199]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=JSCompiler_StaticMethods_read_imm16(a);192>b?JSCompiler_StaticMethods_safe_write16(a,c,d):a.reg16[b<<1&14]=d};table32[199]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=JSCompiler_StaticMethods_read_imm32s(a);192>b?JSCompiler_StaticMethods_safe_write32(a,c,d):a.reg32[b&7]=d};
table16[200]=function(a){var b=JSCompiler_StaticMethods_read_imm16(a),c=JSCompiler_StaticMethods_read_imm8(a)&31,d,e;JSCompiler_StaticMethods_push16(a,a.reg16[10]);d=a.reg16[8];if(0<c){e=a.reg16[5];for(var f=1;f<c;f++)e-=2,JSCompiler_StaticMethods_push16(a,JSCompiler_StaticMethods_safe_read16(a,a.segment_offsets[2]+e|0));JSCompiler_StaticMethods_push16(a,d)}a.reg16[10]=d;a.reg16[8]-=b};
table32[200]=function(a){var b=JSCompiler_StaticMethods_read_imm16(a),c=JSCompiler_StaticMethods_read_imm8(a)&31,d,e;JSCompiler_StaticMethods_push32(a,a.reg32s[5]);d=a.reg32s[4];if(0<c){e=a.reg32s[5];for(var f=1;f<c;f++)e-=4,JSCompiler_StaticMethods_push32(a,JSCompiler_StaticMethods_safe_read32s(a,a.segment_offsets[2]+e|0));JSCompiler_StaticMethods_push32(a,d)}a.reg32s[5]=d;a.reg32s[4]-=b};table16[201]=function(a){a.stack_reg[a.reg_vsp]=a.stack_reg[a.reg_vbp];a.reg16[10]=JSCompiler_StaticMethods_pop16(a)};
table32[201]=function(a){a.stack_reg[a.reg_vsp]=a.stack_reg[a.reg_vbp];a.reg32s[5]=JSCompiler_StaticMethods_pop32s(a)};table16[202]=function(a){JSCompiler_StaticMethods_translate_address_read(a,a.segment_offsets[2]+a.stack_reg[a.reg_vsp]+4);var b=JSCompiler_StaticMethods_read_imm16(a),c=JSCompiler_StaticMethods_pop16(a);JSCompiler_StaticMethods_switch_seg(a,1,JSCompiler_StaticMethods_pop16(a));a.instruction_pointer=a.segment_offsets[1]+c|0;a.stack_reg[a.reg_vsp]+=b;a.last_instr_jump=!0};
table32[202]=function(a){JSCompiler_StaticMethods_translate_address_read(a,a.segment_offsets[2]+a.stack_reg[a.reg_vsp]+8);var b=JSCompiler_StaticMethods_read_imm16(a),c=JSCompiler_StaticMethods_pop32s(a);JSCompiler_StaticMethods_switch_seg(a,1,JSCompiler_StaticMethods_pop32s(a)&65535);a.instruction_pointer=a.segment_offsets[1]+c|0;a.stack_reg[a.reg_vsp]+=b;a.last_instr_jump=!0};
table16[203]=function(a){JSCompiler_StaticMethods_translate_address_read(a,a.segment_offsets[2]+a.stack_reg[a.reg_vsp]+4);var b=JSCompiler_StaticMethods_pop16(a);JSCompiler_StaticMethods_switch_seg(a,1,JSCompiler_StaticMethods_pop16(a));a.instruction_pointer=a.segment_offsets[1]+b|0;a.last_instr_jump=!0};
table32[203]=function(a){JSCompiler_StaticMethods_translate_address_read(a,a.segment_offsets[2]+a.stack_reg[a.reg_vsp]+8);var b=JSCompiler_StaticMethods_pop32s(a);JSCompiler_StaticMethods_switch_seg(a,1,JSCompiler_StaticMethods_pop32s(a)&65535);a.instruction_pointer=a.segment_offsets[1]+b|0;a.last_instr_jump=!0};table16[204]=table32[204]=function(a){JSCompiler_StaticMethods_call_interrupt_vector(a,3,!0,!1)};
table16[205]=table32[205]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);JSCompiler_StaticMethods_call_interrupt_vector(a,b,!0,!1)};table16[206]=table32[206]=function(a){a.getof()&&JSCompiler_StaticMethods_call_interrupt_vector(a,4,!0,!1)};
table16[207]=function(a){if(!a.protected_mode||a.flags&131072&&3===(a.flags>>12&3)){var b=JSCompiler_StaticMethods_pop16(a);JSCompiler_StaticMethods_switch_seg(a,1,JSCompiler_StaticMethods_pop16(a));var c=JSCompiler_StaticMethods_pop16(a);a.instruction_pointer=b+a.segment_offsets[1]|0;JSCompiler_StaticMethods_update_eflags(a,c);JSCompiler_StaticMethods_handle_irqs(a)}else throw a.flags&131072&&JSCompiler_StaticMethods_trigger_gp(a,0),a.debug.unimpl("16 bit iret in protected mode");a.last_instr_jump=
!0};
table32[207]=function(a){a:if(!a.protected_mode||a.flags&131072&&3===(a.flags>>12&3)){var b=JSCompiler_StaticMethods_pop32s(a);JSCompiler_StaticMethods_switch_seg(a,1,JSCompiler_StaticMethods_pop32s(a)&65535);var c=JSCompiler_StaticMethods_pop32s(a);a.instruction_pointer=b+a.segment_offsets[1]|0;JSCompiler_StaticMethods_update_eflags(a,c);JSCompiler_StaticMethods_handle_irqs(a)}else{a.flags&131072&&JSCompiler_StaticMethods_trigger_gp(a,0);a.instruction_pointer=JSCompiler_StaticMethods_pop32s(a);a.sreg[1]=
JSCompiler_StaticMethods_pop32s(a);c=JSCompiler_StaticMethods_pop32s(a);if(c&131072){if(0===a.cpl){JSCompiler_StaticMethods_update_eflags(a,c);a.flags|=131072;JSCompiler_StaticMethods_switch_seg(a,1,a.sreg[1]);a.instruction_pointer=a.instruction_pointer+a.segment_offsets[1]|0;var b=JSCompiler_StaticMethods_pop32s(a),d=JSCompiler_StaticMethods_pop32s(a);JSCompiler_StaticMethods_switch_seg(a,0,JSCompiler_StaticMethods_pop32s(a)&65535);JSCompiler_StaticMethods_switch_seg(a,3,JSCompiler_StaticMethods_pop32s(a)&
65535);JSCompiler_StaticMethods_switch_seg(a,4,JSCompiler_StaticMethods_pop32s(a)&65535);JSCompiler_StaticMethods_switch_seg(a,5,JSCompiler_StaticMethods_pop32s(a)&65535);a.reg32s[4]=b;JSCompiler_StaticMethods_switch_seg(a,2,d&65535);a.cpl=3;JSCompiler_StaticMethods_update_cs_size(a,!1);break a}c&=-131073}var e=JSCompiler_StaticMethods_lookup_segment_selector(a,a.sreg[1]);if(e.is_null)throw a.debug.unimpl("is null");if(!e.is_present)throw a.debug.unimpl("not present");if(!e.is_executable)throw a.debug.unimpl("not exec");
if(e.rpl<a.cpl)throw a.debug.unimpl("rpl < cpl");if(e.dc_bit&&e.dpl>e.rpl)throw a.debug.unimpl("conforming and dpl > rpl");e.rpl>a.cpl?(b=JSCompiler_StaticMethods_pop32s(a),d=JSCompiler_StaticMethods_pop32s(a),a.reg32s[4]=b,JSCompiler_StaticMethods_update_eflags(a,c),a.cpl=e.rpl,JSCompiler_StaticMethods_switch_seg(a,2,d&65535),a.last_virt_eip=-1):JSCompiler_StaticMethods_update_eflags(a,c);e.size!==a.is_32&&JSCompiler_StaticMethods_update_cs_size(a,e.size);a.segment_limits[1]=e.effective_limit;a.segment_offsets[1]=
e.base;a.instruction_pointer=a.instruction_pointer+a.segment_offsets[1]|0;JSCompiler_StaticMethods_handle_irqs(a);a.last_instr_jump=!0}};
table16[208]=table32[208]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e;192>b?(d=JSCompiler_StaticMethods_translate_address_write(a,a.modrm_resolve(b)),c=JSCompiler_StaticMethods_read8(a.memory,d)):c=a.reg8[b<<2&12|b>>2&1];e=0;switch(b>>3&7){case 0:e=JSCompiler_StaticMethods_rol8(a,c,1);break;case 1:e=JSCompiler_StaticMethods_ror8(a,c,1);break;case 2:e=JSCompiler_StaticMethods_rcl8(a,c,1);break;case 3:e=JSCompiler_StaticMethods_rcr8(a,c,1);break;case 4:e=JSCompiler_StaticMethods_shl8(a,
c,1);break;case 5:e=JSCompiler_StaticMethods_shr8(a,c,1);break;case 6:e=JSCompiler_StaticMethods_shl8(a,c,1);break;case 7:e=JSCompiler_StaticMethods_sar8(a,c,1)}192>b?JSCompiler_StaticMethods_write8(a.memory,d,e):a.reg8[b<<2&12|b>>2&1]=e};
table16[209]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0,f;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,d,e)):c=JSCompiler_StaticMethods_read16(a.memory,d)):c=a.reg16[b<<1&14];f=0;switch(b>>3&7){case 0:f=JSCompiler_StaticMethods_rol16(a,c,1);break;case 1:f=JSCompiler_StaticMethods_ror16(a,c,1);break;case 2:f=
JSCompiler_StaticMethods_rcl16(a,c,1);break;case 3:f=JSCompiler_StaticMethods_rcr16(a,c,1);break;case 4:f=JSCompiler_StaticMethods_shl16(a,c,1);break;case 5:f=JSCompiler_StaticMethods_shr16(a,c,1);break;case 6:f=JSCompiler_StaticMethods_shl16(a,c,1);break;case 7:f=JSCompiler_StaticMethods_sar16(a,c,1)}192>b?e?JSCompiler_StaticMethods_virt_boundary_write16(a,d,e,f):JSCompiler_StaticMethods_write16(a.memory,d,f):a.reg16[b<<1&14]=f};
table32[209]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0,f;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,d,e)):c=JSCompiler_StaticMethods_read32s(a.memory,d)):c=a.reg32s[b&7];f=0;switch(b>>3&7){case 0:f=JSCompiler_StaticMethods_rol32(a,c,1);break;case 1:f=JSCompiler_StaticMethods_ror32(a,c,1);break;case 2:f=
JSCompiler_StaticMethods_rcl32(a,c,1);break;case 3:f=JSCompiler_StaticMethods_rcr32(a,c,1);break;case 4:f=JSCompiler_StaticMethods_shl32(a,c,1);break;case 5:f=JSCompiler_StaticMethods_shr32(a,c,1);break;case 6:f=JSCompiler_StaticMethods_shl32(a,c,1);break;case 7:f=JSCompiler_StaticMethods_sar32(a,c,1)}192>b?e?JSCompiler_StaticMethods_virt_boundary_write32(a,d,e,f):JSCompiler_StaticMethods_write32(a.memory,d,f):a.reg32s[b&7]=f};
table16[210]=table32[210]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e,f;192>b?(e=JSCompiler_StaticMethods_translate_address_write(a,a.modrm_resolve(b)),d=JSCompiler_StaticMethods_read8(a.memory,e)):d=a.reg8[b<<2&12|b>>2&1];f=0;c=a.reg8[4]&31;switch(b>>3&7){case 0:f=JSCompiler_StaticMethods_rol8(a,d,c);break;case 1:f=JSCompiler_StaticMethods_ror8(a,d,c);break;case 2:f=JSCompiler_StaticMethods_rcl8(a,d,c);break;case 3:f=JSCompiler_StaticMethods_rcr8(a,d,c);break;case 4:f=JSCompiler_StaticMethods_shl8(a,
d,c);break;case 5:f=JSCompiler_StaticMethods_shr8(a,d,c);break;case 6:f=JSCompiler_StaticMethods_shl8(a,d,c);break;case 7:f=JSCompiler_StaticMethods_sar8(a,d,c)}192>b?JSCompiler_StaticMethods_write8(a.memory,e,f):a.reg8[b<<2&12|b>>2&1]=f};
table16[211]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e,f=0,g;192>b?(c=a.modrm_resolve(b),e=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(f=JSCompiler_StaticMethods_translate_address_write(a,c+1),d=JSCompiler_StaticMethods_virt_boundary_read16(a,e,f)):d=JSCompiler_StaticMethods_read16(a.memory,e)):d=a.reg16[b<<1&14];g=0;c=a.reg8[4]&31;switch(b>>3&7){case 0:g=JSCompiler_StaticMethods_rol16(a,d,c);break;case 1:g=JSCompiler_StaticMethods_ror16(a,
d,c);break;case 2:g=JSCompiler_StaticMethods_rcl16(a,d,c);break;case 3:g=JSCompiler_StaticMethods_rcr16(a,d,c);break;case 4:g=JSCompiler_StaticMethods_shl16(a,d,c);break;case 5:g=JSCompiler_StaticMethods_shr16(a,d,c);break;case 6:g=JSCompiler_StaticMethods_shl16(a,d,c);break;case 7:g=JSCompiler_StaticMethods_sar16(a,d,c)}192>b?f?JSCompiler_StaticMethods_virt_boundary_write16(a,e,f,g):JSCompiler_StaticMethods_write16(a.memory,e,g):a.reg16[b<<1&14]=g};
table32[211]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e,f=0,g;192>b?(c=a.modrm_resolve(b),e=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(f=JSCompiler_StaticMethods_translate_address_write(a,c+3),d=JSCompiler_StaticMethods_virt_boundary_read32s(a,e,f)):d=JSCompiler_StaticMethods_read32s(a.memory,e)):d=a.reg32s[b&7];g=0;c=a.reg8[4]&31;switch(b>>3&7){case 0:g=JSCompiler_StaticMethods_rol32(a,d,c);break;case 1:g=JSCompiler_StaticMethods_ror32(a,d,
c);break;case 2:g=JSCompiler_StaticMethods_rcl32(a,d,c);break;case 3:g=JSCompiler_StaticMethods_rcr32(a,d,c);break;case 4:g=JSCompiler_StaticMethods_shl32(a,d,c);break;case 5:g=JSCompiler_StaticMethods_shr32(a,d,c);break;case 6:g=JSCompiler_StaticMethods_shl32(a,d,c);break;case 7:g=JSCompiler_StaticMethods_sar32(a,d,c)}192>b?f?JSCompiler_StaticMethods_virt_boundary_write32(a,e,f,g):JSCompiler_StaticMethods_write32(a.memory,e,g):a.reg32s[b&7]=g};
table16[212]=table32[212]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(0===b)JSCompiler_StaticMethods_trigger_de(a);else{var c=a.reg8[0];a.reg8[1]=c/b;a.reg8[0]=c%b;a.last_result=a.reg8[0];a.flags_changed=196;a.flags&=-2066}};table16[213]=table32[213]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);a.last_result=a.reg8[0]+a.reg8[1]*b;a.reg16[0]=a.last_result&255;a.last_op_size=7;a.flags_changed=196;a.flags&=-2066};table16[214]=table32[214]=function(a){a.reg8[0]=-a.getcf()};
table16[215]=table32[215]=function(a){a.reg8[0]=a.address_size_32?JSCompiler_StaticMethods_safe_read8(a,JSCompiler_StaticMethods_get_seg_prefix(a,3)+a.reg32s[3]+a.reg8[0]):JSCompiler_StaticMethods_safe_read8(a,JSCompiler_StaticMethods_get_seg_prefix(a,3)+a.reg16[6]+a.reg8[0])};
table16[216]=table32[216]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);a.cr0&12&&JSCompiler_StaticMethods_trigger_nm(a);if(192>b){var c=a.fpu;a=a.modrm_resolve(b);b=b>>3&7;a=JSCompiler_StaticMethods__load_m32(c,a);var d=JSCompiler_StaticMethods__get_st0(c);switch(b){case 0:c._st[c._stack_ptr]=d+a;break;case 1:c._st[c._stack_ptr]=d*a;break;case 2:JSCompiler_StaticMethods__fcom(c,a);break;case 3:JSCompiler_StaticMethods__fcom(c,a);JSCompiler_StaticMethods__pop(c);break;case 4:c._st[c._stack_ptr]=
d-a;break;case 5:c._st[c._stack_ptr]=a-d;break;case 6:c._st[c._stack_ptr]=d/a;break;case 7:c._st[c._stack_ptr]=a/d}}else switch(c=a.fpu,a=b>>3&7,b=JSCompiler_StaticMethods__get_sti(c,b&7),d=JSCompiler_StaticMethods__get_st0(c),a){case 0:c._st[c._stack_ptr]=d+b;break;case 1:c._st[c._stack_ptr]=d*b;break;case 2:JSCompiler_StaticMethods__fcom(c,b);break;case 3:JSCompiler_StaticMethods__fcom(c,b);JSCompiler_StaticMethods__pop(c);break;case 4:c._st[c._stack_ptr]=d-b;break;case 5:c._st[c._stack_ptr]=b-
d;break;case 6:c._st[c._stack_ptr]=d/b;break;case 7:c._st[c._stack_ptr]=b/d}};
table16[217]=table32[217]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);a.cr0&12&&JSCompiler_StaticMethods_trigger_nm(a);if(192>b){var c=a.fpu;a=a.modrm_resolve(b);switch(b>>3&7){case 0:b=JSCompiler_StaticMethods__load_m32(c,a);JSCompiler_StaticMethods__push(c,b);break;case 1:JSCompiler_StaticMethods__fpu_unimpl(c);break;case 2:b=JSCompiler_StaticMethods__get_st0(c);c.float32[0]=b;JSCompiler_StaticMethods_safe_write32(c.cpu,a,c.float32_int[0]);break;case 3:b=JSCompiler_StaticMethods__get_st0(c);
c.float32[0]=b;JSCompiler_StaticMethods_safe_write32(c.cpu,a,c.float32_int[0]);JSCompiler_StaticMethods__pop(c);break;case 4:JSCompiler_StaticMethods__fldenv(c,a);break;case 5:c._control_word=JSCompiler_StaticMethods_safe_read16(c.cpu,a);break;case 6:JSCompiler_StaticMethods__fstenv(c,a);break;case 7:JSCompiler_StaticMethods_safe_write16(c.cpu,a,c._control_word)}}else switch(c=a.fpu,a=b&7,b>>3&7){case 0:b=JSCompiler_StaticMethods__get_sti(c,a);JSCompiler_StaticMethods__push(c,b);break;case 1:b=JSCompiler_StaticMethods__get_sti(c,
a);c._st[c._stack_ptr+a&7]=JSCompiler_StaticMethods__get_st0(c);c._st[c._stack_ptr]=b;break;case 2:switch(a){case 0:break;default:JSCompiler_StaticMethods__fpu_unimpl(c)}break;case 3:JSCompiler_StaticMethods__fpu_unimpl(c);break;case 4:b=JSCompiler_StaticMethods__get_st0(c);switch(a){case 0:c._st[c._stack_ptr]=-b;break;case 1:c._st[c._stack_ptr]=Math.abs(b);break;case 4:c._status_word&=-18177;isNaN(b)?c._status_word|=17664:0===b?c._status_word|=16384:0>b&&(c._status_word|=256);break;case 5:c._status_word&=
-18177;c._status_word|=c._st8[(c._stack_ptr+0&7)<<3|7]>>7<<9;c._status_word=c._stack_empty>>c._stack_ptr&1?c._status_word|16640:isNaN(b)?c._status_word|256:0===b?c._status_word|16384:Infinity===b||-Infinity===b?c._status_word|1280:c._status_word|1024;break;default:JSCompiler_StaticMethods__fpu_unimpl(c)}break;case 5:JSCompiler_StaticMethods__push(c,c.constants[a]);break;case 6:b=JSCompiler_StaticMethods__get_st0(c);switch(a){case 0:c._st[c._stack_ptr]=Math.pow(2,b)-1;break;case 1:c._st[c._stack_ptr+
1&7]=JSCompiler_StaticMethods__get_sti(c,1)*Math.log(b)/Math.LN2;JSCompiler_StaticMethods__pop(c);break;case 2:c._st[c._stack_ptr]=Math.tan(b);JSCompiler_StaticMethods__push(c,1);break;case 3:c._st[c._stack_ptr+1&7]=Math.atan2(JSCompiler_StaticMethods__get_sti(c,1),b);JSCompiler_StaticMethods__pop(c);break;case 4:JSCompiler_StaticMethods__fpu_unimpl(c);break;case 5:c._st[c._stack_ptr]=b%JSCompiler_StaticMethods__get_sti(c,1);break;case 6:JSCompiler_StaticMethods__fpu_unimpl(c);break;case 7:JSCompiler_StaticMethods__fpu_unimpl(c)}break;
case 7:switch(b=JSCompiler_StaticMethods__get_st0(c),a){case 0:c._st[c._stack_ptr]=b%JSCompiler_StaticMethods__get_sti(c,1);break;case 1:c._st[c._stack_ptr+1&7]=JSCompiler_StaticMethods__get_sti(c,1)*Math.log(b+1)/Math.LN2;JSCompiler_StaticMethods__pop(c);break;case 2:c._st[c._stack_ptr]=Math.sqrt(b);break;case 3:c._st[c._stack_ptr]=Math.sin(b);JSCompiler_StaticMethods__push(c,Math.cos(b));break;case 4:c._st[c._stack_ptr]=JSCompiler_StaticMethods__integer_round(c,b);break;case 5:c._st[c._stack_ptr]=
b*Math.pow(2,JSCompiler_StaticMethods__truncate(JSCompiler_StaticMethods__get_sti(c,1)));break;case 6:c._st[c._stack_ptr]=Math.sin(b);break;case 7:c._st[c._stack_ptr]=Math.cos(b)}}};
table16[218]=table32[218]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);a.cr0&12&&JSCompiler_StaticMethods_trigger_nm(a);if(192>b){var c=a.fpu;a=a.modrm_resolve(b);b=b>>3&7;a=JSCompiler_StaticMethods_safe_read32s(c.cpu,a);var d=JSCompiler_StaticMethods__get_st0(c);switch(b){case 0:c._st[c._stack_ptr]=d+a;break;case 1:c._st[c._stack_ptr]=d*a;break;case 2:JSCompiler_StaticMethods__fcom(c,a);break;case 3:JSCompiler_StaticMethods__fcom(c,a);JSCompiler_StaticMethods__pop(c);break;case 4:c._st[c._stack_ptr]=
d-a;break;case 5:c._st[c._stack_ptr]=a-d;break;case 6:c._st[c._stack_ptr]=d/a;break;case 7:c._st[c._stack_ptr]=a/d}}else switch(c=a.fpu,a=b&7,b>>3&7){case 0:c.cpu.test_b()&&(c._st[c._stack_ptr]=JSCompiler_StaticMethods__get_sti(c,a),c._stack_empty&=~(1<<c._stack_ptr));break;case 1:c.cpu.test_z()&&(c._st[c._stack_ptr]=JSCompiler_StaticMethods__get_sti(c,a),c._stack_empty&=~(1<<c._stack_ptr));break;case 2:JSCompiler_StaticMethods_test_be(c.cpu)&&(c._st[c._stack_ptr]=JSCompiler_StaticMethods__get_sti(c,
a),c._stack_empty&=~(1<<c._stack_ptr));break;case 3:c.cpu.test_p()&&(c._st[c._stack_ptr]=JSCompiler_StaticMethods__get_sti(c,a),c._stack_empty&=~(1<<c._stack_ptr));break;case 5:1===a?(b=JSCompiler_StaticMethods__get_sti(c,1),JSCompiler_StaticMethods__fcom(c,b),JSCompiler_StaticMethods__pop(c),JSCompiler_StaticMethods__pop(c)):JSCompiler_StaticMethods__fpu_unimpl(c);break;default:JSCompiler_StaticMethods__fpu_unimpl(c)}};
table16[219]=table32[219]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);a.cr0&12&&JSCompiler_StaticMethods_trigger_nm(a);if(192>b){var c=a.fpu;a=a.modrm_resolve(b);switch(b>>3&7){case 0:b=JSCompiler_StaticMethods_safe_read32s(c.cpu,a);JSCompiler_StaticMethods__push(c,b);break;case 2:b=JSCompiler_StaticMethods__integer_round(c,JSCompiler_StaticMethods__get_st0(c));2147483647>=b&&-2147483648<=b?JSCompiler_StaticMethods_safe_write32(c.cpu,a,b):(JSCompiler_StaticMethods__invalid_arithmatic(c),
JSCompiler_StaticMethods_safe_write32(c.cpu,a,-2147483648));break;case 3:b=JSCompiler_StaticMethods__integer_round(c,JSCompiler_StaticMethods__get_st0(c));2147483647>=b&&-2147483648<=b?JSCompiler_StaticMethods_safe_write32(c.cpu,a,b):(JSCompiler_StaticMethods__invalid_arithmatic(c),JSCompiler_StaticMethods_safe_write32(c.cpu,a,-2147483648));JSCompiler_StaticMethods__pop(c);break;case 5:JSCompiler_StaticMethods__push(c,JSCompiler_StaticMethods__load_m80(c,a));break;case 7:JSCompiler_StaticMethods_writable_or_pagefault(c.cpu,
a,10);JSCompiler_StaticMethods__store_m80(c,a,0);JSCompiler_StaticMethods__pop(c);break;default:JSCompiler_StaticMethods__fpu_unimpl(c)}}else switch(c=a.fpu,a=b&7,b>>3&7){case 0:c.cpu.test_b()||(c._st[c._stack_ptr]=JSCompiler_StaticMethods__get_sti(c,a),c._stack_empty&=~(1<<c._stack_ptr));break;case 1:c.cpu.test_z()||(c._st[c._stack_ptr]=JSCompiler_StaticMethods__get_sti(c,a),c._stack_empty&=~(1<<c._stack_ptr));break;case 2:JSCompiler_StaticMethods_test_be(c.cpu)||(c._st[c._stack_ptr]=JSCompiler_StaticMethods__get_sti(c,
a),c._stack_empty&=~(1<<c._stack_ptr));break;case 3:c.cpu.test_p()||(c._st[c._stack_ptr]=JSCompiler_StaticMethods__get_sti(c,a),c._stack_empty&=~(1<<c._stack_ptr));break;case 4:227===b?JSCompiler_StaticMethods__finit(c):228!==b&&225!==b&&(226===b?c._status_word=0:JSCompiler_StaticMethods__fpu_unimpl(c));break;case 5:b=JSCompiler_StaticMethods__get_sti(c,a);JSCompiler_StaticMethods__fcomi(c,b);break;case 6:JSCompiler_StaticMethods__fcomi(c,JSCompiler_StaticMethods__get_sti(c,a));break;default:JSCompiler_StaticMethods__fpu_unimpl(c)}};
table16[220]=table32[220]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);a.cr0&12&&JSCompiler_StaticMethods_trigger_nm(a);if(192>b){var c=a.fpu,d=a.modrm_resolve(b);a=b>>3&7;b=JSCompiler_StaticMethods__load_m64(c,d);d=JSCompiler_StaticMethods__get_st0(c);switch(a){case 0:c._st[c._stack_ptr]=d+b;break;case 1:c._st[c._stack_ptr]=d*b;break;case 2:JSCompiler_StaticMethods__fcom(c,b);break;case 3:JSCompiler_StaticMethods__fcom(c,b);JSCompiler_StaticMethods__pop(c);break;case 4:c._st[c._stack_ptr]=
d-b;break;case 5:c._st[c._stack_ptr]=b-d;break;case 6:c._st[c._stack_ptr]=d/b;break;case 7:c._st[c._stack_ptr]=b/d}}else{c=a.fpu;a=b>>3&7;var d=b&7,b=c._stack_ptr+d&7,d=JSCompiler_StaticMethods__get_sti(c,d),e=JSCompiler_StaticMethods__get_st0(c);switch(a){case 0:c._st[b]=d+e;break;case 1:c._st[b]=d*e;break;case 2:JSCompiler_StaticMethods__fcom(c,d);break;case 3:JSCompiler_StaticMethods__fcom(c,d);JSCompiler_StaticMethods__pop(c);break;case 4:c._st[b]=e-d;break;case 5:c._st[b]=d-e;break;case 6:c._st[b]=
e/d;break;case 7:c._st[b]=d/e}}};
table16[221]=table32[221]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);a.cr0&12&&JSCompiler_StaticMethods_trigger_nm(a);if(192>b){var c=a.fpu;a=a.modrm_resolve(b);switch(b>>3&7){case 0:b=JSCompiler_StaticMethods__load_m64(c,a);JSCompiler_StaticMethods__push(c,b);break;case 1:JSCompiler_StaticMethods__fpu_unimpl(c);break;case 2:JSCompiler_StaticMethods__store_m64(c,a);break;case 3:JSCompiler_StaticMethods__store_m64(c,a);JSCompiler_StaticMethods__pop(c);break;case 4:b=a;JSCompiler_StaticMethods__fldenv(c,
b);b+=28;for(a=0;8>a;a++)c._st[a]=JSCompiler_StaticMethods__load_m80(c,b),b+=10;break;case 5:JSCompiler_StaticMethods__fpu_unimpl(c);break;case 6:b=a;JSCompiler_StaticMethods_writable_or_pagefault(c.cpu,b,108);JSCompiler_StaticMethods__fstenv(c,b);b+=28;for(a=0;8>a;a++)JSCompiler_StaticMethods__store_m80(c,b,a-c._stack_ptr&7),b+=10;JSCompiler_StaticMethods__finit(c);break;case 7:JSCompiler_StaticMethods_safe_write16(c.cpu,a,c._status_word&-14337|c._stack_ptr<<11)}}else switch(c=a.fpu,a=b&7,b>>3&7){case 0:c._stack_empty|=
1<<(c._stack_ptr+a&7);break;case 2:c._st[c._stack_ptr+a&7]=JSCompiler_StaticMethods__get_st0(c);break;case 3:0!==a&&(c._st[c._stack_ptr+a&7]=JSCompiler_StaticMethods__get_st0(c));JSCompiler_StaticMethods__pop(c);break;case 4:b=JSCompiler_StaticMethods__get_sti(c,a);JSCompiler_StaticMethods__fcom(c,b);break;case 5:b=JSCompiler_StaticMethods__get_sti(c,a);JSCompiler_StaticMethods__fcom(c,b);JSCompiler_StaticMethods__pop(c);break;default:JSCompiler_StaticMethods__fpu_unimpl(c)}};
table16[222]=table32[222]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);a.cr0&12&&JSCompiler_StaticMethods_trigger_nm(a);if(192>b){var c=a.fpu,d=a.modrm_resolve(b);a=b>>3&7;b=JSCompiler_StaticMethods_safe_read16(c.cpu,d)<<16>>16;d=JSCompiler_StaticMethods__get_st0(c);switch(a){case 0:c._st[c._stack_ptr]=d+b;break;case 1:c._st[c._stack_ptr]=d*b;break;case 2:JSCompiler_StaticMethods__fcom(c,b);break;case 3:JSCompiler_StaticMethods__fcom(c,b);JSCompiler_StaticMethods__pop(c);break;case 4:c._st[c._stack_ptr]=
d-b;break;case 5:c._st[c._stack_ptr]=b-d;break;case 6:c._st[c._stack_ptr]=d/b;break;case 7:c._st[c._stack_ptr]=b/d}}else{c=a.fpu;a=b>>3&7;var b=b&7,d=c._stack_ptr+b&7,e=JSCompiler_StaticMethods__get_sti(c,b),f=JSCompiler_StaticMethods__get_st0(c);switch(a){case 0:c._st[d]=e+f;break;case 1:c._st[d]=e*f;break;case 2:JSCompiler_StaticMethods__fcom(c,e);break;case 3:1===b?(JSCompiler_StaticMethods__fcom(c,c._st[d]),JSCompiler_StaticMethods__pop(c)):JSCompiler_StaticMethods__fpu_unimpl(c);break;case 4:c._st[d]=
f-e;break;case 5:c._st[d]=e-f;break;case 6:c._st[d]=f/e;break;case 7:c._st[d]=e/f}JSCompiler_StaticMethods__pop(c)}};
table16[223]=table32[223]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);a.cr0&12&&JSCompiler_StaticMethods_trigger_nm(a);if(192>b){var c=a.fpu;a=a.modrm_resolve(b);switch(b>>3&7){case 0:a=JSCompiler_StaticMethods_safe_read16(c.cpu,a)<<16>>16;JSCompiler_StaticMethods__push(c,a);break;case 1:JSCompiler_StaticMethods__fpu_unimpl(c);break;case 2:b=JSCompiler_StaticMethods__integer_round(c,JSCompiler_StaticMethods__get_st0(c));32767>=b&&-32768<=b?JSCompiler_StaticMethods_safe_write16(c.cpu,a,
b):(JSCompiler_StaticMethods__invalid_arithmatic(c),JSCompiler_StaticMethods_safe_write16(c.cpu,a,32768));break;case 3:b=JSCompiler_StaticMethods__integer_round(c,JSCompiler_StaticMethods__get_st0(c));32767>=b&&-32768<=b?JSCompiler_StaticMethods_safe_write16(c.cpu,a,b):(JSCompiler_StaticMethods__invalid_arithmatic(c),JSCompiler_StaticMethods_safe_write16(c.cpu,a,32768));JSCompiler_StaticMethods__pop(c);break;case 4:JSCompiler_StaticMethods__fpu_unimpl(c);break;case 5:b=JSCompiler_StaticMethods_safe_read32s(c.cpu,
a)>>>0;a=JSCompiler_StaticMethods_safe_read32s(c.cpu,a+4)>>>0;b+=4294967296*a;a>>31&&(b-=0);JSCompiler_StaticMethods__push(c,b);break;case 6:JSCompiler_StaticMethods__fpu_unimpl(c);break;case 7:JSCompiler_StaticMethods_writable_or_pagefault(c.cpu,a,8);var b=JSCompiler_StaticMethods__integer_round(c,JSCompiler_StaticMethods__get_st0(c)),d,e;-9223372036854775E3>b&&9223372036854775E3<=b?(d=b|0,e=b/4294967296|0,0===e&&0>b&&(e=-1)):(d=0,e=-2147483648,JSCompiler_StaticMethods__invalid_arithmatic(c));JSCompiler_StaticMethods_safe_write32(c.cpu,
a,d);JSCompiler_StaticMethods_safe_write32(c.cpu,a+4,e);JSCompiler_StaticMethods__pop(c)}}else switch(c=a.fpu,a=b&7,b>>3&7){case 4:224===b?c.cpu.reg16[0]=c._status_word&-14337|c._stack_ptr<<11:JSCompiler_StaticMethods__fpu_unimpl(c);break;case 5:a=JSCompiler_StaticMethods__get_sti(c,a);JSCompiler_StaticMethods__fcomi(c,a);JSCompiler_StaticMethods__pop(c);break;case 6:JSCompiler_StaticMethods__fcomi(c,JSCompiler_StaticMethods__get_sti(c,a));JSCompiler_StaticMethods__pop(c);break;default:JSCompiler_StaticMethods__fpu_unimpl(c)}};
table16[224]=table32[224]=function(a){if(--a.regv[a.reg_vcx]&&!a.getzf()){var b=JSCompiler_StaticMethods_read_imm8s(a);a.instruction_pointer=a.instruction_pointer+b|0}else a.instruction_pointer++;a.last_instr_jump=!0};table16[225]=table32[225]=function(a){if(--a.regv[a.reg_vcx]&&a.getzf()){var b=JSCompiler_StaticMethods_read_imm8s(a);a.instruction_pointer=a.instruction_pointer+b|0}else a.instruction_pointer++;a.last_instr_jump=!0};table16[226]=table32[226]=function(a){a.loop()};
table16[227]=table32[227]=function(a){var b=JSCompiler_StaticMethods_read_imm8s(a);0===a.regv[a.reg_vcx]&&(a.instruction_pointer=a.instruction_pointer+b|0);a.last_instr_jump=!0};table16[228]=table32[228]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);JSCompiler_StaticMethods_test_privileges_for_io(a,b,1);a.reg8[0]=a.io.port_read8(b)};table16[229]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);JSCompiler_StaticMethods_test_privileges_for_io(a,b,2);a.reg16[0]=a.io.port_read16(b)};
table32[229]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);JSCompiler_StaticMethods_test_privileges_for_io(a,b,4);a.reg32s[0]=a.io.port_read32(b)};table16[230]=table32[230]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);JSCompiler_StaticMethods_test_privileges_for_io(a,b,1);a.io.port_write8(b,a.reg8[0])};table16[231]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);JSCompiler_StaticMethods_test_privileges_for_io(a,b,2);a.io.port_write16(b,a.reg16[0])};
table32[231]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);JSCompiler_StaticMethods_test_privileges_for_io(a,b,4);a.io.port_write32(b,a.reg32s[0])};table16[232]=function(a){var b=JSCompiler_StaticMethods_read_imm16(a)<<16>>16;JSCompiler_StaticMethods_push16(a,JSCompiler_StaticMethods_get_real_eip(a));JSCompiler_StaticMethods_jmp_rel16(a,b);a.last_instr_jump=!0};
table32[232]=function(a){var b=JSCompiler_StaticMethods_read_imm32s(a);JSCompiler_StaticMethods_push32(a,JSCompiler_StaticMethods_get_real_eip(a));a.instruction_pointer=a.instruction_pointer+b|0;a.last_instr_jump=!0};table16[233]=function(a){var b=JSCompiler_StaticMethods_read_imm16(a)<<16>>16;JSCompiler_StaticMethods_jmp_rel16(a,b);a.last_instr_jump=!0};table32[233]=function(a){var b=JSCompiler_StaticMethods_read_imm32s(a);a.instruction_pointer=a.instruction_pointer+b|0;a.last_instr_jump=!0};
table16[234]=function(a){var b=JSCompiler_StaticMethods_read_imm16(a);JSCompiler_StaticMethods_switch_seg(a,1,JSCompiler_StaticMethods_read_imm16(a));a.instruction_pointer=b+a.segment_offsets[1]|0;a.last_instr_jump=!0};table32[234]=function(a){var b=JSCompiler_StaticMethods_read_imm32s(a);JSCompiler_StaticMethods_switch_seg(a,1,JSCompiler_StaticMethods_read_imm16(a));a.instruction_pointer=b+a.segment_offsets[1]|0;a.last_instr_jump=!0};
table16[235]=table32[235]=function(a){var b=JSCompiler_StaticMethods_read_imm8s(a);a.instruction_pointer=a.instruction_pointer+b|0;a.last_instr_jump=!0};table16[236]=table32[236]=function(a){var b=a.reg16[4];JSCompiler_StaticMethods_test_privileges_for_io(a,b,1);a.reg8[0]=a.io.port_read8(b)};table16[237]=function(a){var b=a.reg16[4];JSCompiler_StaticMethods_test_privileges_for_io(a,b,2);a.reg16[0]=a.io.port_read16(b)};
table32[237]=function(a){var b=a.reg16[4];JSCompiler_StaticMethods_test_privileges_for_io(a,b,4);a.reg32s[0]=a.io.port_read32(b)};table16[238]=table32[238]=function(a){var b=a.reg16[4];JSCompiler_StaticMethods_test_privileges_for_io(a,b,1);a.io.port_write8(b,a.reg8[0])};table16[239]=function(a){var b=a.reg16[4];JSCompiler_StaticMethods_test_privileges_for_io(a,b,2);a.io.port_write16(b,a.reg16[0])};
table32[239]=function(a){var b=a.reg16[4];JSCompiler_StaticMethods_test_privileges_for_io(a,b,4);a.io.port_write32(b,a.reg32s[0])};table16[240]=table32[240]=function(a){a.table[JSCompiler_StaticMethods_read_imm8(a)](a)};table16[241]=table32[241]=function(a){throw a.debug.unimpl("int1 instruction");};table16[242]=table32[242]=function(a){a.repeat_string_prefix=1;a.table[JSCompiler_StaticMethods_read_imm8(a)](a);a.repeat_string_prefix=0};
table16[243]=table32[243]=function(a){a.repeat_string_prefix=2;a.table[JSCompiler_StaticMethods_read_imm8(a)](a);a.repeat_string_prefix=0};table16[244]=table32[244]=function(a){a.cpl&&JSCompiler_StaticMethods_trigger_gp(a,0);if(0===(a.flags&512))throw a.debug.show("cpu halted"),a.stopped=!0,"HALT";a.in_hlt=!0;throw 233495534;};table16[245]=table32[245]=function(a){a.flags=(a.flags|1)^a.getcf();a.flags_changed&=-2};
table16[246]=table32[246]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);switch(b>>3&7){case 0:var c=192>b?JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b)):a.reg8[b<<2&12|b>>2&1];JSCompiler_StaticMethods_and(a,c,JSCompiler_StaticMethods_read_imm8(a),7);break;case 1:c=192>b?JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b)):a.reg8[b<<2&12|b>>2&1];JSCompiler_StaticMethods_and(a,c,JSCompiler_StaticMethods_read_imm8(a),7);break;case 2:var d;192>b?(d=JSCompiler_StaticMethods_translate_address_write(a,
a.modrm_resolve(b)),c=JSCompiler_StaticMethods_read8(a.memory,d)):c=a.reg8[b<<2&12|b>>2&1];c=~c;192>b?JSCompiler_StaticMethods_write8(a.memory,d,c):a.reg8[b<<2&12|b>>2&1]=c;break;case 3:192>b?(d=JSCompiler_StaticMethods_translate_address_write(a,a.modrm_resolve(b)),c=JSCompiler_StaticMethods_read8(a.memory,d)):c=a.reg8[b<<2&12|b>>2&1];c=JSCompiler_StaticMethods_neg(a,c,7);192>b?JSCompiler_StaticMethods_write8(a.memory,d,c):a.reg8[b<<2&12|b>>2&1]=c;break;case 4:c=192>b?JSCompiler_StaticMethods_safe_read8(a,
a.modrm_resolve(b)):a.reg8[b<<2&12|b>>2&1];b=c*a.reg8[0];a.reg16[0]=b;a.flags=256>b?a.flags&-2050:a.flags|2049;a.flags_changed=0;break;case 5:192>b?c=JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b))<<24>>24:c=a.reg8s[b<<2&12|b>>2&1];b=c*a.reg8s[0];a.reg16[0]=b;a.flags=127<b||-128>b?a.flags|2049:a.flags&-2050;a.flags_changed=0;break;case 6:b=c=192>b?JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b)):a.reg8[b<<2&12|b>>2&1];d=a.reg16[0];c=d/b|0;256<=c||0===b?JSCompiler_StaticMethods_trigger_de(a):
(a.reg8[0]=c,a.reg8[1]=d%b);break;case 7:192>b?c=JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b))<<24>>24:c=a.reg8s[b<<2&12|b>>2&1],b=c,d=a.reg16s[0],c=d/b|0,128<=c||-129>=c||0===b?JSCompiler_StaticMethods_trigger_de(a):(a.reg8[0]=c,a.reg8[1]=d%b)}};
table16[247]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);switch(b>>3&7){case 0:var c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];JSCompiler_StaticMethods_and(a,c,JSCompiler_StaticMethods_read_imm16(a),15);break;case 1:c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];JSCompiler_StaticMethods_and(a,c,JSCompiler_StaticMethods_read_imm16(a),15);break;case 2:var d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,
c),a.paging&&4095===(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,d,e)):c=JSCompiler_StaticMethods_read16(a.memory,d)):c=a.reg16[b<<1&14];c=~c;192>b?e?JSCompiler_StaticMethods_virt_boundary_write16(a,d,e,c):JSCompiler_StaticMethods_write16(a.memory,d,c):a.reg16[b<<1&14]=c;break;case 3:e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,
c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,d,e)):c=JSCompiler_StaticMethods_read16(a.memory,d)):c=a.reg16[b<<1&14];c=JSCompiler_StaticMethods_neg(a,c,15);192>b?e?JSCompiler_StaticMethods_virt_boundary_write16(a,d,e,c):JSCompiler_StaticMethods_write16(a.memory,d,c):a.reg16[b<<1&14]=c;break;case 4:c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];b=c*a.reg16[0];d=b>>>16;a.reg16[0]=b;a.reg16[4]=d;a.flags=0===d?a.flags&-2050:a.flags|2049;a.flags_changed=0;
break;case 5:192>b?c=JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b))<<16>>16:c=a.reg16s[b<<1&14];b=c*a.reg16s[0];a.reg16[0]=b;a.reg16[4]=b>>16;a.flags=32767<b||-32768>b?a.flags|2049:a.flags&-2050;a.flags_changed=0;break;case 6:b=c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];d=(a.reg16[0]|a.reg16[4]<<16)>>>0;e=d/b|0;65536<=e||0>e||0===b?JSCompiler_StaticMethods_trigger_de(a):(a.reg16[0]=e,a.reg16[4]=d%b);break;case 7:192>b?c=JSCompiler_StaticMethods_safe_read16(a,
a.modrm_resolve(b))<<16>>16:c=a.reg16s[b<<1&14],b=c,d=a.reg16[0]|a.reg16[4]<<16,e=d/b|0,32768<=e||-32769>=e||0===b?JSCompiler_StaticMethods_trigger_de(a):(a.reg16[0]=e,a.reg16[4]=d%b)}};
table32[247]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);switch(b>>3&7){case 0:var c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];JSCompiler_StaticMethods_and(a,c,JSCompiler_StaticMethods_read_imm32s(a),31);break;case 1:c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];JSCompiler_StaticMethods_and(a,c,JSCompiler_StaticMethods_read_imm32s(a),31);break;case 2:var d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,
c),a.paging&&4093<=(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,d,e)):c=JSCompiler_StaticMethods_read32s(a.memory,d)):c=a.reg32s[b&7];c=~c;192>b?e?JSCompiler_StaticMethods_virt_boundary_write32(a,d,e,c):JSCompiler_StaticMethods_write32(a.memory,d,c):a.reg32s[b&7]=c;break;case 3:e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,
c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,d,e)):c=JSCompiler_StaticMethods_read32s(a.memory,d)):c=a.reg32s[b&7];c=JSCompiler_StaticMethods_neg(a,c,31);192>b?e?JSCompiler_StaticMethods_virt_boundary_write32(a,d,e,c):JSCompiler_StaticMethods_write32(a.memory,d,c):a.reg32s[b&7]=c;break;case 4:192>b?c=JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b))>>>0:c=a.reg32[b&7];d=a.reg32s[0];b=d&65535;d=d>>>16;var f=c&65535,c=c>>>16,e=b*f,f=(e>>>16)+(d*f|0)|0,g=f>>>16,f=(f&65535)+(b*c|
0)|0,g=((f>>>16)+(d*c|0)|0)+g|0;a.reg32s[0]=f<<16|e&65535;a.reg32s[2]=g;a.flags=0===g?a.flags&-2050:a.flags|2049;a.flags_changed=0;break;case 5:e=c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];d=a.reg32s[0];b=!1;0>d&&(b=!0,d=-d|0);0>e&&(b=!b,e=-e|0);c=d&65535;d=d>>>16;var g=e&65535,e=e>>>16,f=c*g,g=(f>>>16)+(d*g|0)|0,k=g>>>16,g=(g&65535)+(c*e|0)|0,f=g<<16|f&65535,k=((g>>>16)+(d*e|0)|0)+k|0;b&&(f=-f|0,k=~k+!f|0);a.reg32s[0]=f;a.reg32s[2]=k;a.flags=k===f>>31?a.flags&
-2050:a.flags|2049;a.flags_changed=0;break;case 6:192>b?c=JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b))>>>0:c=a.reg32[b&7];b=c;d=a.reg32[0];e=a.reg32[2];(e>=b||!b)&&JSCompiler_StaticMethods_trigger_de(a);c=0;if(1048576<e){f=32;for(g=b;g>e;)g>>>=1,f--;for(;1048576<e;)e>=g&&(e-=g,k=b<<f>>>0,k>d&&e--,d=d-k>>>0,c|=1<<f),f--,g>>=1;c>>>=0}d+=4294967296*e;e=d%b;c+=d/b|0;4294967296<=c||0===b?JSCompiler_StaticMethods_trigger_de(a):(a.reg32s[0]=c,a.reg32s[2]=e);break;case 7:b=c=192>b?JSCompiler_StaticMethods_safe_read32s(a,
a.modrm_resolve(b)):a.reg32s[b&7];f=a.reg32[0];g=a.reg32s[2];d=c=!1;0>b&&(d=!0,b=-b);0>g&&(c=!0,d=!d,f=-f|0,g=~g+!f);(g>=b||!b)&&JSCompiler_StaticMethods_trigger_de(a);e=0;if(1048576<g){for(var k=32,l=b;l>g;)l>>>=1,k--;for(;1048576<g;){if(g>=l){var g=g-l,m=b<<k>>>0;m>f&&g--;f=f-m>>>0;e|=1<<k}k--;l>>=1}e>>>=0}f+=4294967296*g;g=f%b;e+=f/b|0;d&&(e=-e|0);c&&(g=-g|0);2147483648<=e||-2147483649>=e||0===b?JSCompiler_StaticMethods_trigger_de(a):(a.reg32s[0]=e,a.reg32s[2]=g)}};
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.flags>>12&3):(a.flags>>12&3)>=a.cpl)?a.flags&=-513:3>(a.flags>>12&3)&&(a.flags&131072?a.cr4&1:3===a.cpl&&a.cr4&2)?a.flags&=-524289:JSCompiler_StaticMethods_trigger_gp(a,0)};
table16[251]=table32[251]=function(a){!a.protected_mode||(a.flags&131072?3===(a.flags>>12&3):(a.flags>>12&3)>=a.cpl)?(a.flags|=512,JSCompiler_StaticMethods_cycle(a),JSCompiler_StaticMethods_handle_irqs(a)):3>(a.flags>>12&3)&&0===(a.flags&1048576)&&(a.flags&131072?a.cr4&1:3===a.cpl&&a.cr4&2)?a.flags|=524288:JSCompiler_StaticMethods_trigger_gp(a,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 b=JSCompiler_StaticMethods_read_imm8(a),c=b&56;if(0===c){var d;192>b?(d=JSCompiler_StaticMethods_translate_address_write(a,a.modrm_resolve(b)),c=JSCompiler_StaticMethods_read8(a.memory,d)):c=a.reg8[b<<2&12|b>>2&1];c=JSCompiler_StaticMethods_inc(a,c,7);192>b?JSCompiler_StaticMethods_write8(a.memory,d,c):a.reg8[b<<2&12|b>>2&1]=c}else 8===c?(192>b?(d=JSCompiler_StaticMethods_translate_address_write(a,a.modrm_resolve(b)),c=JSCompiler_StaticMethods_read8(a.memory,
d)):c=a.reg8[b<<2&12|b>>2&1],c=JSCompiler_StaticMethods_dec(a,c,7),192>b?JSCompiler_StaticMethods_write8(a.memory,d,c):a.reg8[b<<2&12|b>>2&1]=c):JSCompiler_StaticMethods_trigger_ud(a)};
table16[255]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);switch(b>>3&7){case 0:var c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,d,e)):c=JSCompiler_StaticMethods_read16(a.memory,d)):c=a.reg16[b<<1&14];c=JSCompiler_StaticMethods_inc(a,c,15);192>b?e?JSCompiler_StaticMethods_virt_boundary_write16(a,d,e,c):JSCompiler_StaticMethods_write16(a.memory,
d,c):a.reg16[b<<1&14]=c;break;case 1:e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,d,e)):c=JSCompiler_StaticMethods_read16(a.memory,d)):c=a.reg16[b<<1&14];c=JSCompiler_StaticMethods_dec(a,c,15);192>b?e?JSCompiler_StaticMethods_virt_boundary_write16(a,d,e,c):JSCompiler_StaticMethods_write16(a.memory,d,c):a.reg16[b<<1&14]=c;
break;case 2:c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];JSCompiler_StaticMethods_push16(a,JSCompiler_StaticMethods_get_real_eip(a));a.instruction_pointer=a.segment_offsets[1]+c|0;a.last_instr_jump=!0;break;case 3:192<=b&&JSCompiler_StaticMethods_trigger_ud(a);c=a.modrm_resolve(b);b=JSCompiler_StaticMethods_safe_read16(a,c+2);d=JSCompiler_StaticMethods_safe_read16(a,c);JSCompiler_StaticMethods_writable_or_pagefault(a,JSCompiler_StaticMethods_get_stack_pointer(a,
-4),4);JSCompiler_StaticMethods_push16(a,a.sreg[1]);JSCompiler_StaticMethods_push16(a,JSCompiler_StaticMethods_get_real_eip(a));JSCompiler_StaticMethods_switch_seg(a,1,b);a.instruction_pointer=a.segment_offsets[1]+d|0;a.last_instr_jump=!0;break;case 4:c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.instruction_pointer=a.segment_offsets[1]+c|0;a.last_instr_jump=!0;break;case 5:192<=b&&JSCompiler_StaticMethods_trigger_ud(a);c=a.modrm_resolve(b);b=JSCompiler_StaticMethods_safe_read16(a,
c+2);d=JSCompiler_StaticMethods_safe_read16(a,c);JSCompiler_StaticMethods_switch_seg(a,1,b);a.instruction_pointer=a.segment_offsets[1]+d|0;a.last_instr_jump=!0;break;case 6:c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];JSCompiler_StaticMethods_push16(a,c);break;case 7:JSCompiler_StaticMethods_trigger_ud(a)}};
table32[255]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);switch(b>>3&7){case 0:var c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,d,e)):c=JSCompiler_StaticMethods_read32s(a.memory,d)):c=a.reg32s[b&7];c=JSCompiler_StaticMethods_inc(a,c,31);192>b?e?JSCompiler_StaticMethods_virt_boundary_write32(a,d,e,c):JSCompiler_StaticMethods_write32(a.memory,
d,c):a.reg32s[b&7]=c;break;case 1:e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,d,e)):c=JSCompiler_StaticMethods_read32s(a.memory,d)):c=a.reg32s[b&7];c=JSCompiler_StaticMethods_dec(a,c,31);192>b?e?JSCompiler_StaticMethods_virt_boundary_write32(a,d,e,c):JSCompiler_StaticMethods_write32(a.memory,d,c):a.reg32s[b&7]=c;break;case 2:c=
192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];JSCompiler_StaticMethods_push32(a,JSCompiler_StaticMethods_get_real_eip(a));a.instruction_pointer=a.segment_offsets[1]+c|0;a.last_instr_jump=!0;break;case 3:192<=b&&JSCompiler_StaticMethods_trigger_ud(a);c=a.modrm_resolve(b);b=JSCompiler_StaticMethods_safe_read16(a,c+4);d=JSCompiler_StaticMethods_safe_read32s(a,c);JSCompiler_StaticMethods_writable_or_pagefault(a,JSCompiler_StaticMethods_get_stack_pointer(a,-8),8);JSCompiler_StaticMethods_push32(a,
a.sreg[1]);JSCompiler_StaticMethods_push32(a,JSCompiler_StaticMethods_get_real_eip(a));JSCompiler_StaticMethods_switch_seg(a,1,b);a.instruction_pointer=a.segment_offsets[1]+d|0;a.last_instr_jump=!0;break;case 4:c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.instruction_pointer=a.segment_offsets[1]+c|0;a.last_instr_jump=!0;break;case 5:192<=b&&JSCompiler_StaticMethods_trigger_ud(a);c=a.modrm_resolve(b);b=JSCompiler_StaticMethods_safe_read16(a,c+4);d=JSCompiler_StaticMethods_safe_read32s(a,
c);JSCompiler_StaticMethods_switch_seg(a,1,b);a.instruction_pointer=a.segment_offsets[1]+d|0;a.last_instr_jump=!0;break;case 6:c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];JSCompiler_StaticMethods_push32(a,c);break;case 7:JSCompiler_StaticMethods_trigger_ud(a)}};
table0F_16[0]=table0F_32[0]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);a.protected_mode||JSCompiler_StaticMethods_trigger_ud(a);a.cpl&&JSCompiler_StaticMethods_trigger_gp(a,0);switch(b>>3&7){case 0:if(192>b)var c=a.modrm_resolve(b);var d=a.sreg[7];192>b?JSCompiler_StaticMethods_safe_write16(a,c,d):a.reg16[b<<1&14]=d;break;case 1:192>b&&(c=a.modrm_resolve(b));d=a.sreg[6];192>b?JSCompiler_StaticMethods_safe_write16(a,c,d):a.reg16[b<<1&14]=d;break;case 2:b=d=192>b?JSCompiler_StaticMethods_safe_read16(a,
a.modrm_resolve(b)):a.reg16[b<<1&14];c=JSCompiler_StaticMethods_lookup_segment_selector(a,b);if(c.is_null)a.segment_offsets[7]=0,a.segment_limits[7]=0;else{if(!c.from_gdt)throw a.debug.unimpl("LDTR can only be loaded from GDT");if(!c.is_present)throw a.debug.unimpl("#GP handler");if(!c.is_system)throw a.debug.unimpl("#GP handler");if(2!==c.type)throw a.debug.unimpl("#GP handler");a.segment_offsets[7]=c.base;a.segment_limits[7]=c.effective_limit;a.sreg[7]=b}break;case 3:b=d=192>b?JSCompiler_StaticMethods_safe_read16(a,
a.modrm_resolve(b)):a.reg16[b<<1&14];c=JSCompiler_StaticMethods_lookup_segment_selector(a,b);if(!c.from_gdt)throw a.debug.unimpl("TR can only be loaded from GDT");if(c.is_null)throw a.debug.unimpl("#GP handler");if(!c.is_present)throw a.debug.unimpl("#GP handler");if(!c.is_system)throw a.debug.unimpl("#GP handler");if(9!==c.type)throw a.debug.unimpl("#GP handler");a.segment_offsets[6]=c.base;a.segment_limits[6]=c.effective_limit;a.sreg[6]=b;JSCompiler_StaticMethods_write8(a.memory,c.table_offset+
5,JSCompiler_StaticMethods_read8(a.memory,c.table_offset+5)|2);break;default:JSCompiler_StaticMethods_trigger_ud(a)}};
table0F_16[1]=table0F_32[1]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);a.cpl&&JSCompiler_StaticMethods_trigger_gp(a,0);var c=b>>3&7;if(4===c){if(192>b)var d=a.modrm_resolve(b);c=a.cr0;192>b?JSCompiler_StaticMethods_safe_write16(a,d,c):a.reg16[b<<1&14]=c}else if(6===c)c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14],a.cr0=a.cr0&-16|c&15,a.protected_mode&&(a.cr0|=1),JSCompiler_StaticMethods_cr0_changed(a);else switch(192<=b&&JSCompiler_StaticMethods_trigger_ud(a),
2!==c&&3!==c||!a.protected_mode||(a.segment_prefix=9),d=a.modrm_resolve(b),a.segment_prefix=-1,c){case 0:JSCompiler_StaticMethods_writable_or_pagefault(a,d,6);JSCompiler_StaticMethods_safe_write16(a,d,a.gdtr_size);JSCompiler_StaticMethods_safe_write32(a,d+2,a.gdtr_offset);break;case 1:JSCompiler_StaticMethods_writable_or_pagefault(a,d,6);JSCompiler_StaticMethods_safe_write16(a,d,a.idtr_size);JSCompiler_StaticMethods_safe_write32(a,d+2,a.idtr_offset);break;case 2:b=JSCompiler_StaticMethods_safe_read16(a,
d);d=JSCompiler_StaticMethods_safe_read32s(a,d+2);a.gdtr_size=b;a.gdtr_offset=d;a.operand_size_32||(a.gdtr_offset&=16777215);break;case 3:b=JSCompiler_StaticMethods_safe_read16(a,d);d=JSCompiler_StaticMethods_safe_read32s(a,d+2);a.idtr_size=b;a.idtr_offset=d;a.operand_size_32||(a.idtr_offset&=16777215);break;case 7:d=d>>>12;a.tlb_info[d]=0;a.tlb_info_global[d]=0;a.last_virt_eip=-1;break;default:JSCompiler_StaticMethods_trigger_ud(a)}};
table0F_16[2]=table0F_32[2]=function(a){JSCompiler_StaticMethods_read_imm8(a);JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[3]=table0F_32[3]=function(a){JSCompiler_StaticMethods_read_imm8(a);JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[4]=table0F_32[4]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[5]=table0F_32[5]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[6]=table0F_32[6]=function(a){a.cpl?JSCompiler_StaticMethods_trigger_gp(a,0):a.cr0&=-9};
table0F_16[7]=table0F_32[7]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[8]=table0F_32[8]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[9]=table0F_32[9]=function(a){a.cpl&&JSCompiler_StaticMethods_trigger_gp(a,0)};table0F_16[10]=table0F_32[10]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[11]=table0F_32[11]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[12]=table0F_32[12]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[13]=table0F_32[13]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[14]=table0F_32[14]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[15]=table0F_32[15]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[16]=table0F_32[16]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[17]=table0F_32[17]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[18]=table0F_32[18]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[19]=table0F_32[19]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[20]=table0F_32[20]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[21]=table0F_32[21]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[22]=table0F_32[22]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[23]=table0F_32[23]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[24]=table0F_32[24]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192>b&&a.modrm_resolve(b)};table0F_16[25]=table0F_32[25]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[26]=table0F_32[26]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[27]=table0F_32[27]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[28]=table0F_32[28]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[29]=table0F_32[29]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[30]=table0F_32[30]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[31]=table0F_32[31]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[32]=table0F_32[32]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);a.cpl&&JSCompiler_StaticMethods_trigger_gp(a,0);switch(b>>3&7){case 0:a.reg32s[b&7]=a.cr0;break;case 2:a.reg32s[b&7]=a.cr2;break;case 3:a.reg32s[b&7]=a.cr3;break;case 4:a.reg32s[b&7]=a.cr4;break;default:JSCompiler_StaticMethods_trigger_ud(a)}};
table0F_16[33]=table0F_32[33]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);a.cpl&&JSCompiler_StaticMethods_trigger_gp(a,0);a.reg32s[b&7]=a.dreg[b>>3&7]};
table0F_16[34]=table0F_32[34]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);a.cpl&&JSCompiler_StaticMethods_trigger_gp(a,0);var c=a.reg32s[b&7];switch(b>>3&7){case 0:a.cr0=c;if(-2147483648===(a.cr0&-2147483647))throw a.debug.unimpl("#GP handler");JSCompiler_StaticMethods_cr0_changed(a);break;case 2:a.cr2=c;break;case 3:a.cr3=c;JSCompiler_StaticMethods_clear_tlb(a);break;case 4:c&-3565568&&JSCompiler_StaticMethods_trigger_gp(a,0);(a.cr4^c)&128&&(c&128?JSCompiler_StaticMethods_clear_tlb(a):
JSCompiler_StaticMethods_full_clear_tlb(a));a.cr4=c;a.page_size_extensions=a.cr4&16?128:0;if(a.cr4&32)throw a.debug.unimpl("PAE");break;default:JSCompiler_StaticMethods_trigger_ud(a)}};table0F_16[35]=table0F_32[35]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);a.cpl&&JSCompiler_StaticMethods_trigger_gp(a,0);a.dreg[b>>3&7]=a.reg32s[b&7]};table0F_16[36]=table0F_32[36]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[37]=table0F_32[37]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[38]=table0F_32[38]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[39]=table0F_32[39]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[40]=table0F_32[40]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[41]=table0F_32[41]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[42]=table0F_32[42]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[43]=table0F_32[43]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[44]=table0F_32[44]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[45]=table0F_32[45]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[46]=table0F_32[46]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[47]=table0F_32[47]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[48]=table0F_32[48]=function(a){a.cpl&&JSCompiler_StaticMethods_trigger_gp(a,0);var b=a.reg32s[0];switch(a.reg32s[1]){case 372:a.sysenter_cs=b&65535;break;case 374:a.sysenter_eip=b;break;case 373:a.sysenter_esp=b}};table0F_16[49]=table0F_32[49]=function(a){if(a.cpl&&a.cr4&4)JSCompiler_StaticMethods_trigger_gp(a,0);else{var b=a.microtick()-a.tsc_offset;a.reg32s[0]=1024*b;a.reg32s[2]=2.384185791015625E-7*b}};
table0F_16[50]=table0F_32[50]=function(a){a.cpl&&JSCompiler_StaticMethods_trigger_gp(a,0);var b=0;switch(a.reg32s[1]){case 372:b=a.sysenter_cs;break;case 374:b=a.sysenter_eip;break;case 373:b=a.sysenter_esp}a.reg32s[0]=b;a.reg32s[2]=0};table0F_16[51]=table0F_32[51]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[52]=table0F_32[52]=function(a){var b=a.sysenter_cs&65532;a.protected_mode&&0!==b||JSCompiler_StaticMethods_trigger_gp(a,0);a.flags&=-131585;a.instruction_pointer=a.sysenter_eip;a.reg32s[4]=a.sysenter_esp;a.sreg[1]=b;a.segment_is_null[1]=0;a.segment_limits[1]=-1;a.segment_offsets[1]=0;a.is_32||JSCompiler_StaticMethods_update_cs_size(a,!0);a.cpl=0;a.last_virt_eip=-1;a.sreg[2]=b+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 b=a.sysenter_cs&65532;a.protected_mode&&!a.cpl&&0!==b||JSCompiler_StaticMethods_trigger_gp(a,0);a.instruction_pointer=a.reg32s[2];a.reg32s[4]=a.reg32s[1];a.sreg[1]=b+16|3;a.segment_is_null[1]=0;a.segment_limits[1]=-1;a.segment_offsets[1]=0;a.is_32||JSCompiler_StaticMethods_update_cs_size(a,!0);a.cpl=3;a.last_virt_eip=-1;a.sreg[2]=b+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){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[55]=table0F_32[55]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[56]=table0F_32[56]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[57]=table0F_32[57]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[58]=table0F_32[58]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[59]=table0F_32[59]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[60]=table0F_32[60]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[61]=table0F_32[61]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[62]=table0F_32[62]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[63]=table0F_32[63]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[64]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.test_o()&&(a.reg16[b>>2&14]=c)};table0F_32[64]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.test_o()&&(a.reg32s[b>>3&7]=c)};
table0F_16[65]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.test_o()||(a.reg16[b>>2&14]=c)};table0F_32[65]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.test_o()||(a.reg32s[b>>3&7]=c)};
table0F_16[66]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.test_b()&&(a.reg16[b>>2&14]=c)};table0F_32[66]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.test_b()&&(a.reg32s[b>>3&7]=c)};
table0F_16[67]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.test_b()||(a.reg16[b>>2&14]=c)};table0F_32[67]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.test_b()||(a.reg32s[b>>3&7]=c)};
table0F_16[68]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.test_z()&&(a.reg16[b>>2&14]=c)};table0F_32[68]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.test_z()&&(a.reg32s[b>>3&7]=c)};
table0F_16[69]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.test_z()||(a.reg16[b>>2&14]=c)};table0F_32[69]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.test_z()||(a.reg32s[b>>3&7]=c)};
table0F_16[70]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];JSCompiler_StaticMethods_test_be(a)&&(a.reg16[b>>2&14]=c)};table0F_32[70]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];JSCompiler_StaticMethods_test_be(a)&&(a.reg32s[b>>3&7]=c)};
table0F_16[71]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];JSCompiler_StaticMethods_test_be(a)||(a.reg16[b>>2&14]=c)};table0F_32[71]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];JSCompiler_StaticMethods_test_be(a)||(a.reg32s[b>>3&7]=c)};
table0F_16[72]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.test_s()&&(a.reg16[b>>2&14]=c)};table0F_32[72]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.test_s()&&(a.reg32s[b>>3&7]=c)};
table0F_16[73]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.test_s()||(a.reg16[b>>2&14]=c)};table0F_32[73]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.test_s()||(a.reg32s[b>>3&7]=c)};
table0F_16[74]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.test_p()&&(a.reg16[b>>2&14]=c)};table0F_32[74]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.test_p()&&(a.reg32s[b>>3&7]=c)};
table0F_16[75]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.test_p()||(a.reg16[b>>2&14]=c)};table0F_32[75]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.test_p()||(a.reg32s[b>>3&7]=c)};
table0F_16[76]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];JSCompiler_StaticMethods_test_l(a)&&(a.reg16[b>>2&14]=c)};table0F_32[76]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];JSCompiler_StaticMethods_test_l(a)&&(a.reg32s[b>>3&7]=c)};
table0F_16[77]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];JSCompiler_StaticMethods_test_l(a)||(a.reg16[b>>2&14]=c)};table0F_32[77]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];JSCompiler_StaticMethods_test_l(a)||(a.reg32s[b>>3&7]=c)};
table0F_16[78]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];JSCompiler_StaticMethods_test_le(a)&&(a.reg16[b>>2&14]=c)};table0F_32[78]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];JSCompiler_StaticMethods_test_le(a)&&(a.reg32s[b>>3&7]=c)};
table0F_16[79]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];JSCompiler_StaticMethods_test_le(a)||(a.reg16[b>>2&14]=c)};table0F_32[79]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];JSCompiler_StaticMethods_test_le(a)||(a.reg32s[b>>3&7]=c)};table0F_16[80]=table0F_32[80]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[81]=table0F_32[81]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[82]=table0F_32[82]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[83]=table0F_32[83]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[84]=table0F_32[84]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[85]=table0F_32[85]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[86]=table0F_32[86]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[87]=table0F_32[87]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[88]=table0F_32[88]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[89]=table0F_32[89]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[90]=table0F_32[90]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[91]=table0F_32[91]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[92]=table0F_32[92]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[93]=table0F_32[93]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[94]=table0F_32[94]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[95]=table0F_32[95]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[96]=table0F_32[96]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[97]=table0F_32[97]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[98]=table0F_32[98]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[99]=table0F_32[99]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[100]=table0F_32[100]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[101]=table0F_32[101]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[102]=table0F_32[102]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[103]=table0F_32[103]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[104]=table0F_32[104]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[105]=table0F_32[105]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[106]=table0F_32[106]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[107]=table0F_32[107]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[108]=table0F_32[108]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[109]=table0F_32[109]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[110]=table0F_32[110]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[111]=table0F_32[111]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[112]=table0F_32[112]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[113]=table0F_32[113]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[114]=table0F_32[114]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[115]=table0F_32[115]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[116]=table0F_32[116]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[117]=table0F_32[117]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[118]=table0F_32[118]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[119]=table0F_32[119]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[120]=table0F_32[120]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[121]=table0F_32[121]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[122]=table0F_32[122]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[123]=table0F_32[123]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[124]=table0F_32[124]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[125]=table0F_32[125]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[126]=table0F_32[126]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[127]=table0F_32[127]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[128]=function(a){JSCompiler_StaticMethods_jmpcc16(a,a.test_o())};
table0F_32[128]=function(a){JSCompiler_StaticMethods_jmpcc32(a,a.test_o())};table0F_16[129]=function(a){JSCompiler_StaticMethods_jmpcc16(a,!a.test_o())};table0F_32[129]=function(a){JSCompiler_StaticMethods_jmpcc32(a,!a.test_o())};table0F_16[130]=function(a){JSCompiler_StaticMethods_jmpcc16(a,a.test_b())};table0F_32[130]=function(a){JSCompiler_StaticMethods_jmpcc32(a,a.test_b())};table0F_16[131]=function(a){JSCompiler_StaticMethods_jmpcc16(a,!a.test_b())};
table0F_32[131]=function(a){JSCompiler_StaticMethods_jmpcc32(a,!a.test_b())};table0F_16[132]=function(a){JSCompiler_StaticMethods_jmpcc16(a,a.test_z())};table0F_32[132]=function(a){JSCompiler_StaticMethods_jmpcc32(a,a.test_z())};table0F_16[133]=function(a){JSCompiler_StaticMethods_jmpcc16(a,!a.test_z())};table0F_32[133]=function(a){JSCompiler_StaticMethods_jmpcc32(a,!a.test_z())};table0F_16[134]=function(a){JSCompiler_StaticMethods_jmpcc16(a,JSCompiler_StaticMethods_test_be(a))};
table0F_32[134]=function(a){JSCompiler_StaticMethods_jmpcc32(a,JSCompiler_StaticMethods_test_be(a))};table0F_16[135]=function(a){JSCompiler_StaticMethods_jmpcc16(a,!JSCompiler_StaticMethods_test_be(a))};table0F_32[135]=function(a){JSCompiler_StaticMethods_jmpcc32(a,!JSCompiler_StaticMethods_test_be(a))};table0F_16[136]=function(a){JSCompiler_StaticMethods_jmpcc16(a,a.test_s())};table0F_32[136]=function(a){JSCompiler_StaticMethods_jmpcc32(a,a.test_s())};
table0F_16[137]=function(a){JSCompiler_StaticMethods_jmpcc16(a,!a.test_s())};table0F_32[137]=function(a){JSCompiler_StaticMethods_jmpcc32(a,!a.test_s())};table0F_16[138]=function(a){JSCompiler_StaticMethods_jmpcc16(a,a.test_p())};table0F_32[138]=function(a){JSCompiler_StaticMethods_jmpcc32(a,a.test_p())};table0F_16[139]=function(a){JSCompiler_StaticMethods_jmpcc16(a,!a.test_p())};table0F_32[139]=function(a){JSCompiler_StaticMethods_jmpcc32(a,!a.test_p())};
table0F_16[140]=function(a){JSCompiler_StaticMethods_jmpcc16(a,JSCompiler_StaticMethods_test_l(a))};table0F_32[140]=function(a){JSCompiler_StaticMethods_jmpcc32(a,JSCompiler_StaticMethods_test_l(a))};table0F_16[141]=function(a){JSCompiler_StaticMethods_jmpcc16(a,!JSCompiler_StaticMethods_test_l(a))};table0F_32[141]=function(a){JSCompiler_StaticMethods_jmpcc32(a,!JSCompiler_StaticMethods_test_l(a))};table0F_16[142]=function(a){JSCompiler_StaticMethods_jmpcc16(a,JSCompiler_StaticMethods_test_le(a))};
table0F_32[142]=function(a){JSCompiler_StaticMethods_jmpcc32(a,JSCompiler_StaticMethods_test_le(a))};table0F_16[143]=function(a){JSCompiler_StaticMethods_jmpcc16(a,!JSCompiler_StaticMethods_test_le(a))};table0F_32[143]=function(a){JSCompiler_StaticMethods_jmpcc32(a,!JSCompiler_StaticMethods_test_le(a))};
table0F_16[144]=table0F_32[144]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=!a.test_o()^1;192>b?JSCompiler_StaticMethods_safe_write8(a,c,d):a.reg8[b<<2&12|b>>2&1]=d};table0F_16[145]=table0F_32[145]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=!!a.test_o()^1;192>b?JSCompiler_StaticMethods_safe_write8(a,c,d):a.reg8[b<<2&12|b>>2&1]=d};
table0F_16[146]=table0F_32[146]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=!a.test_b()^1;192>b?JSCompiler_StaticMethods_safe_write8(a,c,d):a.reg8[b<<2&12|b>>2&1]=d};table0F_16[147]=table0F_32[147]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=!!a.test_b()^1;192>b?JSCompiler_StaticMethods_safe_write8(a,c,d):a.reg8[b<<2&12|b>>2&1]=d};
table0F_16[148]=table0F_32[148]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=!a.test_z()^1;192>b?JSCompiler_StaticMethods_safe_write8(a,c,d):a.reg8[b<<2&12|b>>2&1]=d};table0F_16[149]=table0F_32[149]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=!!a.test_z()^1;192>b?JSCompiler_StaticMethods_safe_write8(a,c,d):a.reg8[b<<2&12|b>>2&1]=d};
table0F_16[150]=table0F_32[150]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=!JSCompiler_StaticMethods_test_be(a)^1;192>b?JSCompiler_StaticMethods_safe_write8(a,c,d):a.reg8[b<<2&12|b>>2&1]=d};table0F_16[151]=table0F_32[151]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=!!JSCompiler_StaticMethods_test_be(a)^1;192>b?JSCompiler_StaticMethods_safe_write8(a,c,d):a.reg8[b<<2&12|b>>2&1]=d};
table0F_16[152]=table0F_32[152]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=!a.test_s()^1;192>b?JSCompiler_StaticMethods_safe_write8(a,c,d):a.reg8[b<<2&12|b>>2&1]=d};table0F_16[153]=table0F_32[153]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=!!a.test_s()^1;192>b?JSCompiler_StaticMethods_safe_write8(a,c,d):a.reg8[b<<2&12|b>>2&1]=d};
table0F_16[154]=table0F_32[154]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=!a.test_p()^1;192>b?JSCompiler_StaticMethods_safe_write8(a,c,d):a.reg8[b<<2&12|b>>2&1]=d};table0F_16[155]=table0F_32[155]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=!!a.test_p()^1;192>b?JSCompiler_StaticMethods_safe_write8(a,c,d):a.reg8[b<<2&12|b>>2&1]=d};
table0F_16[156]=table0F_32[156]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=!JSCompiler_StaticMethods_test_l(a)^1;192>b?JSCompiler_StaticMethods_safe_write8(a,c,d):a.reg8[b<<2&12|b>>2&1]=d};table0F_16[157]=table0F_32[157]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=!!JSCompiler_StaticMethods_test_l(a)^1;192>b?JSCompiler_StaticMethods_safe_write8(a,c,d):a.reg8[b<<2&12|b>>2&1]=d};
table0F_16[158]=table0F_32[158]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=!JSCompiler_StaticMethods_test_le(a)^1;192>b?JSCompiler_StaticMethods_safe_write8(a,c,d):a.reg8[b<<2&12|b>>2&1]=d};table0F_16[159]=table0F_32[159]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b)var c=a.modrm_resolve(b);var d=!!JSCompiler_StaticMethods_test_le(a)^1;192>b?JSCompiler_StaticMethods_safe_write8(a,c,d):a.reg8[b<<2&12|b>>2&1]=d};
table0F_16[160]=function(a){JSCompiler_StaticMethods_push16(a,a.sreg[4])};table0F_32[160]=function(a){JSCompiler_StaticMethods_push32(a,a.sreg[4])};table0F_16[161]=function(a){JSCompiler_StaticMethods_switch_seg(a,4,JSCompiler_StaticMethods_safe_read16(a,JSCompiler_StaticMethods_get_stack_pointer(a,0)));a.stack_reg[a.reg_vsp]+=2};
table0F_32[161]=function(a){JSCompiler_StaticMethods_switch_seg(a,4,JSCompiler_StaticMethods_safe_read16(a,JSCompiler_StaticMethods_get_stack_pointer(a,0)));a.stack_reg[a.reg_vsp]+=4};table0F_16[162]=table0F_32[162]=function(a){var b=0,c=0,d=0,e=0;switch(a.reg32s[0]){case 0:b=5;e=1970169159;d=1231384169;c=1818588270;break;case 1:b=3939;e=0;c=8388608;d=(a.fpu?1:0)|43322;break;case 2:b=1717260289;c=e=0;d=8024064;break;case -2147483648:b=5}a.reg32s[0]=b;a.reg32s[1]=c;a.reg32s[2]=d;a.reg32s[3]=e};
table0F_16[163]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192>b?JSCompiler_StaticMethods_bt_mem(a,a.modrm_resolve(b),a.reg16s[b>>2&14]):JSCompiler_StaticMethods_bt_reg(a,a.reg16[b<<1&14],a.reg16[b>>2&14]&15)};table0F_32[163]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192>b?JSCompiler_StaticMethods_bt_mem(a,a.modrm_resolve(b),a.reg32s[b>>3&7]):JSCompiler_StaticMethods_bt_reg(a,a.reg32s[b&7],a.reg32s[b>>3&7]&31)};
table0F_16[164]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,d,e)):c=JSCompiler_StaticMethods_read16(a.memory,d)):c=a.reg16[b<<1&14];c=JSCompiler_StaticMethods_shld16(a,c,a.reg16[b>>2&14],JSCompiler_StaticMethods_read_imm8(a)&31);192>b?e?JSCompiler_StaticMethods_virt_boundary_write16(a,
d,e,c):JSCompiler_StaticMethods_write16(a.memory,d,c):a.reg16[b<<1&14]=c};
table0F_32[164]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,d,e)):c=JSCompiler_StaticMethods_read32s(a.memory,d)):c=a.reg32s[b&7];c=JSCompiler_StaticMethods_shld32(a,c,a.reg32s[b>>3&7],JSCompiler_StaticMethods_read_imm8(a)&31);192>b?e?JSCompiler_StaticMethods_virt_boundary_write32(a,
d,e,c):JSCompiler_StaticMethods_write32(a.memory,d,c):a.reg32s[b&7]=c};
table0F_16[165]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,d,e)):c=JSCompiler_StaticMethods_read16(a.memory,d)):c=a.reg16[b<<1&14];c=JSCompiler_StaticMethods_shld16(a,c,a.reg16[b>>2&14],a.reg8[4]&31);192>b?e?JSCompiler_StaticMethods_virt_boundary_write16(a,d,e,
c):JSCompiler_StaticMethods_write16(a.memory,d,c):a.reg16[b<<1&14]=c};
table0F_32[165]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,d,e)):c=JSCompiler_StaticMethods_read32s(a.memory,d)):c=a.reg32s[b&7];c=JSCompiler_StaticMethods_shld32(a,c,a.reg32s[b>>3&7],a.reg8[4]&31);192>b?e?JSCompiler_StaticMethods_virt_boundary_write32(a,d,e,c):
JSCompiler_StaticMethods_write32(a.memory,d,c):a.reg32s[b&7]=c};table0F_16[166]=table0F_32[166]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[167]=table0F_32[167]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[168]=function(a){JSCompiler_StaticMethods_push16(a,a.sreg[5])};table0F_32[168]=function(a){JSCompiler_StaticMethods_push32(a,a.sreg[5])};
table0F_16[169]=function(a){JSCompiler_StaticMethods_switch_seg(a,5,JSCompiler_StaticMethods_safe_read16(a,JSCompiler_StaticMethods_get_stack_pointer(a,0)));a.stack_reg[a.reg_vsp]+=2};table0F_32[169]=function(a){JSCompiler_StaticMethods_switch_seg(a,5,JSCompiler_StaticMethods_safe_read16(a,JSCompiler_StaticMethods_get_stack_pointer(a,0)));a.stack_reg[a.reg_vsp]+=4};table0F_16[170]=table0F_32[170]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[171]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192>b?JSCompiler_StaticMethods_bts_mem(a,a.modrm_resolve(b),a.reg16s[b>>2&14]):a.reg16[b<<1&14]=JSCompiler_StaticMethods_bts_reg(a,a.reg16[b<<1&14],a.reg16s[b>>2&14]&15)};table0F_32[171]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192>b?JSCompiler_StaticMethods_bts_mem(a,a.modrm_resolve(b),a.reg32s[b>>3&7]):a.reg32s[b&7]=JSCompiler_StaticMethods_bts_reg(a,a.reg32s[b&7],a.reg32s[b>>3&7]&31)};
table0F_16[172]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,d,e)):c=JSCompiler_StaticMethods_read16(a.memory,d)):c=a.reg16[b<<1&14];c=JSCompiler_StaticMethods_shrd16(a,c,a.reg16[b>>2&14],JSCompiler_StaticMethods_read_imm8(a)&31);192>b?e?JSCompiler_StaticMethods_virt_boundary_write16(a,
d,e,c):JSCompiler_StaticMethods_write16(a.memory,d,c):a.reg16[b<<1&14]=c};
table0F_32[172]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,d,e)):c=JSCompiler_StaticMethods_read32s(a.memory,d)):c=a.reg32s[b&7];c=JSCompiler_StaticMethods_shrd32(a,c,a.reg32s[b>>3&7],JSCompiler_StaticMethods_read_imm8(a)&31);192>b?e?JSCompiler_StaticMethods_virt_boundary_write32(a,
d,e,c):JSCompiler_StaticMethods_write32(a.memory,d,c):a.reg32s[b&7]=c};
table0F_16[173]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,d,e)):c=JSCompiler_StaticMethods_read16(a.memory,d)):c=a.reg16[b<<1&14];c=JSCompiler_StaticMethods_shrd16(a,c,a.reg16[b>>2&14],a.reg8[4]&31);192>b?e?JSCompiler_StaticMethods_virt_boundary_write16(a,d,e,
c):JSCompiler_StaticMethods_write16(a.memory,d,c):a.reg16[b<<1&14]=c};
table0F_32[173]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,d,e)):c=JSCompiler_StaticMethods_read32s(a.memory,d)):c=a.reg32s[b&7];c=JSCompiler_StaticMethods_shrd32(a,c,a.reg32s[b>>3&7],a.reg8[4]&31);192>b?e?JSCompiler_StaticMethods_virt_boundary_write32(a,d,e,c):
JSCompiler_StaticMethods_write32(a.memory,d,c):a.reg32s[b&7]=c};table0F_16[174]=table0F_32[174]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[175]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b))<<16>>16:a.reg16s[b<<1&14];a.reg16[b>>2&14]=JSCompiler_StaticMethods_imul_reg16(a,a.reg16s[b>>2&14],c)};
table0F_32[175]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.reg32s[b>>3&7]=JSCompiler_StaticMethods_imul_reg32(a,a.reg32s[b>>3&7],c)};
table0F_16[176]=table0F_32[176]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b){var c=a.modrm_resolve(b);JSCompiler_StaticMethods_writable_or_pagefault(a,c,1);var d=JSCompiler_StaticMethods_safe_read8(a,c)}else d=a.reg8[b<<2&12|b>>2&1];a.sub(d,a.reg8[0],7);a.getzf()?192>b?JSCompiler_StaticMethods_safe_write8(a,c,a.reg8[b>>1&12|b>>5&1]):a.reg8[b<<2&12|b>>2&1]=a.reg8[b>>1&12|b>>5&1]:a.reg8[0]=d};
table0F_16[177]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b){var c=a.modrm_resolve(b);JSCompiler_StaticMethods_writable_or_pagefault(a,c,2);var d=JSCompiler_StaticMethods_safe_read16(a,c)}else d=a.reg16[b<<1&14];a.sub(d,a.reg16[0],15);a.getzf()?192>b?JSCompiler_StaticMethods_safe_write16(a,c,a.reg16[b>>2&14]):a.reg16[b<<1&14]=a.reg16[b>>2&14]:a.reg16[0]=d};
table0F_32[177]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);if(192>b){var c=a.modrm_resolve(b);JSCompiler_StaticMethods_writable_or_pagefault(a,c,4);var d=JSCompiler_StaticMethods_safe_read32s(a,c)}else d=a.reg32s[b&7];a.sub(d,a.reg32s[0],31);a.getzf()?192>b?JSCompiler_StaticMethods_safe_write32(a,c,a.reg32s[b>>3&7]):a.reg32s[b&7]=a.reg32s[b>>3&7]:a.reg32s[0]=d};
table0F_16[178]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192<=b&&JSCompiler_StaticMethods_trigger_ud(a);JSCompiler_StaticMethods_lss16(a,2,a.modrm_resolve(b),b>>2&14)};table0F_32[178]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192<=b&&JSCompiler_StaticMethods_trigger_ud(a);JSCompiler_StaticMethods_lss32(a,2,a.modrm_resolve(b),b>>3&7)};
table0F_16[179]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192>b?JSCompiler_StaticMethods_btr_mem(a,a.modrm_resolve(b),a.reg16s[b>>2&14]):a.reg16[b<<1&14]=JSCompiler_StaticMethods_btr_reg(a,a.reg16[b<<1&14],a.reg16s[b>>2&14]&15)};table0F_32[179]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192>b?JSCompiler_StaticMethods_btr_mem(a,a.modrm_resolve(b),a.reg32s[b>>3&7]):a.reg32s[b&7]=JSCompiler_StaticMethods_btr_reg(a,a.reg32s[b&7],a.reg32s[b>>3&7]&31)};
table0F_16[180]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192<=b&&JSCompiler_StaticMethods_trigger_ud(a);JSCompiler_StaticMethods_lss16(a,4,a.modrm_resolve(b),b>>2&14)};table0F_32[180]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192<=b&&JSCompiler_StaticMethods_trigger_ud(a);JSCompiler_StaticMethods_lss32(a,4,a.modrm_resolve(b),b>>3&7)};
table0F_16[181]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192<=b&&JSCompiler_StaticMethods_trigger_ud(a);JSCompiler_StaticMethods_lss16(a,5,a.modrm_resolve(b),b>>2&14)};table0F_32[181]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192<=b&&JSCompiler_StaticMethods_trigger_ud(a);JSCompiler_StaticMethods_lss32(a,5,a.modrm_resolve(b),b>>3&7)};
table0F_16[182]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b)):a.reg8[b<<2&12|b>>2&1];a.reg16[b>>2&14]=c};table0F_32[182]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b)):a.reg8[b<<2&12|b>>2&1];a.reg32s[b>>3&7]=c};
table0F_16[183]=table0F_32[183]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.reg32s[b>>3&7]=c};table0F_16[184]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14];a.reg16[b>>2&14]=JSCompiler_StaticMethods_popcnt(a,c)};
table0F_32[184]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7];a.reg32s[b>>3&7]=JSCompiler_StaticMethods_popcnt(a,c)};table0F_16[185]=table0F_32[185]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[186]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);switch(b>>3&7){case 4:192>b?JSCompiler_StaticMethods_bt_mem(a,a.modrm_resolve(b),JSCompiler_StaticMethods_read_imm8(a)&15):JSCompiler_StaticMethods_bt_reg(a,a.reg16[b<<1&14],JSCompiler_StaticMethods_read_imm8(a)&15);break;case 5:192>b?JSCompiler_StaticMethods_bts_mem(a,a.modrm_resolve(b),JSCompiler_StaticMethods_read_imm8(a)):a.reg16[b<<1&14]=JSCompiler_StaticMethods_bts_reg(a,a.reg16[b<<1&14],JSCompiler_StaticMethods_read_imm8(a)&
15);break;case 6:192>b?JSCompiler_StaticMethods_btr_mem(a,a.modrm_resolve(b),JSCompiler_StaticMethods_read_imm8(a)):a.reg16[b<<1&14]=JSCompiler_StaticMethods_btr_reg(a,a.reg16[b<<1&14],JSCompiler_StaticMethods_read_imm8(a)&15);break;case 7:192>b?JSCompiler_StaticMethods_btc_mem(a,a.modrm_resolve(b),JSCompiler_StaticMethods_read_imm8(a)):a.reg16[b<<1&14]=JSCompiler_StaticMethods_btc_reg(a,a.reg16[b<<1&14],JSCompiler_StaticMethods_read_imm8(a)&15);break;default:JSCompiler_StaticMethods_trigger_ud(a)}};
table0F_32[186]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);switch(b>>3&7){case 4:192>b?JSCompiler_StaticMethods_bt_mem(a,a.modrm_resolve(b),JSCompiler_StaticMethods_read_imm8(a)&31):JSCompiler_StaticMethods_bt_reg(a,a.reg32s[b&7],JSCompiler_StaticMethods_read_imm8(a)&31);break;case 5:192>b?JSCompiler_StaticMethods_bts_mem(a,a.modrm_resolve(b),JSCompiler_StaticMethods_read_imm8(a)):a.reg32s[b&7]=JSCompiler_StaticMethods_bts_reg(a,a.reg32s[b&7],JSCompiler_StaticMethods_read_imm8(a)&31);
break;case 6:192>b?JSCompiler_StaticMethods_btr_mem(a,a.modrm_resolve(b),JSCompiler_StaticMethods_read_imm8(a)):a.reg32s[b&7]=JSCompiler_StaticMethods_btr_reg(a,a.reg32s[b&7],JSCompiler_StaticMethods_read_imm8(a)&31);break;case 7:192>b?JSCompiler_StaticMethods_btc_mem(a,a.modrm_resolve(b),JSCompiler_StaticMethods_read_imm8(a)):a.reg32s[b&7]=JSCompiler_StaticMethods_btc_reg(a,a.reg32s[b&7],JSCompiler_StaticMethods_read_imm8(a)&31);break;default:JSCompiler_StaticMethods_trigger_ud(a)}};
table0F_16[187]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192>b?JSCompiler_StaticMethods_btc_mem(a,a.modrm_resolve(b),a.reg16s[b>>2&14]):a.reg16[b<<1&14]=JSCompiler_StaticMethods_btc_reg(a,a.reg16[b<<1&14],a.reg16s[b>>2&14]&15)};table0F_32[187]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192>b?JSCompiler_StaticMethods_btc_mem(a,a.modrm_resolve(b),a.reg32s[b>>3&7]):a.reg32s[b&7]=JSCompiler_StaticMethods_btc_reg(a,a.reg32s[b&7],a.reg32s[b>>3&7]&31)};
table0F_16[188]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14],d=a.reg16;var e=a.reg16[b>>2&14];a.flags_changed=0;0===c?(a.flags|=64,a=e):(a.flags&=-65,a=Math.int_log2(-c&c));d[b>>2&14]=a};
table0F_32[188]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7],d=a.reg32s;var e=a.reg32s[b>>3&7];a.flags_changed=0;0===c?(a.flags|=64,a=e):(a.flags&=-65,a=Math.int_log2((-c&c)>>>0));d[b>>3&7]=a};
table0F_16[189]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b)):a.reg16[b<<1&14],d=a.reg16;var e=a.reg16[b>>2&14];a.flags_changed=0;0===c?(a.flags|=64,a=e):(a.flags&=-65,a=Math.int_log2(c));d[b>>2&14]=a};
table0F_32[189]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read32s(a,a.modrm_resolve(b)):a.reg32s[b&7],d=a.reg32s;var e=a.reg32s[b>>3&7];a.flags_changed=0;0===c?(a.flags|=64,a=e):(a.flags&=-65,a=Math.int_log2(c>>>0));d[b>>3&7]=a};table0F_16[190]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b))<<24>>24:a.reg8s[b<<2&12|b>>2&1];a.reg16[b>>2&14]=c};
table0F_32[190]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read8(a,a.modrm_resolve(b))<<24>>24:a.reg8s[b<<2&12|b>>2&1];a.reg32s[b>>3&7]=c};table0F_16[191]=table0F_32[191]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c=192>b?JSCompiler_StaticMethods_safe_read16(a,a.modrm_resolve(b))<<16>>16:a.reg16s[b<<1&14];a.reg32s[b>>3&7]=c};
table0F_16[192]=table0F_32[192]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d;192>b?(d=JSCompiler_StaticMethods_translate_address_write(a,a.modrm_resolve(b)),c=JSCompiler_StaticMethods_read8(a.memory,d)):c=a.reg8[b<<2&12|b>>2&1];var e=b>>1&12|b>>5&1,f=a.reg8[e];a.reg8[e]=c;c=a.add(c,f,7);192>b?JSCompiler_StaticMethods_write8(a.memory,d,c):a.reg8[b<<2&12|b>>2&1]=c};
table0F_16[193]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4095===(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+1),c=JSCompiler_StaticMethods_virt_boundary_read16(a,d,e)):c=JSCompiler_StaticMethods_read16(a.memory,d)):c=a.reg16[b<<1&14];var f=b>>2&14,g=a.reg16[f];a.reg16[f]=c;c=a.add(c,g,15);192>b?e?JSCompiler_StaticMethods_virt_boundary_write16(a,d,e,c):JSCompiler_StaticMethods_write16(a.memory,
d,c):a.reg16[b<<1&14]=c};
table0F_32[193]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a),c,d,e=0;192>b?(c=a.modrm_resolve(b),d=JSCompiler_StaticMethods_translate_address_write(a,c),a.paging&&4093<=(c&4095)?(e=JSCompiler_StaticMethods_translate_address_write(a,c+3),c=JSCompiler_StaticMethods_virt_boundary_read32s(a,d,e)):c=JSCompiler_StaticMethods_read32s(a.memory,d)):c=a.reg32s[b&7];var f=b>>3&7,g=a.reg32s[f];a.reg32s[f]=c;c=a.add(c,g,31);192>b?e?JSCompiler_StaticMethods_virt_boundary_write32(a,d,e,c):JSCompiler_StaticMethods_write32(a.memory,
d,c):a.reg32s[b&7]=c};table0F_16[194]=table0F_32[194]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[195]=table0F_32[195]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[196]=table0F_32[196]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[197]=table0F_32[197]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[198]=table0F_32[198]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[199]=table0F_32[199]=function(a){var b=JSCompiler_StaticMethods_read_imm8(a);192<=b&&JSCompiler_StaticMethods_trigger_ud(a);b=a.modrm_resolve(b);JSCompiler_StaticMethods_writable_or_pagefault(a,b,8);var c=JSCompiler_StaticMethods_safe_read32s(a,b),d=JSCompiler_StaticMethods_safe_read32s(a,b+4);a.reg32s[0]===c&&a.reg32s[2]===d?(a.flags|=64,JSCompiler_StaticMethods_safe_write32(a,b,a.reg32s[3]),JSCompiler_StaticMethods_safe_write32(a,b+4,a.reg32s[1])):(a.flags&=-65,a.reg32s[0]=c,a.reg32s[2]=
d);a.flags_changed&=-65};table0F_16[200]=table0F_32[200]=function(a){JSCompiler_StaticMethods_bswap(a,0)};table0F_16[201]=table0F_32[201]=function(a){JSCompiler_StaticMethods_bswap(a,1)};table0F_16[202]=table0F_32[202]=function(a){JSCompiler_StaticMethods_bswap(a,2)};table0F_16[203]=table0F_32[203]=function(a){JSCompiler_StaticMethods_bswap(a,3)};table0F_16[204]=table0F_32[204]=function(a){JSCompiler_StaticMethods_bswap(a,4)};
table0F_16[205]=table0F_32[205]=function(a){JSCompiler_StaticMethods_bswap(a,5)};table0F_16[206]=table0F_32[206]=function(a){JSCompiler_StaticMethods_bswap(a,6)};table0F_16[207]=table0F_32[207]=function(a){JSCompiler_StaticMethods_bswap(a,7)};table0F_16[208]=table0F_32[208]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[209]=table0F_32[209]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[210]=table0F_32[210]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[211]=table0F_32[211]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[212]=table0F_32[212]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[213]=table0F_32[213]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[214]=table0F_32[214]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[215]=table0F_32[215]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[216]=table0F_32[216]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[217]=table0F_32[217]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[218]=table0F_32[218]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[219]=table0F_32[219]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[220]=table0F_32[220]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[221]=table0F_32[221]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[222]=table0F_32[222]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[223]=table0F_32[223]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[224]=table0F_32[224]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[225]=table0F_32[225]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[226]=table0F_32[226]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[227]=table0F_32[227]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[228]=table0F_32[228]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[229]=table0F_32[229]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[230]=table0F_32[230]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[231]=table0F_32[231]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[232]=table0F_32[232]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[233]=table0F_32[233]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[234]=table0F_32[234]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[235]=table0F_32[235]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[236]=table0F_32[236]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[237]=table0F_32[237]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[238]=table0F_32[238]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[239]=table0F_32[239]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[240]=table0F_32[240]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[241]=table0F_32[241]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[242]=table0F_32[242]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[243]=table0F_32[243]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[244]=table0F_32[244]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[245]=table0F_32[245]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[246]=table0F_32[246]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[247]=table0F_32[247]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[248]=table0F_32[248]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[249]=table0F_32[249]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[250]=table0F_32[250]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[251]=table0F_32[251]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[252]=table0F_32[252]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};
table0F_16[253]=table0F_32[253]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[254]=table0F_32[254]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};table0F_16[255]=table0F_32[255]=function(a){JSCompiler_StaticMethods_trigger_ud(a)};"use strict";function JSCompiler_StaticMethods_jmp_rel16(a,b){var c=a.segment_offsets[1];a.instruction_pointer-=c;a.instruction_pointer=a.instruction_pointer+b&65535;a.instruction_pointer=a.instruction_pointer+c|0;a.last_instr_jump=!0}
function JSCompiler_StaticMethods_jmpcc16(a,b){b?JSCompiler_StaticMethods_jmp_rel16(a,JSCompiler_StaticMethods_read_imm16(a)):a.instruction_pointer=a.instruction_pointer+2|0;a.last_instr_jump=!0}function JSCompiler_StaticMethods_jmpcc32(a,b){if(b){var c=JSCompiler_StaticMethods_read_imm32s(a);a.instruction_pointer=a.instruction_pointer+c|0}else a.instruction_pointer=a.instruction_pointer+4|0;a.last_instr_jump=!0}JSCompiler_prototypeAlias=v86.prototype;
JSCompiler_prototypeAlias.loop=function(){if(--this.regv[this.reg_vcx]){var a=JSCompiler_StaticMethods_read_imm8s(this);this.instruction_pointer=this.instruction_pointer+a|0}else this.instruction_pointer++;this.last_instr_jump=!0};JSCompiler_prototypeAlias.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};
JSCompiler_prototypeAlias.getpf=function(){return this.flags_changed&4?154020>>((this.last_result^this.last_result>>4)&15)&4:this.flags&4};function JSCompiler_StaticMethods_getaf(a){return a.flags_changed&16?(a.last_op1^a.last_op2^a.last_add_result)&16:a.flags&16}JSCompiler_prototypeAlias.getzf=function(){return this.flags_changed&64?(~this.last_result&this.last_result-1)>>>this.last_op_size&1:this.flags&64};
JSCompiler_prototypeAlias.getsf=function(){return this.flags_changed&128?this.last_result>>>this.last_op_size&1:this.flags&128};JSCompiler_prototypeAlias.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};JSCompiler_prototypeAlias.test_o=v86.prototype.getof;JSCompiler_prototypeAlias.test_b=v86.prototype.getcf;JSCompiler_prototypeAlias.test_z=v86.prototype.getzf;
JSCompiler_prototypeAlias.test_s=v86.prototype.getsf;JSCompiler_prototypeAlias.test_p=v86.prototype.getpf;function JSCompiler_StaticMethods_test_be(a){return a.getcf()||a.getzf()}function JSCompiler_StaticMethods_test_l(a){return!a.getsf()!==!a.getof()}function JSCompiler_StaticMethods_test_le(a){return a.getzf()||!a.getsf()!==!a.getof()}
function JSCompiler_StaticMethods_push16(a,b){var c=JSCompiler_StaticMethods_get_stack_pointer(a,-2);JSCompiler_StaticMethods_safe_write16(a,c,b);a.stack_reg[a.reg_vsp]-=2}function JSCompiler_StaticMethods_push32(a,b){var c=JSCompiler_StaticMethods_get_stack_pointer(a,-4);JSCompiler_StaticMethods_safe_write32(a,c,b);a.stack_reg[a.reg_vsp]-=4}
function JSCompiler_StaticMethods_pop16(a){var b=JSCompiler_StaticMethods_safe_read16(a,a.segment_offsets[2]+a.stack_reg[a.reg_vsp]|0);a.stack_reg[a.reg_vsp]+=2;return b}function JSCompiler_StaticMethods_pop32s(a){var b=JSCompiler_StaticMethods_safe_read32s(a,a.segment_offsets[2]+a.stack_reg[a.reg_vsp]|0);a.stack_reg[a.reg_vsp]+=4;return b}function JSCompiler_StaticMethods_xchg16r(a,b){var c=a.reg16[0];a.reg16[0]=a.reg16[b];a.reg16[b]=c}
function JSCompiler_StaticMethods_xchg32r(a,b){var c=a.reg32s[0];a.reg32s[0]=a.reg32s[b];a.reg32s[b]=c}function JSCompiler_StaticMethods_lss16(a,b,c,d){var e=JSCompiler_StaticMethods_safe_read16(a,c);c=JSCompiler_StaticMethods_safe_read16(a,c+2|0);JSCompiler_StaticMethods_switch_seg(a,b,c);a.reg16[d]=e}
function JSCompiler_StaticMethods_lss32(a,b,c,d){var e=JSCompiler_StaticMethods_safe_read32s(a,c);c=JSCompiler_StaticMethods_safe_read16(a,c+4|0);JSCompiler_StaticMethods_switch_seg(a,b,c);a.reg32s[d]=e}function JSCompiler_StaticMethods_bswap(a,b){var c=a.reg32s[b];a.reg32s[b]=c>>>24|c<<24|c>>8&65280|c<<8&16711680}JSCompiler_prototypeAlias.run=function(){this.running||this.v86$next_tick()};
function JSCompiler_StaticMethods_main_run(a){if(a.stopped)a.stopped=a.running=!1;else{a.running=!0;try{a.in_hlt?a.hlt_loop():a.do_run()}catch(b){a.exception_cleanup(b)}}}JSCompiler_prototypeAlias.stop=function(){this.running&&(this.stopped=!0)};function JSCompiler_StaticMethods_restart(a){var b=a.running;a.stopped=!0;a.running=!1;setTimeout(function(){a.devices.ps2.destroy();a.devices.vga.destroy();a.init(a.current_settings);b&&a.v86$next_tick()},10)}
JSCompiler_prototypeAlias.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,JSCompiler_StaticMethods_update_address_size(this),this.operand_size_32=this.is_32,JSCompiler_StaticMethods_update_operand_size(this),this.v86$next_tick();else throw this.running=!1,console.log(a),console.log(a.stack),a;};
function JSCompiler_StaticMethods_lazy_init(a){"undefined"!==typeof setImmediate?a.v86$next_tick=function(){setImmediate(function(){JSCompiler_StaticMethods_main_run(a)})}:"undefined"!==typeof window&&"undefined"!==typeof postMessage?(window.addEventListener("message",function(b){b.source===window&&43605===b.data&&JSCompiler_StaticMethods_main_run(a)},!1),a.v86$next_tick=function(){window.postMessage(43605,"*")}):a.v86$next_tick=function(){setTimeout(function(){JSCompiler_StaticMethods_main_run(a)},
0)};"object"===typeof performance&&performance.now?a.microtick=function(){return performance.now()}:a.microtick=Date.now}
JSCompiler_prototypeAlias.init=function(a){this.first_init&&(this.first_init=!1,JSCompiler_StaticMethods_lazy_init(this));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.last_virt_eip=-1;JSCompiler_StaticMethods_update_operand_size(this);JSCompiler_StaticMethods_update_address_size(this);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 b=new IO(this.memory);this.io=b;var c=a.bios,d=a.vga_bios;if(c){var e=new Uint8Array(c);this.memory.mem8.set(e,1048576-c.byteLength);d&&(e=new Uint8Array(d),this.memory.mem8.set(e,786432));b.mmap_register(4293918720,1048576,function(a){return this.memory.mem8[a&1048575]}.bind(this),function(a,b){this.memory.mem8[a&1048575]=b}.bind(this));this.instruction_pointer=
1048560;JSCompiler_StaticMethods_switch_seg(this,2,48);this.reg16[8]=256}else a.linux?(this.instruction_pointer=65536,JSCompiler_StaticMethods_write_blob(this.memory,new Uint8Array(a.linux.vmlinux),1048576),JSCompiler_StaticMethods_write_blob(this.memory,new Uint8Array(a.linux.linuxstart),this.instruction_pointer),a.linux.root&&(JSCompiler_StaticMethods_write_blob(this.memory,new Uint8Array(a.linux.root),4194304),this.reg32s[3]=a.linux.root.byteLength),JSCompiler_StaticMethods_write_string(this.memory,
a.linux.cmdline),this.reg32s[0]=this.memory_size,this.reg32s[1]=63488,JSCompiler_StaticMethods_switch_seg(this,1,0),JSCompiler_StaticMethods_switch_seg(this,2,0),JSCompiler_StaticMethods_switch_seg(this,3,0),JSCompiler_StaticMethods_switch_seg(this,0,0),JSCompiler_StaticMethods_switch_seg(this,5,0),JSCompiler_StaticMethods_switch_seg(this,4,0),this.protected_mode=this.stack_size_32=this.operand_size_32=this.address_size_32=this.is_32=!0,JSCompiler_StaticMethods_update_operand_size(this),JSCompiler_StaticMethods_update_address_size(this),
this.regv=this.reg32s,this.reg_vsp=4,this.reg_vbp=5,this.cr0=1):(JSCompiler_StaticMethods_switch_seg(this,2,48),this.reg16[8]=256,this.instruction_pointer=0);var f=0;b.register_read(146,function(){return f});b.register_write(146,function(a){f=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)))};JSCompiler_prototypeAlias.do_run=function(){var a=Date.now(),b=a;for(this.devices.vga.timer(b);33>b-a;){this.devices.pit.timer(b,!1);this.devices.rtc.timer(b,!1);JSCompiler_StaticMethods_handle_irqs(this);for(b=11001;b--;)JSCompiler_StaticMethods_cycle(this);b=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);
function JSCompiler_StaticMethods_cycle(a){a.timestamp_counter++;a.previous_ip=a.instruction_pointer;var b=JSCompiler_StaticMethods_read_imm8(a);a.table[b](a)}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);this.v86$next_tick()};
function JSCompiler_StaticMethods_cr0_changed(a){var b=-2147483648===(a.cr0&-2147483648);a.fpu||(a.cr0|=4);a.cr0|=16;b!==a.paging&&(a.paging=b,JSCompiler_StaticMethods_full_clear_tlb(a))}
function JSCompiler_StaticMethods_read_imm8(a){a.instruction_pointer&-4096^a.last_virt_eip&&(a.eip_phys=JSCompiler_StaticMethods_translate_address_read(a,a.instruction_pointer)^a.instruction_pointer,a.last_virt_eip=a.instruction_pointer&-4096);var b=a.memory.mem8[a.eip_phys^a.instruction_pointer]|0;a.instruction_pointer=a.instruction_pointer+1|0;return b}function JSCompiler_StaticMethods_read_imm8s(a){return JSCompiler_StaticMethods_read_imm8(a)<<24>>24}
function JSCompiler_StaticMethods_read_imm16(a){if(4094<(a.instruction_pointer^a.last_virt_eip)>>>0)return JSCompiler_StaticMethods_read_imm8(a)|JSCompiler_StaticMethods_read_imm8(a)<<8;var b=JSCompiler_StaticMethods_read16(a.memory,a.eip_phys^a.instruction_pointer);a.instruction_pointer=a.instruction_pointer+2|0;return b}
function JSCompiler_StaticMethods_read_imm32s(a){if(4092<(a.instruction_pointer^a.last_virt_eip)>>>0)return JSCompiler_StaticMethods_read_imm16(a)|JSCompiler_StaticMethods_read_imm16(a)<<16;var b=JSCompiler_StaticMethods_read32s(a.memory,a.eip_phys^a.instruction_pointer);a.instruction_pointer=a.instruction_pointer+4|0;return b}function JSCompiler_StaticMethods_virt_boundary_read16(a,b,c){return JSCompiler_StaticMethods_read8(a.memory,b)|JSCompiler_StaticMethods_read8(a.memory,c)<<8}
function JSCompiler_StaticMethods_virt_boundary_read32s(a,b,c){var d;d=b&1?b&2?JSCompiler_StaticMethods_read_aligned16(a.memory,c-2>>1):JSCompiler_StaticMethods_read_aligned16(a.memory,b+1>>1):JSCompiler_StaticMethods_virt_boundary_read16(a,b+1,c-1);return JSCompiler_StaticMethods_read8(a.memory,b)|d<<8|JSCompiler_StaticMethods_read8(a.memory,c)<<24}
function JSCompiler_StaticMethods_virt_boundary_write16(a,b,c,d){JSCompiler_StaticMethods_write8(a.memory,b,d);JSCompiler_StaticMethods_write8(a.memory,c,d>>8)}
function JSCompiler_StaticMethods_virt_boundary_write32(a,b,c,d){JSCompiler_StaticMethods_write8(a.memory,b,d);JSCompiler_StaticMethods_write8(a.memory,c,d>>24);b&1?b&2?(JSCompiler_StaticMethods_write8(a.memory,c-2,d>>8),JSCompiler_StaticMethods_write8(a.memory,c-1,d>>16)):(JSCompiler_StaticMethods_write8(a.memory,b+1,d>>8),JSCompiler_StaticMethods_write8(a.memory,b+2,d>>16)):(JSCompiler_StaticMethods_write8(a.memory,b+1,d>>8),JSCompiler_StaticMethods_write8(a.memory,c-1,d>>16))}
function JSCompiler_StaticMethods_safe_read8(a,b){return JSCompiler_StaticMethods_read8(a.memory,JSCompiler_StaticMethods_translate_address_read(a,b))}function JSCompiler_StaticMethods_safe_read16(a,b){return a.paging&&4095===(b&4095)?JSCompiler_StaticMethods_safe_read8(a,b)|JSCompiler_StaticMethods_safe_read8(a,b+1)<<8:JSCompiler_StaticMethods_read16(a.memory,JSCompiler_StaticMethods_translate_address_read(a,b))}
function JSCompiler_StaticMethods_safe_read32s(a,b){return a.paging&&4093<=(b&4095)?JSCompiler_StaticMethods_safe_read16(a,b)|JSCompiler_StaticMethods_safe_read16(a,b+2)<<16:JSCompiler_StaticMethods_read32s(a.memory,JSCompiler_StaticMethods_translate_address_read(a,b))}function JSCompiler_StaticMethods_safe_write8(a,b,c){JSCompiler_StaticMethods_write8(a.memory,JSCompiler_StaticMethods_translate_address_write(a,b),c)}
function JSCompiler_StaticMethods_safe_write16(a,b,c){var d=JSCompiler_StaticMethods_translate_address_write(a,b);4095===(b&4095)?JSCompiler_StaticMethods_virt_boundary_write16(a,d,JSCompiler_StaticMethods_translate_address_write(a,b+1),c):JSCompiler_StaticMethods_write16(a.memory,d,c)}
function JSCompiler_StaticMethods_safe_write32(a,b,c){var d=JSCompiler_StaticMethods_translate_address_write(a,b);4093<=(b&4095)?JSCompiler_StaticMethods_virt_boundary_write32(a,d,JSCompiler_StaticMethods_translate_address_write(a,b+3),c):JSCompiler_StaticMethods_write32(a.memory,d,c)}
function JSCompiler_StaticMethods_read_moffs(a){return a.address_size_32?JSCompiler_StaticMethods_get_seg_prefix(a,3)+JSCompiler_StaticMethods_read_imm32s(a)|0:JSCompiler_StaticMethods_get_seg_prefix(a,3)+JSCompiler_StaticMethods_read_imm16(a)|0}function JSCompiler_StaticMethods_load_eflags(a){a.flags=a.flags&-2262|!!a.getcf()|!!a.getpf()<<2|!!JSCompiler_StaticMethods_getaf(a)<<4|!!a.getzf()<<6|!!a.getsf()<<7|!!a.getof()<<11;a.flags_changed=0}
function JSCompiler_StaticMethods_update_eflags(a,b){var c=1769472,d=2588629;a.flags&131072?(c|=12288,d|=1572864):a.cpl&&(c|=12288,a.cpl>(a.flags>>12&3)&&(c|=512));a.flags=(b^(a.flags^b)&c)&d|2;a.flags_changed=0}function JSCompiler_StaticMethods_get_stack_pointer(a,b){return a.segment_offsets[2]+a.stack_reg[a.reg_vsp]+b|0}function JSCompiler_StaticMethods_get_real_eip(a){return a.instruction_pointer-a.segment_offsets[1]|0}
function JSCompiler_StaticMethods_call_interrupt_vector(a,b,c,d){a.in_hlt=!1;if(a.protected_mode){if(a.flags&131072&&a.cr4&1)throw a.debug.unimpl("VME");a.flags&131072&&c&&3>(a.flags>>12&3)&&JSCompiler_StaticMethods_trigger_gp(a,0);if((b<<3|7)>a.idtr_size)throw a.debug.unimpl("#GP handler");var e=a.idtr_offset+(b<<3)|0;a.paging&&(e=JSCompiler_StaticMethods_translate_address_system_read(a,e));var f=JSCompiler_StaticMethods_read16(a.memory,e)|JSCompiler_StaticMethods_read16(a.memory,e+6)<<16,g=JSCompiler_StaticMethods_read16(a.memory,
e+2),e=JSCompiler_StaticMethods_read8(a.memory,e+5),k=e>>5&3;if(0===(e&128))throw a.debug.unimpl("#NP handler");c&&k<a.cpl&&JSCompiler_StaticMethods_trigger_gp(a,b<<3|2);e&=31;if(14===e)b=!1;else if(15===e)b=!0;else{if(5===e)throw a.debug.unimpl("call int to task gate");if(6===e)throw a.debug.unimpl("16 bit interrupt gate");if(7===e)throw a.debug.unimpl("16 bit trap gate");throw a.debug.unimpl("#GP handler");}c=JSCompiler_StaticMethods_lookup_segment_selector(a,g);if(c.is_null)throw a.debug.unimpl("#GP handler");
if(!c.is_executable||c.dpl>a.cpl)throw a.debug.unimpl("#GP handler");if(!c.is_present)throw a.debug.unimpl("#NP handler");JSCompiler_StaticMethods_load_eflags(a);e=a.flags;if(!c.dc_bit&&c.dpl<a.cpl){var l=(c.dpl<<3)+4;if(l+5>a.segment_limits[6])throw a.debug.unimpl("#TS handler");l=l+a.segment_offsets[6]|0;a.paging&&(l=JSCompiler_StaticMethods_translate_address_system_read(a,l));var k=JSCompiler_StaticMethods_read32s(a.memory,l),l=JSCompiler_StaticMethods_read16(a.memory,l+4),m=JSCompiler_StaticMethods_lookup_segment_selector(a,
l);if(m.is_null)throw a.debug.unimpl("#TS handler");if(m.rpl!==c.dpl)throw a.debug.unimpl("#TS handler");if(m.dpl!==c.dpl||!m.rw_bit)throw a.debug.unimpl("#TS handler");if(!m.is_present)throw a.debug.unimpl("#TS handler");var m=a.reg32s[4],n=a.sreg[2];a.cpl=c.dpl;a.last_virt_eip=-1;a.is_32!==c.size&&JSCompiler_StaticMethods_update_cs_size(a,c.size);a.flags&=-196609;a.reg32s[4]=k;JSCompiler_StaticMethods_switch_seg(a,2,l);e&131072&&(JSCompiler_StaticMethods_push32(a,a.sreg[5]),JSCompiler_StaticMethods_push32(a,
a.sreg[4]),JSCompiler_StaticMethods_push32(a,a.sreg[3]),JSCompiler_StaticMethods_push32(a,a.sreg[0]));JSCompiler_StaticMethods_push32(a,n);JSCompiler_StaticMethods_push32(a,m)}else if(c.dc_bit||c.dpl===a.cpl)a.flags&131072&&JSCompiler_StaticMethods_trigger_gp(a,g&-4);else throw a.debug.unimpl("#GP handler");JSCompiler_StaticMethods_push32(a,e);JSCompiler_StaticMethods_push32(a,a.sreg[1]);JSCompiler_StaticMethods_push32(a,JSCompiler_StaticMethods_get_real_eip(a));e&131072&&(JSCompiler_StaticMethods_switch_seg(a,
5,0),JSCompiler_StaticMethods_switch_seg(a,4,0),JSCompiler_StaticMethods_switch_seg(a,3,0),JSCompiler_StaticMethods_switch_seg(a,0,0));!1!==d&&JSCompiler_StaticMethods_push32(a,d);a.sreg[1]=g;a.is_32!==c.size&&JSCompiler_StaticMethods_update_cs_size(a,c.size);a.segment_limits[1]=c.effective_limit;a.segment_offsets[1]=c.base;a.instruction_pointer=a.segment_offsets[1]+f|0;b?JSCompiler_StaticMethods_handle_irqs(a):a.flags&=-513}else JSCompiler_StaticMethods_load_eflags(a),JSCompiler_StaticMethods_push16(a,
a.flags),JSCompiler_StaticMethods_push16(a,a.sreg[1]),JSCompiler_StaticMethods_push16(a,JSCompiler_StaticMethods_get_real_eip(a)),a.flags&=-513,JSCompiler_StaticMethods_switch_seg(a,1,JSCompiler_StaticMethods_read16(a.memory,(b<<2)+2)),a.instruction_pointer=a.segment_offsets[1]+JSCompiler_StaticMethods_read16(a.memory,b<<2)|0;a.last_instr_jump=!0}
function JSCompiler_StaticMethods_trigger_de(a){a.instruction_pointer=a.previous_ip;JSCompiler_StaticMethods_call_interrupt_vector(a,0,!1,!1);throw 233495534;}function JSCompiler_StaticMethods_trigger_ud(a){a.instruction_pointer=a.previous_ip;JSCompiler_StaticMethods_call_interrupt_vector(a,6,!1,!1);throw 233495534;}function JSCompiler_StaticMethods_trigger_nm(a){a.instruction_pointer=a.previous_ip;JSCompiler_StaticMethods_call_interrupt_vector(a,7,!1,!1);throw 233495534;}
function JSCompiler_StaticMethods_trigger_gp(a,b){a.instruction_pointer=a.previous_ip;JSCompiler_StaticMethods_call_interrupt_vector(a,13,!1,b);throw 233495534;}function JSCompiler_StaticMethods_seg_prefix(a,b){a.segment_prefix=b;a.table[JSCompiler_StaticMethods_read_imm8(a)](a);a.segment_prefix=-1}function JSCompiler_StaticMethods_get_seg_prefix_ds(a){return JSCompiler_StaticMethods_get_seg_prefix(a,3)}
function JSCompiler_StaticMethods_get_seg_prefix_ss(a){return JSCompiler_StaticMethods_get_seg_prefix(a,2)}function JSCompiler_StaticMethods_get_seg_prefix(a,b){return-1===a.segment_prefix?a.segment_offsets[b]:9===a.segment_prefix?0:a.segment_offsets[a.segment_prefix]}function JSCompiler_StaticMethods_handle_irqs(a){a.devices.pic&&a.flags&512&&!a.page_fault&&a.devices.pic.check_irqs()}
function JSCompiler_StaticMethods_test_privileges_for_io(a,b,c){if(a.protected_mode&&(a.cpl>(a.flags>>12&3)||a.flags&131072)){var d=a.segment_limits[6],e=a.segment_offsets[6];if(103<=d){var f=JSCompiler_StaticMethods_read16(a.memory,JSCompiler_StaticMethods_translate_address_system_read(a,e+100+2));if(d>=f+(b+c-1>>3)&&(c=(1<<c)-1<<(b&7),b=JSCompiler_StaticMethods_translate_address_system_read(a,e+f+(b>>3)),!((c&65280?JSCompiler_StaticMethods_read16(a.memory,b):JSCompiler_StaticMethods_read8(a.memory,
b))&c)))return}JSCompiler_StaticMethods_trigger_gp(a,0)}}function JSCompiler_StaticMethods_update_cs_size(a,b){a.is_32=a.operand_size_32=a.address_size_32=b;JSCompiler_StaticMethods_update_operand_size(a);JSCompiler_StaticMethods_update_address_size(a)}function JSCompiler_StaticMethods_update_operand_size(a){a.operand_size_32?(a.table=a.table32,a.table0F=a.table0F_32):(a.table=a.table16,a.table0F=a.table0F_16)}
function JSCompiler_StaticMethods_update_address_size(a){a.address_size_32?(a.regv=a.reg32s,a.reg_vcx=1,a.reg_vsi=6,a.reg_vdi=7):(a.regv=a.reg16,a.reg_vcx=2,a.reg_vsi=12,a.reg_vdi=14)}
function JSCompiler_StaticMethods_lookup_segment_selector(a,b){var c=0===(b&4),d=b&-8,e,f;e={rpl:b&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=a.gdtr_offset,f=a.gdtr_size):(c=a.segment_offsets[7],f=a.segment_limits[7]);if(0===d)return e.is_null=!0,e;if((b|7)>f)return e.is_valid=!1,e;c=c+d|0;a.paging&&(c=JSCompiler_StaticMethods_translate_address_system_read(a,
c));e.table_offset=c;e.base=JSCompiler_StaticMethods_read16(a.memory,c+2)|JSCompiler_StaticMethods_read8(a.memory,c+4)<<16|JSCompiler_StaticMethods_read8(a.memory,c+7)<<24;e.access=JSCompiler_StaticMethods_read8(a.memory,c+5);e.flags=JSCompiler_StaticMethods_read8(a.memory,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);d=JSCompiler_StaticMethods_read16(a.memory,
c)|(JSCompiler_StaticMethods_read8(a.memory,c+6)&15)<<16;e.effective_limit=e.flags&8?(d<<12|4095)>>>0:d;e.is_writable=e.rw_bit&&!e.is_executable;e.is_readable=e.rw_bit||!e.is_executable;return e}
function JSCompiler_StaticMethods_switch_seg(a,b,c){1===b&&(a.protected_mode=1===(a.cr0&1));if(!a.protected_mode||a.flags&131072)a.sreg[b]=c,a.segment_is_null[b]=0,a.segment_limits[b]=1048575,a.segment_offsets[b]=c<<4;else{var d=JSCompiler_StaticMethods_lookup_segment_selector(a,c);if(2===b){if(d.is_null){JSCompiler_StaticMethods_trigger_gp(a,0);return}if(!d.is_valid||d.is_system||d.rpl!==a.cpl||!d.is_writable||d.dpl!==a.cpl){JSCompiler_StaticMethods_trigger_gp(a,c&-4);return}if(!d.is_present)throw a.instruction_pointer=
a.previous_ip,JSCompiler_StaticMethods_call_interrupt_vector(a,12,!1,c&-4),233495534;(a.stack_size_32=d.size)?(a.stack_reg=a.reg32s,a.reg_vsp=4,a.reg_vbp=5):(a.stack_reg=a.reg16,a.reg_vsp=8,a.reg_vbp=10)}else if(1===b){if(!d.is_executable)throw a.debug.unimpl("#GP handler");if(d.is_system)throw a.debug.unimpl("load system segment descriptor, type = "+(d.access&15));if(d.rpl!==a.cpl)throw a.debug.unimpl("privilege change");if(!d.dc_bit&&d.dpl<a.cpl)throw a.debug.unimpl("inter privilege call");if(!d.dc_bit&&
d.dpl!==a.cpl)throw a.debug.unimpl("#GP handler");d.size!==a.is_32&&JSCompiler_StaticMethods_update_cs_size(a,d.size)}else{if(d.is_null){a.sreg[b]=c;a.segment_is_null[b]=1;return}if(!d.is_valid||d.is_system||!d.is_readable||(!d.is_executable||!d.dc_bit)&&d.rpl>d.dpl&&a.cpl>d.dpl){JSCompiler_StaticMethods_trigger_gp(a,c&-4);return}if(!d.is_present)throw a.instruction_pointer=a.previous_ip,JSCompiler_StaticMethods_call_interrupt_vector(a,11,!1,c&-4),233495534;}a.segment_is_null[b]=0;a.segment_limits[b]=
d.effective_limit;a.segment_offsets[b]=d.base;a.sreg[b]=c}}function JSCompiler_StaticMethods_clear_tlb(a){a.last_virt_eip=-1;a.tlb_info.set(a.tlb_info_global)}function JSCompiler_StaticMethods_full_clear_tlb(a){for(var b=new Int32Array(a.tlb_info_global.buffer),c=0;262144>c;)b[c++]=b[c++]=b[c++]=b[c++]=0;JSCompiler_StaticMethods_clear_tlb(a)}
function JSCompiler_StaticMethods_translate_address_read(a,b){var c;a.paging?3===a.cpl?(c=b>>>12,c=a.tlb_info[c]&4?a.tlb_data[c]^b:JSCompiler_StaticMethods_do_page_translation(a,b,0,1)|b&4095):c=JSCompiler_StaticMethods_translate_address_system_read(a,b):c=b;return c}
function JSCompiler_StaticMethods_translate_address_write(a,b){var c;a.paging?3===a.cpl?(c=b>>>12,c=a.tlb_info[c]&8?a.tlb_data[c]^b:JSCompiler_StaticMethods_do_page_translation(a,b,1,1)|b&4095):(c=b>>>12,c=a.tlb_info[c]&2?a.tlb_data[c]^b:JSCompiler_StaticMethods_do_page_translation(a,b,1,0)|b&4095):c=b;return c}function JSCompiler_StaticMethods_translate_address_system_read(a,b){var c=b>>>12;return a.tlb_info[c]&1?a.tlb_data[c]^b:JSCompiler_StaticMethods_do_page_translation(a,b,0,0)|b&4095}
function JSCompiler_StaticMethods_do_page_translation(a,b,c,d){var e=b>>>12,f=(a.cr3>>>2)+(e>>10),g=a.memory.mem32s[f],k=!0,l=!0;g&1||(a.cr2=b,JSCompiler_StaticMethods_trigger_pagefault(a,c,d,0));0===(g&2)&&(k=!1,c&&(d||a.cr0&65536)&&(a.cr2=b,JSCompiler_StaticMethods_trigger_pagefault(a,c,d,1)));0===(g&4)&&(l=!1,d&&(a.cr2=b,JSCompiler_StaticMethods_trigger_pagefault(a,c,d,1)));if(g&a.page_size_extensions)a.memory.mem32s[f]=g|32|c<<6,b=g&4290772992|b&4190208,g=g&256;else{var m=((g&4294963200)>>>2)+
(e&1023),n=a.memory.mem32s[m];0===(n&1)&&(a.cr2=b,JSCompiler_StaticMethods_trigger_pagefault(a,c,d,0));0===(n&2)&&(k=!1,c&&(d||a.cr0&65536)&&(a.cr2=b,JSCompiler_StaticMethods_trigger_pagefault(a,c,d,1)));0===(n&4)&&(l=!1,d&&(a.cr2=b,JSCompiler_StaticMethods_trigger_pagefault(a,c,d,1)));a.memory.mem32s[f]=g|32;a.memory.mem32s[m]=n|32|c<<6;b=n&4294963200;g=n&256}a.tlb_data[e]=b^e<<12;k=l?k?15:5:k?3:1;a.tlb_info[e]=k;g&&a.cr4&128&&(a.tlb_info_global[e]=k);return b}
function JSCompiler_StaticMethods_writable_or_pagefault(a,b,c){if(a.paging){var d=3===a.cpl?1:0,e=d?8:2,f=b>>>12;0===(a.tlb_info[f]&e)&&JSCompiler_StaticMethods_do_page_translation(a,b,1,d);4096<=(b&4095)+c-1&&0===(a.tlb_info[f+1]&e)&&JSCompiler_StaticMethods_do_page_translation(a,b+c-1,1,d)}}
function JSCompiler_StaticMethods_trigger_pagefault(a,b,c,d){if(a.page_fault)throw a.debug.unimpl("Double fault");var e=a.cr2>>>12;a.tlb_info[e]=0;a.tlb_info_global[e]=0;a.instruction_pointer=a.previous_ip;a.page_fault=!0;JSCompiler_StaticMethods_call_interrupt_vector(a,14,!1,c<<2|b<<1|d);throw 233495534;}"object"===typeof window&&(window.v86=v86,v86.prototype.run=v86.prototype.run,v86.prototype.stop=v86.prototype.stop);function IO(a){function b(){return 255}function c(){}for(var d=a.size,e=Array(65539),f=Array(65539),g=0;65539>g;g++)e[g]=b,f[g]=c;this.register_read=function(a,b,c){void 0!==c&&(b=b.bind(c));e[a]=b};this.register_write=function(a,b,c){void 0!==c&&(b=b.bind(c));f[a]=b};this.mmap_read32_shim=function(b){var c=a.memory_map_read8[b>>>14];return c(b)|c(b+1)<<8|c(b+2)<<16|c(b+3)<<24};this.mmap_write32_shim=function(b,c){var d=a.memory_map_write8[b>>>14];d(b,c&255);d(b+1,c>>8&255);d(b+2,c>>16&255);d(b+3,
c>>>24)};this.mmap_register=function(b,c,d,e,f,g){f||(f=this.mmap_read32_shim.bind(this));g||(g=this.mmap_write32_shim.bind(this));for(b>>>=14;0<c;b++)a.memory_map_registered[b]=1,a.memory_map_read8[b]=d,a.memory_map_write8[b]=e,a.memory_map_read32[b]=f,a.memory_map_write32[b]=g,c-=16384};for(g=0;g<<14<d;g++)a.memory_map_read8[g]=a.memory_map_write8[g]=void 0,a.memory_map_read32[g]=a.memory_map_write32[g]=void 0;this.mmap_register(d,4294967296-d,function(){return 255},function(){});this.in_mmap_range=
function(b,c){b>>>=0;var e=b+(c>>>0);if(e>=d)return!0;for(b&=-16384;b<e;){if(a.memory_map_registered[b>>14])return!0;b+=16384}return!1};this.port_write8=function(a,b){f[a](b,a)};this.port_write16=function(a,b){f[a](b&255,a);f[a+1](b>>8,a)};this.port_write32=function(a,b){f[a](b&255,a);f[a+1](b>>8&255,a);f[a+2](b>>16&255,a);f[a+3](b>>>24,a)};this.port_read8=function(a){return e[a](a)};this.port_read16=function(a){return e[a](a)|e[a+1](a)<<8};this.port_read32=function(a){return e[a](a)|e[a+1](a)<<8|
e[a+2](a)<<16|e[a+3](a)<<24}};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"]],b={},c=0;c<a.length;c++)b[a[c][0]]=a[c][1];return b};function dbg_assert(){}String.pads=function(a,b){for(a=a?a+"":"";a.length<b;)a+=" ";return a};
String.pad0=function(a,b){for(a=a?a+"":"";a.length<b;)a="0"+a;return a};function h(a){return a?a.toString(16).toUpperCase():String.pad0("",1)}function SyncBuffer(a){this.byteLength=a.byteLength;this.get=function(b,c,d){d(new Uint8Array(a,b,c))};this.set=function(b,c,d){(new Uint8Array(a,b,c.byteLength)).set(c);d()};this.get_buffer=function(b){b(a)}}"object"===typeof window&&(window.SyncBuffer=SyncBuffer);Math.int_log2=function(a){return Math.log(a)/Math.LN2|0};
function ByteQueue(a){var b=new Uint8Array(a),c,d;this.length=0;this.push=function(c){this.length!==a&&this.length++;b[d]=c;d=d+1&a-1};this.shift=function(){if(this.length){var d=b[c];c=c+1&a-1;this.length--;return d}return-1};this.ByteQueue$clear=function(){this.length=d=c=0};this.ByteQueue$clear()};function FPU(a){this.cpu=a;this._st=new Float64Array(8);this._st8=new Uint8Array(this._st.buffer);new Int32Array(this._st.buffer);this._stack_empty=255;this._stack_ptr=0;this._control_word=895;this._fpu_dp_selector=this._fpu_dp=this._fpu_opcode=this._fpu_ip_selector=this._fpu_ip=this._status_word=0;this.float32=new Float32Array(1);new Uint8Array(this.float32.buffer);this.float32_int=new Int32Array(this.float32.buffer);this.float64=new Float64Array(1);this.float64_byte=new Uint8Array(this.float64.buffer);
this.float64_int=new Int32Array(this.float64.buffer);this.indefinite_nan=NaN;this.constants=new Float64Array([1,Math.log(10)/Math.LN2,Math.LOG2E,Math.PI,Math.log(2)/Math.LN10,Math.LN2,0])}
FPU.prototype._state_restore=function(){this.float32=new Float32Array(1);new Uint8Array(this.float32.buffer);this.float32_int=new Int32Array(this.float32.buffer);this.float64=new Float64Array(1);this.float64_byte=new Uint8Array(this.float64.buffer);this.float64_int=new Int32Array(this.float64.buffer);this._st8=new Uint8Array(this._st.buffer);new Int32Array(this._st.buffer)};function JSCompiler_StaticMethods__fpu_unimpl(a){JSCompiler_StaticMethods_trigger_ud(a.cpu)}
function JSCompiler_StaticMethods__invalid_arithmatic(a){a._status_word|=1}function JSCompiler_StaticMethods__fcom(a,b){var c=JSCompiler_StaticMethods__get_st0(a);a._status_word&=-18177;c>b||(a._status_word=b>c?a._status_word|256:c===b?a._status_word|16384:a._status_word|17664)}function JSCompiler_StaticMethods__fcomi(a,b){var c=a._st[a._stack_ptr];a.cpu.flags_changed&=-70;a.cpu.flags&=-70;c>b||(a.cpu.flags=b>c?a.cpu.flags|1:c===b?a.cpu.flags|64:a.cpu.flags|69)}
function JSCompiler_StaticMethods__finit(a){a._control_word=895;a._status_word=0;a._fpu_ip=0;a._fpu_dp=0;a._fpu_opcode=0;a._stack_empty=255;a._stack_ptr=0}
function JSCompiler_StaticMethods__fstenv(a,b){if(a.cpu.operand_size_32){JSCompiler_StaticMethods_writable_or_pagefault(a.cpu,b,26);JSCompiler_StaticMethods_safe_write16(a.cpu,b,a._control_word);JSCompiler_StaticMethods_safe_write16(a.cpu,b+4,a._status_word&-14337|a._stack_ptr<<11);for(var c=0,d,e=0;8>e;e++)d=a._st[e],a._stack_empty>>e&1?c|=3<<(e<<1):0===d?c|=1<<(e<<1):isFinite(d)||(c|=2<<(e<<1));JSCompiler_StaticMethods_safe_write16(a.cpu,b+8,c);JSCompiler_StaticMethods_safe_write32(a.cpu,b+12,a._fpu_ip);
JSCompiler_StaticMethods_safe_write16(a.cpu,b+16,a._fpu_ip_selector);JSCompiler_StaticMethods_safe_write16(a.cpu,b+18,a._fpu_opcode);JSCompiler_StaticMethods_safe_write32(a.cpu,b+20,a._fpu_dp);JSCompiler_StaticMethods_safe_write16(a.cpu,b+24,a._fpu_dp_selector)}else JSCompiler_StaticMethods__fpu_unimpl(a)}
function JSCompiler_StaticMethods__fldenv(a,b){if(a.cpu.operand_size_32){a._control_word=JSCompiler_StaticMethods_safe_read16(a.cpu,b);var c=JSCompiler_StaticMethods_safe_read16(a.cpu,b+4);a._status_word=c&-14337;a._stack_ptr=c>>11&7;for(var c=JSCompiler_StaticMethods_safe_read16(a.cpu,b+8),d=a._stack_empty=0;8>d;d++)a._stack_empty|=c>>d&c>>d+1&1<<d;a._fpu_ip=JSCompiler_StaticMethods_safe_read32s(a.cpu,b+12);a._fpu_ip_selector=JSCompiler_StaticMethods_safe_read16(a.cpu,b+16);a._fpu_opcode=JSCompiler_StaticMethods_safe_read16(a.cpu,
b+18);a._fpu_dp=JSCompiler_StaticMethods_safe_read32s(a.cpu,b+20);a._fpu_dp_selector=JSCompiler_StaticMethods_safe_read16(a.cpu,b+24)}else JSCompiler_StaticMethods__fpu_unimpl(a)}function JSCompiler_StaticMethods__integer_round(a,b){var c=a._control_word>>10&3;return 0===c?(c=Math.round(b),.5===c-b&&c%2&&c--,c):1===c||3===c&&0<b?Math.floor(b):Math.ceil(b)}function JSCompiler_StaticMethods__truncate(a){return 0<a?Math.floor(a):Math.ceil(a)}
function JSCompiler_StaticMethods__push(a,b){a._stack_ptr=a._stack_ptr-1&7;a._stack_empty>>a._stack_ptr&1?(a._status_word&=-513,a._stack_empty&=~(1<<a._stack_ptr),a._st[a._stack_ptr]=b):(a._status_word|=512,a._status_word|=65,a._st[a._stack_ptr]=a.indefinite_nan)}function JSCompiler_StaticMethods__pop(a){a._stack_empty|=1<<a._stack_ptr;a._stack_ptr=a._stack_ptr+1&7}
function JSCompiler_StaticMethods__get_sti(a,b){b=b+a._stack_ptr&7;return a._stack_empty>>b&1?(a._status_word&=-513,a._status_word|=65,a.indefinite_nan):a._st[b]}function JSCompiler_StaticMethods__get_st0(a){return a._stack_empty>>a._stack_ptr&1?(a._status_word&=-513,a._status_word|=65,a.indefinite_nan):a._st[a._stack_ptr]}
function JSCompiler_StaticMethods__load_m80(a,b){var c=JSCompiler_StaticMethods_safe_read16(a.cpu,b+8),d,e=JSCompiler_StaticMethods_safe_read32s(a.cpu,b)>>>0,f=JSCompiler_StaticMethods_safe_read32s(a.cpu,b+4)>>>0;d=c>>15;c&=-32769;if(0===c)return 0;if(!(32767>c))return a.float64_byte[7]=127|d<<7,a.float64_byte[6]=240|f>>30<<3&8,a.float64_byte[5]=0,a.float64_byte[4]=0,a.float64_int[0]=0,a.float64[0];e+=4294967296*f;d&&(e=-e);return e*Math.pow(2,c-16383-63)}
function JSCompiler_StaticMethods__store_m80(a,b,c){a.float64[0]=a._st[a._stack_ptr+c&7];c=a.float64_byte[7]&128;var d=(a.float64_byte[7]&127)<<4|a.float64_byte[6]>>4,e,f;2047===d?(d=32767,e=0,f=2147483648|(a.float64_int[1]&524288)<<11):0===d?f=e=0:(d+=15360,e=a.float64_int[0]<<11,f=2147483648|(a.float64_int[1]&1048575)<<11|a.float64_int[0]>>>21);JSCompiler_StaticMethods_safe_write32(a.cpu,b,e);JSCompiler_StaticMethods_safe_write32(a.cpu,b+4,f);JSCompiler_StaticMethods_safe_write16(a.cpu,b+8,c<<8|
d)}function JSCompiler_StaticMethods__load_m64(a,b){var c=JSCompiler_StaticMethods_safe_read32s(a.cpu,b),d=JSCompiler_StaticMethods_safe_read32s(a.cpu,b+4);a.float64_int[0]=c;a.float64_int[1]=d;return a.float64[0]}
function JSCompiler_StaticMethods__store_m64(a,b){JSCompiler_StaticMethods_writable_or_pagefault(a.cpu,b,8);a.float64[0]=JSCompiler_StaticMethods__get_sti(a,0);JSCompiler_StaticMethods_safe_write32(a.cpu,b,a.float64_int[0]);JSCompiler_StaticMethods_safe_write32(a.cpu,b+4,a.float64_int[1])}function JSCompiler_StaticMethods__load_m32(a,b){a.float32_int[0]=JSCompiler_StaticMethods_safe_read32s(a.cpu,b);return a.float32[0]};function IDEDevice(a,b,c,d){0===d?(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=b;this.sector_size=c?2048:512;this.is_atapi=c;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)),c?(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.read_status,
this);a.io.register_read(this.ata_port_high|2,this.read_status,this);a.io.register_write(this.ata_port|7,this.write_control,this);a.io.register_write(this.ata_port_high|2,this.write_control,this);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.read_data_port,this);a.io.register_read(this.ata_port|1,this.read_data_port,this);a.io.register_read(this.ata_port|2,this.read_data_port,this);a.io.register_read(this.ata_port|3,this.read_data_port,this);a.io.register_read(this.ata_port|4,function(){return this.cylinder_low&255},this);a.io.register_read(this.ata_port|5,function(){return this.cylinder_high&255},
this);a.io.register_read(this.ata_port|6,function(){return this.drive_head},this);a.io.register_write(this.ata_port|0,this.write_data_port,this);a.io.register_write(this.ata_port|1,this.write_data_port,this);a.io.register_write(this.ata_port|2,this.write_data_port,this);a.io.register_write(this.ata_port|3,this.write_data_port,this);a.io.register_write(this.ata_port|4,function(a){this.cylinder_low=(this.cylinder_low<<8|a)&65535},this);a.io.register_write(this.ata_port|5,function(a){this.cylinder_high=
(this.cylinder_high<<8|a)&65535},this);a.io.register_write(this.ata_port|6,function(a){a&16||(this.drive_head=a,this.is_lba=a>>6&1,this.head=a&15)},this);a.io.register_write(this.ata_port|7,this.ata_command,this);a.io.register_read(49156,this.dma_read_addr0,this);a.io.register_read(49157,this.dma_read_addr1,this);a.io.register_read(49158,this.dma_read_addr2,this);a.io.register_read(49159,this.dma_read_addr3,this);a.io.register_write(49156,this.dma_set_addr0,this);a.io.register_write(49157,this.dma_set_addr1,
this);a.io.register_write(49158,this.dma_set_addr2,this);a.io.register_write(49159,this.dma_set_addr3,this);a.io.register_read(49154,this.dma_read_status,this);a.io.register_write(49154,this.dma_write_status,this);a.io.register_read(49152,this.dma_read_command,this);a.io.register_write(49152,this.dma_write_command,this)}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:JSCompiler_StaticMethods_ata_read_sectors(this,
a);break;case 48:case 52:case 57:if(48===a){var b=this.bytecount&255,c=this.is_lba?JSCompiler_StaticMethods_get_lba28(this):JSCompiler_StaticMethods_get_chs(this);0===b&&(b=256)}else if(52===a||57===a)b=this.bytecount,c=JSCompiler_StaticMethods_get_lba48(this),0===b&&(b=65536);a=b*this.sector_size;c=c*this.sector_size;this.cylinder_low+=b;c+a>this.buffer.byteLength?this.status=255:(this.status=80,this.next_status=88,JSCompiler_StaticMethods_allocate_in_buffer(this,a),this.write_dest=c,this.data_port_callback=
"do_write");this.push_irq();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,JSCompiler_StaticMethods_allocate_in_buffer(this,12),this.data_port_callback="atapi_handle",this.bytecount=1,this.push_irq());break;case 161:this.is_atapi?(JSCompiler_StaticMethods_create_identify_packet(this),this.status=88):this.status=80;this.push_irq();break;case 198:this.sectors_per_drq=this.bytecount;this.push_irq();break;case 200:JSCompiler_StaticMethods_ata_read_sectors_dma(this);
break;case 202:JSCompiler_StaticMethods_ata_write_dma(this);break;case 225:this.push_irq();break;case 236:if(this.is_atapi)break;JSCompiler_StaticMethods_create_identify_packet(this);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?JSCompiler_StaticMethods_atapi_read_dma(this,this.data_port_buffer):JSCompiler_StaticMethods_atapi_read(this,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};JSCompiler_prototypeAlias=IDEDevice.prototype;JSCompiler_prototypeAlias.read_status=function(){var a=this.status;0<=this.next_status&&(this.status=this.next_status,this.next_status=-1);return a};
JSCompiler_prototypeAlias.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))};function JSCompiler_StaticMethods_allocate_in_buffer(a,b){b>a.data_port_buffer.length&&(a.data_port_buffer=new Uint8Array(b));a.data_port_count=b;a.data_port_current=0}
function JSCompiler_StaticMethods_atapi_read(a,b){var c=(b[7]<<8|b[8])*a.sector_size,d=(a.cylinder_high&255)<<8|a.cylinder_low&255,e=(b[2]<<24|b[3]<<16|b[4]<<8|b[5])*a.sector_size;d||(d=32768);d=Math.min(c,d);a.cylinder_low=d&255;a.cylinder_high=d>>8&255;e>=a.buffer.byteLength?(a.status=255,a.push_irq()):(c=Math.min(c,a.buffer.byteLength-e),a.status=128,a.stats.loading=!0,a.buffer.get(e,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(a)))}
function JSCompiler_StaticMethods_atapi_read_dma(a,b){var c=(b[7]<<8|b[8])*a.sector_size,d=(b[2]<<24|b[3]<<16|b[4]<<8|b[5])*a.sector_size;d>=a.buffer.byteLength?(a.status=255,a.push_irq()):(c=Math.min(c,a.buffer.byteLength-d),a.status=128,a.stats.loading=!0,a.buffer.get(d,c,function(a){var b=this.prdt_addr,d=0;do{var k=JSCompiler_StaticMethods_read32s(this.memory,b),l=JSCompiler_StaticMethods_read16(this.memory,b+4),m=JSCompiler_StaticMethods_read8(this.memory,b+7)&128;l||(l=65536);JSCompiler_StaticMethods_write_blob(this.memory,
a.subarray(d,d+l),k);d+=l;b+=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(a)))}
JSCompiler_prototypeAlias.read_data_port=function(a){if(a===this.ata_port)return this.data_pointer<this.pio_data.length?(0!==(this.data_pointer+1)%(512*this.sectors_per_drq)&&this.data_pointer+1!==this.pio_data.length||this.push_irq(),this.cylinder_low?this.cylinder_low--:this.cylinder_high&&(this.cylinder_high--,this.cylinder_low=255),this.cylinder_low||this.cylinder_high||(a=this.pio_data.length-this.data_pointer-1,65536<=a?(this.cylinder_high=240,this.cylinder_low=0):(this.cylinder_high=a>>8,this.cylinder_low=
a)),this.data_pointer+1>=this.pio_data.length&&(this.status=80),a=this.pio_data[this.data_pointer++]):(this.data_pointer++,a=0),a;if(a===(this.ata_port|1))return this.lba_count&255;if(a===(this.ata_port|2))return this.bytecount&255;if(a===(this.ata_port|3))return this.sector&255};
JSCompiler_prototypeAlias.write_data_port=function(a,b){if(b===this.ata_port){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]()}else b===(this.ata_port|1)?this.lba_count=(this.lba_count<<8|a)&65535:b===(this.ata_port|2)?this.bytecount=(this.bytecount<<8|a)&65535:b===(this.ata_port|3)&&(this.sector=
(this.sector<<8|a)&65535)};
function JSCompiler_StaticMethods_ata_read_sectors(a,b){if(32===b||196===b){var c=a.bytecount&255,d=a.is_lba?JSCompiler_StaticMethods_get_lba28(a):JSCompiler_StaticMethods_get_chs(a);0===c&&(c=256)}else if(36===b||41===b)c=a.bytecount,d=JSCompiler_StaticMethods_get_lba48(a),0===c&&(c=65536);var e=c*a.sector_size,d=d*a.sector_size;a.cylinder_low+=c;d+e>a.buffer.byteLength?(a.status=255,a.push_irq()):(a.status=128,a.stats.loading=!0,a.buffer.get(d,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(a)))}
function JSCompiler_StaticMethods_ata_read_sectors_dma(a){var b=a.bytecount&255,c=b*a.sector_size,d=JSCompiler_StaticMethods_get_lba28(a)*a.sector_size;a.cylinder_low+=b;d+c>a.buffer.byteLength?(a.status=255,a.push_irq()):(a.status=128,a.dma_status|=1,a.stats.loading=!0,a.buffer.get(d,c,function(a){var b=this.prdt_addr,d=0;do{var k=JSCompiler_StaticMethods_read32s(this.memory,b),l=JSCompiler_StaticMethods_read16(this.memory,b+4),m=JSCompiler_StaticMethods_read8(this.memory,b+7)&128;l||(l=65536);JSCompiler_StaticMethods_write_blob(this.memory,
a.subarray(d,d+l),k);d+=l;b+=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(a)))}
function JSCompiler_StaticMethods_ata_write_dma(a){var b=a.bytecount&255,c=b*a.sector_size,d=JSCompiler_StaticMethods_get_lba28(a)*a.sector_size;a.cylinder_low+=b;if(d+c>a.buffer.byteLength)a.status=255,a.push_irq();else{a.status=128;a.dma_status|=1;var b=a.prdt_addr,e=0,f=0,g=0;do{var k=JSCompiler_StaticMethods_read32s(a.memory,b),l=JSCompiler_StaticMethods_read16(a.memory,b+4),m=JSCompiler_StaticMethods_read8(a.memory,b+7)&128;l||(l=65536);a.buffer.set(d+g,a.memory.mem8.subarray(k,k+l),function(){f++;
f===e&&(this.status=80,this.push_irq(),this.dma_status&=-4,this.dma_status|=4)}.bind(a));g+=l;b+=8;e++}while(!m);f===e&&(a.status=80,a.push_irq(),a.dma_status&=-4,a.dma_status|=4);a.stats.sectors_written+=c/a.sector_size|0;a.stats.bytes_written+=c}}function JSCompiler_StaticMethods_get_chs(a){return((a.cylinder_low&255|a.cylinder_high<<8&65280)*a.head_count+a.head)*a.IDEDevice$sectors_per_track+(a.sector&255)-1}
function JSCompiler_StaticMethods_get_lba28(a){return a.sector&255|a.cylinder_low<<8&65280|a.cylinder_high<<16&16711680}function JSCompiler_StaticMethods_get_lba48(a){return(a.sector&255|a.cylinder_low<<8&65280|a.cylinder_high<<16&16711680|a.sector>>8<<24&4278190080)>>>0}
function JSCompiler_StaticMethods_create_identify_packet(a){a.data_pointer=0;a.drive_head&16?a.pio_data=new Uint8Array(0):(a.pio_data=new Uint8Array([64,a.is_atapi?133:0,a.cylinder_count,a.cylinder_count>>8,0,0,a.head_count,a.head_count>>8,0,0,0,0,a.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,a.cylinder_count,a.cylinder_count>>8,a.head_count,a.head_count>>8,a.IDEDevice$sectors_per_track,0,a.sector_count&255,a.sector_count>>8&255,a.sector_count>>16&255,a.sector_count>>24&255,0,0,a.sector_count&255,a.sector_count>>8&255,a.sector_count>>16&255,a.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,a.sector_count&255,a.sector_count>>8&255,a.sector_count>>
16&255,a.sector_count>>24&255]),16383<a.cylinder_count&&(a.pio_data[2]=a.pio_data[108]=255,a.pio_data[3]=a.pio_data[109]=63))}JSCompiler_prototypeAlias.dma_read_addr0=function(){return this.prdt_addr&255};JSCompiler_prototypeAlias.dma_read_addr1=function(){return this.prdt_addr>>8&255};JSCompiler_prototypeAlias.dma_read_addr2=function(){return this.prdt_addr>>16&255};JSCompiler_prototypeAlias.dma_read_addr3=function(){return this.prdt_addr>>24&255};
JSCompiler_prototypeAlias.dma_set_addr0=function(a){this.prdt_addr=this.prdt_addr&-256|a};JSCompiler_prototypeAlias.dma_set_addr1=function(a){this.prdt_addr=this.prdt_addr&-65281|a<<8};JSCompiler_prototypeAlias.dma_set_addr2=function(a){this.prdt_addr=this.prdt_addr&-16711681|a<<16};JSCompiler_prototypeAlias.dma_set_addr3=function(a){this.prdt_addr=this.prdt_addr&16777215|a<<24};JSCompiler_prototypeAlias.dma_read_status=function(){return this.dma_status};
JSCompiler_prototypeAlias.dma_write_status=function(a){this.dma_status&=~a};JSCompiler_prototypeAlias.dma_read_command=function(){return 1};JSCompiler_prototypeAlias.dma_write_command=function(a){a&1&&this.push_irq()};function PCI(a){function b(a){var b=c[2]<<8|c[1],d=c[0]&252,e=k[b],b=l[b];e&&3===a&&16<=d&&40>d&&(a=d-16>>2,b=b.pci_bars,a<b.length&&b[a]||(e[d>>2]=0))}a=a.io;var c=new Uint8Array(4),d=new Uint8Array(4),e=new Uint8Array(4);new Int32Array(c.buffer);var f=new Int32Array(d.buffer),g=new Int32Array(e.buffer),k=Array(65536),l=Array(65536);a.register_write(3324,function(){b(0)});a.register_write(3325,function(){b(1)});a.register_write(3326,function(){b(2)});a.register_write(3327,function(){b(3)});a.register_read(3324,
function(){return d[0]});a.register_read(3325,function(){return d[1]});a.register_read(3326,function(){return d[2]});a.register_read(3327,function(){return d[3]});a.register_read(3320,function(){return e[0]});a.register_read(3321,function(){return e[1]});a.register_read(3322,function(){return e[2]});a.register_read(3323,function(){return e[3]});a.register_write(3320,function(a){c[0]=a});a.register_write(3321,function(a){c[1]=a});a.register_write(3322,function(a){c[2]=a});a.register_write(3323,function(a){c[3]=
a;a=c[0]&252;var b=k[c[2]<<8|c[1]];void 0!==b?(g[0]=-2147483648,f[0]=a<b.byteLength?b[a>>2]:-1):(f[0]=-1,g[0]=0)});this.register_device=function(a){var b=a.pci_id;k[b]=new Int32Array((new Uint8Array(a.pci_space)).buffer);l[b]=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,b){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=b;this.last_cylinder=0;if(b){this.floppy_size=b.byteLength;var c,d;if((d={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=d.type,c=d.sectors,d=d.heads;else throw"Unknown floppy size: "+h(b.byteLength);this.FloppyController$sectors_per_track=
c;this.number_of_heads=d;this.io.register_read(1008,this.port3F0_read,this);this.io.register_read(1010,this.port3F2_read,this);this.io.register_read(1012,this.port3F4_read,this);this.io.register_read(1013,this.port3F5_read,this);this.io.register_read(1015,this.port3F7_read,this);this.io.register_write(1010,this.port3F2_write,this);this.io.register_write(1013,this.port3F5_write,this)}else this.type=4}JSCompiler_prototypeAlias=FloppyController.prototype;JSCompiler_prototypeAlias.port3F0_read=function(){return 0};
JSCompiler_prototypeAlias.port3F4_read=function(){var a=128;this.response_index<this.response_length&&(a|=80);0===(dor&8)&&(a|=32);return a};JSCompiler_prototypeAlias.port3F7_read=function(){return 0};JSCompiler_prototypeAlias.port3F5_read=function(){return this.response_index<this.response_length?this.response_data[this.response_index++]:255};
JSCompiler_prototypeAlias.port3F5_write=function(a){if(0<this.bytes_expecting)this.receiving_command[this.receiving_index++]=a,this.bytes_expecting--,0===this.bytes_expecting&&this.next_command.call(this,this.receiving_command);else{switch(a){case 3:this.next_command=this.fix_drive_data;this.bytes_expecting=2;break;case 4:this.next_command=this.check_drive_status;this.bytes_expecting=1;break;case 5:case 197:this.next_command=function(a){JSCompiler_StaticMethods_do_sector(this,!0,a)};this.bytes_expecting=
8;break;case 230:this.next_command=function(a){JSCompiler_StaticMethods_do_sector(this,!1,a)};this.bytes_expecting=8;break;case 7:this.next_command=this.calibrate;this.bytes_expecting=1;break;case 8:this.response_index=0;this.response_length=2;this.response_data[0]=32;this.response_data[1]=this.last_cylinder;break;case 74:this.next_command=this.read_sector_id;this.bytes_expecting=1;break;case 15:this.bytes_expecting=2;this.next_command=this.FloppyController_prototype$seek;break;case 14:this.response_data[0]=
128,this.response_index=0,this.response_length=1,this.bytes_expecting=0}this.receiving_index=0}};var dor=0;JSCompiler_prototypeAlias=FloppyController.prototype;JSCompiler_prototypeAlias.port3F2_read=function(){return dor};JSCompiler_prototypeAlias.port3F2_write=function(a){4===(a&4)&&0===(dor&4)&&this.pic.push_irq(6);dor=a};JSCompiler_prototypeAlias.check_drive_status=function(){this.response_index=0;this.response_length=1;this.response_data[0]=32};
JSCompiler_prototypeAlias.FloppyController_prototype$seek=function(a){this.last_cylinder=a[1];dor&8&&this.pic.push_irq(6)};JSCompiler_prototypeAlias.calibrate=function(){dor&8&&this.pic.push_irq(6)};
function JSCompiler_StaticMethods_do_sector(a,b,c){var d=c[2],e=c[1],f=c[3],g=((d+a.number_of_heads*e)*a.FloppyController$sectors_per_track+f-1)*(128<<c[4]);b?JSCompiler_StaticMethods_do_write(a.dma,a.fda_image,g,a.done.bind(a,c,e,d,f)):JSCompiler_StaticMethods_do_read(a.dma,a.fda_image,g,a.done.bind(a,c,e,d,f))}
JSCompiler_prototypeAlias.done=function(a,b,c,d,e){e||(d++,d>this.FloppyController$sectors_per_track&&(d=1,c++,c>=this.number_of_heads&&(c=0,a++)),this.last_cylinder=a,this.response_index=0,this.response_length=7,this.response_data[0]=c<<2|32,this.response_data[1]=0,this.response_data[2]=0,this.response_data[3]=a,this.response_data[4]=c,this.response_data[5]=d,this.response_data[6]=b[4],dor&8&&this.pic.push_irq(6))};JSCompiler_prototypeAlias.fix_drive_data=function(){};
JSCompiler_prototypeAlias.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,b){this.mem8=new Uint8Array(a);this.mem16=new Uint16Array(a);this.mem32s=new Int32Array(a);this.buffer=a;this.size=b;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)};
function JSCompiler_StaticMethods_mmap_read16(a,b){var c=a.memory_map_read8[b>>>14](b),d;d=b+1;d=a.memory_map_read8[d>>>14](d);return c|d<<8}function JSCompiler_StaticMethods_read8(a,b){return a.memory_map_registered[b>>>14]?a.memory_map_read8[b>>>14](b):a.mem8[b]}function JSCompiler_StaticMethods_read16(a,b){return a.memory_map_registered[b>>>14]?JSCompiler_StaticMethods_mmap_read16(a,b):a.mem8[b]|a.mem8[b+1]<<8}
function JSCompiler_StaticMethods_read_aligned16(a,b){return a.memory_map_registered[b>>>13]?JSCompiler_StaticMethods_mmap_read16(a,b<<1):a.mem16[b]}function JSCompiler_StaticMethods_read32s(a,b){return a.memory_map_registered[b>>>14]?a.memory_map_read32[b>>>14](b):a.mem8[b]|a.mem8[b+1]<<8|a.mem8[b+2]<<16|a.mem8[b+3]<<24}function JSCompiler_StaticMethods_read_aligned32(a,b){var c;a.memory_map_registered[b>>>12]?(c=b<<2,c=a.memory_map_read32[c>>>14](c)):c=a.mem32s[b];return c}
function JSCompiler_StaticMethods_write8(a,b,c){if(a.memory_map_registered[b>>>14])a.memory_map_write8[b>>>14](b,c);else a.mem8[b]=c}function JSCompiler_StaticMethods_write16(a,b,c){a.memory_map_registered[b>>>14]?(a.memory_map_write8[b>>>14](b,c&255),b=b+1,a.memory_map_write8[b>>>14](b,c>>8&255)):(a.mem8[b]=c,a.mem8[b+1]=c>>8)}
function JSCompiler_StaticMethods_write_aligned16(a,b,c){a.memory_map_registered[b>>>13]?(b=b<<1,a.memory_map_write8[b>>>14](b,c&255),b=b+1,a.memory_map_write8[b>>>14](b,c>>8&255)):a.mem16[b]=c}function JSCompiler_StaticMethods_write32(a,b,c){if(a.memory_map_registered[b>>>14])a.memory_map_write32[b>>>14](b,c);else a.mem8[b]=c,a.mem8[b+1]=c>>8,a.mem8[b+2]=c>>16,a.mem8[b+3]=c>>24}
function JSCompiler_StaticMethods_write_aligned32(a,b,c){a.memory_map_registered[b>>>12]?(b=b<<2,a.memory_map_write32[b>>>14](b,c)):a.mem32s[b]=c}function JSCompiler_StaticMethods_write_blob(a,b,c){a.mem8.set(b,c)}function JSCompiler_StaticMethods_write_string(a,b){for(var c=0;c<b.length;c++)JSCompiler_StaticMethods_write8(a,63488+c,b.charCodeAt(c))};function DMA(a){this.io=a.io;this.memory=a.memory;this.channels=[{address:0,count:0},{address:0,count:0},{address:0,count:0},{address:0,count:0}];this.lsb_msb_flipflop=0;this.io.register_write(4,this.port_write.bind(this,4));this.io.register_write(5,this.port_write.bind(this,5));this.io.register_write(10,this.portA_write.bind(this));this.io.register_write(11,this.portB_write.bind(this));this.io.register_write(12,this.portC_write.bind(this));this.io.register_write(129,this.port81_write.bind(this))}
JSCompiler_prototypeAlias=DMA.prototype;JSCompiler_prototypeAlias.port_write=function(a,b){if(8>a){var c=a>>1;a&1?this.channels[c].count=JSCompiler_StaticMethods_flipflop_get(this,this.channels[c].count,b):this.channels[c].address=JSCompiler_StaticMethods_flipflop_get(this,this.channels[c].address,b)}};JSCompiler_prototypeAlias.portA_write=function(){};JSCompiler_prototypeAlias.portB_write=function(){};JSCompiler_prototypeAlias.portC_write=function(){this.lsb_msb_flipflop=0};
JSCompiler_prototypeAlias.port81_write=function(a){this.channels[2].address=this.channels[2].address&65535|a<<16};function JSCompiler_StaticMethods_do_read(a,b,c,d){var e=a.channels[2].count+1,f=a.channels[2].address;if(c+e>b.byteLength)d(!0);else{var g=a.memory;a.channels[2].address+=e;b.get(c,e,function(a){JSCompiler_StaticMethods_write_blob(g,a,f);d(!1)})}}
function JSCompiler_StaticMethods_do_write(a,b,c,d){var e=a.channels[2].count,f=a.channels[2].address;c+e>b.byteLength?d(!0):(a.channels[2].address+=e,b.set(c,new Uint8Array(a.memory.buffer,f,e+1),function(){d(!1)}))}function JSCompiler_StaticMethods_flipflop_get(a,b,c){a.lsb_msb_flipflop^=1;return a.lsb_msb_flipflop?b&-256|c:b&-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 b=this.counter2_out=0;a.io.register_read(97,function(){b^=16;return b|this.counter2_out<<5}.bind(this));a.io.register_read(64,
this.counter_read.bind(this,0));a.io.register_read(65,this.counter_read.bind(this,1));a.io.register_read(66,this.counter_read.bind(this,2));a.io.register_write(64,this.counter_write.bind(this,0));a.io.register_write(65,this.counter_write.bind(this,1));a.io.register_write(66,this.counter_write.bind(this,2));a.io.register_write(67,this.port43_write.bind(this))}
PIT.prototype.timer=function(a,b){var c,d,e=1193.1816666*(a-this.PIT$next_tick)>>>0;if(e){this.PIT$next_tick+=e/1193.1816666;if(!b&&this.counter_enabled[0]&&(c=this.counter_current[0]-=e,0>=c))if(this.pic.push_irq(0),d=this.counter_mode[0],0===d)this.counter_enabled[0]=0,this.counter_current[0]=0;else if(3===d||2===d)this.counter_current[0]=this.counter_reload[0]+c%this.counter_reload[0];this.counter_enabled[2]&&(c=this.counter_current[2]-=e,0>=c&&(d=this.counter_mode[2],0===d?(this.counter2_out=
1,this.counter_enabled[2]=0,this.counter_current[2]=0):2===d?(this.counter2_out=1,this.counter_current[2]=this.counter_reload[2]+c%this.counter_reload[2]):3===d&&(this.counter2_out^=1,this.counter_current[2]=this.counter_reload[2]+c%this.counter_reload[2])))}};
PIT.prototype.counter_read=function(a){var b=this.counter_latch[a];if(b)return this.counter_latch[a]--,2===b?this.counter_latch_value[a]&255:this.counter_latch_value[a]>>8;b=this.counter_next_low[a];3===this.counter_mode[a]&&(this.counter_next_low[a]^=1);return b?this.counter_current[a]&255:this.counter_current[a]>>8};
PIT.prototype.counter_write=function(a,b){this.counter_reload[a]=this.counter_next_low[a]?this.counter_reload[a]&-256|b:this.counter_reload[a]&255|b<<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 b=a>>1&7,c=a>>6&3;a=a>>4&3;3!==c&&(0===a?(this.counter_latch[c]=2,this.counter_latch_value[c]=this.counter_current[c]):(6<=b&&(b&=-5),this.counter_next_low[c]=1===a?0:1,this.counter_mode[c]=b,this.counter_read_mode[c]=a,2===c&&(this.counter2_out=0===b?0:1)))};function VGAScreen(a,b,c){void 0===b?this.VGAScreen$adapter=new VGADummyAdapter:this.VGAScreen$adapter=b;this.vga_memory_size=c;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.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.port3C0_write,this);a.register_read(960,this.port3C0_read,this);a.register_read(961,this.port3C1_read,this);a.register_write(962,this.port3C2_write,
this);a.register_write(964,this.port3C4_write,this);a.register_read(964,this.port3C4_read,this);a.register_write(965,this.port3C5_write,this);a.register_read(965,this.port3C5_read,this);a.register_write(974,this.port3CE_write,this);a.register_read(974,this.port3CE_read,this);a.register_write(975,this.port3CF_write,this);a.register_read(975,this.port3CF_read,this);a.register_write(967,this.port3C7_write,this);a.register_write(968,this.port3C8_write,this);a.register_write(969,this.port3C9_write,this);
a.register_read(972,this.port3CC_read,this);a.register_write(980,this.port3D4_write,this);a.register_write(981,this.port3D5_write,this);a.register_read(981,this.port3D5_read,this);a.register_read(986,this.port3DA_read,this);this.dispi_value=this.dispi_index=-1;this.dispi_enable_value=0;a.register_write(462,this.port1CE_write,this);a.register_write(463,this.port1CF_write,this);a.register_write(464,this.port1D0_write,this);a.register_read(463,this.port1CF_read,this);a.register_read(464,this.port1D0_read,
this);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();a.mmap_register(655360,131072,this.vga_memory_read.bind(this),this.vga_memory_write.bind(this));a.mmap_register(3758096384,this.vga_memory_size,this.svga_memory_read8.bind(this),this.svga_memory_write8.bind(this),this.svga_memory_read32.bind(this),this.svga_memory_write32.bind(this))}
JSCompiler_prototypeAlias=VGAScreen.prototype;
JSCompiler_prototypeAlias._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};
JSCompiler_prototypeAlias.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]};
JSCompiler_prototypeAlias.vga_memory_write=function(a,b){a-=655360;if(this.graphical_mode)if(this.graphical_mode_is_linear){var c=a,d=c<<2,e=this.vga256_palette[b];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[c]=b}else{var f=a;if(!(65535<f)){var g,k=this.planar_mode&3;0===k?c=d=e=g=b:2===k&&(this.plane_write_bm&1&&(c=this.latch0&~this.planar_bitmap|(b&1?255:0)&this.planar_bitmap),
this.plane_write_bm&2&&(d=this.latch1&~this.planar_bitmap|(b&2?255:0)&this.planar_bitmap),this.plane_write_bm&4&&(e=this.latch2&~this.planar_bitmap|(b&4?255:0)&this.planar_bitmap),this.plane_write_bm&8&&(g=this.latch3&~this.planar_bitmap|(b&8?255:0)&this.planar_bitmap));if(0===k||2===k){switch(this.planar_rotate_reg&24){case 8:c&=this.latch0;d&=this.latch1;e&=this.latch2;g&=this.latch3;break;case 16:c|=this.latch0;d|=this.latch1;e|=this.latch2;g|=this.latch3;break;case 24:c^=this.latch0,d^=this.latch1,
e^=this.latch2,g^=this.latch3}this.plane_write_bm&1&&(c=this.latch0&~this.planar_bitmap|c&this.planar_bitmap);this.plane_write_bm&2&&(d=this.latch1&~this.planar_bitmap|d&this.planar_bitmap);this.plane_write_bm&4&&(e=this.latch2&~this.planar_bitmap|e&this.planar_bitmap);this.plane_write_bm&8&&(g=this.latch3&~this.planar_bitmap|g&this.planar_bitmap)}else 1===k&&(c=this.latch0,d=this.latch1,e=this.latch2,g=this.latch3);this.plane_write_bm&1?this.plane0[f]=c:c=this.plane0[f];this.plane_write_bm&2?this.plane1[f]=
d:d=this.plane1[f];this.plane_write_bm&4?this.plane2[f]=e:e=this.plane2[f];this.plane_write_bm&8?this.plane3[f]=g:g=this.plane3[f];if(!(f>=this.screen_width*this.screen_height<<3))for(d<<=1,e<<=2,g<<=3,f=(f<<3|7)<<2,k=0;8>k;k++){var l=this.vga256_palette[this.dac_map[c>>k&1|d>>k&2|e>>k&4|g>>k&8]];this.VGAScreen$adapter.put_pixel_linear(f|2,l>>16);this.VGAScreen$adapter.put_pixel_linear(f|1,l>>8&255);this.VGAScreen$adapter.put_pixel_linear(f,l&255);f-=4}}}else c=a,98304>c||(e=(c-98304>>1)-this.start_address,
d=e/this.max_cols|0,e%=this.max_cols,c&1?(f=b,g=this.vga_memory[c&-2]):(g=b,f=this.vga_memory[c|1]),this.VGAScreen$adapter.put_char(d,e,g,this.vga256_palette[f>>4&15],this.vga256_palette[f&15]),this.vga_memory[c]=b)};JSCompiler_prototypeAlias.update_cursor=function(){var a=(this.cursor_address-this.start_address)/this.max_cols|0,b=(this.cursor_address-this.start_address)%this.max_cols,a=Math.min(this.max_rows-1,a);this.VGAScreen$adapter.update_cursor(a,b)};
JSCompiler_prototypeAlias.svga_memory_read8=function(a){return this.svga_memory[a&268435455]};JSCompiler_prototypeAlias.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]};
JSCompiler_prototypeAlias.svga_memory_write8=function(a,b){a&=268435455;this.svga_memory[a]=b;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,b);break;case 24:this.VGAScreen$adapter.put_pixel_linear((a<<2)/3|0,b);break;case 16:if(a&1){var c=this.svga_memory16[a>>1],d,e;e=255*(b>>3&31)/31|0;d=255*(c>>5&63)/63|0;c=255*(c&31)/31|0;a<<=1;this.VGAScreen$adapter.put_pixel_linear(a,c);this.VGAScreen$adapter.put_pixel_linear(a-
1,d);this.VGAScreen$adapter.put_pixel_linear(a-2,e)}break;case 8:d=this.vga256_palette[b],e=a<<2,this.VGAScreen$adapter.put_pixel_linear(e,d>>16&255),this.VGAScreen$adapter.put_pixel_linear(e|1,d>>8&255),this.VGAScreen$adapter.put_pixel_linear(e|2,d&255)}};
JSCompiler_prototypeAlias.svga_memory_write32=function(a,b){a&=268435455;if(a&3||32!==this.svga_bpp)this.svga_memory_write8(a,b&255),this.svga_memory_write8(a+1,b>>8&255),this.svga_memory_write8(a+2,b>>16&255),this.svga_memory_write8(a+3,b>>24&255);else if(this.svga_memory32[a>>2]=b,this.svga_enabled&&(a-=this.svga_offset,!(0>a)))switch(this.svga_bpp){case 32:this.VGAScreen$adapter.put_pixel_linear32(a,b)}};
JSCompiler_prototypeAlias.timer=function(){if(this.do_complete_redraw)if(this.do_complete_redraw=!1,this.svga_enabled){var a=this.svga_offset,b=this.svga_height*this.svga_width,c=0;if(32===this.svga_bpp)for(var d=new Int32Array(this.svga_memory.buffer),a=a>>2,b=b<<2;c<b;)this.VGAScreen$adapter.put_pixel_linear32(c,d[a++]),c+=4;else if(24===this.svga_bpp)for(b<<=2;c<b;)this.VGAScreen$adapter.put_pixel_linear(c++,this.svga_memory[a++]),this.VGAScreen$adapter.put_pixel_linear(c++,this.svga_memory[a++]),
this.VGAScreen$adapter.put_pixel_linear(c++,this.svga_memory[a++]),c++}else if(this.graphical_mode){if(!this.graphical_mode_is_linear)for(b=a=0;b<this.screen_height;b++)for(c=0;c<this.screen_width;c+=8){for(d=0;8>d;d++)this.VGAScreen$adapter.put_pixel_linear32(b*this.screen_width+c<<2,this.vga256_palette[this.dac_map[this.plane0[a]>>d&1|this.plane1[a]>>d<<1&2|this.plane2[a]>>d<<2&4|this.plane3[a]>>d<<3&8]]);a++}}else for(a=98304|this.start_address<<1,d=0;d<this.max_rows;d++)for(var e=0;e<this.max_cols;e++)b=
this.vga_memory[a],c=this.vga_memory[a|1],this.VGAScreen$adapter.put_char(d,e,b,this.vga256_palette[c>>4&15],this.vga256_palette[c&15]),a+=2;this.VGAScreen$adapter.timer()};JSCompiler_prototypeAlias.destroy=function(){};JSCompiler_prototypeAlias.set_size_text=function(a,b){this.max_cols=a;this.max_rows=b;this.VGAScreen$adapter.set_size_text(a,b)};JSCompiler_prototypeAlias.set_size_graphical=function(a,b){this.VGAScreen$adapter.set_size_graphical(a,b)};
JSCompiler_prototypeAlias.update_cursor_scanline=function(){this.VGAScreen$adapter.update_cursor_scanline(this.cursor_scanline_start,this.cursor_scanline_end)};
function JSCompiler_StaticMethods_set_video_mode(a,b){var c=!1;switch(b){case 3:a.set_size_text(80,25);break;case 16:a.screen_width=640;a.screen_height=350;c=!0;a.graphical_mode_is_linear=!1;break;case 18:a.screen_width=640;a.screen_height=480;c=!0;a.graphical_mode_is_linear=!1;break;case 19:a.screen_width=320,a.screen_height=200,c=!0,a.graphical_mode_is_linear=!0}a.VGAScreen$adapter.set_mode(c);if(a.stats.is_graphical=c)a.set_size_graphical(a.screen_width,a.screen_height),a.stats.res_x=a.screen_width,
a.stats.res_y=a.screen_height,a.stats.bpp=8;a.graphical_mode=c}JSCompiler_prototypeAlias.port3C0_write=function(a){-1===this.attribute_controller_index?this.attribute_controller_index=a:(16>this.attribute_controller_index&&(this.dac_map[this.attribute_controller_index]=a),this.attribute_controller_index=-1)};JSCompiler_prototypeAlias.port3C0_read=function(){var a=this.attribute_controller_index;this.attribute_controller_index=-1;return a};
JSCompiler_prototypeAlias.port3C1_read=function(){return this.attribute_controller_index=-1};JSCompiler_prototypeAlias.port3C2_write=function(a){this.miscellaneous_output_register=a;103===a?JSCompiler_StaticMethods_set_video_mode(this,3):227===a?JSCompiler_StaticMethods_set_video_mode(this,18):99===a?JSCompiler_StaticMethods_set_video_mode(this,19):163===a?JSCompiler_StaticMethods_set_video_mode(this,16):JSCompiler_StaticMethods_set_video_mode(this,3)};
JSCompiler_prototypeAlias.port3C4_write=function(a){this.sequencer_index=a};JSCompiler_prototypeAlias.port3C4_read=function(){return this.sequencer_index};JSCompiler_prototypeAlias.port3C5_write=function(a){switch(this.sequencer_index){case 2:this.plane_write_bm=a;break;case 4:this.sequencer_memory_mode=a}};JSCompiler_prototypeAlias.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};
JSCompiler_prototypeAlias.port3C7_write=function(){};JSCompiler_prototypeAlias.port3C8_write=function(a){this.dac_color_index=3*a};JSCompiler_prototypeAlias.port3C9_write=function(a){var b=this.dac_color_index/3|0,c=this.dac_color_index%3,d=this.vga256_palette[b];a=255*a/63&255;this.vga256_palette[b]=0===c?d&-16711681|a<<16:1===c?d&-65281|a<<8:d&-256|a;this.dac_color_index++;this.do_complete_redraw=!0};JSCompiler_prototypeAlias.port3CC_read=function(){return this.miscellaneous_output_register};
JSCompiler_prototypeAlias.port3CE_write=function(a){this.graphics_index=a};JSCompiler_prototypeAlias.port3CE_read=function(){return this.graphics_index};JSCompiler_prototypeAlias.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}};
JSCompiler_prototypeAlias.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};JSCompiler_prototypeAlias.port3D4_write=function(a){this.index_crtc=a};
JSCompiler_prototypeAlias.port3D5_write=function(a){switch(this.index_crtc){case 9:this.max_scan_line=a;7===(a&31)?this.set_size_text(80,50):this.set_size_text(80,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()}};JSCompiler_prototypeAlias.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};
JSCompiler_prototypeAlias.port3DA_read=function(){this.port_3DA_value^=8;this.attribute_controller_index=-1;return this.port_3DA_value};JSCompiler_prototypeAlias.port1CE_write=function(a){this.dispi_index=a};JSCompiler_prototypeAlias.port1CF_write=function(a,b){462===b?this.dispi_index=this.dispi_index&255|a<<8:this.dispi_value=a};
JSCompiler_prototypeAlias.port1D0_write=function(a){this.dispi_value=this.dispi_value&255|a<<8;switch(this.dispi_index){case 1:this.svga_width=this.dispi_value;2560<this.svga_width&&(this.svga_width=2560);break;case 2:this.svga_height=this.dispi_value;1600<this.svga_height&&(this.svga_height=1600);break;case 3:this.svga_bpp=this.dispi_value;break;case 4:this.svga_enabled=1===(this.dispi_value&1);this.dispi_enable_value=this.dispi_value;break;case 9:this.svga_offset=this.svga_width*(15===this.svga_bpp?
16:this.svga_bpp)/8*this.dispi_value,this.do_complete_redraw=!0}!this.svga_enabled||this.svga_width&&this.svga_height||(this.svga_enabled=!1);this.svga_enabled&&4===this.dispi_index&&(this.set_size_graphical(this.svga_width,this.svga_height),this.VGAScreen$adapter.set_mode(!0),this.stats.bpp=this.svga_bpp,this.stats.is_graphical=!0,this.stats.res_x=this.svga_width,this.stats.res_y=this.svga_height)};
JSCompiler_prototypeAlias.port1CF_read=function(){return JSCompiler_StaticMethods_svga_register_read(this,this.dispi_index)};JSCompiler_prototypeAlias.port1D0_read=function(){return JSCompiler_StaticMethods_svga_register_read(this,this.dispi_index)>>8};
function JSCompiler_StaticMethods_svga_register_read(a,b){switch(b){case 0:return 45248;case 1:return a.dispi_value&2?2560:a.svga_width;case 2:return a.dispi_value&2?1600:a.svga_height;case 3:return a.dispi_value&2?32:a.svga_bpp;case 4:return a.dispi_enable_value;case 6:return a.svga_width;case 10:return a.vga_memory_size/65536|0}return 255}
function VGADummyAdapter(){this.put_pixel_linear=function(){};this.put_pixel_linear32=function(){};this.put_char=function(){};this.set_mode=function(){};this.set_size_graphical=function(){};this.set_size_text=function(){};this.update_cursor=function(){};this.update_cursor_scanline=function(){};this.timer=function(){}};function PS2(a,b,c){this.pic=a.devices.pic;this.cpu=a;this.have_mouse=this.enable_mouse=this.enable_mouse_stream=!1;this.mouse_clicks=this.mouse_delta_y=this.mouse_delta_x=0;this.next_read_resolution=this.next_read_rate=this.next_handle_scan_code_set=this.next_read_led=this.next_read_sample=this.next_is_mouse_command=this.enable_keyboard_stream=this.have_keyboard=!1;this.kbd_buffer=new ByteQueue(32);this.last_port60_byte=0;this.sample_rate=100;this.resolution=4;this.scaling2=!1;this.last_mouse_packet=
-1;this.mouse_buffer=new ByteQueue(32);this.keyboard=b;this.mouse=c;this.keyboard&&(this.have_keyboard=!0,this.keyboard.init(this.kbd_send_code.bind(this)));this.mouse&&(this.have_mouse=!0,this.mouse.init(this.mouse_send_click.bind(this),this.mouse_send_delta.bind(this)));this.command_register=5;this.read_command_register=this.read_output_register=!1;a.io.register_read(96,this.port60_read,this);a.io.register_read(100,this.port64_read,this);a.io.register_write(96,this.port60_write,this);a.io.register_write(100,
this.port64_write,this)}function JSCompiler_StaticMethods_mouse_irq(a){a.command_register&2&&a.pic.push_irq(12)}function JSCompiler_StaticMethods_kbd_irq(a){a.command_register&1&&a.pic.push_irq(1)}JSCompiler_prototypeAlias=PS2.prototype;JSCompiler_prototypeAlias.kbd_send_code=function(a){this.cpu.running&&this.enable_keyboard_stream&&(this.kbd_buffer.push(a),JSCompiler_StaticMethods_kbd_irq(this))};
JSCompiler_prototypeAlias.mouse_send_delta=function(a,b){if(this.cpu.running&&this.have_mouse&&this.enable_mouse&&(this.mouse_delta_x+=a*this.resolution,this.mouse_delta_y+=b*this.resolution,this.enable_mouse_stream)){var c=this.mouse_delta_x|0,d=this.mouse_delta_y|0;!c&&!d||Date.now()-this.last_mouse_packet<1E3/this.sample_rate||(this.mouse_delta_x-=c,this.mouse_delta_y-=d,JSCompiler_StaticMethods_send_mouse_packet(this,c,d))}};
JSCompiler_prototypeAlias.mouse_send_click=function(a,b,c){this.have_mouse&&this.enable_mouse&&(this.mouse_clicks=a|c<<1|b<<2,this.enable_mouse_stream&&JSCompiler_StaticMethods_send_mouse_packet(this,0,0))};
function JSCompiler_StaticMethods_send_mouse_packet(a,b,c){var d=(0>c)<<5|(0>b)<<4|8|a.mouse_clicks;a.last_mouse_packet=Date.now();a.scaling2&&(b=JSCompiler_StaticMethods_apply_scaling2(b),c=JSCompiler_StaticMethods_apply_scaling2(c));a.mouse_buffer.push(d);a.mouse_buffer.push(b);a.mouse_buffer.push(c);JSCompiler_StaticMethods_mouse_irq(a)}
function JSCompiler_StaticMethods_apply_scaling2(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}}JSCompiler_prototypeAlias.destroy=function(){this.have_keyboard&&this.keyboard.destroy();this.have_mouse&&this.mouse.destroy()};
JSCompiler_prototypeAlias.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&&JSCompiler_StaticMethods_kbd_irq(this)):(this.last_port60_byte=this.mouse_buffer.shift(),1<=this.mouse_buffer.length&&JSCompiler_StaticMethods_mouse_irq(this));return this.last_port60_byte};
JSCompiler_prototypeAlias.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};
JSCompiler_prototypeAlias.port60_write=function(a){if(this.read_command_register)JSCompiler_StaticMethods_kbd_irq(this),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),JSCompiler_StaticMethods_mouse_irq(this);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,JSCompiler_StaticMethods_mouse_irq(this);
else if(this.next_read_resolution)this.next_read_resolution=!1,this.mouse_buffer.ByteQueue$clear(),this.mouse_buffer.push(250),this.resolution=3<a?4:1<<a,JSCompiler_StaticMethods_mouse_irq(this);else if(this.next_read_led)this.next_read_led=!1,this.kbd_buffer.push(250),JSCompiler_StaticMethods_kbd_irq(this);else if(this.next_handle_scan_code_set)this.next_handle_scan_code_set=!1,this.kbd_buffer.push(250),JSCompiler_StaticMethods_kbd_irq(this),a||this.kbd_buffer.push(2);else if(this.next_read_rate)this.next_read_rate=
!1,this.kbd_buffer.push(250),JSCompiler_StaticMethods_kbd_irq(this);else if(this.next_is_mouse_command){if(this.next_is_mouse_command=!1,this.have_mouse){this.kbd_buffer.ByteQueue$clear();this.mouse_buffer.ByteQueue$clear();this.mouse_buffer.push(250);switch(a){case 230:this.scaling2=!1;break;case 231:this.scaling2=!0;break;case 232:this.next_read_resolution=!0;break;case 233:JSCompiler_StaticMethods_send_mouse_packet(this,0,0);break;case 242:this.mouse_buffer.push(0);this.mouse_buffer.push(0);this.mouse_clicks=
this.mouse_delta_x=this.mouse_delta_y=0;break;case 243:this.next_read_sample=!0;break;case 244:this.enable_mouse=this.enable_mouse_stream=!0;this.mouse.enabled=!0;this.mouse_clicks=this.mouse_delta_x=this.mouse_delta_y=0;break;case 245:this.enable_mouse_stream=!1;break;case 246:this.enable_mouse_stream=!1;this.sample_rate=100;this.scaling2=!1;this.resolution=4;break;case 255:this.mouse_buffer.push(170),this.mouse_buffer.push(0),this.enable_mouse_stream=!1,this.sample_rate=100,this.scaling2=!1,this.resolution=
4,this.mouse_clicks=this.mouse_delta_x=this.mouse_delta_y=0}JSCompiler_StaticMethods_mouse_irq(this)}}else{this.mouse_buffer.ByteQueue$clear();this.kbd_buffer.ByteQueue$clear();this.kbd_buffer.push(250);switch(a){case 237:this.next_read_led=!0;break;case 240:this.next_handle_scan_code_set=!0;break;case 242:this.kbd_buffer.push(171);this.kbd_buffer.push(83);break;case 243:this.next_read_rate=!0;break;case 244:this.enable_keyboard_stream=!0;break;case 245:this.enable_keyboard_stream=!1;break;case 255:this.kbd_buffer.ByteQueue$clear(),
this.kbd_buffer.push(250),this.kbd_buffer.push(170)}JSCompiler_StaticMethods_kbd_irq(this)}};
JSCompiler_prototypeAlias.port64_write=function(a){switch(a){case 32:this.kbd_buffer.ByteQueue$clear();this.mouse_buffer.ByteQueue$clear();this.kbd_buffer.push(this.command_register);break;case 96:this.read_command_register=!0;break;case 211:this.read_output_register=!0;break;case 212:this.next_is_mouse_command=!0;break;case 167:this.command_register|=32;break;case 168:this.command_register&=-33;break;case 169:this.kbd_buffer.ByteQueue$clear();this.mouse_buffer.ByteQueue$clear();this.kbd_buffer.push(0);
break;case 170:this.kbd_buffer.ByteQueue$clear();this.mouse_buffer.ByteQueue$clear();this.kbd_buffer.push(85);break;case 171:this.kbd_buffer.ByteQueue$clear();this.mouse_buffer.ByteQueue$clear();this.kbd_buffer.push(0);break;case 173:this.command_register|=16;break;case 174:this.command_register&=-17;break;case 254:throw a=this.cpu,a.devices.ps2.destroy(),a.devices.vga.destroy(),a.init(a.current_settings),233495534;}};function PIC(a,b){this.irr=this.isr=this.irq_map=this.irq_mask=0;this.is_master=void 0===b;this.slave=void 0;this.expect_icw4=!1;this.state=0;this.auto_eoi=this.read_irr=1;this.is_master?(this.slave=new PIC(a,this),this.check_irqs=function(){var b=this.irr&this.irq_mask;if(!b)return this.slave.check_irqs();b&=-b;if(this.isr&&(this.isr&-this.isr)<=b)return!1;var c=Math.int_log2(b),b=1<<c;this.irr&=~b;if(4===b)return this.slave.check_irqs();this.auto_eoi||(this.isr|=b);a.previous_ip=a.instruction_pointer;
JSCompiler_StaticMethods_call_interrupt_vector(a,this.irq_map|c,!1,!1);return!0}.bind(this)):this.check_irqs=function(){var c=this.irr&this.irq_mask;if(!c)return!1;c&=-c;if(this.isr&&(this.isr&-this.isr)<=c)return!1;var e=Math.int_log2(c),c=1<<e;this.irr&=~c;this.isr|=c;a.previous_ip=a.instruction_pointer;JSCompiler_StaticMethods_call_interrupt_vector(a,this.irq_map|e,!1,!1);this.irr&&b.push_irq(2);this.auto_eoi||(this.isr&=~c);return!0}.bind(this);this.PIC$dump=function(){this.is_master&&this.slave.PIC$dump()};
var c;c=this.is_master?32:160;a.io.register_write(c,function(a){if(a&16)this.expect_icw4=a&1,this.state=1;else if(a&8)this.read_irr=a&1;else{var b=a>>5;1===b?this.isr&=this.isr-1:3===b&&(this.isr&=~(1<<(a&7)))}},this);a.io.register_read(c,function(){return this.read_irr?this.irr:this.isr},this);a.io.register_write(c|1,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)},this);
a.io.register_read(c|1,function(){return~this.irq_mask&255},this);this.push_irq=this.is_master?function(b){8<=b&&(this.slave.push_irq(b-8),b=2);this.irr|=1<<b;JSCompiler_StaticMethods_handle_irqs(a)}:function(a){this.irr|=1<<a}};function RTC(a,b,c){this.cpu=a;this.pic=a.devices.pic;this.cmos_index=0;this.boot_order=c;this.diskette_type=b;this.last_update=this.rtc_time=Date.now();this.next_interrupt=0;this.cmos_c_was_read=!0;this.periodic_interrupt=!1;this.periodic_interrupt_time=.9765625;this.cmos_a=38;this.cmos_b=2;this.cmos_c=0;a.io.register_write(112,function(a){this.cmos_index=a&127}.bind(this));a.io.register_write(113,this.cmos_write.bind(this));a.io.register_read(113,this.cmos_read.bind(this))}
RTC.prototype.timer=function(a){this.periodic_interrupt&&this.cmos_c_was_read&&this.next_interrupt<a&&(this.cmos_c_was_read=!1,this.pic.push_irq(8),this.cmos_c|=64,this.next_interrupt+=this.periodic_interrupt_time*Math.ceil((a-this.next_interrupt)/this.periodic_interrupt_time));this.rtc_time+=a-this.last_update;this.last_update=a};function JSCompiler_StaticMethods_encode_time(a,b){var c;if(a.cmos_b&4)c=b;else{c=b;for(var d=0,e=0,f;c;)f=c%10,e|=f<<4*d,d++,c=(c-f)/10;c=e}return c}
RTC.prototype.cmos_read=function(){switch(this.cmos_index){case 0:return JSCompiler_StaticMethods_encode_time(this,(new Date(this.rtc_time)).getUTCSeconds());case 2:return JSCompiler_StaticMethods_encode_time(this,(new Date(this.rtc_time)).getUTCMinutes());case 4:return JSCompiler_StaticMethods_encode_time(this,(new Date(this.rtc_time)).getUTCHours());case 7:return JSCompiler_StaticMethods_encode_time(this,(new Date(this.rtc_time)).getUTCDate());case 8:return JSCompiler_StaticMethods_encode_time(this,
(new Date(this.rtc_time)).getUTCMonth()+1);case 9:return JSCompiler_StaticMethods_encode_time(this,(new Date(this.rtc_time)).getUTCFullYear()%100);case 10:return this.cmos_a;case 11:return this.cmos_b;case 14:return 0;case 12:return this.cmos_c_was_read=!0,this.cmos_c;case 15:return 0;case 16:return this.diskette_type;case 20:return 45;case 50:return JSCompiler_StaticMethods_encode_time(this,(new Date(this.rtc_time)).getUTCFullYear()/100|0);case 52:return this.cpu.memory_size-16777216>>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.next_interrupt=Date.now())}this.periodic_interrupt=64===(this.cmos_b&64)&&0<(this.cmos_a&15)};function UART(a,b,c){this.pic=a.devices.pic;this.line="";this.interrupt_enable=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===b||1016===b)this.UART$irq=4;else if(1E3===b||1E3===b)this.UART$irq=3;else return;c.init(function(a){this.input.push(a);this.interrupt_enable&1&&this.push_irq()}.bind(this));a=a.io;a.register_write(b,function(a){this.line_control&128?this.baud_rate=this.baud_rate&
-256|a:255!==a&&c&&(c.put_line?this.line=10===a?"":this.line+String.fromCharCode(a):c.put_str(String.fromCharCode(a)))},this);a.register_write(b|1,function(a){this.line_control&128?this.baud_rate=this.baud_rate&255|a<<8:this.interrupt_enable=a},this);a.register_read(b,function(){return this.line_control&128?this.baud_rate&255:this.input.shift()},this);a.register_read(b|1,function(){return this.line_control&128?this.baud_rate>>8:this.interrupt_enable},this);a.register_read(b|2,function(){var a=this.iir;
this.iir^=1;return a},this);a.register_write(b|2,function(){},this);a.register_read(b|3,function(){return this.line_control},this);a.register_write(b|3,function(a){this.line_control=a},this);a.register_read(b|4,function(){return this.modem_control},this);a.register_write(b|4,function(a){this.modem_control=a},this);a.register_read(b|5,function(){var a=0;this.input.length&&(a|=1);return a|96},this);a.register_write(b|5,function(){},this);a.register_read(b|6,function(){return this.modem_status},this);
a.register_write(b|6,function(){},this);a.register_read(b|7,function(){return this.scratch_register},this);a.register_write(b|7,function(a){this.scratch_register=a},this)}UART.prototype.push_irq=function(){this.pic.push_irq(this.UART$irq)};function ACPI(){};function StateLoadError(a){this.message=a}StateLoadError.prototype=Error();
function restore_object(a,b,c){if("object"!==typeof b||b instanceof Array||null===b)return b;var d=b.__state_type__;if(void 0===d){for(var d=Object.keys(b),e=0;e<d.length;e++){var f=d[e];a[f]=restore_object(a[f],b[f],c)}a._state_restore&&a._state_restore();return a}if("ArrayBuffer"===d)return b=c.infos[b.buffer_id],a&&a.byteLength===b.length&&(new Uint8Array(a)).set(new Uint8Array(c.full,b.offset,b.length)),a;d={Uint8Array:Uint8Array,Int8Array:Int8Array,Uint16Array:Uint16Array,Int16Array:Int16Array,
Uint32Array:Uint32Array,Int32Array:Int32Array,Float32Array:Float32Array,Float64Array:Float64Array}[d];b=c.infos[b.buffer_id];return a&&a.constructor===d&&a.byteLength===b.length?((new Uint8Array(a.buffer)).set(new Uint8Array(c.full,b.offset,b.length),a.byteOffset),a):new d(c.full.slice(b.offset,b.offset+b.length))};function Ne2k(a,b){this.pic=a.devices.pic;this.Ne2k$adapter=b;b.init(this.receive.bind(this));this.pci_space=[236,16,41,128,3,1,0,0,0,0,0,2,0,0,0,0,1,184,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,244,26,0,17,0,0,184,254,0,0,0,0,0,0,0,0,11,1,0,0];this.pci_id=40;this.pci_bars=[{size:131072}];a.devices.pci.register_device(this);this.imr=this.isr=0;this.cr=1;this.rcnt=0;this.remote_buffer=new Uint8Array(0);this.remote_pointer=0;this.receive_buffer=new Uint8Array(32768);this.receive_buffer[0]=
0;this.receive_buffer[1]=34;this.receive_buffer[2]=21;this.receive_buffer[3]=255*Math.random()|0;this.receive_buffer[4]=255*Math.random()|0;this.receive_buffer[5]=255*Math.random()|0;this.rsar=0;this.boundary=this.curpg=76;var c=a.io;c.register_read(47104,function(){return this.cr},this);c.register_write(47104,function(a){this.cr=a|this.cr&4;this.remote_pointer=0;this.rcnt>this.remote_buffer.length&&(this.remote_buffer=new Uint8Array(this.rcnt))},this);c.register_read(47117,function(){return 0},this);
c.register_read(47118,function(){return 0},this);c.register_read(47119,function(){return 0},this);c.register_read(47135,function(){if(0===(this.cr&192))return JSCompiler_StaticMethods_do_interrupt(this,128),0},this);c.register_write(47135,function(){},this);c.register_read(47111,function(){return 0===(this.cr&192)?this.isr:this.curpg},this);c.register_write(47111,function(a){0===(this.cr&192)?this.isr&=~a:this.curpg=a},this);c.register_write(47117,function(){},this);c.register_write(47118,function(){},
this);c.register_write(47114,function(a){0===(this.cr&192)&&(this.rcnt=this.rcnt&65280|a&255)},this);c.register_write(47115,function(a){0===(this.cr&192)&&(this.rcnt=this.rcnt&255|a<<8&65280)},this);c.register_write(47112,function(a){0===(this.cr&192)&&(this.rsar=this.rsar&65280|a&255)},this);c.register_write(47113,function(a){0===(this.cr&192)&&(this.rsar=this.rsar&255|a<<8&65280)},this);c.register_write(47119,function(a){0===(this.cr&192)&&(this.imr=a)},this);c.register_read(47107,function(){return 0===
(this.cr&192)?this.boundary:0},this);c.register_write(47107,function(a){0===(this.cr&192)&&(this.boundary=a)},this);c.register_read(47108,function(){return 0===(this.cr&192)?35:0},this);c.register_read(47116,function(){return 0===(this.cr&192)?9:0},this);c.register_read(47120,this.data_port_read,this);c.register_read(47121,this.data_port_read,this);c.register_read(47122,this.data_port_read,this);c.register_read(47123,this.data_port_read,this);c.register_write(47120,this.data_port_write,this);c.register_write(47121,
this.data_port_write,this);c.register_write(47122,this.data_port_write,this);c.register_write(47123,this.data_port_write,this)}function JSCompiler_StaticMethods_do_interrupt(a,b){a.isr|=b;a.imr&b&&a.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),JSCompiler_StaticMethods_do_interrupt(this,64),this.cr&=-5,this.Ne2k$adapter.send(a),JSCompiler_StaticMethods_do_interrupt(this,2))};Ne2k.prototype.data_port_read=function(){return this.receive_buffer[this.rsar++]};
Ne2k.prototype.receive=function(a){if(!(this.cr&1)){var b=this.curpg<<8,c=a.length+4,d=b+4,e=this.curpg+1+(c>>8);if(b+c>this.receive_buffer.length){var f=this.receive_buffer.length-d;this.receive_buffer.set(a.subarray(0,f),d);this.receive_buffer.set(a.subarray(f),76)}else this.receive_buffer.set(a,d);128<=e&&(e+=-52);this.receive_buffer[b]=1;this.receive_buffer[b+1]=e;this.receive_buffer[b+2]=c;this.receive_buffer[b+3]=c>>8;this.curpg=e;JSCompiler_StaticMethods_do_interrupt(this,1)}};window.requestAnimationFrame||(window.requestAnimationFrame=window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame);
function ScreenAdapter(a){function b(a){a=a.toString(16);return"#"+Array(7-a.length).join("0")+a}function c(){v=!0;for(var a=0;a<A;a++)s[a]&&(D.text_update_row(a),s[a]=0)}function d(){v=!0;r<p&&(g.putImageData(m,0,0,0,r/x>>2,x,((p-r)/x>>2)+1),r=1E7,p=0)}function e(a,b,c){b=""+(1===b?"":" scaleX("+b+")")+(1===c?"":" scaleY("+c+")");a.style.webkitTransform=a.style.MozTransform=b}console.assert(a,"1st argument must be a DOM container");var f=a.getElementsByTagName("canvas")[0],g=f.getContext("2d"),k=
f.nextElementSibling||f.previousElementSibling,l=document.createElement("div"),m,n,u,E,z,B=1,w=1,x,r=0,p=0,s,v=!0,C=!1,q,t,A,D=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 H=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]),G=[],F,y=0;256>y;y++)127<y?F=a[y-128]:32>y?F=H[y]:F=y,G[y]=String.fromCharCode(F);g.imageSmoothingEnabled=
!1;g.mozImageSmoothingEnabled=!1;g.webkitImageSmoothingEnabled=!1;l.style.position="absolute";l.style.backgroundColor="#ccc";l.style.width="7px";l.style.display="inline-block";k.style.display="block";f.style.display="none";this.init=function(){this.set_size_text(80,25)};this.make_screenshot=function(){try{window.open(f.toDataURL())}catch(a){}};this.put_char=function(a,b,c,d,e){a<A&&b<t&&(b=3*(a*t+b),q[b]=c,q[b+1]=d,q[b+2]=e,s[a]=1)};this.timer=function(){v&&(v=!1,requestAnimationFrame(C?d:c))};this.put_pixel_linear=
function(a,b){a>=n.length||(r=a<r?a:r,p=a>p?a:p,n[a+1^3]=b)};this.put_pixel_linear32=function(a,b){r=a<r?a:r;p=a>p?a:p;u[a>>2]=4278190080|b>>16&255|b<<16|b&65280};this.destroy=function(){};this.set_mode=function(a){(C=a)?(k.style.display="none",f.style.display="block"):(k.style.display="block",f.style.display="none")};this.set_size_text=function(a,b){s=new Int8Array(b);q=new Int32Array(a*b*3);t=a;for(A=b;k.childNodes.length>b;)k.removeChild(k.firstChild);for(;k.childNodes.length<b;)k.appendChild(document.createElement("div"));
for(var c=0;c<b;c++)this.text_update_row(c)};this.set_size_graphical=function(a,b){f.style.display="block";f.width=a;f.height=b;m=g.createImageData(a,b);n=new Uint8Array(m.data.buffer);u=new Int32Array(m.data.buffer);for(var c=3;c<n.length;c+=4)n[c]=255;x=a};this.set_scale=function(a,b){B=a;w=b;e(f,B,w);e(k,B,w)};this.set_scale(B,w);this.update_cursor_scanline=function(a,b){a&32?l.style.display="none":(l.style.display="inline",l.style.height=Math.min(15,b-a)+"px",l.style.marginTop=Math.min(15,a)+
"px")};this.update_cursor=function(a,b){if(a!==E||b!==z)s[a]=1,s[E]=1,E=a,z=b};this.text_update_row=function(a){var c=3*a*t,d,e,f,g,m,n;d=k.childNodes[a];for(f=document.createDocumentFragment();d.firstChild;)d.removeChild(d.firstChild);for(var u=0;u<t;){e=document.createElement("span");g=q[c+1];m=q[c+2];e.style.backgroundColor=b(g);e.style.color=b(m);for(n="";u<t&&q[c+1]===g&&q[c+2]===m;)if(n+=G[q[c]],u++,c+=3,a===E)if(u===z)break;else if(u===z+1){f.appendChild(l);break}e.textContent=n;f.appendChild(e)}d.appendChild(f)};
this.init()};function KeyboardAdapter(){function a(a){return a.shiftKey&&a.ctrlKey&&74===a.keyCode||116===a.keyCode||!g.enabled?!1:a.target?"phone_keyboard"===a.target.className||"INPUT"!==a.target.nodeName&&"TEXTAREA"!==a.target.nodeName:!0}function b(b){if(a(b)){var c=b.keyCode;if(!f[c])return!1;f[c]=!1;e(c,!1)||b.preventDefault()}}function c(b){if(a(b)){var c=b.keyCode;f[c]&&e(c,!1);f[c]=!0;e(c,!0)||b.preventDefault()}}function d(){for(var a=Object.keys(f),b,c=0;c<a.length;c++)b=+a[c],f[b]&&e(b,!1);f={}}function e(a,
b){if(a>=l.length||0===l[a])return console.log("Missing char in map: "+a.toString(16)),!0;var c=l[a];b||(c|=128);255<c?(k(c>>8),k(c&255)):k(c);return!1}var f={},g=this,k;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();k=a;window.addEventListener("keyup",b,!1);window.addEventListener("keydown",c,!1);window.addEventListener("blur",d,!1)};this.destroy=function(){window.removeEventListener("keyup",b,!1);window.removeEventListener("keydown",
c,!1);window.removeEventListener("blur",d,!1)}};function MouseAdapter(){function a(a){return u.enabled&&u.emu_enabled&&(!a.target||"mousemove"===a.type||"INPUT"!==a.target.nodeName&&"TEXTAREA"!==a.target.nodeName)}function b(b){if(a(b)){var c;c=b.webkitMovementX||b.mozMovementX||0;b=b.webkitMovementY||b.mozMovementY||0;n(.15*c,-(.15*b))}}function c(b){a(b)&&b.preventDefault()}function d(b){a(b)&&f(b,!0)}function e(b){a(b)&&f(b,!1)}function f(a,b){1===a.which?g=b:2===a.which?l=b:3===a.which?k=b:console.log("Unknown event.which: "+a.which);m(g,l,
k);a.preventDefault()}var g=!1,k=!1,l=!1,m,n,u=this;this.enabled=!1;this.emu_enabled=!0;this.destroy=function(){window.removeEventListener("mousemove",b,!1);document.removeEventListener("contextmenu",c,!1);window.removeEventListener("mousedown",d,!1);window.removeEventListener("mouseup",e,!1)};this.init=function(a,f){this.destroy();m=a;n=f;window.addEventListener("mousemove",b,!1);document.addEventListener("contextmenu",c,!1);window.addEventListener("mousedown",d,!1);window.addEventListener("mouseup",
e,!1)}};function SerialAdapter(a){function b(a){e.enabled&&(f(a.keyCode),a.preventDefault())}function c(a){8===a.keyCode&&(f(127),a.preventDefault())}function d(a){for(var b=a.clipboardData.getData("text/plain"),c=0;c<b.length;c++)f(b.charCodeAt(c));a.preventDefault()}var e=this,f;this.enabled=!0;this.init=function(e){this.destroy();f=e;a.addEventListener("keypress",b,!1);a.addEventListener("keydown",c,!1);a.addEventListener("paste",d,!1)};this.destroy=function(){a.removeEventListener("keypress",b,!1);a.removeEventListener("keydown",
c,!1);a.removeEventListener("paste",d,!1)};this.put_str=function(b){"\b"===b?(b=a.value,a.value=b.substr(0,b.length-1)):"\r"!==b&&(a.value+=b,"\n"===b&&(a.scrollTop=1E9))}};function NetworkAdapter(a){this.send_data=function(){};this.socket=void 0;this.send_queue=[];this.NetworkAdapter$url=a;this.last_connect_attempt=Date.now()-1E4}JSCompiler_prototypeAlias=NetworkAdapter.prototype;JSCompiler_prototypeAlias.handle_message=function(a){this.send_data(new Uint8Array(a.data))};JSCompiler_prototypeAlias.handle_close=function(){this.connect();setTimeout(this.connect.bind(this),1E4)};
JSCompiler_prototypeAlias.handle_open=function(){for(var a=0;a<this.send_queue.length;a++)this.send(this.send_queue[a]);this.send_queue=[]};JSCompiler_prototypeAlias.handle_error=function(){};JSCompiler_prototypeAlias.init=function(a){this.send_data=a};JSCompiler_prototypeAlias.destroy=function(){this.socket&&this.socket.close()};
JSCompiler_prototypeAlias.connect=function(){if(this.socket){var a=this.socket.readyState;if(0===a||1===a)return}this.last_connect_attempt+1E4>Date.now()||(this.last_connect_attempt=Date.now(),this.socket=new WebSocket(this.NetworkAdapter$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))};
JSCompiler_prototypeAlias.send=function(a){this.socket&&1===this.socket.readyState?this.socket.send(a):(this.send_queue.push(a),128<this.send_queue.length&&(this.send_queue=this.send_queue.slice(-64)),this.connect())};function load_file(a,b,c,d){var e=new XMLHttpRequest;e.open("get",a,!0);e.responseType="arraybuffer";if(d)for(var f=Object.keys(d),g=0;g<f.length;g++){var k=f[g];e.setRequestHeader(k,d[k])}e.onload=function(){4===e.readyState&&(200!==e.status&&206!==e.status?console.log("Loading the image `"+a+"` failed"):e.response&&b(e.response))};c&&(e.onprogress=function(a){c(a)});e.send(null)}
function async_buffer_set(a,b,c){console.assert(a+b.length<=this.byteLength);var d=b.length;console.assert(0===a%this.block_size);console.assert(0===d%this.block_size);console.assert(d);a=a/this.block_size;for(var d=d/this.block_size,e=0;e<d;e++){var f=this.loaded_blocks[a+e];void 0===f&&(f=this.loaded_blocks[a+e]=new Uint8Array(this.block_size));var g=b.subarray(e*this.block_size,(e+1)*this.block_size);f.set(g);console.assert(f.byteLength===g.length)}c()}
function AsyncXHRBuffer(a,b,c){this.AsyncXHRBuffer$filename=a;this.block_size=b;this.AsyncXHRBuffer$block_count=c/b;console.assert(this.AsyncXHRBuffer$block_count===(this.AsyncXHRBuffer$block_count|0));this.loaded_blocks={};this.byteLength=c;this.get_buffer=function(){}}
AsyncXHRBuffer.prototype.get=function(a,b,c){console.assert(0===a%this.block_size);console.assert(0===b%this.block_size);console.assert(b);load_file(this.AsyncXHRBuffer$filename,function(d){d=new Uint8Array(d);this.handle_read(a,b,d);c(d)}.bind(this),null,{Range:"bytes="+a+"-"+(a+b-1)})};AsyncXHRBuffer.prototype.set=async_buffer_set;AsyncXHRBuffer.prototype.handle_read=function(a,b,c){a=a/this.block_size;b=b/this.block_size;for(var d=0;d<b;d++){var e=this.loaded_blocks[a+d];e&&c.set(e,d*this.block_size)}};
function SyncFileBuffer(a){var b=!1,c=this;this.byteLength=a.size;1073741824<a.size&&console.log("Warning: Allocating buffer of "+(a.size>>20)+" MB ...");var d=new ArrayBuffer(a.size),e=0,f=new FileReader;this.AsyncFileBuffer$load=function(){function g(){if(c.onprogress)c.onprogress({loaded:e,total:a.size,lengthComputable:!0});if(e<a.size)f.readAsArrayBuffer(a.slice(e,Math.min(e+4194304,a.size)));else if(b=!0,c.onload)c.onload({})}f.onload=function(a){(new Uint8Array(d,e)).set(new Uint8Array(a.target.result));
e+=4194304;g()};g()};this.get=function(a,c,e){if(b)console.assert(a+c<=d.byteLength),e(new Uint8Array(d,a,c));else throw"SyncFileBuffer: Wait for ready";};this.get_buffer=function(a){if(b)a(d);else throw"SyncFileBuffer: Wait for ready";};this.set=function(a,c,e){if(b)console.assert(a+c.byteLength<=d.byteLength),(new Uint8Array(d,a,c.byteLength)).set(c),e();else throw"SyncFileBuffer: Wait for ready";}}
function AsyncFileBuffer(a){this.file=a;this.byteLength=a.size;this.block_size=512;this.loaded_blocks={};this.get_buffer=function(){};this.AsyncFileBuffer$load=function(){this.onload&&this.onload({})}}AsyncFileBuffer.prototype.get=function(a,b,c){console.assert(0===a%this.block_size);console.assert(0===b%this.block_size);console.assert(b);var d=new FileReader;d.onload=function(d){d=new Uint8Array(d.target.result);this.handle_read(a,b,d);c(d)}.bind(this);d.readAsArrayBuffer(this.file.slice(a,a+b))};
AsyncFileBuffer.prototype.set=async_buffer_set;AsyncFileBuffer.prototype.handle_read=AsyncXHRBuffer.prototype.handle_read;