function globalEval(x){eval.call(null,x)}function abort(e){throw Module.print(e+":\n"+(new Error).stack),ABORT=!0,"Assertion: "+e}function assert(e,t){e||abort("Assertion failed: "+t)}function ccall(e,t,n,r){return ccallFunc(getCFunc(e),t,n,r)}function getCFunc(ident){try{var func=globalScope.Module["_"+ident];func||(func=eval("_"+ident))}catch(e){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}function ccallFunc(e,t,n,r){function s(e,t){if(t=="string"){if(e===null||e===undefined||e===0)return 0;i||(i=Runtime.stackSave());var n=Runtime.stackAlloc(e.length+1);return writeStringToMemory(e,n),n}if(t=="array"){i||(i=Runtime.stackSave());var n=Runtime.stackAlloc(e.length);return writeArrayToMemory(e,n),n}return e}function o(e,t){return t=="string"?Pointer_stringify(e):(assert(t!="array"),e)}var i=0,u=0,a=r?r.map(function(e){return s(e,n[u++])}):[],f=o(e.apply(null,a),t);return i&&Runtime.stackRestore(i),f}function cwrap(e,t,n){var r=getCFunc(e);return function(){return ccallFunc(r,t,n,Array.prototype.slice.call(arguments))}}function setValue(e,t,n,r){n=n||"i8",n.charAt(n.length-1)==="*"&&(n="i32");switch(n){case"i1":HEAP8[e]=t;break;case"i8":HEAP8[e]=t;break;case"i16":HEAP16[e>>1]=t;break;case"i32":HEAP32[e>>2]=t;break;case"i64":tempI64=[t>>>0,(Math.min(+Math.floor(t/4294967296),4294967295)|0)>>>0],HEAP32[e>>2]=tempI64[0],HEAP32[e+4>>2]=tempI64[1];break;case"float":HEAPF32[e>>2]=t;break;case"double":HEAPF64[e>>3]=t;break;default:abort("invalid type for setValue: "+n)}}function getValue(e,t,n){t=t||"i8",t.charAt(t.length-1)==="*"&&(t="i32");switch(t){case"i1":return HEAP8[e];case"i8":return HEAP8[e];case"i16":return HEAP16[e>>1];case"i32":return HEAP32[e>>2];case"i64":return HEAP32[e>>2];case"float":return HEAPF32[e>>2];case"double":return HEAPF64[e>>3];default:abort("invalid type for setValue: "+t)}return null}function allocate(e,t,n,r){var i,s;typeof e=="number"?(i=!0,s=e):(i=!1,s=e.length);var o=typeof t=="string"?t:null,u;n==ALLOC_NONE?u=r:u=[_malloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][n===undefined?ALLOC_STATIC:n](Math.max(s,o?1:t.length));if(i){var r=u,a;assert((u&3)==0),a=u+(s&-4);for(;r<a;r+=4)HEAP32[r>>2]=0;a=u+s;while(r<a)HEAP8[r++|0]=0;return u}if(o==="i8")return e.subarray||e.slice?HEAPU8.set(e,u):HEAPU8.set(new Uint8Array(e),u),u;var f=0,l,c,h;while(f<s){var p=e[f];typeof p=="function"&&(p=Runtime.getFunctionIndex(p)),l=o||t[f];if(l===0){f++;continue}l=="i64"&&(l="i32"),setValue(u+f,p,l),h!==l&&(c=Runtime.getNativeTypeSize(l),h=l),f+=c}return u}function Pointer_stringify(e,t){var n=!1,r,i=0;for(;;){r=HEAPU8[e+i|0];if(r>=128)n=!0;else if(r==0&&!t)break;i++;if(t&&i==t)break}t||(t=i);var s="";if(!n){var o=1024,u;while(t>0)u=String.fromCharCode.apply(String,HEAPU8.subarray(e,e+Math.min(t,o))),s=s?s+u:u,e+=o,t-=o;return s}var a=new Runtime.UTF8Processor;for(i=0;i<t;i++)r=HEAPU8[e+i|0],s+=a.processCChar(r);return s}function alignMemoryPage(e){return e+4095>>12<<12}function enlargeMemory(){abort("Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value, or (2) set Module.TOTAL_MEMORY before the program runs.")}function callRuntimeCallbacks(e){while(e.length>0){var t=e.shift();if(typeof t=="function"){t();continue}var n=t.func;typeof n=="number"?t.arg===undefined?Runtime.dynCall("v",n):Runtime.dynCall("vi",n,[t.arg]):n(t.arg===undefined?null:t.arg)}}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__)}function intArrayFromString(e,t,n){var r=(new Runtime.UTF8Processor).processJSString(e);return n&&(r.length=n),t||r.push(0),r}function intArrayToString(e){var t=[];for(var n=0;n<e.length;n++){var r=e[n];r>255&&(r&=255),t.push(String.fromCharCode(r))}return t.join("")}function writeStringToMemory(e,t,n){var r=intArrayFromString(e,n),i=0;while(i<r.length){var s=r[i];HEAP8[t+i|0]=s,i+=1}}function writeArrayToMemory(e,t){for(var n=0;n<e.length;n++)HEAP8[t+n|0]=e[n]}function unSign(e,t,n,r){return e>=0?e:t<=32?2*Math.abs(1<<t-1)+e:Math.pow(2,t)+e}function reSign(e,t,n,r){if(e<=0)return e;var i=t<=32?Math.abs(1<<t-1):Math.pow(2,t-1);return e>=i&&(t<=32||e>i)&&(e=-2*i+e),e}function addRunDependency(e){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),e?(assert(!runDependencyTracking[e]),runDependencyTracking[e]=1):Module.printErr("warning: run dependency added without ID")}function removeRunDependency(e){runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),e?(assert(runDependencyTracking[e]),delete runDependencyTracking[e]):Module.printErr("warning: run dependency removed without ID"),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),!calledRun&&shouldRunNow&&run())}function addPreRun(e){Module.preRun?typeof Module["preRun"]=="function"&&(Module.preRun=[Module.preRun]):Module.preRun=[],Module.preRun.push(e)}function loadMemoryInitializer(e){function t(e){HEAPU8.set(e,STATIC_BASE)}addPreRun(function(){ENVIRONMENT_IS_NODE||ENVIRONMENT_IS_SHELL?t(Module.readBinary(e)):Browser.asyncLoad(e,function(e){t(e)},function(t){throw"could not load memory initializer "+e})})}function copyTempFloat(e){HEAP8[tempDoublePtr]=HEAP8[e],HEAP8[tempDoublePtr+1]=HEAP8[e+1],HEAP8[tempDoublePtr+2]=HEAP8[e+2],HEAP8[tempDoublePtr+3]=HEAP8[e+3]}function copyTempDouble(e){HEAP8[tempDoublePtr]=HEAP8[e],HEAP8[tempDoublePtr+1]=HEAP8[e+1],HEAP8[tempDoublePtr+2]=HEAP8[e+2],HEAP8[tempDoublePtr+3]=HEAP8[e+3],HEAP8[tempDoublePtr+4]=HEAP8[e+4],HEAP8[tempDoublePtr+5]=HEAP8[e+5],HEAP8[tempDoublePtr+6]=HEAP8[e+6],HEAP8[tempDoublePtr+7]=HEAP8[e+7]}function ___setErrNo(e){return HEAP32[___errno_state>>2]=e,e}function _send(e,t,n,r){var i=FS.streams[e];return i?(i.sender(HEAPU8.subarray(t,t+n)),n):-1}function _pwrite(e,t,n,r){var i=FS.streams[e];if(!i||i.object.isDevice)return ___setErrNo(ERRNO_CODES.EBADF),-1;if(!i.isWrite)return ___setErrNo(ERRNO_CODES.EACCES),-1;if(i.object.isFolder)return ___setErrNo(ERRNO_CODES.EISDIR),-1;if(n<0||r<0)return ___setErrNo(ERRNO_CODES.EINVAL),-1;var s=i.object.contents;while(s.length<r)s.push(0);for(var o=0;o<n;o++)s[r+o]=HEAPU8[t+o|0];return i.object.timestamp=Date.now(),o}function _write(e,t,n){var r=FS.streams[e];if(r&&"socket"in r)return _send(e,t,n,0);if(!r)return ___setErrNo(ERRNO_CODES.EBADF),-1;if(!r.isWrite)return ___setErrNo(ERRNO_CODES.EACCES),-1;if(n<0)return ___setErrNo(ERRNO_CODES.EINVAL),-1;if(r.object.isDevice){if(r.object.output){for(var i=0;i<n;i++)try{r.object.output(HEAP8[t+i|0])}catch(s){return ___setErrNo(ERRNO_CODES.EIO),-1}return r.object.timestamp=Date.now(),i}return ___setErrNo(ERRNO_CODES.ENXIO),-1}var o=_pwrite(e,t,n,r.position);return o!=-1&&(r.position+=o),o}function _fwrite(e,t,n,r){var i=n*t;if(i==0)return 0;var s=_write(r,e,i);return s==-1?(FS.streams[r]&&(FS.streams[r].error=!0),0):Math.floor(s/t)}function __reallyNegative(e){return e<0||e===0&&1/e===-Infinity}function __formatString(e,t){function i(e){var n;return e==="double"?n=HEAPF64[t+r>>3]:e=="i64"?(n=[HEAP32[t+r>>2],HEAP32[t+(r+8)>>2]],r+=8):(e="i32",n=HEAP32[t+r>>2]),r+=Math.max(Runtime.getNativeFieldSize(e),Runtime.getAlignSize(e,null,!0)),n}var n=e,r=0,s=[],o,u,a;for(;;){var f=n;o=HEAP8[n];if(o===0)break;u=HEAP8[n+1|0];if(o==37){var l=!1,c=!1,h=!1,p=!1;e:for(;;){switch(u){case 43:l=!0;break;case 45:c=!0;break;case 35:h=!0;break;case 48:if(p)break e;p=!0;break;default:break e}n++,u=HEAP8[n+1|0]}var d=0;if(u==42)d=i("i32"),n++,u=HEAP8[n+1|0];else while(u>=48&&u<=57)d=d*10+(u-48),n++,u=HEAP8[n+1|0];var v=!1;if(u==46){var m=0;v=!0,n++,u=HEAP8[n+1|0];if(u==42)m=i("i32"),n++;else for(;;){var g=HEAP8[n+1|0];if(g<48||g>57)break;m=m*10+(g-48),n++}u=HEAP8[n+1|0]}else var m=6;var y;switch(String.fromCharCode(u)){case"h":var b=HEAP8[n+2|0];b==104?(n++,y=1):y=2;break;case"l":var b=HEAP8[n+2|0];b==108?(n++,y=8):y=4;break;case"L":case"q":case"j":y=8;break;case"z":case"t":case"I":y=4;break;default:y=null}y&&n++,u=HEAP8[n+1|0];switch(String.fromCharCode(u)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":var w=u==100||u==105;y=y||4;var a=i("i"+y*8),E=a,S;y==8&&(a=Runtime.makeBigInt(a[0],a[1],u==117));if(y<=4){var x=Math.pow(256,y)-1;a=(w?reSign:unSign)(a&x,y*8)}var T=Math.abs(a),N="";if(u==100||u==105)y==8&&i64Math?S=i64Math.stringify(E[0],E[1],null):S=reSign(a,8*y,1).toString(10);else if(u==117)y==8&&i64Math?S=i64Math.stringify(E[0],E[1],!0):S=unSign(a,8*y,1).toString(10),a=Math.abs(a);else if(u==111)S=(h?"0":"")+T.toString(8);else if(u==120||u==88){N=h&&a!=0?"0x":"";if(y==8&&i64Math)if(E[1]){S=(E[1]>>>0).toString(16);var C=(E[0]>>>0).toString(16);while(C.length<8)C="0"+C;S+=C}else S=(E[0]>>>0).toString(16);else if(a<0){a=-a,S=(T-1).toString(16);var k=[];for(var L=0;L<S.length;L++)k.push((15-parseInt(S[L],16)).toString(16));S=k.join("");while(S.length<y*2)S="f"+S}else S=T.toString(16);u==88&&(N=N.toUpperCase(),S=S.toUpperCase())}else u==112&&(T===0?S="(nil)":(N="0x",S=T.toString(16)));if(v)while(S.length<m)S="0"+S;l&&(a<0?N="-"+N:N="+"+N);while(N.length+S.length<d)c?S+=" ":p?S="0"+S:N=" "+N;S=N+S,S.split("").forEach(function(e){s.push(e.charCodeAt(0))});break;case"f":case"F":case"e":case"E":case"g":case"G":var a=i("double"),S;if(isNaN(a))S="nan",p=!1;else if(!isFinite(a))S=(a<0?"-":"")+"inf",p=!1;else{var A=!1,O=Math.min(m,20);if(u==103||u==71){A=!0,m=m||1;var M=parseInt(a.toExponential(O).split("e")[1],10);m>M&&M>=-4?(u=(u==103?"f":"F").charCodeAt(0),m-=M+1):(u=(u==103?"e":"E").charCodeAt(0),m--),O=Math.min(m,20)}if(u==101||u==69)S=a.toExponential(O),/[eE][-+]\d$/.test(S)&&(S=S.slice(0,-1)+"0"+S.slice(-1));else if(u==102||u==70)S=a.toFixed(O),a===0&&__reallyNegative(a)&&(S="-"+S);var _=S.split("e");if(A&&!h)while(_[0].length>1&&_[0].indexOf(".")!=-1&&(_[0].slice(-1)=="0"||_[0].slice(-1)=="."))_[0]=_[0].slice(0,-1);else{h&&S.indexOf(".")==-1&&(_[0]+=".");while(m>O++)_[0]+="0"}S=_[0]+(_.length>1?"e"+_[1]:""),u==69&&(S=S.toUpperCase()),l&&a>=0&&(S="+"+S)}while(S.length<d)c?S+=" ":!p||S[0]!="-"&&S[0]!="+"?S=(p?"0":" ")+S:S=S[0]+"0"+S.slice(1);u<97&&(S=S.toUpperCase()),S.split("").forEach(function(e){s.push(e.charCodeAt(0))});break;case"s":var D=i("i8*"),P=D?_strlen(D):"(null)".length;v&&(P=Math.min(P,m));if(!c)while(P<d--)s.push(32);if(D)for(var L=0;L<P;L++)s.push(HEAPU8[D++|0]);else s=s.concat(intArrayFromString("(null)".substr(0,P),!0));if(c)while(P<d--)s.push(32);break;case"c":c&&s.push(i("i8"));while(--d>0)s.push(32);c||s.push(i("i8"));break;case"n":var H=i("i32*");HEAP32[H>>2]=s.length;break;case"%":s.push(o);break;default:for(var L=f;L<n+2;L++)s.push(HEAP8[L])}n+=2}else s.push(o),n+=1}return s}function _fprintf(e,t,n){var r=__formatString(t,n),i=Runtime.stackSave(),s=_fwrite(allocate(r,"i8",ALLOC_STACK),1,r.length,e);return Runtime.stackRestore(i),s}function _printf(e,t){var n=HEAP32[_stdout>>2];return _fprintf(n,e,t)}function __exit(e){function t(){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e,Module.print("Exit Status: "+e)}throw t.prototype=new Error,t.prototype.constructor=t,exitRuntime(),ABORT=!0,new t}function _exit(e){__exit(e)}function ___assert_func(e,t,n,r){throw"Assertion failed: "+(r?Pointer_stringify(r):"unknown condition")+", at: "+[e?Pointer_stringify(e):"unknown filename",t,n?Pointer_stringify(n):"unknown function"]+" at "+(new Error).stack}function _llvm_lifetime_start(){}function _llvm_lifetime_end(){}function _fputs(e,t){return _write(t,e,_strlen(e))}function _fputc(e,t){var n=unSign(e&255);HEAP8[_fputc.ret|0]=n;var r=_write(t,_fputc.ret,1);return r==-1?(FS.streams[t]&&(FS.streams[t].error=!0),-1):n}function _puts(e){var t=HEAP32[_stdout>>2],n=_fputs(e,t);if(n<0)return n;var r=_fputc(10,t);return r<0?-1:n+1}function _malloc(e){var t=Runtime.dynamicAlloc(e+8);return t+8&4294967288}function _free(){}function invoke_ii(e,t){try{return Module.dynCall_ii(e,t)}catch(n){if(typeof n!="number"&&n!=="longjmp")throw n;asm.setThrew(1,0)}}function invoke_v(e){try{Module.dynCall_v(e)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;asm.setThrew(1,0)}}function invoke_iii(e,t,n){try{return Module.dynCall_iii(e,t,n)}catch(r){if(typeof r!="number"&&r!=="longjmp")throw r;asm.setThrew(1,0)}}function invoke_vi(e,t){try{Module.dynCall_vi(e,t)}catch(n){if(typeof n!="number"&&n!=="longjmp")throw n;asm.setThrew(1,0)}}function asmPrintInt(e,t){Module.print("int "+e+","+t)}function asmPrintFloat(e,t){Module.print("float "+e+","+t)}function run(e){function r(){ensureInitRuntime(),preMain();var t=0;calledRun=!0,Module._main&&shouldRunNow&&(t=Module.callMain(e),Module.noExitRuntime||exitRuntime());if(Module.postRun){typeof Module["postRun"]=="function"&&(Module.postRun=[Module.postRun]);while(Module.postRun.length>0)Module.postRun.pop()()}return t}e=e||Module.arguments;if(runDependencies>0)return Module.printErr("run() called, but dependencies remain, so not running"),0;if(Module.preRun){typeof Module["preRun"]=="function"&&(Module.preRun=[Module.preRun]);var t=Module.preRun;Module.preRun=[];for(var n=t.length-1;n>=0;n--)t[n]();if(runDependencies>0)return 0}return Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),ABORT||r()},1),0):r()}try{this.Module=Module,Module.test}catch(e){this.Module=Module={}}var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof require=="function",ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print=function(e){process.stdout.write(e+"\n")},Module.printErr=function(e){process.stderr.write(e+"\n")};var nodeFS=require("fs"),nodePath=require("path");Module.read=function(e,t){e=nodePath.normalize(e);var n=nodeFS.readFileSync(e);return!n&&e!=nodePath["resolve"](e)&&(e=path.join(__dirname,"..","src",e),n=nodeFS.readFileSync(e)),n&&!t&&(n=n.toString()),n},Module.readBinary=function(e){return Module.read(e,!0)},Module.load=function(e){globalEval(read(e))},Module.arguments||(Module.arguments=process.argv.slice(2)),module.exports=Module}ENVIRONMENT_IS_SHELL&&(Module.print=print,typeof printErr!="undefined"&&(Module.printErr=printErr),Module.read=read,Module.readBinary=function(e){return read(e,"binary")},Module.arguments||(typeof scriptArgs!="undefined"?Module.arguments=scriptArgs:typeof arguments!="undefined"&&(Module.arguments=arguments)),this.Module=Module),ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER&&(Module.print||(Module.print=function(e){console.log(e)}),Module.printErr||(Module.printErr=function(e){console.log(e)}),this.Module=Module);if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)Module.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},Module.arguments||typeof arguments!="undefined"&&(Module.arguments=arguments);if(ENVIRONMENT_IS_WORKER){var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump!="undefined"?function(e){dump(e)}:function(e){}),Module.load=importScripts}if(!ENVIRONMENT_IS_WORKER&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_SHELL)throw"Unknown runtime environment. Where are we?";!Module["load"]=="undefined"&&Module.read&&(Module.load=function(e){globalEval(Module.read(e))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun||(Module.preRun=[]),Module.postRun||(Module.postRun=[]);var Runtime={stackSave:function(){return STACKTOP},stackRestore:function(e){STACKTOP=e},forceAlign:function(e,t){t=t||4;if(t==1)return e;if(isNumber(e)&&isNumber(t))return Math.ceil(e/t)*t;if(isNumber(t)&&isPowerOfTwo(t)){var n=log2(t);return"(((("+e+")+"+(t-1)+")>>"+n+")<<"+n+")"}return"Math.ceil(("+e+")/"+t+")*"+t},isNumberType:function(e){return e in Runtime.INT_TYPES||e in Runtime.FLOAT_TYPES},isPointerType:function(t){return t[t.length-1]=="*"},isStructType:function(t){return isPointerType(t)?!1:isArrayType(t)?!0:/<?{ ?[^}]* ?}>?/.test(t)?!0:t[0]=="%"},INT_TYPES:{i1:0,i8:0,i16:0,i32:0,i64:0},FLOAT_TYPES:{"float":0,"double":0},or64:function(e,t){var n=e|0|(t|0),r=(Math.round(e/4294967296)|Math.round(t/4294967296))*4294967296;return n+r},and64:function(e,t){var n=(e|0)&(t|0),r=(Math.round(e/4294967296)&Math.round(t/4294967296))*4294967296;return n+r},xor64:function(e,t){var n=(e|0)^(t|0),r=(Math.round(e/4294967296)^Math.round(t/4294967296))*4294967296;return n+r},getNativeTypeSize:function(e,t){if(Runtime.QUANTUM_SIZE==1)return 1;var n={"%i1":1,"%i8":1,"%i16":2,"%i32":4,"%i64":8,"%float":4,"%double":8}["%"+e];if(!n)if(e.charAt(e.length-1)=="*")n=Runtime.QUANTUM_SIZE;else if(e[0]=="i"){var r=parseInt(e.substr(1));assert(r%8==0),n=r/8}return n},getNativeFieldSize:function(e){return Math.max(Runtime.getNativeTypeSize(e),Runtime.QUANTUM_SIZE)},dedup:function(t,n){var r={};return n?t.filter(function(e){return r[e[n]]?!1:(r[e[n]]=!0,!0)}):t.filter(function(e){return r[e]?!1:(r[e]=!0,!0)})},set:function(){var t=typeof arguments[0]=="object"?arguments[0]:arguments,n={};for(var r=0;r<t.length;r++)n[t[r]]=0;return n},STACK_ALIGN:8,getAlignSize:function(e,t,n){return e=="i64"||e=="double"||n?8:e?Math.min(t||(e?Runtime.getNativeFieldSize(e):0),Runtime.QUANTUM_SIZE):Math.min(t,8)},calculateStructAlignment:function(t){t.flatSize=0,t.alignSize=0;var n=[],r=-1;return t.flatIndexes=t.fields.map(function(e){var i,s;if(Runtime.isNumberType(e)||Runtime.isPointerType(e))i=Runtime.getNativeTypeSize(e),s=Runtime.getAlignSize(e,i);else if(Runtime.isStructType(e))i=Types.types[e].flatSize,s=Runtime.getAlignSize(null,Types.types[e].alignSize);else{if(e[0]!="b")throw"Unclear type in struct: "+e+", in "+t.name_+" :: "+dump(Types.types[t.name_]);i=e.substr(1)|0,s=1}t.packed&&(s=1),t.alignSize=Math.max(t.alignSize,s);var o=Runtime.alignMemory(t.flatSize,s);return t.flatSize=o+i,r>=0&&n.push(o-r),r=o,o}),t.flatSize=Runtime.alignMemory(t.flatSize,t.alignSize),n.length==0?t.flatFactor=t.flatSize:Runtime.dedup(n).length==1&&(t.flatFactor=n[0]),t.needsFlattening=t.flatFactor!=1,t.flatIndexes},generateStructInfo:function(e,t,n){var r,i;if(t){n=n||0,r=(typeof Types=="undefined"?Runtime.typeInfo:Types.types)[t];if(!r)return null;if(r.fields.length!=e.length)return printErr("Number of named fields must match the type for "+t+": possibly duplicate struct names. Cannot return structInfo"),null;i=r.flatIndexes}else{var r={fields:e.map(function(e){return e[0]})};i=Runtime.calculateStructAlignment(r)}var s={__size__:r.flatSize};return t?e.forEach(function(e,t){if(typeof e=="string")s[e]=i[t]+n;else{var o;for(var u in e)o=u;s[o]=Runtime.generateStructInfo(e[o],r.fields[t],i[t])}}):e.forEach(function(e,t){s[e[1]]=i[t]}),s},dynCall:function(e,t,n){return n&&n.length?(n.splice||(n=Array.prototype.slice.call(n)),n.splice(0,0,t),Module["dynCall_"+e].apply(null,n)):Module["dynCall_"+e].call(null,t)},functionPointers:[],addFunction:function(e){for(var t=0;t<Runtime.functionPointers.length;t++)if(!Runtime.functionPointers[t])return Runtime.functionPointers[t]=e,2+2*t;throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."},removeFunction:function(e){Runtime.functionPointers[(e-2)/2]=null},warnOnce:function(e){Runtime.warnOnce.shown||(Runtime.warnOnce.shown={}),Runtime.warnOnce.shown[e]||(Runtime.warnOnce.shown[e]=1,Module.printErr(e))},funcWrappers:{},getFuncWrapper:function(e,t){return assert(t),Runtime.funcWrappers[e]||(Runtime.funcWrappers[e]=function(){return Runtime.dynCall(t,e,arguments)}),Runtime.funcWrappers[e]},UTF8Processor:function(){var e=[],t=0;this.processCChar=function(n){n&=255,t&&(e.push(n),t--);if(e.length==0)return n<128?String.fromCharCode(n):(e.push(n),n>191&&n<224?t=1:t=2,"");if(t>0)return"";var r=e[0],i=e[1],s=e[2],o;return r>191&&r<224?o=String.fromCharCode((r&31)<<6|i&63):o=String.fromCharCode((r&15)<<12|(i&63)<<6|s&63),e.length=0,o},this.processJSString=function(e){e=unescape(encodeURIComponent(e));var t=[];for(var n=0;n<e.length;n++)t.push(e.charCodeAt(n));return t}},stackAlloc:function(e){var t=STACKTOP;return STACKTOP=STACKTOP+e|0,STACKTOP=STACKTOP+7>>3<<3,t},staticAlloc:function(e){var t=STATICTOP;return STATICTOP=STATICTOP+e|0,STATICTOP=STATICTOP+7>>3<<3,t},dynamicAlloc:function(e){var t=DYNAMICTOP;return DYNAMICTOP=DYNAMICTOP+e|0,DYNAMICTOP=DYNAMICTOP+7>>3<<3,DYNAMICTOP>=TOTAL_MEMORY&&enlargeMemory(),t},alignMemory:function(e,t){var n=e=Math.ceil(e/(t?t:8))*(t?t:8);return n},makeBigInt:function(e,t,n){var r=n?+(e>>>0)+ +(t>>>0)*4294967296:+(e>>>0)+ +(t|0)*4294967296;return r},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0},__THREW__=0,ABORT=!1,undef=0,tempValue,tempInt,tempBigInt,tempInt2,tempBigInt2,tempPair,tempBigIntI,tempBigIntR,tempBigIntS,tempBigIntP,tempBigIntD,tempI64,tempI64b,tempRet0,tempRet1,tempRet2,tempRet3,tempRet4,tempRet5,tempRet6,tempRet7,tempRet8,tempRet9,globalScope=this;Module.ccall=ccall,Module.cwrap=cwrap,Module.setValue=setValue,Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,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,Module.allocate=allocate,Module.Pointer_stringify=Pointer_stringify;var PAGE_SIZE=4096,HEAP,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,STATIC_BASE=0,STATICTOP=0,staticSealed=!1,STACK_BASE=0,STACKTOP=0,STACK_MAX=0,DYNAMIC_BASE=0,DYNAMICTOP=0,TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||16777216,FAST_MEMORY=Module.FAST_MEMORY||2097152;assert(!!Int32Array&&!!Float64Array&&!!(new Int32Array(1)).subarray&&!!(new Int32Array(1)).set,"Cannot fallback to non-typed array case: Code is too specialized");var 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.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;var __ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],runtimeInitialized=!1;Module.intArrayFromString=intArrayFromString,Module.intArrayToString=intArrayToString,Module.writeStringToMemory=writeStringToMemory,Module.writeArrayToMemory=writeArrayToMemory,Math.imul||(Math.imul=function(e,t){var n=e>>>16,r=e&65535,i=t>>>16,s=t&65535;return r*s+(n*s+r*i<<16)|0});var runDependencies=0,runDependencyTracking={},calledInit=!1,calledRun=!1,runDependencyWatcher=null;Module.addRunDependency=addRunDependency,Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={},STATIC_BASE=8,STATICTOP=STATIC_BASE+360,__ATINIT__.push({func:function(){runPostSets()}});var _stdout,_stderr,_stdout=_stdout=allocate([0,0,0,0,0,0,0,0],"i8",ALLOC_STATIC),_stderr=_stderr=allocate([0,0,0,0,0,0,0,0],"i8",ALLOC_STATIC);allocate([80,117,122,122,108,101,32,116,104,101,32,102,111,108,108,111,119,105,110,103,32,101,114,114,111,114,115,58,0,0,0,0,80,117,122,122,108,101,32,104,97,115,32,97,32,40,109,117,108,116,105,112,108,101,32,99,104,111,105,99,101,115,41,32,115,111,108,117,116,105,111,110,58,0,0,0,0,0,0,0,80,117,122,122,108,101,32,104,97,115,32,97,32,40,117,110,105,113,117,101,32,99,104,111,105,99,101,41,32,115,111,108,117,116,105,111,110,58,0,0,110,32,33,61,32,49,48,0,69,108,101,109,101,110,116,32,37,100,44,37,100,32,99,111,110,102,108,105,99,116,115,32,119,105,116,104,32,101,108,101,109,101,110,116,32,37,100,44,37,100,32,40,115,97,109,101,32,115,117,98,103,114,105,100,41,10,0,0,0,0,0,0,69,108,101,109,101,110,116,32,37,100,44,37,100,32,99,111,110,102,108,105,99,116,115,32,119,105,116,104,32,101,108,101,109,101,110,116,32,37,100,44,37,100,32,40,115,97,109,101,32,99,111,108,117,109,110,41,10,0,0,0,0,0,0,0,69,108,101,109,101,110,116,32,37,100,44,37,100,32,99,111,110,102,108,105,99,116,115,32,119,105,116,104,32,101,108,101,109,101,110,116,32,37,100,44,37,100,32,40,115,97,109,101,32,114,111,119,41,10,0,0,37,100,10,0,0,0,0,0,37,100,32,0,0,0,0,0,115,117,100,111,107,117,46,99,0,0,0,0,0,0,0,0,115,117,100,111,107,117,95,115,111,108,118,101,0,0,0,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=Runtime.alignMemory(allocate(12,"i8",ALLOC_STATIC),8);assert(tempDoublePtr%8==0);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:35,EIDRM:36,ECHRNG:37,EL2NSYNC:38,EL3HLT:39,EL3RST:40,ELNRNG:41,EUNATCH:42,ENOCSI:43,EL2HLT:44,EDEADLK:45,ENOLCK:46,EBADE:50,EBADR:51,EXFULL:52,ENOANO:53,EBADRQC:54,EBADSLT:55,EDEADLOCK:56,EBFONT:57,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:74,ELBIN:75,EDOTDOT:76,EBADMSG:77,EFTYPE:79,ENOTUNIQ:80,EBADFD:81,EREMCHG:82,ELIBACC:83,ELIBBAD:84,ELIBSCN:85,ELIBMAX:86,ELIBEXEC:87,ENOSYS:88,ENMFILE:89,ENOTEMPTY:90,ENAMETOOLONG:91,ELOOP:92,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:106,EPROTOTYPE:107,ENOTSOCK:108,ENOPROTOOPT:109,ESHUTDOWN:110,ECONNREFUSED:111,EADDRINUSE:112,ECONNABORTED:113,ENETUNREACH:114,ENETDOWN:115,ETIMEDOUT:116,EHOSTDOWN:117,EHOSTUNREACH:118,EINPROGRESS:119,EALREADY:120,EDESTADDRREQ:121,EMSGSIZE:122,EPROTONOSUPPORT:123,ESOCKTNOSUPPORT:124,EADDRNOTAVAIL:125,ENETRESET:126,EISCONN:127,ENOTCONN:128,ETOOMANYREFS:129,EPROCLIM:130,EUSERS:131,EDQUOT:132,ESTALE:133,ENOTSUP:134,ENOMEDIUM:135,ENOSHARE:136,ECASECLASH:137,EILSEQ:138,EOVERFLOW:139,ECANCELED:140,ENOTRECOVERABLE:141,EOWNERDEAD:142,ESTRPIPE:143},___errno_state=0,_stdin=allocate(1,"i32*",ALLOC_STATIC),_stdout=allocate(1,"i32*",ALLOC_STATIC),_stderr=allocate(1,"i32*",ALLOC_STATIC),__impure_ptr=allocate(1,"i32*",ALLOC_STATIC),FS={currentPath:"/",nextInode:2,streams:[null],ignorePermissions:!0,createFileHandle:function(e,t){typeof e=="undefined"&&(e=null);if(!t)if(e&&e.socket){for(var n=1;n<64;n++)if(!FS.streams[n]){t=n;break}assert(t,"ran out of low fds for sockets")}else{t=Math.max(FS.streams.length,64);for(var n=FS.streams.length;n<t;n++)FS.streams[n]=null}return FS.streams[t]&&FS.streams[t].socket&&FS.streams[t].socket.close&&FS.streams[t].socket.close(),FS.streams[t]=e,t},removeFileHandle:function(e){FS.streams[e]=null},joinPath:function(e,t){var n=e[0];for(var r=1;r<e.length;r++)n[n.length-1]!="/"&&(n+="/"),n+=e[r];return t&&n[0]=="/"&&(n=n.substr(1)),n},absolutePath:function(e,t){if(typeof e!="string")return null;t===undefined&&(t=FS.currentPath),e&&e[0]=="/"&&(t="");var n=t+"/"+e,r=n.split("/").reverse(),i=[""];while(r.length){var s=r.pop();s!=""&&s!="."&&(s==".."?i.length>1&&i.pop():i.push(s))}return i.length==1?"/":i.join("/")},analyzePath:function(e,t,n){var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};e=FS.absolutePath(e);if(e=="/")r.isRoot=!0,r.exists=r.parentExists=!0,r.name="/",r.path=r.parentPath="/",r.object=r.parentObject=FS.root;else if(e!==null){n=n||0,e=e.slice(1).split("/");var i=FS.root,s=[""];while(e.length){e.length==1&&i.isFolder&&(r.parentExists=!0,r.parentPath=s.length==1?"/":s.join("/"),r.parentObject=i,r.name=e[0]);var o=e.shift();if(!i.isFolder){r.error=ERRNO_CODES.ENOTDIR;break}if(!i.read){r.error=ERRNO_CODES.EACCES;break}if(!i.contents.hasOwnProperty(o)){r.error=ERRNO_CODES.ENOENT;break}i=i.contents[o];if(i.link&&(!t||e.length!=0)){if(n>40){r.error=ERRNO_CODES.ELOOP;break}var u=FS.absolutePath(i.link,s.join("/"));return r=FS.analyzePath([u].concat(e).join("/"),t,n+1),r}s.push(o),e.length==0&&(r.exists=!0,r.path=s.join("/"),r.object=i)}}return r},findObject:function(e,t){FS.ensureRoot();var n=FS.analyzePath(e,t);return n.exists?n.object:(___setErrNo(n.error),null)},createObject:function(e,t,n,r,i){e||(e="/"),typeof e=="string"&&(e=FS.findObject(e));if(!e)throw ___setErrNo(ERRNO_CODES.EACCES),new Error("Parent path must exist.");if(!e.isFolder)throw ___setErrNo(ERRNO_CODES.ENOTDIR),new Error("Parent must be a folder.");if(!e.write&&!FS.ignorePermissions)throw ___setErrNo(ERRNO_CODES.EACCES),new Error("Parent folder must be writeable.");if(!t||t=="."||t=="..")throw ___setErrNo(ERRNO_CODES.ENOENT),new Error("Name must not be empty.");if(e.contents.hasOwnProperty(t))throw ___setErrNo(ERRNO_CODES.EEXIST),new Error("Can't overwrite object.");e.contents[t]={read:r===undefined?!0:r,write:i===undefined?!1:i,timestamp:Date.now(),inodeNumber:FS.nextInode++};for(var s in n)n.hasOwnProperty(s)&&(e.contents[t][s]=n[s]);return e.contents[t]},createFolder:function(e,t,n,r){var i={isFolder:!0,isDevice:!1,contents:{}};return FS.createObject(e,t,i,n,r)},createPath:function(e,t,n,r){var i=FS.findObject(e);if(i===null)throw new Error("Invalid parent.");t=t.split("/").reverse();while(t.length){var s=t.pop();if(!s)continue;i.contents.hasOwnProperty(s)||FS.createFolder(i,s,n,r),i=i.contents[s]}return i},createFile:function(e,t,n,r,i){return n.isFolder=!1,FS.createObject(e,t,n,r,i)},createDataFile:function(e,t,n,r,i){if(typeof n=="string"){var s=new Array(n.length);for(var o=0,u=n.length;o<u;++o)s[o]=n.charCodeAt(o);n=s}var a={isDevice:!1,contents:n.subarray?n.subarray(0):n};return FS.createFile(e,t,a,r,i)},createLazyFile:function(e,t,n,r,i){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 s=function(){this.lengthKnown=!1,this.chunks=[]};s.prototype.get=function(e){if(e>this.length-1||e<0)return undefined;var t=e%this.chunkSize,n=Math.floor(e/this.chunkSize);return this.getter(n)[t]},s.prototype.setDataGetter=function(e){this.getter=e},s.prototype.cacheLength=function(){var e=new XMLHttpRequest;e.open("HEAD",n,!1),e.send(null);if(!(e.status>=200&&e.status<300||e.status===304))throw new Error("Couldn't load "+n+". Status: "+e.status);var t=Number(e.getResponseHeader("Content-length")),r,i=(r=e.getResponseHeader("Accept-Ranges"))&&r==="bytes",s=1048576;i||(s=t);var o=function(e,r){if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>t-1)throw new Error("only "+t+" bytes available! programmer error!");var i=new XMLHttpRequest;i.open("GET",n,!1),t!==s&&i.setRequestHeader("Range","bytes="+e+"-"+r),typeof Uint8Array!="undefined"&&(i.responseType="arraybuffer"),i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null);if(i.status>=200&&i.status<300||i.status===304)return i.response!==undefined?new Uint8Array(i.response||[]):intArrayFromString(i.responseText||"",!0);throw new Error("Couldn't load "+n+". Status: "+i.status)},u=this;u.setDataGetter(function(e){var n=e*s,r=(e+1)*s-1;r=Math.min(r,t-1),typeof u.chunks[e]=="undefined"&&(u.chunks[e]=o(n,r));if(typeof u.chunks[e]=="undefined")throw new Error("doXHR failed!");return u.chunks[e]}),this._length=t,this._chunkSize=s,this.lengthKnown=!0};var o=new s;Object.defineProperty(o,"length",{get:function(){return this.lengthKnown||this.cacheLength(),this._length}}),Object.defineProperty(o,"chunkSize",{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}});var u={isDevice:!1,contents:o}}else var u={isDevice:!1,url:n};return FS.createFile(e,t,u,r,i)},createPreloadedFile:function(e,t,n,r,i,s,o,u){function f(n){function f(n){u||FS.createDataFile(e,t,n,r,i),s&&s(),removeRunDependency("cp "+a)}var l=!1;Module.preloadPlugins.forEach(function(e){if(l)return;e.canHandle(a)&&(e.handle(n,a,f,function(){o&&o(),removeRunDependency("cp "+a)}),l=!0)}),l||f(n)}Browser.init();var a=FS.joinPath([e,t],!0);addRunDependency("cp "+a),typeof n=="string"?Browser.asyncLoad(n,function(e){f(e)},o):f(n)},createLink:function(e,t,n,r,i){var s={isDevice:!1,link:n};return FS.createFile(e,t,s,r,i)},createDevice:function(e,t,n,r){if(!n&&!r)throw new Error("A device must have at least one callback defined.");var i={isDevice:!0,input:n,output:r};return FS.createFile(e,t,i,Boolean(n),Boolean(r))},forceLoadFile:function(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0
;var t=!0;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.");if(!Module.read)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=intArrayFromString(Module.read(e.url),!0)}catch(n){t=!1}return t||___setErrNo(ERRNO_CODES.EIO),t},ensureRoot:function(){if(FS.root)return;FS.root={read:!0,write:!0,isFolder:!0,isDevice:!1,timestamp:Date.now(),inodeNumber:1,contents:{}}},init:function(e,t,n){function u(e){e===null||e===10?(t.printer(t.buffer.join("")),t.buffer=[]):t.buffer.push(o.processCChar(e))}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=!0,FS.ensureRoot(),e=e||Module.stdin,t=t||Module.stdout,n=n||Module.stderr;var r=!0,i=!0,s=!0;e||(r=!1,e=function(){if(!e.cache||!e.cache.length){var t;ENVIRONMENT_IS_NODE?t=require("fs").readSync(0,1024)[0]:typeof window!="undefined"&&typeof window.prompt=="function"?(t=window.prompt("Input: "),t===null&&(t=String.fromCharCode(0))):typeof readline=="function"&&(t=readline()),t||(t=""),e.cache=intArrayFromString(t+"\n",!0)}return e.cache.shift()});var o=new Runtime.UTF8Processor;t||(i=!1,t=u),t.printer||(t.printer=Module.print),t.buffer||(t.buffer=[]),n||(s=!1,n=u),n.printer||(n.printer=Module.print),n.buffer||(n.buffer=[]);try{FS.createFolder("/","tmp",!0,!0)}catch(a){}var f=FS.createFolder("/","dev",!0,!0),l=FS.createDevice(f,"stdin",e);l.isTerminal=!r;var c=FS.createDevice(f,"stdout",null,t);c.isTerminal=!i;var h=FS.createDevice(f,"stderr",null,n);h.isTerminal=!s,FS.createDevice(f,"tty",e,t),FS.createDevice(f,"null",function(){},function(){}),FS.streams[1]={path:"/dev/stdin",object:l,position:0,isRead:!0,isWrite:!1,isAppend:!1,error:!1,eof:!1,ungotten:[]},FS.streams[2]={path:"/dev/stdout",object:c,position:0,isRead:!1,isWrite:!0,isAppend:!1,error:!1,eof:!1,ungotten:[]},FS.streams[3]={path:"/dev/stderr",object:h,position:0,isRead:!1,isWrite:!0,isAppend:!1,error:!1,eof:!1,ungotten:[]},HEAP32[_stdin>>2]=1,HEAP32[_stdout>>2]=2,HEAP32[_stderr>>2]=3,FS.createPath("/","dev/shm/tmp",!0,!0);for(var p=FS.streams.length;p<Math.max(_stdin,_stdout,_stderr)+4;p++)FS.streams[p]=null;FS.streams[_stdin]=FS.streams[1],FS.streams[_stdout]=FS.streams[2],FS.streams[_stderr]=FS.streams[3],allocate([allocate([0,0,0,0,_stdin,0,0,0,_stdout,0,0,0,_stderr,0,0,0],"void*",ALLOC_NORMAL)],"void*",ALLOC_NONE,__impure_ptr)},quit:function(){if(!FS.init.initialized)return;FS.streams[2]&&FS.streams[2].object.output.buffer.length>0&&FS.streams[2].object.output(10),FS.streams[3]&&FS.streams[3].object.output.buffer.length>0&&FS.streams[3].object.output(10)},standardizePath:function(e){return e.substr(0,2)=="./"&&(e=e.substr(2)),e},deleteFile:function(e){e=FS.analyzePath(e);if(!e.parentExists||!e.exists)throw"Invalid path "+e;delete e.parentObject.contents[e.name]}};Module._strlen=_strlen,Module._memcpy=_memcpy;var _llvm_memcpy_p0i8_p0i8_i32=_memcpy,_llvm_memcpy_p0i8_p0i8_i64=_memcpy;Module._memset=_memset,Module._malloc=_malloc,Module._free=_free;var Browser={mainLoop:{scheduler:null,shouldPause:!1,paused:!1,queue:[],pause:function(){Browser.mainLoop.shouldPause=!0},resume:function(){Browser.mainLoop.paused&&(Browser.mainLoop.paused=!1,Browser.mainLoop.scheduler()),Browser.mainLoop.shouldPause=!1},updateStatus:function(){if(Module.setStatus){var e=Module.statusMessage||"Please wait...",t=Browser.mainLoop.remainingBlockers,n=Browser.mainLoop.expectedBlockers;t?t<n?Module.setStatus(e+" ("+(n-t)+"/"+n+")"):Module.setStatus(e):Module.setStatus("")}}},isFullScreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){function t(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]}function s(){Browser.pointerLock=document.pointerLockElement===i||document.mozPointerLockElement===i||document.webkitPointerLockElement===i}Module.preloadPlugins||(Module.preloadPlugins=[]);if(Browser.initted||ENVIRONMENT_IS_WORKER)return;Browser.initted=!0;try{new Blob,Browser.hasBlobConstructor=!0}catch(e){Browser.hasBlobConstructor=!1,console.log("warning: no blob constructor, cannot create blobs with mimetypes")}Browser.BlobBuilder=typeof MozBlobBuilder!="undefined"?MozBlobBuilder:typeof WebKitBlobBuilder!="undefined"?WebKitBlobBuilder:Browser.hasBlobConstructor?null:console.log("warning: no BlobBuilder"),Browser.URLObject=typeof window!="undefined"?window.URL?window.URL:window.webkitURL:console.log("warning: cannot create object URLs");var n={};n.canHandle=function(e){return!Module.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(e)},n.handle=function(e,n,r,i){var s=null;if(Browser.hasBlobConstructor)try{s=new Blob([e],{type:t(n)}),s.size!==e.length&&(s=new Blob([(new Uint8Array(e)).buffer],{type:t(n)}))}catch(o){Runtime.warnOnce("Blob constructor present but fails: "+o+"; falling back to blob builder")}if(!s){var u=new Browser.BlobBuilder;u.append((new Uint8Array(e)).buffer),s=u.getBlob()}var a=Browser.URLObject.createObjectURL(s),f=new Image;f.onload=function(){assert(f.complete,"Image "+n+" could not be decoded");var t=document.createElement("canvas");t.width=f.width,t.height=f.height;var i=t.getContext("2d");i.drawImage(f,0,0),Module.preloadedImages[n]=t,Browser.URLObject.revokeObjectURL(a),r&&r(e)},f.onerror=function(e){console.log("Image "+a+" could not be decoded"),i&&i()},f.src=a},Module.preloadPlugins.push(n);var r={};r.canHandle=function(e){return!Module.noAudioDecoding&&e.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},r.handle=function(e,n,r,i){function o(t){if(s)return;s=!0,Module.preloadedAudios[n]=t,r&&r(e)}function u(){if(s)return;s=!0,Module.preloadedAudios[n]=new Audio,i&&i()}var s=!1;if(!Browser.hasBlobConstructor)return u();try{var a=new Blob([e],{type:t(n)})}catch(f){return u()}var l=Browser.URLObject.createObjectURL(a),c=new Audio;c.addEventListener("canplaythrough",function(){o(c)},!1),c.onerror=function(t){function r(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="=",r="",i=0,s=0;for(var o=0;o<e.length;o++){i=i<<8|e[o],s+=8;while(s>=6){var u=i>>s-6&63;s-=6,r+=t[u]}}return s==2?(r+=t[(i&3)<<4],r+=n+n):s==4&&(r+=t[(i&15)<<2],r+=n),r}if(s)return;console.log("warning: browser could not fully decode audio "+n+", trying slower base64 approach"),c.src="data:audio/x-"+n.substr(-3)+";base64,"+r(e),o(c)},c.src=l,Browser.safeSetTimeout(function(){o(c)},1e4)},Module.preloadPlugins.push(r);var i=Module.canvas;i.requestPointerLock=i.requestPointerLock||i.mozRequestPointerLock||i.webkitRequestPointerLock,i.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||function(){},i.exitPointerLock=i.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",s,!1),document.addEventListener("mozpointerlockchange",s,!1),document.addEventListener("webkitpointerlockchange",s,!1),Module.elementPointerLock&&i.addEventListener("click",function(e){!Browser.pointerLock&&i.requestPointerLock&&(i.requestPointerLock(),e.preventDefault())},!1)},createContext:function(e,t,n){var r;try{t?r=e.getContext("experimental-webgl",{alpha:!1}):r=e.getContext("2d");if(!r)throw":("}catch(i){return Module.print("Could not create canvas - "+i),null}return t&&(e.style.backgroundColor="black",e.addEventListener("webglcontextlost",function(e){alert("WebGL context lost. You will need to reload the page.")},!1)),n&&(Module.ctx=r,Module.useWebGL=t,Browser.moduleContextCreatedCallbacks.forEach(function(e){e()}),Browser.init()),r},destroyContext:function(e,t,n){},fullScreenHandlersInstalled:!1,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:function(e,t){function r(){Browser.isFullScreen=!1,(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement)===n?(n.cancelFullScreen=document.cancelFullScreen||document.mozCancelFullScreen||document.webkitCancelFullScreen,n.cancelFullScreen=n.cancelFullScreen.bind(document),Browser.lockPointer&&n.requestPointerLock(),Browser.isFullScreen=!0,Browser.resizeCanvas&&Browser.setFullScreenCanvasSize()):Browser.resizeCanvas&&Browser.setWindowedCanvasSize(),Module.onFullScreen&&Module.onFullScreen(Browser.isFullScreen)}Browser.lockPointer=e,Browser.resizeCanvas=t,typeof Browser.lockPointer=="undefined"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas=="undefined"&&(Browser.resizeCanvas=!1);var n=Module.canvas;Browser.fullScreenHandlersInstalled||(Browser.fullScreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",r,!1),document.addEventListener("mozfullscreenchange",r,!1),document.addEventListener("webkitfullscreenchange",r,!1)),n.requestFullScreen=n.requestFullScreen||n.mozRequestFullScreen||(n.webkitRequestFullScreen?function(){n.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),n.requestFullScreen()},requestAnimationFrame:function(e){window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||window.setTimeout),window.requestAnimationFrame(e)},safeCallback:function(e){return function(){if(!ABORT)return e.apply(null,arguments)}},safeRequestAnimationFrame:function(e){return Browser.requestAnimationFrame(function(){ABORT||e()})},safeSetTimeout:function(e,t){return setTimeout(function(){ABORT||e()},t)},safeSetInterval:function(e,t){return setInterval(function(){ABORT||e()},t)},getUserMedia:function(e){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(e)},getMovementX:function(e){return e.movementX||e.mozMovementX||e.webkitMovementX||0},getMovementY:function(e){return e.movementY||e.mozMovementY||e.webkitMovementY||0},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,calculateMouseEvent:function(e){if(Browser.pointerLock)e.type!="mousemove"&&"mozMovementX"in e?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(e),Browser.mouseMovementY=Browser.getMovementY(e)),typeof SDL!="undefined"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var t=Module.canvas.getBoundingClientRect(),n=e.pageX-(window.scrollX+t.left),r=e.pageY-(window.scrollY+t.top),i=Module.canvas.width,s=Module.canvas.height;n*=i/t.width,r*=s/t.height,Browser.mouseMovementX=n-Browser.mouseX,Browser.mouseMovementY=r-Browser.mouseY,Browser.mouseX=n,Browser.mouseY=r}},xhrLoad:function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){r.status==200||r.status==0&&r.response?t(r.response):n()},r.onerror=n,r.send(null)},asyncLoad:function(e,t,n,r){Browser.xhrLoad(e,function(n){assert(n,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(n)),r||removeRunDependency("al "+e)},function(t){if(!n)throw'Loading data file "'+e+'" failed.';n()}),r||addRunDependency("al "+e)},resizeListeners:[],updateResizeListeners:function(){var e=Module.canvas;Browser.resizeListeners.forEach(function(t){t(e.width,e.height)})},setCanvasSize:function(e,t,n){var r=Module.canvas;r.width=e,r.height=t,n||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:function(){var e=Module.canvas;this.windowedWidth=e.width,this.windowedHeight=e.height,e.width=screen.width,e.height=screen.height;if(typeof SDL!="undefined"){var t=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];t|=8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=t}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){var e=Module.canvas;e.width=this.windowedWidth,e.height=this.windowedHeight;if(typeof SDL!="undefined"){var t=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];t&=-8388609,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=t}Browser.updateResizeListeners()}};__ATINIT__.unshift({func:function(){!Module.noFSInit&&!FS.init.initialized&&FS.init()}}),__ATMAIN__.push({func:function(){FS.ignorePermissions=!1}}),__ATEXIT__.push({func: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,___errno_state=Runtime.staticAlloc(4),HEAP32[___errno_state>>2]=0,_fputc.ret=allocate([0],"i8",ALLOC_STATIC),Module.requestFullScreen=function(e,t){Browser.requestFullScreen(e,t)},Module.requestAnimationFrame=function(e){Browser.requestAnimationFrame(e)},Module.pauseMainLoop=function(){Browser.mainLoop.pause()},Module.resumeMainLoop=function(){Browser.mainLoop.resume()},Module.getUserMedia=function(){Browser.getUserMedia()},STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP),staticSealed=!0,STACK_MAX=STACK_BASE+5242880,DYNAMIC_BASE=DYNAMICTOP=Runtime.alignMemory(STACK_MAX),assert(DYNAMIC_BASE<TOTAL_MEMORY);var Math_min=Math.min,asm=function(e,t,n){"use asm";function Mt(e){e|=0;var t=0;return t=c,c=c+e|0,c=c+7>>3<<3,t|0}function _t(){return c|0}function Dt(e){e|=0,c=e}function Pt(e,t){e|=0,t|=0,(b|0)==0&&(b=e,w=t)}function Ht(e){e|=0,r[p]=r[e],r[p+1|0]=r[e+1|0],r[p+2|0]=r[e+2|0],r[p+3|0]=r[e+3|0]}function Bt(e){e|=0,r[p]=r[e],r[p+1|0]=r[e+1|0],r[p+2|0]=r[e+2|0],r[p+3|0]=r[e+3|0],r[p+4|0]=r[e+4|0],r[p+5|0]=r[e+5|0],r[p+6|0]=r[e+6|0],r[p+7|0]=r[e+7|0]}function jt(e){e|=0,_=e}function Ft(e){e|=0,D=e}function It(e){e|=0,P=e}function qt(e){e|=0,H=e}function Rt(e){e|=0,B=e}function Ut(e){e|=0,j=e}function zt(e){e|=0,F=e}function Wt(e){e|=0,I=e}function Xt(e){e|=0,q=e}function Vt(e){e|=0,R=e}function $t(){}function Jt(e){e|=0;var t=0,n=0,r=0,i=0,s=0,o=0,u=0,a=0,f=0,l=0,h=0,p=0,d=0,v=0,m=0,g=0,y=0,b=0,w=0;t=c,c=c+15584|0,n=t|0,r=t+3896|0,i=t+7792|0,s=t+11688|0,cn(e),o=0;do{u=0;do(nn(e,o,u)|0)==0?(an(e,o,u),rn(e,o,u,1),rn(e,o,u,2),rn(e,o,u,3),rn(e,o,u,4),rn(e,o,u,5),rn(e,o,u,6),rn(e,o,u,7),rn(e,o,u,8),rn(e,o,u,9)):fn(e,o,u),u=u+1|0;while((u|0)<9);o=o+1|0}while((o|0)<9);o=s,s=e,u=n,a=r,f=i,l=0;do{h=l-((l|0)%3|0)|0,p=h+3|0,d=0;do{if((nn(e,l,d)|0)==0){v=d-((d|0)%3|0)|0,m=v+3|0,g=1;do{gn(o|0,s|0,3892)|0,gn(f|0,s|0,3892)|0,y=0;for(;;){if((y|0)>=9){b=15;break}if((nn(i,l,y)|0)==(g|0)){b=23;break}y=y+1|0}e:do if((b|0)==15){b=0,gn(a|0,o|0,3892)|0,y=0;for(;;){if((y|0)>=9)break;if((nn(r,y,d)|0)==(g|0)){b=23;break e}y=y+1|0}gn(u|0,o|0,3892)|0,y=h;do{w=v;for(;;){if((w|0)>=(m|0))break;if((nn(n,y,w)|0)==(g|0)){b=23;break e}w=w+1|0}y=y+1|0}while((y|0)<(p|0))}while(0);(b|0)==23&&(b=0,on(e,l,d,g)),g=g+1|0}while((g|0)<10)}d=d+1|0}while((d|0)<9);l=l+1|0}while((l|0)<9);c=t;return}function Kt(e,t){e|=0,t|=0;var n=0,r=0,i=0,o=0;n=c,c=c+3896|0,r=n|0,i=0;do o=i*9|0,tn(r,i,0,s[t+(o<<2)>>2]|0),tn(r,i,1,s[t+(o+1<<2)>>2]|0),tn(r,i,2,s[t+(o+2<<2)>>2]|0),tn(r,i,3,s[t+(o+3<<2)>>2]|0),tn(r,i,4,s[t+(o+4<<2)>>2]|0),tn(r,i,5,s[t+(o+5<<2)>>2]|0),tn(r,i,6,s[t+(o+6<<2)>>2]|0),tn(r,i,7,s[t+(o+7<<2)>>2]|0),tn(r,i,8,s[t+(o+8<<2)>>2]|0),i=i+1|0;while((i|0)<9);Jt(r),i=e,e=r,gn(i|0,e|0,3892)|0,c=n;return}function Qt(e,t){e|=0,t|=0;var n=0,r=0,i=0;n=c,r=t,t=c,c=c+3892|0,c=c+7>>3<<3,gn(t,r,3892)|0,r=0;do i=nn(t,r,0)|0,dt(e|0,328,(x=c,c=c+8|0,s[x>>2]=i,x)|0)|0,i=nn(t,r,1)|0,dt(e|0,328,(x=c,c=c+8|0,s[x>>2]=i,x)|0)|0,i=nn(t,r,2)|0,dt(e|0,328,(x=c,c=c+8|0,s[x>>2]=i,x)|0)|0,i=nn(t,r,3)|0,dt(e|0,328,(x=c,c=c+8|0,s[x>>2]=i,x)|0)|0,i=nn(t,r,4)|0,dt(e|0,328,(x=c,c=c+8|0,s[x>>2]=i,x)|0)|0,i=nn(t,r,5)|0,dt(e|0,328,(x=c,c=c+8|0,s[x>>2]=i,x)|0)|0,i=nn(t,r,6)|0,dt(e|0,328,(x=c,c=c+8|0,s[x>>2]=i,x)|0)|0,i=nn(t,r,7)|0,dt(e|0,328,(x=c,c=c+8|0,s[x>>2]=i,x)|0)|0,i=nn(t,r,8)|0,dt(e|0,328,(x=c,c=c+8|0,s[x>>2]=i,x)|0)|0,gt(10,e|0)|0,r=r+1|0;while((r|0)<9);c=n;return}function Gt(e,t){e|=0,t|=0;var n=0,r=0,i=0,o=0;n=c,r=e,e=c,c=c+3892|0,c=c+7>>3<<3,gn(e,r,3892)|0,r=0;do i=r*9|0,o=nn(e,r,0)|0,s[t+(i<<2)>>2]=o,vt(320,(x=c,c=c+8|0,s[x>>2]=o,x)|0)|0,o=nn(e,r,1)|0,s[t+(i+1<<2)>>2]=o,vt(320,(x=c,c=c+8|0,s[x>>2]=o,x)|0)|0,o=nn(e,r,2)|0,s[t+(i+2<<2)>>2]=o,vt(320,(x=c,c=c+8|0,s[x>>2]=o,x)|0)|0,o=nn(e,r,3)|0,s[t+(i+3<<2)>>2]=o,vt(320,(x=c,c=c+8|0,s[x>>2]=o,x)|0)|0,o=nn(e,r,4)|0,s[t+(i+4<<2)>>2]=o,vt(320,(x=c,c=c+8|0,s[x>>2]=o,x)|0)|0,o=nn(e,r,5)|0,s[t+(i+5<<2)>>2]=o,vt(320,(x=c,c=c+8|0,s[x>>2]=o,x)|0)|0,o=nn(e,r,6)|0,s[t+(i+6<<2)>>2]=o,vt(320,(x=c,c=c+8|0,s[x>>2]=o,x)|0)|0,o=nn(e,r,7)|0,s[t+(i+7<<2)>>2]=o,vt(320,(x=c,c=c+8|0,s[x>>2]=o,x)|0)|0,o=nn(e,r,8)|0,s[t+(i+8<<2)>>2]=o,vt(320,(x=c,c=c+8|0,s[x>>2]=o,x)|0)|0,r=r+1|0;while((r|0)<9);c=n;return}function Yt(e){e|=0;var t=0,n=0,r=0,i=0,s=0,o=0,u=0,a=0,f=0,l=0,h=0,p=0,d=0,v=0,m=0,g=0,y=0,b=0,w=0,E=0;t=c,c=c+15584|0,n=e,e=c,c=c+3892|0,c=c+7>>3<<3,gn(e,n,3892)|0,n=t|0,r=t+3896|0,i=t+7792|0,s=t+11688|0,o=e,u=n,a=r,f=i,l=0;e:for(;;){h=l-((l|0)%3|0)|0,p=h+3|0,d=0;do{if((nn(e,l,d)|0)!=0){v=nn(e,l,d)|0,tn(e,l,d,0),gn(s|0,o|0,3892)|0,gn(f|0,o|0,3892)|0,m=0;for(;;){if((m|0)>=9)break;if((nn(i,l,m)|0)==(v|0)){g=0,y=55;break e}m=m+1|0}gn(a|0,s|0,3892)|0,m=0;for(;;){if((m|0)>=9)break;if((nn(r,m,d)|0)==(v|0)){g=0,y=56;break e}m=m+1|0}gn(u|0,s|0,3892)|0,m=d-((d|0)%3|0)|0,b=m+3|0,w=h;do{E=m;for(;;){if((E|0)>=(b|0))break;if((nn(n,w,E)|0)==(v|0)){g=0,y=57;break e}E=E+1|0}w=w+1|0}while((w|0)<(p|0));tn(e,l,d,v)}d=d+1|0}while((d|0)<9);d=l+1|0;if(!((d|0)<9)){g=1,y=58;break}l=d}return(y|0)==55?(c=t,g|0):(y|0)==56?(c=t,g|0):(y|0)==57?(c=t,g|0):(y|0)==58?(c=t,g|0):0}function Zt(e){e|=0;var t=0,n=0,r=0,i=0,o=0,u=0,a=0,f=0,l=0,h=0,p=0,d=0;t=c,n=e,e=c,c=c+3892|0,c=c+7>>3<<3,gn(e,n,3892)|0,n=0;do{r=n-((n|0)%3|0)|0,i=r+3|0,o=0;do{if((nn(e,n,o)|0)!=0){u=nn(e,n,o)|0,tn(e,n,o,0),a=0;for(;;){(nn(e,n,a)|0)==(u|0)&&(f=s[m>>2]|0,dt(f|0,264,(x=c,c=c+32|0,s[x>>2]=n,s[x+8>>2]=o,s[x+16>>2]=n,s[x+24>>2]=a,x)|0)|0),f=a+1|0;if(!((f|0)<9)){l=0;break}a=f}do(nn(e,l,o)|0)==(u|0)&&(a=s[m>>2]|0,dt(a|0,200,(x=c,c=c+32|0,s[x>>2]=n,s[x+8>>2]=o,s[x+16>>2]=l,s[x+24>>2]=o,x)|0)|0),l=l+1|0;while((l|0)<9);a=o-((o|0)%3|0)|0,f=a+3|0,h=r;do{p=a;do(nn(e,h,p)|0)==(u|0)&&(d=s[m>>2]|0,dt(d|0,136,(x=c,c=c+32|0,s[x>>2]=n,s[x+8>>2]=o,s[x+16>>2]=h,s[x+24>>2]=p,x)|0)|0),p=p+1|0;while((p|0)<(f|0));h=h+1|0}while((h|0)<(i|0));tn(e,n,o,u)}o=o+1|0}while((o|0)<9);n=n+1|0}while((n|0)<9);c=t;return}function en(e,t){e|=0,t|=0;var n=0,r=0,i=0,s=0,o=0,u=0,a=0,f=0,l=0,h=0,p=0,d=0,v=0,m=0,g=0,y=0,b=0,w=0;n=c,c=c+11688|0,r=t,t=c,c=c+3892|0,c=c+7>>3<<3,gn(t,r,3892)|0,r=n|0,i=n+3896|0,s=n+7792|0,o=1;do{u=0;for(;;){a=0,f=0;for(;;){(nn(t,u,a)|0)==0?l=((sn(t,u,a,o)|0)!=0)+f|0:l=f,h=a+1|0;if(!((h|0)<9))break;a=h,f=l}if((l|0)==1){(nn(t,u,0)|0)==0?(sn(t,u,0,o)|0)==0?p=88:d=0:p=88;do if((p|0)==88){p=0;if((nn(t,u,1)|0)==0&&(sn(t,u,1,o)|0)!=0){d=1;break}if((nn(t,u,2)|0)==0&&(sn(t,u,2,o)|0)!=0){d=2;break}if((nn(t,u,3)|0)==0&&(sn(t,u,3,o)|0)!=0){d=3;break}if((nn(t,u,4)|0)==0&&(sn(t,u,4,o)|0)!=0){d=4;break}if((nn(t,u,5)|0)==0&&(sn(t,u,5,o)|0)!=0){d=5;break}if((nn(t,u,6)|0)==0&&(sn(t,u,6,o)|0)!=0){d=6;break}if((nn(t,u,7)|0)==0&&(sn(t,u,7,o)|0)!=0){d=7;break}if((nn(t,u,8)|0)==0&&(sn(t,u,8,o)|0)!=0){d=8;break}d=9}while(0);on(t,u,d,o),un(t,u,d)|0,dn(t,u,d,o),tn(t,u,d,o)}f=u+1|0;if(!((f|0)<9)){v=0;break}u=f}do{u=0,f=0;for(;;){(nn(t,u,v)|0)==0?m=((sn(t,u,v,o)|0)!=0)+f|0:m=f,a=u+1|0;if(!((a|0)<9))break;u=a,f=m}if((m|0)==1){(nn(t,0,v)|0)==0?(sn(t,0,v,o)|0)==0?p=98:g=0:p=98;do if((p|0)==98){p=0;if((nn(t,1,v)|0)==0&&(sn(t,1,v,o)|0)!=0){g=1;break}if((nn(t,2,v)|0)==0&&(sn(t,2,v,o)|0)!=0){g=2;break}if((nn(t,3,v)|0)==0&&(sn(t,3,v,o)|0)!=0){g=3;break}if((nn(t,4,v)|0)==0&&(sn(t,4,v,o)|0)!=0){g=4;break}if((nn(t,5,v)|0)==0&&(sn(t,5,v,o)|0)!=0){g=5;break}if((nn(t,6,v)|0)==0&&(sn(t,6,v,o)|0)!=0){g=6;break}if((nn(t,7,v)|0)==0&&(sn(t,7,v,o)|0)!=0){g=7;break}if((nn(t,8,v)|0)==0&&(sn(t,8,v,o)|0)!=0){g=8;break}g=9}while(0);on(t,g,v,o),un(t,g,v)|0,dn(t,g,v,o),tn(t,g,v,o)}v=v+1|0}while((v|0)<9);o=o+1|0}while((o|0)<10);if((pn(t)|0)!=0){o=e,v=t,gn(o|0,v|0,3892)|0,c=n;return}v=r,o=t,gn(v|0,o|0,3892)|0,v=1;e:do{y=0;for(;;){if((nn(r,y,0)|0)==0&&(un(r,y,0)|0)==(v|0)){b=0,p=158;break e}if((nn(r,y,1)|0)==0&&(un(r,y,1)|0)==(v|0)){b=1,p=158;break e}if((nn(r,y,2)|0)==0&&(un(r,y,2)|0)==(v|0)){b=2,p=158;break e}if((nn(r,y,3)|0)==0&&(un(r,y,3)|0)==(v|0)){b=3,p=158;break e}if((nn(r,y,4)|0)==0&&(un(r,y,4)|0)==(v|0)){b=4,p=158;break e}if((nn(r,y,5)|0)==0&&(un(r,y,5)|0)==(v|0)){b=5,p=158;break e}if((nn(r,y,6)|0)==0&&(un(r,y,6)|0)==(v|0)){b=6,p=158;break e}if((nn(r,y,7)|0)==0&&(un(r,y,7)|0)==(v|0)){b=7,p=158;break e}if((nn(r,y,8)|0)==0&&(un(r,y,8)|0)==(v|0)){b=8,p=158;break e}g=y+1|0;if(!((g|0)<9))break;y=g}v=v+1|0}while((v|0)<10);do if((p|0)==158){v=un(r,y,b)|0;if((v|0)==0)break;w=1;for(;;){if((w|0)>=10)break;if((sn(t,y,b,w)|0)!=0)break;w=w+1|0}(w|0)==10&&kt(336,624,352,128);do{if((v|0)!=1){hn(t),g=i,gn(g|0,o|0,3892)|0,on(i,y,b,w),un(i,y,b)|0,dn(i,y,b,w),tn(i,y,b,w),en(s,i),m=s,gn(g|0,m|0,3892)|0;if((pn(i)|0)!=0){on(t,y,b,w),un(t,y,b)|0;break}m=e,gn(m|0,g|0,3892)|0,c=n;return}on(t,y,b,w),un(t,y,b)|0,dn(t,y,b,w),tn(t,y,b,w)}while(0);en(e,t),c=n;return}while(0);t=e,gn(t|0,o|0,3892)|0,c=n;return}function tn(e,t,n,r){e|=0,t|=0,n|=0,r|=0,s[e+4+(t*432|0)+(n*48|0)>>2]=r;return}function nn(e,t,n){e|=0,t|=0,n|=0;var r=0,i=0;return r=c,i=e,e=c,c=c+3892|0,c=c+7>>3<<3,gn(e,i,3892)|0,c=r,s[e+4+(t*432|0)+(n*48|0)>>2]|0}function rn(e,t,n,r){e|=0,t|=0,n|=0,r|=0,s[e+4+(t*432|0)+(n*48|0)+8+(r<<2)>>2]=1;return}function sn(e,t,n,r){e|=0,t|=0,n|=0,r|=0;var i=0,o=0;return i=c,o=e,e=c,c=c+3892|0,c=c+7>>3<<3,gn(e,o,3892)|0,c=i,s[e+4+(t*432|0)+(n*48|0)+8+(r<<2)>>2]|0}function on(e,t,n,r){e|=0,t|=0,n|=0,r|=0;var i=0;i=e+4+(t*432|0)+(n*48|0)+8+(r<<2)|0;if((s[i>>2]|0)!=1){s[i>>2]=0;return}r=e+4+(t*432|0)+(n*48|0)+4|0,s[r>>2]=(s[r>>2]|0)-1,s[i>>2]=0;return}function un(e,t,n){e|=0,t|=0,n|=0;var r=0,i=0;return r=c,i=e,e=c,c=c+3892|0,c=c+7>>3<<3,gn(e,i,3892)|0,c=r,s[e+4+(t*432|0)+(n*48|0)+4>>2]|0}function an(e,t,n){e|=0,t|=0,n|=0,s[e+4+(t*432|0)+(n*48|0)+4>>2]=9;return}function fn(e,t,n){e|=0,t|=0,n|=0,s[e+4+(t*432|0)+(n*48|0)+4>>2]=0;return}function ln(e){e|=0;var t=0,n=0;return t=c,n=e,e=c,c=c+3892|0,c=c+7>>3<<3,gn(e,n,3892)|0,c=t,s[e>>2]|0}function cn(e){e|=0,s[e>>2]=1;return}function hn(e){e|=0,s[e>>2]=0;return}function pn(e){e|=0;var t=0,n=0,r=0,i=0;t=c,n=e,e=c,c=c+3892|0,c=c+7>>3<<3,gn(e,n,3892)|0,n=0;for(;;){if((nn(e,n,0)|0)==0&&(un(e,n,0)|0)==0){r=1;break}if((nn(e,n,1)|0)==0&&(un(e,n,1)|0)==0){r=1;break}if((nn(e,n,2)|0)==0&&(un(e,n,2)|0)==0){r=1;break}if((nn(e,n,3)|0)==0&&(un(e,n,3)|0)==0){r=1;break}if((nn(e,n,4)|0)==0&&(un(e,n,4)|0)==0){r=1;break}if((nn(e,n,5)|0)==0&&(un(e,n,5)|0)==0){r=1;break}if((nn(e,n,6)|0)==0&&(un(e,n,6)|0)==0){r=1;break}if((nn(e,n,7)|0)==0&&(un(e,n,7)|0)==0){r=1;break}if((nn(e,n,8)|0)==0&&(un(e,n,8)|0)==0){r=1;break}i=n+1|0;if(!((i|0)<9)){r=0;break}n=i}return c=t,r|0}function dn(e,t,n,r){e|=0,t|=0,n|=0,r|=0;var i=0,s=0,o=0;on(e,t,0,r),on(e,t,1,r),on(e,t,2,r),on(e,t,3,r),on(e,t,4,r),on(e,t,5,r),on(e,t,6,r),on(e,t,7,r),on(e,t,8,r),on(e,0,n,r),on(e,1,n,r),on(e,2,n,r),on(e,3,n,r),on(e,4,n,r),on(e,5,n,r),on(e,6,n,r),on(e,7,n,r),on(e,8,n,r),i=t-((t|0)%3|0)|0,t=n-((n|0)%3|0)|0,n=i+3|0,s=t+3|0,o=i;do{i=t;do on(e,o,i,r),i=i+1|0;while((i|0)<(s|0));o=o+1|0}while((o|0)<(n|0));return}function vn(e){e|=0;var t=0,n=0,r=0,i=0,o=0,u=0;return t=c,c=c+11688|0,n=t|0,r=t+3896|0,i=t+7792|0,Kt(r,e),(Yt(r)|0)==0?(Zt(r),Tt(1),0):(Qt(s[v>>2]|0,r),en(i,r),(Yt(i)|0)==0?(yt(8)|0,Zt(i),o=1,c=t,o|0):(r=i,u=n,gn(u|0,r|0,3892)|0,(ln(n)|0)==0?yt(40)|0:yt(88)|0,Qt(s[v>>2]|0,i),Gt(i,e),o=0,c=t,o|0))}function mn(e){e|=0;var t=0;t=e;while(r[t]|0)t=t+1|0;return t-e|0}function gn(e,t,n){e|=0,t|=0,n|=0;var i=0;i=e|0;if((e&3)==(t&3)){while(e&3){if((n|0)==0)return i|0;r[e]=r[t]|0,e=e+1|0,t=t+1|0,n=n-1|0}while((n|0)>=4)s[e>>2]=s[t>>2],e=e+4|0,t=t+4|0,n=n-4|0}while((n|0)>0)r[e]=r[t]|0,e=e+1|0,t=t+1|0,n=n-1|0;return i|0}function yn(e,t,n){e|=0,t|=0,n|=0;var i=0,o=0,u=0;i=e+n|0;if((n|0)>=20){t&=255,n=e&3,o=t|t<<8|t<<16|t<<24,u=i&-4;if(n){n=e+4-n|0;while((e|0)<(n|0))r[e]=t,e=e+1|0}while((e|0)<(u|0))s[e>>2]=o,e=e+4|0}while((e|0)<(i|0))r[e]=t,e=e+1|0}function bn(e,t){return e|=0,t|=0,kn[e&1](t|0)|0}function wn(e){e|=0,Ln[e&1]()}function En(e,t,n){return e|=0,t|=0,n|=0,An[e&1](t|0,n|0)|0}function Sn(e,t){e|=0,t|=0,On[e&1](t|0)}function xn(e){return e|=0,rt(0),0}function Tn(){rt(1)}function Nn(e,t){return e|=0,t|=0,rt(2),0}function Cn(e){e|=0,rt(3)}var r=new e.Int8Array(n),i=new e.Int16Array(n),s=new e.Int32Array(n),o=new e.Uint8Array(n),u=new e.Uint16Array(n),a=new e.Uint32Array(n),f=new e.Float32Array(n),l=new e.Float64Array(n),c=t.STACKTOP|0,h=t.STACK_MAX|0,p=t.tempDoublePtr|0,d=t.ABORT|0,v=t._stdout|0,m=t._stderr|0,g=+t.NaN,y=+t.Infinity,b=0,w=0,E=0,S=0,x=0,T=0,N=0,C=0,k=0,L=0,A=0,O=0,M=0,_=0,D=0,P=0,H=0,B=0,j=0,F=0,I=0,q=0,R=0,U=e.Math.floor,z=e.Math.abs,W=e.Math.sqrt,X=e.Math.pow,V=e.Math.cos,$=e.Math.sin,J=e.Math.tan,K=e.Math.acos,Q=e.Math.asin,G=e.Math.atan,Y=e.Math.atan2,Z=e.Math.exp,et=e.Math.log,tt=e.Math.ceil,nt=e.Math.imul,rt=t.abort,it=t.assert,st=t.asmPrintInt,ot=t.asmPrintFloat,ut=t.min,at=t.invoke_ii,ft=t.invoke_v,lt=t.invoke_iii,ct=t.invoke_vi,ht=t._llvm_lifetime_end,pt=t._malloc,dt=t._fprintf,vt=t._printf,mt=t.__reallyNegative,gt=t._fputc,yt=t._puts,bt=t.___setErrNo,wt=t._fwrite,Et=t._send,St=t._write,xt=t._fputs,Tt=t._exit,Nt=t.__formatString,Ct=t._free,kt=t.___assert_func,Lt=t._pwrite,At=t._llvm_lifetime_start,Ot=t.__exit,kn=[xn,xn],Ln=[Tn,Tn],An=[Nn,Nn],On=[Cn,Cn];return{_strlen:mn,_memcpy:gn,_memset:yn,_solve_array:vn,runPostSets:$t,stackAlloc:Mt,stackSave:_t,stackRestore:Dt,setThrew:Pt,setTempRet0:jt,setTempRet1:Ft,setTempRet2:It,setTempRet3:qt,setTempRet4:Rt,setTempRet5:Ut,setTempRet6:zt,setTempRet7:Wt,setTempRet8:Xt,setTempRet9:Vt,dynCall_ii:bn,dynCall_v:wn,dynCall_iii:En,dynCall_vi:Sn}}({Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array},{abort:abort,assert:assert,asmPrintInt:asmPrintInt,asmPrintFloat:asmPrintFloat,min:Math_min,invoke_ii:invoke_ii,invoke_v:invoke_v,invoke_iii:invoke_iii,invoke_vi:invoke_vi,_llvm_lifetime_end:_llvm_lifetime_end,_malloc:_malloc,_fprintf:_fprintf,_printf:_printf,__reallyNegative:__reallyNegative,_fputc:_fputc,_puts:_puts,___setErrNo:___setErrNo,_fwrite:_fwrite,_send:_send,_write:_write,_fputs:_fputs,_exit:_exit,__formatString:__formatString,_free:_free,___assert_func:___assert_func,_pwrite:_pwrite,_llvm_lifetime_start:_llvm_lifetime_start,__exit:__exit,STACKTOP:STACKTOP,STACK_MAX:STACK_MAX,tempDoublePtr:tempDoublePtr,ABORT:ABORT,NaN:NaN,Infinity:Infinity,_stdout:_stdout,_stderr:_stderr},buffer),_strlen=Module._strlen=asm._strlen,_memcpy=Module._memcpy=asm._memcpy,_memset=Module._memset=asm._memset,_solve_array=Module._solve_array=asm._solve_array,runPostSets=Module.runPostSets=asm.runPostSets,dynCall_ii=Module.dynCall_ii=asm.dynCall_ii,dynCall_v=Module.dynCall_v=asm.dynCall_v,dynCall_iii=Module.dynCall_iii=asm.dynCall_iii,dynCall_vi=Module.dynCall_vi=asm.dynCall_vi;Runtime.stackAlloc=function(e){return asm.stackAlloc(e)},Runtime.stackSave=function(){return asm.stackSave()},Runtime.stackRestore=function(e){asm.stackRestore(e)};var i64Math=null;Module.callMain=function(t){function r(){for(var e=0;e<3;e++)i.push(0)}assert(runDependencies==0,"cannot call main when async dependencies remain! (listen on __ATMAIN__)"),assert(!Module.preRun||Module["preRun"].length==0,"cannot call main when preRun functions remain to be called"),t=t||[],ensureInitRuntime();var n=t.length+1,i=[allocate(intArrayFromString("/bin/this.program"),"i8",ALLOC_NORMAL)];r();for(var s=0;s<n-1;s+=1)i.push(allocate(intArrayFromString(t[s]),"i8",ALLOC_NORMAL)),r();i.push(0),i=allocate(i,"i32",ALLOC_NORMAL);var o,u=STACKTOP;try{o=Module._main(n,i,0)}catch(a){if(a.name=="ExitStatus")return a.status;if(a!="SimulateInfiniteLoop")throw a;Module.noExitRuntime=!0}finally{STACKTOP=u}return o},Module.run=Module.run=run;if(Module.preInit){typeof Module["preInit"]=="function"&&(Module.preInit=[Module.preInit]);while(Module.preInit.length>0)Module.preInit.pop()()}var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run();