forked from kkHAIKE/fake115
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fec115.min.js
1 lines (1 loc) · 199 KB
/
fec115.min.js
1
var Module;if(!Module){Module=(typeof Module!=="undefined"?Module:null)||{}}var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module.print){Module.print=function print(a){process.stdout.write(a+"\n")}}if(!Module.printErr){Module.printErr=function printErr(a){process.stderr.write(a+"\n")}}var nodeFS=require("fs");var nodePath=require("path");Module.read=function read(a,c){a=nodePath.normalize(a);var b=nodeFS.readFileSync(a);if(!b&&a!=nodePath.resolve(a)){a=path.join(__dirname,"..","src",a);b=nodeFS.readFileSync(a)}if(b&&!c){b=b.toString()}return b};Module.readBinary=function readBinary(a){var b=Module.read(a,true);if(!b.buffer){b=new Uint8Array(b)}assert(b.buffer);return b};Module.load=function load(a){globalEval(read(a))};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(a){if(!(a instanceof ExitStatus)){throw a}});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 (jsc?)"}}Module.readBinary=function readBinary(b){if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(b))}var a=read(b,"binary");assert(typeof a==="object");return a};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(a){var b=new XMLHttpRequest();b.open("GET",a,false);b.send(null);return b.responseText};if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof console!=="undefined"){if(!Module.print){Module.print=function print(a){console.log(a)}}if(!Module.printErr){Module.printErr=function printErr(a){console.log(a)}}}else{var TRY_USE_DUMP=false;if(!Module.print){Module.print=(TRY_USE_DUMP&&(typeof(dump)!=="undefined")?(function(a){dump(a)}):(function(a){}))}}if(ENVIRONMENT_IS_WORKER){Module.load=importScripts}if(typeof Module.setWindowTitle==="undefined"){Module.setWindowTitle=function(a){document.title=a}}}else{throw"Unknown runtime environment. Where are we?"}}}function globalEval(x){eval.call(null,x)}if(!Module.load&&Module.read){Module.load=function load(a){globalEval(Module.read(a))}}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=Module.print;Module.printErr=Module.printErr;Module.preRun=[];Module.postRun=[];for(var key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}var Runtime={setTempRet0:function(a){tempRet0=a},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(a){STACKTOP=a},getNativeTypeSize: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:if(a[a.length-1]==="*"){return Runtime.QUANTUM_SIZE}else{if(a[0]==="i"){var b=parseInt(a.substr(1));assert(b%8===0);return b/8}else{return 0}}}},getNativeFieldSize:function(a){return Math.max(Runtime.getNativeTypeSize(a),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(b,a){if(a==="double"||a==="i64"){if(b&7){assert((b&7)===4);b+=4}}else{assert((b&3)===0)}return b},getAlignSize:function(c,b,a){if(!a&&(c=="i64"||c=="double")){return 8}if(!c){return Math.min(b,8)}return Math.min(b||(c?Runtime.getNativeFieldSize(c):0),Runtime.QUANTUM_SIZE)},dynCall:function(b,c,a){if(a&&a.length){assert(a.length==b.length-1);if(!a.splice){a=Array.prototype.slice.call(a)}a.splice(0,0,c);assert(("dynCall_"+b) in Module,"bad function pointer type - no table for sig '"+b+"'");return Module["dynCall_"+b].apply(null,a)}else{assert(b.length==1);assert(("dynCall_"+b) in Module,"bad function pointer type - no table for sig '"+b+"'");return Module["dynCall_"+b].call(null,c)}},functionPointers:[],addFunction:function(b){for(var a=0;a<Runtime.functionPointers.length;a++){if(!Runtime.functionPointers[a]){Runtime.functionPointers[a]=b;return 2*(1+a)}}throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."},removeFunction:function(a){Runtime.functionPointers[(a-2)/2]=null},warnOnce:function(a){if(!Runtime.warnOnce.shown){Runtime.warnOnce.shown={}}if(!Runtime.warnOnce.shown[a]){Runtime.warnOnce.shown[a]=1;Module.printErr(a)}},funcWrappers:{},getFuncWrapper:function(a,d){assert(d);if(!Runtime.funcWrappers[d]){Runtime.funcWrappers[d]={}}var b=Runtime.funcWrappers[d];if(!b[a]){b[a]=function c(){return Runtime.dynCall(d,a,arguments)}}return b[a]},getCompilerSetting:function(a){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work"},stackAlloc:function(b){var a=STACKTOP;STACKTOP=(STACKTOP+b)|0;STACKTOP=(((STACKTOP)+15)&-16);(assert((((STACKTOP|0)<(STACK_MAX|0))|0))|0);return a},staticAlloc:function(b){var a=STATICTOP;STATICTOP=(STATICTOP+(assert(!staticSealed),b))|0;STATICTOP=(((STATICTOP)+15)&-16);return a},dynamicAlloc:function(b){var a=DYNAMICTOP;DYNAMICTOP=(DYNAMICTOP+(assert(DYNAMICTOP>0),b))|0;DYNAMICTOP=(((DYNAMICTOP)+15)&-16);if(DYNAMICTOP>=TOTAL_MEMORY){var c=enlargeMemory();if(!c){DYNAMICTOP=a;return 0}}return a},alignMemory:function(b,c){var a=b=Math.ceil((b)/(c?c:16))*(c?c:16);return a},makeBigInt:function(a,d,c){var b=(c?((+((a>>>0)))+((+((d>>>0)))*4294967296)):((+((a>>>0)))+((+((d|0)))*4294967296)));return b},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var __THREW__=0;var ABORT=false;var EXITSTATUS=0;var undef=0;var tempValue,tempInt,tempBigInt,tempInt2,tempBigInt2,tempPair,tempBigIntI,tempBigIntR,tempBigIntS,tempBigIntP,tempBigIntD,tempDouble,tempFloat;var tempI64,tempI64b;var tempRet0,tempRet1,tempRet2,tempRet3,tempRet4,tempRet5,tempRet6,tempRet7,tempRet8,tempRet9;function assert(b,a){if(!b){abort("Assertion failed: "+a)}}var globalScope=this;function getCFunc(ident){var func=Module["_"+ident];if(!func){try{func=eval("_"+ident)}catch(e){}}assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)");return func}var cwrap,ccall;(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(arr){var ret=Runtime.stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret},stringToC:function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=Runtime.stackAlloc((str.length<<2)+1);writeStringToMemory(str,ret)}return ret}};var toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function ccallFunc(ident,returnType,argTypes,args,opts){var func=getCFunc(ident);var cArgs=[];var stack=0;assert(returnType!=="array",'Return type should not be "array".');if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0){stack=Runtime.stackSave()}cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func.apply(null,cArgs);if((!opts||!opts.async)&&typeof EmterpreterAsync==="object"){assert(!EmterpreterAsync.state,"cannot start async op with normal JS calling ccall")}if(opts&&opts.async){assert(!returnType,"async ccalls cannot return values")}if(returnType==="string"){ret=Pointer_stringify(ret)}if(stack!==0){if(opts&&opts.async){EmterpreterAsync.asyncFinalizers.push(function(){Runtime.stackRestore(stack)});return}Runtime.stackRestore(stack)}return ret};var sourceRegex=/^function\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;function parseJSFunc(jsfunc){var parsed=jsfunc.toString().match(sourceRegex).slice(1);return{arguments:parsed[0],body:parsed[1],returnValue:parsed[2]}}var JSsource={};for(var fun in JSfuncs){if(JSfuncs.hasOwnProperty(fun)){JSsource[fun]=parseJSFunc(JSfuncs[fun])}}cwrap=function cwrap(ident,returnType,argTypes){argTypes=argTypes||[];var cfunc=getCFunc(ident);var numericArgs=argTypes.every(function(type){return type==="number"});var numericRet=(returnType!=="string");if(numericRet&&numericArgs){return cfunc}var argNames=argTypes.map(function(x,i){return"$"+i});var funcstr="(function("+argNames.join(",")+") {";var nargs=argTypes.length;if(!numericArgs){funcstr+="var stack = "+JSsource.stackSave.body+";";for(var i=0;i<nargs;i++){var arg=argNames[i],type=argTypes[i];if(type==="number"){continue}var convertCode=JSsource[type+"ToC"];funcstr+="var "+convertCode.arguments+" = "+arg+";";funcstr+=convertCode.body+";";funcstr+=arg+"="+convertCode.returnValue+";"}}var cfuncname=parseJSFunc(function(){return cfunc}).returnValue;funcstr+="var ret = "+cfuncname+"("+argNames.join(",")+");";if(!numericRet){var strgfy=parseJSFunc(function(){return Pointer_stringify}).returnValue;funcstr+="ret = "+strgfy+"(ret);"}funcstr+="if (typeof EmterpreterAsync === 'object') { assert(!EmterpreterAsync.state, 'cannot start async op with normal JS calling cwrap') }";if(!numericArgs){funcstr+=JSsource.stackRestore.body.replace("()","(stack)")+";"}funcstr+="return ret})";return eval(funcstr)}})();Module.ccall=ccall;Module.cwrap=cwrap;function setValue(d,c,b,a){b=b||"i8";if(b.charAt(b.length-1)==="*"){b="i32"}switch(b){case"i1":HEAP8[((d)>>0)]=c;break;case"i8":HEAP8[((d)>>0)]=c;break;case"i16":HEAP16[((d)>>1)]=c;break;case"i32":HEAP32[((d)>>2)]=c;break;case"i64":(tempI64=[c>>>0,(tempDouble=c,(+(Math_abs(tempDouble)))>=1?(tempDouble>0?((Math_min((+(Math_floor((tempDouble)/4294967296))),4294967295))|0)>>>0:(~~((+(Math_ceil((tempDouble-+(((~~(tempDouble)))>>>0))/4294967296)))))>>>0):0)],HEAP32[((d)>>2)]=tempI64[0],HEAP32[(((d)+(4))>>2)]=tempI64[1]);break;case"float":HEAPF32[((d)>>2)]=c;break;case"double":HEAPF64[((d)>>3)]=c;break;default:abort("invalid type for setValue: "+b)}}Module.setValue=setValue;function getValue(c,b,a){b=b||"i8";if(b.charAt(b.length-1)==="*"){b="i32"}switch(b){case"i1":return HEAP8[((c)>>0)];case"i8":return HEAP8[((c)>>0)];case"i16":return HEAP16[((c)>>1)];case"i32":return HEAP32[((c)>>2)];case"i64":return HEAP32[((c)>>2)];case"float":return HEAPF32[((c)>>2)];case"double":return HEAPF64[((c)>>3)];default:abort("invalid type for setValue: "+b)}return null}Module.getValue=getValue;var ALLOC_NORMAL=0;var ALLOC_STACK=1;var ALLOC_STATIC=2;var ALLOC_DYNAMIC=3;var ALLOC_NONE=4;Module.ALLOC_NORMAL=ALLOC_NORMAL;Module.ALLOC_STACK=ALLOC_STACK;Module.ALLOC_STATIC=ALLOC_STATIC;Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC;Module.ALLOC_NONE=ALLOC_NONE;function allocate(g,h,b,a){var e,o;if(typeof g==="number"){e=true;o=g}else{e=false;o=g.length}var d=typeof h==="string"?h:null;var j;if(b==ALLOC_NONE){j=a}else{j=[_malloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][b===undefined?ALLOC_STATIC:b](Math.max(o,d?1:h.length))}if(e){var a=j,m;assert((j&3)==0);m=j+(o&~3);for(;a<m;a+=4){HEAP32[((a)>>2)]=0}m=j+o;while(a<m){HEAP8[((a++)>>0)]=0}return j}if(d==="i8"){if(g.subarray||g.slice){HEAPU8.set(g,j)}else{HEAPU8.set(new Uint8Array(g),j)}return j}var f=0,l,k,c;while(f<o){var n=g[f];if(typeof n==="function"){n=Runtime.getFunctionIndex(n)}l=d||h[f];if(l===0){f++;continue}assert(l,"Must know what type to store in allocate!");if(l=="i64"){l="i32"}setValue(j+f,n,l);if(c!==l){k=Runtime.getNativeTypeSize(l);c=l}f+=k}return j}Module.allocate=allocate;function getMemory(a){if(!staticSealed){return Runtime.staticAlloc(a)}if((typeof _sbrk!=="undefined"&&!_sbrk.called)||!runtimeInitialized){return Runtime.dynamicAlloc(a)}return _malloc(a)}Module.getMemory=getMemory;function Pointer_stringify(h,f){if(f===0||!h){return""}var a=0;var e;var d=0;while(1){assert(h+d<TOTAL_MEMORY);e=HEAPU8[(((h)+(d))>>0)];a|=e;if(e==0&&!f){break}d++;if(f&&d==f){break}}if(!f){f=d}var b="";if(a<128){var c=1024;var g;while(f>0){g=String.fromCharCode.apply(String,HEAPU8.subarray(h,h+Math.min(f,c)));b=b?b+g:g;h+=c;f-=c}return b}return Module.UTF8ToString(h)}Module.Pointer_stringify=Pointer_stringify;function AsciiToString(c){var b="";while(1){var a=HEAP8[((c++)>>0)];if(!a){return b}b+=String.fromCharCode(a)}}Module.AsciiToString=AsciiToString;function stringToAscii(b,a){return writeAsciiToMemory(b,a,false)}Module.stringToAscii=stringToAscii;function UTF8ArrayToString(c,i){var g,f,e,d,b,j;var h="";while(1){g=c[i++];if(!g){return h}if(!(g&128)){h+=String.fromCharCode(g);continue}f=c[i++]&63;if((g&224)==192){h+=String.fromCharCode(((g&31)<<6)|f);continue}e=c[i++]&63;if((g&240)==224){g=((g&15)<<12)|(f<<6)|e}else{d=c[i++]&63;if((g&248)==240){g=((g&7)<<18)|(f<<12)|(e<<6)|d}else{b=c[i++]&63;if((g&252)==248){g=((g&3)<<24)|(f<<18)|(e<<12)|(d<<6)|b}else{j=c[i++]&63;g=((g&1)<<30)|(f<<24)|(e<<18)|(d<<12)|(b<<6)|j}}}if(g<65536){h+=String.fromCharCode(g)}else{var a=g-65536;h+=String.fromCharCode(55296|(a>>10),56320|(a&1023))}}}Module.UTF8ArrayToString=UTF8ArrayToString;function UTF8ToString(a){return UTF8ArrayToString(HEAPU8,a)}Module.UTF8ToString=UTF8ToString;function stringToUTF8Array(f,b,h,g){if(!(g>0)){return 0}var e=h;var d=h+g-1;for(var c=0;c<f.length;++c){var a=f.charCodeAt(c);if(a>=55296&&a<=57343){a=65536+((a&1023)<<10)|(f.charCodeAt(++c)&1023)}if(a<=127){if(h>=d){break}b[h++]=a}else{if(a<=2047){if(h+1>=d){break}b[h++]=192|(a>>6);b[h++]=128|(a&63)}else{if(a<=65535){if(h+2>=d){break}b[h++]=224|(a>>12);b[h++]=128|((a>>6)&63);b[h++]=128|(a&63)}else{if(a<=2097151){if(h+3>=d){break}b[h++]=240|(a>>18);b[h++]=128|((a>>12)&63);b[h++]=128|((a>>6)&63);b[h++]=128|(a&63)}else{if(a<=67108863){if(h+4>=d){break}b[h++]=248|(a>>24);b[h++]=128|((a>>18)&63);b[h++]=128|((a>>12)&63);b[h++]=128|((a>>6)&63);b[h++]=128|(a&63)}else{if(h+5>=d){break}b[h++]=252|(a>>30);b[h++]=128|((a>>24)&63);b[h++]=128|((a>>18)&63);b[h++]=128|((a>>12)&63);b[h++]=128|((a>>6)&63);b[h++]=128|(a&63)}}}}}}b[h]=0;return h-e}Module.stringToUTF8Array=stringToUTF8Array;function stringToUTF8(b,a,c){assert(typeof c=="number","stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");return stringToUTF8Array(b,HEAPU8,a,c)}Module.stringToUTF8=stringToUTF8;function lengthBytesUTF8(d){var a=0;for(var c=0;c<d.length;++c){var b=d.charCodeAt(c);if(b>=55296&&b<=57343){b=65536+((b&1023)<<10)|(d.charCodeAt(++c)&1023)}if(b<=127){++a}else{if(b<=2047){a+=2}else{if(b<=65535){a+=3}else{if(b<=2097151){a+=4}else{if(b<=67108863){a+=5}else{a+=6}}}}}}return a}Module.lengthBytesUTF8=lengthBytesUTF8;function UTF16ToString(d){var a=0;var c="";while(1){var b=HEAP16[(((d)+(a*2))>>1)];if(b==0){return c}++a;c+=String.fromCharCode(b)}}Module.UTF16ToString=UTF16ToString;function stringToUTF16(f,e,g){assert(typeof g=="number","stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");if(g===undefined){g=2147483647}if(g<2){return 0}g-=2;var b=e;var a=(g<f.length*2)?(g/2):f.length;for(var c=0;c<a;++c){var d=f.charCodeAt(c);HEAP16[((e)>>1)]=d;e+=2}HEAP16[((e)>>1)]=0;return e-b}Module.stringToUTF16=stringToUTF16;function lengthBytesUTF16(a){return a.length*2}Module.lengthBytesUTF16=lengthBytesUTF16;function UTF32ToString(e){var a=0;var d="";while(1){var c=HEAP32[(((e)+(a*4))>>2)];if(c==0){return d}++a;if(c>=65536){var b=c-65536;d+=String.fromCharCode(55296|(b>>10),56320|(b&1023))}else{d+=String.fromCharCode(c)}}}Module.UTF32ToString=UTF32ToString;function stringToUTF32(g,f,h){assert(typeof h=="number","stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");if(h===undefined){h=2147483647}if(h<4){return 0}var b=f;var a=b+h-4;for(var c=0;c<g.length;++c){var d=g.charCodeAt(c);if(d>=55296&&d<=57343){var e=g.charCodeAt(++c);d=65536+((d&1023)<<10)|(e&1023)}HEAP32[((f)>>2)]=d;f+=4;if(f+4>a){break}}HEAP32[((f)>>2)]=0;return f-b}Module.stringToUTF32=stringToUTF32;function lengthBytesUTF32(d){var a=0;for(var b=0;b<d.length;++b){var c=d.charCodeAt(b);if(c>=55296&&c<=57343){++b}a+=4}return a}Module.lengthBytesUTF32=lengthBytesUTF32;function demangle(c){var a=!!Module.___cxa_demangle;if(a){try{var b=_malloc(c.length);writeStringToMemory(c.substr(1),b);var h=_malloc(4);var n=Module.___cxa_demangle(b,0,0,h);if(getValue(h,"i32")===0&&n){return Pointer_stringify(n)}}catch(m){}finally{if(b){_free(b)}if(h){_free(h)}if(n){_free(n)}}}var j=3;var 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:"..."};var g=[];var k=true;function l(e){if(e){Module.print(e)}Module.print(c);var q="";for(var i=0;i<j;i++){q+=" "}Module.print(q+"^")}function p(){j++;if(c[j]==="K"){j++}var t=[];while(c[j]!=="E"){if(c[j]==="S"){j++;var q=c.indexOf("_",j);var e=c.substring(j,q)||0;t.push(g[e]||"?");j=q+1;continue}if(c[j]==="C"){t.push(t[t.length-1]);j+=2;continue}var i=parseInt(c.substr(j));var s=i.toString().length;if(!i||!s){j--;break}var r=c.substr(j+s,i);t.push(r);g.push(r);j+=s+i}j++;return t}function f(i,u,y){u=u||Infinity;var w="",v=[];function t(){return"("+v.join(", ")+")"}var e;if(c[j]==="N"){e=p().join("::");u--;if(u===0){return i?[e]:e}}else{if(c[j]==="K"||(k&&c[j]==="L")){j++}var A=parseInt(c.substr(j));if(A){var r=A.toString().length;e=c.substr(j+r,A);j+=r+A}}k=false;if(c[j]==="I"){j++;var z=f(true);var q=f(true,1,true);w+=q[0]+" "+e+"<"+z.join(", ")+">"}else{w=e}paramLoop:while(j<c.length&&u-->0){var x=c[j++];if(x in d){v.push(d[x])}else{switch(x){case"P":v.push(f(true,1,true)[0]+"*");break;case"R":v.push(f(true,1,true)[0]+"&");break;case"L":j++;var s=c.indexOf("E",j);var A=s-j;v.push(c.substr(j,A));j+=A+2;break;case"A":var A=parseInt(c.substr(j));j+=A.toString().length;if(c[j]!=="_"){throw"?"}j++;v.push(f(true,1,true)[0]+" ["+A+"]");break;case"E":break paramLoop;default:w+="?"+x;break paramLoop}}}if(!y&&v.length===1&&v[0]==="void"){v=[]}if(i){if(w){v.push(w+"?")}return v}else{return w+t()}}var o=c;try{if(c=="Object._main"||c=="_main"){return"main()"}if(typeof c==="number"){c=Pointer_stringify(c)}if(c[0]!=="_"){return c}if(c[1]!=="_"){return c}if(c[2]!=="Z"){return c}switch(c[3]){case"n":return"operator new()";case"d":return"operator delete()"}o=f()}catch(m){o+="?"}if(o.indexOf("?")>=0&&!a){Runtime.warnOnce("warning: a problem occurred in builtin C++ name demangling; build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling")}return o}function demangleAll(a){return a.replace(/__Z[\w\d_]+/g,function(b){var c=demangle(b);return b===c?b:(b+" ["+c+"]")})}function jsStackTrace(){var a=new Error();if(!a.stack){try{throw new Error(0)}catch(b){a=b}if(!a.stack){return"(no stack trace available)"}}return a.stack.toString()}function stackTrace(){return demangleAll(jsStackTrace())}Module.stackTrace=stackTrace;var PAGE_SIZE=4096;function alignMemoryPage(a){if(a%4096>0){a+=(4096-(a%4096))}return a}var HEAP;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;var STATIC_BASE=0,STATICTOP=0,staticSealed=false;var STACK_BASE=0,STACKTOP=0,STACK_MAX=0;var DYNAMIC_BASE=0,DYNAMICTOP=0;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which adjusts the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880;var TOTAL_MEMORY=Module.TOTAL_MEMORY||16777216;var totalMemory=64*1024;while(totalMemory<TOTAL_MEMORY||totalMemory<2*TOTAL_STACK){if(totalMemory<16*1024*1024){totalMemory*=2}else{totalMemory+=16*1024*1024}}if(totalMemory!==TOTAL_MEMORY){Module.printErr("increasing TOTAL_MEMORY to "+totalMemory+" to be compliant with the asm.js spec (and given that TOTAL_STACK="+TOTAL_STACK+")");TOTAL_MEMORY=totalMemory}assert(typeof Int32Array!=="undefined"&&typeof Float64Array!=="undefined"&&!!(new Int32Array(1)["subarray"])&&!!(new Int32Array(1)["set"]),"JS engine does not provide full typed array support");var buffer;buffer=new ArrayBuffer(TOTAL_MEMORY);HEAP8=new Int8Array(buffer);HEAP16=new Int16Array(buffer);HEAP32=new Int32Array(buffer);HEAPU8=new Uint8Array(buffer);HEAPU16=new Uint16Array(buffer);HEAPU32=new Uint32Array(buffer);HEAPF32=new Float32Array(buffer);HEAPF64=new Float64Array(buffer);HEAP32[0]=255;assert(HEAPU8[0]===255&&HEAPU8[3]===0,"Typed arrays 2 must be run on a little-endian system");Module.HEAP=HEAP;Module.buffer=buffer;Module.HEAP8=HEAP8;Module.HEAP16=HEAP16;Module.HEAP32=HEAP32;Module.HEAPU8=HEAPU8;Module.HEAPU16=HEAPU16;Module.HEAPU32=HEAPU32;Module.HEAPF32=HEAPF32;Module.HEAPF64=HEAPF64;function callRuntimeCallbacks(b){while(b.length>0){var c=b.shift();if(typeof c=="function"){c();continue}var a=c.func;if(typeof a==="number"){if(c.arg===undefined){Runtime.dynCall("v",a)}else{Runtime.dynCall("vi",a,[c.arg])}}else{a(c.arg===undefined?null:c.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module.preRun){if(typeof Module.preRun=="function"){Module.preRun=[Module.preRun]}while(Module.preRun.length){addOnPreRun(Module.preRun.shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized){return}runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);runtimeExited=true}function postRun(){if(Module.postRun){if(typeof Module.postRun=="function"){Module.postRun=[Module.postRun]}while(Module.postRun.length){addOnPostRun(Module.postRun.shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(a){__ATPRERUN__.unshift(a)}Module.addOnPreRun=addOnPreRun;function addOnInit(a){__ATINIT__.unshift(a)}Module.addOnInit=addOnInit;function addOnPreMain(a){__ATMAIN__.unshift(a)}Module.addOnPreMain=addOnPreMain;function addOnExit(a){__ATEXIT__.unshift(a)}Module.addOnExit=addOnExit;function addOnPostRun(a){__ATPOSTRUN__.unshift(a)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(d,f,e){var b=e>0?e:lengthBytesUTF8(d)+1;var a=new Array(b);var c=stringToUTF8Array(d,a,0,a.length);if(f){a.length=c}return a}Module.intArrayFromString=intArrayFromString;function intArrayToString(d){var a=[];for(var b=0;b<d.length;b++){var c=d[b];if(c>255){assert(false,"Character code "+c+" ("+String.fromCharCode(c)+") at offset "+b+" not in 0x00-0xFF.");c&=255}a.push(String.fromCharCode(c))}return a.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(b,a,e){var f=intArrayFromString(b,e);var c=0;while(c<f.length){var d=f[c];HEAP8[(((a)+(c))>>0)]=d;c=c+1}}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(c,a){for(var b=0;b<c.length;b++){HEAP8[((a++)>>0)]=c[b]}}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(d,a,c){for(var b=0;b<d.length;++b){assert(d.charCodeAt(b)===d.charCodeAt(b)&255);HEAP8[((a++)>>0)]=d.charCodeAt(b)}if(!c){HEAP8[((a)>>0)]=0}}Module.writeAsciiToMemory=writeAsciiToMemory;function unSign(b,a,c){if(b>=0){return b}return a<=32?2*Math.abs(1<<(a-1))+b:Math.pow(2,a)+b}function reSign(c,b,d){if(c<=0){return c}var a=b<=32?Math.abs(1<<(b-1)):Math.pow(2,b-1);if(c>=a&&(b<=32||c>a)){c=-2*a+c}return c}if(!Math.imul||Math.imul(4294967295,5)!==-5){Math.imul=function imul(e,c){var d=e>>>16;var g=e&65535;var f=c>>>16;var h=c&65535;return(g*h+((d*h+g*f)<<16))|0}}Math.imul=Math.imul;if(!Math.clz32){Math.clz32=function(a){a=a>>>0;for(var b=0;b<32;b++){if(a&(1<<(31-b))){return b}}return 32}}Math.clz32=Math.clz32;var Math_abs=Math.abs;var Math_cos=Math.cos;var Math_sin=Math.sin;var Math_tan=Math.tan;var Math_acos=Math.acos;var Math_asin=Math.asin;var Math_atan=Math.atan;var Math_atan2=Math.atan2;var Math_exp=Math.exp;var Math_log=Math.log;var Math_sqrt=Math.sqrt;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_pow=Math.pow;var Math_imul=Math.imul;var Math_fround=Math.fround;var Math_min=Math.min;var Math_clz32=Math.clz32;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;var runDependencyTracking={};function getUniqueRunDependency(b){var a=b;while(1){if(!runDependencyTracking[b]){return b}b=a+Math.random()}return b}function addRunDependency(a){runDependencies++;if(Module.monitorRunDependencies){Module.monitorRunDependencies(runDependencies)}if(a){assert(!runDependencyTracking[a]);runDependencyTracking[a]=1;if(runDependencyWatcher===null&&typeof setInterval!=="undefined"){runDependencyWatcher=setInterval(function(){if(ABORT){clearInterval(runDependencyWatcher);runDependencyWatcher=null;return}var b=false;for(var c in runDependencyTracking){if(!b){b=true;Module.printErr("still waiting on run dependencies:")}Module.printErr("dependency: "+c)}if(b){Module.printErr("(end of list)")}},10000)}}else{Module.printErr("warning: run dependency added without ID")}}Module.addRunDependency=addRunDependency;function removeRunDependency(b){runDependencies--;if(Module.monitorRunDependencies){Module.monitorRunDependencies(runDependencies)}if(b){assert(runDependencyTracking[b]);delete runDependencyTracking[b]}else{Module.printErr("warning: run dependency removed without ID")}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var a=dependenciesFulfilled;dependenciesFulfilled=null;a()}}}Module.removeRunDependency=removeRunDependency;Module.preloadedImages={};Module.preloadedAudios={};var memoryInitializer=null;var ASM_CONSTS=[];STATIC_BASE=8;STATICTOP=STATIC_BASE+69264;__ATINIT__.push();allocate([],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);allocate([97,10,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,4,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,148,10,1,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+1028);allocate([112,32,33,61,32,78,85,76,76,32,38,38,32,112,45,62,109,97,103,105,99,32,61,61,32,40,40,40,70,69,67,95,77,65,71,73,67,32,94,32,112,45,62,107,41,32,94,32,112,45,62,110,41,32,94,32,40,117,110,115,105,103,110,101,100,32,108,111,110,103,41,32,40,112,45,62,101,110,99,95,109,97,116,114,105,120,41,41,0,102,101,99,46,99,0,102,101,99,95,102,114,101,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,102,101,99,110,117,109,32,62,61,32,99,111,100,101,45,62,107,0,102,101,99,95,101,110,99,111,100,101,0,40,105,110,100,101,120,91,114,111,119,93,32,62,61,32,99,111,100,101,45,62,107,41,32,124,124,32,40,105,110,100,101,120,91,114,111,119,93,32,61,61,32,114,111,119,41,0,102,101,99,95,100,101,99,111,100,101,0,49,48,49,49,49,48,48,48,49,0,105,112,105,118,91,105,120,93,32,60,61,32,49,0,95,105,110,118,101,114,116,95,109,97,116,0,99,32,33,61,32,48],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+67484);var tempDoublePtr=Runtime.alignMemory(allocate(12,"i8",ALLOC_STATIC),8);assert(tempDoublePtr%8==0);function copyTempFloat(a){HEAP8[tempDoublePtr]=HEAP8[a];HEAP8[tempDoublePtr+1]=HEAP8[a+1];HEAP8[tempDoublePtr+2]=HEAP8[a+2];HEAP8[tempDoublePtr+3]=HEAP8[a+3]}function copyTempDouble(a){HEAP8[tempDoublePtr]=HEAP8[a];HEAP8[tempDoublePtr+1]=HEAP8[a+1];HEAP8[tempDoublePtr+2]=HEAP8[a+2];HEAP8[tempDoublePtr+3]=HEAP8[a+3];HEAP8[tempDoublePtr+4]=HEAP8[a+4];HEAP8[tempDoublePtr+5]=HEAP8[a+5];HEAP8[tempDoublePtr+6]=HEAP8[a+6];HEAP8[tempDoublePtr+7]=HEAP8[a+7]}function ___setErrNo(a){if(Module.___errno_location){HEAP32[((Module.___errno_location())>>2)]=a}else{Module.printErr("failed to set errno from JS")}return a}var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _sysconf(a){switch(a){case 30:return PAGE_SIZE;case 85:return totalMemory/PAGE_SIZE;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 79:return 0;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return -1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1000;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:if(typeof navigator==="object"){return navigator.hardwareConcurrency||1}return 1}___setErrNo(ERRNO_CODES.EINVAL);return -1}Module._memset=_memset;function _pthread_cleanup_push(b,a){__ATEXIT__.push(function(){Runtime.dynCall("vi",b,[a])});_pthread_cleanup_push.level=__ATEXIT__.length}function _pthread_cleanup_pop(){assert(_pthread_cleanup_push.level==__ATEXIT__.length,"cannot pop if something else added meanwhile!");__ATEXIT__.pop();_pthread_cleanup_push.level=__ATEXIT__.length}function _abort(){Module.abort()}function ___lock(){}function ___unlock(){}var ERRNO_MESSAGES={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"};var PATH={splitPath:function(a){var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return b.exec(a).slice(1)},normalizeArray:function(e,b){var a=0;for(var c=e.length-1;c>=0;c--){var d=e[c];if(d==="."){e.splice(c,1)}else{if(d===".."){e.splice(c,1);a++}else{if(a){e.splice(c,1);a--}}}}if(b){for(;a--;a){e.unshift("..")}}return e},normalize:function(c){var b=c.charAt(0)==="/",a=c.substr(-1)==="/";c=PATH.normalizeArray(c.split("/").filter(function(d){return !!d}),!b).join("/");if(!c&&!b){c="."}if(c&&a){c+="/"}return(b?"/":"")+c},dirname:function(d){var a=PATH.splitPath(d),b=a[0],c=a[1];if(!b&&!c){return"."}if(c){c=c.substr(0,c.length-1)}return b+c},basename:function(b){if(b==="/"){return"/"}var a=b.lastIndexOf("/");if(a===-1){return b}return b.substr(a+1)},extname:function(a){return PATH.splitPath(a)[3]},join:function(){var a=Array.prototype.slice.call(arguments,0);return PATH.normalize(a.join("/"))},join2:function(a,b){return PATH.normalize(a+"/"+b)},resolve:function(){var c="",a=false;for(var b=arguments.length-1;b>=-1&&!a;b--){var d=(b>=0)?arguments[b]:FS.cwd();if(typeof d!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else{if(!d){return""}}c=d+"/"+c;a=d.charAt(0)==="/"}c=PATH.normalizeArray(c.split("/").filter(function(e){return !!e}),!a).join("/");return((a?"/":"")+c)||"."},relative:function(g,h){g=PATH.resolve(g).substr(1);h=PATH.resolve(h).substr(1);function c(i){var l=0;for(;l<i.length;l++){if(i[l]!==""){break}}var k=i.length-1;for(;k>=0;k--){if(i[k]!==""){break}}if(l>k){return[]}return i.slice(l,k-l+1)}var f=c(g.split("/"));var b=c(h.split("/"));var a=Math.min(f.length,b.length);var j=a;for(var e=0;e<a;e++){if(f[e]!==b[e]){j=e;break}}var d=[];for(var e=j;e<f.length;e++){d.push("..")}d=d.concat(b.slice(j));return d.join("/")}};var TTY={ttys:[],init:function(){},shutdown:function(){},register:function(a,b){TTY.ttys[a]={input:[],output:[],ops:b};FS.registerDevice(a,TTY.stream_ops)},stream_ops:{open:function(b){var a=TTY.ttys[b.node.rdev];if(!a){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}b.tty=a;b.seekable=false},close:function(a){a.tty.ops.flush(a.tty)},flush:function(a){a.tty.ops.flush(a.tty)},read:function(j,d,c,b,h){if(!j.tty||!j.tty.ops.get_char){throw new FS.ErrnoError(ERRNO_CODES.ENXIO)}var a=0;for(var f=0;f<b;f++){var k;try{k=j.tty.ops.get_char(j.tty)}catch(g){throw new FS.ErrnoError(ERRNO_CODES.EIO)}if(k===undefined&&a===0){throw new FS.ErrnoError(ERRNO_CODES.EAGAIN)}if(k===null||k===undefined){break}a++;d[c+f]=k}if(a){j.node.timestamp=Date.now()}return a},write:function(g,a,f,c,h){if(!g.tty||!g.tty.ops.put_char){throw new FS.ErrnoError(ERRNO_CODES.ENXIO)}for(var b=0;b<c;b++){try{g.tty.ops.put_char(g.tty,a[f+b])}catch(d){throw new FS.ErrnoError(ERRNO_CODES.EIO)}}if(c){g.node.timestamp=Date.now()}return b}},default_tty_ops:{get_char:function(i){if(!i.input.length){var a=null;if(ENVIRONMENT_IS_NODE){var f=256;var b=new Buffer(f);var h=0;var d=process.stdin.fd;var c=false;try{d=fs.openSync("/dev/stdin","r");c=true}catch(g){}h=fs.readSync(d,b,0,f,null);if(c){fs.closeSync(d)}if(h>0){a=b.slice(0,h).toString("utf-8")}else{a=null}}else{if(typeof window!="undefined"&&typeof window.prompt=="function"){a=window.prompt("Input: ");if(a!==null){a+="\n"}}else{if(typeof readline=="function"){a=readline();if(a!==null){a+="\n"}}}}if(!a){return null}i.input=intArrayFromString(a,true)}return i.input.shift()},put_char:function(b,a){if(a===null||a===10){Module.print(UTF8ArrayToString(b.output,0));b.output=[]}else{if(a!=0){b.output.push(a)}}},flush:function(a){if(a.output&&a.output.length>0){Module.print(UTF8ArrayToString(a.output,0));a.output=[]}}},default_tty1_ops:{put_char:function(b,a){if(a===null||a===10){Module.printErr(UTF8ArrayToString(b.output,0));b.output=[]}else{if(a!=0){b.output.push(a)}}},flush:function(a){if(a.output&&a.output.length>0){Module.printErr(UTF8ArrayToString(a.output,0));a.output=[]}}}};var MEMFS={ops_table:null,mount:function(a){return MEMFS.createNode(null,"/",16384|511,0)},createNode:function(c,b,e,a){if(FS.isBlkdev(e)||FS.isFIFO(e)){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var d=FS.createNode(c,b,e,a);if(FS.isDir(d.mode)){d.node_ops=MEMFS.ops_table.dir.node;d.stream_ops=MEMFS.ops_table.dir.stream;d.contents={}}else{if(FS.isFile(d.mode)){d.node_ops=MEMFS.ops_table.file.node;d.stream_ops=MEMFS.ops_table.file.stream;d.usedBytes=0;d.contents=null}else{if(FS.isLink(d.mode)){d.node_ops=MEMFS.ops_table.link.node;d.stream_ops=MEMFS.ops_table.link.stream}else{if(FS.isChrdev(d.mode)){d.node_ops=MEMFS.ops_table.chrdev.node;d.stream_ops=MEMFS.ops_table.chrdev.stream}}}}d.timestamp=Date.now();if(c){c.contents[b]=d}return d},getFileDataAsRegularArray:function(c){if(c.contents&&c.contents.subarray){var a=[];for(var b=0;b<c.usedBytes;++b){a.push(c.contents[b])}return a}return c.contents},getFileDataAsTypedArray:function(a){if(!a.contents){return new Uint8Array}if(a.contents.subarray){return a.contents.subarray(0,a.usedBytes)}return new Uint8Array(a.contents)},expandFileStorage:function(b,d){if(b.contents&&b.contents.subarray&&d>b.contents.length){b.contents=MEMFS.getFileDataAsRegularArray(b);b.usedBytes=b.contents.length}if(!b.contents||b.contents.subarray){var e=b.contents?b.contents.buffer.byteLength:0;if(e>=d){return}var c=1024*1024;d=Math.max(d,(e*(e<c?2:1.125))|0);if(e!=0){d=Math.max(d,256)}var a=b.contents;b.contents=new Uint8Array(d);if(b.usedBytes>0){b.contents.set(a.subarray(0,b.usedBytes),0)}return}if(!b.contents&&d>0){b.contents=[]}while(b.contents.length<d){b.contents.push(0)}},resizeFileStorage:function(c,b){if(c.usedBytes==b){return}if(b==0){c.contents=null;c.usedBytes=0;return}if(!c.contents||c.contents.subarray){var a=c.contents;c.contents=new Uint8Array(new ArrayBuffer(b));if(a){c.contents.set(a.subarray(0,Math.min(b,c.usedBytes)))}c.usedBytes=b;return}if(!c.contents){c.contents=[]}if(c.contents.length>b){c.contents.length=b}else{while(c.contents.length<b){c.contents.push(0)}}c.usedBytes=b},node_ops:{getattr:function(b){var a={};a.dev=FS.isChrdev(b.mode)?b.id:1;a.ino=b.id;a.mode=b.mode;a.nlink=1;a.uid=0;a.gid=0;a.rdev=b.rdev;if(FS.isDir(b.mode)){a.size=4096}else{if(FS.isFile(b.mode)){a.size=b.usedBytes}else{if(FS.isLink(b.mode)){a.size=b.link.length}else{a.size=0}}}a.atime=new Date(b.timestamp);a.mtime=new Date(b.timestamp);a.ctime=new Date(b.timestamp);a.blksize=4096;a.blocks=Math.ceil(a.size/a.blksize);return a},setattr:function(b,a){if(a.mode!==undefined){b.mode=a.mode}if(a.timestamp!==undefined){b.timestamp=a.timestamp}if(a.size!==undefined){MEMFS.resizeFileStorage(b,a.size)}},lookup:function(b,a){throw FS.genericErrors[ERRNO_CODES.ENOENT]},mknod:function(c,b,d,a){return MEMFS.createNode(c,b,d,a)},rename:function(c,b,d){if(FS.isDir(c.mode)){var g;try{g=FS.lookupNode(b,d)}catch(f){}if(g){for(var a in g.contents){throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY)}}}delete c.parent.contents[c.name];c.name=d;b.contents[d]=c;c.parent=b},unlink:function(b,a){delete b.contents[a]},rmdir:function(c,a){var d=FS.lookupNode(c,a);for(var b in d.contents){throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY)}delete c.contents[a]},readdir:function(c){var a=[".",".."];for(var b in c.contents){if(!c.contents.hasOwnProperty(b)){continue}a.push(b)}return a},symlink:function(c,b,a){var d=MEMFS.createNode(c,b,511|40960,0);d.link=a;return d},readlink:function(a){if(!FS.isLink(a.mode)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}return a.link}},stream_ops:{read:function(h,b,g,f,a){var e=h.node.contents;if(a>=h.node.usedBytes){return 0}var d=Math.min(h.node.usedBytes-a,f);assert(d>=0);if(d>8&&e.subarray){b.set(e.subarray(a,a+d),g)}else{for(var c=0;c<d;c++){b[g+c]=e[a+c]}}return d},write:function(g,b,f,e,a,h){if(!e){return 0}var d=g.node;d.timestamp=Date.now();if(b.subarray&&(!d.contents||d.contents.subarray)){if(h){assert(a===0,"canOwn must imply no weird position inside the file");d.contents=b.subarray(f,f+e);d.usedBytes=e;return e}else{if(d.usedBytes===0&&a===0){d.contents=new Uint8Array(b.subarray(f,f+e));d.usedBytes=e;return e}else{if(a+e<=d.usedBytes){d.contents.set(b.subarray(f,f+e),a);return e}}}}MEMFS.expandFileStorage(d,a+e);if(d.contents.subarray&&b.subarray){d.contents.set(b.subarray(f,f+e),a)}else{for(var c=0;c<e;c++){d.contents[a+c]=b[f+c]}}d.usedBytes=Math.max(d.usedBytes,a+e);return e},llseek:function(d,c,b){var a=c;if(b===1){a+=d.position}else{if(b===2){if(FS.isFile(d.node.mode)){a+=d.node.usedBytes}}}if(a<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}return a},allocate:function(c,b,a){MEMFS.expandFileStorage(c.node,b+a);c.node.usedBytes=Math.max(c.node.usedBytes,b+a)},mmap:function(i,g,f,c,h,j,d){if(!FS.isFile(i.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}var a;var b;var e=i.node.contents;if(!(d&2)&&(e.buffer===g||e.buffer===g.buffer)){b=false;a=e.byteOffset}else{if(h>0||h+c<i.node.usedBytes){if(e.subarray){e=e.subarray(h,h+c)}else{e=Array.prototype.slice.call(e,h,h+c)}}b=true;a=_malloc(c);if(!a){throw new FS.ErrnoError(ERRNO_CODES.ENOMEM)}g.set(e,a)}return{ptr:a,allocated:b}},msync:function(f,b,e,d,a){if(!FS.isFile(f.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}if(a&2){return 0}var c=MEMFS.stream_ops.write(f,b,0,d,e,false);return 0}}};var IDBFS={dbs:{},indexedDB:function(){if(typeof indexedDB!=="undefined"){return indexedDB}var a=null;if(typeof window==="object"){a=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB}assert(a,"IDBFS used, but indexedDB not supported");return a},DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(a){return MEMFS.mount.apply(null,arguments)},syncfs:function(a,b,c){IDBFS.getLocalSet(a,function(e,d){if(e){return c(e)}IDBFS.getRemoteSet(a,function(f,g){if(f){return c(f)}var h=b?g:d;var i=b?d:g;IDBFS.reconcile(h,i,c)})})},getDB:function(b,f){var a=IDBFS.dbs[b];if(a){return f(null,a)}var c;try{c=IDBFS.indexedDB().open(b,IDBFS.DB_VERSION)}catch(d){return f(d)}c.onupgradeneeded=function(i){var g=i.target.result;var j=i.target.transaction;var h;if(g.objectStoreNames.contains(IDBFS.DB_STORE_NAME)){h=j.objectStore(IDBFS.DB_STORE_NAME)}else{h=g.createObjectStore(IDBFS.DB_STORE_NAME)}if(!h.indexNames.contains("timestamp")){h.createIndex("timestamp","timestamp",{unique:false})}};c.onsuccess=function(){a=c.result;IDBFS.dbs[b]=a;f(null,a)};c.onerror=function(g){f(this.error);g.preventDefault()}},getLocalSet:function(g,h){var d={};function j(e){return e!=="."&&e!==".."}function b(e){return function(k){return PATH.join2(e,k)}}var a=FS.readdir(g.mountpoint).filter(j).map(b(g.mountpoint));while(a.length){var i=a.pop();var c;try{c=FS.stat(i)}catch(f){return h(f)}if(FS.isDir(c.mode)){a.push.apply(a,FS.readdir(i).filter(j).map(b(i)))}d[i]={timestamp:c.mtime}}return h(null,{type:"local",entries:d})},getRemoteSet:function(b,c){var a={};IDBFS.getDB(b.mountpoint,function(g,e){if(g){return c(g)}var h=e.transaction([IDBFS.DB_STORE_NAME],"readonly");h.onerror=function(i){c(this.error);i.preventDefault()};var d=h.objectStore(IDBFS.DB_STORE_NAME);var f=d.index("timestamp");f.openKeyCursor().onsuccess=function(i){var j=i.target.result;if(!j){return c(null,{type:"remote",db:e,entries:a})}a[j.primaryKey]={timestamp:j.key};j["continue"]()}})},loadLocalEntry:function(f,g){var a,b;try{var d=FS.lookupPath(f);b=d.node;a=FS.stat(f)}catch(c){return g(c)}if(FS.isDir(a.mode)){return g(null,{timestamp:a.mtime,mode:a.mode})}else{if(FS.isFile(a.mode)){b.contents=MEMFS.getFileDataAsTypedArray(b);return g(null,{timestamp:a.mtime,mode:a.mode,contents:b.contents})}else{return g(new Error("node type not supported"))}}},storeLocalEntry:function(c,a,d){try{if(FS.isDir(a.mode)){FS.mkdir(c,a.mode)}else{if(FS.isFile(a.mode)){FS.writeFile(c,a.contents,{encoding:"binary",canOwn:true})}else{return d(new Error("node type not supported"))}}FS.chmod(c,a.mode);FS.utime(c,a.timestamp,a.timestamp)}catch(b){return d(b)}d(null)},removeLocalEntry:function(d,f){try{var c=FS.lookupPath(d);var a=FS.stat(d);if(FS.isDir(a.mode)){FS.rmdir(d)}else{if(FS.isFile(a.mode)){FS.unlink(d)}}}catch(b){return f(b)}f(null)},loadRemoteEntry:function(a,c,d){var b=a.get(c);b.onsuccess=function(e){d(null,e.target.result)};b.onerror=function(f){d(this.error);f.preventDefault()}},storeRemoteEntry:function(a,d,c,e){var b=a.put(c,d);b.onsuccess=function(){e(null)};b.onerror=function(f){e(this.error);f.preventDefault()}},removeRemoteEntry:function(a,c,d){var b=a["delete"](c);b.onsuccess=function(){d(null)};b.onerror=function(f){d(this.error);f.preventDefault()}},reconcile:function(a,h,k){var i=0;var g=[];Object.keys(a.entries).forEach(function(m){var o=a.entries[m];var n=h.entries[m];if(!n||o.timestamp>n.timestamp){g.push(m);i++}});var f=[];Object.keys(h.entries).forEach(function(m){var o=h.entries[m];var n=a.entries[m];if(!n){f.push(m);i++}});if(!i){return k(null)}var c=false;var e=0;var l=a.type==="remote"?a.db:h.db;var b=l.transaction([IDBFS.DB_STORE_NAME],"readwrite");var j=b.objectStore(IDBFS.DB_STORE_NAME);function d(m){if(m){if(!d.errored){d.errored=true;return k(m)}return}if(++e>=i){return k(null)}}b.onerror=function(m){d(this.error);m.preventDefault()};g.sort().forEach(function(m){if(h.type==="local"){IDBFS.loadRemoteEntry(j,m,function(o,n){if(o){return d(o)}IDBFS.storeLocalEntry(m,n,d)})}else{IDBFS.loadLocalEntry(m,function(o,n){if(o){return d(o)}IDBFS.storeRemoteEntry(j,m,n,d)})}});f.sort().reverse().forEach(function(m){if(h.type==="local"){IDBFS.removeLocalEntry(m,d)}else{IDBFS.removeRemoteEntry(j,m,d)}})}};var NODEFS={isWindows:false,staticInit:function(){NODEFS.isWindows=!!process.platform.match(/^win/)},mount:function(a){assert(ENVIRONMENT_IS_NODE);return NODEFS.createNode(null,"/",NODEFS.getMode(a.opts.root),0)},createNode:function(c,b,e,a){if(!FS.isDir(e)&&!FS.isFile(e)&&!FS.isLink(e)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var d=FS.createNode(c,b,e);d.node_ops=NODEFS.node_ops;d.stream_ops=NODEFS.stream_ops;return d},getMode:function(c){var a;try{a=fs.lstatSync(c);if(NODEFS.isWindows){a.mode=a.mode|((a.mode&146)>>1)}}catch(b){if(!b.code){throw b}throw new FS.ErrnoError(ERRNO_CODES[b.code])}return a.mode},realPath:function(a){var b=[];while(a.parent!==a){b.push(a.name);a=a.parent}b.push(a.mount.opts.root);b.reverse();return PATH.join.apply(null,b)},flagsToPermissionStringMap:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},flagsToPermissionString:function(a){a&=~32768;if(a in NODEFS.flagsToPermissionStringMap){return NODEFS.flagsToPermissionStringMap[a]}else{throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}},node_ops:{getattr:function(b){var d=NODEFS.realPath(b);var a;try{a=fs.lstatSync(d)}catch(c){if(!c.code){throw c}throw new FS.ErrnoError(ERRNO_CODES[c.code])}if(NODEFS.isWindows&&!a.blksize){a.blksize=4096}if(NODEFS.isWindows&&!a.blocks){a.blocks=(a.size+a.blksize-1)/a.blksize|0}return{dev:a.dev,ino:a.ino,mode:a.mode,nlink:a.nlink,uid:a.uid,gid:a.gid,rdev:a.rdev,size:a.size,atime:a.atime,mtime:a.mtime,ctime:a.ctime,blksize:a.blksize,blocks:a.blocks}},setattr:function(c,a){var f=NODEFS.realPath(c);try{if(a.mode!==undefined){fs.chmodSync(f,a.mode);c.mode=a.mode}if(a.timestamp!==undefined){var b=new Date(a.timestamp);fs.utimesSync(f,b,b)}if(a.size!==undefined){fs.truncateSync(f,a.size)}}catch(d){if(!d.code){throw d}throw new FS.ErrnoError(ERRNO_CODES[d.code])}},lookup:function(b,a){var c=PATH.join2(NODEFS.realPath(b),a);var d=NODEFS.getMode(c);return NODEFS.createNode(b,a,d)},mknod:function(c,b,h,a){var d=NODEFS.createNode(c,b,h,a);var g=NODEFS.realPath(d);try{if(FS.isDir(d.mode)){fs.mkdirSync(g,d.mode)}else{fs.writeFileSync(g,"",{mode:d.mode})}}catch(f){if(!f.code){throw f}throw new FS.ErrnoError(ERRNO_CODES[f.code])}return d},rename:function(f,d,a){var g=NODEFS.realPath(f);var b=PATH.join2(NODEFS.realPath(d),a);try{fs.renameSync(g,b)}catch(c){if(!c.code){throw c}throw new FS.ErrnoError(ERRNO_CODES[c.code])}},unlink:function(b,a){var d=PATH.join2(NODEFS.realPath(b),a);try{fs.unlinkSync(d)}catch(c){if(!c.code){throw c}throw new FS.ErrnoError(ERRNO_CODES[c.code])}},rmdir:function(b,a){var d=PATH.join2(NODEFS.realPath(b),a);try{fs.rmdirSync(d)}catch(c){if(!c.code){throw c}throw new FS.ErrnoError(ERRNO_CODES[c.code])}},readdir:function(a){var c=NODEFS.realPath(a);try{return fs.readdirSync(c)}catch(b){if(!b.code){throw b}throw new FS.ErrnoError(ERRNO_CODES[b.code])}},symlink:function(b,a,f){var c=PATH.join2(NODEFS.realPath(b),a);try{fs.symlinkSync(f,c)}catch(d){if(!d.code){throw d}throw new FS.ErrnoError(ERRNO_CODES[d.code])}},readlink:function(a){var c=NODEFS.realPath(a);try{c=fs.readlinkSync(c);c=NODEJS_PATH.relative(NODEJS_PATH.resolve(a.mount.opts.root),c);return c}catch(b){if(!b.code){throw b}throw new FS.ErrnoError(ERRNO_CODES[b.code])}}},stream_ops:{open:function(c){var b=NODEFS.realPath(c.node);try{if(FS.isFile(c.node.mode)){c.nfd=fs.openSync(b,NODEFS.flagsToPermissionString(c.flags))}}catch(a){if(!a.code){throw a}throw new FS.ErrnoError(ERRNO_CODES[a.code])}},close:function(b){try{if(FS.isFile(b.node.mode)&&b.nfd){fs.closeSync(b.nfd)}}catch(a){if(!a.code){throw a}throw new FS.ErrnoError(ERRNO_CODES[a.code])}},read:function(j,c,b,a,f){if(a===0){return 0}var k=new Buffer(a);var h;try{h=fs.readSync(j.nfd,k,0,a,f)}catch(g){throw new FS.ErrnoError(ERRNO_CODES[g.code])}if(h>0){for(var d=0;d<h;d++){c[b+d]=k[d]}}return h},write:function(i,b,h,f,a){var c=new Buffer(b.subarray(h,h+f));var d;try{d=fs.writeSync(i.nfd,c,0,f,a)}catch(g){throw new FS.ErrnoError(ERRNO_CODES[g.code])}return d},llseek:function(g,f,b){var a=f;if(b===1){a+=g.position}else{if(b===2){if(FS.isFile(g.node.mode)){try{var c=fs.fstatSync(g.nfd);a+=c.size}catch(d){throw new FS.ErrnoError(ERRNO_CODES[d.code])}}}}if(a<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}return a}}};var WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function(a){assert(ENVIRONMENT_IS_WORKER);if(!WORKERFS.reader){WORKERFS.reader=new FileReaderSync()}var b=WORKERFS.createNode(null,"/",WORKERFS.DIR_MODE,0);var c={};function e(k){var j=k.split("/");var g=b;for(var f=0;f<j.length-1;f++){var h=j.slice(0,f+1).join("/");if(!c[h]){c[h]=WORKERFS.createNode(g,h,WORKERFS.DIR_MODE,0)}g=c[h]}return g}function d(g){var f=g.split("/");return f[f.length-1]}Array.prototype.forEach.call(a.opts.files||[],function(f){WORKERFS.createNode(e(f.name),d(f.name),WORKERFS.FILE_MODE,0,f,f.lastModifiedDate)});(a.opts.blobs||[]).forEach(function(f){WORKERFS.createNode(e(f.name),d(f.name),WORKERFS.FILE_MODE,0,f.data)});(a.opts.packages||[]).forEach(function(f){f.metadata.files.forEach(function(h){var g=h.filename.substr(1);WORKERFS.createNode(e(g),d(g),WORKERFS.FILE_MODE,0,f.blob.slice(h.start,h.end))})});return b},createNode:function(d,c,g,b,f,a){var e=FS.createNode(d,c,g);e.mode=g;e.node_ops=WORKERFS.node_ops;e.stream_ops=WORKERFS.stream_ops;e.timestamp=(a||new Date).getTime();assert(WORKERFS.FILE_MODE!==WORKERFS.DIR_MODE);if(g===WORKERFS.FILE_MODE){e.size=f.size;e.contents=f}else{e.size=4096;e.contents={}}if(d){d.contents[c]=e}return e},node_ops:{getattr:function(a){return{dev:1,ino:undefined,mode:a.mode,nlink:1,uid:0,gid:0,rdev:undefined,size:a.size,atime:new Date(a.timestamp),mtime:new Date(a.timestamp),ctime:new Date(a.timestamp),blksize:4096,blocks:Math.ceil(a.size/4096)}},setattr:function(b,a){if(a.mode!==undefined){b.mode=a.mode}if(a.timestamp!==undefined){b.timestamp=a.timestamp}},lookup:function(b,a){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)},mknod:function(c,b,d,a){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},rename:function(c,b,a){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},unlink:function(b,a){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},rmdir:function(b,a){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},readdir:function(a){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},symlink:function(b,a,c){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},readlink:function(a){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}},stream_ops:{read:function(g,b,f,d,a){if(a>=g.node.size){return 0}var c=g.node.contents.slice(a,a+d);var e=WORKERFS.reader.readAsArrayBuffer(c);b.set(new Uint8Array(e),f);return c.size},write:function(e,b,d,c,a){throw new FS.ErrnoError(ERRNO_CODES.EIO)},llseek:function(d,c,b){var a=c;if(b===1){a+=d.position}else{if(b===2){if(FS.isFile(d.node.mode)){a+=d.node.size}}}if(a<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}return a}}};var _stdin=allocate(1,"i32*",ALLOC_STATIC);var _stdout=allocate(1,"i32*",ALLOC_STATIC);var _stderr=allocate(1,"i32*",ALLOC_STATIC);var FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,handleFSError:function(a){if(!(a instanceof FS.ErrnoError)){throw a+" : "+stackTrace()}return ___setErrNo(a.errno)},lookupPath:function(m,a){m=PATH.resolve(FS.cwd(),m);a=a||{};if(!m){return{path:"",node:null}}var d={follow_mount:true,recurse_count:0};for(var k in d){if(a[k]===undefined){a[k]=d[k]}}if(a.recurse_count>8){throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}var e=PATH.normalizeArray(m.split("/").filter(function(i){return !!i}),false);var h=FS.root;var l="/";for(var f=0;f<e.length;f++){var b=(f===e.length-1);if(b&&a.parent){break}h=FS.lookupNode(h,e[f]);l=PATH.join2(l,e[f]);if(FS.isMountpoint(h)){if(!b||(b&&a.follow_mount)){h=h.mounted.root}}if(!b||a.follow){var g=0;while(FS.isLink(h.mode)){var j=FS.readlink(l);l=PATH.resolve(PATH.dirname(l),j);var c=FS.lookupPath(l,{recurse_count:a.recurse_count});h=c.node;if(g++>40){throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}}}}return{path:l,node:h}},getPath:function(b){var c;while(true){if(FS.isRoot(b)){var a=b.mount.mountpoint;if(!c){return a}return a[a.length-1]!=="/"?a+"/"+c:a+c}c=c?b.name+"/"+c:b.name;b=b.parent}},hashName:function(d,a){var c=0;for(var b=0;b<a.length;b++){c=((c<<5)-c+a.charCodeAt(b))|0}return((d+c)>>>0)%FS.nameTable.length},hashAddNode:function(a){var b=FS.hashName(a.parent.id,a.name);a.name_next=FS.nameTable[b];FS.nameTable[b]=a},hashRemoveNode:function(a){var c=FS.hashName(a.parent.id,a.name);if(FS.nameTable[c]===a){FS.nameTable[c]=a.name_next}else{var b=FS.nameTable[c];while(b){if(b.name_next===a){b.name_next=a.name_next;break}b=b.name_next}}},lookupNode:function(b,a){var d=FS.mayLookup(b);if(d){throw new FS.ErrnoError(d,b)}var e=FS.hashName(b.id,a);for(var c=FS.nameTable[e];c;c=c.name_next){var f=c.name;if(c.parent.id===b.id&&f===a){return c}}return FS.lookup(b,a)},createNode:function(e,c,g,b){if(!FS.FSNode){FS.FSNode=function(j,i,k,h){if(!j){j=this}this.parent=j;this.mount=j.mount;this.mounted=null;this.id=FS.nextInode++;this.name=i;this.mode=k;this.node_ops={};this.stream_ops={};this.rdev=h};FS.FSNode.prototype={};var d=292|73;var a=146;Object.defineProperties(FS.FSNode.prototype,{read:{get:function(){return(this.mode&d)===d},set:function(h){h?this.mode|=d:this.mode&=~d}},write:{get:function(){return(this.mode&a)===a},set:function(h){h?this.mode|=a:this.mode&=~a}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}})}var f=new FS.FSNode(e,c,g,b);FS.hashAddNode(f);return f},destroyNode:function(a){FS.hashRemoveNode(a)},isRoot:function(a){return a===a.parent},isMountpoint:function(a){return !!a.mounted},isFile:function(a){return(a&61440)===32768},isDir:function(a){return(a&61440)===16384},isLink:function(a){return(a&61440)===40960},isChrdev:function(a){return(a&61440)===8192},isBlkdev:function(a){return(a&61440)===24576},isFIFO:function(a){return(a&61440)===4096},isSocket:function(a){return(a&49152)===49152},flagModes:{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},modeStringToFlags:function(b){var a=FS.flagModes[b];if(typeof a==="undefined"){throw new Error("Unknown file open mode: "+b)}return a},flagsToPermissionString:function(a){var b=["r","w","rw"][a&3];if((a&512)){b+="w"}return b},nodePermissions:function(b,a){if(FS.ignorePermissions){return 0}if(a.indexOf("r")!==-1&&!(b.mode&292)){return ERRNO_CODES.EACCES}else{if(a.indexOf("w")!==-1&&!(b.mode&146)){return ERRNO_CODES.EACCES}else{if(a.indexOf("x")!==-1&&!(b.mode&73)){return ERRNO_CODES.EACCES}}}return 0},mayLookup:function(a){var b=FS.nodePermissions(a,"x");if(b){return b}if(!a.node_ops.lookup){return ERRNO_CODES.EACCES}return 0},mayCreate:function(b,a){try{var c=FS.lookupNode(b,a);return ERRNO_CODES.EEXIST}catch(d){}return FS.nodePermissions(b,"wx")},mayDelete:function(c,b,a){var f;try{f=FS.lookupNode(c,b)}catch(g){return g.errno}var d=FS.nodePermissions(c,"wx");if(d){return d}if(a){if(!FS.isDir(f.mode)){return ERRNO_CODES.ENOTDIR}if(FS.isRoot(f)||FS.getPath(f)===FS.cwd()){return ERRNO_CODES.EBUSY}}else{if(FS.isDir(f.mode)){return ERRNO_CODES.EISDIR}}return 0},mayOpen:function(b,a){if(!b){return ERRNO_CODES.ENOENT}if(FS.isLink(b.mode)){return ERRNO_CODES.ELOOP}else{if(FS.isDir(b.mode)){if((a&2097155)!==0||(a&512)){return ERRNO_CODES.EISDIR}}}return FS.nodePermissions(b,FS.flagsToPermissionString(a))},MAX_OPEN_FDS:4096,nextfd:function(c,b){c=c||0;b=b||FS.MAX_OPEN_FDS;for(var a=c;a<=b;a++){if(!FS.streams[a]){return a}}throw new FS.ErrnoError(ERRNO_CODES.EMFILE)},getStream:function(a){return FS.streams[a]},createStream:function(e,c,b){if(!FS.FSStream){FS.FSStream=function(){};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(g){this.node=g}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return(this.flags&1024)}}})}var f=new FS.FSStream();for(var d in e){f[d]=e[d]}e=f;var a=FS.nextfd(c,b);e.fd=a;FS.streams[a]=e;return e},closeStream:function(a){FS.streams[a]=null},chrdev_stream_ops:{open:function(b){var a=FS.getDevice(b.node.rdev);b.stream_ops=a.stream_ops;if(b.stream_ops.open){b.stream_ops.open(b)}},llseek:function(){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}},major:function(a){return((a)>>8)},minor:function(a){return((a)&255)},makedev:function(b,a){return((b)<<8|(a))},registerDevice:function(a,b){FS.devices[a]={stream_ops:b}},getDevice:function(a){return FS.devices[a]},getMounts:function(b){var d=[];var c=[b];while(c.length){var a=c.pop();d.push(a);c.push.apply(c,a.mounts)}return d},syncfs:function(d,e){if(typeof(d)==="function"){e=d;d=false}var c=FS.getMounts(FS.root.mount);var b=0;function a(f){if(f){if(!a.errored){a.errored=true;return e(f)}return}if(++b>=c.length){e(null)}}c.forEach(function(f){if(!f.type.syncfs){return a(null)}f.type.syncfs(f,d,a)})},mount:function(e,a,i){var g=i==="/";var h=!i;var c;if(g&&FS.root){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}else{if(!g&&!h){var b=FS.lookupPath(i,{follow_mount:false});i=b.path;c=b.node;if(FS.isMountpoint(c)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(!FS.isDir(c.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}}}var f={type:e,opts:a,mountpoint:i,mounts:[]};var d=e.mount(f);d.mount=f;f.root=d;if(g){FS.root=d}else{if(c){c.mounted=f;if(c.mount){c.mount.mounts.push(f)}}}return d},unmount:function(c){var f=FS.lookupPath(c,{follow_mount:false});if(!FS.isMountpoint(f.node)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var e=f.node;var b=e.mounted;var d=FS.getMounts(b);Object.keys(FS.nameTable).forEach(function(i){var h=FS.nameTable[i];while(h){var g=h.name_next;if(d.indexOf(h.mount)!==-1){FS.destroyNode(h)}h=g}});e.mounted=null;var a=e.mount.mounts.indexOf(b);assert(a!==-1);e.mount.mounts.splice(a,1)},lookup:function(b,a){return b.node_ops.lookup(b,a)},mknod:function(f,g,a){var e=FS.lookupPath(f,{parent:true});var c=e.node;var b=PATH.basename(f);if(!b||b==="."||b===".."){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var d=FS.mayCreate(c,b);if(d){throw new FS.ErrnoError(d)}if(!c.node_ops.mknod){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return c.node_ops.mknod(c,b,g,a)},create:function(a,b){b=b!==undefined?b:438;b&=4095;b|=32768;return FS.mknod(a,b,0)},mkdir:function(a,b){b=b!==undefined?b:511;b&=511|512;b|=16384;return FS.mknod(a,b,0)},mkdev:function(b,c,a){if(typeof(a)==="undefined"){a=c;c=438}c|=8192;return FS.mknod(b,c,a)},symlink:function(a,f){if(!PATH.resolve(a)){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}var e=FS.lookupPath(f,{parent:true});var c=e.node;if(!c){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}var b=PATH.basename(f);var d=FS.mayCreate(c,b);if(d){throw new FS.ErrnoError(d)}if(!c.node_ops.symlink){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return c.node_ops.symlink(c,b,a)},rename:function(f,i){var a=PATH.dirname(f);var p=PATH.dirname(i);var h=PATH.basename(f);var k=PATH.basename(i);var g,d,o;try{g=FS.lookupPath(f,{parent:true});d=g.node;g=FS.lookupPath(i,{parent:true});o=g.node}catch(n){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(!d||!o){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}if(d.mount!==o.mount){throw new FS.ErrnoError(ERRNO_CODES.EXDEV)}var l=FS.lookupNode(d,h);var b=PATH.relative(f,p);if(b.charAt(0)!=="."){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}b=PATH.relative(i,a);if(b.charAt(0)!=="."){throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY)}var m;try{m=FS.lookupNode(o,k)}catch(n){}if(l===m){return}var c=FS.isDir(l.mode);var j=FS.mayDelete(d,h,c);if(j){throw new FS.ErrnoError(j)}j=m?FS.mayDelete(o,k,c):FS.mayCreate(o,k);if(j){throw new FS.ErrnoError(j)}if(!d.node_ops.rename){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(l)||(m&&FS.isMountpoint(m))){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(o!==d){j=FS.nodePermissions(d,"w");if(j){throw new FS.ErrnoError(j)}}try{if(FS.trackingDelegate.willMovePath){FS.trackingDelegate.willMovePath(f,i)}}catch(n){console.log("FS.trackingDelegate['willMovePath']('"+f+"', '"+i+"') threw an exception: "+n.message)}FS.hashRemoveNode(l);try{d.node_ops.rename(l,o,k)}catch(n){throw n}finally{FS.hashAddNode(l)}try{if(FS.trackingDelegate.onMovePath){FS.trackingDelegate.onMovePath(f,i)}}catch(n){console.log("FS.trackingDelegate['onMovePath']('"+f+"', '"+i+"') threw an exception: "+n.message)}},rmdir:function(h){var g=FS.lookupPath(h,{parent:true});var b=g.node;var a=PATH.basename(h);var d=FS.lookupNode(b,a);var c=FS.mayDelete(b,a,true);if(c){throw new FS.ErrnoError(c)}if(!b.node_ops.rmdir){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(d)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}try{if(FS.trackingDelegate.willDeletePath){FS.trackingDelegate.willDeletePath(h)}}catch(f){console.log("FS.trackingDelegate['willDeletePath']('"+h+"') threw an exception: "+f.message)}b.node_ops.rmdir(b,a);FS.destroyNode(d);try{if(FS.trackingDelegate.onDeletePath){FS.trackingDelegate.onDeletePath(h)}}catch(f){console.log("FS.trackingDelegate['onDeletePath']('"+h+"') threw an exception: "+f.message)}},readdir:function(c){var b=FS.lookupPath(c,{follow:true});var a=b.node;if(!a.node_ops.readdir){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}return a.node_ops.readdir(a)},unlink:function(h){var g=FS.lookupPath(h,{parent:true});var b=g.node;var a=PATH.basename(h);var d=FS.lookupNode(b,a);var c=FS.mayDelete(b,a,false);if(c){if(c===ERRNO_CODES.EISDIR){c=ERRNO_CODES.EPERM}throw new FS.ErrnoError(c)}if(!b.node_ops.unlink){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(d)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}try{if(FS.trackingDelegate.willDeletePath){FS.trackingDelegate.willDeletePath(h)}}catch(f){console.log("FS.trackingDelegate['willDeletePath']('"+h+"') threw an exception: "+f.message)}b.node_ops.unlink(b,a);FS.destroyNode(d);try{if(FS.trackingDelegate.onDeletePath){FS.trackingDelegate.onDeletePath(h)}}catch(f){console.log("FS.trackingDelegate['onDeletePath']('"+h+"') threw an exception: "+f.message)}},readlink:function(c){var b=FS.lookupPath(c);var a=b.node;if(!a){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}if(!a.node_ops.readlink){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}return PATH.resolve(FS.getPath(a.parent),a.node_ops.readlink(a))},stat:function(d,a){var c=FS.lookupPath(d,{follow:!a});var b=c.node;if(!b){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}if(!b.node_ops.getattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return b.node_ops.getattr(b)},lstat:function(a){return FS.stat(a,true)},chmod:function(d,e,a){var b;if(typeof d==="string"){var c=FS.lookupPath(d,{follow:!a});b=c.node}else{b=d}if(!b.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}b.node_ops.setattr(b,{mode:(e&4095)|(b.mode&~4095),timestamp:Date.now()})},lchmod:function(a,b){FS.chmod(a,b,true)},fchmod:function(a,c){var b=FS.getStream(a);if(!b){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}FS.chmod(b.node,c)},chown:function(f,b,c,a){var d;if(typeof f==="string"){var e=FS.lookupPath(f,{follow:!a});d=e.node}else{d=f}if(!d.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}d.node_ops.setattr(d,{timestamp:Date.now()})},lchown:function(c,a,b){FS.chown(c,a,b,true)},fchown:function(b,a,c){var d=FS.getStream(b);if(!d){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}FS.chown(d.node,a,c)},truncate:function(e,a){if(a<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var c;if(typeof e==="string"){var d=FS.lookupPath(e,{follow:true});c=d.node}else{c=e}if(!c.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isDir(c.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!FS.isFile(c.mode)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var b=FS.nodePermissions(c,"w");if(b){throw new FS.ErrnoError(b)}c.node_ops.setattr(c,{size:a,timestamp:Date.now()})},ftruncate:function(b,a){var c=FS.getStream(b);if(!c){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if((c.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}FS.truncate(c.node,a)},utime:function(e,c,a){var d=FS.lookupPath(e,{follow:true});var b=d.node;b.node_ops.setattr(b,{timestamp:Math.max(c,a)})},open:function(m,f,j,d,b){if(m===""){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}f=typeof f==="string"?FS.modeStringToFlags(f):f;j=typeof j==="undefined"?438:j;if((f&64)){j=(j&4095)|32768}else{j=0}var g;if(typeof m==="object"){g=m}else{m=PATH.normalize(m);try{var c=FS.lookupPath(m,{follow:!(f&131072)});g=c.node}catch(k){}}var i=false;if((f&64)){if(g){if((f&128)){throw new FS.ErrnoError(ERRNO_CODES.EEXIST)}}else{g=FS.mknod(m,j,0);i=true}}if(!g){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}if(FS.isChrdev(g.mode)){f&=~512}if((f&65536)&&!FS.isDir(g.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}if(!i){var h=FS.mayOpen(g,f);if(h){throw new FS.ErrnoError(h)}}if((f&512)){FS.truncate(g,0)}f&=~(128|512);var l=FS.createStream({node:g,path:FS.getPath(g),flags:f,seekable:true,position:0,stream_ops:g.stream_ops,ungotten:[],error:false},d,b);if(l.stream_ops.open){l.stream_ops.open(l)}if(Module.logReadFiles&&!(f&1)){if(!FS.readFiles){FS.readFiles={}}if(!(m in FS.readFiles)){FS.readFiles[m]=1;Module.printErr("read file: "+m)}}try{if(FS.trackingDelegate.onOpenFile){var a=0;if((f&2097155)!==1){a|=FS.tracking.openFlags.READ}if((f&2097155)!==0){a|=FS.tracking.openFlags.WRITE}FS.trackingDelegate.onOpenFile(m,a)}}catch(k){console.log("FS.trackingDelegate['onOpenFile']('"+m+"', flags) threw an exception: "+k.message)}return l},close:function(b){if(b.getdents){b.getdents=null}try{if(b.stream_ops.close){b.stream_ops.close(b)}}catch(a){throw a}finally{FS.closeStream(b.fd)}},llseek:function(c,b,a){if(!c.seekable||!c.stream_ops.llseek){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}c.position=c.stream_ops.llseek(c,b,a);c.ungotten=[];return c.position},read:function(g,b,f,c,a){if(c<0||a<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((g.flags&2097155)===1){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(FS.isDir(g.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!g.stream_ops.read){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var e=true;if(typeof a==="undefined"){a=g.position;e=false}else{if(!g.seekable){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}}var d=g.stream_ops.read(g,b,f,c,a);if(!e){g.position+=d}return d},write:function(j,d,c,a,f,b){if(a<0||f<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((j.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(FS.isDir(j.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!j.stream_ops.write){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if(j.flags&1024){FS.llseek(j,0,2)}var h=true;if(typeof f==="undefined"){f=j.position;h=false}else{if(!j.seekable){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}}var i=j.stream_ops.write(j,d,c,a,f,b);if(!h){j.position+=i}try{if(j.path&&FS.trackingDelegate.onWriteToFile){FS.trackingDelegate.onWriteToFile(j.path)}}catch(g){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+g.message)}return i},allocate:function(c,b,a){if(b<0||a<=0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((c.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(!FS.isFile(c.node.mode)&&!FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}if(!c.stream_ops.allocate){throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP)}c.stream_ops.allocate(c,b,a)},mmap:function(g,c,f,e,a,d,b){if((g.flags&2097155)===1){throw new FS.ErrnoError(ERRNO_CODES.EACCES)}if(!g.stream_ops.mmap){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}return g.stream_ops.mmap(g,c,f,e,a,d,b)},msync:function(e,b,d,c,a){if(!e||!e.stream_ops.msync){return 0}return e.stream_ops.msync(e,b,d,c,a)},munmap:function(a){return 0},ioctl:function(c,b,a){if(!c.stream_ops.ioctl){throw new FS.ErrnoError(ERRNO_CODES.ENOTTY)}return c.stream_ops.ioctl(c,b,a)},readFile:function(f,e){e=e||{};e.flags=e.flags||"r";e.encoding=e.encoding||"binary";if(e.encoding!=="utf8"&&e.encoding!=="binary"){throw new Error('Invalid encoding type "'+e.encoding+'"')}var b;var g=FS.open(f,e.flags);var c=FS.stat(f);var d=c.size;var a=new Uint8Array(d);FS.read(g,a,0,d,0);if(e.encoding==="utf8"){b=UTF8ArrayToString(a,0)}else{if(e.encoding==="binary"){b=a}}FS.close(g);return b},writeFile:function(e,d,c){c=c||{};c.flags=c.flags||"w";c.encoding=c.encoding||"utf8";if(c.encoding!=="utf8"&&c.encoding!=="binary"){throw new Error('Invalid encoding type "'+c.encoding+'"')}var f=FS.open(e,c.flags,c.mode);if(c.encoding==="utf8"){var b=new Uint8Array(lengthBytesUTF8(d)+1);var a=stringToUTF8Array(d,b,0,b.length);FS.write(f,b,0,a,0,c.canOwn)}else{if(c.encoding==="binary"){FS.write(f,d,0,d.length,0,c.canOwn)}}FS.close(f)},cwd:function(){return FS.currentPath},chdir:function(c){var b=FS.lookupPath(c,{follow:true});if(!FS.isDir(b.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}var a=FS.nodePermissions(b.node,"x");if(a){throw new FS.ErrnoError(a)}FS.currentPath=b.path},createDefaultDirectories:function(){FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")},createDefaultDevices:function(){FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:function(){return 0},write:function(f,c,e,d,g){return d}});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var a;if(typeof crypto!=="undefined"){var b=new Uint8Array(1);a=function(){crypto.getRandomValues(b);return b[0]}}else{if(ENVIRONMENT_IS_NODE){a=function(){return require("crypto").randomBytes(1)[0]}}else{a=function(){return(Math.random()*256)|0}}}FS.createDevice("/dev","random",a);FS.createDevice("/dev","urandom",a);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){FS.mkdir("/proc");FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount:function(){var a=FS.createNode("/proc/self","fd",16384|511,73);a.node_ops={lookup:function(e,c){var d=+c;var f=FS.getStream(d);if(!f){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}var b={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return f.path}}};b.parent=b;return b}};return a}},{},"/proc/self/fd")},createStandardStreams:function(){if(Module.stdin){FS.createDevice("/dev","stdin",Module.stdin)}else{FS.symlink("/dev/tty","/dev/stdin")}if(Module.stdout){FS.createDevice("/dev","stdout",null,Module.stdout)}else{FS.symlink("/dev/tty","/dev/stdout")}if(Module.stderr){FS.createDevice("/dev","stderr",null,Module.stderr)}else{FS.symlink("/dev/tty1","/dev/stderr")}var c=FS.open("/dev/stdin","r");assert(c.fd===0,"invalid handle for stdin ("+c.fd+")");var a=FS.open("/dev/stdout","w");assert(a.fd===1,"invalid handle for stdout ("+a.fd+")");var b=FS.open("/dev/stderr","w");assert(b.fd===2,"invalid handle for stderr ("+b.fd+")")},ensureErrnoError:function(){if(FS.ErrnoError){return}FS.ErrnoError=function a(b,c){this.node=c;this.setErrno=function(e){this.errno=e;for(var d in ERRNO_CODES){if(ERRNO_CODES[d]===e){this.code=d;break}}};this.setErrno(b);this.message=ERRNO_MESSAGES[b];if(this.stack){this.stack=demangleAll(this.stack)}};FS.ErrnoError.prototype=new Error();FS.ErrnoError.prototype.constructor=FS.ErrnoError;[ERRNO_CODES.ENOENT].forEach(function(b){FS.genericErrors[b]=new FS.ErrnoError(b);FS.genericErrors[b].stack="<generic error, no stack>"})},staticInit:function(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={MEMFS:MEMFS,IDBFS:IDBFS,NODEFS:NODEFS,WORKERFS:WORKERFS}},init:function(b,a,c){assert(!FS.init.initialized,"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)");FS.init.initialized=true;FS.ensureErrnoError();Module.stdin=b||Module.stdin;Module.stdout=a||Module.stdout;Module.stderr=c||Module.stderr;FS.createStandardStreams()},quit:function(){FS.init.initialized=false;var c=Module._fflush;if(c){c(0)}for(var a=0;a<FS.streams.length;a++){var b=FS.streams[a];if(!b){continue}FS.close(b)}},getMode:function(a,b){var c=0;if(a){c|=292|73}if(b){c|=146}return c},joinPath:function(c,a){var b=PATH.join.apply(null,c);if(a&&b[0]=="/"){b=b.substr(1)}return b},absolutePath:function(b,a){return PATH.resolve(a,b)},standardizePath:function(a){return PATH.normalize(a)},findObject:function(c,b){var a=FS.analyzePath(c,b);if(a.exists){return a.object}else{___setErrNo(a.error);return null}},analyzePath:function(f,b){try{var d=FS.lookupPath(f,{follow:!b});f=d.path}catch(c){}var a={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var d=FS.lookupPath(f,{parent:true});a.parentExists=true;a.parentPath=d.path;a.parentObject=d.node;a.name=PATH.basename(f);d=FS.lookupPath(f,{follow:!b});a.exists=true;a.path=d.path;a.object=d.node;a.name=d.node.name;a.isRoot=d.path==="/"}catch(c){a.error=c.errno}return a},createFolder:function(c,b,a,d){var e=PATH.join2(typeof c==="string"?c:FS.getPath(c),b);var f=FS.getMode(a,d);return FS.mkdir(e,f)},createPath:function(c,i,a,d){c=typeof c==="string"?c:FS.getPath(c);var h=i.split("/").reverse();while(h.length){var b=h.pop();if(!b){continue}var g=PATH.join2(c,b);try{FS.mkdir(g)}catch(f){}c=g}return g},createFile:function(d,b,c,a,e){var f=PATH.join2(typeof d==="string"?d:FS.getPath(d),b);var g=FS.getMode(a,e);return FS.create(f,g)},createDataFile:function(l,a,f,g,d,c){var n=a?PATH.join2(typeof l==="string"?l:FS.getPath(l),a):l;var j=FS.getMode(g,d);var b=FS.create(n,j);if(f){if(typeof f==="string"){var h=new Array(f.length);for(var e=0,k=f.length;e<k;++e){h[e]=f.charCodeAt(e)}f=h}FS.chmod(b,j|146);var m=FS.open(b,"w");FS.write(m,f,0,f.length,0,c);FS.close(m);FS.chmod(b,j)}return b},createDevice:function(e,d,c,b){var f=PATH.join2(typeof e==="string"?e:FS.getPath(e),d);var g=FS.getMode(!!c,!!b);if(!FS.createDevice.major){FS.createDevice.major=64}var a=FS.makedev(FS.createDevice.major++,0);FS.registerDevice(a,{open:function(h){h.seekable=false},close:function(h){if(b&&b.buffer&&b.buffer.length){b(10)}},read:function(p,l,k,j,o){var h=0;for(var m=0;m<j;m++){var q;try{q=c()}catch(n){throw new FS.ErrnoError(ERRNO_CODES.EIO)}if(q===undefined&&h===0){throw new FS.ErrnoError(ERRNO_CODES.EAGAIN)}if(q===null||q===undefined){break}h++;l[k+m]=q}if(h){p.node.timestamp=Date.now()}return h},write:function(n,h,m,k,o){for(var j=0;j<k;j++){try{b(h[m+j])}catch(l){throw new FS.ErrnoError(ERRNO_CODES.EIO)}}if(k){n.node.timestamp=Date.now()}return j}});return FS.mkdev(f,g,a)},createLink:function(c,b,f,a,d){var e=PATH.join2(typeof c==="string"?c:FS.getPath(c),b);return FS.symlink(f,e)},forceLoadFile:function(b){if(b.isDevice||b.isFolder||b.link||b.contents){return true}var c=true;if(typeof XMLHttpRequest!=="undefined"){throw new 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.")}else{if(Module.read){try{b.contents=intArrayFromString(Module.read(b.url),true);b.usedBytes=b.contents.length}catch(a){c=false}}else{throw new Error("Cannot load without read() or XMLHttpRequest.")}}if(!c){___setErrNo(ERRNO_CODES.EIO)}return c},createLazyFile:function(k,b,c,i,f){function a(){this.lengthKnown=false;this.chunks=[]}a.prototype.get=function d(p){if(p>this.length-1||p<0){return undefined}var r=p%this.chunkSize;var q=(p/this.chunkSize)|0;return this.getter(q)[r]};a.prototype.setDataGetter=function g(p){this.getter=p};a.prototype.cacheLength=function o(){var s=new XMLHttpRequest();s.open("HEAD",c,false);s.send(null);if(!(s.status>=200&&s.status<300||s.status===304)){throw new Error("Couldn't load "+c+". Status: "+s.status)}var r=Number(s.getResponseHeader("Content-length"));var v;var q=(v=s.getResponseHeader("Accept-Ranges"))&&v==="bytes";var u=1024*1024;if(!q){u=r}var p=(function(y,x){if(y>x){throw new Error("invalid range ("+y+", "+x+") or no bytes requested!")}if(x>r-1){throw new Error("only "+r+" bytes available! programmer error!")}var w=new XMLHttpRequest();w.open("GET",c,false);if(r!==u){w.setRequestHeader("Range","bytes="+y+"-"+x)}if(typeof Uint8Array!="undefined"){w.responseType="arraybuffer"}if(w.overrideMimeType){w.overrideMimeType("text/plain; charset=x-user-defined")}w.send(null);if(!(w.status>=200&&w.status<300||w.status===304)){throw new Error("Couldn't load "+c+". Status: "+w.status)}if(w.response!==undefined){return new Uint8Array(w.response||[])}else{return intArrayFromString(w.responseText||"",true)}});var t=this;t.setDataGetter(function(x){var y=x*u;var w=(x+1)*u-1;w=Math.min(w,r-1);if(typeof(t.chunks[x])==="undefined"){t.chunks[x]=p(y,w)}if(typeof(t.chunks[x])==="undefined"){throw new Error("doXHR failed!")}return t.chunks[x]});this._length=r;this._chunkSize=u;this.lengthKnown=true};if(typeof XMLHttpRequest!=="undefined"){if(!ENVIRONMENT_IS_WORKER){throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"}var l=new a();Object.defineProperty(l,"length",{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}});Object.defineProperty(l,"chunkSize",{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}});var j={isDevice:false,contents:l}}else{var j={isDevice:false,url:c}}var e=FS.createFile(k,b,j,i,f);if(j.contents){e.contents=j.contents}else{if(j.url){e.contents=null;e.url=j.url}}Object.defineProperty(e,"usedBytes",{get:function(){return this.contents.length}});var h={};var m=Object.keys(e.stream_ops);m.forEach(function(p){var q=e.stream_ops[p];h[p]=function r(){if(!FS.forceLoadFile(e)){throw new FS.ErrnoError(ERRNO_CODES.EIO)}return q.apply(null,arguments)}});h.read=function n(w,q,v,u,p){if(!FS.forceLoadFile(e)){throw new FS.ErrnoError(ERRNO_CODES.EIO)}var t=w.node.contents;if(p>=t.length){return 0}var s=Math.min(t.length-p,u);assert(s>=0);if(t.slice){for(var r=0;r<s;r++){q[v+r]=t[p+r]}}else{for(var r=0;r<s;r++){q[v+r]=t.get(p+r)}}return s};e.stream_ops=h;return e},createPreloadedFile:function(l,b,c,g,e,f,i,a,d,h){Browser.init();var m=b?PATH.resolve(PATH.join2(l,b)):l;var k=getUniqueRunDependency("cp "+m);function j(n){function o(q){if(h){h()}if(!a){FS.createDataFile(l,b,q,g,e,d)}if(f){f()}removeRunDependency(k)}var p=false;Module.preloadPlugins.forEach(function(q){if(p){return}if(q.canHandle(m)){q.handle(n,m,o,function(){if(i){i()}removeRunDependency(k)});p=true}});if(!p){o(n)}}addRunDependency(k);if(typeof c=="string"){Browser.asyncLoad(c,function(n){j(n)},i)}else{j(c)}},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(h,g,a){g=g||function(){};a=a||function(){};var c=FS.indexedDB();try{var b=c.open(FS.DB_NAME(),FS.DB_VERSION)}catch(f){return a(f)}b.onupgradeneeded=function i(){console.log("creating db");var e=b.result;e.createObjectStore(FS.DB_STORE_NAME)};b.onsuccess=function d(){var j=b.result;var o=j.transaction([FS.DB_STORE_NAME],"readwrite");var n=o.objectStore(FS.DB_STORE_NAME);var l=0,e=0,m=h.length;function k(){if(e==0){g()}else{a()}}h.forEach(function(s){var q=n.put(FS.analyzePath(s).object.contents,s);q.onsuccess=function r(){l++;if(l+e==m){k()}};q.onerror=function p(){e++;if(l+e==m){k()}}});o.onerror=a};b.onerror=a},loadFilesFromDB:function(h,g,a){g=g||function(){};a=a||function(){};var c=FS.indexedDB();try{var b=c.open(FS.DB_NAME(),FS.DB_VERSION)}catch(f){return a(f)}b.onupgradeneeded=a;b.onsuccess=function d(){var j=b.result;try{var p=j.transaction([FS.DB_STORE_NAME],"readonly")}catch(o){a(o);return}var n=p.objectStore(FS.DB_STORE_NAME);var l=0,i=0,m=h.length;function k(){if(i==0){g()}else{a()}}h.forEach(function(q){var e=n.get(q);e.onsuccess=function r(){if(FS.analyzePath(q).exists){FS.unlink(q)}FS.createDataFile(PATH.dirname(q),PATH.basename(q),e.result,true,true,true);l++;if(l+i==m){k()}};e.onerror=function s(){i++;if(l+i==m){k()}}});p.onerror=a};b.onerror=a}};var SYSCALLS={DEFAULT_POLLMASK:5,mappings:{},umask:511,calculateAt:function(d,c){if(c[0]!=="/"){var b;if(d===-100){b=FS.cwd()}else{var a=FS.getStream(d);if(!a){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}b=a.path}c=PATH.join2(b,c)}return c},doStat:function(c,f,a){try{var b=c(f)}catch(d){if(d&&d.node&&PATH.normalize(f)!==PATH.normalize(FS.getPath(d.node))){return -ERRNO_CODES.ENOTDIR}throw d}HEAP32[((a)>>2)]=b.dev;HEAP32[(((a)+(4))>>2)]=0;HEAP32[(((a)+(8))>>2)]=b.ino;HEAP32[(((a)+(12))>>2)]=b.mode;HEAP32[(((a)+(16))>>2)]=b.nlink;HEAP32[(((a)+(20))>>2)]=b.uid;HEAP32[(((a)+(24))>>2)]=b.gid;HEAP32[(((a)+(28))>>2)]=b.rdev;HEAP32[(((a)+(32))>>2)]=0;HEAP32[(((a)+(36))>>2)]=b.size;HEAP32[(((a)+(40))>>2)]=4096;HEAP32[(((a)+(44))>>2)]=b.blocks;HEAP32[(((a)+(48))>>2)]=(b.atime.getTime()/1000)|0;HEAP32[(((a)+(52))>>2)]=0;HEAP32[(((a)+(56))>>2)]=(b.mtime.getTime()/1000)|0;HEAP32[(((a)+(60))>>2)]=0;HEAP32[(((a)+(64))>>2)]=(b.ctime.getTime()/1000)|0;HEAP32[(((a)+(68))>>2)]=0;HEAP32[(((a)+(72))>>2)]=b.ino;return 0},doMsync:function(e,d,a,c){var b=new Uint8Array(HEAPU8.subarray(e,e+a));FS.msync(d,b,0,a,c)},doMkdir:function(a,b){a=PATH.normalize(a);if(a[a.length-1]==="/"){a=a.substr(0,a.length-1)}FS.mkdir(a,b,0);return 0},doMknod:function(b,c,a){switch(c&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return -ERRNO_CODES.EINVAL}FS.mknod(b,c,a);return 0},doReadlink:function(c,b,d){if(d<=0){return -ERRNO_CODES.EINVAL}var a=FS.readlink(c);a=a.slice(0,Math.max(0,d));writeStringToMemory(a,b,true);return a.length},doAccess:function(e,d){if(d&~7){return -ERRNO_CODES.EINVAL}var b;var c=FS.lookupPath(e,{follow:true});b=c.node;var a="";if(d&4){a+="r"}if(d&2){a+="w"}if(d&1){a+="x"}if(a&&FS.nodePermissions(b,a)){return -ERRNO_CODES.EACCES}return 0},doDup:function(c,a,b){var d=FS.getStream(b);if(d){FS.close(d)}return FS.open(c,a,0,b,b).fd},doReadv:function(g,b,j,c){var f=0;for(var d=0;d<j;d++){var a=HEAP32[(((b)+(d*8))>>2)];var e=HEAP32[(((b)+(d*8+4))>>2)];var h=FS.read(g,HEAP8,a,e,c);if(h<0){return -1}f+=h;if(h<e){break}}return f},doWritev:function(g,b,j,c){var f=0;for(var d=0;d<j;d++){var a=HEAP32[(((b)+(d*8))>>2)];var e=HEAP32[(((b)+(d*8+4))>>2)];var h=FS.write(g,HEAP8,a,e,c);if(h<0){return -1}f+=h}return f},varargs:0,get:function(a){SYSCALLS.varargs+=4;var b=HEAP32[(((SYSCALLS.varargs)-(4))>>2)];return b},getStr:function(){var a=Pointer_stringify(SYSCALLS.get());return a},getStreamFromFD:function(){var a=FS.getStream(SYSCALLS.get());if(!a){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}return a},getSocketFromFD:function(){var a=SOCKFS.getSocket(SYSCALLS.get());if(!a){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}return a},getSocketAddress:function(a){var d=SYSCALLS.get(),b=SYSCALLS.get();if(a&&d===0){return null}var c=__read_sockaddr(d,b);if(c.errno){throw new FS.ErrnoError(c.errno)}c.addr=DNS.lookup_addr(c.addr)||c.addr;return c},get64:function(){var a=SYSCALLS.get(),b=SYSCALLS.get();if(a>=0){assert(b===0)}else{assert(b===-1)}return a},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall6(d,a){SYSCALLS.varargs=a;try{var c=SYSCALLS.getStreamFromFD();FS.close(c);return 0}catch(b){if(typeof FS==="undefined"||!(b instanceof FS.ErrnoError)){abort(b)}return -b.errno}}function ___assert_fail(d,b,a,c){ABORT=true;throw"Assertion failed: "+Pointer_stringify(d)+", at: "+[b?Pointer_stringify(b):"unknown filename",a,c?Pointer_stringify(c):"unknown function"]+" at "+stackTrace()}function _sbrk(a){var b=_sbrk;if(!b.called){DYNAMICTOP=alignMemoryPage(DYNAMICTOP);b.called=true;assert(Runtime.dynamicAlloc);b.alloc=Runtime.dynamicAlloc;Runtime.dynamicAlloc=function(){abort("cannot dynamically allocate, sbrk now has control")}}var c=DYNAMICTOP;if(a!=0){var d=b.alloc(a);if(!d){return -1>>>0}}return c}function _emscripten_memcpy_big(b,c,a){HEAPU8.set(HEAPU8.subarray(c,c+a),b);return b}Module._memcpy=_memcpy;Module._memmove=_memmove;function _emscripten_set_main_loop_timing(d,g){Browser.mainLoop.timingMode=d;Browser.mainLoop.timingValue=g;if(!Browser.mainLoop.func){console.error("emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up.");return 1}if(d==0){Browser.mainLoop.scheduler=function h(){setTimeout(Browser.mainLoop.runner,g)};Browser.mainLoop.method="timeout"}else{if(d==1){Browser.mainLoop.scheduler=function b(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method="rAF"}else{if(d==2){if(!window.setImmediate){var e=[];var f="__emcc";function i(j){if(j.source===window&&j.data===f){j.stopPropagation();e.shift()()}}window.addEventListener("message",i,true);window.setImmediate=function c(j){e.push(j);window.postMessage(f,"*")}}Browser.mainLoop.scheduler=function a(){window.setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method="immediate"}}}return 0}function _emscripten_set_main_loop(d,f,c,a,b){Module.noExitRuntime=true;assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");Browser.mainLoop.func=d;Browser.mainLoop.arg=a;var g=Browser.mainLoop.currentlyRunningMainloop;Browser.mainLoop.runner=function e(){if(ABORT){return}if(Browser.mainLoop.queue.length>0){var k=Date.now();var h=Browser.mainLoop.queue.shift();h.func(h.arg);if(Browser.mainLoop.remainingBlockers){var j=Browser.mainLoop.remainingBlockers;var i=j%1==0?j-1:Math.floor(j);if(h.counted){Browser.mainLoop.remainingBlockers=i}else{i=i+0.5;Browser.mainLoop.remainingBlockers=(8*j+i)/9}}console.log('main loop blocker "'+h.name+'" took '+(Date.now()-k)+" ms");Browser.mainLoop.updateStatus();setTimeout(Browser.mainLoop.runner,0);return}if(g<Browser.mainLoop.currentlyRunningMainloop){return}Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0;if(Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}if(Browser.mainLoop.method==="timeout"&&Module.ctx){Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!");Browser.mainLoop.method=""}Browser.mainLoop.runIter(function(){if(typeof a!=="undefined"){Runtime.dynCall("vi",d,[a])}else{Runtime.dynCall("v",d)}});if(g<Browser.mainLoop.currentlyRunningMainloop){return}if(typeof SDL==="object"&&SDL.audio&&SDL.audio.queueNewAudioData){SDL.audio.queueNewAudioData()}Browser.mainLoop.scheduler()};if(!b){if(f&&f>0){_emscripten_set_main_loop_timing(0,1000/f)}else{_emscripten_set_main_loop_timing(1,1)}Browser.mainLoop.scheduler()}if(c){throw"SimulateInfiniteLoop"}}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var a=Browser.mainLoop.timingMode;var c=Browser.mainLoop.timingValue;var b=Browser.mainLoop.func;Browser.mainLoop.func=null;_emscripten_set_main_loop(b,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(a,c);Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var c=Module.statusMessage||"Please wait...";var a=Browser.mainLoop.remainingBlockers;var b=Browser.mainLoop.expectedBlockers;if(a){if(a<b){Module.setStatus(c+" ("+(b-a)+"/"+b+")")}else{Module.setStatus(c)}}else{Module.setStatus("")}}},runIter:function(b){if(ABORT){return}if(Module.preMainLoop){var a=Module.preMainLoop();if(a===false){return}}try{b()}catch(c){if(c instanceof ExitStatus){return}else{if(c&&typeof c==="object"&&c.stack){Module.printErr("exception thrown: "+[c,c.stack])}throw c}}if(Module.postMainLoop){Module.postMainLoop()}}},isFullScreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(!Module.preloadPlugins){Module.preloadPlugins=[]}if(Browser.initted){return}Browser.initted=true;try{new Blob();Browser.hasBlobConstructor=true}catch(h){Browser.hasBlobConstructor=false;console.log("warning: no blob constructor, cannot create blobs with mimetypes")}Browser.BlobBuilder=typeof MozBlobBuilder!="undefined"?MozBlobBuilder:(typeof WebKitBlobBuilder!="undefined"?WebKitBlobBuilder:(!Browser.hasBlobConstructor?console.log("warning: no BlobBuilder"):null));Browser.URLObject=typeof window!="undefined"?(window.URL?window.URL:window.webkitURL):undefined;if(!Module.noImageDecoding&&typeof Browser.URLObject==="undefined"){console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available.");Module.noImageDecoding=true}var c={};c.canHandle=function f(e){return !Module.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(e)};c.handle=function g(m,k,o,s){var t=null;if(Browser.hasBlobConstructor){try{t=new Blob([m],{type:Browser.getMimetype(k)});if(t.size!==m.length){t=new Blob([(new Uint8Array(m)).buffer],{type:Browser.getMimetype(k)})}}catch(q){Runtime.warnOnce("Blob constructor present but fails: "+q+"; falling back to blob builder")}}if(!t){var r=new Browser.BlobBuilder();r.append((new Uint8Array(m)).buffer);t=r.getBlob()}var l=Browser.URLObject.createObjectURL(t);assert(typeof l=="string","createObjectURL must return a url as a string");var p=new Image();p.onload=function u(){assert(p.complete,"Image "+k+" could not be decoded");var v=document.createElement("canvas");v.width=p.width;v.height=p.height;var e=v.getContext("2d");e.drawImage(p,0,0);Module.preloadedImages[k]=v;Browser.URLObject.revokeObjectURL(l);if(o){o(m)}};p.onerror=function n(e){console.log("Image "+l+" could not be decoded");if(s){s()}};p.src=l};Module.preloadPlugins.push(c);var a={};a.canHandle=function j(e){return !Module.noAudioDecoding&&e.substr(-4) in {".ogg":1,".wav":1,".mp3":1}};a.handle=function i(n,m,p,t){var q=false;function v(e){if(q){return}q=true;Module.preloadedAudios[m]=e;if(p){p(n)}}function o(){if(q){return}q=true;Module.preloadedAudios[m]=new Audio();if(t){t()}}if(Browser.hasBlobConstructor){try{var u=new Blob([n],{type:Browser.getMimetype(m)})}catch(s){return o()}var l=Browser.URLObject.createObjectURL(u);assert(typeof l=="string","createObjectURL must return a url as a string");var r=new Audio();r.addEventListener("canplaythrough",function(){v(r)},false);r.onerror=function k(w){if(q){return}console.log("warning: browser could not fully decode audio "+m+", trying slower base64 approach");function e(C){var y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var B="=";var z="";var E=0;var x=0;for(var A=0;A<C.length;A++){E=(E<<8)|C[A];x+=8;while(x>=6){var D=(E>>(x-6))&63;x-=6;z+=y[D]}}if(x==2){z+=y[(E&3)<<4];z+=B+B}else{if(x==4){z+=y[(E&15)<<2];z+=B}}return z}r.src="data:audio/x-"+m.substr(-3)+";base64,"+e(n);v(r)};r.src=l;Browser.safeSetTimeout(function(){v(r)},10000)}else{return o()}};Module.preloadPlugins.push(a);var d=Module.canvas;function b(){Browser.pointerLock=document.pointerLockElement===d||document.mozPointerLockElement===d||document.webkitPointerLockElement===d||document.msPointerLockElement===d}if(d){d.requestPointerLock=d.requestPointerLock||d.mozRequestPointerLock||d.webkitRequestPointerLock||d.msRequestPointerLock||function(){};d.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){};d.exitPointerLock=d.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",b,false);document.addEventListener("mozpointerlockchange",b,false);document.addEventListener("webkitpointerlockchange",b,false);document.addEventListener("mspointerlockchange",b,false);if(Module.elementPointerLock){d.addEventListener("click",function(e){if(!Browser.pointerLock&&d.requestPointerLock){d.requestPointerLock();e.preventDefault()}},false)}}},createContext:function(d,g,a,f){if(g&&Module.ctx&&d==Module.canvas){return Module.ctx}var c;var h;if(g){var b={antialias:false,alpha:false};if(f){for(var e in f){b[e]=f[e]}}h=GL.createContext(d,b);if(h){c=GL.getContext(h).GLctx}d.style.backgroundColor="black"}else{c=d.getContext("2d")}if(!c){return null}if(a){if(!g){assert(typeof GLctx==="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it")}Module.ctx=c;if(g){GL.makeContextCurrent(h)}Module.useWebGL=g;Browser.moduleContextCreatedCallbacks.forEach(function(i){i()});Browser.init()}return c},destroyContext:function(b,c,a){},fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:function(e,b,d){Browser.lockPointer=e;Browser.resizeCanvas=b;Browser.vrDevice=d;if(typeof Browser.lockPointer==="undefined"){Browser.lockPointer=true}if(typeof Browser.resizeCanvas==="undefined"){Browser.resizeCanvas=false}if(typeof Browser.vrDevice==="undefined"){Browser.vrDevice=null}var c=Module.canvas;function a(){Browser.isFullScreen=false;var g=c.parentNode;if((document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===g){c.cancelFullScreen=document.cancelFullScreen||document.mozCancelFullScreen||document.webkitCancelFullScreen||document.msExitFullscreen||document.exitFullscreen||function(){};c.cancelFullScreen=c.cancelFullScreen.bind(document);if(Browser.lockPointer){c.requestPointerLock()}Browser.isFullScreen=true;if(Browser.resizeCanvas){Browser.setFullScreenCanvasSize()}}else{g.parentNode.insertBefore(c,g);g.parentNode.removeChild(g);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}}if(Module.onFullScreen){Module.onFullScreen(Browser.isFullScreen)}Browser.updateCanvasDimensions(c)}if(!Browser.fullScreenHandlersInstalled){Browser.fullScreenHandlersInstalled=true;document.addEventListener("fullscreenchange",a,false);document.addEventListener("mozfullscreenchange",a,false);document.addEventListener("webkitfullscreenchange",a,false);document.addEventListener("MSFullscreenChange",a,false)}var f=document.createElement("div");c.parentNode.insertBefore(f,c);f.appendChild(c);f.requestFullScreen=f.requestFullScreen||f.mozRequestFullScreen||f.msRequestFullscreen||(f.webkitRequestFullScreen?function(){f.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null);if(d){f.requestFullScreen({vrDisplay:d})}else{f.requestFullScreen()}},nextRAF:0,fakeRequestAnimationFrame:function(c){var b=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=b+1000/60}else{while(b+2>=Browser.nextRAF){Browser.nextRAF+=1000/60}}var a=Math.max(Browser.nextRAF-b,0);setTimeout(c,a)},requestAnimationFrame:function requestAnimationFrame(a){if(typeof window==="undefined"){Browser.fakeRequestAnimationFrame(a)}else{if(!window.requestAnimationFrame){window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame}window.requestAnimationFrame(a)}},safeCallback:function(a){return function(){if(!ABORT){return a.apply(null,arguments)}}},allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=false},resumeAsyncCallbacks:function(){Browser.allowAsyncCallbacks=true;if(Browser.queuedAsyncCallbacks.length>0){var a=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[];a.forEach(function(b){b()})}},safeRequestAnimationFrame:function(a){return Browser.requestAnimationFrame(function(){if(ABORT){return}if(Browser.allowAsyncCallbacks){a()}else{Browser.queuedAsyncCallbacks.push(a)}})},safeSetTimeout:function(a,b){Module.noExitRuntime=true;return setTimeout(function(){if(ABORT){return}if(Browser.allowAsyncCallbacks){a()}else{Browser.queuedAsyncCallbacks.push(a)}},b)},safeSetInterval:function(a,b){Module.noExitRuntime=true;return setInterval(function(){if(ABORT){return}if(Browser.allowAsyncCallbacks){a()}},b)},getMimetype:function(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)]},getUserMedia:function(a){if(!window.getUserMedia){window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia}window.getUserMedia(a)},getMovementX:function(a){return a.movementX||a.mozMovementX||a.webkitMovementX||0},getMovementY:function(a){return a.movementY||a.mozMovementY||a.webkitMovementY||0},getMouseWheelDelta:function(a){var b=0;switch(a.type){case"DOMMouseScroll":b=a.detail;break;case"mousewheel":b=a.wheelDelta;break;case"wheel":b=a.deltaY;break;default:throw"unrecognized mouse wheel event: "+a.type}return b},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(b){if(Browser.pointerLock){if(b.type!="mousemove"&&("mozMovementX" in b)){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(b);Browser.mouseMovementY=Browser.getMovementY(b)}if(typeof SDL!="undefined"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var h=Module.canvas.getBoundingClientRect();var e=Module.canvas.width;var a=Module.canvas.height;var m=((typeof window.scrollX!=="undefined")?window.scrollX:window.pageXOffset);var k=((typeof window.scrollY!=="undefined")?window.scrollY:window.pageYOffset);assert((typeof m!=="undefined")&&(typeof k!=="undefined"),"Unable to retrieve scroll position, mouse positions likely broken.");if(b.type==="touchstart"||b.type==="touchend"||b.type==="touchmove"){var f=b.touch;if(f===undefined){return}var d=f.pageX-(m+h.left);var c=f.pageY-(k+h.top);d=d*(e/h.width);c=c*(a/h.height);var j={x:d,y:c};if(b.type==="touchstart"){Browser.lastTouches[f.identifier]=j;Browser.touches[f.identifier]=j}else{if(b.type==="touchend"||b.type==="touchmove"){var l=Browser.touches[f.identifier];if(!l){l=j}Browser.lastTouches[f.identifier]=l;Browser.touches[f.identifier]=j}}return}var i=b.pageX-(m+h.left);var g=b.pageY-(k+h.top);i=i*(e/h.width);g=g*(a/h.height);Browser.mouseMovementX=i-Browser.mouseX;Browser.mouseMovementY=g-Browser.mouseY;Browser.mouseX=i;Browser.mouseY=g}},xhrLoad:function(b,d,a){var e=new XMLHttpRequest();e.open("GET",b,true);e.responseType="arraybuffer";e.onload=function c(){if(e.status==200||(e.status==0&&e.response)){d(e.response)}else{a()}};e.onerror=a;e.send(null)},asyncLoad:function(b,d,a,c){Browser.xhrLoad(b,function(e){assert(e,'Loading data file "'+b+'" failed (no arrayBuffer).');d(new Uint8Array(e));if(!c){removeRunDependency("al "+b)}},function(e){if(a){a()}else{throw'Loading data file "'+b+'" failed.'}});if(!c){addRunDependency("al "+b)}},resizeListeners:[],updateResizeListeners:function(){var a=Module.canvas;Browser.resizeListeners.forEach(function(b){b(a.width,a.height)})},setCanvasSize:function(d,b,a){var c=Module.canvas;Browser.updateCanvasDimensions(c,d,b);if(!a){Browser.updateResizeListeners()}},windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:function(){if(typeof SDL!="undefined"){var a=HEAPU32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)];a=a|8388608;HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=a}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var a=HEAPU32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)];a=a&~8388608;HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=a}Browser.updateResizeListeners()},updateCanvasDimensions:function(c,f,b){if(f&&b){c.widthNative=f;c.heightNative=b}else{f=c.widthNative;b=c.heightNative}var a=f;var e=b;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0){if(a/e<Module.forcedAspectRatio){a=Math.round(e*Module.forcedAspectRatio)}else{e=Math.round(a/Module.forcedAspectRatio)}}if(((document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===c.parentNode)&&(typeof screen!="undefined")){var d=Math.min(screen.width/a,screen.height/e);a=Math.round(a*d);e=Math.round(e*d)}if(Browser.resizeCanvas){if(c.width!=a){c.width=a}if(c.height!=e){c.height=e}if(typeof c.style!="undefined"){c.style.removeProperty("width");c.style.removeProperty("height")}}else{if(c.width!=f){c.width=f}if(c.height!=b){c.height=b}if(typeof c.style!="undefined"){if(a!=f||e!=b){c.style.setProperty("width",a+"px","important");c.style.setProperty("height",e+"px","important")}else{c.style.removeProperty("width");c.style.removeProperty("height")}}}},wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function(){var a=Browser.nextWgetRequestHandle;Browser.nextWgetRequestHandle++;return a}};function _time(b){var a=(Date.now()/1000)|0;if(b){HEAP32[((b)>>2)]=a}return a}function _pthread_self(){return 0}function ___syscall140(b,g){SYSCALLS.varargs=g;try{var i=SYSCALLS.getStreamFromFD(),h=SYSCALLS.get(),d=SYSCALLS.get(),j=SYSCALLS.get(),a=SYSCALLS.get();var c=d;assert(h===0);FS.llseek(i,c,a);HEAP32[((j)>>2)]=i.position;if(i.getdents&&c===0&&a===0){i.getdents=null}return 0}catch(f){if(typeof FS==="undefined"||!(f instanceof FS.ErrnoError)){abort(f)}return -f.errno}}function ___syscall146(g,b){SYSCALLS.varargs=b;try{var f=SYSCALLS.getStreamFromFD(),a=SYSCALLS.get(),c=SYSCALLS.get();return SYSCALLS.doWritev(f,a,c)}catch(d){if(typeof FS==="undefined"||!(d instanceof FS.ErrnoError)){abort(d)}return -d.errno}}function ___syscall54(f,a){SYSCALLS.varargs=a;try{var d=SYSCALLS.getStreamFromFD(),g=SYSCALLS.get();switch(g){case 21505:if(!d.tty){return -ERRNO_CODES.ENOTTY}return 0;case 21506:if(!d.tty){return -ERRNO_CODES.ENOTTY}return 0;case 21519:if(!d.tty){return -ERRNO_CODES.ENOTTY}var b=SYSCALLS.get();HEAP32[((b)>>2)]=0;return 0;case 21520:if(!d.tty){return -ERRNO_CODES.ENOTTY}return -ERRNO_CODES.EINVAL;case 21531:var b=SYSCALLS.get();return FS.ioctl(d,g,b);default:abort("bad ioctl syscall "+g)}}catch(c){if(typeof FS==="undefined"||!(c instanceof FS.ErrnoError)){abort(c)}return -c.errno}}FS.staticInit();__ATINIT__.unshift(function(){if(!Module.noFSInit&&!FS.init.initialized){FS.init()}});__ATMAIN__.push(function(){FS.ignorePermissions=false});__ATEXIT__.push(function(){FS.quit()});Module.FS_createFolder=FS.createFolder;Module.FS_createPath=FS.createPath;Module.FS_createDataFile=FS.createDataFile;Module.FS_createPreloadedFile=FS.createPreloadedFile;Module.FS_createLazyFile=FS.createLazyFile;Module.FS_createLink=FS.createLink;Module.FS_createDevice=FS.createDevice;Module.FS_unlink=FS.unlink;__ATINIT__.unshift(function(){TTY.init()});__ATEXIT__.push(function(){TTY.shutdown()});if(ENVIRONMENT_IS_NODE){var fs=require("fs");var NODEJS_PATH=require("path");NODEFS.staticInit()}Module.requestFullScreen=function Module_requestFullScreen(c,a,b){Browser.requestFullScreen(c,a,b)};Module.requestAnimationFrame=function Module_requestAnimationFrame(a){Browser.requestAnimationFrame(a)};Module.setCanvasSize=function Module_setCanvasSize(c,b,a){Browser.setCanvasSize(c,b,a)};Module.pauseMainLoop=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module.resumeMainLoop=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module.getUserMedia=function Module_getUserMedia(){Browser.getUserMedia()};Module.createContext=function Module_createContext(b,d,a,c){return Browser.createContext(b,d,a,c)};STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP);staticSealed=true;STACK_MAX=STACK_BASE+TOTAL_STACK;DYNAMIC_BASE=DYNAMICTOP=Runtime.alignMemory(STACK_MAX);assert(DYNAMIC_BASE<TOTAL_MEMORY,"TOTAL_MEMORY not big enough for stack");function nullFunc_ii(a){Module.printErr("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");Module.printErr("Build with ASSERTIONS=2 for more info.");abort(a)}function nullFunc_iiii(a){Module.printErr("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");Module.printErr("Build with ASSERTIONS=2 for more info.");abort(a)}function nullFunc_vi(a){Module.printErr("Invalid function pointer called with signature 'vi'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");Module.printErr("Build with ASSERTIONS=2 for more info.");abort(a)}function invoke_ii(b,a){try{return Module.dynCall_ii(b,a)}catch(c){if(typeof c!=="number"&&c!=="longjmp"){throw c}asm.setThrew(1,0)}}function invoke_iiii(c,b,a,f){try{return Module.dynCall_iiii(c,b,a,f)}catch(d){if(typeof d!=="number"&&d!=="longjmp"){throw d}asm.setThrew(1,0)}}function invoke_vi(b,a){try{Module.dynCall_vi(b,a)}catch(c){if(typeof c!=="number"&&c!=="longjmp"){throw c}asm.setThrew(1,0)}}Module.asmGlobalArg={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array,"NaN":NaN,"Infinity":Infinity};Module.asmLibraryArg={abort:abort,assert:assert,nullFunc_ii:nullFunc_ii,nullFunc_iiii:nullFunc_iiii,nullFunc_vi:nullFunc_vi,invoke_ii:invoke_ii,invoke_iiii:invoke_iiii,invoke_vi:invoke_vi,_pthread_cleanup_pop:_pthread_cleanup_pop,_pthread_self:_pthread_self,_sysconf:_sysconf,___lock:___lock,___syscall6:___syscall6,___setErrNo:___setErrNo,_abort:_abort,_sbrk:_sbrk,_time:_time,___assert_fail:___assert_fail,_pthread_cleanup_push:_pthread_cleanup_push,_emscripten_memcpy_big:_emscripten_memcpy_big,___syscall54:___syscall54,___unlock:___unlock,___syscall140:___syscall140,_emscripten_set_main_loop_timing:_emscripten_set_main_loop_timing,_emscripten_set_main_loop:_emscripten_set_main_loop,___syscall146:___syscall146,STACKTOP:STACKTOP,STACK_MAX:STACK_MAX,tempDoublePtr:tempDoublePtr,ABORT:ABORT};var asm=(function(x,P,aD){var bg=new x.Int8Array(aD);var A=new x.Int16Array(aD);var bl=new x.Int32Array(aD);var W=new x.Uint8Array(aD);var be=new x.Uint16Array(aD);var am=new x.Uint32Array(aD);var g=new x.Float32Array(aD);var al=new x.Float64Array(aD);var Z=P.STACKTOP|0;var aY=P.STACK_MAX|0;var aQ=P.tempDoublePtr|0;var z=P.ABORT|0;var a2=0;var F=0;var aH=0;var aJ=0;var w=x.NaN,K=x.Infinity;var au=0,br=0,bq=0,bn=0,bo=0,b=0,d=0,bt=0,l=0;var bb=0;var a9=0;var a8=0;var a5=0;var a3=0;var a1=0;var aZ=0;var aX=0;var aW=0;var aV=0;var j=x.Math.floor;var a=x.Math.abs;var H=x.Math.sqrt;var X=x.Math.pow;var aT=x.Math.cos;var M=x.Math.sin;var ao=x.Math.tan;var aM=x.Math.acos;var C=x.Math.asin;var aj=x.Math.atan;var v=x.Math.atan2;var L=x.Math.exp;var aq=x.Math.log;var aL=x.Math.ceil;var aF=x.Math.imul;var ai=x.Math.min;var Y=x.Math.clz32;var ax=P.abort;var p=P.assert;var S=P.nullFunc_ii;var ac=P.nullFunc_iiii;var D=P.nullFunc_vi;var av=P.invoke_ii;var O=P.invoke_iiii;var ak=P.invoke_vi;var a6=P._pthread_cleanup_pop;var ar=P._pthread_self;var aC=P._sysconf;var ay=P.___lock;var bv=P.___syscall6;var o=P.___setErrNo;var af=P._abort;var bm=P._sbrk;var ap=P._time;var u=P.___assert_fail;var aB=P._pthread_cleanup_push;var J=P._emscripten_memcpy_big;var i=P.___syscall54;var h=P.___unlock;var aa=P.___syscall140;var bj=P._emscripten_set_main_loop_timing;var ba=P._emscripten_set_main_loop;var V=P.___syscall146;var Q=0;function r(bx){bx=bx|0;var bw=0;bw=Z;Z=(Z+bx)|0;Z=(Z+15)&-16;if((Z|0)>=(aY|0)){ax()}return bw|0}function ad(){return Z|0}function bi(bw){bw=bw|0;Z=bw}function T(bx,bw){bx=bx|0;bw=bw|0;Z=bx;aY=bw}function e(bx,bw){bx=bx|0;bw=bw|0;if((a2|0)==0){a2=bx;F=bw}}function bu(bw){bw=bw|0;bg[aQ>>0]=bg[bw>>0];bg[aQ+1>>0]=bg[bw+1>>0];bg[aQ+2>>0]=bg[bw+2>>0];bg[aQ+3>>0]=bg[bw+3>>0]}function m(bw){bw=bw|0;bg[aQ>>0]=bg[bw>>0];bg[aQ+1>>0]=bg[bw+1>>0];bg[aQ+2>>0]=bg[bw+2>>0];bg[aQ+3>>0]=bg[bw+3>>0];bg[aQ+4>>0]=bg[bw+4>>0];bg[aQ+5>>0]=bg[bw+5>>0];bg[aQ+6>>0]=bg[bw+6>>0];bg[aQ+7>>0]=bg[bw+7>>0]}function k(bw){bw=bw|0;bb=bw}function U(){return bb|0}function t(dO,dR){dO=dO|0;dR=dR|0;var eq=0,ep=0,dj=0,d6=0,d5=0,d4=0,d3=0,d2=0,d1=0,dZ=0,dX=0,dW=0,dV=0,dh=0,dN=0,dM=0,dL=0,dK=0,dJ=0,dI=0;var dH=0,dG=0,dF=0,dE=0,df=0,dD=0,dC=0,dB=0,dA=0,dz=0,dy=0,dx=0,dw=0,dv=0,du=0,de=0,ds=0,dr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d1=d2&255;dZ=dT;dX=d0;dW=((dX)+(dZ)|0);dV=bg[dW>>0]|0;dN=dV&255;dM=dt;dL=dM&255;dK=(1700+(dL<<8)|0);dJ=((dK)+(dN)|0);dI=bg[dJ>>0]|0;dH=dI&255;dG=d1^dH;dF=dG&255;dE=dT;dD=((dE)-1)|0;dC=d0;dB=((dC)+(dD)|0);bg[dB>>0]=dF;dA=dP;dz=dA&255;dy=dt;dx=dy&255;dw=(1700+(dx<<8)|0);dv=((dw)+(dz)|0);du=bg[dv>>0]|0;ds=du&255;dr=dT;dq=((dr)-1)|0;dp=d0;dn=((dp)+(dq)|0);dm=bg[dn>>0]|0;dl=dm&255;dk=ds^dl;di=dk&255;dP=di;dg=dT;c7=((dg)+-1)|0;dT=c7}bL=0;while(1){c6=bL;c5=ep;c4=(c6>>>0)<(c5>>>0);if(!(c4)){break}c3=bL;c2=d0;c1=((c2)+(c3)|0);c0=bg[c1>>0]|0;cY=c0&255;cW=dP;cM=cW&255;cL=(67236+(cM)|0);cK=bg[cL>>0]|0;cJ=cK&255;cI=(1700+(cJ<<8)|0);cH=((cI)+(cY)|0);cG=bg[cH>>0]|0;cF=bL;cD=ep;cB=aF(cF,cD)|0;cr=cN;cq=((cB)+(cr))|0;cp=eq;co=((cp)+(cq)|0);bg[co>>0]=cG;cn=bL;cm=((cn)+1)|0;bL=cm}cl=cN;ck=((cl)+1)|0;cN=ck}ci=dY;B(ci);cg=d0;B(cg);b7=dQ;B(b7);Z=cu;return}function a0(bU){bU=bU|0;var bF=0,bE=0,bQ=0,bP=0,bO=0,bN=0,bM=0,bL=0,bK=0,bJ=0,bI=0,bH=0,bD=0,bX=0,bW=0,bV=0,bT=0,bS=0,bC=0,bB=0;var bA=0,bz=0,by=0,bx=0,bw=0,bG=0,bR=0;bR=Z;Z=Z+16|0;if((Z|0)>=(aY|0)){ax()}bF=bU;bE=bF;bD=(bE|0)!=(0|0);if(!(bD)){u((67492|0),(67581|0),409,(67587|0))}bC=bF;bB=bl[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)){ax()}dD=cU;dC=cT;dB=bl[8>>2]|0;dA=(dB|0)==(0);if(dA){aI()}dz=(az(12)|0);ci=dz;dy=dD;dw=ci;du=(((dw))+4|0);A[du>>1]=dy;dt=dC;ds=ci;c9=(((ds))+6|0);A[c9>>1]=dt;c7=dC;c5=c7&65535;c3=dD;c1=c3&65535;cZ=aF(c5,c1)|0;cY=(az(cZ)|0);cX=ci;cW=(((cX))+8|0);bl[cW>>2]=cY;cV=dD;cM=cV&65535;cK=-20181524^cM;cI=dC;cG=cI&65535;cE=cK^cG;cC=ci;cB=(((cC))+8|0);cA=bl[cB>>2]|0;cz=cA;cy=cE^cz;co=ci;bl[co>>2]=cy;cl=dC;ch=cl&65535;ce=dD;cb=ce&65535;b8=aF(ch,cb)|0;b6=(az(b8)|0);bH=b6;b5=bH;bg[b5>>0]=1;b2=1;while(1){b4=b2;b3=dD;bX=b3&65535;bV=(b4>>>0)<(bX>>>0);if(!(bV)){break}bS=b2;bQ=bH;bO=((bQ)+(bS)|0);bg[bO>>0]=0;bM=b2;bL=((bM)+1)|0;b2=bL}bJ=bH;bI=dD;bG=bI&65535;bA=((bJ)+(bG)|0);cS=bA;df=0;while(1){by=df;bw=dC;dM=bw&65535;dK=((dM)-1)|0;dI=(by>>>0)<(dK>>>0);if(!(dI)){break}b2=0;while(1){dH=b2;dG=dD;dF=dG&65535;dE=(dH>>>0)<(dF>>>0);dr=df;if(!(dE)){break}dq=b2;dp=aF(dr,dq)|0;dn=(an(dp)|0);dm=dn&255;dl=(67596+(dm)|0);dk=bg[dl>>0]|0;dj=b2;di=cS;dh=((di)+(dj)|0);bg[dh>>0]=dk;de=b2;dd=((de)+1)|0;b2=dd}dc=((dr)+1)|0;df=dc;db=dD;da=db&65535;c8=cS;c6=((c8)+(da)|0);cS=c6}c4=bH;c2=dD;c0=c2&65535;t(c4,c0);cR=bH;cQ=dD;cP=cQ&65535;cO=dD;cN=cO&65535;cL=aF(cP,cN)|0;cJ=((cR)+(cL)|0);cH=bH;cF=ci;cD=(((cF))+8|0);cx=bl[cD>>2]|0;cv=dD;ct=cv&65535;cr=dD;cp=cr&65535;cm=aF(ct,cp)|0;cj=((cx)+(cm)|0);cf=dC;cc=cf&65535;b9=dD;cw=b9&65535;cu=((cc)-(cw))|0;cs=dD;cq=cs&65535;cn=dD;ck=cn&65535;s(cJ,cH,cj,cu,cq,ck);cg=ci;cd=(((cg))+8|0);ca=bl[cd>>2]|0;b7=dD;b1=b7&65535;b0=dD;bZ=b0&65535;bY=aF(b1,bZ)|0;bW=bY;G((ca|0),0,(bW|0))|0;bU=ci;bT=(((bU))+8|0);bR=bl[bT>>2]|0;cS=bR;b2=0;while(1){bP=b2;bN=dD;bF=bN&65535;bE=(bP>>>0)<(bF>>>0);if(!(bE)){break}bD=cS;bg[bD>>0]=1;bC=b2;bB=((bC)+1)|0;b2=bB;bz=dD;bx=bz&65535;dN=((bx)+1)|0;dL=cS;dJ=((dL)+(dN)|0);cS=dJ}dx=bH;B(dx);dv=ci;Z=dg;return(dv|0)}function aI(){var bw=0,bx=0;bx=Z;aO();ah();bl[8>>2]=1;return}function an(bD){bD=bD|0;var bG=0,bF=0,bH=0,bE=0,bC=0,bB=0,bA=0,bz=0,bx=0,bw=0,bJ=0,bI=0,by=0;by=Z;Z=Z+16|0;if((Z|0)>=(aY|0)){ax()}bG=bD;while(1){bF=bG;bE=(bF|0)>=(255);bC=bG;if(!(bE)){break}bB=((bC)-255)|0;bG=bB;bA=bG;bz=bA>>8;bx=bG;bw=bx&255;bJ=((bz)+(bw))|0;bG=bJ}bH=bC&255;Z=by;return(bH|0)}function s(bI,bH,bG,bA,bD,bC){bI=bI|0;bH=bH|0;bG=bG|0;bA=bA|0;bD=bD|0;bC=bC|0;var cp=0,co=0,b3=0,b1=0,bZ=0,bX=0,bV=0,bS=0,bQ=0,bO=0,bL=0,bJ=0,cn=0,bx=0,cC=0,cA=0,cy=0,cx=0,cw=0,cu=0;var ct=0,cs=0,cr=0,cm=0,cj=0,ch=0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G=c4;bE=(((bG))+8|0);bD=bl[bE>>2]|0;bC=((bD)+(bH)|0);cm=bC;co=0;while(1){bz=co;by=bz&255;bx=c4;db=(((bx))+4|0);da=A[db>>1]|0;c9=da&65535;c8=(by|0)<(c9|0);if(!(c8)){break}c7=co;c6=c7&255;c5=cm;cU=((c5)+(c6)|0);cT=bg[cU>>0]|0;cS=cT&255;cR=(cS|0)!=(0);if(cR){cQ=cp;cP=cQ&255;cO=c2;cN=((cO)+(cP<<2)|0);cM=bl[cN>>2]|0;cL=cn;cJ=((cM)+(cL)|0);cI=co;cH=cI&255;cG=c3;cF=((cG)+(cH<<2)|0);cD=bl[cF>>2]|0;cB=cn;cz=((cD)+(cB)|0);cx=co;cv=cx&255;ci=cm;ch=((ci)+(cv)|0);cg=bg[ch>>0]|0;cf=cl;aE(cJ,cz,cg,cf)}ce=co;cc=((ce)+1)<<24>>24;co=cc}ca=cp;b7=((ca)+1)<<24>>24;cp=b7}b5=cn;b3=((b5)+8192)|0;cn=b3}if((bF|0)==8){u((68106|0),(67581|0),476,(68124|0))}else{if((bF|0)==16){Z=cK;return}}}function aE(c9,e0,e4,bG){c9=c9|0;e0=e0|0;e4=e4|0;bG=bG|0;var fI=0,fH=0,ew=0,fb=0,fa=0,e9=0,e8=0,e7=0,e6=0,e5=0,e3=0,e2=0,e1=0,eu=0,eZ=0,eY=0,eX=0,eW=0,eV=0,eU=0;var eT=0,eS=0,eR=0,eQ=0,es=0,eO=0,eN=0,eM=0,eL=0,eK=0,eJ=0,eI=0,eH=0,eG=0,eF=0,er=0,eE=0,eD=0,eC=0,eB=0;var eA=0,ez=0,ey=0,ex=0,ev=0,et=0,eq=0,ek=0,ej=0,ei=0,eh=0,eg=0,ef=0,ee=0,ed=0,eb=0,d9=0,ep=0,d0=0,dZ=0;var dY=0,dX=0,dW=0,dV=0,dU=0,dT=0,dS=0,dQ=0,eo=0,dF=0,dE=0,dD=0,dC=0,dB=0,dA=0,dz=0,dy=0,dx=0,du=0,en=0;var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)+1)|0;fB=fI;fA=((fB)+(fC)|0);bF=fA;fz=fG;ew=fz&255;eu=(1700+(ew<<8)|0);eP=eu;while(1){es=fI;er=bF;eq=(es>>>0)<(er>>>0);if(!(eq)){break}ep=fH;eo=bg[ep>>0]|0;en=eo&255;em=eP;el=((em)+(en)|0);ec=bg[el>>0]|0;ea=ec&255;d8=fI;d7=bg[d8>>0]|0;d6=d7&255;d5=d6^ea;d4=d5&255;bg[d8>>0]=d4;d3=fH;d2=(((d3))+1|0);d1=bg[d2>>0]|0;dR=d1&255;dP=eP;dO=((dP)+(dR)|0);dN=bg[dO>>0]|0;dM=dN&255;dL=fI;dK=(((dL))+1|0);dJ=bg[dK>>0]|0;dH=dJ&255;dG=dH^dM;dw=dG&255;bg[dK>>0]=dw;dt=fH;dr=(((dt))+2|0);dp=bg[dr>>0]|0;dm=dp&255;dk=eP;di=((dk)+(dm)|0);dg=bg[di>>0]|0;de=dg&255;dc=fI;c0=(((dc))+2|0);cX=bg[c0>>0]|0;cV=cX&255;cT=cV^de;cR=cT&255;bg[c0>>0]=cR;cP=fH;cN=(((cP))+3|0);cL=bg[cN>>0]|0;cJ=cL&255;cH=eP;cv=((cH)+(cJ)|0);cs=bg[cv>>0]|0;cq=cs&255;co=fI;cm=(((co))+3|0);ck=bg[cm>>0]|0;ci=ck&255;cg=ci^cq;ce=cg&255;bg[cm>>0]=ce;cc=fH;b1=(((cc))+4|0);bY=bg[b1>>0]|0;bW=bY&255;bU=eP;bS=((bU)+(bW)|0);bQ=bg[bS>>0]|0;bO=bQ&255;bM=fI;bK=(((bM))+4|0);bI=bg[bK>>0]|0;bE=bI&255;bC=bE^bO;bA=bC&255;bg[bK>>0]=bA;by=fH;bw=(((by))+5|0);fS=bg[bw>>0]|0;fQ=fS&255;fO=eP;fM=((fO)+(fQ)|0);fK=bg[fM>>0]|0;fy=fK&255;fw=fI;fu=(((fw))+5|0);fr=bg[fu>>0]|0;fp=fr&255;fn=fp^fy;fl=fn&255;bg[fu>>0]=fl;fj=fH;fh=(((fj))+6|0);ff=bg[fh>>0]|0;fb=ff&255;fa=eP;e9=((fa)+(fb)|0);e8=bg[e9>>0]|0;e7=e8&255;e6=fI;e5=(((e6))+6|0);e3=bg[e5>>0]|0;e2=e3&255;e1=e2^e7;eZ=e1&255;bg[e5>>0]=eZ;eY=fH;eX=(((eY))+7|0);eW=bg[eX>>0]|0;eV=eW&255;eU=eP;eT=((eU)+(eV)|0);eS=bg[eT>>0]|0;eR=eS&255;eQ=fI;eO=(((eQ))+7|0);eN=bg[eO>>0]|0;eM=eN&255;eL=eM^eR;eK=eL&255;bg[eO>>0]=eK;eJ=fH;eI=(((eJ))+8|0);eH=bg[eI>>0]|0;eG=eH&255;eF=eP;eE=((eF)+(eG)|0);eD=bg[eE>>0]|0;eC=eD&255;eB=fI;eA=(((eB))+8|0);ez=bg[eA>>0]|0;ey=ez&255;ex=ey^eC;ev=ex&255;bg[eA>>0]=ev;et=fH;ek=(((et))+9|0);ej=bg[ek>>0]|0;ei=ej&255;eh=eP;eg=((eh)+(ei)|0);ef=bg[eg>>0]|0;ee=ef&255;ed=fI;eb=(((ed))+9|0);d9=bg[eb>>0]|0;d0=d9&255;dZ=d0^ee;dY=dZ&255;bg[eb>>0]=dY;dX=fH;dW=(((dX))+10|0);dV=bg[dW>>0]|0;dU=dV&255;dT=eP;dS=((dT)+(dU)|0);dQ=bg[dS>>0]|0;dF=dQ&255;dE=fI;dD=(((dE))+10|0);dC=bg[dD>>0]|0;dB=dC&255;dA=dB^dF;dz=dA&255;bg[dD>>0]=dz;dy=fH;dx=(((dy))+11|0);du=bg[dx>>0]|0;da=du&255;c8=eP;c7=((c8)+(da)|0);c6=bg[c7>>0]|0;c5=c6&255;c4=fI;c3=(((c4))+11|0);c2=bg[c3>>0]|0;c1=c2&255;cY=c1^c5;cE=cY&255;bg[c3>>0]=cE;cD=fH;cC=(((cD))+12|0);cB=bg[cC>>0]|0;cA=cB&255;cz=eP;cy=((cz)+(cA)|0);cx=bg[cy>>0]|0;cw=cx&255;ct=fI;ca=(((ct))+12|0);b9=bg[ca>>0]|0;b8=b9&255;b7=b8^cw;b6=b7&255;bg[ca>>0]=b6;b5=fH;b4=(((b5))+13|0);b3=bg[b4>>0]|0;b2=b3&255;b0=eP;dv=((b0)+(b2)|0);ds=bg[dv>>0]|0;dq=ds&255;dn=fI;dl=(((dn))+13|0);dj=bg[dl>>0]|0;dh=dj&255;df=dh^dq;dd=df&255;bg[dl>>0]=dd;db=fH;cZ=(((db))+14|0);cW=bg[cZ>>0]|0;cU=cW&255;cS=eP;cQ=((cS)+(cU)|0);cO=bg[cQ>>0]|0;cM=cO&255;cK=fI;cI=(((cK))+14|0);cG=bg[cI>>0]|0;cu=cG&255;cr=cu^cM;cp=cr&255;bg[cI>>0]=cp;cn=fH;cl=(((cn))+15|0);cj=bg[cl>>0]|0;ch=cj&255;cf=eP;cd=((cf)+(ch)|0);cb=bg[cd>>0]|0;bZ=cb&255;bX=fI;bV=(((bX))+15|0);bT=bg[bV>>0]|0;bR=bT&255;bP=bR^bZ;bN=bP&255;bg[bV>>0]=bN;bL=fI;bJ=(((bL))+16|0);fI=bJ;bH=fH;bD=(((bH))+16|0);fH=bD}bB=bF;bz=(((bB))+15|0);bF=bz;while(1){bx=fI;fT=bF;fR=(bx>>>0)<(fT>>>0);if(!(fR)){break}fP=fH;fN=bg[fP>>0]|0;fL=fN&255;fJ=eP;fx=((fJ)+(fL)|0);fv=bg[fx>>0]|0;ft=fv&255;fq=fI;fo=bg[fq>>0]|0;fm=fo&255;fk=fm^ft;fi=fk&255;bg[fq>>0]=fi;fg=fI;fe=(((fg))+1|0);fI=fe;fd=fH;fc=(((fd))+1|0);fH=fc}Z=dI;return}function n(bC,bA,by,b6){bC=bC|0;bA=bA|0;by=by|0;b6=b6|0;var cb=0,ca=0,bO=0,bM=0,bK=0,bJ=0,bI=0,bG=0,bF=0,bE=0,bD=0,bB=0,b9=0,bw=0,cl=0,ck=0,cj=0,ci=0,ch=0,c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0,dU=0,dT=0;var dm=0,dS=0,dR=0,dQ=0,dP=0,dO=0,dN=0,dM=0,dL=0,dK=0,dJ=0,dl=0,dH=0,dG=0,dF=0,dE=0,dD=0,dC=0,dB=0,dA=0;var dz=0,dy=0,dk=0,bW=0,dj=0,dI=0,bT=0,fr=0,fd=0,dw=0,ex=0,dx=0,dh=0,fR=0,cW=0,ff=0,eX=0,fZ=0,cI=0;cI=Z;Z=Z+64|0;if((Z|0)>=(aY|0)){ax()}dv=fD;du=di;ex=0;dI=0;dt=du;ds=dt<<2;dr=(az(ds)|0);fr=dr;dq=du;dp=dq<<2;dn=(az(dp)|0);fd=dn;dm=du;dl=dm<<2;fq=(az(dl)|0);dw=fq;fp=du;fo=fp;fn=(az(fo)|0);bT=fn;fm=bT;fl=du;fk=fl;G((fm|0),0,(fk|0))|0;dj=0;while(1){fj=dj;fi=du;fh=(fj>>>0)<(fi>>>0);if(!(fh)){break}e4=dj;e3=dw;e2=((e3)+(e4<<2)|0);bl[e2>>2]=0;e1=dj;e0=((e1)+1)|0;dj=e0}bW=0;L5:while(1){eZ=bW;eY=du;eW=(eZ>>>0)<(eY>>>0);if(!(eW)){fZ=40;break}eV=bW;eU=dw;eJ=((eU)+(eV<<2)|0);eI=bl[eJ>>2]|0;eH=(eI|0)!=(1);if(eH){eG=bW;eF=du;eE=aF(eG,eF)|0;eD=bW;eC=((eE)+(eD))|0;eB=dv;eA=((eB)+(eC)|0);ew=bg[eA>>0]|0;ev=ew&255;eu=(ev|0)!=(0);if(eu){et=bW;ex=et;es=bW;dI=es}else{fZ=9}}else{fZ=9}L11:do{if((fZ|0)==9){fZ=0;cW=0;L13:while(1){er=cW;eq=du;ep=(er>>>0)<(eq>>>0);if(!(ep)){break L11}eo=cW;en=dw;em=((en)+(eo<<2)|0);el=bl[em>>2]|0;ek=(el|0)!=(1);L16:do{if(ek){dx=0;while(1){ej=dx;ei=du;eh=(ej>>>0)<(ei>>>0);if(!(eh)){break L16}eg=dx;ef=dw;ee=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cA=fR;cz=((cA)+(cB)|0);cy=bg[cz>>0]|0;dk=cy;cx=dk;cw=cx&255;cv=(cw|0)!=(0);if(!(cv)){fZ=27;break}cu=dk;ct=cu&255;cs=(ct|0)!=(1);L36:do{if(cs){cr=dk;cq=cr&255;cp=(67236+(cq)|0);co=bg[cp>>0]|0;dk=co;cn=dI;cm=fR;cl=((cm)+(cn)|0);bg[cl>>0]=1;dx=0;while(1){ck=dx;cj=du;ci=(ck>>>0)<(cj>>>0);if(!(ci)){break L36}ch=dx;cg=fR;cf=((cg)+(ch)|0);ce=bg[cf>>0]|0;cd=ce&255;cc=dk;cb=cc&255;ca=(1700+(cb<<8)|0);b9=((ca)+(cd)|0);b7=bg[b9>>0]|0;b5=dx;bV=fR;bU=((bV)+(b5)|0);bg[bU>>0]=b7;bS=dx;bR=((bS)+1)|0;dx=bR}}}while(0);bQ=dI;bP=bT;bO=((bP)+(bQ)|0);bg[bO>>0]=1;bN=fR;bL=bT;bJ=du;bA=bJ;bz=(ag(bN,bL,bA)|0);by=(bz|0)!=(0);L42:do{if(by){bx=dv;dh=bx;dx=0;while(1){bw=dx;go=du;gn=(bw>>>0)<(go>>>0);if(!(gn)){break L42}gm=dx;gk=dI;gi=(gm|0)!=(gk|0);if(gi){f9=dI;f8=dh;f7=((f8)+(f9)|0);f6=bg[f7>>0]|0;dk=f6;f5=dI;f4=dh;f3=((f4)+(f5)|0);bg[f3>>0]=0;f2=dk;f0=f2&255;fX=(f0|0)!=(0);if(fX){b8=dh;b6=fR;b4=dk;b3=du;aE(b8,b6,b4,b3)}}b2=dx;b1=((b2)+1)|0;dx=b1;b0=du;bZ=dh;bY=((bZ)+(b0)|0);dh=bY}}}while(0);bX=dI;bM=bT;bK=((bM)+(bX)|0);bg[bK>>0]=0;bI=bW;bH=((bI)+1)|0;bW=bH}if((fZ|0)==18){u((68203|0),(67581|0),271,(68217|0))}else{if((fZ|0)==27){u((68229|0),(67581|0),289,(68217|0))}else{if((fZ|0)==40){bG=du;bW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>0)>=(bS>>>0);if(!(bR)){bQ=c5;bK=bQ&255;bI=dn;bH=((bI)+(bK<<2)|0);bG=bl[bH>>2]|0;bF=c5;bE=bF&255;bD=(bG|0)==(bE|0);if(!(bD)){bC=5;break}}bB=c5;bA=bB&255;bz=dn;by=((bz)+(bA<<2)|0);bx=bl[by>>2]|0;bw=dr;dz=(((bw))+4|0);dy=A[dz>>1]|0;dx=dy&65535;dw=(bx>>>0)>=(dx>>>0);if(dw){dv=cq;du=dv&255;ds=dp;dg=((ds)+(du<<2)|0);df=bl[dg>>2]|0;de=dm;G((df|0),0,(de|0))|0;bP=0;while(1){dd=bP;dc=dd&255;db=dr;da=(((db))+4|0);c9=A[da>>1]|0;c8=c9&65535;c7=(dc|0)<(c8|0);if(!(c7)){break}c4=c5;c3=c4&255;c2=dr;c1=(((c2))+4|0);c0=A[c1>>1]|0;cY=c0&65535;cW=aF(c3,cY)|0;cU=bP;cS=cU&255;cQ=((cW)+(cS))|0;cF=cH;cE=((cF)+(cQ)|0);cD=bg[cE>>0]|0;cC=cD&255;cB=(cC|0)!=(0);if(cB){cz=cq;cx=cz&255;cv=dp;ct=((cv)+(cx<<2)|0);cr=bl[ct>>2]|0;ck=bP;ci=ck&255;cg=dq;ce=((cg)+(ci<<2)|0);cb=bl[ce>>2]|0;b8=c5;b5=b8&255;b2=dr;bZ=(((b2))+4|0);bW=A[bZ>>1]|0;cj=bW&65535;ch=aF(b5,cj)|0;cf=bP;cc=cf&255;b9=((ch)+(cc))|0;b6=cH;b3=((b6)+(b9)|0);b0=bg[b3>>0]|0;bX=dm;aE(cr,cb,b0,bX)}bU=bP;bO=((bU)+1)<<24>>24;bP=bO}bN=cq;bM=((bN)+1)<<24>>24;cq=bM}bL=c5;bJ=((bL)+1)<<24>>24;c5=bJ}if((bC|0)==5){u((68135|0),(67581|0),514,(68182|0))}else{if((bC|0)==14){Z=c6;return}}}function aO(){var c0=0,cZ=0,cz=0,cx=0,cv=0,ct=0,cr=0,cp=0,co=0,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[bN>>0]|0;bL=bM&255;bK=cG;bJ=bK&255;bI=(bL|0)>=(bJ|0);if(bI){bH=bg[(67604)>>0]|0;bG=bH&255;bF=ck;bE=((bF)-1)|0;bD=(67596+(bE)|0);bB=bg[bD>>0]|0;bA=bB&255;bz=cG;by=bz&255;bx=bA^by;bw=bx<<1;c7=bG^bw;c6=c7&255;c5=ck;c4=(67596+(c5)|0);bg[c4>>0]=c6}else{c3=ck;c2=((c3)-1)|0;c1=(67596+(c2)|0);cQ=bg[c1>>0]|0;cP=cQ&255;cO=cP<<1;cN=cO&255;cM=ck;cL=(67596+(cM)|0);bg[cL>>0]=cN}cK=ck;cJ=ck;cI=(67596+(cJ)|0);cH=bg[cI>>0]|0;cE=cH&255;cD=(12+(cE<<2)|0);bl[cD>>2]=cK;cC=ck;cB=((cC)+1)|0;ck=cB}bl[12>>2]=255;ck=0;while(1){cA=ck;cy=(cA|0)<(255);if(!(cy)){break}cw=ck;cu=(67596+(cw)|0);cs=bg[cu>>0]|0;cq=ck;cj=((cq)+255)|0;ci=(67596+(cj)|0);bg[ci>>0]=cs;ch=ck;cg=((ch)+1)|0;ck=cg}bg[67236>>0]=0;bg[(67237)>>0]=1;ck=2;while(1){cf=ck;cd=(cf|0)<=(255);if(!(cd)){break}cb=ck;b9=(12+(cb<<2)|0);b7=bl[b9>>2]|0;b5=(255-(b7))|0;bZ=(67596+(b5)|0);bY=bg[bZ>>0]|0;bX=ck;bW=(67236+(bX)|0);bg[bW>>0]=bY;bV=ck;bT=((bV)+1)|0;ck=bT}Z=cF;return}function ah(){var bG=0,bF=0,bR=0,bQ=0,bP=0,bO=0,bN=0,bM=0,bL=0,bK=0,bJ=0,bI=0,bE=0,b2=0,b1=0,b0=0,bZ=0,bY=0,bX=0,bW=0;var bV=0,bT=0,bS=0,bD=0,bC=0,bB=0,bA=0,bz=0,by=0,bx=0,bw=0,b3=0,bH=0,bU=0;bU=Z;Z=Z+16|0;if((Z|0)>=(aY|0)){ax()}bw=0;while(1){b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)|0;aP((bO|0),(bN|0),(bJ|0))|0;cl=0;while(1){bI=cl;bH=cX;bG=(bI|0)<(bH|0);if(!(bG)){break}bF=cY;bE=ci;bC=cl;bB=aF(bE,bC)|0;bA=((bF)+(bB)|0);by=cl;bx=((bX)+(by<<2)|0);bl[bx>>2]=bA;bw=cl;c9=((bw)+1)|0;cl=c9}while(1){c8=cl;c7=cW;c6=(c8|0)<(c7|0);if(!(c6)){break}c5=cY;c4=ci;c3=cl;cS=aF(c4,c3)|0;cR=((c5)+(cS)|0);cQ=cl;cP=cX;cN=((cQ)-(cP))|0;cM=((bz)+(cN<<2)|0);bl[cM>>2]=cR;cK=cl;cJ=cl;cI=cX;cH=((cJ)-(cI))|0;cF=((b6)+(cH<<2)|0);bl[cF>>2]=cK;cE=cl;cD=((cE)+1)|0;cl=cD}cC=cX;cB=cC&65535;cz=cW;cx=cz&65535;cv=(E(cB,cx)|0);cL=cv;ct=cL;cr=cW;cg=cX;cf=((cr)-(cg))|0;ce=ci;R(ct,bX,bz,b6,cf,ce);cd=cL;a0(cd);cc=cW;ca=ci;b8=aF(cc,ca)|0;Z=cG;return(b8|0)}function bh(){var bx=0,by=0,bw=0,bD=0,bC=0,bB=0,bz=0,bA=0;bA=Z;by=bl[1040>>2]|0;bw=(by|0)==(0|0);if(bw){bx=1088}else{bD=(ar()|0);bC=(((bD))+60|0);bB=bl[bC>>2]|0;bx=bB}return(bx|0)}function aG(bz){bz=bz|0;var bx=0,by=0,bw=0,bC=0,bA=0,bB=0;bB=Z;by=(bz>>>0)>(4294963200);if(by){bw=(0-(bz))|0;bC=(bh()|0);bl[bC>>2]=bw;bx=-1}else{bx=bz}return(bx|0)}function aA(bx){bx=bx|0;var bN=0,bL=0,b1=0,b0=0,bX=0,bW=0,bJ=0,bI=0,bH=0,bF=0,bE=0,bC=0,bB=0,bA=0,bz=0,by=0,bV=0,bw=0,b8=0,b7=0;var b6=0,b5=0,b4=0,b3=0,b2=0,bU=0,bT=0,bS=0,bR=0,bQ=0,bP=0,bO=0,bK=0,bY=0,bM=0,bG=0,bZ=0,bD=0;bD=Z;bX=(bx|0)==(0|0);do{if(bX){bQ=bl[1084>>2]|0;bP=(bQ|0)==(0|0);if(bP){b2=0}else{bO=bl[1084>>2]|0;bJ=(aA(bO)|0);b2=bJ}ay(((1068)|0));b1=bl[(1064)>>2]|0;bI=(b1|0)==(0|0);if(bI){bY=b2}else{b0=b1;bM=b2;while(1){bH=(((b0))+76|0);bF=bl[bH>>2]|0;bE=(bF|0)>(-1);if(bE){bC=(ae(b0)|0);b6=bC}else{b6=0}bB=(((b0))+20|0);bA=bl[bB>>2]|0;bz=(((b0))+28|0);by=bl[bz>>2]|0;bw=(bA>>>0)>(by>>>0);if(bw){b8=(aw(b0)|0);b7=b8|bM;bG=b7}else{bG=bM}b5=(b6|0)==(0);if(!(b5)){q(b0)}b4=(((b0))+56|0);bL=bl[b4>>2]|0;b3=(bL|0)==(0|0);if(b3){bY=bG;break}else{b0=bL;bM=bG}}}h(((1068)|0));bN=bY}else{bW=(((bx))+76|0);bV=bl[bW>>2]|0;bU=(bV|0)>(-1);if(!(bU)){bT=(aw(bx)|0);bN=bT;break}bS=(ae(bx)|0);bK=(bS|0)==(0);bR=(aw(bx)|0);if(bK){bN=bR}else{q(bx);bN=bR}}}while(0);return(bN|0)}function ae(bw){bw=bw|0;var bx=0,by=0;by=Z;return 0}function q(bw){bw=bw|0;var bx=0,by=0;by=Z;return}function N(by){by=by|0;var bx=0,bw=0,bD=0,bC=0,bA=0,bz=0,bB=0;bB=Z;Z=Z+16|0;if((Z|0)>=(aY|0)){ax()}bA=bB;bx=(((by))+60|0);bw=bl[bx>>2]|0;bl[bA>>2]=bw;bD=(bv(6,(bA|0))|0);bC=(aG(bD)|0);Z=bB;return(bC|0)}function bd(bx,bF,bI){bx=bx|0;bF=bF|0;bI=bI|0;var bB=0,bE=0,bD=0,bC=0,bA=0,bz=0,by=0,bG=0,bw=0,bM=0,bL=0,bK=0,bJ=0,bH=0,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0|0);if(cm){ci=bl[cp>>2]|0;bl[bL>>2]=ci;ca=(((bL))+4|0);bl[ca>>2]=cI;b9=(((bL))+8|0);bl[b9>>2]=cG;cg=(V(146,(bL|0))|0);cf=(aG(cg)|0);bz=cf}else{aB((4|0),(ch|0));cl=bl[cp>>2]|0;bl[bI>>2]=cl;cd=(((bI))+4|0);bl[cd>>2]=cI;cb=(((bI))+8|0);bl[cb>>2]=cG;ck=(V(146,(bI|0))|0);cj=(aG(ck)|0);a6(0);bz=cj}b8=(bM|0)==(bz|0);if(b8){bC=6;break}b1=(bz|0)<(0);if(b1){ct=cI;bW=cG;bC=8;break}bR=((bM)-(bz))|0;bQ=(((cI))+4|0);bP=bl[bQ>>2]|0;bO=(bz>>>0)>(bP>>>0);if(bO){bN=bl[co>>2]|0;bl[cE>>2]=bN;bl[cA>>2]=bN;bK=((bz)-(bP))|0;bJ=(((cI))+8|0);bH=((cG)+-1)|0;cB=(((cI))+12|0);ce=bl[cB>>2]|0;bw=ce;bx=bK;cH=bJ;cF=bH}else{bG=(cG|0)==(2);if(bG){bF=bl[cE>>2]|0;bE=((bF)+(bz)|0);bl[cE>>2]=bE;bw=bP;bx=bz;cH=cI;cF=2}else{bw=bP;bx=bz;cH=cI;cF=cG}}bD=bl[cH>>2]|0;bB=((bD)+(bx)|0);bl[cH>>2]=bB;bA=(((cH))+4|0);by=((bw)-(bx))|0;bl[bA>>2]=by;cI=cH;cG=cF;bM=bR}if((bC|0)==6){b7=bl[co>>2]|0;b6=(((ch))+48|0);b5=bl[b6>>2]|0;b4=((b7)+(b5)|0);b3=(((ch))+16|0);bl[b3>>2]=b4;b2=b7;bl[cE>>2]=b2;bl[cA>>2]=b2;cs=cc}else{if((bC|0)==8){b0=(((ch))+16|0);bl[b0>>2]=0;bl[cE>>2]=0;bl[cA>>2]=0;bZ=bl[ch>>2]|0;bX=bZ|32;bl[ch>>2]=bX;bV=(bW|0)==(2);if(bV){cs=0}else{bU=(((ct))+4|0);bT=bl[bU>>2]|0;bS=((cc)-(bT))|0;cs=bS}}}Z=cr;return(cs|0)}function a4(bA,bI,bE){bA=bA|0;bI=bI|0;bE=bE|0;var bJ=0,bH=0,bG=0,bF=0,bD=0,bC=0,bB=0,bz=0,bx=0,bw=0,bO=0,by=0,bM=0,bL=0,bK=0,bN=0;bN=Z;Z=Z+80|0;if((Z|0)>=(aY|0)){ax()}by=bN;bO=bN+12|0;bJ=(((bA))+36|0);bl[bJ>>2]=5;bH=bl[bA>>2]|0;bG=bH&64;bF=(bG|0)==(0);if(bF){bD=(((bA))+60|0);bC=bl[bD>>2]|0;bl[by>>2]=bC;bM=(((by))+4|0);bl[bM>>2]=21505;bL=(((by))+8|0);bl[bL>>2]=bO;bB=(i(54,(by|0))|0);bz=(bB|0)==(0);if(!(bz)){bx=(((bA))+75|0);bg[bx>>0]=-1}}bw=(aK(bA,bI,bE)|0);Z=bN;return(bw|0)}function ag(bP,bN,bR){bP=bP|0;bN=bN|0;bR=bR|0;var bK=0,bQ=0,bB=0,bG=0,bF=0,bM=0,bL=0,bE=0,bD=0,bC=0,bA=0,bz=0,by=0,bx=0,bw=0,bJ=0,bH=0,bI=0,bO=0;bO=Z;bG=(bR|0)==(0);L1:do{if(bG){bL=0}else{bK=bR;bJ=bP;bH=bN;while(1){bF=bg[bJ>>0]|0;bE=bg[bH>>0]|0;bD=(bF<<24>>24)==(bE<<24>>24);if(!(bD)){bQ=bF;bB=bE;break}bC=((bK)+-1)|0;bA=(((bJ))+1|0);bz=(((bH))+1|0);by=(bC|0)==(0);if(by){bL=0;break L1}else{bK=bC;bJ=bA;bH=bz}}bx=bQ&255;bw=bB&255;bM=((bx)-(bw))|0;bL=bM}}while(0);return(bL|0)}function aw(bz){bz=bz|0;var bC=0,bH=0,bG=0,bS=0,bR=0,bQ=0,bP=0,bO=0,bN=0,bM=0,bL=0,bK=0,bJ=0,bF=0,bE=0,bD=0,bB=0,bA=0,by=0,bx=0;var bw=0,bI=0,bT=0;bT=Z;bH=(((bz))+20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M=bl[(1220)>>2]|0;eL=(eT>>>0)<(eM>>>0);if(eL){af()}eK=(((eT))+12|0);eJ=bl[eK>>2]|0;eI=(eJ|0)==(eX|0);if(eI){bl[eK>>2]=eZ;bl[eY>>2]=eT;lU=bl[(1212)>>2]|0;ez=lU;break}else{af()}}}while(0);eH=e1<<3;eG=((eH)-(om))|0;eF=om|3;eE=(((eX))+4|0);bl[eE>>2]=eF;eD=((eX)+(om)|0);eC=eG|1;dF=om|4;eB=((eX)+(dF)|0);bl[eB>>2]=eC;eA=((eX)+(eH)|0);bl[eA>>2]=eG;ey=(ez|0)==(0);if(!(ey)){es=bl[(1224)>>2]|0;er=ez>>>3;eq=er<<1;ep=(1244+(eq<<2)|0);eo=bl[1204>>2]|0;en=1<<er;em=eo&en;el=(em|0)==(0);if(el){ek=eo|en;bl[1204>>2]=ek;rK=((eq)+2)|0;rJ=(1244+(rK<<2)|0);fw=rJ;gS=ep}else{md=((eq)+2)|0;ei=(1244+(md<<2)|0);uE=bl[ei>>2]|0;uC=bl[(1220)>>2]|0;uA=(uE>>>0)<(uC>>>0);if(uA){af()}else{fw=ei;gS=uE}}bl[fw>>2]=es;uy=(((gS))+12|0);bl[uy>>2]=es;uw=(((es))+8|0);bl[uw>>2]=gS;uu=(((es))+12|0);bl[uu>>2]=ep}bl[(1212)>>2]=eG;bl[(1224)>>2]=eD;rN=eW;return(rN|0)}us=bl[(1208)>>2]|0;uq=(us|0)==(0);if(uq){rV=om}else{up=(0-(us))|0;uo=us&up;uj=((uo)+-1)|0;uh=uj>>>12;uf=uh&16;ud=uj>>>uf;ub=ud>>>5;t7=ub&8;t5=t7|uf;t3=ud>>>t7;t2=t3>>>2;t1=t2&4;tT=t5|t1;tR=t3>>>t1;tP=tR>>>1;tN=tP&2;tL=tT|tN;tJ=tR>>>tN;tH=tJ>>>1;tF=tH&1;tE=tL|tF;tD=tJ>>>tF;tx=((tE)+(tD))|0;tv=(1508+(tx<<2)|0);tt=bl[tv>>2]|0;tr=(((tt))+4|0);tp=bl[tr>>2]|0;tn=tp&-8;tl=((tn)-(om))|0;lO=tl;jv=tt;tg=tt;while(1){tj=(((jv))+16|0);ti=bl[tj>>2]|0;th=(ti|0)==(0|0);if(th){td=(((jv))+20|0);tc=bl[td>>2]|0;tb=(tc|0)==(0|0);if(tb){iW=lO;uJ=tg;break}else{s9=tc}}else{s9=ti}ta=(((s9))+4|0);s8=bl[ta>>2]|0;s7=s8&-8;s6=((s7)-(om))|0;s5=(s6>>>0)<(lO>>>0);kC=s5?s6:lO;t9=s5?s9:tg;lO=kC;jv=s9;tg=t9}s4=bl[(1220)>>2]|0;s0=(uJ>>>0)<(s4>>>0);if(s0){af()}sZ=((uJ)+(om)|0);sY=(uJ>>>0)<(sZ>>>0);if(!(sY)){af()}sX=(((uJ))+24|0);sW=bl[sX>>2]|0;sV=(((uJ))+12|0);sU=bl[sV>>2]|0;sT=(sU|0)==(uJ|0);do{if(sT){sG=(((uJ))+20|0);sF=bl[sG>>2]|0;sE=(sF|0)==(0|0);if(sE){sB=(((uJ))+16|0);sA=bl[sB>>2]|0;sz=(sA|0)==(0|0);if(sz){oN=0;break}else{uI=sA;kZ=sB}}else{uI=sF;kZ=sG}while(1){sy=(((uI))+20|0);sx=bl[sy>>2]|0;sv=(sx|0)==(0|0);if(!(sv)){uI=sx;kZ=sy;continue}su=(((uI))+16|0);st=bl[su>>2]|0;sr=(st|0)==(0|0);if(sr){ca=uI;iR=kZ;break}else{uI=st;kZ=su}}sq=(iR>>>0)<(s4>>>0);if(sq){af()}else{bl[iR>>2]=0;oN=ca;break}}else{sS=(((uJ))+8|0);sR=bl[sS>>2]|0;sN=(sR>>>0)<(s4>>>0);if(sN){af()}sM=(((sR))+12|0);sL=bl[sM>>2]|0;sK=(sL|0)==(uJ|0);if(!(sK)){af()}sJ=(((sU))+8|0);sI=bl[sJ>>2]|0;sH=(sI|0)==(uJ|0);if(sH){bl[sM>>2]=sU;bl[sJ>>2]=sR;oN=sU;break}else{af()}}}while(0);sm=(sW|0)==(0|0);do{if(!(sm)){sl=(((uJ))+28|0);sk=bl[sl>>2]|0;sj=(1508+(sk<<2)|0);si=bl[sj>>2]|0;sh=(uJ|0)==(si|0);if(sh){bl[sj>>2]=oN;qY=(oN|0)==(0|0);if(qY){sg=1<<sk;sf=sg^-1;se=bl[(1208)>>2]|0;sd=se&sf;bl[(1208)>>2]=sd;break}}else{r9=bl[(1220)>>2]|0;r8=(sW>>>0)<(r9>>>0);if(r8){af()}r7=(((sW))+16|0);r6=bl[r7>>2]|0;r5=(r6|0)==(uJ|0);if(r5){bl[r7>>2]=oN}else{r4=(((sW))+20|0);bl[r4>>2]=oN}r3=(oN|0)==(0|0);if(r3){break}}r2=bl[(1220)>>2]|0;r1=(oN>>>0)<(r2>>>0);if(r1){af()}r0=(((oN))+24|0);bl[r0>>2]=sW;oI=(((uJ))+16|0);oG=bl[oI>>2]|0;oE=(oG|0)==(0|0);do{if(!(oE)){oC=(oG>>>0)<(r2>>>0);if(oC){af()}else{oA=(((oN))+16|0);bl[oA>>2]=oG;oy=(((oG))+24|0);bl[oy>>2]=oN;break}}}while(0);ow=(((uJ))+20|0);ou=bl[ow>>2]|0;ot=(ou|0)==(0|0);if(!(ot)){os=bl[(1220)>>2]|0;od=(ou>>>0)<(os>>>0);if(od){af()}else{ob=(((oN))+20|0);bl[ob>>2]=ou;n9=(((ou))+24|0);bl[n9>>2]=oN;break}}}}while(0);n7=(iW>>>0)<(16);if(n7){n4=((iW)+(om))|0;n2=n4|3;n0=(((uJ))+4|0);bl[n0>>2]=n2;tf=((n4)+4)|0;nY=((uJ)+(tf)|0);nX=bl[nY>>2]|0;nW=nX|1;bl[nY>>2]=nW}else{nQ=om|3;nO=(((uJ))+4|0);bl[nO>>2]=nQ;nM=iW|1;kg=om|4;nK=((uJ)+(kg)|0);bl[nK>>2]=nM;rY=((iW)+(om))|0;nI=((uJ)+(rY)|0);bl[nI>>2]=iW;nF=bl[(1212)>>2]|0;nD=(nF|0)==(0);if(!(nD)){nB=bl[(1224)>>2]|0;nA=nF>>>3;nz=nA<<1;nu=(1244+(nz<<2)|0);ns=bl[1204>>2]|0;nq=1<<nA;no=ns&nq;nm=(no|0)==(0);if(nm){nk=ns|nq;bl[1204>>2]=nk;bY=((nz)+2)|0;qo=(1244+(bY<<2)|0);dW=qo;mD=nu}else{fS=((nz)+2)|0;ni=(1244+(fS<<2)|0);ng=bl[ni>>2]|0;nf=bl[(1220)>>2]|0;ne=(ng>>>0)<(nf>>>0);if(ne){af()}else{dW=ni;mD=ng}}bl[dW>>2]=nB;m9=(((mD))+12|0);bl[m9>>2]=nB;m8=(((nB))+8|0);bl[m8>>2]=mD;m7=(((nB))+12|0);bl[m7>>2]=nu}bl[(1212)>>2]=iW;bl[(1224)>>2]=sZ}m6=(((uJ))+8|0);rN=m6;return(rN|0)}}else{rV=om}}else{m5=(sw>>>0)>(4294967231);if(m5){rV=-1}else{m4=((sw)+11)|0;m3=m4&-8;m2=bl[(1208)>>2]|0;m1=(m2|0)==(0);if(m1){rV=m3}else{m0=(0-(m3))|0;mZ=m4>>>8;mY=(mZ|0)==(0);if(mY){tZ=0}else{mX=(m3>>>0)>(16777215);if(mX){tZ=31}else{mW=((mZ)+1048320)|0;mV=mW>>>16;mU=mV&8;mT=mZ<<mU;mS=((mT)+520192)|0;mR=mS>>>16;mQ=mR&4;mO=mQ|mU;mN=mT<<mQ;mM=((mN)+245760)|0;mL=mM>>>16;mK=mL&2;mJ=mO|mK;mI=(14-(mJ))|0;mH=mN<<mK;mG=mH>>>15;mF=((mI)+(mG))|0;mC=mF<<1;mB=((mF)+7)|0;mA=m3>>>mB;mz=mA&1;my=mz|mC;tZ=my}}mx=(1508+(tZ<<2)|0);mw=bl[mx>>2]|0;mv=(mw|0)==(0|0);L123:do{if(mv){sb=m0;cc=0;hf=0;ft=86}else{mu=(tZ|0)==(31);mt=tZ>>>1;ms=(25-(mt))|0;mr=mu?0:ms;mp=m3<<mr;jt=m0;ny=0;hk=mp;vb=mw;gq=0;while(1){mo=(((vb))+4|0);mm=bl[mo>>2]|0;ml=mm&-8;mk=((ml)-(m3))|0;mj=(mk>>>0)<(jt>>>0);if(mj){mi=(ml|0)==(m3|0);if(mi){h7=mk;uZ=vb;sO=vb;ft=90;break L123}else{eP=mk;nd=vb}}else{eP=jt;nd=gq}mh=(((vb))+20|0);mc=bl[mh>>2]|0;mb=hk>>>31;ma=((((vb))+16|0)+(mb<<2)|0);l9=bl[ma>>2]|0;l8=(mc|0)==(0|0);l6=(mc|0)==(l9|0);co=l8|l6;hB=co?ny:mc;l5=(l9|0)==(0|0);l4=hk<<1;if(l5){sb=eP;cc=hB;hf=nd;ft=86;break}else{jt=eP;ny=hB;hk=l4;vb=l9;gq=nd}}}}while(0);if((ft|0)==86){l3=(cc|0)==(0|0);l2=(hf|0)==(0|0);ky=l3&l2;if(ky){iE=2<<tZ;iC=(0-(iE))|0;iA=iE|iC;ix=m2&iA;iv=(ix|0)==(0);if(iv){rV=m3;break}it=(0-(ix))|0;iq=ix⁢io=((iq)+-1)|0;im=io>>>12;il=im&16;ie=io>>>il;ic=ie>>>5;ia=ic&8;h8=ia|il;h5=ie>>>ia;h3=h5>>>2;h1=h3&4;hZ=h8|h1;hY=h5>>>h1;hX=hY>>>1;hS=hX&2;hQ=hZ|hS;hO=hY>>>hS;hM=hO>>>1;hK=hM&1;hI=hQ|hK;hG=hO>>>hK;hE=((hI)+(hG))|0;hD=(1508+(hE<<2)|0);hC=bl[hD>>2]|0;vV=hC;mq=0}else{vV=cc;mq=hf}hx=(vV|0)==(0|0);if(hx){q4=sb;oM=mq}else{h7=sb;uZ=vV;sO=mq;ft=90}}if((ft|0)==90){while(1){ft=0;hv=(((uZ))+4|0);ht=bl[hv>>2]|0;hr=ht&-8;hp=((hr)-(m3))|0;hn=(hp>>>0)<(h7>>>0);lJ=hn?hp:h7;lK=hn?uZ:sO;hl=(((uZ))+16|0);hi=bl[hl>>2]|0;hh=(hi|0)==(0|0);if(!(hh)){h7=lJ;uZ=hi;sO=lK;ft=90;continue}hg=(((uZ))+20|0);hd=bl[hg>>2]|0;hc=(hd|0)==(0|0);if(hc){q4=lJ;oM=lK;break}else{h7=lJ;uZ=hd;sO=lK;ft=90}}}hb=(oM|0)==(0|0);if(hb){rV=m3}else{ha=bl[(1212)>>2]|0;g9=((ha)-(m3))|0;g8=(q4>>>0)<(g9>>>0);if(g8){g7=bl[(1220)>>2]|0;g6=(oM>>>0)<(g7>>>0);if(g6){af()}g5=((oM)+(m3)|0);g4=(oM>>>0)<(g5>>>0);if(!(g4)){af()}g1=(((oM))+24|0);g0=bl[g1>>2]|0;gZ=(((oM))+12|0);gY=bl[gZ>>2]|0;gX=(gY|0)==(oM|0);do{if(gX){gK=(((oM))+20|0);gI=bl[gK>>2]|0;gH=(gI|0)==(0|0);if(gH){gG=(((oM))+16|0);gF=bl[gG>>2]|0;gE=(gF|0)==(0|0);if(gE){lQ=0;break}else{fM=gF;wg=gG}}else{fM=gI;wg=gK}while(1){gB=(((fM))+20|0);gA=bl[gB>>2]|0;gy=(gA|0)==(0|0);if(!(gy)){fM=gA;wg=gB;continue}gx=(((fM))+16|0);gw=bl[gx>>2]|0;gv=(gw|0)==(0|0);if(gv){sD=fM;nV=wg;break}else{fM=gw;wg=gx}}gu=(nV>>>0)<(g7>>>0);if(gu){af()}else{bl[nV>>2]=0;lQ=sD;break}}else{gW=(((oM))+8|0);gV=bl[gW>>2]|0;gU=(gV>>>0)<(g7>>>0);if(gU){af()}gT=(((gV))+12|0);gR=bl[gT>>2]|0;gO=(gR|0)==(oM|0);if(!(gO)){af()}gN=(((gY))+8|0);gM=bl[gN>>2]|0;gL=(gM|0)==(oM|0);if(gL){bl[gT>>2]=gY;bl[gN>>2]=gV;lQ=gY;break}else{af()}}}while(0);gt=(g0|0)==(0|0);do{if(!(gt)){gs=(((oM))+28|0);gr=bl[gs>>2]|0;go=(1508+(gr<<2)|0);gn=bl[go>>2]|0;gm=(oM|0)==(gn|0);if(gm){bl[go>>2]=lQ;lZ=(lQ|0)==(0|0);if(lZ){gl=1<<gr;gk=gl^-1;gi=bl[(1208)>>2]|0;gh=gi&gk;bl[(1208)>>2]=gh;break}}else{gg=bl[(1220)>>2]|0;gf=(g0>>>0)<(gg>>>0);if(gf){af()}ge=(((g0))+16|0);f7=bl[ge>>2]|0;f5=(f7|0)==(oM|0);if(f5){bl[ge>>2]=lQ}else{f3=(((g0))+20|0);bl[f3>>2]=lQ}f1=(lQ|0)==(0|0);if(f1){break}}fZ=bl[(1220)>>2]|0;fX=(lQ>>>0)<(fZ>>>0);if(fX){af()}fW=(((lQ))+24|0);bl[fW>>2]=g0;fV=(((oM))+16|0);fU=bl[fV>>2]|0;fT=(fU|0)==(0|0);do{if(!(fT)){by=(fU>>>0)<(fZ>>>0);if(by){af()}else{bw=(((lQ))+16|0);bl[bw>>2]=fU;ww=(((fU))+24|0);bl[ww>>2]=lQ;break}}}while(0);wt=(((oM))+20|0);wr=bl[wt>>2]|0;wp=(wr|0)==(0|0);if(!(wp)){wn=bl[(1220)>>2]|0;wl=(wr>>>0)<(wn>>>0);if(wl){af()}else{wk=(((lQ))+20|0);bl[wk>>2]=wr;wj=(((wr))+24|0);bl[wj>>2]=lQ;break}}}}while(0);wc=(q4>>>0)<(16);L199:do{if(wc){wa=((q4)+(m3))|0;v8=wa|3;v6=(((oM))+4|0);bl[v6>>2]=v8;rk=((wa)+4)|0;v4=((oM)+(rk)|0);v2=bl[v4>>2]|0;v0=v2|1;bl[v4>>2]=v0}else{vY=m3|3;vX=(((oM))+4|0);bl[vX>>2]=vY;vW=q4|1;bC=m3|4;vO=((oM)+(bC)|0);bl[vO>>2]=vW;tA=((q4)+(m3))|0;vM=((oM)+(tA)|0);bl[vM>>2]=q4;vK=q4>>>3;vI=(q4>>>0)<(256);if(vI){vG=vK<<1;vE=(1244+(vG<<2)|0);vC=bl[1204>>2]|0;vA=1<<vK;vz=vC&vA;vy=(vz|0)==(0);if(vy){vu=vC|vA;bl[1204>>2]=vu;sC=((vG)+2)|0;qf=(1244+(sC<<2)|0);qX=qf;pE=vE}else{cq=((vG)+2)|0;vs=(1244+(cq<<2)|0);vq=bl[vs>>2]|0;vo=bl[(1220)>>2]|0;vm=(vq>>>0)<(vo>>>0);if(vm){af()}else{qX=vs;pE=vq}}bl[qX>>2]=g5;vk=(((pE))+12|0);bl[vk>>2]=g5;pT=((m3)+8)|0;vi=((oM)+(pT)|0);bl[vi>>2]=pE;jR=((m3)+12)|0;vg=((oM)+(jR)|0);bl[vg>>2]=vE;break}vf=q4>>>8;ve=(vf|0)==(0);if(ve){u9=0}else{va=(q4>>>0)>(16777215);if(va){u9=31}else{u8=((vf)+1048320)|0;u7=u8>>>16;u6=u7&8;u5=vf<<u6;u4=((u5)+520192)|0;u3=u4>>>16;u2=u3&4;u1=u2|u6;u0=u5<<u2;uV=((u0)+245760)|0;uU=uV>>>16;uT=uU&2;uS=u1|uT;uR=(14-(uS))|0;uQ=u0<<uT;uP=uQ>>>15;uO=((uR)+(uP))|0;uN=uO<<1;uM=((uO)+7)|0;uH=q4>>>uM;uG=uH&1;uF=uG|uN;u9=uF}}uD=(1508+(u9<<2)|0);l0=((m3)+28)|0;uB=((oM)+(l0)|0);bl[uB>>2]=u9;lL=((m3)+16)|0;uz=((oM)+(lL)|0);rt=((m3)+20)|0;ux=((oM)+(rt)|0);bl[ux>>2]=0;bl[uz>>2]=0;uv=bl[(1208)>>2]|0;ut=1<<u9;ur=uv&ut;um=(ur|0)==(0);if(um){ul=uv|ut;bl[(1208)>>2]=ul;bl[uD>>2]=g5;nb=((m3)+24)|0;uk=((oM)+(nb)|0);bl[uk>>2]=uD;he=((m3)+12)|0;ui=((oM)+(he)|0);bl[ui>>2]=g5;vd=((m3)+8)|0;ug=((oM)+(vd)|0);bl[ug>>2]=g5;break}ue=bl[uD>>2]|0;uc=(((ue))+4|0);t8=bl[uc>>2]|0;t6=t8&-8;t4=(t6|0)==(q4|0);L217:do{if(t4){eN=ue}else{tW=(u9|0)==(31);tV=u9>>>1;tU=(25-(tV))|0;tS=tW?0:tU;tQ=q4<<tS;rH=tQ;d7=ue;while(1){tz=rH>>>31;ty=((((d7))+16|0)+(tz<<2)|0);tK=bl[ty>>2]|0;tw=(tK|0)==(0|0);if(tw){d8=ty;gz=d7;break}tO=rH<<1;tM=(((tK))+4|0);tI=bl[tM>>2]|0;tG=tI&-8;tB=(tG|0)==(q4|0);if(tB){eN=tK;break L217}else{rH=tO;d7=tK}}tu=bl[(1220)>>2]|0;ts=(d8>>>0)<(tu>>>0);if(ts){af()}else{bl[d8>>2]=g5;tX=((m3)+24)|0;tq=((oM)+(tX)|0);bl[tq>>2]=gz;nU=((m3)+12)|0;to=((oM)+(nU)|0);bl[to>>2]=g5;hW=((m3)+8)|0;tm=((oM)+(hW)|0);bl[tm>>2]=g5;break L199}}}while(0);tk=(((eN))+8|0);qy=bl[tk>>2]|0;qv=bl[(1220)>>2]|0;qt=(qy>>>0)>=(qv>>>0);tY=(eN>>>0)>=(qv>>>0);qr=qt&tY;if(qr){qp=(((qy))+12|0);bl[qp>>2]=g5;bl[tk>>2]=g5;pb=((m3)+8)|0;qm=((oM)+(pb)|0);bl[qm>>2]=qy;i9=((m3)+12)|0;qk=((oM)+(i9)|0);bl[qk>>2]=eN;gp=((m3)+24)|0;qi=((oM)+(gp)|0);bl[qi>>2]=0;break}else{af()}}}while(0);qh=(((oM))+8|0);rN=qh;return(rN|0)}else{rV=m3}}}}}}while(0);qg=bl[(1212)>>2]|0;qb=(qg>>>0)<(rV>>>0);if(!(qb)){p8=((qg)-(rV))|0;p6=bl[(1224)>>2]|0;p4=(p8>>>0)>(15);if(p4){p2=((p6)+(rV)|0);bl[(1224)>>2]=p2;bl[(1212)>>2]=p8;p0=p8|1;mf=((rV)+4)|0;pY=((p6)+(mf)|0);bl[pY>>2]=p0;pW=((p6)+(qg)|0);bl[pW>>2]=p8;pV=rV|3;pU=(((p6))+4|0);bl[pU>>2]=pV}else{bl[(1212)>>2]=0;bl[(1224)>>2]=0;pP=qg|3;pN=(((p6))+4|0);bl[pN>>2]=pP;mg=((qg)+4)|0;pL=((p6)+(mg)|0);pJ=bl[pL>>2]|0;pH=pJ|1;bl[pL>>2]=pH}pF=(((p6))+8|0);rN=pF;return(rN|0)}pC=bl[(1216)>>2]|0;pz=(pC>>>0)>(rV>>>0);if(pz){py=((pC)-(rV))|0;bl[(1216)>>2]=py;px=bl[(1228)>>2]|0;ps=((px)+(rV)|0);bl[(1228)>>2]=ps;pq=py|1;l7=((rV)+4)|0;po=((px)+(l7)|0);bl[po>>2]=pq;pm=rV|3;pk=(((px))+4|0);bl[pk>>2]=pm;pi=(((px))+8|0);rN=pi;return(rN|0)}pg=bl[1676>>2]|0;pe=(pg|0)==(0);do{if(pe){pd=(aC(30)|0);pc=((pd)+-1)|0;o9=pc&pd;o8=(o9|0)==(0);if(o8){bl[(1684)>>2]=pd;bl[(1680)>>2]=pd;bl[(1688)>>2]=-1;bl[(1692)>>2]=-1;bl[(1696)>>2]=0;bl[(1648)>>2]=0;o7=(ap((0|0))|0);o6=o7&-16;o5=o6^1431655768;bl[1676>>2]=o5;break}else{af()}}}while(0);o4=((rV)+48)|0;o3=bl[(1684)>>2]|0;o2=((rV)+47)|0;o1=((o3)+(o2))|0;oZ=(0-(o3))|0;oY=o1&oZ;oX=(oY>>>0)>(rV>>>0);if(!(oX)){rN=0;return(rN|0)}oW=bl[(1644)>>2]|0;oV=(oW|0)==(0);if(!(oV)){oU=bl[(1636)>>2]|0;oT=((oU)+(oY))|0;oS=(oT>>>0)<=(oU>>>0);oR=(oT>>>0)>(oW>>>0);lY=oS|oR;if(lY){rN=0;return(rN|0)}}oQ=bl[(1648)>>2]|0;oP=oQ&4;oL=(oP|0)==(0);L258:do{if(oL){oK=bl[(1228)>>2]|0;oJ=(oK|0)==(0|0);L260:do{if(oJ){ft=174}else{un=(1652);while(1){oH=bl[un>>2]|0;oF=(oH>>>0)>(oK>>>0);if(!(oF)){oD=(((un))+4|0);oB=bl[oD>>2]|0;oz=((oH)+(oB)|0);ox=(oz>>>0)>(oK>>>0);if(ox){ec=un;d9=oD;break}}ov=(((un))+8|0);og=bl[ov>>2]|0;of=(og|0)==(0|0);if(of){ft=174;break L260}else{un=og}}nr=bl[(1216)>>2]|0;np=((o1)-(nr))|0;nn=np&oZ;nl=(nn>>>0)<(2147483647);if(nl){nj=(bm((nn|0))|0);nh=bl[ec>>2]|0;kx=bl[d9>>2]|0;kv=((nh)+(kx)|0);kt=(nj|0)==(kv|0);kB=kt?nn:0;if(kt){kq=(nj|0)==((-1)|0);if(kq){na=kB}else{t0=nj;gD=kB;ft=194;break L258}}else{oq=nj;kR=nn;iz=kB;ft=184}}else{na=0}}}while(0);do{if((ft|0)==174){oe=(bm(0)|0);oc=(oe|0)==((-1)|0);if(oc){na=0}else{oa=oe;n8=bl[(1680)>>2]|0;n5=((n8)+-1)|0;n3=n5&oa;n1=(n3|0)==(0);if(n1){sa=oY}else{nZ=((n5)+(oa))|0;nT=(0-(n8))|0;nS=nZ&nT;nR=((oY)-(oa))|0;nP=((nR)+(nS))|0;sa=nP}nN=bl[(1636)>>2]|0;nL=((nN)+(sa))|0;nJ=(sa>>>0)>(rV>>>0);nG=(sa>>>0)<(2147483647);wv=nJ&nG;if(wv){nE=bl[(1644)>>2]|0;nC=(nE|0)==(0);if(!(nC)){nx=(nL>>>0)<=(nN>>>0);nw=(nL>>>0)>(nE>>>0);fG=nx|nw;if(fG){na=0;break}}nv=(bm((sa|0))|0);nt=(nv|0)==(oe|0);pB=nt?sa:0;if(nt){t0=oe;gD=pB;ft=194;break L258}else{oq=nv;kR=sa;iz=pB;ft=184}}else{na=0}}}}while(0);L280:do{if((ft|0)==184){ko=(0-(kR))|0;kl=(oq|0)!=((-1)|0);kj=(kR>>>0)<(2147483647);g3=kj&kl;kh=(o4>>>0)>(kR>>>0);uY=kh&g3;do{if(uY){ke=bl[(1684)>>2]|0;kd=((o2)-(kR))|0;j9=((kd)+(ke))|0;j7=(0-(ke))|0;j5=j9&j7;j3=(j5>>>0)<(2147483647);if(j3){j1=(bm((j5|0))|0);jZ=(j1|0)==((-1)|0);if(jZ){(bm((ko|0))|0);na=iz;break L280}else{jX=((j5)+(kR))|0;ga=jX;break}}else{ga=kR}}else{ga=kR}}while(0);jV=(oq|0)==((-1)|0);if(jV){na=iz}else{t0=oq;gD=ga;ft=194;break L258}}}while(0);jT=bl[(1648)>>2]|0;jS=jT|4;bl[(1648)>>2]=jS;tC=na;ft=191}else{tC=0;ft=191}}while(0);if((ft|0)==191){jN=(oY>>>0)<(2147483647);if(jN){jL=(bm((oY|0))|0);jJ=(bm(0)|0);jH=(jL|0)!=((-1)|0);jF=(jJ|0)!=((-1)|0);s3=jH&jF;jD=(jL>>>0)<(jJ>>>0);iX=jD&s3;if(iX){jB=jJ;jz=jL;jx=((jB)-(jz))|0;jw=((rV)+40)|0;jr=(jx>>>0)>(jw>>>0);rS=jr?jx:tC;if(jr){t0=jL;gD=rS;ft=194}}}}if((ft|0)==194){jp=bl[(1636)>>2]|0;jn=((jp)+(gD))|0;bl[(1636)>>2]=jn;jl=bl[(1640)>>2]|0;jj=(jn>>>0)>(jl>>>0);if(jj){bl[(1640)>>2]=jn}jh=bl[(1228)>>2]|0;jf=(jh|0)==(0|0);L299:do{if(jf){jd=bl[(1220)>>2]|0;jb=(jd|0)==(0|0);ja=(t0>>>0)<(jd>>>0);bN=jb|ja;if(bN){bl[(1220)>>2]=t0}bl[(1652)>>2]=t0;bl[(1656)>>2]=gD;bl[(1664)>>2]=0;i7=bl[1676>>2]|0;bl[(1240)>>2]=i7;bl[(1236)>>2]=-1;sn=0;while(1){i6=sn<<1;i5=(1244+(i6<<2)|0);lV=((i6)+3)|0;i4=(1244+(lV<<2)|0);bl[i4>>2]=i5;b9=((i6)+2)|0;i3=(1244+(b9<<2)|0);bl[i3>>2]=i5;i2=((sn)+1)|0;kN=(i2|0)==(32);if(kN){break}else{sn=i2}}i1=((gD)+-40)|0;i0=(((t0))+8|0);iZ=i0;iY=iZ&7;iT=(iY|0)==(0);iS=(0-(iZ))|0;iQ=iS&7;iP=iT?0:iQ;iO=((t0)+(iP)|0);iN=((i1)-(iP))|0;bl[(1228)>>2]=iO;bl[(1216)>>2]=iN;iM=iN|1;rX=((iP)+4)|0;iL=((t0)+(rX)|0);bl[iL>>2]=iM;ik=((gD)+-36)|0;iK=((t0)+(ik)|0);bl[iK>>2]=40;iJ=bl[(1692)>>2]|0;bl[(1232)>>2]=iJ}else{lT=(1652);while(1){iH=bl[lT>>2]|0;iG=(((lT))+4|0);iF=bl[iG>>2]|0;iD=((iH)+(iF)|0);iB=(t0|0)==(iD|0);if(iB){eh=iH;eg=iG;ee=iF;cs=lT;ft=204;break}iy=(((lT))+8|0);iw=bl[iy>>2]|0;iu=(iw|0)==(0|0);if(iu){break}else{lT=iw}}if((ft|0)==204){ir=(((cs))+12|0);ip=bl[ir>>2]|0;ii=ip&8;ih=(ii|0)==(0);if(ih){ig=(jh>>>0)>=(eh>>>0);id=(jh>>>0)<(t0>>>0);ss=id&ig;if(ss){ib=((ee)+(gD))|0;bl[eg>>2]=ib;h9=bl[(1216)>>2]|0;h6=((h9)+(gD))|0;h4=(((jh))+8|0);h2=h4;h0=h2&7;hV=(h0|0)==(0);hU=(0-(h2))|0;hT=hU&7;hR=hV?0:hT;hP=((jh)+(hR)|0);hN=((h6)-(hR))|0;bl[(1228)>>2]=hP;bl[(1216)>>2]=hN;hL=hN|1;nc=((hR)+4)|0;hJ=((jh)+(nc)|0);bl[hJ>>2]=hL;jQ=((h6)+4)|0;hH=((jh)+(jQ)|0);bl[hH>>2]=40;hF=bl[(1692)>>2]|0;bl[(1232)>>2]=hF;break}}}hA=bl[(1220)>>2]|0;hz=(t0>>>0)<(hA>>>0);if(hz){bl[(1220)>>2]=t0;bH=t0}else{bH=hA}hy=((t0)+(gD)|0);dL=(1652);while(1){hw=bl[dL>>2]|0;hu=(hw|0)==(hy|0);if(hu){et=dL;uW=dL;ft=212;break}hs=(((dL))+8|0);hq=bl[hs>>2]|0;ho=(hq|0)==(0|0);if(ho){gP=(1652);break}else{dL=hq}}if((ft|0)==212){hm=(((uW))+12|0);hj=bl[hm>>2]|0;c5=hj&8;c4=(c5|0)==(0);if(c4){bl[et>>2]=t0;c3=(((uW))+4|0);c2=bl[c3>>2]|0;c1=((c2)+(gD))|0;bl[c3>>2]=c1;c0=(((t0))+8|0);cY=c0;cX=cY&7;cW=(cX|0)==(0);cV=(0-(cY))|0;cJ=cV&7;cI=cW?0:cJ;cH=((t0)+(cI)|0);ed=((gD)+8)|0;cG=((t0)+(ed)|0);cF=cG;cE=cF&7;cD=(cE|0)==(0);cC=(0-(cF))|0;cB=cC&7;cA=cD?0:cB;rU=((cA)+(gD))|0;cm=((t0)+(rU)|0);cl=cm;ck=cH;cj=((cl)-(ck))|0;vc=((cI)+(rV))|0;ci=((t0)+(vc)|0);ch=((cj)-(rV))|0;cg=rV|3;eV=((cI)+4)|0;cf=((t0)+(eV)|0);bl[cf>>2]=cg;ce=(cm|0)==(jh|0);L324:do{if(ce){cd=bl[(1216)>>2]|0;b8=((cd)+(ch))|0;bl[(1216)>>2]=b8;bl[(1228)>>2]=ci;b7=b8|1;d5=((vc)+4)|0;b6=((t0)+(d5)|0);bl[b6>>2]=b7}else{b5=bl[(1224)>>2]|0;b4=(cm|0)==(b5|0);if(b4){b3=bl[(1212)>>2]|0;b2=((b3)+(ch))|0;bl[(1212)>>2]=b2;bl[(1224)>>2]=ci;b1=b2|1;mE=((vc)+4)|0;b0=((t0)+(mE)|0);bl[b0>>2]=b1;rW=((b2)+(vc))|0;bZ=((t0)+(rW)|0);bl[bZ>>2]=b2;break}rZ=((gD)+4)|0;lX=((rZ)+(cA))|0;bX=((t0)+(lX)|0);bW=bl[bX>>2]|0;bV=bW&3;bU=(bV|0)==(1);if(bU){bT=bW&-8;bS=bW>>>3;bR=(bW>>>0)<(256);L332:do{if(bR){g2=cA|8;rQ=((g2)+(gD))|0;bQ=((t0)+(rQ)|0);bP=bl[bQ>>2]|0;lN=((gD)+12)|0;lS=((lN)+(cA))|0;bO=((t0)+(lS)|0);bM=bl[bO>>2]|0;bL=bS<<1;bK=(1244+(bL<<2)|0);bJ=(bP|0)==(bK|0);do{if(!(bJ)){bI=(bP>>>0)<(bH>>>0);if(bI){af()}bG=(((bP))+12|0);bF=bl[bG>>2]|0;bE=(bF|0)==(cm|0);if(bE){break}af()}}while(0);bD=(bM|0)==(bP|0);if(bD){bB=1<<bS;bA=bB^-1;bz=bl[1204>>2]|0;bx=bz&bA;bl[1204>>2]=bx;break}wx=(bM|0)==(bK|0);do{if(wx){qE=(((bM))+8|0);sc=qE}else{wu=(bM>>>0)<(bH>>>0);if(wu){af()}ws=(((bM))+8|0);wq=bl[ws>>2]|0;wo=(wq|0)==(cm|0);if(wo){sc=ws;break}af()}}while(0);wm=(((bP))+12|0);bl[wm>>2]=bM;bl[sc>>2]=bP}else{dE=cA|24;fr=((dE)+(gD))|0;wf=((t0)+(fr)|0);we=bl[wf>>2]|0;ej=((gD)+12)|0;sQ=((ej)+(cA))|0;wd=((t0)+(sQ)|0);wb=bl[wd>>2]|0;v9=(wb|0)==(cm|0);do{if(v9){pw=cA|16;lB=((rZ)+(pw))|0;vL=((t0)+(lB)|0);vJ=bl[vL>>2]|0;vH=(vJ|0)==(0|0);if(vH){d6=((pw)+(gD))|0;vF=((t0)+(d6)|0);vD=bl[vF>>2]|0;vB=(vD|0)==(0|0);if(vB){nH=0;break}else{iV=vD;d4=vF}}else{iV=vJ;d4=vL}while(1){vx=(((iV))+20|0);vw=bl[vx>>2]|0;vv=(vw|0)==(0|0);if(!(vv)){iV=vw;d4=vx;continue}vt=(((iV))+16|0);vr=bl[vt>>2]|0;vp=(vr|0)==(0|0);if(vp){lM=iV;lR=d4;break}else{iV=vr;d4=vt}}vn=(lR>>>0)<(bH>>>0);if(vn){af()}else{bl[lR>>2]=0;nH=lM;break}}else{lI=cA|8;mP=((lI)+(gD))|0;v7=((t0)+(mP)|0);v5=bl[v7>>2]|0;v3=(v5>>>0)<(bH>>>0);if(v3){af()}v1=(((v5))+12|0);vZ=bl[v1>>2]|0;vS=(vZ|0)==(cm|0);if(!(vS)){af()}vQ=(((wb))+8|0);vP=bl[vQ>>2]|0;vN=(vP|0)==(cm|0);if(vN){bl[v1>>2]=wb;bl[vQ>>2]=v5;nH=wb;break}else{af()}}}while(0);vl=(we|0)==(0|0);if(vl){break}vT=((gD)+28)|0;gQ=((vT)+(cA))|0;vj=((t0)+(gQ)|0);vh=bl[vj>>2]|0;rG=(1508+(vh<<2)|0);rF=bl[rG>>2]|0;rE=(cm|0)==(rF|0);do{if(rE){bl[rG>>2]=nH;o0=(nH|0)==(0|0);if(!(o0)){break}rD=1<<vh;rC=rD^-1;rB=bl[(1208)>>2]|0;rA=rB&rC;bl[(1208)>>2]=rA;break L332}else{ry=bl[(1220)>>2]|0;rx=(we>>>0)<(ry>>>0);if(rx){af()}rw=(((we))+16|0);rv=bl[rw>>2]|0;ru=(rv|0)==(cm|0);if(ru){bl[rw>>2]=nH}else{rs=(((we))+20|0);bl[rs>>2]=nH}rr=(nH|0)==(0|0);if(rr){break L332}}}while(0);rq=bl[(1220)>>2]|0;rp=(nH>>>0)<(rq>>>0);if(rp){af()}ro=(((nH))+24|0);bl[ro>>2]=we;rM=cA|16;uK=((rM)+(gD))|0;rn=((t0)+(uK)|0);rm=bl[rn>>2]|0;rl=(rm|0)==(0|0);do{if(!(rl)){rj=(rm>>>0)<(rq>>>0);if(rj){af()}else{ri=(((nH))+16|0);bl[ri>>2]=rm;rh=(((rm))+24|0);bl[rh>>2]=nH;break}}}while(0);cZ=((rZ)+(rM))|0;rg=((t0)+(cZ)|0);rf=bl[rg>>2]|0;re=(rf|0)==(0|0);if(re){break}rd=bl[(1220)>>2]|0;rc=(rf>>>0)<(rd>>>0);if(rc){af()}else{rb=(((nH))+20|0);bl[rb>>2]=rf;ra=(((rf))+24|0);bl[ra>>2]=nH;break}}}while(0);gC=bT|cA;rz=((gC)+(gD))|0;q9=((t0)+(rz)|0);q8=((bT)+(ch))|0;dt=q9;sP=q8}else{dt=cm;sP=ch}q7=(((dt))+4|0);q6=bl[q7>>2]|0;q5=q6&-2;bl[q7>>2]=q5;q3=sP|1;rT=((vc)+4)|0;q2=((t0)+(rT)|0);bl[q2>>2]=q3;dR=((sP)+(vc))|0;q1=((t0)+(dR)|0);bl[q1>>2]=sP;q0=sP>>>3;qZ=(sP>>>0)<(256);if(qZ){qW=q0<<1;qV=(1244+(qW<<2)|0);qU=bl[1204>>2]|0;qT=1<<q0;qS=qU&qT;qR=(qS|0)==(0);do{if(qR){qQ=qU|qT;bl[1204>>2]=qQ;dg=((qW)+2)|0;lm=(1244+(dg<<2)|0);eU=lm;te=qV}else{s2=((qW)+2)|0;qP=(1244+(s2<<2)|0);qO=bl[qP>>2]|0;qN=bl[(1220)>>2]|0;qM=(qO>>>0)<(qN>>>0);if(!(qM)){eU=qP;te=qO;break}af()}}while(0);bl[eU>>2]=ci;qL=(((te))+12|0);bl[qL>>2]=ci;i8=((vc)+8)|0;qK=((t0)+(i8)|0);bl[qK>>2]=te;n6=((vc)+12)|0;qJ=((t0)+(n6)|0);bl[qJ>>2]=qV;break}qI=sP>>>8;qH=(qI|0)==(0);do{if(qH){oO=0}else{qG=(sP>>>0)>(16777215);if(qG){oO=31;break}qF=((qI)+1048320)|0;qD=qF>>>16;qC=qD&8;qB=qI<<qC;qA=((qB)+520192)|0;qz=qA>>>16;qw=qz&4;qu=qw|qC;qs=qB<<qw;qq=((qs)+245760)|0;qn=qq>>>16;ql=qn&2;qj=qu|ql;qe=(14-(qj))|0;qd=qs<<ql;qc=qd>>>15;p9=((qe)+(qc))|0;p7=p9<<1;p5=((p9)+7)|0;p3=sP>>>p5;p1=p3&1;pZ=p1|p7;oO=pZ}}while(0);pX=(1508+(oO<<2)|0);ks=((vc)+28)|0;pS=((t0)+(ks)|0);bl[pS>>2]=oO;pa=((vc)+16)|0;pR=((t0)+(pa)|0);ua=((vc)+20)|0;pQ=((t0)+(ua)|0);bl[pQ>>2]=0;bl[pR>>2]=0;pO=bl[(1208)>>2]|0;pM=1<<oO;pK=pO&pM;pI=(pK|0)==(0);if(pI){pG=pO|pM;bl[(1208)>>2]=pG;bl[pX>>2]=ci;fF=((vc)+24)|0;pD=((t0)+(fF)|0);bl[pD>>2]=pX;lP=((vc)+12)|0;pA=((t0)+(lP)|0);bl[pA>>2]=ci;rI=((vc)+8)|0;pv=((t0)+(rI)|0);bl[pv>>2]=ci;break}pu=bl[pX>>2]|0;pt=(((pu))+4|0);pr=bl[pt>>2]|0;pp=pr&-8;pn=(pp|0)==(sP|0);L418:do{if(pn){ds=pu}else{pl=(oO|0)==(31);pj=oO>>>1;ph=(25-(pj))|0;pf=pl?0:ph;lH=sP<<pf;k2=lH;iU=pu;while(1){lz=k2>>>31;ly=((((iU))+16|0)+(lz<<2)|0);lE=bl[ly>>2]|0;lx=(lE|0)==(0|0);if(lx){gJ=ly;uL=iU;break}lG=k2<<1;lF=(((lE))+4|0);lD=bl[lF>>2]|0;lC=lD&-8;lA=(lC|0)==(sP|0);if(lA){ds=lE;break L418}else{k2=lG;iU=lE}}lw=bl[(1220)>>2]|0;lv=(gJ>>>0)<(lw>>>0);if(lv){af()}else{bl[gJ>>2]=ci;gj=((vc)+24)|0;lu=((t0)+(gj)|0);bl[lu>>2]=uL;lW=((vc)+12)|0;lt=((t0)+(lW)|0);bl[lt>>2]=ci;rL=((vc)+8)|0;ls=((t0)+(rL)|0);bl[ls>>2]=ci;break L324}}}while(0);lr=(((ds))+8|0);lq=bl[lr>>2]|0;lp=bl[(1220)>>2]|0;lo=(lq>>>0)>=(lp>>>0);wi=(ds>>>0)>=(lp>>>0);ln=lo&wi;if(ln){ll=(((lq))+12|0);bl[ll>>2]=ci;bl[lr>>2]=ci;k0=((vc)+8)|0;lk=((t0)+(k0)|0);bl[lk>>2]=lq;qa=((vc)+12)|0;lj=((t0)+(qa)|0);bl[lj>>2]=ds;uX=((vc)+24)|0;li=((t0)+(uX)|0);bl[li>>2]=0;break}else{af()}}}while(0);qx=cI|8;lh=((t0)+(qx)|0);rN=lh;return(rN|0)}else{gP=(1652)}}while(1){lg=bl[gP>>2]|0;lf=(lg>>>0)>(jh>>>0);if(!(lf)){le=(((gP))+4|0);ld=bl[le>>2]|0;lc=((lg)+(ld)|0);lb=(lc>>>0)>(jh>>>0);if(lb){ew=lg;ev=ld;eu=lc;break}}la=(((gP))+8|0);k9=bl[la>>2]|0;gP=k9}l1=((ev)+-47)|0;ij=((ev)+-39)|0;k8=((ew)+(ij)|0);k7=k8;k6=k7&7;k5=(k6|0)==(0);k4=(0-(k7))|0;k3=k4&7;k1=k5?0:k3;vR=((l1)+(k1))|0;kY=((ew)+(vR)|0);kX=(((jh))+16|0);kW=(kY>>>0)<(kX>>>0);kV=kW?jh:kY;kU=(((kV))+8|0);kT=((gD)+-40)|0;kS=(((t0))+8|0);kQ=kS;kP=kQ&7;kO=(kP|0)==(0);kM=(0-(kQ))|0;kL=kM&7;kK=kO?0:kL;kJ=((t0)+(kK)|0);kI=((kT)-(kK))|0;bl[(1228)>>2]=kJ;bl[(1216)>>2]=kI;kH=kI|1;cM=((kK)+4)|0;kG=((t0)+(cM)|0);bl[kG>>2]=kH;ea=((gD)+-36)|0;kF=((t0)+(ea)|0);bl[kF>>2]=40;kE=bl[(1692)>>2]|0;bl[(1232)>>2]=kE;kD=(((kV))+4|0);bl[kD>>2]=27;bl[kU>>2]=bl[(1652)>>2]|0;bl[kU+4>>2]=bl[(1652)+4>>2]|0;bl[kU+8>>2]=bl[(1652)+8>>2]|0;bl[kU+12>>2]=bl[(1652)+12>>2]|0;bl[(1652)>>2]=t0;bl[(1656)>>2]=gD;bl[(1664)>>2]=0;bl[(1660)>>2]=kU;kA=(((kV))+28|0);bl[kA>>2]=7;kz=(((kV))+32|0);kw=(kz>>>0)<(eu>>>0);if(kw){kr=kA;while(1){ku=(((kr))+4|0);bl[ku>>2]=7;kp=(((kr))+8|0);km=(kp>>>0)<(eu>>>0);if(km){kr=ku}else{break}}}kk=(kV|0)==(jh|0);if(!(kk)){ki=kV;kf=jh;kb=((ki)-(kf))|0;ka=bl[kD>>2]|0;j8=ka&-2;bl[kD>>2]=j8;j6=kb|1;j4=(((jh))+4|0);bl[j4>>2]=j6;bl[kV>>2]=kb;j2=kb>>>3;j0=(kb>>>0)<(256);if(j0){jY=j2<<1;jW=(1244+(jY<<2)|0);jU=bl[1204>>2]|0;jP=1<<j2;jO=jU&jP;jM=(jO|0)==(0);if(jM){jK=jU|jP;bl[1204>>2]=jK;wh=((jY)+2)|0;mn=(1244+(wh<<2)|0);dS=mn;vU=jW}else{so=((jY)+2)|0;jI=(1244+(so<<2)|0);jG=bl[jI>>2]|0;jE=bl[(1220)>>2]|0;jC=(jG>>>0)<(jE>>>0);if(jC){af()}else{dS=jI;vU=jG}}bl[dS>>2]=jh;jA=(((vU))+12|0);bl[jA>>2]=jh;jy=(((jh))+8|0);bl[jy>>2]=vU;ju=(((jh))+12|0);bl[ju>>2]=jW;break}js=kb>>>8;jq=(js|0)==(0);if(jq){rR=0}else{jo=(kb>>>0)>(16777215);if(jo){rR=31}else{jm=((js)+1048320)|0;jk=jm>>>16;ji=jk&8;jg=js<<ji;je=((jg)+520192)|0;jc=je>>>16;d3=jc&4;d2=d3|ji;d1=jg<<d3;d0=((d1)+245760)|0;dZ=d0>>>16;dY=dZ&2;dX=d2|dY;dV=(14-(dX))|0;dU=d1<<dY;dT=dU>>>15;dQ=((dV)+(dT))|0;dP=dQ<<1;dO=((dQ)+7)|0;dN=kb>>>dO;dM=dN&1;dK=dM|dP;rR=dK}}dJ=(1508+(rR<<2)|0);dI=(((jh))+28|0);bl[dI>>2]=rR;dH=(((jh))+20|0);bl[dH>>2]=0;bl[kX>>2]=0;dG=bl[(1208)>>2]|0;dD=1<<rR;dC=dG&dD;dB=(dC|0)==(0);if(dB){dA=dG|dD;bl[(1208)>>2]=dA;bl[dJ>>2]=jh;dz=(((jh))+24|0);bl[dz>>2]=dJ;dy=(((jh))+12|0);bl[dy>>2]=jh;dx=(((jh))+8|0);bl[dx>>2]=jh;break}dw=bl[dJ>>2]|0;dv=(((dw))+4|0);du=bl[dv>>2]|0;dr=du&-8;dq=(dr|0)==(kb|0);L459:do{if(dq){eb=dw}else{dp=(rR|0)==(31);dn=rR>>>1;dm=(25-(dn))|0;dl=dp?0:dm;dk=kb<<dl;iI=dk;s1=dw;while(1){dc=iI>>>31;db=((((s1))+16|0)+(dc<<2)|0);dh=bl[db>>2]|0;da=(dh|0)==(0|0);if(da){ex=db;kc=s1;break}dj=iI<<1;di=(((dh))+4|0);df=bl[di>>2]|0;de=df&-8;dd=(de|0)==(kb|0);if(dd){eb=dh;break L459}else{iI=dj;s1=dh}}c9=bl[(1220)>>2]|0;c8=(ex>>>0)<(c9>>>0);if(c8){af()}else{bl[ex>>2]=jh;c7=(((jh))+24|0);bl[c7>>2]=kc;c6=(((jh))+12|0);bl[c6>>2]=jh;cU=(((jh))+8|0);bl[cU>>2]=jh;break L299}}}while(0);cT=(((eb))+8|0);cS=bl[cT>>2]|0;cR=bl[(1220)>>2]|0;cQ=(cS>>>0)>=(cR>>>0);fq=(eb>>>0)>=(cR>>>0);cP=cQ&fq;if(cP){cO=(((cS))+12|0);bl[cO>>2]=jh;bl[cT>>2]=jh;cN=(((jh))+8|0);bl[cN>>2]=cS;cL=(((jh))+12|0);bl[cL>>2]=eb;cK=(((jh))+24|0);bl[cK>>2]=0;break}else{af()}}}}while(0);cz=bl[(1216)>>2]|0;cy=(cz>>>0)>(rV>>>0);if(cy){cx=((cz)-(rV))|0;bl[(1216)>>2]=cx;cw=bl[(1228)>>2]|0;cv=((cw)+(rV)|0);bl[(1228)>>2]=cv;cu=cx|1;kn=((rV)+4)|0;ct=((cw)+(kn)|0);bl[ct>>2]=cu;cr=rV|3;cp=(((cw))+4|0);bl[cp>>2]=cr;cn=(((cw))+8|0);rN=cn;return(rN|0)}}cb=(bh()|0);bl[cb>>2]=12;rN=0;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l[dC>>2]|0;dA=dB&3;dz=(dA|0)==(1);if(dz){af()}dy=dB&-8;c6=((dy)+-8)|0;dx=((g5)+(c6)|0);gC=dB&1;gB=(gC|0)==(0);do{if(gB){gA=bl[dF>>2]|0;gz=(dA|0)==(0);if(gz){return}ej=(-8-(gA))|0;gy=((g5)+(ej)|0);gx=((gA)+(dy))|0;gw=(gy>>>0)<(dE>>>0);if(gw){af()}gv=bl[(1224)>>2]|0;gu=(gy|0)==(gv|0);if(gu){ei=((dy)+-4)|0;dl=((g5)+(ei)|0);dk=bl[dl>>2]|0;dj=dk&3;di=(dj|0)==(3);if(!(di)){gT=gy;fx=gx;break}bl[(1212)>>2]=gx;dh=dk&-2;bl[dl>>2]=dh;dg=gx|1;gs=((ej)+4)|0;df=((g5)+(gs)|0);bl[df>>2]=dg;bl[dx>>2]=gx;return}gt=gA>>>3;fZ=(gA>>>0)<(256);if(fZ){fN=((ej)+8)|0;fY=((g5)+(fN)|0);fX=bl[fY>>2]|0;fL=((ej)+12)|0;fW=((g5)+(fL)|0);fV=bl[fW>>2]|0;fU=gt<<1;fT=(1244+(fU<<2)|0);fR=(fX|0)==(fT|0);if(!(fR)){fQ=(fX>>>0)<(dE>>>0);if(fQ){af()}fP=(((fX))+12|0);fo=bl[fP>>2]|0;fn=(fo|0)==(gy|0);if(!(fn)){af()}}fm=(fV|0)==(fX|0);if(fm){fk=1<<gt;fj=fk^-1;fi=bl[1204>>2]|0;fh=fi&fj;bl[1204>>2]=fh;gT=gy;fx=gx;break}fg=(fV|0)==(fT|0);if(fg){dr=(((fV))+8|0);gU=dr}else{ff=(fV>>>0)<(dE>>>0);if(ff){af()}fe=(((fV))+8|0);e1=bl[fe>>2]|0;e0=(e1|0)==(gy|0);if(e0){gU=fe}else{af()}}eZ=(((fX))+12|0);bl[eZ>>2]=fV;bl[gU>>2]=fX;gT=gy;fx=gx;break}gp=((ej)+24)|0;eY=((g5)+(gp)|0);eX=bl[eY>>2]|0;gn=((ej)+12)|0;eW=((g5)+(gn)|0);eV=bl[eW>>2]|0;eU=(eV|0)==(gy|0);do{if(eU){gj=((ej)+20)|0;eA=((g5)+(gj)|0);ez=bl[eA>>2]|0;ey=(ez|0)==(0|0);if(ey){gl=((ej)+16)|0;eu=((g5)+(gl)|0);et=bl[eu>>2]|0;es=(et|0)==(0|0);if(es){dv=0;break}else{dw=et;fS=eu}}else{dw=ez;fS=eA}while(1){er=(((dw))+20|0);eq=bl[er>>2]|0;ep=(eq|0)==(0|0);if(!(ep)){dw=eq;fS=er;continue}eo=(((dw))+16|0);en=bl[eo>>2]|0;el=(en|0)==(0|0);if(el){fO=dw;ee=fS;break}else{dw=en;fS=eo}}ek=(ee>>>0)<(dE>>>0);if(ek){af()}else{bl[ee>>2]=0;dv=fO;break}}else{ga=((ej)+8)|0;eT=((g5)+(ga)|0);eS=bl[eT>>2]|0;eH=(eS>>>0)<(dE>>>0);if(eH){af()}eG=(((eS))+12|0);eF=bl[eG>>2]|0;eE=(eF|0)==(gy|0);if(!(eE)){af()}eD=(((eV))+8|0);eC=bl[eD>>2]|0;eB=(eC|0)==(gy|0);if(eB){bl[eG>>2]=eV;bl[eD>>2]=eS;dv=eV;break}else{af()}}}while(0);ed=(eX|0)==(0|0);if(ed){gT=gy;fx=gx}else{gh=((ej)+28)|0;ec=((g5)+(gh)|0);ea=bl[ec>>2]|0;d9=(1508+(ea<<2)|0);d8=bl[d9>>2]|0;d7=(gy|0)==(d8|0);if(d7){bl[d9>>2]=dv;eb=(dv|0)==(0|0);if(eb){d6=1<<ea;d5=d6^-1;d4=bl[(1208)>>2]|0;d3=d4&d5;bl[(1208)>>2]=d3;gT=gy;fx=gx;break}}else{d2=bl[(1220)>>2]|0;d1=(eX>>>0)<(d2>>>0);if(d1){af()}d0=(((eX))+16|0);dZ=bl[d0>>2]|0;dY=(dZ|0)==(gy|0);if(dY){bl[d0>>2]=dv}else{dX=(((eX))+20|0);bl[dX>>2]=dv}dW=(dv|0)==(0|0);if(dW){gT=gy;fx=gx;break}}dV=bl[(1220)>>2]|0;dU=(dv>>>0)<(dV>>>0);if(dU){af()}dT=(((dv))+24|0);bl[dT>>2]=eX;gf=((ej)+16)|0;dQ=((g5)+(gf)|0);dP=bl[dQ>>2]|0;dO=(dP|0)==(0|0);do{if(!(dO)){dN=(dP>>>0)<(dV>>>0);if(dN){af()}else{dM=(((dv))+16|0);bl[dM>>2]=dP;dL=(((dP))+24|0);bl[dL>>2]=dv;break}}}while(0);gd=((ej)+20)|0;dK=((g5)+(gd)|0);dJ=bl[dK>>2]|0;dI=(dJ|0)==(0|0);if(dI){gT=gy;fx=gx}else{dH=bl[(1220)>>2]|0;dp=(dJ>>>0)<(dH>>>0);if(dp){af()}else{dn=(((dv))+20|0);bl[dn>>2]=dJ;dm=(((dJ))+24|0);bl[dm>>2]=dv;gT=gy;fx=gx;break}}}}else{gT=dF;fx=dy}}while(0);dd=(gT>>>0)<(dx>>>0);if(!(dd)){af()}gE=((dy)+-4)|0;dc=((g5)+(gE)|0);db=bl[dc>>2]|0;da=db&1;c9=(da|0)==(0);if(c9){af()}c8=db&2;c7=(c8|0)==(0);if(c7){c5=bl[(1228)>>2]|0;c4=(dx|0)==(c5|0);if(c4){c3=bl[(1216)>>2]|0;c2=((c3)+(fx))|0;bl[(1216)>>2]=c2;bl[(1228)>>2]=gT;c1=c2|1;cZ=(((gT))+4|0);bl[cZ>>2]=c1;cY=bl[(1224)>>2]|0;cX=(gT|0)==(cY|0);if(!(cX)){return}bl[(1224)>>2]=0;bl[(1212)>>2]=0;return}cW=bl[(1224)>>2]|0;cV=(dx|0)==(cW|0);if(cV){cU=bl[(1212)>>2]|0;cT=((cU)+(fx))|0;bl[(1212)>>2]=cT;bl[(1224)>>2]=gT;cS=cT|1;cQ=(((gT))+4|0);bl[cQ>>2]=cS;cP=((gT)+(cT)|0);bl[cP>>2]=cT;return}cO=db&-8;cM=((cO)+(fx))|0;cL=db>>>3;cK=(db>>>0)<(256);do{if(cK){cJ=((g5)+(dy)|0);cI=bl[cJ>>2]|0;fl=dy|4;cH=((g5)+(fl)|0);cF=bl[cH>>2]|0;cD=cL<<1;cC=(1244+(cD<<2)|0);cB=(cI|0)==(cC|0);if(!(cB)){cA=bl[(1220)>>2]|0;cz=(cI>>>0)<(cA>>>0);if(cz){af()}cy=(((cI))+12|0);cx=bl[cy>>2]|0;cw=(cx|0)==(dx|0);if(!(cw)){af()}}cv=(cF|0)==(cI|0);if(cv){cu=1<<cL;cr=cu^-1;cq=bl[1204>>2]|0;co=cq&cr;bl[1204>>2]=co;break}cm=(cF|0)==(cC|0);if(cm){ds=(((cF))+8|0);cR=ds}else{cl=bl[(1220)>>2]|0;ck=(cF>>>0)<(cl>>>0);if(ck){af()}cj=(((cF))+8|0);ci=bl[cj>>2]|0;ch=(ci|0)==(dx|0);if(ch){cR=cj}else{af()}}cg=(((cI))+12|0);bl[cg>>2]=cF;bl[cR>>2]=cI}else{eh=((dy)+16)|0;cf=((g5)+(eh)|0);ce=bl[cf>>2]|0;ev=dy|4;cd=((g5)+(ev)|0);cc=bl[cd>>2]|0;cb=(cc|0)==(dx|0);do{if(cb){ef=((dy)+12)|0;bQ=((g5)+(ef)|0);bP=bl[bQ>>2]|0;bO=(bP|0)==(0|0);if(bO){eg=((dy)+8)|0;bM=((g5)+(eg)|0);bK=bl[bM>>2]|0;bA=(bK|0)==(0|0);if(bA){cn=0;break}else{cp=bK;bB=bM}}else{cp=bP;bB=bQ}while(1){bz=(((cp))+20|0);by=bl[bz>>2]|0;bx=(by|0)==(0|0);if(!(bx)){cp=by;bB=bz;continue}bw=(((cp))+16|0);hG=bl[bw>>2]|0;hF=(hG|0)==(0|0);if(hF){gR=cp;de=bB;break}else{cp=hG;bB=bw}}hE=bl[(1220)>>2]|0;hC=(de>>>0)<(hE>>>0);if(hC){af()}else{bl[de>>2]=0;cn=gR;break}}else{ca=((g5)+(dy)|0);b9=bl[ca>>2]|0;b8=bl[(1220)>>2]|0;b6=(b9>>>0)<(b8>>>0);if(b6){af()}b4=(((b9))+12|0);bV=bl[b4>>2]|0;bU=(bV|0)==(dx|0);if(!(bU)){af()}bT=(((cc))+8|0);bS=bl[bT>>2]|0;bR=(bS|0)==(dx|0);if(bR){bl[b4>>2]=cc;bl[bT>>2]=b9;cn=cc;break}else{af()}}}while(0);hA=(ce|0)==(0|0);if(!(hA)){gO=((dy)+20)|0;hr=((g5)+(gO)|0);hq=bl[hr>>2]|0;hp=(1508+(hq<<2)|0);ho=bl[hp>>2]|0;hn=(dx|0)==(ho|0);if(hn){bl[hp>>2]=cn;dR=(cn|0)==(0|0);if(dR){hm=1<<hq;hl=hm^-1;hk=bl[(1208)>>2]|0;hi=hk&hl;bl[(1208)>>2]=hi;break}}else{hf=bl[(1220)>>2]|0;b7=(ce>>>0)<(hf>>>0);if(b7){af()}b5=(((ce))+16|0);b3=bl[b5>>2]|0;b2=(b3|0)==(dx|0);if(b2){bl[b5>>2]=cn}else{b1=(((ce))+20|0);bl[b1>>2]=cn}b0=(cn|0)==(0|0);if(b0){break}}bZ=bl[(1220)>>2]|0;bY=(cn>>>0)<(bZ>>>0);if(bY){af()}bX=(((cn))+24|0);bl[bX>>2]=ce;gM=((dy)+8)|0;bW=((g5)+(gM)|0);bN=bl[bW>>2]|0;bL=(bN|0)==(0|0);do{if(!(bL)){bJ=(bN>>>0)<(bZ>>>0);if(bJ){af()}else{bI=(((cn))+16|0);bl[bI>>2]=bN;bH=(((bN))+24|0);bl[bH>>2]=cn;break}}}while(0);gK=((dy)+12)|0;bG=((g5)+(gK)|0);bF=bl[bG>>2]|0;bE=(bF|0)==(0|0);if(!(bE)){bD=bl[(1220)>>2]|0;bC=(bF>>>0)<(bD>>>0);if(bC){af()}else{hD=(((cn))+20|0);bl[hD>>2]=bF;hB=(((bF))+24|0);bl[hB>>2]=cn;break}}}}}while(0);hz=cM|1;hy=(((gT))+4|0);bl[hy>>2]=hz;hx=((gT)+(cM)|0);bl[hx>>2]=cM;hw=bl[(1224)>>2]|0;hv=(gT|0)==(hw|0);if(hv){bl[(1212)>>2]=cM;return}else{fv=cM}}else{hu=db&-2;bl[dc>>2]=hu;ht=fx|1;hs=(((gT))+4|0);bl[hs>>2]=ht;hj=((gT)+(fx)|0);bl[hj>>2]=fx;fv=fx}hg=fv>>>3;he=(fv>>>0)<(256);if(he){hd=hg<<1;hb=(1244+(hd<<2)|0);ha=bl[1204>>2]|0;g9=1<<hg;g8=ha&g9;g7=(g8|0)==(0);if(g7){g6=ha|g9;bl[1204>>2]=g6;cE=((hd)+2)|0;dt=(1244+(cE<<2)|0);cs=dt;ex=hb}else{gQ=((hd)+2)|0;g4=(1244+(gQ<<2)|0);g3=bl[g4>>2]|0;g2=bl[(1220)>>2]|0;g1=(g3>>>0)<(g2>>>0);if(g1){af()}else{cs=g4;ex=g3}}bl[cs>>2]=gT;g0=(((ex))+12|0);bl[g0>>2]=gT;gZ=(((gT))+8|0);bl[gZ>>2]=ex;gY=(((gT))+12|0);bl[gY>>2]=hb;return}gX=fv>>>8;gW=(gX|0)==(0);if(gW){hc=0}else{gV=(fv>>>0)>(16777215);if(gV){hc=31}else{gS=((gX)+1048320)|0;gP=gS>>>16;gN=gP&8;gL=gX<<gN;gJ=((gL)+520192)|0;gI=gJ>>>16;gH=gI&4;gG=gH|gN;gF=gL<<gH;gD=((gF)+245760)|0;gr=gD>>>16;gq=gr&2;go=gG|gq;gm=(14-(go))|0;gk=gF<<gq;gi=gk>>>15;gg=((gm)+(gi))|0;ge=gg<<1;gb=((gg)+7)|0;f8=fv>>>gb;fM=f8&1;fK=fM|ge;hc=fK}}fJ=(1508+(hc<<2)|0);fI=(((gT))+28|0);bl[fI>>2]=hc;fH=(((gT))+16|0);fG=(((gT))+20|0);bl[fG>>2]=0;bl[fH>>2]=0;fF=bl[(1208)>>2]|0;fE=1<<hc;fC=fF&fE;fA=(fC|0)==(0);L199:do{if(fA){fd=fF|fE;bl[(1208)>>2]=fd;bl[fJ>>2]=gT;fc=(((gT))+24|0);bl[fc>>2]=fJ;fb=(((gT))+12|0);bl[fb>>2]=gT;fa=(((gT))+8|0);bl[fa>>2]=gT}else{e9=bl[fJ>>2]|0;e8=(((e9))+4|0);e7=bl[e8>>2]|0;e6=e7&-8;e4=(e6|0)==(fv|0);L202:do{if(e4){em=e9}else{e2=(hc|0)==(31);eR=hc>>>1;eQ=(25-(eR))|0;eP=e2?0:eQ;eO=fv<<eP;dq=eO;du=e9;while(1){gc=dq>>>31;f9=((((du))+16|0)+(gc<<2)|0);eL=bl[f9>>2]|0;f7=(eL|0)==(0|0);if(f7){c0=f9;ew=du;break}eN=dq<<1;eM=(((eL))+4|0);eK=bl[eM>>2]|0;eJ=eK&-8;eI=(eJ|0)==(fv|0);if(eI){em=eL;break L202}else{dq=eN;du=eL}}f6=bl[(1220)>>2]|0;f5=(c0>>>0)<(f6>>>0);if(f5){af()}else{bl[c0>>2]=gT;f4=(((gT))+24|0);bl[f4>>2]=ew;f3=(((gT))+12|0);bl[f3>>2]=gT;f2=(((gT))+8|0);bl[f2>>2]=gT;break L199}}}while(0);f1=(((em))+8|0);f0=bl[f1>>2]|0;fD=bl[(1220)>>2]|0;fB=(f0>>>0)>=(fD>>>0);cG=(em>>>0)>=(fD>>>0);fz=fB&cG;if(fz){fy=(((f0))+12|0);bl[fy>>2]=gT;bl[f1>>2]=gT;fw=(((gT))+8|0);bl[fw>>2]=f0;fu=(((gT))+12|0);bl[fu>>2]=em;ft=(((gT))+24|0);bl[ft>>2]=0;break}else{af()}}}while(0);fr=bl[(1236)>>2]|0;fq=((fr)+-1)|0;bl[(1236)>>2]=fq;fp=(fq|0)==(0);if(fp){dS=(1660)}else{return}while(1){ct=bl[dS>>2]|0;e5=(ct|0)==(0|0);e3=(((ct))+8|0);if(e5){break}else{dS=e3}}bl[(1236)>>2]=-1;return}function at(){}function G(bC,bA,bx){bC=bC|0;bA=bA|0;bx=bx|0;var by=0,bB=0,bw=0,bz=0;by=(bC+bx)|0;if((bx|0)>=20){bA=bA&255;bz=bC&3;bB=bA|(bA<<8)|(bA<<16)|(bA<<24);bw=by&~3;if(bz){bz=(bC+4-bz)|0;while((bC|0)<(bz|0)){bg[((bC)>>0)]=bA;bC=(bC+1)|0}}while((bC|0)<(bw|0)){bl[((bC)>>2)]=bB;bC=(bC+4)|0}}while((bC|0)<(by|0)){bg[((bC)>>0)]=bA;bC=(bC+1)|0}return(bC-bx)|0}function bp(by,bz,bx){by=by|0;bz=bz|0;bx=bx|0;var bw=0;if((bx|0)>=4096){return J(by|0,bz|0,bx|0)|0}bw=by|0;if((by&3)==(bz&3)){while(by&3){if((bx|0)==0){return bw|0}bg[((by)>>0)]=((bg[((bz)>>0)])|0);by=(by+1)|0;bz=(bz+1)|0;bx=(bx-1)|0}while((bx|0)>=4){bl[((by)>>2)]=((bl[((bz)>>2)])|0);by=(by+4)|0;bz=(bz+4)|0;bx=(bx-4)|0}}while((bx|0)>0){bg[((by)>>0)]=((bg[((bz)>>0)])|0);by=(by+1)|0;bz=(bz+1)|0;bx=(bx-1)|0}return bw|0}function aP(by,bz,bx){by=by|0;bz=bz|0;bx=bx|0;var bw=0;if(((bz|0)<(by|0))&((by|0)<((bz+bx)|0))){bw=by;bz=(bz+bx)|0;by=(by+bx)|0;while((bx|0)>0){by=(by-1)|0;bz=(bz-1)|0;bx=(bx-1)|0;bg[((by)>>0)]=((bg[((bz)>>0)])|0)}by=bw}else{bp(by,bz,bx)|0}return by|0}function bs(bx,bw){bx=bx|0;bw=bw|0;return bc[bx&1](bw|0)|0}function c(by,bx,bw,bz){by=by|0;bx=bx|0;bw=bw|0;bz=bz|0;return I[by&7](bx|0,bw|0,bz|0)|0}function a7(bx,bw){bx=bx|0;bw=bw|0;aN[bx&7](bw|0)}function aU(bw){bw=bw|0;S(0);return 0}function aS(by,bx,bw){by=by|0;bx=bx|0;bw=bw|0;ac(1);return 0}function aR(bw){bw=bw|0;D(2)}var bc=[aU,N];var I=[aS,aS,a4,bd,aS,aK,aS,aS];var aN=[aR,aR,aR,aR,y,aR,aR,aR];return{_fflush:aA,_calc_out:f,_memmove:aP,_memset:G,_malloc:az,_encode:ab,_memcpy:bp,_free:B,___errno_location:bh,runPostSets:at,stackAlloc:r,stackSave:ad,stackRestore:bi,establishStackSpace:T,setThrew:e,setTempRet0:k,getTempRet0:U,dynCall_ii:bs,dynCall_iiii:c,dynCall_vi:a7}})(Module.asmGlobalArg,Module.asmLibraryArg,buffer);var real__fflush=asm._fflush;asm._fflush=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__fflush.apply(null,arguments)};var real__calc_out=asm._calc_out;asm._calc_out=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__calc_out.apply(null,arguments)};var real__memmove=asm._memmove;asm._memmove=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__memmove.apply(null,arguments)};var real__malloc=asm._malloc;asm._malloc=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__malloc.apply(null,arguments)};var real__encode=asm._encode;asm._encode=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__encode.apply(null,arguments)};var real__free=asm._free;asm._free=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__free.apply(null,arguments)};var real____errno_location=asm.___errno_location;asm.___errno_location=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real____errno_location.apply(null,arguments)};var _fflush=Module._fflush=asm._fflush;var runPostSets=Module.runPostSets=asm.runPostSets;var _calc_out=Module._calc_out=asm._calc_out;var _memmove=Module._memmove=asm._memmove;var _memset=Module._memset=asm._memset;var _malloc=Module._malloc=asm._malloc;var _encode=Module._encode=asm._encode;var _memcpy=Module._memcpy=asm._memcpy;var _free=Module._free=asm._free;var ___errno_location=Module.___errno_location=asm.___errno_location;var dynCall_ii=Module.dynCall_ii=asm.dynCall_ii;var dynCall_iiii=Module.dynCall_iiii=asm.dynCall_iiii;var dynCall_vi=Module.dynCall_vi=asm.dynCall_vi;Runtime.stackAlloc=asm.stackAlloc;Runtime.stackSave=asm.stackSave;Runtime.stackRestore=asm.stackRestore;Runtime.establishStackSpace=asm.establishStackSpace;Runtime.setTempRet0=asm.setTempRet0;Runtime.getTempRet0=asm.getTempRet0;function ExitStatus(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}ExitStatus.prototype=new Error();ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;var preloadStartTime=null;var calledMain=false;dependenciesFulfilled=function runCaller(){if(!Module.calledRun){run()}if(!Module.calledRun){dependenciesFulfilled=runCaller}};Module.callMain=Module.callMain=function callMain(c){assert(runDependencies==0,"cannot call main when async dependencies remain! (listen on __ATMAIN__)");assert(__ATPRERUN__.length==0,"cannot call main when preRun functions remain to be called");c=c||[];ensureInitRuntime();var h=c.length+1;function g(){for(var e=0;e<4-1;e++){a.push(0)}}var a=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];g();for(var d=0;d<h-1;d=d+1){a.push(allocate(intArrayFromString(c[d]),"i8",ALLOC_NORMAL));g()}a.push(0);a=allocate(a,"i32",ALLOC_NORMAL);try{var b=Module._main(h,a,0);exit(b,true)}catch(f){if(f instanceof ExitStatus){return}else{if(f=="SimulateInfiniteLoop"){Module.noExitRuntime=true;return}else{if(f&&typeof f==="object"&&f.stack){Module.printErr("exception thrown: "+[f,f.stack])}throw f}}}finally{calledMain=true}};function run(a){a=a||Module["arguments"];if(preloadStartTime===null){preloadStartTime=Date.now()}if(runDependencies>0){Module.printErr("run() called, but dependencies remain, so not running");return}preRun();if(runDependencies>0){return}if(Module.calledRun){return}function b(){if(Module.calledRun){return}Module.calledRun=true;if(ABORT){return}ensureInitRuntime();preMain();if(ENVIRONMENT_IS_WEB&&preloadStartTime!==null){Module.printErr("pre-main prep time: "+(Date.now()-preloadStartTime)+" ms")}if(Module.onRuntimeInitialized){Module.onRuntimeInitialized()}if(Module._main&&shouldRunNow){Module.callMain(a)}postRun()}if(Module.setStatus){Module.setStatus("Running...");setTimeout(function(){setTimeout(function(){Module.setStatus("")},1);b()},1)}else{b()}}Module.run=Module.run=run;function exit(b,a){if(a&&Module.noExitRuntime){Module.printErr("exit("+b+") implicitly called by end of main(), but noExitRuntime, so not exiting the runtime (you can use emscripten_force_exit, if you want to force a true shutdown)");return}if(Module.noExitRuntime){Module.printErr("exit("+b+") called, but noExitRuntime, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)")}else{ABORT=true;EXITSTATUS=b;STACKTOP=initialStackTop;exitRuntime();if(Module.onExit){Module.onExit(b)}}if(ENVIRONMENT_IS_NODE){process.stdout["once"]("drain",function(){process.exit(b)});console.log(" ");setTimeout(function(){process.exit(b)},500)}else{if(ENVIRONMENT_IS_SHELL&&typeof quit==="function"){quit(b)}}throw new ExitStatus(b)}Module.exit=Module.exit=exit;var abortDecorators=[];function abort(c){if(c!==undefined){Module.print(c);Module.printErr(c);c=JSON.stringify(c)}else{c=""}ABORT=true;EXITSTATUS=1;var a="";var b="abort("+c+") at "+stackTrace()+a;if(abortDecorators){abortDecorators.forEach(function(d){b=d(b,c)})}throw b}Module.abort=Module.abort=abort;if(Module.preInit){if(typeof Module.preInit=="function"){Module.preInit=[Module.preInit]}while(Module.preInit.length>0){Module.preInit.pop()()}}var shouldRunNow=true;if(Module.noInitialRun){shouldRunNow=false}run();