arewefastyet/benchmarks/asmjs-ubench/corrections.js

135 строки
55 KiB
JavaScript

function f(a){throw a;}var i=void 0,l=!0,m=null,n=!1;function r(){return function(){}}var s;s||(s=eval("(function() { try { return Module || {} } catch(e) { return {} } })()"));var aa={},t;for(t in s)s.hasOwnProperty(t)&&(aa[t]=s[t]);var u="object"===typeof process&&"function"===typeof require,ba="object"===typeof window,ca="function"===typeof importScripts,da=!ba&&!u&&!ca;
if(u){s.print||(s.print=function(a){process.stdout.write(a+"\n")});s.printErr||(s.printErr=function(a){process.stderr.write(a+"\n")});var ea=require("fs"),fa=require("path");s.read=function(a,b){var a=fa.normalize(a),c=ea.readFileSync(a);!c&&a!=fa.resolve(a)&&(a=path.join(__dirname,"..","src",a),c=ea.readFileSync(a));c&&!b&&(c=c.toString());return c};s.readBinary=function(a){return s.read(a,l)};s.load=function(a){ga(read(a))};s.arguments=process.argv.slice(2);module.exports=s}else da?(s.print||(s.print=
print),"undefined"!=typeof printErr&&(s.printErr=printErr),s.read="undefined"!=typeof read?read:function(){f("no read() available (jsc?)")},s.readBinary=function(a){return read(a,"binary")},"undefined"!=typeof scriptArgs?s.arguments=scriptArgs:"undefined"!=typeof arguments&&(s.arguments=arguments),this.Module=s,eval("if (typeof gc === 'function' && gc.toString().indexOf('[native code]') > 0) var gc = undefined")):ba||ca?(s.read=function(a){var b=new XMLHttpRequest;b.open("GET",a,n);b.send(m);return b.responseText},
"undefined"!=typeof arguments&&(s.arguments=arguments),"undefined"!==typeof console?(s.print||(s.print=function(a){console.log(a)}),s.printErr||(s.printErr=function(a){console.log(a)})):s.print||(s.print=r()),ba?window.Module=s:s.load=importScripts):f("Unknown runtime environment. Where are we?");function ga(a){eval.call(m,a)}"undefined"==!s.load&&s.read&&(s.load=function(a){ga(s.read(a))});s.print||(s.print=r());s.printErr||(s.printErr=s.print);s.arguments||(s.arguments=[]);s.print=s.print;s.S=s.printErr;
s.preRun=[];s.postRun=[];for(t in aa)aa.hasOwnProperty(t)&&(s[t]=aa[t]);
var A={rc:function(a){ha=a},Zb:function(){return ha},Va:function(){return x},Ua:function(a){x=a},De:function(a,b){b=b||4;return 1==b?a:isNumber(a)&&isNumber(b)?Math.ceil(a/b)*b:isNumber(b)&&isPowerOfTwo(b)?"((("+a+")+"+(b-1)+")&"+-b+")":"Math.ceil(("+a+")/"+b+")*"+b},ec:function(a){return a in A.Ob||a in A.Mb},fc:function(a){return"*"==a[a.length-1]},gc:function(a){return isPointerType(a)?n:isArrayType(a)||/<?\{ ?[^}]* ?\}>?/.test(a)?l:"%"==a[0]},Ob:{i1:0,i8:0,i16:0,i32:0,i64:0},Mb:{"float":0,"double":0},
Ue:function(a,b){return(a|0|b|0)+4294967296*(Math.round(a/4294967296)|Math.round(b/4294967296))},ve:function(a,b){return((a|0)&(b|0))+4294967296*(Math.round(a/4294967296)&Math.round(b/4294967296))},$e:function(a,b){return((a|0)^(b|0))+4294967296*(Math.round(a/4294967296)^Math.round(b/4294967296))},Ka:function(a){switch(a){case "i1":case "i8":return 1;case "i16":return 2;case "i32":return 4;case "i64":return 8;case "float":return 4;case "double":return 8;default:return"*"===a[a.length-1]?A.P:"i"===
a[0]?(a=parseInt(a.substr(1)),C(0===a%8),a/8):0}},ob:function(a){return Math.max(A.Ka(a),A.P)},Vb:function(a,b){var c={};return b?a.filter(function(a){return c[a[b]]?n:c[a[b]]=l}):a.filter(function(a){return c[a]?n:c[a]=l})},set:function(){for(var a="object"===typeof arguments[0]?arguments[0]:arguments,b={},c=0;c<a.length;c++)b[a[c]]=0;return b},le:8,Ja:function(a,b,c){return!c&&("i64"==a||"double"==a)?8:!a?Math.min(b,8):Math.min(b||(a?A.ob(a):0),A.P)},Sb:function(a){a.D=0;a.U=0;var b=[],c=-1,d=0;
a.mb=a.Ga.map(function(e){d++;var g,h;A.ec(e)||A.fc(e)?(g=A.Ka(e),h=A.Ja(e,g)):A.gc(e)?"0"===e[1]?(g=0,h=Types.types[e]?A.Ja(m,Types.types[e].U):a.U||QUANTUM_SIZE):(g=Types.types[e].D,h=A.Ja(m,Types.types[e].U)):"b"==e[0]?(g=e.substr(1)|0,h=1):"<"===e[0]?g=h=Types.types[e].D:"i"===e[0]?(g=h=parseInt(e.substr(1))/8,C(0===g%1,"cannot handle non-byte-size field "+e)):C(n,"invalid type for calculateStructAlignment");a.Ve&&(h=1);a.U=Math.max(a.U,h);e=A.T(a.D,h);a.D=e+g;0<=c&&b.push(e-c);return c=e});a.ub&&
"["===a.ub[0]&&(a.D=parseInt(a.ub.substr(1))*a.D/2);a.D=A.T(a.D,a.U);0==b.length?a.lb=a.D:1==A.Vb(b).length&&(a.lb=b[0]);a.Qe=1!=a.lb;return a.mb},Xb:function(a,b,c){var d,e;if(b){c=c||0;d=("undefined"===typeof Types?A.Ze:Types.types)[b];if(!d)return m;if(d.Ga.length!=a.length)return printErr("Number of named fields must match the type for "+b+": possibly duplicate struct names. Cannot return structInfo"),m;e=d.mb}else d={Ga:a.map(function(a){return a[0]})},e=A.Sb(d);var g={ne:d.D};b?a.forEach(function(a,
b){if("string"===typeof a)g[a]=e[b]+c;else{var j,w;for(w in a)j=w;g[j]=A.Xb(a[j],d.Ga[b],e[b])}}):a.forEach(function(a,b){g[a[1]]=e[b]});return g},Ea:function(a,b,c){return c&&c.length?(c.splice||(c=Array.prototype.slice.call(c)),c.splice(0,0,b),s["dynCall_"+a].apply(m,c)):s["dynCall_"+a].call(m,b)},ma:[],oe:function(a){for(var b=0;b<A.ma.length;b++)if(!A.ma[b])return A.ma[b]=a,2*(1+b);f("Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.")},Xe:function(a){A.ma[(a-
2)/2]=m},Ee:function(a,b){A.Da||(A.Da={});var c=A.Da[a];if(c)return c;for(var c=[],d=0;d<b;d++)c.push(String.fromCharCode(36)+d);d=ia(a);'"'===d[0]&&(d.indexOf('"',1)===d.length-1?d=d.substr(1,d.length-2):D("invalid EM_ASM input |"+d+"|. Please use EM_ASM(..code..) (no quotes) or EM_ASM({ ..code($0).. }, input) (to input values)"));try{var e=eval("(function("+c.join(",")+"){ "+d+" })")}catch(g){s.S("error in executing inline EM_ASM code: "+g+" on: \n\n"+d+"\n\nwith args |"+c+"| (make sure to use the right one out of EM_ASM, EM_ASM_ARGS, etc.)"),
f(g)}return A.Da[a]=e},da:function(a){A.da.Sa||(A.da.Sa={});A.da.Sa[a]||(A.da.Sa[a]=1,s.S(a))},Ia:{},Ge:function(a,b){C(b);A.Ia[a]||(A.Ia[a]=function(){return A.Ea(b,a,arguments)});return A.Ia[a]},Ba:function(){var a=[],b=0;this.Oa=function(c){c&=255;if(0==a.length){if(0==(c&128))return String.fromCharCode(c);a.push(c);b=192==(c&224)?1:224==(c&240)?2:3;return""}if(b&&(a.push(c),b--,0<b))return"";var c=a[0],d=a[1],e=a[2],g=a[3];2==a.length?c=String.fromCharCode((c&31)<<6|d&63):3==a.length?c=String.fromCharCode((c&
15)<<12|(d&63)<<6|e&63):(c=(c&7)<<18|(d&63)<<12|(e&63)<<6|g&63,c=String.fromCharCode(Math.floor((c-65536)/1024)+55296,(c-65536)%1024+56320));a.length=0;return c};this.mc=function(a){for(var a=unescape(encodeURIComponent(a)),b=[],e=0;e<a.length;e++)b.push(a.charCodeAt(e));return b}},Fe:function(){f("You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work")},Ta:function(a){var b=x;x=x+a|0;x=x+7&-8;return b},Ab:function(a){var b=F;F=
F+a|0;F=F+7&-8;return b},ib:function(a){var b=I;I=I+a|0;I=I+7&-8;I>=J&&D("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+J+", (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.");return b},T:function(a,b){return Math.ceil(a/(b?b:8))*(b?b:8)},ic:function(a,b,c){return c?+(a>>>0)+4294967296*+(b>>>0):+(a>>>0)+4294967296*+(b|0)},Nb:8,
P:4,me:0};s.Runtime=A;var ja=n,ka,la,ha;function C(a,b){a||D("Assertion failed: "+b)}s.ccall=function(a,b,c,d){return ma(na(a),b,c,d)};function na(a){try{var b=s["_"+a];b||(b=eval("_"+a))}catch(c){}C(b,"Cannot call unknown function "+a+" (perhaps LLVM optimizations or closure removed it?)");return b}
function ma(a,b,c,d){function e(a,b){if("string"==b){if(a===m||a===i||0===a)return 0;a=K(a);b="array"}if("array"==b){g||(g=A.Va());var c=A.Ta(a.length);oa(a,c);return c}return a}var g=0,h=0,d=d?d.map(function(a){return e(a,c[h++])}):[];a=a.apply(m,d);"string"==b?b=ia(a):(C("array"!=b),b=a);g&&A.Ua(g);return b}s.cwrap=function(a,b,c){var d=na(a);return function(){return ma(d,b,c,Array.prototype.slice.call(arguments))}};
function pa(a,b,c){c=c||"i8";"*"===c.charAt(c.length-1)&&(c="i32");switch(c){case "i1":L[a>>0]=b;break;case "i8":L[a>>0]=b;break;case "i16":qa[a>>1]=b;break;case "i32":M[a>>2]=b;break;case "i64":la=[b>>>0,(ka=b,1<=+ra(ka)?0<ka?(sa(+ta(ka/4294967296),4294967295)|0)>>>0:~~+ua((ka-+(~~ka>>>0))/4294967296)>>>0:0)];M[a>>2]=la[0];M[a+4>>2]=la[1];break;case "float":va[a>>2]=b;break;case "double":wa[a>>3]=b;break;default:D("invalid type for setValue: "+c)}}s.setValue=pa;
s.getValue=function(a,b){b=b||"i8";"*"===b.charAt(b.length-1)&&(b="i32");switch(b){case "i1":return L[a>>0];case "i8":return L[a>>0];case "i16":return qa[a>>1];case "i32":return M[a>>2];case "i64":return M[a>>2];case "float":return va[a>>2];case "double":return wa[a>>3];default:D("invalid type for setValue: "+b)}return m};var xa=1,ya=2,za=4;s.ALLOC_NORMAL=0;s.ALLOC_STACK=xa;s.ALLOC_STATIC=ya;s.ALLOC_DYNAMIC=3;s.ALLOC_NONE=za;
function N(a,b,c,d){var e,g;"number"===typeof a?(e=l,g=a):(e=n,g=a.length);var h="string"===typeof b?b:m,c=c==za?d:[Aa,A.Ta,A.Ab,A.ib][c===i?ya:c](Math.max(g,h?1:b.length));if(e){d=c;C(0==(c&3));for(a=c+(g&-4);d<a;d+=4)M[d>>2]=0;for(a=c+g;d<a;)L[d++>>0]=0;return c}if("i8"===h)return a.subarray||a.slice?O.set(a,c):O.set(new Uint8Array(a),c),c;for(var d=0,k,j;d<g;){var w=a[d];"function"===typeof w&&(w=A.He(w));e=h||b[d];0===e?d++:("i64"==e&&(e="i32"),pa(c+d,w,e),j!==e&&(k=A.Ka(e),j=e),d+=k)}return c}
s.allocate=N;function ia(a,b){for(var c=n,d,e=0;;){d=O[a+e>>0];if(128<=d)c=l;else if(0==d&&!b)break;e++;if(b&&e==b)break}b||(b=e);var g="";if(!c){for(;0<b;)d=String.fromCharCode.apply(String,O.subarray(a,a+Math.min(b,1024))),g=g?g+d:d,a+=1024,b-=1024;return g}c=new A.Ba;for(e=0;e<b;e++)d=O[a+e>>0],g+=c.Oa(d);return g}s.Pointer_stringify=ia;s.UTF16ToString=function(a){for(var b=0,c="";;){var d=qa[a+2*b>>1];if(0==d)return c;++b;c+=String.fromCharCode(d)}};
s.stringToUTF16=function(a,b){for(var c=0;c<a.length;++c)qa[b+2*c>>1]=a.charCodeAt(c);qa[b+2*a.length>>1]=0};s.UTF32ToString=function(a){for(var b=0,c="";;){var d=M[a+4*b>>2];if(0==d)return c;++b;65536<=d?(d-=65536,c+=String.fromCharCode(55296|d>>10,56320|d&1023)):c+=String.fromCharCode(d)}};s.stringToUTF32=function(a,b){for(var c=0,d=0;d<a.length;++d){var e=a.charCodeAt(d);if(55296<=e&&57343>=e)var g=a.charCodeAt(++d),e=65536+((e&1023)<<10)|g&1023;M[b+4*c>>2]=e;++c}M[b+4*c>>2]=0};
function Ba(a){function b(h,j,w){var j=j||Infinity,E="",p=[],v;if("N"===a[c]){c++;"K"===a[c]&&c++;for(v=[];"E"!==a[c];)if("S"===a[c]){c++;var B=a.indexOf("_",c);v.push(e[a.substring(c,B)||0]||"?");c=B+1}else if("C"===a[c])v.push(v[v.length-1]),c+=2;else{var B=parseInt(a.substr(c)),G=B.toString().length;if(!B||!G){c--;break}var H=a.substr(c+G,B);v.push(H);e.push(H);c+=G+B}c++;v=v.join("::");j--;if(0===j)return h?[v]:v}else if(("K"===a[c]||g&&"L"===a[c])&&c++,B=parseInt(a.substr(c)))G=B.toString().length,
v=a.substr(c+G,B),c+=G+B;g=n;"I"===a[c]?(c++,B=b(l),G=b(l,1,l),E+=G[0]+" "+v+"<"+B.join(", ")+">"):E=v;a:for(;c<a.length&&0<j--;)if(v=a[c++],v in d)p.push(d[v]);else switch(v){case "P":p.push(b(l,1,l)[0]+"*");break;case "R":p.push(b(l,1,l)[0]+"&");break;case "L":c++;B=a.indexOf("E",c)-c;p.push(a.substr(c,B));c+=B+2;break;case "A":B=parseInt(a.substr(c));c+=B.toString().length;"_"!==a[c]&&f("?");c++;p.push(b(l,1,l)[0]+" ["+B+"]");break;case "E":break a;default:E+="?"+v;break a}!w&&(1===p.length&&"void"===
p[0])&&(p=[]);return h?(E&&p.push(E+"?"),p):E+("("+p.join(", ")+")")}var c=3,d={v:"void",b:"bool",c:"char",s:"short",i:"int",l:"long",f:"float",d:"double",w:"wchar_t",a:"signed char",h:"unsigned char",t:"unsigned short",j:"unsigned int",m:"unsigned long",x:"long long",y:"unsigned long long",z:"..."},e=[],g=l;try{if("Object._main"==a||"_main"==a)return"main()";"number"===typeof a&&(a=ia(a));if("_"!==a[0]||"_"!==a[1]||"Z"!==a[2])return a;switch(a[3]){case "n":return"operator new()";case "d":return"operator delete()"}return b()}catch(h){return a}}
function Ca(){var a=Error().stack;return a?a.replace(/__Z[\w\d_]+/g,function(a){var c=Ba(a);return a===c?a:a+" ["+c+"]"}):"(no stack trace available)"}for(var L,O,qa,Da,M,Ea,va,wa,Fa=0,F=0,Ga=0,x=0,Ha=0,Ia=0,I=0,Ja=s.TOTAL_STACK||5242880,J=s.TOTAL_MEMORY||134217728,P=4096;P<J||P<2*Ja;)P=16777216>P?2*P:P+16777216;P!==J&&(s.S("increasing TOTAL_MEMORY to "+P+" to be more reasonable"),J=P);
C("undefined"!==typeof Int32Array&&"undefined"!==typeof Float64Array&&!!(new Int32Array(1)).subarray&&!!(new Int32Array(1)).set,"JS engine does not provide full typed array support");var Q=new ArrayBuffer(J);L=new Int8Array(Q);qa=new Int16Array(Q);M=new Int32Array(Q);O=new Uint8Array(Q);Da=new Uint16Array(Q);Ea=new Uint32Array(Q);va=new Float32Array(Q);wa=new Float64Array(Q);M[0]=255;C(255===O[0]&&0===O[3],"Typed arrays 2 must be run on a little-endian system");s.HEAP=i;s.HEAP8=L;s.HEAP16=qa;
s.HEAP32=M;s.HEAPU8=O;s.HEAPU16=Da;s.HEAPU32=Ea;s.HEAPF32=va;s.HEAPF64=wa;function Ka(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b();else{var c=b.V;"number"===typeof c?b.Ca===i?A.Ea("v",c):A.Ea("vi",c,[b.Ca]):c(b.Ca===i?m:b.Ca)}}}var La=[],Ma=[],Na=[],Oa=[],Pa=[],Qa=n;function Ra(a){La.unshift(a)}s.addOnPreRun=s.te=Ra;s.addOnInit=s.qe=function(a){Ma.unshift(a)};s.addOnPreMain=s.se=function(a){Na.unshift(a)};s.addOnExit=s.pe=function(a){Oa.unshift(a)};
function Sa(a){Pa.unshift(a)}s.addOnPostRun=s.re=Sa;function K(a,b,c){a=(new A.Ba).mc(a);c&&(a.length=c);b||a.push(0);return a}s.intArrayFromString=K;s.intArrayToString=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];255<d&&(d&=255);b.push(String.fromCharCode(d))}return b.join("")};s.writeStringToMemory=function(a,b,c){a=K(a,c);for(c=0;c<a.length;)L[b+c>>0]=a[c],c+=1};function oa(a,b){for(var c=0;c<a.length;c++)L[b+c>>0]=a[c]}s.writeArrayToMemory=oa;
s.writeAsciiToMemory=function(a,b,c){for(var d=0;d<a.length;d++)L[b+d>>0]=a.charCodeAt(d);c||(L[b+a.length>>0]=0)};function Ta(a,b){return 0<=a?a:32>=b?2*Math.abs(1<<b-1)+a:Math.pow(2,b)+a}function Ua(a,b){if(0>=a)return a;var c=32>=b?Math.abs(1<<b-1):Math.pow(2,b-1);if(a>=c&&(32>=b||a>c))a=-2*c+a;return a}if(!Math.imul||-5!==Math.imul(4294967295,5))Math.imul=function(a,b){var c=a&65535,d=b&65535;return c*d+((a>>>16)*d+c*(b>>>16)<<16)|0};Math.Ke=Math.imul;
var ra=Math.abs,ua=Math.ceil,ta=Math.floor,sa=Math.min,R=0,Va=m,Wa=m;function Xa(){R++;s.monitorRunDependencies&&s.monitorRunDependencies(R)}s.addRunDependency=Xa;function Ya(){R--;s.monitorRunDependencies&&s.monitorRunDependencies(R);if(0==R&&(Va!==m&&(clearInterval(Va),Va=m),Wa)){var a=Wa;Wa=m;a()}}s.removeRunDependency=Ya;s.preloadedImages={};s.preloadedAudios={};Fa=8;F=Fa+A.T(35);Ma.push();
N([101,114,114,111,114,58,32,37,100,92,110,0,0,0,0,0,102,105,110,97,108,58,32,37,100,58,37,100,46,10,0,0],"i8",za,A.Nb);var Za=A.T(N(12,"i8",ya),8);C(0==Za%8);function Aa(a){return A.ib(a+8)+8&4294967288}s._malloc=Aa;
var S={aa:1,ga:2,Zd:3,Xc:4,O:5,ab:6,uc:7,ud:8,fa:9,Hc:10,$:11,ie:11,Kb:12,Db:13,Sc:14,Gd:15,Xa:16,Ya:17,je:18,Za:19,Lb:20,wa:21,A:22,pd:23,Jb:24,Kd:25,fe:26,Tc:27,Cd:28,Aa:29,Wd:30,hd:31,Pd:32,Pc:33,Td:34,yd:42,Vc:43,Ic:44,Zc:45,$c:46,ad:47,gd:48,ge:49,sd:50,Yc:51,Nc:35,vd:37,zc:52,Cc:53,ke:54,qd:55,Dc:56,Ec:57,Oc:35,Fc:59,Ed:60,td:61,ce:62,Dd:63,zd:64,Ad:65,Vd:66,wd:67,xc:68,$d:69,Jc:70,Qd:71,kd:72,Qc:73,Bc:74,Ld:76,Ac:77,Ud:78,bd:79,cd:80,fd:81,ed:82,dd:83,Fd:38,$a:39,ld:36,ya:40,za:95,Od:96,Mc:104,
rd:105,yc:97,Sd:91,Id:88,Bd:92,Xd:108,Lc:111,vc:98,Kc:103,od:101,md:100,de:110,Uc:112,Gb:113,Hb:115,Eb:114,Fb:89,jd:90,Rd:93,Yd:94,wc:99,nd:102,Ib:106,ha:107,ee:109,he:87,Rc:122,ae:116,Jd:95,xd:123,Wc:84,Md:75,Gc:125,Hd:131,Nd:130,be:86},$a={"0":"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",
12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",
34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",
53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",
74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",
90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",
107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"},ab=0;function bb(a){return M[ab>>2]=a}var cb=[];
function db(a,b){cb[a]={input:[],R:[],ba:b};eb[a]={k:fb}}
var fb={open:function(a){var b=cb[a.e.sa];b||f(new T(S.Za));a.C=b;a.seekable=n},close:function(a){a.C.R.length&&a.C.ba.ra(a.C,10)},N:function(a,b,c,d){(!a.C||!a.C.ba.qb)&&f(new T(S.ab));for(var e=0,g=0;g<d;g++){var h;try{h=a.C.ba.qb(a.C)}catch(k){f(new T(S.O))}h===i&&0===e&&f(new T(S.$));if(h===m||h===i)break;e++;b[c+g]=h}e&&(a.e.timestamp=Date.now());return e},write:function(a,b,c,d){(!a.C||!a.C.ba.ra)&&f(new T(S.ab));for(var e=0;e<d;e++)try{a.C.ba.ra(a.C,b[c+e])}catch(g){f(new T(S.O))}d&&(a.e.timestamp=
Date.now());return e}},U={F:m,Cb:1,va:2,Wa:3,M:function(){return U.createNode(m,"/",16895,0)},createNode:function(a,b,c,d){(24576===(c&61440)||4096===(c&61440))&&f(new T(S.aa));U.F||(U.F={dir:{e:{L:U.n.L,u:U.n.u,Ma:U.n.Ma,oa:U.n.oa,rename:U.n.rename,Bb:U.n.Bb,zb:U.n.zb,xb:U.n.xb,ua:U.n.ua},G:{Q:U.k.Q}},file:{e:{L:U.n.L,u:U.n.u},G:{Q:U.k.Q,N:U.k.N,write:U.k.write,cb:U.k.cb,tb:U.k.tb}},link:{e:{L:U.n.L,u:U.n.u,ta:U.n.ta},G:{}},gb:{e:{L:U.n.L,u:U.n.u},G:gb}});c=hb(a,b,c,d);16384===(c.mode&61440)?(c.n=
U.F.dir.e,c.k=U.F.dir.G,c.o={}):32768===(c.mode&61440)?(c.n=U.F.file.e,c.k=U.F.file.G,c.o=[],c.ja=U.va):40960===(c.mode&61440)?(c.n=U.F.link.e,c.k=U.F.link.G):8192===(c.mode&61440)&&(c.n=U.F.gb.e,c.k=U.F.gb.G);c.timestamp=Date.now();a&&(a.o[b]=c);return c},Fa:function(a){a.ja!==U.va&&(a.o=Array.prototype.slice.call(a.o),a.ja=U.va)},n:{L:function(a){var b={};b.Be=8192===(a.mode&61440)?a.id:1;b.Le=a.id;b.mode=a.mode;b.Re=1;b.uid=0;b.Je=0;b.sa=a.sa;b.size=16384===(a.mode&61440)?4096:32768===(a.mode&
61440)?a.o.length:40960===(a.mode&61440)?a.link.length:0;b.we=new Date(a.timestamp);b.Pe=new Date(a.timestamp);b.Ae=new Date(a.timestamp);b.Rb=4096;b.xe=Math.ceil(b.size/b.Rb);return b},u:function(a,b){b.mode!==i&&(a.mode=b.mode);b.timestamp!==i&&(a.timestamp=b.timestamp);if(b.size!==i){U.Fa(a);var c=a.o;if(b.size<c.length)c.length=b.size;else for(;b.size>c.length;)c.push(0)}},Ma:function(){f(ib[S.ga])},oa:function(a,b,c,d){return U.createNode(a,b,c,d)},rename:function(a,b,c){if(16384===(a.mode&61440)){var d;
try{d=jb(b,c)}catch(e){}if(d)for(var g in d.o)f(new T(S.$a))}delete a.parent.o[a.name];a.name=c;b.o[c]=a;a.parent=b},Bb:function(a,b){delete a.o[b]},zb:function(a,b){var c=jb(a,b),d;for(d in c.o)f(new T(S.$a));delete a.o[b]},xb:function(a){var b=[".",".."],c;for(c in a.o)a.o.hasOwnProperty(c)&&b.push(c);return b},ua:function(a,b,c){a=U.createNode(a,b,41471,0);a.link=c;return a},ta:function(a){40960!==(a.mode&61440)&&f(new T(S.A));return a.link}},k:{N:function(a,b,c,d,e){a=a.e.o;if(e>=a.length)return 0;
d=Math.min(a.length-e,d);C(0<=d);if(8<d&&a.subarray)b.set(a.subarray(e,e+d),c);else for(var g=0;g<d;g++)b[c+g]=a[e+g];return d},write:function(a,b,c,d,e,g){var h=a.e;h.timestamp=Date.now();a=h.o;if(d&&0===a.length&&0===e&&b.subarray)return g&&0===c?(h.o=b,h.ja=b.buffer===L.buffer?U.Cb:U.Wa):(h.o=new Uint8Array(b.subarray(c,c+d)),h.ja=U.Wa),d;U.Fa(h);for(a=h.o;a.length<e;)a.push(0);for(g=0;g<d;g++)a[e+g]=b[c+g];return d},Q:function(a,b,c){1===c?b+=a.position:2===c&&32768===(a.e.mode&61440)&&(b+=a.e.o.length);
0>b&&f(new T(S.A));a.sc=[];return a.position=b},cb:function(a,b,c){U.Fa(a.e);a=a.e.o;for(b+=c;b>a.length;)a.push(0)},tb:function(a,b,c,d,e,g,h){32768!==(a.e.mode&61440)&&f(new T(S.Za));a=a.e.o;if(!(h&2)&&(a.buffer===b||a.buffer===b.buffer))e=n,d=a.byteOffset;else{if(0<e||e+d<a.length)a=a.subarray?a.subarray(e,e+d):Array.prototype.slice.call(a,e,e+d);e=l;(d=Aa(d))||f(new T(S.Kb));b.set(a,d)}return{We:d,ue:e}}}},kb=N(1,"i32*",ya),lb=N(1,"i32*",ya),mb=N(1,"i32*",ya),nb=m,eb=[m],V=[],ob=1,qb=m,rb=l,sb=
{},T=m,ib={};function tb(a){a instanceof T||f(a+" : "+Ca());bb(a.jb)}
function X(a,b){var a=ub("/",a),b=b||{},c={nb:l,Pa:0},d;for(d in c)b[d]===i&&(b[d]=c[d]);8<b.Pa&&f(new T(S.ya));var c=vb(a.split("/").filter(function(a){return!!a}),n),e=nb,g="/";for(d=0;d<c.length;d++){var h=d===c.length-1;if(h&&b.parent)break;e=jb(e,c[d]);g=Y(g+"/"+c[d]);if(e.pa&&(!h||h&&b.nb))e=e.pa.root;if(!h||b.Ha)for(h=0;40960===(e.mode&61440);){e=X(g).e;e.n.ta||f(new T(S.A));var e=e.n.ta(e),k=ub;var j=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(g).slice(1),g=j[0],j=
j[1];!g&&!j?g=".":(j&&(j=j.substr(0,j.length-1)),g+=j);g=k(g,e);e=X(g,{Pa:b.Pa}).e;40<h++&&f(new T(S.ya))}}return{path:g,e:e}}function wb(a){for(var b;;){if(a===a.parent)return a=a.M.jc,!b?a:"/"!==a[a.length-1]?a+"/"+b:a+b;b=b?a.name+"/"+b:a.name;a=a.parent}}function xb(a,b){for(var c=0,d=0;d<b.length;d++)c=(c<<5)-c+b.charCodeAt(d)|0;return(a+c>>>0)%qb.length}
function jb(a,b){var c=yb(a,"x");c&&f(new T(c));for(c=qb[xb(a.id,b)];c;c=c.lc){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.n.Ma(a,b)}
function hb(a,b,c,d){zb||(zb=function(a,b,c,d){a||(a=this);this.parent=a;this.M=a.M;this.pa=m;this.id=ob++;this.name=b;this.mode=c;this.n={};this.k={};this.sa=d},zb.prototype={},Object.defineProperties(zb.prototype,{N:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}},dc:{get:function(){return 16384===(this.mode&61440)}},cc:{get:function(){return 8192===
(this.mode&61440)}}}));a=new zb(a,b,c,d);b=xb(a.parent.id,a.name);a.lc=qb[b];return qb[b]=a}var Ab={r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218};function Bb(a){var b=Ab[a];"undefined"===typeof b&&f(Error("Unknown file open mode: "+a));return b}function yb(a,b){return rb?0:-1!==b.indexOf("r")&&!(a.mode&292)||-1!==b.indexOf("w")&&!(a.mode&146)||-1!==b.indexOf("x")&&!(a.mode&73)?S.Db:0}
function Cb(a,b){try{return jb(a,b),S.Ya}catch(c){}return yb(a,"wx")}function Db(a,b,c){Eb||(Eb=r(),Eb.prototype={},Object.defineProperties(Eb.prototype,{object:{get:function(){return this.e},set:function(a){this.e=a}},Ne:{get:function(){return 1!==(this.K&2097155)}},Oe:{get:function(){return 0!==(this.K&2097155)}},Me:{get:function(){return this.K&1024}}}));var d=new Eb,e;for(e in a)d[e]=a[e];var a=d,g;a:{b=b||0;for(c=c||4096;b<=c;b++)if(!V[b]){g=b;break a}f(new T(S.Jb))}a.B=g;return V[g]=a}
var gb={open:function(a){a.k=eb[a.e.sa].k;a.k.open&&a.k.open(a)},Q:function(){f(new T(S.Aa))}};function Fb(a,b){var c="/"===b,d=!b,e;c&&nb&&f(new T(S.Xa));!c&&!d&&(e=X(b,{nb:n}),b=e.path,e=e.e,e.pa&&f(new T(S.Xa)),16384!==(e.mode&61440)&&f(new T(S.Lb)));var d={type:a,Te:{},jc:b,kc:[]},g=a.M(d);g.M=d;d.root=g;c?nb=g:e&&(e.pa=d,e.M&&e.M.kc.push(d));return g}function Gb(a,b,c){var d=X(a,{parent:l}).e,a=Hb(a),e=Cb(d,a);e&&f(new T(e));d.n.oa||f(new T(S.aa));return d.n.oa(d,a,b,c)}
function Ib(a,b){b=(b!==i?b:438)&4095;b|=32768;return Gb(a,b,0)}function Jb(a,b){b=(b!==i?b:511)&1023;b|=16384;return Gb(a,b,0)}function Kb(a,b,c){"undefined"===typeof c&&(c=b,b=438);return Gb(a,b|8192,c)}function Lb(a,b){var c=X(b,{parent:l}).e,d=Hb(b),e=Cb(c,d);e&&f(new T(e));c.n.ua||f(new T(S.aa));return c.n.ua(c,d,a)}function Mb(a,b){var c;c="string"===typeof a?X(a,{Ha:l}).e:a;c.n.u||f(new T(S.aa));c.n.u(c,{mode:b&4095|c.mode&-4096,timestamp:Date.now()})}
function Nb(a,b){var c,b="string"===typeof b?Bb(b):b;c=b&64?("undefined"===typeof c?438:c)&4095|32768:0;var d;if("object"===typeof a)d=a;else{a=Y(a);try{d=X(a,{Ha:!(b&131072)}).e}catch(e){}}b&64&&(d?b&128&&f(new T(S.Ya)):d=Gb(a,c,0));d||f(new T(S.ga));8192===(d.mode&61440)&&(b&=-513);d?40960===(d.mode&61440)?c=S.ya:16384===(d.mode&61440)&&(0!==(b&2097155)||b&512)?c=S.wa:(c=["r","w","rw"][b&2097155],b&512&&(c+="w"),c=yb(d,c)):c=S.ga;c&&f(new T(c));if(b&512){c=d;c="string"===typeof c?X(c,{Ha:l}).e:
c;c.n.u||f(new T(S.aa));16384===(c.mode&61440)&&f(new T(S.wa));32768!==(c.mode&61440)&&f(new T(S.A));var g=yb(c,"w");g&&f(new T(g));c.n.u(c,{size:0,timestamp:Date.now()})}b&=-641;d=Db({e:d,path:wb(d),K:b,seekable:l,position:0,k:d.k,sc:[],error:n},i,i);d.k.open&&d.k.open(d);s.logReadFiles&&!(b&1)&&(Ob||(Ob={}),a in Ob||(Ob[a]=1,s.printErr("read file: "+a)));try{sb.onOpenFile&&(c=0,1!==(b&2097155)&&(c|=1),0!==(b&2097155)&&(c|=2),sb.onOpenFile(a,c))}catch(h){console.log("FS.trackingDelegate['onOpenFile']('"+
a+"', flags) threw an exception: "+h.message)}return d}function Pb(a){try{a.k.close&&a.k.close(a)}catch(b){f(b)}finally{V[a.B]=m}}
function Qb(a,b,c,d,e,g){(0>d||0>e)&&f(new T(S.A));0===(a.K&2097155)&&f(new T(S.fa));16384===(a.e.mode&61440)&&f(new T(S.wa));a.k.write||f(new T(S.A));var h=l;"undefined"===typeof e?(e=a.position,h=n):a.seekable||f(new T(S.Aa));a.K&1024&&((!a.seekable||!a.k.Q)&&f(new T(S.Aa)),a.k.Q(a,0,2));b=a.k.write(a,b,c,d,e,g);h||(a.position+=b);try{if(a.path&&sb.onWriteToFile)sb.onWriteToFile(a.path)}catch(k){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+k.message)}return b}
function Rb(){T||(T=function(a){this.jb=a;for(var b in S)if(S[b]===a){this.code=b;break}this.message=$a[a]},T.prototype=Error(),[S.ga].forEach(function(a){ib[a]=new T(a);ib[a].stack="<generic error, no stack>"}))}var Sb;function Tb(a,b){var c=0;a&&(c|=365);b&&(c|=146);return c}
function Ub(a,b,c,d,e,g){a=b?Y(("string"===typeof a?a:wb(a))+"/"+b):a;d=Tb(d,e);e=Ib(a,d);if(c){if("string"===typeof c){for(var a=Array(c.length),b=0,h=c.length;b<h;++b)a[b]=c.charCodeAt(b);c=a}Mb(e,d|146);a=Nb(e,"w");Qb(a,c,0,c.length,0,g);Pb(a);Mb(e,d)}return e}
function Vb(a,b,c,d){a=Y(("string"===typeof a?a:wb(a))+"/"+b);b=Tb(!!c,!!d);Vb.sb||(Vb.sb=64);var e;e=Vb.sb++<<8|0;eb[e]={k:{open:function(a){a.seekable=n},close:function(){d&&(d.buffer&&d.buffer.length)&&d(10)},N:function(a,b,d,e){for(var w=0,E=0;E<e;E++){var p;try{p=c()}catch(v){f(new T(S.O))}p===i&&0===w&&f(new T(S.$));if(p===m||p===i)break;w++;b[d+E]=p}w&&(a.e.timestamp=Date.now());return w},write:function(a,b,c,e){for(var w=0;w<e;w++)try{d(b[c+w])}catch(E){f(new T(S.O))}e&&(a.e.timestamp=Date.now());
return w}}};return Kb(a,b,e)}function Wb(a){if(a.cc||a.dc||a.link||a.o)return l;var b=l;"undefined"!==typeof XMLHttpRequest&&f(Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread."));if(s.read)try{a.o=K(s.read(a.url),l)}catch(c){b=n}else f(Error("Cannot load without read() or XMLHttpRequest."));b||bb(S.O);return b}var zb,Eb,Ob;
function vb(a,b){for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}function Y(a){var b="/"===a.charAt(0),c="/"===a.substr(-1),a=vb(a.split("/").filter(function(a){return!!a}),!b).join("/");!a&&!b&&(a=".");a&&c&&(a+="/");return(b?"/":"")+a}function Hb(a){if("/"===a)return"/";var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)}
function ub(){for(var a="",b=n,c=arguments.length-1;-1<=c&&!b;c--){var d=0<=c?arguments[c]:"/";"string"!==typeof d&&f(new TypeError("Arguments to path.resolve must be strings"));d&&(a=d+"/"+a,b="/"===d.charAt(0))}a=vb(a.split("/").filter(function(a){return!!a}),!b).join("/");return(b?"/":"")+a||"."}var Xb=n,Yb=n,Zb=n,$b=n,ac=i,bc=i;
function cc(a){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[a.substr(a.lastIndexOf(".")+1)]}var dc=[];function ec(){var a=s.canvas;dc.forEach(function(b){b(a.width,a.height)})}
function fc(a,b,c){b&&c?(a.tc=b,a.bc=c):(b=a.tc,c=a.bc);var d=b,e=c;s.forcedAspectRatio&&0<s.forcedAspectRatio&&(d/e<s.forcedAspectRatio?d=Math.round(e*s.forcedAspectRatio):e=Math.round(d/s.forcedAspectRatio));if((document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===
a.parentNode&&"undefined"!=typeof screen)var g=Math.min(screen.width/d,screen.height/e),d=Math.round(d*g),e=Math.round(e*g);bc?(a.width!=d&&(a.width=d),a.height!=e&&(a.height=e),"undefined"!=typeof a.style&&(a.style.removeProperty("width"),a.style.removeProperty("height"))):(a.width!=b&&(a.width=b),a.height!=c&&(a.height=c),"undefined"!=typeof a.style&&(d!=b||e!=c?(a.style.setProperty("width",d+"px","important"),a.style.setProperty("height",e+"px","important")):(a.style.removeProperty("width"),a.style.removeProperty("height"))))}
var gc,hc,ic,jc;function kc(){f("TODO")}
var Z={M:function(){return hb(m,"/",16895,0)},Ub:function(a,b,c){c&&C(1==b==(6==c));a={Wb:a,type:b,protocol:c,p:m,ca:{},Na:[],W:[],Y:Z.q};b=Z.qa();c=hb(Z.root,b,49152,0);c.X=a;b=Db({path:b,e:c,K:Bb("r+"),seekable:n,k:Z.k});a.G=b;return a},Yb:function(a){a=V[a];return!a||49152!==(a.e.mode&49152)?m:a.e.X},k:{wb:function(a){a=a.e.X;return a.Y.wb(a)},rb:function(a,b,c){a=a.e.X;return a.Y.rb(a,b,c)},N:function(a,b,c,d){a=a.e.X;d=a.Y.nc(a,d);if(!d)return 0;b.set(d.buffer,c);return d.buffer.length},write:function(a,
b,c,d){a=a.e.X;return a.Y.pc(a,b,c,d)},close:function(a){a=a.e.X;a.Y.close(a)}},qa:function(){Z.qa.hb||(Z.qa.hb=0);return"socket["+Z.qa.hb++ +"]"},q:{ka:function(a,b,c){var d;"object"===typeof b&&(d=b,c=b=m);if(d)d._socket?(b=d._socket.remoteAddress,c=d._socket.remotePort):((c=/ws[s]?:\/\/([^:]+):(\d+)/.exec(d.url))||f(Error("WebSocket URL must be in the format ws(s)://address:port")),b=c[1],c=parseInt(c[2],10));else try{var e=s.websocket&&"object"===typeof s.websocket,g="ws:#".replace("#","//");
e&&"string"===typeof s.websocket.url&&(g=s.websocket.url);if("ws://"===g||"wss://"===g)g=g+b+":"+c;var h="binary";e&&"string"===typeof s.websocket.subprotocol&&(h=s.websocket.subprotocol);var h=h.replace(/^ +| +$/g,"").split(/ *, */),k=u?{protocol:h.toString()}:h;d=new (u?require("ws"):window.WebSocket)(g,k);d.binaryType="arraybuffer"}catch(j){f(new T(S.Gb))}b={H:b,port:c,g:d,la:[]};Z.q.bb(a,b);Z.q.ac(a,b);2===a.type&&"undefined"!==typeof a.Z&&b.la.push(new Uint8Array([255,255,255,255,112,111,114,
116,(a.Z&65280)>>8,a.Z&255]));return b},na:function(a,b,c){return a.ca[b+":"+c]},bb:function(a,b){a.ca[b.H+":"+b.port]=b},yb:function(a,b){delete a.ca[b.H+":"+b.port]},ac:function(a,b){function c(){try{for(var a=b.la.shift();a;)b.g.send(a),a=b.la.shift()}catch(c){b.g.close()}}function d(c){C("string"!==typeof c&&c.byteLength!==i);var c=new Uint8Array(c),d=e;e=n;d&&10===c.length&&255===c[0]&&255===c[1]&&255===c[2]&&255===c[3]&&112===c[4]&&111===c[5]&&114===c[6]&&116===c[7]?(c=c[8]<<8|c[9],Z.q.yb(a,
b),b.port=c,Z.q.bb(a,b)):a.W.push({H:b.H,port:b.port,data:c})}var e=l;u?(b.g.on("open",c),b.g.on("message",function(a,b){b.binary&&d((new Uint8Array(a)).buffer)}),b.g.on("error",r())):(b.g.onopen=c,b.g.onmessage=function(a){d(a.data)})},wb:function(a){if(1===a.type&&a.p)return a.Na.length?65:0;var b=0,c=1===a.type?Z.q.na(a,a.I,a.J):m;if(a.W.length||!c||c&&c.g.readyState===c.g.ea||c&&c.g.readyState===c.g.CLOSED)b|=65;if(!c||c&&c.g.readyState===c.g.OPEN)b|=4;if(c&&c.g.readyState===c.g.ea||c&&c.g.readyState===
c.g.CLOSED)b|=16;return b},rb:function(a,b,c){switch(b){case 21531:return b=0,a.W.length&&(b=a.W[0].data.length),M[c>>2]=b,0;default:return S.A}},close:function(a){if(a.p){try{a.p.close()}catch(b){}a.p=m}for(var c=Object.keys(a.ca),d=0;d<c.length;d++){var e=a.ca[c[d]];try{e.g.close()}catch(g){}Z.q.yb(a,e)}return 0},bind:function(a,b,c){("undefined"!==typeof a.Ra||"undefined"!==typeof a.Z)&&f(new T(S.A));a.Ra=b;a.Z=c||kc();if(2===a.type){a.p&&(a.p.close(),a.p=m);try{a.Y.hc(a,0)}catch(d){d instanceof
T||f(d),d.jb!==S.za&&f(d)}}},ze:function(a,b,c){a.p&&f(new T(ERRNO_CODS.za));if("undefined"!==typeof a.I&&"undefined"!==typeof a.J){var d=Z.q.na(a,a.I,a.J);d&&(d.g.readyState===d.g.CONNECTING&&f(new T(S.Eb)),f(new T(S.Ib)))}b=Z.q.ka(a,b,c);a.I=b.H;a.J=b.port;f(new T(S.Hb))},hc:function(a){u||f(new T(S.za));a.p&&f(new T(S.A));var b=require("ws").Server;a.p=new b({host:a.Ra,port:a.Z});a.p.on("connection",function(b){if(1===a.type){var d=Z.Ub(a.Wb,a.type,a.protocol),b=Z.q.ka(d,b);d.I=b.H;d.J=b.port;
a.Na.push(d)}else Z.q.ka(a,b)});a.p.on("closed",function(){a.p=m});a.p.on("error",r())},accept:function(a){a.p||f(new T(S.A));var b=a.Na.shift();b.G.K=a.G.K;return b},Ie:function(a,b){var c,d;b?((a.I===i||a.J===i)&&f(new T(S.ha)),c=a.I,d=a.J):(c=a.Ra||0,d=a.Z||0);return{H:c,port:d}},pc:function(a,b,c,d,e,g){if(2===a.type){if(e===i||g===i)e=a.I,g=a.J;(e===i||g===i)&&f(new T(S.Fb))}else e=a.I,g=a.J;var h=Z.q.na(a,e,g);1===a.type&&((!h||h.g.readyState===h.g.ea||h.g.readyState===h.g.CLOSED)&&f(new T(S.ha)),
h.g.readyState===h.g.CONNECTING&&f(new T(S.$)));b=b instanceof Array||b instanceof ArrayBuffer?b.slice(c,c+d):b.buffer.slice(b.byteOffset+c,b.byteOffset+c+d);if(2===a.type&&(!h||h.g.readyState!==h.g.OPEN)){if(!h||h.g.readyState===h.g.ea||h.g.readyState===h.g.CLOSED)h=Z.q.ka(a,e,g);h.la.push(b);return d}try{return h.g.send(b),d}catch(k){f(new T(S.A))}},nc:function(a,b){1===a.type&&a.p&&f(new T(S.ha));var c=a.W.shift();if(!c){if(1===a.type){var d=Z.q.na(a,a.I,a.J);if(d){if(d.g.readyState===d.g.ea||
d.g.readyState===d.g.CLOSED)return m;f(new T(S.$))}f(new T(S.ha))}f(new T(S.$))}var d=c.data.byteLength||c.data.length,e=c.data.byteOffset||0,g=c.data.buffer||c.data,h=Math.min(b,d),k={buffer:new Uint8Array(g,e,h),H:c.H,port:c.port};1===a.type&&h<d&&(c.data=new Uint8Array(g,e+h,d-h),a.W.unshift(c));return k}}};function lc(a,b,c){a=V[a];if(!a)return bb(S.fa),-1;try{return Qb(a,L,b,c)}catch(d){return tb(d),-1}}function mc(a){a=V[a-1];return!a?-1:a.B}
function nc(a,b,c,d){c*=b;if(0==c)return 0;a=lc(mc(d),a,c);if(-1==a){if(b=V[d-1])b.error=l;return 0}return Math.floor(a/b)}s._strlen=oc;function pc(a){return 0>a||0===a&&-Infinity===1/a}
function qc(a,b){function c(a){var c;"double"===a?c=wa[b+e>>3]:"i64"==a?c=[M[b+e>>2],M[b+(e+4)>>2]]:(a="i32",c=M[b+e>>2]);e+=A.ob(a);return c}for(var d=a,e=0,g=[],h,k;;){var j=d;h=L[d>>0];if(0===h)break;k=L[d+1>>0];if(37==h){var w=n,E=n,p=n,v=n,B=n;a:for(;;){switch(k){case 43:w=l;break;case 45:E=l;break;case 35:p=l;break;case 48:if(v)break a;else{v=l;break}case 32:B=l;break;default:break a}d++;k=L[d+1>>0]}var G=0;if(42==k)G=c("i32"),d++,k=L[d+1>>0];else for(;48<=k&&57>=k;)G=10*G+(k-48),d++,k=L[d+
1>>0];var H=n,z=-1;if(46==k){z=0;H=l;d++;k=L[d+1>>0];if(42==k)z=c("i32"),d++;else for(;;){k=L[d+1>>0];if(48>k||57<k)break;z=10*z+(k-48);d++}k=L[d+1>>0]}0>z&&(z=6,H=n);var y;switch(String.fromCharCode(k)){case "h":k=L[d+2>>0];104==k?(d++,y=1):y=2;break;case "l":k=L[d+2>>0];108==k?(d++,y=8):y=4;break;case "L":case "q":case "j":y=8;break;case "z":case "t":case "I":y=4;break;default:y=m}y&&d++;k=L[d+1>>0];switch(String.fromCharCode(k)){case "d":case "i":case "u":case "o":case "x":case "X":case "p":j=
100==k||105==k;y=y||4;h=c("i"+8*y);var q;8==y&&(h=A.ic(h[0],h[1],117==k));4>=y&&(h=(j?Ua:Ta)(h&Math.pow(256,y)-1,8*y));var W=Math.abs(h),j="";if(100==k||105==k)q=Ua(h,8*y).toString(10);else if(117==k)q=Ta(h,8*y).toString(10),h=Math.abs(h);else if(111==k)q=(p?"0":"")+W.toString(8);else if(120==k||88==k){j=p&&0!=h?"0x":"";if(0>h){h=-h;q=(W-1).toString(16);W=[];for(p=0;p<q.length;p++)W.push((15-parseInt(q[p],16)).toString(16));for(q=W.join("");q.length<2*y;)q="f"+q}else q=W.toString(16);88==k&&(j=j.toUpperCase(),
q=q.toUpperCase())}else 112==k&&(0===W?q="(nil)":(j="0x",q=W.toString(16)));if(H)for(;q.length<z;)q="0"+q;0<=h&&(w?j="+"+j:B&&(j=" "+j));"-"==q.charAt(0)&&(j="-"+j,q=q.substr(1));for(;j.length+q.length<G;)E?q+=" ":v?q="0"+q:j=" "+j;q=j+q;q.split("").forEach(function(a){g.push(a.charCodeAt(0))});break;case "f":case "F":case "e":case "E":case "g":case "G":h=c("double");if(isNaN(h))q="nan",v=n;else if(isFinite(h)){H=n;y=Math.min(z,20);if(103==k||71==k)H=l,z=z||1,y=parseInt(h.toExponential(y).split("e")[1],
10),z>y&&-4<=y?(k=(103==k?"f":"F").charCodeAt(0),z-=y+1):(k=(103==k?"e":"E").charCodeAt(0),z--),y=Math.min(z,20);if(101==k||69==k)q=h.toExponential(y),/[eE][-+]\d$/.test(q)&&(q=q.slice(0,-1)+"0"+q.slice(-1));else if(102==k||70==k)q=h.toFixed(y),0===h&&pc(h)&&(q="-"+q);j=q.split("e");if(H&&!p)for(;1<j[0].length&&-1!=j[0].indexOf(".")&&("0"==j[0].slice(-1)||"."==j[0].slice(-1));)j[0]=j[0].slice(0,-1);else for(p&&-1==q.indexOf(".")&&(j[0]+=".");z>y++;)j[0]+="0";q=j[0]+(1<j.length?"e"+j[1]:"");69==k&&
(q=q.toUpperCase());0<=h&&(w?q="+"+q:B&&(q=" "+q))}else q=(0>h?"-":"")+"inf",v=n;for(;q.length<G;)q=E?q+" ":v&&("-"==q[0]||"+"==q[0])?q[0]+"0"+q.slice(1):(v?"0":" ")+q;97>k&&(q=q.toUpperCase());q.split("").forEach(function(a){g.push(a.charCodeAt(0))});break;case "s":v=(w=c("i8*"))?oc(w):6;H&&(v=Math.min(v,z));if(!E)for(;v<G--;)g.push(32);if(w)for(p=0;p<v;p++)g.push(O[w++>>0]);else g=g.concat(K("(null)".substr(0,v),l));if(E)for(;v<G--;)g.push(32);break;case "c":for(E&&g.push(c("i8"));0<--G;)g.push(32);
E||g.push(c("i8"));break;case "n":E=c("i32*");M[E>>2]=g.length;break;case "%":g.push(h);break;default:for(p=j;p<d+2;p++)g.push(L[p>>0])}d+=2}else g.push(h),d+=1}return g}function rc(a,b,c){c=qc(b,c);b=A.Va();a=nc(N(c,"i8",xa),1,c.length,a);A.Ua(b);return a}s._memset=sc;s._memcpy=tc;function uc(){}s._free=uc;
s.requestFullScreen=function(a,b){function c(){Yb=n;var a=d.parentNode;(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===a?(d.fb=document.cancelFullScreen||document.mozCancelFullScreen||document.webkitCancelFullScreen||document.msExitFullscreen||document.exitFullscreen||
r(),d.fb=d.fb.bind(document),ac&&d.Qa(),Yb=l,bc&&("undefined"!=typeof SDL&&(a=Ea[SDL.screen+0*A.P>>2],M[SDL.screen+0*A.P>>2]=a|8388608),ec())):(a.parentNode.insertBefore(d,a),a.parentNode.removeChild(a),bc&&("undefined"!=typeof SDL&&(a=Ea[SDL.screen+0*A.P>>2],M[SDL.screen+0*A.P>>2]=a&-8388609),ec()));if(s.onFullScreen)s.onFullScreen(Yb);fc(d)}ac=a;bc=b;"undefined"===typeof ac&&(ac=l);"undefined"===typeof bc&&(bc=n);var d=s.canvas;$b||($b=l,document.addEventListener("fullscreenchange",c,n),document.addEventListener("mozfullscreenchange",
c,n),document.addEventListener("webkitfullscreenchange",c,n),document.addEventListener("MSFullscreenChange",c,n));var e=document.createElement("div");d.parentNode.insertBefore(e,d);e.appendChild(d);e.oc=e.requestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen||(e.webkitRequestFullScreen?function(){e.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:m);e.oc()};
s.requestAnimationFrame=function(a){"undefined"===typeof window?setTimeout(a,1E3/60):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||window.setTimeout),window.requestAnimationFrame(a))};s.setCanvasSize=function(a,b,c){fc(s.canvas,a,b);c||ec()};s.pauseMainLoop=r();s.resumeMainLoop=function(){Xb&&(Xb=n,m())};
s.getUserMedia=function(){window.pb||(window.pb=navigator.getUserMedia||navigator.mozGetUserMedia);window.pb(i)};Rb();qb=Array(4096);Fb(U,"/");Jb("/tmp");Jb("/dev");eb[259]={k:{N:function(){return 0},write:function(){return 0}}};Kb("/dev/null",259);
db(1280,{qb:function(a){if(!a.input.length){var b=m;if(u){if(b=process.stdin.read(),!b){if(process.stdin._readableState&&process.stdin._readableState.ended)return m;return}}else"undefined"!=typeof window&&"function"==typeof window.prompt?(b=window.prompt("Input: "),b!==m&&(b+="\n")):"function"==typeof readline&&(b=readline(),b!==m&&(b+="\n"));if(!b)return m;a.input=K(b,l)}return a.input.shift()},ra:function(a,b){b===m||10===b?(s.print(a.R.join("")),a.R=[]):a.R.push(vc.Oa(b))}});
db(1536,{ra:function(a,b){b===m||10===b?(s.printErr(a.R.join("")),a.R=[]):a.R.push(vc.Oa(b))}});Kb("/dev/tty",1280);Kb("/dev/tty1",1536);Jb("/dev/shm");Jb("/dev/shm/tmp");
Ma.unshift({V:function(){if(!s.noFSInit&&!Sb){C(!Sb,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");Sb=l;Rb();s.stdin=s.stdin;s.stdout=s.stdout;s.stderr=s.stderr;s.stdin?Vb("/dev","stdin",s.stdin):Lb("/dev/tty","/dev/stdin");s.stdout?Vb("/dev","stdout",m,s.stdout):Lb("/dev/tty","/dev/stdout");s.stderr?Vb("/dev","stderr",m,s.stderr):Lb("/dev/tty1","/dev/stderr");var a=Nb("/dev/stdin",
"r");M[kb>>2]=a?a.B+1:0;C(0===a.B,"invalid handle for stdin ("+a.B+")");a=Nb("/dev/stdout","w");M[lb>>2]=a?a.B+1:0;C(1===a.B,"invalid handle for stdout ("+a.B+")");a=Nb("/dev/stderr","w");M[mb>>2]=a?a.B+1:0;C(2===a.B,"invalid handle for stderr ("+a.B+")")}}});Na.push({V:function(){rb=n}});Oa.push({V:function(){Sb=n;for(var a=0;a<V.length;a++){var b=V[a];b&&Pb(b)}}});s.FS_createFolder=function(a,b,c,d){a=Y(("string"===typeof a?a:wb(a))+"/"+b);return Jb(a,Tb(c,d))};
s.FS_createPath=function(a,b){for(var a="string"===typeof a?a:wb(a),c=b.split("/").reverse();c.length;){var d=c.pop();if(d){var e=Y(a+"/"+d);try{Jb(e)}catch(g){}a=e}}return e};s.FS_createDataFile=Ub;
s.FS_createPreloadedFile=function(a,b,c,d,e,g,h,k,j){function w(c){function q(c){k||Ub(a,b,c,d,e,j);g&&g();Ya()}var p=n;s.preloadPlugins.forEach(function(a){!p&&a.canHandle(B)&&(a.handle(c,B,q,function(){h&&h();Ya()}),p=l)});p||q(c)}s.preloadPlugins||(s.preloadPlugins=[]);if(!gc&&!ca){gc=l;try{new Blob,hc=l}catch(E){hc=n,console.log("warning: no blob constructor, cannot create blobs with mimetypes")}ic="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:
!hc?console.log("warning: no BlobBuilder"):m;jc="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:i;!s.vb&&"undefined"===typeof jc&&(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),s.vb=l);s.preloadPlugins.push({canHandle:function(a){return!s.vb&&/\.(jpg|jpeg|png|bmp)$/i.test(a)},handle:function(a,b,c,d){var e=m;if(hc)try{e=new Blob([a],{type:cc(b)}),e.size!==a.length&&(e=new Blob([(new Uint8Array(a)).buffer],
{type:cc(b)}))}catch(g){A.da("Blob constructor present but fails: "+g+"; falling back to blob builder")}e||(e=new ic,e.append((new Uint8Array(a)).buffer),e=e.getBlob());var h=jc.createObjectURL(e),k=new Image;k.onload=function(){C(k.complete,"Image "+b+" could not be decoded");var d=document.createElement("canvas");d.width=k.width;d.height=k.height;d.getContext("2d").drawImage(k,0,0);s.preloadedImages[b]=d;jc.revokeObjectURL(h);c&&c(a)};k.onerror=function(){console.log("Image "+h+" could not be decoded");
d&&d()};k.src=h}});s.preloadPlugins.push({canHandle:function(a){return!s.Se&&a.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(a,b,c,d){function e(d){h||(h=l,s.preloadedAudios[b]=d,c&&c(a))}function g(){h||(h=l,s.preloadedAudios[b]=new Audio,d&&d())}var h=n;if(hc){try{var k=new Blob([a],{type:cc(b)})}catch(j){return g()}var k=jc.createObjectURL(k),p=new Audio;p.addEventListener("canplaythrough",function(){e(p)},n);p.onerror=function(){if(!h){console.log("warning: browser could not fully decode audio "+
b+", trying slower base64 approach");for(var c="",d=0,g=0,k=0;k<a.length;k++){d=d<<8|a[k];for(g+=8;6<=g;)var j=d>>g-6&63,g=g-6,c=c+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[j]}2==g?(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(d&3)<<4],c+="=="):4==g&&(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(d&15)<<2],c+="=");p.src="data:audio/x-"+b.substr(-3)+";base64,"+c;e(p)}};p.src=k;s.noExitRuntime=l;setTimeout(function(){ja||e(p)},
1E4)}else return g()}});var p=s.canvas;if(p){p.Qa=p.requestPointerLock||p.mozRequestPointerLock||p.webkitRequestPointerLock||p.msRequestPointerLock||r();p.kb=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||r();p.kb=p.kb.bind(document);var v=function(){Zb=document.pointerLockElement===p||document.mozPointerLockElement===p||document.webkitPointerLockElement===p||document.msPointerLockElement===p};document.addEventListener("pointerlockchange",
v,n);document.addEventListener("mozpointerlockchange",v,n);document.addEventListener("webkitpointerlockchange",v,n);document.addEventListener("mspointerlockchange",v,n);s.elementPointerLock&&p.addEventListener("click",function(a){!Zb&&p.Qa&&(p.Qa(),a.preventDefault())},n)}}var B=b?ub(Y(a+"/"+b)):a;Xa();if("string"==typeof c){var G=h,H=function(){G?G():f('Loading data file "'+c+'" failed.')},z=new XMLHttpRequest;z.open("GET",c,l);z.responseType="arraybuffer";z.onload=function(){if(200==z.status||0==
z.status&&z.response){var a=z.response;C(a,'Loading data file "'+c+'" failed (no arrayBuffer).');a=new Uint8Array(a);w(a);Ya()}else H()};z.onerror=H;z.send(m);Xa()}else w(c)};
s.FS_createLazyFile=function(a,b,c,d,e){var g,h;function k(){this.La=n;this.ia=[]}k.prototype.get=function(a){if(!(a>this.length-1||0>a)){var b=a%this.Tb;return this.$b(Math.floor(a/this.Tb))[b]}};k.prototype.qc=function(a){this.$b=a};k.prototype.eb=function(){var a=new XMLHttpRequest;a.open("HEAD",c,n);a.send(m);200<=a.status&&300>a.status||304===a.status||f(Error("Couldn't load "+c+". Status: "+a.status));var b=Number(a.getResponseHeader("Content-length")),d,e=1048576;if(!((d=a.getResponseHeader("Accept-Ranges"))&&
"bytes"===d))e=b;var g=this;g.qc(function(a){var d=a*e,h=(a+1)*e-1,h=Math.min(h,b-1);if("undefined"===typeof g.ia[a]){var k=g.ia;d>h&&f(Error("invalid range ("+d+", "+h+") or no bytes requested!"));h>b-1&&f(Error("only "+b+" bytes available! programmer error!"));var j=new XMLHttpRequest;j.open("GET",c,n);b!==e&&j.setRequestHeader("Range","bytes="+d+"-"+h);"undefined"!=typeof Uint8Array&&(j.responseType="arraybuffer");j.overrideMimeType&&j.overrideMimeType("text/plain; charset=x-user-defined");j.send(m);
200<=j.status&&300>j.status||304===j.status||f(Error("Couldn't load "+c+". Status: "+j.status));d=j.response!==i?new Uint8Array(j.response||[]):K(j.responseText||"",l);k[a]=d}"undefined"===typeof g.ia[a]&&f(Error("doXHR failed!"));return g.ia[a]});this.Qb=b;this.Pb=e;this.La=l};"undefined"!==typeof XMLHttpRequest?(ca||f("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"),g=new k,Object.defineProperty(g,"length",{get:function(){this.La||
this.eb();return this.Qb}}),Object.defineProperty(g,"chunkSize",{get:function(){this.La||this.eb();return this.Pb}}),h=i):(h=c,g=i);var j,a=Y(("string"===typeof a?a:wb(a))+"/"+b);j=Ib(a,Tb(d,e));g?j.o=g:h&&(j.o=m,j.url=h);var w={};Object.keys(j.k).forEach(function(a){var b=j.k[a];w[a]=function(){Wb(j)||f(new T(S.O));return b.apply(m,arguments)}});w.N=function(a,b,c,d,e){Wb(j)||f(new T(S.O));a=a.e.o;if(e>=a.length)return 0;d=Math.min(a.length-e,d);C(0<=d);if(a.slice)for(var g=0;g<d;g++)b[c+g]=a[e+
g];else for(g=0;g<d;g++)b[c+g]=a.get(e+g);return d};j.k=w;return j};s.FS_createLink=function(a,b,c){a=Y(("string"===typeof a?a:wb(a))+"/"+b);return Lb(c,a)};s.FS_createDevice=Vb;ab=A.Ab(4);M[ab>>2]=0;Ma.unshift({V:r()});Oa.push({V:r()});var vc=new A.Ba;u&&(require("fs"),process.platform.match(/^win/));Ma.push({V:function(){Z.root=Fb(Z,m)}});Ga=x=A.T(F);Ha=Ga+5242880;Ia=I=A.T(Ha);C(Ia<J,"TOTAL_MEMORY not big enough for stack");sa=Math.min;
var $=(function(global,env,buffer) {
// EMSCRIPTEN_START_ASM
"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.tempDoublePtr|0;var l=env.ABORT|0;var m=0;var n=0;var o=0;var p=0;var q=+env.NaN,r=+env.Infinity;var s=0,t=0,u=0,v=0,w=0.0,x=0,y=0,z=0,A=0.0;var B=0;var C=0;var D=0;var E=0;var F=0;var G=0;var H=0;var I=0;var J=0;var K=0;var L=global.Math.floor;var M=global.Math.abs;var N=global.Math.sqrt;var O=global.Math.pow;var P=global.Math.cos;var Q=global.Math.sin;var R=global.Math.tan;var S=global.Math.acos;var T=global.Math.asin;var U=global.Math.atan;var V=global.Math.atan2;var W=global.Math.exp;var X=global.Math.log;var Y=global.Math.ceil;var Z=global.Math.imul;var _=env.abort;var $=env.assert;var aa=env.asmPrintInt;var ba=env.asmPrintFloat;var ca=env.min;var da=env._free;var ea=env._emscripten_memcpy_big;var fa=env._printf;var ga=env._send;var ha=env._pwrite;var ia=env.__reallyNegative;var ja=env._fwrite;var ka=env._malloc;var la=env._mkport;var ma=env._fprintf;var na=env.___setErrNo;var oa=env.__formatString;var pa=env._fileno;var qa=env._fflush;var ra=env._write;var sa=0.0;
// EMSCRIPTEN_START_FUNCS
function ta(a){a=a|0;var b=0;b=i;i=i+a|0;i=i+7&-8;return b|0}function ua(){return i|0}function va(a){a=a|0;i=a}function wa(a,b){a=a|0;b=b|0;if((m|0)==0){m=a;n=b}}function xa(b){b=b|0;a[k>>0]=a[b>>0];a[k+1>>0]=a[b+1>>0];a[k+2>>0]=a[b+2>>0];a[k+3>>0]=a[b+3>>0]}function ya(b){b=b|0;a[k>>0]=a[b>>0];a[k+1>>0]=a[b+1>>0];a[k+2>>0]=a[b+2>>0];a[k+3>>0]=a[b+3>>0];a[k+4>>0]=a[b+4>>0];a[k+5>>0]=a[b+5>>0];a[k+6>>0]=a[b+6>>0];a[k+7>>0]=a[b+7>>0]}function za(a){a=a|0;B=a}function Aa(){return B|0}function Ba(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;e=i;i=i+16|0;f=e;a:do{if((b|0)>1){b=a[c[d+4>>2]>>0]|0;switch(b|0){case 50:{b=3500;break a};case 51:{g=4;break a};case 52:{b=35e3;break a};case 53:{b=7e4;break a};case 49:{b=550;break a};case 48:{n=0;i=e;return n|0};default:{c[f>>2]=b+ -48;fa(8,f|0)|0;n=-1;i=e;return n|0}}}else{g=4}}while(0);if((g|0)==4){b=7e3}n=0;k=0;d=0;while(1){h=((d|0)%5|0)+1|0;g=((d|0)%3|0)+1|0;j=0;while(1){n=((j|0)/(h|0)|0)+n|0;if(n>>>0>1e3){n=(n>>>0)/(g>>>0)|0}if((j&3|0)==0){n=n+(Z((j&7|0)==0?1:-1,j)|0)|0}m=n<<16>>16;m=(Z(m,m)|0)&255;l=m+(k&65535)|0;j=j+1|0;if((j|0)==2e4){break}else{k=l}}d=d+1|0;if((d|0)<(b|0)){k=l}else{break}}c[f>>2]=n;c[f+4>>2]=k+m&65535;fa(24,f|0)|0;n=0;i=e;return n|0}function Ca(){}function Da(b){b=b|0;var c=0;c=b;while(a[c>>0]|0){c=c+1|0}return c-b|0}function Ea(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=b+e|0;if((e|0)>=20){d=d&255;i=b&3;h=d|d<<8|d<<16|d<<24;g=f&~3;if(i){i=b+4-i|0;while((b|0)<(i|0)){a[b>>0]=d;b=b+1|0}}while((b|0)<(g|0)){c[b>>2]=h;b=b+4|0}}while((b|0)<(f|0)){a[b>>0]=d;b=b+1|0}return b-e|0}function Fa(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;if((e|0)>=4096)return ea(b|0,d|0,e|0)|0;f=b|0;if((b&3)==(d&3)){while(b&3){if((e|0)==0)return f|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}while((e|0)>=4){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0;e=e-4|0}}while((e|0)>0){a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}return f|0}
// EMSCRIPTEN_END_FUNCS
return{_strlen:Da,_memcpy:Fa,_main:Ba,_memset:Ea,runPostSets:Ca,stackAlloc:ta,stackSave:ua,stackRestore:va,setThrew:wa,setTempRet0:za,getTempRet0:Aa}
// EMSCRIPTEN_END_ASM
})({Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array},{abort:D,assert:C,asmPrintInt:function(a,b){s.print("int "+a+","+b)},asmPrintFloat:function(a,b){s.print("float "+a+","+b)},min:sa,_free:uc,_emscripten_memcpy_big:function(a,b,c){O.set(O.subarray(b,b+c),a);return a},_printf:function(a,b){return rc(M[lb>>2],a,b)},_send:function(a,
b,c){return!Z.Yb(a)?(bb(S.fa),-1):lc(a,b,c)},_pwrite:function(a,b,c,d){a=V[a];if(!a)return bb(S.fa),-1;try{return Qb(a,L,b,c,d)}catch(e){return tb(e),-1}},__reallyNegative:pc,_fwrite:nc,_malloc:Aa,_mkport:kc,_fprintf:rc,___setErrNo:bb,__formatString:qc,_fileno:mc,_fflush:r(),_write:lc,STACKTOP:x,STACK_MAX:Ha,tempDoublePtr:Za,ABORT:ja,NaN:NaN,Infinity:Infinity},Q),oc=s._strlen=$._strlen,tc=s._memcpy=$._memcpy;s._main=$._main;var sc=s._memset=$._memset;s.runPostSets=$.runPostSets;A.Ta=$.stackAlloc;
A.Va=$.stackSave;A.Ua=$.stackRestore;A.rc=$.setTempRet0;A.Zb=$.getTempRet0;function wc(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}wc.prototype=Error();var xc,yc=m,Wa=function zc(){!s.calledRun&&Ac&&Bc([].concat(s.arguments));s.calledRun||(Wa=zc)};
s.callMain=s.ye=function(a){function b(){for(var a=0;3>a;a++)d.push(0)}C(0==R,"cannot call main when async dependencies remain! (listen on __ATMAIN__)");C(0==La.length,"cannot call main when preRun functions remain to be called");a=a||[];Qa||(Qa=l,Ka(Ma));var c=a.length+1,d=[N(K("/bin/this.program"),"i8",0)];b();for(var e=0;e<c-1;e+=1)d.push(N(K(a[e]),"i8",0)),b();d.push(0);d=N(d,"i32",0);xc=x;try{var g=s._main(c,d,0);s.noExitRuntime||Cc(g)}catch(h){h instanceof wc||("SimulateInfiniteLoop"==h?s.noExitRuntime=
l:(h&&("object"===typeof h&&h.stack)&&s.S("exception thrown: "+[h,h.stack]),f(h)))}finally{}};
function Bc(a){function b(){if(!s.calledRun){s.calledRun=l;Qa||(Qa=l,Ka(Ma));Ka(Na);ba&&yc!==m&&s.S("pre-main prep time: "+(Date.now()-yc)+" ms");s._main&&Ac&&s.callMain(a);if(s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)Sa(s.postRun.shift());Ka(Pa)}}a=a||s.arguments;yc===m&&(yc=Date.now());if(0<R)s.S("run() called, but dependencies remain, so not running");else{if(s.preRun)for("function"==typeof s.preRun&&(s.preRun=[s.preRun]);s.preRun.length;)Ra(s.preRun.shift());
Ka(La);!(0<R)&&!s.calledRun&&(s.setStatus?(s.setStatus("Running..."),setTimeout(function(){setTimeout(function(){s.setStatus("")},1);ja||b()},1)):b())}}s.run=s.Ye=Bc;function Cc(a){ja=l;x=xc;Ka(Oa);f(new wc(a))}s.exit=s.Ce=Cc;function D(a){a&&(s.print(a),s.S(a));ja=l;f("abort() at "+Ca()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.")}s.abort=s.abort=D;if(s.preInit)for("function"==typeof s.preInit&&(s.preInit=[s.preInit]);0<s.preInit.length;)s.preInit.pop()();
var Ac=l;s.noInitialRun&&(Ac=n);Bc([].concat(s.arguments));