2 строки
99 KiB
JavaScript
2 строки
99 KiB
JavaScript
var STT_SERVER_URL="https://speaktome-2.services.mozilla.com/",RECORDING_TIMEOUT=3e3,RECORDING_BITS_PER_SECOND=16e3,RECORDING_MIME_TYPE="audio/ogg";function SpeakToMe(e){var n={vad:!0,timeout:RECORDING_TIMEOUT,continuous:!1,serverURL:STT_SERVER_URL,listener:null,language:"en-US",productTag:null,storeSample:!1,storeTranscription:!1};"object"==typeof e&&("boolean"==typeof e.vad&&(n.vad=e.vad),e.timeout&&(n.timeout=e.timeout),e.listener&&(n.listener=e.listener),e.language&&(n.language=e.language),e.productTag&&(n.productTag=e.productTag),"boolean"==typeof e.storeSample&&(n.storeSample=e.storeSample),"boolean"==typeof e.storeTranscription&&(n.storeTranscription=e.storeTranscription));var t,a,o,l,u,s,f,c,r="ready",d=null;function i(r){if(f=r,M({state:"listening"}),t=new AudioContext,a=t.createMediaStreamSource(r),o=t.createAnalyser(),l=t.createMediaStreamDestination(),a.channelCount=1,o.channelCount=1,l.channelCount=1,a.connect(o),o.connect(l),n.vad){d=SpeakToMeVAD({listener:function(e){c=e,_()}}),c="";(u=t.createScriptProcessor(2048,1,1)).connect(t.destination),u.onaudioprocess=d.onAudioProcessingEvent,a.connect(u)}var e={audioBitsPerSecond:RECORDING_BITS_PER_SECOND,mimeType:RECORDING_MIME_TYPE};(s=new MediaRecorder(l.stream,e)).start(),n.vad||setTimeout(_,n.timeout),s.onstop=function(e){(M({state:"processing"}),n.vad&&"novoice"===c||!i[0].size)?(M({state:"result",data:[]}),M({state:"ready"})):function(e){M({state:"sending"});var r={"Accept-Language-STT":n.language,"Store-Sample":n.storeSample?"1":"0","Store-Transcription":n.storeTranscription?"1":"0"};n.productTag&&(r["Product-Tag"]=n.productTag);fetch(n.serverURL,{method:"POST",body:e,headers:r}).then(function(e){return e.json()}).then(function(e){if("ok"!==e.status)throw e.status?new Error("Received bad status: "+e.status):e.error?new Error("Received server error: "+e.error):new Error("Received invalid result");M({state:"result",data:e.data}),M({state:"ready"})}).catch(function(e){M({state:"error",error:e}),M({state:"ready"})})}(new Blob(i,{type:"audio/ogg; codecs=opus"}));i=[],u=r=l=o=a=t=s=null};var i=[];s.ondataavailable=function(e){i.push(e.data)}}function _(){"listening"===r&&(f.getAudioTracks()[0].stop(),s.stop(),a.disconnect(u),a.disconnect(o),o.disconnect(l),u.disconnect(t.destination),t.close())}function M(e){if(r=e.state,n.listener)try{n.listener(e)}catch(e){console.error("SpeakToMe: Listener error",e)}else console.warn("SpeakToMe: You need to initialize SpeakToMe with an event listener!")}function h(){return f}return{listen:function(){"ready"===r?navigator.mediaDevices.getUserMedia({audio:!0}).then(i).catch(function(e){M({state:"error",error:e}),M({state:"ready"})}):console.warn("Listen() called when not ready")},stop:_,setListener:function(e){n.listener=e},getmediaStream:function(){return console.log("SpeakToMe.getmediaStream(): Deprecated API -","use getMediaStream() instead"),h()},getMediaStream:h}}function SpeakToMeVAD(e){var r={listener:function(){console.error("SpeakToMeVAD: No listener configured!")},maxSilence:500};e&&(void 0!==e.listener&&(r.listener=e.listener),void 0!==e.maxSilence&&(console.log("MAXSILENCE",e.maxSilence),r.maxSilence=e.maxSilence)),Module.cwrap("main")(),Module.cwrap("setmode","number",["number"])(3);var a=Module.cwrap("process_data","number",["number","number","number","number","number","number"]),l=480,u=new Int16Array(l),s=0,f=0,c=0,d=!1,_=!1,M=Date.now(),h=Date.now(),m=!1,T=r.maxSilence;function i(){u=new Int16Array(l),c=f=s=0,_=d=!1,M=Date.now(),h=Date.now(),m=!1}function v(e){var r=e.length*e.BYTES_PER_ELEMENT,i=Module._malloc(r),n=new Uint8Array(Module.HEAPU8.buffer,i,r);n.set(new Uint8Array(e.buffer));var t=a(n.byteOffset,e.length,48e3,e[0],e[100],e[2e3]);return Module._free(n.byteOffset),t}function p(e){try{r.listener(e)}catch(e){console.log("SpeakToMeVAD: onCompleteCallback exception:",e)}i()}return i(),{reset:i,onAudioProcessingEvent:function(e){var r=new Int16Array(e.inputBuffer.getChannelData(0).length);!function(e,r){for(var i=0;i<r.length;i++){var n=Math.max(-1,Math.min(1,r[i]));e[i]=n<0?32768*n:32767*n}}(r,e.inputBuffer.getChannelData(0));for(var i=0;i<Math.ceil(r.length/l)&&!m;i++){var n=i*l,t=n+l;if(n+l>r.length)u.set(r.slice(n)),s=r.length-n;else{0<s?(t-=this.leftovers,u.set(r.slice(n,t),s),s=0):u.set(r.slice(n,t));var a=v(u);u=new Int16Array(l);var o=Date.now();0===a?d&&T<(c+=o-h)&&(_=!0):250<(f+=o-h)&&(d=!0),h=o,d&&_?(m=!0,p("finishedvoice")):6<(o-M)/1e3&&(m=!0,p(d?"timeout":"novoice"))}}}}}MediaRecorder.isTypeSupported(RECORDING_MIME_TYPE)||(RECORDING_MIME_TYPE="audio/webm;codecs=opus"),void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(i){var n=navigator.webkitGetUserMedia||navigator.mozGetUserMedia;return n?new Promise(function(e,r){n.call(navigator,i,e,r)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}),"undefined"!=typeof module&&(module.exports=SpeakToMe),"undefined"!=typeof module&&(module.exports=SpeakToMe);var Module={preRun:[],postRun:[],print:function(e){console.log("[webrtc_vad.js print]",e)},printErr:function(e){console.error("[webrtc_vad.js error]",e)},canvas:void 0,setStatus:function(e){console.log("[webrtc_vad.js status] ",e)},totalDependencies:0,monitorRunDependencies:function(e){this.totalDependencies=Math.max(this.totalDependencies,e),Module.setStatus(e?"Preparing... ("+(this.totalDependencies-e)+"/"+this.totalDependencies+")":"All downloads complete.")}},Module;Module.setStatus("Loading webrtc_vad..."),window.onerror=function(e){Module.setStatus("Exception thrown, see JavaScript console"),Module.setStatus=function(e){e&&Module.printErr("[post-exception status] "+e)}},Module.noInitialRun=!0,Module.onRuntimeInitialized=function(){Module.setStatus("Webrtc_vad and SpeakToMeVad loaded")},Module||(Module=(void 0!==Module?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1,nodeFS,nodePath;if(Module.ENVIRONMENT)if("WEB"===Module.ENVIRONMENT)ENVIRONMENT_IS_WEB=!0;else if("WORKER"===Module.ENVIRONMENT)ENVIRONMENT_IS_WORKER=!0;else if("NODE"===Module.ENVIRONMENT)ENVIRONMENT_IS_NODE=!0;else{if("SHELL"!==Module.ENVIRONMENT)throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");ENVIRONMENT_IS_SHELL=!0}else ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_IS_NODE="object"==typeof process&&"function"==typeof require&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE)Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn),Module.read=function(e,r){nodeFS||(nodeFS=require("fs")),nodePath||(nodePath=require("path")),e=nodePath.normalize(e);var i=nodeFS.readFileSync(e);return r?i:i.toString()},Module.readBinary=function(e){var r=Module.read(e,!0);return r.buffer||(r=new Uint8Array(r)),assert(r.buffer),r},Module.load=function(e){globalEval(read(e))},Module.thisProgram||(1<process.argv.length?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),"undefined"!=typeof module&&(module.exports=Module),process.on("uncaughtException",function(e){if(!(e instanceof ExitStatus))throw e}),Module.inspect=function(){return"[Emscripten Module object]"};else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),"undefined"!=typeof printErr&&(Module.printErr=printErr),"undefined"!=typeof read?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(e){if("function"==typeof readbuffer)return new Uint8Array(readbuffer(e));var r=read(e,"binary");return assert("object"==typeof r),r},"undefined"!=typeof scriptArgs?Module.arguments=scriptArgs:"undefined"!=typeof arguments&&(Module.arguments=arguments),"function"==typeof quit&&(Module.quit=function(e,r){quit(e)});else{if(!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER)throw"Unknown runtime environment. Where are we?";if(Module.read=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),r.response}),Module.readAsync=function(e,r,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?r(n.response):i()},n.onerror=i,n.send(null)},"undefined"!=typeof arguments&&(Module.arguments=arguments),"undefined"!=typeof console)Module.print||(Module.print=function(e){console.log(e)}),Module.printErr||(Module.printErr=function(e){console.warn(e)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&"undefined"!=typeof dump?function(e){dump(e)}:function(e){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),void 0===Module.setWindowTitle&&(Module.setWindowTitle=function(e){document.title=e})}function globalEval(e){eval.call(null,e)}for(var key in!Module.load&&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.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(e,r){throw r}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[],moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(e){return tempRet0=e},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(e){STACKTOP=e},getNativeTypeSize:function(e){switch(e){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("*"===e[e.length-1])return Runtime.QUANTUM_SIZE;if("i"!==e[0])return 0;var r=parseInt(e.substr(1));return assert(r%8==0),r/8}},getNativeFieldSize:function(e){return Math.max(Runtime.getNativeTypeSize(e),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(e,r){return"double"===r||"i64"===r?7&e&&(assert(4==(7&e)),e+=4):assert(0==(3&e)),e},getAlignSize:function(e,r,i){return i||"i64"!=e&&"double"!=e?e?Math.min(r||(e?Runtime.getNativeFieldSize(e):0),Runtime.QUANTUM_SIZE):Math.min(r,8):8},dynCall:function(e,r,i){return i&&i.length?Module["dynCall_"+e].apply(null,[r].concat(i)):Module["dynCall_"+e].call(null,r)},functionPointers:[],addFunction:function(e){for(var r=0;r<Runtime.functionPointers.length;r++)if(!Runtime.functionPointers[r])return Runtime.functionPointers[r]=e,2*(1+r);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(r,i){assert(i),Runtime.funcWrappers[i]||(Runtime.funcWrappers[i]={});var e=Runtime.funcWrappers[i];return e[r]||(1===i.length?e[r]=function(){return Runtime.dynCall(i,r)}:2===i.length?e[r]=function(e){return Runtime.dynCall(i,r,[e])}:e[r]=function(){return Runtime.dynCall(i,r,Array.prototype.slice.call(arguments))}),e[r]},getCompilerSetting:function(e){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work"},stackAlloc:function(e){var r=STACKTOP;return STACKTOP=(STACKTOP=STACKTOP+e|0)+15&-16,r},staticAlloc:function(e){var r=STATICTOP;return STATICTOP=(STATICTOP=STATICTOP+e|0)+15&-16,r},dynamicAlloc:function(e){var r=HEAP32[DYNAMICTOP_PTR>>2],i=-16&(r+e+15|0);if((HEAP32[DYNAMICTOP_PTR>>2]=i,TOTAL_MEMORY<=i)&&!enlargeMemory())return HEAP32[DYNAMICTOP_PTR>>2]=r,0;return r},alignMemory:function(e,r){return e=Math.ceil(e/(r||16))*(r||16)},makeBigInt:function(e,r,i){return i?+(e>>>0)+4294967296*+(r>>>0):+(e>>>0)+4294967296*+(0|r)},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,EXITSTATUS=0,cwrap,ccall;function assert(e,r){e||abort("Assertion failed: "+r)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(e){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}function setValue(e,r,i,n){switch("*"===(i=i||"i8").charAt(i.length-1)&&(i="i32"),i){case"i1":case"i8":HEAP8[e>>0]=r;break;case"i16":HEAP16[e>>1]=r;break;case"i32":HEAP32[e>>2]=r;break;case"i64":tempI64=[r>>>0,(tempDouble=r,1<=+Math_abs(tempDouble)?0<tempDouble?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[e>>2]=tempI64[0],HEAP32[e+4>>2]=tempI64[1];break;case"float":HEAPF32[e>>2]=r;break;case"double":HEAPF64[e>>3]=r;break;default:abort("invalid type for setValue: "+i)}}function getValue(e,r,i){switch("*"===(r=r||"i8").charAt(r.length-1)&&(r="i32"),r){case"i1":case"i8":return HEAP8[e>>0];case"i16":return HEAP16[e>>1];case"i32":case"i64":return HEAP32[e>>2];case"float":return HEAPF32[e>>2];case"double":return HEAPF64[e>>3];default:abort("invalid type for setValue: "+r)}return null}!function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(e){var r=Runtime.stackAlloc(e.length);return writeArrayToMemory(e,r),r},stringToC:function(e){var r=0;if(null!=e&&0!==e){var i=1+(e.length<<2);stringToUTF8(e,r=Runtime.stackAlloc(i),i)}return r}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(e,r,i,n,t){var a=getCFunc(e),o=[],l=0;if(n)for(var u=0;u<n.length;u++){var s=toC[i[u]];o[u]=s?(0===l&&(l=Runtime.stackSave()),s(n[u])):n[u]}var f=a.apply(null,o);if("string"===r&&(f=Pointer_stringify(f)),0!==l){if(t&&t.async)return void EmterpreterAsync.asyncFinalizers.push(function(){Runtime.stackRestore(l)});Runtime.stackRestore(l)}return f};var sourceRegex=/^function\s*[a-zA-Z$_0-9]*\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;function parseJSFunc(e){var r=e.toString().match(sourceRegex).slice(1);return{arguments:r[0],body:r[1],returnValue:r[2]}}var JSsource=null;function ensureJSsource(){if(!JSsource)for(var e in JSsource={},JSfuncs)JSfuncs.hasOwnProperty(e)&&(JSsource[e]=parseJSFunc(JSfuncs[e]))}cwrap=function cwrap(ident,returnType,argTypes){argTypes=argTypes||[];var cfunc=getCFunc(ident),numericArgs=argTypes.every(function(e){return"number"===e}),numericRet="string"!==returnType;if(numericRet&&numericArgs)return cfunc;var argNames=argTypes.map(function(e,r){return"$"+r}),funcstr="(function("+argNames.join(",")+") {",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("number"!==type){var convertCode=JSsource[type+"ToC"];funcstr+="var "+convertCode.arguments+" = "+arg+";",funcstr+=convertCode.body+";",funcstr+=arg+"=("+convertCode.returnValue+");"}}}var cfuncname=parseJSFunc(function(){return cfunc}).returnValue;if(funcstr+="var ret = "+cfuncname+"("+argNames.join(",")+");",!numericRet){var strgfy=parseJSFunc(function(){return Pointer_stringify}).returnValue;funcstr+="ret = "+strgfy+"(ret);"}return numericArgs||(ensureJSsource(),funcstr+=JSsource.stackRestore.body.replace("()","(stack)")+";"),funcstr+="return ret})",eval(funcstr)}}(),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;function allocate(e,r,i,n){var t,a;a="number"==typeof e?(t=!0,e):(t=!1,e.length);var o,l="string"==typeof r?r:null;if(o=i==ALLOC_NONE?n:["function"==typeof _malloc?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][void 0===i?ALLOC_STATIC:i](Math.max(a,l?1:r.length)),t){var u;n=o;for(assert(0==(3&o)),u=o+(-4&a);n<u;n+=4)HEAP32[n>>2]=0;for(u=o+a;n<u;)HEAP8[n++>>0]=0;return o}if("i8"===l)return e.subarray||e.slice?HEAPU8.set(e,o):HEAPU8.set(new Uint8Array(e),o),o;for(var s,f,c,d=0;d<a;){var _=e[d];"function"==typeof _&&(_=Runtime.getFunctionIndex(_)),0!==(s=l||r[d])?("i64"==s&&(s="i32"),setValue(o+d,_,s),c!==s&&(f=Runtime.getNativeTypeSize(s),c=s),d+=f):d++}return o}function getMemory(e){return staticSealed?runtimeInitialized?_malloc(e):Runtime.dynamicAlloc(e):Runtime.staticAlloc(e)}function Pointer_stringify(e,r){if(0===r||!e)return"";for(var i,n=0,t=0;n|=i=HEAPU8[e+t>>0],(0!=i||r)&&(t++,!r||t!=r););r||(r=t);var a="";if(n<128){for(var o;0<r;)o=String.fromCharCode.apply(String,HEAPU8.subarray(e,e+Math.min(r,1024))),a=a?a+o:o,e+=1024,r-=1024;return a}return Module.UTF8ToString(e)}function AsciiToString(e){for(var r="";;){var i=HEAP8[e++>>0];if(!i)return r;r+=String.fromCharCode(i)}}function stringToAscii(e,r){return writeAsciiToMemory(e,r,!1)}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.getMemory=getMemory,Module.Pointer_stringify=Pointer_stringify,Module.AsciiToString=AsciiToString,Module.stringToAscii=stringToAscii;var UTF8Decoder="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(e,r){for(var i=r;e[i];)++i;if(16<i-r&&e.subarray&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(r,i));for(var n,t,a,o,l,u="";;){if(!(n=e[r++]))return u;if(128&n)if(t=63&e[r++],192!=(224&n))if(a=63&e[r++],(n=224==(240&n)?(15&n)<<12|t<<6|a:(o=63&e[r++],240==(248&n)?(7&n)<<18|t<<12|a<<6|o:(l=63&e[r++],248==(252&n)?(3&n)<<24|t<<18|a<<12|o<<6|l:(1&n)<<30|t<<24|a<<18|o<<12|l<<6|63&e[r++])))<65536)u+=String.fromCharCode(n);else{var s=n-65536;u+=String.fromCharCode(55296|s>>10,56320|1023&s)}else u+=String.fromCharCode((31&n)<<6|t);else u+=String.fromCharCode(n)}}function UTF8ToString(e){return UTF8ArrayToString(HEAPU8,e)}function stringToUTF8Array(e,r,i,n){if(!(0<n))return 0;for(var t=i,a=i+n-1,o=0;o<e.length;++o){var l=e.charCodeAt(o);if(55296<=l&&l<=57343&&(l=65536+((1023&l)<<10)|1023&e.charCodeAt(++o)),l<=127){if(a<=i)break;r[i++]=l}else if(l<=2047){if(a<=i+1)break;r[i++]=192|l>>6,r[i++]=128|63&l}else if(l<=65535){if(a<=i+2)break;r[i++]=224|l>>12,r[i++]=128|l>>6&63,r[i++]=128|63&l}else if(l<=2097151){if(a<=i+3)break;r[i++]=240|l>>18,r[i++]=128|l>>12&63,r[i++]=128|l>>6&63,r[i++]=128|63&l}else if(l<=67108863){if(a<=i+4)break;r[i++]=248|l>>24,r[i++]=128|l>>18&63,r[i++]=128|l>>12&63,r[i++]=128|l>>6&63,r[i++]=128|63&l}else{if(a<=i+5)break;r[i++]=252|l>>30,r[i++]=128|l>>24&63,r[i++]=128|l>>18&63,r[i++]=128|l>>12&63,r[i++]=128|l>>6&63,r[i++]=128|63&l}}return r[i]=0,i-t}function stringToUTF8(e,r,i){return stringToUTF8Array(e,HEAPU8,r,i)}function lengthBytesUTF8(e){for(var r=0,i=0;i<e.length;++i){var n=e.charCodeAt(i);55296<=n&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++i)),n<=127?++r:r+=n<=2047?2:n<=65535?3:n<=2097151?4:n<=67108863?5:6}return r}Module.UTF8ArrayToString=UTF8ArrayToString,Module.UTF8ToString=UTF8ToString,Module.stringToUTF8Array=stringToUTF8Array,Module.stringToUTF8=stringToUTF8,Module.lengthBytesUTF8=lengthBytesUTF8;var UTF16Decoder="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;function demangle(e){var r=Module.___cxa_demangle||Module.__cxa_demangle;if(r){try{var i=e.substr(1),n=lengthBytesUTF8(i)+1,t=_malloc(n);stringToUTF8(i,t,n);var a=_malloc(4),o=r(t,0,0,a);if(0===getValue(a,"i32")&&o)return Pointer_stringify(o)}catch(e){}finally{t&&_free(t),a&&_free(a),o&&_free(o)}return e}return Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function demangleAll(e){return e.replace(/__Z[\w\d_]+/g,function(e){var r=demangle(e);return e===r?e:e+" ["+r+"]"})}function jsStackTrace(){var r=new Error;if(!r.stack){try{throw new Error(0)}catch(e){r=e}if(!r.stack)return"(no stack trace available)"}return r.stack.toString()}function stackTrace(){var e=jsStackTrace();return Module.extraStackTrace&&(e+="\n"+Module.extraStackTrace()),demangleAll(e)}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)}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()}Module.stackTrace=stackTrace,STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||16777216;function getTotalMemory(){return TOTAL_MEMORY}if(TOTAL_MEMORY<TOTAL_STACK&&Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")"),buffer=Module.buffer?Module.buffer:new ArrayBuffer(TOTAL_MEMORY),updateGlobalBufferViews(),HEAP32[0]=1668509029,HEAP16[1]=25459,115!==HEAPU8[2]||99!==HEAPU8[3])throw"Runtime error: expected the system to be little-endian!";function callRuntimeCallbacks(e){for(;0<e.length;){var r=e.shift();if("function"!=typeof r){var i=r.func;"number"==typeof i?void 0===r.arg?Module.dynCall_v(i):Module.dynCall_vi(i,r.arg):i(void 0===r.arg?null:r.arg)}else r()}}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;var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnInit(e){__ATINIT__.unshift(e)}function addOnPreMain(e){__ATMAIN__.unshift(e)}function addOnExit(e){__ATEXIT__.unshift(e)}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}function intArrayFromString(e,r,i){var n=0<i?i:lengthBytesUTF8(e)+1,t=new Array(n),a=stringToUTF8Array(e,t,0,t.length);return r&&(t.length=a),t}function intArrayToString(e){for(var r=[],i=0;i<e.length;i++){var n=e[i];255<n&&(n&=255),r.push(String.fromCharCode(n))}return r.join("")}function writeStringToMemory(e,r,i){var n,t;Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!"),i&&(t=r+lengthBytesUTF8(e),n=HEAP8[t]),stringToUTF8(e,r,1/0),i&&(HEAP8[t]=n)}function writeArrayToMemory(e,r){HEAP8.set(e,r)}function writeAsciiToMemory(e,r,i){for(var n=0;n<e.length;++n)HEAP8[r++>>0]=e.charCodeAt(n);i||(HEAP8[r>>0]=0)}Module.addOnPreRun=addOnPreRun,Module.addOnInit=addOnInit,Module.addOnPreMain=addOnPreMain,Module.addOnExit=addOnExit,Module.addOnPostRun=addOnPostRun,Module.intArrayFromString=intArrayFromString,Module.intArrayToString=intArrayToString,Module.writeStringToMemory=writeStringToMemory,Module.writeArrayToMemory=writeArrayToMemory,Module.writeAsciiToMemory=writeAsciiToMemory,Math.imul&&-5===Math.imul(4294967295,5)||(Math.imul=function(e,r){var i=65535&e,n=65535&r;return i*n+((e>>>16)*n+i*(r>>>16)<<16)|0}),Math.imul=Math.imul,Math.clz32||(Math.clz32=function(e){e>>>=0;for(var r=0;r<32;r++)if(e&1<<31-r)return r;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_round=Math.round,Math_min=Math.min,Math_clz32=Math.clz32,Math_trunc=Math.trunc,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function addRunDependency(e){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}function removeRunDependency(e){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),0==runDependencies&&(null!==runDependencyWatcher&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var r=dependenciesFulfilled;dependenciesFulfilled=null,r()}}Module.addRunDependency=addRunDependency,Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={};var ASM_CONSTS=[];STATIC_BASE=8,STATICTOP=STATIC_BASE+5408,__ATINIT__.push(),allocate([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,28,17,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,82,26,28,19,153,27,59,26,115,26,41,13,222,29,23,15,140,30,98,28,156,19,10,17,114,32,101,39,94,39,47,46,67,46,165,24,1,37,99,37,127,42,157,29,244,31,59,29,122,1,40,4,237,1,70,2,176,2,81,2,218,1,185,2,219,1,176,2,165,1,199,1,43,2,249,1,55,2,12,2,73,2,207,4,253,1,60,3,236,1,4,6,55,4,82,3,8,0,4,0,3,0,14,0,7,0,5,0,24,0,21,0,24,0,57,0,48,0,57,0,37,0,32,0,37,0,100,0,80,0,100,0,6,0,3,0,2,0,9,0,5,0,3,0,82,0,78,0,82,0,29,1,4,1,29,1,94,0,94,0,94,0,76,4,26,4,76,4,34,0,62,0,72,0,66,0,53,0,25,0,94,0,66,0,56,0,62,0,75,0,103,0,48,0,82,0,45,0,87,0,50,0,47,0,80,0,46,0,83,0,41,0,78,0,81,0,6,0,8,0,10,0,12,0,14,0,16,0,128,2,0,3,32,2,32,2,64,2,64,2,64,2,64,2,128,44,128,44,0,45,0,45,0,45,0,45,0,36,128,35,0,35,128,34,0,34,128,33,0,0,201,0,146,1,91,2,36,3,237,3,182,4,126,5,71,6,16,7,217,7,161,8,106,9,50,10,251,10,195,11,139,12,83,13,27,14,227,14,171,15,114,16,57,17,0,18,199,18,142,19,85,20,27,21,225,21,167,22,109,23,51,24,248,24,189,25,130,26,70,27,11,28,207,28,147,29,86,30,25,31,220,31,159,32,97,33,35,34,228,34,166,35,103,36,39,37,231,37,167,38,103,39,38,40,229,40,163,41,97,42,30,43,219,43,152,44,84,45,16,46,204,46,134,47,65,48,251,48,180,49,109,50,38,51,222,51,150,52,77,53,3,54,185,54,111,55,36,56,216,56,140,57,63,58,242,58,164,59,86,60,7,61,183,61,103,62,22,63,197,63,115,64,32,65,205,65,121,66,37,67,208,67,122,68,35,69,204,69,116,70,28,71,195,71,105,72,14,73,179,73,87,74,250,74,157,75,63,76,224,76,128,77,32,78,191,78,93,79,250,79,151,80,51,81,206,81,104,82,1,83,154,83,50,84,201,84,95,85,244,85,137,86,29,87,176,87,66,88,211,88,99,89,243,89,129,90,15,91,156,91,40,92,179,92,61,93,198,93,79,94,214,94,93,95,226,95,103,96,235,96,110,97,240,97,113,98,241,98,112,99,238,99,107,100,231,100,98,101,221,101,86,102,206,102,69,103,188,103,49,104,165,104,25,105,139,105,252,105,108,106,219,106,74,107,183,107,35,108,142,108,248,108,97,109,201,109,48,110,149,110,250,110,94,111,192,111,34,112,130,112,225,112,64,113,157,113,249,113,84,114,174,114,6,115,94,115,181,115,10,116,94,116,177,116,3,117,84,117,164,117,243,117,64,118,141,118,216,118,34,119,107,119,179,119,249,119,63,120,131,120,198,120,8,121,73,121,137,121,199,121,4,122,65,122,124,122,181,122,238,122,37,123,92,123,145,123,196,123,247,123,41,124,89,124,136,124,182,124,226,124,14,125,56,125,97,125,137,125,176,125,213,125,249,125,28,126,62,126,94,126,126,126,156,126,185,126,212,126,239,126,8,127,32,127,55,127,76,127,97,127,116,127,134,127,150,127,166,127,180,127,193,127,205,127,215,127,224,127,232,127,239,127,245,127,249,127,252,127,254,127,255,127,254,127,252,127,249,127,245,127,239,127,232,127,224,127,215,127,205,127,193,127,180,127,166,127,150,127,134,127,116,127,97,127,76,127,55,127,32,127,8,127,239,126,212,126,185,126,156,126,126,126,94,126,62,126,28,126,249,125,213,125,176,125,137,125,97,125,56,125,14,125,226,124,182,124,136,124,89,124,41,124,247,123,196,123,145,123,92,123,37,123,238,122,181,122,124,122,65,122,4,122,199,121,137,121,73,121,8,121,198,120,131,120,63,120,249,119,179,119,107,119,34,119,216,118,141,118,64,118,243,117,164,117,84,117,3,117,177,116,94,116,10,116,181,115,94,115,6,115,174,114,84,114,249,113,157,113,64,113,225,112,130,112,34,112,192,111,94,111,250,110,149,110,48,110,201,109,97,109,248,108,142,108,35,108,183,107,74,107,219,106,108,106,252,105,139,105,25,105,165,104,49,104,188,103,69,103,206,102,86,102,221,101,98,101,231,100,107,100,238,99,112,99,241,98,113,98,240,97,110,97,235,96,103,96,226,95,93,95,214,94,79,94,198,93,61,93,179,92,40,92,156,91,15,91,129,90,243,89,99,89,211,88,66,88,176,87,29,87,137,86,244,85,95,85,201,84,50,84,154,83,1,83,104,82,206,81,51,81,151,80,250,79,93,79,191,78,32,78,128,77,224,76,63,76,157,75,250,74,87,74,179,73,14,73,105,72,195,71,28,71,116,70,204,69,35,69,122,68,208,67,37,67,121,66,205,65,32,65,115,64,197,63,22,63,103,62,183,61,7,61,86,60,164,59,242,58,63,58,140,57,216,56,36,56,111,55,185,54,3,54,77,53,150,52,222,51,38,51,109,50,180,49,251,48,65,48,134,47,204,46,16,46,84,45,152,44,219,43,30,43,97,42,163,41,229,40,38,40,103,39,167,38,231,37,39,37,103,36,166,35,228,34,35,34,97,33,159,32,220,31,25,31,86,30,147,29,207,28,11,28,70,27,130,26,189,25,248,24,51,24,109,23,167,22,225,21,27,21,85,20,142,19,199,18,0,18,57,17,114,16,171,15,227,14,27,14,83,13,139,12,195,11,251,10,50,10,106,9,161,8,217,7,16,7,71,6,126,5,182,4,237,3,36,3,91,2,146,1,201,0,0,0,55,255,110,254,165,253,220,252,19,252,74,251,130,250,185,249,240,248,39,248,95,247,150,246,206,245,5,245,61,244,117,243,173,242,229,241,29,241,85,240,142,239,199,238,0,238,57,237,114,236,171,235,229,234,31,234,89,233,147,232,205,231,8,231,67,230,126,229,186,228,245,227,49,227,109,226,170,225,231,224,36,224,97,223,159,222,221,221,28,221,90,220,153,219,217,218,25,218,89,217,153,216,218,215,27,215,93,214,159,213,226,212,37,212,104,211,172,210,240,209,52,209,122,208,191,207,5,207,76,206,147,205,218,204,34,204,106,203,179,202,253,201,71,201,145,200,220,199,40,199,116,198,193,197,14,197,92,196,170,195,249,194,73,194,153,193,234,192,59,192,141,191,224,190,51,190,135,189,219,188,48,188,134,187,221,186,52,186,140,185,228,184,61,184,151,183,242,182,77,182,169,181,6,181,99,180,193,179,32,179,128,178,224,177,65,177,163,176,6,176,105,175,205,174,50,174,152,173,255,172,102,172,206,171,55,171,161,170,12,170,119,169,227,168,80,168,190,167,45,167,157,166,13,166,127,165,241,164,100,164,216,163,77,163,195,162,58,162,177,161,42,161,163,160,30,160,153,159,21,159,146,158,16,158,143,157,15,157,144,156,18,156,149,155,25,155,158,154,35,154,170,153,50,153,187,152,68,152,207,151,91,151,231,150,117,150,4,150,148,149,37,149,182,148,73,148,221,147,114,147,8,147,159,146,55,146,208,145,107,145,6,145,162,144,64,144,222,143,126,143,31,143,192,142,99,142,7,142,172,141,82,141,250,140,162,140,75,140,246,139,162,139,79,139,253,138,172,138,92,138,13,138,192,137,115,137,40,137,222,136,149,136,77,136,7,136,193,135,125,135,58,135,248,134,183,134,119,134,57,134,252,133,191,133,132,133,75,133,18,133,219,132,164,132,111,132,60,132,9,132,215,131,167,131,120,131,74,131,30,131,242,130,200,130,159,130,119,130,80,130,43,130,7,130,228,129,194,129,162,129,130,129,100,129,71,129,44,129,17,129,248,128,224,128,201,128,180,128,159,128,140,128,122,128,106,128,90,128,76,128,63,128,51,128,41,128,32,128,24,128,17,128,11,128,7,128,4,128,2,128,1,128,2,128,4,128,7,128,11,128,17,128,24,128,32,128,41,128,51,128,63,128,76,128,90,128,106,128,122,128,140,128,159,128,180,128,201,128,224,128,248,128,17,129,44,129,71,129,100,129,130,129,162,129,194,129,228,129,7,130,43,130,80,130,119,130,159,130,200,130,242,130,30,131,74,131,120,131,167,131,215,131,9,132,60,132,111,132,164,132,219,132,18,133,75,133,132,133,191,133,252,133,57,134,119,134,183,134,248,134,58,135,125,135,193,135,7,136,77,136,149,136,222,136,40,137,115,137,192,137,13,138,92,138,172,138,253,138,79,139,162,139,246,139,75,140,162,140,250,140,82,141,172,141,7,142,99,142,192,142,31,143,126,143,222,143,64,144,162,144,6,145,107,145,208,145,55,146,159,146,8,147,114,147,221,147,73,148,182,148,37,149,148,149,4,150,117,150,231,150,91,151,207,151,68,152,187,152,50,153,170,153,35,154,158,154,25,155,149,155,18,156,144,156,15,157,143,157,16,158,146,158,21,159,153,159,30,160,163,160,42,161,177,161,58,162,195,162,77,163,216,163,100,164,241,164,127,165,13,166,157,166,45,167,190,167,80,168,227,168,119,169,12,170,161,170,55,171,206,171,102,172,255,172,152,173,50,174,205,174,105,175,6,176,163,176,65,177,224,177,128,178,32,179,193,179,99,180,6,181,169,181,77,182,242,182,151,183,61,184,228,184,140,185,52,186,221,186,134,187,48,188,219,188,135,189,51,190,224,190,141,191,59,192,234,192,153,193,73,194,249,194,170,195,92,196,14,197,193,197,116,198,40,199,220,199,145,200,71,201,253,201,179,202,106,203,34,204,218,204,147,205,76,206,5,207,191,207,122,208,52,209,240,209,172,210,104,211,37,212,226,212,159,213,93,214,27,215,218,215,153,216,89,217,25,218,217,218,153,219,90,220,28,221,221,221,159,222,97,223,36,224,231,224,170,225,109,226,49,227,245,227,186,228,126,229,67,230,8,231,205,231,147,232,89,233,31,234,229,234,171,235,114,236,57,237,0,238,199,238,142,239,85,240,29,241,229,241,173,242,117,243,61,244,5,245,206,245,150,246,95,247,39,248,240,248,185,249,130,250,74,251,19,252,220,252,165,253,110,254,55,255,1,0,128,0,2,0,64,0,3,0,192,0,4,0,32,0,5,0,160,0,6,0,96,0,7,0,224,0,8,0,16,0,9,0,144,0,10,0,80,0,11,0,208,0,12,0,48,0,13,0,176,0,14,0,112,0,15,0,240,0,17,0,136,0,18,0,72,0,19,0,200,0,20,0,40,0,21,0,168,0,22,0,104,0,23,0,232,0,25,0,152,0,26,0,88,0,27,0,216,0,28,0,56,0,29,0,184,0,30,0,120,0,31,0,248,0,33,0,132,0,34,0,68,0,35,0,196,0,37,0,164,0,38,0,100,0,39,0,228,0,41,0,148,0,42,0,84,0,43,0,212,0,44,0,52,0,45,0,180,0,46,0,116,0,47,0,244,0,49,0,140,0,50,0,76,0,51,0,204,0,53,0,172,0,54,0,108,0,55,0,236,0,57,0,156,0,58,0,92,0,59,0,220,0,61,0,188,0,62,0,124,0,63,0,252,0,65,0,130,0,67,0,194,0,69,0,162,0,70,0,98,0,71,0,226,0,73,0,146,0,74,0,82,0,75,0,210,0,77,0,178,0,78,0,114,0,79,0,242,0,81,0,138,0,83,0,202,0,85,0,170,0,86,0,106,0,87,0,234,0,89,0,154,0,91,0,218,0,93,0,186,0,94,0,122,0,95,0,250,0,97,0,134,0,99,0,198,0,101,0,166,0,103,0,230,0,105,0,150,0,107,0,214,0,109,0,182,0,110,0,118,0,111,0,246,0,113,0,142,0,115,0,206,0,117,0,174,0,119,0,238,0,121,0,158,0,123,0,222,0,125,0,190,0,127,0,254,0,131,0,193,0,133,0,161,0,135,0,225,0,137,0,145,0,139,0,209,0,141,0,177,0,143,0,241,0,147,0,201,0,149,0,169,0,151,0,233,0,155,0,217,0,157,0,185,0,159,0,249,0,163,0,197,0,167,0,229,0,171,0,213,0,173,0,181,0,175,0,245,0,179,0,205,0,183,0,237,0,187,0,221,0,191,0,253,0,199,0,227,0,203,0,211,0,207,0,243,0,215,0,235,0,223,0,251,0,239,0,247,0,1,0,64,0,2,0,32,0,3,0,96,0,4,0,16,0,5,0,80,0,6,0,48,0,7,0,112,0,9,0,72,0,10,0,40,0,11,0,104,0,12,0,24,0,13,0,88,0,14,0,56,0,15,0,120,0,17,0,68,0,18,0,36,0,19,0,100,0,21,0,84,0,22,0,52,0,23,0,116,0,25,0,76,0,26,0,44,0,27,0,108,0,29,0,92,0,30,0,60,0,31,0,124,0,33,0,66,0,35,0,98,0,37,0,82,0,38,0,50,0,39,0,114,0,41,0,74,0,43,0,106,0,45,0,90,0,46,0,58,0,47,0,122,0,49,0,70,0,51,0,102,0,53,0,86,0,55,0,118,0,57,0,78,0,59,0,110,0,61,0,94,0,63,0,126,0,67,0,97,0,69,0,81,0,71,0,113,0,75,0,105,0,77,0,89,0,79,0,121,0,83,0,101,0,87,0,117,0,91,0,109,0,95,0,125,0,103,0,115,0,111,0,123,0,100,97,116,97,91,48,93,32,61,61,32,118,97,108,48,0,109,97,105,110,46,99,0,112,114,111,99,101,115,115,95,100,97,116,97,0,100,97,116,97,91,49,48,48,93,32,61,61,32,118,97,108,49,48,48,0,100,97,116,97,91,50,48,48,48,93,32,61,61,32,118,97,108,50,48,48,48,0,112,114,111,99,101,115,115,95,100,97,116,97,58,32,100,97,116,97,32,61,61,32,78,85,76,76,32,0,100,97,116,97,95,108,101,110,103,116,104,32,62,61,32,48,0,119,101,98,114,116,99,47,99,111,109,109,111,110,95,97,117,100,105,111,47,118,97,100,47,118,97,100,95,102,105,108,116,101,114,98,97,110,107,46,99,0,87,101,98,82,116,99,86,97,100,95,67,97,108,99,117,108,97,116,101,70,101,97,116,117,114,101,115,0,100,97,116,97,95,108,101,110,103,116,104,32,60,61,32,50,52,48,0,100,97,116,97,95,105,110,32,33,61,32,78,85,76,76,0,76,111,103,79,102,69,110,101,114,103,121,0,100,97,116,97,95,108,101,110,103,116,104,32,62,32,48,0,99,104,97,110,110,101,108,32,60,32,107,78,117,109,67,104,97,110,110,101,108,115,0,119,101,98,114,116,99,47,99,111,109,109,111,110,95,97,117,100,105,111,47,118,97,100,47,118,97,100,95,115,112,46,99,0,87,101,98,82,116,99,86,97,100,95,70,105,110,100,77,105,110,105,109,117,109,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;function ___assert_fail(e,r,i,n){throw ABORT=!0,"Assertion failed: "+Pointer_stringify(e)+", at: "+[r?Pointer_stringify(r):"unknown filename",i,n?Pointer_stringify(n):"unknown function"]+" at "+stackTrace()}function ___setErrNo(e){return Module.___errno_location&&(HEAP32[Module.___errno_location()>>2]=e),e}function ___lock(){}function _emscripten_memcpy_big(e,r,i){return HEAPU8.set(HEAPU8.subarray(r,r+i),e),e}function _abort(){Module.abort()}function _pthread_once(e,r){_pthread_once.seen||(_pthread_once.seen={}),e in _pthread_once.seen||(Module.dynCall_v(r),_pthread_once.seen[e]=1)}STATICTOP+=16,Module._sbrk=_sbrk,Module._memset=_memset,Module._memcpy=_memcpy;var SYSCALLS={varargs:0,get:function(e){return SYSCALLS.varargs+=4,HEAP32[SYSCALLS.varargs-4>>2]},getStr:function(){return Pointer_stringify(SYSCALLS.get())},get64:function(){var e=SYSCALLS.get(),r=SYSCALLS.get();return assert(0<=e?0===r:-1===r),e},getZero:function(){assert(0===SYSCALLS.get())}};function ___syscall140(e,r){SYSCALLS.varargs=r;try{var i=SYSCALLS.getStreamFromFD(),n=SYSCALLS.get(),t=SYSCALLS.get(),a=SYSCALLS.get(),o=SYSCALLS.get(),l=t;return assert(0===n),FS.llseek(i,l,o),HEAP32[a>>2]=i.position,i.getdents&&0===l&&0===o&&(i.getdents=null),0}catch(e){return"undefined"!=typeof FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall146(e,r){SYSCALLS.varargs=r;try{var i=SYSCALLS.get(),n=SYSCALLS.get(),t=SYSCALLS.get(),a=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(e,r){var i=___syscall146.buffers[e];assert(i),0===r||10===r?((1===e?Module.print:Module.printErr)(UTF8ArrayToString(i,0)),i.length=0):i.push(r)});for(var o=0;o<t;o++){for(var l=HEAP32[n+8*o>>2],u=HEAP32[n+(8*o+4)>>2],s=0;s<u;s++)___syscall146.printChar(i,HEAPU8[l+s]);a+=u}return a}catch(e){return"undefined"!=typeof FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall54(e,r){SYSCALLS.varargs=r;try{return 0}catch(e){return"undefined"!=typeof FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___unlock(){}function ___syscall6(e,r){SYSCALLS.varargs=r;try{var i=SYSCALLS.getStreamFromFD();return FS.close(i),0}catch(e){return"undefined"!=typeof FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function invoke_iiiiiiii(e,r,i,n,t,a,o,l){try{return Module.dynCall_iiiiiiii(e,r,i,n,t,a,o,l)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_iiii(e,r,i,n){try{return Module.dynCall_iiii(e,r,i,n)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_vi(e,r){try{Module.dynCall_vi(e,r)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_ii(e,r){try{return Module.dynCall_ii(e,r)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viiiiiii(e,r,i,n,t,a,o,l){try{Module.dynCall_viiiiiii(e,r,i,n,t,a,o,l)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_v(e){try{Module.dynCall_v(e)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_iiiiiiiii(e,r,i,n,t,a,o,l,u){try{return Module.dynCall_iiiiiiiii(e,r,i,n,t,a,o,l,u)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_iii(e,r,i){try{return Module.dynCall_iii(e,r,i)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}__ATEXIT__.push(function(){var e=Module._fflush;e&&e(0);var r=___syscall146.printChar;if(r){var i=___syscall146.buffers;i[1].length&&r(1,10),i[2].length&&r(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=!0,Module.asmGlobalArg={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array,NaN:NaN,Infinity:1/0},Module.asmLibraryArg={abort:abort,assert:assert,enlargeMemory:enlargeMemory,getTotalMemory:getTotalMemory,abortOnCannotGrowMemory:abortOnCannotGrowMemory,invoke_iiiiiiii:invoke_iiiiiiii,invoke_iiii:invoke_iiii,invoke_vi:invoke_vi,invoke_ii:invoke_ii,invoke_viiiiiii:invoke_viiiiiii,invoke_v:invoke_v,invoke_iiiiiiiii:invoke_iiiiiiiii,invoke_iii:invoke_iii,___lock:___lock,___syscall6:___syscall6,_pthread_once:_pthread_once,_abort:_abort,___syscall140:___syscall140,___setErrNo:___setErrNo,_emscripten_memcpy_big:_emscripten_memcpy_big,___syscall54:___syscall54,___unlock:___unlock,___assert_fail:___assert_fail,___syscall146:___syscall146,DYNAMICTOP_PTR:DYNAMICTOP_PTR,tempDoublePtr:tempDoublePtr,ABORT:ABORT,STACKTOP:STACKTOP,STACK_MAX:STACK_MAX};var asm=function(e,r,i){"use asm";var M=new e.Int8Array(i);var Q=new e.Int16Array(i);var Ee=new e.Int32Array(i);var c=new e.Uint8Array(i);var $=new e.Uint16Array(i);var n=new e.Uint32Array(i);var t=new e.Float32Array(i);var a=new e.Float64Array(i);var o=r.DYNAMICTOP_PTR|0;var l=r.tempDoublePtr|0;var u=r.ABORT|0;var ke=r.STACKTOP|0;var s=r.STACK_MAX|0;var f=0;var d=0;var _=0;var h=0;var m=e.NaN,T=e.Infinity;var v=0,p=0,A=0,S=0,b=0.0,y=0,g=0,E=0,k=0.0;var w=0;var R=e.Math.floor;var C=e.Math.abs;var O=e.Math.sqrt;var P=e.Math.pow;var N=e.Math.cos;var I=e.Math.sin;var L=e.Math.tan;var U=e.Math.acos;var D=e.Math.asin;var F=e.Math.atan;var H=e.Math.atan2;var x=e.Math.exp;var Y=e.Math.log;var V=e.Math.ceil;var ee=e.Math.imul;var B=e.Math.min;var K=e.Math.max;var W=e.Math.clz32;var z=r.abort;var G=r.assert;var j=r.enlargeMemory;var J=r.getTotalMemory;var X=r.abortOnCannotGrowMemory;var q=r.invoke_iiiiiiii;var Z=r.invoke_iiii;var re=r.invoke_vi;var ie=r.invoke_ii;var ne=r.invoke_viiiiiii;var te=r.invoke_v;var ae=r.invoke_iiiiiiiii;var oe=r.invoke_iii;var le=r.___lock;var ue=r.___syscall6;var se=r._pthread_once;var we=r._abort;var fe=r.___syscall140;var ce=r.___setErrNo;var de=r._emscripten_memcpy_big;var _e=r.___syscall54;var Me=r.___unlock;var he=r.___assert_fail;var me=r.___syscall146;var Te=0.0;function ve(e){e=e|0;var r=0;r=ke;ke=ke+e|0;ke=ke+15&-16;return r|0}function pe(){return ke|0}function Ae(e){e=e|0;ke=e}function Se(e,r){e=e|0;r=r|0;ke=e;s=r}function be(e,r){e=e|0;r=r|0;if(!f){f=e;d=r}}function ye(e){e=e|0;w=e}function ge(){return w|0}function Re(){var e=0;if((Pe(3740)|0)==-1){e=0;return e|0}e=(Ne(Ee[935]|0)|0)!=-1&1;return e|0}function Ce(e){e=e|0;return Ie(Ee[935]|0,e)|0}function Oe(e,r,i,n,t,a){e=e|0;r=r|0;i=i|0;n=n|0;t=t|0;a=a|0;if(!e)Br(3482)|0;if((Q[e>>1]|0)!=(n|0))he(3404,3420,30,3427);if((Q[e+200>>1]|0)!=(t|0))he(3440,3420,31,3427);if((Q[e+4e3>>1]|0)==(a|0))return Le(Ee[935]|0,i,e,r)|0;else he(3460,3420,32,3427);return 0}function Pe(e){e=e|0;var r=0,i=0;if(!e){r=-1;return r|0}i=Kr(736)|0;Ee[e>>2]=i;if(!i){r=-1;return r|0}je();Ee[i+732>>2]=0;r=0;return r|0}function Ne(e){e=e|0;return Ue(e)|0}function Ie(e,r){e=e|0;r=r|0;var i=0;if((e|0)!=0?(Ee[e+732>>2]|0)==42:0)i=De(e,r)|0;else i=-1;return i|0}function Le(e,r,i,n){e=e|0;r=r|0;i=i|0;n=n|0;var t=0,a=0,o=0;if(!e){t=-1;return t|0}if((i|0)==0?1:(Ee[e+732>>2]|0)!=42){t=-1;return t|0}e:do{if((r|0)>=32e3)if((r|0)<48e3)switch(r|0){case 32e3:{a=32;break e;break}default:{t=-1;return t|0}}else switch(r|0){case 48e3:{a=48;break e;break}default:{t=-1;return t|0}}else{if((r|0)<16e3){switch(r|0){case 8e3:{a=8;break e;break}default:t=-1}return t|0}switch(r|0){case 16e3:{a=16;break e;break}default:{t=-1;return t|0}}}}while(0);if(!((a*30|0)==(n|0)|((a*10|0)==(n|0)|(a*20|0)==(n|0)))){t=-1;return t|0}e:do{if((r|0)<32e3)if((r|0)<16e3){switch(r|0){case 8e3:break;default:{o=-1;break e}}o=He(e,i,n)|0;break}else{switch(r|0){case 16e3:break;default:{o=-1;break e}}o=Ye(e,i,n)|0;break}else if((r|0)<48e3){switch(r|0){case 32e3:break;default:{o=-1;break e}}o=xe(e,i,n)|0;break}else{switch(r|0){case 48e3:break;default:{o=-1;break e}}o=Fe(e,i,n)|0;break}}while(0);t=(o|0)<1?o:1;return t|0}function Ue(e){e=e|0;var r=0,i=0,n=0;if(!e){r=-1;return r|0}Ee[e>>2]=1;i=e+4|0;Ee[i>>2]=0;Ee[i+4>>2]=0;Ee[i+8>>2]=0;Ee[i+12>>2]=0;i=e+276|0;Ee[i>>2]=0;Ee[i+4>>2]=0;Ze(e+20|0);i=0;do{Q[e+180+(i<<1)>>1]=Q[384+(i<<1)>>1]|0;Q[e+204+(i<<1)>>1]=Q[408+(i<<1)>>1]|0;Q[e+228+(i<<1)>>1]=Q[432+(i<<1)>>1]|0;Q[e+252+(i<<1)>>1]=Q[456+(i<<1)>>1]|0;i=i+1|0}while((i|0)!=12);n=0;do{Q[e+476+(n<<1)>>1]=1e4;Q[e+284+(n<<1)>>1]=0;n=n+1|0}while((n|0)!=96);n=e+680|0;Ee[n>>2]=0;Ee[n+4>>2]=0;Ee[n+8>>2]=0;Ee[n+12>>2]=0;Ee[n+16>>2]=0;Ee[n+20>>2]=0;Ee[n+24>>2]=0;Q[e+668>>1]=1600;Q[e+670>>1]=1600;Q[e+672>>1]=1600;Q[e+674>>1]=1600;Q[e+676>>1]=1600;Q[e+678>>1]=1600;n=e+708|0;Q[n>>1]=Q[240]|0;Q[n+2>>1]=Q[241]|0;Q[n+4>>1]=Q[242]|0;n=e+714|0;Q[n>>1]=Q[243]|0;Q[n+2>>1]=Q[244]|0;Q[n+4>>1]=Q[245]|0;n=e+720|0;Q[n>>1]=Q[246]|0;Q[n+2>>1]=Q[247]|0;Q[n+4>>1]=Q[248]|0;n=e+726|0;Q[n>>1]=Q[249]|0;Q[n+2>>1]=Q[250]|0;Q[n+4>>1]=Q[251]|0;Ee[e+732>>2]=42;r=0;return r|0}function De(e,r){e=e|0;r=r|0;var i=0;switch(r|0){case 0:{r=e+708|0;Q[r>>1]=Q[240]|0;Q[r+2>>1]=Q[241]|0;Q[r+4>>1]=Q[242]|0;r=e+714|0;Q[r>>1]=Q[243]|0;Q[r+2>>1]=Q[244]|0;Q[r+4>>1]=Q[245]|0;r=e+720|0;Q[r>>1]=Q[246]|0;Q[r+2>>1]=Q[247]|0;Q[r+4>>1]=Q[248]|0;r=e+726|0;Q[r>>1]=Q[249]|0;Q[r+2>>1]=Q[250]|0;Q[r+4>>1]=Q[251]|0;i=0;return i|0}case 1:{r=e+708|0;Q[r>>1]=Q[240]|0;Q[r+2>>1]=Q[241]|0;Q[r+4>>1]=Q[242]|0;r=e+714|0;Q[r>>1]=Q[243]|0;Q[r+2>>1]=Q[244]|0;Q[r+4>>1]=Q[245]|0;r=e+720|0;Q[r>>1]=Q[252]|0;Q[r+2>>1]=Q[253]|0;Q[r+4>>1]=Q[254]|0;r=e+726|0;Q[r>>1]=Q[255]|0;Q[r+2>>1]=Q[256]|0;Q[r+4>>1]=Q[257]|0;i=0;return i|0}case 2:{r=e+708|0;Q[r>>1]=Q[258]|0;Q[r+2>>1]=Q[259]|0;Q[r+4>>1]=Q[260]|0;r=e+714|0;Q[r>>1]=Q[261]|0;Q[r+2>>1]=Q[262]|0;Q[r+4>>1]=Q[263]|0;r=e+720|0;Q[r>>1]=Q[264]|0;Q[r+2>>1]=Q[265]|0;Q[r+4>>1]=Q[266]|0;r=e+726|0;Q[r>>1]=Q[267]|0;Q[r+2>>1]=Q[268]|0;Q[r+4>>1]=Q[269]|0;i=0;return i|0}case 3:{r=e+708|0;Q[r>>1]=Q[258]|0;Q[r+2>>1]=Q[259]|0;Q[r+4>>1]=Q[260]|0;r=e+714|0;Q[r>>1]=Q[261]|0;Q[r+2>>1]=Q[262]|0;Q[r+4>>1]=Q[263]|0;r=e+720|0;Q[r>>1]=Q[270]|0;Q[r+2>>1]=Q[271]|0;Q[r+4>>1]=Q[272]|0;r=e+726|0;Q[r>>1]=Q[273]|0;Q[r+2>>1]=Q[274]|0;Q[r+4>>1]=Q[275]|0;i=0;return i|0}default:{i=-1;return i|0}}return 0}function Fe(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,t=0,a=0,o=0,l=0,u=0;n=ke;ke=ke+3424|0;t=n+2944|0;a=n;jr(a|0,0,2944)|0;o=(i|0)/480|0;if((i|0)>479){l=e+20|0;u=0;do{qe(r,t+(u*80<<1)|0,l,a);u=u+1|0}while((u|0)<(o|0))}o=He(e,t,(i|0)/6|0)|0;ke=n;return o|0}function He(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,t=0,a=0,o=0,l=0,u=0,s=0,f=0,c=0,d=0,_=0,M=0,h=0,m=0,T=0,v=0,p=0,A=0,S=0,b=0,y=0,g=0,E=0,k=0,w=0,R=0,C=0,O=0,P=0,N=0,I=0,L=0,U=0,D=0,F=0,H=0,x=0,Y=0,V=0,B=0,K=0,W=0,z=0,G=0,j=0,J=0,X=0,q=0,Z=0;n=ke;ke=ke+112|0;t=n+88|0;a=n+64|0;o=n+40|0;l=n+16|0;u=n;s=Ve(e,r,i,u)|0;r=o;f=r+24|0;do{Q[r>>1]=0;r=r+2|0}while((r|0)<(f|0));r=l;f=r+24|0;do{Q[r>>1]=0;r=r+2|0}while((r|0)<(f|0));r=(i|0)==80?0:(i|0)==160?1:2;i=Q[e+726+(r<<1)>>1]|0;f=Q[e+714+(r<<1)>>1]|0;c=Q[e+708+(r<<1)>>1]|0;if(s<<16>>16>10){s=Q[e+720+(r<<1)>>1]|0;r=0;d=0;_=0;do{M=u+(d<<1)|0;h=We(Q[M>>1]|0,Q[e+180+(d<<1)>>1]|0,Q[e+228+(d<<1)>>1]|0,t+(d<<1)|0)|0;m=ee(Q[552+(d<<1)>>1]|0,h)|0;h=We(Q[M>>1]|0,Q[e+204+(d<<1)>>1]|0,Q[e+252+(d<<1)>>1]|0,a+(d<<1)|0)|0;T=ee(Q[576+(d<<1)>>1]|0,h)|0;h=d+6|0;v=We(Q[M>>1]|0,Q[e+180+(h<<1)>>1]|0,Q[e+228+(h<<1)>>1]|0,t+(h<<1)|0)|0;p=(ee(Q[552+(h<<1)>>1]|0,v)|0)+m|0;v=We(Q[M>>1]|0,Q[e+204+(h<<1)>>1]|0,Q[e+252+(h<<1)>>1]|0,a+(h<<1)|0)|0;M=(ee(Q[576+(h<<1)>>1]|0,v)|0)+T|0;v=(p|0)==0;if(v)A=0;else{S=p>>31^p;b=S>>>0>32767?0:16;y=(-8388608>>>b&S|0)==0?b|8:b;b=(-134217728>>>y&S|0)==0?y|4:y;y=(-536870912>>>b&S|0)==0?b|2:b;A=((-1073741824>>>y&S|0)==0&1)+y|0}y=(M|0)==0;if(y)g=0;else{S=M>>31^M;b=S>>>0>32767?0:16;E=(-8388608>>>b&S|0)==0?b|8:b;b=(-134217728>>>E&S|0)==0?E|4:E;E=(-536870912>>>b&S|0)==0?b|2:b;g=((-1073741824>>>E&S|0)==0&1)+E|0}E=(v?31:A)-(y?31:g)<<16;r=(ee(E>>16,Q[600+(d<<1)>>1]|0)|0)+r|0;_=(E>>14|0)>(s|0)?1:_;E=p>>>12;if((E<<16|0)>0){p=Xe(m<<2&-16384,E&65535)|0;Q[o+(d<<1)>>1]=p;k=16384-p&65535;w=h}else{k=16384;w=d}Q[o+(w<<1)>>1]=k;p=M>>>12;if((p<<16|0)>0){M=Xe(T<<2&-16384,p&65535)|0;Q[l+(d<<1)>>1]=M;Q[l+(h<<1)>>1]=16384-M}d=d+1|0}while((d|0)!=6);d=(r|0)>=(i<<16>>16|0)|_&65535;_=d&65535;i=_<<16>>16!=0;r=12800;k=0;do{w=u+(k<<1)|0;s=Ge(e,Q[w>>1]|0,k)|0;g=e+180+(k<<1)|0;A=552+(k<<1)|0;M=Q[A>>1]|0;h=ee(M,Q[g>>1]|0)|0;p=g+12|0;T=Q[A+12>>1]|0;A=(((s<<16>>16<<4)-(((ee(T,Q[p>>1]|0)|0)+h|0)>>>6)<<16>>16)*19712|0)>>>16;h=72-k|0;s=(r&65535)+640|0;E=s&65535;m=s<<16>>16;s=0;do{y=(s*6|0)+k|0;v=e+180+(y<<1)|0;S=Q[v>>1]|0;b=e+204+(y<<1)|0;R=Q[b>>1]|0;C=e+228+(y<<1)|0;O=Q[C>>1]|0;P=e+252+(y<<1)|0;N=Q[P>>1]|0;if(i)I=S;else I=(((ee(Q[o+(y<<1)>>1]<<5,Q[t+(y<<1)>>1]|0)|0)>>16)*655>>22)+(S&65535)&65535;L=(I&65535)+A|0;U=(s<<7)+640|0;D=(L<<16|0)<(U<<16|0)?U:L;L=s+h|0;Q[v>>1]=(D<<16|0)>(L<<23|0)?L<<7:D;if(i){D=Q[l+(y<<1)>>1]|0;L=Q[a+(y<<1)>>1]|0;v=R<<16>>16;R=(((((ee(D<<5,L)|0)>>16)*6554>>21)+1|0)>>>1)+v|0;U=Q[612+(s<<1)>>1]|0;F=(R<<16>>16|0)<(U<<16>>16|0)?U:R&65535;Q[b>>1]=(F<<16>>16|0)>(m|0)?E:F;F=(ee(((ee(($[w>>1]|0)-((v+4|0)>>>3)<<16>>16,L)|0)>>3)+-4096|0,D>>2)|0)>>4;D=N<<16>>16;N=D*10&65535;if((F|0)>0)H=Xe(F,N)|0;else H=0-(Xe(0-F|0,N)|0)|0;x=((H<<16)+8388608>>24)+D|0;Y=P}else{P=((ee(($[w>>1]|0)-(S<<16>>16>>>3)<<16>>16,Q[t+(y<<1)>>1]|0)|0)>>3)+-4096|0;S=(ee(P,(Q[o+(y<<1)>>1]|0)+2>>2)|0)>>14;if((S|0)>0)V=Xe(S,O)|0;else V=0-(Xe(0-S|0,O)|0)|0;x=((V<<16)+2097152>>22)+(O&65535)|0;Y=C}Q[Y>>1]=(x<<16|0)<25165824?384:x&65535;s=s+1|0}while((s|0)!=2);s=Q[g>>1]|0;w=ee(s<<16>>16,M)|0;E=Q[p>>1]|0;m=(ee(E<<16>>16,T)|0)+w|0;w=e+204+(k<<1)|0;h=576+(k<<1)|0;A=Q[w>>1]|0;C=Q[h>>1]|0;O=ee(C,A<<16>>16)|0;S=w+12|0;y=Q[S>>1]|0;P=Q[h+12>>1]|0;h=(ee(P,y<<16>>16)|0)+O|0;O=(h>>>9)-(m>>>9)<<16>>16;D=Q[616+(k<<1)>>1]|0;if((D|0)>(O|0)){N=D-O<<16>>16;O=(N*13|0)>>>2&65535;D=O+(A&65535)|0;F=D&65535;Q[w>>1]=F;L=ee(D<<16>>16,C)|0;C=O+(y&65535)|0;O=C&65535;Q[S>>1]=O;S=(ee(C<<16>>16,P)|0)+L|0;L=0-((N*49152|0)>>>16)&65535;N=L+(s&65535)|0;P=N&65535;Q[g>>1]=P;C=ee(N<<16>>16,M)|0;N=L+(E&65535)|0;L=N&65535;Q[p>>1]=L;B=S;K=(ee(N<<16>>16,T)|0)+C|0;W=F;z=O;G=P;j=L}else{B=h;K=m;W=A;z=y;G=s;j=E}r=Q[628+(k<<1)>>1]|0;E=B<<9>>16;s=r<<16>>16;if((s|0)<(E|0)){y=s-E|0;Q[w>>1]=y+(W&65535);Q[e+204+(k+6<<1)>>1]=(z&65535)+y}y=K<<9>>16;w=Q[640+(k<<1)>>1]|0;if((w|0)<(y|0)){E=w-y|0;Q[g>>1]=(G&65535)+E;Q[e+180+(k+6<<1)>>1]=(j&65535)+E}k=k+1|0}while((k|0)!=6);k=e+276|0;Ee[k>>2]=(Ee[k>>2]|0)+1;if(_<<16>>16){_=e+282|0;k=(Q[_>>1]|0)+1<<16>>16;j=k<<16>>16>6;Q[_>>1]=j?6:k;Q[e+280>>1]=j?f:c;J=d;X=J<<16;q=X>>16;Ee[e>>2]=q;ke=n;return q|0}}d=e+280|0;c=Q[d>>1]|0;if(c<<16>>16>0){Q[d>>1]=c+-1<<16>>16;Z=(c&65535)+2|0}else Z=0;Q[e+282>>1]=0;J=Z;X=J<<16;q=X>>16;Ee[e>>2]=q;ke=n;return q|0}function xe(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,t=0,a=0;n=ke;ke=ke+1440|0;t=n+480|0;a=n;ze(r,t,e+12|0,i);ze(t,a,e+4|0,i>>1);t=He(e,a,i>>2)|0;ke=n;return t|0}function Ye(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,t=0;n=ke;ke=ke+480|0;t=n;ze(r,t,e+4|0,i);r=He(e,t,i>>1)|0;ke=n;return r|0}function Ve(e,r,i,n){e=e|0;r=r|0;i=i|0;n=n|0;var t=0,a=0,o=0,l=0,u=0,s=0,f=0,c=0,d=0,_=0,M=0,h=0,m=0,T=0;t=ke;ke=ke+736|0;a=t+720|0;o=t+480|0;l=t+240|0;u=t+120|0;s=t;Q[a>>1]=0;f=i>>1;if((i|0)<=-1)he(3510,3527,266,3568);if((i|0)>=241)he(3596,3527,267,3568);Be(r,i,e+680|0,e+690|0,o,l);Be(o,f,e+682|0,e+692|0,u,s);r=i>>>2;Ke(u,r,176,a,n+10|0);Ke(s,r,176,a,n+8|0);Be(l,f,e+684|0,e+694|0,u,s);Ke(u,r,176,a,n+6|0);Be(s,r,e+686|0,e+696|0,o,l);r=i>>>3;Ke(o,r,272,a,n+4|0);Be(l,r,e+688|0,e+698|0,u,s);r=i>>>4;Ke(u,r,368,a,n+2|0);u=e+700|0;if(!r){Ke(o,r,368,a,n);c=Q[a>>1]|0;ke=t;return c|0}i=e+702|0;l=e+704|0;f=e+706|0;e=s;s=0;d=o;while(1){_=Q[e>>1]|0;M=Q[u>>1]|0;h=ee(M<<16>>16,-13262)|0;m=Q[i>>1]|0;Q[i>>1]=M;Q[u>>1]=Q[e>>1]|0;M=Q[l>>1]|0;T=((m+_|0)*6631|0)+h+((M<<16>>16)*7756|0)+(ee(Q[f>>1]|0,-5620)|0)|0;Q[f>>1]=M;M=T>>>14&65535;Q[l>>1]=M;Q[d>>1]=M;s=s+1|0;if((s|0)==(r|0))break;else{e=e+2|0;d=d+2|0}}Ke(o,r,368,a,n);c=Q[a>>1]|0;ke=t;return c|0}function Be(e,r,i,n,t,a){e=e|0;r=r|0;i=i|0;n=n|0;t=t|0;a=a|0;var o=0,l=0,u=0,s=0,f=0,c=0,d=0,_=0,M=0,h=0,m=0,T=0;o=r>>1;r=(o|0)>0;if(r){l=0;u=t;s=e;f=$[i>>1]<<16;while(1){c=((Q[s>>1]|0)*20972|0)+f|0;Q[u>>1]=c>>>16;d=(ee(c>>16,-20972)|0)+(Q[s>>1]<<14)|0;l=l+1|0;if((l|0)==(o|0))break;else{u=u+2|0;s=s+4|0;f=d<<1}}Q[i>>1]=d>>>15;d=$[n>>1]<<16;if(r){i=0;f=a;s=e+2|0;e=d;while(1){u=((Q[s>>1]|0)*5571|0)+e|0;Q[f>>1]=u>>>16;_=(ee(u>>16,-5571)|0)+(Q[s>>1]<<14)|0;i=i+1|0;if((i|0)==(o|0))break;else{f=f+2|0;s=s+4|0;e=_<<1}}Q[n>>1]=_>>>15;if(r){M=a;h=0;m=t}else return;while(1){t=Q[m>>1]|0;Q[m>>1]=t-($[M>>1]|0);Q[M>>1]=($[M>>1]|0)+t;h=h+1|0;if((h|0)==(o|0))break;else{M=M+2|0;m=m+2|0}}return}else T=d}else T=$[n>>1]<<16;Q[n>>1]=T>>>16;return}function Ke(e,r,i,n,t){e=e|0;r=r|0;i=i|0;n=n|0;t=t|0;var a=0,o=0,l=0;a=ke;ke=ke+16|0;o=a;Ee[o>>2]=0;if(!e)he(3615,3527,164,3631);if((r|0)<=0)he(3643,3527,165,3631);l=Qe(e,r,o)|0;if(!l){Q[t>>1]=i;ke=a;return}r=l>>>0>65535?0:16;e=(-16777216>>>r&l|0)==0?r|8:r;r=(-268435456>>>e&l|0)==0?e|4:e;e=(-1073741824>>>r&l|0)==0?r|2:r;r=17-e+(((-2147483648>>>e&l|0)==0)<<31>>31)|0;e=(Ee[o>>2]|0)+r|0;Ee[o>>2]=e;o=(r|0)<0?l<<0-r:l>>>r;r=(((e<<16>>16)*24660|0)>>>9)+(((o>>>4&1023|14336)*24660|0)>>>19)|0;Q[t>>1]=((r&32768|0)==0?r:0)+(i&65535);i=Q[n>>1]|0;if(i<<16>>16>=11){ke=a;return}Q[n>>1]=(i&65535)+((e|0)>-1?11:o>>>(0-e|0));ke=a;return}function We(e,r,i,n){e=e|0;r=r|0;i=i|0;n=n|0;var t=0,a=0,o=0,l=0;t=(Xe((i<<16>>16>>1)+131072|0,i)|0)<<16;i=t>>16;a=t>>18;t=((e&65535)<<3)-(r&65535)<<16>>16;r=(ee((ee(a<<14,a)|0)>>16,t)|0)>>>10;Q[n>>1]=r;n=(ee(r<<16>>16,t)|0)>>9;if((n|0)>=22005){o=0;l=ee(o,i)|0;return l|0}t=0-(((n<<16>>16)*94544|0)>>>16)|0;o=(t&1023|1024)>>>(((t<<16^-67108864)>>26)+1|0);l=ee(o,i)|0;return l|0}function ze(e,r,i,n){e=e|0;r=r|0;i=i|0;n=n|0;var t=0,a=0,o=0,l=0,u=0,s=0,f=0,c=0,d=0,_=0,M=0;t=Ee[i>>2]|0;a=i+4|0;o=Ee[a>>2]|0;l=n>>1;if((l|0)>0){u=0;s=o;f=t;c=r;d=e}else{_=o;M=t;Ee[i>>2]=M;Ee[a>>2]=_;return}while(1){t=(((Q[d>>1]|0)*5243|0)>>>14)+(f>>>1)|0;Q[c>>1]=t;o=d+2|0;e=t<<16>>16;t=(Q[d>>1]|0)-(e*5243>>12)|0;r=(((Q[o>>1]|0)*1392|0)>>>14)+(s>>>1)<<16>>16;Q[c>>1]=r+e;e=(Q[o>>1]|0)-(r*1392>>12)|0;u=u+1|0;if((u|0)==(l|0)){_=e;M=t;break}else{s=e;f=t;c=c+2|0;d=d+4|0}}Ee[i>>2]=M;Ee[a>>2]=_;return}function Ge(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,t=0,a=0,o=0,l=0,u=0,s=0,f=0,c=0,d=0,_=0,M=0,h=0,m=0,T=0,v=0,p=0,A=0,S=0,b=0,y=0,g=0,E=0,k=0,w=0,R=0,C=0;n=i<<4;t=e+284+(n<<1)|0;a=e+476+(n<<1)|0;if((i|0)>=6)he(3659,3682,76,3715);n=t+30|0;o=a+30|0;l=0;do{u=t+(l<<1)|0;s=Q[u>>1]|0;if(s<<16>>16==100){f=l;do{c=f;f=f+1|0;Q[a+(c<<1)>>1]=Q[a+(f<<1)>>1]|0;Q[t+(c<<1)>>1]=Q[t+(f<<1)>>1]|0}while((f|0)!=16);Q[n>>1]=101;Q[o>>1]=1e4}else Q[u>>1]=s+1<<16>>16;l=l+1|0}while((l|0)!=16);do{if((Q[a+14>>1]|0)>r<<16>>16)if((Q[a+6>>1]|0)>r<<16>>16)if((Q[a+2>>1]|0)>r<<16>>16){d=(Q[a>>1]|0)<=r<<16>>16&1;_=25;break}else{d=(Q[a+4>>1]|0)>r<<16>>16?2:3;_=25;break}else if((Q[a+10>>1]|0)>r<<16>>16){d=(Q[a+8>>1]|0)>r<<16>>16?4:5;_=25;break}else{d=(Q[a+12>>1]|0)>r<<16>>16?6:7;_=25;break}else if((Q[o>>1]|0)>r<<16>>16)if((Q[a+22>>1]|0)>r<<16>>16)if((Q[a+18>>1]|0)>r<<16>>16){d=(Q[a+16>>1]|0)>r<<16>>16?8:9;_=25;break}else{d=(Q[a+20>>1]|0)>r<<16>>16?10:11;_=25;break}else if((Q[a+26>>1]|0)<=r<<16>>16)if((Q[a+28>>1]|0)>r<<16>>16){d=14;_=25;break}else{M=15;_=27;break}else{d=(Q[a+24>>1]|0)>r<<16>>16?12:13;_=25;break}}while(0);if((_|0)==25){o=15;do{l=o;o=o+-1|0;Q[a+(l<<1)>>1]=Q[a+(o<<1)>>1]|0;Q[t+(l<<1)>>1]=Q[t+(o<<1)>>1]|0}while((o|0)>(d|0));M=d;_=27}if((_|0)==27){Q[a+(M<<1)>>1]=r;Q[t+(M<<1)>>1]=1}M=Ee[e+276>>2]|0;if((M|0)<=2)if((M|0)>0)h=a;else{M=e+668+(i<<1)|0;m=0;T=1600;v=M;p=Q[M>>1]|0;A=m+1|0;S=p<<16>>16;b=ee(S,A)|0;y=m^32767;g=T<<16>>16;E=ee(y,g)|0;k=E+16384|0;w=k+b|0;R=w>>>15;C=R&65535;Q[v>>1]=C;return C|0}else h=a+4|0;a=Q[h>>1]|0;h=e+668+(i<<1)|0;i=Q[h>>1]|0;m=a<<16>>16<i<<16>>16?6553:32439;T=a;v=h;p=i;A=m+1|0;S=p<<16>>16;b=ee(S,A)|0;y=m^32767;g=T<<16>>16;E=ee(y,g)|0;k=E+16384|0;w=k+b|0;R=w>>>15;C=R&65535;Q[v>>1]=C;return C|0}function je(){se(3796,1)|0;return}function Je(){Ee[936]=1;Ee[937]=2;Ee[938]=3;Ee[939]=4;Ee[940]=5;Ee[941]=6;Ee[942]=1;Ee[943]=1;Ee[944]=1;Ee[945]=2;Ee[946]=1;Ee[947]=3;Ee[948]=4;return}function Xe(e,r){e=e|0;r=r|0;var i=0;if(!(r<<16>>16)){i=2147483647;return i|0}i=(e|0)/(r<<16>>16|0)|0;return i|0}function qe(e,r,i,n){e=e|0;r=r|0;i=i|0;n=n|0;var t=0,a=0;t=n+1024|0;rr(e,480,t,i);ir(t,240,n+64|0,i+32|0);t=n+32|0;e=i+96|0;Ee[t>>2]=Ee[e>>2];Ee[t+4>>2]=Ee[e+4>>2];Ee[t+8>>2]=Ee[e+8>>2];Ee[t+12>>2]=Ee[e+12>>2];Ee[t+16>>2]=Ee[e+16>>2];Ee[t+20>>2]=Ee[e+20>>2];Ee[t+24>>2]=Ee[e+24>>2];Ee[t+28>>2]=Ee[e+28>>2];a=n+992|0;Ee[e>>2]=Ee[a>>2];Ee[e+4>>2]=Ee[a+4>>2];Ee[e+8>>2]=Ee[a+8>>2];Ee[e+12>>2]=Ee[a+12>>2];Ee[e+16>>2]=Ee[a+16>>2];Ee[e+20>>2]=Ee[a+20>>2];Ee[e+24>>2]=Ee[a+24>>2];Ee[e+28>>2]=Ee[a+28>>2];$e(t,n,80);er(n,160,r,i+128|0);return}function Ze(e){e=e|0;jr(e|0,0,160)|0;return}function Qe(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,t=0,a=0,o=0,l=0,u=0;n=ur(e,r,r)|0;if((r|0)>0){t=0;a=0;o=e}else{l=0;Ee[i>>2]=n;return l|0}while(1){e=Q[o>>1]|0;u=((ee(e,e)|0)>>>n)+t|0;a=a+1|0;if((a|0)==(r|0)){l=u;break}else{t=u;o=o+2|0}}Ee[i>>2]=n;return l|0}function $e(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,t=0,a=0,o=0,l=0,u=0,s=0,f=0,c=0;if((i|0)>0){n=e;t=r;a=0}else return;while(1){r=n+4|0;e=((Ee[n>>2]|0)*778|0)+16384+(ee(Ee[r>>2]|0,-2050)|0)|0;o=n+8|0;l=n;n=n+12|0;u=l+16|0;s=l+20|0;f=e+((Ee[o>>2]|0)*1087|0)+((Ee[n>>2]|0)*23285|0)+((Ee[u>>2]|0)*12903|0)+(ee(Ee[s>>2]|0,-3783)|0)|0;e=l+24|0;c=l+28|0;Ee[t>>2]=f+((Ee[e>>2]|0)*441|0)+((Ee[c>>2]|0)*222|0);f=((Ee[r>>2]|0)*222|0)+16384+((Ee[o>>2]|0)*441|0)+(ee(Ee[n>>2]|0,-3783)|0)|0;o=f+((Ee[u>>2]|0)*12903|0)+((Ee[s>>2]|0)*23285|0)+((Ee[e>>2]|0)*1087|0)+(ee(Ee[c>>2]|0,-2050)|0)|0;Ee[t+4>>2]=o+((Ee[l+32>>2]|0)*778|0);a=a+1|0;if((a|0)==(i|0))break;else t=t+8|0}return}function er(e,r,i,n){e=e|0;r=r|0;i=i|0;n=n|0;var t=0,a=0,o=0,l=0,u=0,s=0,f=0,c=0,d=0,_=0,M=0,h=0,m=0;t=r>>1;r=(t|0)>0;if(!r)return;a=n+4|0;o=n+8|0;l=n+12|0;u=0;do{s=e+(u<<1<<2)|0;f=Ee[s>>2]|0;c=Ee[a>>2]|0;d=((f+8192-c>>14)*3050|0)+(Ee[n>>2]|0)|0;Ee[n>>2]=f;f=Ee[o>>2]|0;_=d-f>>14;M=(((_>>>31)+_|0)*9368|0)+c|0;Ee[a>>2]=d;d=M-(Ee[l>>2]|0)>>14;c=(((d>>>31)+d|0)*15063|0)+f|0;Ee[l>>2]=c;Ee[o>>2]=M;Ee[s>>2]=c>>1;u=u+1|0}while((u|0)!=(t|0));u=e+4|0;if(!r)return;o=n+20|0;l=n+16|0;a=n+24|0;c=n+28|0;n=0;do{s=u+(n<<1<<2)|0;M=Ee[s>>2]|0;f=Ee[o>>2]|0;d=((M+8192-f>>14)*821|0)+(Ee[l>>2]|0)|0;Ee[l>>2]=M;M=Ee[a>>2]|0;_=d-M>>14;h=(((_>>>31)+_|0)*6110|0)+f|0;Ee[o>>2]=d;d=h-(Ee[c>>2]|0)>>14;f=(((d>>>31)+d|0)*12382|0)+M|0;Ee[c>>2]=f;Ee[a>>2]=h;Ee[s>>2]=f>>1;n=n+1|0}while((n|0)!=(t|0));if(r)m=0;else return;do{r=m<<1;n=(Ee[e+((r|1)<<2)>>2]|0)+(Ee[e+(r<<2)>>2]|0)>>15;a=(Ee[e+((r|3)<<2)>>2]|0)+(Ee[e+((r|2)<<2)>>2]|0)>>15;r=(n|0)<32767?n:32767;Q[i+(m<<1)>>1]=(r|0)>-32768?r:-32768;r=(a|0)<32767?a:32767;Q[i+((m|1)<<1)>>1]=(r|0)>-32768?r:-32768;m=m+2|0}while((m|0)<(t|0));return}function rr(e,r,i,n){e=e|0;r=r|0;i=i|0;n=n|0;var t=0,a=0,o=0,l=0,u=0,s=0,f=0,c=0,d=0,_=0;t=r>>1;r=(t|0)>0;if(!r)return;a=n+4|0;o=n+8|0;l=n+12|0;u=0;do{s=Q[e+(u<<1<<1)>>1]<<15|16384;f=Ee[a>>2]|0;c=((8192-f+s>>14)*3050|0)+(Ee[n>>2]|0)|0;Ee[n>>2]=s;s=Ee[o>>2]|0;d=c-s>>14;_=(((d>>>31)+d|0)*9368|0)+f|0;Ee[a>>2]=c;c=_-(Ee[l>>2]|0)>>14;f=(((c>>>31)+c|0)*15063|0)+s|0;Ee[l>>2]=f;Ee[o>>2]=_;Ee[i+(u<<2)>>2]=f>>1;u=u+1|0}while((u|0)!=(t|0));u=e+2|0;if(!r)return;r=n+20|0;e=n+16|0;o=n+24|0;l=n+28|0;n=0;do{a=Q[u+(n<<1<<1)>>1]<<15|16384;f=Ee[r>>2]|0;_=((8192-f+a>>14)*821|0)+(Ee[e>>2]|0)|0;Ee[e>>2]=a;a=Ee[o>>2]|0;s=_-a>>14;c=(((s>>>31)+s|0)*6110|0)+f|0;Ee[r>>2]=_;_=c-(Ee[l>>2]|0)>>14;f=(((_>>>31)+_|0)*12382|0)+a|0;Ee[l>>2]=f;Ee[o>>2]=c;c=i+(n<<2)|0;Ee[c>>2]=(f>>1)+(Ee[c>>2]|0);n=n+1|0}while((n|0)!=(t|0));return}function ir(e,r,i,n){e=e|0;r=r|0;i=i|0;n=n|0;var t=0,a=0,o=0,l=0,u=0,s=0,f=0,c=0,d=0,_=0,M=0,h=0,m=0,T=0;t=r>>1;r=e+4|0;a=n+48|0;o=(t|0)>0;if(!o)return;l=n+4|0;u=n+8|0;s=n+12|0;f=a;c=0;while(1){d=Ee[f>>2]|0;_=Ee[l>>2]|0;M=((d+8192-_>>14)*3050|0)+(Ee[n>>2]|0)|0;Ee[n>>2]=d;d=Ee[u>>2]|0;h=M-d>>14;m=(((h>>>31)+h|0)*9368|0)+_|0;Ee[l>>2]=M;M=m-(Ee[s>>2]|0)>>14;_=(((M>>>31)+M|0)*15063|0)+d|0;Ee[s>>2]=_;Ee[u>>2]=m;m=c<<1;Ee[i+(m<<2)>>2]=_>>1;c=c+1|0;if((c|0)==(t|0))break;else f=r+(m<<2)|0}if(!o)return;f=n+20|0;c=n+16|0;u=n+24|0;s=n+28|0;l=0;do{m=l<<1;_=Ee[e+(m<<2)>>2]|0;d=Ee[f>>2]|0;M=((_+8192-d>>14)*821|0)+(Ee[c>>2]|0)|0;Ee[c>>2]=_;_=Ee[u>>2]|0;h=M-_>>14;T=(((h>>>31)+h|0)*6110|0)+d|0;Ee[f>>2]=M;M=T-(Ee[s>>2]|0)>>14;d=(((M>>>31)+M|0)*12382|0)+_|0;Ee[s>>2]=d;Ee[u>>2]=T;T=i+(m<<2)|0;Ee[T>>2]=(d>>1)+(Ee[T>>2]|0)>>15;l=l+1|0}while((l|0)!=(t|0));l=i+4|0;if(!o)return;i=n+36|0;u=n+32|0;s=n+40|0;f=n+44|0;c=0;do{T=c<<1;d=Ee[e+(T<<2)>>2]|0;m=Ee[i>>2]|0;_=((d+8192-m>>14)*3050|0)+(Ee[u>>2]|0)|0;Ee[u>>2]=d;d=Ee[s>>2]|0;M=_-d>>14;h=(((M>>>31)+M|0)*9368|0)+m|0;Ee[i>>2]=_;_=h-(Ee[f>>2]|0)>>14;m=(((_>>>31)+_|0)*15063|0)+d|0;Ee[f>>2]=m;Ee[s>>2]=h;Ee[l+(T<<2)>>2]=m>>1;c=c+1|0}while((c|0)!=(t|0));if(!o)return;o=n+52|0;c=n+56|0;s=n+60|0;n=0;do{f=n<<1;i=Ee[r+(f<<2)>>2]|0;u=Ee[o>>2]|0;e=((i+8192-u>>14)*821|0)+(Ee[a>>2]|0)|0;Ee[a>>2]=i;i=Ee[c>>2]|0;m=e-i>>14;T=(((m>>>31)+m|0)*6110|0)+u|0;Ee[o>>2]=e;e=T-(Ee[s>>2]|0)>>14;u=(((e>>>31)+e|0)*12382|0)+i|0;Ee[s>>2]=u;Ee[c>>2]=T;T=l+(f<<2)|0;Ee[T>>2]=(u>>1)+(Ee[T>>2]|0)>>15;n=n+1|0}while((n|0)!=(t|0));return}function nr(e,r,i,n,t,a,o){e=e|0;r=r|0;i=i|0;n=n|0;t=t|0;a=a|0;o=o|0;var l=0,u=0,s=0,f=0;l=1<<t>>1;if((t|0)<0|((e|0)==0|(i|0)==0|(a|0)==0|(o|0)<1)){u=-1;return u|0}if((o|0)<=0){u=0;return u|0}s=r<<16>>16;r=n<<16>>16;n=0;do{f=ee(Q[e+(n<<1)>>1]|0,s)|0;Q[a+(n<<1)>>1]=f+l+(ee(Q[i+(n<<1)>>1]|0,r)|0)>>t;n=n+1|0}while((n|0)!=(o|0));u=0;return u|0}function tr(e){e=e|0;var r=0,i=0;if(e>>>0<=10?(r=Kr(4)|0,(r|0)!=0):0){Ee[r>>2]=e;i=r}else i=0;return i|0}function ar(e){e=e|0;if(e|0)Wr(e);return}function or(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,t=0,a=0,o=0,l=0,u=0;n=ke;ke=ke+4096|0;t=n;a=Ee[e>>2]|0;o=1<<a;if((a|0)!=31){l=0;u=0;while(1){Q[t+(l<<1)>>1]=Q[r+(u<<1)>>1]|0;Q[t+((l|1)<<1)>>1]=0;u=u+1|0;if((u|0)>=(o|0))break;else l=l+2|0}}_r(t,a);a=fr(t,Ee[e>>2]|0,1)|0;Jr(i|0,t|0,(o<<1)+4|0)|0;ke=n;return a|0}function lr(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,t=0,a=0,o=0,l=0,u=0,s=0,f=0,c=0;n=ke;ke=ke+4096|0;t=n;a=Ee[e>>2]|0;o=1<<a;l=o+2|0;Jr(t|0,r|0,l<<1|0)|0;u=o<<1;if((u|0)>(l|0)){s=l;do{l=u-s|0;Q[t+(s<<1)>>1]=Q[r+(l<<1)>>1]|0;Q[t+(s+1<<1)>>1]=0-($[r+(l+1<<1)>>1]|0);s=s+2|0}while((u|0)>(s|0))}_r(t,a);s=cr(t,Ee[e>>2]|0,1)|0;if((a|0)==31){ke=n;return s|0}else{f=0;c=0}while(1){Q[i+(c<<1)>>1]=Q[t+(f<<1)>>1]|0;c=c+1|0;if((c|0)>=(o|0))break;else f=f+2|0}ke=n;return s|0}function ur(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,t=0,a=0,o=0,l=0,u=0,s=0,f=0,c=0,d=0,_=0,M=0,h=0;n=i>>>0>65535?16:0;t=(65280<<n&i|0)==0?n:n|8;n=(240<<t&i|0)==0?t:t|4;t=(12<<n&i|0)==0?n:n|2;n=((2<<t&i|0)!=0&1)+t|0;t=((1<<n&i|0)!=0&1)+n<<16>>16;if((r|0)>0){n=r;r=e;e=-1;i=-1;while(1){a=Q[r>>1]|0;o=a<<16>>16;l=a<<16>>16>0?o:0-o|0;o=(l<<16>>16|0)>(i|0)?l&65535:e;l=o<<16>>16;if((n|0)>1){n=n+-1|0;r=r+2|0;e=o;i=l}else{u=o;s=l;break}}}else{u=-1;s=-1}i=ee(s,s)|0;if(!i){f=0;c=u<<16>>16==0;d=(t|0)<(f|0);_=t-f|0;M=c|d;h=M?0:_;return h|0}s=i>>>0>32767?0:16;e=(-8388608>>>s&i|0)==0?s|8:s;s=(-134217728>>>e&i|0)==0?e|4:e;e=(-536870912>>>s&i|0)==0?s|2:s;f=((-1073741824>>>e&i|0)==0&1)+e|0;c=u<<16>>16==0;d=(t|0)<(f|0);_=t-f|0;M=c|d;h=M?0:_;return h|0}function sr(e,r,i,n,t,a,o,l){e=e|0;r=r|0;i=i|0;n=n|0;t=t|0;a=a|0;o=o|0;l=l|0;var u=0,s=0,f=0,c=0,d=0;u=ee(n+-1|0,o)|0;s=u+l|0;if(!((n|0)>0&(a|0)>0&(s|0)<(r|0))){f=-1;return f|0}if((u|0)<0){f=0;return f|0}else{c=l;d=i}while(1){i=2048;l=0;do{i=(ee(Q[e+(c-l<<1)>>1]|0,Q[t+(l<<1)>>1]|0)|0)+i|0;l=l+1|0}while((l|0)!=(a|0));l=i>>12;Q[d>>1]=(l|0)>32767?32767:((l|0)>-32768?l:-32768)&65535;c=c+o|0;if((c|0)>(s|0)){f=0;break}else d=d+2|0}return f|0}function fr(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,t=0,a=0,o=0,l=0,u=0,s=0,f=0,c=0,d=0,_=0,M=0,h=0,m=0,T=0,v=0,p=0,A=0;n=1<<r;if((n|0)>1024){t=-1;return t|0}r=(n|0)>1;if(!i){if(r){a=9;o=1}else{t=0;return t|0}while(1){i=o;o=o<<1;if((i|0)>0){l=0;do{u=l<<a;if((l|0)<(n|0)){s=Q[652+(u+256<<1)>>1]|0;f=0-($[652+(u<<1)>>1]|0)<<16>>16;u=l;do{c=u+i<<1;d=e+(c<<1)|0;_=Q[d>>1]|0;M=ee(_,s)|0;h=e+((c|1)<<1)|0;c=Q[h>>1]|0;m=M-(ee(c,f)|0)>>15;M=(ee(c,s)|0)+(ee(_,f)|0)>>15;_=u<<1;c=e+(_<<1)|0;T=Q[c>>1]|0;v=e+((_|1)<<1)|0;_=Q[v>>1]|0;Q[d>>1]=(T-m|0)>>>1;Q[h>>1]=(_-M|0)>>>1;Q[c>>1]=(m+T|0)>>>1;Q[v>>1]=(M+_|0)>>>1;u=u+o|0}while((u|0)<(n|0))}l=l+1|0}while((l|0)!=(i|0))}if((o|0)>=(n|0)){t=0;break}else a=a+-1|0}return t|0}else{if(r){p=9;A=1}else{t=0;return t|0}while(1){r=A;A=A<<1;if((r|0)>0){a=0;do{o=a<<p;if((a|0)<(n|0)){i=Q[652+(o+256<<1)>>1]|0;l=0-($[652+(o<<1)>>1]|0)<<16>>16;o=a;do{u=o+r<<1;f=e+(u<<1)|0;s=Q[f>>1]|0;_=ee(s,i)|0;M=e+((u|1)<<1)|0;u=Q[M>>1]|0;v=_+1-(ee(u,l)|0)>>1;_=(ee(s,l)|0)+1+(ee(u,i)|0)>>1;u=o<<1;s=e+(u<<1)|0;T=e+((u|1)<<1)|0;u=Q[T>>1]<<14;m=(Q[s>>1]<<14)+16384|0;Q[f>>1]=(m-v|0)>>>15;f=u+16384|0;Q[M>>1]=(f-_|0)>>>15;Q[s>>1]=(m+v|0)>>>15;Q[T>>1]=(f+_|0)>>>15;o=o+A|0}while((o|0)<(n|0))}a=a+1|0}while((a|0)!=(r|0))}if((A|0)>=(n|0)){t=0;break}else p=p+-1|0}return t|0}return 0}function cr(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,t=0,a=0,o=0,l=0,u=0,s=0,f=0,c=0,d=0,_=0,M=0,h=0,m=0,T=0,v=0,p=0,A=0,S=0,b=0,y=0,g=0,E=0;n=1<<r;if((n|0)>1024){t=-1;return t|0}if((n|0)<=1){t=0;return t|0}r=n<<1;a=(i|0)==0;i=0;o=9;l=1;while(1){u=vi[Ee[936]&7](e,r)|0;s=u<<16>>16>13573;f=s&1;c=u<<16>>16>27146;u=c&1;d=f+i+u|0;_=c?s?2:1:f;f=(s?16384:8192)<<u;u=l;l=l<<1;s=(u|0)>0;if(a){if(s){c=0;do{M=c<<o;if((c|0)<(n|0)){h=Q[652+(M+256<<1)>>1]|0;m=Q[652+(M<<1)>>1]|0;M=c;do{T=M+u<<1;v=e+(T<<1)|0;p=Q[v>>1]|0;A=ee(p,h)|0;S=e+((T|1)<<1)|0;T=Q[S>>1]|0;b=A-(ee(T,m)|0)>>15;A=(ee(T,h)|0)+(ee(p,m)|0)>>15;p=M<<1;T=e+(p<<1)|0;y=Q[T>>1]|0;g=e+((p|1)<<1)|0;p=Q[g>>1]|0;Q[v>>1]=y-b>>_;Q[S>>1]=p-A>>_;Q[T>>1]=b+y>>_;Q[g>>1]=A+p>>_;M=M+l|0}while((M|0)<(n|0))}c=c+1|0}while((c|0)!=(u|0))}}else if(s){c=_+14|0;M=0;do{m=M<<o;if((M|0)<(n|0)){h=Q[652+(m+256<<1)>>1]|0;p=Q[652+(m<<1)>>1]|0;m=M;do{A=m+u<<1;g=e+(A<<1)|0;y=Q[g>>1]|0;b=ee(y,h)|0;T=e+((A|1)<<1)|0;A=Q[T>>1]|0;S=b+1-(ee(A,p)|0)>>1;b=(ee(y,p)|0)+1+(ee(A,h)|0)>>1;A=m<<1;y=e+(A<<1)|0;v=e+((A|1)<<1)|0;A=Q[v>>1]<<14;E=(Q[y>>1]<<14)+f|0;Q[g>>1]=E-S>>c;g=A+f|0;Q[T>>1]=g-b>>c;Q[y>>1]=E+S>>c;Q[v>>1]=g+b>>c;m=m+l|0}while((m|0)<(n|0))}M=M+1|0}while((M|0)!=(u|0))}if((l|0)>=(n|0)){t=d;break}else{i=d;o=o+-1|0}}return t|0}function dr(e,r,i,n,t,a,o){e=e|0;r=r|0;i=i|0;n=n|0;t=t|0;a=a|0;o=o|0;var l=0,u=0,s=0,f=0;l=t<<16>>16;if(t<<16>>16<=0)return;t=n<<16>>16;u=o<<16>>16;o=a<<16>>16;if(n<<16>>16>0){s=0;f=e}else{jr(e|0,0,l<<2|0)|0;return}while(1){Ee[f>>2]=0;e=ee(s,u)|0;n=0;a=0;do{a=((ee(Q[i+(n+e<<1)>>1]|0,Q[r+(n<<1)>>1]|0)|0)>>o)+a|0;n=n+1|0}while((n|0)!=(t|0));Ee[f>>2]=a;s=s+1|0;if((s|0)==(l|0))break;else f=f+4|0}return}function _r(e,r){e=e|0;r=r|0;var i=0,n=0,t=0,a=0,o=0,l=0,u=0;if((r+-7|0)>>>0<2){i=(r|0)==8;n=i?2700:3180;t=i?240:112;i=0;do{a=e+(Q[n+(i<<1)>>1]<<2)|0;o=Ee[a>>2]|0;l=e+(Q[n+((i|1)<<1)>>1]<<2)|0;Ee[a>>2]=Ee[l>>2];Ee[l>>2]=o;i=i+2|0}while((i|0)<(t|0));return}t=1<<r;r=t+-1|0;if((t|0)<=1)return;i=0;n=1;do{o=r-i|0;l=t;do{l=l>>1}while((l|0)>(o|0));i=(l+-1&i)+l|0;o=e+(n<<2)|0;a=e+(i<<2)|0;if((i|0)>(n|0)){u=Ee[o>>2]|0;Ee[o>>2]=Ee[a>>2];Ee[a>>2]=u}n=n+1|0}while((n|0)!=(t|0));return}function Mr(e,r){e=e|0;r=r|0;var i=0,n=0,t=0,a=0,o=0,l=0,u=0;if((e|0)==0|(r|0)<1){i=-1;return i|0}if((r|0)>0){n=0;t=0;while(1){a=Q[e+(n<<1)>>1]|0;o=a<<16>>16;l=a<<16>>16>-1?o:0-o|0;o=(l|0)>(t|0)?l:t;n=n+1|0;if((n|0)==(r|0)){u=o;break}else t=o}}else u=0;i=((u|0)<32767?u:32767)&65535;return i|0}function hr(e,r){e=e|0;r=r|0;var i=0,n=0,t=0,a=0,o=0,l=0;if((e|0)==0|(r|0)<1){i=-1;return i|0}if((r|0)>0){n=0;t=0;while(1){a=Ee[e+(t<<2)>>2]|0;o=(a|0)>-1?a:0-a|0;a=o>>>0>n>>>0?o:n;t=t+1|0;if((t|0)==(r|0)){l=a;break}else n=a}}else l=0;i=l>>>0<2147483647?l:2147483647;return i|0}function mr(e,r){e=e|0;r=r|0;var i=0,n=0,t=0,a=0,o=0;if((r|0)>0&(e|0)!=0){i=-32768;n=0}else{t=-32768;return t|0}while(1){a=Q[e+(n<<1)>>1]|0;o=a<<16>>16>i<<16>>16?a:i;n=n+1|0;if((n|0)==(r|0)){t=o;break}else i=o}return t|0}function Tr(e,r){e=e|0;r=r|0;var i=0,n=0,t=0,a=0,o=0;if((r|0)>0&(e|0)!=0){i=-2147483648;n=0}else{t=-2147483648;return t|0}while(1){a=Ee[e+(n<<2)>>2]|0;o=(a|0)>(i|0)?a:i;n=n+1|0;if((n|0)==(r|0)){t=o;break}else i=o}return t|0}function vr(e,r){e=e|0;r=r|0;var i=0,n=0,t=0,a=0,o=0;if((r|0)>0&(e|0)!=0){i=32767;n=0}else{t=32767;return t|0}while(1){a=Q[e+(n<<1)>>1]|0;o=a<<16>>16<i<<16>>16?a:i;n=n+1|0;if((n|0)==(r|0)){t=o;break}else i=o}return t|0}function pr(e,r){e=e|0;r=r|0;var i=0,n=0,t=0,a=0,o=0;if((r|0)>0&(e|0)!=0){i=2147483647;n=0}else{t=2147483647;return t|0}while(1){a=Ee[e+(n<<2)>>2]|0;o=(a|0)<(i|0)?a:i;n=n+1|0;if((n|0)==(r|0)){t=o;break}else i=o}return t|0}function Ar(){return 3800}function Sr(e){e=e|0;var r=0,i=0;r=ke;ke=ke+16|0;i=r;Ee[i>>2]=Rr(Ee[e+60>>2]|0)|0;e=gr(ue(6,i|0)|0)|0;ke=r;return e|0}function br(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,t=0,a=0,o=0,l=0,u=0,s=0,f=0,c=0,d=0,_=0,M=0,h=0,m=0,T=0,v=0,p=0,A=0;n=ke;ke=ke+48|0;t=n+16|0;a=n;o=n+32|0;l=e+28|0;u=Ee[l>>2]|0;Ee[o>>2]=u;s=e+20|0;f=(Ee[s>>2]|0)-u|0;Ee[o+4>>2]=f;Ee[o+8>>2]=r;Ee[o+12>>2]=i;r=f+i|0;f=e+60|0;Ee[a>>2]=Ee[f>>2];Ee[a+4>>2]=o;Ee[a+8>>2]=2;u=gr(me(146,a|0)|0)|0;e:do{if((r|0)!=(u|0)){a=2;c=r;d=o;_=u;while(1){if((_|0)<0)break;c=c-_|0;M=Ee[d+4>>2]|0;h=_>>>0>M>>>0;m=h?d+8|0:d;T=(h<<31>>31)+a|0;v=_-(h?M:0)|0;Ee[m>>2]=(Ee[m>>2]|0)+v;M=m+4|0;Ee[M>>2]=(Ee[M>>2]|0)-v;Ee[t>>2]=Ee[f>>2];Ee[t+4>>2]=m;Ee[t+8>>2]=T;_=gr(me(146,t|0)|0)|0;if((c|0)==(_|0)){p=3;break e}else{a=T;d=m}}Ee[e+16>>2]=0;Ee[l>>2]=0;Ee[s>>2]=0;Ee[e>>2]=Ee[e>>2]|32;if((a|0)==2)A=0;else A=i-(Ee[d+4>>2]|0)|0}else p=3}while(0);if((p|0)==3){p=Ee[e+44>>2]|0;Ee[e+16>>2]=p+(Ee[e+48>>2]|0);Ee[l>>2]=p;Ee[s>>2]=p;A=i}ke=n;return A|0}function yr(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,t=0,a=0,o=0;n=ke;ke=ke+32|0;t=n;a=n+20|0;Ee[t>>2]=Ee[e+60>>2];Ee[t+4>>2]=0;Ee[t+8>>2]=r;Ee[t+12>>2]=a;Ee[t+16>>2]=i;if((gr(fe(140,t|0)|0)|0)<0){Ee[a>>2]=-1;o=-1}else o=Ee[a>>2]|0;ke=n;return o|0}function gr(e){e=e|0;var r=0;if(e>>>0>4294963200){Ee[(Er()|0)>>2]=0-e;r=-1}else r=e;return r|0}function Er(){return(kr()|0)+64|0}function kr(){return wr()|0}function wr(){return 8}function Rr(e){e=e|0;return e|0}function Cr(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,t=0;n=ke;ke=ke+32|0;t=n;Ee[e+36>>2]=5;if((Ee[e>>2]&64|0)==0?(Ee[t>>2]=Ee[e+60>>2],Ee[t+4>>2]=21523,Ee[t+8>>2]=n+16,_e(54,t|0)|0):0)M[e+75>>0]=-1;t=br(e,r,i)|0;ke=n;return t|0}function Or(e){e=e|0;return 0}function Pr(e){e=e|0;return}function Nr(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,t=0,a=0,o=0,l=0,u=0,s=0,f=0,c=0,d=0,_=0;n=i+16|0;t=Ee[n>>2]|0;if(!t)if(!(Ir(i)|0)){a=Ee[n>>2]|0;o=5}else l=0;else{a=t;o=5}e:do{if((o|0)==5){t=i+20|0;n=Ee[t>>2]|0;u=n;if((a-n|0)>>>0<r>>>0){l=di[Ee[i+36>>2]&7](i,e,r)|0;break}r:do{if((M[i+75>>0]|0)>-1){n=r;while(1){if(!n){s=0;f=e;c=r;d=u;break r}_=n+-1|0;if((M[e+_>>0]|0)==10)break;else n=_}_=di[Ee[i+36>>2]&7](i,e,n)|0;if(_>>>0<n>>>0){l=_;break e}s=n;f=e+n|0;c=r-n|0;d=Ee[t>>2]|0}else{s=0;f=e;c=r;d=u}}while(0);Jr(d|0,f|0,c|0)|0;Ee[t>>2]=(Ee[t>>2]|0)+c;l=s+c|0}}while(0);return l|0}function Ir(e){e=e|0;var r=0,i=0,n=0;r=e+74|0;i=M[r>>0]|0;M[r>>0]=i+255|i;i=Ee[e>>2]|0;if(!(i&8)){Ee[e+8>>2]=0;Ee[e+4>>2]=0;r=Ee[e+44>>2]|0;Ee[e+28>>2]=r;Ee[e+20>>2]=r;Ee[e+16>>2]=r+(Ee[e+48>>2]|0);n=0}else{Ee[e>>2]=i|32;n=-1}return n|0}function Lr(e){e=e|0;var r=0,i=0,n=0,t=0,a=0,o=0,l=0,u=0,s=0;r=e;e:do{if(!(r&3)){i=e;n=4}else{t=e;a=r;while(1){if(!(M[t>>0]|0)){o=a;break e}l=t+1|0;a=l;if(!(a&3)){i=l;n=4;break}else t=l}}}while(0);if((n|0)==4){n=i;while(1){u=Ee[n>>2]|0;if(!((u&-2139062144^-2139062144)&u+-16843009))n=n+4|0;else break}if(!((u&255)<<24>>24))s=n;else{u=n;while(1){n=u+1|0;if(!(M[n>>0]|0)){s=n;break}else u=n}}o=s}return o-r|0}function Ur(e,r){e=e|0;r=r|0;var i=0;i=Lr(e)|0;return((Dr(e,1,i,r)|0)!=(i|0))<<31>>31|0}function Dr(e,r,i,n){e=e|0;r=r|0;i=i|0;n=n|0;var t=0,a=0,o=0,l=0,u=0;t=ee(i,r)|0;a=(r|0)==0?0:i;if((Ee[n+76>>2]|0)>-1){i=(Or(n)|0)==0;o=Nr(e,t,n)|0;if(i)l=o;else{Pr(n);l=o}}else l=Nr(e,t,n)|0;if((l|0)==(t|0))u=a;else u=(l>>>0)/(r>>>0)|0;return u|0}function Fr(e,r){e=e|0;r=r|0;var i=0,n=0,t=0,a=0,o=0,l=0,u=0,s=0,f=0;i=ke;ke=ke+16|0;n=i;t=r&255;M[n>>0]=t;a=e+16|0;o=Ee[a>>2]|0;if(!o)if(!(Ir(e)|0)){l=Ee[a>>2]|0;u=4}else s=-1;else{l=o;u=4}do{if((u|0)==4){o=e+20|0;a=Ee[o>>2]|0;if(a>>>0<l>>>0?(f=r&255,(f|0)!=(M[e+75>>0]|0)):0){Ee[o>>2]=a+1;M[a>>0]=t;s=f;break}if((di[Ee[e+36>>2]&7](e,n,1)|0)==1)s=c[n>>0]|0;else s=-1}}while(0);ke=i;return s|0}function Hr(){le(3864);return 3872}function xr(){Me(3864);return}function Yr(e){e=e|0;var r=0,i=0,n=0,t=0,a=0,o=0,l=0;do{if(e){if((Ee[e+76>>2]|0)<=-1){r=Vr(e)|0;break}i=(Or(e)|0)==0;n=Vr(e)|0;if(i)r=n;else{Pr(e);r=n}}else{if(!(Ee[95]|0))t=0;else t=Yr(Ee[95]|0)|0;n=Ee[(Hr()|0)>>2]|0;if(!n)a=t;else{i=n;n=t;while(1){if((Ee[i+76>>2]|0)>-1)o=Or(i)|0;else o=0;if((Ee[i+20>>2]|0)>>>0>(Ee[i+28>>2]|0)>>>0)l=Vr(i)|0|n;else l=n;if(o|0)Pr(i);i=Ee[i+56>>2]|0;if(!i){a=l;break}else n=l}}xr();r=a}}while(0);return r|0}function Vr(e){e=e|0;var r=0,i=0,n=0,t=0,a=0,o=0,l=0;r=e+20|0;i=e+28|0;if((Ee[r>>2]|0)>>>0>(Ee[i>>2]|0)>>>0?(di[Ee[e+36>>2]&7](e,0,0)|0,(Ee[r>>2]|0)==0):0)n=-1;else{t=e+4|0;a=Ee[t>>2]|0;o=e+8|0;l=Ee[o>>2]|0;if(a>>>0<l>>>0)di[Ee[e+40>>2]&7](e,a-l|0,1)|0;Ee[e+16>>2]=0;Ee[i>>2]=0;Ee[r>>2]=0;Ee[o>>2]=0;Ee[t>>2]=0;n=0}return n|0}function Br(e){e=e|0;var r=0,i=0,n=0,t=0,a=0;r=Ee[63]|0;if((Ee[r+76>>2]|0)>-1)i=Or(r)|0;else i=0;do{if((Ur(e,r)|0)<0)n=1;else{if((M[r+75>>0]|0)!=10?(t=r+20|0,a=Ee[t>>2]|0,a>>>0<(Ee[r+16>>2]|0)>>>0):0){Ee[t>>2]=a+1;M[a>>0]=10;n=0;break}n=(Fr(r,10)|0)<0}}while(0);if(i|0)Pr(r);return n<<31>>31|0}function Kr(e){e=e|0;var r=0,i=0,n=0,t=0,a=0,o=0,l=0,u=0,s=0,f=0,c=0,d=0,_=0,M=0,h=0,m=0,T=0,v=0,p=0,A=0,S=0,b=0,y=0,g=0,E=0,k=0,w=0,R=0,C=0,O=0,P=0,N=0,I=0,L=0,U=0,D=0,F=0,H=0,x=0,Y=0,V=0,B=0,K=0,W=0,z=0,G=0,j=0,J=0,X=0,q=0,Z=0,Q=0,$=0,ee=0,re=0,ie=0,ne=0,te=0,ae=0,oe=0,le=0,ue=0,se=0,fe=0,ce=0,de=0,_e=0,Me=0,he=0,me=0,Te=0,ve=0,pe=0,Ae=0,Se=0,be=0,ye=0,ge=0;r=ke;ke=ke+16|0;i=r;do{if(e>>>0<245){n=e>>>0<11?16:e+11&-8;t=n>>>3;a=Ee[969]|0;o=a>>>t;if(o&3|0){l=(o&1^1)+t|0;u=3916+(l<<1<<2)|0;s=u+8|0;f=Ee[s>>2]|0;c=f+8|0;d=Ee[c>>2]|0;do{if((u|0)!=(d|0)){if(d>>>0<(Ee[973]|0)>>>0)we();_=d+12|0;if((Ee[_>>2]|0)==(f|0)){Ee[_>>2]=u;Ee[s>>2]=d;break}else we()}else Ee[969]=a&~(1<<l)}while(0);d=l<<3;Ee[f+4>>2]=d|3;s=f+d+4|0;Ee[s>>2]=Ee[s>>2]|1;M=c;ke=r;return M|0}s=Ee[971]|0;if(n>>>0>s>>>0){if(o|0){d=2<<t;u=o<<t&(d|0-d);d=(u&0-u)+-1|0;u=d>>>12&16;_=d>>>u;d=_>>>5&8;h=_>>>d;_=h>>>2&4;m=h>>>_;h=m>>>1&2;T=m>>>h;m=T>>>1&1;v=(d|u|_|h|m)+(T>>>m)|0;m=3916+(v<<1<<2)|0;T=m+8|0;h=Ee[T>>2]|0;_=h+8|0;u=Ee[_>>2]|0;do{if((m|0)!=(u|0)){if(u>>>0<(Ee[973]|0)>>>0)we();d=u+12|0;if((Ee[d>>2]|0)==(h|0)){Ee[d>>2]=m;Ee[T>>2]=u;p=a;break}else we()}else{d=a&~(1<<v);Ee[969]=d;p=d}}while(0);u=(v<<3)-n|0;Ee[h+4>>2]=n|3;T=h+n|0;Ee[T+4>>2]=u|1;Ee[T+u>>2]=u;if(s|0){m=Ee[974]|0;t=s>>>3;o=3916+(t<<1<<2)|0;c=1<<t;if(p&c){t=o+8|0;f=Ee[t>>2]|0;if(f>>>0<(Ee[973]|0)>>>0)we();else{A=f;S=t}}else{Ee[969]=p|c;A=o;S=o+8|0}Ee[S>>2]=m;Ee[A+12>>2]=m;Ee[m+8>>2]=A;Ee[m+12>>2]=o}Ee[971]=u;Ee[974]=T;M=_;ke=r;return M|0}T=Ee[970]|0;if(T){u=(T&0-T)+-1|0;o=u>>>12&16;m=u>>>o;u=m>>>5&8;c=m>>>u;m=c>>>2&4;t=c>>>m;c=t>>>1&2;f=t>>>c;t=f>>>1&1;l=Ee[4180+((u|o|m|c|t)+(f>>>t)<<2)>>2]|0;t=(Ee[l+4>>2]&-8)-n|0;f=Ee[l+16+(((Ee[l+16>>2]|0)==0&1)<<2)>>2]|0;if(!f){b=l;y=t}else{c=l;l=t;t=f;while(1){f=(Ee[t+4>>2]&-8)-n|0;m=f>>>0<l>>>0;o=m?f:l;f=m?t:c;t=Ee[t+16+(((Ee[t+16>>2]|0)==0&1)<<2)>>2]|0;if(!t){b=f;y=o;break}else{c=f;l=o}}}l=Ee[973]|0;if(b>>>0<l>>>0)we();c=b+n|0;if(b>>>0>=c>>>0)we();t=Ee[b+24>>2]|0;_=Ee[b+12>>2]|0;do{if((_|0)==(b|0)){h=b+20|0;v=Ee[h>>2]|0;if(!v){o=b+16|0;f=Ee[o>>2]|0;if(!f){g=0;break}else{E=f;k=o}}else{E=v;k=h}while(1){h=E+20|0;v=Ee[h>>2]|0;if(v|0){E=v;k=h;continue}h=E+16|0;v=Ee[h>>2]|0;if(!v)break;else{E=v;k=h}}if(k>>>0<l>>>0)we();else{Ee[k>>2]=0;g=E;break}}else{h=Ee[b+8>>2]|0;if(h>>>0<l>>>0)we();v=h+12|0;if((Ee[v>>2]|0)!=(b|0))we();o=_+8|0;if((Ee[o>>2]|0)==(b|0)){Ee[v>>2]=_;Ee[o>>2]=h;g=_;break}else we()}}while(0);e:do{if(t|0){_=Ee[b+28>>2]|0;l=4180+(_<<2)|0;do{if((b|0)==(Ee[l>>2]|0)){Ee[l>>2]=g;if(!g){Ee[970]=T&~(1<<_);break e}}else if(t>>>0>=(Ee[973]|0)>>>0){Ee[t+16+(((Ee[t+16>>2]|0)!=(b|0)&1)<<2)>>2]=g;if(!g)break e;else break}else we()}while(0);_=Ee[973]|0;if(g>>>0<_>>>0)we();Ee[g+24>>2]=t;l=Ee[b+16>>2]|0;do{if(l|0)if(l>>>0<_>>>0)we();else{Ee[g+16>>2]=l;Ee[l+24>>2]=g;break}}while(0);l=Ee[b+20>>2]|0;if(l|0)if(l>>>0<(Ee[973]|0)>>>0)we();else{Ee[g+20>>2]=l;Ee[l+24>>2]=g;break}}}while(0);if(y>>>0<16){t=y+n|0;Ee[b+4>>2]=t|3;T=b+t+4|0;Ee[T>>2]=Ee[T>>2]|1}else{Ee[b+4>>2]=n|3;Ee[c+4>>2]=y|1;Ee[c+y>>2]=y;if(s|0){T=Ee[974]|0;t=s>>>3;l=3916+(t<<1<<2)|0;_=1<<t;if(a&_){t=l+8|0;h=Ee[t>>2]|0;if(h>>>0<(Ee[973]|0)>>>0)we();else{w=h;R=t}}else{Ee[969]=a|_;w=l;R=l+8|0}Ee[R>>2]=T;Ee[w+12>>2]=T;Ee[T+8>>2]=w;Ee[T+12>>2]=l}Ee[971]=y;Ee[974]=c}M=b+8|0;ke=r;return M|0}else C=n}else C=n}else if(e>>>0<=4294967231){l=e+11|0;T=l&-8;_=Ee[970]|0;if(_){t=0-T|0;h=l>>>8;if(h)if(T>>>0>16777215)O=31;else{l=(h+1048320|0)>>>16&8;o=h<<l;h=(o+520192|0)>>>16&4;v=o<<h;o=(v+245760|0)>>>16&2;f=14-(h|l|o)+(v<<o>>>15)|0;O=T>>>(f+7|0)&1|f<<1}else O=0;f=Ee[4180+(O<<2)>>2]|0;e:do{if(!f){P=0;N=0;I=t;L=81}else{o=0;v=t;l=f;h=T<<((O|0)==31?0:25-(O>>>1)|0);m=0;while(1){u=(Ee[l+4>>2]&-8)-T|0;if(u>>>0<v>>>0)if(!u){U=l;D=0;F=l;L=85;break e}else{H=l;x=u}else{H=o;x=v}u=Ee[l+20>>2]|0;l=Ee[l+16+(h>>>31<<2)>>2]|0;d=(u|0)==0|(u|0)==(l|0)?m:u;u=(l|0)==0;if(u){P=d;N=H;I=x;L=81;break}else{o=H;v=x;h=h<<((u^1)&1);m=d}}}}while(0);if((L|0)==81){if((P|0)==0&(N|0)==0){f=2<<O;t=_&(f|0-f);if(!t){C=T;break}f=(t&0-t)+-1|0;t=f>>>12&16;n=f>>>t;f=n>>>5&8;c=n>>>f;n=c>>>2&4;a=c>>>n;c=a>>>1&2;s=a>>>c;a=s>>>1&1;Y=0;V=Ee[4180+((f|t|n|c|a)+(s>>>a)<<2)>>2]|0}else{Y=N;V=P}if(!V){B=Y;K=I}else{U=Y;D=I;F=V;L=85}}if((L|0)==85)while(1){L=0;a=(Ee[F+4>>2]&-8)-T|0;s=a>>>0<D>>>0;c=s?a:D;a=s?F:U;F=Ee[F+16+(((Ee[F+16>>2]|0)==0&1)<<2)>>2]|0;if(!F){B=a;K=c;break}else{U=a;D=c;L=85}}if((B|0)!=0?K>>>0<((Ee[971]|0)-T|0)>>>0:0){c=Ee[973]|0;if(B>>>0<c>>>0)we();a=B+T|0;if(B>>>0>=a>>>0)we();s=Ee[B+24>>2]|0;n=Ee[B+12>>2]|0;do{if((n|0)==(B|0)){t=B+20|0;f=Ee[t>>2]|0;if(!f){m=B+16|0;h=Ee[m>>2]|0;if(!h){W=0;break}else{z=h;G=m}}else{z=f;G=t}while(1){t=z+20|0;f=Ee[t>>2]|0;if(f|0){z=f;G=t;continue}t=z+16|0;f=Ee[t>>2]|0;if(!f)break;else{z=f;G=t}}if(G>>>0<c>>>0)we();else{Ee[G>>2]=0;W=z;break}}else{t=Ee[B+8>>2]|0;if(t>>>0<c>>>0)we();f=t+12|0;if((Ee[f>>2]|0)!=(B|0))we();m=n+8|0;if((Ee[m>>2]|0)==(B|0)){Ee[f>>2]=n;Ee[m>>2]=t;W=n;break}else we()}}while(0);e:do{if(s){n=Ee[B+28>>2]|0;c=4180+(n<<2)|0;do{if((B|0)==(Ee[c>>2]|0)){Ee[c>>2]=W;if(!W){t=_&~(1<<n);Ee[970]=t;j=t;break e}}else if(s>>>0>=(Ee[973]|0)>>>0){Ee[s+16+(((Ee[s+16>>2]|0)!=(B|0)&1)<<2)>>2]=W;if(!W){j=_;break e}else break}else we()}while(0);n=Ee[973]|0;if(W>>>0<n>>>0)we();Ee[W+24>>2]=s;c=Ee[B+16>>2]|0;do{if(c|0)if(c>>>0<n>>>0)we();else{Ee[W+16>>2]=c;Ee[c+24>>2]=W;break}}while(0);c=Ee[B+20>>2]|0;if(c)if(c>>>0<(Ee[973]|0)>>>0)we();else{Ee[W+20>>2]=c;Ee[c+24>>2]=W;j=_;break}else j=_}else j=_}while(0);do{if(K>>>0>=16){Ee[B+4>>2]=T|3;Ee[a+4>>2]=K|1;Ee[a+K>>2]=K;_=K>>>3;if(K>>>0<256){s=3916+(_<<1<<2)|0;c=Ee[969]|0;n=1<<_;if(c&n){_=s+8|0;t=Ee[_>>2]|0;if(t>>>0<(Ee[973]|0)>>>0)we();else{J=t;X=_}}else{Ee[969]=c|n;J=s;X=s+8|0}Ee[X>>2]=a;Ee[J+12>>2]=a;Ee[a+8>>2]=J;Ee[a+12>>2]=s;break}s=K>>>8;if(s)if(K>>>0>16777215)q=31;else{n=(s+1048320|0)>>>16&8;c=s<<n;s=(c+520192|0)>>>16&4;_=c<<s;c=(_+245760|0)>>>16&2;t=14-(s|n|c)+(_<<c>>>15)|0;q=K>>>(t+7|0)&1|t<<1}else q=0;t=4180+(q<<2)|0;Ee[a+28>>2]=q;c=a+16|0;Ee[c+4>>2]=0;Ee[c>>2]=0;c=1<<q;if(!(j&c)){Ee[970]=j|c;Ee[t>>2]=a;Ee[a+24>>2]=t;Ee[a+12>>2]=a;Ee[a+8>>2]=a;break}c=K<<((q|0)==31?0:25-(q>>>1)|0);_=Ee[t>>2]|0;while(1){if((Ee[_+4>>2]&-8|0)==(K|0)){L=139;break}Z=_+16+(c>>>31<<2)|0;t=Ee[Z>>2]|0;if(!t){L=136;break}else{c=c<<1;_=t}}if((L|0)==136)if(Z>>>0<(Ee[973]|0)>>>0)we();else{Ee[Z>>2]=a;Ee[a+24>>2]=_;Ee[a+12>>2]=a;Ee[a+8>>2]=a;break}else if((L|0)==139){c=_+8|0;t=Ee[c>>2]|0;n=Ee[973]|0;if(t>>>0>=n>>>0&_>>>0>=n>>>0){Ee[t+12>>2]=a;Ee[c>>2]=a;Ee[a+8>>2]=t;Ee[a+12>>2]=_;Ee[a+24>>2]=0;break}else we()}}else{t=K+T|0;Ee[B+4>>2]=t|3;c=B+t+4|0;Ee[c>>2]=Ee[c>>2]|1}}while(0);M=B+8|0;ke=r;return M|0}else C=T}else C=T}else C=-1}while(0);B=Ee[971]|0;if(B>>>0>=C>>>0){K=B-C|0;Z=Ee[974]|0;if(K>>>0>15){q=Z+C|0;Ee[974]=q;Ee[971]=K;Ee[q+4>>2]=K|1;Ee[q+K>>2]=K;Ee[Z+4>>2]=C|3}else{Ee[971]=0;Ee[974]=0;Ee[Z+4>>2]=B|3;K=Z+B+4|0;Ee[K>>2]=Ee[K>>2]|1}M=Z+8|0;ke=r;return M|0}Z=Ee[972]|0;if(Z>>>0>C>>>0){K=Z-C|0;Ee[972]=K;B=Ee[975]|0;q=B+C|0;Ee[975]=q;Ee[q+4>>2]=K|1;Ee[B+4>>2]=C|3;M=B+8|0;ke=r;return M|0}if(!(Ee[1087]|0)){Ee[1089]=4096;Ee[1088]=4096;Ee[1090]=-1;Ee[1091]=-1;Ee[1092]=0;Ee[1080]=0;B=i&-16^1431655768;Ee[i>>2]=B;Ee[1087]=B;Q=4096}else Q=Ee[1089]|0;B=C+48|0;i=C+47|0;K=Q+i|0;q=0-Q|0;Q=K&q;if(Q>>>0<=C>>>0){M=0;ke=r;return M|0}j=Ee[1079]|0;if(j|0?(J=Ee[1077]|0,X=J+Q|0,X>>>0<=J>>>0|X>>>0>j>>>0):0){M=0;ke=r;return M|0}e:do{if(!(Ee[1080]&4)){j=Ee[975]|0;r:do{if(j){X=4324;while(1){J=Ee[X>>2]|0;if(J>>>0<=j>>>0?($=X+4|0,(J+(Ee[$>>2]|0)|0)>>>0>j>>>0):0)break;J=Ee[X+8>>2]|0;if(!J){L=163;break r}else X=J}_=K-Z&q;if(_>>>0<2147483647){J=Gr(_|0)|0;if((J|0)==((Ee[X>>2]|0)+(Ee[$>>2]|0)|0))if((J|0)==(-1|0))ee=_;else{re=_;ie=J;L=180;break e}else{ne=J;te=_;L=171}}else ee=0}else L=163}while(0);do{if((L|0)==163){j=Gr(0)|0;if((j|0)!=(-1|0)?(T=j,_=Ee[1088]|0,J=_+-1|0,W=((J&T|0)==0?0:(J+T&0-_)-T|0)+Q|0,T=Ee[1077]|0,_=W+T|0,W>>>0>C>>>0&W>>>0<2147483647):0){J=Ee[1079]|0;if(J|0?_>>>0<=T>>>0|_>>>0>J>>>0:0){ee=0;break}J=Gr(W|0)|0;if((J|0)==(j|0)){re=W;ie=j;L=180;break e}else{ne=J;te=W;L=171}}else ee=0}}while(0);do{if((L|0)==171){W=0-te|0;if(!(B>>>0>te>>>0&(te>>>0<2147483647&(ne|0)!=(-1|0))))if((ne|0)==(-1|0)){ee=0;break}else{re=te;ie=ne;L=180;break e}J=Ee[1089]|0;j=i-te+J&0-J;if(j>>>0>=2147483647){re=te;ie=ne;L=180;break e}if((Gr(j|0)|0)==(-1|0)){Gr(W|0)|0;ee=0;break}else{re=j+te|0;ie=ne;L=180;break e}}}while(0);Ee[1080]=Ee[1080]|4;ae=ee;L=178}else{ae=0;L=178}}while(0);if(((L|0)==178?Q>>>0<2147483647:0)?(ee=Gr(Q|0)|0,Q=Gr(0)|0,ne=Q-ee|0,te=ne>>>0>(C+40|0)>>>0,!((ee|0)==(-1|0)|te^1|ee>>>0<Q>>>0&((ee|0)!=(-1|0)&(Q|0)!=(-1|0))^1)):0){re=te?ne:ae;ie=ee;L=180}if((L|0)==180){ee=(Ee[1077]|0)+re|0;Ee[1077]=ee;if(ee>>>0>(Ee[1078]|0)>>>0)Ee[1078]=ee;ee=Ee[975]|0;do{if(ee){ae=4324;while(1){oe=Ee[ae>>2]|0;le=ae+4|0;ue=Ee[le>>2]|0;if((ie|0)==(oe+ue|0)){L=190;break}ne=Ee[ae+8>>2]|0;if(!ne)break;else ae=ne}if(((L|0)==190?(Ee[ae+12>>2]&8|0)==0:0)?ee>>>0<ie>>>0&ee>>>0>=oe>>>0:0){Ee[le>>2]=ue+re;ne=ee+8|0;te=(ne&7|0)==0?0:0-ne&7;ne=ee+te|0;Q=(Ee[972]|0)+(re-te)|0;Ee[975]=ne;Ee[972]=Q;Ee[ne+4>>2]=Q|1;Ee[ne+Q+4>>2]=40;Ee[976]=Ee[1091];break}Q=Ee[973]|0;if(ie>>>0<Q>>>0){Ee[973]=ie;se=ie}else se=Q;Q=ie+re|0;ne=4324;while(1){if((Ee[ne>>2]|0)==(Q|0)){L=198;break}te=Ee[ne+8>>2]|0;if(!te)break;else ne=te}if((L|0)==198?(Ee[ne+12>>2]&8|0)==0:0){Ee[ne>>2]=ie;ae=ne+4|0;Ee[ae>>2]=(Ee[ae>>2]|0)+re;ae=ie+8|0;te=ie+((ae&7|0)==0?0:0-ae&7)|0;ae=Q+8|0;i=Q+((ae&7|0)==0?0:0-ae&7)|0;ae=te+C|0;B=i-te-C|0;Ee[te+4>>2]=C|3;do{if((i|0)!=(ee|0)){if((i|0)==(Ee[974]|0)){$=(Ee[971]|0)+B|0;Ee[971]=$;Ee[974]=ae;Ee[ae+4>>2]=$|1;Ee[ae+$>>2]=$;break}$=Ee[i+4>>2]|0;if(($&3|0)==1){q=$&-8;Z=$>>>3;e:do{if($>>>0>=256){K=Ee[i+24>>2]|0;j=Ee[i+12>>2]|0;do{if((j|0)==(i|0)){W=i+16|0;J=W+4|0;_=Ee[J>>2]|0;if(!_){T=Ee[W>>2]|0;if(!T){fe=0;break}else{ce=T;de=W}}else{ce=_;de=J}while(1){J=ce+20|0;_=Ee[J>>2]|0;if(_|0){ce=_;de=J;continue}J=ce+16|0;_=Ee[J>>2]|0;if(!_)break;else{ce=_;de=J}}if(de>>>0<se>>>0)we();else{Ee[de>>2]=0;fe=ce;break}}else{J=Ee[i+8>>2]|0;if(J>>>0<se>>>0)we();_=J+12|0;if((Ee[_>>2]|0)!=(i|0))we();W=j+8|0;if((Ee[W>>2]|0)==(i|0)){Ee[_>>2]=j;Ee[W>>2]=J;fe=j;break}else we()}}while(0);if(!K)break;j=Ee[i+28>>2]|0;J=4180+(j<<2)|0;do{if((i|0)!=(Ee[J>>2]|0))if(K>>>0>=(Ee[973]|0)>>>0){Ee[K+16+(((Ee[K+16>>2]|0)!=(i|0)&1)<<2)>>2]=fe;if(!fe)break e;else break}else we();else{Ee[J>>2]=fe;if(fe|0)break;Ee[970]=Ee[970]&~(1<<j);break e}}while(0);j=Ee[973]|0;if(fe>>>0<j>>>0)we();Ee[fe+24>>2]=K;J=i+16|0;W=Ee[J>>2]|0;do{if(W|0)if(W>>>0<j>>>0)we();else{Ee[fe+16>>2]=W;Ee[W+24>>2]=fe;break}}while(0);W=Ee[J+4>>2]|0;if(!W)break;if(W>>>0<(Ee[973]|0)>>>0)we();else{Ee[fe+20>>2]=W;Ee[W+24>>2]=fe;break}}else{W=Ee[i+8>>2]|0;j=Ee[i+12>>2]|0;K=3916+(Z<<1<<2)|0;do{if((W|0)!=(K|0)){if(W>>>0<se>>>0)we();if((Ee[W+12>>2]|0)==(i|0))break;we()}}while(0);if((j|0)==(W|0)){Ee[969]=Ee[969]&~(1<<Z);break}do{if((j|0)==(K|0))_e=j+8|0;else{if(j>>>0<se>>>0)we();J=j+8|0;if((Ee[J>>2]|0)==(i|0)){_e=J;break}we()}}while(0);Ee[W+12>>2]=j;Ee[_e>>2]=W}}while(0);Me=i+q|0;he=q+B|0}else{Me=i;he=B}Z=Me+4|0;Ee[Z>>2]=Ee[Z>>2]&-2;Ee[ae+4>>2]=he|1;Ee[ae+he>>2]=he;Z=he>>>3;if(he>>>0<256){$=3916+(Z<<1<<2)|0;X=Ee[969]|0;K=1<<Z;do{if(!(X&K)){Ee[969]=X|K;me=$;Te=$+8|0}else{Z=$+8|0;J=Ee[Z>>2]|0;if(J>>>0>=(Ee[973]|0)>>>0){me=J;Te=Z;break}we()}}while(0);Ee[Te>>2]=ae;Ee[me+12>>2]=ae;Ee[ae+8>>2]=me;Ee[ae+12>>2]=$;break}K=he>>>8;do{if(!K)ve=0;else{if(he>>>0>16777215){ve=31;break}X=(K+1048320|0)>>>16&8;q=K<<X;Z=(q+520192|0)>>>16&4;J=q<<Z;q=(J+245760|0)>>>16&2;_=14-(Z|X|q)+(J<<q>>>15)|0;ve=he>>>(_+7|0)&1|_<<1}}while(0);K=4180+(ve<<2)|0;Ee[ae+28>>2]=ve;$=ae+16|0;Ee[$+4>>2]=0;Ee[$>>2]=0;$=Ee[970]|0;_=1<<ve;if(!($&_)){Ee[970]=$|_;Ee[K>>2]=ae;Ee[ae+24>>2]=K;Ee[ae+12>>2]=ae;Ee[ae+8>>2]=ae;break}_=he<<((ve|0)==31?0:25-(ve>>>1)|0);$=Ee[K>>2]|0;while(1){if((Ee[$+4>>2]&-8|0)==(he|0)){L=265;break}pe=$+16+(_>>>31<<2)|0;K=Ee[pe>>2]|0;if(!K){L=262;break}else{_=_<<1;$=K}}if((L|0)==262)if(pe>>>0<(Ee[973]|0)>>>0)we();else{Ee[pe>>2]=ae;Ee[ae+24>>2]=$;Ee[ae+12>>2]=ae;Ee[ae+8>>2]=ae;break}else if((L|0)==265){_=$+8|0;K=Ee[_>>2]|0;q=Ee[973]|0;if(K>>>0>=q>>>0&$>>>0>=q>>>0){Ee[K+12>>2]=ae;Ee[_>>2]=ae;Ee[ae+8>>2]=K;Ee[ae+12>>2]=$;Ee[ae+24>>2]=0;break}else we()}}else{K=(Ee[972]|0)+B|0;Ee[972]=K;Ee[975]=ae;Ee[ae+4>>2]=K|1}}while(0);M=te+8|0;ke=r;return M|0}ae=4324;while(1){B=Ee[ae>>2]|0;if(B>>>0<=ee>>>0?(Ae=B+(Ee[ae+4>>2]|0)|0,Ae>>>0>ee>>>0):0)break;ae=Ee[ae+8>>2]|0}ae=Ae+-47|0;te=ae+8|0;B=ae+((te&7|0)==0?0:0-te&7)|0;te=ee+16|0;ae=B>>>0<te>>>0?ee:B;B=ae+8|0;i=ie+8|0;Q=(i&7|0)==0?0:0-i&7;i=ie+Q|0;ne=re+-40-Q|0;Ee[975]=i;Ee[972]=ne;Ee[i+4>>2]=ne|1;Ee[i+ne+4>>2]=40;Ee[976]=Ee[1091];ne=ae+4|0;Ee[ne>>2]=27;Ee[B>>2]=Ee[1081];Ee[B+4>>2]=Ee[1082];Ee[B+8>>2]=Ee[1083];Ee[B+12>>2]=Ee[1084];Ee[1081]=ie;Ee[1082]=re;Ee[1084]=0;Ee[1083]=B;B=ae+24|0;do{i=B;B=B+4|0;Ee[B>>2]=7}while((i+8|0)>>>0<Ae>>>0);if((ae|0)!=(ee|0)){B=ae-ee|0;Ee[ne>>2]=Ee[ne>>2]&-2;Ee[ee+4>>2]=B|1;Ee[ae>>2]=B;i=B>>>3;if(B>>>0<256){Q=3916+(i<<1<<2)|0;K=Ee[969]|0;_=1<<i;if(K&_){i=Q+8|0;q=Ee[i>>2]|0;if(q>>>0<(Ee[973]|0)>>>0)we();else{Se=q;be=i}}else{Ee[969]=K|_;Se=Q;be=Q+8|0}Ee[be>>2]=ee;Ee[Se+12>>2]=ee;Ee[ee+8>>2]=Se;Ee[ee+12>>2]=Q;break}Q=B>>>8;if(Q)if(B>>>0>16777215)ye=31;else{_=(Q+1048320|0)>>>16&8;K=Q<<_;Q=(K+520192|0)>>>16&4;i=K<<Q;K=(i+245760|0)>>>16&2;q=14-(Q|_|K)+(i<<K>>>15)|0;ye=B>>>(q+7|0)&1|q<<1}else ye=0;q=4180+(ye<<2)|0;Ee[ee+28>>2]=ye;Ee[ee+20>>2]=0;Ee[te>>2]=0;K=Ee[970]|0;i=1<<ye;if(!(K&i)){Ee[970]=K|i;Ee[q>>2]=ee;Ee[ee+24>>2]=q;Ee[ee+12>>2]=ee;Ee[ee+8>>2]=ee;break}i=B<<((ye|0)==31?0:25-(ye>>>1)|0);K=Ee[q>>2]|0;while(1){if((Ee[K+4>>2]&-8|0)==(B|0)){L=292;break}ge=K+16+(i>>>31<<2)|0;q=Ee[ge>>2]|0;if(!q){L=289;break}else{i=i<<1;K=q}}if((L|0)==289)if(ge>>>0<(Ee[973]|0)>>>0)we();else{Ee[ge>>2]=ee;Ee[ee+24>>2]=K;Ee[ee+12>>2]=ee;Ee[ee+8>>2]=ee;break}else if((L|0)==292){i=K+8|0;B=Ee[i>>2]|0;te=Ee[973]|0;if(B>>>0>=te>>>0&K>>>0>=te>>>0){Ee[B+12>>2]=ee;Ee[i>>2]=ee;Ee[ee+8>>2]=B;Ee[ee+12>>2]=K;Ee[ee+24>>2]=0;break}else we()}}}else{B=Ee[973]|0;if((B|0)==0|ie>>>0<B>>>0)Ee[973]=ie;Ee[1081]=ie;Ee[1082]=re;Ee[1084]=0;Ee[978]=Ee[1087];Ee[977]=-1;B=0;do{i=3916+(B<<1<<2)|0;Ee[i+12>>2]=i;Ee[i+8>>2]=i;B=B+1|0}while((B|0)!=32);B=ie+8|0;K=(B&7|0)==0?0:0-B&7;B=ie+K|0;i=re+-40-K|0;Ee[975]=B;Ee[972]=i;Ee[B+4>>2]=i|1;Ee[B+i+4>>2]=40;Ee[976]=Ee[1091]}}while(0);re=Ee[972]|0;if(re>>>0>C>>>0){ie=re-C|0;Ee[972]=ie;re=Ee[975]|0;ee=re+C|0;Ee[975]=ee;Ee[ee+4>>2]=ie|1;Ee[re+4>>2]=C|3;M=re+8|0;ke=r;return M|0}}Ee[(Er()|0)>>2]=12;M=0;ke=r;return M|0}function Wr(e){e=e|0;var r=0,i=0,n=0,t=0,a=0,o=0,l=0,u=0,s=0,f=0,c=0,d=0,_=0,M=0,h=0,m=0,T=0,v=0,p=0,A=0,S=0,b=0,y=0,g=0,E=0,k=0,w=0,R=0,C=0,O=0,P=0;if(!e)return;r=e+-8|0;i=Ee[973]|0;if(r>>>0<i>>>0)we();n=Ee[e+-4>>2]|0;e=n&3;if((e|0)==1)we();t=n&-8;a=r+t|0;e:do{if(!(n&1)){o=Ee[r>>2]|0;if(!e)return;l=r+(0-o)|0;u=o+t|0;if(l>>>0<i>>>0)we();if((l|0)==(Ee[974]|0)){s=a+4|0;f=Ee[s>>2]|0;if((f&3|0)!=3){c=l;d=u;_=l;break}Ee[971]=u;Ee[s>>2]=f&-2;Ee[l+4>>2]=u|1;Ee[l+u>>2]=u;return}f=o>>>3;if(o>>>0<256){o=Ee[l+8>>2]|0;s=Ee[l+12>>2]|0;M=3916+(f<<1<<2)|0;if((o|0)!=(M|0)){if(o>>>0<i>>>0)we();if((Ee[o+12>>2]|0)!=(l|0))we()}if((s|0)==(o|0)){Ee[969]=Ee[969]&~(1<<f);c=l;d=u;_=l;break}if((s|0)!=(M|0)){if(s>>>0<i>>>0)we();M=s+8|0;if((Ee[M>>2]|0)==(l|0))h=M;else we()}else h=s+8|0;Ee[o+12>>2]=s;Ee[h>>2]=o;c=l;d=u;_=l;break}o=Ee[l+24>>2]|0;s=Ee[l+12>>2]|0;do{if((s|0)==(l|0)){M=l+16|0;f=M+4|0;m=Ee[f>>2]|0;if(!m){T=Ee[M>>2]|0;if(!T){v=0;break}else{p=T;A=M}}else{p=m;A=f}while(1){f=p+20|0;m=Ee[f>>2]|0;if(m|0){p=m;A=f;continue}f=p+16|0;m=Ee[f>>2]|0;if(!m)break;else{p=m;A=f}}if(A>>>0<i>>>0)we();else{Ee[A>>2]=0;v=p;break}}else{f=Ee[l+8>>2]|0;if(f>>>0<i>>>0)we();m=f+12|0;if((Ee[m>>2]|0)!=(l|0))we();M=s+8|0;if((Ee[M>>2]|0)==(l|0)){Ee[m>>2]=s;Ee[M>>2]=f;v=s;break}else we()}}while(0);if(o){s=Ee[l+28>>2]|0;f=4180+(s<<2)|0;do{if((l|0)==(Ee[f>>2]|0)){Ee[f>>2]=v;if(!v){Ee[970]=Ee[970]&~(1<<s);c=l;d=u;_=l;break e}}else if(o>>>0>=(Ee[973]|0)>>>0){Ee[o+16+(((Ee[o+16>>2]|0)!=(l|0)&1)<<2)>>2]=v;if(!v){c=l;d=u;_=l;break e}else break}else we()}while(0);s=Ee[973]|0;if(v>>>0<s>>>0)we();Ee[v+24>>2]=o;f=l+16|0;M=Ee[f>>2]|0;do{if(M|0)if(M>>>0<s>>>0)we();else{Ee[v+16>>2]=M;Ee[M+24>>2]=v;break}}while(0);M=Ee[f+4>>2]|0;if(M)if(M>>>0<(Ee[973]|0)>>>0)we();else{Ee[v+20>>2]=M;Ee[M+24>>2]=v;c=l;d=u;_=l;break}else{c=l;d=u;_=l}}else{c=l;d=u;_=l}}else{c=r;d=t;_=r}}while(0);if(_>>>0>=a>>>0)we();r=a+4|0;t=Ee[r>>2]|0;if(!(t&1))we();if(!(t&2)){v=Ee[974]|0;if((a|0)==(Ee[975]|0)){i=(Ee[972]|0)+d|0;Ee[972]=i;Ee[975]=c;Ee[c+4>>2]=i|1;if((c|0)!=(v|0))return;Ee[974]=0;Ee[971]=0;return}if((a|0)==(v|0)){v=(Ee[971]|0)+d|0;Ee[971]=v;Ee[974]=_;Ee[c+4>>2]=v|1;Ee[_+v>>2]=v;return}v=(t&-8)+d|0;i=t>>>3;e:do{if(t>>>0>=256){p=Ee[a+24>>2]|0;A=Ee[a+12>>2]|0;do{if((A|0)==(a|0)){h=a+16|0;e=h+4|0;n=Ee[e>>2]|0;if(!n){M=Ee[h>>2]|0;if(!M){S=0;break}else{b=M;y=h}}else{b=n;y=e}while(1){e=b+20|0;n=Ee[e>>2]|0;if(n|0){b=n;y=e;continue}e=b+16|0;n=Ee[e>>2]|0;if(!n)break;else{b=n;y=e}}if(y>>>0<(Ee[973]|0)>>>0)we();else{Ee[y>>2]=0;S=b;break}}else{e=Ee[a+8>>2]|0;if(e>>>0<(Ee[973]|0)>>>0)we();n=e+12|0;if((Ee[n>>2]|0)!=(a|0))we();h=A+8|0;if((Ee[h>>2]|0)==(a|0)){Ee[n>>2]=A;Ee[h>>2]=e;S=A;break}else we()}}while(0);if(p|0){A=Ee[a+28>>2]|0;l=4180+(A<<2)|0;do{if((a|0)==(Ee[l>>2]|0)){Ee[l>>2]=S;if(!S){Ee[970]=Ee[970]&~(1<<A);break e}}else if(p>>>0>=(Ee[973]|0)>>>0){Ee[p+16+(((Ee[p+16>>2]|0)!=(a|0)&1)<<2)>>2]=S;if(!S)break e;else break}else we()}while(0);A=Ee[973]|0;if(S>>>0<A>>>0)we();Ee[S+24>>2]=p;l=a+16|0;u=Ee[l>>2]|0;do{if(u|0)if(u>>>0<A>>>0)we();else{Ee[S+16>>2]=u;Ee[u+24>>2]=S;break}}while(0);u=Ee[l+4>>2]|0;if(u|0)if(u>>>0<(Ee[973]|0)>>>0)we();else{Ee[S+20>>2]=u;Ee[u+24>>2]=S;break}}}else{u=Ee[a+8>>2]|0;A=Ee[a+12>>2]|0;p=3916+(i<<1<<2)|0;if((u|0)!=(p|0)){if(u>>>0<(Ee[973]|0)>>>0)we();if((Ee[u+12>>2]|0)!=(a|0))we()}if((A|0)==(u|0)){Ee[969]=Ee[969]&~(1<<i);break}if((A|0)!=(p|0)){if(A>>>0<(Ee[973]|0)>>>0)we();p=A+8|0;if((Ee[p>>2]|0)==(a|0))g=p;else we()}else g=A+8|0;Ee[u+12>>2]=A;Ee[g>>2]=u}}while(0);Ee[c+4>>2]=v|1;Ee[_+v>>2]=v;if((c|0)==(Ee[974]|0)){Ee[971]=v;return}else E=v}else{Ee[r>>2]=t&-2;Ee[c+4>>2]=d|1;Ee[_+d>>2]=d;E=d}d=E>>>3;if(E>>>0<256){_=3916+(d<<1<<2)|0;t=Ee[969]|0;r=1<<d;if(t&r){d=_+8|0;v=Ee[d>>2]|0;if(v>>>0<(Ee[973]|0)>>>0)we();else{k=v;w=d}}else{Ee[969]=t|r;k=_;w=_+8|0}Ee[w>>2]=c;Ee[k+12>>2]=c;Ee[c+8>>2]=k;Ee[c+12>>2]=_;return}_=E>>>8;if(_)if(E>>>0>16777215)R=31;else{k=(_+1048320|0)>>>16&8;w=_<<k;_=(w+520192|0)>>>16&4;r=w<<_;w=(r+245760|0)>>>16&2;t=14-(_|k|w)+(r<<w>>>15)|0;R=E>>>(t+7|0)&1|t<<1}else R=0;t=4180+(R<<2)|0;Ee[c+28>>2]=R;Ee[c+20>>2]=0;Ee[c+16>>2]=0;w=Ee[970]|0;r=1<<R;do{if(w&r){k=E<<((R|0)==31?0:25-(R>>>1)|0);_=Ee[t>>2]|0;while(1){if((Ee[_+4>>2]&-8|0)==(E|0)){C=124;break}O=_+16+(k>>>31<<2)|0;d=Ee[O>>2]|0;if(!d){C=121;break}else{k=k<<1;_=d}}if((C|0)==121)if(O>>>0<(Ee[973]|0)>>>0)we();else{Ee[O>>2]=c;Ee[c+24>>2]=_;Ee[c+12>>2]=c;Ee[c+8>>2]=c;break}else if((C|0)==124){k=_+8|0;l=Ee[k>>2]|0;d=Ee[973]|0;if(l>>>0>=d>>>0&_>>>0>=d>>>0){Ee[l+12>>2]=c;Ee[k>>2]=c;Ee[c+8>>2]=l;Ee[c+12>>2]=_;Ee[c+24>>2]=0;break}else we()}}else{Ee[970]=w|r;Ee[t>>2]=c;Ee[c+24>>2]=t;Ee[c+12>>2]=c;Ee[c+8>>2]=c}}while(0);c=(Ee[977]|0)+-1|0;Ee[977]=c;if(!c)P=4332;else return;while(1){c=Ee[P>>2]|0;if(!c)break;else P=c+8|0}Ee[977]=-1;return}function zr(){}function Gr(e){e=e|0;var r=0,i=0;e=e+15&-16|0;r=Ee[o>>2]|0;i=r+e|0;if((e|0)>0&(i|0)<(r|0)|(i|0)<0){X()|0;ce(12);return-1}Ee[o>>2]=i;if((i|0)>(J()|0)?(j()|0)==0:0){ce(12);Ee[o>>2]=r;return-1}return r|0}function jr(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,t=0,a=0,o=0;n=e+i|0;r=r&255;if((i|0)>=67){while(e&3){M[e>>0]=r;e=e+1|0}t=n&-4|0;a=t-64|0;o=r|r<<8|r<<16|r<<24;while((e|0)<=(a|0)){Ee[e>>2]=o;Ee[e+4>>2]=o;Ee[e+8>>2]=o;Ee[e+12>>2]=o;Ee[e+16>>2]=o;Ee[e+20>>2]=o;Ee[e+24>>2]=o;Ee[e+28>>2]=o;Ee[e+32>>2]=o;Ee[e+36>>2]=o;Ee[e+40>>2]=o;Ee[e+44>>2]=o;Ee[e+48>>2]=o;Ee[e+52>>2]=o;Ee[e+56>>2]=o;Ee[e+60>>2]=o;e=e+64|0}while((e|0)<(t|0)){Ee[e>>2]=o;e=e+4|0}}while((e|0)<(n|0)){M[e>>0]=r;e=e+1|0}return n-i|0}function Jr(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,t=0,a=0;if((i|0)>=8192)return de(e|0,r|0,i|0)|0;n=e|0;t=e+i|0;if((e&3)==(r&3)){while(e&3){if(!i)return n|0;M[e>>0]=M[r>>0]|0;e=e+1|0;r=r+1|0;i=i-1|0}a=t&-4|0;i=a-64|0;while((e|0)<=(i|0)){Ee[e>>2]=Ee[r>>2];Ee[e+4>>2]=Ee[r+4>>2];Ee[e+8>>2]=Ee[r+8>>2];Ee[e+12>>2]=Ee[r+12>>2];Ee[e+16>>2]=Ee[r+16>>2];Ee[e+20>>2]=Ee[r+20>>2];Ee[e+24>>2]=Ee[r+24>>2];Ee[e+28>>2]=Ee[r+28>>2];Ee[e+32>>2]=Ee[r+32>>2];Ee[e+36>>2]=Ee[r+36>>2];Ee[e+40>>2]=Ee[r+40>>2];Ee[e+44>>2]=Ee[r+44>>2];Ee[e+48>>2]=Ee[r+48>>2];Ee[e+52>>2]=Ee[r+52>>2];Ee[e+56>>2]=Ee[r+56>>2];Ee[e+60>>2]=Ee[r+60>>2];e=e+64|0;r=r+64|0}while((e|0)<(a|0)){Ee[e>>2]=Ee[r>>2];e=e+4|0;r=r+4|0}}else{a=t-4|0;while((e|0)<(a|0)){M[e>>0]=M[r>>0]|0;M[e+1>>0]=M[r+1>>0]|0;M[e+2>>0]=M[r+2>>0]|0;M[e+3>>0]=M[r+3>>0]|0;e=e+4|0;r=r+4|0}}while((e|0)<(t|0)){M[e>>0]=M[r>>0]|0;e=e+1|0;r=r+1|0}return n|0}function Xr(e,r,i,n,t,a,o,l){e=e|0;r=r|0;i=i|0;n=n|0;t=t|0;a=a|0;o=o|0;l=l|0;return ci[e&1](r|0,i|0,n|0,t|0,a|0,o|0,l|0)|0}function qr(e,r,i,n){e=e|0;r=r|0;i=i|0;n=n|0;return di[e&7](r|0,i|0,n|0)|0}function Zr(e,r){e=e|0;r=r|0;_i[e&1](r|0)}function Qr(e,r){e=e|0;r=r|0;return Mi[e&3](r|0)|0}function $r(e,r,i,n,t,a,o,l){e=e|0;r=r|0;i=i|0;n=n|0;t=t|0;a=a|0;o=o|0;l=l|0;hi[e&1](r|0,i|0,n|0,t|0,a|0,o|0,l|0)}function ei(e){e=e|0;mi[e&1]()}function ri(e,r,i,n,t,a,o,l,u){e=e|0;r=r|0;i=i|0;n=n|0;t=t|0;a=a|0;o=o|0;l=l|0;u=u|0;return Ti[e&1](r|0,i|0,n|0,t|0,a|0,o|0,l|0,u|0)|0}function ii(e,r,i){e=e|0;r=r|0;i=i|0;return vi[e&7](r|0,i|0)|0}function ni(e,r,i,n,t,a,o){e=e|0;r=r|0;i=i|0;n=n|0;t=t|0;a=a|0;o=o|0;z(0);return 0}function ti(e,r,i){e=e|0;r=r|0;i=i|0;z(1);return 0}function ai(e){e=e|0;z(2)}function oi(e){e=e|0;z(3);return 0}function li(e,r,i,n,t,a,o){e=e|0;r=r|0;i=i|0;n=n|0;t=t|0;a=a|0;o=o|0;z(4)}function ui(){z(5)}function si(e,r,i,n,t,a,o,l){e=e|0;r=r|0;i=i|0;n=n|0;t=t|0;a=a|0;o=o|0;l=l|0;z(6);return 0}function fi(e,r){e=e|0;r=r|0;z(7);return 0}var ci=[ni,nr];var di=[ti,Cr,yr,or,lr,br,ti,ti];var _i=[ai,ar];var Mi=[oi,Sr,tr,oi];var hi=[li,dr];var mi=[ui,Je];var Ti=[si,sr];var vi=[fi,Mr,hr,mr,Tr,vr,pr,fi];return{_sbrk:Gr,_fflush:Yr,_main:Re,_process_data:Oe,_memset:jr,_malloc:Kr,_emscripten_get_global_libc:Ar,_memcpy:Jr,_setmode:Ce,_free:Wr,___errno_location:Er,runPostSets:zr,stackAlloc:ve,stackSave:pe,stackRestore:Ae,establishStackSpace:Se,setTempRet0:ye,getTempRet0:ge,setThrew:be,stackAlloc:ve,stackSave:pe,stackRestore:Ae,establishStackSpace:Se,setThrew:be,setTempRet0:ye,getTempRet0:ge,dynCall_iiiiiiii:Xr,dynCall_iiii:qr,dynCall_vi:Zr,dynCall_ii:Qr,dynCall_viiiiiii:$r,dynCall_v:ei,dynCall_iiiiiiiii:ri,dynCall_iii:ii}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer),_malloc=Module._malloc=asm._malloc,getTempRet0=Module.getTempRet0=asm.getTempRet0,_fflush=Module._fflush=asm._fflush,_main=Module._main=asm._main,setTempRet0=Module.setTempRet0=asm.setTempRet0,_process_data=Module._process_data=asm._process_data,stackSave=Module.stackSave=asm.stackSave,_memset=Module._memset=asm._memset,_sbrk=Module._sbrk=asm._sbrk,establishStackSpace=Module.establishStackSpace=asm.establishStackSpace,_emscripten_get_global_libc=Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,_memcpy=Module._memcpy=asm._memcpy,_setmode=Module._setmode=asm._setmode,stackAlloc=Module.stackAlloc=asm.stackAlloc,setThrew=Module.setThrew=asm.setThrew,_free=Module._free=asm._free,stackRestore=Module.stackRestore=asm.stackRestore,___errno_location=Module.___errno_location=asm.___errno_location,runPostSets=Module.runPostSets=asm.runPostSets,dynCall_iiiiiiii=Module.dynCall_iiiiiiii=asm.dynCall_iiiiiiii,dynCall_iiii=Module.dynCall_iiii=asm.dynCall_iiii,dynCall_vi=Module.dynCall_vi=asm.dynCall_vi,dynCall_ii=Module.dynCall_ii=asm.dynCall_ii,dynCall_viiiiiii=Module.dynCall_viiiiiii=asm.dynCall_viiiiiii,dynCall_v=Module.dynCall_v=asm.dynCall_v,dynCall_iiiiiiiii=Module.dynCall_iiiiiiiii=asm.dynCall_iiiiiiiii,dynCall_iii=Module.dynCall_iii=asm.dynCall_iii,initialStackTop;function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}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,ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var preloadStartTime=null,calledMain=!1;function run(e){function r(){Module.calledRun||(Module.calledRun=!0,ABORT||(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(e),postRun()))}e=e||Module.arguments,null===preloadStartTime&&(preloadStartTime=Date.now()),0<runDependencies||(preRun(),0<runDependencies||Module.calledRun||(Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),r()},1)):r()))}function exit(e,r){r&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,EXITSTATUS=e,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(e)),ENVIRONMENT_IS_NODE&&process.exit(e),Module.quit(e,new ExitStatus(e)))}dependenciesFulfilled=function e(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=e)},Module.callMain=Module.callMain=function(e){e=e||[],ensureInitRuntime();var r=e.length+1;function i(){for(var e=0;e<3;e++)n.push(0)}var n=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];i();for(var t=0;t<r-1;t+=1)n.push(allocate(intArrayFromString(e[t]),"i8",ALLOC_NORMAL)),i();n.push(0),n=allocate(n,"i32",ALLOC_NORMAL);try{exit(Module._main(r,n,0),!0)}catch(e){if(e instanceof ExitStatus)return;if("SimulateInfiniteLoop"==e)return void(Module.noExitRuntime=!0);var a=e;e&&"object"==typeof e&&e.stack&&(a=[e,e.stack]),Module.printErr("exception thrown: "+a),Module.quit(1,e)}finally{calledMain=!0}},Module.run=Module.run=run,Module.exit=Module.exit=exit;var abortDecorators=[];function abort(r){r=void 0!==r?(Module.print(r),Module.printErr(r),JSON.stringify(r)):"",ABORT=!0,EXITSTATUS=1;var i="abort("+r+") at "+stackTrace()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";throw abortDecorators&&abortDecorators.forEach(function(e){i=e(i,r)}),i}if(Module.abort=Module.abort=abort,Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);0<Module.preInit.length;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run();
|