blob: f2b1220bc0618dd8e79c50733a78ada3f9c0b9de [file] [log] [blame] [edit]
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=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;if(Module["ENVIRONMENT"]){if(Module["ENVIRONMENT"]==="WEB"){ENVIRONMENT_IS_WEB=true}else if(Module["ENVIRONMENT"]==="WORKER"){ENVIRONMENT_IS_WORKER=true}else if(Module["ENVIRONMENT"]==="NODE"){ENVIRONMENT_IS_NODE=true}else if(Module["ENVIRONMENT"]==="SHELL"){ENVIRONMENT_IS_SHELL=true}else{throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.")}}else{ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER}if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=console.log;if(!Module["printErr"])Module["printErr"]=console.warn;var nodeFS;var nodePath;Module["read"]=function read(filename,binary){if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);var ret=nodeFS["readFileSync"](filename);return binary?ret:ret.toString()};Module["readBinary"]=function readBinary(filename){var ret=Module["read"](filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};Module["load"]=function load(f){globalEval(read(f))};if(!Module["thisProgram"]){if(process["argv"].length>1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}else{Module["thisProgram"]="unknown-program"}}Module["arguments"]=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}));Module["inspect"]=(function(){return"[Emscripten Module object]"})}else if(ENVIRONMENT_IS_SHELL){if(!Module["print"])Module["print"]=print;if(typeof printErr!="undefined")Module["printErr"]=printErr;if(typeof read!="undefined"){Module["read"]=read}else{Module["read"]=function read(){throw"no read() available"}}Module["readBinary"]=function readBinary(f){if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}var data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){Module["read"]=function read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};Module["readAsync"]=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response)}else{onerror()}};xhr.onerror=onerror;xhr.send(null)};if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof console!=="undefined"){if(!Module["print"])Module["print"]=function print(x){console.log(x)};if(!Module["printErr"])Module["printErr"]=function printErr(x){console.warn(x)}}else{var TRY_USE_DUMP=false;if(!Module["print"])Module["print"]=TRY_USE_DUMP&&typeof dump!=="undefined"?(function(x){dump(x)}):(function(x){})}if(ENVIRONMENT_IS_WORKER){Module["load"]=importScripts}if(typeof Module["setWindowTitle"]==="undefined"){Module["setWindowTitle"]=(function(title){document.title=title})}}else{throw"Unknown runtime environment. Where are we?"}function globalEval(x){eval.call(null,x)}if(!Module["load"]&&Module["read"]){Module["load"]=function load(f){globalEval(Module["read"](f))}}if(!Module["print"]){Module["print"]=(function(){})}if(!Module["printErr"]){Module["printErr"]=Module["print"]}if(!Module["arguments"]){Module["arguments"]=[]}if(!Module["thisProgram"]){Module["thisProgram"]="./this.program"}Module.print=Module["print"];Module.printErr=Module["printErr"];Module["preRun"]=[];Module["postRun"]=[];for(var key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=undefined;var Runtime={setTempRet0:(function(value){tempRet0=value;return value}),getTempRet0:(function(){return tempRet0}),stackSave:(function(){return STACKTOP}),stackRestore:(function(stackTop){STACKTOP=stackTop}),getNativeTypeSize:(function(type){switch(type){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(type[type.length-1]==="*"){return Runtime.QUANTUM_SIZE}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0);return bits/8}else{return 0}}}}),getNativeFieldSize:(function(type){return Math.max(Runtime.getNativeTypeSize(type),Runtime.QUANTUM_SIZE)}),STACK_ALIGN:16,prepVararg:(function(ptr,type){if(type==="double"||type==="i64"){if(ptr&7){assert((ptr&7)===4);ptr+=4}}else{assert((ptr&3)===0)}return ptr}),getAlignSize:(function(type,size,vararg){if(!vararg&&(type=="i64"||type=="double"))return 8;if(!type)return Math.min(size,8);return Math.min(size||(type?Runtime.getNativeFieldSize(type):0),Runtime.QUANTUM_SIZE)}),dynCall:(function(sig,ptr,args){if(args&&args.length){return Module["dynCall_"+sig].apply(null,[ptr].concat(args))}else{return Module["dynCall_"+sig].call(null,ptr)}}),functionPointers:[],addFunction:(function(func){for(var i=0;i<Runtime.functionPointers.length;i++){if(!Runtime.functionPointers[i]){Runtime.functionPointers[i]=func;return 2*(1+i)}}throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."}),removeFunction:(function(index){Runtime.functionPointers[(index-2)/2]=null}),warnOnce:(function(text){if(!Runtime.warnOnce.shown)Runtime.warnOnce.shown={};if(!Runtime.warnOnce.shown[text]){Runtime.warnOnce.shown[text]=1;Module.printErr(text)}}),funcWrappers:{},getFuncWrapper:(function(func,sig){assert(sig);if(!Runtime.funcWrappers[sig]){Runtime.funcWrappers[sig]={}}var sigCache=Runtime.funcWrappers[sig];if(!sigCache[func]){if(sig.length===1){sigCache[func]=function dynCall_wrapper(){return Runtime.dynCall(sig,func)}}else if(sig.length===2){sigCache[func]=function dynCall_wrapper(arg){return Runtime.dynCall(sig,func,[arg])}}else{sigCache[func]=function dynCall_wrapper(){return Runtime.dynCall(sig,func,Array.prototype.slice.call(arguments))}}}return sigCache[func]}),getCompilerSetting:(function(name){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work"}),stackAlloc:(function(size){var ret=STACKTOP;STACKTOP=STACKTOP+size|0;STACKTOP=STACKTOP+15&-16;return ret}),staticAlloc:(function(size){var ret=STATICTOP;STATICTOP=STATICTOP+size|0;STATICTOP=STATICTOP+15&-16;return ret}),dynamicAlloc:(function(size){var ret=HEAP32[DYNAMICTOP_PTR>>2];var end=(ret+size+15|0)&-16;HEAP32[DYNAMICTOP_PTR>>2]=end;if(end>=TOTAL_MEMORY){var success=enlargeMemory();if(!success){HEAP32[DYNAMICTOP_PTR>>2]=ret;return 0}}return ret}),alignMemory:(function(size,quantum){var ret=size=Math.ceil(size/(quantum?quantum:16))*(quantum?quantum:16);return ret}),makeBigInt:(function(low,high,unsigned){var ret=unsigned?+(low>>>0)+ +(high>>>0)*+4294967296:+(low>>>0)+ +(high|0)*+4294967296;return ret}),GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module["Runtime"]=Runtime;var ABORT=0;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}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){var len=(str.length<<2)+1;ret=Runtime.stackAlloc(len);stringToUTF8(str,ret,len)}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;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(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*[a-zA-Z$_0-9]*\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=null;function ensureJSsource(){if(!JSsource){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){ensureJSsource();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);"}if(!numericArgs){ensureJSsource();funcstr+=JSsource["stackRestore"].body.replace("()","(stack)")+";"}funcstr+="return ret})";return eval(funcstr)}}))();Module["ccall"]=ccall;Module["cwrap"]=cwrap;function setValue(ptr,value,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":HEAP8[ptr>>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble- +(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}Module["setValue"]=setValue;function getValue(ptr,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":return HEAP8[ptr>>0];case"i8":return HEAP8[ptr>>0];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP32[ptr>>2];case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];default:abort("invalid type for setValue: "+type)}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(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[typeof _malloc==="function"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][allocator===undefined?ALLOC_STATIC:allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var ptr=ret,stop;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr<stop;ptr+=4){HEAP32[ptr>>2]=0}stop=ret+size;while(ptr<stop){HEAP8[ptr++>>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i<size){var curr=slab[i];if(typeof curr==="function"){curr=Runtime.getFunctionIndex(curr)}type=singleType||types[i];if(type===0){i++;continue}if(type=="i64")type="i32";setValue(ret+i,curr,type);if(previousType!==type){typeSize=Runtime.getNativeTypeSize(type);previousType=type}i+=typeSize}return ret}Module["allocate"]=allocate;function getMemory(size){if(!staticSealed)return Runtime.staticAlloc(size);if(!runtimeInitialized)return Runtime.dynamicAlloc(size);return _malloc(size)}Module["getMemory"]=getMemory;function Pointer_stringify(ptr,length){if(length===0||!ptr)return"";var hasUtf=0;var t;var i=0;while(1){t=HEAPU8[ptr+i>>0];hasUtf|=t;if(t==0&&!length)break;i++;if(length&&i==length)break}if(!length)length=i;var ret="";if(hasUtf<128){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK}return ret}return Module["UTF8ToString"](ptr)}Module["Pointer_stringify"]=Pointer_stringify;function AsciiToString(ptr){var str="";while(1){var ch=HEAP8[ptr++>>0];if(!ch)return str;str+=String.fromCharCode(ch)}}Module["AsciiToString"]=AsciiToString;function stringToAscii(str,outPtr){return writeAsciiToMemory(str,outPtr,false)}Module["stringToAscii"]=stringToAscii;var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(u8Array,idx){var endPtr=idx;while(u8Array[endPtr])++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var u0,u1,u2,u3,u4,u5;var str="";while(1){u0=u8Array[idx++];if(!u0)return str;if(!(u0&128)){str+=String.fromCharCode(u0);continue}u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u3=u8Array[idx++]&63;if((u0&248)==240){u0=(u0&7)<<18|u1<<12|u2<<6|u3}else{u4=u8Array[idx++]&63;if((u0&252)==248){u0=(u0&3)<<24|u1<<18|u2<<12|u3<<6|u4}else{u5=u8Array[idx++]&63;u0=(u0&1)<<30|u1<<24|u2<<18|u3<<12|u4<<6|u5}}}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}}Module["UTF8ArrayToString"]=UTF8ArrayToString;function UTF8ToString(ptr){return UTF8ArrayToString(HEAPU8,ptr)}Module["UTF8ToString"]=UTF8ToString;function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=2097151){if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=67108863){if(outIdx+4>=endIdx)break;outU8Array[outIdx++]=248|u>>24;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+5>=endIdx)break;outU8Array[outIdx++]=252|u>>30;outU8Array[outIdx++]=128|u>>24&63;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}Module["stringToUTF8Array"]=stringToUTF8Array;function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}Module["stringToUTF8"]=stringToUTF8;function lengthBytesUTF8(str){var len=0;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){++len}else if(u<=2047){len+=2}else if(u<=65535){len+=3}else if(u<=2097151){len+=4}else if(u<=67108863){len+=5}else{len+=6}}return len}Module["lengthBytesUTF8"]=lengthBytesUTF8;var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function demangle(func){var __cxa_demangle_func=Module["___cxa_demangle"]||Module["__cxa_demangle"];if(__cxa_demangle_func){try{var s=func.substr(1);var len=lengthBytesUTF8(s)+1;var buf=_malloc(len);stringToUTF8(s,buf,len);var status=_malloc(4);var ret=__cxa_demangle_func(buf,0,0,status);if(getValue(status,"i32")===0&&ret){return Pointer_stringify(ret)}}catch(e){}finally{if(buf)_free(buf);if(status)_free(status);if(ret)_free(ret)}return func}Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling");return func}function demangleAll(text){var regex=/__Z[\w\d_]+/g;return text.replace(regex,(function(x){var y=demangle(x);return x===y?x:x+" ["+y+"]"}))}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}function stackTrace(){var js=jsStackTrace();if(Module["extraStackTrace"])js+="\n"+Module["extraStackTrace"]();return demangleAll(js)}Module["stackTrace"]=stackTrace;var HEAP;var buffer;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed;var STACK_BASE,STACKTOP,STACK_MAX;var DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0;staticSealed=false;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;if(TOTAL_MEMORY<TOTAL_STACK)Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")");if(Module["buffer"]){buffer=Module["buffer"]}else{{buffer=new ArrayBuffer(TOTAL_MEMORY)}}updateGlobalBufferViews();function getTotalMemory(){return TOTAL_MEMORY}HEAP32[0]=1668509029;HEAP16[1]=25459;if(HEAPU8[2]!==115||HEAPU8[3]!==99)throw"Runtime error: expected the system to be little-endian!";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(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.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(cb){__ATPRERUN__.unshift(cb)}Module["addOnPreRun"]=addOnPreRun;function addOnInit(cb){__ATINIT__.unshift(cb)}Module["addOnInit"]=addOnInit;function addOnPreMain(cb){__ATMAIN__.unshift(cb)}Module["addOnPreMain"]=addOnPreMain;function addOnExit(cb){__ATEXIT__.unshift(cb)}Module["addOnExit"]=addOnExit;function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}Module["addOnPostRun"]=addOnPostRun;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}Module["intArrayFromString"]=intArrayFromString;function intArrayToString(array){var ret=[];for(var i=0;i<array.length;i++){var chr=array[i];if(chr>255){chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}Module["intArrayToString"]=intArrayToString;function writeStringToMemory(string,buffer,dontAddNull){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var lastChar,end;if(dontAddNull){end=buffer+lengthBytesUTF8(string);lastChar=HEAP8[end]}stringToUTF8(string,buffer,Infinity);if(dontAddNull)HEAP8[end]=lastChar}Module["writeStringToMemory"]=writeStringToMemory;function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}Module["writeArrayToMemory"]=writeArrayToMemory;function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i<str.length;++i){HEAP8[buffer++>>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}Module["writeAsciiToMemory"]=writeAsciiToMemory;if(!Math["imul"]||Math["imul"](4294967295,5)!==-5)Math["imul"]=function imul(a,b){var ah=a>>>16;var al=a&65535;var bh=b>>>16;var bl=b&65535;return al*bl+(ah*bl+al*bh<<16)|0};Math.imul=Math["imul"];if(!Math["clz32"])Math["clz32"]=(function(x){x=x>>>0;for(var i=0;i<32;i++){if(x&1<<31-i)return i}return 32});Math.clz32=Math["clz32"];if(!Math["trunc"])Math["trunc"]=(function(x){return x<0?Math.ceil(x):Math.floor(x)});Math.trunc=Math["trunc"];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_round=Math.round;var Math_min=Math.min;var Math_clz32=Math.clz32;var Math_trunc=Math.trunc;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}Module["addRunDependency"]=addRunDependency;function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["removeRunDependency"]=removeRunDependency;Module["preloadedImages"]={};Module["preloadedAudios"]={};var memoryInitializer=null;var ASM_CONSTS=[];STATIC_BASE=8;STATICTOP=STATIC_BASE+12368;__ATINIT__.push();memoryInitializer="dry.js.mem";var tempDoublePtr=STATICTOP;STATICTOP+=16;Module["_memset"]=_memset;function _pthread_cleanup_push(routine,arg){__ATEXIT__.push((function(){Module["dynCall_vi"](routine,arg)}));_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 SYSCALLS={varargs:0,get:(function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret}),getStr:(function(){var ret=Pointer_stringify(SYSCALLS.get());return ret}),get64:(function(){var low=SYSCALLS.get(),high=SYSCALLS.get();if(low>=0)assert(high===0);else assert(high===-1);return low}),getZero:(function(){assert(SYSCALLS.get()===0)})};function ___syscall6(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD();FS.close(stream);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___setErrNo(value){if(Module["___errno_location"])HEAP32[Module["___errno_location"]()>>2]=value;return value}Module["_sbrk"]=_sbrk;function _clock(){if(_clock.start===undefined)_clock.start=Date.now();return(Date.now()-_clock.start)*(1e6/1e3)|0}function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest);return dest}Module["_memcpy"]=_memcpy;Module["_pthread_self"]=_pthread_self;function ___syscall140(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),offset_high=SYSCALLS.get(),offset_low=SYSCALLS.get(),result=SYSCALLS.get(),whence=SYSCALLS.get();var offset=offset_low;assert(offset_high===0);FS.llseek(stream,offset,whence);HEAP32[result>>2]=stream.position;if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall146(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.get(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();var ret=0;if(!___syscall146.buffer){___syscall146.buffers=[null,[],[]];___syscall146.printChar=(function(stream,curr){var buffer=___syscall146.buffers[stream];assert(buffer);if(curr===0||curr===10){(stream===1?Module["print"]:Module["printErr"])(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}})}for(var i=0;i<iovcnt;i++){var ptr=HEAP32[iov+i*8>>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;j<len;j++){___syscall146.printChar(stream,HEAPU8[ptr+j])}ret+=len}return ret}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall54(which,varargs){SYSCALLS.varargs=varargs;try{return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}__ATEXIT__.push((function(){var fflush=Module["_fflush"];if(fflush)fflush(0);var printChar=___syscall146.printChar;if(!printChar)return;var buffers=___syscall146.buffers;if(buffers[1].length)printChar(1,10);if(buffers[2].length)printChar(2,10)}));DYNAMICTOP_PTR=allocate(1,"i32",ALLOC_STATIC);STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP);STACK_MAX=STACK_BASE+TOTAL_STACK;DYNAMIC_BASE=Runtime.alignMemory(STACK_MAX);HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE;staticSealed=true;function invoke_ii(index,a1){try{return Module["dynCall_ii"](index,a1)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iiii(index,a1,a2,a3){try{return Module["dynCall_iiii"](index,a1,a2,a3)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_vi(index,a1){try{Module["dynCall_vi"](index,a1)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["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,"enlargeMemory":enlargeMemory,"getTotalMemory":getTotalMemory,"abortOnCannotGrowMemory":abortOnCannotGrowMemory,"invoke_ii":invoke_ii,"invoke_iiii":invoke_iiii,"invoke_vi":invoke_vi,"_pthread_cleanup_pop":_pthread_cleanup_pop,"_clock":_clock,"___lock":___lock,"___syscall6":___syscall6,"_pthread_cleanup_push":_pthread_cleanup_push,"_abort":_abort,"___unlock":___unlock,"___setErrNo":___setErrNo,"_emscripten_memcpy_big":_emscripten_memcpy_big,"___syscall54":___syscall54,"___syscall140":___syscall140,"___syscall146":___syscall146,"DYNAMICTOP_PTR":DYNAMICTOP_PTR,"tempDoublePtr":tempDoublePtr,"ABORT":ABORT,"STACKTOP":STACKTOP,"STACK_MAX":STACK_MAX};// EMSCRIPTEN_START_ASM
var asm=(function(global,env,buffer) {
"use asm";var a=new global.Int8Array(buffer);var b=new global.Int16Array(buffer);var c=new global.Int32Array(buffer);var d=new global.Uint8Array(buffer);var e=new global.Uint16Array(buffer);var f=new global.Uint32Array(buffer);var g=new global.Float32Array(buffer);var h=new global.Float64Array(buffer);var i=env.DYNAMICTOP_PTR|0;var j=env.tempDoublePtr|0;var k=env.ABORT|0;var l=env.STACKTOP|0;var m=env.STACK_MAX|0;var n=0;var o=0;var p=0;var q=0;var r=global.NaN,s=global.Infinity;var t=0,u=0,v=0,w=0,x=0.0,y=0,z=0,A=0,B=0.0;var C=0;var D=global.Math.floor;var E=global.Math.abs;var F=global.Math.sqrt;var G=global.Math.pow;var H=global.Math.cos;var I=global.Math.sin;var J=global.Math.tan;var K=global.Math.acos;var L=global.Math.asin;var M=global.Math.atan;var N=global.Math.atan2;var O=global.Math.exp;var P=global.Math.log;var Q=global.Math.ceil;var R=global.Math.imul;var S=global.Math.min;var T=global.Math.max;var U=global.Math.clz32;var V=env.abort;var W=env.assert;var X=env.enlargeMemory;var Y=env.getTotalMemory;var Z=env.abortOnCannotGrowMemory;var _=env.invoke_ii;var $=env.invoke_iiii;var aa=env.invoke_vi;var ba=env._pthread_cleanup_pop;var ca=env._clock;var da=env.___lock;var ea=env.___syscall6;var fa=env._pthread_cleanup_push;var ga=env._abort;var ha=env.___unlock;var ia=env.___setErrNo;var ja=env._emscripten_memcpy_big;var ka=env.___syscall54;var la=env.___syscall140;var ma=env.___syscall146;var na=0.0;
// EMSCRIPTEN_START_FUNCS
function ra(a){a=a|0;var b=0;b=l;l=l+a|0;l=l+15&-16;return b|0}function sa(){return l|0}function ta(a){a=a|0;l=a}function ua(a,b){a=a|0;b=b|0;l=a;m=b}function va(a,b){a=a|0;b=b|0;if(!n){n=a;o=b}}function wa(a){a=a|0;C=a}function xa(){return C|0}function ya(){var b=0,d=0,e=0;ca()|0;ca()|0;d=La(48)|0;c[42]=d;b=La(48)|0;c[41]=b;c[b>>2]=d;c[b+4>>2]=0;c[b+8>>2]=10001;c[b+12>>2]=40;b=b+16|0;d=124;e=b+31|0;do{a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0}while((b|0)<(e|0));c[458]=10;ca()|0;e=0;do{a[11324]=65;a[11325]=66;c[2652]=7;c[2653]=7;c[2682]=8;c[459]=8;c[460]=8;c[458]=(c[458]|0)+1;c[1479]=7;b=c[41]|0;c[b+12>>2]=5;b=c[b>>2]|0;c[b+12>>2]=5;c[b>>2]=b;b=a[11325]|0;if(b<<24>>24>=65){d=65;do d=d+1<<24>>24;while(d<<24>>24<=b<<24>>24)}e=e+1|0}while((e|0)!=1e8);c[40]=1;c[39]=5;return}function za(){ya();return 0}function Aa(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=c[a+60>>2];a=Da(ea(6,d|0)|0)|0;l=b;return a|0}function Ba(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;n=q+16|0;m=q;j=q+32|0;o=a+28|0;h=c[o>>2]|0;c[j>>2]=h;p=a+20|0;h=(c[p>>2]|0)-h|0;c[j+4>>2]=h;c[j+8>>2]=b;c[j+12>>2]=d;i=a+60|0;k=a+44|0;f=2;b=h+d|0;while(1){if(!(c[2695]|0)){c[n>>2]=c[i>>2];c[n+4>>2]=j;c[n+8>>2]=f;g=Da(ma(146,n|0)|0)|0}else{fa(1,a|0);c[m>>2]=c[i>>2];c[m+4>>2]=j;c[m+8>>2]=f;g=Da(ma(146,m|0)|0)|0;ba(0)}if((b|0)==(g|0)){b=6;break}if((g|0)<0){b=8;break}b=b-g|0;e=c[j+4>>2]|0;if(g>>>0<=e>>>0)if((f|0)==2){c[o>>2]=(c[o>>2]|0)+g;h=e;e=j;f=2}else{h=e;e=j}else{h=c[k>>2]|0;c[o>>2]=h;c[p>>2]=h;h=c[j+12>>2]|0;g=g-e|0;e=j+8|0;f=f+-1|0}c[e>>2]=(c[e>>2]|0)+g;c[e+4>>2]=h-g;j=e}if((b|0)==6){n=c[k>>2]|0;c[a+16>>2]=n+(c[a+48>>2]|0);a=n;c[o>>2]=a;c[p>>2]=a}else if((b|0)==8){c[a+16>>2]=0;c[o>>2]=0;c[p>>2]=0;c[a>>2]=c[a>>2]|32;if((f|0)==2)d=0;else d=d-(c[j+4>>2]|0)|0}l=q;return d|0}function Ca(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;f=l;l=l+32|0;g=f;e=f+20|0;c[g>>2]=c[a+60>>2];c[g+4>>2]=0;c[g+8>>2]=b;c[g+12>>2]=e;c[g+16>>2]=d;if((Da(la(140,g|0)|0)|0)<0){c[e>>2]=-1;a=-1}else a=c[e>>2]|0;l=f;return a|0}function Da(a){a=a|0;if(a>>>0>4294963200){c[(Ea()|0)>>2]=0-a;a=-1}return a|0}function Ea(){var a=0;if(!(c[2695]|0))a=10824;else a=c[(Ra()|0)+64>>2]|0;return a|0}function Fa(a){a=a|0;if(!(c[a+68>>2]|0))Ga(a);return}function Ga(a){a=a|0;return}function Ha(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;g=l;l=l+80|0;f=g;c[b+36>>2]=3;if((c[b>>2]&64|0)==0?(c[f>>2]=c[b+60>>2],c[f+4>>2]=21505,c[f+8>>2]=g+12,ka(54,f|0)|0):0)a[b+75>>0]=-1;f=Ba(b,d,e)|0;l=g;return f|0}function Ia(a){a=a|0;return 0}function Ja(a){a=a|0;var b=0,d=0;do if(a){if((c[a+76>>2]|0)<=-1){b=Ka(a)|0;break}d=(Ia(a)|0)==0;b=Ka(a)|0;if(!d)Ga(a)}else{if(!(c[30]|0))b=0;else b=Ja(c[30]|0)|0;da(10808);a=c[2701]|0;if(a)do{if((c[a+76>>2]|0)>-1)d=Ia(a)|0;else d=0;if((c[a+20>>2]|0)>>>0>(c[a+28>>2]|0)>>>0)b=Ka(a)|0|b;if(d|0)Ga(a);a=c[a+56>>2]|0}while((a|0)!=0);ha(10808)}while(0);return b|0}function Ka(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=a+20|0;g=a+28|0;if((c[h>>2]|0)>>>0>(c[g>>2]|0)>>>0?(pa[c[a+36>>2]&3](a,0,0)|0,(c[h>>2]|0)==0):0)b=-1;else{f=a+4|0;b=c[f>>2]|0;e=a+8|0;d=c[e>>2]|0;if(b>>>0<d>>>0)pa[c[a+40>>2]&3](a,b-d|0,1)|0;c[a+16>>2]=0;c[g>>2]=0;c[h>>2]=0;c[e>>2]=0;c[f>>2]=0;b=0}return b|0}function La(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;L=l;l=l+16|0;p=L;do if(a>>>0<245){o=a>>>0<11?16:a+11&-8;a=o>>>3;t=c[2707]|0;d=t>>>a;if(d&3|0){f=(d&1^1)+a|0;g=10868+(f<<1<<2)|0;a=g+8|0;d=c[a>>2]|0;h=d+8|0;e=c[h>>2]|0;do if((g|0)!=(e|0)){if(e>>>0<(c[2711]|0)>>>0)ga();b=e+12|0;if((c[b>>2]|0)==(d|0)){c[b>>2]=g;c[a>>2]=e;break}else ga()}else c[2707]=t&~(1<<f);while(0);K=f<<3;c[d+4>>2]=K|3;K=d+K+4|0;c[K>>2]=c[K>>2]|1;K=h;l=L;return K|0}s=c[2709]|0;if(o>>>0>s>>>0){if(d|0){e=2<<a;e=d<<a&(e|0-e);e=(e&0-e)+-1|0;i=e>>>12&16;e=e>>>i;b=e>>>5&8;e=e>>>b;g=e>>>2&4;e=e>>>g;a=e>>>1&2;e=e>>>a;d=e>>>1&1;d=(b|i|g|a|d)+(e>>>d)|0;e=10868+(d<<1<<2)|0;a=e+8|0;g=c[a>>2]|0;i=g+8|0;b=c[i>>2]|0;do if((e|0)!=(b|0)){if(b>>>0<(c[2711]|0)>>>0)ga();f=b+12|0;if((c[f>>2]|0)==(g|0)){c[f>>2]=e;c[a>>2]=b;j=t;break}else ga()}else{j=t&~(1<<d);c[2707]=j}while(0);h=(d<<3)-o|0;c[g+4>>2]=o|3;f=g+o|0;c[f+4>>2]=h|1;c[f+h>>2]=h;if(s|0){e=c[2712]|0;b=s>>>3;d=10868+(b<<1<<2)|0;b=1<<b;if(j&b){b=d+8|0;a=c[b>>2]|0;if(a>>>0<(c[2711]|0)>>>0)ga();else{k=b;m=a}}else{c[2707]=j|b;k=d+8|0;m=d}c[k>>2]=e;c[m+12>>2]=e;c[e+8>>2]=m;c[e+12>>2]=d}c[2709]=h;c[2712]=f;K=i;l=L;return K|0}k=c[2708]|0;if(k){i=(k&0-k)+-1|0;J=i>>>12&16;i=i>>>J;I=i>>>5&8;i=i>>>I;K=i>>>2&4;i=i>>>K;a=i>>>1&2;i=i>>>a;j=i>>>1&1;j=c[11132+((I|J|K|a|j)+(i>>>j)<<2)>>2]|0;i=(c[j+4>>2]&-8)-o|0;a=j;while(1){b=c[a+16>>2]|0;if(!b){b=c[a+20>>2]|0;if(!b)break}a=(c[b+4>>2]&-8)-o|0;K=a>>>0<i>>>0;i=K?a:i;a=b;j=K?b:j}f=c[2711]|0;if(j>>>0<f>>>0)ga();h=j+o|0;if(j>>>0>=h>>>0)ga();g=c[j+24>>2]|0;d=c[j+12>>2]|0;do if((d|0)==(j|0)){a=j+20|0;b=c[a>>2]|0;if(!b){a=j+16|0;b=c[a>>2]|0;if(!b){n=0;break}}while(1){e=b+20|0;d=c[e>>2]|0;if(d|0){b=d;a=e;continue}e=b+16|0;d=c[e>>2]|0;if(!d)break;else{b=d;a=e}}if(a>>>0<f>>>0)ga();else{c[a>>2]=0;n=b;break}}else{e=c[j+8>>2]|0;if(e>>>0<f>>>0)ga();b=e+12|0;if((c[b>>2]|0)!=(j|0))ga();a=d+8|0;if((c[a>>2]|0)==(j|0)){c[b>>2]=d;c[a>>2]=e;n=d;break}else ga()}while(0);do if(g|0){b=c[j+28>>2]|0;a=11132+(b<<2)|0;if((j|0)==(c[a>>2]|0)){c[a>>2]=n;if(!n){c[2708]=k&~(1<<b);break}}else{if(g>>>0<(c[2711]|0)>>>0)ga();b=g+16|0;if((c[b>>2]|0)==(j|0))c[b>>2]=n;else c[g+20>>2]=n;if(!n)break}a=c[2711]|0;if(n>>>0<a>>>0)ga();c[n+24>>2]=g;b=c[j+16>>2]|0;do if(b|0)if(b>>>0<a>>>0)ga();else{c[n+16>>2]=b;c[b+24>>2]=n;break}while(0);b=c[j+20>>2]|0;if(b|0)if(b>>>0<(c[2711]|0)>>>0)ga();else{c[n+20>>2]=b;c[b+24>>2]=n;break}}while(0);if(i>>>0<16){K=i+o|0;c[j+4>>2]=K|3;K=j+K+4|0;c[K>>2]=c[K>>2]|1}else{c[j+4>>2]=o|3;c[h+4>>2]=i|1;c[h+i>>2]=i;if(s|0){e=c[2712]|0;b=s>>>3;d=10868+(b<<1<<2)|0;b=1<<b;if(t&b){b=d+8|0;a=c[b>>2]|0;if(a>>>0<(c[2711]|0)>>>0)ga();else{q=b;r=a}}else{c[2707]=t|b;q=d+8|0;r=d}c[q>>2]=e;c[r+12>>2]=e;c[e+8>>2]=r;c[e+12>>2]=d}c[2709]=i;c[2712]=h}K=j+8|0;l=L;return K|0}}}else if(a>>>0<=4294967231){a=a+11|0;o=a&-8;k=c[2708]|0;if(k){d=0-o|0;a=a>>>8;if(a)if(o>>>0>16777215)j=31;else{r=(a+1048320|0)>>>16&8;D=a<<r;q=(D+520192|0)>>>16&4;D=D<<q;j=(D+245760|0)>>>16&2;j=14-(q|r|j)+(D<<j>>>15)|0;j=o>>>(j+7|0)&1|j<<1}else j=0;e=c[11132+(j<<2)>>2]|0;a:do if(!e){a=0;e=0;D=86}else{a=0;h=o<<((j|0)==31?0:25-(j>>>1)|0);i=e;e=0;while(1){f=(c[i+4>>2]&-8)-o|0;if(f>>>0<d>>>0)if(!f){d=0;a=i;e=i;D=90;break a}else{d=f;e=i}f=c[i+20>>2]|0;i=c[i+16+(h>>>31<<2)>>2]|0;a=(f|0)==0|(f|0)==(i|0)?a:f;f=(i|0)==0;if(f){D=86;break}else h=h<<(f&1^1)}}while(0);if((D|0)==86){if((a|0)==0&(e|0)==0){a=2<<j;a=k&(a|0-a);if(!a)break;r=(a&0-a)+-1|0;m=r>>>12&16;r=r>>>m;j=r>>>5&8;r=r>>>j;n=r>>>2&4;r=r>>>n;q=r>>>1&2;r=r>>>q;a=r>>>1&1;a=c[11132+((j|m|n|q|a)+(r>>>a)<<2)>>2]|0}if(!a){i=d;j=e}else D=90}if((D|0)==90)while(1){D=0;r=(c[a+4>>2]&-8)-o|0;f=r>>>0<d>>>0;d=f?r:d;e=f?a:e;f=c[a+16>>2]|0;if(f|0){a=f;D=90;continue}a=c[a+20>>2]|0;if(!a){i=d;j=e;break}else D=90}if((j|0)!=0?i>>>0<((c[2709]|0)-o|0)>>>0:0){f=c[2711]|0;if(j>>>0<f>>>0)ga();h=j+o|0;if(j>>>0>=h>>>0)ga();g=c[j+24>>2]|0;d=c[j+12>>2]|0;do if((d|0)==(j|0)){a=j+20|0;b=c[a>>2]|0;if(!b){a=j+16|0;b=c[a>>2]|0;if(!b){s=0;break}}while(1){e=b+20|0;d=c[e>>2]|0;if(d|0){b=d;a=e;continue}e=b+16|0;d=c[e>>2]|0;if(!d)break;else{b=d;a=e}}if(a>>>0<f>>>0)ga();else{c[a>>2]=0;s=b;break}}else{e=c[j+8>>2]|0;if(e>>>0<f>>>0)ga();b=e+12|0;if((c[b>>2]|0)!=(j|0))ga();a=d+8|0;if((c[a>>2]|0)==(j|0)){c[b>>2]=d;c[a>>2]=e;s=d;break}else ga()}while(0);do if(g){b=c[j+28>>2]|0;a=11132+(b<<2)|0;if((j|0)==(c[a>>2]|0)){c[a>>2]=s;if(!s){t=k&~(1<<b);c[2708]=t;break}}else{if(g>>>0<(c[2711]|0)>>>0)ga();b=g+16|0;if((c[b>>2]|0)==(j|0))c[b>>2]=s;else c[g+20>>2]=s;if(!s){t=k;break}}a=c[2711]|0;if(s>>>0<a>>>0)ga();c[s+24>>2]=g;b=c[j+16>>2]|0;do if(b|0)if(b>>>0<a>>>0)ga();else{c[s+16>>2]=b;c[b+24>>2]=s;break}while(0);b=c[j+20>>2]|0;if(b)if(b>>>0<(c[2711]|0)>>>0)ga();else{c[s+20>>2]=b;c[b+24>>2]=s;t=k;break}else t=k}else t=k;while(0);do if(i>>>0>=16){c[j+4>>2]=o|3;c[h+4>>2]=i|1;c[h+i>>2]=i;b=i>>>3;if(i>>>0<256){d=10868+(b<<1<<2)|0;a=c[2707]|0;b=1<<b;if(a&b){b=d+8|0;a=c[b>>2]|0;if(a>>>0<(c[2711]|0)>>>0)ga();else{B=b;C=a}}else{c[2707]=a|b;B=d+8|0;C=d}c[B>>2]=h;c[C+12>>2]=h;c[h+8>>2]=C;c[h+12>>2]=d;break}b=i>>>8;if(b)if(i>>>0>16777215)b=31;else{J=(b+1048320|0)>>>16&8;K=b<<J;I=(K+520192|0)>>>16&4;K=K<<I;b=(K+245760|0)>>>16&2;b=14-(I|J|b)+(K<<b>>>15)|0;b=i>>>(b+7|0)&1|b<<1}else b=0;d=11132+(b<<2)|0;c[h+28>>2]=b;a=h+16|0;c[a+4>>2]=0;c[a>>2]=0;a=1<<b;if(!(t&a)){c[2708]=t|a;c[d>>2]=h;c[h+24>>2]=d;c[h+12>>2]=h;c[h+8>>2]=h;break}a=i<<((b|0)==31?0:25-(b>>>1)|0);e=c[d>>2]|0;while(1){if((c[e+4>>2]&-8|0)==(i|0)){D=148;break}d=e+16+(a>>>31<<2)|0;b=c[d>>2]|0;if(!b){D=145;break}else{a=a<<1;e=b}}if((D|0)==145)if(d>>>0<(c[2711]|0)>>>0)ga();else{c[d>>2]=h;c[h+24>>2]=e;c[h+12>>2]=h;c[h+8>>2]=h;break}else if((D|0)==148){a=e+8|0;b=c[a>>2]|0;K=c[2711]|0;if(b>>>0>=K>>>0&e>>>0>=K>>>0){c[b+12>>2]=h;c[a>>2]=h;c[h+8>>2]=b;c[h+12>>2]=e;c[h+24>>2]=0;break}else ga()}}else{K=i+o|0;c[j+4>>2]=K|3;K=j+K+4|0;c[K>>2]=c[K>>2]|1}while(0);K=j+8|0;l=L;return K|0}}}else o=-1;while(0);d=c[2709]|0;if(d>>>0>=o>>>0){a=d-o|0;b=c[2712]|0;if(a>>>0>15){K=b+o|0;c[2712]=K;c[2709]=a;c[K+4>>2]=a|1;c[K+a>>2]=a;c[b+4>>2]=o|3}else{c[2709]=0;c[2712]=0;c[b+4>>2]=d|3;K=b+d+4|0;c[K>>2]=c[K>>2]|1}K=b+8|0;l=L;return K|0}i=c[2710]|0;if(i>>>0>o>>>0){I=i-o|0;c[2710]=I;K=c[2713]|0;J=K+o|0;c[2713]=J;c[J+4>>2]=I|1;c[K+4>>2]=o|3;K=K+8|0;l=L;return K|0}if(!(c[2825]|0)){c[2827]=4096;c[2826]=4096;c[2828]=-1;c[2829]=-1;c[2830]=0;c[2818]=0;a=p&-16^1431655768;c[p>>2]=a;c[2825]=a;a=4096}else a=c[2827]|0;j=o+48|0;m=o+47|0;h=a+m|0;e=0-a|0;k=h&e;if(k>>>0<=o>>>0){K=0;l=L;return K|0}a=c[2817]|0;if(a|0?(B=c[2815]|0,C=B+k|0,C>>>0<=B>>>0|C>>>0>a>>>0):0){K=0;l=L;return K|0}b:do if(!(c[2818]&4)){d=c[2713]|0;c:do if(d){f=11276;while(1){a=c[f>>2]|0;if(a>>>0<=d>>>0?(w=f+4|0,(a+(c[w>>2]|0)|0)>>>0>d>>>0):0)break;a=c[f+8>>2]|0;if(!a){D=172;break c}else f=a}d=h-i&e;if(d>>>0<2147483647){a=Pa(d|0)|0;if((a|0)==((c[f>>2]|0)+(c[w>>2]|0)|0)){if((a|0)!=(-1|0)){h=a;g=d;D=190;break b}}else{b=d;D=180}}}else D=172;while(0);do if(((D|0)==172?(x=Pa(0)|0,(x|0)!=(-1|0)):0)?(b=x,u=c[2826]|0,v=u+-1|0,b=((v&b|0)==0?0:(v+b&0-u)-b|0)+k|0,u=c[2815]|0,v=b+u|0,b>>>0>o>>>0&b>>>0<2147483647):0){C=c[2817]|0;if(C|0?v>>>0<=u>>>0|v>>>0>C>>>0:0)break;a=Pa(b|0)|0;if((a|0)==(x|0)){h=x;g=b;D=190;break b}else D=180}while(0);d:do if((D|0)==180){d=0-b|0;do if(j>>>0>b>>>0&(b>>>0<2147483647&(a|0)!=(-1|0))?(y=c[2827]|0,y=m-b+y&0-y,y>>>0<2147483647):0)if((Pa(y|0)|0)==(-1|0)){Pa(d|0)|0;break d}else{b=y+b|0;break}while(0);if((a|0)!=(-1|0)){h=a;g=b;D=190;break b}}while(0);c[2818]=c[2818]|4;D=187}else D=187;while(0);if((((D|0)==187?k>>>0<2147483647:0)?(z=Pa(k|0)|0,A=Pa(0)|0,z>>>0<A>>>0&((z|0)!=(-1|0)&(A|0)!=(-1|0))):0)?(g=A-z|0,g>>>0>(o+40|0)>>>0):0){h=z;D=190}if((D|0)==190){b=(c[2815]|0)+g|0;c[2815]=b;if(b>>>0>(c[2816]|0)>>>0)c[2816]=b;k=c[2713]|0;do if(k){f=11276;while(1){b=c[f>>2]|0;e=f+4|0;a=c[e>>2]|0;if((h|0)==(b+a|0)){D=200;break}d=c[f+8>>2]|0;if(!d)break;else f=d}if(((D|0)==200?(c[f+12>>2]&8|0)==0:0)?k>>>0<h>>>0&k>>>0>=b>>>0:0){c[e>>2]=a+g;K=k+8|0;K=(K&7|0)==0?0:0-K&7;J=k+K|0;K=g-K+(c[2710]|0)|0;c[2713]=J;c[2710]=K;c[J+4>>2]=K|1;c[J+K+4>>2]=40;c[2714]=c[2829];break}b=c[2711]|0;if(h>>>0<b>>>0){c[2711]=h;i=h}else i=b;a=h+g|0;b=11276;while(1){if((c[b>>2]|0)==(a|0)){D=208;break}b=c[b+8>>2]|0;if(!b){a=11276;break}}if((D|0)==208)if(!(c[b+12>>2]&8)){c[b>>2]=h;n=b+4|0;c[n>>2]=(c[n>>2]|0)+g;n=h+8|0;n=h+((n&7|0)==0?0:0-n&7)|0;b=a+8|0;b=a+((b&7|0)==0?0:0-b&7)|0;m=n+o|0;j=b-n-o|0;c[n+4>>2]=o|3;do if((b|0)!=(k|0)){if((b|0)==(c[2712]|0)){K=(c[2709]|0)+j|0;c[2709]=K;c[2712]=m;c[m+4>>2]=K|1;c[m+K>>2]=K;break}a=c[b+4>>2]|0;if((a&3|0)==1){h=a&-8;f=a>>>3;e:do if(a>>>0>=256){g=c[b+24>>2]|0;e=c[b+12>>2]|0;do if((e|0)==(b|0)){e=b+16|0;d=e+4|0;a=c[d>>2]|0;if(!a){a=c[e>>2]|0;if(!a){I=0;break}else f=e}else f=d;while(1){e=a+20|0;d=c[e>>2]|0;if(d|0){a=d;f=e;continue}e=a+16|0;d=c[e>>2]|0;if(!d)break;else{a=d;f=e}}if(f>>>0<i>>>0)ga();else{c[f>>2]=0;I=a;break}}else{f=c[b+8>>2]|0;if(f>>>0<i>>>0)ga();a=f+12|0;if((c[a>>2]|0)!=(b|0))ga();d=e+8|0;if((c[d>>2]|0)==(b|0)){c[a>>2]=e;c[d>>2]=f;I=e;break}else ga()}while(0);if(!g)break;a=c[b+28>>2]|0;d=11132+(a<<2)|0;do if((b|0)!=(c[d>>2]|0)){if(g>>>0<(c[2711]|0)>>>0)ga();a=g+16|0;if((c[a>>2]|0)==(b|0))c[a>>2]=I;else c[g+20>>2]=I;if(!I)break e}else{c[d>>2]=I;if(I|0)break;c[2708]=c[2708]&~(1<<a);break e}while(0);e=c[2711]|0;if(I>>>0<e>>>0)ga();c[I+24>>2]=g;d=b+16|0;a=c[d>>2]|0;do if(a|0)if(a>>>0<e>>>0)ga();else{c[I+16>>2]=a;c[a+24>>2]=I;break}while(0);a=c[d+4>>2]|0;if(!a)break;if(a>>>0<(c[2711]|0)>>>0)ga();else{c[I+20>>2]=a;c[a+24>>2]=I;break}}else{d=c[b+8>>2]|0;e=c[b+12>>2]|0;a=10868+(f<<1<<2)|0;do if((d|0)!=(a|0)){if(d>>>0<i>>>0)ga();if((c[d+12>>2]|0)==(b|0))break;ga()}while(0);if((e|0)==(d|0)){c[2707]=c[2707]&~(1<<f);break}do if((e|0)==(a|0))F=e+8|0;else{if(e>>>0<i>>>0)ga();a=e+8|0;if((c[a>>2]|0)==(b|0)){F=a;break}ga()}while(0);c[d+12>>2]=e;c[F>>2]=d}while(0);b=b+h|0;f=h+j|0}else f=j;b=b+4|0;c[b>>2]=c[b>>2]&-2;c[m+4>>2]=f|1;c[m+f>>2]=f;b=f>>>3;if(f>>>0<256){d=10868+(b<<1<<2)|0;a=c[2707]|0;b=1<<b;do if(!(a&b)){c[2707]=a|b;J=d+8|0;K=d}else{b=d+8|0;a=c[b>>2]|0;if(a>>>0>=(c[2711]|0)>>>0){J=b;K=a;break}ga()}while(0);c[J>>2]=m;c[K+12>>2]=m;c[m+8>>2]=K;c[m+12>>2]=d;break}b=f>>>8;do if(!b)a=0;else{if(f>>>0>16777215){a=31;break}J=(b+1048320|0)>>>16&8;K=b<<J;I=(K+520192|0)>>>16&4;K=K<<I;a=(K+245760|0)>>>16&2;a=14-(I|J|a)+(K<<a>>>15)|0;a=f>>>(a+7|0)&1|a<<1}while(0);e=11132+(a<<2)|0;c[m+28>>2]=a;b=m+16|0;c[b+4>>2]=0;c[b>>2]=0;b=c[2708]|0;d=1<<a;if(!(b&d)){c[2708]=b|d;c[e>>2]=m;c[m+24>>2]=e;c[m+12>>2]=m;c[m+8>>2]=m;break}a=f<<((a|0)==31?0:25-(a>>>1)|0);e=c[e>>2]|0;while(1){if((c[e+4>>2]&-8|0)==(f|0)){D=278;break}d=e+16+(a>>>31<<2)|0;b=c[d>>2]|0;if(!b){D=275;break}else{a=a<<1;e=b}}if((D|0)==275)if(d>>>0<(c[2711]|0)>>>0)ga();else{c[d>>2]=m;c[m+24>>2]=e;c[m+12>>2]=m;c[m+8>>2]=m;break}else if((D|0)==278){a=e+8|0;b=c[a>>2]|0;K=c[2711]|0;if(b>>>0>=K>>>0&e>>>0>=K>>>0){c[b+12>>2]=m;c[a>>2]=m;c[m+8>>2]=b;c[m+12>>2]=e;c[m+24>>2]=0;break}else ga()}}else{K=(c[2710]|0)+j|0;c[2710]=K;c[2713]=m;c[m+4>>2]=K|1}while(0);K=n+8|0;l=L;return K|0}else a=11276;while(1){b=c[a>>2]|0;if(b>>>0<=k>>>0?(E=b+(c[a+4>>2]|0)|0,E>>>0>k>>>0):0)break;a=c[a+8>>2]|0}f=E+-47|0;a=f+8|0;a=f+((a&7|0)==0?0:0-a&7)|0;f=k+16|0;a=a>>>0<f>>>0?k:a;b=a+8|0;d=h+8|0;d=(d&7|0)==0?0:0-d&7;K=h+d|0;d=g+-40-d|0;c[2713]=K;c[2710]=d;c[K+4>>2]=d|1;c[K+d+4>>2]=40;c[2714]=c[2829];d=a+4|0;c[d>>2]=27;c[b>>2]=c[2819];c[b+4>>2]=c[2820];c[b+8>>2]=c[2821];c[b+12>>2]=c[2822];c[2819]=h;c[2820]=g;c[2822]=0;c[2821]=b;b=a+24|0;do{b=b+4|0;c[b>>2]=7}while((b+4|0)>>>0<E>>>0);if((a|0)!=(k|0)){g=a-k|0;c[d>>2]=c[d>>2]&-2;c[k+4>>2]=g|1;c[a>>2]=g;b=g>>>3;if(g>>>0<256){d=10868+(b<<1<<2)|0;a=c[2707]|0;b=1<<b;if(a&b){b=d+8|0;a=c[b>>2]|0;if(a>>>0<(c[2711]|0)>>>0)ga();else{G=b;H=a}}else{c[2707]=a|b;G=d+8|0;H=d}c[G>>2]=k;c[H+12>>2]=k;c[k+8>>2]=H;c[k+12>>2]=d;break}b=g>>>8;if(b)if(g>>>0>16777215)d=31;else{J=(b+1048320|0)>>>16&8;K=b<<J;I=(K+520192|0)>>>16&4;K=K<<I;d=(K+245760|0)>>>16&2;d=14-(I|J|d)+(K<<d>>>15)|0;d=g>>>(d+7|0)&1|d<<1}else d=0;e=11132+(d<<2)|0;c[k+28>>2]=d;c[k+20>>2]=0;c[f>>2]=0;b=c[2708]|0;a=1<<d;if(!(b&a)){c[2708]=b|a;c[e>>2]=k;c[k+24>>2]=e;c[k+12>>2]=k;c[k+8>>2]=k;break}a=g<<((d|0)==31?0:25-(d>>>1)|0);e=c[e>>2]|0;while(1){if((c[e+4>>2]&-8|0)==(g|0)){D=304;break}d=e+16+(a>>>31<<2)|0;b=c[d>>2]|0;if(!b){D=301;break}else{a=a<<1;e=b}}if((D|0)==301)if(d>>>0<(c[2711]|0)>>>0)ga();else{c[d>>2]=k;c[k+24>>2]=e;c[k+12>>2]=k;c[k+8>>2]=k;break}else if((D|0)==304){a=e+8|0;b=c[a>>2]|0;K=c[2711]|0;if(b>>>0>=K>>>0&e>>>0>=K>>>0){c[b+12>>2]=k;c[a>>2]=k;c[k+8>>2]=b;c[k+12>>2]=e;c[k+24>>2]=0;break}else ga()}}}else{K=c[2711]|0;if((K|0)==0|h>>>0<K>>>0)c[2711]=h;c[2819]=h;c[2820]=g;c[2822]=0;c[2716]=c[2825];c[2715]=-1;b=0;do{K=10868+(b<<1<<2)|0;c[K+12>>2]=K;c[K+8>>2]=K;b=b+1|0}while((b|0)!=32);K=h+8|0;K=(K&7|0)==0?0:0-K&7;J=h+K|0;K=g+-40-K|0;c[2713]=J;c[2710]=K;c[J+4>>2]=K|1;c[J+K+4>>2]=40;c[2714]=c[2829]}while(0);b=c[2710]|0;if(b>>>0>o>>>0){I=b-o|0;c[2710]=I;K=c[2713]|0;J=K+o|0;c[2713]=J;c[J+4>>2]=I|1;c[K+4>>2]=o|3;K=K+8|0;l=L;return K|0}}c[(Ea()|0)>>2]=12;K=0;l=L;return K|0}function Ma(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if(!a)return;d=a+-8|0;h=c[2711]|0;if(d>>>0<h>>>0)ga();a=c[a+-4>>2]|0;b=a&3;if((b|0)==1)ga();e=a&-8;n=d+e|0;do if(!(a&1)){a=c[d>>2]|0;if(!b)return;k=d+(0-a)|0;j=a+e|0;if(k>>>0<h>>>0)ga();if((k|0)==(c[2712]|0)){b=n+4|0;a=c[b>>2]|0;if((a&3|0)!=3){q=k;f=j;break}c[2709]=j;c[b>>2]=a&-2;c[k+4>>2]=j|1;c[k+j>>2]=j;return}e=a>>>3;if(a>>>0<256){b=c[k+8>>2]|0;d=c[k+12>>2]|0;a=10868+(e<<1<<2)|0;if((b|0)!=(a|0)){if(b>>>0<h>>>0)ga();if((c[b+12>>2]|0)!=(k|0))ga()}if((d|0)==(b|0)){c[2707]=c[2707]&~(1<<e);q=k;f=j;break}if((d|0)!=(a|0)){if(d>>>0<h>>>0)ga();a=d+8|0;if((c[a>>2]|0)==(k|0))g=a;else ga()}else g=d+8|0;c[b+12>>2]=d;c[g>>2]=b;q=k;f=j;break}g=c[k+24>>2]|0;d=c[k+12>>2]|0;do if((d|0)==(k|0)){d=k+16|0;b=d+4|0;a=c[b>>2]|0;if(!a){a=c[d>>2]|0;if(!a){i=0;break}else e=d}else e=b;while(1){d=a+20|0;b=c[d>>2]|0;if(b|0){a=b;e=d;continue}d=a+16|0;b=c[d>>2]|0;if(!b)break;else{a=b;e=d}}if(e>>>0<h>>>0)ga();else{c[e>>2]=0;i=a;break}}else{e=c[k+8>>2]|0;if(e>>>0<h>>>0)ga();a=e+12|0;if((c[a>>2]|0)!=(k|0))ga();b=d+8|0;if((c[b>>2]|0)==(k|0)){c[a>>2]=d;c[b>>2]=e;i=d;break}else ga()}while(0);if(g){a=c[k+28>>2]|0;b=11132+(a<<2)|0;if((k|0)==(c[b>>2]|0)){c[b>>2]=i;if(!i){c[2708]=c[2708]&~(1<<a);q=k;f=j;break}}else{if(g>>>0<(c[2711]|0)>>>0)ga();a=g+16|0;if((c[a>>2]|0)==(k|0))c[a>>2]=i;else c[g+20>>2]=i;if(!i){q=k;f=j;break}}d=c[2711]|0;if(i>>>0<d>>>0)ga();c[i+24>>2]=g;b=k+16|0;a=c[b>>2]|0;do if(a|0)if(a>>>0<d>>>0)ga();else{c[i+16>>2]=a;c[a+24>>2]=i;break}while(0);a=c[b+4>>2]|0;if(a)if(a>>>0<(c[2711]|0)>>>0)ga();else{c[i+20>>2]=a;c[a+24>>2]=i;q=k;f=j;break}else{q=k;f=j}}else{q=k;f=j}}else{q=d;f=e}while(0);if(q>>>0>=n>>>0)ga();a=n+4|0;b=c[a>>2]|0;if(!(b&1))ga();if(!(b&2)){if((n|0)==(c[2713]|0)){p=(c[2710]|0)+f|0;c[2710]=p;c[2713]=q;c[q+4>>2]=p|1;if((q|0)!=(c[2712]|0))return;c[2712]=0;c[2709]=0;return}if((n|0)==(c[2712]|0)){p=(c[2709]|0)+f|0;c[2709]=p;c[2712]=q;c[q+4>>2]=p|1;c[q+p>>2]=p;return}f=(b&-8)+f|0;e=b>>>3;do if(b>>>0>=256){g=c[n+24>>2]|0;a=c[n+12>>2]|0;do if((a|0)==(n|0)){d=n+16|0;b=d+4|0;a=c[b>>2]|0;if(!a){a=c[d>>2]|0;if(!a){m=0;break}else e=d}else e=b;while(1){d=a+20|0;b=c[d>>2]|0;if(b|0){a=b;e=d;continue}d=a+16|0;b=c[d>>2]|0;if(!b)break;else{a=b;e=d}}if(e>>>0<(c[2711]|0)>>>0)ga();else{c[e>>2]=0;m=a;break}}else{b=c[n+8>>2]|0;if(b>>>0<(c[2711]|0)>>>0)ga();d=b+12|0;if((c[d>>2]|0)!=(n|0))ga();e=a+8|0;if((c[e>>2]|0)==(n|0)){c[d>>2]=a;c[e>>2]=b;m=a;break}else ga()}while(0);if(g|0){a=c[n+28>>2]|0;b=11132+(a<<2)|0;if((n|0)==(c[b>>2]|0)){c[b>>2]=m;if(!m){c[2708]=c[2708]&~(1<<a);break}}else{if(g>>>0<(c[2711]|0)>>>0)ga();a=g+16|0;if((c[a>>2]|0)==(n|0))c[a>>2]=m;else c[g+20>>2]=m;if(!m)break}d=c[2711]|0;if(m>>>0<d>>>0)ga();c[m+24>>2]=g;b=n+16|0;a=c[b>>2]|0;do if(a|0)if(a>>>0<d>>>0)ga();else{c[m+16>>2]=a;c[a+24>>2]=m;break}while(0);a=c[b+4>>2]|0;if(a|0)if(a>>>0<(c[2711]|0)>>>0)ga();else{c[m+20>>2]=a;c[a+24>>2]=m;break}}}else{b=c[n+8>>2]|0;d=c[n+12>>2]|0;a=10868+(e<<1<<2)|0;if((b|0)!=(a|0)){if(b>>>0<(c[2711]|0)>>>0)ga();if((c[b+12>>2]|0)!=(n|0))ga()}if((d|0)==(b|0)){c[2707]=c[2707]&~(1<<e);break}if((d|0)!=(a|0)){if(d>>>0<(c[2711]|0)>>>0)ga();a=d+8|0;if((c[a>>2]|0)==(n|0))l=a;else ga()}else l=d+8|0;c[b+12>>2]=d;c[l>>2]=b}while(0);c[q+4>>2]=f|1;c[q+f>>2]=f;if((q|0)==(c[2712]|0)){c[2709]=f;return}}else{c[a>>2]=b&-2;c[q+4>>2]=f|1;c[q+f>>2]=f}a=f>>>3;if(f>>>0<256){d=10868+(a<<1<<2)|0;b=c[2707]|0;a=1<<a;if(b&a){a=d+8|0;b=c[a>>2]|0;if(b>>>0<(c[2711]|0)>>>0)ga();else{o=a;p=b}}else{c[2707]=b|a;o=d+8|0;p=d}c[o>>2]=q;c[p+12>>2]=q;c[q+8>>2]=p;c[q+12>>2]=d;return}a=f>>>8;if(a)if(f>>>0>16777215)b=31;else{o=(a+1048320|0)>>>16&8;p=a<<o;n=(p+520192|0)>>>16&4;p=p<<n;b=(p+245760|0)>>>16&2;b=14-(n|o|b)+(p<<b>>>15)|0;b=f>>>(b+7|0)&1|b<<1}else b=0;e=11132+(b<<2)|0;c[q+28>>2]=b;c[q+20>>2]=0;c[q+16>>2]=0;a=c[2708]|0;d=1<<b;do if(a&d){b=f<<((b|0)==31?0:25-(b>>>1)|0);e=c[e>>2]|0;while(1){if((c[e+4>>2]&-8|0)==(f|0)){a=130;break}d=e+16+(b>>>31<<2)|0;a=c[d>>2]|0;if(!a){a=127;break}else{b=b<<1;e=a}}if((a|0)==127)if(d>>>0<(c[2711]|0)>>>0)ga();else{c[d>>2]=q;c[q+24>>2]=e;c[q+12>>2]=q;c[q+8>>2]=q;break}else if((a|0)==130){b=e+8|0;a=c[b>>2]|0;p=c[2711]|0;if(a>>>0>=p>>>0&e>>>0>=p>>>0){c[a+12>>2]=q;c[b>>2]=q;c[q+8>>2]=a;c[q+12>>2]=e;c[q+24>>2]=0;break}else ga()}}else{c[2708]=a|d;c[e>>2]=q;c[q+24>>2]=e;c[q+12>>2]=q;c[q+8>>2]=q}while(0);q=(c[2715]|0)+-1|0;c[2715]=q;if(!q)a=11284;else return;while(1){a=c[a>>2]|0;if(!a)break;else a=a+8|0}c[2715]=-1;return}function Na(){}function Oa(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;h=b+e|0;d=d&255;if((e|0)>=67){while(b&3){a[b>>0]=d;b=b+1|0}f=h&-4|0;g=f-64|0;i=d|d<<8|d<<16|d<<24;while((b|0)<=(g|0)){c[b>>2]=i;c[b+4>>2]=i;c[b+8>>2]=i;c[b+12>>2]=i;c[b+16>>2]=i;c[b+20>>2]=i;c[b+24>>2]=i;c[b+28>>2]=i;c[b+32>>2]=i;c[b+36>>2]=i;c[b+40>>2]=i;c[b+44>>2]=i;c[b+48>>2]=i;c[b+52>>2]=i;c[b+56>>2]=i;c[b+60>>2]=i;b=b+64|0}while((b|0)<(f|0)){c[b>>2]=i;b=b+4|0}}while((b|0)<(h|0)){a[b>>0]=d;b=b+1|0}return h-e|0}function Pa(a){a=a|0;var b=0,d=0;d=a+15&-16|0;b=c[i>>2]|0;a=b+d|0;if((d|0)>0&(a|0)<(b|0)|(a|0)<0){Z()|0;ia(12);return -1}c[i>>2]=a;if((a|0)>(Y()|0)?(X()|0)==0:0){ia(12);c[i>>2]=b;return -1}return b|0}function Qa(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((e|0)>=8192)return ja(b|0,d|0,e|0)|0;h=b|0;g=b+e|0;if((b&3)==(d&3)){while(b&3){if(!e)return h|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}e=g&-4|0;f=e-64|0;while((b|0)<=(f|0)){c[b>>2]=c[d>>2];c[b+4>>2]=c[d+4>>2];c[b+8>>2]=c[d+8>>2];c[b+12>>2]=c[d+12>>2];c[b+16>>2]=c[d+16>>2];c[b+20>>2]=c[d+20>>2];c[b+24>>2]=c[d+24>>2];c[b+28>>2]=c[d+28>>2];c[b+32>>2]=c[d+32>>2];c[b+36>>2]=c[d+36>>2];c[b+40>>2]=c[d+40>>2];c[b+44>>2]=c[d+44>>2];c[b+48>>2]=c[d+48>>2];c[b+52>>2]=c[d+52>>2];c[b+56>>2]=c[d+56>>2];c[b+60>>2]=c[d+60>>2];b=b+64|0;d=d+64|0}while((b|0)<(e|0)){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0}}else{e=g-4|0;while((b|0)<(e|0)){a[b>>0]=a[d>>0]|0;a[b+1>>0]=a[d+1>>0]|0;a[b+2>>0]=a[d+2>>0]|0;a[b+3>>0]=a[d+3>>0]|0;b=b+4|0;d=d+4|0}}while((b|0)<(g|0)){a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0}return h|0}function Ra(){return 0}function Sa(a,b){a=a|0;b=b|0;return oa[a&1](b|0)|0}function Ta(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return pa[a&3](b|0,c|0,d|0)|0}function Ua(a,b){a=a|0;b=b|0;qa[a&1](b|0)}function Va(a){a=a|0;V(0);return 0}function Wa(a,b,c){a=a|0;b=b|0;c=c|0;V(1);return 0}function Xa(a){a=a|0;V(2)}
// EMSCRIPTEN_END_FUNCS
var oa=[Va,Aa];var pa=[Wa,Ha,Ca,Ba];var qa=[Xa,Fa];return{_sbrk:Pa,_free:Ma,_main:za,_pthread_self:Ra,_memset:Oa,_malloc:La,_memcpy:Qa,_fflush:Ja,___errno_location:Ea,runPostSets:Na,stackAlloc:ra,stackSave:sa,stackRestore:ta,establishStackSpace:ua,setTempRet0:wa,getTempRet0:xa,setThrew:va,stackAlloc:ra,stackSave:sa,stackRestore:ta,establishStackSpace:ua,setThrew:va,setTempRet0:wa,getTempRet0:xa,dynCall_ii:Sa,dynCall_iiii:Ta,dynCall_vi:Ua}})
// EMSCRIPTEN_END_ASM
(Module.asmGlobalArg,Module.asmLibraryArg,buffer);var _malloc=Module["_malloc"]=asm["_malloc"];var getTempRet0=Module["getTempRet0"]=asm["getTempRet0"];var _free=Module["_free"]=asm["_free"];var _main=Module["_main"]=asm["_main"];var setTempRet0=Module["setTempRet0"]=asm["setTempRet0"];var establishStackSpace=Module["establishStackSpace"]=asm["establishStackSpace"];var _pthread_self=Module["_pthread_self"]=asm["_pthread_self"];var stackSave=Module["stackSave"]=asm["stackSave"];var _memset=Module["_memset"]=asm["_memset"];var _sbrk=Module["_sbrk"]=asm["_sbrk"];var stackRestore=Module["stackRestore"]=asm["stackRestore"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var stackAlloc=Module["stackAlloc"]=asm["stackAlloc"];var setThrew=Module["setThrew"]=asm["setThrew"];var _fflush=Module["_fflush"]=asm["_fflush"];var ___errno_location=Module["___errno_location"]=asm["___errno_location"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];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=Module["stackAlloc"];Runtime.stackSave=Module["stackSave"];Runtime.stackRestore=Module["stackRestore"];Runtime.establishStackSpace=Module["establishStackSpace"];Runtime.setTempRet0=Module["setTempRet0"];Runtime.getTempRet0=Module["getTempRet0"];Module["asm"]=asm;if(memoryInitializer){if(typeof Module["locateFile"]==="function"){memoryInitializer=Module["locateFile"](memoryInitializer)}else if(Module["memoryInitializerPrefixURL"]){memoryInitializer=Module["memoryInitializerPrefixURL"]+memoryInitializer}if(ENVIRONMENT_IS_NODE||ENVIRONMENT_IS_SHELL){var data=Module["readBinary"](memoryInitializer);HEAPU8.set(data,Runtime.GLOBAL_BASE)}else{addRunDependency("memory initializer");var applyMemoryInitializer=(function(data){if(data.byteLength)data=new Uint8Array(data);HEAPU8.set(data,Runtime.GLOBAL_BASE);if(Module["memoryInitializerRequest"])delete Module["memoryInitializerRequest"].response;removeRunDependency("memory initializer")});function doBrowserLoad(){Module["readAsync"](memoryInitializer,applyMemoryInitializer,(function(){throw"could not load memory initializer "+memoryInitializer}))}if(Module["memoryInitializerRequest"]){function useRequest(){var request=Module["memoryInitializerRequest"];if(request.status!==200&&request.status!==0){console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+request.status+", retrying "+memoryInitializer);doBrowserLoad();return}applyMemoryInitializer(request.response)}if(Module["memoryInitializerRequest"].response){setTimeout(useRequest,0)}else{Module["memoryInitializerRequest"].addEventListener("load",useRequest)}}else{doBrowserLoad()}}}function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}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(args){args=args||[];ensureInitRuntime();var argc=args.length+1;function pad(){for(var i=0;i<4-1;i++){argv.push(0)}}var argv=[allocate(intArrayFromString(Module["thisProgram"]),"i8",ALLOC_NORMAL)];pad();for(var i=0;i<argc-1;i=i+1){argv.push(allocate(intArrayFromString(args[i]),"i8",ALLOC_NORMAL));pad()}argv.push(0);argv=allocate(argv,"i32",ALLOC_NORMAL);try{var ret=Module["_main"](argc,argv,0);exit(ret,true)}catch(e){if(e instanceof ExitStatus){return}else if(e=="SimulateInfiniteLoop"){Module["noExitRuntime"]=true;return}else{if(e&&typeof e==="object"&&e.stack)Module.printErr("exception thrown: "+[e,e.stack]);throw e}}finally{calledMain=true}};function run(args){args=args||Module["arguments"];if(preloadStartTime===null)preloadStartTime=Date.now();if(runDependencies>0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(Module["_main"]&&shouldRunNow)Module["callMain"](args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout((function(){setTimeout((function(){Module["setStatus"]("")}),1);doRun()}),1)}else{doRun()}}Module["run"]=Module.run=run;function exit(status,implicit){if(implicit&&Module["noExitRuntime"]){return}if(Module["noExitRuntime"]){}else{ABORT=true;EXITSTATUS=status;STACKTOP=initialStackTop;exitRuntime();if(Module["onExit"])Module["onExit"](status)}if(ENVIRONMENT_IS_NODE){process["exit"](status)}else if(ENVIRONMENT_IS_SHELL&&typeof quit==="function"){quit(status)}throw new ExitStatus(status)}Module["exit"]=Module.exit=exit;var abortDecorators=[];function abort(what){if(what!==undefined){Module.print(what);Module.printErr(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;var extra="\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";var output="abort("+what+") at "+stackTrace()+extra;if(abortDecorators){abortDecorators.forEach((function(decorator){output=decorator(output,what)}))}throw output}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()