286 lines
5.0 MiB
JavaScript
286 lines
5.0 MiB
JavaScript
|
var MKeystone = function(MKeystone) {
|
||
|
MKeystone = MKeystone || {};
|
||
|
var Module = MKeystone;
|
||
|
|
||
|
var Module;if(!Module)Module=(typeof MKeystone!=="undefined"?MKeystone:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;if(Module["ENVIRONMENT"]){if(Module["ENVIRONMENT"]==="WEB"){ENVIRONMENT_IS_WEB=true}else if(Module["ENVIRONMENT"]==="WORKER"){ENVIRONMENT_IS_WORKER=true}else if(Module["ENVIRONMENT"]==="NODE"){ENVIRONMENT_IS_NODE=true}else if(Module["ENVIRONMENT"]==="SHELL"){ENVIRONMENT_IS_SHELL=true}else{throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.")}}else{ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER}if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=console.log;if(!Module["printErr"])Module["printErr"]=console.warn;var nodeFS;var nodePath;Module["read"]=function read(filename,binary){if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);var ret=nodeFS["readFileSync"](filename);return binary?ret:ret.toString()};Module["readBinary"]=function readBinary(filename){var ret=Module["read"](filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};Module["load"]=function load(f){globalEval(read(f))};if(!Module["thisProgram"]){if(process["argv"].length>1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}else{Module["thisProgram"]="unknown-program"}}Module["arguments"]=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}));Module["inspect"]=(function(){return"[Emscripten Module object]"})}else if(ENVIRONMENT_IS_SHELL){if(!Module["print"])Module["print"]=print;if(typeof printErr!="undefined")Module["printErr"]=printErr;if(typeof read!="undefined"){Module["read"]=read}else{Module["read"]=function read(){throw"no read() available"}}Module["readBinary"]=function readBinary(f){if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}var data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){Module["read"]=function read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};Module["readAsync"]=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response)}else{onerror()}};xhr.onerror=onerror;xhr.send(null)};if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof console!=="undefined"){if(!Module["print"])Module["print"]=function print(x){console.log(x)};if(!Module["printErr"])Module["printErr"]=function printErr(x){console.warn(x)}}else{var TRY_USE_DUMP=false;if(!Module["print"])Module["print"]=TRY_USE_DUMP&&typeof dump!=="undefined"?(function(x){dump(x)}):(function(x){})}if(ENVIRONMENT_IS_WORKER){Module["load"]=importScripts}if(typeof Module["setWindowTitle"]==="undefined"){Module["setWindowTitle"]=(function(title){document.title=title})}}else{throw"Unknown runtime environment. Where are we?"}function globalEval(x){eval.call(null,x)}if(!Module["load"]&&Module["read"]){Module["load"]=function load(f){globalEval(Module["read"](f))}}if(!Module["print"]){Module["print"]=(function(){})}if(!Module["printErr"]){Module["printErr"]=Module["print"]}if(!Module["arguments"]){Module["arguments"]=[]}if(!Module["thisProgram"]){Module["thisProgram"]="./this.program"}Module.print=Modul
|
||
|
var asm=(function(global,env,buffer) {
|
||
|
"use asm";var a=new global.Int8Array(buffer);var b=new global.Int16Array(buffer);var c=new global.Int32Array(buffer);var d=new global.Uint8Array(buffer);var e=new global.Uint16Array(buffer);var f=new global.Uint32Array(buffer);var g=new global.Float32Array(buffer);var h=new global.Float64Array(buffer);var i=env.STACKTOP|0;var j=env.STACK_MAX|0;var k=env.DYNAMICTOP_PTR|0;var l=env.tempDoublePtr|0;var m=env.ABORT|0;var n=env.cttz_i8|0;var o=env.___dso_handle|0;var p=0;var q=0;var r=0;var s=0;var t=global.NaN,u=global.Infinity;var v=0,w=0,x=0,y=0,z=0.0,A=0,B=0,C=0,D=0.0;var E=0;var F=global.Math.floor;var G=global.Math.abs;var H=global.Math.sqrt;var I=global.Math.pow;var J=global.Math.cos;var K=global.Math.sin;var L=global.Math.tan;var M=global.Math.acos;var N=global.Math.asin;var O=global.Math.atan;var P=global.Math.atan2;var Q=global.Math.exp;var R=global.Math.log;var S=global.Math.ceil;var T=global.Math.imul;var U=global.Math.min;var V=global.Math.max;var W=global.Math.clz32;var X=env.abort;var Y=env.assert;var Z=env.enlargeMemory;var _=env.getTotalMemory;var $=env.abortOnCannotGrowMemory;var aa=env.invoke_iiiiiiii;var ba=env.invoke_viiiii;var ca=env.invoke_iiiiiid;var da=env.invoke_vi;var ea=env.invoke_vii;var fa=env.invoke_iiiiiii;var ga=env.invoke_ii;var ha=env.invoke_iiiiiiiiiiii;var ia=env.invoke_iiii;var ja=env.invoke_viiiiiiii;var ka=env.invoke_viiiiii;var la=env.invoke_viiiiiii;var ma=env.invoke_iii;var na=env.invoke_iiiiii;var oa=env.invoke_i;var pa=env.invoke_iiiiiiiiii;var qa=env.invoke_viii;var ra=env.invoke_v;var sa=env.invoke_iiiiiiiii;var ta=env.invoke_iiiii;var ua=env.invoke_iiiiid;var va=env.invoke_viiii;var wa=env._pthread_cleanup_pop;var xa=env.___syscall221;var ya=env._pthread_cond_wait;var za=env._pthread_key_create;var Aa=env._abort;var Ba=env.___cxa_pure_virtual;var Ca=env._pthread_cleanup_push;var Da=env._llvm_bswap_i64;var Ea=env.___syscall4;var Fa=env.___assert_fail;var Ga=env.___cxa_allocate_exception;var Ha=env.___cxa_find_matching_catch;var Ia=env.___buildEnvironment;var Ja=env.__addDays;var Ka=env._strftime_l;var La=env.___setErrNo;var Ma=env.___syscall192;var Na=env.___syscall197;var Oa=env.___cxa_begin_catch;var Pa=env.___syscall195;var Qa=env.___resumeException;var Ra=env.__ZSt18uncaught_exceptionv;var Sa=env.__exit;var Ta=env._strftime;var Ua=env.__arraySum;var Va=env._emscripten_memcpy_big;var Wa=env.___syscall91;var Xa=env._pthread_once;var Ya=env._pthread_getspecific;var Za=env._getenv;var _a=env.___syscall54;var $a=env.___unlock;var ab=env.__isLeapYear;var bb=env._llvm_cttz_i64;var cb=env._pthread_setspecific;var db=env.___cxa_atexit;var eb=env.___cxa_throw;var fb=env.___lock;var gb=env.___syscall180;var hb=env.___syscall6;var ib=env.___syscall5;var jb=env.___syscall183;var kb=env.___syscall3;var lb=env.___gxx_personality_v0;var mb=env._atexit;var nb=env.___syscall140;var ob=env._exit;var pb=env.___syscall145;var qb=env.___syscall146;var rb=0.0;
|
||
|
// EMSCRIPTEN_START_FUNCS
|
||
|
function Gg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;j=c[a>>2]|0;k=a+4|0;d=c[k>>2]|0;i=b+4|0;if((d|0)==(j|0)){f=i;g=a;e=c[i>>2]|0;d=j}else{e=c[i>>2]|0;do{g=e+-32|0;f=d;d=d+-32|0;c[g>>2]=c[d>>2];c[g+4>>2]=c[d+4>>2];c[g+8>>2]=c[d+8>>2];g=e+-16|0;h=f+-16|0;l=c[h>>2]|0;c[g>>2]=l;e=e+-8|0;m=e;c[m>>2]=0;c[m+4>>2]=0;if(l>>>0<65){h=f+-8|0;l=c[h+4>>2]|0;m=e;c[m>>2]=c[h>>2];c[m+4>>2]=l}else Zu(g,h);e=(c[i>>2]|0)+-32|0;c[i>>2]=e}while((d|0)!=(j|0));f=i;g=a;d=c[a>>2]|0}c[g>>2]=e;c[f>>2]=d;m=b+8|0;l=c[k>>2]|0;c[k>>2]=c[m>>2];c[m>>2]=l;k=a+8|0;m=b+12|0;l=c[k>>2]|0;c[k>>2]=c[m>>2];c[m>>2]=l;c[b>>2]=c[f>>2];return}function Hg(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;f=c[a+4>>2]|0;g=a+8|0;b=c[g>>2]|0;if((b|0)!=(f|0)){d=b;while(1){b=d+-32|0;c[g>>2]=b;if((c[d+-16>>2]|0)>>>0>64?(e=c[d+-8>>2]|0,(e|0)!=0):0){bN(e);b=c[g>>2]|0}if((b|0)==(f|0))break;else d=b}}b=c[a>>2]|0;if(!b)return;$M(b);return}function Ig(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b)if(b>>>0>1073741823){d=Ga(4)|0;OO(d);eb(d|0,818968,192)}else{e=YM(b<<2)|0;break}else e=0;while(0);c[a>>2]=e;d=e+(d<<2)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b<<2);return}function Jg(a,b,c){a=a|0;b=b|0;c=c|0;Ow(a,b,0);_w(a,c);return}function Kg(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0;h=i;i=i+16|0;g=h;if(!e){ww(a,b,0,d,0);i=h;return}c[g>>2]=64;j=g+8|0;c[j>>2]=e;c[j+4>>2]=0;zg(g)|0;ww(a,b,0,d,g);if((c[g>>2]|0)>>>0>64?(f=c[g+8>>2]|0,f|0):0)bN(f);i=h;return}function Lg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;f=c[a>>2]|0;if((f-(mg(a)|0)|0)>>>0>64){f=b;E=d;return f|0}f=(c[a>>2]|0)>>>0<65;a=a+8|0;if(f)e=a;else e=c[a>>2]|0;g=c[e+4>>2]|0;if(g>>>0>d>>>0|((g|0)==(d|0)?(c[e>>2]|0)>>>0>b>>>0:0)){f=d;g=b;E=f;return g|0}if(!f)a=c[a>>2]|0;g=a;f=c[g+4>>2]|0;g=c[g>>2]|0;E=f;return g|0}function Mg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;h=i;i=i+32|0;d=h;e=c[a+4>>2]|0;f=c[a>>2]|0;g=(e-f>>3)+1|0;if(g>>>0>536870911)ZL(a);else{k=(c[a+8>>2]|0)-f|0;j=k>>2;Ng(d,k>>3>>>0<268435455?(j>>>0<g>>>0?g:j):536870911,e-f>>3,a+8|0);g=d+8|0;f=c[g>>2]|0;e=c[b>>2]|0;c[b>>2]=0;c[f>>2]=e;c[f+4>>2]=c[b+4>>2];c[g>>2]=(c[g>>2]|0)+8;Og(a,d);Pg(d);i=h;return}}function Ng(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b)if(b>>>0>536870911){d=Ga(4)|0;OO(d);eb(d|0,818968,192)}else{e=YM(b<<3)|0;break}else e=0;while(0);c[a>>2]=e;d=e+(d<<3)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b<<3);return}function Og(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;i=c[a>>2]|0;j=a+4|0;d=c[j>>2]|0;h=b+4|0;if((d|0)==(i|0)){f=h;g=a;e=c[h>>2]|0;d=i}else{e=c[h>>2]|0;do{g=d;d=d+-8|0;f=c[d>>2]|0;c[d>>2]=0;c[e+-8>>2]=f;c[e+-4>>2]=c[g+-4>>2];e=(c[h>>2]|0)+-8|0;c[h>>2]=e}while((d|0)!=(i|0));f=h;g=a;d=c[a>>2]|0}c[g>>2]=e;c[f>>2]=d;i=b+8|0;h=c[j>>2]|0;c[j>>2]=c[i>>2];c[i>>2]=h;i=a+8|0;j=b+12|0;a=c[i>>2]|0;c[i>>2]=c[j>>2];c[j>>2]=a;c[b>>2]=c[f>>2];return}function Pg(a){a=a|0;var b=0,d=0,e=0,f=0;d=c[a+4>>2]|0;e=a+8|0;b=c[e>>2]|0;if((b|0)!=(d|0))do{f=b+-8|0;c[e>>2]=f;b=c[f>>2]|0;c[f>>2]=0;if(b|0)vb[c[(c[b>>2]|0)+4>>2]&255](b);b=c[e>>2]|0}while((b|0)!=(d|0));b=c[a>>2]|0;if(!b)return;$M(b);return}function Qg(a){a=a|0;if((c[a+12>>2]|0)!=(c[a+4>>2]|0))Su(a);Ku(a,0,0,0);return}function Rg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=a+4|0;d=c[g>>2]|0;e=c[a>>2]|0;f=(d-e|0)/12|0;if(f>>>0<b>>>0){Yg(a,b-f|0);return}if(f>>>0<=b>>>0)return;a=e+(b*12|0)|0;if((d|0)==(a|0))return;do{f=d+-12|0;c[g>>2]=f;Je(f);d=c[g>>2]|0}while((d|0)!=(a|0));return}function Sg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=a+4|0;d=c[h>>2]|0;f=c[a>>2]|0;g=d-f>>2;e=f;if(g>>>0>b>>>0){c[h>>2]=e+(b<<2);return}if(g>>>0>=b>>>0)return;if((c[a+8>>2]|0)-f>>2>>>0<b>>>0){rw(a,a+12|0,b<<2,4);f=a;g=h;e=c[a>>2]|0;d=c[h>>2]|0}else{f=a;g=h}if((d|0)!=(e+(b<<2)|0))UO(d|0,0,e+(b+-1<<2)-d+4&-4|0)|0;c[g>>2]=(c[f>>2]|0)+(b<<2);return}function Tg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;h=i;i=i+48|0;j=h+40|0;e=h+8|0;l=h;c[e+4>>2]=0;c[e+8>>2]=0;f=e+16|0;c[f>>2]=1;g=e+24|0;k=g;c[k>>2]=0;c[k+4>>2]=0;k=c[(c[b>>2]|0)+16>>2]|0;c[l>>2]=e;c[l+4>>2]=1;c[j>>2]=c[l>>2];c[j+4>>2]=c[l+4>>2];if((Ab[k&127](b,j,d)|0)==1){c[a>>2]=c[e>>2];c[a+4>>2]=c[e+4>>2];c[a+8>>2]
|
||
|
function vt(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=i;i=i+64|0;q=v+48|0;r=v+32|0;s=v+16|0;m=v;h=b;b=c[h+4>>2]|0;p=q;c[p>>2]=c[h>>2];c[p+4>>2]=b;if(!d){d=ut(q)|0;b=c[q+4>>2]|0}if(!b){u=1;i=v;return u|0}p=q+4|0;g=c[q>>2]|0;while(1){if((a[g>>0]|0)!=48){k=7;break}f=g+1|0;h=b+-1|0;c[q>>2]=f;c[p>>2]=h;if(!h)break;else{b=h;g=f}}if((k|0)==7?b|0:0){k=0;while(1){f=1<<k;if(f>>>0<d>>>0)k=k+1|0;else break}j=(f|0)==(d|0);f=T(b,k)|0;h=c[e>>2]|0;if(f>>>0>=h>>>0){if(f>>>0>h>>>0){kv(r,e,f);zf(e,r)|0;if((c[r>>2]|0)>>>0>64?(l=c[r+8>>2]|0,l|0):0)bN(l)}}else f=h;c[r>>2]=1;l=r+8|0;c[l>>2]=0;c[l+4>>2]=0;c[s>>2]=1;l=s+8|0;c[l>>2]=0;c[l+4>>2]=0;if(!j){wt(m,f,d,0,0);zf(r,m)|0;if((c[m>>2]|0)>>>0>64?(n=c[m+8>>2]|0,n|0):0)bN(n);wt(m,f,0,0,0);zf(s,m)|0;if((c[m>>2]|0)>>>0>64?(o=c[m+8>>2]|0,o|0):0)bN(o)}ev(e,0,0)|0;f=b;a:while(1){b=a[g>>0]|0;do if((b+-48&255)<10)b=(b<<24>>24)+-48|0;else{b=a[g>>0]|0;if((b+-97&255)<26){b=(b<<24>>24)+-87|0;break}b=a[g>>0]|0;if((b+-65&255)>=26){b=1;break a}b=(b<<24>>24)+-55|0}while(0);if(b>>>0>=d>>>0){b=1;break}if(j){xt(e,k)|0;yt(e,b,0)|0}else{av(e,r)|0;ev(s,b,0)|0;bv(e,s)|0}o=(f|0)!=0&1;g=g+o|0;f=f-o|0;c[q>>2]=g;c[p>>2]=f;if(!f){b=0;break}}if((c[s>>2]|0)>>>0>64?(t=c[s+8>>2]|0,t|0):0)bN(t);if((c[r>>2]|0)>>>0>64?(u=c[r+8>>2]|0,u|0):0)bN(u);u=b;i=v;return u|0}c[r>>2]=64;u=r+8|0;c[u>>2]=0;c[u+4>>2]=0;zg(r)|0;zf(e,r)|0;if((c[r>>2]|0)>>>0>64?(j=c[r+8>>2]|0,j|0):0)bN(j);u=0;i=v;return u|0}function wt(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;c[a>>2]=b;g=a+8|0;h=g;c[h>>2]=0;c[h+4>>2]=0;if(b>>>0<65){h=g;c[h>>2]=d;c[h+4>>2]=e;zg(a)|0;return}else{Yu(a,b,d,e,f);zg(a)|0;return}}function xt(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=i;i=i+16|0;d=f;zt(d,a,b);zf(a,d)|0;if((c[d>>2]|0)>>>0>64?(e=c[d+8>>2]|0,e|0):0)bN(e);i=f;return a|0}function yt(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=a+8|0;if((c[a>>2]|0)>>>0<65){f=e;d=c[f+4>>2]|d;c[e>>2]=c[f>>2]|b;c[e+4>>2]=d;zg(a)|0;return a|0}else{f=c[e>>2]|0;g=f;e=c[g+4>>2]|d;c[f>>2]=c[g>>2]|b;c[f+4>>2]=e;return a|0}return 0}function zt(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=c[b>>2]|0;if(e>>>0>=65){lv(a,b,d);return}if(e>>>0>d>>>0){b=b+8|0;d=jP(c[b>>2]|0,c[b+4>>2]|0,d|0)|0;wt(a,e,d,E,0);return}else{wt(a,e,0,0,0);return}}function At(a){a=a|0;var b=0;b=c[a>>2]|0;return Bt(b,b+(c[a+4>>2]|0)|0)|0}function Bt(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;j=i;i=i+64|0;h=j;if((a[1446696]|0)==0?LO(1446696)|0:0){g=c[361861]|0;c[361860]=g|0?g:-313160499}e=c[361860]|0;f=d-b|0;if(f>>>0<65){h=Ct(b,f,e,0)|0;i=j;return h|0}k=f&-64;g=b+k|0;Dt(h,b,e,0);if((k|0)!=64){b=b+64|0;do{Et(h,b);b=b+64|0}while((b|0)!=(g|0))}if(f&63|0)Et(h,d+-64|0);k=Ft(h,f)|0;i=j;return k|0}function Ct(a,b,c,e){a=a|0;b=b|0;c=c|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;if((b+-4|0)>>>0<5){f=jP(d[a>>0]|d[a+1>>0]<<8|d[a+2>>0]<<16|d[a+3>>0]<<24|0,0,3)|0;f=WO(f|0,E|0,b|0,0)|0;a=a+b+-4|0;a=(d[a>>0]|d[a+1>>0]<<8|d[a+2>>0]<<16|d[a+3>>0]<<24)^c;f=hP(a^f|0,e^E|0,-348639895,-1646269944)|0;c=E;b=bP(f|0,c|0,47)|0;c=hP(f^a^b|0,c^e^E|0,-348639895,-1646269944)|0;e=E;b=bP(c|0,e|0,47)|0;e=hP(b^c|0,E^e|0,-348639895,-1646269944)|0;c=E;E=c;return e|0}if((b+-9|0)>>>0<8){h=a;j=h;h=h+4|0;a=a+b+-8|0;f=a;f=d[f>>0]|d[f+1>>0]<<8|d[f+2>>0]<<16|d[f+3>>0]<<24;a=a+4|0;a=d[a>>0]|d[a+1>>0]<<8|d[a+2>>0]<<16|d[a+3>>0]<<24;c=(d[j>>0]|d[j+1>>0]<<8|d[j+2>>0]<<16|d[j+3>>0]<<24)^c;h=(d[h>>0]|d[h+1>>0]<<8|d[h+2>>0]<<16|d[h+3>>0]<<24)^e;j=WO(f|0,a|0,b|0,0)|0;i=E;g=bP(j|0,i|0,b|0)|0;e=E;b=jP(j|0,i|0,64-b|0)|0;g=b|g;e=E|e;h=hP(c^g|0,h^e|0,-348639895,-1646269944)|0;c=E;b=bP(h|0,c|0,47)|0;e=hP(h^g^b|0,c^e^E|0,-348639895,-1646269944)|0;c=E;b=bP(e|0,c|0,47)|0;c=hP(b^e|0,E^c|0,-348639895,-1646269944)|0;e=E^a;f=c^f;E=e;return f|0}if((b+-17|0)>>>0<16){m=a;l=m;m=m+4|0;m=hP(d[l>>0]|d[l+1>>0]<<8|d[l+2>>0]<<16|d[l+3>>0]<<24|0,d[m>>0]|d[m+1>>0]<<8|d[m+2>>0]<<16|d[m+3>>0]<<24|0,-1097272717,-1265453457)|0;l=E;h=a+8|0;n=h;n=d[n>>0]|d[n+1>>0]<<8|d[n+2>>0]<<16|d[n+3>>0]<<24;h=h+4|0;h=d[h>>0]|d[h+1>>0]<<8|d[h+2>>0]<<16|d[h+3>>0]<<24;r=a+b|0;k=r+-8|0;a=k;k=k+4|0;k=hP(d[a>>0]|d[a+1>>0]<<8|d[a+2>>0]<<16|d[a
|
||
|
function eF(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;s=i;i=i+32|0;p=s+16|0;q=s+8|0;m=s+4|0;n=s;g=b+52|0;if(a[g>>0]|0){f=b+48|0;e=c[f>>2]|0;if(d){c[f>>2]=-1;a[g>>0]=0}}else{e=c[b+44>>2]|0;e=(e|0)>1?e:1;o=b+32|0;f=0;while(1){if((f|0)>=(e|0)){r=8;break}g=TC(c[o>>2]|0)|0;if((g|0)==-1){e=-1;break}a[p+f>>0]=g;f=f+1|0}if((r|0)==8){do if(!(a[b+53>>0]|0)){j=b+40|0;k=b+36|0;l=q+4|0;a:while(1){t=c[j>>2]|0;g=t;f=c[g>>2]|0;g=c[g+4>>2]|0;u=c[k>>2]|0;h=p+e|0;switch(Kb[c[(c[u>>2]|0)+16>>2]&15](u,t,p,h,m,q,l,n)|0){case 3:{r=15;break a}case 2:{r=17;break a}case 1:break;default:break a}u=c[j>>2]|0;c[u>>2]=f;c[u+4>>2]=g;if((e|0)==8){r=17;break}f=TC(c[o>>2]|0)|0;if((f|0)==-1){r=17;break}a[h>>0]=f;e=e+1|0}if((r|0)==15)c[q>>2]=a[p>>0];else if((r|0)==17){e=-1;break}r=18}else{c[q>>2]=a[p>>0];r=18}while(0);b:do if((r|0)==18){if(d){e=c[q>>2]|0;c[b+48>>2]=e;break}while(1){if((e|0)<=0)break;e=e+-1|0;if((WC(a[p+e>>0]|0,c[o>>2]|0)|0)==-1){e=-1;break b}}e=c[q>>2]|0}while(0)}}i=s;return e|0}function fF(b,d){b=b|0;d=d|0;var e=0,f=0;f=KF(d,1457212)|0;e=b+36|0;c[e>>2]=f;d=b+44|0;c[d>>2]=yb[c[(c[f>>2]|0)+24>>2]&127](f)|0;e=c[e>>2]|0;a[b+53>>0]=(yb[c[(c[e>>2]|0)+28>>2]&127](e)|0)&1;return}function gF(a){a=a|0;ID(a);$M(a);return}function hF(a){a=a|0;return kF(a,0)|0}function iF(a){a=a|0;return kF(a,1)|0}function jF(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;m=i;i=i+32|0;j=m+16|0;k=m+4|0;f=m+8|0;g=m;l=b+52|0;e=(a[l>>0]|0)!=0;a:do if((d|0)==-1)if(e)d=-1;else{d=c[b+48>>2]|0;a[l>>0]=(d|0)!=-1&1}else{b:do if(e){e=b+48|0;a[f>>0]=c[e>>2];n=c[b+36>>2]|0;switch(Kb[c[(c[n>>2]|0)+12>>2]&15](n,c[b+40>>2]|0,f,f+1|0,g,j,j+8|0,k)|0){case 1:case 2:break;case 3:{a[j>>0]=c[e>>2];c[k>>2]=j+1;h=8;break}default:h=8}c:do if((h|0)==8){b=b+32|0;while(1){f=c[k>>2]|0;if(f>>>0<=j>>>0)break;n=f+-1|0;c[k>>2]=n;if((WC(a[n>>0]|0,c[b>>2]|0)|0)==-1)break c}break b}while(0);d=-1;break a}else e=b+48|0;while(0);c[e>>2]=d;a[l>>0]=1}while(0);i=m;return d|0}function kF(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;t=i;i=i+32|0;q=t+16|0;r=t+8|0;n=t+4|0;o=t;h=b+52|0;if(a[h>>0]|0){g=b+48|0;f=c[g>>2]|0;if(e){c[g>>2]=-1;a[h>>0]=0}}else{f=c[b+44>>2]|0;f=(f|0)>1?f:1;p=b+32|0;g=0;while(1){if((g|0)>=(f|0)){s=8;break}h=TC(c[p>>2]|0)|0;if((h|0)==-1){f=-1;break}a[q+g>>0]=h;g=g+1|0}if((s|0)==8){do if(!(a[b+53>>0]|0)){k=b+40|0;l=b+36|0;m=r+1|0;a:while(1){u=c[k>>2]|0;h=u;g=c[h>>2]|0;h=c[h+4>>2]|0;v=c[l>>2]|0;j=q+f|0;switch(Kb[c[(c[v>>2]|0)+16>>2]&15](v,u,q,j,n,r,m,o)|0){case 3:{s=15;break a}case 2:{s=17;break a}case 1:break;default:break a}v=c[k>>2]|0;c[v>>2]=g;c[v+4>>2]=h;if((f|0)==8){s=17;break}g=TC(c[p>>2]|0)|0;if((g|0)==-1){s=17;break}a[j>>0]=g;f=f+1|0}if((s|0)==15)a[r>>0]=a[q>>0]|0;else if((s|0)==17){f=-1;break}s=18}else{a[r>>0]=a[q>>0]|0;s=18}while(0);b:do if((s|0)==18){if(e){f=a[r>>0]|0;c[b+48>>2]=f&255}else{while(1){if((f|0)<=0)break;f=f+-1|0;if((WC(d[q+f>>0]|0,c[p>>2]|0)|0)==-1){f=-1;break b}}f=a[r>>0]|0}f=f&255}while(0)}}i=t;return f|0}function lF(a){a=a|0;return}function mF(a){a=a|0;$M(a);return}function nF(a){a=a|0;if(a|0)vb[c[(c[a>>2]|0)+4>>2]&255](a);return}function oF(b,c,d,e,f){b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;b=c;while(1){if((e|0)==(f|0)){h=7;break}if((b|0)==(d|0)){b=-1;break}c=a[b>>0]|0;g=a[e>>0]|0;if(c<<24>>24<g<<24>>24){b=-1;break}if(g<<24>>24<c<<24>>24){b=1;break}e=e+1|0;b=b+1|0}if((h|0)==7)b=(b|0)!=(d|0)&1;return b|0}function pF(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;Xu(a,d,e);return}function qF(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0;b=0;while(1){if((c|0)==(d|0))break;e=(a[c>>0]|0)+(b<<4)|0;f=e&-268435456;b=(f>>>24|f)^e;c=c+1|0}return b|0}function rF(a){a=a|0;return}function sF(a){a=a|0;$M(a);return}function tF(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;a=b;while(1){if((e|0)==(f|0)){h=7;break}if((a|0)==(d|0)){a=-1;break}b=c[a>>2]|0;g=c[e>>2]|0;if((b|0)<(g|0)){a=-1;break}if((g|0)<(b|0)){a=1;break}e=e+4|0;a=a+4|0}if((h|0)==7)a=(a|0)!=(d|0)&1;return a|0}function uF(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;wF(a,d,e);return}funct
|
||
|
function Co(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;g=i;i=i+16|0;f=g;h=Ao(d,e,f)|0;f=c[f>>2]|0;if(h){h=(c[d>>2]|0)+((c[d+12>>2]|0)*12|0)|0;c[b>>2]=f;c[b+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=b}if(f|0){Fo(a,f,f+(e*12|0)|0);$M(f);return}c[a+4>>2]=0;c[a+8>>2]=0;h=c[d>>2]|0;a=b+(h*12|0)|0;if(!h)return;do{c[b>>2]=-1;c[b+4>>2]=0;b=b+12|0}while((b|0)!=(a|0));return}function Fo(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;p=i;i=i+48|0;o=p+40|0;n=p+32|0;h=p+24|0;j=p+16|0;k=p+8|0;l=p;m=a+4|0;c[m>>2]=0;c[a+8>>2]=0;e=c[a>>2]|0;g=c[a+12>>2]|0;f=e+(g*12|0)|0;if(g|0)do{c[e>>2]=-1;c[e+4>>2]=0;e=e+12|0}while((e|0)!=(f|0));if((b|0)==(d|0)){i=p;return}g=j+4|0;f=l+4|0;e=b;do{r=e;q=c[r+4>>2]|0;b=h;c[b>>2]=c[r>>2];c[b+4>>2]=q;c[j>>2]=-1;c[g>>2]=0;c[n>>2]=c[h>>2];c[n+4>>2]=c[h+4>>2];c[o>>2]=c[j>>2];c[o+4>>2]=c[j+4>>2];if(!(uo(n,o)|0)?(b=e,q=c[b+4>>2]|0,r=k,c[r>>2]=c[b>>2],c[r+4>>2]=q,c[l>>2]=-2,c[f>>2]=0,c[n>>2]=c[k>>2],c[n+4>>2]=c[k+4>>2],c[o>>2]=c[l>>2],c[o+4>>2]=c[l+4>>2],!(uo(n,o)|0)):0){Ao(a,e,o)|0;r=c[o>>2]|0;s=e;b=c[s+4>>2]|0;q=r;c[q>>2]=c[s>>2];c[q+4>>2]=b;c[r+8>>2]=c[e+8>>2];c[m>>2]=(c[m>>2]|0)+1}e=e+12|0}while((e|0)!=(d|0));i=p;return}function Go(a){a=a|0;Ko(a);$M(a);return}function Ho(b,d){b=b|0;d=d|0;var e=0,f=0;f=c[d+140>>2]&255;if((f|0)==2){d=0;return d|0}b=d+108|0;do if(!(a[d+123>>0]|0)){if(((((UB(b)|0)==6?(PC(b,1396103,6)|0)==0:0)?(e=d+124|0,(a[d+139>>0]|0)==0):0)?(UB(e)|0)==10:0)?(PC(e,1396110,10)|0)==0:0){d=0;return d|0}if((UB(b)|0)==6?(PC(b,1396103,6)|0)==0:0){b=d+124|0;if((a[d+139>>0]|0)==0?(UB(b)|0)!=16:0)break;if(!(PC(b,1396121,16)|0)){d=0;return d|0}}}while(0);b=f+-3|0;if(b>>>0<12)return (800>>>(b&4095)&1)!=0|0;else{d=1;return d|0}return 0}function Io(b){b=b|0;Ro(b);c[b>>2]=821740;c[b+56>>2]=1443498;a[b+146>>0]=0;a[b+14>>0]=1;a[b+127>>0]=0;a[b+138>>0]=0;c[b+140>>2]=2;c[b+60>>2]=1396163;c[b+64>>2]=1396180;a[b+160>>0]=1;a[b+161>>0]=1;c[b+156>>2]=1396195;c[b+88>>2]=1396213;a[b+15>>0]=1;a[b+16>>0]=1;a[b+17>>0]=1;a[b+137>>0]=0;c[b+164>>2]=16;c[b+168>>2]=0;c[b+172>>2]=0;a[b+145>>0]=0;a[b+148>>0]=1;a[b+188>>0]=0;a[b+204>>0]=1;a[b+136>>0]=1;return}function Jo(b){b=b|0;a[b>>0]=a[b>>0]&-8;b=b+4|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;return}function Ko(a){a=a|0;c[a>>2]=821784;hn(a+192|0);return}function Lo(a){a=a|0;c[a>>2]=821784;hn(a+192|0);$M(a);return}function Mo(a,b){a=a|0;b=b|0;return 0}function No(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;return Lb[c[(c[a>>2]|0)+20>>2]&31](a,b,d,e)|0}function Oo(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;f=c[e+4>>2]|0;a=Tn(b,0,f)|0;if(!(d&16)){e=a;return e|0}d=wq(f,1)|0;wb[c[(c[e>>2]|0)+72>>2]&127](e,d);e=Nn(17,a,Tn(d,0,f)|0,f)|0;return e|0}function Po(b,d){b=b|0;d=d|0;var e=0;b=c[d+4>>2]|0;if(!b){e=0;return e|0}e=c[d>>2]|0;d=e+b|0;b=e;a:while(1){e=a[b>>0]|0;if(!((e+-48&255)<10|((e&-33)+-65&255)<26))switch(e<<24>>24){case 64:case 36:case 46:case 95:break;default:{b=0;d=6;break a}}b=b+1|0;if((b|0)==(d|0)){b=1;d=6;break}}if((d|0)==6)return b|0;return 0}function Qo(b,d){b=b|0;d=d|0;var e=0;e=d;d=c[e>
|
||
|
function Hz(b,f,g,j,k,l){b=b|0;f=f|0;g=g|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;Y=i;i=i+32|0;W=Y;p=Y+16|0;X=f+4|0;m=c[f>>2]|0;if((c[X>>2]|0)-m>>2>>>0>10){X=j;c[X>>2]=10;c[X+4>>2]=0;X=512;i=Y;return X|0}R=b+16|0;V=c[R>>2]|0;R=c[R+4>>2]|0;n=c[m>>2]|0;m=c[n+52>>2]|0;n=c[n+56>>2]|0;c[p>>2]=n;a:do switch(l|0){case 0:{b:do switch(n|0){case 2:{S=320;break a}case 3:{n=m;switch(a[n>>0]|0){case 99:switch(a[n+1>>0]|0){case 98:{if((a[n+2>>0]|0)!=119){S=324;break a}c[p>>2]=4;m=1419456;break b}case 100:{if((a[n+2>>0]|0)!=113){S=324;break a}c[p>>2]=4;m=1419461;break b}case 113:{if((a[n+2>>0]|0)!=111){S=324;break a}c[p>>2]=4;m=1419466;break b}case 119:{if((a[n+2>>0]|0)!=100){S=324;break a}c[p>>2]=4;m=1419471;break b}default:{S=324;break a}}case 112:{if(PC(n+1|0,1419242,2)|0){S=324;break a}if(!((V&512|0)==0&0==0)){c[p>>2]=4;m=1419476;break b}if(!((V&1024|0)==0&0==0)){c[p>>2]=4;m=1419481;break b}if((V&2048|0)==0&0==0)break b;c[p>>2]=4;m=1419486;break b}case 114:{if(PC(n+1|0,1419245,2)|0){S=324;break a}if(!((V&512|0)==0&0==0)){c[p>>2]=4;m=1419491;break b}if(!((V&1024|0)==0&0==0)){c[p>>2]=4;m=1419496;break b}if((V&2048|0)==0&0==0)break b;c[p>>2]=4;m=1419501;break b}default:{S=324;break a}}}case 4:{n=m;switch(a[n>>0]|0){case 99:switch(a[n+1>>0]|0){case 97:{if(PC(n+2|0,1443489,2)|0){S=336;break a}if(!((V&512|0)==0&0==0)){c[p>>2]=5;m=1419506;break b}if(!((V&1024|0)==0&0==0)){c[p>>2]=5;m=1419512;break b}if((V&2048|0)==0&0==0)break b;c[p>>2]=5;m=1419518;break b}case 100:{if(PC(n+2|0,1419248,2)|0){S=336;break a}c[p>>2]=4;m=1419524;break b}case 119:{if(PC(n+2|0,1419251,2)|0){S=336;break a}c[p>>2]=4;m=1419529;break b}default:{S=336;break a}}case 105:{if(PC(n+1|0,1419254,3)|0){S=336;break a}if(!((V&512|0)==0&0==0)){c[p>>2]=5;m=1419534;break b}if((V&4096|0)==0&0==0)break b;c[p>>2]=5;m=1419540;break b}case 108:switch(a[n+1>>0]|0){case 103:{if(PC(n+2|0,1419258,2)|0){S=336;break a}if(!((V&512|0)==0&0==0)){c[p>>2]=5;m=1419546;break b}if(!((V&1024|0)==0&0==0)){c[p>>2]=5;m=1419552;break b}if((V&2048|0)==0&0==0)break b;c[p>>2]=5;m=1419558;break b}case 105:{if(PC(n+2|0,1419258,2)|0){S=336;break a}if(!((V&512|0)==0&0==0)){c[p>>2]=5;m=1419564;break b}if(!((V&1024|0)==0&0==0)){c[p>>2]=5;m=1419570;break b}if((V&2048|0)==0&0==0)break b;c[p>>2]=5;m=1419576;break b}case 114:{if(PC(n+2|0,1419245,2)|0){S=336;break a}if(!((V&512|0)==0&0==0)){c[p>>2]=5;m=1419582;break b}if((V&4096|0)==0&0==0)break b;c[p>>2]=5;m=1419588;break b}default:{S=336;break a}}case 112:{switch(a[n+1>>0]|0){case 111:break;case 117:{if(PC(n+2|0,1419261,2)|0){S=336;break a}if(!((V&512|0)==0&0==0)){c[p>>2]=5;m=1419624;break b}if(!((V&1024|0)==0&0==0)){c[p>>2]=5;m=1419630;break b}if((V&2048|0)==0&0==0)break b;c[p>>2]=5;m=1419636;break b}default:{S=336;break a}}if((a[n+2>>0]|0)!=112){S=336;break a}switch(a[n+3>>0]|0){case 97:{if(!((V&512|0)==0&0==0)){c[p>>2]=5;m=1419594;break b}if((V&1024|0)==0&0==0)break b;c[p>>2]=5;m=1419600;break b}case 102:break;default:{S=336;break a}}if(!((V&512|0)==0&0==0)){c[p>>2]=5;m=1419606;break b}if(!((V&1024|0)==0&0==0)){c[p>>2]=5;m=1419612;break b}if((V&2048|0)==0&0==0)break b;c[p>>2]=5;m=1419618;break b}case 115:switch(a[n+1>>0]|0){case 97:{if((a[n+2>>0]|0)!=108){S=336;break a}switch(a[n+3>>0]|0){case 98:{c[p>>2]=4;m=1419642;break b}case 108:{c[p>>2]=4;m=1419647;break b}case 113:{c[p>>2]=4;m=1419652;break b}case 119:{c[p>>2]=4;m=1419657;break b}default:{S=336;break a}}}case 103:{if(PC(n+2|0,1419258,2)|0){S=336;break a}if(!((V&512|0)==0&0==0)){c[p>>2]=5;m=1419662;break b}if(!((V&1024|0)==0&0==0)){c[p>>2]=5;m=1419668;break b}if((V&2048|0)==0&0==0)break b;c[p>>2]=5;m=1419674;break b}case 105:{if(PC(n+2|0,1419258,2)|0){S=336;break a}if(!((V&512|0)==0&0==0)){c[p>>2]=5;m=1419680;break b}if(!((V&1024|0)==0&0==0)){c[p>>2]=5;m=1419686;break b}if((V&2048|0)==0&0==0)break b;c[p>>2]=5;m=1419692;break b}default:{S=336;break a}}case 117:{if(PC(n+1|0,1419264,3)|0){S=336;break a}c[p>>2]=3;m=1419698;break b}default:{S=336;break a}}}case 5:{n=m;switch(
|
||
|
function Ob(a){a=a|0;var b=0;b=i;i=i+a|0;i=i+15&-16;return b|0}function Pb(){return i|0}function Qb(a){a=a|0;i=a}function Rb(a,b){a=a|0;b=b|0;i=a;j=b}function Sb(a,b){a=a|0;b=b|0;if(!p){p=a;q=b}}function Tb(a){a=a|0;E=a}function Ub(){return E|0}function Vb(b){b=b|0;c[b>>2]=819072;b=b+4|0;a[b>>0]=a[b>>0]&-2;return}function Wb(a){a=a|0;return}function Xb(a){a=a|0;$M(a);return}function Yb(b,c,d){b=b|0;c=c|0;d=d|0;a[b+4>>0]=0;return}function Zb(a,b){a=a|0;b=b|0;return 819144+(b<<4)|0}function _b(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0;j=i;i=i+16|0;if(!d){h=1;i=j;return h|0}h=sb[c[(c[a>>2]|0)+48>>2]&15](a,b,e,f,g,h,j)|0;i=j;return h|0}function $b(a){a=a|0;return}function ac(a){a=a|0;return 0}function bc(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return}function cc(a){a=a|0;return 1}function dc(a,b){a=a|0;b=b|0;return}function ec(a,b){a=a|0;b=b|0;return 0}function fc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=c[(d?a+84|0:a+80|0)>>2]|0;a=c[(d?a+68|0:a+64|0)>>2]|0;d=e+(a<<3)|0;a=a<<3>>3;if(a)do{h=(a|0)/2|0;f=e+(h<<3)|0;g=(c[f>>2]|0)>>>0<b>>>0;a=g?a+-1-h|0:h;e=g?f+8|0:e}while((a|0)!=0);if((e|0)==(d|0)){h=-1;return h|0}if((c[e>>2]|0)!=(b|0)){h=-1;return h|0}h=c[e+4>>2]|0;return h|0}function gc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;l=c[a>>2]|0;a=c[a+12>>2]|0;if(!a){c[d>>2]=0;d=0;return d|0}k=c[b>>2]|0;j=a+-1|0;e=k*37&j;a=l+(e<<3)|0;b=c[a>>2]|0;a:do if((k|0)!=(b|0)){h=1;i=0;while(1){if((b|0)==-1)break;e=h+e&j;f=l+(e<<3)|0;g=c[f>>2]|0;if((k|0)==(g|0)){a=f;break a}else{h=h+1|0;i=(i|0)!=0|(b|0)!=-2?i:a;b=g;a=f}}c[d>>2]=i|0?i:a;d=0;return d|0}while(0);c[d>>2]=a;d=1;return d|0}function hc(a){a=a|0;Ko(a);$M(a);return}function ic(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;j=i;i=i+32|0;h=j+24|0;g=j+16|0;e=j+8|0;f=j;if(!(a[b+207>>0]|0)){h=0;i=j;return h|0}c[e>>2]=1383606;c[e+4>>2]=15;c[f>>2]=1459454;c[f+4>>2]=0;c[g>>2]=c[e>>2];c[g+4>>2]=c[e+4>>2];c[h>>2]=c[f>>2];c[h+4>>2]=c[f+4>>2];h=Wq(d,g,1,0,0,h,-1,0)|0;i=j;return h|0}function jc(b,c){b=b|0;c=c|0;a[b+204>>0]=c&1;return}function kc(b){b=b|0;Ro(b);c[b>>2]=819408;a[b+147>>0]=1;c[b+156>>2]=1396338;c[b+48>>2]=1400576;c[b+52>>2]=1400576;a[b+207>>0]=1;return}function lc(a){a=a|0;return}function mc(a){a=a|0;$M(a);return}function nc(a,b){a=a|0;b=b|0;c[a+4>>2]=b;return}function oc(b){b=b|0;c[b>>2]=819452;a[b+8>>0]=0;return}function pc(a){a=a|0;c[a>>2]=819472;kN(a+40|0);return}function qc(a){a=a|0;c[a>>2]=819472;kN(a+40|0);$M(a);return}function rc(a,b){a=a|0;b=b|0;return}function sc(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;h=i;i=i+32|0;j=h+24|0;k=h+16|0;n=h;m=h+8|0;l=c[(c[a>>2]|0)+20>>2]|0;p=d;o=c[p+4>>2]|0;d=n;c[d>>2]=c[p>>2];c[d+4>>2]=o;c[m>>2]=Vh(e)|0;c[k>>2]=c[n>>2];c[k+4>>2]=c[n+4>>2];c[j>>2]=c[m>>2];g=xb[l&63](a,b,k,j,f,g)|0;i=h;return g|0}function tc(a,b){a=a|0;b=b|0;return 0}function uc(a,b,c){a=a|0;b=b|0;c=c|0;return 512}function vc(a,b){a=a|0;b=b|0;return 1}function wc(a){a=a|0;return 1}function xc(b,c,d){b=b|0;c=c|0;d=d|0;a[d>>0]=1;return 1}function yc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return 0}function zc(a,b){a=a|0;b=b|0;return}function Ac(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;oc(b);c[b>>2]=819472;h=b+16|0;c[h>>2]=0;c[h+4>>2]=0;a[b+24>>0]=0;h=d;g=c[h+4>>2]|0;f=b+32|0;c[f>>2]=c[h>>2];c[f+4>>2]=g;hN(b+40|0,d+8|0);c[b+52>>2]=e;return}function Bc(a){a=a|0;var b=0,d=0;d=c[a+4>>2]|0;d=yb[c[(c[d>>2]|0)+24>>2]&127](d)|0;b=a+52|0;a=er(d,c[b>>2]|0)|0;c[b>>2]=a;return a|0}function Cc(a){a=a|0;return c[a+52>>2]|0}function Dc(){var a=0;a=YM(16)|0;oc(a);c[a>>2]=819548;c[a+12>>2]=0;return a|0}function Ec(a){a=a|0;$M(a);return}function Fc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;i=i+32|0;e=d+24|0;f=d+16|0;j=d;h=d+8|0;nc(a,b);k=a;b=a+4|0;g=c[b>>2]|0;l=c[(c[g>>2]|0)+8>>2]|0;c[j>>2]=1383701;c[j+4>>2]=5;c[h>>2]=k;c[h+4>>2]=40;c[f>>2]=c[j>>2];c[f+4>>2]=c[j+4>>2];c[e>>2]=c[h>>2];c[e+4>>2]=c[h+4>>2];Ib[l&63](g,f,e);g=c[b>>2]|0;l=c[(c[g>>2]|0)+8>>2]|0;c[j>>2]=1383707;c[j+4>>2]=16;c[h>>2]=k;c[h+4>>2]=41;c[f>>2]=c[j>>2];c[f+4>>2]=c[j+4>>2];c[e>>2]=c[h>>2];c[e+4>>2]=c[h+4>>2];Ib[l
|
||
|
function hB(a){a=a|0;do switch(a|0){case 0:{a=1439856;break}case 1:{a=1439799;break}case 2:{a=1439752;break}case 3:{a=1439721;break}case 4:{a=1439694;break}case 5:{a=1439632;break}case 6:{a=1439596;break}case 512:{a=1439552;break}case 513:{a=1439504;break}case 514:{a=1439461;break}case 128:{a=1439409;break}case 129:{a=1439333;break}case 130:{a=1439274;break}case 131:{a=1439215;break}case 132:{a=1439159;break}case 133:{a=1439102;break}case 136:{a=1439036;break}case 140:{a=1438991;break}case 138:{a=1438940;break}case 141:{a=1438880;break}case 142:{a=1438810;break}case 143:{a=1438755;break}case 144:{a=1438706;break}case 145:{a=1438673;break}case 146:{a=1438610;break}case 147:{a=1438563;break}case 148:{a=1438498;break}case 149:{a=1438432;break}case 150:{a=1438362;break}case 151:{a=1438308;break}case 152:{a=1438226;break}case 153:{a=1438182;break}case 154:{a=1438141;break}case 155:{a=1438068;break}case 156:{a=1438015;break}case 157:{a=1437965;break}case 158:{a=1437922;break}case 159:{a=1437875;break}case 160:{a=1437805;break}case 137:{a=1437756;break}case 161:{a=1437715;break}case 162:{a=1437674;break}case 163:{a=1437627;break}case 139:{a=1437578;break}default:a=1439871}while(0);return a|0}function iB(a){a=a|0;return (a|0)==4|0}function jB(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;E=i;i=i+224|0;y=E;s=E+200|0;r=E+188|0;C=E+176|0;g=E+168|0;h=E+140|0;D=E+104|0;j=E+96|0;k=E+88|0;x=E+80|0;t=E+72|0;u=E+64|0;v=E+56|0;w=E+48|0;A=E+36|0;B=E+152|0;c[A>>2]=0;c[A+4>>2]=0;c[A+8>>2]=0;iN(A,1459454,0);if((b|0)>=9){D=2;kN(A);i=E;return D|0}f=ZM(460,1459455)|0;if(!f)z=0;else{UO(f|0,0,460)|0;Jo(f+76|0);q=f+108|0;c[q>>2]=0;c[q+4>>2]=0;c[q+8>>2]=0;q=f+424|0;z=f+444|0;c[q>>2]=0;c[q+4>>2]=0;c[q+8>>2]=0;c[q+12>>2]=0;c[z>>2]=0;c[z+4>>2]=0;c[z+8>>2]=0;c[z+12>>2]=0;z=f}m=z+20|0;c[m>>2]=0;n=z+72|0;c[n>>2]=0;o=z+96|0;c[o>>2]=0;f=z+100|0;c[f>>2]=0;p=z+104|0;c[p>>2]=0;q=z+120|0;c[q>>2]=0;if(!z){D=1;kN(A);i=E;return D|0}c[z+8>>2]=0;c[z>>2]=b;c[z+4>>2]=d;if((b|0)==4){if((d&-15|0)!=0|(d&14|0)==0){kN(z+424|0);kN(z+108|0);kN(z+84|0);Pv(z+36|0);kN(z+24|0);$M(z);D=4;kN(A);i=E;return D|0}switch(d|0){case 2:{pN(A,1439884)|0;break}case 4:{pN(A,1439912)|0;break}case 8:{pN(A,1439917)|0;break}default:{}}hN(B,A);c[C>>2]=0;c[C+4>>2]=0;c[C+8>>2]=0;iN(C,1459454,0);if(!(a[1457380]|0)){a[1457380]=1;pz();jz();sz()}l=z+24|0;d=a[B+11>>0]|0;b=d<<24>>24<0;c[g>>2]=b?c[B>>2]|0:B;c[g+4>>2]=b?c[B+4>>2]|0:d&255;c[y>>2]=c[g>>2];c[y+4>>2]=c[g+4>>2];Zx(s,y);g=l+11|0;if((a[g>>0]|0)<0){a[c[l>>2]>>0]=0;c[z+28>>2]=0}else{a[l>>0]=0;a[g>>0]=0}oN(l,0);c[l>>2]=c[s>>2];c[l+4>>2]=c[s+4>>2];c[l+8>>2]=c[s+8>>2];c[s>>2]=0;c[s+4>>2]=0;c[s+8>>2]=0;kN(s);hN(h,l);a[s+8>>0]=4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>2]|0:l;c[v+4>>2]=x?c[d>>2]|0:f&255;d=a[k>>0]|0;f=d<<24>>24<0;c[w>>2]=f?c[C>>2]|0:C;c[w+4>>2]=f?c[p>>2]|0:d&255;c[s>>2]=c[v>>2];c[s+4>>2]=c[v+4>>2];c[y>>2]=c[w>>2];c[y+4>>2]=c[w+4>>2];d=nB(b,F,s,y)|0;c[n>>2]=d;c[d+8>>2]=4;Jo(y);a[y>>0]=a[y>>0]&-2|a[1457377];c[y+4>>2]=c[363449];d
|
||
|
function tJ(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;AN(a,1,45);return}function uJ(a){a=a|0;return 0}function vJ(b,c){b=b|0;c=c|0;a[b>>0]=2;a[b+1>>0]=3;a[b+2>>0]=0;a[b+3>>0]=4;return}function wJ(b,c){b=b|0;c=c|0;a[b>>0]=2;a[b+1>>0]=3;a[b+2>>0]=0;a[b+3>>0]=4;return}function xJ(a){a=a|0;return}function yJ(a){a=a|0;$M(a);return}function zJ(a){a=a|0;return 2147483647}function AJ(a){a=a|0;return 2147483647}function BJ(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[a+(b<<2)>>2]=0;b=b+1|0}return}function CJ(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[a+(b<<2)>>2]=0;b=b+1|0}return}function DJ(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[a+(b<<2)>>2]=0;b=b+1|0}return}function EJ(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;AN(a,1,45);return}function FJ(a){a=a|0;return 0}function GJ(b,c){b=b|0;c=c|0;a[b>>0]=2;a[b+1>>0]=3;a[b+2>>0]=0;a[b+3>>0]=4;return}function HJ(b,c){b=b|0;c=c|0;a[b>>0]=2;a[b+1>>0]=3;a[b+2>>0]=0;a[b+3>>0]=4;return}function IJ(a){a=a|0;return}function JJ(a){a=a|0;$M(a);return}function KJ(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;w=i;i=i+240|0;o=w+24|0;r=w;n=w+140|0;v=w+16|0;q=w+12|0;s=w+8|0;k=w+136|0;l=w+4|0;p=w+36|0;c[v>>2]=n;u=v+4|0;c[u>>2]=212;c[s>>2]=AE(g)|0;b=KF(s,1455420)|0;a[k>>0]=0;c[l>>2]=c[e>>2];m=c[g+4>>2]|0;c[o>>2]=c[l>>2];if(NJ(d,o,f,s,m,h,k,b,v,q,n+100|0)|0){Lb[c[(c[b>>2]|0)+32>>2]&31](b,1444542,1444552,o)|0;b=(c[q>>2]|0)-(c[v>>2]|0)|0;if((b|0)>98){b=zD(b+2|0)|0;f=b;if(!b)b=0}else{b=p;f=0}if(a[k>>0]|0){a[b>>0]=45;b=b+1|0}m=o+10|0;n=o;l=c[v>>2]|0;while(1){if(l>>>0>=(c[q>>2]|0)>>>0)break;k=a[l>>0]|0;g=o;while(1){if((g|0)==(m|0)){g=m;break}if((a[g>>0]|0)==k<<24>>24)break;g=g+1|0}a[b>>0]=a[1444542+(g-n)>>0]|0;l=l+1|0;b=b+1|0}a[b>>0]=0;c[r>>2]=j;dD(p,1444553,r)|0;if(f|0)AD(f)}b=c[d>>2]|0;do if(b){if((c[b+12>>2]|0)==(c[b+16>>2]|0))if((yb[c[(c[b>>2]|0)+36>>2]&127](b)|0)==-1){c[d>>2]=0;b=0;break}else{b=c[d>>2]|0;break}}else b=0;while(0);b=(b|0)==0;f=c[e>>2]|0;do if(f){if((c[f+12>>2]|0)==(c[f+16>>2]|0)?(yb[c[(c[f>>2]|0)+36>>2]&127](f)|0)==-1:0){c[e>>2]=0;t=27;break}if(!b)t=28}else t=27;while(0);if((t|0)==27?b:0)t=28;if((t|0)==28)c[h>>2]=c[h>>2]|2;f=c[d>>2]|0;WM(c[s>>2]|0)|0;b=c[v>>2]|0;c[v>>2]=0;if(b|0)vb[c[u>>2]&255](b);i=w;return f|0}function LJ(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;t=i;i=i+144|0;u=t+24|0;b=t+32|0;s=t+16|0;m=t+8|0;p=t+4|0;k=t+28|0;n=t;c[s>>2]=b;r=s+4|0;c[r>>2]=212;c[p>>2]=AE(g)|0;l=KF(p,1455420)|0;a[k>>0]=0;o=c[e>>2]|0;c[n>>2]=o;g=c[g+4>>2]|0;c[u>>2]=c[n>>2];n=o;if(NJ(d,u,f,p,g,h,k,l,s,m,b+100|0)|0){b=j+11|0;if((a[b>>0]|0)<0){a[c[j>>2]>>0]=0;c[j+4>>2]=0}else{a[j>>0]=0;a[b>>0]=0}if(a[k>>0]|0)vN(j,Eb[c[(c[l>>2]|0)+28>>2]&63](l,45)|0);l=Eb[c[(c[l>>2]|0)+28>>2]&63](l,48)|0;g=c[m>>2]|0;k=g+-1|0;b=c[s>>2]|0;while(1){if(b>>>0>=k>>>0)break;if((a[b>>0]|0)!=l<<24>>24)break;b=b+1|0}OJ(j,b,g)|0}b=c[d>>2]|0;do if(b){if((c[b+12>>2]|0)==(c[b+16>>2]|0))if((yb[c[(c[b>>2]|0)+36>>2]&127](b)|0)==-1){c[d>>2]=0;b=0;break}else{b=c[d>>2]|0;break}}else b=0;while(0);b=(b|0)==0;do if(o){if((c[n+12>>2]|0)==(c[n+16>>2]|0)?(yb[c[(c[o>>2]|0)+36>>2]&127](n)|0)==-1:0){c[e>>2]=0;q=22;break}if(!b)q=23}else q=22;while(0);if((q|0)==22?b:0)q=23;if((q|0)==23)c[h>>2]=c[h>>2]|2;g=c[d>>2]|0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ka=ta+152|0;ba=ta+136|0;ia=ta+104|0;ha=ta+72|0;ea=ta+1016|0;da=ta+1004|0;aa=ta+992|0;_=ta+984|0;fa=ta+40|0;ga=ta+972|0;ra=ta+8|0;W=ta+968|0;Q=ta;m=ta+880|0;n=ta+872|0;t=ta+864|0;u=ta+1044|0;p=ta+856|0;w=ta+824|0;C=ta+816|0;D=ta+1040|0;K=ta+1032|0;L=ta+784|0;M=ta+1028|0;ja=d+8|0;c[ja>>2]=0;$=d+16|0;ca=d+24|0;if((c[c[ca>>2]>>2]|0)==7){sa=c[d+132>>2]|0;vb[c[(c[sa>>2]|0)+56>>2]&255](sa);yb[c[(c[d>>2]|0)+76>>2]&127](d)|0;sa=0;i=ta;return sa|0}k=sh(d)|0;c[ra>>2]=c[k>>2];c[ra+4>>2]=c[k+4>>2];c[ra+8>>2]=c[k+8>>2];O=ra+16|0;l=k+16|0;v=c[l>>2]|0;c[O>>2]=v;P=ra+24|0;o=P;c[o>>2]=0;c[o+4>>2]=0;if(v>>>0<65){l=k+24|0;o=c[l+4>>2]|0;v=P;c[v>>2]=c[l>>2];c[v+4>>2]=o}else Zu(O,l);l=Vh(ra)|0;c[W>>2]=l;c[Q>>2]=0;v=Q+4|0;c[v>>2]=0;k=c[c[ca>>2]>>2]|0;a:do switch(k|0){case 35:{yb[c[(c[d>>2]|0)+76>>2]&127](d)|0;if((c[c[(yb[c[(c[d>>2]|0)+20>>2]&127](d)|0)+8>>2]>>2]|0)!=4){Vf(d);h=0;break a}h=sh(d)|0;if((c[h>>2]|0)==4){j=h+24|0;j=(c[h+16>>2]|0)>>>0<65?j:c[j>>2]|0;h=c[j>>2]|0;j=c[j+4>>2]|0;yb[c[(c[d>>2]|0)+76>>2]&127](d)|0;if((c[c[(yb[c[(c[d>>2]|0)+20>>2]&127](d)|0)+8>>2]>>2]|0)==3){na=sh(d)|0;pa=c[na+8>>2]|0;qa=pa+-2|0;oa=(pa|0)!=0&1;pa=pa-oa|0;oa=(c[na+4>>2]|0)+oa|0;c[d+296>>2]=l;c[d+276>>2]=oa;c[d+280>>2]=pa>>>0<qa>>>0?pa:qa;qa=d+288|0;c[qa>>2]=h;c[qa+4>>2]=j;c[d+300>>2]=c[d+156>>2];Vf(d);h=0;break a}else{Vf(d);h=0;break a}}else h=1;break}case 4:{k=sh(d)|0;if((c[k>>2]|0)==4){l=k+24|0;l=(c[k+16>>2]|0)>>>0<65?l:c[l>>2]|0;k=c[l>>2]|0;l=c[l+4>>2]|0;if((l|0)<0)if(!(a[d+165>>0]|0)){c[e>>2]=146;h=1;break a}else{c[Q>>2]=1459454;c[Q+4>>2]=0;ma=38;break a}else{m=(sh(d)|0)+4|0;n=c[m+4>>2]|0;o=Q;c[o>>2]=c[m>>2];c[o+4>>2]=n;yb[c[(c[d>>2]|0)+76>>2]&127](d)|0;if((c[c[ca>>2]>>2]|0)==8){ma=38;break a}if(a[d+165>>0]|0){ma=38;break a}c[e>>2]=146;h=1;break a}}else h=1;break}case 22:{yb[c[(c[d>>2]|0)+76>>2]&127](d)|0;c[Q>>2]=1440473;c[Q+4>>2]=1;k=-1;l=-1;ma=38;break}case 19:{yb[c[(c[d>>2]|0)+76>>2]&127](d)|0;c[Q>>2]=1436439;c[Q+4>>2]=1;k=-1;l=-1;ma=38;break}case 20:{yb[c[(c[d>>2]|0)+76>>2]&127](d)|0;c[Q>>2]=1436441;c[Q+4>>2]=1;k=-1;l=-1;ma=38;break}default:{do if((c[d+316>>2]|0)==4){if((k|0)!=17){k=ra+4|0;l=k;m=c[l+4>>2]|0;o=n;c[o>>2]=c[l>>2];c[o+4>>2]=m;c[qa>>2]=c[n>>2];c[qa+4>>2]=c[n+4>>2];if(!(Yf(d,qa)|0))break;yb[c[(c[d>>2]|0)+76>>2]&127](d)|0;ma=k;l=c[ma+4>>2]|0;k=Q;c[k>>2]=c[ma>>2];c[k+4>>2]=l;k=-1;l=-1;ma=38;break a}yb[c[(c[d>>2]|0)+76>>2]&127](d)|0;na=c[ca>>2]|0;c[ra>>2]=c[na>>2];c[ra+4>>2]=c[na+4>>2];c[ra+8>>2]=c[na+8>>2];Wf(O,na+16|0)|0;na=ra+4|0;oa=c[na+4>>2]|0;pa=m;c[pa>>2]=c[na>>2];c[pa+4>>2]=oa;kt(qa,m);pa=a[qa+11>>0]|0;if(((pa<<24>>24<0?c[qa+4>>2]|0:pa&255)|0)==4){pa=(xN(qa,0,-1,1387105,4)|0)==0;kN(qa);if(pa){yb[c[(c[d>>2]|0)+76>>2]&127](d)|0;if(!(Xf(d)|0)){h=0;break a}c[e>>2]=130;h=1;break a}}else kN(qa);c[e>>2]=130;h=1;break a}while(0);if(Eb[c[(c[d>>2]|0)+80>>2]&63](d,Q)|0)if(!(a[d+165>>0]|0)){c[e>>2]=146;h=1;break a}else{c[Q>>2]=1459454;c[Q+4>>2]=0;k=-1;l=-1;ma=38;break a}else{k=-1;l=-1;ma=38}}}while(0);b:do if((ma|0)==38){n=d+320|0;kt(oa,Q);m=a[oa+11>>0]|0;o=m<<24>>24<0;m=o?c[oa+4>>2]|0:m&255;c[pa>>2]=o?c[oa>>2]|0:oa;c[pa+4>>2]=m;c[qa>>2]=c[pa>>2];c[qa+4>>2]=c[pa+4>>2];m=Jx(n,qa)|0;o=d+324|0;if((m|0)==-1)m=c[o>>2]|0;m=(c[n>>2]|0)+(m<<2)|0;kN(oa);c:do if((m|0)==((c[n>>2]|0)+(c[o>>2]<<2)|0))q=0;else{m=c[(c[m>>2]|0)+4>>2]|0;do switch(m|0){case 64:case 63:case 62:case 61:case 60:case 59:case 58:{h=d+160|0;j=d+172|0;k=c[j>>2]|0;if((k|0)==(c[d+176>>2]|0))Zf(d+168|0,h);else{na=h;oa=c[na+4>>2]|0;pa=k;c[pa>>2]=c[na>>2];c[pa+4>>2]=oa;c[j>>2]=(c[j>>2]|0)+8}c[h>>2]=1;h=d+165|0;if(a[h>>0]|0){vb[c[(c[d>>2]|0)+92>>2]&255](d);h=0;break b}if(Eb[c[(c[d>>2]|0)+108>>2]&63](d,qa)|0){c[ja>>2]=139;h=1;break b}if((c[c[(yb[c[(c[d>>2]|0)+20>>2]&127](d)|0)+8>>2]>>2]
|
||
|
function Px(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;X=i;i=i+192|0;d=X+184|0;g=X+176|0;Y=X;b=X+172|0;e=X+168|0;f=X+164|0;h=X+160|0;l=X+156|0;m=X+152|0;n=X+148|0;o=X+144|0;p=X+140|0;q=X+136|0;r=X+132|0;s=X+128|0;t=X+124|0;u=X+120|0;v=X+116|0;w=X+112|0;x=X+108|0;y=X+104|0;z=X+100|0;A=X+96|0;B=X+92|0;C=X+88|0;D=X+84|0;E=X+80|0;F=X+76|0;G=X+72|0;H=X+68|0;I=X+64|0;J=X+60|0;K=X+56|0;L=X+52|0;M=X+48|0;N=X+44|0;O=X+40|0;P=X+36|0;Q=X+32|0;R=X+28|0;S=X+24|0;T=X+20|0;U=X+16|0;V=X+12|0;W=X+8|0;k=a;j=c[k>>2]|0;k=c[k+4>>2]|0;a=Y;c[a>>2]=j;c[a+4>>2]=k;c[d>>2]=c[Y>>2];c[d+4>>2]=c[Y+4>>2];c[g>>2]=Qx(d)|0;c[d>>2]=3;a=(k|0)==7;do if(a){Y=(PC(1399271,j,7)|0)==0;c[b>>2]=4;if(Y){b=d;d=5}else d=6}else{c[b>>2]=4;if((k|0)==10)if(!(PC(1399260,j,10)|0)){d=5;break}else{d=6;break}c[e>>2]=3;if((k|0)==5)if(!(PC(1399621,j,5)|0)){b=e;d=9;break}else{d=10;break}c[f>>2]=1;if((k|0)==3){b=j;if(!(PC(1399256,b,3)|0)){b=f;d=14}else{c[h>>2]=2;c[l>>2]=5;d=21}}else d=15}while(0);if((d|0)==5){c[e>>2]=3;d=9}else if((d|0)==6){c[e>>2]=3;d=10}if((d|0)==9){c[f>>2]=1;d=14}else if((d|0)==10){c[f>>2]=1;d=15}do if((d|0)==14){c[h>>2]=2;d=18}else if((d|0)==15){c[h>>2]=2;if((k|0)==5){b=j;if(!(PC(1399250,b,5)|0)){b=h;d=18;break}c[l>>2]=5;d=25;break}c[l>>2]=5;if((k|0)==3){b=j;d=21;break}if(k>>>0>2){b=j;d=25;break}else{c[m>>2]=9;d=30;break}}while(0);if((d|0)==18){c[l>>2]=5;d=26}else if((d|0)==21)if(!(PC(1399246,b,3)|0)){b=l;d=26}else d=25;do if((d|0)==25)if(PC(1399287,b,3)|0){c[m>>2]=9;if((k|0)==4)if(!(PC(1399221,b,4)|0)){b=m;d=29;break}else{d=30;break}c[n>>2]=10;if((k|0)==6){if(!(PC(1399214,b,6)|0)){b=n;d=33;break}c[o>>2]=11;if(!(PC(1399207,b,6)|0)){b=o;d=35;break}else{d=36;break}}c[o>>2]=11;c[p>>2]=12;if((k|0)==8)if(!(PC(1399198,b,8)|0)){b=p;d=40}else{c[q>>2]=13;d=44}else d=41}else{b=g;d=26}while(0);if((d|0)==26){c[m>>2]=9;d=29}else if((d|0)==30){c[n>>2]=10;c[o>>2]=11;d=36}if((d|0)==29){c[n>>2]=10;d=33}else if((d|0)==36){c[p>>2]=12;d=41}do if((d|0)==33){c[o>>2]=11;d=35}else if((d|0)==41){c[q>>2]=13;if((k|0)==6)if(!(PC(1399191,j,6)|0)){b=q;d=43;break}else{d=44;break}c[r>>2]=15;if((k|0)==5){b=j;if(PC(1399627,b,5)|0){c[s>>2]=14;if(!(PC(1399633,b,5)|0)){b=s;d=50}else{c[t>>2]=14;d=54}}else{b=r;d=47}}else d=51}while(0);if((d|0)==35){c[p>>2]=12;d=40}else if((d|0)==44){c[r>>2]=15;d=51}do if((d|0)==40){c[q>>2]=13;d=43}else if((d|0)==51){c[s>>2]=14;c[t>>2]=14;if((k|0)==3)if(!(PC(1399291,j,3)|0)){b=t;d=53;break}else{d=54;break}c[u>>2]=16;if(a)if(!(PC(1399639,j,7)|0)){b=u;d=58}else{c[v>>2]=17;d=62}else d=59}while(0);if((d|0)==43){c[r>>2]=15;d=47}else if((d|0)==54){c[u>>2]=16;d=59}do if((d|0)==47){c[s>>2]=14;d=50}else if((d|0)==59){c[v>>2]=17;if((k|0)==4)if(!(PC(1399156,j,4)|0)){b=v;d=61;break}else{d=62;break}c[w>>2]=18;if((k|0)==6)if(!(PC(1399149,j,6)|0)){b=w;d=65}else{c[x>>2]=8;c[y>>2]=19;d=80}else d=66}while(0);if((d|0)==50){c[t>>2]=14;d=53}else if((d|0)==62){c[w>>2]=18;d=66}do if((d|0)==53){c[u>>2]=16;d=58}else if((d|0)==66){c[x>>2]=8;if(!a){c[y>>2]=19;if((k|0)==5?(PC(1399143,j,5)|0)==0:0){b=y;d=71;break}d=80;break}if(PC(1399226,j,7)|0){c[y>>2]=19;c[z>>2]=21;b=j;if(PC(1399127,b,7)|0){c[A>>2]=20;if(PC(1399135,b,7)|0){c[B>>2]=22;if(PC(1399647,b,7)|0){c[C>>2]=23;c[D>>2]=24;c[E>>2]=25;if(!(PC(1399103,j,7)|0)){b=E;d=89}else{c[F>>2]=26;d=93}}else{b=B;d=79}}else{b=A;d=77}}else{b=z;d=75}}else{b=x;d=68}}while(0);do if((d|0)==58){c[v>>2]=17;d=61}else if((d|0)==80){c[z>>2]=21;c[A>>2]=20;c[B>>2]=22;c[C>>2]=23;if((k|0)!=3){c[D>>2]=24;if((k|0)==5?(PC(1399111,j,5)|0)==0:0){b=D;d=85;break}c[E>>2]=25;c[F>>2]=26;if((k|0)!=3){c[G>>2]=27;if((k|0)!=6){d=98;break}if(!(PC(1409908,j,6)|0)){b=G;d=97;break}c[H>>2]=28;d=104;break}}else{if(!(PC(1399117,j,3)|0)){b=C;d=82;break}c[D>>2]=24;c[E>>2]=25;c[F>>2]=26}if(!(PC(1409870,j,3)|0)){b=F;d=92}else d=93}while(0);if((d|0)==61){c[w>>2]=18;d=65}else if((d|0)==93){c[G>>2]=27;d=98}if((d|0)==65){c[x>>2]=8;d=68}else if((d|0)==98){c[H>>2]=28;if((k|0)==5){b=j;if(PC(1399097,b,5)|0){c[I>>2]=29;if(!(PC(1399091,b,5)|
|
||
|
function Zy(d,f,g,h,j,k,l,m,n,o){d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;var p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0;P=i;i=i+48|0;M=P+40|0;N=P+4|0;t=P+36|0;z=P+32|0;C=P+28|0;u=P+24|0;y=P+20|0;B=P+16|0;A=P+12|0;I=P+8|0;J=P;K=g+3|0;L=c[f+24>>2]|0;O=L+(K<<4)|0;F=g+1|0;r=g+2|0;H=L+(g<<4)+8|0;p=c[H>>2]|0;x=(j&1610612736|0)==1610612736&0==0;G=(p|0)==0;if(((G?(c[o+72>>2]&4096|0)!=0:0)?(c[L+(r<<4)+8>>2]|0)==0:0)?(a[O>>0]|0)==2:0){T=f+8|0;U=c[T>>2]|0;T=c[T+4>>2]|0;s=L+(K<<4)+8|0;S=c[s>>2]|0;s=c[s+4>>2]|0;Q=T>>>0<s>>>0|(T|0)==(s|0)&U>>>0<S>>>0;q=TO(S|0,s|0,U|0,T|0)|0;R=E;s=TO(U|0,T|0,S|0,s|0)|0;R=Q?R:E;s=R>>>0<0|(R|0)==0&(Q?q:s)>>>0<2147483648}else s=0;if((p|0)==41|s){p=(h<<3|5)&255;q=m+12|0;g=c[q>>2]|0;if(g>>>0<(c[m+8>>2]|0)>>>0){c[q>>2]=g+1;a[g>>0]=p}else Mu(m,p)|0;c[l>>2]=(c[l>>2]|0)+1;q=(c[f>>2]|0)==1686?129:128;a:do if((j&3932160|0)==0&0==0)p=0;else{p=j&3932160;if((p|0)<1310720){if((p|0)<786432)if((p|0)<524288)switch(p|0){case 262144:{p=1;break a}default:{}}else switch(p|0){case 524288:{p=1;break a}default:{}}b:do if((p|0)<1048576)switch(p|0){case 786432:break b;default:{}}else switch(p|0){case 1048576:break b;default:{}}while(0);p=2;break}c:do if((p|0)<1835008)if((p|0)<1572864)switch(p|0){case 1310720:break c;default:{}}else switch(p|0){case 1572864:break c;default:{}}else{if((p|0)<2097152)switch(p|0){case 1835008:break c;default:{}}switch(p|0){case 2097152:{p=8;break a}default:{}}}while(0);p=4}while(0);c[t>>2]=c[f+16>>2];U=(c[o+72>>2]&4096|0)!=0;c[M>>2]=c[t>>2];Yy(d,O,M,4,q,l,m,n,N,U,0-p|0,s);i=P;return}q=(p|0)!=0;if(q)t=e[(c[(c[(c[d+8>>2]|0)+8>>2]|0)+60>>2]|0)+(p<<1)>>1]&7;else t=-1;if(Vy(f,g,o)|0){do if(q){p=c[824328+(t<<2)>>2]|0;q=c[L+(r<<4)+8>>2]|0;d:do if(q){U=b[(c[(c[(c[d+8>>2]|0)+8>>2]|0)+60>>2]|0)+(q<<1)>>1]|0;q=c[824328+((U&7)<<2)>>2]|0;switch(U&7){case 3:case 5:{p=7-q<<1|p&1;break d}default:{p=q&1|7-p<<1;break d}}}while(0);if((a[O>>0]|0)==2?(v=L+(K<<4)+8|0,w=c[v>>2]|0,(w<<24>>24|0)==(w|0)):0){p=p|h<<3;if((t|0)!=5&((w|0)==0&(c[v+4>>2]|0)==0)){p=p&255;q=m+12|0;g=c[q>>2]|0;if(g>>>0<(c[m+8>>2]|0)>>>0){c[q>>2]=g+1;a[g>>0]=p}else Mu(m,p)|0;c[l>>2]=(c[l>>2]|0)+1;i=P;return}else{p=(p|64)&255;q=m+12|0;g=c[q>>2]|0;if(g>>>0<(c[m+8>>2]|0)>>>0){c[q>>2]=g+1;a[g>>0]=p}else Mu(m,p)|0;c[l>>2]=(c[l>>2]|0)+1;c[z>>2]=c[f+16>>2];U=(c[o+72>>2]&4096|0)!=0;c[M>>2]=c[z>>2];Yy(d,O,M,1,0,l,m,n,N,U,0,0);i=P;return}}p=(h<<3|p|128)&255;q=m+12|0;g=c[q>>2]|0;if(g>>>0<(c[m+8>>2]|0)>>>0){c[q>>2]=g+1;a[g>>0]=p;break}else{Mu(m,p)|0;break}}else{p=(h<<3|6)&255;q=m+12|0;g=c[q>>2]|0;if(g>>>0<(c[m+8>>2]|0)>>>0){c[q>>2]=g+1;a[g>>0]=p;break}else{Mu(m,p)|0;break}}while(0);c[l>>2]=(c[l>>2]|0)+1;c[C>>2]=c[f+16>>2];U=(c[o+72>>2]&4096|0)!=0;c[M>>2]=c[C>>2];Yy(d,O,M,2,1,l,m,n,N,U,0,0);i=P;return}v=L+(r<<4)+8|0;if((t|0)!=4&(c[v>>2]|0)==0?(D=o+72|0,q|(c[D>>2]&4096|0)==0):0){if(G){p=(h<<3|5)&255;q=m+12|0;g=c[q>>2]|0;if(g>>>0<(c[m+8>>2]|0)>>>0){c[q>>2]=g+1;a[g>>0]=p}else Mu(m,p)|0;c[l>>2]=(c[l>>2]|0)+1;c[u>>2]=c[f+16>>2];U=(c[D>>2]&4096|0)!=0;c[M>>2]=c[u>>2];Yy(d,O,M,4,2,l,m,n,N,U,0,0);i=P;return}do if((a[O>>0]|0)==2){s=L+(K<<4)+8|0;U=s;p=c[U>>2]|0;if((t|0)!=5&((p|0)==0&(c[U+4>>2]|0)==0)){p=(t|h<<3)&255;q=m+12|0;g=c[q>>2]|0;if(g>>>0<(c[m+8>>2]|0)>>>0){c[q>>2]=g+1;a[g>>0]=p}else Mu(m,p)|0;c[l>>2]=(c[l>>2]|0)+1;i=P;return}if(!x){if((p<<24>>24|0)!=(p|0))break;p=(h<<3|t|64)&255;q=m+12|0;g=c[q>>2]|0;if(g>>>0<(c[m+8>>2]|0)>>>0){c[q>>2]=g+1;a[g>>0]=p}else Mu(m,p)|0;c[l>>2]=(c[l>>2]|0)+1;c[y>>2]=c[f+16>>2];U=(c[D>>2]&4096|0)!=0;c[M>>2]=c[y>>2];Yy(d,O,M,1,0,l,m,n,N,U,0,0);i=P;return}q=bP(j|0,k|0,49)|0;q=q&127;if(!q){if((p<<24>>24|0)!=(p|0))break}else{if(p&q+-1|0)break;p=(p|0)/(q|0)|0;if((p|0)!=(p<<24>>24|0))break}q=(h<<3|t|64)&255;g=m+12|0;r=c[g>>2]|0;if(r>>>0<(c[m+8>>2]|0)>>>0){c[g>>2]=r+1;a[r>>0]=q}else Mu(m,q)|0;c[l>>2]=(c[l>>2]|0)+1;c[B>>2]=c[f+16>>2];T=(c[D>>2]&4096|0)!=0;U=s;U=TO(p|0,0,c[U>>2]|0,c[U+4>>2]|0)|0;c[M>>2]=c[B>>2];Yy(d,O,M,1,0,l,m,n,N,T,U,0);i=P;return}while(0);p=(h<<3|t|128)&255;q=m+12|0;g=c[q>>2]|0;if(g>>>0<(c[m+8>>2]|0)>>>0){c[q>>2]=g+1;a[g>>0]=p}else
|
||
|
function en(a){a=a|0;var b=0,d=0,e=0;d=a+4|0;e=c[d>>2]|0;b=c[e>>2]|0;c[d>>2]=b;if(b|0)c[b+8>>2]=a;b=a+8|0;c[e+8>>2]=c[b>>2];d=c[b>>2]|0;if((c[d>>2]|0)==(a|0)){c[d>>2]=e;c[e>>2]=a;c[b>>2]=e;return}else{c[d+4>>2]=e;c[e>>2]=a;c[b>>2]=e;return}}function fn(a){a=a|0;var b=0,d=0,e=0,f=0;e=c[a>>2]|0;f=e+4|0;b=c[f>>2]|0;c[a>>2]=b;if(b|0)c[b+8>>2]=a;b=a+8|0;c[e+8>>2]=c[b>>2];d=c[b>>2]|0;if((c[d>>2]|0)==(a|0)){c[d>>2]=e;c[f>>2]=a;c[b>>2]=e;return}else{c[d+4>>2]=e;c[f>>2]=a;c[b>>2]=e;return}}function gn(a,b){a=a|0;b=b|0;if(!(Xd(a,b)|0)){b=0;return b|0}b=Xd(a,b)|0;b=(b|0)!=(c[205459]|0);return b|0}function hn(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=c[a>>2]|0;if(!b)return;g=a+4|0;d=c[g>>2]|0;if((d|0)!=(b|0)){e=d;while(1){d=e+-28|0;c[g>>2]=d;f=c[e+-12>>2]|0;if(f){d=e+-8|0;if((c[d>>2]|0)!=(f|0))c[d>>2]=f;$M(f);d=c[g>>2]|0}if((d|0)==(b|0))break;else e=d}b=c[a>>2]|0}$M(b);return}function jn(a){a=a|0;var b=0,d=0,e=0,f=0;f=a+4|0;b=c[f>>2]|0;if((b|0)==0?(c[a+8>>2]|0)==0:0)return;e=c[a+12>>2]|0;if(b<<2>>>0<e>>>0&e>>>0>64){ln(a);return}b=c[a>>2]|0;d=b+(e<<3)|0;if(e|0)do{if((c[b>>2]|0)!=(-8|0))c[b>>2]=-8;b=b+8|0}while((b|0)!=(d|0));c[f>>2]=0;c[a+8>>2]=0;return}function kn(a){a=a|0;var b=0,d=0;d=c[a>>2]|0;if(!d)return;a=a+4|0;b=c[a>>2]|0;if((b|0)!=(d|0))c[a>>2]=b+(~((b+-16-d|0)>>>4)<<4);$M(d);return}function ln(a){a=a|0;var b=0,d=0,e=0;d=a+4|0;b=c[d>>2]|0;if(!b)e=0;else{e=1<<33-(W(b+-1|0)|0);e=(e|0)>64?e:64}if((e|0)!=(c[a+12>>2]|0)){$M(c[a>>2]|0);mn(a,e);return}c[d>>2]=0;c[a+8>>2]=0;b=c[a>>2]|0;a=b+(e<<3)|0;if(!e)return;do{c[b>>2]=-8;b=b+8|0}while((b|0)!=(a|0));return}function mn(a,b){a=a|0;b=b|0;var d=0;d=a+12|0;c[d>>2]=b;if(!b){c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;return}b=YM(b<<3)|0;c[a>>2]=b;c[a+4>>2]=0;c[a+8>>2]=0;d=c[d>>2]|0;a=b+(d<<3)|0;if(!d)return;do{c[b>>2]=-8;b=b+8|0}while((b|0)!=(a|0));return}function nn(a){a=a|0;var b=0,d=0;d=c[a>>2]|0;if(!d)return;a=a+4|0;b=c[a>>2]|0;if((b|0)!=(d|0))c[a>>2]=b+(~((b+-4-d|0)>>>2)<<2);$M(d);return}function on(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(!b)return;e=a+4|0;d=c[e>>2]|0;if((d|0)!=(b|0)){do{c[e>>2]=d+-48;hn(d+-32|0);d=c[e>>2]|0}while((d|0)!=(b|0));b=c[a>>2]|0}$M(b);return}function pn(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=i;i=i+16|0;g=h;c[a>>2]=821292;c[a+4>>2]=b;b=a+56|0;d=a+68|0;e=a+8|0;f=e+48|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(f|0));c[b>>2]=d;c[a+60>>2]=d;c[a+64>>2]=a+132;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;je(b,g);i=h;return}function qn(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=i;i=i+192|0;m=s+176|0;o=s+32|0;p=s+8|0;q=s;r=o+12|0;c[o>>2]=r;c[o+4>>2]=r;c[o+8>>2]=o+140;fg(p,o);k=(f|0)!=0;n=p+12|0;l=p+8|0;do{g=d;d=bP(d|0,e|0,7)|0;e=E;h=(d|0)!=0|(e|0)!=0;g=k|h?(g|128)&255:g&127;j=c[n>>2]|0;if(j>>>0<(c[l>>2]|0)>>>0){c[n>>2]=j+1;a[j>>0]=g}else Mu(p,g)|0}while(h);do if(k){d=c[n>>2]|0;e=d>>>0<(c[l>>2]|0)>>>0;if((f|0)!=1){g=f;do{if(e){c[n>>2]=d+1;a[d>>0]=-128}else Mu(p,-128)|0;g=g+-1|0;d=c[n>>2]|0;e=d>>>0<(c[l>>2]|0)>>>0}while((g|0)!=1)}if(e){c[n>>2]=d+1;a[d>>0]=0;break}else{Mu(p,0)|0;break}}while(0);d=c[(c[b>>2]|0)+168>>2]|0;n=c[p+20>>2]|0;l=c[n>>2]|0;n=(c[n+4>>2]|0)-l|0;c[q>>2]=l;c[q+4>>2]=n;c[m>>2]=c[q>>2];c[m+4>>2]=c[q+4>>2];wb[d&127](b,m);Zt(p);d=c[o>>2]|0;if((d|0)==(r|0)){i=s;return}AD(d);i=s;return}function rn(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;r=i;i=i+192|0;m=r+176|0;n=r+32|0;o=r+8|0;p=r;q=n+12|0;c[n>>2]=q;c[n+4>>2]=q;c[n+8>>2]=n+140;fg(o,n);g=d&255;h=g&127;e=aP(d|0,e|0,7)|0;f=E;g=g&64;k=o+12|0;l=o+8|0;a:do if((e|0)==0&(f|0)==0&g<<24>>24==0)e=h;else{j=e;e=h;while(1){if(g<<24>>24!=0&((j|0)==-1&(f|0)==-1))break a;e=(d|128)&255;d=c[k>>2]|0;if(d>>>0<(c[l>>2]|0)>>>0){c[k>>2]=d+1;a[d>>0]=e}else Mu(o,e)|0;g=j&255;e=g&127;d=aP(j|0,f|0,7)|0;f=E;g=g&64;if((d|0)==0&(f|0)==0&g<<24>>24==0)break;else{h=j;j=d;d=h}}}while(0);d=c[k>>2]|0;if(d>>>0<(c[l>>2]|0)>>>0){c[k>>2]=d+1;a[d>>0]=e}else Mu(o,e)|0;e=c[(c[b>>2]|0)+168>>2]|0;l=c[o+20>>2]|0;k=c[l>>2]|0;l=(c[l+4>>2]|0)-k|0;c[p>>2]=k;c[p+4>>2]=l;c[m>>2]=c[p>>2];c[m+4>>2]=c[p+4>>2];wb[e&127](b,m);Zt(o);e=c[n>>2]|0;if((e|0)==(q|0)){i=r;return}AD(e);i=r;return}function
|
||
|
|
||
|
// EMSCRIPTEN_END_FUNCS
|
||
|
var sb=[NP,_b,py,LI,QI,KJ,LJ,UJ,VJ,NP,NP,NP,NP,NP,NP,NP];var tb=[OP,ki,Dl,Hl,Ci,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qO];var Kb=[eQ,zH,hI,wK,xK,OK,PK,HK,IK,XK,YK,eQ,eQ,eQ,eQ,eQ];var Lb=[fQ,No,Oo,yc,af,bf,nf,$t,iu,ry,Hy,pL,JL,KL,LL,RL,hy,yy,tz,fQ,fQ,fQ,fQ,fQ,fQ,fQ,fQ,fQ,fQ,fQ,fQ,fQ];var Mb=[gQ,VG,WG,lH,mH,gQ,gQ,gQ];var Nb=[hQ,$e,pi,ui,Bi,Fi,Dm,Ii,jj,oj,$j,hk,Gl,Ml,Vl,Zl,Hm,bt,ND,$D,pF,uF,hO,oO,HO,hQ,hQ,hQ,hQ,hQ,hQ,hQ];return{_ks_arch_supported:iB,_ks_strerror:hB,_bitshift64Lshr:bP,_bitshift64Shl:jP,_pthread_cond_broadcast:cP,_fflush:$C,_ks_free:qB,___cxa_is_pointer_type:RO,_llvm_ctlz_i64:qP,_bitshift64Ashr:aP,_memset:UO,_sbrk:iP,_llvm_ctpop_i64:eP,_memcpy:$O,_llvm_bswap_i32:_O,___muldi3:hP,___uremdi3:lP,___divdi3:ZO,_llvm_cttz_i32:XO,_i64Subtract:TO,_ks_open:jB,___udivmoddi4:YO,_i64Add:WO,_pthread_self:pP,_pthread_mutex_unlock:mP,_llvm_bswap_i16:nP,_ks_version:fB,___remdi3:oP,_ks_option:pB,___udivdi3:fP,___errno_location:yB,___muldsi3:gP,_ks_errno:gB,___cxa_can_catch:QO,_free:AD,_memmove:kP,_llvm_ctpop_i32:dP,_malloc:zD,_ks_close:oB,_pthread_mutex_lock:VO,_ks_asm:rB,__GLOBAL__I_000101:JE,__GLOBAL__sub_I_MCSymbol_cpp:kp,__GLOBAL__sub_I_X86MCTargetDesc_cpp:$y,__GLOBAL__sub_I_ks_cpp:
|
||
|
|
||
|
|
||
|
// EMSCRIPTEN_END_ASM
|
||
|
(Module.asmGlobalArg,Module.asmLibraryArg,buffer);var _ks_arch_supported=Module["_ks_arch_supported"]=asm["_ks_arch_supported"];var __GLOBAL__sub_I_MCSymbol_cpp=Module["__GLOBAL__sub_I_MCSymbol_cpp"]=asm["__GLOBAL__sub_I_MCSymbol_cpp"];var _ks_strerror=Module["_ks_strerror"]=asm["_ks_strerror"];var _bitshift64Lshr=Module["_bitshift64Lshr"]=asm["_bitshift64Lshr"];var _bitshift64Shl=Module["_bitshift64Shl"]=asm["_bitshift64Shl"];var _fflush=Module["_fflush"]=asm["_fflush"];var _ks_free=Module["_ks_free"]=asm["_ks_free"];var ___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=asm["___cxa_is_pointer_type"];var _llvm_ctlz_i64=Module["_llvm_ctlz_i64"]=asm["_llvm_ctlz_i64"];var _bitshift64Ashr=Module["_bitshift64Ashr"]=asm["_bitshift64Ashr"];var _llvm_cttz_i32=Module["_llvm_cttz_i32"]=asm["_llvm_cttz_i32"];var _sbrk=Module["_sbrk"]=asm["_sbrk"];var _llvm_ctpop_i64=Module["_llvm_ctpop_i64"]=asm["_llvm_ctpop_i64"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var ___errno_location=Module["___errno_location"]=asm["___errno_location"];var ___muldi3=Module["___muldi3"]=asm["___muldi3"];var ___uremdi3=Module["___uremdi3"]=asm["___uremdi3"];var ___divdi3=Module["___divdi3"]=asm["___divdi3"];var ___muldsi3=Module["___muldsi3"]=asm["___muldsi3"];var _i64Subtract=Module["_i64Subtract"]=asm["_i64Subtract"];var _ks_open=Module["_ks_open"]=asm["_ks_open"];var ___udivmoddi4=Module["___udivmoddi4"]=asm["___udivmoddi4"];var _i64Add=Module["_i64Add"]=asm["_i64Add"];var _pthread_self=Module["_pthread_self"]=asm["_pthread_self"];var _pthread_mutex_unlock=Module["_pthread_mutex_unlock"]=asm["_pthread_mutex_unlock"];var __GLOBAL__I_000101=Module["__GLOBAL__I_000101"]=asm["__GLOBAL__I_000101"];var _llvm_bswap_i16=Module["_llvm_bswap_i16"]=asm["_llvm_bswap_i16"];var _ks_version=Module["_ks_version"]=asm["_ks_version"];var ___remdi3=Module["___remdi3"]=asm["___remdi3"];var _ks_option=Module["_ks_option"]=asm["_ks_option"];var __GLOBAL__sub_I_iostream_cpp=Module["__GLOBAL__sub_I_iostream_cpp"]=asm["__GLOBAL__sub_I_iostream_cpp"];var _free=Module["_free"]=asm["_free"];var _pthread_cond_broadcast=Module["_pthread_cond_broadcast"]=asm["_pthread_cond_broadcast"];var _llvm_bswap_i32=Module["_llvm_bswap_i32"]=asm["_llvm_bswap_i32"];var _memset=Module["_memset"]=asm["_memset"];var _ks_errno=Module["_ks_errno"]=asm["_ks_errno"];var ___cxa_can_catch=Module["___cxa_can_catch"]=asm["___cxa_can_catch"];var ___udivdi3=Module["___udivdi3"]=asm["___udivdi3"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];var _memmove=Module["_memmove"]=asm["_memmove"];var _llvm_ctpop_i32=Module["_llvm_ctpop_i32"]=asm["_llvm_ctpop_i32"];var _malloc=Module["_malloc"]=asm["_malloc"];var _ks_close=Module["_ks_close"]=asm["_ks_close"];var _pthread_mutex_lock=Module["_pthread_mutex_lock"]=asm["_pthread_mutex_lock"];var __GLOBAL__sub_I_X86MCTargetDesc_cpp=Module["__GLOBAL__sub_I_X86MCTargetDesc_cpp"]=asm["__GLOBAL__sub_I_X86MCTargetDesc_cpp"];var __GLOBAL__sub_I_ks_cpp=Module["__GLOBAL__sub_I_ks_cpp"]=asm["__GLOBAL__sub_I_ks_cpp"];var _ks_asm=Module["_ks_asm"]=asm["_ks_asm"];var dynCall_iiiiiiii=Module["dynCall_iiiiiiii"]=asm["dynCall_iiiiiiii"];var dynCall_viiiii=Module["dynCall_viiiii"]=asm["dynCall_viiiii"];var dynCall_iiiiiid=Module["dynCall_iiiiiid"]=asm["dynCall_iiiiiid"];var dynCall_vi=Module["dynCall_vi"]=asm["dynCall_vi"];var dynCall_vii=Module["dynCall_vii"]=asm["dynCall_vii"];var dynCall_iiiiiii=Module["dynCall_iiiiiii"]=asm["dynCall_iiiiiii"];var dynCall_ii=Module["dynCall_ii"]=asm["dynCall_ii"];var dynCall_iiiiiiiiiiii=Module["dynCall_iiiiiiiiiiii"]=asm["dynCall_iiiiiiiiiiii"];var dynCall_iiii=Module["dynCall_iiii"]=asm["dynCall_iiii"];var dynCall_viiiiiiii=Module["dynCall_viiiiiiii"]=asm["dynCall_viiiiiiii"];var dynCall_viiiiii=Module["dynCall_viiiiii"]=asm["dynCall_viiiiii"];var dynCall_viiiiiii=Module["dynCall_viiiiiii"]=asm["dynCall_viiiiiii"];var dynCall_iii=Module["dynCall_iii"]=asm["dynCall_iii"];var dynCall_iiiiii=Module["dynCall_iiiiii"]=asm["dynCall_iiiiii"];var dynCall_i=Module["dynCall_i"]=asm["dynCall_i"];var dynCall_iiiiiiiiii=Module["dynCall_iiiiiii
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
return MKeystone;
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* (c) 2016-2017 Keystone.JS
|
||
|
* Wrapper made by Alexandro Sanchez Bach.
|
||
|
*/
|
||
|
|
||
|
// Emscripten demodularize
|
||
|
var MKeystone = new MKeystone();
|
||
|
|
||
|
var ks = {
|
||
|
version: function() {
|
||
|
major_ptr = MKeystone._malloc(4);
|
||
|
minor_ptr = MKeystone._malloc(4);
|
||
|
var ret = MKeystone.ccall('ks_version', 'number',
|
||
|
['pointer', 'pointer'], [major_ptr, minor_ptr]);
|
||
|
major = MKeystone.getValue(major_ptr, 'i32');
|
||
|
minor = MKeystone.getValue(minor_ptr, 'i32');
|
||
|
MKeystone._free(major_ptr);
|
||
|
MKeystone._free(minor_ptr);
|
||
|
return ret;
|
||
|
},
|
||
|
|
||
|
arch_supported: function(arch) {
|
||
|
var ret = MKeystone.ccall('ks_arch_supported', 'number', ['number'], [arch]);
|
||
|
return ret;
|
||
|
},
|
||
|
|
||
|
strerror: function(code) {
|
||
|
var ret = MKeystone.ccall('ks_strerror', 'string', ['number'], [code]);
|
||
|
return ret;
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* Keystone object
|
||
|
*/
|
||
|
Keystone: function (arch, mode) {
|
||
|
this.arch = arch;
|
||
|
this.mode = mode;
|
||
|
this.handle_ptr = MKeystone._malloc(4);
|
||
|
|
||
|
// Options
|
||
|
this.option = function(option, value) {
|
||
|
var handle = MKeystone.getValue(this.handle_ptr, '*');
|
||
|
if (!handle) {
|
||
|
return;
|
||
|
}
|
||
|
var ret = MKeystone.ccall('ks_option', 'number',
|
||
|
['pointer', 'number', 'number'],
|
||
|
[handle, option, value]
|
||
|
);
|
||
|
if (ret != ks.ERR_OK) {
|
||
|
var error = 'Keystone.js: Function ks_option failed with code ' + ret + ':\n' + ks.strerror(ret);
|
||
|
throw error;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// Assembler
|
||
|
this.asm = function (assembly, address) {
|
||
|
var handle = MKeystone.getValue(this.handle_ptr, '*');
|
||
|
if (!handle) {
|
||
|
return [];
|
||
|
}
|
||
|
|
||
|
var insn_ptr = MKeystone._malloc(4);
|
||
|
var size_ptr = MKeystone._malloc(4);
|
||
|
var count_ptr = MKeystone._malloc(4);
|
||
|
|
||
|
// Allocate buffer and copy data
|
||
|
var buffer_len = assembly.length + 1;
|
||
|
var buffer_ptr = MKeystone._malloc(buffer_len);
|
||
|
MKeystone.stringToUTF8(assembly, buffer_ptr, buffer_len);
|
||
|
|
||
|
// Run the assembler. Note that the third argument is split
|
||
|
// in the two integers that make the uint64_t address value.
|
||
|
// Due to JavaScript limitations only the lower 32-bit can be modified.
|
||
|
var ret = MKeystone.ccall('ks_asm', 'number',
|
||
|
['pointer', 'pointer', 'number', 'number', 'pointer', 'pointer', 'pointer'],
|
||
|
[handle, buffer_ptr, address, 0x0, insn_ptr, size_ptr, count_ptr]
|
||
|
);
|
||
|
if (ret != ks.ERR_OK) {
|
||
|
var code = this.errno();
|
||
|
var error = 'Keystone.js: Function ks_asm failed with code ' + code + ':\n' + ks.strerror(code);
|
||
|
throw error;
|
||
|
}
|
||
|
|
||
|
// Get results
|
||
|
var insn = MKeystone.getValue(insn_ptr, '*');
|
||
|
var size = MKeystone.getValue(size_ptr, 'i32');
|
||
|
var count = MKeystone.getValue(count_ptr, 'i32');
|
||
|
|
||
|
var mc = new Uint8Array(size);
|
||
|
for (var i = 0; i < size; i++) {
|
||
|
mc[i] = MKeystone.getValue(insn + i, 'i8');
|
||
|
}
|
||
|
|
||
|
// Free memory and return buffer
|
||
|
var ret = MKeystone.ccall('ks_free', 'void', ['pointer'], insn_ptr);
|
||
|
MKeystone._free(buffer_ptr);
|
||
|
MKeystone._free(insn_ptr);
|
||
|
MKeystone._free(size_ptr);
|
||
|
MKeystone._free(count_ptr);
|
||
|
return mc
|
||
|
};
|
||
|
|
||
|
this.errno = function() {
|
||
|
var handle = MKeystone.getValue(this.handle_ptr, '*');
|
||
|
var ret = MKeystone.ccall('ks_errno', 'number', ['pointer'], [handle]);
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
this.close = function() {
|
||
|
var handle = MKeystone.getValue(this.handle_ptr, '*');
|
||
|
var ret = MKeystone.ccall('ks_close', 'number', ['pointer'], [handle]);
|
||
|
if (ret != ks.ERR_OK) {
|
||
|
var error = 'Keystone.js: Function ks_close failed with code ' + ret + ':\n' + ks.strerror(ret);
|
||
|
throw error;
|
||
|
}
|
||
|
MKeystone._free(this.handle_ptr);
|
||
|
}
|
||
|
|
||
|
// Constructor
|
||
|
var ret = MKeystone.ccall('ks_open', 'number',
|
||
|
['number', 'number', 'pointer'],
|
||
|
[this.arch, this.mode, this.handle_ptr]
|
||
|
);
|
||
|
|
||
|
if (ret != ks.ERR_OK) {
|
||
|
MKeystone.setValue(this.handle_ptr, 0, '*');
|
||
|
var error = 'Keystone.js: Function ks_open failed with code ' + ret + ':\n' + ks.strerror(ret);
|
||
|
throw error;
|
||
|
}
|
||
|
},
|
||
|
};
|
||
|
|
||
|
// For Keystone Engine. AUTO-GENERATED FILE, DO NOT EDIT [arm_const.js]
|
||
|
ks.ERR_ASM_ARM_INVALIDOPERAND = 512
|
||
|
ks.ERR_ASM_ARM_MISSINGFEATURE = 513
|
||
|
ks.ERR_ASM_ARM_MNEMONICFAIL = 514
|
||
|
// For Keystone Engine. AUTO-GENERATED FILE, DO NOT EDIT [arm64_const.js]
|
||
|
ks.ERR_ASM_ARM64_INVALIDOPERAND = 512
|
||
|
ks.ERR_ASM_ARM64_MISSINGFEATURE = 513
|
||
|
ks.ERR_ASM_ARM64_MNEMONICFAIL = 514
|
||
|
// For Keystone Engine. AUTO-GENERATED FILE, DO NOT EDIT [hexagon_const.js]
|
||
|
ks.ERR_ASM_HEXAGON_INVALIDOPERAND = 512
|
||
|
ks.ERR_ASM_HEXAGON_MISSINGFEATURE = 513
|
||
|
ks.ERR_ASM_HEXAGON_MNEMONICFAIL = 514
|
||
|
// For Keystone Engine. AUTO-GENERATED FILE, DO NOT EDIT [keystone_const.js]
|
||
|
ks.API_MAJOR = 0
|
||
|
ks.API_MINOR = 9
|
||
|
ks.ARCH_ARM = 1
|
||
|
ks.ARCH_ARM64 = 2
|
||
|
ks.ARCH_MIPS = 3
|
||
|
ks.ARCH_X86 = 4
|
||
|
ks.ARCH_PPC = 5
|
||
|
ks.ARCH_SPARC = 6
|
||
|
ks.ARCH_SYSTEMZ = 7
|
||
|
ks.ARCH_HEXAGON = 8
|
||
|
ks.ARCH_MAX = 9
|
||
|
ks.MODE_LITTLE_ENDIAN = 0
|
||
|
ks.MODE_BIG_ENDIAN = 1073741824
|
||
|
ks.MODE_ARM = 1
|
||
|
ks.MODE_THUMB = 16
|
||
|
ks.MODE_V8 = 64
|
||
|
ks.MODE_MICRO = 16
|
||
|
ks.MODE_MIPS3 = 32
|
||
|
ks.MODE_MIPS32R6 = 64
|
||
|
ks.MODE_MIPS32 = 4
|
||
|
ks.MODE_MIPS64 = 8
|
||
|
ks.MODE_16 = 2
|
||
|
ks.MODE_32 = 4
|
||
|
ks.MODE_64 = 8
|
||
|
ks.MODE_PPC32 = 4
|
||
|
ks.MODE_PPC64 = 8
|
||
|
ks.MODE_QPX = 16
|
||
|
ks.MODE_SPARC32 = 4
|
||
|
ks.MODE_SPARC64 = 8
|
||
|
ks.MODE_V9 = 16
|
||
|
ks.ERR_ASM = 128
|
||
|
ks.ERR_ASM_ARCH = 512
|
||
|
ks.ERR_OK = 0
|
||
|
ks.ERR_NOMEM = 1
|
||
|
ks.ERR_ARCH = 2
|
||
|
ks.ERR_HANDLE = 3
|
||
|
ks.ERR_MODE = 4
|
||
|
ks.ERR_VERSION = 5
|
||
|
ks.ERR_OPT_INVALID = 6
|
||
|
ks.ERR_ASM_EXPR_TOKEN = 128
|
||
|
ks.ERR_ASM_DIRECTIVE_VALUE_RANGE = 129
|
||
|
ks.ERR_ASM_DIRECTIVE_ID = 130
|
||
|
ks.ERR_ASM_DIRECTIVE_TOKEN = 131
|
||
|
ks.ERR_ASM_DIRECTIVE_STR = 132
|
||
|
ks.ERR_ASM_DIRECTIVE_COMMA = 133
|
||
|
ks.ERR_ASM_DIRECTIVE_RELOC_NAME = 134
|
||
|
ks.ERR_ASM_DIRECTIVE_RELOC_TOKEN = 135
|
||
|
ks.ERR_ASM_DIRECTIVE_FPOINT = 136
|
||
|
ks.ERR_ASM_DIRECTIVE_UNKNOWN = 137
|
||
|
ks.ERR_ASM_DIRECTIVE_EQU = 138
|
||
|
ks.ERR_ASM_DIRECTIVE_INVALID = 139
|
||
|
ks.ERR_ASM_VARIANT_INVALID = 140
|
||
|
ks.ERR_ASM_EXPR_BRACKET = 141
|
||
|
ks.ERR_ASM_SYMBOL_MODIFIER = 142
|
||
|
ks.ERR_ASM_SYMBOL_REDEFINED = 143
|
||
|
ks.ERR_ASM_SYMBOL_MISSING = 144
|
||
|
ks.ERR_ASM_RPAREN = 145
|
||
|
ks.ERR_ASM_STAT_TOKEN = 146
|
||
|
ks.ERR_ASM_UNSUPPORTED = 147
|
||
|
ks.ERR_ASM_MACRO_TOKEN = 148
|
||
|
ks.ERR_ASM_MACRO_PAREN = 149
|
||
|
ks.ERR_ASM_MACRO_EQU = 150
|
||
|
ks.ERR_ASM_MACRO_ARGS = 151
|
||
|
ks.ERR_ASM_MACRO_LEVELS_EXCEED = 152
|
||
|
ks.ERR_ASM_MACRO_STR = 153
|
||
|
ks.ERR_ASM_MACRO_INVALID = 154
|
||
|
ks.ERR_ASM_ESC_BACKSLASH = 155
|
||
|
ks.ERR_ASM_ESC_OCTAL = 156
|
||
|
ks.ERR_ASM_ESC_SEQUENCE = 157
|
||
|
ks.ERR_ASM_ESC_STR = 158
|
||
|
ks.ERR_ASM_TOKEN_INVALID = 159
|
||
|
ks.ERR_ASM_INSN_UNSUPPORTED = 160
|
||
|
ks.ERR_ASM_FIXUP_INVALID = 161
|
||
|
ks.ERR_ASM_LABEL_INVALID = 162
|
||
|
ks.ERR_ASM_FRAGMENT_INVALID = 163
|
||
|
ks.ERR_ASM_INVALIDOPERAND = 512
|
||
|
ks.ERR_ASM_MISSINGFEATURE = 513
|
||
|
ks.ERR_ASM_MNEMONICFAIL = 514
|
||
|
ks.OPT_SYNTAX = 1
|
||
|
ks.OPT_SYNTAX_INTEL = 1
|
||
|
ks.OPT_SYNTAX_ATT = 2
|
||
|
ks.OPT_SYNTAX_NASM = 4
|
||
|
ks.OPT_SYNTAX_MASM = 8
|
||
|
ks.OPT_SYNTAX_GAS = 16
|
||
|
// For Keystone Engine. AUTO-GENERATED FILE, DO NOT EDIT [mips_const.js]
|
||
|
ks.ERR_ASM_MIPS_INVALIDOPERAND = 512
|
||
|
ks.ERR_ASM_MIPS_MISSINGFEATURE = 513
|
||
|
ks.ERR_ASM_MIPS_MNEMONICFAIL = 514
|
||
|
// For Keystone Engine. AUTO-GENERATED FILE, DO NOT EDIT [ppc_const.js]
|
||
|
ks.ERR_ASM_PPC_INVALIDOPERAND = 512
|
||
|
ks.ERR_ASM_PPC_MISSINGFEATURE = 513
|
||
|
ks.ERR_ASM_PPC_MNEMONICFAIL = 514
|
||
|
// For Keystone Engine. AUTO-GENERATED FILE, DO NOT EDIT [sparc_const.js]
|
||
|
ks.ERR_ASM_SPARC_INVALIDOPERAND = 512
|
||
|
ks.ERR_ASM_SPARC_MISSINGFEATURE = 513
|
||
|
ks.ERR_ASM_SPARC_MNEMONICFAIL = 514
|
||
|
// For Keystone Engine. AUTO-GENERATED FILE, DO NOT EDIT [systemz_const.js]
|
||
|
ks.ERR_ASM_SYSTEMZ_INVALIDOPERAND = 512
|
||
|
ks.ERR_ASM_SYSTEMZ_MISSINGFEATURE = 513
|
||
|
ks.ERR_ASM_SYSTEMZ_MNEMONICFAIL = 514
|
||
|
// For Keystone Engine. AUTO-GENERATED FILE, DO NOT EDIT [x86_const.js]
|
||
|
ks.ERR_ASM_X86_INVALIDOPERAND = 512
|
||
|
ks.ERR_ASM_X86_MISSINGFEATURE = 513
|
||
|
ks.ERR_ASM_X86_MNEMONICFAIL = 514
|