diff --git a/0.5.0-beta/Resonate.js b/0.5.0-beta/Resonate.js new file mode 100644 index 0000000..5da7294 --- /dev/null +++ b/0.5.0-beta/Resonate.js @@ -0,0 +1 @@ +var Module=typeof Module!="undefined"?Module:{};var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(Module["ENVIRONMENT"]){throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)")}var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_NODE){if(typeof process=="undefined"||!process.release||process.release.name!=="node")throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");var nodeVersion=process.versions.node;var numericVersion=nodeVersion.split(".").slice(0,3);numericVersion=numericVersion[0]*1e4+numericVersion[1]*100+numericVersion[2].split("-")[0]*1;if(numericVersion<16e4){throw new Error("This emscripten-generated code requires node v16.0.0 (detected v"+nodeVersion+")")}var fs=require("fs");var nodePath=require("path");if(ENVIRONMENT_IS_WORKER){scriptDirectory=nodePath.dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}read_=(filename,binary)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};readAsync=(filename,onload,onerror,binary=true)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);fs.readFile(filename,binary?undefined:"utf8",(err,data)=>{if(err)onerror(err);else onload(binary?data.buffer:data)})};if(!Module["thisProgram"]&&process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);if(typeof module!="undefined"){module["exports"]=Module}process.on("uncaughtException",ex=>{if(ex!=="unwind"&&!(ex instanceof ExitStatus)&&!(ex.context instanceof ExitStatus)){throw ex}});quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow};Module["inspect"]=()=>"[Emscripten Module object]"}else if(ENVIRONMENT_IS_SHELL){if(typeof process=="object"&&typeof require==="function"||typeof window=="object"||typeof importScripts=="function")throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");if(typeof read!="undefined"){read_=read}readBinary=f=>{if(typeof readbuffer=="function"){return new Uint8Array(readbuffer(f))}let data=read(f,"binary");assert(typeof data=="object");return data};readAsync=(f,onload,onerror)=>{setTimeout(()=>onload(readBinary(f)))};if(typeof clearTimeout=="undefined"){globalThis.clearTimeout=id=>{}}if(typeof setTimeout=="undefined"){globalThis.setTimeout=f=>typeof f=="function"?f():abort()}if(typeof scriptArgs!="undefined"){arguments_=scriptArgs}else if(typeof arguments!="undefined"){arguments_=arguments}if(typeof quit=="function"){quit_=(status,toThrow)=>{setTimeout(()=>{if(!(toThrow instanceof ExitStatus)){let toLog=toThrow;if(toThrow&&typeof toThrow=="object"&&toThrow.stack){toLog=[toThrow,toThrow.stack]}err(`exiting due to exception: ${toLog}`)}quit(status)});throw toThrow}}if(typeof print!="undefined"){if(typeof console=="undefined")console={};console.log=print;console.warn=console.error=typeof printErr!="undefined"?printErr:print}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}if(!(typeof window=="object"||typeof importScripts=="function"))throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");{read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}}else{throw new Error("environment detection error")}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;checkIncomingModuleAPI();if(Module["arguments"])arguments_=Module["arguments"];legacyModuleProp("arguments","arguments_");if(Module["thisProgram"])thisProgram=Module["thisProgram"];legacyModuleProp("thisProgram","thisProgram");if(Module["quit"])quit_=Module["quit"];legacyModuleProp("quit","quit_");assert(typeof Module["memoryInitializerPrefixURL"]=="undefined","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead");assert(typeof Module["pthreadMainPrefixURL"]=="undefined","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead");assert(typeof Module["cdInitializerPrefixURL"]=="undefined","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead");assert(typeof Module["filePackagePrefixURL"]=="undefined","Module.filePackagePrefixURL option was removed, use Module.locateFile instead");assert(typeof Module["read"]=="undefined","Module.read option was removed (modify read_ in JS)");assert(typeof Module["readAsync"]=="undefined","Module.readAsync option was removed (modify readAsync in JS)");assert(typeof Module["readBinary"]=="undefined","Module.readBinary option was removed (modify readBinary in JS)");assert(typeof Module["setWindowTitle"]=="undefined","Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)");assert(typeof Module["TOTAL_MEMORY"]=="undefined","Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY");legacyModuleProp("asm","wasmExports");legacyModuleProp("read","read_");legacyModuleProp("readAsync","readAsync");legacyModuleProp("readBinary","readBinary");legacyModuleProp("setWindowTitle","setWindowTitle");assert(!ENVIRONMENT_IS_SHELL,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable.");var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];legacyModuleProp("wasmBinary","wasmBinary");if(typeof WebAssembly!="object"){abort("no native wasm support detected")}function intArrayFromBase64(s){if(typeof ENVIRONMENT_IS_NODE!="undefined"&&ENVIRONMENT_IS_NODE){var buf=Buffer.from(s,"base64");return new Uint8Array(buf.buffer,buf.byteOffset,buf.length)}var decoded=atob(s);var bytes=new Uint8Array(decoded.length);for(var i=0;i>2]=34821223;HEAPU32[max+4>>2]=2310721022;HEAPU32[0>>2]=1668509029}function checkStackCookie(){if(ABORT)return;var max=_emscripten_stack_get_end();if(max==0){max+=4}var cookie1=HEAPU32[max>>2];var cookie2=HEAPU32[max+4>>2];if(cookie1!=34821223||cookie2!=2310721022){abort(`Stack overflow! Stack cookie has been overwritten at ${ptrToString(max)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${ptrToString(cookie2)} ${ptrToString(cookie1)}`)}if(HEAPU32[0>>2]!=1668509029){abort("Runtime error: The application has corrupted its heap memory area (address zero)!")}}(function(){var h16=new Int16Array(1);var h8=new Int8Array(h16.buffer);h16[0]=25459;if(h8[0]!==115||h8[1]!==99)throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"})();var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){assert(!runtimeInitialized);runtimeInitialized=true;checkStackCookie();if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;TTY.init();callRuntimeCallbacks(__ATINIT__)}function preMain(){checkStackCookie();callRuntimeCallbacks(__ATMAIN__)}function postRun(){checkStackCookie();if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}assert(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");assert(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");assert(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");assert(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;var runDependencyTracking={};function getUniqueRunDependency(id){var orig=id;while(1){if(!runDependencyTracking[id])return id;id=orig+Math.random()}}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(id){assert(!runDependencyTracking[id]);runDependencyTracking[id]=1;if(runDependencyWatcher===null&&typeof setInterval!="undefined"){runDependencyWatcher=setInterval(()=>{if(ABORT){clearInterval(runDependencyWatcher);runDependencyWatcher=null;return}var shown=false;for(var dep in runDependencyTracking){if(!shown){shown=true;err("still waiting on run dependencies:")}err(`dependency: ${dep}`)}if(shown){err("(end of list)")}},1e4)}}else{err("warning: run dependency added without ID")}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(id){assert(runDependencyTracking[id]);delete runDependencyTracking[id]}else{err("warning: run dependency removed without ID")}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;if(what.indexOf("RuntimeError: unreachable")>=0){what+='. "unreachable" may be due to ASYNCIFY_STACK_SIZE not being large enough (try increasing it)'}var e=new WebAssembly.RuntimeError(what);throw e}var dataURIPrefix="data:application/octet-stream;base64,";var isDataURI=filename=>filename.startsWith(dataURIPrefix);var isFileURI=filename=>filename.startsWith("file://");function createExportWrapper(name){return function(){assert(runtimeInitialized,`native function \`${name}\` called before runtime initialization`);var f=wasmExports[name];assert(f,`exported native function \`${name}\` not found`);return f.apply(null,arguments)}}var wasmBinaryFile;wasmBinaryFile="Resonate.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(binaryFile){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(binaryFile)){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{if(!response["ok"]){throw"failed to load wasm binary file at '"+binaryFile+"'"}return response["arrayBuffer"]()}).catch(()=>getBinarySync(binaryFile))}else if(readAsync){return new Promise((resolve,reject)=>{readAsync(binaryFile,response=>resolve(new Uint8Array(response)),reject)})}}return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(instance=>instance).then(receiver,reason=>{err(`failed to asynchronously prepare wasm: ${reason}`);if(isFileURI(wasmBinaryFile)){err(`warning: Loading from a file URI (${wasmBinaryFile}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`)}abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{var result=WebAssembly.instantiateStreaming(response,imports);return result.then(callback,function(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(binaryFile,imports,callback)})})}return instantiateArrayBuffer(binaryFile,imports,callback)}function createWasm(){var info={"env":wasmImports,"wasi_snapshot_preview1":wasmImports};function receiveInstance(instance,module){wasmExports=instance.exports;wasmExports=Asyncify.instrumentWasmExports(wasmExports);wasmMemory=wasmExports["memory"];assert(wasmMemory,"memory not found in wasm exports");updateMemoryViews();addOnInit(wasmExports["__wasm_call_ctors"]);removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");var trueModule=Module;function receiveInstantiationResult(result){assert(Module===trueModule,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?");trueModule=null;receiveInstance(result["instance"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);return false}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult);return{}}var tempDouble;var tempI64;function legacyModuleProp(prop,newName,incomming=true){if(!Object.getOwnPropertyDescriptor(Module,prop)){Object.defineProperty(Module,prop,{configurable:true,get(){let extra=incomming?" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)":"";abort(`\`Module.${prop}\` has been replaced by \`${newName}\``+extra)}})}}function ignoredModuleProp(prop){if(Object.getOwnPropertyDescriptor(Module,prop)){abort(`\`Module.${prop}\` was supplied but \`${prop}\` not included in INCOMING_MODULE_JS_API`)}}function isExportedByForceFilesystem(name){return name==="FS_createPath"||name==="FS_createDataFile"||name==="FS_createPreloadedFile"||name==="FS_unlink"||name==="addRunDependency"||name==="FS_createLazyFile"||name==="FS_createDevice"||name==="removeRunDependency"}function missingGlobal(sym,msg){if(typeof globalThis!=="undefined"){Object.defineProperty(globalThis,sym,{configurable:true,get(){warnOnce(`\`${sym}\` is not longer defined by emscripten. ${msg}`);return undefined}})}}missingGlobal("buffer","Please use HEAP8.buffer or wasmMemory.buffer");missingGlobal("asm","Please use wasmExports instead");function missingLibrarySymbol(sym){if(typeof globalThis!=="undefined"&&!Object.getOwnPropertyDescriptor(globalThis,sym)){Object.defineProperty(globalThis,sym,{configurable:true,get(){var msg=`\`${sym}\` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line`;var librarySymbol=sym;if(!librarySymbol.startsWith("_")){librarySymbol="$"+sym}msg+=` (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='${librarySymbol}')`;if(isExportedByForceFilesystem(sym)){msg+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"}warnOnce(msg);return undefined}})}unexportedRuntimeSymbol(sym)}function unexportedRuntimeSymbol(sym){if(!Object.getOwnPropertyDescriptor(Module,sym)){Object.defineProperty(Module,sym,{configurable:true,get(){var msg=`'${sym}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;if(isExportedByForceFilesystem(sym)){msg+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"}abort(msg)}})}}var ASM_CONSTS={3879287:$0=>{init_gapi_with_key($0)},3879313:()=>{if(document.getElementById("temp-text-input")){document.getElementById("temp-text-input").focus({preventScroll:true})}},3879436:()=>{if(document.getElementById("temp-file-input")){document.getElementById("temp-file-input").click()}},3879538:()=>Date.now(),3879559:()=>{if(global_audio_context!==null)global_audio_context.close()},3879622:($0,$1)=>{global_audio_element.addEventListener(Emval.toValue($0),window[Emval.toValue($1)],true)},3879715:($0,$1)=>{global_audio_element.removeEventListener(Emval.toValue($0),window[Emval.toValue($1)],true)},3879811:()=>global_audio_element.paused?1:0,3879855:()=>global_audio_element.paused?1:0,3879899:$0=>global_audio_completion[$0-1]?1:0,3879949:$0=>{if(!document.querySelector("link[rel='icon']")){let link=document.createElement("link");link.rel="icon";link.type="image/png";document.head.appendChild(link)}document.querySelector("link[rel='icon']").href="icons/"+Emval.toValue($0)},3880205:()=>{let errString="Undefined";if(error_type===1)errString="Validation";else if(error_type===2)errString="Out of memory";else if(error_type===4)errString="Unknown";else if(error_type===5)errString="Device lost";alert("WebGPU Error "+errString)},3880474:()=>{audio_element_pause()},3880497:()=>{audio_element_play()},3880519:()=>{const dbname="/local";var req=indexedDB.deleteDatabase(dbname);req.onsuccess=function(){console.log("Deleted IndexedDB /local!");location.reload()};req.onerror=function(){console.error("Failed to delete IndexedDB /local!")};req.onblocked=function(){console.error("Failed to delete IndexedDB /local, DB was blocked!")}}};function __asyncjs__open_directory(mode){return Asyncify.handleAsync(async()=>Emval.toHandle(new Promise(resolve=>{const input=document.createElement("input");input.type="file";if(typeof input.webkitdirectory!=="boolean"){input.multiple=true}else{input.webkitdirectory=true}input.addEventListener("cancel",()=>{resolve("")});input.addEventListener("change",()=>{let files=Array.from(input.files);let promisedFiles=[];let exDir="";if(files[0].webkitRelativePath.toString().includes("/")){if(!FS.analyzePath("/"+files[0].webkitRelativePath.split("/")[0]).exists){FS.mkdir("/"+files[0].webkitRelativePath.split("/")[0])}}else{exDir="/WorkDir";if(!FS.analyzePath("/WorkDir").exists){FS.mkdir("/WorkDir")}}for(const file of files){promisedFiles.push(new Promise(resolve=>{console.log("Loading file "+file.webkitRelativePath);let reader=new FileReader;reader.onload=event=>{const uint8_view=new Uint8Array(event.target.result);FS.writeFile(exDir.length!=0?exDir+"/"+file.name:file.webkitRelativePath,uint8_view);resolve()};reader.readAsArrayBuffer(file)}))}input.remove();Promise.all(promisedFiles).then(()=>{resolve(exDir.length!=0?exDir:files[0].webkitRelativePath.split("/")[0])})});if("showPicker"in HTMLInputElement.prototype){input.showPicker()}else{input.click()}})))}function __asyncjs__open_document(save_folder,mime_type,mode){return Asyncify.handleAsync(async()=>Emval.toHandle(new Promise(resolve=>{const input=document.createElement("input");input.type="file";input.accept=Emval.toValue(mime_type);input.addEventListener("cancel",()=>{resolve("")});input.addEventListener("change",()=>{let files=Array.from(input.files);let exDir=Emval.toValue(save_folder);if(!FS.analyzePath(exDir).exists){FS.mkdir(exDir)}new Promise(resolveLoad=>{console.log("Loading file "+files[0].webkitRelativePath+"/"+files[0].name);let reader=new FileReader;reader.onload=event=>{const uint8_view=new Uint8Array(event.target.result);FS.writeFile(exDir.length!=0?exDir+"/"+files[0].name:files[0].webkitRelativePath,uint8_view);resolveLoad()};reader.readAsArrayBuffer(files[0])}).then(()=>{resolve(exDir+"/"+files[0].name)});input.remove()});if("showPicker"in HTMLInputElement.prototype){input.showPicker()}else{input.click()}})))}function download_document(path,mime_type){const docPath=Emval.toValue(path);const mime=Emval.toValue(mime_type);const docData=FS.readFile(docPath);const docBlob=new Blob([docData.buffer],{type:"application/octet-binary"});const docURL=URL.createObjectURL(docBlob);const link=document.createElement("a");link.href=docURL;link.type=mime;link.download=docPath.split("/").pop();document.body.appendChild(link);link.click();document.body.removeChild(link)}function wait_for_sync_fs(){return Emval.toHandle(new Promise(resolve=>{FS.syncfs(false,function(err){if(err){console.error("Unable to sync IndexDB!\n"+err)}resolve()})}))}function clear_local_storage(){localStorage.clear()}function gapi_loaded(){gapi.load("client",()=>{gapi.load("client:picker",_GAPI_Init_Client)});return true}function gapi_ready(){return global_gapi_inited&&global_gis_inited}var global_gapi_inited=false;var global_gis_inited=false;function gis_loaded(){global_client_token=google.accounts.oauth2.initTokenClient({client_id:"824603127976-vjf2sbqo99s9kulm1jp847c453ctmv65.apps.googleusercontent.com",scope:"https://www.googleapis.com/auth/drive",prompt:"",callback:""});global_gis_inited=true;return true}var global_client_token;function init_gapi_with_key(APIKey){gapi.client.init({apiKey:Emval.toValue(APIKey),discoveryDocs:["https://www.googleapis.com/discovery/v1/apis/drive/v3/rest"]}).then(()=>{global_gapi_inited=true})}function has_gapi_token(){if(gapi.client.getToken()!==null){console.log("Already logged in")}else{console.log("Not logged in")}return gapi.client.getToken()!==null}function request_client_token(prompt,token_callback){var client_token_callback=Module[Emval.toValue(token_callback)];global_client_token.callback=token_data=>{client_token_callback(Emval.toHandle(Date.now()+token_data.expires_in*1e3))};global_client_token.requestAccessToken({prompt:Emval.toValue(prompt)})}function create_picker(APIKey,mime_types,file_callback_name,done_callback_name,cancel_callback_name){const view=(new google.picker.DocsView).setIncludeFolders(true).setMimeTypes(Emval.toValue(mime_types)).setSelectFolderEnabled(true);const callback_func=Module[Emval.toValue(file_callback_name)];const done_callback_func=Module[Emval.toValue(done_callback_name)];const cancel_callback_func=Module[Emval.toValue(cancel_callback_name)];const picker=(new google.picker.PickerBuilder).setDeveloperKey(Emval.toValue(APIKey)).setAppId(824603127976).setOAuthToken(gapi.client.getToken().access_token).setTitle("Choose a folder").addView(view).addView(new google.picker.DocsUploadView).setCallback(async data=>{if(data.action===google.picker.Action.CANCEL){cancel_callback_func()}if(data.action===google.picker.Action.PICKED){const documents=data[google.picker.Response.DOCUMENTS];if(!FS.analyzePath("/GoogleDrive").exists){FS.mkdir("/GoogleDrive")}let loadPromises=[];for(const document of documents){const fileId=document[google.picker.Document.ID];console.log(fileId);const files=[];const res=await gapi.client.drive.files.list({q:"'"+fileId+"' in parents",fields:"nextPageToken, files(id, name, trashed)",spaces:"drive"});console.log(JSON.stringify(res.result.files));Array.prototype.push.apply(files,res.result.files);console.log(files);files.forEach(function(file){loadPromises.push(new Promise(async resolve=>{if(file.trashed){console.log("Found trashed file:",file.name,file.id,", Skipping");return}console.log("Found file:",file.name,file.id);const fres=await gapi.client.drive.files.get({"fileId":file.id,"alt":"media"});var bytes=[];for(var i=0;i{const fileData=FS.readFile(Emval.toValue(fs_path),{encoding:"utf8"});await gapi.client.request({path:"https://www.googleapis.com/upload/drive/v3/files/"+Emval.toValue(file_id),method:"PATCH",body:fileData,params:{uploadType:"media",fields:"id,version,name"}})})}function create_button(id,event,callback,pos_x,pos_y,width,height){let imid=Emval.toValue(id);let btn=document.getElementById(imid);if(btn===null){btn=document.createElement("button");btn.id=imid;document.body.insertBefore(btn,document.getElementById("canvas").nextSibling)}btn.addEventListener(Emval.toValue(event),window[Emval.toValue(callback)],false);btn.style.position="fixed";btn.style.left=pos_x+"px";btn.style.top=pos_y+"px";btn.style.width=width+"px";btn.style.height=height+"px";btn.style.opacity=.1}function load_video(id,fs_path){return Emval.toHandle(new Promise(async resolve=>{var imid=Emval.toValue(id);var vid=document.getElementById(imid);if(vid===null){if(global_audio_context===null){return}vid=document.createElement("video");vid.id=imid;vid.volume=0;vid.defaultMuted=true;document.body.insertBefore(vid,document.getElementById("canvas"))}vid.style.position="fixed";vid.style.width=160+"px";vid.style.height=90+"px";const vidData=FS.readFile(Emval.toValue(fs_path));const vidBlob=new Blob([vidData.buffer],{type:"video/mp4"});vid.src=URL.createObjectURL(vidBlob);vid.disablePictureInPicture=true;vid.volume=0;vid.defaultMuted=true;vid.load();vid.oncanplaythrough=()=>{vid.play().then(()=>{vid.pause()});resolve()}}))}function play_video(id){let imid=Emval.toValue(id);let vid=document.getElementById(imid);if(vid===null){return}vid.play()}function pause_video(id){let imid=Emval.toValue(id);let vid=document.getElementById(imid);if(vid===null){return}vid.pause()}function set_video_playback_progress(id,seconds){let imid=Emval.toValue(id);let vid=document.getElementById(imid);if(vid===null){return}vid.currentTime=seconds}function set_video_playback_rate(id,rate){let imid=Emval.toValue(id);let vid=document.getElementById(imid);if(vid===null){return}vid.playbackRate=rate}function is_video_paused(id){let imid=Emval.toValue(id);let vid=document.getElementById(imid);if(vid===null){return true}return vid.paused}function load_image(id,fs_path){return Emval.toHandle(new Promise(async resolve=>{let imid=Emval.toValue(id);let img=document.getElementById(imid);if(img===null){img=document.createElement("img");img.id=imid;document.body.insertBefore(img,document.getElementById("canvas"))}img.style.position="fixed";img.style.width=1+"px";img.style.height=1+"px";const imgData=FS.readFile(Emval.toValue(fs_path));const imgBlob=new Blob([imgData.buffer],{type:"application/octet-binary"});img.src=URL.createObjectURL(imgBlob);await img.decode();resolve()}))}function render_image(id,texture){var imid=Emval.toValue(id);var img=document.getElementById(imid);if(img===null){return Emval.toHandle(0)}var canvas=document.getElementById(imid+"canvas");if(canvas===null){canvas=document.createElement("canvas");canvas.id=imid+"canvas";document.body.insertBefore(canvas,document.getElementById("canvas"));if(img.nodeName=="IMG"){canvas.width=img.naturalWidth;canvas.height=img.naturalHeight}else if(img.nodeName=="VIDEO"){canvas.width=img.videoWidth;canvas.height=img.videoHeight}canvas.style.position="fixed";canvas.style.top=100+"px";canvas.style.width=160+"px";canvas.style.height=90+"px"}var ctx=canvas.getContext("2d");ctx.drawImage(img,0,0);var pixels=ctx.getImageData(0,0,canvas.width,canvas.height);var output=_CreateTexture(texture,Emval.toHandle(pixels.data),canvas.width,canvas.height);ctx=null;pixels=null;return output}function destroy_element(id){let input=document.getElementById(Emval.toValue(id));if(input!==null){input.remove()}}function __asyncjs__destroy_element_async(id,delay_ms){return Asyncify.handleAsync(async()=>{let input=document.getElementById(Emval.toValue(id));setTimeout(()=>{if(input!==null){input.remove()}},delay_ms)})}function add_window_event(event,callback){window.addEventListener(Emval.toValue(event),window[Emval.toValue(callback)],true)}function __asyncjs__get_clipboard_content(){return Asyncify.handleAsync(async()=>{var output="";const clipboardContents=await navigator.clipboard.read();for(const item of clipboardContents){if(item.types.includes("text/plain")){let blob=await item.getType("text/plain");output=await blob.text()}}return Emval.toHandle(output)})}function __asyncjs__set_clipboard_content(content){return Asyncify.handleAsync(async()=>{const type="text/plain";const blob=new Blob([Emval.toValue(content)],{type:type});const data=[new ClipboardItem({[type]:blob})];await navigator.clipboard.write(data)})}function has_physical_touch(){return window.matchMedia("(any-pointer: coarse)").matches}function __asyncjs__show_touch_keyboard(is_num_board,pos_y){return Asyncify.handleAsync(async()=>{let input=document.createElement("input");input.id="temp-text-input";if(is_num_board){input.type="number"}else{input.type="text"}input.addEventListener("input",evt=>{if(evt.inputType=="deleteContentBackward"){_TouchExtraKeyEvents(0,true);evt.stopPropagation();setTimeout(()=>{_TouchExtraKeyEvents(0,false)},60)}if(evt.inputType=="deleteContentForeward"){_TouchExtraKeyEvents(1,true);evt.stopPropagation();setTimeout(()=>{_TouchExtraKeyEvents(1,false)},60)}});input.style.position="fixed";input.style.left="-1000px";input.style.top=pos_y+"px";document.body.insertBefore(input,document.getElementById("canvas"))})}function hide_touch_keyboard(){let input=document.getElementById("temp-text-input");input.remove()}function touch_input_handler(){const el=document.getElementById("canvas");el.addEventListener("touchstart",evt=>{for(var i=0;i{_jsPrepPlayback();for(var i=0;i{for(var i=0;i{for(var i=0;i{FS.syncfs(false,function(err){if(err){console.error("Unable to sync IndexDB!\n"+err)}resolve()})}))}function get_preference_value(key){return Emval.toHandle(global_preferences[Emval.toValue(key)])}function has_preference_key(key){return Emval.toHandle(global_preferences.hasOwnProperty(Emval.toValue(key)))}function language_code_to_name(language_code){let names=new Intl.DisplayNames(["en-GB"],{type:"language"});return Emval.toHandle(names.of(Emval.toValue(language_code).replace("_","-")))}var global_audio_element=null;var global_audio_context=null;var global_audio_blobs=[];var global_audio_completion=[];var global_audio_worker_setup_data=[];if(false){}function set_audio_playback_buffer(rate_index){if(global_audio_blobs.length==0){return}const audio=global_audio_element;try{audio.srcObject=global_audio_blobs[Emval.toValue(rate_index)-1]}catch(e){audio.src=URL.createObjectURL(global_audio_blobs[Emval.toValue(rate_index)-1])}}function is_audio_stretched(rate_index){return Emval.toHandle(global_audio_completion[Emval.toValue(rate_index)-1])}function create_audio_playback(){global_audio_element=new Audio;const audio=global_audio_element;const AudioContext=window.AudioContext||window.webkitAudioContext;global_audio_context=new AudioContext;const track=global_audio_context.createMediaElementSource(global_audio_element);track.connect(global_audio_context.destination);audio.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA";if(audio.hasAttribute("webkitPreservesPitch")){audio.webkitPreservesPitch=true}else{audio.preservesPitch=true}default_console_log(global_audio_context.state);global_audio_context.resume();audio.play().then(()=>{audio.pause()});audio.onplay=e=>{_AudioOnPlay()};audio.onpause=e=>{_AudioOnPause()};audio.onended=e=>{_AudioOnEnded()};audio.ondurationchange=e=>{_AudioOnDurationChange()};window.onpagehide=e=>{}}function get_audio_playback_progress(){const audio=global_audio_element;return Emval.toHandle(audio.currentTime)}function get_audio_duration(){const audio=global_audio_element;return Emval.toHandle(audio.duration)}function set_audio_playback_progress(progress){const audio=global_audio_element;audio.currentTime=Emval.toValue(progress)}function set_audio_playback_speed(play_rate){const audio=global_audio_element;audio.playbackRate=Emval.toValue(play_rate)}function audio_element_play(){global_audio_element.play()}function audio_element_pause(){global_audio_element.pause()}function get_audio_samples_hybrid(stretch_index,crude_engine,fine_engine){const crudeEngine=Emval.toValue(crude_engine);const fineEngine=Emval.toValue(fine_engine);const stretchIndex=Emval.toValue(stretch_index);var useCrude=crudeEngine!=="";var audioWorker=new Worker("plugins/audiostretchworker.js");audioWorker.postMessage(global_audio_worker_setup_data);audioWorker.postMessage(["Work",useCrude?crudeEngine:fineEngine,stretchIndex,useCrude]);audioWorker.onmessage=result=>{if(useCrude){get_audio_samples_hybrid(Emval.toHandle(stretchIndex),Emval.toHandle(""),Emval.toHandle(fineEngine))}global_audio_blobs[result.data[1]-1]=result.data[0];global_audio_completion[result.data[1]-1]=true;_jsUpdateAudioBuffer(Emval.toHandle(result.data[1]));audioWorker.postMessage(["Revive"]);audioWorker.onmessage=result=>{audioWorker.terminate();if(useCrude){console.log("Resetting corse engine "+result.data[0])}else{console.log("Resetting fine engine "+result.data[0])}}}}function __asyncjs__get_audio_samples_setup(fs_path){return Asyncify.handleAsync(async()=>{const audioData=FS.readFile(Emval.toValue(fs_path));const audioBlob=new Blob([audioData.buffer],{type:"audio/mp3"});global_audio_blobs.length=10;global_audio_completion=[false,false,false,false,false,false,false,false,false,false];global_audio_context.decodeAudioData(await audioBlob.arrayBuffer(),buffer=>{const isSafari=!!window["safari"]&&safari!=="undefined";global_audio_blobs[9]=Module.audioBufferToBlob(buffer,buffer.sampleRate);global_audio_completion[9]=true;set_audio_playback_buffer(Emval.toHandle(10));if(_IsWaitingToPlay()){audio_element_play()}var audioDatas=[];audioDatas.length=buffer.numberOfChannels;for(var i=0;iEmval.toHandle(new Promise(resolve=>{FS.mount(MEMFS,{root:"."},".");FS.mkdir("/local");FS.mount(IDBFS,{},"/local");FS.syncfs(true,function(err){if(err){alert("Unable to sync IndexDB!\n"+err)}resolve()})})))}function get_runtime_platform(){const userAgent=window.navigator.userAgent;const platform=window.navigator?.userAgentData?.platform||window.navigator.platform;const macosPlatforms=["Macintosh","MacIntel","MacPPC","Mac68K"];const windowsPlatforms=["Win32","Win64","Windows","WinCE"];const iosPlatforms=["iPhone","iPad","iPod"];if(macosPlatforms.indexOf(platform)!==-1){return MAINWINDOW_PLATFORM_MAC}else if(iosPlatforms.indexOf(platform)!==-1){return MAINWINDOW_PLATFORM_IOS}else if(windowsPlatforms.indexOf(platform)!==-1){return MAINWINDOW_PLATFORM_WINDOWS}else if(/Android/.test(userAgent)){return MAINWINDOW_PLATFORM_ANDROID}else if(/Linux/.test(platform)){return MAINWINDOW_PLATFORM_LINUX}return MAINWINDOW_PLATFORM_UNSPECIFIED}const MAINWINDOW_PLATFORM_UNSPECIFIED=0;const MAINWINDOW_PLATFORM_WINDOWS=1;const MAINWINDOW_PLATFORM_MAC=2;const MAINWINDOW_PLATFORM_IOS=4;const MAINWINDOW_PLATFORM_ANDROID=8;const MAINWINDOW_PLATFORM_LINUX=16;function get_has_web_gpu(){return navigator.gpu!==undefined}function __asyncjs__webgpu_create_device(){return Asyncify.handleAsync(async()=>{WebGPU.initManagers();console.log("Create Start!");const adapter=await navigator.gpu.requestAdapter();const device=await adapter.requestDevice();Module.preinitializedWebGPUDevice=device;console.log("Create End!")})}function auto_resize_canvas(){window.addEventListener("resize",resize_canvas,false)}function resize_canvas(){document.getElementById("canvas").width=window.innerWidth*window.devicePixelRatio;document.getElementById("canvas").height=window.innerHeight*window.devicePixelRatio}function canvas_get_width(){return Module.canvas.width}function canvas_get_height(){return Module.canvas.height}function canvas_get_device_pixel_ratio(){return window.devicePixelRatio}function __asyncjs__setup_latency_metronome(){return Asyncify.handleAsync(async()=>{if(global_metronome_buffer!==null){return}const audioData=FS.readFile("/Sound/Metronome.mp3");const audioBlob=new Blob([audioData.buffer],{type:"audio/mp3"});global_audio_context.decodeAudioData(await audioBlob.arrayBuffer(),buffer=>{global_metronome_buffer=buffer})})}function play_latency_metronome(){global_metronome_source=global_audio_context.createBufferSource();global_metronome_source.buffer=global_metronome_buffer;global_metronome_source.loop=true;global_metronome_source.connect(global_audio_context.destination);global_metronome_source.start()}var global_metronome_buffer=null;var global_metronome_source=null;function stop_latency_metronome(){global_metronome_source.stop();global_metronome_source.disconnect();global_metronome_source=null}function get_audio_context_time(){return Emval.toHandle(global_audio_context.currentTime)}function ExitStatus(status){this.name="ExitStatus";this.message=`Program terminated with exit(${status})`;this.status=status}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var noExitRuntime=Module["noExitRuntime"]||true;var ptrToString=ptr=>{assert(typeof ptr==="number");ptr>>>=0;return"0x"+ptr.toString(16).padStart(8,"0")};var warnOnce=text=>{if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;if(ENVIRONMENT_IS_NODE)text="warning: "+text;err(text)}};var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;var UTF8ArrayToString=(heapOrArray,idx,maxBytesToRead)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead)=>{assert(typeof ptr=="number",`UTF8ToString expects a number (got ${typeof ptr})`);return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""};var ___assert_fail=(condition,filename,line,func)=>{abort(`Assertion failed: ${UTF8ToString(condition)}, at: `+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])};function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){HEAPU32[this.ptr+4>>2]=type};this.get_type=function(){return HEAPU32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAPU32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAPU32[this.ptr+8>>2]};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor)};this.set_adjusted_ptr=function(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return HEAPU32[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}var exceptionLast=0;var uncaughtExceptionCount=0;var ___cxa_throw=(ptr,type,destructor)=>{var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;assert(false,"Exception thrown, but exception catching is not enabled. Compile with -sNO_DISABLE_EXCEPTION_CATCHING or -sEXCEPTION_CATCHING_ALLOWED=[..] to catch.")};var PATH={isAbs:path=>path.charAt(0)==="/",splitPath:filename=>{var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:(parts,allowAboveRoot)=>{var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:path=>{var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(p=>!!p),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:path=>{var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:path=>{if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},join:function(){var paths=Array.prototype.slice.call(arguments);return PATH.normalize(paths.join("/"))},join2:(l,r)=>PATH.normalize(l+"/"+r)};var initRandomFill=()=>{if(typeof crypto=="object"&&typeof crypto["getRandomValues"]=="function"){return view=>crypto.getRandomValues(view)}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require("crypto");var randomFillSync=crypto_module["randomFillSync"];if(randomFillSync){return view=>crypto_module["randomFillSync"](view)}var randomBytes=crypto_module["randomBytes"];return view=>(view.set(randomBytes(view.byteLength)),view)}catch(e){}}abort("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")};var randomFill=view=>(randomFill=initRandomFill())(view);var PATH_FS={resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path)}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(p=>!!p),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:(from,to)=>{from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{assert(typeof str==="string",`stringToUTF8Array expects a string (got ${typeof str})`);if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;if(u>1114111)warnOnce("Invalid Unicode code point "+ptrToString(u)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF).");heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var FS_stdin_getChar=()=>{if(!FS_stdin_getChar_buffer.length){var result=null;if(ENVIRONMENT_IS_NODE){var BUFSIZE=256;var buf=Buffer.alloc(BUFSIZE);var bytesRead=0;var fd=process.stdin.fd;try{bytesRead=fs.readSync(fd,buf)}catch(e){if(e.toString().includes("EOF"))bytesRead=0;else throw e}if(bytesRead>0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}FS_stdin_getChar_buffer=intArrayFromString(result,true)}return FS_stdin_getChar_buffer.shift()};var TTY={ttys:[],init(){},shutdown(){},register(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close(stream){stream.tty.ops.fsync(stream.tty)},fsync(stream){stream.tty.ops.fsync(stream.tty)},read(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60)}var bytesRead=0;for(var i=0;i0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}},ioctl_tcgets(tty){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(tty,optional_actions,data){return 0},ioctl_tiocgwinsz(tty){return[24,80]}},default_tty1_ops:{put_char(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};var mmapAlloc=size=>{abort("internal error: mmapAlloc called but `emscripten_builtin_memalign` native symbol not exported")};var MEMFS={ops_table:null,mount(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents)},expandFileStorage(node,newCapacity){var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0)},resizeFileStorage(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize}},node_ops:{getattr(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup(parent,name){throw FS.genericErrors[44]},mknod(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir},unlink(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries},symlink(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);assert(size>=0);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+length{var dep=!noRunDep?getUniqueRunDependency(`al ${url}`):"";readAsync(url,arrayBuffer=>{assert(arrayBuffer,`Loading data file "${url}" failed (no arrayBuffer).`);onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},event=>{if(onerror){onerror()}else{throw`Loading data file "${url}" failed.`}});if(dep)addRunDependency(dep)};var FS_createDataFile=(parent,name,fileData,canRead,canWrite,canOwn)=>{FS.createDataFile(parent,name,fileData,canRead,canWrite,canOwn)};var preloadPlugins=Module["preloadPlugins"]||[];var FS_handledByPreloadPlugin=(byteArray,fullname,finish,onerror)=>{if(typeof Browser!="undefined")Browser.init();var handled=false;preloadPlugins.forEach(plugin=>{if(handled)return;if(plugin["canHandle"](fullname)){plugin["handle"](byteArray,fullname,finish,onerror);handled=true}});return handled};var FS_createPreloadedFile=(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish)=>{var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency(`cp ${fullname}`);function processData(byteArray){function finish(byteArray){if(preFinish)preFinish();if(!dontCreateFile){FS_createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}if(FS_handledByPreloadPlugin(byteArray,fullname,finish,()=>{if(onerror)onerror();removeRunDependency(dep)})){return}finish(byteArray)}addRunDependency(dep);if(typeof url=="string"){asyncLoad(url,byteArray=>processData(byteArray),onerror)}else{processData(url)}};var FS_modeStringToFlags=str=>{var flagModes={"r":0,"r+":2,"w":512|64|1,"w+":512|64|2,"a":1024|64|1,"a+":1024|64|2};var flags=flagModes[str];if(typeof flags=="undefined"){throw new Error(`Unknown file open mode: ${str}`)}return flags};var FS_getMode=(canRead,canWrite)=>{var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode};var IDBFS={dbs:{},indexedDB:()=>{if(typeof indexedDB!="undefined")return indexedDB;var ret=null;if(typeof window=="object")ret=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB;assert(ret,"IDBFS used, but indexedDB not supported");return ret},DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(mount){return MEMFS.mount.apply(null,arguments)},syncfs:(mount,populate,callback)=>{IDBFS.getLocalSet(mount,(err,local)=>{if(err)return callback(err);IDBFS.getRemoteSet(mount,(err,remote)=>{if(err)return callback(err);var src=populate?remote:local;var dst=populate?local:remote;IDBFS.reconcile(src,dst,callback)})})},quit:()=>{Object.values(IDBFS.dbs).forEach(value=>value.close());IDBFS.dbs={}},getDB:(name,callback)=>{var db=IDBFS.dbs[name];if(db){return callback(null,db)}var req;try{req=IDBFS.indexedDB().open(name,IDBFS.DB_VERSION)}catch(e){return callback(e)}if(!req){return callback("Unable to connect to IndexedDB")}req.onupgradeneeded=e=>{var db=e.target.result;var transaction=e.target.transaction;var fileStore;if(db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)){fileStore=transaction.objectStore(IDBFS.DB_STORE_NAME)}else{fileStore=db.createObjectStore(IDBFS.DB_STORE_NAME)}if(!fileStore.indexNames.contains("timestamp")){fileStore.createIndex("timestamp","timestamp",{unique:false})}};req.onsuccess=()=>{db=req.result;IDBFS.dbs[name]=db;callback(null,db)};req.onerror=e=>{callback(e.target.error);e.preventDefault()}},getLocalSet:(mount,callback)=>{var entries={};function isRealDir(p){return p!=="."&&p!==".."}function toAbsolute(root){return p=>PATH.join2(root,p)}var check=FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint));while(check.length){var path=check.pop();var stat;try{stat=FS.stat(path)}catch(e){return callback(e)}if(FS.isDir(stat.mode)){check.push.apply(check,FS.readdir(path).filter(isRealDir).map(toAbsolute(path)))}entries[path]={"timestamp":stat.mtime}}return callback(null,{type:"local",entries:entries})},getRemoteSet:(mount,callback)=>{var entries={};IDBFS.getDB(mount.mountpoint,(err,db)=>{if(err)return callback(err);try{var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readonly");transaction.onerror=e=>{callback(e.target.error);e.preventDefault()};var store=transaction.objectStore(IDBFS.DB_STORE_NAME);var index=store.index("timestamp");index.openKeyCursor().onsuccess=event=>{var cursor=event.target.result;if(!cursor){return callback(null,{type:"remote",db:db,entries:entries})}entries[cursor.primaryKey]={"timestamp":cursor.key};cursor.continue()}}catch(e){return callback(e)}})},loadLocalEntry:(path,callback)=>{var stat,node;try{var lookup=FS.lookupPath(path);node=lookup.node;stat=FS.stat(path)}catch(e){return callback(e)}if(FS.isDir(stat.mode)){return callback(null,{"timestamp":stat.mtime,"mode":stat.mode})}else if(FS.isFile(stat.mode)){node.contents=MEMFS.getFileDataAsTypedArray(node);return callback(null,{"timestamp":stat.mtime,"mode":stat.mode,"contents":node.contents})}else{return callback(new Error("node type not supported"))}},storeLocalEntry:(path,entry,callback)=>{try{if(FS.isDir(entry["mode"])){FS.mkdirTree(path,entry["mode"])}else if(FS.isFile(entry["mode"])){FS.writeFile(path,entry["contents"],{canOwn:true})}else{return callback(new Error("node type not supported"))}FS.chmod(path,entry["mode"]);FS.utime(path,entry["timestamp"],entry["timestamp"])}catch(e){return callback(e)}callback(null)},removeLocalEntry:(path,callback)=>{try{var stat=FS.stat(path);if(FS.isDir(stat.mode)){FS.rmdir(path)}else if(FS.isFile(stat.mode)){FS.unlink(path)}}catch(e){return callback(e)}callback(null)},loadRemoteEntry:(store,path,callback)=>{var req=store.get(path);req.onsuccess=event=>callback(null,event.target.result);req.onerror=e=>{callback(e.target.error);e.preventDefault()}},storeRemoteEntry:(store,path,entry,callback)=>{try{var req=store.put(entry,path)}catch(e){callback(e);return}req.onsuccess=event=>callback();req.onerror=e=>{callback(e.target.error);e.preventDefault()}},removeRemoteEntry:(store,path,callback)=>{var req=store.delete(path);req.onsuccess=event=>callback();req.onerror=e=>{callback(e.target.error);e.preventDefault()}},reconcile:(src,dst,callback)=>{var total=0;var create=[];Object.keys(src.entries).forEach(function(key){var e=src.entries[key];var e2=dst.entries[key];if(!e2||e["timestamp"].getTime()!=e2["timestamp"].getTime()){create.push(key);total++}});var remove=[];Object.keys(dst.entries).forEach(function(key){if(!src.entries[key]){remove.push(key);total++}});if(!total){return callback(null)}var errored=false;var db=src.type==="remote"?src.db:dst.db;var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readwrite");var store=transaction.objectStore(IDBFS.DB_STORE_NAME);function done(err){if(err&&!errored){errored=true;return callback(err)}}transaction.onerror=e=>{done(this.error);e.preventDefault()};transaction.oncomplete=e=>{if(!errored){callback(null)}};create.sort().forEach(path=>{if(dst.type==="local"){IDBFS.loadRemoteEntry(store,path,(err,entry)=>{if(err)return done(err);IDBFS.storeLocalEntry(path,entry,done)})}else{IDBFS.loadLocalEntry(path,(err,entry)=>{if(err)return done(err);IDBFS.storeRemoteEntry(store,path,entry,done)})}});remove.sort().reverse().forEach(path=>{if(dst.type==="local"){IDBFS.removeLocalEntry(path,done)}else{IDBFS.removeRemoteEntry(store,path,done)}})}};var ERRNO_MESSAGES={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"};var ERRNO_CODES={"EPERM":63,"ENOENT":44,"ESRCH":71,"EINTR":27,"EIO":29,"ENXIO":60,"E2BIG":1,"ENOEXEC":45,"EBADF":8,"ECHILD":12,"EAGAIN":6,"EWOULDBLOCK":6,"ENOMEM":48,"EACCES":2,"EFAULT":21,"ENOTBLK":105,"EBUSY":10,"EEXIST":20,"EXDEV":75,"ENODEV":43,"ENOTDIR":54,"EISDIR":31,"EINVAL":28,"ENFILE":41,"EMFILE":33,"ENOTTY":59,"ETXTBSY":74,"EFBIG":22,"ENOSPC":51,"ESPIPE":70,"EROFS":69,"EMLINK":34,"EPIPE":64,"EDOM":18,"ERANGE":68,"ENOMSG":49,"EIDRM":24,"ECHRNG":106,"EL2NSYNC":156,"EL3HLT":107,"EL3RST":108,"ELNRNG":109,"EUNATCH":110,"ENOCSI":111,"EL2HLT":112,"EDEADLK":16,"ENOLCK":46,"EBADE":113,"EBADR":114,"EXFULL":115,"ENOANO":104,"EBADRQC":103,"EBADSLT":102,"EDEADLOCK":16,"EBFONT":101,"ENOSTR":100,"ENODATA":116,"ETIME":117,"ENOSR":118,"ENONET":119,"ENOPKG":120,"EREMOTE":121,"ENOLINK":47,"EADV":122,"ESRMNT":123,"ECOMM":124,"EPROTO":65,"EMULTIHOP":36,"EDOTDOT":125,"EBADMSG":9,"ENOTUNIQ":126,"EBADFD":127,"EREMCHG":128,"ELIBACC":129,"ELIBBAD":130,"ELIBSCN":131,"ELIBMAX":132,"ELIBEXEC":133,"ENOSYS":52,"ENOTEMPTY":55,"ENAMETOOLONG":37,"ELOOP":32,"EOPNOTSUPP":138,"EPFNOSUPPORT":139,"ECONNRESET":15,"ENOBUFS":42,"EAFNOSUPPORT":5,"EPROTOTYPE":67,"ENOTSOCK":57,"ENOPROTOOPT":50,"ESHUTDOWN":140,"ECONNREFUSED":14,"EADDRINUSE":3,"ECONNABORTED":13,"ENETUNREACH":40,"ENETDOWN":38,"ETIMEDOUT":73,"EHOSTDOWN":142,"EHOSTUNREACH":23,"EINPROGRESS":26,"EALREADY":7,"EDESTADDRREQ":17,"EMSGSIZE":35,"EPROTONOSUPPORT":66,"ESOCKTNOSUPPORT":137,"EADDRNOTAVAIL":4,"ENETRESET":39,"EISCONN":30,"ENOTCONN":53,"ETOOMANYREFS":141,"EUSERS":136,"EDQUOT":19,"ESTALE":72,"ENOTSUP":138,"ENOMEDIUM":148,"EILSEQ":25,"EOVERFLOW":61,"ECANCELED":11,"ENOTRECOVERABLE":56,"EOWNERDEAD":62,"ESTRPIPE":135};var demangle=func=>{warnOnce("warning: build with -sDEMANGLE_SUPPORT to link in libcxxabi demangling");return func};var demangleAll=text=>{var regex=/\b_Z[\w\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+" ["+x+"]"})};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(path,opts={}){path=PATH_FS.resolve(path);if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};opts=Object.assign(defaults,opts);if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=path.split("/").filter(p=>!!p);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?`${mount}/${path}`:mount+path}path=path?`${node.name}/${path}`:node.name;node=node.parent}},hashName(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode(parent,name,mode,rdev){assert(typeof parent=="object");var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode(node){FS.hashRemoveNode(node)},isRoot(node){return node===node.parent},isMountpoint(node){return!!node.mounted},isFile(mode){return(mode&61440)===32768},isDir(mode){return(mode&61440)===16384},isLink(mode){return(mode&61440)===40960},isChrdev(mode){return(mode&61440)===8192},isBlkdev(mode){return(mode&61440)===24576},isFIFO(mode){return(mode&61440)===4096},isSocket(mode){return(mode&49152)===49152},flagsToPermissionString(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions(node,perms){if(FS.ignorePermissions){return 0}if(perms.includes("r")&&!(node.mode&292)){return 2}else if(perms.includes("w")&&!(node.mode&146)){return 2}else if(perms.includes("x")&&!(node.mode&73)){return 2}return 0},mayLookup(dir){var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate(dir,name){try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen(node,flags){if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd(){for(var fd=0;fd<=FS.MAX_OPEN_FDS;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStreamChecked(fd){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}return stream},getStream:fd=>FS.streams[fd],createStream(stream,fd=-1){if(!FS.FSStream){FS.FSStream=function(){this.shared={}};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get(){return this.node},set(val){this.node=val}},isRead:{get(){return(this.flags&2097155)!==1}},isWrite:{get(){return(this.flags&2097155)!==0}},isAppend:{get(){return this.flags&1024}},flags:{get(){return this.shared.flags},set(val){this.shared.flags=val}},position:{get(){return this.shared.position},set(val){this.shared.position=val}}})}stream=Object.assign(new FS.FSStream,stream);if(fd==-1){fd=FS.nextfd()}stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream(fd){FS.streams[fd]=null},chrdev_stream_ops:{open(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek(){throw new FS.ErrnoError(70)}},major:dev=>dev>>8,minor:dev=>dev&255,makedev:(ma,mi)=>ma<<8|mi,registerDevice(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:dev=>FS.devices[dev],getMounts(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs(populate,callback){if(typeof populate=="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err(`warning: ${FS.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`)}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){assert(FS.syncFSRequests>0);FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(mount=>{if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount(type,opts,mountpoint){if(typeof type=="string"){throw type}var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(hash=>{var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);assert(idx!==-1);node.mount.mounts.splice(idx,1)},lookup(parent,name){return parent.node_ops.lookup(parent,name)},mknod(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree(path,mode){var dirs=path.split("/");var d="";for(var i=0;i=0);if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.read){throw new FS.ErrnoError(28)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead},write(stream,buffer,offset,length,position,canOwn){assert(offset>=0);if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.write){throw new FS.ErrnoError(28)}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;return bytesWritten},allocate(stream,offset,length){if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(offset<0||length<=0){throw new FS.ErrnoError(28)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(stream.node.mode)){throw new FS.ErrnoError(43)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(138)}stream.stream_ops.allocate(stream,offset,length)},mmap(stream,length,position,prot,flags){if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43)}return stream.stream_ops.mmap(stream,length,position,prot,flags)},msync(stream,buffer,offset,length,mmapFlags){assert(offset>=0);if(!stream.stream_ops.msync){return 0}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags)},munmap:stream=>0,ioctl(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile(path,opts={}){opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error(`Invalid encoding type "${opts.encoding}"`)}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding==="binary"){ret=buf}FS.close(stream);return ret},writeFile(path,data,opts={}){opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data=="string"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error("Unsupported data type")}FS.close(stream)},cwd:()=>FS.currentPath,chdir(path){var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44)}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54)}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode)}FS.currentPath=lookup.path},createDefaultDirectories(){FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")},createDefaultDevices(){FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(stream,buffer,offset,length,pos)=>length});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var randomBuffer=new Uint8Array(1024),randomLeft=0;var randomByte=()=>{if(randomLeft===0){randomLeft=randomFill(randomBuffer).byteLength}return randomBuffer[--randomLeft]};FS.createDevice("/dev","random",randomByte);FS.createDevice("/dev","urandom",randomByte);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")},createSpecialDirectories(){FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount(){var node=FS.createNode(proc_self,"fd",16384|511,73);node.node_ops={lookup(parent,name){var fd=+name;var stream=FS.getStreamChecked(fd);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>stream.path}};ret.parent=ret;return ret}};return node}},{},"/proc/self/fd")},createStandardStreams(){if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"])}else{FS.symlink("/dev/tty","/dev/stdin")}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"])}else{FS.symlink("/dev/tty","/dev/stdout")}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"])}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin",0);var stdout=FS.open("/dev/stdout",1);var stderr=FS.open("/dev/stderr",1);assert(stdin.fd===0,`invalid handle for stdin (${stdin.fd})`);assert(stdout.fd===1,`invalid handle for stdout (${stdout.fd})`);assert(stderr.fd===2,`invalid handle for stderr (${stderr.fd})`)},ensureErrnoError(){if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.name="ErrnoError";this.node=node;this.setErrno=function(errno){this.errno=errno;for(var key in ERRNO_CODES){if(ERRNO_CODES[key]===errno){this.code=key;break}}};this.setErrno(errno);this.message=ERRNO_MESSAGES[errno];if(this.stack){Object.defineProperty(this,"stack",{value:(new Error).stack,writable:true});this.stack=demangleAll(this.stack)}};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(code=>{FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""})},staticInit(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS,"IDBFS":IDBFS}},init(input,output,error){assert(!FS.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()},quit(){FS.init.initialized=false;_fflush(0);for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(from,to)=>{if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}return intArrayFromString(xhr.responseText||"",true)};var lazyArray=this;lazyArray.setDataGetter(chunkNum=>{var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]=="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(key=>{var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);assert(size>=0);if(contents.slice){for(var i=0;i{FS.forceLoadFile(node);return writeChunks(stream,buffer,offset,length,position)};stream_ops.mmap=(stream,length,position,prot,flags)=>{FS.forceLoadFile(node);var ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}writeChunks(stream,HEAP8,ptr,length,position);return{ptr:ptr,allocated:true}};node.stream_ops=stream_ops;return node},absolutePath(){abort("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder(){abort("FS.createFolder has been removed; use FS.mkdir instead")},createLink(){abort("FS.createLink has been removed; use FS.symlink instead")},joinPath(){abort("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc(){abort("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath(){abort("FS.standardizePath has been removed; use PATH.normalize instead")}};var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt(dirfd,path,allowEmpty){if(PATH.isAbs(path)){return path}var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=SYSCALLS.getStreamFromFD(dirfd);dir=dirstream.path}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44)}return dir}return PATH.join2(dir,path)},doStat(func,path,buf){try{var stat=func(path)}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54}throw e}HEAP32[buf>>2]=stat.dev;HEAP32[buf+4>>2]=stat.mode;HEAPU32[buf+8>>2]=stat.nlink;HEAP32[buf+12>>2]=stat.uid;HEAP32[buf+16>>2]=stat.gid;HEAP32[buf+20>>2]=stat.rdev;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+24>>2]=tempI64[0],HEAP32[buf+28>>2]=tempI64[1];HEAP32[buf+32>>2]=4096;HEAP32[buf+36>>2]=stat.blocks;var atime=stat.atime.getTime();var mtime=stat.mtime.getTime();var ctime=stat.ctime.getTime();tempI64=[Math.floor(atime/1e3)>>>0,(tempDouble=Math.floor(atime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAPU32[buf+48>>2]=atime%1e3*1e3;tempI64=[Math.floor(mtime/1e3)>>>0,(tempDouble=Math.floor(mtime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+56>>2]=tempI64[0],HEAP32[buf+60>>2]=tempI64[1];HEAPU32[buf+64>>2]=mtime%1e3*1e3;tempI64=[Math.floor(ctime/1e3)>>>0,(tempDouble=Math.floor(ctime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+72>>2]=tempI64[0],HEAP32[buf+76>>2]=tempI64[1];HEAPU32[buf+80>>2]=ctime%1e3*1e3;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+88>>2]=tempI64[0],HEAP32[buf+92>>2]=tempI64[1];return 0},doMsync(addr,stream,len,flags,offset){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(flags&2){return 0}var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},varargs:undefined,get(){assert(SYSCALLS.varargs!=undefined);var ret=HEAP32[+SYSCALLS.varargs>>2];SYSCALLS.varargs+=4;return ret},getp(){return SYSCALLS.get()},getStr(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD(fd){var stream=FS.getStreamChecked(fd);return stream}};function ___syscall_chmod(path,mode){try{path=SYSCALLS.getStr(path);FS.chmod(path,mode);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_fchmod(fd,mode){try{FS.fchmod(fd,mode);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var setErrNo=value=>{HEAP32[___errno_location()>>2]=value;return value};function ___syscall_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-28}while(FS.streams[arg]){arg++}var newStream;newStream=FS.createStream(stream,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 5:{var arg=SYSCALLS.getp();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_fstat64(fd,buf){try{var stream=SYSCALLS.getStreamFromFD(fd);return SYSCALLS.doStat(FS.stat,stream.path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var convertI32PairToI53Checked=(lo,hi)=>{assert(lo==lo>>>0||lo==(lo|0));assert(hi===(hi|0));return hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN};function ___syscall_ftruncate64(fd,length_low,length_high){var length=convertI32PairToI53Checked(length_low,length_high);try{if(isNaN(length))return 61;FS.ftruncate(fd,length);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var stringToUTF8=(str,outPtr,maxBytesToWrite)=>{assert(typeof maxBytesToWrite=="number","stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)};function ___syscall_getdents64(fd,dirp,count){try{var stream=SYSCALLS.getStreamFromFD(fd);if(!stream.getdents){stream.getdents=FS.readdir(stream.path)}var struct_size=280;var pos=0;var off=FS.llseek(stream,0,1);var idx=Math.floor(off/struct_size);while(idx>>0,(tempDouble=id,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[dirp+pos>>2]=tempI64[0],HEAP32[dirp+pos+4>>2]=tempI64[1];tempI64=[(idx+1)*struct_size>>>0,(tempDouble=(idx+1)*struct_size,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[dirp+pos+8>>2]=tempI64[0],HEAP32[dirp+pos+12>>2]=tempI64[1];HEAP16[dirp+pos+16>>1]=280;HEAP8[dirp+pos+18>>0]=type;stringToUTF8(name,dirp+pos+19,256);pos+=struct_size;idx+=1}FS.llseek(stream,idx*struct_size,0);return pos}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:{if(!stream.tty)return-59;return 0}case 21505:{if(!stream.tty)return-59;if(stream.tty.ops.ioctl_tcgets){var termios=stream.tty.ops.ioctl_tcgets(stream);var argp=SYSCALLS.getp();HEAP32[argp>>2]=termios.c_iflag||0;HEAP32[argp+4>>2]=termios.c_oflag||0;HEAP32[argp+8>>2]=termios.c_cflag||0;HEAP32[argp+12>>2]=termios.c_lflag||0;for(var i=0;i<32;i++){HEAP8[argp+i+17>>0]=termios.c_cc[i]||0}return 0}return 0}case 21510:case 21511:case 21512:{if(!stream.tty)return-59;return 0}case 21506:case 21507:case 21508:{if(!stream.tty)return-59;if(stream.tty.ops.ioctl_tcsets){var argp=SYSCALLS.getp();var c_iflag=HEAP32[argp>>2];var c_oflag=HEAP32[argp+4>>2];var c_cflag=HEAP32[argp+8>>2];var c_lflag=HEAP32[argp+12>>2];var c_cc=[];for(var i=0;i<32;i++){c_cc.push(HEAP8[argp+i+17>>0])}return stream.tty.ops.ioctl_tcsets(stream.tty,op,{c_iflag:c_iflag,c_oflag:c_oflag,c_cflag:c_cflag,c_lflag:c_lflag,c_cc:c_cc})}return 0}case 21519:{if(!stream.tty)return-59;var argp=SYSCALLS.getp();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=SYSCALLS.getp();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;if(stream.tty.ops.ioctl_tiocgwinsz){var winsize=stream.tty.ops.ioctl_tiocgwinsz(stream.tty);var argp=SYSCALLS.getp();HEAP16[argp>>1]=winsize[0];HEAP16[argp+2>>1]=winsize[1]}return 0}case 21524:{if(!stream.tty)return-59;return 0}case 21515:{if(!stream.tty)return-59;return 0}default:return-28}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_lstat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.lstat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_mkdirat(dirfd,path,mode){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);path=PATH.normalize(path);if(path[path.length-1]==="/")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_newfstatat(dirfd,path,buf,flags){try{path=SYSCALLS.getStr(path);var nofollow=flags&256;var allowEmpty=flags&4096;flags=flags&~6400;assert(!flags,`unknown flags in __syscall_newfstatat: ${flags}`);path=SYSCALLS.calculateAt(dirfd,path,allowEmpty);return SYSCALLS.doStat(nofollow?FS.lstat:FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_openat(dirfd,path,flags,varargs){SYSCALLS.varargs=varargs;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);var mode=varargs?SYSCALLS.get():0;return FS.open(path,flags,mode).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_readlinkat(dirfd,path,buf,bufsize){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(bufsize<=0)return-28;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len]=endChar;return len}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_rmdir(path){try{path=SYSCALLS.getStr(path);FS.rmdir(path);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_stat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_symlink(target,linkpath){try{target=SYSCALLS.getStr(target);linkpath=SYSCALLS.getStr(linkpath);FS.symlink(target,linkpath);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_unlinkat(dirfd,path,flags){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(flags===0){FS.unlink(path)}else if(flags===512){FS.rmdir(path)}else{abort("Invalid flags passed to unlinkat")}return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var __embind_register_bigint=(primitiveType,name,size,minRange,maxRange)=>{};var embind_init_charCodes=()=>{var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes};var embind_charCodes;var readLatin1String=ptr=>{var ret="";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret};var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var BindingError;var throwBindingError=message=>{throw new BindingError(message)};var InternalError;var throwInternalError=message=>{throw new InternalError(message)};function sharedRegisterType(rawType,registeredInstance,options={}){var name=registeredInstance.name;if(!rawType){throwBindingError(`type "${name}" must have a positive integer typeid pointer`)}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(`Cannot register type '${name}' twice`)}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function registerType(rawType,registeredInstance,options={}){if(!("argPackAdvance"in registeredInstance)){throw new TypeError("registerType registeredInstance requires argPackAdvance")}return sharedRegisterType(rawType,registeredInstance,options)}var GenericWireTypeSize=8;var __embind_register_bool=(rawType,name,trueValue,falseValue)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(wt){return!!wt},"toWireType":function(destructors,o){return o?trueValue:falseValue},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":function(pointer){return this["fromWireType"](HEAPU8[pointer])},destructorFunction:null})};function handleAllocatorInit(){Object.assign(HandleAllocator.prototype,{get(id){assert(this.allocated[id]!==undefined,`invalid handle: ${id}`);return this.allocated[id]},has(id){return this.allocated[id]!==undefined},allocate(handle){var id=this.freelist.pop()||this.allocated.length;this.allocated[id]=handle;return id},free(id){assert(this.allocated[id]!==undefined);this.allocated[id]=undefined;this.freelist.push(id)}})}function HandleAllocator(){this.allocated=[undefined];this.freelist=[]}var emval_handles=new HandleAllocator;var __emval_decref=handle=>{if(handle>=emval_handles.reserved&&0===--emval_handles.get(handle).refcount){emval_handles.free(handle)}};var count_emval_handles=()=>{var count=0;for(var i=emval_handles.reserved;i{emval_handles.allocated.push({value:undefined},{value:null},{value:true},{value:false});emval_handles.reserved=emval_handles.allocated.length;Module["count_emval_handles"]=count_emval_handles};var Emval={toValue:handle=>{if(!handle){throwBindingError("Cannot use deleted val. handle = "+handle)}return emval_handles.get(handle).value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{return emval_handles.allocate({refcount:1,value:value})}}}};function simpleReadValueFromPointer(pointer){return this["fromWireType"](HEAP32[pointer>>2])}var __embind_register_emval=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":handle=>{var rv=Emval.toValue(handle);__emval_decref(handle);return rv},"toWireType":(destructors,value)=>Emval.toHandle(value),"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:null})};var embindRepr=v=>{if(v===null){return"null"}var t=typeof v;if(t==="object"||t==="array"||t==="function"){return v.toString()}else{return""+v}};var floatReadValueFromPointer=(name,width)=>{switch(width){case 4:return function(pointer){return this["fromWireType"](HEAPF32[pointer>>2])};case 8:return function(pointer){return this["fromWireType"](HEAPF64[pointer>>3])};default:throw new TypeError(`invalid float width (${width}): ${name}`)}};var __embind_register_float=(rawType,name,size)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":value=>value,"toWireType":(destructors,value)=>{if(typeof value!="number"&&typeof value!="boolean"){throw new TypeError(`Cannot convert ${embindRepr(value)} to ${this.name}`)}return value},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":floatReadValueFromPointer(name,size),destructorFunction:null})};var integerReadValueFromPointer=(name,width,signed)=>{switch(width){case 1:return signed?pointer=>HEAP8[pointer>>0]:pointer=>HEAPU8[pointer>>0];case 2:return signed?pointer=>HEAP16[pointer>>1]:pointer=>HEAPU16[pointer>>1];case 4:return signed?pointer=>HEAP32[pointer>>2]:pointer=>HEAPU32[pointer>>2];default:throw new TypeError(`invalid integer width (${width}): ${name}`)}};var __embind_register_integer=(primitiveType,name,size,minRange,maxRange)=>{name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<>>bitshift}var isUnsignedType=name.includes("unsigned");var checkAssertions=(value,toTypeName)=>{if(typeof value!="number"&&typeof value!="boolean"){throw new TypeError(`Cannot convert "${embindRepr(value)}" to ${toTypeName}`)}if(valuemaxRange){throw new TypeError(`Passing a number "${embindRepr(value)}" from JS side to C/C++ side to an argument of type "${name}", which is outside the valid range [${minRange}, ${maxRange}]!`)}};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":toWireType,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":integerReadValueFromPointer(name,size,minRange!==0),destructorFunction:null})};var __embind_register_memory_view=(rawType,dataTypeIndex,name)=>{var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){var size=HEAPU32[handle>>2];var data=HEAPU32[handle+4>>2];return new TA(HEAP8.buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})};function readPointer(pointer){return this["fromWireType"](HEAPU32[pointer>>2])}var __embind_register_std_string=(rawType,name)=>{name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType"(value){var length=HEAPU32[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+i]=charCode}}else{for(var i=0;i{assert(ptr%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr));var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{assert(outPtr%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!");assert(typeof maxBytesToWrite=="number","stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead)=>{assert(ptr%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{assert(outPtr%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!");assert(typeof maxBytesToWrite=="number","stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len};var __embind_register_std_wstring=(rawType,charSize,name)=>{name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=()=>HEAPU16;shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>HEAPU32;shift=2}registerType(rawType,{name:name,"fromWireType":value=>{var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},"toWireType":(destructors,value)=>{if(!(typeof value=="string")){throwBindingError(`Cannot pass non-string to C++ string type ${name}`)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction(ptr){_free(ptr)}})};var __embind_register_void=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":()=>undefined,"toWireType":(destructors,o)=>undefined})};var __emscripten_fs_load_embedded_files=ptr=>{do{var name_addr=HEAPU32[ptr>>2];ptr+=4;var len=HEAPU32[ptr>>2];ptr+=4;var content=HEAPU32[ptr>>2];ptr+=4;var name=UTF8ToString(name_addr);FS.createPath("/",PATH.dirname(name),true,true);FS.createDataFile(name,null,HEAP8.subarray(content,content+len),true,true,true)}while(HEAPU32[ptr>>2])};var getTypeName=type=>{var ptr=___getTypeName(type);var rv=readLatin1String(ptr);_free(ptr);return rv};var requireRegisteredType=(rawType,humanName)=>{var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(humanName+" has unknown type "+getTypeName(rawType))}return impl};var emval_returnValue=(returnType,destructorsRef,handle)=>{var destructors=[];var result=returnType["toWireType"](destructors,handle);if(destructors.length){HEAPU32[destructorsRef>>2]=Emval.toHandle(destructors)}return result};var __emval_as=(handle,returnType,destructorsRef)=>{handle=Emval.toValue(handle);returnType=requireRegisteredType(returnType,"emval::as");return emval_returnValue(returnType,destructorsRef,handle)};var runAndAbortIfError=func=>{try{return func()}catch(e){abort(e)}};var handleException=e=>{if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}checkStackCookie();if(e instanceof WebAssembly.RuntimeError){if(_emscripten_stack_get_current()<=0){err("Stack overflow detected. You can try increasing -sSTACK_SIZE (currently set to 65536)")}}quit_(1,e)};var runtimeKeepaliveCounter=0;var keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0;var _proc_exit=code=>{EXITSTATUS=code;if(!keepRuntimeAlive()){if(Module["onExit"])Module["onExit"](code);ABORT=true}quit_(code,new ExitStatus(code))};var exitJS=(status,implicit)=>{EXITSTATUS=status;checkUnflushedContent();if(keepRuntimeAlive()&&!implicit){var msg=`program exited (with status: ${status}), but keepRuntimeAlive() is set (counter=${runtimeKeepaliveCounter}) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)`;err(msg)}_proc_exit(status)};var _exit=exitJS;var maybeExit=()=>{if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(ABORT){err("user callback triggered after runtime exited or application aborted. Ignoring.");return}try{func();maybeExit()}catch(e){handleException(e)}};var Asyncify={instrumentWasmImports(imports){var importPattern=/^(invoke_.*|__asyncjs__.*)$/;for(var x in imports){(function(x){var original=imports[x];var sig=original.sig;if(typeof original=="function"){var isAsyncifyImport=original.isAsync||importPattern.test(x);imports[x]=function(){var originalAsyncifyState=Asyncify.state;try{return original.apply(null,arguments)}finally{var changedToDisabled=originalAsyncifyState===Asyncify.State.Normal&&Asyncify.state===Asyncify.State.Disabled;var ignoredInvoke=x.startsWith("invoke_")&&true;if(Asyncify.state!==originalAsyncifyState&&!isAsyncifyImport&&!changedToDisabled&&!ignoredInvoke){throw new Error(`import ${x} was not in ASYNCIFY_IMPORTS, but changed the state`)}}}}})(x)}},instrumentWasmExports(exports){var ret={};for(var x in exports){(function(x){var original=exports[x];if(typeof original=="function"){ret[x]=function(){Asyncify.exportCallStack.push(x);try{return original.apply(null,arguments)}finally{if(!ABORT){var y=Asyncify.exportCallStack.pop();assert(y===x);Asyncify.maybeStopUnwind()}}}}else{ret[x]=original}})(x)}return ret},State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId(funcName){var id=Asyncify.callStackNameToId[funcName];if(id===undefined){id=Asyncify.callStackId++;Asyncify.callStackNameToId[funcName]=id;Asyncify.callStackIdToName[id]=funcName}return id},maybeStopUnwind(){if(Asyncify.currData&&Asyncify.state===Asyncify.State.Unwinding&&Asyncify.exportCallStack.length===0){Asyncify.state=Asyncify.State.Normal;runAndAbortIfError(_asyncify_stop_unwind);if(typeof Fibers!="undefined"){Fibers.trampoline()}}},whenDone(){assert(Asyncify.currData,"Tried to wait for an async operation when none is in progress.");assert(!Asyncify.asyncPromiseHandlers,"Cannot have multiple async operations in flight at once");return new Promise((resolve,reject)=>{Asyncify.asyncPromiseHandlers={resolve:resolve,reject:reject}})},allocateData(){var ptr=_malloc(12+Asyncify.StackSize);Asyncify.setDataHeader(ptr,ptr+12,Asyncify.StackSize);Asyncify.setDataRewindFunc(ptr);return ptr},setDataHeader(ptr,stack,stackSize){HEAPU32[ptr>>2]=stack;HEAPU32[ptr+4>>2]=stack+stackSize},setDataRewindFunc(ptr){var bottomOfCallStack=Asyncify.exportCallStack[0];var rewindId=Asyncify.getCallStackId(bottomOfCallStack);HEAP32[ptr+8>>2]=rewindId},getDataRewindFunc(ptr){var id=HEAP32[ptr+8>>2];var name=Asyncify.callStackIdToName[id];var func=wasmExports[name];return func},doRewind(ptr){var start=Asyncify.getDataRewindFunc(ptr);return start()},handleSleep(startAsync){assert(Asyncify.state!==Asyncify.State.Disabled,"Asyncify cannot be done during or after the runtime exits");if(ABORT)return;if(Asyncify.state===Asyncify.State.Normal){var reachedCallback=false;var reachedAfterCallback=false;startAsync((handleSleepReturnValue=0)=>{assert(!handleSleepReturnValue||typeof handleSleepReturnValue=="number"||typeof handleSleepReturnValue=="boolean");if(ABORT)return;Asyncify.handleSleepReturnValue=handleSleepReturnValue;reachedCallback=true;if(!reachedAfterCallback){return}assert(!Asyncify.exportCallStack.length,"Waking up (starting to rewind) must be done from JS, without compiled code on the stack.");Asyncify.state=Asyncify.State.Rewinding;runAndAbortIfError(()=>_asyncify_start_rewind(Asyncify.currData));if(typeof Browser!="undefined"&&Browser.mainLoop.func){Browser.mainLoop.resume()}var asyncWasmReturnValue,isError=false;try{asyncWasmReturnValue=Asyncify.doRewind(Asyncify.currData)}catch(err){asyncWasmReturnValue=err;isError=true}var handled=false;if(!Asyncify.currData){var asyncPromiseHandlers=Asyncify.asyncPromiseHandlers;if(asyncPromiseHandlers){Asyncify.asyncPromiseHandlers=null;(isError?asyncPromiseHandlers.reject:asyncPromiseHandlers.resolve)(asyncWasmReturnValue);handled=true}}if(isError&&!handled){throw asyncWasmReturnValue}});reachedAfterCallback=true;if(!reachedCallback){Asyncify.state=Asyncify.State.Unwinding;Asyncify.currData=Asyncify.allocateData();if(typeof Browser!="undefined"&&Browser.mainLoop.func){Browser.mainLoop.pause()}runAndAbortIfError(()=>_asyncify_start_unwind(Asyncify.currData))}}else if(Asyncify.state===Asyncify.State.Rewinding){Asyncify.state=Asyncify.State.Normal;runAndAbortIfError(_asyncify_stop_rewind);_free(Asyncify.currData);Asyncify.currData=null;Asyncify.sleepCallbacks.forEach(func=>callUserCallback(func))}else{abort(`invalid state: ${Asyncify.state}`)}return Asyncify.handleSleepReturnValue},handleAsync(startAsync){return Asyncify.handleSleep(wakeUp=>{startAsync().then(wakeUp)})}};var __emval_await=promise=>Asyncify.handleAsync(()=>{promise=Emval.toValue(promise);return promise.then(Emval.toHandle)});__emval_await.isAsync=true;var emval_symbols={};var getStringOrSymbol=address=>{var symbol=emval_symbols[address];if(symbol===undefined){return readLatin1String(address)}return symbol};var __emval_new_cstring=v=>Emval.toHandle(getStringOrSymbol(v));var runDestructors=destructors=>{while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}};var __emval_run_destructors=handle=>{var destructors=Emval.toValue(handle);runDestructors(destructors);__emval_decref(handle)};var __emval_take_value=(type,arg)=>{type=requireRegisteredType(type,"_emval_take_value");var v=type["readValueFromPointer"](arg);return Emval.toHandle(v)};var _abort=()=>{abort("native code called abort()")};var readEmAsmArgsArray=[];var readEmAsmArgs=(sigPtr,buf)=>{assert(Array.isArray(readEmAsmArgsArray));assert(buf%16==0);readEmAsmArgsArray.length=0;var ch;while(ch=HEAPU8[sigPtr++]){var chr=String.fromCharCode(ch);var validChars=["d","f","i","p"];assert(validChars.includes(chr),`Invalid character ${ch}("${chr}") in readEmAsmArgs! Use only [${validChars}], and do not specify "v" for void return argument.`);var wide=ch!=105;wide&=ch!=112;buf+=wide&&buf%8?4:0;readEmAsmArgsArray.push(ch==112?HEAPU32[buf>>2]:ch==105?HEAP32[buf>>2]:HEAPF64[buf>>3]);buf+=wide?8:4}return readEmAsmArgsArray};var runEmAsmFunction=(code,sigPtr,argbuf)=>{var args=readEmAsmArgs(sigPtr,argbuf);assert(ASM_CONSTS.hasOwnProperty(code),`No EM_ASM constant found at address ${code}. The loaded WebAssembly file is likely out of sync with the generated JavaScript.`);return ASM_CONSTS[code].apply(null,args)};var _emscripten_asm_const_double=(code,sigPtr,argbuf)=>runEmAsmFunction(code,sigPtr,argbuf);var _emscripten_asm_const_int=(code,sigPtr,argbuf)=>runEmAsmFunction(code,sigPtr,argbuf);var _emscripten_get_now;_emscripten_get_now=()=>performance.now();var _emscripten_memcpy_js=(dest,src,num)=>HEAPU8.copyWithin(dest,src,src+num);var getHeapMax=()=>2147483648;var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){err(`growMemory: Attempted to grow heap from ${b.byteLength} bytes to ${size} bytes, but got error: ${e}`)}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;assert(requestedSize>oldSize);var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){err(`Cannot enlarge memory, requested ${requestedSize} bytes, but the limit is ${maxHeapSize} bytes!`);return false}var alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}err(`Failed to grow the heap from ${oldSize} bytes to ${newSize} bytes, not enough memory!`);return false};var safeSetTimeout=(func,timeout)=>setTimeout(()=>{callUserCallback(func)},timeout);var Browser={mainLoop:{running:false,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;setMainLoop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus(){if(Module["setStatus"]){var message=Module["statusMessage"]||"Please wait...";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining{assert(img.complete,`Image ${name} could not be decoded`);var canvas=document.createElement("canvas");canvas.width=img.width;canvas.height=img.height;var ctx=canvas.getContext("2d");ctx.drawImage(img,0,0);preloadedImages[name]=canvas;URL.revokeObjectURL(url);if(onload)onload(byteArray)};img.onerror=event=>{err(`Image ${url} could not be decoded`);if(onerror)onerror()};img.src=url};preloadPlugins.push(imagePlugin);var audioPlugin={};audioPlugin["canHandle"]=function audioPlugin_canHandle(name){return!Module.noAudioDecoding&&name.substr(-4)in{".ogg":1,".wav":1,".mp3":1}};audioPlugin["handle"]=function audioPlugin_handle(byteArray,name,onload,onerror){var done=false;function finish(audio){if(done)return;done=true;preloadedAudios[name]=audio;if(onload)onload(byteArray)}var b=new Blob([byteArray],{type:Browser.getMimetype(name)});var url=URL.createObjectURL(b);assert(typeof url=="string","createObjectURL must return a url as a string");var audio=new Audio;audio.addEventListener("canplaythrough",()=>finish(audio),false);audio.onerror=function audio_onerror(event){if(done)return;err(`warning: browser could not fully decode audio ${name}, trying slower base64 approach`);function encode64(data){var BASE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var PAD="=";var ret="";var leftchar=0;var leftbits=0;for(var i=0;i=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;safeSetTimeout(()=>{finish(audio)},1e4)};preloadPlugins.push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===Module["canvas"]||document["mozPointerLockElement"]===Module["canvas"]||document["webkitPointerLockElement"]===Module["canvas"]||document["msPointerLockElement"]===Module["canvas"]}var canvas=Module["canvas"];if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||(()=>{});canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||(()=>{});canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",ev=>{if(!Browser.pointerLock&&Module["canvas"].requestPointerLock){Module["canvas"].requestPointerLock();ev.preventDefault()}},false)}}},createContext(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:typeof WebGL2RenderingContext!="undefined"?2:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!="undefined"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext("2d")}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx=="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(callback=>callback());Browser.init()}return ctx},destroyContext(canvas,useWebGL,setInModule){},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen(lockPointer,resizeCanvas){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;if(typeof Browser.lockPointer=="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas=="undefined")Browser.resizeCanvas=false;var canvas=Module["canvas"];function fullscreenChange(){Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document["fullscreenElement"]||document["mozFullScreenElement"]||document["msFullscreenElement"]||document["webkitFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullscreen);if(Module["onFullscreen"])Module["onFullscreen"](Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullscreenChange,false);document.addEventListener("mozfullscreenchange",fullscreenChange,false);document.addEventListener("webkitfullscreenchange",fullscreenChange,false);document.addEventListener("MSFullscreenChange",fullscreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer["requestFullscreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullscreen"]?()=>canvasContainer["webkitRequestFullscreen"](Element["ALLOW_KEYBOARD_INPUT"]):null)||(canvasContainer["webkitRequestFullScreen"]?()=>canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"]):null);canvasContainer.requestFullscreen()},requestFullScreen(){abort("Module.requestFullScreen has been replaced by Module.requestFullscreen (without a capital S)")},exitFullscreen(){if(!Browser.isFullscreen){return false}var CFS=document["exitFullscreen"]||document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["msExitFullscreen"]||document["webkitCancelFullScreen"]||(()=>{});CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame(func){if(typeof requestAnimationFrame=="function"){requestAnimationFrame(func);return}var RAF=Browser.fakeRequestAnimationFrame;RAF(func)},safeSetTimeout(func,timeout){return safeSetTimeout(func,timeout)},safeRequestAnimationFrame(func){return Browser.requestAnimationFrame(()=>{callUserCallback(func)})},getMimetype(name){return{"jpg":"image/jpeg","jpeg":"image/jpeg","png":"image/png","bmp":"image/bmp","ogg":"audio/ogg","wav":"audio/wav","mp3":"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]},getUserMedia(func){if(!window.getUserMedia){window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"]}window.getUserMedia(func)},getMovementX(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0},getMovementY(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0},getMouseWheelDelta(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail/3;break;case"mousewheel":delta=event.wheelDelta/120;break;case"wheel":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw"unrecognized mouse wheel delta mode: "+event.deltaMode}break;default:throw"unrecognized mouse wheel event: "+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!="undefined"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!="undefined"?window.scrollY:window.pageYOffset;assert(typeof scrollX!="undefined"&&typeof scrollY!="undefined","Unable to retrieve scroll position, mouse positions likely broken.");if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}},resizeListeners:[],updateResizeListeners(){var canvas=Module["canvas"];Browser.resizeListeners.forEach(listener=>listener(canvas.width,canvas.height))},setCanvasSize(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags|8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},setWindowedCanvasSize(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags&~8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},updateCanvasDimensions(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h{Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){err("emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up.");return 1}if(!Browser.mainLoop.running){Browser.mainLoop.running=true}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method="timeout"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method="rAF"}else if(mode==2){if(typeof Browser.setImmediate=="undefined"){if(typeof setImmediate=="undefined"){var setImmediates=[];var emscriptenMainLoopMessageId="setimmediate";var Browser_setImmediate_messageHandler=event=>{if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener("message",Browser_setImmediate_messageHandler,true);Browser.setImmediate=function Browser_emulated_setImmediate(func){setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){if(Module["setImmediates"]===undefined)Module["setImmediates"]=[];Module["setImmediates"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,"*")}}else{Browser.setImmediate=setImmediate}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){Browser.setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method="immediate"}return 0};var setMainLoop=(browserIterationFunc,fps,simulateInfiniteLoop,arg,noSetTiming)=>{assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");Browser.mainLoop.func=browserIterationFunc;Browser.mainLoop.arg=arg;var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;function checkIsRunning(){if(thisMainLoopId0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}Browser.mainLoop.updateStatus();if(!checkIsRunning())return;setTimeout(Browser.mainLoop.runner,0);return}if(!checkIsRunning())return;Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0;if(Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}if(Browser.mainLoop.method==="timeout"&&Module.ctx){warnOnce("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!");Browser.mainLoop.method=""}Browser.mainLoop.runIter(browserIterationFunc);checkStackCookie();if(!checkIsRunning())return;if(typeof SDL=="object"&&SDL.audio&&SDL.audio.queueNewAudioData)SDL.audio.queueNewAudioData();Browser.mainLoop.scheduler()};if(!noSetTiming){if(fps&&fps>0){_emscripten_set_main_loop_timing(0,1e3/fps)}else{_emscripten_set_main_loop_timing(1,1)}Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw"unwind"}};var _emscripten_set_main_loop_arg=(func,arg,fps,simulateInfiniteLoop)=>{var browserIterationFunc=()=>(a1=>dynCall_vi.apply(null,[func,a1]))(arg);setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop,arg)};var withStackSave=f=>{var stack=stackSave();var ret=f();stackRestore(stack);return ret};var JSEvents={inEventHandler:0,removeAllEventListeners(){for(var i=JSEvents.eventHandlers.length-1;i>=0;--i){JSEvents._removeHandler(i)}JSEvents.eventHandlers=[];JSEvents.deferredCalls=[]},registerRemoveEventListeners(){if(!JSEvents.removeEventListenersRegistered){__ATEXIT__.push(JSEvents.removeAllEventListeners);JSEvents.removeEventListenersRegistered=true}},deferredCalls:[],deferCall(targetFunction,precedence,argsList){function arraysHaveEqualContent(arrA,arrB){if(arrA.length!=arrB.length)return false;for(var i in arrA){if(arrA[i]!=arrB[i])return false}return true}for(var i in JSEvents.deferredCalls){var call=JSEvents.deferredCalls[i];if(call.targetFunction==targetFunction&&arraysHaveEqualContent(call.argsList,argsList)){return}}JSEvents.deferredCalls.push({targetFunction:targetFunction,precedence:precedence,argsList:argsList});JSEvents.deferredCalls.sort((x,y)=>x.precedence{for(var i=0;ispecialHTMLTargets.indexOf(e)<0?e.getBoundingClientRect():{"left":0,"top":0};var fillMouseEventData=(eventStruct,e,target)=>{assert(eventStruct%4==0);HEAPF64[eventStruct>>3]=e.timeStamp;var idx=eventStruct>>2;HEAP32[idx+2]=e.screenX;HEAP32[idx+3]=e.screenY;HEAP32[idx+4]=e.clientX;HEAP32[idx+5]=e.clientY;HEAP32[idx+6]=e.ctrlKey;HEAP32[idx+7]=e.shiftKey;HEAP32[idx+8]=e.altKey;HEAP32[idx+9]=e.metaKey;HEAP16[idx*2+20]=e.button;HEAP16[idx*2+21]=e.buttons;HEAP32[idx+11]=e["movementX"];HEAP32[idx+12]=e["movementY"];var rect=getBoundingClientRect(target);HEAP32[idx+13]=e.clientX-rect.left;HEAP32[idx+14]=e.clientY-rect.top};var maybeCStringToJsString=cString=>cString>2?UTF8ToString(cString):cString;var findEventTarget=target=>{target=maybeCStringToJsString(target);var domElement=specialHTMLTargets[target]||(typeof document!="undefined"?document.querySelector(target):undefined);return domElement};var registerWheelEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{if(!JSEvents.wheelEvent)JSEvents.wheelEvent=_malloc(104);var wheelHandlerFunc=(e=event)=>{var wheelEvent=JSEvents.wheelEvent;fillMouseEventData(wheelEvent,e,target);HEAPF64[wheelEvent+72>>3]=e["deltaX"];HEAPF64[wheelEvent+80>>3]=e["deltaY"];HEAPF64[wheelEvent+88>>3]=e["deltaZ"];HEAP32[wheelEvent+96>>2]=e["deltaMode"];if(((a1,a2,a3)=>dynCall_iiii.apply(null,[callbackfunc,a1,a2,a3]))(eventTypeId,wheelEvent,userData))e.preventDefault()};var eventHandler={target:target,allowsDeferredCalls:true,eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:wheelHandlerFunc,useCapture:useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};var _emscripten_set_wheel_callback_on_thread=(target,userData,useCapture,callbackfunc,targetThread)=>{target=findEventTarget(target);if(!target)return-4;if(typeof target.onwheel!="undefined"){return registerWheelEventCallback(target,userData,useCapture,callbackfunc,9,"wheel",targetThread)}else{return-1}};var _emscripten_set_window_title=title=>document.title=UTF8ToString(title);var stringToUTF8OnStack=str=>{var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8(str,ret,size);return ret};var WebGPU={errorCallback:(callback,type,message,userdata)=>{withStackSave(()=>{var messagePtr=stringToUTF8OnStack(message);((a1,a2,a3)=>dynCall_viii.apply(null,[callback,a1,a2,a3]))(type,messagePtr,userdata)})},initManagers:()=>{if(WebGPU.mgrDevice)return;function Manager(){this.objects={};this.nextId=1;this.create=function(object,wrapper={}){var id=this.nextId++;assert(typeof this.objects[id]=="undefined");wrapper.refcount=1;wrapper.object=object;this.objects[id]=wrapper;return id};this.get=function(id){if(!id)return undefined;var o=this.objects[id];assert(typeof o!="undefined");return o.object};this.reference=function(id){var o=this.objects[id];assert(typeof o!="undefined");o.refcount++};this.release=function(id){var o=this.objects[id];assert(typeof o!="undefined");assert(o.refcount>0);o.refcount--;if(o.refcount<=0){delete this.objects[id]}}}WebGPU.mgrSurface=WebGPU.mgrSurface||new Manager;WebGPU.mgrSwapChain=WebGPU.mgrSwapChain||new Manager;WebGPU.mgrAdapter=WebGPU.mgrAdapter||new Manager;WebGPU.mgrDevice=WebGPU.mgrDevice||new Manager;WebGPU.mgrQueue=WebGPU.mgrQueue||new Manager;WebGPU.mgrCommandBuffer=WebGPU.mgrCommandBuffer||new Manager;WebGPU.mgrCommandEncoder=WebGPU.mgrCommandEncoder||new Manager;WebGPU.mgrRenderPassEncoder=WebGPU.mgrRenderPassEncoder||new Manager;WebGPU.mgrComputePassEncoder=WebGPU.mgrComputePassEncoder||new Manager;WebGPU.mgrBindGroup=WebGPU.mgrBindGroup||new Manager;WebGPU.mgrBuffer=WebGPU.mgrBuffer||new Manager;WebGPU.mgrSampler=WebGPU.mgrSampler||new Manager;WebGPU.mgrTexture=WebGPU.mgrTexture||new Manager;WebGPU.mgrTextureView=WebGPU.mgrTextureView||new Manager;WebGPU.mgrQuerySet=WebGPU.mgrQuerySet||new Manager;WebGPU.mgrBindGroupLayout=WebGPU.mgrBindGroupLayout||new Manager;WebGPU.mgrPipelineLayout=WebGPU.mgrPipelineLayout||new Manager;WebGPU.mgrRenderPipeline=WebGPU.mgrRenderPipeline||new Manager;WebGPU.mgrComputePipeline=WebGPU.mgrComputePipeline||new Manager;WebGPU.mgrShaderModule=WebGPU.mgrShaderModule||new Manager;WebGPU.mgrRenderBundleEncoder=WebGPU.mgrRenderBundleEncoder||new Manager;WebGPU.mgrRenderBundle=WebGPU.mgrRenderBundle||new Manager},makeColor:ptr=>({"r":HEAPF64[ptr>>3],"g":HEAPF64[ptr+8>>3],"b":HEAPF64[ptr+16>>3],"a":HEAPF64[ptr+24>>3]}),makeExtent3D:ptr=>({"width":HEAPU32[ptr>>2],"height":HEAPU32[ptr+4>>2],"depthOrArrayLayers":HEAPU32[ptr+8>>2]}),makeOrigin3D:ptr=>({"x":HEAPU32[ptr>>2],"y":HEAPU32[ptr+4>>2],"z":HEAPU32[ptr+8>>2]}),makeImageCopyTexture:ptr=>{assert(ptr);assert(HEAPU32[ptr>>2]===0);return{"texture":WebGPU.mgrTexture.get(HEAPU32[ptr+4>>2]),"mipLevel":HEAPU32[ptr+8>>2],"origin":WebGPU.makeOrigin3D(ptr+12),"aspect":WebGPU.TextureAspect[HEAPU32[ptr+24>>2]]}},makeTextureDataLayout:ptr=>{assert(ptr);assert(HEAPU32[ptr>>2]===0);var bytesPerRow=HEAPU32[ptr+16>>2];var rowsPerImage=HEAPU32[ptr+20>>2];return{"offset":HEAPU32[ptr+4+8>>2]*4294967296+HEAPU32[ptr+8>>2],"bytesPerRow":bytesPerRow===4294967295?undefined:bytesPerRow,"rowsPerImage":rowsPerImage===4294967295?undefined:rowsPerImage}},makeImageCopyBuffer:ptr=>{assert(ptr);assert(HEAPU32[ptr>>2]===0);var layoutPtr=ptr+8;var bufferCopyView=WebGPU.makeTextureDataLayout(layoutPtr);bufferCopyView["buffer"]=WebGPU.mgrBuffer.get(HEAPU32[ptr+32>>2]);return bufferCopyView},makePipelineConstants:(constantCount,constantsPtr)=>{if(!constantCount)return;var constants={};for(var i=0;i>2]);constants[key]=HEAPF64[entryPtr+8>>3]}return constants},makePipelineLayout:layoutPtr=>{if(!layoutPtr)return"auto";return WebGPU.mgrPipelineLayout.get(layoutPtr)},makeProgrammableStageDescriptor:ptr=>{if(!ptr)return undefined;assert(ptr);assert(HEAPU32[ptr>>2]===0);var desc={"module":WebGPU.mgrShaderModule.get(HEAPU32[ptr+4>>2]),"constants":WebGPU.makePipelineConstants(HEAPU32[ptr+12>>2],HEAPU32[ptr+16>>2])};var entryPointPtr=HEAPU32[ptr+8>>2];if(entryPointPtr)desc["entryPoint"]=UTF8ToString(entryPointPtr);return desc},DeviceLostReason:{undefined:0,destroyed:1},PreferredFormat:{rgba8unorm:18,bgra8unorm:23},BufferMapState:["unmapped","pending","mapped"],AddressMode:["repeat","mirror-repeat","clamp-to-edge"],BlendFactor:["zero","one","src","one-minus-src","src-alpha","one-minus-src-alpha","dst","one-minus-dst","dst-alpha","one-minus-dst-alpha","src-alpha-saturated","constant","one-minus-constant"],BlendOperation:["add","subtract","reverse-subtract","min","max"],BufferBindingType:[,"uniform","storage","read-only-storage"],CompareFunction:[,"never","less","less-equal","greater","greater-equal","equal","not-equal","always"],CompilationInfoRequestStatus:["success","error","device-lost","unknown"],CullMode:["none","front","back"],ErrorFilter:["validation","out-of-memory","internal"],FeatureName:[,"depth-clip-control","depth32float-stencil8","timestamp-query","texture-compression-bc","texture-compression-etc2","texture-compression-astc","indirect-first-instance","shader-f16","rg11b10ufloat-renderable","bgra8unorm-storage","float32filterable"],FilterMode:["nearest","linear"],FrontFace:["ccw","cw"],IndexFormat:[,"uint16","uint32"],LoadOp:[,"clear","load"],MipmapFilterMode:["nearest","linear"],PowerPreference:[,"low-power","high-performance"],PrimitiveTopology:["point-list","line-list","line-strip","triangle-list","triangle-strip"],QueryType:["occlusion","timestamp"],SamplerBindingType:[,"filtering","non-filtering","comparison"],StencilOperation:["keep","zero","replace","invert","increment-clamp","decrement-clamp","increment-wrap","decrement-wrap"],StorageTextureAccess:[,"write-only"],StoreOp:[,"store","discard"],TextureAspect:["all","stencil-only","depth-only"],TextureDimension:["1d","2d","3d"],TextureFormat:[,"r8unorm","r8snorm","r8uint","r8sint","r16uint","r16sint","r16float","rg8unorm","rg8snorm","rg8uint","rg8sint","r32float","r32uint","r32sint","rg16uint","rg16sint","rg16float","rgba8unorm","rgba8unorm-srgb","rgba8snorm","rgba8uint","rgba8sint","bgra8unorm","bgra8unorm-srgb","rgb10a2unorm","rg11b10ufloat","rgb9e5ufloat","rg32float","rg32uint","rg32sint","rgba16uint","rgba16sint","rgba16float","rgba32float","rgba32uint","rgba32sint","stencil8","depth16unorm","depth24plus","depth24plus-stencil8","depth32float","depth32float-stencil8","bc1-rgba-unorm","bc1-rgba-unorm-srgb","bc2-rgba-unorm","bc2-rgba-unorm-srgb","bc3-rgba-unorm","bc3-rgba-unorm-srgb","bc4-r-unorm","bc4-r-snorm","bc5-rg-unorm","bc5-rg-snorm","bc6h-rgb-ufloat","bc6h-rgb-float","bc7-rgba-unorm","bc7-rgba-unorm-srgb","etc2-rgb8unorm","etc2-rgb8unorm-srgb","etc2-rgb8a1unorm","etc2-rgb8a1unorm-srgb","etc2-rgba8unorm","etc2-rgba8unorm-srgb","eac-r11unorm","eac-r11snorm","eac-rg11unorm","eac-rg11snorm","astc-4x4-unorm","astc-4x4-unorm-srgb","astc-5x4-unorm","astc-5x4-unorm-srgb","astc-5x5-unorm","astc-5x5-unorm-srgb","astc-6x5-unorm","astc-6x5-unorm-srgb","astc-6x6-unorm","astc-6x6-unorm-srgb","astc-8x5-unorm","astc-8x5-unorm-srgb","astc-8x6-unorm","astc-8x6-unorm-srgb","astc-8x8-unorm","astc-8x8-unorm-srgb","astc-10x5-unorm","astc-10x5-unorm-srgb","astc-10x6-unorm","astc-10x6-unorm-srgb","astc-10x8-unorm","astc-10x8-unorm-srgb","astc-10x10-unorm","astc-10x10-unorm-srgb","astc-12x10-unorm","astc-12x10-unorm-srgb","astc-12x12-unorm","astc-12x12-unorm-srgb"],TextureSampleType:[,"float","unfilterable-float","depth","sint","uint"],TextureViewDimension:[,"1d","2d","2d-array","cube","cube-array","3d"],VertexFormat:[,"uint8x2","uint8x4","sint8x2","sint8x4","unorm8x2","unorm8x4","snorm8x2","snorm8x4","uint16x2","uint16x4","sint16x2","sint16x4","unorm16x2","unorm16x4","snorm16x2","snorm16x4","float16x2","float16x4","float32","float32x2","float32x3","float32x4","uint32","uint32x2","uint32x3","uint32x4","sint32","sint32x2","sint32x3","sint32x4"],VertexStepMode:["vertex","instance"],FeatureNameString2Enum:{undefined:"0","depth-clip-control":"1","depth32float-stencil8":"2","timestamp-query":"3","texture-compression-bc":"4","texture-compression-etc2":"5","texture-compression-astc":"6","indirect-first-instance":"7","shader-f16":"8","rg11b10ufloat-renderable":"9","bgra8unorm-storage":"10",float32filterable:"11"}};var _emscripten_webgpu_get_device=()=>{assert(Module["preinitializedWebGPUDevice"]);if(WebGPU.preinitializedDeviceId===undefined){var device=Module["preinitializedWebGPUDevice"];var deviceWrapper={queueId:WebGPU.mgrQueue.create(device["queue"])};WebGPU.preinitializedDeviceId=WebGPU.mgrDevice.create(device,deviceWrapper)}WebGPU.mgrDevice.reference(WebGPU.preinitializedDeviceId);return WebGPU.preinitializedDeviceId};var ENV={};var getExecutableName=()=>thisProgram||"./this.program";var getEnvStrings=()=>{if(!getEnvStrings.strings){var lang=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(`${x}=${env[x]}`)}getEnvStrings.strings=strings}return getEnvStrings.strings};var stringToAscii=(str,buffer)=>{for(var i=0;i>0]=str.charCodeAt(i)}HEAP8[buffer>>0]=0};var _environ_get=(__environ,environ_buf)=>{var bufSize=0;getEnvStrings().forEach((string,i)=>{var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>2]=ptr;stringToAscii(string,ptr);bufSize+=string.length+1});return 0};var _environ_sizes_get=(penviron_count,penviron_buf_size)=>{var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(string=>bufSize+=string.length+1);HEAPU32[penviron_buf_size>>2]=bufSize;return 0};function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_fdstat_get(fd,pbuf){try{var rightsBase=0;var rightsInheriting=0;var flags=0;{var stream=SYSCALLS.getStreamFromFD(fd);var type=stream.tty?2:FS.isDir(stream.mode)?3:FS.isLink(stream.mode)?7:4}HEAP8[pbuf>>0]=type;HEAP16[pbuf+2>>1]=flags;tempI64=[rightsBase>>>0,(tempDouble=rightsBase,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[pbuf+8>>2]=tempI64[0],HEAP32[pbuf+12>>2]=tempI64[1];tempI64=[rightsInheriting>>>0,(tempDouble=rightsInheriting,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[pbuf+16>>2]=tempI64[0],HEAP32[pbuf+20>>2]=tempI64[1];return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var doReadv=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){var offset=convertI32PairToI53Checked(offset_low,offset_high);try{if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var doWritev=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(typeof offset!=="undefined"){offset+=curr}}return ret};function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var webgl_enable_ANGLE_instanced_arrays=ctx=>{var ext=ctx.getExtension("ANGLE_instanced_arrays");if(ext){ctx["vertexAttribDivisor"]=(index,divisor)=>ext["vertexAttribDivisorANGLE"](index,divisor);ctx["drawArraysInstanced"]=(mode,first,count,primcount)=>ext["drawArraysInstancedANGLE"](mode,first,count,primcount);ctx["drawElementsInstanced"]=(mode,count,type,indices,primcount)=>ext["drawElementsInstancedANGLE"](mode,count,type,indices,primcount);return 1}};var webgl_enable_OES_vertex_array_object=ctx=>{var ext=ctx.getExtension("OES_vertex_array_object");if(ext){ctx["createVertexArray"]=()=>ext["createVertexArrayOES"]();ctx["deleteVertexArray"]=vao=>ext["deleteVertexArrayOES"](vao);ctx["bindVertexArray"]=vao=>ext["bindVertexArrayOES"](vao);ctx["isVertexArray"]=vao=>ext["isVertexArrayOES"](vao);return 1}};var webgl_enable_WEBGL_draw_buffers=ctx=>{var ext=ctx.getExtension("WEBGL_draw_buffers");if(ext){ctx["drawBuffers"]=(n,bufs)=>ext["drawBuffersWEBGL"](n,bufs);return 1}};var webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance=ctx=>!!(ctx.dibvbi=ctx.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"));var webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance=ctx=>!!(ctx.mdibvbi=ctx.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"));var webgl_enable_WEBGL_multi_draw=ctx=>!!(ctx.multiDrawWebgl=ctx.getExtension("WEBGL_multi_draw"));var GL={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function recordError(errorCode){if(!GL.lastError){GL.lastError=errorCode}},getNewId:table=>{var ret=GL.counter++;for(var i=table.length;i{var source="";for(var i=0;i>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},createContext:(canvas,webGLContextAttributes)=>{if(!canvas.getContextSafariWebGL2Fixed){canvas.getContextSafariWebGL2Fixed=canvas.getContext;function fixedGetContext(ver,attrs){var gl=canvas.getContextSafariWebGL2Fixed(ver,attrs);return ver=="webgl"==gl instanceof WebGLRenderingContext?gl:null}canvas.getContext=fixedGetContext}var ctx=webGLContextAttributes.majorVersion>1?canvas.getContext("webgl2",webGLContextAttributes):canvas.getContext("webgl",webGLContextAttributes);if(!ctx)return 0;var handle=GL.registerContext(ctx,webGLContextAttributes);return handle},registerContext:(ctx,webGLContextAttributes)=>{var handle=GL.getNewId(GL.contexts);var context={handle:handle,attributes:webGLContextAttributes,version:webGLContextAttributes.majorVersion,GLctx:ctx};if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;if(typeof webGLContextAttributes.enableExtensionsByDefault=="undefined"||webGLContextAttributes.enableExtensionsByDefault){GL.initExtensions(context)}return handle},makeContextCurrent:contextHandle=>{GL.currentContext=GL.contexts[contextHandle];Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx;return!(contextHandle&&!GLctx)},getContext:contextHandle=>GL.contexts[contextHandle],deleteContext:contextHandle=>{if(GL.currentContext===GL.contexts[contextHandle]){GL.currentContext=null}if(typeof JSEvents=="object"){JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas)}if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas){GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined}GL.contexts[contextHandle]=null},initExtensions:context=>{if(!context)context=GL.currentContext;if(context.initExtensionsDone)return;context.initExtensionsDone=true;var GLctx=context.GLctx;webgl_enable_ANGLE_instanced_arrays(GLctx);webgl_enable_OES_vertex_array_object(GLctx);webgl_enable_WEBGL_draw_buffers(GLctx);webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(GLctx);webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(GLctx);if(context.version>=2){GLctx.disjointTimerQueryExt=GLctx.getExtension("EXT_disjoint_timer_query_webgl2")}if(context.version<2||!GLctx.disjointTimerQueryExt){GLctx.disjointTimerQueryExt=GLctx.getExtension("EXT_disjoint_timer_query")}webgl_enable_WEBGL_multi_draw(GLctx);var exts=GLctx.getSupportedExtensions()||[];exts.forEach(ext=>{if(!ext.includes("lose_context")&&!ext.includes("debug")){GLctx.getExtension(ext)}})},getExtensions(){var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(e=>"GL_"+e));return exts}};function _glActiveTexture(x0){GLctx.activeTexture(x0)}var _glAttachShader=(program,shader)=>{GLctx.attachShader(GL.programs[program],GL.shaders[shader])};var _glBindBuffer=(target,buffer)=>{if(target==35051){GLctx.currentPixelPackBufferBinding=buffer}else if(target==35052){GLctx.currentPixelUnpackBufferBinding=buffer}GLctx.bindBuffer(target,GL.buffers[buffer])};var _glBindTexture=(target,texture)=>{GLctx.bindTexture(target,GL.textures[texture])};var _glBindVertexArray=vao=>{GLctx.bindVertexArray(GL.vaos[vao])};var _glBindVertexArrayOES=_glBindVertexArray;function _glBlendEquation(x0){GLctx.blendEquation(x0)}function _glBlendEquationSeparate(x0,x1){GLctx.blendEquationSeparate(x0,x1)}function _glBlendFuncSeparate(x0,x1,x2,x3){GLctx.blendFuncSeparate(x0,x1,x2,x3)}var _glBufferData=(target,size,data,usage)=>{if(GL.currentContext.version>=2){if(data&&size){GLctx.bufferData(target,HEAPU8,usage,data,size)}else{GLctx.bufferData(target,size,usage)}}else{GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}};var _glBufferSubData=(target,offset,size,data)=>{if(GL.currentContext.version>=2){size&&GLctx.bufferSubData(target,offset,HEAPU8,data,size);return}GLctx.bufferSubData(target,offset,HEAPU8.subarray(data,data+size))};function _glClear(x0){GLctx.clear(x0)}function _glClearColor(x0,x1,x2,x3){GLctx.clearColor(x0,x1,x2,x3)}var _glCompileShader=shader=>{GLctx.compileShader(GL.shaders[shader])};var _glCreateProgram=()=>{var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;program.maxUniformLength=program.maxAttributeLength=program.maxUniformBlockNameLength=0;program.uniformIdCounter=1;GL.programs[id]=program;return id};var _glCreateShader=shaderType=>{var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id};var _glDeleteShader=id=>{if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null};var _glDeleteTextures=(n,textures)=>{for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}};var _glDeleteVertexArrays=(n,vaos)=>{for(var i=0;i>2];GLctx.deleteVertexArray(GL.vaos[id]);GL.vaos[id]=null}};var _glDeleteVertexArraysOES=_glDeleteVertexArrays;var _glDetachShader=(program,shader)=>{GLctx.detachShader(GL.programs[program],GL.shaders[shader])};function _glDisable(x0){GLctx.disable(x0)}var _glDrawElements=(mode,count,type,indices)=>{GLctx.drawElements(mode,count,type,indices)};function _glEnable(x0){GLctx.enable(x0)}var _glEnableVertexAttribArray=index=>{GLctx.enableVertexAttribArray(index)};var __glGenObject=(n,buffers,createFunction,objectTable)=>{for(var i=0;i>2]=id}};var _glGenBuffers=(n,buffers)=>{__glGenObject(n,buffers,"createBuffer",GL.buffers)};var _glGenTextures=(n,textures)=>{__glGenObject(n,textures,"createTexture",GL.textures)};function _glGenVertexArrays(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}var _glGenVertexArraysOES=_glGenVertexArrays;var _glGetAttribLocation=(program,name)=>GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name));var readI53FromI64=ptr=>HEAPU32[ptr>>2]+HEAP32[ptr+4>>2]*4294967296;var readI53FromU64=ptr=>HEAPU32[ptr>>2]+HEAPU32[ptr+4>>2]*4294967296;var writeI53ToI64=(ptr,num)=>{HEAPU32[ptr>>2]=num;var lower=HEAPU32[ptr>>2];HEAPU32[ptr+4>>2]=(num-lower)/4294967296;var deserialized=num>=0?readI53FromU64(ptr):readI53FromI64(ptr);var offset=ptr>>2;if(deserialized!=num)warnOnce(`writeI53ToI64() out of range: serialized JS Number ${num} to Wasm heap as bytes lo=${ptrToString(HEAPU32[offset])}, hi=${ptrToString(HEAPU32[offset+1])}, which deserializes back to ${deserialized} instead!`)};var emscriptenWebGLGet=(name_,p,type)=>{if(!p){GL.recordError(1281);return}var ret=undefined;switch(name_){case 36346:ret=1;break;case 36344:if(type!=0&&type!=1){GL.recordError(1280)}return;case 34814:case 36345:ret=0;break;case 34466:var formats=GLctx.getParameter(34467);ret=formats?formats.length:0;break;case 33309:if(GL.currentContext.version<2){GL.recordError(1282);return}var exts=GLctx.getSupportedExtensions()||[];ret=2*exts.length;break;case 33307:case 33308:if(GL.currentContext.version<2){GL.recordError(1280);return}ret=name_==33307?3:0;break}if(ret===undefined){var result=GLctx.getParameter(name_);switch(typeof result){case"number":ret=result;break;case"boolean":ret=result?1:0;break;case"string":GL.recordError(1280);return;case"object":if(result===null){switch(name_){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:{ret=0;break}default:{GL.recordError(1280);return}}}else if(result instanceof Float32Array||result instanceof Uint32Array||result instanceof Int32Array||result instanceof Array){for(var i=0;i>2]=result[i];break;case 2:HEAPF32[p+i*4>>2]=result[i];break;case 4:HEAP8[p+i>>0]=result[i]?1:0;break}}return}else{try{ret=result.name|0}catch(e){GL.recordError(1280);err(`GL_INVALID_ENUM in glGet${type}v: Unknown object returned from WebGL getParameter(${name_})! (error: ${e})`);return}}break;default:GL.recordError(1280);err(`GL_INVALID_ENUM in glGet${type}v: Native code calling glGet${type}v(${name_}) and it returns ${result} of type ${typeof result}!`);return}}switch(type){case 1:writeI53ToI64(p,ret);break;case 0:HEAP32[p>>2]=ret;break;case 2:HEAPF32[p>>2]=ret;break;case 4:HEAP8[p>>0]=ret?1:0;break}};var _glGetIntegerv=(name_,p)=>emscriptenWebGLGet(name_,p,0);var _glGetProgramInfoLog=(program,maxLength,length,infoLog)=>{var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull};var _glGetProgramiv=(program,pname,p)=>{if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}program=GL.programs[program];if(pname==35716){var log=GLctx.getProgramInfoLog(program);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){if(!program.maxUniformLength){for(var i=0;i>2]=program.maxUniformLength}else if(pname==35722){if(!program.maxAttributeLength){for(var i=0;i>2]=program.maxAttributeLength}else if(pname==35381){if(!program.maxUniformBlockNameLength){for(var i=0;i>2]=program.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(program,pname)}};var _glGetShaderInfoLog=(shader,maxLength,length,infoLog)=>{var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull};var _glGetShaderiv=(shader,pname,p)=>{if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var logLength=log?log.length+1:0;HEAP32[p>>2]=logLength}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source?source.length+1:0;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}};var jstoi_q=str=>parseInt(str);var webglGetLeftBracePos=name=>name.slice(-1)=="]"&&name.lastIndexOf("[");var webglPrepareUniformLocationsBeforeFirstUse=program=>{var uniformLocsById=program.uniformLocsById,uniformSizeAndIdsByName=program.uniformSizeAndIdsByName,i,j;if(!uniformLocsById){program.uniformLocsById=uniformLocsById={};program.uniformArrayNamesById={};for(i=0;i0?nm.slice(0,lb):nm;var id=program.uniformIdCounter;program.uniformIdCounter+=sz;uniformSizeAndIdsByName[arrayName]=[sz,id];for(j=0;j{name=UTF8ToString(name);if(program=GL.programs[program]){webglPrepareUniformLocationsBeforeFirstUse(program);var uniformLocsById=program.uniformLocsById;var arrayIndex=0;var uniformBaseName=name;var leftBrace=webglGetLeftBracePos(name);if(leftBrace>0){arrayIndex=jstoi_q(name.slice(leftBrace+1))>>>0;uniformBaseName=name.slice(0,leftBrace)}var sizeAndId=program.uniformSizeAndIdsByName[uniformBaseName];if(sizeAndId&&arrayIndex{program=GL.programs[program];if(!program)return 0;return GLctx.isProgram(program)};var _glLinkProgram=program=>{program=GL.programs[program];GLctx.linkProgram(program);program.uniformLocsById=0;program.uniformSizeAndIdsByName={}};var _glPixelStorei=(pname,param)=>{if(pname==3317){GL.unpackAlignment=param}GLctx.pixelStorei(pname,param)};function _glScissor(x0,x1,x2,x3){GLctx.scissor(x0,x1,x2,x3)}var _glShaderSource=(shader,count,string,length)=>{var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)};var computeUnpackAlignedImageSize=(width,height,sizePerPixel,alignment)=>{function roundedToNextMultipleOf(x,y){return x+y-1&-y}var plainRowSize=width*sizePerPixel;var alignedRowSize=roundedToNextMultipleOf(plainRowSize,alignment);return height*alignedRowSize};var colorChannelsInGlTextureFormat=format=>{var colorChannels={5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4};return colorChannels[format-6402]||1};var heapObjectForWebGLType=type=>{type-=5120;if(type==0)return HEAP8;if(type==1)return HEAPU8;if(type==2)return HEAP16;if(type==4)return HEAP32;if(type==6)return HEAPF32;if(type==5||type==28922||type==28520||type==30779||type==30782)return HEAPU32;return HEAPU16};var heapAccessShiftForWebGLHeap=heap=>31-Math.clz32(heap.BYTES_PER_ELEMENT);var emscriptenWebGLGetTexPixelData=(type,format,width,height,pixels,internalFormat)=>{var heap=heapObjectForWebGLType(type);var shift=heapAccessShiftForWebGLHeap(heap);var byteSize=1<>shift,pixels+bytes>>shift)};var _glTexImage2D=(target,level,internalFormat,width,height,border,format,type,pixels)=>{if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,null)}return}GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)};function _glTexParameteri(x0,x1,x2){GLctx.texParameteri(x0,x1,x2)}var webglGetUniformLocation=location=>{var p=GLctx.currentProgram;if(p){var webglLoc=p.uniformLocsById[location];if(typeof webglLoc=="number"){p.uniformLocsById[location]=webglLoc=GLctx.getUniformLocation(p,p.uniformArrayNamesById[location]+(webglLoc>0?`[${webglLoc}]`:""))}return webglLoc}else{GL.recordError(1282)}};var _glUniform1i=(location,v0)=>{GLctx.uniform1i(webglGetUniformLocation(location),v0)};var miniTempWebGLFloatBuffers=[];var _glUniformMatrix4fv=(location,count,transpose,value)=>{if(GL.currentContext.version>=2){count&&GLctx.uniformMatrix4fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*16);return}if(count<=18){var view=miniTempWebGLFloatBuffers[16*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<16*count;i+=16){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3];view[i+4]=heap[dst+4];view[i+5]=heap[dst+5];view[i+6]=heap[dst+6];view[i+7]=heap[dst+7];view[i+8]=heap[dst+8];view[i+9]=heap[dst+9];view[i+10]=heap[dst+10];view[i+11]=heap[dst+11];view[i+12]=heap[dst+12];view[i+13]=heap[dst+13];view[i+14]=heap[dst+14];view[i+15]=heap[dst+15]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(webglGetUniformLocation(location),!!transpose,view)};var _glUseProgram=program=>{program=GL.programs[program];GLctx.useProgram(program);GLctx.currentProgram=program};var _glVertexAttribPointer=(index,size,type,normalized,stride,ptr)=>{GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)};function _glViewport(x0,x1,x2,x3){GLctx.viewport(x0,x1,x2,x3)}function GLFW_Window(id,width,height,title,monitor,share){this.id=id;this.x=0;this.y=0;this.fullscreen=false;this.storedX=0;this.storedY=0;this.width=width;this.height=height;this.storedWidth=width;this.storedHeight=height;this.title=title;this.monitor=monitor;this.share=share;this.attributes=GLFW.hints;this.inputModes={208897:212993,208898:0,208899:0};this.buttons=0;this.keys=new Array;this.domKeys=new Array;this.shouldClose=0;this.title=null;this.windowPosFunc=0;this.windowSizeFunc=0;this.windowCloseFunc=0;this.windowRefreshFunc=0;this.windowFocusFunc=0;this.windowIconifyFunc=0;this.windowMaximizeFunc=0;this.framebufferSizeFunc=0;this.windowContentScaleFunc=0;this.mouseButtonFunc=0;this.cursorPosFunc=0;this.cursorEnterFunc=0;this.scrollFunc=0;this.dropFunc=0;this.keyFunc=0;this.charFunc=0;this.userptr=0}var stringToNewUTF8=str=>{var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8(str,ret,size);return ret};var GLFW={WindowFromId:id=>{if(id<=0||!GLFW.windows)return null;return GLFW.windows[id-1]},joystickFunc:0,errorFunc:0,monitorFunc:0,active:null,scale:null,windows:null,monitors:null,monitorString:null,versionString:null,initialTime:null,extensions:null,hints:null,defaultHints:{131073:0,131074:0,131075:1,131076:1,131077:1,131082:0,135169:8,135170:8,135171:8,135172:8,135173:24,135174:8,135175:0,135176:0,135177:0,135178:0,135179:0,135180:0,135181:0,135182:0,135183:0,139265:196609,139266:1,139267:0,139268:0,139269:0,139270:0,139271:0,139272:0,139276:0},DOMToGLFWKeyCode:keycode=>{switch(keycode){case 32:return 32;case 222:return 39;case 188:return 44;case 173:return 45;case 189:return 45;case 190:return 46;case 191:return 47;case 48:return 48;case 49:return 49;case 50:return 50;case 51:return 51;case 52:return 52;case 53:return 53;case 54:return 54;case 55:return 55;case 56:return 56;case 57:return 57;case 59:return 59;case 61:return 61;case 187:return 61;case 65:return 65;case 66:return 66;case 67:return 67;case 68:return 68;case 69:return 69;case 70:return 70;case 71:return 71;case 72:return 72;case 73:return 73;case 74:return 74;case 75:return 75;case 76:return 76;case 77:return 77;case 78:return 78;case 79:return 79;case 80:return 80;case 81:return 81;case 82:return 82;case 83:return 83;case 84:return 84;case 85:return 85;case 86:return 86;case 87:return 87;case 88:return 88;case 89:return 89;case 90:return 90;case 219:return 91;case 220:return 92;case 221:return 93;case 192:return 96;case 27:return 256;case 13:return 257;case 9:return 258;case 8:return 259;case 45:return 260;case 46:return 261;case 39:return 262;case 37:return 263;case 40:return 264;case 38:return 265;case 33:return 266;case 34:return 267;case 36:return 268;case 35:return 269;case 20:return 280;case 145:return 281;case 144:return 282;case 44:return 283;case 19:return 284;case 112:return 290;case 113:return 291;case 114:return 292;case 115:return 293;case 116:return 294;case 117:return 295;case 118:return 296;case 119:return 297;case 120:return 298;case 121:return 299;case 122:return 300;case 123:return 301;case 124:return 302;case 125:return 303;case 126:return 304;case 127:return 305;case 128:return 306;case 129:return 307;case 130:return 308;case 131:return 309;case 132:return 310;case 133:return 311;case 134:return 312;case 135:return 313;case 136:return 314;case 96:return 320;case 97:return 321;case 98:return 322;case 99:return 323;case 100:return 324;case 101:return 325;case 102:return 326;case 103:return 327;case 104:return 328;case 105:return 329;case 110:return 330;case 111:return 331;case 106:return 332;case 109:return 333;case 107:return 334;case 16:return 340;case 17:return 341;case 18:return 342;case 91:return 343;case 93:return 348;default:return-1}},getModBits:win=>{var mod=0;if(win.keys[340])mod|=1;if(win.keys[341])mod|=2;if(win.keys[342])mod|=4;if(win.keys[343])mod|=8;return mod},onKeyPress:event=>{if(!GLFW.active||!GLFW.active.charFunc)return;if(event.ctrlKey||event.metaKey)return;var charCode=event.charCode;if(charCode==0||charCode>=0&&charCode<=31)return;((a1,a2)=>dynCall_vii.apply(null,[GLFW.active.charFunc,a1,a2]))(GLFW.active.id,charCode)},onKeyChanged:(keyCode,status)=>{if(!GLFW.active)return;var key=GLFW.DOMToGLFWKeyCode(keyCode);if(key==-1)return;var repeat=status&&GLFW.active.keys[key];GLFW.active.keys[key]=status;GLFW.active.domKeys[keyCode]=status;if(GLFW.active.keyFunc){if(repeat)status=2;((a1,a2,a3,a4,a5)=>dynCall_viiiii.apply(null,[GLFW.active.keyFunc,a1,a2,a3,a4,a5]))(GLFW.active.id,key,keyCode,status,GLFW.getModBits(GLFW.active))}},onGamepadConnected:event=>{GLFW.refreshJoysticks()},onGamepadDisconnected:event=>{GLFW.refreshJoysticks()},onKeydown:event=>{GLFW.onKeyChanged(event.keyCode,1);if(event.keyCode===8||event.keyCode===9){event.preventDefault()}},onKeyup:event=>{GLFW.onKeyChanged(event.keyCode,0)},onBlur:event=>{if(!GLFW.active)return;for(var i=0;i{if(!GLFW.active)return;Browser.calculateMouseEvent(event);if(event.target!=Module["canvas"]||!GLFW.active.cursorPosFunc)return;if(GLFW.active.cursorPosFunc){((a1,a2,a3)=>dynCall_vidd.apply(null,[GLFW.active.cursorPosFunc,a1,a2,a3]))(GLFW.active.id,Browser.mouseX,Browser.mouseY)}},DOMToGLFWMouseButton:event=>{var eventButton=event["button"];if(eventButton>0){if(eventButton==1){eventButton=2}else{eventButton=1}}return eventButton},onMouseenter:event=>{if(!GLFW.active)return;if(event.target!=Module["canvas"])return;if(GLFW.active.cursorEnterFunc){((a1,a2)=>dynCall_vii.apply(null,[GLFW.active.cursorEnterFunc,a1,a2]))(GLFW.active.id,1)}},onMouseleave:event=>{if(!GLFW.active)return;if(event.target!=Module["canvas"])return;if(GLFW.active.cursorEnterFunc){((a1,a2)=>dynCall_vii.apply(null,[GLFW.active.cursorEnterFunc,a1,a2]))(GLFW.active.id,0)}},onMouseButtonChanged:(event,status)=>{if(!GLFW.active)return;Browser.calculateMouseEvent(event);if(event.target!=Module["canvas"])return;var eventButton=GLFW.DOMToGLFWMouseButton(event);if(status==1){GLFW.active.buttons|=1<dynCall_viiii.apply(null,[GLFW.active.mouseButtonFunc,a1,a2,a3,a4]))(GLFW.active.id,eventButton,status,GLFW.getModBits(GLFW.active))}},onMouseButtonDown:event=>{if(!GLFW.active)return;GLFW.onMouseButtonChanged(event,1)},onMouseButtonUp:event=>{if(!GLFW.active)return;GLFW.onMouseButtonChanged(event,0)},onMouseWheel:event=>{var delta=-Browser.getMouseWheelDelta(event);delta=delta==0?0:delta>0?Math.max(delta,1):Math.min(delta,-1);GLFW.wheelPos+=delta;if(!GLFW.active||!GLFW.active.scrollFunc||event.target!=Module["canvas"])return;var sx=0;var sy=delta;if(event.type=="mousewheel"){sx=event.wheelDeltaX}else{sx=event.deltaX}((a1,a2,a3)=>dynCall_vidd.apply(null,[GLFW.active.scrollFunc,a1,a2,a3]))(GLFW.active.id,sx,sy);event.preventDefault()},onCanvasResize:(width,height)=>{if(!GLFW.active)return;var resizeNeeded=true;if(document["fullscreen"]||document["fullScreen"]||document["mozFullScreen"]||document["webkitIsFullScreen"]){GLFW.active.storedX=GLFW.active.x;GLFW.active.storedY=GLFW.active.y;GLFW.active.storedWidth=GLFW.active.width;GLFW.active.storedHeight=GLFW.active.height;GLFW.active.x=GLFW.active.y=0;GLFW.active.width=screen.width;GLFW.active.height=screen.height;GLFW.active.fullscreen=true}else if(GLFW.active.fullscreen==true){GLFW.active.x=GLFW.active.storedX;GLFW.active.y=GLFW.active.storedY;GLFW.active.width=GLFW.active.storedWidth;GLFW.active.height=GLFW.active.storedHeight;GLFW.active.fullscreen=false}else if(GLFW.active.width!=width||GLFW.active.height!=height){GLFW.active.width=width;GLFW.active.height=height}else{resizeNeeded=false}if(resizeNeeded){Browser.setCanvasSize(GLFW.active.width,GLFW.active.height,true);GLFW.onWindowSizeChanged();GLFW.onFramebufferSizeChanged()}},onWindowSizeChanged:()=>{if(!GLFW.active)return;if(GLFW.active.windowSizeFunc){((a1,a2,a3)=>dynCall_viii.apply(null,[GLFW.active.windowSizeFunc,a1,a2,a3]))(GLFW.active.id,GLFW.active.width,GLFW.active.height)}},onFramebufferSizeChanged:()=>{if(!GLFW.active)return;if(GLFW.active.framebufferSizeFunc){((a1,a2,a3)=>dynCall_viii.apply(null,[GLFW.active.framebufferSizeFunc,a1,a2,a3]))(GLFW.active.id,GLFW.active.width,GLFW.active.height)}},onWindowContentScaleChanged:scale=>{GLFW.scale=scale;if(!GLFW.active)return;if(GLFW.active.windowContentScaleFunc){((a1,a2,a3)=>{throw'Internal Error! Attempted to invoke wasm function pointer with signature "viff", but no such functions have gotten exported!'})(GLFW.active.id,GLFW.scale,GLFW.scale)}},getTime:()=>_emscripten_get_now()/1e3,setWindowTitle:(winid,title)=>{var win=GLFW.WindowFromId(winid);if(!win)return;win.title=title;if(GLFW.active.id==win.id){_emscripten_set_window_title(title)}},setJoystickCallback:cbfun=>{var prevcbfun=GLFW.joystickFunc;GLFW.joystickFunc=cbfun;GLFW.refreshJoysticks();return prevcbfun},joys:{},lastGamepadState:[],lastGamepadStateFrame:null,refreshJoysticks:()=>{if(Browser.mainLoop.currentFrameNumber!==GLFW.lastGamepadStateFrame||!Browser.mainLoop.currentFrameNumber){GLFW.lastGamepadState=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads:[];GLFW.lastGamepadStateFrame=Browser.mainLoop.currentFrameNumber;for(var joy=0;joydynCall_vii.apply(null,[GLFW.joystickFunc,a1,a2]))(joy,262145)}}var data=GLFW.joys[joy];for(var i=0;i>0]=gamepad.buttons[i].pressed}for(var i=0;i>2]=gamepad.axes[i]}}else{if(GLFW.joys[joy]){out("glfw joystick disconnected",joy);if(GLFW.joystickFunc){((a1,a2)=>dynCall_vii.apply(null,[GLFW.joystickFunc,a1,a2]))(joy,262146)}_free(GLFW.joys[joy].id);_free(GLFW.joys[joy].buttons);_free(GLFW.joys[joy].axes);delete GLFW.joys[joy]}}}}},setKeyCallback:(winid,cbfun)=>{var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.keyFunc;win.keyFunc=cbfun;return prevcbfun},setCharCallback:(winid,cbfun)=>{var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.charFunc;win.charFunc=cbfun;return prevcbfun},setMouseButtonCallback:(winid,cbfun)=>{var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.mouseButtonFunc;win.mouseButtonFunc=cbfun;return prevcbfun},setCursorPosCallback:(winid,cbfun)=>{var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.cursorPosFunc;win.cursorPosFunc=cbfun;return prevcbfun},setScrollCallback:(winid,cbfun)=>{var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.scrollFunc;win.scrollFunc=cbfun;return prevcbfun},setDropCallback:(winid,cbfun)=>{var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.dropFunc;win.dropFunc=cbfun;return prevcbfun},onDrop:event=>{if(!GLFW.active||!GLFW.active.dropFunc)return;if(!event.dataTransfer||!event.dataTransfer.files||event.dataTransfer.files.length==0)return;event.preventDefault();var filenames=_malloc(event.dataTransfer.files.length*4);var filenamesArray=[];var count=event.dataTransfer.files.length;var written=0;var drop_dir=".glfw_dropped_files";FS.createPath("/",drop_dir);function save(file){var path="/"+drop_dir+"/"+file.name.replace(/\//g,"_");var reader=new FileReader;reader.onloadend=e=>{if(reader.readyState!=2){++written;out("failed to read dropped file: "+file.name+": "+reader.error);return}var data=e.target.result;FS.writeFile(path,new Uint8Array(data));if(++written===count){((a1,a2,a3)=>dynCall_viii.apply(null,[GLFW.active.dropFunc,a1,a2,a3]))(GLFW.active.id,count,filenames);for(var i=0;i>2]=filename}for(var i=0;i{if(!GLFW.active||!GLFW.active.dropFunc)return;event.preventDefault();return false},setWindowSizeCallback:(winid,cbfun)=>{var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.windowSizeFunc;win.windowSizeFunc=cbfun;return prevcbfun},setWindowCloseCallback:(winid,cbfun)=>{var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.windowCloseFunc;win.windowCloseFunc=cbfun;return prevcbfun},setWindowRefreshCallback:(winid,cbfun)=>{var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.windowRefreshFunc;win.windowRefreshFunc=cbfun;return prevcbfun},onClickRequestPointerLock:e=>{if(!Browser.pointerLock&&Module["canvas"].requestPointerLock){Module["canvas"].requestPointerLock();e.preventDefault()}},setInputMode:(winid,mode,value)=>{var win=GLFW.WindowFromId(winid);if(!win)return;switch(mode){case 208897:{switch(value){case 212993:{win.inputModes[mode]=value;Module["canvas"].removeEventListener("click",GLFW.onClickRequestPointerLock,true);Module["canvas"].exitPointerLock();break}case 212994:{err("glfwSetInputMode called with GLFW_CURSOR_HIDDEN value not implemented");break}case 212995:{win.inputModes[mode]=value;Module["canvas"].addEventListener("click",GLFW.onClickRequestPointerLock,true);Module["canvas"].requestPointerLock();break}default:{err(`glfwSetInputMode called with unknown value parameter value: ${value}`);break}}break}case 208898:{err("glfwSetInputMode called with GLFW_STICKY_KEYS mode not implemented");break}case 208899:{err("glfwSetInputMode called with GLFW_STICKY_MOUSE_BUTTONS mode not implemented");break}case 208900:{err("glfwSetInputMode called with GLFW_LOCK_KEY_MODS mode not implemented");break}case 3342341:{err("glfwSetInputMode called with GLFW_RAW_MOUSE_MOTION mode not implemented");break}default:{err(`glfwSetInputMode called with unknown mode parameter value: ${mode}`);break}}},getKey:(winid,key)=>{var win=GLFW.WindowFromId(winid);if(!win)return 0;return win.keys[key]},getMouseButton:(winid,button)=>{var win=GLFW.WindowFromId(winid);if(!win)return 0;return(win.buttons&1<0},getCursorPos:(winid,x,y)=>{HEAPF64[x>>3]=Browser.mouseX;HEAPF64[y>>3]=Browser.mouseY},getMousePos:(winid,x,y)=>{HEAP32[x>>2]=Browser.mouseX;HEAP32[y>>2]=Browser.mouseY},setCursorPos:(winid,x,y)=>{},getWindowPos:(winid,x,y)=>{var wx=0;var wy=0;var win=GLFW.WindowFromId(winid);if(win){wx=win.x;wy=win.y}if(x){HEAP32[x>>2]=wx}if(y){HEAP32[y>>2]=wy}},setWindowPos:(winid,x,y)=>{var win=GLFW.WindowFromId(winid);if(!win)return;win.x=x;win.y=y},getWindowSize:(winid,width,height)=>{var ww=0;var wh=0;var win=GLFW.WindowFromId(winid);if(win){ww=win.width;wh=win.height}if(width){HEAP32[width>>2]=ww}if(height){HEAP32[height>>2]=wh}},setWindowSize:(winid,width,height)=>{var win=GLFW.WindowFromId(winid);if(!win)return;if(GLFW.active.id==win.id){Browser.setCanvasSize(width,height);win.width=width;win.height=height}if(win.windowSizeFunc){((a1,a2,a3)=>dynCall_viii.apply(null,[win.windowSizeFunc,a1,a2,a3]))(win.id,width,height)}},createWindow:(width,height,title,monitor,share)=>{var i,id;for(i=0;i0)throw"glfwCreateWindow only supports one window at time currently";id=i+1;if(width<=0||height<=0)return 0;if(monitor){Browser.requestFullscreen()}else{Browser.setCanvasSize(width,height)}for(i=0;i0;if(i==GLFW.windows.length){if(useWebGL){var contextAttributes={antialias:GLFW.hints[135181]>1,depth:GLFW.hints[135173]>0,stencil:GLFW.hints[135174]>0,alpha:GLFW.hints[135172]>0};Module.ctx=Browser.createContext(Module["canvas"],true,true,contextAttributes)}else{Browser.init()}}if(!Module.ctx&&useWebGL)return 0;var win=new GLFW_Window(id,width,height,title,monitor,share);if(id-1==GLFW.windows.length){GLFW.windows.push(win)}else{GLFW.windows[id-1]=win}GLFW.active=win;return win.id},destroyWindow:winid=>{var win=GLFW.WindowFromId(winid);if(!win)return;if(win.windowCloseFunc){(a1=>dynCall_vi.apply(null,[win.windowCloseFunc,a1]))(win.id)}GLFW.windows[win.id-1]=null;if(GLFW.active.id==win.id)GLFW.active=null;for(var i=0;i{},GLFW2ParamToGLFW3Param:param=>{var table={196609:0,196610:0,196611:0,196612:0,196613:0,196614:0,131073:0,131074:0,131075:0,131076:0,131077:135169,131078:135170,131079:135171,131080:135172,131081:135173,131082:135174,131083:135183,131084:135175,131085:135176,131086:135177,131087:135178,131088:135179,131089:135180,131090:0,131091:135181,131092:139266,131093:139267,131094:139270,131095:139271,131096:139272};return table[param]}};var _glfwCreateStandardCursor=shape=>{};var _glfwCreateWindow=(width,height,title,monitor,share)=>GLFW.createWindow(width,height,title,monitor,share);var _glfwDestroyWindow=winid=>GLFW.destroyWindow(winid);var _glfwFocusWindow=winid=>{};var _glfwGetClipboardString=win=>{};var _glfwGetFramebufferSize=(winid,width,height)=>{var ww=0;var wh=0;var win=GLFW.WindowFromId(winid);if(win){ww=win.width;wh=win.height}if(width){HEAP32[width>>2]=ww}if(height){HEAP32[height>>2]=wh}};var _glfwGetInputMode=(winid,mode)=>{var win=GLFW.WindowFromId(winid);if(!win)return;switch(mode){case 208897:{if(Browser.pointerLock){win.inputModes[mode]=212995}else{win.inputModes[mode]=212993}}}return win.inputModes[mode]};var _glfwGetJoystickAxes=(joy,count)=>{GLFW.refreshJoysticks();var state=GLFW.joys[joy];if(!state||!state.axes){HEAP32[count>>2]=0;return}HEAP32[count>>2]=state.axesCount;return state.axes};var _glfwGetJoystickButtons=(joy,count)=>{GLFW.refreshJoysticks();var state=GLFW.joys[joy];if(!state||!state.buttons){HEAP32[count>>2]=0;return}HEAP32[count>>2]=state.buttonsCount;return state.buttons};var _glfwGetKey=(winid,key)=>GLFW.getKey(winid,key);var _glfwGetMonitorContentScale=(monitor,x,y)=>{HEAPF32[x>>2]=GLFW.scale;HEAPF32[y>>2]=GLFW.scale};var _glfwGetMonitorPos=(monitor,x,y)=>{HEAP32[x>>2]=0;HEAP32[y>>2]=0};var _glfwGetMonitorWorkarea=(monitor,x,y,w,h)=>{HEAP32[x>>2]=0;HEAP32[y>>2]=0;HEAP32[w>>2]=screen.availWidth;HEAP32[h>>2]=screen.availHeight};var _glfwGetMonitors=count=>{HEAP32[count>>2]=1;if(!GLFW.monitors){GLFW.monitors=_malloc(4);HEAP32[GLFW.monitors>>2]=1}return GLFW.monitors};var _glfwGetTime=()=>GLFW.getTime()-GLFW.initialTime;var _glfwGetVideoMode=monitor=>0;var _glfwGetWindowAttrib=(winid,attrib)=>{var win=GLFW.WindowFromId(winid);if(!win)return 0;return win.attributes[attrib]};var _glfwGetWindowPos=(winid,x,y)=>GLFW.getWindowPos(winid,x,y);var _glfwGetWindowSize=(winid,width,height)=>GLFW.getWindowSize(winid,width,height);var _emscripten_get_device_pixel_ratio=()=>typeof devicePixelRatio=="number"&&devicePixelRatio||1;var _glfwInit=()=>{if(GLFW.windows)return 1;GLFW.initialTime=GLFW.getTime();GLFW.hints=GLFW.defaultHints;GLFW.windows=new Array;GLFW.active=null;GLFW.scale=_emscripten_get_device_pixel_ratio();window.addEventListener("gamepadconnected",GLFW.onGamepadConnected,true);window.addEventListener("gamepaddisconnected",GLFW.onGamepadDisconnected,true);window.addEventListener("keydown",GLFW.onKeydown,true);window.addEventListener("keypress",GLFW.onKeyPress,true);window.addEventListener("keyup",GLFW.onKeyup,true);window.addEventListener("blur",GLFW.onBlur,true);(function updatePixelRatio(){window.matchMedia("(resolution: "+window.devicePixelRatio+"dppx)").addEventListener("change",updatePixelRatio,{once:true});GLFW.onWindowContentScaleChanged(_emscripten_get_device_pixel_ratio())})();Module["canvas"].addEventListener("touchmove",GLFW.onMousemove,true);Module["canvas"].addEventListener("touchstart",GLFW.onMouseButtonDown,true);Module["canvas"].addEventListener("touchcancel",GLFW.onMouseButtonUp,true);Module["canvas"].addEventListener("touchend",GLFW.onMouseButtonUp,true);Module["canvas"].addEventListener("mousemove",GLFW.onMousemove,true);Module["canvas"].addEventListener("mousedown",GLFW.onMouseButtonDown,true);Module["canvas"].addEventListener("mouseup",GLFW.onMouseButtonUp,true);Module["canvas"].addEventListener("wheel",GLFW.onMouseWheel,true);Module["canvas"].addEventListener("mousewheel",GLFW.onMouseWheel,true);Module["canvas"].addEventListener("mouseenter",GLFW.onMouseenter,true);Module["canvas"].addEventListener("mouseleave",GLFW.onMouseleave,true);Module["canvas"].addEventListener("drop",GLFW.onDrop,true);Module["canvas"].addEventListener("dragover",GLFW.onDragover,true);Browser.resizeListeners.push((width,height)=>{GLFW.onCanvasResize(width,height)});return 1};var _glfwMakeContextCurrent=winid=>{};var _glfwPollEvents=()=>{};var _glfwSetCharCallback=(winid,cbfun)=>GLFW.setCharCallback(winid,cbfun);var _glfwSetClipboardString=(win,string)=>{};var _glfwSetCursor=(winid,cursor)=>{};var _glfwSetCursorEnterCallback=(winid,cbfun)=>{var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.cursorEnterFunc;win.cursorEnterFunc=cbfun;return prevcbfun};var _glfwSetCursorPos=(winid,x,y)=>GLFW.setCursorPos(winid,x,y);var _glfwSetCursorPosCallback=(winid,cbfun)=>GLFW.setCursorPosCallback(winid,cbfun);var _glfwSetErrorCallback=cbfun=>{var prevcbfun=GLFW.errorFunc;GLFW.errorFunc=cbfun;return prevcbfun};var _glfwSetInputMode=(winid,mode,value)=>{GLFW.setInputMode(winid,mode,value)};var _glfwSetKeyCallback=(winid,cbfun)=>GLFW.setKeyCallback(winid,cbfun);var _glfwSetMonitorCallback=cbfun=>{var prevcbfun=GLFW.monitorFunc;GLFW.monitorFunc=cbfun;return prevcbfun};var _glfwSetMouseButtonCallback=(winid,cbfun)=>GLFW.setMouseButtonCallback(winid,cbfun);var _glfwSetScrollCallback=(winid,cbfun)=>GLFW.setScrollCallback(winid,cbfun);var _glfwSetWindowCloseCallback=(winid,cbfun)=>GLFW.setWindowCloseCallback(winid,cbfun);var _glfwSetWindowFocusCallback=(winid,cbfun)=>{var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.windowFocusFunc;win.windowFocusFunc=cbfun;return prevcbfun};var _glfwSetWindowOpacity=(winid,opacity)=>{};var _glfwSetWindowPos=(winid,x,y)=>GLFW.setWindowPos(winid,x,y);var _glfwSetWindowPosCallback=(winid,cbfun)=>{var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.windowPosFunc;win.windowPosFunc=cbfun;return prevcbfun};var _glfwSetWindowSize=(winid,width,height)=>GLFW.setWindowSize(winid,width,height);var _glfwSetWindowSizeCallback=(winid,cbfun)=>GLFW.setWindowSizeCallback(winid,cbfun);var _glfwSetWindowTitle=(winid,title)=>GLFW.setWindowTitle(winid,title);var _glfwShowWindow=winid=>{};var _glfwSwapBuffers=winid=>GLFW.swapBuffers(winid);var _glfwSwapInterval=interval=>{interval=Math.abs(interval);if(interval==0)_emscripten_set_main_loop_timing(0,0);else _emscripten_set_main_loop_timing(1,interval)};var _glfwTerminate=()=>{window.removeEventListener("gamepadconnected",GLFW.onGamepadConnected,true);window.removeEventListener("gamepaddisconnected",GLFW.onGamepadDisconnected,true);window.removeEventListener("keydown",GLFW.onKeydown,true);window.removeEventListener("keypress",GLFW.onKeyPress,true);window.removeEventListener("keyup",GLFW.onKeyup,true);window.removeEventListener("blur",GLFW.onBlur,true);Module["canvas"].removeEventListener("touchmove",GLFW.onMousemove,true);Module["canvas"].removeEventListener("touchstart",GLFW.onMouseButtonDown,true);Module["canvas"].removeEventListener("touchcancel",GLFW.onMouseButtonUp,true);Module["canvas"].removeEventListener("touchend",GLFW.onMouseButtonUp,true);Module["canvas"].removeEventListener("mousemove",GLFW.onMousemove,true);Module["canvas"].removeEventListener("mousedown",GLFW.onMouseButtonDown,true);Module["canvas"].removeEventListener("mouseup",GLFW.onMouseButtonUp,true);Module["canvas"].removeEventListener("wheel",GLFW.onMouseWheel,true);Module["canvas"].removeEventListener("mousewheel",GLFW.onMouseWheel,true);Module["canvas"].removeEventListener("mouseenter",GLFW.onMouseenter,true);Module["canvas"].removeEventListener("mouseleave",GLFW.onMouseleave,true);Module["canvas"].removeEventListener("drop",GLFW.onDrop,true);Module["canvas"].removeEventListener("dragover",GLFW.onDragover,true);Module["canvas"].width=Module["canvas"].height=1;GLFW.windows=null;GLFW.active=null};var _glfwWindowHint=(target,hint)=>{GLFW.hints[target]=hint};var isLeapYear=year=>year%4===0&&(year%100!==0||year%400===0);var arraySum=(array,index)=>{var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum};var MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];var addDays=(date,days)=>{var newDate=new Date(date.getTime());while(days>0){var leap=isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate};var writeArrayToMemory=(array,buffer)=>{assert(array.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)");HEAP8.set(array,buffer)};var _strftime=(s,maxsize,format,tm)=>{var tm_zone=HEAPU32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):""};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value=="number"?value.toString():value||"";while(str.length0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}return thisDate.getFullYear()}return thisDate.getFullYear()-1}var EXPANSION_RULES_2={"%a":date=>WEEKDAYS[date.tm_wday].substring(0,3),"%A":date=>WEEKDAYS[date.tm_wday],"%b":date=>MONTHS[date.tm_mon].substring(0,3),"%B":date=>MONTHS[date.tm_mon],"%C":date=>{var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},"%d":date=>leadingNulls(date.tm_mday,2),"%e":date=>leadingSomething(date.tm_mday,2," "),"%g":date=>getWeekBasedYear(date).toString().substring(2),"%G":date=>getWeekBasedYear(date),"%H":date=>leadingNulls(date.tm_hour,2),"%I":date=>{var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},"%j":date=>leadingNulls(date.tm_mday+arraySum(isLeapYear(date.tm_year+1900)?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR,date.tm_mon-1),3),"%m":date=>leadingNulls(date.tm_mon+1,2),"%M":date=>leadingNulls(date.tm_min,2),"%n":()=>"\n","%p":date=>{if(date.tm_hour>=0&&date.tm_hour<12){return"AM"}return"PM"},"%S":date=>leadingNulls(date.tm_sec,2),"%t":()=>"\t","%u":date=>date.tm_wday||7,"%U":date=>{var days=date.tm_yday+7-date.tm_wday;return leadingNulls(Math.floor(days/7),2)},"%V":date=>{var val=Math.floor((date.tm_yday+7-(date.tm_wday+6)%7)/7);if((date.tm_wday+371-date.tm_yday-2)%7<=2){val++}if(!val){val=52;var dec31=(date.tm_wday+7-date.tm_yday-1)%7;if(dec31==4||dec31==5&&isLeapYear(date.tm_year%400-1)){val++}}else if(val==53){var jan1=(date.tm_wday+371-date.tm_yday)%7;if(jan1!=4&&(jan1!=3||!isLeapYear(date.tm_year)))val=1}return leadingNulls(val,2)},"%w":date=>date.tm_wday,"%W":date=>{var days=date.tm_yday+7-(date.tm_wday+6)%7;return leadingNulls(Math.floor(days/7),2)},"%y":date=>(date.tm_year+1900).toString().substring(2),"%Y":date=>date.tm_year+1900,"%z":date=>{var off=date.tm_gmtoff;var ahead=off>=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)},"%Z":date=>date.tm_zone,"%%":()=>"%"};pattern=pattern.replace(/%%/g,"\0\0");for(var rule in EXPANSION_RULES_2){if(pattern.includes(rule)){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}pattern=pattern.replace(/\0\0/g,"%");var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1};var _strftime_l=(s,maxsize,format,tm,loc)=>_strftime(s,maxsize,format,tm);var _wgpuAdapterRelease=id=>WebGPU.mgrAdapter.release(id);var _wgpuBindGroupLayoutRelease=id=>WebGPU.mgrBindGroupLayout.release(id);var _wgpuBindGroupRelease=id=>WebGPU.mgrBindGroup.release(id);var _wgpuBufferDestroy=bufferId=>{var bufferWrapper=WebGPU.mgrBuffer.objects[bufferId];assert(typeof bufferWrapper!="undefined");if(bufferWrapper.onUnmap){for(var i=0;iWebGPU.mgrBuffer.release(id);var _wgpuCommandEncoderBeginRenderPass=(encoderId,descriptor)=>{assert(descriptor);function makeColorAttachment(caPtr){var viewPtr=HEAPU32[caPtr+4>>2];if(viewPtr===0){return undefined}var loadOpInt=HEAPU32[caPtr+12>>2];assert(loadOpInt!==0);var storeOpInt=HEAPU32[caPtr+16>>2];assert(storeOpInt!==0);var clearValue=WebGPU.makeColor(caPtr+24);return{"view":WebGPU.mgrTextureView.get(viewPtr),"resolveTarget":WebGPU.mgrTextureView.get(HEAPU32[caPtr+8>>2]),"clearValue":clearValue,"loadOp":WebGPU.LoadOp[loadOpInt],"storeOp":WebGPU.StoreOp[storeOpInt]}}function makeColorAttachments(count,caPtr){var attachments=[];for(var i=0;i>2]),"depthClearValue":HEAPF32[dsaPtr+12>>2],"depthLoadOp":WebGPU.LoadOp[HEAPU32[dsaPtr+4>>2]],"depthStoreOp":WebGPU.StoreOp[HEAPU32[dsaPtr+8>>2]],"depthReadOnly":HEAP8[dsaPtr+16>>0]!==0,"stencilClearValue":HEAPU32[dsaPtr+28>>2],"stencilLoadOp":WebGPU.LoadOp[HEAPU32[dsaPtr+20>>2]],"stencilStoreOp":WebGPU.StoreOp[HEAPU32[dsaPtr+24>>2]],"stencilReadOnly":HEAP8[dsaPtr+32>>0]!==0}}function makeRenderPassTimestampWrites(twPtr){if(twPtr===0)return undefined;return{"querySet":WebGPU.mgrQuerySet.get(HEAPU32[twPtr>>2]),"beginningOfPassWriteIndex":HEAPU32[twPtr+4>>2],"endOfPassWriteIndex":HEAPU32[twPtr+8>>2]}}function makeRenderPassDescriptor(descriptor){assert(descriptor);var nextInChainPtr=HEAPU32[descriptor>>2];var maxDrawCount=undefined;if(nextInChainPtr!==0){var sType=HEAPU32[nextInChainPtr+4>>2];assert(sType===15);assert(0===HEAPU32[nextInChainPtr>>2]);var renderPassDescriptorMaxDrawCount=nextInChainPtr;assert(renderPassDescriptorMaxDrawCount);assert(HEAPU32[renderPassDescriptorMaxDrawCount>>2]===0);maxDrawCount=HEAPU32[renderPassDescriptorMaxDrawCount+4+8>>2]*4294967296+HEAPU32[renderPassDescriptorMaxDrawCount+8>>2]}var desc={"label":undefined,"colorAttachments":makeColorAttachments(HEAPU32[descriptor+8>>2],HEAPU32[descriptor+12>>2]),"depthStencilAttachment":makeDepthStencilAttachment(HEAPU32[descriptor+16>>2]),"occlusionQuerySet":WebGPU.mgrQuerySet.get(HEAPU32[descriptor+20>>2]),"timestampWrites":makeRenderPassTimestampWrites(HEAPU32[descriptor+24>>2]),"maxDrawCount":maxDrawCount};var labelPtr=HEAPU32[descriptor+4>>2];if(labelPtr)desc["label"]=UTF8ToString(labelPtr);return desc}var desc=makeRenderPassDescriptor(descriptor);var commandEncoder=WebGPU.mgrCommandEncoder.get(encoderId);return WebGPU.mgrRenderPassEncoder.create(commandEncoder["beginRenderPass"](desc))};var _wgpuCommandEncoderFinish=(encoderId,descriptor)=>{var commandEncoder=WebGPU.mgrCommandEncoder.get(encoderId);return WebGPU.mgrCommandBuffer.create(commandEncoder["finish"]())};var _wgpuCreateInstance=descriptor=>1;var _wgpuDeviceCreateBindGroup=(deviceId,descriptor)=>{assert(descriptor);assert(HEAPU32[descriptor>>2]===0);function makeEntry(entryPtr){assert(entryPtr);var bufferId=HEAPU32[entryPtr+8>>2];var samplerId=HEAPU32[entryPtr+32>>2];var textureViewId=HEAPU32[entryPtr+36>>2];assert((bufferId!==0)+(samplerId!==0)+(textureViewId!==0)===1);var binding=HEAPU32[entryPtr+4>>2];if(bufferId){var size=readI53FromI64(entryPtr+24);if(size==-1)size=undefined;return{"binding":binding,"resource":{"buffer":WebGPU.mgrBuffer.get(bufferId),"offset":HEAPU32[entryPtr+4+16>>2]*4294967296+HEAPU32[entryPtr+16>>2],"size":size}}}else if(samplerId){return{"binding":binding,"resource":WebGPU.mgrSampler.get(samplerId)}}else{return{"binding":binding,"resource":WebGPU.mgrTextureView.get(textureViewId)}}}function makeEntries(count,entriesPtrs){var entries=[];for(var i=0;i>2]),"entries":makeEntries(HEAPU32[descriptor+12>>2],HEAPU32[descriptor+16>>2])};var labelPtr=HEAPU32[descriptor+4>>2];if(labelPtr)desc["label"]=UTF8ToString(labelPtr);var device=WebGPU.mgrDevice.get(deviceId);return WebGPU.mgrBindGroup.create(device["createBindGroup"](desc))};var _wgpuDeviceCreateBindGroupLayout=(deviceId,descriptor)=>{assert(descriptor);assert(HEAPU32[descriptor>>2]===0);function makeBufferEntry(entryPtr){assert(entryPtr);var typeInt=HEAPU32[entryPtr+4>>2];if(!typeInt)return undefined;return{"type":WebGPU.BufferBindingType[typeInt],"hasDynamicOffset":HEAP8[entryPtr+8>>0]!==0,"minBindingSize":HEAPU32[entryPtr+4+16>>2]*4294967296+HEAPU32[entryPtr+16>>2]}}function makeSamplerEntry(entryPtr){assert(entryPtr);var typeInt=HEAPU32[entryPtr+4>>2];if(!typeInt)return undefined;return{"type":WebGPU.SamplerBindingType[typeInt]}}function makeTextureEntry(entryPtr){assert(entryPtr);var sampleTypeInt=HEAPU32[entryPtr+4>>2];if(!sampleTypeInt)return undefined;return{"sampleType":WebGPU.TextureSampleType[sampleTypeInt],"viewDimension":WebGPU.TextureViewDimension[HEAPU32[entryPtr+8>>2]],"multisampled":HEAP8[entryPtr+12>>0]!==0}}function makeStorageTextureEntry(entryPtr){assert(entryPtr);var accessInt=HEAPU32[entryPtr+4>>2];if(!accessInt)return undefined;return{"access":WebGPU.StorageTextureAccess[accessInt],"format":WebGPU.TextureFormat[HEAPU32[entryPtr+8>>2]],"viewDimension":WebGPU.TextureViewDimension[HEAPU32[entryPtr+12>>2]]}}function makeEntry(entryPtr){assert(entryPtr);return{"binding":HEAPU32[entryPtr+4>>2],"visibility":HEAPU32[entryPtr+8>>2],"buffer":makeBufferEntry(entryPtr+16),"sampler":makeSamplerEntry(entryPtr+40),"texture":makeTextureEntry(entryPtr+48),"storageTexture":makeStorageTextureEntry(entryPtr+64)}}function makeEntries(count,entriesPtrs){var entries=[];for(var i=0;i>2],HEAPU32[descriptor+12>>2])};var labelPtr=HEAPU32[descriptor+4>>2];if(labelPtr)desc["label"]=UTF8ToString(labelPtr);var device=WebGPU.mgrDevice.get(deviceId);return WebGPU.mgrBindGroupLayout.create(device["createBindGroupLayout"](desc))};var _wgpuDeviceCreateBuffer=(deviceId,descriptor)=>{assert(descriptor);assert(HEAPU32[descriptor>>2]===0);var mappedAtCreation=HEAP8[descriptor+24>>0]!==0;var desc={"label":undefined,"usage":HEAPU32[descriptor+8>>2],"size":HEAPU32[descriptor+4+16>>2]*4294967296+HEAPU32[descriptor+16>>2],"mappedAtCreation":mappedAtCreation};var labelPtr=HEAPU32[descriptor+4>>2];if(labelPtr)desc["label"]=UTF8ToString(labelPtr);var device=WebGPU.mgrDevice.get(deviceId);var bufferWrapper={};var id=WebGPU.mgrBuffer.create(device["createBuffer"](desc),bufferWrapper);if(mappedAtCreation){bufferWrapper.mapMode=2;bufferWrapper.onUnmap=[]}return id};var _wgpuDeviceCreateCommandEncoder=(deviceId,descriptor)=>{var desc;if(descriptor){assert(descriptor);assert(HEAPU32[descriptor>>2]===0);desc={"label":undefined};var labelPtr=HEAPU32[descriptor+4>>2];if(labelPtr)desc["label"]=UTF8ToString(labelPtr)}var device=WebGPU.mgrDevice.get(deviceId);return WebGPU.mgrCommandEncoder.create(device["createCommandEncoder"](desc))};var _wgpuDeviceCreatePipelineLayout=(deviceId,descriptor)=>{assert(descriptor);assert(HEAPU32[descriptor>>2]===0);var bglCount=HEAPU32[descriptor+8>>2];var bglPtr=HEAPU32[descriptor+12>>2];var bgls=[];for(var i=0;i>2]))}var desc={"label":undefined,"bindGroupLayouts":bgls};var labelPtr=HEAPU32[descriptor+4>>2];if(labelPtr)desc["label"]=UTF8ToString(labelPtr);var device=WebGPU.mgrDevice.get(deviceId);return WebGPU.mgrPipelineLayout.create(device["createPipelineLayout"](desc))};var generateRenderPipelineDesc=descriptor=>{assert(descriptor);assert(HEAPU32[descriptor>>2]===0);function makePrimitiveState(rsPtr){if(!rsPtr)return undefined;assert(rsPtr);assert(HEAPU32[rsPtr>>2]===0);return{"topology":WebGPU.PrimitiveTopology[HEAPU32[rsPtr+4>>2]],"stripIndexFormat":WebGPU.IndexFormat[HEAPU32[rsPtr+8>>2]],"frontFace":WebGPU.FrontFace[HEAPU32[rsPtr+12>>2]],"cullMode":WebGPU.CullMode[HEAPU32[rsPtr+16>>2]]}}function makeBlendComponent(bdPtr){if(!bdPtr)return undefined;return{"operation":WebGPU.BlendOperation[HEAPU32[bdPtr>>2]],"srcFactor":WebGPU.BlendFactor[HEAPU32[bdPtr+4>>2]],"dstFactor":WebGPU.BlendFactor[HEAPU32[bdPtr+8>>2]]}}function makeBlendState(bsPtr){if(!bsPtr)return undefined;assert(bsPtr);assert(HEAPU32[bsPtr>>2]===0);return{"alpha":makeBlendComponent(bsPtr+12),"color":makeBlendComponent(bsPtr+0)}}function makeColorState(csPtr){assert(csPtr);assert(HEAPU32[csPtr>>2]===0);var formatInt=HEAPU32[csPtr+4>>2];return formatInt===0?undefined:{"format":WebGPU.TextureFormat[formatInt],"blend":makeBlendState(HEAPU32[csPtr+8>>2]),"writeMask":HEAPU32[csPtr+12>>2]}}function makeColorStates(count,csArrayPtr){var states=[];for(var i=0;i>2]],"failOp":WebGPU.StencilOperation[HEAPU32[ssfPtr+4>>2]],"depthFailOp":WebGPU.StencilOperation[HEAPU32[ssfPtr+8>>2]],"passOp":WebGPU.StencilOperation[HEAPU32[ssfPtr+12>>2]]}}function makeDepthStencilState(dssPtr){if(!dssPtr)return undefined;assert(dssPtr);return{"format":WebGPU.TextureFormat[HEAPU32[dssPtr+4>>2]],"depthWriteEnabled":HEAP8[dssPtr+8>>0]!==0,"depthCompare":WebGPU.CompareFunction[HEAPU32[dssPtr+12>>2]],"stencilFront":makeStencilStateFace(dssPtr+16),"stencilBack":makeStencilStateFace(dssPtr+32),"stencilReadMask":HEAPU32[dssPtr+48>>2],"stencilWriteMask":HEAPU32[dssPtr+52>>2],"depthBias":HEAP32[dssPtr+56>>2],"depthBiasSlopeScale":HEAPF32[dssPtr+60>>2],"depthBiasClamp":HEAPF32[dssPtr+64>>2]}}function makeVertexAttribute(vaPtr){assert(vaPtr);return{"format":WebGPU.VertexFormat[HEAPU32[vaPtr>>2]],"offset":HEAPU32[vaPtr+4+8>>2]*4294967296+HEAPU32[vaPtr+8>>2],"shaderLocation":HEAPU32[vaPtr+16>>2]}}function makeVertexAttributes(count,vaArrayPtr){var vas=[];for(var i=0;i>2];return stepModeInt===2?null:{"arrayStride":HEAPU32[vbPtr+4>>2]*4294967296+HEAPU32[vbPtr>>2],"stepMode":WebGPU.VertexStepMode[stepModeInt],"attributes":makeVertexAttributes(HEAPU32[vbPtr+12>>2],HEAPU32[vbPtr+16>>2])}}function makeVertexBuffers(count,vbArrayPtr){if(!count)return undefined;var vbs=[];for(var i=0;i>2]===0);var desc={"module":WebGPU.mgrShaderModule.get(HEAPU32[viPtr+4>>2]),"constants":WebGPU.makePipelineConstants(HEAPU32[viPtr+12>>2],HEAPU32[viPtr+16>>2]),"buffers":makeVertexBuffers(HEAPU32[viPtr+20>>2],HEAPU32[viPtr+24>>2])};var entryPointPtr=HEAPU32[viPtr+8>>2];if(entryPointPtr)desc["entryPoint"]=UTF8ToString(entryPointPtr);return desc}function makeMultisampleState(msPtr){if(!msPtr)return undefined;assert(msPtr);assert(HEAPU32[msPtr>>2]===0);return{"count":HEAPU32[msPtr+4>>2],"mask":HEAPU32[msPtr+8>>2],"alphaToCoverageEnabled":HEAP8[msPtr+12>>0]!==0}}function makeFragmentState(fsPtr){if(!fsPtr)return undefined;assert(fsPtr);assert(HEAPU32[fsPtr>>2]===0);var desc={"module":WebGPU.mgrShaderModule.get(HEAPU32[fsPtr+4>>2]),"constants":WebGPU.makePipelineConstants(HEAPU32[fsPtr+12>>2],HEAPU32[fsPtr+16>>2]),"targets":makeColorStates(HEAPU32[fsPtr+20>>2],HEAPU32[fsPtr+24>>2])};var entryPointPtr=HEAPU32[fsPtr+8>>2];if(entryPointPtr)desc["entryPoint"]=UTF8ToString(entryPointPtr);return desc}var desc={"label":undefined,"layout":WebGPU.makePipelineLayout(HEAPU32[descriptor+8>>2]),"vertex":makeVertexState(descriptor+12),"primitive":makePrimitiveState(descriptor+40),"depthStencil":makeDepthStencilState(HEAPU32[descriptor+60>>2]),"multisample":makeMultisampleState(descriptor+64),"fragment":makeFragmentState(HEAPU32[descriptor+80>>2])};var labelPtr=HEAPU32[descriptor+4>>2];if(labelPtr)desc["label"]=UTF8ToString(labelPtr);return desc};var _wgpuDeviceCreateRenderPipeline=(deviceId,descriptor)=>{var desc=generateRenderPipelineDesc(descriptor);var device=WebGPU.mgrDevice.get(deviceId);return WebGPU.mgrRenderPipeline.create(device["createRenderPipeline"](desc))};var _wgpuDeviceCreateSampler=(deviceId,descriptor)=>{var desc;if(descriptor){assert(descriptor);assert(HEAPU32[descriptor>>2]===0);desc={"label":undefined,"addressModeU":WebGPU.AddressMode[HEAPU32[descriptor+8>>2]],"addressModeV":WebGPU.AddressMode[HEAPU32[descriptor+12>>2]],"addressModeW":WebGPU.AddressMode[HEAPU32[descriptor+16>>2]],"magFilter":WebGPU.FilterMode[HEAPU32[descriptor+20>>2]],"minFilter":WebGPU.FilterMode[HEAPU32[descriptor+24>>2]],"mipmapFilter":WebGPU.MipmapFilterMode[HEAPU32[descriptor+28>>2]],"lodMinClamp":HEAPF32[descriptor+32>>2],"lodMaxClamp":HEAPF32[descriptor+36>>2],"compare":WebGPU.CompareFunction[HEAPU32[descriptor+40>>2]]};var labelPtr=HEAPU32[descriptor+4>>2];if(labelPtr)desc["label"]=UTF8ToString(labelPtr)}var device=WebGPU.mgrDevice.get(deviceId);return WebGPU.mgrSampler.create(device["createSampler"](desc))};var _wgpuDeviceCreateShaderModule=(deviceId,descriptor)=>{assert(descriptor);var nextInChainPtr=HEAPU32[descriptor>>2];assert(nextInChainPtr!==0);var sType=HEAPU32[nextInChainPtr+4>>2];var desc={"label":undefined,"code":""};var labelPtr=HEAPU32[descriptor+4>>2];if(labelPtr)desc["label"]=UTF8ToString(labelPtr);switch(sType){case 5:{var count=HEAPU32[nextInChainPtr+8>>2];var start=HEAPU32[nextInChainPtr+12>>2];var offset=start>>2;desc["code"]=HEAPU32.subarray(offset,offset+count);break}case 6:{var sourcePtr=HEAPU32[nextInChainPtr+8>>2];if(sourcePtr){desc["code"]=UTF8ToString(sourcePtr)}break}default:abort("unrecognized ShaderModule sType")}var device=WebGPU.mgrDevice.get(deviceId);return WebGPU.mgrShaderModule.create(device["createShaderModule"](desc))};var _wgpuDeviceCreateSwapChain=(deviceId,surfaceId,descriptor)=>{assert(descriptor);assert(HEAPU32[descriptor>>2]===0);var device=WebGPU.mgrDevice.get(deviceId);var context=WebGPU.mgrSurface.get(surfaceId);assert(2===HEAPU32[descriptor+24>>2]);var canvasSize=[HEAPU32[descriptor+16>>2],HEAPU32[descriptor+20>>2]];if(canvasSize[0]!==0){context["canvas"]["width"]=canvasSize[0]}if(canvasSize[1]!==0){context["canvas"]["height"]=canvasSize[1]}var configuration={"device":device,"format":WebGPU.TextureFormat[HEAPU32[descriptor+12>>2]],"usage":HEAPU32[descriptor+8>>2],"alphaMode":"opaque"};context["configure"](configuration);return WebGPU.mgrSwapChain.create(context)};var _wgpuDeviceCreateTexture=(deviceId,descriptor)=>{assert(descriptor);assert(HEAPU32[descriptor>>2]===0);var desc={"label":undefined,"size":WebGPU.makeExtent3D(descriptor+16),"mipLevelCount":HEAPU32[descriptor+32>>2],"sampleCount":HEAPU32[descriptor+36>>2],"dimension":WebGPU.TextureDimension[HEAPU32[descriptor+12>>2]],"format":WebGPU.TextureFormat[HEAPU32[descriptor+28>>2]],"usage":HEAPU32[descriptor+8>>2]};var labelPtr=HEAPU32[descriptor+4>>2];if(labelPtr)desc["label"]=UTF8ToString(labelPtr);var viewFormatCount=HEAPU32[descriptor+40>>2];if(viewFormatCount){var viewFormatsPtr=HEAPU32[descriptor+44>>2];desc["viewFormats"]=Array.from(HEAP32.subarray(viewFormatsPtr>>2,viewFormatsPtr+viewFormatCount*4>>2),function(format){return WebGPU.TextureFormat[format]})}var device=WebGPU.mgrDevice.get(deviceId);return WebGPU.mgrTexture.create(device["createTexture"](desc))};var _wgpuDeviceGetQueue=deviceId=>{var queueId=WebGPU.mgrDevice.objects[deviceId].queueId;assert(queueId,"wgpuDeviceGetQueue: queue was missing or null");WebGPU.mgrQueue.reference(queueId);return queueId};var _wgpuDeviceSetUncapturedErrorCallback=(deviceId,callback,userdata)=>{var device=WebGPU.mgrDevice.get(deviceId);device["onuncapturederror"]=function(ev){callUserCallback(()=>{var Validation=1;var OutOfMemory=2;var type;assert(typeof GPUValidationError!="undefined");assert(typeof GPUOutOfMemoryError!="undefined");if(ev.error instanceof GPUValidationError)type=Validation;else if(ev.error instanceof GPUOutOfMemoryError)type=OutOfMemory;WebGPU.errorCallback(callback,type,ev.error.message,userdata)})}};var findCanvasEventTarget=target=>findEventTarget(target);var _wgpuInstanceCreateSurface=(instanceId,descriptor)=>{assert(descriptor);assert(instanceId===1,"WGPUInstance must be created by wgpuCreateInstance");var nextInChainPtr=HEAPU32[descriptor>>2];assert(nextInChainPtr!==0);assert(4===HEAPU32[nextInChainPtr+4>>2]);var descriptorFromCanvasHTMLSelector=nextInChainPtr;assert(descriptorFromCanvasHTMLSelector);assert(HEAPU32[descriptorFromCanvasHTMLSelector>>2]===0);var selectorPtr=HEAPU32[descriptorFromCanvasHTMLSelector+8>>2];assert(selectorPtr);var canvas=findCanvasEventTarget(selectorPtr);var context=canvas.getContext("webgpu");assert(context);if(!context)return 0;var labelPtr=HEAPU32[descriptor+4>>2];if(labelPtr)context.surfaceLabelWebGPU=UTF8ToString(labelPtr);return WebGPU.mgrSurface.create(context)};var _wgpuInstanceReference=instance=>{};var _wgpuInstanceRelease=instance=>{};var _wgpuPipelineLayoutRelease=id=>WebGPU.mgrPipelineLayout.release(id);var _wgpuQueueRelease=id=>WebGPU.mgrQueue.release(id);var _wgpuQueueSubmit=(queueId,commandCount,commands)=>{assert(commands%4===0);var queue=WebGPU.mgrQueue.get(queueId);var cmds=Array.from(HEAP32.subarray(commands>>2,commands+commandCount*4>>2),function(id){return WebGPU.mgrCommandBuffer.get(id)});queue["submit"](cmds)};function _wgpuQueueWriteBuffer(queueId,bufferId,bufferOffset_low,bufferOffset_high,data,size){var bufferOffset=convertI32PairToI53Checked(bufferOffset_low,bufferOffset_high);var queue=WebGPU.mgrQueue.get(queueId);var buffer=WebGPU.mgrBuffer.get(bufferId);var subarray=HEAPU8.subarray(data,data+size);queue["writeBuffer"](buffer,bufferOffset,subarray,0,size)}var _wgpuQueueWriteTexture=(queueId,destinationPtr,data,dataSize,dataLayoutPtr,writeSizePtr)=>{var queue=WebGPU.mgrQueue.get(queueId);var destination=WebGPU.makeImageCopyTexture(destinationPtr);var dataLayout=WebGPU.makeTextureDataLayout(dataLayoutPtr);var writeSize=WebGPU.makeExtent3D(writeSizePtr);var subarray=HEAPU8.subarray(data,data+dataSize);queue["writeTexture"](destination,subarray,dataLayout,writeSize)};var _wgpuRenderPassEncoderDrawIndexed=(passId,indexCount,instanceCount,firstIndex,baseVertex,firstInstance)=>{var pass=WebGPU.mgrRenderPassEncoder.get(passId);pass["drawIndexed"](indexCount,instanceCount,firstIndex,baseVertex,firstInstance)};var _wgpuRenderPassEncoderEnd=encoderId=>{var encoder=WebGPU.mgrRenderPassEncoder.get(encoderId);encoder["end"]()};var _wgpuRenderPassEncoderSetBindGroup=(passId,groupIndex,groupId,dynamicOffsetCount,dynamicOffsetsPtr)=>{var pass=WebGPU.mgrRenderPassEncoder.get(passId);var group=WebGPU.mgrBindGroup.get(groupId);if(dynamicOffsetCount==0){pass["setBindGroup"](groupIndex,group)}else{var offsets=[];for(var i=0;i>2])}pass["setBindGroup"](groupIndex,group,offsets)}};var _wgpuRenderPassEncoderSetBlendConstant=(passId,colorPtr)=>{var pass=WebGPU.mgrRenderPassEncoder.get(passId);var color=WebGPU.makeColor(colorPtr);pass["setBlendConstant"](color)};function _wgpuRenderPassEncoderSetIndexBuffer(passId,bufferId,format,offset_low,offset_high,size_low,size_high){var offset=convertI32PairToI53Checked(offset_low,offset_high);var size=convertI32PairToI53Checked(size_low,size_high);var pass=WebGPU.mgrRenderPassEncoder.get(passId);var buffer=WebGPU.mgrBuffer.get(bufferId);if(size==-1)size=undefined;pass["setIndexBuffer"](buffer,WebGPU.IndexFormat[format],offset,size)}var _wgpuRenderPassEncoderSetPipeline=(passId,pipelineId)=>{var pass=WebGPU.mgrRenderPassEncoder.get(passId);var pipeline=WebGPU.mgrRenderPipeline.get(pipelineId);pass["setPipeline"](pipeline)};var _wgpuRenderPassEncoderSetScissorRect=(passId,x,y,w,h)=>{var pass=WebGPU.mgrRenderPassEncoder.get(passId);pass["setScissorRect"](x,y,w,h)};function _wgpuRenderPassEncoderSetVertexBuffer(passId,slot,bufferId,offset_low,offset_high,size_low,size_high){var offset=convertI32PairToI53Checked(offset_low,offset_high);var size=convertI32PairToI53Checked(size_low,size_high);var pass=WebGPU.mgrRenderPassEncoder.get(passId);var buffer=WebGPU.mgrBuffer.get(bufferId);if(size==-1)size=undefined;pass["setVertexBuffer"](slot,buffer,offset,size)}var _wgpuRenderPassEncoderSetViewport=(passId,x,y,w,h,minDepth,maxDepth)=>{var pass=WebGPU.mgrRenderPassEncoder.get(passId);pass["setViewport"](x,y,w,h,minDepth,maxDepth)};var _wgpuRenderPipelineRelease=id=>WebGPU.mgrRenderPipeline.release(id);var _wgpuSamplerRelease=id=>WebGPU.mgrSampler.release(id);var _wgpuShaderModuleRelease=id=>WebGPU.mgrShaderModule.release(id);var _wgpuSurfaceGetPreferredFormat=(surfaceId,adapterId)=>{var format=navigator["gpu"]["getPreferredCanvasFormat"]();return WebGPU.PreferredFormat[format]};var _wgpuSurfaceRelease=id=>WebGPU.mgrSurface.release(id);var _wgpuSwapChainGetCurrentTextureView=swapChainId=>{var context=WebGPU.mgrSwapChain.get(swapChainId);return WebGPU.mgrTextureView.create(context["getCurrentTexture"]()["createView"]())};var _wgpuSwapChainRelease=id=>WebGPU.mgrSwapChain.release(id);var _wgpuTextureCreateView=(textureId,descriptor)=>{var desc;if(descriptor){assert(descriptor);assert(HEAPU32[descriptor>>2]===0);var mipLevelCount=HEAPU32[descriptor+20>>2];var arrayLayerCount=HEAPU32[descriptor+28>>2];desc={"format":WebGPU.TextureFormat[HEAPU32[descriptor+8>>2]],"dimension":WebGPU.TextureViewDimension[HEAPU32[descriptor+12>>2]],"baseMipLevel":HEAPU32[descriptor+16>>2],"mipLevelCount":mipLevelCount===4294967295?undefined:mipLevelCount,"baseArrayLayer":HEAPU32[descriptor+24>>2],"arrayLayerCount":arrayLayerCount===4294967295?undefined:arrayLayerCount,"aspect":WebGPU.TextureAspect[HEAPU32[descriptor+32>>2]]};var labelPtr=HEAPU32[descriptor+4>>2];if(labelPtr)desc["label"]=UTF8ToString(labelPtr)}var texture=WebGPU.mgrTexture.get(textureId);return WebGPU.mgrTextureView.create(texture["createView"](desc))};var _wgpuTextureRelease=id=>WebGPU.mgrTexture.release(id);var _wgpuTextureViewRelease=id=>WebGPU.mgrTextureView.release(id);var allocateUTF8=stringToNewUTF8;var FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.createPreloadedFile=FS_createPreloadedFile;FS.staticInit();Module["FS_createPath"]=FS.createPath;Module["FS_createDataFile"]=FS.createDataFile;Module["FS_createPreloadedFile"]=FS.createPreloadedFile;Module["FS_unlink"]=FS.unlink;Module["FS_createLazyFile"]=FS.createLazyFile;Module["FS_createDevice"]=FS.createDevice;embind_init_charCodes();BindingError=Module["BindingError"]=class BindingError extends Error{constructor(message){super(message);this.name="BindingError"}};InternalError=Module["InternalError"]=class InternalError extends Error{constructor(message){super(message);this.name="InternalError"}};handleAllocatorInit();init_emval();Module["requestFullscreen"]=Browser.requestFullscreen;Module["requestFullScreen"]=Browser.requestFullScreen;Module["requestAnimationFrame"]=Browser.requestAnimationFrame;Module["setCanvasSize"]=Browser.setCanvasSize;Module["pauseMainLoop"]=Browser.mainLoop.pause;Module["resumeMainLoop"]=Browser.mainLoop.resume;Module["getUserMedia"]=Browser.getUserMedia;Module["createContext"]=Browser.createContext;var preloadedImages={};var preloadedAudios={};WebGPU.initManagers();var GLctx;var miniTempWebGLFloatBuffersStorage=new Float32Array(288);for(var i=0;i<288;++i){miniTempWebGLFloatBuffers[i]=miniTempWebGLFloatBuffersStorage.subarray(0,i+1)}function checkIncomingModuleAPI(){ignoredModuleProp("fetchSettings")}var wasmImports={__assert_fail:___assert_fail,__asyncjs__destroy_element_async:__asyncjs__destroy_element_async,__asyncjs__get_audio_samples_setup:__asyncjs__get_audio_samples_setup,__asyncjs__get_clipboard_content:__asyncjs__get_clipboard_content,__asyncjs__init_file_system:__asyncjs__init_file_system,__asyncjs__open_directory:__asyncjs__open_directory,__asyncjs__open_document:__asyncjs__open_document,__asyncjs__save_to_drive:__asyncjs__save_to_drive,__asyncjs__set_clipboard_content:__asyncjs__set_clipboard_content,__asyncjs__setup_latency_metronome:__asyncjs__setup_latency_metronome,__asyncjs__show_touch_keyboard:__asyncjs__show_touch_keyboard,__asyncjs__webgpu_create_device:__asyncjs__webgpu_create_device,__cxa_throw:___cxa_throw,__syscall_chmod:___syscall_chmod,__syscall_fchmod:___syscall_fchmod,__syscall_fcntl64:___syscall_fcntl64,__syscall_fstat64:___syscall_fstat64,__syscall_ftruncate64:___syscall_ftruncate64,__syscall_getdents64:___syscall_getdents64,__syscall_ioctl:___syscall_ioctl,__syscall_lstat64:___syscall_lstat64,__syscall_mkdirat:___syscall_mkdirat,__syscall_newfstatat:___syscall_newfstatat,__syscall_openat:___syscall_openat,__syscall_readlinkat:___syscall_readlinkat,__syscall_rmdir:___syscall_rmdir,__syscall_stat64:___syscall_stat64,__syscall_symlink:___syscall_symlink,__syscall_unlinkat:___syscall_unlinkat,_embind_register_bigint:__embind_register_bigint,_embind_register_bool:__embind_register_bool,_embind_register_emval:__embind_register_emval,_embind_register_float:__embind_register_float,_embind_register_integer:__embind_register_integer,_embind_register_memory_view:__embind_register_memory_view,_embind_register_std_string:__embind_register_std_string,_embind_register_std_wstring:__embind_register_std_wstring,_embind_register_void:__embind_register_void,_emscripten_fs_load_embedded_files:__emscripten_fs_load_embedded_files,_emval_as:__emval_as,_emval_await:__emval_await,_emval_decref:__emval_decref,_emval_new_cstring:__emval_new_cstring,_emval_run_destructors:__emval_run_destructors,_emval_take_value:__emval_take_value,abort:_abort,add_window_event:add_window_event,audio_element_pause:audio_element_pause,audio_element_play:audio_element_play,auto_resize_canvas:auto_resize_canvas,canvas_get_device_pixel_ratio:canvas_get_device_pixel_ratio,canvas_get_height:canvas_get_height,canvas_get_width:canvas_get_width,clear_local_storage:clear_local_storage,create_audio_playback:create_audio_playback,create_button:create_button,create_picker:create_picker,destroy_element:destroy_element,download_document:download_document,emscripten_asm_const_double:_emscripten_asm_const_double,emscripten_asm_const_int:_emscripten_asm_const_int,emscripten_get_now:_emscripten_get_now,emscripten_memcpy_js:_emscripten_memcpy_js,emscripten_resize_heap:_emscripten_resize_heap,emscripten_set_main_loop_arg:_emscripten_set_main_loop_arg,emscripten_set_wheel_callback_on_thread:_emscripten_set_wheel_callback_on_thread,emscripten_set_window_title:_emscripten_set_window_title,emscripten_webgpu_get_device:_emscripten_webgpu_get_device,environ_get:_environ_get,environ_sizes_get:_environ_sizes_get,fd_close:_fd_close,fd_fdstat_get:_fd_fdstat_get,fd_read:_fd_read,fd_seek:_fd_seek,fd_write:_fd_write,gapi_loaded:gapi_loaded,gapi_ready:gapi_ready,get_audio_context_time:get_audio_context_time,get_audio_duration:get_audio_duration,get_audio_playback_progress:get_audio_playback_progress,get_audio_samples_hybrid:get_audio_samples_hybrid,get_has_web_gpu:get_has_web_gpu,get_preference_value:get_preference_value,get_runtime_platform:get_runtime_platform,gis_loaded:gis_loaded,glActiveTexture:_glActiveTexture,glAttachShader:_glAttachShader,glBindBuffer:_glBindBuffer,glBindTexture:_glBindTexture,glBindVertexArrayOES:_glBindVertexArrayOES,glBlendEquation:_glBlendEquation,glBlendEquationSeparate:_glBlendEquationSeparate,glBlendFuncSeparate:_glBlendFuncSeparate,glBufferData:_glBufferData,glBufferSubData:_glBufferSubData,glClear:_glClear,glClearColor:_glClearColor,glCompileShader:_glCompileShader,glCreateProgram:_glCreateProgram,glCreateShader:_glCreateShader,glDeleteShader:_glDeleteShader,glDeleteTextures:_glDeleteTextures,glDeleteVertexArraysOES:_glDeleteVertexArraysOES,glDetachShader:_glDetachShader,glDisable:_glDisable,glDrawElements:_glDrawElements,glEnable:_glEnable,glEnableVertexAttribArray:_glEnableVertexAttribArray,glGenBuffers:_glGenBuffers,glGenTextures:_glGenTextures,glGenVertexArraysOES:_glGenVertexArraysOES,glGetAttribLocation:_glGetAttribLocation,glGetIntegerv:_glGetIntegerv,glGetProgramInfoLog:_glGetProgramInfoLog,glGetProgramiv:_glGetProgramiv,glGetShaderInfoLog:_glGetShaderInfoLog,glGetShaderiv:_glGetShaderiv,glGetUniformLocation:_glGetUniformLocation,glIsEnabled:_glIsEnabled,glIsProgram:_glIsProgram,glLinkProgram:_glLinkProgram,glPixelStorei:_glPixelStorei,glScissor:_glScissor,glShaderSource:_glShaderSource,glTexImage2D:_glTexImage2D,glTexParameteri:_glTexParameteri,glUniform1i:_glUniform1i,glUniformMatrix4fv:_glUniformMatrix4fv,glUseProgram:_glUseProgram,glVertexAttribPointer:_glVertexAttribPointer,glViewport:_glViewport,glfwCreateStandardCursor:_glfwCreateStandardCursor,glfwCreateWindow:_glfwCreateWindow,glfwDestroyWindow:_glfwDestroyWindow,glfwFocusWindow:_glfwFocusWindow,glfwGetClipboardString:_glfwGetClipboardString,glfwGetFramebufferSize:_glfwGetFramebufferSize,glfwGetInputMode:_glfwGetInputMode,glfwGetJoystickAxes:_glfwGetJoystickAxes,glfwGetJoystickButtons:_glfwGetJoystickButtons,glfwGetKey:_glfwGetKey,glfwGetMonitorContentScale:_glfwGetMonitorContentScale,glfwGetMonitorPos:_glfwGetMonitorPos,glfwGetMonitorWorkarea:_glfwGetMonitorWorkarea,glfwGetMonitors:_glfwGetMonitors,glfwGetTime:_glfwGetTime,glfwGetVideoMode:_glfwGetVideoMode,glfwGetWindowAttrib:_glfwGetWindowAttrib,glfwGetWindowPos:_glfwGetWindowPos,glfwGetWindowSize:_glfwGetWindowSize,glfwInit:_glfwInit,glfwMakeContextCurrent:_glfwMakeContextCurrent,glfwPollEvents:_glfwPollEvents,glfwSetCharCallback:_glfwSetCharCallback,glfwSetClipboardString:_glfwSetClipboardString,glfwSetCursor:_glfwSetCursor,glfwSetCursorEnterCallback:_glfwSetCursorEnterCallback,glfwSetCursorPos:_glfwSetCursorPos,glfwSetCursorPosCallback:_glfwSetCursorPosCallback,glfwSetErrorCallback:_glfwSetErrorCallback,glfwSetInputMode:_glfwSetInputMode,glfwSetKeyCallback:_glfwSetKeyCallback,glfwSetMonitorCallback:_glfwSetMonitorCallback,glfwSetMouseButtonCallback:_glfwSetMouseButtonCallback,glfwSetScrollCallback:_glfwSetScrollCallback,glfwSetWindowCloseCallback:_glfwSetWindowCloseCallback,glfwSetWindowFocusCallback:_glfwSetWindowFocusCallback,glfwSetWindowOpacity:_glfwSetWindowOpacity,glfwSetWindowPos:_glfwSetWindowPos,glfwSetWindowPosCallback:_glfwSetWindowPosCallback,glfwSetWindowSize:_glfwSetWindowSize,glfwSetWindowSizeCallback:_glfwSetWindowSizeCallback,glfwSetWindowTitle:_glfwSetWindowTitle,glfwShowWindow:_glfwShowWindow,glfwSwapBuffers:_glfwSwapBuffers,glfwSwapInterval:_glfwSwapInterval,glfwTerminate:_glfwTerminate,glfwWindowHint:_glfwWindowHint,has_gapi_token:has_gapi_token,has_physical_touch:has_physical_touch,has_preference_key:has_preference_key,hide_touch_keyboard:hide_touch_keyboard,is_audio_stretched:is_audio_stretched,is_video_paused:is_video_paused,language_code_to_name:language_code_to_name,load_image:load_image,load_preferences_json:load_preferences_json,load_video:load_video,pause_video:pause_video,play_latency_metronome:play_latency_metronome,play_video:play_video,render_image:render_image,request_client_token:request_client_token,resize_canvas:resize_canvas,set_audio_playback_buffer:set_audio_playback_buffer,set_audio_playback_progress:set_audio_playback_progress,set_audio_playback_speed:set_audio_playback_speed,set_preference_value:set_preference_value,set_video_playback_progress:set_video_playback_progress,set_video_playback_rate:set_video_playback_rate,stop_latency_metronome:stop_latency_metronome,strftime_l:_strftime_l,touch_input_handler:touch_input_handler,wait_for_sync_fs:wait_for_sync_fs,wgpuAdapterRelease:_wgpuAdapterRelease,wgpuBindGroupLayoutRelease:_wgpuBindGroupLayoutRelease,wgpuBindGroupRelease:_wgpuBindGroupRelease,wgpuBufferDestroy:_wgpuBufferDestroy,wgpuBufferRelease:_wgpuBufferRelease,wgpuCommandEncoderBeginRenderPass:_wgpuCommandEncoderBeginRenderPass,wgpuCommandEncoderFinish:_wgpuCommandEncoderFinish,wgpuCreateInstance:_wgpuCreateInstance,wgpuDeviceCreateBindGroup:_wgpuDeviceCreateBindGroup,wgpuDeviceCreateBindGroupLayout:_wgpuDeviceCreateBindGroupLayout,wgpuDeviceCreateBuffer:_wgpuDeviceCreateBuffer,wgpuDeviceCreateCommandEncoder:_wgpuDeviceCreateCommandEncoder,wgpuDeviceCreatePipelineLayout:_wgpuDeviceCreatePipelineLayout,wgpuDeviceCreateRenderPipeline:_wgpuDeviceCreateRenderPipeline,wgpuDeviceCreateSampler:_wgpuDeviceCreateSampler,wgpuDeviceCreateShaderModule:_wgpuDeviceCreateShaderModule,wgpuDeviceCreateSwapChain:_wgpuDeviceCreateSwapChain,wgpuDeviceCreateTexture:_wgpuDeviceCreateTexture,wgpuDeviceGetQueue:_wgpuDeviceGetQueue,wgpuDeviceSetUncapturedErrorCallback:_wgpuDeviceSetUncapturedErrorCallback,wgpuInstanceCreateSurface:_wgpuInstanceCreateSurface,wgpuInstanceReference:_wgpuInstanceReference,wgpuInstanceRelease:_wgpuInstanceRelease,wgpuPipelineLayoutRelease:_wgpuPipelineLayoutRelease,wgpuQueueRelease:_wgpuQueueRelease,wgpuQueueSubmit:_wgpuQueueSubmit,wgpuQueueWriteBuffer:_wgpuQueueWriteBuffer,wgpuQueueWriteTexture:_wgpuQueueWriteTexture,wgpuRenderPassEncoderDrawIndexed:_wgpuRenderPassEncoderDrawIndexed,wgpuRenderPassEncoderEnd:_wgpuRenderPassEncoderEnd,wgpuRenderPassEncoderSetBindGroup:_wgpuRenderPassEncoderSetBindGroup,wgpuRenderPassEncoderSetBlendConstant:_wgpuRenderPassEncoderSetBlendConstant,wgpuRenderPassEncoderSetIndexBuffer:_wgpuRenderPassEncoderSetIndexBuffer,wgpuRenderPassEncoderSetPipeline:_wgpuRenderPassEncoderSetPipeline,wgpuRenderPassEncoderSetScissorRect:_wgpuRenderPassEncoderSetScissorRect,wgpuRenderPassEncoderSetVertexBuffer:_wgpuRenderPassEncoderSetVertexBuffer,wgpuRenderPassEncoderSetViewport:_wgpuRenderPassEncoderSetViewport,wgpuRenderPipelineRelease:_wgpuRenderPipelineRelease,wgpuSamplerRelease:_wgpuSamplerRelease,wgpuShaderModuleRelease:_wgpuShaderModuleRelease,wgpuSurfaceGetPreferredFormat:_wgpuSurfaceGetPreferredFormat,wgpuSurfaceRelease:_wgpuSurfaceRelease,wgpuSwapChainGetCurrentTextureView:_wgpuSwapChainGetCurrentTextureView,wgpuSwapChainRelease:_wgpuSwapChainRelease,wgpuTextureCreateView:_wgpuTextureCreateView,wgpuTextureRelease:_wgpuTextureRelease,wgpuTextureViewRelease:_wgpuTextureViewRelease};Asyncify.instrumentWasmImports(wasmImports);var wasmExports=createWasm();var ___wasm_call_ctors=createExportWrapper("__wasm_call_ctors");var _fflush=Module["_fflush"]=createExportWrapper("fflush");var _malloc=Module["_malloc"]=createExportWrapper("malloc");var _free=Module["_free"]=createExportWrapper("free");var _main=Module["_main"]=createExportWrapper("__main_argc_argv");var _GAPI_Init_Client=Module["_GAPI_Init_Client"]=createExportWrapper("GAPI_Init_Client");var _CreateTexture=Module["_CreateTexture"]=createExportWrapper("CreateTexture");var _GetClipboardContent=Module["_GetClipboardContent"]=createExportWrapper("GetClipboardContent");var _CopyClipboardContent=Module["_CopyClipboardContent"]=createExportWrapper("CopyClipboardContent");var _CutClipboardContent=Module["_CutClipboardContent"]=createExportWrapper("CutClipboardContent");var _TouchStart=Module["_TouchStart"]=createExportWrapper("TouchStart");var _TouchEnd=Module["_TouchEnd"]=createExportWrapper("TouchEnd");var _TouchCancel=Module["_TouchCancel"]=createExportWrapper("TouchCancel");var _TouchMove=Module["_TouchMove"]=createExportWrapper("TouchMove");var _TouchExtraKeyEvents=Module["_TouchExtraKeyEvents"]=createExportWrapper("TouchExtraKeyEvents");var _ShowInputDebugger=Module["_ShowInputDebugger"]=createExportWrapper("ShowInputDebugger");var _LoadProject=Module["_LoadProject"]=createExportWrapper("LoadProject");var _SaveProject=Module["_SaveProject"]=createExportWrapper("SaveProject");var _GoogleTokenExpirationCallback=Module["_GoogleTokenExpirationCallback"]=createExportWrapper("GoogleTokenExpirationCallback");var _LogInToGoogle=Module["_LogInToGoogle"]=createExportWrapper("LogInToGoogle");var _LoadFileFromGoogleDrive=Module["_LoadFileFromGoogleDrive"]=createExportWrapper("LoadFileFromGoogleDrive");var _LoadCompletedFromGoogleDrive=Module["_LoadCompletedFromGoogleDrive"]=createExportWrapper("LoadCompletedFromGoogleDrive");var _LoadCanceledFromGoogleDrive=Module["_LoadCanceledFromGoogleDrive"]=createExportWrapper("LoadCanceledFromGoogleDrive");var _main=Module["_main"]=createExportWrapper("main");var _AudioOnEnded=Module["_AudioOnEnded"]=createExportWrapper("AudioOnEnded");var _AudioOnPause=Module["_AudioOnPause"]=createExportWrapper("AudioOnPause");var _AudioOnPlay=Module["_AudioOnPlay"]=createExportWrapper("AudioOnPlay");var _AudioOnDurationChange=Module["_AudioOnDurationChange"]=createExportWrapper("AudioOnDurationChange");var _IsWaitingToPlay=Module["_IsWaitingToPlay"]=createExportWrapper("IsWaitingToPlay");var _jsPrepPlayback=Module["_jsPrepPlayback"]=createExportWrapper("jsPrepPlayback");var _jsUpdateAudioBuffer=Module["_jsUpdateAudioBuffer"]=createExportWrapper("jsUpdateAudioBuffer");var _jsPlayPreviewVideo=Module["_jsPlayPreviewVideo"]=createExportWrapper("jsPlayPreviewVideo");var _jsPausePreviewVideo=Module["_jsPausePreviewVideo"]=createExportWrapper("jsPausePreviewVideo");var _jsSetPreviewVideoProgress=Module["_jsSetPreviewVideoProgress"]=createExportWrapper("jsSetPreviewVideoProgress");var _LoadPreferences=Module["_LoadPreferences"]=createExportWrapper("LoadPreferences");var _SavePreferences=Module["_SavePreferences"]=createExportWrapper("SavePreferences");var _LoadLayout=Module["_LoadLayout"]=createExportWrapper("LoadLayout");var _SaveLayout=Module["_SaveLayout"]=createExportWrapper("SaveLayout");var ___getTypeName=createExportWrapper("__getTypeName");var ___errno_location=createExportWrapper("__errno_location");var _memalign=createExportWrapper("memalign");var setTempRet0=createExportWrapper("setTempRet0");var _emscripten_stack_init=()=>(_emscripten_stack_init=wasmExports["emscripten_stack_init"])();var _emscripten_stack_get_free=()=>(_emscripten_stack_get_free=wasmExports["emscripten_stack_get_free"])();var _emscripten_stack_get_base=()=>(_emscripten_stack_get_base=wasmExports["emscripten_stack_get_base"])();var _emscripten_stack_get_end=()=>(_emscripten_stack_get_end=wasmExports["emscripten_stack_get_end"])();var stackSave=createExportWrapper("stackSave");var stackRestore=createExportWrapper("stackRestore");var stackAlloc=createExportWrapper("stackAlloc");var _emscripten_stack_get_current=()=>(_emscripten_stack_get_current=wasmExports["emscripten_stack_get_current"])();var ___cxa_is_pointer_type=createExportWrapper("__cxa_is_pointer_type");var dynCall_vii=Module["dynCall_vii"]=createExportWrapper("dynCall_vii");var dynCall_vidd=Module["dynCall_vidd"]=createExportWrapper("dynCall_vidd");var dynCall_viiii=Module["dynCall_viiii"]=createExportWrapper("dynCall_viiii");var dynCall_viiiii=Module["dynCall_viiiii"]=createExportWrapper("dynCall_viiiii");var dynCall_ii=Module["dynCall_ii"]=createExportWrapper("dynCall_ii");var dynCall_iiii=Module["dynCall_iiii"]=createExportWrapper("dynCall_iiii");var dynCall_vi=Module["dynCall_vi"]=createExportWrapper("dynCall_vi");var dynCall_vif=Module["dynCall_vif"]=createExportWrapper("dynCall_vif");var dynCall_viii=Module["dynCall_viii"]=createExportWrapper("dynCall_viii");var dynCall_iii=Module["dynCall_iii"]=createExportWrapper("dynCall_iii");var dynCall_v=Module["dynCall_v"]=createExportWrapper("dynCall_v");var dynCall_jiji=Module["dynCall_jiji"]=createExportWrapper("dynCall_jiji");var dynCall_iidiiii=Module["dynCall_iidiiii"]=createExportWrapper("dynCall_iidiiii");var dynCall_viijii=Module["dynCall_viijii"]=createExportWrapper("dynCall_viijii");var dynCall_iiiii=Module["dynCall_iiiii"]=createExportWrapper("dynCall_iiiii");var dynCall_iiiiii=Module["dynCall_iiiiii"]=createExportWrapper("dynCall_iiiiii");var dynCall_iiiiiiiii=Module["dynCall_iiiiiiiii"]=createExportWrapper("dynCall_iiiiiiiii");var dynCall_iiiiiii=Module["dynCall_iiiiiii"]=createExportWrapper("dynCall_iiiiiii");var dynCall_iiiiij=Module["dynCall_iiiiij"]=createExportWrapper("dynCall_iiiiij");var dynCall_iiiiid=Module["dynCall_iiiiid"]=createExportWrapper("dynCall_iiiiid");var dynCall_iiiiijj=Module["dynCall_iiiiijj"]=createExportWrapper("dynCall_iiiiijj");var dynCall_iiiiiiii=Module["dynCall_iiiiiiii"]=createExportWrapper("dynCall_iiiiiiii");var dynCall_iiiiiijj=Module["dynCall_iiiiiijj"]=createExportWrapper("dynCall_iiiiiijj");var dynCall_viiiiii=Module["dynCall_viiiiii"]=createExportWrapper("dynCall_viiiiii");var _asyncify_start_unwind=createExportWrapper("asyncify_start_unwind");var _asyncify_stop_unwind=createExportWrapper("asyncify_stop_unwind");var _asyncify_start_rewind=createExportWrapper("asyncify_start_rewind");var _asyncify_stop_rewind=createExportWrapper("asyncify_stop_rewind");var ___emscripten_embedded_file_data=Module["___emscripten_embedded_file_data"]=3819980;var ___start_em_js=Module["___start_em_js"]=3854416;var ___stop_em_js=Module["___stop_em_js"]=3879287;Module["addRunDependency"]=addRunDependency;Module["removeRunDependency"]=removeRunDependency;Module["FS_createPath"]=FS.createPath;Module["FS_createLazyFile"]=FS.createLazyFile;Module["FS_createDevice"]=FS.createDevice;Module["FS_createPreloadedFile"]=FS.createPreloadedFile;Module["FS_createDataFile"]=FS.createDataFile;Module["FS_unlink"]=FS.unlink;Module["allocateUTF8"]=allocateUTF8;var missingLibrarySymbols=["writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","convertI32PairToI53","convertU32PairToI53","ydayFromDate","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","getHostByName","getCallstack","emscriptenLog","convertPCtoSourceLocation","runMainThreadEmAsm","jstoi_s","listenOnce","autoResumeAudioContext","dynCallLegacy","getDynCaller","dynCall","asmjsMangle","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","getCFunc","ccall","cwrap","uleb128Encode","generateFuncType","convertJsFunctionToWasm","getEmptyTableSlot","updateTableMap","getFunctionAddress","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","intArrayToString","AsciiToString","registerKeyEventCallback","registerMouseEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","jsStackTrace","stackTrace","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","getPromise","makePromise","idsToPromises","makePromiseCallback","findMatchingCatch","getSocketFromFD","getSocketAddress","FS_mkdirTree","_setNetworkCallback","emscriptenWebGLGetUniform","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","registerWebGlEventCallback","SDL_unicode","SDL_ttfContext","SDL_audio","emscriptenWebGLGetIndexed","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory","getFunctionName","getFunctionArgsName","heap32VectorToArray","init_embind","throwUnboundTypeError","ensureOverloadTable","exposePublicSymbol","replacePublicSymbol","extendError","createNamedFunction","getBasestPointer","registerInheritedInstance","unregisterInheritedInstance","getInheritedInstance","getInheritedInstanceCount","getLiveInheritedInstances","enumReadValueFromPointer","newFunc","craftInvokerFunction","embind__requireFunction","genericPointerToWireType","constNoSmartPtrRawPointerToWireType","nonConstNoSmartPtrRawPointerToWireType","init_RegisteredPointer","RegisteredPointer","RegisteredPointer_fromWireType","runDestructor","releaseClassHandle","detachFinalizer","attachFinalizer","makeClassHandle","init_ClassHandle","ClassHandle","throwInstanceAlreadyDeleted","flushPendingDeletes","setDelayFunction","RegisteredClass","shallowCopyInternalPointer","downcastPointer","upcastPointer","validateThis","char_0","char_9","makeLegalFunctionName","emval_get_global","emval_lookupTypes","emval_addMethodCaller"];missingLibrarySymbols.forEach(missingLibrarySymbol);var unexportedSymbols=["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","FS_createFolder","FS_createLink","FS_readFile","out","err","callMain","abort","wasmMemory","wasmExports","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","writeStackCookie","checkStackCookie","writeI53ToI64","readI53FromI64","readI53FromU64","convertI32PairToI53Checked","ptrToString","zeroMemory","exitJS","getHeapMax","growMemory","ENV","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","arraySum","addDays","ERRNO_CODES","ERRNO_MESSAGES","setErrNo","DNS","Protocols","Sockets","initRandomFill","randomFill","timers","warnOnce","UNWIND_CACHE","readEmAsmArgsArray","readEmAsmArgs","runEmAsmFunction","jstoi_q","getExecutableName","handleException","keepRuntimeAlive","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","asyncLoad","alignMemory","mmapAlloc","handleAllocatorInit","HandleAllocator","wasmTable","noExitRuntime","sigToWasmTypes","freeTableIndexes","functionsInTableMap","setValue","getValue","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","intArrayFromString","stringToAscii","UTF16Decoder","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","stringToNewUTF8","stringToUTF8OnStack","writeArrayToMemory","JSEvents","specialHTMLTargets","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerWheelEventCallback","currentFullscreenStrategy","restoreOldWindowedStyle","demangle","demangleAll","ExitStatus","getEnvStrings","doReadv","doWritev","safeSetTimeout","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","ExceptionInfo","Browser","setMainLoop","wget","SYSCALLS","preloadPlugins","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","FS","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","GL","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","__glGenObject","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscripten_webgl_power_preferences","AL","GLUT","EGL","GLEW","IDBStore","runAndAbortIfError","Asyncify","Fibers","SDL","SDL_gfx","GLFW_Window","GLFW","webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance","webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance","WebGPU","JsValStore","allocateUTF8OnStack","InternalError","BindingError","throwInternalError","throwBindingError","registeredTypes","awaitingDependencies","typeDependencies","tupleRegistrations","structRegistrations","sharedRegisterType","whenDependentTypesAreResolved","embind_charCodes","embind_init_charCodes","readLatin1String","getTypeName","requireRegisteredType","UnboundTypeError","PureVirtualError","GenericWireTypeSize","embindRepr","registeredInstances","registeredPointers","registerType","integerReadValueFromPointer","floatReadValueFromPointer","simpleReadValueFromPointer","readPointer","runDestructors","finalizationRegistry","detachFinalizer_deps","deletionQueue","delayFunction","emval_handles","emval_symbols","init_emval","count_emval_handles","getStringOrSymbol","Emval","emval_returnValue","emval_methodCallers","reflectConstruct","IDBFS"];unexportedSymbols.forEach(unexportedRuntimeSymbol);var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function callMain(){assert(runDependencies==0,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])');assert(__ATPRERUN__.length==0,"cannot call main when preRun functions remain to be called");var entryFunction=_main;var argc=0;var argv=0;try{var ret=entryFunction(argc,argv);exitJS(ret,true);return ret}catch(e){return handleException(e)}}function stackCheckInit(){_emscripten_stack_init();writeStackCookie()}function run(){if(runDependencies>0){return}stackCheckInit();preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(shouldRunNow)callMain();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}checkStackCookie()}function checkUnflushedContent(){var oldOut=out;var oldErr=err;var has=false;out=err=x=>{has=true};try{_fflush(0);["stdout","stderr"].forEach(function(name){var info=FS.analyzePath("/dev/"+name);if(!info)return;var stream=info.object;var rdev=stream.rdev;var tty=TTY.ttys[rdev];if(tty&&tty.output&&tty.output.length){has=true}})}catch(e){}out=oldOut;err=oldErr;if(has){warnOnce("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the Emscripten FAQ), or make sure to emit a newline when you printf etc.")}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"])shouldRunNow=false;run(); diff --git a/0.5.0-beta/Resonate.wasm b/0.5.0-beta/Resonate.wasm new file mode 100644 index 0000000..52d1a2a Binary files /dev/null and b/0.5.0-beta/Resonate.wasm differ diff --git a/0.5.0-beta/ResonateInstallWPA.js b/0.5.0-beta/ResonateInstallWPA.js new file mode 100644 index 0000000..f9d1cf2 --- /dev/null +++ b/0.5.0-beta/ResonateInstallWPA.js @@ -0,0 +1,70 @@ +// VV WPA support +const CACHE_NAME = `Resonate`; + +// Use the install event to pre-cache all initial resources. +self.addEventListener('install', event => { + event.waitUntil((async () => { + const cache = await caches.open(CACHE_NAME); + cache.addAll([ + './Resonate.js', + './Resonate.wasm', + './index.html', + './icons/ResonateIcon.png', + './icons/ResonateIconLarge.png', + './icons/ResonateIconUnsaved.png', + './plugins/audiostretchworker.js', + './plugins/timestretch.js', + './public/plugins/RubberBand.js', + './public/plugins/RubberBand.js.mem', + './public/plugins/paulstretch.js', + './public/plugins/VexWarp/tools.js', + './public/plugins/VexWarp/stretch.js', + './public/plugins/VexWarp/require.js', + './public/plugins/VexWarp/main.js', + './public/plugins/VexWarp/jquery-2.0.3.js', + './public/plugins/VexWarp/dsp.js', + ]); + })()); +}); + +self.addEventListener('fetch', event => { + event.respondWith((async () => { + const cache = await caches.open(CACHE_NAME); + + //const injectHeaders = (request)=>{ + // const headers = new Headers(request.headers); + // headers.set('Cross-Origin-Embedder-Policy', 'require-corp'); + // headers.set('Cross-Origin-Opener-Policy', 'same-origin'); + // const newRequest = new Request(request, { + // mode: request.mode, + // credentials: request.credentials, + // headers: headers + // }); + // return newRequest; + //}; + + // Get the resource from the cache. + //const cachedResponse = await cache.match(event.request); + //if (cachedResponse) { + // return cachedResponse; + //} else { + try { + // If the resource was not in the cache, try the network. + //const fetchResponse = await fetch(injectHeaders(event.request)); + const fetchResponse = await fetch(event.request); + + if(event.request.method != 'POST'){ + // Save the resource in the cache and return it. + cache.put(event.request, fetchResponse.clone()); + } + return fetchResponse; + } catch (e) { + // The network failed. + const cachedResponse = await cache.match(event.request); + if (cachedResponse) { + return cachedResponse; + } + } + //} + })()); +}); \ No newline at end of file diff --git a/0.5.0-beta/icons/ResonateIcon.png b/0.5.0-beta/icons/ResonateIcon.png new file mode 100644 index 0000000..cc0c81f Binary files /dev/null and b/0.5.0-beta/icons/ResonateIcon.png differ diff --git a/0.5.0-beta/icons/ResonateIconLarge.png b/0.5.0-beta/icons/ResonateIconLarge.png new file mode 100644 index 0000000..ebc8d50 Binary files /dev/null and b/0.5.0-beta/icons/ResonateIconLarge.png differ diff --git a/0.5.0-beta/icons/ResonateIconLarger.png b/0.5.0-beta/icons/ResonateIconLarger.png new file mode 100644 index 0000000..a0da09f Binary files /dev/null and b/0.5.0-beta/icons/ResonateIconLarger.png differ diff --git a/0.5.0-beta/icons/ResonateIconUnsaved.png b/0.5.0-beta/icons/ResonateIconUnsaved.png new file mode 100644 index 0000000..63558ec Binary files /dev/null and b/0.5.0-beta/icons/ResonateIconUnsaved.png differ diff --git a/0.5.0-beta/index.html b/0.5.0-beta/index.html new file mode 100644 index 0000000..7f4ee2f --- /dev/null +++ b/0.5.0-beta/index.html @@ -0,0 +1 @@ +Resonate \ No newline at end of file diff --git a/0.5.0-beta/manifest.json b/0.5.0-beta/manifest.json new file mode 100644 index 0000000..8135bc8 --- /dev/null +++ b/0.5.0-beta/manifest.json @@ -0,0 +1,21 @@ +{ + "lang": "en-us", + "name": "Resonate", + "short_name": "Resonate", + "description": "A timing tool for ECHO", + "start_url": "./", + "background_color": "#5e5966", + "theme_color": "#17141f", + "orientation": "any", + "display": "standalone", + "icons": [ + { + "src": "./icons/ResonateIconLarge.png", + "sizes": "256x256" + }, + { + "src": "./icons/ResonateIconLarger.png", + "sizes": "512x512" + } + ] +} \ No newline at end of file diff --git a/0.5.0-beta/plugins/RubberBand.js b/0.5.0-beta/plugins/RubberBand.js new file mode 100644 index 0000000..530d307 --- /dev/null +++ b/0.5.0-beta/plugins/RubberBand.js @@ -0,0 +1,17 @@ +var Module=typeof Module!="undefined"?Module:{};var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(Module["ENVIRONMENT"]){throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)")}var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_NODE){if(typeof process=="undefined"||!process.release||process.release.name!=="node")throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");var nodeVersion=process.versions.node;var numericVersion=nodeVersion.split(".").slice(0,3);numericVersion=numericVersion[0]*1e4+numericVersion[1]*100+numericVersion[2].split("-")[0]*1;if(numericVersion<16e4){throw new Error("This emscripten-generated code requires node v16.0.0 (detected v"+nodeVersion+")")}var fs=require("fs");var nodePath=require("path");if(ENVIRONMENT_IS_WORKER){scriptDirectory=nodePath.dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}read_=(filename,binary)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};readAsync=(filename,onload,onerror,binary=true)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);fs.readFile(filename,binary?undefined:"utf8",(err,data)=>{if(err)onerror(err);else onload(binary?data.buffer:data)})};if(!Module["thisProgram"]&&process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);if(typeof module!="undefined"){module["exports"]=Module}process.on("uncaughtException",ex=>{if(ex!=="unwind"&&!(ex instanceof ExitStatus)&&!(ex.context instanceof ExitStatus)){throw ex}});quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow};Module["inspect"]=()=>"[Emscripten Module object]"}else if(ENVIRONMENT_IS_SHELL){if(typeof process=="object"&&typeof require==="function"||typeof window=="object"||typeof importScripts=="function")throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");if(typeof read!="undefined"){read_=read}readBinary=f=>{if(typeof readbuffer=="function"){return new Uint8Array(readbuffer(f))}let data=read(f,"binary");assert(typeof data=="object");return data};readAsync=(f,onload,onerror)=>{setTimeout(()=>onload(readBinary(f)))};if(typeof clearTimeout=="undefined"){globalThis.clearTimeout=id=>{}}if(typeof setTimeout=="undefined"){globalThis.setTimeout=f=>typeof f=="function"?f():abort()}if(typeof scriptArgs!="undefined"){arguments_=scriptArgs}else if(typeof arguments!="undefined"){arguments_=arguments}if(typeof quit=="function"){quit_=(status,toThrow)=>{setTimeout(()=>{if(!(toThrow instanceof ExitStatus)){let toLog=toThrow;if(toThrow&&typeof toThrow=="object"&&toThrow.stack){toLog=[toThrow,toThrow.stack]}err(`exiting due to exception: ${toLog}`)}quit(status)});throw toThrow}}if(typeof print!="undefined"){if(typeof console=="undefined")console={};console.log=print;console.warn=console.error=typeof printErr!="undefined"?printErr:print}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}if(!(typeof window=="object"||typeof importScripts=="function"))throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");{read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}}else{throw new Error("environment detection error")}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;checkIncomingModuleAPI();if(Module["arguments"])arguments_=Module["arguments"];legacyModuleProp("arguments","arguments_");if(Module["thisProgram"])thisProgram=Module["thisProgram"];legacyModuleProp("thisProgram","thisProgram");if(Module["quit"])quit_=Module["quit"];legacyModuleProp("quit","quit_");assert(typeof Module["memoryInitializerPrefixURL"]=="undefined","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead");assert(typeof Module["pthreadMainPrefixURL"]=="undefined","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead");assert(typeof Module["cdInitializerPrefixURL"]=="undefined","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead");assert(typeof Module["filePackagePrefixURL"]=="undefined","Module.filePackagePrefixURL option was removed, use Module.locateFile instead");assert(typeof Module["read"]=="undefined","Module.read option was removed (modify read_ in JS)");assert(typeof Module["readAsync"]=="undefined","Module.readAsync option was removed (modify readAsync in JS)");assert(typeof Module["readBinary"]=="undefined","Module.readBinary option was removed (modify readBinary in JS)");assert(typeof Module["setWindowTitle"]=="undefined","Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)");assert(typeof Module["TOTAL_MEMORY"]=="undefined","Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY");legacyModuleProp("asm","wasmExports");legacyModuleProp("read","read_");legacyModuleProp("readAsync","readAsync");legacyModuleProp("readBinary","readBinary");legacyModuleProp("setWindowTitle","setWindowTitle");assert(!ENVIRONMENT_IS_SHELL,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable.");var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];legacyModuleProp("wasmBinary","wasmBinary");var WebAssembly={Memory:function(opts){this.buffer=new ArrayBuffer(opts["initial"]*65536)},Module:function(binary){},Instance:function(module,info){this.exports=( +// EMSCRIPTEN_START_ASM +function instantiate(Oa){function c(d){d.set=function(a,b){this[a]=b};d.get=function(a){return this[a]};return d}var e;var f=new ArrayBuffer(16);var g=new Int32Array(f);var h=new Float32Array(f);var i=new Float64Array(f);function j(k){return g[k]}function l(k,m){g[k]=m}function n(){return i[0]}function o(m){i[0]=m}function p(){throw new Error("abort")}function q(m){h[2]=m}function r(){return h[2]}function Ma(Na){var s=Na.env;var t=s.memory;var u=t.buffer;t.grow=Ka;var v=new Int8Array(u);var w=new Int16Array(u);var x=new Int32Array(u);var y=new Uint8Array(u);var z=new Uint16Array(u);var A=new Uint32Array(u);var B=new Float32Array(u);var C=new Float64Array(u);var D=Math.imul;var E=Math.fround;var F=Math.abs;var G=Math.clz32;var H=Math.min;var I=Math.max;var J=Math.floor;var K=Math.ceil;var L=Math.trunc;var M=Math.sqrt;var N=s._emval_as;var O=s._emval_run_destructors;var P=s._emval_decref;var Q=s._emval_take_value;var R=s.get_channel_from_buffer;var S=s._emval_new_cstring;var T=s._emval_get_property;var U=s._emval_get_module_property;var V=s._emval_incref;var W=s._emval_get_method_caller;var X=s._emval_call_method;var Y=s.emscripten_asm_const_int;var Z=s._emval_call;var _=s._emval_new_array_from_memory_view;var $=s.__cxa_throw;var aa=s._emval_new_array;var ba=s.abort;var ca=s.__assert_fail;var da=s._embind_register_void;var ea=s._embind_register_bool;var fa=s._embind_register_integer;var ga=s._embind_register_float;var ha=s._embind_register_std_string;var ia=s._embind_register_std_wstring;var ja=s._embind_register_emval;var ka=s._embind_register_memory_view;var la=s.emscripten_memcpy_js;var ma=s.emscripten_date_now;var na=Na.wasi_snapshot_preview1;var oa=na.fd_write;var pa=na.fd_read;var qa=na.fd_close;var ra=s.emscripten_err;var sa=s.emscripten_resize_heap;var ta=na.environ_sizes_get;var ua=na.environ_get;var va=s.strftime_l;var wa=s._embind_register_bigint;var xa=na.fd_seek;var ya=10540368;var za=0;var Aa=0;var Ba=0;var Ca=0;var Da=0; +// EMSCRIPTEN_START_FUNCS +function Ua(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0,w=0,z=0,G=0,H=0,I=0,L=0,M=0,$=E(0),ba=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=E(0),xa=0,za=0,Aa=0,Da=0,Fa=0,Ga=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-160;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];f=x[b+16>>2];e=x[b+20>>2];g=x[b+24>>2];k=x[b+28>>2];i=x[b+32>>2];q=x[b+36>>2];r=x[b+40>>2];t=x[b+44>>2];w=x[b+48>>2];I=x[b+52>>2];z=x[b+56>>2];H=x[b+60>>2];h=x[b+68>>2];l(0,x[b+64>>2]);l(1,h|0);u=+n();G=x[b+72>>2];M=x[b+76>>2];h=x[b+84>>2];l(0,x[b+80>>2]);l(1,h|0);L=+n();da=x[b+88>>2];ea=x[b+92>>2];ba=x[b+96>>2];fa=x[b+100>>2];$=B[b+104>>2];ia=x[b+108>>2];ga=x[b+112>>2];ka=x[b+116>>2];ma=x[b+120>>2];na=x[b+124>>2];oa=x[b+128>>2];qa=x[b+132>>2];ra=x[b+136>>2];sa=x[b+140>>2];h=x[b+148>>2];l(0,x[b+144>>2]);l(1,h|0);va=+n();Aa=x[b+152>>2];Da=x[b+156>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;s=x[x[Ca>>2]>>2]}if(!Ba){M=ya-80|0;ya=M;x[12155]=1;x[M+48>>2]=0;L=+N(a|0,46668,M+48|0);i=x[M+48>>2];if(i){O(i|0)}g=L>=0;x[12112]=g&L<4294967296?~~L>>>0:0;if(a){P(a|0)}x[M+48>>2]=0;L=+N(b|0,46668,M+48|0);a=x[M+48>>2];if(a){O(a|0)}i=L>=0;x[12113]=i&L<4294967296?~~L>>>0:0;if(b){P(b|0)}x[M+48>>2]=0;L=+N(c|0,46668,M+48|0);a=x[M+48>>2];if(a){O(a|0)}x[12114]=L<4294967296&L>=0?~~L>>>0:0;if(c){P(c|0)}b=x[12116];a=x[12115];if((b|0)!=(a|0)){while(1){c=b-12|0;h=x[c>>2];if(h){x[b-8>>2]=h;zg(h)}b=c;if((a|0)!=(b|0)){continue}break}}x[12116]=a;x[12119]=x[12118];b=x[12124];da=x[12123];if((b|0)!=(da|0)){while(1){c=b-12|0;a=x[c>>2];if(a){x[b-8>>2]=a;zg(a)}b=c;if((b|0)!=(da|0)){continue}break}}x[12124]=da;x[12121]=-1;x[12127]=x[12126];x[12129]=0;v[48520]=0;a=!x[12113]}a:{b:{c:{d:{e:{f:{if(!(a?Ba:1)){break f}g:{while(1){if(!Ba){x[M+48>>2]=d;a=Q(46632,M+48|0)|0;da=R(a|0)|0;if(a){P(a|0)}a=S(6287)|0;c=T(da|0,a|0)|0;if(a){P(a|0)}x[M+48>>2]=0;L=+N(c|0,46644,M+48|0);a=x[M+48>>2];if(a){O(a|0)}a=L<4294967296&L>=0;b=a?~~L>>>0:0;if(c){P(c|0)}x[M+64>>2]=b;x[M+56>>2]=0;x[M+48>>2]=0;x[M+52>>2]=0}if((Ba|0)==2|b){a=Ba?a:M+48|0;if(!Ba|!s){Va(a,b);m=0;if((Ba|0)==1){break b}}}if(!Ba){a=U(10420)|0;b=S(3408)|0;Fa=M,Ga=T(a|0,b|0)|0,x[Fa+44>>2]=Ga;x[M+40>>2]=48720;if(b){P(b|0)}if(a){P(a|0)}a=S(3152)|0;Fa=M,Ga=T(da|0,a|0)|0,x[Fa+76>>2]=Ga;x[M+72>>2]=48720;if(a){P(a|0)}x[M+68>>2]=x[M+48>>2];a=ya-32|0;ya=a;b=x[M+44>>2];V(b|0);x[a+8>>2]=b;x[a+16>>2]=x[M+68>>2];x[a+24>>2]=x[M- -64>>2];x[a+4>>2]=0;if(!(v[48528]&1)){b=W(4,12240,1)|0;v[48528]=1;x[12131]=b}b=M+32|0;g=a+4|0;f=a+8|0;L=+Z(x[12131],x[(M+72|0)+4>>2],g|0,f|0);h:{if(L<4294967296&L>=0){k=~~L>>>0;break h}k=0}c=x[a+4>>2];x[b+4>>2]=k;x[b>>2]=48720;if(c){O(c|0)}ya=a+32|0;a=x[M+76>>2];if(a){P(a|0)}V(da|0);x[M+72>>2]=da;x[M+68>>2]=0;if(!(v[48536]&1)){Fa=48532,Ga=W(2,12284,0)|0,x[Fa>>2]=Ga;v[48536]=1}b=x[M+36>>2];i=M+72|0;u=+X(x[12133],b|0,2200,M+68|0,i|0);a=x[M+68>>2];if(a){O(a|0)}c=x[12116];a=(c|0)!=x[12117]}i:{j:{if((Ba|0)==2|a){if(!Ba){x[c+8>>2]=0;x[c>>2]=0;x[c+4>>2]=0;a=x[M+48>>2];b=x[M+52>>2];i=(a|0)!=(b|0)}if((Ba|0)==2|i){if(!Ba){k=b-a|0;t=k>>2;b=t>>>0>=1073741824;if(b){break i}}if(!Ba|(s|0)==1){h=dr(k);m=1;if((Ba|0)==1){break b}b=h}if(!Ba){x[c+4>>2]=b;x[c>>2]=b;i=t<<2;t=i+b|0;x[c+8>>2]=t;a=lf(b,a,k);x[c+4>>2]=t}}if(!Ba){c=c+12|0;x[12116]=c;break j}}a=Ba?a:M+48|0;if(!Ba|(s|0)==2){Wa(48460,a);m=2;if((Ba|0)==1){break b}}c=Ba?c:x[12116]}if(!Ba){a=x[12115];k=x[(D((c-a|0)/12|0,12)+a|0)-12>>2];b=x[12120];c=x[12119];a=b>>>0>c>>>0}k:{if(!Ba){if(a){x[c>>2]=k;a=c+4|0;x[12119]=a;break k}a=x[12118];e=c-a>>2;t=e+1|0;i=t>>>0>=1073741824;if(i){break g}i=e<<2;b=b-a|0;e=b>>1;g=e>>>0>t>>>0?e:t;b=b>>>0>=2147483644;t=b?1073741823:g}ka=Ba?ka:t;if(ka|(Ba|0)==2){if(!Ba){if(t>>>0>=1073741824){break e}b=t<<2}if(!Ba|(s|0)==3){h=dr(b);m=3;if((Ba|0)==1){break b}}else{h=e}}else{h=e}e=!Ba&(!ka|(Ba|0)==2)?0:h;if(!Ba){b=e+i|0;x[b>>2]=k;k=(t<<2)+e|0;t=b+4|0;i=(a|0)!=(c|0);if(i){while(1){b=b-4|0;c=c-4|0;x[b>>2]=x[c>>2];i=(a|0)!=(c|0);if(i){continue}break}c=x[12118]}x[12120]=k;x[12119]=t;x[12118]=b;a=!c;if(a){break k}zg(c)}}if(!Ba){a=x[12115];a=(D((x[12116]-a|0)/12|0,12)+a|0)-12|0;a=x[a+4>>2]-x[a>>2]>>2;b=x[12121];x[12121]=a>>>0>>0?a:b;a=x[M+36>>2];if(a){P(a|0)}a=x[M+44>>2];if(a){P(a|0)}c=x[M+48>>2];if(c){x[M+52>>2]=c;zg(c)}if(da){P(da|0)}d=d+1|0;a=d>>>0>2]=x[12114];a=ya-16|0;ya=a;b=M+16|0;x[a+12>>2]=b}if(!Ba|(s|0)==6){h=kg(47536,12196,b,0,0);m=6;if((Ba|0)==1){break b}b=h}if(!Ba){ya=a+16|0;a=Y(47962,12220,0)|0}if(!Ba|(s|0)==7){h=dr(4);m=7;if((Ba|0)==1){break b}b=h}if(!Ba){da=x[12112];a=x[12113]}if(!Ba|(s|0)==8){h=dr(16);m=8;if((Ba|0)==1){break b}c=h}if(!Ba){x[c+12>>2]=12412;x[c>>2]=12300;x[c+4>>2]=0;x[c+8>>2]=0;x[M+28>>2]=c;x[M+24>>2]=c+12;c=x[M+28>>2];x[M+8>>2]=x[M+24>>2];x[M+12>>2]=c;c=ya;k=c-32|0;ya=k}if(!Ba|(s|0)==9){h=dr(8);m=9;if((Ba|0)==1){break b}t=h}if(!Ba){c=M+8|0;x[k+24>>2]=x[c>>2];c=x[c+4>>2];x[k+28>>2]=c;d=!c}l:{if((Ba|0)==2|d){if(!Ba){c=x[k+28>>2];x[k+8>>2]=x[k+24>>2];x[k+12>>2]=c;c=k+8|0}if(!Ba|(s|0)==10){h=Nc(t,da,a,c);m=10;if((Ba|0)==1){break b}a=h}if(!Ba){x[b>>2]=a;break l}}if(!Ba){x[c+4>>2]=x[c+4>>2]+1;d=x[k+28>>2];x[k+16>>2]=x[k+24>>2];x[k+20>>2]=d;d=k+16|0}if(!Ba|(s|0)==11){h=Nc(t,da,a,d);m=11;if((Ba|0)==1){break b}a=h}if(!Ba){x[b>>2]=a;da=x[c+4>>2];a=da-1|0;x[c+4>>2]=a;if(da){break l}a=x[x[c>>2]+8>>2]}if(!Ba|(s|0)==12){Ea[a|0](c);m=12;if((Ba|0)==1){break b}}if(!Ba|(s|0)==13){cr(c);m=13;if((Ba|0)==1){break b}}}if(!Ba){ya=k+32|0;a=b;x[12122]=a;u=+A[12114]*.1;L=1/u;b=ya-16|0;ya=b;c=x[a>>2];a=x[c>>2]}m:{n:{o:{if((Ba|0)==2|a){c=Ba?c:y[a+52|0];p:{if(!Ba){if(c){break p}c=x[a+144>>2]-1>>>0>1;if(c){break p}c=x[a+136>>2]<0;if(c){break o}x[b+8>>2]=8228;a=x[a+80>>2];c=!a;if(c){break n}d=x[x[a>>2]+24>>2];c=b+8|0}if(!Ba|(s|0)==14){Ea[d|0](a,c);m=14;if((Ba|0)==1){break b}}if(!Ba){break o}}if(!Ba){u=C[a+8>>3];c=L==u;if(c){break o}C[a+8>>3]=L;ga=ya-80|0;ya=ga;k=a;c=!y[a+52|0]}m=(Ba|0)==2;if(m|c){c=Ba?c:x[a+144>>2]==1;if(m|c){if(!Ba|(s|0)==15){sc(a);m=15;if((Ba|0)==1){break b}}if(!Ba){x[a+212>>2]=0;x[a+188>>2]=0;c=x[a+196>>2];x[a+200>>2]=c}}if(!Ba|(s|0)==16){lc(k);m=16;if((Ba|0)==1){break b}}}if(!Ba){r=x[k+40>>2];H=x[k+24>>2];d=x[k+28>>2];a=x[k+32>>2]}if(!Ba|(s|0)==17){mc(k);m=17;if((Ba|0)==1){break b}}if(!Ba){f=x[k+28>>2];c=(f|0)!=(d|0);d=x[k+32>>2];q=c|(d|0)!=(a|0);a=!q}q:{r:{s:{if(!Ba){if(a){break s}i=k+152|0;c=x[i>>2];a=!c}t:{if(!Ba){u:{if(a){break u}a=i;d=c;while(1){g=A[d+16>>2]>>0;a=g?a:d;e=d+4|0;g=x[(g?e:d)>>2];d=g;if(d){continue}break}d=(a|0)==(i|0);if(d){break u}a=A[a+16>>2]<=f>>>0;if(a){break t}}a=x[k+136>>2]>=0}if((Ba|0)==2|a){if(!Ba){x[ga+76>>2]=6965;u=+(f>>>0);C[ga+64>>3]=u;d=x[k+104>>2];a=!d;if(a){break r}c=ga- -64|0;g=x[x[d>>2]+24>>2];a=ga+76|0}if(!Ba|(s|0)==18){Ea[g|0](d,a,c);m=18;if((Ba|0)==1){break b}}f=Ba?f:x[k+28>>2]}if(!Ba|(s|0)==19){h=dr(20);m=19;if((Ba|0)==1){break b}t=h}if(!Ba){x[t+12>>2]=0;x[t+8>>2]=f;x[t+4>>2]=3;x[t>>2]=15576;nc(t);g=x[k+28>>2];a=x[k+152>>2];f=!a;c=i;d=c}v:{if(!Ba){w:{if(f){break w}while(1){d=a;h=x[a+16>>2];c=h>>>0>g>>>0;if(c){c=a;a=x[a>>2];if(a){continue}break w}if(g>>>0<=h>>>0){break v}a=x[d+4>>2];if(a){continue}break}c=d+4|0}}if(!Ba|(s|0)==20){h=dr(24);m=20;if((Ba|0)==1){break b}a=h}if(!Ba){x[a+16>>2]=g;x[a+8>>2]=d;x[a>>2]=0;x[a+4>>2]=0;x[a+20>>2]=0;x[c>>2]=a;d=a;g=x[x[k+148>>2]>>2];if(g){x[k+148>>2]=g;d=x[c>>2]}ec(x[k+152>>2],d);d=k+156|0;c=x[d>>2]+1|0;x[d>>2]=c;g=x[k+28>>2]}}if(!Ba){x[a+20>>2]=t}if(!Ba|(s|0)==21){h=dr(20);m=21;if((Ba|0)==1){break b}f=h}if(!Ba){x[f+12>>2]=0;x[f+8>>2]=g;x[f+4>>2]=g;x[f>>2]=15628;oc(f);c=k+164|0;d=c;a=x[c>>2];e=!a;g=x[k+28>>2]}x:{if(!Ba){y:{if(e){break y}while(1){d=a;h=x[a+16>>2];c=h>>>0>g>>>0;if(c){c=a;a=x[a>>2];if(a){continue}break y}if(g>>>0<=h>>>0){break x}a=x[d+4>>2];if(a){continue}break}c=d+4|0}}if(!Ba|(s|0)==22){h=dr(24);m=22;if((Ba|0)==1){break b}a=h}if(!Ba){x[a+16>>2]=g;x[a+8>>2]=d;x[a>>2]=0;x[a+4>>2]=0;x[a+20>>2]=0;x[c>>2]=a;d=a;g=x[x[k+160>>2]>>2];if(g){x[k+160>>2]=g;d=x[c>>2]}ec(x[k+164>>2],d);d=k+168|0;c=x[d>>2]+1|0;x[d>>2]=c}}if(!Ba){x[a+20>>2]=f;c=x[i>>2]}}if(!Ba){f=x[k+32>>2];a=!c}z:{if(!Ba){A:{if(a){break A}a=i;d=c;while(1){g=A[d+16>>2]>>0;a=g?a:d;e=d+4|0;g=x[(g?e:d)>>2];d=g;if(d){continue}break}d=(a|0)==(i|0);if(d){break A}a=A[a+16>>2]<=f>>>0;if(a){break z}}a=x[k+136>>2]>=0}if((Ba|0)==2|a){if(!Ba){x[ga+76>>2]=6965;u=+(f>>>0);C[ga+64>>3]=u;d=x[k+104>>2];a=!d;if(a){break r}c=ga- -64|0;g=x[x[d>>2]+24>>2];a=ga+76|0}if(!Ba|(s|0)==23){Ea[g|0](d,a,c);m=23;if((Ba|0)==1){break b}}f=Ba?f:x[k+32>>2]}if(!Ba|(s|0)==24){h=dr(20);m=24;if((Ba|0)==1){break b}t=h}if(!Ba){x[t+12>>2]=0;x[t+8>>2]=f;x[t+4>>2]=3;x[t>>2]=15576;nc(t);g=x[k+32>>2];a=x[k+152>>2];f=!a;c=i;d=c}B:{if(!Ba){C:{if(f){break C}while(1){d=a;h=x[a+16>>2];c=h>>>0>g>>>0;if(c){c=a;a=x[a>>2];if(a){continue}break C}if(g>>>0<=h>>>0){break B}a=x[d+4>>2];if(a){continue}break}c=d+4|0}}if(!Ba|(s|0)==25){h=dr(24);m=25;if((Ba|0)==1){break b}a=h}if(!Ba){x[a+16>>2]=g;x[a+8>>2]=d;x[a>>2]=0;x[a+4>>2]=0;x[a+20>>2]=0;x[c>>2]=a;d=a;g=x[x[k+148>>2]>>2];if(g){x[k+148>>2]=g;d=x[c>>2]}ec(x[k+152>>2],d);d=k+156|0;c=x[d>>2]+1|0;x[d>>2]=c;g=x[k+32>>2]}}if(!Ba){x[a+20>>2]=t}if(!Ba|(s|0)==26){h=dr(20);m=26;if((Ba|0)==1){break b}f=h}if(!Ba){x[f+12>>2]=0;x[f+8>>2]=g;x[f+4>>2]=g;x[f>>2]=15628;oc(f);c=k+164|0;d=c;a=x[c>>2];e=!a;g=x[k+32>>2]}D:{if(!Ba){E:{if(e){break E}while(1){d=a;h=x[a+16>>2];c=h>>>0>g>>>0;if(c){c=a;a=x[a>>2];if(a){continue}break E}if(g>>>0<=h>>>0){break D}a=x[d+4>>2];if(a){continue}break}c=d+4|0}}if(!Ba|(s|0)==27){h=dr(24);m=27;if((Ba|0)==1){break b}a=h}if(!Ba){x[a+16>>2]=g;x[a+8>>2]=d;x[a>>2]=0;x[a+4>>2]=0;x[a+20>>2]=0;x[c>>2]=a;d=a;g=x[x[k+160>>2]>>2];if(g){x[k+160>>2]=g;d=x[c>>2]}ec(x[k+164>>2],d);d=k+168|0;c=x[d>>2]+1|0;x[d>>2]=c}}if(!Ba){x[a+20>>2]=f;c=x[i>>2]}}if(!Ba){d=x[k+28>>2];f=!c;g=i;a=g}F:{if(!Ba){G:{if(f){break G}while(1){a=c;g=x[a+16>>2];f=g>>>0>d>>>0;if(f){g=a;c=x[a>>2];if(c){continue}break G}g=d>>>0<=g>>>0;if(g){break F}c=x[a+4>>2];if(c){continue}break}g=a+4|0}}if(!Ba|(s|0)==28){h=dr(24);m=28;if((Ba|0)==1){break b}c=h}if(!Ba){x[c+16>>2]=d;x[c+8>>2]=a;x[c>>2]=0;x[c+4>>2]=0;x[c+20>>2]=0;x[g>>2]=c;d=c;a=x[x[k+148>>2]>>2];if(a){x[k+148>>2]=a;d=x[g>>2]}ec(x[k+152>>2],d);d=k+156|0;a=x[d>>2]+1|0;x[d>>2]=a;d=x[k+28>>2]}}if(!Ba){x[k+172>>2]=x[c+20>>2];c=k+164|0;a=c;g=x[a>>2];f=!g}H:{if(!Ba){I:{if(f){break I}while(1){a=g;c=x[a+16>>2];if(c>>>0>d>>>0){c=a;g=x[a>>2];if(g){continue}break I}c=c>>>0>=d>>>0;if(c){break H}g=x[a+4>>2];if(g){continue}break}c=a+4|0}}if(!Ba|(s|0)==29){h=dr(24);m=29;if((Ba|0)==1){break b}g=h}if(!Ba){x[g+16>>2]=d;x[g+8>>2]=a;x[g>>2]=0;x[g+4>>2]=0;x[g+20>>2]=0;x[c>>2]=g;d=g;a=x[x[k+160>>2]>>2];if(a){x[k+160>>2]=a;d=x[c>>2]}ec(x[k+164>>2],d);d=k+168|0;a=x[d>>2]+1|0;x[d>>2]=a}}if(!Ba){x[k+176>>2]=x[g+20>>2];g=x[k+32>>2];d=i;a=x[k+152>>2];c=!a}J:{if(!Ba){K:{if(c){break K}while(1){d=a;h=x[a+16>>2];c=h>>>0>g>>>0;if(c){i=a;a=x[a>>2];if(a){continue}break K}if(g>>>0<=h>>>0){break J}a=x[d+4>>2];if(a){continue}break}i=d+4|0}}if(!Ba|(s|0)==30){h=dr(24);m=30;if((Ba|0)==1){break b}a=h}if(!Ba){x[a+16>>2]=g;x[a+8>>2]=d;x[a>>2]=0;x[a+4>>2]=0;x[a+20>>2]=0;x[i>>2]=a;d=a;g=x[x[k+148>>2]>>2];if(g){x[k+148>>2]=g;d=x[i>>2]}ec(x[k+152>>2],d);d=k+156|0;c=x[d>>2]+1|0;x[d>>2]=c}}if(!Ba){x[k+180>>2]=x[a+20>>2];a=!x[k+4>>2];if(a){break s}d=0}while(1){if(!Ba){w=ya-16|0;ya=w;a=x[k+28>>2];g=x[k+32>>2];a=a>>>0>g>>>0?a:g;e=x[k+24>>2];G=a>>>0>e>>>0?a:e;ea=G&2147483647;fa=ea+1|0;I=x[x[k+224>>2]+(d<<2)>>2];c=x[I>>2];f=x[c+16>>2]-1|0;t=G<<1;a=f>>>0>=t>>>0}L:{if((Ba|0)==2|a){if(!Ba){g=I+112|0;f=x[g>>2];a=!f}M:{if(!Ba){N:{if(a){break N}c=g;a=f;while(1){i=A[a+16>>2]>>0;c=i?c:a;z=a+4|0;i=x[(i?z:a)>>2];a=i;if(a){continue}break}a=(c|0)==(g|0);if(a){break N}a=A[c+16>>2]<=e>>>0;if(a){break M}}}if(!Ba|(s|0)==31){h=dr(4);m=31;if((Ba|0)==1){break b}f=h}if(!Ba|(s|0)==32){Lb(f,e);m=32;if((Ba|0)==1){break b}}if(!Ba){a=g;c=x[a>>2];z=!c;i=a}O:{if(!Ba){P:{if(z){break P}while(1){a=c;c=x[a+16>>2];i=c>>>0>e>>>0;if(i){i=a;c=x[a>>2];if(c){continue}break P}if(c>>>0>=e>>>0){c=a;break O}c=x[a+4>>2];if(c){continue}break}i=a+4|0}}if(!Ba|(s|0)==33){h=dr(24);m=33;if((Ba|0)==1){break b}c=h}if(!Ba){x[c+16>>2]=e;x[c+8>>2]=a;x[c>>2]=0;x[c+4>>2]=0;x[c+20>>2]=0;x[i>>2]=c;a=c;z=x[x[I+108>>2]>>2];if(z){x[I+108>>2]=z;a=x[i>>2]}ec(x[I+112>>2],a);a=I+116|0;i=x[a>>2]+1|0;x[a>>2]=i}}if(!Ba){x[c+20>>2]=f;a=g;c=x[a>>2];f=!c;i=a}Q:{if(!Ba){R:{if(f){break R}while(1){a=c;c=x[a+16>>2];i=c>>>0>e>>>0;if(i){i=a;c=x[a>>2];if(c){continue}break R}if(c>>>0>=e>>>0){c=a;break Q}c=x[a+4>>2];if(c){continue}break}i=a+4|0}}if(!Ba|(s|0)==34){h=dr(24);m=34;if((Ba|0)==1){break b}c=h}if(!Ba){x[c+16>>2]=e;x[c+8>>2]=a;x[c>>2]=0;x[c+4>>2]=0;x[c+20>>2]=0;x[i>>2]=c;a=c;f=x[x[I+108>>2]>>2];if(f){x[I+108>>2]=f;a=x[i>>2]}ec(x[I+112>>2],a);a=I+116|0;i=x[a>>2]+1|0;x[a>>2]=i}}if(!Ba){a=x[x[c+20>>2]>>2];c=x[x[a>>2]+20>>2]}if(!Ba|(s|0)==35){Ea[c|0](a);m=35;if((Ba|0)==1){break b}}f=Ba?f:x[g>>2]}if(!Ba){c=!f;a=g}S:{if(!Ba){T:{if(c){break T}while(1){a=f;c=x[a+16>>2];i=e>>>0>>0;if(i){g=a;f=x[a>>2];if(f){continue}break T}c=c>>>0>=e>>>0;if(c){c=a;break S}f=x[a+4>>2];if(f){continue}break}g=a+4|0}}if(!Ba|(s|0)==36){h=dr(24);m=36;if((Ba|0)==1){break b}c=h}if(!Ba){x[c+16>>2]=e;x[c+8>>2]=a;x[c>>2]=0;x[c+4>>2]=0;x[c+20>>2]=0;x[g>>2]=c;e=c;a=x[x[I+108>>2]>>2];if(a){x[I+108>>2]=a;e=x[g>>2]}ec(x[I+112>>2],e);e=I+116|0;a=x[e>>2]+1|0;x[e>>2]=a}}if(!Ba){x[I+104>>2]=x[c+20>>2];if((t|0)>0){nf(x[I+56>>2],0,G<<3);c=G<<4;nf(x[I+60>>2],0,c)}a=(ea|0)==2147483647;if(a){break L}e=fa<<3;nf(x[I+8>>2],0,e);nf(x[I+12>>2],0,e);nf(x[I+16>>2],0,e);nf(x[I+20>>2],0,e);a=nf(x[I+24>>2],0,e);break L}}if(!Ba|(s|0)==37){h=dr(24);m=37;if((Ba|0)==1){break b}i=h}if(!Ba){x[i>>2]=15464;a=t|1;g=Mb(a);v[i+20|0]=0;x[i+16>>2]=a;x[i+8>>2]=0;x[i+12>>2]=0;x[i+4>>2]=g;a=x[c+12>>2];g=x[c+8>>2];z=(a|0)!=(g|0)}if((Ba|0)==2|z){while(1){if(!Ba){da=a<<2;$=B[da+x[c+4>>2]>>2];B[w+12>>2]=$;z=w+12|0}if(!Ba|(s|0)==38){h=jc(i,z,1);m=38;if((Ba|0)==1){break b}z=h}if(!Ba){a=a+1|0;a=(a|0)!=x[c+16>>2]?a:0;z=(g|0)!=(a|0);if(z){continue}}break}}if(!Ba){c=f>>>1|0;a=x[I>>2]}if((Ba|0)==2|a){g=Ba?g:x[x[a>>2]+4>>2];if(!Ba|(s|0)==39){Ea[g|0](a);m=39;if((Ba|0)==1){break b}}}if(!Ba){a=c+1|0;x[I>>2]=i;c=x[I+8>>2];i=sb(fa);if(c){g=a>>>0>>0?a:fa;z=(g|0)>0;if(z){lf(i,c,g<<3)}zg(c)}if((ea|0)!=2147483647){nf(i,0,fa<<3)}x[I+8>>2]=i;c=x[I+12>>2];i=sb(fa);if(c){g=a>>>0>>0?a:fa;z=(g|0)>0;if(z){lf(i,c,g<<3)}zg(c)}if((ea|0)!=2147483647){nf(i,0,fa<<3)}x[I+12>>2]=i;c=x[I+16>>2];i=sb(fa);if(c){g=a>>>0>>0?a:fa;z=(g|0)>0;if(z){lf(i,c,g<<3)}zg(c)}if((ea|0)!=2147483647){nf(i,0,fa<<3)}x[I+16>>2]=i;c=x[I+20>>2];i=sb(fa);if(c){g=a>>>0>>0?a:fa;z=(g|0)>0;if(z){lf(i,c,g<<3)}zg(c)}if((ea|0)!=2147483647){nf(i,0,fa<<3)}x[I+20>>2]=i;c=x[I+24>>2];i=sb(fa);if(c){g=a>>>0>>0?a:fa;z=(g|0)>0;if(z){lf(i,c,g<<3)}zg(c)}if((ea|0)!=2147483647){nf(i,0,fa<<3)}x[I+24>>2]=i;c=x[I+64>>2];i=sb(fa);if(c){a=a>>>0>>0?a:fa;if((a|0)>0){lf(i,c,a<<3)}zg(c)}if((ea|0)!=2147483647){nf(i,0,fa<<3)}x[I+64>>2]=i;a=x[I+56>>2];c=Mb(t);U:{V:{if(!(!f|!a)){i=f>>>0>>0?f:t;if((i|0)<=0){break V}lf(c,a,i<<2);break V}if(!a){break U}}zg(a)}if((t|0)>0){nf(c,0,G<<3)}x[I+56>>2]=c;a=x[I+60>>2];c=sb(t);W:{X:{if(!(!f|!a)){i=f>>>0>>0?f:t;if((i|0)<=0){break X}lf(c,a,i<<3);break X}if(!a){break W}}zg(a)}if((t|0)>0){nf(c,0,G<<4)}x[I+60>>2]=c;a=x[I+40>>2];c=Mb(t);Y:{Z:{if(!(!f|!a)){i=f>>>0>>0?f:t;if((i|0)<=0){break Z}lf(c,a,i<<2);break Z}if(!a){break Y}}zg(a)}if((t|0)>0){nf(c,0,G<<3)}x[I+40>>2]=c;a=x[I+44>>2];c=Mb(t);_:{$:{if(!(!f|!a)){i=f>>>0>>0?f:t;if((i|0)<=0){break $}lf(c,a,i<<2);break $}if(!a){break _}}zg(a)}if((t|0)>0){nf(c,0,G<<3)}x[I+44>>2]=c;a=x[I+28>>2];i=Mb(t);aa:{ba:{if(!(!f|!a)){c=f>>>0>>0?f:t;if((c|0)<=0){break ba}lf(i,a,c<<2);break ba}if(!a){break aa}}zg(a)}c=t-f|0;if((c|0)>0){nf(i+(f<<2)|0,0,c<<2)}x[I+28>>2]=i;a=x[I+36>>2];i=Mb(t);ca:{da:{if(!(!f|!a)){t=f>>>0>>0?f:t;g=(t|0)<=0;if(g){break da}g=lf(i,a,t<<2);break da}g=!a;if(g){break ca}}zg(a)}if((c|0)>0){c=c<<2;nf((f<<2)+i|0,0,c)}x[I+48>>2]=0;x[I+36>>2]=i;t=I+112|0;f=x[t>>2];a=!f}ea:{if(!Ba){fa:{if(a){break fa}c=t;a=f;while(1){i=A[a+16>>2]>>0;c=i?c:a;g=a+4|0;i=x[(i?g:a)>>2];a=i;if(a){continue}break}a=(c|0)==(t|0);if(a){break fa}a=A[c+16>>2]<=e>>>0;if(a){break ea}}}if(!Ba|(s|0)==40){h=dr(4);m=40;if((Ba|0)==1){break b}f=h}if(!Ba|(s|0)==41){Lb(f,e);m=41;if((Ba|0)==1){break b}}if(!Ba){i=t;a=i;c=x[a>>2];g=!c}ga:{if(!Ba){ha:{if(g){break ha}while(1){a=c;c=x[a+16>>2];i=c>>>0>e>>>0;if(i){i=a;c=x[a>>2];if(c){continue}break ha}if(c>>>0>=e>>>0){c=a;break ga}c=x[a+4>>2];if(c){continue}break}i=a+4|0}}if(!Ba|(s|0)==42){h=dr(24);m=42;if((Ba|0)==1){break b}c=h}if(!Ba){x[c+16>>2]=e;x[c+8>>2]=a;x[c>>2]=0;x[c+4>>2]=0;x[c+20>>2]=0;x[i>>2]=c;a=c;g=x[I+108>>2];fa=x[g>>2];if(fa){x[I+108>>2]=fa;a=x[i>>2]}ec(x[I+112>>2],a);a=I+116|0;i=x[a>>2]+1|0;x[a>>2]=i}}if(!Ba){x[c+20>>2]=f;i=t;a=i;c=x[a>>2];g=!c}ia:{if(!Ba){ja:{if(g){break ja}while(1){a=c;c=x[a+16>>2];i=c>>>0>e>>>0;if(i){i=a;c=x[a>>2];if(c){continue}break ja}if(c>>>0>=e>>>0){c=a;break ia}c=x[a+4>>2];if(c){continue}break}i=a+4|0}}if(!Ba|(s|0)==43){h=dr(24);m=43;if((Ba|0)==1){break b}c=h}if(!Ba){x[c+16>>2]=e;x[c+8>>2]=a;x[c>>2]=0;x[c+4>>2]=0;x[c+20>>2]=0;x[i>>2]=c;a=c;g=x[I+108>>2];f=x[g>>2];if(f){x[I+108>>2]=f;a=x[i>>2]}ec(x[I+112>>2],a);a=I+116|0;i=x[a>>2]+1|0;x[a>>2]=i}}if(!Ba){a=x[x[c+20>>2]>>2];c=x[x[a>>2]+20>>2]}if(!Ba|(s|0)==44){Ea[c|0](a);m=44;if((Ba|0)==1){break b}}f=Ba?f:x[t>>2]}if(!Ba){c=!f;a=t}ka:{if(!Ba){la:{if(c){break la}while(1){a=f;c=x[a+16>>2];i=e>>>0>>0;if(i){t=a;f=x[a>>2];if(f){continue}break la}c=c>>>0>=e>>>0;if(c){c=a;break ka}f=x[a+4>>2];if(f){continue}break}t=a+4|0}}if(!Ba|(s|0)==45){h=dr(24);m=45;if((Ba|0)==1){break b}c=h}if(!Ba){x[c+16>>2]=e;x[c+8>>2]=a;x[c>>2]=0;x[c+4>>2]=0;x[c+20>>2]=0;x[t>>2]=c;e=c;a=x[x[I+108>>2]>>2];if(a){x[I+108>>2]=a;e=x[t>>2]}ec(x[I+112>>2],e);e=I+116|0;a=x[e>>2]+1|0;x[e>>2]=a}}if(!Ba){a=x[c+20>>2];x[I+104>>2]=a}}if(!Ba){ya=w+16|0;d=d+1|0;a=d>>>0>2];if(a){continue}}break}}a=Ba?a:x[k+40>>2]==(r|0);ma:{if(!Ba){if(a){break ma}a=!x[k+4>>2];if(a){q=1;break ma}d=0}while(1){if(!Ba){a=ya-16|0;ya=a;f=x[k+40>>2];c=x[x[k+224>>2]+(d<<2)>>2];i=x[c+4>>2];g=f>>>0>x[i+16>>2]-1>>>0}if((Ba|0)==2|g){if(!Ba|(s|0)==46){h=dr(24);m=46;if((Ba|0)==1){break b}t=h}if(!Ba){x[t>>2]=15464;f=f+1|0;g=Mb(f);v[t+20|0]=0;x[t+16>>2]=f;x[t+8>>2]=0;x[t+12>>2]=0;x[t+4>>2]=g;f=x[i+12>>2];g=x[i+8>>2];e=(f|0)!=(g|0)}if((Ba|0)==2|e){while(1){if(!Ba){r=f<<2;$=B[r+x[i+4>>2]>>2];B[a+12>>2]=$;e=a+12|0}if(!Ba|(s|0)==47){h=jc(t,e,1);m=47;if((Ba|0)==1){break b}e=h}if(!Ba){f=f+1|0;f=(f|0)!=x[i+16>>2]?f:0;e=(g|0)!=(f|0);if(e){continue}}break}}f=Ba?f:x[c+4>>2];if(f|(Ba|0)==2){i=Ba?i:x[x[f>>2]+4>>2];if(!Ba|(s|0)==48){Ea[i|0](f);m=48;if((Ba|0)==1){break b}}}if(!Ba){x[c+4>>2]=t}}if(!Ba){ya=a+16|0;q=1;d=d+1|0;a=d>>>0>2];if(a){continue}}break}}if(!Ba){u=C[k+16>>3];a=u==1}na:{if(!Ba){if(a){break na}a=x[k+4>>2];c=!a;if(c){break na}d=0}while(1){if(!Ba){g=d<<2;c=!x[x[g+x[k+224>>2]>>2]+120>>2]}if((Ba|0)==2|c){if(!Ba){a=x[k+136>>2];c=(a|0)>=0}if((Ba|0)==2|c){if(!Ba){x[ga+64>>2]=8409;a=x[k+80>>2];c=!a;if(c){break r}i=x[x[a>>2]+24>>2];c=ga- -64|0}if(!Ba|(s|0)==49){Ea[i|0](a,c);m=49;if((Ba|0)==1){break b}}a=Ba?a:x[k+136>>2]}c=Ba?c:x[k+32>>2];if(!Ba|(s|0)==50){h=dr(8);m=50;if((Ba|0)==1){break b}q=h}if(!Ba){f=ga+40|0;x[f>>2]=0;i=ga+56|0;x[i>>2]=c;x[ga+48>>2]=0;x[ga+52>>2]=1088784512;x[ga+16>>2]=0;x[ga+20>>2]=1088784512;c=x[f+4>>2];x[ga+8>>2]=x[f>>2];x[ga+12>>2]=c;c=a-1|0;a=(a|0)>0?c:0;x[ga+60>>2]=a;h=x[i+4>>2];x[ga+24>>2]=x[i>>2];x[ga+28>>2]=h;x[ga+32>>2]=1;x[ga+36>>2]=0;x[ga>>2]=1;x[ga+4>>2]=0}if(!Ba|(s|0)==51){Xb(q,ga,1);m=51;if((Ba|0)==1){break b}}if(!Ba){c=x[k+224>>2]+g|0;x[x[c>>2]+120>>2]=q;q=x[k+36>>2];u=C[k+8>>3]*+(q>>>0);L=C[k+16>>3];u=K((u+u)/L);$=E(u);a=Mf($);g=x[c>>2];f=x[g+128>>2];i=x[g+124>>2];c=q<<4;a=a>>>0>c>>>0?a:c;c=Mb(a);oa:{pa:{if(!(!i|!f)){f=a>>>0>f>>>0?f:a;if((f|0)<=0){break pa}lf(c,i,f<<2);break pa}if(!i){break oa}}zg(i)}i=(a|0)>0;if(i){i=nf(c,0,a<<2)}x[g+128>>2]=a;x[g+124>>2]=c;q=1;a=x[k+4>>2]}}if(!Ba){d=d+1|0;c=d>>>0>>0;if(c){continue}}break}}if(!Ba){d=x[k+24>>2];a=(H|0)!=(d|0)}qa:{ra:{sa:{if((Ba|0)==2|a){if(!Ba){a=x[k+344>>2];c=x[x[a>>2]+12>>2]}if(!Ba|(s|0)==52){Ea[c|0](a,d);m=52;if((Ba|0)==1){break b}}if(!Ba){d=x[k+348>>2];c=x[x[d>>2]+12>>2];a=x[k+24>>2]}if(!Ba|(s|0)==53){Ea[c|0](d,a);m=53;if((Ba|0)==1){break b}}if(!Ba){break sa}}if(!Ba){a=!(q&1);if(a){break ra}}}if(!Ba){a=x[k+136>>2]<=0;if(a){break qa}x[ga+64>>2]=9429;k=x[k+80>>2];a=!k;if(a){break r}c=x[x[k>>2]+24>>2];a=ga- -64|0}if(!Ba|(s|0)==54){Ea[c|0](k,a);m=54;if((Ba|0)==1){break b}}if(!Ba){break qa}}if(!Ba){a=x[k+136>>2]<=0;if(a){break qa}x[ga+64>>2]=9473;k=x[k+80>>2];a=!k;if(a){break r}c=x[x[k>>2]+24>>2];a=ga- -64|0}if(!Ba|(s|0)==55){Ea[c|0](k,a);m=55;if((Ba|0)==1){break b}}}if(!Ba){a=ga+80|0;ya=a;break q}}if(!Ba){break a}}if(!Ba){break o}}if(!Ba){a=x[c+4>>2];c=v[a+12|0]&1}ta:{if(!Ba){if(c){break ta}c=x[a+704>>2]-1>>>0>1;if(c){break ta}c=x[a+112>>2]<0;if(c){break o}x[b+12>>2]=8316;a=x[a+56>>2];c=!a;if(c){break n}d=x[x[a>>2]+24>>2];c=b+12|0}if(!Ba|(s|0)==56){Ea[d|0](a,c);m=56;if((Ba|0)==1){break b}}if(!Ba){break o}}if(!Ba){u=C[a+120>>3];c=L==u;if(c){break o}C[a+120>>3]=L}if(!Ba|(s|0)==57){Cc(a);m=57;if((Ba|0)==1){break b}}}if(!Ba){a=b+16|0;ya=a;break m}}if(!Ba){break a}}a=Ba?a:x[12113];if(a|(Ba|0)==2){da=Ba?da:0;while(1){if(!Ba){x[M+56>>2]=0;x[M+48>>2]=0;x[M+52>>2]=0;c=x[12124];a=(c|0)!=x[12125]}ua:{if((Ba|0)==2|a){if(!Ba){x[c+8>>2]=0;x[c>>2]=0;x[c+4>>2]=0;a=x[M+48>>2];b=x[M+52>>2];d=(a|0)!=(b|0)}if((Ba|0)==2|d){if(!Ba){d=b-a|0;k=d>>2;b=k>>>0>=1073741824;if(b){break d}}if(!Ba|(s|0)==58){h=dr(d);m=58;if((Ba|0)==1){break b}b=h}if(!Ba){x[c+4>>2]=b;x[c>>2]=b;i=k<<2;k=i+b|0;x[c+8>>2]=k;a=lf(b,a,d);x[c+4>>2]=k}}if(!Ba){b=c+12|0;x[12124]=b;break ua}}a=Ba?a:M+48|0;if(!Ba|(s|0)==59){Wa(48492,a);m=59;if((Ba|0)==1){break b}}b=Ba?b:x[12124]}if(!Ba){a=x[12123];d=x[(D((b-a|0)/12|0,12)+a|0)-12>>2];b=x[12128];c=x[12127];a=b>>>0>c>>>0}va:{if(!Ba){if(a){x[c>>2]=d;a=c+4|0;x[12127]=a;break va}a=x[12126];e=c-a>>2;k=e+1|0;if(k>>>0>=1073741824){break c}b=b-a|0;t=b>>1;i=k>>>0>>0?t:k;b=b>>>0>=2147483644;k=b?1073741823:i}Aa=Ba?Aa:k;if(Aa|(Ba|0)==2){if(!Ba){if(k>>>0>=1073741824){break e}b=k<<2}if(!Ba|(s|0)==60){h=dr(b);m=60;if((Ba|0)==1){break b}}else{h=t}}else{h=t}t=!Ba&(!Aa|(Ba|0)==2)?0:h;if(!Ba){b=(e<<2)+t|0;x[b>>2]=d;d=(k<<2)+t|0;k=b+4|0;i=(a|0)!=(c|0);if(i){while(1){b=b-4|0;c=c-4|0;x[b>>2]=x[c>>2];i=(a|0)!=(c|0);if(i){continue}break}c=x[12126]}x[12128]=d;x[12127]=k;x[12126]=b;a=!c;if(a){break va}zg(c)}}if(!Ba){c=x[M+48>>2];if(c){x[M+52>>2]=c;zg(c)}da=da+1|0;a=da>>>0>>0>a>>>0}if((Ba|0)==2|b){if(!Ba){a=k-a|0;t=a;b=x[12122]}if(!Ba|(s|0)==62){h=Pc(b);m=62;if((Ba|0)==1){break b}b=h}b=Ba?b:a>>>0>b>>>0;if(b|(Ba|0)==2){b=Ba?b:x[12122];if(!Ba|(s|0)==63){h=Pc(b);m=63;if((Ba|0)==1){break b}t=h}}if(!Ba){d=x[12118];k=x[12122];b=k}if(!Ba|(s|0)==64){h=Pc(b);m=64;if((Ba|0)==1){break b}i=h}if(!Ba){k=x[b>>2];b=x[k>>2];a=a>>>0<=i>>>0}xa:{if((Ba|0)==2|b){if(!Ba){i=d;k=a;f=0;na=ya-32|0;ya=na;a=x[b+144>>2]}ya:{za:{Aa:{Ba:{Ca:{if(!Ba){Da:{switch(a|0){case 0:break Ba;case 1:break Ca;case 3:break Da;default:break Aa}}a=x[b+136>>2]<0;if(a){break ya}x[na+16>>2]=5933;w=x[b+80>>2];a=!w;if(a){break za}b=x[x[w>>2]+24>>2];a=na+16|0}if(!Ba|(s|0)==65){Ea[b|0](w,a);m=65;if((Ba|0)==1){break b}}if(!Ba){break ya}}if(!Ba|(s|0)==66){sc(b);m=66;if((Ba|0)==1){break b}}if(!Ba){a=y[b+52|0];if(a){break Ba}a=x[b+136>>2]>0}if((Ba|0)==2|a){if(!Ba){a=x[b+28>>2];x[na+28>>2]=6243;u=+(a>>>1>>>0);C[na+16>>3]=u;w=x[b+104>>2];a=!w;if(a){break za}d=na+16|0;g=x[x[w>>2]+24>>2];a=na+28|0}if(!Ba|(s|0)==67){Ea[g|0](w,a,d);m=67;if((Ba|0)==1){break b}}}if(!Ba){a=!x[b+4>>2];if(a){break Ba}}while(1){if(!Ba){H=f<<2;d=x[H+x[b+224>>2]>>2];a=x[d>>2];x[a+8>>2]=x[a+12>>2];w=x[d+4>>2];a=x[w+12>>2];x[w+8>>2]=a;w=x[d+120>>2]}if((Ba|0)==2|w){if(!Ba){w=x[w>>2];a=x[x[w>>2]+24>>2]}if(!Ba|(s|0)==68){Ea[a|0](w);m=68;if((Ba|0)==1){break b}}}if(!Ba){sa=x[x[d>>2]+16>>2];a=sa-1|0;g=!a;Ea:{if(g){ba=x[d+36>>2];break Ea}r=a&3;ba=x[d+36>>2];g=x[d+28>>2];ra=0;w=0;e=sa-2>>>0>=3;if(e){z=a&-4;sa=0;while(1){a=w<<2;x[a+g>>2]=0;x[a+ba>>2]=0;e=a|4;x[e+g>>2]=0;x[e+ba>>2]=0;e=a|8;q=e+g|0;x[q>>2]=0;x[e+ba>>2]=0;a=a|12;e=a+g|0;x[e>>2]=0;x[a+ba>>2]=0;w=w+4|0;sa=sa+4|0;if((sa|0)!=(z|0)){continue}break}}if(!r){break Ea}while(1){a=w<<2;e=a+g|0;x[e>>2]=0;x[a+ba>>2]=0;w=w+1|0;ra=ra+1|0;if((ra|0)!=(r|0)){continue}break}}x[ba>>2]=1065353216;x[d+96>>2]=0;x[d+88>>2]=-1;x[d+92>>2]=-1;x[d+80>>2]=0;x[d+72>>2]=0;x[d+76>>2]=0;x[d+32>>2]=0;v[d+100|0]=0;v[d+101|0]=0;v[d+68|0]=1;x[d+48>>2]=0;d=x[b+28>>2]>>>1|0;a=x[x[x[b+224>>2]+H>>2]>>2]}if(!Ba|(s|0)==69){pc(a,d);m=69;if((Ba|0)==1){break b}}if(!Ba){f=f+1|0;a=f>>>0>2];if(a){continue}}break}}if(!Ba){x[b+144>>2]=2}}if(!Ba){w=x[b+4>>2];ba=w<<2;a=ba+15&-16;sa=na-a|0;ya=sa;if(w){a=nf(sa,0,ba)}}while(1){if(!Ba){g=1;w=0;a=x[b+4>>2]}if((Ba|0)==2|a){while(1){if(!Ba){r=i;a=w<<2;ra=a;q=sa+a|0;ba=x[q>>2];f=t-ba|0;d=0;oa=ya-32|0;ya=oa;z=b;H=w;ia=x[a+x[b+224>>2]>>2];I=x[ia>>2];h=x[I+12>>2]+(x[I+8>>2]^-1)|0;a=x[I+16>>2];e=h+a|0;ka=(a|0)>(e|0);a=x[b+56>>2];G=!y[b+52|0];Fa:{if(G){break Fa}G=a&33554432;if(G){u=C[b+16>>3];d=u<1;break Fa}G=a&67108864;if(G){break Fa}u=C[z+16>>3];d=u>1}qa=ka?e:h;a=a>>>28&A[z+4>>2]>1;e=H>>>0<2;ma=a&e}Ga:{Ha:{Ia:{if((Ba|0)==2|d){if(!Ba){u=C[z+16>>3];L=K(+(f>>>0)/u);va=F(L);Ja:{if(va<2147483648){a=~~L;break Ja}a=-2147483648}a=a>>>0>qa>>>0}Ka:{La:{Ma:{if(!Ba){if(a){L=J(u*+(qa>>>0));va=F(L);Na:{if(va<2147483648){f=~~L;break Na}f=-2147483648}a=!f;if(a){break Ma}}d=x[ia+128>>2];if(ma){a=x[x[ia>>2]+16>>2]-1|0;f=a>>>0>>0?a:f}u=K(+(f>>>0)/u);L=F(u);Oa:{if(L<2147483648){a=~~u;break Oa}a=-2147483648}e=d>>>0>=a>>>0}Pa:{if(!Ba){if(e){a=d;break Pa}e=x[z+136>>2]>=0}if((Ba|0)==2|e){if(!Ba){x[oa+28>>2]=4239;C[oa+16>>3]=d>>>0;u=+(a>>>0);C[oa+8>>3]=u;d=x[z+128>>2];e=!d;if(e){break Ha}G=oa+16|0;ea=oa+8|0;fa=x[x[d>>2]+24>>2];e=oa+28|0}if(!Ba|(s|0)==70){Ea[fa|0](d,e,G,ea);m=70;if((Ba|0)==1){break b}}d=Ba?d:x[ia+128>>2]}if(!Ba){e=x[ia+124>>2];ka=Mb(a);Qa:{Ra:{Sa:{G=!e;if(G){break Sa}G=!d;if(G){break Sa}d=a>>>0>d>>>0?d:a;G=(d|0)<=0;if(G){break Ra}lf(ka,e,d<<2);break Ra}if(!e){break Qa}}zg(e)}d=(a|0)>0;if(d){d=nf(ka,0,a<<2)}x[ia+128>>2]=a;x[ia+124>>2]=ka}}if(!Ba){d=!ma;if(d){break La}d=x[ia+40>>2];e=!f;if(e){break Ka}ma=x[r+4>>2];r=x[r>>2];a=0;if((f|0)!=1){fa=f&-2;e=0;while(1){h=a+ba<<2;$=B[h+ma>>2];B[d+(a<<2)>>2]=E(B[h+r>>2]+(H?E(-$):$))*E(.5);h=a|1;ka=h+ba<<2;ea=ma+ka|0;$=B[ea>>2];$=E(E(B[r+ka>>2]+(H?E(-$):$))*E(.5));B[d+(h<<2)>>2]=$;a=a+2|0;e=e+2|0;G=(fa|0)!=(e|0);if(G){continue}break}}e=f&1;if(e){h=d+(a<<2)|0;a=a+ba<<2;e=a+r|0;$=B[a+ma>>2];$=E(E(B[e>>2]+(H?E(-$):$))*E(.5));B[h>>2]=$}a=x[ia+128>>2];d=x[ia+40>>2];break Ka}}if(!Ba){e=0;break Ia}}if(!Ba){e=ba<<2;d=e+x[(H<<2)+r>>2]|0}}if(!Ba){x[oa+16>>2]=d;e=0;r=oa+16|0;u=1/C[z+16>>3];H=x[x[ia+120>>2]>>2];z=x[x[H>>2]+8>>2];d=ia+124|0}if(!Ba|(s|0)==71){h=Ea[z|0](H,d,a,r,f,u,k)|0;m=71;if((Ba|0)==1){break b}a=h}if(!Ba){d=a>>>0>qa>>>0;if(d){break Ia}d=x[ia+124>>2]}if(!Ba|(s|0)==72){h=jc(I,d,a);m=72;if((Ba|0)==1){break b}a=h}if(!Ba){a=x[ia+80>>2]+f|0;x[ia+80>>2]=a;e=f;break Ia}}if(!Ba){e=f>>>0>qa>>>0?qa:f;Ta:{if(ma){z=x[ia+40>>2];a=!e;if(a){break Ta}qa=e&1;f=x[r+4>>2];d=x[r>>2];a=0;r=(e|0)!=1;if(r){ka=e&-2;ma=0;while(1){r=a+ba<<2;$=B[r+f>>2];B[z+(a<<2)>>2]=E(B[d+r>>2]+(H?E(-$):$))*E(.5);r=a|1;G=z+(r<<2)|0;r=r+ba<<2;ea=r+d|0;$=B[f+r>>2];$=E(E(B[ea>>2]+(H?E(-$):$))*E(.5));B[G>>2]=$;a=a+2|0;ma=ma+2|0;r=(ma|0)!=(ka|0);if(r){continue}break}}if(qa){r=z+(a<<2)|0;a=a+ba<<2;d=a+d|0;a=a+f|0;$=B[a>>2];$=E(E(B[d>>2]+(H?E(-$):$))*E(.5));B[r>>2]=$}z=x[ia+40>>2];break Ta}a=x[(H<<2)+r>>2];d=ba<<2;z=a+d|0}}if(!Ba|(s|0)==73){h=jc(I,z,e);m=73;if((Ba|0)==1){break b}a=h}if(!Ba){a=x[ia+80>>2]+e|0;x[ia+80>>2]=a}}if(!Ba){a=oa+32|0;ya=a;break Ga}}if(!Ba){break a}}if(!Ba){ba=e+ba|0;x[q>>2]=ba;a=t>>>0<=ba>>>0?g:0;if(!(!k|t>>>0>ba>>>0)){ba=x[x[b+224>>2]+ra>>2];a=x[ba+80>>2];x[ba+88>>2]=a;x[ba+92>>2]=0;a=g}d=!y[b+52|0]}if((Ba|0)==2|d){if(!Ba){v[na+28|0]=0;g=na+28|0;d=na+16|0}if(!Ba|(s|0)==74){vc(b,w,d,g);m=74;if((Ba|0)==1){break b}}}if(!Ba){g=a;w=w+1|0;a=w>>>0>2];if(a){continue}}break}}a=Ba?a:y[b+52|0];if(a|(Ba|0)==2){Ua:{if(!Ba){w=ya-16|0;ya=w;a=b;f=x[a+4>>2];d=0}Va:{Wa:{Xa:{if((Ba|0)==2|f){while(1){if(!Ba|(s|0)==75){h=wc(a,d);m=75;if((Ba|0)==1){break b}f=h}f=Ba?f:!f;if(f|(Ba|0)==2){if(!Ba){d=x[a+136>>2]<2;if(d){break Xa}x[w+12>>2]=1452;a=x[a+80>>2];d=!a;if(d){break Wa}f=x[x[a>>2]+24>>2];d=w+12|0}if(!Ba|(s|0)==76){Ea[f|0](a,d);m=76;if((Ba|0)==1){break b}}if(!Ba){break Xa}}if(!Ba){e=d<<2;ba=x[e+x[a+224>>2]>>2];f=!(v[ba+100|0]&1)}if((Ba|0)==2|f){if(!Ba){q=x[ba>>2];f=x[q+8>>2];e=x[q+12>>2];Ya:{if((f|0)>(e|0)){h=f-e|0;break Ya}H=(f|0)>=(e|0);h=0;if(H){break Ya}h=x[q+16>>2]+(f-e|0)|0}q=h;f=q;e=x[a+28>>2];r=f>>>0>>0;if(r){e=x[ba+92>>2]<0;if(e){break Va}e=x[a+28>>2]}r=x[ba>>2];q=x[ba+56>>2];H=f>>>0>e>>>0;f=H?e:f}if(!Ba|(s|0)==77){tc(r,q,f);m=77;if((Ba|0)==1){break b}}if(!Ba){e=x[a+36>>2];f=x[ba>>2]}if(!Ba|(s|0)==78){uc(f,e);m=78;if((Ba|0)==1){break b}}if(!Ba|(s|0)==79){yc(a,d);m=79;if((Ba|0)==1){break b}}}if(!Ba){d=d+1|0;f=d>>>0>2];if(f){continue}}break}}if(!Ba){v[w+10|0]=0;f=w+10|0;d=w+4|0}if(!Ba|(s|0)==80){h=xc(a,0,d,w,f);m=80;if((Ba|0)==1){break b}d=h}d=Ba?d:!d;if(d|(Ba|0)==2){Za:{if(!Ba){ra=0;d=ya-32|0;ya=d;ga=w+4|0;f=x[a+36>>2];x[ga>>2]=f;x[w>>2]=f;fa=w+10|0;v[fa|0]=0;ia=x[a+4>>2];e=!ia;f=d}_a:{$a:{if(!Ba){if(e){break $a}oa=x[a+224>>2];ma=x[oa>>2];r=(ia|0)!=1;e=1}ab:{bb:{if((Ba|0)==2|r){r=Ba?r:x[ma+76>>2];cb:{if(!Ba){while(1){q=x[x[(e<<2)+oa>>2]+76>>2]==(r|0);if(q){e=e+1|0;q=(ia|0)!=(e|0);if(q){continue}break cb}break}d=x[a+136>>2]<0;if(d){break $a}x[f+16>>2]=9580;e=x[a+80>>2];d=!e;if(d){break _a}r=x[x[e>>2]+24>>2];d=f+16|0}if(!Ba|(s|0)==81){Ea[r|0](e,d);m=81;if((Ba|0)==1){break b}}if(!Ba){break $a}}if(!Ba){e=(ia|0)!=1;if(e){break bb}}}if(!Ba){r=x[a+36>>2];e=x[a+344>>2];q=x[x[e>>2]+20>>2];d=x[ma+8>>2]}if(!Ba|(s|0)==82){pa=+Ea[q|0](e,d,r);m=82;if((Ba|0)==1){break b}u=pa}if(!Ba){$=E(u);B[f+8>>2]=$;r=x[a+36>>2];e=x[a+348>>2];q=x[x[e>>2]+20>>2];d=x[ma+8>>2]}if(!Ba|(s|0)==83){pa=+Ea[q|0](e,d,r);m=83;if((Ba|0)==1){break b}L=pa}if(!Ba){break ab}}if(!Ba){q=x[a+24>>2];e=q>>>1|0;r=e<<3;d=d-(r+23&-16)|0;ya=d;if((e|0)!=2147483647){nf(d,0,r+8|0)}H=e+1|0;h=H&-4;qa=H&3;G=(e|0)==2147483647;ea=q>>>0<6;while(1){db:{if(G){break db}q=x[x[(ra<<2)+oa>>2]+8>>2];I=0;e=0;ba=0;if(!ea){while(1){r=e<<3;z=r+d|0;C[z>>3]=C[q+r>>3]+C[z>>3];z=r|8;H=z+d|0;C[H>>3]=C[q+z>>3]+C[H>>3];z=r|16;ka=z+d|0;C[ka>>3]=C[q+z>>3]+C[ka>>3];r=r|24;z=r+d|0;L=C[z>>3];u=C[q+r>>3]+L;C[z>>3]=u;e=e+4|0;ba=ba+4|0;if((h|0)!=(ba|0)){continue}break}}H=!qa;if(H){break db}while(1){r=e<<3;ba=r+d|0;L=C[ba>>3];u=C[q+r>>3]+L;C[ba>>3]=u;e=e+1|0;I=I+1|0;H=(qa|0)!=(I|0);if(H){continue}break}}ra=ra+1|0;if((ra|0)!=(ia|0)){continue}break}r=x[a+36>>2];e=x[a+344>>2];q=x[x[e>>2]+20>>2]}if(!Ba|(s|0)==84){pa=+Ea[q|0](e,d,r);m=84;if((Ba|0)==1){break b}u=pa}if(!Ba){$=E(u);B[f+8>>2]=$;r=x[a+36>>2];e=x[a+348>>2];q=x[x[e>>2]+20>>2]}if(!Ba|(s|0)==85){pa=+Ea[q|0](e,d,r);m=85;if((Ba|0)==1){break b}L=pa}}if(!Ba){u=1/C[a+16>>3];e=x[ma+120>>2]}if((Ba|0)==2|e){if(!Ba){e=x[e>>2];d=x[x[e>>2]+20>>2]}if(!Ba|(s|0)==86){pa=+Ea[d|0](e,u);m=86;if((Ba|0)==1){break b}u=pa}}if(!Ba){va=C[a+8>>3];e=x[a+36>>2];r=x[a+28>>2];q=x[a+32>>2];d=x[a+352>>2]}if(!Ba|(s|0)==87){h=ic(d,va,u,$,e,r,q,0);m=87;if((Ba|0)==1){break b}d=h}if(!Ba){x[f+4>>2]=d;e=x[a+284>>2]+(x[a+280>>2]^-1)|0;d=x[a+288>>2];r=e+d|0;h=r;r=(d|0)>(r|0);d=((r?h:e)|0)>0}if((Ba|0)==2|d){if(!Ba){e=f+8|0;d=a+272|0}if(!Ba|(s|0)==88){h=jc(d,e,1);m=88;if((Ba|0)==1){break b}d=h}}if(!Ba){e=x[a+260>>2]+(x[a+256>>2]^-1)|0;d=x[a+264>>2];r=e+d|0;h=r;r=(d|0)>(r|0);d=((r?h:e)|0)>0}if((Ba|0)==2|d){if(!Ba){ba=f+4|0;ia=ya-16|0;ya=ia;H=a+248|0;z=x[H+8>>2];d=x[H+12>>2]+(z^-1)|0;e=x[H+16>>2];ka=d+e|0;e=(ka|0)<(e|0);r=e?ka:d;d=(r|0)>0}eb:{if(!Ba){if(d){r=1;break eb}d=ia+12|0}if(!Ba|(s|0)==89){h=Ib(51780,12058,28);m=89;if((Ba|0)==1){break b}e=h}if(!Ba|(s|0)==90){h=Nh(e,1);m=90;if((Ba|0)==1){break b}e=h}if(!Ba|(s|0)==91){h=Ib(e,11118,26);m=91;if((Ba|0)==1){break b}e=h}if(!Ba|(s|0)==92){h=Nh(e,r);m=92;if((Ba|0)==1){break b}e=h}if(!Ba){q=x[x[e>>2]-12>>2]+e|0;vj(d,q);d=ia+12|0}if(!Ba|(s|0)==93){h=il(d,52748);m=93;if((Ba|0)==1){break b}d=h}q=Ba?q:x[x[d>>2]+28>>2];if(!Ba|(s|0)==94){h=Ea[q|0](d,10)|0;m=94;if((Ba|0)==1){break b}d=h}q=Ba?q:ia+12|0;if(!Ba|(s|0)==95){Po(q);m=95;if((Ba|0)==1){break b}}if(!Ba|(s|0)==96){Th(e,d);m=96;if((Ba|0)==1){break b}}if(!Ba|(s|0)==97){rh(e);m=97;if((Ba|0)==1){break b}}}if(!Ba){if(r){ka=x[H+4>>2];e=ka+(z<<2)|0;d=x[H+16>>2]-z|0;q=(d|0)>=(r|0);fb:{if(q){if((r|0)<=0){break fb}lf(e,ba,r<<2);break fb}if((d|0)>0){lf(e,ba,d<<2)}e=r-d|0;q=(e|0)<=0;if(q){break fb}lf(ka,(d<<2)+ba|0,e<<2)}e=r+z|0;z=x[H+16>>2];while(1){d=e;e=d-z|0;r=(d|0)>=(z|0);if(r){continue}break}x[H+8>>2]=d}d=ia+16|0;ya=d}}if(!Ba){e=x[f+4>>2];if((e|0)<0){v[fa|0]=1;e=0-e|0;x[f+4>>2]=e}x[w>>2]=e;d=x[ma+72>>2];x[ga>>2]=d?d:e;x[ma+72>>2]=x[w>>2];e=L>0?x[a+220>>2]+1|0:0;x[a+220>>2]=e;r=x[a+36>>2];d=(A[a+28>>2]/(r>>>0)|0)>(e|0);if(d){break $a}d=y[fa|0];if(d){break $a}v[fa|0]=1;d=x[a+136>>2]<2;if(d){break $a}x[f+28>>2]=1079;u=+(e|0);C[f+16>>3]=u;e=x[a+104>>2];d=!e;if(d){break _a}r=f+16|0;q=x[x[e>>2]+24>>2];d=f+28|0}if(!Ba|(s|0)==98){Ea[q|0](e,d,r);m=98;if((Ba|0)==1){break b}}}if(!Ba){d=f+32|0;ya=d;break Za}}if(!Ba){break a}}}if(!Ba){d=!x[a+4>>2];if(d){break Xa}e=x[w>>2];f=x[w+4>>2];r=y[w+10|0]!=0;d=0}while(1){if(!Ba|(s|0)==99){h=zc(a,d,f,e,r);m=99;if((Ba|0)==1){break b}q=h}if(!Ba){H=d<<2;ba=x[H+x[a+224>>2]>>2];x[ba+76>>2]=x[ba+76>>2]+1;d=d+1|0;q=d>>>0>2];if(q){continue}}break}}if(!Ba){a=w+16|0;ya=a;break Ua}}if(!Ba){break a}}if(!Ba){ca(10435,3563,340,6142);p()}}}a=Ba?a:x[b+136>>2]>=2;if(a|(Ba|0)==2){if(!Ba){x[na+16>>2]=6451;w=x[b+80>>2];a=!w;if(a){break za}d=x[x[w>>2]+24>>2];a=na+16|0}if(!Ba|(s|0)==100){Ea[d|0](w,a);m=100;if((Ba|0)==1){break b}}}if(!Ba){a=!(g&1);if(a){continue}}break}a=Ba?a:x[b+136>>2]>=2;if(a|(Ba|0)==2){if(!Ba){x[na+16>>2]=6467;w=x[b+80>>2];a=!w;if(a){break za}d=x[x[w>>2]+24>>2];a=na+16|0}if(!Ba|(s|0)==101){Ea[d|0](w,a);m=101;if((Ba|0)==1){break b}}}if(!Ba){a=!k;if(a){break ya}x[b+144>>2]=3;break ya}}if(!Ba){break a}}if(!Ba){a=na+32|0;ya=a;break xa}}if(!Ba){i=d;d=a;z=0;ea=ya-32|0;ya=ea;q=x[k+4>>2];b=x[q+704>>2];a=(b|0)==3}gb:{hb:{ib:{jb:{if((Ba|0)==2|a){if(!Ba){a=x[q+112>>2]<0;if(a){break jb}x[ea+24>>2]=5872;b=x[q+56>>2];a=!b;if(a){break hb}d=x[x[b>>2]+24>>2];a=ea+24|0}if(!Ba|(s|0)==102){Ea[d|0](b,a);m=102;if((Ba|0)==1){break b}}if(!Ba){break jb}}if(!Ba){k=1;a=v[q+12|0]&1}kb:{if(!(a?Ba:1)){break kb}lb:{mb:{if(!Ba){nb:{switch(b|0){case 0:break mb;case 1:break nb;default:break lb}}L=C[q+120>>3];u=ag(+A[q+668>>2]*L);ob:{if(u<4294967296&u>=0){b=~~u>>>0;break ob}b=0}x[q+676>>2]=b;a=x[q+112>>2]<=0;if(a){break lb}a=x[q+668>>2];x[ea+20>>2]=4862;C[ea+24>>3]=a>>>0;u=+(b>>>0);C[ea+8>>3]=u;b=x[q+104>>2];a=!b;if(a){break hb}g=ea+24|0;f=ea+8|0;e=x[x[b>>2]+24>>2];a=ea+20|0}if(!Ba|(s|0)==103){Ea[e|0](b,a,g,f);m=103;if((Ba|0)==1){break b}}if(!Ba){break lb}}if(!Ba){b=x[q+672>>2];a=!b;if(a){break lb}L=C[q+120>>3];u=ag(+(b>>>0)*L);pb:{if(u<4294967296&u>=0){b=~~u>>>0;break pb}b=0}x[q+676>>2]=b;a=x[q+112>>2]<=0;if(a){break lb}a=x[q+672>>2];x[ea+20>>2]=4897;C[ea+24>>3]=a>>>0;u=+(b>>>0);C[ea+8>>3]=u;b=x[q+104>>2];a=!b;if(a){break hb}g=ea+24|0;f=ea+8|0;e=x[x[b>>2]+24>>2];a=ea+20|0}if(!Ba|(s|0)==104){Ea[e|0](b,a,g,f);m=104;if((Ba|0)==1){break b}}}a=Ba?a:x[q+700>>2];if(a|(Ba|0)==2){qb:{if(!Ba){G=ya-32|0;ya=G;a=!x[q+700>>2]}rb:{sb:{if(!Ba){if(a){break sb}H=x[q+680>>2];a=!H}if((Ba|0)==2|a){if(!Ba){b=x[q+692>>2];L=+A[b+16>>2];u=+A[b+20>>2]/L;C[q+120>>3]=u;a=x[q+112>>2]>0}if((Ba|0)==2|a){if(!Ba){g=x[b+20>>2];a=x[b+16>>2];x[G+20>>2]=11003;C[G+24>>3]=a>>>0;u=+(g>>>0);C[G+8>>3]=u;b=x[q+104>>2];a=!b;if(a){break rb}g=G+24|0;f=G+8|0;e=x[x[b>>2]+24>>2];a=G+20|0}if(!Ba|(s|0)==105){Ea[e|0](b,a,g,f);m=105;if((Ba|0)==1){break b}}}a=Ba?a:x[q+112>>2]>0;if(a|(Ba|0)==2){if(!Ba){a=x[q+124>>2];b=x[q+120>>2];x[G+8>>2]=11186;x[G+24>>2]=b;x[G+28>>2]=a;b=x[q+80>>2];a=!b;if(a){break rb}g=G+24|0;f=x[x[b>>2]+24>>2];a=G+8|0}if(!Ba|(s|0)==106){Ea[f|0](b,a,g);m=106;if((Ba|0)==1){break b}}}if(!Ba|(s|0)==107){Cc(q);m=107;if((Ba|0)==1){break b}}if(!Ba){x[q+684>>2]=0;break sb}}if(!Ba){a=q+696|0;f=x[a>>2];b=!f;if(b){break sb}r=x[q+684>>2];g=a;b=f;while(1){w=A[b+16>>2]>r>>>0;g=w?b:g;e=b+4|0;w=x[(w?b:e)>>2];b=w;if(b){continue}break}b=(a|0)==(g|0);if(b){break sb}b=x[g+16>>2];e=H>>>0>>0;if(e){break sb}e=x[q+112>>2]>0}if((Ba|0)==2|e){if(!Ba){x[G+20>>2]=7578;C[G+24>>3]=H>>>0;u=+(b>>>0);C[G+8>>3]=u;b=x[q+104>>2];f=!b;if(f){break rb}e=G+24|0;r=G+8|0;w=x[x[b>>2]+24>>2];f=G+20|0}if(!Ba|(s|0)==108){Ea[w|0](b,f,e,r);m=108;if((Ba|0)==1){break b}}f=Ba?f:x[a>>2]}if(!Ba){tb:{ub:{if(!f){break ub}r=x[q+680>>2];b=a;while(1){w=A[f+16>>2]>r>>>0;b=w?f:b;e=f+4|0;f=x[(w?f:e)>>2];if(f){continue}break}if((a|0)==(b|0)){break ub}w=b+20|0;a=b+16|0;break tb}w=q+676|0;a=q+668|0}w=x[w>>2];b=x[a>>2];a=x[q+112>>2]<=0}vb:{if(!Ba){if(a){L=+(w>>>0);u=+(b>>>0);break vb}a=x[q+688>>2];r=x[q+680>>2];x[G+20>>2]=1334;C[G+24>>3]=r>>>0;u=+(a>>>0);C[G+8>>3]=u;f=x[q+104>>2];a=!f;if(a){break rb}e=G+24|0;r=G+8|0;H=x[x[f>>2]+24>>2];a=G+20|0}if(!Ba|(s|0)==109){Ea[H|0](f,a,e,r);m=109;if((Ba|0)==1){break b}}if(!Ba){L=+(w>>>0);u=+(b>>>0);a=x[q+112>>2]<=0;if(a){break vb}x[G+20>>2]=1367;C[G+24>>3]=u;C[G+8>>3]=L;f=x[q+104>>2];a=!f;if(a){break rb}e=G+24|0;r=G+8|0;H=x[x[f>>2]+24>>2];a=G+20|0}if(!Ba|(s|0)==110){Ea[H|0](f,a,e,r);m=110;if((Ba|0)==1){break b}}}if(!Ba){f=x[g+16>>2];a=f>>>0>>0}wb:{xb:{if((Ba|0)==2|a){if(!Ba){b=b-f|0;f=x[g+20>>2];a=w>>>0>f>>>0}yb:{if(!Ba){if(a){a=w-f|0;u=+(a>>>0);break yb}u=+(f>>>0);f=ya-32|0;ya=f;a=q+40|0;e=x[a+72>>2]>0}zb:{Ab:{if((Ba|0)==2|e){if(!Ba){x[f+28>>2]=10665;C[f+16>>3]=u;C[f+8>>3]=L;a=x[a- -64>>2];e=!a;if(e){break Ab}r=f+16|0;w=f+8|0;H=x[x[a>>2]+24>>2];e=f+28|0}if(!Ba|(s|0)==111){Ea[H|0](a,e,r,w);m=111;if((Ba|0)==1){break b}}}if(!Ba){a=f+32|0;ya=a;break zb}}if(!Ba){break a}}u=Ba?u:1}if(!Ba){L=+(b>>>0);a=x[q+112>>2]>0}if((Ba|0)==2|a){if(!Ba){x[G+20>>2]=1359;C[G+24>>3]=L;C[G+8>>3]=u;b=x[q+104>>2];a=!b;if(a){break rb}f=G+24|0;e=G+8|0;r=x[x[b>>2]+24>>2];a=G+20|0}if(!Ba|(s|0)==112){Ea[r|0](b,a,f,e);m=112;if((Ba|0)==1){break b}}}pa=u/L;if(!Ba){break xb}}if(!Ba){a=x[q+112>>2]<=0;if(a){u=1;break wb}x[G+20>>2]=4792;L=+(f>>>0);C[G+24>>3]=L;C[G+8>>3]=u;b=x[q+104>>2];a=!b;if(a){break rb}f=G+24|0;e=G+8|0;r=x[x[b>>2]+24>>2];a=G+20|0}if(!Ba|(s|0)==113){Ea[r|0](b,a,f,e);m=113;if((Ba|0)==1){break b}}pa=Ba?u:1}u=pa;if(!Ba){a=x[q+112>>2]<=0;if(a){break wb}x[G+8>>2]=4543;C[G+24>>3]=u;b=x[q+80>>2];a=!b;if(a){break rb}f=G+24|0;e=x[x[b>>2]+24>>2];a=G+8|0}if(!Ba|(s|0)==114){Ea[e|0](b,a,f);m=114;if((Ba|0)==1){break b}}}if(!Ba){C[q+120>>3]=u}if(!Ba|(s|0)==115){Cc(q);m=115;if((Ba|0)==1){break b}}if(!Ba){a=x[g+16>>2];x[q+684>>2]=a}}if(!Ba){a=G+32|0;ya=a;break qb}}if(!Ba){break a}}}if(!Ba){a=A[q+704>>2]>1;if(a){break kb}u=C[q+128>>3];a=u==1}Bb:{if(!Ba){if(a){break Bb}a=x[q+640>>2];if(a){break Bb}}if(!Ba|(s|0)==116){h=q;ha=0;m=0;ja=0;ta=0;xa=0;pa=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;m=x[Ca>>2];h=x[m>>2];ja=x[m+4>>2];ha=x[m+8>>2];ta=x[m+16>>2];la=x[m+24>>2];l(0,x[m+20>>2]);l(1,la|0);pa=+n();m=x[m+12>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;xa=x[x[Ca>>2]>>2]}if(!Ba){ha=ya-80|0;ya=ha;ta=x[h+432>>2];ja=x[h+12>>2];pa=C[h>>3]}Cb:{Db:{if(!Ba|!xa){la=dr(8);ua=0;if((Ba|0)==1){break Db}m=la}if(!Ba){la=ha+56|0;C[la>>3]=pa;ua=ha- -64|0;x[ua>>2]=ta;ta=ha+48|0;ja=ja^-1;za=ja&1;x[ta>>2]=za;x[ha+68>>2]=0;x[ha+44>>2]=za;x[ha+40>>2]=ja>>>25&1;ja=x[h+8>>2];za=x[ta+4>>2];x[ha+8>>2]=x[ta>>2];x[ha+12>>2]=za;za=x[la+4>>2];x[ha+16>>2]=x[la>>2];x[ha+20>>2]=za;la=x[ua+4>>2];x[ha+24>>2]=x[ua>>2];x[ha+28>>2]=la;la=x[ha+44>>2];x[ha>>2]=x[ha+40>>2];x[ha+4>>2]=la}if(!Ba|(xa|0)==1){Xb(m,ha,ja);ua=1;if((Ba|0)==1){break Db}}if(!Ba){ja=x[h+640>>2];x[h+640>>2]=m;m=!ja}Eb:{Fb:{Gb:{if(!(m?Ba:1)){v[ha+39|0]=0;v[ha+38|0]=0;break Gb}if(!Ba|(xa|0)==2){Nb(ja);ua=2;if((Ba|0)==1){break Db}}if(!Ba){zg(ja);la=x[h+640>>2];v[ha+39|0]=0;v[ha+38|0]=0;ja=!la;if(ja){break Fb}}}if(!Ba){ja=ha+38|0;Hb:{Ib:{if(y[h+15|0]&4){break Ib}if(C[h+128>>3]==1){break Hb}if(C[h+128>>3]<1|(y[h+15|0]&2?C[h+128>>3]>1:0)){break Ib}ja=ha+39|0}v[ja|0]=1}ta=y[ha+39|0];ja=y[ha+38|0];m=x[h+112>>2]}la=(Ba|0)==2;if(la|ta){ja=Ba?ja:ja&255;if(la|ja){if(!Ba){if((m|0)<0){break Fb}x[ha+76>>2]=10846;h=x[h+56>>2];if(!h){break Eb}ja=ha+76|0;m=x[x[h>>2]+24>>2]}if(!Ba|(xa|0)==3){Ea[m|0](h,ja);ua=3;if((Ba|0)==1){break Db}}if(!Ba){break Fb}}if(!Ba){if((m|0)<=0){break Fb}x[ha+76>>2]=7517;h=x[h+56>>2];if(!h){break Eb}ja=ha+76|0;m=x[x[h>>2]+24>>2]}if(!Ba|(xa|0)==4){Ea[m|0](h,ja);ua=4;if((Ba|0)==1){break Db}}if(!Ba){break Fb}}if(!Ba){if(!(ja&255)|(m|0)<=0){break Fb}x[ha+76>>2]=3239;h=x[h+56>>2];if(!h){break Eb}ja=ha+76|0;m=x[x[h>>2]+24>>2]}if(!Ba|(xa|0)==5){Ea[m|0](h,ja);ua=5;if((Ba|0)==1){break Db}}}if(!Ba){ya=ha+80|0;break Cb}}if(!Ba){ac();p()}break Cb}x[x[Ca>>2]>>2]=ua;x[Ca>>2]=x[Ca>>2]+4;la=x[Ca>>2];x[la>>2]=h;x[la+4>>2]=ja;x[la+8>>2]=ha;x[la+12>>2]=m;x[la+16>>2]=ta;o(+pa);h=j(1)|0;Fa=la,Ga=j(0)|0,x[Fa+20>>2]=Ga;x[la+24>>2]=h;x[Ca>>2]=x[Ca>>2]+28}m=116;if((Ba|0)==1){break b}}}if(!Ba){a=x[q+28>>2]+x[q+440>>2]|0;b=x[q+432>>2];g=(a|0)<(b|0);a=((g?b:a)|0)/2|0;u=+(a|0);b=x[q+112>>2]>0}if((Ba|0)==2|b){if(!Ba){x[ea+8>>2]=6243;C[ea+24>>3]=u;b=x[q+80>>2];g=!b;if(g){break hb}e=x[x[b>>2]+24>>2];g=ea+8|0;f=ea+24|0}if(!Ba|(s|0)==117){Ea[e|0](b,g,f);m=117;if((Ba|0)==1){break b}}}b=Ba?b:x[q+8>>2]>0;if(b|(Ba|0)==2){b=Ba?b:0;while(1){if(!Ba){f=b<<3;g=x[x[f+x[q+144>>2]>>2]+528>>2]}if(!Ba|(s|0)==118){pc(g,a);m=118;if((Ba|0)==1){break b}}if(!Ba){b=b+1|0;g=(b|0)>2];if(g){continue}}break}}if(!Ba){u=ag(u/C[q+128>>3]);L=F(u);Jb:{if(L<2147483648){b=~~u;break Jb}b=-2147483648}x[q+664>>2]=b;a=x[q+112>>2]<=0;if(a){break kb}x[ea+8>>2]=3010;u=+(b|0);C[ea+24>>3]=u;b=x[q+80>>2];a=!b;if(a){break hb}g=ea+24|0;f=x[x[b>>2]+24>>2];a=ea+8|0}if(!Ba|(s|0)==119){Ea[f|0](b,a,g);m=119;if((Ba|0)==1){break b}}}if(!Ba){x[q+704>>2]=d?3:2;Kb:{if(!x[q+640>>2]|y[q+15|0]&4){break Kb}u=C[q+128>>3];if(u==1){break Kb}u=C[q+128>>3];if(y[q+15|0]&2?u>1:0){break Kb}u=C[q+128>>3];if(u<1){break Kb}k=0}a=(t|0)<=0;if(a){break jb}w=q+144|0;r=x[q+8>>2]}while(1){if(!Ba){g=t-z|0;b=x[x[x[w>>2]>>2]+528>>2];a=x[b+12>>2]+(x[b+8>>2]^-1)|0;b=x[b+16>>2];f=a+b|0;b=(b|0)>(f|0);f=b?f:a}Lb:{Mb:{if(!(f?Ba:1)){break Mb}if(!Ba|(s|0)==120){Dc(q);m=120;if((Ba|0)==1){break b}}if(!Ba){b=x[x[x[q+144>>2]>>2]+528>>2];a=x[b+12>>2]+(x[b+8>>2]^-1)|0;b=x[b+16>>2];f=a+b|0;b=(b|0)>(f|0);f=b?f:a;if(f){break Mb}a=x[q+112>>2]>=0}if((Ba|0)==2|a){if(!Ba){x[ea+8>>2]=7175;u=+(g|0);C[ea+24>>3]=u;b=x[q+80>>2];a=!b;if(a){break hb}f=ea+24|0;e=x[x[b>>2]+24>>2];a=ea+8|0}if(!Ba|(s|0)==121){Ea[e|0](b,a,f);m=121;if((Ba|0)==1){break b}}}if(!Ba){a=x[q+8>>2]<=0;if(a){break Lb}G=0;a=x[x[x[x[w>>2]>>2]+528>>2]+16>>2];H=g+a|0}while(1){if(!Ba){e=G<<3;a=x[x[e+x[w>>2]>>2]+528>>2]}if(!Ba|(s|0)==122){h=dr(24);m=122;if((Ba|0)==1){break b}f=h}if(!Ba){x[f>>2]=15464;b=Mb(H);v[f+20|0]=0;x[f+16>>2]=H;x[f+8>>2]=0;x[f+12>>2]=0;x[f+4>>2]=b;b=x[a+12>>2];g=x[a+8>>2];I=(b|0)!=(g|0)}if((Ba|0)==2|I){while(1){if(!Ba){oa=b<<2;$=B[oa+x[a+4>>2]>>2];B[ea+24>>2]=$;I=ea+24|0}if(!Ba|(s|0)==123){h=jc(f,I,1);m=123;if((Ba|0)==1){break b}I=h}if(!Ba){b=b+1|0;b=(b|0)!=x[a+16>>2]?b:0;I=(g|0)!=(b|0);if(I){continue}}break}}if(!Ba){a=x[x[w>>2]+e>>2];b=x[a+528>>2];x[a+528>>2]=f}if((Ba|0)==2|b){a=Ba?a:x[x[b>>2]+4>>2];if(!Ba|(s|0)==124){Ea[a|0](b);m=124;if((Ba|0)==1){break b}}}if(!Ba){G=G+1|0;a=(G|0)>2];if(a){continue}}break}if(!Ba){break Lb}}a=Ba?a:!k;Nb:{Ob:{if(!Ba){if(a){b=0;a=(r|0)<=0;if(a){break Ob}while(1){a=x[q+144>>2];e=x[q+148>>2]-a>>3>>>0<=b>>>0;if(e){break ib}e=x[q+624>>2]+(b<<2)|0;H=b<<3;x[e>>2]=x[x[H+a>>2]+516>>2];b=b+1|0;a=(r|0)!=(b|0);if(a){continue}break}break Ob}f=(f|0)>(g|0)?g:f;b=0;a=x[q+8>>2]<=0;if(a){break Nb}}while(1){if(!Ba){e=z<<2;g=e+x[(b<<2)+i>>2]|0;a=x[x[x[q+144>>2]+(b<<3)>>2]+528>>2]}if(!Ba|(s|0)==125){h=jc(a,g,f);m=125;if((Ba|0)==1){break b}a=h}if(!Ba){b=b+1|0;a=(b|0)>2];if(a){continue}}break}if(!Ba){break Nb}}if(!Ba){b=x[q+144>>2];a=(b|0)==x[q+148>>2];if(a){break ib}e=x[q+624>>2];u=C[q+128>>3];a=x[b>>2];a=x[a+520>>2]-x[a+516>>2]>>2;a=(a|0)<(f|0)?a:f;L=J(u*+(a|0));va=F(L);Pb:{if(va<2147483648){b=~~L;break Pb}b=-2147483648}b=(b|0)>(g|0)?g:b;g=b>>>0<=1;f=g?1:b;u=1/u;G=x[x[q+640>>2]>>2];b=x[x[G>>2]+8>>2]}if(!Ba|(s|0)==126){h=Ea[b|0](G,e,a,i,f,u,d)|0;m=126;if((Ba|0)==1){break b}g=h}if(!Ba){b=0;a=x[q+8>>2]<=0;if(a){break Nb}}while(1){if(!Ba){a=x[q+144>>2];e=x[q+148>>2]-a>>3>>>0<=b>>>0;if(e){break ib}a=x[(b<<3)+a>>2];e=x[a+528>>2];a=x[a+516>>2]}if(!Ba|(s|0)==127){h=jc(e,a,g);m=127;if((Ba|0)==1){break b}a=h}if(!Ba){b=b+1|0;a=(b|0)>2];if(a){continue}}break}}if(!Ba|(s|0)==128){Dc(q);m=128;if((Ba|0)==1){break b}}z=Ba?z:f+z|0}if(!Ba){a=(t|0)>(z|0);if(a){continue}}break}}if(!Ba){a=ea+32|0;ya=a;break gb}}if(!Ba|(s|0)==129){Ec();m=129;if((Ba|0)==1){break b}}if(!Ba){p()}}if(!Ba){break a}}}if(!Ba){d=x[x[12122]>>2];a=x[d>>2]}Qb:{if((Ba|0)==2|a){if(!Ba){r=0;d=0;z=ya-32|0;ya=z;b=!x[a+4>>2]}Rb:{Sb:{if(!(b?Ba:1)){break Sb}Tb:{while(1){if(!Ba){H=r<<2;b=x[x[H+x[a+224>>2]>>2]+92>>2]<0}Ub:{if(!Ba){if(b){break Ub}H=x[x[x[a+224>>2]+H>>2]>>2];k=x[H+8>>2];e=x[H+12>>2];Vb:{if((k|0)>(e|0)){b=k-e|0;break Vb}b=(e|0)<=(k|0);if(b){break Ub}i=k-e|0;b=i+x[H+16>>2]|0}b=(b|0)<=0;if(b){break Ub}b=x[a+136>>2]>=2}if((Ba|0)==2|b){if(!Ba){x[z+8>>2]=5659;u=+(r>>>0);C[z+16>>3]=u;H=x[a+104>>2];b=!H;if(b){break Tb}i=z+16|0;g=x[x[H>>2]+24>>2];b=z+8|0}if(!Ba|(s|0)==130){Ea[g|0](H,b,i);m=130;if((Ba|0)==1){break b}}}if(!Ba){v[z+8|0]=0;i=z+8|0;b=z+16|0}if(!Ba|(s|0)==131){vc(a,r,b,i);m=131;if((Ba|0)==1){break b}}}if(!Ba){r=r+1|0;H=x[a+4>>2];b=r>>>0>>0;if(b){continue}}break}if(!Ba){b=!H;if(b){break Sb}e=x[x[x[a+224>>2]>>2]>>2];b=x[e+8>>2];i=x[e+12>>2];Wb:{if((b|0)<=(i|0)){h=0;if((b|0)>=(i|0)){break Wb}d=b-i|0;h=d+x[e+16>>2]|0;break Wb}h=b-i|0}i=h;r=x[x[x[a+224>>2]>>2]+4>>2];k=x[r+8>>2];e=x[r+12>>2];Xb:{if((k|0)<=(e|0)){H=0;if((e|0)<=(k|0)){break Xb}d=k-e|0;H=d+x[r+16>>2]|0;break Xb}H=k-e|0}b=x[a+136>>2]>=3}if((Ba|0)==2|b){if(!Ba){x[z+28>>2]=1520;C[z+16>>3]=i>>>0;u=+(H>>>0);C[z+8>>3]=u;r=x[a+128>>2];b=!r;if(b){break Tb}d=z+16|0;i=z+8|0;g=x[x[r>>2]+24>>2];b=z+28|0}if(!Ba|(s|0)==132){Ea[g|0](r,b,d,i);m=132;if((Ba|0)==1){break b}}}if(!Ba){r=x[a+224>>2];e=x[r>>2];d=x[e+120>>2]!=0;k=1;i=v[e+101|0]&1;b=A[a+4>>2]<=1;if(b){break Rb}}while(1){if(!Ba){e=k<<2;g=x[x[r+e>>2]>>2];b=x[g+8>>2];f=x[g+12>>2];Yb:{if((b|0)>(f|0)){h=b-f|0;break Yb}h=0;if((b|0)>=(f|0)){break Yb}h=x[g+16>>2]+(b-f|0)|0}b=h;f=x[x[x[a+224>>2]+e>>2]+4>>2];g=x[f+8>>2];q=x[f+12>>2];Zb:{if((g|0)>(q|0)){h=g-q|0;break Zb}w=(g|0)>=(q|0);h=0;if(w){break Zb}f=x[f+16>>2];h=f+(g-q|0)|0}q=h;r=q;g=x[a+136>>2]>=3}if((Ba|0)==2|g){if(!Ba){x[z+28>>2]=1520;C[z+16>>3]=b>>>0;u=+(q>>>0);C[z+8>>3]=u;f=x[a+128>>2];b=!f;if(b){break Tb}g=z+16|0;q=z+8|0;w=x[x[f>>2]+24>>2];b=z+28|0}if(!Ba|(s|0)==133){Ea[w|0](f,b,g,q);m=133;if((Ba|0)==1){break b}}}if(!Ba){H=r>>>0>>0?r:H;r=x[a+224>>2];e=x[r+e>>2];i=y[e+101|0]&i;d=x[e+120>>2]!=0|d;k=k+1|0;b=k>>>0>2];if(b){continue}}break}if(!Ba){break Rb}}if(!Ba){break a}}if(!Ba){H=0;i=1}}if(!Ba){b=!H;_b:{if(b){b=i&1;r=-1;if(b){break _b}}L=C[a+16>>3];r=H;if((L==1|d)&1){break _b}L=J(+(H>>>0)/L);u=F(L);if(u<2147483648){r=~~L;break _b}r=-2147483648}a=z+32|0;ya=a;d=r;break Qb}}if(!Ba){k=x[d+4>>2];d=x[x[x[k+144>>2]>>2]+532>>2];a=x[d+8>>2];b=x[d+12>>2];$b:{if((a|0)>(b|0)){i=a-b|0;break $b}g=(a|0)>=(b|0);i=0;if(g){break $b}i=x[d+16>>2]+(a-b|0)|0}a=i;b=x[k+704>>2]==3?-1:a;d=a?a:b}}e=Ba?e:x[12113];if(e|(Ba|0)==2){while(1){if(!Ba){f=da<<2;a=f+x[12118]|0;x[a>>2]=x[a>>2]+(t<<2);i=D(da,12);k=i+x[12123]|0;b=x[k>>2];a=x[k+4>>2]-b>>2;g=d+a|0;r=a>>>0>>0}ac:{if((Ba|0)==2|r){if(!Ba|(s|0)==134){Va(k,d);m=134;if((Ba|0)==1){break b}}if(!Ba){b=x[x[12123]+i>>2];e=x[12113];break ac}}if(!Ba){i=a>>>0<=g>>>0;if(i){break ac}i=(g<<2)+b|0;x[k+4>>2]=i}}if(!Ba){i=x[12126]+f|0;x[i>>2]=(a<<2)+b;da=da+1|0;a=da>>>0>>0;if(a){continue}}break}}if(!Ba){da=x[x[12122]>>2];b=x[da>>2];a=x[12126]}bc:{if((Ba|0)==2|b){if(!Ba){g=0;f=ya-16|0;ya=f;e=!x[b+4>>2];i=b}cc:{dc:{if(!Ba){if(e){break dc}e=x[x[x[b+224>>2]>>2]+4>>2];t=x[a>>2]}if(!Ba|(s|0)==135){h=Bc(e,t,d);m=135;if((Ba|0)==1){break b}k=h}if(!Ba){e=d>>>0>k>>>0;d=e?k:d;k=1;b=A[b+4>>2]<=1;if(b){break dc}}while(1){if(!Ba){b=k<<2;e=x[x[b+x[i+224>>2]>>2]+4>>2];b=x[a+b>>2]}if(!Ba|(s|0)==136){h=Bc(e,b,d);m=136;if((Ba|0)==1){break b}b=h}e=Ba?e:b>>>0>>0;m=(Ba|0)==2;if(e|m){d=Ba?d:x[i+136>>2]>=0;if(m|d){if(!Ba){x[f+12>>2]=9125;d=x[i+80>>2];e=!d;if(e){break cc}e=f+12|0;t=x[x[d>>2]+24>>2]}if(!Ba|(s|0)==137){Ea[t|0](d,e);m=137;if((Ba|0)==1){break b}}}d=Ba?d:b}if(!Ba){b=x[i+4>>2];k=k+1|0;e=b>>>0>k>>>0;if(e){continue}}break}if(!Ba){b=b>>>0<2;if(b){break dc}b=!(x[i+56>>2]&268435456);if(b){break dc}b=!d;if(b){break dc}b=x[a+4>>2];a=x[a>>2];i=0;e=(d|0)!=1;if(e){t=d&-2;while(1){e=i<<2;k=e+a|0;r=k;$=B[k>>2];k=b+e|0;wa=B[k>>2];B[r>>2]=$+wa;B[k>>2]=$-wa;e=e|4;k=e+a|0;$=B[k>>2];h=k;k=b+e|0;wa=B[k>>2];B[h>>2]=$+wa;$=E($-wa);B[k>>2]=$;i=i+2|0;g=g+2|0;e=(t|0)!=(g|0);if(e){continue}break}}d=!(d&1);if(d){break dc}i=i<<2;k=i+a|0;$=B[k>>2];i=b+i|0;wa=B[i>>2];B[k>>2]=$+wa;$=E($-wa);B[i>>2]=$}}if(!Ba){a=f+16|0;ya=a;break bc}}if(!Ba){break a}}if(!Ba){b=ya-16|0;ya=b;t=x[da+4>>2];g=x[t+8>>2]<=0;i=1}ec:{fc:{gc:{if(!Ba){if(g){break gc}g=x[x[x[t+144>>2]>>2]+532>>2];f=x[a>>2]}if(!Ba|(s|0)==138){h=Bc(g,f,d);m=138;if((Ba|0)==1){break b}f=h}if(!Ba){g=(f|0)>0?f:0;e=(g|0)<(d|0);f=(d|0)>(f|0);d=f?e?g:d:d;g=x[t+8>>2]<=1;if(g){break gc}}while(1){if(!Ba){g=x[x[x[t+144>>2]+(i<<3)>>2]+532>>2];f=x[(i<<2)+a>>2]}if(!Ba|(s|0)==139){h=Bc(g,f,d);m=139;if((Ba|0)==1){break b}f=h}g=Ba?g:(d|0)>(f|0);m=(Ba|0)==2;if(g|m){g=Ba?g:x[t+112>>2]>=0;if(m|g){if(!Ba){x[b+12>>2]=9066;g=x[t+56>>2];e=!g;if(e){break fc}k=x[x[g>>2]+24>>2];e=b+12|0}if(!Ba|(s|0)==140){Ea[k|0](g,e);m=140;if((Ba|0)==1){break b}}}if(!Ba){f=(f|0)>0?f:0;g=(f|0)<(d|0);d=g?f:d}}if(!Ba){i=i+1|0;g=(i|0)>2];if(g){continue}}break}}if(!Ba){a=b+16|0;ya=a;break ec}}if(!Ba){break a}}}if(!Ba){da=1;break wa}}if(!Ba){Y(48077,12220,0)|0;x[c+20>>2]=0;x[c+12>>2]=0;x[c+16>>2]=0;e=c+24|0;a=x[12113]}Da=Ba?Da:a;if(Da|(Ba|0)==2){while(1){if(!Ba){a=x[12123]+D(da,12)|0;k=x[a+4>>2];a=x[a>>2];x[c+28>>2]=a;x[c+24>>2]=k-a>>2;a=Q(12632,c+24|0)|0;Fa=c,Ga=_(a|0)|0,x[Fa+28>>2]=Ga;x[c+24>>2]=48720;if(a){P(a|0)}a=x[c+16>>2];b=a>>>0>2]}hc:{if(!Ba){if(b){x[a>>2]=x[c+24>>2];b=x[c+28>>2];x[a+4>>2]=b;x[c+16>>2]=a+8;break hc}t=c+24|0;d=c+12|0;f=x[d+4>>2];b=x[d>>2];i=f-b>>3;a=i+1|0;g=a>>>0<536870912}ic:{jc:{if((Ba|0)==2|g){if(!Ba){k=x[d+8>>2]-b|0;g=k>>2;r=g>>>0>a>>>0;a=k>>>0>=2147483640?536870911:r?g:a;g=a>>>0>=536870912;if(g){break jc}k=a<<3}if(!Ba|(s|0)==141){h=dr(k);m=141;if((Ba|0)==1){break b}g=h}if(!Ba){a=(i<<3)+g|0;x[a>>2]=x[t>>2];x[a+4>>2]=x[t+4>>2];x[t+4>>2]=0;k=g+k|0;g=a+8|0;i=(b|0)!=(f|0);if(i){while(1){a=a-8|0;f=f-8|0;t=x[f+4>>2];x[a+4>>2]=t;x[a>>2]=48720;V(t|0);i=(b|0)!=(f|0);if(i){continue}break}}x[d+8>>2]=k;b=x[d>>2];x[d>>2]=a;a=x[d+4>>2];x[d+4>>2]=g;d=(a|0)!=(b|0);if(d){while(1){a=a-8|0;f=a+4|0;t=x[f>>2];if(t){P(t|0);x[f>>2]=0}d=(a|0)!=(b|0);if(d){continue}break}}if(b){zg(b)}break ic}}if(!Ba|(s|0)==142){Xa();m=142;if((Ba|0)==1){break b}}if(!Ba){p()}}if(!Ba){Ya();p()}}if(!Ba){a=x[c+28>>2];b=!a;if(b){break hc}P(a|0)}}if(!Ba){da=da+1|0;a=da>>>0>2];b=x[c+12>>2]}}b=!Ba&(!Da|(Ba|0)==2)?0:b;if(!Ba){a=ya-16|0;ya=a;t=aa()|0;x[e+4>>2]=t;x[e>>2]=48720;d=(b|0)!=(da|0);if(d){while(1){d=x[b+4>>2];V(d|0);x[a+8>>2]=d;x[a+4>>2]=0;if(!(v[48544]&1)){Fa=48540,Ga=W(2,12640,0)|0,x[Fa>>2]=Ga;v[48544]=1}i=a+4|0;g=a+8|0;u=+X(x[12135],t|0,6294,i|0,g|0);e=x[a+4>>2];if(e){O(e|0)}b=b+8|0;d=(da|0)!=(b|0);if(d){continue}break}}ya=a+16|0;x[c>>2]=x[c+28>>2];x[c+4>>2]=x[12112];x[c+8>>2]=x[12114];Y(48121,12221,c|0)|0;b=x[c+28>>2];if(b){P(b|0)}b=x[c+12>>2];if(b){a=b;da=x[c+16>>2];d=(a|0)!=(da|0);if(d){while(1){da=da-8|0;a=da+4|0;k=x[a>>2];if(k){P(k|0);x[a>>2]=0}if((b|0)!=(da|0)){continue}break}a=x[c+12>>2]}x[c+16>>2]=b;zg(a)}da=0}}if(!Ba){a=c+32|0;ya=a;if(da){continue}}break}if(!Ba){ya=M+80|0;return}}if(!Ba){Ya();p()}}if(!Ba|(s|0)==143){Xa();m=143;if((Ba|0)==1){break b}}if(!Ba){p()}}if(!Ba|(s|0)==144){Xa();m=144;if((Ba|0)==1){break b}}if(!Ba){p()}return}x[x[Ca>>2]>>2]=m;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=f;x[h+20>>2]=e;x[h+24>>2]=g;x[h+28>>2]=k;x[h+32>>2]=i;x[h+36>>2]=q;x[h+40>>2]=r;x[h+44>>2]=t;x[h+48>>2]=w;x[h+52>>2]=I;x[h+56>>2]=z;x[h+60>>2]=H;o(+u);a=j(1)|0;Fa=h,Ga=j(0)|0,x[Fa+64>>2]=Ga;x[h+68>>2]=a;x[h+72>>2]=G;x[h+76>>2]=M;o(+L);a=j(1)|0;Fa=h,Ga=j(0)|0,x[Fa+80>>2]=Ga;x[h+84>>2]=a;x[h+88>>2]=da;x[h+92>>2]=ea;x[h+96>>2]=ba;x[h+100>>2]=fa;B[h+104>>2]=$;x[h+108>>2]=ia;x[h+112>>2]=ga;x[h+116>>2]=ka;x[h+120>>2]=ma;x[h+124>>2]=na;x[h+128>>2]=oa;x[h+132>>2]=qa;x[h+136>>2]=ra;x[h+140>>2]=sa;o(+va);a=j(1)|0;Fa=h,Ga=j(0)|0,x[Fa+144>>2]=Ga;x[h+148>>2]=a;x[h+152>>2]=Aa;x[h+156>>2]=Da;x[Ca>>2]=x[Ca>>2]+160;return}ac();p()}function Dc(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0,w=0,z=0,A=0,G=0,H=0,I=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=E(0),ua=0,va=0,wa=0,xa=0,za=0,Aa=0,Da=0,Fa=0,Ga=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-228;e=x[Ca>>2];a=x[e>>2];d=x[e+8>>2];c=x[e+12>>2];f=x[e+16>>2];h=x[e+20>>2];b=x[e+28>>2];l(0,x[e+24>>2]);l(1,b|0);g=+n();k=x[e+32>>2];m=x[e+36>>2];i=x[e+40>>2];u=x[e+44>>2];s=x[e+48>>2];b=x[e+56>>2];l(0,x[e+52>>2]);l(1,b|0);r=+n();z=x[e+60>>2];t=x[e+64>>2];w=x[e+68>>2];A=x[e+72>>2];K=x[e+76>>2];I=x[e+80>>2];M=x[e+84>>2];b=x[e+92>>2];l(0,x[e+88>>2]);l(1,b|0);H=+n();N=x[e+96>>2];Q=x[e+100>>2];R=x[e+104>>2];S=x[e+108>>2];b=x[e+116>>2];l(0,x[e+112>>2]);l(1,b|0);U=+n();V=x[e+120>>2];W=x[e+124>>2];X=x[e+128>>2];aa=x[e+132>>2];Y=x[e+136>>2];ca=x[e+140>>2];ba=x[e+144>>2];b=x[e+152>>2];l(0,x[e+148>>2]);l(1,b|0);Z=+n();da=x[e+156>>2];fa=x[e+160>>2];ea=x[e+164>>2];ga=x[e+168>>2];ma=x[e+172>>2];ka=x[e+176>>2];na=x[e+180>>2];ja=x[e+184>>2];la=x[e+188>>2];b=x[e+196>>2];l(0,x[e+192>>2]);l(1,b|0);qa=+n();ra=x[e+200>>2];ua=x[e+204>>2];va=x[e+208>>2];xa=x[e+212>>2];za=x[e+216>>2];Aa=x[e+220>>2];wa=x[e+224>>2];b=x[e+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;G=x[x[Ca>>2]>>2]}if(!Ba){R=ya-32|0;ya=R;va=1;b=!x[a+640>>2];a:{if(b){break a}b=y[a+15|0]&4;b:{if(b){break b}b=C[a+128>>3]==1;if(b){break a}if(C[a+128>>3]>1){b=y[a+15|0]&2;if(b){break b}}b=!(C[a+128>>3]<1);if(b){break a}}va=0}ma=x[a+648>>2];fa=x[a+8>>2];ua=x[a+432>>2];g=C[a+128>>3];qa=1/g;i=x[a+640>>2]}c:{d:{if((Ba|0)==2|i){if(!Ba){i=x[i>>2];b=x[x[i>>2]+20>>2]}if(!Ba|!G){ha=+Ea[b|0](i,qa);if((Ba|0)==1){break d}}else{ha=qa}qa=ha}if(!Ba){ca=1;g=C[a+120>>3];b=x[a+636>>2]}if(!Ba|(G|0)==1){e=ic(b,g,qa,E(1),ma,ua,ua,1);q=1;if((Ba|0)==1){break d}i=e}b=Ba?b:(i|0)>0;e:{f:{if(!Ba){if(b){ca=i;break f}b=x[a+112>>2]<0;if(b){break f}x[R+8>>2]=3096;g=+(i|0);C[R+16>>3]=g;i=x[a+80>>2];if(!i){break e}c=R+16|0;d=x[x[i>>2]+24>>2];b=R+8|0}if(!Ba|(G|0)==2){Ea[d|0](i,b,c);q=2;if((Ba|0)==1){break d}}}if(!Ba){i=x[a+112>>2];d=x[a+652>>2];b=(ma|0)==(d|0)}g:{if(!Ba){if(b){break g}b=(i|0)<2;if(b){break g}x[R+28>>2]=3776;C[R+16>>3]=d|0;g=+(ma|0);C[R+8>>3]=g;i=x[a+104>>2];if(!i){break e}c=R+16|0;d=R+8|0;f=x[x[i>>2]+24>>2];b=R+28|0}if(!Ba|(G|0)==3){Ea[f|0](i,b,c,d);q=3;if((Ba|0)==1){break d}}i=Ba?i:x[a+112>>2]}if(!Ba){d=x[a+656>>2];b=(ca|0)==(d|0)}h:{if(!Ba){if(b){break h}b=(i|0)<2;if(b){break h}x[R+28>>2]=3644;C[R+16>>3]=d|0;g=+(ca|0);C[R+8>>3]=g;i=x[a+104>>2];if(!i){break e}c=R+16|0;d=R+8|0;f=x[x[i>>2]+24>>2];b=R+28|0}if(!Ba|(G|0)==4){Ea[f|0](i,b,c,d);q=4;if((Ba|0)==1){break d}}}if(!Ba){za=a+144|0;ra=x[a+144>>2];b=(ra|0)==x[a+148>>2]}i:{if(!Ba){if(b){break i}b=x[x[ra>>2]+532>>2];c=x[b+8>>2]^-1;d=c+x[b+12>>2]|0;i=x[b+16>>2];h=d+i|0;b=(((h|0)<(i|0)?h:d)|0)<(ca|0)}j:{if(!Ba){if(b){break j}Aa=va?504:516;qa=+(ma|0);xa=a+432|0}while(1){if(!Ba){b=x[x[ra>>2]+528>>2];c=x[b+8>>2];h=x[b+12>>2];k:{if((c|0)>(h|0)){ja=c-h|0;break k}ja=0;if((c|0)>=(h|0)){break k}ja=x[b+16>>2]+(c-h|0)|0}i=x[a+432>>2];c=x[a+440>>2];d=c+x[a+28>>2]|0;b=(ja|0)>=(((d|0)<(i|0)?i:d)|0)}l:{if(!Ba){if(b){break l}b=x[a+704>>2]!=3;if(b){break j}if(ja){break l}i=x[x[ra>>2]+4>>2];b=!i}m:{if(!Ba){n:{if(b){break n}while(1){d=x[i+16>>2];b=(ua|0)<(d|0);if(b){i=x[i>>2];if(i){continue}break n}b=(d|0)>=(ua|0);if(b){break m}i=x[i+4>>2];if(i){continue}break}}}if(!Ba|(G|0)==5){Fc(8760);q=5;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){i=x[x[i+20>>2]+116>>2];if(!i){break j}b=x[a+112>>2]<=0;if(b){break l}x[R+8>>2]=3171;g=+(i|0);C[R+16>>3]=g;i=x[a+80>>2];if(!i){break e}c=R+16|0;d=x[x[i>>2]+24>>2];b=R+8|0}if(!Ba|(G|0)==6){Ea[d|0](i,b,c);q=6;if((Ba|0)==1){break d}}}if(!Ba){i=0;b=(fa|0)>0}if((Ba|0)==2|b){while(1){if(!Ba){s=ma;ba=x[a+652>>2];ka=x[a+656>>2];I=ya-32|0;ya=I;b=x[a+144>>2];c=x[a+148>>2]-b>>3>>>0>i>>>0}o:{if((Ba|0)==2|c){if(!Ba){V=(i<<3)+b|0;b=x[V>>2];W=x[b+12>>2];c=x[b+16>>2]-W>>3;m=x[x[V>>2]+528>>2];b=x[b+528>>2];d=x[b+8>>2];f=x[b+12>>2];p:{if((d|0)>(f|0)){e=d-f|0;break p}h=(d|0)>=(f|0);e=0;if(h){break p}e=x[b+16>>2]+(d-f|0)|0}b=e;d=(c|0)>(b|0)}q:{if((Ba|0)==2|d){if(!Ba|(G|0)==7){Gc(m,W,b);q=7;if((Ba|0)==1){break d}}if(!Ba){c=c-b|0;d=(c|0)<=0;if(d){break q}c=c<<3;b=nf((b<<3)+W|0,0,c);break q}}if(!Ba|(G|0)==8){Gc(m,W,c);q=8;if((Ba|0)==1){break d}}}if(!Ba){A=x[a+440>>2];Y=x[a+432>>2];h=x[V>>2];d=x[h>>2];N=h+4|0;b=(d|0)==(N|0);if(b){break o}k=x[a+160>>2];f=d}while(1){if(!Ba){c=x[f+16>>2];b=(A|0)==(c|0)}r:{if(!Ba){if(b){break r}u=(Y-c|0)/2|0;b=k;t=!b}s:{if(!Ba){t:{if(t){break t}while(1){m=x[b+16>>2];t=(m|0)>(c|0);if(t){b=x[b>>2];if(b){continue}break t}t=(c|0)<=(m|0);if(t){break s}b=x[b+4>>2];if(b){continue}break}}}if(!Ba|(G|0)==9){Fc(8760);q=9;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){c=x[b+20>>2];b=x[c+24>>2];t=(b|0)<=0;if(t){break r}m=(u<<3)+W|0;u=x[x[f+20>>2]+8>>2];z=x[c+28>>2];M=b&1;c=0;t=(b|0)!=1;if(t){K=b&-2;w=0;while(1){b=c<<3;C[b+u>>3]=C[b+m>>3]*C[b+z>>3];b=b|8;t=b+u|0;Q=b+m|0;r=C[b+z>>3];g=C[Q>>3]*r;C[t>>3]=g;c=c+2|0;w=w+2|0;if((K|0)!=(w|0)){continue}break}}b=!M;if(b){break r}b=c<<3;c=b+u|0;t=b+m|0;b=b+z|0;r=C[b>>3];g=C[t>>3]*r;C[c>>3]=g}}if(!Ba){c=x[f+4>>2];u:{if(c){while(1){b=c;c=x[b>>2];if(c){continue}break}break u}while(1){b=x[f+8>>2];c=x[b>>2]!=(f|0);f=b;if(c){continue}break}}f=b;b=(b|0)!=(N|0);if(b){continue}}break}if(!Ba){break o}}if(!Ba|(G|0)==10){Ec();q=10;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){N=x[N>>2];b=!N}v:{if(!Ba){w:{if(b){break w}while(1){b=x[N+16>>2];c=(A|0)<(b|0);if(c){N=x[N>>2];if(N){continue}break w}b=(b|0)>=(A|0);if(b){break v}N=x[N+4>>2];if(N){continue}break}}}if(!Ba|(G|0)==11){Fc(8760);q=11;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){c=x[a+160>>2];k=y[a+644|0];b=!k}x:{y:{z:{A:{if(!Ba){if(b){break A}b=!c}B:{if(!Ba){C:{if(b){break C}b=c;while(1){m=x[b+16>>2];f=(A|0)<(m|0);if(f){b=x[b>>2];if(b){continue}break C}f=(m|0)>=(A|0);if(f){break B}b=x[b+4>>2];if(b){continue}break}}}if(!Ba|(G|0)==12){Fc(8760);q=12;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){m=(Y-A|0)/2|0;u=x[b+20>>2];b=x[u+24>>2];f=(b|0)<=0;D:{if(f){break D}f=((m<<3)+W|0)+(s<<3)|0;u=x[u+28>>2];z=x[h+24>>2];M=b&1;m=0;t=(b|0)!=1;if(t){K=b&-2;w=0;while(1){b=m<<3;C[b+z>>3]=C[b+f>>3]*C[b+u>>3];b=b|8;t=b+z|0;Q=b+f|0;r=C[b+u>>3];g=C[Q>>3]*r;C[t>>3]=g;m=m+2|0;w=w+2|0;if((K|0)!=(w|0)){continue}break}}if(!M){break D}b=m<<3;t=b+z|0;f=b+f|0;r=C[b+u>>3];g=C[f>>3]*r;C[t>>3]=g}b=(s|0)!=(ba|0);if(b){break A}b=y[h+60|0];if(b){break z}}}b=Ba?b:!c;E:{if(!Ba){F:{if(b){break F}b=c;while(1){m=x[b+16>>2];f=(A|0)<(m|0);if(f){b=x[b>>2];if(b){continue}break F}f=(m|0)>=(A|0);if(f){break E}b=x[b+4>>2];if(b){continue}break}}}if(!Ba|(G|0)==13){Fc(8760);q=13;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){m=(Y-A|0)/2|0;u=x[b+20>>2];b=x[u+24>>2];f=(b|0)<=0;G:{if(f){break G}f=(m<<3)+W|0;u=x[u+28>>2];z=x[x[N+20>>2]+8>>2];M=b&1;m=0;s=(b|0)!=1;if(s){K=b&-2;w=0;while(1){b=m<<3;C[b+z>>3]=C[b+f>>3]*C[b+u>>3];b=b|8;s=b+z|0;t=b+f|0;r=C[b+u>>3];g=C[t>>3]*r;C[s>>3]=g;m=m+2|0;w=w+2|0;if((K|0)!=(w|0)){continue}break}}if(!M){break G}b=m<<3;s=b+z|0;f=b+f|0;r=C[b+u>>3];g=C[f>>3]*r;C[s>>3]=g}ba=0;b=h;if(k){break y}break x}}if(!Ba){if(!k){ba=1;b=h;break x}ba=1;b=x[N+20>>2];m=x[b+4>>2];d=(m|0)<=0;if(d){break y}f=x[h+36>>2];m=m<<3;lf(x[b+44>>2],f,m);d=x[h+48>>2];b=lf(x[b+56>>2],d,m)}}if(!Ba){z=(A|0)/2|0;m=x[h+24>>2];b=(A|0)<2;H:{if(b){break H}M=z&3;w=0;b=0;if(z-1>>>0>=3){Y=z&-4;K=0;while(1){e=b<<3;d=e+m|0;g=C[d>>3];q=d;f=z<<3;d=d+f|0;C[q>>3]=C[d>>3];C[d>>3]=g;d=(e|8)+m|0;g=C[d>>3];q=d;d=d+f|0;C[q>>3]=C[d>>3];C[d>>3]=g;s=e|16;u=s+m|0;g=C[u>>3];k=f+u|0;C[u>>3]=C[k>>3];C[k>>3]=g;d=(e|24)+m|0;g=C[d>>3];f=d+f|0;r=C[f>>3];C[d>>3]=r;C[f>>3]=g;b=b+4|0;K=K+4|0;if((Y|0)!=(K|0)){continue}break}}d=!M;if(d){break H}while(1){d=(b<<3)+m|0;g=C[d>>3];f=d+(z<<3)|0;r=C[f>>3];C[d>>3]=r;C[f>>3]=g;b=b+1|0;w=w+1|0;d=(M|0)!=(w|0);if(d){continue}break}}}I:{if(!Ba){while(1){J:{b=x[c+16>>2];d=(A|0)<(b|0);if(d){c=x[c>>2];if(c){continue}break J}b=(b|0)>=(A|0);if(b){break I}c=x[c+4>>2];if(c){continue}}break}}if(!Ba|(G|0)==14){Fc(8760);q=14;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){c=x[c+20>>2]+8|0;b=x[N+20>>2];d=x[b+20>>2];b=x[b+32>>2]}if(!Ba|(G|0)==15){Ob(c,m,d,b);q=15;if((Ba|0)==1){break d}}if(!Ba){c=x[a+544>>2];K:{if((c|0)<=0){break K}b=0;while(1){d=(b<<5)+a|0;if(x[d+448>>2]==(A|0)){c=0;x[I>>2]=0;x[I+4>>2]=z+1;b=x[d+472>>2];x[I+8>>2]=b;x[I+12>>2]=(x[d+476>>2]-b|0)+1;f=x[h+48>>2];b=x[N+20>>2];s=x[b+20>>2];Hc(x[h+36>>2],f,s,x[b+32>>2],I);b=x[N+20>>2];e=x[b+44>>2];m=x[b+48>>2]-e>>3;if((m|0)<=0){break K}g=1/+(A|0);u=m&3;if(m>>>0>=4){z=m&-4;d=0;while(1){f=c<<3;b=f+e|0;C[b>>3]=g*C[b>>3];b=e+(f|8)|0;C[b>>3]=g*C[b>>3];b=e+(f|16)|0;C[b>>3]=g*C[b>>3];m=e+(f|24)|0;r=g*C[m>>3];C[m>>3]=r;c=c+4|0;d=d+4|0;f=(z|0)!=(d|0);if(f){continue}break}}if(!u){break K}m=0;while(1){b=e+(c<<3)|0;r=g*C[b>>3];C[b>>3]=r;c=c+1|0;m=m+1|0;if((u|0)!=(m|0)){continue}break}break K}b=b+1|0;if((c|0)!=(b|0)){continue}break}}b=x[V>>2];v[b+60|0]=1;d=x[b>>2]}}if(!Ba){la=b+4|0;b=(la|0)!=(d|0)}if((Ba|0)==2|b){if(!Ba){b=(A|0)/2|0;X=b+1|0}while(1){if(!Ba){c=x[d+16>>2];b=(A|0)==(c|0)&ba}L:{if(!Ba){if(b){break L}K=(c|0)/2|0;s=x[d+20>>2];f=x[s+8>>2];M:{if((c|0)<2){break M}Y=K&3;w=0;b=0;if(K-1>>>0>=3){W=K&-4;k=0;while(1){O=b<<3;e=O+f|0;g=C[e>>3];m=e;q=K<<3;e=e+q|0;C[m>>3]=C[e>>3];C[e>>3]=g;e=(O|8)+f|0;g=C[e>>3];m=e;e=e+q|0;C[m>>3]=C[e>>3];C[e>>3]=g;z=(O|16)+f|0;g=C[z>>3];M=q+z|0;C[z>>3]=C[M>>3];C[M>>3]=g;m=(O|24)+f|0;g=C[m>>3];u=q+m|0;r=C[u>>3];C[m>>3]=r;C[u>>3]=g;b=b+4|0;k=k+4|0;t=(W|0)!=(k|0);if(t){continue}break}}if(!Y){break M}while(1){m=(b<<3)+f|0;g=C[m>>3];u=(K<<3)+m|0;r=C[u>>3];C[m>>3]=r;C[u>>3]=g;b=b+1|0;w=w+1|0;if((Y|0)!=(w|0)){continue}break}}b=x[a+160>>2];k=!b}N:{if(!Ba){O:{if(k){break O}while(1){m=x[b+16>>2];k=(m|0)>(c|0);if(k){b=x[b>>2];if(b){continue}break O}k=(c|0)<=(m|0);if(k){break N}b=x[b+4>>2];if(b){continue}break}}}if(!Ba|(G|0)==16){Fc(8760);q=16;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){k=x[s+20>>2];s=x[s+32>>2];b=x[b+20>>2]+8|0}if(!Ba|(G|0)==17){Ob(b,f,k,s);q=17;if((Ba|0)==1){break d}}if(!Ba){b=0;m=x[a+544>>2];f=(m|0)<=0;if(f){break L}while(1){e=(b<<5)+a|0;s=x[e+448>>2]==(c|0);if(s){P:{if((c|0)==(A|0)){x[I+4>>2]=X;x[I>>2]=0;b=x[e+472>>2];x[I+8>>2]=b;b=(x[e+476>>2]-b|0)+1|0;break P}f=x[e+472>>2];x[I>>2]=f;b=x[e+476>>2];x[I+8>>2]=f;b=(b-f|0)+1|0;x[I+4>>2]=b}x[I+12>>2]=b;b=x[d+20>>2];f=x[b+44>>2];s=x[b+56>>2];k=x[b+20>>2];Hc(f,s,k,x[b+32>>2],I);m=x[I+4>>2];b=(m|0)<=0;if(b){break L}g=1/+(c|0);c=x[x[d+20>>2]+44>>2]+(x[I>>2]<<3)|0;w=m&3;f=0;b=0;if(m>>>0>=4){K=m&-4;u=0;while(1){s=b<<3;e=s+c|0;C[e>>3]=g*C[e>>3];e=(s|8)+c|0;C[e>>3]=g*C[e>>3];z=(s|16)+c|0;C[z>>3]=g*C[z>>3];m=(s|24)+c|0;r=g*C[m>>3];C[m>>3]=r;b=b+4|0;u=u+4|0;if((K|0)!=(u|0)){continue}break}}s=!w;if(s){break L}while(1){m=(b<<3)+c|0;r=g*C[m>>3];C[m>>3]=r;b=b+1|0;f=f+1|0;s=(w|0)!=(f|0);if(s){continue}break}break L}b=b+1|0;f=(m|0)!=(b|0);if(f){continue}break}}}if(!Ba){c=x[d+4>>2];Q:{if(c){while(1){b=c;c=x[b>>2];if(c){continue}break}break Q}while(1){b=x[d+8>>2];c=x[b>>2]!=(d|0);d=b;if(c){continue}break}}d=b;b=(b|0)!=(la|0);if(b){continue}}break}}b=Ba?b:v[a+15|0]&1;if(b|(Ba|0)==2){if(!Ba){u=0;M=ya-16|0;ya=M;b=a;k=x[b+144>>2];c=x[b+148>>2]-k>>3>>>0>i>>>0}R:{if((Ba|0)==2|c){if(!Ba){k=x[(i<<3)+k>>2];K=x[k+536>>2];c=x[K>>2];t=(c|0)/2|0;d=x[k+4>>2];f=!d}S:{if(!Ba){T:{if(f){break T}while(1){k=x[d+16>>2];f=(k|0)>(c|0);if(f){d=x[d>>2];if(d){continue}break T}f=(c|0)<=(k|0);if(f){break S}d=x[d+4>>2];if(d){continue}break}}}if(!Ba|(G|0)==18){Fc(8760);q=18;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){k=x[b+160>>2];f=!k}U:{if(!Ba){V:{if(f){break V}while(1){f=x[k+16>>2];s=(f|0)>(c|0);if(s){k=x[k>>2];if(k){continue}break V}f=(c|0)<=(f|0);if(f){break U}k=x[k+4>>2];if(k){continue}break}}}if(!Ba|(G|0)==19){Fc(8760);q=19;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){f=x[k+20>>2]+8|0;s=x[K+4>>2];d=x[x[d+20>>2]+44>>2]}if(!Ba|(G|0)==20){Pb(f,d,s);q=20;if((Ba|0)==1){break d}}if(!Ba){g=C[b>>3];f=x[K+4>>2];C[f>>3]=C[f>>3]*.5;g=J(g/650);r=F(g);W:{if(r<2147483648){b=~~g;break W}b=-2147483648}e=(b|0)<=1?1:b;d=(e<<3)+f|0;b=d-8|0;C[b>>3]=C[b>>3]*.5;if((c|0)>(e|0)){nf(d,0,c-e<<3)}w=e&3;g=1/+(c|0);s=0;d=0;m=e>>>0>=4;if(m){z=e&2147483644;while(1){e=d<<3;b=e+f|0;C[b>>3]=g*C[b>>3];b=(e|8)+f|0;C[b>>3]=g*C[b>>3];m=(e|16)+f|0;C[m>>3]=g*C[m>>3];b=(e|24)+f|0;r=g*C[b>>3];C[b>>3]=r;d=d+4|0;u=u+4|0;if((z|0)!=(u|0)){continue}break}}if(w){while(1){b=(d<<3)+f|0;r=g*C[b>>3];C[b>>3]=r;d=d+1|0;s=s+1|0;if((w|0)!=(s|0)){continue}break}}d=x[K+16>>2];s=x[K+28>>2];b=x[k+20>>2]+8|0}if(!Ba|(G|0)==21){Ob(b,f,d,s);q=21;if((Ba|0)==1){break d}}if(!Ba){X:{if((c|0)<-1){break X}k=x[K+16>>2];z=t+1|0;f=z&3;s=0;d=0;if(t>>>0>=3){w=z&-4;u=0;while(1){e=d<<3;b=e+k|0;Da=b,Fa=uf(C[b>>3]),C[Da>>3]=Fa;b=(e|8)+k|0;Da=b,Fa=uf(C[b>>3]),C[Da>>3]=Fa;b=(e|16)+k|0;Da=b,Fa=uf(C[b>>3]),C[Da>>3]=Fa;b=(e|24)+k|0;g=uf(C[b>>3]);C[b>>3]=g;d=d+4|0;u=u+4|0;if((w|0)!=(u|0)){continue}break}}if(f){while(1){b=(d<<3)+k|0;g=uf(C[b>>3]);C[b>>3]=g;d=d+1|0;s=s+1|0;if((f|0)!=(s|0)){continue}break}}m=z&3;b=0;d=0;f=t>>>0>=3;if(f){w=z&-4;s=0;while(1){e=d<<3;f=e+k|0;g=C[f>>3];C[f>>3]=g*g;f=(e|8)+k|0;g=C[f>>3];C[f>>3]=g*g;u=(e|16)+k|0;g=C[u>>3];C[u>>3]=g*g;f=(e|24)+k|0;g=C[f>>3];g=g*g;C[f>>3]=g;d=d+4|0;s=s+4|0;f=(w|0)!=(s|0);if(f){continue}break}}if(m){while(1){f=(d<<3)+k|0;g=C[f>>3];g=g*g;C[f>>3]=g;d=d+1|0;b=b+1|0;f=(m|0)!=(b|0);if(f){continue}break}}if((c|0)<-1){break X}u=z&3;f=0;c=0;if(t>>>0>=3){m=z&-4;b=0;while(1){e=c<<3;d=e+k|0;if(C[d>>3]>1e10){x[d>>2]=536870912;x[d+4>>2]=1107468383}d=(e|8)+k|0;if(C[d>>3]>1e10){x[d>>2]=536870912;x[d+4>>2]=1107468383}d=(e|16)+k|0;t=C[d>>3]>1e10;if(t){x[d>>2]=536870912;x[d+4>>2]=1107468383}d=(e|24)+k|0;g=C[d>>3];s=g>1e10;if(s){x[d>>2]=536870912;x[d+4>>2]=1107468383}c=c+4|0;b=b+4|0;d=(m|0)!=(b|0);if(d){continue}break}}if(!u){break X}while(1){d=(c<<3)+k|0;g=C[d>>3];if(g>1e10){x[d>>2]=536870912;x[d+4>>2]=1107468383}c=c+1|0;f=f+1|0;if((u|0)!=(f|0)){continue}break}}b=M+16|0;ya=b;break R}}if(!Ba|(G|0)==22){Ec();q=22;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){w=ya-16|0;ya=w;k=x[a+144>>2];b=x[a+148>>2]-k>>3>>>0>i>>>0}Y:{if((Ba|0)==2|b){if(!Ba){k=(i<<3)+k|0;b=x[k>>2];c=x[b>>2];u=b+4|0;b=(c|0)!=(u|0)}if((Ba|0)==2|b){while(1){if(!Ba){d=x[x[x[k>>2]+536>>2]>>2];g=C[a+136>>3];b=g!=0;z=x[c+16>>2];r=+(z|0);H=J(r*1e4/C[a>>3]);Z=F(H);Z:{if(Z<2147483648){m=~~H;break Z}m=-2147483648}g=b?g:1/C[a+128>>3];s=0;f=x[a+544>>2];b=(f|0)>0}if((Ba|0)==2|b){if(!Ba){H=+(d|0)/r;U=H/g}while(1){if(!Ba){d=(s<<5)+a|0;b=x[d+448>>2]!=(z|0)}_:{if(!Ba){if(b){break _}b=x[d+472>>2];d=d+476|0;t=(b|0)>=x[d>>2];if(t){break _}t=(b|0)>=(m|0);if(t){break _}}while(1){if(!Ba){g=+(b|0);r=U*g;f=x[x[k>>2]+536>>2]}if(!Ba|(G|0)==23){ha=Kc(f,r);q=23;if((Ba|0)==1){break d}r=ha}if(!Ba){f=x[x[k>>2]+536>>2];g=H*g}if(!Ba|(G|0)==24){ha=Kc(f,g);q=24;if((Ba|0)==1){break d}g=ha}if(!Ba){if(g>0){g=r/g;g=g<.016666666666666666?.016666666666666666:g;f=x[x[c+20>>2]+44>>2]+(b<<3)|0;r=C[f>>3];g=(g>60?60:g)*r;C[f>>3]=g}b=b+1|0;t=(m|0)>(b|0);f=t&x[d>>2]>(b|0);if(f){continue}}break}f=Ba?f:x[a+544>>2]}if(!Ba){s=s+1|0;b=(s|0)<(f|0);if(b){continue}}break}}if(!Ba){d=x[c+4>>2];$:{if(d){while(1){b=d;d=x[b>>2];if(d){continue}break}break $}while(1){b=x[c+8>>2];d=x[b>>2]!=(c|0);c=b;if(d){continue}break}}c=b;b=(b|0)!=(u|0);if(b){continue}}break}}if(!Ba){b=w+16|0;ya=b;break Y}}if(!Ba|(G|0)==25){Ec();q=25;if((Ba|0)==1){break d}}if(!Ba){p()}}}if(!Ba){c=x[V>>2];f=x[c+80>>2];m=x[c+68>>2];b=x[c+72>>2]-m|0;if((b|0)>0){lf(m,f,b)}d=x[(y[a+644|0]?h+36|0:x[N+20>>2]+44|0)>>2];z=0;S=ya-16|0;ya=S;k=x[c+64>>2];u=x[k>>2];c=(u|0)<=0;b=0}aa:{if(!(c?Ba:1)){m=k+44|0;b=x[k+44>>2];break aa}while(1){if(!Ba){m=D(b,52);c=m+x[x[k+32>>2]>>2]|0;s=x[x[c>>2]+12>>2];h=b<<3;g=C[h+d>>3]}if(!Ba|(G|0)==26){Ea[s|0](c,g);q=26;if((Ba|0)==1){break d}}if(!Ba){m=x[x[k+32>>2]>>2]+m|0;c=x[x[m>>2]+16>>2]}if(!Ba|(G|0)==27){ha=+Ea[c|0](m);q=27;if((Ba|0)==1){break d}g=ha}if(!Ba){C[x[k+40>>2]+h>>3]=g;b=b+1|0;c=(u|0)!=(b|0);if(c){continue}}break}if(!Ba){m=k+44|0;b=x[k+44>>2];c=(u|0)<=0;if(c){break aa}c=lf(b,d,u<<3)}}if(!Ba){c=b;h=x[k+36>>2];b=x[x[h>>2]+20>>2]}if(!Ba|(G|0)==28){Ea[b|0](h);q=28;if((Ba|0)==1){break d}}b=Ba?b:x[x[h>>2]+8>>2];if(!Ba|(G|0)==29){e=Ea[b|0](h)|0;q=29;if((Ba|0)==1){break d}Q=e}if(!Ba){w=(Q|0)/-2|0;b=(w|0)!=(u|0)}if((Ba|0)==2|b){while(1){b=Ba?b:(u|0)>(z|0);ba:{if(b|(Ba|0)==2){if(!Ba){g=C[(z<<3)+c>>3];b=x[x[h>>2]+12>>2]}if(!Ba|(G|0)==30){Ea[b|0](h,g);q=30;if((Ba|0)==1){break d}}if(!Ba){break ba}}if(!Ba){b=(z|0)<(Q|0);if(b){break ba}b=x[h+44>>2];d=(b|0)<=0;if(d){break ba}g=0;d=x[h+24>>2];if((d|0)!=x[h+20>>2]){g=C[x[h+8>>2]+(d<<3)>>3];d=d+1|0;x[h+24>>2]=(d|0)!=x[h+28>>2]?d:0}t=x[h+32>>2];s=t;d=b;while(1){q=d>>>1|0;e=(q<<3)+s|0;r=C[e>>3];K=r>3;s=b-1|0;M=(d|0)<(s|0);if(M){e=(d<<3)+t|0;t=e+8|0;d=d^-1;mf(e,t,d+b<<3);b=x[h+44>>2];s=b-1|0}x[h+44>>2]=s}}b=Ba?b:(w|0)>=0;if(b|(Ba|0)==2){if(!Ba){d=x[x[h>>2]+16>>2];b=(w<<3)+c|0}if(!Ba|(G|0)==31){ha=+Ea[d|0](h);q=31;if((Ba|0)==1){break d}g=ha}if(!Ba){C[b>>3]=g}}if(!Ba){z=z+1|0;w=w+1|0;b=(w|0)!=(u|0);if(b){continue}}break}}b=Ba?b:x[k+8>>2]>0;if(b|(Ba|0)==2){b=Ba?b:k+48|0;if(!Ba|(G|0)==32){e=Lc(b);q=32;if((Ba|0)==1){break d}c=e}if(!Ba|(G|0)==33){_=b;O=m;e=0;ia=0;T=0;L=0;oa=0;pa=0;P=0;sa=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;q=x[Ca>>2];_=x[q>>2];L=x[q+12>>2];ia=x[q+16>>2];T=x[q+20>>2];P=x[q+24>>2];sa=x[q+28>>2];O=x[q+4>>2];e=x[q+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;oa=x[x[Ca>>2]>>2]}if(!Ba){sa=ya-16|0;ya=sa;P=x[_+8>>2];L=x[_+12>>2]+(P^-1)|0;q=x[_+16>>2];e=L+q|0;ia=L;L=(e|0)<(q|0);ia=L?e:ia;e=(ia|0)>0}ca:{da:{ea:{if(!Ba){if(e){ia=1;break ea}L=sa+12|0}if(!Ba|!oa){q=Ib(51780,12058,28);if((Ba|0)==1){break da}e=q}if(!Ba|(oa|0)==1){q=Nh(e,1);pa=1;if((Ba|0)==1){break da}e=q}if(!Ba|(oa|0)==2){q=Ib(e,11118,26);pa=2;if((Ba|0)==1){break da}e=q}if(!Ba|(oa|0)==3){q=Nh(e,ia);pa=3;if((Ba|0)==1){break da}T=q}if(!Ba){vj(L,x[x[T>>2]-12>>2]+T|0);e=sa+12|0}if(!Ba|(oa|0)==4){q=il(e,52748);pa=4;if((Ba|0)==1){break da}e=q}L=Ba?L:x[x[e>>2]+28>>2];if(!Ba|(oa|0)==5){q=Ea[L|0](e,10)|0;pa=5;if((Ba|0)==1){break da}e=q}L=Ba?L:sa+12|0;if(!Ba|(oa|0)==6){Po(L);pa=6;if((Ba|0)==1){break da}}if(!Ba|(oa|0)==7){Th(T,e);pa=7;if((Ba|0)==1){break da}}if(!Ba|(oa|0)==8){rh(T);pa=8;if((Ba|0)==1){break da}}}if(!Ba){if(ia){e=x[_+4>>2]+(P<<2)|0;q=x[_+16>>2];T=q-P|0;fa:{if((T|0)>=(ia|0)){if((ia|0)<=0){break fa}lf(e,O,ia<<2);break fa}if((T|0)>0){lf(e,O,T<<2)}e=ia-T|0;if((e|0)<=0){break fa}lf(x[_+4>>2],(T<<2)+O|0,e<<2)}P=P+ia|0;while(1){e=P;P=e-q|0;if((e|0)>=(q|0)){continue}break}x[_+8>>2]=e}ya=sa+16|0}break ca}x[x[Ca>>2]>>2]=pa;x[Ca>>2]=x[Ca>>2]+4;q=x[Ca>>2];x[q>>2]=_;x[q+4>>2]=O;x[q+8>>2]=e;x[q+12>>2]=L;x[q+16>>2]=ia;x[q+20>>2]=T;x[q+24>>2]=P;x[q+28>>2]=sa;x[Ca>>2]=x[Ca>>2]+32}q=33;if((Ba|0)==1){break d}}if(!Ba){x[k+44>>2]=c}}if(!Ba){if((u|0)>0){H=C[k+24>>3];r=C[k+16>>3];e=x[k+44>>2];d=x[k+40>>2];b=0;while(1){h=(b<<2)+f|0;c=b<<3;g=C[c+d>>3];U=C[c+e>>3];if(r>2]=c;b=b+1|0;if((u|0)!=(b|0)){continue}break}}ya=S+16|0;d=x[V>>2];c=x[d+96>>2];b=x[d+100>>2];x[d+120>>2]=c;x[d+124>>2]=b;b=x[d+116>>2];x[d+136>>2]=x[d+112>>2];x[d+140>>2]=b;b=x[d+108>>2];x[d+128>>2]=x[d+104>>2];x[d+132>>2]=b;d=x[V>>2];c=x[d+144>>2];b=x[d+148>>2];x[d+96>>2]=c;x[d+100>>2]=b;b=x[d+156>>2];x[d+104>>2]=x[d+152>>2];x[d+108>>2]=b;b=x[d+164>>2];x[d+112>>2]=x[d+160>>2];x[d+116>>2]=b;b=x[V>>2];m=x[b+92>>2];h=x[b+80>>2];d=0;u=0;z=0;Z=0;O=ya-16|0;ya=O;_=x[m+24>>2];b=x[m+4>>2];ga:{if((b|0)<=0){break ga}if((b|0)!=1){f=b&-2;while(1){e=d<<2;c=x[e+h>>2];M=(c|0)==1?1:2;x[e+_>>2]=c?M:0;c=e|4;e=x[c+h>>2];x[c+_>>2]=e?(e|0)==1?1:2:0;d=d+2|0;u=u+2|0;if((f|0)!=(u|0)){continue}break}}if(!(b&1)){break ga}c=d<<2;d=x[c+h>>2];x[c+_>>2]=d?(d|0)==1?1:2:0}T=x[m+28>>2]-_>>2;L=m+36|0;x[L+16>>2]=x[L+20>>2];d=x[L+28>>2];c=x[L+32>>2]-d|0;if((c|0)>0){nf(d,0,c)}Y=x[L+24>>2]-1|0;w=(Y|0)/-2|0;if((T|0)!=(w|0)){while(1){ha:{if((z|0)<(T|0)){h=x[_+(z<<2)>>2];aa=x[L+24>>2];c=x[L+20>>2];s=x[L+16>>2];k=(aa+c|0)+(s^-1)|0;if((k|0)==(((k|0)>=(aa|0)?aa:0)|0)){k=0;if((c|0)!=(s|0)){k=x[x[L+4>>2]+(c<<2)>>2];c=c+1|0;x[L+20>>2]=(c|0)!=(aa|0)?c:0}c=x[L+28>>2]+(k<<2)|0;x[c>>2]=x[c>>2]-1;aa=x[L+24>>2];s=x[L+16>>2];k=(aa+x[L+20>>2]|0)+(s^-1)|0}if((((k|0)>=(aa|0)?aa:0)|0)!=(k|0)){x[x[L+4>>2]+(s<<2)>>2]=h;c=x[L+16>>2]+1|0;x[L+16>>2]=(c|0)!=x[L+24>>2]?c:0}f=x[L+28>>2];c=f+(h<<2)|0;d=x[c>>2];e=d+1|0;x[c>>2]=e;aa=x[L+40>>2];ia:{if((aa|0)<0){break ia}c=x[f+(aa<<2)>>2];if((e|0)<(c|0)|(c|0)>(d|0)&(h|0)>=(aa|0)){break ia}x[L+40>>2]=h}break ha}if((z|0)<(Y|0)){break ha}c=x[L+16>>2];d=x[L+20>>2];ja:{if((c|0)>(d|0)){e=c-d|0;break ja}if((c|0)>=(d|0)){break ha}e=x[L+24>>2]+(c-d|0)|0}if((e|0)<=0){break ha}k=0;if((c|0)!=(d|0)){k=x[x[L+4>>2]+(d<<2)>>2];c=d+1|0;x[L+20>>2]=(c|0)!=x[L+24>>2]?c:0}c=x[L+28>>2]+(k<<2)|0;x[c>>2]=x[c>>2]-1;if(x[L+40>>2]!=(k|0)){break ha}x[L+40>>2]=-1}if((w|0)>=0){k=x[L+40>>2];if((k|0)<0){k=0;P=x[L+28>>2];c=x[L+32>>2]-P|0;ka:{if((c|0)==4){break ka}e=c>>2;if((e|0)<=0){break ka}c=e-1|0;W=c&3;d=x[P>>2];X=0;f=1;la:{if(e-2>>>0<3){break la}q=c&-4;s=0;while(1){ba=f+3|0;h=x[P+(ba<<2)>>2];aa=h;ea=f+1|0;e=x[P+(ea<<2)>>2];ga=e;c=x[P+(f<<2)>>2];S=(c|0)>(d|0);c=S?c:d;Q=(c|0)<(e|0);da=f+2|0;d=x[P+(da<<2)>>2];c=Q?e:c;M=(d|0)>(c|0);c=M?d:c;e=(c|0)<(h|0);d=e?h:c;k=e?ba:M?da:Q?ea:S?f:k;f=f+4|0;s=s+4|0;if((q|0)!=(s|0)){continue}break}}if(!W){break ka}while(1){c=x[P+(f<<2)>>2];e=(c|0)>(d|0);d=e?c:d;k=e?f:k;f=f+1|0;X=X+1|0;if((X|0)!=(W|0)){continue}break}}x[L+40>>2]=k}x[_+(w<<2)>>2]=k}z=z+1|0;w=w+1|0;if((T|0)!=(w|0)){continue}break}}ma:{na:{oa:{if((b|0)<=1){g=C[m+8>>3]*.5;break oa}c=x[m+24>>2];d=1;pa:{while(1){if(x[c+(d<<2)>>2]!=1){if((d|0)==1){Z=0;if(x[c>>2]!=1){break pa}}Z=C[m+8>>3]*+(d|0)/+x[m>>2];break pa}d=d+1|0;if((d|0)!=(b|0)){continue}break}Z=0}r=C[m+8>>3];g=r*.5;if((b|0)>=2){break na}}r=g;H=g;break ma}f=x[m+24>>2];U=+x[m>>2];d=0;H=g;while(1){c=b;b=b-1|0;e=x[f+(b<<2)>>2];qa:{ra:{if(!(d&1)){d=0;sa:{switch(e-1|0){case 1:break qa;case 0:break ra;default:break sa}}r=r*+(b|0)/U;H=r;break ma}d=1;if((e|0)==1){break qa}r=r*+(b|0)/U;break ma}H=r*+(b|0)/U;d=1}if(c>>>0>2){continue}break}r=g}C[I+16>>3]=H;C[I>>3]=Z;H=g>H?0:r;C[I+8>>3]=g==r?H:r;ya=O+16|0;b=x[I+4>>2];c=x[V>>2];x[c+144>>2]=x[I>>2];x[c+148>>2]=b;b=x[I+20>>2];x[c+160>>2]=x[I+16>>2];x[c+164>>2]=b;b=x[I+12>>2];x[c+152>>2]=x[I+8>>2];x[c+156>>2]=b;b=0;Z=C[a+120>>3]*C[a+128>>3];K=F(Z+-1)<1e-7?x[a+660>>2]+1|0:0;x[a+660>>2]=K;u=(A|0)/2|0;z=x[a+12>>2];N=x[N+20>>2];w=x[N+44>>2];g=0;ta:{if((A|0)<2){break ta}f=w+8|0;if(u-1>>>0>=3){A=u&-4;d=0;while(1){c=b<<3;g=g+C[c+f>>3]+C[f+(c|8)>>3]+C[f+(c|16)>>3]+C[f+(c|24)>>3];b=b+4|0;d=d+4|0;if((A|0)!=(d|0)){continue}break}}c=u&3;if(!c){break ta}m=0;while(1){g=g+C[f+(b<<3)>>3];b=b+1|0;m=m+1|0;if((c|0)!=(m|0)){continue}break}}m=z&268435456;d=a+168|0;r=+(u|0);g=g/r;b=x[V>>2];c=x[N+80>>2];ua:{if(y[a+644|0]){f=x[b+36>>2];h=b+96|0;s=b+120|0;k=b+144|0;t=z&1;m=(m|0)!=0;Ic(d,Z,ka,w,c,f,h,s,k,g,K,t,m,b+168|0);break ua}f=b+96|0;h=b+120|0;s=b+144|0;k=z&1;t=(m|0)!=0;Ic(d,Z,ka,c,c,w,f,h,s,g,K,k,t,b+168|0)}ya=I+32|0;i=i+1|0;b=(fa|0)!=(i|0);if(b){continue}}break}}if(!Ba){i=x[x[za>>2]>>2];b=x[i>>2];X=i+4|0;c=(b|0)!=(X|0)}if((Ba|0)==2|c){while(1){if(!Ba){d=x[b+16>>2];i=(fa|0)>0;c=0}if((Ba|0)==2|i){while(1){if(!Ba){i=x[a+144>>2];if(x[a+148>>2]-i>>3>>>0<=c>>>0){break i}f=(c<<3)+i|0;i=x[x[f>>2]+4>>2];h=!i}va:{if(!Ba){wa:{if(h){break wa}while(1){h=x[i+16>>2];s=(h|0)>(d|0);if(s){i=x[i>>2];if(i){continue}break wa}h=(d|0)<=(h|0);if(h){break va}i=x[i+4>>2];if(i){continue}break}}}if(!Ba|(G|0)==34){Fc(8760);q=34;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){h=c<<2;i=i+20|0;x[h+x[a+552>>2]>>2]=x[x[i>>2]+44>>2];x[x[a+564>>2]+h>>2]=x[x[i>>2]+56>>2];k=x[x[i>>2]+80>>2];x[x[a+576>>2]+h>>2]=k;s=x[a+588>>2]+h|0;x[s>>2]=x[f>>2]+168;f=x[a+600>>2]+h|0;x[f>>2]=x[x[i>>2]+68>>2];c=c+1|0;i=(fa|0)!=(c|0);if(i){continue}}break}}if(!Ba){i=x[a+160>>2];c=!i}xa:{if(!Ba){ya:{if(c){break ya}while(1){h=x[i+16>>2];c=(h|0)>(d|0);if(c){i=x[i>>2];if(i){continue}break ya}c=(d|0)<=(h|0);if(c){break xa}i=x[i+4>>2];if(i){continue}break}}}if(!Ba|(G|0)==35){Fc(8760);q=35;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){V=x[a+600>>2];na=x[a+552>>2];z=x[a+564>>2];u=x[a+576>>2];f=xa;W=x[a+652>>2];Y=x[a+656>>2];ga=0;S=ya-32|0;ya=S;t=x[i+20>>2]+72|0;m=x[t>>2];A=x[a+588>>2];c=x[A>>2];d=0;za:{if((m|0)==x[c>>2]){break za}d=1;if(x[c+24>>2]==(m|0)){break za}d=(x[c+48>>2]==(m|0))<<1}H=+(Y|0);g=+(W|0);Z=H/g;aa=((m|0)/2|0)+1|0;c=(d<<5)+f|0;da=x[c+44>>2];i=x[c+40>>2];ea=x[t+16>>2];c=x[t+96>>2]<=0}Aa:{Ba:{Ca:{Da:{Ea:{Fa:{Ga:{if(!Ba){if(c){break Ga}c=y[t+148|0];if(c){break Ga}x[S+20>>2]=2802;C[S+24>>3]=m|0;r=+(aa|0);C[S+8>>3]=r;c=x[t+88>>2];h=!c;if(h){break Fa}s=S+24|0;k=S+8|0;I=x[x[c>>2]+24>>2];h=S+20|0}if(!Ba|(G|0)==36){Ea[I|0](c,h,s,k);q=36;if((Ba|0)==1){break d}}c=Ba?c:x[t+96>>2]<=0;Ha:{if(!Ba){if(c){break Ha}x[S+8>>2]=2928;r=+(ea|0);C[S+24>>3]=r;c=x[t- -64>>2];h=!c;if(h){break Fa}s=S+24|0;k=x[x[c>>2]+24>>2];h=S+8|0}if(!Ba|(G|0)==37){Ea[k|0](c,h,s);q=37;if((Ba|0)==1){break d}}if(!Ba){c=x[t+96>>2]<=0;if(c){break Ha}x[S+20>>2]=6861;C[S+24>>3]=i|0;r=+(da|0);C[S+8>>3]=r;c=x[t+88>>2];h=!c;if(h){break Fa}s=S+24|0;k=S+8|0;I=x[x[c>>2]+24>>2];h=S+20|0}if(!Ba|(G|0)==38){Ea[I|0](c,h,s,k);q=38;if((Ba|0)==1){break d}}if(!Ba){c=x[t+96>>2]<=0;if(c){break Ha}c=(d<<5)+f|0;r=C[c+32>>3];U=C[c+24>>3];x[S+20>>2]=6815;C[S+24>>3]=U;C[S+8>>3]=r;d=x[t+88>>2];c=!d;if(c){break Fa}f=S+24|0;h=S+8|0;s=x[x[d>>2]+24>>2];c=S+20|0}if(!Ba|(G|0)==39){Ea[s|0](d,c,f,h);q=39;if((Ba|0)==1){break d}}if(!Ba){c=x[t+96>>2]<=0;if(c){break Ha}x[S+20>>2]=3697;C[S+24>>3]=g;C[S+8>>3]=H;d=x[t+88>>2];c=!d;if(c){break Fa}f=S+24|0;h=S+8|0;s=x[x[d>>2]+24>>2];c=S+20|0}if(!Ba|(G|0)==40){Ea[s|0](d,c,f,h);q=40;if((Ba|0)==1){break d}}if(!Ba){c=x[t+96>>2]<=0;if(c){break Ha}x[S+8>>2]=4553;C[S+24>>3]=Z;d=x[t+64>>2];c=!d;if(c){break Fa}f=S+24|0;h=x[x[d>>2]+24>>2];c=S+8|0}if(!Ba|(G|0)==41){Ea[h|0](d,c,f);q=41;if((Ba|0)==1){break d}}}if(!Ba){v[t+148|0]=1}}if(!Ba){c=(ea|0)<=0;if(c){break Da}h=t+108|0;w=da-i|0;I=w+1|0;O=I&7;while(1){Ia:{if((i|0)>(da|0)){break Ia}f=x[x[t+124>>2]+(ga<<2)>>2];c=0;d=i;if(O){while(1){x[(d<<2)+f>>2]=d;d=d+1|0;c=c+1|0;if((O|0)!=(c|0)){continue}break}}if(w>>>0<7){break Ia}while(1){x[(d<<2)+f>>2]=d;c=d+1|0;x[(c<<2)+f>>2]=c;c=d+2|0;x[(c<<2)+f>>2]=c;c=d+3|0;x[(c<<2)+f>>2]=c;c=d+4|0;x[(c<<2)+f>>2]=c;c=d+5|0;x[(c<<2)+f>>2]=c;c=d+6|0;x[(c<<2)+f>>2]=c;c=d+7|0;x[(c<<2)+f>>2]=c;d=d+8|0;if((c|0)!=(da|0)){continue}break}}T=ga<<2;s=T+A|0;c=x[s>>2];if(x[c+208>>2]>0){e=T+na|0;d=0;while(1){Q=(d<<5)+c|0;ha=+x[t>>2];H=C[t+8>>3];r=ag(C[Q+96>>3]*ha/H);Ja:{if(F(r)<2147483648){q=~~r;break Ja}q=-2147483648}f=(q|0)>(da|0);U=C[Q+104>>3];H=ag(U*ha/H);r=F(H);Ka:{if(r<2147483648){k=~~H;break Ka}k=-2147483648}La:{if(f){break La}M=(i|0)>(k|0);if(M){break La}k=(k-q|0)+1|0;M=x[Q+80>>2];Q=x[T+x[t+124>>2]>>2];Jc(h,x[e>>2],q,k,M,Q);c=x[s>>2]}d=d+1|0;f=(d|0)>2];if(f){continue}break}}d=x[T+x[t+128>>2]>>2];Jc(h,x[u+T>>2],i,I,1,d);ga=ga+1|0;c=(ga|0)!=(ea|0);if(c){continue}break}break Ea}}if(!Ba){ac();p()}}if(!Ba){c=(ea|0)<2;if(c){break Da}if((i|0)>(da|0)){g=g*6.283185307179586;c=x[t>>2];U=+(c|0);r=g/U;break Ba}c=ea-1|0;h=c&-2;q=c&1;e=x[t+132>>2];ga=x[na>>2];u=(ea|0)!=2;s=i;while(1){P=s<<3;r=C[P+ga>>3];ta=E(r);f=0;d=1;Q=0;if(u){while(1){U=+ta;m=P+x[(d<<2)+na>>2]|0;r=C[m>>3];T=U>2]>>3];O=r>2];r=C[P+m>>3];H=+ta;f=r>H?d:f}k=e+(s<<2)|0;x[k>>2]=f;d=(s|0)==(da|0);s=s+1|0;c=!d;if(c){continue}break}break Ca}}if(!Ba){c=(m|0)<-1;if(c){break Ca}d=aa<<2;c=nf(x[t+132>>2],0,d)}}if(!Ba){c=(ea|0)<=0;if(c){break Aa}g=g*6.283185307179586;c=x[t>>2];U=+(c|0);r=g/U}}if(!Ba){h=x[t+144>>2];s=x[t+140>>2];O=x[t+136>>2];c=0;while(1){aa=(i|0)>(da|0);if(!aa){d=c<<2;q=x[d+h>>2];Q=x[d+s>>2];k=x[d+z>>2];e=x[d+O>>2];d=i;while(1){f=d<<3;m=f+q|0;u=f+k|0;ha=r*+(d|0);g=C[u>>3]-(ha+C[e+f>>3])+3.141592653589793;H=J(g/-6.283185307179586)*6.283185307179586+g+3.141592653589793;g=C[f+Q>>3]+Z*(ha+H);C[m>>3]=g;f=(d|0)==(da|0);d=d+1|0;f=!f;if(f){continue}break}}c=c+1|0;if((ea|0)!=(c|0)){continue}break}c=(ea|0)<=0;if(c){break Aa}h=0;while(1){if(!aa){ba=x[t+128>>2];c=h<<2;u=ba+c|0;ka=x[t+124>>2];I=c+ka|0;w=x[t+144>>2];na=c+w|0;s=c+z|0;P=x[c+V>>2];m=x[t+140>>2];la=x[t+132>>2];f=0;d=x[c+A>>2];T=y[d+288|0];c=i;while(1){e=c;r=+(c|0);g=C[t+8>>3]*r/U;c=f;while(1){f=c;Q=(c<<5)+d|0;if(g>C[Q+104>>3]){c=c+1|0;if((c|0)>2]){continue}}break}k=P+(e<<3)|0;Ma:{Na:{if(!(!(!T|!(g>=C[d+296>>3]))&g>3])){if(!(g>3])|(!y[d+216|0]|!(g>=C[d+224>>3]))){break Na}}M=e<<3;g=C[M+x[s>>2]>>3];break Ma}if((W|0)==(Y|0)){M=e<<3;g=C[M+x[na>>2]>>3];break Ma}if(!(!(g>3])|(!y[d+264|0]|!(g>=C[d+272>>3])))){M=e<<3;g=C[M+x[na>>2]>>3];break Ma}ga=e<<2;O=x[ga+x[I>>2]>>2];_=x[x[u>>2]+(O<<2)>>2];c=h;Oa:{if(!(g>3])|(!y[d+312|0]|!(g>=C[d+320>>3]))){break Oa}K=x[ga+la>>2];if((K|0)==(c|0)){break Oa}N=K<<2;q=x[N+A>>2];if(!y[q+312|0]|!(g>=C[q+320>>3])|!(g>3])){break Oa}q=x[N+ba>>2];N=x[N+ka>>2];ga=x[ga+N>>2]<<2;c=(_|0)==x[q+ga>>2]?K:c}g=C[Q+88>>3];q=c<<2;c=x[q+m>>2];M=c+(_<<3)|0;Q=O<<3;Z=C[c+Q>>3];r=C[M>>3]+(C[x[q+w>>2]+Q>>3]-Z);g=g*(C[x[s>>2]+(e<<3)>>3]-C[x[q+z>>2]+Q>>3])+r}H=g+3.141592653589793;g=J(H/-6.283185307179586)*6.283185307179586+H+3.141592653589793;C[k>>3]=g;c=e+1|0;k=(e|0)!=(da|0);if(k){continue}break}}h=h+1|0;if((ea|0)!=(h|0)){continue}break}c=(ea|0)<=0;if(c){break Aa}s=da-i|0;k=s+1&3;q=x[t+140>>2];e=x[t+136>>2];P=0;while(1){Pa:{if(aa){break Pa}T=P<<2;f=x[T+e>>2];_=x[z+T>>2];Q=0;d=i;if(k){while(1){c=d<<3;g=C[c+_>>3];C[c+f>>3]=g;d=d+1|0;Q=Q+1|0;if((Q|0)!=(k|0)){continue}break}}h=s>>>0<3;t=!h;if(t){while(1){O=d<<3;C[O+f>>3]=C[O+_>>3];c=O+8|0;C[c+f>>3]=C[c+_>>3];c=O+16|0;C[c+f>>3]=C[c+_>>3];Q=d+3|0;c=Q<<3;m=c+f|0;g=C[c+_>>3];C[m>>3]=g;d=d+4|0;t=(Q|0)!=(da|0);if(t){continue}break}}if(aa){break Pa}f=x[q+T>>2];O=x[T+V>>2];Q=0;d=i;if(k){while(1){c=d<<3;m=c+f|0;g=C[c+O>>3];C[m>>3]=g;d=d+1|0;Q=Q+1|0;t=(Q|0)!=(k|0);if(t){continue}break}}if(h){break Pa}while(1){h=d<<3;C[h+f>>3]=C[h+O>>3];c=h+8|0;C[c+f>>3]=C[c+O>>3];c=h+16|0;C[c+f>>3]=C[c+O>>3];Q=d+3|0;c=Q<<3;t=c+O|0;g=C[t>>3];C[c+f>>3]=g;d=d+4|0;h=(Q|0)!=(da|0);if(h){continue}break}}P=P+1|0;c=(P|0)!=(ea|0);if(c){continue}break}}}if(!Ba){ya=S+32|0;d=b;i=x[b+4>>2];Qa:{if(i){while(1){b=i;i=x[b>>2];if(i){continue}break}break Qa}while(1){b=x[d+8>>2];i=x[b>>2]!=(d|0);d=b;if(i){continue}break}}c=(b|0)!=(X|0);if(c){continue}}break}}if(!Ba){i=0;b=(fa|0)<=0}Ra:{if(!(b?Ba:1)){break Ra}while(1){if(!Ba){d=ya-16|0;ya=d;b=a;c=!(y[b+14|0]&16)}Sa:{Ta:{if((Ba|0)==2|c){Ua:{if(!Ba){k=x[b+144>>2];c=x[b+148>>2]-k>>3>>>0<=i>>>0;if(c){break Ta}X=x[(i<<3)+k>>2];k=x[X+168>>2];c=y[X+408|0]}if((Ba|0)==2|c){if(!Ba){c=x[X+4>>2];f=!c}Va:{if(!Ba){Wa:{if(f){break Wa}while(1){s=x[c+16>>2];f=(s|0)>(k|0);if(f){c=x[c>>2];if(c){continue}break Wa}f=(k|0)<=(s|0);if(f){break Va}c=x[c+4>>2];if(c){continue}break}}}if(!Ba|(G|0)==42){Fc(8760);q=42;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){r=+(k|0);g=C[b>>3];Z=ag(C[X+424>>3]*r/g);Xa:{if(F(Z)<2147483648){b=~~Z;break Xa}b=-2147483648}r=C[X+416>>3]*r;U=ag(r/g);g=F(U);Ya:{if(g<2147483648){k=~~U;break Ya}k=-2147483648}f=(b|0)<(k|0);if(f){break Ua}h=x[c+20>>2];X=x[h+80>>2];f=x[h+44>>2];while(1){c=k<<3;s=c+f|0;g=C[s>>3];r=C[c+X>>3];U=g-r;t=U>0;if(t){t=x[h+92>>2];C[c+t>>3]=U;g=C[s>>3]-U;C[s>>3]=g}c=(b|0)==(k|0);k=k+1|0;c=!c;if(c){continue}break}break Ua}}if(!Ba){c=!y[X+384|0];if(c){break Ua}c=x[X+4>>2];f=!c}Za:{if(!Ba){_a:{if(f){break _a}while(1){s=x[c+16>>2];f=(s|0)>(k|0);if(f){c=x[c>>2];if(c){continue}break _a}f=(k|0)<=(s|0);if(f){break Za}c=x[c+4>>2];if(c){continue}break}}}if(!Ba|(G|0)==43){Fc(8760);q=43;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){r=+(k|0);g=C[b>>3];Z=ag(C[X+424>>3]*r/g);$a:{if(F(Z)<2147483648){h=~~Z;break $a}h=-2147483648}f=h;r=C[X+416>>3]*r;U=ag(r/g);g=F(U);ab:{if(g<2147483648){b=~~U;break ab}b=-2147483648}f=(f|0)<(b|0);if(f){break Ua}c=x[c+20>>2];k=x[c+44>>2];s=x[c+92>>2];c=b;f=(h-b|0)+1&1;if(f){c=b<<3;X=c+k|0;c=c+s|0;r=C[X>>3];g=C[c>>3]+r;C[X>>3]=g;x[c>>2]=0;x[c+4>>2]=0;c=b+1|0}b=(b|0)==(h|0);if(b){break Ua}while(1){f=c<<3;b=f+k|0;f=f+s|0;C[b>>3]=C[f>>3]+C[b>>3];x[f>>2]=0;x[f+4>>2]=0;e=c+1|0;b=e<<3;f=b+k|0;X=b+s|0;r=C[f>>3];g=C[X>>3]+r;C[f>>3]=g;x[X>>2]=0;x[X+4>>2]=0;c=c+2|0;b=(e|0)!=(h|0);if(b){continue}break}}}}if(!Ba){b=d+16|0;ya=b;break Sa}}if(!Ba|(G|0)==44){Ec();q=44;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){i=i+1|0;b=(fa|0)!=(i|0);if(b){continue}}break}if(!Ba){b=(fa|0)<=0;if(b){break Ra}i=0}while(1){if(!Ba){f=!ja;la=0;ba=ya-32|0;ya=ba;d=x[a+144>>2];b=x[a+148>>2]-d>>3>>>0>i>>>0}bb:{if((Ba|0)==2|b){if(!Ba){k=(i<<3)+d|0;b=x[k>>2];c=x[b+240>>2]<=0;if(c){break bb}s=x[a+432>>2];g=+(ca|0)}while(1){if(!Ba){c=x[b+4>>2];d=!c}cb:{if(!Ba){db:{if(d){break db}w=(b+168|0)+D(la,24)|0;b=x[w>>2];while(1){d=x[c+16>>2];h=(d|0)>(b|0);if(h){c=x[c>>2];if(c){continue}break db}d=(b|0)<=(d|0);if(d){break cb}c=x[c+4>>2];if(c){continue}break}}}if(!Ba|(G|0)==45){Fc(8760);q=45;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){d=x[a+160>>2];h=!d}eb:{if(!Ba){fb:{if(h){break fb}while(1){z=x[d+16>>2];h=(z|0)>(b|0);if(h){d=x[d>>2];if(d){continue}break fb}h=(b|0)<=(z|0);if(h){break eb}d=x[d+4>>2];if(d){continue}break}}}if(!Ba|(G|0)==46){Fc(8760);q=46;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){K=x[c+20>>2];A=x[K+44>>2];z=x[K+4>>2];if((z|0)>0){lf(x[K+80>>2],A,z<<3)}H=+(b|0);Z=C[a>>3];r=ag(C[w+16>>3]*H/Z);gb:{if(F(r)<2147483648){e=~~r;break gb}e=-2147483648}t=(e|0)>0;N=t&!(e&1);U=C[x[d+20>>2]+64>>3];r=ag(C[w+8>>3]*H/Z);H=F(r);hb:{if(H<2147483648){h=~~r;break hb}h=-2147483648}if((h|0)>0){w=h<<3;nf(x[K+20>>2],0,w);nf(x[K+32>>2],0,w)}e=e-N|0;ka=e;W=e-h|0;if((W|0)>0){r=g/U;Y=h<<3;P=Y+A|0;V=W&3;A=0;w=0;X=(h^-1)+e>>>0<3;if(!X){M=W&-4;I=0;while(1){h=w<<3;e=h+P|0;C[e>>3]=r*C[e>>3];e=P+(h|8)|0;C[e>>3]=r*C[e>>3];e=P+(h|16)|0;C[e>>3]=r*C[e>>3];e=P+(h|24)|0;H=r*C[e>>3];C[e>>3]=H;w=w+4|0;I=I+4|0;if((M|0)!=(I|0)){continue}break}}if(V){while(1){e=P+(w<<3)|0;H=r*C[e>>3];C[e>>3]=H;w=w+1|0;A=A+1|0;if((V|0)!=(A|0)){continue}break}}e=x[K+68>>2]+Y|0;w=x[K+32>>2]+Y|0;T=x[K+20>>2]+Y|0;A=0;while(1){h=A<<3;r=C[h+e>>3];t=h+T|0;dg(r,h+w|0,t);A=A+1|0;if((W|0)!=(A|0)){continue}break}N=0;A=0;if(!X){q=W&-4;M=0;while(1){O=A<<3;e=O+T|0;C[e>>3]=C[P+O>>3]*C[e>>3];h=O|8;e=h+T|0;C[e>>3]=C[h+P>>3]*C[e>>3];e=O|16;Y=e+T|0;C[Y>>3]=C[e+P>>3]*C[Y>>3];h=O|24;e=h+T|0;H=C[e>>3];r=C[h+P>>3]*H;C[e>>3]=r;A=A+4|0;M=M+4|0;t=(q|0)!=(M|0);if(t){continue}break}}if(V){while(1){e=A<<3;M=e+T|0;H=C[M>>3];r=C[e+P>>3]*H;C[M>>3]=r;A=A+1|0;N=N+1|0;if((V|0)!=(N|0)){continue}break}}I=0;u=0;if(!X){q=W&-4;N=0;while(1){O=u<<3;e=O+w|0;C[e>>3]=C[P+O>>3]*C[e>>3];h=O|8;e=h+w|0;C[e>>3]=C[h+P>>3]*C[e>>3];e=O|16;W=e+w|0;C[W>>3]=C[e+P>>3]*C[W>>3];A=O|24;M=A+w|0;H=C[M>>3];r=C[A+P>>3]*H;C[M>>3]=r;u=u+4|0;N=N+4|0;if((q|0)!=(N|0)){continue}break}}if(V){while(1){A=u<<3;N=A+w|0;H=C[N>>3];r=C[A+P>>3]*H;C[N>>3]=r;u=u+1|0;I=I+1|0;if((V|0)!=(I|0)){continue}break}}K=x[c+20>>2];z=x[K+4>>2]}ib:{if((z|0)<=(ka|0)){break ib}z=z-ka|0;if((z|0)<=0){break ib}w=ka<<3;z=z<<3;nf(w+x[K+20>>2]|0,0,z);nf(x[K+32>>2]+w|0,0,z)}I=x[d+20>>2]+8|0;m=x[K+32>>2];u=x[K+8>>2];h=x[K+20>>2]}jb:{kb:{lb:{if((Ba|0)==2|h){if(!Ba){t=!m;if(t){break lb}t=!u;if(t){break kb}I=x[I>>2];t=x[x[I>>2]+56>>2]}if(!Ba|(G|0)==47){Ea[t|0](I,h,m,u);q=47;if((Ba|0)==1){break d}}if(!Ba){break jb}}if(!Ba|(G|0)==48){e=Jb(51780,5399);q=48;if((Ba|0)==1){break d}a=e}if(!Ba|(G|0)==49){Kb(a);q=49;if((Ba|0)==1){break d}}if(!Ba){break c}}if(!Ba|(G|0)==50){e=Jb(51780,5432);q=50;if((Ba|0)==1){break d}a=e}if(!Ba|(G|0)==51){Kb(a);q=51;if((Ba|0)==1){break d}}if(!Ba){break c}}if(!Ba|(G|0)==52){e=Jb(51780,1574);q=52;if((Ba|0)==1){break d}a=e}if(!Ba|(G|0)==53){Kb(a);q=53;if((Ba|0)==1){break d}}if(!Ba){break c}}if(!Ba){V=(b|0)/2|0;Y=x[c+20>>2];z=x[Y+8>>2];mb:{if((b|0)<2){break mb}W=V&3;I=0;c=0;if(V-1>>>0>=3){K=V&-4;N=0;while(1){q=c<<3;e=q+z|0;r=C[e>>3];L=e;h=V<<3;e=e+h|0;C[L>>3]=C[e>>3];C[e>>3]=r;e=(q|8)+z|0;r=C[e>>3];L=e;e=e+h|0;C[L>>3]=C[e>>3];C[e>>3]=r;A=(q|16)+z|0;r=C[A>>3];M=h+A|0;C[A>>3]=C[M>>3];C[M>>3]=r;w=(q|24)+z|0;r=C[w>>3];e=h+w|0;H=C[e>>3];C[w>>3]=H;C[e>>3]=r;c=c+4|0;N=N+4|0;if((N|0)!=(K|0)){continue}break}}if(!W){break mb}while(1){w=(c<<3)+z|0;r=C[w>>3];e=(V<<3)+w|0;H=C[e>>3];C[w>>3]=H;C[e>>3]=r;c=c+1|0;I=I+1|0;if((W|0)!=(I|0)){continue}break}}d=x[d+20>>2];u=x[d+48>>2];c=(s-u|0)/2|0;b=(b-u|0)/2|0;h=(u|0)<=0;nb:{if(h){break nb}h=x[Y+104>>2];e=h+(c<<3)|0;z=(b<<3)+z|0;w=x[d+52>>2];V=u&1;d=0;if((u|0)!=1){I=u&-2;u=0;while(1){c=d<<3;b=c+e|0;C[b>>3]=C[c+z>>3]*C[c+w>>3]+C[b>>3];b=c|8;A=b+e|0;h=b+z|0;H=C[A>>3];r=C[h>>3]*C[b+w>>3]+H;C[A>>3]=r;d=d+2|0;u=u+2|0;if((I|0)!=(u|0)){continue}break}}if(!V){break nb}b=d<<3;d=e+b|0;H=C[d>>3];r=C[b+z>>3]*C[b+w>>3]+H;C[d>>3]=r}la=la+1|0;b=x[k>>2];c=(la|0)>2];if(c){continue}}break}if(!Ba){break bb}}if(!Ba|(G|0)==54){Ec();q=54;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){w=x[b+504>>2];if((ca|0)>0){nf(w,0,ca<<2)}c=x[b>>2];W=b+4|0;b=(c|0)!=(W|0)}ob:{pb:{if((Ba|0)==2|b){if(!Ba){K=ca&1;I=ca&-2;M=ca<<3}while(1){if(!Ba){V=x[c+20>>2];e=x[V+104>>2];N=(ca|0)<=0;qb:{if(N){break qb}b=0;z=0;if((ca|0)!=1){while(1){d=(b<<2)+w|0;B[d>>2]=B[d>>2]+E(C[e+(b<<3)>>3]);u=b|1;A=(u<<2)+w|0;g=C[e+(u<<3)>>3];B[A>>2]=B[A>>2]+E(g);b=b+2|0;z=z+2|0;if((I|0)!=(z|0)){continue}break}}if(!K){break qb}z=(b<<2)+w|0;g=C[e+(b<<3)>>3];B[z>>2]=B[z>>2]+E(g)}d=(x[V+108>>2]-e>>3)-ca<<3;b=mf(e,e+M|0,d);h=!N;if(h){nf(b+d|0,0,M)}d=!f;b=x[c+20>>2]}rb:{if(!Ba){if(d){h=x[b+104>>2];d=x[b+108>>2]-h>>3;x[b+116>>2]=d;break rb}d=x[b+116>>2];h=(ca|0)<(d|0)}if((Ba|0)==2|h){if(!Ba){z=d-ca|0;h=x[a+112>>2]>=2}wa=Ba?wa:h;if(wa|(Ba|0)==2){if(!Ba){x[ba+28>>2]=4499;C[ba+16>>3]=d|0;g=+(z|0);C[ba+8>>3]=g;b=x[a+104>>2];d=!b;if(d){break pb}h=ba+16|0;s=ba+8|0;k=x[x[b>>2]+24>>2];d=ba+28|0}if(!Ba|(G|0)==55){Ea[k|0](b,d,h,s);q=55;if((Ba|0)==1){break d}}b=Ba?b:x[c+20>>2]}if(!Ba){x[b+116>>2]=z;break rb}}if(!Ba){x[b+116>>2]=0}}if(!Ba){d=x[c+4>>2];sb:{if(d){while(1){b=d;d=x[b>>2];if(d){continue}break}break sb}while(1){b=x[c+8>>2];d=x[b>>2]!=(c|0);c=b;if(d){continue}break}}c=b;b=(b|0)!=(W|0);if(b){continue}}break}}if(!Ba){b=ba+32|0;ya=b;break ob}}if(!Ba){ac();p()}}if(!Ba){i=i+1|0;b=(fa|0)!=(i|0);if(b){continue}}break}}if(!Ba){i=ca;b=!va}if((Ba|0)==2|b){if(!Ba){i=0;if((fa|0)>0){while(1){d=x[a+144>>2];if(x[a+148>>2]-d>>3>>>0<=i>>>0){break i}h=i<<2;d=(i<<3)+d|0;x[h+x[a+612>>2]>>2]=x[x[d>>2]+504>>2];x[x[a+624>>2]+h>>2]=x[x[d>>2]+516>>2];i=i+1|0;if((fa|0)!=(i|0)){continue}break}}b=x[x[a+144>>2]>>2];c=x[b+520>>2]-x[b+516>>2]>>2;d=x[a+612>>2];g=1/C[a+128>>3];f=x[a+704>>2]==3&(ma|0)>(ja|0);i=x[x[a+640>>2]>>2];h=x[x[i>>2]+8>>2];b=x[a+624>>2]}if(!Ba|(G|0)==56){e=Ea[h|0](i,b,c,d,ca,g,f)|0;q=56;if((Ba|0)==1){break d}i=e}}b=Ba?b:v[a+12|0]&1;tb:{if(!Ba){if(b){b=i;break tb}d=x[a+676>>2];if(!d){b=i;break tb}h=x[a+688>>2];if(i+h>>>0<=d>>>0){b=i;break tb}if(x[a+112>>2]<=0){b=d-h|0;break tb}x[R+28>>2]=2204;C[R+16>>3]=h>>>0;g=+(d>>>0);C[R+8>>3]=g;d=x[a+104>>2];if(!d){break e}c=R+16|0;f=R+8|0;h=x[x[d>>2]+24>>2];b=R+28|0}if(!Ba|(G|0)==57){Ea[h|0](d,b,c,f);q=57;if((Ba|0)==1){break d}}if(!Ba){b=x[a+676>>2]-x[a+688>>2]|0;c=x[a+112>>2]<=0;if(c){break tb}x[R+28>>2]=4049;C[R+16>>3]=i|0;g=+(b>>>0);C[R+8>>3]=g;i=x[a+104>>2];if(!i){break e}d=R+16|0;f=R+8|0;h=x[x[i>>2]+24>>2];c=R+28|0}if(!Ba|(G|0)==58){Ea[h|0](i,c,d,f);q=58;if((Ba|0)==1){break d}}}if(!Ba){c=ma;d=(ja|0)<(c|0)}if((Ba|0)==2|d){c=Ba?c:x[a+704>>2]==3;ub:{if(!Ba){if(c){break ub}c=x[a+112>>2]<0;if(c){break ub}x[R+28>>2]=9366;g=+(ja|0);C[R+16>>3]=g;C[R+8>>3]=qa;i=x[a+104>>2];if(!i){break e}d=R+16|0;f=R+8|0;h=x[x[i>>2]+24>>2];c=R+28|0}if(!Ba|(G|0)==59){Ea[h|0](i,c,d,f);q=59;if((Ba|0)==1){break d}}}c=Ba?c:ja}if(!Ba){d=(fa|0)>0;i=0}if((Ba|0)==2|d){while(1){if(!Ba){d=x[a+144>>2];if(x[a+148>>2]-d>>3>>>0<=i>>>0){break i}d=(i<<3)+d|0;e=x[d>>2];f=x[e+532>>2];h=x[e+Aa>>2]}if(!Ba|(G|0)==60){e=jc(f,h,b);q=60;if((Ba|0)==1){break d}f=e}d=Ba?d:x[x[d>>2]+528>>2];if(!Ba|(G|0)==61){uc(d,c);q=61;if((Ba|0)==1){break d}}if(!Ba){i=i+1|0;d=(fa|0)!=(i|0);if(d){continue}}break}}if(!Ba){d=x[a+680>>2];x[a+680>>2]=c+d;c=x[a+688>>2];x[a+688>>2]=c+b;b=x[a+664>>2]>0}if((Ba|0)==2|b){if(!Ba){b=x[x[ra>>2]+532>>2];i=x[b+8>>2];c=x[b+12>>2];vb:{if((i|0)>(c|0)){e=i-c|0;break vb}e=0;if((c|0)<=(i|0)){break vb}e=x[b+16>>2]+(i-c|0)|0}c=e;d=x[a+664>>2];h=(c|0)<(d|0)?c:d;i=0;b=(fa|0)>0}if((Ba|0)==2|b){while(1){if(!Ba){d=x[a+144>>2];if(x[a+148>>2]-d>>3>>>0<=i>>>0){break i}b=x[x[(i<<3)+d>>2]+532>>2]}if(!Ba|(G|0)==62){uc(b,h);q=62;if((Ba|0)==1){break d}}if(!Ba){i=i+1|0;b=(fa|0)!=(i|0);if(b){continue}}break}d=Ba?d:x[a+664>>2]}if(!Ba){x[a+688>>2]=c-h;x[a+664>>2]=d-h}}if(!Ba){x[a+656>>2]=ca;x[a+652>>2]=ma;b=x[x[ra>>2]+532>>2];c=x[b+8>>2]^-1;d=c+x[b+12>>2]|0;i=x[b+16>>2];h=d+i|0;b=(((h|0)<(i|0)?h:d)|0)>=(ca|0);if(b){continue}}break}}if(!Ba){ya=R+32|0;return}}if(!Ba|(G|0)==63){Ec();q=63;if((Ba|0)==1){break d}}if(!Ba){p()}}if(!Ba){ac();p()}return}x[x[Ca>>2]>>2]=q;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=d;x[e+12>>2]=c;x[e+16>>2]=f;x[e+20>>2]=h;o(+g);a=j(1)|0;Da=e,Ga=j(0)|0,x[Da+24>>2]=Ga;x[e+28>>2]=a;x[e+32>>2]=k;x[e+36>>2]=m;x[e+40>>2]=i;x[e+44>>2]=u;x[e+48>>2]=s;o(+r);a=j(1)|0;Da=e,Ga=j(0)|0,x[Da+52>>2]=Ga;x[e+56>>2]=a;x[e+60>>2]=z;x[e+64>>2]=t;x[e+68>>2]=w;x[e+72>>2]=A;x[e+76>>2]=K;x[e+80>>2]=I;x[e+84>>2]=M;o(+H);a=j(1)|0;Da=e,Ga=j(0)|0,x[Da+88>>2]=Ga;x[e+92>>2]=a;x[e+96>>2]=N;x[e+100>>2]=Q;x[e+104>>2]=R;x[e+108>>2]=S;o(+U);a=j(1)|0;Da=e,Ga=j(0)|0,x[Da+112>>2]=Ga;x[e+116>>2]=a;x[e+120>>2]=V;x[e+124>>2]=W;x[e+128>>2]=X;x[e+132>>2]=aa;x[e+136>>2]=Y;x[e+140>>2]=ca;x[e+144>>2]=ba;o(+Z);a=j(1)|0;Da=e,Ga=j(0)|0,x[Da+148>>2]=Ga;x[e+152>>2]=a;x[e+156>>2]=da;x[e+160>>2]=fa;x[e+164>>2]=ea;x[e+168>>2]=ga;x[e+172>>2]=ma;x[e+176>>2]=ka;x[e+180>>2]=na;x[e+184>>2]=ja;x[e+188>>2]=la;o(+qa);a=j(1)|0;Da=e,Ga=j(0)|0,x[Da+192>>2]=Ga;x[e+196>>2]=a;x[e+200>>2]=ra;x[e+204>>2]=ua;x[e+208>>2]=va;x[e+212>>2]=xa;x[e+216>>2]=za;x[e+220>>2]=Aa;x[e+224>>2]=wa;x[Ca>>2]=x[Ca>>2]+228;return}a=nr(4);x[a>>2]=0;$(a|0,12860,0);p()}function sc(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0,w=0,z=0,F=0,H=0,I=0,J=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=E(0),V=0,W=E(0),X=0,Y=0,Z=0,_=E(0),$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-216;q=x[Ca>>2];a=x[q>>2];c=x[q+8>>2];d=x[q+12>>2];f=x[q+16>>2];e=x[q+20>>2];g=x[q+24>>2];h=x[q+28>>2];i=x[q+32>>2];k=x[q+36>>2];m=x[q+40>>2];r=x[q+44>>2];t=x[q+48>>2];u=x[q+52>>2];w=x[q+56>>2];H=x[q+60>>2];z=x[q+64>>2];J=x[q+68>>2];L=x[q+72>>2];O=x[q+80>>2];b=x[q+76>>2];l(0,b|0);l(1,O|0);F=+n();M=x[q+84>>2];P=x[q+88>>2];O=x[q+96>>2];b=x[q+92>>2];l(0,b|0);l(1,O|0);Q=+n();R=x[q+100>>2];S=x[q+104>>2];O=x[q+112>>2];b=x[q+108>>2];l(0,b|0);l(1,O|0);N=+n();O=x[q+116>>2];T=x[q+120>>2];U=B[q+124>>2];V=x[q+128>>2];Y=x[q+132>>2];W=B[q+136>>2];X=x[q+140>>2];Z=x[q+144>>2];s=x[q+152>>2];b=x[q+148>>2];l(0,b|0);l(1,s|0);$=+n();aa=x[q+156>>2];ba=x[q+160>>2];ca=x[q+164>>2];oa=x[q+168>>2];da=x[q+172>>2];ea=x[q+176>>2];fa=x[q+180>>2];ga=x[q+184>>2];ha=x[q+188>>2];ia=x[q+192>>2];ja=x[q+196>>2];ka=x[q+200>>2];la=x[q+204>>2];ma=x[q+208>>2];na=x[q+212>>2];b=x[q+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;I=x[x[Ca>>2]>>2]}if(!Ba){L=ya-32|0;ya=L;t=x[a+188>>2];c=y[a+52|0]}a:{b:{c:{d:{e:{if(!Ba){if(c){break e}c=x[a+48>>2];e=!c;if(e){break e}e=(c|0)==(t|0);if(e){break e}e=x[a+136>>2]<0;if(e){t=c;break e}x[L+28>>2]=4935;C[L>>3]=t>>>0;F=+(c>>>0);C[L+16>>3]=F;t=x[a+128>>2];if(!t){break d}e=L+16|0;d=x[x[t>>2]+24>>2];c=L+28|0}if(!Ba|!I){Ea[d|0](t,c,L,e);q=0;if((Ba|0)==1){break a}}t=Ba?t:x[a+48>>2]}if(!Ba){H=x[a+352>>2];F=C[a+8>>3];N=C[a+16>>3];$=F*N;w=ya+-64|0;ya=w;R=w+24|0;f=ya-112|0;ya=f;M=f+76|0;x[M+8>>2]=0;x[M>>2]=0;x[M+4>>2]=0;g=a+196|0;i=g;h=x[g>>2];u=x[g+4>>2];e=(h|0)!=(u|0);c=0}f:{g:{h:{if((Ba|0)==2|e){if(!Ba){e=u-h|0;d=e>>2}while(1){if(!Ba){U=E(1);if(k){U=E(2);_=E(B[((k<<2)+h|0)-4>>2]+E(0))}else{_=E(0)}W=B[(k<<2)+h>>2];_=E(_+W);k=k+1|0;if(k>>>0>>0){U=E(U+E(1));W=B[(k<<2)+h>>2];_=E(_+W)}U=E(_/U);e=(c|0)!=(P|0)}i:{if(!Ba){if(e){B[P>>2]=U;P=P+4|0;x[M+4>>2]=P;break i}d=c-b|0;e=d>>2;P=e+1|0;z=P>>>0>=1073741824;if(z){break h}z=e<<2;e=d>>1;J=e>>>0>P>>>0;e=J?e:P;d=d>>>0>=2147483644;P=d?1073741823:e}ca=Ba?ca:P;if(ca|(Ba|0)==2){if(!Ba){e=P>>>0>=1073741824;if(e){break g}e=P<<2}if(!Ba|(I|0)==1){s=dr(e);q=1;if((Ba|0)==1){break a}e=s}}e=!Ba&(!ca|(Ba|0)==2)?0:e;if(!Ba){d=e+z|0;B[d>>2]=U;e=(P<<2)+e|0;P=d+4|0;z=(b|0)!=(c|0);if(z){while(1){d=d-4|0;c=c-4|0;B[d>>2]=B[c>>2];z=(b|0)!=(c|0);if(z){continue}break}}x[M+8>>2]=e;x[M+4>>2]=P;x[M>>2]=d;if(b){zg(b);u=x[g+4>>2];h=x[g>>2]}b=d;c=e}}if(!Ba){d=u-h>>2;e=k>>>0>>0;if(e){continue}}break}}if(!Ba){break f}}if(!Ba|(I|0)==2){Xa();q=2;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){Ya();p()}}if(!Ba){h=f+68|0;x[f+64>>2]=h;x[f+68>>2]=0;x[f+72>>2]=0;M=f+56|0;x[f+52>>2]=M;x[f+56>>2]=0;x[f+60>>2]=0;b=!y[H+44|0]}j:{k:{l:{if(!Ba){if(b){break l}b=x[H+152>>2];c=x[H+8>>2];N=+(c>>>0)*20;F=K(+A[H+4>>2]/N);z=Lf(F);b=(b|0)>=2}if((Ba|0)==2|b){if(!Ba){x[f+8>>2]=1036;F=+(z>>>0);C[f+24>>3]=F;b=x[H+120>>2];c=!b;if(c){break k}e=f+24|0;d=x[x[b>>2]+24>>2];c=f+8|0}if(!Ba|(I|0)==3){Ea[d|0](b,c,e);q=3;if((Ba|0)==1){break a}}}if(!Ba){e=x[f+76>>2];b=x[f+80>>2]-e>>>0<9;if(b){break l}d=2;c=1}while(1){if(!Ba){b=c;c=d;d=b<<2;e=e+d|0;Q=+B[e>>2];k=Q<.1}m:{if(!Ba){if(k){break m}k=Q<.22;if(k){break m}F=+B[e-4>>2];N=F*1.1;k=N>=Q;if(k){break m}u=m+z>>>0>b>>>0;k=u?x[f+72>>2]:0;if(k){break m}k=Q>.4}n:{if((Ba|0)==2|k){if(!Ba){e=x[H+152>>2]<2;if(e){break n}x[f+104>>2]=6541;F=+(b>>>0);C[f+24>>3]=F;C[f+8>>3]=Q;e=x[H+144>>2];m=!e;if(m){break k}k=f+24|0;u=f+8|0;J=x[x[e>>2]+24>>2];m=f+104|0}if(!Ba|(I|0)==4){Ea[J|0](e,m,k,u);q=4;if((Ba|0)==1){break a}}if(!Ba){break n}}if(!Ba){N=F*1.4;k=N>2]<2;if(e){break n}x[f+104>>2]=6584;F=+(b>>>0);C[f+24>>3]=F;C[f+8>>3]=Q;e=x[H+144>>2];m=!e;if(m){break k}k=f+24|0;u=f+8|0;J=x[x[e>>2]+24>>2];m=f+104|0}if(!Ba|(I|0)==5){Ea[J|0](e,m,k,u);q=5;if((Ba|0)==1){break a}}if(!Ba){break n}}if(!Ba){k=b>>>0<2;if(k){break m}N=F*1.2;k=!(N>2]*1.2;k=!(N>2]<2;if(e){break n}x[f+104>>2]=6628;F=+(b>>>0);C[f+24>>3]=F;C[f+8>>3]=Q;e=x[H+144>>2];m=!e;if(m){break k}k=f+24|0;u=f+8|0;J=x[x[e>>2]+24>>2];m=f+104|0}if(!Ba|(I|0)==6){Ea[J|0](e,m,k,u);q=6;if((Ba|0)==1){break a}}if(!Ba){break n}}if(!Ba){k=b>>>0<3;if(k){break m}k=!(Q>.3);if(k){break m}N=F;F=+B[e-8>>2];k=!(N>F*1.1);if(k){break m}N=+B[e-12>>2]*1.1;e=!(N>2]<2;if(e){break n}x[f+104>>2]=6670;F=+(b>>>0);C[f+24>>3]=F;C[f+8>>3]=Q;e=x[H+144>>2];m=!e;if(m){break k}k=f+24|0;u=f+8|0;J=x[x[e>>2]+24>>2];m=f+104|0}if(!Ba|(I|0)==7){Ea[J|0](e,m,k,u);q=7;if((Ba|0)==1){break a}}}if(!Ba){e=x[i>>2];m=x[i+4>>2]-e>>2>>>0<=c>>>0}p:{if(!Ba){if(m){break p}m=(c<<2)+e|0;F=+B[m>>2];N=+B[d+e>>2]*1.4;e=!(F>N);if(e){break p}b=c;e=x[H+152>>2]<2;if(e){break p}x[f+8>>2]=4005;F=+(b>>>0);C[f+24>>3]=F;b=x[H+120>>2];e=!b;if(e){break k}m=x[x[b>>2]+24>>2];e=f+8|0;d=f+24|0}if(!Ba|(I|0)==8){Ea[m|0](b,e,d);q=8;if((Ba|0)==1){break a}}b=Ba?b:c}if(!Ba){d=x[f+68>>2];k=!d;e=h;m=e}q:{if(!Ba){r:{if(k){break r}while(1){e=d;s=x[d+16>>2];m=s>>>0>b>>>0;if(m){m=d;d=x[d>>2];if(d){continue}break r}d=b>>>0<=s>>>0;if(d){break q}d=x[e+4>>2];if(d){continue}break}m=e+4|0}}if(!Ba|(I|0)==9){s=dr(20);q=9;if((Ba|0)==1){break a}d=s}if(!Ba){x[d+8>>2]=e;x[d>>2]=0;x[d+4>>2]=0;x[d+16>>2]=b;x[m>>2]=d;e=x[x[f+64>>2]>>2];if(e){x[f+64>>2]=e;d=x[m>>2]}ec(x[f+68>>2],d);e=x[f+72>>2]+1|0;x[f+72>>2]=e}}m=Ba?m:b}if(!Ba){d=c+1|0;e=x[f+76>>2];b=d>>>0>2]-e>>2>>>0;if(b){continue}}break}}if(!Ba){b=x[H+152>>2];c=x[H+8>>2];N=+(c>>>0);F=K(+A[H+4>>2]/N);V=Lf(F);b=(b|0)>=2}if((Ba|0)==2|b){if(!Ba){x[f+8>>2]=6747;F=+(V>>>0);C[f+24>>3]=F;b=x[H+120>>2];c=!b;if(c){break k}e=f+24|0;d=x[x[b>>2]+24>>2];c=f+8|0}if(!Ba|(I|0)==10){Ea[d|0](b,c,e);q=10;if((Ba|0)==1){break a}}}b=Ba?b:V>>>0>6;s:{if(!Ba){if(b){break s}V=7;b=x[H+152>>2]<2;if(b){break s}x[f+8>>2]=6738;x[f+24>>2]=0;x[f+28>>2]=1075576832;b=x[H+120>>2];c=!b;if(c){break k}e=f+24|0;d=x[x[b>>2]+24>>2];c=f+8|0}if(!Ba|(I|0)==11){Ea[d|0](b,c,e);q=11;if((Ba|0)==1){break a}}}if(!Ba){b=x[H+4>>2];c=x[H+8>>2];x[f+40>>2]=0;x[f+44>>2]=0;x[f+32>>2]=0;x[f+36>>2]=0;x[f+24>>2]=0;x[f+28>>2]=0;x[f+16>>2]=0;x[f+8>>2]=0;x[f+12>>2]=0;k=V>>>1|0;N=+(c>>>0)*20;F=K(+(b>>>0)/N);oa=Lf(F);m=0;e=0;i=0;b=0;c=0}while(1){if(!Ba){d=b+m|0;u=(c|0)!=(e|0);h=(d|0)==((u?(c-e<<8)-1|0:0)|0)}if((Ba|0)==2|h){b=Ba?b:f+24|0;if(!Ba|(I|0)==12){fc(b);q=12;if((Ba|0)==1){break a}}if(!Ba){b=x[f+44>>2];m=x[f+40>>2];d=b+m|0;e=x[f+28>>2];c=x[f+32>>2]}}if(!Ba){h=x[(d>>>8&16777212)+e>>2];x[h+((d&1023)<<2)>>2]=0;b=b+1|0;x[f+44>>2]=b;i=i+1|0;d=(k|0)!=(i|0);if(d){continue}}break}if(!Ba){z=k>>>0<=1?1:k;d=0}while(1){if(!Ba){i=x[f+76>>2];h=x[f+80>>2]-i>>2>>>0>d>>>0}if((Ba|0)==2|h){if(!Ba){h=(d<<2)+i|0;i=b+m|0;J=(c|0)!=(e|0);u=(i|0)==((J?(c-e<<8)-1|0:0)|0)}if((Ba|0)==2|u){b=Ba?b:f+24|0;if(!Ba|(I|0)==13){fc(b);q=13;if((Ba|0)==1){break a}}if(!Ba){e=x[f+28>>2];b=x[f+44>>2];m=x[f+40>>2];i=b+m|0;c=x[f+32>>2]}}if(!Ba){u=x[(i>>>8&16777212)+e>>2];i=u+((i&1023)<<2)|0;B[i>>2]=B[h>>2];b=b+1|0;x[f+44>>2]=b;d=d+1|0;h=(z|0)!=(d|0);if(h){continue}}}break}if(!Ba){d=x[f+80>>2];i=x[f+76>>2];h=(d|0)!=(i|0)}t:{u:{v:{if((Ba|0)==2|h){d=Ba?d:d-i>>2;while(1){if(!Ba){P=b>>>0>>0;h=P?b:V;u=b>>>0>k>>>0?k:h-1|0;J=(h+X|0)-u|0;z=h>>>0<=1}s=(Ba|0)==2;w:{if(s|z){d=Ba?d:d>>>0>J>>>0;if(s|d){if(!Ba){i=(J<<2)+i|0;d=b+m|0;u=(c|0)!=(e|0);h=(d|0)==((u?(c-e<<8)-1|0:0)|0)}if((Ba|0)==2|h){b=Ba?b:f+24|0;if(!Ba|(I|0)==14){fc(b);q=14;if((Ba|0)==1){break a}}if(!Ba){b=x[f+44>>2];m=x[f+40>>2];d=b+m|0;e=x[f+28>>2];c=x[f+32>>2]}}if(!Ba){h=x[(d>>>8&16777212)+e>>2];d=h+((d&1023)<<2)|0;B[d>>2]=B[i>>2];break w}}if(!Ba){d=b+m|0;i=(c|0)!=(e|0);h=(d|0)==((i?(c-e<<8)-1|0:0)|0)}if((Ba|0)==2|h){b=Ba?b:f+24|0;if(!Ba|(I|0)==15){fc(b);q=15;if((Ba|0)==1){break a}}if(!Ba){b=x[f+44>>2];m=x[f+40>>2];d=b+m|0;e=x[f+28>>2];c=x[f+32>>2]}}if(!Ba){h=x[(d>>>8&16777212)+e>>2];d=h+((d&1023)<<2)|0;x[d>>2]=0;break w}}if(!Ba){d=x[f+8>>2];x[f+12>>2]=d;m=0;b=x[f+16>>2]}while(1){if(!Ba){c=x[f+40>>2]+m|0;e=(c&1023)<<2;i=e+x[x[f+28>>2]+(c>>>8&16777212)>>2]|0;c=(b|0)!=(d|0)}x:{if(!Ba){if(c){B[d>>2]=B[i>>2];d=d+4|0;x[f+12>>2]=d;break x}c=x[f+8>>2];e=b-c|0;aa=e>>2;d=aa+1|0;z=d>>>0>=1073741824;if(z){break t}z=e>>1;e=e>>>0>=2147483644;d=e?1073741823:d>>>0>>0?z:d}da=Ba?da:d;if(da|(Ba|0)==2){if(!Ba){e=d>>>0>=1073741824;if(e){break v}e=d<<2}if(!Ba|(I|0)==16){s=dr(e);q=16;if((Ba|0)==1){break a}z=s}}z=!Ba&(!da|(Ba|0)==2)?0:z;if(!Ba){e=(aa<<2)+z|0;B[e>>2]=B[i>>2];i=(d<<2)+z|0;d=e+4|0;z=(b|0)!=(c|0);if(z){while(1){e=e-4|0;b=b-4|0;B[e>>2]=B[b>>2];z=(b|0)!=(c|0);if(z){continue}break}}x[f+16>>2]=i;x[f+12>>2]=d;x[f+8>>2]=e;if(c){zg(c)}b=i}}if(!Ba){m=m+1|0;c=(m|0)!=(h|0);if(c){continue}}break}if(!Ba){c=x[f+8>>2];b=d-c>>2;Ig(c,d,31-(b?G(b):32)<<1,1);e=x[f+28>>2];d=x[f+40>>2];c=u+d|0;W=B[x[e+(c>>>8&16777212)>>2]+((c&1023)<<2)>>2];b=x[f+8>>2];z=b;i=x[f+12>>2]-b>>2;m=(D(i,90)>>>0)/100|0;b=i-1|0;s=i>>>0>m>>>0?m:b;m=z+(s<<2)|0;i=(b|0)==(s|0);b=!(W>B[m-((i&(s|0)!=0)<<2)>>2])}y:{z:{if(!Ba){if(b){break z}b=c-1|0;c=x[(b>>>8&16777212)+e>>2];b=!(B[c+((b&1023)<<2)>>2]>>8&16777212)+e>>2];c=!(B[m+((c&1023)<<2)>>2]>>0>=h>>>0){break A}while(1){c=b+d|0;i=x[(c>>>8&16777212)+e>>2];U=B[i+((c&1023)<<2)>>2];B:{if(_>2]}C:{if(!Ba){D:{if(c){break D}c=(b|0)!=(r|0);if(c){break D}b=r;break C}c=x[H+152>>2]>=2}if((Ba|0)==2|c){if(!Ba){x[f+100>>2]=6510;C[f+104>>3]=b>>>0;F=+W;C[f+88>>3]=F;e=x[H+144>>2];c=!e;if(c){break k}d=f+104|0;h=f+88|0;i=x[x[e>>2]+24>>2];c=f+100|0}if(!Ba|(I|0)==17){Ea[i|0](e,c,d,h);q=17;if((Ba|0)==1){break a}}}if(!Ba){e=x[f+76>>2];c=x[f+80>>2]-e>>2>>>0<=b>>>0}if((Ba|0)==2|c){if(!Ba){if(x[H+152>>2]<=1){b=oa-u|0;S=m+b|0;break y}x[f+104>>2]=8784;b=x[H+96>>2];c=!b;if(c){break k}e=x[x[b>>2]+24>>2];c=f+104|0}if(!Ba|(I|0)==18){Ea[e|0](b,c);q=18;if((Ba|0)==1){break a}}if(!Ba){b=r;break C}}if(!Ba){d=M;e=d;c=x[f+56>>2];r=!c;E:{if(r){break E}while(1){e=c;s=x[c+16>>2];d=s>>>0>b>>>0;if(d){d=c;c=x[c>>2];if(c){continue}break E}c=b>>>0<=s>>>0;if(c){break C}c=x[e+4>>2];if(c){continue}break}d=e+4|0}}if(!Ba|(I|0)==19){s=dr(20);q=19;if((Ba|0)==1){break a}c=s}if(!Ba){x[c+8>>2]=e;x[c>>2]=0;x[c+4>>2]=0;x[c+16>>2]=b;x[d>>2]=c;e=x[x[f+52>>2]>>2];if(e){x[f+52>>2]=e;c=x[d>>2]}e=x[f+56>>2];ec(e,c);c=x[f+60>>2]+1|0;x[f+60>>2]=c}}if(!Ba){S=(oa-u|0)+m|0;c=x[H+152>>2]<3;if(c){r=b;break y}x[f+88>>2]=1028;F=+(S|0);C[f+104>>3]=F;e=x[H+120>>2];c=!e;if(c){break k}d=f+104|0;m=x[x[e>>2]+24>>2];c=f+88|0}if(!Ba|(I|0)==20){Ea[m|0](e,c,d);q=20;if((Ba|0)==1){break a}}if(!Ba){r=b;break y}}if(!Ba){b=(S|0)>0;S=S-b|0}}if(!Ba){F:{if(P){break F}x[f+44>>2]=x[f+44>>2]-1;c=x[f+40>>2]+1|0;x[f+40>>2]=c;if(c>>>0<2048){break F}zg(x[x[f+28>>2]>>2]);x[f+28>>2]=x[f+28>>2]+4;x[f+40>>2]=x[f+40>>2]-1024}b=x[f+76>>2];c=x[f+80>>2]-b>>2>>>0>J>>>0}if((Ba|0)==2|c){if(!Ba){i=(J<<2)+b|0;c=x[f+32>>2];e=x[f+28>>2];u=(c|0)!=(e|0);b=x[f+44>>2];m=x[f+40>>2];d=b+m|0;h=(d|0)==((u?(c-e<<8)-1|0:0)|0)}if((Ba|0)==2|h){b=Ba?b:f+24|0;if(!Ba|(I|0)==21){fc(b);q=21;if((Ba|0)==1){break a}}if(!Ba){b=x[f+44>>2];m=x[f+40>>2];d=b+m|0;e=x[f+28>>2];c=x[f+32>>2]}}if(!Ba){h=x[(d>>>8&16777212)+e>>2];d=h+((d&1023)<<2)|0;B[d>>2]=B[i>>2];break w}}if(!Ba){c=x[f+32>>2];e=x[f+28>>2];i=(c|0)!=(e|0);b=x[f+44>>2];m=x[f+40>>2];d=b+m|0;h=(d|0)==((i?(c-e<<8)-1|0:0)|0)}if((Ba|0)==2|h){b=Ba?b:f+24|0;if(!Ba|(I|0)==22){fc(b);q=22;if((Ba|0)==1){break a}}if(!Ba){b=x[f+44>>2];m=x[f+40>>2];d=b+m|0;e=x[f+28>>2];c=x[f+32>>2]}}if(!Ba){h=x[(d>>>8&16777212)+e>>2];d=h+((d&1023)<<2)|0;x[d>>2]=0}}if(!Ba){b=b+1|0;x[f+44>>2]=b;i=x[f+76>>2];d=x[f+80>>2]-i>>2;X=X+1|0;h=d>>>0>X>>>0;if(h){continue}}break}}if(!Ba){x[R+8>>2]=0;x[R>>2]=0;x[R+4>>2]=0;J=0;b=0}while(1){k=Ba?k:b;while(1){if(!Ba){X=k-8|0;aa=k-4|0;z=(k|0)==(J|0)}while(1){if(!Ba){h=x[f+60>>2];b=!x[f+72>>2]}G:{H:{I:{if(!Ba){if(b){b=!h;if(b){break I}b=x[f+52>>2];d=x[b+16>>2];break H}i=x[f+64>>2];m=x[i+16>>2];J:{if(!h){d=0;break J}d=x[x[f+52>>2]+16>>2];b=m>>>0>d>>>0;if(b){break H}}b=x[H+152>>2]>=3}if((Ba|0)==2|b){if(!Ba){x[f+88>>2]=6222;F=+(m>>>0);C[f+104>>3]=F;b=x[H+120>>2];c=!b;if(c){break k}e=f+104|0;r=x[x[b>>2]+24>>2];c=f+88|0}if(!Ba|(I|0)==23){Ea[r|0](b,c,e);q=23;if((Ba|0)==1){break a}}if(!Ba){i=x[f+64>>2]}}if(!Ba){c=i;e=x[c+4>>2];K:{if(e){while(1){b=e;e=x[b>>2];if(e){continue}break}break K}while(1){b=x[c+8>>2];e=x[b>>2]!=(c|0);c=b;if(e){continue}break}}e=!h;x[f+64>>2]=b;x[f+72>>2]=x[f+72>>2]-1;b=x[f+68>>2];gc(b,i);zg(i);i=0;O=0;T=1;break G}}if(!Ba){c=x[f+8>>2];if(c){zg(c)}x[f+44>>2]=0;e=x[f+32>>2];b=x[f+28>>2];c=e-b>>2;if(c>>>0>=3){while(1){zg(x[b>>2]);b=x[f+28>>2]+4|0;x[f+28>>2]=b;e=x[f+32>>2];c=e-b>>2;if(c>>>0>2){continue}break}}d=512;L:{switch(c-1|0){case 1:d=1024;case 0:x[f+40>>2]=d;break;default:break L}}M:{if((b|0)==(e|0)){break M}while(1){zg(x[b>>2]);b=b+4|0;if((e|0)!=(b|0)){continue}break}e=x[f+28>>2];c=x[f+32>>2];if((e|0)==(c|0)){break M}x[f+32>>2]=c+((e-c|0)+3&-4)}c=x[f+24>>2];if(c){zg(c)}hc(f+52|0,x[f+56>>2]);c=x[f+68>>2];hc(f- -64|0,c);b=x[f+76>>2];if(b){x[f+80>>2]=b;zg(b)}b=f+112|0;ya=b;break j}}b=Ba?b:x[H+152>>2]>=3;if(b|(Ba|0)==2){if(!Ba){x[f+88>>2]=6185;F=+(d>>>0);C[f+104>>3]=F;b=x[H+120>>2];c=!b;if(c){break k}e=f+104|0;m=x[x[b>>2]+24>>2];c=f+88|0}if(!Ba|(I|0)==24){Ea[m|0](b,c,e);q=24;if((Ba|0)==1){break a}}}if(!Ba){O=0;T=0;e=0}N:{if(!Ba){if(z){break N}b=!y[aa|0];if(b){break N}b=x[X>>2]+3>>>0>>0;if(b){break N}i=1;b=x[H+152>>2]>=3}if((Ba|0)==2|b){if(!Ba){x[f+104>>2]=6195;b=x[H+96>>2];c=!b;if(c){break k}m=x[x[b>>2]+24>>2];c=f+104|0}if(!Ba|(I|0)==25){Ea[m|0](b,c);q=25;if((Ba|0)==1){break a}}}if(!Ba){m=d;break G}}if(!Ba){i=0;m=d}}if(!Ba){O:{if(e){break O}b=(d|0)!=(m|0);if(b){break O}d=x[f+52>>2];c=d;e=x[c+4>>2];P:{if(e){while(1){b=e;e=x[b>>2];if(e){continue}break}break P}while(1){b=x[c+8>>2];e=x[b>>2]!=(c|0);c=b;if(e){continue}break}}x[f+52>>2]=b;x[f+60>>2]=x[f+60>>2]-1;b=x[f+56>>2];gc(b,d);zg(d)}if(i){continue}}break}if(!Ba){b=x[R+8>>2]!=(k|0);if(b){O=m|O;x[k>>2]=O;x[k+4>>2]=T;k=k+8|0;x[R+4>>2]=k;continue}}break}if(!Ba){e=x[R>>2];b=k-e|0;d=b>>3;c=d+1|0;r=c>>>0>=536870912;if(r){break u}i=b>>2;r=i>>>0>c>>>0;c=r?i:c;b=b>>>0>=2147483640?536870911:c}ea=Ba?ea:b;if(ea|(Ba|0)==2){if(!Ba){c=b>>>0>=536870912;if(c){break v}c=b<<3}if(!Ba|(I|0)==26){s=dr(c);q=26;if((Ba|0)==1){break a}c=s}}c=!Ba&(!ea|(Ba|0)==2)?0:c;if(!Ba){J=(d<<3)+c|0;d=J;O=m|O;x[d>>2]=O;x[d+4>>2]=T;s=(b<<3)+c|0;b=d+8|0;d=(e|0)!=(k|0);if(d){while(1){k=k-8|0;O=x[k>>2];d=x[k+4>>2];T=d;J=J-8|0;c=J;x[c>>2]=O;x[c+4>>2]=d;d=(e|0)!=(k|0);if(d){continue}break}k=x[R>>2]}x[R+8>>2]=s;x[R+4>>2]=b;x[R>>2]=J;c=!k;if(c){continue}zg(k);continue}break}}if(!Ba){Ya();p()}}if(!Ba|(I|0)==27){Xa();q=27;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba|(I|0)==28){Xa();q=28;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){ac();p()}}if(!Ba){c=x[H+172>>2];if(c){x[H+176>>2]=c;zg(c)}x[H+172>>2]=x[w+24>>2];x[H+176>>2]=x[w+28>>2];x[H+180>>2]=x[w+32>>2];Q=+(t>>>0);c=x[g>>2];e=x[g+4>>2]-c>>2;d=e;t=x[H+152>>2];b=(t|0)>0}Q:{R:{if((Ba|0)==2|b){if(!Ba){x[w+48>>2]=4597;C[w+24>>3]=Q;C[w+8>>3]=$;d=x[H+144>>2];b=!d;if(b){break R}m=w+8|0;r=x[x[d>>2]+24>>2];b=w+48|0;c=w+24|0}if(!Ba|(I|0)==29){Ea[r|0](d,b,c,m);q=29;if((Ba|0)==1){break a}}if(!Ba){t=x[H+152>>2];c=x[g>>2];b=x[g+4>>2]-c|0;d=b>>2}}if(!Ba){F=+(D(x[H+8>>2],d)>>>0)*$;m=Lf(F);b=(t|0)<=0}S:{if(!Ba){if(b){break S}x[w+48>>2]=4387;C[w+24>>3]=Q*$;F=+(m>>>0);C[w+8>>3]=F;d=x[H+144>>2];b=!d;if(b){break R}r=w+8|0;t=x[x[d>>2]+24>>2];b=w+48|0;c=w+24|0}if(!Ba|(I|0)==30){Ea[t|0](d,b,c,r);q=30;if((Ba|0)==1){break a}}if(!Ba){b=x[H+152>>2]<=0;if(b){break S}d=x[H+8>>2];t=x[g>>2];b=x[g+4>>2];x[w+48>>2]=1967;C[w+24>>3]=b-t>>2>>>0;F=+(d>>>0);C[w+8>>3]=F;g=x[H+144>>2];b=!g;if(b){break R}d=w+8|0;r=x[x[g>>2]+24>>2];b=w+48|0;c=w+24|0}if(!Ba|(I|0)==31){Ea[r|0](g,b,c,d);q=31;if((Ba|0)==1){break a}}}if(!Ba){x[w+32>>2]=0;x[w+24>>2]=0;x[w+28>>2]=0;x[w+16>>2]=0;x[w+8>>2]=0;x[w+12>>2]=0;u=w+24|0;M=w+8|0;S=0;f=ya-32|0;ya=f;d=H;b=!x[d+168>>2]}s=(Ba|0)==2;T:{U:{V:{W:{X:{Y:{if(s|b){b=Ba?b:(d+172|0)!=(u|0);if(s|b){Z:{if(!Ba){c=x[d+176>>2];t=x[d+172>>2];r=t;i=c-t>>3;g=u;d=x[g+8>>2];h=x[g>>2];b=i>>>0<=d-h>>3>>>0}_:{$:{if(!Ba){if(b){d=g+4|0;b=x[g+4>>2];t=b-h|0;g=t>>3;if(i>>>0>g>>>0){g=(g<<3)+r|0;if((b|0)!=(h|0)){mf(h,r,t);h=x[d>>2]}i=c-g|0;b=(c|0)==(g|0);if(b){break $}b=mf(h,g,i);break $}i=c-r|0;b=(c|0)==(r|0);if(b){break $}b=mf(h,r,i);break $}if(h){x[g+4>>2]=h;zg(h);x[g+8>>2]=0;x[g>>2]=0;x[g+4>>2]=0;d=0}b=i>>>0>=536870912;if(b){break _}b=d>>2;d=d>>>0>=2147483640;h=d?536870911:b>>>0>i>>>0?b:i;b=h>>>0>=536870912;if(b){break _}i=h<<3}if(!Ba|(I|0)==32){s=dr(i);q=32;if((Ba|0)==1){break a}h=s}if(!Ba){x[g+4>>2]=h;x[g>>2]=h;x[g+8>>2]=h+i;i=c-r|0;d=g+4|0;b=(c|0)==(r|0);if(b){break $}b=lf(h,r,i)}}if(!Ba){b=h+i|0;x[d>>2]=b;break Z}}if(!Ba|(I|0)==33){Xa();q=33;if((Ba|0)==1){break a}}if(!Ba){p()}}}if(!Ba){g=x[u>>2];b=(g|0)==x[u+4>>2];if(b){break Y}Q=+(e>>>0);F=+(m>>>0);d=0}while(1){if(!Ba){c=x[M+8>>2];t=x[M+4>>2];N=F*+A[(d<<3)+g>>2]/Q;S=Lf(N);b=c>>>0>t>>>0}aa:{if(!Ba){if(b){x[t>>2]=S;b=t+4|0;x[M+4>>2]=b;break aa}g=x[M>>2];R=t-g>>2;J=R+1|0;b=J>>>0>=1073741824;if(b){break X}s=c-g|0;c=s>>1;r=c>>>0>J>>>0;b=r?c:J;c=s>>>0>=2147483644;J=c?1073741823:b}fa=Ba?fa:J;if(fa|(Ba|0)==2){if(!Ba){b=J>>>0>=1073741824;if(b){break W}b=J<<2}if(!Ba|(I|0)==34){s=dr(b);q=34;if((Ba|0)==1){break a}b=s}}b=!Ba&(!fa|(Ba|0)==2)?0:b;if(!Ba){c=(R<<2)+b|0;x[c>>2]=S;r=J<<2;S=r+b|0;J=c+4|0;if((g|0)!=(t|0)){while(1){c=c-4|0;t=t-4|0;x[c>>2]=x[t>>2];if((g|0)!=(t|0)){continue}break}}x[M+8>>2]=S;x[M+4>>2]=J;x[M>>2]=c;b=!g;if(b){break aa}zg(g)}}if(!Ba){d=d+1|0;g=x[u>>2];b=d>>>0>2]-g>>3>>>0;if(b){continue}}break}if(!Ba){break Y}}if(!Ba){t=x[d+160>>2];V=d+164|0;b=(t|0)==(V|0);if(b){break Y}}while(1){if(!Ba){b=t;k=x[d+8>>2];J=A[b+16>>2]/(k>>>0)|0;g=b;c=x[b+4>>2];ba:{if(c){while(1){t=c;c=x[c>>2];if(c){continue}break}break ba}while(1){t=x[g+8>>2];c=x[t>>2]!=(g|0);g=t;if(c){continue}break}}R=x[b+20>>2];r=m;i=e;if((t|0)!=(V|0)){r=x[t+20>>2];i=A[t+16>>2]/(k>>>0)|0}b=e>>>0<=J>>>0}ca:{da:{if(!Ba){if(!(i>>>0<=J>>>0|b|m>>>0<=R>>>0)){b=r>>>0>R>>>0;if(b){break da}}b=x[d+152>>2]<0;if(b){break ca}x[f+28>>2]=7702;C[f+16>>3]=J>>>0;F=+(R>>>0);C[f+8>>3]=F;c=x[d+144>>2];b=!c;if(b){break V}r=f+16|0;h=f+8|0;g=x[x[c>>2]+24>>2];b=f+28|0}if(!Ba|(I|0)==35){Ea[g|0](c,b,r,h);q=35;if((Ba|0)==1){break a}}if(!Ba){b=x[d+152>>2]<0;if(b){break ca}x[f+16>>2]=10502;c=x[d+96>>2];b=!c;if(b){break V}r=x[x[c>>2]+24>>2];b=f+16|0}if(!Ba|(I|0)==36){Ea[r|0](c,b);q=36;if((Ba|0)==1){break a}}if(!Ba){break ca}}if(!Ba){c=x[u+4>>2];b=(c|0)!=x[u+8>>2]}ea:{if(!Ba){if(b){O=J;T=0;x[c>>2]=J;x[c+4>>2]=0;b=c+8|0;x[u+4>>2]=b;break ea}b=x[u>>2];g=c-b|0;z=g>>3;k=z+1|0;h=k>>>0>=536870912;if(h){break U}h=g>>2;P=h>>>0>k>>>0;h=P?h:k;g=g>>>0>=2147483640;k=g?536870911:h}ga=Ba?ga:k;if(ga|(Ba|0)==2){if(!Ba){h=k>>>0>=536870912;if(h){break W}h=k<<3}if(!Ba|(I|0)==37){s=dr(h);q=37;if((Ba|0)==1){break a}h=s}}h=!Ba&(!ga|(Ba|0)==2)?0:h;if(!Ba){O=J;T=0;g=(z<<3)+h|0;x[g>>2]=J;x[g+4>>2]=0;k=(k<<3)+h|0;h=g+8|0;z=(b|0)!=(c|0);if(z){while(1){c=c-8|0;O=x[c>>2];T=x[c+4>>2];g=g-8|0;x[g>>2]=O;x[g+4>>2]=T;z=(b|0)!=(c|0);if(z){continue}break}c=x[u>>2]}x[u+8>>2]=k;x[u+4>>2]=h;x[u>>2]=g;b=!c;if(b){break ea}zg(c)}}if(!Ba){c=x[M+4>>2];b=(c|0)!=x[M+8>>2]}fa:{if(!Ba){if(b){x[c>>2]=R;b=c+4|0;x[M+4>>2]=b;break fa}b=x[M>>2];g=c-b|0;z=g>>2;k=z+1|0;h=k>>>0>=1073741824;if(h){break X}h=g>>1;P=h>>>0>k>>>0;h=P?h:k;g=g>>>0>=2147483644;k=g?1073741823:h}ha=Ba?ha:k;if(ha|(Ba|0)==2){if(!Ba){h=k>>>0>=1073741824;if(h){break W}h=k<<2}if(!Ba|(I|0)==38){s=dr(h);q=38;if((Ba|0)==1){break a}h=s}}h=!Ba&(!ha|(Ba|0)==2)?0:h;if(!Ba){g=(z<<2)+h|0;x[g>>2]=R;k=(k<<2)+h|0;h=g+4|0;z=(b|0)!=(c|0);if(z){while(1){g=g-4|0;c=c-4|0;x[g>>2]=x[c>>2];z=(b|0)!=(c|0);if(z){continue}break}}x[M+8>>2]=k;x[M+4>>2]=h;x[M>>2]=g;c=!b;if(c){break fa}zg(b)}}b=Ba?b:x[d+152>>2]>=2;if(b|(Ba|0)==2){if(!Ba){x[f+28>>2]=7648;C[f+16>>3]=J>>>0;F=+(R>>>0);C[f+8>>3]=F;c=x[d+144>>2];b=!c;if(b){break V}h=f+16|0;g=f+8|0;k=x[x[c>>2]+24>>2];b=f+28|0}if(!Ba|(I|0)==39){Ea[k|0](c,b,h,g);q=39;if((Ba|0)==1){break a}}}if(!Ba){c=x[d+172>>2];b=x[d+176>>2]-c>>3>>>0<=S>>>0;if(b){break ca}Q=+(r-R>>>0);b=i-J|0;F=+(b>>>0)}while(1){if(!Ba){c=(S<<3)+c|0;g=x[c>>2];b=J>>>0>g>>>0}ga:{if(!Ba){if(b){break ga}if((g|0)==(J|0)){b=x[u+4>>2]-4|0;v[b|0]=1;break ga}b=g>>>0>=i>>>0;if(b){break ca}r=x[d+8>>2];b=r+x[x[M+4>>2]-4>>2]|0;N=+(g-J>>>0)/F*Q;h=Lf(N);k=R+h|0;b=b>>>0>=k>>>0;if(b){break ga}O=y[c+4|0];T=0;b=x[d+152>>2]>=2}if((Ba|0)==2|b){if(!Ba){x[f+28>>2]=7621;C[f+16>>3]=g>>>0;N=+(k>>>0);C[f+8>>3]=N;c=x[d+144>>2];b=!c;if(b){break V}r=f+16|0;h=f+8|0;z=x[x[c>>2]+24>>2];b=f+28|0}if(!Ba|(I|0)==40){Ea[z|0](c,b,r,h);q=40;if((Ba|0)==1){break a}}}if(!Ba){c=x[u+4>>2];b=(c|0)!=x[u+8>>2]}ha:{if(!Ba){if(b){T=O;O=g;x[c>>2]=g;x[c+4>>2]=T;b=c+8|0;x[u+4>>2]=b;break ha}r=x[u>>2];b=c-r|0;z=b>>3;h=z+1|0;if(h>>>0>=536870912){break U}P=z<<3;z=b>>2;X=z>>>0>h>>>0;b=b>>>0>=2147483640;h=b?536870911:X?z:h}ia=Ba?ia:h;if(ia|(Ba|0)==2){if(!Ba){b=h>>>0>=536870912;if(b){break W}b=h<<3}if(!Ba|(I|0)==41){s=dr(b);q=41;if((Ba|0)==1){break a}z=s}}z=!Ba&(!ia|(Ba|0)==2)?0:z;if(!Ba){T=O;b=z+P|0;O=g;x[b>>2]=g;x[b+4>>2]=T;g=(h<<3)+z|0;h=b+8|0;z=(c|0)!=(r|0);if(z){while(1){c=c-8|0;O=x[c>>2];T=x[c+4>>2];b=b-8|0;x[b>>2]=O;x[b+4>>2]=T;z=(c|0)!=(r|0);if(z){continue}break}c=x[u>>2]}x[u+8>>2]=g;x[u+4>>2]=h;x[u>>2]=b;b=!c;if(b){break ha}zg(c)}}if(!Ba){c=x[M+4>>2];if((c|0)!=x[M+8>>2]){x[c>>2]=k;b=c+4|0;x[M+4>>2]=b;break ga}b=x[M>>2];g=c-b|0;z=g>>2;r=z+1|0;h=r>>>0>=1073741824;if(h){break X}h=g>>1;P=h>>>0>r>>>0;s=P?h:r;h=g>>>0>=2147483644;r=h?1073741823:s}ja=Ba?ja:r;if(ja|(Ba|0)==2){if(!Ba){h=r>>>0>=1073741824;if(h){break W}h=r<<2}if(!Ba|(I|0)==42){s=dr(h);q=42;if((Ba|0)==1){break a}h=s}}h=!Ba&(!ja|(Ba|0)==2)?0:h;if(!Ba){g=(z<<2)+h|0;x[g>>2]=k;r=(r<<2)+h|0;k=g+4|0;h=(b|0)!=(c|0);if(h){while(1){g=g-4|0;c=c-4|0;x[g>>2]=x[c>>2];h=(b|0)!=(c|0);if(h){continue}break}}x[M+8>>2]=r;x[M+4>>2]=k;x[M>>2]=g;c=!b;if(c){break ga}zg(b)}}if(!Ba){S=S+1|0;c=x[d+172>>2];b=S>>>0>2]-c>>3>>>0;if(b){continue}}break}}if(!Ba){b=(t|0)!=(V|0);if(b){continue}}break}}if(!Ba){b=f+32|0;ya=b;break T}}if(!Ba|(I|0)==43){Xa();q=43;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){Ya();p()}}if(!Ba){ac();p()}}if(!Ba|(I|0)==44){Xa();q=44;if((Ba|0)==1){break a}}if(!Ba){p()}}b=Ba?b:x[H+152>>2]>=2;if(b|(Ba|0)==2){if(!Ba){b=x[w+24>>2];d=x[w+28>>2];x[w+40>>2]=2781;F=+(d-b>>3>>>0);C[w+48>>3]=F;g=x[H+120>>2];b=!g;if(b){break R}d=x[x[g>>2]+24>>2];b=w+40|0;c=w+48|0}if(!Ba|(I|0)==45){Ea[d|0](g,b,c);q=45;if((Ba|0)==1){break a}}}if(!Ba){x[L+8>>2]=0;x[L>>2]=0;x[L+4>>2]=0;r=x[w+24>>2];b=x[w+28>>2]-r|0;i=b>>3}ia:{ja:{while(1){if(!Ba){ka:{if(!Z){k=0;t=0;c=0;break ka}b=Z-1|0;c=(b<<3)+r|0;k=y[c+4|0]!=0;t=x[x[w+8>>2]+(b<<2)>>2];c=x[c>>2]}g=m;d=e;if((i|0)!=(Z|0)){g=x[x[w+8>>2]+(Z<<2)>>2];d=x[(Z<<3)+r>>2]}b=d>>>0>>0?d:e;d=c>>>0>>0?c:e;b=b>>>0>d>>>0?b:d;r=g>>>0>>0?g:m;g=m>>>0>t>>>0?t:m;t=g>>>0>>0?r:g;c=x[H+152>>2]<2}la:{if(!Ba){if(c){break la}x[w+60>>2]=10579;C[w+48>>3]=d>>>0;F=+(b>>>0);C[w+40>>3]=F;r=x[H+144>>2];c=!r;if(c){break R}h=w+48|0;i=w+40|0;u=x[x[r>>2]+24>>2];c=w+60|0}if(!Ba|(I|0)==46){Ea[u|0](r,c,h,i);q=46;if((Ba|0)==1){break a}}if(!Ba){c=x[H+152>>2]<2;if(c){break la}x[w+60>>2]=10636;C[w+48>>3]=g>>>0;F=+(t>>>0);C[w+40>>3]=F;r=x[H+144>>2];c=!r;if(c){break R}h=w+48|0;i=w+40|0;u=x[x[r>>2]+24>>2];c=w+60|0}if(!Ba|(I|0)==47){Ea[u|0](r,c,h,i);q=47;if((Ba|0)==1){break a}}}if(!Ba){u=b-d|0;b=!u}ma:{na:{if((Ba|0)==2|b){if(!Ba){b=x[H+152>>2]<2;if(b){break na}x[w+48>>2]=10479;g=x[H+96>>2];b=!g;if(b){break R}b=w+48|0;c=x[x[g>>2]+24>>2]}if(!Ba|(I|0)==48){Ea[c|0](g,b);q=48;if((Ba|0)==1){break a}}if(!Ba){break na}}if(!Ba){b=!k;c=t-g|0}oa:{pa:{if(!Ba){if(b){b=0;F=0;N=+(c>>>0)/+(u>>>0);break pa}d=x[L+8>>2];g=x[L+4>>2];t=d>>>0>g>>>0;b=x[H+8>>2];b=u>>>0>1?b>>>0>>0?b:c:c;r=0-b|0}qa:{if(!Ba){if(t){x[g>>2]=r;d=g+4|0;x[L+4>>2]=d;break qa}t=x[L>>2];h=g-t>>2;i=h+1|0;if(i>>>0>=1073741824){break ma}d=d-t|0;k=d>>1;z=k>>>0>i>>>0;d=d>>>0>=2147483644;i=d?1073741823:z?k:i}ka=Ba?ka:i;if(ka|(Ba|0)==2){if(!Ba){d=i>>>0>=1073741824;if(d){break ja}d=i<<2}if(!Ba|(I|0)==49){s=dr(d);q=49;if((Ba|0)==1){break a}k=s}}k=!Ba&(!ka|(Ba|0)==2)?0:k;if(!Ba){d=(h<<2)+k|0;x[d>>2]=r;r=(i<<2)+k|0;i=d+4|0;h=(g|0)!=(t|0);if(h){while(1){d=d-4|0;g=g-4|0;x[d>>2]=x[g>>2];h=(g|0)!=(t|0);if(h){continue}break}}x[L+8>>2]=r;x[L+4>>2]=i;x[L>>2]=d;d=!t;if(d){break qa}zg(t)}}if(!Ba){Y=x[H+8>>2]+Y|0;u=u-1|0;d=!u;if(d){c=b;break oa}F=+(b>>>0);d=c-b|0;N=+(d>>>0)/+(u>>>0)}}if(!Ba){i=1;d=(u|0)!=1}if((Ba|0)==2|d){while(1){if(!Ba){g=x[L+4>>2];k=x[L+8>>2];d=g>>>0>=k>>>0;F=N+F;Q=ag(F-+(b>>>0));t=Q>=0;ra:{if(t&Q<4294967296){r=~~Q>>>0;break ra}r=0}d=!d}sa:{if(!Ba){if(d){x[g>>2]=r;d=g+4|0;x[L+4>>2]=d;break sa}t=x[L>>2];h=g-t>>2;d=h+1|0;if(d>>>0>=1073741824){break ma}z=h<<2;k=k-t|0;h=k>>1;M=h>>>0>d>>>0;d=M?h:d;h=k>>>0>=2147483644;k=h?1073741823:d}la=Ba?la:k;if(la|(Ba|0)==2){if(!Ba){d=k>>>0>=1073741824;if(d){break ja}d=k<<2}if(!Ba|(I|0)==50){s=dr(d);q=50;if((Ba|0)==1){break a}h=s}}h=!Ba&(!la|(Ba|0)==2)?0:h;if(!Ba){d=h+z|0;x[d>>2]=r;k=(k<<2)+h|0;h=d+4|0;z=(g|0)!=(t|0);if(z){while(1){d=d-4|0;g=g-4|0;x[d>>2]=x[g>>2];z=(g|0)!=(t|0);if(z){continue}break}}x[L+8>>2]=k;x[L+4>>2]=h;x[L>>2]=d;d=!t;if(d){break sa}zg(t)}}if(!Ba){b=b+r|0;Y=x[H+8>>2]+Y|0;i=i+1|0;d=(u|0)!=(i|0);if(d){continue}}break}}if(!Ba){d=b>>>0>=c>>>0;if(d){c=b;break oa}d=x[L+8>>2];g=x[L+4>>2];r=d>>>0>g>>>0;b=c-b|0}ta:{if(!Ba){if(r){x[g>>2]=b;b=g+4|0;x[L+4>>2]=b;break ta}t=x[L>>2];k=g-t>>2;r=k+1|0;h=r>>>0>=1073741824;if(h){break ma}d=d-t|0;i=d>>1;h=r>>>0>>0;d=d>>>0>=2147483644;r=d?1073741823:h?i:r}ma=Ba?ma:r;if(ma|(Ba|0)==2){if(!Ba){d=r>>>0>=1073741824;if(d){break ja}d=r<<2}if(!Ba|(I|0)==51){s=dr(d);q=51;if((Ba|0)==1){break a}i=s}}i=!Ba&(!ma|(Ba|0)==2)?0:i;if(!Ba){d=(k<<2)+i|0;x[d>>2]=b;b=(r<<2)+i|0;r=d+4|0;h=(g|0)!=(t|0);if(h){while(1){d=d-4|0;g=g-4|0;x[d>>2]=x[g>>2];h=(g|0)!=(t|0);if(h){continue}break}}x[L+8>>2]=b;x[L+4>>2]=r;x[L>>2]=d;b=!t;if(b){break ta}zg(t)}}if(!Ba){b=x[H+8>>2];Y=Y+b|0}}ba=Ba?ba:c+ba|0}if(!Ba){r=x[w+24>>2];i=x[w+28>>2]-r>>3;Z=Z+1|0;b=i>>>0>>0;if(b){break ia}continue}}break}if(!Ba|(I|0)==52){Xa();q=52;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){Ya();p()}}b=Ba?b:x[H+152>>2]<=0;ua:{if(!Ba){if(b){break ua}b=x[H+8>>2];x[w+60>>2]=10607;Q=+(Y>>>0);C[w+48>>3]=Q;C[w+40>>3]=(Y>>>0)/(b>>>0)>>>0;g=x[H+144>>2];b=!g;if(b){break R}e=w+40|0;d=x[x[g>>2]+24>>2];b=w+60|0;c=w+48|0}if(!Ba|(I|0)==53){Ea[d|0](g,b,c,e);q=53;if((Ba|0)==1){break a}}if(!Ba){b=x[H+152>>2]<=0;if(b){break ua}x[w+60>>2]=4651;F=+(ba>>>0);C[w+48>>3]=F;C[w+40>>3]=F/Q;g=x[H+144>>2];b=!g;if(b){break R}e=w+40|0;d=x[x[g>>2]+24>>2];b=w+60|0;c=w+48|0}if(!Ba|(I|0)==54){Ea[d|0](g,b,c,e);q=54;if((Ba|0)==1){break a}}if(!Ba){b=x[H+152>>2]<=0;if(b){break ua}x[w+40>>2]=1321;C[w+48>>3]=Q*$;g=x[H+120>>2];b=!g;if(b){break R}e=x[x[g>>2]+24>>2];b=w+40|0;c=w+48|0}if(!Ba|(I|0)==55){Ea[e|0](g,b,c);q=55;if((Ba|0)==1){break a}}}if(!Ba){b=x[w+8>>2];if(b){x[w+12>>2]=b;zg(b)}g=x[w+24>>2];if(g){x[w+28>>2]=g;zg(g)}b=w- -64|0;ya=b;break Q}}if(!Ba){ac();p()}}if(!Ba){b=x[L+4>>2];m=x[L>>2];u=b-m>>2;c=(b|0)==(m|0)}va:{if(!Ba){if(c){break va}c=!x[a+212>>2];if(c){break va}t=0;c=0}while(1){if(!Ba){c=c+1&0-(x[x[a+208>>2]+(t>>>3&536870908)>>2]>>>t&1);d=x[a+36>>2];e=(c|0)<(A[a+28>>2]/(d>>>0)|0)}wa:{if(!Ba){if(e){break wa}u=(t<<2)+m|0;d=x[u>>2];e=(d|0)<0;if(e){break wa}x[u>>2]=0-d;e=x[a+136>>2]<2;if(e){break wa}x[L+28>>2]=1100;C[L+16>>3]=c|0;u=x[a+104>>2];if(!u){break d}e=L+16|0;d=x[x[u>>2]+24>>2];b=L+28|0}if(!Ba|(I|0)==56){Ea[d|0](u,b,e);q=56;if((Ba|0)==1){break a}}if(!Ba){m=x[L>>2];b=x[L+4>>2]}}if(!Ba){t=t+1|0;u=b-m>>2;e=t>>>0>=u>>>0;if(e){break va}e=A[a+212>>2]>t>>>0;if(e){continue}}break}}if(!Ba){g=a+236|0;e=x[a+240>>2];c=(e|0)!=x[a+236>>2]}xa:{ya:{if(!Ba){if(c){c=(b|0)!=(m|0);if(c){break ya}m=b;break xa}if((g|0)==(L|0)){break xa}t=x[g+8>>2];i=x[g>>2];a=t-i>>2>>>0>=u>>>0}za:{Aa:{Ba:{if(!Ba){if(a){t=g+4|0;c=x[g+4>>2];a=c-i|0;g=a>>2;e=u>>>0>g>>>0;if(e){e=g<<2;g=m+e|0;c=(c|0)!=(i|0);if(c){mf(i,m,a);i=x[t>>2]}u=b-g|0;a=(b|0)==(g|0);if(a){break Ba}a=mf(i,g,u);break Ba}u=b-m|0;a=(b|0)==(m|0);if(a){break Ba}a=mf(i,m,u);break Ba}if(i){x[g+4>>2]=i;zg(i);x[g+8>>2]=0;x[g>>2]=0;x[g+4>>2]=0;t=0}a=u>>>0>=1073741824;if(a){break Aa}a=t>>1;c=t>>>0>=2147483644;i=c?1073741823:a>>>0>u>>>0?a:u;a=i>>>0>=1073741824;if(a){break Aa}u=i<<2}if(!Ba|(I|0)==57){s=dr(u);q=57;if((Ba|0)==1){break a}i=s}if(!Ba){x[g+4>>2]=i;x[g>>2]=i;x[g+8>>2]=i+u;u=b-m|0;t=g+4|0;a=(b|0)==(m|0);if(a){break Ba}a=lf(i,m,u)}}if(!Ba){a=i+u|0;x[t>>2]=a;break za}}if(!Ba|(I|0)==58){Xa();q=58;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){m=x[L>>2];break xa}}d=Ba?d:0;while(1){if(!Ba){i=(d<<2)+m|0;t=x[a+240>>2];c=(t|0)!=x[a+244>>2]}Ca:{if(!Ba){if(c){x[t>>2]=x[i>>2];x[a+240>>2]=t+4;break Ca}u=x[g>>2];c=t-u|0;e=c>>2;r=e+1|0;if(r>>>0>=1073741824){break c}h=e<<2;e=c>>1;k=e>>>0>r>>>0;e=k?e:r;c=c>>>0>=2147483644;r=c?1073741823:e}na=Ba?na:r;if(na|(Ba|0)==2){if(!Ba){if(r>>>0>=1073741824){break b}c=r<<2}if(!Ba|(I|0)==59){s=dr(c);q=59;if((Ba|0)==1){break a}e=s}}e=!Ba&(!na|(Ba|0)==2)?0:e;if(!Ba){c=e+h|0;h=x[i>>2];x[c>>2]=h;i=(r<<2)+e|0;r=c+4|0;e=(u|0)!=(t|0);if(e){while(1){c=c-4|0;t=t-4|0;x[c>>2]=x[t>>2];e=(u|0)!=(t|0);if(e){continue}break}}x[a+244>>2]=i;x[a+240>>2]=r;x[a+236>>2]=c;if(!u){break Ca}zg(u);m=x[L>>2];b=x[L+4>>2]}}if(!Ba){d=d+1|0;c=d>>>0>2>>>0;if(c){continue}}break}}if(!Ba){if(m){x[L+4>>2]=m;zg(m)}ya=L+32|0;return}}if(!Ba){ac();p()}}if(!Ba|(I|0)==60){Xa();q=60;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){Ya();p()}return}x[x[Ca>>2]>>2]=q;x[Ca>>2]=x[Ca>>2]+4;s=x[Ca>>2];x[s>>2]=a;x[s+4>>2]=b;x[s+8>>2]=c;x[s+12>>2]=d;x[s+16>>2]=f;x[s+20>>2]=e;x[s+24>>2]=g;x[s+28>>2]=h;x[s+32>>2]=i;x[s+36>>2]=k;x[s+40>>2]=m;x[s+44>>2]=r;x[s+48>>2]=t;x[s+52>>2]=u;x[s+56>>2]=w;x[s+60>>2]=H;x[s+64>>2]=z;x[s+68>>2]=J;x[s+72>>2]=L;o(+F);a=j(1)|0;pa=s,qa=j(0)|0,x[pa+76>>2]=qa;x[s+80>>2]=a;x[s+84>>2]=M;x[s+88>>2]=P;o(+Q);a=j(1)|0;pa=s,qa=j(0)|0,x[pa+92>>2]=qa;x[s+96>>2]=a;x[s+100>>2]=R;x[s+104>>2]=S;o(+N);a=j(1)|0;pa=s,qa=j(0)|0,x[pa+108>>2]=qa;x[s+112>>2]=a;x[s+116>>2]=O;x[s+120>>2]=T;B[s+124>>2]=U;x[s+128>>2]=V;x[s+132>>2]=Y;B[s+136>>2]=W;x[s+140>>2]=X;x[s+144>>2]=Z;o(+$);a=j(1)|0;pa=s,qa=j(0)|0,x[pa+148>>2]=qa;x[s+152>>2]=a;x[s+156>>2]=aa;x[s+160>>2]=ba;x[s+164>>2]=ca;x[s+168>>2]=oa;x[s+172>>2]=da;x[s+176>>2]=ea;x[s+180>>2]=fa;x[s+184>>2]=ga;x[s+188>>2]=ha;x[s+192>>2]=ia;x[s+196>>2]=ja;x[s+200>>2]=ka;x[s+204>>2]=la;x[s+208>>2]=ma;x[s+212>>2]=na;x[Ca>>2]=x[Ca>>2]+216}function lc(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,z=0,F=0,G=0,H=0,I=0,J=0,L=0,M=0,N=0,O=E(0),P=E(0),Q=0,R=0,S=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-80;b=x[Ca>>2];a=x[b>>2];c=x[b+4>>2];d=x[b+12>>2];e=x[b+16>>2];g=x[b+20>>2];h=x[b+24>>2];k=x[b+28>>2];j=x[b+32>>2];m=x[b+36>>2];n=x[b+40>>2];q=x[b+44>>2];t=x[b+48>>2];r=x[b+52>>2];s=x[b+56>>2];G=x[b+60>>2];J=x[b+64>>2];H=x[b+68>>2];L=x[b+72>>2];M=x[b+76>>2];b=x[b+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;l=x[x[Ca>>2]>>2]}if(!Ba){h=ya-224|0;ya=h;c=x[a+136>>2];b=y[a+52|0]}a:{b:{c:{d:{e:{if((Ba|0)==2|b){if(!Ba){c=(c|0)<=0;if(c){break e}c=x[a+4>>2];I=C[a+16>>3];x[h+200>>2]=2882;C[h+184>>3]=I;C[h+216>>3]=c>>>0;c=x[a+128>>2];if(!c){break d}g=h+200|0;e=h+184|0;d=h+216|0;b=x[x[c>>2]+24>>2]}if(!Ba|!l){Ea[b|0](c,g,e,d);if((Ba|0)==1){break a}}if(!Ba){break e}}if(!Ba){c=(c|0)<=0;if(c){break e}c=x[a+4>>2];I=C[a+16>>3];x[h+200>>2]=2837;C[h+184>>3]=I;C[h+216>>3]=c>>>0;c=x[a+128>>2];if(!c){break d}g=h+200|0;e=h+184|0;d=h+216|0;b=x[x[c>>2]+24>>2]}if(!Ba|(l|0)==1){Ea[b|0](c,g,e,d);i=1;if((Ba|0)==1){break a}}}if(!Ba){c=x[a+156>>2];f:{if(c){t=x[a+40>>2];j=x[a+32>>2];H=x[a+24>>2];k=x[a+28>>2];break f}k=0}}if(!Ba|(l|0)==2){mc(a);i=2;if((Ba|0)==1){break a}}if(!Ba){G=x[a+40>>2];M=x[a+24>>2];m=x[a+28>>2];r=x[a+32>>2];n=h+188|0;x[h+184>>2]=n;x[h+188>>2]=0;x[h+192>>2]=0;c=!y[a+52|0]}g:{h:{i:{j:{if(!Ba){if(c){g=x[a+24>>2];break j}d=x[a+368>>2]}if(!Ba|(l|0)==3){f=dr(20);i=3;if((Ba|0)==1){break a}c=f}if(!Ba){x[c+8>>2]=n;x[c>>2]=0;x[c+4>>2]=0;x[c+16>>2]=d;x[h+184>>2]=c;x[h+188>>2]=c;ec(c,c);x[h+192>>2]=x[h+192>>2]+1;q=x[a+368>>2];g=q>>>1|0;e=n;c=e;d=x[h+188>>2];b=!d}k:{if(!Ba){l:{if(b){break l}b=d;while(1){c=b;b=x[b+16>>2];e=b>>>0>g>>>0;if(e){e=c;b=x[c>>2];if(b){continue}break l}b=b>>>0>=g>>>0;if(b){break k}b=x[c+4>>2];if(b){continue}break}e=c+4|0}}if(!Ba|(l|0)==4){f=dr(20);i=4;if((Ba|0)==1){break a}d=f}if(!Ba){x[d+8>>2]=c;x[d>>2]=0;x[d+4>>2]=0;x[d+16>>2]=g;x[e>>2]=d;c=x[x[h+184>>2]>>2];if(c){x[h+184>>2]=c;d=x[e>>2]}ec(x[h+188>>2],d);c=x[h+192>>2]+1|0;x[h+192>>2]=c;q=x[a+368>>2];d=x[h+188>>2]}}if(!Ba){g=q<<1;e=n;c=e;b=!d}m:{if(!Ba){n:{if(b){break n}b=d;while(1){c=b;b=x[b+16>>2];e=b>>>0>g>>>0;if(e){e=c;b=x[c>>2];if(b){continue}break n}b=b>>>0>=g>>>0;if(b){break m}b=x[c+4>>2];if(b){continue}break}e=c+4|0}}if(!Ba|(l|0)==5){f=dr(20);i=5;if((Ba|0)==1){break a}d=f}if(!Ba){x[d+8>>2]=c;x[d>>2]=0;x[d+4>>2]=0;x[d+16>>2]=g;x[e>>2]=d;c=x[x[h+184>>2]>>2];if(c){x[h+184>>2]=c;d=x[e>>2]}ec(x[h+188>>2],d);c=x[h+192>>2]+1|0;x[h+192>>2]=c;d=x[h+188>>2]}}if(!Ba){g=x[a+24>>2];if(d){break i}}}if(!Ba){b=n;c=b;break h}}if(!Ba){b=d;while(1){c=b;b=x[b+16>>2];e=b>>>0>g>>>0;if(e){b=x[c>>2];if(b){continue}b=c;break h}b=b>>>0>=g>>>0;if(b){break g}b=x[c+4>>2];if(b){continue}break}b=c+4|0}}if(!Ba|(l|0)==6){f=dr(20);i=6;if((Ba|0)==1){break a}d=f}if(!Ba){x[d+8>>2]=c;x[d>>2]=0;x[d+4>>2]=0;x[d+16>>2]=g;x[b>>2]=d;c=x[x[h+184>>2]>>2];if(c){x[h+184>>2]=c;d=x[b>>2]}ec(x[h+188>>2],d);c=x[h+192>>2]+1|0;x[h+192>>2]=c;d=x[h+188>>2]}}if(!Ba){j=(j|0)!=(r|0);k=(k|0)!=(m|0);g=x[a+28>>2];e=n;c=e;b=!d}o:{if(!Ba){p:{if(b){break p}b=d;while(1){c=b;b=x[b+16>>2];e=b>>>0>g>>>0;if(e){e=c;b=x[c>>2];if(b){continue}break p}b=b>>>0>=g>>>0;if(b){break o}b=x[c+4>>2];if(b){continue}break}e=c+4|0}}if(!Ba|(l|0)==7){f=dr(20);i=7;if((Ba|0)==1){break a}d=f}if(!Ba){x[d+8>>2]=c;x[d>>2]=0;x[d+4>>2]=0;x[d+16>>2]=g;x[e>>2]=d;c=x[x[h+184>>2]>>2];if(c){x[h+184>>2]=c;d=x[e>>2]}ec(x[h+188>>2],d);c=x[h+192>>2]+1|0;x[h+192>>2]=c;d=x[h+188>>2]}}if(!Ba){e=j|k;k=!d;g=n;c=g;b=x[a+32>>2]}q:{if(!Ba){r:{if(k){break r}while(1){c=d;d=x[c+16>>2];g=d>>>0>b>>>0;if(g){g=c;d=x[c>>2];if(d){continue}break r}d=b>>>0<=d>>>0;if(d){break q}d=x[c+4>>2];if(d){continue}break}g=c+4|0}}if(!Ba|(l|0)==8){f=dr(20);i=8;if((Ba|0)==1){break a}d=f}if(!Ba){x[d+8>>2]=c;x[d>>2]=0;x[d+4>>2]=0;x[d+16>>2]=b;x[g>>2]=d;c=x[x[h+184>>2]>>2];if(c){x[h+184>>2]=c;d=x[g>>2]}ec(x[h+188>>2],d);c=x[h+192>>2]+1|0;x[h+192>>2]=c}}s:{t:{u:{if((Ba|0)==2|e){if(!Ba){d=x[h+184>>2];c=(n|0)==(d|0);if(c){break u}m=a+152|0;k=a+164|0}while(1){if(!Ba){c=x[m>>2];b=!c}v:{if(!Ba){w:{if(b){break w}e=x[d+16>>2];b=m;while(1){g=A[c+16>>2]>>0;b=g?b:c;j=c+4|0;g=x[(g?j:c)>>2];c=g;if(c){continue}break}c=(b|0)==(m|0);if(c){break w}c=A[b+16>>2]<=e>>>0;if(c){break v}}}if(!Ba|(l|0)==9){f=dr(20);i=9;if((Ba|0)==1){break a}j=f}if(!Ba){b=x[d+16>>2];x[j+12>>2]=0;x[j+8>>2]=b;x[j+4>>2]=3;x[j>>2]=15576;nc(j);e=m;c=e;b=x[c>>2];s=!b;g=x[d+16>>2]}x:{if(!Ba){y:{if(s){break y}while(1){c=b;b=x[b+16>>2];e=b>>>0>g>>>0;if(e){e=c;b=x[c>>2];if(b){continue}break y}if(b>>>0>=g>>>0){b=c;break x}b=x[c+4>>2];if(b){continue}break}e=c+4|0}}if(!Ba|(l|0)==10){f=dr(24);i=10;if((Ba|0)==1){break a}b=f}if(!Ba){x[b+16>>2]=g;x[b+8>>2]=c;x[b>>2]=0;x[b+4>>2]=0;x[b+20>>2]=0;x[e>>2]=b;c=b;g=x[x[a+148>>2]>>2];if(g){x[a+148>>2]=g;c=x[e>>2]}e=x[a+152>>2];ec(e,c);c=x[a+156>>2]+1|0;x[a+156>>2]=c}}if(!Ba){x[b+20>>2]=j}}if(!Ba){c=x[k>>2];b=!c}z:{if(!Ba){A:{if(b){break A}e=x[d+16>>2];b=k;while(1){g=A[c+16>>2]>>0;b=g?b:c;j=c+4|0;g=x[(g?j:c)>>2];c=g;if(c){continue}break}c=(b|0)==(k|0);if(c){break A}c=A[b+16>>2]<=e>>>0;if(c){break z}}}if(!Ba|(l|0)==11){f=dr(20);i=11;if((Ba|0)==1){break a}j=f}if(!Ba){b=x[d+16>>2];x[j+12>>2]=0;x[j+8>>2]=b;x[j+4>>2]=b;x[j>>2]=15628;oc(j);e=k;c=e;b=x[c>>2];s=!b;g=x[d+16>>2]}B:{if(!Ba){C:{if(s){break C}while(1){c=b;b=x[b+16>>2];e=b>>>0>g>>>0;if(e){e=c;b=x[c>>2];if(b){continue}break C}if(b>>>0>=g>>>0){b=c;break B}b=x[c+4>>2];if(b){continue}break}e=c+4|0}}if(!Ba|(l|0)==12){f=dr(24);i=12;if((Ba|0)==1){break a}b=f}if(!Ba){x[b+16>>2]=g;x[b+8>>2]=c;x[b>>2]=0;x[b+4>>2]=0;x[b+20>>2]=0;x[e>>2]=b;c=b;g=x[x[a+160>>2]>>2];if(g){x[a+160>>2]=g;c=x[e>>2]}e=x[a+164>>2];ec(e,c);c=x[a+168>>2]+1|0;x[a+168>>2]=c}}if(!Ba){x[b+20>>2]=j}}if(!Ba){b=x[d+4>>2];D:{if(b){while(1){c=b;b=x[b>>2];if(b){continue}break}break D}while(1){c=x[d+8>>2];b=x[c>>2]!=(d|0);d=c;if(b){continue}break}}d=c;c=(c|0)!=(n|0);if(c){continue}}break}if(!Ba){break u}}if(!Ba){c=(t|0)==(G|0);if(c){break s}break t}}if(!Ba){g=a+152|0;e=g;d=e;b=x[d>>2];k=!b;c=x[a+28>>2]}E:{if(!Ba){F:{if(k){break F}while(1){d=b;f=x[b+16>>2];e=f>>>0>c>>>0;if(e){e=b;b=x[b>>2];if(b){continue}break F}if(c>>>0<=f>>>0){break E}b=x[d+4>>2];if(b){continue}break}e=d+4|0}}if(!Ba|(l|0)==13){f=dr(24);i=13;if((Ba|0)==1){break a}b=f}if(!Ba){x[b+16>>2]=c;x[b+8>>2]=d;x[b>>2]=0;x[b+4>>2]=0;x[b+20>>2]=0;x[e>>2]=b;c=b;d=x[x[a+148>>2]>>2];if(d){x[a+148>>2]=d;c=x[e>>2]}d=x[a+152>>2];ec(d,c);x[a+156>>2]=x[a+156>>2]+1;c=x[a+28>>2]}}if(!Ba){x[a+172>>2]=x[b+20>>2];e=a+164|0;d=e;b=x[d>>2];k=!b}G:{if(!Ba){H:{if(k){break H}while(1){d=b;f=x[b+16>>2];e=f>>>0>c>>>0;if(e){e=b;b=x[b>>2];if(b){continue}break H}if(c>>>0<=f>>>0){break G}b=x[d+4>>2];if(b){continue}break}e=d+4|0}}if(!Ba|(l|0)==14){f=dr(24);i=14;if((Ba|0)==1){break a}b=f}if(!Ba){x[b+16>>2]=c;x[b+8>>2]=d;x[b>>2]=0;x[b+4>>2]=0;x[b+20>>2]=0;x[e>>2]=b;c=b;d=x[x[a+160>>2]>>2];if(d){x[a+160>>2]=d;c=x[e>>2]}ec(x[a+164>>2],c);c=a+168|0;d=x[c>>2]+1|0;x[c>>2]=d}}if(!Ba){x[a+176>>2]=x[b+20>>2];d=x[a+152>>2];e=!d;c=g;b=x[a+32>>2]}I:{if(!Ba){J:{if(e){break J}while(1){c=d;d=x[c+16>>2];e=d>>>0>b>>>0;if(e){g=c;d=x[c>>2];if(d){continue}break J}if(b>>>0<=d>>>0){d=c;break I}d=x[c+4>>2];if(d){continue}break}g=c+4|0}}if(!Ba|(l|0)==15){f=dr(24);i=15;if((Ba|0)==1){break a}d=f}if(!Ba){x[d+16>>2]=b;x[d+8>>2]=c;x[d>>2]=0;x[d+4>>2]=0;x[d+20>>2]=0;x[g>>2]=d;c=d;b=x[x[a+148>>2]>>2];if(b){x[a+148>>2]=b;c=x[g>>2]}b=x[a+152>>2];ec(b,c);c=x[a+156>>2]+1|0;x[a+156>>2]=c}}if(!Ba){c=x[d+20>>2];x[a+180>>2]=c;b=x[a+136>>2]<=0;if(b){break t}O=B[c+16>>2];P=B[x[a+172>>2]+16>>2];x[h+212>>2]=3060;C[h+216>>3]=P;C[h+200>>3]=O;c=x[a+128>>2];if(!c){break d}g=h+212|0;e=h+216|0;d=h+200|0;b=x[x[c>>2]+24>>2]}if(!Ba|(l|0)==16){Ea[b|0](c,g,e,d);i=16;if((Ba|0)==1){break a}}}if(!Ba){d=x[a+224>>2];g=x[a+228>>2];c=(d|0)==(g|0)}K:{if(!Ba){if(c){d=g;break K}c=0}while(1){b=Ba?b:x[(c<<2)+d>>2];f=(Ba|0)==2;if(b|f){d=Ba?d:x[b+120>>2];if(f|d){if(!Ba|(l|0)==17){Nb(d);i=17;if((Ba|0)==1){break a}}if(!Ba){zg(d)}}if(!Ba){d=x[b+124>>2];if(d){zg(d)}d=x[b>>2]}if((Ba|0)==2|d){e=Ba?e:x[x[d>>2]+4>>2];if(!Ba|(l|0)==18){Ea[e|0](d);i=18;if((Ba|0)==1){break a}}}d=Ba?d:x[b+4>>2];if(d|(Ba|0)==2){e=Ba?e:x[x[d>>2]+4>>2];if(!Ba|(l|0)==19){Ea[e|0](d);i=19;if((Ba|0)==1){break a}}}if(!Ba){d=x[b+8>>2];if(d){zg(d)}d=x[b+12>>2];if(d){zg(d)}d=x[b+16>>2];if(d){zg(d)}d=x[b+20>>2];if(d){zg(d)}d=x[b+24>>2];if(d){zg(d)}d=x[b+64>>2];if(d){zg(d)}d=x[b+44>>2];if(d){zg(d)}d=x[b+40>>2];if(d){zg(d)}d=x[b+28>>2];if(d){zg(d)}d=x[b+36>>2];if(d){zg(d)}d=x[b+56>>2];if(d){zg(d)}d=x[b+60>>2];if(d){zg(d)}e=x[b+108>>2];n=b+112|0;d=(e|0)!=(n|0)}if((Ba|0)==2|d){while(1){d=Ba?d:x[e+20>>2];if(d|(Ba|0)==2){if(!Ba|(l|0)==20){Nb(d);i=20;if((Ba|0)==1){break a}}if(!Ba){zg(d)}}if(!Ba){g=x[e+4>>2];L:{if(g){while(1){d=g;g=x[d>>2];if(g){continue}break}break L}while(1){d=x[e+8>>2];g=x[d>>2]!=(e|0);e=d;if(g){continue}break}}e=d;d=(d|0)!=(n|0);if(d){continue}}break}}if(!Ba){e=b+108|0;kc(e,x[b+112>>2]);zg(b);g=x[a+228>>2];d=x[a+224>>2]}}if(!Ba){c=c+1|0;b=c>>>0>2>>>0;if(b){continue}}break}}if(!Ba){x[a+228>>2]=d;c=!x[a+4>>2];if(c){break s}n=a+224|0;g=0}while(1){if(!Ba|(l|0)==21){f=dr(136);i=21;if((Ba|0)==1){break a}b=f}if(!Ba){k=x[a+28>>2];d=x[a+32>>2];q=x[a+24>>2];j=x[a+40>>2];w[b+100>>1]=0;x[b+88>>2]=0;x[b+92>>2]=0;c=b+112|0;x[c>>2]=0;x[c+4>>2]=0;x[b+108>>2]=c;e=b;c=(d>>>0>>0?k:d)<<1;b=c>>>0>q>>>0;m=b?c:q;d=h+184|0;k=d;r=d+4|0;c=(r|0)!=x[d>>2];if(c){b=x[r>>2];M:{if(!b){b=r;while(1){c=x[b+8>>2];d=x[c>>2]==(b|0);b=c;if(d){continue}break}break M}while(1){c=b;b=x[b+4>>2];if(b){continue}break}}c=x[c+16>>2];b=m>>>0>>0;m=b?c:m}}if(!Ba|(l|0)==22){f=dr(24);i=22;if((Ba|0)==1){break a}c=f}if(!Ba){x[c>>2]=15464;d=m+1|0;t=Mb(d);v[c+20|0]=0;x[c+16>>2]=d;x[c+8>>2]=0;x[c+12>>2]=0;x[c+4>>2]=t;x[e>>2]=c}if(!Ba|(l|0)==23){f=dr(24);i=23;if((Ba|0)==1){break a}c=f}if(!Ba){x[c>>2]=15464;d=(j>>>0>>0?m:j)+1|0;b=Mb(d);v[c+20|0]=0;x[c+16>>2]=d;x[c+8>>2]=0;x[c+12>>2]=0;x[c+4>>2]=b;x[e+4>>2]=c;b=m>>>1|0;c=b+1|0;d=sb(c);N:{if((b|0)==2147483647){x[e+8>>2]=d;R=e,S=sb(c),x[R+12>>2]=S;R=e,S=sb(c),x[R+16>>2]=S;R=e,S=sb(c),x[R+20>>2]=S;R=e,S=sb(c),x[R+24>>2]=S;c=sb(c);break N}b=c<<3;R=e,S=nf(d,0,b),x[R+8>>2]=S;R=e,S=nf(sb(c),0,b),x[R+12>>2]=S;R=e,S=nf(sb(c),0,b),x[R+16>>2]=S;R=e,S=nf(sb(c),0,b),x[R+20>>2]=S;d=nf(sb(c),0,b);x[e+24>>2]=d;c=sb(c);nf(c,0,b)}x[e+64>>2]=c;b=Mb(m);O:{if((m|0)<=0){x[e+56>>2]=b;R=e,S=sb(m),x[R+60>>2]=S;R=e,S=Mb(m),x[R+28>>2]=S;R=e,S=Mb(m),x[R+36>>2]=S;R=e,S=Mb(m),x[R+40>>2]=S;G=e+28|0;b=Mb(m);s=e+36|0;break O}c=m<<2;R=e,S=nf(b,0,c),x[R+56>>2]=S;d=sb(m);R=e,S=nf(d,0,m<<3),x[R+60>>2]=S;R=e,S=nf(Mb(m),0,c),x[R+28>>2]=S;R=e,S=nf(Mb(m),0,c),x[R+36>>2]=S;R=e,S=nf(Mb(m),0,c),x[R+40>>2]=S;b=Mb(m);nf(b,0,c);G=e+28|0;s=e+36|0}x[e+48>>2]=0;x[e+52>>2]=1182400512;x[e+44>>2]=b;m=x[k>>2];c=(r|0)!=(m|0)}if((Ba|0)==2|c){j=Ba?j:e+112|0;while(1){if(!Ba|(l|0)==24){f=dr(4);i=24;if((Ba|0)==1){break a}t=f}c=Ba?c:x[m+16>>2];if(!Ba|(l|0)==25){Lb(t,c);i=25;if((Ba|0)==1){break a}}if(!Ba){k=j;b=j;d=x[b>>2];J=!d;c=x[m+16>>2]}P:{if(!Ba){Q:{if(J){break Q}while(1){b=d;d=x[b+16>>2];k=d>>>0>c>>>0;if(k){k=b;d=x[b>>2];if(d){continue}break Q}if(c>>>0<=d>>>0){d=b;break P}d=x[b+4>>2];if(d){continue}break}k=b+4|0}}if(!Ba|(l|0)==26){f=dr(24);i=26;if((Ba|0)==1){break a}d=f}if(!Ba){x[d+16>>2]=c;x[d+8>>2]=b;x[d>>2]=0;x[d+4>>2]=0;x[d+20>>2]=0;x[k>>2]=d;c=d;b=x[x[e+108>>2]>>2];if(b){x[e+108>>2]=b;c=x[k>>2]}b=x[e+112>>2];ec(b,c);x[e+116>>2]=x[e+116>>2]+1;c=x[m+16>>2]}}if(!Ba){x[d+20>>2]=t;b=j;d=x[b>>2];J=!d;k=b}R:{if(!Ba){S:{if(J){break S}while(1){b=d;d=x[b+16>>2];k=d>>>0>c>>>0;if(k){k=b;d=x[b>>2];if(d){continue}break S}if(c>>>0<=d>>>0){d=b;break R}d=x[b+4>>2];if(d){continue}break}k=b+4|0}}if(!Ba|(l|0)==27){f=dr(24);i=27;if((Ba|0)==1){break a}d=f}if(!Ba){x[d+16>>2]=c;x[d+8>>2]=b;x[d>>2]=0;x[d+4>>2]=0;x[d+20>>2]=0;x[k>>2]=d;c=d;b=x[x[e+108>>2]>>2];if(b){x[e+108>>2]=b;c=x[k>>2]}b=x[e+112>>2];ec(b,c);c=x[e+116>>2]+1|0;x[e+116>>2]=c}}if(!Ba){c=x[x[d+20>>2]>>2];b=x[x[c>>2]+20>>2]}if(!Ba|(l|0)==28){Ea[b|0](c);i=28;if((Ba|0)==1){break a}}if(!Ba){b=x[m+4>>2];T:{if(b){while(1){c=b;b=x[b>>2];if(b){continue}break}break T}while(1){c=x[m+8>>2];b=x[c>>2]!=(m|0);m=c;if(b){continue}break}}m=c;c=(c|0)!=(r|0);if(c){continue}}break}}if(!Ba){m=e+112|0;c=m;b=x[c>>2];d=!b}U:{if(!Ba){V:{if(d){break V}while(1){c=b;b=x[b+16>>2];d=b>>>0>q>>>0;if(d){m=c;b=x[c>>2];if(b){continue}break V}if(b>>>0>=q>>>0){b=c;break U}b=x[c+4>>2];if(b){continue}break}m=c+4|0}}if(!Ba|(l|0)==29){f=dr(24);i=29;if((Ba|0)==1){break a}b=f}if(!Ba){x[b+16>>2]=q;x[b+8>>2]=c;x[b>>2]=0;x[b+4>>2]=0;x[b+20>>2]=0;x[m>>2]=b;c=b;d=x[x[e+108>>2]>>2];if(d){x[e+108>>2]=d;c=x[m>>2]}ec(x[e+112>>2],c);c=e+116|0;d=x[c>>2]+1|0;x[c>>2]=d}}if(!Ba){b=x[b+20>>2];x[e+128>>2]=0;x[e+120>>2]=0;x[e+124>>2]=0;x[e+104>>2]=b;b=x[e>>2];x[b+8>>2]=x[b+12>>2];c=x[e+4>>2];b=x[c+12>>2];x[c+8>>2]=b;c=x[e+120>>2]}if((Ba|0)==2|c){if(!Ba){c=x[c>>2];b=x[x[c>>2]+24>>2]}if(!Ba|(l|0)==30){Ea[b|0](c);i=30;if((Ba|0)==1){break a}}}if(!Ba){j=x[x[e>>2]+16>>2];d=j-1|0;W:{if(!d){b=x[s>>2];break W}q=d&3;b=x[s>>2];m=x[G>>2];k=0;c=0;j=j-2>>>0>=3;if(j){r=d&-4;j=0;while(1){f=c<<2;x[f+m>>2]=0;x[b+f>>2]=0;d=f|4;x[d+m>>2]=0;x[b+d>>2]=0;t=f|8;x[t+m>>2]=0;x[b+t>>2]=0;d=f|12;s=d+m|0;x[s>>2]=0;x[b+d>>2]=0;c=c+4|0;j=j+4|0;if((r|0)!=(j|0)){continue}break}}if(!q){break W}while(1){d=c<<2;j=d+m|0;x[j>>2]=0;x[b+d>>2]=0;c=c+1|0;k=k+1|0;if((q|0)!=(k|0)){continue}break}}x[b>>2]=1065353216;x[e+96>>2]=0;x[e+88>>2]=-1;x[e+92>>2]=-1;x[e+80>>2]=0;x[e+72>>2]=0;x[e+76>>2]=0;x[e+32>>2]=0;w[e+100>>1]=0;v[e+68|0]=1;x[e+48>>2]=0;x[b>>2]=1065353216;c=x[a+228>>2];d=x[a+232>>2];b=c>>>0>>0}X:{if(!Ba){if(b){x[c>>2]=e;c=c+4|0;x[a+228>>2]=c;break X}b=x[n>>2];m=c-b>>2;j=m+1|0;if(j>>>0>=1073741824){break c}f=d-b|0;d=f>>1;s=d>>>0>j>>>0;k=s?d:j;d=f>>>0>=2147483644;j=d?1073741823:k}L=Ba?L:j;if(L|(Ba|0)==2){if(!Ba){if(j>>>0>=1073741824){break b}d=j<<2}if(!Ba|(l|0)==31){f=dr(d);i=31;if((Ba|0)==1){break a}}else{f=k}}else{f=k}k=!Ba&(!L|(Ba|0)==2)?0:f;if(!Ba){d=(m<<2)+k|0;x[d>>2]=e;e=(j<<2)+k|0;j=d+4|0;k=(b|0)!=(c|0);if(k){while(1){d=d-4|0;c=c-4|0;x[d>>2]=x[c>>2];k=(b|0)!=(c|0);if(k){continue}break}c=x[n>>2]}x[a+232>>2]=e;x[a+228>>2]=j;x[a+224>>2]=d;b=!c;if(b){break X}zg(c)}}if(!Ba){g=g+1|0;c=g>>>0>2];if(c){continue}}break}}c=Ba?c:y[a+52|0];Y:{if(!Ba){if(c){break Y}c=(H|0)==(M|0);if(c){break Y}c=x[a+184>>2]}if((Ba|0)==2|c){if(!Ba|(l|0)==32){Nb(c);i=32;if((Ba|0)==1){break a}}if(!Ba){zg(c)}}if(!Ba|(l|0)==33){f=dr(4);i=33;if((Ba|0)==1){break a}c=f}b=Ba?b:x[a+24>>2];if(!Ba|(l|0)==34){Lb(c,b);i=34;if((Ba|0)==1){break a}}if(!Ba){x[a+184>>2]=c;c=x[c>>2];b=x[x[c>>2]+16>>2]}if(!Ba|(l|0)==35){Ea[b|0](c);i=35;if((Ba|0)==1){break a}}}c=Ba?c:C[a+16>>3]!=1;Z:{if(!Ba){if(!(y[a+59|0]&4|c)){c=!y[a+52|0];if(c){break Z}}d=x[a+4>>2];c=!d;if(c){break Z}c=0}while(1){if(!Ba){b=c<<2;e=!x[x[b+x[a+224>>2]>>2]+120>>2]}if((Ba|0)==2|e){if(!Ba){e=y[a+52|0];d=x[a+136>>2]}if(!Ba|(l|0)==36){f=dr(8);i=36;if((Ba|0)==1){break a}g=f}if(!Ba){j=h+160|0;e=e^1;x[j>>2]=e;k=h+176|0;x[k>>2]=65536;x[h+168>>2]=0;x[h+172>>2]=1088784512;x[h+40>>2]=0;x[h+44>>2]=1088784512;f=x[j+4>>2];x[h+32>>2]=x[j>>2];x[h+36>>2]=f;x[h+180>>2]=(d|0)>0?d-1|0:0;d=x[k+4>>2];x[h+48>>2]=x[k>>2];x[h+52>>2]=d;x[h+156>>2]=e;x[h+152>>2]=1;d=x[h+156>>2];x[h+24>>2]=x[h+152>>2];x[h+28>>2]=d;d=h+24|0}if(!Ba|(l|0)==37){Xb(g,d,1);i=37;if((Ba|0)==1){break a}}if(!Ba){b=x[a+224>>2]+b|0;x[x[b>>2]+120>>2]=g;d=x[a+36>>2];I=C[a+8>>3]*+(d>>>0);e=Mf(E(K((I+I)/C[a+16>>3])));b=x[b>>2];j=x[b+128>>2];g=x[b+124>>2];d=d<<4;d=d>>>0>>0?e:d;e=Mb(d);_:{$:{if(!(!g|!j)){j=d>>>0>j>>>0?j:d;k=(j|0)<=0;if(k){break $}k=lf(e,g,j<<2);break $}k=!g;if(k){break _}}zg(g)}g=(d|0)>0;if(g){g=nf(e,0,d<<2)}x[b+128>>2]=d;x[b+124>>2]=e;d=x[a+4>>2]}}if(!Ba){c=c+1|0;b=d>>>0>c>>>0;if(b){continue}}break}}c=Ba?c:x[a+344>>2];if(c|(Ba|0)==2){b=Ba?b:x[x[c>>2]+4>>2];if(!Ba|(l|0)==38){Ea[b|0](c);i=38;if((Ba|0)==1){break a}}}if(!Ba|(l|0)==39){f=dr(88);i=39;if((Ba|0)==1){break a}c=f}if(!Ba){b=x[a>>2];x[h+148>>2]=x[a+24>>2];x[h+144>>2]=b;b=x[h+148>>2];x[h+16>>2]=x[h+144>>2];x[h+20>>2]=b;n=ya-32|0;ya=n;b=h+16|0;u=x[b>>2];b=x[b+4>>2];f=b;x[c+4>>2]=u;x[c+8>>2]=b;if(u){d=(D(b,16e3)|0)/(u|0)|0;b=(b|0)/2|0;b=(b|0)>(d|0)?d:b}else{b=0}x[c+12>>2]=b;x[c>>2]=12656;x[n+8>>2]=u;x[n+12>>2]=f;x[n+24>>2]=u;x[n+28>>2]=f;i=x[n+12>>2];g=c+16|0;d=x[n+8>>2];x[g+4>>2]=d;x[g+8>>2]=i;aa:{if(!d){b=(i|0)/2|0;d=0;break aa}b=(i|0)/2|0;d=(D(i,16e3)|0)/(d|0)|0;k=(b|0)>(d|0);d=k?d:b}x[g+12>>2]=d;x[g>>2]=12792;b=b+1|0;e=sb(b);d=(i|0)>=-1;if(d){d=nf(e,0,b<<3)}x[g+16>>2]=e;x[n>>2]=u;x[n+4>>2]=f;x[n+16>>2]=u;x[n+20>>2]=f;f=x[n+4>>2];e=c+36|0;b=x[n>>2];x[e+4>>2]=b;x[e+8>>2]=f;if(b){d=(f|0)/2|0;b=(D(f,16e3)|0)/(b|0)|0;g=(d|0)>(b|0);b=g?b:d}else{b=0}x[e+12>>2]=b;x[e>>2]=12704}if(!Ba|(l|0)==40){f=dr(52);i=40;if((Ba|0)==1){break a}b=f}if(!Ba){x[b+4>>2]=15396;x[b>>2]=15280;g=b+16|0;x[g>>2]=0;e=b+8|0;x[e>>2]=0;x[e+4>>2]=0}if(!Ba|(l|0)==41){f=dr(160);i=41;if((Ba|0)==1){break a}d=f}if(!Ba){x[e>>2]=d;e=d+160|0;x[g>>2]=e;d=nf(d,0,160);g=b+36|0;x[g>>2]=0;x[g+4>>2]=0;x[b+28>>2]=20;x[b+32>>2]=0;x[b+20>>2]=0;x[b+24>>2]=0;x[b+12>>2]=e}if(!Ba|(l|0)==42){f=dr(152);i=42;if((Ba|0)==1){break a}d=f}if(!Ba){x[b+32>>2]=d;e=d+152|0;x[b+40>>2]=e;d=nf(d,0,152);x[b+44>>2]=0;x[b+48>>2]=1118437376;x[g>>2]=e;x[c+52>>2]=b}if(!Ba|(l|0)==43){f=dr(52);i=43;if((Ba|0)==1){break a}b=f}if(!Ba){x[b+4>>2]=15396;x[b>>2]=15280;g=b+16|0;x[g>>2]=0;e=b+8|0;x[e>>2]=0;x[e+4>>2]=0}if(!Ba|(l|0)==44){f=dr(160);i=44;if((Ba|0)==1){break a}d=f}if(!Ba){x[e>>2]=d;e=d+160|0;x[g>>2]=e;d=nf(d,0,160);g=b+36|0;x[g>>2]=0;x[g+4>>2]=0;x[b+28>>2]=20;x[b+32>>2]=0;x[b+20>>2]=0;x[b+24>>2]=0;x[b+12>>2]=e}if(!Ba|(l|0)==45){f=dr(152);i=45;if((Ba|0)==1){break a}d=f}if(!Ba){x[b+32>>2]=d;e=d+152|0;x[b+40>>2]=e;nf(d,0,152);x[b+44>>2]=0;x[b+48>>2]=1119092736;x[g>>2]=e;x[c+64>>2]=0;x[c+68>>2]=0;x[c+60>>2]=1;x[c+56>>2]=b;x[c+72>>2]=0;x[c+76>>2]=0;x[c+80>>2]=0;ya=n+32|0;x[a+344>>2]=c;d=x[a+192>>2];b=x[x[c>>2]+36>>2]}if(!Ba|(l|0)==46){Ea[b|0](c,d);i=46;if((Ba|0)==1){break a}}c=Ba?c:x[a+348>>2];if(c|(Ba|0)==2){b=Ba?b:x[x[c>>2]+4>>2];if(!Ba|(l|0)==47){Ea[b|0](c);i=47;if((Ba|0)==1){break a}}}if(!Ba|(l|0)==48){f=dr(16);i=48;if((Ba|0)==1){break a}c=f}if(!Ba){b=x[a>>2];x[h+140>>2]=x[a+24>>2];x[h+136>>2]=b;b=x[h+140>>2];x[h+8>>2]=x[h+136>>2];x[h+12>>2]=b;b=x[h+12>>2];d=x[h+8>>2];x[c+4>>2]=d;x[c+8>>2]=b;if(d){d=(D(b,16e3)|0)/(d|0)|0;b=(b|0)/2|0;e=(d|0)<(b|0);b=e?d:b}else{b=0}x[c+12>>2]=b;x[c>>2]=12748;x[a+348>>2]=c;c=x[a+352>>2]}if((Ba|0)==2|c){b=Ba?b:x[x[c>>2]+4>>2];if(!Ba|(l|0)==49){Ea[b|0](c);i=49;if((Ba|0)==1){break a}}}if(!Ba|(l|0)==50){f=dr(184);i=50;if((Ba|0)==1){break a}d=f}if(!Ba){k=x[a>>2];g=x[a+36>>2];e=!(x[a+56>>2]&512);c=a- -64|0;b=h+56|0}if(!Ba|(l|0)==51){f=$b(b,c);i=51;if((Ba|0)==1){break a}c=f}if(!Ba|(l|0)==52){o=d;f=k;z=e;u=c;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;i=x[Ca>>2];o=x[i>>2];z=x[i+8>>2];u=x[i+12>>2];F=x[i+16>>2];f=x[i+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;N=x[x[Ca>>2]>>2]}if(!Ba){F=ya-16|0;ya=F;x[o+48>>2]=0;x[o+52>>2]=0;v[o+44|0]=z;x[o+36>>2]=0;x[o+40>>2]=0;v[o+32|0]=1;x[o+24>>2]=0;x[o+28>>2]=1072693248;x[o+16>>2]=0;x[o+20>>2]=1072693248;x[o+12>>2]=0;x[o+8>>2]=g;x[o+4>>2]=f;x[o>>2]=13080;x[o+56>>2]=0;x[o+60>>2]=0;f=o- -64|0;x[f>>2]=0;x[f+4>>2]=0;x[o+72>>2]=0;x[o+76>>2]=0;f=o+80|0}ba:{ca:{if(!Ba|!N){i=$b(f,u);if((Ba|0)==1){break ca}f=i}if(!Ba){x[o+180>>2]=0;x[o+172>>2]=0;x[o+176>>2]=0;f=o+164|0;x[o+160>>2]=f;x[f>>2]=0;x[f+4>>2]=0;f=x[o+152>>2]>=2}da:{if((Ba|0)==2|f){if(!Ba){x[F+12>>2]=2978;C[F>>3]=z>>>0;z=x[o+120>>2];if(!z){break da}o=F+12|0;f=x[x[z>>2]+24>>2]}if(!Ba|(N|0)==1){Ea[f|0](z,o,F);Q=1;if((Ba|0)==1){break ca}}}if(!Ba){ya=F+16|0;break ba}}if(!Ba){ac();p()}break ba}x[x[Ca>>2]>>2]=Q;x[Ca>>2]=x[Ca>>2]+4;i=x[Ca>>2];x[i>>2]=o;x[i+4>>2]=f;x[i+8>>2]=z;x[i+12>>2]=u;x[i+16>>2]=F;x[Ca>>2]=x[Ca>>2]+20}i=52;if((Ba|0)==1){break a}}if(!Ba){x[a+352>>2]=d;d=x[c- -64>>2];g=c+48|0;b=(d|0)==(g|0)}ea:{if(!Ba){fa:{if(b){b=4;d=g;break fa}b=5;e=!d;if(e){break ea}}e=x[d>>2];b=x[e+(b<<2)>>2]}if(!Ba|(l|0)==53){Ea[b|0](d);i=53;if((Ba|0)==1){break a}}}if(!Ba){d=x[c+40>>2];g=c+24|0;b=(d|0)==(g|0)}ga:{if(!Ba){ha:{if(b){b=4;d=g;break ha}b=5;e=!d;if(e){break ga}}e=x[d>>2];b=x[e+(b<<2)>>2]}if(!Ba|(l|0)==54){Ea[b|0](d);i=54;if((Ba|0)==1){break a}}}if(!Ba){d=x[c+16>>2];b=(d|0)==(c|0)}ia:{if(!Ba){ja:{if(b){b=4;d=c;break ja}b=5;c=!d;if(c){break ia}}e=x[d>>2];c=x[e+(b<<2)>>2]}if(!Ba|(l|0)==55){Ea[c|0](d);i=55;if((Ba|0)==1){break a}}}if(!Ba){c=x[a+136>>2];x[x[a+352>>2]+40>>2]=c;x[a+188>>2]=0;b=!y[a+52|0]}f=(Ba|0)==2;ka:{if(f|b){c=Ba?c:(c|0)>0;if(f|c){if(!Ba){c=x[a+28>>2];x[h+200>>2]=6243;C[h+216>>3]=c>>>1>>>0;c=x[a+104>>2];if(!c){break d}e=h+200|0;d=h+216|0;b=x[x[c>>2]+24>>2]}if(!Ba|(l|0)==56){Ea[b|0](c,e,d);i=56;if((Ba|0)==1){break a}}}if(!Ba){c=!x[a+4>>2];if(c){break ka}q=0}while(1){if(!Ba){H=q<<2;n=x[H+x[a+224>>2]>>2];b=x[n>>2];x[b+8>>2]=x[b+12>>2];c=x[n+4>>2];b=x[c+12>>2];x[c+8>>2]=b;c=x[n+120>>2]}if((Ba|0)==2|c){if(!Ba){c=x[c>>2];b=x[x[c>>2]+24>>2]}if(!Ba|(l|0)==57){Ea[b|0](c);i=57;if((Ba|0)==1){break a}}}if(!Ba){j=x[x[n>>2]+16>>2];g=j-1|0;la:{if(!g){d=x[n+36>>2];break la}m=g&3;d=x[n+36>>2];f=x[n+28>>2];e=0;c=0;if(j-2>>>0>=3){r=g&-4;j=0;while(1){g=c<<2;x[g+f>>2]=0;x[d+g>>2]=0;b=g|4;x[b+f>>2]=0;x[b+d>>2]=0;k=g|8;x[f+k>>2]=0;x[d+k>>2]=0;g=g|12;x[f+g>>2]=0;x[d+g>>2]=0;c=c+4|0;j=j+4|0;if((r|0)!=(j|0)){continue}break}}if(!m){break la}while(1){g=c<<2;x[f+g>>2]=0;x[d+g>>2]=0;c=c+1|0;e=e+1|0;if((m|0)!=(e|0)){continue}break}}x[d>>2]=1065353216;x[n+96>>2]=0;x[n+88>>2]=-1;x[n+92>>2]=-1;x[n+80>>2]=0;x[n+72>>2]=0;x[n+76>>2]=0;x[n+32>>2]=0;v[n+100|0]=0;v[n+101|0]=0;v[n+68|0]=1;x[n+48>>2]=0;c=x[a+28>>2]>>>1|0;b=x[x[x[a+224>>2]+H>>2]>>2]}if(!Ba|(l|0)==58){pc(b,c);i=58;if((Ba|0)==1){break a}}if(!Ba){q=q+1|0;c=q>>>0>2];if(c){continue}}break}if(!Ba){break ka}}if(!Ba){if((c|0)<=0){break ka}x[h+216>>2]=5540;c=x[a+80>>2];if(!c){break d}b=h+216|0;a=x[x[c>>2]+24>>2]}if(!Ba|(l|0)==59){Ea[a|0](c,b);i=59;if((Ba|0)==1){break a}}}if(!Ba){hc(h+184|0,x[h+188>>2]);ya=h+224|0;return}}if(!Ba){ac();p()}}if(!Ba|(l|0)==60){Xa();i=60;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){Ya();p()}return}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=c;x[f+8>>2]=b;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[f+24>>2]=h;x[f+28>>2]=k;x[f+32>>2]=j;x[f+36>>2]=m;x[f+40>>2]=n;x[f+44>>2]=q;x[f+48>>2]=t;x[f+52>>2]=r;x[f+56>>2]=s;x[f+60>>2]=G;x[f+64>>2]=J;x[f+68>>2]=H;x[f+72>>2]=L;x[f+76>>2]=M;x[Ca>>2]=x[Ca>>2]+80}function zc(a,b,c,d,e){var f=0,g=0,h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0,w=0,z=0,G=0,H=0,I=0,L=0,M=0,N=0,O=E(0),P=0,Q=0,R=0,S=0,T=E(0),U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=E(0),da=0,ea=E(0),fa=E(0),ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=E(0),sa=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-164;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];g=x[b+20>>2];f=x[b+24>>2];h=x[b+28>>2];k=x[b+32>>2];m=x[b+36>>2];r=x[b+40>>2];w=x[b+44>>2];s=x[b+48>>2];z=x[b+56>>2];t=x[b+52>>2];l(0,t|0);l(1,z|0);q=+n();u=x[b+60>>2];z=x[b+64>>2];G=x[b+68>>2];t=x[b+72>>2];I=x[b+76>>2];L=x[b+80>>2];i=x[b+88>>2];N=x[b+84>>2];l(0,N|0);l(1,i|0);M=+n();O=B[b+92>>2];N=x[b+96>>2];Q=x[b+100>>2];i=x[b+108>>2];H=x[b+104>>2];l(0,H|0);l(1,i|0);R=+n();S=x[b+112>>2];U=x[b+116>>2];i=x[b+124>>2];H=x[b+120>>2];l(0,H|0);l(1,i|0);W=+n();i=x[b+132>>2];H=x[b+128>>2];l(0,H|0);l(1,i|0);V=+n();X=x[b+136>>2];_=x[b+140>>2];Y=x[b+144>>2];aa=x[b+148>>2];i=x[b+156>>2];H=x[b+152>>2];l(0,H|0);l(1,i|0);ba=+n();ca=B[b+160>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;P=x[x[Ca>>2]>>2]}if(!Ba){I=ya-32|0;ya=I;f=!e}a:{b:{c:{d:{if(!Ba){if(f){break d}f=x[a+136>>2]<2;if(f){break d}x[I+28>>2]=2545;C[I+16>>3]=c>>>0;q=+(d>>>0);C[I+8>>3]=q;k=x[a+128>>2];if(!k){break c}m=I+28|0;h=I+16|0;r=I+8|0;f=x[x[k>>2]+24>>2]}if(!Ba|!P){Ea[f|0](k,m,h,r);H=0;if((Ba|0)==1){break b}}}if(!Ba){k=x[a+224>>2];U=x[k+(b<<2)>>2];f=v[U+100|0]&1}e:{if(!Ba){if(f){break e}w=ya-32|0;ya=w;k=x[a+224>>2];u=x[k+(b<<2)>>2];m=e;f=!m}f:{g:{h:{if(!Ba){if(f){break h}f=x[a+136>>2]<2;if(f){break h}x[w+24>>2]=9327;g=x[a+80>>2];f=!g;if(f){break g}k=w+24|0;f=x[x[g>>2]+24>>2]}if(!Ba|(P|0)==1){Ea[f|0](g,k);H=1;if((Ba|0)==1){break b}}}if(!Ba){f=x[a+36>>2];L=y[u+68|0];z=x[a+56>>2];g=x[a+24>>2];k=g>>>1|0;q=C[a+16>>3];Z=C[a+8>>3];R=+A[a>>2];h=Lf(+(D(g,1e3)>>>0)/R);s=Lf(+(D(g,150)>>>0)/R);q=Z*q;ca=E(q);O=E(ca+E(-1));r=E(F(O))>>8|0;break j}G=1;q=+E(B[u+52>>2]*E(g>>>0))/R;s=Lf(q);r=(s|0)<=0}k:{if(!Ba){if(r){break k}r=x[a+136>>2]<2;if(r){break k}x[w+20>>2]=6299;C[w+24>>3]=s|0;q=+(k|0);C[w+8>>3]=q;g=x[a+128>>2];r=!g;if(r){break g}_=w+20|0;t=w+24|0;h=w+8|0;r=x[x[g>>2]+24>>2]}if(!Ba|(P|0)==2){Ea[r|0](g,_,t,h);H=2;if((Ba|0)==1){break b}}}h=Ba?h:k}if(!Ba){B[u+52>>2]=B[u+52>>2]*E(.8999999761581421);r=1;break i}}if(!Ba){x[u+52>>2]=1182400512;G=(z&256)>>>8|0;r=m}}if(!Ba){t=r;f=(c|0)==(f|0);r=(L|0)!=0;ea=B[a+364>>2];fa=B[a+360>>2];T=B[a+356>>2];Y=z&8192;l:{if(Y){O=T;break l}if(!(ca>E(1))){O=T;break l}O=E(O*E(O*O));O=E(E(E(O+O)*E(600))+E(600));O=O>T?O:T;ea=E(O*E(ea/T));fa=E(O*E(fa/T))}X=f&r;r=x[a+24>>2];T=E(r>>>0);H=Lf(+E(O*T)/R);N=Lf(+E(fa*T)/R);f=(H|0)<(N|0)?N:H;g=Lf(+E(ea*T)/R);la=(f|0)<(g|0)?g:f;_=!(t&G);ga=+A[a+36>>2];ma=ga*6.283185307179586;ja=+(c>>>0);Q=x[u+24>>2];ha=x[u+16>>2];S=x[u+20>>2];na=x[u+12>>2];oa=+(r>>>0);c=k;f=0;while(1){ka=V;r=f;M=W;L=(c|0)<=(s|0)|_|(c|0)>=(h|0);f=L&t;i=c<<3;z=i+na|0;g=c;q=0;m:{if((H|0)>=(c|0)){break m}q=1;if((c|0)<=(N|0)){break m}q=(c|0)>(la|0)?8:3}Z=C[z>>3];W=0;n:{if(f){f=r;R=0;q=Z;break n}ia=ma*+(g|0)/oa;V=Z-(C[i+ha>>3]+ia)+3.141592653589793;R=J(V/-6.283185307179586)*6.283185307179586+V+3.141592653589793;da=C[i+S>>3];f=R>da;V=F(R-da);o:{if(q<=M|Y|(g|0)==(k|0)){break o}p:{if(G){if(!(V>ka)|((g|0)==(h|0)|(g|0)==(s|0))){break o}if(!((r^R>da)&1)){break p}break o}if(!(V>ka)|(r^R>da)&1){break o}}W=M+1;ba=M+ba;q=(ia+R)/ga*ja*M;M=8-M;c=i+8|0;q=Z+(q+M*(C[c+Q>>3]-C[c+ha>>3]))*.125;break n}q=(ia+R)/ga*ja+C[i+Q>>3]}m=m&L;C[i+S>>3]=R;C[i+ha>>3]=Z;C[z>>3]=q;C[i+Q>>3]=q;c=g-1|0;r=(g|0)>0;if(r){continue}break}c=x[a+136>>2]>=3}if((Ba|0)==2|c){if(!Ba){x[w+8>>2]=8515;q=ba/+(k|0);C[w+24>>3]=q;g=x[a+104>>2];c=!g;if(c){break g}k=w+8|0;f=w+24|0;c=x[x[g>>2]+24>>2]}if(!Ba|(P|0)==3){Ea[c|0](g,k,f);H=3;if((Ba|0)==1){break b}}}if(!Ba){g=m|X;v[u+68|0]=g;c=(g|0)!=1}q:{if(!Ba){if(c){break q}c=x[a+136>>2]<=1;if(c){break q}x[w+8>>2]=5632;q=+(b>>>0);C[w+24>>3]=q;g=x[a+104>>2];c=!g;if(c){break g}k=w+8|0;f=w+24|0;c=x[x[g>>2]+24>>2]}if(!Ba|(P|0)==4){Ea[c|0](g,k,f);H=4;if((Ba|0)==1){break b}}}if(!Ba){c=w+32|0;ya=c;break f}}if(!Ba){ac();p()}}if(!Ba){k=b;r=d;m=0;w=0;u=0;Y=ya-16|0;ya=Y;c=!(v[a+59|0]&1)}r:{if(!Ba){if(c){break r}q=C[a+16>>3];c=q==1;if(c){break r}X=ya-16|0;ya=X;z=a;S=x[x[a+224>>2]+(k<<2)>>2];g=x[S+64>>2];N=x[a+24>>2];Q=x[S+8>>2];f=x[S+60>>2];c=x[S+104>>2]}if(!Ba|(P|0)==5){Pb(c,Q,f);H=5;if((Ba|0)==1){break b}}if(!Ba){c=x[a>>2];C[f>>3]=C[f>>3]*.5;s=(c>>>0)/700|0;L=(s<<3)+f|0;G=L-8|0;q=C[G>>3]*.5;C[G>>3]=q;h=(N|0)/2|0;t=(s|0)<(N|0);if(t){t=nf(L,0,N-s<<3)}s:{if(c>>>0<700){break s}q=+(N|0);M=1/q;i=s&3;G=0;c=0;if(s-1>>>0>=3){H=s&8388604;L=0;while(1){t=c<<3;s=t+f|0;C[s>>3]=M*C[s>>3];s=(t|8)+f|0;C[s>>3]=M*C[s>>3];s=(t|16)+f|0;C[s>>3]=M*C[s>>3];s=(t|24)+f|0;q=M*C[s>>3];C[s>>3]=q;c=c+4|0;L=L+4|0;if((H|0)!=(L|0)){continue}break}}t=!i;if(t){break s}while(1){s=(c<<3)+f|0;q=M*C[s>>3];C[s>>3]=q;c=c+1|0;G=G+1|0;t=(i|0)!=(G|0);if(t){continue}break}}c=X-((h<<3)+23&-16)|0;ya=c}t:{if((Ba|0)==2|g){if(!Ba){s=x[x[S+104>>2]>>2];t=x[x[s>>2]+24>>2]}if(!Ba|(P|0)==6){Ea[t|0](s,f,g,c);H=6;if((Ba|0)==1){break b}}if(!Ba){u:{if((N|0)<-1){break u}t=h+1|0;i=t&3;G=0;c=0;if(h>>>0>=3){H=t&-4;L=0;while(1){f=c<<3;s=f+g|0;pa=s,qa=uf(C[s>>3]),C[pa>>3]=qa;s=(f|8)+g|0;pa=s,qa=uf(C[s>>3]),C[pa>>3]=qa;s=(f|16)+g|0;pa=s,qa=uf(C[s>>3]),C[pa>>3]=qa;f=(f|24)+g|0;pa=f,qa=uf(C[f>>3]),C[pa>>3]=qa;c=c+4|0;L=L+4|0;if((H|0)!=(L|0)){continue}break}}if(i){while(1){f=(c<<3)+g|0;pa=f,qa=uf(C[f>>3]),C[pa>>3]=qa;c=c+1|0;G=G+1|0;if((i|0)!=(G|0)){continue}break}}c=0;if(N+1>>>0>=3){L=t&-2;s=0;while(1){f=c<<3;t=f+Q|0;i=t;q=C[t>>3];t=f+g|0;C[i>>3]=q/C[t>>3];f=f|8;G=f+Q|0;W=C[G>>3];C[G>>3]=W/C[f+g>>3];c=c+2|0;s=s+2|0;if((L|0)!=(s|0)){continue}break}}f=h&1;if(f){break u}c=c<<3;f=c+Q|0;W=C[f>>3];C[f>>3]=W/C[c+g>>3]}q=C[z+16>>3];v:{w:{if(!(q>1)){if((N|0)<2){break w}c=h;if(c&1){c=c-1|0;t=(c<<3)+g|0;q=C[(Lf(C[z+16>>3]*+(c|0))<<3)+g>>3];C[t>>3]=q}f=(N&-2)==2;if(f){break w}while(1){f=c-1|0;pa=(f<<3)+g|0,qa=C[(Lf(C[z+16>>3]*+(f|0))<<3)+g>>3],C[pa>>3]=qa;f=c-2|0;t=(Lf(C[z+16>>3]*+(f|0))<<3)+g|0;q=C[t>>3];C[(f<<3)+g>>3]=q;s=(c|0)>2;c=f;if(s){continue}break}break w}if((N|0)<-1){break v}c=0;if(N+1>>>0>=3){L=h+1&-2;f=0;while(1){M=0;t=(c<<3)+g|0;i=Lf(C[z+16>>3]*+(c|0));if((i|0)<=(h|0)){q=C[(i<<3)+g>>3]}else{q=0}C[t>>3]=q;s=c|1;q=C[z+16>>3]*+(s|0);G=Lf(q);if((G|0)<=(h|0)){M=C[(G<<3)+g>>3]}C[(s<<3)+g>>3]=M;c=c+2|0;f=f+2|0;t=(L|0)!=(f|0);if(t){continue}break}}f=h&1;if(f){break w}t=(c<<3)+g|0;f=Lf(C[z+16>>3]*+(c|0));if((h|0)>=(f|0)){q=C[(f<<3)+g>>3]}else{q=0}C[t>>3]=q}if((N|0)<-1){break v}f=h+1|0;i=f&3;s=0;c=0;h=h>>>0>=3;if(h){h=f&-4;z=0;while(1){f=c<<3;t=f+Q|0;C[t>>3]=C[f+g>>3]*C[t>>3];t=f|8;G=t+Q|0;C[G>>3]=C[g+t>>3]*C[G>>3];t=f|16;L=t+Q|0;t=g+t|0;C[L>>3]=C[t>>3]*C[L>>3];f=f|24;G=f+Q|0;q=C[f+g>>3]*C[G>>3];C[G>>3]=q;c=c+4|0;z=z+4|0;if((z|0)!=(h|0)){continue}break}}f=!i;if(f){break v}while(1){f=c<<3;z=f+Q|0;q=C[f+g>>3]*C[z>>3];C[z>>3]=q;c=c+1|0;s=s+1|0;f=(i|0)!=(s|0);if(f){continue}break}}v[S+68|0]=0;c=X+16|0;ya=c;break t}}if(!Ba|(P|0)==7){i=Jb(51780,1574);H=7;if((Ba|0)==1){break b}a=i}if(!Ba|(P|0)==8){Kb(a);H=8;if((Ba|0)==1){break b}}if(!Ba){break a}}}if(!Ba){Q=x[a+24>>2];G=(Q|0)/2|0;f=x[a+224>>2];N=x[f+(k<<2)>>2];t=x[N+36>>2];L=x[N+28>>2];k=x[N+56>>2];z=x[a+32>>2];c=y[N+68|0]}x:{if(!Ba){if(c){break x}c=x[N+60>>2];g=x[N+8>>2];y:{if((Q|0)<-1){break y}h=G+1|0;i=h&3;M=+E(E(1)/E(Q|0));if(G>>>0>=3){H=h&-4;while(1){f=m<<3;h=f+g|0;C[h>>3]=C[h>>3]*M;h=(f|8)+g|0;C[h>>3]=C[h>>3]*M;s=(f|16)+g|0;C[s>>3]=C[s>>3]*M;h=(f|24)+g|0;q=C[h>>3]*M;C[h>>3]=q;m=m+4|0;w=w+4|0;if((H|0)!=(w|0)){continue}break}}if(!i){break y}while(1){h=(m<<3)+g|0;q=C[h>>3]*M;C[h>>3]=q;m=m+1|0;u=u+1|0;if((i|0)!=(u|0)){continue}break}}m=x[N+12>>2];f=x[N+104>>2]}z:{A:{B:{if((Ba|0)==2|g){if(!Ba){h=!m;if(h){break B}h=!c;if(h){break A}f=x[f>>2];h=x[x[f>>2]+64>>2]}if(!Ba|(P|0)==9){Ea[h|0](f,g,m,c);H=9;if((Ba|0)==1){break b}}if(!Ba){break z}}if(!Ba|(P|0)==10){i=Jb(51780,5465);H=10;if((Ba|0)==1){break b}a=i}if(!Ba|(P|0)==11){Kb(a);H=11;if((Ba|0)==1){break b}}if(!Ba){break a}}if(!Ba|(P|0)==12){i=Jb(51780,5497);H=12;if((Ba|0)==1){break b}a=i}if(!Ba|(P|0)==13){Kb(a);H=13;if((Ba|0)==1){break b}}if(!Ba){break a}}if(!Ba|(P|0)==14){i=Jb(51780,1574);H=14;if((Ba|0)==1){break b}a=i}if(!Ba|(P|0)==15){Kb(a);H=15;if((Ba|0)==1){break b}}if(!Ba){break a}}if(!Ba){if((z|0)==(Q|0)){f=(Q|0)<2;if(f){break x}f=(G<<3)+c|0;g=G&3;h=0;m=0;i=G-1|0;if(i>>>0>=3){s=G&-4;u=0;while(1){B[(m<<2)+k>>2]=C[f+(m<<3)>>3];w=m|1;B[(w<<2)+k>>2]=C[f+(w<<3)>>3];w=m|2;B[(w<<2)+k>>2]=C[f+(w<<3)>>3];w=m|3;q=C[f+(w<<3)>>3];B[(w<<2)+k>>2]=q;m=m+4|0;u=u+4|0;if((s|0)!=(u|0)){continue}break}}if(g){while(1){q=C[f+(m<<3)>>3];B[(m<<2)+k>>2]=q;m=m+1|0;h=h+1|0;if((g|0)!=(h|0)){continue}break}}s=G&3;g=(G<<2)+k|0;h=0;m=0;if(i>>>0>=3){f=G&-4;u=0;while(1){B[(m<<2)+g>>2]=C[(m<<3)+c>>3];i=m|1;B[(i<<2)+g>>2]=C[(i<<3)+c>>3];i=m|2;B[(i<<2)+g>>2]=C[(i<<3)+c>>3];w=m|3;q=C[(w<<3)+c>>3];B[(w<<2)+g>>2]=q;m=m+4|0;u=u+4|0;if((f|0)!=(u|0)){continue}break}}f=!s;if(f){break x}while(1){q=C[(m<<3)+c>>3];B[(m<<2)+g>>2]=q;m=m+1|0;h=h+1|0;f=(s|0)!=(h|0);if(f){continue}break}break x}if((z|0)>0){nf(k,0,z<<2)}m=(z|0)/-2|0;while(1){m=m+Q|0;if((m|0)<0){continue}break}f=(z|0)<=0;if(f){break x}f=z&1;g=0;if((z|0)!=1){s=z&-2;h=0;while(1){i=g<<2;w=i+k|0;B[w>>2]=C[(m<<3)+c>>3]+ +B[w>>2];m=m+1|0;m=(m|0)!=(Q|0)?m:0;u=(i|4)+k|0;q=C[(m<<3)+c>>3]+ +B[u>>2];B[u>>2]=q;m=m+1|0;m=(m|0)!=(Q|0)?m:0;g=g+2|0;h=h+2|0;if((s|0)!=(h|0)){continue}break}}f=!f;if(f){break x}f=m<<3;c=f+c|0;g=(g<<2)+k|0;q=C[c>>3]+ +B[g>>2];B[g>>2]=q}}if(!Ba){C:{if((z|0)<=(Q|0)){break C}m=x[N+44>>2];S=r<<1;if((S|0)!=x[N+48>>2]){f=(z|0)/2|0;c=m+(f<<2)|0;x[c>>2]=1065353216;r=(z|0)<4;D:{if(r){break D}g=1;h=((f|0)<=2?2:f)-1|0;s=h&1;O=E(S|0);if((z|0)>=6){w=h&-2;h=0;while(1){T=E(E(E(g|0)*E(6.2831854820251465))/O);pa=c+(g<<2)|0,ra=E(eg(T)/T),B[pa>>2]=ra;u=g+1|0;T=E(E(E(u|0)*E(6.2831854820251465))/O);pa=c+(u<<2)|0,ra=E(eg(T)/T),B[pa>>2]=ra;g=g+2|0;h=h+2|0;if((w|0)!=(h|0)){continue}break}}r=!s;if(r){break D}r=g<<2;O=E(E(E(g|0)*E(6.2831854820251465))/O);pa=c+r|0,ra=E(eg(O)/O),B[pa>>2]=ra}g=f+1|0;E:{if((z|0)<=(g|0)){break E}w=(z-f|0)-2|0;u=(f^-1)+z&3;F:{if(!u){c=f;break F}h=0;c=f;while(1){c=c-1|0;B[m+(c<<2)>>2]=B[m+(g<<2)>>2];g=g+1|0;h=h+1|0;if((u|0)!=(h|0)){continue}break}}r=w>>>0<3;if(r){break E}w=m+12|0;s=m-12|0;i=m+8|0;G=m-8|0;H=m+4|0;r=m-4|0;while(1){u=c<<2;h=g<<2;B[u+r>>2]=B[h+m>>2];B[u+G>>2]=B[h+H>>2];B[s+u>>2]=B[h+i>>2];c=c-4|0;B[m+(c<<2)>>2]=B[h+w>>2];g=g+4|0;h=(z|0)!=(g|0);if(h){continue}break}}O=E(E(E(f|0)*E(6.2831854820251465))/E(S|0));pa=m,ra=E(eg(O)/O),B[pa>>2]=ra;x[N+48>>2]=S}if((z|0)<=0){break C}i=z&3;h=0;g=0;if(z-1>>>0>=3){G=z&-4;u=0;while(1){c=g<<2;f=c+k|0;B[f>>2]=B[c+m>>2]*B[f>>2];f=c|4;s=f+k|0;B[s>>2]=B[f+m>>2]*B[s>>2];f=c|8;s=f+k|0;f=f+m|0;B[s>>2]=B[f>>2]*B[s>>2];c=c|12;w=c+k|0;B[w>>2]=B[c+m>>2]*B[w>>2];g=g+4|0;u=u+4|0;if((G|0)!=(u|0)){continue}break}}if(!i){break C}while(1){c=g<<2;u=c+k|0;B[u>>2]=B[c+m>>2]*B[u>>2];g=g+1|0;h=h+1|0;if((i|0)!=(h|0)){continue}break}}c=x[a+180>>2];m=x[c+12>>2];G=x[c+8>>2];G:{if((G|0)<=0){break G}i=G&3;h=0;g=0;if(G>>>0>=4){H=G&-4;u=0;while(1){c=g<<2;f=c+k|0;B[f>>2]=B[c+m>>2]*B[f>>2];f=c|4;s=f+k|0;B[s>>2]=B[f+m>>2]*B[s>>2];f=c|8;s=f+k|0;f=f+m|0;B[s>>2]=B[f>>2]*B[s>>2];c=c|12;w=c+k|0;B[w>>2]=B[c+m>>2]*B[w>>2];g=g+4|0;u=u+4|0;if((H|0)!=(u|0)){continue}break}}if(!i){break G}while(1){c=g<<2;u=c+k|0;B[u>>2]=B[c+m>>2]*B[u>>2];g=g+1|0;h=h+1|0;if((i|0)!=(h|0)){continue}break}}H:{I:{J:{if((z|0)>0){i=z&3;h=0;g=0;if(z>>>0>=4){H=z&-4;u=0;while(1){c=g<<2;f=c+L|0;B[f>>2]=B[c+k>>2]+B[f>>2];f=c|4;s=f+L|0;B[s>>2]=B[f+k>>2]+B[s>>2];f=c|8;s=f+L|0;f=f+k|0;B[s>>2]=B[f>>2]+B[s>>2];c=c|12;w=c+L|0;B[w>>2]=B[c+k>>2]+B[w>>2];g=g+4|0;u=u+4|0;if((H|0)!=(u|0)){continue}break}}if(i){while(1){c=g<<2;u=c+L|0;B[u>>2]=B[c+k>>2]+B[u>>2];g=g+1|0;h=h+1|0;if((i|0)!=(h|0)){continue}break}}g=x[N+32>>2];x[N+32>>2]=g>>>0>z>>>0?g:z;if((z|0)<=(Q|0)){break J}f=x[N+44>>2];lf(k,f,z<<2);break I}g=x[N+32>>2];x[N+32>>2]=g>>>0>z>>>0?g:z;if((z|0)>(Q|0)){break I}}if((G|0)<=0){break H}O=E(B[x[a+172>>2]+16>>2]*E(1.5));u=G&1;k=0;if((G|0)!=1){h=G&-2;L=0;while(1){c=k<<2;f=c+t|0;B[f>>2]=E(B[c+m>>2]*O)+B[f>>2];g=c|4;c=t+g|0;f=g+m|0;B[c>>2]=E(B[f>>2]*O)+B[c>>2];k=k+2|0;L=L+2|0;if((L|0)!=(h|0)){continue}break}}if(!u){break H}k=k<<2;g=t+k|0;B[g>>2]=E(B[k+m>>2]*O)+B[g>>2];break H}K:{if((G|0)<=0){break K}s=G&3;c=0;g=0;if(G>>>0>=4){Q=G&-4;h=0;while(1){f=g<<2;i=f+k|0;B[i>>2]=B[f+m>>2]*B[i>>2];i=f|4;u=i+k|0;B[u>>2]=B[i+m>>2]*B[u>>2];i=f|8;w=i+k|0;B[w>>2]=B[i+m>>2]*B[w>>2];L=f|12;u=L+k|0;B[u>>2]=B[m+L>>2]*B[u>>2];g=g+4|0;h=h+4|0;if((Q|0)!=(h|0)){continue}break}}f=!s;if(f){break K}while(1){L=g<<2;h=L+k|0;B[h>>2]=B[m+L>>2]*B[h>>2];g=g+1|0;c=c+1|0;f=(s|0)!=(c|0);if(f){continue}break}}if((z|0)<=0){break H}w=z&3;L=0;m=0;if(z>>>0>=4){s=z&-4;c=0;while(1){f=m<<2;h=f+t|0;B[h>>2]=B[f+k>>2]+B[h>>2];h=f|4;g=h+t|0;B[g>>2]=B[h+k>>2]+B[g>>2];h=f|8;u=h+t|0;B[u>>2]=B[h+k>>2]+B[u>>2];g=f|12;h=t+g|0;B[h>>2]=B[g+k>>2]+B[h>>2];m=m+4|0;c=c+4|0;f=(s|0)!=(c|0);if(f){continue}break}}if(!w){break H}while(1){g=m<<2;c=t+g|0;f=g+k|0;B[c>>2]=B[f>>2]+B[c>>2];m=m+1|0;L=L+1|0;if((L|0)!=(w|0)){continue}break}}ya=Y+16|0;c=x[a+136>>2]<3;if(c){break e}c=!e;if(c){break e}e=x[U+28>>2];x[e+32>>2]=-1080452710;x[e+36>>2]=1067030938;x[e+24>>2]=1067030938;x[e+28>>2]=0;x[e+16>>2]=0;x[e+20>>2]=-1080452710;x[e+8>>2]=-1080452710;x[e+12>>2]=1067030938;x[e>>2]=1067030938;x[e+4>>2]=0}}c=Ba?c:!(v[U+100|0]&1);L:{if(!Ba){if(c){break L}c=x[a+136>>2]>=2}if((Ba|0)==2|c){if(!Ba){c=x[U+32>>2];x[I+28>>2]=1920;C[I+16>>3]=c>>>0;q=+(d>>>0);C[I+8>>3]=q;e=x[a+128>>2];if(!e){break c}r=I+28|0;k=I+16|0;f=I+8|0;c=x[x[e>>2]+24>>2]}if(!Ba|(P|0)==16){Ea[c|0](e,r,k,f);H=16;if((Ba|0)==1){break b}}}c=Ba?c:!d;if(c|(Ba|0)==2){c=Ba?c:x[a+136>>2]>=0;if(c|(Ba|0)==2){if(!Ba){c=x[a+36>>2];x[I+8>>2]=3919;q=+(c>>>0);C[I+16>>3]=q;e=x[a+104>>2];if(!e){break c}f=I+8|0;d=I+16|0;c=x[x[e>>2]+24>>2]}if(!Ba|(P|0)==17){Ea[c|0](e,f,d);H=17;if((Ba|0)==1){break b}}}if(!Ba){d=x[a+36>>2]}}if(!Ba){e=x[U+32>>2];c=e>>>0>d>>>0;if(c){break L}aa=1;c=x[a+136>>2]<2;if(c){d=e;break L}x[I+28>>2]=4081;C[I+16>>3]=d>>>0;q=+(e>>>0);C[I+8>>3]=q;e=x[a+128>>2];if(!e){break c}k=I+28|0;f=I+16|0;d=I+8|0;c=x[x[e>>2]+24>>2]}if(!Ba|(P|0)==18){Ea[c|0](e,k,f,d);H=18;if((Ba|0)==1){break b}}d=Ba?d:x[U+32>>2]}if(!Ba){f=d;c=x[U+4>>2];k=x[c+12>>2];M=C[a+16>>3];if(M!=1){M=+(f|0)/M;q=F(M);M:{if(q<2147483648){e=~~M;break M}e=-2147483648}f=e+1|0}g=k+(x[c+8>>2]^-1)|0;c=x[c+16>>2];k=g+c|0;e=(k|0)<(c|0);g=e?k:g;c=(f|0)>(g|0)}if((Ba|0)==2|c){c=Ba?c:x[a+136>>2]>0;if(c|(Ba|0)==2){if(!Ba){x[I+8>>2]=5595;q=+(b>>>0);C[I+16>>3]=q;e=x[a+104>>2];if(!e){break c}r=I+8|0;k=I+16|0;c=x[x[e>>2]+24>>2]}if(!Ba|(P|0)==19){Ea[c|0](e,r,k);H=19;if((Ba|0)==1){break b}}}if(!Ba){c=x[U+4>>2];e=x[c+16>>2]}if(!Ba|(P|0)==20){i=dr(24);H=20;if((Ba|0)==1){break b}k=i}if(!Ba){x[k>>2]=15464;e=(e<<1)-1|0;r=Mb(e);v[k+20|0]=0;x[k+16>>2]=e;x[k+8>>2]=0;x[k+12>>2]=0;x[k+4>>2]=r;e=x[c+12>>2];r=x[c+8>>2];h=(e|0)!=(r|0)}if((Ba|0)==2|h){while(1){if(!Ba){m=x[c+4>>2];B[I+16>>2]=B[m+(e<<2)>>2];h=I+16|0}if(!Ba|(P|0)==21){i=jc(k,h,1);H=21;if((Ba|0)==1){break b}h=i}if(!Ba){e=e+1|0;e=(e|0)!=x[c+16>>2]?e:0;h=(r|0)!=(e|0);if(h){continue}}break}}if(!Ba){x[U+4>>2]=k;e=x[a+136>>2]<2}N:{if(!Ba){if(e){break N}x[I+28>>2]=9502;C[I+16>>3]=g|0;q=+(f|0);C[I+8>>3]=q;e=x[a+128>>2];if(!e){break c}h=I+28|0;r=I+16|0;k=I+8|0;f=x[x[e>>2]+24>>2]}if(!Ba|(P|0)==22){Ea[f|0](e,h,r,k);H=22;if((Ba|0)==1){break b}}if(!Ba){e=x[a+136>>2]<2;if(e){break N}e=x[x[U+4>>2]+16>>2];f=x[c+16>>2];x[I+28>>2]=4205;C[I+16>>3]=f-1|0;q=+(e-1|0);C[I+8>>3]=q;e=x[a+128>>2];if(!e){break c}h=I+28|0;r=I+16|0;k=I+8|0;f=x[x[e>>2]+24>>2]}if(!Ba|(P|0)==23){Ea[f|0](e,h,r,k);H=23;if((Ba|0)==1){break b}}}if(!Ba){k=ya-32|0;ya=k;pf(k);f=a+296|0;r=x[f+4>>2];g=x[f>>2];h=(r|0)!=(g|0);e=0}O:{if(!(h?Ba:1)){m=x[k>>2];r=r-g>>3;h=r>>>0<=1?1:r;while(1){r=(e<<3)+g|0;t=!x[r>>2];if(t){e=r;x[e+4>>2]=m;x[e>>2]=c;c=x[f+36>>2]+1|0;x[f+36>>2]=c;break O}e=e+1|0;r=(h|0)!=(e|0);if(r){continue}break}}if(!Ba|(P|0)==24){i=dr(12);H=24;if((Ba|0)==1){break b}e=i}if(!Ba){r=f+16|0;x[e+4>>2]=r;x[e+8>>2]=c;g=x[f+16>>2];x[e>>2]=g;x[g+4>>2]=e;x[f+16>>2]=e;e=f+24|0;x[e>>2]=x[e>>2]+1;c=k+16|0;pf(c);x[f+28>>2]=x[k+16>>2]}}if(!Ba){c=k+32|0;ya=c}}if(!Ba){f=ya-32|0;ya=f;e=x[x[a+224>>2]+(b<<2)>>2];w=x[e+32>>2];m=x[e+36>>2];g=x[e+28>>2];k=x[a+136>>2]<3;c=0}P:{Q:{R:{if(!Ba){if(k){break R}x[f+28>>2]=2094;C[f+16>>3]=b>>>0;q=+(d>>>0);C[f+8>>3]=q;b=x[a+128>>2];if(!b){break Q}t=f+28|0;h=f+16|0;r=f+8|0;k=x[x[b>>2]+24>>2]}if(!Ba|(P|0)==25){Ea[k|0](b,t,h,r);H=25;if((Ba|0)==1){break b}}if(!Ba){b=!aa;if(b){break R}b=x[a+136>>2]<3;if(b){break R}x[f+16>>2]=7103;b=x[a+80>>2];if(!b){break Q}r=f+16|0;k=x[x[b>>2]+24>>2]}if(!Ba|(P|0)==26){Ea[k|0](b,r);H=26;if((Ba|0)==1){break b}}}if(!Ba){S:{if((d|0)<=0){break S}b=0;if((d|0)!=1){h=d&-2;while(1){k=b<<2;r=k+g|0;t=k+m|0;B[r>>2]=B[r>>2]/B[t>>2];k=k|4;r=k+g|0;O=B[r>>2];B[r>>2]=O/B[k+m>>2];b=b+2|0;c=c+2|0;if((h|0)!=(c|0)){continue}break}}c=!(d&1);if(c){break S}b=b<<2;k=b+g|0;O=B[k>>2];B[k>>2]=O/B[b+m>>2]}if(x[e+92>>2]<0){k=0}else{q=C[a+8>>3]*(+A[e+88>>2]+ +x[e+92>>2]*4294967296);k=Lf(q)}b=!y[a+52|0]}T:{U:{if(!Ba){V:{if(b){M=C[a+16>>3];break V}b=x[a+56>>2];c=b&33554432;if(c){M=C[a+16>>3];b=!(M<1);if(b){break V}break U}M=C[a+16>>3];if(b&67108864){break V}b=M>1;if(b){break U}}if(M==1){b=!(y[a+59|0]&4);if(b){break U}}b=!x[e+120>>2];if(b){break U}c=x[e+128>>2];M=C[a+16>>3];V=K(+(d|0)/M);q=F(V);W:{if(q<2147483648){b=~~V;break W}b=-2147483648}r=c>>>0>=b>>>0}X:{if(!Ba){if(r){b=c;break X}r=x[a+136>>2]>=0}if((Ba|0)==2|r){if(!Ba){x[f+28>>2]=4315;C[f+16>>3]=c>>>0;q=+(b>>>0);C[f+8>>3]=q;c=x[a+128>>2];if(!c){break Q}z=f+28|0;t=f+16|0;h=f+8|0;r=x[x[c>>2]+24>>2]}if(!Ba|(P|0)==27){Ea[r|0](c,z,t,h);H=27;if((Ba|0)==1){break b}}if(!Ba){c=x[e+128>>2]}}if(!Ba){r=x[e+124>>2];h=Mb(b);Y:{Z:{_:{t=!r;if(t){break _}t=!c;if(t){break _}c=b>>>0>c>>>0?c:b;t=(c|0)<=0;if(t){break Z}lf(h,r,c<<2);break Z}if(!r){break Y}}zg(r)}c=(b|0)>0;if(c){c=nf(h,0,b<<2)}x[e+128>>2]=b;x[e+124>>2]=h;M=C[a+16>>3]}}if(!Ba){t=e+124|0;h=e+28|0;q=1/M;c=x[x[e+120>>2]>>2];r=x[x[c>>2]+8>>2]}if(!Ba|(P|0)==28){i=Ea[r|0](c,t,b,h,d,q,aa)|0;H=28;if((Ba|0)==1){break b}b=i}if(!Ba){h=x[e+4>>2];r=x[e+124>>2];c=e+96|0}if(!Ba|(P|0)==29){Ac(a,h,r,b,c,k);H=29;if((Ba|0)==1){break b}}if(!Ba){break T}}if(!Ba){c=x[e+4>>2];b=e+96|0}if(!Ba|(P|0)==30){Ac(a,c,g,d,b,k);H=30;if((Ba|0)==1){break b}}}if(!Ba){b=d<<2;k=w-d<<2;g=mf(g,b+g|0,k);$:{if((d|0)<=0){mf(m,b+m|0,k);break $}c=w<<2;nf((c+g|0)-b|0,0,b);nf((mf(m,b+m|0,k)+c|0)-b|0,0,b)}b=x[e+32>>2];c=(d|0)<(b|0)}aa:{if(!Ba){if(c){x[e+32>>2]=b-d;break aa}x[e+32>>2]=0;if(!(v[e+100|0]&1)){break aa}b=x[a+136>>2]>=2}if((Ba|0)==2|b){if(!Ba){x[f+16>>2]=7125;b=x[a+80>>2];if(!b){break Q}c=f+16|0;a=x[x[b>>2]+24>>2]}if(!Ba|(P|0)==31){Ea[a|0](b,c);H=31;if((Ba|0)==1){break b}}}if(!Ba){v[e+101|0]=1}}if(!Ba){ya=f+32|0;break P}}if(!Ba){ac();p()}}if(!Ba){ya=I+32|0;return aa}}if(!Ba){ac();p()}p()}x[x[Ca>>2]>>2]=H;x[Ca>>2]=x[Ca>>2]+4;i=x[Ca>>2];x[i>>2]=a;x[i+4>>2]=b;x[i+8>>2]=c;x[i+12>>2]=d;x[i+16>>2]=e;x[i+20>>2]=g;x[i+24>>2]=f;x[i+28>>2]=h;x[i+32>>2]=k;x[i+36>>2]=m;x[i+40>>2]=r;x[i+44>>2]=w;x[i+48>>2]=s;o(+q);a=j(1)|0;pa=i,sa=j(0)|0,x[pa+52>>2]=sa;x[i+56>>2]=a;x[i+60>>2]=u;x[i+64>>2]=z;x[i+68>>2]=G;x[i+72>>2]=t;x[i+76>>2]=I;x[i+80>>2]=L;o(+M);a=j(1)|0;pa=i,sa=j(0)|0,x[pa+84>>2]=sa;x[i+88>>2]=a;B[i+92>>2]=O;x[i+96>>2]=N;x[i+100>>2]=Q;o(+R);a=j(1)|0;pa=i,sa=j(0)|0,x[pa+104>>2]=sa;x[i+108>>2]=a;x[i+112>>2]=S;x[i+116>>2]=U;o(+W);a=j(1)|0;pa=i,sa=j(0)|0,x[pa+120>>2]=sa;x[i+124>>2]=a;o(+V);a=j(1)|0;pa=i,sa=j(0)|0,x[pa+128>>2]=sa;x[i+132>>2]=a;x[i+136>>2]=X;x[i+140>>2]=_;x[i+144>>2]=Y;x[i+148>>2]=aa;o(+ba);a=j(1)|0;pa=i,sa=j(0)|0,x[pa+152>>2]=sa;x[i+156>>2]=a;B[i+160>>2]=ca;x[Ca>>2]=x[Ca>>2]+164;return 0}a=nr(4);x[a>>2]=0;$(a|0,12860,0);p()}function Bk(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0,s=0,t=0,u=0,w=0,z=0,B=0,C=0,F=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-148;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];h=x[b+24>>2];i=x[b+28>>2];k=x[b+32>>2];l=x[b+36>>2];m=x[b+40>>2];p=x[b+44>>2];t=x[b+48>>2];o=x[b+52>>2];s=x[b+56>>2];u=x[b+60>>2];n=x[b+64>>2];r=x[b+68>>2];w=x[b+72>>2];z=x[b+76>>2];M=x[b+80>>2];C=x[b+84>>2];F=x[b+88>>2];H=x[b+92>>2];B=x[b+96>>2];K=x[b+100>>2];L=x[b+104>>2];N=x[b+108>>2];P=x[b+112>>2];Q=x[b+116>>2];O=x[b+120>>2];R=x[b+124>>2];S=x[b+128>>2];V=x[b+132>>2];W=x[b+136>>2];X=x[b+140>>2];T=x[b+144>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;I=x[x[Ca>>2]>>2]}if(!Ba){B=ya-48|0;ya=B;m=c>>>0<=2}a:{b:{if((Ba|0)==2|m){if(!Ba){c=c<<2;m=c+35884|0;N=x[m>>2];c=c+35872|0;P=x[c>>2]}while(1){if(!Ba){c=x[b+4>>2];m=(c|0)!=x[b+104>>2]}c:{if(!(m?Ba:1)){m=c+1|0;x[b+4>>2]=m;c=y[c|0];break c}if(!Ba|!I){g=pk(b);if((Ba|0)==1){break a}c=g}}if(!Ba){m=nk(c);if(m){continue}}break}if(!Ba){n=c-43|0;m=1}d:{if(!Ba){e:{switch(n|0){case 0:case 2:break e;default:break d}}m=(c|0)==45?-1:1;c=x[b+4>>2];n=(c|0)!=x[b+104>>2];if(n){n=c+1|0;x[b+4>>2]=n;c=y[c|0];break d}}if(!Ba|(I|0)==1){g=pk(b);J=1;if((Ba|0)==1){break a}c=g}}f:{g:{while(1){if(!Ba){O=c|32;n=(O|0)==v[f+1070|0]}if((Ba|0)==2|n){n=Ba?n:f>>>0>6;h:{if(!Ba){if(n){break h}c=x[b+4>>2];n=(c|0)!=x[b+104>>2];if(n){n=c+1|0;x[b+4>>2]=n;c=y[c|0];break h}}if(!Ba|(I|0)==2){g=pk(b);J=2;if((Ba|0)==1){break a}c=g}}if(!Ba){f=f+1|0;n=(f|0)!=8;if(n){continue}break g}}break}if(!Ba){n=(f|0)!=3;if(n){g=(f|0)==8;n=g;if(g){break g}n=!d;if(n){break f}n=f>>>0<4;if(n){break f}c=g;if(c){break g}}k=x[b+112>>2];c=x[b+116>>2];l=c;if((c|0)>0|(c|0)>=0){x[b+4>>2]=x[b+4>>2]-1}c=!d;if(c){break g}c=f>>>0<4;if(c){break g}c=(l|0)<0;while(1){if(!c){x[b+4>>2]=x[b+4>>2]-1}f=f-1|0;d=f>>>0>3;if(d){continue}break}}}if(!Ba){o=ya-16|0;ya=o;k=(q(E(E(m|0)*E(Infinity))),j(2));c=k&2147483647;i:{if(c-8388608>>>0<=2130706431){b=c;c=c>>>7|0;b=b<<25;d=c+1065353216|0;break i}b=k<<25;d=k>>>7|2147418112;if(c>>>0>=2139095040){break i}b=0;d=0;if(!c){break i}b=G(c);Dg(o,c,0,0,0,b+81|0);h=x[o>>2];i=x[o+4>>2];l=16265-b<<16;b=x[o+8>>2];d=l|x[o+12>>2]^65536}x[B>>2]=h;x[B+4>>2]=i;x[B+8>>2]=b;x[B+12>>2]=d|k&-2147483648;ya=o+16|0;h=x[B+8>>2];i=x[B+12>>2];k=x[B>>2];l=x[B+4>>2];break b}}j:{k:{l:{if(!Ba){if(f){break l}f=0}while(1){if(!Ba){O=c|32;n=(O|0)!=v[f+5391|0];if(n){break l}n=f>>>0>1}m:{if(!Ba){if(n){break m}c=x[b+4>>2];n=(c|0)!=x[b+104>>2];if(n){n=c+1|0;x[b+4>>2]=n;c=y[c|0];break m}}if(!Ba|(I|0)==3){g=pk(b);J=3;if((Ba|0)==1){break a}c=g}}if(!Ba){f=f+1|0;n=(f|0)!=3;if(n){continue}}break}if(!Ba){break k}}n:{if(!Ba){o:{switch(f|0){case 3:break k;case 0:break o;default:break n}}f=(c|0)!=48}p:{if(!Ba){if(f){break p}f=x[b+4>>2];n=(f|0)!=x[b+104>>2]}q:{if(!(n?Ba:1)){n=f+1|0;x[b+4>>2]=n;f=y[f|0];break q}if(!Ba|(I|0)==4){g=pk(b);J=4;if((Ba|0)==1){break a}f=g}}f=Ba?f:(f&-33)==88;if(f|(Ba|0)==2){if(!Ba){c=ya-432|0;ya=c;f=x[b+4>>2];p=(f|0)!=x[b+104>>2];e=B+16|0}r:{if(!(p?Ba:1)){p=f+1|0;x[b+4>>2]=p;f=y[f|0];break r}if(!Ba|(I|0)==5){g=pk(b);J=5;if((Ba|0)==1){break a}f=g}}s:{t:{while(1){u:{if(!Ba){if((f|0)!=48){p=(f|0)!=46;if(p){break s}f=x[b+4>>2];z=(f|0)==x[b+104>>2];if(z){break u}z=f+1|0;x[b+4>>2]=z;f=y[f|0];break t}f=x[b+4>>2];p=(f|0)!=x[b+104>>2]}R=Ba?R:p;if(Ba?0:R|(Ba|0)==2){M=1;p=f+1|0;x[b+4>>2]=p;f=y[f|0];continue}if(!R|(Ba|0)==2){M=Ba?M:1;if(!Ba|(I|0)==6){g=pk(b);J=6;if((Ba|0)==1){break a}f=g}if(!Ba){continue}}}break}if(!Ba|(I|0)==7){g=pk(b);J=7;if((Ba|0)==1){break a}f=g}}if(!Ba){z=1;p=(f|0)!=48;if(p){break s}}while(1){if(!Ba){f=x[b+4>>2];p=(f|0)!=x[b+104>>2];g=r;r=g-1|0;w=w-!g|0}v:{if(!(p?Ba:1)){p=f+1|0;x[b+4>>2]=p;f=y[f|0];break v}if(!Ba|(I|0)==8){g=pk(b);J=8;if((Ba|0)==1){break a}f=g}}if(!Ba){p=(f|0)==48;if(p){continue}}break}M=Ba?M:1}g=Ba;k=g?k:0;l=g?l:1073676288;while(1){w:{if(!Ba){n=f|32;x:{y:{C=f-48|0;if(C>>>0<10){break y}O=n-97>>>0>5;g=(f|0)!=46;p=O&g;if(p){break w}p=g;if(g){break y}if(z){break w}z=1;r=h;w=i;break x}f=(f|0)>57?n-87|0:C;z:{if((i|0)<=0&h>>>0<=7|(i|0)<0){t=f+(t<<4)|0;break z}if(!i&h>>>0<=28){qk(c+48|0,f);rk(c+32|0,K,L,k,l,0,0,0,1073414144);K=x[c+32>>2];L=x[c+36>>2];k=x[c+40>>2];l=x[c+44>>2];rk(c+16|0,x[c+48>>2],x[c+52>>2],x[c+56>>2],x[c+60>>2],K,L,k,l);sk(c,x[c+16>>2],x[c+20>>2],x[c+24>>2],x[c+28>>2],o,s,F,H);F=x[c+8>>2];H=x[c+12>>2];o=x[c>>2];s=x[c+4>>2];break z}if(u|!f){break z}rk(c+80|0,K,L,k,l,0,0,0,1073610752);sk(c- -64|0,x[c+80>>2],x[c+84>>2],x[c+88>>2],x[c+92>>2],o,s,F,H);F=x[c+72>>2];H=x[c+76>>2];u=1;o=x[c+64>>2];s=x[c+68>>2]}h=h+1|0;i=h?i:i+1|0;M=1}f=x[b+4>>2];p=(f|0)!=x[b+104>>2]}S=Ba?S:p;if(Ba?0:S|(Ba|0)==2){p=f+1|0;x[b+4>>2]=p;f=y[f|0];continue}if(!S|(Ba|0)==2){if(!Ba|(I|0)==9){g=pk(b);J=9;if((Ba|0)==1){break a}f=g}if(!Ba){continue}}}break}p=Ba?p:!M;A:{if(!Ba){if(p){h=x[b+116>>2];if((h|0)>0){f=1}else{f=(h|0)>=0}B:{C:{if(f){f=x[b+4>>2];N=f-1|0;x[b+4>>2]=N;d=!d;if(d){break C}x[b+4>>2]=f-2;d=!z;if(d){break B}d=f-3|0;x[b+4>>2]=d;break B}if(d){break B}}ok(b,0,0)}b=c+96|0;tk(b,+(m|0)*0);o=x[c+96>>2];s=x[c+100>>2];h=x[c+104>>2];i=x[c+108>>2];break A}p=(i|0)<=0&h>>>0<=7|(i|0)<0;if(p){k=h;l=i;while(1){t=t<<4;g=l;k=k+1|0;g=k?g:g+1|0;l=g;p=(k|0)!=8|(g|0)!=0;if(p){continue}break}}f=(f&-33)==80}D:{E:{F:{if((Ba|0)==2|f){if(!Ba|(I|0)==10){g=Ck(b,d);U=Da;J=10;if((Ba|0)==1){break a}l=U;k=g}if(!Ba){f=(k|0)!=0|(l|0)!=-2147483648;if(f){break D}if(d){k=x[b+112>>2];d=x[b+116>>2];l=d;d=(d|0)>0|(d|0)>=0;if(d){break F}break E}o=0;s=0;ok(b,0,0);h=0;i=0;break A}}if(!Ba){k=0;l=0;K=x[b+112>>2];d=x[b+116>>2];L=d;d=(d|0)<0;if(d){break D}}}if(!Ba){d=x[b+4>>2]-1|0;x[b+4>>2]=d}}g=Ba;k=g?k:0;l=g?l:0}if(!Ba){if(!t){b=c+112|0;tk(b,+(m|0)*0);o=x[c+112>>2];s=x[c+116>>2];h=x[c+120>>2];i=x[c+124>>2];break A}b=z?r:h;g=(z?w:i)<<2|b>>>30;i=k+(b<<2)|0;l=l+g|0;h=i-32|0;b=0-N|0;i=(i>>>0>>0?l+1|0:l)-(i>>>0<32)|0;k=i;if((i|0)>0){b=1}else{b=b>>>0>>0&(k|0)>=0}if(b){x[12163]=68;qk(c+160|0,m);rk(c+144|0,x[c+160>>2],x[c+164>>2],x[c+168>>2],x[c+172>>2],-1,-1,-1,2147418111);b=c+128|0;k=x[c+152>>2];l=x[c+156>>2];rk(b,x[c+144>>2],x[c+148>>2],k,l,-1,-1,-1,2147418111);o=x[c+128>>2];s=x[c+132>>2];h=x[c+136>>2];i=x[c+140>>2];break A}b=N-226|0;k=b>>31;if((k|0)<=(i|0)&b>>>0<=h>>>0|(i|0)>(k|0)){if((t|0)>=0){while(1){sk(c+416|0,o,s,F,H,0,0,0,-1073807360);b=Hg(o,s,F,H,1073610752);d=(b|0)>=0;b=d;sk(c+400|0,o,s,F,H,b?x[c+416>>2]:o,b?x[c+420>>2]:s,b?x[c+424>>2]:F,b?x[c+428>>2]:H);b=h;h=b-1|0;i=i-!b|0;F=x[c+408>>2];H=x[c+412>>2];o=x[c+400>>2];s=x[c+404>>2];t=d|t<<1;if((t|0)>=0){continue}break}}g=i-((N>>31)+(h>>>0>>0)|0)|0;b=(h-N|0)+32|0;g=b>>>0<32?g+1|0:g;b=b>>>0
",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),n.getById=ut(function(e){return f.appendChild(e).id=v,!t.getElementsByName||!t.getElementsByName(v).length}),n.getById?(i.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){return e.getAttribute("id")===t}}):(delete i.find.ID,i.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=n.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==j?t.getElementsByTagName(e):undefined}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.CLASS=n.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==j&&h?t.getElementsByClassName(e):undefined},g=[],d=[],(n.qsa=Q.test(t.querySelectorAll))&&(ut(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll(":checked").length||d.push(":checked")}),ut(function(e){var n=t.createElement("input");n.setAttribute("type","hidden"),e.appendChild(n).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&d.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||d.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),d.push(",.*:")})),(n.matchesSelector=Q.test(m=f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ut(function(e){n.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",I)}),d=d.length&&RegExp(d.join("|")),g=g.length&&RegExp(g.join("|")),y=Q.test(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},S=f.compareDocumentPosition?function(e,r){if(e===r)return E=!0,0;var i=r.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(r);return i?1&i||!n.sortDetached&&r.compareDocumentPosition(e)===i?e===t||y(b,e)?-1:r===t||y(b,r)?1:l?P.call(l,e)-P.call(l,r):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,n){var r,i=0,o=e.parentNode,s=n.parentNode,a=[e],u=[n];if(e===n)return E=!0,0;if(!o||!s)return e===t?-1:n===t?1:o?-1:s?1:l?P.call(l,e)-P.call(l,n):0;if(o===s)return ct(e,n);r=e;while(r=r.parentNode)a.unshift(r);r=n;while(r=r.parentNode)u.unshift(r);while(a[i]===u[i])i++;return i?ct(a[i],u[i]):a[i]===b?-1:u[i]===b?1:0},t):p},ot.matches=function(e,t){return ot(e,null,null,t)},ot.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Y,"='$1']"),!(!n.matchesSelector||!h||g&&g.test(t)||d&&d.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return ot(t,p,null,[e]).length>0},ot.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},ot.attr=function(e,t){(e.ownerDocument||e)!==p&&c(e);var r=i.attrHandle[t.toLowerCase()],o=r&&A.call(i.attrHandle,t.toLowerCase())?r(e,t,!h):undefined;return o===undefined?n.attributes||!h?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null:o},ot.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},ot.uniqueSort=function(e){var t,r=[],i=0,o=0;if(E=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(S),E){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return e},o=ot.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=ot.selectors={cacheLength:50,createPseudo:at,match:J,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(nt,rt),e[3]=(e[4]||e[5]||"").replace(nt,rt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ot.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ot.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return J.CHILD.test(e[0])?null:(e[3]&&e[4]!==undefined?e[2]=e[4]:n&&V.test(n)&&(t=gt(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(nt,rt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&C(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ot.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,h,d,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,y=a&&t.nodeName.toLowerCase(),x=!u&&!a;if(m){if(o){while(g){p=t;while(p=p[g])if(a?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[s?m.firstChild:m.lastChild],s&&x){c=m[v]||(m[v]={}),l=c[e]||[],h=l[0]===w&&l[1],f=l[0]===w&&l[2],p=h&&m.childNodes[h];while(p=++h&&p&&p[g]||(f=h=0)||d.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[w,h,f];break}}else if(x&&(l=(t[v]||(t[v]={}))[e])&&l[0]===w)f=l[1];else while(p=++h&&p&&p[g]||(f=h=0)||d.pop())if((a?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(x&&((p[v]||(p[v]={}))[e]=[w,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||ot.error("unsupported pseudo: "+e);return r[v]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?at(function(e,n){var i,o=r(e,t),s=o.length;while(s--)i=P.call(e,o[s]),e[i]=!(n[i]=o[s])}):function(e){return r(e,0,n)}):r}},pseudos:{not:at(function(e){var t=[],n=[],r=a(e.replace(z,"$1"));return r[v]?at(function(e,t,n,i){var o,s=r(e,null,i,[]),a=e.length;while(a--)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:at(function(e){return function(t){return ot(e,t).length>0}}),contains:at(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:at(function(e){return G.test(e||"")||ot.error("unsupported lang: "+e),e=e.replace(nt,rt).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return et.test(e.nodeName)},input:function(e){return Z.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},i.pseudos.nth=i.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[t]=pt(t);for(t in{submit:!0,reset:!0})i.pseudos[t]=ft(t);function dt(){}dt.prototype=i.filters=i.pseudos,i.setFilters=new dt;function gt(e,t){var n,r,o,s,a,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);a=e,u=[],l=i.preFilter;while(a){(!n||(r=_.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=X.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(z," ")}),a=a.slice(n.length));for(s in i.filter)!(r=J[s].exec(a))||l[s]&&!(r=l[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ot.error(e):k(e,u).slice(0)}function mt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function yt(e,t,n){var i=t.dir,o=n&&"parentNode"===i,s=T++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,a){var u,l,c,p=w+" "+s;if(a){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,a))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[v]||(t[v]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,a)||r,l[1]===!0)return!0}}function vt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,s=[],a=0,u=e.length,l=null!=t;for(;u>a;a++)(o=e[a])&&(!n||n(o,r,i))&&(s.push(o),l&&t.push(a));return s}function bt(e,t,n,r,i,o){return r&&!r[v]&&(r=bt(r)),i&&!i[v]&&(i=bt(i,o)),at(function(o,s,a,u){var l,c,p,f=[],h=[],d=s.length,g=o||Ct(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:xt(g,f,e,a,u),y=n?i||(o?e:d||r)?[]:s:m;if(n&&n(m,y,a,u),r){l=xt(y,h),r(l,[],a,u),c=l.length;while(c--)(p=l[c])&&(y[h[c]]=!(m[h[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?P.call(o,p):f[c])>-1&&(o[l]=!(s[l]=p))}}else y=xt(y===s?y.splice(d,y.length):y),i?i(null,s,y,u):O.apply(s,y)})}function wt(e){var t,n,r,o=e.length,s=i.relative[e[0].type],a=s||i.relative[" "],l=s?1:0,c=yt(function(e){return e===t},a,!0),p=yt(function(e){return P.call(t,e)>-1},a,!0),f=[function(e,n,r){return!s&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>l;l++)if(n=i.relative[e[l].type])f=[yt(vt(f),n)];else{if(n=i.filter[e[l].type].apply(null,e[l].matches),n[v]){for(r=++l;o>r;r++)if(i.relative[e[r].type])break;return bt(l>1&&vt(f),l>1&&mt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&wt(e.slice(l,r)),o>r&&wt(e=e.slice(r)),o>r&&mt(e))}f.push(n)}return vt(f)}function Tt(e,t){var n=0,o=t.length>0,s=e.length>0,a=function(a,l,c,f,h){var d,g,m,y=[],v=0,x="0",b=a&&[],T=null!=h,C=u,k=a||s&&i.find.TAG("*",h&&l.parentNode||l),N=w+=null==C?1:Math.random()||.1;for(T&&(u=l!==p&&l,r=n);null!=(d=k[x]);x++){if(s&&d){g=0;while(m=e[g++])if(m(d,l,c)){f.push(d);break}T&&(w=N,r=++n)}o&&((d=!m&&d)&&v--,a&&b.push(d))}if(v+=x,o&&x!==v){g=0;while(m=t[g++])m(b,y,l,c);if(a){if(v>0)while(x--)b[x]||y[x]||(y[x]=q.call(f));y=xt(y)}O.apply(f,y),T&&!a&&y.length>0&&v+t.length>1&&ot.uniqueSort(f)}return T&&(w=N,u=C),b};return o?at(a):a}a=ot.compile=function(e,t){var n,r=[],i=[],o=N[e+" "];if(!o){t||(t=gt(e)),n=t.length;while(n--)o=wt(t[n]),o[v]?r.push(o):i.push(o);o=N(e,Tt(i,r))}return o};function Ct(e,t,n){var r=0,i=t.length;for(;i>r;r++)ot(e,t[r],n);return n}function kt(e,t,r,o){var s,u,l,c,p,f=gt(e);if(!o&&1===f.length){if(u=f[0]=f[0].slice(0),u.length>2&&"ID"===(l=u[0]).type&&n.getById&&9===t.nodeType&&h&&i.relative[u[1].type]){if(t=(i.find.ID(l.matches[0].replace(nt,rt),t)||[])[0],!t)return r;e=e.slice(u.shift().value.length)}s=J.needsContext.test(e)?0:u.length;while(s--){if(l=u[s],i.relative[c=l.type])break;if((p=i.find[c])&&(o=p(l.matches[0].replace(nt,rt),U.test(u[0].type)&&t.parentNode||t))){if(u.splice(s,1),e=o.length&&mt(u),!e)return O.apply(r,o),r;break}}}return a(e,f)(o,t,!h,r,U.test(e)),r}n.sortStable=v.split("").sort(S).join("")===v,n.detectDuplicates=E,c(),n.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(p.createElement("div"))}),ut(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||lt("type|href|height|width",function(e,t,n){return n?undefined:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ut(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||lt("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?undefined:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||lt(R,function(e,t,n){var r;return n?undefined:(r=e.getAttributeNode(t))&&r.specified?r.value:e[t]===!0?t.toLowerCase():null}),x.find=ot,x.expr=ot.selectors,x.expr[":"]=x.expr.pseudos,x.unique=ot.uniqueSort,x.text=ot.getText,x.isXMLDoc=ot.isXML,x.contains=ot.contains}(e);var D={};function A(e){var t=D[e]={};return x.each(e.match(w)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?D[e]||A(e):x.extend({},e);var t,n,r,i,o,s,a=[],u=!e.once&&[],l=function(p){for(t=e.memory&&p,n=!0,s=i||0,i=0,o=a.length,r=!0;a&&o>s;s++)if(a[s].apply(p[0],p[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,a&&(u?u.length&&l(u.shift()):t?a=[]:c.disable())},c={add:function(){if(a){var n=a.length;(function s(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==r&&s(n)})})(arguments),r?o=a.length:t&&(i=n,l(t))}return this},remove:function(){return a&&x.each(arguments,function(e,t){var n;while((n=x.inArray(t,a,n))>-1)a.splice(n,1),r&&(o>=n&&o--,s>=n&&s--)}),this},has:function(e){return e?x.inArray(e,a)>-1:!(!a||!a.length)},empty:function(){return a=[],o=0,this},disable:function(){return a=u=t=undefined,this},disabled:function(){return!a},lock:function(){return u=undefined,t||c.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!a||n&&!u||(t=t||[],t=[e,t.slice?t.slice():t],r?u.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var s=o[0],a=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=d.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),s=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===a?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},a,u,l;if(r>1)for(a=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(s(t,l,n)).fail(o.reject).progress(s(t,u,a)):--i;return i||o.resolveWith(l,n),o.promise()}}),x.support=function(t){var n=o.createElement("input"),r=o.createDocumentFragment(),i=o.createElement("div"),s=o.createElement("select"),a=s.appendChild(o.createElement("option"));return n.type?(n.type="checkbox",t.checkOn=""!==n.value,t.optSelected=a.selected,t.reliableMarginRight=!0,t.boxSizingReliable=!0,t.pixelPosition=!1,n.checked=!0,t.noCloneChecked=n.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!a.disabled,n=o.createElement("input"),n.value="t",n.type="radio",t.radioValue="t"===n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),r.appendChild(n),t.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,t.focusinBubbles="onfocusin"in e,i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===i.style.backgroundClip,x(function(){var n,r,s="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",a=o.getElementsByTagName("body")[0];a&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(i),i.innerHTML="",i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",x.swap(a,null!=a.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===i.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(i,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(i,null)||{width:"4px"}).width,r=i.appendChild(o.createElement("div")),r.style.cssText=i.style.cssText=s,r.style.marginRight=r.style.width="0",i.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),a.removeChild(n))}),t):t}({});var L,q,H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,O=/([A-Z])/g;function F(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=x.expando+Math.random()}F.uid=1,F.accepts=function(e){return e.nodeType?1===e.nodeType||9===e.nodeType:!0},F.prototype={key:function(e){if(!F.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=F.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,x.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),o=this.cache[i];if("string"==typeof t)o[t]=n;else if(x.isEmptyObject(o))x.extend(this.cache[i],t);else for(r in t)o[r]=t[r];return o},get:function(e,t){var n=this.cache[this.key(e)];return t===undefined?n:n[t]},access:function(e,t,n){var r;return t===undefined||t&&"string"==typeof t&&n===undefined?(r=this.get(e,t),r!==undefined?r:this.get(e,x.camelCase(t))):(this.set(e,t,n),n!==undefined?n:t)},remove:function(e,t){var n,r,i,o=this.key(e),s=this.cache[o];if(t===undefined)this.cache[o]={};else{x.isArray(t)?r=t.concat(t.map(x.camelCase)):(i=x.camelCase(t),t in s?r=[t,i]:(r=i,r=r in s?[r]:r.match(w)||[])),n=r.length;while(n--)delete s[r[n]]}},hasData:function(e){return!x.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}},L=new F,q=new F,x.extend({acceptData:F.accepts,hasData:function(e){return L.hasData(e)||q.hasData(e)},data:function(e,t,n){return L.access(e,t,n)},removeData:function(e,t){L.remove(e,t)},_data:function(e,t,n){return q.access(e,t,n)},_removeData:function(e,t){q.remove(e,t)}}),x.fn.extend({data:function(e,t){var n,r,i=this[0],o=0,s=null;if(e===undefined){if(this.length&&(s=L.get(i),1===i.nodeType&&!q.get(i,"hasDataAttrs"))){for(n=i.attributes;n.length>o;o++)r=n[o].name,0===r.indexOf("data-")&&(r=x.camelCase(r.slice(5)),P(i,r,s[r]));q.set(i,"hasDataAttrs",!0)}return s}return"object"==typeof e?this.each(function(){L.set(this,e)}):x.access(this,function(t){var n,r=x.camelCase(e);if(i&&t===undefined){if(n=L.get(i,e),n!==undefined)return n;if(n=L.get(i,r),n!==undefined)return n;if(n=P(i,r,undefined),n!==undefined)return n}else this.each(function(){var n=L.get(this,r);L.set(this,r,t),-1!==e.indexOf("-")&&n!==undefined&&L.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){L.remove(this,e)})}});function P(e,t,n){var r;if(n===undefined&&1===e.nodeType)if(r="data-"+t.replace(O,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:H.test(n)?JSON.parse(n):n}catch(i){}L.set(e,t,n)}else n=undefined;return n}x.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=q.get(e,t),n&&(!r||x.isArray(n)?r=q.access(e,t,x.makeArray(n)):r.push(n)),r||[]):undefined},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),s=function(){x.dequeue(e,t) +};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return q.get(e,n)||q.access(e,n,{empty:x.Callbacks("once memory").add(function(){q.remove(e,[t+"queue",n])})})}}),x.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),n>arguments.length?x.queue(this[0],e):t===undefined?this:this.each(function(){var n=x.queue(this,e,t);x._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=x.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=undefined),e=e||"fx";while(s--)n=q.get(o[s],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var R,M,W=/[\t\r\n\f]/g,$=/\r/g,B=/^(?:input|select|textarea|button)$/i;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[x.propFix[e]||e]})},addClass:function(e){var t,n,r,i,o,s=0,a=this.length,u="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,s=0,a=this.length,u=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,i=0,o=x(this),s=e.match(w)||[];while(t=s[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===r||"boolean"===n)&&(this.className&&q.set(this,"__className__",this.className),this.className=this.className||e===!1?"":q.get(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(W," ").indexOf(t)>=0)return!0;return!1},val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=x.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,x(this).val()):e,null==i?i="":"number"==typeof i?i+="":x.isArray(i)&&(i=x.map(i,function(e){return null==e?"":e+""})),t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&t.set(this,i,"value")!==undefined||(this.value=i))});if(i)return t=x.valHooks[i.type]||x.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:(n=i.value,"string"==typeof n?n.replace($,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,s=o?null:[],a=o?i+1:r.length,u=0>i?a:o?i:0;for(;a>u;u++)if(n=r[u],!(!n.selected&&u!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),s=i.length;while(s--)r=i[s],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,t,n){var i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===r?x.prop(e,t,n):(1===s&&x.isXMLDoc(e)||(t=t.toLowerCase(),i=x.attrHooks[t]||(x.expr.match.bool.test(t)?M:R)),n===undefined?i&&"get"in i&&null!==(o=i.get(e,t))?o:(o=x.find.attr(e,t),null==o?undefined:o):null!==n?i&&"set"in i&&(o=i.set(e,n,t))!==undefined?o:(e.setAttribute(t,n+""),n):(x.removeAttr(e,t),undefined))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return o=1!==s||!x.isXMLDoc(e),o&&(t=x.propFix[t]||t,i=x.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||B.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),M={set:function(e,t,n){return t===!1?x.removeAttr(e,n):e.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,t){var n=x.expr.attrHandle[t]||x.find.attr;x.expr.attrHandle[t]=function(e,t,r){var i=x.expr.attrHandle[t],o=r?undefined:(x.expr.attrHandle[t]=undefined)!=n(e,t,r)?t.toLowerCase():null;return x.expr.attrHandle[t]=i,o}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,t){return x.isArray(t)?e.checked=x.inArray(x(e).val(),t)>=0:undefined}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var I=/^key/,z=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,X=/^([^.]*)(?:\.(.+)|)$/;function U(){return!0}function Y(){return!1}function V(){try{return o.activeElement}catch(e){}}x.event={global:{},add:function(e,t,n,i,o){var s,a,u,l,c,p,f,h,d,g,m,y=q.get(e);if(y){n.handler&&(s=n,n=s.handler,o=s.selector),n.guid||(n.guid=x.guid++),(l=y.events)||(l=y.events={}),(a=y.handle)||(a=y.handle=function(e){return typeof x===r||e&&x.event.triggered===e.type?undefined:x.event.dispatch.apply(a.elem,arguments)},a.elem=e),t=(t||"").match(w)||[""],c=t.length;while(c--)u=X.exec(t[c])||[],d=m=u[1],g=(u[2]||"").split(".").sort(),d&&(f=x.event.special[d]||{},d=(o?f.delegateType:f.bindType)||d,f=x.event.special[d]||{},p=x.extend({type:d,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&x.expr.match.needsContext.test(o),namespace:g.join(".")},s),(h=l[d])||(h=l[d]=[],h.delegateCount=0,f.setup&&f.setup.call(e,i,g,a)!==!1||e.addEventListener&&e.addEventListener(d,a,!1)),f.add&&(f.add.call(e,p),p.handler.guid||(p.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,p):h.push(p),x.event.global[d]=!0);e=null}},remove:function(e,t,n,r,i){var o,s,a,u,l,c,p,f,h,d,g,m=q.hasData(e)&&q.get(e);if(m&&(u=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(a=X.exec(t[l])||[],h=g=a[1],d=(a[2]||"").split(".").sort(),h){p=x.event.special[h]||{},h=(r?p.delegateType:p.bindType)||h,f=u[h]||[],a=a[2]&&RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=f.length;while(o--)c=f[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,p.remove&&p.remove.call(e,c));s&&!f.length&&(p.teardown&&p.teardown.call(e,d,m.handle)!==!1||x.removeEvent(e,h,m.handle),delete u[h])}else for(h in u)x.event.remove(e,h+t[l],n,r,!0);x.isEmptyObject(u)&&(delete m.handle,q.remove(e,"events"))}},trigger:function(t,n,r,i){var s,a,u,l,c,p,f,h=[r||o],d=y.call(t,"type")?t.type:t,g=y.call(t,"namespace")?t.namespace.split("."):[];if(a=u=r=r||o,3!==r.nodeType&&8!==r.nodeType&&!_.test(d+x.event.triggered)&&(d.indexOf(".")>=0&&(g=d.split("."),d=g.shift(),g.sort()),c=0>d.indexOf(":")&&"on"+d,t=t[x.expando]?t:new x.Event(d,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=g.join("."),t.namespace_re=t.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=r),n=null==n?[t]:x.makeArray(n,[t]),f=x.event.special[d]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!x.isWindow(r)){for(l=f.delegateType||d,_.test(l+d)||(a=a.parentNode);a;a=a.parentNode)h.push(a),u=a;u===(r.ownerDocument||o)&&h.push(u.defaultView||u.parentWindow||e)}s=0;while((a=h[s++])&&!t.isPropagationStopped())t.type=s>1?l:f.bindType||d,p=(q.get(a,"events")||{})[t.type]&&q.get(a,"handle"),p&&p.apply(a,n),p=c&&a[c],p&&x.acceptData(a)&&p.apply&&p.apply(a,n)===!1&&t.preventDefault();return t.type=d,i||t.isDefaultPrevented()||f._default&&f._default.apply(h.pop(),n)!==!1||!x.acceptData(r)||c&&x.isFunction(r[d])&&!x.isWindow(r)&&(u=r[c],u&&(r[c]=null),x.event.triggered=d,r[d](),x.event.triggered=undefined,u&&(r[c]=u)),t.result}},dispatch:function(e){e=x.event.fix(e);var t,n,r,i,o,s=[],a=d.call(arguments),u=(q.get(this,"events")||{})[e.type]||[],l=x.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),t=0;while((i=s[t++])&&!e.isPropagationStopped()){e.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,r=((x.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a),r!==undefined&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(r=[],n=0;a>n;n++)o=t[n],i=o.selector+" ",r[i]===undefined&&(r[i]=o.needsContext?x(i,this).index(u)>=0:x.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return t.length>a&&s.push({elem:this,handlers:t.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,s=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||o,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||s===undefined||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,s=e,a=this.fixHooks[i];a||(this.fixHooks[i]=a=z.test(i)?this.mouseHooks:I.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new x.Event(s),t=r.length;while(t--)n=r[t],e[n]=s[n];return e.target||(e.target=o),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,s):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==V()&&this.focus?(this.focus(),!1):undefined},delegateType:"focusin"},blur:{trigger:function(){return this===V()&&this.blur?(this.blur(),!1):undefined},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&x.nodeName(this,"input")?(this.click(),!1):undefined},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},x.Event=function(e,t){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.getPreventDefault&&e.getPreventDefault()?U:Y):this.type=e,t&&x.extend(this,t),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,undefined):new x.Event(e,t)},x.Event.prototype={isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=U,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=U,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=U,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,t,n,r,i){var o,s;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=undefined);for(s in e)this.on(s,t,n,e[s],i);return this}if(null==n&&null==r?(r=t,n=t=undefined):null==r&&("string"==typeof t?(r=n,n=undefined):(r=n,n=t,t=undefined)),r===!1)r=Y;else if(!r)return this;return 1===i&&(o=r,r=function(e){return x().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=x.guid++)),this.each(function(){x.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,x(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=undefined),n===!1&&(n=Y),this.each(function(){x.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?x.event.trigger(e,t,n,!0):undefined}});var G=/^.[^:#\[\.,]*$/,J=/^(?:parents|prev(?:Until|All))/,Q=x.expr.match.needsContext,K={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t=x(e,this),n=t.length;return this.filter(function(){var e=0;for(;n>e;e++)if(x.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(et(this,e||[],!0))},filter:function(e){return this.pushStack(et(this,e||[],!1))},is:function(e){return!!et(this,"string"==typeof e&&Q.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],s=Q.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(s?s.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?g.call(x(e),this[0]):g.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function Z(e,t){while((e=e[t])&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return Z(e,"nextSibling")},prev:function(e){return Z(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return e.contentDocument||x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(K[e]||x.unique(i),J.test(e)&&i.reverse()),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,t,n){var r=[],i=n!==undefined;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&x(e).is(n))break;r.push(e)}return r},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function et(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(G.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return g.call(t,e)>=0!==n})}var tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,nt=/<([\w:]+)/,rt=/<|&#?\w+;/,it=/<(?:script|style|link)/i,ot=/^(?:checkbox|radio)$/i,st=/checked\s*(?:[^=]|=\s*.checked.)/i,at=/^$|\/(?:java|ecma)script/i,ut=/^true\/(.*)/,lt=/^\s*\s*$/g,ct={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ct.optgroup=ct.option,ct.tbody=ct.tfoot=ct.colgroup=ct.caption=ct.thead,ct.th=ct.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===undefined?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=pt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=pt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(mt(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&dt(mt(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++)1===e.nodeType&&(x.cleanData(mt(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!it.test(e)&&!ct[(nt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(tt,"<$1>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(x.cleanData(mt(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=f.apply([],e);var r,i,o,s,a,u,l=0,c=this.length,p=this,h=c-1,d=e[0],g=x.isFunction(d);if(g||!(1>=c||"string"!=typeof d||x.support.checkClone)&&st.test(d))return this.each(function(r){var i=p.eq(r);g&&(e[0]=d.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(r=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),i=r.firstChild,1===r.childNodes.length&&(r=i),i)){for(o=x.map(mt(r,"script"),ft),s=o.length;c>l;l++)a=r,l!==h&&(a=x.clone(a,!0,!0),s&&x.merge(o,mt(a,"script"))),t.call(this[l],a,l);if(s)for(u=o[o.length-1].ownerDocument,x.map(o,ht),l=0;s>l;l++)a=o[l],at.test(a.type||"")&&!q.access(a,"globalEval")&&x.contains(u,a)&&(a.src?x._evalUrl(a.src):x.globalEval(a.textContent.replace(lt,"")))}return this}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=[],i=x(e),o=i.length-1,s=0;for(;o>=s;s++)n=s===o?this:this.clone(!0),x(i[s])[t](n),h.apply(r,n.get());return this.pushStack(r)}}),x.extend({clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=x.contains(e.ownerDocument,e);if(!(x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(s=mt(a),o=mt(e),r=0,i=o.length;i>r;r++)yt(o[r],s[r]);if(t)if(n)for(o=o||mt(e),s=s||mt(a),r=0,i=o.length;i>r;r++)gt(o[r],s[r]);else gt(e,a);return s=mt(a,"script"),s.length>0&&dt(s,!u&&mt(e,"script")),a},buildFragment:function(e,t,n,r){var i,o,s,a,u,l,c=0,p=e.length,f=t.createDocumentFragment(),h=[];for(;p>c;c++)if(i=e[c],i||0===i)if("object"===x.type(i))x.merge(h,i.nodeType?[i]:i);else if(rt.test(i)){o=o||f.appendChild(t.createElement("div")),s=(nt.exec(i)||["",""])[1].toLowerCase(),a=ct[s]||ct._default,o.innerHTML=a[1]+i.replace(tt,"<$1>")+a[2],l=a[0];while(l--)o=o.lastChild;x.merge(h,o.childNodes),o=f.firstChild,o.textContent=""}else h.push(t.createTextNode(i));f.textContent="",c=0;while(i=h[c++])if((!r||-1===x.inArray(i,r))&&(u=x.contains(i.ownerDocument,i),o=mt(f.appendChild(i),"script"),u&&dt(o),n)){l=0;while(i=o[l++])at.test(i.type||"")&&n.push(i)}return f},cleanData:function(e){var t,n,r,i,o,s,a=x.event.special,u=0;for(;(n=e[u])!==undefined;u++){if(F.accepts(n)&&(o=n[q.expando],o&&(t=q.cache[o]))){if(r=Object.keys(t.events||{}),r.length)for(s=0;(i=r[s])!==undefined;s++)a[i]?x.event.remove(n,i):x.removeEvent(n,i,t.handle);q.cache[o]&&delete q.cache[o]}delete L.cache[n[L.expando]]}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}});function pt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ft(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ht(e){var t=ut.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function dt(e,t){var n=e.length,r=0;for(;n>r;r++)q.set(e[r],"globalEval",!t||q.get(t[r],"globalEval"))}function gt(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(q.hasData(e)&&(o=q.access(e),s=q.set(t,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)x.event.add(t,i,l[i][n])}L.hasData(e)&&(a=L.access(e),u=x.extend({},a),L.set(t,u))}}function mt(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return t===undefined||t&&x.nodeName(e,t)?x.merge([e],n):n}function yt(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ot.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}x.fn.extend({wrapAll:function(e){var t;return x.isFunction(e)?this.each(function(t){x(this).wrapAll(e.call(this,t))}):(this[0]&&(t=x(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var vt,xt,bt=/^(none|table(?!-c[ea]).+)/,wt=/^margin/,Tt=RegExp("^("+b+")(.*)$","i"),Ct=RegExp("^("+b+")(?!px)[a-z%]+$","i"),kt=RegExp("^([+-])=("+b+")","i"),Nt={BODY:"block"},Et={position:"absolute",visibility:"hidden",display:"block"},St={letterSpacing:0,fontWeight:400},jt=["Top","Right","Bottom","Left"],Dt=["Webkit","O","Moz","ms"];function At(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Dt.length;while(i--)if(t=Dt[i]+n,t in e)return t;return r}function Lt(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function qt(t){return e.getComputedStyle(t,null)}function Ht(e,t){var n,r,i,o=[],s=0,a=e.length;for(;a>s;s++)r=e[s],r.style&&(o[s]=q.get(r,"olddisplay"),n=r.style.display,t?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&Lt(r)&&(o[s]=q.access(r,"olddisplay",Rt(r.nodeName)))):o[s]||(i=Lt(r),(n&&"none"!==n||!i)&&q.set(r,"olddisplay",i?n:x.css(r,"display"))));for(s=0;a>s;s++)r=e[s],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[s]||"":"none"));return e}x.fn.extend({css:function(e,t){return x.access(this,function(e,t,n){var r,i,o={},s=0;if(x.isArray(t)){for(r=qt(e),i=t.length;i>s;s++)o[t[s]]=x.css(e,t[s],!1,r);return o}return n!==undefined?x.style(e,t,n):x.css(e,t)},e,t,arguments.length>1)},show:function(){return Ht(this,!0)},hide:function(){return Ht(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Lt(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=vt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=x.camelCase(t),u=e.style;return t=x.cssProps[a]||(x.cssProps[a]=At(u,a)),s=x.cssHooks[t]||x.cssHooks[a],n===undefined?s&&"get"in s&&(i=s.get(e,!1,r))!==undefined?i:u[t]:(o=typeof n,"string"===o&&(i=kt.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(x.css(e,t)),o="number"),null==n||"number"===o&&isNaN(n)||("number"!==o||x.cssNumber[a]||(n+="px"),x.support.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&(n=s.set(e,n,r))===undefined||(u[t]=n)),undefined)}},css:function(e,t,n,r){var i,o,s,a=x.camelCase(t);return t=x.cssProps[a]||(x.cssProps[a]=At(e.style,a)),s=x.cssHooks[t]||x.cssHooks[a],s&&"get"in s&&(i=s.get(e,!0,n)),i===undefined&&(i=vt(e,t,r)),"normal"===i&&t in St&&(i=St[t]),""===n||n?(o=parseFloat(i),n===!0||x.isNumeric(o)?o||0:i):i}}),vt=function(e,t,n){var r,i,o,s=n||qt(e),a=s?s.getPropertyValue(t)||s[t]:undefined,u=e.style;return s&&(""!==a||x.contains(e.ownerDocument,e)||(a=x.style(e,t)),Ct.test(a)&&wt.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=s.width,u.width=r,u.minWidth=i,u.maxWidth=o)),a};function Ot(e,t,n){var r=Tt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function Ft(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;for(;4>o;o+=2)"margin"===n&&(s+=x.css(e,n+jt[o],!0,i)),r?("content"===n&&(s-=x.css(e,"padding"+jt[o],!0,i)),"margin"!==n&&(s-=x.css(e,"border"+jt[o]+"Width",!0,i))):(s+=x.css(e,"padding"+jt[o],!0,i),"padding"!==n&&(s+=x.css(e,"border"+jt[o]+"Width",!0,i)));return s}function Pt(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=qt(e),s=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=vt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Ct.test(i))return i;r=s&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+Ft(e,t,n||(s?"border":"content"),r,o)+"px"}function Rt(e){var t=o,n=Nt[e];return n||(n=Mt(e,t),"none"!==n&&n||(xt=(xt||x("

>>0&(g|0)<=0|(g|0)<0?(b|0)>0?b:0:P;G:{if((b|0)>=113){qk(c+384|0,m);r=x[c+392>>2];w=x[c+396>>2];K=x[c+384>>2];L=x[c+388>>2];l=0;k=0;break G}tk(c+352|0,bg(1,144-b|0));qk(c+336|0,m);K=x[c+336>>2];L=x[c+340>>2];r=x[c+344>>2];w=x[c+348>>2];uk(c+368|0,x[c+352>>2],x[c+356>>2],x[c+360>>2],x[c+364>>2],K,L,r,w);V=x[c+376>>2];W=x[c+380>>2];l=x[c+372>>2];k=x[c+368>>2]}m=(Gg(o,s,F,H,0,0,0,0)|0)!=0;f=!(t&1)&(m&(b|0)<32);vk(c+320|0,t+f|0);rk(c+304|0,K,L,r,w,x[c+320>>2],x[c+324>>2],x[c+328>>2],x[c+332>>2]);sk(c+272|0,x[c+304>>2],x[c+308>>2],x[c+312>>2],x[c+316>>2],k,l,V,W);rk(c+288|0,K,L,r,w,f?0:o,f?0:s,f?0:F,f?0:H);K=x[c+280>>2];L=x[c+284>>2];sk(c+256|0,x[c+288>>2],x[c+292>>2],x[c+296>>2],x[c+300>>2],x[c+272>>2],x[c+276>>2],K,L);r=x[c+256>>2];w=x[c+260>>2];wk(c+240|0,r,w,x[c+264>>2],x[c+268>>2],k,l,V,W);o=x[c+240>>2];i=x[c+244>>2];F=x[c+248>>2];H=x[c+252>>2];if(!Gg(o,i,F,H,0,0,0,0)){x[12163]=68}d=h;b=c+224|0;xk(b,o,i,F,H,h);o=x[c+224>>2];s=x[c+228>>2];h=x[c+232>>2];i=x[c+236>>2];break A}x[12163]=68;qk(c+208|0,m);rk(c+192|0,x[c+208>>2],x[c+212>>2],x[c+216>>2],x[c+220>>2],0,0,0,65536);b=c+176|0;k=x[c+200>>2];l=x[c+204>>2];rk(b,x[c+192>>2],x[c+196>>2],k,l,0,0,0,65536);o=x[c+176>>2];s=x[c+180>>2];h=x[c+184>>2];i=x[c+188>>2]}}if(!Ba){x[e>>2]=o;x[e+4>>2]=s;x[e+8>>2]=h;x[e+12>>2]=i;ya=c+432|0;h=x[B+24>>2];i=x[B+28>>2];k=x[B+16>>2];l=x[B+20>>2];break b}}if(!Ba){r=x[b+112>>2];f=x[b+116>>2];w=f;f=(f|0)<0;if(f){break p}f=x[b+4>>2]-1|0;x[b+4>>2]=f}}if(!Ba){O=B+32|0;f=b;z=m;M=d;b=ya;e=b-8976|0;ya=e;n=N;Q=0-n|0;X=Q-P|0;m=0}H:{I:{while(1){J:{if(!Ba){if((c|0)!=48){b=(c|0)!=46;if(b){break H}c=x[f+4>>2];b=(c|0)==x[f+104>>2];if(b){break J}b=c+1|0;x[f+4>>2]=b;c=y[c|0];break I}c=x[f+4>>2];b=(c|0)!=x[f+104>>2]}T=Ba?T:b;if(Ba?0:T|(Ba|0)==2){m=1;b=c+1|0;x[f+4>>2]=b;c=y[c|0];continue}if(!T|(Ba|0)==2){m=Ba?m:1;if(!Ba|(I|0)==11){g=pk(f);J=11;if((Ba|0)==1){break a}c=g}if(!Ba){continue}}}break}if(!Ba|(I|0)==12){g=pk(f);J=12;if((Ba|0)==1){break a}c=g}}if(!Ba){p=1;b=(c|0)!=48;if(b){break H}}while(1){if(!Ba){b=h;h=b-1|0;i=i-!b|0;c=x[f+4>>2];b=(c|0)!=x[f+104>>2]}K:{if(!(b?Ba:1)){b=c+1|0;x[f+4>>2]=b;c=y[c|0];break K}if(!Ba|(I|0)==13){g=pk(f);J=13;if((Ba|0)==1){break a}c=g}}if(!Ba){b=(c|0)==48;if(b){continue}}break}m=Ba?m:1}if(!Ba){x[e+784>>2]=0;d=c-48|0;b=(c|0)==46}L:{M:{N:{O:{P:{if(Ba|(d>>>0<=9|b)){while(1){if(!Ba){Q:{if(b&1){if(!p){h=k;i=l;p=1;break Q}b=!m;break P}k=k+1|0;l=k?l:l+1|0;if((t|0)<=2044){C=(c|0)==48?C:k;b=(e+784|0)+(t<<2)|0;d=u?(D(x[b>>2],10)+c|0)-48|0:d;x[b>>2]=d;m=1;c=u+1|0;b=(c|0)==9;u=b?0:c;t=b+t|0;break Q}if((c|0)==48){break Q}x[e+8960>>2]=x[e+8960>>2]|1;C=18396}c=x[f+4>>2];b=(c|0)!=x[f+104>>2]}R:{if(!(b?Ba:1)){b=c+1|0;x[f+4>>2]=b;c=y[c|0];break R}if(!Ba|(I|0)==14){g=pk(f);J=14;if((Ba|0)==1){break a}c=g}}if(!Ba){b=(c|0)==46;d=c-48|0;if(b|d>>>0<10){continue}}break}}if(!Ba){h=p?h:k;i=p?i:l;b=!m}S:{if(!Ba){if(b){break S}b=(c&-33)!=69;if(b){break S}}if(!Ba|(I|0)==15){g=Ck(f,M);U=Da;J=15;if((Ba|0)==1){break a}w=U;r=g}if(!Ba){b=(r|0)!=0|(w|0)!=-2147483648;T:{if(b){break T}b=!M;if(b){break N}r=0;w=0;b=x[f+116>>2]<0;if(b){break T}b=x[f+4>>2]-1|0;x[f+4>>2]=b}i=i+w|0;h=h+r|0;i=h>>>0>>0?i+1|0:i;break M}}if(!Ba){b=!m;c=(c|0)<0;if(c){break O}}}if(!Ba){c=x[f+116>>2]<0;if(c){break O}c=x[f+4>>2]-1|0;x[f+4>>2]=c}}if(!Ba){b=!b;if(b){break M}x[12163]=28}}if(!Ba){k=0;l=0;ok(f,0,0);h=0;i=0;break L}}if(!Ba){f=x[e+784>>2];b=!f;if(b){tk(e,+(z|0)*0);k=x[e>>2];l=x[e+4>>2];h=x[e+8>>2];i=x[e+12>>2];break L}U:{if(k>>>0>9&(l|0)>=0|(l|0)>0|((h|0)!=(k|0)|(i|0)!=(l|0))){break U}c=f>>>P|0;if(c?(P|0)<=30:0){break U}qk(e+48|0,z);vk(e+32|0,f);b=e+16|0;rk(b,x[e+48>>2],x[e+52>>2],x[e+56>>2],x[e+60>>2],x[e+32>>2],x[e+36>>2],x[e+40>>2],x[e+44>>2]);k=x[e+16>>2];l=x[e+20>>2];h=x[e+24>>2];i=x[e+28>>2];break L}b=Q>>>1|0;if(b>>>0>>0&(i|0)>=0|(i|0)>0){x[12163]=68;qk(e+96|0,z);rk(e+80|0,x[e+96>>2],x[e+100>>2],x[e+104>>2],x[e+108>>2],-1,-1,-1,2147418111);b=e- -64|0;rk(b,x[e+80>>2],x[e+84>>2],x[e+88>>2],x[e+92>>2],-1,-1,-1,2147418111);k=x[e+64>>2];l=x[e+68>>2];h=x[e+72>>2];i=x[e+76>>2];break L}b=n-226|0;g=b>>>0>h>>>0;b=b>>31;if(g&(b|0)>=(i|0)|(b|0)>(i|0)){x[12163]=68;qk(e+144|0,z);rk(e+128|0,x[e+144>>2],x[e+148>>2],x[e+152>>2],x[e+156>>2],0,0,0,65536);b=e+112|0;rk(b,x[e+128>>2],x[e+132>>2],x[e+136>>2],x[e+140>>2],0,0,0,65536);k=x[e+112>>2];l=x[e+116>>2];h=x[e+120>>2];i=x[e+124>>2];break L}if(u){if((u|0)<=8){b=(e+784|0)+(t<<2)|0;f=x[b>>2];while(1){f=D(f,10);u=u+1|0;if((u|0)!=9){continue}break}x[b>>2]=f}t=t+1|0}u=h;V:{if((h|0)<(C|0)|(C|0)>=9|(h|0)>17){break V}if((h|0)==9){qk(e+192|0,z);c=x[e+784>>2];vk(e+176|0,c);b=e+160|0;rk(b,x[e+192>>2],x[e+196>>2],x[e+200>>2],x[e+204>>2],x[e+176>>2],x[e+180>>2],x[e+184>>2],x[e+188>>2]);k=x[e+160>>2];l=x[e+164>>2];h=x[e+168>>2];i=x[e+172>>2];break L}if((u|0)<=8){qk(e+272|0,z);vk(e+256|0,x[e+784>>2]);rk(e+240|0,x[e+272>>2],x[e+276>>2],x[e+280>>2],x[e+284>>2],x[e+256>>2],x[e+260>>2],x[e+264>>2],x[e+268>>2]);c=x[(0-u<<2)+35872>>2];qk(e+224|0,c);b=e+208|0;zk(b,x[e+240>>2],x[e+244>>2],x[e+248>>2],x[e+252>>2],x[e+224>>2],x[e+228>>2],x[e+232>>2],x[e+236>>2]);k=x[e+208>>2];l=x[e+212>>2];h=x[e+216>>2];i=x[e+220>>2];break L}b=(D(u,-3)+P|0)+27|0;f=x[e+784>>2];if(f>>>b|0?(b|0)<=30:0){break V}qk(e+352|0,z);vk(e+336|0,f);rk(e+320|0,x[e+352>>2],x[e+356>>2],x[e+360>>2],x[e+364>>2],x[e+336>>2],x[e+340>>2],x[e+344>>2],x[e+348>>2]);c=x[(u<<2)+35800>>2];qk(e+304|0,c);b=e+288|0;rk(b,x[e+320>>2],x[e+324>>2],x[e+328>>2],x[e+332>>2],x[e+304>>2],x[e+308>>2],x[e+312>>2],x[e+316>>2]);k=x[e+288>>2];l=x[e+292>>2];h=x[e+296>>2];i=x[e+300>>2];break L}while(1){b=t;t=b-1|0;if(!x[(e+784|0)+(t<<2)>>2]){continue}break}C=0;c=(u|0)%9|0;W:{if(!c){d=0;break W}d=0;h=(u|0)<0?c+9|0:c;X:{if(!b){b=0;break X}k=x[(0-h<<2)+35872>>2];i=1e9/(k|0)|0;c=0;f=0;while(1){g=e+784|0;r=g+(f<<2)|0;l=x[r>>2];m=(l>>>0)/(k>>>0)|0;c=m+c|0;x[r>>2]=c;c=!c&(d|0)==(f|0);d=c?d+1&2047:d;u=c?u-9|0:u;c=D(i,l-D(k,m)|0);f=f+1|0;if((f|0)!=(b|0)){continue}break}if(!c){break X}x[(b<<2)+g>>2]=c;b=b+1|0}u=(u-h|0)+9|0}while(1){r=(e+784|0)+(d<<2)|0;M=(u|0)<36;Y:{while(1){if(!M&((u|0)!=36|A[r>>2]>=10384593)){break Y}t=b+2047|0;m=0;while(1){c=b;k=t&2047;f=(e+784|0)+(k<<2)|0;b=x[f>>2];i=b>>>3|0;b=b<<29;h=b+m|0;i=b>>>0>h>>>0?i+1|0:i;if(!i&h>>>0<1000000001){m=0}else{b=h;m=Is(b,i,1e9);h=b-Hs(m,Da,1e9,0)|0}x[f>>2]=h;b=(d|0)==(k|0)?c:h?c:k;h=c-1&2047;b=(h|0)!=(k|0)?c:b;t=k-1|0;if((d|0)!=(k|0)){continue}break}C=C-29|0;b=c;if(!m){continue}break}d=d-1&2047;if((d|0)==(c|0)){g=e+784|0;b=g+((c+2046&2047)<<2)|0;x[b>>2]=x[(h<<2)+g>>2]|x[b>>2];b=h}u=u+9|0;x[(e+784|0)+(d<<2)>>2]=m;continue}break}Z:{_:while(1){N=b+1&2047;Q=(e+784|0)+((b-1&2047)<<2)|0;while(1){c=(u|0)>45?9:1;$:{while(1){m=d;f=0;aa:{while(1){ba:{d=f+m&2047;if((d|0)==(b|0)){break ba}d=x[(e+784|0)+(d<<2)>>2];h=x[(f<<2)+35824>>2];if(d>>>0>>0){break ba}if(d>>>0>h>>>0){break aa}f=f+1|0;if((f|0)!=4){continue}}break}if((u|0)!=36){break aa}h=0;i=0;f=0;k=0;l=0;while(1){c=f+m&2047;if((c|0)==(b|0)){b=b+1&2047;x[((b<<2)+e|0)+780>>2]=0}vk(e+768|0,x[(e+784|0)+(c<<2)>>2]);rk(e+752|0,h,i,k,l,0,0,1342177280,1075633366);sk(e+736|0,x[e+752>>2],x[e+756>>2],x[e+760>>2],x[e+764>>2],x[e+768>>2],x[e+772>>2],x[e+776>>2],x[e+780>>2]);k=x[e+744>>2];l=x[e+748>>2];h=x[e+736>>2];i=x[e+740>>2];f=f+1|0;if((f|0)!=4){continue}break}qk(e+720|0,z);rk(e+704|0,h,i,k,l,x[e+720>>2],x[e+724>>2],x[e+728>>2],x[e+732>>2]);k=x[e+712>>2];l=x[e+716>>2];h=0;i=0;r=x[e+704>>2];w=x[e+708>>2];d=C+113|0;f=d-n|0;p=(P|0)>(f|0);c=p?(f|0)>0?f:0:P;if((c|0)<=112){break $}break Z}C=c+C|0;d=b;if((b|0)==(m|0)){continue}break}k=1e9>>>c|0;M=-1<>2];h=(r>>>c|0)+f|0;x[i>>2]=h;h=!h&(d|0)==(m|0);d=h?d+1&2047:d;u=h?u-9|0:u;f=D(k,r&M);m=m+1&2047;if((m|0)!=(b|0)){continue}break}if(!f){continue}if((d|0)!=(N|0)){x[(b<<2)+g>>2]=f;b=N;continue _}x[Q>>2]=x[Q>>2]|1;continue}break}break}tk(e+656|0,bg(1,225-c|0));uk(e+688|0,x[e+656>>2],x[e+660>>2],x[e+664>>2],x[e+668>>2],r,w,k,l);K=x[e+696>>2];L=x[e+700>>2];F=x[e+688>>2];H=x[e+692>>2];tk(e+640|0,bg(1,113-c|0));Ak(e+672|0,r,w,k,l,x[e+640>>2],x[e+644>>2],x[e+648>>2],x[e+652>>2]);h=x[e+672>>2];i=x[e+676>>2];o=x[e+680>>2];s=x[e+684>>2];wk(e+624|0,r,w,k,l,h,i,o,s);sk(e+608|0,F,H,K,L,x[e+624>>2],x[e+628>>2],x[e+632>>2],x[e+636>>2]);k=x[e+616>>2];l=x[e+620>>2];r=x[e+608>>2];w=x[e+612>>2]}t=m+4&2047;ca:{if((t|0)==(b|0)){break ca}t=x[(e+784|0)+(t<<2)>>2];da:{if(t>>>0<=499999999){if(!t){m=m+5&2047;if((m|0)==(b|0)){break da}}tk(e+496|0,+(z|0)*.25);sk(e+480|0,h,i,o,s,x[e+496>>2],x[e+500>>2],x[e+504>>2],x[e+508>>2]);o=x[e+488>>2];s=x[e+492>>2];h=x[e+480>>2];i=x[e+484>>2];break da}if((t|0)!=5e8){tk(e+592|0,+(z|0)*.75);sk(e+576|0,h,i,o,s,x[e+592>>2],x[e+596>>2],x[e+600>>2],x[e+604>>2]);o=x[e+584>>2];s=x[e+588>>2];h=x[e+576>>2];i=x[e+580>>2];break da}Y=+(z|0);m=m+5&2047;if((m|0)==(b|0)){tk(e+528|0,Y*.5);sk(e+512|0,h,i,o,s,x[e+528>>2],x[e+532>>2],x[e+536>>2],x[e+540>>2]);o=x[e+520>>2];s=x[e+524>>2];h=x[e+512>>2];i=x[e+516>>2];break da}tk(e+560|0,Y*.75);sk(e+544|0,h,i,o,s,x[e+560>>2],x[e+564>>2],x[e+568>>2],x[e+572>>2]);o=x[e+552>>2];s=x[e+556>>2];h=x[e+544>>2];i=x[e+548>>2]}if((c|0)>111){break ca}Ak(e+464|0,h,i,o,s,0,0,0,1073676288);if(Gg(x[e+464>>2],x[e+468>>2],x[e+472>>2],x[e+476>>2],0,0,0,0)){break ca}sk(e+448|0,h,i,o,s,0,0,0,1073676288);o=x[e+456>>2];s=x[e+460>>2];h=x[e+448>>2];i=x[e+452>>2]}sk(e+432|0,r,w,k,l,h,i,o,s);wk(e+416|0,x[e+432>>2],x[e+436>>2],x[e+440>>2],x[e+444>>2],F,H,K,L);k=x[e+424>>2];l=x[e+428>>2];r=x[e+416>>2];w=x[e+420>>2];d=d&2147483647;ea:{if((d|0)<=(X-2|0)){break ea}b=e+400|0;x[b+8>>2]=k;x[b+12>>2]=l&2147483647;x[b>>2]=r;x[b+4>>2]=w;rk(e+384|0,r,w,k,l,0,0,0,1073610752);d=Hg(x[e+400>>2],x[e+404>>2],x[e+408>>2],x[e+412>>2],1081081856);b=(d|0)>=0;k=b?x[e+392>>2]:k;l=b?x[e+396>>2]:l;r=b?x[e+384>>2]:r;w=b?x[e+388>>2]:w;m=Gg(h,i,o,s,0,0,0,0);C=b+C|0;if((C+110|0)<=(X|0)){b=((c|0)!=(f|0)|(d|0)<0)&p;c=(m|0)!=0;if(!(b&c)){break ea}}x[12163]=68}b=e+368|0;xk(b,r,w,k,l,C);k=x[e+368>>2];l=x[e+372>>2];h=x[e+376>>2];i=x[e+380>>2]}}if(!Ba){x[O+8>>2]=h;x[O+12>>2]=i;x[O>>2]=k;x[O+4>>2]=l;ya=e+8976|0;h=x[B+40>>2];i=x[B+44>>2];k=x[B+32>>2];l=x[B+36>>2];break b}}if(!Ba){h=x[b+112>>2];c=x[b+116>>2];i=c;if((c|0)>0|(c|0)>=0){x[b+4>>2]=x[b+4>>2]-1}x[12163]=28;break j}}if(!Ba){c=x[b+4>>2];f=(c|0)!=x[b+104>>2]}fa:{if(!(f?Ba:1)){f=c+1|0;x[b+4>>2]=f;c=y[c|0];break fa}if(!Ba|(I|0)==16){g=pk(b);J=16;if((Ba|0)==1){break a}c=g}}if(!Ba){ga:{c=(c|0)==40;if(c){f=1;break ga}h=0;i=2147450880;if(x[b+116>>2]<0){break b}x[b+4>>2]=x[b+4>>2]-1;break b}}while(1){U=Ba;if(Ba){g=m}else{c=x[b+4>>2];g=(c|0)!=x[b+104>>2]}ha:{if(!(g?U:1)){x[b+4>>2]=c+1;c=y[c|0];break ha}if(!Ba|(I|0)==17){g=pk(b);J=17;if((Ba|0)==1){break a}c=g}}if(!Ba){m=c-65|0;ia:{ja:{if(c-48>>>0<10){break ja}m=m>>>0<26;if(m){break ja}m=c-97|0;if((c|0)==95){break ja}m=m>>>0>=26;if(m){break ia}}f=f+1|0;continue}}break}if(!Ba){h=0;i=2147450880;if((c|0)==41){break b}c=x[b+116>>2];if((c|0)>=0|(c|0)>0){x[b+4>>2]=x[b+4>>2]-1}ka:{if(d){if(f){break ka}break b}x[12163]=28;break j}while(1){if((c|0)>0|(c|0)>=0){x[b+4>>2]=x[b+4>>2]-1}f=f-1|0;if(f){continue}break}break b}}if(!Ba){ok(b,0,0)}}b=Ba;h=b?h:0;i=b?i:0}if(!Ba){x[a>>2]=k;x[a+4>>2]=l;x[a+8>>2]=h;x[a+12>>2]=i;ya=B+48|0}return}x[x[Ca>>2]>>2]=J;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[g+28>>2]=i;x[g+32>>2]=k;x[g+36>>2]=l;x[g+40>>2]=m;x[g+44>>2]=p;x[g+48>>2]=t;x[g+52>>2]=o;x[g+56>>2]=s;x[g+60>>2]=u;x[g+64>>2]=n;x[g+68>>2]=r;x[g+72>>2]=w;x[g+76>>2]=z;x[g+80>>2]=M;x[g+84>>2]=C;x[g+88>>2]=F;x[g+92>>2]=H;x[g+96>>2]=B;x[g+100>>2]=K;x[g+104>>2]=L;x[g+108>>2]=N;x[g+112>>2]=P;x[g+116>>2]=Q;x[g+120>>2]=O;x[g+124>>2]=R;x[g+128>>2]=S;x[g+132>>2]=V;x[g+136>>2]=W;x[g+140>>2]=X;x[g+144>>2]=T;x[Ca>>2]=x[Ca>>2]+148}function Fk(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,z=0,A=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=E(0),S=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-120;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+12>>2];d=x[b+16>>2];g=x[b+20>>2];h=x[b+24>>2];k=x[b+28>>2];i=x[b+32>>2];l=x[b+36>>2];j=x[b+40>>2];m=x[b+44>>2];n=x[b+48>>2];o=x[b+52>>2];q=x[b+56>>2];t=x[b+60>>2];G=x[b+64>>2];z=x[b+68>>2];J=x[b+72>>2];I=x[b+76>>2];u=x[b+80>>2];A=x[b+84>>2];H=x[b+88>>2];L=x[b+92>>2];M=x[b+96>>2];K=x[b+100>>2];F=x[b+104>>2];O=x[b+108>>2];N=x[b+112>>2];P=x[b+116>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;r=x[x[Ca>>2]>>2]}if(!Ba){d=ya-144|0;ya=d;e=nf(d,0,144);x[e+76>>2]=-1;x[e+44>>2]=a;x[e+32>>2]=265;x[e+84>>2]=a;d=b;M=c;n=ya-304|0;ya=n;b=!x[e+4>>2];a=0}a:{b:{c:{if((Ba|0)==2|b){if(!Ba|!r){f=Bf(e);if((Ba|0)==1){break a}b=f}if(!Ba){b=!x[e+4>>2];if(b){break c}}}if(!Ba){c=y[d|0];b=!c;if(b){break b}P=n+16|0}d:{e:{f:{g:{h:{while(1){i:{if(!Ba){b=nk(c&255)}j:{if((Ba|0)==2|b){if(!Ba){while(1){c=d;d=d+1|0;b=nk(y[c+1|0]);if(b){continue}break}ok(e,0,0)}while(1){if(!Ba){d=x[e+4>>2];b=(d|0)!=x[e+104>>2]}k:{if(!(b?Ba:1)){x[e+4>>2]=d+1;b=y[d|0];break k}if(!Ba|(r|0)==1){f=pk(e);s=1;if((Ba|0)==1){break a}b=f}}if(!Ba){b=nk(b);if(b){continue}}break}if(!Ba){d=x[e+4>>2];b=x[e+116>>2];if((b|0)>0){b=1}else{b=(b|0)>=0}if(b){d=d-1|0;x[e+4>>2]=d}b=x[e+120>>2];j=b+G|0;m=x[e+124>>2]+z|0;m=b>>>0>j>>>0?m+1|0:m;b=d-x[e+44>>2]|0;h=b;k=b>>31;f=k+m|0;G=b+j|0;z=G>>>0>>0?f+1|0:f;break j}}b=Ba?b:y[d|0]==37;l:{m:{n:{if(!Ba){if(b){c=y[d+1|0];b=(c|0)==42;if(b){break n}b=(c|0)!=37;if(b){break m}}ok(e,0,0);b=y[d|0]==37}o:{if((Ba|0)==2|b){while(1){if(!Ba){c=x[e+4>>2];b=(c|0)!=x[e+104>>2]}p:{if(!(b?Ba:1)){b=c+1|0;x[e+4>>2]=b;c=y[c|0];break p}if(!Ba|(r|0)==2){f=pk(e);s=2;if((Ba|0)==1){break a}c=f}}if(!Ba){b=nk(c);if(b){continue}}break}if(!Ba){d=d+1|0;break o}}if(!Ba){c=x[e+4>>2];b=(c|0)!=x[e+104>>2];if(b){b=c+1|0;x[e+4>>2]=b;c=y[c|0];break o}}if(!Ba|(r|0)==3){f=pk(e);s=3;if((Ba|0)==1){break a}c=f}}if(!Ba){if(y[d|0]!=(c|0)){a=x[e+116>>2];if((a|0)>0){a=1}else{a=(a|0)>=0}if(a){x[e+4>>2]=x[e+4>>2]-1}if(J|(c|0)>=0){break b}break c}b=x[e+120>>2];j=b+G|0;f=x[e+124>>2]+z|0;f=b>>>0>j>>>0?f+1|0:f;b=x[e+4>>2]-x[e+44>>2]|0;h=b;m=f;k=b>>31;z=f+k|0;G=b+j|0;z=G>>>0>>0?z+1|0:z;c=d;break j}}if(!Ba){q=0;c=d+2|0;break l}}if(!Ba){q:{b=!ig(c);if(b){break q}b=y[d+2|0]!=36;if(b){break q}b=y[d+1|0]-48|0;c=ya-16|0;x[c+12>>2]=M;b=b>>>0>1?((b<<2)+M|0)-4|0:M;g=b+4|0;x[c+8>>2]=g;q=x[b>>2];c=d+3|0;break l}q=x[M>>2];M=M+4|0;c=d+1|0}}if(!Ba){L=0;d=0;if(ig(y[c|0])){while(1){d=(y[c|0]+D(d,10)|0)-48|0;b=y[c+1|0];c=c+1|0;if(ig(b)){continue}break}}l=y[c|0];if((l|0)!=109){b=c}else{o=0;L=(q|0)!=0;l=y[c+1|0];a=0;b=c+1|0}c=b+1|0;g=3;t=L;r:{s:{switch((l&255)-65|0){case 39:f=b+2|0;b=y[b+1|0]==104;c=b?f:c;g=b?-2:-1;break r;case 43:f=b+2|0;b=y[b+1|0]==108;c=b?f:c;g=b?3:1;break r;case 51:case 57:g=1;break r;case 11:g=2;break r;case 41:break r;case 0:case 2:case 4:case 5:case 6:case 18:case 23:case 26:case 32:case 34:case 35:case 36:case 37:case 38:case 40:case 45:case 46:case 47:case 50:case 52:case 55:break s;default:break e}}g=0;c=b}b=y[c|0];l=(b&47)==3;t=l?1:g;g=b|32;I=l?g:b;b=(I|0)==91}t:{if(!Ba){if(b){break t}u:{b=(I|0)!=110;if(b){b=(I|0)!=99;if(b){break u}b=(d|0)<=1;d=b?1:d;break t}Ek(q,t,G,z);break j}ok(e,0,0)}while(1){if(!Ba){b=x[e+4>>2];g=(b|0)!=x[e+104>>2]}v:{if(!(g?Ba:1)){g=b+1|0;x[e+4>>2]=g;b=y[b|0];break v}if(!Ba|(r|0)==4){f=pk(e);s=4;if((Ba|0)==1){break a}b=f}}if(!Ba){b=nk(b);if(b){continue}}break}if(!Ba){b=x[e+4>>2];j=x[e+116>>2];if((j|0)>0){f=1}else{f=(j|0)>=0}if(f){b=b-1|0;x[e+4>>2]=b}h=x[e+120>>2];j=h+G|0;m=x[e+124>>2]+z|0;m=h>>>0>j>>>0?m+1|0:m;g=x[e+44>>2];b=b-g|0;h=b;k=b>>31;z=k+m|0;G=b+j|0;z=G>>>0>>0?z+1|0:z}}if(!Ba){b=d>>31;k=b;ok(e,d,b);b=x[e+4>>2];g=(b|0)!=x[e+104>>2];h=d}w:{if(!(g?Ba:1)){b=b+1|0;x[e+4>>2]=b;break w}if(!Ba|(r|0)==5){f=pk(e);s=5;if((Ba|0)==1){break a}b=f}if(!Ba){b=(b|0)<0;if(b){break f}}}if(!Ba){j=x[e+112>>2];b=x[e+116>>2];m=b;if((b|0)>0|(b|0)>=0){x[e+4>>2]=x[e+4>>2]-1}g=I-88|0;b=16}x:{y:{z:{A:{B:{C:{D:{E:{if(!Ba){F:{switch(g|0){default:d=I-65|0;b=d>>>0>6;if(b){break x}b=!(1<>2];b=x[e+4>>2]-d|0;j=0-b|0;h=x[e+120>>2];m=0-((b>>31)+((b|0)!=0)|0)|0;k=x[e+124>>2];b=(j|0)!=(h|0)|(m|0)!=(k|0);if(b){break z}break g}}if(!Ba){b=(I|16)==115;if(b){nf(n+32|0,-1,257);v[n+32|0]=0;a=(I|0)!=115;if(a){break y}v[n+65|0]=0;v[n+46|0]=0;w[n+42>>1]=0;w[n+44>>1]=0;break y}g=y[c+1|0];f=(g|0)==94;nf(n+32|0,f,257);v[n+32|0]=0;u=c+1|0;b=f?c+2|0:u;G:{H:{I:{c=y[(f?2:1)+c|0];if((c|0)!=45){if((c|0)==93){break I}g=(g|0)!=94;break G}g=(g|0)!=94;v[n+78|0]=g;break H}g=(g|0)!=94;v[n+126|0]=g}b=b+1|0}c=b;while(1){b=y[c|0];J:{if((b|0)!=45){if(!b){break f}l=(b|0)==93;if(l){break y}break J}b=45;u=y[c+1|0];if(!u|(u|0)==93){break J}f=c+1|0;c=y[c-1|0];K:{if(u>>>0<=c>>>0){b=u;break K}while(1){c=c+1|0;v[c+(n+32|0)|0]=g;b=y[f|0];u=c>>>0>>0;if(u){continue}break}}c=f}v[(b+n|0)+33|0]=g;c=c+1|0;continue}}}if(!Ba){b=8;break A}}if(!Ba){b=10;break A}}b=Ba?b:0}if(!Ba){h=0;k=0;g=0;j=0;m=0;l=0;u=0;N=ya-16|0;ya=N;i=b>>>0<=36;d=!(i&(b|0)!=1)}L:{if(!(d?Ba:1)){x[12163]=28;break L}while(1){if(!Ba){d=x[e+4>>2];i=(d|0)!=x[e+104>>2]}M:{if(!(i?Ba:1)){i=d+1|0;x[e+4>>2]=i;d=y[d|0];break M}if(!Ba|(r|0)==7){f=pk(e);s=7;if((Ba|0)==1){break a}d=f}}if(!Ba){i=nk(d);if(i){continue}}break}i=Ba?i:d-43|0;N:{if(!Ba){O:{switch(i|0){case 0:case 2:break O;default:break N}}u=(d|0)==45?-1:0;d=x[e+4>>2];i=(d|0)!=x[e+104>>2];if(i){i=d+1|0;x[e+4>>2]=i;d=y[d|0];break N}}if(!Ba|(r|0)==8){f=pk(e);s=8;if((Ba|0)==1){break a}d=f}}if(!Ba){K=(b|0)!=16;i=K&(b|0)!=0}P:{Q:{R:{S:{T:{if(!Ba){if(i){break T}i=(d|0)!=48;if(i){break T}d=x[e+4>>2];i=(d|0)!=x[e+104>>2]}U:{if(!(i?Ba:1)){i=d+1|0;x[e+4>>2]=i;d=y[d|0];break U}if(!Ba|(r|0)==9){f=pk(e);s=9;if((Ba|0)==1){break a}d=f}}i=Ba?i:(d&-33)==88;if(i|(Ba|0)==2){if(!Ba){d=x[e+4>>2];i=(d|0)!=x[e+104>>2];b=16}V:{if(!(i?Ba:1)){i=d+1|0;x[e+4>>2]=i;d=y[d|0];break V}if(!Ba|(r|0)==10){f=pk(e);s=10;if((Ba|0)==1){break a}d=f}}if(!Ba){i=y[d+35905|0]<16;if(i){break R}h=x[e+112>>2];b=x[e+116>>2];k=b;b=(b|0)>0|(b|0)>=0;if(b){b=x[e+4>>2]-1|0;x[e+4>>2]=b}ok(e,0,0);break L}}if(!Ba){if(b){break S}b=8;break R}}if(!Ba){b=b?b:10;i=b>>>0>y[d+35905|0];if(i){break S}h=x[e+112>>2];b=x[e+116>>2];k=b;b=(b|0)>0|(b|0)>=0;if(b){b=x[e+4>>2]-1|0;x[e+4>>2]=b}ok(e,0,0);x[12163]=28;break L}}if(!Ba){i=(b|0)!=10;if(i){break R}g=d-48|0;b=g>>>0<=9}if((Ba|0)==2|b){d=Ba?d:0;while(1){if(!Ba){d=D(d,10)+g|0;l=d>>>0<429496729;b=x[e+4>>2];g=(b|0)!=x[e+104>>2]}W:{if(!(g?Ba:1)){g=b+1|0;x[e+4>>2]=g;b=y[b|0];break W}if(!Ba|(r|0)==11){f=pk(e);s=11;if((Ba|0)==1){break a}b=f}}if(!Ba){g=b-48|0;b=g>>>0<=9&l;if(b){continue}}break}f=Ba;h=f?h:d;k=f?k:0}if(!Ba){b=g>>>0>9;if(b){break P}A=Hs(h,k,10,0);H=Da;m=0;j=g}while(1){if(!Ba){d=x[e+4>>2];b=(d|0)!=x[e+104>>2]}X:{if(!(b?Ba:1)){b=d+1|0;x[e+4>>2]=b;d=y[d|0];break X}if(!Ba|(r|0)==12){f=pk(e);s=12;if((Ba|0)==1){break a}d=f}}if(!Ba){f=m+H|0;h=j+A|0;k=h>>>0>>0?f+1|0:f;l=(k|0)==429496729&h>>>0<2576980378|k>>>0<429496729;g=d-48|0;if(!(l&g>>>0<=9)){b=10;g=g>>>0<=9;if(g){break Q}break P}A=Hs(h,k,10,0);j=g;m=0;O=-1;H=Da;b=H;F=g^-1;b=(b|0)==-1&F>>>0>=A>>>0|(b|0)!=-1;if(b){continue}}break}if(!Ba){b=10;break Q}}i=Ba?i:b-1&b;if(i|(Ba|0)==2){if(!Ba){l=y[d+35905|0];i=l>>>0>>0}if((Ba|0)==2|i){while(1){if(!Ba){g=D(b,g)+l|0;i=g>>>0<119304647;d=x[e+4>>2];l=(d|0)!=x[e+104>>2]}Y:{if(!(l?Ba:1)){l=d+1|0;x[e+4>>2]=l;d=y[d|0];break Y}if(!Ba|(r|0)==13){f=pk(e);s=13;if((Ba|0)==1){break a}d=f}}if(!Ba){l=y[d+35905|0];K=l>>>0>>0;i=K&i;if(i){continue}}break}f=Ba;h=f?h:g;k=f?k:0}if(!Ba){g=b>>>0<=l>>>0;if(g){break Q}H=0;A=b}while(1){if(!Ba){j=Hs(h,k,A,H);O=0;m=Da;f=m;F=l&255;g=(f|0)==-1&(F^-1)>>>0>>0;if(g){break Q}h=j+F|0;k=h>>>0>>0?f+1|0:f;d=x[e+4>>2];g=(d|0)!=x[e+104>>2]}Z:{if(!(g?Ba:1)){g=d+1|0;x[e+4>>2]=g;d=y[d|0];break Z}if(!Ba|(r|0)==14){f=pk(e);s=14;if((Ba|0)==1){break a}d=f}}if(!Ba){l=y[d+35905|0];g=l>>>0>=b>>>0;if(g){break Q}yk(N,A,H,0,0,h,k,0,0);j=x[N+8>>2];m=x[N+12>>2];g=!(j|m);if(g){continue}}break}if(!Ba){break Q}}if(!Ba){g=y[d+35905|0];K=g>>>0>>0;i=v[(D(b,23)>>>5&7)+36161|0]}if((Ba|0)==2|K){while(1){if(!Ba){l=l<>>0<134217728;d=x[e+4>>2];g=(d|0)!=x[e+104>>2]}_:{if(!(g?Ba:1)){g=d+1|0;x[e+4>>2]=g;d=y[d|0];break _}if(!Ba|(r|0)==15){f=pk(e);s=15;if((Ba|0)==1){break a}d=f}}if(!Ba){g=y[d+35905|0];K=g>>>0>>0&K;if(K){continue}}break}f=Ba;h=f?h:l;k=f?k:0}if(!Ba){l=b>>>0<=g>>>0;if(l){break Q}m=0;j=i;F=j&31;if((j&63)>>>0>=32){f=0;F=-1>>>F|0}else{f=-1>>>F|0;F=f|(1<>>0>F>>>0|f>>>0>>0;if(l){break Q}}while(1){if(!Ba){H=0;A=g&255;g=h;d=j&31;if((j&63)>>>0>=32){f=g<>>32-d|k<>2];g=(d|0)!=x[e+104>>2]}$:{if(!(g?Ba:1)){g=d+1|0;x[e+4>>2]=g;d=y[d|0];break $}if(!Ba|(r|0)==16){f=pk(e);s=16;if((Ba|0)==1){break a}d=f}}if(!Ba){g=y[d+35905|0];l=g>>>0>=b>>>0;if(l){break Q}l=(k|0)==(O|0)&h>>>0<=F>>>0|k>>>0>>0;if(l){continue}}break}}if(!Ba){d=y[d+35905|0]>=b>>>0;if(d){break P}}while(1){if(!Ba){d=x[e+4>>2];g=(d|0)!=x[e+104>>2]}aa:{if(!(g?Ba:1)){g=d+1|0;x[e+4>>2]=g;d=y[d|0];break aa}if(!Ba|(r|0)==17){f=pk(e);s=17;if((Ba|0)==1){break a}d=f}}if(!Ba){d=y[d+35905|0]>>0;if(d){continue}}break}if(!Ba){x[12163]=68;u=0;k=-1;h=-1}}if(!Ba){b=x[e+116>>2];if((b|0)>0){b=1}else{b=(b|0)>=0}if(b){x[e+4>>2]=x[e+4>>2]-1}b=(h&k)!=-1;ba:{if(b){break ba}}h=h^u;j=h-u|0;m=u>>31;k=m^k;m=k-((h>>>0>>0)+m|0)|0}}if(!Ba){ya=N+16|0;h=j;k=m;j=x[e+120>>2];b=x[e+4>>2]-x[e+44>>2]|0;A=0-b|0;m=x[e+124>>2];H=0-((b>>31)+((b|0)!=0)|0)|0;if((j|0)==(A|0)&(m|0)==(H|0)){break g}ca:{b=(I|0)!=112;if(b){break ca}b=!q;if(b){break ca}x[q>>2]=h;break x}Ek(q,t,h,k);break x}}if(!Ba){b=!q;if(b){break x}h=x[P>>2];k=x[P+4>>2];j=x[n+8>>2];m=x[n+12>>2];da:{switch(t|0){case 0:Q=q,R=Dk(j,m,h,k),B[Q>>2]=R;break x;case 1:Q=q,S=Fg(j,m,h,k),C[Q>>3]=S;break x;case 2:break da;default:break x}}x[q>>2]=j;x[q+4>>2]=m;x[q+8>>2]=h;x[q+12>>2]=k;break x}}if(!Ba){l=(I|0)!=99;g=l?31:d+1|0;a=(t|0)==1}ea:{if((Ba|0)==2|a){if(!Ba){b=q;if(L){b=yg(g<<2);a=!b;if(a){break h}}x[n+296>>2]=0;x[n+300>>2]=0;d=0}while(1){a=Ba?a:b;fa:{while(1){if(!Ba){b=x[e+4>>2];o=(b|0)!=x[e+104>>2]}ga:{if(!(o?Ba:1)){o=b+1|0;x[e+4>>2]=o;b=y[b|0];break ga}if(!Ba|(r|0)==18){f=pk(e);s=18;if((Ba|0)==1){break a}b=f}}if(!Ba){o=!y[(b+n|0)+33|0];if(o){break fa}v[n+27|0]=b;t=n+296|0;b=Ej(n+28|0,n+27|0,1,t);o=(b|0)==-2;if(o){continue}if((b|0)==-1){o=0;break f}if(a){o=x[n+28>>2];x[(d<<2)+a>>2]=o;d=d+1|0}b=!L;if(b){continue}b=(d|0)!=(g|0);if(b){continue}}break}if(!Ba){t=1;o=0;g=g<<1|1;b=Ag(a,g<<2);if(b){continue}break e}}break}if(!Ba){o=0;g=a;b=n+296|0;if(b){b=x[b>>2]}else{b=0}if(b){break f}break ea}}if((Ba|0)==2|L){if(!Ba){d=0;b=yg(g);a=!b;if(a){break h}}while(1){a=Ba?a:b;while(1){if(!Ba){b=x[e+4>>2];o=(b|0)!=x[e+104>>2]}ha:{if(!(o?Ba:1)){o=b+1|0;x[e+4>>2]=o;b=y[b|0];break ha}if(!Ba|(r|0)==19){f=pk(e);s=19;if((Ba|0)==1){break a}b=f}}if(!Ba){if(!y[(b+n|0)+33|0]){g=0;o=a;break ea}o=a+d|0;v[o|0]=b;d=d+1|0;b=(g|0)!=(d|0);if(b){continue}}break}if(!Ba){t=1;g=g<<1|1;b=Ag(a,g);if(b){continue}}break}if(!Ba){o=a;a=0;break e}}d=Ba?d:0;if((Ba|0)==2|q){while(1){if(!Ba){b=x[e+4>>2];a=(b|0)!=x[e+104>>2]}ia:{if(!(a?Ba:1)){a=b+1|0;x[e+4>>2]=a;b=y[b|0];break ia}if(!Ba|(r|0)==20){f=pk(e);s=20;if((Ba|0)==1){break a}b=f}}if(!Ba){if(y[(b+n|0)+33|0]){a=d+q|0;v[a|0]=b;d=d+1|0;continue}else{g=0;a=q;o=a;break ea}}break}}while(1){if(!Ba){d=x[e+4>>2];a=(d|0)!=x[e+104>>2]}ja:{if(!(a?Ba:1)){x[e+4>>2]=d+1;a=y[d|0];break ja}if(!Ba|(r|0)==21){f=pk(e);s=21;if((Ba|0)==1){break a}a=f}}if(!Ba){a=y[(a+n|0)+33|0];if(a){continue}}break}if(!Ba){o=0;g=0;d=0;a=0}}if(!Ba){b=x[e+4>>2];j=x[e+116>>2];if((j|0)>0){f=1}else{f=(j|0)>=0}if(f){b=b-1|0;x[e+4>>2]=b}t=x[e+44>>2];A=b-t|0;b=x[e+120>>2];j=A+b|0;H=A>>31;f=H+x[e+124>>2]|0;m=b>>>0>j>>>0?f+1|0:f;if(!(m|j)){break i}b=!((h|0)==(j|0)&(k|0)==(m|0)|l);if(b){break i}if(L){x[q>>2]=a}ka:{if((I|0)==99){break ka}if(g){x[(d<<2)+g>>2]=0}if(!o){o=0;break ka}v[d+o|0]=0}a=g}}if(!Ba){m=x[e+124>>2]+z|0;b=x[e+120>>2];j=b+G|0;h=x[e+4>>2]-x[e+44>>2]|0;G=j+h|0;m=b>>>0>j>>>0?m+1|0:m;k=h>>31;f=m+k|0;b=(q|0)!=0;J=J+b|0;z=h>>>0>G>>>0?f+1|0:f}}if(!Ba){d=c+1|0;c=y[c+1|0];if(c){continue}break b}}break}if(!Ba){a=g;break g}}if(!Ba){t=1;o=0;a=0;break e}}if(!Ba){t=L;break d}}t=Ba?t:L}J=Ba?J:J?J:-1}if(!Ba){if(!t){break b}zg(o);zg(a);break b}}J=Ba?J:-1}if(!Ba){ya=n+304|0;ya=e+144|0;return J}p()}x[x[Ca>>2]>>2]=s;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=e;x[f+16>>2]=d;x[f+20>>2]=g;x[f+24>>2]=h;x[f+28>>2]=k;x[f+32>>2]=i;x[f+36>>2]=l;x[f+40>>2]=j;x[f+44>>2]=m;x[f+48>>2]=n;x[f+52>>2]=o;x[f+56>>2]=q;x[f+60>>2]=t;x[f+64>>2]=G;x[f+68>>2]=z;x[f+72>>2]=J;x[f+76>>2]=I;x[f+80>>2]=u;x[f+84>>2]=A;x[f+88>>2]=H;x[f+92>>2]=L;x[f+96>>2]=M;x[f+100>>2]=K;x[f+104>>2]=F;x[f+108>>2]=O;x[f+112>>2]=N;x[f+116>>2]=P;x[Ca>>2]=x[Ca>>2]+120;return 0}function ic(a,b,c,d,e,f,g,h){var i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0,w=0,z=0,D=0,G=0,I=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=E(0),X=0,Y=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-140;i=x[Ca>>2];a=x[i>>2];e=x[i+16>>2];f=x[i+12>>2];l(0,f|0);l(1,e|0);c=+n();d=B[i+20>>2];e=x[i+24>>2];f=x[i+28>>2];g=x[i+32>>2];h=x[i+36>>2];k=x[i+40>>2];m=x[i+44>>2];q=x[i+48>>2];t=x[i+56>>2];u=x[i+52>>2];l(0,u|0);l(1,t|0);w=+n();u=x[i+60>>2];z=x[i+64>>2];D=x[i+68>>2];t=x[i+72>>2];I=x[i+76>>2];L=x[i+84>>2];M=x[i+80>>2];l(0,M|0);l(1,L|0);G=+n();N=x[i+88>>2];O=x[i+92>>2];P=x[i+96>>2];L=x[i+100>>2];Q=x[i+104>>2];M=x[i+112>>2];R=x[i+108>>2];l(0,R|0);l(1,M|0);S=+n();M=x[i+120>>2];R=x[i+116>>2];l(0,R|0);l(1,M|0);T=+n();U=x[i+124>>2];M=x[i+128>>2];R=x[i+132>>2];V=x[i+136>>2];r=x[i+8>>2];i=x[i+4>>2];l(0,i|0);l(1,r|0);b=+n()}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;s=x[x[Ca>>2]>>2]}if(!Ba){m=ya-160|0;ya=m;q=y[a+32|0];v[a+32|0]=0;G=C[a+16>>3];w=b/c;k=x[a+8>>2];z=e?e:k;S=+(z|0);T=w*S;N=Lf(T)}a:{b:{c:{if(!Ba){if(q){break c}k=w==G;if(k){break c}k=x[a+152>>2]>=2}if((Ba|0)==2|k){if(!Ba){x[m+156>>2]=4454;C[m+16>>3]=G;C[m>>3]=w;q=x[a+144>>2];if(!q){break b}D=m+16|0;O=x[x[q>>2]+24>>2];k=m+156|0}if(!Ba|!s){Ea[O|0](q,k,D,m);r=0;if((Ba|0)==1){break a}}}if(!Ba){k=x[a+56>>2];t=x[a+60>>2];q=x[a+52>>2];Q=q;L=x[a+48>>2];x[a+56>>2]=L;x[a+60>>2]=q;q=a- -64|0;G=ag((+(L-k>>>0)+ +(Q-((k>>>0>L>>>0)+t|0)|0)*4294967296)*C[a+24>>3]+(+A[q>>2]+ +x[q+4>>2]*4294967296));k=F(G)<0x8000000000000000;d:{if(k){t=~~G>>>0;if(F(G)>=1){i=~~(G>0?H(J(G*2.3283064365386963e-10),4294967295):K((G-+(~~G>>>0>>>0))*2.3283064365386963e-10))>>>0}else{i=0}break d}t=0;i=-2147483648}I=i;x[q>>2]=t;x[q+4>>2]=I}}if(!Ba){C[a+24>>3]=b;C[a+16>>3]=w;k=x[a+152>>2]>=3}if((Ba|0)==2|k){if(!Ba){x[m+72>>2]=34884;k=x[8724];x[m+16>>2]=k;q=m+16|0;x[q+x[k-12>>2]>>2]=x[8725];O=x[x[m+16>>2]-12>>2]+q|0;k=m+20|0}if(!Ba|(s|0)==1){yj(O,k);r=1;if((Ba|0)==1){break a}}if(!Ba){x[O+72>>2]=0;x[O+76>>2]=-1;x[m+72>>2]=34884;x[m+16>>2]=34864}if(!Ba|(s|0)==2){i=$g(k);r=2;if((Ba|0)==1){break a}O=i}if(!Ba){x[O>>2]=34164;x[m+60>>2]=0;x[m+64>>2]=0;x[m+52>>2]=0;x[m+56>>2]=0;q=m+68|0;x[q>>2]=16;k=m+16|0}if(!Ba|(s|0)==3){i=Ib(k,11803,48);r=3;if((Ba|0)==1){break a}k=i}if(!Ba|(s|0)==4){i=Rh(k,b);r=4;if((Ba|0)==1){break a}k=i}if(!Ba|(s|0)==5){i=Ib(k,11778,24);r=5;if((Ba|0)==1){break a}k=i}if(!Ba|(s|0)==6){i=Rh(k,c);r=6;if((Ba|0)==1){break a}k=i}if(!Ba|(s|0)==7){i=Ib(k,12128,15);r=7;if((Ba|0)==1){break a}k=i}G=Ba?G:1/c;if(!Ba|(s|0)==8){i=Rh(k,G);r=8;if((Ba|0)==1){break a}k=i}if(!Ba|(s|0)==9){i=Ib(k,11766,11);r=9;if((Ba|0)==1){break a}k=i}if(!Ba|(s|0)==10){i=Rh(k,w);r=10;if((Ba|0)==1){break a}k=i}if(!Ba|(s|0)==11){i=Ib(k,11852,7);r=11;if((Ba|0)==1){break a}D=i}if(!Ba){k=ya-16|0;ya=k;u=k+8|0}if(!Ba|(s|0)==12){i=Hh(u,D);r=12;if((Ba|0)==1){break a}u=i}u=Ba?u:!y[k+8|0];e:{if(!Ba){if(u){break e}u=k+4|0;P=x[x[D>>2]-12>>2]+D|0;vj(u,P)}if(!Ba|(s|0)==13){i=Jh(u);r=13;if((Ba|0)==1){break a}u=i}P=Ba?P:k+4|0;if(!Ba|(s|0)==14){Po(P);r=14;if((Ba|0)==1){break a}}if(!Ba){U=Kh(k,D);P=x[x[D>>2]-12>>2]+D|0}if(!Ba|(s|0)==15){i=Lh(P);r=15;if((Ba|0)==1){break a}V=i}if(!Ba){U=x[U>>2];w=+d}if(!Ba|(s|0)==16){i=Qh(u,U,P,V,w);r=16;if((Ba|0)==1){break a}u=i}if(!Ba){x[k+4>>2]=u;u=!Mh(k+4|0);if(u){break e}u=x[x[D>>2]-12>>2]+D|0;xh(u,5)}}u=Ba?u:k+8|0;if(!Ba|(s|0)==17){Ih(u);r=17;if((Ba|0)==1){break a}}if(!Ba){k=k+16|0;ya=k}if(!Ba|(s|0)==18){i=Ib(D,11710,16);r=18;if((Ba|0)==1){break a}k=i}if(!Ba|(s|0)==19){i=Oh(k,e);r=19;if((Ba|0)==1){break a}k=i}if(!Ba|(s|0)==20){i=Ib(k,11684,25);r=20;if((Ba|0)==1){break a}k=i}if(!Ba|(s|0)==21){i=Nh(k,N);r=21;if((Ba|0)==1){break a}k=i}if(!Ba|(s|0)==22){i=Ib(k,11860,23);r=22;if((Ba|0)==1){break a}k=i}if(!Ba|(s|0)==23){i=Oh(k,f);r=23;if((Ba|0)==1){break a}k=i}if(!Ba|(s|0)==24){i=Ib(k,11884,24);r=24;if((Ba|0)==1){break a}k=i}if(!Ba|(s|0)==25){i=Oh(k,g);r=25;if((Ba|0)==1){break a}k=i}if(!Ba|(s|0)==26){i=Ib(k,12218,1);r=26;if((Ba|0)==1){break a}k=i}k=Ba?k:m+16|0;if(!Ba|(s|0)==27){i=Ib(k,11748,17);r=27;if((Ba|0)==1){break a}k=i}if(!Ba){I=x[a+52>>2];t=x[a+48>>2]}if(!Ba|(s|0)==28){i=Ph(k,t,I);r=28;if((Ba|0)==1){break a}k=i}if(!Ba|(s|0)==29){i=Ib(k,11727,20);r=29;if((Ba|0)==1){break a}k=i}w=Ba?w:C[a+72>>3];if(!Ba|(s|0)==30){i=Rh(k,w);r=30;if((Ba|0)==1){break a}k=i}if(!Ba|(s|0)==31){i=Ib(k,12218,1);r=31;if((Ba|0)==1){break a}k=i}k=Ba?k:m+16|0;if(!Ba|(s|0)==32){i=Ib(k,11630,36);r=32;if((Ba|0)==1){break a}k=i}if(!Ba){I=x[a+52>>2];t=x[a+48>>2]}if(!Ba|(s|0)==33){i=Ph(k,t,I);r=33;if((Ba|0)==1){break a}k=i}if(!Ba|(s|0)==34){i=Ib(k,12218,1);r=34;if((Ba|0)==1){break a}k=i}if(!Ba){q=x[q>>2];k=q&16}f:{if(!Ba){g:{if(k){q=x[m- -64>>2];k=x[m+44>>2];if(q>>>0>>0){x[m+64>>2]=k;q=k}k=m+40|0;break g}if(!(q&8)){q=0;v[m+11|0]=0;k=m;break f}q=x[m+36>>2];k=m+28|0}D=x[k>>2];q=q-D|0;k=q>>>0<2147483632}i=(Ba|0)==2;h:{if(i|k){k=Ba?k:q>>>0>=11;if(i|k){if(!Ba){k=q|15;u=k+1|0}if(!Ba|(s|0)==35){i=dr(u);r=35;if((Ba|0)==1){break a}k=i}if(!Ba){x[m+8>>2]=u|-2147483648;x[m>>2]=k;x[m+4>>2]=q;break h}}if(!Ba){v[m+11|0]=q;k=m;if(q){break h}q=0;break f}}if(!Ba|(s|0)==36){eb();r=36;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){D=mf(k,D,q)}}if(!Ba){v[k+q|0]=0;k=x[a+152>>2]>=3}if((Ba|0)==2|k){if(!Ba){x[m+156>>2]=v[m+11|0]<0?x[m>>2]:m;q=x[a+96>>2];if(!q){break b}D=x[x[q>>2]+24>>2];k=m+156|0}if(!Ba|(s|0)==37){Ea[D|0](q,k);r=37;if((Ba|0)==1){break a}}}if(!Ba){if(v[m+11|0]<0){zg(x[m>>2])}q=m+72|0;k=x[8723];x[m+16>>2]=k;D=x[8726];x[x[k-12>>2]+(m+16|0)>>2]=D;x[O>>2]=34164;k=v[m+63|0]<0;if(k){k=x[m+52>>2];zg(k)}}if(!Ba|(s|0)==38){i=Zg(O);r=38;if((Ba|0)==1){break a}k=i}if(!Ba|(s|0)==39){i=xj(q);r=39;if((Ba|0)==1){break a}k=i}}if(!Ba){t=x[a+48>>2];L=x[a+52>>2];i:{if(h){w=C[a+72>>3];f=x[a+56>>2];I=a- -64|0;b=ag((+(t-f>>>0)+ +(L-(x[a+60>>2]+(f>>>0>t>>>0)|0)|0)*4294967296)*b+(+A[I>>2]+ +x[I+4>>2]*4294967296));break i}g=g>>>2|0;w=+(g>>>0)*c+C[a+72>>3];M=f>>>2|0;f=L;i=t;t=t+M|0;f=i>>>0>t>>>0?f+1|0:f;L=x[a+56>>2];I=a- -64|0;b=ag((+(t-L>>>0)+ +(f-(x[a+60>>2]+(t>>>0>>0)|0)|0)*4294967296)*b+(+A[I>>2]+ +x[I+4>>2]*4294967296))}G=F(b);j:{if(G<0x8000000000000000){L=~~b>>>0;if(F(b)>=1){Q=~~(b>0?H(J(b*2.3283064365386963e-10),4294967295):K((b-+(~~b>>>0>>>0))*2.3283064365386963e-10))>>>0}else{Q=0}break j}L=0;Q=-2147483648}b=ag(w);w=F(b);k:{if(w<0x8000000000000000){M=~~b>>>0;if(F(b)>=1){f=~~(b>0?H(J(b*2.3283064365386963e-10),4294967295):K((b-+(~~b>>>0>>>0))*2.3283064365386963e-10))>>>0}else{f=0}break k}M=0;f=-2147483648}R=f;t=M-L|0;I=R-((L>>>0>M>>>0)+Q|0)|0;f=x[a+152>>2]<=2}l:{if(!Ba){if(f){b=+(t>>>0)+ +(I|0)*4294967296;break l}x[m+156>>2]=9184;C[m+16>>3]=+(L>>>0)+ +(Q|0)*4294967296;b=+(M>>>0)+ +(R|0)*4294967296;C[m>>3]=b;q=x[a+144>>2];if(!q){break b}g=m+16|0;h=x[x[q>>2]+24>>2];f=m+156|0}if(!Ba|(s|0)==40){Ea[h|0](q,f,g,m);r=40;if((Ba|0)==1){break a}}if(!Ba){b=+(t>>>0)+ +(I|0)*4294967296;f=x[a+152>>2]<3;if(f){break l}x[m>>2]=8476;C[m+16>>3]=b;q=x[a+120>>2];if(!q){break b}g=x[x[q>>2]+24>>2];f=m+16|0}if(!Ba|(s|0)==41){Ea[g|0](q,m,f);r=41;if((Ba|0)==1){break a}}}if(!Ba){q=0;f=!y[a+44|0]}m:{n:{o:{p:{q:{r:{s:{t:{u:{v:{if(!Ba){if(f){break v}f=!(d>E(.3499999940395355));if(f){break v}f=!(E(B[a+12>>2]*E(1.100000023841858))>>0<1001)|0)==-1&t-1001>>>0>4294965294;if(f){break v}f=x[a+152>>2]<2;if(f){break u}x[m>>2]=2393;C[m+16>>3]=b;q=x[a+120>>2];if(!q){break b}g=x[x[q>>2]+24>>2];f=m+16|0}if(!Ba|(s|0)==42){Ea[g|0](q,m,f);r=42;if((Ba|0)==1){break a}}q=Ba?q:0}if(!Ba){w=+d;f=x[a+152>>2]>=3}if((Ba|0)==2|f){if(!Ba){W=B[a+12>>2];x[m+156>>2]=6724;C[m+16>>3]=w;G=+W;C[m>>3]=G;g=x[a+144>>2];if(!g){break b}h=m+16|0;k=x[x[g>>2]+24>>2];f=m+156|0}if(!Ba|(s|0)==43){Ea[k|0](g,f,h,m);r=43;if((Ba|0)==1){break a}}}if(!Ba){B[a+12>>2]=d;g=x[a+36>>2];f=(g|0)<=0;if(f){break s}z=a+36|0;f=!(x[a+152>>2]>1&q);if(f){break t}x[m+156>>2]=8803;C[m+16>>3]=w;x[m>>2]=1610612736;x[m+4>>2]=1071015526;q=x[a+144>>2];if(!q){break b}g=m+16|0;h=x[x[q>>2]+24>>2];f=m+156|0}if(!Ba|(s|0)==44){Ea[h|0](q,f,g,m);r=44;if((Ba|0)==1){break a}}if(!Ba){g=x[z>>2];break t}}if(!Ba){B[a+12>>2]=d;g=x[a+36>>2];f=(g|0)<=0;if(f){break q}z=a+36|0}}if(!Ba){f=g-1|0;x[z>>2]=f;break r}}if(!Ba){f=!q;if(f){break r}f=x[a+152>>2]>=2}if((Ba|0)==2|f){if(!Ba){x[m+156>>2]=8891;C[m+16>>3]=w;x[m>>2]=1610612736;x[m+4>>2]=1071015526;q=x[a+144>>2];if(!q){break b}g=m+16|0;h=x[x[q>>2]+24>>2];f=m+156|0}if(!Ba|(s|0)==45){Ea[h|0](q,f,g,m);r=45;if((Ba|0)==1){break a}}}if(!Ba){b=K(+A[a+4>>2]/(S*20));f=Lf(b);x[a+36>>2]=f;q=1;break n}}if(!Ba){f=(I-(t>>>0<1001)|0)==-1&t-1001>>>0>4294965294;if(f){break p}}}if(!Ba){f=x[a+4>>2];w=b/(+(f>>>0)/10/S);break o}}if(!Ba){i=I-(t>>>0<101)|0;f=(i|0)==-1&t-101>>>0<=4294967094|(i|0)!=-1;if(f){f=x[a+4>>2];w=b/(+(f>>>0)/20/S);break o}w=b*.25}}if(!Ba){q=x[a+152>>2];G=+(N|0);z=Lf(G-w);N=(L|0)==(M|0)&(R|0)==(Q|0)?3:2;f=(N|0)<=(q|0)}if((Ba|0)==2|f){if(!Ba){x[m+156>>2]=1139;C[m+16>>3]=b;C[m>>3]=w;q=x[a+144>>2];if(!q){break b}g=m+16|0;h=x[x[q>>2]+24>>2];f=m+156|0}if(!Ba|(s|0)==46){Ea[h|0](q,f,g,m);r=46;if((Ba|0)==1){break a}}if(!Ba){q=x[a+152>>2]}}f=Ba?f:(q|0)>=(N|0);if(f|(Ba|0)==2){if(!Ba){x[m+156>>2]=3463;C[m+16>>3]=G;b=+(z|0);C[m>>3]=b;q=x[a+144>>2];if(!q){break b}g=m+16|0;h=x[x[q>>2]+24>>2];f=m+156|0}if(!Ba|(s|0)==47){Ea[h|0](q,f,g,m);r=47;if((Ba|0)==1){break a}}if(!Ba){q=x[a+152>>2]}}if(!Ba){g=Lf(T+T);h=(q|0)>=(N|0);b=T*.3;f=Lf(b)}if((Ba|0)==2|h){if(!Ba){x[m+156>>2]=3860;C[m+16>>3]=f|0;b=+(g|0);C[m>>3]=b;q=x[a+144>>2];if(!q){break b}k=m+16|0;D=x[x[q>>2]+24>>2];h=m+156|0}if(!Ba|(s|0)==48){Ea[D|0](q,h,k,m);r=48;if((Ba|0)==1){break a}}if(!Ba){q=x[a+152>>2]}}if(!Ba){g=(g|0)>(z|0)?z:g;h=(f|0)>(z|0);z=h?f:g;f=(q|0)>=(N|0)}if((Ba|0)==2|f){if(!Ba){x[m>>2]=3451;b=+(z|0);C[m+16>>3]=b;q=x[a+120>>2];if(!q){break b}g=x[x[q>>2]+24>>2];f=m+16|0}if(!Ba|(s|0)==49){Ea[g|0](q,m,f);r=49;if((Ba|0)==1){break a}}}if(!Ba){q=0;f=(z|0)>=0;if(f){break n}z=0;if(x[a+152>>2]<0){b=0;break m}x[m+16>>2]=7756;z=x[a+96>>2];if(!z){break b}g=x[x[z>>2]+24>>2];f=m+16|0}if(!Ba|(s|0)==50){Ea[g|0](z,f);r=50;if((Ba|0)==1){break a}}if(!Ba){z=0;q=0}}if(!Ba){b=+(z|0);if(x[a+152>>2]<2){break m}x[m+156>>2]=2019;C[m+16>>3]=q>>>0;C[m>>3]=b;N=x[a+144>>2];if(!N){break b}g=m+16|0;h=x[x[N>>2]+24>>2];f=m+156|0}if(!Ba|(s|0)==51){Ea[h|0](N,f,g,m);r=51;if((Ba|0)==1){break a}}}if(!Ba){f=x[a+52>>2];g=e;e=e+x[a+48>>2]|0;f=g>>>0>e>>>0?f+1|0:f;x[a+48>>2]=e;x[a+52>>2]=f;C[a+72>>3]=b*c+C[a+72>>3];ya=m+160|0;return q?0-z|0:z}}if(!Ba){ac();p()}p()}x[x[Ca>>2]>>2]=r;x[Ca>>2]=x[Ca>>2]+4;i=x[Ca>>2];x[i>>2]=a;o(+b);a=j(1)|0;X=i,Y=j(0)|0,x[X+4>>2]=Y;x[i+8>>2]=a;o(+c);a=j(1)|0;X=i,Y=j(0)|0,x[X+12>>2]=Y;x[i+16>>2]=a;B[i+20>>2]=d;x[i+24>>2]=e;x[i+28>>2]=f;x[i+32>>2]=g;x[i+36>>2]=h;x[i+40>>2]=k;x[i+44>>2]=m;x[i+48>>2]=q;o(+w);a=j(1)|0;X=i,Y=j(0)|0,x[X+52>>2]=Y;x[i+56>>2]=a;x[i+60>>2]=u;x[i+64>>2]=z;x[i+68>>2]=D;x[i+72>>2]=t;x[i+76>>2]=I;o(+G);a=j(1)|0;X=i,Y=j(0)|0,x[X+80>>2]=Y;x[i+84>>2]=a;x[i+88>>2]=N;x[i+92>>2]=O;x[i+96>>2]=P;x[i+100>>2]=L;x[i+104>>2]=Q;o(+S);a=j(1)|0;X=i,Y=j(0)|0,x[X+108>>2]=Y;x[i+112>>2]=a;o(+T);a=j(1)|0;X=i,Y=j(0)|0,x[X+116>>2]=Y;x[i+120>>2]=a;x[i+124>>2]=U;x[i+128>>2]=M;x[i+132>>2]=R;x[i+136>>2]=V;x[Ca>>2]=x[Ca>>2]+140;return 0}function yg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;l=Ba;m=ya-16|0;ya=m;a:{b:{c:{d:{e:{f:{g:{h:{i:{if(a>>>0<=244){h=x[12474];g=a>>>0<11?16:a+11&-8;b=g>>>3|0;a=h>>>b|0;if(a&3){c=b+((a^-1)&1)|0;a=c<<3;b=a+49936|0;d=x[a+49944>>2];a=x[d+8>>2];j:{if((b|0)==(a|0)){n=49896,o=Js(c)&h,x[n>>2]=o;break j}x[a+12>>2]=b;x[b+8>>2]=a}a=d+8|0;b=c<<3;x[d+4>>2]=b|3;b=b+d|0;x[b+4>>2]=x[b+4>>2]|1;break a}k=x[12476];if(k>>>0>=g>>>0){break i}if(a){c=a<>2];a=x[e+8>>2];k:{if((b|0)==(a|0)){h=Js(d)&h;x[12474]=h;break k}x[a+12>>2]=b;x[b+8>>2]=a}x[e+4>>2]=g|3;c=e+g|0;a=d<<3;d=a-g|0;x[c+4>>2]=d|1;x[a+e>>2]=d;if(k){b=(k&-8)+49936|0;f=x[12479];a=1<<(k>>>3);l:{if(!(a&h)){x[12474]=a|h;a=b;break l}a=x[b+8>>2]}x[b+8>>2]=f;x[a+12>>2]=f;x[f+12>>2]=b;x[f+8>>2]=a}a=e+8|0;x[12479]=c;x[12476]=d;break a}j=x[12475];if(!j){break i}b=x[(Gs(j)<<2)+50200>>2];e=(x[b+4>>2]&-8)-g|0;c=b;while(1){m:{a=x[c+16>>2];if(!a){a=x[c+20>>2];if(!a){break m}}c=(x[a+4>>2]&-8)-g|0;d=c>>>0>>0;e=d?c:e;b=d?a:b;c=a;continue}break}i=x[b+24>>2];d=x[b+12>>2];if((d|0)!=(b|0)){a=x[b+8>>2];x[a+12>>2]=d;x[d+8>>2]=a;break b}c=b+20|0;a=x[c>>2];if(!a){a=x[b+16>>2];if(!a){break h}c=b+16|0}while(1){f=c;d=a;c=a+20|0;a=x[c>>2];if(a){continue}c=d+16|0;a=x[d+16>>2];if(a){continue}break}x[f>>2]=0;break b}g=-1;if(a>>>0>4294967231){break i}a=a+11|0;g=a&-8;j=x[12475];if(!j){break i}e=0-g|0;h=0;n:{if(g>>>0<256){break n}h=31;if(g>>>0>16777215){break n}a=G(a>>>8|0);h=((g>>>38-a&1)-(a<<1)|0)+62|0}c=x[(h<<2)+50200>>2];o:{p:{q:{if(!c){a=0;break q}a=0;b=g<<((h|0)!=31?25-(h>>>1|0)|0:0);while(1){r:{f=(x[c+4>>2]&-8)-g|0;if(f>>>0>=e>>>0){break r}d=c;e=f;if(e){break r}e=0;a=c;break p}f=x[c+20>>2];c=x[((b>>>29&4)+c|0)+16>>2];a=f?(f|0)==(c|0)?a:f:a;b=b<<1;if(c){continue}break}}if(!(a|d)){d=0;a=2<>2]}if(!a){break o}}while(1){b=(x[a+4>>2]&-8)-g|0;c=b>>>0>>0;e=c?b:e;d=c?a:d;b=x[a+16>>2];if(b){a=b}else{a=x[a+20>>2]}if(a){continue}break}}if(!d|x[12476]-g>>>0<=e>>>0){break i}h=x[d+24>>2];b=x[d+12>>2];if((d|0)!=(b|0)){a=x[d+8>>2];x[a+12>>2]=b;x[b+8>>2]=a;break c}c=d+20|0;a=x[c>>2];if(!a){a=x[d+16>>2];if(!a){break g}c=d+16|0}while(1){f=c;b=a;c=a+20|0;a=x[c>>2];if(a){continue}c=b+16|0;a=x[b+16>>2];if(a){continue}break}x[f>>2]=0;break c}a=x[12476];if(a>>>0>=g>>>0){d=x[12479];c=a-g|0;s:{if(c>>>0>=16){b=d+g|0;x[b+4>>2]=c|1;x[a+d>>2]=c;x[d+4>>2]=g|3;break s}x[d+4>>2]=a|3;a=a+d|0;x[a+4>>2]=x[a+4>>2]|1;b=0;c=0}x[12476]=c;x[12479]=b;a=d+8|0;break a}i=x[12477];if(i>>>0>g>>>0){b=i-g|0;x[12477]=b;c=x[12480];a=c+g|0;x[12480]=a;x[a+4>>2]=b|1;x[c+4>>2]=g|3;a=c+8|0;break a}a=0;e=g+47|0;if(x[12592]){c=x[12594]}else{x[12595]=-1;x[12596]=-1;x[12593]=4096;x[12594]=4096;x[12592]=m+12&-16^1431655768;x[12597]=0;x[12585]=0;c=4096}h=e+c|0;f=0-c|0;c=h&f;if(c>>>0<=g>>>0){break a}d=x[12584];if(d){b=x[12582];j=b+c|0;if(d>>>0>>0|b>>>0>=j>>>0){break a}}t:{if(!(y[50340]&4)){u:{v:{w:{x:{d=x[12480];if(d){a=50344;while(1){b=x[a>>2];if(b>>>0<=d>>>0&d>>>0>2]>>>0){break x}a=x[a+8>>2];if(a){continue}break}}b=xg(0);if((Ba|0)!=(l|0)){p()}if((b|0)==-1){break u}h=c;d=x[12593];a=d-1|0;if(a&b){h=(c-b|0)+(a+b&0-d)|0}if(g>>>0>=h>>>0){break u}d=x[12584];if(d){a=x[12582];f=a+h|0;if(d>>>0>>0|a>>>0>=f>>>0){break u}}a=xg(h);if((Ba|0)!=(l|0)){p()}if((a|0)!=(b|0)){break w}break t}h=f&h-i;b=xg(h);if((Ba|0)!=(l|0)){p()}if((x[a>>2]+x[a+4>>2]|0)==(b|0)){break v}a=b}if((a|0)==-1){break u}if(g+48>>>0<=h>>>0){b=a;break t}b=x[12594];d=b+(e-h|0)&0-b;b=xg(d);if((Ba|0)!=(l|0)){p()}if((b|0)==-1){break u}h=d+h|0;b=a;break t}if((b|0)!=-1){break t}}x[12585]=x[12585]|4}b=xg(c);if((Ba|0)!=(l|0)){p()}a=xg(0);if((Ba|0)!=(l|0)){p()}if((a|0)==-1|a>>>0<=b>>>0|(b|0)==-1){break d}h=a-b|0;if(h>>>0<=g+40>>>0){break d}}a=x[12582]+h|0;x[12582]=a;if(a>>>0>A[12583]){x[12583]=a}y:{e=x[12480];if(e){a=50344;while(1){d=x[a>>2];c=x[a+4>>2];if((d+c|0)==(b|0)){break y}a=x[a+8>>2];if(a){continue}break}break f}a=x[12478];if(!(a>>>0<=b>>>0?a:0)){x[12478]=b}a=0;x[12587]=h;x[12586]=b;x[12482]=-1;x[12483]=x[12592];x[12589]=0;while(1){d=a<<3;c=d+49936|0;x[d+49944>>2]=c;x[d+49948>>2]=c;a=a+1|0;if((a|0)!=32){continue}break}d=h-40|0;a=-8-b&7;c=d-a|0;x[12477]=c;a=a+b|0;x[12480]=a;x[a+4>>2]=c|1;x[(b+d|0)+4>>2]=40;x[12481]=x[12596];break e}if(x[a+12>>2]&8|(b>>>0<=e>>>0|d>>>0>e>>>0)){break f}x[a+4>>2]=c+h;a=-8-e&7;c=a+e|0;x[12480]=c;b=x[12477]+h|0;a=b-a|0;x[12477]=a;x[c+4>>2]=a|1;x[(b+e|0)+4>>2]=40;x[12481]=x[12596];break e}d=0;break b}b=0;break c}if(A[12478]>b>>>0){x[12478]=b}c=b+h|0;a=50344;z:{A:{B:{while(1){if((c|0)!=x[a>>2]){a=x[a+8>>2];if(a){continue}break B}break}if(!(y[a+12|0]&8)){break A}}a=50344;while(1){C:{c=x[a>>2];if(c>>>0<=e>>>0){f=c+x[a+4>>2]|0;if(f>>>0>e>>>0){break C}}a=x[a+8>>2];continue}break}d=h-40|0;a=-8-b&7;c=d-a|0;x[12477]=c;a=a+b|0;x[12480]=a;x[a+4>>2]=c|1;x[(b+d|0)+4>>2]=40;x[12481]=x[12596];a=(f+(39-f&7)|0)-47|0;c=a>>>0>>0?e:a;x[c+4>>2]=27;a=x[12589];x[c+16>>2]=x[12588];x[c+20>>2]=a;a=x[12587];x[c+8>>2]=x[12586];x[c+12>>2]=a;x[12588]=c+8;x[12587]=h;x[12586]=b;x[12589]=0;a=c+24|0;while(1){x[a+4>>2]=7;b=a+8|0;a=a+4|0;if(b>>>0>>0){continue}break}if((c|0)==(e|0)){break e}x[c+4>>2]=x[c+4>>2]&-2;f=c-e|0;x[e+4>>2]=f|1;x[c>>2]=f;if(f>>>0<=255){b=(f&-8)+49936|0;c=x[12474];a=1<<(f>>>3);D:{if(!(c&a)){x[12474]=a|c;a=b;break D}a=x[b+8>>2]}x[b+8>>2]=e;x[a+12>>2]=e;x[e+12>>2]=b;x[e+8>>2]=a;break e}a=31;if(f>>>0<=16777215){a=G(f>>>8|0);a=((f>>>38-a&1)-(a<<1)|0)+62|0}x[e+28>>2]=a;x[e+16>>2]=0;x[e+20>>2]=0;d=(a<<2)+50200|0;c=x[12475];b=1<>2]=e;x[e+24>>2]=d;break E}a=f<<((a|0)!=31?25-(a>>>1|0)|0:0);d=x[d>>2];while(1){b=d;if((f|0)==(x[b+4>>2]&-8)){break z}c=a>>>29|0;a=a<<1;c=(b+(c&4)|0)+16|0;d=x[c>>2];if(d){continue}break}x[c>>2]=e;x[e+24>>2]=b}x[e+12>>2]=e;x[e+8>>2]=e;break e}x[a>>2]=b;x[a+4>>2]=x[a+4>>2]+h;h=(-8-b&7)+b|0;x[h+4>>2]=g|3;e=c+(-8-c&7)|0;i=g+h|0;g=e-i|0;F:{if(x[12480]==(e|0)){x[12480]=i;a=x[12477]+g|0;x[12477]=a;x[i+4>>2]=a|1;break F}if(x[12479]==(e|0)){x[12479]=i;a=x[12476]+g|0;x[12476]=a;x[i+4>>2]=a|1;x[a+i>>2]=a;break F}b=x[e+4>>2];if((b&3)==1){f=b&-8;G:{if(b>>>0<=255){a=b>>>3|0;c=x[e+12>>2];b=x[e+8>>2];if((c|0)==(b|0)){n=49896,o=x[12474]&Js(a),x[n>>2]=o;break G}x[b+12>>2]=c;x[c+8>>2]=b;break G}j=x[e+24>>2];a=x[e+12>>2];H:{if((e|0)!=(a|0)){b=x[e+8>>2];x[b+12>>2]=a;x[a+8>>2]=b;break H}I:{c=e+20|0;b=x[c>>2];if(!b){b=x[e+16>>2];if(!b){break I}c=e+16|0}while(1){d=c;a=b;c=a+20|0;b=x[c>>2];if(b){continue}c=a+16|0;b=x[a+16>>2];if(b){continue}break}x[d>>2]=0;break H}a=0}if(!j){break G}c=x[e+28>>2];b=(c<<2)+50200|0;J:{if(x[b>>2]==(e|0)){x[b>>2]=a;if(a){break J}n=49900,o=x[12475]&Js(c),x[n>>2]=o;break G}x[j+(x[j+16>>2]==(e|0)?16:20)>>2]=a;if(!a){break G}}x[a+24>>2]=j;b=x[e+16>>2];if(b){x[a+16>>2]=b;x[b+24>>2]=a}b=x[e+20>>2];if(!b){break G}x[a+20>>2]=b;x[b+24>>2]=a}g=f+g|0;e=e+f|0;b=x[e+4>>2]}x[e+4>>2]=b&-2;x[i+4>>2]=g|1;x[g+i>>2]=g;if(g>>>0<=255){b=(g&-8)+49936|0;c=x[12474];a=1<<(g>>>3);K:{if(!(c&a)){x[12474]=a|c;a=b;break K}a=x[b+8>>2]}x[b+8>>2]=i;x[a+12>>2]=i;x[i+12>>2]=b;x[i+8>>2]=a;break F}b=31;if(g>>>0<=16777215){a=G(g>>>8|0);b=((g>>>38-a&1)-(a<<1)|0)+62|0}x[i+28>>2]=b;x[i+16>>2]=0;x[i+20>>2]=0;d=(b<<2)+50200|0;L:{c=x[12475];a=1<>2]=i;x[i+24>>2]=d;break M}b=g<<((b|0)!=31?25-(b>>>1|0)|0:0);a=x[d>>2];while(1){c=a;if((x[a+4>>2]&-8)==(g|0)){break L}d=b>>>29|0;b=b<<1;d=(a+(d&4)|0)+16|0;a=x[d>>2];if(a){continue}break}x[d>>2]=i;x[i+24>>2]=c}x[i+12>>2]=i;x[i+8>>2]=i;break F}a=x[c+8>>2];x[a+12>>2]=i;x[c+8>>2]=i;x[i+24>>2]=0;x[i+12>>2]=c;x[i+8>>2]=a}a=h+8|0;break a}a=x[b+8>>2];x[a+12>>2]=e;x[b+8>>2]=e;x[e+24>>2]=0;x[e+12>>2]=b;x[e+8>>2]=a}a=x[12477];if(a>>>0<=g>>>0){break d}b=a-g|0;x[12477]=b;c=x[12480];a=c+g|0;x[12480]=a;x[a+4>>2]=b|1;x[c+4>>2]=g|3;a=c+8|0;break a}x[12163]=48;a=0;break a}N:{if(!h){break N}c=x[d+28>>2];a=(c<<2)+50200|0;O:{if(x[a>>2]==(d|0)){x[a>>2]=b;if(b){break O}j=Js(c)&j;x[12475]=j;break N}x[h+(x[h+16>>2]==(d|0)?16:20)>>2]=b;if(!b){break N}}x[b+24>>2]=h;a=x[d+16>>2];if(a){x[b+16>>2]=a;x[a+24>>2]=b}a=x[d+20>>2];if(!a){break N}x[b+20>>2]=a;x[a+24>>2]=b}P:{if(e>>>0<=15){a=e+g|0;x[d+4>>2]=a|3;a=a+d|0;x[a+4>>2]=x[a+4>>2]|1;break P}x[d+4>>2]=g|3;f=d+g|0;x[f+4>>2]=e|1;x[e+f>>2]=e;if(e>>>0<=255){b=(e&-8)+49936|0;c=x[12474];a=1<<(e>>>3);Q:{if(!(c&a)){x[12474]=a|c;a=b;break Q}a=x[b+8>>2]}x[b+8>>2]=f;x[a+12>>2]=f;x[f+12>>2]=b;x[f+8>>2]=a;break P}a=31;if(e>>>0<=16777215){a=G(e>>>8|0);a=((e>>>38-a&1)-(a<<1)|0)+62|0}x[f+28>>2]=a;x[f+16>>2]=0;x[f+20>>2]=0;c=(a<<2)+50200|0;R:{b=1<>2]=f;x[f+24>>2]=c;break S}a=e<<((a|0)!=31?25-(a>>>1|0)|0:0);g=x[c>>2];while(1){b=g;if((x[b+4>>2]&-8)==(e|0)){break R}c=a>>>29|0;a=a<<1;c=(b+(c&4)|0)+16|0;g=x[c>>2];if(g){continue}break}x[c>>2]=f;x[f+24>>2]=b}x[f+12>>2]=f;x[f+8>>2]=f;break P}a=x[b+8>>2];x[a+12>>2]=f;x[b+8>>2]=f;x[f+24>>2]=0;x[f+12>>2]=b;x[f+8>>2]=a}a=d+8|0;break a}T:{if(!i){break T}c=x[b+28>>2];a=(c<<2)+50200|0;U:{if(x[a>>2]==(b|0)){x[a>>2]=d;if(d){break U}n=49900,o=Js(c)&j,x[n>>2]=o;break T}x[i+(x[i+16>>2]==(b|0)?16:20)>>2]=d;if(!d){break T}}x[d+24>>2]=i;a=x[b+16>>2];if(a){x[d+16>>2]=a;x[a+24>>2]=d}a=x[b+20>>2];if(!a){break T}x[d+20>>2]=a;x[a+24>>2]=d}V:{if(e>>>0<=15){a=e+g|0;x[b+4>>2]=a|3;a=a+b|0;x[a+4>>2]=x[a+4>>2]|1;break V}x[b+4>>2]=g|3;d=b+g|0;x[d+4>>2]=e|1;x[d+e>>2]=e;if(k){c=(k&-8)+49936|0;f=x[12479];a=1<<(k>>>3);W:{if(!(a&h)){x[12474]=a|h;a=c;break W}a=x[c+8>>2]}x[c+8>>2]=f;x[a+12>>2]=f;x[f+12>>2]=c;x[f+8>>2]=a}x[12479]=d;x[12476]=e}a=b+8|0}ya=m+16|0;return a|0}function _n(a,b,c,d,e,f,g,h,i,j,k){var l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,w=0,z=0,A=0,B=0,C=0,D=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-84;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];i=x[b+32>>2];j=x[b+36>>2];k=x[b+40>>2];m=x[b+44>>2];q=x[b+48>>2];r=x[b+52>>2];s=x[b+56>>2];t=x[b+60>>2];w=x[b+64>>2];B=x[b+68>>2];z=x[b+72>>2];A=x[b+76>>2];u=x[b+80>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;o=x[x[Ca>>2]>>2]}if(!Ba){m=ya-528|0;ya=m;x[m+520>>2]=k;x[m+524>>2]=b;b=m+524|0}a:{if(!Ba|!o){l=ci(a,b);if((Ba|0)==1){break a}b=l}b:{if(!Ba){if(b){x[f>>2]=x[f>>2]|4;a=0;break b}x[m+72>>2]=268;u=m+104|0;k=m+72|0;t=kl(u,m+112|0,k);b=x[t>>2];x[m+100>>2]=b;x[m+96>>2]=b+400;z=ji(k);q=ji(m+60|0);s=ji(m+48|0);r=ji(m+36|0);w=ji(m+24|0);A=m+88|0;B=m+84|0;b=ya-16|0;ya=b;k=m+92|0}c:{if((Ba|0)==2|c){c=Ba?c:b+4|0;if(!Ba|(o|0)==1){l=go(d);n=1;if((Ba|0)==1){break a}d=l}if(!Ba|(o|0)==2){Tn(c,d);n=2;if((Ba|0)==1){break a}}if(!Ba){c=x[b+4>>2];v[k|0]=c;v[k+1|0]=c>>>8;v[k+2|0]=c>>>16;v[k+3|0]=c>>>24;c=b+4|0}if(!Ba|(o|0)==3){Un(c,d);n=3;if((Ba|0)==1){break a}}if(!Ba){c=b+4|0;ho(r,c);lr(c)}if(!Ba|(o|0)==4){gl(c,d);n=4;if((Ba|0)==1){break a}}if(!Ba){c=b+4|0;ho(s,c);c=lr(c)}if(!Ba|(o|0)==5){l=lm(d);n=5;if((Ba|0)==1){break a}c=l}if(!Ba){x[A>>2]=c}if(!Ba|(o|0)==6){l=mm(d);n=6;if((Ba|0)==1){break a}c=l}if(!Ba){x[B>>2]=c;c=b+4|0}if(!Ba|(o|0)==7){nm(c,d);n=7;if((Ba|0)==1){break a}}if(!Ba){c=b+4|0;mi(z,c);hr(c)}if(!Ba|(o|0)==8){fl(c,d);n=8;if((Ba|0)==1){break a}}if(!Ba){c=b+4|0;ho(q,c);c=lr(c)}if(!Ba|(o|0)==9){l=Vn(d);n=9;if((Ba|0)==1){break a}c=l}if(!Ba){break c}}c=Ba?c:b+4|0;if(!Ba|(o|0)==10){l=io(d);n=10;if((Ba|0)==1){break a}d=l}if(!Ba|(o|0)==11){Tn(c,d);n=11;if((Ba|0)==1){break a}}if(!Ba){c=x[b+4>>2];v[k|0]=c;v[k+1|0]=c>>>8;v[k+2|0]=c>>>16;v[k+3|0]=c>>>24;c=b+4|0}if(!Ba|(o|0)==12){Un(c,d);n=12;if((Ba|0)==1){break a}}if(!Ba){c=b+4|0;ho(r,c);lr(c)}if(!Ba|(o|0)==13){gl(c,d);n=13;if((Ba|0)==1){break a}}if(!Ba){c=b+4|0;ho(s,c);c=lr(c)}if(!Ba|(o|0)==14){l=lm(d);n=14;if((Ba|0)==1){break a}c=l}if(!Ba){x[A>>2]=c}if(!Ba|(o|0)==15){l=mm(d);n=15;if((Ba|0)==1){break a}c=l}if(!Ba){x[B>>2]=c;c=b+4|0}if(!Ba|(o|0)==16){nm(c,d);n=16;if((Ba|0)==1){break a}}if(!Ba){c=b+4|0;mi(z,c);hr(c)}if(!Ba|(o|0)==17){fl(c,d);n=17;if((Ba|0)==1){break a}}if(!Ba){c=b+4|0;ho(q,c);c=lr(c)}if(!Ba|(o|0)==18){l=Vn(d);n=18;if((Ba|0)==1){break a}c=l}}if(!Ba){x[m+20>>2]=c;ya=b+16|0;x[j>>2]=x[i>>2];A=e&512;d=0;b=0}while(1){if(!Ba){e=(d|0)==4;c=b}d:{e:{f:{g:{if(!Ba){if(e){break g}e=m+524|0}if(!Ba|(o|0)==19){l=ci(a,e);n=19;if((Ba|0)==1){break a}e=l}if(!Ba){if(e){break g}k=0;e=v[(m+92|0)+d|0]}h:{i:{j:{k:{l:{if(!Ba){m:{switch(e|0){case 4:break h;case 2:break i;case 3:break j;case 0:break l;case 1:break m;default:break d}}b=(d|0)==3;if(b){break e}}if(!Ba|(o|0)==20){l=di(a);n=20;if((Ba|0)==1){break a}b=l}if(!Ba|(o|0)==21){l=ei(h,1,b);n=21;if((Ba|0)==1){break a}b=l}if((Ba|0)==2|b){b=Ba?b:m+12|0;if(!Ba|(o|0)==22){$n(b,a);n=22;if((Ba|0)==1){break a}}b=Ba?b:x[m+12>>2];if(!Ba|(o|0)==23){mr(w,b);n=23;if((Ba|0)==1){break a}}if(!Ba){break k}}if(!Ba){x[f>>2]=x[f>>2]|4;a=0;break f}}if(!Ba){b=(d|0)==3;if(b){break e}}}while(1){b=Ba?b:m+524|0;if(!Ba|(o|0)==24){l=ci(a,b);n=24;if((Ba|0)==1){break a}b=l}if(!(b?Ba:1)){break e}if(!Ba|(o|0)==25){l=di(a);n=25;if((Ba|0)==1){break a}b=l}if(!Ba|(o|0)==26){l=ei(h,1,b);n=26;if((Ba|0)==1){break a}b=l}if(!Ba){b=!b;if(b){break e}b=m+12|0}if(!Ba|(o|0)==27){$n(b,a);n=27;if((Ba|0)==1){break a}}b=Ba?b:x[m+12>>2];if(!Ba|(o|0)==28){mr(w,b);n=28;if((Ba|0)==1){break a}}if(!Ba){continue}break}}if(!Ba){b=!ui(s)}n:{if(!(b?Ba:1)){break n}if(!Ba|(o|0)==29){l=di(a);n=29;if((Ba|0)==1){break a}e=l}if(!Ba){b=x[ri(s)>>2]!=(e|0);if(b){break n}}if(!Ba|(o|0)==30){l=fi(a);n=30;if((Ba|0)==1){break a}b=l}if(!Ba){v[g|0]=0;b=ui(s)>>>0>1?s:c;break d}}if(!Ba){b=!ui(r)}o:{if(!(b?Ba:1)){break o}if(!Ba|(o|0)==31){l=di(a);n=31;if((Ba|0)==1){break a}e=l}if(!Ba){b=x[ri(r)>>2]!=(e|0);if(b){break o}}if(!Ba|(o|0)==32){l=fi(a);n=32;if((Ba|0)==1){break a}b=l}if(!Ba){v[g|0]=1;b=ui(r)>>>0>1?r:c;break d}}if(!Ba){p:{if(!ui(s)){break p}b=!ui(r);if(b){break p}x[f>>2]=x[f>>2]|4;a=0;break f}if(!ui(s)){b=!ui(r);if(b){break e}}b=!ui(r);v[g|0]=b;break e}}if(!Ba){if(!(A|(c|d>>>0<2))){b=0;k=(d|0)==2;e=!(k&y[m+95|0]!=0);if(e){break d}}C=m,D=pm(q),x[C+8>>2]=D;e=m+12|0;k=zj(e,m+8|0);b=!d}q:{if(!Ba){if(b){break q}b=y[(d+m|0)+91|0]>1;if(b){break q}}while(1){r:{if(!Ba){C=m,D=Mm(q),x[C+8>>2]=D;b=!rm(k,m+8|0);if(b){break r}b=x[x[k>>2]>>2]}if(!Ba|(o|0)==33){l=ei(h,1,b);n=33;if((Ba|0)==1){break a}b=l}if(!Ba){b=!b;if(b){break r}Nm(k);continue}}break}if(!Ba){C=m,D=pm(q),x[C+8>>2]=D;b=x[k>>2]-x[m+8>>2]>>2;if(ui(w)>>>0>=b>>>0){C=m,D=Mm(w),x[C+8>>2]=D;b=jo(m+8|0,0-b|0);e=Mm(w);l=pm(q);n=ya-16|0;ya=n;b=Fq(b);e=Fq(e);u=Fq(l);e=e-b&-4;B=!Of(b,u,e);b=n+16|0;ya=b;if(B){break q}}C=m,D=pm(q),x[C+4>>2]=D;e=m+8|0;b=x[zj(e,m+4|0)>>2];x[k>>2]=b}}if(!Ba){b=x[k>>2];x[m+8>>2]=b}while(1){s:{if(!Ba){C=m,D=Mm(q),x[C+4>>2]=D;e=m+8|0;b=!rm(e,m+4|0);if(b){break s}b=m+524|0}if(!Ba|(o|0)==34){l=ci(a,b);n=34;if((Ba|0)==1){break a}b=l}if(!(b?Ba:1)){break s}if(!Ba|(o|0)==35){l=di(a);n=35;if((Ba|0)==1){break a}e=l}if(!Ba){b=x[x[m+8>>2]>>2]!=(e|0);if(b){break s}}if(!Ba|(o|0)==36){l=fi(a);n=36;if((Ba|0)==1){break a}b=l}if(!Ba){b=m+8|0;Nm(b);continue}}break}if(!Ba){b=!A;if(b){break e}C=m,D=Mm(q),x[C+4>>2]=D;e=m+8|0;b=!rm(e,m+4|0);if(b){break e}x[f>>2]=x[f>>2]|4;a=0;break f}}while(1){t:{b=Ba?b:m+524|0;if(!Ba|(o|0)==37){l=ci(a,b);n=37;if((Ba|0)==1){break a}b=l}if(!(b?Ba:1)){break t}if(!Ba|(o|0)==38){l=di(a);n=38;if((Ba|0)==1){break a}b=l}if(!Ba|(o|0)==39){l=ei(h,64,b);n=39;if((Ba|0)==1){break a}e=l}u:{if((Ba|0)==2|e){if(!Ba){e=x[j>>2];u=(e|0)==x[m+520>>2]}if((Ba|0)==2|u){e=Ba?e:m+520|0;if(!Ba|(o|0)==40){Nn(i,j,e);n=40;if((Ba|0)==1){break a}}if(!Ba){e=x[j>>2]}}if(!Ba){u=e+4|0;x[j>>2]=u;x[e>>2]=b;k=k+1|0;break u}}if(!Ba){e=!ui(z);if(e){break t}e=!k;if(e){break t}e=x[m+84>>2];b=(e|0)!=(b|0);if(b){break t}b=x[m+100>>2];e=(b|0)==x[m+96>>2]}if((Ba|0)==2|e){if(!Ba){e=m+100|0;b=m+96|0}if(!Ba|(o|0)==41){Nn(t,e,b);n=41;if((Ba|0)==1){break a}}if(!Ba){b=x[m+100>>2]}}if(!Ba){e=b+4|0;x[m+100>>2]=e;x[b>>2]=k;k=0}}if(!Ba|(o|0)==42){l=fi(a);n=42;if((Ba|0)==1){break a}b=l}if(!Ba){continue}}break}if(!Ba){b=x[m+100>>2];e=(b|0)==x[t>>2]}v:{if(!Ba){if(e){break v}e=!k;if(e){break v}e=x[m+96>>2]==(b|0)}if((Ba|0)==2|e){if(!Ba){e=m+100|0;b=m+96|0}if(!Ba|(o|0)==43){Nn(t,e,b);n=43;if((Ba|0)==1){break a}}if(!Ba){b=x[m+100>>2]}}if(!Ba){e=b+4|0;x[m+100>>2]=e;x[b>>2]=k}}b=Ba?b:x[m+20>>2]<=0;w:{if(!Ba){if(b){break w}b=m+524|0}if(!Ba|(o|0)==44){l=ci(a,b);n=44;if((Ba|0)==1){break a}b=l}b=Ba?b:!b;x:{if(b|(Ba|0)==2){if(!Ba|(o|0)==45){l=di(a);n=45;if((Ba|0)==1){break a}e=l}if(!Ba){b=x[m+88>>2]==(e|0);if(b){break x}}}if(!Ba){x[f>>2]=x[f>>2]|4;a=0;break f}}while(1){if(!Ba|(o|0)==46){l=fi(a);n=46;if((Ba|0)==1){break a}b=l}if(!Ba){b=x[m+20>>2]<=0;if(b){break w}b=m+524|0}if(!Ba|(o|0)==47){l=ci(a,b);n=47;if((Ba|0)==1){break a}b=l}b=Ba?b:!b;y:{if(b|(Ba|0)==2){if(!Ba|(o|0)==48){l=di(a);n=48;if((Ba|0)==1){break a}b=l}if(!Ba|(o|0)==49){l=ei(h,64,b);n=49;if((Ba|0)==1){break a}b=l}if(!(b?Ba:1)){break y}}if(!Ba){x[f>>2]=x[f>>2]|4;a=0;break f}}if(!Ba){e=x[j>>2];b=(e|0)==x[m+520>>2]}if((Ba|0)==2|b){b=Ba?b:m+520|0;if(!Ba|(o|0)==50){Nn(i,j,b);n=50;if((Ba|0)==1){break a}}}if(!Ba|(o|0)==51){l=di(a);n=51;if((Ba|0)==1){break a}k=l}if(!Ba){b=x[j>>2];e=b+4|0;x[j>>2]=e;x[b>>2]=k;b=x[m+20>>2]-1|0;x[m+20>>2]=b;continue}break}}if(!Ba){b=c;e=x[i>>2];c=(e|0)!=x[j>>2];if(c){break d}x[f>>2]=x[f>>2]|4;a=0;break f}}b=Ba?b:!c;z:{if(!Ba){if(b){break z}k=1}while(1){if(!Ba){b=ui(c)>>>0<=k>>>0;if(b){break z}b=m+524|0}if(!Ba|(o|0)==52){l=ci(a,b);n=52;if((Ba|0)==1){break a}b=l}b=Ba?b:!b;A:{if(b|(Ba|0)==2){if(!Ba|(o|0)==53){l=di(a);n=53;if((Ba|0)==1){break a}d=l}if(!Ba){b=x[Wl(c,k)>>2]==(d|0);if(b){break A}}}if(!Ba){x[f>>2]=x[f>>2]|4;a=0;break f}}if(!Ba|(o|0)==54){l=fi(a);n=54;if((Ba|0)==1){break a}b=l}if(!Ba){k=k+1|0;continue}break}}if(!Ba){a=1;c=x[t>>2];b=(c|0)==x[m+100>>2];if(b){break f}a=0;x[m+12>>2]=0;d=x[t>>2];c=x[m+100>>2];vl(z,d,c,m+12|0);b=x[m+12>>2];if(b){b=x[f>>2]|4;x[f>>2]=b;break f}a=1}}if(!Ba){lr(w);lr(r);lr(s);lr(q);b=hr(z)}if(!Ba|(o|0)==55){pl(t);n=55;if((Ba|0)==1){break a}}if(!Ba){break b}}b=Ba?b:c}if(!Ba){d=d+1|0;continue}break}}if(!Ba){ya=m+528|0;return a}p()}x[x[Ca>>2]>>2]=n;x[Ca>>2]=x[Ca>>2]+4;l=x[Ca>>2];x[l>>2]=a;x[l+4>>2]=b;x[l+8>>2]=c;x[l+12>>2]=d;x[l+16>>2]=e;x[l+20>>2]=f;x[l+24>>2]=g;x[l+28>>2]=h;x[l+32>>2]=i;x[l+36>>2]=j;x[l+40>>2]=k;x[l+44>>2]=m;x[l+48>>2]=q;x[l+52>>2]=r;x[l+56>>2]=s;x[l+60>>2]=t;x[l+64>>2]=w;x[l+68>>2]=B;x[l+72>>2]=z;x[l+76>>2]=A;x[l+80>>2]=u;x[Ca>>2]=x[Ca>>2]+84;return 0}function Kn(a,b,c,d,e,f,g,h,i,j,k){var l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,w=0,z=0,A=0,B=0,C=0,D=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-84;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];i=x[b+32>>2];j=x[b+36>>2];k=x[b+40>>2];m=x[b+44>>2];q=x[b+48>>2];r=x[b+52>>2];s=x[b+56>>2];t=x[b+60>>2];w=x[b+64>>2];B=x[b+68>>2];z=x[b+72>>2];A=x[b+76>>2];u=x[b+80>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;o=x[x[Ca>>2]>>2]}if(!Ba){m=ya-528|0;ya=m;x[m+520>>2]=k;x[m+524>>2]=b;b=m+524|0}a:{if(!Ba|!o){l=th(a,b);if((Ba|0)==1){break a}b=l}b:{if(!Ba){if(b){x[f>>2]=x[f>>2]|4;a=0;break b}x[m+76>>2]=268;u=m+104|0;k=m+76|0;t=kl(u,m+112|0,k);b=x[t>>2];x[m+100>>2]=b;x[m+96>>2]=b+400;z=ji(k);q=ji(m- -64|0);s=ji(m+52|0);r=ji(m+40|0);w=ji(m+28|0);A=m+91|0;B=m+90|0;b=ya-16|0;ya=b;k=m+92|0}c:{if((Ba|0)==2|c){c=Ba?c:b+4|0;if(!Ba|(o|0)==1){l=Sn(d);n=1;if((Ba|0)==1){break a}d=l}if(!Ba|(o|0)==2){Tn(c,d);n=2;if((Ba|0)==1){break a}}if(!Ba){c=x[b+4>>2];v[k|0]=c;v[k+1|0]=c>>>8;v[k+2|0]=c>>>16;v[k+3|0]=c>>>24;c=b+4|0}if(!Ba|(o|0)==3){Un(c,d);n=3;if((Ba|0)==1){break a}}if(!Ba){c=b+4|0;mi(r,c);hr(c)}if(!Ba|(o|0)==4){gl(c,d);n=4;if((Ba|0)==1){break a}}if(!Ba){c=b+4|0;mi(s,c);c=hr(c)}if(!Ba|(o|0)==5){l=lm(d);n=5;if((Ba|0)==1){break a}c=l}if(!Ba){v[A|0]=c}if(!Ba|(o|0)==6){l=mm(d);n=6;if((Ba|0)==1){break a}c=l}if(!Ba){v[B|0]=c;c=b+4|0}if(!Ba|(o|0)==7){nm(c,d);n=7;if((Ba|0)==1){break a}}if(!Ba){c=b+4|0;mi(z,c);hr(c)}if(!Ba|(o|0)==8){fl(c,d);n=8;if((Ba|0)==1){break a}}if(!Ba){c=b+4|0;mi(q,c);c=hr(c)}if(!Ba|(o|0)==9){l=Vn(d);n=9;if((Ba|0)==1){break a}c=l}if(!Ba){break c}}c=Ba?c:b+4|0;if(!Ba|(o|0)==10){l=Wn(d);n=10;if((Ba|0)==1){break a}d=l}if(!Ba|(o|0)==11){Tn(c,d);n=11;if((Ba|0)==1){break a}}if(!Ba){c=x[b+4>>2];v[k|0]=c;v[k+1|0]=c>>>8;v[k+2|0]=c>>>16;v[k+3|0]=c>>>24;c=b+4|0}if(!Ba|(o|0)==12){Un(c,d);n=12;if((Ba|0)==1){break a}}if(!Ba){c=b+4|0;mi(r,c);hr(c)}if(!Ba|(o|0)==13){gl(c,d);n=13;if((Ba|0)==1){break a}}if(!Ba){c=b+4|0;mi(s,c);c=hr(c)}if(!Ba|(o|0)==14){l=lm(d);n=14;if((Ba|0)==1){break a}c=l}if(!Ba){v[A|0]=c}if(!Ba|(o|0)==15){l=mm(d);n=15;if((Ba|0)==1){break a}c=l}if(!Ba){v[B|0]=c;c=b+4|0}if(!Ba|(o|0)==16){nm(c,d);n=16;if((Ba|0)==1){break a}}if(!Ba){c=b+4|0;mi(z,c);hr(c)}if(!Ba|(o|0)==17){fl(c,d);n=17;if((Ba|0)==1){break a}}if(!Ba){c=b+4|0;mi(q,c);c=hr(c)}if(!Ba|(o|0)==18){l=Vn(d);n=18;if((Ba|0)==1){break a}c=l}}if(!Ba){x[m+24>>2]=c;ya=b+16|0;x[j>>2]=x[i>>2];A=e&512;d=0;b=0}while(1){if(!Ba){e=(d|0)==4;c=b}d:{e:{f:{g:{if(!Ba){if(e){break g}e=m+524|0}if(!Ba|(o|0)==19){l=th(a,e);n=19;if((Ba|0)==1){break a}e=l}if(!Ba){if(e){break g}k=0;e=v[(m+92|0)+d|0]}h:{i:{j:{k:{l:{if(!Ba){m:{switch(e|0){case 4:break h;case 2:break i;case 3:break j;case 0:break l;case 1:break m;default:break d}}b=(d|0)==3;if(b){break e}}if(!Ba|(o|0)==20){l=uh(a);n=20;if((Ba|0)==1){break a}b=l}if(!Ba){b=vh(h,1,b)}if((Ba|0)==2|b){b=Ba?b:m+16|0;if(!Ba|(o|0)==21){Ln(b,a);n=21;if((Ba|0)==1){break a}}b=Ba?b:v[m+16|0];if(!Ba|(o|0)==22){jr(w,b);n=22;if((Ba|0)==1){break a}}if(!Ba){break k}}if(!Ba){x[f>>2]=x[f>>2]|4;a=0;break f}}if(!Ba){b=(d|0)==3;if(b){break e}}}while(1){b=Ba?b:m+524|0;if(!Ba|(o|0)==23){l=th(a,b);n=23;if((Ba|0)==1){break a}b=l}if(!(b?Ba:1)){break e}if(!Ba|(o|0)==24){l=uh(a);n=24;if((Ba|0)==1){break a}b=l}if(!Ba){b=!vh(h,1,b);if(b){break e}b=m+16|0}if(!Ba|(o|0)==25){Ln(b,a);n=25;if((Ba|0)==1){break a}}b=Ba?b:v[m+16|0];if(!Ba|(o|0)==26){jr(w,b);n=26;if((Ba|0)==1){break a}}if(!Ba){continue}break}}if(!Ba){b=!ui(s)}n:{if(!(b?Ba:1)){break n}if(!Ba|(o|0)==27){l=uh(a);n=27;if((Ba|0)==1){break a}b=l}if(!Ba){e=b&255;b=(e|0)!=y[nl(s,0)|0];if(b){break n}}if(!Ba|(o|0)==28){l=wh(a);n=28;if((Ba|0)==1){break a}b=l}if(!Ba){v[g|0]=0;b=ui(s)>>>0>1?s:c;break d}}if(!Ba){b=!ui(r)}o:{if(!(b?Ba:1)){break o}if(!Ba|(o|0)==29){l=uh(a);n=29;if((Ba|0)==1){break a}b=l}if(!Ba){e=b&255;b=(e|0)!=y[nl(r,0)|0];if(b){break o}}if(!Ba|(o|0)==30){l=wh(a);n=30;if((Ba|0)==1){break a}b=l}if(!Ba){v[g|0]=1;b=ui(r)>>>0>1?r:c;break d}}if(!Ba){p:{if(!ui(s)){break p}b=!ui(r);if(b){break p}x[f>>2]=x[f>>2]|4;a=0;break f}if(!ui(s)){b=!ui(r);if(b){break e}}b=!ui(r);v[g|0]=b;break e}}if(!Ba){if(!(A|(c|d>>>0<2))){b=0;k=(d|0)==2;e=!(k&y[m+95|0]!=0);if(e){break d}}C=m,D=pm(q),x[C+12>>2]=D;e=m+16|0;k=zj(e,m+12|0);q:{if(!d|y[(d+m|0)+91|0]>1){break q}while(1){r:{C=m,D=qm(q),x[C+12>>2]=D;if(!rm(k,m+12|0)){break r}if(!vh(h,1,v[x[k>>2]])){break r}sm(k);continue}break}C=m,D=pm(q),x[C+12>>2]=D;b=x[k>>2]-x[m+12>>2]|0;if(ui(w)>>>0>=b>>>0){C=m,D=qm(w),x[C+12>>2]=D;b=Xn(m+12|0,0-b|0);e=qm(w);l=pm(q);n=ya-16|0;ya=n;b=Fq(b);e=Fq(e);u=Fq(l);e=e-b|0;B=!Of(b,u,e);ya=n+16|0;if(B){break q}}C=m,D=pm(q),x[C+8>>2]=D;e=m+12|0;C=k,D=x[zj(e,m+8|0)>>2],x[C>>2]=D}b=x[k>>2];x[m+12>>2]=b}while(1){s:{if(!Ba){C=m,D=qm(q),x[C+8>>2]=D;e=m+12|0;b=!rm(e,m+8|0);if(b){break s}b=m+524|0}if(!Ba|(o|0)==31){l=th(a,b);n=31;if((Ba|0)==1){break a}b=l}if(!(b?Ba:1)){break s}if(!Ba|(o|0)==32){l=uh(a);n=32;if((Ba|0)==1){break a}b=l}if(!Ba){e=b&255;b=(e|0)!=y[x[m+12>>2]];if(b){break s}}if(!Ba|(o|0)==33){l=wh(a);n=33;if((Ba|0)==1){break a}b=l}if(!Ba){b=m+12|0;sm(b);continue}}break}if(!Ba){b=!A;if(b){break e}C=m,D=qm(q),x[C+8>>2]=D;e=m+12|0;b=!rm(e,m+8|0);if(b){break e}x[f>>2]=x[f>>2]|4;a=0;break f}}while(1){t:{b=Ba?b:m+524|0;if(!Ba|(o|0)==34){l=th(a,b);n=34;if((Ba|0)==1){break a}b=l}if(!(b?Ba:1)){break t}if(!Ba|(o|0)==35){l=uh(a);n=35;if((Ba|0)==1){break a}b=l}if(!Ba){e=vh(h,64,b)}u:{if((Ba|0)==2|e){if(!Ba){e=x[j>>2];u=(e|0)==x[m+520>>2]}if((Ba|0)==2|u){e=Ba?e:m+520|0;if(!Ba|(o|0)==36){Mn(i,j,e);n=36;if((Ba|0)==1){break a}}if(!Ba){e=x[j>>2]}}if(!Ba){u=e+1|0;x[j>>2]=u;v[e|0]=b;k=k+1|0;break u}}if(!Ba){e=!ui(z);if(e){break t}e=!k;if(e){break t}e=y[m+90|0];b=(e|0)!=(b&255);if(b){break t}b=x[m+100>>2];e=(b|0)==x[m+96>>2]}if((Ba|0)==2|e){if(!Ba){e=m+100|0;b=m+96|0}if(!Ba|(o|0)==37){Nn(t,e,b);n=37;if((Ba|0)==1){break a}}if(!Ba){b=x[m+100>>2]}}if(!Ba){e=b+4|0;x[m+100>>2]=e;x[b>>2]=k;k=0}}if(!Ba|(o|0)==38){l=wh(a);n=38;if((Ba|0)==1){break a}b=l}if(!Ba){continue}}break}if(!Ba){b=x[m+100>>2];e=(b|0)==x[t>>2]}v:{if(!Ba){if(e){break v}e=!k;if(e){break v}e=x[m+96>>2]==(b|0)}if((Ba|0)==2|e){if(!Ba){e=m+100|0;b=m+96|0}if(!Ba|(o|0)==39){Nn(t,e,b);n=39;if((Ba|0)==1){break a}}if(!Ba){b=x[m+100>>2]}}if(!Ba){e=b+4|0;x[m+100>>2]=e;x[b>>2]=k}}b=Ba?b:x[m+24>>2]<=0;w:{if(!Ba){if(b){break w}b=m+524|0}if(!Ba|(o|0)==40){l=th(a,b);n=40;if((Ba|0)==1){break a}b=l}b=Ba?b:!b;x:{if(b|(Ba|0)==2){if(!Ba|(o|0)==41){l=uh(a);n=41;if((Ba|0)==1){break a}b=l}if(!Ba){e=b&255;b=(e|0)==y[m+91|0];if(b){break x}}}if(!Ba){x[f>>2]=x[f>>2]|4;a=0;break f}}while(1){if(!Ba|(o|0)==42){l=wh(a);n=42;if((Ba|0)==1){break a}b=l}if(!Ba){b=x[m+24>>2]<=0;if(b){break w}b=m+524|0}if(!Ba|(o|0)==43){l=th(a,b);n=43;if((Ba|0)==1){break a}b=l}b=Ba?b:!b;y:{if(b|(Ba|0)==2){if(!Ba|(o|0)==44){l=uh(a);n=44;if((Ba|0)==1){break a}b=l}if(!Ba){b=vh(h,64,b);if(b){break y}}}if(!Ba){x[f>>2]=x[f>>2]|4;a=0;break f}}if(!Ba){e=x[j>>2];b=(e|0)==x[m+520>>2]}if((Ba|0)==2|b){b=Ba?b:m+520|0;if(!Ba|(o|0)==45){Mn(i,j,b);n=45;if((Ba|0)==1){break a}}}if(!Ba|(o|0)==46){l=uh(a);n=46;if((Ba|0)==1){break a}k=l}if(!Ba){b=x[j>>2];e=b+1|0;x[j>>2]=e;v[b|0]=k;b=x[m+24>>2]-1|0;x[m+24>>2]=b;continue}break}}if(!Ba){b=c;e=x[i>>2];c=(e|0)!=x[j>>2];if(c){break d}x[f>>2]=x[f>>2]|4;a=0;break f}}b=Ba?b:!c;z:{if(!Ba){if(b){break z}k=1}while(1){if(!Ba){b=ui(c)>>>0<=k>>>0;if(b){break z}b=m+524|0}if(!Ba|(o|0)==47){l=th(a,b);n=47;if((Ba|0)==1){break a}b=l}b=Ba?b:!b;A:{if(b|(Ba|0)==2){if(!Ba|(o|0)==48){l=uh(a);n=48;if((Ba|0)==1){break a}b=l}if(!Ba){d=b&255;b=(d|0)==y[nl(c,k)|0];if(b){break A}}}if(!Ba){x[f>>2]=x[f>>2]|4;a=0;break f}}if(!Ba|(o|0)==49){l=wh(a);n=49;if((Ba|0)==1){break a}b=l}if(!Ba){k=k+1|0;continue}break}}if(!Ba){a=1;c=x[t>>2];b=(c|0)==x[m+100>>2];if(b){break f}a=0;x[m+16>>2]=0;d=x[t>>2];c=x[m+100>>2];vl(z,d,c,m+16|0);b=x[m+16>>2];if(b){b=x[f>>2]|4;x[f>>2]=b;break f}a=1}}if(!Ba){hr(w);hr(r);hr(s);hr(q);b=hr(z)}if(!Ba|(o|0)==50){pl(t);n=50;if((Ba|0)==1){break a}}if(!Ba){break b}}b=Ba?b:c}if(!Ba){d=d+1|0;continue}break}}if(!Ba){ya=m+528|0;return a}p()}x[x[Ca>>2]>>2]=n;x[Ca>>2]=x[Ca>>2]+4;l=x[Ca>>2];x[l>>2]=a;x[l+4>>2]=b;x[l+8>>2]=c;x[l+12>>2]=d;x[l+16>>2]=e;x[l+20>>2]=f;x[l+24>>2]=g;x[l+28>>2]=h;x[l+32>>2]=i;x[l+36>>2]=j;x[l+40>>2]=k;x[l+44>>2]=m;x[l+48>>2]=q;x[l+52>>2]=r;x[l+56>>2]=s;x[l+60>>2]=t;x[l+64>>2]=w;x[l+68>>2]=B;x[l+72>>2]=z;x[l+76>>2]=A;x[l+80>>2]=u;x[Ca>>2]=x[Ca>>2]+84;return 0}function Xb(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0,w=0,y=0,z=0,E=0,G=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-68;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];h=x[b+24>>2];m=x[b+28>>2];r=x[b+32>>2];q=x[b+36>>2];s=x[b+40>>2];t=x[b+44>>2];u=x[b+52>>2];y=x[b+48>>2];l(0,y|0);l(1,u|0);w=+n();u=x[b+56>>2];y=x[b+60>>2];z=x[b+64>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;k=x[x[Ca>>2]>>2]}if(!Ba){y=ya-32|0;ya=y;x[a+4>>2]=-1;w=C[b+16>>3];if(w==0){x[b+16>>2]=0;x[b+20>>2]=1088784512}d=A[b>>2]>=3}a:{if((Ba|0)==2|d){if(!Ba|!k){g=Jb(51780,10922);if((Ba|0)==1){break a}a=g}if(!Ba|(k|0)==1){Kb(a);i=1;if((Ba|0)==1){break a}}if(!Ba){ba();p()}}if(!Ba){x[a+4>>2]=4}if(!Ba|(k|0)==2){g=dr(32);i=2;if((Ba|0)==1){break a}r=g}if(!Ba){d=x[b+28>>2];x[y+24>>2]=x[b+24>>2];x[y+28>>2]=d;d=x[b+20>>2];x[y+16>>2]=x[b+16>>2];x[y+20>>2]=d;d=x[b+12>>2];x[y+8>>2]=x[b+8>>2];x[y+12>>2]=d;d=x[b+4>>2];x[y>>2]=x[b>>2];x[y+4>>2]=d;q=ya-80|0;ya=q;x[r+20>>2]=0;x[r+24>>2]=0;x[r+16>>2]=c;x[r+12>>2]=0;x[r+4>>2]=0;x[r+8>>2]=0;x[r>>2]=12876;b=y;t=x[b+28>>2];x[r+28>>2]=t;d=(t|0)>0}if((Ba|0)==2|d){d=Ba?d:q+76|0;if(!Ba|(k|0)==3){g=Ib(51780,3302,55);i=3;if((Ba|0)==1){break a}c=g}if(!Ba){h=x[x[c>>2]-12>>2]+c|0;vj(d,h);d=q+76|0}if(!Ba|(k|0)==4){g=il(d,52748);i=4;if((Ba|0)==1){break a}m=g}d=Ba?d:x[x[m>>2]+28>>2];if(!Ba|(k|0)==5){g=Ea[d|0](m,10)|0;i=5;if((Ba|0)==1){break a}m=g}d=Ba?d:q+76|0;if(!Ba|(k|0)==6){Po(d);i=6;if((Ba|0)==1){break a}}if(!Ba|(k|0)==7){Th(c,m);i=7;if((Ba|0)==1){break a}}if(!Ba|(k|0)==8){rh(c);i=8;if((Ba|0)==1){break a}}if(!Ba){c=x[r+16>>2]}}if(!Ba){m=x[b>>2];u=x[b+4>>2];w=C[b+16>>3];h=x[b+8>>2]}if(!Ba|(k|0)==9){g=dr(312);i=9;if((Ba|0)==1){break a}e=g}if(!Ba){s=q+48|0;x[s>>2]=(h|0)==1;d=q+56|0;C[d>>3]=w;h=q- -64|0;x[h>>2]=t;f=x[s+4>>2];x[q+16>>2]=x[s>>2];x[q+20>>2]=f;f=x[d+4>>2];x[q+24>>2]=x[d>>2];x[q+28>>2]=f;d=x[h+4>>2];x[q+32>>2]=x[h>>2];x[q+36>>2]=d;x[q+44>>2]=(u|0)!=0;x[q+40>>2]=m?(m|0)==2?2:1:0;d=x[q+44>>2];x[q+8>>2]=x[q+40>>2];x[q+12>>2]=d;t=ya-16|0;ya=t;f=q+8|0;d=x[f>>2];if(d>>>0<=2){h=d<<2;x[e+32>>2]=x[h+16352>>2];d=d<<3;C[e+24>>3]=C[d+16328>>3];C[e+16>>3]=C[d+16304>>3];C[e+8>>3]=C[d+16280>>3];x[e+4>>2]=x[h+16268>>2];x[e>>2]=x[h+16256>>2]}d=x[f+4>>2];x[e+40>>2]=d;h=x[f+8>>2];x[e+44>>2]=h;m=x[f+24>>2];x[e+48>>2]=m;w=C[f+16>>3];x[e+112>>2]=0;x[e+116>>2]=0;x[e+104>>2]=0;x[e+108>>2]=1072693248;x[e+96>>2]=0;x[e+100>>2]=0;x[e+88>>2]=0;x[e+92>>2]=1072693248;x[e+80>>2]=1;x[e+84>>2]=1;x[e+72>>2]=0;x[e+76>>2]=1072693248;x[e+64>>2]=c;C[e+56>>3]=w;x[e+120>>2]=0;x[e+124>>2]=0;x[e+128>>2]=0;x[e+132>>2]=0;x[e+136>>2]=0;x[e+140>>2]=0;x[e+144>>2]=0;x[e+148>>2]=0;x[e+152>>2]=0;x[e+156>>2]=0;x[e+160>>2]=0;x[e+164>>2]=0;x[e+168>>2]=0;x[e+172>>2]=0;x[e+208>>2]=0;x[e+212>>2]=1072693248;x[e+200>>2]=0;x[e+204>>2]=0;x[e+192>>2]=0;x[e+196>>2]=1072693248;x[e+184>>2]=1;x[e+188>>2]=1;x[e+176>>2]=0;x[e+180>>2]=1072693248;x[e+272>>2]=0;x[e+276>>2]=0;x[e+264>>2]=0;x[e+268>>2]=0;x[e+256>>2]=0;x[e+260>>2]=0;x[e+248>>2]=0;x[e+252>>2]=0;x[e+240>>2]=0;x[e+244>>2]=0;x[e+232>>2]=0;x[e+236>>2]=0;x[e+224>>2]=0;x[e+228>>2]=0;x[e+216>>2]=0;x[e+220>>2]=0;v[e+308|0]=0;x[e+288>>2]=0;x[e+292>>2]=0;x[e+296>>2]=0;x[e+300>>2]=0;c=(m|0)>0}if((Ba|0)==2|(Ba?z:c)){c=Ba?c:t+4|0;if(!Ba|(k|0)==10){g=Ib(51780,11909,26);i=10;if((Ba|0)==1){break a}d=g}if(!Ba){f=x[e+40>>2];h=f?8960:6485;s=f?12:14}if(!Ba|(k|0)==11){g=Ib(d,h,s);i=11;if((Ba|0)==1){break a}d=g}if(!Ba|(k|0)==12){g=Ib(d,12144,2);i=12;if((Ba|0)==1){break a}d=g}h=Ba?h:x[e+44>>2]?5384:6236;if(!Ba|(k|0)==13){g=Ib(d,h,6);i=13;if((Ba|0)==1){break a}d=g}if(!Ba|(k|0)==14){g=Ib(d,11531,20);i=14;if((Ba|0)==1){break a}d=g}w=Ba?w:C[e+56>>3];if(!Ba|(k|0)==15){g=Rh(d,w);i=15;if((Ba|0)==1){break a}d=g}if(!Ba|(k|0)==16){g=Ib(d,1024,3);i=16;if((Ba|0)==1){break a}f=g}if(!Ba){d=x[x[f>>2]-12>>2]+f|0;vj(c,d);c=t+4|0}if(!Ba|(k|0)==17){g=il(c,52748);i=17;if((Ba|0)==1){break a}d=g}c=Ba?c:x[x[d>>2]+28>>2];if(!Ba|(k|0)==18){g=Ea[c|0](d,10)|0;i=18;if((Ba|0)==1){break a}d=g}c=Ba?c:t+4|0;if(!Ba|(k|0)==19){Po(c);i=19;if((Ba|0)==1){break a}}if(!Ba|(k|0)==20){Th(f,d);i=20;if((Ba|0)==1){break a}}if(!Ba|(k|0)==21){rh(f);i=21;if((Ba|0)==1){break a}}if(!Ba){d=x[e+40>>2]}}b:{c:{d:{e:{f:{g:{h:{i:{if(!Ba){if(d){break i}f=x[e+4>>2];d=D(f,x[e>>2])+1|0;x[e+304>>2]=d;h=x[e+48>>2]>0;c=t+4|0}if((Ba|0)==2|(Ba?z:h)){d=Ba?d:t+4|0;if(!Ba|(k|0)==22){g=Ib(51780,11364,49);i=22;if((Ba|0)==1){break a}h=g}s=Ba?s:x[e+304>>2];if(!Ba|(k|0)==23){g=Nh(h,s);i=23;if((Ba|0)==1){break a}f=g}if(!Ba){h=x[x[f>>2]-12>>2]+f|0;vj(d,h);d=t+4|0}if(!Ba|(k|0)==24){g=il(d,52748);i=24;if((Ba|0)==1){break a}d=g}h=Ba?h:x[x[d>>2]+28>>2];if(!Ba|(k|0)==25){g=Ea[h|0](d,10)|0;i=25;if((Ba|0)==1){break a}d=g}h=Ba?h:t+4|0;if(!Ba|(k|0)==26){Po(h);i=26;if((Ba|0)==1){break a}}if(!Ba|(k|0)==27){Th(f,d);i=27;if((Ba|0)==1){break a}}if(!Ba|(k|0)==28){rh(f);i=28;if((Ba|0)==1){break a}}if(!Ba){f=x[e+4>>2];d=x[e+304>>2]}}w=Ba?w:+(f|0);if(!Ba|(k|0)==29){Yb(c,e,d,w);i=29;if((Ba|0)==1){break a}}if(!Ba){c=x[e+292>>2];if(c){x[e+296>>2]=c;zg(c)}c=x[t+4>>2];x[e+292>>2]=c;f=x[t+8>>2];x[e+296>>2]=f;d=x[t+12>>2];x[e+300>>2]=d;h=d>>>0>f>>>0;if(h){x[f>>2]=0;x[f+4>>2]=0;c=f+8|0;x[e+296>>2]=c;break i}u=f-c>>3;m=u+1|0;if(m>>>0>=536870912){break h}d=d-c|0;h=d>>2;s=h>>>0>m>>>0;h=s?h:m;d=d>>>0>=2147483640;m=d?536870911:h}z=Ba?z:m;if(z|(Ba|0)==2){if(!Ba){if(m>>>0>=536870912){break g}d=m<<3}if(!Ba|(k|0)==30){g=dr(d);i=30;if((Ba|0)==1){break a}h=g}}h=!Ba&(!z|(Ba|0)==2)?0:h;if(!Ba){d=(u<<3)+h|0;x[d>>2]=0;x[d+4>>2]=0;m=(m<<3)+h|0;h=d+8|0;if((c|0)!=(f|0)){while(1){d=d-8|0;f=f-8|0;C[d>>3]=C[f>>3];if((c|0)!=(f|0)){continue}break}}x[e+300>>2]=m;x[e+296>>2]=h;x[e+292>>2]=d;d=!c;if(d){break i}zg(c)}}if(!Ba){c=x[e+128>>2];f=x[e+136>>2]-c>>4;d=f;w=ag(C[e+56>>3]);j:{if(F(w)<2147483648){u=~~w;break j}u=-2147483648}h=u<<1;d=d>>>0>=h>>>0;m=x[e+64>>2]}k:{if(!Ba){if(d){break k}if(h>>>0>=268435456){break f}f=x[e+132>>2];d=u<<5}if(!Ba|(k|0)==31){g=dr(d);i=31;if((Ba|0)==1){break a}d=g}if(!Ba){g=(h<<4)+d|0;s=(f-c|0)+d|0;d=s;if((c|0)!=(f|0)){while(1){f=f-16|0;i=x[f+4>>2];d=d-16|0;x[d>>2]=x[f>>2];x[d+4>>2]=i;i=x[f+12>>2];x[d+8>>2]=x[f+8>>2];x[d+12>>2]=i;if((c|0)!=(f|0)){continue}break}}x[e+136>>2]=g;x[e+132>>2]=s;x[e+128>>2]=d;d=!c;if(d){break k}zg(c)}}if(!Ba){m=D(m,1e3);f=x[e+152>>2];l:{if(m>>>0<=x[e+160>>2]-f>>2>>>0){break l}if(m>>>0>=1073741824){break e}c=e+156|0;d=x[c>>2];g=Mb(m);i=g+(m<<2)|0;s=g+(d-f|0)|0;d=s;f=x[c>>2];c=x[e+152>>2];if((f|0)!=(c|0)){while(1){d=d-4|0;f=f-4|0;B[d>>2]=B[f>>2];if((c|0)!=(f|0)){continue}break}}x[e+160>>2]=i;x[e+156>>2]=s;x[e+152>>2]=d;d=!c;if(d){break l}zg(c)}c=x[e+40>>2]}m:{if(!Ba){if(c){break m}c=x[e+232>>2];d=x[e+240>>2]-c>>4>>>0>=h>>>0}n:{if(!Ba){if(d){break n}if(h>>>0>=268435456){break d}f=x[e+236>>2];d=u<<5}if(!Ba|(k|0)==32){g=dr(d);i=32;if((Ba|0)==1){break a}d=g}if(!Ba){u=(h<<4)+d|0;h=(f-c|0)+d|0;d=h;if((c|0)!=(f|0)){while(1){f=f-16|0;g=x[f+4>>2];d=d-16|0;x[d>>2]=x[f>>2];x[d+4>>2]=g;g=x[f+12>>2];x[d+8>>2]=x[f+8>>2];x[d+12>>2]=g;if((c|0)!=(f|0)){continue}break}}x[e+240>>2]=u;x[e+236>>2]=h;x[e+232>>2]=d;if(!c){break n}zg(c)}}if(!Ba){f=x[e+256>>2];if(x[e+264>>2]-f>>2>>>0>=m>>>0){break m}if(m>>>0>=1073741824){break c}g=e+260|0;c=x[g>>2];h=Mb(m);u=h+(m<<2)|0;m=(c-f|0)+h|0;d=m;c=x[e+256>>2];f=x[g>>2];if((c|0)!=(f|0)){while(1){d=d-4|0;f=f-4|0;B[d>>2]=B[f>>2];if((c|0)!=(f|0)){continue}break}}x[e+264>>2]=u;x[e+260>>2]=m;x[e+256>>2]=d;if(!c){break m}zg(c)}}if(!Ba){x[e+284>>2]=e+176;x[e+280>>2]=e+72;ya=t+16|0;break b}}if(!Ba|(k|0)==33){Xa();i=33;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){Ya();p()}}if(!Ba|(k|0)==34){Xa();i=34;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba|(k|0)==35){Xa();i=35;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba|(k|0)==36){Xa();i=36;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba|(k|0)==37){Xa();i=37;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){x[r+4>>2]=e;b=x[b+24>>2];o:{if((b|0)<=0){break o}c=x[r+16>>2];if((c|0)<2){break o}b=D(b,c);x[r+20>>2]=b;x[r+24>>2]=b<<1;E=r,G=Mb(b),x[E+8>>2]=G;E=r,G=Mb(x[r+24>>2]),x[E+12>>2]=G}ya=q+80|0;x[a>>2]=r;ya=y+32|0}return}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[g+28>>2]=m;x[g+32>>2]=r;x[g+36>>2]=q;x[g+40>>2]=s;x[g+44>>2]=t;o(+w);a=j(1)|0;E=g,G=j(0)|0,x[E+48>>2]=G;x[g+52>>2]=a;x[g+56>>2]=u;x[g+60>>2]=y;x[g+64>>2]=z;x[Ca>>2]=x[Ca>>2]+68}function Lb(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];g=x[b+16>>2];f=x[b+20>>2];e=x[b+24>>2];i=x[b+28>>2];m=x[b+32>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){d=ya-112|0;ya=d;x[a>>2]=0;c=ya-32|0;ya=c;f=d+100|0;x[f+4>>2]=0;x[f+8>>2]=0;x[f>>2]=f+4;v[c+15|0]=7;v[c+11|0]=0;x[c+4>>2]=y[5061]|y[5062]<<8|(y[5063]<<16|y[5064]<<24);e=y[5064]|y[5065]<<8|(y[5066]<<16|y[5067]<<24);v[c+7|0]=e;v[c+8|0]=e>>>8;v[c+9|0]=e>>>16;v[c+10|0]=e>>>24;g=c+4|0;x[c+20>>2]=g;i=c+20|0;e=c+24|0}a:{if(!Ba|!j){Gb(e,f,g,i);if((Ba|0)==1){break a}}if(!Ba){x[x[c+24>>2]+28>>2]=3;if(v[c+15|0]<0){zg(x[c+4>>2])}v[c+15|0]=3;w[c+4>>1]=y[2196]|y[2197]<<8;v[c+6|0]=y[2198];v[c+7|0]=0;g=c+4|0;x[c+20>>2]=g;i=c+20|0;e=c+24|0}if(!Ba|(j|0)==1){Gb(e,f,g,i);k=1;if((Ba|0)==1){break a}}if(!Ba){x[x[c+24>>2]+28>>2]=0;if(v[c+15|0]<0){zg(x[c+4>>2])}ya=c+32|0;c=b;f=0;while(1){if(c){c=c-1&c;f=f+1|0;continue}break}e=f;c=y[48635];f=c<<24>>24<0;g=x[12157];c=!(f?g:c)}b:{c:{d:{e:{f:{g:{h:{if(!Ba){if(c){break h}c=Hb(d+100|0,48624);g=(c|0)!=(d+104|0)}if((Ba|0)==2|g){if(!Ba){c=x[c+28>>2];f=e>>>0>1;g=f?c&2:0;if(g){break h}c=b&c&1;if(c){break h}if(v[48635]>=0){c=x[12158];x[d+8>>2]=c;h=x[12157];x[d>>2]=x[12156];x[d+4>>2]=h;break g}f=x[12156];e=x[12157];c=e>>>0<=10}i:{if(!Ba){if(c){v[d+11|0]=e;c=d;break i}c=e>>>0>=2147483632;if(c){break f}c=e|15;g=c+1|0}if(!Ba|(j|0)==2){h=dr(g);k=2;if((Ba|0)==1){break a}c=h}if(!Ba){g=g|-2147483648;x[d+8>>2]=g;x[d>>2]=c;x[d+4>>2]=e}}if(!Ba){e=e+1|0;c=mf(c,f,e);break g}}g=Ba?g:d+16|0;if(!Ba|(j|0)==3){h=Ib(51780,10805,40);k=3;if((Ba|0)==1){break a}i=h}if(!Ba){c=y[48635];f=c<<24>>24<0;m=f?x[12156]:48624;c=f?x[12157]:c}if(!Ba|(j|0)==4){h=Ib(i,m,c);k=4;if((Ba|0)==1){break a}c=h}if(!Ba|(j|0)==5){h=Ib(c,5074,20);k=5;if((Ba|0)==1){break a}c=h}if(!Ba){f=x[x[c>>2]-12>>2]+c|0;vj(g,f);g=d+16|0}if(!Ba|(j|0)==6){h=il(g,52748);k=6;if((Ba|0)==1){break a}f=h}g=Ba?g:x[x[f>>2]+28>>2];if(!Ba|(j|0)==7){h=Ea[g|0](f,10)|0;k=7;if((Ba|0)==1){break a}f=h}g=Ba?g:d+16|0;if(!Ba|(j|0)==8){Po(g);k=8;if((Ba|0)==1){break a}}if(!Ba|(j|0)==9){Th(c,f);k=9;if((Ba|0)==1){break a}}if(!Ba|(j|0)==10){rh(c);k=10;if((Ba|0)==1){break a}}}if(!Ba){v[d+32|0]=0;v[d+44|0]=y[6508];v[d+56|0]=0;v[d+27|0]=3;v[d+39|0]=4;v[d+19|0]=0;v[d+51|0]=5;x[d+28>>2]=1886610550;v[d+63|0]=4;v[d+45|0]=0;v[d+75|0]=7;x[d+52>>2]=2004117094;w[d+16>>1]=y[3559]|y[3560]<<8;v[d+18|0]=y[3561];x[d+40>>2]=y[6504]|y[6505]<<8|(y[6506]<<16|y[6507]<<24);c=y[5064]|y[5065]<<8|(y[5066]<<16|y[5067]<<24);v[d+67|0]=c;v[d+68|0]=c>>>8;v[d+69|0]=c>>>16;v[d+70|0]=c>>>24;c=y[2191]|y[2192]<<8|(y[2193]<<16|y[2194]<<24);v[d+79|0]=c;v[d+80|0]=c>>>8;v[d+81|0]=c>>>16;v[d+82|0]=c>>>24;v[d+87|0]=7;v[d+71|0]=0;v[d+83|0]=0;x[d+64>>2]=y[5061]|y[5062]<<8|(y[5063]<<16|y[5064]<<24);x[d+76>>2]=y[2188]|y[2189]<<8|(y[2190]<<16|y[2191]<<24);g=(b|0)<4|e>>>0>1;c=d+104|0;e=Hb(d+100|0,d+16|0);i=(c|0)==(e|0);f=b&1}j:{k:{if(!Ba){l:{if(i){break l}i=x[e+28>>2];if(i&f){break l}e=d+16|0;if(!(i>>>1&g)){break k}}e=d+16|12;i=Hb(d+100|0,e);m:{if((i|0)==(c|0)){break m}i=x[i+28>>2];if(i&f){break m}if(!(i>>>1&g)){break k}}e=d+40|0;i=Hb(d+100|0,e);n:{if((i|0)==(c|0)){break n}i=x[i+28>>2];if(i&f){break n}if(!(i>>>1&g)){break k}}e=d+52|0;i=Hb(d+100|0,e);o:{if((i|0)==(c|0)){break o}i=x[i+28>>2];if(i&f){break o}if(!(i>>>1&g)){break k}}e=d- -64|0;i=Hb(d+100|0,e);p:{if((i|0)==(c|0)){break p}i=x[i+28>>2];if(i&f){break p}if(!(i>>>1&g)){break k}}e=d+76|0;i=Hb(d+100|0,e);c=(i|0)==(c|0);q:{if(c){break q}c=x[i+28>>2];f=f&c;if(f){break q}c=!(c>>>1&g);if(c){break k}}}if(!Ba|(j|0)==11){h=Ib(51780,11552,60);k=11;if((Ba|0)==1){break a}c=h}if(!Ba|(j|0)==12){h=Nh(c,b);k=12;if((Ba|0)==1){break a}c=h}if(!Ba|(j|0)==13){h=Ib(c,9681,26);k=13;if((Ba|0)==1){break a}e=h}if(!Ba){c=x[x[e>>2]-12>>2]+e|0;vj(d,c)}if(!Ba|(j|0)==14){h=il(d,52748);k=14;if((Ba|0)==1){break a}c=h}g=Ba?g:x[x[c>>2]+28>>2];if(!Ba|(j|0)==15){h=Ea[g|0](c,10)|0;k=15;if((Ba|0)==1){break a}c=h}if(!Ba|(j|0)==16){Po(d);k=16;if((Ba|0)==1){break a}}if(!Ba|(j|0)==17){Th(e,c);k=17;if((Ba|0)==1){break a}}if(!Ba|(j|0)==18){rh(e);k=18;if((Ba|0)==1){break a}}if(!Ba){v[d+11|0]=3;v[d+3|0]=0;w[d>>1]=y[2196]|y[2197]<<8;c=y[2198];v[d+2|0]=c;break j}}if(!Ba){if(v[e+11|0]>=0){c=x[e+8>>2];x[d+8>>2]=c;h=x[e+4>>2];x[d>>2]=x[e>>2];x[d+4>>2]=h;break j}f=x[e>>2];e=x[e+4>>2];c=e>>>0<=10}r:{if(!Ba){if(c){v[d+11|0]=e;c=d;break r}c=e>>>0>=2147483632;if(c){break f}c=e|15;g=c+1|0}if(!Ba|(j|0)==19){h=dr(g);k=19;if((Ba|0)==1){break a}c=h}if(!Ba){g=g|-2147483648;x[d+8>>2]=g;x[d>>2]=c;x[d+4>>2]=e}}if(!Ba){e=e+1|0;c=mf(c,f,e)}}if(!Ba){if(v[d+87|0]<0){zg(x[d+76>>2])}if(v[d+75|0]<0){zg(x[d+64>>2])}if(v[d+63|0]<0){zg(x[d+52>>2])}if(v[d+51|0]<0){zg(x[d+40>>2])}if(v[d+39|0]<0){zg(x[d+28>>2])}c=v[d+27|0]>=0;if(c){break g}c=x[d+16>>2];zg(c)}}if(!Ba){Fb(d+100|0,x[d+104>>2]);e=y[d+11|0];c=e<<24>>24<0;e=c?x[d+4>>2]:e;g=e-3|0}s:{t:{if(!Ba){u:{switch(g|0){case 1:c=c?x[d>>2]:d;if(!Of(c,1308,e)){break d}c=Of(c,3554,e);if(c){break e}break d;case 0:break s;case 2:break t;case 4:break u;default:break e}}c=c?x[d>>2]:d;if(!Of(c,2188,e)){break d}c=Of(c,5061,e);if(c){break e}}if(!Ba|(j|0)==20){h=dr(72);k=20;if((Ba|0)==1){break a}f=h}if(!Ba){x[f+12>>2]=16;x[f+16>>2]=65536;x[f+4>>2]=b;c=(b|0)/2|0;x[f+8>>2]=c;x[f>>2]=13484;e=Mb(c);if((b|0)>=2){nf(e,0,c<<2)}x[f+20>>2]=e;b=x[f+12>>2];c=sb(b<<2);if((b|0)>0){nf(c,0,b<<5)}x[f+24>>2]=c;b=x[f+8>>2];c=sb(b);if((b|0)>0){nf(c,0,b<<3)}x[f+28>>2]=c;b=x[f+8>>2];c=sb(b);if((b|0)>0){nf(c,0,b<<3)}x[f+32>>2]=c;b=x[f+8>>2];c=sb(b);if((b|0)>0){nf(c,0,b<<3)}x[f+36>>2]=c;c=x[f+8>>2];e=c+1|0;b=sb(e);if((c|0)>=0){nf(b,0,e<<3)}x[f+40>>2]=b;c=x[f+8>>2];e=c+1|0;b=sb(e);if((c|0)>=0){nf(b,0,e<<3)}x[f+44>>2]=b;c=x[f+8>>2];e=c+1|0;b=sb(e);if((c|0)>=0){nf(b,0,e<<3)}x[f+48>>2]=b;c=x[f+8>>2];e=c+1|0;b=sb(e);if((c|0)>=0){nf(b,0,e<<3)}x[f+52>>2]=b;x[f+56>>2]=x[f+40>>2];x[f+68>>2]=b;b=x[f+48>>2];x[f+60>>2]=x[f+44>>2];x[f+64>>2]=b;b=0;e=0;h=x[f+8>>2];while(1){c=b;b=c+1|0;if(!(h>>>c&1)){continue}break}if((h|0)>0){k=c&2147483644;j=c&3;o=x[f+20>>2];q=c>>>0<4;while(1){g=0;v:{if(!c){break v}i=0;b=e;m=0;if(!q){while(1){g=b>>>3&1|(b>>>2&1|(b&2|(b<<2&4|g<<3)))<<1;b=b>>>4|0;m=m+4|0;if((k|0)!=(m|0)){continue}break}}if(!j){break v}while(1){g=b&1|g<<1;b=b>>>1|0;i=i+1|0;if((j|0)!=(i|0)){continue}break}}x[(e<<2)+o>>2]=g;e=e+1|0;if((h|0)!=(e|0)){continue}break}}b=2;i=x[f+16>>2];if((i|0)>=2){c=x[f+24>>2];g=0;while(1){j=g<<3;e=j+c|0;l=6.283185307179586/+(b|0);r=e,s=gf(l),C[r+16>>3]=s;r=e,s=cg(l),C[r>>3]=s;l=l+l;r=e,s=cg(l),C[r+8>>3]=s;r=c+(j|24)|0,s=gf(l),C[r>>3]=s;g=g+4|0;b=b<<1;if((i|0)>=(b|0)){continue}break}}if((h|0)>=2){e=(h|0)/2|0;c=x[f+28>>2];l=+x[f+8>>2];b=0;g=0;while(1){i=g<<3;b=b+1|0;n=(+(b|0)/l+.5)*3.141592653589793;r=i+c|0,s=cg(n),C[r>>3]=s;r=c+(i|8)|0,s=gf(n),C[r>>3]=s;g=g+2|0;if((b|0)!=(e|0)){continue}break}}e=f;break c}}if(!Ba){c=!Of(c?x[d>>2]:d,6504,e);if(c){break d}break e}}if(!Ba){e=x[d>>2];c=Of(c?e:d,3559,3);if(c){break e}break d}}if(!Ba|(j|0)==21){eb();k=21;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){c=y[d+11|0];g=c<<24>>24;f=(g|0)<0;c=f?x[d+4>>2]:c;e=(gg(2196)|0)==(c|0);if(e){e=(g|0)<0?x[d>>2]:d;c=Of(e,2196,c)}else{c=1}if(c){break d}}if(!Ba|(j|0)==22){h=dr(16);k=22;if((Ba|0)==1){break a}e=h}if(!Ba){x[e+8>>2]=0;x[e+12>>2]=0;x[e+4>>2]=b;x[e>>2]=13656;break c}}if(!Ba){a=x[a>>2];if(a){break b}}if(!Ba|(j|0)==23){h=Jb(51780,10791);k=23;if((Ba|0)==1){break a}a=h}if(!Ba|(j|0)==24){h=Nh(a,b);k=24;if((Ba|0)==1){break a}a=h}if(!Ba|(j|0)==25){h=Jb(a,11289);k=25;if((Ba|0)==1){break a}c=h}if(!Ba){b=y[d+11|0];a=b<<24>>24<0;e=a?x[d>>2]:d;d=x[d+4>>2];a=a?d:b}if(!Ba|(j|0)==26){h=Ib(c,e,a);k=26;if((Ba|0)==1){break a}a=h}if(!Ba|(j|0)==27){h=Jb(a,5075);k=27;if((Ba|0)==1){break a}a=h}if(!Ba|(j|0)==28){Kb(a);k=28;if((Ba|0)==1){break a}}if(!Ba){a=nr(4);x[a>>2]=2;$(a|0,12860,0);p()}}if(!Ba){x[a>>2]=e}}if(!Ba){if(v[d+11|0]<0){zg(x[d>>2])}ya=d+112|0}return}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=g;x[h+20>>2]=f;x[h+24>>2]=e;x[h+28>>2]=i;x[h+32>>2]=m;x[Ca>>2]=x[Ca>>2]+36}function sg(a,b,c,d,e,f){a=a|0;b=+b;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0,w=0,z=0,A=0,B=0,C=0,E=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-92;h=x[Ca>>2];a=x[h>>2];c=x[h+12>>2];d=x[h+16>>2];e=x[h+20>>2];f=x[h+24>>2];g=x[h+28>>2];i=x[h+32>>2];k=x[h+36>>2];m=x[h+40>>2];r=x[h+44>>2];q=x[h+48>>2];s=x[h+52>>2];u=x[h+56>>2];w=x[h+60>>2];A=x[h+64>>2];z=x[h+68>>2];B=x[h+72>>2];C=x[h+76>>2];H=x[h+80>>2];I=x[h+84>>2];J=x[h+88>>2];G=x[h+8>>2];h=x[h+4>>2];l(0,h|0);l(1,G|0);b=+n()}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;t=x[x[Ca>>2]>>2]}if(!Ba){r=ya-560|0;ya=r;x[r+44>>2]=0;o(+b);g=j(1)|0;j(0)|0;a:{if((g|0)<0){B=1;H=1289;b=-b;o(+b);g=j(1)|0;j(0)|0;break a}if(e&2048){B=1;H=1292;break a}B=e&1;H=B?1295:1290;J=!B}g=(g&2146435072)==2146435072}b:{c:{if((Ba|0)==2|g){if(!Ba){g=B+3|0;d=e&-65537}if(!Ba|!t){qg(a,32,c,g,d);h=0;if((Ba|0)==1){break b}}if(!Ba|(t|0)==1){mg(a,H,B);h=1;if((Ba|0)==1){break b}}if(!Ba){d=f&32;f=d?6500:9739;i=b!=b;d=i?d?5391:9717:f}if(!Ba|(t|0)==2){mg(a,d,3);h=2;if((Ba|0)==1){break b}}d=Ba?d:e^8192;if(!Ba|(t|0)==3){qg(a,32,c,g,d);h=3;if((Ba|0)==1){break b}}if(!Ba){m=(c|0)<(g|0)?g:c;break c}}if(!Ba){C=r+16|0;b=jg(b,r+44|0);b=b+b;g=b!=0}d:{if(!Ba){e:{f:{if(g){g=x[r+44>>2];x[r+44>>2]=g-1;G=f|32;i=(G|0)!=97;if(i){break f}break d}G=f|32;g=(G|0)==97;if(g){break d}s=x[r+44>>2];q=(d|0)<0?6:d;break e}s=g-29|0;x[r+44>>2]=s;b=b*268435456;q=(d|0)<0?6:d}A=(r+48|0)+((s|0)>=0?288:0)|0;i=A;while(1){if(b<4294967296&b>=0){d=~~b>>>0}else{d=0}x[i>>2]=d;i=i+4|0;b=(b-+(d>>>0))*1e9;if(b!=0){continue}break}g:{if((s|0)<=0){d=s;g=i;k=A;break g}k=A;d=s;while(1){h=(d|0)>=29?29:d;g=i-4|0;h:{if(k>>>0>g>>>0){break h}d=0;while(1){w=0;K=d;d=x[g>>2];m=h&31;if((h&63)>>>0>=32){u=d<>>32-m;d=d<>>0>>0?d+1|0:d,1e9);L=g,M=m-Hs(d,Da,1e9,0)|0,x[L>>2]=M;g=g-4|0;if(k>>>0<=g>>>0){continue}break}if(!d){break h}k=k-4|0;x[k>>2]=d}while(1){g=i;if(k>>>0>>0){i=g-4|0;if(!x[i>>2]){continue}}break}d=x[r+44>>2]-h|0;x[r+44>>2]=d;i=g;if((d|0)>0){continue}break}}if((d|0)<0){z=((q+25>>>0)/9|0)+1|0;m=(G|0)==102;while(1){d=0-d|0;h=(d|0)>=9?9:d;i:{if(g>>>0<=k>>>0){i=x[k>>2];break i}u=1e9>>>h|0;w=-1<>2];x[i>>2]=K+(d>>>h|0);d=D(u,d&w);i=i+4|0;if(i>>>0>>0){continue}break}i=x[k>>2];if(!d){break i}x[g>>2]=d;g=g+4|0}d=h+x[r+44>>2]|0;x[r+44>>2]=d;k=(!i<<2)+k|0;i=m?A:k;g=g-i>>2>(z|0)?i+(z<<2)|0:g;if((d|0)<0){continue}break}}d=0;j:{if(g>>>0<=k>>>0){break j}d=D(A-k>>2,9);i=10;h=x[k>>2];if(h>>>0<10){break j}while(1){d=d+1|0;i=D(i,10);if(h>>>0>=i>>>0){continue}break}}i=(q-((G|0)!=102?d:0)|0)-((G|0)==103&(q|0)!=0)|0;if((i|0)<(D(g-A>>2,9)-9|0)){h=i+9216|0;m=(h|0)/9|0;z=((r+48|0)+((s|0)<0?4:292)|0)+(m<<2)|0;s=z-4096|0;i=10;m=h-D(m,9)|0;if((m|0)<=7){while(1){i=D(i,10);m=m+1|0;if((m|0)!=8){continue}break}}m=x[s>>2];u=(m>>>0)/(i>>>0)|0;h=m-D(i,u)|0;w=z-4092|0;k:{if(!h&(w|0)==(g|0)){break k}l:{if(!(u&1)){b=9007199254740992;if(!(v[z-4100|0]&1)|((i|0)!=1e9|k>>>0>=s>>>0)){break l}}b=9007199254740994}u=i>>>1|0;E=h>>>0>>0?.5:(u|0)==(h|0)?(g|0)==(w|0)?1:1.5:1.5;if(!(y[H|0]!=45|J)){E=-E;b=-b}h=m-h|0;x[s>>2]=h;if(b+E==b){break k}d=h+i|0;x[s>>2]=d;if(d>>>0>=1e9){while(1){x[s>>2]=0;s=s-4|0;if(s>>>0>>0){k=k-4|0;x[k>>2]=0}d=x[s>>2]+1|0;x[s>>2]=d;if(d>>>0>999999999){continue}break}}d=D(A-k>>2,9);i=10;h=x[k>>2];if(h>>>0<10){break k}while(1){d=d+1|0;i=D(i,10);if(h>>>0>=i>>>0){continue}break}}i=s+4|0;g=g>>>0>i>>>0?i:g}while(1){i=g;h=g>>>0<=k>>>0;if(!h){g=g-4|0;if(!x[g>>2]){continue}}break}m:{if((G|0)!=103){s=e&8;break m}q=q?q:1;g=(q|0)>(d|0)&(d|0)>-5;q=(g?d^-1:-1)+q|0;f=(g?-1:-2)+f|0;s=e&8;if(s){break m}g=-9;n:{if(h){break n}h=x[i-4>>2];if(!h){break n}m=10;g=0;if((h>>>0)%10|0){break n}while(1){s=g;g=g+1|0;m=D(m,10);if(!((h>>>0)%(m>>>0)|0)){continue}break}g=s^-1}h=D(i-A>>2,9);if((f&-33)==70){s=0;g=(g+h|0)-9|0;g=(g|0)>0?g:0;q=(g|0)>(q|0)?q:g;break m}s=0;g=((d+h|0)+g|0)-9|0;g=(g|0)>0?g:0;q=(g|0)>(q|0)?q:g}m=-1;w=q|s;if(((w?2147483645:2147483646)|0)<(q|0)){break c}h=(((w|0)!=0)+q|0)+1|0;I=f&-33;o:{if((I|0)==70){if((h^2147483647)<(d|0)){break c}f=(d|0)>0;g=f?d:0;break o}g=d>>31;g=pg((g^d)-g|0,0,C);if((C-g|0)<=1){while(1){g=g-1|0;v[g|0]=48;if((C-g|0)<2){continue}break}}z=g-2|0;v[z|0]=f;f=g-1|0;v[f|0]=(d|0)<0?45:43;g=C-z|0;if((g|0)>(h^2147483647)){break c}}g=g+h|0;d=(g|0)>(B^2147483647);if(d){break c}u=g+B|0}if(!Ba|(t|0)==4){qg(a,32,c,u,e);h=4;if((Ba|0)==1){break b}}if(!Ba|(t|0)==5){mg(a,H,B);h=5;if((Ba|0)==1){break b}}d=Ba?d:e^65536;if(!Ba|(t|0)==6){qg(a,48,c,u,d);h=6;if((Ba|0)==1){break b}}d=Ba?d:(I|0)==70;p:{q:{r:{if(d|(Ba|0)==2){if(!Ba){d=r+16|0;s=d|8;f=k>>>0>A>>>0;m=f?A:k;k=m;d=d|9}while(1){if(!Ba){g=pg(x[k>>2],0,d);s:{if((k|0)!=(m|0)){if(r+16>>>0>=g>>>0){break s}while(1){g=g-1|0;v[g|0]=48;if(r+16>>>0>>0){continue}break}break s}if((d|0)!=(g|0)){break s}v[r+24|0]=48;g=s}f=d-g|0}if(!Ba|(t|0)==7){mg(a,g,f);h=7;if((Ba|0)==1){break b}}if(!Ba){k=k+4|0;f=A>>>0>=k>>>0;if(f){continue}}break}if(!Ba|(t|0)==8?(Ba|0)==2|w:0){mg(a,10500,1);h=8;if((Ba|0)==1){break b}}if(!Ba){f=i>>>0<=k>>>0;if(f){break r}f=(q|0)<=0;if(f){break r}}while(1){if(!Ba){g=pg(x[k>>2],0,d);if(g>>>0>r+16>>>0){while(1){g=g-1|0;v[g|0]=48;if(r+16>>>0>>0){continue}break}}f=(q|0)>=9?9:q}if(!Ba|(t|0)==9){mg(a,g,f);h=9;if((Ba|0)==1){break b}}if(!Ba){g=q-9|0;k=k+4|0;f=k>>>0>=i>>>0;if(f){break q}m=(q|0)>9;q=g;if(m){continue}}break}if(!Ba){break q}}d=Ba?d:(q|0)<0;t:{if(!Ba){if(d){break t}f=i>>>0>k>>>0;w=f?i:k+4|0;d=r+16|0;A=d|8;i=k;d=d|9}while(1){if(!Ba){g=pg(x[i>>2],0,d);if((g|0)==(d|0)){v[r+24|0]=48;g=A}f=(i|0)!=(k|0)}u:{if(!(f?Ba:1)){f=r+16>>>0>=g>>>0;if(f){break u}while(1){g=g-1|0;v[g|0]=48;f=r+16>>>0>>0;if(f){continue}break}break u}if(!Ba|(t|0)==10){mg(a,g,1);h=10;if((Ba|0)==1){break b}}if(!Ba){g=g+1|0;f=!(q|s);if(f){break u}}if(!Ba|(t|0)==11){mg(a,10500,1);h=11;if((Ba|0)==1){break b}}}if(!Ba){m=d-g|0;f=(m|0)<(q|0)?m:q}if(!Ba|(t|0)==12){mg(a,g,f);h=12;if((Ba|0)==1){break b}}if(!Ba){q=q-m|0;i=i+4|0;f=w>>>0<=i>>>0;if(f){break t}f=(q|0)>=0;if(f){continue}}break}}d=Ba?d:q+18|0;if(!Ba|(t|0)==13){qg(a,48,d,18,0);h=13;if((Ba|0)==1){break b}}d=Ba?d:C-z|0;if(!Ba|(t|0)==14){mg(a,z,d);h=14;if((Ba|0)==1){break b}}if(!Ba){break p}}g=Ba?g:q}d=Ba?d:g+9|0;if(!Ba|(t|0)==15){qg(a,48,d,9,0);h=15;if((Ba|0)==1){break b}}}d=Ba?d:e^8192;if(!Ba|(t|0)==16){qg(a,32,c,u,d);h=16;if((Ba|0)==1){break b}}if(!Ba){m=(c|0)<(u|0)?u:c;break c}}if(!Ba){u=(f<<26>>31&9)+H|0;v:{if(d>>>0>11){break v}g=12-d|0;E=16;while(1){E=E*16;g=g-1|0;if(g){continue}break}if(y[u|0]==45){b=-(E+(-b-E));break v}b=b+E-E}i=x[r+44>>2];g=i>>31;g=pg((g^i)-g|0,0,C);if((C|0)==(g|0)){v[r+15|0]=48;g=r+15|0}s=B|2;k=f&32;i=x[r+44>>2];w=g-2|0;v[w|0]=f+15;v[g-1|0]=(i|0)<0?45:43;h=e&8;i=r+16|0;while(1){f=i;if(F(b)<2147483648){g=~~b}else{g=-2147483648}v[i|0]=y[g+33760|0]|k;b=(b-+(g|0))*16;i=f+1|0;if(!(!((d|0)>0|h)&b==0|(i-(r+16|0)|0)!=1)){v[f+1|0]=46;i=f+2|0}if(b!=0){continue}break}m=-1;k=C-w|0;z=s+k|0;if((2147483645-z|0)<(d|0)){break c}g=i-(r+16|0)|0;f=(g-2|0)<(d|0)?d+2|0:g;d=d?f:g;i=z+d|0}if(!Ba|(t|0)==17){qg(a,32,c,i,e);h=17;if((Ba|0)==1){break b}}if(!Ba|(t|0)==18){mg(a,u,s);h=18;if((Ba|0)==1){break b}}f=Ba?f:e^65536;if(!Ba|(t|0)==19){qg(a,48,c,i,f);h=19;if((Ba|0)==1){break b}}f=Ba?f:r+16|0;if(!Ba|(t|0)==20){mg(a,f,g);h=20;if((Ba|0)==1){break b}}d=Ba?d:d-g|0;if(!Ba|(t|0)==21){qg(a,48,d,0,0);h=21;if((Ba|0)==1){break b}}if(!Ba|(t|0)==22){mg(a,w,k);h=22;if((Ba|0)==1){break b}}d=Ba?d:e^8192;if(!Ba|(t|0)==23){qg(a,32,c,i,d);h=23;if((Ba|0)==1){break b}}m=Ba?m:(c|0)<(i|0)?i:c}if(!Ba){ya=r+560|0;return m|0}p()}x[x[Ca>>2]>>2]=h;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;o(+b);a=j(1)|0;L=h,M=j(0)|0,x[L+4>>2]=M;x[h+8>>2]=a;x[h+12>>2]=c;x[h+16>>2]=d;x[h+20>>2]=e;x[h+24>>2]=f;x[h+28>>2]=g;x[h+32>>2]=i;x[h+36>>2]=k;x[h+40>>2]=m;x[h+44>>2]=r;x[h+48>>2]=q;x[h+52>>2]=s;x[h+56>>2]=u;x[h+60>>2]=w;x[h+64>>2]=A;x[h+68>>2]=z;x[h+72>>2]=B;x[h+76>>2]=C;x[h+80>>2]=H;x[h+84>>2]=I;x[h+88>>2]=J;x[Ca>>2]=x[Ca>>2]+92;return 0}function zk(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,B=0,C=0,D=0,E=0,F=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0;s=Ba;k=ya-336|0;ya=k;m=h;n=i&65535;o=d;q=e&65535;v=(e^i)&-2147483648;r=i>>>16&32767;w=e>>>16&32767;a:{b:{if(r-32767>>>0>4294934529&w-32767>>>0>=4294934530){break b}j=e&2147483647;if(!(!d&(j|0)==2147418112?!(b|c):j>>>0<2147418112)){t=d;v=e|32768;break a}e=i&2147483647;if(!(!h&(e|0)==2147418112?!(f|g):e>>>0<2147418112)){t=h;v=i|32768;b=f;c=g;break a}if(!(b|d|(j^2147418112|c))){if(!(f|h|(e^2147418112|g))){b=0;c=0;v=2147450880;break a}v=v|2147418112;b=0;c=0;break a}if(!(f|h|(e^2147418112|g))){b=0;c=0;break a}if(!(b|d|(c|j))){b=!(f|h|(e|g));t=b?0:t;v=b?2147450880:v;b=0;c=0;break a}if(!(f|h|(e|g))){v=v|2147418112;b=0;c=0;break a}if((j|0)==65535|j>>>0<65535){d=b;b=!(q|o);i=b;j=i?d:o;b=i<<6;i=G(i?c:q);b=b+((i|0)==32?G(j)+32|0:i)|0;Dg(k+320|0,d,c,o,q,b-15|0);if((Ba|0)!=(s|0)){p()}u=16-b|0;o=x[k+328>>2];q=x[k+332>>2];c=x[k+324>>2];b=x[k+320>>2]}if(e>>>0>65535){break b}d=!(m|n);h=d;i=d?f:m;d=d<<6;h=G(h?g:n);d=d+((h|0)==32?G(i)+32|0:h)|0;Dg(k+304|0,f,g,m,n,d-15|0);if((Ba|0)!=(s|0)){p()}u=(d+u|0)-16|0;m=x[k+312>>2];n=x[k+316>>2];f=x[k+304>>2];g=x[k+308>>2]}e=n|65536;C=e;D=m;d=m;j=e<<15|d>>>17;e=d<<15|g>>>17;d=0-e|0;h=j;i=1963258675-(j+((e|0)!=0)|0)|0;yk(k+288|0,e,j,0,0,d,i,0,0);if((Ba|0)!=(s|0)){p()}j=x[k+296>>2];yk(k+272|0,0-j|0,0-(x[k+300>>2]+((j|0)!=0)|0)|0,0,0,d,i,0,0);if((Ba|0)!=(s|0)){p()}d=x[k+280>>2];i=d<<1|x[k+276>>2]>>>31;d=x[k+284>>2]<<1|d>>>31;yk(k+256|0,i,d,0,0,e,h,0,0);if((Ba|0)!=(s|0)){p()}j=x[k+264>>2];yk(k+240|0,i,d,0,0,0-j|0,0-(x[k+268>>2]+((j|0)!=0)|0)|0,0,0);if((Ba|0)!=(s|0)){p()}i=x[k+248>>2];j=i<<1|x[k+244>>2]>>>31;d=x[k+252>>2]<<1|i>>>31;yk(k+224|0,j,d,0,0,e,h,0,0);if((Ba|0)!=(s|0)){p()}i=x[k+232>>2];yk(k+208|0,j,d,0,0,0-i|0,0-(x[k+236>>2]+((i|0)!=0)|0)|0,0,0);if((Ba|0)!=(s|0)){p()}d=x[k+216>>2];i=d<<1|x[k+212>>2]>>>31;d=x[k+220>>2]<<1|d>>>31;yk(k+192|0,i,d,0,0,e,h,0,0);if((Ba|0)!=(s|0)){p()}j=x[k+200>>2];yk(k+176|0,i,d,0,0,0-j|0,0-(x[k+204>>2]+((j|0)!=0)|0)|0,0,0);if((Ba|0)!=(s|0)){p()}i=e;e=x[k+184>>2];d=x[k+188>>2]<<1|e>>>31;m=e<<1|x[k+180>>2]>>>31;e=m-1|0;d=d-!m|0;yk(k+160|0,i,h,0,0,e,d,0,0);if((Ba|0)!=(s|0)){p()}yk(k+144|0,f<<15,g<<15|f>>>17,0,0,e,d,0,0);if((Ba|0)!=(s|0)){p()}z=k+112|0;h=x[k+172>>2];m=x[k+160>>2];i=x[k+152>>2];l=m+i|0;n=x[k+164>>2];j=n+x[k+156>>2]|0;j=i>>>0>l>>>0?j+1|0:j;i=j;j=(n|0)==(j|0)&l>>>0>>0|j>>>0>>0;n=j+x[k+168>>2]|0;j=j>>>0>n>>>0?h+1|0:h;m=!i&l>>>0>1|(i|0)!=0;h=m+n|0;j=m>>>0>h>>>0?j+1|0:j;yk(z,e,d,0,0,0-h|0,0-(((h|0)!=0)+j|0)|0,0,0);if((Ba|0)!=(s|0)){p()}yk(k+128|0,1-l|0,0-((l>>>0>1)+i|0)|0,0,0,e,d,0,0);if((Ba|0)!=(s|0)){p()}N=(w-r|0)+u|0;e=x[k+116>>2];w=e;d=x[k+112>>2];j=e<<1|d>>>31;i=d<<1;m=j;d=j;h=x[k+140>>2];B=h;e=x[k+136>>2];j=h<<1|e>>>31;l=e<<1|x[k+132>>2]>>>31;h=l+i|0;d=d+j|0;d=h>>>0>>0?d+1|0:d;e=d;d=d-(h>>>0<13927)|0;y=d;z=d;l=0;j=q|65536;O=j;P=o;d=o;j=j<<1|d>>>31;R=d<<1;S=j;I=j;d=Hs(y,l,j,0);j=Da;E=d;F=j;K=b<<1;d=c<<1|b>>>31;u=d;j=0;r=j;n=h-13927|0;y=(e|0)==(y|0)&n>>>0>>0|e>>>0>y>>>0;e=(e|0)==(m|0)&h>>>0>>0|e>>>0>>0;d=x[k+120>>2];h=x[k+124>>2]<<1|d>>>31;d=d<<1|w>>>31;l=B>>>31|0;d=l+d|0;j=h;j=d>>>0>>0?j+1|0:j;h=d;d=d+e|0;j=h>>>0>d>>>0?j+1|0:j;e=d;d=d+y|0;l=e>>>0>d>>>0?j+1|0:j;e=d-1|0;H=l-!d|0;B=0;i=Hs(u,r,H,B);d=i+E|0;h=Da+F|0;h=d>>>0>>0?h+1|0:h;i=d;w=(h|0)==(F|0)&d>>>0>>0|h>>>0>>0;j=0;E=e;Q=c>>>31|0;J=Q|o<<1;y=0;e=Hs(e,j,J,y);d=e+d|0;j=Da+h|0;o=d;l=0;j=d>>>0>>0?j+1|0:j;m=j;d=(h|0)==(j|0)&d>>>0>>0|h>>>0>j>>>0;e=d;d=d+w|0;l=e>>>0>d>>>0?1:l;e=Hs(I,r,H,B);d=e+d|0;j=Da+l|0;q=d;d=d>>>0>>0?j+1|0:j;e=Hs(I,r,E,y);l=Da;h=e;e=Hs(J,y,H,B);i=h+e|0;j=Da+l|0;j=e>>>0>i>>>0?j+1|0:j;e=j;j=(l|0)==(j|0)&h>>>0>i>>>0|j>>>0>>0;l=q+e|0;d=d+j|0;d=l>>>0>>0?d+1|0:d;q=l;e=0;l=e+o|0;j=i+m|0;j=e>>>0>l>>>0?j+1|0:j;e=j;h=(m|0)==(j|0)&l>>>0>>0|j>>>0>>0;j=d;d=h+q|0;j=d>>>0>>0?j+1|0:j;w=d;o=j;F=n;d=Hs(n,0,J,y);m=Da;i=d;h=Hs(z,t,u,t);d=d+h|0;j=Da+m|0;j=d>>>0>>0?j+1|0:j;h=j;m=(m|0)==(j|0)&d>>>0>>0|j>>>0>>0;L=K&-2;i=Hs(E,y,L,0);n=i+d|0;j=Da+j|0;j=i>>>0>n>>>0?j+1|0:j;i=j;d=(h|0)==(j|0)&d>>>0>n>>>0|h>>>0>j>>>0;h=0;j=d+m|0;d=(j>>>0>>0?1:h)+e|0;q=j+l|0;d=q>>>0>>0?d+1|0:d;j=o;m=d;d=(e|0)==(d|0)&l>>>0>q>>>0|d>>>0>>0;e=d;d=d+w|0;j=e>>>0>d>>>0?j+1|0:j;T=d;w=j;d=Hs(I,r,F,t);M=Da;I=d;e=Hs(H,B,L,t);d=d+e|0;j=Da+M|0;j=d>>>0>>0?j+1|0:j;o=d;l=Hs(z,t,J,y);e=d+l|0;h=j;d=j+Da|0;d=e>>>0>>0?d+1|0:d;r=e;j=Hs(u,t,E,y);e=e+j|0;l=Da+d|0;l=e>>>0>>0?l+1|0:l;H=(d|0)==(l|0)&e>>>0>>0|d>>>0>l>>>0;j=(h|0)==(M|0)&o>>>0>>0|h>>>0>>0;d=(d|0)==(h|0)&o>>>0>r>>>0|d>>>0>>0;d=d+j|0;d=d+H|0;h=l;r=h+q|0;j=(d|B)+m|0;j=h>>>0>r>>>0?j+1|0:j;o=j;d=(m|0)==(j|0)&q>>>0>r>>>0|j>>>0>>0;j=w;h=d;d=d+T|0;j=h>>>0>d>>>0?j+1|0:j;B=d;m=j;d=Hs(z,t,L,t);z=Da;q=d;h=Hs(u,t,F,t);d=d+h|0;j=Da+z|0;j=d>>>0>>0?j+1|0:j;w=0;h=(j|0)==(z|0)&d>>>0>>0|j>>>0>>0;q=j;d=j+n|0;j=(h|w)+i|0;j=d>>>0>>0?j+1|0:j;i=(i|0)==(j|0)&d>>>0>>0|i>>>0>j>>>0;h=j;j=e;n=0;e=n+d|0;l=h+j|0;j=0;l=e>>>0>>0?l+1|0:l;d=(h|0)==(l|0)&d>>>0>e>>>0|h>>>0>l>>>0;e=d;d=d+i|0;j=(e>>>0>d>>>0?1:j)+o|0;l=m;e=d;d=d+r|0;j=e>>>0>d>>>0?j+1|0:j;e=j;h=(o|0)==(j|0)&d>>>0>>0|j>>>0>>0;i=h;h=h+B|0;l=i>>>0>h>>>0?l+1|0:l;i=l;c:{if((l|0)==131071|l>>>0<131071){P=R|Q;O=y|S;yk(k+80|0,d,j,h,l,f,g,D,C);if((Ba|0)!=(s|0)){p()}l=x[k+84>>2];q=l;j=b<<17;o=0;n=x[k+88>>2];b=o-n|0;c=x[k+80>>2];l=(l|c)!=0;m=b-l|0;n=(j-(x[k+92>>2]+(n>>>0>o>>>0)|0)|0)-(b>>>0>>0)|0;r=N+16382|0;o=0-(((c|0)!=0)+q|0)|0;q=0-c|0;break c}d=(e&1)<<31|d>>>1;e=h<<31|e>>>1;h=(i&1)<<31|h>>>1;i=i>>>1|0;yk(k+96|0,d,e,h,i,f,g,D,C);if((Ba|0)!=(s|0)){p()}m=x[k+100>>2];w=m;q=0;u=x[k+104>>2];o=q-u|0;l=x[k+96>>2];n=(m|l)!=0;m=o-n|0;n=((b<<16)-(x[k+108>>2]+(q>>>0>>0)|0)|0)-(n>>>0>o>>>0)|0;r=N+16383|0;K=b;u=c;o=0-(((l|0)!=0)+w|0)|0;q=0-l|0}if((r|0)>=32767){v=v|2147418112;b=0;c=0;break a}d:{if((r|0)>0){b=m<<1|o>>>31;c=n<<1|m>>>31;m=h;n=i&65535|r<<16;l=o<<1|q>>>31;i=q<<1;break d}if((r|0)<=-113){b=0;c=0;break a}Eg(k- -64|0,d,e,h,i,1-r|0);if((Ba|0)!=(s|0)){p()}Dg(k+48|0,K,u,P,O,r+112|0);if((Ba|0)!=(s|0)){p()}d=x[k+64>>2];e=x[k+68>>2];m=x[k+72>>2];n=x[k+76>>2];yk(k+32|0,f,g,D,C,d,e,m,n);if((Ba|0)!=(s|0)){p()}b=x[k+40>>2];c=x[k+56>>2];i=x[k+36>>2];q=b<<1|i>>>31;l=c-q|0;q=x[k+60>>2]-((x[k+44>>2]<<1|b>>>31)+(c>>>0>>0)|0)|0;c=x[k+52>>2];u=c;b=x[k+32>>2];h=i<<1|b>>>31;o=b<<1;b=o;j=x[k+48>>2];c=(c|0)==(h|0)&b>>>0>j>>>0|c>>>0>>0;b=l-c|0;c=q-(c>>>0>l>>>0)|0;l=u-((j>>>0>>0)+h|0)|0;i=j-o|0}yk(k+16|0,f,g,D,C,3,0,0,0);if((Ba|0)!=(s|0)){p()}yk(k,f,g,D,C,5,0,0,0);if((Ba|0)!=(s|0)){p()}j=0;h=l+j|0;o=i;l=d&1;i=i+l|0;h=o>>>0>i>>>0?h+1|0:h;g=(g|0)==(h|0)&f>>>0>>0|g>>>0>>0;f=(h|0)==(j|0)&i>>>0>>0|h>>>0>>0;l=c;j=e;c=b+f|0;l=c>>>0>>0?l+1|0:l;b=(C|0)==(l|0);b=b&(c|0)==(D|0)?g:b&c>>>0>D>>>0|l>>>0>C>>>0;f=b+d|0;j=b>>>0>f>>>0?j+1|0:j;b=j;d=(e|0)==(j|0)&d>>>0>f>>>0|e>>>0>j>>>0;j=n;e=d;d=d+m|0;j=e>>>0>d>>>0?j+1|0:j;g=d;e=x[k+20>>2];m=(e|0)==(h|0)&A[k+16>>2]>>0|e>>>0>>0;e=x[k+28>>2];d=x[k+24>>2];e=j>>>0<2147418112&((c|0)==(d|0)&(e|0)==(l|0)?m:(e|0)==(l|0)&d>>>0>>0|e>>>0>>0);d=b;m=e;e=e+f|0;d=m>>>0>e>>>0?d+1|0:d;b=(b|0)==(d|0)&e>>>0>>0|b>>>0>d>>>0;f=b;b=b+g|0;j=f>>>0>b>>>0?j+1|0:j;f=b;g=x[k+4>>2];h=(g|0)==(h|0)&A[k>>2]>>0|g>>>0>>0;g=x[k+12>>2];b=x[k+8>>2];b=j>>>0<2147418112&((b|0)==(c|0)&(g|0)==(l|0)?h:(g|0)==(l|0)&b>>>0>>0|g>>>0>>0);c=b;b=b+e|0;l=c>>>0>b>>>0?d+1|0:d;c=l;e=(d|0)==(l|0)&b>>>0>>0|d>>>0>l>>>0;d=j;g=e;e=e+f|0;d=g>>>0>e>>>0?d+1|0:d;t=e|t;v=d|v}x[a>>2]=b;x[a+4>>2]=c;x[a+8>>2]=t;x[a+12>>2]=v;ya=k+336|0}function lg(a,b,c,d,e,f,g){var h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0,z=0,A=0,B=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-120;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];q=x[b+32>>2];m=x[b+36>>2];i=x[b+40>>2];r=x[b+44>>2];s=x[b+48>>2];t=x[b+52>>2];u=x[b+56>>2];A=x[b+60>>2];B=x[b+64>>2];G=x[b+68>>2];E=x[b+72>>2];F=x[b+76>>2];I=x[b+80>>2];J=x[b+84>>2];L=x[b+88>>2];K=x[b+92>>2];M=x[b+96>>2];N=x[b+100>>2];O=x[b+104>>2];P=x[b+108>>2];k=x[b+116>>2];z=x[b+112>>2];l(0,z|0);l(1,k|0);Q=+n();b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;H=x[x[Ca>>2]>>2]}if(!Ba){h=ya;q=h-80|0;ya=q;x[q+76>>2]=b;N=e-192|0;O=d-384|0;P=q+55|0;I=q+56|0}a:{b:{c:{d:{e:while(1){h=Ba?h:0;f:while(1){g:{if(!Ba){i=b;m=(F^2147483647)<(h|0);if(m){break d}F=h+F|0;h=b;s=y[b|0]}h:{i:{if((Ba|0)==2|s){while(1){if(!Ba){s=s&255;b=!s}j:{if(!Ba){k:{if(b){b=h;break k}b=(s|0)!=37;if(b){break j}s=h;while(1){if(y[s+1|0]!=37){b=s;break k}h=h+1|0;m=y[s+2|0];b=s+2|0;s=b;if((m|0)==37){continue}break}}h=h-i|0;s=F^2147483647;m=(h|0)>(s|0);if(m){break d}}if(!Ba|!H?(Ba|0)==2|a:0){mg(a,i,h);z=0;if((Ba|0)==1){break a}}if(!Ba){if(h){continue f}x[q+76>>2]=b;h=b+1|0;B=-1;if(!(!ig(v[b+1|0])|y[b+2|0]!=36)){B=v[b+1|0]-48|0;J=1;h=b+3|0}x[q+76>>2]=h;t=0;u=v[h|0];b=u-32|0;l:{if(b>>>0>31){m=h;break l}m=h;b=1<>2]=m;t=b|t;u=v[h+1|0];b=u-32|0;h=b>>>0>=32;if(h){break l}h=m;b=1<>2]=10;b=0;break p}b=x[(b<<3)+O>>2]}break n}if(J){break i}if(!a){x[q+76>>2]=u;J=0;G=0;break m}b=x[c>>2];x[c>>2]=b+4;J=0;b=x[b>>2]}x[q+76>>2]=u;G=b;if((b|0)>=0){break m}G=0-b|0;t=t|8192;break m}G=ng(q+76|0);if((G|0)<0){break d}u=x[q+76>>2]}h=0;r=-1;q:{if(y[u|0]!=46){b=u;L=0;break q}if(y[u+1|0]==42){b=u+2|0;r:{s:{m=!ig(v[u+2|0]);if(m){break s}m=y[u+3|0]!=36;if(m){break s}m=v[b|0];b=u+4|0;t:{if(!a){x[(m<<2)+N>>2]=10;r=0;break t}r=x[(m<<3)+O>>2]}break r}if(J){break i}r=0;if(!a){break r}m=x[c>>2];x[c>>2]=m+4;r=x[m>>2]}x[q+76>>2]=b;L=(r|0)>=0;break q}x[q+76>>2]=u+1;r=ng(q+76|0);b=x[q+76>>2];L=1}while(1){m=h;A=28;u=b;k=v[b|0];if(k-123>>>0<4294967238){break c}b=b+1|0;h=y[(k+D(h,58)|0)+33231|0];if(h-1>>>0<8){continue}break}x[q+76>>2]=b;E=(h|0)!=27}u:{if((Ba|0)==2|E){if(!Ba){if(!h){break c}if((B|0)>=0){E=!a;if(E){i=(B<<2)+e|0;x[i>>2]=h;continue e}h=(B<<3)+d|0;k=x[h+4>>2];x[q+64>>2]=x[h>>2];x[q+68>>2]=k;break u}if(!a){break g}E=q- -64|0}if(!Ba|(H|0)==1){og(E,h,c,g);z=1;if((Ba|0)==1){break a}}if(!Ba){break u}}if(!Ba){if((B|0)>=0){break c}h=0;E=!a;if(E){continue f}}}if(!Ba){A=-1;if(y[a|0]&32){break b}B=0;K=1279;M=I;h=v[u|0];h=m?(h&15)==3?h&-33:h:h;u=h-88|0;E=t&-65537;t=t&8192?E:t}v:{w:{x:{y:{z:{if(!Ba){A:{B:{C:{D:{E:{switch(u|0){default:F:{m=h-65|0;switch(m|0){case 1:case 3:break h;case 0:case 4:case 5:case 6:break w;case 2:break z;default:break F}}h=(h|0)==83;if(h){break A}break h;case 29:i=x[q+64>>2];k=x[q+68>>2];K=1279;break D;case 22:h=0;G:{H:{I:{J:{K:{L:{M:{i=m&255;switch(i|0){case 7:break G;case 6:break H;case 4:break I;case 3:break J;case 2:break K;case 1:break L;case 0:break M;default:continue f}}i=x[q+64>>2];x[i>>2]=F;continue f}i=x[q+64>>2];x[i>>2]=F;continue f}i=x[q+64>>2];x[i>>2]=F;x[i+4>>2]=F>>31;continue f}i=x[q+64>>2];w[i>>1]=F;continue f}i=x[q+64>>2];v[i|0]=F;continue f}i=x[q+64>>2];x[i>>2]=F;continue f}i=x[q+64>>2];x[i>>2]=F;x[i+4>>2]=F>>31;continue f;case 24:r=r>>>0<=8?8:r;t=t|8;h=120;case 0:case 32:b=I;z=h&32;m=x[q+68>>2];k=m;i=x[q+64>>2];m=(k|i)!=0;if(m){while(1){b=b-1|0;v[b|0]=z|y[(i&15)+33760|0];m=!k&i>>>0>15|(k|0)!=0;i=(k&15)<<28|i>>>4;k=k>>>4|0;if(m){continue}break}}i=b;if(!(x[q+64>>2]|x[q+68>>2])|!(t&8)){break C}K=(h>>>4|0)+1279|0;B=2;break C;case 23:b=I;h=x[q+68>>2];k=h;i=x[q+64>>2];if(h|i){while(1){b=b-1|0;v[b|0]=i&7|48;z=!k&i>>>0>7|(k|0)!=0;i=(k&7)<<29|i>>>3;k=k>>>3|0;if(z){continue}break}}i=b;h=!(t&8);if(h){break C}b=I-b|0;h=(b|0)<(r|0);r=h?r:b+1|0;break C;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 10:case 16:case 18:case 19:case 20:case 21:case 25:case 26:case 28:case 30:case 31:break h;case 11:break v;case 9:case 13:case 14:case 15:break w;case 27:break B;case 12:case 17:break E}}i=x[q+64>>2];b=x[q+68>>2];k=b;if((b|0)<0){k=0-(b+((i|0)!=0)|0)|0;i=0-i|0;x[q+64>>2]=i;x[q+68>>2]=k;B=1;K=1279;break D}if(t&2048){B=1;K=1280;break D}B=t&1;K=B?1281:1279}i=pg(i,k,I)}if((r|0)<0&L){break d}t=L?t&-65537:t;k=x[q+64>>2];z=x[q+68>>2];b=(k|z)!=0;if(!(r|b)){i=I;r=0;break h}h=!(k|z)+(I-i|0)|0;b=(r|0)>(h|0);r=b?r:h;break h}b=x[q+64>>2];i=b?b:10742;b=i;h=r>>>0>=2147483647?2147483647:r;m=Nf(b,0,h);h=m?m-b|0:h;M=h+b|0;b=(r|0)>=0;if(b){t=E;r=h;break h}t=E;r=h;b=y[M|0];if(b){break d}break h}if(r){s=x[q+64>>2];break y}h=0}if(!Ba|(H|0)==2){qg(a,32,G,0,t);z=2;if((Ba|0)==1){break a}}if(!Ba){break x}}if(!Ba){x[q+12>>2]=0;x[q+8>>2]=x[q+64>>2];s=q+8|0;h=s;x[q+64>>2]=h;r=-1}}if(!Ba){h=0;N:{while(1){m=x[s>>2];if(!m){break N}O:{m=wg(q+4|0,m);i=(m|0)<0;if(i){break O}E=r-h>>>0>>0;if(E){break O}s=s+4|0;h=h+m|0;if(r>>>0>h>>>0){continue}break N}break}if(i){break b}}A=61;i=(h|0)<0;if(i){break c}}if(!Ba|(H|0)==3){qg(a,32,G,h,t);z=3;if((Ba|0)==1){break a}}if(!Ba){i=!h;if(i){h=0;break x}s=x[q+64>>2];m=0}while(1){if(!Ba){i=x[s>>2];r=!i;if(r){break x}z=q+4|0;i=wg(z,i);m=i+m|0;r=m>>>0>h>>>0;if(r){break x}r=z}if(!Ba|(H|0)==4){mg(a,r,i);z=4;if((Ba|0)==1){break a}}if(!Ba){s=s+4|0;i=h>>>0>m>>>0;if(i){continue}}break}}i=Ba?i:t^8192;if(!Ba|(H|0)==5){qg(a,32,G,h,i);z=5;if((Ba|0)==1){break a}}if(!Ba){i=(h|0)<(G|0);h=i?G:h;continue f}}if(!Ba){i=(r|0)<0&L;if(i){break d}Q=C[q+64>>3];A=61}if(!Ba|(H|0)==6){k=Ea[f|0](a,Q,G,r,t,h)|0;z=6;if((Ba|0)==1){break a}h=k}if(!Ba){i=(h|0)>=0;if(i){continue f}break c}}if(!Ba){v[q+55|0]=x[q+64>>2];r=1;i=P;t=E;break h}}if(!Ba){s=y[h+1|0];h=h+1|0;continue}break}}if(!Ba){A=F;if(a){break b}a=!J;if(a){break g}h=1}while(1){if(!Ba){a=(h<<2)+e|0;s=x[a>>2]}if((Ba|0)==2|s){a=Ba?a:(h<<3)+d|0;if(!Ba|(H|0)==7){og(a,s,c,g);z=7;if((Ba|0)==1){break a}}if(!Ba){A=1;h=h+1|0;a=(h|0)!=10;if(a){continue}break b}}break}if(!Ba){A=1;if(h>>>0>=10){break b}while(1){a=x[(h<<2)+e>>2];if(a){break i}h=h+1|0;if((h|0)!=10){continue}break}break b}}if(!Ba){A=28;break c}}if(!Ba){b=M-i|0;u=(b|0)<(r|0)?r:b;if((u|0)>(B^2147483647)){break d}A=61;m=u+B|0;h=(m|0)<(G|0)?G:m;s=(s|0)<(h|0);if(s){break c}}if(!Ba|(H|0)==8){qg(a,32,h,m,t);z=8;if((Ba|0)==1){break a}}if(!Ba|(H|0)==9){mg(a,K,B);z=9;if((Ba|0)==1){break a}}s=Ba?s:t^65536;if(!Ba|(H|0)==10){qg(a,48,h,m,s);z=10;if((Ba|0)==1){break a}}if(!Ba|(H|0)==11){qg(a,48,u,b,0);z=11;if((Ba|0)==1){break a}}if(!Ba|(H|0)==12){mg(a,i,b);z=12;if((Ba|0)==1){break a}}b=Ba?b:t^8192;if(!Ba|(H|0)==13){qg(a,32,h,m,b);z=13;if((Ba|0)==1){break a}}if(!Ba){b=x[q+76>>2];continue}}break}break}if(!Ba){A=0;break b}}A=Ba?A:61}if(!Ba){x[12163]=A;A=-1}}if(!Ba){ya=q+80|0;return A}p()}x[x[Ca>>2]>>2]=z;x[Ca>>2]=x[Ca>>2]+4;k=x[Ca>>2];x[k>>2]=a;x[k+4>>2]=b;x[k+8>>2]=c;x[k+12>>2]=d;x[k+16>>2]=e;x[k+20>>2]=f;x[k+24>>2]=g;x[k+28>>2]=h;x[k+32>>2]=q;x[k+36>>2]=m;x[k+40>>2]=i;x[k+44>>2]=r;x[k+48>>2]=s;x[k+52>>2]=t;x[k+56>>2]=u;x[k+60>>2]=A;x[k+64>>2]=B;x[k+68>>2]=G;x[k+72>>2]=E;x[k+76>>2]=F;x[k+80>>2]=I;x[k+84>>2]=J;x[k+88>>2]=L;x[k+92>>2]=K;x[k+96>>2]=M;x[k+100>>2]=N;x[k+104>>2]=O;x[k+108>>2]=P;o(+Q);a=j(1)|0;R=k,S=j(0)|0,x[R+112>>2]=S;x[k+116>>2]=a;x[Ca>>2]=x[Ca>>2]+120;return 0}function nc(a){var b=0,c=0,d=0,e=E(0),f=0,g=0,h=0,i=0,k=0,l=0,m=0,n=0,o=E(0),r=0,s=0,t=0,u=0,v=E(0),w=0,y=0,z=0,A=0,D=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;c=Ba;g=x[a+12>>2];if(!g){g=Mb(x[a+8>>2]);if((Ba|0)!=(c|0)){p()}x[a+12>>2]=g}f=x[a+8>>2];a:{if((f|0)<=0){break a}l=f&7;if(f-1>>>0>=7){n=f&-8;while(1){b=d<<2;x[b+g>>2]=1065353216;x[(b|4)+g>>2]=1065353216;x[(b|8)+g>>2]=1065353216;x[(b|12)+g>>2]=1065353216;x[(b|16)+g>>2]=1065353216;x[(b|20)+g>>2]=1065353216;x[(b|24)+g>>2]=1065353216;x[(b|28)+g>>2]=1065353216;d=d+8|0;r=r+8|0;if((n|0)!=(r|0)){continue}break}}if(!l){break a}while(1){x[(d<<2)+g>>2]=1065353216;d=d+1|0;h=h+1|0;if((l|0)!=(h|0)){continue}break}}b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{l:{m:{n:{o:{H=x[a+4>>2];switch(H|0){case 9:case 10:break f;case 8:break g;case 7:break h;case 6:break i;case 4:break j;case 3:break k;case 2:break l;case 0:break m;case 1:break n;case 5:break o;default:break c}}if((f|0)<=0){break e}k=+(f-1|0)*.5;s=k/3;b=0;while(1){d=(b<<2)+g|0;e=B[d>>2];m=(+(b|0)-k)/s;m=yf(m*-m);if((Ba|0)!=(c|0)){p()}B[d>>2]=m*+e;b=b+1|0;if((f|0)!=(b|0)){continue}break}break c}if((f|0)<2){break c}d=(f|0)/2|0;e=E(d|0);b=0;while(1){c=(b<<2)+g|0;o=E(E(b|0)/e);B[c>>2]=o*B[c>>2];c=c+(d<<2)|0;B[c>>2]=(1-+o)*+B[c>>2];b=b+1|0;if((d|0)!=(b|0)){continue}break}break c}if((f|0)<=0){break e}c=f&3;h=0;b=0;if(f-1>>>0>=3){l=f&-4;r=0;while(1){d=b<<2;n=d+g|0;B[n>>2]=B[n>>2]*E(.5);n=(d|4)+g|0;B[n>>2]=B[n>>2]*E(.5);n=(d|8)+g|0;B[n>>2]=B[n>>2]*E(.5);d=(d|12)+g|0;B[d>>2]=B[d>>2]*E(.5);b=b+4|0;r=r+4|0;if((l|0)!=(r|0)){continue}break}}if(!c){break c}while(1){d=(b<<2)+g|0;B[d>>2]=B[d>>2]*E(.5);b=b+1|0;h=h+1|0;if((c|0)!=(h|0)){continue}break}break c}if((f|0)<=0){break e}m=+(f|0);b=0;while(1){i=+(b|0);k=gf(i*12.566370614359172/m);if((Ba|0)!=(c|0)){p()}s=gf(i*6.283185307179586/m);if((Ba|0)!=(c|0)){p()}d=(b<<2)+g|0;i=gf(i*18.84955592153876/m);if((Ba|0)!=(c|0)){p()}B[d>>2]=(i*-0+(k*0+(s*-.46+.54)))*+B[d>>2];b=b+1|0;if((f|0)!=(b|0)){continue}break}break c}if((f|0)<=0){break e}m=+(f|0);b=0;while(1){i=+(b|0);k=gf(i*12.566370614359172/m);if((Ba|0)!=(c|0)){p()}s=gf(i*6.283185307179586/m);if((Ba|0)!=(c|0)){p()}d=(b<<2)+g|0;i=gf(i*18.84955592153876/m);if((Ba|0)!=(c|0)){p()}B[d>>2]=(i*-0+(k*0+(s*-.5+.5)))*+B[d>>2];b=b+1|0;if((f|0)!=(b|0)){continue}break}break c}if((f|0)<=0){break e}m=+(f|0);b=0;while(1){i=+(b|0);k=gf(i*12.566370614359172/m);if((Ba|0)!=(c|0)){p()}s=gf(i*6.283185307179586/m);if((Ba|0)!=(c|0)){p()}d=(b<<2)+g|0;i=gf(i*18.84955592153876/m);if((Ba|0)!=(c|0)){p()}B[d>>2]=(i*-0+(k*.08+(s*-.5+.42)))*+B[d>>2];b=b+1|0;if((f|0)!=(b|0)){continue}break}break c}h=f-1|0;b=(h|0)/4|0;if((f|0)>=5){r=(b|0)<=1?1:b;e=E(E(h|0)*E(.5));d=0;while(1){l=(d<<2)+g|0;o=B[l>>2];k=Zf(1-+E(E(e-E(d|0))/e),3);if((Ba|0)!=(c|0)){p()}v=o;o=E(k+k);B[l>>2]=v*o;l=(h-d<<2)+g|0;B[l>>2]=B[l>>2]*o;d=d+1|0;if((r|0)!=(d|0)){continue}break}}d=(h|0)/2|0;if((d|0)<(b|0)){break c}e=E(E(h|0)*E(.5));while(1){c=(b<<2)+g|0;l=c;v=B[c>>2];c=b-d|0;k=+E(E(c|0)/e);o=E(k*k*-6*(1-+E(E(0-c|0)/e))+1);B[l>>2]=v*o;c=(h-b<<2)+g|0;B[c>>2]=B[c>>2]*o;c=(b|0)==(d|0);b=b+1|0;if(!c){continue}break}break c}if((f|0)<=0){break e}m=+(f|0);b=0;while(1){i=+(b|0);k=gf(i*12.566370614359172/m);if((Ba|0)!=(c|0)){p()}s=gf(i*6.283185307179586/m);if((Ba|0)!=(c|0)){p()}d=(b<<2)+g|0;i=gf(i*18.84955592153876/m);if((Ba|0)!=(c|0)){p()}B[d>>2]=(i*-.0106411+(k*.1365995+(s*-.4891775+.3635819)))*+B[d>>2];b=b+1|0;if((f|0)!=(b|0)){continue}break}break c}if((f|0)<=0){break e}m=+(f|0);b=0;while(1){i=+(b|0);k=gf(i*12.566370614359172/m);if((Ba|0)!=(c|0)){p()}s=gf(i*6.283185307179586/m);if((Ba|0)!=(c|0)){p()}d=(b<<2)+g|0;i=gf(i*18.84955592153876/m);if((Ba|0)!=(c|0)){p()}B[d>>2]=(i*-.01168+(k*.14128+(s*-.48829+.35875)))*+B[d>>2];b=b+1|0;if((f|0)!=(b|0)){continue}break}break c}l=(f|0)/4|0;n=(f|0)/8|0;d=f-(l+n|0)|0;if((d|0)<=0){d=0;break d}I=+E(f|0);b=0;while(1){o=E(((+E(b+l|0)+.5)/I+-1.75)*6.283185307179586);e=eg(o);if((Ba|0)!=(c|0)){p()}v=e;u=ya-16|0;ya=u;r=(q(o),j(2));h=r&2147483647;p:{if(h>>>0<=1061752794){e=E(1);if(h>>>0<964689920){break p}e=hf(+o);if((Ba|0)!=(c|0)){p()}break p}if(h>>>0<=1081824209){if(h>>>0>=1075235812){e=hf(((r|0)<0?3.141592653589793:-3.141592653589793)+ +o);if((Ba|0)!=(c|0)){p()}e=E(-e);break p}k=+o;if((r|0)<0){e=jf(k+1.5707963267948966);if((Ba|0)!=(c|0)){p()}break p}e=jf(1.5707963267948966-k);if((Ba|0)!=(c|0)){p()}break p}if(h>>>0<=1088565717){if(h>>>0>=1085271520){e=hf(((r|0)<0?6.283185307179586:-6.283185307179586)+ +o);if((Ba|0)!=(c|0)){p()}break p}if((r|0)<0){e=jf(-4.71238898038469-+o);if((Ba|0)!=(c|0)){p()}break p}e=jf(+o+-4.71238898038469);if((Ba|0)!=(c|0)){p()}break p}e=E(o-o);if(h>>>0>=2139095040){break p}h=kf(o,u+8|0);if((Ba|0)!=(c|0)){p()}k=C[u+8>>3];q:{switch(h&3){case 0:e=hf(k);if((Ba|0)!=(c|0)){p()}break p;case 1:e=jf(-k);if((Ba|0)!=(c|0)){p()}break p;case 2:e=hf(k);if((Ba|0)!=(c|0)){p()}e=E(-e);break p;default:break q}}e=jf(k);if((Ba|0)!=(c|0)){p()}}ya=u+16|0;t=+o;s=t+t;k=gf(s);if((Ba|0)!=(c|0)){p()}s=cg(s);if((Ba|0)!=(c|0)){p()}i=t*3;m=gf(i);if((Ba|0)!=(c|0)){p()}i=cg(i);if((Ba|0)!=(c|0)){p()}w=t*4;J=gf(w);if((Ba|0)!=(c|0)){p()}w=cg(w);if((Ba|0)!=(c|0)){p()}y=t*5;K=gf(y);if((Ba|0)!=(c|0)){p()}y=cg(y);if((Ba|0)!=(c|0)){p()}z=t*6;L=gf(z);if((Ba|0)!=(c|0)){p()}z=cg(z);if((Ba|0)!=(c|0)){p()}A=t*7;M=gf(A);if((Ba|0)!=(c|0)){p()}A=cg(A);if((Ba|0)!=(c|0)){p()}D=t*8;N=gf(D);if((Ba|0)!=(c|0)){p()}D=cg(D);if((Ba|0)!=(c|0)){p()}F=t*9;O=gf(F);if((Ba|0)!=(c|0)){p()}F=cg(F);if((Ba|0)!=(c|0)){p()}G=t*10;t=gf(G);if((Ba|0)!=(c|0)){p()}h=(b<<2)+g|0;G=cg(G);if((Ba|0)!=(c|0)){p()}B[h>>2]=G*.015019890897353432+(t*.00920984524892983+(F*-.057770778356787365+(O*.0602598643052717+(D*-.10756484378756644+(N*-.2188211017503643+(A*.5546181554261227+(M*-.040280336857000776+(z*-.3450678778735583+(L*.9913207660704864+(y*-1.2509814793222542+(K*-1.1995392232130644+(w*2.3310017729408474+(J*-.9212609106442782+(i*-.3033526175352444+(m*3.2661744984762127+(s*-3.271639991597522+(k*-1.9343709005511076+(+v*3.8025751664452314+(+e*-1.5866148027114197+2.5739223016263346)))))))))))))))))));b=b+1|0;if((d|0)!=(b|0)){continue}break}break d}d=a+16|0;break b}if((f|0)>=8){r=(l<<2)+g|0;h=(f<<1&-4)+g|0;b=0;while(1){u=n+(b^-1)<<2;B[(d<<2)+g>>2]=(1-+E(B[h+(b-n<<2)>>2]*B[u+h>>2]))/+B[r+u>>2];d=d+1|0;b=b+1|0;if((n|0)!=(b|0)){continue}break}}if((f|0)>=4){nf((d<<2)+g|0,0,l<<2);if((Ba|0)!=(c|0)){p()}}if((H|0)!=10|(f|0)<2){break c}c=(f|0)/2|0;r=c&1;d=(f<<2)+g|0;b=0;if((f&-2)!=2){c=c&-2;h=0;while(1){l=b<<2;n=l+g|0;e=B[n>>2];u=n;n=d+((b^-1)<<2)|0;B[u>>2]=B[n>>2];B[n>>2]=e;l=(l|4)+g|0;e=B[l>>2];n=l;l=d+((b^1073741822)<<2)|0;B[n>>2]=B[l>>2];B[l>>2]=e;b=b+2|0;h=h+2|0;if((c|0)!=(h|0)){continue}break}}if(!r){break c}c=(b<<2)+g|0;e=B[c>>2];d=d+((b^-1)<<2)|0;B[c>>2]=B[d>>2];B[d>>2]=e}b=0;x[a+16>>2]=0;d=a+16|0;if((f|0)<=0){e=E(0);break b}c=f&3;r:{if(f-1>>>0<3){e=E(0);break r}h=f&-4;e=E(0);r=0;while(1){a=b<<2;e=E(B[a+g>>2]+e);B[d>>2]=e;e=E(B[(a|4)+g>>2]+e);B[d>>2]=e;e=E(B[(a|8)+g>>2]+e);B[d>>2]=e;e=E(B[(a|12)+g>>2]+e);B[d>>2]=e;b=b+4|0;r=r+4|0;if((h|0)!=(r|0)){continue}break}}if(!c){break b}h=0;while(1){e=E(B[(b<<2)+g>>2]+e);B[d>>2]=e;b=b+1|0;h=h+1|0;if((c|0)!=(h|0)){continue}break}}B[d>>2]=e/E(f|0)}function Ub(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,E=0,G=0,H=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-76;b=x[Ca>>2];a=x[b>>2];d=x[b+12>>2];f=x[b+8>>2];l(0,f|0);l(1,d|0);c=+n();d=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];q=x[b+32>>2];m=x[b+36>>2];r=x[b+40>>2];s=x[b+44>>2];t=x[b+48>>2];u=x[b+52>>2];v=x[b+56>>2];w=x[b+60>>2];z=x[b+64>>2];y=x[b+68>>2];A=x[b+72>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;k=x[x[Ca>>2]>>2]}if(!Ba){r=ya+-64|0;ya=r;g=r+24|0}a:{if(!Ba|!k){Zb(g,a,c);if((Ba|0)==1){break a}}if(!Ba){f=x[r+60>>2];x[b+32>>2]=x[r+56>>2];x[b+36>>2]=f;f=r+48|0;h=x[f+4>>2];x[b+24>>2]=x[f>>2];x[b+28>>2]=h;h=x[r+44>>2];x[b+16>>2]=x[r+40>>2];x[b+20>>2]=h;g=r+32|0;h=x[g+4>>2];x[b+8>>2]=x[g>>2];x[b+12>>2]=h;h=x[r+28>>2];x[b>>2]=x[r+24>>2];x[b+4>>2]=h;c=C[f>>3];E=c*+x[a>>2]+1;b:{if(F(E)<2147483648){e=~~E;break b}e=-2147483648}h=e|1;x[b+52>>2]=h;e=(h|0)/2|0;t=x[g>>2];f=(e|0)/(t|0)|0;q=D(f,t);y=e-q|0;x[b+44>>2]=y;x[b+40>>2]=y;g=x[a+40>>2]==1}c:{if((Ba|0)==2|g){if(!Ba){q=x[a+48>>2]>0;g=r+12|0}if((Ba|0)==2|(Ba?s:q)){q=Ba?q:r+12|0;if(!Ba|(k|0)==1){e=Ib(51780,11324,39);i=1;if((Ba|0)==1){break a}h=e}m=Ba?m:x[b+52>>2];if(!Ba|(k|0)==2){e=Nh(h,m);i=2;if((Ba|0)==1){break a}h=e}if(!Ba){m=x[x[h>>2]-12>>2]+h|0;vj(q,m);q=r+12|0}if(!Ba|(k|0)==3){e=il(q,52748);i=3;if((Ba|0)==1){break a}v=e}q=Ba?q:x[x[v>>2]+28>>2];if(!Ba|(k|0)==4){e=Ea[q|0](v,10)|0;i=4;if((Ba|0)==1){break a}v=e}q=Ba?q:r+12|0;if(!Ba|(k|0)==5){Po(q);i=5;if((Ba|0)==1){break a}}if(!Ba|(k|0)==6){Th(h,v);i=6;if((Ba|0)==1){break a}}if(!Ba|(k|0)==7){rh(h);i=7;if((Ba|0)==1){break a}}if(!Ba){h=x[b+52>>2]}}if(!Ba|(k|0)==8){Yb(g,a,h,c);i=8;if((Ba|0)==1){break a}}if(!Ba){q=b+68|0;m=r+12|0;s=x[b+40>>2];u=x[r+36>>2];g=b+56|0;h=x[b+52>>2]}if(!Ba|(k|0)==9){_b(a,g,q,h,m,s,t,u);i=9;if((Ba|0)==1){break a}}if(!Ba){h=x[r+12>>2];g=!h;if(g){break c}x[r+16>>2]=h;zg(h);break c}}if(!Ba){q=b+68|0;u=x[r+36>>2];g=b+56|0}if(!Ba|(k|0)==10){_b(a,g,q,h,0,y,t,u);i=10;if((Ba|0)==1){break a}}}if(!Ba){w=f+1|0;v=w+f|0;g=x[d+84>>2];q=x[d+80>>2];m=g-q>>2;h=x[a+64>>2];s=(m>>>0)/(h>>>0)|0;v=(s|0)<(v|0)?v:s;s=(v|0)/2|0;e=D(h,s);x[b+100>>2]=e;x[b+96>>2]=e;x[b+92>>2]=D(h,s-f|0);z=x[b+60>>2]-x[b+56>>2]>>4;s=x[a+48>>2]>0;h=D(h,v)}if((Ba|0)==2|s){s=Ba?s:r+12|0;if(!Ba|(k|0)==11){e=Ib(51780,11922,13);i=11;if((Ba|0)==1){break a}A=e}a=Ba?a:x[a+64>>2];if(!Ba|(k|0)==12){e=Nh(A,a);i=12;if((Ba|0)==1){break a}a=e}if(!Ba|(k|0)==13){e=Ib(a,8973,23);i=13;if((Ba|0)==1){break a}a=e}if(!Ba|(k|0)==14){e=Ib(a,11059,14);i=14;if((Ba|0)==1){break a}a=e}if(!Ba|(k|0)==15){e=Nh(a,f);i=15;if((Ba|0)==1){break a}a=e}if(!Ba|(k|0)==16){e=Ib(a,11050,8);i=16;if((Ba|0)==1){break a}a=e}if(!Ba|(k|0)==17){e=Nh(a,w);i=17;if((Ba|0)==1){break a}a=e}if(!Ba|(k|0)==18){e=Ib(a,11315,8);i=18;if((Ba|0)==1){break a}a=e}if(!Ba|(k|0)==19){e=Nh(a,h);i=19;if((Ba|0)==1){break a}a=e}if(!Ba){vj(s,x[x[a>>2]-12>>2]+a|0);f=r+12|0}if(!Ba|(k|0)==20){e=il(f,52748);i=20;if((Ba|0)==1){break a}f=e}s=Ba?s:x[x[f>>2]+28>>2];if(!Ba|(k|0)==21){e=Ea[s|0](f,10)|0;i=21;if((Ba|0)==1){break a}f=e}s=Ba?s:r+12|0;if(!Ba|(k|0)==22){Po(s);i=22;if((Ba|0)==1){break a}}if(!Ba|(k|0)==23){Th(a,f);i=23;if((Ba|0)==1){break a}}if(!Ba|(k|0)==24){rh(a);i=24;if((Ba|0)==1){break a}}f=Ba?f:r+12|0;if(!Ba|(k|0)==25){e=Ib(51780,11498,27);i=25;if((Ba|0)==1){break a}a=e}if(!Ba|(k|0)==26){e=Nh(a,t);i=26;if((Ba|0)==1){break a}a=e}if(!Ba|(k|0)==27){e=Ib(a,11480,17);i=27;if((Ba|0)==1){break a}a=e}if(!Ba|(k|0)==28){e=Nh(a,u);i=28;if((Ba|0)==1){break a}a=e}if(!Ba|(k|0)==29){e=Ib(a,11613,16);i=29;if((Ba|0)==1){break a}a=e}if(!Ba|(k|0)==30){e=Nh(a,y);i=30;if((Ba|0)==1){break a}a=e}if(!Ba|(k|0)==31){e=Ib(a,11526,4);i=31;if((Ba|0)==1){break a}a=e}if(!Ba|(k|0)==32){e=Nh(a,z);i=32;if((Ba|0)==1){break a}a=e}if(!Ba){t=x[x[a>>2]-12>>2]+a|0;vj(f,t);f=r+12|0}if(!Ba|(k|0)==33){e=il(f,52748);i=33;if((Ba|0)==1){break a}f=e}t=Ba?t:x[x[f>>2]+28>>2];if(!Ba|(k|0)==34){e=Ea[t|0](f,10)|0;i=34;if((Ba|0)==1){break a}f=e}t=Ba?t:r+12|0;if(!Ba|(k|0)==35){Po(t);i=35;if((Ba|0)==1){break a}}if(!Ba|(k|0)==36){Th(a,f);i=36;if((Ba|0)==1){break a}}if(!Ba|(k|0)==37){rh(a);i=37;if((Ba|0)==1){break a}}}a=Ba?a:(g|0)!=(q|0);i=(Ba|0)==2;d:{e:{f:{if(a|i){a=Ba?a:(h|0)==(m|0);g:{if(i|a){if((Ba?a:(b|0)!=(d|0))|i){h:{if(!Ba){a=q;q=g;i:{u=b+80|0;w=x[u+8>>2];g=x[u>>2];j:{if(w-g>>2>>>0>=m>>>0){w=u+4|0;u=x[u+4>>2];t=u-g|0;s=t>>2;if(s>>>0>>0){m=(s<<2)+a|0;if((g|0)!=(u|0)){mf(g,a,t);g=x[w>>2]}a=g;if((q|0)!=(m|0)){while(1){B[a>>2]=B[m>>2];a=a+4|0;m=m+4|0;if((m|0)!=(q|0)){continue}break}}m=a-g|0;break j}m=q-a|0;q=(a|0)==(q|0);if(q){break j}mf(g,a,m);break j}if(g){x[u+4>>2]=g;zg(g);x[u+8>>2]=0;x[u>>2]=0;x[u+4>>2]=0;w=0}if(m>>>0>=1073741824){break i}g=w>>1;f=m>>>0>>0;m=w>>>0>=2147483644?1073741823:f?g:m;if(m>>>0>=1073741824){break i}g=Mb(m);x[u>>2]=g;x[u+8>>2]=(m<<2)+g;m=g;if((a|0)!=(q|0)){while(1){B[m>>2]=B[a>>2];m=m+4|0;a=a+4|0;if((q|0)!=(a|0)){continue}break}}w=u+4|0;m=m-g|0}x[w>>2]=g+m;break h}}if(!Ba|(k|0)==38){Xa();i=38;if((Ba|0)==1){break a}}if(!Ba){p()}}}if(!Ba){x[b+100>>2]=x[d+100>>2];break g}}if(!Ba){f=0;x[r+20>>2]=0;x[r+12>>2]=0;x[r+16>>2]=0;s=0;if(v){if(h>>>0>=1073741824){break e}s=Mb(h);f=s+(h<<2)|0;a=s;while(1){x[a>>2]=0;a=a+4|0;if((f|0)!=(a|0)){continue}break}}a=x[b+80>>2];if(a){x[b+84>>2]=a;zg(a)}x[b+80>>2]=s;x[b+88>>2]=f;x[b+84>>2]=f;f=x[d+100>>2];if((f|0)<=0){break g}u=f&1;t=x[b+96>>2];y=x[d+96>>2];a=0;if((f|0)!=1){m=f&-2;v=0;while(1){f=(a-y|0)+t|0;if(!((f|0)<0|(f|0)>=(h|0))){B[(f<<2)+s>>2]=B[(a<<2)+q>>2];x[b+100>>2]=f+1}g=a|1;f=(g-y|0)+t|0;if(!((f|0)<0|(f|0)>=(h|0))){B[(f<<2)+s>>2]=B[(g<<2)+q>>2];x[b+100>>2]=f+1}a=a+2|0;v=v+2|0;if((v|0)!=(m|0)){continue}break}}if(!u){break g}f=(a-y|0)+t|0;if((f|0)<0|(f|0)>=(h|0)){break g}B[(f<<2)+s>>2]=B[(a<<2)+q>>2];x[b+100>>2]=f+1}}if(!Ba){f=z-1|0;c=ag(+x[d+44>>2]/+(x[d+60>>2]-x[d+56>>2]>>4)*+(z|0));k:{if(F(c)<2147483648){a=~~c;break k}a=-2147483648}x[b+44>>2]=(a|0)<(z|0)?a:f;break f}}if(!Ba){f=0;x[r+20>>2]=0;x[r+12>>2]=0;x[r+16>>2]=0;t=0;if(v){if(h>>>0>=1073741824){break d}t=Mb(h);f=t+(h<<2)|0;a=t;while(1){x[a>>2]=0;a=a+4|0;if((f|0)!=(a|0)){continue}break}}a=x[b+80>>2];if(a){x[b+84>>2]=a;zg(a)}x[b+80>>2]=t;x[b+88>>2]=f;x[b+84>>2]=f}}if(!Ba){ya=r- -64|0;return}}if(!Ba|(k|0)==39){Xa();i=39;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba|(k|0)==40){Xa();i=40;if((Ba|0)==1){break a}}if(!Ba){p()}return}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;o(+c);a=j(1)|0;G=e,H=j(0)|0,x[G+8>>2]=H;x[e+12>>2]=a;x[e+16>>2]=d;x[e+20>>2]=f;x[e+24>>2]=g;x[e+28>>2]=h;x[e+32>>2]=q;x[e+36>>2]=m;x[e+40>>2]=r;x[e+44>>2]=s;x[e+48>>2]=t;x[e+52>>2]=u;x[e+56>>2]=v;x[e+60>>2]=w;x[e+64>>2]=z;x[e+68>>2]=y;x[e+72>>2]=A;x[Ca>>2]=x[Ca>>2]+76}function xn(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-40;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];j=x[b+32>>2];m=x[b+36>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;k=x[x[Ca>>2]>>2]}if(!Ba){h=ya-48|0;ya=h;x[h+44>>2]=b;x[e>>2]=0;vj(h,d)}a:{if(!Ba|!k){i=bi(h);if((Ba|0)==1){break a}j=i}if(!Ba|(k|0)==1){Po(h);l=1;if((Ba|0)==1){break a}}m=Ba?m:g-65|0;b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{l:{m:{n:{o:{p:{q:{r:{s:{t:{u:{v:{w:{x:{y:{z:{A:{if(!Ba){B:{switch(m|0){case 2:case 4:case 6:case 9:case 10:case 11:case 13:case 14:case 15:case 16:case 20:case 21:case 22:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 37:case 38:case 40:case 42:case 43:case 46:case 48:case 50:case 52:case 53:break e;case 24:break g;case 56:break h;case 23:break i;case 55:break j;case 54:break k;case 19:break l;case 18:break m;case 17:break n;case 49:break o;case 47:break p;case 45:case 51:break q;case 12:break r;case 44:break s;case 41:break t;case 8:break u;case 7:break v;case 5:break w;case 3:break x;case 35:case 36:break y;case 34:break z;case 1:case 33:case 39:break A;case 0:case 32:break B;default:break f}}d=h+44|0;b=f+24|0}if(!Ba|(k|0)==2){rn(a,b,d,c,e,j);l=2;if((Ba|0)==1){break a}}if(!Ba){break c}}if(!Ba){d=h+44|0;b=f+16|0}if(!Ba|(k|0)==3){tn(a,b,d,c,e,j);l=3;if((Ba|0)==1){break a}}if(!Ba){break c}}if(!Ba){g=x[x[a+8>>2]+12>>2];b=a+8|0}if(!Ba|(k|0)==4){i=Ea[g|0](b)|0;l=4;if((Ba|0)==1){break a}b=i}if(!Ba){g=x[h+44>>2];j=ri(b);m=ri(b);b=m+(ui(b)<<2)|0}if(!Ba|(k|0)==5){i=mn(a,g,c,d,e,f,j,b);l=5;if((Ba|0)==1){break a}a=i}if(!Ba){x[h+44>>2]=a;break c}}if(!Ba){b=h+44|0;a=f+12|0}if(!Ba|(k|0)==6){i=wn(b,c,e,j,2);l=6;if((Ba|0)==1){break a}j=i}if(!Ba){b=x[e>>2];if(!(b&4|j-1>>>0>30)){x[a>>2]=j;break c}x[e>>2]=b|4;break c}}if(!Ba){x[h+24>>2]=37;x[h+28>>2]=121;x[h+16>>2]=100;x[h+20>>2]=47;x[h+8>>2]=47;x[h+12>>2]=37;x[h>>2]=37;x[h+4>>2]=109;g=h+32|0}if(!Ba|(k|0)==7){i=mn(a,b,c,d,e,f,h,g);l=7;if((Ba|0)==1){break a}a=i}if(!Ba){x[h+44>>2]=a;break c}}if(!Ba){x[h+24>>2]=37;x[h+28>>2]=100;x[h+16>>2]=109;x[h+20>>2]=45;x[h+8>>2]=45;x[h+12>>2]=37;x[h>>2]=37;x[h+4>>2]=89;g=h+32|0}if(!Ba|(k|0)==8){i=mn(a,b,c,d,e,f,h,g);l=8;if((Ba|0)==1){break a}a=i}if(!Ba){x[h+44>>2]=a;break c}}if(!Ba){b=h+44|0;a=f+8|0}if(!Ba|(k|0)==9){i=wn(b,c,e,j,2);l=9;if((Ba|0)==1){break a}j=i}if(!Ba){b=x[e>>2];if(!(b&4|(j|0)>23)){x[a>>2]=j;break c}x[e>>2]=b|4;break c}}if(!Ba){b=h+44|0;a=f+8|0}if(!Ba|(k|0)==10){i=wn(b,c,e,j,2);l=10;if((Ba|0)==1){break a}j=i}if(!Ba){b=x[e>>2];if(!(b&4|j-1>>>0>11)){x[a>>2]=j;break c}x[e>>2]=b|4;break c}}if(!Ba){b=h+44|0;a=f+28|0}if(!Ba|(k|0)==11){i=wn(b,c,e,j,3);l=11;if((Ba|0)==1){break a}j=i}if(!Ba){b=x[e>>2];if(!(b&4|(j|0)>365)){x[a>>2]=j;break c}x[e>>2]=b|4;break c}}if(!Ba){b=h+44|0;a=f+16|0}if(!Ba|(k|0)==12){i=wn(b,c,e,j,2);l=12;if((Ba|0)==1){break a}c=i}if(!Ba){b=x[e>>2];c=c-1|0;if(!(b&4|c>>>0>11)){x[a>>2]=c;break c}x[e>>2]=b|4;break c}}if(!Ba){b=h+44|0;a=f+4|0}if(!Ba|(k|0)==13){i=wn(b,c,e,j,2);l=13;if((Ba|0)==1){break a}j=i}if(!Ba){b=x[e>>2];if(!(b&4|(j|0)>59)){x[a>>2]=j;break c}x[e>>2]=b|4;break c}}if(!Ba){b=ya-16|0;ya=b;x[b+12>>2]=c;a=h+44|0}while(1){C:{c=Ba?c:b+12|0;if(!Ba|(k|0)==14){i=ci(a,c);l=14;if((Ba|0)==1){break a}c=i}if(!(c?Ba:1)){break C}if(!Ba|(k|0)==15){i=di(a);l=15;if((Ba|0)==1){break a}c=i}if(!Ba|(k|0)==16){i=ei(j,1,c);l=16;if((Ba|0)==1){break a}c=i}if(!Ba){c=!c;if(c){break C}}if(!Ba|(k|0)==17){i=fi(a);l=17;if((Ba|0)==1){break a}c=i}if(!Ba){continue}}break}c=Ba?c:b+12|0;if(!Ba|(k|0)==18){i=ci(a,c);l=18;if((Ba|0)==1){break a}a=i}if(!Ba){if(a){x[e>>2]=x[e>>2]|2}ya=b+16|0;break c}}if(!Ba){b=f+8|0;d=h+44|0;f=a+8|0;a=x[x[a+8>>2]+8>>2]}if(!Ba|(k|0)==19){i=Ea[a|0](f)|0;l=19;if((Ba|0)==1){break a}a=i}if(!Ba){f=ui(a);g=0-ui(a+12|0)|0;f=(f|0)==(g|0)}D:{if(!Ba){if(f){a=x[e>>2]|4;x[e>>2]=a;break D}f=a+24|0}if(!Ba|(k|0)==20){i=Vl(d,c,a,f,j,e,0);l=20;if((Ba|0)==1){break a}e=i}if(!Ba){j=x[b>>2];E:{c=(a|0)!=(e|0);if(c){break E}c=(j|0)!=12;if(c){break E}x[b>>2]=0;break D}a=(e-a|0)!=12;F:{if(a){break F}a=(j|0)>11;if(a){break F}a=j+12|0;x[b>>2]=a}}}if(!Ba){break c}}if(!Ba){x[h+40>>2]=112;x[h+32>>2]=32;x[h+36>>2]=37;x[h+24>>2]=37;x[h+28>>2]=83;x[h+16>>2]=77;x[h+20>>2]=58;x[h+8>>2]=58;x[h+12>>2]=37;x[h>>2]=37;x[h+4>>2]=73;g=h+44|0}if(!Ba|(k|0)==21){i=mn(a,b,c,d,e,f,h,g);l=21;if((Ba|0)==1){break a}a=i}if(!Ba){x[h+44>>2]=a;break c}}if(!Ba){x[h+16>>2]=77;x[h+8>>2]=58;x[h+12>>2]=37;x[h>>2]=37;x[h+4>>2]=72;g=h+20|0}if(!Ba|(k|0)==22){i=mn(a,b,c,d,e,f,h,g);l=22;if((Ba|0)==1){break a}a=i}if(!Ba){x[h+44>>2]=a;break c}}a=Ba?a:h+44|0;if(!Ba|(k|0)==23){i=wn(a,c,e,j,2);l=23;if((Ba|0)==1){break a}j=i}if(!Ba){a=x[e>>2];if(!(a&4|(j|0)>60)){x[f>>2]=j;break c}x[e>>2]=a|4;break c}}if(!Ba){x[h+24>>2]=37;x[h+28>>2]=83;x[h+16>>2]=77;x[h+20>>2]=58;x[h+8>>2]=58;x[h+12>>2]=37;x[h>>2]=37;x[h+4>>2]=72;g=h+32|0}if(!Ba|(k|0)==24){i=mn(a,b,c,d,e,f,h,g);l=24;if((Ba|0)==1){break a}a=i}if(!Ba){x[h+44>>2]=a;break c}}if(!Ba){b=h+44|0;a=f+24|0}if(!Ba|(k|0)==25){i=wn(b,c,e,j,1);l=25;if((Ba|0)==1){break a}j=i}if(!Ba){b=x[e>>2];if(!(b&4|(j|0)>6)){x[a>>2]=j;break c}x[e>>2]=b|4;break c}}g=Ba?g:x[x[a>>2]+20>>2];if(!Ba|(k|0)==26){i=Ea[g|0](a,b,c,d,e,f)|0;l=26;if((Ba|0)==1){break a}e=i}if(!Ba){break b}}if(!Ba){g=x[x[a+8>>2]+24>>2];b=a+8|0}if(!Ba|(k|0)==27){i=Ea[g|0](b)|0;l=27;if((Ba|0)==1){break a}b=i}if(!Ba){g=x[h+44>>2];j=ri(b);m=ri(b);b=m+(ui(b)<<2)|0}if(!Ba|(k|0)==28){i=mn(a,g,c,d,e,f,j,b);l=28;if((Ba|0)==1){break a}a=i}if(!Ba){x[h+44>>2]=a;break c}}if(!Ba){b=h+44|0;a=f+20|0}if(!Ba|(k|0)==29){vn(a,b,c,e,j);l=29;if((Ba|0)==1){break a}}if(!Ba){break c}}if(!Ba){b=h+44|0;a=f+20|0}if(!Ba|(k|0)==30){i=wn(b,c,e,j,4);l=30;if((Ba|0)==1){break a}j=i}if(!Ba){if(!(y[e|0]&4)){x[a>>2]=j-1900}break c}}if(!Ba){a=(g|0)==37;if(a){break d}}}if(!Ba){x[e>>2]=x[e>>2]|4;break c}}if(!Ba){a=ya-16|0;ya=a;x[a+12>>2]=c;c=6;d=a+12|0;b=h+44|0}if(!Ba|(k|0)==31){i=ci(b,d);l=31;if((Ba|0)==1){break a}d=i}G:{H:{if(!Ba){if(d){break H}c=4}if(!Ba|(k|0)==32){i=di(b);l=32;if((Ba|0)==1){break a}d=i}if(!Ba|(k|0)==33){i=nn(j,d);l=33;if((Ba|0)==1){break a}d=i}if(!Ba){d=(d|0)!=37;if(d){break H}c=2}if(!Ba|(k|0)==34){i=fi(b);l=34;if((Ba|0)==1){break a}b=i}d=Ba?d:a+12|0;if(!Ba|(k|0)==35){i=ci(b,d);l=35;if((Ba|0)==1){break a}b=i}if(!(Ba|b)){break G}}if(!Ba){x[e>>2]=x[e>>2]|c}}if(!Ba){ya=a+16|0}}e=Ba?e:x[h+44>>2]}if(!Ba){ya=h+48|0;return e|0}p()}x[x[Ca>>2]>>2]=l;x[Ca>>2]=x[Ca>>2]+4;i=x[Ca>>2];x[i>>2]=a;x[i+4>>2]=b;x[i+8>>2]=c;x[i+12>>2]=d;x[i+16>>2]=e;x[i+20>>2]=f;x[i+24>>2]=g;x[i+28>>2]=h;x[i+32>>2]=j;x[i+36>>2]=m;x[Ca>>2]=x[Ca>>2]+40;return 0}function Yb(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,D=0,E=0,G=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-88;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];f=x[b+16>>2];g=x[b+12>>2];l(0,g|0);l(1,f|0);d=+n();g=x[b+20>>2];f=x[b+24>>2];h=x[b+28>>2];k=x[b+32>>2];m=x[b+36>>2];q=x[b+44>>2];e=x[b+40>>2];l(0,e|0);l(1,q|0);i=+n();v=x[b+48>>2];q=x[b+56>>2];e=x[b+52>>2];l(0,e|0);l(1,q|0);r=+n();q=x[b+64>>2];e=x[b+60>>2];l(0,e|0);l(1,q|0);t=+n();q=x[b+68>>2];e=x[b+76>>2];s=x[b+72>>2];l(0,s|0);l(1,e|0);y=+n();z=x[b+80>>2];A=x[b+84>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;u=x[x[Ca>>2]>>2]}if(!Ba){h=ya;m=h-32|0;ya=m;x[m+28>>2]=0;x[m+20>>2]=0;x[m+24>>2]=0}a:{b:{c:{d:{e:{f:{g:{h:{if((Ba|0)==2|c){if(!Ba){h=c>>>0>=536870912;if(h){break h}v=c<<3}if(!Ba|!u){e=dr(v);s=0;if((Ba|0)==1){break a}f=e}if(!Ba){x[m+24>>2]=f;x[m+20>>2]=f;h=f+v|0;x[m+28>>2]=h}}if(!Ba){k=m+8|0;t=C[b+16>>3];v=ya-16|0;ya=v;r=C[b+8>>3];i:{j:{if(r>21){i=K((r+-7.95)/(t*2.285));k:{if(F(i)<2147483648){e=~~i;break k}e=-2147483648}g=e+1|0;if(r>50){break j}i=r+-21;i=Zf(i,.4)*.5842+i*.07886;break i}i=K(5.79/t);l:{if(F(i)<2147483648){e=~~i;break l}e=-2147483648}g=e+1|0;i=0;if(!(r>50)){break i}}i=(r+-8.7)*.1102}m:{n:{f=(c|0)<=0;if(f){break n}f=(c|0)>(g|0);if(f){break n}e=c-1|0;break m}e=(g|0)<=0?1:g}h=e|1;b=x[b+48>>2]>0}if((Ba|0)==2|b){b=Ba?b:v+12|0;if(!Ba|(u|0)==1){e=Ib(51780,11256,32);s=1;if((Ba|0)==1){break a}f=e}if(!Ba|(u|0)==2){e=Rh(f,r);s=2;if((Ba|0)==1){break a}f=e}if(!Ba|(u|0)==3){e=Ib(f,11228,13);s=3;if((Ba|0)==1){break a}f=e}if(!Ba|(u|0)==4){e=Rh(f,t);s=4;if((Ba|0)==1){break a}f=e}if(!Ba|(u|0)==5){e=Ib(f,11468,11);s=5;if((Ba|0)==1){break a}f=e}if(!Ba|(u|0)==6){e=Nh(f,g);s=6;if((Ba|0)==1){break a}g=e}if(!Ba|(u|0)==7){e=Ib(g,11145,13);s=7;if((Ba|0)==1){break a}g=e}if(!Ba|(u|0)==8){e=Nh(g,h);s=8;if((Ba|0)==1){break a}g=e}if(!Ba|(u|0)==9){e=Ib(g,11676,7);s=9;if((Ba|0)==1){break a}g=e}if(!Ba|(u|0)==10){e=Rh(g,i);s=10;if((Ba|0)==1){break a}g=e}if(!Ba){f=x[x[g>>2]-12>>2]+g|0;vj(b,f);b=v+12|0}if(!Ba|(u|0)==11){e=il(b,52748);s=11;if((Ba|0)==1){break a}b=e}f=Ba?f:x[x[b>>2]+28>>2];if(!Ba|(u|0)==12){e=Ea[f|0](b,10)|0;s=12;if((Ba|0)==1){break a}b=e}f=Ba?f:v+12|0;if(!Ba|(u|0)==13){Po(f);s=13;if((Ba|0)==1){break a}}if(!Ba|(u|0)==14){Th(g,b);s=14;if((Ba|0)==1){break a}}if(!Ba|(u|0)==15){rh(g);s=15;if((Ba|0)==1){break a}}}if(!Ba){w=i*.5;r=1;b=1;while(1){t=C[(b<<3)+12912>>3];y=+(b|0);t=Zf(w,y+y)/t;y=r+t;g=b+1|0;if((g|0)!=20){r=C[(g<<3)+12912>>3];t=+(g|0);r=y+Zf(w,t+t)/r;b=b+2|0;continue}break}x[k+8>>2]=0;x[k>>2]=0;x[k+4>>2]=0;b=(h&1)+h|0;f=(b|0)/2|0}o:{p:{if((Ba|0)==2|h){if(!Ba){g=h>>>0>=536870912;if(g){break p}g=h<<3}if(!Ba|(u|0)==16){e=dr(g);s=16;if((Ba|0)==1){break a}q=e}if(!Ba){x[k>>2]=q;e=g+q|0;x[k+8>>2]=e;g=nf(q,0,g);x[k+4>>2]=e}}if(!Ba){b=(b|0)<2;if(b){break o}D=+(h-1|0);k=0;q:while(1){t=1;r=+(k|0);r=(r+r)/D+-1;r=M(1-r*r)*i*.5;b=1;while(1){w=C[(b<<3)+12912>>3];B=t;t=+(b|0);t=Zf(r,t+t)/w;w=B+t;g=b+1|0;if((g|0)==20){C[(k<<3)+q>>3]=w/y;k=k+1|0;b=(k|0)!=(f|0);if(b){continue q}break o}else{t=C[(g<<3)+12912>>3];B=w;w=+(g|0);t=B+Zf(r,w+w)/t;b=b+2|0;continue}}}}}if(!Ba|(u|0)==17){Xa();s=17;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){r:{if((f|0)>=(h|0)){break r}e=(f^-1)+h|0;b=(h<<3)+q|0;k=h-f&3;if(k){g=0;while(1){i=C[b+((f^-1)<<3)>>3];C[(f<<3)+q>>3]=i;f=f+1|0;g=g+1|0;if((k|0)!=(g|0)){continue}break}}g=e>>>0<3;if(g){break r}while(1){g=(f<<3)+q|0;C[g>>3]=C[b+((f^-1)<<3)>>3];C[g+8>>3]=C[b+(-2-f<<3)>>3];C[g+16>>3]=C[b+(-3-f<<3)>>3];i=C[b+(-4-f<<3)>>3];C[g+24>>3]=i;f=f+4|0;g=(h|0)!=(f|0);if(g){continue}break}}ya=v+16|0;f=x[m+12>>2];k=x[m+8>>2];v=f-k>>3;if((v|0)==(c|0)){if(c>>>0>=2){i=3.141592653589793/d;g=c+1>>>1|0;c=c>>>1|0;h=(c<<3)+k|0;b=1;while(1){d=i*+(b|0);d=cg(d)/d;if(b>>>0<=c>>>0){q=(c-b<<3)+k|0;C[q>>3]=d*C[q>>3]}if(b>>>0>>0){q=h+(b<<3)|0;C[q>>3]=d*C[q>>3]}q=(b|0)!=(g|0);b=b+1|0;if(q){continue}break}}x[a+4>>2]=f;x[a>>2]=k;x[a+8>>2]=x[m+16>>2];break c}b=x[m+16>>2];h=f>>>0>>0}s:{if(!Ba){if(h){x[f>>2]=0;x[f+4>>2]=0;b=f+8|0;x[m+12>>2]=b;break s}g=v+1|0;if(g>>>0>=536870912){break g}b=b-k|0;h=b>>2;q=h>>>0>g>>>0;h=q?h:g;b=b>>>0>=2147483640;g=b?536870911:h}z=Ba?z:g;if(z|(Ba|0)==2){if(!Ba){if(g>>>0>=536870912){break f}b=g<<3}if(!Ba|(u|0)==18){e=dr(b);s=18;if((Ba|0)==1){break a}h=e}}h=!Ba&(!z|(Ba|0)==2)?0:h;if(!Ba){b=(v<<3)+h|0;x[b>>2]=0;x[b+4>>2]=0;g=(g<<3)+h|0;h=b+8|0;q=(f|0)!=(k|0);if(q){while(1){b=b-8|0;f=f-8|0;i=C[f>>3];C[b>>3]=i;q=(f|0)!=(k|0);if(q){continue}break}}x[m+16>>2]=g;x[m+12>>2]=h;x[m+8>>2]=b;b=!k;if(b){break s}zg(k)}}if(!Ba){g=0;if((c|0)<=0){break d}i=+(v-1|0);b=c-1|0;t=i/+(b|0)}while(1){if(!Ba){e=x[m+8>>2];i=t*+(g|0);r=J(i);t:{if(F(r)<2147483648){b=~~r;break t}b=-2147483648}f=e+(b<<3)|0;i=i-+(b|0);i=C[f+8>>3]*i+(C[f>>3]*(1-i)+0);b=x[m+24>>2];h=(b|0)!=x[m+28>>2]}u:{if(!Ba){if(h){C[b>>3]=i;x[m+24>>2]=b+8;break u}v=x[m+20>>2];f=b-v|0;h=f>>3;k=h+1|0;if(k>>>0>=536870912){break e}q=h<<3;h=f>>2;h=h>>>0>k>>>0?h:k;k=f>>>0>=2147483640?536870911:h}A=Ba?A:k;if(A|(Ba|0)==2){if(!Ba){if(k>>>0>=536870912){break f}h=k<<3}if(!Ba|(u|0)==19){e=dr(h);s=19;if((Ba|0)==1){break a}h=e}}h=!Ba&(!A|(Ba|0)==2)?0:h;if(!Ba){f=h+q|0;C[f>>3]=i;k=(k<<3)+h|0;h=f+8|0;q=(b|0)!=(v|0);if(q){while(1){f=f-8|0;b=b-8|0;i=C[b>>3];C[f>>3]=i;q=(b|0)!=(v|0);if(q){continue}break}}x[m+28>>2]=k;x[m+24>>2]=h;x[m+20>>2]=f;if(!v){break u}zg(v)}}if(!Ba){g=g+1|0;b=(g|0)!=(c|0);if(b){continue}}break}if(!Ba){break d}}if(!Ba|(u|0)==20){Xa();s=20;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba|(u|0)==21){Xa();s=21;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){Ya();p()}}if(!Ba|(u|0)==22){Xa();s=22;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){h=x[m+24>>2];c=x[m+20>>2];b=h-c>>3;if((b|0)>=2){i=3.141592653589793/d;f=b+1>>>1|0;g=b>>>1|0;q=c+(g<<3)|0;b=1;while(1){d=i*+(b|0);d=cg(d)/d;if(b>>>0<=g>>>0){e=c+(g-b<<3)|0;C[e>>3]=d*C[e>>3]}if(b>>>0>>0){e=q+(b<<3)|0;C[e>>3]=d*C[e>>3]}e=(b|0)==(f|0);b=b+1|0;if(!e){continue}break}}x[a+4>>2]=h;x[a>>2]=c;x[a+8>>2]=x[m+28>>2];x[m+28>>2]=0;x[m+20>>2]=0;x[m+24>>2]=0;a=x[m+8>>2];if(!a){break b}x[m+12>>2]=a;zg(a)}}if(!Ba){a=x[m+20>>2];if(!a){break b}x[m+24>>2]=a;zg(a)}}if(!Ba){ya=m+32|0}return}x[x[Ca>>2]>>2]=s;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;o(+d);a=j(1)|0;E=e,G=j(0)|0,x[E+12>>2]=G;x[e+16>>2]=a;x[e+20>>2]=g;x[e+24>>2]=f;x[e+28>>2]=h;x[e+32>>2]=k;x[e+36>>2]=m;o(+i);a=j(1)|0;E=e,G=j(0)|0,x[E+40>>2]=G;x[e+44>>2]=a;x[e+48>>2]=v;o(+r);a=j(1)|0;E=e,G=j(0)|0,x[E+52>>2]=G;x[e+56>>2]=a;o(+t);a=j(1)|0;E=e,G=j(0)|0,x[E+60>>2]=G;x[e+64>>2]=a;x[e+68>>2]=q;o(+y);a=j(1)|0;E=e,G=j(0)|0,x[E+72>>2]=G;x[e+76>>2]=a;x[e+80>>2]=z;x[e+84>>2]=A;x[Ca>>2]=x[Ca>>2]+88}function ln(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-40;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];j=x[b+32>>2];m=x[b+36>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;k=x[x[Ca>>2]>>2]}if(!Ba){h=ya-16|0;ya=h;x[h+12>>2]=b;x[e>>2]=0;vj(h,d)}a:{if(!Ba|!k){i=sh(h);if((Ba|0)==1){break a}j=i}if(!Ba|(k|0)==1){Po(h);l=1;if((Ba|0)==1){break a}}m=Ba?m:g-65|0;b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{l:{m:{n:{o:{p:{q:{r:{s:{t:{u:{v:{w:{x:{y:{z:{A:{if(!Ba){B:{switch(m|0){case 2:case 4:case 6:case 9:case 10:case 11:case 13:case 14:case 15:case 16:case 20:case 21:case 22:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 37:case 38:case 40:case 42:case 43:case 46:case 48:case 50:case 52:case 53:break e;case 24:break g;case 56:break h;case 23:break i;case 55:break j;case 54:break k;case 19:break l;case 18:break m;case 17:break n;case 49:break o;case 47:break p;case 45:case 51:break q;case 12:break r;case 44:break s;case 41:break t;case 8:break u;case 7:break v;case 5:break w;case 3:break x;case 35:case 36:break y;case 34:break z;case 1:case 33:case 39:break A;case 0:case 32:break B;default:break f}}d=h+12|0;b=f+24|0}if(!Ba|(k|0)==2){en(a,b,d,c,e,j);l=2;if((Ba|0)==1){break a}}if(!Ba){break c}}if(!Ba){d=h+12|0;b=f+16|0}if(!Ba|(k|0)==3){gn(a,b,d,c,e,j);l=3;if((Ba|0)==1){break a}}if(!Ba){break c}}if(!Ba){g=x[x[a+8>>2]+12>>2];b=a+8|0}if(!Ba|(k|0)==4){i=Ea[g|0](b)|0;l=4;if((Ba|0)==1){break a}b=i}if(!Ba){g=x[h+12>>2];j=ri(b);m=ri(b);b=m+ui(b)|0}if(!Ba|(k|0)==5){i=$m(a,g,c,d,e,f,j,b);l=5;if((Ba|0)==1){break a}a=i}if(!Ba){x[h+12>>2]=a;break c}}if(!Ba){b=h+12|0;a=f+12|0}if(!Ba|(k|0)==6){i=kn(b,c,e,j,2);l=6;if((Ba|0)==1){break a}j=i}if(!Ba){b=x[e>>2];if(!(b&4|j-1>>>0>30)){x[a>>2]=j;break c}x[e>>2]=b|4;break c}}if(!Ba){v[h|0]=37;v[h+1|0]=109;v[h+2|0]=47;v[h+3|0]=37;v[h+4|0]=100;v[h+5|0]=47;v[h+6|0]=37;v[h+7|0]=121;g=h+8|0}if(!Ba|(k|0)==7){i=$m(a,b,c,d,e,f,h,g);l=7;if((Ba|0)==1){break a}a=i}if(!Ba){x[h+12>>2]=a;break c}}if(!Ba){v[h|0]=37;v[h+1|0]=89;v[h+2|0]=45;v[h+3|0]=37;v[h+4|0]=109;v[h+5|0]=45;v[h+6|0]=37;v[h+7|0]=100;g=h+8|0}if(!Ba|(k|0)==8){i=$m(a,b,c,d,e,f,h,g);l=8;if((Ba|0)==1){break a}a=i}if(!Ba){x[h+12>>2]=a;break c}}if(!Ba){b=h+12|0;a=f+8|0}if(!Ba|(k|0)==9){i=kn(b,c,e,j,2);l=9;if((Ba|0)==1){break a}j=i}if(!Ba){b=x[e>>2];if(!(b&4|(j|0)>23)){x[a>>2]=j;break c}x[e>>2]=b|4;break c}}if(!Ba){b=h+12|0;a=f+8|0}if(!Ba|(k|0)==10){i=kn(b,c,e,j,2);l=10;if((Ba|0)==1){break a}j=i}if(!Ba){b=x[e>>2];if(!(b&4|j-1>>>0>11)){x[a>>2]=j;break c}x[e>>2]=b|4;break c}}if(!Ba){b=h+12|0;a=f+28|0}if(!Ba|(k|0)==11){i=kn(b,c,e,j,3);l=11;if((Ba|0)==1){break a}j=i}if(!Ba){b=x[e>>2];if(!(b&4|(j|0)>365)){x[a>>2]=j;break c}x[e>>2]=b|4;break c}}if(!Ba){b=h+12|0;a=f+16|0}if(!Ba|(k|0)==12){i=kn(b,c,e,j,2);l=12;if((Ba|0)==1){break a}c=i}if(!Ba){b=x[e>>2];c=c-1|0;if(!(b&4|c>>>0>11)){x[a>>2]=c;break c}x[e>>2]=b|4;break c}}if(!Ba){b=h+12|0;a=f+4|0}if(!Ba|(k|0)==13){i=kn(b,c,e,j,2);l=13;if((Ba|0)==1){break a}j=i}if(!Ba){b=x[e>>2];if(!(b&4|(j|0)>59)){x[a>>2]=j;break c}x[e>>2]=b|4;break c}}if(!Ba){b=ya-16|0;ya=b;x[b+12>>2]=c;a=h+12|0}while(1){C:{c=Ba?c:b+12|0;if(!Ba|(k|0)==14){i=th(a,c);l=14;if((Ba|0)==1){break a}c=i}if(!(c?Ba:1)){break C}if(!Ba|(k|0)==15){i=uh(a);l=15;if((Ba|0)==1){break a}c=i}if(!Ba){c=!vh(j,1,c);if(c){break C}}if(!Ba|(k|0)==16){i=wh(a);l=16;if((Ba|0)==1){break a}c=i}if(!Ba){continue}}break}c=Ba?c:b+12|0;if(!Ba|(k|0)==17){i=th(a,c);l=17;if((Ba|0)==1){break a}a=i}if(!Ba){if(a){x[e>>2]=x[e>>2]|2}ya=b+16|0;break c}}if(!Ba){b=f+8|0;d=h+12|0;f=a+8|0;a=x[x[a+8>>2]+8>>2]}if(!Ba|(k|0)==18){i=Ea[a|0](f)|0;l=18;if((Ba|0)==1){break a}a=i}if(!Ba){f=ui(a);g=0-ui(a+12|0)|0;f=(f|0)==(g|0)}D:{if(!Ba){if(f){a=x[e>>2]|4;x[e>>2]=a;break D}f=a+24|0}if(!Ba|(k|0)==19){i=hl(d,c,a,f,j,e,0);l=19;if((Ba|0)==1){break a}e=i}if(!Ba){j=x[b>>2];E:{c=(a|0)!=(e|0);if(c){break E}c=(j|0)!=12;if(c){break E}x[b>>2]=0;break D}a=(e-a|0)!=12;F:{if(a){break F}a=(j|0)>11;if(a){break F}a=j+12|0;x[b>>2]=a}}}if(!Ba){break c}}if(!Ba){v[h+10|0]=112;v[h+8|0]=32;v[h+9|0]=37;v[h|0]=37;v[h+1|0]=73;v[h+2|0]=58;v[h+3|0]=37;v[h+4|0]=77;v[h+5|0]=58;v[h+6|0]=37;v[h+7|0]=83;g=h+11|0}if(!Ba|(k|0)==20){i=$m(a,b,c,d,e,f,h,g);l=20;if((Ba|0)==1){break a}a=i}if(!Ba){x[h+12>>2]=a;break c}}if(!Ba){v[h+4|0]=77;v[h|0]=37;v[h+1|0]=72;v[h+2|0]=58;v[h+3|0]=37;g=h+5|0}if(!Ba|(k|0)==21){i=$m(a,b,c,d,e,f,h,g);l=21;if((Ba|0)==1){break a}a=i}if(!Ba){x[h+12>>2]=a;break c}}a=Ba?a:h+12|0;if(!Ba|(k|0)==22){i=kn(a,c,e,j,2);l=22;if((Ba|0)==1){break a}j=i}if(!Ba){a=x[e>>2];if(!(a&4|(j|0)>60)){x[f>>2]=j;break c}x[e>>2]=a|4;break c}}if(!Ba){v[h|0]=37;v[h+1|0]=72;v[h+2|0]=58;v[h+3|0]=37;v[h+4|0]=77;v[h+5|0]=58;v[h+6|0]=37;v[h+7|0]=83;g=h+8|0}if(!Ba|(k|0)==23){i=$m(a,b,c,d,e,f,h,g);l=23;if((Ba|0)==1){break a}a=i}if(!Ba){x[h+12>>2]=a;break c}}if(!Ba){b=h+12|0;a=f+24|0}if(!Ba|(k|0)==24){i=kn(b,c,e,j,1);l=24;if((Ba|0)==1){break a}j=i}if(!Ba){b=x[e>>2];if(!(b&4|(j|0)>6)){x[a>>2]=j;break c}x[e>>2]=b|4;break c}}g=Ba?g:x[x[a>>2]+20>>2];if(!Ba|(k|0)==25){i=Ea[g|0](a,b,c,d,e,f)|0;l=25;if((Ba|0)==1){break a}e=i}if(!Ba){break b}}if(!Ba){g=x[x[a+8>>2]+24>>2];b=a+8|0}if(!Ba|(k|0)==26){i=Ea[g|0](b)|0;l=26;if((Ba|0)==1){break a}b=i}if(!Ba){g=x[h+12>>2];j=ri(b);m=ri(b);b=m+ui(b)|0}if(!Ba|(k|0)==27){i=$m(a,g,c,d,e,f,j,b);l=27;if((Ba|0)==1){break a}a=i}if(!Ba){x[h+12>>2]=a;break c}}if(!Ba){b=h+12|0;a=f+20|0}if(!Ba|(k|0)==28){jn(a,b,c,e,j);l=28;if((Ba|0)==1){break a}}if(!Ba){break c}}if(!Ba){b=h+12|0;a=f+20|0}if(!Ba|(k|0)==29){i=kn(b,c,e,j,4);l=29;if((Ba|0)==1){break a}j=i}if(!Ba){if(!(y[e|0]&4)){x[a>>2]=j-1900}break c}}if(!Ba){a=(g|0)==37;if(a){break d}}}if(!Ba){x[e>>2]=x[e>>2]|4;break c}}if(!Ba){a=ya-16|0;ya=a;x[a+12>>2]=c;c=6;d=a+12|0;b=h+12|0}if(!Ba|(k|0)==30){i=th(b,d);l=30;if((Ba|0)==1){break a}d=i}G:{H:{if(!Ba){if(d){break H}c=4}if(!Ba|(k|0)==31){i=uh(b);l=31;if((Ba|0)==1){break a}d=i}if(!Ba|(k|0)==32){i=an(j,d);l=32;if((Ba|0)==1){break a}d=i}if(!Ba){d=(d|0)!=37;if(d){break H}c=2}if(!Ba|(k|0)==33){i=wh(b);l=33;if((Ba|0)==1){break a}b=i}d=Ba?d:a+12|0;if(!Ba|(k|0)==34){i=th(b,d);l=34;if((Ba|0)==1){break a}b=i}if(!(Ba|b)){break G}}if(!Ba){x[e>>2]=x[e>>2]|c}}if(!Ba){ya=a+16|0}}e=Ba?e:x[h+12>>2]}if(!Ba){ya=h+16|0;return e|0}p()}x[x[Ca>>2]>>2]=l;x[Ca>>2]=x[Ca>>2]+4;i=x[Ca>>2];x[i>>2]=a;x[i+4>>2]=b;x[i+8>>2]=c;x[i+12>>2]=d;x[i+16>>2]=e;x[i+20>>2]=f;x[i+24>>2]=g;x[i+28>>2]=h;x[i+32>>2]=j;x[i+36>>2]=m;x[Ca>>2]=x[Ca>>2]+40;return 0}function mc(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0,m=0,q=0,r=0,s=E(0),t=0,u=E(0),v=0,w=0,z=E(0),A=0,G=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-56;r=x[Ca>>2];a=x[r>>2];b=x[r+4>>2];c=x[r+8>>2];d=x[r+12>>2];e=x[r+16>>2];f=x[r+20>>2];h=x[r+28>>2];m=x[r+24>>2];l(0,m|0);l(1,h|0);g=+n();h=x[r+32>>2];m=x[r+36>>2];i=x[r+44>>2];w=x[r+40>>2];l(0,w|0);l(1,i|0);q=+n();t=x[r+48>>2];w=x[r+52>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;v=x[x[Ca>>2]>>2]}if(!Ba){f=ya-32|0;ya=f;e=x[a+368>>2];q=C[a+16>>3];b=q<=0}a:{b:{if((Ba|0)==2|b){b=Ba?b:x[a+136>>2]>=0;if(b|(Ba|0)==2){if(!Ba){x[f+8>>2]=5184;C[f+24>>3]=q;b=x[a+104>>2];if(!b){break b}d=f+24|0;m=x[x[b>>2]+24>>2];c=f+8|0}if(!Ba|!v){Ea[m|0](b,c,d);i=0;if((Ba|0)==1){break a}}}if(!Ba){x[a+16>>2]=0;x[a+20>>2]=1072693248;q=1}}if(!Ba){g=C[a+8>>3];b=g<=0}if((Ba|0)==2|(Ba?h:b)){b=Ba?b:x[a+136>>2]>=0;if(b|(Ba|0)==2){if(!Ba){x[f+8>>2]=5284;C[f+24>>3]=g;b=x[a+104>>2];if(!b){break b}d=f+24|0;m=x[x[b>>2]+24>>2];c=f+8|0}if(!Ba|(v|0)==1){Ea[m|0](b,c,d);i=1;if((Ba|0)==1){break a}}if(!Ba){q=C[a+16>>3]}}if(!Ba){x[a+8>>2]=0;x[a+12>>2]=1072693248;g=1}}if(!Ba){g=g*q;b=y[a+52|0]}c:{if((Ba|0)==2|b){if(!Ba){if(g<1){s=E(6);d:{if(!(q<1)){break d}b=x[a+56>>2];if(b&33554432){break d}s=E(4.5);if(b&67108864){break d}s=q>1?E(6):E(4.5)}u=g==1?E(4):s;s=E(E(e>>>0)/u);e:{if(E(F(s))>>0));f:{if(F(k)<2147483648){c=~~k;break f}c=-2147483648}d=c>>>0>63;if(d){break c}t=x[a+368>>2]<<2;d=t>>>0<=e>>>0;if(d){break c}h=c>>>0<=1?1:c;while(1){m=h<<1;b=Lf(K(+(m>>>0)/g));e=Mf(E(K(E(u*E(b>>>0)))));if(e&e-1){c=0;if(e){while(1){c=c+1|0;d=e>>>0>1;e=e>>>1|0;if(d){continue}break}}e=1<>>0>31;if(c){break c}h=m;c=e>>>0>>0;if(c){continue}break}break c}z=B[a+372>>2];u=E(e>>>0);g:{h:{i:{if(!(q>1)){break i}b=x[a+56>>2];if(b&33554432){break h}if(b&67108864){break i}t=1;s=E(4.5);break g}s=E(8);break g}t=q<1;s=t?E(4.5):E(8)}s=g==1?E(4):s;u=E(u/s);j:{if(E(F(u))>>0);d=u>z;k=+(c>>>0)/g;k:{if(F(k)<2147483648){b=~~k;break k}b=-2147483648}if(d){d=c>>>1|0;if(b>>>0>1){continue}}break}if(!b){while(1){c=c<<1;k=+(c>>>0)/g;l:{if(F(k)<2147483648){b=~~k;break l}b=-2147483648}if(!b){continue}break}u=E(c>>>0)}d=Mf(E(s*u));m=d-1|0;if(d&m){if(d){while(1){h=h+1|0;m=d>>>0>1;d=d>>>1|0;if(m){continue}break}}d=1<>>0>>0;e=h?e:d;d=!t;if(d){break c}g=+(e>>>0);d=Lf(g/q);if(d&d-1){h=0;if(d){while(1){h=h+1|0;m=d>>>0>1;d=d>>>1|0;if(m){continue}break}}d=1<>>0)/((d>>>0<=512?512:d)>>>0)|0;h=d>>>0>=b>>>0;m:{if(h){break m}h=c>>>0<=d>>>0;if(h){break m}e=(e>>>0)/(d>>>0)|0;c=(c>>>0)/(d>>>0)|0;b=(b>>>0)/(d>>>0)|0}d=x[a+136>>2]<2;if(d){break c}x[f+20>>2]=3873;C[f+24>>3]=g;g=+(e>>>0);C[f+8>>3]=g;d=x[a+128>>2];if(!d){break b}h=f+20|0;t=f+8|0;w=x[x[d>>2]+24>>2];m=f+24|0}if(!Ba|(v|0)==2){Ea[w|0](d,h,m,t);i=2;if((Ba|0)==1){break a}}if(!Ba){d=x[a+136>>2]<2;if(d){break c}x[f+20>>2]=2517;C[f+24>>3]=b>>>0;g=+(c>>>0);C[f+8>>3]=g;c=x[a+128>>2];if(!c){break b}h=f+24|0;m=f+8|0;t=x[x[c>>2]+24>>2];d=f+20|0}if(!Ba|(v|0)==3){Ea[t|0](c,d,h,m);i=3;if((Ba|0)==1){break a}}if(!Ba){break c}}if(!Ba){if(g<1){c=e>>>2|0;while(1){b=c;c=b>>>1|0;d=b>>>0>511;if(d){continue}break}k=J(g*+(b>>>0));n:{if(F(k)<2147483648){c=~~k;break n}c=-2147483648}if(c){break c}b=Lf(K(1/g));c=b&b-1;if(c){e=0;if(b){while(1){e=e+1|0;c=b>>>0>1;b=b>>>1|0;if(c){continue}break}}b=1<>>0)/6|0;while(1){c=d;k=+(c>>>0)/g;o:{if(F(k)<2147483648){b=~~k;break o}b=-2147483648}if(c>>>0>=1025){d=c>>>1|0;h=b>>>0>1;if(h){continue}}break}if(!b){while(1){c=c<<1;k=+(c>>>0)/g;p:{if(F(k)<2147483648){b=~~k;break p}b=-2147483648}if(!b){continue}break}}c=D(c,6);if(c&c-1){d=0;if(c){while(1){d=d+1|0;h=c>>>0>1;c=c>>>1|0;if(h){continue}break}}c=1<>>0>>0;e=d?e:c;c=!(g>5);if(c){break c}c=e>>>0>8191;if(c){break c}while(1){c=e>>>0<4096;d=e<<1;e=d;if(c){continue}break}}}if(!Ba){d=x[a+48>>2];q:{if(!d){c=b;break q}while(1){c=b;h=b>>>0<2;if(h){break q}b=b>>>1|0;h=c<<2>>>0>d>>>0;if(h){continue}break}}x[a+24>>2]=e;x[a+36>>2]=c;b=e<<(x[a+56>>2]>>>23&1);x[a+32>>2]=b;x[a+28>>2]=b;b=x[a+136>>2]<=0}r:{if(!Ba){if(b){break r}g=C[a+16>>3];k=C[a+8>>3];x[f+20>>2]=8011;C[f+24>>3]=k;C[f+8>>3]=g;b=x[a+128>>2];if(!b){break b}d=f+24|0;e=f+8|0;h=x[x[b>>2]+24>>2];c=f+20|0}if(!Ba|(v|0)==4){Ea[h|0](b,c,d,e);i=4;if((Ba|0)==1){break a}}if(!Ba){b=x[a+136>>2]<=0;if(b){break r}g=C[a+16>>3];k=C[a+8>>3];x[f+8>>2]=4581;C[f+24>>3]=k*g;b=x[a+104>>2];if(!b){break b}d=f+24|0;e=x[x[b>>2]+24>>2];c=f+8|0}if(!Ba|(v|0)==5){Ea[e|0](b,c,d);i=5;if((Ba|0)==1){break a}}if(!Ba){b=x[a+136>>2]<=0;if(b){break r}c=x[a+32>>2];b=x[a+28>>2];x[f+20>>2]=3024;C[f+24>>3]=b>>>0;C[f+8>>3]=c>>>0;b=x[a+128>>2];if(!b){break b}d=f+24|0;e=f+8|0;h=x[x[b>>2]+24>>2];c=f+20|0}if(!Ba|(v|0)==6){Ea[h|0](b,c,d,e);i=6;if((Ba|0)==1){break a}}if(!Ba){b=x[a+136>>2]<=0;if(b){break r}b=x[a+24>>2];x[f+8>>2]=6806;C[f+24>>3]=b>>>0;b=x[a+104>>2];if(!b){break b}d=f+24|0;e=x[x[b>>2]+24>>2];c=f+8|0}if(!Ba|(v|0)==7){Ea[e|0](b,c,d);i=7;if((Ba|0)==1){break a}}if(!Ba){b=x[a+136>>2]<=0;if(b){break r}b=x[a+36>>2];g=C[a+16>>3];k=C[a+8>>3];x[f+20>>2]=1878;q=+(b>>>0);C[f+24>>3]=q;C[f+8>>3]=k*g*q;b=x[a+128>>2];if(!b){break b}d=f+24|0;e=f+8|0;h=x[x[b>>2]+24>>2];c=f+20|0}if(!Ba|(v|0)==8){Ea[h|0](b,c,d,e);i=8;if((Ba|0)==1){break a}}}if(!Ba){b=x[a+44>>2];e=x[a+28>>2];c=x[a+32>>2];e=c>>>0>>0?e:c;if(b>>>0>>0){x[a+44>>2]=e;b=e}g=C[a+8>>3];k=(g>1?g:1)*+(b<<1>>>0);g=+(b>>>0)/C[a+16>>3];g=K(g=0){b=~~g>>>0;break s}b=0}x[a+40>>2]=b;if(y[a+52|0]){b=b<<4;x[a+40>>2]=b}c=x[a+136>>2]>0}if((Ba|0)==2|c){if(!Ba){x[f+8>>2]=6906;C[f+24>>3]=b>>>0;b=x[a+104>>2];if(!b){break b}c=f+24|0;d=x[x[b>>2]+24>>2];a=f+8|0}if(!Ba|(v|0)==9){Ea[d|0](b,a,c);i=9;if((Ba|0)==1){break a}}}if(!Ba){ya=f+32|0;return}}if(!Ba){ac();p()}return}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;i=x[Ca>>2];x[i>>2]=a;x[i+4>>2]=b;x[i+8>>2]=c;x[i+12>>2]=d;x[i+16>>2]=e;x[i+20>>2]=f;o(+g);a=j(1)|0;A=i,G=j(0)|0,x[A+24>>2]=G;x[i+28>>2]=a;x[i+32>>2]=h;x[i+36>>2]=m;o(+q);a=j(1)|0;A=i,G=j(0)|0,x[A+40>>2]=G;x[i+44>>2]=a;x[i+48>>2]=t;x[i+52>>2]=w;x[Ca>>2]=x[Ca>>2]+56}function No(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];f=x[b+8>>2];h=x[b+12>>2];g=x[b+16>>2];i=x[b+20>>2];j=x[b+24>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){i=a;a=y[52732]}a:{b:{if(!Ba){if(a){a=x[13182];break b}a=y[52720]}c:{if(!Ba){if(a){a=x[13179];break c}a=zo(54360);x[a>>2]=39388;f=ya-16|0;ya=f;b=a+8|0;x[b>>2]=0;x[b+4>>2]=0;x[f+12>>2]=0;k=Jq(b+8|0),l=0,v[k+128|0]=l;Ao(f+4|0,b);v[f+10|0]=0;g=ya-16|0;ya=g;if(Kq(b)>>>0<30){nj();p()}j=Lq(b);h=g+8|0}if(!Ba|!d){Mq(h,j,30);if((Ba|0)==1){break a}}if(!Ba){c=x[g+8>>2];x[b+4>>2]=c;x[b>>2]=c;h=c+(x[g+12>>2]<<2)|0;k=Nq(b),l=h,x[k>>2]=l;Oq(b,0);ya=g+16|0;Bo(b,30);v[f+10|0]=1;ya=f+16|0;f=a+152|0}if(!Ba|(d|0)==1){uj(f,9743);e=1;if((Ba|0)==1){break a}}if(!Ba){f=Co(b);Do(b);Eo(b);b=zo(54032);x[b>>2]=41972}if(!Ba|(d|0)==2){c=Fo(52544);e=2;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==3){Go(a,54032,b);e=3;if((Ba|0)==1){break a}}if(!Ba){b=zo(54040);x[b>>2]=42004}if(!Ba|(d|0)==4){c=Fo(52552);e=4;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==5){Go(a,54040,b);e=5;if((Ba|0)==1){break a}}if(!Ba){b=zo(54048);v[b+12|0]=0;x[b+8>>2]=0;x[b>>2]=39408;x[b+8>>2]=39456}if(!Ba|(d|0)==6){c=Fo(52748);e=6;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==7){Go(a,54048,b);e=7;if((Ba|0)==1){break a}}if(!Ba){b=zo(54064);x[b>>2]=40920}if(!Ba|(d|0)==8){c=Fo(52740);e=8;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==9){Go(a,54064,b);e=9;if((Ba|0)==1){break a}}if(!Ba){b=zo(54072);x[b>>2]=41068}if(!Ba|(d|0)==10){c=Fo(52756);e=10;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==11){Go(a,54072,b);e=11;if((Ba|0)==1){break a}}if(!Ba){b=zo(54080);x[b>>2]=40488;k=b,l=Ol(),x[k+8>>2]=l}if(!Ba|(d|0)==12){c=Fo(52764);e=12;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==13){Go(a,54080,b);e=13;if((Ba|0)==1){break a}}if(!Ba){b=zo(54096);x[b>>2]=41216}if(!Ba|(d|0)==14){c=Fo(52772);e=14;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==15){Go(a,54096,b);e=15;if((Ba|0)==1){break a}}if(!Ba){b=zo(54104);x[b>>2]=41448}if(!Ba|(d|0)==16){c=Fo(52788);e=16;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==17){Go(a,54104,b);e=17;if((Ba|0)==1){break a}}if(!Ba){b=zo(54112);x[b>>2]=41332}if(!Ba|(d|0)==18){c=Fo(52780);e=18;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==19){Go(a,54112,b);e=19;if((Ba|0)==1){break a}}if(!Ba){b=zo(54120);x[b>>2]=41564}if(!Ba|(d|0)==20){c=Fo(52796);e=20;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==21){Go(a,54120,b);e=21;if((Ba|0)==1){break a}}if(!Ba){b=zo(54128);w[b+8>>1]=11310;x[b>>2]=40536;b=ji(b+12|0)}if(!Ba|(d|0)==22){c=Fo(52804);e=22;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==23){Go(a,54128,b);e=23;if((Ba|0)==1){break a}}if(!Ba){b=zo(54152);x[b+8>>2]=46;x[b+12>>2]=44;x[b>>2]=40576;b=ji(b+16|0)}if(!Ba|(d|0)==24){c=Fo(52812);e=24;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==25){Go(a,54152,b);e=25;if((Ba|0)==1){break a}}if(!Ba){b=zo(54184);x[b>>2]=42036}if(!Ba|(d|0)==26){c=Fo(52560);e=26;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==27){Go(a,54184,b);e=27;if((Ba|0)==1){break a}}if(!Ba){b=zo(54192);x[b>>2]=42280}if(!Ba|(d|0)==28){c=Fo(52568);e=28;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==29){Go(a,54192,b);e=29;if((Ba|0)==1){break a}}if(!Ba){b=zo(54200);x[b>>2]=42492}if(!Ba|(d|0)==30){c=Fo(52576);e=30;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==31){Go(a,54200,b);e=31;if((Ba|0)==1){break a}}if(!Ba){b=zo(54208);x[b>>2]=42724}if(!Ba|(d|0)==32){c=Fo(52584);e=32;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==33){Go(a,54208,b);e=33;if((Ba|0)==1){break a}}if(!Ba){b=zo(54216);x[b>>2]=43708}if(!Ba|(d|0)==34){c=Fo(52624);e=34;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==35){Go(a,54216,b);e=35;if((Ba|0)==1){break a}}if(!Ba){b=zo(54224);x[b>>2]=43856}if(!Ba|(d|0)==36){c=Fo(52632);e=36;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==37){Go(a,54224,b);e=37;if((Ba|0)==1){break a}}if(!Ba){b=zo(54232);x[b>>2]=43972}if(!Ba|(d|0)==38){c=Fo(52640);e=38;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==39){Go(a,54232,b);e=39;if((Ba|0)==1){break a}}if(!Ba){b=zo(54240);x[b>>2]=44088}if(!Ba|(d|0)==40){c=Fo(52648);e=40;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==41){Go(a,54240,b);e=41;if((Ba|0)==1){break a}}if(!Ba){b=zo(54248);x[b>>2]=44204}if(!Ba|(d|0)==42){c=Fo(52656);e=42;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==43){Go(a,54248,b);e=43;if((Ba|0)==1){break a}}if(!Ba){b=zo(54256);x[b>>2]=44368}if(!Ba|(d|0)==44){c=Fo(52664);e=44;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==45){Go(a,54256,b);e=45;if((Ba|0)==1){break a}}if(!Ba){b=zo(54264);x[b>>2]=44532}if(!Ba|(d|0)==46){c=Fo(52672);e=46;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==47){Go(a,54264,b);e=47;if((Ba|0)==1){break a}}if(!Ba){b=zo(54272);x[b>>2]=44696}if(!Ba|(d|0)==48){c=Fo(52680);e=48;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==49){Go(a,54272,b);e=49;if((Ba|0)==1){break a}}if(!Ba){b=zo(54280);f=b+8|0;x[f>>2]=45952;x[b>>2]=42924;x[f>>2]=42972}if(!Ba|(d|0)==50){c=Fo(52592);e=50;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==51){Go(a,54280,b);e=51;if((Ba|0)==1){break a}}if(!Ba){b=zo(54296);f=b+8|0;x[f>>2]=45988;x[b>>2]=43188;x[f>>2]=43236}if(!Ba|(d|0)==52){c=Fo(52600);e=52;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==53){Go(a,54296,b);e=53;if((Ba|0)==1){break a}}if(!Ba){b=zo(54312);_q(b+8|0);x[b>>2]=43424}if(!Ba|(d|0)==54){c=Fo(52608);e=54;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==55){Go(a,54312,b);e=55;if((Ba|0)==1){break a}}if(!Ba){b=zo(54328);_q(b+8|0);x[b>>2]=43580}if(!Ba|(d|0)==56){c=Fo(52616);e=56;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==57){Go(a,54328,b);e=57;if((Ba|0)==1){break a}}if(!Ba){b=zo(54344);x[b>>2]=44860}if(!Ba|(d|0)==58){c=Fo(52688);e=58;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==59){Go(a,54344,b);e=59;if((Ba|0)==1){break a}}if(!Ba){b=zo(54352);x[b>>2]=44980}if(!Ba|(d|0)==60){c=Fo(52696);e=60;if((Ba|0)==1){break a}b=c}if(!Ba|(d|0)==61){Go(a,54352,b);e=61;if((Ba|0)==1){break a}}if(!Ba){x[13178]=54360;v[52720]=1;x[13179]=52712;a=52712}}if(!Ba){Oo(52724,a);v[52732]=1;x[13182]=52724;a=52724}}if(!Ba){a=x[a>>2];x[i>>2]=a;Io(a)}return}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=f;x[c+12>>2]=h;x[c+16>>2]=g;x[c+20>>2]=i;x[c+24>>2]=j;x[Ca>>2]=x[Ca>>2]+28}function Ig(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=E(0),o=0;h=Ba;i=ya-32|0;ya=i;x[i+20>>2]=b;x[i+24>>2]=a;while(1){a:{b:{c:{d:{e:{f:{g:{h:{i:{e=b-a>>2;switch(e|0){case 2:break i;case 0:case 1:break c;case 3:break e;case 5:break g;case 4:break h;default:break f}}b=b-4|0;x[i+20>>2]=b;a=Jg(b,a);if((Ba|0)!=(h|0)){p()}if(!a){break c}Kg(i+24|0,i+20|0);if((Ba|0)!=(h|0)){p()}break c}b=b-4|0;x[i+20>>2]=b;Lg(a,a+4|0,a+8|0,b);if((Ba|0)!=(h|0)){p()}break c}b=b-4|0;x[i+20>>2]=b;Mg(a,a+4|0,a+8|0,a+12|0,b);if((Ba|0)!=(h|0)){p()}break c}if((e|0)<=23){if(d&1){d=ya-16|0;ya=d;j:{if((a|0)==(b|0)){break j}c=a;while(1){e=a+4|0;x[d+8>>2]=e;if((b|0)==(e|0)){break j}e=Jg(e,a);if((Ba|0)!=(h|0)){p()}if(e){B[d+4>>2]=B[x[d+8>>2]>>2];x[d>>2]=a;a=x[d+8>>2];while(1){k:{B[a>>2]=B[x[d>>2]>>2];a=x[d>>2];if((c|0)==(a|0)){a=c;break k}e=a-4|0;x[d>>2]=e;e=Jg(d+4|0,e);if((Ba|0)!=(h|0)){p()}if(e){continue}}break}B[a>>2]=B[d+4>>2]}a=x[d+8>>2];continue}}ya=d+16|0;break c}c=ya-16|0;ya=c;l:{if((a|0)==(b|0)){break l}while(1){d=a+4|0;x[c+8>>2]=d;if((b|0)==(d|0)){break l}d=Jg(d,a);if((Ba|0)!=(h|0)){p()}if(d){B[c+4>>2]=B[x[c+8>>2]>>2];x[c>>2]=a;a=x[c+8>>2];while(1){B[a>>2]=B[x[c>>2]>>2];a=x[c>>2];d=a-4|0;x[c>>2]=d;d=Jg(c+4|0,d);if((Ba|0)!=(h|0)){p()}if(d){continue}break}B[a>>2]=B[c+4>>2]}a=x[c+8>>2];continue}}ya=c+16|0;break c}if(!c){c=(a|0)==(b|0);if(c){break c}g=ya-16|0;ya=g;x[g+12>>2]=a;if(!c){m:{d=b-a>>2;if((d|0)<2){break m}c=d-2>>>1|0;while(1){if((c|0)<0){break m}Vg(a,d,(c<<2)+a|0);if((Ba|0)!=(h|0)){p()}else{c=c-1|0;continue}}}c=b-a>>2;a=b;while(1){x[g+8>>2]=a;k=x[g+12>>2];if((a|0)!=(b|0)){a=Jg(a,k);if((Ba|0)!=(h|0)){p()}if(a){Kg(g+8|0,g+12|0);if((Ba|0)!=(h|0)){p()}a=x[g+12>>2];Vg(a,c,a);if((Ba|0)!=(h|0)){p()}}a=x[g+8>>2]+4|0;continue}break}a=b-k>>2;while(1){if((a|0)>1){e=0;f=ya-16|0;ya=f;x[f+12>>2]=k;n:{if((a|0)<2){break n}n=B[x[f+12>>2]>>2];c=x[f+12>>2];j=ya-16|0;ya=j;l=(a-2|0)/2|0;while(1){m=(e<<2)+c|0;o=m+4|0;x[j+12>>2]=o;d=e<<1;e=d|1;d=d+2|0;o:{if((d|0)>=(a|0)){break o}m=Jg(o,m+8|0);if((Ba|0)!=(h|0)){p()}if(!m){break o}x[j+12>>2]=x[j+12>>2]+4;e=d}B[c>>2]=B[x[j+12>>2]>>2];c=x[j+12>>2];if((e|0)<=(l|0)){continue}break}ya=j+16|0;d=b-4|0;x[f+8>>2]=d;if((c|0)==(d|0)){B[c>>2]=n;break n}B[c>>2]=B[x[f+8>>2]>>2];B[x[f+8>>2]>>2]=n;e=c+4|0;c=ya-16|0;ya=c;d=x[f+12>>2];j=e-d>>2;p:{if((j|0)<2){break p}e=e-4|0;x[c+12>>2]=e;j=j-2>>>1|0;l=d+(j<<2)|0;x[c+8>>2]=l;e=Jg(l,e);if((Ba|0)!=(h|0)){p()}if(!e){break p}B[c+4>>2]=B[x[c+12>>2]>>2];q:{while(1){B[x[c+12>>2]>>2]=B[x[c+8>>2]>>2];e=x[c+8>>2];x[c+12>>2]=e;if(!j){break q}j=j-1>>>1|0;e=d+(j<<2)|0;x[c+8>>2]=e;e=Jg(e,c+4|0);if((Ba|0)!=(h|0)){p()}if(e){continue}break}e=x[c+12>>2]}B[e>>2]=B[c+4>>2]}ya=c+16|0}ya=f+16|0;a=a-1|0;b=b-4|0;continue}break}}ya=g+16|0;break c}g=b-4|0;b=e>>>1<<2;f=b+a|0;r:{if(e>>>0>=129){Ng(a,f,g);if((Ba|0)!=(h|0)){p()}a=x[i+24>>2];f=a+4|0;g=a;a=b-4|0;e=x[i+20>>2];Ng(f,g+a|0,e-8|0);if((Ba|0)!=(h|0)){p()}g=x[i+24>>2];j=g+8|0;f=g;g=b+4|0;Ng(j,f+g|0,e-12|0);if((Ba|0)!=(h|0)){p()}e=a;a=x[i+24>>2];Ng(e+a|0,a+b|0,a+g|0);if((Ba|0)!=(h|0)){p()}x[i+12>>2]=b+x[i+24>>2];Kg(i+24|0,i+12|0);break r}Ng(f,a,g)}if((Ba|0)!=(h|0)){p()}c=c-1|0;k=d&1;if(k){b=x[i+20>>2];break d}a=x[i+24>>2];a=Jg(a-4|0,a);if((Ba|0)!=(h|0)){p()}b=x[i+20>>2];if(a){break d}d=x[i+24>>2];e=ya-16|0;ya=e;a=b;x[e+8>>2]=a;x[e+12>>2]=d;B[e+4>>2]=B[x[e+12>>2]>>2];g=Jg(e+4|0,a-4|0);if((Ba|0)!=(h|0)){p()}s:{if(g){while(1){g=x[e+12>>2]+4|0;x[e+12>>2]=g;g=Jg(e+4|0,g);if((Ba|0)!=(h|0)){p()}if(!g){continue}break s}}while(1){g=x[e+12>>2]+4|0;x[e+12>>2]=g;if(a>>>0<=g>>>0){break s}g=Jg(e+4|0,g);if((Ba|0)!=(h|0)){p()}if(!g){continue}break}}if(A[e+12>>2]>>0){while(1){a=a-4|0;x[e+8>>2]=a;g=Jg(e+4|0,a);if((Ba|0)!=(h|0)){p()}if(g){continue}break}}while(1){j=x[e+12>>2];if(j>>>0>>0){Kg(e+12|0,e+8|0);if((Ba|0)!=(h|0)){p()}while(1){a=x[e+12>>2]+4|0;x[e+12>>2]=a;a=Jg(e+4|0,a);if((Ba|0)!=(h|0)){p()}if(!a){continue}break}while(1){a=x[e+8>>2]-4|0;x[e+8>>2]=a;a=Jg(e+4|0,a);if((Ba|0)!=(h|0)){p()}if(a){continue}break}a=x[e+8>>2];continue}break}a=j-4|0;x[e>>2]=a;if((a|0)!=(d|0)){B[d>>2]=B[x[e>>2]>>2];j=x[e+12>>2];d=x[e>>2]}B[d>>2]=B[e+4>>2];ya=e+16|0;x[i+24>>2]=j;d=0;break a}b=b-4|0;x[i+20>>2]=b;Og(a,a+4|0,b);if((Ba|0)!=(h|0)){p()}break c}j=i+12|0;g=x[i+24>>2];f=ya-32|0;ya=f;a=b;x[f+20>>2]=a;x[f+24>>2]=g;B[f+16>>2]=B[x[f+24>>2]>>2];while(1){e=x[f+24>>2]+4|0;x[f+24>>2]=e;e=Jg(e,f+16|0);if((Ba|0)!=(h|0)){p()}if(e){continue}break}t:{if((g|0)==(x[f+24>>2]-4|0)){while(1){if(A[f+24>>2]>=a>>>0){break t}a=a-4|0;x[f+20>>2]=a;e=Jg(a,f+16|0);if((Ba|0)!=(h|0)){p()}if(!e){continue}break t}}while(1){a=a-4|0;x[f+20>>2]=a;e=Jg(a,f+16|0);if((Ba|0)!=(h|0)){p()}if(!e){continue}break}}e=x[f+24>>2];v[f+15|0]=e>>>0>=a>>>0;while(1){if(a>>>0>e>>>0){Kg(f+24|0,f+20|0);if((Ba|0)!=(h|0)){p()}while(1){a=x[f+24>>2]+4|0;x[f+24>>2]=a;a=Jg(a,f+16|0);if((Ba|0)!=(h|0)){p()}if(a){continue}break}while(1){a=x[f+20>>2]-4|0;x[f+20>>2]=a;a=Jg(a,f+16|0);if((Ba|0)!=(h|0)){p()}if(!a){continue}break}a=x[f+20>>2];e=x[f+24>>2];continue}break}a=e-4|0;x[f+8>>2]=a;if((a|0)!=(g|0)){B[g>>2]=B[x[f+8>>2]>>2];g=x[f+8>>2]}B[g>>2]=B[f+16>>2];x[j>>2]=x[f+8>>2];v[j+4|0]=y[f+15|0];ya=f+32|0;a=x[i+12>>2];if(!y[i+16|0]){break b}e=Pg(x[i+24>>2],a);if((Ba|0)!=(h|0)){p()}g=a+4|0;f=Pg(g,b);if((Ba|0)!=(h|0)){p()}if(f){if(e){break c}x[i+20>>2]=a;b=a;break a}if(!e){break b}x[i+24>>2]=g;break a}ya=i+32|0;return}Ig(x[i+24>>2],a,c,k);if((Ba|0)!=(h|0)){p()}x[i+24>>2]=a+4;d=0}a=x[i+24>>2];continue}}function Ic(a,b,c,d,e,f,g,h,i,j,k,l,m,n){var o=0,q=0,r=0,s=0,t=0,u=0,w=0,z=0,A=0,B=0,D=0,E=0,G=0,H=0,I=0,J=0,K=0;E=Ba;G=ya-16|0;ya=G;v[n+312|0]=0;v[n+264|0]=0;v[n+240|0]=0;v[n+216|0]=0;t=y[n+288|0];v[n+288|0]=0;o=C[a>>3];r=o*.5;a:{b:{A=y[a+8|0];c:{if(A){x[n+72>>2]=1;u=x[a+104>>2];x[n+208>>2]=3;C[n+16>>3]=r;x[n+8>>2]=0;x[n+12>>2]=0;x[n>>2]=u;C[n+168>>3]=r;x[n+160>>2]=0;x[n+164>>2]=1086019584;x[n+144>>2]=5;x[n+136>>2]=0;x[n+140>>2]=1086019584;x[n+128>>2]=0;x[n+132>>2]=1083768832;x[n+112>>2]=2;x[n+104>>2]=0;x[n+108>>2]=1083768832;x[n+96>>2]=0;x[n+100>>2]=0;x[n+80>>2]=1;q=(b+2)/3+-1;C[n+152>>3]=q*1e4/1e4+1;C[n+120>>3]=q*5e3/1e4+1;C[n+88>>3]=q*1200/1e4+1;if((c|0)>=257){x[n+144>>2]=4}if(j<1e-6){break c}break b}x[n+72>>2]=3;x[n>>2]=x[a+96>>2];x[n+24>>2]=x[a+104>>2];u=x[a+100>>2];x[n+208>>2]=4;x[n+48>>2]=u;C[n+200>>3]=r;if(!(j<1e-6)){break b}x[n+8>>2]=0;x[n+12>>2]=0;x[n+32>>2]=0;x[n+36>>2]=0;x[n+16>>2]=0;x[n+20>>2]=0;C[n- -64>>3]=r;C[n+56>>3]=r;C[n+40>>3]=r}v[n+288|0]=1;C[n+304>>3]=r;x[n+296>>2]=0;x[n+300>>2]=0;break a}if((k|0)>0){if(!l){if(!A){x[n+8>>2]=0;x[n+12>>2]=0;x[n+32>>2]=0;x[n+36>>2]=0;x[n+16>>2]=0;x[n+20>>2]=0;C[n- -64>>3]=r;C[n+56>>3]=r;C[n+40>>3]=r}v[n+288|0]=1;C[n+304>>3]=r;x[n+296>>2]=0;x[n+300>>2]=0;break a}if(!A){x[n+8>>2]=0;x[n+12>>2]=0;b=C[a+216>>3];C[n+32>>3]=b;C[n+16>>3]=b;b=C[a+224>>3];C[n- -64>>3]=r;C[n+56>>3]=b;C[n+40>>3]=b}v[n+288|0]=1;if(!t){x[n+296>>2]=0;x[n+300>>2]=1087324160;C[n+304>>3]=r;break a}j=C[n+296>>3]*.9;C[n+296>>3]=j;a=n+304|0;b=C[a>>3]*1.1;C[a>>3]=b;if(C[g+16>>3]>j){o=C[g+8>>3];j=j>o?o:j;C[n+296>>3]=j}if(b>16e3){C[n+304>>3]=r}if(!(j<100)){break a}x[n+296>>2]=0;x[n+300>>2]=0;break a}v[n+312|0]=1;C[n+328>>3]=m?r:600;x[n+320>>2]=0;x[n+324>>2]=0;d:{if(A){break d}e:{f:{g:{h:{q=C[g>>3];if(!(!(q>40)|!(C[h>>3]<40))){k=1;j=ag(+x[a+104>>2]*200/o);if((Ba|0)!=(E|0)){p()}m=~~j;i:{if(F(j)<2147483648){break i}m=-2147483648}if((m|0)<=0){j=0;o=0;break g}t=m&3;j:{if(m>>>0<4){j=0;break j}u=d+24|0;w=d+16|0;B=d+8|0;D=m&-4;l=0;j=0;while(1){s=k<<3;j=j+C[s+d>>3]+C[s+B>>3]+C[s+w>>3]+C[u+s>>3];k=k+4|0;l=l+4|0;if((D|0)!=(l|0)){continue}break}}if(t){l=0;while(1){j=j+C[(k<<3)+d>>3];k=k+1|0;l=l+1|0;if((t|0)!=(l|0)){continue}break}}t=m&3;if(m>>>0<4){o=0;k=1;break h}u=e+24|0;w=e+16|0;B=e+8|0;D=m&-4;l=0;o=0;k=1;while(1){s=k<<3;o=o+C[s+e>>3]+C[s+B>>3]+C[s+w>>3]+C[u+s>>3];k=k+4|0;l=l+4|0;if((D|0)!=(l|0)){continue}break}break h}if(!(q<40)){break d}z=C[i>>3];if(!(z>40)){break d}j=ag(+x[a+104>>2]*200/o);if((Ba|0)!=(E|0)){p()}m=~~j;k:{if(F(j)<2147483648){break k}m=-2147483648}break f}if(t){l=0;while(1){o=o+C[(k<<3)+e>>3];k=k+1|0;l=l+1|0;if((t|0)!=(l|0)){continue}break}}o=o*1.4}s=j>.01&j>o;if(!(s|!(q<40))){z=C[i>>3];if(z>40){break f}}if(!s){break d}break e}k=1;l:{if((m|0)<=0){j=0;o=0;break l}t=m&3;m:{if(m>>>0<4){j=0;break m}u=f+24|0;w=f+16|0;B=f+8|0;D=m&-4;l=0;j=0;while(1){e=k<<3;j=j+C[e+f>>3]+C[e+B>>3]+C[e+w>>3]+C[e+u>>3];k=k+4|0;l=l+4|0;if((D|0)!=(l|0)){continue}break}}if(t){e=0;while(1){j=j+C[(k<<3)+f>>3];k=k+1|0;e=e+1|0;if((t|0)!=(e|0)){continue}break}}l=m&3;n:{if(m>>>0<4){o=0;k=1;break n}t=d+24|0;u=d+16|0;w=d+8|0;m=m&-4;e=0;o=0;k=1;while(1){f=k<<3;o=o+C[f+d>>3]+C[f+w>>3]+C[f+u>>3]+C[f+t>>3];k=k+4|0;e=e+4|0;if((m|0)!=(e|0)){continue}break}}if(l){f=0;while(1){o=o+C[(k<<3)+d>>3];k=k+1|0;f=f+1|0;if((l|0)!=(f|0)){continue}break}}o=o*1.4}if(s){break e}if(!(j>.01)|!(j>o)){break d}v[n+240|0]=1;C[n+256>>3]=z;x[n+248>>2]=0;x[n+252>>2]=0;break d}v[n+216|0]=1;C[n+232>>3]=q;x[n+224>>2]=0;x[n+228>>2]=0}j=C[g+16>>3];o=C[g+8>>3];if(j>o){v[n+264|0]=1;C[n+280>>3]=j;C[n+272>>3]=o}o:{if(!(j>o+4e3)|!(C[h+16>>3]>3]+4e3)){break o}v[n+288|0]=1;j=C[i+8>>3];o=C[g+8>>3];j=j>3]=j;o=C[i+16>>3];q=C[g+16>>3];C[n+304>>3]=o>q?o:q;if(!(j<200)){break o}x[n+296>>2]=0;x[n+300>>2]=0}p:{if(A){break p}j=Mc(a,C[n+16>>3],d);if((Ba|0)!=(E|0)){p()}H=C[a+248>>3];q=C[a+232>>3];I=C[a+216>>3];e=n+40|0;o=Mc(a,C[e>>3],d);if((Ba|0)!=(E|0)){p()}J=C[a+256>>3];z=C[a+240>>3];K=C[a+224>>3];C[n- -64>>3]=r;x[n+8>>2]=0;x[n+12>>2]=0;q=j>H?q:j>3]=q;C[n+16>>3]=q;j=o;j=j>J?z:j>3]=j;C[e>>3]=j;a=(c|0)<257;if(!a){C[n+56>>3]=r;C[n+40>>3]=r}x[n+80>>2]=1;C[n+200>>3]=r;C[n+192>>3]=j;x[n+176>>2]=4;C[n+168>>3]=j;x[n+144>>2]=3;C[n+128>>3]=q;x[n+112>>2]=2;C[n+104>>3]=q;x[n+96>>2]=0;x[n+100>>2]=0;j=q<1600?1600:q;C[n+160>>3]=j;C[n+136>>3]=j;j=(b+2)/3+-1;C[n+184>>3]=j*1e4/1e4+1;C[n+152>>3]=j*5e3/1e4+1;C[n+120>>3]=j*1600/1e4+1;C[n+88>>3]=j*300/1e4+1;if(a){break p}x[n+176>>2]=3}if(!(b>2)){break a}a=y[n+264|0];v[n+264|0]=1;C[n+280>>3]=r;o=b+-2;b=C[n+328>>3]+o*-150;b=b<100?100:b;C[n+328>>3]=b;c=n+272|0;j=C[c>>3];o=o*-400+12e3;b=b>o?b:o;C[c>>3]=a?b>>16&32767;A=e>>>16&32767;a:{b:{if(U-32767>>>0>4294934529&A-32767>>>0>=4294934530){break b}l=e&2147483647;r=l;j=d;if(!(!d&(l|0)==2147418112?!(b|c):l>>>0<2147418112)){n=d;o=e|32768;break a}l=i&2147483647;t=l;e=h;if(!(!e&(l|0)==2147418112?!(f|g):l>>>0<2147418112)){n=e;o=i|32768;b=f;c=g;break a}if(!(b|j|(r^2147418112|c))){if(!(e|f|(g|t))){o=2147450880;b=0;c=0;break a}o=o|2147418112;b=0;c=0;break a}if(!(e|f|(t^2147418112|g))){e=b|j;d=c|r;b=0;c=0;if(!(d|e)){o=2147450880;break a}o=o|2147418112;break a}if(!(b|j|(c|r))){b=0;c=0;break a}if(!(e|f|(g|t))){b=0;c=0;break a}if((r|0)==65535|r>>>0<65535){i=b;j=!(d|s);b=j?b:d;l=j<<6;e=G(b)+32|0;b=G(j?c:s);b=l+((b|0)==32?e:b)|0;Dg(k+80|0,i,c,d,s,b-15|0);if((Ba|0)!=(z|0)){p()}O=16-b|0;d=x[k+88>>2];C=x[k+92>>2];c=x[k+84>>2];b=x[k+80>>2]}if(t>>>0>65535){break b}i=!(h|m);e=i?f:h;s=i<<6;j=G(e)+32|0;e=G(i?g:m);e=s+((e|0)==32?j:e)|0;Dg(k- -64|0,f,g,h,m,e-15|0);if((Ba|0)!=(z|0)){p()}O=(O-e|0)+16|0;h=x[k+72>>2];m=x[k+76>>2];f=x[k+64>>2];g=x[k+68>>2]}e=f;f=g<<15|e>>>17;i=e<<15;e=0;v=i&-32768;P=c;t=Hs(v,e,c,0);e=Da;D=e;Q=f;y=b;b=Hs(f,0,b,0);c=b+t|0;f=Da+e|0;i=b>>>0>c>>>0?f+1|0:f;j=0;b=Hs(y,q,v,q);r=j+b|0;f=c;e=f+Da|0;e=b>>>0>r>>>0?e+1|0:e;s=e;w=(f|0)==(e|0)&j>>>0>r>>>0|e>>>0>>0;R=d;l=Hs(v,q,d,0);S=Da;b=Hs(P,q,Q,q);u=b+l|0;j=Da+S|0;j=b>>>0>u>>>0?j+1|0:j;b=m<<15|h>>>17;F=h<<15|g>>>17;d=Hs(F,0,y,q);H=d+u|0;f=Da+j|0;f=d>>>0>H>>>0?f+1|0:f;I=f;e=i;J=e+H|0;f=((e|0)==(D|0)&c>>>0>>0|e>>>0>>0)+f|0;f=e>>>0>J>>>0?f+1|0:f;i=f;g=J;c=f;K=C|65536;D=Hs(v,q,K,B);T=Da;d=Hs(Q,q,R,n);L=d+D|0;e=Da+T|0;e=d>>>0>L>>>0?e+1|0:e;h=e;M=b|-2147483648;b=Hs(M,0,y,q);v=b+L|0;f=Da+e|0;f=b>>>0>v>>>0?f+1|0:f;b=Hs(F,n,P,q);B=b+v|0;N=f;f=f+Da|0;t=b>>>0>B>>>0?f+1|0:f;b=0;y=b+g|0;e=c+B|0;e=b>>>0>y>>>0?e+1|0:e;C=e;b=w+y|0;c=b>>>0>>0?e+1|0:e;w=((A+U|0)+O|0)-16383|0;e=Hs(M,E,P,q);m=Da;g=Hs(Q,q,K,n);d=g+e|0;f=Da+m|0;f=d>>>0>>0?f+1|0:f;q=f;A=(m|0)==(f|0)&d>>>0>>0|f>>>0>>0;e=Hs(F,n,R,n);g=e+d|0;f=Da+f|0;f=e>>>0>g>>>0?f+1|0:f;m=f;d=(q|0)==(f|0)&d>>>0>g>>>0|f>>>0>>0;f=0;e=d;d=d+A|0;f=e>>>0>d>>>0?1:f;e=d;d=Hs(M,E,K,n);e=e+d|0;f=Da+f|0;A=e;d=d>>>0>e>>>0?f+1|0:f;e=(j|0)==(S|0)&l>>>0>u>>>0|j>>>0>>0;f=0;j=(j|0)==(I|0)&u>>>0>H>>>0|j>>>0>I>>>0;l=j;j=e+j|0;e=(l>>>0>j>>>0?1:f)+m|0;f=g+j|0;e=f>>>0>>0?e+1|0:e;l=e;q=f;e=(m|0)==(e|0)&g>>>0>f>>>0|e>>>0>>0;f=d;d=e+A|0;f=d>>>0>>0?f+1|0:f;j=d;m=f;e=Hs(F,n,K,n);u=Da;g=Hs(M,E,R,n);d=g+e|0;f=Da+u|0;f=d>>>0>>0?f+1|0:f;g=f;f=(u|0)==(f|0)&d>>>0>>0|f>>>0>>0;E=g+j|0;e=f+m|0;e=g>>>0>E>>>0?e+1|0:e;u=E;j=d;d=0;g=d+q|0;f=j+l|0;f=d>>>0>g>>>0?f+1|0:f;m=f;d=(l|0)==(f|0)&g>>>0>>0|f>>>0>>0;f=d;d=d+u|0;f=f>>>0>d>>>0?e+1|0:e;l=d;d=f;j=(t|0)==(N|0)&B>>>0>>0|t>>>0>>0;e=(h|0)==(T|0)&D>>>0>L>>>0|h>>>0>>0;h=(h|0)==(N|0)&v>>>0>>0|h>>>0>N>>>0;e=e+h|0;e=e+j|0;j=t;h=j+g|0;e=e+m|0;f=d;e=h>>>0>>0?e+1|0:e;j=e;e=(m|0)==(e|0)&g>>>0>h>>>0|e>>>0>>0;d=e+l|0;f=e>>>0>d>>>0?f+1|0:f;B=d;g=f;f=0;e=(i|0)==(C|0)&y>>>0>>0|i>>>0>C>>>0;d=e+((i|0)==(I|0)&H>>>0>J>>>0|i>>>0>>0)|0;e=(e>>>0>d>>>0?1:f)+j|0;f=g;g=d;d=d+h|0;e=g>>>0>d>>>0?e+1|0:e;h=(j|0)==(e|0)&d>>>0>>0|e>>>0>>0;g=h;h=h+B|0;f=g>>>0>h>>>0?f+1|0:f;i=f;c:{if(f&65536){w=w+1|0;break c}j=s>>>31|0;g=0;f=i<<1|h>>>31;h=h<<1|e>>>31;i=f;f=e<<1|d>>>31;d=d<<1|c>>>31;e=f;f=s<<1|r>>>31;r=r<<1;s=f;f=c<<1|b>>>31;b=b<<1|j;c=f|g}if((w|0)>=32767){o=o|2147418112;b=0;c=0;break a}d:{if((w|0)<=0){g=1-w|0;if(g>>>0<=127){f=w+127|0;Dg(k+48|0,r,s,b,c,f);if((Ba|0)!=(z|0)){p()}Dg(k+32|0,d,e,h,i,f);if((Ba|0)!=(z|0)){p()}Eg(k+16|0,r,s,b,c,g);if((Ba|0)!=(z|0)){p()}Eg(k,d,e,h,i,g);if((Ba|0)!=(z|0)){p()}r=x[k+32>>2]|x[k+16>>2]|(x[k+48>>2]|x[k+56>>2]|(x[k+52>>2]|x[k+60>>2]))!=0;s=x[k+36>>2]|x[k+20>>2];b=x[k+40>>2]|x[k+24>>2];c=x[k+44>>2]|x[k+28>>2];d=x[k>>2];e=x[k+4>>2];g=x[k+8>>2];f=x[k+12>>2];break d}b=0;c=0;break a}g=h;f=i&65535|w<<16}n=g|n;o=f|o;if(!(!b&(c|0)==-2147483648?!(r|s):(c|0)>0|(c|0)>=0)){b=d+1|0;j=b?e:e+1|0;e=o;c=j;d=!(j|b);n=d+n|0;o=d>>>0>n>>>0?e+1|0:e;break a}if(b|r|(c^-2147483648|s)){b=d;c=e;break a}b=d&1;c=b;b=b+d|0;c=c>>>0>b>>>0?e+1|0:e;d=(e|0)==(c|0)&b>>>0>>0|c>>>0>>0;f=o;n=d+n|0;o=n>>>0>>0?f+1|0:f}x[a>>2]=b;x[a+4>>2]=c;x[a+8>>2]=n;x[a+12>>2]=o;ya=k+96|0}function Nc(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=E(0),o=0,q=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-40;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];l=x[b+32>>2];m=x[b+36>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){f=ya;h=f-224|0;ya=h}a:{if(!Ba|!j){i=dr(376);if((Ba|0)==1){break a}e=i}if(!Ba){x[h+136>>2]=x[d>>2];d=x[d+4>>2];x[h+140>>2]=d;if(d){x[d+4>>2]=x[d+4>>2]+1}f=x[h+140>>2];x[h>>2]=x[h+136>>2];x[h+4>>2]=f;f=h+144|0}if(!Ba|(j|0)==1){Oc(f,a,h);k=1;if((Ba|0)==1){break a}}if(!Ba){f=ya;g=f-32|0;ya=g;x[e+56>>2]=1114113;v[e+52|0]=0;x[e+48>>2]=0;x[e+40>>2]=4096;x[e+44>>2]=2048;x[e+32>>2]=2048;x[e+36>>2]=256;x[e+24>>2]=2048;x[e+28>>2]=2048;C[e+16>>3]=1;C[e+8>>3]=1;x[e+4>>2]=c;x[e>>2]=b;c=h+144|0;b=e- -64|0}if(!Ba|(j|0)==2){i=$b(b,c);k=2;if((Ba|0)==1){break a}b=i}if(!Ba){b=e+152|0;x[b>>2]=0;x[b+4>>2]=0;x[e+144>>2]=0;c=e+164|0;x[c>>2]=0;x[c+4>>2]=0;x[e+148>>2]=b;x[e+172>>2]=0;x[e+176>>2]=0;x[e+160>>2]=c;x[e+180>>2]=0;x[e+184>>2]=0;x[e+196>>2]=0;x[e+200>>2]=0;x[e+188>>2]=0;x[e+192>>2]=1;x[e+204>>2]=0;x[e+208>>2]=0;x[e+212>>2]=0;x[e+216>>2]=0;x[e+220>>2]=0;x[e+224>>2]=0;x[e+228>>2]=0;x[e+232>>2]=0;x[e+236>>2]=0;x[e+240>>2]=0;x[e+244>>2]=0;x[e+248>>2]=15520;b=Mb(17);v[e+268|0]=0;x[e+264>>2]=17;x[e+256>>2]=0;x[e+260>>2]=0;x[e+252>>2]=b;x[e+272>>2]=15464;c=Mb(17);v[e+292|0]=0;x[e+288>>2]=17;x[e+280>>2]=0;x[e+284>>2]=0;x[e+276>>2]=c;b=e+304|0;x[b>>2]=0;x[e+296>>2]=0;x[e+300>>2]=0}if(!Ba|(j|0)==3){i=dr(32);k=3;if((Ba|0)==1){break a}c=i}if(!Ba){x[e+296>>2]=c;f=c+32|0;x[b>>2]=f;x[c+24>>2]=0;x[c+28>>2]=0;x[c+16>>2]=0;x[c+20>>2]=0;x[c+8>>2]=0;x[c+12>>2]=0;x[c>>2]=0;x[c+4>>2]=0;x[e+332>>2]=0;x[e+336>>2]=0;x[e+320>>2]=0;x[e+324>>2]=0;c=e+312|0;x[e+316>>2]=c;x[e+308>>2]=10;x[e+300>>2]=f;x[e+340>>2]=0;x[e+344>>2]=0;x[e+348>>2]=0;x[e+352>>2]=0;x[e+364>>2]=1178304512;x[e+368>>2]=2048;x[e+356>>2]=1142292480;x[e+360>>2]=1150681088;x[c>>2]=c;if(!y[48636]){v[48636]=1}b=x[e+136>>2]<=0}b:{c:{d:{if(!Ba){if(b){break d}b=x[e>>2];x[g+20>>2]=2741;C[g+24>>3]=b>>>0;C[g+8>>3]=1114113;c=x[e+128>>2];b=!c;if(b){break c}f=g+24|0;l=g+8|0;m=x[x[c>>2]+24>>2];b=g+20|0}if(!Ba|(j|0)==4){Ea[m|0](c,b,f,l);k=4;if((Ba|0)==1){break a}}if(!Ba){b=x[e+136>>2]<=0;if(b){break d}o=C[e+16>>3];q=C[e+8>>3];x[g+20>>2]=7950;C[g+24>>3]=q;C[g+8>>3]=o;c=x[e+128>>2];b=!c;if(b){break c}f=g+24|0;l=g+8|0;m=x[x[c>>2]+24>>2];b=g+20|0}if(!Ba|(j|0)==5){Ea[m|0](c,b,f,l);k=5;if((Ba|0)==1){break a}}}if(!Ba){n=E(E(A[e>>2])/E(48e3));B[e+372>>2]=n;n=E(n*E(2048));e:{if(E(F(n))>>0>1;c=c>>>1|0;if(f){continue}break}}c=1<>2]=c;c=c>>>1|0;x[e+368>>2]=c;b=x[e+136>>2]>0}if((Ba|0)==2|b){if(!Ba){x[g+8>>2]=7039;C[g+24>>3]=c>>>0;c=x[e+104>>2];b=!c;if(b){break c}f=g+24|0;l=x[x[c>>2]+24>>2];b=g+8|0}if(!Ba|(j|0)==6){Ea[l|0](c,b,f);k=6;if((Ba|0)==1){break a}}}if(!Ba){c=x[e+368>>2];x[e+44>>2]=c;x[e+32>>2]=c;x[e+28>>2]=c;x[e+24>>2]=c;x[e+40>>2]=c<<1;b=v[e+56|0]&1;if(b){v[e+52|0]=1}}if(!Ba|(j|0)==7){lc(e);k=7;if((Ba|0)==1){break a}}if(!Ba){b=g+32|0;ya=b;break b}}if(!Ba){ac();p()}}if(!Ba){b=h+192|0;f=x[h+208>>2];c=(b|0)==(f|0)}f:{if(!Ba){g:{if(c){c=4;f=b;break g}c=5;b=!f;if(b){break f}}c=c<<2;b=x[c+x[f>>2]>>2]}if(!Ba|(j|0)==8){Ea[b|0](f);k=8;if((Ba|0)==1){break a}}}if(!Ba){b=h+168|0;f=x[h+184>>2];c=(b|0)==(f|0)}h:{if(!Ba){i:{if(c){c=4;f=b;break i}c=5;b=!f;if(b){break h}}b=x[x[f>>2]+(c<<2)>>2]}if(!Ba|(j|0)==9){Ea[b|0](f);k=9;if((Ba|0)==1){break a}}}if(!Ba){f=x[h+160>>2];b=(f|0)==(h+144|0)}j:{if(!Ba){k:{if(b){c=4;f=h+144|0;break k}c=5;b=!f;if(b){break j}}b=x[x[f>>2]+(c<<2)>>2]}if(!Ba|(j|0)==10){Ea[b|0](f);k=10;if((Ba|0)==1){break a}}}if(!Ba){x[a>>2]=e;x[a+4>>2]=0;b=!d}l:{if(!Ba){if(b){break l}f=x[d+4>>2];x[d+4>>2]=f-1;if(f){break l}b=x[x[d>>2]+8>>2]}if(!Ba|(j|0)==11){Ea[b|0](d);k=11;if((Ba|0)==1){break a}}if(!Ba|(j|0)==12){cr(d);k=12;if((Ba|0)==1){break a}}}if(!Ba){ya=h+224|0;return a}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;i=x[Ca>>2];x[i>>2]=a;x[i+4>>2]=b;x[i+8>>2]=c;x[i+12>>2]=d;x[i+16>>2]=e;x[i+20>>2]=f;x[i+24>>2]=g;x[i+28>>2]=h;x[i+32>>2]=l;x[i+36>>2]=m;x[Ca>>2]=x[Ca>>2]+40;return 0}function _b(a,b,c,d,e,f,g,h){var i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0,z=E(0),G=0,H=0,I=0,J=0,L=0,M=0,N=0,O=0,P=0,Q=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-100;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];i=x[b+32>>2];k=x[b+36>>2];s=x[b+40>>2];q=x[b+44>>2];r=x[b+48>>2];u=x[b+52>>2];v=x[b+56>>2];t=x[b+60>>2];w=x[b+64>>2];y=x[b+68>>2];I=x[b+72>>2];z=B[b+76>>2];J=x[b+80>>2];m=x[b+88>>2];G=x[b+84>>2];l(0,G|0);l(1,m|0);N=+n();L=x[b+92>>2];O=x[b+96>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;H=x[x[Ca>>2]>>2]}if(!Ba){J=ya-16|0;ya=J;k=x[b>>2];x[b+4>>2]=k;i=x[b+8>>2]-k>>4>>>0>>0}a:{b:{c:{d:{e:{f:{g:{if((Ba|0)==2|i){if(!Ba){i=g>>>0>=268435456;if(i){break e}s=g<<4}if(!Ba|!H){m=dr(s);G=0;if((Ba|0)==1){break a}i=m}if(!Ba){x[b+4>>2]=i;x[b>>2]=i;x[b+8>>2]=i+s;i=!k;if(i){break g}zg(k);break g}}if(!Ba){k=(g|0)<=0;if(k){break f}}}if(!Ba){N=+(g|0);v=h;u=0-v|0}while(1){if(!Ba){q=((u|0)>0?u:0)+v|0;i=(q|0)!=0;I=(D(i+((q-i>>>0)/(g>>>0)|0)|0,g)+u|0)%(g|0)|0;i=h-w|0;M=K(+(((i|0)>0?i:0)|0)/N);h:{if(F(M)<2147483648){q=~~M;break h}q=-2147483648}k=x[b+4>>2];i=(k|0)==x[b+8>>2];M=K(+(d-w|0)/N);s=F(M)<2147483648;i:{if(s){r=~~M;break i}r=-2147483648}i=!i}j:{if(!Ba){if(i){x[k+12>>2]=q;x[k+8>>2]=0;x[k+4>>2]=r;x[k>>2]=I;k=k+16|0;x[b+4>>2]=k;break j}s=x[b>>2];i=k-s|0;t=i>>4;y=t+1|0;if(y>>>0>=268435456){break e}O=t<<4;t=i>>3;t=t>>>0>y>>>0?t:y;i=i>>>0>=2147483632;y=i?268435455:t}L=Ba?L:y;if(L|(Ba|0)==2){if(!Ba){if(y>>>0>=268435456){break d}i=y<<4}if(!Ba|(H|0)==1){m=dr(i);G=1;if((Ba|0)==1){break a}t=m}}t=!Ba&(!L|(Ba|0)==2)?0:t;if(!Ba){i=t+O|0;x[i+12>>2]=q;x[i+8>>2]=0;x[i+4>>2]=r;x[i>>2]=I;I=(y<<4)+t|0;q=i+16|0;r=(k|0)!=(s|0);if(r){while(1){k=k-16|0;r=x[k+4>>2];i=i-16|0;x[i>>2]=x[k>>2];x[i+4>>2]=r;r=x[k+12>>2];x[i+8>>2]=x[k+8>>2];x[i+12>>2]=r;r=(k|0)!=(s|0);if(r){continue}break}k=x[b>>2]}x[b+8>>2]=I;x[b+4>>2]=q;x[b>>2]=i;i=!k;if(i){break j}zg(k)}}if(!Ba){v=v-1|0;u=u+1|0;w=w+1|0;k=(w|0)!=(g|0);if(k){continue}}break}}a=Ba?a:x[a+40>>2]==1;if(a|(Ba|0)==2){if(!Ba){a=!e;if(a){break c}k=x[c>>2];x[c+4>>2]=k;a=x[c+8>>2]-k>>2>>>0>=d>>>0;k:{if(a){break k}if(d>>>0>=1073741824){break b}u=Mb(d);w=u+(d<<2)|0;i=u;k=x[c+4>>2];s=x[c>>2];if((k|0)!=(s|0)){while(1){i=i-4|0;k=k-4|0;z=B[k>>2];B[i>>2]=z;if((k|0)!=(s|0)){continue}break}}x[c+8>>2]=w;x[c+4>>2]=u;x[c>>2]=i;a=!s;if(a){break k}zg(s)}s=f}while(1){if(!Ba){w=x[b>>2]+(s<<4)|0;d=x[c>>2];x[w+8>>2]=x[c+4>>2]-d>>2;k=0;a=x[w+4>>2]>0}if((Ba|0)==2|a){u=Ba?u:w+4|0;while(1){if(!Ba){d=s<<3;z=E(C[d+(x[e>>2]+(D(g,k)<<3)|0)>>3]);B[J+12>>2]=z;i=x[c+4>>2];a=i>>>0>2]}l:{if(!Ba){if(a){B[i>>2]=z;a=i+4|0;x[c+4>>2]=a;break l}h=x[c+4>>2];v=x[c>>2];a=h-v>>2;i=a+1|0;q=i>>>0<1073741824;d=J+12|0}m:{n:{if(!(q?Ba:1)){q=x[c+8>>2]-v|0;r=q>>1;t=r>>>0>i>>>0;q=q>>>0>=2147483644?1073741823:t?r:i;i=!q;o:{if(i){r=0;break o}h=q>>>0>=1073741824;if(h){break n}r=Mb(q);v=x[c>>2];h=x[c+4>>2]}i=(a<<2)+r|0;z=B[d>>2];B[i>>2]=z;q=(q<<2)+r|0;r=i+4|0;a=(h|0)!=(v|0);if(a){while(1){i=i-4|0;h=h-4|0;z=B[h>>2];B[i>>2]=z;a=(h|0)!=(v|0);if(a){continue}break}}x[c+8>>2]=q;x[c+4>>2]=r;x[c>>2]=i;if(v){zg(v)}break m}if(!Ba|(H|0)==2){Xa();G=2;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){a=nr(8)}if(!Ba|(H|0)==3){m=_a(a,10749);G=3;if((Ba|0)==1){break a}a=m}if(!Ba){$(a|0,47292,2);p()}}}if(!Ba){k=k+1|0;a=(k|0)>2];if(a){continue}}break}}if(!Ba){s=x[w>>2];a=(s|0)!=(f|0);if(a){continue}}break}}if(!Ba){ya=J+16|0;return}}if(!Ba|(H|0)==4){Xa();G=4;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){Ya();p()}}if(!Ba){a=nr(8)}if(!Ba|(H|0)==5){m=fr(a,8169);G=5;if((Ba|0)==1){break a}a=m}if(!Ba){$(a|0,47240,2);p()}}if(!Ba|(H|0)==6){Xa();G=6;if((Ba|0)==1){break a}}if(!Ba){p()}return}x[x[Ca>>2]>>2]=G;x[Ca>>2]=x[Ca>>2]+4;m=x[Ca>>2];x[m>>2]=a;x[m+4>>2]=b;x[m+8>>2]=c;x[m+12>>2]=d;x[m+16>>2]=e;x[m+20>>2]=f;x[m+24>>2]=g;x[m+28>>2]=h;x[m+32>>2]=i;x[m+36>>2]=k;x[m+40>>2]=s;x[m+44>>2]=q;x[m+48>>2]=r;x[m+52>>2]=u;x[m+56>>2]=v;x[m+60>>2]=t;x[m+64>>2]=w;x[m+68>>2]=y;x[m+72>>2]=I;B[m+76>>2]=z;x[m+80>>2]=J;o(+N);a=j(1)|0;P=m,Q=j(0)|0,x[P+84>>2]=Q;x[m+88>>2]=a;x[m+92>>2]=L;x[m+96>>2]=O;x[Ca>>2]=x[Ca>>2]+100}function ub(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=E(0),g=0,h=0,i=0,k=0,m=E(0),q=0,r=E(0),s=E(0),t=0,u=0,w=0,z=0,A=0,D=0,F=0,G=0,H=0,I=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-56;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+16>>2];e=x[b+12>>2];l(0,e|0);l(1,d|0);h=+n();f=B[b+20>>2];d=x[b+28>>2];e=x[b+24>>2];l(0,e|0);l(1,d|0);A=+n();d=x[b+36>>2];e=x[b+32>>2];l(0,e|0);l(1,d|0);u=+n();d=x[b+44>>2];e=x[b+40>>2];l(0,e|0);l(1,d|0);w=+n();d=x[b+52>>2];e=x[b+48>>2];l(0,e|0);l(1,d|0);z=+n();b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;F=x[x[Ca>>2]>>2]}G=Ba?G:x[a+60>>2];a:{b:{if(!Ba){c:{d:{e:{f:{g:{h:{i:{switch(G|0){case 0:if(!y[48576]){v[48576]=1;x[12143]=1068813832}if(!y[48584]){v[48584]=1;x[12145]=841731191}e=x[a+32>>2];q=x[a+28>>2];f=E(0);if((q|0)<=0){break e}m=B[12143];s=B[12145];t=+s;d=1;while(1){c=d;f=B[(c<<2)+b>>2];d=c+1|0;i=(f>s)+i|0;h=C[e+(c<<3)>>3];j:{if(h>t){r=E(+f/h);break j}r=E(0);if(!(f>s)){break j}r=m}g=(r>=m)+g|0;if((c|0)!=(q|0)){continue}break};break f;case 1:if(!y[48576]){v[48576]=1;x[12143]=1068813832}if(!y[48584]){v[48584]=1;x[12145]=841731191}e=x[a+32>>2];q=x[a+28>>2];f=E(0);if((q|0)<=0){break g}m=B[12143];s=B[12145];t=+s;d=1;while(1){c=d;f=B[(c<<2)+b>>2];d=c+1|0;i=(f>s)+i|0;h=C[e+(c<<3)>>3];k:{if(h>t){r=E(+f/h);break k}r=E(0);if(!(f>s)){break k}r=m}g=(r>=m)+g|0;if((c|0)!=(q|0)){continue}break};break h;case 2:break i;default:break c}}c=0;d=x[a+48>>2];if((d|0)<0){break c}i=d+1|0;g=i&3;if(d>>>0>=3){i=i&-4;d=0;while(1){e=c|3;r=E(B[(e<<2)+b>>2]*E(e|0));e=c|2;s=E(B[(e<<2)+b>>2]*E(e|0));e=c|1;m=E(r+E(s+E(E(B[(e<<2)+b>>2]*E(e|0))+E(E(B[(c<<2)+b>>2]*E(c|0))+m))));c=c+4|0;d=d+4|0;if((i|0)!=(d|0)){continue}break}}if(!g){break d}d=0;while(1){m=E(E(B[(c<<2)+b>>2]*E(c|0))+m);c=c+1|0;d=d+1|0;if((g|0)!=(d|0)){continue}break}break d}f=E(g|0)}l:{if((q|0)<0){break l}d=q+1|0;D=d&3;g=0;c=0;if(q>>>0>=3){q=d&-4;d=0;while(1){C[e+(c<<3)>>3]=B[(c<<2)+b>>2];k=c|1;C[e+(k<<3)>>3]=B[(k<<2)+b>>2];k=c|2;C[e+(k<<3)>>3]=B[(k<<2)+b>>2];k=c|3;C[e+(k<<3)>>3]=B[(k<<2)+b>>2];c=c+4|0;d=d+4|0;if((q|0)!=(d|0)){continue}break}}if(!D){break l}while(1){C[e+(c<<3)>>3]=B[(c<<2)+b>>2];c=c+1|0;g=g+1|0;if((D|0)!=(g|0)){continue}break}}m=E(0);f=i?E(f/E(i|0)):E(0);c=0;d=x[a+48>>2];if((d|0)<0){break d}i=d+1|0;g=i&3;if(d>>>0>=3){i=i&-4;d=0;while(1){e=c|3;r=E(B[(e<<2)+b>>2]*E(e|0));e=c|2;s=E(B[(e<<2)+b>>2]*E(e|0));e=c|1;m=E(r+E(s+E(E(B[(e<<2)+b>>2]*E(e|0))+E(E(B[(c<<2)+b>>2]*E(c|0))+m))));c=c+4|0;d=d+4|0;if((i|0)!=(d|0)){continue}break}}if(!g){break d}d=0;while(1){m=E(E(B[(c<<2)+b>>2]*E(c|0))+m);c=c+1|0;d=d+1|0;if((g|0)!=(d|0)){continue}break}break d}f=E(g|0)}m:{if((q|0)<0){break m}d=q+1|0;D=d&3;g=0;c=0;if(q>>>0>=3){q=d&-4;d=0;while(1){C[e+(c<<3)>>3]=B[(c<<2)+b>>2];k=c|1;C[e+(k<<3)>>3]=B[(k<<2)+b>>2];k=c|2;C[e+(k<<3)>>3]=B[(k<<2)+b>>2];k=c|3;C[e+(k<<3)>>3]=B[(k<<2)+b>>2];c=c+4|0;d=d+4|0;if((q|0)!=(d|0)){continue}break}}if(!D){break m}while(1){C[e+(c<<3)>>3]=B[(c<<2)+b>>2];c=c+1|0;g=g+1|0;if((D|0)!=(g|0)){continue}break}}m=E(0);if(!i){f=E(0);break d}f=E(f/E(i|0))}if(!G){break b}h=+m;A=+f}u=C[a+64>>3];b=x[a+52>>2];c=x[x[b>>2]+12>>2]}if(!Ba|!F){Ea[c|0](b,h);d=0;if((Ba|0)==1){break a}}if(!Ba){u=h-u;b=x[a+56>>2];c=x[x[b>>2]+12>>2]}if(!Ba|(F|0)==1){Ea[c|0](b,u);d=1;if((Ba|0)==1){break a}}if(!Ba){b=x[a+52>>2];c=x[x[b>>2]+16>>2]}if(!Ba|(F|0)==2){t=+Ea[c|0](b);d=2;if((Ba|0)==1){break a}w=t}if(!Ba){b=x[a+56>>2];c=x[x[b>>2]+16>>2]}if(!Ba|(F|0)==3){t=+Ea[c|0](b);d=3;if((Ba|0)==1){break a}z=t}if(!Ba){C[a+64>>3]=h;b=x[a+80>>2];w=h-w>0?u-z:0;z=C[a+72>>3];n:{if(w0?(b|0)>3?.5:0:0;b=0;break n}h=0;b=b+1|0}x[a+80>>2]=b;C[a+72>>3]=w;f=E(A>.35?x[a+60>>2]==1?h>2]>>2]=d;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;o(+h);a=j(1)|0;H=d,I=j(0)|0,x[H+12>>2]=I;x[d+16>>2]=a;B[d+20>>2]=f;o(+A);a=j(1)|0;H=d,I=j(0)|0,x[H+24>>2]=I;x[d+28>>2]=a;o(+u);a=j(1)|0;H=d,I=j(0)|0,x[H+32>>2]=I;x[d+36>>2]=a;o(+w);a=j(1)|0;H=d,I=j(0)|0,x[H+40>>2]=I;x[d+44>>2]=a;o(+z);a=j(1)|0;H=d,I=j(0)|0,x[H+48>>2]=I;x[d+52>>2]=a;x[Ca>>2]=x[Ca>>2]+56;return E(E(0))}function df(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0;s=Ba;i=ya-560|0;ya=i;g=c;c=(c-3|0)/24|0;v=(c|0)>0?c:0;l=g+D(v,-24)|0;n=x[(e<<2)+17344>>2];j=d-1|0;if((n+j|0)>=0){g=d+n|0;c=v-j|0;while(1){C[(i+320|0)+(h<<3)>>3]=(c|0)<0?0:+x[(c<<2)+17360>>2];c=c+1|0;h=h+1|0;if((g|0)!=(h|0)){continue}break}}q=l-24|0;g=0;h=(n|0)>0?n:0;m=(d|0)<=0;while(1){a:{if(m){f=0;break a}t=g+j|0;c=0;f=0;while(1){f=C[(c<<3)+a>>3]*C[(i+320|0)+(t-c<<3)>>3]+f;c=c+1|0;if((d|0)!=(c|0)){continue}break}}C[(g<<3)+i>>3]=f;c=(g|0)==(h|0);g=g+1|0;if(!c){continue}break}A=47-l|0;t=48-l|0;B=l-25|0;g=n;b:{while(1){f=C[(g<<3)+i>>3];c=0;h=g;o=(g|0)<=0;if(!o){while(1){m=(i+480|0)+(c<<2)|0;k=f*5.960464477539063e-8;c:{if(F(k)<2147483648){j=~~k;break c}j=-2147483648}k=+(j|0);f=k*-16777216+f;d:{if(F(f)<2147483648){j=~~f;break d}j=-2147483648}x[m>>2]=j;h=h-1|0;f=C[(h<<3)+i>>3]+k;c=c+1|0;if((g|0)!=(c|0)){continue}break}}f=bg(f,q);if((Ba|0)!=(s|0)){p()}f=f+J(f*.125)*-8;e:{if(F(f)<2147483648){m=~~f;break e}m=-2147483648}f=f-+(m|0);f:{g:{h:{y=(q|0)<=0;i:{if(!y){h=((g<<2)+i|0)+476|0;j=x[h>>2];c=j>>t;u=h;h=j-(c<>2]=h;m=c+m|0;j=h>>A;break i}if(q){break h}j=x[((g<<2)+i|0)+476>>2]>>23}if((j|0)<=0){break f}break g}j=2;if(f>=.5){break g}j=0;break f}c=0;h=0;if(!o){while(1){u=(i+480|0)+(c<<2)|0;o=x[u>>2];z=16777215;j:{k:{if(h){break k}z=16777216;if(o){break k}h=0;break j}x[u>>2]=z-o;h=1}c=c+1|0;if((g|0)!=(c|0)){continue}break}}l:{if(y){break l}c=8388607;m:{switch(B|0){case 1:c=4194303;break;case 0:break m;default:break l}}o=((g<<2)+i|0)+476|0;x[o>>2]=x[o>>2]&c}m=m+1|0;if((j|0)!=2){break f}f=1-f;j=2;if(!h){break f}k=bg(1,q);if((Ba|0)!=(s|0)){p()}f=f-k}if(f==0){h=0;n:{c=g;if((n|0)>=(g|0)){break n}while(1){c=c-1|0;h=x[(i+480|0)+(c<<2)>>2]|h;if((c|0)>(n|0)){continue}break}if(!h){break n}l=q;while(1){l=l-24|0;g=g-1|0;if(!x[(i+480|0)+(g<<2)>>2]){continue}break}break b}c=1;while(1){h=c;c=c+1|0;if(!x[(i+480|0)+(n-h<<2)>>2]){continue}break}h=g+h|0;while(1){j=d+g|0;g=g+1|0;C[(i+320|0)+(j<<3)>>3]=x[(v+g<<2)+17360>>2];c=0;f=0;if((d|0)>0){while(1){f=C[(c<<3)+a>>3]*C[(i+320|0)+(j-c<<3)>>3]+f;c=c+1|0;if((d|0)!=(c|0)){continue}break}}C[(g<<3)+i>>3]=f;if((g|0)<(h|0)){continue}break}g=h;continue}break}f=bg(f,24-l|0);if((Ba|0)!=(s|0)){p()}o:{if(f>=16777216){d=(i+480|0)+(g<<2)|0;k=f*5.960464477539063e-8;p:{if(F(k)<2147483648){c=~~k;break p}c=-2147483648}f=+(c|0)*-16777216+f;q:{if(F(f)<2147483648){a=~~f;break q}a=-2147483648}x[d>>2]=a;g=g+1|0;break o}if(F(f)<2147483648){c=~~f}else{c=-2147483648}l=q}x[(i+480|0)+(g<<2)>>2]=c}f=bg(1,l);if((Ba|0)!=(s|0)){p()}r:{if((g|0)<0){break r}d=g;while(1){a=d;C[(a<<3)+i>>3]=f*+x[(i+480|0)+(a<<2)>>2];d=a-1|0;f=f*5.960464477539063e-8;if(a){continue}break}if((g|0)<0){break r}h=g;while(1){f=0;c=0;a=g-h|0;d=(a|0)>(n|0)?n:a;if((d|0)>=0){while(1){f=C[(c<<3)+20128>>3]*C[(c+h<<3)+i>>3]+f;l=(c|0)!=(d|0);c=c+1|0;if(l){continue}break}}C[(i+160|0)+(a<<3)>>3]=f;a=(h|0)>0;h=h-1|0;if(a){continue}break}}s:{t:{u:{switch(e|0){case 3:v:{if((g|0)<=0){break v}f=C[(i+160|0)+(g<<3)>>3];c=g;while(1){e=i+160|0;a=c-1|0;d=e+(a<<3)|0;r=C[d>>3];k=r+f;C[(c<<3)+e>>3]=f+(r-k);C[d>>3]=k;d=c>>>0>1;f=k;c=a;if(d){continue}break}if((g|0)<2){break v}f=C[(g<<3)+e>>3];c=g;while(1){e=i+160|0;a=c-1|0;d=e+(a<<3)|0;r=C[d>>3];k=r+f;C[(c<<3)+e>>3]=f+(r-k);C[d>>3]=k;d=c>>>0>2;f=k;c=a;if(d){continue}break}if((g|0)<=1){break v}while(1){w=w+C[(i+160|0)+(g<<3)>>3];a=(g|0)>2;g=g-1|0;if(a){continue}break}}f=C[i+160>>3];if(j){break t}C[b>>3]=f;f=C[i+168>>3];C[b+16>>3]=w;C[b+8>>3]=f;break s;case 0:f=0;if((g|0)>=0){while(1){a=g;g=g-1|0;f=f+C[(i+160|0)+(a<<3)>>3];if(a){continue}break}}C[b>>3]=j?-f:f;break s;case 1:case 2:break u;default:break s}}f=0;if((g|0)>=0){d=g;while(1){a=d;d=a-1|0;f=f+C[(i+160|0)+(a<<3)>>3];if(a){continue}break}}C[b>>3]=j?-f:f;f=C[i+160>>3]-f;c=1;if((g|0)>0){while(1){f=f+C[(i+160|0)+(c<<3)>>3];a=(c|0)!=(g|0);c=c+1|0;if(a){continue}break}}C[b+8>>3]=j?-f:f;break s}C[b>>3]=-f;f=C[i+168>>3];C[b+16>>3]=-w;C[b+8>>3]=-f}ya=i+560|0;return m&7}function fc(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-40;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];g=x[b+20>>2];h=x[b+24>>2];i=x[b+28>>2];l=x[b+32>>2];m=x[b+36>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;k=x[x[Ca>>2]>>2]}if(!Ba){g=ya-32|0;ya=g;c=x[a+16>>2];b=c>>>0>=1024}a:{b:{c:{d:{e:{if((Ba|0)==2|b){if(!Ba){x[a+16>>2]=c-1024;b=x[a+4>>2];m=x[b>>2];c=b+4|0;x[a+4>>2]=c;b=x[a+8>>2];d=(b|0)!=x[a+12>>2]}f:{if(!Ba){if(d){d=b;break f}h=x[a>>2];if(h>>>0>>0){d=b-c|0;i=((c-h>>2)+1|0)/-2|0;h=i<<2;e=h+c|0;if((b|0)!=(c|0)){mf(e,c,d);c=x[a+4>>2]}d=d+e|0;x[a+8>>2]=d;b=c+h|0;x[a+4>>2]=b;break f}d=(b|0)==(h|0)?1:b-h>>1;i=d>>>0>=1073741824;if(i){break e}e=d<<2}if(!Ba|!k){f=dr(e);if((Ba|0)==1){break a}l=f}if(!Ba){f=e+l|0;i=(d&-4)+l|0;d=i;e=(b|0)==(c|0);g:{if(e){break g}e=b-c|0;j=e-4|0;n=(j>>>2|0)+1&7;h:{if(!n){b=d;break h}d=0;b=i;while(1){x[b>>2]=x[c>>2];c=c+4|0;b=b+4|0;d=d+1|0;if((n|0)!=(d|0)){continue}break}}d=e+i|0;e=j>>>0<28;if(e){break g}while(1){x[b>>2]=x[c>>2];x[b+4>>2]=x[c+4>>2];x[b+8>>2]=x[c+8>>2];x[b+12>>2]=x[c+12>>2];x[b+16>>2]=x[c+16>>2];x[b+20>>2]=x[c+20>>2];x[b+24>>2]=x[c+24>>2];x[b+28>>2]=x[c+28>>2];c=c+32|0;b=b+32|0;e=(d|0)!=(b|0);if(e){continue}break}}x[a+12>>2]=f;x[a+8>>2]=d;x[a+4>>2]=i;x[a>>2]=l;b=!h;if(b){break f}zg(h);d=x[a+8>>2]}}if(!Ba){x[d>>2]=m;x[a+8>>2]=x[a+8>>2]+4;break b}}if(Ba){n=i}else{b=x[a+8>>2];m=b-x[a+4>>2]>>2;c=x[a+12>>2];d=x[a>>2];e=c-d|0;n=m>>>0>2>>>0}f=(Ba|0)==2;if(n|f){b=Ba?b:(b|0)!=(c|0);if(f|b){if(!Ba|(k|0)==1){f=dr(4096);j=1;if((Ba|0)==1){break a}b=f}if(!Ba){x[g+12>>2]=b;b=g+12|0}if(!Ba|(k|0)==2){Ae(a,b);j=2;if((Ba|0)==1){break a}}if(!Ba){break b}}if(!Ba|(k|0)==3){f=dr(4096);j=3;if((Ba|0)==1){break a}b=f}if(!Ba){x[g+12>>2]=b;b=g+12|0}if(!Ba|(k|0)==4){Be(a,b);j=4;if((Ba|0)==1){break a}}if(!Ba){b=x[a+4>>2];m=x[b>>2];c=b+4|0;x[a+4>>2]=c;b=x[a+8>>2];d=(b|0)!=x[a+12>>2]}i:{if(!Ba){if(d){d=b;break i}h=x[a>>2];if(h>>>0>>0){d=b-c|0;h=((c-h>>2)+1|0)/-2<<2;e=h+c|0;if((b|0)!=(c|0)){mf(e,c,d);c=x[a+4>>2]}d=d+e|0;x[a+8>>2]=d;b=c+h|0;x[a+4>>2]=b;break i}d=(b|0)==(h|0)?1:b-h>>1;if(d>>>0>=1073741824){break e}e=d<<2}if(!Ba|(k|0)==5){f=dr(e);j=5;if((Ba|0)==1){break a}l=f}if(!Ba){f=e+l|0;i=(d&-4)+l|0;d=i;e=(b|0)==(c|0);j:{if(e){break j}e=b-c|0;j=e-4|0;n=(j>>>2|0)+1&7;k:{if(!n){b=d;break k}d=0;b=i;while(1){x[b>>2]=x[c>>2];c=c+4|0;b=b+4|0;d=d+1|0;if((n|0)!=(d|0)){continue}break}}d=e+i|0;e=j>>>0<28;if(e){break j}while(1){x[b>>2]=x[c>>2];x[b+4>>2]=x[c+4>>2];x[b+8>>2]=x[c+8>>2];x[b+12>>2]=x[c+12>>2];x[b+16>>2]=x[c+16>>2];x[b+20>>2]=x[c+20>>2];x[b+24>>2]=x[c+24>>2];x[b+28>>2]=x[c+28>>2];c=c+32|0;b=b+32|0;e=(d|0)!=(b|0);if(e){continue}break}}x[a+12>>2]=f;x[a+8>>2]=d;x[a+4>>2]=i;x[a>>2]=l;b=!h;if(b){break i}zg(h);d=x[a+8>>2]}}if(!Ba){x[d>>2]=m;x[a+8>>2]=x[a+8>>2]+4;break b}}if(!Ba){x[g+28>>2]=a+12;d=(c|0)==(d|0);c=d?1:e>>1;b=c>>>0>=1073741824;if(b){break e}b=c<<2}if(!Ba|(k|0)==6){f=dr(b);j=6;if((Ba|0)==1){break a}c=f}if(!Ba){x[g+12>>2]=c;d=(m<<2)+c|0;x[g+20>>2]=d;b=b+c|0;x[g+24>>2]=b;x[g+16>>2]=d}if(!Ba|(k|0)==7){f=dr(4096);j=7;if((Ba|0)==1){break a}b=f}if(!Ba){x[g+8>>2]=b;d=g+8|0;b=g+12|0}if(!Ba|(k|0)==8){Ae(b,d);j=8;if((Ba|0)==1){break a}}if(!Ba){c=x[a+8>>2];b=(c|0)==x[a+4>>2];if(b){b=c;break c}}while(1){if(!Ba){c=c-4|0;b=g+12|0}if(!Ba|(k|0)==9){Be(b,c);j=9;if((Ba|0)==1){break a}}if(!Ba){b=x[a+4>>2]!=(c|0);if(b){continue}}break}if(!Ba){break d}}if(!Ba){Ya();p()}}if(!Ba){b=x[a+8>>2]}}if(!Ba){d=x[a>>2];x[a>>2]=x[g+12>>2];x[g+12>>2]=d;x[a+4>>2]=x[g+16>>2];x[g+16>>2]=c;x[a+8>>2]=x[g+20>>2];x[g+20>>2]=b;i=x[a+12>>2];x[a+12>>2]=x[g+24>>2];x[g+24>>2]=i;if((b|0)!=(c|0)){x[g+20>>2]=b+((c-b|0)+3&-4)}if(!d){break b}zg(d)}}if(!Ba){ya=g+32|0}return}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[f+24>>2]=h;x[f+28>>2]=i;x[f+32>>2]=l;x[f+36>>2]=m;x[Ca>>2]=x[Ca>>2]+40}function Ac(a,b,c,d,e,f){var g=0,h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,z=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-60;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];i=x[b+32>>2];m=x[b+36>>2];t=x[b+40>>2];u=x[b+44>>2];k=x[b+52>>2];q=x[b+48>>2];l(0,q|0);l(1,k|0);r=+n();v=x[b+56>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;s=x[x[Ca>>2]>>2]}a:{if(!Ba){g=ya-32|0;ya=g;if(!y[a+52|0]){r=+(x[a+32>>2]>>>1>>>0)/C[a+16>>3];h=Mf(E(r))}i=x[e>>2];m=i>>>0>h>>>0}b:{c:{d:{e:{if((Ba|0)==2|m){m=Ba?m:!f;f:{if(!Ba){if(m){break f}m=x[a+136>>2]<2}g:{if(!Ba){if(m){break g}x[g+28>>2]=1762;C[g+16>>3]=f>>>0;r=+(i>>>0);C[g+8>>3]=r;i=x[a+128>>2];if(!i){break e}t=g+16|0;u=g+8|0;v=x[x[i>>2]+24>>2];m=g+28|0}if(!Ba|!s){Ea[v|0](i,m,t,u);q=0;if((Ba|0)==1){break a}}if(!Ba){i=x[a+136>>2]<2;if(i){break g}x[g+28>>2]=1052;C[g+16>>3]=h>>>0;r=+(d>>>0);C[g+8>>3]=r;i=x[a+128>>2];if(!i){break e}t=g+16|0;u=g+8|0;v=x[x[i>>2]+24>>2];m=g+28|0}if(!Ba|(s|0)==1){Ea[v|0](i,m,t,u);q=1;if((Ba|0)==1){break a}}}if(!Ba){h=x[e>>2]-h|0;i=h>>>0>f>>>0;if(i){break f}i=d+h>>>0<=f>>>0;if(i){break f}d=f-h|0;f=x[a+136>>2]<2;if(f){break f}x[g+8>>2]=3903;r=+(d>>>0);C[g+16>>3]=r;h=x[a+104>>2];if(!h){break e}i=g+16|0;m=x[x[h>>2]+24>>2];f=g+8|0}if(!Ba|(s|0)==2){Ea[m|0](h,f,i);q=2;if((Ba|0)==1){break a}}}if(!Ba){r=+(d>>>0);f=x[a+136>>2]>=3}if((Ba|0)==2|f){if(!Ba){x[g+8>>2]=6375;C[g+16>>3]=r;h=x[a+104>>2];if(!h){break e}i=g+16|0;m=x[x[h>>2]+24>>2];f=g+8|0}if(!Ba|(s|0)==3){Ea[m|0](h,f,i);q=3;if((Ba|0)==1){break a}}}if(!Ba|(s|0)==4){k=jc(b,c,d);q=4;if((Ba|0)==1){break a}h=k}b=Ba?b:d>>>0<=h>>>0;h:{if(!Ba){if(b){break h}b=x[a+136>>2]<0;if(b){break h}x[g+28>>2]=7439;C[g+16>>3]=r;C[g+8>>3]=h>>>0;a=x[a+128>>2];b=!a;if(b){break e}c=g+16|0;d=g+8|0;f=x[x[a>>2]+24>>2];b=g+28|0}if(!Ba|(s|0)==5){Ea[f|0](a,b,c,d);q=5;if((Ba|0)==1){break a}}}k=x[e>>2]+h|0;if(!Ba){break b}}f=Ba?f:d+i>>>0<=h>>>0;if(f|(Ba|0)==2){b=Ba?b:x[a+136>>2]<2;i:{if(!Ba){if(b){break i}x[g+8>>2]=3818;C[g+16>>3]=h>>>0;h=x[a+104>>2];b=!h;if(b){break e}c=g+16|0;f=x[x[h>>2]+24>>2];b=g+8|0}if(!Ba|(s|0)==6){Ea[f|0](h,b,c);q=6;if((Ba|0)==1){break a}}if(!Ba){i=x[e>>2];b=x[a+136>>2]<2;if(b){break i}x[g+28>>2]=1745;C[g+16>>3]=d>>>0;C[g+8>>3]=i>>>0;a=x[a+128>>2];b=!a;if(b){break e}c=g+16|0;f=g+8|0;h=x[x[a>>2]+24>>2];b=g+28|0}if(!Ba|(s|0)==7){Ea[h|0](a,b,c,f);q=7;if((Ba|0)==1){break a}}i=Ba?i:x[e>>2]}k=d+i|0;if(!Ba){break b}}if(!Ba){i=h-i|0;if(x[a+136>>2]<2){break d}x[g+8>>2]=3792;C[g+16>>3]=h>>>0;h=x[a+104>>2];if(!h){break e}m=g+16|0;t=x[x[h>>2]+24>>2];f=g+8|0}if(!Ba|(s|0)==8){Ea[t|0](h,f,m);q=8;if((Ba|0)==1){break a}}if(!Ba){if(x[a+136>>2]<2){break d}h=x[e>>2];x[g+28>>2]=1745;C[g+16>>3]=d>>>0;C[g+8>>3]=h>>>0;h=x[a+128>>2];if(!h){break e}m=g+16|0;t=g+8|0;u=x[x[h>>2]+24>>2];f=g+28|0}if(!Ba|(s|0)==9){Ea[u|0](h,f,m,t);q=9;if((Ba|0)==1){break a}}if(!Ba){h=d-i|0;if(x[a+136>>2]<2){break c}x[g+28>>2]=5152;C[g+16>>3]=i>>>0;C[g+8>>3]=h>>>0;a=x[a+128>>2];if(!a){break e}m=g+16|0;t=g+8|0;u=x[x[a>>2]+24>>2];f=g+28|0}if(!Ba|(s|0)==10){Ea[u|0](a,f,m,t);q=10;if((Ba|0)==1){break a}}if(!Ba){break c}}if(!Ba){ac();p()}}h=Ba?h:d-i|0}a=Ba?a:(i<<2)+c|0;if(!Ba|(s|0)==11){k=jc(b,a,h);q=11;if((Ba|0)==1){break a}a=k}if(!Ba){a=x[e>>2]+d|0}k=a}if(!Ba){x[e>>2]=k;ya=g+32|0}return}x[x[Ca>>2]>>2]=q;x[Ca>>2]=x[Ca>>2]+4;k=x[Ca>>2];x[k>>2]=a;x[k+4>>2]=b;x[k+8>>2]=c;x[k+12>>2]=d;x[k+16>>2]=e;x[k+20>>2]=f;x[k+24>>2]=g;x[k+28>>2]=h;x[k+32>>2]=i;x[k+36>>2]=m;x[k+40>>2]=t;x[k+44>>2]=u;o(+r);a=j(1)|0;w=k,z=j(0)|0,x[w+48>>2]=z;x[k+52>>2]=a;x[k+56>>2]=v;x[Ca>>2]=x[Ca>>2]+60}function vc(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0,w=0,z=0,A=0,B=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]+-64;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];k=x[b+28>>2];m=x[b+32>>2];i=x[b+36>>2];r=x[b+40>>2];t=x[b+44>>2];u=x[b+48>>2];w=x[b+52>>2];h=x[b+60>>2];q=x[b+56>>2];l(0,q|0);l(1,h|0);z=+n();b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;s=x[x[Ca>>2]>>2]}if(!Ba){g=ya-48|0;ya=g;f=b<<2;r=x[f+x[a+224>>2]>>2];v[d|0]=0;v[c|0]=0;e=y[d|0]}a:{b:{c:{d:{if(!Ba){if(e){break d}z=+(b>>>0)}while(1){e:{if(!Ba|!s){h=wc(a,b);q=0;if((Ba|0)==1){break a}e=h}e=Ba?e:!e;if(e|(Ba|0)==2){if(!Ba){if(x[a+136>>2]<2){break e}x[g+32>>2]=1424;e=x[a+80>>2];if(!e){break c}b=x[x[e>>2]+24>>2];a=g+32|0}if(!Ba|(s|0)==1){Ea[b|0](e,a);q=1;if((Ba|0)==1){break a}}if(!Ba){break e}}if(!Ba){v[c|0]=1;e=!(v[r+100|0]&1)}if((Ba|0)==2|e){if(!Ba){k=x[a+28>>2];h=k;m=x[r>>2];i=x[m+8>>2];f=x[m+12>>2];f:{if((i|0)>(f|0)){e=i-f|0;break f}e=0;if((f|0)<=(i|0)){break f}e=x[m+16>>2]+(i-f|0)|0}if(h>>>0>e>>>0){if(x[r+92>>2]<0){break b}k=x[a+28>>2]}f=x[r>>2];m=x[r+56>>2];i=e>>>0>k>>>0;e=i?k:e}if(!Ba|(s|0)==2){tc(f,m,e);q=2;if((Ba|0)==1){break a}}if(!Ba){f=x[a+36>>2];e=x[r>>2]}if(!Ba|(s|0)==3){uc(e,f);q=3;if((Ba|0)==1){break a}}}if(!Ba){v[g+22|0]=0;f=g+12|0;m=g+22|0;e=g+16|0}if(!Ba|(s|0)==4){h=xc(a,b,e,f,m);q=4;if((Ba|0)==1){break a}e=h}if(!Ba){e=x[a+28>>2];k=x[g+12>>2];f=e>>>0>=k>>>0}g:{if((Ba|0)==2|f){if(!Ba|(s|0)==5){yc(a,b);q=5;if((Ba|0)==1){break a}}if(!Ba){f=y[g+22|0];e=x[g+16>>2]}if(!Ba|(s|0)==6){h=zc(a,b,e,k,f);q=6;if((Ba|0)==1){break a}i=h}if(!Ba){v[d|0]=i;break g}}if(!Ba){m=e>>>2|0;e=x[a+136>>2]>=2}if((Ba|0)==2|e){if(!Ba){x[g+44>>2]=4148;C[g+32>>3]=k>>>0;C[g+24>>3]=m>>>0;e=x[a+128>>2];if(!e){break c}u=g+24|0;w=x[x[e>>2]+24>>2];f=g+44|0;i=g+32|0}if(!Ba|(s|0)==7){Ea[w|0](e,f,i,u);q=7;if((Ba|0)==1){break a}}}if(!Ba){e=!t;if(e){e=x[a+28>>2];t=Mb(e)}}if(!Ba|(s|0)==8){yc(a,b);q=8;if((Ba|0)==1){break a}}if(!Ba){e=x[a+28>>2];h:{if((e|0)<=0){e=y[g+22|0];u=x[g+16>>2];break h}f=x[r+56>>2];i=e<<2;w=lf(t,f,i);e=y[g+22|0];u=x[g+16>>2];lf(f,w,i)}f=k>>>0>m>>>0?m:k;e=(e&255)!=0}if(!Ba|(s|0)==9){h=zc(a,b,u,f,e);q=9;if((Ba|0)==1){break a}i=h}if(!Ba){v[d|0]=i;e=m;f=k>>>0>e>>>0}if((Ba|0)==2|f){while(1){if(!Ba){i=x[a+28>>2];if((i|0)>0){lf(x[r+56>>2],t,i<<2)}i=e+u|0;w=k-e|0;f=e+m|0;e=k>>>0>>0?w:m}if(!Ba|(s|0)==10){h=zc(a,b,i,e,0);q=10;if((Ba|0)==1){break a}i=h}if(!Ba){v[d|0]=i;e=f;f=k>>>0>e>>>0;if(f){continue}}break}}if(!Ba){v[g+22|0]=0}}if(!Ba){x[r+76>>2]=x[r+76>>2]+1;e=x[a+136>>2]<3}i:{if(!Ba){if(e){break i}x[g+44>>2]=1717;C[g+32>>3]=z;C[g+24>>3]=i?1:0;e=x[a+128>>2];if(!e){break c}m=g+32|0;k=g+24|0;f=g+44|0;i=x[x[e>>2]+24>>2]}if(!Ba|(s|0)==11){Ea[i|0](e,f,m,k);q=11;if((Ba|0)==1){break a}}if(!Ba){if(x[a+136>>2]<3){break i}e=x[r+76>>2];x[g+44>>2]=1790;C[g+32>>3]=z;C[g+24>>3]=e>>>0;e=x[a+128>>2];if(!e){break c}m=g+32|0;k=g+24|0;f=g+44|0;i=x[x[e>>2]+24>>2]}if(!Ba|(s|0)==12){Ea[i|0](e,f,m,k);q=12;if((Ba|0)==1){break a}}}if(!Ba){e=!y[d|0];if(e){continue}}}break}if(!Ba){if(!t){break d}zg(t)}}if(!Ba){ya=g+48|0;return}}if(!Ba){ac();p()}}if(!Ba){ca(10435,3563,282,2964);p()}return}x[x[Ca>>2]>>2]=q;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=k;x[h+32>>2]=m;x[h+36>>2]=i;x[h+40>>2]=r;x[h+44>>2]=t;x[h+48>>2]=u;x[h+52>>2]=w;o(+z);a=j(1)|0;A=h,B=j(0)|0,x[A+56>>2]=B;x[h+60>>2]=a;x[Ca>>2]=x[Ca>>2]- -64}function Zb(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,k=0,m=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,D=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-52;f=x[Ca>>2];a=x[f>>2];e=x[f+12>>2];b=x[f+8>>2];l(0,b|0);l(1,e|0);c=+n();h=x[f+16>>2];e=x[f+20>>2];d=x[f+28>>2];b=x[f+24>>2];l(0,b|0);l(1,d|0);k=+n();d=x[f+36>>2];b=x[f+32>>2];l(0,b|0);l(1,d|0);q=+n();m=x[f+40>>2];d=x[f+48>>2];b=x[f+44>>2];l(0,b|0);l(1,d|0);p=+n();b=x[f+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){p=192e3;a:{b:{c:{if(x[b+40>>2]!=1){v=1;e=x[b+32>>2];d:{if(!(c>1)){break d}i=K(+(e|0)/c);if(F(i)<2147483648){e=~~i;break d}e=-2147483648}if((e|0)<=0){break c}p=+(e|0)}k=1;w=1;v=1;y=1;while(1){s=A+y;r=k+t;i=s/r;if(F(c-i)<1e-9){if(p>=r){break a}e=ki;z=e?z:t;w=e?w:y;v=e?k:v;q=e?A:q;k=e?r:k;if(!(p>=k)){break b}A=e?s:A;y=e?y:s;t=e?t:r;if(t<=p){continue}break}break b}w=1}e=F(c-w/z)>3]=c;a=(h|0)/(e|0)|0;x[u+12>>2]=a;e=(f|0)/(e|0)|0;x[u+8>>2]=e;i=+(e|0);p=i/+(a|0);C[u+16>>3]=p;h=(a|0)>(e|0)?a:e;k=+(h|0)/C[b+24>>3];C[u+24>>3]=k;q=i/k;C[u+32>>3]=q;b=x[b+48>>2]>0}g:{if((Ba|0)==2|b){b=Ba?b:m+8|0;if(!Ba|!g){d=Ib(51780,11208,19);f=0;if((Ba|0)==1){break g}h=d}if(!Ba|(g|0)==1){d=Rh(h,c);f=1;if((Ba|0)==1){break g}h=d}if(!Ba|(g|0)==2){d=Ib(h,11242,13);f=2;if((Ba|0)==1){break g}h=d}if(!Ba|(g|0)==3){d=Nh(h,e);f=3;if((Ba|0)==1){break g}h=d}if(!Ba|(g|0)==4){d=Ib(h,10498,1);f=4;if((Ba|0)==1){break g}h=d}if(!Ba|(g|0)==5){d=Nh(h,a);f=5;if((Ba|0)==1){break g}a=d}if(!Ba|(g|0)==6){d=Ib(a,11105,12);f=6;if((Ba|0)==1){break g}a=d}c=Ba?c:p-c;if(!Ba|(g|0)==7){d=Rh(a,c);f=7;if((Ba|0)==1){break g}a=d}if(!Ba){vj(b,x[x[a>>2]-12>>2]+a|0);b=m+8|0}if(!Ba|(g|0)==8){d=il(b,52748);f=8;if((Ba|0)==1){break g}e=d}b=Ba?b:x[x[e>>2]+28>>2];if(!Ba|(g|0)==9){d=Ea[b|0](e,10)|0;f=9;if((Ba|0)==1){break g}e=d}b=Ba?b:m+8|0;if(!Ba|(g|0)==10){Po(b);f=10;if((Ba|0)==1){break g}}if(!Ba|(g|0)==11){Th(a,e);f=11;if((Ba|0)==1){break g}}if(!Ba|(g|0)==12){rh(a);f=12;if((Ba|0)==1){break g}}b=Ba?b:m+12|0;if(!Ba|(g|0)==13){d=Ib(51780,11159,26);f=13;if((Ba|0)==1){break g}a=d}if(!Ba|(g|0)==14){d=Rh(a,k);f=14;if((Ba|0)==1){break g}a=d}if(!Ba|(g|0)==15){d=Ib(a,11667,8);f=15;if((Ba|0)==1){break g}a=d}if(!Ba|(g|0)==16){d=Rh(a,q);f=16;if((Ba|0)==1){break g}a=d}if(!Ba){vj(b,x[x[a>>2]-12>>2]+a|0);b=m+12|0}if(!Ba|(g|0)==17){d=il(b,52748);f=17;if((Ba|0)==1){break g}e=d}b=Ba?b:x[x[e>>2]+28>>2];if(!Ba|(g|0)==18){d=Ea[b|0](e,10)|0;f=18;if((Ba|0)==1){break g}e=d}b=Ba?b:m+12|0;if(!Ba|(g|0)==19){Po(b);f=19;if((Ba|0)==1){break g}}if(!Ba|(g|0)==20){Th(a,e);f=20;if((Ba|0)==1){break g}}if(!Ba|(g|0)==21){rh(a);f=21;if((Ba|0)==1){break g}}}if(!Ba){ya=m+16|0}return}x[x[Ca>>2]>>2]=f;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;o(+c);a=j(1)|0;B=d,D=j(0)|0,x[B+8>>2]=D;x[d+12>>2]=a;x[d+16>>2]=h;x[d+20>>2]=e;o(+k);a=j(1)|0;B=d,D=j(0)|0,x[B+24>>2]=D;x[d+28>>2]=a;o(+q);a=j(1)|0;B=d,D=j(0)|0,x[B+32>>2]=D;x[d+36>>2]=a;x[d+40>>2]=m;o(+p);a=j(1)|0;B=d,D=j(0)|0,x[B+44>>2]=D;x[d+48>>2]=a;x[Ca>>2]=x[Ca>>2]+52}function xb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0,w=0,z=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-52;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+16>>2];e=x[b+12>>2];l(0,e|0);l(1,d|0);g=+n();d=x[b+24>>2];e=x[b+20>>2];l(0,e|0);l(1,d|0);k=+n();d=x[b+32>>2];e=x[b+28>>2];l(0,e|0);l(1,d|0);r=+n();d=x[b+40>>2];e=x[b+36>>2];l(0,e|0);l(1,d|0);f=+n();d=x[b+48>>2];e=x[b+44>>2];l(0,e|0);l(1,d|0);q=+n();b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;s=x[x[Ca>>2]>>2]}t=Ba?t:x[a+60>>2];a:{b:{if(!Ba){c:{d:{e:{f:{g:{h:{i:{switch(t|0){case 0:if(!y[48600]){v[48600]=1;x[12148]=-135762416;x[12149]=1073125824}if(!y[48616]){v[48616]=1;x[12152]=-500134854;x[12153]=1044740494}e=x[a+28>>2];i=0;if((e|0)<=0){break e}u=x[a+32>>2];f=C[6074];g=C[6076];c=1;while(1){d=c;c=d<<3;k=C[c+b>>3];i=C[c+u>>3];j:{if(i>g){i=k/i;break j}i=0;if(!(g>2];f=0;if((e|0)<=0){break g}u=x[a+32>>2];i=C[6074];g=C[6076];c=1;while(1){d=c;c=d<<3;k=C[c+b>>3];f=C[c+u>>3];k:{if(f>g){f=k/f;break k}f=0;if(!(g=i)+m|0;if((d|0)!=(e|0)){continue}break};break h;case 2:break i;default:break c}}c=0;d=x[a+48>>2];if((d|0)<0){break c}h=d+1|0;m=h&3;if(d>>>0>=3){d=h&-4;h=0;while(1){e=c|3;i=C[(e<<3)+b>>3]*+(e|0);e=c|2;f=C[(e<<3)+b>>3]*+(e|0);e=c|1;q=C[(e<<3)+b>>3]*+(e|0);f=f+(q+(C[(c<<3)+b>>3]*+(c|0)+g));g=i+f;c=c+4|0;h=h+4|0;if((d|0)!=(h|0)){continue}break}}if(!m){break d}h=0;while(1){f=+(c|0);g=C[(c<<3)+b>>3]*f+g;c=c+1|0;h=h+1|0;if((m|0)!=(h|0)){continue}break}break d}f=+(m|0)}if((e|0)>=0){lf(x[a+32>>2],b,(e<<3)+8|0)}g=0;i=f;f=+(h|0);k=h?i/f:0;c=0;d=x[a+48>>2];if((d|0)<0){break d}h=d+1|0;m=h&3;if(d>>>0>=3){d=h&-4;h=0;while(1){e=c|3;i=C[(e<<3)+b>>3]*+(e|0);e=c|2;f=C[(e<<3)+b>>3]*+(e|0);e=c|1;q=C[(e<<3)+b>>3]*+(e|0);f=f+(q+(C[(c<<3)+b>>3]*+(c|0)+g));g=i+f;c=c+4|0;h=h+4|0;if((d|0)!=(h|0)){continue}break}}if(!m){break d}h=0;while(1){f=+(c|0);g=C[(c<<3)+b>>3]*f+g;c=c+1|0;h=h+1|0;if((m|0)!=(h|0)){continue}break}break d}i=+(m|0)}if((e|0)>=0){lf(x[a+32>>2],b,(e<<3)+8|0)}g=0;if(!h){k=0;break d}k=i/+(h|0)}if(!t){break b}}r=C[a+64>>3];b=x[a+52>>2];c=x[x[b>>2]+12>>2]}if(!Ba|!s){Ea[c|0](b,g);d=0;if((Ba|0)==1){break a}}if(!Ba){r=g-r;b=x[a+56>>2];c=x[x[b>>2]+12>>2]}if(!Ba|(s|0)==1){Ea[c|0](b,r);d=1;if((Ba|0)==1){break a}}if(!Ba){b=x[a+52>>2];c=x[x[b>>2]+16>>2]}if(!Ba|(s|0)==2){i=+Ea[c|0](b);d=2;if((Ba|0)==1){break a}f=i}if(!Ba){b=x[a+56>>2];c=x[x[b>>2]+16>>2]}if(!Ba|(s|0)==3){i=+Ea[c|0](b);d=3;if((Ba|0)==1){break a}q=i}if(!Ba){C[a+64>>3]=g;b=x[a+80>>2];f=g-f>0?r-q:0;q=C[a+72>>3];l:{if(f0?(b|0)>3?.5:0:0;b=0;break l}g=0;b=b+1|0}x[a+80>>2]=b;C[a+72>>3]=f;k=k>.35?x[a+60>>2]==1?g>2]>>2]=d;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;o(+g);a=j(1)|0;w=d,z=j(0)|0,x[w+12>>2]=z;x[d+16>>2]=a;o(+k);a=j(1)|0;w=d,z=j(0)|0,x[w+20>>2]=z;x[d+24>>2]=a;o(+r);a=j(1)|0;w=d,z=j(0)|0,x[w+28>>2]=z;x[d+32>>2]=a;o(+f);a=j(1)|0;w=d,z=j(0)|0,x[w+36>>2]=z;x[d+40>>2]=a;o(+q);a=j(1)|0;w=d,z=j(0)|0,x[w+44>>2]=z;x[d+48>>2]=a;x[Ca>>2]=x[Ca>>2]+52;return 0}function yc(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];g=x[b+12>>2];k=x[b+16>>2];r=x[b+20>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;o=x[x[Ca>>2]>>2]}if(!Ba){r=ya-16|0;ya=r;q=x[x[a+224>>2]+(b<<2)>>2];i=x[q+56>>2];k=x[q+60>>2];d=x[a+24>>2];a:{if(d>>>0>=A[a+28>>2]){break a}b=x[a+176>>2];c=x[b+4>>2];if((c|0)<=0){break a}j=x[b+12>>2];h=c&3;b=0;if(c>>>0>=4){l=c&-4;while(1){n=b<<2;c=n+i|0;B[c>>2]=B[j+n>>2]*B[c>>2];f=n|4;c=f+i|0;B[c>>2]=B[f+j>>2]*B[c>>2];f=n|8;c=f+i|0;B[c>>2]=B[f+j>>2]*B[c>>2];f=n|12;c=f+i|0;B[c>>2]=B[f+j>>2]*B[c>>2];b=b+4|0;m=m+4|0;if((l|0)!=(m|0)){continue}break}}if(!h){break a}while(1){c=b<<2;m=c+i|0;B[m>>2]=B[c+j>>2]*B[m>>2];b=b+1|0;e=e+1|0;if((h|0)!=(e|0)){continue}break}}l=0;f=0;a=x[a+172>>2];j=x[a+8>>2];g=(j|0)<=0;b:{if(g){break b}n=x[a+12>>2];c=j&3;a=0;if(j>>>0>=4){m=j&-4;while(1){h=a<<2;b=h+i|0;B[b>>2]=B[h+n>>2]*B[b>>2];e=h|4;b=e+i|0;B[b>>2]=B[e+n>>2]*B[b>>2];e=h|8;b=e+i|0;B[b>>2]=B[e+n>>2]*B[b>>2];e=h|12;b=e+i|0;B[b>>2]=B[e+n>>2]*B[b>>2];a=a+4|0;f=f+4|0;if((m|0)!=(f|0)){continue}break}}g=!c;if(g){break b}while(1){e=a<<2;b=e+i|0;B[b>>2]=B[e+n>>2]*B[b>>2];a=a+1|0;l=l+1|0;g=(c|0)!=(l|0);if(g){continue}break}}c:{if((d|0)==(j|0)){if((d|0)<2){break c}l=(d|0)/2|0;f=i+(l<<2)|0;c=l&3;h=0;a=0;m=l-1|0;if(m>>>0>=3){e=l&-4;b=0;while(1){C[k+(a<<3)>>3]=B[f+(a<<2)>>2];d=a|1;C[k+(d<<3)>>3]=B[f+(d<<2)>>2];d=a|2;C[k+(d<<3)>>3]=B[f+(d<<2)>>2];d=a|3;C[k+(d<<3)>>3]=B[f+(d<<2)>>2];a=a+4|0;b=b+4|0;g=(e|0)!=(b|0);if(g){continue}break}}if(c){while(1){g=k+(a<<3)|0;C[g>>3]=B[f+(a<<2)>>2];a=a+1|0;h=h+1|0;if((c|0)!=(h|0)){continue}break}}c=l&3;f=k+(l<<3)|0;h=0;a=0;if(m>>>0>=3){d=l&-4;e=0;while(1){C[f+(a<<3)>>3]=B[i+(a<<2)>>2];b=a|1;C[f+(b<<3)>>3]=B[i+(b<<2)>>2];b=a|2;C[f+(b<<3)>>3]=B[i+(b<<2)>>2];b=a|3;g=f+(b<<3)|0;C[g>>3]=B[i+(b<<2)>>2];a=a+4|0;e=e+4|0;if((d|0)!=(e|0)){continue}break}}if(!c){break c}while(1){g=f+(a<<3)|0;C[g>>3]=B[i+(a<<2)>>2];a=a+1|0;h=h+1|0;if((c|0)!=(h|0)){continue}break}break c}if((d|0)>0){nf(k,0,d<<3)}a=(j|0)/-2|0;while(1){a=a+d|0;if((a|0)<0){continue}break}g=(j|0)<=0;if(g){break c}c=j&1;f=0;g=(j|0)!=1;if(g){m=j&-2;h=0;while(1){b=k+(a<<3)|0;e=f<<2;C[b>>3]=C[b>>3]+ +B[e+i>>2];a=a+1|0;b=(a|0)!=(d|0)?a:0;a=k+(b<<3)|0;C[a>>3]=C[a>>3]+ +B[i+(e|4)>>2];a=b+1|0;a=(a|0)!=(d|0)?a:0;f=f+2|0;h=h+2|0;g=(m|0)!=(h|0);if(g){continue}break}}if(!c){break c}a=k+(a<<3)|0;C[a>>3]=C[a>>3]+ +B[i+(f<<2)>>2]}b=x[q+8>>2];c=x[q+12>>2];a=x[q+104>>2]}d:{e:{f:{g:{h:{if((Ba|0)==2|k){if(!Ba){if(!b){break h}if(!c){break g}a=x[a>>2];g=x[x[a>>2]+32>>2]}if(!Ba|!o){Ea[g|0](a,k,b,c);e=0;if((Ba|0)==1){break e}}if(!Ba){break f}}if(!Ba|(o|0)==1){d=Jb(51780,5399);e=1;if((Ba|0)==1){break e}a=d}if(!Ba|(o|0)==2){Kb(a);e=2;if((Ba|0)==1){break e}}if(!Ba){break d}}if(!Ba|(o|0)==3){d=Jb(51780,1642);e=3;if((Ba|0)==1){break e}a=d}if(!Ba|(o|0)==4){Kb(a);e=4;if((Ba|0)==1){break e}}if(!Ba){break d}}if(!Ba|(o|0)==5){d=Jb(51780,1675);e=5;if((Ba|0)==1){break e}a=d}if(!Ba|(o|0)==6){Kb(a);e=6;if((Ba|0)==1){break e}}if(!Ba){break d}}if(!Ba){ya=r+16|0}return}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=g;x[d+16>>2]=k;x[d+20>>2]=r;x[Ca>>2]=x[Ca>>2]+24;return}a=nr(4);x[a>>2]=0;$(a|0,12860,0);p()}function sk(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0;s=Ba;j=ya-112|0;ya=j;l=i&2147483647;a:{b:{m=e&2147483647;o=2147418112;n=!(b|c);if(!(d|m?m-o>>>0<2147549184:n)){k=l-o|0;if(!h&(k|0)==-2147418112?f|g:(k|0)==-2147418112&(h|0)!=0|k>>>0>2147549184){break b}}if(!(!d&(m|0)==2147418112?n:m>>>0<2147418112)){h=d;i=e|32768;f=b;g=c;break a}if(!(!h&(l|0)==2147418112?!(f|g):l>>>0<2147418112)){i=i|32768;break a}if(!(b|d|(m^2147418112|c))){k=d;d=!(b^f|d^h|(c^g|e^i^-2147483648));h=d?0:k;i=d?2147450880:e;f=d?0:b;g=d?0:c;break a}o=f|h;if(!(o|(l^2147418112|g))){break a}if(!(b|d|(c|m))){if(g|l|o){break a}f=b&f;g=c&g;h=d&h;i=e&i;break a}if(f|h|(g|l)){break b}f=b;g=c;h=d;i=e;break a}o=(l|0)==(m|0);r=o&(d|0)==(h|0)?(c|0)==(g|0)&b>>>0>>0|c>>>0>>0:o&d>>>0>>0|l>>>0>m>>>0;k=r;m=k?f:b;t=k?g:c;n=k?i:e;u=n;k=k?h:d;n=n&65535;d=r?d:h;e=r?e:i;v=e;q=e>>>16&32767;o=u>>>16&32767;if(!o){e=!(k|n);i=e;l=e?m:k;e=e<<6;i=G(i?t:n);e=e+((i|0)==32?G(l)+32|0:i)|0;Dg(j+96|0,m,t,k,n,e-15|0);if((Ba|0)!=(s|0)){p()}o=16-e|0;t=x[j+100>>2];k=x[j+104>>2];n=x[j+108>>2];m=x[j+96>>2]}f=r?b:f;g=r?c:g;h=d;i=v&65535;if(!q){b=!(d|i);e=b;l=b?f:d;b=b<<6;e=G(e?g:i);b=b+((e|0)==32?G(l)+32|0:e)|0;Dg(j+80|0,f,g,d,i,b-15|0);if((Ba|0)!=(s|0)){p()}q=16-b|0;h=x[j+88>>2];i=x[j+92>>2];g=x[j+84>>2];f=x[j+80>>2]}b=h<<3|g>>>29;c=i<<3|h>>>29|524288;h=k<<3|t>>>29;e=n<<3|k>>>29;k=f<<3;n=g<<3|f>>>29;f=u^v;c:{if((o|0)==(q|0)){break c}d=o-q|0;if(d>>>0>127){b=0;c=0;k=1;n=0;break c}Dg(j- -64|0,k,n,b,c,128-d|0);if((Ba|0)!=(s|0)){p()}Eg(j+48|0,k,n,b,c,d);if((Ba|0)!=(s|0)){p()}k=x[j+48>>2]|(x[j+64>>2]|x[j+72>>2]|(x[j+68>>2]|x[j+76>>2]))!=0;n=x[j+52>>2];b=x[j+56>>2];c=x[j+60>>2]}q=h;r=e|524288;i=t<<3|m>>>29;m=m<<3;l=i;d:{if((f|0)<0){f=0;g=0;h=0;i=0;if(!(k^m|b^q|(l^n|c^r))){break a}d=m-k|0;e=l-((k>>>0>m>>>0)+n|0)|0;f=q-b|0;g=(l|0)==(n|0)&k>>>0>m>>>0|l>>>0>>0;h=f-g|0;b=(r-((b>>>0>q>>>0)+c|0)|0)-(f>>>0>>0)|0;i=b;if(b>>>0>524287){break d}c=!(b|h);g=c;i=c?d:h;c=c<<6;g=G(g?e:b);c=c+((g|0)==32?G(i)+32|0:g)|0;f=b;b=c-12|0;Dg(j+32|0,d,e,h,f,b);if((Ba|0)!=(s|0)){p()}o=o-b|0;h=x[j+40>>2];i=x[j+44>>2];d=x[j+32>>2];e=x[j+36>>2];break d}e=l+n|0;d=k+m|0;e=d>>>0>>0?e+1|0:e;f=(n|0)==(e|0)&d>>>0>>0|e>>>0>>0;l=c+r|0;b=b+q|0;l=b>>>0>>0?l+1|0:l;h=b+f|0;i=h>>>0>>0?l+1|0:l;if(!(i&1048576)){break d}d=k&1|((e&1)<<31|d>>>1);e=h<<31|e>>>1;o=o+1|0;h=(i&1)<<31|h>>>1;i=i>>>1|0}f=0;b=u&-2147483648;k=b;if((o|0)>=32767){h=f;i=b|2147418112;g=0;break a}b=0;e:{if((o|0)>0){b=o;break e}Dg(j+16|0,d,e,h,i,o+127|0);if((Ba|0)!=(s|0)){p()}Eg(j,d,e,h,i,1-o|0);if((Ba|0)!=(s|0)){p()}d=x[j>>2]|(x[j+16>>2]|x[j+24>>2]|(x[j+20>>2]|x[j+28>>2]))!=0;e=x[j+4>>2];h=x[j+8>>2];i=x[j+12>>2]}m=(e&7)<<29|d>>>3;c=h<<29|e>>>3;e=(i&7)<<29|h>>>3;h=i>>>3&65535;l=e|f;i=k|(b<<16|h);e=c;b=d&7;d=b>>>0>4;f=d+m|0;e=d>>>0>f>>>0?e+1|0:e;c=(c|0)==(e|0)&f>>>0>>0|c>>>0>e>>>0;h=c+l|0;i=c>>>0>h>>>0?i+1|0:i;f:{g:{if((b|0)!=4){g=e;break g}b=0;g=e+b|0;e=i;d=f;c=f&1;f=f+c|0;g=d>>>0>f>>>0?g+1|0:g;b=(b|0)==(g|0)&c>>>0>f>>>0|b>>>0>g>>>0;h=b+h|0;i=b>>>0>h>>>0?e+1|0:e;break f}if(!b){break a}}}x[a>>2]=f;x[a+4>>2]=g;x[a+8>>2]=h;x[a+12>>2]=i;ya=j+112|0}function Sb(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;g=g|0;var h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,C=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-52;h=x[Ca>>2];a=x[h>>2];c=x[h+8>>2];d=x[h+12>>2];e=x[h+16>>2];g=x[h+24>>2];b=x[h+20>>2];l(0,b|0);l(1,g|0);f=+n();g=x[h+28>>2];q=x[h+32>>2];i=x[h+36>>2];r=x[h+40>>2];v=x[h+44>>2];u=x[h+48>>2];b=x[h+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;z=x[x[Ca>>2]>>2]}if(!Ba){i=x[a+16>>2];q=(i|0)==1}a:{if((Ba|0)==2|q){if(!Ba){d=x[d>>2];q=x[x[a>>2]+12>>2];b=x[b>>2]}if(!Ba|!z){h=Ea[q|0](a,b,c,d,e,f,g)|0;if((Ba|0)==1){break a}a=h}if(!Ba){return a|0}}if(!Ba){k=D(e,i);h=x[a+20>>2];if((k|0)>(h|0)){m=x[a+8>>2];i=Mb(k);b:{c:{if(!(!h|!m)){h=h>>>0>>0?h:k;if((h|0)<=0){break c}lf(i,m,h<<2);break c}if(!m){break b}}zg(m)}x[a+8>>2]=i;i=x[a+16>>2];x[a+20>>2]=D(i,e)}k=D(c,i);h=x[a+24>>2];if((k|0)>(h|0)){m=x[a+12>>2];i=Mb(k);d:{e:{if(!(!h|!m)){h=h>>>0>>0?h:k;if((h|0)<=0){break e}lf(i,m,h<<2);break e}if(!m){break d}}zg(m)}x[a+12>>2]=i;i=x[a+16>>2];x[a+24>>2]=D(i,c)}r=x[a+8>>2];f:{g:{switch(i-1|0){case 1:if((e|0)<=0){break f}k=e&1;w=x[d+4>>2];t=x[d>>2];d=0;if((e|0)!=1){u=e&-2;while(1){m=d<<2;h=s<<2;B[m+r>>2]=B[h+t>>2];B[(m|4)+r>>2]=B[h+w>>2];i=(m|8)+r|0;h=h|4;B[i>>2]=B[h+t>>2];B[(m|12)+r>>2]=B[h+w>>2];s=s+2|0;d=d+4|0;v=v+2|0;if((u|0)!=(v|0)){continue}break}}if(!k){break f}h=d<<2;d=s<<2;B[h+r>>2]=B[d+t>>2];B[(h|4)+r>>2]=B[d+w>>2];break f;default:if((e|0)<=0){break f}w=r+4|0;t=i&-2;m=i&1;q=0;while(1){h:{if((i|0)<=0){break h}s=0;y=0;if((i|0)!=1){while(1){k=q<<2;v=u<<2;h=s<<2;B[k+r>>2]=B[v+x[h+d>>2]>>2];B[k+w>>2]=B[x[(h|4)+d>>2]+v>>2];s=s+2|0;q=q+2|0;y=y+2|0;if((t|0)!=(y|0)){continue}break}}if(!m){break h}B[(q<<2)+r>>2]=B[x[(s<<2)+d>>2]+(u<<2)>>2];q=q+1|0}u=u+1|0;if((u|0)!=(e|0)){continue}break};break f;case 0:break g}}if((e|0)<=0){break f}lf(r,x[d>>2],e<<2)}q=x[x[a>>2]+12>>2];d=x[a+12>>2]}if(!Ba|(z|0)==1){h=Ea[q|0](a,d,c,r,e,f,g)|0;k=1;if((Ba|0)==1){break a}i=h}if(!Ba){t=x[a+12>>2];i:{j:{k:{l:{m=x[a+16>>2];switch(m-1|0){case 0:break j;case 1:break l;default:break k}}if((i|0)<=0){break i}c=i&1;k=x[b+4>>2];h=x[b>>2];s=0;d=0;if((i|0)!=1){b=i&-2;e=0;while(1){a=s<<2;g=d<<2;B[a+h>>2]=B[g+t>>2];B[a+k>>2]=B[t+(g|4)>>2];a=a|4;B[a+h>>2]=B[t+(g|8)>>2];B[a+k>>2]=B[t+(g|12)>>2];s=s+2|0;d=d+4|0;e=e+2|0;if((b|0)!=(e|0)){continue}break}}if(!c){break i}b=s<<2;a=d<<2;B[b+h>>2]=B[a+t>>2];B[b+k>>2]=B[t+(a|4)>>2];return i|0}if((i|0)<=0){break i}k=t+4|0;h=m&-2;g=m&1;r=0;q=0;while(1){m:{if((m|0)<=0){break m}s=0;d=0;if((m|0)!=1){while(1){c=r<<2;e=s<<2;a=q<<2;B[c+x[e+b>>2]>>2]=B[a+t>>2];B[c+x[(e|4)+b>>2]>>2]=B[a+k>>2];s=s+2|0;q=q+2|0;d=d+2|0;if((h|0)!=(d|0)){continue}break}}if(!g){break m}B[x[(s<<2)+b>>2]+(r<<2)>>2]=B[t+(q<<2)>>2];q=q+1|0}r=r+1|0;if((r|0)!=(i|0)){continue}break}break i}if((i|0)<=0){break i}lf(x[b>>2],t,i<<2)}return i|0}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;o(+f);a=j(1)|0;A=h,C=j(0)|0,x[A+20>>2]=C;x[h+24>>2]=a;x[h+28>>2]=g;x[h+32>>2]=q;x[h+36>>2]=i;x[h+40>>2]=r;x[h+44>>2]=v;x[h+48>>2]=u;x[Ca>>2]=x[Ca>>2]+52;return 0}function Tb(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;g=g|0;var h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0,w=0,z=0,A=E(0),G=0,H=0,I=E(0),K=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-60;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];h=x[b+24>>2];t=x[b+20>>2];l(0,t|0);l(1,h|0);f=+n();h=x[b+28>>2];i=x[b+32>>2];r=x[b+36>>2];u=x[b+40>>2];t=x[b+44>>2];w=x[b+48>>2];s=x[b+52>>2];z=x[b+56>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;k=x[x[Ca>>2]>>2]}if(!Ba){t=b;w=d;s=g;d=0;r=ya-16|0;ya=r;i=x[a+4>>2];q=ag(C[i+56>>3]/1e3);a:{if(F(q)<2147483648){a=~~q;break a}a=-2147483648}b=(a|0)<=6?6:a;q=J(+(e|0)*f);b:{if(F(q)<2147483648){a=~~q;break b}a=-2147483648}h=(((a|0)<(c|0)?a:c)|0)/2|0;u=(b|0)<(h|0)?b:h;b=x[i+280>>2];a=!y[i+308|0]}c:{d:{if((Ba|0)==2|a){a=Ba?a:x[i+284>>2];if(!Ba|!k){Ub(i,b,f,a);if((Ba|0)==1){break c}}if(!Ba){v[i+308|0]=1;break d}}if(!Ba){a=C[b>>3]==f;if(a){break d}h=x[i+284>>2];x[i+280>>2]=h;x[i+284>>2]=b}if(!Ba|(k|0)==1){Ub(i,h,f,b);m=1;if((Ba|0)==1){break c}}if(!Ba){if(x[i+44>>2]){break d}a=x[i+48>>2]>0}if((Ba|0)==2|a){a=Ba?a:r+12|0;if(!Ba|(k|0)==2){g=Ib(51780,11414,53);m=2;if((Ba|0)==1){break c}b=g}if(!Ba|(k|0)==3){g=Nh(b,u);m=3;if((Ba|0)==1){break c}b=g}if(!Ba){vj(a,x[x[b>>2]-12>>2]+b|0);a=r+12|0}if(!Ba|(k|0)==4){g=il(a,52748);m=4;if((Ba|0)==1){break c}h=g}a=Ba?a:x[x[h>>2]+28>>2];if(!Ba|(k|0)==5){g=Ea[a|0](h,10)|0;m=5;if((Ba|0)==1){break c}h=g}a=Ba?a:r+12|0;if(!Ba|(k|0)==6){Po(a);m=6;if((Ba|0)==1){break c}}if(!Ba|(k|0)==7){Th(b,h);m=7;if((Ba|0)==1){break c}}if(!Ba|(k|0)==8){rh(b);m=8;if((Ba|0)==1){break c}}}if(!Ba){x[i+288>>2]=u}}if(!Ba){a=x[i+64>>2];g=D(a,c);e:{if((g|0)<=0){break e}e=D(a,e);a=x[i+280>>2];m=x[a+84>>2]-x[a+80>>2]>>2;b=0;f:{while(1){k=x[i+280>>2];g:{if((b|0)>=(e|0)){a=x[k+100>>2];break g}c=x[k+100>>2];a=(c|0)>(m|0)?c:m;while(1){if((a|0)==(c|0)){break g}A=B[(b<<2)+w>>2];h=c+1|0;x[k+100>>2]=h;B[x[k+80>>2]+(c<<2)>>2]=A;c=h;b=b+1|0;if((e|0)!=(b|0)){continue}break}a=h;b=e}h:{if((a|0)==(m|0)){break h}if(!s){break f}c=x[k+96>>2];if((c|0)<(a|0)){break h}if(x[k+44>>2]==x[k+40>>2]|(a|0)!=(c|0)){break f}}H=(d<<2)+t|0,I=E(Vb(i,k)),B[H>>2]=I;d=d+1|0;if((g|0)!=(d|0)){continue}break}d=g}if(!d){break e}h=x[i+284>>2];s=x[h+84>>2]-x[h+80>>2]>>2;c=x[i+288>>2];f=+(u|0);b=0;k=0;while(1){i:{if((c|0)<=0){break i}j:{if((b|0)>=(e|0)){a=x[h+100>>2];break j}c=x[h+100>>2];a=(c|0)>(s|0)?c:s;while(1){if((a|0)==(c|0)){break j}A=B[(b<<2)+w>>2];g=c+1|0;x[h+100>>2]=g;B[x[h+80>>2]+(c<<2)>>2]=A;c=g;b=b+1|0;if((e|0)!=(b|0)){continue}break}a=g;b=e}if((a|0)!=(s|0)){break i}g=(k<<2)+t|0;G=Vb(i,h);c=x[i+288>>2];a=c-1|0;q=(1-gf(+(a|0)/f*3.141592653589793))*.5;B[g>>2]=G*q+(1-q)*+B[g>>2];h=x[i+284>>2];if(!x[h+48>>2]){x[i+288>>2]=a;c=a}k=k+1|0;if((k|0)!=(d|0)){continue}}break}z=d}ya=r+16|0;return(z|0)/x[i+64>>2]|0}p()}x[x[Ca>>2]>>2]=m;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;o(+f);a=j(1)|0;H=g,K=j(0)|0,x[H+20>>2]=K;x[g+24>>2]=a;x[g+28>>2]=h;x[g+32>>2]=i;x[g+36>>2]=r;x[g+40>>2]=u;x[g+44>>2]=t;x[g+48>>2]=w;x[g+52>>2]=s;x[g+56>>2]=z;x[Ca>>2]=x[Ca>>2]+60;return 0}function Zf(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,D=0,E=0,G=0,H=0;h=Ba;t=ya-16|0;ya=t;i=vf(a);if((Ba|0)!=(h|0)){p()}o(+b);f=j(1)|0;e=j(0)|0;o(+a);g=j(1)|0;d=j(0)|0;m=vf(b);if((Ba|0)!=(h|0)){p()}w=m&2047;y=w-1086|0;a:{b:{if(y>>>0>4294967167&i-2047>>>0>=4294965250){break b}v=_f(e,f);if((Ba|0)!=(h|0)){p()}if(v){c=1;if(!d&(g|0)==1072693248){break a}i=e;e=f<<1|e>>>31;i=i<<1;if(!(e|i)){break a}i=!i&(e|0)==-2097152|e>>>0<4292870144;e=g<<1|d>>>31;d=d<<1;if(!(i&(!d&(e|0)==-2097152|e>>>0<4292870144))){c=a+b;break a}if(!d&(e|0)==2145386496){break a}c=(f|0)<0^e>>>0<2145386496?0:b*b;break a}v=_f(d,g);if((Ba|0)!=(h|0)){p()}if(v){c=a*a;if((g|0)<0){a=-c;d=$f(e,f);if((Ba|0)!=(h|0)){p()}c=(d|0)==1?a:c}if((f|0)>0|(f|0)>=0){break a}c=rf(1/c);if((Ba|0)!=(h|0)){p()}break a}if((g|0)<0){d=$f(e,f);if((Ba|0)!=(h|0)){p()}if(!d){c=Hf(a);if((Ba|0)!=(h|0)){p()}break a}i=i&2047;u=((d|0)==1)<<18;o(+a);g=j(1)|0;d=j(0)|0;g=g&2147483647}if(y>>>0<=4294967167){c=1;e=(g|0)==1072693248;if(e&!d){break a}if(w>>>0<=957){c=((d|0)!=0&e|g>>>0>1072693248?b:-b)+1;break a}if(((g|0)==1072693248&(d|0)!=0|g>>>0>1072693248)!=(m>>>0>2047|0)){c=tf(0);if((Ba|0)!=(h|0)){p()}break a}c=sf(0);if((Ba|0)!=(h|0)){p()}break a}if(i){break b}o(+(a*4503599627370496));g=j(1)|0;d=j(0)|0;g=(g&2147483647)-54525952|0}l(0,e&-134217728);l(1,f|0);z=+n();f=g-1072076117|0;i=f;q=+(f>>20);e=(f>>>13&127)<<5;D=q*C[3361]+C[e+26976>>3];m=0;f=d-m|0;d=g-((i&-1048576)+(d>>>0>>0)|0)|0;l(0,0);l(1,(f- -2147483648>>>0<2147483648?d+1|0:d)|0);a=+n();k=C[e+26952>>3];c=a*k+-1;l(0,f|0);l(1,d|0);A=(+n()-a)*k;a=c+A;r=C[3362];k=a*r;B=q*C[3360]+C[e+26968>>3];q=a+B;s=c;c=c*r;s=s*c;r=q+s;s=D+(a+(B-q))+A*(k+c)+(s+(q-r));c=a*k;a=s+a*c*(c*(c*(a*C[3368]+C[3367])+(a*C[3366]+C[3365]))+(a*C[3364]+C[3363]));c=r+a;C[t+8>>3]=a+(r-c);o(+c);d=j(1)|0;l(0,j(0)&-134217728);l(1,d|0);k=+n();a=z*k;b=(b-z)*k+(C[t+8>>3]+(c-k))*b;d=vf(a);if((Ba|0)!=(h|0)){p()}f=d&2047;d=vf(5551115123125783e-32);if((Ba|0)!=(h|0)){p()}g=f-d|0;e=vf(512);if((Ba|0)!=(h|0)){p()}c:{d:{if(e-d>>>0>g>>>0){break d}if(d>>>0>f>>>0){a=a+1;c=u?-a:a;break c}d=vf(1024);if((Ba|0)!=(h|0)){p()}d=d>>>0>f>>>0;f=0;if(d){break d}o(+a);d=j(1)|0;j(0)|0;if((d|0)<0){c=sf(u);if((Ba|0)!=(h|0)){p()}break c}c=tf(u);if((Ba|0)!=(h|0)){p()}break c}c=C[2525];k=C[2524]*a+c;c=k-c;a=c*C[2527]+(c*C[2526]+a)+b;b=a*a;c=b*b*(a*C[2531]+C[2530]);b=b*(a*C[2529]+C[2528]);o(+k);j(1)|0;g=j(0)|0;e=g<<4&2032;a=c+(b+(C[e+20304>>3]+a));e=e+20312|0;i=x[e>>2];e=x[e+4>>2];m=g+u|0;d=i;i=m<<13;m=0;d=d+m|0;e=e+i|0;e=d>>>0>>0?e+1|0:e;if(!f){e:{if(!(g&-2147483648)){l(0,d|0);l(1,e-1058013184|0);b=+n();c=(b*a+b)*5486124068793689e288;break e}l(0,d|0);f=e+1071644672|0;l(1,f|0);b=+n();k=b*a;a=k+b;if(F(a)<1){c=rf(22250738585072014e-324);if((Ba|0)!=(h|0)){p()}xf(c*22250738585072014e-324);if((Ba|0)!=(h|0)){p()}l(0,0);l(1,f&-2147483648);c=a<0?-1:1;q=a+c;a=q+(k+(b-a)+(a+(c-q)))-c;a=(E=+n(),G=a,H=a==0,H?E:G)}c=a*22250738585072014e-324}break c}l(0,d|0);l(1,e|0);b=+n();c=b*a+b}}ya=t+16|0;return c}function qo(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-108;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];i=x[b+32>>2];k=x[b+36>>2];l=x[b+40>>2];m=x[b+44>>2];q=x[b+48>>2];r=x[b+52>>2];s=x[b+56>>2];t=x[b+60>>2];u=x[b+64>>2];v=x[b+68>>2];w=x[b+72>>2];z=x[b+76>>2];A=x[b+80>>2];B=x[b+84>>2];C=x[b+88>>2];D=x[b+92>>2];E=x[b+96>>2];F=x[b+100>>2];G=x[b+104>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;n=x[x[Ca>>2]>>2]}if(!Ba){a=ya-1056|0;ya=a;x[a+16>>2]=f;x[a+20>>2]=g;x[a+24>>2]=h;x[a+28>>2]=i;m=a+944|0;x[a+940>>2]=m;k=a+16|0}a:{if(!Ba|!n){j=Sk(m,k);if((Ba|0)==1){break a}l=j}if(!Ba){x[a+528>>2]=267;r=a+528|0;C=kl(a+520|0,0,r);x[a+528>>2]=267;m=a+512|0;t=kl(m,0,r);k=l>>>0>=100}b:{if((Ba|0)==2|k){if(!Ba){l=Ol();x[a>>2]=f;x[a+4>>2]=g;x[a+8>>2]=h;x[a+12>>2]=i;k=a+940|0}if(!Ba|(n|0)==1){j=Fm(k,l,6714,a);o=1;if((Ba|0)==1){break a}l=j}if(!Ba){if((l|0)==-1){break b}k=x[a+940>>2]}if(!Ba|(n|0)==2){ll(C,k);o=2;if((Ba|0)==1){break a}}if(!Ba){k=yg(l<<2)}if(!Ba|(n|0)==3){ll(t,k);o=3;if((Ba|0)==1){break a}}if(!Ba){k=Mh(t);if(k){break b}r=x[t>>2]}}if(!Ba){k=a+508|0;vj(k,d)}if(!Ba|(n|0)==4){j=bi(k);o=4;if((Ba|0)==1){break a}D=j}if(!Ba){q=x[a+940>>2];k=q+l|0}if(!Ba|(n|0)==5){jm(D,q,k,r);o=5;if((Ba|0)==1){break a}}if(!Ba){u=(l|0)>0?y[x[a+940>>2]]==45:u;v=a+508|0;w=a+504|0;z=a+500|0;m=a+496|0;A=ji(a+484|0);q=ji(a+472|0);s=ji(a+460|0);k=a+456|0}if(!Ba|(n|0)==6){ro(c,u,v,w,z,m,A,q,s,k);o=6;if((Ba|0)==1){break a}}if(!Ba){x[a+48>>2]=267;B=kl(a+40|0,0,a+48|0);c=x[a+456>>2];c:{if((c|0)<(l|0)){c=ui(s)+(l-c<<1)|0;c=ui(q)+c|0;k=(c+x[a+456>>2]|0)+1|0;break c}c=ui(s);c=ui(q)+c|0;k=(c+x[a+456>>2]|0)+2|0}m=k>>>0>=101;c=a+48|0}if((Ba|0)==2|m){if(!Ba){c=yg(k<<2)}if(!Ba|(n|0)==7){ll(B,c);o=7;if((Ba|0)==1){break a}}if(!Ba){c=x[B>>2];k=!c;if(k){break b}}}if(!Ba){E=a+36|0;F=a+32|0;G=x[d+4>>2];v=(l<<2)+r|0;w=a+504|0;z=x[a+500>>2];m=x[a+496>>2];k=x[a+456>>2]}if(!Ba|(n|0)==8){so(c,E,F,G,r,v,D,u,w,z,m,A,q,s,k);o=8;if((Ba|0)==1){break a}}if(!Ba){m=x[a+36>>2];k=x[a+32>>2]}if(!Ba|(n|0)==9){j=Qm(b,c,m,k,d,e);o=9;if((Ba|0)==1){break a}l=j}if(!Ba|(n|0)==10){pl(B);o=10;if((Ba|0)==1){break a}}if(!Ba){lr(s);lr(q);hr(A);b=a+508|0}if(!Ba|(n|0)==11){Po(b);o=11;if((Ba|0)==1){break a}}if(!Ba|(n|0)==12){pl(t);o=12;if((Ba|0)==1){break a}}if(!Ba|(n|0)==13){pl(C);o=13;if((Ba|0)==1){break a}}if(!Ba){ya=a+1056|0;return l|0}}if(!Ba){Ji();p()}p()}x[x[Ca>>2]>>2]=o;x[Ca>>2]=x[Ca>>2]+4;j=x[Ca>>2];x[j>>2]=a;x[j+4>>2]=b;x[j+8>>2]=c;x[j+12>>2]=d;x[j+16>>2]=e;x[j+20>>2]=f;x[j+24>>2]=g;x[j+28>>2]=h;x[j+32>>2]=i;x[j+36>>2]=k;x[j+40>>2]=l;x[j+44>>2]=m;x[j+48>>2]=q;x[j+52>>2]=r;x[j+56>>2]=s;x[j+60>>2]=t;x[j+64>>2]=u;x[j+68>>2]=v;x[j+72>>2]=w;x[j+76>>2]=z;x[j+80>>2]=A;x[j+84>>2]=B;x[j+88>>2]=C;x[j+92>>2]=D;x[j+96>>2]=E;x[j+100>>2]=F;x[j+104>>2]=G;x[Ca>>2]=x[Ca>>2]+108;return 0}function ko(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,w=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-108;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];i=x[b+32>>2];k=x[b+36>>2];l=x[b+40>>2];m=x[b+44>>2];q=x[b+48>>2];r=x[b+52>>2];s=x[b+56>>2];t=x[b+60>>2];u=x[b+64>>2];w=x[b+68>>2];z=x[b+72>>2];A=x[b+76>>2];B=x[b+80>>2];C=x[b+84>>2];D=x[b+88>>2];E=x[b+92>>2];F=x[b+96>>2];G=x[b+100>>2];H=x[b+104>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;n=x[x[Ca>>2]>>2]}if(!Ba){a=ya-448|0;ya=a;x[a+16>>2]=f;x[a+20>>2]=g;x[a+24>>2]=h;x[a+28>>2]=i;m=a+336|0;x[a+332>>2]=m;k=a+16|0}a:{if(!Ba|!n){j=Sk(m,k);if((Ba|0)==1){break a}l=j}if(!Ba){x[a+224>>2]=267;r=a+224|0;D=kl(a+216|0,0,r);x[a+224>>2]=267;m=a+208|0;t=kl(m,0,r);k=l>>>0>=100}b:{if((Ba|0)==2|k){if(!Ba){l=Ol();x[a>>2]=f;x[a+4>>2]=g;x[a+8>>2]=h;x[a+12>>2]=i;k=a+332|0}if(!Ba|(n|0)==1){j=Fm(k,l,6714,a);o=1;if((Ba|0)==1){break a}l=j}if(!Ba){if((l|0)==-1){break b}k=x[a+332>>2]}if(!Ba|(n|0)==2){ll(D,k);o=2;if((Ba|0)==1){break a}}if(!Ba){k=yg(l)}if(!Ba|(n|0)==3){ll(t,k);o=3;if((Ba|0)==1){break a}}if(!Ba){k=Mh(t);if(k){break b}r=x[t>>2]}}if(!Ba){k=a+204|0;vj(k,d)}if(!Ba|(n|0)==4){j=sh(k);o=4;if((Ba|0)==1){break a}E=j}if(!Ba){q=x[a+332>>2];k=q+l|0}if(!Ba|(n|0)==5){Nl(E,q,k,r);o=5;if((Ba|0)==1){break a}}if(!Ba){u=(l|0)>0?y[x[a+332>>2]]==45:u;w=a+204|0;z=a+200|0;A=a+199|0;m=a+198|0;B=ji(a+184|0);q=ji(a+172|0);s=ji(a+160|0);k=a+156|0}if(!Ba|(n|0)==6){lo(c,u,w,z,A,m,B,q,s,k);o=6;if((Ba|0)==1){break a}}if(!Ba){x[a+48>>2]=267;C=kl(a+40|0,0,a+48|0);c=x[a+156>>2];c:{if((c|0)<(l|0)){c=ui(s)+(l-c<<1)|0;c=ui(q)+c|0;k=(c+x[a+156>>2]|0)+1|0;break c}c=ui(s);c=ui(q)+c|0;k=(c+x[a+156>>2]|0)+2|0}m=k>>>0>=101;c=a+48|0}if((Ba|0)==2|m){if(!Ba){c=yg(k)}if(!Ba|(n|0)==7){ll(C,c);o=7;if((Ba|0)==1){break a}}if(!Ba){c=x[C>>2];k=!c;if(k){break b}}}if(!Ba){F=a+36|0;G=a+32|0;H=x[d+4>>2];w=l+r|0;z=a+200|0;A=v[a+199|0];m=v[a+198|0];k=x[a+156>>2]}if(!Ba|(n|0)==8){mo(c,F,G,H,r,w,E,u,z,A,m,B,q,s,k);o=8;if((Ba|0)==1){break a}}if(!Ba){m=x[a+36>>2];k=x[a+32>>2]}if(!Ba|(n|0)==9){j=zm(b,c,m,k,d,e);o=9;if((Ba|0)==1){break a}l=j}if(!Ba|(n|0)==10){pl(C);o=10;if((Ba|0)==1){break a}}if(!Ba){hr(s);hr(q);hr(B);b=a+204|0}if(!Ba|(n|0)==11){Po(b);o=11;if((Ba|0)==1){break a}}if(!Ba|(n|0)==12){pl(t);o=12;if((Ba|0)==1){break a}}if(!Ba|(n|0)==13){pl(D);o=13;if((Ba|0)==1){break a}}if(!Ba){ya=a+448|0;return l|0}}if(!Ba){Ji();p()}p()}x[x[Ca>>2]>>2]=o;x[Ca>>2]=x[Ca>>2]+4;j=x[Ca>>2];x[j>>2]=a;x[j+4>>2]=b;x[j+8>>2]=c;x[j+12>>2]=d;x[j+16>>2]=e;x[j+20>>2]=f;x[j+24>>2]=g;x[j+28>>2]=h;x[j+32>>2]=i;x[j+36>>2]=k;x[j+40>>2]=l;x[j+44>>2]=m;x[j+48>>2]=q;x[j+52>>2]=r;x[j+56>>2]=s;x[j+60>>2]=t;x[j+64>>2]=u;x[j+68>>2]=w;x[j+72>>2]=z;x[j+76>>2]=A;x[j+80>>2]=B;x[j+84>>2]=C;x[j+88>>2]=D;x[j+92>>2]=E;x[j+96>>2]=F;x[j+100>>2]=G;x[j+104>>2]=H;x[Ca>>2]=x[Ca>>2]+108;return 0}function zg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;a:{if(!a){break a}d=a-8|0;b=x[a-4>>2];a=b&-8;f=d+a|0;b:{if(b&1){break b}if(!(b&3)){break a}b=x[d>>2];d=d-b|0;if(d>>>0>>0<=255){e=b>>>3|0;b=x[d+12>>2];c=x[d+8>>2];if((b|0)==(c|0)){i=49896,j=x[12474]&Js(e),x[i>>2]=j;break b}x[c+12>>2]=b;x[b+8>>2]=c;break b}h=x[d+24>>2];b=x[d+12>>2];if((b|0)!=(d|0)){c=x[d+8>>2];x[c+12>>2]=b;x[b+8>>2]=c;break c}e=d+20|0;c=x[e>>2];if(!c){c=x[d+16>>2];if(!c){break d}e=d+16|0}while(1){g=e;b=c;e=b+20|0;c=x[e>>2];if(c){continue}e=b+16|0;c=x[b+16>>2];if(c){continue}break}x[g>>2]=0;break c}b=x[f+4>>2];if((b&3)!=3){break b}x[12476]=a;x[f+4>>2]=b&-2;x[d+4>>2]=a|1;x[f>>2]=a;return}b=0}if(!h){break b}c=x[d+28>>2];e=(c<<2)+50200|0;e:{if(x[e>>2]==(d|0)){x[e>>2]=b;if(b){break e}i=49900,j=x[12475]&Js(c),x[i>>2]=j;break b}x[h+(x[h+16>>2]==(d|0)?16:20)>>2]=b;if(!b){break b}}x[b+24>>2]=h;c=x[d+16>>2];if(c){x[b+16>>2]=c;x[c+24>>2]=b}c=x[d+20>>2];if(!c){break b}x[b+20>>2]=c;x[c+24>>2]=b}if(d>>>0>=f>>>0){break a}b=x[f+4>>2];if(!(b&1)){break a}f:{g:{h:{i:{if(!(b&2)){if((f|0)==x[12480]){x[12480]=d;a=x[12477]+a|0;x[12477]=a;x[d+4>>2]=a|1;if(x[12479]!=(d|0)){break a}x[12476]=0;x[12479]=0;return}if((f|0)==x[12479]){x[12479]=d;a=x[12476]+a|0;x[12476]=a;x[d+4>>2]=a|1;x[a+d>>2]=a;return}a=(b&-8)+a|0;if(b>>>0<=255){e=b>>>3|0;b=x[f+12>>2];c=x[f+8>>2];if((b|0)==(c|0)){i=49896,j=x[12474]&Js(e),x[i>>2]=j;break g}x[c+12>>2]=b;x[b+8>>2]=c;break g}h=x[f+24>>2];b=x[f+12>>2];if((f|0)!=(b|0)){c=x[f+8>>2];x[c+12>>2]=b;x[b+8>>2]=c;break h}e=f+20|0;c=x[e>>2];if(!c){c=x[f+16>>2];if(!c){break i}e=f+16|0}while(1){g=e;b=c;e=b+20|0;c=x[e>>2];if(c){continue}e=b+16|0;c=x[b+16>>2];if(c){continue}break}x[g>>2]=0;break h}x[f+4>>2]=b&-2;x[d+4>>2]=a|1;x[a+d>>2]=a;break f}b=0}if(!h){break g}c=x[f+28>>2];e=(c<<2)+50200|0;j:{if((f|0)==x[e>>2]){x[e>>2]=b;if(b){break j}i=49900,j=x[12475]&Js(c),x[i>>2]=j;break g}x[h+((f|0)==x[h+16>>2]?16:20)>>2]=b;if(!b){break g}}x[b+24>>2]=h;c=x[f+16>>2];if(c){x[b+16>>2]=c;x[c+24>>2]=b}c=x[f+20>>2];if(!c){break g}x[b+20>>2]=c;x[c+24>>2]=b}x[d+4>>2]=a|1;x[a+d>>2]=a;if(x[12479]!=(d|0)){break f}x[12476]=a;return}if(a>>>0<=255){b=(a&-8)+49936|0;c=x[12474];a=1<<(a>>>3);k:{if(!(c&a)){x[12474]=a|c;a=b;break k}a=x[b+8>>2]}x[b+8>>2]=d;x[a+12>>2]=d;x[d+12>>2]=b;x[d+8>>2]=a;return}c=31;if(a>>>0<=16777215){b=G(a>>>8|0);c=((a>>>38-b&1)-(b<<1)|0)+62|0}x[d+28>>2]=c;x[d+16>>2]=0;x[d+20>>2]=0;b=(c<<2)+50200|0;l:{m:{e=x[12475];g=1<>2]=d;x[d+24>>2]=b;break n}c=a<<((c|0)!=31?25-(c>>>1|0)|0:0);b=x[b>>2];while(1){e=b;if((x[b+4>>2]&-8)==(a|0)){break m}g=c>>>29|0;c=c<<1;g=(b+(g&4)|0)+16|0;b=x[g>>2];if(b){continue}break}x[g>>2]=d;x[d+24>>2]=e}x[d+12>>2]=d;x[d+8>>2]=d;break l}a=x[e+8>>2];x[a+12>>2]=d;x[e+8>>2]=d;x[d+24>>2]=0;x[d+12>>2]=e;x[d+8>>2]=a}a=x[12482]-1|0;x[12482]=a?a:-1}}function Vm(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-72;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];j=x[b+32>>2];k=x[b+36>>2];l=x[b+40>>2];o=x[b+44>>2];p=x[b+48>>2];q=x[b+52>>2];r=x[b+56>>2];s=x[b+60>>2];t=x[b+64>>2];u=x[b+68>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;m=x[x[Ca>>2]>>2]}if(!Ba){j=ya;o=j-16|0;ya=o}a:{if(!Ba|!m){i=bi(g);if((Ba|0)==1){break a}p=i}j=Ba?j:o+4|0;if(!Ba|(m|0)==1){i=Ul(g);n=1;if((Ba|0)==1){break a}r=i}if(!Ba|(m|0)==2){nm(j,r);n=2;if((Ba|0)==1){break a}}if(!Ba){x[f>>2]=d;j=a;g=y[j|0];h=g-43|0}b:{if(!Ba){c:{switch(h|0){case 0:case 2:break c;default:break b}}g=g<<24>>24}if(!Ba|(m|0)==3){i=tj(p,g);n=3;if((Ba|0)==1){break a}g=i}if(!Ba){h=x[f>>2];x[f>>2]=h+4;x[h>>2]=g;j=a+1|0}}if(!Ba){g=j;h=(c-g|0)<=1}d:{e:{if(!Ba){if(h){break e}h=y[g|0]!=48;if(h){break e}h=(y[g+1|0]|32)!=120;if(h){break e}}if(!Ba|(m|0)==4){i=tj(p,48);n=4;if((Ba|0)==1){break a}g=i}if(!Ba){h=x[f>>2];k=h+4|0;x[f>>2]=k;x[h>>2]=g;g=v[j+1|0]}if(!Ba|(m|0)==5){i=tj(p,g);n=5;if((Ba|0)==1){break a}g=i}if(!Ba){h=x[f>>2];k=h+4|0;x[f>>2]=k;x[h>>2]=g;j=j+2|0;g=j;while(1){h=c>>>0<=g>>>0;if(h){break d}i=v[g|0];k=Ol();h=!Qk(i,k);if(h){break d}g=g+1|0;continue}}}if(!Ba){while(1){h=c>>>0<=g>>>0;if(h){break d}h=v[g|0];k=Ol();h=!ig(h);if(h){break d}g=g+1|0;continue}}}if(!Ba){h=ol(o+4|0)}f:{if((Ba|0)==2|h){h=Ba?h:x[f>>2];if(!Ba|(m|0)==6){jm(p,j,g,h);n=6;if((Ba|0)==1){break a}}if(!Ba){h=x[f>>2];j=h+(g-j<<2)|0;x[f>>2]=j;break f}}if(!Ba){Zm(j,g)}if(!Ba|(m|0)==7){i=mm(r);n=7;if((Ba|0)==1){break a}t=i}h=Ba?h:j;while(1){k=Ba?k:g>>>0<=h>>>0;s=Ba?s:k;if(Ba?0:s|(Ba|0)==2){j=(j-a<<2)+d|0;h=x[f>>2];_m(j,h)}if(!s|(Ba|0)==2){if(!Ba){k=o+4|0;g:{if(v[nl(k,q)|0]<=0){break g}if(v[nl(o+4|0,q)|0]!=(l|0)){break g}i=x[f>>2];x[f>>2]=i+4;x[i>>2]=t;q=(ui(k)-1>>>0>q>>>0)+q|0;l=0}k=v[h|0]}if(!Ba|(m|0)==8){i=tj(p,k);n=8;if((Ba|0)==1){break a}u=i}if(!Ba){k=x[f>>2];x[f>>2]=k+4;x[k>>2]=u;h=h+1|0;l=l+1|0;continue}}break}}h:{i:{while(1){if(Ba){i=j}else{if(c>>>0<=g>>>0){break i}h=g+1|0;g=y[g|0];i=(g|0)!=46}if(i|(Ba|0)==2){g=Ba?g:g<<24>>24;if(!Ba|(m|0)==9){i=tj(p,g);n=9;if((Ba|0)==1){break a}g=i}if(!Ba){l=x[f>>2];j=l+4|0;x[f>>2]=j;x[l>>2]=g;g=h;continue}}break}if(!Ba|(m|0)==10){i=lm(r);n=10;if((Ba|0)==1){break a}g=i}if(!Ba){q=x[f>>2];l=q+4|0;x[f>>2]=l;x[q>>2]=g;break h}}if(!Ba){l=x[f>>2];h=g}}if(!Ba|(m|0)==11){jm(p,h,c,l);n=11;if((Ba|0)==1){break a}}if(!Ba){g=f;f=x[f>>2]+(c-h<<2)|0;x[g>>2]=f;x[e>>2]=(b|0)==(c|0)?f:(b-a<<2)+d|0;hr(o+4|0);ya=o+16|0}return}x[x[Ca>>2]>>2]=n;x[Ca>>2]=x[Ca>>2]+4;i=x[Ca>>2];x[i>>2]=a;x[i+4>>2]=b;x[i+8>>2]=c;x[i+12>>2]=d;x[i+16>>2]=e;x[i+20>>2]=f;x[i+24>>2]=g;x[i+28>>2]=h;x[i+32>>2]=j;x[i+36>>2]=k;x[i+40>>2]=l;x[i+44>>2]=o;x[i+48>>2]=p;x[i+52>>2]=q;x[i+56>>2]=r;x[i+60>>2]=s;x[i+64>>2]=t;x[i+68>>2]=u;x[Ca>>2]=x[Ca>>2]+72}function Gm(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-72;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];j=x[b+32>>2];k=x[b+36>>2];m=x[b+40>>2];o=x[b+44>>2];p=x[b+48>>2];q=x[b+52>>2];r=x[b+56>>2];s=x[b+60>>2];t=x[b+64>>2];u=x[b+68>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;l=x[x[Ca>>2]>>2]}if(!Ba){j=ya;o=j-16|0;ya=o}a:{if(!Ba|!l){i=sh(g);if((Ba|0)==1){break a}p=i}j=Ba?j:o+4|0;if(!Ba|(l|0)==1){i=el(g);n=1;if((Ba|0)==1){break a}r=i}if(!Ba|(l|0)==2){nm(j,r);n=2;if((Ba|0)==1){break a}}if(!Ba){x[f>>2]=d;j=a;g=y[j|0];h=g-43|0}b:{if(!Ba){c:{switch(h|0){case 0:case 2:break c;default:break b}}g=g<<24>>24}if(!Ba|(l|0)==3){i=rj(p,g);n=3;if((Ba|0)==1){break a}g=i}if(!Ba){h=x[f>>2];x[f>>2]=h+1;v[h|0]=g;j=a+1|0}}if(!Ba){g=j;h=(c-g|0)<=1}d:{e:{if(!Ba){if(h){break e}h=y[g|0]!=48;if(h){break e}h=(y[g+1|0]|32)!=120;if(h){break e}}if(!Ba|(l|0)==4){i=rj(p,48);n=4;if((Ba|0)==1){break a}g=i}if(!Ba){h=x[f>>2];k=h+1|0;x[f>>2]=k;v[h|0]=g;g=v[j+1|0]}if(!Ba|(l|0)==5){i=rj(p,g);n=5;if((Ba|0)==1){break a}g=i}if(!Ba){h=x[f>>2];k=h+1|0;x[f>>2]=k;v[h|0]=g;j=j+2|0;g=j;while(1){h=c>>>0<=g>>>0;if(h){break d}i=v[g|0];k=Ol();h=!Qk(i,k);if(h){break d}g=g+1|0;continue}}}if(!Ba){while(1){h=c>>>0<=g>>>0;if(h){break d}h=v[g|0];k=Ol();h=!ig(h);if(h){break d}g=g+1|0;continue}}}if(!Ba){h=ol(o+4|0)}f:{if((Ba|0)==2|h){h=Ba?h:x[f>>2];if(!Ba|(l|0)==6){Nl(p,j,g,h);n=6;if((Ba|0)==1){break a}}if(!Ba){h=x[f>>2];j=h+(g-j|0)|0;x[f>>2]=j;break f}}if(!Ba){Zm(j,g)}if(!Ba|(l|0)==7){i=mm(r);n=7;if((Ba|0)==1){break a}t=i}h=Ba?h:j;while(1){k=Ba?k:g>>>0<=h>>>0;s=Ba?s:k;if(Ba?0:s|(Ba|0)==2){j=(j-a|0)+d|0;h=x[f>>2];Zm(j,h)}if(!s|(Ba|0)==2){if(!Ba){k=o+4|0;g:{if(v[nl(k,q)|0]<=0){break g}if(v[nl(o+4|0,q)|0]!=(m|0)){break g}i=x[f>>2];x[f>>2]=i+1;v[i|0]=t;q=(ui(k)-1>>>0>q>>>0)+q|0;m=0}k=v[h|0]}if(!Ba|(l|0)==8){i=rj(p,k);n=8;if((Ba|0)==1){break a}u=i}if(!Ba){k=x[f>>2];x[f>>2]=k+1;v[k|0]=u;h=h+1|0;m=m+1|0;continue}}break}}while(1){j=Ba?j:c>>>0<=g>>>0;h:{i:{if(!Ba){if(j){h=g;break i}h=g+1|0;g=y[g|0];if((g|0)!=46){break h}}if(!Ba|(l|0)==9){i=lm(r);n=9;if((Ba|0)==1){break a}g=i}if(!Ba){m=x[f>>2];x[f>>2]=m+1;v[m|0]=g}}g=Ba?g:x[f>>2];if(!Ba|(l|0)==10){Nl(p,h,c,g);n=10;if((Ba|0)==1){break a}}if(!Ba){g=f;f=x[f>>2]+(c-h|0)|0;x[g>>2]=f;x[e>>2]=(b|0)==(c|0)?f:(b-a|0)+d|0;hr(o+4|0);ya=o+16|0;return}}g=Ba?g:g<<24>>24;if(!Ba|(l|0)==11){i=rj(p,g);n=11;if((Ba|0)==1){break a}g=i}if(!Ba){m=x[f>>2];j=m+1|0;x[f>>2]=j;v[m|0]=g;g=h;continue}break}return}x[x[Ca>>2]>>2]=n;x[Ca>>2]=x[Ca>>2]+4;i=x[Ca>>2];x[i>>2]=a;x[i+4>>2]=b;x[i+8>>2]=c;x[i+12>>2]=d;x[i+16>>2]=e;x[i+20>>2]=f;x[i+24>>2]=g;x[i+28>>2]=h;x[i+32>>2]=j;x[i+36>>2]=k;x[i+40>>2]=m;x[i+44>>2]=o;x[i+48>>2]=p;x[i+52>>2]=q;x[i+56>>2]=r;x[i+60>>2]=s;x[i+64>>2]=t;x[i+68>>2]=u;x[Ca>>2]=x[Ca>>2]+72}function Go(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-52;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];i=x[b+24>>2];h=x[b+28>>2];j=x[b+32>>2];l=x[b+36>>2];m=x[b+40>>2];n=x[b+44>>2];o=x[b+48>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){n=ya-16|0;ya=n;Io(b);e=ya-16|0;ya=e;x[e+12>>2]=b;l=zj(n+12|0,e+12|0);e=e+16|0;ya=e;b=a+8|0;a=Co(b)>>>0<=c>>>0}a:{if((Ba|0)==2|a){b:{if(!Ba){a=c+1|0;e=Co(b);d=a>>>0>e>>>0}if((Ba|0)==2|d){if(!Ba){d=ya;o=d-32|0;ya=o;i=a-e|0;a=x[Nq(b)>>2];e=x[b+4>>2];a=i>>>0<=a-e>>2>>>0}c:{if(!Ba){if(a){Bo(b,i);break c}k=Lq(b);e=o+12|0;d=Co(b)+i|0;a=ya-16|0;ya=a;x[a+12>>2]=d;d:{f=Kq(b);if(d>>>0<=f>>>0){d=Pq(b);if(d>>>0>>1>>>0){x[a+8>>2]=d<<1;f=x[Bi(a+8|0,a+12|0)>>2]}ya=a+16|0;d=f;break d}nj();p()}m=Co(b);f=0;h=ya-16|0;ya=h;x[h+12>>2]=0;a=Ao(Jq(e+12|0)+4|0,k)}j=Ba?j:d;if(j|(Ba|0)==2){if(!Ba){f=Uq(e);a=h+4|0}if(!Ba|!g){Mq(a,f,d);k=0;if((Ba|0)==1){break a}}if(!Ba){f=x[h+4>>2];d=x[h+8>>2]}}d=!Ba&(!j|(Ba|0)==2)?0:d;if(!Ba){x[e>>2]=f;a=(m<<2)+f|0;x[e+8>>2]=a;x[e+4>>2]=a;r=Vq(e),s=(d<<2)+f|0,x[r>>2]=s;ya=h+16|0;f=ya-16|0;ya=f;a=e;h=a+8|0;e=x[h>>2];d=f+4|0;x[d+8>>2]=h;x[d>>2]=e;x[d+4>>2]=e+(i<<2);e=x[d>>2];while(1){if(x[d+4>>2]!=(e|0)){Uq(a);Qq(x[d>>2]);e=x[d>>2]+4|0;x[d>>2]=e;continue}break}x[x[d+8>>2]>>2]=x[d>>2];ya=f+16|0;e=ya-16|0;ya=e;Sq(b);Lq(b);i=Ao(e+8|0,x[b+4>>2]);d=Ao(e+4|0,x[b>>2]);f=Ao(e,x[a+4>>2]);j=x[d>>2];k=x[f>>2];h=ya-16|0;ya=h;q=h+8|0;d=ya-32|0;ya=d;f=ya-16|0;ya=f;x[f+12>>2]=x[i>>2];x[f+8>>2]=j;Yi(d+24|0,f+12|0,f+8|0);ya=f+16|0;m=d+16|0;i=x[d+24>>2];f=ya-16|0;ya=f;j=x[d+28>>2];x[f+8>>2]=j;x[f+12>>2]=i;x[f+4>>2]=k;while(1){if(x[f+12>>2]!=x[f+8>>2]){i=f+12|0;j=x[Xq(i)>>2];k=f+4|0;r=Xq(k),s=j,x[r>>2]=s;Yq(i);Yq(k);continue}break}Xi(m,f+12|0,f+4|0);ya=f+16|0;x[d+12>>2]=x[d+16>>2];x[d+8>>2]=x[d+20>>2];Xi(q,d+12|0,d+8|0);ya=d+32|0;ya=h+16|0;x[e+12>>2]=x[h+12>>2];x[a+4>>2]=x[e+12>>2];Rg(b,a+4|0);Rg(b+4|0,a+8|0);Rg(Nq(b),Vq(a));x[a>>2]=x[a+4>>2];Oq(b,Co(b));ya=e+16|0;i=x[a+4>>2];while(1){if(x[a+8>>2]!=(i|0)){Uq(a);x[a+8>>2]=x[a+8>>2]-4;continue}break}e=x[a>>2];if(e){e=Uq(a);q=x[a>>2];a=x[Vq(a)>>2]-x[a>>2]>>2;Tq(e,q,a)}}}if(!Ba){a=o+32|0;ya=a;break b}}if(!Ba&a>>>0>>0){a=x[b>>2]+(a<<2)|0;e=Co(b);Rq(b,a);Eo(b)}}}if(!Ba){a=x[Ho(b,c)>>2]}if((Ba|0)==2|a){if(!Ba){a=x[Ho(b,c)>>2]}if(!Ba|(g|0)==1){Jo(a);k=1;if((Ba|0)==1){break a}}}if(!Ba){a=Xf(l);r=Ho(b,c),s=a,x[r>>2]=s;a=x[l>>2];x[l>>2]=0}if(!Ba|(g|0)==2?(Ba|0)==2|a:0){Jo(a);k=2;if((Ba|0)==1){break a}}if(!Ba){ya=n+16|0}return}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=i;x[g+28>>2]=h;x[g+32>>2]=j;x[g+36>>2]=l;x[g+40>>2]=m;x[g+44>>2]=n;x[g+48>>2]=o;x[Ca>>2]=x[Ca>>2]+52}function so(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){var p=0,q=0,r=0,s=0,t=0,u=0,w=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-96;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];i=x[b+32>>2];j=x[b+36>>2];k=x[b+40>>2];l=x[b+44>>2];m=x[b+48>>2];n=x[b+52>>2];o=x[b+56>>2];p=x[b+60>>2];s=x[b+64>>2];r=x[b+68>>2];u=x[b+72>>2];w=x[b+76>>2];B=x[b+80>>2];z=x[b+84>>2];C=x[b+88>>2];D=x[b+92>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;A=x[x[Ca>>2]>>2]}if(!Ba){p=ya;u=p-16|0;ya=u;x[c>>2]=a;C=h<<2;B=d&512}a:{while(1){h=Ba?h:(w|0)==4;z=Ba?z:h;if(Ba?0:z|(Ba|0)==2){e=ui(n)>>>0>1;if(e){E=u,F=pm(n),x[E+12>>2]=F;e=jo(u+12|0,1);f=Mm(n);g=x[c>>2];e=to(e,f,g);x[c>>2]=e}h=d&176;d=(h|0)!=16;if(d){d=(h|0)==32;if(d){a=x[c>>2]}x[b>>2]=a}a=u+16|0;ya=a}if(!z|(Ba|0)==2){h=Ba?h:v[i+w|0];b:{c:{d:{e:{if(!Ba){f:{switch(h|0){case 0:h=x[c>>2];x[b>>2]=h;break b;case 4:break c;case 2:break d;case 3:break e;case 1:break f;default:break b}}h=x[c>>2];x[b>>2]=h}if(!Ba|!A){q=tj(g,32);t=0;if((Ba|0)==1){break a}h=q}if(!Ba){p=x[c>>2];r=p+4|0;x[c>>2]=r;x[p>>2]=h;break b}}if(!Ba){h=ol(n);if(h){break b}h=x[Wl(n,0)>>2];p=x[c>>2];r=p+4|0;x[c>>2]=r;x[p>>2]=h;break b}}if(!Ba){p=!B;h=ol(m);if(p|h){break b}h=pm(m);p=Mm(m);r=x[c>>2];h=to(h,p,r);x[c>>2]=h;break b}}if(!Ba){D=x[c>>2];e=e+C|0;h=e}while(1){g:{if(!Ba){p=f>>>0<=h>>>0;if(p){break g}p=x[h>>2]}if(!Ba|(A|0)==1){q=ei(g,64,p);t=1;if((Ba|0)==1){break a}p=q}if(!Ba){p=!p;if(p){break g}h=h+4|0;continue}}break}p=Ba?p:(o|0)>0;if(p|(Ba|0)==2){if(!Ba){p=x[c>>2];s=o;while(1){if(!(!s|e>>>0>=h>>>0)){s=s-1|0;h=h-4|0;q=x[h>>2];r=p+4|0;x[c>>2]=r;x[p>>2]=q;p=r;continue}break}r=!s}h:{if(!(r?Ba:1)){r=0;break h}if(!Ba|(A|0)==2){q=tj(g,48);t=2;if((Ba|0)==1){break a}r=q}p=Ba?p:x[c>>2]}if(!Ba){while(1){q=p+4|0;if((s|0)>0){x[p>>2]=r;s=s-1|0;p=q;continue}break}x[c>>2]=q;x[p>>2]=j}}p=Ba?p:(e|0)==(h|0);i:{if(p|(Ba|0)==2){if(!Ba|(A|0)==3){q=tj(g,48);t=3;if((Ba|0)==1){break a}p=q}if(!Ba){s=x[c>>2];h=s+4|0;x[c>>2]=h;x[s>>2]=p;break i}}if(!Ba){if(ol(l)){r=-1}else{r=v[nl(l,0)|0]}p=0;q=0;while(1){s=(e|0)!=(h|0);if(s){j:{if((p|0)!=(r|0)){s=p;break j}r=x[c>>2];x[c>>2]=r+4;x[r>>2]=k;s=0;q=q+1|0;if(ui(l)>>>0<=q>>>0){r=p;break j}if(y[nl(l,q)|0]==127){r=-1;break j}r=v[nl(l,q)|0]}h=h-4|0;p=x[h>>2];t=x[c>>2];x[c>>2]=t+4;x[t>>2]=p;p=s+1|0;continue}break}h=x[c>>2]}}if(!Ba){_m(D,h)}}if(!Ba){w=w+1|0;continue}}break}return}x[x[Ca>>2]>>2]=t;x[Ca>>2]=x[Ca>>2]+4;q=x[Ca>>2];x[q>>2]=a;x[q+4>>2]=b;x[q+8>>2]=c;x[q+12>>2]=d;x[q+16>>2]=e;x[q+20>>2]=f;x[q+24>>2]=g;x[q+28>>2]=h;x[q+32>>2]=i;x[q+36>>2]=j;x[q+40>>2]=k;x[q+44>>2]=l;x[q+48>>2]=m;x[q+52>>2]=n;x[q+56>>2]=o;x[q+60>>2]=p;x[q+64>>2]=s;x[q+68>>2]=r;x[q+72>>2]=u;x[q+76>>2]=w;x[q+80>>2]=B;x[q+84>>2]=z;x[q+88>>2]=C;x[q+92>>2]=D;x[Ca>>2]=x[Ca>>2]+96}function Cg(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;f=a+b|0;c=x[a+4>>2];a:{b:{if(c&1){break b}if(!(c&3)){break a}c=x[a>>2];b=c+b|0;c:{d:{e:{a=a-c|0;if((a|0)!=x[12479]){if(c>>>0<=255){d=x[a+8>>2];e=x[a+12>>2];if((d|0)!=(e|0)){break e}i=49896,j=x[12474]&Js(c>>>3|0),x[i>>2]=j;break b}h=x[a+24>>2];c=x[a+12>>2];if((c|0)!=(a|0)){d=x[a+8>>2];x[d+12>>2]=c;x[c+8>>2]=d;break c}e=a+20|0;d=x[e>>2];if(!d){d=x[a+16>>2];if(!d){break d}e=a+16|0}while(1){g=e;c=d;e=c+20|0;d=x[e>>2];if(d){continue}e=c+16|0;d=x[c+16>>2];if(d){continue}break}x[g>>2]=0;break c}c=x[f+4>>2];if((c&3)!=3){break b}x[12476]=b;x[f+4>>2]=c&-2;x[a+4>>2]=b|1;x[f>>2]=b;return}x[d+12>>2]=e;x[e+8>>2]=d;break b}c=0}if(!h){break b}d=x[a+28>>2];e=(d<<2)+50200|0;f:{if(x[e>>2]==(a|0)){x[e>>2]=c;if(c){break f}i=49900,j=x[12475]&Js(d),x[i>>2]=j;break b}x[h+(x[h+16>>2]==(a|0)?16:20)>>2]=c;if(!c){break b}}x[c+24>>2]=h;d=x[a+16>>2];if(d){x[c+16>>2]=d;x[d+24>>2]=c}d=x[a+20>>2];if(!d){break b}x[c+20>>2]=d;x[d+24>>2]=c}g:{h:{i:{j:{c=x[f+4>>2];if(!(c&2)){if((f|0)==x[12480]){x[12480]=a;b=x[12477]+b|0;x[12477]=b;x[a+4>>2]=b|1;if(x[12479]!=(a|0)){break a}x[12476]=0;x[12479]=0;return}if((f|0)==x[12479]){x[12479]=a;b=x[12476]+b|0;x[12476]=b;x[a+4>>2]=b|1;x[a+b>>2]=b;return}b=(c&-8)+b|0;if(c>>>0<=255){e=c>>>3|0;c=x[f+12>>2];d=x[f+8>>2];if((c|0)==(d|0)){i=49896,j=x[12474]&Js(e),x[i>>2]=j;break h}x[d+12>>2]=c;x[c+8>>2]=d;break h}h=x[f+24>>2];c=x[f+12>>2];if((f|0)!=(c|0)){d=x[f+8>>2];x[d+12>>2]=c;x[c+8>>2]=d;break i}e=f+20|0;d=x[e>>2];if(!d){d=x[f+16>>2];if(!d){break j}e=f+16|0}while(1){g=e;c=d;e=c+20|0;d=x[e>>2];if(d){continue}e=c+16|0;d=x[c+16>>2];if(d){continue}break}x[g>>2]=0;break i}x[f+4>>2]=c&-2;x[a+4>>2]=b|1;x[a+b>>2]=b;break g}c=0}if(!h){break h}d=x[f+28>>2];e=(d<<2)+50200|0;k:{if((f|0)==x[e>>2]){x[e>>2]=c;if(c){break k}i=49900,j=x[12475]&Js(d),x[i>>2]=j;break h}x[h+((f|0)==x[h+16>>2]?16:20)>>2]=c;if(!c){break h}}x[c+24>>2]=h;d=x[f+16>>2];if(d){x[c+16>>2]=d;x[d+24>>2]=c}d=x[f+20>>2];if(!d){break h}x[c+20>>2]=d;x[d+24>>2]=c}x[a+4>>2]=b|1;x[a+b>>2]=b;if(x[12479]!=(a|0)){break g}x[12476]=b;return}if(b>>>0<=255){c=(b&-8)+49936|0;d=x[12474];b=1<<(b>>>3);l:{if(!(d&b)){x[12474]=b|d;b=c;break l}b=x[c+8>>2]}x[c+8>>2]=a;x[b+12>>2]=a;x[a+12>>2]=c;x[a+8>>2]=b;return}d=31;if(b>>>0<=16777215){c=G(b>>>8|0);d=((b>>>38-c&1)-(c<<1)|0)+62|0}x[a+28>>2]=d;x[a+16>>2]=0;x[a+20>>2]=0;c=(d<<2)+50200|0;m:{e=x[12475];g=1<>2]=a;x[a+24>>2]=c;break n}d=b<<((d|0)!=31?25-(d>>>1|0)|0:0);c=x[c>>2];while(1){e=c;if((x[c+4>>2]&-8)==(b|0)){break m}g=d>>>29|0;d=d<<1;g=(c+(g&4)|0)+16|0;c=x[g>>2];if(c){continue}break}x[g>>2]=a;x[a+24>>2]=e}x[a+12>>2]=a;x[a+8>>2]=a;return}b=x[e+8>>2];x[b+12>>2]=a;x[e+8>>2]=a;x[a+24>>2]=0;x[a+12>>2]=e;x[a+8>>2]=b}}function mn(a,b,c,d,e,f,g,h){var i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-56;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];j=x[b+32>>2];k=x[b+36>>2];n=x[b+40>>2];o=x[b+44>>2];q=x[b+48>>2];r=x[b+52>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;l=x[x[Ca>>2]>>2]}if(!Ba){k=ya;j=k-16|0;ya=j;x[j+8>>2]=c;x[j+12>>2]=b;b=j+4|0;vj(b,d)}a:{if(!Ba|!l){i=bi(b);if((Ba|0)==1){break a}c=i}b=Ba?b:j+4|0;if(!Ba|(l|0)==1){Po(b);m=1;if((Ba|0)==1){break a}}if(!Ba){x[e>>2]=0;b=0}b:{while(1){if(!Ba){if(b|(g|0)==(h|0)){break b}k=j+8|0;b=j+12|0}if(!Ba|(l|0)==2){i=ci(b,k);m=2;if((Ba|0)==1){break a}b=i}c:{if(!Ba){if(b){break c}b=x[g>>2]}if(!Ba|(l|0)==3){i=nn(c,b);m=3;if((Ba|0)==1){break a}b=i}b=Ba?b:(b|0)==37;d:{if(b|(Ba|0)==2){if(!Ba){b=g+4|0;if((h|0)==(b|0)){break c}k=0;b=x[b>>2]}if(!Ba|(l|0)==4){i=nn(c,b);m=4;if((Ba|0)==1){break a}b=i}n=Ba?n:(b|0)==69;e:{if(!Ba){f:{if(n){break f}o=1;if((b&255)==48){break f}n=b;break e}k=g+8|0;n=(k|0)==(h|0);if(n){break c}o=2;k=x[k>>2]}if(!Ba|(l|0)==5){i=nn(c,k);m=5;if((Ba|0)==1){break a}n=i}k=Ba?k:b}if(!Ba){q=x[j+8>>2];r=x[x[a>>2]+36>>2];b=x[j+12>>2]}if(!Ba|(l|0)==6){i=Ea[r|0](a,b,q,d,e,f,n,k)|0;m=6;if((Ba|0)==1){break a}b=i}if(!Ba){x[j+12>>2]=b;b=(o<<2)+g|0;g=b+4|0;break d}}b=Ba?b:x[g>>2];if(!Ba|(l|0)==7){i=ei(c,1,b);m=7;if((Ba|0)==1){break a}b=i}if((Ba|0)==2|b){while(1){g:{if(!Ba){g=g+4|0;b=(h|0)==(g|0);if(b){g=h;break g}b=x[g>>2]}if(!Ba|(l|0)==8){i=ei(c,1,b);m=8;if((Ba|0)==1){break a}b=i}if(!(b?Ba:1)){continue}}break}while(1){if(!Ba){k=j+8|0;b=j+12|0}if(!Ba|(l|0)==9){i=ci(b,k);m=9;if((Ba|0)==1){break a}b=i}if(!Ba){if(b){break d}b=j+12|0}if(!Ba|(l|0)==10){i=di(b);m=10;if((Ba|0)==1){break a}b=i}if(!Ba|(l|0)==11){i=ei(c,1,b);m=11;if((Ba|0)==1){break a}b=i}if(!Ba){b=!b;if(b){break d}b=j+12|0}if(!Ba|(l|0)==12){i=fi(b);m=12;if((Ba|0)==1){break a}b=i}if(!Ba){continue}break}}b=Ba?b:j+12|0;if(!Ba|(l|0)==13){i=di(b);m=13;if((Ba|0)==1){break a}b=i}if(!Ba|(l|0)==14){i=rj(c,b);m=14;if((Ba|0)==1){break a}b=i}k=Ba?k:x[g>>2];if(!Ba|(l|0)==15){i=rj(c,k);m=15;if((Ba|0)==1){break a}k=i}b=Ba?b:(b|0)==(k|0);if(b|(Ba|0)==2){if(!Ba){g=g+4|0;b=j+12|0}if(!Ba|(l|0)==16){i=fi(b);m=16;if((Ba|0)==1){break a}b=i}if(!Ba){break d}}if(!Ba){x[e>>2]=4}}if(!Ba){b=x[e>>2];continue}}break}if(!Ba){x[e>>2]=4}}if(!Ba){b=j+8|0;a=j+12|0}if(!Ba|(l|0)==17){i=ci(a,b);m=17;if((Ba|0)==1){break a}a=i}if(!Ba){if(a){x[e>>2]=x[e>>2]|2}ya=j+16|0;return x[j+12>>2]}p()}x[x[Ca>>2]>>2]=m;x[Ca>>2]=x[Ca>>2]+4;i=x[Ca>>2];x[i>>2]=a;x[i+4>>2]=b;x[i+8>>2]=c;x[i+12>>2]=d;x[i+16>>2]=e;x[i+20>>2]=f;x[i+24>>2]=g;x[i+28>>2]=h;x[i+32>>2]=j;x[i+36>>2]=k;x[i+40>>2]=n;x[i+44>>2]=o;x[i+48>>2]=q;x[i+52>>2]=r;x[Ca>>2]=x[Ca>>2]+56;return 0}function mo(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){var p=0,q=0,r=0,s=0,t=0,u=0,w=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-100;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];i=x[b+32>>2];j=x[b+36>>2];k=x[b+40>>2];l=x[b+44>>2];m=x[b+48>>2];n=x[b+52>>2];o=x[b+56>>2];p=x[b+60>>2];r=x[b+64>>2];s=x[b+68>>2];t=x[b+72>>2];w=x[b+76>>2];z=x[b+80>>2];C=x[b+84>>2];A=x[b+88>>2];B=x[b+92>>2];D=x[b+96>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;E=x[x[Ca>>2]>>2]}if(!Ba){p=ya;w=p-16|0;ya=w;x[c>>2]=a;C=d&512}a:{while(1){p=Ba?p:(z|0)==4;A=Ba?A:p;if(Ba?0:A|(Ba|0)==2){e=ui(n)>>>0>1;if(e){F=w,G=pm(n),x[F+12>>2]=G;e=Xn(w+12|0,1);f=qm(n);g=x[c>>2];e=oo(e,f,g);x[c>>2]=e}r=d&176;d=(r|0)!=16;if(d){d=(r|0)==32;if(d){a=x[c>>2]}x[b>>2]=a}a=w+16|0;ya=a}if(!A|(Ba|0)==2){p=Ba?p:v[i+z|0];b:{c:{d:{e:{if(!Ba){f:{switch(p|0){case 0:p=x[c>>2];x[b>>2]=p;break b;case 4:break c;case 2:break d;case 3:break e;case 1:break f;default:break b}}p=x[c>>2];x[b>>2]=p}if(!Ba|!E){q=rj(g,32);u=0;if((Ba|0)==1){break a}r=q}if(!Ba){p=x[c>>2];s=p+1|0;x[c>>2]=s;v[p|0]=r;break b}}if(!Ba){p=ol(n);if(p){break b}r=y[nl(n,0)|0];p=x[c>>2];s=p+1|0;x[c>>2]=s;v[p|0]=r;break b}}if(!Ba){p=!C;r=ol(m);if(p|r){break b}q=pm(m);s=qm(m);r=x[c>>2];p=oo(q,s,r);x[c>>2]=p;break b}}if(!Ba){D=x[c>>2];e=e+h|0;r=e;while(1){g:{if(f>>>0<=r>>>0){break g}if(!vh(g,64,v[r|0])){break g}r=r+1|0;continue}break}p=o;s=(p|0)>0}if((Ba|0)==2|s){if(!Ba){while(1){h:{s=e>>>0>=r>>>0;if(s){break h}s=!p;if(s){break h}p=p-1|0;r=r-1|0;s=y[r|0];t=x[c>>2];x[c>>2]=t+1;v[t|0]=s;continue}break}}B=Ba?B:p;if(!Ba|(E|0)==1?B|(Ba|0)==2:0){q=rj(g,48);u=1;if((Ba|0)==1){break a}t=q}t=!Ba&(!B|(Ba|0)==2)?0:t;if(!Ba){while(1){q=x[c>>2];x[c>>2]=q+1;s=(p|0)>0;if(s){v[q|0]=t;p=p-1|0;continue}break}v[q|0]=j}}p=Ba?p:(e|0)==(r|0);i:{if(p|(Ba|0)==2){if(!Ba|(E|0)==2){q=rj(g,48);u=2;if((Ba|0)==1){break a}r=q}if(!Ba){p=x[c>>2];s=p+1|0;x[c>>2]=s;v[p|0]=r;break i}}if(!Ba){if(ol(l)){s=-1}else{s=v[nl(l,0)|0]}p=0;u=0;while(1){if((e|0)==(r|0)){break i}j:{if((p|0)!=(s|0)){q=p;break j}t=x[c>>2];x[c>>2]=t+1;v[t|0]=k;q=0;u=u+1|0;if(ui(l)>>>0<=u>>>0){s=p;break j}if(y[nl(l,u)|0]==127){s=-1;break j}s=v[nl(l,u)|0]}r=r-1|0;p=y[r|0];t=x[c>>2];x[c>>2]=t+1;v[t|0]=p;p=q+1|0;continue}}}if(!Ba){p=x[c>>2];Zm(D,p)}}if(!Ba){z=z+1|0;continue}}break}return}x[x[Ca>>2]>>2]=u;x[Ca>>2]=x[Ca>>2]+4;q=x[Ca>>2];x[q>>2]=a;x[q+4>>2]=b;x[q+8>>2]=c;x[q+12>>2]=d;x[q+16>>2]=e;x[q+20>>2]=f;x[q+24>>2]=g;x[q+28>>2]=h;x[q+32>>2]=i;x[q+36>>2]=j;x[q+40>>2]=k;x[q+44>>2]=l;x[q+48>>2]=m;x[q+52>>2]=n;x[q+56>>2]=o;x[q+60>>2]=p;x[q+64>>2]=r;x[q+68>>2]=s;x[q+72>>2]=t;x[q+76>>2]=w;x[q+80>>2]=z;x[q+84>>2]=C;x[q+88>>2]=A;x[q+92>>2]=B;x[q+96>>2]=D;x[Ca>>2]=x[Ca>>2]+100}function zr(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;d=x[Ca>>2];a=x[d>>2];c=x[d+8>>2];e=x[d+12>>2];f=x[d+16>>2];j=x[d+20>>2];i=x[d+24>>2];b=x[d+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){i=ya+-64|0;ya=i;e=qr(b,46528,0)}a:{b:{if(!Ba){if(e){x[c>>2]=0;f=1;break b}e=y[a+8|0]&24}g=(Ba|0)==2;d=Ba?0:e;e=(Ba?0:g|d)?1:e;c:{if(g|!d){if(!Ba){e=!b;if(e){break c}}if(!Ba|!h){d=sr(b,46260);g=0;if((Ba|0)==1){break a}e=d}if(!Ba){if(!e){break c}e=(y[e+8|0]&24)!=0}}if(!Ba){j=qr(a,b,e)}}if(!Ba){if(j){f=1;a=x[c>>2];if(!a){break b}x[c>>2]=x[a>>2];break b}e=!b}d:{if(!(e?Ba:1)){break d}if(!Ba|(h|0)==1){d=sr(b,46308);g=1;if((Ba|0)==1){break a}b=d}if(!Ba){if(!b){break b}e=x[c>>2];if(e){x[c>>2]=x[e>>2]}d=x[b+8>>2];e=x[a+8>>2];if(d&(e^-1)&7|e&(d^-1)&96){break b}f=1;j=x[b+12>>2];if(qr(x[a+12>>2],j,0)){break b}e=qr(x[a+12>>2],46516,0)}if((Ba|0)==2|e){if(!Ba){b=x[b+12>>2];a=!b;if(a){break b}}if(!Ba|(h|0)==2){d=sr(b,46360);g=2;if((Ba|0)==1){break a}a=d}if(!Ba){f=!a;break b}}if(!Ba){j=x[a+12>>2];f=!j;if(f){break d}f=0}if(!Ba|(h|0)==3){d=sr(j,46308);g=3;if((Ba|0)==1){break a}e=d}if((Ba|0)==2|e){if(!Ba){if(!(v[a+8|0]&1)){break b}c=x[b+12>>2];a=0}e:{f:{while(1){if(!Ba){b=0;f=!c;if(f){break e}}if(!Ba|(h|0)==4){d=sr(c,46308);g=4;if((Ba|0)==1){break a}c=d}if(!Ba){b=!c;if(b){break f}f=x[e+8>>2]^-1;b=f&x[c+8>>2];if(b){break f}f=qr(x[e+12>>2],x[c+12>>2],0);b=1;if(f){break e}b=!(v[e+8|0]&1);if(b){break f}b=x[e+12>>2];f=!b;if(f){break f}}if(!Ba|(h|0)==5){d=sr(b,46308);g=5;if((Ba|0)==1){break a}e=d}if(!(e?Ba:1)){c=x[c+12>>2];continue}break}if(!Ba|(h|0)==6){d=sr(b,46420);g=6;if((Ba|0)==1){break a}e=d}if(!Ba){b=!e;if(b){break f}a=x[c+12>>2]}if(!Ba|(h|0)==7){d=Ar(e,a);g=7;if((Ba|0)==1){break a}a=d}}b=Ba?b:a}if(!Ba){f=b;break b}}if(!Ba|(h|0)==8){d=sr(j,46420);g=8;if((Ba|0)==1){break a}e=d}if((Ba|0)==2|e){if(!Ba){if(!(v[a+8|0]&1)){break b}a=x[b+12>>2]}if(!Ba|(h|0)==9){d=Ar(e,a);g=9;if((Ba|0)==1){break a}f=d}if(!Ba){break b}}if(!Ba|(h|0)==10){d=sr(j,46212);g=10;if((Ba|0)==1){break a}a=d}if(!Ba){if(!a){break b}b=x[b+12>>2];e=!b;if(e){break b}}if(!Ba|(h|0)==11){d=sr(b,46212);g=11;if((Ba|0)==1){break a}b=d}if(!Ba){if(!b){break b}nf(i+12|0,0,52);x[i+56>>2]=1;x[i+20>>2]=-1;x[i+16>>2]=a;x[i+8>>2]=b;f=x[c>>2];e=x[x[b>>2]+28>>2];a=i+8|0}if(!Ba|(h|0)==12){Ea[e|0](b,a,f,1);g=12;if((Ba|0)==1){break a}}if(!Ba){a=x[i+32>>2];if(!(!x[c>>2]|(a|0)!=1)){x[c>>2]=x[i+24>>2]}f=(a|0)==1;break b}}f=Ba?f:0}if(!Ba){ya=i- -64|0;return f|0}p()}x[x[Ca>>2]>>2]=g;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=e;x[d+16>>2]=f;x[d+20>>2]=j;x[d+24>>2]=i;x[Ca>>2]=x[Ca>>2]+28;return 0}function Pa(){var a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;b=x[Ca>>2];a=x[b>>2];g=x[b+8>>2];f=x[b+12>>2];h=x[b+16>>2];i=x[b+20>>2];d=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}if(!Ba){Sr();d=!y[52473]}a:{if((Ba|0)==2|d){if(!Ba){f=ya;g=f-16|0;ya=g;d=x[8769]}if(!Ba|!c){b=$g(52120);if((Ba|0)==1){break a}a=b}if(!Ba){x[a+40>>2]=52176;x[a+32>>2]=d;x[a>>2]=35412;v[a+52|0]=0;x[a+48>>2]=-1;f=g+12|0;qi(f,a);h=x[x[a>>2]+8>>2]}if(!Ba|(c|0)==1){Ea[h|0](a,f);e=1;if((Ba|0)==1){break a}}f=Ba?f:g+12|0;if(!Ba|(c|0)==2){Po(f);e=2;if((Ba|0)==1){break a}}if(!Ba){f=g+16|0;ya=f;a=Mj(51444);x[12859]=33912;x[a>>2]=33932;x[12860]=0}if(!Ba|(c|0)==3){Nj(a,52120);e=3;if((Ba|0)==1){break a}}f=Ba?f:x[7763];if(!Ba|(c|0)==4){Hj(52184,f,52232);e=4;if((Ba|0)==1){break a}}if(!Ba|(c|0)==5){Ij(51612,52184);e=5;if((Ba|0)==1){break a}}h=Ba?h:x[7762];if(!Ba|(c|0)==6){Hj(52240,h,52288);e=6;if((Ba|0)==1){break a}}if(!Ba|(c|0)==7){Ij(51780,52240);e=7;if((Ba|0)==1){break a}}if(!Ba){a=x[(x[x[12945]-12>>2]+51780|0)+24>>2]}if(!Ba|(c|0)==8){Ij(51948,a);e=8;if((Ba|0)==1){break a}}if(!Ba){Jj(x[x[12859]-12>>2]+51436|0,51612);Oj(x[x[12945]-12>>2]+51780|0);Jj(x[x[12945]-12>>2]+51780|0,51612);a=ya;g=a-16|0;ya=g}if(!Ba|(c|0)==9){b=Xh(52296);e=9;if((Ba|0)==1){break a}a=b}if(!Ba){x[a+40>>2]=52352;x[a+32>>2]=d;x[a>>2]=35616;v[a+52|0]=0;x[a+48>>2]=-1;d=g+12|0;qi(d,a);i=x[x[a>>2]+8>>2]}if(!Ba|(c|0)==10){Ea[i|0](a,d);e=10;if((Ba|0)==1){break a}}d=Ba?d:g+12|0;if(!Ba|(c|0)==11){Po(d);e=11;if((Ba|0)==1){break a}}if(!Ba){ya=g+16|0;d=Pj(51532);x[12881]=34072;x[d>>2]=34092;x[12882]=0}if(!Ba|(c|0)==12){Nj(d,52296);e=12;if((Ba|0)==1){break a}}if(!Ba|(c|0)==13){Kj(52360,f,52408);e=13;if((Ba|0)==1){break a}}if(!Ba|(c|0)==14){Lj(51696,52360);e=14;if((Ba|0)==1){break a}}if(!Ba|(c|0)==15){Kj(52416,h,52464);e=15;if((Ba|0)==1){break a}}if(!Ba|(c|0)==16){Lj(51864,52416);e=16;if((Ba|0)==1){break a}}if(!Ba){d=x[(x[x[12966]-12>>2]+51864|0)+24>>2]}if(!Ba|(c|0)==17){Lj(52032,d);e=17;if((Ba|0)==1){break a}}if(!Ba){Jj(x[x[12881]-12>>2]+51524|0,51696);Oj(x[x[12966]-12>>2]+51864|0);Jj(x[x[12966]-12>>2]+51864|0,51696);v[52473]=1}}if(!Ba){a=ya-16|0;ya=a;b:{if(ta(a+12|0,a+8|0)|0){break b}b=yg((x[a+12>>2]<<2)+4|0);x[13119]=b;if(!b){break b}b=yg(x[a+8>>2]);if(b){x[x[13119]+(x[a+12>>2]<<2)>>2]=0;if(!(ua(x[13119],b|0)|0)){break b}}x[13119]=0}ya=a+16|0;x[12161]=171;x[12162]=0;Ze();x[12162]=x[12160];x[12160]=48644;x[12204]=48688;x[12186]=42}return}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;b=x[Ca>>2];x[b>>2]=a;x[b+4>>2]=d;x[b+8>>2]=g;x[b+12>>2]=f;x[b+16>>2]=h;x[b+20>>2]=i;x[Ca>>2]=x[Ca>>2]+24}function Wm(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-68;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];j=x[b+32>>2];k=x[b+36>>2];m=x[b+40>>2];l=x[b+44>>2];q=x[b+48>>2];r=x[b+52>>2];s=x[b+56>>2];t=x[b+60>>2];u=x[b+64>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;n=x[x[Ca>>2]>>2]}if(!Ba){a=ya-416|0;ya=a;v[a+412|0]=0;v[a+413|0]=0;v[a+414|0]=0;v[a+415|0]=0;v[a+409|0]=0;v[a+410|0]=0;v[a+411|0]=0;v[a+412|0]=0;v[a+408|0]=37;l=a+409|0;q=Em(l,9732,x[c+4>>2]);x[a+364>>2]=a+368;k=Ol()}a:{b:{if((Ba|0)==2|q){if(!Ba){i=x[c+8>>2];j=a- -64|0;x[j>>2]=g;x[j+4>>2]=h;x[a+56>>2]=e;x[a+60>>2]=f;x[a+48>>2]=i;m=a+368|0;l=a+48|0;j=a+408|0}if(!Ba|!n){i=wm(m,30,k,j,l);if((Ba|0)==1){break a}k=i}if(!Ba){break b}}if(!Ba){x[a+80>>2]=e;x[a+84>>2]=f;x[a+88>>2]=g;x[a+92>>2]=h;m=a+368|0;l=a+80|0;j=a+408|0}if(!Ba|(n|0)==1){i=wm(m,30,k,j,l);o=1;if((Ba|0)==1){break a}k=i}}if(!Ba){x[a+128>>2]=267;s=kl(a+356|0,0,a+128|0);m=(k|0)>=30;l=a+368|0;j=l}c:{d:{if((Ba|0)==2|m){if(!Ba){k=Ol()}e:{if((Ba|0)==2|q){if(!Ba){j=x[c+8>>2];x[a+16>>2]=g;x[a+20>>2]=h;x[a+8>>2]=e;x[a+12>>2]=f;x[a>>2]=j;m=a+364|0;j=a+408|0}if(!Ba|(n|0)==2){i=Fm(m,k,j,a);o=2;if((Ba|0)==1){break a}k=i}if(!Ba){break e}}if(!Ba){x[a+32>>2]=e;x[a+36>>2]=f;x[a+40>>2]=g;x[a+44>>2]=h;r=a+364|0;m=a+408|0;j=a+32|0}if(!Ba|(n|0)==3){i=Fm(r,k,m,j);o=3;if((Ba|0)==1){break a}k=i}}if(!Ba){if((k|0)==-1){break d}j=x[a+364>>2]}if(!Ba|(n|0)==4){ll(s,j);o=4;if((Ba|0)==1){break a}}if(!Ba){j=x[a+364>>2]}}if(!Ba){q=j+k|0;t=xm(j,q,c);x[a+128>>2]=267;j=kl(a+120|0,0,a+128|0);r=x[a+364>>2];m=(r|0)==(a+368|0)}f:{if(!Ba){if(m){k=a+128|0;break f}k=yg(k<<3);l=!k;if(l){break d}}if(!Ba|(n|0)==5){ll(j,k);o=5;if((Ba|0)==1){break a}}l=Ba?l:x[a+364>>2]}if(!Ba){m=a+108|0;vj(m,c);r=a+112|0;u=a+116|0}if(!Ba|(n|0)==6){Vm(l,t,q,k,u,r,m);o=6;if((Ba|0)==1){break a}}l=Ba?l:a+108|0;if(!Ba|(n|0)==7){Po(l);o=7;if((Ba|0)==1){break a}}if(!Ba){m=x[a+116>>2];l=x[a+112>>2]}if(!Ba|(n|0)==8){i=Qm(b,k,m,l,c,d);o=8;if((Ba|0)==1){break a}c=i}if(!Ba|(n|0)==9){pl(j);o=9;if((Ba|0)==1){break a}}if(!Ba|(n|0)==10){pl(s);o=10;if((Ba|0)==1){break a}}if(!Ba){ya=a+416|0;break c}}if(!Ba){Ji();p()}}if(!Ba){return c|0}p()}x[x[Ca>>2]>>2]=o;x[Ca>>2]=x[Ca>>2]+4;i=x[Ca>>2];x[i>>2]=a;x[i+4>>2]=b;x[i+8>>2]=c;x[i+12>>2]=d;x[i+16>>2]=e;x[i+20>>2]=f;x[i+24>>2]=g;x[i+28>>2]=h;x[i+32>>2]=j;x[i+36>>2]=k;x[i+40>>2]=m;x[i+44>>2]=l;x[i+48>>2]=q;x[i+52>>2]=r;x[i+56>>2]=s;x[i+60>>2]=t;x[i+64>>2]=u;x[Ca>>2]=x[Ca>>2]+68;return 0}function Hm(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-68;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];j=x[b+32>>2];k=x[b+36>>2];m=x[b+40>>2];l=x[b+44>>2];q=x[b+48>>2];r=x[b+52>>2];s=x[b+56>>2];t=x[b+60>>2];u=x[b+64>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;n=x[x[Ca>>2]>>2]}if(!Ba){a=ya-256|0;ya=a;v[a+252|0]=0;v[a+253|0]=0;v[a+254|0]=0;v[a+255|0]=0;v[a+249|0]=0;v[a+250|0]=0;v[a+251|0]=0;v[a+252|0]=0;v[a+248|0]=37;l=a+249|0;q=Em(l,9732,x[c+4>>2]);x[a+204>>2]=a+208;k=Ol()}a:{b:{if((Ba|0)==2|q){if(!Ba){i=x[c+8>>2];j=a- -64|0;x[j>>2]=g;x[j+4>>2]=h;x[a+56>>2]=e;x[a+60>>2]=f;x[a+48>>2]=i;m=a+208|0;l=a+48|0;j=a+248|0}if(!Ba|!n){i=wm(m,30,k,j,l);if((Ba|0)==1){break a}k=i}if(!Ba){break b}}if(!Ba){x[a+80>>2]=e;x[a+84>>2]=f;x[a+88>>2]=g;x[a+92>>2]=h;m=a+208|0;l=a+80|0;j=a+248|0}if(!Ba|(n|0)==1){i=wm(m,30,k,j,l);o=1;if((Ba|0)==1){break a}k=i}}if(!Ba){x[a+128>>2]=267;s=kl(a+196|0,0,a+128|0);m=(k|0)>=30;l=a+208|0;j=l}c:{d:{if((Ba|0)==2|m){if(!Ba){k=Ol()}e:{if((Ba|0)==2|q){if(!Ba){j=x[c+8>>2];x[a+16>>2]=g;x[a+20>>2]=h;x[a+8>>2]=e;x[a+12>>2]=f;x[a>>2]=j;m=a+204|0;j=a+248|0}if(!Ba|(n|0)==2){i=Fm(m,k,j,a);o=2;if((Ba|0)==1){break a}k=i}if(!Ba){break e}}if(!Ba){x[a+32>>2]=e;x[a+36>>2]=f;x[a+40>>2]=g;x[a+44>>2]=h;r=a+204|0;m=a+248|0;j=a+32|0}if(!Ba|(n|0)==3){i=Fm(r,k,m,j);o=3;if((Ba|0)==1){break a}k=i}}if(!Ba){if((k|0)==-1){break d}j=x[a+204>>2]}if(!Ba|(n|0)==4){ll(s,j);o=4;if((Ba|0)==1){break a}}if(!Ba){j=x[a+204>>2]}}if(!Ba){q=j+k|0;t=xm(j,q,c);x[a+128>>2]=267;j=kl(a+120|0,0,a+128|0);r=x[a+204>>2];m=(r|0)==(a+208|0)}f:{if(!Ba){if(m){k=a+128|0;break f}k=yg(k<<1);l=!k;if(l){break d}}if(!Ba|(n|0)==5){ll(j,k);o=5;if((Ba|0)==1){break a}}l=Ba?l:x[a+204>>2]}if(!Ba){m=a+108|0;vj(m,c);r=a+112|0;u=a+116|0}if(!Ba|(n|0)==6){Gm(l,t,q,k,u,r,m);o=6;if((Ba|0)==1){break a}}l=Ba?l:a+108|0;if(!Ba|(n|0)==7){Po(l);o=7;if((Ba|0)==1){break a}}if(!Ba){m=x[a+116>>2];l=x[a+112>>2]}if(!Ba|(n|0)==8){i=zm(b,k,m,l,c,d);o=8;if((Ba|0)==1){break a}c=i}if(!Ba|(n|0)==9){pl(j);o=9;if((Ba|0)==1){break a}}if(!Ba|(n|0)==10){pl(s);o=10;if((Ba|0)==1){break a}}if(!Ba){ya=a+256|0;break c}}if(!Ba){Ji();p()}}if(!Ba){return c|0}p()}x[x[Ca>>2]>>2]=o;x[Ca>>2]=x[Ca>>2]+4;i=x[Ca>>2];x[i>>2]=a;x[i+4>>2]=b;x[i+8>>2]=c;x[i+12>>2]=d;x[i+16>>2]=e;x[i+20>>2]=f;x[i+24>>2]=g;x[i+28>>2]=h;x[i+32>>2]=j;x[i+36>>2]=k;x[i+40>>2]=m;x[i+44>>2]=l;x[i+48>>2]=q;x[i+52>>2]=r;x[i+56>>2]=s;x[i+60>>2]=t;x[i+64>>2]=u;x[Ca>>2]=x[Ca>>2]+68;return 0}function Cc(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-56;d=x[Ca>>2];a=x[d>>2];b=x[d+4>>2];e=x[d+8>>2];f=x[d+16>>2];g=x[d+12>>2];l(0,g|0);l(1,f|0);c=+n();f=x[d+20>>2];g=x[d+24>>2];i=x[d+32>>2];k=x[d+28>>2];l(0,k|0);l(1,i|0);h=+n();i=x[d+36>>2];k=x[d+40>>2];r=x[d+48>>2];l(0,x[d+44>>2]);l(1,r|0);m=+n();r=x[d+52>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;q=x[x[Ca>>2]>>2]}if(!Ba){e=ya-32|0;ya=e;m=C[a+120>>3]*C[a+128>>3];a:{if(m>1.5){c=Jf(m+-.5);c=yf(c+c+8);break a}c=256;if(!(m<1)){break a}c=Jf(m);c=yf(c+c+8)}b=x[a+112>>2]>0;h=+x[a+16>>2];s=+x[a+20>>2];c=y[a+14|0]&16?c+c:c;c=c>s?s:c;c=c>2]=3736;C[e+16>>3]=m;C[e+8>>3]=c;b=x[a+104>>2];if(!b){break c}i=e+28|0;g=e+8|0;k=e+16|0;f=x[x[b>>2]+24>>2]}if(!Ba|!q){Ea[f|0](b,i,k,g);d=0;if((Ba|0)==1){break b}}}if(!Ba){c=c/m;h=+x[a+24>>2];b=!(c>2]<0;if(b){c=h;break d}x[e+28>>2]=2315;C[e+16>>3]=c;C[e+8>>3]=h;b=x[a+104>>2];if(!b){break c}i=e+28|0;g=e+8|0;k=e+16|0;f=x[x[b>>2]+24>>2]}if(!Ba|(q|0)==1){Ea[f|0](b,i,k,g);d=1;if((Ba|0)==1){break b}}if(!Ba){b=x[a+24>>2];c=+(b|0)}}if(!Ba){h=+x[a+32>>2];b=!(h>2]<=0;if(b){c=h;break e}x[e+28>>2]=2247;C[e+16>>3]=c;C[e+8>>3]=h;b=x[a+104>>2];if(!b){break c}i=e+28|0;g=e+8|0;k=e+16|0;f=x[x[b>>2]+24>>2]}if(!Ba|(q|0)==2){Ea[f|0](b,i,k,g);d=2;if((Ba|0)==1){break b}}if(!Ba){b=x[a+32>>2];c=+(b|0)}}if(!Ba){c=J(c);f:{if(F(c)<2147483648){b=~~c;break f}b=-2147483648}x[a+648>>2]=b;f=x[a+112>>2]>0}if((Ba|0)==2|f){if(!Ba){x[e+28>>2]=3661;c=+(b|0);C[e+16>>3]=c;C[e+8>>3]=m*c;b=x[a+104>>2];if(!b){break c}i=e+28|0;g=e+8|0;k=e+16|0;f=x[x[b>>2]+24>>2]}if(!Ba|(q|0)==3){Ea[f|0](b,i,k,g);d=3;if((Ba|0)==1){break b}}}if(!Ba){g=x[a+648>>2];f=(g|0)>2];b=x[a+112>>2]}g:{if((Ba|0)==2|f){if(!Ba){r=1;if((b|0)<=0){break g}x[e+16>>2]=9535;b=x[a+56>>2];if(!b){break c}g=e+16|0;f=x[x[b>>2]+24>>2]}if(!Ba|(q|0)==4){Ea[f|0](b,g);d=4;if((Ba|0)==1){break b}}if(!Ba){break g}}if(!Ba){if((b|0)<=0){break g}x[e+16>>2]=4706;b=x[a+56>>2];if(!b){break c}g=e+16|0;f=x[x[b>>2]+24>>2]}if(!Ba|(q|0)==5){Ea[f|0](b,g);d=5;if((Ba|0)==1){break b}}}if(!Ba){v[a+644|0]=r;ya=e+32|0;return}}if(!Ba){ac();p()}return}x[x[Ca>>2]>>2]=d;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=e;o(+c);a=j(1)|0;t=d,u=j(0)|0,x[t+12>>2]=u;x[d+16>>2]=a;x[d+20>>2]=f;x[d+24>>2]=g;o(+h);a=j(1)|0;t=d,u=j(0)|0,x[t+28>>2]=u;x[d+32>>2]=a;x[d+36>>2]=i;x[d+40>>2]=k;o(+m);a=j(1)|0;t=d,u=j(0)|0,x[t+44>>2]=u;x[d+48>>2]=a;x[d+52>>2]=r;x[Ca>>2]=x[Ca>>2]+56} +function Gc(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-40;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+12>>2];f=x[b+16>>2];n=x[b+20>>2];g=x[b+24>>2];i=x[b+28>>2];k=x[b+32>>2];m=x[b+36>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){m=ya-16|0;ya=m;k=x[a+12>>2];e=x[a+8>>2];a:{if((k|0)<(e|0)){g=e-k|0;break a}f=(e|0)>=(k|0);g=0;if(f){break a}g=x[a+16>>2]+(e-k|0)|0}e=(g|0)>=(c|0)}b:{c:{if(!Ba){if(e){g=c;break c}e=m+12|0}if(!Ba|!h){d=Ib(51780,12018,27);if((Ba|0)==1){break b}f=d}if(!Ba|(h|0)==1){d=Nh(f,c);j=1;if((Ba|0)==1){break b}c=d}if(!Ba|(h|0)==2){d=Ib(c,11032,17);j=2;if((Ba|0)==1){break b}c=d}if(!Ba|(h|0)==3){d=Nh(c,g);j=3;if((Ba|0)==1){break b}c=d}if(!Ba|(h|0)==4){d=Ib(c,7878,10);j=4;if((Ba|0)==1){break b}c=d}if(!Ba){f=x[x[c>>2]-12>>2]+c|0;vj(e,f);e=m+12|0}if(!Ba|(h|0)==5){d=il(e,52748);j=5;if((Ba|0)==1){break b}e=d}f=Ba?f:x[x[e>>2]+28>>2];if(!Ba|(h|0)==6){d=Ea[f|0](e,10)|0;j=6;if((Ba|0)==1){break b}e=d}f=Ba?f:m+12|0;if(!Ba|(h|0)==7){Po(f);j=7;if((Ba|0)==1){break b}}if(!Ba|(h|0)==8){Th(c,e);j=8;if((Ba|0)==1){break b}}if(!Ba|(h|0)==9){rh(c);j=9;if((Ba|0)==1){break b}}}if(!Ba){d:{if(!g){break d}e=x[a+4>>2];c=e+(k<<2)|0;d=x[a+16>>2];f=d-k|0;if((f|0)>=(g|0)){if((g|0)<=0){break d}f=g&3;e=0;a=0;if(g>>>0>=4){g=g&-4;while(1){C[(a<<3)+b>>3]=B[c+(a<<2)>>2];d=a|1;C[(d<<3)+b>>3]=B[c+(d<<2)>>2];d=a|2;C[(d<<3)+b>>3]=B[c+(d<<2)>>2];d=a|3;C[(d<<3)+b>>3]=B[c+(d<<2)>>2];a=a+4|0;i=i+4|0;if((g|0)!=(i|0)){continue}break}}if(!f){break d}while(1){C[(a<<3)+b>>3]=B[c+(a<<2)>>2];a=a+1|0;e=e+1|0;if((f|0)!=(e|0)){continue}break}break d}e:{if((f|0)<=0){break e}h=f&3;a=0;if(d+(k^-1)>>>0>=3){j=f&-4;while(1){C[(a<<3)+b>>3]=B[c+(a<<2)>>2];l=a|1;C[(l<<3)+b>>3]=B[c+(l<<2)>>2];l=a|2;C[(l<<3)+b>>3]=B[c+(l<<2)>>2];l=a|3;C[(l<<3)+b>>3]=B[c+(l<<2)>>2];a=a+4|0;n=n+4|0;if((j|0)!=(n|0)){continue}break}}if(!h){break e}while(1){C[(a<<3)+b>>3]=B[c+(a<<2)>>2];a=a+1|0;i=i+1|0;if((h|0)!=(i|0)){continue}break}}h=g-f|0;if((h|0)<=0){break d}b=(f<<3)+b|0;f=h&3;c=0;a=0;if((g+k|0)+(d^-1)>>>0>=3){g=h&-4;i=0;while(1){C[b+(a<<3)>>3]=B[e+(a<<2)>>2];d=a|1;C[b+(d<<3)>>3]=B[e+(d<<2)>>2];d=a|2;C[b+(d<<3)>>3]=B[e+(d<<2)>>2];d=a|3;C[b+(d<<3)>>3]=B[e+(d<<2)>>2];a=a+4|0;i=i+4|0;if((g|0)!=(i|0)){continue}break}}if(!f){break d}while(1){C[b+(a<<3)>>3]=B[e+(a<<2)>>2];a=a+1|0;c=c+1|0;if((f|0)!=(c|0)){continue}break}}ya=m+16|0}return}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=e;x[d+16>>2]=f;x[d+20>>2]=n;x[d+24>>2]=g;x[d+28>>2]=i;x[d+32>>2]=k;x[d+36>>2]=m;x[Ca>>2]=x[Ca>>2]+40}function $m(a,b,c,d,e,f,g,h){var i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-56;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];j=x[b+32>>2];k=x[b+36>>2];n=x[b+40>>2];o=x[b+44>>2];q=x[b+48>>2];r=x[b+52>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;l=x[x[Ca>>2]>>2]}if(!Ba){k=ya;j=k-16|0;ya=j;x[j+8>>2]=c;x[j+12>>2]=b;b=j+4|0;vj(b,d)}a:{if(!Ba|!l){i=sh(b);if((Ba|0)==1){break a}c=i}b=Ba?b:j+4|0;if(!Ba|(l|0)==1){Po(b);m=1;if((Ba|0)==1){break a}}if(!Ba){x[e>>2]=0;b=0}b:{while(1){if(!Ba){if(b|(g|0)==(h|0)){break b}k=j+8|0;b=j+12|0}if(!Ba|(l|0)==2){i=th(b,k);m=2;if((Ba|0)==1){break a}b=i}c:{if(!Ba){if(b){break c}b=v[g|0]}if(!Ba|(l|0)==3){i=an(c,b);m=3;if((Ba|0)==1){break a}b=i}b=Ba?b:(b|0)==37;d:{if(b|(Ba|0)==2){if(!Ba){b=g+1|0;if((h|0)==(b|0)){break c}k=0;b=v[b|0]}if(!Ba|(l|0)==4){i=an(c,b);m=4;if((Ba|0)==1){break a}b=i}n=Ba?n:(b|0)==69;e:{if(!Ba){f:{if(n){break f}o=1;if((b&255)==48){break f}n=b;break e}k=g+2|0;n=(k|0)==(h|0);if(n){break c}o=2;k=v[k|0]}if(!Ba|(l|0)==5){i=an(c,k);m=5;if((Ba|0)==1){break a}n=i}k=Ba?k:b}if(!Ba){q=x[j+8>>2];r=x[x[a>>2]+36>>2];b=x[j+12>>2]}if(!Ba|(l|0)==6){i=Ea[r|0](a,b,q,d,e,f,n,k)|0;m=6;if((Ba|0)==1){break a}b=i}if(!Ba){x[j+12>>2]=b;b=g+o|0;g=b+1|0;break d}}if(!Ba){b=vh(c,1,v[g|0])}if((Ba|0)==2|b){if(!Ba){while(1){g:{g=g+1|0;b=(h|0)==(g|0);if(b){g=h;break g}b=vh(c,1,v[g|0]);if(b){continue}}break}}while(1){if(!Ba){k=j+8|0;b=j+12|0}if(!Ba|(l|0)==7){i=th(b,k);m=7;if((Ba|0)==1){break a}b=i}if(!Ba){if(b){break d}b=j+12|0}if(!Ba|(l|0)==8){i=uh(b);m=8;if((Ba|0)==1){break a}b=i}if(!Ba){b=!vh(c,1,b);if(b){break d}b=j+12|0}if(!Ba|(l|0)==9){i=wh(b);m=9;if((Ba|0)==1){break a}b=i}if(!Ba){continue}break}}b=Ba?b:j+12|0;if(!Ba|(l|0)==10){i=uh(b);m=10;if((Ba|0)==1){break a}b=i}if(!Ba|(l|0)==11){i=ml(c,b);m=11;if((Ba|0)==1){break a}b=i}k=Ba?k:v[g|0];if(!Ba|(l|0)==12){i=ml(c,k);m=12;if((Ba|0)==1){break a}k=i}b=Ba?b:(b|0)==(k|0);if(b|(Ba|0)==2){if(!Ba){g=g+1|0;b=j+12|0}if(!Ba|(l|0)==13){i=wh(b);m=13;if((Ba|0)==1){break a}b=i}if(!Ba){break d}}if(!Ba){x[e>>2]=4}}if(!Ba){b=x[e>>2];continue}}break}if(!Ba){x[e>>2]=4}}if(!Ba){b=j+8|0;a=j+12|0}if(!Ba|(l|0)==14){i=th(a,b);m=14;if((Ba|0)==1){break a}a=i}if(!Ba){if(a){x[e>>2]=x[e>>2]|2}ya=j+16|0;return x[j+12>>2]}p()}x[x[Ca>>2]>>2]=m;x[Ca>>2]=x[Ca>>2]+4;i=x[Ca>>2];x[i>>2]=a;x[i+4>>2]=b;x[i+8>>2]=c;x[i+12>>2]=d;x[i+16>>2]=e;x[i+20>>2]=f;x[i+24>>2]=g;x[i+28>>2]=h;x[i+32>>2]=j;x[i+36>>2]=k;x[i+40>>2]=n;x[i+44>>2]=o;x[i+48>>2]=q;x[i+52>>2]=r;x[Ca>>2]=x[Ca>>2]+56;return 0}function ef(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0,m=0,q=0,r=0;r=Ba;i=ya-48|0;ya=i;o(+a);e=j(1)|0;d=j(0)|0;a:{b:{h=e&2147483647;c:{if(h>>>0<=1074752122){if((e&1048575)==598523){break c}if(h>>>0<=1073928572){if((e|0)>0|(e|0)>=0){c=a+-1.5707963267341256;a=c+-6077100506506192e-26;C[b>>3]=a;C[b+8>>3]=c-a+-6077100506506192e-26;d=1;break a}c=a+1.5707963267341256;a=c+6077100506506192e-26;C[b>>3]=a;C[b+8>>3]=c-a+6077100506506192e-26;d=-1;break a}if((e|0)>0|(e|0)>=0){c=a+-3.1415926534682512;a=c+-1.2154201013012384e-10;C[b>>3]=a;C[b+8>>3]=c-a+-1.2154201013012384e-10;d=2;break a}c=a+3.1415926534682512;a=c+1.2154201013012384e-10;C[b>>3]=a;C[b+8>>3]=c-a+1.2154201013012384e-10;d=-2;break a}if(h>>>0<=1075594811){if(h>>>0<=1075183036){if((h|0)==1074977148){break c}if((e|0)>0|(e|0)>=0){c=a+-4.712388980202377;a=c+-1.8231301519518578e-10;C[b>>3]=a;C[b+8>>3]=c-a+-1.8231301519518578e-10;d=3;break a}c=a+4.712388980202377;a=c+1.8231301519518578e-10;C[b>>3]=a;C[b+8>>3]=c-a+1.8231301519518578e-10;d=-3;break a}if((h|0)==1075388923){break c}if((e|0)>0|(e|0)>=0){c=a+-6.2831853069365025;a=c+-2.430840202602477e-10;C[b>>3]=a;C[b+8>>3]=c-a+-2.430840202602477e-10;d=4;break a}c=a+6.2831853069365025;a=c+2.430840202602477e-10;C[b>>3]=a;C[b+8>>3]=c-a+2.430840202602477e-10;d=-4;break a}if(h>>>0>1094263290){break b}}f=a*.6366197723675814+6755399441055744+-6755399441055744;c=a+f*-1.5707963267341256;g=f*6077100506506192e-26;q=c-g;e=q<-.7853981633974483;if(F(f)<2147483648){d=~~f}else{d=-2147483648}d:{if(e){d=d-1|0;f=f+-1;g=f*6077100506506192e-26;c=a+f*-1.5707963267341256;break d}if(!(q>.7853981633974483)){break d}d=d+1|0;f=f+1;g=f*6077100506506192e-26;c=a+f*-1.5707963267341256}a=c-g;C[b>>3]=a;o(+a);e=j(1)|0;j(0)|0;k=h>>>20|0;e:{if((k-(e>>>20&2047)|0)<17){break e}g=c;a=f*6077100506303966e-26;c=c-a;g=f*20222662487959506e-37-(g-c-a);a=c-g;C[b>>3]=a;o(+a);e=j(1)|0;j(0)|0;if((k-(e>>>20&2047)|0)<50){break e}g=c;a=f*20222662487111665e-37;c=c-a;g=f*84784276603689e-45-(g-c-a);a=c-g;C[b>>3]=a}C[b+8>>3]=c-a-g;break a}if(h>>>0>=2146435072){a=a-a;C[b>>3]=a;C[b+8>>3]=a;d=0;break a}l(0,d|0);l(1,e&1048575|1096810496);a=+n();d=0;m=1;while(1){k=(i+16|0)+(d<<3)|0;if(F(a)<2147483648){d=~~a}else{d=-2147483648}c=+(d|0);C[k>>3]=c;a=(a-c)*16777216;d=1;k=m;m=0;if(k){continue}break}C[i+32>>3]=a;d=2;while(1){k=d;d=d-1|0;m=i+16|0;if(C[m+(k<<3)>>3]==0){continue}break}d=df(m,i,(h>>>20|0)-1046|0,k+1|0,1);if((Ba|0)!=(r|0)){p()}a=C[i>>3];if((e|0)<0){C[b>>3]=-a;C[b+8>>3]=-C[i+8>>3];d=0-d|0;break a}C[b>>3]=a;C[b+8>>3]=C[i+8>>3]}ya=i+48|0;return d}function hl(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,w=0,z=0,A=0,B=0,C=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-88;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];i=x[b+28>>2];j=x[b+32>>2];l=x[b+36>>2];m=x[b+40>>2];k=x[b+44>>2];n=x[b+48>>2];q=x[b+52>>2];u=x[b+56>>2];s=x[b+60>>2];w=x[b+64>>2];z=x[b+68>>2];A=x[b+72>>2];t=x[b+76>>2];B=x[b+80>>2];C=x[b+84>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;o=x[x[Ca>>2]>>2]}if(!Ba){m=ya-128|0;ya=m;x[m+124>>2]=b;l=jl(c,d);x[m+16>>2]=267;k=m+16|0;u=kl(m+8|0,0,k);b=l>>>0>=101}a:{b:{c:{if((Ba|0)==2|b){if(!Ba){k=yg(l);b=!k;if(b){break c}}if(!Ba|!o){ll(u,k);if((Ba|0)==1){break a}}}if(!Ba){j=k;b=c}while(1){i=Ba?i:(b|0)==(d|0);s=Ba?s:i;if(s|(Ba|0)==2){d:while(1){b=Ba?b:m+124|0;if(!Ba|(o|0)==1){h=th(a,b);r=1;if((Ba|0)==1){break a}b=h}b=Ba?b:l?b:1;if(b|(Ba|0)==2){b=Ba?b:m+124|0;if(!Ba|(o|0)==2){h=th(a,b);r=2;if((Ba|0)==1){break a}a=h}if(!Ba){if(a){x[f>>2]=x[f>>2]|2}break b}}if(!Ba|(o|0)==3){h=uh(a);r=3;if((Ba|0)==1){break a}b=h}if(!Ba){w=0;q=z+1|0}A=Ba?A:g;if((!A|(Ba|0)==2)&(!Ba|(o|0)==4)){h=ml(e,b);r=4;if((Ba|0)==1){break a}b=h}if(!Ba){C=b&255;j=k;b=c}while(1){i=Ba?i:(b|0)==(d|0);t=Ba?t:i;if(t|(Ba|0)==2){if(!Ba){z=q;b=!w;if(b){continue d}}if(!Ba|(o|0)==5){h=wh(a);r=5;if((Ba|0)==1){break a}b=h}if(!Ba){j=k;b=c;i=l+n>>>0<2;if(i){continue d}while(1){i=(b|0)==(d|0);if(i){continue d}e:{if(y[j|0]!=2){break e}if((ui(b)|0)==(q|0)){break e}v[j|0]=0;n=n-1|0}j=j+1|0;b=b+12|0;continue}}}if(!t|(Ba|0)==2){i=Ba?i:y[j|0]!=1;f:{if(!Ba){if(i){break f}i=y[nl(b,z)|0]}B=Ba?B:g;if(!B|(Ba|0)==2){i=Ba?i:i<<24>>24;if(!Ba|(o|0)==6){h=ml(e,i);r=6;if((Ba|0)==1){break a}i=h}}if(!Ba){i=(i&255)==(C|0);g:{if(i){w=1;i=(ui(b)|0)!=(q|0);if(i){break f}v[j|0]=2;n=n+1|0;break g}v[j|0]=0}l=l-1|0}}if(!Ba){j=j+1|0;b=b+12|0;continue}}break}break}}if(!Ba&(!s|(Ba|0)==2)){i=ol(b);q=i?2:1;v[j|0]=q;j=j+1|0;b=b+12|0;n=i+n|0;l=l-i|0;continue}break}}if(!Ba){Ji();p()}}if(!Ba){h:{i:{while(1){if((c|0)==(d|0)){break i}if(y[k|0]!=2){k=k+1|0;c=c+12|0;continue}break}d=c;break h}x[f>>2]=x[f>>2]|4}}if(!Ba|(o|0)==7){pl(u);r=7;if((Ba|0)==1){break a}}if(!Ba){ya=m+128|0;return d}p()}x[x[Ca>>2]>>2]=r;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=i;x[h+32>>2]=j;x[h+36>>2]=l;x[h+40>>2]=m;x[h+44>>2]=k;x[h+48>>2]=n;x[h+52>>2]=q;x[h+56>>2]=u;x[h+60>>2]=s;x[h+64>>2]=w;x[h+68>>2]=z;x[h+72>>2]=A;x[h+76>>2]=t;x[h+80>>2]=B;x[h+84>>2]=C;x[Ca>>2]=x[Ca>>2]+88;return 0}function ao(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-52;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];i=x[b+28>>2];j=x[b+32>>2];n=x[b+36>>2];l=x[b+40>>2];o=x[b+44>>2];q=x[b+48>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;m=x[x[Ca>>2]>>2]}if(!Ba){a=ya-448|0;ya=a;x[a+440>>2]=c;x[a+444>>2]=b;x[a+20>>2]=268;j=a+32|0;l=a+20|0;o=kl(a+24|0,j,l);b=a+16|0;vj(b,e)}a:{if(!Ba|!m){h=bi(b);if((Ba|0)==1){break a}b=h}if(!Ba){v[a+15|0]=0;j=a+444|0;l=a+16|0;i=a+15|0;n=a+20|0;q=a+432|0;e=x[e+4>>2]}if(!Ba|(m|0)==1){h=_n(j,c,d,l,e,f,i,b,o,n,q);k=1;if((Ba|0)==1){break a}c=h}if((Ba|0)==2|c){if(!Ba){c=ya-16|0;ya=c;b:{if(ti(g)){d=x[g>>2];x[c+12>>2]=0;e=c+12|0;bo(d,e);mj(g,0);break b}x[c+8>>2]=0;d=c+8|0;bo(g,d);bj(g,0)}ya=c+16|0;c=y[a+15|0]}if((Ba|0)==2|c){if(!Ba|(m|0)==2){h=tj(b,45);k=2;if((Ba|0)==1){break a}c=h}if(!Ba|(m|0)==3){mr(g,c);k=3;if((Ba|0)==1){break a}}}if(!Ba|(m|0)==4){h=tj(b,48);k=4;if((Ba|0)==1){break a}b=h}if(!Ba){c=x[o>>2];d=x[a+20>>2];e=d-4|0;while(1){if(!(x[c>>2]!=(b|0)|c>>>0>=e>>>0)){c=c+4|0;continue}break}l=ya-16|0;ya=l;e=ui(g);b=co(g);j=eo(c,d);i=!j}c:{if(!Ba){if(i){break c}h=ri(g);n=(ri(g)+(ui(g)<<2)|0)+4|0;i=!Dq(h,n,c)}k=(Ba|0)==2;if(k|i){i=Ba?i:b-e>>>0>>0;if(k|i){i=Ba?i:(e-b|0)+j|0;if(!Ba|(m|0)==5){fo(g,b,i,e,e);k=5;if((Ba|0)==1){break a}}}if(!Ba){b=ri(g)+(e<<2)|0;while(1){if((c|0)!=(d|0)){bo(b,c);c=c+4|0;b=b+4|0;continue}break}x[l+4>>2]=0;c=l+4|0;bo(b,c);b=e+j|0;Rn(g,b);break c}}if(!Ba){e=ya-16|0;ya=e;b=l+4|0}if(!Ba|(m|0)==6){bl(b,c,d);k=6;if((Ba|0)==1){break a}}if(!Ba){ya=e+16|0;c=b;i=ri(b);b=ui(b);j=ya-16|0;ya=j;e=co(g);d=ui(g);n=e-d>>>0>=b>>>0}d:{if(!Ba){if(n){if(!b){break d}e=ri(g);Zh(e+(d<<2)|0,i,b);b=b+d|0;Rn(g,b);x[j+12>>2]=0;b=(b<<2)+e|0;bo(b,j+12|0);break d}n=(b-e|0)+d|0}if(!Ba|(m|0)==7){kr(g,e,n,d,d,0,b,i);k=7;if((Ba|0)==1){break a}}}if(!Ba){ya=j+16|0;b=lr(c)}}if(!Ba){b=l+16|0;ya=b}}if(!Ba){c=a+440|0;b=a+444|0}if(!Ba|(m|0)==8){h=ci(b,c);k=8;if((Ba|0)==1){break a}b=h}if(!Ba){if(b){x[f>>2]=x[f>>2]|2}c=x[a+444>>2];b=a+16|0}if(!Ba|(m|0)==9){Po(b);k=9;if((Ba|0)==1){break a}}if(!Ba|(m|0)==10){pl(o);k=10;if((Ba|0)==1){break a}}if(!Ba){ya=a+448|0;return c|0}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=i;x[h+32>>2]=j;x[h+36>>2]=n;x[h+40>>2]=l;x[h+44>>2]=o;x[h+48>>2]=q;x[Ca>>2]=x[Ca>>2]+52;return 0}function Pn(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-52;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];i=x[b+28>>2];j=x[b+32>>2];l=x[b+36>>2];n=x[b+40>>2];o=x[b+44>>2];q=x[b+48>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;m=x[x[Ca>>2]>>2]}if(!Ba){a=ya-144|0;ya=a;x[a+136>>2]=c;x[a+140>>2]=b;x[a+20>>2]=268;l=a+32|0;j=a+20|0;o=kl(a+24|0,l,j);b=a+16|0;vj(b,e)}a:{if(!Ba|!m){h=sh(b);if((Ba|0)==1){break a}b=h}if(!Ba){v[a+15|0]=0;l=a+140|0;j=a+16|0;i=a+15|0;n=a+20|0;q=a+132|0;e=x[e+4>>2]}if(!Ba|(m|0)==1){h=Kn(l,c,d,j,e,f,i,b,o,n,q);k=1;if((Ba|0)==1){break a}c=h}if((Ba|0)==2|c){if(!Ba){c=ya-16|0;ya=c;b:{if(ti(g)){d=x[g>>2];v[c+15|0]=0;e=c+15|0;cj(d,e);mj(g,0);break b}v[c+14|0]=0;d=c+14|0;cj(g,d);bj(g,0)}ya=c+16|0;c=y[a+15|0]}if((Ba|0)==2|c){if(!Ba|(m|0)==2){h=rj(b,45);k=2;if((Ba|0)==1){break a}c=h}if(!Ba|(m|0)==3){jr(g,c);k=3;if((Ba|0)==1){break a}}}if(!Ba|(m|0)==4){h=rj(b,48);k=4;if((Ba|0)==1){break a}b=h}if(!Ba){c=x[o>>2];d=x[a+20>>2];e=d-1|0;b=b&255;while(1){if(!((b|0)!=y[c|0]|c>>>0>=e>>>0)){c=c+1|0;continue}break}l=ya-16|0;ya=l;e=ui(g);b=vi(g);j=fj(c,d);i=!j}c:{if(!Ba){if(i){break c}h=ri(g);n=(ri(g)+ui(g)|0)+1|0;i=!Dq(h,n,c)}k=(Ba|0)==2;if(k|i){i=Ba?i:b-e>>>0>>0;if(k|i){i=Ba?i:(e-b|0)+j|0;if(!Ba|(m|0)==5){Qn(g,b,i,e,e);k=5;if((Ba|0)==1){break a}}}if(!Ba){b=ri(g)+e|0;while(1){if((c|0)!=(d|0)){cj(b,c);c=c+1|0;b=b+1|0;continue}break}v[l+15|0]=0;c=l+15|0;cj(b,c);b=e+j|0;Rn(g,b);break c}}if(!Ba){b=ya-16|0;ya=b}if(!Ba|(m|0)==6){si(l,c,d);k=6;if((Ba|0)==1){break a}}if(!Ba){ya=b+16|0;c=l;i=ri(c);b=ui(c);j=ya-16|0;ya=j;e=vi(g);d=ui(g);n=e-d>>>0>=b>>>0}d:{if(!Ba){if(n){if(!b){break d}e=ri(g);gh(e+d|0,i,b);b=b+d|0;Rn(g,b);v[j+15|0]=0;b=b+e|0;cj(b,j+15|0);break d}n=(b-e|0)+d|0}if(!Ba|(m|0)==7){gr(g,e,n,d,d,0,b,i);k=7;if((Ba|0)==1){break a}}}if(!Ba){ya=j+16|0;b=hr(c)}}if(!Ba){b=l+16|0;ya=b}}if(!Ba){c=a+136|0;b=a+140|0}if(!Ba|(m|0)==8){h=th(b,c);k=8;if((Ba|0)==1){break a}b=h}if(!Ba){if(b){x[f>>2]=x[f>>2]|2}c=x[a+140>>2];b=a+16|0}if(!Ba|(m|0)==9){Po(b);k=9;if((Ba|0)==1){break a}}if(!Ba|(m|0)==10){pl(o);k=10;if((Ba|0)==1){break a}}if(!Ba){ya=a+144|0;return c|0}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=i;x[h+32>>2]=j;x[h+36>>2]=l;x[h+40>>2]=n;x[h+44>>2]=o;x[h+48>>2]=q;x[Ca>>2]=x[Ca>>2]+52;return 0}function ro(a,b,c,d,e,f,g,h,i,j){var k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];i=x[b+32>>2];j=x[b+36>>2];l=x[b+40>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;m=x[x[Ca>>2]>>2]}if(!Ba){l=ya-16|0;ya=l}a:{b:{if((Ba|0)==2|a){if(!Ba|!m){k=go(c);if((Ba|0)==1){break a}c=k}c:{if((Ba|0)==2|b){a=Ba?a:l+4|0;if(!Ba|(m|0)==1){Tn(a,c);n=1;if((Ba|0)==1){break a}}if(!Ba){a=x[l+4>>2];v[d|0]=a;v[d+1|0]=a>>>8;v[d+2|0]=a>>>16;v[d+3|0]=a>>>24;a=l+4|0}if(!Ba|(m|0)==2){Un(a,c);n=2;if((Ba|0)==1){break a}}if(!Ba){a=l+4|0;ho(i,a);a=lr(a);break c}}a=Ba?a:l+4|0;if(!Ba|(m|0)==3){no(a,c);n=3;if((Ba|0)==1){break a}}if(!Ba){a=x[l+4>>2];v[d|0]=a;v[d+1|0]=a>>>8;v[d+2|0]=a>>>16;v[d+3|0]=a>>>24;a=l+4|0}if(!Ba|(m|0)==4){gl(a,c);n=4;if((Ba|0)==1){break a}}if(!Ba){a=l+4|0;ho(i,a);a=lr(a)}}if(!Ba|(m|0)==5){k=lm(c);n=5;if((Ba|0)==1){break a}a=k}if(!Ba){x[e>>2]=a}if(!Ba|(m|0)==6){k=mm(c);n=6;if((Ba|0)==1){break a}a=k}if(!Ba){x[f>>2]=a;a=l+4|0}if(!Ba|(m|0)==7){nm(a,c);n=7;if((Ba|0)==1){break a}}if(!Ba){a=l+4|0;mi(g,a);hr(a)}if(!Ba|(m|0)==8){fl(a,c);n=8;if((Ba|0)==1){break a}}if(!Ba){a=l+4|0;ho(h,a);a=lr(a)}if(!Ba|(m|0)==9){k=Vn(c);n=9;if((Ba|0)==1){break a}a=k}if(!Ba){break b}}if(!Ba|(m|0)==10){k=io(c);n=10;if((Ba|0)==1){break a}c=k}d:{if((Ba|0)==2|b){a=Ba?a:l+4|0;if(!Ba|(m|0)==11){Tn(a,c);n=11;if((Ba|0)==1){break a}}if(!Ba){a=x[l+4>>2];v[d|0]=a;v[d+1|0]=a>>>8;v[d+2|0]=a>>>16;v[d+3|0]=a>>>24;a=l+4|0}if(!Ba|(m|0)==12){Un(a,c);n=12;if((Ba|0)==1){break a}}if(!Ba){a=l+4|0;ho(i,a);a=lr(a);break d}}a=Ba?a:l+4|0;if(!Ba|(m|0)==13){no(a,c);n=13;if((Ba|0)==1){break a}}if(!Ba){a=x[l+4>>2];v[d|0]=a;v[d+1|0]=a>>>8;v[d+2|0]=a>>>16;v[d+3|0]=a>>>24;a=l+4|0}if(!Ba|(m|0)==14){gl(a,c);n=14;if((Ba|0)==1){break a}}if(!Ba){a=l+4|0;ho(i,a);a=lr(a)}}if(!Ba|(m|0)==15){k=lm(c);n=15;if((Ba|0)==1){break a}a=k}if(!Ba){x[e>>2]=a}if(!Ba|(m|0)==16){k=mm(c);n=16;if((Ba|0)==1){break a}a=k}if(!Ba){x[f>>2]=a;a=l+4|0}if(!Ba|(m|0)==17){nm(a,c);n=17;if((Ba|0)==1){break a}}if(!Ba){a=l+4|0;mi(g,a);hr(a)}if(!Ba|(m|0)==18){fl(a,c);n=18;if((Ba|0)==1){break a}}if(!Ba){a=l+4|0;ho(h,a);a=lr(a)}if(!Ba|(m|0)==19){k=Vn(c);n=19;if((Ba|0)==1){break a}a=k}}if(!Ba){x[j>>2]=a;ya=l+16|0}return}x[x[Ca>>2]>>2]=n;x[Ca>>2]=x[Ca>>2]+4;k=x[Ca>>2];x[k>>2]=a;x[k+4>>2]=b;x[k+8>>2]=c;x[k+12>>2]=d;x[k+16>>2]=e;x[k+20>>2]=f;x[k+24>>2]=g;x[k+28>>2]=h;x[k+32>>2]=i;x[k+36>>2]=j;x[k+40>>2]=l;x[Ca>>2]=x[Ca>>2]+44}function lo(a,b,c,d,e,f,g,h,i,j){var k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];h=x[b+28>>2];i=x[b+32>>2];j=x[b+36>>2];l=x[b+40>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;m=x[x[Ca>>2]>>2]}if(!Ba){l=ya-16|0;ya=l}a:{b:{if((Ba|0)==2|a){if(!Ba|!m){k=Sn(c);if((Ba|0)==1){break a}c=k}c:{if((Ba|0)==2|b){a=Ba?a:l+4|0;if(!Ba|(m|0)==1){Tn(a,c);n=1;if((Ba|0)==1){break a}}if(!Ba){a=x[l+4>>2];v[d|0]=a;v[d+1|0]=a>>>8;v[d+2|0]=a>>>16;v[d+3|0]=a>>>24;a=l+4|0}if(!Ba|(m|0)==2){Un(a,c);n=2;if((Ba|0)==1){break a}}if(!Ba){a=l+4|0;mi(i,a);a=hr(a);break c}}a=Ba?a:l+4|0;if(!Ba|(m|0)==3){no(a,c);n=3;if((Ba|0)==1){break a}}if(!Ba){a=x[l+4>>2];v[d|0]=a;v[d+1|0]=a>>>8;v[d+2|0]=a>>>16;v[d+3|0]=a>>>24;a=l+4|0}if(!Ba|(m|0)==4){gl(a,c);n=4;if((Ba|0)==1){break a}}if(!Ba){a=l+4|0;mi(i,a);a=hr(a)}}if(!Ba|(m|0)==5){k=lm(c);n=5;if((Ba|0)==1){break a}a=k}if(!Ba){v[e|0]=a}if(!Ba|(m|0)==6){k=mm(c);n=6;if((Ba|0)==1){break a}a=k}if(!Ba){v[f|0]=a;a=l+4|0}if(!Ba|(m|0)==7){nm(a,c);n=7;if((Ba|0)==1){break a}}if(!Ba){a=l+4|0;mi(g,a);hr(a)}if(!Ba|(m|0)==8){fl(a,c);n=8;if((Ba|0)==1){break a}}if(!Ba){a=l+4|0;mi(h,a);a=hr(a)}if(!Ba|(m|0)==9){k=Vn(c);n=9;if((Ba|0)==1){break a}a=k}if(!Ba){break b}}if(!Ba|(m|0)==10){k=Wn(c);n=10;if((Ba|0)==1){break a}c=k}d:{if((Ba|0)==2|b){a=Ba?a:l+4|0;if(!Ba|(m|0)==11){Tn(a,c);n=11;if((Ba|0)==1){break a}}if(!Ba){a=x[l+4>>2];v[d|0]=a;v[d+1|0]=a>>>8;v[d+2|0]=a>>>16;v[d+3|0]=a>>>24;a=l+4|0}if(!Ba|(m|0)==12){Un(a,c);n=12;if((Ba|0)==1){break a}}if(!Ba){a=l+4|0;mi(i,a);a=hr(a);break d}}a=Ba?a:l+4|0;if(!Ba|(m|0)==13){no(a,c);n=13;if((Ba|0)==1){break a}}if(!Ba){a=x[l+4>>2];v[d|0]=a;v[d+1|0]=a>>>8;v[d+2|0]=a>>>16;v[d+3|0]=a>>>24;a=l+4|0}if(!Ba|(m|0)==14){gl(a,c);n=14;if((Ba|0)==1){break a}}if(!Ba){a=l+4|0;mi(i,a);a=hr(a)}}if(!Ba|(m|0)==15){k=lm(c);n=15;if((Ba|0)==1){break a}a=k}if(!Ba){v[e|0]=a}if(!Ba|(m|0)==16){k=mm(c);n=16;if((Ba|0)==1){break a}a=k}if(!Ba){v[f|0]=a;a=l+4|0}if(!Ba|(m|0)==17){nm(a,c);n=17;if((Ba|0)==1){break a}}if(!Ba){a=l+4|0;mi(g,a);hr(a)}if(!Ba|(m|0)==18){fl(a,c);n=18;if((Ba|0)==1){break a}}if(!Ba){a=l+4|0;mi(h,a);a=hr(a)}if(!Ba|(m|0)==19){k=Vn(c);n=19;if((Ba|0)==1){break a}a=k}}if(!Ba){x[j>>2]=a;ya=l+16|0}return}x[x[Ca>>2]>>2]=n;x[Ca>>2]=x[Ca>>2]+4;k=x[Ca>>2];x[k>>2]=a;x[k+4>>2]=b;x[k+8>>2]=c;x[k+12>>2]=d;x[k+16>>2]=e;x[k+20>>2]=f;x[k+24>>2]=g;x[k+28>>2]=h;x[k+32>>2]=i;x[k+36>>2]=j;x[k+40>>2]=l;x[Ca>>2]=x[Ca>>2]+44}function Vl(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,w=0,z=0,A=0,B=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-84;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];i=x[b+28>>2];j=x[b+32>>2];l=x[b+36>>2];m=x[b+40>>2];k=x[b+44>>2];n=x[b+48>>2];q=x[b+52>>2];s=x[b+56>>2];w=x[b+60>>2];t=x[b+64>>2];z=x[b+68>>2];A=x[b+72>>2];u=x[b+76>>2];B=x[b+80>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;o=x[x[Ca>>2]>>2]}if(!Ba){m=ya-128|0;ya=m;x[m+124>>2]=b;l=jl(c,d);x[m+16>>2]=267;k=m+16|0;w=kl(m+8|0,0,k);b=l>>>0>=101}a:{b:{c:{if((Ba|0)==2|b){if(!Ba){k=yg(l);b=!k;if(b){break c}}if(!Ba|!o){ll(w,k);if((Ba|0)==1){break a}}}if(!Ba){j=k;b=c}while(1){i=Ba?i:(b|0)==(d|0);t=Ba?t:i;if(t|(Ba|0)==2){d:while(1){b=Ba?b:m+124|0;if(!Ba|(o|0)==1){h=ci(a,b);r=1;if((Ba|0)==1){break a}b=h}b=Ba?b:l?b:1;if(b|(Ba|0)==2){b=Ba?b:m+124|0;if(!Ba|(o|0)==2){h=ci(a,b);r=2;if((Ba|0)==1){break a}a=h}if(!Ba){if(a){x[f>>2]=x[f>>2]|2}break b}}if(!Ba|(o|0)==3){h=di(a);r=3;if((Ba|0)==1){break a}s=h}b=Ba?b:!g;if(!Ba|(o|0)==4?b|(Ba|0)==2:0){h=rj(e,s);r=4;if((Ba|0)==1){break a}s=h}if(!Ba){q=z+1|0;A=0;j=k;b=c}while(1){i=Ba?i:(b|0)==(d|0);u=Ba?u:i;if(u|(Ba|0)==2){if(!Ba){z=q;b=!A;if(b){continue d}}if(!Ba|(o|0)==5){h=fi(a);r=5;if((Ba|0)==1){break a}b=h}if(!Ba){j=k;b=c;i=l+n>>>0<2;if(i){continue d}while(1){i=(b|0)==(d|0);if(i){continue d}e:{if(y[j|0]!=2){break e}if((ui(b)|0)==(q|0)){break e}v[j|0]=0;n=n-1|0}j=j+1|0;b=b+12|0;continue}}}if(!u|(Ba|0)==2){i=Ba?i:y[j|0]!=1;f:{if(!Ba){if(i){break f}i=x[Wl(b,z)>>2]}B=Ba?B:g;if((!B|(Ba|0)==2)&(!Ba|(o|0)==6)){h=rj(e,i);r=6;if((Ba|0)==1){break a}i=h}if(!Ba){i=(i|0)==(s|0);g:{if(i){A=1;i=(ui(b)|0)!=(q|0);if(i){break f}v[j|0]=2;n=n+1|0;break g}v[j|0]=0}l=l-1|0}}if(!Ba){j=j+1|0;b=b+12|0;continue}}break}break}}if(!Ba&(!t|(Ba|0)==2)){i=ol(b);q=i?2:1;v[j|0]=q;j=j+1|0;b=b+12|0;n=i+n|0;l=l-i|0;continue}break}}if(!Ba){Ji();p()}}if(!Ba){h:{i:{while(1){if((c|0)==(d|0)){break i}if(y[k|0]!=2){k=k+1|0;c=c+12|0;continue}break}d=c;break h}x[f>>2]=x[f>>2]|4}}if(!Ba|(o|0)==7){pl(w);r=7;if((Ba|0)==1){break a}}if(!Ba){ya=m+128|0;return d}p()}x[x[Ca>>2]>>2]=r;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=i;x[h+32>>2]=j;x[h+36>>2]=l;x[h+40>>2]=m;x[h+44>>2]=k;x[h+48>>2]=n;x[h+52>>2]=q;x[h+56>>2]=s;x[h+60>>2]=w;x[h+64>>2]=t;x[h+68>>2]=z;x[h+72>>2]=A;x[h+76>>2]=u;x[h+80>>2]=B;x[Ca>>2]=x[Ca>>2]+84;return 0}function Ke(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];d=x[b+4>>2];f=x[b+8>>2];e=x[b+16>>2];g=x[b+20>>2];j=x[b+24>>2];b=x[b+12>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){d=a+16|0;c=x[d+536>>2];x[d+536>>2]=0;if(c){a=x[c+28>>2];if(a){x[c+32>>2]=a;zg(a)}a=x[c+16>>2];if(a){x[c+20>>2]=a;zg(a)}f=x[c+4>>2];if(f){x[c+8>>2]=f;zg(f)}zg(c)}a=x[d+532>>2];x[d+532>>2]=0}a:{if((Ba|0)==2|a){b=Ba?b:x[x[a>>2]+4>>2];if(!Ba|!h){Ea[b|0](a);if((Ba|0)==1){break a}}}if(!Ba){a=x[d+528>>2];x[d+528>>2]=0}if((Ba|0)==2|a){b=Ba?b:x[x[a>>2]+4>>2];if(!Ba|(h|0)==1){Ea[b|0](a);i=1;if((Ba|0)==1){break a}}}if(!Ba){a=x[d+516>>2];if(a){x[d+520>>2]=a;zg(a)}a=x[d+504>>2];if(a){x[d+508>>2]=a;zg(a)}c=x[d+92>>2];x[d+92>>2]=0;if(c){b=c- -64|0;a=x[b>>2];if(a){x[c+68>>2]=a;zg(a)}x[c+36>>2]=15872;a=x[c+40>>2];if(a){x[c+44>>2]=a;zg(a)}f=x[c+24>>2];if(f){x[c+28>>2]=f;zg(f)}zg(c)}a=x[d+80>>2];if(a){x[d+84>>2]=a;zg(a)}a=x[d+68>>2];if(a){x[d+72>>2]=a;zg(a)}a=x[d+64>>2];x[d+64>>2]=0}if((Ba|0)==2|a){g=Ba?g:a+48|0;while(1){b:{if(!Ba){f=x[a+60>>2];e=x[a+56>>2];c:{if((f|0)<(e|0)){c=e-f|0;break c}b=(e|0)>=(f|0);if(b){break b}j=x[a+64>>2];c=j+(e-f|0)|0}b=(c|0)<=0;if(b){break b}}if(!Ba|(h|0)==2){c=Lc(g);i=2;if((Ba|0)==1){break a}e=c}if(!Ba){b=!e;if(b){continue}zg(e);continue}}break}if(!Ba){b=x[a+40>>2];if(b){zg(b)}e=x[a+44>>2];if(e){zg(e)}x[a+48>>2]=15816;b=!y[a+68|0]}d:{if(!Ba){if(b){break d}b=!hg(Pf());if(b){break d}}if(!Ba|(h|0)==3){Yf();i=3;if((Ba|0)==1){break a}}}if(!Ba){c=x[a+52>>2];if(c){zg(c)}e=x[a+36>>2];x[a+36>>2]=0}if((Ba|0)==2|e){b=Ba?b:x[x[e>>2]+4>>2];if(!Ba|(h|0)==4){Ea[b|0](e);i=4;if((Ba|0)==1){break a}}}if(!Ba){g=x[a+32>>2];x[a+32>>2]=0}if((Ba|0)==2|g){f=Ba?f:x[g>>2];if(f|(Ba|0)==2){if(!Ba){e=x[g+4>>2];j=(e|0)!=(f|0);b=f}if((Ba|0)==2|j){while(1){if(!Ba){e=e-52|0;b=x[x[e>>2]>>2]}if(!Ba|(h|0)==5){c=Ea[b|0](e)|0;i=5;if((Ba|0)==1){break a}b=c}if(!Ba){b=(e|0)!=(f|0);if(b){continue}}break}if(!Ba){b=x[g>>2]}}if(!Ba){x[g+4>>2]=f;zg(b)}}if(!Ba){zg(g)}}if(!Ba){zg(a)}}if(!Ba){a=x[d+48>>2];if(a){x[d+52>>2]=a;zg(a)}a=x[d+36>>2];if(a){x[d+40>>2]=a;zg(a)}a=x[d+24>>2];if(a){x[d+28>>2]=a;zg(a)}a=x[d+12>>2];if(a){x[d+16>>2]=a;zg(a)}a=x[d+4>>2]}if(!Ba|(h|0)==6){Pe(d,a);i=6;if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=d;x[c+8>>2]=f;x[c+12>>2]=b;x[c+16>>2]=e;x[c+20>>2]=g;x[c+24>>2]=j;x[Ca>>2]=x[Ca>>2]+28}function Um(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;var f=0,g=0,h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0,w=0,y=0,z=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-60;f=x[Ca>>2];a=x[f>>2];c=x[f+8>>2];d=x[f+12>>2];g=x[f+20>>2];b=x[f+16>>2];l(0,b|0);l(1,g|0);e=+n();h=x[f+24>>2];g=x[f+28>>2];k=x[f+32>>2];i=x[f+36>>2];r=x[f+40>>2];s=x[f+44>>2];t=x[f+48>>2];u=x[f+52>>2];w=x[f+56>>2];b=x[f+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;m=x[x[Ca>>2]>>2]}if(!Ba){a=ya-368|0;ya=a;v[a+364|0]=0;v[a+365|0]=0;v[a+366|0]=0;v[a+367|0]=0;v[a+361|0]=0;v[a+362|0]=0;v[a+363|0]=0;v[a+364|0]=0;v[a+360|0]=37;i=a+361|0;r=Em(i,12219,x[c+4>>2]);x[a+316>>2]=a+320;g=Ol()}a:{b:{if((Ba|0)==2|r){if(!Ba){h=x[c+8>>2];C[a+40>>3]=e;x[a+32>>2]=h;k=a+320|0;i=a+32|0;h=a+360|0}if(!Ba|!m){f=wm(k,30,g,h,i);if((Ba|0)==1){break a}g=f}if(!Ba){break b}}if(!Ba){C[a+48>>3]=e;k=a+320|0;i=a+48|0;h=a+360|0}if(!Ba|(m|0)==1){f=wm(k,30,g,h,i);q=1;if((Ba|0)==1){break a}g=f}}if(!Ba){x[a+80>>2]=267;t=kl(a+308|0,0,a+80|0);k=(g|0)>=30;i=a+320|0;h=i}c:{d:{if((Ba|0)==2|k){if(!Ba){g=Ol()}e:{if((Ba|0)==2|r){if(!Ba){h=x[c+8>>2];C[a+8>>3]=e;x[a>>2]=h;k=a+316|0;h=a+360|0}if(!Ba|(m|0)==2){f=Fm(k,g,h,a);q=2;if((Ba|0)==1){break a}g=f}if(!Ba){break e}}if(!Ba){C[a+16>>3]=e;s=a+316|0;k=a+360|0;h=a+16|0}if(!Ba|(m|0)==3){f=Fm(s,g,k,h);q=3;if((Ba|0)==1){break a}g=f}}if(!Ba){if((g|0)==-1){break d}h=x[a+316>>2]}if(!Ba|(m|0)==4){ll(t,h);q=4;if((Ba|0)==1){break a}}if(!Ba){h=x[a+316>>2]}}if(!Ba){r=g+h|0;u=xm(h,r,c);x[a+80>>2]=267;h=kl(a+72|0,0,a+80|0);s=x[a+316>>2];k=(s|0)==(a+320|0)}f:{if(!Ba){if(k){g=a+80|0;break f}g=yg(g<<3);i=!g;if(i){break d}}if(!Ba|(m|0)==5){ll(h,g);q=5;if((Ba|0)==1){break a}}i=Ba?i:x[a+316>>2]}if(!Ba){k=a+60|0;vj(k,c);s=a- -64|0;w=a+68|0}if(!Ba|(m|0)==6){Vm(i,u,r,g,w,s,k);q=6;if((Ba|0)==1){break a}}i=Ba?i:a+60|0;if(!Ba|(m|0)==7){Po(i);q=7;if((Ba|0)==1){break a}}if(!Ba){k=x[a+68>>2];i=x[a+64>>2]}if(!Ba|(m|0)==8){f=Qm(b,g,k,i,c,d);q=8;if((Ba|0)==1){break a}c=f}if(!Ba|(m|0)==9){pl(h);q=9;if((Ba|0)==1){break a}}if(!Ba|(m|0)==10){pl(t);q=10;if((Ba|0)==1){break a}}if(!Ba){ya=a+368|0;break c}}if(!Ba){Ji();p()}}if(!Ba){return c|0}p()}x[x[Ca>>2]>>2]=q;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;o(+e);a=j(1)|0;y=f,z=j(0)|0,x[y+16>>2]=z;x[f+20>>2]=a;x[f+24>>2]=h;x[f+28>>2]=g;x[f+32>>2]=k;x[f+36>>2]=i;x[f+40>>2]=r;x[f+44>>2]=s;x[f+48>>2]=t;x[f+52>>2]=u;x[f+56>>2]=w;x[Ca>>2]=x[Ca>>2]+60;return 0}function Dm(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;var f=0,g=0,h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0,u=0,w=0,y=0,z=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-60;f=x[Ca>>2];a=x[f>>2];c=x[f+8>>2];d=x[f+12>>2];g=x[f+20>>2];b=x[f+16>>2];l(0,b|0);l(1,g|0);e=+n();h=x[f+24>>2];g=x[f+28>>2];k=x[f+32>>2];i=x[f+36>>2];r=x[f+40>>2];s=x[f+44>>2];t=x[f+48>>2];u=x[f+52>>2];w=x[f+56>>2];b=x[f+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;m=x[x[Ca>>2]>>2]}if(!Ba){a=ya-208|0;ya=a;v[a+204|0]=0;v[a+205|0]=0;v[a+206|0]=0;v[a+207|0]=0;v[a+201|0]=0;v[a+202|0]=0;v[a+203|0]=0;v[a+204|0]=0;v[a+200|0]=37;i=a+201|0;r=Em(i,12219,x[c+4>>2]);x[a+156>>2]=a+160;g=Ol()}a:{b:{if((Ba|0)==2|r){if(!Ba){h=x[c+8>>2];C[a+40>>3]=e;x[a+32>>2]=h;k=a+160|0;i=a+32|0;h=a+200|0}if(!Ba|!m){f=wm(k,30,g,h,i);if((Ba|0)==1){break a}g=f}if(!Ba){break b}}if(!Ba){C[a+48>>3]=e;k=a+160|0;i=a+48|0;h=a+200|0}if(!Ba|(m|0)==1){f=wm(k,30,g,h,i);q=1;if((Ba|0)==1){break a}g=f}}if(!Ba){x[a+80>>2]=267;t=kl(a+148|0,0,a+80|0);k=(g|0)>=30;i=a+160|0;h=i}c:{d:{if((Ba|0)==2|k){if(!Ba){g=Ol()}e:{if((Ba|0)==2|r){if(!Ba){h=x[c+8>>2];C[a+8>>3]=e;x[a>>2]=h;k=a+156|0;h=a+200|0}if(!Ba|(m|0)==2){f=Fm(k,g,h,a);q=2;if((Ba|0)==1){break a}g=f}if(!Ba){break e}}if(!Ba){C[a+16>>3]=e;s=a+156|0;k=a+200|0;h=a+16|0}if(!Ba|(m|0)==3){f=Fm(s,g,k,h);q=3;if((Ba|0)==1){break a}g=f}}if(!Ba){if((g|0)==-1){break d}h=x[a+156>>2]}if(!Ba|(m|0)==4){ll(t,h);q=4;if((Ba|0)==1){break a}}if(!Ba){h=x[a+156>>2]}}if(!Ba){r=g+h|0;u=xm(h,r,c);x[a+80>>2]=267;h=kl(a+72|0,0,a+80|0);s=x[a+156>>2];k=(s|0)==(a+160|0)}f:{if(!Ba){if(k){g=a+80|0;break f}g=yg(g<<1);i=!g;if(i){break d}}if(!Ba|(m|0)==5){ll(h,g);q=5;if((Ba|0)==1){break a}}i=Ba?i:x[a+156>>2]}if(!Ba){k=a+60|0;vj(k,c);s=a- -64|0;w=a+68|0}if(!Ba|(m|0)==6){Gm(i,u,r,g,w,s,k);q=6;if((Ba|0)==1){break a}}i=Ba?i:a+60|0;if(!Ba|(m|0)==7){Po(i);q=7;if((Ba|0)==1){break a}}if(!Ba){k=x[a+68>>2];i=x[a+64>>2]}if(!Ba|(m|0)==8){f=zm(b,g,k,i,c,d);q=8;if((Ba|0)==1){break a}c=f}if(!Ba|(m|0)==9){pl(h);q=9;if((Ba|0)==1){break a}}if(!Ba|(m|0)==10){pl(t);q=10;if((Ba|0)==1){break a}}if(!Ba){ya=a+208|0;break c}}if(!Ba){Ji();p()}}if(!Ba){return c|0}p()}x[x[Ca>>2]>>2]=q;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;o(+e);a=j(1)|0;y=f,z=j(0)|0,x[y+16>>2]=z;x[f+20>>2]=a;x[f+24>>2]=h;x[f+28>>2]=g;x[f+32>>2]=k;x[f+36>>2]=i;x[f+40>>2]=r;x[f+44>>2]=s;x[f+48>>2]=t;x[f+52>>2]=u;x[f+56>>2]=w;x[Ca>>2]=x[Ca>>2]+60;return 0}function Ib(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-56;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];g=x[b+20>>2];h=x[b+24>>2];l=x[b+28>>2];m=x[b+32>>2];j=x[b+36>>2];n=x[b+40>>2];q=x[b+44>>2];o=x[b+48>>2];r=x[b+52>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){m=ya-16|0;ya=m;d=m+4|0}a:{if(!Ba|!i){f=Hh(d,a);if((Ba|0)==1){break a}q=f}d=Ba?d:!y[q|0];b:{if(!Ba){if(d){break b}o=b+c|0;c=x[x[a>>2]-12>>2]+a|0;n=(x[c+4>>2]&176)==32?o:b;d=x[c+76>>2];e=(d|0)==-1;g=x[c+24>>2]}if((Ba|0)==2|e){if(!Ba){d=m+12|0;vj(d,c)}if(!Ba|(i|0)==1){f=il(d,52748);k=1;if((Ba|0)==1){break a}d=f}e=Ba?e:x[x[d>>2]+28>>2];if(!Ba|(i|0)==2){f=Ea[e|0](d,32)|0;k=2;if((Ba|0)==1){break a}d=f}e=Ba?e:m+12|0;if(!Ba|(i|0)==3){Po(e);k=3;if((Ba|0)==1){break a}}if(!Ba){x[c+76>>2]=d}}if(!Ba){e=b;r=d<<24>>24;h=ya-16|0;ya=h;d=0;b=g;g=!b}c:{d:{e:{if(!Ba){if(g){break e}j=n-e|0;l=(j|0)>0;g=x[c+12>>2]}if((Ba|0)==2|l){l=Ba?l:x[x[b>>2]+48>>2];if(!Ba|(i|0)==4){f=Ea[l|0](b,e,j)|0;k=4;if((Ba|0)==1){break a}l=f}if(!Ba){j=(l|0)!=(j|0);if(j){break e}}}if(!Ba){d=o-e|0;e=(d|0)<(g|0)?g-d|0:0;d=(e|0)>0}if((Ba|0)==2|d){if(!Ba){d=e>>>0>=2147483632;if(d){break d}d=e>>>0>=11}f:{if((Ba|0)==2|d){d=Ba?d:(e|15)+1|0;if(!Ba|(i|0)==5){f=dr(d);k=5;if((Ba|0)==1){break a}g=f}if(!Ba){d=d|-2147483648;x[h+12>>2]=d;x[h+4>>2]=g;x[h+8>>2]=e;break f}}if(!Ba){v[h+15|0]=e;g=h+4|0}}if(!Ba){s=nf(g,r,e)+e|0,t=0,v[s|0]=t;j=x[x[b>>2]+48>>2];d=0;g=v[h+15|0]<0?x[h+4>>2]:h+4|0}if(!Ba|(i|0)==6){f=Ea[j|0](b,g,e)|0;k=6;if((Ba|0)==1){break a}g=f}if(!Ba){if(v[h+15|0]<0){zg(x[h+4>>2])}e=(g|0)!=(e|0);if(e){break e}}}if(!Ba){e=o-n|0;d=(e|0)>0}if((Ba|0)==2|d){if(!Ba){d=0;g=x[x[b>>2]+48>>2]}if(!Ba|(i|0)==7){f=Ea[g|0](b,n,e)|0;k=7;if((Ba|0)==1){break a}g=f}if(!Ba&(g|0)!=(e|0)){break e}}if(!Ba){x[c+12>>2]=0;d=b}}if(!Ba){ya=h+16|0;break c}}if(!Ba|(i|0)==8){eb();k=8;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){if(d){break b}c=x[x[a>>2]-12>>2]+a|0;b=x[c+16>>2]|5;wj(c,b)}}if(!Ba|(i|0)==9){Ih(q);k=9;if((Ba|0)==1){break a}}if(!Ba){ya=m+16|0;return a}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[f+24>>2]=h;x[f+28>>2]=l;x[f+32>>2]=m;x[f+36>>2]=j;x[f+40>>2]=n;x[f+44>>2]=q;x[f+48>>2]=o;x[f+52>>2]=r;x[Ca>>2]=x[Ca>>2]+56;return 0}function Oc(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;f=x[Ca>>2];a=x[f>>2];b=x[f+4>>2];c=x[f+8>>2];d=x[f+12>>2];e=x[f+16>>2];f=x[f+20>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){d=ya-96|0;ya=d;e=x[c>>2]}a:{b:{if((Ba|0)==2|e){if(!Ba){c=x[c+4>>2];c:{if(!c){x[d+80>>2]=0;x[d+56>>2]=0;x[d+76>>2]=e;x[d+52>>2]=e;x[d+88>>2]=d+72;x[d+64>>2]=d+48;break c}x[c+4>>2]=x[c+4>>2]+1;x[d+80>>2]=c;x[d+76>>2]=e;x[d+88>>2]=d+72;x[c+4>>2]=x[c+4>>2]+1;x[d+56>>2]=c;x[d+52>>2]=e;x[d+64>>2]=d+48;x[c+4>>2]=x[c+4>>2]+1}x[d+32>>2]=c;x[d+28>>2]=e;x[d+48>>2]=14140;x[d+72>>2]=13792;g=14492;x[d+24>>2]=14492;x[d+40>>2]=d+24;x[a+8>>2]=c;x[a+4>>2]=e;x[a>>2]=13792;x[a+16>>2]=a;f=!c;b=14140}d:{if(!Ba){if(f){f=a- -64|0;x[f>>2]=a+48;x[a+32>>2]=0;x[a+28>>2]=e;x[a+24>>2]=b;x[a+40>>2]=a+24;x[a+56>>2]=0;x[a+52>>2]=e;x[a+48>>2]=g;b=x[12155];x[a+72>>2]=b;break d}f=x[c+4>>2]+1|0;x[c+4>>2]=f;x[a+32>>2]=c;x[a+28>>2]=e;x[a+24>>2]=b;x[a+40>>2]=a+24;x[c+4>>2]=x[c+4>>2]+1;x[a+56>>2]=c;x[a+52>>2]=e;x[a+48>>2]=g;e=a+48|0;x[a- -64>>2]=e;x[c+4>>2]=x[c+4>>2]+1;x[a+72>>2]=x[12155];a=x[c+4>>2];b=a-1|0;x[c+4>>2]=b;if(a){break d}a=x[x[c>>2]+8>>2]}if(!Ba|!h){Ea[a|0](c);if((Ba|0)==1){break a}}if(!Ba|(h|0)==1){cr(c);i=1;if((Ba|0)==1){break a}}}if(!Ba){a=x[d+64>>2];b=(a|0)==(d+48|0)}e:{if(!Ba){f:{if(b){e=4;a=d+48|0;break f}e=5;b=!a;if(b){break e}}e=e<<2;b=x[e+x[a>>2]>>2]}if(!Ba|(h|0)==2){Ea[b|0](a);i=2;if((Ba|0)==1){break a}}}if(!Ba){a=x[d+88>>2];g=d+72|0;g:{if((a|0)==(g|0)){e=4;a=g;break g}e=5;if(!a){break b}}e=e<<2;b=x[e+x[a>>2]>>2]}if(!Ba|(h|0)==3){Ea[b|0](a);i=3;if((Ba|0)==1){break a}}if(!Ba){break b}}if(!Ba|(h|0)==4){g=dr(4);i=4;if((Ba|0)==1){break a}f=g}if(!Ba){x[f>>2]=14848;x[d+16>>2]=f}if(!Ba|(h|0)==5){g=dr(16);i=5;if((Ba|0)==1){break a}e=g}if(!Ba){x[e+12>>2]=f;x[e>>2]=14944;x[e+4>>2]=0;x[e+8>>2]=0;x[d+20>>2]=e;e=x[d+20>>2];x[d+8>>2]=x[d+16>>2];x[d+12>>2]=e;e=d+8|0}if(!Ba|(h|0)==6){Oc(a,b,e);i=6;if((Ba|0)==1){break a}}c=Ba?c:x[c+4>>2]}a=Ba?a:!c;h:{if(!Ba){if(a){break h}a=x[c+4>>2];x[c+4>>2]=a-1;if(a){break h}a=x[x[c>>2]+8>>2]}if(!Ba|(h|0)==7){Ea[a|0](c);i=7;if((Ba|0)==1){break a}}if(!Ba|(h|0)==8){cr(c);i=8;if((Ba|0)==1){break a}}}if(!Ba){ya=d+96|0}return}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[Ca>>2]=x[Ca>>2]+24}function gk(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-56;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+12>>2];f=x[b+16>>2];g=x[b+20>>2];h=x[b+24>>2];j=x[b+28>>2];l=x[b+32>>2];m=x[b+36>>2];n=x[b+40>>2];o=x[b+44>>2];q=x[b+48>>2];r=x[b+52>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){f=ya-32|0;ya=f;e=y[a+52|0]}a:{b:{if(!Ba){if(e){c=x[a+48>>2];if(!b){break b}v[a+52|0]=0;x[a+48>>2]=-1;break b}e=y[a+53|0]}c:{if((Ba|0)==2|e){if(!Ba){c=x[a+32>>2];e=x[c+76>>2]<0;h=f+24|0}d:{if((Ba|0)==2|e){if(!Ba|!i){d=Fj(c);if((Ba|0)==1){break a}c=d}if(!Ba){break d}}if(!Ba|(i|0)==1){d=Fj(c);k=1;if((Ba|0)==1){break a}c=d}}if(!Ba){e=(c|0)!=-1;if(e){x[h>>2]=c}c=(c|0)==-1;if(c){break c}c=x[f+24>>2];b=!b}e:{if((Ba|0)==2|b){a=Ba?a:x[a+32>>2];if(!Ba|(i|0)==2){d=jk(c,a);k=2;if((Ba|0)==1){break a}a=d}if(!Ba){a=!a;if(a){break c}break e}}if(!Ba){x[a+48>>2]=c}}if(!Ba){break b}}if(!Ba){x[f+24>>2]=1;l=f+24|0;g=x[Zj(l,a+44|0)>>2];e=(g|0)>0;j=e?g:0}while(1){e=Ba?e:(c|0)!=(j|0);if(e|(Ba|0)==2){e=Ba?e:x[a+32>>2];if(!Ba|(i|0)==3){d=Bj(e);k=3;if((Ba|0)==1){break a}h=d}if(!Ba){if((h|0)==-1){break c}e=(f+24|0)+c|0;v[e|0]=h;c=c+1|0;continue}}break}j=Ba?j:f+24|0;f:{while(1){g:{if(!Ba){c=x[a+40>>2];m=x[c>>2];n=x[c+4>>2];o=x[a+36>>2];h=f+24|0;q=h;r=f+16|0;l=f+20|0;e=f+12|0;h=h+g|0}if(!Ba|(i|0)==4){d=Ii(o,c,q,h,r,l,j,e);k=4;if((Ba|0)==1){break a}c=d}if(!Ba){h:{c=c-1|0;switch(c|0){case 2:break g;case 0:break h;case 1:break c;default:break f}}c=x[a+40>>2];x[c>>2]=m;x[c+4>>2]=n;c=(g|0)==8;if(c){break c}c=x[a+32>>2]}if(!Ba|(i|0)==5){d=Bj(c);k=5;if((Ba|0)==1){break a}c=d}if(!Ba){e=(c|0)==-1;if(e){break c}v[h|0]=c;g=g+1|0;continue}}break}if(!Ba){c=v[f+24|0];x[f+20>>2]=c}}b=Ba?b:!b;i:{if(b|(Ba|0)==2){while(1){if(!Ba){if((g|0)<=0){break i}g=g-1|0;c=v[g+(f+24|0)|0];b=x[a+32>>2]}if(!Ba|(i|0)==6){d=Aj(c,b);k=6;if((Ba|0)==1){break a}b=d}if(!Ba){b=(b|0)!=-1;if(b){continue}}break}if(!Ba){break c}}if(!Ba){x[a+48>>2]=x[f+20>>2]}}if(!Ba){c=x[f+20>>2];break b}}c=Ba?c:-1}if(!Ba){ya=f+32|0;return c}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=e;x[d+16>>2]=f;x[d+20>>2]=g;x[d+24>>2]=h;x[d+28>>2]=j;x[d+32>>2]=l;x[d+36>>2]=m;x[d+40>>2]=n;x[d+44>>2]=o;x[d+48>>2]=q;x[d+52>>2]=r;x[Ca>>2]=x[Ca>>2]+56;return 0}function Ak(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0;r=Ba;j=ya-128|0;ya=j;k=Gg(f,g,h,i,0,0,0,0);if((Ba|0)!=(r|0)){p()}a:{b:{c:{if(!k){break c}l=i&65535;n=i>>>16&32767;d:{e:{if((n|0)!=32767){k=4;if(n){break e}k=f|h|(g|l)?3:2;break d}k=!(f|h|(g|l))}}u=e>>>16|0;o=u&32767;if((o|0)==32767){break c}if(k){break b}}rk(j+16|0,b,c,d,e,f,g,h,i);if((Ba|0)!=(r|0)){p()}b=x[j+16>>2];d=x[j+20>>2];e=x[j+24>>2];c=x[j+28>>2];zk(j,b,d,e,c,b,d,e,c);if((Ba|0)!=(r|0)){p()}d=x[j+8>>2];e=x[j+12>>2];h=x[j>>2];i=x[j+4>>2];break a}k=d;q=e&2147483647;n=h;m=i&2147483647;h=Gg(b,c,k,q,f,g,h,m);if((Ba|0)!=(r|0)){p()}if((h|0)<=0){f=Gg(b,c,k,q,f,g,n,m);if((Ba|0)!=(r|0)){p()}if(f){h=b;i=c;break a}rk(j+112|0,b,c,d,e,0,0,0,0);if((Ba|0)!=(r|0)){p()}d=x[j+120>>2];e=x[j+124>>2];h=x[j+112>>2];i=x[j+116>>2];break a}s=i>>>16&32767;if(o){i=c;h=b}else{rk(j+96|0,b,c,k,q,0,0,0,1081540608);if((Ba|0)!=(r|0)){p()}k=x[j+104>>2];h=x[j+108>>2];q=h;o=(h>>>16|0)-120|0;i=x[j+100>>2];h=x[j+96>>2]}if(!s){rk(j+80|0,f,g,n,m,0,0,0,1081540608);if((Ba|0)!=(r|0)){p()}n=x[j+88>>2];f=x[j+92>>2];m=f;s=(f>>>16|0)-120|0;g=x[j+84>>2];f=x[j+80>>2]}t=n;v=m&65535|65536;q=q&65535|65536;if((o|0)>(s|0)){while(1){m=k-t|0;l=(g|0)==(i|0)&f>>>0>h>>>0|g>>>0>i>>>0;n=m-l|0;l=(q-((k>>>0>>0)+v|0)|0)-(l>>>0>m>>>0)|0;f:{if((l|0)>=0|(l|0)>0){k=h;h=h-f|0;i=i-((f>>>0>k>>>0)+g|0)|0;if(!(h|n|(i|l))){rk(j+32|0,b,c,d,e,0,0,0,0);if((Ba|0)!=(r|0)){p()}d=x[j+40>>2];e=x[j+44>>2];h=x[j+32>>2];i=x[j+36>>2];break a}l=l<<1|n>>>31;k=n<<1|i>>>31;break f}l=q<<1|k>>>31;k=k<<1|i>>>31}q=l;l=i<<1|h>>>31;h=h<<1;i=l;o=o-1|0;if((s|0)<(o|0)){continue}break}o=s}m=k-t|0;l=(g|0)==(i|0)&f>>>0>h>>>0|g>>>0>i>>>0;n=m-l|0;l=(q-((k>>>0>>0)+v|0)|0)-(l>>>0>m>>>0)|0;m=l;g:{if((l|0)<0){n=k;m=q;break g}k=h;h=h-f|0;i=i-((f>>>0>k>>>0)+g|0)|0;if(h|n|(i|m)){break g}rk(j+48|0,b,c,d,e,0,0,0,0);if((Ba|0)!=(r|0)){p()}d=x[j+56>>2];e=x[j+60>>2];h=x[j+48>>2];i=x[j+52>>2];break a}if((m|0)==65535|m>>>0<65535){while(1){b=i>>>31|0;o=o-1|0;q=i<<1|h>>>31;h=h<<1;i=q;c=b;b=m<<1|n>>>31;n=c|n<<1;m=b;if(b>>>0<65536){continue}break}}b=u&32768;if((o|0)<=0){rk(j- -64|0,h,i,n,m&65535|(b|o+120)<<16,0,0,0,1065811968);if((Ba|0)!=(r|0)){p()}d=x[j+72>>2];e=x[j+76>>2];h=x[j+64>>2];i=x[j+68>>2];break a}d=n;e=m&65535|(b|o)<<16}x[a>>2]=h;x[a+4>>2]=i;x[a+8>>2]=d;x[a+12>>2]=e;ya=j+128|0}function Vj(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-56;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];f=x[b+12>>2];g=x[b+16>>2];e=x[b+20>>2];i=x[b+24>>2];h=x[b+28>>2];l=x[b+32>>2];m=x[b+36>>2];n=x[b+40>>2];o=x[b+44>>2];q=x[b+48>>2];r=x[b+52>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){f=ya-32|0;ya=f;g=y[a+52|0]}a:{b:{if(!Ba){if(g){c=x[a+48>>2];if(!b){break b}v[a+52|0]=0;x[a+48>>2]=-1;break b}g=y[a+53|0]}c:{if((Ba|0)==2|g){if(!Ba){g=f+24|0;c=x[a+32>>2]}if(!Ba|!j){d=Bj(c);if((Ba|0)==1){break a}c=d}if(!Ba){if((c|0)!=-1){v[g|0]=c}c=(c|0)==-1;if(c){break c}e=v[f+24|0];c=jh(e);b=!b}d:{if((Ba|0)==2|b){a=Ba?a:x[a+32>>2];if(!Ba|(j|0)==1){d=Yj(c,a);k=1;if((Ba|0)==1){break a}a=d}if(!Ba){a=!a;if(a){break c}break d}}if(!Ba){x[a+48>>2]=c}}if(!Ba){c=jh(e);break b}}if(!Ba){x[f+24>>2]=1;g=x[Zj(f+24|0,a+44|0)>>2];e=(g|0)>0;i=e?g:0}while(1){e=Ba?e:(c|0)!=(i|0);if(e|(Ba|0)==2){e=Ba?e:x[a+32>>2];if(!Ba|(j|0)==2){d=Bj(e);k=2;if((Ba|0)==1){break a}e=d}if(!Ba){if((e|0)==-1){break c}h=(f+24|0)+c|0;v[h|0]=e;c=c+1|0;continue}}break}i=Ba?i:f+24|0;e:{while(1){f:{if(!Ba){c=x[a+40>>2];l=x[c>>2];m=x[c+4>>2];h=x[a+36>>2];e=f+24|0;n=e;o=f+16|0;q=f+23|0;r=f+12|0;e=e+g|0}if(!Ba|(j|0)==3){d=Ii(h,c,n,e,o,q,i,r);k=3;if((Ba|0)==1){break a}c=d}if(!Ba){g:{c=c-1|0;switch(c|0){case 2:break f;case 0:break g;case 1:break c;default:break e}}c=x[a+40>>2];x[c>>2]=l;x[c+4>>2]=m;c=(g|0)==8;if(c){break c}c=x[a+32>>2]}if(!Ba|(j|0)==4){d=Bj(c);k=4;if((Ba|0)==1){break a}c=d}if(!Ba){h=(c|0)==-1;if(h){break c}v[e|0]=c;g=g+1|0;continue}}break}if(!Ba){c=y[f+24|0];v[f+23|0]=c}}b=Ba?b:!b;h:{if(b|(Ba|0)==2){while(1){if(!Ba){if((g|0)<=0){break h}g=g-1|0;b=jh(v[g+(f+24|0)|0]);c=x[a+32>>2]}if(!Ba|(j|0)==5){d=Aj(b,c);k=5;if((Ba|0)==1){break a}b=d}if(!Ba){b=(b|0)!=-1;if(b){continue}}break}if(!Ba){break c}}if(!Ba){s=a,t=jh(v[f+23|0]),x[s+48>>2]=t}}if(!Ba){c=jh(v[f+23|0]);break b}}c=Ba?c:-1}if(!Ba){ya=f+32|0;return c}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=f;x[d+16>>2]=g;x[d+20>>2]=e;x[d+24>>2]=i;x[d+28>>2]=h;x[d+32>>2]=l;x[d+36>>2]=m;x[d+40>>2]=n;x[d+44>>2]=o;x[d+48>>2]=q;x[d+52>>2]=r;x[Ca>>2]=x[Ca>>2]+56;return 0}function Zn(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-56;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];i=x[b+28>>2];l=x[b+32>>2];m=x[b+36>>2];n=x[b+40>>2];o=x[b+44>>2];q=x[b+48>>2];r=x[b+52>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){a=ya-624|0;ya=a;x[a+616>>2]=c;x[a+620>>2]=b;x[a+16>>2]=268;l=a+16|0;b=kl(a+200|0,a+208|0,l);i=a+192|0;vj(i,e)}a:{if(!Ba|!j){h=bi(i);if((Ba|0)==1){break a}i=h}if(!Ba){v[a+191|0]=0;l=a+620|0;n=a+192|0;o=a+191|0;q=a+196|0;r=a+608|0;e=x[e+4>>2]}if(!Ba|(j|0)==1){h=_n(l,c,d,n,e,f,o,i,b,q,r);k=1;if((Ba|0)==1){break a}c=h}c=Ba?c:!c;b:{if(!Ba){if(c){break b}v[a+190|0]=0;v[a+188|0]=56;v[a+189|0]=57;v[a+180|0]=48;v[a+181|0]=49;v[a+182|0]=50;v[a+183|0]=51;v[a+184|0]=52;v[a+185|0]=53;v[a+186|0]=54;v[a+187|0]=55;d=a+190|0;e=a+128|0;c=a+180|0}if(!Ba|(j|0)==2){jm(i,c,d,e);k=2;if((Ba|0)==1){break a}}if(!Ba){x[a+16>>2]=267;e=a+16|0;i=kl(a+8|0,0,e);d=x[b>>2];c=(x[a+196>>2]-d|0)>=393}c:{if((Ba|0)==2|c){if(!Ba){d=x[b>>2];c=yg((x[a+196>>2]-d>>2)+2|0)}if(!Ba|(j|0)==3){ll(i,c);k=3;if((Ba|0)==1){break a}}if(!Ba){c=!x[i>>2];if(c){break c}e=x[i>>2]}}if(!Ba){if(y[a+191|0]){v[e|0]=45;e=e+1|0}c=x[b>>2]}while(1){d=Ba?d:A[a+196>>2]<=c>>>0;m=Ba?m:d;if(m|(Ba|0)==2){d:{if(!Ba){v[e|0]=0;x[a>>2]=g;c=a+16|0}if(!Ba|(j|0)==4){h=Rk(c,a);k=4;if((Ba|0)==1){break a}c=h}if(!Ba){c=(c|0)!=1;if(c){break d}}if(!Ba|(j|0)==5){pl(i);k=5;if((Ba|0)==1){break a}}if(!Ba){break b}}}if(!Ba&(!m|(Ba|0)==2)){d=a+128|0;d=y[(a+180|0)+(km(d,a+168|0,c)-d>>2)|0];v[e|0]=d;e=e+1|0;c=c+4|0;continue}break}if(!Ba){Ji();p()}}if(!Ba){Ji();p()}}if(!Ba){d=a+616|0;c=a+620|0}if(!Ba|(j|0)==6){h=ci(c,d);k=6;if((Ba|0)==1){break a}c=h}if(!Ba){if(c){x[f>>2]=x[f>>2]|2}d=a+192|0;c=x[a+620>>2]}if(!Ba|(j|0)==7){Po(d);k=7;if((Ba|0)==1){break a}}if(!Ba|(j|0)==8){pl(b);k=8;if((Ba|0)==1){break a}}if(!Ba){ya=a+624|0;return c|0}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=i;x[h+32>>2]=l;x[h+36>>2]=m;x[h+40>>2]=n;x[h+44>>2]=o;x[h+48>>2]=q;x[h+52>>2]=r;x[Ca>>2]=x[Ca>>2]+56;return 0}function Jn(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-56;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];i=x[b+28>>2];l=x[b+32>>2];m=x[b+36>>2];n=x[b+40>>2];o=x[b+44>>2];q=x[b+48>>2];r=x[b+52>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){a=ya-272|0;ya=a;x[a+264>>2]=c;x[a+268>>2]=b;x[a+16>>2]=268;l=a+16|0;b=kl(a+152|0,a+160|0,l);i=a+144|0;vj(i,e)}a:{if(!Ba|!j){h=sh(i);if((Ba|0)==1){break a}i=h}if(!Ba){v[a+143|0]=0;l=a+268|0;n=a+144|0;o=a+143|0;q=a+148|0;r=a+260|0;e=x[e+4>>2]}if(!Ba|(j|0)==1){h=Kn(l,c,d,n,e,f,o,i,b,q,r);k=1;if((Ba|0)==1){break a}c=h}c=Ba?c:!c;b:{if(!Ba){if(c){break b}v[a+142|0]=0;v[a+140|0]=56;v[a+141|0]=57;v[a+132|0]=48;v[a+133|0]=49;v[a+134|0]=50;v[a+135|0]=51;v[a+136|0]=52;v[a+137|0]=53;v[a+138|0]=54;v[a+139|0]=55;d=a+142|0;e=a+122|0;c=a+132|0}if(!Ba|(j|0)==2){Nl(i,c,d,e);k=2;if((Ba|0)==1){break a}}if(!Ba){x[a+16>>2]=267;e=a+16|0;i=kl(a+8|0,0,e);d=x[b>>2];c=(x[a+148>>2]-d|0)>=99}c:{if((Ba|0)==2|c){if(!Ba){d=x[b>>2];c=yg((x[a+148>>2]-d|0)+2|0)}if(!Ba|(j|0)==3){ll(i,c);k=3;if((Ba|0)==1){break a}}if(!Ba){c=!x[i>>2];if(c){break c}e=x[i>>2]}}if(!Ba){if(y[a+143|0]){v[e|0]=45;e=e+1|0}c=x[b>>2]}while(1){d=Ba?d:A[a+148>>2]<=c>>>0;m=Ba?m:d;if(m|(Ba|0)==2){d:{if(!Ba){v[e|0]=0;x[a>>2]=g;c=a+16|0}if(!Ba|(j|0)==4){h=Rk(c,a);k=4;if((Ba|0)==1){break a}c=h}if(!Ba){c=(c|0)!=1;if(c){break d}}if(!Ba|(j|0)==5){pl(i);k=5;if((Ba|0)==1){break a}}if(!Ba){break b}}}if(!Ba&(!m|(Ba|0)==2)){d=y[((Ql(a+122|0,a+132|0,c)-a|0)+a|0)+10|0];v[e|0]=d;e=e+1|0;c=c+1|0;continue}break}if(!Ba){Ji();p()}}if(!Ba){Ji();p()}}if(!Ba){d=a+264|0;c=a+268|0}if(!Ba|(j|0)==6){h=th(c,d);k=6;if((Ba|0)==1){break a}c=h}if(!Ba){if(c){x[f>>2]=x[f>>2]|2}d=a+144|0;c=x[a+268>>2]}if(!Ba|(j|0)==7){Po(d);k=7;if((Ba|0)==1){break a}}if(!Ba|(j|0)==8){pl(b);k=8;if((Ba|0)==1){break a}}if(!Ba){ya=a+272|0;return c|0}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=i;x[h+32>>2]=l;x[h+36>>2]=m;x[h+40>>2]=n;x[h+44>>2]=o;x[h+48>>2]=q;x[h+52>>2]=r;x[Ca>>2]=x[Ca>>2]+56;return 0} +function Ck(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];g=x[b+16>>2];f=x[b+20>>2];h=x[b+24>>2];j=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){c=x[a+4>>2];d=(c|0)!=x[a+104>>2]}a:{b:{if(!(d?Ba:1)){x[a+4>>2]=c+1;d=y[c|0];break b}if(!Ba|!i){e=pk(a);if((Ba|0)==1){break a}d=e}}c=Ba?c:d-43|0;c:{d:{e:{f:{if(!Ba){g:{switch(c|0){case 0:case 2:break g;default:break f}}j=(d|0)==45;c=x[a+4>>2];d=(c|0)!=x[a+104>>2]}h:{if(!(d?Ba:1)){d=c+1|0;x[a+4>>2]=d;c=y[c|0];break h}if(!Ba|(i|0)==1){e=pk(a);k=1;if((Ba|0)==1){break a}c=e}}if(!Ba){h=c-58|0;b=!b;if(b){break e}b=h>>>0>4294967285;if(b){break e}g=x[a+112>>2];b=x[a+116>>2];f=b;if((b|0)<0){break d}x[a+4>>2]=x[a+4>>2]-1;break d}}if(!Ba){h=d-58|0;c=d}}if(!Ba){if(h>>>0<4294967286){break d}b=c-48>>>0>=10}i:{if(!Ba){if(b){break i}d=0}while(1){if(!Ba){d=(D(d,10)+c|0)-48|0;b=(d|0)<214748364;c=x[a+4>>2];h=(c|0)!=x[a+104>>2]}j:{if(!(h?Ba:1)){h=c+1|0;x[a+4>>2]=h;c=y[c|0];break j}if(!Ba|(i|0)==2){e=pk(a);k=2;if((Ba|0)==1){break a}c=e}}if(!Ba){h=c-48|0;b=h>>>0<=9&b;if(b){continue}}break}if(!Ba){g=d;f=d>>31;b=h>>>0>=10;if(b){break i}}while(1){if(!Ba){b=Hs(g,f,10,0);g=b+c|0;f=Da;f=b>>>0>g>>>0?f+1|0:f;c=x[a+4>>2];b=(c|0)!=x[a+104>>2]}k:{if(!(b?Ba:1)){b=c+1|0;x[a+4>>2]=b;c=y[c|0];break k}if(!Ba|(i|0)==3){e=pk(a);k=3;if((Ba|0)==1){break a}c=e}}if(!Ba){b=g;g=b-48|0;b=f-(b>>>0<48)|0;f=b;d=c-48|0;b=(g>>>0<2061584302&(b|0)<=21474836|(b|0)<21474836)&d>>>0<=9;if(b){continue}}break}if(!Ba){b=d>>>0>=10;if(b){break i}}while(1){if(!Ba){c=x[a+4>>2];b=(c|0)!=x[a+104>>2]}l:{if(!(b?Ba:1)){x[a+4>>2]=c+1;b=y[c|0];break l}if(!Ba|(i|0)==4){e=pk(a);k=4;if((Ba|0)==1){break a}b=e}}if(!Ba){b=b-48>>>0<10;if(b){continue}}break}}if(!Ba){b=x[a+116>>2];if((b|0)>0){b=1}else{b=(b|0)>=0}if(b){x[a+4>>2]=x[a+4>>2]-1}a=g;g=j?0-a|0:a;f=j?0-(((a|0)!=0)+f|0)|0:f;break c}}if(!Ba){g=0;f=-2147483648;if(x[a+116>>2]<0){break c}x[a+4>>2]=x[a+4>>2]-1;Da=-2147483648;return 0}}if(!Ba){Da=f;return g}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=g;x[e+20>>2]=f;x[e+24>>2]=h;x[e+28>>2]=j;x[Ca>>2]=x[Ca>>2]+32;Da=0;return 0}function gc(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;a:{b:{d=b;g=x[b>>2];if(g){c=x[b+4>>2];if(!c){break b}while(1){d=c;c=x[c>>2];if(c){continue}break}}g=x[d+4>>2];if(g){break b}f=x[d+8>>2];g=0;e=1;break a}f=x[d+8>>2];x[g+8>>2]=f;e=0}c=x[f>>2];c:{if((d|0)==(c|0)){x[f>>2]=g;if((a|0)==(d|0)){c=0;a=g;break c}c=x[f+4>>2];break c}x[f+4>>2]=g}h=!y[d+12|0];if((b|0)!=(d|0)){f=x[b+8>>2];x[d+8>>2]=f;x[f+((x[f>>2]!=(b|0))<<2)>>2]=d;f=x[b>>2];x[d>>2]=f;x[f+8>>2]=d;f=x[b+4>>2];x[d+4>>2]=f;if(f){x[f+8>>2]=d}v[d+12|0]=y[b+12|0];a=(a|0)==(b|0)?d:a}if(!(h|!a)){if(e){while(1){b=y[c+12|0];d:{e=x[c+8>>2];if(x[e>>2]!=(c|0)){if(!b){v[c+12|0]=1;v[e+12|0]=0;d=x[e+4>>2];b=x[d>>2];x[e+4>>2]=b;if(b){x[b+8>>2]=e}b=x[e+8>>2];x[d+8>>2]=b;x[b+(((e|0)!=x[b>>2])<<2)>>2]=d;x[d>>2]=e;x[e+8>>2]=d;b=x[c>>2];a=(b|0)==(a|0)?c:a;c=x[b+4>>2]}e:{f:{d=x[c>>2];g:{if(!(y[d+12|0]?0:d)){b=x[c+4>>2];if(y[b+12|0]?0:b){break g}v[c+12|0]=0;c=x[c+8>>2];h:{if((c|0)==(a|0)){c=a;break h}if(y[c+12|0]){break d}}v[c+12|0]=1;return}b=x[c+4>>2];if(!b){break f}}if(y[b+12|0]){break f}d=c;break e}v[d+12|0]=1;v[c+12|0]=0;a=x[d+4>>2];x[c>>2]=a;if(a){x[a+8>>2]=c}a=x[c+8>>2];x[d+8>>2]=a;x[a+((x[a>>2]!=(c|0))<<2)>>2]=d;x[d+4>>2]=c;x[c+8>>2]=d;b=c}c=x[d+8>>2];v[d+12|0]=y[c+12|0];v[c+12|0]=1;v[b+12|0]=1;b=x[c+4>>2];a=x[b>>2];x[c+4>>2]=a;if(a){x[a+8>>2]=c}a=x[c+8>>2];x[b+8>>2]=a;x[a+(((c|0)!=x[a>>2])<<2)>>2]=b;x[b>>2]=c;x[c+8>>2]=b;return}if(!b){v[c+12|0]=1;v[e+12|0]=0;b=x[c+4>>2];x[e>>2]=b;if(b){x[b+8>>2]=e}b=x[e+8>>2];x[c+8>>2]=b;x[b+(((e|0)!=x[b>>2])<<2)>>2]=c;x[c+4>>2]=e;x[e+8>>2]=c;a=(a|0)==(e|0)?c:a;c=x[e>>2]}b=x[c>>2];i:{if(!(!b|y[b+12|0])){d=c;break i}d=x[c+4>>2];if(!(y[d+12|0]?0:d)){v[c+12|0]=0;c=x[c+8>>2];if((a|0)!=(c|0)?y[c+12|0]:0){break d}v[c+12|0]=1;return}if(b){if(!y[b+12|0]){d=c;break i}d=x[c+4>>2]}v[d+12|0]=1;v[c+12|0]=0;a=x[d>>2];x[c+4>>2]=a;if(a){x[a+8>>2]=c}a=x[c+8>>2];x[d+8>>2]=a;x[a+((x[a>>2]!=(c|0))<<2)>>2]=d;x[d>>2]=c;x[c+8>>2]=d;b=c}c=x[d+8>>2];v[d+12|0]=y[c+12|0];v[c+12|0]=1;v[b+12|0]=1;b=x[c>>2];a=x[b+4>>2];x[c>>2]=a;if(a){x[a+8>>2]=c}a=x[c+8>>2];x[b+8>>2]=a;x[a+(((c|0)!=x[a>>2])<<2)>>2]=b;x[b+4>>2]=c;x[c+8>>2]=b;return}b=x[c+8>>2];c=x[((x[b>>2]==(c|0))<<2)+b>>2];continue}}v[g+12|0]=1}}function Pm(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]+-64;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];j=x[b+28>>2];i=x[b+32>>2];k=x[b+36>>2];l=x[b+40>>2];m=x[b+44>>2];p=x[b+48>>2];q=x[b+52>>2];r=x[b+56>>2];s=x[b+60>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;n=x[x[Ca>>2]>>2]}if(!Ba){j=ya;m=j-16|0;ya=m}a:{if(!Ba|!n){h=bi(g);if((Ba|0)==1){break a}p=h}j=Ba?j:m+4|0;if(!Ba|(n|0)==1){h=Ul(g);o=1;if((Ba|0)==1){break a}g=h}if(!Ba|(n|0)==2){nm(j,g);o=2;if((Ba|0)==1){break a}}if(!Ba){j=ol(m+4|0)}b:{if((Ba|0)==2|j){if(!Ba|(n|0)==3){jm(p,a,c,d);o=3;if((Ba|0)==1){break a}}if(!Ba){g=(c-a<<2)+d|0;x[f>>2]=g;break b}}if(!Ba){x[f>>2]=d;j=a;i=y[j|0];k=i-43|0}c:{if(!Ba){d:{switch(k|0){case 0:case 2:break d;default:break c}}j=i<<24>>24}if(!Ba|(n|0)==4){h=tj(p,j);o=4;if((Ba|0)==1){break a}i=h}if(!Ba){k=x[f>>2];x[f>>2]=k+4;x[k>>2]=i;j=a+1|0}}i=Ba?i:(c-j|0)<2;e:{if(!Ba){if(i){break e}i=y[j|0]!=48;if(i){break e}i=(y[j+1|0]|32)!=120;if(i){break e}}if(!Ba|(n|0)==5){h=tj(p,48);o=5;if((Ba|0)==1){break a}i=h}if(!Ba){k=x[f>>2];l=k+4|0;x[f>>2]=l;x[k>>2]=i;i=v[j+1|0]}if(!Ba|(n|0)==6){h=tj(p,i);o=6;if((Ba|0)==1){break a}i=h}if(!Ba){k=x[f>>2];l=k+4|0;x[f>>2]=l;x[k>>2]=i;j=j+2|0}}if(!Ba){Zm(j,c);i=0}if(!Ba|(n|0)==7){h=mm(g);o=7;if((Ba|0)==1){break a}r=h}if(!Ba){k=0;g=j}while(1){l=Ba?l:c>>>0<=g>>>0;q=Ba?q:l;if(Ba?0:q|(Ba|0)==2){g=(j-a<<2)+d|0;j=x[f>>2];_m(g,j);g=x[f>>2]}if(!q|(Ba|0)==2){if(!Ba){l=m+4|0;f:{if(!y[nl(l,k)|0]){break f}if(v[nl(m+4|0,k)|0]!=(i|0)){break f}i=x[f>>2];x[f>>2]=i+4;x[i>>2]=r;k=(ui(l)-1>>>0>k>>>0)+k|0;i=0}l=v[g|0]}if(!Ba|(n|0)==8){h=tj(p,l);o=8;if((Ba|0)==1){break a}s=h}if(!Ba){l=x[f>>2];x[f>>2]=l+4;x[l>>2]=s;g=g+1|0;i=i+1|0;continue}}break}}if(!Ba){x[e>>2]=(b|0)==(c|0)?g:(b-a<<2)+d|0;hr(m+4|0);ya=m+16|0}return}x[x[Ca>>2]>>2]=o;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=j;x[h+32>>2]=i;x[h+36>>2]=k;x[h+40>>2]=l;x[h+44>>2]=m;x[h+48>>2]=p;x[h+52>>2]=q;x[h+56>>2]=r;x[h+60>>2]=s;x[Ca>>2]=x[Ca>>2]- -64}function ym(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]+-64;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];j=x[b+28>>2];i=x[b+32>>2];k=x[b+36>>2];l=x[b+40>>2];m=x[b+44>>2];p=x[b+48>>2];q=x[b+52>>2];r=x[b+56>>2];s=x[b+60>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;n=x[x[Ca>>2]>>2]}if(!Ba){j=ya;m=j-16|0;ya=m}a:{if(!Ba|!n){h=sh(g);if((Ba|0)==1){break a}p=h}j=Ba?j:m+4|0;if(!Ba|(n|0)==1){h=el(g);o=1;if((Ba|0)==1){break a}g=h}if(!Ba|(n|0)==2){nm(j,g);o=2;if((Ba|0)==1){break a}}if(!Ba){j=ol(m+4|0)}b:{if((Ba|0)==2|j){if(!Ba|(n|0)==3){Nl(p,a,c,d);o=3;if((Ba|0)==1){break a}}if(!Ba){g=(c-a|0)+d|0;x[f>>2]=g;break b}}if(!Ba){x[f>>2]=d;j=a;i=y[j|0];k=i-43|0}c:{if(!Ba){d:{switch(k|0){case 0:case 2:break d;default:break c}}j=i<<24>>24}if(!Ba|(n|0)==4){h=rj(p,j);o=4;if((Ba|0)==1){break a}i=h}if(!Ba){k=x[f>>2];x[f>>2]=k+1;v[k|0]=i;j=a+1|0}}i=Ba?i:(c-j|0)<2;e:{if(!Ba){if(i){break e}i=y[j|0]!=48;if(i){break e}i=(y[j+1|0]|32)!=120;if(i){break e}}if(!Ba|(n|0)==5){h=rj(p,48);o=5;if((Ba|0)==1){break a}i=h}if(!Ba){k=x[f>>2];l=k+1|0;x[f>>2]=l;v[k|0]=i;i=v[j+1|0]}if(!Ba|(n|0)==6){h=rj(p,i);o=6;if((Ba|0)==1){break a}i=h}if(!Ba){k=x[f>>2];l=k+1|0;x[f>>2]=l;v[k|0]=i;j=j+2|0}}if(!Ba){Zm(j,c);i=0}if(!Ba|(n|0)==7){h=mm(g);o=7;if((Ba|0)==1){break a}r=h}if(!Ba){k=0;g=j}while(1){l=Ba?l:c>>>0<=g>>>0;q=Ba?q:l;if(Ba?0:q|(Ba|0)==2){g=(j-a|0)+d|0;j=x[f>>2];Zm(g,j);g=x[f>>2]}if(!q|(Ba|0)==2){if(!Ba){l=m+4|0;f:{if(!y[nl(l,k)|0]){break f}if(v[nl(m+4|0,k)|0]!=(i|0)){break f}i=x[f>>2];x[f>>2]=i+1;v[i|0]=r;k=(ui(l)-1>>>0>k>>>0)+k|0;i=0}l=v[g|0]}if(!Ba|(n|0)==8){h=rj(p,l);o=8;if((Ba|0)==1){break a}s=h}if(!Ba){l=x[f>>2];x[f>>2]=l+1;v[l|0]=s;g=g+1|0;i=i+1|0;continue}}break}}if(!Ba){x[e>>2]=(b|0)==(c|0)?g:(b-a|0)+d|0;hr(m+4|0);ya=m+16|0}return}x[x[Ca>>2]>>2]=o;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=j;x[h+32>>2]=i;x[h+36>>2]=k;x[h+40>>2]=l;x[h+44>>2]=m;x[h+48>>2]=p;x[h+52>>2]=q;x[h+56>>2]=r;x[h+60>>2]=s;x[Ca>>2]=x[Ca>>2]- -64}function Dr(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;f=x[Ca>>2];a=x[f>>2];c=x[f+8>>2];d=x[f+12>>2];e=x[f+16>>2];g=x[f+20>>2];h=x[f+24>>2];i=x[f+28>>2];k=x[f+32>>2];b=x[f+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){if(qr(a,x[b+8>>2],e)){Cr(b,c,d);return}g=qr(a,x[b>>2],e)}a:{b:{c:{if((Ba|0)==2|g){if(!Ba){if(!(x[b+16>>2]!=(c|0)&x[b+20>>2]!=(c|0))){if((d|0)!=1){break b}x[b+32>>2]=1;return}x[b+32>>2]=d;if(x[b+44>>2]==4){break c}g=a+16|0;d=g+(x[a+12>>2]<<3)|0}while(1){i=Ba?i:d>>>0<=g>>>0;d:{e:{f:{g:{if(!Ba){if(i){break g}w[b+52>>1]=0}if(!Ba|!j){Er(g,b,c,c,1,e);f=0;if((Ba|0)==1){break a}}if(!Ba){i=y[b+54|0];if(i){break g}i=!y[b+53|0];if(i){break d}if(y[b+52|0]){h=x[b+24>>2]==1;if(h){break e}h=1;k=1;i=!(y[a+8|0]&2);if(i){break e}break d}h=1;i=v[a+8|0]&1;if(i){break d}a=3;break f}}if(!Ba){a=h&1?3:4}}if(!Ba){x[b+44>>2]=a;if(k){break b}break c}}if(!Ba){x[b+44>>2]=3;break b}}if(!Ba){g=g+8|0;continue}break}}if(!Ba){h=a+16|0;g=x[a+12>>2]}if(!Ba|(j|0)==1){Fr(h,b,c,d,e);f=1;if((Ba|0)==1){break a}}l=Ba;if(Ba){f=i}else{if((g|0)<2){break b}h=(g<<3)+h|0;g=a+24|0;a=x[a+8>>2];f=!(a&2)}if(!(!(f?l:1)&x[b+36>>2]!=1)){while(1){if(!Ba){a=y[b+54|0];if(a){break b}}if(!Ba|(j|0)==2){Fr(g,b,c,d,e);f=2;if((Ba|0)==1){break a}}if(!Ba){g=g+8|0;a=h>>>0>g>>>0;if(a){continue}}break}if(!Ba){break b}}if((Ba|0)==2|(Ba?a:!(a&1))){while(1){if(!(y[b+54|0]|x[b+36>>2]==1?Ba:1)){break b}if(!Ba|(j|0)==3){Fr(g,b,c,d,e);f=3;if((Ba|0)==1){break a}}if(!Ba){g=g+8|0;if(h>>>0>g>>>0){continue}}break}if(!Ba){break b}}while(1){if(!Ba){if(y[b+54|0]|x[b+36>>2]==1&x[b+24>>2]==1){break b}}if(!Ba|(j|0)==4){Fr(g,b,c,d,e);f=4;if((Ba|0)==1){break a}}if(!Ba){g=g+8|0;if(h>>>0>g>>>0){continue}}break}if(!Ba){break b}}if(!Ba){x[b+20>>2]=c;x[b+40>>2]=x[b+40>>2]+1;if(x[b+36>>2]!=1|x[b+24>>2]!=2){break b}v[b+54|0]=1}}return}x[x[Ca>>2]>>2]=f;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[f+24>>2]=h;x[f+28>>2]=i;x[f+32>>2]=k;x[Ca>>2]=x[Ca>>2]+36}function Ag(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0;j=Ba;if(!a){a=yg(b);if((Ba|0)!=(j|0)){p()}return a}if(b>>>0>=4294967232){x[12163]=48;return 0}g=b>>>0<11?16:b+11&-8;e=a-8|0;i=x[e+4>>2];d=i&-8;a:{if(!(i&3)){if(g>>>0<256){break a}if(d>>>0>=g+4>>>0){c=e;if(d-g>>>0<=x[12594]<<1>>>0){break a}}c=0;break a}h=d+e|0;b:{if(d>>>0>=g>>>0){c=d-g|0;if(c>>>0<16){break b}x[e+4>>2]=g|i&1|2;d=e+g|0;x[d+4>>2]=c|3;x[h+4>>2]=x[h+4>>2]|1;Cg(d,c);if((Ba|0)!=(j|0)){p()}break b}if(x[12480]==(h|0)){d=d+x[12477]|0;if(d>>>0<=g>>>0){break a}x[e+4>>2]=g|i&1|2;c=e+g|0;d=d-g|0;x[c+4>>2]=d|1;x[12477]=d;x[12480]=c;break b}if(x[12479]==(h|0)){d=d+x[12476]|0;if(d>>>0>>0){break a}c=d-g|0;c:{if(c>>>0>=16){x[e+4>>2]=g|i&1|2;f=e+g|0;x[f+4>>2]=c|1;d=d+e|0;x[d>>2]=c;x[d+4>>2]=x[d+4>>2]&-2;break c}x[e+4>>2]=d|i&1|2;c=d+e|0;x[c+4>>2]=x[c+4>>2]|1;c=0}x[12479]=f;x[12476]=c;break b}f=x[h+4>>2];if(f&2){break a}k=d+(f&-8)|0;if(g>>>0>k>>>0){break a}m=k-g|0;d:{if(f>>>0<=255){f=f>>>3|0;c=x[h+12>>2];d=x[h+8>>2];if((c|0)==(d|0)){o=49896,q=x[12474]&Js(f),x[o>>2]=q;break d}x[d+12>>2]=c;x[c+8>>2]=d;break d}l=x[h+24>>2];d=x[h+12>>2];e:{if((d|0)!=(h|0)){c=x[h+8>>2];x[c+12>>2]=d;x[d+8>>2]=c;break e}f:{c=h+20|0;f=x[c>>2];if(!f){f=x[h+16>>2];if(!f){break f}c=h+16|0}while(1){n=c;d=f;c=d+20|0;f=x[c>>2];if(f){continue}c=d+16|0;f=x[d+16>>2];if(f){continue}break}x[n>>2]=0;break e}d=0}if(!l){break d}c=x[h+28>>2];f=(c<<2)+50200|0;g:{if(x[f>>2]==(h|0)){x[f>>2]=d;if(d){break g}o=49900,q=x[12475]&Js(c),x[o>>2]=q;break d}x[(x[l+16>>2]==(h|0)?16:20)+l>>2]=d;if(!d){break d}}x[d+24>>2]=l;c=x[h+16>>2];if(c){x[d+16>>2]=c;x[c+24>>2]=d}c=x[h+20>>2];if(!c){break d}x[d+20>>2]=c;x[c+24>>2]=d}if(m>>>0<=15){x[e+4>>2]=i&1|k|2;c=e+k|0;x[c+4>>2]=x[c+4>>2]|1;break b}x[e+4>>2]=g|i&1|2;c=e+g|0;x[c+4>>2]=m|3;d=e+k|0;x[d+4>>2]=x[d+4>>2]|1;Cg(c,m);if((Ba|0)!=(j|0)){p()}}c=e}if(c){return c+8|0}c=yg(b);if((Ba|0)!=(j|0)){p()}if(!c){return 0}e=x[a-4>>2];e=(e&3?-4:-8)+(e&-8)|0;lf(c,a,b>>>0>e>>>0?e:b);if((Ba|0)!=(j|0)){p()}zg(a);if((Ba|0)!=(j|0)){p()}return c}function po(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,w=0,z=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-76;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];h=x[b+24>>2];i=x[b+28>>2];k=x[b+32>>2];l=x[b+36>>2];m=x[b+40>>2];o=x[b+44>>2];s=x[b+48>>2];q=x[b+52>>2];r=x[b+56>>2];t=x[b+60>>2];u=x[b+64>>2];w=x[b+68>>2];z=x[b+72>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){a=ya-176|0;ya=a;h=a+172|0;vj(h,d)}a:{if(!Ba|!j){g=sh(h);if((Ba|0)==1){break a}t=g}if(!Ba){h=ui(f)}if((Ba|0)==2|h){if(!Ba){h=y[nl(f,0)|0]}if(!Ba|(j|0)==1){g=rj(t,45);n=1;if((Ba|0)==1){break a}i=g}if(!Ba){i=i&255;s=(i|0)==(h|0)}}if(!Ba){k=a+168|0;l=a+167|0;q=a+166|0;r=ji(a+152|0);i=ji(a+140|0);m=ji(a+128|0);o=a+124|0;h=a+172|0}if(!Ba|(j|0)==2){lo(c,s,h,k,l,q,r,i,m,o);n=2;if((Ba|0)==1){break a}}if(!Ba){x[a+16>>2]=267;k=kl(a+8|0,0,a+16|0);b:{if((ui(f)|0)>x[a+124>>2]){h=((((ui(f)-x[a+124>>2]<<1)+ui(m)|0)+ui(i)|0)+x[a+124>>2]|0)+1|0;break b}h=((ui(m)+ui(i)|0)+x[a+124>>2]|0)+2|0}l=h>>>0<101;c=a+16|0}c:{if(!Ba){if(l){break c}c=yg(h)}if(!Ba|(j|0)==3){ll(k,c);n=3;if((Ba|0)==1){break a}}if(!Ba){c=x[k>>2];if(c){break c}Ji();p()}}if(!Ba){l=x[d+4>>2];q=ri(f);h=ri(f);f=ui(f)+h|0;o=a+168|0;u=v[a+167|0];w=v[a+166|0];z=x[a+124>>2];h=a+4|0}if(!Ba|(j|0)==4){mo(c,h,a,l,q,f,t,s,o,u,w,r,i,m,z);n=4;if((Ba|0)==1){break a}}if(!Ba){h=x[a>>2];f=x[a+4>>2]}if(!Ba|(j|0)==5){g=zm(b,c,f,h,d,e);n=5;if((Ba|0)==1){break a}f=g}if(!Ba|(j|0)==6){pl(k);n=6;if((Ba|0)==1){break a}}if(!Ba){hr(m);hr(i);hr(r);b=a+172|0}if(!Ba|(j|0)==7){Po(b);n=7;if((Ba|0)==1){break a}}if(!Ba){ya=a+176|0;return f|0}p()}x[x[Ca>>2]>>2]=n;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[g+28>>2]=i;x[g+32>>2]=k;x[g+36>>2]=l;x[g+40>>2]=m;x[g+44>>2]=o;x[g+48>>2]=s;x[g+52>>2]=q;x[g+56>>2]=r;x[g+60>>2]=t;x[g+64>>2]=u;x[g+68>>2]=w;x[g+72>>2]=z;x[Ca>>2]=x[Ca>>2]+76;return 0}function uo(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-76;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];h=x[b+24>>2];i=x[b+28>>2];k=x[b+32>>2];l=x[b+36>>2];m=x[b+40>>2];o=x[b+44>>2];q=x[b+48>>2];r=x[b+52>>2];s=x[b+56>>2];t=x[b+60>>2];u=x[b+64>>2];v=x[b+68>>2];w=x[b+72>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){a=ya-480|0;ya=a;h=a+476|0;vj(h,d)}a:{if(!Ba|!j){g=bi(h);if((Ba|0)==1){break a}t=g}if(!Ba){h=ui(f)}if((Ba|0)==2|h){if(!Ba){h=x[Wl(f,0)>>2]}if(!Ba|(j|0)==1){g=tj(t,45);n=1;if((Ba|0)==1){break a}i=g}q=Ba?q:(h|0)==(i|0)}if(!Ba){k=a+472|0;l=a+468|0;r=a+464|0;s=ji(a+452|0);i=ji(a+440|0);m=ji(a+428|0);o=a+424|0;h=a+476|0}if(!Ba|(j|0)==2){ro(c,q,h,k,l,r,s,i,m,o);n=2;if((Ba|0)==1){break a}}if(!Ba){x[a+16>>2]=267;k=kl(a+8|0,0,a+16|0);b:{if((ui(f)|0)>x[a+424>>2]){h=((((ui(f)-x[a+424>>2]<<1)+ui(m)|0)+ui(i)|0)+x[a+424>>2]|0)+1|0;break b}h=((ui(m)+ui(i)|0)+x[a+424>>2]|0)+2|0}l=h>>>0<101;c=a+16|0}c:{if(!Ba){if(l){break c}c=yg(h<<2)}if(!Ba|(j|0)==3){ll(k,c);n=3;if((Ba|0)==1){break a}}if(!Ba){c=x[k>>2];if(c){break c}Ji();p()}}if(!Ba){l=x[d+4>>2];r=ri(f);h=ri(f);f=h+(ui(f)<<2)|0;o=a+472|0;u=x[a+468>>2];v=x[a+464>>2];w=x[a+424>>2];h=a+4|0}if(!Ba|(j|0)==4){so(c,h,a,l,r,f,t,q,o,u,v,s,i,m,w);n=4;if((Ba|0)==1){break a}}if(!Ba){h=x[a>>2];f=x[a+4>>2]}if(!Ba|(j|0)==5){g=Qm(b,c,f,h,d,e);n=5;if((Ba|0)==1){break a}f=g}if(!Ba|(j|0)==6){pl(k);n=6;if((Ba|0)==1){break a}}if(!Ba){lr(m);lr(i);hr(s);b=a+476|0}if(!Ba|(j|0)==7){Po(b);n=7;if((Ba|0)==1){break a}}if(!Ba){ya=a+480|0;return f|0}p()}x[x[Ca>>2]>>2]=n;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[g+28>>2]=i;x[g+32>>2]=k;x[g+36>>2]=l;x[g+40>>2]=m;x[g+44>>2]=o;x[g+48>>2]=q;x[g+52>>2]=r;x[g+56>>2]=s;x[g+60>>2]=t;x[g+64>>2]=u;x[g+68>>2]=v;x[g+72>>2]=w;x[Ca>>2]=x[Ca>>2]+76;return 0}function Uk(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;h=Ba;e=x[b>>2];a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{l:{if(!d){break l}g=x[d>>2];if(!g){break l}if(!a){d=c;break j}x[d>>2]=0;d=c;break k}m:{if(!x[x[12204]>>2]){if(!a){break m}if(!c){break a}g=c;while(1){d=v[e|0];if(d){x[a>>2]=d&57343;a=a+4|0;e=e+1|0;g=g-1|0;if(g){continue}break a}break}x[a>>2]=0;x[b>>2]=0;return c-g|0}d=c;if(!a){break i}break g}a=gg(e);if((Ba|0)!=(h|0)){p()}return a}f=1;break g}f=0;break h}f=1}while(1){if(!f){f=y[e|0]>>>3|0;if((f-16|f+(g>>26))>>>0>7){break f}f=e+1|0;n:{if(!(g&33554432)){break n}if((y[f|0]&192)!=128){e=e-1|0;break d}f=e+2|0;if(!(g&524288)){break n}if((y[f|0]&192)!=128){e=e-1|0;break d}f=e+3|0}e=f;d=d-1|0;f=1;continue}while(1){g=y[e|0];o:{if(e&3|g-1>>>0>126){break o}g=x[e>>2];if((g|g-16843009)&-2139062144){break o}while(1){d=d-4|0;g=x[e+4>>2];e=e+4|0;if(!((g-16843009|g)&-2139062144)){continue}break}}f=g&255;if(f-1>>>0<=126){d=d-1|0;e=e+1|0;continue}break}f=f-194|0;if(f>>>0>50){break e}e=e+1|0;g=x[(f<<2)+35200>>2];f=0;continue}}while(1){if(!f){if(!d){break a}while(1){p:{f=y[e|0];h=f-1|0;q:{r:{if(h>>>0>126){g=f;break r}if(e&3|d>>>0<5){break q}s:{while(1){g=x[e>>2];if((g|g-16843009)&-2139062144){break s}x[a>>2]=g&255;x[a+4>>2]=y[e+1|0];x[a+8>>2]=y[e+2|0];x[a+12>>2]=y[e+3|0];a=a+16|0;e=e+4|0;d=d-4|0;if(d>>>0>4){continue}break}g=y[e|0]}f=g&255;h=f-1|0}if(h>>>0>126){break p}}x[a>>2]=f;a=a+4|0;e=e+1|0;d=d-1|0;if(d){continue}break a}break}f=f-194|0;if(f>>>0>50){break e}e=e+1|0;g=x[(f<<2)+35200>>2];f=1;continue}i=y[e|0];f=i>>>3|0;if((f-16|f+(g>>26))>>>0>7){break f}t:{u:{h=e+1|0;f=i-128|g<<6;v:{if((f|0)>=0){break v}i=y[h|0]-128|0;if(i>>>0>63){break u}h=e+2|0;f=i|f<<6;if((f|0)>=0){break v}h=y[h|0]-128|0;if(h>>>0>63){break u}f=h|f<<6;h=e+3|0}e=h;x[a>>2]=f;d=d-1|0;a=a+4|0;break t}x[12163]=25;e=e-1|0;break c}f=0;continue}}e=e-1|0;if(g){break d}g=y[e|0]}if(g&255){break d}if(a){x[a>>2]=0;x[b>>2]=0}return c-d|0}x[12163]=25;if(!a){break b}}x[b>>2]=e}return-1}x[b>>2]=e;return c}function gm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-40;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];i=x[b+24>>2];m=x[b+28>>2];g=x[b+36>>2];h=x[b+32>>2];l(0,h|0);l(1,g|0);q=+n();b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;k=x[x[Ca>>2]>>2]}if(!Ba){a=ya-368|0;ya=a;x[a+360>>2]=c;x[a+364>>2]=b;c=a+224|0;i=a+220|0;m=a+216|0;b=a+204|0}a:{if(!Ba|!k){em(b,d,c,i,m);h=0;if((Ba|0)==1){break a}}if(!Ba){c=ji(a+192|0);b=vi(c)}if(!Ba|(k|0)==1){wi(c,b);h=1;if((Ba|0)==1){break a}}if(!Ba){b=nl(c,0);x[a+188>>2]=b;d=a+16|0;x[a+12>>2]=d;x[a+8>>2]=0;v[a+7|0]=1;v[a+6|0]=69}while(1){b:{if(!Ba){i=a+360|0;d=a+364|0}if(!Ba|(k|0)==2){g=ci(d,i);h=2;if((Ba|0)==1){break a}d=g}if(!Ba){if(d){break b}d=x[a+188>>2];i=ui(c)+b|0;d=(d|0)==(i|0)}if((Ba|0)==2|d){if(!Ba){d=ui(c);b=ui(c)<<1}if(!Ba|(k|0)==3){wi(c,b);h=3;if((Ba|0)==1){break a}}if(!Ba){b=vi(c)}if(!Ba|(k|0)==4){wi(c,b);h=4;if((Ba|0)==1){break a}}if(!Ba){b=nl(c,0);d=d+b|0;x[a+188>>2]=d}}d=Ba?d:a+364|0;if(!Ba|(k|0)==5){g=di(d);h=5;if((Ba|0)==1){break a}d=g}if(!Ba){i=a+7|0;d=fm(d,i,a+6|0,b,a+188|0,x[a+220>>2],x[a+216>>2],a+204|0,a+16|0,a+12|0,a+8|0,a+224|0);if(d){break b}d=a+364|0}if(!Ba|(k|0)==6){g=fi(d);h=6;if((Ba|0)==1){break a}d=g}if(!Ba){continue}}break}if(!Ba){c:{if(!ui(a+204|0)|!y[a+7|0]){break c}d=x[a+12>>2];if((d-(a+16|0)|0)>159){break c}x[a+12>>2]=d+4;x[d>>2]=x[a+8>>2]}d=x[a+188>>2]}if(!Ba|(k|0)==7){r=Jl(b,d,e);h=7;if((Ba|0)==1){break a}q=r}if(!Ba){C[f>>3]=q;vl(a+204|0,a+16|0,x[a+12>>2],e);d=a+360|0;b=a+364|0}if(!Ba|(k|0)==8){g=ci(b,d);h=8;if((Ba|0)==1){break a}b=g}if(!Ba){if(b){x[e>>2]=x[e>>2]|2}b=x[a+364>>2];hr(c);hr(a+204|0);ya=a+368|0;return b|0}p()}x[x[Ca>>2]>>2]=h;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=i;x[g+28>>2]=m;o(+q);a=j(1)|0;s=g,t=j(0)|0,x[s+32>>2]=t;x[g+36>>2]=a;x[Ca>>2]=x[Ca>>2]+40;return 0}function Il(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,k=0,m=0,q=0,r=0,s=0,t=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-40;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];i=x[b+24>>2];m=x[b+28>>2];g=x[b+36>>2];h=x[b+32>>2];l(0,h|0);l(1,g|0);q=+n();b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;k=x[x[Ca>>2]>>2]}if(!Ba){a=ya-256|0;ya=a;x[a+248>>2]=c;x[a+252>>2]=b;c=a+208|0;i=a+207|0;m=a+206|0;b=a+192|0}a:{if(!Ba|!k){Fl(b,d,c,i,m);h=0;if((Ba|0)==1){break a}}if(!Ba){c=ji(a+180|0);b=vi(c)}if(!Ba|(k|0)==1){wi(c,b);h=1;if((Ba|0)==1){break a}}if(!Ba){b=nl(c,0);x[a+176>>2]=b;d=a+16|0;x[a+12>>2]=d;x[a+8>>2]=0;v[a+7|0]=1;v[a+6|0]=69}while(1){b:{if(!Ba){i=a+248|0;d=a+252|0}if(!Ba|(k|0)==2){g=th(d,i);h=2;if((Ba|0)==1){break a}d=g}if(!Ba){if(d){break b}d=x[a+176>>2];i=ui(c)+b|0;d=(d|0)==(i|0)}if((Ba|0)==2|d){if(!Ba){d=ui(c);b=ui(c)<<1}if(!Ba|(k|0)==3){wi(c,b);h=3;if((Ba|0)==1){break a}}if(!Ba){b=vi(c)}if(!Ba|(k|0)==4){wi(c,b);h=4;if((Ba|0)==1){break a}}if(!Ba){b=nl(c,0);d=d+b|0;x[a+176>>2]=d}}d=Ba?d:a+252|0;if(!Ba|(k|0)==5){g=uh(d);h=5;if((Ba|0)==1){break a}d=g}if(!Ba){i=a+7|0;d=Gl(d,i,a+6|0,b,a+176|0,v[a+207|0],v[a+206|0],a+192|0,a+16|0,a+12|0,a+8|0,a+208|0);if(d){break b}d=a+252|0}if(!Ba|(k|0)==6){g=wh(d);h=6;if((Ba|0)==1){break a}d=g}if(!Ba){continue}}break}if(!Ba){c:{if(!ui(a+192|0)|!y[a+7|0]){break c}d=x[a+12>>2];if((d-(a+16|0)|0)>159){break c}x[a+12>>2]=d+4;x[d>>2]=x[a+8>>2]}d=x[a+176>>2]}if(!Ba|(k|0)==7){r=Jl(b,d,e);h=7;if((Ba|0)==1){break a}q=r}if(!Ba){C[f>>3]=q;vl(a+192|0,a+16|0,x[a+12>>2],e);d=a+248|0;b=a+252|0}if(!Ba|(k|0)==8){g=th(b,d);h=8;if((Ba|0)==1){break a}b=g}if(!Ba){if(b){x[e>>2]=x[e>>2]|2}b=x[a+252>>2];hr(c);hr(a+192|0);ya=a+256|0;return b|0}p()}x[x[Ca>>2]>>2]=h;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=i;x[g+28>>2]=m;o(+q);a=j(1)|0;s=g,t=j(0)|0,x[s+32>>2]=t;x[g+36>>2]=a;x[Ca>>2]=x[Ca>>2]+40;return 0}function Nd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];j=x[b+20>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}e=Ba?e:x[x[a>>2]+16>>2];a:{if(!Ba|!h){Ea[e|0](a);if((Ba|0)==1){break a}}if(!Ba){h=x[a+12>>2];e=x[h+4>>2];b:{if((e|0)<=0){break b}i=e&1;a=x[h+16>>2];f=x[a+4>>2];k=x[a>>2];a=0;if((e|0)!=1){n=e&-2;while(1){g=a<<3;m=a<<2;C[g+k>>3]=B[m+b>>2];C[f+g>>3]=B[c+m>>2];g=a|1;m=g<<3;g=g<<2;C[m+k>>3]=B[g+b>>2];C[f+m>>3]=B[c+g>>2];a=a+2|0;j=j+2|0;if((n|0)!=(j|0)){continue}break}}if(!i){break b}j=a<<3;a=a<<2;C[j+k>>3]=B[a+b>>2];C[f+j>>3]=B[a+c>>2]}f=x[h>>2];c:{if((f|0)<=(e|0)){break c}a=e+1|0;k=x[h+16>>2];j=x[k+4>>2];k=x[k>>2];i=f-e|0;if(i&1){e=e<<3;i=i<<2;C[e+k>>3]=B[i+b>>2];C[e+j>>3]=E(-B[c+i>>2]);e=a}if((a|0)==(f|0)){break c}while(1){a=e<<3;i=f-e<<2;C[a+k>>3]=B[i+b>>2];C[a+j>>3]=E(-B[c+i>>2]);a=e+1|0;i=a<<3;a=f-a<<2;C[i+k>>3]=B[a+b>>2];C[j+i>>3]=E(-B[a+c>>2]);e=e+2|0;if((f|0)!=(e|0)){continue}break}}if((f|0)>0){m=f&-2;o=f&1;p=f&-4;i=f&3;q=x[h+8>>2];r=x[h+12>>2];a=x[h+16>>2];j=x[a+4>>2];c=x[a>>2];k=0;s=f>>>0<4;while(1){n=k<<2;e=x[r+n>>2];l=0;a=0;h=0;if(!s){while(1){b=a<<3;g=b|24;t=C[g+c>>3]*C[e+g>>3];g=b|16;u=C[g+c>>3]*C[e+g>>3];g=b|8;l=t+(u+(C[g+c>>3]*C[e+g>>3]+(C[b+c>>3]*C[b+e>>3]+l)));a=a+4|0;h=h+4|0;if((p|0)!=(h|0)){continue}break}}h=n+q|0;b=0;if(i){while(1){g=a<<3;l=C[g+c>>3]*C[e+g>>3]+l;a=a+1|0;b=b+1|0;if((i|0)!=(b|0)){continue}break}}b=x[h>>2];a=0;h=0;if((f|0)!=1){while(1){e=a<<3;g=e|8;l=l-C[e+j>>3]*C[b+e>>3]-C[g+j>>3]*C[b+g>>3];a=a+2|0;h=h+2|0;if((m|0)!=(h|0)){continue}break}}e=d+n|0;if(o){a=a<<3;l=l-C[a+j>>3]*C[a+b>>3]}B[e>>2]=l;k=k+1|0;if((f|0)!=(k|0)){continue}break}}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=j;x[Ca>>2]=x[Ca>>2]+24}function Id(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];g=x[b+20>>2];i=x[b+24>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}e=Ba?e:x[x[a>>2]+20>>2];a:{if(!Ba|!f){Ea[e|0](a);if((Ba|0)==1){break a}}if(!Ba){j=x[a+8>>2];e=x[j+4>>2];b:{if((e|0)<=0){break b}k=e&1;a=x[j+16>>2];f=x[a+4>>2];h=x[a>>2];if((e|0)!=1){n=e&-2;while(1){a=g<<3;C[a+h>>3]=C[a+b>>3];C[a+f>>3]=C[a+c>>3];a=a|8;C[a+h>>3]=C[a+b>>3];C[a+f>>3]=C[a+c>>3];g=g+2|0;i=i+2|0;if((n|0)!=(i|0)){continue}break}}if(!k){break b}a=g<<3;C[a+h>>3]=C[a+b>>3];C[a+f>>3]=C[a+c>>3]}f=x[j>>2];c:{if((f|0)<=(e|0)){break c}a=e+1|0;i=x[j+16>>2];g=x[i+4>>2];i=x[i>>2];h=f-e|0;if(h&1){e=e<<3;h=h<<3;C[e+i>>3]=C[h+b>>3];C[e+g>>3]=-C[c+h>>3];e=a}if((a|0)==(f|0)){break c}while(1){a=e<<3;h=f-e<<3;C[a+i>>3]=C[h+b>>3];C[a+g>>3]=-C[c+h>>3];a=e+1|0;h=a<<3;a=f-a<<3;C[h+i>>3]=C[a+b>>3];C[g+h>>3]=-C[a+c>>3];e=e+2|0;if((f|0)!=(e|0)){continue}break}}if((f|0)>0){n=f&-2;o=f&1;p=f&-4;h=f&3;q=x[j+8>>2];r=x[j+12>>2];a=x[j+16>>2];i=x[a+4>>2];c=x[a>>2];j=0;s=f>>>0<4;while(1){k=j<<2;e=x[k+r>>2];l=0;a=0;g=0;if(!s){while(1){b=a<<3;m=b|24;t=C[m+c>>3]*C[e+m>>3];m=b|16;u=C[m+c>>3]*C[e+m>>3];m=b|8;l=t+(u+(C[m+c>>3]*C[e+m>>3]+(C[b+c>>3]*C[b+e>>3]+l)));a=a+4|0;g=g+4|0;if((p|0)!=(g|0)){continue}break}}g=k+q|0;b=0;if(h){while(1){k=a<<3;l=C[k+c>>3]*C[e+k>>3]+l;a=a+1|0;b=b+1|0;if((h|0)!=(b|0)){continue}break}}b=x[g>>2];a=0;g=0;if((f|0)!=1){while(1){e=a<<3;k=e|8;l=l-C[e+i>>3]*C[b+e>>3]-C[i+k>>3]*C[b+k>>3];a=a+2|0;g=g+2|0;if((n|0)!=(g|0)){continue}break}}e=(j<<3)+d|0;if(o){a=a<<3;l=l-C[a+i>>3]*C[a+b>>3]}C[e>>3]=l;j=j+1|0;if((j|0)!=(f|0)){continue}break}}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[f+24>>2]=i;x[Ca>>2]=x[Ca>>2]+28}function Qd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=E(0),f=0,g=0,h=0,i=0,j=E(0),k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=E(0);if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];h=x[b+16>>2];k=x[b+20>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}h=Ba?h:x[x[a>>2]+16>>2];a:{if(!Ba|!g){Ea[h|0](a);if((Ba|0)==1){break a}}if(!Ba){h=ya-16|0;ya=h;o=x[a+12>>2];l=Mb(x[o+4>>2]<<1);p=x[o+4>>2];b:{c:{if((p|0)>0){while(1){q=k<<2;i=q+c|0;e=B[i>>2];a=h+8|0;g=h+12|0;m=ya-16|0;ya=m;n=x[i>>2];i=n&2147483647;d:{if(i>>>0<=1061752794){if(i>>>0<=964689919){B[a>>2]=e;x[g>>2]=1065353216;break d}f=+e;r=a,s=jf(f),B[r>>2]=s;r=g,s=hf(f),B[r>>2]=s;break d}if(i>>>0<=1081824209){if(i>>>0<=1075235811){f=+e;e:{if((n|0)<0){f=f+1.5707963267948966;e=E(-hf(f));break e}f=1.5707963267948966-f;e=hf(f)}B[a>>2]=e;r=g,s=jf(f),B[r>>2]=s;break d}f=((n|0)<0?3.141592653589793:-3.141592653589793)+ +e;r=a,s=E(-jf(f)),B[r>>2]=s;r=g,s=E(-hf(f)),B[r>>2]=s;break d}if(i>>>0<=1088565717){if(i>>>0<=1085271519){f=+e;f:{if((n|0)<0){f=f+4.71238898038469;r=a,s=hf(f),B[r>>2]=s;e=E(-jf(f));break f}f=f+-4.71238898038469;r=a,s=E(-hf(f)),B[r>>2]=s;e=jf(f)}B[g>>2]=e;break d}f=((n|0)<0?6.283185307179586:-6.283185307179586)+ +e;r=a,s=jf(f),B[r>>2]=s;r=g,s=hf(f),B[r>>2]=s;break d}if(i>>>0>=2139095040){e=E(e-e);B[g>>2]=e;B[a>>2]=e;break d}i=kf(e,m+8|0);e=jf(C[m+8>>3]);j=hf(C[m+8>>3]);g:{switch((i&3)-1|0){default:B[a>>2]=e;B[g>>2]=j;break d;case 0:B[a>>2]=j;B[g>>2]=-e;break d;case 1:B[a>>2]=-e;B[g>>2]=-j;break d;case 2:break g}}B[a>>2]=-j;B[g>>2]=e}ya=m+16|0;e=B[b+q>>2];j=E(e*B[h+12>>2]);B[h+12>>2]=j;e=E(e*B[h+8>>2]);B[h+8>>2]=e;a=(k<<3)+l|0;B[a+4>>2]=e;B[a>>2]=j;k=k+1|0;if((p|0)!=(k|0)){continue}break}Pd(o,l,d);break c}Pd(o,l,d);if(!l){break b}}zg(l)}ya=h+16|0}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=h;x[g+20>>2]=k;x[Ca>>2]=x[Ca>>2]+24}function Pc(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-48;d=x[Ca>>2];a=x[d>>2];b=x[d+4>>2];c=x[d+8>>2];g=x[d+12>>2];i=x[d+16>>2];h=x[d+20>>2];e=x[d+24>>2];j=x[d+32>>2];k=x[d+36>>2];l=x[d+40>>2];m=x[d+44>>2];f=x[d+28>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;n=x[x[Ca>>2]>>2]}if(!Ba){b=x[a>>2];a=x[b>>2]}a:{if((Ba|0)==2|a){if(!Ba){h=ya-32|0;ya=h;b=!x[a+4>>2]}b:{if(!(b?Ba:1)){break b}while(1){c:{if(!Ba){j=x[x[a+224>>2]+(l<<2)>>2];b=x[j+4>>2];d=x[j>>2];e=x[d+8>>2];c=x[d+12>>2];d:{if((e|0)>(c|0)){f=e-c|0;break d}k=(c|0)<=(e|0);f=0;if(k){break d}f=x[d+16>>2]+(e-c|0)|0}c=x[b+12>>2];i=x[b+8>>2];e:{if((c|0)<(i|0)){e=i-c|0;break e}k=(c|0)<=(i|0);e=0;if(k){break e}c=i-c|0;e=c+x[b+16>>2]|0}b=x[a+136>>2]>=3}if((Ba|0)==2|b){if(!Ba){x[h+28>>2]=11074;C[h+16>>3]=e>>>0;C[h+8>>3]=f>>>0;b=x[a+128>>2];if(!b){break c}i=h+16|0;k=h+8|0;m=x[x[b>>2]+24>>2];c=h+28|0}if(!Ba|!n){Ea[m|0](b,c,i,k);if((Ba|0)==1){break a}}}if(!Ba){c=e|g;g=c?g:x[a+36>>2];f:{if(v[j+100|0]&1|A[a+28>>2]<=f>>>0){break f}if((x[j+88>>2]&x[j+92>>2])==-1){b=x[a+28>>2]-f|0;c=b>>>0>g>>>0;g=c?b:g;break f}if(f){break f}b=x[a+28>>2];c=b>>>0>g>>>0;g=c?b:g}l=l+1|0;b=l>>>0>=A[a+4>>2];if(b){break b}continue}}break}if(!Ba){ac();p()}}if(!Ba){ya=h+32|0;return g}}if(!Ba){a=x[b+4>>2];b=x[x[x[a+144>>2]>>2]+532>>2];f=x[b+8>>2];e=x[b+12>>2];g:{if((f|0)>(e|0)){c=f-e|0;break g}c=0;if((e|0)<=(f|0)){break g}c=x[b+16>>2]+(f-e|0)|0}b=0;if(!(x[a+704>>2]==3|c)){c=x[x[x[a+144>>2]>>2]+528>>2];e=x[c+8>>2];b=x[c+12>>2];h:{if((e|0)>(b|0)){f=e-b|0;break h}f=0;if((b|0)<=(e|0)){break h}f=x[c+16>>2]+(e-b|0)|0}e=x[a+432>>2];a=x[a+440>>2]+x[a+28>>2]|0;a=(a|0)<(e|0)?e:a;b=(a|0)>(f|0)?a-f|0:0}return b}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=g;x[d+16>>2]=i;x[d+20>>2]=h;x[d+24>>2]=e;x[d+28>>2]=f;x[d+32>>2]=j;x[d+36>>2]=k;x[d+40>>2]=l;x[d+44>>2]=m;x[Ca>>2]=x[Ca>>2]+48;return 0}function hm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];h=x[b+24>>2];k=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){a=ya-384|0;ya=a;x[a+376>>2]=c;x[a+380>>2]=b;c=a+240|0;h=a+236|0;k=a+232|0;b=a+220|0}a:{if(!Ba|!i){em(b,d,c,h,k);if((Ba|0)==1){break a}}if(!Ba){c=ji(a+208|0);b=vi(c)}if(!Ba|(i|0)==1){wi(c,b);j=1;if((Ba|0)==1){break a}}if(!Ba){b=nl(c,0);x[a+204>>2]=b;d=a+32|0;x[a+28>>2]=d;x[a+24>>2]=0;v[a+23|0]=1;v[a+22|0]=69}while(1){b:{if(!Ba){h=a+376|0;d=a+380|0}if(!Ba|(i|0)==2){g=ci(d,h);j=2;if((Ba|0)==1){break a}d=g}if(!Ba){if(d){break b}d=x[a+204>>2];h=ui(c)+b|0;d=(d|0)==(h|0)}if((Ba|0)==2|d){if(!Ba){d=ui(c);b=ui(c)<<1}if(!Ba|(i|0)==3){wi(c,b);j=3;if((Ba|0)==1){break a}}if(!Ba){b=vi(c)}if(!Ba|(i|0)==4){wi(c,b);j=4;if((Ba|0)==1){break a}}if(!Ba){b=nl(c,0);d=d+b|0;x[a+204>>2]=d}}d=Ba?d:a+380|0;if(!Ba|(i|0)==5){g=di(d);j=5;if((Ba|0)==1){break a}d=g}if(!Ba){h=a+23|0;d=fm(d,h,a+22|0,b,a+204|0,x[a+236>>2],x[a+232>>2],a+220|0,a+32|0,a+28|0,a+24|0,a+240|0);if(d){break b}d=a+380|0}if(!Ba|(i|0)==6){g=fi(d);j=6;if((Ba|0)==1){break a}d=g}if(!Ba){continue}}break}if(!Ba){c:{if(!ui(a+220|0)|!y[a+23|0]){break c}d=x[a+28>>2];if((d-(a+32|0)|0)>159){break c}x[a+28>>2]=d+4;x[d>>2]=x[a+24>>2]}d=x[a+204>>2]}if(!Ba|(i|0)==7){Ll(a,b,d,e);j=7;if((Ba|0)==1){break a}}if(!Ba){b=x[a>>2];d=x[a+4>>2];g=x[a+12>>2];x[f+8>>2]=x[a+8>>2];x[f+12>>2]=g;x[f>>2]=b;x[f+4>>2]=d;vl(a+220|0,a+32|0,x[a+28>>2],e);d=a+376|0;b=a+380|0}if(!Ba|(i|0)==8){g=ci(b,d);j=8;if((Ba|0)==1){break a}b=g}if(!Ba){if(b){x[e>>2]=x[e>>2]|2}b=x[a+380>>2];hr(c);hr(a+220|0);ya=a+384|0;return b|0}p()}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[g+28>>2]=k;x[Ca>>2]=x[Ca>>2]+32;return 0}function Kl(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];h=x[b+24>>2];k=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){a=ya-272|0;ya=a;x[a+264>>2]=c;x[a+268>>2]=b;c=a+224|0;h=a+223|0;k=a+222|0;b=a+208|0}a:{if(!Ba|!i){Fl(b,d,c,h,k);if((Ba|0)==1){break a}}if(!Ba){c=ji(a+196|0);b=vi(c)}if(!Ba|(i|0)==1){wi(c,b);j=1;if((Ba|0)==1){break a}}if(!Ba){b=nl(c,0);x[a+192>>2]=b;d=a+32|0;x[a+28>>2]=d;x[a+24>>2]=0;v[a+23|0]=1;v[a+22|0]=69}while(1){b:{if(!Ba){h=a+264|0;d=a+268|0}if(!Ba|(i|0)==2){g=th(d,h);j=2;if((Ba|0)==1){break a}d=g}if(!Ba){if(d){break b}d=x[a+192>>2];h=ui(c)+b|0;d=(d|0)==(h|0)}if((Ba|0)==2|d){if(!Ba){d=ui(c);b=ui(c)<<1}if(!Ba|(i|0)==3){wi(c,b);j=3;if((Ba|0)==1){break a}}if(!Ba){b=vi(c)}if(!Ba|(i|0)==4){wi(c,b);j=4;if((Ba|0)==1){break a}}if(!Ba){b=nl(c,0);d=d+b|0;x[a+192>>2]=d}}d=Ba?d:a+268|0;if(!Ba|(i|0)==5){g=uh(d);j=5;if((Ba|0)==1){break a}d=g}if(!Ba){h=a+23|0;d=Gl(d,h,a+22|0,b,a+192|0,v[a+223|0],v[a+222|0],a+208|0,a+32|0,a+28|0,a+24|0,a+224|0);if(d){break b}d=a+268|0}if(!Ba|(i|0)==6){g=wh(d);j=6;if((Ba|0)==1){break a}d=g}if(!Ba){continue}}break}if(!Ba){c:{if(!ui(a+208|0)|!y[a+23|0]){break c}d=x[a+28>>2];if((d-(a+32|0)|0)>159){break c}x[a+28>>2]=d+4;x[d>>2]=x[a+24>>2]}d=x[a+192>>2]}if(!Ba|(i|0)==7){Ll(a,b,d,e);j=7;if((Ba|0)==1){break a}}if(!Ba){b=x[a>>2];d=x[a+4>>2];g=x[a+12>>2];x[f+8>>2]=x[a+8>>2];x[f+12>>2]=g;x[f>>2]=b;x[f+4>>2]=d;vl(a+208|0,a+32|0,x[a+28>>2],e);d=a+264|0;b=a+268|0}if(!Ba|(i|0)==8){g=th(b,d);j=8;if((Ba|0)==1){break a}b=g}if(!Ba){if(b){x[e>>2]=x[e>>2]|2}b=x[a+268>>2];hr(c);hr(a+208|0);ya=a+272|0;return b|0}p()}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[g+28>>2]=k;x[Ca>>2]=x[Ca>>2]+32;return 0}function ve(a,b){a=a|0;b=+b;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0,m=0,p=0,q=0,r=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;d=x[Ca>>2];a=x[d>>2];e=x[d+12>>2];c=x[d+16>>2];f=x[d+24>>2];g=x[d+20>>2];l(0,g|0);l(1,f|0);i=+n();f=x[d+8>>2];d=x[d+4>>2];l(0,d|0);l(1,f|0);b=+n()}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}a:{c=Ba?c:b!=b;if(c|(Ba|0)==2){if(!Ba|!h){d=Ib(51780,9273,38);f=0;if((Ba|0)==1){break a}c=d}if(!Ba|(h|0)==1){Kb(c);f=1;if((Ba|0)==1){break a}}b=Ba?b:0}if(!Ba){e=x[a+44>>2];c=x[x[a>>2]+8>>2]}if(!Ba|(h|0)==2){d=Ea[c|0](a)|0;f=2;if((Ba|0)==1){break a}c=d}if(!Ba){b:{if((c|0)==(e|0)){h=x[a+20>>2];k=h;c=x[a+24>>2];if((c|0)!=(h|0)){i=C[x[a+8>>2]+(c<<3)>>3];c=c+1|0;k=(c|0)!=x[a+28>>2]?c:0;x[a+24>>2]=k}f=x[a+44>>2];e=0;d=x[a+32>>2];if(!(C[d>>3]>=i)){c:{if(!f){e=d+(f<<3)|0;break c}e=d;c=f;while(1){g=c>>>1|0;m=(g<<3)+e|0;p=C[m>>3]>3}d:{if(b>i){g=e+1|0;if((f|0)<=(g|0)){c=e;break d}while(1){c=g;i=C[d+(c<<3)>>3];if(i>b){c=e;break d}C[d+(e<<3)>>3]=i;e=c;g=c+1|0;if((f|0)!=(g|0)){continue}break}break d}if(!(b>3];if(i>3]=i;f=e>>>0>1;e=c;if(f){continue}break}c=0}C[d+(c<<3)>>3]=b;break b}f=x[a+32>>2];d=x[a+44>>2];e:{if(!d){e=f+(d<<3)|0;break e}e=f;c=d;while(1){g=c>>>1|0;k=(g<<3)+e|0;h=C[k>>3]>3;if((c|0)<(d|0)){e=f+(c<<3)|0;mf(e+8|0,e,d-c<<3);d=x[a+44>>2]}C[f+(c<<3)>>3]=b;x[a+44>>2]=d+1;h=x[a+20>>2];k=x[a+24>>2]}c=x[a+28>>2];e=(c+k|0)+(h^-1)|0;if((e|0)!=(((c|0)<=(e|0)?c:0)|0)){C[x[a+8>>2]+(h<<3)>>3]=b;e=a;a=h+1|0;x[e+20>>2]=(a|0)!=(c|0)?a:0}}return}x[x[Ca>>2]>>2]=f;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;o(+b);a=j(1)|0;q=d,r=j(0)|0,x[q+4>>2]=r;x[d+8>>2]=a;x[d+12>>2]=e;x[d+16>>2]=c;o(+i);a=j(1)|0;q=d,r=j(0)|0,x[q+20>>2]=r;x[d+24>>2]=a;x[Ca>>2]=x[Ca>>2]+28}function rp(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;r=Ba;s=ya-16|0;ya=s;i=c;while(1){a:{if((d|0)==(i|0)){i=d;break a}if(!y[i|0]){break a}i=i+1|0;continue}break}x[h>>2]=f;x[e>>2]=c;while(1){b:{c:{d:{if((c|0)==(d|0)|(f|0)==(g|0)){break d}j=x[b+4>>2];x[s+8>>2]=x[b>>2];x[s+12>>2]=j;t=ya-16|0;ya=t;x[t+12>>2]=x[a+8>>2];w=Rl(t+8|0,t+12|0);if((Ba|0)!=(r|0)){p()}o=i-c|0;j=0;m=ya-1040|0;ya=m;n=x[e>>2];x[m+12>>2]=n;q=f?f:m+16|0;l=f?g-f>>2:256;e:{f:{g:{if(!(!n|!l)){while(1){k=o>>>2|0;if(!(o>>>0>131|k>>>0>=l>>>0)){k=n;break f}u=Uk(q,m+12|0,k>>>0>>0?k:l,b);if((Ba|0)!=(r|0)){p()}k=x[m+12>>2];if((u|0)==-1){l=0;j=-1;break g}v=(m+16|0)!=(q|0)?u:0;l=l-v|0;q=(v<<2)+q|0;o=k?(n+o|0)-k|0:0;j=j+u|0;if(!k){break g}n=k;if(l){continue}break}break g}k=n}if(!k){break e}}if(!l|!o){break e}n=j;while(1){j=Ej(q,k,o,b);if((Ba|0)!=(r|0)){p()}h:{i:{if(j+2>>>0<=2){j:{switch(j+1|0){case 1:x[m+12>>2]=0;break i;case 0:break e;default:break j}}x[b>>2]=0;break i}k=x[m+12>>2]+j|0;x[m+12>>2]=k;n=n+1|0;l=l-1|0;if(l){break h}}j=n;break e}q=q+4|0;o=o-j|0;j=n;if(o){continue}break}}if(f){x[e>>2]=x[m+12>>2]}ya=m+1040|0;Sl(w);if((Ba|0)!=(r|0)){p()}ya=t+16|0;k:{l:{m:{n:{if((j|0)==-1){while(1){o:{x[h>>2]=f;if(x[e>>2]==(c|0)){break o}g=1;b=sp(f,c,i-c|0,s+8|0,x[a+8>>2]);if((Ba|0)!=(r|0)){p()}p:{switch(b+2|0){case 1:x[e>>2]=c;break n;default:g=b;break;case 0:break l;case 2:break p}}c=c+g|0;f=x[h>>2]+4|0;continue}break}x[e>>2]=c;break d}f=x[h>>2]+(j<<2)|0;x[h>>2]=f;if((f|0)==(g|0)){break k}c=x[e>>2];if((d|0)==(i|0)){i=d;continue}c=sp(f,c,1,b,x[a+8>>2]);if((Ba|0)!=(r|0)){p()}if(!c){break m}}a=2;break c}x[h>>2]=x[h>>2]+4;c=x[e>>2]+1|0;x[e>>2]=c;i=c;while(1){if((d|0)==(i|0)){i=d;break b}if(!y[i|0]){break b}i=i+1|0;continue}}x[e>>2]=c;a=1;break c}c=x[e>>2]}a=(c|0)!=(d|0)}ya=s+16|0;return a|0}f=x[h>>2];continue}}function dm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=E(0),m=E(0);if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];h=x[b+24>>2];k=x[b+28>>2];l=B[b+32>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){a=ya-368|0;ya=a;x[a+360>>2]=c;x[a+364>>2]=b;c=a+224|0;h=a+220|0;k=a+216|0;b=a+204|0}a:{if(!Ba|!i){em(b,d,c,h,k);if((Ba|0)==1){break a}}if(!Ba){c=ji(a+192|0);b=vi(c)}if(!Ba|(i|0)==1){wi(c,b);j=1;if((Ba|0)==1){break a}}if(!Ba){b=nl(c,0);x[a+188>>2]=b;d=a+16|0;x[a+12>>2]=d;x[a+8>>2]=0;v[a+7|0]=1;v[a+6|0]=69}while(1){b:{if(!Ba){h=a+360|0;d=a+364|0}if(!Ba|(i|0)==2){g=ci(d,h);j=2;if((Ba|0)==1){break a}d=g}if(!Ba){if(d){break b}d=x[a+188>>2];h=ui(c)+b|0;d=(d|0)==(h|0)}if((Ba|0)==2|d){if(!Ba){d=ui(c);b=ui(c)<<1}if(!Ba|(i|0)==3){wi(c,b);j=3;if((Ba|0)==1){break a}}if(!Ba){b=vi(c)}if(!Ba|(i|0)==4){wi(c,b);j=4;if((Ba|0)==1){break a}}if(!Ba){b=nl(c,0);d=d+b|0;x[a+188>>2]=d}}d=Ba?d:a+364|0;if(!Ba|(i|0)==5){g=di(d);j=5;if((Ba|0)==1){break a}d=g}if(!Ba){h=a+7|0;d=fm(d,h,a+6|0,b,a+188|0,x[a+220>>2],x[a+216>>2],a+204|0,a+16|0,a+12|0,a+8|0,a+224|0);if(d){break b}d=a+364|0}if(!Ba|(i|0)==6){g=fi(d);j=6;if((Ba|0)==1){break a}d=g}if(!Ba){continue}}break}if(!Ba){c:{if(!ui(a+204|0)|!y[a+7|0]){break c}d=x[a+12>>2];if((d-(a+16|0)|0)>159){break c}x[a+12>>2]=d+4;x[d>>2]=x[a+8>>2]}d=x[a+188>>2]}if(!Ba|(i|0)==7){m=Hl(b,d,e);j=7;if((Ba|0)==1){break a}l=m}if(!Ba){B[f>>2]=l;vl(a+204|0,a+16|0,x[a+12>>2],e);d=a+360|0;b=a+364|0}if(!Ba|(i|0)==8){g=ci(b,d);j=8;if((Ba|0)==1){break a}b=g}if(!Ba){if(b){x[e>>2]=x[e>>2]|2}b=x[a+364>>2];hr(c);hr(a+204|0);ya=a+368|0;return b|0}p()}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[g+28>>2]=k;B[g+32>>2]=l;x[Ca>>2]=x[Ca>>2]+36;return 0}function El(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=E(0),m=E(0);if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];h=x[b+24>>2];k=x[b+28>>2];l=B[b+32>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){a=ya-256|0;ya=a;x[a+248>>2]=c;x[a+252>>2]=b;c=a+208|0;h=a+207|0;k=a+206|0;b=a+192|0}a:{if(!Ba|!i){Fl(b,d,c,h,k);if((Ba|0)==1){break a}}if(!Ba){c=ji(a+180|0);b=vi(c)}if(!Ba|(i|0)==1){wi(c,b);j=1;if((Ba|0)==1){break a}}if(!Ba){b=nl(c,0);x[a+176>>2]=b;d=a+16|0;x[a+12>>2]=d;x[a+8>>2]=0;v[a+7|0]=1;v[a+6|0]=69}while(1){b:{if(!Ba){h=a+248|0;d=a+252|0}if(!Ba|(i|0)==2){g=th(d,h);j=2;if((Ba|0)==1){break a}d=g}if(!Ba){if(d){break b}d=x[a+176>>2];h=ui(c)+b|0;d=(d|0)==(h|0)}if((Ba|0)==2|d){if(!Ba){d=ui(c);b=ui(c)<<1}if(!Ba|(i|0)==3){wi(c,b);j=3;if((Ba|0)==1){break a}}if(!Ba){b=vi(c)}if(!Ba|(i|0)==4){wi(c,b);j=4;if((Ba|0)==1){break a}}if(!Ba){b=nl(c,0);d=d+b|0;x[a+176>>2]=d}}d=Ba?d:a+252|0;if(!Ba|(i|0)==5){g=uh(d);j=5;if((Ba|0)==1){break a}d=g}if(!Ba){h=a+7|0;d=Gl(d,h,a+6|0,b,a+176|0,v[a+207|0],v[a+206|0],a+192|0,a+16|0,a+12|0,a+8|0,a+208|0);if(d){break b}d=a+252|0}if(!Ba|(i|0)==6){g=wh(d);j=6;if((Ba|0)==1){break a}d=g}if(!Ba){continue}}break}if(!Ba){c:{if(!ui(a+192|0)|!y[a+7|0]){break c}d=x[a+12>>2];if((d-(a+16|0)|0)>159){break c}x[a+12>>2]=d+4;x[d>>2]=x[a+8>>2]}d=x[a+176>>2]}if(!Ba|(i|0)==7){m=Hl(b,d,e);j=7;if((Ba|0)==1){break a}l=m}if(!Ba){B[f>>2]=l;vl(a+192|0,a+16|0,x[a+12>>2],e);d=a+248|0;b=a+252|0}if(!Ba|(i|0)==8){g=th(b,d);j=8;if((Ba|0)==1){break a}b=g}if(!Ba){if(b){x[e>>2]=x[e>>2]|2}b=x[a+252>>2];hr(c);hr(a+192|0);ya=a+256|0;return b|0}p()}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[g+28>>2]=k;B[g+32>>2]=l;x[Ca>>2]=x[Ca>>2]+36;return 0}function im(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];j=x[b+24>>2];k=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){a=ya-320|0;ya=a;x[a+312>>2]=c;x[a+316>>2]=b;k=ji(a+196|0);b=a+16|0;vj(b,d)}a:{if(!Ba|!h){g=bi(b);if((Ba|0)==1){break a}b=g}c=Ba?c:a+208|0;if(!Ba|(h|0)==1){jm(b,39344,39370,c);i=1;if((Ba|0)==1){break a}}b=Ba?b:a+16|0;if(!Ba|(h|0)==2){Po(b);i=2;if((Ba|0)==1){break a}}if(!Ba){c=ji(a+184|0);b=vi(c)}if(!Ba|(h|0)==3){wi(c,b);i=3;if((Ba|0)==1){break a}}if(!Ba){b=nl(c,0);x[a+180>>2]=b;d=a+16|0;x[a+12>>2]=d;x[a+8>>2]=0}while(1){b:{if(!Ba){j=a+312|0;d=a+316|0}if(!Ba|(h|0)==4){g=ci(d,j);i=4;if((Ba|0)==1){break a}d=g}if(!Ba){if(d){break b}d=x[a+180>>2];j=ui(c)+b|0;d=(d|0)==(j|0)}if((Ba|0)==2|d){if(!Ba){d=ui(c);b=ui(c)<<1}if(!Ba|(h|0)==5){wi(c,b);i=5;if((Ba|0)==1){break a}}if(!Ba){b=vi(c)}if(!Ba|(h|0)==6){wi(c,b);i=6;if((Ba|0)==1){break a}}if(!Ba){b=nl(c,0);d=d+b|0;x[a+180>>2]=d}}d=Ba?d:a+316|0;if(!Ba|(h|0)==7){g=di(d);i=7;if((Ba|0)==1){break a}d=g}if(!Ba){j=a+180|0;d=_l(d,16,b,j,a+8|0,0,k,a+16|0,a+12|0,a+208|0);if(d){break b}d=a+316|0}if(!Ba|(h|0)==8){g=fi(d);i=8;if((Ba|0)==1){break a}d=g}if(!Ba){continue}}break}if(!Ba){d=x[a+180>>2];b=d-b|0}if(!Ba|(h|0)==9){wi(c,b);i=9;if((Ba|0)==1){break a}}if(!Ba){b=ri(c);d=Ol();x[a>>2]=f}if(!Ba|(h|0)==10){g=Pl(b,d,a);i=10;if((Ba|0)==1){break a}b=g}if(!Ba){if((b|0)!=1){x[e>>2]=4}d=a+312|0;b=a+316|0}if(!Ba|(h|0)==11){g=ci(b,d);i=11;if((Ba|0)==1){break a}b=g}if(!Ba){if(b){x[e>>2]=x[e>>2]|2}b=x[a+316>>2];hr(c);hr(k);ya=a+320|0;return b|0}p()}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=j;x[g+28>>2]=k;x[Ca>>2]=x[Ca>>2]+32;return 0}function Ml(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];j=x[b+24>>2];k=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){a=ya-256|0;ya=a;x[a+248>>2]=c;x[a+252>>2]=b;k=ji(a+196|0);b=a+16|0;vj(b,d)}a:{if(!Ba|!h){g=sh(b);if((Ba|0)==1){break a}b=g}c=Ba?c:a+208|0;if(!Ba|(h|0)==1){Nl(b,39344,39370,c);i=1;if((Ba|0)==1){break a}}b=Ba?b:a+16|0;if(!Ba|(h|0)==2){Po(b);i=2;if((Ba|0)==1){break a}}if(!Ba){c=ji(a+184|0);b=vi(c)}if(!Ba|(h|0)==3){wi(c,b);i=3;if((Ba|0)==1){break a}}if(!Ba){b=nl(c,0);x[a+180>>2]=b;d=a+16|0;x[a+12>>2]=d;x[a+8>>2]=0}while(1){b:{if(!Ba){j=a+248|0;d=a+252|0}if(!Ba|(h|0)==4){g=th(d,j);i=4;if((Ba|0)==1){break a}d=g}if(!Ba){if(d){break b}d=x[a+180>>2];j=ui(c)+b|0;d=(d|0)==(j|0)}if((Ba|0)==2|d){if(!Ba){d=ui(c);b=ui(c)<<1}if(!Ba|(h|0)==5){wi(c,b);i=5;if((Ba|0)==1){break a}}if(!Ba){b=vi(c)}if(!Ba|(h|0)==6){wi(c,b);i=6;if((Ba|0)==1){break a}}if(!Ba){b=nl(c,0);d=d+b|0;x[a+180>>2]=d}}d=Ba?d:a+252|0;if(!Ba|(h|0)==7){g=uh(d);i=7;if((Ba|0)==1){break a}d=g}if(!Ba){j=a+180|0;d=tl(d,16,b,j,a+8|0,0,k,a+16|0,a+12|0,a+208|0);if(d){break b}d=a+252|0}if(!Ba|(h|0)==8){g=wh(d);i=8;if((Ba|0)==1){break a}d=g}if(!Ba){continue}}break}if(!Ba){d=x[a+180>>2];b=d-b|0}if(!Ba|(h|0)==9){wi(c,b);i=9;if((Ba|0)==1){break a}}if(!Ba){b=ri(c);d=Ol();x[a>>2]=f}if(!Ba|(h|0)==10){g=Pl(b,d,a);i=10;if((Ba|0)==1){break a}b=g}if(!Ba){if((b|0)!=1){x[e>>2]=4}d=a+248|0;b=a+252|0}if(!Ba|(h|0)==11){g=th(b,d);i=11;if((Ba|0)==1){break a}b=g}if(!Ba){if(b){x[e>>2]=x[e>>2]|2}b=x[a+252>>2];hr(c);hr(k);ya=a+256|0;return b|0}p()}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=j;x[g+28>>2]=k;x[Ca>>2]=x[Ca>>2]+32;return 0}function cm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];k=x[b+28>>2];l=x[b+32>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){a=ya-336|0;ya=a;x[a+328>>2]=c;x[a+332>>2]=b;c=a+208|0;b=rl(d)}a:{if(!Ba|!i){h=Yl(d,c);if((Ba|0)==1){break a}k=h}if(!Ba){g=a+324|0;c=a+196|0}if(!Ba|(i|0)==1){Zl(c,d,g);j=1;if((Ba|0)==1){break a}}if(!Ba){d=ji(a+184|0);c=vi(d)}if(!Ba|(i|0)==2){wi(d,c);j=2;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);x[a+180>>2]=c;g=a+16|0;x[a+12>>2]=g;x[a+8>>2]=0}while(1){b:{if(!Ba){l=a+328|0;g=a+332|0}if(!Ba|(i|0)==3){h=ci(g,l);j=3;if((Ba|0)==1){break a}g=h}if(!Ba){if(g){break b}g=x[a+180>>2];l=ui(d)+c|0;g=(g|0)==(l|0)}if((Ba|0)==2|g){if(!Ba){g=ui(d);c=ui(d)<<1}if(!Ba|(i|0)==4){wi(d,c);j=4;if((Ba|0)==1){break a}}if(!Ba){c=vi(d)}if(!Ba|(i|0)==5){wi(d,c);j=5;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);g=g+c|0;x[a+180>>2]=g}}g=Ba?g:a+332|0;if(!Ba|(i|0)==6){h=di(g);j=6;if((Ba|0)==1){break a}g=h}if(!Ba){l=a+180|0;if(_l(g,b,c,l,a+8|0,x[a+324>>2],a+196|0,a+16|0,a+12|0,k)){break b}g=a+332|0}if(!Ba|(i|0)==7){h=fi(g);j=7;if((Ba|0)==1){break a}g=h}if(!Ba){continue}}break}if(!Ba){c:{if(!ui(a+196|0)){break c}k=x[a+12>>2];if((k-(a+16|0)|0)>159){break c}x[a+12>>2]=k+4;x[k>>2]=x[a+8>>2]}m=f,n=Dl(c,x[a+180>>2],e,b),x[m>>2]=n;x[f+4>>2]=Da;vl(a+196|0,a+16|0,x[a+12>>2],e);c=a+328|0;b=a+332|0}if(!Ba|(i|0)==8){h=ci(b,c);j=8;if((Ba|0)==1){break a}b=h}if(!Ba){if(b){x[e>>2]=x[e>>2]|2}b=x[a+332>>2];hr(d);hr(a+196|0);ya=a+336|0;return b|0}p()}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=k;x[h+32>>2]=l;x[Ca>>2]=x[Ca>>2]+36;return 0}function $l(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];k=x[b+28>>2];l=x[b+32>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){a=ya-336|0;ya=a;x[a+328>>2]=c;x[a+332>>2]=b;c=a+208|0;b=rl(d)}a:{if(!Ba|!i){h=Yl(d,c);if((Ba|0)==1){break a}k=h}if(!Ba){g=a+324|0;c=a+196|0}if(!Ba|(i|0)==1){Zl(c,d,g);j=1;if((Ba|0)==1){break a}}if(!Ba){d=ji(a+184|0);c=vi(d)}if(!Ba|(i|0)==2){wi(d,c);j=2;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);x[a+180>>2]=c;g=a+16|0;x[a+12>>2]=g;x[a+8>>2]=0}while(1){b:{if(!Ba){l=a+328|0;g=a+332|0}if(!Ba|(i|0)==3){h=ci(g,l);j=3;if((Ba|0)==1){break a}g=h}if(!Ba){if(g){break b}g=x[a+180>>2];l=ui(d)+c|0;g=(g|0)==(l|0)}if((Ba|0)==2|g){if(!Ba){g=ui(d);c=ui(d)<<1}if(!Ba|(i|0)==4){wi(d,c);j=4;if((Ba|0)==1){break a}}if(!Ba){c=vi(d)}if(!Ba|(i|0)==5){wi(d,c);j=5;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);g=g+c|0;x[a+180>>2]=g}}g=Ba?g:a+332|0;if(!Ba|(i|0)==6){h=di(g);j=6;if((Ba|0)==1){break a}g=h}if(!Ba){l=a+180|0;if(_l(g,b,c,l,a+8|0,x[a+324>>2],a+196|0,a+16|0,a+12|0,k)){break b}g=a+332|0}if(!Ba|(i|0)==7){h=fi(g);j=7;if((Ba|0)==1){break a}g=h}if(!Ba){continue}}break}if(!Ba){c:{if(!ui(a+196|0)){break c}k=x[a+12>>2];if((k-(a+16|0)|0)>159){break c}x[a+12>>2]=k+4;x[k>>2]=x[a+8>>2]}m=f,n=xl(c,x[a+180>>2],e,b),x[m>>2]=n;x[f+4>>2]=Da;vl(a+196|0,a+16|0,x[a+12>>2],e);c=a+328|0;b=a+332|0}if(!Ba|(i|0)==8){h=ci(b,c);j=8;if((Ba|0)==1){break a}b=h}if(!Ba){if(b){x[e>>2]=x[e>>2]|2}b=x[a+332>>2];hr(d);hr(a+196|0);ya=a+336|0;return b|0}p()}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=k;x[h+32>>2]=l;x[Ca>>2]=x[Ca>>2]+36;return 0}function bm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];k=x[b+28>>2];l=x[b+32>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){a=ya-336|0;ya=a;x[a+328>>2]=c;x[a+332>>2]=b;c=a+208|0;b=rl(d)}a:{if(!Ba|!i){h=Yl(d,c);if((Ba|0)==1){break a}k=h}if(!Ba){g=a+324|0;c=a+196|0}if(!Ba|(i|0)==1){Zl(c,d,g);j=1;if((Ba|0)==1){break a}}if(!Ba){d=ji(a+184|0);c=vi(d)}if(!Ba|(i|0)==2){wi(d,c);j=2;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);x[a+180>>2]=c;g=a+16|0;x[a+12>>2]=g;x[a+8>>2]=0}while(1){b:{if(!Ba){l=a+328|0;g=a+332|0}if(!Ba|(i|0)==3){h=ci(g,l);j=3;if((Ba|0)==1){break a}g=h}if(!Ba){if(g){break b}g=x[a+180>>2];l=ui(d)+c|0;g=(g|0)==(l|0)}if((Ba|0)==2|g){if(!Ba){g=ui(d);c=ui(d)<<1}if(!Ba|(i|0)==4){wi(d,c);j=4;if((Ba|0)==1){break a}}if(!Ba){c=vi(d)}if(!Ba|(i|0)==5){wi(d,c);j=5;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);g=g+c|0;x[a+180>>2]=g}}g=Ba?g:a+332|0;if(!Ba|(i|0)==6){h=di(g);j=6;if((Ba|0)==1){break a}g=h}if(!Ba){l=a+180|0;if(_l(g,b,c,l,a+8|0,x[a+324>>2],a+196|0,a+16|0,a+12|0,k)){break b}g=a+332|0}if(!Ba|(i|0)==7){h=fi(g);j=7;if((Ba|0)==1){break a}g=h}if(!Ba){continue}}break}if(!Ba){c:{if(!ui(a+196|0)){break c}k=x[a+12>>2];if((k-(a+16|0)|0)>159){break c}x[a+12>>2]=k+4;x[k>>2]=x[a+8>>2]}m=f,n=Bl(c,x[a+180>>2],e,b),x[m>>2]=n;vl(a+196|0,a+16|0,x[a+12>>2],e);c=a+328|0;b=a+332|0}if(!Ba|(i|0)==8){h=ci(b,c);j=8;if((Ba|0)==1){break a}b=h}if(!Ba){if(b){x[e>>2]=x[e>>2]|2}b=x[a+332>>2];hr(d);hr(a+196|0);ya=a+336|0;return b|0}p()}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=k;x[h+32>>2]=l;x[Ca>>2]=x[Ca>>2]+36;return 0}function am(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];k=x[b+28>>2];l=x[b+32>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){a=ya-336|0;ya=a;x[a+328>>2]=c;x[a+332>>2]=b;c=a+208|0;b=rl(d)}a:{if(!Ba|!i){h=Yl(d,c);if((Ba|0)==1){break a}k=h}if(!Ba){g=a+324|0;c=a+196|0}if(!Ba|(i|0)==1){Zl(c,d,g);j=1;if((Ba|0)==1){break a}}if(!Ba){d=ji(a+184|0);c=vi(d)}if(!Ba|(i|0)==2){wi(d,c);j=2;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);x[a+180>>2]=c;g=a+16|0;x[a+12>>2]=g;x[a+8>>2]=0}while(1){b:{if(!Ba){l=a+328|0;g=a+332|0}if(!Ba|(i|0)==3){h=ci(g,l);j=3;if((Ba|0)==1){break a}g=h}if(!Ba){if(g){break b}g=x[a+180>>2];l=ui(d)+c|0;g=(g|0)==(l|0)}if((Ba|0)==2|g){if(!Ba){g=ui(d);c=ui(d)<<1}if(!Ba|(i|0)==4){wi(d,c);j=4;if((Ba|0)==1){break a}}if(!Ba){c=vi(d)}if(!Ba|(i|0)==5){wi(d,c);j=5;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);g=g+c|0;x[a+180>>2]=g}}g=Ba?g:a+332|0;if(!Ba|(i|0)==6){h=di(g);j=6;if((Ba|0)==1){break a}g=h}if(!Ba){l=a+180|0;if(_l(g,b,c,l,a+8|0,x[a+324>>2],a+196|0,a+16|0,a+12|0,k)){break b}g=a+332|0}if(!Ba|(i|0)==7){h=fi(g);j=7;if((Ba|0)==1){break a}g=h}if(!Ba){continue}}break}if(!Ba){c:{if(!ui(a+196|0)){break c}k=x[a+12>>2];if((k-(a+16|0)|0)>159){break c}x[a+12>>2]=k+4;x[k>>2]=x[a+8>>2]}m=f,n=zl(c,x[a+180>>2],e,b),w[m>>1]=n;vl(a+196|0,a+16|0,x[a+12>>2],e);c=a+328|0;b=a+332|0}if(!Ba|(i|0)==8){h=ci(b,c);j=8;if((Ba|0)==1){break a}b=h}if(!Ba){if(b){x[e>>2]=x[e>>2]|2}b=x[a+332>>2];hr(d);hr(a+196|0);ya=a+336|0;return b|0}p()}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=k;x[h+32>>2]=l;x[Ca>>2]=x[Ca>>2]+36;return 0}function Xl(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];k=x[b+28>>2];l=x[b+32>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){a=ya-336|0;ya=a;x[a+328>>2]=c;x[a+332>>2]=b;c=a+208|0;b=rl(d)}a:{if(!Ba|!i){h=Yl(d,c);if((Ba|0)==1){break a}k=h}if(!Ba){g=a+324|0;c=a+196|0}if(!Ba|(i|0)==1){Zl(c,d,g);j=1;if((Ba|0)==1){break a}}if(!Ba){d=ji(a+184|0);c=vi(d)}if(!Ba|(i|0)==2){wi(d,c);j=2;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);x[a+180>>2]=c;g=a+16|0;x[a+12>>2]=g;x[a+8>>2]=0}while(1){b:{if(!Ba){l=a+328|0;g=a+332|0}if(!Ba|(i|0)==3){h=ci(g,l);j=3;if((Ba|0)==1){break a}g=h}if(!Ba){if(g){break b}g=x[a+180>>2];l=ui(d)+c|0;g=(g|0)==(l|0)}if((Ba|0)==2|g){if(!Ba){g=ui(d);c=ui(d)<<1}if(!Ba|(i|0)==4){wi(d,c);j=4;if((Ba|0)==1){break a}}if(!Ba){c=vi(d)}if(!Ba|(i|0)==5){wi(d,c);j=5;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);g=g+c|0;x[a+180>>2]=g}}g=Ba?g:a+332|0;if(!Ba|(i|0)==6){h=di(g);j=6;if((Ba|0)==1){break a}g=h}if(!Ba){l=a+180|0;if(_l(g,b,c,l,a+8|0,x[a+324>>2],a+196|0,a+16|0,a+12|0,k)){break b}g=a+332|0}if(!Ba|(i|0)==7){h=fi(g);j=7;if((Ba|0)==1){break a}g=h}if(!Ba){continue}}break}if(!Ba){c:{if(!ui(a+196|0)){break c}k=x[a+12>>2];if((k-(a+16|0)|0)>159){break c}x[a+12>>2]=k+4;x[k>>2]=x[a+8>>2]}m=f,n=ul(c,x[a+180>>2],e,b),x[m>>2]=n;vl(a+196|0,a+16|0,x[a+12>>2],e);c=a+328|0;b=a+332|0}if(!Ba|(i|0)==8){h=ci(b,c);j=8;if((Ba|0)==1){break a}b=h}if(!Ba){if(b){x[e>>2]=x[e>>2]|2}b=x[a+332>>2];hr(d);hr(a+196|0);ya=a+336|0;return b|0}p()}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=k;x[h+32>>2]=l;x[Ca>>2]=x[Ca>>2]+36;return 0}function Wa(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;b=x[Ca>>2];a=x[b>>2];d=x[b+8>>2];e=x[b+12>>2];f=x[b+16>>2];j=x[b+20>>2];g=x[b+24>>2];k=x[b+28>>2];h=x[b+32>>2];l=x[b+36>>2];i=x[b+40>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;m=x[x[Ca>>2]>>2]}if(!Ba){e=x[a+4>>2];l=x[a>>2];g=(e-l|0)/12|0;d=g+1|0;k=d>>>0<357913942}a:{b:{c:{d:{e:{if((Ba|0)==2|k){if(!Ba){c=(x[a+8>>2]-l|0)/12|0;h=c<<1;k=d>>>0>>0?h:d;d=c>>>0>=178956970;j=d?357913941:k}if((Ba|0)==2|j){if(!Ba){if(j>>>0>=357913942){break e}f=D(j,12)}if(!Ba|!m){c=dr(f);if((Ba|0)==1){break a}f=c}}if(Ba){c=k}else{d=D(g,12)+f|0;x[d+8>>2]=0;x[d>>2]=0;x[d+4>>2]=0;g=x[b+4>>2];b=x[b>>2];c=(g|0)!=(b|0)}if(c|(Ba|0)==2){if(!Ba){g=g-b|0;i=g>>2;if(i>>>0>=1073741824){break d}}if(!Ba|(m|0)==1){c=dr(g);n=1;if((Ba|0)==1){break a}h=c}if(!Ba){x[d>>2]=h;i=(i<<2)+h|0;x[d+8>>2]=i;b=lf(h,b,g);x[d+4>>2]=i}}if(!Ba){b=D(j,12)+f|0;g=d+12|0;if((e|0)==(l|0)){break c}while(1){d=d-12|0;f=d+8|0;x[f>>2]=0;e=e-12|0;x[d>>2]=x[e>>2];x[d+4>>2]=x[e+4>>2];c=f;f=e+8|0;x[c>>2]=x[f>>2];x[f>>2]=0;x[e>>2]=0;x[e+4>>2]=0;if((e|0)!=(l|0)){continue}break}x[a+8>>2]=b;f=x[a+4>>2];x[a+4>>2]=g;e=x[a>>2];x[a>>2]=d;if((f|0)==(e|0)){break b}while(1){a=f-12|0;b=x[a>>2];if(b){x[f-8>>2]=b;zg(b)}f=a;if((a|0)!=(e|0)){continue}break}break b}}if(!Ba|(m|0)==2){Xa();n=2;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){Ya();p()}}if(!Ba|(m|0)==3){Xa();n=3;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){x[a+8>>2]=b;x[a+4>>2]=g;x[a>>2]=d}}if(!(e?Ba:1)){zg(e)}return}x[x[Ca>>2]>>2]=n;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=e;x[c+16>>2]=f;x[c+20>>2]=j;x[c+24>>2]=g;x[c+28>>2]=k;x[c+32>>2]=h;x[c+36>>2]=l;x[c+40>>2]=i;x[Ca>>2]=x[Ca>>2]+44}function Ve(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];c=x[e+8>>2];d=x[e+12>>2];f=x[e+16>>2];e=x[e+20>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){e=a+88|0;c=x[e+16>>2];d=x[e+124>>2];if(d){if(c){while(1){f=x[d+(b<<2)>>2];if(f){zg(f)}b=b+1|0;if((c|0)!=(b|0)){continue}break}}zg(d)}d=x[e+128>>2];if(d){if(c){b=0;while(1){f=x[d+(b<<2)>>2];if(f){zg(f)}b=b+1|0;if((c|0)!=(b|0)){continue}break}}zg(d)}b=x[e+132>>2];if(b){zg(b)}d=x[e+136>>2];if(d){if(c){b=0;while(1){f=x[d+(b<<2)>>2];if(f){zg(f)}b=b+1|0;if((c|0)!=(b|0)){continue}break}}zg(d)}d=x[e+140>>2];if(d){if(c){b=0;while(1){f=x[d+(b<<2)>>2];if(f){zg(f)}b=b+1|0;if((c|0)!=(b|0)){continue}break}}zg(d)}f=x[e+144>>2];if(f){if(c){b=0;while(1){d=x[(b<<2)+f>>2];if(d){zg(d)}b=b+1|0;if((c|0)!=(b|0)){continue}break}}zg(f)}c=x[e+112>>2];if(c){x[e+116>>2]=c;zg(c)}c=x[e+88>>2];d=e+72|0;b=(c|0)==(d|0)}a:{b:{if(!Ba){c:{if(b){b=4;c=d;break c}b=5;d=!c;if(d){break b}}d=x[c>>2];b=x[d+(b<<2)>>2]}if(!Ba|!g){Ea[b|0](c);if((Ba|0)==1){break a}}}if(!Ba){c=x[e- -64>>2];f=e+48|0;d=(c|0)==(f|0);b=e+24|0}d:{if(!Ba){e:{if(d){d=4;c=f;break e}d=5;if(!c){break d}}d=x[x[c>>2]+(d<<2)>>2]}if(!Ba|(g|0)==1){Ea[d|0](c);h=1;if((Ba|0)==1){break a}}}if(!Ba){c=x[e+40>>2];d=(c|0)==(b|0)}f:{if(!Ba){g:{if(d){d=4;c=b;break g}d=5;if(!c){break f}}b=x[x[c>>2]+(d<<2)>>2]}if(!Ba|(g|0)==2){Ea[b|0](c);h=2;if((Ba|0)==1){break a}}}if(!Ba){x[a+56>>2]=16212;c=x[a+68>>2];if(c){zg(c)}x[a+32>>2]=16212;c=x[a+44>>2];if(c){zg(c)}a=a+24|0}if(!Ba|(g|0)==3){Nb(a);h=3;if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=h;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=f;x[g+20>>2]=e;x[Ca>>2]=x[Ca>>2]+24}function Ze(){var a=0;a=Ba;da(46516,8955);if((Ba|0)!=(a|0)){p()}ea(46540,5535,1,0);if((Ba|0)!=(a|0)){p()}fa(46552,3503,1,-128,127);if((Ba|0)!=(a|0)){p()}fa(46596,3496,1,-128,127);if((Ba|0)!=(a|0)){p()}fa(46584,3494,1,0,255);if((Ba|0)!=(a|0)){p()}fa(46608,1739,2,-32768,32767);if((Ba|0)!=(a|0)){p()}fa(46620,1730,2,0,65535);if((Ba|0)!=(a|0)){p()}fa(46632,1818,4,-2147483648,2147483647);if((Ba|0)!=(a|0)){p()}fa(46644,1809,4,0,-1);if((Ba|0)!=(a|0)){p()}fa(46656,6370,4,-2147483648,2147483647);if((Ba|0)!=(a|0)){p()}fa(46668,6361,4,0,-1);if((Ba|0)!=(a|0)){p()}Bs(46680,2509,-2147483648,2147483647);if((Ba|0)!=(a|0)){p()}Bs(46692,2508,0,-1);if((Ba|0)!=(a|0)){p()}ga(46704,2387,4);if((Ba|0)!=(a|0)){p()}ga(46716,7809,8);if((Ba|0)!=(a|0)){p()}ha(12584,6409);if((Ba|0)!=(a|0)){p()}ha(16428,10249);if((Ba|0)!=(a|0)){p()}ia(16500,4,6383);if((Ba|0)!=(a|0)){p()}ia(16576,2,6421);if((Ba|0)!=(a|0)){p()}ia(16652,4,6436);if((Ba|0)!=(a|0)){p()}ja(12276,5828);if((Ba|0)!=(a|0)){p()}ka(16692,0,10180);if((Ba|0)!=(a|0)){p()}ka(16732,0,10282);if((Ba|0)!=(a|0)){p()}ka(16772,1,10210);if((Ba|0)!=(a|0)){p()}ka(16812,2,9745);if((Ba|0)!=(a|0)){p()}ka(16852,3,9776);if((Ba|0)!=(a|0)){p()}ka(16892,4,9816);if((Ba|0)!=(a|0)){p()}ka(16932,5,9845);if((Ba|0)!=(a|0)){p()}ka(16972,4,10319);if((Ba|0)!=(a|0)){p()}ka(17012,5,10349);if((Ba|0)!=(a|0)){p()}ka(16732,0,9947);if((Ba|0)!=(a|0)){p()}ka(16772,1,9914);if((Ba|0)!=(a|0)){p()}ka(16812,2,10013);if((Ba|0)!=(a|0)){p()}ka(16852,3,9979);if((Ba|0)!=(a|0)){p()}ka(16892,4,10147);if((Ba|0)!=(a|0)){p()}ka(16932,5,10113);if((Ba|0)!=(a|0)){p()}ka(17052,8,10080);if((Ba|0)!=(a|0)){p()}ka(17092,9,10046);if((Ba|0)!=(a|0)){p()}ka(12632,6,9883);if((Ba|0)!=(a|0)){p()}ka(17132,7,10388);if((Ba|0)!=(a|0)){p()}}function wl(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];j=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){a=ya-256|0;ya=a;x[a+248>>2]=c;x[a+252>>2]=b;c=a+196|0;g=a+247|0;b=rl(d)}a:{if(!Ba|!i){sl(c,d,g);if((Ba|0)==1){break a}}if(!Ba){d=ji(a+184|0);c=vi(d)}if(!Ba|(i|0)==1){wi(d,c);k=1;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);x[a+180>>2]=c;g=a+16|0;x[a+12>>2]=g;x[a+8>>2]=0}while(1){b:{if(!Ba){j=a+248|0;g=a+252|0}if(!Ba|(i|0)==2){h=th(g,j);k=2;if((Ba|0)==1){break a}g=h}if(!Ba){if(g){break b}g=x[a+180>>2];j=ui(d)+c|0;g=(g|0)==(j|0)}if((Ba|0)==2|g){if(!Ba){g=ui(d);c=ui(d)<<1}if(!Ba|(i|0)==3){wi(d,c);k=3;if((Ba|0)==1){break a}}if(!Ba){c=vi(d)}if(!Ba|(i|0)==4){wi(d,c);k=4;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);g=g+c|0;x[a+180>>2]=g}}g=Ba?g:a+252|0;if(!Ba|(i|0)==5){h=uh(g);k=5;if((Ba|0)==1){break a}g=h}if(!Ba){j=a+180|0;if(tl(g,b,c,j,a+8|0,v[a+247|0],a+196|0,a+16|0,a+12|0,39344)){break b}g=a+252|0}if(!Ba|(i|0)==6){h=wh(g);k=6;if((Ba|0)==1){break a}g=h}if(!Ba){continue}}break}if(!Ba){c:{if(!ui(a+196|0)){break c}g=x[a+12>>2];if((g-(a+16|0)|0)>159){break c}x[a+12>>2]=g+4;x[g>>2]=x[a+8>>2]}l=f,m=xl(c,x[a+180>>2],e,b),x[l>>2]=m;x[f+4>>2]=Da;vl(a+196|0,a+16|0,x[a+12>>2],e);c=a+248|0;b=a+252|0}if(!Ba|(i|0)==7){h=th(b,c);k=7;if((Ba|0)==1){break a}b=h}if(!Ba){if(b){x[e>>2]=x[e>>2]|2}b=x[a+252>>2];hr(d);hr(a+196|0);ya=a+256|0;return b|0}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=j;x[Ca>>2]=x[Ca>>2]+32;return 0}function Cl(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];j=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){a=ya-256|0;ya=a;x[a+248>>2]=c;x[a+252>>2]=b;c=a+196|0;g=a+247|0;b=rl(d)}a:{if(!Ba|!i){sl(c,d,g);if((Ba|0)==1){break a}}if(!Ba){d=ji(a+184|0);c=vi(d)}if(!Ba|(i|0)==1){wi(d,c);k=1;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);x[a+180>>2]=c;g=a+16|0;x[a+12>>2]=g;x[a+8>>2]=0}while(1){b:{if(!Ba){j=a+248|0;g=a+252|0}if(!Ba|(i|0)==2){h=th(g,j);k=2;if((Ba|0)==1){break a}g=h}if(!Ba){if(g){break b}g=x[a+180>>2];j=ui(d)+c|0;g=(g|0)==(j|0)}if((Ba|0)==2|g){if(!Ba){g=ui(d);c=ui(d)<<1}if(!Ba|(i|0)==3){wi(d,c);k=3;if((Ba|0)==1){break a}}if(!Ba){c=vi(d)}if(!Ba|(i|0)==4){wi(d,c);k=4;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);g=g+c|0;x[a+180>>2]=g}}g=Ba?g:a+252|0;if(!Ba|(i|0)==5){h=uh(g);k=5;if((Ba|0)==1){break a}g=h}if(!Ba){j=a+180|0;if(tl(g,b,c,j,a+8|0,v[a+247|0],a+196|0,a+16|0,a+12|0,39344)){break b}g=a+252|0}if(!Ba|(i|0)==6){h=wh(g);k=6;if((Ba|0)==1){break a}g=h}if(!Ba){continue}}break}if(!Ba){c:{if(!ui(a+196|0)){break c}g=x[a+12>>2];if((g-(a+16|0)|0)>159){break c}x[a+12>>2]=g+4;x[g>>2]=x[a+8>>2]}l=f,m=Dl(c,x[a+180>>2],e,b),x[l>>2]=m;x[f+4>>2]=Da;vl(a+196|0,a+16|0,x[a+12>>2],e);c=a+248|0;b=a+252|0}if(!Ba|(i|0)==7){h=th(b,c);k=7;if((Ba|0)==1){break a}b=h}if(!Ba){if(b){x[e>>2]=x[e>>2]|2}b=x[a+252>>2];hr(d);hr(a+196|0);ya=a+256|0;return b|0}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=j;x[Ca>>2]=x[Ca>>2]+32;return 0}function _p(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){if(y[52848]){return x[13211]}if(!y[53952]){v[53952]=1}}a:{if(!Ba|!b){Xp(53664,45400);a=0;if((Ba|0)==1){break a}}if(!Ba|(b|0)==1){Xp(53676,45432);a=1;if((Ba|0)==1){break a}}if(!Ba|(b|0)==2){Xp(53688,45468);a=2;if((Ba|0)==1){break a}}if(!Ba|(b|0)==3){Xp(53700,45492);a=3;if((Ba|0)==1){break a}}if(!Ba|(b|0)==4){Xp(53712,45516);a=4;if((Ba|0)==1){break a}}if(!Ba|(b|0)==5){Xp(53724,45532);a=5;if((Ba|0)==1){break a}}if(!Ba|(b|0)==6){Xp(53736,45552);a=6;if((Ba|0)==1){break a}}if(!Ba|(b|0)==7){Xp(53748,45572);a=7;if((Ba|0)==1){break a}}if(!Ba|(b|0)==8){Xp(53760,45600);a=8;if((Ba|0)==1){break a}}if(!Ba|(b|0)==9){Xp(53772,45640);a=9;if((Ba|0)==1){break a}}if(!Ba|(b|0)==10){Xp(53784,45672);a=10;if((Ba|0)==1){break a}}if(!Ba|(b|0)==11){Xp(53796,45708);a=11;if((Ba|0)==1){break a}}if(!Ba|(b|0)==12){Xp(53808,45744);a=12;if((Ba|0)==1){break a}}if(!Ba|(b|0)==13){Xp(53820,45760);a=13;if((Ba|0)==1){break a}}if(!Ba|(b|0)==14){Xp(53832,45776);a=14;if((Ba|0)==1){break a}}if(!Ba|(b|0)==15){Xp(53844,45792);a=15;if((Ba|0)==1){break a}}if(!Ba|(b|0)==16){Xp(53856,45516);a=16;if((Ba|0)==1){break a}}if(!Ba|(b|0)==17){Xp(53868,45808);a=17;if((Ba|0)==1){break a}}if(!Ba|(b|0)==18){Xp(53880,45824);a=18;if((Ba|0)==1){break a}}if(!Ba|(b|0)==19){Xp(53892,45840);a=19;if((Ba|0)==1){break a}}if(!Ba|(b|0)==20){Xp(53904,45856);a=20;if((Ba|0)==1){break a}}if(!Ba|(b|0)==21){Xp(53916,45872);a=21;if((Ba|0)==1){break a}}if(!Ba|(b|0)==22){Xp(53928,45888);a=22;if((Ba|0)==1){break a}}if(!Ba|(b|0)==23){Xp(53940,45904);a=23;if((Ba|0)==1){break a}}if(!Ba){v[52848]=1;x[13211]=53664;return 53664}p()}x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function yl(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];j=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){a=ya-256|0;ya=a;x[a+248>>2]=c;x[a+252>>2]=b;c=a+196|0;g=a+247|0;b=rl(d)}a:{if(!Ba|!i){sl(c,d,g);if((Ba|0)==1){break a}}if(!Ba){d=ji(a+184|0);c=vi(d)}if(!Ba|(i|0)==1){wi(d,c);k=1;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);x[a+180>>2]=c;g=a+16|0;x[a+12>>2]=g;x[a+8>>2]=0}while(1){b:{if(!Ba){j=a+248|0;g=a+252|0}if(!Ba|(i|0)==2){h=th(g,j);k=2;if((Ba|0)==1){break a}g=h}if(!Ba){if(g){break b}g=x[a+180>>2];j=ui(d)+c|0;g=(g|0)==(j|0)}if((Ba|0)==2|g){if(!Ba){g=ui(d);c=ui(d)<<1}if(!Ba|(i|0)==3){wi(d,c);k=3;if((Ba|0)==1){break a}}if(!Ba){c=vi(d)}if(!Ba|(i|0)==4){wi(d,c);k=4;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);g=g+c|0;x[a+180>>2]=g}}g=Ba?g:a+252|0;if(!Ba|(i|0)==5){h=uh(g);k=5;if((Ba|0)==1){break a}g=h}if(!Ba){j=a+180|0;if(tl(g,b,c,j,a+8|0,v[a+247|0],a+196|0,a+16|0,a+12|0,39344)){break b}g=a+252|0}if(!Ba|(i|0)==6){h=wh(g);k=6;if((Ba|0)==1){break a}g=h}if(!Ba){continue}}break}if(!Ba){c:{if(!ui(a+196|0)){break c}g=x[a+12>>2];if((g-(a+16|0)|0)>159){break c}x[a+12>>2]=g+4;x[g>>2]=x[a+8>>2]}l=f,m=zl(c,x[a+180>>2],e,b),w[l>>1]=m;vl(a+196|0,a+16|0,x[a+12>>2],e);c=a+248|0;b=a+252|0}if(!Ba|(i|0)==7){h=th(b,c);k=7;if((Ba|0)==1){break a}b=h}if(!Ba){if(b){x[e>>2]=x[e>>2]|2}b=x[a+252>>2];hr(d);hr(a+196|0);ya=a+256|0;return b|0}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=j;x[Ca>>2]=x[Ca>>2]+32;return 0}function ql(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];j=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){a=ya-256|0;ya=a;x[a+248>>2]=c;x[a+252>>2]=b;c=a+196|0;g=a+247|0;b=rl(d)}a:{if(!Ba|!i){sl(c,d,g);if((Ba|0)==1){break a}}if(!Ba){d=ji(a+184|0);c=vi(d)}if(!Ba|(i|0)==1){wi(d,c);k=1;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);x[a+180>>2]=c;g=a+16|0;x[a+12>>2]=g;x[a+8>>2]=0}while(1){b:{if(!Ba){j=a+248|0;g=a+252|0}if(!Ba|(i|0)==2){h=th(g,j);k=2;if((Ba|0)==1){break a}g=h}if(!Ba){if(g){break b}g=x[a+180>>2];j=ui(d)+c|0;g=(g|0)==(j|0)}if((Ba|0)==2|g){if(!Ba){g=ui(d);c=ui(d)<<1}if(!Ba|(i|0)==3){wi(d,c);k=3;if((Ba|0)==1){break a}}if(!Ba){c=vi(d)}if(!Ba|(i|0)==4){wi(d,c);k=4;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);g=g+c|0;x[a+180>>2]=g}}g=Ba?g:a+252|0;if(!Ba|(i|0)==5){h=uh(g);k=5;if((Ba|0)==1){break a}g=h}if(!Ba){j=a+180|0;if(tl(g,b,c,j,a+8|0,v[a+247|0],a+196|0,a+16|0,a+12|0,39344)){break b}g=a+252|0}if(!Ba|(i|0)==6){h=wh(g);k=6;if((Ba|0)==1){break a}g=h}if(!Ba){continue}}break}if(!Ba){c:{if(!ui(a+196|0)){break c}g=x[a+12>>2];if((g-(a+16|0)|0)>159){break c}x[a+12>>2]=g+4;x[g>>2]=x[a+8>>2]}l=f,m=ul(c,x[a+180>>2],e,b),x[l>>2]=m;vl(a+196|0,a+16|0,x[a+12>>2],e);c=a+248|0;b=a+252|0}if(!Ba|(i|0)==7){h=th(b,c);k=7;if((Ba|0)==1){break a}b=h}if(!Ba){if(b){x[e>>2]=x[e>>2]|2}b=x[a+252>>2];hr(d);hr(a+196|0);ya=a+256|0;return b|0}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=j;x[Ca>>2]=x[Ca>>2]+32;return 0}function Al(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];j=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){a=ya-256|0;ya=a;x[a+248>>2]=c;x[a+252>>2]=b;c=a+196|0;g=a+247|0;b=rl(d)}a:{if(!Ba|!i){sl(c,d,g);if((Ba|0)==1){break a}}if(!Ba){d=ji(a+184|0);c=vi(d)}if(!Ba|(i|0)==1){wi(d,c);k=1;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);x[a+180>>2]=c;g=a+16|0;x[a+12>>2]=g;x[a+8>>2]=0}while(1){b:{if(!Ba){j=a+248|0;g=a+252|0}if(!Ba|(i|0)==2){h=th(g,j);k=2;if((Ba|0)==1){break a}g=h}if(!Ba){if(g){break b}g=x[a+180>>2];j=ui(d)+c|0;g=(g|0)==(j|0)}if((Ba|0)==2|g){if(!Ba){g=ui(d);c=ui(d)<<1}if(!Ba|(i|0)==3){wi(d,c);k=3;if((Ba|0)==1){break a}}if(!Ba){c=vi(d)}if(!Ba|(i|0)==4){wi(d,c);k=4;if((Ba|0)==1){break a}}if(!Ba){c=nl(d,0);g=g+c|0;x[a+180>>2]=g}}g=Ba?g:a+252|0;if(!Ba|(i|0)==5){h=uh(g);k=5;if((Ba|0)==1){break a}g=h}if(!Ba){j=a+180|0;if(tl(g,b,c,j,a+8|0,v[a+247|0],a+196|0,a+16|0,a+12|0,39344)){break b}g=a+252|0}if(!Ba|(i|0)==6){h=wh(g);k=6;if((Ba|0)==1){break a}g=h}if(!Ba){continue}}break}if(!Ba){c:{if(!ui(a+196|0)){break c}g=x[a+12>>2];if((g-(a+16|0)|0)>159){break c}x[a+12>>2]=g+4;x[g>>2]=x[a+8>>2]}l=f,m=Bl(c,x[a+180>>2],e,b),x[l>>2]=m;vl(a+196|0,a+16|0,x[a+12>>2],e);c=a+248|0;b=a+252|0}if(!Ba|(i|0)==7){h=th(b,c);k=7;if((Ba|0)==1){break a}b=h}if(!Ba){if(b){x[e>>2]=x[e>>2]|2}b=x[a+252>>2];hr(d);hr(a+196|0);ya=a+256|0;return b|0}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=j;x[Ca>>2]=x[Ca>>2]+32;return 0}function Yp(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){if(y[52840]){return x[13209]}if(!y[53648]){v[53648]=1}}a:{if(!Ba|!b){Sp(53360,1172);a=0;if((Ba|0)==1){break a}}if(!Ba|(b|0)==1){Sp(53372,1163);a=1;if((Ba|0)==1){break a}}if(!Ba|(b|0)==2){Sp(53384,6351);a=2;if((Ba|0)==1){break a}}if(!Ba|(b|0)==3){Sp(53396,5589);a=3;if((Ba|0)==1){break a}}if(!Ba|(b|0)==4){Sp(53408,1266);a=4;if((Ba|0)==1){break a}}if(!Ba|(b|0)==5){Sp(53420,7552);a=5;if((Ba|0)==1){break a}}if(!Ba|(b|0)==6){Sp(53432,1180);a=6;if((Ba|0)==1){break a}}if(!Ba|(b|0)==7){Sp(53444,1710);a=7;if((Ba|0)==1){break a}}if(!Ba|(b|0)==8){Sp(53456,3432);a=8;if((Ba|0)==1){break a}}if(!Ba|(b|0)==9){Sp(53468,3415);a=9;if((Ba|0)==1){break a}}if(!Ba|(b|0)==10){Sp(53480,3423);a=10;if((Ba|0)==1){break a}}if(!Ba|(b|0)==11){Sp(53492,3442);a=11;if((Ba|0)==1){break a}}if(!Ba|(b|0)==12){Sp(53504,5395);a=12;if((Ba|0)==1){break a}}if(!Ba|(b|0)==13){Sp(53516,9650);a=13;if((Ba|0)==1){break a}}if(!Ba|(b|0)==14){Sp(53528,3524);a=14;if((Ba|0)==1){break a}}if(!Ba|(b|0)==15){Sp(53540,3148);a=15;if((Ba|0)==1){break a}}if(!Ba|(b|0)==16){Sp(53552,1266);a=16;if((Ba|0)==1){break a}}if(!Ba|(b|0)==17){Sp(53564,4687);a=17;if((Ba|0)==1){break a}}if(!Ba|(b|0)==18){Sp(53576,5531);a=18;if((Ba|0)==1){break a}}if(!Ba|(b|0)==19){Sp(53588,6357);a=19;if((Ba|0)==1){break a}}if(!Ba|(b|0)==20){Sp(53600,3844);a=20;if((Ba|0)==1){break a}}if(!Ba|(b|0)==21){Sp(53612,2383);a=21;if((Ba|0)==1){break a}}if(!Ba|(b|0)==22){Sp(53624,1313);a=22;if((Ba|0)==1){break a}}if(!Ba|(b|0)==23){Sp(53636,9646);a=23;if((Ba|0)==1){break a}}if(!Ba){v[52840]=1;x[13209]=53360;return 53360}p()}x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function Vb(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=E(0),o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=E(0),y=E(0),z=0;r=Ba;j=x[b+80>>2];s=x[b+84>>2]-j>>2;d=x[b+92>>2];g=x[a+64>>2];c=(s-d|0)/(g|0)|0;t=x[b+56>>2];o=x[b+44>>2];q=t+(o<<4)|0;e=x[q+4>>2];c=(c|0)<(e|0)?c:e;a:{if(x[a+40>>2]==1){a=x[q+8>>2];b:{c:{if((g|0)!=1){if((c|0)<=0){break a}d=((d<<2)+j|0)+(x[b+48>>2]<<2)|0;k=c&1;e=x[b+68>>2]+(a<<2)|0;if((c|0)!=1){break c}a=0;break b}if((c|0)<=0){break a}d=(d<<2)+j|0;e=x[b+68>>2]+(a<<2)|0;k=c&3;d:{if(c>>>0<4){a=0;break d}l=c&-4;a=0;while(1){c=a<<2;f=c|12;w=E(B[f+e>>2]*B[d+f>>2]);f=c|8;y=E(B[f+e>>2]*B[d+f>>2]);f=c|4;n=E(w+E(y+E(E(B[f+e>>2]*B[d+f>>2])+E(E(B[c+e>>2]*B[c+d>>2])+n))));a=a+4|0;u=u+4|0;if((l|0)!=(u|0)){continue}break}}if(k){while(1){c=a<<2;n=E(E(B[c+e>>2]*B[c+d>>2])+n);a=a+1|0;h=h+1|0;if((k|0)!=(h|0)){continue}break}}i=+n;break a}h=c&-2;a=0;c=0;while(1){l=a|1;i=i+ +E(B[e+(a<<2)>>2]*B[d+(D(a,g)<<2)>>2])+ +E(B[e+(l<<2)>>2]*B[d+(D(g,l)<<2)>>2]);a=a+2|0;c=c+2|0;if((h|0)!=(c|0)){continue}break}}if(!k){break a}i=i+ +E(B[e+(a<<2)>>2]*B[d+(D(a,g)<<2)>>2]);break a}if((c|0)<=0){break a}z=+(x[a+304>>2]-1|0)/+(x[b+52>>2]-1|0);k=((d<<2)+j|0)+(x[b+48>>2]<<2)|0;h=x[a+292>>2];d=h+8|0;l=x[b+8>>2];a=0;while(1){m=z*+(D(a,l)+o|0);v=J(m);e:{if(F(v)<2147483648){e=~~v;break e}e=-2147483648}f=e<<3;m=m-+(e|0);i=(C[f+d>>3]*m+C[f+h>>3]*(1-m))*+B[k+(D(a,g)<<2)>>2]+i;a=a+1|0;if((c|0)!=(a|0)){continue}break}}a=(x[b+48>>2]+1|0)%(g|0)|0;x[b+48>>2]=a;if(!a){a=x[((o<<4)+t|0)+12>>2];if((a|0)>0){a=D(a,g);d=a<<2;mf(j,d+j|0,s-a<<2);if((Ba|0)!=(r|0)){p()}if((a|0)>0){nf(x[b+84>>2]-d|0,0,d);if((Ba|0)!=(r|0)){p()}}x[b+100>>2]=x[b+100>>2]-a}x[b+44>>2]=x[q>>2]}return i*C[b+32>>3]}function xc(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-56;f=x[Ca>>2];a=x[f>>2];c=x[f+8>>2];d=x[f+12>>2];e=x[f+16>>2];g=x[f+20>>2];h=x[f+24>>2];j=x[f+28>>2];i=x[f+32>>2];k=x[f+36>>2];l=x[f+40>>2];m=x[f+44>>2];n=x[f+48>>2];o=x[f+52>>2];b=x[f+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;q=x[x[Ca>>2]>>2]}if(!Ba){h=ya-32|0;ya=h;g=A[a+4>>2]<=b>>>0}a:{b:{c:{d:{e:{if(!Ba){if(g){break e}m=x[x[a+224>>2]+(b<<2)>>2];i=x[m+76>>2];g=x[a+240>>2];f=x[a+236>>2];j=g-f>>2;b=i>>>0>>0;if(!b){if((f|0)==(g|0)){break e}i=j-1|0;x[m+76>>2]=i}l=x[f+(i<<2)>>2];g=l;i=i+1|0;k=i>>>0>>0;if(k){g=x[f+(i<<2)>>2]}if((l|0)<0){v[e|0]=1;l=0-l|0}f=g;g=g>>31;i=(f^g)-g|0;g=x[a+28>>2];j=(i|0)<(g|0)}f:{if(!Ba){if(x[a+136>>2]<=0|j){break f}x[h+28>>2]=6758;C[h+16>>3]=i|0;C[h+8>>3]=g>>>0;g=x[a+128>>2];if(!g){break b}k=h+16|0;n=h+8|0;o=x[x[g>>2]+24>>2];j=h+28|0}if(!Ba|!q){Ea[o|0](g,j,k,n);f=0;if((Ba|0)==1){break a}}if(!Ba){if(x[a+136>>2]<=0){break f}g=x[a+236>>2];f=x[a+240>>2];j=x[m+76>>2];x[h+28>>2]=5854;C[h+16>>3]=j>>>0;C[h+8>>3]=f-g>>2>>>0;a=x[a+128>>2];if(!a){break b}j=h+16|0;k=h+8|0;n=x[x[a>>2]+24>>2];g=h+28|0}if(!Ba|(q|0)==1){Ea[n|0](a,g,j,k);f=1;if((Ba|0)==1){break a}}}if(!Ba){x[c>>2]=l;x[d>>2]=i;if(x[m+76>>2]){break c}a=1;break d}}if(!Ba){a=x[a+36>>2];x[c>>2]=a;x[d>>2]=a;b=0;a=0}}if(!Ba){v[e|0]=a}}if(!Ba){ya=h+32|0;return b}}if(!Ba){ac();p()}p()}x[x[Ca>>2]>>2]=f;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[f+24>>2]=h;x[f+28>>2]=j;x[f+32>>2]=i;x[f+36>>2]=k;x[f+40>>2]=l;x[f+44>>2]=m;x[f+48>>2]=n;x[f+52>>2]=o;x[Ca>>2]=x[Ca>>2]+56;return 0}function Bc(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+12>>2];f=x[b+16>>2];h=x[b+20>>2];g=x[b+24>>2];k=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){k=ya-16|0;ya=k;h=x[a+12>>2];e=x[a+8>>2];a:{if((h|0)<(e|0)){g=e-h|0;break a}f=(e|0)>=(h|0);g=0;if(f){break a}g=x[a+16>>2]+(e-h|0)|0}e=(g|0)>=(c|0)}b:{c:{if(!Ba){if(e){g=c;break c}e=k+12|0}if(!Ba|!i){d=Ib(51780,12100,27);if((Ba|0)==1){break b}f=d}if(!Ba|(i|0)==1){d=Nh(f,c);j=1;if((Ba|0)==1){break b}c=d}if(!Ba|(i|0)==2){d=Ib(c,11032,17);j=2;if((Ba|0)==1){break b}c=d}if(!Ba|(i|0)==3){d=Nh(c,g);j=3;if((Ba|0)==1){break b}c=d}if(!Ba|(i|0)==4){d=Ib(c,7878,10);j=4;if((Ba|0)==1){break b}c=d}if(!Ba){f=x[x[c>>2]-12>>2]+c|0;vj(e,f);e=k+12|0}if(!Ba|(i|0)==5){d=il(e,52748);j=5;if((Ba|0)==1){break b}e=d}f=Ba?f:x[x[e>>2]+28>>2];if(!Ba|(i|0)==6){d=Ea[f|0](e,10)|0;j=6;if((Ba|0)==1){break b}e=d}f=Ba?f:k+12|0;if(!Ba|(i|0)==7){Po(f);j=7;if((Ba|0)==1){break b}}if(!Ba|(i|0)==8){Th(c,e);j=8;if((Ba|0)==1){break b}}if(!Ba|(i|0)==9){rh(c);j=9;if((Ba|0)==1){break b}}}if(!Ba){if(g){d=x[a+4>>2];e=d+(h<<2)|0;f=x[a+16>>2];c=f-h|0;d:{if((c|0)>=(g|0)){if((g|0)<=0){break d}lf(b,e,g<<2);break d}if((c|0)>0){lf(b,e,c<<2)}e=g-c|0;if((e|0)<=0){break d}lf((c<<2)+b|0,d,e<<2)}h=h+g|0;while(1){b=h;h=b-f|0;if((b|0)>=(f|0)){continue}break}x[a+12>>2]=b}ya=k+16|0;return g}p()}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=e;x[d+16>>2]=f;x[d+20>>2]=h;x[d+24>>2]=g;x[d+28>>2]=k;x[Ca>>2]=x[Ca>>2]+32;return 0}function oc(a){var b=E(0),c=0,d=0,e=0,f=0,g=0,h=0,i=E(0),j=0,k=0,l=0,m=0,n=E(0),o=0,q=0;j=Ba;f=x[a+12>>2];if(!f){f=Mb(x[a+4>>2]);if((Ba|0)!=(j|0)){p()}x[a+12>>2]=f}o=x[a+8>>2];g=x[a+4>>2];h=(g|0)/2|0;c=(h<<2)+f|0;x[c>>2]=1065353216;a:{if((g|0)<4){break a}d=1;e=((h|0)<=2?2:h)-1|0;k=e&1;b=E(o|0);if((g|0)>=6){l=e&-2;e=0;while(1){m=c+(d<<2)|0;i=E(E(E(d|0)*E(6.2831854820251465))/b);n=eg(i);if((Ba|0)!=(j|0)){p()}B[m>>2]=n/i;m=d+1|0;q=c+(m<<2)|0;i=E(E(E(m|0)*E(6.2831854820251465))/b);n=eg(i);if((Ba|0)!=(j|0)){p()}B[q>>2]=n/i;d=d+2|0;e=e+2|0;if((l|0)!=(e|0)){continue}break}}if(!k){break a}c=c+(d<<2)|0;b=E(E(E(d|0)*E(6.2831854820251465))/b);i=eg(b);if((Ba|0)!=(j|0)){p()}B[c>>2]=i/b}d=h+1|0;b:{if((g|0)<=(d|0)){break b}k=(g-h|0)-2|0;l=(h^-1)+g&3;c:{if(!l){c=h;break c}e=0;c=h;while(1){c=c-1|0;B[(c<<2)+f>>2]=B[(d<<2)+f>>2];d=d+1|0;e=e+1|0;if((l|0)!=(e|0)){continue}break}}if(k>>>0<3){break b}while(1){k=(c<<2)+f|0;e=(d<<2)+f|0;B[k-4>>2]=B[e>>2];B[k-8>>2]=B[e+4>>2];B[k-12>>2]=B[e+8>>2];c=c-4|0;B[(c<<2)+f>>2]=B[e+12>>2];d=d+4|0;if((g|0)!=(d|0)){continue}break}}b=E(E(E(h|0)*E(6.2831854820251465))/E(o|0));i=eg(b);if((Ba|0)!=(j|0)){p()}B[f>>2]=i/b;d=0;x[a+16>>2]=0;d:{if((g|0)<=0){b=E(0);break d}h=g&3;e:{if(g>>>0<4){b=E(0);break e}j=g&-4;b=E(0);e=0;while(1){c=d<<2;b=E(B[c+f>>2]+b);B[a+16>>2]=b;b=E(B[(c|4)+f>>2]+b);B[a+16>>2]=b;b=E(B[(c|8)+f>>2]+b);B[a+16>>2]=b;b=E(B[(c|12)+f>>2]+b);B[a+16>>2]=b;d=d+4|0;e=e+4|0;if((j|0)!=(e|0)){continue}break}}if(!h){break d}c=0;while(1){b=E(B[(d<<2)+f>>2]+b);B[a+16>>2]=b;d=d+1|0;c=c+1|0;if((h|0)!=(c|0)){continue}break}}B[a+16>>2]=b/E(g|0)}function Ll(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-72;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];j=x[b+16>>2];g=x[b+20>>2];h=x[b+24>>2];i=x[b+28>>2];f=x[b+32>>2];l=x[b+36>>2];m=x[b+40>>2];k=x[b+44>>2];n=x[b+48>>2];o=x[b+52>>2];p=x[b+56>>2];q=x[b+60>>2];r=x[b+64>>2];s=x[b+68>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}if(!Ba){h=ya-32|0;ya=h;l=(b|0)!=(c|0)}a:{b:{c:{d:{if((Ba|0)==2|l){if(!Ba){o=x[12163];x[12163]=0;i=ya-16|0;ya=i;Ol();f=ya-16|0;ya=f;m=ya-16|0;ya=m;l=h+28|0}if(!Ba|!e){Xk(m,b,l,2);if((Ba|0)==1){break a}}if(!Ba){b=m;g=x[b>>2];j=x[b+4>>2];k=x[b+12>>2];x[f+8>>2]=x[b+8>>2];x[f+12>>2]=k;x[f>>2]=g;x[f+4>>2]=j;ya=b+16|0;j=x[f>>2];k=x[f+4>>2];b=x[f+12>>2];x[i+8>>2]=x[f+8>>2];x[i+12>>2]=b;x[i>>2]=j;x[i+4>>2]=k;ya=f+16|0;j=x[i>>2];k=x[i+4>>2];b=x[i+12>>2];g=h+8|0;x[g+8>>2]=x[i+8>>2];x[g+12>>2]=b;x[g>>2]=j;x[g+4>>2]=k;ya=i+16|0;j=x[h+16>>2];g=x[h+20>>2];k=x[h+8>>2];b=x[h+12>>2];n=b;f=x[12163];if(!f){break d}if(x[h+28>>2]!=(c|0)){break c}p=k;q=b;r=j;s=g;if((f|0)!=68){break b}break c}}if(!Ba){x[d>>2]=4;break b}}if(!Ba){x[12163]=o;if(x[h+28>>2]==(c|0)){break b}}}if(!Ba){x[d>>2]=4;n=q;j=r;g=s;k=p}}if(!Ba){x[a>>2]=k;x[a+4>>2]=n;x[a+8>>2]=j;x[a+12>>2]=g;ya=h+32|0}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=j;x[e+20>>2]=g;x[e+24>>2]=h;x[e+28>>2]=i;x[e+32>>2]=f;x[e+36>>2]=l;x[e+40>>2]=m;x[e+44>>2]=k;x[e+48>>2]=n;x[e+52>>2]=o;x[e+56>>2]=p;x[e+60>>2]=q;x[e+64>>2]=r;x[e+68>>2]=s;x[Ca>>2]=x[Ca>>2]+72}function wc(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];c=x[e+8>>2];d=x[e+12>>2];f=x[e+16>>2];g=x[e+20>>2];e=x[e+24>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){f=ya-32|0;ya=f;e=x[x[a+224>>2]+(b<<2)>>2];g=x[e>>2];b=x[g+8>>2];c=x[g+12>>2];a:{if((b|0)>(c|0)){d=b-c|0;break a}d=0;if((b|0)>=(c|0)){break a}d=x[g+16>>2]+(b-c|0)|0}c=d>>>0>=A[a+28>>2];b=1}b:{c:{d:{if(!Ba){if(v[e+100|0]&1|c){break d}c=(x[e+88>>2]&x[e+92>>2])==-1}if((Ba|0)==2|c){if(!Ba){b=x[g+8>>2];d=x[g+12>>2];e:{if((b|0)>(d|0)){c=b-d|0;break e}c=0;if((b|0)>=(d|0)){break e}c=x[g+16>>2]+(b-d|0)|0}b=0;if(x[a+136>>2]<2){break d}d=x[a+28>>2];x[f+20>>2]=5095;C[f+24>>3]=c|0;C[f+8>>3]=d>>>0;a=x[a+128>>2];if(!a){break c}g=f+8|0;e=x[x[a>>2]+24>>2];c=f+24|0;d=f+20|0}if(!Ba|!h){Ea[e|0](a,d,c,g);if((Ba|0)==1){break b}}if(!Ba){break d}}c=Ba?c:!d;if(c|(Ba|0)==2){if(!Ba){b=0;if(x[a+136>>2]<2){break d}x[f+24>>2]=3528;a=x[a+80>>2];if(!a){break c}c=x[x[a>>2]+24>>2];d=f+24|0}if(!Ba|(h|0)==1){Ea[c|0](a,d);i=1;if((Ba|0)==1){break b}}if(!Ba){break d}}if(!Ba){if(x[a+28>>2]>>>1>>>0<=d>>>0){break d}c=x[a+136>>2]>=2}if((Ba|0)==2|c){if(!Ba){x[f+8>>2]=8563;C[f+24>>3]=d>>>0;a=x[a+104>>2];if(!a){break c}g=x[x[a>>2]+24>>2];c=f+24|0;d=f+8|0}if(!Ba|(h|0)==2){Ea[g|0](a,d,c);i=2;if((Ba|0)==1){break b}}}if(!Ba){v[e+100|0]=1}}if(!Ba){ya=f+32|0;return b}}if(!Ba){ac();p()}p()}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=f;x[h+20>>2]=g;x[h+24>>2]=e;x[Ca>>2]=x[Ca>>2]+28;return 0}function pp(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,w=0;m=Ba;n=ya-16|0;ya=n;i=c;while(1){a:{if((d|0)==(i|0)){i=d;break a}if(!x[i>>2]){break a}i=i+4|0;continue}break}x[h>>2]=f;x[e>>2]=c;b:{while(1){c:{d:{if(!((c|0)==(d|0)|(f|0)==(g|0))){j=x[b+4>>2];x[n+8>>2]=x[b>>2];x[n+12>>2]=j;u=1;o=ya-16|0;ya=o;x[o+12>>2]=x[a+8>>2];j=Rl(o+8|0,o+12|0);if((Ba|0)!=(m|0)){p()}w=j;j=f;k=g-f|0;q=0;s=ya-16|0;ya=s;l=x[e>>2];t=i-c>>2;e:{if(!l|!t){break e}r=f?k:0;while(1){k=vg(r>>>0<4?s+12|0:j,x[l>>2]);if((Ba|0)!=(m|0)){p()}if((k|0)==-1){q=-1;break e}if(j){if(r>>>0<=3){if(k>>>0>r>>>0){break e}lf(j,s+12|0,k);if((Ba|0)!=(m|0)){p()}}r=r-k|0;j=j+k|0}else{j=0}if(!x[l>>2]){l=0;break e}q=k+q|0;l=l+4|0;t=t-1|0;if(t){continue}break}}if(j){x[e>>2]=l}ya=s+16|0;Sl(w);if((Ba|0)!=(m|0)){p()}ya=o+16|0;f:{g:{h:{switch(q+1|0){case 0:x[h>>2]=f;while(1){if(x[e>>2]==(c|0)){break g}b=qp(f,x[c>>2],x[a+8>>2]);if((Ba|0)!=(m|0)){p()}if((b|0)==-1){break g}f=b+x[h>>2]|0;x[h>>2]=f;c=c+4|0;continue};case 1:break b;default:break h}}f=q+x[h>>2]|0;x[h>>2]=f;if((f|0)==(g|0)){break f}if((d|0)==(i|0)){c=x[e>>2];i=d;continue}i=qp(n+4|0,0,x[a+8>>2]);if((Ba|0)!=(m|0)){p()}if((i|0)==-1){break c}c=n+4|0;if(g-x[h>>2]>>>0>>0){break b}while(1){if(i){f=y[c|0];j=x[h>>2];x[h>>2]=j+1;v[j|0]=f;i=i-1|0;c=c+1|0;continue}break}c=x[e>>2]+4|0;x[e>>2]=c;i=c;while(1){if((d|0)==(i|0)){i=d;break d}if(!x[i>>2]){break d}i=i+4|0;continue}}x[e>>2]=c;break c}c=x[e>>2]}u=(c|0)!=(d|0);break b}f=x[h>>2];continue}break}u=2}ya=n+16|0;return u|0}function sr(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];c=x[e+8>>2];d=x[e+12>>2];g=x[e+16>>2];e=x[e+20>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}if(!Ba){c=ya-112|0;ya=c;d=x[a>>2];g=x[d-4>>2];d=x[d-8>>2];x[c+80>>2]=0;x[c+84>>2]=0;x[c+88>>2]=0;x[c+92>>2]=0;x[c+96>>2]=0;x[c+100>>2]=0;v[c+103|0]=0;v[c+104|0]=0;v[c+105|0]=0;v[c+106|0]=0;v[c+107|0]=0;v[c+108|0]=0;v[c+109|0]=0;v[c+110|0]=0;x[c+72>>2]=0;x[c+76>>2]=0;x[c+68>>2]=0;x[c+64>>2]=46164;x[c+60>>2]=a;x[c+56>>2]=b;h=qr(g,b,0);e=a+d|0}a:{b:{if(!Ba){if(h){a=d?0:e;break b}d=(a|0)>=(e|0)}if((Ba|0)==2|d){if(!Ba){v[c+47|0]=0;v[c+48|0]=0;v[c+49|0]=0;v[c+50|0]=0;v[c+51|0]=0;v[c+52|0]=0;v[c+53|0]=0;v[c+54|0]=0;d=c+24|0;x[d>>2]=0;x[d+4>>2]=0;x[c+32>>2]=0;x[c+36>>2]=0;x[c+40>>2]=0;x[c+44>>2]=0;x[c+16>>2]=0;x[c+20>>2]=0;x[c+12>>2]=0;x[c+8>>2]=b;x[c+4>>2]=a;x[c>>2]=g;x[c+48>>2]=1;b=x[x[g>>2]+20>>2]}if(!Ba|!f){Ea[b|0](g,c,e,e,1,0);h=0;if((Ba|0)==1){break a}}if(!Ba){b=x[d>>2];if(b){break b}}}if(!Ba){b=c+56|0;d=x[x[g>>2]+24>>2];a=0}if(!Ba|(f|0)==1){Ea[d|0](g,b,e,1,0);h=1;if((Ba|0)==1){break a}}if(!Ba){c:{switch(x[c+92>>2]){case 0:a=x[c+96>>2]==1?x[c+84>>2]==1?x[c+88>>2]==1?x[c+76>>2]:0:0:0;break b;case 1:break c;default:break b}}if(x[c+80>>2]!=1){if(x[c+96>>2]|x[c+84>>2]!=1|x[c+88>>2]!=1){break b}}a=x[c+72>>2]}}if(!Ba){ya=c+112|0;return a}p()}x[x[Ca>>2]>>2]=h;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=g;x[f+20>>2]=e;x[Ca>>2]=x[Ca>>2]+24;return 0}function mk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;b=x[Ca>>2];a=x[b>>2];d=x[b+8>>2];e=x[b+12>>2];f=x[b+16>>2];g=x[b+20>>2];h=x[b+24>>2];l=x[b+28>>2];j=x[b+32>>2];m=x[b+36>>2];n=x[b+40>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){d=ya-32|0;ya=d;e=Bh(b,-1)}a:{b:{c:{d:{if(!Ba){if(e){break d}e=b;x[d+20>>2]=b;f=y[a+44|0]}if((Ba|0)==2|f){if(!Ba){a=x[a+32>>2];f=x[a+76>>2]<0}e:{if((Ba|0)==2|f){if(!Ba|!i){c=Gj(e,a);if((Ba|0)==1){break a}a=c}if(!Ba){break e}}if(!Ba|(i|0)==1){c=Gj(e,a);k=1;if((Ba|0)==1){break a}a=c}}if(!Ba){a=(a|0)==-1;if(a){break c}break d}}if(!Ba){j=d+24|0;e=j;x[d+16>>2]=e;l=d+32|0;f=d+20|0}while(1){if(!Ba){g=x[a+40>>2];h=d+12|0;m=d+24|0;n=d+16|0;e=x[a+36>>2]}if(!Ba|(i|0)==2){c=Ki(e,g,f,j,h,m,l,n);k=2;if((Ba|0)==1){break a}e=c}if(!Ba){if(x[d+12>>2]==(f|0)){break c}g=(e|0)==3}if((Ba|0)==2|g){a=Ba?a:x[a+32>>2];if(!Ba|(i|0)==3){c=Tf(f,1,1,a);k=3;if((Ba|0)==1){break a}a=c}if(!Ba){a=(a|0)==1;if(a){break d}break c}}if(!Ba){if(e>>>0>1){break c}h=x[a+32>>2];g=d+24|0;f=x[d+16>>2]-g|0}if(!Ba|(i|0)==4){c=Tf(g,1,f,h);k=4;if((Ba|0)==1){break a}g=c}if(!Ba){if((f|0)!=(g|0)){break c}f=x[d+12>>2];e=(e|0)==1;if(e){continue}}break}}if(!Ba){a=zi(b);break b}}a=Ba?a:-1}if(!Ba){ya=d+32|0;return a|0}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=e;x[c+16>>2]=f;x[c+20>>2]=g;x[c+24>>2]=h;x[c+28>>2]=l;x[c+32>>2]=j;x[c+36>>2]=m;x[c+40>>2]=n;x[Ca>>2]=x[Ca>>2]+44;return 0}function Kd(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;f=x[a+4>>2];a:{if((f|0)<=0){break a}l=f&1;d=x[a+16>>2];h=x[d+4>>2];o=x[d>>2];if((f|0)!=1){m=f&-2;while(1){j=g<<3;d=(g<<4)+b|0;C[j+o>>3]=C[d>>3];C[h+j>>3]=C[d+8>>3];d=g|1;j=d<<3;d=(d<<4)+b|0;C[j+o>>3]=C[d>>3];C[h+j>>3]=C[d+8>>3];g=g+2|0;e=e+2|0;if((m|0)!=(e|0)){continue}break}}if(!l){break a}d=g<<3;e=(g<<4)+b|0;C[d+o>>3]=C[e>>3];C[d+h>>3]=C[e+8>>3]}i=x[a>>2];b:{if((i|0)<=(f|0)){break b}e=f+1|0;d=x[a+16>>2];l=x[d+4>>2];m=x[d>>2];j=i-f|0;if(j&1){d=f<<3;f=(j<<4)+b|0;C[d+m>>3]=C[f>>3];C[d+l>>3]=-C[f+8>>3];f=e}if((e|0)==(i|0)){break b}while(1){d=f<<3;e=(i-f<<4)+b|0;C[d+m>>3]=C[e>>3];C[d+l>>3]=-C[e+8>>3];e=f+1|0;d=e<<3;e=(i-e<<4)+b|0;C[d+m>>3]=C[e>>3];C[d+l>>3]=-C[e+8>>3];f=f+2|0;if((i|0)!=(f|0)){continue}break}}if((i|0)>0){o=i&-2;l=i&1;m=i&-4;s=i&3;j=x[a+8>>2];d=x[a+12>>2];a=x[a+16>>2];r=x[a+4>>2];p=x[a>>2];a=0;f=i>>>0<4;while(1){e=a<<2;q=x[e+d>>2];k=0;g=0;n=0;if(!f){while(1){h=g<<3;b=h|24;t=C[b+p>>3]*C[b+q>>3];b=h|16;u=C[b+p>>3]*C[b+q>>3];b=h|8;k=t+(u+(C[b+p>>3]*C[b+q>>3]+(C[h+p>>3]*C[h+q>>3]+k)));g=g+4|0;n=n+4|0;if((m|0)!=(n|0)){continue}break}}e=e+j|0;h=0;if(s){while(1){b=g<<3;k=C[b+p>>3]*C[b+q>>3]+k;g=g+1|0;h=h+1|0;if((s|0)!=(h|0)){continue}break}}h=x[e>>2];g=0;n=0;if((i|0)!=1){while(1){e=g<<3;b=e|8;k=k-C[e+r>>3]*C[e+h>>3]-C[b+r>>3]*C[b+h>>3];g=g+2|0;n=n+2|0;if((o|0)!=(n|0)){continue}break}}e=(a<<3)+c|0;if(l){b=g<<3;k=k-C[b+r>>3]*C[b+h>>3]}C[e>>3]=k;a=a+1|0;if((i|0)!=(a|0)){continue}break}}}function tc(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+12>>2];f=x[b+16>>2];j=x[b+20>>2];g=x[b+24>>2];k=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){k=ya-16|0;ya=k;j=x[a+12>>2];e=x[a+8>>2];a:{if((j|0)<(e|0)){g=e-j|0;break a}f=(e|0)>=(j|0);g=0;if(f){break a}g=x[a+16>>2]+(e-j|0)|0}e=(g|0)>=(c|0)}b:{c:{if(!Ba){if(e){g=c;break c}e=k+12|0}if(!Ba|!h){d=Ib(51780,12018,27);if((Ba|0)==1){break b}f=d}if(!Ba|(h|0)==1){d=Nh(f,c);i=1;if((Ba|0)==1){break b}c=d}if(!Ba|(h|0)==2){d=Ib(c,11032,17);i=2;if((Ba|0)==1){break b}c=d}if(!Ba|(h|0)==3){d=Nh(c,g);i=3;if((Ba|0)==1){break b}c=d}if(!Ba|(h|0)==4){d=Ib(c,7878,10);i=4;if((Ba|0)==1){break b}c=d}if(!Ba){f=x[x[c>>2]-12>>2]+c|0;vj(e,f);e=k+12|0}if(!Ba|(h|0)==5){d=il(e,52748);i=5;if((Ba|0)==1){break b}e=d}f=Ba?f:x[x[e>>2]+28>>2];if(!Ba|(h|0)==6){d=Ea[f|0](e,10)|0;i=6;if((Ba|0)==1){break b}e=d}f=Ba?f:k+12|0;if(!Ba|(h|0)==7){Po(f);i=7;if((Ba|0)==1){break b}}if(!Ba|(h|0)==8){Th(c,e);i=8;if((Ba|0)==1){break b}}if(!Ba|(h|0)==9){rh(c);i=9;if((Ba|0)==1){break b}}}if(!Ba){d:{if(!g){break d}e=x[a+4>>2];c=e+(j<<2)|0;a=x[a+16>>2]-j|0;if((a|0)>=(g|0)){if((g|0)<=0){break d}lf(b,c,g<<2);break d}if((a|0)>0){lf(b,c,a<<2)}c=g-a|0;if((c|0)<=0){break d}lf((a<<2)+b|0,e,c<<2)}ya=k+16|0}return}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=e;x[d+16>>2]=f;x[d+20>>2]=j;x[d+24>>2]=g;x[d+28>>2]=k;x[Ca>>2]=x[Ca>>2]+32}function Xj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+12>>2];f=x[b+16>>2];h=x[b+20>>2];i=x[b+24>>2];j=x[b+28>>2];k=x[b+32>>2];l=x[b+36>>2];g=x[b+40>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;m=x[x[Ca>>2]>>2]}if(!Ba){e=ya-32|0;ya=e;c=Bh(b,-1)}a:{b:{if(!Ba){if(c){if(y[a+52|0]){break b}b=x[a+48>>2];o=a,q=Bh(b,-1)^1,v[o+52|0]=q;break b}f=!y[a+53|0];c=y[a+52|0]}c:{d:{e:{if(!Ba){if(f){break e}f=!(c&255);if(f){break e}f=x[a+32>>2];c=x[a+48>>2]}if(!Ba|!m){d=Yj(c,f);if((Ba|0)==1){break a}c=d}if(!Ba){if(c){break d}break c}}if(!Ba){if(!(c&255)){break d}v[e+19|0]=x[a+48>>2]<<24>>24;f=x[a+40>>2];h=e+19|0;g=e+20|0;i=g;j=e+12|0;k=e+24|0;l=e+32|0;c=x[a+36>>2]}if(!Ba|(m|0)==1){d=Ki(c,f,h,i,j,k,l,g);n=1;if((Ba|0)==1){break a}c=d}if(!Ba){f:{g:{c=c-1|0;switch(c|0){case 2:break g;case 0:case 1:break c;default:break f}}c=x[a+48>>2];f=e+25|0;x[e+20>>2]=f;v[e+24|0]=c}}while(1){if(!Ba){c=x[e+20>>2];if(c>>>0<=e+24>>>0){break d}c=c-1|0;x[e+20>>2]=c;f=x[a+32>>2];c=v[c|0]}if(!Ba|(m|0)==2){d=Aj(c,f);n=2;if((Ba|0)==1){break a}c=d}if(!Ba){c=(c|0)!=-1;if(c){continue}}break}if(!Ba){break c}}if(!Ba){v[a+52|0]=1;x[a+48>>2]=b;break b}}b=Ba?b:-1}if(!Ba){ya=e+32|0;return b|0}p()}x[x[Ca>>2]>>2]=n;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=e;x[d+16>>2]=f;x[d+20>>2]=h;x[d+24>>2]=i;x[d+28>>2]=j;x[d+32>>2]=k;x[d+36>>2]=l;x[d+40>>2]=g;x[Ca>>2]=x[Ca>>2]+44;return 0}function ik(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+12>>2];f=x[b+16>>2];h=x[b+20>>2];i=x[b+24>>2];j=x[b+28>>2];k=x[b+32>>2];l=x[b+36>>2];g=x[b+40>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;m=x[x[Ca>>2]>>2]}if(!Ba){e=ya-32|0;ya=e;c=Bh(b,-1)}a:{b:{if(!Ba){if(c){if(y[a+52|0]){break b}b=x[a+48>>2];o=a,q=Bh(b,-1)^1,v[o+52|0]=q;break b}f=!y[a+53|0];c=y[a+52|0]}c:{d:{e:{if(!Ba){if(f){break e}f=!(c&255);if(f){break e}f=x[a+32>>2];c=x[a+48>>2]}if(!Ba|!m){d=jk(c,f);if((Ba|0)==1){break a}c=d}if(!Ba){if(c){break d}break c}}if(!Ba){if(!(c&255)){break d}x[e+16>>2]=x[a+48>>2];f=x[a+40>>2];h=e+16|0;g=e+20|0;i=g;j=e+12|0;k=e+24|0;l=e+32|0;c=x[a+36>>2]}if(!Ba|(m|0)==1){d=Ki(c,f,h,i,j,k,l,g);n=1;if((Ba|0)==1){break a}c=d}if(!Ba){f:{g:{c=c-1|0;switch(c|0){case 2:break g;case 0:case 1:break c;default:break f}}c=x[a+48>>2];f=e+25|0;x[e+20>>2]=f;v[e+24|0]=c}}while(1){if(!Ba){c=x[e+20>>2];if(c>>>0<=e+24>>>0){break d}c=c-1|0;x[e+20>>2]=c;f=x[a+32>>2];c=v[c|0]}if(!Ba|(m|0)==2){d=Aj(c,f);n=2;if((Ba|0)==1){break a}c=d}if(!Ba){c=(c|0)!=-1;if(c){continue}}break}if(!Ba){break c}}if(!Ba){v[a+52|0]=1;x[a+48>>2]=b;break b}}b=Ba?b:-1}if(!Ba){ya=e+32|0;return b|0}p()}x[x[Ca>>2]>>2]=n;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=e;x[d+16>>2]=f;x[d+20>>2]=h;x[d+24>>2]=i;x[d+28>>2]=j;x[d+32>>2]=k;x[d+36>>2]=l;x[d+40>>2]=g;x[Ca>>2]=x[Ca>>2]+44;return 0}function jc(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+12>>2];f=x[b+16>>2];h=x[b+20>>2];i=x[b+24>>2];k=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){k=ya-16|0;ya=k;i=x[a+8>>2];e=x[a+12>>2]+(i^-1)|0;f=x[a+16>>2];d=e+f|0;f=(d|0)<(f|0)?d:e;e=(f|0)>=(c|0)}a:{b:{if(!Ba){if(e){f=c;break b}h=k+12|0}if(!Ba|!g){d=Ib(51780,12058,28);if((Ba|0)==1){break a}e=d}if(!Ba|(g|0)==1){d=Nh(e,c);j=1;if((Ba|0)==1){break a}c=d}if(!Ba|(g|0)==2){d=Ib(c,11118,26);j=2;if((Ba|0)==1){break a}c=d}if(!Ba|(g|0)==3){d=Nh(c,f);j=3;if((Ba|0)==1){break a}c=d}if(!Ba){vj(h,x[x[c>>2]-12>>2]+c|0);e=k+12|0}if(!Ba|(g|0)==4){d=il(e,52748);j=4;if((Ba|0)==1){break a}e=d}h=Ba?h:x[x[e>>2]+28>>2];if(!Ba|(g|0)==5){d=Ea[h|0](e,10)|0;j=5;if((Ba|0)==1){break a}e=d}h=Ba?h:k+12|0;if(!Ba|(g|0)==6){Po(h);j=6;if((Ba|0)==1){break a}}if(!Ba|(g|0)==7){Th(c,e);j=7;if((Ba|0)==1){break a}}if(!Ba|(g|0)==8){rh(c);j=8;if((Ba|0)==1){break a}}}if(!Ba){if(f){g=x[a+4>>2];e=g+(i<<2)|0;d=x[a+16>>2];c=d-i|0;c:{if((c|0)>=(f|0)){if((f|0)<=0){break c}lf(e,b,f<<2);break c}if((c|0)>0){lf(e,b,c<<2)}e=f-c|0;if((e|0)<=0){break c}lf(g,(c<<2)+b|0,e<<2)}i=f+i|0;while(1){b=i;i=b-d|0;if((b|0)>=(d|0)){continue}break}x[a+8>>2]=b}ya=k+16|0;return f}p()}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=e;x[d+16>>2]=f;x[d+20>>2]=h;x[d+24>>2]=i;x[d+28>>2]=k;x[Ca>>2]=x[Ca>>2]+32;return 0}function ck(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;b=x[Ca>>2];a=x[b>>2];d=x[b+8>>2];e=x[b+12>>2];f=x[b+16>>2];g=x[b+20>>2];h=x[b+24>>2];j=x[b+28>>2];k=x[b+32>>2];l=x[b+36>>2];m=x[b+40>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){e=ya-32|0;ya=e;d=Bh(b,-1)}a:{b:{c:{d:{if(!Ba){if(d){break d}f=b<<24>>24;v[e+23|0]=f;d=y[a+44|0]}if((Ba|0)==2|d){if(!Ba){d=x[a+32>>2];a=ya-16|0;ya=a;v[a+15|0]=f;f=a+15|0}if(!Ba|!i){c=Tf(f,1,1,d);if((Ba|0)==1){break a}f=c}if(!Ba){ya=a+16|0;a=(f|0)!=1;if(a){break c}break d}}if(!Ba){d=e+24|0;x[e+16>>2]=d;j=e+32|0;k=d;d=e+23|0}while(1){if(!Ba){g=x[a+40>>2];h=e+12|0;l=e+24|0;m=e+16|0;f=x[a+36>>2]}if(!Ba|(i|0)==1){c=Ki(f,g,d,k,h,l,j,m);n=1;if((Ba|0)==1){break a}f=c}if(!Ba){if(x[e+12>>2]==(d|0)){break c}g=(f|0)==3}if((Ba|0)==2|g){a=Ba?a:x[a+32>>2];if(!Ba|(i|0)==2){c=Tf(d,1,1,a);n=2;if((Ba|0)==1){break a}a=c}if(!Ba){a=(a|0)==1;if(a){break d}break c}}if(!Ba){if(f>>>0>1){break c}h=x[a+32>>2];g=e+24|0;d=x[e+16>>2]-g|0}if(!Ba|(i|0)==3){c=Tf(g,1,d,h);n=3;if((Ba|0)==1){break a}g=c}if(!Ba){if((d|0)!=(g|0)){break c}d=x[e+12>>2];f=(f|0)==1;if(f){continue}}break}}if(!Ba){a=zi(b);break b}}a=Ba?a:-1}if(!Ba){ya=e+32|0;return a|0}p()}x[x[Ca>>2]>>2]=n;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=e;x[c+16>>2]=f;x[c+20>>2]=g;x[c+24>>2]=h;x[c+28>>2]=j;x[c+32>>2]=k;x[c+36>>2]=l;x[c+40>>2]=m;x[Ca>>2]=x[Ca>>2]+44;return 0}function Yf(){var a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;b=x[Ca>>2];f=x[b>>2];d=x[b+4>>2];e=x[b+8>>2];b=x[b+12>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;k=x[x[Ca>>2]>>2]}if(!Ba){a=x[12163];m=z[((a>>>0<=153?a:0)<<1)+32976>>1]+31056|0;a=x[x[12204]+20>>2];if(a){f=x[a+4>>2];a=x[a>>2];c=x[a>>2]+1794895138|0;d=Ik(x[a+8>>2],c);e=Ik(x[a+12>>2],c);g=Ik(x[a+16>>2],c);a:{if(f>>>2>>>0<=d>>>0){break a}i=f-(d<<2)|0;if((e|g)&3|(i>>>0<=e>>>0|g>>>0>=i>>>0)){break a}n=g>>>2|0;o=a+(e&-4)|0;e=0;while(1){g=d>>>1|0;i=g+e|0;j=(i<<3)+o|0;h=Ik(x[j>>2],c);j=Ik(x[j+4>>2],c);if(j>>>0>=f>>>0|h>>>0>=f-j>>>0){break a}l=h;h=a+j|0;if(y[l+h|0]){break a}h=Hk(m,h);if(!h){e=(a+(n<<2)|0)+(i<<3)|0;d=Ik(x[e>>2],c);c=Ik(x[e+4>>2],c);if(c>>>0>=f>>>0|d>>>0>=f-c>>>0){break a}b=a+c|0;b=y[b+d|0]?0:b;break a}if((d|0)==1){break a}l=g;d=d-g|0;g=(h|0)<0;d=g?l:d;e=g?e:i;continue}}}else{b=0}f=b?b:m;d=x[11864];e=x[11880];b=y[9312]}b:{if((Ba|0)==2|b){if(!Ba){b=gg(9312)}if(!Ba|!k){a=Tf(9312,b,1,47384);c=0;if((Ba|0)==1){break b}b=a}if(!Ba|(k|0)==1){Vf(58,47384);c=1;if((Ba|0)==1){break b}}if(!Ba|(k|0)==2){Vf(32,47384);c=2;if((Ba|0)==1){break b}}}if(!Ba){b=gg(f)}if(!Ba|(k|0)==3){Tf(f,b,1,47384);c=3;if((Ba|0)==1){break b}}if(!Ba|(k|0)==4){Vf(10,47384);c=4;if((Ba|0)==1){break b}}if(!Ba){x[11880]=e;x[11864]=d}return}x[x[Ca>>2]>>2]=c;x[Ca>>2]=x[Ca>>2]+4;a=x[Ca>>2];x[a>>2]=f;x[a+4>>2]=d;x[a+8>>2]=e;x[a+12>>2]=b;x[Ca>>2]=x[Ca>>2]+16}function Cd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];f=x[b+16>>2];l=x[b+20>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}f=Ba?f:x[x[a>>2]+20>>2];a:{if(!Ba|!e){Ea[f|0](a);if((Ba|0)==1){break a}}if(!Ba){b:{a=x[a+8>>2];n=x[a+4>>2];if((n|0)<=0){break b}e=x[a>>2];q=e&-2;r=e&1;s=e&-4;o=e&3;t=x[a+8>>2];u=x[a+12>>2];while(1){c:{if((e|0)<=0){i=0;g=0;break c}p=l<<2;f=x[p+u>>2];i=0;k=0;a=0;m=0;if(e>>>0>3){while(1){h=a<<3;j=h|24;g=C[j+b>>3]*C[f+j>>3];j=h|16;v=C[j+b>>3]*C[f+j>>3];j=h|8;i=g+(v+(C[j+b>>3]*C[f+j>>3]+(C[b+h>>3]*C[f+h>>3]+i)));a=a+4|0;m=m+4|0;if((s|0)!=(m|0)){continue}break}}if(o){while(1){h=a<<3;i=C[h+b>>3]*C[f+h>>3]+i;a=a+1|0;k=k+1|0;if((o|0)!=(k|0)){continue}break}}f=x[t+p>>2];g=0;a=0;k=0;if((e|0)!=1){while(1){h=a<<3;m=h|8;g=g-C[b+h>>3]*C[f+h>>3]-C[b+m>>3]*C[f+m>>3];a=a+2|0;k=k+2|0;if((q|0)!=(k|0)){continue}break}}if(!r){break c}a=a<<3;g=g-C[a+b>>3]*C[a+f>>3]}a=l<<3;C[a+c>>3]=i;C[a+d>>3]=g;l=l+1|0;if((n|0)!=(l|0)){continue}break}b=0;if((n|0)<=0){break b}while(1){a=b<<3;e=a+c|0;i=C[e>>3];a=a+d|0;g=C[a>>3];C[e>>3]=M(i*i+g*g);w=a,y=$e(g,i),C[w>>3]=y;b=b+1|0;if((n|0)!=(b|0)){continue}break}}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=f;x[e+20>>2]=l;x[Ca>>2]=x[Ca>>2]+24}function pc(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];d=x[b+8>>2];g=x[b+12>>2];e=x[b+16>>2];h=x[b+20>>2];j=x[b+24>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}if(!Ba){j=ya-16|0;ya=j;h=x[a+8>>2];d=x[a+12>>2]+(h^-1)|0;e=x[a+16>>2];c=d+e|0;e=(c|0)<(e|0)?c:d;d=(e|0)>=(b|0)}a:{b:{if(!Ba){if(d){e=b;break b}g=j+12|0}if(!Ba|!f){c=Ib(51780,11964,27);if((Ba|0)==1){break a}d=c}if(!Ba|(f|0)==1){c=Nh(d,b);i=1;if((Ba|0)==1){break a}b=c}if(!Ba|(f|0)==2){c=Ib(b,11118,26);i=2;if((Ba|0)==1){break a}b=c}if(!Ba|(f|0)==3){c=Nh(b,e);i=3;if((Ba|0)==1){break a}b=c}if(!Ba){vj(g,x[x[b>>2]-12>>2]+b|0);d=j+12|0}if(!Ba|(f|0)==4){c=il(d,52748);i=4;if((Ba|0)==1){break a}d=c}g=Ba?g:x[x[d>>2]+28>>2];if(!Ba|(f|0)==5){c=Ea[g|0](d,10)|0;i=5;if((Ba|0)==1){break a}d=c}g=Ba?g:j+12|0;if(!Ba|(f|0)==6){Po(g);i=6;if((Ba|0)==1){break a}}if(!Ba|(f|0)==7){Th(b,d);i=7;if((Ba|0)==1){break a}}if(!Ba|(f|0)==8){rh(b);i=8;if((Ba|0)==1){break a}}}if(!Ba){if(e){b=x[a+4>>2];d=b+(h<<2)|0;f=x[a+16>>2];c=f-h|0;c:{d:{if((c|0)>=(e|0)){b=d;d=e;if((d|0)>0){break d}break c}if((c|0)>0){nf(d,0,c<<2)}d=e-c|0;if((d|0)<=0){break c}}nf(b,0,d<<2)}h=e+h|0;while(1){b=h;h=b-f|0;if((b|0)>=(f|0)){continue}break}x[a+8>>2]=b}ya=j+16|0}return}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=g;x[c+16>>2]=e;x[c+20>>2]=h;x[c+24>>2]=j;x[Ca>>2]=x[Ca>>2]+28}function $b(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;b=x[Ca>>2];a=x[b>>2];d=x[b+8>>2];c=x[b+12>>2];f=x[b+16>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){c=x[b+16>>2];d=!c}a:{b:{if(!Ba){if(d){x[a+16>>2]=0;break b}d=(b|0)==(c|0)}if((Ba|0)==2|d){if(!Ba){x[a+16>>2]=a;c=x[b+16>>2];d=x[x[c>>2]+12>>2]}if(!Ba|!g){Ea[d|0](c,a);if((Ba|0)==1){break a}}if(!Ba){break b}}d=Ba?d:x[x[c>>2]+8>>2];if(!Ba|(g|0)==1){e=Ea[d|0](c)|0;h=1;if((Ba|0)==1){break a}c=e}if(!Ba){x[a+16>>2]=c}}if(!Ba){c=x[b+40>>2];d=!c}c:{if(!Ba){if(d){x[a+40>>2]=0;break c}d=(b+24|0)==(c|0)}if((Ba|0)==2|d){if(!Ba){c=a+24|0;x[a+40>>2]=c;d=x[b+40>>2];f=x[x[d>>2]+12>>2]}if(!Ba|(g|0)==2){Ea[f|0](d,c);h=2;if((Ba|0)==1){break a}}if(!Ba){break c}}d=Ba?d:x[x[c>>2]+8>>2];if(!Ba|(g|0)==3){e=Ea[d|0](c)|0;h=3;if((Ba|0)==1){break a}c=e}if(!Ba){x[a+40>>2]=c}}if(!Ba){c=x[b- -64>>2];d=!c}d:{if(!Ba){if(d){x[a- -64>>2]=0;break d}d=(b+48|0)==(c|0)}if((Ba|0)==2|d){if(!Ba){c=a+48|0;x[a- -64>>2]=c;d=x[b+64>>2];f=x[x[d>>2]+12>>2]}if(!Ba|(g|0)==4){Ea[f|0](d,c);h=4;if((Ba|0)==1){break a}}if(!Ba){break d}}if(!Ba){f=x[x[c>>2]+8>>2];d=a- -64|0}if(!Ba|(g|0)==5){e=Ea[f|0](c)|0;h=5;if((Ba|0)==1){break a}c=e}if(!Ba){x[d>>2]=c}}if(!Ba){x[a+72>>2]=x[b+72>>2];return a}p()}x[x[Ca>>2]>>2]=h;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=d;x[e+12>>2]=c;x[e+16>>2]=f;x[Ca>>2]=x[Ca>>2]+20;return 0}function Ae(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;c=x[Ca>>2];a=x[c>>2];d=x[c+8>>2];e=x[c+12>>2];f=x[c+16>>2];i=x[c+20>>2];g=x[c+24>>2];h=x[c+28>>2];b=x[c+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){d=x[a+8>>2];e=(d|0)!=x[a+12>>2]}a:{b:{c:{if(!Ba){if(e){e=d;break c}f=x[a+4>>2];g=x[a>>2];if(f>>>0>g>>>0){c=d-f|0;h=((f-g>>2)+1|0)/-2<<2;e=h+f|0;if((d|0)!=(f|0)){mf(e,f,c);d=x[a+4>>2]}e=c+e|0;x[a+8>>2]=e;x[a+4>>2]=d+h;break c}e=(d|0)==(g|0)?1:d-g>>1;if(e>>>0>=1073741824){break b}i=e<<2}if(!Ba|!j){c=dr(i);if((Ba|0)==1){break a}h=c}if(!Ba){i=h+i|0;c=(e&-4)+h|0;e=c;d:{if((d|0)==(f|0)){break d}j=d-f|0;k=j-4|0;l=(k>>>2|0)+1&7;e:{if(!l){d=c;break e}e=0;d=c;while(1){x[d>>2]=x[f>>2];f=f+4|0;d=d+4|0;e=e+1|0;if((l|0)!=(e|0)){continue}break}}e=c+j|0;if(k>>>0<28){break d}while(1){x[d>>2]=x[f>>2];x[d+4>>2]=x[f+4>>2];x[d+8>>2]=x[f+8>>2];x[d+12>>2]=x[f+12>>2];x[d+16>>2]=x[f+16>>2];x[d+20>>2]=x[f+20>>2];x[d+24>>2]=x[f+24>>2];x[d+28>>2]=x[f+28>>2];f=f+32|0;d=d+32|0;if((e|0)!=(d|0)){continue}break}}x[a+12>>2]=i;x[a+8>>2]=e;x[a+4>>2]=c;x[a>>2]=h;if(!g){break c}zg(g);e=x[a+8>>2]}}if(!Ba){x[e>>2]=x[b>>2];x[a+8>>2]=x[a+8>>2]+4;return}}if(!Ba){Ya();p()}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=e;x[c+16>>2]=f;x[c+20>>2]=i;x[c+24>>2]=g;x[c+28>>2]=h;x[Ca>>2]=x[Ca>>2]+32}function wn(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];g=x[b+20>>2];h=x[b+24>>2];k=x[b+28>>2];l=x[b+32>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){k=ya-16|0;ya=k;x[k+12>>2]=b;g=6;h=k+12|0;b=0}a:{if(!Ba|!i){f=ci(a,h);if((Ba|0)==1){break a}h=f}b:{c:{if(!Ba){if(h){break c}g=4}if(!Ba|(i|0)==1){f=di(a);j=1;if((Ba|0)==1){break a}h=f}if(!Ba|(i|0)==2){f=ei(d,64,h);j=2;if((Ba|0)==1){break a}l=f}if(!(Ba|l)){break c}if(!Ba|(i|0)==3){f=nn(d,h);j=3;if((Ba|0)==1){break a}b=f}while(1){d:{if(!Ba|(i|0)==4){f=fi(a);j=4;if((Ba|0)==1){break a}g=f}if(!Ba){g=k+12|0;b=b-48|0}if(!Ba|(i|0)==5){f=ci(a,g);j=5;if((Ba|0)==1){break a}g=f}if(!Ba){if(g){break d}g=(e|0)<2;if(g){break d}}if(!Ba|(i|0)==6){f=di(a);j=6;if((Ba|0)==1){break a}g=f}if(!Ba|(i|0)==7){f=ei(d,64,g);j=7;if((Ba|0)==1){break a}h=f}if(!Ba){h=!h;if(h){break b}e=e-1|0}if(!Ba|(i|0)==8){f=nn(d,g);j=8;if((Ba|0)==1){break a}g=f}if(!Ba){b=D(b,10)+g|0;continue}}break}if(!Ba){g=2;d=k+12|0}if(!Ba|(i|0)==9){f=ci(a,d);j=9;if((Ba|0)==1){break a}a=f}if(!(Ba|a)){break b}}if(!Ba){x[c>>2]=x[c>>2]|g}}if(!Ba){ya=k+16|0;return b}p()}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[f+24>>2]=h;x[f+28>>2]=k;x[f+32>>2]=l;x[Ca>>2]=x[Ca>>2]+36;return 0}function Be(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;h=x[Ca>>2];a=x[h>>2];b=x[h+4>>2];c=x[h+8>>2];d=x[h+12>>2];f=x[h+16>>2];g=x[h+20>>2];i=x[h+24>>2];h=x[h+28>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}if(!Ba){g=x[a+4>>2];f=(g|0)!=x[a>>2]}a:{b:{c:{if(!Ba){if(f){f=g;break c}i=x[a+8>>2];c=x[a+12>>2];if(i>>>0>>0){c=((c-i>>2)+1|0)/2<<2;d=i-g|0;f=(c+i|0)-d|0;if((g|0)!=(i|0)){mf(f,g,d);g=x[a+8>>2]}x[a+4>>2]=f;x[a+8>>2]=c+g;break c}c=(c|0)==(g|0)?1:c-g>>1;f=c>>>0>=1073741824;if(f){break b}d=c<<2}if(!Ba|!e){e=dr(d);if((Ba|0)==1){break a}h=e}if(!Ba){l=d+h|0;f=(c+3&-4)+h|0;e=f;d:{if((g|0)==(i|0)){break d}c=e;d=g;i=i-d|0;j=i-4|0;k=(j>>>2|0)+1&7;if(k){e=0;while(1){x[c>>2]=x[d>>2];d=d+4|0;c=c+4|0;e=e+1|0;if((k|0)!=(e|0)){continue}break}}e=f+i|0;if(j>>>0<28){break d}while(1){x[c>>2]=x[d>>2];x[c+4>>2]=x[d+4>>2];x[c+8>>2]=x[d+8>>2];x[c+12>>2]=x[d+12>>2];x[c+16>>2]=x[d+16>>2];x[c+20>>2]=x[d+20>>2];x[c+24>>2]=x[d+24>>2];x[c+28>>2]=x[d+28>>2];d=d+32|0;c=c+32|0;if((e|0)!=(c|0)){continue}break}}x[a+12>>2]=l;x[a+8>>2]=e;x[a+4>>2]=f;x[a>>2]=h;if(!g){break c}zg(g);f=x[a+4>>2]}}if(!Ba){x[f-4>>2]=x[b>>2];x[a+4>>2]=x[a+4>>2]-4;return}}if(!Ba){Ya();p()}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=f;x[e+20>>2]=g;x[e+24>>2]=i;x[e+28>>2]=h;x[Ca>>2]=x[Ca>>2]+32}function Af(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];d=x[b+8>>2];e=x[b+12>>2];g=x[b+16>>2];i=x[b+20>>2];j=x[b+24>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}a:{d=Ba?d:!a;if(d|(Ba|0)==2){a=Ba?a:x[11920];if(a|(Ba|0)==2){a=Ba?a:x[11920];if(!Ba|!f){c=Af(a);if((Ba|0)==1){break a}b=c}}a=Ba?a:x[11882];if(a|(Ba|0)==2){a=Ba?a:x[11882];if(!Ba|(f|0)==1){c=Af(a);h=1;if((Ba|0)==1){break a}a=c}b=Ba?b:a|b}a=Ba?a:x[12179];if(a|(Ba|0)==2){while(1){if(!Ba){e=x[a+28>>2];d=(e|0)!=x[a+20>>2]}if((Ba|0)==2|d){if(!Ba|(f|0)==2){c=Af(a);h=2;if((Ba|0)==1){break a}d=c}b=Ba?b:b|d}if(!Ba){a=x[a+56>>2];if(a){continue}}break}}if(!Ba){return b|0}}if(!Ba){e=x[a+76>>2]<0;d=x[a+28>>2];b=(d|0)==x[a+20>>2]}b:{c:{if(!Ba){if(b){break c}b=x[a+36>>2]}if(!Ba|(f|0)==3){c=Ea[b|0](a,0,0)|0;h=3;if((Ba|0)==1){break a}b=c}if(!Ba){b=x[a+20>>2];if(b){break c}b=-1;break b}}if(Ba){c=j}else{b=x[a+4>>2];d=x[a+8>>2];c=(b|0)!=(d|0)}if(c|(Ba|0)==2){if(!Ba){g=b-d|0;i=g>>31;b=x[a+40>>2]}if(!Ba|(f|0)==4){Ea[b|0](a,g,i,1)|0;h=4;if((Ba|0)==1){break a}}}if(!Ba){b=0;x[a+28>>2]=0;x[a+16>>2]=0;x[a+20>>2]=0;x[a+4>>2]=0;x[a+8>>2]=0;if(e){break b}}}if(!Ba){return b|0}p()}x[x[Ca>>2]>>2]=h;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=e;x[c+16>>2]=g;x[c+20>>2]=i;x[c+24>>2]=j;x[Ca>>2]=x[Ca>>2]+28;return 0}function uc(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];d=x[b+8>>2];e=x[b+12>>2];i=x[b+16>>2];j=x[b+20>>2];f=x[b+24>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){j=ya-16|0;ya=j;i=x[a+12>>2];d=x[a+8>>2];a:{if((i|0)<(d|0)){f=d-i|0;break a}e=(d|0)>=(i|0);f=0;if(e){break a}f=x[a+16>>2]+(d-i|0)|0}d=(f|0)>=(b|0)}b:{c:{if(!Ba){if(d){f=b;break c}d=j+12|0}if(!Ba|!g){c=Ib(51780,11936,27);if((Ba|0)==1){break b}e=c}if(!Ba|(g|0)==1){c=Nh(e,b);h=1;if((Ba|0)==1){break b}b=c}if(!Ba|(g|0)==2){c=Ib(b,11032,17);h=2;if((Ba|0)==1){break b}b=c}if(!Ba|(g|0)==3){c=Nh(b,f);h=3;if((Ba|0)==1){break b}b=c}if(!Ba|(g|0)==4){c=Ib(b,7878,10);h=4;if((Ba|0)==1){break b}b=c}if(!Ba){e=x[x[b>>2]-12>>2]+b|0;vj(d,e);d=j+12|0}if(!Ba|(g|0)==5){c=il(d,52748);h=5;if((Ba|0)==1){break b}d=c}e=Ba?e:x[x[d>>2]+28>>2];if(!Ba|(g|0)==6){c=Ea[e|0](d,10)|0;h=6;if((Ba|0)==1){break b}d=c}e=Ba?e:j+12|0;if(!Ba|(g|0)==7){Po(e);h=7;if((Ba|0)==1){break b}}if(!Ba|(g|0)==8){Th(b,d);h=8;if((Ba|0)==1){break b}}if(!Ba|(g|0)==9){rh(b);h=9;if((Ba|0)==1){break b}}}if(!Ba){if(f){b=f+i|0;f=x[a+16>>2];while(1){d=b;b=b-f|0;if((d|0)>=(f|0)){continue}break}x[a+12>>2]=d}ya=j+16|0}return}x[x[Ca>>2]>>2]=h;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=e;x[c+16>>2]=i;x[c+20>>2]=j;x[c+24>>2]=f;x[Ca>>2]=x[Ca>>2]+28}function An(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;h=x[Ca>>2];a=x[h>>2];b=x[h+4>>2];c=x[h+8>>2];d=x[h+12>>2];e=x[h+16>>2];f=x[h+20>>2];g=x[h+24>>2];k=x[h+28>>2];l=x[h+32>>2];i=x[h+36>>2];h=x[h+40>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){c=ya-416|0;ya=c;x[c+12>>2]=c+416;i=ya-144|0;ya=i;x[i+28>>2]=i+132;d=a+8|0;a=i+32|0;zn(d,a,i+28|0,e,f,g);x[i+16>>2]=0;x[i+20>>2]=0;x[i+12>>2]=a;f=c+16|0;e=c+12|0;a=Bn(f,x[e>>2]);g=ya-16|0;ya=g;x[g+12>>2]=x[d>>2];d=Rl(g+8|0,g+12|0);a=Uk(f,i+12|0,a,i+16|0);Sl(d);ya=g+16|0;if((a|0)==-1){Ji();p()}x[e>>2]=f+(a<<2);ya=i+144|0;a=ya-16|0;ya=a;e=ya-32|0;ya=e;k=c+16|0;Ti(e+24|0,k,x[c+12>>2]);l=e+16|0;i=x[e+28>>2];d=ya-16|0;ya=d;f=x[e+24>>2];x[d+8>>2]=f;x[d+12>>2]=b;g=a+8|0}a:{while(1){b=Ba?b:(f|0)!=(i|0);if(b|(Ba|0)==2){if(!Ba){h=x[f>>2];b=d+12|0}if(!Ba|!j){ii(b,h);if((Ba|0)==1){break a}}if(!Ba){f=f+4|0;x[d+8>>2]=f;continue}}break}if(!Ba){Xi(l,d+8|0,d+12|0);ya=d+16|0;m=e,n=Vi(k,x[e+16>>2]),x[m+12>>2]=n;x[e+8>>2]=x[e+20>>2];Xi(g,e+12|0,e+8|0);ya=e+32|0;ya=a+16|0;ya=c+416|0;return x[a+12>>2]}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;j=x[Ca>>2];x[j>>2]=a;x[j+4>>2]=b;x[j+8>>2]=c;x[j+12>>2]=d;x[j+16>>2]=e;x[j+20>>2]=f;x[j+24>>2]=g;x[j+28>>2]=k;x[j+32>>2]=l;x[j+36>>2]=i;x[j+40>>2]=h;x[Ca>>2]=x[Ca>>2]+44;return 0}function zp(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0;a=ya-16|0;ya=a;x[a+12>>2]=c;x[a+8>>2]=f;m=a+12|0;x[m>>2]=c;l=a+8|0;x[l>>2]=f;a:{b:{c:{while(1){d:{c=x[m>>2];if(c>>>0>=d>>>0){break d}j=x[l>>2];if(j>>>0>=g>>>0){break d}b=2;f=y[c|0];e:{if(f<<24>>24>=0){w[j>>1]=f;b=c+1|0;break e}if(f>>>0<194){break b}if(f>>>0<=223){if((d-c|0)<2){break c}i=y[c+1|0];if((i&192)!=128){break a}w[j>>1]=i&63|f<<6&1984;b=c+2|0;break e}if(f>>>0<=239){if((d-c|0)<3){break c}k=y[c+2|0];i=y[c+1|0];f:{g:{if((f|0)!=237){if((f|0)!=224){break g}if((i&224)==160){break f}break a}if((i&224)==128){break f}break a}if((i&192)!=128){break a}}if((k&192)!=128){break a}w[j>>1]=k&63|((i&63)<<6|f<<12);b=c+3|0;break e}if(f>>>0>244){break b}b=1;if((d-c|0)<4){break a}k=y[c+3|0];i=y[c+2|0];c=y[c+1|0];h:{i:{switch(f-240|0){case 0:if((c+112&255)>>>0>=48){break b}break h;case 4:if((c&240)!=128){break b}break h;default:break i}}if((c&192)!=128){break b}}if((i&192)!=128|(k&192)!=128){break b}if((g-j|0)<4){break a}b=2;k=k&63;n=i<<6;f=f&7;if((k|(n&4032|(c<<12&258048|f<<18)))>>>0>1114111){break a}b=c<<2;w[j>>1]=(i>>>4&3|(b&192|f<<8|b&60))+16320|55296;x[l>>2]=j+2;w[j+2>>1]=k|n&960|56320;b=x[m>>2]+4|0}x[m>>2]=b;x[l>>2]=x[l>>2]+2;continue}break}b=c>>>0>>0;break a}b=1;break a}b=2}x[e>>2]=x[a+12>>2];x[h>>2]=x[a+8>>2];ya=a+16|0;return b|0}function Gd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=E(0),n=E(0),o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=E(0);if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;f=x[Ca>>2];a=x[f>>2];b=x[f+4>>2];c=x[f+8>>2];d=x[f+12>>2];g=x[f+16>>2];f=x[f+20>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}g=Ba?g:x[x[a>>2]+16>>2];a:{if(!Ba|!e){Ea[g|0](a);if((Ba|0)==1){break a}}if(!Ba){b:{a=x[a+12>>2];g=x[a+4>>2];if((g|0)<=0){break b}l=x[a>>2];o=l&-2;p=l&1;q=l-1|0;s=x[a+8>>2];t=x[a+12>>2];while(1){c:{if((l|0)<=0){i=0;j=0;break c}k=f<<2;h=x[k+t>>2];i=0;a=0;e=0;if(q){while(1){r=a|1;i=+B[(r<<2)+b>>2]*C[h+(r<<3)>>3]+(+B[(a<<2)+b>>2]*C[h+(a<<3)>>3]+i);a=a+2|0;e=e+2|0;if((o|0)!=(e|0)){continue}break}}if(p){i=+B[(a<<2)+b>>2]*C[h+(a<<3)>>3]+i}h=x[k+s>>2];j=0;a=0;e=0;if(q){while(1){k=a|1;j=j-+B[(a<<2)+b>>2]*C[h+(a<<3)>>3]-+B[(k<<2)+b>>2]*C[h+(k<<3)>>3];a=a+2|0;e=e+2|0;if((o|0)!=(e|0)){continue}break}}if(!p){break c}j=j-+B[(a<<2)+b>>2]*C[h+(a<<3)>>3]}a=f<<2;B[a+c>>2]=i;B[a+d>>2]=j;f=f+1|0;if((g|0)!=(f|0)){continue}break}a=0;if((g|0)<=0){break b}while(1){b=a<<2;e=b+c|0;m=B[e>>2];b=b+d|0;n=B[b>>2];B[e>>2]=M(E(E(m*m)+E(n*n)));u=b,v=af(n,m),B[u>>2]=v;a=a+1|0;if((g|0)!=(a|0)){continue}break}}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=g;x[e+20>>2]=f;x[Ca>>2]=x[Ca>>2]+24}function dl(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];k=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){g=ya-32|0;ya=g;x[g+28>>2]=b;k=!(x[d+4>>2]&1)}a:{b:{if((Ba|0)==2|k){if(!Ba){x[g>>2]=-1;k=x[x[a>>2]+16>>2]}if(!Ba|!i){h=Ea[k|0](a,b,c,d,e,g)|0;if((Ba|0)==1){break a}b=h}if(!Ba){c:{switch(x[g>>2]){case 0:v[f|0]=0;break b;case 1:v[f|0]=1;break b;default:break c}}v[f|0]=1;x[e>>2]=4;break b}}if(!Ba){vj(g,d)}if(!Ba|(i|0)==1){h=sh(g);j=1;if((Ba|0)==1){break a}b=h}if(!Ba|(i|0)==2){Po(g);j=2;if((Ba|0)==1){break a}}if(!Ba){vj(g,d)}if(!Ba|(i|0)==3){h=el(g);j=3;if((Ba|0)==1){break a}d=h}if(!Ba|(i|0)==4){Po(g);j=4;if((Ba|0)==1){break a}}if(!Ba|(i|0)==5){fl(g,d);j=5;if((Ba|0)==1){break a}}a=Ba?a:g|12;if(!Ba|(i|0)==6){gl(a,d);j=6;if((Ba|0)==1){break a}}if(!Ba){d=g+24|0;a=g+28|0}if(!Ba|(i|0)==7){h=hl(a,c,g,d,b,e,1);j=7;if((Ba|0)==1){break a}a=h}if(!Ba){v[f|0]=(a|0)==(g|0);b=x[g+28>>2];while(1){d=hr(d-12|0);if((g|0)!=(d|0)){continue}break}}}if(!Ba){ya=g+32|0;return b|0}p()}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=k;x[Ca>>2]=x[Ca>>2]+32;return 0}function Tl(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];k=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){g=ya-32|0;ya=g;x[g+28>>2]=b;k=!(x[d+4>>2]&1)}a:{b:{if((Ba|0)==2|k){if(!Ba){x[g>>2]=-1;k=x[x[a>>2]+16>>2]}if(!Ba|!i){h=Ea[k|0](a,b,c,d,e,g)|0;if((Ba|0)==1){break a}b=h}if(!Ba){c:{switch(x[g>>2]){case 0:v[f|0]=0;break b;case 1:v[f|0]=1;break b;default:break c}}v[f|0]=1;x[e>>2]=4;break b}}if(!Ba){vj(g,d)}if(!Ba|(i|0)==1){h=bi(g);j=1;if((Ba|0)==1){break a}b=h}if(!Ba|(i|0)==2){Po(g);j=2;if((Ba|0)==1){break a}}if(!Ba){vj(g,d)}if(!Ba|(i|0)==3){h=Ul(g);j=3;if((Ba|0)==1){break a}d=h}if(!Ba|(i|0)==4){Po(g);j=4;if((Ba|0)==1){break a}}if(!Ba|(i|0)==5){fl(g,d);j=5;if((Ba|0)==1){break a}}a=Ba?a:g|12;if(!Ba|(i|0)==6){gl(a,d);j=6;if((Ba|0)==1){break a}}if(!Ba){d=g+24|0;a=g+28|0}if(!Ba|(i|0)==7){h=Vl(a,c,g,d,b,e,1);j=7;if((Ba|0)==1){break a}a=h}if(!Ba){v[f|0]=(a|0)==(g|0);b=x[g+28>>2];while(1){d=lr(d-12|0);if((g|0)!=(d|0)){continue}break}}}if(!Ba){ya=g+32|0;return b|0}p()}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[h+28>>2]=k;x[Ca>>2]=x[Ca>>2]+32;return 0}function kg(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];g=x[b+20>>2];h=x[b+24>>2];i=x[b+28>>2];j=x[b+32>>2];k=x[b+36>>2];l=x[b+40>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;m=x[x[Ca>>2]>>2]}if(!Ba){g=ya-208|0;ya=g;x[g+204>>2]=c;i=g+160|0;nf(i,0,40);x[g+200>>2]=x[g+204>>2];h=g+80|0;c=g+200|0}a:{if(!Ba|!m){f=lg(0,b,c,h,i,d,e);if((Ba|0)==1){break a}c=f}c=Ba?c:(c|0)<0;b:{if(!Ba){if(c){e=-1;break b}i=x[a+76>>2]<0;h=x[a>>2];x[a>>2]=h&-33;c=!x[a+48>>2]}c:{if(!Ba){d:{e:{if(c){x[a+48>>2]=80;x[a+28>>2]=0;x[a+16>>2]=0;x[a+20>>2]=0;j=x[a+44>>2];x[a+44>>2]=g;break e}if(x[a+16>>2]){break d}}c=-1;if(Rf(a)){break c}}k=g+80|0;l=g+160|0;c=g+200|0}if(!Ba|(m|0)==1){f=lg(a,b,c,k,l,d,e);n=1;if((Ba|0)==1){break a}c=f}}e=Ba?e:h&32;if((Ba|0)==2|j){b=Ba?b:x[a+36>>2];if(!Ba|(m|0)==2){Ea[b|0](a,0,0)|0;n=2;if((Ba|0)==1){break a}}if(!Ba){x[a+48>>2]=0;x[a+44>>2]=j;x[a+28>>2]=0;b=x[a+20>>2];x[a+16>>2]=0;x[a+20>>2]=0;c=b?c:-1}}if(!Ba){b=a;a=x[a>>2];x[b>>2]=a|e;e=a&32?-1:c;if(i){break b}}}if(!Ba){ya=g+208|0;return e}p()}x[x[Ca>>2]>>2]=n;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[f+24>>2]=h;x[f+28>>2]=i;x[f+32>>2]=j;x[f+36>>2]=k;x[f+40>>2]=l;x[Ca>>2]=x[Ca>>2]+44;return 0} +function gb(a,b,c,d){a=a|0;b=b|0;c=+c;d=+d;var e=0,f=0,g=0,h=0,i=0,k=0,m=0,q=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;g=x[Ca>>2];a=x[g>>2];e=x[g+12>>2];b=x[g+8>>2];l(0,b|0);l(1,e|0);c=+n();e=x[g+20>>2];b=x[g+16>>2];l(0,b|0);l(1,e|0);d=+n();f=x[g+24>>2];h=x[g+28>>2];k=x[g+32>>2];b=x[g+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){a=ya-32|0;ya=a;h=gg(b);f=h>>>0<2147483632}a:{e=(Ba|0)==2;if(e|f){f=Ba?f:h>>>0>=11;b:{c:{if(e|f){if(!Ba){f=h|15;k=f+1|0}if(!Ba|!i){e=dr(k);g=0;if((Ba|0)==1){break a}f=e}if(!Ba){x[a+20>>2]=k|-2147483648;x[a+12>>2]=f;x[a+16>>2]=h;break c}}if(!Ba){v[a+23|0]=h;f=a+12|0;if(!h){break b}}}if(!Ba){lf(f,b,h)}}if(!Ba){v[f+h|0]=0;i=v[a+23|0];g=(i|0)<0;f=g?x[a+16>>2]:i&255;e=yg(f+4|0);x[e>>2]=f;b=x[a+12>>2];lf(e+4|0,g?b:a+12|0,f);x[a+24>>2]=e;f=a+24|0;g=Q(12584,f|0)|0;C[a+24>>3]=c;f=Q(46716,f|0)|0;C[a+24>>3]=d;e=Q(46716,a+24|0)|0;x[a>>2]=g;x[a+4>>2]=f;x[a+8>>2]=e;Y(48341,12595,a|0)|0;if(e){P(e|0)}if(f){P(f|0)}if(g){P(g|0)}if((i|0)<0){zg(b)}ya=a+32|0;return}}if(!Ba|(i|0)==1){eb();g=1;if((Ba|0)==1){break a}}if(!Ba){p()}return}x[x[Ca>>2]>>2]=g;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;o(+c);a=j(1)|0;m=e,q=j(0)|0,x[m+8>>2]=q;x[e+12>>2]=a;o(+d);a=j(1)|0;m=e,q=j(0)|0,x[m+16>>2]=q;x[e+20>>2]=a;x[e+24>>2]=f;x[e+28>>2]=h;x[e+32>>2]=k;x[Ca>>2]=x[Ca>>2]+36}function Pd(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;f=x[a+4>>2];a:{if((f|0)<=0){break a}m=f&1;g=x[a+16>>2];i=x[g+4>>2];g=x[g>>2];if((f|0)!=1){l=f&-2;while(1){e=d<<3;j=e+b|0;C[e+g>>3]=B[j>>2];C[e+i>>3]=B[j+4>>2];e=e|8;j=e+b|0;C[e+g>>3]=B[j>>2];C[e+i>>3]=B[j+4>>2];d=d+2|0;h=h+2|0;if((l|0)!=(h|0)){continue}break}}if(!m){break a}d=d<<3;e=d+b|0;C[d+g>>3]=B[e>>2];C[d+i>>3]=B[e+4>>2]}i=x[a>>2];if((i|0)>(f|0)){d=x[a+16>>2];g=x[d+4>>2];d=x[d>>2];while(1){e=f<<3;j=(i-f<<3)+b|0;C[e+d>>3]=B[j>>2];C[e+g>>3]=E(-B[j+4>>2]);f=f+1|0;if((i|0)!=(f|0)){continue}break}}if((i|0)>0){n=i&-2;o=i&1;p=i&-4;m=i&3;q=x[a+8>>2];r=x[a+12>>2];a=x[a+16>>2];j=x[a+4>>2];b=x[a>>2];a=0;s=i>>>0<4;while(1){l=a<<2;g=x[r+l>>2];k=0;f=0;d=0;if(!s){while(1){e=f<<3;h=e|24;t=C[h+b>>3]*C[g+h>>3];h=e|16;u=C[h+b>>3]*C[g+h>>3];h=e|8;k=t+(u+(C[h+b>>3]*C[g+h>>3]+(C[b+e>>3]*C[e+g>>3]+k)));f=f+4|0;d=d+4|0;if((p|0)!=(d|0)){continue}break}}e=l+q|0;d=0;if(m){while(1){h=f<<3;k=C[h+b>>3]*C[g+h>>3]+k;f=f+1|0;d=d+1|0;if((m|0)!=(d|0)){continue}break}}g=x[e>>2];f=0;d=0;if((i|0)!=1){while(1){e=f<<3;h=e|8;k=k-C[e+j>>3]*C[e+g>>3]-C[h+j>>3]*C[g+h>>3];f=f+2|0;d=d+2|0;if((n|0)!=(d|0)){continue}break}}d=c+l|0;if(o){f=f<<3;k=k-C[f+j>>3]*C[f+g>>3]}B[d>>2]=k;a=a+1|0;if((i|0)!=(a|0)){continue}break}}}function yp(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0;a=ya-16|0;ya=a;x[a+12>>2]=c;x[a+8>>2]=f;j=a+12|0;x[j>>2]=c;b=a+8|0;x[b>>2]=f;c=x[j>>2];a:{b:{while(1){if(c>>>0>=d>>>0){f=0;break a}f=2;c:{i=z[c>>1];d:{if(i>>>0<=127){f=1;c=x[b>>2];if((g-c|0)<=0){break a}x[b>>2]=c+1;v[c|0]=i;break d}if(i>>>0<=2047){c=x[b>>2];if((g-c|0)<2){break b}x[b>>2]=c+1;v[c|0]=i>>>6|192;c=x[b>>2];x[b>>2]=c+1;v[c|0]=i&63|128;break d}if(i>>>0<=55295){c=x[b>>2];if((g-c|0)<3){break b}x[b>>2]=c+1;v[c|0]=i>>>12|224;c=x[b>>2];x[b>>2]=c+1;v[c|0]=i>>>6&63|128;c=x[b>>2];x[b>>2]=c+1;v[c|0]=i&63|128;break d}if(i>>>0<=56319){f=1;if((d-c|0)<4){break a}k=z[c+2>>1];if((k&64512)!=56320){break c}if((g-x[b>>2]|0)<4){break a}f=i&960;if((k&1023|(i<<10&64512|f<<10))>>>0>1048575){break c}x[j>>2]=c+2;c=x[b>>2];x[b>>2]=c+1;l=c;c=(f>>>6|0)+1|0;v[l|0]=c>>>2|240;f=x[b>>2];x[b>>2]=f+1;v[f|0]=c<<4&48|i>>>2&15|128;c=x[b>>2];x[b>>2]=c+1;v[c|0]=k>>>6&15|i<<4&48|128;c=x[b>>2];x[b>>2]=c+1;v[c|0]=k&63|128;break d}if(i>>>0<57344){break a}c=x[b>>2];if((g-c|0)<3){break b}x[b>>2]=c+1;v[c|0]=i>>>12|224;c=x[b>>2];x[b>>2]=c+1;v[c|0]=i>>>6&63|128;c=x[b>>2];x[b>>2]=c+1;v[c|0]=i&63|128}c=x[j>>2]+2|0;x[j>>2]=c;continue}break}f=2;break a}f=1}x[e>>2]=x[a+12>>2];x[h>>2]=x[a+8>>2];ya=a+16|0;return f|0}function Lm(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];h=x[b+24>>2];j=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){f=ya-32|0;ya=f;x[f+28>>2]=b;h=!(x[c+4>>2]&1)}a:{b:{if((Ba|0)==2|h){h=Ba?h:x[x[a>>2]+24>>2];if(!Ba|!i){g=Ea[h|0](a,b,c,d,e)|0;if((Ba|0)==1){break a}c=g}if(!Ba){break b}}if(!Ba){a=f+16|0;vj(a,c)}if(!Ba|(i|0)==1){g=Ul(a);k=1;if((Ba|0)==1){break a}c=g}a=Ba?a:f+16|0;if(!Ba|(i|0)==2){Po(a);k=2;if((Ba|0)==1){break a}}c:{if((Ba|0)==2|e){a=Ba?a:f+16|0;if(!Ba|(i|0)==3){fl(a,c);k=3;if((Ba|0)==1){break a}}if(!Ba){break c}}a=Ba?a:f+16|0;if(!Ba|(i|0)==4){gl(a,c);k=4;if((Ba|0)==1){break a}}}if(!Ba){a=pm(f+16|0);x[f+12>>2]=a}while(1){if(!Ba){l=f,m=Mm(f+16|0),x[l+8>>2]=m;b=f+8|0;a=rm(f+12|0,b)}j=Ba?j:a;if(j|(Ba|0)==2){if(!Ba){b=x[x[f+12>>2]>>2];a=f+28|0}if(!Ba|(i|0)==5){ii(a,b);k=5;if((Ba|0)==1){break a}}if(!Ba){a=f+12|0;Nm(a);continue}}break}if(!Ba&(!j|(Ba|0)==2)){c=x[f+28>>2];lr(f+16|0)}}if(!Ba){ya=f+32|0;return c|0}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[g+28>>2]=j;x[Ca>>2]=x[Ca>>2]+32;return 0}function om(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];h=x[b+24>>2];j=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){f=ya-32|0;ya=f;x[f+28>>2]=b;h=!(x[c+4>>2]&1)}a:{b:{if((Ba|0)==2|h){h=Ba?h:x[x[a>>2]+24>>2];if(!Ba|!i){g=Ea[h|0](a,b,c,d,e)|0;if((Ba|0)==1){break a}c=g}if(!Ba){break b}}if(!Ba){a=f+16|0;vj(a,c)}if(!Ba|(i|0)==1){g=el(a);k=1;if((Ba|0)==1){break a}c=g}a=Ba?a:f+16|0;if(!Ba|(i|0)==2){Po(a);k=2;if((Ba|0)==1){break a}}c:{if((Ba|0)==2|e){a=Ba?a:f+16|0;if(!Ba|(i|0)==3){fl(a,c);k=3;if((Ba|0)==1){break a}}if(!Ba){break c}}a=Ba?a:f+16|0;if(!Ba|(i|0)==4){gl(a,c);k=4;if((Ba|0)==1){break a}}}if(!Ba){a=pm(f+16|0);x[f+12>>2]=a}while(1){if(!Ba){l=f,m=qm(f+16|0),x[l+8>>2]=m;b=f+8|0;a=rm(f+12|0,b)}j=Ba?j:a;if(j|(Ba|0)==2){if(!Ba){b=v[x[f+12>>2]];a=f+28|0}if(!Ba|(i|0)==5){Sh(a,b);k=5;if((Ba|0)==1){break a}}if(!Ba){a=f+12|0;sm(a);continue}}break}if(!Ba&(!j|(Ba|0)==2)){c=x[f+28>>2];hr(f+16|0)}}if(!Ba){ya=f+32|0;return c|0}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[g+28>>2]=j;x[Ca>>2]=x[Ca>>2]+32;return 0}function Ai(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;e=x[Ca>>2];a=x[e>>2];c=x[e+8>>2];f=x[e+12>>2];g=x[e+16>>2];h=x[e+20>>2];i=x[e+24>>2];j=x[e+28>>2];k=x[e+32>>2];l=x[e+36>>2];m=x[e+40>>2];b=x[e+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){g=ya-16|0;ya=g;c=!Bh(b,-1)}a:{b:{if((Ba|0)==2|c){if(!Ba){h=x[a+12>>2];i=x[a+8>>2];f=x[a+28>>2];c=(f|0)==x[a+24>>2]}if((Ba|0)==2|c){if(!Ba){c=-1;f=!(y[a+48|0]&16);if(f){break b}j=x[a+24>>2];k=x[a+20>>2];l=x[a+44>>2];m=x[a+20>>2];c=a+32|0}if(!Ba|!d){jr(c,0);e=0;if((Ba|0)==1){break a}}if(!Ba){f=vi(c)}if(!Ba|(d|0)==1){wi(c,f);e=1;if((Ba|0)==1){break a}}if(!Ba){f=ri(c);oi(a,f,ui(c)+f|0);pi(a,j-k|0);c=x[a+20>>2]+(l-m|0)|0;x[a+44>>2]=c}}if(!Ba){x[g+12>>2]=x[a+24>>2]+1;n=a,o=x[Bi(g+12|0,a+44|0)>>2],x[n+44>>2]=o;c=y[a+48|0]&8;if(c){c=ri(a+32|0);f=c+(h-i|0)|0;ni(a,c,f,x[a+44>>2])}b=b<<24>>24}if(!Ba|(d|0)==2){d=Ch(a,b);e=2;if((Ba|0)==1){break a}c=d}if(!Ba){break b}}if(!Ba){c=zi(b)}}if(!Ba){ya=g+16|0;return c|0}p()}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=f;x[d+16>>2]=g;x[d+20>>2]=h;x[d+24>>2]=i;x[d+28>>2]=j;x[d+32>>2]=k;x[d+36>>2]=l;x[d+40>>2]=m;x[Ca>>2]=x[Ca>>2]+44;return 0}function Ad(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];f=x[b+16>>2];k=x[b+20>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}f=Ba?f:x[x[a>>2]+20>>2];a:{if(!Ba|!e){Ea[f|0](a);if((Ba|0)==1){break a}}if(!Ba){a=x[a+8>>2];n=x[a+4>>2];if((n|0)>0){e=x[a>>2];q=e&-2;r=e&1;s=e&-4;o=e&3;t=x[a+8>>2];u=x[a+12>>2];while(1){b:{if((e|0)<=0){l=0;h=0;break b}p=k<<2;f=x[p+u>>2];l=0;j=0;a=0;m=0;if(e>>>0>3){while(1){g=a<<3;i=g|24;h=C[i+b>>3]*C[f+i>>3];i=g|16;v=C[i+b>>3]*C[f+i>>3];i=g|8;l=h+(v+(C[i+b>>3]*C[f+i>>3]+(C[b+g>>3]*C[f+g>>3]+l)));a=a+4|0;m=m+4|0;if((s|0)!=(m|0)){continue}break}}if(o){while(1){g=a<<3;l=C[g+b>>3]*C[f+g>>3]+l;a=a+1|0;j=j+1|0;if((o|0)!=(j|0)){continue}break}}f=x[t+p>>2];h=0;a=0;j=0;if((e|0)!=1){while(1){g=a<<3;m=g|8;h=h-C[b+g>>3]*C[f+g>>3]-C[b+m>>3]*C[f+m>>3];a=a+2|0;j=j+2|0;if((q|0)!=(j|0)){continue}break}}if(!r){break b}a=a<<3;h=h-C[a+b>>3]*C[a+f>>3]}a=k<<3;C[a+c>>3]=l;C[a+d>>3]=h;k=k+1|0;if((n|0)!=(k|0)){continue}break}}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=f;x[e+20>>2]=k;x[Ca>>2]=x[Ca>>2]+24}function Dp(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0;a=ya-16|0;ya=a;x[a+12>>2]=c;x[a+8>>2]=f;m=a+12|0;x[m>>2]=c;l=a+8|0;x[l>>2]=f;a:{b:{while(1){c:{c=x[m>>2];if(c>>>0>=d>>>0){break c}n=x[l>>2];if(n>>>0>=g>>>0){break c}j=v[c|0];f=j&255;d:{if((j|0)>=0){if(f>>>0<=1114111){j=1;break d}b=2;break a}b=2;if(j>>>0<4294967234){break a}if(j>>>0<=4294967263){if((d-c|0)<2){break b}i=y[c+1|0];if((i&192)!=128){break a}j=2;f=i&63|f<<6&1984;break d}if(j>>>0<=4294967279){if((d-c|0)<3){break b}k=y[c+2|0];i=y[c+1|0];e:{f:{if((f|0)!=237){if((f|0)!=224){break f}if((i&224)==160){break e}break a}if((i&224)==128){break e}break a}if((i&192)!=128){break a}}if((k&192)!=128){break a}j=3;f=k&63|(f<<12&61440|(i&63)<<6);break d}if(j>>>0>4294967284){break a}if((d-c|0)<4){break b}k=y[c+3|0];o=y[c+2|0];i=y[c+1|0];g:{h:{switch(f-240|0){case 0:if((i+112&255)>>>0<48){break g}break a;case 4:if((i&240)==128){break g}break a;default:break h}}if((i&192)!=128){break a}}if((o&192)!=128|(k&192)!=128){break a}j=4;f=k&63|(o<<6&4032|(f<<18&1835008|(i&63)<<12));if(f>>>0>1114111){break a}}x[n>>2]=f;x[m>>2]=c+j;x[l>>2]=x[l>>2]+4;continue}break}b=c>>>0>>0;break a}b=1}x[e>>2]=x[a+12>>2];x[h>>2]=x[a+8>>2];ya=a+16|0;return b|0}function kn(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];g=x[b+20>>2];h=x[b+24>>2];i=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){i=ya-16|0;ya=i;x[i+12>>2]=b;g=6;h=i+12|0;b=0}a:{if(!Ba|!j){f=th(a,h);if((Ba|0)==1){break a}h=f}b:{c:{if(!Ba){if(h){break c}g=4}if(!Ba|(j|0)==1){f=uh(a);k=1;if((Ba|0)==1){break a}h=f}if(!Ba){if(!vh(d,64,h)){break c}}if(!Ba|(j|0)==2){f=an(d,h);k=2;if((Ba|0)==1){break a}b=f}while(1){d:{if(!Ba|(j|0)==3){f=wh(a);k=3;if((Ba|0)==1){break a}g=f}if(!Ba){g=i+12|0;b=b-48|0}if(!Ba|(j|0)==4){f=th(a,g);k=4;if((Ba|0)==1){break a}g=f}if(!Ba){if(g){break d}g=(e|0)<2;if(g){break d}}if(!Ba|(j|0)==5){f=uh(a);k=5;if((Ba|0)==1){break a}g=f}if(!Ba){if(!vh(d,64,g)){break b}e=e-1|0}if(!Ba|(j|0)==6){f=an(d,g);k=6;if((Ba|0)==1){break a}g=f}if(!Ba){b=D(b,10)+g|0;continue}}break}if(!Ba){g=2;d=i+12|0}if(!Ba|(j|0)==7){f=th(a,d);k=7;if((Ba|0)==1){break a}a=f}if(!(Ba|a)){break b}}if(!Ba){x[c>>2]=x[c>>2]|g}}if(!Ba){ya=i+16|0;return b}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[f+24>>2]=h;x[f+28>>2]=i;x[Ca>>2]=x[Ca>>2]+32;return 0}function Ir(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-52;g=x[Ca>>2];a=x[g>>2];c=x[g+8>>2];d=x[g+12>>2];e=x[g+16>>2];f=x[g+20>>2];h=x[g+24>>2];i=x[g+28>>2];j=x[g+32>>2];k=x[g+36>>2];l=x[g+40>>2];m=x[g+44>>2];n=x[g+48>>2];b=x[g+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;o=x[x[Ca>>2]>>2]}if(!Ba){if(qr(a,x[b+8>>2],f)){Br(b,c,d,e);return}i=y[b+53|0];h=x[a+12>>2];v[b+53|0]=0;j=y[b+52|0];v[b+52|0]=0;k=a+16|0}a:{if(!Ba|!o){Er(k,b,c,d,e,f);g=0;if((Ba|0)==1){break a}}if(!Ba){l=y[b+52|0];j=(l|j)!=0;n=(h|0)<2;m=y[b+53|0];i=(m|i)!=0}b:{if(!Ba){if(n){break b}k=(h<<3)+k|0;h=a+24|0}while(1){if(!Ba){if(y[b+54|0]){break b}c:{if(l){if(x[b+24>>2]==1){break b}if(y[a+8|0]&2){break c}break b}if(!m){break c}if(!(v[a+8|0]&1)){break b}}w[b+52>>1]=0}if(!Ba|(o|0)==1){Er(h,b,c,d,e,f);g=1;if((Ba|0)==1){break a}}if(!Ba){m=y[b+53|0];i=(m|i&1)!=0;l=y[b+52|0];j=(l|j&1)!=0;h=h+8|0;if(k>>>0>h>>>0){continue}}break}}if(!Ba){v[b+53|0]=i&1;v[b+52|0]=j&1}return}x[x[Ca>>2]>>2]=g;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[g+28>>2]=i;x[g+32>>2]=j;x[g+36>>2]=k;x[g+40>>2]=l;x[g+44>>2]=m;x[g+48>>2]=n;x[Ca>>2]=x[Ca>>2]+52}function Wk(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0;o=Ba;l=ya-16|0;ya=l;a:{b:{c:{if((c|0)<=36){g=y[a|0];if(g){break c}f=a;break b}x[12163]=28;d=0;e=0;break a}f=a;d:{while(1){g=nk(g<<24>>24);if((Ba|0)!=(o|0)){p()}if(!g){break d}g=y[f+1|0];f=f+1|0;if(g){continue}break}break b}e:{g=y[f|0];switch(g-43|0){case 0:case 2:break e;default:break b}}i=(g|0)==45?-1:0;f=f+1|0}f:{if(!((c|16)!=16|y[f|0]!=48)){q=1;if((y[f+1|0]&223)==88){f=f+2|0;m=16;break f}f=f+1|0;m=c?c:8;break f}m=c?c:10}c=0;while(1){g:{g=-48;j=v[f|0];h:{if((j-48&255)>>>0<10){break h}g=-87;if((j-97&255)>>>0<26){break h}g=-55;if((j-65&255)>>>0>25){break g}}n=g+j|0;if((n|0)>=(m|0)){break g}yk(l,m,0,0,0,k,h,0,0);if((Ba|0)!=(o|0)){p()}else{g=1;i:{if(x[l+8>>2]|x[l+12>>2]){break i}r=Hs(m,0,k,h);j=Da;if((j|0)==-1&(n^-1)>>>0>>0){break i}h=j;k=n+r|0;h=k>>>0>>0?h+1|0:h;q=1;g=c}f=f+1|0;c=g;continue}}break}if(b){x[b>>2]=q?f:a}j:{k:{if(c){x[12163]=68;b=d&1;a=0;i=b|a?0:i;k=d;h=e;break k}if((e|0)==(h|0)&d>>>0>k>>>0|e>>>0>h>>>0){break j}b=d&1;a=0}if(!(i|(a|b)!=0)){x[12163]=68;a=d;d=a-1|0;e=e-!a|0;break a}if((e|0)==(h|0)&d>>>0>=k>>>0|e>>>0>h>>>0){break j}x[12163]=68;break a}a=i^k;d=a-i|0;b=i>>31;e=(b^h)-((a>>>0>>0)+b|0)|0}ya=l+16|0;Da=e;return d}function td(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0;s=Ba;m=x[a+8>>2];a:{if((m|0)<=0){break a}t=m&1;o=x[a+20>>2];if((m|0)!=1){u=m&-2;while(1){k=x[o+(j<<2)>>2]<<3;g=j<<3;C[k+d>>3]=C[g+b>>3];C[e+k>>3]=C[c+g>>3];g=j|1;k=x[o+(g<<2)>>2]<<3;g=g<<3;C[k+d>>3]=C[g+b>>3];C[e+k>>3]=C[c+g>>3];j=j+2|0;h=h+2|0;if((u|0)!=(h|0)){continue}break}}if(t){h=x[o+(j<<2)>>2]<<3;g=b;b=j<<3;C[h+d>>3]=C[g+b>>3];C[e+h>>3]=C[b+c>>3]}h=2;if((m|0)<2){break a}z=f?-1:1;G=x[a+24>>2];o=x[a+16>>2];a=0;b=1;while(1){w=z;b:{if((h|0)<=(o|0)){c=(a<<3)+G|0;n=C[c>>3];A=C[c+24>>3];v=C[c+16>>3];a=a+4|0;i=C[c+8>>3];break b}i=6.283185307179586/+(h|0);v=gf(i);if((Ba|0)!=(s|0)){p()}n=cg(i);if((Ba|0)!=(s|0)){p()}i=i+i;A=gf(i);if((Ba|0)!=(s|0)){p()}i=cg(i);if((Ba|0)!=(s|0)){p()}}H=w*i;I=z*n;B=v+v;f=0;c=b;while(1){j=f;n=I;q=H;r=v;l=A;if((b|0)>0){while(1){w=r;t=b+j<<3;g=t+d|0;D=C[g>>3];y=g;u=j<<3;k=u+d|0;E=C[k>>3];r=B*r-l;g=e+t|0;l=C[g>>3];i=n;n=B*i-q;F=r*D-l*n;C[y>>3]=E-F;y=g;g=e+u|0;q=C[g>>3];l=r*l+n*D;C[y>>3]=q-l;C[k>>3]=F+E;C[g>>3]=l+q;q=i;l=w;j=j+1|0;if((c|0)!=(j|0)){continue}break}}c=c+h|0;f=f+h|0;if((f|0)<(m|0)){continue}break}b=h;c=h<<1;h=c;if((c|0)<=(m|0)){continue}break}}}function Bd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+12>>2];j=x[b+16>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}e=Ba?e:x[x[a>>2]+20>>2];a:{if(!Ba|!d){Ea[e|0](a);if((Ba|0)==1){break a}}if(!Ba){a=x[a+8>>2];m=x[a+4>>2];if((m|0)>0){d=x[a>>2];p=d&-2;q=d&1;r=d&-4;n=d&3;s=x[a+8>>2];t=x[a+12>>2];while(1){b:{if((d|0)<=0){k=0;g=0;break b}o=j<<2;e=x[o+t>>2];k=0;i=0;a=0;l=0;if(d>>>0>3){while(1){f=a<<3;h=f|24;g=C[h+b>>3]*C[e+h>>3];h=f|16;u=C[h+b>>3]*C[e+h>>3];h=f|8;k=g+(u+(C[h+b>>3]*C[e+h>>3]+(C[b+f>>3]*C[e+f>>3]+k)));a=a+4|0;l=l+4|0;if((r|0)!=(l|0)){continue}break}}if(n){while(1){f=a<<3;k=C[f+b>>3]*C[e+f>>3]+k;a=a+1|0;i=i+1|0;if((n|0)!=(i|0)){continue}break}}e=x[s+o>>2];g=0;a=0;i=0;if((d|0)!=1){while(1){f=a<<3;l=f|8;g=g-C[b+f>>3]*C[e+f>>3]-C[b+l>>3]*C[e+l>>3];a=a+2|0;i=i+2|0;if((p|0)!=(i|0)){continue}break}}if(!q){break b}a=a<<3;g=g-C[a+b>>3]*C[a+e>>3]}a=(j<<4)+c|0;C[a>>3]=k;C[a+8>>3]=g;j=j+1|0;if((m|0)!=(j|0)){continue}break}}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=e;x[d+16>>2]=j;x[Ca>>2]=x[Ca>>2]+20}function Dd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+12>>2];k=x[b+16>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}e=Ba?e:x[x[a>>2]+20>>2];a:{if(!Ba|!d){Ea[e|0](a);if((Ba|0)==1){break a}}if(!Ba){a=x[a+8>>2];m=x[a+4>>2];if((m|0)>0){d=x[a>>2];p=d&-2;q=d&1;r=d&-4;n=d&3;s=x[a+8>>2];t=x[a+12>>2];while(1){b:{if((d|0)<=0){i=0;g=0;break b}o=k<<2;e=x[o+t>>2];i=0;j=0;a=0;l=0;if(d>>>0>3){while(1){f=a<<3;h=f|24;g=C[h+b>>3]*C[e+h>>3];h=f|16;u=C[h+b>>3]*C[e+h>>3];h=f|8;i=g+(u+(C[h+b>>3]*C[e+h>>3]+(C[b+f>>3]*C[e+f>>3]+i)));a=a+4|0;l=l+4|0;if((r|0)!=(l|0)){continue}break}}if(n){while(1){f=a<<3;i=C[f+b>>3]*C[e+f>>3]+i;a=a+1|0;j=j+1|0;if((n|0)!=(j|0)){continue}break}}e=x[s+o>>2];g=0;a=0;j=0;if((d|0)!=1){while(1){f=a<<3;l=f|8;g=g-C[b+f>>3]*C[e+f>>3]-C[b+l>>3]*C[e+l>>3];a=a+2|0;j=j+2|0;if((p|0)!=(j|0)){continue}break}}if(!q){break b}a=a<<3;g=g-C[a+b>>3]*C[a+e>>3]}C[(k<<3)+c>>3]=M(i*i+g*g);k=k+1|0;if((m|0)!=(k|0)){continue}break}}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=e;x[d+16>>2]=k;x[Ca>>2]=x[Ca>>2]+20}function Fj(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+12>>2];d=x[b+16>>2];g=x[b+20>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){g=x[12204];if(x[a+72>>2]<=0){Cj(a)}x[12204]=x[a+136>>2];c=ya-32|0;ya=c;b=a;a=x[a+4>>2];d=x[b+8>>2];e=(a|0)==(d|0)}a:{b:{c:{if(!Ba){d:{if(e){break d}d=d-a|0;a=Dj(c+28|0,a,d);e=(a|0)==-1;if(e){break d}a=!a+(a+x[b+4>>2]|0)|0;x[b+4>>2]=a;break c}x[c+16>>2]=0;x[c+20>>2]=0;a=0}while(1){if(!Ba){e=a;a=x[b+4>>2];d=(a|0)!=x[b+8>>2]}e:{if(!(d?Ba:1)){d=a+1|0;x[b+4>>2]=d;a=y[a|0];v[c+15|0]=a;break e}if(!Ba|!h){f=Cf(b);if((Ba|0)==1){break a}a=f}if(!Ba){v[c+15|0]=a;a=(a|0)>=0;if(a){break e}a=-1;if(!(e&1)){break b}x[b>>2]=x[b>>2]|32;x[12163]=25;break b}}if(!Ba){a=1;d=Ej(c+28|0,c+15|0,1,c+16|0);if((d|0)==-2){continue}}break}if(!Ba){a=-1;if((d|0)!=-1){break c}if(!(e&1)){break b}x[b>>2]=x[b>>2]|32;e=y[c+15|0]}if(!Ba|(h|0)==1){Aj(e,b);i=1;if((Ba|0)==1){break a}}if(!Ba){break b}}a=Ba?a:x[c+28>>2]}if(!Ba){ya=c+32|0;x[12204]=g;return a}p()}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=e;x[f+16>>2]=d;x[f+20>>2]=g;x[Ca>>2]=x[Ca>>2]+24;return 0}function Tm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];g=x[b+16>>2];h=x[b+20>>2];i=x[b+24>>2];j=x[b+28>>2];m=x[b+32>>2];n=x[b+36>>2];k=x[b+40>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;l=x[x[Ca>>2]>>2]}if(!Ba){a=ya-256|0;ya=a;v[a+252|0]=0;v[a+253|0]=0;v[a+254|0]=0;v[a+255|0]=0;v[a+249|0]=0;v[a+250|0]=0;v[a+251|0]=0;v[a+252|0]=0;v[a+248|0]=37;vm(a+249|0,5586,0,x[c+4>>2]);g=Ol();x[a>>2]=e;x[a+4>>2]=f;e=a+224|0;i=e;j=a+248|0;h=e}a:{if(!Ba|!l){e=wm(h,24,g,j,a);f=0;if((Ba|0)==1){break a}g=e}if(!Ba){e=a+224|0;g=e+g|0;i=xm(i,g,c);k=a+20|0;vj(k,c);j=a+32|0;m=a+28|0;n=a+24|0;h=e}if(!Ba|(l|0)==1){Pm(h,i,g,j,m,n,k);f=1;if((Ba|0)==1){break a}}g=Ba?g:a+20|0;if(!Ba|(l|0)==2){Po(g);f=2;if((Ba|0)==1){break a}}if(!Ba){i=x[a+28>>2];h=x[a+24>>2];g=a+32|0}if(!Ba|(l|0)==3){e=Qm(b,g,i,h,c,d);f=3;if((Ba|0)==1){break a}c=e}if(!Ba){ya=a+256|0;return c|0}p()}x[x[Ca>>2]>>2]=f;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=g;x[e+20>>2]=h;x[e+24>>2]=i;x[e+28>>2]=j;x[e+32>>2]=m;x[e+36>>2]=n;x[e+40>>2]=k;x[Ca>>2]=x[Ca>>2]+44;return 0}function Rm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];g=x[b+16>>2];h=x[b+20>>2];i=x[b+24>>2];j=x[b+28>>2];m=x[b+32>>2];n=x[b+36>>2];k=x[b+40>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;l=x[x[Ca>>2]>>2]}if(!Ba){a=ya-256|0;ya=a;v[a+252|0]=0;v[a+253|0]=0;v[a+254|0]=0;v[a+255|0]=0;v[a+249|0]=0;v[a+250|0]=0;v[a+251|0]=0;v[a+252|0]=0;v[a+248|0]=37;vm(a+249|0,5586,1,x[c+4>>2]);g=Ol();x[a>>2]=e;x[a+4>>2]=f;e=a+224|0;i=e;j=a+248|0;h=e}a:{if(!Ba|!l){e=wm(h,24,g,j,a);f=0;if((Ba|0)==1){break a}g=e}if(!Ba){e=a+224|0;g=e+g|0;i=xm(i,g,c);k=a+20|0;vj(k,c);j=a+32|0;m=a+28|0;n=a+24|0;h=e}if(!Ba|(l|0)==1){Pm(h,i,g,j,m,n,k);f=1;if((Ba|0)==1){break a}}g=Ba?g:a+20|0;if(!Ba|(l|0)==2){Po(g);f=2;if((Ba|0)==1){break a}}if(!Ba){i=x[a+28>>2];h=x[a+24>>2];g=a+32|0}if(!Ba|(l|0)==3){e=Qm(b,g,i,h,c,d);f=3;if((Ba|0)==1){break a}c=e}if(!Ba){ya=a+256|0;return c|0}p()}x[x[Ca>>2]>>2]=f;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=g;x[e+20>>2]=h;x[e+24>>2]=i;x[e+28>>2]=j;x[e+32>>2]=m;x[e+36>>2]=n;x[e+40>>2]=k;x[Ca>>2]=x[Ca>>2]+44;return 0}function Cm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];g=x[b+16>>2];h=x[b+20>>2];i=x[b+24>>2];j=x[b+28>>2];m=x[b+32>>2];n=x[b+36>>2];k=x[b+40>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;l=x[x[Ca>>2]>>2]}if(!Ba){a=ya-112|0;ya=a;v[a+108|0]=0;v[a+109|0]=0;v[a+110|0]=0;v[a+111|0]=0;v[a+105|0]=0;v[a+106|0]=0;v[a+107|0]=0;v[a+108|0]=0;v[a+104|0]=37;vm(a+105|0,5586,0,x[c+4>>2]);g=Ol();x[a>>2]=e;x[a+4>>2]=f;e=a+80|0;i=e;j=a+104|0;h=e}a:{if(!Ba|!l){e=wm(h,24,g,j,a);f=0;if((Ba|0)==1){break a}g=e}if(!Ba){e=a+80|0;g=e+g|0;i=xm(i,g,c);k=a+20|0;vj(k,c);j=a+32|0;m=a+28|0;n=a+24|0;h=e}if(!Ba|(l|0)==1){ym(h,i,g,j,m,n,k);f=1;if((Ba|0)==1){break a}}g=Ba?g:a+20|0;if(!Ba|(l|0)==2){Po(g);f=2;if((Ba|0)==1){break a}}if(!Ba){i=x[a+28>>2];h=x[a+24>>2];g=a+32|0}if(!Ba|(l|0)==3){e=zm(b,g,i,h,c,d);f=3;if((Ba|0)==1){break a}c=e}if(!Ba){ya=a+112|0;return c|0}p()}x[x[Ca>>2]>>2]=f;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=g;x[e+20>>2]=h;x[e+24>>2]=i;x[e+28>>2]=j;x[e+32>>2]=m;x[e+36>>2]=n;x[e+40>>2]=k;x[Ca>>2]=x[Ca>>2]+44;return 0}function Am(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];g=x[b+16>>2];h=x[b+20>>2];i=x[b+24>>2];j=x[b+28>>2];m=x[b+32>>2];n=x[b+36>>2];k=x[b+40>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;l=x[x[Ca>>2]>>2]}if(!Ba){a=ya-112|0;ya=a;v[a+108|0]=0;v[a+109|0]=0;v[a+110|0]=0;v[a+111|0]=0;v[a+105|0]=0;v[a+106|0]=0;v[a+107|0]=0;v[a+108|0]=0;v[a+104|0]=37;vm(a+105|0,5586,1,x[c+4>>2]);g=Ol();x[a>>2]=e;x[a+4>>2]=f;e=a+80|0;i=e;j=a+104|0;h=e}a:{if(!Ba|!l){e=wm(h,24,g,j,a);f=0;if((Ba|0)==1){break a}g=e}if(!Ba){e=a+80|0;g=e+g|0;i=xm(i,g,c);k=a+20|0;vj(k,c);j=a+32|0;m=a+28|0;n=a+24|0;h=e}if(!Ba|(l|0)==1){ym(h,i,g,j,m,n,k);f=1;if((Ba|0)==1){break a}}g=Ba?g:a+20|0;if(!Ba|(l|0)==2){Po(g);f=2;if((Ba|0)==1){break a}}if(!Ba){i=x[a+28>>2];h=x[a+24>>2];g=a+32|0}if(!Ba|(l|0)==3){e=zm(b,g,i,h,c,d);f=3;if((Ba|0)==1){break a}c=e}if(!Ba){ya=a+112|0;return c|0}p()}x[x[Ca>>2]>>2]=f;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=g;x[e+20>>2]=h;x[e+24>>2]=i;x[e+28>>2]=j;x[e+32>>2]=m;x[e+36>>2]=n;x[e+40>>2]=k;x[Ca>>2]=x[Ca>>2]+44;return 0}function pk(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;c=x[Ca>>2];a=x[c>>2];g=x[c+4>>2];d=x[c+12>>2];b=x[c+16>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;k=x[x[Ca>>2]>>2]}a:{if(Ba){f=0}else{c=x[a+116>>2];h=c;e=x[a+112>>2];i=(c|e)!=0;g=x[a+4>>2];c=x[a+44>>2];b=g-c|0;f=b;d=b+x[a+120>>2]|0;b=x[a+124>>2]+(b>>31)|0;b=d>>>0>>0?b+1|0:b;f=!(((h|0)<=(b|0)&d>>>0>=e>>>0|(b|0)>(h|0))&i)}b:{if(f|(Ba|0)==2){if(!Ba|!k){e=Cf(a);if((Ba|0)==1){break a}c=e}if(!Ba){if((c|0)>=0){break b}g=x[a+4>>2];c=x[a+44>>2]}}if(!Ba){x[a+112>>2]=-1;x[a+116>>2]=-1;x[a+104>>2]=g;c=c-g|0;d=c+d|0;b=(c>>31)+b|0;x[a+120>>2]=d;x[a+124>>2]=c>>>0>d>>>0?b+1|0:b;return-1}}if(!Ba){d=d+1|0;e=d?b:b+1|0;j=x[a+4>>2];g=x[a+8>>2];b=x[a+116>>2];i=b;h=x[a+112>>2];c:{if(!(b|h)){break c}f=g-j|0;k=f;b=h-d|0;i=i-(e+(d>>>0>h>>>0)|0)|0;f=f>>31;if(k>>>0<=b>>>0&(i|0)>=(f|0)|(f|0)<(i|0)){break c}g=b+j|0}x[a+104>>2]=g;f=d;d=x[a+44>>2];b=d-j|0;f=f+b|0;e=(b>>31)+e|0;x[a+120>>2]=f;x[a+124>>2]=b>>>0>f>>>0?e+1|0:e;if(d>>>0>=j>>>0){v[j-1|0]=c}return c}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=g;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=b;x[Ca>>2]=x[Ca>>2]+20;return 0}function yf(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0;f=Ba;a:{c=vf(a);if((Ba|0)!=(f|0)){p()}g=c&2047;e=g;c=vf(5551115123125783e-32);if((Ba|0)!=(f|0)){p()}e=e-c|0;d=vf(512);if((Ba|0)!=(f|0)){p()}b:{if(d-c>>>0<=e>>>0){if(c>>>0>g>>>0){return a+1}o(+a);c=j(1)|0;e=j(0)|0;d=vf(1024);if((Ba|0)!=(f|0)){p()}c:{if(d>>>0>g>>>0){break c}b=0;if(!e&(c|0)==-1048576){break b}d=vf(Infinity);if((Ba|0)!=(f|0)){p()}if(d>>>0<=g>>>0){return a+1}if((c|0)>0|(c|0)>=0){a=tf(0);break a}if(c>>>0<3230714880){break c}a=sf(0);break a}c=c<<1|e>>>31;g=!(e<<1)&(c|0)==-2129002496|c>>>0<2165964800?g:0}b=C[2532];i=b+a;a=a-(i-b);b=a*a;h=b*b*(a*C[2537]+C[2536]);b=b*(a*C[2535]+C[2534]);a=a*C[2533];o(+i);j(1)|0;c=j(0)|0;d=c<<4&2032;a=h+(b+(a+C[d+20304>>3]));d=d+20312|0;e=0+x[d>>2]|0;d=x[d+4>>2]+(c<<13)|0;d=e>>>0>>0?d+1|0:d;if(!g){d:{if(!(c&-2147483648)){l(0,e|0);l(1,d+-1048576|0);b=+n();a=b*a+b;a=a+a;break d}l(0,e|0);l(1,d+1071644672|0);b=+n();i=b*a;a=i+b;if(a<1){h=wf();if((Ba|0)!=(f|0)){p()}xf(h*22250738585072014e-324);if((Ba|0)!=(f|0)){p()}h=a+1;a=h+(i+(b-a)+(a+(1-h)))+-1;a=a==0?0:a}a=a*22250738585072014e-324}return a}l(0,e|0);l(1,d|0);b=+n();b=b*a+b}return b}if((Ba|0)!=(f|0)){p()}return a}function pe(a,b,c,d){a=a|0;b=b|0;c=+c;d=+d;var e=0,f=0,g=0,h=0,i=0,k=0,m=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];e=x[b+12>>2];f=x[b+8>>2];l(0,f|0);l(1,e|0);c=+n();e=x[b+20>>2];f=x[b+16>>2];l(0,f|0);l(1,e|0);d=+n();h=x[b+24>>2];i=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){a=x[x[12945]-12>>2]+51780|0;i=x[a+8>>2];x[a+8>>2]=10}a:{if(!Ba|!g){e=Ib(51780,12087,12);f=0;if((Ba|0)==1){break a}a=e}if(!Ba){h=gg(b)}if(!Ba|(g|0)==1){e=Ib(a,b,h);f=1;if((Ba|0)==1){break a}a=e}if(!Ba|(g|0)==2){e=Ib(a,10801,3);f=2;if((Ba|0)==1){break a}a=e}if(!Ba|(g|0)==3){e=Rh(a,c);f=3;if((Ba|0)==1){break a}a=e}if(!Ba|(g|0)==4){e=Ib(a,12144,2);f=4;if((Ba|0)==1){break a}a=e}if(!Ba|(g|0)==5){e=Rh(a,d);f=5;if((Ba|0)==1){break a}a=e}if(!Ba|(g|0)==6){e=Ib(a,10789,1);f=6;if((Ba|0)==1){break a}a=e}if(!Ba|(g|0)==7){Ib(a,12218,1);f=7;if((Ba|0)==1){break a}}if(!Ba){x[(x[x[12945]-12>>2]+51780|0)+8>>2]=i}return}x[x[Ca>>2]>>2]=f;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;o(+c);a=j(1)|0;k=e,m=j(0)|0,x[k+8>>2]=m;x[e+12>>2]=a;o(+d);a=j(1)|0;k=e,m=j(0)|0,x[k+16>>2]=m;x[e+20>>2]=a;x[e+24>>2]=h;x[e+28>>2]=i;x[Ca>>2]=x[Ca>>2]+32}function Sm(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];g=x[b+20>>2];h=x[b+24>>2];i=x[b+28>>2];l=x[b+32>>2];m=x[b+36>>2];j=x[b+40>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;k=x[x[Ca>>2]>>2]}if(!Ba){a=ya-144|0;ya=a;v[a+140|0]=0;v[a+141|0]=0;v[a+142|0]=0;v[a+143|0]=0;v[a+137|0]=0;v[a+138|0]=0;v[a+139|0]=0;v[a+140|0]=0;v[a+136|0]=37;vm(a+137|0,5870,0,x[c+4>>2]);g=Ol();x[a>>2]=e;e=a+123|0;h=e;i=a+136|0}a:{if(!Ba|!k){f=wm(h,13,g,i,a);if((Ba|0)==1){break a}g=f}if(!Ba){h=a+123|0;g=h+g|0;e=xm(e,g,c);j=a+4|0;vj(j,c);i=a+16|0;l=a+12|0;m=a+8|0}if(!Ba|(k|0)==1){Pm(h,e,g,i,l,m,j);n=1;if((Ba|0)==1){break a}}e=Ba?e:a+4|0;if(!Ba|(k|0)==2){Po(e);n=2;if((Ba|0)==1){break a}}if(!Ba){g=x[a+12>>2];h=x[a+8>>2];e=a+16|0}if(!Ba|(k|0)==3){f=Qm(b,e,g,h,c,d);n=3;if((Ba|0)==1){break a}c=f}if(!Ba){ya=a+144|0;return c|0}p()}x[x[Ca>>2]>>2]=n;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[f+24>>2]=h;x[f+28>>2]=i;x[f+32>>2]=l;x[f+36>>2]=m;x[f+40>>2]=j;x[Ca>>2]=x[Ca>>2]+44;return 0}function Om(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];g=x[b+20>>2];h=x[b+24>>2];i=x[b+28>>2];l=x[b+32>>2];m=x[b+36>>2];j=x[b+40>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;k=x[x[Ca>>2]>>2]}if(!Ba){a=ya-144|0;ya=a;v[a+140|0]=0;v[a+141|0]=0;v[a+142|0]=0;v[a+143|0]=0;v[a+137|0]=0;v[a+138|0]=0;v[a+139|0]=0;v[a+140|0]=0;v[a+136|0]=37;vm(a+137|0,5870,1,x[c+4>>2]);g=Ol();x[a>>2]=e;e=a+123|0;h=e;i=a+136|0}a:{if(!Ba|!k){f=wm(h,13,g,i,a);if((Ba|0)==1){break a}g=f}if(!Ba){h=a+123|0;g=h+g|0;e=xm(e,g,c);j=a+4|0;vj(j,c);i=a+16|0;l=a+12|0;m=a+8|0}if(!Ba|(k|0)==1){Pm(h,e,g,i,l,m,j);n=1;if((Ba|0)==1){break a}}e=Ba?e:a+4|0;if(!Ba|(k|0)==2){Po(e);n=2;if((Ba|0)==1){break a}}if(!Ba){g=x[a+12>>2];h=x[a+8>>2];e=a+16|0}if(!Ba|(k|0)==3){f=Qm(b,e,g,h,c,d);n=3;if((Ba|0)==1){break a}c=f}if(!Ba){ya=a+144|0;return c|0}p()}x[x[Ca>>2]>>2]=n;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[f+24>>2]=h;x[f+28>>2]=i;x[f+32>>2]=l;x[f+36>>2]=m;x[f+40>>2]=j;x[Ca>>2]=x[Ca>>2]+44;return 0}function Qm(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];h=x[b+24>>2];i=x[b+28>>2];j=x[b+32>>2];k=x[b+36>>2];l=x[b+40>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;m=x[x[Ca>>2]>>2]}if(!Ba){k=ya-16|0;ya=k;i=!a}a:{b:{if(!Ba){if(i){break b}l=c-b>>2;j=(l|0)>0;i=x[e+12>>2]}if((Ba|0)==2|j){if(!Ba|!m){g=Uh(a,b,l);if((Ba|0)==1){break a}j=g}if(!Ba&(j|0)!=(l|0)){break b}}if(!Ba){b=d-b>>2;b=(b|0)<(i|0)?i-b|0:0;h=(b|0)>0}if((Ba|0)==2|h){h=Ba?h:k+4|0;if(!Ba|(m|0)==1){g=Ym(h,b,f);n=1;if((Ba|0)==1){break a}h=g}if(!Ba){f=ri(h)}if(!Ba|(m|0)==2){g=Uh(a,f,b);n=2;if((Ba|0)==1){break a}i=g}if(!Ba){lr(h);h=0;b=(b|0)!=(i|0);if(b){break b}}}if(Ba){g=d}else{b=d-c>>2;g=(b|0)>0}if(g|(Ba|0)==2){h=Ba?h:0;if(!Ba|(m|0)==3){g=Uh(a,c,b);n=3;if((Ba|0)==1){break a}c=g}if(!Ba&(b|0)!=(c|0)){break b}}if(!Ba){Km(e);h=a}}if(!Ba){ya=k+16|0;return h}p()}x[x[Ca>>2]>>2]=n;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[g+28>>2]=i;x[g+32>>2]=j;x[g+36>>2]=k;x[g+40>>2]=l;x[Ca>>2]=x[Ca>>2]+44;return 0}function zm(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];h=x[b+24>>2];i=x[b+28>>2];j=x[b+32>>2];k=x[b+36>>2];l=x[b+40>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;m=x[x[Ca>>2]>>2]}if(!Ba){k=ya-16|0;ya=k;i=!a}a:{b:{if(!Ba){if(i){break b}l=c-b|0;j=(l|0)>0;i=x[e+12>>2]}if((Ba|0)==2|j){if(!Ba|!m){g=Uh(a,b,l);if((Ba|0)==1){break a}j=g}if(!Ba&(j|0)!=(l|0)){break b}}if(!Ba){b=d-b|0;b=(b|0)<(i|0)?i-b|0:0;h=(b|0)>0}if((Ba|0)==2|h){h=Ba?h:k+4|0;if(!Ba|(m|0)==1){g=Jm(h,b,f);n=1;if((Ba|0)==1){break a}h=g}if(!Ba){f=ri(h)}if(!Ba|(m|0)==2){g=Uh(a,f,b);n=2;if((Ba|0)==1){break a}i=g}if(!Ba){hr(h);h=0;b=(b|0)!=(i|0);if(b){break b}}}if(Ba){g=d}else{b=d-c|0;g=(b|0)>0}if(g|(Ba|0)==2){h=Ba?h:0;if(!Ba|(m|0)==3){g=Uh(a,c,b);n=3;if((Ba|0)==1){break a}c=g}if(!Ba&(b|0)!=(c|0)){break b}}if(!Ba){Km(e);h=a}}if(!Ba){ya=k+16|0;return h}p()}x[x[Ca>>2]>>2]=n;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[g+28>>2]=i;x[g+32>>2]=j;x[g+36>>2]=k;x[g+40>>2]=l;x[Ca>>2]=x[Ca>>2]+44;return 0}function fm(a,b,c,d,e,f,g,h,i,j,k,l){var m=0,n=0;m=Ba;n=ya-16|0;ya=n;x[n+12>>2]=a;a:{b:{if((a|0)==(f|0)){if(!y[b|0]){break b}a=0;v[b|0]=0;b=x[e>>2];x[e>>2]=b+1;v[b|0]=46;b=ui(h);if((Ba|0)!=(m|0)){p()}if(!b){break a}b=x[j>>2];if((b-i|0)>159){break a}c=x[k>>2];x[j>>2]=b+4;x[b>>2]=c;break a}c:{if((a|0)!=(g|0)){break c}a=ui(h);if((Ba|0)!=(m|0)){p()}if(!a){break c}if(!y[b|0]){break b}a=0;b=x[j>>2];if((b-i|0)>159){break a}a=x[k>>2];x[j>>2]=b+4;x[b>>2]=a;a=0;x[k>>2]=0;break a}a=-1;f=km(l,l+128|0,n+12|0);if((Ba|0)!=(m|0)){p()}l=f-l|0;g=l>>2;if((g|0)>31){break a}f=v[g+39344|0];d:{e:{a=l&-5;if((a|0)!=88){if((a|0)!=96){break e}a=d;d=x[e>>2];if((a|0)!=(d|0)){a=-1;b=Mk(v[d-1|0]);if((Ba|0)!=(m|0)){p()}c=Mk(v[c|0]);if((Ba|0)!=(m|0)){p()}if((b|0)!=(c|0)){break a}}x[e>>2]=d+1;v[d|0]=f;a=0;break a}v[c|0]=80;break d}a=Mk(f);if((Ba|0)!=(m|0)){p()}if((a|0)!=v[c|0]){break d}a=Nk(a);if((Ba|0)!=(m|0)){p()}v[c|0]=a;if(!y[b|0]){break d}v[b|0]=0;a=ui(h);if((Ba|0)!=(m|0)){p()}if(!a){break d}a=x[j>>2];if((a-i|0)>159){break d}b=x[k>>2];x[j>>2]=a+4;x[a>>2]=b}a=x[e>>2];x[e>>2]=a+1;v[a|0]=f;a=0;if((g|0)>21){break a}x[k>>2]=x[k>>2]+1;break a}a=-1}ya=n+16|0;return a}function um(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];g=x[b+20>>2];h=x[b+24>>2];i=x[b+28>>2];l=x[b+32>>2];m=x[b+36>>2];j=x[b+40>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;k=x[x[Ca>>2]>>2]}if(!Ba){a=ya+-64|0;ya=a;v[a+60|0]=0;v[a+61|0]=0;v[a+62|0]=0;v[a+63|0]=0;v[a+57|0]=0;v[a+58|0]=0;v[a+59|0]=0;v[a+60|0]=0;v[a+56|0]=37;vm(a+57|0,5870,1,x[c+4>>2]);g=Ol();x[a>>2]=e;e=a+43|0;h=e;i=a+56|0}a:{if(!Ba|!k){f=wm(h,13,g,i,a);if((Ba|0)==1){break a}g=f}if(!Ba){h=a+43|0;g=h+g|0;e=xm(e,g,c);j=a+4|0;vj(j,c);i=a+16|0;l=a+12|0;m=a+8|0}if(!Ba|(k|0)==1){ym(h,e,g,i,l,m,j);n=1;if((Ba|0)==1){break a}}e=Ba?e:a+4|0;if(!Ba|(k|0)==2){Po(e);n=2;if((Ba|0)==1){break a}}if(!Ba){g=x[a+12>>2];h=x[a+8>>2];e=a+16|0}if(!Ba|(k|0)==3){f=zm(b,e,g,h,c,d);n=3;if((Ba|0)==1){break a}c=f}if(!Ba){ya=a- -64|0;return c|0}p()}x[x[Ca>>2]>>2]=n;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[f+24>>2]=h;x[f+28>>2]=i;x[f+32>>2]=l;x[f+36>>2]=m;x[f+40>>2]=j;x[Ca>>2]=x[Ca>>2]+44;return 0}function Bm(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];g=x[b+20>>2];h=x[b+24>>2];i=x[b+28>>2];l=x[b+32>>2];m=x[b+36>>2];j=x[b+40>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;k=x[x[Ca>>2]>>2]}if(!Ba){a=ya+-64|0;ya=a;v[a+60|0]=0;v[a+61|0]=0;v[a+62|0]=0;v[a+63|0]=0;v[a+57|0]=0;v[a+58|0]=0;v[a+59|0]=0;v[a+60|0]=0;v[a+56|0]=37;vm(a+57|0,5870,0,x[c+4>>2]);g=Ol();x[a>>2]=e;e=a+43|0;h=e;i=a+56|0}a:{if(!Ba|!k){f=wm(h,13,g,i,a);if((Ba|0)==1){break a}g=f}if(!Ba){h=a+43|0;g=h+g|0;e=xm(e,g,c);j=a+4|0;vj(j,c);i=a+16|0;l=a+12|0;m=a+8|0}if(!Ba|(k|0)==1){ym(h,e,g,i,l,m,j);n=1;if((Ba|0)==1){break a}}e=Ba?e:a+4|0;if(!Ba|(k|0)==2){Po(e);n=2;if((Ba|0)==1){break a}}if(!Ba){g=x[a+12>>2];h=x[a+8>>2];e=a+16|0}if(!Ba|(k|0)==3){f=zm(b,e,g,h,c,d);n=3;if((Ba|0)==1){break a}c=f}if(!Ba){ya=a- -64|0;return c|0}p()}x[x[Ca>>2]>>2]=n;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[f+24>>2]=h;x[f+28>>2]=i;x[f+32>>2]=l;x[f+36>>2]=m;x[f+40>>2]=j;x[Ca>>2]=x[Ca>>2]+44;return 0}function Gl(a,b,c,d,e,f,g,h,i,j,k,l){var m=0,n=0;m=Ba;n=ya-16|0;ya=n;v[n+15|0]=a;a:{b:{if((a|0)==(f|0)){if(!y[b|0]){break b}a=0;v[b|0]=0;b=x[e>>2];x[e>>2]=b+1;v[b|0]=46;b=ui(h);if((Ba|0)!=(m|0)){p()}if(!b){break a}b=x[j>>2];if((b-i|0)>159){break a}c=x[k>>2];x[j>>2]=b+4;x[b>>2]=c;break a}c:{if((a|0)!=(g|0)){break c}a=ui(h);if((Ba|0)!=(m|0)){p()}if(!a){break c}if(!y[b|0]){break b}a=0;b=x[j>>2];if((b-i|0)>159){break a}a=x[k>>2];x[j>>2]=b+4;x[b>>2]=a;a=0;x[k>>2]=0;break a}a=-1;f=Ql(l,l+32|0,n+15|0);if((Ba|0)!=(m|0)){p()}f=f-l|0;if((f|0)>31){break a}g=v[f+39344|0];d:{e:{switch((f&-2)-22|0){case 2:b=d;d=x[e>>2];if((b|0)!=(d|0)){b=Mk(v[d-1|0]);if((Ba|0)!=(m|0)){p()}c=Mk(v[c|0]);if((Ba|0)!=(m|0)){p()}if((b|0)!=(c|0)){break a}}x[e>>2]=d+1;v[d|0]=g;a=0;break a;case 0:v[c|0]=80;break d;default:break e}}a=Mk(g);if((Ba|0)!=(m|0)){p()}if((a|0)!=v[c|0]){break d}a=Nk(a);if((Ba|0)!=(m|0)){p()}v[c|0]=a;if(!y[b|0]){break d}v[b|0]=0;a=ui(h);if((Ba|0)!=(m|0)){p()}if(!a){break d}a=x[j>>2];if((a-i|0)>159){break d}b=x[k>>2];x[j>>2]=a+4;x[a>>2]=b}a=x[e>>2];x[e>>2]=a+1;v[a|0]=g;a=0;if((f|0)>21){break a}x[k>>2]=x[k>>2]+1;break a}a=-1}ya=n+16|0;return a}function og(a,b,c,d){var e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;d=x[Ca>>2];a=x[d>>2];c=x[d+4>>2];d=x[d+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}a:{b:{c:{d:{e:{if(!Ba){f:{g:{h:{i:{j:{k:{l:{switch(b-9|0){case 1:case 4:case 14:break c;case 2:case 5:case 11:case 15:break b;case 3:case 10:case 12:case 13:break a;case 9:break h;case 8:break i;case 7:break j;case 6:break k;case 0:break l;case 17:break f;case 16:break g;default:break e}}b=x[c>>2];x[c>>2]=b+4;x[a>>2]=x[b>>2];return}b=x[c>>2];x[c>>2]=b+4;b=w[b>>1];x[a>>2]=b;x[a+4>>2]=b>>31;return}b=x[c>>2];x[c>>2]=b+4;x[a>>2]=z[b>>1];x[a+4>>2]=0;return}b=x[c>>2];x[c>>2]=b+4;b=v[b|0];x[a>>2]=b;x[a+4>>2]=b>>31;return}b=x[c>>2];x[c>>2]=b+4;x[a>>2]=y[b|0];x[a+4>>2]=0;return}b=x[c>>2]+7&-8;x[c>>2]=b+8;C[a>>3]=C[b>>3];return}}if(!Ba|!e){Ea[d|0](a,c);if((Ba|0)==1){break d}}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;b=x[Ca>>2];x[b>>2]=a;x[b+4>>2]=c;x[b+8>>2]=d;x[Ca>>2]=x[Ca>>2]+12;return}b=x[c>>2];x[c>>2]=b+4;b=x[b>>2];x[a>>2]=b;x[a+4>>2]=b>>31;return}b=x[c>>2];x[c>>2]=b+4;x[a>>2]=x[b>>2];x[a+4>>2]=0;return}b=x[c>>2]+7&-8;x[c>>2]=b+8;c=x[b+4>>2];x[a>>2]=x[b>>2];x[a+4>>2]=c}function fb(a,b,c){a=a|0;b=b|0;c=+c;var d=0,e=0,f=0,g=0,h=0,i=0,k=0,m=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;f=x[Ca>>2];a=x[f>>2];d=x[f+12>>2];b=x[f+8>>2];l(0,b|0);l(1,d|0);c=+n();e=x[f+16>>2];g=x[f+20>>2];h=x[f+24>>2];b=x[f+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){a=ya-32|0;ya=a;g=gg(b);e=g>>>0<2147483632}a:{d=(Ba|0)==2;if(d|e){e=Ba?e:g>>>0>=11;b:{c:{if(d|e){if(!Ba){e=g|15;h=e+1|0}if(!Ba|!i){d=dr(h);f=0;if((Ba|0)==1){break a}e=d}if(!Ba){x[a+20>>2]=h|-2147483648;x[a+12>>2]=e;x[a+16>>2]=g;break c}}if(!Ba){v[a+23|0]=g;e=a+12|0;if(!g){break b}}}if(!Ba){lf(e,b,g)}}if(!Ba){v[e+g|0]=0;i=v[a+23|0];f=(i|0)<0;e=f?x[a+16>>2]:i&255;d=yg(e+4|0);x[d>>2]=e;b=x[a+12>>2];lf(d+4|0,f?b:a+12|0,e);x[a+24>>2]=d;h=a+24|0;e=Q(12584,h|0)|0;C[a+24>>3]=c;d=Q(46716,h|0)|0;x[a>>2]=e;x[a+4>>2]=d;Y(48264,12592,a|0)|0;if(d){P(d|0)}if(e){P(e|0)}if((i|0)<0){zg(b)}ya=a+32|0;return}}if(!Ba|(i|0)==1){eb();f=1;if((Ba|0)==1){break a}}if(!Ba){p()}return}x[x[Ca>>2]>>2]=f;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;o(+c);a=j(1)|0;k=d,m=j(0)|0,x[k+8>>2]=m;x[d+12>>2]=a;x[d+16>>2]=e;x[d+20>>2]=g;x[d+24>>2]=h;x[Ca>>2]=x[Ca>>2]+28}function Ed(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;f=x[Ca>>2];a=x[f>>2];b=x[f+4>>2];c=x[f+8>>2];d=x[f+12>>2];g=x[f+16>>2];f=x[f+20>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}g=Ba?g:x[x[a>>2]+16>>2];a:{if(!Ba|!e){Ea[g|0](a);if((Ba|0)==1){break a}}if(!Ba){a=x[a+12>>2];l=x[a+4>>2];if((l|0)>0){g=x[a>>2];m=g&-2;n=g&1;o=g-1|0;q=x[a+8>>2];r=x[a+12>>2];while(1){b:{if((g|0)<=0){i=0;j=0;break b}k=f<<2;h=x[k+r>>2];i=0;a=0;e=0;if(o){while(1){p=a|1;i=+B[(p<<2)+b>>2]*C[h+(p<<3)>>3]+(+B[(a<<2)+b>>2]*C[h+(a<<3)>>3]+i);a=a+2|0;e=e+2|0;if((m|0)!=(e|0)){continue}break}}if(n){i=+B[(a<<2)+b>>2]*C[h+(a<<3)>>3]+i}h=x[k+q>>2];j=0;a=0;e=0;if(o){while(1){k=a|1;j=j-+B[(a<<2)+b>>2]*C[h+(a<<3)>>3]-+B[(k<<2)+b>>2]*C[h+(k<<3)>>3];a=a+2|0;e=e+2|0;if((m|0)!=(e|0)){continue}break}}if(!n){break b}j=j-+B[(a<<2)+b>>2]*C[h+(a<<3)>>3]}a=f<<2;B[a+c>>2]=i;B[a+d>>2]=j;f=f+1|0;if((l|0)!=(f|0)){continue}break}}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=g;x[e+20>>2]=f;x[Ca>>2]=x[Ca>>2]+24}function lf(a,b,c){var d=0,e=0,f=0;d=Ba;if(c>>>0>=512){la(a|0,b|0,c|0);if((Ba|0)!=(d|0)){p()}return a}d=a+c|0;a:{if(!((a^b)&3)){b:{if(!(a&3)){c=a;break b}if(!c){c=a;break b}c=a;while(1){v[c|0]=y[b|0];b=b+1|0;c=c+1|0;if(!(c&3)){break b}if(c>>>0>>0){continue}break}}e=d&-4;c:{if(e>>>0<64){break c}f=e+-64|0;if(f>>>0>>0){break c}while(1){x[c>>2]=x[b>>2];x[c+4>>2]=x[b+4>>2];x[c+8>>2]=x[b+8>>2];x[c+12>>2]=x[b+12>>2];x[c+16>>2]=x[b+16>>2];x[c+20>>2]=x[b+20>>2];x[c+24>>2]=x[b+24>>2];x[c+28>>2]=x[b+28>>2];x[c+32>>2]=x[b+32>>2];x[c+36>>2]=x[b+36>>2];x[c+40>>2]=x[b+40>>2];x[c+44>>2]=x[b+44>>2];x[c+48>>2]=x[b+48>>2];x[c+52>>2]=x[b+52>>2];x[c+56>>2]=x[b+56>>2];x[c+60>>2]=x[b+60>>2];b=b- -64|0;c=c- -64|0;if(f>>>0>=c>>>0){continue}break}}if(c>>>0>=e>>>0){break a}while(1){x[c>>2]=x[b>>2];b=b+4|0;c=c+4|0;if(e>>>0>c>>>0){continue}break}break a}if(d>>>0<4){c=a;break a}e=d-4|0;if(e>>>0>>0){c=a;break a}c=a;while(1){v[c|0]=y[b|0];v[c+1|0]=y[b+1|0];v[c+2|0]=y[b+2|0];v[c+3|0]=y[b+3|0];b=b+4|0;c=c+4|0;if(e>>>0>=c>>>0){continue}break}}if(c>>>0>>0){while(1){v[c|0]=y[b|0];b=b+1|0;c=c+1|0;if((d|0)!=(c|0)){continue}break}}return a}function Gb(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];c=x[e+8>>2];d=x[e+12>>2];g=x[e+16>>2];e=x[e+20>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;l=x[x[Ca>>2]>>2]}if(!Ba){f=x[b+4>>2];g=!f}a:{b:{if(!Ba){c:{if(g){g=b+4|0;c=g;break c}e=y[c+11|0];g=e<<24>>24<0;e=g?x[c+4>>2]:e;j=g?x[c>>2]:c;while(1){g=y[f+27|0];h=g<<24>>24<0;i=h?x[f+16>>2]:f+16|0;c=f;g=h?x[f+20>>2]:g;f=g>>>0>>0;h=f?g:e;k=Of(j,i,h);if(((k?(k|0)<0:e>>>0>>0)|0)==1){g=c;f=x[g>>2];if(f){continue}break c}g=0;i=Of(i,j,h);if(((i?(i|0)<0:f)|0)!=1){e=c;break b}f=x[c+4>>2];if(f){continue}break}g=c+4|0}}if(!Ba|!l){f=dr(32);if((Ba|0)==1){break a}e=f}if(!Ba){d=x[d>>2];f=x[d>>2];j=x[d+4>>2];x[e+16>>2]=f;x[e+20>>2]=j;f=d+8|0;x[e+24>>2]=x[f>>2];x[d>>2]=0;x[d+4>>2]=0;x[f>>2]=0;x[e+8>>2]=c;x[e>>2]=0;x[e+4>>2]=0;x[e+28>>2]=0;x[g>>2]=e;c=e;d=x[x[b>>2]>>2];if(d){x[b>>2]=d;c=x[g>>2]}ec(x[b+4>>2],c);x[b+8>>2]=x[b+8>>2]+1;g=1}}if(!Ba){v[a+4|0]=g;x[a>>2]=e}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=g;x[f+20>>2]=e;x[Ca>>2]=x[Ca>>2]+24}function uf(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0;f=Ba;a:{e=vf(a);if((Ba|0)!=(f|0)){p()}e=e&2047;d=vf(5551115123125783e-32);if((Ba|0)!=(f|0)){p()}c=e-d|0;i=vf(512);if((Ba|0)!=(f|0)){p()}b:{c:{if(i-d>>>0>c>>>0){i=e;break c}if(d>>>0>e>>>0){return a+1}i=0;d=vf(1024);if((Ba|0)!=(f|0)){p()}if(d>>>0>e>>>0){break c}o(+a);d=j(1)|0;b=0;if(!(j(0)|0)&(d|0)==-1048576){break b}c=vf(Infinity);if((Ba|0)!=(f|0)){p()}if(c>>>0<=e>>>0){return a+1}if((d|0)<0){a=sf(0);break a}a=tf(0);break a}b=C[2525];h=C[2524]*a+b;b=h-b;a=b*C[2527]+(b*C[2526]+a);b=a*a;g=b*b*(a*C[2531]+C[2530]);b=b*(a*C[2529]+C[2528]);o(+h);j(1)|0;e=j(0)|0;c=e<<4&2032;a=g+(b+(C[c+20304>>3]+a));c=c+20312|0;d=0+x[c>>2]|0;c=x[c+4>>2]+(e<<13)|0;c=d>>>0>>0?c+1|0:c;if(!i){d:{if(!(e&-2147483648)){l(0,d|0);l(1,c-1058013184|0);b=+n();a=(b*a+b)*5486124068793689e288;break d}l(0,d|0);l(1,c+1071644672|0);b=+n();h=b*a;a=h+b;if(a<1){g=wf();if((Ba|0)!=(f|0)){p()}xf(g*22250738585072014e-324);if((Ba|0)!=(f|0)){p()}g=a+1;a=g+(h+(b-a)+(a+(1-g)))+-1;a=a==0?0:a}a=a*22250738585072014e-324}return a}l(0,d|0);l(1,c|0);b=+n();b=b*a+b}return b}if((Ba|0)!=(f|0)){p()}return a}function Rh(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0,m=0,q=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;c=x[Ca>>2];a=x[c>>2];d=x[c+12>>2];e=x[c+16>>2];g=x[c+20>>2];i=x[c+24>>2];k=x[c+28>>2];f=x[c+8>>2];c=x[c+4>>2];l(0,c|0);l(1,f|0);b=+n()}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){e=ya-16|0;ya=e;d=e+8|0}a:{if(!Ba|!h){c=Hh(d,a);f=0;if((Ba|0)==1){break a}d=c}d=Ba?d:!y[e+8|0];b:{if(!Ba){if(d){break b}d=e+4|0;i=x[x[a>>2]-12>>2]+a|0;vj(d,i)}if(!Ba|(h|0)==1){c=Jh(d);f=1;if((Ba|0)==1){break a}i=c}d=Ba?d:e+4|0;if(!Ba|(h|0)==2){Po(d);f=2;if((Ba|0)==1){break a}}if(!Ba){g=Kh(e,a);d=x[x[a>>2]-12>>2]+a|0}if(!Ba|(h|0)==3){c=Lh(d);f=3;if((Ba|0)==1){break a}k=c}g=Ba?g:x[g>>2];if(!Ba|(h|0)==4){c=Qh(i,g,d,k,b);f=4;if((Ba|0)==1){break a}d=c}if(!Ba){x[e+4>>2]=d;d=!Mh(e+4|0);if(d){break b}d=x[x[a>>2]-12>>2]+a|0;xh(d,5)}}d=Ba?d:e+8|0;if(!Ba|(h|0)==5){Ih(d);f=5;if((Ba|0)==1){break a}}if(!Ba){ya=e+16|0;return a}p()}x[x[Ca>>2]>>2]=f;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;o(+b);a=j(1)|0;m=c,q=j(0)|0,x[m+4>>2]=q;x[c+8>>2]=a;x[c+12>>2]=d;x[c+16>>2]=e;x[c+20>>2]=g;x[c+24>>2]=i;x[c+28>>2]=k;x[Ca>>2]=x[Ca>>2]+32;return 0}function Ph(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;c=x[Ca>>2];a=x[c>>2];d=x[c+12>>2];f=x[c+16>>2];g=x[c+20>>2];i=x[c+24>>2];k=x[c+28>>2];l=x[c+32>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){f=ya-16|0;ya=f;d=f+8|0}a:{if(!Ba|!h){e=Hh(d,a);if((Ba|0)==1){break a}d=e}d=Ba?d:!y[f+8|0];b:{if(!Ba){if(d){break b}d=f+4|0;g=x[x[a>>2]-12>>2]+a|0;vj(d,g)}if(!Ba|(h|0)==1){e=Jh(d);j=1;if((Ba|0)==1){break a}d=e}g=Ba?g:f+4|0;if(!Ba|(h|0)==2){Po(g);j=2;if((Ba|0)==1){break a}}if(!Ba){i=Kh(f,a);g=x[x[a>>2]-12>>2]+a|0}if(!Ba|(h|0)==3){e=Lh(g);j=3;if((Ba|0)==1){break a}k=e}if(!Ba){l=x[x[d>>2]+20>>2];i=x[i>>2]}if(!Ba|(h|0)==4){e=Ea[l|0](d,i,g,k,b,c)|0;j=4;if((Ba|0)==1){break a}d=e}if(!Ba){x[f+4>>2]=d;d=!Mh(f+4|0);if(d){break b}d=x[x[a>>2]-12>>2]+a|0;xh(d,5)}}d=Ba?d:f+8|0;if(!Ba|(h|0)==5){Ih(d);j=5;if((Ba|0)==1){break a}}if(!Ba){ya=f+16|0;return a}p()}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=f;x[e+20>>2]=g;x[e+24>>2]=i;x[e+28>>2]=k;x[e+32>>2]=l;x[Ca>>2]=x[Ca>>2]+36;return 0}function Fd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];c=x[e+8>>2];f=x[e+12>>2];e=x[e+16>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}f=Ba?f:x[x[a>>2]+16>>2];a:{if(!Ba|!d){Ea[f|0](a);if((Ba|0)==1){break a}}if(!Ba){a=x[a+12>>2];k=x[a+4>>2];if((k|0)>0){f=x[a>>2];l=f&-2;m=f&1;n=f-1|0;p=x[a+8>>2];q=x[a+12>>2];while(1){b:{if((f|0)<=0){h=0;i=0;break b}j=e<<2;g=x[j+q>>2];h=0;a=0;d=0;if(n){while(1){o=a|1;h=+B[(o<<2)+b>>2]*C[g+(o<<3)>>3]+(+B[(a<<2)+b>>2]*C[g+(a<<3)>>3]+h);a=a+2|0;d=d+2|0;if((l|0)!=(d|0)){continue}break}}if(m){h=+B[(a<<2)+b>>2]*C[g+(a<<3)>>3]+h}g=x[j+p>>2];i=0;a=0;d=0;if(n){while(1){j=a|1;i=i-+B[(a<<2)+b>>2]*C[g+(a<<3)>>3]-+B[(j<<2)+b>>2]*C[g+(j<<3)>>3];a=a+2|0;d=d+2|0;if((l|0)!=(d|0)){continue}break}}if(!m){break b}i=i-+B[(a<<2)+b>>2]*C[g+(a<<3)>>3]}a=(e<<3)+c|0;B[a>>2]=h;B[a+4>>2]=i;e=e+1|0;if((k|0)!=(e|0)){continue}break}}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=f;x[d+16>>2]=e;x[Ca>>2]=x[Ca>>2]+20}function Hd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];c=x[e+8>>2];f=x[e+12>>2];e=x[e+16>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}f=Ba?f:x[x[a>>2]+16>>2];a:{if(!Ba|!d){Ea[f|0](a);if((Ba|0)==1){break a}}if(!Ba){a=x[a+12>>2];k=x[a+4>>2];if((k|0)>0){f=x[a>>2];l=f&-2;m=f&1;n=f-1|0;p=x[a+8>>2];q=x[a+12>>2];while(1){b:{if((f|0)<=0){g=0;h=0;break b}j=e<<2;i=x[j+q>>2];g=0;a=0;d=0;if(n){while(1){o=a|1;g=+B[(o<<2)+b>>2]*C[i+(o<<3)>>3]+(+B[(a<<2)+b>>2]*C[i+(a<<3)>>3]+g);a=a+2|0;d=d+2|0;if((l|0)!=(d|0)){continue}break}}if(m){g=+B[(a<<2)+b>>2]*C[i+(a<<3)>>3]+g}i=x[j+p>>2];h=0;a=0;d=0;if(n){while(1){j=a|1;h=h-+B[(a<<2)+b>>2]*C[i+(a<<3)>>3]-+B[(j<<2)+b>>2]*C[i+(j<<3)>>3];a=a+2|0;d=d+2|0;if((l|0)!=(d|0)){continue}break}}if(!m){break b}h=h-+B[(a<<2)+b>>2]*C[i+(a<<3)>>3]}B[(e<<2)+c>>2]=M(g*g+h*h);e=e+1|0;if((k|0)!=(e|0)){continue}break}}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=f;x[d+16>>2]=e;x[Ca>>2]=x[Ca>>2]+20}function yn(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;h=x[Ca>>2];a=x[h>>2];b=x[h+4>>2];c=x[h+8>>2];d=x[h+12>>2];e=x[h+16>>2];f=x[h+20>>2];g=x[h+24>>2];j=x[h+28>>2];k=x[h+32>>2];l=x[h+36>>2];h=x[h+40>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){c=ya-128|0;ya=c;x[c+12>>2]=c+116;j=c+16|0;zn(a+8|0,j,c+12|0,e,f,g);a=ya-16|0;ya=a;e=ya-32|0;ya=e;Ti(e+24|0,j,x[c+12>>2]);k=e+16|0;l=x[e+28>>2];d=ya-16|0;ya=d;f=x[e+24>>2];x[d+8>>2]=f;x[d+12>>2]=b;g=a+8|0}a:{while(1){b=Ba?b:(f|0)!=(l|0);if(b|(Ba|0)==2){if(!Ba){h=v[f|0];b=d+12|0}if(!Ba|!i){Sh(b,h);if((Ba|0)==1){break a}}if(!Ba){f=f+1|0;x[d+8>>2]=f;continue}}break}if(!Ba){Xi(k,d+8|0,d+12|0);ya=d+16|0;m=e,n=Vi(j,x[e+16>>2]),x[m+12>>2]=n;x[e+8>>2]=x[e+20>>2];Xi(g,e+12|0,e+8|0);ya=e+32|0;ya=a+16|0;ya=c+128|0;return x[a+12>>2]}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;i=x[Ca>>2];x[i>>2]=a;x[i+4>>2]=b;x[i+8>>2]=c;x[i+12>>2]=d;x[i+16>>2]=e;x[i+20>>2]=f;x[i+24>>2]=g;x[i+28>>2]=j;x[i+32>>2]=k;x[i+36>>2]=l;x[i+40>>2]=h;x[Ca>>2]=x[Ca>>2]+44;return 0}function Oh(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];d=x[b+8>>2];e=x[b+12>>2];f=x[b+16>>2];h=x[b+20>>2];j=x[b+24>>2];k=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){e=ya-16|0;ya=e;d=e+8|0}a:{if(!Ba|!g){c=Hh(d,a);if((Ba|0)==1){break a}d=c}d=Ba?d:!y[e+8|0];b:{if(!Ba){if(d){break b}d=e+4|0;f=x[x[a>>2]-12>>2]+a|0;vj(d,f)}if(!Ba|(g|0)==1){c=Jh(d);i=1;if((Ba|0)==1){break a}d=c}f=Ba?f:e+4|0;if(!Ba|(g|0)==2){Po(f);i=2;if((Ba|0)==1){break a}}if(!Ba){h=Kh(e,a);f=x[x[a>>2]-12>>2]+a|0}if(!Ba|(g|0)==3){c=Lh(f);i=3;if((Ba|0)==1){break a}j=c}if(!Ba){k=x[x[d>>2]+24>>2];h=x[h>>2]}if(!Ba|(g|0)==4){c=Ea[k|0](d,h,f,j,b)|0;i=4;if((Ba|0)==1){break a}b=c}if(!Ba){x[e+4>>2]=b;b=!Mh(e+4|0);if(b){break b}b=x[x[a>>2]-12>>2]+a|0;xh(b,5)}}b=Ba?b:e+8|0;if(!Ba|(g|0)==5){Ih(b);i=5;if((Ba|0)==1){break a}}if(!Ba){ya=e+16|0;return a}p()}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=e;x[c+16>>2]=f;x[c+20>>2]=h;x[c+24>>2]=j;x[c+28>>2]=k;x[Ca>>2]=x[Ca>>2]+32;return 0}function Nh(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];d=x[b+8>>2];e=x[b+12>>2];f=x[b+16>>2];h=x[b+20>>2];j=x[b+24>>2];k=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){e=ya-16|0;ya=e;d=e+8|0}a:{if(!Ba|!g){c=Hh(d,a);if((Ba|0)==1){break a}d=c}d=Ba?d:!y[e+8|0];b:{if(!Ba){if(d){break b}d=e+4|0;f=x[x[a>>2]-12>>2]+a|0;vj(d,f)}if(!Ba|(g|0)==1){c=Jh(d);i=1;if((Ba|0)==1){break a}d=c}f=Ba?f:e+4|0;if(!Ba|(g|0)==2){Po(f);i=2;if((Ba|0)==1){break a}}if(!Ba){h=Kh(e,a);f=x[x[a>>2]-12>>2]+a|0}if(!Ba|(g|0)==3){c=Lh(f);i=3;if((Ba|0)==1){break a}j=c}if(!Ba){k=x[x[d>>2]+16>>2];h=x[h>>2]}if(!Ba|(g|0)==4){c=Ea[k|0](d,h,f,j,b)|0;i=4;if((Ba|0)==1){break a}b=c}if(!Ba){x[e+4>>2]=b;b=!Mh(e+4|0);if(b){break b}b=x[x[a>>2]-12>>2]+a|0;xh(b,5)}}b=Ba?b:e+8|0;if(!Ba|(g|0)==5){Ih(b);i=5;if((Ba|0)==1){break a}}if(!Ba){ya=e+16|0;return a}p()}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=e;x[c+16>>2]=f;x[c+20>>2]=h;x[c+24>>2]=j;x[c+28>>2]=k;x[Ca>>2]=x[Ca>>2]+32;return 0}function Vp(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){if(y[52832]){return x[13207]}if(!y[53352]){v[53352]=1}}a:{if(!Ba|!b){Xp(53184,45060);a=0;if((Ba|0)==1){break a}}if(!Ba|(b|0)==1){Xp(53196,45088);a=1;if((Ba|0)==1){break a}}if(!Ba|(b|0)==2){Xp(53208,45116);a=2;if((Ba|0)==1){break a}}if(!Ba|(b|0)==3){Xp(53220,45148);a=3;if((Ba|0)==1){break a}}if(!Ba|(b|0)==4){Xp(53232,45188);a=4;if((Ba|0)==1){break a}}if(!Ba|(b|0)==5){Xp(53244,45224);a=5;if((Ba|0)==1){break a}}if(!Ba|(b|0)==6){Xp(53256,45252);a=6;if((Ba|0)==1){break a}}if(!Ba|(b|0)==7){Xp(53268,45288);a=7;if((Ba|0)==1){break a}}if(!Ba|(b|0)==8){Xp(53280,45304);a=8;if((Ba|0)==1){break a}}if(!Ba|(b|0)==9){Xp(53292,45320);a=9;if((Ba|0)==1){break a}}if(!Ba|(b|0)==10){Xp(53304,45336);a=10;if((Ba|0)==1){break a}}if(!Ba|(b|0)==11){Xp(53316,45352);a=11;if((Ba|0)==1){break a}}if(!Ba|(b|0)==12){Xp(53328,45368);a=12;if((Ba|0)==1){break a}}if(!Ba|(b|0)==13){Xp(53340,45384);a=13;if((Ba|0)==1){break a}}if(!Ba){v[52832]=1;x[13207]=53184;return 53184}p()}x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function $e(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;g=Ba;o(+b);c=j(1)|0;a:{c=c&2147483647;if(!(j(0)|0)&(c|0)==2146435072|c>>>0<2146435072){o(+a);c=j(1)|0;c=c&2147483647;if(!(j(0)|0)&(c|0)==2146435072|c>>>0<2146435072){break a}}return a+b}o(+b);d=j(1)|0;c=j(0)|0;f=c;if(!(c|d-1072693248)){a=_e(a);if((Ba|0)!=(g|0)){p()}return a}o(+a);c=j(1)|0;h=d>>>30&2;e=h|c>>>31;b:{c=c&2147483647;c:{if(!(j(0)|c)){d:{switch(e-2|0){case 0:return 3.141592653589793;case 1:break d;default:break c}}return-3.141592653589793}d=d&2147483647;if(!(d|f)){break b}e:{if((d|0)==2146435072){if((c|0)!=2146435072){break e}return C[(e<<3)+17216>>3]}if(!((c|0)!=2146435072&d+67108864>>>0>=c>>>0)){break b}f:{if(h){if(d>>>0>c+67108864>>>0){break f}}i=_e(F(a/b));if((Ba|0)!=(g|0)){p()}}a=i;g:{switch(e|0){case 1:return-a;case 2:return 3.141592653589793-(a+-12246467991473532e-32);case 0:break c;default:break g}}return a+-12246467991473532e-32+-3.141592653589793}a=C[(e<<3)+17248>>3]}return a}o(1.5707963267948966);c=j(1)|0;f=j(0)|0;o(+a);d=j(1)|0;j(0)|0;l(0,f|0);l(1,c&2147483647|d&-2147483648);return+n()}function Tp(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){if(y[52824]){return x[13205]}if(!y[53176]){v[53176]=1}}a:{if(!Ba|!b){Sp(53008,1245);a=0;if((Ba|0)==1){break a}}if(!Ba|(b|0)==1){Sp(53020,1252);a=1;if((Ba|0)==1){break a}}if(!Ba|(b|0)==2){Sp(53032,1218);a=2;if((Ba|0)==1){break a}}if(!Ba|(b|0)==3){Sp(53044,1226);a=3;if((Ba|0)==1){break a}}if(!Ba|(b|0)==4){Sp(53056,1209);a=4;if((Ba|0)==1){break a}}if(!Ba|(b|0)==5){Sp(53068,1259);a=5;if((Ba|0)==1){break a}}if(!Ba|(b|0)==6){Sp(53080,1236);a=6;if((Ba|0)==1){break a}}if(!Ba|(b|0)==7){Sp(53092,4683);a=7;if((Ba|0)==1){break a}}if(!Ba|(b|0)==8){Sp(53104,5057);a=8;if((Ba|0)==1){break a}}if(!Ba|(b|0)==9){Sp(53116,7171);a=9;if((Ba|0)==1){break a}}if(!Ba|(b|0)==10){Sp(53128,9531);a=10;if((Ba|0)==1){break a}}if(!Ba|(b|0)==11){Sp(53140,1317);a=11;if((Ba|0)==1){break a}}if(!Ba|(b|0)==12){Sp(53152,6232);a=12;if((Ba|0)==1){break a}}if(!Ba|(b|0)==13){Sp(53164,2504);a=13;if((Ba|0)==1){break a}}if(!Ba){v[52824]=1;x[13205]=53008;return 53008}p()}x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function Jl(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,k=0,m=0,q=0,r=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+12>>2];f=x[b+16>>2];d=x[b+24>>2];g=x[b+20>>2];l(0,g|0);l(1,d|0);h=+n();g=x[b+28>>2];i=x[b+32>>2];d=x[b+40>>2];l(0,x[b+36>>2]);l(1,d|0);k=+n();b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;m=x[x[Ca>>2]>>2]}if(!Ba){f=ya-16|0;ya=f;e=(a|0)!=(b|0)}a:{b:{c:{d:{if((Ba|0)==2|e){if(!Ba){i=x[12163];x[12163]=0;Ol();e=ya-16|0;ya=e;g=f+12|0}if(!Ba|!m){Xk(e,a,g,1);if((Ba|0)==1){break a}}if(!Ba){h=Fg(x[e>>2],x[e+4>>2],x[e+8>>2],x[e+12>>2]);ya=e+16|0;a=x[12163];if(!a){break d}if(x[f+12>>2]!=(b|0)){break c}k=h;if((a|0)!=68){break b}break c}}if(!Ba){x[c>>2]=4;break b}}if(!Ba){x[12163]=i;if(x[f+12>>2]==(b|0)){break b}}}if(!Ba){x[c>>2]=4;h=k}}if(!Ba){ya=f+16|0;return h}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=e;x[d+16>>2]=f;o(+h);a=j(1)|0;q=d,r=j(0)|0,x[q+20>>2]=r;x[d+24>>2]=a;x[d+28>>2]=g;x[d+32>>2]=i;o(+k);a=j(1)|0;q=d,r=j(0)|0,x[q+36>>2]=r;x[d+40>>2]=a;x[Ca>>2]=x[Ca>>2]+44;return 0}function Va(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];c=x[e+8>>2];f=x[e+12>>2];g=x[e+16>>2];h=x[e+20>>2];i=x[e+24>>2];e=x[e+28>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){c=x[a+8>>2];f=x[a+4>>2];if(c-f>>2>>>0>=b>>>0){if(b){b=b<<2;f=nf(f,0,b)+b|0}x[a+4>>2]=f;return}h=x[a>>2];d=f-h>>2;g=d+b|0;i=g>>>0<1073741824}a:{b:{if((Ba|0)==2|i){if(!Ba){i=d<<2;d=c-h|0;c=d>>1;g=c>>>0>g>>>0?c:g;c=d>>>0>=2147483644;g=c?1073741823:g}if((Ba|0)==2|g){if(!Ba){if(g>>>0>=1073741824){break b}c=g<<2}if(!Ba|!j){d=dr(c);if((Ba|0)==1){break a}e=d}}if(!Ba){b=b<<2;c=e+i|0;b=b+nf(c,0,b)|0;e=(g<<2)+e|0;if((f|0)!=(h|0)){while(1){c=c-4|0;f=f-4|0;B[c>>2]=B[f>>2];if((f|0)!=(h|0)){continue}break}}x[a+8>>2]=e;x[a+4>>2]=b;x[a>>2]=c;if(h){zg(h)}return}}if(!Ba|(j|0)==1){Xa();k=1;if((Ba|0)==1){break a}}if(!Ba){p()}}if(!Ba){Ya();p()}return}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=f;x[d+16>>2]=g;x[d+20>>2]=h;x[d+24>>2]=i;x[d+28>>2]=e;x[Ca>>2]=x[Ca>>2]+32}function md(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0;o=Ba;k=x[a+44>>2];e=x[a+40>>2];l=x[a+8>>2];if((l|0)>=0){while(1){f=g<<3;dg(C[f+c>>3],f+k|0,e+f|0);if((Ba|0)!=(o|0)){p()}f=(g|0)==(l|0);g=g+1|0;if(!f){continue}break}h=l+1|0;m=h&3;c=0;g=0;if(l>>>0>=3){j=h&-4;while(1){f=g<<3;i=f+e|0;C[i>>3]=C[b+f>>3]*C[i>>3];i=f|8;n=i+e|0;C[n>>3]=C[b+i>>3]*C[n>>3];i=f|16;n=i+e|0;C[n>>3]=C[b+i>>3]*C[n>>3];f=f|24;i=f+e|0;C[i>>3]=C[b+f>>3]*C[i>>3];g=g+4|0;q=q+4|0;if((j|0)!=(q|0)){continue}break}}if(m){while(1){f=g<<3;j=f+e|0;C[j>>3]=C[b+f>>3]*C[j>>3];g=g+1|0;c=c+1|0;if((m|0)!=(c|0)){continue}break}}f=h&3;m=0;g=0;if(l>>>0>=3){l=h&-4;c=0;while(1){e=g<<3;h=e+k|0;C[h>>3]=C[b+e>>3]*C[h>>3];h=e|8;j=h+k|0;C[j>>3]=C[b+h>>3]*C[j>>3];h=e|16;j=h+k|0;C[j>>3]=C[b+h>>3]*C[j>>3];e=e|24;h=e+k|0;C[h>>3]=C[b+e>>3]*C[h>>3];g=g+4|0;c=c+4|0;if((l|0)!=(c|0)){continue}break}}if(f){while(1){c=g<<3;e=c+k|0;C[e>>3]=C[b+c>>3]*C[e>>3];g=g+1|0;m=m+1|0;if((f|0)!=(m|0)){continue}break}}k=x[a+44>>2];e=x[a+40>>2]}kd(a,e,k,d);if((Ba|0)!=(o|0)){p()}}function Xm(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-40;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];g=x[b+20>>2];i=x[b+24>>2];j=x[b+28>>2];h=x[b+32>>2];m=x[b+36>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;k=x[x[Ca>>2]>>2]}if(!Ba){a=ya-208|0;ya=a;j=Ol();x[a>>2]=e;e=a+176|0;g=e}a:{if(!Ba|!k){f=wm(e,20,j,3857,a);if((Ba|0)==1){break a}h=f}if(!Ba){e=(a+176|0)+h|0;j=xm(g,e,c);g=a+16|0;vj(g,c)}if(!Ba|(k|0)==1){f=bi(g);l=1;if((Ba|0)==1){break a}g=f}i=Ba?i:a+16|0;if(!Ba|(k|0)==2){Po(i);l=2;if((Ba|0)==1){break a}}if(!Ba){m=a+16|0;i=a+176|0}if(!Ba|(k|0)==3){jm(g,i,e,m);l=3;if((Ba|0)==1){break a}}if(!Ba){g=a+16|0;h=(h<<2)+g|0;e=(e|0)==(j|0)?h:((j-a<<2)+a|0)-688|0}if(!Ba|(k|0)==4){f=Qm(b,g,e,h,c,d);l=4;if((Ba|0)==1){break a}c=f}if(!Ba){ya=a+208|0;return c|0}p()}x[x[Ca>>2]>>2]=l;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[f+24>>2]=i;x[f+28>>2]=j;x[f+32>>2]=h;x[f+36>>2]=m;x[Ca>>2]=x[Ca>>2]+40;return 0}function Im(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-40;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];g=x[b+20>>2];i=x[b+24>>2];j=x[b+28>>2];h=x[b+32>>2];m=x[b+36>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;k=x[x[Ca>>2]>>2]}if(!Ba){a=ya-96|0;ya=a;j=Ol();x[a>>2]=e;e=a- -64|0;g=e}a:{if(!Ba|!k){f=wm(e,20,j,3857,a);if((Ba|0)==1){break a}h=f}if(!Ba){e=(a- -64|0)+h|0;j=xm(g,e,c);g=a+16|0;vj(g,c)}if(!Ba|(k|0)==1){f=sh(g);l=1;if((Ba|0)==1){break a}g=f}i=Ba?i:a+16|0;if(!Ba|(k|0)==2){Po(i);l=2;if((Ba|0)==1){break a}}if(!Ba){m=a+16|0;i=a- -64|0}if(!Ba|(k|0)==3){Nl(g,i,e,m);l=3;if((Ba|0)==1){break a}}if(!Ba){g=a+16|0;h=g+h|0;e=(e|0)==(j|0)?h:((j-a|0)+a|0)-48|0}if(!Ba|(k|0)==4){f=zm(b,g,e,h,c,d);l=4;if((Ba|0)==1){break a}c=f}if(!Ba){ya=a+96|0;return c|0}p()}x[x[Ca>>2]>>2]=l;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[f+24>>2]=i;x[f+28>>2]=j;x[f+32>>2]=h;x[f+36>>2]=m;x[Ca>>2]=x[Ca>>2]+40;return 0}function Gr(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;f=x[Ca>>2];a=x[f>>2];b=x[f+4>>2];c=x[f+8>>2];d=x[f+12>>2];e=x[f+16>>2];f=x[f+20>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){if(qr(a,x[b+8>>2],e)){Cr(b,c,d);return}f=qr(a,x[b>>2],e)}a:{b:{if((Ba|0)==2|f){if(!Ba){c:{if(x[b+16>>2]!=(c|0)){f=x[b+20>>2]!=(c|0);if(f){break c}}if((d|0)!=1){break b}x[b+32>>2]=1;return}x[b+32>>2]=d;d=x[b+44>>2]==4}d:{if(!Ba){if(d){break d}w[b+52>>1]=0;a=x[a+8>>2];d=x[x[a>>2]+20>>2]}if(!Ba|!g){Ea[d|0](a,b,c,c,1,e);if((Ba|0)==1){break a}}if(!Ba){a=y[b+53|0];if(a){x[b+44>>2]=3;a=!y[b+52|0];if(a){break d}break b}x[b+44>>2]=4}}if(!Ba){x[b+20>>2]=c;x[b+40>>2]=x[b+40>>2]+1;if(x[b+36>>2]!=1|x[b+24>>2]!=2){break b}v[b+54|0]=1;return}}if(!Ba){a=x[a+8>>2];f=x[x[a>>2]+24>>2]}if(!Ba|(g|0)==1){Ea[f|0](a,b,c,d,e);h=1;if((Ba|0)==1){break a}}}return}x[x[Ca>>2]>>2]=h;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[Ca>>2]=x[Ca>>2]+24}function eg(a){var b=0,c=0,d=0,e=0,f=0;b=Ba;f=ya-16|0;ya=f;e=(q(a),j(2));d=e&2147483647;a:{if(d>>>0<=1061752794){if(d>>>0<964689920){break a}a=jf(+a);if((Ba|0)!=(b|0)){p()}break a}if(d>>>0<=1081824209){c=+a;if(d>>>0<=1075235811){if((e|0)<0){a=hf(c+1.5707963267948966);if((Ba|0)!=(b|0)){p()}a=E(-a);break a}a=hf(c+-1.5707963267948966);if((Ba|0)!=(b|0)){p()}break a}a=jf(-(((e|0)>=0?-3.141592653589793:3.141592653589793)+c));if((Ba|0)!=(b|0)){p()}break a}if(d>>>0<=1088565717){if(d>>>0<=1085271519){c=+a;if((e|0)<0){a=hf(c+4.71238898038469);if((Ba|0)!=(b|0)){p()}break a}a=hf(c+-4.71238898038469);if((Ba|0)!=(b|0)){p()}a=E(-a);break a}a=jf(((e|0)<0?6.283185307179586:-6.283185307179586)+ +a);if((Ba|0)!=(b|0)){p()}break a}if(d>>>0>=2139095040){a=E(a-a);break a}d=kf(a,f+8|0);if((Ba|0)!=(b|0)){p()}c=C[f+8>>3];b:{switch(d&3){case 0:a=jf(c);if((Ba|0)!=(b|0)){p()}break a;case 1:a=hf(c);if((Ba|0)!=(b|0)){p()}break a;case 2:a=jf(-c);if((Ba|0)!=(b|0)){p()}break a;default:break b}}a=hf(c);if((Ba|0)!=(b|0)){p()}a=E(-a)}ya=f+16|0;return a}function Fg(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;i=Ba;g=ya-32|0;ya=g;e=d&2147483647;h=e;f=e-1006698496|0;e=e-1140785152|0;a:{if((f|0)==(e|0)&0|e>>>0>f>>>0){e=c<<4|b>>>28;c=d<<4|c>>>28;b=b&268435455;if((b|0)==134217728&(a|0)!=0|b>>>0>134217728){f=c+1073741824|0;e=e+1|0;f=e?f:f+1|0;break a}f=c+1073741824|0;if(a|(b|0)!=134217728){break a}a=e&1;e=a+e|0;f=a>>>0>e>>>0?f+1|0:f;break a}if(!(!c&(h|0)==2147418112?!(a|b):h>>>0<2147418112)){a=d<<4|c>>>28;e=c<<4|b>>>28;f=a&524287|2146959360;break a}e=0;f=2146435072;if(h>>>0>1140785151){break a}f=0;h=h>>>16|0;if(h>>>0<15249){break a}e=d&65535|65536;Dg(g+16|0,a,b,c,e,h-15233|0);if((Ba|0)!=(i|0)){p()}Eg(g,a,b,c,e,15361-h|0);if((Ba|0)!=(i|0)){p()}b=x[g+8>>2];e=b<<4;b=x[g+12>>2]<<4|b>>>28;c=x[g>>2];f=x[g+4>>2];h=f;e=f>>>28|e;f=b;a=h&268435455;b=c|(x[g+16>>2]|x[g+24>>2]|(x[g+20>>2]|x[g+28>>2]))!=0;if((a|0)==134217728&(b|0)!=0|a>>>0>134217728){e=e+1|0;f=e?f:f+1|0;break a}if(b|(a|0)!=134217728){break a}a=e;e=e+(e&1)|0;f=a>>>0>e>>>0?f+1|0:f}ya=g+32|0;l(0,e|0);l(1,d&-2147483648|f);return+n()}function Gj(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;b=x[Ca>>2];a=x[b>>2];d=x[b+8>>2];c=x[b+12>>2];f=x[b+16>>2];g=x[b+20>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){f=ya-16|0;ya=f;g=x[12204];if(x[b+72>>2]<=0){Cj(b)}x[12204]=x[b+136>>2];d=a>>>0<=127}a:{b:{c:{d:{if((Ba|0)==2|d){if(!Ba){e:{d=x[b+80>>2]==(a|0);if(d){break e}d=x[b+20>>2];c=(d|0)==x[b+16>>2];if(c){break e}x[b+20>>2]=d+1;v[d|0]=a;break b}}if(!Ba|!h){e=Uf(b,a);if((Ba|0)==1){break a}a=e}if(!Ba){break d}}if(!Ba){c=x[b+20>>2];if(A[b+16>>2]>c+4>>>0){c=wg(c,a);if((c|0)<0){break c}x[b+20>>2]=c+x[b+20>>2];break d}c=f+12|0;d=wg(c,a);if((d|0)<0){break c}}if(!Ba|(h|0)==1){e=Sf(c,d,b);i=1;if((Ba|0)==1){break a}c=e}if(!Ba&c>>>0>>0){break c}}if(!Ba&(a|0)!=-1){break b}}if(!Ba){x[b>>2]=x[b>>2]|32;a=-1}}if(!Ba){x[12204]=g;ya=f+16|0;return a}p()}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=d;x[e+12>>2]=c;x[e+16>>2]=f;x[e+20>>2]=g;x[Ca>>2]=x[Ca>>2]+24;return 0}function kr(a,b,c,d,e,f,g,h){var i=0,j=0,k=0,l=0,m=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;i=x[Ca>>2];a=x[i>>2];b=x[i+4>>2];d=x[i+8>>2];e=x[i+12>>2];f=x[i+16>>2];g=x[i+20>>2];h=x[i+24>>2];j=x[i+28>>2];l=x[i+32>>2];k=x[i+36>>2];i=x[i+40>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;m=x[x[Ca>>2]>>2]}if(!Ba){j=ya-16|0;ya=j;l=1073741807;k=l+(b^-1)>>>0>=c>>>0}a:{if((Ba|0)==2|k){if(!Ba){k=ri(a);i=j+4|0;if((l>>>1|0)-16>>>0>b>>>0){x[j+12>>2]=b<<1;x[j+4>>2]=b+c;l=xq(x[Bi(i,j+12|0)>>2])+1|0}}if(!Ba|!m){yq(i,a,l);if((Ba|0)==1){break a}}if(!Ba){c=x[j+4>>2];if(e){Zh(c,k,e)}if(g){Zh(c+(e<<2)|0,h,g)}i=e+f|0;h=d-i|0;if((d|0)!=(i|0)){d=e<<2;Zh((d+c|0)+(g<<2)|0,(d+k|0)+(f<<2)|0,h)}if((b|0)!=1){Bq(k)}kj(a,c);lj(a,x[j+8>>2]);b=a;a=h+(e+g|0)|0;mj(b,a);x[j+12>>2]=0;bo(c+(a<<2)|0,j+12|0);ya=j+16|0;return}}if(!Ba){nj();p()}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=e;x[c+16>>2]=f;x[c+20>>2]=g;x[c+24>>2]=h;x[c+28>>2]=j;x[c+32>>2]=l;x[c+36>>2]=k;x[c+40>>2]=i;x[Ca>>2]=x[Ca>>2]+44}function gr(a,b,c,d,e,f,g,h){var i=0,j=0,k=0,l=0,m=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-44;i=x[Ca>>2];a=x[i>>2];b=x[i+4>>2];d=x[i+8>>2];e=x[i+12>>2];f=x[i+16>>2];g=x[i+20>>2];h=x[i+24>>2];j=x[i+28>>2];k=x[i+32>>2];l=x[i+36>>2];i=x[i+40>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;m=x[x[Ca>>2]>>2]}if(!Ba){j=ya-16|0;ya=j;l=(b^-1)+2147483631>>>0>=c>>>0;k=2147483631}a:{if((Ba|0)==2|l){if(!Ba){l=ri(a);i=j+4|0;if((k>>>1|0)-16>>>0>b>>>0){x[j+12>>2]=b<<1;x[j+4>>2]=b+c;k=ij(x[Bi(i,j+12|0)>>2])+1|0}}if(!Ba|!m){jj(i,a,k);if((Ba|0)==1){break a}}if(!Ba){c=x[j+4>>2];if(e){gh(c,l,e)}if(g){gh(c+e|0,h,g)}k=e+f|0;h=d-k|0;if((d|0)!=(k|0)){gh((c+e|0)+g|0,(e+l|0)+f|0,h)}b=b+1|0;if((b|0)!=11){aj(l)}kj(a,c);lj(a,x[j+8>>2]);b=a;a=h+(e+g|0)|0;mj(b,a);v[j+12|0]=0;cj(a+c|0,j+12|0);ya=j+16|0;return}}if(!Ba){nj();p()}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=e;x[c+16>>2]=f;x[c+20>>2]=g;x[c+24>>2]=h;x[c+28>>2]=j;x[c+32>>2]=k;x[c+36>>2]=l;x[c+40>>2]=i;x[Ca>>2]=x[Ca>>2]+44}function If(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0,m=0,q=0;k=Ba;o(+a);e=j(1)|0;j(0)|0;b=e>>>16|0;o(+a);d=j(1)|0;e=j(0)|0;f=d-1072562176|0;if((f|0)==198911|f>>>0<198911){if(!e&(d|0)==1072693248){return 0}a=a+-1;c=a*134217728;c=a+c-c;i=C[2801];m=c*c*i;q=a+m;g=a*a;h=a*g;return q+(h*(h*(h*(h*C[2811]+(g*C[2810]+(a*C[2809]+C[2808])))+(g*C[2807]+(a*C[2806]+C[2805])))+(g*C[2804]+(a*C[2803]+C[2802])))+((a-c)*i*(a+c)+(m+(a-q))))}a:{if(b-32752>>>0<=4294934559){o(+a);f=j(1)|0;if(!(j(0)|f&2147483647)){a=rf(-1);if((Ba|0)!=(k|0)){p()}return a/0}if(!e&(d|0)==2146435072){break a}if(!((b&32752)!=32752&b>>>0<=32767)){a=Hf(a);if((Ba|0)!=(k|0)){p()}return a}o(+(a*4503599627370496));d=j(1)|0;e=j(0)|0;d=d-54525952|0}b=d-1072037888|0;k=b;g=+(b>>20);b=(b>>>13&127)<<4;h=g*C[2794]+C[b+22504>>3];a=C[b+22496>>3];f=0;l(0,e-f|0);l(1,d-((k&-1048576)+(e>>>0>>0)|0)|0);a=a*(+n()-C[b+24544>>3]-C[b+24552>>3]);i=h+a;c=a*a;a=i+(a*c*(c*(a*C[2800]+C[2799])+(a*C[2798]+C[2797]))+(c*C[2796]+(g*C[2795]+(a+(h-i)))))}return a}function ec(a,b){var c=0,d=0,e=0;d=(a|0)==(b|0);v[b+12|0]=d;a:{if(d){break a}while(1){d=x[b+8>>2];if(y[d+12|0]){break a}b:{c=x[d+8>>2];e=x[c>>2];if((e|0)==(d|0)){e=x[c+4>>2];if(!(!e|y[e+12|0])){break b}c:{if(x[d>>2]==(b|0)){b=d;break c}b=x[d+4>>2];e=x[b>>2];x[d+4>>2]=e;a=d;if(e){x[e+8>>2]=d;c=x[d+8>>2];a=x[c>>2]}x[b+8>>2]=c;x[((a|0)==(d|0)?c:c+4|0)>>2]=b;x[b>>2]=d;x[d+8>>2]=b;c=x[b+8>>2];d=x[c>>2]}v[b+12|0]=1;v[c+12|0]=0;a=x[d+4>>2];x[c>>2]=a;if(a){x[a+8>>2]=c}a=x[c+8>>2];x[d+8>>2]=a;x[a+((x[a>>2]!=(c|0))<<2)>>2]=d;x[d+4>>2]=c;x[c+8>>2]=d;return}if(!(y[e+12|0]|!e)){break b}d:{if(x[d>>2]!=(b|0)){b=d;break d}a=x[b+4>>2];x[d>>2]=a;if(a){x[a+8>>2]=d;c=x[d+8>>2]}x[b+8>>2]=c;x[(x[c>>2]==(d|0)?c:c+4|0)>>2]=b;x[b+4>>2]=d;x[d+8>>2]=b;c=x[b+8>>2]}v[b+12|0]=1;v[c+12|0]=0;a=x[c+4>>2];b=x[a>>2];x[c+4>>2]=b;if(b){x[b+8>>2]=c}b=x[c+8>>2];x[a+8>>2]=b;x[b+((x[b>>2]!=(c|0))<<2)>>2]=a;x[a>>2]=c;x[c+8>>2]=a;break a}b=e+12|0;v[d+12|0]=1;v[c+12|0]=(a|0)==(c|0);v[b|0]=1;b=c;if((a|0)!=(c|0)){continue}break}}}function Bg(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;g=Ba;a:{b:{if((b|0)==8){b=yg(c);if((Ba|0)!=(g|0)){p()}break b}d=28;if(b&3|b>>>0<4){break a}e=b>>>2|0;if(e-1&e){break a}d=48;if(-64-b>>>0>>0){break a}d=16;b=b>>>0<=16?16:b;e=b>>>0<=16?16:b;c:{if(!(e-1&e)){b=e;break c}while(1){b=d;d=b<<1;if(b>>>0>>0){continue}break}}d:{if(c>>>0>=-64-b>>>0){x[12163]=48;c=0;break d}e=c>>>0<11?16:c+11&-8;d=yg((e+b|0)+12|0);if((Ba|0)!=(g|0)){p()}c=0;if(!d){break d}c=d-8|0;e:{if(!(d&b-1)){b=c;break e}h=d-4|0;i=x[h>>2];f=b;b=((b+d|0)-1&0-b)-8|0;b=(b-c>>>0<=15?f:0)+b|0;d=b-c|0;f=(i&-8)-d|0;if(!(i&3)){c=x[c>>2];x[b+4>>2]=f;x[b>>2]=c+d;break e}x[b+4>>2]=f|x[b+4>>2]&1|2;f=b+f|0;x[f+4>>2]=x[f+4>>2]|1;x[h>>2]=d|x[h>>2]&1|2;f=c+d|0;x[f+4>>2]=x[f+4>>2]|1;Cg(c,d);if((Ba|0)!=(g|0)){p()}}c=x[b+4>>2];f:{if(!(c&3)){break f}d=c&-8;if(d>>>0<=e+16>>>0){break f}x[b+4>>2]=e|c&1|2;c=b+e|0;e=d-e|0;x[c+4>>2]=e|3;d=b+d|0;x[d+4>>2]=x[d+4>>2]|1;Cg(c,e);if((Ba|0)!=(g|0)){p()}}c=b+8|0}b=c}if(!b){return 48}x[a>>2]=b;d=0}return d}function bc(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;e=x[Ca>>2];a=x[e>>2];c=x[e+4>>2];b=x[e+8>>2];d=x[e+12>>2];e=x[e+16>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=13080;b=x[a+172>>2];if(b){x[a+176>>2]=b;zg(b)}cc(a+160|0,x[a+164>>2]);c=a+128|0;b=x[a+144>>2];d=(c|0)==(b|0)}a:{b:{if(!Ba){c:{if(d){d=4;b=c;break c}d=5;c=!b;if(c){break b}}d=d<<2;c=x[d+x[b>>2]>>2]}if(!Ba|!f){Ea[c|0](b);if((Ba|0)==1){break a}}}if(!Ba){d=a+80|0;b=x[a+120>>2];e=a+104|0;c=(b|0)==(e|0)}d:{if(!Ba){e:{if(c){c=4;b=e;break e}c=5;if(!b){break d}}c=x[x[b>>2]+(c<<2)>>2]}if(!Ba|(f|0)==1){Ea[c|0](b);g=1;if((Ba|0)==1){break a}}}if(!Ba){b=x[a+96>>2];c=(d|0)==(b|0)}f:{if(!Ba){g:{if(c){c=4;b=d;break g}c=5;if(!b){break f}}c=x[x[b>>2]+(c<<2)>>2]}if(!Ba|(f|0)==2){Ea[c|0](b);g=2;if((Ba|0)==1){break a}}}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=g;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=c;x[f+8>>2]=b;x[f+12>>2]=d;x[f+16>>2]=e;x[Ca>>2]=x[Ca>>2]+20;return 0}function Lc(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+12>>2];h=x[b+16>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}if(!Ba){e=ya-16|0;ya=e;b=x[a+12>>2];c=(b|0)==x[a+8>>2]}a:{b:{if((Ba|0)==2|c){b=Ba?b:e+12|0;if(!Ba|!f){d=Ib(51780,7839,49);if((Ba|0)==1){break a}a=d}if(!Ba){c=x[x[a>>2]-12>>2]+a|0;vj(b,c);b=e+12|0}if(!Ba|(f|0)==1){d=il(b,52748);g=1;if((Ba|0)==1){break a}b=d}c=Ba?c:x[x[b>>2]+28>>2];if(!Ba|(f|0)==2){d=Ea[c|0](b,10)|0;g=2;if((Ba|0)==1){break a}b=d}c=Ba?c:e+12|0;if(!Ba|(f|0)==3){Po(c);g=3;if((Ba|0)==1){break a}}if(!Ba|(f|0)==4){Th(a,b);g=4;if((Ba|0)==1){break a}}if(!Ba|(f|0)==5){rh(a);g=5;if((Ba|0)==1){break a}}if(!Ba){break b}}if(!Ba){h=x[x[a+4>>2]+(b<<2)>>2];b=b+1|0;x[a+12>>2]=(b|0)!=x[a+16>>2]?b:0}}if(!Ba){ya=e+16|0;return h}p()}x[x[Ca>>2]>>2]=g;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=e;x[d+16>>2]=h;x[Ca>>2]=x[Ca>>2]+20;return 0}function $h(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];g=x[b+16>>2];h=x[b+20>>2];f=x[b+24>>2];i=x[b+28>>2];j=x[b+32>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;k=x[x[Ca>>2]>>2]}if(!Ba){d=ya;h=d-16|0;ya=h}a:{while(1){b:{if(!Ba){if((c|0)<=(g|0)){break b}d=x[a+24>>2];f=x[a+28>>2];i=d>>>0>=f>>>0}j=Ba?j:i;if(j|(Ba|0)==2){if(!Ba){f=x[x[a>>2]+52>>2];d=x[b>>2]}if(!Ba|!k){e=Ea[f|0](a,d)|0;if((Ba|0)==1){break a}d=e}if(!Ba){d=(d|0)==-1;if(d){break b}g=g+1|0;b=b+4|0;continue}}if(!Ba&(!j|(Ba|0)==2)){x[h+12>>2]=f-d>>2;x[h+8>>2]=c-g;d=x[fh(h+12|0,h+8|0)>>2];Zh(x[a+24>>2],b,d);f=d<<2;i=f+x[a+24>>2]|0;x[a+24>>2]=i;g=d+g|0;b=b+f|0;continue}}break}if(!Ba){ya=h+16|0;return g|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=g;x[e+20>>2]=h;x[e+24>>2]=f;x[e+28>>2]=i;x[e+32>>2]=j;x[Ca>>2]=x[Ca>>2]+36;return 0}function ad(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;o=Ba;f=x[a+8>>2];w=(f|0)/2|0;i=x[a+44>>2];j=x[a+40>>2];a:{if((f|0)<=0){break a}if((f|0)!=1){l=f&-2;while(1){g=e<<3;n=(e<<4)+b|0;C[g+j>>3]=C[n>>3];C[i+g>>3]=C[n+8>>3];g=e|1;n=g<<3;g=(g<<4)+b|0;C[n+j>>3]=C[g>>3];C[i+n>>3]=C[g+8>>3];e=e+2|0;q=q+2|0;if((l|0)!=(q|0)){continue}break}}if(!(f&1)){break a}l=e<<3;b=(e<<4)+b|0;C[l+j>>3]=C[b>>3];C[i+l>>3]=C[b+8>>3]}b=0;td(a,j,i,x[a+32>>2],x[a+36>>2],0);if((Ba|0)!=(o|0)){p()}i=x[a+32>>2];k=C[i>>3];j=x[a+36>>2];h=C[j>>3];C[c>>3]=k+h;l=x[a+8>>2];e=l<<3;C[e+c>>3]=k-h;e=d+e|0;x[e>>2]=0;x[e+4>>2]=0;x[d>>2]=0;x[d+4>>2]=0;if((f|0)>=2){o=x[a+28>>2];e=0;while(1){e=e+1|0;a=e<<3;h=C[a+i>>3];f=l-e<<3;m=C[f+i>>3];k=h+m;r=h-m;g=b<<3;s=C[o+(g|8)>>3];t=C[g+o>>3];h=C[a+j>>3];m=C[f+j>>3];u=h+m;v=r*s+t*u;C[a+c>>3]=(k+v)*.5;C[c+f>>3]=(k-v)*.5;k=s*u-r*t;C[a+d>>3]=(h-m+k)*.5;C[d+f>>3]=(m+(k-h))*.5;b=b+2|0;if((e|0)!=(w|0)){continue}break}}}function ak(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];d=x[b+4>>2];e=x[b+8>>2];f=x[b+16>>2];g=x[b+20>>2];h=x[b+24>>2];i=x[b+28>>2];b=x[b+12>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){d=ya-16|0;ya=d;i=d+16|0}a:{b:{while(1){if(!Ba){g=d+8|0;f=x[a+36>>2];h=x[x[f>>2]+20>>2];e=x[a+40>>2];b=d+4|0}if(!Ba|!j){c=Ea[h|0](f,e,g,i,b)|0;k=0;if((Ba|0)==1){break a}g=c}if(!Ba){h=x[a+32>>2];b=d+8|0;e=x[d+4>>2]-b|0;f=-1}if(!Ba|(j|0)==1){c=Tf(b,1,e,h);k=1;if((Ba|0)==1){break a}b=c}if(!Ba){if((b|0)!=(e|0)){break b}c:{e=g-1|0;switch(e|0){case 1:break b;case 0:continue;default:break c}}}break}a=Ba?a:x[a+32>>2];if(!Ba|(j|0)==2){c=Af(a);k=2;if((Ba|0)==1){break a}a=c}f=Ba?f:a?-1:0}if(!Ba){ya=d+16|0;return f|0}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=d;x[c+8>>2]=e;x[c+12>>2]=b;x[c+16>>2]=f;x[c+20>>2]=g;x[c+24>>2]=h;x[c+28>>2]=i;x[Ca>>2]=x[Ca>>2]+32;return 0}function lh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];f=x[b+16>>2];g=x[b+20>>2];h=x[b+24>>2];j=x[b+28>>2];i=x[b+32>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;k=x[x[Ca>>2]>>2]}if(!Ba){d=ya;g=d-16|0;ya=g}a:{while(1){b:{if(!Ba){if((c|0)<=(f|0)){break b}d=x[a+24>>2];h=x[a+28>>2];j=d>>>0>=h>>>0}i=Ba?i:j;if(i|(Ba|0)==2){if(!Ba){d=jh(v[b|0]);h=x[x[a>>2]+52>>2]}if(!Ba|!k){e=Ea[h|0](a,d)|0;if((Ba|0)==1){break a}d=e}if(!Ba){d=(d|0)==-1;if(d){break b}f=f+1|0;b=b+1|0;continue}}if(!Ba&(!i|(Ba|0)==2)){x[g+12>>2]=h-d;x[g+8>>2]=c-f;d=x[fh(g+12|0,g+8|0)>>2];gh(x[a+24>>2],b,d);h=x[a+24>>2]+d|0;x[a+24>>2]=h;f=d+f|0;b=b+d|0;continue}}break}if(!Ba){ya=g+16|0;return f|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=f;x[e+20>>2]=g;x[e+24>>2]=h;x[e+28>>2]=j;x[e+32>>2]=i;x[Ca>>2]=x[Ca>>2]+36;return 0}function db(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;b=x[Ca>>2];a=x[b>>2];d=x[b+8>>2];e=x[b+12>>2];g=x[b+16>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}if(!Ba){a=ya-32|0;ya=a;e=gg(b);d=e>>>0<2147483632}a:{c=(Ba|0)==2;if(c|d){d=Ba?d:e>>>0>=11;b:{c:{if(c|d){if(!Ba){d=e|15;g=d+1|0}if(!Ba|!f){c=dr(g);if((Ba|0)==1){break a}d=c}if(!Ba){x[a+20>>2]=g|-2147483648;x[a+12>>2]=d;x[a+16>>2]=e;break c}}if(!Ba){v[a+23|0]=e;d=a+12|0;if(!e){break b}}}if(!Ba){lf(d,b,e)}}if(!Ba){v[d+e|0]=0;f=v[a+23|0];h=(f|0)<0;d=h?x[a+16>>2]:f&255;c=yg(d+4|0);x[c>>2]=d;b=x[a+12>>2];lf(c+4|0,h?b:a+12|0,d);x[a+24>>2]=c;c=Q(12584,a+24|0)|0;x[a>>2]=c;Y(48215,12516,a|0)|0;if(c){P(c|0)}if((f|0)<0){zg(b)}ya=a+32|0;return}}if(!Ba|(f|0)==1){eb();h=1;if((Ba|0)==1){break a}}if(!Ba){p()}return}x[x[Ca>>2]>>2]=h;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=e;x[c+16>>2]=g;x[Ca>>2]=x[Ca>>2]+20}function Sf(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];g=x[b+20>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}d=Ba?d:x[c+16>>2];a:{b:{if(!Ba){if(!d){if(Rf(c)){break b}d=x[c+16>>2]}e=x[c+20>>2];d=d-e>>>0>>0}if((Ba|0)==2|d){d=Ba?d:x[c+36>>2];if(!Ba|!h){f=Ea[d|0](c,a,b)|0;if((Ba|0)==1){break a}a=f}if(!Ba){return a}}d=Ba?d:x[c+80>>2]<0;c:{d:{if(!Ba){if(d){break d}d=!b;if(d){break d}d=b;while(1){g=a+d|0;if(y[g-1|0]!=10){d=d-1|0;if(d){continue}break d}break}e=x[c+36>>2]}if(!Ba|(h|0)==1){f=Ea[e|0](c,a,d)|0;i=1;if((Ba|0)==1){break a}e=f}if(!Ba){if(d>>>0>e>>>0){break b}b=b-d|0;e=x[c+20>>2];break c}}if(!Ba){g=a;d=0}}if(!Ba){lf(e,g,b);x[c+20>>2]=x[c+20>>2]+b;e=b+d|0}}if(!Ba){return e}p()}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[Ca>>2]=x[Ca>>2]+24;return 0}function fd(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;n=Ba;g=x[a+8>>2];v=(g|0)/2|0;e=x[a+44>>2];j=x[a+40>>2];a:{if((g|0)<=0){break a}if((g|0)!=1){w=g&-2;while(1){f=h<<3;k=f+b|0;C[f+j>>3]=B[k>>2];C[e+f>>3]=B[k+4>>2];f=f|8;k=f+b|0;C[f+j>>3]=B[k>>2];C[e+f>>3]=B[k+4>>2];h=h+2|0;o=o+2|0;if((w|0)!=(o|0)){continue}break}}if(!(g&1)){break a}f=b;b=h<<3;h=f+b|0;C[b+j>>3]=B[h>>2];C[b+e>>3]=B[h+4>>2]}b=0;td(a,j,e,x[a+32>>2],x[a+36>>2],0);if((Ba|0)!=(n|0)){p()}j=x[a+32>>2];l=C[j>>3];h=x[a+36>>2];i=C[h>>3];C[c>>3]=l+i;k=x[a+8>>2];e=k<<3;C[e+c>>3]=l-i;e=d+e|0;x[e>>2]=0;x[e+4>>2]=0;x[d>>2]=0;x[d+4>>2]=0;if((g|0)>=2){f=x[a+28>>2];a=0;while(1){a=a+1|0;g=a<<3;i=C[g+j>>3];e=k-a<<3;m=C[e+j>>3];l=i+m;q=i-m;n=b<<3;r=C[f+(n|8)>>3];s=C[f+n>>3];i=C[g+h>>3];m=C[e+h>>3];t=i+m;u=q*r+s*t;C[c+g>>3]=(l+u)*.5;C[c+e>>3]=(l-u)*.5;l=r*t-q*s;C[d+g>>3]=(i-m+l)*.5;C[d+e>>3]=(m+(l-i))*.5;b=b+2|0;if((a|0)!=(v|0)){continue}break}}}function Ol(){var a=0,b=0,c=0,d=0,e=0,f=0;e=Ba;if(y[52708]){return x[13176]}c=ya-32|0;ya=c;a:{b:{while(1){a=(c+8|0)+(d<<2)|0;f=Kk(d,1<>2]=f;if((f|0)==-1){break b}d=d+1|0;if((d|0)!=6){continue}break}a=Lk(0);if((Ba|0)!=(e|0)){p()}if(!a){b=35144;a=Of(c+8|0,35144,24);if((Ba|0)!=(e|0)){p()}if(!a){break a}b=35168;a=Of(c+8|0,35168,24);if((Ba|0)!=(e|0)){p()}if(!a){break a}d=0;if(!y[52536]){while(1){a=(d<<2)+52488|0;b=Kk(d,12219);if((Ba|0)!=(e|0)){p()}x[a>>2]=b;d=d+1|0;if((d|0)!=6){continue}break}v[52536]=1;x[13128]=x[13122]}b=52488;a=Of(c+8|0,52488,24);if((Ba|0)!=(e|0)){p()}if(!a){break a}b=52512;a=Of(c+8|0,52512,24);if((Ba|0)!=(e|0)){p()}if(!a){break a}b=yg(24);if((Ba|0)!=(e|0)){p()}if(!b){break b}}a=x[c+12>>2];x[b>>2]=x[c+8>>2];x[b+4>>2]=a;a=x[c+28>>2];x[b+16>>2]=x[c+24>>2];x[b+20>>2]=a;a=x[c+20>>2];x[b+8>>2]=x[c+16>>2];x[b+12>>2]=a;break a}b=0}ya=c+32|0;v[52708]=1;x[13176]=b;return b}function Jc(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;a:{if((d|0)<=0){break a}k=c+d|0;l=c+e|0;o=x[a+4>>2];h=c;while(1){j=h-e|0;b:{c:{if((j|0)>(e+h|0)){break c}m=C[(h<<3)+b>>3];while(1){g=j;d:{if((g|0)<(c|0)|(h|0)==(g|0)){break d}if((g|0)>=(k|0)){break c}n=C[(g<<3)+b>>3];if(!(n(g|0)){break b}if((h|0)>=(g|0)){break d}if(m>2]=h;i=i+1|0}l=l+1|0;h=h+1|0;if((k|0)>(h|0)){continue}break}if((d|0)<=0){break a}e=c-1|0;g=x[a+4>>2];h=(g+(i<<2)|0)-4|0;d=0;while(1){j=(d|0)>=(i|0);e:{f:{if(!j){b=g+(d<<2)|0;break f}b=h;a=c;if((i|0)<=0){break e}}a=x[b>>2]}g:{if(!f){break g}if(!d){x[(c<<2)+f>>2]=a;break g}b=(c<<2)+f|0;if((a-c|0)<=(c-e|0)){x[b>>2]=a;break g}x[b>>2]=e}h:{if(x[g+(d<<2)>>2]>(c|0)|j){break h}d=d+1|0;if((i|0)!=(d|0)){while(1){if(x[g+(d<<2)>>2]>(c|0)){e=a;break h}d=d+1|0;if((i|0)!=(d|0)){continue}break}}e=a;d=i}c=c+1|0;if((k|0)>(c|0)){continue}break}}}function Pg(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;f=Ba;c=ya-32|0;ya=c;x[c+24>>2]=a;g=1;a:{b:{switch(b-a>>2){case 2:b=b-4|0;x[c+20>>2]=b;a=Jg(b,a);if((Ba|0)!=(f|0)){p()}if(!a){break a}Kg(c+24|0,c+20|0);if((Ba|0)!=(f|0)){p()}break a;case 3:Og(a,a+4|0,b-4|0);if((Ba|0)!=(f|0)){p()}break a;case 4:Lg(a,a+4|0,a+8|0,b-4|0);if((Ba|0)!=(f|0)){p()}break a;case 5:Mg(a,a+4|0,a+8|0,a+12|0,b-4|0);if((Ba|0)!=(f|0)){p()}break a;case 0:case 1:break a;default:break b}}e=a+8|0;Og(a,a+4|0,e);if((Ba|0)!=(f|0)){p()}d=a+12|0;while(1){x[c+16>>2]=d;if((b|0)==(d|0)){break a}d=Jg(d,e);if((Ba|0)!=(f|0)){p()}c:{if(!d){break c}B[c+12>>2]=B[x[c+16>>2]>>2];x[c+8>>2]=e;d=x[c+16>>2];while(1){d:{B[d>>2]=B[x[c+8>>2]>>2];d=x[c+8>>2];if((d|0)==(a|0)){d=a;break d}e=d-4|0;x[c+8>>2]=e;e=Jg(c+12|0,e);if((Ba|0)!=(f|0)){p()}if(e){continue}}break}B[d>>2]=B[c+12>>2];h=h+1|0;if((h|0)!=8){break c}g=(x[c+16>>2]+4|0)==(b|0);break a}e=x[c+16>>2];d=e+4|0;continue}}ya=c+32|0;return g}function _e(a){var b=0,c=0,d=0,e=0,f=0,g=0;o(+a);e=j(1)|0;j(0)|0;d=e&2147483647;if(d>>>0>=1141899264){o(1.5707963267948966);e=j(1)|0;d=j(0)|0;o(+a);b=j(1)|0;j(0)|0;l(0,d|0);l(1,e&2147483647|b&-2147483648);g=+n();o(+a);b=j(1)|0;e=j(0)|0;b=b&2147483647;return(b|0)==2146435072&(e|0)!=0|b>>>0>2146435072?a:g}a:{b:{if(d>>>0<=1071382527){b=-1;if(d>>>0>=1044381696){break b}break a}a=F(a);if(d>>>0<=1072889855){if(d>>>0<=1072037887){a=(a+a+-1)/(a+2);b=0;break b}a=(a+-1)/(a+1);b=1;break b}if(d>>>0<=1073971199){a=(a+-1.5)/(a*1.5+1);b=2;break b}a=-1/a;b=3}f=a*a;c=f*f;g=c*(c*(c*(c*(c*-.036531572744216916+-.058335701337905735)+-.0769187620504483)+-.11111110405462356)+-.19999999999876483);f=f*(c*(c*(c*(c*(c*.016285820115365782+.049768779946159324)+.06661073137387531)+.09090887133436507)+.14285714272503466)+.3333333333333293);if(d>>>0<=1071382527){return a-a*(g+f)}b=b<<3;a=C[b+17152>>3]-(a*(g+f)-C[b+17184>>3]-a);a=(e|0)<0?-a:a}return a}function af(a,b){var c=0,d=0,e=0,f=0,g=0,h=E(0);f=Ba;if(!(((q(a),j(2))&2147483647)>>>0<2139095041&((q(b),j(2))&2147483647)>>>0<=2139095040)){return E(a+b)}c=(q(b),j(2));if((c|0)==1065353216){a=bf(a);if((Ba|0)!=(f|0)){p()}return a}g=c>>>30&2;d=(q(a),j(2));e=g|d>>>31;a:{b:{d=d&2147483647;c:{if(!d){d:{switch(e-2|0){case 0:return E(3.1415927410125732);case 1:break d;default:break c}}return E(-3.1415927410125732)}c=c&2147483647;if((c|0)!=2139095040){if(!c|!((d|0)!=2139095040&d>>>0<=c+218103808>>>0)){break a}e:{if(g){if(c>>>0>d+218103808>>>0){break e}}h=bf(E(F(E(a/b))));if((Ba|0)!=(f|0)){p()}}a=h;f:{switch(e|0){case 1:return E(-a);case 2:return E(E(3.1415927410125732)-E(a+E(8.742277657347586e-8)));case 0:break c;default:break f}}return E(E(a+E(8.742277657347586e-8))+E(-3.1415927410125732))}if((d|0)==2139095040){break b}a=B[(e<<2)+17296>>2]}return a}return B[(e<<2)+17280>>2]}return l(2,(q(a),j(2))&-2147483648|1070141403),r()}function Ob(a,b,c,d){var e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];h=x[b+16>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}a:{b:{c:{d:{if((Ba|0)==2|b){if(!Ba){if(!c){break d}if(!d){break c}a=x[a>>2];h=x[x[a>>2]+24>>2]}if(!Ba|!f){Ea[h|0](a,b,c,d);if((Ba|0)==1){break b}}if(!Ba){return}}if(!Ba|(f|0)==1){e=Jb(51780,5399);g=1;if((Ba|0)==1){break b}a=e}if(!Ba|(f|0)==2){Kb(a);g=2;if((Ba|0)==1){break b}}if(!Ba){break a}}if(!Ba|(f|0)==3){e=Jb(51780,1574);g=3;if((Ba|0)==1){break b}a=e}if(!Ba|(f|0)==4){Kb(a);g=4;if((Ba|0)==1){break b}}if(!Ba){break a}}if(!Ba|(f|0)==5){e=Jb(51780,1608);g=5;if((Ba|0)==1){break b}a=e}if(!Ba|(f|0)==6){Kb(a);g=6;if((Ba|0)==1){break b}}if(!Ba){break a}return}x[x[Ca>>2]>>2]=g;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=h;x[Ca>>2]=x[Ca>>2]+20;return}a=nr(4);x[a>>2]=0;$(a|0,12860,0);p()}function Cp(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0;a=ya-16|0;ya=a;x[a+12>>2]=c;x[a+8>>2]=f;j=a+12|0;x[j>>2]=c;b=a+8|0;x[b>>2]=f;f=x[j>>2];a:{while(1){if(d>>>0<=f>>>0){c=0;break a}c=2;f=x[f>>2];if(f>>>0>1114111|(f&-2048)==55296){break a}b:{c:{if(f>>>0<=127){c=1;i=x[b>>2];if((g-i|0)<=0){break a}x[b>>2]=i+1;v[i|0]=f;break c}if(f>>>0<=2047){c=x[b>>2];if((g-c|0)<2){break b}x[b>>2]=c+1;v[c|0]=f>>>6|192;c=x[b>>2];x[b>>2]=c+1;v[c|0]=f&63|128;break c}c=x[b>>2];i=g-c|0;if(f>>>0<=65535){if((i|0)<3){break b}x[b>>2]=c+1;v[c|0]=f>>>12|224;c=x[b>>2];x[b>>2]=c+1;v[c|0]=f>>>6&63|128;c=x[b>>2];x[b>>2]=c+1;v[c|0]=f&63|128;break c}if((i|0)<4){break b}x[b>>2]=c+1;v[c|0]=f>>>18|240;c=x[b>>2];x[b>>2]=c+1;v[c|0]=f>>>12&63|128;c=x[b>>2];x[b>>2]=c+1;v[c|0]=f>>>6&63|128;c=x[b>>2];x[b>>2]=c+1;v[c|0]=f&63|128}f=x[j>>2]+4|0;x[j>>2]=f;continue}break}c=1}x[e>>2]=x[a+12>>2];x[h>>2]=x[a+8>>2];ya=a+16|0;return c|0}function Ep(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;a=c;a:{if((d-a|0)<3){break a}}while(1){b:{if(e>>>0<=h>>>0|a>>>0>=d>>>0){break b}b=v[a|0];g=b&255;c:{if((b|0)>=0){b=1;break c}if(b>>>0<4294967234){break b}if(b>>>0<=4294967263){if((y[a+1|0]&192)!=128|(d-a|0)<2){break b}b=2;break c}if(b>>>0<=4294967279){if((d-a|0)<3){break b}f=y[a+2|0];b=y[a+1|0];d:{e:{if((g|0)!=237){if((g|0)!=224){break e}if((b&224)==160){break d}break b}if((b&224)!=128){break b}break d}if((b&192)!=128){break b}}if((f&192)!=128){break b}b=3;break c}if((d-a|0)<4|b>>>0>4294967284){break b}i=y[a+3|0];j=y[a+2|0];f=y[a+1|0];f:{g:{switch(g-240|0){case 0:if((f+112&255)>>>0>=48){break b}break f;case 4:if((f&240)!=128){break b}break f;default:break g}}if((f&192)!=128){break b}}if((j&192)!=128|(i&192)!=128){break b}b=4;if((i&63|(j<<6&4032|(g<<18&1835008|(f&63)<<12)))>>>0>1114111){break b}}h=h+1|0;a=a+b|0;continue}break}return a-c|0}function Dk(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;h=Ba;g=ya-32|0;ya=g;f=d&2147483647;e=f-1065418752|0;i=f-1082064896|0;a:{if((e|0)==(i|0)&0|e>>>0>>0){f=(d&33554431)<<7|c>>>25;e=0;h=e;c=c&33554431;if(!(!e&(c|0)==16777216?!(a|b):!e&c>>>0<16777216)){e=f+1073741825|0;break a}e=f+1073741824|0;if(c^16777216|a|(b|h)){break a}e=(f&1)+e|0;break a}if(!(!c&(f|0)==2147418112?!(a|b):f>>>0<2147418112)){e=((d&33554431)<<7|c>>>25)&4194303|2143289344;break a}e=2139095040;if(f>>>0>1082064895){break a}e=0;f=f>>>16|0;if(f>>>0<16145){break a}e=d&65535|65536;Dg(g+16|0,a,b,c,e,f-16129|0);if((Ba|0)!=(h|0)){p()}Eg(g,a,b,c,e,16257-f|0);if((Ba|0)!=(h|0)){p()}a=x[g+8>>2];e=(x[g+12>>2]&33554431)<<7|a>>>25;c=x[g>>2]|(x[g+16>>2]|x[g+24>>2]|(x[g+20>>2]|x[g+28>>2]))!=0;f=x[g+4>>2];b=0;a=a&33554431;if(!(!b&(a|0)==16777216?!(c|f):!b&a>>>0<16777216)){e=e+1|0;break a}if(a^16777216|c|(b|f)){break a}e=(e&1)+e|0}ya=g+32|0;return l(2,d&-2147483648|e),r()}function Yh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];h=x[b+20>>2];f=x[b+24>>2];i=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){d=ya;e=d-16|0;ya=e}a:{while(1){b:{if(!Ba){if((c|0)<=(h|0)){break b}d=x[a+12>>2];f=x[a+16>>2];i=d>>>0>>0}c:{if(!Ba){if(i){x[e+12>>2]=2147483647;x[e+8>>2]=f-d>>2;x[e+4>>2]=c-h;d=x[fh(e+12|0,fh(e+8|0,e+4|0))>>2];Zh(b,x[a+12>>2],d);f=d<<2;i=f;x[a+12>>2]=f+x[a+12>>2];b=b+f|0;break c}d=x[x[a>>2]+40>>2]}if(!Ba|!j){g=Ea[d|0](a)|0;if((Ba|0)==1){break a}d=g}if(!Ba){f=(d|0)==-1;if(f){break b}x[b>>2]=d;d=1;b=b+4|0}}if(!Ba){h=d+h|0;continue}}break}if(!Ba){ya=e+16|0;return h|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=h;x[g+24>>2]=f;x[g+28>>2]=i;x[Ca>>2]=x[Ca>>2]+32;return 0}function rb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;b=x[Ca>>2];a=x[b>>2];g=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){e=x[a+24>>2]/2|0;c=x[a+32>>2];f=(b|0)/2|0;d=f+1|0;g=sb(d);a:{b:{c:{if(!c){break c}e=e+1|0;if(!e){break c}d=d>>>0>e>>>0?e:d;if((d|0)<=0){break b}lf(g,c,d<<3);break b}if(!c){break a}}zg(c)}e=a+16|0;x[a+24>>2]=b;x[a+32>>2]=g;d=0;c=x[a+20>>2];if(c){c=(D(b,16e3)|0)/(c|0)|0;c=(c|0)<(f|0)?c:f}else{c=0}x[a+28>>2]=c;g=x[x[a+16>>2]+28>>2]}d:{if(!Ba|!h){Ea[g|0](e);if((Ba|0)==1){break d}}if(!Ba){x[a+44>>2]=b;c=x[a+40>>2];if(c){c=(D(b,16e3)|0)/(c|0)|0;d=(c|0)<(f|0)?c:f}x[a+64>>2]=0;x[a+68>>2]=0;x[a+8>>2]=b;x[a+48>>2]=d;x[a+72>>2]=0;x[a+76>>2]=0}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=g;x[c+12>>2]=d;x[c+16>>2]=e;x[c+20>>2]=f;x[Ca>>2]=x[Ca>>2]+24}function eh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];h=x[b+20>>2];g=x[b+24>>2];i=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){d=ya;e=d-16|0;ya=e}a:{while(1){b:{if(!Ba){if((c|0)<=(h|0)){break b}d=x[a+12>>2];g=x[a+16>>2];i=d>>>0>>0}c:{if(!Ba){if(i){x[e+12>>2]=2147483647;x[e+8>>2]=g-d;x[e+4>>2]=c-h;i=e+4|0;d=x[fh(e+12|0,fh(e+8|0,i))>>2];gh(b,x[a+12>>2],d);g=x[a+12>>2]+d|0;x[a+12>>2]=g;break c}d=x[x[a>>2]+40>>2]}if(!Ba|!j){f=Ea[d|0](a)|0;if((Ba|0)==1){break a}d=f}if(!Ba){g=(d|0)==-1;if(g){break b}v[b|0]=d<<24>>24;d=1}}if(!Ba){b=b+d|0;h=d+h|0;continue}}break}if(!Ba){ya=e+16|0;return h|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=h;x[f+24>>2]=g;x[f+28>>2]=i;x[Ca>>2]=x[Ca>>2]+32;return 0}function Hl(a,b,c){var d=0,e=0,f=0,g=E(0),h=0,i=0,j=E(0);if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];f=x[b+16>>2];g=B[b+20>>2];h=x[b+24>>2];i=x[b+28>>2];j=B[b+32>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}if(!Ba){f=ya-16|0;ya=f;d=(a|0)!=(b|0)}a:{b:{c:{d:{if((Ba|0)==2|d){if(!Ba){i=x[12163];x[12163]=0;Ol();d=ya-16|0;ya=d;h=f+12|0}if(!Ba|!e){Xk(d,a,h,0);if((Ba|0)==1){break a}}if(!Ba){g=Dk(x[d>>2],x[d+4>>2],x[d+8>>2],x[d+12>>2]);ya=d+16|0;a=x[12163];if(!a){break d}if(x[f+12>>2]!=(b|0)){break c}j=g;if((a|0)!=68){break b}break c}}if(!Ba){x[c>>2]=4;break b}}if(!Ba){x[12163]=i;if(x[f+12>>2]==(b|0)){break b}}}if(!Ba){x[c>>2]=4;g=j}}if(!Ba){ya=f+16|0;return g}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=f;B[e+20>>2]=g;x[e+24>>2]=h;x[e+28>>2]=i;B[e+32>>2]=j;x[Ca>>2]=x[Ca>>2]+36;return E(0)}function Hc(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0;k=Ba;j=x[e+8>>2];g=j<<3;m=g+d|0;n=c+g|0;o=a+g|0;l=x[e+12>>2];if((l|0)>0){h=b+g|0;b=0;while(1){g=b<<3;f=C[g+n>>3];i=C[g+m>>3];C[g+o>>3]=M(f*f+i*i);g=g+h|0;f=$e(i,f);if((Ba|0)!=(k|0)){p()}C[g>>3]=f;b=b+1|0;if((l|0)!=(b|0)){continue}break}}g=x[e>>2];a:{if((g|0)>=(j|0)){break a}h=j-g|0;if((h|0)<=0){break a}b=g<<3;d=b+d|0;c=b+c|0;k=a+b|0;q=h&1;b=0;if((g+1|0)!=(j|0)){r=h&-2;a=0;while(1){h=b<<3;f=C[h+c>>3];i=f*f;f=C[d+h>>3];C[h+k>>3]=M(i+f*f);h=h|8;f=C[h+c>>3];i=f*f;f=C[d+h>>3];C[h+k>>3]=M(i+f*f);b=b+2|0;a=a+2|0;if((r|0)!=(a|0)){continue}break}}if(!q){break a}a=b<<3;f=C[a+c>>3];i=f*f;f=C[a+d>>3];C[a+k>>3]=M(i+f*f)}a=x[e+4>>2]+g|0;b=j+l|0;b:{if((a|0)<=(b|0)){break b}c=a-b|0;if((c|0)<=0){break b}a=l<<3;d=a+m|0;e=a+n|0;j=a+o|0;a=0;while(1){b=a<<3;f=C[b+e>>3];i=f*f;f=C[b+d>>3];C[b+j>>3]=M(i+f*f);a=a+1|0;if((c|0)!=(a|0)){continue}break}}}function Ap(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;a=c;a:{if((d-a|0)<3){break a}}while(1){b:{if(e>>>0<=g>>>0|a>>>0>=d>>>0){break b}b=y[a|0];f=a+1|0;c:{if(b<<24>>24>=0){break c}if(b>>>0<194){break b}if(b>>>0<=223){if((y[a+1|0]&192)!=128|(d-a|0)<2){break b}f=a+2|0;break c}if(b>>>0<=239){if((d-a|0)<3){break b}h=y[a+2|0];f=y[a+1|0];d:{e:{if((b|0)!=237){if((b|0)!=224){break e}if((f&224)==160){break d}break b}if((f&224)!=128){break b}break d}if((f&192)!=128){break b}}if((h&192)!=128){break b}f=a+3|0;break c}if((d-a|0)<4|b>>>0>244|e-g>>>0<2){break b}h=y[a+3|0];i=y[a+2|0];f=y[a+1|0];f:{g:{switch(b-240|0){case 0:if((f+112&255)>>>0>=48){break b}break f;case 4:if((f&240)!=128){break b}break f;default:break g}}if((f&192)!=128){break b}}if((i&192)!=128|(h&192)!=128|(h&63|(i<<6&4032|(b<<18&1835008|(f&63)<<12)))>>>0>1114111){break b}g=g+1|0;f=a+4|0}a=f;g=g+1|0;continue}break}return a-c|0}function kd(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0;w=Ba;j=x[a+32>>2];i=C[b>>3];e=x[a+8>>2];h=C[(e<<3)+b>>3];C[j>>3]=i+h;g=x[a+36>>2];C[g>>3]=i-h;if((e|0)>=2){y=(e|0)/2|0;o=x[a+28>>2];while(1){f=f+1|0;m=f<<3;h=C[m+b>>3];n=e-f<<3;k=C[n+b>>3];i=h+k;q=h-k;r=l<<3;s=C[(r|8)+o>>3];t=C[o+r>>3];h=C[c+m>>3];k=C[c+n>>3];u=h+k;v=q*s-t*u;C[j+m>>3]=i+v;C[j+n>>3]=i-v;i=q*t+s*u;C[g+m>>3]=h-k+i;C[g+n>>3]=k+(i-h);l=l+2|0;if((f|0)!=(y|0)){continue}break}}td(a,j,g,x[a+48>>2],x[a+52>>2],1);if((Ba|0)!=(w|0)){p()}b=x[a+8>>2];a:{if((b|0)<=0){break a}j=b&1;c=x[a+52>>2];a=x[a+48>>2];f=0;if((b|0)!=1){b=b&-2;l=0;while(1){e=(f<<4)+d|0;g=f<<3;C[e>>3]=C[g+a>>3];C[e+8>>3]=C[c+g>>3];e=f|1;g=(e<<4)+d|0;e=e<<3;C[g>>3]=C[e+a>>3];C[g+8>>3]=C[c+e>>3];f=f+2|0;l=l+2|0;if((b|0)!=(l|0)){continue}break}}if(!j){break a}b=(f<<4)+d|0;d=a;a=f<<3;C[b>>3]=C[d+a>>3];C[b+8>>3]=C[a+c>>3]}}function Kk(a,b){var c=0,d=0,e=0,f=0;d=Ba;a:{if(y[b|0]){break a}b=Jk(9727);if((Ba|0)!=(d|0)){p()}if(y[b|0]?b:0){break a}b=Jk(D(a,12)+36176|0);if((Ba|0)!=(d|0)){p()}if(y[b|0]?b:0){break a}b=Jk(9734);if((Ba|0)!=(d|0)){p()}if(y[b|0]?b:0){break a}b=10427}b:{while(1){e=y[b+c|0];if(!(!e|(e|0)==47)){e=23;c=c+1|0;if((c|0)!=23){continue}break b}break}e=c}f=10427;c:{d:{c=y[b|0];e:{f:{if(!(y[b+e|0]|(c|0)==46)){f=b;if((c|0)!=67){break f}}if(!y[f+1|0]){break e}}b=Hk(f,10427);if((Ba|0)!=(d|0)){p()}if(!b){break e}b=Hk(f,9675);if((Ba|0)!=(d|0)){p()}if(b){break d}}if(!a){c=35108;if(y[f+1|0]==46){break c}}return 0}c=x[13121];if(c){while(1){b=Hk(f,c+8|0);if((Ba|0)!=(d|0)){p()}if(!b){break c}c=x[c+32>>2];if(c){continue}break}}b=yg(36);if((Ba|0)!=(d|0)){p()}if(b){c=x[8778];x[b>>2]=x[8777];x[b+4>>2]=c;c=b+8|0;lf(c,f,e);if((Ba|0)!=(d|0)){p()}v[c+e|0]=0;x[b+32>>2]=x[13121];x[13121]=b}c=a|b?b:35108}return c}function ai(a){var b=0,c=0,d=0,e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;c=x[Ca>>2];a=x[c>>2];d=x[c+8>>2];e=x[c+12>>2];b=x[c+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}if(!Ba){e=ya-16|0;ya=e;b=x[(x[x[a>>2]-12>>2]+a|0)+24>>2]}a:{if((Ba|0)==2|b){if(!Ba){b=e+8|0;x[b+4>>2]=a;v[b|0]=0;d=qh(x[x[a>>2]-12>>2]+a|0)}if((Ba|0)==2|d){d=Ba?d:x[(x[x[a>>2]-12>>2]+a|0)+72>>2];if(d|(Ba|0)==2){d=Ba?d:x[(x[x[a>>2]-12>>2]+a|0)+72>>2];if(!Ba|!f){ai(d);if((Ba|0)==1){break a}}}if(!Ba){v[b|0]=1}}b=Ba?b:!y[e+8|0];b:{if(!Ba){if(b){break b}b=x[(x[x[a>>2]-12>>2]+a|0)+24>>2]}if(!Ba|(f|0)==1){c=yh(b);g=1;if((Ba|0)==1){break a}b=c}if(!Ba){if((b|0)!=-1){break b}a=x[x[a>>2]-12>>2]+a|0;xh(a,1)}}a=Ba?a:e+8|0;if(!Ba|(f|0)==2){Ih(a);g=2;if((Ba|0)==1){break a}}}if(!Ba){ya=e+16|0}return}x[x[Ca>>2]>>2]=g;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=e;x[Ca>>2]=x[Ca>>2]+16}function yd(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=Ba;x[a>>2]=b;x[a+4>>2]=((b|0)/2|0)+1;d=Mb(b);if((Ba|0)!=(e|0)){p()}if(b){while(1){g=d+(c<<2)|0;h=sb(b);if((Ba|0)!=(e|0)){p()}x[g>>2]=h;c=c+1|0;if((c|0)!=(b|0)){continue}break}}x[a+8>>2]=d;d=x[a>>2];b=Mb(d);if((Ba|0)!=(e|0)){p()}if(d){c=0;while(1){g=(c<<2)+b|0;h=sb(d);if((Ba|0)!=(e|0)){p()}x[g>>2]=h;c=c+1|0;if((d|0)!=(c|0)){continue}break}}x[a+12>>2]=b;d=x[a>>2];if((d|0)>0){g=x[a+8>>2];k=+(d|0);while(1){c=i<<2;h=x[c+b>>2];l=x[c+g>>2];m=+(i|0);c=0;while(1){j=c<<3;n=j+l|0;f=m*+(c|0)*3.141592653589793;f=(f+f)/k;o=cg(f);if((Ba|0)!=(e|0)){p()}C[n>>3]=o;j=h+j|0;f=gf(f);if((Ba|0)!=(e|0)){p()}C[j>>3]=f;c=c+1|0;if((d|0)!=(c|0)){continue}break}i=i+1|0;if((d|0)!=(i|0)){continue}break}}b=Mb(2);if((Ba|0)!=(e|0)){p()}c=sb(d);if((Ba|0)!=(e|0)){p()}x[b>>2]=c;d=sb(d);if((Ba|0)!=(e|0)){p()}x[b+4>>2]=d;x[a+16>>2]=b;return a}function Jf(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0,m=0,p=0,q=0,r=0;o(+a);b=j(1)|0;e=j(0)|0;a:{b:{c:{if(!(((b|0)>0|(b|0)>=0)&b>>>0>1048575)){o(+a);d=j(1)|0;if(!(j(0)|d&2147483647)){return-1/(a*a)}if((b|0)>0|(b|0)>=0){break c}return(a-a)/0}if(b>>>0>2146435071){break a}d=1072693248;m=-1023;if((b|0)!=1072693248){d=b;break b}if(e){break b}return 0}o(+(a*0x40000000000000));b=j(1)|0;e=j(0)|0;d=b;m=-1077}b=d+614242|0;p=+((b>>>20|0)+m|0);f=p*.30102999566361177;l(0,e|0);l(1,(b&1048575)+1072079006|0);c=+n()+-1;g=c*(c*.5);h=c/(c+2);i=h*h;a=i*i;o(+(c-g));b=j(1)|0;j(0)|0;l(0,0);l(1,b|0);k=+n();q=k*.4342944818781689;r=f+q;a=h*(g+(a*(a*(a*.15313837699209373+.22222198432149784)+.3999999999940942)+i*(a*(a*(a*.14798198605116586+.1818357216161805)+.2857142874366239)+.6666666666666735)))+(c-k-g);a=r+(q+(f-r)+(a*.4342944818781689+(p*3694239077158931e-28+(a+k)*25082946711645275e-27)))}return a}function od(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;m=Ba;j=x[a+40>>2];h=x[a+8>>2];if((h|0)>=0){k=h+1|0;l=k&3;if(h>>>0>=3){f=k&-4;while(1){C[(e<<3)+j>>3]=B[(e<<2)+b>>2];i=e|1;C[(i<<3)+j>>3]=B[(i<<2)+b>>2];i=e|2;C[(i<<3)+j>>3]=B[(i<<2)+b>>2];i=e|3;C[(i<<3)+j>>3]=B[(i<<2)+b>>2];e=e+4|0;g=g+4|0;if((f|0)!=(g|0)){continue}break}}if(l){g=0;while(1){C[(e<<3)+j>>3]=B[(e<<2)+b>>2];e=e+1|0;g=g+1|0;if((l|0)!=(g|0)){continue}break}}l=k&3;b=x[a+44>>2];g=0;e=0;if(h>>>0>=3){k=k&-4;h=0;while(1){C[b+(e<<3)>>3]=B[(e<<2)+c>>2];f=e|1;C[b+(f<<3)>>3]=B[(f<<2)+c>>2];f=e|2;C[b+(f<<3)>>3]=B[(f<<2)+c>>2];f=e|3;C[b+(f<<3)>>3]=B[(f<<2)+c>>2];e=e+4|0;h=h+4|0;if((k|0)!=(h|0)){continue}break}}if(l){while(1){C[b+(e<<3)>>3]=B[(e<<2)+c>>2];e=e+1|0;g=g+1|0;if((l|0)!=(g|0)){continue}break}}pd(a,j,b,d);if((Ba|0)!=(m|0)){p()}return}pd(a,j,x[a+44>>2],d);if((Ba|0)!=(m|0)){p()}}function Vf(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];f=x[b+16>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){c=x[b+76>>2];d=(c|0)>=0}a:{b:{c:{if(!Ba){if(d){d=!c;if(d){break c}d=x[12186];c=(d|0)!=(c&-1073741825);if(c){break c}}d:{c=a&255;d=(c|0)==x[b+80>>2];if(d){break d}d=x[b+20>>2];f=(d|0)==x[b+16>>2];if(f){break d}x[b+20>>2]=d+1;v[d|0]=a;break b}}if(!Ba|!g){e=Uf(b,c);if((Ba|0)==1){break a}a=e}if(!Ba){break b}}if(!Ba){d=b+76|0;Wf(d);f=a&255;c=(f|0)==x[b+80>>2]}e:{if(!Ba){f:{if(c){break f}c=x[b+20>>2];if((c|0)==x[b+16>>2]){break f}x[b+20>>2]=c+1;v[c|0]=a;break e}}if(!Ba|(g|0)==1){Uf(b,f);h=1;if((Ba|0)==1){break a}}}if(!Ba){Xf(d)}}return}x[x[Ca>>2]>>2]=h;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=f;x[Ca>>2]=x[Ca>>2]+20}function pd(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0;w=Ba;h=x[a+32>>2];i=C[b>>3];e=x[a+8>>2];g=C[(e<<3)+b>>3];C[h>>3]=i+g;j=x[a+36>>2];C[j>>3]=i-g;if((e|0)>=2){y=(e|0)/2|0;n=x[a+28>>2];while(1){k=k+1|0;f=k<<3;g=C[f+b>>3];m=e-k<<3;l=C[m+b>>3];i=g+l;o=g-l;r=q<<3;s=C[(r|8)+n>>3];t=C[n+r>>3];g=C[c+f>>3];l=C[c+m>>3];u=g+l;v=o*s-t*u;C[h+f>>3]=i+v;C[h+m>>3]=i-v;i=o*t+s*u;C[f+j>>3]=g-l+i;C[j+m>>3]=l+(i-g);q=q+2|0;if((k|0)!=(y|0)){continue}break}}td(a,h,j,x[a+48>>2],x[a+52>>2],1);if((Ba|0)!=(w|0)){p()}b=x[a+8>>2];a:{if((b|0)<=0){break a}j=b&1;c=x[a+52>>2];h=x[a+48>>2];a=0;if((b|0)!=1){k=b&-2;b=0;while(1){e=a<<3;f=e+d|0;B[f>>2]=C[e+h>>3];B[f+4>>2]=C[c+e>>3];e=e|8;f=e+d|0;B[f>>2]=C[e+h>>3];B[f+4>>2]=C[c+e>>3];a=a+2|0;b=b+2|0;if((k|0)!=(b|0)){continue}break}}if(!j){break a}a=a<<3;b=a+d|0;B[b>>2]=C[a+h>>3];B[b+4>>2]=C[a+c>>3]}}function Ym(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+12>>2];f=x[b+16>>2];g=x[b+20>>2];h=x[b+24>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){h=ya-16|0;ya=h;f=ya-16|0;ya=f;e=b>>>0<=1073741807}a:{b:{if((Ba|0)==2|e){if(!Ba){e=wq(b)}c:{if(!Ba){if(e){bj(a,b);e=a;break c}g=xq(b)+1|0;e=f+8|0}if(!Ba|!d){yq(e,a,g);if((Ba|0)==1){break a}}if(!Ba){e=x[f+8>>2];kj(a,e);lj(a,x[f+12>>2]);mj(a,b)}}if(!Ba){d=ya-16|0;ya=d;x[d+12>>2]=c;g=e;c=b;i=d+12|0;while(1){if(c){x[g>>2]=x[i>>2];c=c-1|0;g=g+4|0;continue}break}ya=d+16|0;x[f+4>>2]=0;bo((b<<2)+e|0,f+4|0);ya=f+16|0;break b}}if(!Ba){nj();p()}}if(!Ba){ya=h+16|0;return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=e;x[d+16>>2]=f;x[d+20>>2]=g;x[d+24>>2]=h;x[Ca>>2]=x[Ca>>2]+28;return 0}function em(a,b,c,d,e){var f=0,g=0,h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];g=x[b+20>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){g=ya-16|0;ya=g;f=g+12|0;vj(f,b);b=f}a:{if(!Ba|!h){f=bi(b);if((Ba|0)==1){break a}b=f}if(!Ba|(h|0)==1){jm(b,39344,39376,c);i=1;if((Ba|0)==1){break a}}b=Ba?b:g+12|0;if(!Ba|(h|0)==2){f=Ul(b);i=2;if((Ba|0)==1){break a}b=f}if(!Ba|(h|0)==3){f=lm(b);i=3;if((Ba|0)==1){break a}c=f}if(!Ba){x[d>>2]=c}if(!Ba|(h|0)==4){f=mm(b);i=4;if((Ba|0)==1){break a}c=f}if(!Ba){x[e>>2]=c}if(!Ba|(h|0)==5){nm(a,b);i=5;if((Ba|0)==1){break a}}a=Ba?a:g+12|0;if(!Ba|(h|0)==6){Po(a);i=6;if((Ba|0)==1){break a}}if(!Ba){ya=g+16|0}return}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[Ca>>2]=x[Ca>>2]+24}function oe(a,b,c){a=a|0;b=b|0;c=+c;var d=0,e=0,f=0,g=0,h=0,i=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;b=x[Ca>>2];a=x[b>>2];d=x[b+12>>2];e=x[b+8>>2];l(0,e|0);l(1,d|0);c=+n();g=x[b+16>>2];h=x[b+20>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}if(!Ba){a=x[x[12945]-12>>2]+51780|0;h=x[a+8>>2];x[a+8>>2]=10}a:{if(!Ba|!f){d=Ib(51780,12087,12);e=0;if((Ba|0)==1){break a}a=d}if(!Ba){g=gg(b)}if(!Ba|(f|0)==1){d=Ib(a,b,g);e=1;if((Ba|0)==1){break a}a=d}if(!Ba|(f|0)==2){d=Ib(a,12125,2);e=2;if((Ba|0)==1){break a}a=d}if(!Ba|(f|0)==3){d=Rh(a,c);e=3;if((Ba|0)==1){break a}a=d}if(!Ba|(f|0)==4){Ib(a,12218,1);e=4;if((Ba|0)==1){break a}}if(!Ba){x[(x[x[12945]-12>>2]+51780|0)+8>>2]=h}return}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;o(+c);a=j(1)|0;i=d,k=j(0)|0,x[i+8>>2]=k;x[d+12>>2]=a;x[d+16>>2]=g;x[d+20>>2]=h;x[Ca>>2]=x[Ca>>2]+24}function ed(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;f=Ba;fd(a,b,x[a+48>>2],x[a+52>>2]);if((Ba|0)!=(f|0)){p()}b=0;i=x[a+8>>2];a:{if((i|0)<0){break a}f=x[a+48>>2];e=i+1|0;j=e&3;if(i>>>0>=3){k=e&-4;while(1){B[(b<<2)+c>>2]=C[f+(b<<3)>>3];h=b|1;B[(h<<2)+c>>2]=C[f+(h<<3)>>3];h=b|2;B[(h<<2)+c>>2]=C[f+(h<<3)>>3];h=b|3;B[(h<<2)+c>>2]=C[f+(h<<3)>>3];b=b+4|0;g=g+4|0;if((k|0)!=(g|0)){continue}break}}if(j){g=0;while(1){B[(b<<2)+c>>2]=C[f+(b<<3)>>3];b=b+1|0;g=g+1|0;if((j|0)!=(g|0)){continue}break}}c=e&3;a=x[a+52>>2];f=0;b=0;if(i>>>0>=3){i=e&-4;g=0;while(1){B[(b<<2)+d>>2]=C[a+(b<<3)>>3];e=b|1;B[(e<<2)+d>>2]=C[a+(e<<3)>>3];e=b|2;B[(e<<2)+d>>2]=C[a+(e<<3)>>3];e=b|3;B[(e<<2)+d>>2]=C[a+(e<<3)>>3];b=b+4|0;g=g+4|0;if((i|0)!=(g|0)){continue}break}}if(!c){break a}while(1){B[(b<<2)+d>>2]=C[a+(b<<3)>>3];b=b+1|0;f=f+1|0;if((c|0)!=(f|0)){continue}break}}}function Fl(a,b,c,d,e){var f=0,g=0,h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];g=x[b+20>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){g=ya-16|0;ya=g;f=g+12|0;vj(f,b);b=f}a:{if(!Ba|!h){f=sh(b);if((Ba|0)==1){break a}b=f}if(!Ba|(h|0)==1){Nl(b,39344,39376,c);i=1;if((Ba|0)==1){break a}}b=Ba?b:g+12|0;if(!Ba|(h|0)==2){f=el(b);i=2;if((Ba|0)==1){break a}b=f}if(!Ba|(h|0)==3){f=lm(b);i=3;if((Ba|0)==1){break a}c=f}if(!Ba){v[d|0]=c}if(!Ba|(h|0)==4){f=mm(b);i=4;if((Ba|0)==1){break a}c=f}if(!Ba){v[e|0]=c}if(!Ba|(h|0)==5){nm(a,b);i=5;if((Ba|0)==1){break a}}a=Ba?a:g+12|0;if(!Ba|(h|0)==6){Po(a);i=6;if((Ba|0)==1){break a}}if(!Ba){ya=g+16|0}return}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[Ca>>2]=x[Ca>>2]+24}function vb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=E(0),h=0,i=E(0),j=E(0),k=0,l=E(0),m=0,n=0,o=0;if(!y[48576]){v[48576]=1;x[12143]=1068813832}if(!y[48584]){v[48584]=1;x[12145]=841731191}f=x[a+16>>2];e=x[a+12>>2];if((e|0)<=0){g=E(0)}else{l=B[12143];j=B[12145];o=+j;c=1;while(1){a=c;g=B[(a<<2)+b>>2];c=a+1|0;k=(g>j)+k|0;m=C[(a<<3)+f>>3];a:{if(m>o){i=E(+g/m);break a}i=E(0);if(!(g>j)){break a}i=l}h=(i>=l)+h|0;if((a|0)!=(e|0)){continue}break}g=E(h|0)}b:{if((e|0)<0){break b}c=e+1|0;n=c&3;h=0;a=0;if(e>>>0>=3){e=c&-4;c=0;while(1){C[(a<<3)+f>>3]=B[(a<<2)+b>>2];d=a|1;C[(d<<3)+f>>3]=B[(d<<2)+b>>2];d=a|2;C[(d<<3)+f>>3]=B[(d<<2)+b>>2];d=a|3;C[(d<<3)+f>>3]=B[(d<<2)+b>>2];a=a+4|0;c=c+4|0;if((e|0)!=(c|0)){continue}break}}if(!n){break b}while(1){C[(a<<3)+f>>3]=B[(a<<2)+b>>2];a=a+1|0;h=h+1|0;if((n|0)!=(h|0)){continue}break}}if(!k){return E(E(0))}return E(E(g/E(k|0)))}function xo(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;g=x[Ca>>2];a=x[g>>2];b=x[g+4>>2];c=x[g+8>>2];d=x[g+12>>2];e=x[g+16>>2];f=x[g+20>>2];g=x[g+24>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){e=ya-16|0;ya=e;b=!ti(f)}a:{b:{if(!Ba){if(b){x[a+8>>2]=x[f+8>>2];b=x[f+4>>2];x[a>>2]=x[f>>2];x[a+4>>2]=b;break b}d=x[f>>2];c=ya-16|0;ya=c;f=x[f+4>>2];b=wq(f)}c:{d:{e:{if(!Ba){if(b){b=a;bj(a,f);break e}if(f>>>0>1073741807){break d}g=xq(f)+1|0;b=c+8|0}if(!Ba|!h){yq(b,a,g);if((Ba|0)==1){break a}}if(!Ba){b=x[c+8>>2];kj(a,b);lj(a,x[c+12>>2]);mj(a,f)}}if(!Ba){Zh(b,d,f+1|0);ya=c+16|0;break c}}if(!Ba){nj();p()}}}if(!Ba){ya=e+16|0}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[Ca>>2]=x[Ca>>2]+28}function Mn(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];c=x[e+8>>2];f=x[e+12>>2];h=x[e+16>>2];g=x[e+20>>2];i=x[e+24>>2];e=x[e+28>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){g=ya-16|0;ya=g;f=x[On(a)>>2];d=x[c>>2]-x[a>>2]|0;a:{if(d>>>0<2147483647){d=d<<1;break a}d=-1}h=d>>>0<=1?1:d;i=x[b>>2];e=x[a>>2];d=Ag((f|0)!=268?x[a>>2]:0,h)}b:{if((Ba|0)==2|d){if(!Ba){if((f|0)!=268){Xf(a)}x[g+4>>2]=267;f=kl(g+8|0,d,g+4|0)}if(!Ba|!j){Yn(a,f);d=0;if((Ba|0)==1){break b}}if(!Ba|(j|0)==1){pl(f);d=1;if((Ba|0)==1){break b}}if(!Ba){x[b>>2]=x[a>>2]+(i-e|0);x[c>>2]=x[a>>2]+h;ya=g+16|0;return}}if(!Ba){Ji();p()}return}x[x[Ca>>2]>>2]=d;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=f;x[d+16>>2]=h;x[d+20>>2]=g;x[d+24>>2]=i;x[d+28>>2]=e;x[Ca>>2]=x[Ca>>2]+32}function Nn(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];c=x[e+8>>2];f=x[e+12>>2];h=x[e+16>>2];g=x[e+20>>2];i=x[e+24>>2];e=x[e+28>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){g=ya-16|0;ya=g;f=x[On(a)>>2];d=x[c>>2]-x[a>>2]|0;a:{if(d>>>0<2147483647){d=d<<1;break a}d=-1}h=d?d:4;i=x[b>>2];e=x[a>>2];d=Ag((f|0)!=268?x[a>>2]:0,h)}b:{if((Ba|0)==2|d){if(!Ba){if((f|0)!=268){Xf(a)}x[g+4>>2]=267;f=kl(g+8|0,d,g+4|0)}if(!Ba|!j){Yn(a,f);d=0;if((Ba|0)==1){break b}}if(!Ba|(j|0)==1){pl(f);d=1;if((Ba|0)==1){break b}}if(!Ba){x[b>>2]=x[a>>2]+(i-e|0);x[c>>2]=x[a>>2]+(h&-4);ya=g+16|0;return}}if(!Ba){Ji();p()}return}x[x[Ca>>2]>>2]=d;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=f;x[d+16>>2]=h;x[d+20>>2]=g;x[d+24>>2]=i;x[d+28>>2]=e;x[Ca>>2]=x[Ca>>2]+32}function Ei(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;h=Ba;if(A[b+24>>2]>A[b+44>>2]){x[b+44>>2]=x[b+24>>2]}m=-1;n=-1;i=f&24;a:{if(!i|(e|0)==1&(i|0)==24){break a}i=x[b+44>>2];if(i){j=ri(b+32|0);if((Ba|0)!=(h|0)){p()}j=i-j|0;k=j>>31}b:{c:{switch(e|0){case 1:if(f&8){g=x[b+12>>2]-x[b+8>>2]|0;l=g>>31;break b}g=x[b+24>>2]-x[b+20>>2]|0;l=g>>31;break b;case 0:break b;case 2:break c;default:break a}}g=j;l=k}d=d+l|0;c=c+g|0;d=g>>>0>c>>>0?d+1|0:d;if((d|0)<0|(c>>>0>j>>>0&(d|0)>=(k|0)|(d|0)>(k|0))){break a}e=f&8;d:{if(!(c|d)){break d}if(x[b+12>>2]?0:e){break a}if(!(f&16)){break d}if(!x[b+24>>2]){break a}}if(e){ni(b,x[b+8>>2],c+x[b+8>>2]|0,x[b+44>>2]);if((Ba|0)!=(h|0)){p()}}if(f&16){oi(b,x[b+20>>2],x[b+28>>2]);if((Ba|0)!=(h|0)){p()}pi(b,c);if((Ba|0)!=(h|0)){p()}}m=c;n=d}ch(a,m,n);if((Ba|0)!=(h|0)){p()}}function xk(a,b,c,d,e,f){var g=0,h=0;h=Ba;g=ya-80|0;ya=g;a:{if((f|0)>=16384){rk(g+32|0,b,c,d,e,0,0,0,2147352576);if((Ba|0)!=(h|0)){p()}d=x[g+40>>2];e=x[g+44>>2];b=x[g+32>>2];c=x[g+36>>2];if(f>>>0<32767){f=f-16383|0;break a}rk(g+16|0,b,c,d,e,0,0,0,2147352576);if((Ba|0)!=(h|0)){p()}f=((f|0)>=49149?49149:f)-32766|0;d=x[g+24>>2];e=x[g+28>>2];b=x[g+16>>2];c=x[g+20>>2];break a}if((f|0)>-16383){break a}rk(g- -64|0,b,c,d,e,0,0,0,7471104);if((Ba|0)!=(h|0)){p()}d=x[g+72>>2];e=x[g+76>>2];b=x[g+64>>2];c=x[g+68>>2];if(f>>>0>4294934644){f=f+16269|0;break a}rk(g+48|0,b,c,d,e,0,0,0,7471104);if((Ba|0)!=(h|0)){p()}f=((f|0)<=-48920?-48920:f)+32538|0;d=x[g+56>>2];e=x[g+60>>2];b=x[g+48>>2];c=x[g+52>>2]}rk(g,b,c,d,e,0,0,0,f+16383<<16);if((Ba|0)!=(h|0)){p()}b=x[g+12>>2];x[a+8>>2]=x[g+8>>2];x[a+12>>2]=b;b=x[g+4>>2];x[a>>2]=x[g>>2];x[a+4>>2]=b;ya=g+80|0}function Is(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{if(b){if(!c){break j}break i}Da=0;a=(a>>>0)/(c>>>0)|0;break a}if(!a){break h}break g}if(!(c-1&c)){break f}f=(G(c)+33|0)-G(b)|0;g=0-f|0;break d}Da=0;a=(b>>>0)/0|0;break a}d=32-G(b)|0;if(d>>>0<31){break e}break c}if((c|0)==1){break b}f=Gs(c);c=f&31;if((f&63)>>>0>=32){a=b>>>c|0}else{d=b>>>c|0;a=((1<>>c}Da=d;break a}f=d+1|0;g=63-d|0}d=f&63;e=d&31;if(d>>>0>=32){d=0;h=b>>>e|0}else{d=b>>>e|0;h=((1<>>e}g=g&63;e=g&31;if(g>>>0>=32){b=a<>>32-e|b<>>31;d=h<<1|b>>>31;e=l-(i+(d>>>0>g>>>0)|0)>>31;j=c&e;h=d-j|0;d=i-(d>>>0>>0)|0;b=b<<1|a>>>31;a=k|a<<1;k=e&1;f=f-1|0;if(f){continue}break}}Da=b<<1|a>>>31;a=k|a<<1;break a}a=0;b=0}Da=b}return a}function Qn(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;f=x[Ca>>2];a=x[f>>2];b=x[f+4>>2];d=x[f+8>>2];e=x[f+12>>2];g=x[f+16>>2];i=x[f+20>>2];h=x[f+24>>2];f=x[f+28>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){g=ya-16|0;ya=g;h=2147483631-b>>>0>=c>>>0;i=2147483631}a:{b:{if((Ba|0)==2|h){if(!Ba){h=ri(a);f=g+4|0;if((i>>>1|0)-16>>>0>b>>>0){x[g+12>>2]=b<<1;x[g+4>>2]=b+c;i=ij(x[Bi(f,g+12|0)>>2])+1|0}}if(!Ba|!j){jj(f,a,i);if((Ba|0)==1){break a}}if(!Ba){c=x[g+4>>2];if(e){gh(c,h,e)}if((d|0)!=(e|0)){gh(c+e|0,e+h|0,d-e|0)}b=b+1|0;if((b|0)!=11){aj(h)}kj(a,c);lj(a,x[g+8>>2]);ya=g+16|0;break b}}if(!Ba){nj();p()}}if(!Ba){mj(a,d)}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=e;x[c+16>>2]=g;x[c+20>>2]=i;x[c+24>>2]=h;x[c+28>>2]=f;x[Ca>>2]=x[Ca>>2]+32}function Ef(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;i=Ba;e=ya-32|0;ya=e;d=x[a+28>>2];x[e+16>>2]=d;g=x[a+20>>2];x[e+28>>2]=c;x[e+24>>2]=b;b=g-d|0;x[e+20>>2]=b;g=b+c|0;b=e+16|0;j=2;d=oa(x[a+60>>2],b|0,2,e+12|0)|0;if((Ba|0)!=(i|0)){p()}d=ug(d);if((Ba|0)!=(i|0)){p()}a:{b:{c:{d:{if(d){d=b;break d}while(1){f=x[e+12>>2];if((f|0)==(g|0)){break c}if((f|0)<0){d=b;break b}h=x[b+4>>2];k=h>>>0>>0;d=(k<<3)+b|0;h=f-(k?h:0)|0;x[d>>2]=h+x[d>>2];b=(k?12:4)+b|0;x[b>>2]=x[b>>2]-h;g=g-f|0;b=d;j=j-k|0;f=oa(x[a+60>>2],b|0,j|0,e+12|0)|0;if((Ba|0)!=(i|0)){p()}f=ug(f);if((Ba|0)!=(i|0)){p()}if(!f){continue}break}}if((g|0)!=-1){break b}}b=x[a+44>>2];x[a+28>>2]=b;x[a+20>>2]=b;x[a+16>>2]=b+x[a+48>>2];a=c;break a}x[a+28>>2]=0;x[a+16>>2]=0;x[a+20>>2]=0;x[a>>2]=x[a>>2]|32;a=0;if((j|0)==2){break a}a=c-x[d+4>>2]|0}ya=e+32|0;return a|0}function Jk(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;b=a;a:{if(b&3){while(1){c=y[b|0];if(!c|(c|0)==61){break a}b=b+1|0;if(b&3){continue}break}}c=x[b>>2];b:{if((c^-1)&c-16843009&-2139062144){break b}while(1){c=c^1027423549;if((c^-1)&c-16843009&-2139062144){break b}c=x[b+4>>2];b=b+4|0;if(!(c-16843009&(c^-1)&-2139062144)){continue}break}}while(1){c=b;d=y[b|0];if(d){b=b+1|0;if((d|0)!=61){continue}}break}b=c}if((a|0)==(b|0)){return 0}g=b-a|0;c:{if(y[g+a|0]){break c}e=x[13119];if(!e){break c}b=x[e>>2];if(!b){break c}while(1){d:{c=a;h=g;f=0;e:{if(!g){break e}d=y[c|0];if(d){f:{while(1){f=y[b|0];if((f|0)!=(d|0)|!f){break f}h=h-1|0;if(!h){break f}b=b+1|0;d=y[c+1|0];c=c+1|0;if(d){continue}break}d=0}}else{d=0}f=d-y[b|0]|0}if(!f){b=g+x[e>>2]|0;if(y[b|0]==61){break d}}b=x[e+4>>2];e=e+4|0;if(b){continue}break c}break}i=b+1|0}return i}function Rd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=E(0);if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;d=x[Ca>>2];a=x[d>>2];b=x[d+4>>2];c=x[d+8>>2];d=x[d+12>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}d=Ba?d:x[x[a>>2]+16>>2];a:{if(!Ba|!e){Ea[d|0](a);if((Ba|0)==1){break a}}if(!Ba){f=x[a+12>>2];a=x[f+4>>2];d=Mb(a<<1);if((a|0)>0){nf(d,0,a<<3)}e=x[f+4>>2];b:{c:{if((e|0)>0){h=e&1;a=0;if((e|0)!=1){i=e&-2;e=0;while(1){j=d+(a<<3)|0,k=E(If(+B[(a<<2)+b>>2]+1e-6)),B[j>>2]=k;g=a|1;j=d+(g<<3)|0,k=E(If(+B[(g<<2)+b>>2]+1e-6)),B[j>>2]=k;a=a+2|0;e=e+2|0;if((i|0)!=(e|0)){continue}break}}if(h){j=d+(a<<3)|0,k=E(If(+B[(a<<2)+b>>2]+1e-6)),B[j>>2]=k}Pd(f,d,c);break c}Pd(f,d,c);if(!d){break b}}zg(d)}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[Ca>>2]=x[Ca>>2]+16}function fo(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;f=x[Ca>>2];a=x[f>>2];b=x[f+4>>2];d=x[f+8>>2];e=x[f+12>>2];g=x[f+16>>2];i=x[f+20>>2];h=x[f+24>>2];f=x[f+28>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){g=ya-16|0;ya=g;i=1073741807;h=i-b>>>0>=c>>>0}a:{b:{if((Ba|0)==2|h){if(!Ba){h=ri(a);f=g+4|0;if((i>>>1|0)-16>>>0>b>>>0){x[g+12>>2]=b<<1;x[g+4>>2]=b+c;i=xq(x[Bi(f,g+12|0)>>2])+1|0}}if(!Ba|!j){yq(f,a,i);if((Ba|0)==1){break a}}if(!Ba){c=x[g+4>>2];if(e){Zh(c,h,e)}if((d|0)!=(e|0)){f=e<<2;Zh(f+c|0,f+h|0,d-e|0)}if((b|0)!=1){Bq(h)}kj(a,c);lj(a,x[g+8>>2]);ya=g+16|0;break b}}if(!Ba){nj();p()}}if(!Ba){mj(a,d)}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=e;x[c+16>>2]=g;x[c+20>>2]=i;x[c+24>>2]=h;x[c+28>>2]=f;x[Ca>>2]=x[Ca>>2]+32}function In(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;d=x[Ca>>2];a=x[d>>2];b=x[d+4>>2];c=x[d+8>>2];f=x[d+12>>2];g=x[d+16>>2];h=x[d+20>>2];d=x[d+24>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}if(!Ba){g=ya-16|0;ya=g;c=!ti(b)}a:{b:{if(!Ba){if(c){x[a+8>>2]=x[b+8>>2];c=x[b+4>>2];x[a>>2]=x[b>>2];x[a+4>>2]=c;break b}h=x[b>>2];f=ya-16|0;ya=f;b=x[b+4>>2];c=hj(b)}c:{d:{e:{if(!Ba){if(c){c=a;bj(a,b);break e}if(b>>>0>2147483631){break d}d=ij(b)+1|0;c=f+8|0}if(!Ba|!e){jj(c,a,d);if((Ba|0)==1){break a}}if(!Ba){c=x[f+8>>2];kj(a,c);lj(a,x[f+12>>2]);mj(a,b)}}if(!Ba){gh(c,h,b+1|0);ya=f+16|0;break c}}if(!Ba){nj();p()}}}if(!Ba){ya=g+16|0}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=f;x[e+16>>2]=g;x[e+20>>2]=h;x[e+24>>2]=d;x[Ca>>2]=x[Ca>>2]+28}function rr(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];g=x[b+20>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){d=ya+-64|0;ya=d;g=qr(a,b,0);e=1}a:{b:{if(!Ba){if(g){break b}e=0;g=!b;if(g){break b}}if(!Ba|!h){f=sr(b,46212);if((Ba|0)==1){break a}b=f}if(!Ba){e=0;if(!b){break b}nf(d+12|0,0,52);x[d+56>>2]=1;x[d+20>>2]=-1;x[d+16>>2]=a;x[d+8>>2]=b;e=x[c>>2];g=x[x[b>>2]+28>>2];a=d+8|0}if(!Ba|(h|0)==1){Ea[g|0](b,a,e,1);i=1;if((Ba|0)==1){break a}}if(!Ba){a=x[d+32>>2];if((a|0)==1){x[c>>2]=x[d+24>>2]}e=(a|0)==1}}if(!Ba){ya=d- -64|0;return e|0}p()}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[Ca>>2]=x[Ca>>2]+24;return 0}function rd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;l=Ba;i=x[a+44>>2];g=x[a+40>>2];h=x[a+8>>2];if((h|0)>=0){while(1){f=e<<3;dg(+B[(e<<2)+c>>2],f+i|0,g+f|0);if((Ba|0)!=(l|0)){p()}f=(e|0)==(h|0);e=e+1|0;if(!f){continue}break}c=h+1|0;a:{if(!h){e=0;break a}k=c&-2;e=0;f=0;while(1){j=g+(e<<3)|0;C[j>>3]=C[j>>3]*+B[(e<<2)+b>>2];j=e|1;m=g+(j<<3)|0;C[m>>3]=C[m>>3]*+B[(j<<2)+b>>2];e=e+2|0;f=f+2|0;if((k|0)!=(f|0)){continue}break}}if(!(h&1)){g=g+(e<<3)|0;C[g>>3]=C[g>>3]*+B[(e<<2)+b>>2]}b:{if(!h){e=0;break b}g=c&-2;e=0;c=0;while(1){f=(e<<3)+i|0;C[f>>3]=C[f>>3]*+B[(e<<2)+b>>2];f=e|1;k=(f<<3)+i|0;C[k>>3]=C[k>>3]*+B[(f<<2)+b>>2];e=e+2|0;c=c+2|0;if((g|0)!=(c|0)){continue}break}}if(!(h&1)){c=(e<<3)+i|0;C[c>>3]=C[c>>3]*+B[(e<<2)+b>>2]}i=x[a+44>>2];g=x[a+40>>2]}pd(a,g,i,d);if((Ba|0)!=(l|0)){p()}}function Md(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;d=x[Ca>>2];a=x[d>>2];b=x[d+4>>2];c=x[d+8>>2];d=x[d+12>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}d=Ba?d:x[x[a>>2]+20>>2];a:{if(!Ba|!e){Ea[d|0](a);if((Ba|0)==1){break a}}if(!Ba){f=x[a+8>>2];a=x[f+4>>2];d=sb(a<<1);if((a|0)>0){nf(d,0,a<<4)}e=x[f+4>>2];b:{c:{if((e|0)>0){h=e&1;a=0;if((e|0)!=1){i=e&-2;e=0;while(1){j=d+(a<<4)|0,k=If(C[(a<<3)+b>>3]+1e-6),C[j>>3]=k;g=a|1;j=d+(g<<4)|0,k=If(C[(g<<3)+b>>3]+1e-6),C[j>>3]=k;a=a+2|0;e=e+2|0;if((i|0)!=(e|0)){continue}break}}if(h){j=d+(a<<4)|0,k=If(C[(a<<3)+b>>3]+1e-6),C[j>>3]=k}Kd(f,d,c);break c}Kd(f,d,c);if(!d){break b}}zg(d)}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[Ca>>2]=x[Ca>>2]+16}function Fm(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];f=x[b+16>>2];h=x[b+20>>2];g=x[b+24>>2];i=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){f=ya-16|0;ya=f;x[f+12>>2]=b;x[f+8>>2]=d;d=Rl(f+4|0,f+12|0);g=ya-16|0;ya=g;b=x[f+8>>2];x[g+12>>2]=b;x[g+8>>2]=b;h=-1}a:{if(!Ba|!j){e=Ok(0,0,c,b);if((Ba|0)==1){break a}b=e}i=Ba?i:(b|0)<0;b:{if(!Ba){if(i){break b}e=a;a=b+1|0;b=yg(a);x[e>>2]=b;if(!b){break b}h=x[g+12>>2]}if(!Ba|(j|0)==1){e=Ok(b,a,c,h);k=1;if((Ba|0)==1){break a}h=e}}if(!Ba){ya=g+16|0;Sl(d);ya=f+16|0;return h}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=f;x[e+20>>2]=h;x[e+24>>2]=g;x[e+28>>2]=i;x[Ca>>2]=x[Ca>>2]+32;return 0}function jk(a,b){var c=0,d=0,e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];d=x[e+8>>2];f=x[e+12>>2];e=x[e+16>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}a:{if(!Ba){f=ya-16|0;ya=f;e=x[12204];if(x[b+72>>2]<=0){Cj(b)}x[12204]=x[b+136>>2];c=!x[b+4>>2]}if(c|(Ba|0)==2){if(!Ba|!g){Bf(b);if((Ba|0)==1){break a}}if(!Ba){d=!x[b+4>>2]}}if(!Ba){c=-1;b:{if(d|(a|0)==-1){break b}d=vg(f+12|0,a);if((d|0)<0){break b}g=x[b+4>>2];if(g>>>0<(d+x[b+44>>2]|0)-8>>>0){break b}c:{if(a>>>0<=127){d=g-1|0;x[b+4>>2]=d;v[d|0]=a;break c}c=g-d|0;x[b+4>>2]=c;lf(c,f+12|0,d)}x[b>>2]=x[b>>2]&-17;c=a}x[12204]=e;ya=f+16|0;return(c|0)!=-1}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=f;x[c+16>>2]=e;x[Ca>>2]=x[Ca>>2]+20;return 0}function bf(a){var b=0,c=0,d=E(0),e=E(0),f=0,g=E(0);f=(q(a),j(2));c=f&2147483647;if(c>>>0>=1283457024){return((q(a),j(2))&2147483647)>>>0>2139095040?a:(l(2,(q(a),j(2))&-2147483648|1070141402),r())}a:{b:{if(c>>>0<=1054867455){b=-1;if(c>>>0>=964689920){break b}break a}a=E(F(a));if(c>>>0<=1066926079){if(c>>>0<=1060110335){a=E(E(E(a+a)+E(-1))/E(a+E(2)));b=0;break b}a=E(E(a+E(-1))/E(a+E(1)));b=1;break b}if(c>>>0<=1075576831){a=E(E(a+E(-1.5))/E(E(a*E(1.5))+E(1)));b=2;break b}a=E(E(-1)/a);b=3}e=E(a*a);d=E(e*e);g=E(d*E(E(d*E(-.106480173766613))+E(-.19999158382415771)));d=E(e*E(E(d*E(E(d*E(.06168760731816292))+E(.14253635704517365)))+E(.333333283662796)));if(c>>>0<=1054867455){return E(a-E(a*E(g+d)))}b=b<<2;a=E(B[b+17312>>2]-E(E(E(a*E(g+d))-B[b+17328>>2])-a));a=(f|0)<0?E(-a):a}return a}function Ld(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;e=x[Ca>>2];a=x[e>>2];c=x[e+8>>2];d=x[e+12>>2];f=x[e+16>>2];g=x[e+20>>2];b=x[e+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}f=Ba?f:x[x[a>>2]+20>>2];a:{if(!Ba|!j){Ea[f|0](a);if((Ba|0)==1){break a}}if(!Ba){e=ya-16|0;ya=e;f=x[a+8>>2];a=sb(x[f+4>>2]<<1);j=x[f+4>>2];b:{c:{if((j|0)>0){while(1){h=g<<3;dg(C[h+c>>3],e,e+8|0);i=C[b+h>>3];k=i*C[e+8>>3];C[e+8>>3]=k;i=i*C[e>>3];C[e>>3]=i;h=a+(g<<4)|0;C[h+8>>3]=i;C[h>>3]=k;g=g+1|0;if((j|0)!=(g|0)){continue}break}Kd(f,a,d);break c}Kd(f,a,d);if(!a){break b}}zg(a)}ya=e+16|0}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=f;x[e+20>>2]=g;x[Ca>>2]=x[Ca>>2]+24}function tl(a,b,c,d,e,f,g,h,i,j){var k=0,l=0,m=0,n=0;l=Ba;k=ya-16|0;ya=k;v[k+15|0]=a;a:{b:{c:{if(x[d>>2]!=(c|0)){break c}m=43;n=a&255;if((n|0)!=y[j+24|0]){m=45;if(y[j+25|0]!=(n|0)){break c}}x[d>>2]=c+1;v[c|0]=m;break b}g=ui(g);if((Ba|0)!=(l|0)){p()}if(!(!g|(a|0)!=(f|0))){a=0;b=x[i>>2];if((b-h|0)>159){break a}a=x[e>>2];x[i>>2]=b+4;x[b>>2]=a;break b}a=-1;f=Ql(j,j+26|0,k+15|0);if((Ba|0)!=(l|0)){p()}f=f-j|0;if((f|0)>23){break a}d:{e:{switch(b-8|0){case 0:case 2:if((b|0)>(f|0)){break d}break a;case 1:break d;default:break e}}if((b|0)!=16|(f|0)<22){break d}b=x[d>>2];if((b|0)==(c|0)|(b-c|0)>2|y[b-1|0]!=48){break a}a=0;x[e>>2]=0;x[d>>2]=b+1;v[b|0]=y[f+39344|0];break a}a=x[d>>2];x[d>>2]=a+1;v[a|0]=y[f+39344|0];x[e>>2]=x[e>>2]+1;a=0;break a}a=0;x[e>>2]=0}ya=k+16|0;return a}function mf(a,b,c){var d=0,e=0;d=Ba;a:{if((a|0)==(b|0)){break a}e=a+c|0;if(b-e>>>0<=0-(c<<1)>>>0){a=lf(a,b,c);if((Ba|0)!=(d|0)){p()}return a}d=(a^b)&3;b:{c:{if(a>>>0>>0){if(d){d=a;break b}if(!(a&3)){d=a;break c}d=a;while(1){if(!c){break a}v[d|0]=y[b|0];b=b+1|0;c=c-1|0;d=d+1|0;if(d&3){continue}break}break c}d:{if(d){break d}if(e&3){while(1){if(!c){break a}c=c-1|0;d=c+a|0;v[d|0]=y[b+c|0];if(d&3){continue}break}}if(c>>>0<=3){break d}while(1){c=c-4|0;x[c+a>>2]=x[b+c>>2];if(c>>>0>3){continue}break}}if(!c){break a}while(1){c=c-1|0;v[c+a|0]=y[b+c|0];if(c){continue}break}break a}if(c>>>0<=3){break b}while(1){x[d>>2]=x[b>>2];b=b+4|0;d=d+4|0;c=c-4|0;if(c>>>0>3){continue}break}}if(!c){break a}while(1){v[d|0]=y[b|0];d=d+1|0;b=b+1|0;c=c-1|0;if(c){continue}break}}return a}function bl(a,b,c){var d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];c=x[e+8>>2];d=x[e+12>>2];f=x[e+16>>2];h=x[e+20>>2];e=x[e+24>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){h=eo(b,c);f=ya-16|0;ya=f;d=h>>>0<=1073741807}a:{b:{if((Ba|0)==2|d){if(!Ba){d=wq(h)}c:{if(!Ba){if(d){bj(a,h);d=a;break c}e=xq(h)+1|0;d=f+8|0}if(!Ba|!g){yq(d,a,e);if((Ba|0)==1){break a}}if(!Ba){d=x[f+8>>2];kj(a,d);lj(a,x[f+12>>2]);mj(a,h)}}if(!Ba){while(1){if((b|0)!=(c|0)){bo(d,b);d=d+4|0;b=b+4|0;continue}break}x[f+4>>2]=0;bo(d,f+4|0);ya=f+16|0;break b}}if(!Ba){nj();p()}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=f;x[g+20>>2]=h;x[g+24>>2]=e;x[Ca>>2]=x[Ca>>2]+28}function _l(a,b,c,d,e,f,g,h,i,j){var k=0,l=0,m=0;l=Ba;k=ya-16|0;ya=k;x[k+12>>2]=a;a:{b:{c:{if(x[d>>2]!=(c|0)){break c}m=43;if(x[j+96>>2]!=(a|0)){m=45;if(x[j+100>>2]!=(a|0)){break c}}x[d>>2]=c+1;v[c|0]=m;break b}g=ui(g);if((Ba|0)!=(l|0)){p()}if(!(!g|(a|0)!=(f|0))){a=0;b=x[i>>2];if((b-h|0)>159){break a}a=x[e>>2];x[i>>2]=b+4;x[b>>2]=a;break b}a=-1;f=km(j,j+104|0,k+12|0);if((Ba|0)!=(l|0)){p()}f=f-j>>2;if((f|0)>23){break a}d:{e:{switch(b-8|0){case 0:case 2:if((b|0)>(f|0)){break d}break a;case 1:break d;default:break e}}if((b|0)!=16|(f|0)<22){break d}b=x[d>>2];if((b|0)==(c|0)|(b-c|0)>2|y[b-1|0]!=48){break a}a=0;x[e>>2]=0;x[d>>2]=b+1;v[b|0]=y[f+39344|0];break a}a=x[d>>2];x[d>>2]=a+1;v[a|0]=y[f+39344|0];x[e>>2]=x[e>>2]+1;a=0;break a}a=0;x[e>>2]=0}ya=k+16|0;return a}function si(a,b,c){var d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];c=x[e+8>>2];d=x[e+12>>2];f=x[e+16>>2];h=x[e+20>>2];e=x[e+24>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){h=fj(b,c);f=ya-16|0;ya=f;d=h>>>0<=2147483631}a:{b:{if((Ba|0)==2|d){if(!Ba){d=hj(h)}c:{if(!Ba){if(d){bj(a,h);d=a;break c}e=ij(h)+1|0;d=f+8|0}if(!Ba|!g){jj(d,a,e);if((Ba|0)==1){break a}}if(!Ba){d=x[f+8>>2];kj(a,d);lj(a,x[f+12>>2]);mj(a,h)}}if(!Ba){while(1){if((b|0)!=(c|0)){cj(d,b);d=d+1|0;b=b+1|0;continue}break}v[f+7|0]=0;cj(d,f+7|0);ya=f+16|0;break b}}if(!Ba){nj();p()}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=f;x[g+20>>2]=h;x[g+24>>2]=e;x[Ca>>2]=x[Ca>>2]+28}function bk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];f=x[b+16>>2];g=x[b+20>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}a:{d=Ba?d:!y[a+44|0];b:{if(d|(Ba|0)==2){if(!Ba){d=(c|0)>0;c=d?c:0}while(1){if(!Ba){if((c|0)==(f|0)){break b}d=jh(v[b|0]);g=x[x[a>>2]+52>>2]}if(!Ba|!h){e=Ea[g|0](a,d)|0;if((Ba|0)==1){break a}d=e}if(!Ba){d=(d|0)==-1;if(d){return f|0}else{b=b+1|0;f=f+1|0;continue}}break}}a=Ba?a:x[a+32>>2];if(!Ba|(h|0)==1){e=Tf(b,1,c,a);i=1;if((Ba|0)==1){break a}c=e}}if(!Ba){return c|0}p()}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=f;x[e+20>>2]=g;x[Ca>>2]=x[Ca>>2]+24;return 0}function Bj(a){var b=0,c=0,d=0,e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;c=x[Ca>>2];a=x[c>>2];d=x[c+8>>2];e=x[c+12>>2];b=x[c+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}if(!Ba){b=x[a+76>>2];d=(b|0)>=0}a:{b:{c:{if(!Ba){if(d){d=!b;if(d){break c}d=x[12186];b=(d|0)!=(b&-1073741825);if(b){break c}}b=x[a+4>>2];d=(b|0)!=x[a+8>>2];if(d){x[a+4>>2]=b+1;a=y[b|0];break b}}if(!Ba|!f){c=Cf(a);if((Ba|0)==1){break a}a=c}if(!Ba){break b}}if(!Ba){b=a+76|0;Wf(b);d=x[a+4>>2];e=(d|0)!=x[a+8>>2]}d:{if(!Ba&e){x[a+4>>2]=d+1;a=y[d|0];break d}if(!Ba|(f|0)==1){c=Cf(a);g=1;if((Ba|0)==1){break a}a=c}}if(!Ba){Xf(b)}}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=g;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=e;x[Ca>>2]=x[Ca>>2]+16;return 0}function lk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];f=x[b+16>>2];g=x[b+20>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}a:{d=Ba?d:!y[a+44|0];b:{if(d|(Ba|0)==2){if(!Ba){d=(c|0)>0;c=d?c:0}while(1){if(!Ba){if((c|0)==(f|0)){break b}g=x[x[a>>2]+52>>2];d=x[b>>2]}if(!Ba|!h){e=Ea[g|0](a,d)|0;if((Ba|0)==1){break a}d=e}if(!Ba){d=(d|0)==-1;if(d){return f|0}else{b=b+4|0;f=f+1|0;continue}}break}}a=Ba?a:x[a+32>>2];if(!Ba|(h|0)==1){e=Tf(b,4,c,a);i=1;if((Ba|0)==1){break a}c=e}}if(!Ba){return c|0}p()}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=f;x[e+20>>2]=g;x[Ca>>2]=x[Ca>>2]+24;return 0}function Pp(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;d=x[Ca>>2];a=x[d>>2];b=x[d+4>>2];c=x[d+8>>2];e=x[d+12>>2];f=x[d+16>>2];h=x[d+20>>2];d=x[d+24>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){h=ya-16|0;ya=h;e=Zq(b);f=ya-16|0;ya=f;c=e>>>0<=1073741807}a:{b:{if((Ba|0)==2|c){if(!Ba){c=wq(e)}c:{if(!Ba){if(c){bj(a,e);c=a;break c}d=xq(e)+1|0;c=f+8|0}if(!Ba|!g){yq(c,a,d);if((Ba|0)==1){break a}}if(!Ba){c=x[f+8>>2];kj(a,c);lj(a,x[f+12>>2]);mj(a,e)}}if(!Ba){Zh(c,b,e);x[f+4>>2]=0;bo((e<<2)+c|0,f+4|0);ya=f+16|0;break b}}if(!Ba){nj();p()}}if(!Ba){ya=h+16|0}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=e;x[g+16>>2]=f;x[g+20>>2]=h;x[g+24>>2]=d;x[Ca>>2]=x[Ca>>2]+28}function Jm(a,b,c){var d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];c=x[e+8>>2];d=x[e+12>>2];f=x[e+16>>2];h=x[e+20>>2];e=x[e+24>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){h=ya-16|0;ya=h;f=ya-16|0;ya=f;d=b>>>0<=2147483631}a:{b:{if((Ba|0)==2|d){if(!Ba){d=hj(b)}c:{if(!Ba){if(d){bj(a,b);d=a;break c}e=ij(b)+1|0;d=f+8|0}if(!Ba|!g){jj(d,a,e);if((Ba|0)==1){break a}}if(!Ba){d=x[f+8>>2];kj(a,d);lj(a,x[f+12>>2]);mj(a,b)}}if(!Ba){ir(d,b,c);v[f+7|0]=0;cj(b+d|0,f+7|0);ya=f+16|0;break b}}if(!Ba){nj();p()}}if(!Ba){ya=h+16|0;return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=f;x[g+20>>2]=h;x[g+24>>2]=e;x[Ca>>2]=x[Ca>>2]+28;return 0}function Pb(a,b,c){var d=0,e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];g=x[b+12>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}a:{b:{c:{if((Ba|0)==2|b){if(!Ba){if(!c){break c}a=x[a>>2];g=x[x[a>>2]+68>>2]}if(!Ba|!e){Ea[g|0](a,b,c);if((Ba|0)==1){break b}}if(!Ba){return}}if(!Ba|(e|0)==1){d=Jb(51780,5465);f=1;if((Ba|0)==1){break b}a=d}if(!Ba|(e|0)==2){Kb(a);f=2;if((Ba|0)==1){break b}}if(!Ba){break a}}if(!Ba|(e|0)==3){d=Jb(51780,1541);f=3;if((Ba|0)==1){break b}a=d}if(!Ba|(e|0)==4){Kb(a);f=4;if((Ba|0)==1){break b}}if(!Ba){break a}return}x[x[Ca>>2]>>2]=f;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=g;x[Ca>>2]=x[Ca>>2]+16;return}a=nr(4);x[a>>2]=0;$(a|0,12860,0);p()}function uj(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;d=x[Ca>>2];a=x[d>>2];b=x[d+4>>2];c=x[d+8>>2];e=x[d+12>>2];f=x[d+16>>2];h=x[d+20>>2];d=x[d+24>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){h=ya-16|0;ya=h;e=gg(b);f=ya-16|0;ya=f;c=e>>>0<=2147483631}a:{b:{if((Ba|0)==2|c){if(!Ba){c=hj(e)}c:{if(!Ba){if(c){bj(a,e);c=a;break c}d=ij(e)+1|0;c=f+8|0}if(!Ba|!g){jj(c,a,d);if((Ba|0)==1){break a}}if(!Ba){c=x[f+8>>2];kj(a,c);lj(a,x[f+12>>2]);mj(a,e)}}if(!Ba){gh(c,b,e);v[f+7|0]=0;cj(c+e|0,f+7|0);ya=f+16|0;break b}}if(!Ba){nj();p()}}if(!Ba){ya=h+16|0}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=e;x[g+16>>2]=f;x[g+20>>2]=h;x[g+24>>2]=d;x[Ca>>2]=x[Ca>>2]+28}function kf(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0;g=Ba;e=ya-16|0;ya=e;i=(q(a),j(2));c=i&2147483647;a:{if(c>>>0<=1305022426){f=+a;d=f*.6366197723675814+6755399441055744+-6755399441055744;h=f+d*-1.5707963109016418+d*-1.5893254773528196e-8;C[b>>3]=h;g=h<-.7853981852531433;if(F(d)<2147483648){c=~~d}else{c=-2147483648}if(g){d=d+-1;C[b>>3]=f+d*-1.5707963109016418+d*-1.5893254773528196e-8;c=c-1|0;break a}if(!(h>.7853981852531433)){break a}d=d+1;C[b>>3]=f+d*-1.5707963109016418+d*-1.5893254773528196e-8;c=c+1|0;break a}if(c>>>0>=2139095040){C[b>>3]=E(a-a);c=0;break a}k=c;c=(c>>>23|0)-150|0;C[e+8>>3]=(l(2,k-(c<<23)|0),r());c=df(e+8|0,e,c,1,0);if((Ba|0)!=(g|0)){p()}d=C[e>>3];if((i|0)<0){C[b>>3]=-d;c=0-c|0;break a}C[b>>3]=d}ya=e+16|0;return c}function Vg(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;i=Ba;d=ya-16|0;ya=d;x[d+12>>2]=c;a:{if((b|0)<2){break a}j=b-2>>>1|0;e=c-a|0;if((j|0)>2){break a}f=e>>1;e=f+1|0;g=(e<<2)+a|0;x[d+8>>2]=g;f=f+2|0;b:{if((f|0)>=(b|0)){break b}h=g+4|0;k=Jg(g,h);if((Ba|0)!=(i|0)){p()}if(!k){break b}x[d+8>>2]=h;g=h;e=f}c=Jg(g,c);if((Ba|0)!=(i|0)){p()}if(c){break a}B[d+4>>2]=B[x[d+12>>2]>>2];c:{while(1){B[x[d+12>>2]>>2]=B[x[d+8>>2]>>2];c=x[d+8>>2];x[d+12>>2]=c;if((e|0)>(j|0)){break c}e=e<<1;f=e|1;c=(f<<2)+a|0;x[d+8>>2]=c;d:{e:{e=e+2|0;if((e|0)>=(b|0)){break e}h=Jg(c,c+4|0);if((Ba|0)!=(i|0)){p()}c=x[d+8>>2];if(!h){break e}c=c+4|0;x[d+8>>2]=c;break d}e=f}c=Jg(c,d+4|0);if((Ba|0)!=(i|0)){p()}if(!c){continue}break}c=x[d+12>>2]}B[c>>2]=B[d+4>>2]}ya=d+16|0}function Fo(a){var b=0,c=0,d=0,e=0,f=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;b=x[Ca>>2];a=x[b>>2];c=x[b+4>>2];d=x[b+8>>2];b=x[b+12>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}if(!Ba){c=ya-32|0;ya=c;x[c+16>>2]=0;x[c+12>>2]=269;d=x[c+16>>2];x[c>>2]=x[c+12>>2];x[c+4>>2]=d;b=x[c+4>>2];d=c+20|0;x[d+4>>2]=x[c>>2];x[d+8>>2]=b;x[d>>2]=a;b=ya-16|0;ya=b;e=x[a>>2]!=-1}a:{if((Ba|0)==2|e){if(!Ba){d=Ao(b+8|0,Ao(b+12|0,d));while(1){if(x[a>>2]==1){continue}break}e=!x[a>>2]}if(e|(Ba|0)==2){if(!Ba){x[a>>2]=1}if(!Ba|!f){So(d);if((Ba|0)==1){break a}}if(!Ba){x[a>>2]=-1}}}if(!Ba){ya=b+16|0;ya=c+32|0;return x[a+4>>2]-1|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=c;x[e+8>>2]=d;x[e+12>>2]=b;x[Ca>>2]=x[Ca>>2]+16;return 0}function oj(a,b){var c=0,d=0,e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;b=x[Ca>>2];a=x[b>>2];d=x[b+8>>2];e=x[b+12>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}if(!Ba){d=ej(b)}a:{if((Ba|0)==2|d){if(!Ba){d=b>>>0<=4;e=d?4:b;b=a>>>0<=1;a=b?1:a}while(1){b:{if(!Ba){b=(a+e|0)-1&0-e;d=a>>>0>>0?b:a;c=0;b=ya-16|0;ya=b;if(!((d>>>0)%(e>>>0)|e&3)){c=Bg(b+12|0,e,d);c=c?0:x[b+12>>2]}ya=b+16|0;d=c;if(c){break b}b=x[13650];if(!b){break b}}if(!Ba|!f){Ea[b|0]();if((Ba|0)==1){break a}}if(!Ba){continue}}break}if(!Ba){return d}}if(!Ba|(f|0)==1){c=dr(a);g=1;if((Ba|0)==1){break a}a=c}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=g;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=e;x[Ca>>2]=x[Ca>>2]+16;return 0}function yr(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;e=x[Ca>>2];a=x[e>>2];c=x[e+8>>2];d=x[e+12>>2];f=x[e+16>>2];g=x[e+20>>2];h=x[e+24>>2];b=x[e+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){if(qr(a,x[b+8>>2],0)){tr(b,c,d);return}g=a+16|0;f=x[a+12>>2]}a:{if(!Ba|!i){wr(g,b,c,d);e=0;if((Ba|0)==1){break a}}h=Ba?h:(f|0)<2;b:{if(!Ba){if(h){break b}f=(f<<3)+g|0;a=a+24|0}while(1){if(!Ba|(i|0)==1){wr(a,b,c,d);e=1;if((Ba|0)==1){break a}}if(!Ba){if(y[b+54|0]){break b}a=a+8|0;if(f>>>0>a>>>0){continue}}break}}return}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=f;x[e+20>>2]=g;x[e+24>>2]=h;x[Ca>>2]=x[Ca>>2]+28}function qd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;l=Ba;a:{b:{h=x[a+8>>2];if((h|0)>=0){i=h+1|0;k=i&3;f=x[a+40>>2];if(h>>>0>=3){m=i&-4;while(1){d=e<<3;C[d+f>>3]=B[b+d>>2];j=d|8;C[j+f>>3]=B[b+j>>2];j=d|16;C[j+f>>3]=B[b+j>>2];d=d|24;C[d+f>>3]=B[b+d>>2];e=e+4|0;g=g+4|0;if((m|0)!=(g|0)){continue}break}}if(k){d=0;while(1){g=e<<3;C[g+f>>3]=B[b+g>>2];e=e+1|0;d=d+1|0;if((k|0)!=(d|0)){continue}break}}if((h|0)>=0){break b}}d=x[a+44>>2];break a}d=x[a+44>>2];c:{if(!h){e=0;break c}i=i&-2;e=0;g=0;while(1){f=e<<3;C[f+d>>3]=B[(b+f|0)+4>>2];f=f|8;C[f+d>>3]=B[(b+f|0)+4>>2];e=e+2|0;g=g+2|0;if((i|0)!=(g|0)){continue}break}}if(h&1){break a}e=e<<3;C[e+d>>3]=B[(b+e|0)+4>>2]}pd(a,x[a+40>>2],d,c);if((Ba|0)!=(l|0)){p()}}function wi(a,b){var c=0,d=0,e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];f=x[c+8>>2];d=x[c+12>>2];g=x[c+16>>2];c=x[c+20>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}if(!Ba){f=ui(a);d=f>>>0>>0}a:{b:{if((Ba|0)==2|d){if(!Ba){d=ya;c=d-16|0;ya=c;f=b-f|0}if((Ba|0)==2|f){if(!Ba){d=vi(a);b=ui(a);g=d-b>>>0>>0}if((Ba|0)==2|g){g=Ba?g:(f-d|0)+b|0;if(!Ba|!e){Qn(a,d,g,b,b);if((Ba|0)==1){break a}}}if(!Ba){e=ri(a);ir(e+b|0,f,0);d=a;a=b+f|0;Rn(d,a);v[c+15|0]=0;a=a+e|0;b=c+15|0;cj(a,b)}}if(!Ba){ya=c+16|0;break b}}if(!Ba){Aq(a,ri(a),b)}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=f;x[e+12>>2]=d;x[e+16>>2]=g;x[e+20>>2]=c;x[Ca>>2]=x[Ca>>2]+24}function sn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){g=ya-16|0;ya=g;x[g+12>>2]=b;b=g+8|0;vj(b,d)}a:{if(!Ba|!i){h=bi(b);if((Ba|0)==1){break a}b=h}d=Ba?d:g+8|0;if(!Ba|(i|0)==1){Po(d);j=1;if((Ba|0)==1){break a}}if(!Ba){d=f+16|0;f=g+12|0}if(!Ba|(i|0)==2){tn(a,d,f,c,e,b);j=2;if((Ba|0)==1){break a}}if(!Ba){ya=g+16|0;return x[g+12>>2]}p()}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[Ca>>2]=x[Ca>>2]+28;return 0}function qn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){g=ya-16|0;ya=g;x[g+12>>2]=b;b=g+8|0;vj(b,d)}a:{if(!Ba|!i){h=bi(b);if((Ba|0)==1){break a}b=h}d=Ba?d:g+8|0;if(!Ba|(i|0)==1){Po(d);j=1;if((Ba|0)==1){break a}}if(!Ba){d=f+24|0;f=g+12|0}if(!Ba|(i|0)==2){rn(a,d,f,c,e,b);j=2;if((Ba|0)==1){break a}}if(!Ba){ya=g+16|0;return x[g+12>>2]}p()}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[Ca>>2]=x[Ca>>2]+28;return 0}function fn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){g=ya-16|0;ya=g;x[g+12>>2]=b;b=g+8|0;vj(b,d)}a:{if(!Ba|!i){h=sh(b);if((Ba|0)==1){break a}b=h}d=Ba?d:g+8|0;if(!Ba|(i|0)==1){Po(d);j=1;if((Ba|0)==1){break a}}if(!Ba){d=f+16|0;f=g+12|0}if(!Ba|(i|0)==2){gn(a,d,f,c,e,b);j=2;if((Ba|0)==1){break a}}if(!Ba){ya=g+16|0;return x[g+12>>2]}p()}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[Ca>>2]=x[Ca>>2]+28;return 0}function dn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];g=x[b+24>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){g=ya-16|0;ya=g;x[g+12>>2]=b;b=g+8|0;vj(b,d)}a:{if(!Ba|!i){h=sh(b);if((Ba|0)==1){break a}b=h}d=Ba?d:g+8|0;if(!Ba|(i|0)==1){Po(d);j=1;if((Ba|0)==1){break a}}if(!Ba){d=f+24|0;f=g+12|0}if(!Ba|(i|0)==2){en(a,d,f,c,e,b);j=2;if((Ba|0)==1){break a}}if(!Ba){ya=g+16|0;return x[g+12>>2]}p()}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[Ca>>2]=x[Ca>>2]+28;return 0}function bn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;h=x[Ca>>2];a=x[h>>2];b=x[h+4>>2];c=x[h+8>>2];d=x[h+12>>2];e=x[h+16>>2];f=x[h+20>>2];g=x[h+24>>2];j=x[h+28>>2];h=x[h+32>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){g=ya-16|0;ya=g;v[g+8|0]=37;v[g+9|0]=72;v[g+10|0]=58;v[g+11|0]=37;v[g+12|0]=77;v[g+13|0]=58;v[g+14|0]=37;v[g+15|0]=83;j=g+8|0;h=g+16|0}a:{if(!Ba|!i){i=$m(a,b,c,d,e,f,j,h);if((Ba|0)==1){break a}f=i}if(!Ba){ya=g+16|0;return f|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;i=x[Ca>>2];x[i>>2]=a;x[i+4>>2]=b;x[i+8>>2]=c;x[i+12>>2]=d;x[i+16>>2]=e;x[i+20>>2]=f;x[i+24>>2]=g;x[i+28>>2]=j;x[i+32>>2]=h;x[Ca>>2]=x[Ca>>2]+36;return 0}function Kc(a,b){var c=0,d=0,e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){e=J(b);a:{if(F(e)<2147483648){c=~~e;break a}c=-2147483648}d=(c|0)<0;e=K(b);b:{if(F(e)<2147483648){f=~~e;break b}f=-2147483648}e=0}c:{d:{if(!Ba){e:{f:{if(d){break f}d=x[a>>2]/2|0;if((d|0)<(c|0)){break f}if(!((c|0)!=(f|0)&(d|0)>=(f|0))){f=x[a+20>>2];a=x[a+16>>2];if(f-a>>3>>>0<=c>>>0){break e}return C[a+(c<<3)>>3]}d=x[a+20>>2];a=x[a+16>>2];d=d-a>>3;if(d>>>0<=c>>>0|d>>>0<=f>>>0){break d}b=b-+(c|0);e=C[a+(c<<3)>>3]*(1-b)+b*C[a+(f<<3)>>3]}return e}}if(!Ba|!g){Ec();a=0;if((Ba|0)==1){break c}}if(!Ba){p()}}if(!Ba|(g|0)==1){Ec();a=1;if((Ba|0)==1){break c}}if(!Ba){p()}p()}x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function nf(a,b,c){var d=0,e=0,f=0,g=0;a:{if(!c){break a}v[a|0]=b;d=a+c|0;v[d-1|0]=b;if(c>>>0<3){break a}v[a+2|0]=b;v[a+1|0]=b;v[d-3|0]=b;v[d-2|0]=b;if(c>>>0<7){break a}v[a+3|0]=b;v[d-4|0]=b;if(c>>>0<9){break a}d=0-a&3;e=d+a|0;b=D(b&255,16843009);x[e>>2]=b;d=c-d&-4;c=d+e|0;x[c-4>>2]=b;if(d>>>0<9){break a}x[e+8>>2]=b;x[e+4>>2]=b;x[c-8>>2]=b;x[c-12>>2]=b;if(d>>>0<25){break a}x[e+24>>2]=b;x[e+20>>2]=b;x[e+16>>2]=b;x[e+12>>2]=b;x[c-16>>2]=b;x[c-20>>2]=b;x[c-24>>2]=b;x[c-28>>2]=b;g=e&4|24;c=d-g|0;if(c>>>0<32){break a}d=Hs(b,0,1,1);f=Da;b=e+g|0;while(1){x[b+24>>2]=d;x[b+28>>2]=f;x[b+16>>2]=d;x[b+20>>2]=f;x[b+8>>2]=d;x[b+12>>2]=f;x[b>>2]=d;x[b+4>>2]=f;b=b+32|0;c=c-32|0;if(c>>>0>31){continue}break}}return a}function Uf(a,b){var c=0,d=0,e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;c=x[Ca>>2];a=x[c>>2];d=x[c+8>>2];e=x[c+12>>2];f=x[c+16>>2];b=x[c+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){e=ya-16|0;ya=e;v[e+15|0]=b;d=x[a+16>>2]}a:{b:{if(!Ba){if(!d){d=-1;if(Rf(a)){break b}d=x[a+16>>2]}c:{c=x[a+20>>2];if((c|0)==(d|0)){break c}d=b&255;if((d|0)==x[a+80>>2]){break c}x[a+20>>2]=c+1;v[c|0]=b;break b}d=-1;f=e+15|0;b=x[a+36>>2]}if(!Ba|!g){c=Ea[b|0](a,f,1)|0;if((Ba|0)==1){break a}a=c}if(!Ba){if((a|0)!=1){break b}d=y[e+15|0]}}if(!Ba){ya=e+16|0;return d}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=e;x[c+16>>2]=f;x[Ca>>2]=x[Ca>>2]+20;return 0}function mr(a,b){var c=0,d=0,e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;d=x[Ca>>2];a=x[d>>2];b=x[d+4>>2];c=x[d+8>>2];e=x[d+12>>2];d=x[d+16>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}a:{if(!Ba){e=ya-16|0;ya=e;x[e+12>>2]=b;d=ti(a);b:{if(!d){c=1;b=Di(a);break b}c=Ci(a)-1|0;b=x[a+4>>2]}f=(b|0)==(c|0)}c:{d:{if(f|(Ba|0)==2){if(!Ba|!g){fo(a,c,1,c,c);if((Ba|0)==1){break a}}if(!Ba){c=ri(a);break d}}if(!Ba){c=ri(a);if(d){break d}c=a;bj(a,b+1|0);break c}}if(!Ba){c=x[a>>2];mj(a,b+1|0)}}if(!Ba){a=(b<<2)+c|0;bo(a,e+12|0);x[e+8>>2]=0;bo(a+4|0,e+8|0);ya=e+16|0}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=e;x[f+16>>2]=d;x[Ca>>2]=x[Ca>>2]+20}function gd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;g=Ba;fd(a,b,x[a+48>>2],x[a+52>>2]);if((Ba|0)!=(g|0)){p()}b=0;g=x[a+8>>2];a:{if((g|0)<0){break a}i=g+1|0;j=i&3;e=x[a+48>>2];if(g>>>0>=3){k=i&-4;while(1){d=b<<3;B[d+c>>2]=C[d+e>>3];h=d|8;B[h+c>>2]=C[e+h>>3];h=d|16;B[h+c>>2]=C[e+h>>3];d=d|24;B[d+c>>2]=C[d+e>>3];b=b+4|0;f=f+4|0;if((k|0)!=(f|0)){continue}break}}if(j){d=0;while(1){f=b<<3;B[f+c>>2]=C[e+f>>3];b=b+1|0;d=d+1|0;if((j|0)!=(d|0)){continue}break}}b=0;if((g|0)<0){break a}a=x[a+52>>2];if(g){d=i&-2;f=0;while(1){e=b<<3;B[(e+c|0)+4>>2]=C[a+e>>3];e=e|8;B[(e+c|0)+4>>2]=C[a+e>>3];b=b+2|0;f=f+2|0;if((d|0)!=(f|0)){continue}break}}if(g&1){break a}b=b<<3;B[(b+c|0)+4>>2]=C[a+b>>3]}}function Kb(a){var b=0,c=0,d=0,e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+12>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}if(!Ba){e=ya-16|0;ya=e;b=e+12|0;c=x[x[a>>2]-12>>2]+a|0;vj(b,c)}a:{if(!Ba|!f){d=il(b,52748);if((Ba|0)==1){break a}b=d}c=Ba?c:x[x[b>>2]+28>>2];if(!Ba|(f|0)==1){d=Ea[c|0](b,10)|0;g=1;if((Ba|0)==1){break a}b=d}c=Ba?c:e+12|0;if(!Ba|(f|0)==2){Po(c);g=2;if((Ba|0)==1){break a}}if(!Ba|(f|0)==3){Th(a,b);g=3;if((Ba|0)==1){break a}}if(!Ba|(f|0)==4){rh(a);g=4;if((Ba|0)==1){break a}}if(!Ba){ya=e+16|0}return}x[x[Ca>>2]>>2]=g;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=e;x[Ca>>2]=x[Ca>>2]+16}function jr(a,b){var c=0,d=0,e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;d=x[Ca>>2];a=x[d>>2];b=x[d+4>>2];c=x[d+8>>2];e=x[d+12>>2];d=x[d+16>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}a:{if(!Ba){e=ya-16|0;ya=e;v[e+15|0]=b;d=ti(a);b:{if(!d){c=10;b=Di(a);break b}c=Ci(a)-1|0;b=x[a+4>>2]}f=(b|0)==(c|0)}c:{d:{if(f|(Ba|0)==2){if(!Ba|!g){Qn(a,c,1,c,c);if((Ba|0)==1){break a}}if(!Ba){c=ri(a);break d}}if(!Ba){c=ri(a);if(d){break d}c=a;bj(a,b+1|0);break c}}if(!Ba){c=x[a>>2];mj(a,b+1|0)}}if(!Ba){a=b+c|0;cj(a,e+15|0);v[e+14|0]=0;cj(a+1|0,e+14|0);ya=e+16|0}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=e;x[f+16>>2]=d;x[Ca>>2]=x[Ca>>2]+20}function Kj(a,b,c){var d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+12>>2];f=x[b+16>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){e=ya-16|0;ya=e}a:{if(!Ba|!g){d=Xh(a);if((Ba|0)==1){break a}a=d}if(!Ba){x[a+32>>2]=b;x[a>>2]=35716;b=e+12|0;qi(b,a)}if(!Ba|(g|0)==1){d=Qj(b);h=1;if((Ba|0)==1){break a}b=d}f=Ba?f:e+12|0;if(!Ba|(g|0)==2){Po(f);h=2;if((Ba|0)==1){break a}}if(!Ba){x[a+40>>2]=c;x[a+36>>2]=b}if(!Ba|(g|0)==3){d=Gi(b);h=3;if((Ba|0)==1){break a}b=d}if(!Ba){v[a+44|0]=b;ya=e+16|0}return}x[x[Ca>>2]>>2]=h;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=e;x[d+16>>2]=f;x[Ca>>2]=x[Ca>>2]+20}function Hj(a,b,c){var d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+12>>2];f=x[b+16>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){e=ya-16|0;ya=e}a:{if(!Ba|!g){d=$g(a);if((Ba|0)==1){break a}a=d}if(!Ba){x[a+32>>2]=b;x[a>>2]=35512;b=e+12|0;qi(b,a)}if(!Ba|(g|0)==1){d=Fi(b);h=1;if((Ba|0)==1){break a}b=d}f=Ba?f:e+12|0;if(!Ba|(g|0)==2){Po(f);h=2;if((Ba|0)==1){break a}}if(!Ba){x[a+40>>2]=c;x[a+36>>2]=b}if(!Ba|(g|0)==3){d=Gi(b);h=3;if((Ba|0)==1){break a}b=d}if(!Ba){v[a+44|0]=b;ya=e+16|0}return}x[x[Ca>>2]>>2]=h;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=e;x[d+16>>2]=f;x[Ca>>2]=x[Ca>>2]+20}function Mc(a,b,c){var d=0,e=0,f=0,g=0,h=0;d=Ba;a:{if(b==0){break a}f=C[a>>3];if(f*.5==b){break a}a=x[a+104>>2];g=(a|0)/2|0;e=g;h=+(a|0);b=ag(h*b/f);if((Ba|0)!=(d|0)){p()}a=~~b;b:{if(F(b)<2147483648){break b}a=-2147483648}c:{d:{if((e|0)>(a|0)){d=a+1|0;if(C[(d<<3)+c>>3]>3]){break d}}if((a|0)<=0){break c}d=(a<<3)+c|0;if(!(C[d-8>>3]>3])){break c}d=a-1|0}e:{if((d|0)<(g|0)){e=d+1|0;if(C[(e<<3)+c>>3]>3]){break e}}if((d|0)<=0){a=d;break c}a=(d<<3)+c|0;if(!(C[a-8>>3]>3])){a=d;break c}e=d-1|0}if((e|0)<(g|0)){a=e+1|0;if(C[(a<<3)+c>>3]>3]){break c}}if((e|0)<=0){a=e;break c}a=(e<<3)+c|0;if(!(C[a-8>>3]>3])){a=e;break c}a=e-1|0}b=f*+(a|0)/h}return b}function Aj(a,b){var c=0,d=0,e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;c=x[Ca>>2];a=x[c>>2];d=x[c+8>>2];e=x[c+12>>2];f=x[c+16>>2];b=x[c+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){e=-1;d=(a|0)==-1}a:{b:{if(Ba){c=f}else{if(d){break b}f=x[b+76>>2]<0;d=x[b+4>>2];c=!d}c:{d:{if(c|(Ba|0)==2){if(!Ba|!g){c=Bf(b);if((Ba|0)==1){break a}d=c}if(!Ba){d=x[b+4>>2];if(!d){break d}}}if(!Ba&x[b+44>>2]-8>>>0>>0){break c}}if(!Ba){if(f){break b}return-1}}if(!Ba){c=d-1|0;x[b+4>>2]=c;v[c|0]=a;x[b>>2]=x[b>>2]&-17;e=a&255}}if(!Ba){return e}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=e;x[c+16>>2]=f;x[Ca>>2]=x[Ca>>2]+20;return 0}function rh(a){var b=0,c=0,d=0,e=0,f=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}if(!Ba){c=ya-16|0;ya=c;b=x[(x[x[a>>2]-12>>2]+a|0)+24>>2]}a:{if((Ba|0)==2|b){b=Ba?b:c+8|0;if(!Ba|!e){d=Hh(b,a);if((Ba|0)==1){break a}b=d}b=Ba?b:!y[c+8|0];b:{if(!Ba){if(b){break b}b=x[(x[x[a>>2]-12>>2]+a|0)+24>>2]}if(!Ba|(e|0)==1){d=yh(b);f=1;if((Ba|0)==1){break a}b=d}if(!Ba){if((b|0)!=-1){break b}a=x[x[a>>2]-12>>2]+a|0;xh(a,1)}}a=Ba?a:c+8|0;if(!Ba|(e|0)==2){Ih(a);f=2;if((Ba|0)==1){break a}}}if(!Ba){ya=c+16|0}return}x[x[Ca>>2]>>2]=f;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12}function Ko(a){a=a|0;var b=0,c=0,d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;b=x[Ca>>2];a=x[b>>2];d=x[b+4>>2];c=x[b+8>>2];b=x[b+12>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=39388;d=a+8|0}a:{while(1){if(!Ba){c=Co(d)>>>0>b>>>0}if((Ba|0)==2|c){if(!Ba){c=x[Ho(d,b)>>2]}if((Ba|0)==2|c){if(!Ba){c=x[Ho(d,b)>>2]}if(!Ba|!e){Jo(c);if((Ba|0)==1){break a}}}if(!Ba){b=b+1|0;continue}}break}if(!Ba){hr(a+152|0);b=ya-16|0;ya=b;c=Ao(b+12|0,d);d=x[c>>2];if(x[d>>2]){Do(d);Sq(x[c>>2]);d=Lq(x[c>>2]);c=x[c>>2];Tq(d,x[c>>2],Pq(c))}ya=b+16|0;return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=d;x[e+8>>2]=c;x[e+12>>2]=b;x[Ca>>2]=x[Ca>>2]+16;return 0}function pn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];h=x[b+24>>2];i=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){i=a;h=a+8|0;a=x[x[a+8>>2]+20>>2]}a:{if(!Ba|!j){g=Ea[a|0](h)|0;if((Ba|0)==1){break a}a=g}if(!Ba){h=ri(a);g=ri(a);a=g+(ui(a)<<2)|0}if(!Ba|(j|0)==1){g=mn(i,b,c,d,e,f,h,a);k=1;if((Ba|0)==1){break a}a=g}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[g+28>>2]=i;x[Ca>>2]=x[Ca>>2]+32;return 0}function un(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;f=x[Ca>>2];a=x[f>>2];b=x[f+4>>2];c=x[f+8>>2];d=x[f+12>>2];e=x[f+16>>2];f=x[f+20>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){a=ya-16|0;ya=a;x[a+12>>2]=b;b=a+8|0;vj(b,d)}a:{if(!Ba|!h){g=bi(b);if((Ba|0)==1){break a}b=g}d=Ba?d:a+8|0;if(!Ba|(h|0)==1){Po(d);i=1;if((Ba|0)==1){break a}}if(!Ba){d=f+20|0;f=a+12|0}if(!Ba|(h|0)==2){vn(d,f,c,e,b);i=2;if((Ba|0)==1){break a}}if(!Ba){ya=a+16|0;return x[a+12>>2]}p()}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[Ca>>2]=x[Ca>>2]+24;return 0}function hn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;f=x[Ca>>2];a=x[f>>2];b=x[f+4>>2];c=x[f+8>>2];d=x[f+12>>2];e=x[f+16>>2];f=x[f+20>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){a=ya-16|0;ya=a;x[a+12>>2]=b;b=a+8|0;vj(b,d)}a:{if(!Ba|!h){g=sh(b);if((Ba|0)==1){break a}b=g}d=Ba?d:a+8|0;if(!Ba|(h|0)==1){Po(d);i=1;if((Ba|0)==1){break a}}if(!Ba){d=f+20|0;f=a+12|0}if(!Ba|(h|0)==2){jn(d,f,c,e,b);i=2;if((Ba|0)==1){break a}}if(!Ba){ya=a+16|0;return x[a+12>>2]}p()}x[x[Ca>>2]>>2]=i;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[Ca>>2]=x[Ca>>2]+24;return 0}function on(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;h=x[Ca>>2];a=x[h>>2];b=x[h+4>>2];c=x[h+8>>2];d=x[h+12>>2];e=x[h+16>>2];f=x[h+20>>2];g=x[h+24>>2];h=x[h+28>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){g=ya-32|0;ya=g;x[g+24>>2]=37;x[g+28>>2]=83;x[g+16>>2]=77;x[g+20>>2]=58;x[g+8>>2]=58;x[g+12>>2]=37;x[g>>2]=37;x[g+4>>2]=72;h=g+32|0}a:{if(!Ba|!i){i=mn(a,b,c,d,e,f,g,h);if((Ba|0)==1){break a}f=i}if(!Ba){ya=g+32|0;return f|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;i=x[Ca>>2];x[i>>2]=a;x[i+4>>2]=b;x[i+8>>2]=c;x[i+12>>2]=d;x[i+16>>2]=e;x[i+20>>2]=f;x[i+24>>2]=g;x[i+28>>2]=h;x[Ca>>2]=x[Ca>>2]+32;return 0}function cn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];h=x[b+24>>2];i=x[b+28>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){i=a;h=a+8|0;a=x[x[a+8>>2]+20>>2]}a:{if(!Ba|!j){g=Ea[a|0](h)|0;if((Ba|0)==1){break a}a=g}if(!Ba){h=ri(a);g=ri(a);a=ui(a)+g|0}if(!Ba|(j|0)==1){g=$m(i,b,c,d,e,f,h,a);k=1;if((Ba|0)==1){break a}a=g}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=k;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[g+28>>2]=i;x[Ca>>2]=x[Ca>>2]+32;return 0}function As(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-40;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];l=x[b+24>>2];k=x[b+28>>2];m=x[b+32>>2];n=x[b+36>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;o=x[x[Ca>>2]>>2]}if(!Ba){k=g;g=0;m=k|g;n=h;k=j;l=g|i}a:{if(!Ba|!o){g=Ea[a|0](b,c,d,e,f,m,n,l,k)|0;if((Ba|0)==1){break a}a=g}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=l;x[g+28>>2]=k;x[g+32>>2]=m;x[g+36>>2]=n;x[Ca>>2]=x[Ca>>2]+40;return 0}function Xk(a,b,c,d){var e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;f=x[Ca>>2];a=x[f>>2];c=x[f+8>>2];d=x[f+12>>2];e=x[f+16>>2];g=x[f+20>>2];b=x[f+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){e=ya-160|0;ya=e;x[e+60>>2]=b;x[e+20>>2]=b;x[e+24>>2]=-1;g=e+16|0;ok(g,0,0)}a:{if(!Ba|!h){Bk(e,g,d,1);if((Ba|0)==1){break a}}if(!Ba){d=x[e+8>>2];g=x[e+12>>2];f=x[e>>2];h=x[e+4>>2];if(c){x[c>>2]=x[e+136>>2]+((x[e+20>>2]-x[e+60>>2]|0)+b|0)}x[a+8>>2]=d;x[a+12>>2]=g;x[a>>2]=f;x[a+4>>2]=h;ya=e+160|0}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[Ca>>2]=x[Ca>>2]+24}function xj(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];e=x[c+8>>2];c=x[c+12>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=35040;b=x[a+40>>2]}a:{while(1){if((Ba|0)==2|b){if(!Ba){b=b-1|0;e=b<<2;c=x[e+x[a+36>>2]>>2];e=x[e+x[a+32>>2]>>2]}if(!Ba|!d){Ea[e|0](0,a,c);if((Ba|0)==1){break a}}if(!Ba){continue}}break}b=Ba?b:a+28|0;if(!Ba|(d|0)==1){Po(b);f=1;if((Ba|0)==1){break a}}if(!Ba){zg(x[a+32>>2]);zg(x[a+36>>2]);zg(x[a+48>>2]);zg(x[a+60>>2]);return a|0}p()}x[x[Ca>>2]>>2]=f;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=e;x[d+12>>2]=c;x[Ca>>2]=x[Ca>>2]+16;return 0}function Lh(a){var b=0,c=0,d=0,e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;c=x[Ca>>2];a=x[c>>2];d=x[c+8>>2];e=x[c+12>>2];c=x[c+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}if(!Ba){c=!Bh(-1,x[a+76>>2])}a:{b:{if(!Ba){if(c){a=x[a+76>>2];break b}c=a;d=ya-16|0;ya=d;b=d+12|0;e=b;vj(b,a);a=b}if(!Ba|!f){b=sh(a);if((Ba|0)==1){break a}a=b}if(!Ba|(f|0)==1){b=rj(a,32);g=1;if((Ba|0)==1){break a}a=b}e=Ba?e:d+12|0;if(!Ba|(f|0)==2){Po(e);g=2;if((Ba|0)==1){break a}}if(!Ba){ya=d+16|0;x[c+76>>2]=a}}if(!Ba){return a<<24>>24}p()}x[x[Ca>>2]>>2]=g;x[Ca>>2]=x[Ca>>2]+4;b=x[Ca>>2];x[b>>2]=a;x[b+4>>2]=c;x[b+8>>2]=d;x[b+12>>2]=e;x[Ca>>2]=x[Ca>>2]+16;return 0}function ke(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,k=0,m=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+16>>2];f=x[b+12>>2];l(0,f|0);l(1,e|0);g=+n();e=x[b+24>>2];f=x[b+20>>2];l(0,f|0);l(1,e|0);h=+n();b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){g=C[c>>3];h=C[d>>3];a=x[a+4>>2];c=x[x[a>>2]+8>>2];b=x[b>>2]}a:{if(!Ba|!i){Ea[c|0](a,b,g,h);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;o(+g);a=j(1)|0;k=d,m=j(0)|0,x[k+12>>2]=m;x[d+16>>2]=a;o(+h);a=j(1)|0;k=d,m=j(0)|0,x[k+20>>2]=m;x[d+24>>2]=a;x[Ca>>2]=x[Ca>>2]+28}function Qb(a){a=a|0;var b=0,c=0,d=0;d=Ba;x[a>>2]=12876;c=x[a+4>>2];if(c){b=x[c+292>>2];if(b){x[c+296>>2]=b;zg(b);if((Ba|0)!=(d|0)){p()}}b=x[c+256>>2];if(b){x[c+260>>2]=b;zg(b);if((Ba|0)!=(d|0)){p()}}b=x[c+244>>2];if(b){x[c+248>>2]=b;zg(b);if((Ba|0)!=(d|0)){p()}}b=x[c+232>>2];if(b){x[c+236>>2]=b;zg(b);if((Ba|0)!=(d|0)){p()}}b=x[c+152>>2];if(b){x[c+156>>2]=b;zg(b);if((Ba|0)!=(d|0)){p()}}b=x[c+140>>2];if(b){x[c+144>>2]=b;zg(b);if((Ba|0)!=(d|0)){p()}}b=x[c+128>>2];if(b){x[c+132>>2]=b;zg(b);if((Ba|0)!=(d|0)){p()}}zg(c);if((Ba|0)!=(d|0)){p()}}c=x[a+8>>2];if(c){zg(c);if((Ba|0)!=(d|0)){p()}}c=x[a+12>>2];if(c){zg(c);if((Ba|0)!=(d|0)){p()}}return a|0}function Pe(a,b){var c=0,d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}a:{if((Ba|0)==2|b){c=Ba?c:x[b>>2];if(!Ba|!d){Pe(a,c);if((Ba|0)==1){break a}}c=Ba?c:x[b+4>>2];if(!Ba|(d|0)==1){Pe(a,c);e=1;if((Ba|0)==1){break a}}if(!Ba){a=x[b+24>>2];c=!a}b:{if(!Ba){if(c){break b}c=x[a+4>>2];x[a+4>>2]=c-1;if(c){break b}c=x[x[a>>2]+8>>2]}if(!Ba|(d|0)==2){Ea[c|0](a);e=2;if((Ba|0)==1){break a}}if(!Ba|(d|0)==3){cr(a);e=3;if((Ba|0)==1){break a}}}if(!Ba){zg(b)}}return}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12}function Wc(a,b){a=a|0;b=+b;var c=0,d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;c=x[Ca>>2];a=x[c>>2];d=x[c+8>>2];e=x[c+4>>2];l(0,e|0);l(1,d|0);b=+n();d=x[c+12>>2];c=x[c+16>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}if(!Ba){c=ya-48|0;ya=c;a=x[a+4>>2];d=!y[a+308|0]}a:{b:{if(!Ba){c:{if(d){break c}d=x[a+280>>2];if(C[d>>3]!=b){break c}b=C[d+16>>3];break b}d=c+8|0}if(!Ba|!f){Zb(d,a,b);if((Ba|0)==1){break a}}if(!Ba){b=C[c+24>>3]}}if(!Ba){ya=c+48|0;return+b}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;o(+b);a=j(1)|0;g=e,h=j(0)|0,x[g+4>>2]=h;x[e+8>>2]=a;x[e+12>>2]=d;x[e+16>>2]=c;x[Ca>>2]=x[Ca>>2]+20;return 0}function gs(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;var i=0,k=0,m=0,q=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;h=x[Ca>>2];a=x[h>>2];b=x[h+4>>2];c=x[h+8>>2];d=x[h+12>>2];e=x[h+16>>2];f=x[h+20>>2];i=x[h+28>>2];l(0,x[h+24>>2]);l(1,i|0);g=+n();h=x[h+32>>2]}a:{k=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}else{i=0}if(k|!i){i=Ea[a|0](b,c,d,e,f,g,h)|0;if((Ba|0)==1){break a}a=i}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;i=x[Ca>>2];x[i>>2]=a;x[i+4>>2]=b;x[i+8>>2]=c;x[i+12>>2]=d;x[i+16>>2]=e;x[i+20>>2]=f;o(+g);a=j(1)|0;m=i,q=j(0)|0,x[m+24>>2]=q;x[i+28>>2]=a;x[i+32>>2]=h;x[Ca>>2]=x[Ca>>2]+36;return 0}function dg(a,b,c){var d=0,e=0,f=0,g=0;g=Ba;d=ya-16|0;ya=d;o(+a);e=j(1)|0;j(0)|0;e=e&2147483647;a:{if(e>>>0<=1072243195){if(e>>>0<=1044816029){C[b>>3]=a;x[c>>2]=0;x[c+4>>2]=1072693248;break a}f=ff(a,0,0);if((Ba|0)!=(g|0)){p()}C[b>>3]=f;a=cf(a,0);if((Ba|0)!=(g|0)){p()}C[c>>3]=a;break a}if(e>>>0>=2146435072){a=a-a;C[c>>3]=a;C[b>>3]=a;break a}e=ef(a,d);if((Ba|0)!=(g|0)){p()}a=ff(C[d>>3],C[d+8>>3],1);if((Ba|0)!=(g|0)){p()}f=cf(C[d>>3],C[d+8>>3]);if((Ba|0)!=(g|0)){p()}b:{switch((e&3)-1|0){default:C[b>>3]=a;C[c>>3]=f;break a;case 0:C[b>>3]=f;C[c>>3]=-a;break a;case 1:C[b>>3]=-a;C[c>>3]=-f;break a;case 2:break b}}C[b>>3]=-f;C[c>>3]=a}ya=d+16|0}function tb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){e=x[a+8>>2]/2|0;c=x[a+16>>2];f=(b|0)/2|0;d=f+1|0;g=sb(d);a:{b:{c:{if(!c){break c}e=e+1|0;if(!e){break c}d=e>>>0>>0?e:d;if((d|0)<=0){break b}lf(g,c,d<<3);break b}if(!c){break a}}zg(c)}x[a+8>>2]=b;x[a+16>>2]=g;c=x[a+4>>2];if(c){b=(D(b,16e3)|0)/(c|0)|0;b=(b|0)<(f|0)?b:f}else{b=0}x[a+12>>2]=b;b=x[x[a>>2]+28>>2]}d:{if(!Ba|!h){Ea[b|0](a);if((Ba|0)==1){break d}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8}function Th(a,b){var c=0,d=0,e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}if(!Ba){d=ya-16|0;ya=d;c=d+8|0}a:{if(!Ba|!f){e=Hh(c,a);if((Ba|0)==1){break a}c=e}c=Ba?c:!y[d+8|0];b:{if(!Ba){if(c){break b}c=Kh(d+4|0,a)}if(!Ba|(f|0)==1){Sh(c,b);g=1;if((Ba|0)==1){break a}}if(!Ba){if(!Mh(c)){break b}a=x[x[a>>2]-12>>2]+a|0;xh(a,1)}}a=Ba?a:d+8|0;if(!Ba|(f|0)==2){Ih(a);g=2;if((Ba|0)==1){break a}}if(!Ba){ya=d+16|0}return}x[x[Ca>>2]>>2]=g;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[Ca>>2]=x[Ca>>2]+16}function zs(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];k=x[b+20>>2];j=x[b+24>>2];l=x[b+28>>2];m=x[b+32>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;n=x[x[Ca>>2]>>2]}if(!Ba){j=f;f=0;l=j|f;m=g;j=i;k=f|h}a:{if(!Ba|!n){f=Ea[a|0](b,c,d,e,l,m,k,j)|0;if((Ba|0)==1){break a}a=f}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=k;x[f+24>>2]=j;x[f+28>>2]=l;x[f+32>>2]=m;x[Ca>>2]=x[Ca>>2]+36;return 0}function Zl(a,b,c){var d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+12>>2];f=x[b+16>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){e=ya-16|0;ya=e;f=e+12|0;vj(f,b);b=f}a:{if(!Ba|!g){d=Ul(b);if((Ba|0)==1){break a}b=d}if(!Ba|(g|0)==1){d=mm(b);h=1;if((Ba|0)==1){break a}f=d}if(!Ba){x[c>>2]=f}if(!Ba|(g|0)==2){nm(a,b);h=2;if((Ba|0)==1){break a}}a=Ba?a:e+12|0;if(!Ba|(g|0)==3){Po(a);h=3;if((Ba|0)==1){break a}}if(!Ba){ya=e+16|0}return}x[x[Ca>>2]>>2]=h;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=e;x[d+16>>2]=f;x[Ca>>2]=x[Ca>>2]+20}function sl(a,b,c){var d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+12>>2];f=x[b+16>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){e=ya-16|0;ya=e;f=e+12|0;vj(f,b);b=f}a:{if(!Ba|!g){d=el(b);if((Ba|0)==1){break a}b=d}if(!Ba|(g|0)==1){d=mm(b);h=1;if((Ba|0)==1){break a}f=d}if(!Ba){v[c|0]=f}if(!Ba|(g|0)==2){nm(a,b);h=2;if((Ba|0)==1){break a}}a=Ba?a:e+12|0;if(!Ba|(g|0)==3){Po(a);h=3;if((Ba|0)==1){break a}}if(!Ba){ya=e+16|0}return}x[x[Ca>>2]>>2]=h;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=e;x[d+16>>2]=f;x[Ca>>2]=x[Ca>>2]+20}function Ok(a,b,c,d){var e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;e=x[Ca>>2];a=x[e>>2];c=x[e+4>>2];d=x[e+8>>2];e=x[e+12>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){e=ya-160|0;ya=e;f=b?a:e+158|0;x[e+148>>2]=f;a=b-1|0;x[e+152>>2]=a>>>0<=b>>>0?a:0;e=nf(e,0,144);x[e+76>>2]=-1;x[e+36>>2]=266;x[e+80>>2]=-1;x[e+44>>2]=e+159;x[e+84>>2]=e+148;b=(b|0)<0;a=-1}a:{b:{if(!Ba){if(b){x[12163]=61;break b}v[f|0]=0}if(!Ba|!g){b=rg(e,c,d);if((Ba|0)==1){break a}a=b}}if(!Ba){ya=e+160|0;return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;b=x[Ca>>2];x[b>>2]=a;x[b+4>>2]=c;x[b+8>>2]=d;x[b+12>>2]=e;x[Ca>>2]=x[Ca>>2]+16;return 0}function tn(a,b,c,d,e,f){var g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];h=x[b+24>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){h=a+8|0;a=x[x[a+8>>2]+4>>2]}a:{if(!Ba|!i){g=Ea[a|0](h)|0;if((Ba|0)==1){break a}a=g}h=Ba?h:a+288|0;if(!Ba|(i|0)==1){g=Vl(c,d,a,h,f,e,0);j=1;if((Ba|0)==1){break a}c=g}if(!Ba){a=c-a|0;if((a|0)<=287){x[b>>2]=((a|0)/12|0)%12}}return}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[Ca>>2]=x[Ca>>2]+28}function gn(a,b,c,d,e,f){var g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];h=x[b+24>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){h=a+8|0;a=x[x[a+8>>2]+4>>2]}a:{if(!Ba|!i){g=Ea[a|0](h)|0;if((Ba|0)==1){break a}a=g}h=Ba?h:a+288|0;if(!Ba|(i|0)==1){g=hl(c,d,a,h,f,e,0);j=1;if((Ba|0)==1){break a}c=g}if(!Ba){a=c-a|0;if((a|0)<=287){x[b>>2]=((a|0)/12|0)%12}}return}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[Ca>>2]=x[Ca>>2]+28}function Gg(a,b,c,d,e,f,g,h){var i=0,j=0,k=0,l=0;j=1;i=d&2147483647;k=i;l=(i|0)==2147418112;a:{if(l&!c?a|b:l&(c|0)!=0|i>>>0>2147418112){break a}i=h&2147483647;if(!g&(i|0)==2147418112?e|f:(i|0)==2147418112&(g|0)!=0|i>>>0>2147418112){break a}if(!(a|e|(c|g)|(b|f|(i|k)))){return 0}j=d&h;if((j|0)>0){k=1}else{k=(j|0)>=0}if(k){j=-1;if((c|0)==(g|0)&(d|0)==(h|0)?(b|0)==(f|0)&a>>>0>>0|b>>>0>>0:c>>>0>>0&(d|0)<=(h|0)|(d|0)<(h|0)){break a}return(a^e|c^g|(b^f|d^h))!=0}j=-1;if((c|0)==(g|0)&(d|0)==(h|0)?(b|0)==(f|0)&a>>>0>e>>>0|b>>>0>f>>>0:c>>>0>g>>>0&(d|0)>=(h|0)|(d|0)>(h|0)){break a}j=(a^e|c^g|(b^f|d^h))!=0}return j}function rn(a,b,c,d,e,f){var g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];h=x[b+24>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){h=a+8|0;a=x[x[a+8>>2]>>2]}a:{if(!Ba|!i){g=Ea[a|0](h)|0;if((Ba|0)==1){break a}a=g}h=Ba?h:a+168|0;if(!Ba|(i|0)==1){g=Vl(c,d,a,h,f,e,0);j=1;if((Ba|0)==1){break a}c=g}if(!Ba){a=c-a|0;if((a|0)<=167){x[b>>2]=((a|0)/12|0)%7}}return}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[Ca>>2]=x[Ca>>2]+28}function en(a,b,c,d,e,f){var g=0,h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];f=x[b+20>>2];h=x[b+24>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){h=a+8|0;a=x[x[a+8>>2]>>2]}a:{if(!Ba|!i){g=Ea[a|0](h)|0;if((Ba|0)==1){break a}a=g}h=Ba?h:a+168|0;if(!Ba|(i|0)==1){g=hl(c,d,a,h,f,e,0);j=1;if((Ba|0)==1){break a}c=g}if(!Ba){a=c-a|0;if((a|0)<=167){x[b>>2]=((a|0)/12|0)%7}}return}x[x[Ca>>2]>>2]=j;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[Ca>>2]=x[Ca>>2]+28}function ns(a,b,c,d,e,f,g){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,k=0,m=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;g=x[Ca>>2];a=x[g>>2];b=x[g+4>>2];d=x[g+12>>2];e=x[g+8>>2];l(0,e|0);l(1,d|0);c=+n();d=x[g+16>>2];e=x[g+20>>2];f=x[g+24>>2];g=x[g+28>>2]}a:{i=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}else{h=0}if(i|!h){h=Ea[a|0](b,c,d,e,f,g)|0;if((Ba|0)==1){break a}a=h}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;o(+c);a=j(1)|0;k=h,m=j(0)|0,x[k+8>>2]=m;x[h+12>>2]=a;x[h+16>>2]=d;x[h+20>>2]=e;x[h+24>>2]=f;x[h+28>>2]=g;x[Ca>>2]=x[Ca>>2]+32;return 0}function Dj(a,b,c){var d=0,e=0;if(!b){return 0}a:{b:{if(!c){break b}d=y[b|0];e=d<<24>>24;if((e|0)>=0){if(a){x[a>>2]=d}return(e|0)!=0}if(!x[x[12204]>>2]){b=1;if(!a){break a}x[a>>2]=e&57343;return 1}d=d-194|0;if(d>>>0>50){break b}d=x[(d<<2)+35200>>2];if(c>>>0<=3){if(d<>>3|0;if((e-16|e+(d>>26))>>>0>7){break b}c=c-128|d<<6;if((c|0)>=0){b=2;if(!a){break a}x[a>>2]=c;return 2}d=y[b+2|0]-128|0;if(d>>>0>63){break b}c=d|c<<6;if((c|0)>=0){b=3;if(!a){break a}x[a>>2]=c;return 3}d=y[b+3|0]-128|0;if(d>>>0>63){break b}b=4;if(!a){break a}x[a>>2]=d|c<<6;return 4}x[12163]=25;b=-1}return b}function Ej(a,b,c,d){var e=0,f=0,g=0,h=0;g=d?d:51432;d=x[g>>2];a:{b:{c:{if(!b){if(d){break c}return 0}e=-2;if(!c){break b}d:{if(d){e=c;break d}d=y[b|0];f=d<<24>>24;if((f|0)>=0){if(a){x[a>>2]=d}return(f|0)!=0}if(!x[x[12204]>>2]){e=1;if(!a){break b}x[a>>2]=f&57343;return 1}d=d-194|0;if(d>>>0>50){break c}d=x[(d<<2)+35200>>2];e=c-1|0;if(!e){break a}b=b+1|0}f=y[b|0];h=f>>>3|0;if((h-16|(d>>26)+h)>>>0>7){break c}while(1){e=e-1|0;d=f-128|d<<6;if((d|0)>=0){x[g>>2]=0;if(a){x[a>>2]=d}return c-e|0}if(!e){break a}b=b+1|0;f=y[b|0];if((f&192)==128){continue}break}}x[g>>2]=0;x[12163]=25;e=-1}return e}x[g>>2]=d;return-2}function sd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=E(0),h=0,i=0,j=0,k=0,l=0,m=0,n=0;h=Ba;i=x[a+44>>2];j=x[a+40>>2];e=x[a+8>>2];a:{if((e|0)<0){break a}if(e){l=e+1&-2;while(1){d=f<<3;k=d+j|0;g=Kf(E(+B[(f<<2)+b>>2]+1e-6));if((Ba|0)!=(h|0)){p()}C[k>>3]=g;d=d+i|0;x[d>>2]=0;x[d+4>>2]=0;d=f|1;k=d<<3;n=k+j|0;g=Kf(E(+B[(d<<2)+b>>2]+1e-6));if((Ba|0)!=(h|0)){p()}C[n>>3]=g;d=i+k|0;x[d>>2]=0;x[d+4>>2]=0;f=f+2|0;m=m+2|0;if((l|0)!=(m|0)){continue}break}}if(e&1){break a}e=f<<3;l=e+j|0;g=Kf(E(+B[(f<<2)+b>>2]+1e-6));if((Ba|0)!=(h|0)){p()}C[l>>3]=g;b=e+i|0;x[b>>2]=0;x[b+4>>2]=0}pd(a,j,i,c);if((Ba|0)!=(h|0)){p()}}function Cf(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;b=x[Ca>>2];a=x[b>>2];e=x[b+4>>2];d=x[b+12>>2];f=x[b+16>>2];b=x[b+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){d=ya-16|0;ya=d;e=-1}a:{if(!Ba|!g){c=Bf(a);if((Ba|0)==1){break a}b=c}b:{if(!Ba){if(b){break b}f=x[a+32>>2];b=d+15|0}if(!Ba|(g|0)==1){c=Ea[f|0](a,b,1)|0;h=1;if((Ba|0)==1){break a}a=c}if(!Ba){if((a|0)!=1){break b}e=y[d+15|0]}}if(!Ba){ya=d+16|0;return e}p()}x[x[Ca>>2]>>2]=h;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=e;x[c+8>>2]=b;x[c+12>>2]=d;x[c+16>>2]=f;x[Ca>>2]=x[Ca>>2]+20;return 0}function qs(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;i=x[Ca>>2];a=x[i>>2];b=x[i+4>>2];c=x[i+8>>2];d=x[i+12>>2];e=x[i+16>>2];f=x[i+20>>2];g=x[i+24>>2];h=x[i+28>>2];i=x[i+32>>2]}a:{k=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}else{j=0}if(k|!j){j=Ea[a|0](b,c,d,e,f,g,h,i)|0;if((Ba|0)==1){break a}a=j}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;j=x[Ca>>2];x[j>>2]=a;x[j+4>>2]=b;x[j+8>>2]=c;x[j+12>>2]=d;x[j+16>>2]=e;x[j+20>>2]=f;x[j+24>>2]=g;x[j+28>>2]=h;x[j+32>>2]=i;x[Ca>>2]=x[Ca>>2]+36;return 0}function qg(a,b,c,d,e){var f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;f=x[Ca>>2];a=x[f>>2];d=x[f+4>>2];f=x[f+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){f=ya-256|0;ya=f;h=(c|0)<=(d|0)}a:{b:{if(!Ba){if(e&73728|h){break b}d=c-d|0;c=d>>>0<256;nf(f,b&255,c?d:256);b=!c}if(b|(Ba|0)==2){while(1){if(!Ba|!g){mg(a,f,256);b=0;if((Ba|0)==1){break a}}if(!Ba){d=d-256|0;if(d>>>0>255){continue}}break}}if(!Ba|(g|0)==1){mg(a,f,d);b=1;if((Ba|0)==1){break a}}}if(!Ba){ya=f+256|0}return}x[x[Ca>>2]>>2]=b;x[Ca>>2]=x[Ca>>2]+4;b=x[Ca>>2];x[b>>2]=a;x[b+4>>2]=d;x[b+8>>2]=f;x[Ca>>2]=x[Ca>>2]+12}function Se(a){a=a|0;var b=0,c=0;c=Ba;a=a+12|0;b=x[a+104>>2];if(b){x[a+108>>2]=b;zg(b);if((Ba|0)!=(c|0)){p()}}b=x[a+92>>2];if(b){x[a+96>>2]=b;zg(b);if((Ba|0)!=(c|0)){p()}}b=x[a+80>>2];if(b){x[a+84>>2]=b;zg(b);if((Ba|0)!=(c|0)){p()}}b=x[a+68>>2];if(b){x[a+72>>2]=b;zg(b);if((Ba|0)!=(c|0)){p()}}b=x[a+56>>2];if(b){x[a+60>>2]=b;zg(b);if((Ba|0)!=(c|0)){p()}}b=x[a+44>>2];if(b){x[a+48>>2]=b;zg(b);if((Ba|0)!=(c|0)){p()}}b=x[a+32>>2];if(b){x[a+36>>2]=b;zg(b);if((Ba|0)!=(c|0)){p()}}b=x[a+20>>2];if(b){x[a+24>>2]=b;zg(b);if((Ba|0)!=(c|0)){p()}}b=x[a+8>>2];if(b){x[a+12>>2]=b;zg(b);if((Ba|0)!=(c|0)){p()}}}function Ih(a){var b=0,c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];c=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}a:{b:{if(!Ba){b=x[a+4>>2];if(!x[(b+x[x[b>>2]-12>>2]|0)+24>>2]){break b}b=x[a+4>>2];if(!qh(b+x[x[b>>2]-12>>2]|0)){break b}b=x[a+4>>2];if(!(x[(b+x[x[b>>2]-12>>2]|0)+4>>2]&8192)){break b}b=x[a+4>>2];c=x[(b+x[x[b>>2]-12>>2]|0)+24>>2]}if(!Ba|!d){b=yh(c);if((Ba|0)==1){break a}c=b}if(!Ba){if((c|0)!=-1){break b}a=x[a+4>>2];xh(x[x[a>>2]-12>>2]+a|0,1)}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;b=x[Ca>>2];x[b>>2]=a;x[b+4>>2]=c;x[Ca>>2]=x[Ca>>2]+8}function Tf(a,b,c,d){var e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;e=x[Ca>>2];a=x[e>>2];c=x[e+8>>2];d=x[e+12>>2];f=x[e+16>>2];b=x[e+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}a:{if(Ba){e=0}else{f=D(b,c);e=x[d+76>>2]<0}b:{if(e|(Ba|0)==2){if(!Ba|!g){e=Sf(a,f,d);if((Ba|0)==1){break a}a=e}if(!Ba){break b}}if(!Ba|(g|0)==1){e=Sf(a,f,d);h=1;if((Ba|0)==1){break a}a=e}}if(!Ba){if((a|0)==(f|0)){return b?c:0}return(a>>>0)/(b>>>0)|0}p()}x[x[Ca>>2]>>2]=h;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=f;x[Ca>>2]=x[Ca>>2]+20;return 0}function cs(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=+d;e=+e;var f=0,g=0,h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];f=x[b+16>>2];g=x[b+12>>2];l(0,g|0);l(1,f|0);d=+n();f=x[b+24>>2];g=x[b+20>>2];l(0,g|0);l(1,f|0);e=+n();b=x[b+4>>2]}a:{g=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}else{f=0}if(g|!f){Ea[a|0](b,c,d,e);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;o(+d);a=j(1)|0;h=f,i=j(0)|0,x[h+12>>2]=i;x[f+16>>2]=a;o(+e);a=j(1)|0;h=f,i=j(0)|0,x[h+20>>2]=i;x[f+24>>2]=a;x[Ca>>2]=x[Ca>>2]+28}function ob(a){a=a|0;var b=0,c=0,d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){b=x[a+24>>2];if((b|0)>=-1){nf(x[a+32>>2],0,((b|0)/2<<3)+8|0)}b=x[a+52>>2];c=x[x[b>>2]+20>>2]}a:{if(!Ba|!d){Ea[c|0](b);if((Ba|0)==1){break a}}if(!Ba){b=x[a+56>>2];c=x[x[b>>2]+20>>2]}if(!Ba|(d|0)==1){Ea[c|0](b);e=1;if((Ba|0)==1){break a}}if(!Ba){x[a+72>>2]=0;x[a+76>>2]=0;x[a+64>>2]=0;x[a+68>>2]=0}return}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12}function ss(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;var g=0,h=0,i=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];g=x[b+24>>2];l(0,x[b+20>>2]);l(1,g|0);f=+n();b=x[b+4>>2]}a:{h=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}else{g=0}if(h|!g){g=Ea[a|0](b,c,d,e,f)|0;if((Ba|0)==1){break a}a=g}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;o(+f);a=j(1)|0;i=g,k=j(0)|0,x[i+20>>2]=k;x[g+24>>2]=a;x[Ca>>2]=x[Ca>>2]+28;return 0}function ii(a,b){var c=0,d=0,e=0,f=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;c=x[Ca>>2];a=x[c>>2];d=x[c+8>>2];e=x[c+12>>2];b=x[c+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}a:{b:{if(Ba){c=d}else{e=x[a>>2];if(!e){break b}d=x[e+24>>2];c=(d|0)==x[e+28>>2]}c:{if(c|(Ba|0)==2){d=Ba?d:x[x[e>>2]+52>>2];if(!Ba|!f){c=Ea[d|0](e,b)|0;if((Ba|0)==1){break a}b=c}if(!Ba){break c}}if(!Ba){x[e+24>>2]=d+4;x[d>>2]=b}}if(!Ba){if(!Bh(b,-1)){break b}x[a>>2]=0}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[c+12>>2]=e;x[Ca>>2]=x[Ca>>2]+16}function Xp(a,b){var c=0,d=0,e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];g=x[c+8>>2];d=x[c+12>>2];e=x[c+16>>2];c=x[c+20>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}a:{b:{if(!Ba){d=Zq(b);e=co(a);if(d>>>0<=e>>>0){e=ri(a);$i(e,b,d);b=ya-16|0;ya=b;Rn(a,d);x[b+12>>2]=0;bo(e+(d<<2)|0,b+12|0);ya=b+16|0;break b}g=ui(a);c=d-e|0}if(!Ba|!f){kr(a,e,c,g,0,g,d,b);if((Ba|0)==1){break a}}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=g;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=c;x[Ca>>2]=x[Ca>>2]+24}function ts(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-32;h=x[Ca>>2];a=x[h>>2];b=x[h+4>>2];c=x[h+8>>2];d=x[h+12>>2];e=x[h+16>>2];f=x[h+20>>2];g=x[h+24>>2];h=x[h+28>>2]}a:{j=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}else{i=0}if(j|!i){i=Ea[a|0](b,c,d,e,f,g,h)|0;if((Ba|0)==1){break a}a=i}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;i=x[Ca>>2];x[i>>2]=a;x[i+4>>2]=b;x[i+8>>2]=c;x[i+12>>2]=d;x[i+16>>2]=e;x[i+20>>2]=f;x[i+24>>2]=g;x[i+28>>2]=h;x[Ca>>2]=x[Ca>>2]+32;return 0}function nd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;i=Ba;j=x[a+44>>2];k=x[a+40>>2];e=x[a+8>>2];a:{if((e|0)<0){break a}if(e){m=e+1&-2;while(1){d=g<<3;f=d+k|0;h=If(C[b+d>>3]+1e-6);if((Ba|0)!=(i|0)){p()}C[f>>3]=h;f=d+j|0;x[f>>2]=0;x[f+4>>2]=0;d=d|8;f=d+k|0;h=If(C[b+d>>3]+1e-6);if((Ba|0)!=(i|0)){p()}C[f>>3]=h;d=d+j|0;x[d>>2]=0;x[d+4>>2]=0;g=g+2|0;l=l+2|0;if((m|0)!=(l|0)){continue}break}}if(e&1){break a}e=g<<3;g=e+k|0;h=If(C[b+e>>3]+1e-6);if((Ba|0)!=(i|0)){p()}C[g>>3]=h;b=e+j|0;x[b>>2]=0;x[b+4>>2]=0}kd(a,k,j,c);if((Ba|0)!=(i|0)){p()}}function tk(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0;f=Ba;e=ya-16|0;ya=e;o(+b);h=j(1)|0;d=j(0)|0;c=h&2147483647;i=c+-1048576|0;a:{if((i|0)==2145386495|i>>>0<2145386495){g=d<<28;f=c>>>4|0;c=(c&15)<<28|d>>>4;d=f+1006632960|0;break a}if((c|0)==2146435072|c>>>0>2146435072){g=d<<28;c=(h&15)<<28|d>>>4;d=h>>>4|2147418112;break a}if(!(c|d)){c=0;d=0;break a}g=c;c=c?G(c):G(d)+32|0;Dg(e,d,g,0,0,c+49|0);if((Ba|0)!=(f|0)){p()}k=x[e>>2];g=x[e+4>>2];f=15372-c<<16;c=x[e+8>>2];d=f|x[e+12>>2]^65536}x[a>>2]=k;x[a+4>>2]=g;x[a+8>>2]=c;x[a+12>>2]=h&-2147483648|d;ya=e+16|0}function yb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;l=Ba;if(!y[48600]){v[48600]=1;x[12148]=-135762416;x[12149]=1073125824}if(!y[48616]){v[48616]=1;x[12152]=-500134854;x[12153]=1044740494}e=x[a+12>>2];if((e|0)<=0){d=0}else{i=C[6074];f=C[6076];m=x[a+16>>2];c=1;while(1){j=c;c=c<<3;g=C[c+b>>3];d=C[c+m>>3];a:{if(d>f){d=g/d;break a}d=0;if(!(f=i)+k|0;if((e|0)!=(j|0)){continue}break}d=+(k|0)}if((e|0)>=0){lf(x[a+16>>2],b,(e<<3)+8|0);if((Ba|0)!=(l|0)){p()}}if(!h){return 0}return+(d/+(h|0))}function Jr(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;g=x[Ca>>2];a=x[g>>2];b=x[g+4>>2];c=x[g+8>>2];d=x[g+12>>2];e=x[g+16>>2];f=x[g+20>>2];g=x[g+24>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){if(qr(a,x[b+8>>2],f)){Br(b,c,d,e);return}a=x[a+8>>2];g=x[x[a>>2]+20>>2]}a:{if(!Ba|!h){Ea[g|0](a,b,c,d,e,f);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[Ca>>2]=x[Ca>>2]+28}function lb(a){a=a|0;var b=0,c=0,d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;b=x[Ca>>2];a=x[b>>2];c=x[b+4>>2];b=x[b+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=12656;c=x[a+52>>2]}a:{if((Ba|0)==2|c){b=Ba?b:x[x[c>>2]+4>>2];if(!Ba|!d){Ea[b|0](c);if((Ba|0)==1){break a}}}c=Ba?c:x[a+56>>2];if(c|(Ba|0)==2){b=Ba?b:x[x[c>>2]+4>>2];if(!Ba|(d|0)==1){Ea[b|0](c);e=1;if((Ba|0)==1){break a}}}if(!Ba){Cb(a+16|0);return a|0}p()}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=c;x[d+8>>2]=b;x[Ca>>2]=x[Ca>>2]+12;return 0}function Ki(a,b,c,d,e,f,g,h){var i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;i=x[Ca>>2];a=x[i>>2];b=x[i+4>>2];c=x[i+8>>2];d=x[i+12>>2];e=x[i+16>>2];f=x[i+20>>2];g=x[i+24>>2];h=x[i+28>>2];i=x[i+32>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}i=Ba?i:x[x[a>>2]+12>>2];a:{if(!Ba|!j){j=Ea[i|0](a,b,c,d,e,f,g,h)|0;if((Ba|0)==1){break a}a=j}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;j=x[Ca>>2];x[j>>2]=a;x[j+4>>2]=b;x[j+8>>2]=c;x[j+12>>2]=d;x[j+16>>2]=e;x[j+20>>2]=f;x[j+24>>2]=g;x[j+28>>2]=h;x[j+32>>2]=i;x[Ca>>2]=x[Ca>>2]+36;return 0}function Ii(a,b,c,d,e,f,g,h){var i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-36;i=x[Ca>>2];a=x[i>>2];b=x[i+4>>2];c=x[i+8>>2];d=x[i+12>>2];e=x[i+16>>2];f=x[i+20>>2];g=x[i+24>>2];h=x[i+28>>2];i=x[i+32>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}i=Ba?i:x[x[a>>2]+16>>2];a:{if(!Ba|!j){j=Ea[i|0](a,b,c,d,e,f,g,h)|0;if((Ba|0)==1){break a}a=j}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;j=x[Ca>>2];x[j>>2]=a;x[j+4>>2]=b;x[j+8>>2]=c;x[j+12>>2]=d;x[j+16>>2]=e;x[j+20>>2]=f;x[j+24>>2]=g;x[j+28>>2]=h;x[j+32>>2]=i;x[Ca>>2]=x[Ca>>2]+36;return 0}function Bf(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}if(!Ba){b=x[a+72>>2];x[a+72>>2]=b|b-1;b=x[a+20>>2]!=x[a+28>>2]}a:{if((Ba|0)==2|b){b=Ba?b:x[a+36>>2];if(!Ba|!c){Ea[b|0](a,0,0)|0;if((Ba|0)==1){break a}}}if(!Ba){x[a+28>>2]=0;x[a+16>>2]=0;x[a+20>>2]=0;b=x[a>>2];if(b&4){x[a>>2]=b|32;return-1}c=x[a+44>>2]+x[a+48>>2]|0;x[a+8>>2]=c;x[a+4>>2]=c;return b<<27>>31}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function Qh(a,b,c,d,e){var f=0,g=0,h=0,i=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;f=x[Ca>>2];a=x[f>>2];b=x[f+4>>2];c=x[f+8>>2];d=x[f+12>>2];g=x[f+20>>2];l(0,x[f+16>>2]);l(1,g|0);e=+n();g=x[f+24>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}g=Ba?g:x[x[a>>2]+32>>2];a:{if(!Ba|!h){f=Ea[g|0](a,b,c,d,e)|0;if((Ba|0)==1){break a}a=f}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;o(+e);a=j(1)|0;i=f,k=j(0)|0,x[i+16>>2]=k;x[f+20>>2]=a;x[f+24>>2]=g;x[Ca>>2]=x[Ca>>2]+28;return 0}function Er(a,b,c,d,e,f){var g=0,h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;g=x[Ca>>2];a=x[g>>2];c=x[g+8>>2];d=x[g+12>>2];e=x[g+16>>2];f=x[g+20>>2];h=x[g+24>>2];b=x[g+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;i=x[x[Ca>>2]>>2]}if(!Ba){h=x[a+4>>2];g=h>>8;if(h&1){g=xr(x[d>>2],g)}e=h&2?e:2;a=x[a>>2];h=x[x[a>>2]+20>>2];d=d+g|0}a:{if(!Ba|!i){Ea[h|0](a,b,c,d,e,f);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[g+24>>2]=h;x[Ca>>2]=x[Ca>>2]+28}function Mg(a,b,c,d,e){var f=0,g=0;g=Ba;f=ya-32|0;ya=f;x[f+20>>2]=b;x[f+24>>2]=a;x[f+16>>2]=c;x[f+12>>2]=d;x[f+8>>2]=e;Sg(a,b,c,d);if((Ba|0)!=(g|0)){p()}d=Jg(e,d);if((Ba|0)!=(g|0)){p()}a:{if(!d){break a}Kg(f+12|0,f+8|0);if((Ba|0)!=(g|0)){p()}c=Jg(x[f+12>>2],c);if((Ba|0)!=(g|0)){p()}if(!c){break a}Kg(f+16|0,f+12|0);if((Ba|0)!=(g|0)){p()}b=Jg(x[f+16>>2],b);if((Ba|0)!=(g|0)){p()}if(!b){break a}Kg(f+20|0,f+16|0);if((Ba|0)!=(g|0)){p()}a=Jg(x[f+20>>2],a);if((Ba|0)!=(g|0)){p()}if(!a){break a}Kg(f+24|0,f+20|0);if((Ba|0)!=(g|0)){p()}}ya=f+32|0}function Hb(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;h=Ba;g=a+4|0;a=x[a+4>>2];a:{b:{if(!a){break b}e=y[b+11|0];c=e<<24>>24<0;e=c?x[b+4>>2]:e;c=c?x[b>>2]:b;b=g;while(1){d=y[a+27|0];f=d<<24>>24<0;d=f?x[a+20>>2]:d;f=Of(f?x[a+16>>2]:a+16|0,c,e>>>0>>0?e:d);if((Ba|0)!=(h|0)){p()}d=f?(f|0)<0:e>>>0>d>>>0;b=d?b:a;a=x[(d?a+4|0:a)>>2];if(a){continue}break}if((b|0)==(g|0)){break b}d=c;a=y[b+27|0];c=a<<24>>24<0;a=c?x[b+20>>2]:a;c=Of(d,c?x[b+16>>2]:b+16|0,a>>>0>>0?a:e);if((Ba|0)!=(h|0)){p()}if(((c?(c|0)<0:a>>>0>e>>>0)|0)!=1){break a}}b=g}return b}function ys(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+16>>2];h=x[b+20>>2];i=x[b+24>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){i=g;h=f}a:{if(!Ba|!j){f=Ea[a|0](b,c,d,e,h,i)|0;if((Ba|0)==1){break a}a=f}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=h;x[f+24>>2]=i;x[Ca>>2]=x[Ca>>2]+28;return 0}function es(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,k=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];e=x[b+20>>2];l(0,x[b+16>>2]);l(1,e|0);f=+n();b=x[b+4>>2]}a:{g=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}else{e=0}if(g|!e){h=+Ea[a|0](b,c,d);if((Ba|0)==1){break a}f=h}if(!Ba){return+f}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;o(+f);a=j(1)|0;i=e,k=j(0)|0,x[i+16>>2]=k;x[e+20>>2]=a;x[Ca>>2]=x[Ca>>2]+24;return 0}function vd(a){var b=0,c=0,d=0,e=0,f=0;d=Ba;b=x[a+16>>2];if(b){c=x[b>>2];if(c){zg(c);if((Ba|0)!=(d|0)){p()}}c=x[b+4>>2];if(c){zg(c);if((Ba|0)!=(d|0)){p()}}zg(b);if((Ba|0)!=(d|0)){p()}}c=x[a>>2];e=x[a+8>>2];if(e){if(c){b=0;while(1){f=x[e+(b<<2)>>2];if(f){zg(f);if((Ba|0)!=(d|0)){p()}}b=b+1|0;if((c|0)!=(b|0)){continue}break}}zg(e);if((Ba|0)!=(d|0)){p()}c=x[a>>2]}e=x[a+12>>2];if(e){if(c){b=0;while(1){f=x[e+(b<<2)>>2];if(f){zg(f);if((Ba|0)!=(d|0)){p()}}b=b+1|0;if((c|0)!=(b|0)){continue}break}}zg(e);if((Ba|0)!=(d|0)){p()}}return a}function Yl(a,b){var c=0,d=0,e=0,f=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;b=x[Ca>>2];a=x[b>>2];d=x[b+8>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}if(!Ba){d=ya-16|0;ya=d;c=d+12|0;vj(c,a);a=c}a:{if(!Ba|!e){c=bi(a);if((Ba|0)==1){break a}a=c}if(!Ba|(e|0)==1){jm(a,39344,39370,b);f=1;if((Ba|0)==1){break a}}a=Ba?a:d+12|0;if(!Ba|(e|0)==2){Po(a);f=2;if((Ba|0)==1){break a}}if(!Ba){ya=d+16|0;return b}p()}x[x[Ca>>2]>>2]=f;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[Ca>>2]=x[Ca>>2]+12;return 0}function rs(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;g=x[Ca>>2];a=x[g>>2];b=x[g+4>>2];c=x[g+8>>2];d=x[g+12>>2];e=x[g+16>>2];f=x[g+20>>2];g=x[g+24>>2]}a:{i=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}else{h=0}if(i|!h){h=Ea[a|0](b,c,d,e,f,g)|0;if((Ba|0)==1){break a}a=h}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[Ca>>2]=x[Ca>>2]+28;return 0}function ge(a){a=a|0;var b=0,c=0,d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;b=x[Ca>>2];a=x[b>>2];c=x[b+4>>2];b=x[b+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=14492;b=x[a+8>>2];c=!b}a:{b:{if(!Ba){if(c){break b}c=x[b+4>>2];x[b+4>>2]=c-1;if(c){break b}c=x[x[b>>2]+8>>2]}if(!Ba|!d){Ea[c|0](b);if((Ba|0)==1){break a}}if(!Ba|(d|0)==1){cr(b);e=1;if((Ba|0)==1){break a}}}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=c;x[d+8>>2]=b;x[Ca>>2]=x[Ca>>2]+12;return 0}function Sd(a){a=a|0;var b=0,c=0,d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;b=x[Ca>>2];a=x[b>>2];c=x[b+4>>2];b=x[b+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=13792;b=x[a+8>>2];c=!b}a:{b:{if(!Ba){if(c){break b}c=x[b+4>>2];x[b+4>>2]=c-1;if(c){break b}c=x[x[b>>2]+8>>2]}if(!Ba|!d){Ea[c|0](b);if((Ba|0)==1){break a}}if(!Ba|(d|0)==1){cr(b);e=1;if((Ba|0)==1){break a}}}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=c;x[d+8>>2]=b;x[Ca>>2]=x[Ca>>2]+12;return 0}function $d(a){a=a|0;var b=0,c=0,d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;b=x[Ca>>2];a=x[b>>2];c=x[b+4>>2];b=x[b+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=14140;b=x[a+8>>2];c=!b}a:{b:{if(!Ba){if(c){break b}c=x[b+4>>2];x[b+4>>2]=c-1;if(c){break b}c=x[x[b>>2]+8>>2]}if(!Ba|!d){Ea[c|0](b);if((Ba|0)==1){break a}}if(!Ba|(d|0)==1){cr(b);e=1;if((Ba|0)==1){break a}}}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=c;x[d+8>>2]=b;x[Ca>>2]=x[Ca>>2]+12;return 0}function wm(a,b,c,d,e){var f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;f=x[Ca>>2];a=x[f>>2];b=x[f+4>>2];c=x[f+8>>2];d=x[f+12>>2];e=x[f+16>>2];f=x[f+20>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){f=ya-16|0;ya=f;x[f+12>>2]=c;x[f+8>>2]=e;e=Rl(f+4|0,f+12|0);c=x[f+8>>2]}a:{if(!Ba|!g){g=Ok(a,b,d,c);if((Ba|0)==1){break a}c=g}if(!Ba){Sl(e);ya=f+16|0;return c}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[Ca>>2]=x[Ca>>2]+24;return 0}function ek(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}a:{if(!Ba|!d){c=Qj(b);if((Ba|0)==1){break a}b=c}if(!Ba){x[a+36>>2]=b}if(!Ba|(d|0)==1){c=yh(b);e=1;if((Ba|0)==1){break a}b=c}if(!Ba){x[a+44>>2]=b;b=x[a+36>>2]}if(!Ba|(d|0)==2){c=Gi(b);e=2;if((Ba|0)==1){break a}b=c}if(!Ba){v[a+53|0]=b;if(x[a+44>>2]>=9){Ji();p()}}return}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8}function Tj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}a:{if(!Ba|!d){c=Fi(b);if((Ba|0)==1){break a}b=c}if(!Ba){x[a+36>>2]=b}if(!Ba|(d|0)==1){c=yh(b);e=1;if((Ba|0)==1){break a}b=c}if(!Ba){x[a+44>>2]=b;b=x[a+36>>2]}if(!Ba|(d|0)==2){c=Gi(b);e=2;if((Ba|0)==1){break a}b=c}if(!Ba){v[a+53|0]=b;if(x[a+44>>2]>=9){Ji();p()}}return}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8}function gf(a){var b=0,c=0,d=0,e=0;d=Ba;e=ya-16|0;ya=e;o(+a);c=j(1)|0;j(0)|0;c=c&2147483647;a:{if(c>>>0<=1072243195){b=1;if(c>>>0<1044816030){break a}b=cf(a,0);if((Ba|0)!=(d|0)){p()}break a}b=a-a;if(c>>>0>=2146435072){break a}c=ef(a,e);if((Ba|0)!=(d|0)){p()}a=C[e+8>>3];b=C[e>>3];b:{switch(c&3){case 0:b=cf(b,a);if((Ba|0)!=(d|0)){p()}break a;case 1:a=ff(b,a,1);if((Ba|0)!=(d|0)){p()}b=-a;break a;case 2:a=cf(b,a);if((Ba|0)!=(d|0)){p()}b=-a;break a;default:break b}}b=ff(b,a,1);if((Ba|0)!=(d|0)){p()}}ya=e+16|0;return b}function Dl(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;e=Ba;f=ya-16|0;ya=f;a:{b:{c:{if((a|0)!=(b|0)){d:{e:{g=y[a|0];if((g|0)!=45){break e}a=a+1|0;if((b|0)!=(a|0)){break e}break d}h=x[12163];x[12163]=0;i=f+12|0;Ol();if((Ba|0)!=(e|0)){p()}a=ar(a,i,d);d=Da;if((Ba|0)!=(e|0)){p()}e=x[12163];f:{if(e){if(x[f+12>>2]!=(b|0)){break f}if((e|0)==68){break c}break b}x[12163]=h;if(x[f+12>>2]==(b|0)){break b}}}}x[c>>2]=4;b=0;a=0;break a}x[c>>2]=4;b=-1;a=-1;break a}c=(g|0)==45;b=c?0-a|0:a;a=c?0-(d+((a|0)!=0)|0)|0:d}ya=f+16|0;Da=a;return b}function he(a){a=a|0;var b=0,c=0,d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;b=x[Ca>>2];a=x[b>>2];c=x[b+4>>2];b=x[b+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=14492;b=x[a+8>>2];c=!b}a:{b:{if(!Ba){if(c){break b}c=x[b+4>>2];x[b+4>>2]=c-1;if(c){break b}c=x[x[b>>2]+8>>2]}if(!Ba|!d){Ea[c|0](b);if((Ba|0)==1){break a}}if(!Ba|(d|0)==1){cr(b);e=1;if((Ba|0)==1){break a}}}if(!Ba){zg(a)}return}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=c;x[d+8>>2]=b;x[Ca>>2]=x[Ca>>2]+12}function ae(a){a=a|0;var b=0,c=0,d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;b=x[Ca>>2];a=x[b>>2];c=x[b+4>>2];b=x[b+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=14140;b=x[a+8>>2];c=!b}a:{b:{if(!Ba){if(c){break b}c=x[b+4>>2];x[b+4>>2]=c-1;if(c){break b}c=x[x[b>>2]+8>>2]}if(!Ba|!d){Ea[c|0](b);if((Ba|0)==1){break a}}if(!Ba|(d|0)==1){cr(b);e=1;if((Ba|0)==1){break a}}}if(!Ba){zg(a)}return}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=c;x[d+8>>2]=b;x[Ca>>2]=x[Ca>>2]+12}function Td(a){a=a|0;var b=0,c=0,d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;b=x[Ca>>2];a=x[b>>2];c=x[b+4>>2];b=x[b+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=13792;b=x[a+8>>2];c=!b}a:{b:{if(!Ba){if(c){break b}c=x[b+4>>2];x[b+4>>2]=c-1;if(c){break b}c=x[x[b>>2]+8>>2]}if(!Ba|!d){Ea[c|0](b);if((Ba|0)==1){break a}}if(!Ba|(d|0)==1){cr(b);e=1;if((Ba|0)==1){break a}}}if(!Ba){zg(a)}return}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=c;x[d+8>>2]=b;x[Ca>>2]=x[Ca>>2]+12}function cg(a){var b=0,c=0,d=0,e=0;c=Ba;d=ya-16|0;ya=d;o(+a);b=j(1)|0;j(0)|0;b=b&2147483647;a:{if(b>>>0<=1072243195){if(b>>>0<1045430272){break a}a=ff(a,0,0);if((Ba|0)!=(c|0)){p()}break a}if(b>>>0>=2146435072){a=a-a;break a}b=ef(a,d);if((Ba|0)!=(c|0)){p()}a=C[d+8>>3];e=C[d>>3];b:{switch(b&3){case 0:a=ff(e,a,1);if((Ba|0)!=(c|0)){p()}break a;case 1:a=cf(e,a);if((Ba|0)!=(c|0)){p()}break a;case 2:a=ff(e,a,1);if((Ba|0)!=(c|0)){p()}a=-a;break a;default:break b}}a=cf(e,a);if((Ba|0)!=(c|0)){p()}a=-a}ya=d+16|0;return a}function zl(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;e=Ba;f=ya-16|0;ya=f;a:{b:{c:{d:{if((a|0)!=(b|0)){e:{f:{g=y[a|0];if((g|0)!=45){break f}a=a+1|0;if((b|0)!=(a|0)){break f}break e}h=x[12163];x[12163]=0;i=f+12|0;Ol();if((Ba|0)!=(e|0)){p()}a=ar(a,i,d);d=Da;if((Ba|0)!=(e|0)){p()}e=x[12163];g:{if(e){if(x[f+12>>2]!=(b|0)){break g}if((e|0)==68){break c}break d}x[12163]=h;if(x[f+12>>2]==(b|0)){break d}}}}x[c>>2]=4;a=0;break a}if(!d&a>>>0<=65535){break b}}x[c>>2]=4;a=65535;break a}a=(g|0)==45?0-a|0:a}ya=f+16|0;return a&65535}function wr(a,b,c,d){var e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;e=x[Ca>>2];a=x[e>>2];c=x[e+8>>2];d=x[e+12>>2];f=x[e+16>>2];b=x[e+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}if(!Ba){e=x[a+4>>2];f=0;a:{if(!c){break a}f=e>>8;if(!(e&1)){break a}f=xr(x[c>>2],f)}f=f+c|0;d=e&2?d:2;a=x[a>>2];c=x[x[a>>2]+28>>2]}b:{if(!Ba|!g){Ea[c|0](a,b,f,d);if((Ba|0)==1){break b}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=f;x[Ca>>2]=x[Ca>>2]+20}function kk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;b=x[Ca>>2];a=x[b>>2];d=x[b+8>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}d=Ba?d:x[x[a>>2]+24>>2];a:{if(!Ba|!e){Ea[d|0](a)|0;if((Ba|0)==1){break a}}if(!Ba|(e|0)==1){c=Qj(b);f=1;if((Ba|0)==1){break a}b=c}if(!Ba){x[a+36>>2]=b}if(!Ba|(e|0)==2){c=Gi(b);f=2;if((Ba|0)==1){break a}b=c}if(!Ba){v[a+44|0]=b}return}x[x[Ca>>2]>>2]=f;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[Ca>>2]=x[Ca>>2]+12}function $j(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;b=x[Ca>>2];a=x[b>>2];d=x[b+8>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}d=Ba?d:x[x[a>>2]+24>>2];a:{if(!Ba|!e){Ea[d|0](a)|0;if((Ba|0)==1){break a}}if(!Ba|(e|0)==1){c=Fi(b);f=1;if((Ba|0)==1){break a}b=c}if(!Ba){x[a+36>>2]=b}if(!Ba|(e|0)==2){c=Gi(b);f=2;if((Ba|0)==1){break a}b=c}if(!Ba){v[a+44|0]=b}return}x[x[Ca>>2]>>2]=f;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[Ca>>2]=x[Ca>>2]+12}function Sp(a,b){var c=0,d=0,e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];g=x[c+8>>2];f=x[c+12>>2];d=x[c+16>>2];c=x[c+20>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}a:{b:{if(!Ba){f=gg(b);d=vi(a);if(f>>>0<=d>>>0){d=ri(a);Zi(d,b,f);Aq(a,d,f);break b}g=ui(a);c=f-d|0}if(!Ba|!e){gr(a,d,c,g,0,g,f,b);if((Ba|0)==1){break a}}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=g;x[e+12>>2]=f;x[e+16>>2]=d;x[e+20>>2]=c;x[Ca>>2]=x[Ca>>2]+24}function Ng(a,b,c){var d=0,e=0,f=0;e=Ba;d=ya-16|0;ya=d;x[d+4>>2]=b;x[d+8>>2]=a;x[d>>2]=c;f=Jg(b,a);if((Ba|0)!=(e|0)){p()}a=Jg(c,b);if((Ba|0)!=(e|0)){p()}a:{if(!f){if(!a){break a}Kg(d+4|0,d);if((Ba|0)!=(e|0)){p()}a=Jg(x[d+4>>2],x[d+8>>2]);if((Ba|0)!=(e|0)){p()}if(!a){break a}Kg(d+8|0,d+4|0);if((Ba|0)!=(e|0)){p()}break a}if(a){Kg(d+8|0,d);if((Ba|0)!=(e|0)){p()}break a}Kg(d+8|0,d+4|0);if((Ba|0)!=(e|0)){p()}a=Jg(x[d>>2],x[d+4>>2]);if((Ba|0)!=(e|0)){p()}if(!a){break a}Kg(d+4|0,d);if((Ba|0)!=(e|0)){p()}}ya=d+16|0}function ul(a,b,c,d){var e=0,f=0,g=0,h=0;e=Ba;f=ya-16|0;ya=f;a:{b:{c:{if((a|0)!=(b|0)){g=x[12163];x[12163]=0;h=f+12|0;Ol();if((Ba|0)!=(e|0)){p()}d=$q(a,h,d);a=Da;if((Ba|0)!=(e|0)){p()}e=x[12163];d:{if(e){if(x[f+12>>2]!=(b|0)){break d}if((e|0)==68){break b}break c}x[12163]=g;if(x[f+12>>2]==(b|0)){break c}}}x[c>>2]=4;b=0;break a}if((a|0)<0&d>>>0<2147483648|(a|0)<-1|(d>>>0>2147483647&(a|0)>=0|(a|0)>0)){break b}b=d;break a}x[c>>2]=4;b=2147483647;if(!!d&(a|0)>=0|(a|0)>0){break a}b=-2147483648}ya=f+16|0;return b}function Fr(a,b,c,d,e){var f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;f=x[Ca>>2];a=x[f>>2];c=x[f+8>>2];d=x[f+12>>2];e=x[f+16>>2];g=x[f+20>>2];b=x[f+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){g=x[a+4>>2];f=g>>8;if(g&1){f=xr(x[c>>2],f)}d=g&2?d:2;a=x[a>>2];g=x[x[a>>2]+24>>2];c=c+f|0}a:{if(!Ba|!h){Ea[g|0](a,b,c,d,e);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[f+20>>2]=g;x[Ca>>2]=x[Ca>>2]+24}function de(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+16>>2];l(0,x[b+12>>2]);l(1,d|0);e=+n();b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}if(!Ba){e=C[c>>3];a=x[a+4>>2];c=x[x[a>>2]+4>>2];b=x[b>>2]}a:{if(!Ba|!f){Ea[c|0](a,b,e);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;o(+e);a=j(1)|0;g=d,h=j(0)|0,x[g+12>>2]=h;x[d+16>>2]=a;x[Ca>>2]=x[Ca>>2]+20}function Ff(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;e=Ba;d=ya-32|0;ya=d;x[d+16>>2]=b;f=x[a+48>>2];x[d+20>>2]=c-((f|0)!=0);h=x[a+44>>2];x[d+28>>2]=f;x[d+24>>2]=h;f=pa(x[a+60>>2],d+16|0,2,d+12|0)|0;if((Ba|0)!=(e|0)){p()}h=ug(f);if((Ba|0)!=(e|0)){p()}a:{b:{if(h){b=32}else{e=x[d+12>>2];if((e|0)>0){break b}b=e?32:16}x[a>>2]=b|x[a>>2];break a}g=e;f=x[d+20>>2];if(f>>>0>=e>>>0){break a}g=x[a+44>>2];x[a+4>>2]=g;x[a+8>>2]=g+(e-f|0);if(x[a+48>>2]){x[a+4>>2]=g+1;v[(b+c|0)-1|0]=y[g|0]}g=c}ya=d+32|0;return g|0}function xs(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];f=x[b+12>>2];g=x[b+16>>2];h=x[b+20>>2];i=x[b+24>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;j=x[x[Ca>>2]>>2]}if(!Ba){i=e;h=d}a:{if(!Ba|!j){Ea[a|0](b,c,h,i,f,g);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[d+12>>2]=f;x[d+16>>2]=g;x[d+20>>2]=h;x[d+24>>2]=i;x[Ca>>2]=x[Ca>>2]+28}function Xd(a){a=a|0;var b=0,c=0,d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;b=x[Ca>>2];a=x[b>>2];c=x[b+4>>2];b=x[b+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){b=x[a+8>>2];c=!b}a:{b:{if(!Ba){if(c){break b}c=x[b+4>>2];x[b+4>>2]=c-1;if(c){break b}c=x[x[b>>2]+8>>2]}if(!Ba|!d){Ea[c|0](b);if((Ba|0)==1){break a}}if(!Ba|(d|0)==1){cr(b);e=1;if((Ba|0)==1){break a}}}if(!Ba){zg(a)}return}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=c;x[d+8>>2]=b;x[Ca>>2]=x[Ca>>2]+12}function Eg(a,b,c,d,e,f){var g=0,h=0,i=0,j=0;a:{if(f&64){c=f+-64|0;b=c&31;if((c&63)>>>0>=32){c=0;b=e>>>b|0}else{c=e>>>b|0;b=((1<>>b}d=0;e=0;break a}if(!f){break a}i=d;h=64-f|0;g=h&31;if((h&63)>>>0>=32){h=d<>>32-g|e<>>0>=32){g=0;b=c>>>b|0}else{g=c>>>b|0;b=((1<>>b}b=j|b;c=g|h;g=d;d=f&31;if((f&63)>>>0>=32){h=0;d=e>>>d|0}else{h=e>>>d|0;d=((1<>>d}e=h}x[a>>2]=b;x[a+4>>2]=c;x[a+8>>2]=d;x[a+12>>2]=e}function Ch(a,b){var c=0,d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}a:{if(Ba){e=c}else{c=x[a+24>>2];e=(c|0)==x[a+28>>2]}if(e|(Ba|0)==2){if(!Ba){b=jh(b);c=x[x[a>>2]+52>>2]}if(!Ba|!d){d=Ea[c|0](a,b)|0;if((Ba|0)==1){break a}a=d}if(!Ba){return a}}if(!Ba){x[a+24>>2]=c+1;v[c|0]=b;return jh(b)}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12;return 0}function Ar(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}a:{b:{if(!((Ba?c:!b)?Ba:1)){break b}if(!Ba|!d){d=sr(b,46420);if((Ba|0)==1){break a}b=d}if(!Ba){if(!b|x[b+8>>2]&(x[a+8>>2]^-1)){break b}if(!qr(x[a+12>>2],x[b+12>>2],0)){break b}c=qr(x[a+16>>2],x[b+16>>2],0)}}if(!Ba){return c}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12;return 0}function fr(a,b){var c=0,d=0,e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];d=x[c+8>>2];c=x[c+12>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}if(!Ba){a=er(a);x[a>>2]=47212;c=gg(b);d=c+13|0}a:{if(!Ba|!e){e=dr(d);if((Ba|0)==1){break a}d=e}if(!Ba){x[d+8>>2]=0;x[d+4>>2]=c;x[d>>2]=c;f=a+4|0,g=lf(d+12|0,b,c+1|0),x[f>>2]=g;return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=d;x[e+12>>2]=c;x[Ca>>2]=x[Ca>>2]+16;return 0}function Hh(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){x[a+4>>2]=b;v[a|0]=0;c=qh(x[x[b>>2]-12>>2]+b|0)}a:{if((Ba|0)==2|c){if(!Ba){c=x[(x[x[b>>2]-12>>2]+b|0)+72>>2]}if((Ba|0)==2|c){b=Ba?b:x[(x[x[b>>2]-12>>2]+b|0)+72>>2];if(!Ba|!d){rh(b);if((Ba|0)==1){break a}}}if(!Ba){v[a|0]=1}}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function us(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-28;g=x[Ca>>2];a=x[g>>2];b=x[g+4>>2];c=x[g+8>>2];d=x[g+12>>2];e=x[g+16>>2];f=x[g+20>>2];g=x[g+24>>2]}a:{i=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}else{h=0}if(i|!h){Ea[a|0](b,c,d,e,f,g);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;h=x[Ca>>2];x[h>>2]=a;x[h+4>>2]=b;x[h+8>>2]=c;x[h+12>>2]=d;x[h+16>>2]=e;x[h+20>>2]=f;x[h+24>>2]=g;x[Ca>>2]=x[Ca>>2]+28}function Xc(a){a=a|0;var b=0,c=0;c=Ba;x[a>>2]=13484;b=x[a+20>>2];if(b){zg(b);if((Ba|0)!=(c|0)){p()}}b=x[a+24>>2];if(b){zg(b);if((Ba|0)!=(c|0)){p()}}b=x[a+28>>2];if(b){zg(b);if((Ba|0)!=(c|0)){p()}}b=x[a+32>>2];if(b){zg(b);if((Ba|0)!=(c|0)){p()}}b=x[a+36>>2];if(b){zg(b);if((Ba|0)!=(c|0)){p()}}b=x[a+40>>2];if(b){zg(b);if((Ba|0)!=(c|0)){p()}}b=x[a+44>>2];if(b){zg(b);if((Ba|0)!=(c|0)){p()}}b=x[a+48>>2];if(b){zg(b);if((Ba|0)!=(c|0)){p()}}b=x[a+52>>2];if(b){zg(b);if((Ba|0)!=(c|0)){p()}}return a|0}function ps(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;f=x[Ca>>2];a=x[f>>2];b=x[f+4>>2];c=x[f+8>>2];d=x[f+12>>2];e=x[f+16>>2];f=x[f+20>>2]}a:{h=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}else{g=0}if(h|!g){g=Ea[a|0](b,c,d,e,f)|0;if((Ba|0)==1){break a}a=g}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[Ca>>2]=x[Ca>>2]+24;return 0}function Bl(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;e=Ba;f=ya-16|0;ya=f;a:{b:{c:{d:{if((a|0)!=(b|0)){e:{f:{g=y[a|0];if((g|0)!=45){break f}a=a+1|0;if((b|0)!=(a|0)){break f}break e}h=x[12163];x[12163]=0;i=f+12|0;Ol();if((Ba|0)!=(e|0)){p()}a=ar(a,i,d);d=Da;if((Ba|0)!=(e|0)){p()}e=x[12163];g:{if(e){if(x[f+12>>2]!=(b|0)){break g}if((e|0)==68){break c}break d}x[12163]=h;if(x[f+12>>2]==(b|0)){break d}}}}x[c>>2]=4;a=0;break a}if(!d){break b}}x[c>>2]=4;a=-1;break a}a=(g|0)==45?0-a|0:a}ya=f+16|0;return a}function Ni(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];f=x[b+16>>2];g=x[b+20>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}if(!Ba){f=x[c+8>>2];g=x[c+12>>2];c=x[x[b>>2]+16>>2]}a:{if(!Ba|!e){Ea[c|0](a,b,f,g,0,d);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[e+16>>2]=f;x[e+20>>2]=g;x[Ca>>2]=x[Ca>>2]+24}function Mq(a,b,c){var d=0,e=0,f=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;d=x[Ca>>2];a=x[d>>2];b=x[d+4>>2];c=x[d+8>>2];d=x[d+12>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}if(!Ba){d=ya-16|0;ya=d;e=c>>>0>30}a:{b:{if(!Ba){if(!(y[b+120|0]|e)){v[b+120|0]=1;break b}b=d+15|0}if(!Ba|!f){e=zq(b,c);if((Ba|0)==1){break a}b=e}}if(!Ba){ya=d+16|0;x[a+4>>2]=c;x[a>>2]=b}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[Ca>>2]=x[Ca>>2]+16}function Dg(a,b,c,d,e,f){var g=0,h=0,i=0;a:{if(f&64){e=f+-64|0;f=b;d=e&31;if((e&63)>>>0>=32){e=f<>>32-d|c<>>0>=32){i=d<>>32-g|e<>>0>=32){e=0;d=c>>>d|0}else{e=c>>>d|0;d=((1<>>d}d=h|d;e=e|i;h=b;g=f&31;if((f&63)>>>0>=32){i=b<>>32-g|c<>2]=b;x[a+4>>2]=c;x[a+8>>2]=d;x[a+12>>2]=e}function or(){var a=0,b=0,c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;a=x[Ca>>2];c=x[a>>2];a=x[a+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){a=ya-16|0;ya=a;c=x[7762]}a:{if(!Ba|!b){Tf(12046,11,1,c);if((Ba|0)==1){break a}}if(!Ba){x[a+12>>2]=0}if(!Ba|(b|0)==1){rg(c,10973,0);d=1;if((Ba|0)==1){break a}}if(!Ba|(b|0)==2){Vf(10,c);d=2;if((Ba|0)==1){break a}}if(!Ba){ba();p()}return}x[x[Ca>>2]>>2]=d;x[Ca>>2]=x[Ca>>2]+4;b=x[Ca>>2];x[b>>2]=c;x[b+4>>2]=a;x[Ca>>2]=x[Ca>>2]+8}function ne(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;b=x[Ca>>2];a=x[b>>2];d=x[b+8>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}a:{if(!Ba|!e){c=Ib(51780,12087,12);if((Ba|0)==1){break a}a=c}if(!Ba){d=gg(b)}if(!Ba|(e|0)==1){c=Ib(a,b,d);f=1;if((Ba|0)==1){break a}a=c}if(!Ba|(e|0)==2){Ib(a,12218,1);f=2;if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=f;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=d;x[Ca>>2]=x[Ca>>2]+12}function vr(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];c=x[e+8>>2];d=x[e+12>>2];e=x[e+16>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}if(!Ba){if(qr(a,x[b+8>>2],0)){tr(b,c,d);return}a=x[a+8>>2];e=x[x[a>>2]+28>>2]}a:{if(!Ba|!f){Ea[e|0](a,b,c,d);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[Ca>>2]=x[Ca>>2]+20}function Kf(a){var b=0,c=0,d=0,e=0,f=0;b=(q(a),j(2));if((b|0)==1065353216){return E(0)}a:{if(b-2139095040>>>0<=2164260863){c=b<<1;if(!c){b=ya-16|0;B[b+12>>2]=-1;return E(B[b+12>>2]/E(0))}if((b|0)==2139095040){break a}if(!(c>>>0<4278190080&(b|0)>=0)){a=E(a-a);return E(a/a)}b=(q(E(a*E(8388608))),j(2))-192937984|0}c=b-1060306944|0;e=c>>>15&240;d=+(l(2,b-(c&-8388608)|0),r())*C[e+26592>>3]+-1;f=d*d;a=E((C[3357]*f+(C[3358]*d+C[3359]))*f+(+(c>>23)*C[3356]+C[e+26600>>3]+d))}return a}function id(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=Ba;fd(a,b,x[a+48>>2],x[a+52>>2]);if((Ba|0)!=(e|0)){p()}b=0;e=x[a+8>>2];a:{if((e|0)<0){break a}h=x[a+52>>2];a=x[a+48>>2];if(e){k=e+1&-2;while(1){f=b<<3;d=C[f+a>>3];g=d*d;d=C[h+f>>3];B[(b<<2)+c>>2]=M(g+d*d);f=b|1;i=f<<3;d=C[i+a>>3];g=d*d;d=C[h+i>>3];B[(f<<2)+c>>2]=M(g+d*d);b=b+2|0;j=j+2|0;if((k|0)!=(j|0)){continue}break}}if(e&1){break a}e=a;a=b<<3;d=C[e+a>>3];g=d*d;d=C[a+h>>3];B[(b<<2)+c>>2]=M(g+d*d)}}function yi(a,b){a=a|0;b=b|0;var c=0,d=0;c=Ba;if(A[a+24>>2]>A[a+44>>2]){x[a+44>>2]=x[a+24>>2]}a:{if(A[a+8>>2]>=A[a+12>>2]){break a}d=Bh(b,-1);if((Ba|0)!=(c|0)){p()}if(d){ni(a,x[a+8>>2],x[a+12>>2]-1|0,x[a+44>>2]);if((Ba|0)!=(c|0)){p()}a=zi(b);if((Ba|0)!=(c|0)){p()}return a|0}if(!(y[a+48|0]&16)){d=Bh(b<<24>>24,v[x[a+12>>2]-1|0]);if((Ba|0)!=(c|0)){p()}if(!d){break a}}ni(a,x[a+8>>2],x[a+12>>2]-1|0,x[a+44>>2]);if((Ba|0)!=(c|0)){p()}v[x[a+12>>2]]=b<<24>>24;return b|0}return-1}function ld(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;l=Ba;e=x[a+8>>2];a:{if((e|0)<0){break a}h=x[a+60>>2];f=x[a+56>>2];if(e){m=e+1&-2;while(1){d=i<<3;g=j<<3;C[d+f>>3]=C[g+b>>3];C[d+h>>3]=C[(g|8)+b>>3];d=d|8;C[d+f>>3]=C[(g|16)+b>>3];C[d+h>>3]=C[(g|24)+b>>3];i=i+2|0;j=j+4|0;k=k+2|0;if((m|0)!=(k|0)){continue}break}}if(e&1){break a}e=i<<3;d=e+f|0;f=j<<3;C[d>>3]=C[f+b>>3];C[e+h>>3]=C[(f|8)+b>>3]}kd(a,x[a+40>>2],x[a+44>>2],c);if((Ba|0)!=(l|0)){p()}}function Pl(a,b,c){var d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;d=x[Ca>>2];a=x[d>>2];b=x[d+4>>2];c=x[d+8>>2];d=x[d+12>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}if(!Ba){d=ya-16|0;ya=d;x[d+12>>2]=b;x[d+8>>2]=c;c=Rl(d+4|0,d+12|0);b=x[d+8>>2]}a:{if(!Ba|!e){e=Fk(a,3857,b);if((Ba|0)==1){break a}b=e}if(!Ba){Sl(c);ya=d+16|0;return b}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[Ca>>2]=x[Ca>>2]+16;return 0}function vn(a,b,c,d,e){var f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];c=x[e+8>>2];d=x[e+12>>2];e=x[e+16>>2]}a:{g=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}else{f=0}if(g|!f){f=wn(b,c,d,e,4);if((Ba|0)==1){break a}e=f}if(!(Ba|y[d|0]&4)){x[a>>2]=((e|0)<69?e+2e3|0:e>>>0<100?e+1900|0:e)-1900}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[Ca>>2]=x[Ca>>2]+20}function jn(a,b,c,d,e){var f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];c=x[e+8>>2];d=x[e+12>>2];e=x[e+16>>2]}a:{g=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}else{f=0}if(g|!f){f=kn(b,c,d,e,4);if((Ba|0)==1){break a}e=f}if(!(Ba|y[d|0]&4)){x[a>>2]=((e|0)<69?e+2e3|0:e>>>0<100?e+1900|0:e)-1900}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[Ca>>2]=x[Ca>>2]+20}function ds(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=E(0),g=0,h=E(0);if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];d=x[b+12>>2];f=B[b+16>>2];b=x[b+4>>2]}a:{g=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}else{e=0}if(g|!e){h=E(Ea[a|0](b,c,d));if((Ba|0)==1){break a}f=h}if(!Ba){return E(f)}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;B[e+16>>2]=f;x[Ca>>2]=x[Ca>>2]+20;return E(E(0))}function bs(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;var e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;b=x[Ca>>2];a=x[b>>2];c=x[b+8>>2];e=x[b+16>>2];l(0,x[b+12>>2]);l(1,e|0);d=+n();b=x[b+4>>2]}a:{f=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}else{e=0}if(f|!e){Ea[a|0](b,c,d);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;o(+d);a=j(1)|0;g=e,h=j(0)|0,x[g+12>>2]=h;x[e+16>>2]=a;x[Ca>>2]=x[Ca>>2]+20}function wb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=E(0),g=0,h=E(0),i=E(0);c=0;a=x[a+12>>2];if((a|0)<0){return E(E(0))}e=a+1|0;g=e&3;if(a>>>0>=3){e=e&-4;a=0;while(1){d=c|3;h=E(B[(d<<2)+b>>2]*E(d|0));d=c|2;i=E(B[(d<<2)+b>>2]*E(d|0));d=c|1;f=E(h+E(i+E(E(B[(d<<2)+b>>2]*E(d|0))+E(E(B[(c<<2)+b>>2]*E(c|0))+f))));c=c+4|0;a=a+4|0;if((e|0)!=(a|0)){continue}break}}if(g){a=0;while(1){f=E(E(B[(c<<2)+b>>2]*E(c|0))+f);c=c+1|0;a=a+1|0;if((g|0)!=(a|0)){continue}break}}return E(f)}function hs(a,b,c){a=a|0;b=b|0;c=+c;var d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;b=x[Ca>>2];a=x[b>>2];d=x[b+12>>2];l(0,x[b+8>>2]);l(1,d|0);c=+n();b=x[b+4>>2]}a:{e=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}else{d=0}if(e|!d){f=+Ea[a|0](b,c);if((Ba|0)==1){break a}c=f}if(!Ba){return+c}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;o(+c);a=j(1)|0;g=d,h=j(0)|0,x[g+8>>2]=h;x[d+12>>2]=a;x[Ca>>2]=x[Ca>>2]+16;return 0}function Nf(a,b,c){var d=0,e=0;d=(c|0)!=0;a:{b:{c:{if(!(a&3)|!c){break c}e=b&255;while(1){if((e|0)==y[a|0]){break b}c=c-1|0;d=(c|0)!=0;a=a+1|0;if(!(a&3)){break c}if(c){continue}break}}if(!d){break a}d=b&255;if(!((d|0)==y[a|0]|c>>>0<4)){d=D(d,16843009);while(1){e=d^x[a>>2];if((e^-1)&e-16843009&-2139062144){break b}a=a+4|0;c=c-4|0;if(c>>>0>3){continue}break}}if(!c){break a}}b=b&255;while(1){if((b|0)==y[a|0]){return a}a=a+1|0;c=c-1|0;if(c){continue}break}}return 0}function bd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=Ba;ad(a,b,x[a+48>>2],x[a+52>>2]);if((Ba|0)!=(d|0)){p()}b=0;d=x[a+8>>2];a:{if((d|0)<0){break a}g=x[a+68>>2];a=x[a+64>>2];if(d){j=d+1&-2;while(1){f=h<<3;e=b<<3;C[f+c>>3]=C[e+a>>3];C[(f|8)+c>>3]=C[e+g>>3];e=e|8;C[(f|16)+c>>3]=C[e+a>>3];C[(f|24)+c>>3]=C[e+g>>3];b=b+2|0;h=h+4|0;i=i+2|0;if((j|0)!=(i|0)){continue}break}}if(d&1){break a}d=h<<3;e=a;a=b<<3;C[d+c>>3]=C[e+a>>3];C[(d|8)+c>>3]=C[a+g>>3]}}function ws(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;b=x[Ca>>2];a=x[b>>2];e=x[b+8>>2];f=x[b+12>>2];g=x[b+16>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;h=x[x[Ca>>2]>>2]}if(!Ba){g=d;f=c}a:{if(!Ba|!h){c=Ea[a|0](b,f,g,e)|0;if((Ba|0)==1){break a}f=c}if(!Ba){return f|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[c+8>>2]=e;x[c+12>>2]=f;x[c+16>>2]=g;x[Ca>>2]=x[Ca>>2]+20;return 0}function vs(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-24;f=x[Ca>>2];a=x[f>>2];b=x[f+4>>2];c=x[f+8>>2];d=x[f+12>>2];e=x[f+16>>2];f=x[f+20>>2]}a:{h=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;g=x[x[Ca>>2]>>2]}else{g=0}if(h|!g){Ea[a|0](b,c,d,e,f);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;g=x[Ca>>2];x[g>>2]=a;x[g+4>>2]=b;x[g+8>>2]=c;x[g+12>>2]=d;x[g+16>>2]=e;x[g+20>>2]=f;x[Ca>>2]=x[Ca>>2]+24}function fs(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;b=x[Ca>>2];a=x[b>>2];c=x[b+12>>2];l(0,x[b+8>>2]);l(1,c|0);d=+n();b=x[b+4>>2]}a:{e=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}else{c=0}if(e|!c){f=+Ea[a|0](b);if((Ba|0)==1){break a}d=f}if(!Ba){return+d}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;o(+d);a=j(1)|0;g=c,h=j(0)|0,x[g+8>>2]=h;x[c+12>>2]=a;x[Ca>>2]=x[Ca>>2]+16;return 0}function os(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];c=x[e+8>>2];d=x[e+12>>2];e=x[e+16>>2]}a:{g=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}else{f=0}if(g|!f){f=Ea[a|0](b,c,d,e)|0;if((Ba|0)==1){break a}a=f}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[Ca>>2]=x[Ca>>2]+20;return 0}function Oi(a){a=a|0;var b=0,c=0,d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){b=x[8723];x[a>>2]=b;x[x[b-12>>2]+a>>2]=x[8726];b=a+4|0}a:{if(!Ba|!d){c=Li(b);if((Ba|0)==1){break a}b=c}b=Ba?b:a+56|0;if(!Ba|(d|0)==1){xj(b);e=1;if((Ba|0)==1){break a}}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function Ah(a){var b=0,c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];c=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}a:{if(Ba){b=c}else{c=x[a+12>>2];b=(c|0)==x[a+16>>2]}if(b|(Ba|0)==2){c=Ba?c:x[x[a>>2]+40>>2];if(!Ba|!d){b=Ea[c|0](a)|0;if((Ba|0)==1){break a}a=b}if(!Ba){return a}}if(!Ba){x[a+12>>2]=c+1;return jh(v[c|0])}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;b=x[Ca>>2];x[b>>2]=a;x[b+4>>2]=c;x[Ca>>2]=x[Ca>>2]+8;return 0}function hi(a){var b=0,c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];c=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}a:{if(Ba){b=c}else{c=x[a+12>>2];b=(c|0)==x[a+16>>2]}if(b|(Ba|0)==2){c=Ba?c:x[x[a>>2]+40>>2];if(!Ba|!d){b=Ea[c|0](a)|0;if((Ba|0)==1){break a}a=b}if(!Ba){return a}}if(!Ba){x[a+12>>2]=c+4;return x[c>>2]}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;b=x[Ca>>2];x[b>>2]=a;x[b+4>>2]=c;x[Ca>>2]=x[Ca>>2]+8;return 0}function dd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;f=Ba;ad(a,b,x[a+48>>2],x[a+52>>2]);if((Ba|0)!=(f|0)){p()}b=0;f=x[a+8>>2];a:{if((f|0)<0){break a}h=x[a+52>>2];a=x[a+48>>2];if(f){j=f+1&-2;while(1){e=b<<3;d=C[e+a>>3];g=d*d;d=C[e+h>>3];C[c+e>>3]=M(g+d*d);e=e|8;d=C[e+a>>3];g=d*d;d=C[e+h>>3];C[c+e>>3]=M(g+d*d);b=b+2|0;i=i+2|0;if((j|0)!=(i|0)){continue}break}}if(f&1){break a}e=a;a=b<<3;d=C[e+a>>3];g=d*d;d=C[a+h>>3];C[a+c>>3]=M(g+d*d)}}function Hg(a,b,c,d,e){var f=0,g=0,h=0;h=-1;g=d&2147483647;f=(g|0)==2147418112;a:{if(f&!c?a|b:f&(c|0)!=0|g>>>0>2147418112){break a}f=e&2147483647;if(((f|0)==2147418112&0|f>>>0>2147418112)&(f|0)!=2147418112){break a}if(!(a|c|(f|g|b))){return 0}f=d&e;if((f|0)>0){f=1}else{f=(f|0)>=0}if(f){if(((c|0)!=0|(d|0)!=(e|0))&(d|0)<(e|0)){break a}return(a|c|(d^e|b))!=0}if(!c&(d|0)==(e|0)?a|b:(c|0)!=0&(d|0)>=(e|0)|(d|0)>(e|0)){break a}h=(a|c|(d^e|b))!=0}return h}function to(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=Ba;f=ya-16|0;ya=f;d=ya-32|0;ya=d;Iq(d+24|0,a,b);if((Ba|0)!=(e|0)){p()}_i(d+16|0,x[d+24>>2],x[d+28>>2],c);if((Ba|0)!=(e|0)){p()}b=x[d+16>>2];g=ya-16|0;ya=g;x[g+12>>2]=a;a=g+12|0;h=Gq(a);if((Ba|0)!=(e|0)){p()}a=jo(a,b-h>>2);if((Ba|0)!=(e|0)){p()}ya=g+16|0;x[d+12>>2]=a;a=Wi(c,x[d+20>>2]);if((Ba|0)!=(e|0)){p()}x[d+8>>2]=a;Xi(f+8|0,d+12|0,d+8|0);if((Ba|0)!=(e|0)){p()}ya=d+32|0;ya=f+16|0;return x[f+12>>2]}function oo(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=Ba;f=ya-16|0;ya=f;d=ya-32|0;ya=d;Iq(d+24|0,a,b);if((Ba|0)!=(e|0)){p()}Ui(d+16|0,x[d+24>>2],x[d+28>>2],c);if((Ba|0)!=(e|0)){p()}b=x[d+16>>2];g=ya-16|0;ya=g;x[g+12>>2]=a;a=g+12|0;h=Gq(a);if((Ba|0)!=(e|0)){p()}a=Xn(a,b-h|0);if((Ba|0)!=(e|0)){p()}ya=g+16|0;x[d+12>>2]=a;a=Wi(c,x[d+20>>2]);if((Ba|0)!=(e|0)){p()}x[d+8>>2]=a;Xi(f+8|0,d+12|0,d+8|0);if((Ba|0)!=(e|0)){p()}ya=d+32|0;ya=f+16|0;return x[f+12>>2]}function Wd(a){a=a|0;var b=0,c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}a:{b:{if(!Ba){a=x[a+8>>2];if(!a){break b}b=x[a+4>>2];x[a+4>>2]=b-1;if(b){break b}b=x[x[a>>2]+8>>2]}if(!Ba|!c){Ea[b|0](a);if((Ba|0)==1){break a}}if(!Ba|(c|0)==1){cr(a);d=1;if((Ba|0)==1){break a}}}return}x[x[Ca>>2]>>2]=d;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8}function dr(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}b=Ba?b:a>>>0<=1?1:a;a:{b:{while(1){if(!Ba){a=yg(b);if(a){break b}a=x[13650]}if((Ba|0)==2|a){if(!Ba|!c){Ea[a|0]();if((Ba|0)==1){break a}}if(!Ba){continue}}break}if(!Ba){ba();p()}}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function xl(a,b,c,d){var e=0,f=0,g=0,h=0;g=Ba;f=ya-16|0;ya=f;a:{b:{if((a|0)!=(b|0)){h=x[12163];x[12163]=0;e=f+12|0;Ol();if((Ba|0)!=(g|0)){p()}a=$q(a,e,d);e=Da;if((Ba|0)!=(g|0)){p()}d=a;a=e;e=x[12163];c:{if(e){if(x[f+12>>2]!=(b|0)){break c}if((e|0)==68){break b}break a}x[12163]=h;if(x[f+12>>2]==(b|0)){break a}}}x[c>>2]=4;d=0;a=0;break a}x[c>>2]=4;if(!!d&(a|0)>=0|(a|0)>0){d=-1;a=2147483647;break a}d=0;a=-2147483648}ya=f+16|0;Da=a;return d}function vg(a,b){a:{if(a){if(b>>>0<=127){break a}b:{if(!x[x[12204]>>2]){if((b&-128)==57216){break a}break b}if(b>>>0<=2047){v[a+1|0]=b&63|128;v[a|0]=b>>>6|192;return 2}if(!((b&-8192)!=57344&b>>>0>=55296)){v[a+2|0]=b&63|128;v[a|0]=b>>>12|224;v[a+1|0]=b>>>6&63|128;return 3}if(b-65536>>>0<=1048575){v[a+3|0]=b&63|128;v[a|0]=b>>>18|240;v[a+2|0]=b>>>6&63|128;v[a+1|0]=b>>>12&63|128;return 4}}x[12163]=25;a=-1}else{a=1}return a}v[a|0]=b;return 1}function zh(a){var b=0,c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];c=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}a:{if(Ba){b=c}else{c=x[a+12>>2];b=(c|0)==x[a+16>>2]}if(b|(Ba|0)==2){c=Ba?c:x[x[a>>2]+36>>2];if(!Ba|!d){b=Ea[c|0](a)|0;if((Ba|0)==1){break a}a=b}if(!Ba){return a}}if(!Ba){return jh(v[c|0])}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;b=x[Ca>>2];x[b>>2]=a;x[b+4>>2]=c;x[Ca>>2]=x[Ca>>2]+8;return 0}function gi(a){var b=0,c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];c=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}a:{if(Ba){b=c}else{c=x[a+12>>2];b=(c|0)==x[a+16>>2]}if(b|(Ba|0)==2){c=Ba?c:x[x[a>>2]+36>>2];if(!Ba|!d){b=Ea[c|0](a)|0;if((Ba|0)==1){break a}a=b}if(!Ba){return a}}if(!Ba){return x[c>>2]}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;b=x[Ca>>2];x[b>>2]=a;x[b+4>>2]=c;x[Ca>>2]=x[Ca>>2]+8;return 0}function ks(a,b,c){a=a|0;b=b|0;c=+c;var d=0,e=0,f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;b=x[Ca>>2];a=x[b>>2];d=x[b+12>>2];l(0,x[b+8>>2]);l(1,d|0);c=+n();b=x[b+4>>2]}a:{e=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}else{d=0}if(e|!d){Ea[a|0](b,c);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;o(+c);a=j(1)|0;f=d,g=j(0)|0,x[f+8>>2]=g;x[d+12>>2]=a;x[Ca>>2]=x[Ca>>2]+16}function wp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;g=Ba;while(1){a:{if((c|0)==(d|0)|e>>>0<=i>>>0){break a}h=1;f=ya-16|0;ya=f;x[f+12>>2]=x[a+8>>2];l=Rl(f+8|0,f+12|0);if((Ba|0)!=(g|0)){p()}j=Ej(0,c,d-c|0,b?b:52540);if((Ba|0)!=(g|0)){p()}Sl(l);if((Ba|0)!=(g|0)){p()}ya=f+16|0;b:{switch(j+2|0){default:h=j;break;case 0:case 1:break a;case 2:break b}}i=i+1|0;k=h+k|0;c=c+h|0;continue}break}return k|0}function Sg(a,b,c,d){var e=0,f=0;f=Ba;e=ya-32|0;ya=e;x[e+20>>2]=b;x[e+24>>2]=a;x[e+16>>2]=c;x[e+12>>2]=d;Ng(a,b,c);if((Ba|0)!=(f|0)){p()}c=Jg(d,c);if((Ba|0)!=(f|0)){p()}a:{if(!c){break a}Kg(e+16|0,e+12|0);if((Ba|0)!=(f|0)){p()}b=Jg(x[e+16>>2],b);if((Ba|0)!=(f|0)){p()}if(!b){break a}Kg(e+20|0,e+16|0);if((Ba|0)!=(f|0)){p()}a=Jg(x[e+20>>2],a);if((Ba|0)!=(f|0)){p()}if(!a){break a}Kg(e+24|0,e+20|0);if((Ba|0)!=(f|0)){p()}}ya=e+32|0}function yk(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=0,m=0;i=Hs(b,c,h,i);h=Da;e=Hs(d,e,f,g);i=e+i|0;d=Da+h|0;h=e>>>0>i>>>0?d+1|0:d;j=g;e=0;k=c;d=0;c=Hs(g,e,c,d);g=c+i|0;i=Da+h|0;l=g;c=c>>>0>g>>>0?i+1|0:i;g=Hs(f,0,b,0);h=Da;i=0;d=Hs(f,i,k,d);h=h+d|0;f=Da+i|0;f=d>>>0>h>>>0?f+1|0:f;i=f+l|0;d=c;f=f>>>0>i>>>0?d+1|0:d;b=Hs(b,m,j,e)+h|0;e=Da;e=b>>>0>>0?e+1|0:e;h=e+i|0;i=f;x[a+8>>2]=h;x[a+12>>2]=e>>>0>h>>>0?i+1|0:i;x[a>>2]=g;x[a+4>>2]=b}function zb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;c=0;a=x[a+12>>2];if((a|0)<0){return 0}e=a+1|0;g=e&3;if(a>>>0>=3){e=e&-4;a=0;while(1){d=c|3;h=C[(d<<3)+b>>3]*+(d|0);d=c|2;i=C[(d<<3)+b>>3]*+(d|0);d=c|1;f=h+(i+(C[(d<<3)+b>>3]*+(d|0)+(C[(c<<3)+b>>3]*+(c|0)+f)));c=c+4|0;a=a+4|0;if((e|0)!=(a|0)){continue}break}}if(g){a=0;while(1){f=C[(c<<3)+b>>3]*+(c|0)+f;c=c+1|0;a=a+1|0;if((g|0)!=(a|0)){continue}break}}return+f}function is(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];c=x[e+8>>2];d=x[e+12>>2];e=x[e+16>>2]}a:{g=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}else{f=0}if(g|!f){Ea[a|0](b,c,d,e);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[Ca>>2]=x[Ca>>2]+20}function ie(a){a=a|0;var b=0,c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];c=x[b+4>>2]}a:{b=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}else{d=0}if(b|!d){b=dr(12);if((Ba|0)==1){break a}c=b}if(!Ba){x[c>>2]=14492;x[c+4>>2]=x[a+4>>2];a=x[a+8>>2];x[c+8>>2]=a;if(a){x[a+4>>2]=x[a+4>>2]+1}return c|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;b=x[Ca>>2];x[b>>2]=a;x[b+4>>2]=c;x[Ca>>2]=x[Ca>>2]+8;return 0}function be(a){a=a|0;var b=0,c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];c=x[b+4>>2]}a:{b=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}else{d=0}if(b|!d){b=dr(12);if((Ba|0)==1){break a}c=b}if(!Ba){x[c>>2]=14140;x[c+4>>2]=x[a+4>>2];a=x[a+8>>2];x[c+8>>2]=a;if(a){x[a+4>>2]=x[a+4>>2]+1}return c|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;b=x[Ca>>2];x[b>>2]=a;x[b+4>>2]=c;x[Ca>>2]=x[Ca>>2]+8;return 0}function Ud(a){a=a|0;var b=0,c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];c=x[b+4>>2]}a:{b=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}else{d=0}if(b|!d){b=dr(12);if((Ba|0)==1){break a}c=b}if(!Ba){x[c>>2]=13792;x[c+4>>2]=x[a+4>>2];a=x[a+8>>2];x[c+8>>2]=a;if(a){x[a+4>>2]=x[a+4>>2]+1}return c|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;b=x[Ca>>2];x[b>>2]=a;x[b+4>>2]=c;x[Ca>>2]=x[Ca>>2]+8;return 0}function ms(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;d=x[Ca>>2];a=x[d>>2];b=x[d+4>>2];c=x[d+8>>2];d=x[d+12>>2]}a:{f=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}else{e=0}if(f|!e){e=Ea[a|0](b,c,d)|0;if((Ba|0)==1){break a}a=e}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[Ca>>2]=x[Ca>>2]+16;return 0}function ih(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}b=Ba?b:x[x[a>>2]+36>>2];a:{if(!Ba|!c){c=Ea[b|0](a)|0;if((Ba|0)==1){break a}b=c}if(!Ba){if((b|0)==-1){return-1}c=a;a=x[a+12>>2];x[c+12>>2]=a+1;return jh(v[a|0])|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function Xh(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=34004;b=a+4|0}a:{if(!Ba|!c){No(b);if((Ba|0)==1){break a}}if(!Ba){x[a+24>>2]=0;x[a+28>>2]=0;x[a+16>>2]=0;x[a+20>>2]=0;x[a+8>>2]=0;x[a+12>>2]=0;return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function Od(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;d=x[Ca>>2];a=x[d>>2];b=x[d+4>>2];c=x[d+8>>2];d=x[d+12>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}d=Ba?d:x[x[a>>2]+16>>2];a:{if(!Ba|!e){Ea[d|0](a);if((Ba|0)==1){break a}}if(!Ba){Pd(x[a+12>>2],b,c)}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[Ca>>2]=x[Ca>>2]+16}function $g(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=33844;b=a+4|0}a:{if(!Ba|!c){No(b);if((Ba|0)==1){break a}}if(!Ba){x[a+24>>2]=0;x[a+28>>2]=0;x[a+16>>2]=0;x[a+20>>2]=0;x[a+8>>2]=0;x[a+12>>2]=0;return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function il(a,b){var c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}a=Ba?a:x[a>>2];a:{if(!Ba|!c){c=Fo(b);if((Ba|0)==1){break a}b=c}if(!Ba){c=a+8|0;if(Co(c)>>>0>b>>>0){c=x[Ho(c,b)>>2]!=0}else{c=0}if(!c){Ji();p()}return x[Ho(a+8|0,b)>>2]}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function Jd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;d=x[Ca>>2];a=x[d>>2];b=x[d+4>>2];c=x[d+8>>2];d=x[d+12>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}d=Ba?d:x[x[a>>2]+20>>2];a:{if(!Ba|!e){Ea[d|0](a);if((Ba|0)==1){break a}}if(!Ba){Kd(x[a+8>>2],b,c)}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[Ca>>2]=x[Ca>>2]+16}function vl(a,b,c,d){var e=0,f=0;e=Ba;f=ui(a);if((Ba|0)!=(e|0)){p()}a:{if(!f|(c-b|0)<5){break a}_m(b,c);if((Ba|0)!=(e|0)){p()}f=c-4|0;c=ri(a);if((Ba|0)!=(e|0)){p()}a=ui(a);if((Ba|0)!=(e|0)){p()}e=a+c|0;b:{while(1){c:{a=v[c|0];if(b>>>0>=f>>>0){break c}if(!((a|0)<=0|(a|0)>=127)&x[b>>2]!=v[c|0]){break b}b=b+4|0;c=((e-c|0)>1)+c|0;continue}break}if((a|0)<=0|(a|0)>=127|v[c|0]>>>0>x[f>>2]-1>>>0){break a}}x[d>>2]=4}}function _h(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}b=Ba?b:x[x[a>>2]+36>>2];a:{if(!Ba|!c){c=Ea[b|0](a)|0;if((Ba|0)==1){break a}b=c}if(!Ba){if((b|0)==-1){return-1}c=a;a=x[a+12>>2];x[c+12>>2]=a+4;return x[a>>2]}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function Hr(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;f=Ba;g=qr(a,x[b+8>>2],e);if((Ba|0)!=(f|0)){p()}if(g){Cr(b,c,d);if((Ba|0)!=(f|0)){p()}return}a=qr(a,x[b>>2],e);if((Ba|0)!=(f|0)){p()}a:{if(!a){break a}if(!(x[b+16>>2]!=(c|0)&x[b+20>>2]!=(c|0))){if((d|0)!=1){break a}x[b+32>>2]=1;return}x[b+20>>2]=c;x[b+32>>2]=d;x[b+40>>2]=x[b+40>>2]+1;if(!(x[b+36>>2]!=1|x[b+24>>2]!=2)){v[b+54|0]=1}x[b+44>>2]=4}}function al(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;d=x[Ca>>2];a=x[d>>2];b=x[d+4>>2];c=x[d+8>>2];d=x[d+12>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}if(!Ba){b=ya-16|0;ya=b}a:{if(!Ba|!e){bl(a,c,d);if((Ba|0)==1){break a}}if(!Ba){ya=b+16|0}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[Ca>>2]=x[Ca>>2]+16}function Zk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;d=x[Ca>>2];a=x[d>>2];b=x[d+4>>2];c=x[d+8>>2];d=x[d+12>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}if(!Ba){b=ya-16|0;ya=b}a:{if(!Ba|!e){si(a,c,d);if((Ba|0)==1){break a}}if(!Ba){ya=b+16|0}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[Ca>>2]=x[Ca>>2]+16}function jm(a,b,c,d){var e=0,f=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];c=x[e+8>>2];d=x[e+12>>2];e=x[e+16>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}e=Ba?e:x[x[a>>2]+48>>2];a:{if(!Ba|!f){Ea[e|0](a,b,c,d)|0;if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[Ca>>2]=x[Ca>>2]+20}function Nl(a,b,c,d){var e=0,f=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-20;e=x[Ca>>2];a=x[e>>2];b=x[e+4>>2];c=x[e+8>>2];d=x[e+12>>2];e=x[e+16>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;f=x[x[Ca>>2]>>2]}e=Ba?e:x[x[a>>2]+32>>2];a:{if(!Ba|!f){Ea[e|0](a,b,c,d)|0;if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;f=x[Ca>>2];x[f>>2]=a;x[f+4>>2]=b;x[f+8>>2]=c;x[f+12>>2]=d;x[f+16>>2]=e;x[Ca>>2]=x[Ca>>2]+20}function ei(a,b,c){var d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;d=x[Ca>>2];a=x[d>>2];b=x[d+4>>2];c=x[d+8>>2];d=x[d+12>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}d=Ba?d:x[x[a>>2]+12>>2];a:{if(!Ba|!e){e=Ea[d|0](a,b,c)|0;if((Ba|0)==1){break a}a=e}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[Ca>>2]=x[Ca>>2]+16;return 0}function Uh(a,b,c){var d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;d=x[Ca>>2];a=x[d>>2];b=x[d+4>>2];c=x[d+8>>2];d=x[d+12>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}d=Ba?d:x[x[a>>2]+48>>2];a:{if(!Ba|!e){e=Ea[d|0](a,b,c)|0;if((Ba|0)==1){break a}a=e}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[Ca>>2]=x[Ca>>2]+16;return 0}function Pk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;h=Ba;e=x[a+84>>2];f=x[e>>2];d=x[e+4>>2];i=x[a+28>>2];g=x[a+20>>2]-i|0;g=d>>>0>>0?d:g;if(g){lf(f,i,g);if((Ba|0)!=(h|0)){p()}f=g+x[e>>2]|0;x[e>>2]=f;d=x[e+4>>2]-g|0;x[e+4>>2]=d}d=c>>>0>d>>>0?d:c;if(d){lf(f,b,d);if((Ba|0)!=(h|0)){p()}f=d+x[e>>2]|0;x[e>>2]=f;x[e+4>>2]=x[e+4>>2]-d}v[f|0]=0;b=x[a+44>>2];x[a+28>>2]=b;x[a+20>>2]=b;return c|0}function pf(a){var b=0,c=0,d=0,e=0;c=Ba;d=+ma();if((Ba|0)!=(c|0)){p()}b=d/1e3;a:{if(F(b)<0x8000000000000000){e=~~b>>>0;if(F(b)>=1){c=~~(b>0?H(J(b*2.3283064365386963e-10),4294967295):K((b-+(~~b>>>0>>>0))*2.3283064365386963e-10))>>>0}else{c=0}break a}c=-2147483648}x[a>>2]=e;x[a+4>>2]=c;b=(d-(+(Hs(e,c,1e3,0)>>>0)+ +(Da|0)*4294967296))*1e3;b:{if(F(b)<2147483648){c=~~b;break b}c=-2147483648}x[a+8>>2]=c}function Sk(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){c=ya-16|0;ya=c;x[c+12>>2]=b}a:{if(!Ba|!d){d=Ok(a,100,6714,b);if((Ba|0)==1){break a}b=d}if(!Ba){ya=c+16|0;return b}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12;return 0}function Sh(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}a:{b:{if(!Ba){c=x[a>>2];if(!c){break b}}if(!Ba|!d){d=Ch(c,b);if((Ba|0)==1){break a}b=d}if(!Ba){if(!Bh(b,-1)){break b}x[a>>2]=0}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12}function So(a){a=a|0;var b=0,c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){a=x[x[a>>2]>>2];c=x[a+8>>2];b=x[a>>2]+(c>>1)|0;a=x[a+4>>2];if(c&1){a=x[a+x[b>>2]>>2]}}a:{if(!Ba|!d){Ea[a|0](b);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8}function Rk(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){c=ya-16|0;ya=c;x[c+12>>2]=b}a:{if(!Ba|!d){d=Fk(a,6720,b);if((Ba|0)==1){break a}b=d}if(!Ba){ya=c+16|0;return b}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12;return 0}function sj(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}a:{b=Ba?b:x[a>>2];if(b|(Ba|0)==2){if(!Ba|!c){c=gi(b);if((Ba|0)==1){break a}b=c}if(!Ba){if(!Bh(b,-1)){return!x[a>>2]}x[a>>2]=0}}if(!Ba){return 1}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function qj(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}a:{b=Ba?b:x[a>>2];if(b|(Ba|0)==2){if(!Ba|!c){c=zh(b);if((Ba|0)==1){break a}b=c}if(!Ba){if(!Bh(b,-1)){return!x[a>>2]}x[a>>2]=0}}if(!Ba){return 1}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function rc(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=15520;c=!y[a+20|0]}a:{b:{if(!Ba){if(c){break b}if(!hg(Pf())){break b}}if(!Ba|!b){Yf();if((Ba|0)==1){break a}}}if(!Ba){b=x[a+4>>2];if(b){zg(b)}return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function qc(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=15464;c=!y[a+20|0]}a:{b:{if(!Ba){if(c){break b}if(!hg(Pf())){break b}}if(!Ba|!b){Yf();if((Ba|0)==1){break a}}}if(!Ba){b=x[a+4>>2];if(b){zg(b)}return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function Le(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=15816;c=!y[a+20|0]}a:{b:{if(!Ba){if(c){break b}if(!hg(Pf())){break b}}if(!Ba|!b){Yf();if((Ba|0)==1){break a}}}if(!Ba){b=x[a+4>>2];if(b){zg(b)}return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function js(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-16;d=x[Ca>>2];a=x[d>>2];b=x[d+4>>2];c=x[d+8>>2];d=x[d+12>>2]}a:{f=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;e=x[x[Ca>>2]>>2]}else{e=0}if(f|!e){Ea[a|0](b,c,d);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;e=x[Ca>>2];x[e>>2]=a;x[e+4>>2]=b;x[e+8>>2]=c;x[e+12>>2]=d;x[Ca>>2]=x[Ca>>2]+16}function $r(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}a:{e=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}else{d=0}if(e|!d){d=Ea[a|0](b,c)|0;if((Ba|0)==1){break a}a=d}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12;return 0}function xd(a){a=a|0;var b=0,c=0,d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}a:{b=Ba?b:!x[a+12>>2];if(b|(Ba|0)==2){if(!Ba|!c){c=dr(20);if((Ba|0)==1){break a}b=c}if(!Ba){d=a,e=yd(b,x[a+4>>2]),x[d+12>>2]=e}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8}function Yn(a,b){var c=0,d=0,e=0,f=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){c=Xf(b)}a:{if(!Ba|!d){ll(a,c);if((Ba|0)==1){break a}}if(!Ba){b=x[On(b)>>2];e=On(a),f=b,x[e>>2]=f}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12}function zd(a){a=a|0;var b=0,c=0,d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}a:{b=Ba?b:!x[a+8>>2];if(b|(Ba|0)==2){if(!Ba|!c){c=dr(20);if((Ba|0)==1){break a}b=c}if(!Ba){d=a,e=yd(b,x[a+4>>2]),x[d+8>>2]=e}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8}function Me(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=15816;c=!y[a+20|0]}a:{b:{if(!Ba){if(c){break b}if(!hg(Pf())){break b}}if(!Ba|!b){Yf();if((Ba|0)==1){break a}}}if(!Ba){b=x[a+4>>2];if(b){zg(b)}zg(a)}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function De(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=15520;c=!y[a+20|0]}a:{b:{if(!Ba){if(c){break b}if(!hg(Pf())){break b}}if(!Ba|!b){Yf();if((Ba|0)==1){break a}}}if(!Ba){b=x[a+4>>2];if(b){zg(b)}zg(a)}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function Ce(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=15464;c=!y[a+20|0]}a:{b:{if(!Ba){if(c){break b}if(!hg(Pf())){break b}}if(!Ba|!b){Yf();if((Ba|0)==1){break a}}}if(!Ba){b=x[a+4>>2];if(b){zg(b)}zg(a)}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function th(a,b){var c=0,d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}a:{if(!Ba|!d){c=qj(a);if((Ba|0)==1){break a}a=c}if(!Ba|(d|0)==1){c=qj(b);e=1;if((Ba|0)==1){break a}b=c}if(!Ba){return a^b^1}p()}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function ci(a,b){var c=0,d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}a:{if(!Ba|!d){c=sj(a);if((Ba|0)==1){break a}a=c}if(!Ba|(d|0)==1){c=sj(b);e=1;if((Ba|0)==1){break a}b=c}if(!Ba){return a^b^1}p()}x[x[Ca>>2]>>2]=e;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function Yd(a,b){a=a|0;b=b|0;var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){a=x[a+4>>2];c=x[x[a>>2]>>2];b=x[b>>2]}a:{if(!Ba|!d){Ea[c|0](a,b);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12}function nn(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}c=Ba?c:x[x[a>>2]+52>>2];a:{if(!Ba|!d){d=Ea[c|0](a,b,0)|0;if((Ba|0)==1){break a}a=d}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12;return 0}function an(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}c=Ba?c:x[x[a>>2]+36>>2];a:{if(!Ba|!d){d=Ea[c|0](a,b,0)|0;if((Ba|0)==1){break a}a=d}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12;return 0}function Ln(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}c=Ba?c:x[b>>2];a:{if(!Ba|!d){d=Ah(c);if((Ba|0)==1){break a}c=d}if(!Ba){x[a+4>>2]=x[b>>2];v[a|0]=c<<24>>24}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12}function tj(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}c=Ba?c:x[x[a>>2]+44>>2];a:{if(!Ba|!d){d=Ea[c|0](a,b)|0;if((Ba|0)==1){break a}a=d}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12;return 0}function rj(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}c=Ba?c:x[x[a>>2]+28>>2];a:{if(!Ba|!d){d=Ea[c|0](a,b)|0;if((Ba|0)==1){break a}a=d}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12;return 0}function ml(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}c=Ba?c:x[x[a>>2]+12>>2];a:{if(!Ba|!d){d=Ea[c|0](a,b)|0;if((Ba|0)==1){break a}a=d}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12;return 0}function hd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=E(0),g=E(0),h=0,i=0,j=0,k=0;h=Ba;fd(a,b,x[a+48>>2],x[a+52>>2]);if((Ba|0)!=(h|0)){p()}b=0;i=x[a+8>>2];if((i|0)>=0){k=x[a+52>>2];a=x[a+48>>2];while(1){e=b<<2;j=b<<3;f=E(C[j+a>>3]);g=E(C[k+j>>3]);B[e+c>>2]=M(E(E(f*f)+E(g*g)));e=d+e|0;f=af(g,f);if((Ba|0)!=(h|0)){p()}B[e>>2]=f;e=(b|0)!=(i|0);b=b+1|0;if(e){continue}break}}}function sb(a){var b=0,c=0;b=Ba;c=ya-16|0;ya=c;x[c+12>>2]=0;a=Bg(c+12|0,64,a<<3);if((Ba|0)!=(b|0)){p()}a:{b:{c:{d:{if(a){if((a|0)==28){break d}break b}a=x[c+12>>2];if(a){break c}break b}a=nr(4);if((Ba|0)!=(b|0)){p()}x[a>>2]=1822;$(a|0,46564,0);break a}ya=c+16|0;return a}a=nr(4);if((Ba|0)!=(b|0)){p()}a=Nr(a);if((Ba|0)!=(b|0)){p()}$(a|0,47152,1)}if((Ba|0)!=(b|0)){p()}p()}function Mb(a){var b=0,c=0;b=Ba;c=ya-16|0;ya=c;x[c+12>>2]=0;a=Bg(c+12|0,64,a<<2);if((Ba|0)!=(b|0)){p()}a:{b:{c:{d:{if(a){if((a|0)==28){break d}break b}a=x[c+12>>2];if(a){break c}break b}a=nr(4);if((Ba|0)!=(b|0)){p()}x[a>>2]=1822;$(a|0,46564,0);break a}ya=c+16|0;return a}a=nr(4);if((Ba|0)!=(b|0)){p()}a=Nr(a);if((Ba|0)!=(b|0)){p()}$(a|0,47152,1)}if((Ba|0)!=(b|0)){p()}p()}function $n(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}c=Ba?c:x[b>>2];a:{if(!Ba|!d){d=hi(c);if((Ba|0)==1){break a}c=d}if(!Ba){x[a+4>>2]=x[b>>2];x[a>>2]=c}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12}function rg(a,b,c){var d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}a:{e=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}else{d=0}if(e|!d){d=kg(a,b,c,177,178);if((Ba|0)==1){break a}a=d}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12;return 0}function cr(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}a:{b:{if(!Ba){b=a+8|0;if(x[b>>2]){if((Lo(b)|0)!=-1){break b}}b=x[x[a>>2]+16>>2]}if(!Ba|!c){Ea[b|0](a);if((Ba|0)==1){break a}}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8}function Em(a,b,c){var d=0,e=0;if(c&2048){v[a|0]=43;a=a+1|0}if(c&1024){v[a|0]=35;a=a+1|0}d=c&260;if((d|0)!=260){v[a|0]=46;v[a+1|0]=42;a=a+2|0}c=c&16384;while(1){e=y[b|0];if(e){v[a|0]=e;a=a+1|0;b=b+1|0;continue}break}a:{b:{if((d|0)!=256){if((d|0)!=4){break b}b=c?70:102;break a}b=c?69:101;break a}b=c?65:97;if((d|0)==260){break a}b=c?71:103}v[a|0]=b;return(d|0)!=260}function yq(a,b,c){var d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}a:{e=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}else{d=0}if(e|!d){d=zq(b,c);if((Ba|0)==1){break a}b=d}if(!Ba){x[a+4>>2]=c;x[a>>2]=b}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12}function jj(a,b,c){var d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}a:{e=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}else{d=0}if(e|!d){d=oj(c,1);if((Ba|0)==1){break a}b=d}if(!Ba){x[a+4>>2]=c;x[a>>2]=b}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12}function yj(a,b){var c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}if(!Ba){x[a+20>>2]=0;x[a+24>>2]=b;x[a+12>>2]=0;x[a+4>>2]=4098;x[a+8>>2]=6;x[a+16>>2]=!b;nf(a+32|0,0,40);a=a+28|0}a:{if(!Ba|!c){No(a);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function Jb(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){c=gg(b)}a:{if(!Ba|!d){d=Ib(a,b,c);if((Ba|0)==1){break a}a=d}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12;return 0}function ll(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;c=x[Ca>>2];a=x[c>>2];c=x[c+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){c=x[a>>2];x[a>>2]=b}a:{if((Ba|0)==2|c){if(!Ba){a=x[On(a)>>2]}if(!Ba|!d){Ea[a|0](c);if((Ba|0)==1){break a}}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;b=x[Ca>>2];x[b>>2]=a;x[b+4>>2]=c;x[Ca>>2]=x[Ca>>2]+8}function Jo(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}if(!Ba){b=(Lo(a+4|0)|0)==-1}a:{if((Ba|0)==2|b){b=Ba?b:x[x[a>>2]+8>>2];if(!Ba|!c){Ea[b|0](a);if((Ba|0)==1){break a}}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8}function qe(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}a:{a=Ba?a:x[a+12>>2];if(a|(Ba|0)==2){b=Ba?b:x[x[a>>2]+16>>2];if(!Ba|!c){Ea[b|0](a);if((Ba|0)==1){break a}}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8}function mh(a){a=a|0;var b=0,c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}else{b=0}b=Ba?b:a+8|0;a:{d=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}else{c=0}if(d|!c){xj(b);if((Ba|0)==1){break a}}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function aq(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){if(y[52856]){return x[13213]}if(!y[53992]){v[53992]=1}}a:{if(!Ba|!b){Sp(53968,9724);a=0;if((Ba|0)==1){break a}}if(!Ba|(b|0)==1){Sp(53980,9721);a=1;if((Ba|0)==1){break a}}if(!Ba){v[52856]=1;x[13213]=53968;return 53968}p()}x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function Dh(a){a=a|0;var b=0,c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}else{b=0}b=Ba?b:a+4|0;a:{d=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}else{c=0}if(d|!c){xj(b);if((Ba|0)==1){break a}}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function cq(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){if(y[52864]){return x[13215]}if(!y[54024]){v[54024]=1}}a:{if(!Ba|!b){Xp(54e3,45920);a=0;if((Ba|0)==1){break a}}if(!Ba|(b|0)==1){Xp(54012,45932);a=1;if((Ba|0)==1){break a}}if(!Ba){v[52864]=1;x[13215]=54e3;return 54e3}p()}x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function as(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}a:{e=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}else{d=0}if(e|!d){Ea[a|0](b,c);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12}function Zr(a,b){a=a|0;b=b|0;var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}a:{d=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}else{c=0}if(d|!c){c=Ea[a|0](b)|0;if((Ba|0)==1){break a}a=c}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function Fc(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}if(!Ba){b=nr(8)}a:{if(!Ba|!c){c=fr(b,a);if((Ba|0)==1){break a}a=c}if(!Ba){x[a>>2]=47312;$(a|0,47344,2);p()}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8}function mg(a,b,c){var d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}a:{if((!(Ba?1:y[a|0]&32)|(Ba|0)==2)&(!Ba|!d)){Sf(b,c,a);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12}function Zg(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=33844;b=a+4|0}a:{if(!Ba|!c){Po(b);if((Ba|0)==1){break a}}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function Vh(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=34004;b=a+4|0}a:{if(!Ba|!c){Po(b);if((Ba|0)==1){break a}}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function Br(a,b,c,d){v[a+53|0]=1;a:{if(x[a+4>>2]!=(c|0)){break a}v[a+52|0]=1;c=x[a+16>>2];b:{if(!c){x[a+36>>2]=1;x[a+24>>2]=d;x[a+16>>2]=b;if((d|0)!=1){break a}if(x[a+48>>2]==1){break b}break a}if((b|0)==(c|0)){c=x[a+24>>2];if((c|0)==2){x[a+24>>2]=d;c=d}if(x[a+48>>2]!=1){break a}if((c|0)==1){break b}break a}x[a+36>>2]=x[a+36>>2]+1}v[a+54|0]=1}}function Zh(a,b,c){var d=0,e=0,f=0;e=Ba;f=ya-16|0;ya=f;d=ya-32|0;ya=d;Ti(d+24|0,b,(c<<2)+b|0);if((Ba|0)!=(e|0)){p()}_i(d+16|0,x[d+24>>2],x[d+28>>2],a);if((Ba|0)!=(e|0)){p()}b=Vi(b,x[d+16>>2]);if((Ba|0)!=(e|0)){p()}x[d+12>>2]=b;a=Wi(a,x[d+20>>2]);if((Ba|0)!=(e|0)){p()}x[d+8>>2]=a;Xi(f+8|0,d+12|0,d+8|0);if((Ba|0)!=(e|0)){p()}ya=d+32|0;ya=f+16|0}function Nb(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}a:{a=Ba?a:x[a>>2];if(a|(Ba|0)==2){b=Ba?b:x[x[a>>2]+4>>2];if(!Ba|!c){Ea[b|0](a);if((Ba|0)==1){break a}}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8}function yh(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}b=Ba?b:x[x[a>>2]+24>>2];a:{if(!Ba|!c){c=Ea[b|0](a)|0;if((Ba|0)==1){break a}a=c}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function no(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}c=Ba?c:x[x[b>>2]+40>>2];a:{if(!Ba|!d){Ea[c|0](a,b);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12}function nm(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}c=Ba?c:x[x[b>>2]+20>>2];a:{if(!Ba|!d){Ea[c|0](a,b);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12}function mm(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}b=Ba?b:x[x[a>>2]+16>>2];a:{if(!Ba|!c){c=Ea[b|0](a)|0;if((Ba|0)==1){break a}a=c}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function lm(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}b=Ba?b:x[x[a>>2]+12>>2];a:{if(!Ba|!c){c=Ea[b|0](a)|0;if((Ba|0)==1){break a}a=c}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function gl(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}c=Ba?c:x[x[b>>2]+28>>2];a:{if(!Ba|!d){Ea[c|0](a,b);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12}function fl(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}c=Ba?c:x[x[b>>2]+24>>2];a:{if(!Ba|!d){Ea[c|0](a,b);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12}function _a(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}a:{d=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}else{c=0}if(d|!c){c=fr(a,b);if((Ba|0)==1){break a}b=c}if(!Ba){x[b>>2]=47260;return b}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function Vn(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}b=Ba?b:x[x[a>>2]+36>>2];a:{if(!Ba|!c){c=Ea[b|0](a)|0;if((Ba|0)==1){break a}a=c}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function Un(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}c=Ba?c:x[x[b>>2]+32>>2];a:{if(!Ba|!d){Ea[c|0](a,b);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12}function Tn(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-12;c=x[Ca>>2];a=x[c>>2];b=x[c+4>>2];c=x[c+8>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}c=Ba?c:x[x[b>>2]+44>>2];a:{if(!Ba|!d){Ea[c|0](a,b);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;d=x[Ca>>2];x[d>>2]=a;x[d+4>>2]=b;x[d+8>>2]=c;x[Ca>>2]=x[Ca>>2]+12}function Gi(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}b=Ba?b:x[x[a>>2]+28>>2];a:{if(!Ba|!c){c=Ea[b|0](a)|0;if((Ba|0)==1){break a}a=c}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function cd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;g=Ba;ad(a,b,x[a+48>>2],x[a+52>>2]);if((Ba|0)!=(g|0)){p()}b=0;h=x[a+8>>2];if((h|0)>=0){i=x[a+52>>2];j=x[a+48>>2];while(1){a=b<<3;e=C[a+j>>3];f=C[a+i>>3];C[a+c>>3]=M(e*e+f*f);a=a+d|0;e=$e(f,e);if((Ba|0)!=(g|0)){p()}C[a>>3]=e;a=(b|0)!=(h|0);b=b+1|0;if(a){continue}break}}}function gh(a,b,c){var d=0,e=0,f=0;e=Ba;f=ya-16|0;ya=f;d=ya-32|0;ya=d;Ti(d+24|0,b,b+c|0);if((Ba|0)!=(e|0)){p()}Ui(d+16|0,x[d+24>>2],x[d+28>>2],a);if((Ba|0)!=(e|0)){p()}b=Vi(b,x[d+16>>2]);if((Ba|0)!=(e|0)){p()}x[d+12>>2]=b;a=Wi(a,x[d+20>>2]);if((Ba|0)!=(e|0)){p()}x[d+8>>2]=a;Xi(f+8|0,d+12|0,d+8|0);if((Ba|0)!=(e|0)){p()}ya=d+32|0;ya=f+16|0}function bg(a,b){a:{if((b|0)>=1024){a=a*898846567431158e293;if(b>>>0<2047){b=b-1023|0;break a}a=a*898846567431158e293;b=((b|0)>=3069?3069:b)-2046|0;break a}if((b|0)>-1023){break a}a=a*2004168360008973e-307;if(b>>>0>4294965304){b=b+969|0;break a}a=a*2004168360008973e-307;b=((b|0)<=-2960?-2960:b)+1938|0}l(0,0);l(1,b+1023<<20);return a*+n()}function bb(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}if(!Ba){b=a+12|0;a=x[x[a+12>>2]+12>>2]}a:{if(!Ba|!c){Ea[a|0](b)|0;if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8}function Yj(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}a:{d=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}else{c=0}if(d|!c){c=Aj(a,b);if((Ba|0)==1){break a}a=c}if(!Ba){return(a|0)!=-1}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function Rj(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}a:{if(!Ba|!b){rh(51612);a=0;if((Ba|0)==1){break a}}if(!Ba|(b|0)==1){rh(51948);a=1;if((Ba|0)==1){break a}}if(!Ba|(b|0)==2){ai(51696);a=2;if((Ba|0)==1){break a}}if(!Ba|(b|0)==3){ai(52032);a=3;if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function Nj(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}a:{d=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}else{c=0}if(d|!c){yj(a,b);if((Ba|0)==1){break a}}if(!Ba){x[a+72>>2]=0;x[a+76>>2]=-1}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8}function Lj(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;c=x[Ca>>2];b=x[c>>2];c=x[c+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){c=Pj(a+4|0);x[a>>2]=34120;x[c>>2]=34140}a:{if(!Ba|!d){Nj(c,b);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;a=x[Ca>>2];x[a>>2]=b;x[a+4>>2]=c;x[Ca>>2]=x[Ca>>2]+8}function Ij(a,b){var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;c=x[Ca>>2];b=x[c>>2];c=x[c+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;d=x[x[Ca>>2]>>2]}if(!Ba){c=Mj(a+4|0);x[a>>2]=33960;x[c>>2]=33980}a:{if(!Ba|!d){Nj(c,b);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;a=x[Ca>>2];x[a>>2]=b;x[a+4>>2]=c;x[Ca>>2]=x[Ca>>2]+8}function Za(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}if(!Ba){b=nr(8)}a:{if(!Ba|!c){c=_a(b,a);if((Ba|0)==1){break a}a=c}if(!Ba){$(a|0,47292,2);p()}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8}function wo(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];f=x[b+4>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){In(a,f);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;b=x[Ca>>2];x[b>>2]=a;x[b+4>>2]=f;x[Ca>>2]=x[Ca>>2]+8}function tp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0;b=Ba;f=ya-16|0;ya=f;x[e>>2]=c;a=qp(f+12|0,0,x[a+8>>2]);if((Ba|0)!=(b|0)){p()}b=2;a:{if(a+1>>>0<2){break a}c=a-1|0;b=1;if(c>>>0>d-x[e>>2]>>>0){break a}d=f+12|0;while(1){if(c){a=y[d|0];b=x[e>>2];x[e>>2]=b+1;v[b|0]=a;c=c-1|0;d=d+1|0;continue}break}b=0}ya=f+16|0;return b|0}function Mp(a,b){a=a|0;b=b|0;var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}b=Ba?b:b+16|0;a:{d=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}else{c=0}if(d|!c){In(a,b);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8}function Lp(a,b){a=a|0;b=b|0;var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}b=Ba?b:b+12|0;a:{d=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}else{c=0}if(d|!c){In(a,b);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8}function qk(a,b){var c=0,d=0,e=0,f=0,g=0;f=Ba;d=ya-16|0;ya=d;a:{if(!b){b=0;break a}c=b>>31;e=(c^b)-c|0;c=G(e);Dg(d,e,0,0,0,c+81|0);if((Ba|0)!=(f|0)){p()}c=(x[d+12>>2]^65536)+(16414-c<<16)|0;f=0+x[d+8>>2]|0;e=f;g=b&-2147483648|(e>>>0>>0?c+1|0:c);c=x[d+4>>2];b=x[d>>2]}x[a>>2]=b;x[a+4>>2]=c;x[a+8>>2]=e;x[a+12>>2]=g;ya=d+16|0}function zq(a,b){var c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}if(!Ba){if(b>>>0>1073741823){Ji();p()}a=b<<2}a:{if(!Ba|!c){b=oj(a,4);if((Ba|0)==1){break a}a=b}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function wh(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}b=Ba?b:x[a>>2];a:{if(!Ba|!c){Ah(b);if((Ba|0)==1){break a}}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function fi(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}b=Ba?b:x[a>>2];a:{if(!Ba|!c){hi(b);if((Ba|0)==1){break a}}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8;return 0}function Ro(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}b=Ba?b:x[x[a>>2]+4>>2];a:{if(!Ba|!c){Ea[b|0](a);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8}function Lr(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!(Ba|a)){return 0}a:{if(!Ba|!b){b=sr(a,46308);if((Ba|0)==1){break a}a=b}if(!Ba){return(a|0)!=0|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function Li(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){x[a>>2]=34164;hr(a+32|0)}a:{if(!Ba|!b){b=Zg(a);if((Ba|0)==1){break a}a=b}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function _r(a,b){a=a|0;b=b|0;var c=0,d=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-8;b=x[Ca>>2];a=x[b>>2];b=x[b+4>>2]}a:{d=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;c=x[x[Ca>>2]>>2]}else{c=0}if(d|!c){Ea[a|0](b);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;c=x[Ca>>2];x[c>>2]=a;x[c+4>>2]=b;x[Ca>>2]=x[Ca>>2]+8}function nh(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}a=Ba?a:x[x[a>>2]-12>>2]+a|0;a:{if(!Ba|!b){b=mh(a);if((Ba|0)==1){break a}a=b}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function Qi(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}a=Ba?a:x[x[a>>2]-12>>2]+a|0;a:{if(!Ba|!b){b=Oi(a);if((Ba|0)==1){break a}a=b}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function Eh(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}a=Ba?a:x[x[a>>2]-12>>2]+a|0;a:{if(!Ba|!b){b=Dh(a);if((Ba|0)==1){break a}a=b}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function vm(a,b,c,d){var e=0;a:{if(!(d&2048)){break a}e=d&74;if(!c|((e|0)==8|(e|0)==64)){break a}v[a|0]=43;a=a+1|0}if(d&512){v[a|0]=35;a=a+1|0}while(1){e=y[b|0];if(e){v[a|0]=e;a=a+1|0;b=b+1|0;continue}break}e=d&74;b=111;b:{if((e|0)==64){break b}b=d&16384?88:120;if((e|0)==8){break b}b=c?100:117}v[a|0]=b}function ho(a,b){var c=0,d=0,e=0;c=Ba;e=ya-16|0;ya=e;d=ti(a);if((Ba|0)!=(c|0)){p()}if(d){d=x[a>>2];Ci(a);if((Ba|0)!=(c|0)){p()}Bq(d);if((Ba|0)!=(c|0)){p()}}x[a+8>>2]=x[b+8>>2];d=x[b+4>>2];x[a>>2]=x[b>>2];x[a+4>>2]=d;bj(b,0);if((Ba|0)!=(c|0)){p()}x[e+12>>2]=0;bo(b,e+12|0);if((Ba|0)!=(c|0)){p()}ya=e+16|0}function hk(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=gk(a,1);if((Ba|0)==1){break a}a=b}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function fk(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=gk(a,0);if((Ba|0)==1){break a}a=b}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function Wj(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=Vj(a,1);if((Ba|0)==1){break a}a=b}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function Uj(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=Vj(a,0);if((Ba|0)==1){break a}a=b}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function mi(a,b){var c=0,d=0,e=0;c=Ba;e=ya-16|0;ya=e;d=ti(a);if((Ba|0)!=(c|0)){p()}if(d){d=x[a>>2];Ci(a);if((Ba|0)!=(c|0)){p()}aj(d);if((Ba|0)!=(c|0)){p()}}x[a+8>>2]=x[b+8>>2];d=x[b+4>>2];x[a>>2]=x[b>>2];x[a+4>>2]=d;bj(b,0);if((Ba|0)!=(c|0)){p()}v[e+15|0]=0;cj(b,e+15|0);if((Ba|0)!=(c|0)){p()}ya=e+16|0}function Xg(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=xj(a);if((Ba|0)==1){break a}a=b}if(!Ba){return a|0}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function vk(a,b){var c=0,d=0,e=0,f=0;c=Ba;d=ya-16|0;ya=d;a:{if(!b){c=0;b=0;break a}e=b;b=G(b);Dg(d,e,0,0,0,112-(b^31)|0);if((Ba|0)!=(c|0)){p()}c=0;e=c+x[d+8>>2]|0;b=(x[d+12>>2]^65536)+(16414-b<<16)|0;f=c>>>0>e>>>0?b+1|0:b;c=x[d+4>>2];b=x[d>>2]}x[a>>2]=b;x[a+4>>2]=c;x[a+8>>2]=e;x[a+12>>2]=f;ya=d+16|0}function Bo(a,b){var c=0,d=0,e=0,f=0;f=Ba;e=ya-16|0;ya=e;c=e+4|0;x[c>>2]=a;d=x[a+4>>2];x[c+4>>2]=d;x[c+8>>2]=d+(b<<2);b=x[c+4>>2];d=x[c+8>>2];while(1){if((b|0)==(d|0)){x[x[c>>2]+4>>2]=x[c+4>>2];ya=e+16|0}else{Lq(a);if((Ba|0)!=(f|0)){p()}Qq(b);if((Ba|0)!=(f|0)){p()}b=b+4|0;x[c+4>>2]=b;continue}break}}function uh(a){var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}a=Ba?a:x[a>>2];a:{if(!Ba|!b){b=zh(a);if((Ba|0)==1){break a}a=b}if(!Ba){return a<<24>>24}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function sh(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=il(a,52748);if((Ba|0)==1){break a}a=b}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function io(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=il(a,52640);if((Ba|0)==1){break a}a=b}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function go(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=il(a,52648);if((Ba|0)==1){break a}a=b}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function el(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=il(a,52804);if((Ba|0)==1){break a}a=b}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function bi(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=il(a,52740);if((Ba|0)==1){break a}a=b}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function Wn(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=il(a,52624);if((Ba|0)==1){break a}a=b}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function Ul(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=il(a,52812);if((Ba|0)==1){break a}a=b}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function Sn(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=il(a,52632);if((Ba|0)==1){break a}a=b}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function Qj(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=il(a,52764);if((Ba|0)==1){break a}a=b}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function Jh(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=il(a,52576);if((Ba|0)==1){break a}a=b}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function Fi(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=il(a,52756);if((Ba|0)==1){break a}a=b}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function xi(a){a=a|0;var b=0;b=Ba;if(A[a+24>>2]>A[a+44>>2]){x[a+44>>2]=x[a+24>>2]}a:{if(!(y[a+48|0]&8)){break a}if(A[a+16>>2]>2]){ni(a,x[a+8>>2],x[a+12>>2],x[a+44>>2]);if((Ba|0)!=(b|0)){p()}}if(A[a+12>>2]>=A[a+16>>2]){break a}a=jh(v[x[a+12>>2]]);if((Ba|0)!=(b|0)){p()}return a|0}return-1}function gg(a){var b=0,c=0,d=0;a:{b:{b=a;if(!(b&3)){break b}if(!y[b|0]){return 0}while(1){b=b+1|0;if(!(b&3)){break b}if(y[b|0]){continue}break}break a}while(1){c=b;b=b+4|0;d=x[c>>2];if(!((d^-1)&d-16843009&-2139062144)){continue}break}while(1){b=c;c=b+1|0;if(y[b|0]){continue}break}}return b-a|0}function Of(a,b,c){var d=0,e=0;a:{b:{if(c>>>0>=4){if((a|b)&3){break b}while(1){if(x[a>>2]!=x[b>>2]){break b}b=b+4|0;a=a+4|0;c=c-4|0;if(c>>>0>3){continue}break}}if(!c){break a}}while(1){d=y[a|0];e=y[b|0];if((d|0)==(e|0)){b=b+1|0;a=a+1|0;c=c-1|0;if(c){continue}break a}break}return d-e|0}return 0}function di(a){var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}a=Ba?a:x[a>>2];a:{if(!Ba|!b){b=gi(a);if((Ba|0)==1){break a}a=b}if(!Ba){return a}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4;return 0}function up(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ba;b=ya-16|0;ya=b;x[b+12>>2]=x[a+8>>2];d=Rl(b+8|0,b+12|0);if((Ba|0)!=(c|0)){p()}e=Dj(0,0,4);if((Ba|0)!=(c|0)){p()}Sl(d);if((Ba|0)!=(c|0)){p()}ya=b+16|0;if(e){a=-1}else{a=x[a+8>>2];if(!a){return 1}a=vp(a);if((Ba|0)!=(c|0)){p()}a=(a|0)==1}return a|0}function oh(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=mh(a);if((Ba|0)==1){break a}a=b}if(!Ba){zg(a)}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function dk(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=Vh(a);if((Ba|0)==1){break a}a=b}if(!Ba){zg(a)}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function Sj(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=Zg(a);if((Ba|0)==1){break a}a=b}if(!Ba){zg(a)}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function Pi(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=Oi(a);if((Ba|0)==1){break a}a=b}if(!Ba){zg(a)}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function Mi(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=Li(a);if((Ba|0)==1){break a}a=b}if(!Ba){zg(a)}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function Fh(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){b=Dh(a);if((Ba|0)==1){break a}a=b}if(!Ba){zg(a)}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function mb(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){lb(a);if((Ba|0)==1){break a}}if(!Ba){zg(a)}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function dc(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){bc(a);if((Ba|0)==1){break a}}if(!Ba){zg(a)}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function _g(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){Zg(a);if((Ba|0)==1){break a}}if(!Ba){zg(a)}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function Yg(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){xj(a);if((Ba|0)==1){break a}}if(!Ba){zg(a)}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function Wh(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){Vh(a);if((Ba|0)==1){break a}}if(!Ba){zg(a)}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function Mo(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){Ko(a);if((Ba|0)==1){break a}}if(!Ba){zg(a)}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function ph(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}a=Ba?a:x[x[a>>2]-12>>2]+a|0;a:{if(!Ba|!b){oh(a);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function Ri(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}a=Ba?a:x[x[a>>2]-12>>2]+a|0;a:{if(!Ba|!b){Pi(a);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function Gh(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}a=Ba?a:x[x[a>>2]-12>>2]+a|0;a:{if(!Ba|!b){Fh(a);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function Rp(a,b){a=a|0;b=b|0;var c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){Pp(a,40628);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function Op(a,b){a=a|0;b=b|0;var c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){Pp(a,40608);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function Qp(a,b){a=a|0;b=b|0;var c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){uj(a,7511);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function Np(a,b){a=a|0;b=b|0;var c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){uj(a,7166);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function Hn(a,b){a=a|0;b=b|0;var c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){Ym(a,1,45);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function En(a,b){a=a|0;b=b|0;var c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){Jm(a,1,45);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function ng(a){var b=0,c=0,d=0,e=0;e=Ba;b=ig(v[x[a>>2]]);if((Ba|0)!=(e|0)){p()}if(!b){return 0}while(1){d=x[a>>2];b=-1;if(c>>>0<=214748364){b=v[d|0]-48|0;c=D(c,10);b=(b|0)>(c^2147483647)?-1:b+c|0}x[a>>2]=d+1;c=b;b=ig(v[d+1|0]);if((Ba|0)!=(e|0)){p()}if(b){continue}break}return c}function jg(a,b){var c=0,d=0,e=0,f=0;e=Ba;o(+a);d=j(1)|0;f=j(0)|0;c=d>>>20&2047;if((c|0)!=2047){if(!c){if(a==0){c=0}else{a=jg(a*0x10000000000000000,b);if((Ba|0)!=(e|0)){p()}c=x[b>>2]+-64|0}x[b>>2]=c;return a}x[b>>2]=c-1022;l(0,f|0);l(1,d&-2146435073|1071644672);a=+n()}return a}function ls(a){a=a|0;var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){Ea[a|0]();if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function Yk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;h=(e-d|0)+b|0;a:{while(1){if((d|0)!=(e|0)){a=-1;if((b|0)==(c|0)){break a}f=v[b|0];g=v[d|0];if((f|0)<(g|0)){break a}if((f|0)>(g|0)){return 1}else{d=d+1|0;b=b+1|0;continue}}break}a=(c|0)!=(h|0)}return a|0}function Bb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;c=x[a+12>>2];if(!y[48568]){v[48568]=1;x[12140]=-1598689907;x[12141]=1051772663}d=1;a:{if((c|0)<0){break a}a=0;e=C[6070];while(1){if(!(C[(a<<3)+b>>3]>e)){f=(a|0)==(c|0);a=a+1|0;if(!f){continue}break a}break}d=0}return+d}function ag(a){var b=0,c=0,d=0;o(+a);b=j(1)|0;j(0)|0;d=b>>>20&2047;if(d>>>0<=1074){if(d>>>0<=1021){return a*0}a=(b|0)>0|(b|0)>=0?a:-a;c=a+4503599627370496+-4503599627370496-a;a:{if(c>.5){a=a+c+-1;break a}a=a+c;if(!(c<=-.5)){break a}a=a+1}a=(b|0)>0|(b|0)>=0?a:-a}return a}function zn(a,b,c,d,e,f){var g=0,h=0;h=Ba;g=ya-16|0;ya=g;v[g+15|0]=0;v[g+14|0]=f;v[g+13|0]=e;v[g+12|0]=37;if(f){Qg(g+13|0,g+14|0);if((Ba|0)!=(h|0)){p()}}e=gj(b,x[c>>2]);if((Ba|0)!=(h|0)){p()}a=va(b|0,e|0,g+12|0,d|0,x[a>>2])|0;if((Ba|0)!=(h|0)){p()}x[c>>2]=a+b;ya=g+16|0}function pl(a){var b=0,c=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}a:{c=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}else{b=0}if(c|!b){ll(a,0);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function ff(a,b,c){var d=0,e=0,f=0;d=a*a;f=d*(d*d)*(d*1.58969099521155e-10+-2.5050760253406863e-8)+(d*(d*27557313707070068e-22+-.0001984126982985795)+.00833333333332249);e=d*a;if(!c){return e*(d*f+-.16666666666666632)+a}return a-(d*(b*.5-f*e)-b+e*.16666666666666632)}function Ab(a,b,c){a=a|0;b=b|0;c=c|0;var d=E(0),e=E(0),f=0;c=x[a+12>>2];if(!y[48552]){v[48552]=1;x[12137]=897988541}d=E(1);a:{if((c|0)<0){break a}a=0;e=B[12137];while(1){if(!(B[(a<<2)+b>>2]>e)){f=(a|0)==(c|0);a=a+1|0;if(!f){continue}break a}break}d=E(0)}return E(d)}function Po(a){var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}a=Ba?a:x[a>>2];a:{if(!Ba|!b){Jo(a);if((Ba|0)==1){break a}}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;x[x[Ca>>2]>>2]=a;x[Ca>>2]=x[Ca>>2]+4}function sq(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){a=!y[52992]}a:{if((Ba|0)==2|a){if(!Ba|!b){Pp(52980,40808);if((Ba|0)==1){break a}}if(!Ba){v[52992]=1}}if(!Ba){return 52980}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;return 0}function oq(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){a=!y[52960]}a:{if((Ba|0)==2|a){if(!Ba|!b){Pp(52948,40724);if((Ba|0)==1){break a}}if(!Ba){v[52960]=1}}if(!Ba){return 52948}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;return 0}function kq(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){a=!y[52928]}a:{if((Ba|0)==2|a){if(!Ba|!b){Pp(52916,40688);if((Ba|0)==1){break a}}if(!Ba){v[52928]=1}}if(!Ba){return 52916}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;return 0}function gq(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){a=!y[52896]}a:{if((Ba|0)==2|a){if(!Ba|!b){Pp(52884,40652);if((Ba|0)==1){break a}}if(!Ba){v[52896]=1}}if(!Ba){return 52884}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;return 0}function qq(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){a=!y[52976]}a:{if((Ba|0)==2|a){if(!Ba|!b){uj(52964,3848);if((Ba|0)==1){break a}}if(!Ba){v[52976]=1}}if(!Ba){return 52964}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;return 0}function mq(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){a=!y[52944]}a:{if((Ba|0)==2|a){if(!Ba|!b){uj(52932,9654);if((Ba|0)==1){break a}}if(!Ba){v[52944]=1}}if(!Ba){return 52932}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;return 0}function iq(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){a=!y[52912]}a:{if((Ba|0)==2|a){if(!Ba|!b){uj(52900,9708);if((Ba|0)==1){break a}}if(!Ba){v[52912]=1}}if(!Ba){return 52900}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;return 0}function eq(a){a=a|0;var b=0;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;b=x[x[Ca>>2]>>2]}if(!Ba){a=!y[52880]}a:{if((Ba|0)==2|a){if(!Ba|!b){uj(52868,1270);if((Ba|0)==1){break a}}if(!Ba){v[52880]=1}}if(!Ba){return 52868}p()}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4;return 0}function _m(a,b){var c=0,d=0;d=Ba;c=ya-16|0;ya=c;x[c+12>>2]=a;a:{if((a|0)==(b|0)){break a}while(1){b=b-4|0;x[c+8>>2]=b;if(a>>>0>=b>>>0){break a}Rg(x[c+12>>2],x[c+8>>2]);if((Ba|0)!=(d|0)){p()}else{a=x[c+12>>2]+4|0;x[c+12>>2]=a;b=x[c+8>>2];continue}}}ya=c+16|0}function Zm(a,b){var c=0,d=0;d=Ba;c=ya-16|0;ya=c;x[c+12>>2]=a;a:{if((a|0)==(b|0)){break a}while(1){b=b-1|0;x[c+8>>2]=b;if(a>>>0>=b>>>0){break a}Qg(x[c+12>>2],x[c+8>>2]);if((Ba|0)!=(d|0)){p()}else{a=x[c+12>>2]+1|0;x[c+12>>2]=a;b=x[c+8>>2];continue}}}ya=c+16|0}function Sa(a){a=a|0;var b=0,c=0,d=0,e=0;e=Ba;b=x[12123];if(b){a=b;c=x[12124];if((b|0)!=(c|0)){while(1){a=c-12|0;d=x[a>>2];if(d){x[c-8>>2]=d;zg(d);if((Ba|0)!=(e|0)){p()}}c=a;if((c|0)!=(b|0)){continue}break}a=x[12123]}x[12124]=b;zg(a);if((Ba|0)!=(e|0)){p()}}}function Qa(a){a=a|0;var b=0,c=0,d=0,e=0;e=Ba;b=x[12115];if(b){a=b;c=x[12116];if((b|0)!=(c|0)){while(1){a=c-12|0;d=x[a>>2];if(d){x[c-8>>2]=d;zg(d);if((Ba|0)!=(e|0)){p()}}c=a;if((c|0)!=(b|0)){continue}break}a=x[12115]}x[12116]=b;zg(a);if((Ba|0)!=(e|0)){p()}}}function pg(a,b,c){var d=0,e=0,f=0,g=0;if(b){while(1){c=c-1|0;e=a;a=Is(a,b,10);d=Da;f=c,g=e-Hs(a,d,10,0)|48,v[f|0]=g;e=b>>>0>9;b=d;if(e){continue}break}}if(a){while(1){c=c-1|0;b=(a>>>0)/10|0;v[c|0]=a-D(b,10)|48;d=a>>>0>9;a=b;if(d){continue}break}}return c}function $k(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;a:{while(1){if((d|0)!=(e|0)){a=-1;if((b|0)==(c|0)){break a}f=x[b>>2];g=x[d>>2];if((f|0)<(g|0)){break a}if((f|0)>(g|0)){return 1}else{d=d+4|0;b=b+4|0;continue}}break}a=(b|0)!=(c|0)}return a|0}function ok(a,b,c){var d=0,e=0,f=0,g=0;x[a+112>>2]=b;x[a+116>>2]=c;e=x[a+4>>2];d=x[a+44>>2]-e|0;x[a+120>>2]=d;x[a+124>>2]=d>>31;d=x[a+8>>2];a:{if(!(b|c)){break a}f=d-e|0;g=f>>31;if((c|0)>=(g|0)&b>>>0>=f>>>0|(c|0)>(g|0)){break a}d=b+e|0}x[a+104>>2]=d}function we(a){a=a|0;var b=E(0),c=0,d=0,e=0;d=x[a+44>>2];c=d-1|0;e=x[a+32>>2];b=B[a+48>>2];if(b==E(50)){a=(c|0)/2|0}else{b=E(J(E(E(b*E(c|0))/E(100))));a:{if(E(F(b))>3]}function Gk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;e=Ba;d=x[a+84>>2];f=c+256|0;g=Nf(d,0,f);if((Ba|0)!=(e|0)){p()}h=b;b=g?g-d|0:f;c=b>>>0>>0?b:c;lf(h,d,c);if((Ba|0)!=(e|0)){p()}b=b+d|0;x[a+84>>2]=b;x[a+8>>2]=b;x[a+4>>2]=c+d;return c|0}function $f(a,b){var c=0,d=0,e=0,f=0;c=b>>>20&2047;e=0;a:{if(c>>>0<1023){break a}e=2;if(c>>>0>1075){break a}c=1075-c|0;d=c&31;if((c&63)>>>0>=32){c=1<>>32-d;d=f}f=d-1|0;e=0;if(a&f|b&c-!d){break a}e=a&d|b&c?1:2}return e}function cf(a,b){var c=0,d=0,e=0,f=0;c=a*a;d=c*.5;e=1-d;f=1-e-d;d=c*c;return e+(f+(c*(c*(c*(c*2480158728947673e-20+-.001388888888887411)+.0416666666666666)+d*d*(c*(c*-11359647557788195e-27+2.087572321298175e-9)+-2.7557314351390663e-7))-a*b))}function wd(a){a=a|0;var b=0,c=0;c=Ba;x[a>>2]=13656;b=x[a+8>>2];if(b){b=vd(b);if((Ba|0)!=(c|0)){p()}zg(b);if((Ba|0)!=(c|0)){p()}}b=x[a+12>>2];if(b){b=vd(b);if((Ba|0)!=(c|0)){p()}zg(b);if((Ba|0)!=(c|0)){p()}}zg(a);if((Ba|0)!=(c|0)){p()}}function xm(a,b,c){c=x[c+4>>2]&176;if((c|0)==32){return b}a:{if((c|0)!=16){break a}b:{c:{c=y[a|0];switch(c-43|0){case 0:case 2:break c;default:break b}}return a+1|0}if((c|0)!=48|(b-a|0)<2|(y[a+1|0]|32)!=120){break a}a=a+2|0}return a}function km(a,b,c){var d=0,e=0,f=0,g=0;e=Ba;d=ya-16|0;ya=d;f=x[c>>2];g=a;c=b-a>>2;a:{if(c){while(1){if(x[a>>2]==(f|0)){break a}a=a+4|0;c=c-1|0;if(c){continue}break}}a=0}a=Wi(g,a?a:b);if((Ba|0)!=(e|0)){p()}ya=d+16|0;return a}function Df(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;f=Ba;e=ya-16|0;ya=e;a=xa(x[a+60>>2],b|0,c|0,d&255,e+8|0)|0;if((Ba|0)!=(f|0)){p()}a=ug(a);if((Ba|0)!=(f|0)){p()}ya=e+16|0;Da=a?-1:x[e+12>>2];return(a?-1:x[e+8>>2])|0}function wk(a,b,c,d,e,f,g,h,i){var j=0,k=0;k=Ba;j=ya-16|0;ya=j;sk(j,b,c,d,e,f,g,h,i^-2147483648);if((Ba|0)!=(k|0)){p()}d=x[j>>2];c=x[j+4>>2];b=x[j+12>>2];x[a+8>>2]=x[j+8>>2];x[a+12>>2]=b;x[a>>2]=d;x[a+4>>2]=c;ya=j+16|0}function ud(a){a=a|0;var b=0,c=0;c=Ba;x[a>>2]=13656;b=x[a+8>>2];if(b){b=vd(b);if((Ba|0)!=(c|0)){p()}zg(b);if((Ba|0)!=(c|0)){p()}}b=x[a+12>>2];if(b){b=vd(b);if((Ba|0)!=(c|0)){p()}zg(b);if((Ba|0)!=(c|0)){p()}}return a|0}function te(a){a=a|0;var b=0,c=0;c=Ba;x[a>>2]=15280;b=x[a+32>>2];if(b){x[a+36>>2]=b;zg(b);if((Ba|0)!=(c|0)){p()}}x[a+4>>2]=15396;b=x[a+8>>2];if(b){x[a+12>>2]=b;zg(b);if((Ba|0)!=(c|0)){p()}}zg(a);if((Ba|0)!=(c|0)){p()}}function Hs(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;e=c>>>16|0;f=a>>>16|0;j=D(e,f);g=c&65535;h=a&65535;i=D(g,h);f=(i>>>16|0)+D(f,g)|0;e=(f&65535)+D(e,h)|0;Da=(D(b,c)+j|0)+D(a,d)+(f>>>16)+(e>>>16)|0;return i&65535|e<<16}function xg(a){var b=0,c=0,d=0;d=Ba;c=x[11921];b=a+7&-8;a=c+b|0;a:{if(a>>>0<=c>>>0?b:0){break a}if(a>>>0>Fa()<<16>>>0){b=sa(a|0)|0;if((Ba|0)!=(d|0)){p()}if(!b){break a}}x[11921]=a;return c}x[12163]=48;return-1}function tr(a,b,c){var d=0;d=x[a+16>>2];if(!d){x[a+36>>2]=1;x[a+24>>2]=c;x[a+16>>2]=b;return}a:{if((b|0)==(d|0)){if(x[a+24>>2]!=2){break a}x[a+24>>2]=c;return}v[a+54|0]=1;x[a+24>>2]=2;x[a+36>>2]=x[a+36>>2]+1}}function Mf(a){var b=E(0),c=E(0);b=a;a=E(J(a));c=E(b-a);if(!(cE(.5)){break a}c=a;a=E(a*E(.5));b=E(a-E(J(a)))==E(0)?c:b}a=b}if(E(F(a))>2]=15280;b=x[a+32>>2];if(b){x[a+36>>2]=b;zg(b);if((Ba|0)!=(c|0)){p()}}x[a+4>>2]=15396;b=x[a+8>>2];if(b){x[a+12>>2]=b;zg(b);if((Ba|0)!=(c|0)){p()}}return a|0}function Dq(a,b,c){var d=0,e=0;e=Ba;d=ya-16|0;ya=d;x[d+8>>2]=b;x[d+12>>2]=a;x[d+4>>2]=c;b=0;a=pj(d+4|0,d+12|0);if((Ba|0)!=(e|0)){p()}if(!a){b=pj(d+4|0,d+8|0);if((Ba|0)!=(e|0)){p()}}ya=d+16|0;return b}function Fb(a,b){var c=0;c=Ba;if(b){Fb(a,x[b>>2]);if((Ba|0)!=(c|0)){p()}Fb(a,x[b+4>>2]);if((Ba|0)!=(c|0)){p()}if(v[b+27|0]<0){zg(x[b+16>>2]);if((Ba|0)!=(c|0)){p()}}zg(b);if((Ba|0)!=(c|0)){p()}}}function sp(a,b,c,d,e){var f=0,g=0;g=Ba;f=ya-16|0;ya=f;x[f+12>>2]=e;e=Rl(f+8|0,f+12|0);if((Ba|0)!=(g|0)){p()}a=Ej(a,b,c,d);if((Ba|0)!=(g|0)){p()}Sl(e);if((Ba|0)!=(g|0)){p()}ya=f+16|0;return a}function eb(){var a=0,b=0;a:{b=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}else{a=0}if(b|!a){Za(6396);if((Ba|0)==1){break a}}if(!Ba){p()}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4}function Xa(){var a=0,b=0;a:{b=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}else{a=0}if(b|!a){Za(3164);if((Ba|0)==1){break a}}if(!Ba){p()}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4}function Ec(){var a=0,b=0;a:{b=!Ba;if((Ba|0)==2){x[Ca>>2]=x[Ca>>2]-4;a=x[x[Ca>>2]>>2]}else{a=0}if(b|!a){Fc(3164);if((Ba|0)==1){break a}}if(!Ba){p()}return}x[x[Ca>>2]>>2]=0;x[Ca>>2]=x[Ca>>2]+4}function Ek(a,b,c,d){a:{if(!a){break a}b:{switch(b+2|0){case 0:v[a|0]=c;return;case 1:w[a>>1]=c;return;case 2:case 3:x[a>>2]=c;return;case 5:break b;default:break a}}x[a>>2]=c;x[a+4>>2]=d}} +function Rf(a){var b=0;b=x[a+72>>2];x[a+72>>2]=b-1|b;b=x[a>>2];if(b&8){x[a>>2]=b|32;return-1}x[a+4>>2]=0;x[a+8>>2]=0;b=x[a+44>>2];x[a+28>>2]=b;x[a+20>>2]=b;x[a+16>>2]=b+x[a+48>>2];return 0}function Iq(a,b,c){var d=0,e=0;e=Ba;d=ya-16|0;ya=d;b=Eq(b);if((Ba|0)!=(e|0)){p()}x[d+12>>2]=b;b=Eq(c);if((Ba|0)!=(e|0)){p()}x[d+8>>2]=b;Yi(a,d+12|0,d+8|0);if((Ba|0)!=(e|0)){p()}ya=d+16|0}function Hk(a,b){var c=0,d=0;c=y[a|0];d=y[b|0];a:{if(!c|(c|0)!=(d|0)){break a}while(1){d=y[b+1|0];c=y[a+1|0];if(!c){break a}b=b+1|0;a=a+1|0;if((c|0)==(d|0)){continue}break}}return c-d|0}function qp(a,b,c){var d=0,e=0;e=Ba;d=ya-16|0;ya=d;x[d+12>>2]=c;c=Rl(d+8|0,d+12|0);if((Ba|0)!=(e|0)){p()}a=vg(a,b);if((Ba|0)!=(e|0)){p()}Sl(c);if((Ba|0)!=(e|0)){p()}ya=d+16|0;return a}function Kq(a){var b=0,c=0;c=Ba;b=ya-16|0;ya=b;Lq(a);if((Ba|0)!=(c|0)){p()}x[b+12>>2]=1073741823;x[b+8>>2]=2147483647;a=Hi(b+12|0,b+8|0);if((Ba|0)!=(c|0)){p()}ya=b+16|0;return x[a>>2]}function Ye(a){a=a|0;var b=0,c=0,d=0;b=Ba;c=x[a+4>>2];a=gg(c);if((Ba|0)!=(b|0)){p()}d=a+1|0;a=yg(d);if((Ba|0)!=(b|0)){p()}if(a){a=lf(a,c,d);if((Ba|0)!=(b|0)){p()}}else{a=0}return a|0}function _i(a,b,c,d){var e=0,f=0,g=0;f=Ba;e=ya-16|0;ya=e;x[e+12>>2]=c;g=b;b=c-b|0;$i(d,g,b>>2);if((Ba|0)!=(f|0)){p()}x[e+8>>2]=b+d;Xi(a,e+12|0,e+8|0);if((Ba|0)!=(f|0)){p()}ya=e+16|0}function Ui(a,b,c,d){var e=0,f=0,g=0;f=Ba;e=ya-16|0;ya=e;x[e+12>>2]=c;g=b;b=c-b|0;Zi(d,g,b);if((Ba|0)!=(f|0)){p()}x[e+8>>2]=b+d;Xi(a,e+12|0,e+8|0);if((Ba|0)!=(f|0)){p()}ya=e+16|0}function Uo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;while(1){if((b|0)!=(c|0)){a=x[b>>2];if(a>>>0<=127){a=x[(a<<2)+39456>>2]}else{a=0}x[d>>2]=a;d=d+4|0;b=b+4|0;continue}break}return c|0}function vp(a){var b=0,c=0,d=0;c=Ba;b=ya-16|0;ya=b;x[b+12>>2]=a;a=Rl(b+8|0,b+12|0);if((Ba|0)!=(c|0)){p()}d=x[x[12204]>>2]?4:1;Sl(a);if((Ba|0)!=(c|0)){p()}ya=b+16|0;return d}function Wo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a:{while(1){if((c|0)==(d|0)){break a}a=x[c>>2];if(!(a>>>0>127|!(x[(a<<2)+39456>>2]&b))){c=c+4|0;continue}break}d=c}return d|0}function Vo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;while(1){a:{if((c|0)!=(d|0)){a=x[c>>2];if(a>>>0>127|!(x[(a<<2)+39456>>2]&b)){break a}}else{c=d}return c|0}c=c+4|0;continue}}function np(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;b=Ba;a=ya-16|0;ya=a;x[a+12>>2]=e;x[a+8>>2]=d-c;c=Hi(a+12|0,a+8|0);if((Ba|0)!=(b|0)){p()}ya=a+16|0;return x[c>>2]}function yo(a){a=a|0;var b=0,c=0,d=0;b=Ba;x[a>>2]=40488;c=x[a+8>>2];d=Ol();if((Ba|0)!=(b|0)){p()}if((c|0)!=(d|0)){Tk(x[a+8>>2]);if((Ba|0)!=(b|0)){p()}}return a|0}function Lf(a){var b=0,c=0;b=a;a=J(a);c=b-a;if(!(c<.5)){b=K(b);a:{if(c>.5){break a}c=a;a=a*.5;b=a-J(a)==0?c:b}a=b}if(F(a)<2147483648){return~~a}return-2147483648}function _o(a,b,c){a=a|0;b=b|0;c=c|0;while(1){if((b|0)!=(c|0)){a=x[b>>2];if(a>>>0<=127){a=x[x[9448]+(x[b>>2]<<2)>>2]}x[b>>2]=a;b=b+4|0;continue}break}return c|0}function Yo(a,b,c){a=a|0;b=b|0;c=c|0;while(1){if((b|0)!=(c|0)){a=x[b>>2];if(a>>>0<=127){a=x[x[9062]+(x[b>>2]<<2)>>2]}x[b>>2]=a;b=b+4|0;continue}break}return c|0}function tg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=Ba;d=b;b=x[b>>2]+7&-8;x[d>>2]=b+16;e=Fg(x[b>>2],x[b+4>>2],x[b+8>>2],x[b+12>>2]);if((Ba|0)!=(c|0)){p()}C[a>>3]=e}function kb(a,b){a=a|0;b=b|0;var c=0,d=0;x[a+8>>2]=b;c=x[a+4>>2];if(!c){x[a+12>>2]=0;return}d=a;a=(D(b,16e3)|0)/(c|0)|0;b=(b|0)/2|0;x[d+12>>2]=(a|0)<(b|0)?a:b}function Qr(a){a=a|0;var b=0,c=0,d=0;b=Ba;x[a>>2]=47212;c=x[a+4>>2]-12|0;d=Lo(c+8|0);if((Ba|0)!=(b|0)){p()}if((d|0)<0){zg(c);if((Ba|0)!=(b|0)){p()}}return a|0}function cl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;a=0;while(1){if((b|0)!=(c|0)){a=x[b>>2]+(a<<4)|0;d=a&-268435456;a=(d|d>>>24)^a;b=b+4|0;continue}break}return a|0}function Kr(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0;g=Ba;a=qr(a,x[b+8>>2],f);if((Ba|0)!=(g|0)){p()}if(a){Br(b,c,d,e);if((Ba|0)!=(g|0)){p()}}}function _k(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;a=0;while(1){if((b|0)!=(c|0)){a=v[b|0]+(a<<4)|0;d=a&-268435456;a=(d|d>>>24)^a;b=b+1|0;continue}break}return a|0}function vq(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ba;c=a+8|0;d=x[c>>2];e=Ol();if((Ba|0)!=(b|0)){p()}if((d|0)!=(e|0)){Tk(x[c>>2]);if((Ba|0)!=(b|0)){p()}}return a|0}function hp(a,b,c){a=a|0;b=b|0;c=c|0;while(1){if((b|0)!=(c|0)){a=v[b|0];if((a|0)>=0){a=x[x[9448]+(v[b|0]<<2)>>2]}v[b|0]=a;b=b+1|0;continue}break}return c|0}function fp(a,b,c){a=a|0;b=b|0;c=c|0;while(1){if((b|0)!=(c|0)){a=v[b|0];if((a|0)>=0){a=x[x[9062]+(v[b|0]<<2)>>2]}v[b|0]=a;b=b+1|0;continue}break}return c|0}function jf(a){var b=0,c=0;b=a*a;c=b*a;return E(c*(b*b)*(b*2718311493989822e-21+-.00019839334836096632)+(c*(b*.008333329385889463+-.16666666641626524)+a))}function jb(a,b){a=a|0;b=b|0;var c=0;x[a+4>>2]=b;if(!b){x[a+12>>2]=0;return}c=a;a=x[a+8>>2];b=(D(a,16e3)|0)/(b|0)|0;a=(a|0)/2|0;x[c+12>>2]=(a|0)>(b|0)?b:a}function kl(a,b,c){var d=0,e=0;e=Ba;d=ya-16|0;ya=d;x[d+12>>2]=b;a=zj(a,d+12|0);if((Ba|0)!=(e|0)){p()}zj(a+4|0,c);if((Ba|0)!=(e|0)){p()}ya=d+16|0;return a}function xe(a){a=a|0;var b=0,c=0,d=0;d=Ba;x[a+20>>2]=x[a+24>>2];b=x[a+32>>2];c=x[a+36>>2]-b|0;if((c|0)>0){nf(b,0,c);if((Ba|0)!=(d|0)){p()}}x[a+44>>2]=0}function bp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;while(1){if((b|0)!=(c|0)){a=x[b>>2];v[e|0]=a>>>0<128?a:d;e=e+1|0;b=b+4|0;continue}break}return c|0}function qr(a,b,c){var d=0;d=Ba;if(!c){return x[a+4>>2]==x[b+4>>2]}if((a|0)==(b|0)){return 1}a=Hk(x[a+4>>2],x[b+4>>2]);if((Ba|0)!=(d|0)){p()}return!a}function kp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;while(1){if((b|0)!=(c|0)){a=v[b|0];v[e|0]=(a|0)<0?d:a;e=e+1|0;b=b+1|0;continue}break}return c|0}function Ql(a,b,c){var d=0,e=0;d=Ba;e=ya-16|0;ya=e;c=Nf(a,v[c|0],b-a|0);if((Ba|0)!=(d|0)){p()}a=Wi(a,c?c:b);if((Ba|0)!=(d|0)){p()}ya=e+16|0;return a}function Ya(){var a=0,b=0;b=Ba;a=nr(4);if((Ba|0)!=(b|0)){p()}a=Nr(a);if((Ba|0)!=(b|0)){p()}x[a>>2]=47080;$(a|0,47192,1);if((Ba|0)!=(b|0)){p()}p()}function lr(a){var b=0,c=0;b=Ba;c=ti(a);if((Ba|0)!=(b|0)){p()}if(c){c=x[a>>2];Ci(a);if((Ba|0)!=(b|0)){p()}Bq(c);if((Ba|0)!=(b|0)){p()}}return a}function hr(a){var b=0,c=0;b=Ba;c=ti(a);if((Ba|0)!=(b|0)){p()}if(c){c=x[a>>2];Ci(a);if((Ba|0)!=(b|0)){p()}aj(c);if((Ba|0)!=(b|0)){p()}}return a}function hf(a){var b=0;a=a*a;b=a*a;return E(a*b*(a*2439044879627741e-20+-.001388676377460993)+(b*.04166662332373906+(a*-.499999997251031+1)))}function Aq(a,b,c){var d=0,e=0;e=Ba;d=ya-16|0;ya=d;Rn(a,c);if((Ba|0)!=(e|0)){p()}v[d+15|0]=0;cj(b+c|0,d+15|0);if((Ba|0)!=(e|0)){p()}ya=d+16|0}function hc(a,b){var c=0;c=Ba;if(b){hc(a,x[b>>2]);if((Ba|0)!=(c|0)){p()}hc(a,x[b+4>>2]);if((Ba|0)!=(c|0)){p()}zg(b);if((Ba|0)!=(c|0)){p()}}} +function ze(a){a=a|0;var b=0,c=0;c=Ba;x[a>>2]=15396;b=x[a+4>>2];if(b){x[a+8>>2]=b;zg(b);if((Ba|0)!=(c|0)){p()}}zg(a);if((Ba|0)!=(c|0)){p()}}function ur(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=Ba;a=qr(a,x[b+8>>2],0);if((Ba|0)!=(e|0)){p()}if(a){tr(b,c,d);if((Ba|0)!=(e|0)){p()}}}function kc(a,b){var c=0;c=Ba;if(b){kc(a,x[b>>2]);if((Ba|0)!=(c|0)){p()}kc(a,x[b+4>>2]);if((Ba|0)!=(c|0)){p()}zg(b);if((Ba|0)!=(c|0)){p()}}}function cc(a,b){var c=0;c=Ba;if(b){cc(a,x[b>>2]);if((Ba|0)!=(c|0)){p()}cc(a,x[b+4>>2]);if((Ba|0)!=(c|0)){p()}zg(b);if((Ba|0)!=(c|0)){p()}}}function Oe(a){a=a|0;var b=0,c=0;c=Ba;x[a>>2]=15872;b=x[a+4>>2];if(b){x[a+8>>2]=b;zg(b);if((Ba|0)!=(c|0)){p()}}zg(a);if((Ba|0)!=(c|0)){p()}}function Mm(a){var b=0,c=0;b=Ba;c=ri(a);if((Ba|0)!=(b|0)){p()}a=ui(a);if((Ba|0)!=(b|0)){p()}a=tm((a<<2)+c|0);if((Ba|0)!=(b|0)){p()}return a}function Rn(a,b){var c=0,d=0;c=Ba;d=ti(a);if((Ba|0)!=(c|0)){p()}if(d){mj(a,b);if((Ba|0)!=(c|0)){p()}return}bj(a,b);if((Ba|0)!=(c|0)){p()}}function qm(a){var b=0,c=0;b=Ba;c=ri(a);if((Ba|0)!=(b|0)){p()}a=ui(a);if((Ba|0)!=(b|0)){p()}a=tm(a+c|0);if((Ba|0)!=(b|0)){p()}return a}function Rq(a,b){var c=0,d=0;d=Ba;c=x[a+4>>2];while(1){if((b|0)!=(c|0)){Lq(a);if((Ba|0)!=(d|0)){p()}c=c-4|0;continue}break}x[a+4>>2]=b}function ir(a,b,c){var d=0;d=ya-16|0;ya=d;v[d+15|0]=c;c=d+15|0;while(1){if(b){v[a|0]=y[c|0];b=b-1|0;a=a+1|0;continue}break}ya=d+16|0}function dj(a,b){var c=0;c=Ba;b=ej(b);if((Ba|0)!=(c|0)){p()}if(b){zg(a);if((Ba|0)!=(c|0)){p()}return}zg(a);if((Ba|0)!=(c|0)){p()}}function Xe(a){a=a|0;var b=0,c=0;b=Ba;x[a>>2]=16212;c=x[a+12>>2];if(c){zg(c);if((Ba|0)!=(b|0)){p()}}zg(a);if((Ba|0)!=(b|0)){p()}}function He(a){a=a|0;var b=0,c=0;b=Ba;x[a>>2]=15628;c=x[a+12>>2];if(c){zg(c);if((Ba|0)!=(b|0)){p()}}zg(a);if((Ba|0)!=(b|0)){p()}}function Fe(a){a=a|0;var b=0,c=0;b=Ba;x[a>>2]=15576;c=x[a+12>>2];if(c){zg(c);if((Ba|0)!=(b|0)){p()}}zg(a);if((Ba|0)!=(b|0)){p()}}function $o(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;while(1){if((b|0)!=(c|0)){x[d>>2]=v[b|0];d=d+4|0;b=b+1|0;continue}break}return c|0}function ip(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;while(1){if((b|0)!=(c|0)){v[d|0]=y[b|0];d=d+1|0;b=b+1|0;continue}break}return c|0}function Tq(a,b,c){var d=0;d=Ba;c=ya-16|0;ya=c;a:{if((a|0)==(b|0)){v[b+120|0]=0;break a}Cq(b);if((Ba|0)!=(d|0)){p()}}ya=c+16|0}function Ti(a,b,c){var d=0,e=0;e=Ba;d=ya-16|0;ya=d;x[d+12>>2]=b;x[d+8>>2]=c;Yi(a,d+12|0,d+8|0);if((Ba|0)!=(e|0)){p()}ya=d+16|0}function vi(a){var b=0,c=0;b=Ba;c=ti(a);if((Ba|0)!=(b|0)){p()}if(c){a=Ci(a);if((Ba|0)!=(b|0)){p()}a=a-1|0}else{a=10}return a}function cp(a){a=a|0;var b=0,c=0;c=Ba;x[a>>2]=39408;b=x[a+8>>2];if(!(!b|!y[a+12|0])){zg(b);if((Ba|0)!=(c|0)){p()}}return a|0}function ui(a){var b=0,c=0;b=Ba;c=ti(a);if((Ba|0)!=(b|0)){p()}if(c){return x[a+4>>2]}a=Di(a);if((Ba|0)!=(b|0)){p()}return a}function co(a){var b=0,c=0;b=Ba;c=ti(a);if((Ba|0)!=(b|0)){p()}if(c){a=Ci(a);if((Ba|0)!=(b|0)){p()}a=a-1|0}else{a=1}return a}function uk(a,b,c,d,e,f,g,h,i){x[a>>2]=b;x[a+4>>2]=c;x[a+8>>2]=d;x[a+12>>2]=e&65535|(i>>>16&32768|(e&2147418112)>>>16)<<16}function ye(a){a=a|0;var b=0,c=0;c=Ba;x[a>>2]=15396;b=x[a+4>>2];if(b){x[a+8>>2]=b;zg(b);if((Ba|0)!=(c|0)){p()}}return a|0}function pb(a){a=a|0;var b=0,c=0;c=Ba;b=x[a+8>>2];if((b|0)>=-1){nf(x[a+16>>2],0,((b|0)/2<<3)+8|0);if((Ba|0)!=(c|0)){p()}}}function Ne(a){a=a|0;var b=0,c=0;c=Ba;x[a>>2]=15872;b=x[a+4>>2];if(b){x[a+8>>2]=b;zg(b);if((Ba|0)!=(c|0)){p()}}return a|0}function jo(a,b){var c=0;c=ya-16|0;ya=c;x[c+12>>2]=x[a>>2];a=c+12|0;x[a>>2]=x[a>>2]+(b<<2);ya=c+16|0;return x[c+12>>2]}function bq(a){a=a|0;var b=0;b=Ba;a=53992;while(1){a=hr(a-12|0);if((Ba|0)!=(b|0)){p()}if((a|0)!=53968){continue}break}}function Zp(a){a=a|0;var b=0;b=Ba;a=53648;while(1){a=hr(a-12|0);if((Ba|0)!=(b|0)){p()}if((a|0)!=53360){continue}break}}function Wp(a){a=a|0;var b=0;b=Ba;a=53352;while(1){a=lr(a-12|0);if((Ba|0)!=(b|0)){p()}if((a|0)!=53184){continue}break}}function Up(a){a=a|0;var b=0;b=Ba;a=53176;while(1){a=hr(a-12|0);if((Ba|0)!=(b|0)){p()}if((a|0)!=53008){continue}break}}function $p(a){a=a|0;var b=0;b=Ba;a=53952;while(1){a=lr(a-12|0);if((Ba|0)!=(b|0)){p()}if((a|0)!=53664){continue}break}}function dq(a){a=a|0;var b=0;b=Ba;a=54024;while(1){a=lr(a-12|0);if((Ba|0)!=(b|0)){p()}if((a|0)!=54e3){continue}break}}function ac(){var a=0,b=0;a=Ba;b=nr(4);if((Ba|0)!=(a|0)){p()}x[b>>2]=33784;$(b|0,33824,17);if((Ba|0)!=(a|0)){p()}p()}function je(a,b){a=a|0;b=b|0;x[b>>2]=14492;x[b+4>>2]=x[a+4>>2];a=x[a+8>>2];x[b+8>>2]=a;if(a){x[a+4>>2]=x[a+4>>2]+1}}function ce(a,b){a=a|0;b=b|0;x[b>>2]=14140;x[b+4>>2]=x[a+4>>2];a=x[a+8>>2];x[b+8>>2]=a;if(a){x[a+4>>2]=x[a+4>>2]+1}}function Vd(a,b){a=a|0;b=b|0;x[b>>2]=13792;x[b+4>>2]=x[a+4>>2];a=x[a+8>>2];x[b+8>>2]=a;if(a){x[a+4>>2]=x[a+4>>2]+1}}function Xn(a,b){var c=0;c=ya-16|0;ya=c;x[c+12>>2]=x[a>>2];a=c+12|0;x[a>>2]=x[a>>2]+b;ya=c+16|0;return x[c+12>>2]}function Fq(a){var b=0,c=0;c=Ba;b=ya-16|0;ya=b;x[b+12>>2]=a;a=Hq(b+12|0);if((Ba|0)!=(c|0)){p()}ya=b+16|0;return a}function Sq(a){var b=0;b=Ba;Pq(a);if((Ba|0)!=(b|0)){p()}Co(a);if((Ba|0)!=(b|0)){p()}Pq(a);if((Ba|0)!=(b|0)){p()}}function rl(a){a:{a=x[a+4>>2]&74;if(a){if((a|0)==64){return 8}if((a|0)!=8){break a}return 16}return 0}return 10}function We(a){a=a|0;var b=0,c=0;c=Ba;x[a>>2]=16212;b=x[a+12>>2];if(b){zg(b);if((Ba|0)!=(c|0)){p()}}return a|0}function Ge(a){a=a|0;var b=0,c=0;c=Ba;x[a>>2]=15628;b=x[a+12>>2];if(b){zg(b);if((Ba|0)!=(c|0)){p()}}return a|0}function Ee(a){a=a|0;var b=0,c=0;c=Ba;x[a>>2]=15576;b=x[a+12>>2];if(b){zg(b);if((Ba|0)!=(c|0)){p()}}return a|0}function Cb(a){a=a|0;var b=0,c=0;c=Ba;x[a>>2]=12792;b=x[a+16>>2];if(b){zg(b);if((Ba|0)!=(c|0)){p()}}return a|0}function tm(a){var b=0,c=0;c=Ba;b=ya-16|0;ya=b;a=Ao(b+12|0,a);if((Ba|0)!=(c|0)){p()}ya=b+16|0;return x[a>>2]}function wj(a,b){var c=0;c=Ba;b=!x[a+24>>2]|b;x[a+16>>2]=b;if(b&x[a+20>>2]){Ji();if((Ba|0)!=(c|0)){p()}p()}}function fh(a,b){var c=0,d=0,e=0;d=Ba;c=ya-16|0;ya=c;e=Si(b,a);if((Ba|0)!=(d|0)){p()}ya=c+16|0;return e?b:a}function Zj(a,b){var c=0,d=0,e=0;d=Ba;c=ya-16|0;ya=c;e=Si(a,b);if((Ba|0)!=(d|0)){p()}ya=c+16|0;return e?b:a}function Hi(a,b){var c=0,d=0,e=0;d=Ba;c=ya-16|0;ya=c;e=pj(b,a);if((Ba|0)!=(d|0)){p()}ya=c+16|0;return e?b:a}function Bi(a,b){var c=0,d=0,e=0;d=Ba;c=ya-16|0;ya=c;e=pj(a,b);if((Ba|0)!=(d|0)){p()}ya=c+16|0;return e?b:a}function lp(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;x[e>>2]=c;x[h>>2]=f;return 3}function xp(a){a=a|0;var b=0;b=Ba;a=x[a+8>>2];if(!a){return 1}a=vp(a);if((Ba|0)!=(b|0)){p()}return a|0}function bh(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;b=Ba;ch(a,-1,-1);if((Ba|0)!=(b|0)){p()}}function _f(a,b){var c=0;b=b<<1|a>>>31;c=!(a<<1);a=b+2097152|0;return c&(a|0)==2097152|a>>>0<2097152}function Cj(a){if(!x[a+136>>2]){x[a+136>>2]=x[x[12204]>>2]?35168:35144}if(!x[a+72>>2]){x[a+72>>2]=1}}function To(a,b,c){a=a|0;b=b|0;c=c|0;if(c>>>0<=127){a=(x[(c<<2)+39456>>2]&b)!=0}else{a=0}return a|0}function Tk(a){var b=0,c=0;b=Ba;c=Lk(a);if((Ba|0)!=(b|0)){p()}if(c){zg(a);if((Ba|0)!=(b|0)){p()}}}function pm(a){var b=0;b=Ba;a=ri(a);if((Ba|0)!=(b|0)){p()}a=tm(a);if((Ba|0)!=(b|0)){p()}return a}function sf(a){var b=0,c=0;b=Ba;c=qf(a,12882297539194267e-247);if((Ba|0)!=(b|0)){p()}return c}function lj(a,b){x[a+8>>2]=x[a+8>>2]&-2147483648|b&2147483647;x[a+8>>2]=x[a+8>>2]|-2147483648}function uq(a){a=a|0;var b=0;b=Ba;a=vq(a);if((Ba|0)!=(b|0)){p()}zg(a);if((Ba|0)!=(b|0)){p()}}function jd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=Ba;kd(a,b,c,d);if((Ba|0)!=(e|0)){p()}}function Zq(a){var b=0,c=0;c=a;while(1){b=c;c=b+4|0;if(x[b>>2]){continue}break}return b-a>>2}function Yc(a){a=a|0;var b=0;b=Ba;a=Xc(a);if((Ba|0)!=(b|0)){p()}zg(a);if((Ba|0)!=(b|0)){p()}}function $c(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=Ba;ad(a,b,c,d);if((Ba|0)!=(e|0)){p()}}function tf(a){var b=0,c=0;b=Ba;c=qf(a,3105036184601418e216);if((Ba|0)!=(b|0)){p()}return c}function ri(a){var b=0,c=0;b=Ba;c=ti(a);if((Ba|0)!=(b|0)){p()}if(c){return x[a>>2]}return a}function Ta(a){a=a|0;var b=0;b=Ba;a=x[12126];if(a){x[12127]=a;zg(a);if((Ba|0)!=(b|0)){p()}}}function Ra(a){a=a|0;var b=0;b=Ba;a=x[12118];if(a){x[12119]=a;zg(a);if((Ba|0)!=(b|0)){p()}}}function Kg(a,b){var c=E(0),d=0;a=x[a>>2];c=B[a>>2];d=a;a=x[b>>2];B[d>>2]=B[a>>2];B[a>>2]=c}function Hp(a){a=a|0;var b=0;b=Ba;x[a>>2]=40576;hr(a+16|0);if((Ba|0)!=(b|0)){p()}return a|0}function Fp(a){a=a|0;var b=0;b=Ba;x[a>>2]=40536;hr(a+12|0);if((Ba|0)!=(b|0)){p()}return a|0}function op(a){a=a|0;var b=0;b=Ba;yo(a);if((Ba|0)!=(b|0)){p()}zg(a);if((Ba|0)!=(b|0)){p()}}function ji(a){var b=0;b=ya-16|0;ya=b;x[a>>2]=0;x[a+4>>2]=0;x[a+8>>2]=0;ya=b+16|0;return a}function ij(a){var b=0;if(a>>>0>=11){b=a+16&-16;a=b-1|0;a=(a|0)==11?b:a}else{a=10}return a}function dp(a){a=a|0;var b=0;b=Ba;cp(a);if((Ba|0)!=(b|0)){p()}zg(a);if((Ba|0)!=(b|0)){p()}}function Vk(a){var b=0;b=x[12204];if(a){x[12204]=(a|0)==-1?48688:a}return(b|0)==48688?-1:b}function Rr(a){a=a|0;var b=0;b=Ba;Qr(a);if((Ba|0)!=(b|0)){p()}zg(a);if((Ba|0)!=(b|0)){p()}}function Rb(a){a=a|0;var b=0;b=Ba;Qb(a);if((Ba|0)!=(b|0)){p()}zg(a);if((Ba|0)!=(b|0)){p()}}function Qk(a,b){var c=0;b=Ba;c=ig(a);if((Ba|0)!=(b|0)){p()}return(c|0)!=0|(a|32)-97>>>0<6}function Ip(a){a=a|0;var b=0;b=Ba;Hp(a);if((Ba|0)!=(b|0)){p()}zg(a);if((Ba|0)!=(b|0)){p()}}function Gp(a){a=a|0;var b=0;b=Ba;Fp(a);if((Ba|0)!=(b|0)){p()}zg(a);if((Ba|0)!=(b|0)){p()}}function Db(a){a=a|0;var b=0;b=Ba;Cb(a);if((Ba|0)!=(b|0)){p()}zg(a);if((Ba|0)!=(b|0)){p()}}function $q(a,b,c){var d=0;d=Ba;a=Wk(a,b,c,0,-2147483648);if((Ba|0)!=(d|0)){p()}return a}function vh(a,b,c){if((c|0)>=0){a=(x[x[a+8>>2]+((c&255)<<2)>>2]&b)!=0}else{a=0}return a}function gp(a,b){a=a|0;b=b|0;if((b|0)>=0){b=x[x[9448]+((b&255)<<2)>>2]}return b<<24>>24}function ep(a,b){a=a|0;b=b|0;if((b|0)>=0){b=x[x[9062]+((b&255)<<2)>>2]}return b<<24>>24}function Pq(a){var b=0,c=0;b=Ba;c=Nq(a);if((Ba|0)!=(b|0)){p()}return x[c>>2]-x[a>>2]>>2}function wg(a,b){var c=0;c=Ba;if(!a){return 0}a=vg(a,b);if((Ba|0)!=(c|0)){p()}return a}function pr(a,b,c){a=a|0;b=b|0;c=c|0;c=Ba;a=qr(a,b,0);if((Ba|0)!=(c|0)){p()}return a|0}function Oo(a,b){var c=0,d=0;c=Ba;d=a;a=x[b>>2];x[d>>2]=a;Io(a);if((Ba|0)!=(c|0)){p()}}function xq(a){var b=0;if(a>>>0>=2){b=a+4&-4;a=b-1|0;a=(a|0)==2?b:a}else{a=1}return a}function Gf(a){a=a|0;var b=0;b=Ba;a=qa(x[a+60>>2])|0;if((Ba|0)!=(b|0)){p()}return a|0}function dh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;b=Ba;ch(a,-1,-1);if((Ba|0)!=(b|0)){p()}}function Rl(a,b){var c=0;c=Ba;b=Vk(x[b>>2]);if((Ba|0)!=(c|0)){p()}x[a>>2]=b;return a}function Hq(a){var b=0;b=ya-16|0;ya=b;x[b+12>>2]=x[a>>2];ya=b+16|0;return x[b+12>>2]}function Eo(a){var b=0;b=Ba;Pq(a);if((Ba|0)!=(b|0)){p()}Co(a);if((Ba|0)!=(b|0)){p()}}function Bs(a,b,c,d){var e=0;e=Ba;wa(a|0,b|0,8,0,c|0,-1,d|0);if((Ba|0)!=(e|0)){p()}}function Lk(a){return(a|0)!=0&(a|0)!=35144&(a|0)!=35168&(a|0)!=52488&(a|0)!=52512}function ar(a,b,c){var d=0;d=Ba;a=Wk(a,b,c,-1,-1);if((Ba|0)!=(d|0)){p()}return a}function Pj(a){var b=0;b=Ba;a=_j(a);if((Ba|0)!=(b|0)){p()}x[a>>2]=34504;return a}function Nr(a){var b=0;b=Ba;a=er(a);if((Ba|0)!=(b|0)){p()}x[a>>2]=47060;return a}function Mj(a){var b=0;b=Ba;a=_j(a);if((Ba|0)!=(b|0)){p()}x[a>>2]=34228;return a}function wf(){var a=0;a=ya-16|0;x[a+8>>2]=0;x[a+12>>2]=1048576;return C[a+8>>3]}function qf(a,b){var c=0,d=0;c=Ba;d=rf(a?-b:b);if((Ba|0)!=(c|0)){p()}return d*b}function Oq(a,b){b=Ba;Pq(a);if((Ba|0)!=(b|0)){p()}Pq(a);if((Ba|0)!=(b|0)){p()}}function zi(a){var b=0,c=0;b=Ba;c=Bh(a,-1);if((Ba|0)!=(b|0)){p()}return c?0:a}function Zo(a,b){a=a|0;b=b|0;if(b>>>0<=127){b=x[x[9448]+(b<<2)>>2]}return b|0}function Xo(a,b){a=a|0;b=b|0;if(b>>>0<=127){b=x[x[9062]+(b<<2)>>2]}return b|0}function Eb(a){a=a|0;a=Ba;if(v[48635]<0){zg(x[12156]);if((Ba|0)!=(a|0)){p()}}}function nr(a){var b=0;b=Ba;a=yg(a+80|0);if((Ba|0)!=(b|0)){p()}return a+80|0}function ab(a){a=a|0;var b=0;b=Ba;x[a>>2]=12300;zg(a);if((Ba|0)!=(b|0)){p()}}function Wl(a,b){var c=0;c=Ba;a=ri(a);if((Ba|0)!=(c|0)){p()}return(b<<2)+a|0}function Ue(a){a=a|0;var b=0;b=Ba;x[a>>2]=16080;zg(a);if((Ba|0)!=(b|0)){p()}}function Re(a){a=a|0;var b=0;b=Ba;x[a>>2]=15940;zg(a);if((Ba|0)!=(b|0)){p()}}function Je(a){a=a|0;var b=0;b=Ba;x[a>>2]=15684;zg(a);if((Ba|0)!=(b|0)){p()}}function Js(a){var b=0;b=a&31;a=0-a&31;return(-1>>>b&-2)<>>a} +function $i(a,b,c){var d=0;d=Ba;if(c){mf(a,b,c<<2);if((Ba|0)!=(d|0)){p()}}}function Sl(a){var b=0;b=Ba;a=x[a>>2];if(a){Vk(a);if((Ba|0)!=(b|0)){p()}}}function nl(a,b){var c=0;c=Ba;a=ri(a);if((Ba|0)!=(c|0)){p()}return a+b|0}function xh(a,b){var c=0;c=Ba;wj(a,x[a+16>>2]|b);if((Ba|0)!=(c|0)){p()}}function mp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;x[e>>2]=c;return 3}function Zi(a,b,c){var d=0;d=Ba;if(c){mf(a,b,c);if((Ba|0)!=(d|0)){p()}}}function Uq(a){var b=0;b=Ba;a=Wq(a+12|0);if((Ba|0)!=(b|0)){p()}return a}function fj(a,b){var c=0;c=Ba;a=gj(a,b);if((Ba|0)!=(c|0)){p()}return a}function eo(a,b){var c=0;c=Ba;a=Bn(a,b);if((Ba|0)!=(c|0)){p()}return a}function bj(a,b){v[a+11|0]=y[a+11|0]&128|b&127;v[a+11|0]=y[a+11|0]&127}function _q(a){var b=0,c=0;b=Ba;c=Ol();if((Ba|0)!=(b|0)){p()}x[a>>2]=c}function Vi(a,b){var c=0;c=Ba;a=Wi(a,b);if((Ba|0)!=(c|0)){p()}return a}function Fn(a,b){a=a|0;b=b|0;v[a|0]=2;v[a+1|0]=3;v[a+2|0]=0;v[a+3|0]=4}function Cr(a,b,c){if(!(x[a+28>>2]==1|x[a+4>>2]!=(b|0))){x[a+28>>2]=c}}function Lg(a,b,c,d){var e=0;e=Ba;Sg(a,b,c,d);if((Ba|0)!=(e|0)){p()}}function Pf(){var a=0;a=Ba;ra(12147);if((Ba|0)!=(a|0)){p()}return 0}function Ik(a,b){return b?a<<24|(a&65280)<<8|(a>>>8&65280|a>>>24):a}function ol(a){var b=0;b=Ba;a=ui(a);if((Ba|0)!=(b|0)){p()}return!a}function ap(a,b,c){a=a|0;b=b|0;c=c|0;return(b>>>0<128?b:c)<<24>>24}function Qo(a){a=a|0;var b=0;b=x[13184]+1|0;x[13184]=b;x[a+4>>2]=b}function Gq(a){var b=0;b=Ba;a=Hq(a);if((Ba|0)!=(b|0)){p()}return a}function Eq(a){var b=0;b=Ba;a=Fq(a);if((Ba|0)!=(b|0)){p()}return a}function vj(a,b){var c=0;c=Ba;Oo(a,b+28|0);if((Ba|0)!=(c|0)){p()}}function ch(a,b,c){x[a+8>>2]=b;x[a+12>>2]=c;x[a>>2]=0;x[a+4>>2]=0}function Kh(a,b){x[a>>2]=x[(x[x[b>>2]-12>>2]+b|0)+24>>2];return a}function re(a,b){a=a|0;b=b|0;return(x[b+4>>2]==15148?a+12|0:0)|0}function qi(a,b){var c=0;c=Ba;Oo(a,b+4|0);if((Ba|0)!=(c|0)){p()}}function Xi(a,b,c){var d=0;d=Ba;Yi(a,b,c);if((Ba|0)!=(d|0)){p()}}function Og(a,b,c){var d=0;d=Ba;Ng(a,b,c);if((Ba|0)!=(d|0)){p()}}function Do(a){var b=0;b=Ba;Rq(a,x[a>>2]);if((Ba|0)!=(b|0)){p()}}function zo(a){x[a+4>>2]=0;x[a>>2]=46024;x[a>>2]=40864;return a}function le(a,b){a=a|0;b=b|0;return(x[b+4>>2]==14736?a+4|0:0)|0}function hg(a){if(a>>>0>=4294963201){x[12163]=0-a;a=-1}return a}function ee(a,b){a=a|0;b=b|0;return(x[b+4>>2]==14380?a+4|0:0)|0}function Zd(a,b){a=a|0;b=b|0;return(x[b+4>>2]==14028?a+4|0:0)|0}function cb(a){a=a|0;var b=0;b=Ba;zg(a);if((Ba|0)!=(b|0)){p()}}function Dn(a,b){a=a|0;b=b|0;b=Ba;ji(a);if((Ba|0)!=(b|0)){p()}}function rf(a){var b=0;b=ya-16|0;C[b+8>>3]=a;return C[b+8>>3]}function vf(a){var b=0;o(+a);b=j(1)|0;j(0)|0;return b>>>20|0}function Rg(a,b){var c=0;c=x[a>>2];x[a>>2]=x[b>>2];x[b>>2]=c}function Wf(a){var b=0;b=a;a=x[a>>2];x[b>>2]=a?a:1073741823}function Wb(a){a=a|0;a=x[a+4>>2];x[a+288>>2]=0;v[a+308|0]=0}function Lo(a){var b=0;b=a;a=x[a>>2]-1|0;x[b>>2]=a;return a}function Es(a){a=a|0;Ba=2;Ca=a;if(A[Ca>>2]>A[Ca+4>>2]){p()}}function Cs(a){a=a|0;Ba=1;Ca=a;if(A[Ca>>2]>A[Ca+4>>2]){p()}}function tq(a){a=a|0;a=Ba;lr(52980);if((Ba|0)!=(a|0)){p()}}function rq(a){a=a|0;a=Ba;hr(52964);if((Ba|0)!=(a|0)){p()}}function pq(a){a=a|0;a=Ba;lr(52948);if((Ba|0)!=(a|0)){p()}}function nq(a){a=a|0;a=Ba;hr(52932);if((Ba|0)!=(a|0)){p()}}function ni(a,b,c,d){x[a+16>>2]=d;x[a+12>>2]=c;x[a+8>>2]=b}function lq(a){a=a|0;a=Ba;lr(52916);if((Ba|0)!=(a|0)){p()}}function jq(a){a=a|0;a=Ba;hr(52900);if((Ba|0)!=(a|0)){p()}}function jp(a,b,c){a=a|0;b=b|0;c=c|0;return((b|0)<0?c:b)|0}function hq(a){a=a|0;a=Ba;lr(52884);if((Ba|0)!=(a|0)){p()}}function fq(a){a=a|0;a=Ba;hr(52868);if((Ba|0)!=(a|0)){p()}}function fg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Da=0;return 0}function aj(a){var b=0;b=Ba;dj(a,1);if((Ba|0)!=(b|0)){p()}}function Cq(a){var b=0;b=Ba;dj(a,4);if((Ba|0)!=(b|0)){p()}}function oi(a,b,c){x[a+28>>2]=c;x[a+20>>2]=b;x[a+24>>2]=b}function nj(){var a=0;a=Ba;Ji();if((Ba|0)!=(a|0)){p()}p()}function Ji(){var a=0;a=Ba;ba();if((Ba|0)!=(a|0)){p()}p()}function Qg(a,b){var c=0;c=y[a|0];v[a|0]=y[b|0];v[b|0]=c}function Bq(a){var b=0;b=Ba;Cq(a);if((Ba|0)!=(b|0)){p()}}function Yi(a,b,c){x[a>>2]=x[b>>2];x[a+4>>2]=x[c>>2]}function Xf(a){var b=0;b=x[a>>2];x[a>>2]=0;return b}function Gs(a){if(a){return 31-G(a-1^a)|0}return 32}function ug(a){if(!a){return 0}x[12163]=a;return-1}function ah(a,b,c){a=a|0;b=b|0;c=c|0;return a|0}function Yr(a){a=a|0;a=ya-a&-16;ya=a;return a|0}function Ds(){Ba=0;if(A[Ca>>2]>A[Ca+4>>2]){p()}}function vo(a,b,c){a=a|0;b=b|0;c=c|0;return-1}function Te(a){a=a|0;x[a>>2]=16080;return a|0}function Qe(a){a=a|0;x[a>>2]=15940;return a|0}function Ie(a){a=a|0;x[a>>2]=15684;return a|0}function $a(a){a=a|0;x[a>>2]=12300;return a|0}function ue(a){a=a|0;return x[a+28>>2]-1|0}function Co(a){return x[a+4>>2]-x[a>>2]>>2}function Ci(a){return x[a+8>>2]&2147483647}function zj(a,b){x[a>>2]=x[b>>2];return a}function nb(a,b){a=a|0;b=b|0;x[a+60>>2]=b}function rm(a,b){return x[a>>2]!=x[b>>2]}function pi(a,b){x[a+24>>2]=x[a+24>>2]+b}function nk(a){return(a|0)==32|a-9>>>0<5}function Nk(a){return a-65>>>0<26?a|32:a}function Mk(a){return a-97>>>0<26?a&95:a}function Io(a){a=a+4|0;x[a>>2]=x[a>>2]+1}function Ho(a,b){return x[a>>2]+(b<<2)|0}function pj(a,b){return A[a>>2]>2]}function Tg(a,b){a=a|0;b=b|0;return b|0}function Si(a,b){return x[a>>2]>2]}function Oj(a){x[a+4>>2]=x[a+4>>2]|8192}function Jg(a,b){return B[a>>2]>2]}function li(a){a=a|0;return x[a+12>>2]}function Vc(a){a=a|0;return x[a+16>>2]}function Gn(a){a=a|0;return 2147483647}function ti(a){return y[a+11|0]>>>7|0}function ki(a){a=a|0;return x[a+8>>2]}function kh(a,b){a=a|0;b=b|0;return-1}function ib(a,b){a=a|0;b=b|0;return 0}function er(a){x[a>>2]=47100;return a}function _j(a){x[a>>2]=35040;return a}function _c(a){a=a|0;return x[a+4>>2]}function Wq(a){a=a|0;return x[a+4>>2]}function Kp(a){a=a|0;return v[a+9|0]}function Jp(a){a=a|0;return v[a+8|0]}function jl(a,b){return(b-a|0)/12|0}function Di(a){return y[a+11|0]&127}function Bh(a,b){return(a|0)==(b|0)}function Ao(a,b){x[a>>2]=b;return a}function xf(a){C[(ya-16|0)+8>>3]=a}function Wi(a,b){return(b-a|0)+a|0}function Sr(){Aa=10540368;za=54608}function xr(a,b){return x[a+b>>2]}function me(a){a=a|0;return 14832}function ig(a){return a-48>>>0<10}function fe(a){a=a|0;return 14476}function _d(a){a=a|0;return 14124}function Xq(a){return x[a>>2]-4|0}function Rc(a){a=a|0;return 12219}function Jq(a){x[a>>2]=0;return a}function sm(a){x[a>>2]=x[a>>2]+1}function qh(a){return!x[a+16>>2]}function bo(a,b){x[a>>2]=x[b>>2]}function Yq(a){x[a>>2]=x[a>>2]-4}function Wg(a){a=a|0;return 5566}function Uc(a){a=a|0;return 5844}function Tc(a){a=a|0;return 5535}function Sc(a){a=a|0;return 5069}function Pr(a){a=a|0;return 6273}function Or(a){a=a|0;return 9565}function Nm(a){x[a>>2]=x[a>>2]+4}function Mr(a){a=a|0;return 4691}function hb(a){a=a|0;return a|0}function Hf(a){a=a-a;return a/a}function Cn(a){a=a|0;return 127}function hj(a){return a>>>0<11}function cj(a,b){v[a|0]=y[b|0]}function Bn(a,b){return b-a>>2}function zf(a){a=a|0;return 1}function wq(a){return a>>>0<2}function hh(a){a=a|0;return-1}function gj(a,b){return b-a|0}function ej(a){return a>>>0>8}function Zc(a){a=a|0;return 2}function Qf(a){a=a|0;return 0}function Qc(a){a=a|0;return 1}function Mh(a){return!x[a>>2]}function Jj(a,b){x[a+72>>2]=b}function Bp(a){a=a|0;return 4}function mj(a,b){x[a+4>>2]=b}function Vq(a){return a+12|0}function Ug(a,b){a=a|0;b=b|0}function Tr(){return ya-za|0}function Lq(a){return a+16|0}function jh(a){return a&255}function On(a){return a+4|0}function Nq(a){return a+8|0}function Km(a){x[a+12>>2]=0}function of(){return 48652}function kj(a,b){x[a>>2]=b}function Xr(a){a=a|0;ya=a}function Wr(){return ya|0}function Vr(){return za|0}function Ur(){return Aa|0}function Fs(){return Ba|0}function br(a){a=a|0;p()}function Qq(a){x[a>>2]=0}function qb(a){a=a|0} +// EMSCRIPTEN_END_FUNCS +e=y;var Ea=c([null,hb,Qr,Qa,Ra,Sa,Ta,$a,ab,bb,ib,cb,db,fb,gb,hb,cb,hb,Eb,lb,mb,jb,rb,ub,xb,Qc,ob,Rc,nb,hb,cb,kb,wb,zb,qb,Sc,cb,Ab,Bb,qb,Tc,Cb,Db,tb,vb,yb,pb,Uc,Qb,Rb,Sb,Tb,Vc,Wc,Wb,bc,dc,Xc,Yc,Zc,_c,qb,qb,$c,bd,cd,dd,ed,gd,hd,id,jd,ld,md,nd,od,qd,rd,sd,ud,wd,Zc,_c,xd,zd,Ad,Bd,Cd,Dd,Ed,Fd,Gd,Hd,Id,Jd,Ld,Md,Nd,Od,Qd,Rd,Sd,Td,Ud,Vd,Wd,Xd,Yd,Zd,_d,$d,ae,be,ce,Wd,Xd,de,ee,fe,ge,he,ie,je,Wd,Xd,ke,le,me,ne,oe,pe,cb,hb,cb,qe,re,cb,se,te,ue,ve,we,xe,ye,ze,qc,Ce,rc,De,Ee,Fe,Ge,He,Ie,Je,Ke,cb,Le,Me,Ne,Oe,Qe,Re,Se,cb,Te,Ue,Ve,cb,We,Xe,Ze,Gf,Ef,Df,Qf,fg,sg,tg,cb,Wg,Zg,_g,Ug,ah,bh,dh,Qf,Qf,eh,hh,ih,kh,lh,kh,mh,oh,nh,ph,Dh,Fh,Eh,Gh,Vh,Wh,Ug,ah,bh,dh,Qf,Qf,Yh,hh,_h,kh,$h,kh,mh,oh,nh,ph,Dh,Fh,Eh,Gh,Li,Mi,Ei,Ni,xi,yi,Ai,Xg,Yg,Xg,Yg,Oi,Pi,Qi,Ri,xj,Yg,Ff,qb,Rj,Sj,Tj,Uj,Wj,Xj,Sj,$j,ak,bk,ck,dk,ek,fk,hk,ik,dk,kk,ak,lk,mk,Gk,Pk,zg,qb,Qo,So,Up,Wp,Zp,$p,bq,dq,fq,hq,jq,lq,nq,pq,rq,tq,Ko,Mo,Ro,cp,dp,ep,fp,gp,hp,Tg,ip,jp,kp,yo,op,pp,rp,tp,up,Qf,wp,xp,Fp,Gp,Jp,Kp,Lp,Np,Qp,Hp,Ip,ki,li,Mp,Op,Rp,hb,cb,cb,To,Uo,Vo,Wo,Xo,Yo,Zo,_o,Tg,$o,ap,bp,cb,lp,lp,mp,zf,zf,np,zf,cb,yp,zp,mp,Qf,Qf,Ap,Bp,cb,yp,zp,mp,Qf,Qf,Ap,Bp,cb,Cp,Dp,mp,Qf,Qf,Ep,Bp,cb,Cp,Dp,mp,Qf,Qf,Ep,Bp,hb,cb,Yk,Zk,_k,hb,cb,$k,al,cl,cb,dl,ql,wl,yl,Al,Al,Cl,El,Il,Kl,Ml,cb,Tl,Xl,$l,am,bm,bm,cm,dm,gm,hm,im,cb,om,um,Am,Bm,Cm,Dm,Hm,Im,cb,Lm,Om,Rm,Sm,Tm,Um,Wm,Xm,hb,cb,Zc,bn,cn,dn,fn,hn,ln,Tp,Yp,aq,mq,qq,eq,iq,hb,cb,Zc,on,pn,qn,sn,un,xn,Vp,_p,cq,oq,sq,gq,kq,vq,uq,yn,vq,uq,An,cb,Cn,Cn,Dn,Dn,Dn,En,Qf,Fn,Fn,cb,Cn,Cn,Dn,Dn,Dn,En,Qf,Fn,Fn,cb,Gn,Gn,Dn,Dn,Dn,Hn,Qf,Fn,Fn,cb,Gn,Gn,Dn,Dn,Dn,Hn,Qf,Fn,Fn,cb,Jn,Pn,cb,Zn,ao,cb,ko,po,cb,qo,uo,cb,vo,wo,Ug,cb,vo,xo,Ug,br,or,hb,cb,qb,qb,pr,cb,pr,cb,rr,Kr,Hr,ur,cb,Jr,Gr,vr,cb,Ir,Dr,yr,cb,zr,cb,Or,cb,Pr,cb,Mr,Rr,Wq,Rr,Rr]);function Fa(){return u.byteLength/65536|0}function Ka(La){La=La|0;var Ga=Fa()|0;var Ha=Ga+La|0;if(Ga=10485760,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+INITIAL_MEMORY+"! (STACK_SIZE="+10485760+")");if(Module["wasmMemory"]){wasmMemory=Module["wasmMemory"]}else{wasmMemory=new WebAssembly.Memory({"initial":INITIAL_MEMORY/65536,"maximum":2147483648/65536})}updateMemoryViews();INITIAL_MEMORY=wasmMemory.buffer.byteLength;assert(INITIAL_MEMORY%65536===0);function writeStackCookie(){var max=_emscripten_stack_get_end();assert((max&3)==0);if(max==0){max+=4}HEAPU32[max>>2]=34821223;HEAPU32[max+4>>2]=2310721022;HEAPU32[0>>2]=1668509029}function checkStackCookie(){if(ABORT)return;var max=_emscripten_stack_get_end();if(max==0){max+=4}var cookie1=HEAPU32[max>>2];var cookie2=HEAPU32[max+4>>2];if(cookie1!=34821223||cookie2!=2310721022){abort(`Stack overflow! Stack cookie has been overwritten at ${ptrToString(max)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${ptrToString(cookie2)} ${ptrToString(cookie1)}`)}if(HEAPU32[0>>2]!=1668509029){abort("Runtime error: The application has corrupted its heap memory area (address zero)!")}}(function(){var h16=new Int16Array(1);var h8=new Int8Array(h16.buffer);h16[0]=25459;if(h8[0]!==115||h8[1]!==99)throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"})();var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){assert(!runtimeInitialized);runtimeInitialized=true;checkStackCookie();if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;TTY.init();callRuntimeCallbacks(__ATINIT__)}function preMain(){checkStackCookie();callRuntimeCallbacks(__ATMAIN__)}function postRun(){checkStackCookie();if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}assert(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");assert(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");assert(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");assert(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;var runDependencyTracking={};function getUniqueRunDependency(id){var orig=id;while(1){if(!runDependencyTracking[id])return id;id=orig+Math.random()}}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(id){assert(!runDependencyTracking[id]);runDependencyTracking[id]=1;if(runDependencyWatcher===null&&typeof setInterval!="undefined"){runDependencyWatcher=setInterval(()=>{if(ABORT){clearInterval(runDependencyWatcher);runDependencyWatcher=null;return}var shown=false;for(var dep in runDependencyTracking){if(!shown){shown=true;err("still waiting on run dependencies:")}err(`dependency: ${dep}`)}if(shown){err("(end of list)")}},1e4)}}else{err("warning: run dependency added without ID")}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(id){assert(runDependencyTracking[id]);delete runDependencyTracking[id]}else{err("warning: run dependency removed without ID")}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;if(what.indexOf("RuntimeError: unreachable")>=0){what+='. "unreachable" may be due to ASYNCIFY_STACK_SIZE not being large enough (try increasing it)'}var e=new WebAssembly.RuntimeError(what);throw e}var dataURIPrefix="data:application/octet-stream;base64,";var isDataURI=filename=>filename.startsWith(dataURIPrefix);var isFileURI=filename=>filename.startsWith("file://");function createExportWrapper(name){return function(){assert(runtimeInitialized,`native function \`${name}\` called before runtime initialization`);var f=wasmExports[name];assert(f,`exported native function \`${name}\` not found`);return f.apply(null,arguments)}}var wasmBinaryFile;wasmBinaryFile="RubberBand.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(binaryFile){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(binaryFile)){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{if(!response["ok"]){throw"failed to load wasm binary file at '"+binaryFile+"'"}return response["arrayBuffer"]()}).catch(()=>getBinarySync(binaryFile))}else if(readAsync){return new Promise((resolve,reject)=>{readAsync(binaryFile,response=>resolve(new Uint8Array(response)),reject)})}}return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(instance=>instance).then(receiver,reason=>{err(`failed to asynchronously prepare wasm: ${reason}`);if(isFileURI(wasmBinaryFile)){err(`warning: Loading from a file URI (${wasmBinaryFile}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`)}abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{var result=WebAssembly.instantiateStreaming(response,imports);return result.then(callback,function(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(binaryFile,imports,callback)})})}return instantiateArrayBuffer(binaryFile,imports,callback)}function createWasm(){var info={"env":wasmImports,"wasi_snapshot_preview1":wasmImports};function receiveInstance(instance,module){wasmExports=instance.exports;wasmExports=Asyncify.instrumentWasmExports(wasmExports);runMemoryInitializer();addOnInit(wasmExports["__wasm_call_ctors"]);removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");var trueModule=Module;function receiveInstantiationResult(result){assert(Module===trueModule,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?");trueModule=null;receiveInstance(result["instance"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);return false}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult);return{}}var tempDouble;var tempI64;function legacyModuleProp(prop,newName,incomming=true){if(!Object.getOwnPropertyDescriptor(Module,prop)){Object.defineProperty(Module,prop,{configurable:true,get(){let extra=incomming?" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)":"";abort(`\`Module.${prop}\` has been replaced by \`${newName}\``+extra)}})}}function ignoredModuleProp(prop){if(Object.getOwnPropertyDescriptor(Module,prop)){abort(`\`Module.${prop}\` was supplied but \`${prop}\` not included in INCOMING_MODULE_JS_API`)}}function isExportedByForceFilesystem(name){return name==="FS_createPath"||name==="FS_createDataFile"||name==="FS_createPreloadedFile"||name==="FS_unlink"||name==="addRunDependency"||name==="FS_createLazyFile"||name==="FS_createDevice"||name==="removeRunDependency"}function missingGlobal(sym,msg){if(typeof globalThis!=="undefined"){Object.defineProperty(globalThis,sym,{configurable:true,get(){warnOnce(`\`${sym}\` is not longer defined by emscripten. ${msg}`);return undefined}})}}missingGlobal("buffer","Please use HEAP8.buffer or wasmMemory.buffer");missingGlobal("asm","Please use wasmExports instead");function missingLibrarySymbol(sym){if(typeof globalThis!=="undefined"&&!Object.getOwnPropertyDescriptor(globalThis,sym)){Object.defineProperty(globalThis,sym,{configurable:true,get(){var msg=`\`${sym}\` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line`;var librarySymbol=sym;if(!librarySymbol.startsWith("_")){librarySymbol="$"+sym}msg+=` (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='${librarySymbol}')`;if(isExportedByForceFilesystem(sym)){msg+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"}warnOnce(msg);return undefined}})}unexportedRuntimeSymbol(sym)}function unexportedRuntimeSymbol(sym){if(!Object.getOwnPropertyDescriptor(Module,sym)){Object.defineProperty(Module,sym,{configurable:true,get(){var msg=`'${sym}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;if(isExportedByForceFilesystem(sym)){msg+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"}abort(msg)}})}}var memoryInitializer="RubberBand.js.mem";function runMemoryInitializer(){if(!isDataURI(memoryInitializer)){memoryInitializer=locateFile(memoryInitializer)}if(ENVIRONMENT_IS_NODE||ENVIRONMENT_IS_SHELL){var data=readBinary(memoryInitializer);HEAPU8.set(data,1024)}else{addRunDependency("memory initializer");var applyMemoryInitializer=data=>{if(data.byteLength)data=new Uint8Array(data);for(var i=0;i{readAsync(memoryInitializer,applyMemoryInitializer,()=>{var e=new Error("could not load memory initializer "+memoryInitializer);throw e})};if(Module["memoryInitializerRequest"]){var useRequest=()=>{var request=Module["memoryInitializerRequest"];var response=request.response;if(request.status!==200&&request.status!==0){console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+request.status+", retrying "+memoryInitializer);doBrowserLoad();return}applyMemoryInitializer(response)};if(Module["memoryInitializerRequest"].response){setTimeout(useRequest,0)}else{Module["memoryInitializerRequest"].addEventListener("load",useRequest)}}else{doBrowserLoad()}}}var ASM_CONSTS={47962:()=>{console.log("RubberBand | START")},47996:()=>{console.log("RubberBand | INIT COMPLETE")},48038:()=>{console.log("RubberBand | LOOP BEGIN")},48077:()=>{console.log("RubberBand | DONE STRETCHING")},48121:($0,$1,$2)=>{let input=Emval.toValue($0);postMessage([Module.audioDataArrayToBlob(input,$1),$2])},48215:$0=>{console.log("RubberBand | "+Emval.toValue($0))},48264:($0,$1)=>{console.log("RubberBand | "+Emval.toValue($0)+" | "+Emval.toValue($1))},48341:($0,$1,$2)=>{console.log("RubberBand | "+Emval.toValue($0)+" | "+Emval.toValue($1)+" | "+Emval.toValue($2))}};function get_channel_from_buffer(index){return Emval.toHandle(global_audio_buffer[Emval.toValue(index)])}var global_audio_buffer={};function ExitStatus(status){this.name="ExitStatus";this.message=`Program terminated with exit(${status})`;this.status=status}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var noExitRuntime=Module["noExitRuntime"]||true;var ptrToString=ptr=>{assert(typeof ptr==="number");ptr>>>=0;return"0x"+ptr.toString(16).padStart(8,"0")};var warnOnce=text=>{if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;if(ENVIRONMENT_IS_NODE)text="warning: "+text;err(text)}};var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;var UTF8ArrayToString=(heapOrArray,idx,maxBytesToRead)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead)=>{assert(typeof ptr=="number",`UTF8ToString expects a number (got ${typeof ptr})`);return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""};var ___assert_fail=(condition,filename,line,func)=>{abort(`Assertion failed: ${UTF8ToString(condition)}, at: `+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])};function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){HEAPU32[this.ptr+4>>2]=type};this.get_type=function(){return HEAPU32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAPU32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAPU32[this.ptr+8>>2]};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor)};this.set_adjusted_ptr=function(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return HEAPU32[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}var exceptionLast=0;var uncaughtExceptionCount=0;var ___cxa_throw=(ptr,type,destructor)=>{var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;assert(false,"Exception thrown, but exception catching is not enabled. Compile with -sNO_DISABLE_EXCEPTION_CATCHING or -sEXCEPTION_CATCHING_ALLOWED=[..] to catch.")};var __embind_register_bigint=(primitiveType,name,size,minRange,maxRange)=>{};var embind_init_charCodes=()=>{var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes};var embind_charCodes;var readLatin1String=ptr=>{var ret="";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret};var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var BindingError;var throwBindingError=message=>{throw new BindingError(message)};var InternalError;var throwInternalError=message=>{throw new InternalError(message)};function sharedRegisterType(rawType,registeredInstance,options={}){var name=registeredInstance.name;if(!rawType){throwBindingError(`type "${name}" must have a positive integer typeid pointer`)}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(`Cannot register type '${name}' twice`)}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function registerType(rawType,registeredInstance,options={}){if(!("argPackAdvance"in registeredInstance)){throw new TypeError("registerType registeredInstance requires argPackAdvance")}return sharedRegisterType(rawType,registeredInstance,options)}var GenericWireTypeSize=8;var __embind_register_bool=(rawType,name,trueValue,falseValue)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(wt){return!!wt},"toWireType":function(destructors,o){return o?trueValue:falseValue},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":function(pointer){return this["fromWireType"](HEAPU8[pointer])},destructorFunction:null})};function handleAllocatorInit(){Object.assign(HandleAllocator.prototype,{get(id){assert(this.allocated[id]!==undefined,`invalid handle: ${id}`);return this.allocated[id]},has(id){return this.allocated[id]!==undefined},allocate(handle){var id=this.freelist.pop()||this.allocated.length;this.allocated[id]=handle;return id},free(id){assert(this.allocated[id]!==undefined);this.allocated[id]=undefined;this.freelist.push(id)}})}function HandleAllocator(){this.allocated=[undefined];this.freelist=[]}var emval_handles=new HandleAllocator;var __emval_decref=handle=>{if(handle>=emval_handles.reserved&&0===--emval_handles.get(handle).refcount){emval_handles.free(handle)}};var count_emval_handles=()=>{var count=0;for(var i=emval_handles.reserved;i{emval_handles.allocated.push({value:undefined},{value:null},{value:true},{value:false});emval_handles.reserved=emval_handles.allocated.length;Module["count_emval_handles"]=count_emval_handles};var Emval={toValue:handle=>{if(!handle){throwBindingError("Cannot use deleted val. handle = "+handle)}return emval_handles.get(handle).value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{return emval_handles.allocate({refcount:1,value:value})}}}};function simpleReadValueFromPointer(pointer){return this["fromWireType"](HEAP32[pointer>>2])}var __embind_register_emval=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":handle=>{var rv=Emval.toValue(handle);__emval_decref(handle);return rv},"toWireType":(destructors,value)=>Emval.toHandle(value),"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:null})};var embindRepr=v=>{if(v===null){return"null"}var t=typeof v;if(t==="object"||t==="array"||t==="function"){return v.toString()}else{return""+v}};var floatReadValueFromPointer=(name,width)=>{switch(width){case 4:return function(pointer){return this["fromWireType"](HEAPF32[pointer>>2])};case 8:return function(pointer){return this["fromWireType"](HEAPF64[pointer>>3])};default:throw new TypeError(`invalid float width (${width}): ${name}`)}};var __embind_register_float=(rawType,name,size)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":value=>value,"toWireType":(destructors,value)=>{if(typeof value!="number"&&typeof value!="boolean"){throw new TypeError(`Cannot convert ${embindRepr(value)} to ${this.name}`)}return value},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":floatReadValueFromPointer(name,size),destructorFunction:null})};var integerReadValueFromPointer=(name,width,signed)=>{switch(width){case 1:return signed?pointer=>HEAP8[pointer>>0]:pointer=>HEAPU8[pointer>>0];case 2:return signed?pointer=>HEAP16[pointer>>1]:pointer=>HEAPU16[pointer>>1];case 4:return signed?pointer=>HEAP32[pointer>>2]:pointer=>HEAPU32[pointer>>2];default:throw new TypeError(`invalid integer width (${width}): ${name}`)}};var __embind_register_integer=(primitiveType,name,size,minRange,maxRange)=>{name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<>>bitshift}var isUnsignedType=name.includes("unsigned");var checkAssertions=(value,toTypeName)=>{if(typeof value!="number"&&typeof value!="boolean"){throw new TypeError(`Cannot convert "${embindRepr(value)}" to ${toTypeName}`)}if(valuemaxRange){throw new TypeError(`Passing a number "${embindRepr(value)}" from JS side to C/C++ side to an argument of type "${name}", which is outside the valid range [${minRange}, ${maxRange}]!`)}};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":toWireType,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":integerReadValueFromPointer(name,size,minRange!==0),destructorFunction:null})};var __embind_register_memory_view=(rawType,dataTypeIndex,name)=>{var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){var size=HEAPU32[handle>>2];var data=HEAPU32[handle+4>>2];return new TA(HEAP8.buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})};function readPointer(pointer){return this["fromWireType"](HEAPU32[pointer>>2])}var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{assert(typeof str==="string",`stringToUTF8Array expects a string (got ${typeof str})`);if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;if(u>1114111)warnOnce("Invalid Unicode code point "+ptrToString(u)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF).");heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>{assert(typeof maxBytesToWrite=="number","stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)};var lengthBytesUTF8=str=>{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var __embind_register_std_string=(rawType,name)=>{name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType"(value){var length=HEAPU32[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+i]=charCode}}else{for(var i=0;i{assert(ptr%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr));var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{assert(outPtr%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!");assert(typeof maxBytesToWrite=="number","stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead)=>{assert(ptr%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{assert(outPtr%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!");assert(typeof maxBytesToWrite=="number","stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len};var __embind_register_std_wstring=(rawType,charSize,name)=>{name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=()=>HEAPU16;shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>HEAPU32;shift=2}registerType(rawType,{name:name,"fromWireType":value=>{var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},"toWireType":(destructors,value)=>{if(!(typeof value=="string")){throwBindingError(`Cannot pass non-string to C++ string type ${name}`)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction(ptr){_free(ptr)}})};var __embind_register_void=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":()=>undefined,"toWireType":(destructors,o)=>undefined})};var getTypeName=type=>{var ptr=___getTypeName(type);var rv=readLatin1String(ptr);_free(ptr);return rv};var requireRegisteredType=(rawType,humanName)=>{var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(humanName+" has unknown type "+getTypeName(rawType))}return impl};var emval_returnValue=(returnType,destructorsRef,handle)=>{var destructors=[];var result=returnType["toWireType"](destructors,handle);if(destructors.length){HEAPU32[destructorsRef>>2]=Emval.toHandle(destructors)}return result};var __emval_as=(handle,returnType,destructorsRef)=>{handle=Emval.toValue(handle);returnType=requireRegisteredType(returnType,"emval::as");return emval_returnValue(returnType,destructorsRef,handle)};var emval_methodCallers=[];var __emval_call=(caller,handle,destructorsRef,args)=>{caller=emval_methodCallers[caller];handle=Emval.toValue(handle);return caller(null,handle,destructorsRef,args)};var emval_symbols={};var getStringOrSymbol=address=>{var symbol=emval_symbols[address];if(symbol===undefined){return readLatin1String(address)}return symbol};var __emval_call_method=(caller,objHandle,methodName,destructorsRef,args)=>{caller=emval_methodCallers[caller];objHandle=Emval.toValue(objHandle);methodName=getStringOrSymbol(methodName);return caller(objHandle,objHandle[methodName],destructorsRef,args)};var emval_addMethodCaller=caller=>{var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id};var emval_lookupTypes=(argCount,argTypes)=>{var a=new Array(argCount);for(var i=0;i>2],"parameter "+i)}return a};var createNamedFunction=(name,body)=>Object.defineProperty(body,"name",{value:name});var reflectConstruct=Reflect.construct;function newFunc(constructor,argumentList){if(!(constructor instanceof Function)){throw new TypeError(`new_ called with constructor type ${typeof constructor} which is not a function`)}var dummy=createNamedFunction(constructor.name||"unknownFunctionName",function(){});dummy.prototype=constructor.prototype;var obj=new dummy;var r=constructor.apply(obj,argumentList);return r instanceof Object?r:obj}var __emval_get_method_caller=(argCount,argTypes,kind)=>{var types=emval_lookupTypes(argCount,argTypes);var retType=types.shift();argCount--;var functionBody=`return function (obj, func, destructorsRef, args) {\n`;var offset=0;var argsList=[];if(kind===0){argsList.push("obj")}var params=["retType"];var args=[retType];for(var i=0;it.name).join(", ")}) => ${retType.name}>`;return emval_addMethodCaller(createNamedFunction(functionName,invokerFunction))};var __emval_get_module_property=name=>{name=getStringOrSymbol(name);return Emval.toHandle(Module[name])};var __emval_get_property=(handle,key)=>{handle=Emval.toValue(handle);key=Emval.toValue(key);return Emval.toHandle(handle[key])};var __emval_incref=handle=>{if(handle>4){emval_handles.get(handle).refcount+=1}};var __emval_new_array=()=>Emval.toHandle([]);var __emval_new_array_from_memory_view=view=>{view=Emval.toValue(view);var a=new Array(view.length);for(var i=0;iEmval.toHandle(getStringOrSymbol(v));var runDestructors=destructors=>{while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}};var __emval_run_destructors=handle=>{var destructors=Emval.toValue(handle);runDestructors(destructors);__emval_decref(handle)};var __emval_take_value=(type,arg)=>{type=requireRegisteredType(type,"_emval_take_value");var v=type["readValueFromPointer"](arg);return Emval.toHandle(v)};var _abort=()=>{abort("native code called abort()")};var readEmAsmArgsArray=[];var readEmAsmArgs=(sigPtr,buf)=>{assert(Array.isArray(readEmAsmArgsArray));assert(buf%16==0);readEmAsmArgsArray.length=0;var ch;while(ch=HEAPU8[sigPtr++]){var chr=String.fromCharCode(ch);var validChars=["d","f","i","p"];assert(validChars.includes(chr),`Invalid character ${ch}("${chr}") in readEmAsmArgs! Use only [${validChars}], and do not specify "v" for void return argument.`);var wide=ch!=105;wide&=ch!=112;buf+=wide&&buf%8?4:0;readEmAsmArgsArray.push(ch==112?HEAPU32[buf>>2]:ch==105?HEAP32[buf>>2]:HEAPF64[buf>>3]);buf+=wide?8:4}return readEmAsmArgsArray};var runEmAsmFunction=(code,sigPtr,argbuf)=>{var args=readEmAsmArgs(sigPtr,argbuf);assert(ASM_CONSTS.hasOwnProperty(code),`No EM_ASM constant found at address ${code}. The loaded WebAssembly file is likely out of sync with the generated JavaScript.`);return ASM_CONSTS[code].apply(null,args)};var _emscripten_asm_const_int=(code,sigPtr,argbuf)=>runEmAsmFunction(code,sigPtr,argbuf);var _emscripten_date_now=()=>Date.now();var _emscripten_err=str=>err(UTF8ToString(str));var _emscripten_memcpy_js=(dest,src,num)=>HEAPU8.copyWithin(dest,src,src+num);var getHeapMax=()=>2147483648;var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){err(`growMemory: Attempted to grow heap from ${b.byteLength} bytes to ${size} bytes, but got error: ${e}`)}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;assert(requestedSize>oldSize);var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){err(`Cannot enlarge memory, requested ${requestedSize} bytes, but the limit is ${maxHeapSize} bytes!`);return false}var alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){err("Warning: Enlarging memory arrays, this is not fast! "+[oldSize,newSize]);return true}}err(`Failed to grow the heap from ${oldSize} bytes to ${newSize} bytes, not enough memory!`);return false};var ENV={};var getExecutableName=()=>thisProgram||"./this.program";var getEnvStrings=()=>{if(!getEnvStrings.strings){var lang=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(`${x}=${env[x]}`)}getEnvStrings.strings=strings}return getEnvStrings.strings};var stringToAscii=(str,buffer)=>{for(var i=0;i>0]=str.charCodeAt(i)}HEAP8[buffer>>0]=0};var PATH={isAbs:path=>path.charAt(0)==="/",splitPath:filename=>{var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:(parts,allowAboveRoot)=>{var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:path=>{var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(p=>!!p),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:path=>{var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:path=>{if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},join:function(){var paths=Array.prototype.slice.call(arguments);return PATH.normalize(paths.join("/"))},join2:(l,r)=>PATH.normalize(l+"/"+r)};var initRandomFill=()=>{if(typeof crypto=="object"&&typeof crypto["getRandomValues"]=="function"){return view=>crypto.getRandomValues(view)}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require("crypto");var randomFillSync=crypto_module["randomFillSync"];if(randomFillSync){return view=>crypto_module["randomFillSync"](view)}var randomBytes=crypto_module["randomBytes"];return view=>(view.set(randomBytes(view.byteLength)),view)}catch(e){}}abort("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")};var randomFill=view=>(randomFill=initRandomFill())(view);var PATH_FS={resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path)}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(p=>!!p),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:(from,to)=>{from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var FS_stdin_getChar=()=>{if(!FS_stdin_getChar_buffer.length){var result=null;if(ENVIRONMENT_IS_NODE){var BUFSIZE=256;var buf=Buffer.alloc(BUFSIZE);var bytesRead=0;var fd=process.stdin.fd;try{bytesRead=fs.readSync(fd,buf)}catch(e){if(e.toString().includes("EOF"))bytesRead=0;else throw e}if(bytesRead>0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}FS_stdin_getChar_buffer=intArrayFromString(result,true)}return FS_stdin_getChar_buffer.shift()};var TTY={ttys:[],init(){},shutdown(){},register(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close(stream){stream.tty.ops.fsync(stream.tty)},fsync(stream){stream.tty.ops.fsync(stream.tty)},read(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60)}var bytesRead=0;for(var i=0;i0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}},ioctl_tcgets(tty){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(tty,optional_actions,data){return 0},ioctl_tiocgwinsz(tty){return[24,80]}},default_tty1_ops:{put_char(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};var mmapAlloc=size=>{abort("internal error: mmapAlloc called but `emscripten_builtin_memalign` native symbol not exported")};var MEMFS={ops_table:null,mount(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents)},expandFileStorage(node,newCapacity){var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0)},resizeFileStorage(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize}},node_ops:{getattr(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup(parent,name){throw FS.genericErrors[44]},mknod(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir},unlink(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries},symlink(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);assert(size>=0);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+length{var dep=!noRunDep?getUniqueRunDependency(`al ${url}`):"";readAsync(url,arrayBuffer=>{assert(arrayBuffer,`Loading data file "${url}" failed (no arrayBuffer).`);onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},event=>{if(onerror){onerror()}else{throw`Loading data file "${url}" failed.`}});if(dep)addRunDependency(dep)};var FS_createDataFile=(parent,name,fileData,canRead,canWrite,canOwn)=>{FS.createDataFile(parent,name,fileData,canRead,canWrite,canOwn)};var preloadPlugins=Module["preloadPlugins"]||[];var FS_handledByPreloadPlugin=(byteArray,fullname,finish,onerror)=>{if(typeof Browser!="undefined")Browser.init();var handled=false;preloadPlugins.forEach(plugin=>{if(handled)return;if(plugin["canHandle"](fullname)){plugin["handle"](byteArray,fullname,finish,onerror);handled=true}});return handled};var FS_createPreloadedFile=(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish)=>{var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency(`cp ${fullname}`);function processData(byteArray){function finish(byteArray){if(preFinish)preFinish();if(!dontCreateFile){FS_createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}if(FS_handledByPreloadPlugin(byteArray,fullname,finish,()=>{if(onerror)onerror();removeRunDependency(dep)})){return}finish(byteArray)}addRunDependency(dep);if(typeof url=="string"){asyncLoad(url,byteArray=>processData(byteArray),onerror)}else{processData(url)}};var FS_modeStringToFlags=str=>{var flagModes={"r":0,"r+":2,"w":512|64|1,"w+":512|64|2,"a":1024|64|1,"a+":1024|64|2};var flags=flagModes[str];if(typeof flags=="undefined"){throw new Error(`Unknown file open mode: ${str}`)}return flags};var FS_getMode=(canRead,canWrite)=>{var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode};var IDBFS={dbs:{},indexedDB:()=>{if(typeof indexedDB!="undefined")return indexedDB;var ret=null;if(typeof window=="object")ret=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB;assert(ret,"IDBFS used, but indexedDB not supported");return ret},DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(mount){return MEMFS.mount.apply(null,arguments)},syncfs:(mount,populate,callback)=>{IDBFS.getLocalSet(mount,(err,local)=>{if(err)return callback(err);IDBFS.getRemoteSet(mount,(err,remote)=>{if(err)return callback(err);var src=populate?remote:local;var dst=populate?local:remote;IDBFS.reconcile(src,dst,callback)})})},quit:()=>{Object.values(IDBFS.dbs).forEach(value=>value.close());IDBFS.dbs={}},getDB:(name,callback)=>{var db=IDBFS.dbs[name];if(db){return callback(null,db)}var req;try{req=IDBFS.indexedDB().open(name,IDBFS.DB_VERSION)}catch(e){return callback(e)}if(!req){return callback("Unable to connect to IndexedDB")}req.onupgradeneeded=e=>{var db=e.target.result;var transaction=e.target.transaction;var fileStore;if(db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)){fileStore=transaction.objectStore(IDBFS.DB_STORE_NAME)}else{fileStore=db.createObjectStore(IDBFS.DB_STORE_NAME)}if(!fileStore.indexNames.contains("timestamp")){fileStore.createIndex("timestamp","timestamp",{unique:false})}};req.onsuccess=()=>{db=req.result;IDBFS.dbs[name]=db;callback(null,db)};req.onerror=e=>{callback(e.target.error);e.preventDefault()}},getLocalSet:(mount,callback)=>{var entries={};function isRealDir(p){return p!=="."&&p!==".."}function toAbsolute(root){return p=>PATH.join2(root,p)}var check=FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint));while(check.length){var path=check.pop();var stat;try{stat=FS.stat(path)}catch(e){return callback(e)}if(FS.isDir(stat.mode)){check.push.apply(check,FS.readdir(path).filter(isRealDir).map(toAbsolute(path)))}entries[path]={"timestamp":stat.mtime}}return callback(null,{type:"local",entries:entries})},getRemoteSet:(mount,callback)=>{var entries={};IDBFS.getDB(mount.mountpoint,(err,db)=>{if(err)return callback(err);try{var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readonly");transaction.onerror=e=>{callback(e.target.error);e.preventDefault()};var store=transaction.objectStore(IDBFS.DB_STORE_NAME);var index=store.index("timestamp");index.openKeyCursor().onsuccess=event=>{var cursor=event.target.result;if(!cursor){return callback(null,{type:"remote",db:db,entries:entries})}entries[cursor.primaryKey]={"timestamp":cursor.key};cursor.continue()}}catch(e){return callback(e)}})},loadLocalEntry:(path,callback)=>{var stat,node;try{var lookup=FS.lookupPath(path);node=lookup.node;stat=FS.stat(path)}catch(e){return callback(e)}if(FS.isDir(stat.mode)){return callback(null,{"timestamp":stat.mtime,"mode":stat.mode})}else if(FS.isFile(stat.mode)){node.contents=MEMFS.getFileDataAsTypedArray(node);return callback(null,{"timestamp":stat.mtime,"mode":stat.mode,"contents":node.contents})}else{return callback(new Error("node type not supported"))}},storeLocalEntry:(path,entry,callback)=>{try{if(FS.isDir(entry["mode"])){FS.mkdirTree(path,entry["mode"])}else if(FS.isFile(entry["mode"])){FS.writeFile(path,entry["contents"],{canOwn:true})}else{return callback(new Error("node type not supported"))}FS.chmod(path,entry["mode"]);FS.utime(path,entry["timestamp"],entry["timestamp"])}catch(e){return callback(e)}callback(null)},removeLocalEntry:(path,callback)=>{try{var stat=FS.stat(path);if(FS.isDir(stat.mode)){FS.rmdir(path)}else if(FS.isFile(stat.mode)){FS.unlink(path)}}catch(e){return callback(e)}callback(null)},loadRemoteEntry:(store,path,callback)=>{var req=store.get(path);req.onsuccess=event=>callback(null,event.target.result);req.onerror=e=>{callback(e.target.error);e.preventDefault()}},storeRemoteEntry:(store,path,entry,callback)=>{try{var req=store.put(entry,path)}catch(e){callback(e);return}req.onsuccess=event=>callback();req.onerror=e=>{callback(e.target.error);e.preventDefault()}},removeRemoteEntry:(store,path,callback)=>{var req=store.delete(path);req.onsuccess=event=>callback();req.onerror=e=>{callback(e.target.error);e.preventDefault()}},reconcile:(src,dst,callback)=>{var total=0;var create=[];Object.keys(src.entries).forEach(function(key){var e=src.entries[key];var e2=dst.entries[key];if(!e2||e["timestamp"].getTime()!=e2["timestamp"].getTime()){create.push(key);total++}});var remove=[];Object.keys(dst.entries).forEach(function(key){if(!src.entries[key]){remove.push(key);total++}});if(!total){return callback(null)}var errored=false;var db=src.type==="remote"?src.db:dst.db;var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readwrite");var store=transaction.objectStore(IDBFS.DB_STORE_NAME);function done(err){if(err&&!errored){errored=true;return callback(err)}}transaction.onerror=e=>{done(this.error);e.preventDefault()};transaction.oncomplete=e=>{if(!errored){callback(null)}};create.sort().forEach(path=>{if(dst.type==="local"){IDBFS.loadRemoteEntry(store,path,(err,entry)=>{if(err)return done(err);IDBFS.storeLocalEntry(path,entry,done)})}else{IDBFS.loadLocalEntry(path,(err,entry)=>{if(err)return done(err);IDBFS.storeRemoteEntry(store,path,entry,done)})}});remove.sort().reverse().forEach(path=>{if(dst.type==="local"){IDBFS.removeLocalEntry(path,done)}else{IDBFS.removeRemoteEntry(store,path,done)}})}};var ERRNO_MESSAGES={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"};var ERRNO_CODES={"EPERM":63,"ENOENT":44,"ESRCH":71,"EINTR":27,"EIO":29,"ENXIO":60,"E2BIG":1,"ENOEXEC":45,"EBADF":8,"ECHILD":12,"EAGAIN":6,"EWOULDBLOCK":6,"ENOMEM":48,"EACCES":2,"EFAULT":21,"ENOTBLK":105,"EBUSY":10,"EEXIST":20,"EXDEV":75,"ENODEV":43,"ENOTDIR":54,"EISDIR":31,"EINVAL":28,"ENFILE":41,"EMFILE":33,"ENOTTY":59,"ETXTBSY":74,"EFBIG":22,"ENOSPC":51,"ESPIPE":70,"EROFS":69,"EMLINK":34,"EPIPE":64,"EDOM":18,"ERANGE":68,"ENOMSG":49,"EIDRM":24,"ECHRNG":106,"EL2NSYNC":156,"EL3HLT":107,"EL3RST":108,"ELNRNG":109,"EUNATCH":110,"ENOCSI":111,"EL2HLT":112,"EDEADLK":16,"ENOLCK":46,"EBADE":113,"EBADR":114,"EXFULL":115,"ENOANO":104,"EBADRQC":103,"EBADSLT":102,"EDEADLOCK":16,"EBFONT":101,"ENOSTR":100,"ENODATA":116,"ETIME":117,"ENOSR":118,"ENONET":119,"ENOPKG":120,"EREMOTE":121,"ENOLINK":47,"EADV":122,"ESRMNT":123,"ECOMM":124,"EPROTO":65,"EMULTIHOP":36,"EDOTDOT":125,"EBADMSG":9,"ENOTUNIQ":126,"EBADFD":127,"EREMCHG":128,"ELIBACC":129,"ELIBBAD":130,"ELIBSCN":131,"ELIBMAX":132,"ELIBEXEC":133,"ENOSYS":52,"ENOTEMPTY":55,"ENAMETOOLONG":37,"ELOOP":32,"EOPNOTSUPP":138,"EPFNOSUPPORT":139,"ECONNRESET":15,"ENOBUFS":42,"EAFNOSUPPORT":5,"EPROTOTYPE":67,"ENOTSOCK":57,"ENOPROTOOPT":50,"ESHUTDOWN":140,"ECONNREFUSED":14,"EADDRINUSE":3,"ECONNABORTED":13,"ENETUNREACH":40,"ENETDOWN":38,"ETIMEDOUT":73,"EHOSTDOWN":142,"EHOSTUNREACH":23,"EINPROGRESS":26,"EALREADY":7,"EDESTADDRREQ":17,"EMSGSIZE":35,"EPROTONOSUPPORT":66,"ESOCKTNOSUPPORT":137,"EADDRNOTAVAIL":4,"ENETRESET":39,"EISCONN":30,"ENOTCONN":53,"ETOOMANYREFS":141,"EUSERS":136,"EDQUOT":19,"ESTALE":72,"ENOTSUP":138,"ENOMEDIUM":148,"EILSEQ":25,"EOVERFLOW":61,"ECANCELED":11,"ENOTRECOVERABLE":56,"EOWNERDEAD":62,"ESTRPIPE":135};var demangle=func=>{warnOnce("warning: build with -sDEMANGLE_SUPPORT to link in libcxxabi demangling");return func};var demangleAll=text=>{var regex=/\b_Z[\w\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+" ["+x+"]"})};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(path,opts={}){path=PATH_FS.resolve(path);if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};opts=Object.assign(defaults,opts);if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=path.split("/").filter(p=>!!p);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?`${mount}/${path}`:mount+path}path=path?`${node.name}/${path}`:node.name;node=node.parent}},hashName(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode(parent,name,mode,rdev){assert(typeof parent=="object");var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode(node){FS.hashRemoveNode(node)},isRoot(node){return node===node.parent},isMountpoint(node){return!!node.mounted},isFile(mode){return(mode&61440)===32768},isDir(mode){return(mode&61440)===16384},isLink(mode){return(mode&61440)===40960},isChrdev(mode){return(mode&61440)===8192},isBlkdev(mode){return(mode&61440)===24576},isFIFO(mode){return(mode&61440)===4096},isSocket(mode){return(mode&49152)===49152},flagsToPermissionString(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions(node,perms){if(FS.ignorePermissions){return 0}if(perms.includes("r")&&!(node.mode&292)){return 2}else if(perms.includes("w")&&!(node.mode&146)){return 2}else if(perms.includes("x")&&!(node.mode&73)){return 2}return 0},mayLookup(dir){var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate(dir,name){try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen(node,flags){if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd(){for(var fd=0;fd<=FS.MAX_OPEN_FDS;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStreamChecked(fd){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}return stream},getStream:fd=>FS.streams[fd],createStream(stream,fd=-1){if(!FS.FSStream){FS.FSStream=function(){this.shared={}};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get(){return this.node},set(val){this.node=val}},isRead:{get(){return(this.flags&2097155)!==1}},isWrite:{get(){return(this.flags&2097155)!==0}},isAppend:{get(){return this.flags&1024}},flags:{get(){return this.shared.flags},set(val){this.shared.flags=val}},position:{get(){return this.shared.position},set(val){this.shared.position=val}}})}stream=Object.assign(new FS.FSStream,stream);if(fd==-1){fd=FS.nextfd()}stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream(fd){FS.streams[fd]=null},chrdev_stream_ops:{open(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek(){throw new FS.ErrnoError(70)}},major:dev=>dev>>8,minor:dev=>dev&255,makedev:(ma,mi)=>ma<<8|mi,registerDevice(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:dev=>FS.devices[dev],getMounts(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs(populate,callback){if(typeof populate=="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err(`warning: ${FS.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`)}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){assert(FS.syncFSRequests>0);FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(mount=>{if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount(type,opts,mountpoint){if(typeof type=="string"){throw type}var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(hash=>{var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);assert(idx!==-1);node.mount.mounts.splice(idx,1)},lookup(parent,name){return parent.node_ops.lookup(parent,name)},mknod(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree(path,mode){var dirs=path.split("/");var d="";for(var i=0;i=0);if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.read){throw new FS.ErrnoError(28)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead},write(stream,buffer,offset,length,position,canOwn){assert(offset>=0);if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.write){throw new FS.ErrnoError(28)}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;return bytesWritten},allocate(stream,offset,length){if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(offset<0||length<=0){throw new FS.ErrnoError(28)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(stream.node.mode)){throw new FS.ErrnoError(43)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(138)}stream.stream_ops.allocate(stream,offset,length)},mmap(stream,length,position,prot,flags){if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43)}return stream.stream_ops.mmap(stream,length,position,prot,flags)},msync(stream,buffer,offset,length,mmapFlags){assert(offset>=0);if(!stream.stream_ops.msync){return 0}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags)},munmap:stream=>0,ioctl(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile(path,opts={}){opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error(`Invalid encoding type "${opts.encoding}"`)}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding==="binary"){ret=buf}FS.close(stream);return ret},writeFile(path,data,opts={}){opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data=="string"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error("Unsupported data type")}FS.close(stream)},cwd:()=>FS.currentPath,chdir(path){var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44)}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54)}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode)}FS.currentPath=lookup.path},createDefaultDirectories(){FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")},createDefaultDevices(){FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(stream,buffer,offset,length,pos)=>length});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var randomBuffer=new Uint8Array(1024),randomLeft=0;var randomByte=()=>{if(randomLeft===0){randomLeft=randomFill(randomBuffer).byteLength}return randomBuffer[--randomLeft]};FS.createDevice("/dev","random",randomByte);FS.createDevice("/dev","urandom",randomByte);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")},createSpecialDirectories(){FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount(){var node=FS.createNode(proc_self,"fd",16384|511,73);node.node_ops={lookup(parent,name){var fd=+name;var stream=FS.getStreamChecked(fd);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>stream.path}};ret.parent=ret;return ret}};return node}},{},"/proc/self/fd")},createStandardStreams(){if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"])}else{FS.symlink("/dev/tty","/dev/stdin")}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"])}else{FS.symlink("/dev/tty","/dev/stdout")}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"])}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin",0);var stdout=FS.open("/dev/stdout",1);var stderr=FS.open("/dev/stderr",1);assert(stdin.fd===0,`invalid handle for stdin (${stdin.fd})`);assert(stdout.fd===1,`invalid handle for stdout (${stdout.fd})`);assert(stderr.fd===2,`invalid handle for stderr (${stderr.fd})`)},ensureErrnoError(){if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.name="ErrnoError";this.node=node;this.setErrno=function(errno){this.errno=errno;for(var key in ERRNO_CODES){if(ERRNO_CODES[key]===errno){this.code=key;break}}};this.setErrno(errno);this.message=ERRNO_MESSAGES[errno];if(this.stack){Object.defineProperty(this,"stack",{value:(new Error).stack,writable:true});this.stack=demangleAll(this.stack)}};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(code=>{FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""})},staticInit(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS,"IDBFS":IDBFS}},init(input,output,error){assert(!FS.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()},quit(){FS.init.initialized=false;_fflush(0);for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(from,to)=>{if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}return intArrayFromString(xhr.responseText||"",true)};var lazyArray=this;lazyArray.setDataGetter(chunkNum=>{var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]=="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(key=>{var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);assert(size>=0);if(contents.slice){for(var i=0;i{FS.forceLoadFile(node);return writeChunks(stream,buffer,offset,length,position)};stream_ops.mmap=(stream,length,position,prot,flags)=>{FS.forceLoadFile(node);var ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}writeChunks(stream,HEAP8,ptr,length,position);return{ptr:ptr,allocated:true}};node.stream_ops=stream_ops;return node},absolutePath(){abort("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder(){abort("FS.createFolder has been removed; use FS.mkdir instead")},createLink(){abort("FS.createLink has been removed; use FS.symlink instead")},joinPath(){abort("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc(){abort("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath(){abort("FS.standardizePath has been removed; use PATH.normalize instead")}};var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt(dirfd,path,allowEmpty){if(PATH.isAbs(path)){return path}var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=SYSCALLS.getStreamFromFD(dirfd);dir=dirstream.path}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44)}return dir}return PATH.join2(dir,path)},doStat(func,path,buf){try{var stat=func(path)}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54}throw e}HEAP32[buf>>2]=stat.dev;HEAP32[buf+4>>2]=stat.mode;HEAPU32[buf+8>>2]=stat.nlink;HEAP32[buf+12>>2]=stat.uid;HEAP32[buf+16>>2]=stat.gid;HEAP32[buf+20>>2]=stat.rdev;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+24>>2]=tempI64[0],HEAP32[buf+28>>2]=tempI64[1];HEAP32[buf+32>>2]=4096;HEAP32[buf+36>>2]=stat.blocks;var atime=stat.atime.getTime();var mtime=stat.mtime.getTime();var ctime=stat.ctime.getTime();tempI64=[Math.floor(atime/1e3)>>>0,(tempDouble=Math.floor(atime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAPU32[buf+48>>2]=atime%1e3*1e3;tempI64=[Math.floor(mtime/1e3)>>>0,(tempDouble=Math.floor(mtime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+56>>2]=tempI64[0],HEAP32[buf+60>>2]=tempI64[1];HEAPU32[buf+64>>2]=mtime%1e3*1e3;tempI64=[Math.floor(ctime/1e3)>>>0,(tempDouble=Math.floor(ctime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+72>>2]=tempI64[0],HEAP32[buf+76>>2]=tempI64[1];HEAPU32[buf+80>>2]=ctime%1e3*1e3;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+88>>2]=tempI64[0],HEAP32[buf+92>>2]=tempI64[1];return 0},doMsync(addr,stream,len,flags,offset){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(flags&2){return 0}var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},varargs:undefined,get(){assert(SYSCALLS.varargs!=undefined);var ret=HEAP32[+SYSCALLS.varargs>>2];SYSCALLS.varargs+=4;return ret},getp(){return SYSCALLS.get()},getStr(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD(fd){var stream=FS.getStreamChecked(fd);return stream}};var _environ_get=(__environ,environ_buf)=>{var bufSize=0;getEnvStrings().forEach((string,i)=>{var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>2]=ptr;stringToAscii(string,ptr);bufSize+=string.length+1});return 0};var _environ_sizes_get=(penviron_count,penviron_buf_size)=>{var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(string=>bufSize+=string.length+1);HEAPU32[penviron_buf_size>>2]=bufSize;return 0};function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var doReadv=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var convertI32PairToI53Checked=(lo,hi)=>{assert(lo==lo>>>0||lo==(lo|0));assert(hi===(hi|0));return hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN};function _fd_seek(fd,offset_low,offset_high,whence,newOffset){var offset=convertI32PairToI53Checked(offset_low,offset_high);try{if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var doWritev=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(typeof offset!=="undefined"){offset+=curr}}return ret};function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var isLeapYear=year=>year%4===0&&(year%100!==0||year%400===0);var arraySum=(array,index)=>{var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum};var MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];var addDays=(date,days)=>{var newDate=new Date(date.getTime());while(days>0){var leap=isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate};var writeArrayToMemory=(array,buffer)=>{assert(array.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)");HEAP8.set(array,buffer)};var _strftime=(s,maxsize,format,tm)=>{var tm_zone=HEAPU32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):""};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value=="number"?value.toString():value||"";while(str.length0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}return thisDate.getFullYear()}return thisDate.getFullYear()-1}var EXPANSION_RULES_2={"%a":date=>WEEKDAYS[date.tm_wday].substring(0,3),"%A":date=>WEEKDAYS[date.tm_wday],"%b":date=>MONTHS[date.tm_mon].substring(0,3),"%B":date=>MONTHS[date.tm_mon],"%C":date=>{var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},"%d":date=>leadingNulls(date.tm_mday,2),"%e":date=>leadingSomething(date.tm_mday,2," "),"%g":date=>getWeekBasedYear(date).toString().substring(2),"%G":date=>getWeekBasedYear(date),"%H":date=>leadingNulls(date.tm_hour,2),"%I":date=>{var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},"%j":date=>leadingNulls(date.tm_mday+arraySum(isLeapYear(date.tm_year+1900)?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR,date.tm_mon-1),3),"%m":date=>leadingNulls(date.tm_mon+1,2),"%M":date=>leadingNulls(date.tm_min,2),"%n":()=>"\n","%p":date=>{if(date.tm_hour>=0&&date.tm_hour<12){return"AM"}return"PM"},"%S":date=>leadingNulls(date.tm_sec,2),"%t":()=>"\t","%u":date=>date.tm_wday||7,"%U":date=>{var days=date.tm_yday+7-date.tm_wday;return leadingNulls(Math.floor(days/7),2)},"%V":date=>{var val=Math.floor((date.tm_yday+7-(date.tm_wday+6)%7)/7);if((date.tm_wday+371-date.tm_yday-2)%7<=2){val++}if(!val){val=52;var dec31=(date.tm_wday+7-date.tm_yday-1)%7;if(dec31==4||dec31==5&&isLeapYear(date.tm_year%400-1)){val++}}else if(val==53){var jan1=(date.tm_wday+371-date.tm_yday)%7;if(jan1!=4&&(jan1!=3||!isLeapYear(date.tm_year)))val=1}return leadingNulls(val,2)},"%w":date=>date.tm_wday,"%W":date=>{var days=date.tm_yday+7-(date.tm_wday+6)%7;return leadingNulls(Math.floor(days/7),2)},"%y":date=>(date.tm_year+1900).toString().substring(2),"%Y":date=>date.tm_year+1900,"%z":date=>{var off=date.tm_gmtoff;var ahead=off>=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)},"%Z":date=>date.tm_zone,"%%":()=>"%"};pattern=pattern.replace(/%%/g,"\0\0");for(var rule in EXPANSION_RULES_2){if(pattern.includes(rule)){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}pattern=pattern.replace(/\0\0/g,"%");var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1};var _strftime_l=(s,maxsize,format,tm,loc)=>_strftime(s,maxsize,format,tm);var runtimeKeepaliveCounter=0;var keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0;var _proc_exit=code=>{EXITSTATUS=code;if(!keepRuntimeAlive()){if(Module["onExit"])Module["onExit"](code);ABORT=true}quit_(code,new ExitStatus(code))};var exitJS=(status,implicit)=>{EXITSTATUS=status;checkUnflushedContent();if(keepRuntimeAlive()&&!implicit){var msg=`program exited (with status: ${status}), but keepRuntimeAlive() is set (counter=${runtimeKeepaliveCounter}) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)`;err(msg)}_proc_exit(status)};var handleException=e=>{if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}checkStackCookie();if(e instanceof WebAssembly.RuntimeError){if(_emscripten_stack_get_current()<=0){err("Stack overflow detected. You can try increasing -sSTACK_SIZE (currently set to 10485760)")}}quit_(1,e)};var runAndAbortIfError=func=>{try{return func()}catch(e){abort(e)}};var _exit=exitJS;var maybeExit=()=>{if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(ABORT){err("user callback triggered after runtime exited or application aborted. Ignoring.");return}try{func();maybeExit()}catch(e){handleException(e)}};var Asyncify={instrumentWasmImports(imports){var importPattern=/^(invoke_.*|__asyncjs__.*)$/;for(var x in imports){(function(x){var original=imports[x];var sig=original.sig;if(typeof original=="function"){var isAsyncifyImport=original.isAsync||importPattern.test(x);imports[x]=function(){var originalAsyncifyState=Asyncify.state;try{return original.apply(null,arguments)}finally{var changedToDisabled=originalAsyncifyState===Asyncify.State.Normal&&Asyncify.state===Asyncify.State.Disabled;var ignoredInvoke=x.startsWith("invoke_")&&true;if(Asyncify.state!==originalAsyncifyState&&!isAsyncifyImport&&!changedToDisabled&&!ignoredInvoke){throw new Error(`import ${x} was not in ASYNCIFY_IMPORTS, but changed the state`)}}}}})(x)}},instrumentWasmExports(exports){var ret={};for(var x in exports){(function(x){var original=exports[x];if(typeof original=="function"){ret[x]=function(){Asyncify.exportCallStack.push(x);try{return original.apply(null,arguments)}finally{if(!ABORT){var y=Asyncify.exportCallStack.pop();assert(y===x);Asyncify.maybeStopUnwind()}}}}else{ret[x]=original}})(x)}return ret},State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId(funcName){var id=Asyncify.callStackNameToId[funcName];if(id===undefined){id=Asyncify.callStackId++;Asyncify.callStackNameToId[funcName]=id;Asyncify.callStackIdToName[id]=funcName}return id},maybeStopUnwind(){if(Asyncify.currData&&Asyncify.state===Asyncify.State.Unwinding&&Asyncify.exportCallStack.length===0){Asyncify.state=Asyncify.State.Normal;runAndAbortIfError(_asyncify_stop_unwind);if(typeof Fibers!="undefined"){Fibers.trampoline()}}},whenDone(){assert(Asyncify.currData,"Tried to wait for an async operation when none is in progress.");assert(!Asyncify.asyncPromiseHandlers,"Cannot have multiple async operations in flight at once");return new Promise((resolve,reject)=>{Asyncify.asyncPromiseHandlers={resolve:resolve,reject:reject}})},allocateData(){var ptr=_malloc(12+Asyncify.StackSize);Asyncify.setDataHeader(ptr,ptr+12,Asyncify.StackSize);Asyncify.setDataRewindFunc(ptr);return ptr},setDataHeader(ptr,stack,stackSize){HEAPU32[ptr>>2]=stack;HEAPU32[ptr+4>>2]=stack+stackSize},setDataRewindFunc(ptr){var bottomOfCallStack=Asyncify.exportCallStack[0];var rewindId=Asyncify.getCallStackId(bottomOfCallStack);HEAP32[ptr+8>>2]=rewindId},getDataRewindFunc(ptr){var id=HEAP32[ptr+8>>2];var name=Asyncify.callStackIdToName[id];var func=wasmExports[name];return func},doRewind(ptr){var start=Asyncify.getDataRewindFunc(ptr);return start()},handleSleep(startAsync){assert(Asyncify.state!==Asyncify.State.Disabled,"Asyncify cannot be done during or after the runtime exits");if(ABORT)return;if(Asyncify.state===Asyncify.State.Normal){var reachedCallback=false;var reachedAfterCallback=false;startAsync((handleSleepReturnValue=0)=>{assert(!handleSleepReturnValue||typeof handleSleepReturnValue=="number"||typeof handleSleepReturnValue=="boolean");if(ABORT)return;Asyncify.handleSleepReturnValue=handleSleepReturnValue;reachedCallback=true;if(!reachedAfterCallback){return}assert(!Asyncify.exportCallStack.length,"Waking up (starting to rewind) must be done from JS, without compiled code on the stack.");Asyncify.state=Asyncify.State.Rewinding;runAndAbortIfError(()=>_asyncify_start_rewind(Asyncify.currData));if(typeof Browser!="undefined"&&Browser.mainLoop.func){Browser.mainLoop.resume()}var asyncWasmReturnValue,isError=false;try{asyncWasmReturnValue=Asyncify.doRewind(Asyncify.currData)}catch(err){asyncWasmReturnValue=err;isError=true}var handled=false;if(!Asyncify.currData){var asyncPromiseHandlers=Asyncify.asyncPromiseHandlers;if(asyncPromiseHandlers){Asyncify.asyncPromiseHandlers=null;(isError?asyncPromiseHandlers.reject:asyncPromiseHandlers.resolve)(asyncWasmReturnValue);handled=true}}if(isError&&!handled){throw asyncWasmReturnValue}});reachedAfterCallback=true;if(!reachedCallback){Asyncify.state=Asyncify.State.Unwinding;Asyncify.currData=Asyncify.allocateData();if(typeof Browser!="undefined"&&Browser.mainLoop.func){Browser.mainLoop.pause()}runAndAbortIfError(()=>_asyncify_start_unwind(Asyncify.currData))}}else if(Asyncify.state===Asyncify.State.Rewinding){Asyncify.state=Asyncify.State.Normal;runAndAbortIfError(_asyncify_stop_rewind);_free(Asyncify.currData);Asyncify.currData=null;Asyncify.sleepCallbacks.forEach(func=>callUserCallback(func))}else{abort(`invalid state: ${Asyncify.state}`)}return Asyncify.handleSleepReturnValue},handleAsync(startAsync){return Asyncify.handleSleep(wakeUp=>{startAsync().then(wakeUp)})}};var stringToNewUTF8=str=>{var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8(str,ret,size);return ret};var allocateUTF8=stringToNewUTF8;embind_init_charCodes();BindingError=Module["BindingError"]=class BindingError extends Error{constructor(message){super(message);this.name="BindingError"}};InternalError=Module["InternalError"]=class InternalError extends Error{constructor(message){super(message);this.name="InternalError"}};handleAllocatorInit();init_emval();var FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.createPreloadedFile=FS_createPreloadedFile;FS.staticInit();function checkIncomingModuleAPI(){ignoredModuleProp("fetchSettings")}var wasmImports={__assert_fail:___assert_fail,__cxa_throw:___cxa_throw,_embind_register_bigint:__embind_register_bigint,_embind_register_bool:__embind_register_bool,_embind_register_emval:__embind_register_emval,_embind_register_float:__embind_register_float,_embind_register_integer:__embind_register_integer,_embind_register_memory_view:__embind_register_memory_view,_embind_register_std_string:__embind_register_std_string,_embind_register_std_wstring:__embind_register_std_wstring,_embind_register_void:__embind_register_void,_emval_as:__emval_as,_emval_call:__emval_call,_emval_call_method:__emval_call_method,_emval_decref:__emval_decref,_emval_get_method_caller:__emval_get_method_caller,_emval_get_module_property:__emval_get_module_property,_emval_get_property:__emval_get_property,_emval_incref:__emval_incref,_emval_new_array:__emval_new_array,_emval_new_array_from_memory_view:__emval_new_array_from_memory_view,_emval_new_cstring:__emval_new_cstring,_emval_run_destructors:__emval_run_destructors,_emval_take_value:__emval_take_value,abort:_abort,emscripten_asm_const_int:_emscripten_asm_const_int,emscripten_date_now:_emscripten_date_now,emscripten_err:_emscripten_err,emscripten_memcpy_js:_emscripten_memcpy_js,emscripten_resize_heap:_emscripten_resize_heap,environ_get:_environ_get,environ_sizes_get:_environ_sizes_get,fd_close:_fd_close,fd_read:_fd_read,fd_seek:_fd_seek,fd_write:_fd_write,get_channel_from_buffer:get_channel_from_buffer,memory:wasmMemory,strftime_l:_strftime_l};Asyncify.instrumentWasmImports(wasmImports);var wasmExports=createWasm();var ___wasm_call_ctors=createExportWrapper("__wasm_call_ctors");var _jsRubberbandAudio=Module["_jsRubberbandAudio"]=createExportWrapper("jsRubberbandAudio");var _malloc=Module["_malloc"]=createExportWrapper("malloc");var _main=Module["_main"]=createExportWrapper("main");var _free=Module["_free"]=createExportWrapper("free");var ___getTypeName=createExportWrapper("__getTypeName");var ___errno_location=createExportWrapper("__errno_location");var _fflush=Module["_fflush"]=createExportWrapper("fflush");var _emscripten_stack_init=()=>(_emscripten_stack_init=wasmExports["emscripten_stack_init"])();var _emscripten_stack_get_free=()=>(_emscripten_stack_get_free=wasmExports["emscripten_stack_get_free"])();var _emscripten_stack_get_base=()=>(_emscripten_stack_get_base=wasmExports["emscripten_stack_get_base"])();var _emscripten_stack_get_end=()=>(_emscripten_stack_get_end=wasmExports["emscripten_stack_get_end"])();var stackSave=createExportWrapper("stackSave");var stackRestore=createExportWrapper("stackRestore");var stackAlloc=createExportWrapper("stackAlloc");var _emscripten_stack_get_current=()=>(_emscripten_stack_get_current=wasmExports["emscripten_stack_get_current"])();var ___cxa_is_pointer_type=createExportWrapper("__cxa_is_pointer_type");var dynCall_ii=Module["dynCall_ii"]=createExportWrapper("dynCall_ii");var dynCall_vi=Module["dynCall_vi"]=createExportWrapper("dynCall_vi");var dynCall_iii=Module["dynCall_iii"]=createExportWrapper("dynCall_iii");var dynCall_vii=Module["dynCall_vii"]=createExportWrapper("dynCall_vii");var dynCall_viid=Module["dynCall_viid"]=createExportWrapper("dynCall_viid");var dynCall_viidd=Module["dynCall_viidd"]=createExportWrapper("dynCall_viidd");var dynCall_fiii=Module["dynCall_fiii"]=createExportWrapper("dynCall_fiii");var dynCall_diii=Module["dynCall_diii"]=createExportWrapper("dynCall_diii");var dynCall_di=Module["dynCall_di"]=createExportWrapper("dynCall_di");var dynCall_iiiiiidi=Module["dynCall_iiiiiidi"]=createExportWrapper("dynCall_iiiiiidi");var dynCall_did=Module["dynCall_did"]=createExportWrapper("dynCall_did");var dynCall_viiii=Module["dynCall_viiii"]=createExportWrapper("dynCall_viiii");var dynCall_viii=Module["dynCall_viii"]=createExportWrapper("dynCall_viii");var dynCall_vid=Module["dynCall_vid"]=createExportWrapper("dynCall_vid");var dynCall_v=Module["dynCall_v"]=createExportWrapper("dynCall_v");var dynCall_iiii=Module["dynCall_iiii"]=createExportWrapper("dynCall_iiii");var dynCall_jiji=Module["dynCall_jiji"]=createExportWrapper("dynCall_jiji");var dynCall_iidiiii=Module["dynCall_iidiiii"]=createExportWrapper("dynCall_iidiiii");var dynCall_viijii=Module["dynCall_viijii"]=createExportWrapper("dynCall_viijii");var dynCall_iiiii=Module["dynCall_iiiii"]=createExportWrapper("dynCall_iiiii");var dynCall_iiiiii=Module["dynCall_iiiiii"]=createExportWrapper("dynCall_iiiiii");var dynCall_iiiiiiiii=Module["dynCall_iiiiiiiii"]=createExportWrapper("dynCall_iiiiiiiii");var dynCall_iiiiiii=Module["dynCall_iiiiiii"]=createExportWrapper("dynCall_iiiiiii");var dynCall_iiiiij=Module["dynCall_iiiiij"]=createExportWrapper("dynCall_iiiiij");var dynCall_iiiiid=Module["dynCall_iiiiid"]=createExportWrapper("dynCall_iiiiid");var dynCall_iiiiijj=Module["dynCall_iiiiijj"]=createExportWrapper("dynCall_iiiiijj");var dynCall_iiiiiiii=Module["dynCall_iiiiiiii"]=createExportWrapper("dynCall_iiiiiiii");var dynCall_iiiiiijj=Module["dynCall_iiiiiijj"]=createExportWrapper("dynCall_iiiiiijj");var dynCall_viiiiii=Module["dynCall_viiiiii"]=createExportWrapper("dynCall_viiiiii");var dynCall_viiiii=Module["dynCall_viiiii"]=createExportWrapper("dynCall_viiiii");var _asyncify_start_unwind=createExportWrapper("asyncify_start_unwind");var _asyncify_stop_unwind=createExportWrapper("asyncify_stop_unwind");var _asyncify_start_rewind=createExportWrapper("asyncify_start_rewind");var _asyncify_stop_rewind=createExportWrapper("asyncify_stop_rewind");var ___start_em_js=Module["___start_em_js"]=47832;var ___stop_em_js=Module["___stop_em_js"]=47962;Module["allocateUTF8"]=allocateUTF8;var missingLibrarySymbols=["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertU32PairToI53","ydayFromDate","setErrNo","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","getHostByName","getCallstack","emscriptenLog","convertPCtoSourceLocation","runMainThreadEmAsm","jstoi_q","jstoi_s","listenOnce","autoResumeAudioContext","dynCallLegacy","getDynCaller","dynCall","asmjsMangle","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","getCFunc","ccall","cwrap","uleb128Encode","generateFuncType","convertJsFunctionToWasm","getEmptyTableSlot","updateTableMap","getFunctionAddress","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","intArrayToString","AsciiToString","stringToUTF8OnStack","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","jsStackTrace","stackTrace","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","createDyncallWrapper","safeSetTimeout","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","getPromise","makePromise","idsToPromises","makePromiseCallback","findMatchingCatch","setMainLoop","getSocketFromFD","getSocketAddress","FS_unlink","FS_mkdirTree","_setNetworkCallback","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","__glGenObject","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","registerWebGlEventCallback","SDL_unicode","SDL_ttfContext","SDL_audio","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory","getFunctionName","getFunctionArgsName","heap32VectorToArray","init_embind","throwUnboundTypeError","ensureOverloadTable","exposePublicSymbol","replacePublicSymbol","extendError","getBasestPointer","registerInheritedInstance","unregisterInheritedInstance","getInheritedInstance","getInheritedInstanceCount","getLiveInheritedInstances","enumReadValueFromPointer","craftInvokerFunction","embind__requireFunction","genericPointerToWireType","constNoSmartPtrRawPointerToWireType","nonConstNoSmartPtrRawPointerToWireType","init_RegisteredPointer","RegisteredPointer","RegisteredPointer_fromWireType","runDestructor","releaseClassHandle","detachFinalizer","attachFinalizer","makeClassHandle","init_ClassHandle","ClassHandle","throwInstanceAlreadyDeleted","flushPendingDeletes","setDelayFunction","RegisteredClass","shallowCopyInternalPointer","downcastPointer","upcastPointer","validateThis","char_0","char_9","makeLegalFunctionName","emval_get_global"];missingLibrarySymbols.forEach(missingLibrarySymbol);var unexportedSymbols=["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","FS_createFolder","FS_createPath","FS_createLazyFile","FS_createLink","FS_createDevice","FS_readFile","out","err","callMain","abort","wasmMemory","wasmExports","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","writeStackCookie","checkStackCookie","convertI32PairToI53Checked","ptrToString","zeroMemory","exitJS","getHeapMax","growMemory","ENV","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","arraySum","addDays","ERRNO_CODES","ERRNO_MESSAGES","DNS","Protocols","Sockets","initRandomFill","randomFill","timers","warnOnce","UNWIND_CACHE","readEmAsmArgsArray","readEmAsmArgs","runEmAsmFunction","getExecutableName","handleException","keepRuntimeAlive","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","asyncLoad","alignMemory","mmapAlloc","handleAllocatorInit","HandleAllocator","wasmTable","noExitRuntime","sigToWasmTypes","freeTableIndexes","functionsInTableMap","setValue","getValue","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","intArrayFromString","stringToAscii","UTF16Decoder","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","stringToNewUTF8","writeArrayToMemory","JSEvents","specialHTMLTargets","currentFullscreenStrategy","restoreOldWindowedStyle","demangle","demangleAll","ExitStatus","getEnvStrings","doReadv","doWritev","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","ExceptionInfo","Browser","wget","SYSCALLS","preloadPlugins","FS_createPreloadedFile","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","FS","FS_createDataFile","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","emscripten_webgl_power_preferences","AL","GLUT","EGL","GLEW","IDBStore","runAndAbortIfError","Asyncify","Fibers","SDL","SDL_gfx","allocateUTF8OnStack","InternalError","BindingError","throwInternalError","throwBindingError","registeredTypes","awaitingDependencies","typeDependencies","tupleRegistrations","structRegistrations","sharedRegisterType","whenDependentTypesAreResolved","embind_charCodes","embind_init_charCodes","readLatin1String","getTypeName","requireRegisteredType","UnboundTypeError","PureVirtualError","GenericWireTypeSize","createNamedFunction","embindRepr","registeredInstances","registeredPointers","registerType","integerReadValueFromPointer","floatReadValueFromPointer","simpleReadValueFromPointer","readPointer","runDestructors","newFunc","finalizationRegistry","detachFinalizer_deps","deletionQueue","delayFunction","emval_handles","emval_symbols","init_emval","count_emval_handles","getStringOrSymbol","Emval","emval_returnValue","emval_lookupTypes","emval_methodCallers","emval_addMethodCaller","reflectConstruct","IDBFS"];unexportedSymbols.forEach(unexportedRuntimeSymbol);var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function callMain(){assert(runDependencies==0,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])');assert(__ATPRERUN__.length==0,"cannot call main when preRun functions remain to be called");var entryFunction=_main;var argc=0;var argv=0;try{var ret=entryFunction(argc,argv);exitJS(ret,true);return ret}catch(e){return handleException(e)}}function stackCheckInit(){_emscripten_stack_init();writeStackCookie()}function run(){if(runDependencies>0){return}stackCheckInit();preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(shouldRunNow)callMain();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}checkStackCookie()}function checkUnflushedContent(){var oldOut=out;var oldErr=err;var has=false;out=err=x=>{has=true};try{_fflush(0);["stdout","stderr"].forEach(function(name){var info=FS.analyzePath("/dev/"+name);if(!info)return;var stream=info.object;var rdev=stream.rdev;var tty=TTY.ttys[rdev];if(tty&&tty.output&&tty.output.length){has=true}})}catch(e){}out=oldOut;err=oldErr;if(has){warnOnce("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the Emscripten FAQ), or make sure to emit a newline when you printf etc.")}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"])shouldRunNow=false;run(); diff --git a/0.5.0-beta/plugins/RubberBand.js.mem b/0.5.0-beta/plugins/RubberBand.js.mem new file mode 100644 index 0000000..38e1f38 Binary files /dev/null and b/0.5.0-beta/plugins/RubberBand.js.mem differ diff --git a/0.5.0-beta/plugins/VexWarp/dsp.js b/0.5.0-beta/plugins/VexWarp/dsp.js new file mode 100644 index 0000000..5af9202 --- /dev/null +++ b/0.5.0-beta/plugins/VexWarp/dsp.js @@ -0,0 +1,2302 @@ +/* + * DSP.js - a comprehensive digital signal processing library for javascript + * + * Created by Corban Brook on 2010-01-01. + * Copyright 2010 Corban Brook. All rights reserved. + * + */ + +//////////////////////////////////////////////////////////////////////////////// +// CONSTANTS // +//////////////////////////////////////////////////////////////////////////////// + +/** + * DSP is an object which contains general purpose utility functions and constants + */ +var DSP = { + // Channels + LEFT: 0, + RIGHT: 1, + MIX: 2, + + // Waveforms + SINE: 1, + TRIANGLE: 2, + SAW: 3, + SQUARE: 4, + + // Filters + LOWPASS: 0, + HIGHPASS: 1, + BANDPASS: 2, + NOTCH: 3, + + // Window functions + BARTLETT: 1, + BARTLETTHANN: 2, + BLACKMAN: 3, + COSINE: 4, + GAUSS: 5, + HAMMING: 6, + HANN: 7, + LANCZOS: 8, + RECTANGULAR: 9, + TRIANGULAR: 10, + + // Loop modes + OFF: 0, + FW: 1, + BW: 2, + FWBW: 3, + + // Math + TWO_PI: 2*Math.PI +}; + +// Setup arrays for platforms which do not support byte arrays +function setupTypedArray(name, fallback) { + // check if TypedArray exists + // typeof on Minefield and Chrome return function, typeof on Webkit returns object. + if (typeof this[name] !== "function" && typeof this[name] !== "object") { + // nope.. check if WebGLArray exists + if (typeof this[fallback] === "function" && typeof this[fallback] !== "object") { + this[name] = this[fallback]; + } else { + // nope.. set as Native JS array + this[name] = function(obj) { + if (obj instanceof Array) { + return obj; + } else if (typeof obj === "number") { + return new Array(obj); + } + }; + } + } +} + +setupTypedArray("Float32Array", "WebGLFloatArray"); +setupTypedArray("Int32Array", "WebGLIntArray"); +setupTypedArray("Uint16Array", "WebGLUnsignedShortArray"); +setupTypedArray("Uint8Array", "WebGLUnsignedByteArray"); + + +//////////////////////////////////////////////////////////////////////////////// +// DSP UTILITY FUNCTIONS // +//////////////////////////////////////////////////////////////////////////////// + +/** + * Inverts the phase of a signal + * + * @param {Array} buffer A sample buffer + * + * @returns The inverted sample buffer + */ +DSP.invert = function(buffer) { + for (var i = 0, len = buffer.length; i < len; i++) { + buffer[i] *= -1; + } + + return buffer; +}; + +/** + * Converts split-stereo (dual mono) sample buffers into a stereo interleaved sample buffer + * + * @param {Array} left A sample buffer + * @param {Array} right A sample buffer + * + * @returns The stereo interleaved buffer + */ +DSP.interleave = function(left, right) { + if (left.length !== right.length) { + throw "Can not interleave. Channel lengths differ."; + } + + var stereoInterleaved = new Float32Array(left.length * 2); + + for (var i = 0, len = left.length; i < len; i++) { + stereoInterleaved[2*i] = left[i]; + stereoInterleaved[2*i+1] = right[i]; + } + + return stereoInterleaved; +}; + +/** + * Converts a stereo-interleaved sample buffer into split-stereo (dual mono) sample buffers + * + * @param {Array} buffer A stereo-interleaved sample buffer + * + * @returns an Array containing left and right channels + */ +DSP.deinterleave = (function() { + var left, right, mix, deinterleaveChannel = []; + + deinterleaveChannel[DSP.MIX] = function(buffer) { + for (var i = 0, len = buffer.length/2; i < len; i++) { + mix[i] = (buffer[2*i] + buffer[2*i+1]) / 2; + } + return mix; + }; + + deinterleaveChannel[DSP.LEFT] = function(buffer) { + for (var i = 0, len = buffer.length/2; i < len; i++) { + left[i] = buffer[2*i]; + } + return left; + }; + + deinterleaveChannel[DSP.RIGHT] = function(buffer) { + for (var i = 0, len = buffer.length/2; i < len; i++) { + right[i] = buffer[2*i+1]; + } + return right; + }; + + return function(channel, buffer) { + left = left || new Float32Array(buffer.length/2); + right = right || new Float32Array(buffer.length/2); + mix = mix || new Float32Array(buffer.length/2); + + if (buffer.length/2 !== left.length) { + left = new Float32Array(buffer.length/2); + right = new Float32Array(buffer.length/2); + mix = new Float32Array(buffer.length/2); + } + + return deinterleaveChannel[channel](buffer); + }; +}()); + +/** + * Separates a channel from a stereo-interleaved sample buffer + * + * @param {Array} buffer A stereo-interleaved sample buffer + * @param {Number} channel A channel constant (LEFT, RIGHT, MIX) + * + * @returns an Array containing a signal mono sample buffer + */ +DSP.getChannel = DSP.deinterleave; + +/** + * Helper method (for Reverb) to mix two (interleaved) samplebuffers. It's possible + * to negate the second buffer while mixing and to perform a volume correction + * on the final signal. + * + * @param {Array} sampleBuffer1 Array containing Float values or a Float32Array + * @param {Array} sampleBuffer2 Array containing Float values or a Float32Array + * @param {Boolean} negate When true inverts/flips the audio signal + * @param {Number} volumeCorrection When you add multiple sample buffers, use this to tame your signal ;) + * + * @returns A new Float32Array interleaved buffer. + */ +DSP.mixSampleBuffers = function(sampleBuffer1, sampleBuffer2, negate, volumeCorrection){ + var outputSamples = new Float32Array(sampleBuffer1); + + for(var i = 0; i peak) ? Math.abs(buffer[i]) : peak; + } + + return peak; +}; + +// Fourier Transform Module used by DFT, FFT, RFFT +function FourierTransform(bufferSize, sampleRate) { + this.bufferSize = bufferSize; + this.sampleRate = sampleRate; + this.bandwidth = 2 / bufferSize * sampleRate / 2; + + this.spectrum = new Float32Array(bufferSize/2); + this.real = new Float32Array(bufferSize); + this.imag = new Float32Array(bufferSize); + + this.peakBand = 0; + this.peak = 0; + + /** + * Calculates the *middle* frequency of an FFT band. + * + * @param {Number} index The index of the FFT band. + * + * @returns The middle frequency in Hz. + */ + this.getBandFrequency = function(index) { + return this.bandwidth * index + this.bandwidth / 2; + }; + + this.calculateSpectrum = function() { + var spectrum = this.spectrum, + real = this.real, + imag = this.imag, + bSi = 2 / this.bufferSize, + sqrt = Math.sqrt, + rval, + ival, + mag; + + for (var i = 0, N = bufferSize/2; i < N; i++) { + rval = real[i]; + ival = imag[i]; + mag = bSi * sqrt(rval * rval + ival * ival); + + if (mag > this.peak) { + this.peakBand = i; + this.peak = mag; + } + + spectrum[i] = mag; + } + }; +} + +/** + * DFT is a class for calculating the Discrete Fourier Transform of a signal. + * + * @param {Number} bufferSize The size of the sample buffer to be computed + * @param {Number} sampleRate The sampleRate of the buffer (eg. 44100) + * + * @constructor + */ +function DFT(bufferSize, sampleRate) { + FourierTransform.call(this, bufferSize, sampleRate); + + var N = bufferSize/2 * bufferSize; + var TWO_PI = 2 * Math.PI; + + this.sinTable = new Float32Array(N); + this.cosTable = new Float32Array(N); + + for (var i = 0; i < N; i++) { + this.sinTable[i] = Math.sin(i * TWO_PI / bufferSize); + this.cosTable[i] = Math.cos(i * TWO_PI / bufferSize); + } +} + +/** + * Performs a forward transform on the sample buffer. + * Converts a time domain signal to frequency domain spectra. + * + * @param {Array} buffer The sample buffer + * + * @returns The frequency spectrum array + */ +DFT.prototype.forward = function(buffer) { + var real = this.real, + imag = this.imag, + rval, + ival; + + for (var k = 0; k < this.bufferSize/2; k++) { + rval = 0.0; + ival = 0.0; + + for (var n = 0; n < buffer.length; n++) { + rval += this.cosTable[k*n] * buffer[n]; + ival += this.sinTable[k*n] * buffer[n]; + } + + real[k] = rval; + imag[k] = ival; + } + + return this.calculateSpectrum(); +}; + + +/** + * FFT is a class for calculating the Discrete Fourier Transform of a signal + * with the Fast Fourier Transform algorithm. + * + * @param {Number} bufferSize The size of the sample buffer to be computed. Must be power of 2 + * @param {Number} sampleRate The sampleRate of the buffer (eg. 44100) + * + * @constructor + */ +function FFT(bufferSize, sampleRate) { + FourierTransform.call(this, bufferSize, sampleRate); + + this.reverseTable = new Uint32Array(bufferSize); + + var limit = 1; + var bit = bufferSize >> 1; + + var i; + + while (limit < bufferSize) { + for (i = 0; i < limit; i++) { + this.reverseTable[i + limit] = this.reverseTable[i] + bit; + } + + limit = limit << 1; + bit = bit >> 1; + } + + this.sinTable = new Float32Array(bufferSize); + this.cosTable = new Float32Array(bufferSize); + + for (i = 0; i < bufferSize; i++) { + this.sinTable[i] = Math.sin(-Math.PI/i); + this.cosTable[i] = Math.cos(-Math.PI/i); + } +} + +/** + * Performs a forward transform on the sample buffer. + * Converts a time domain signal to frequency domain spectra. + * + * @param {Array} buffer The sample buffer. Buffer Length must be power of 2 + * + * @returns The frequency spectrum array + */ +FFT.prototype.forward = function(buffer) { + // Locally scope variables for speed up + var bufferSize = this.bufferSize, + cosTable = this.cosTable, + sinTable = this.sinTable, + reverseTable = this.reverseTable, + real = this.real, + imag = this.imag, + spectrum = this.spectrum; + + var k = Math.floor(Math.log(bufferSize) / Math.LN2); + + if (Math.pow(2, k) !== bufferSize) { throw "Invalid buffer size, must be a power of 2."; } + if (bufferSize !== buffer.length) { throw "Supplied buffer is not the same size as defined FFT. FFT Size: " + bufferSize + " Buffer Size: " + buffer.length; } + + var halfSize = 1, + phaseShiftStepReal, + phaseShiftStepImag, + currentPhaseShiftReal, + currentPhaseShiftImag, + off, + tr, + ti, + tmpReal, + i; + + for (i = 0; i < bufferSize; i++) { + real[i] = buffer[reverseTable[i]]; + imag[i] = 0; + } + + while (halfSize < bufferSize) { + //phaseShiftStepReal = Math.cos(-Math.PI/halfSize); + //phaseShiftStepImag = Math.sin(-Math.PI/halfSize); + phaseShiftStepReal = cosTable[halfSize]; + phaseShiftStepImag = sinTable[halfSize]; + + currentPhaseShiftReal = 1; + currentPhaseShiftImag = 0; + + for (var fftStep = 0; fftStep < halfSize; fftStep++) { + i = fftStep; + + while (i < bufferSize) { + off = i + halfSize; + tr = (currentPhaseShiftReal * real[off]) - (currentPhaseShiftImag * imag[off]); + ti = (currentPhaseShiftReal * imag[off]) + (currentPhaseShiftImag * real[off]); + + real[off] = real[i] - tr; + imag[off] = imag[i] - ti; + real[i] += tr; + imag[i] += ti; + + i += halfSize << 1; + } + + tmpReal = currentPhaseShiftReal; + currentPhaseShiftReal = (tmpReal * phaseShiftStepReal) - (currentPhaseShiftImag * phaseShiftStepImag); + currentPhaseShiftImag = (tmpReal * phaseShiftStepImag) + (currentPhaseShiftImag * phaseShiftStepReal); + } + + halfSize = halfSize << 1; + } + + return this.calculateSpectrum(); +}; + +FFT.prototype.inverse = function(real, imag) { + // Locally scope variables for speed up + var bufferSize = this.bufferSize, + cosTable = this.cosTable, + sinTable = this.sinTable, + reverseTable = this.reverseTable, + spectrum = this.spectrum; + + real = real || this.real; + imag = imag || this.imag; + + var halfSize = 1, + phaseShiftStepReal, + phaseShiftStepImag, + currentPhaseShiftReal, + currentPhaseShiftImag, + off, + tr, + ti, + tmpReal, + i; + + for (i = 0; i < bufferSize; i++) { + imag[i] *= -1; + } + + var revReal = new Float32Array(bufferSize); + var revImag = new Float32Array(bufferSize); + + for (i = 0; i < real.length; i++) { + revReal[i] = real[reverseTable[i]]; + revImag[i] = imag[reverseTable[i]]; + } + + real = revReal; + imag = revImag; + + while (halfSize < bufferSize) { + phaseShiftStepReal = cosTable[halfSize]; + phaseShiftStepImag = sinTable[halfSize]; + currentPhaseShiftReal = 1; + currentPhaseShiftImag = 0; + + for (var fftStep = 0; fftStep < halfSize; fftStep++) { + i = fftStep; + + while (i < bufferSize) { + off = i + halfSize; + tr = (currentPhaseShiftReal * real[off]) - (currentPhaseShiftImag * imag[off]); + ti = (currentPhaseShiftReal * imag[off]) + (currentPhaseShiftImag * real[off]); + + real[off] = real[i] - tr; + imag[off] = imag[i] - ti; + real[i] += tr; + imag[i] += ti; + + i += halfSize << 1; + } + + tmpReal = currentPhaseShiftReal; + currentPhaseShiftReal = (tmpReal * phaseShiftStepReal) - (currentPhaseShiftImag * phaseShiftStepImag); + currentPhaseShiftImag = (tmpReal * phaseShiftStepImag) + (currentPhaseShiftImag * phaseShiftStepReal); + } + + halfSize = halfSize << 1; + } + + var buffer = new Float32Array(bufferSize); // this should be reused instead + for (i = 0; i < bufferSize; i++) { + buffer[i] = real[i] / bufferSize; + } + + return buffer; +}; + +/** + * RFFT is a class for calculating the Discrete Fourier Transform of a signal + * with the Fast Fourier Transform algorithm. + * + * This method currently only contains a forward transform but is highly optimized. + * + * @param {Number} bufferSize The size of the sample buffer to be computed. Must be power of 2 + * @param {Number} sampleRate The sampleRate of the buffer (eg. 44100) + * + * @constructor + */ + +// lookup tables don't really gain us any speed, but they do increase +// cache footprint, so don't use them in here + +// also we don't use sepearate arrays for real/imaginary parts + +// this one a little more than twice as fast as the one in FFT +// however I only did the forward transform + +// the rest of this was translated from C, see http://www.jjj.de/fxt/ +// this is the real split radix FFT + +function RFFT(bufferSize, sampleRate) { + FourierTransform.call(this, bufferSize, sampleRate); + + this.trans = new Float32Array(bufferSize); + + this.reverseTable = new Uint32Array(bufferSize); + + // don't use a lookup table to do the permute, use this instead + this.reverseBinPermute = function (dest, source) { + var bufferSize = this.bufferSize, + halfSize = bufferSize >>> 1, + nm1 = bufferSize - 1, + i = 1, r = 0, h; + + dest[0] = source[0]; + + do { + r += halfSize; + dest[i] = source[r]; + dest[r] = source[i]; + + i++; + + h = halfSize << 1; + while (h = h >> 1, !((r ^= h) & h)); + + if (r >= i) { + dest[i] = source[r]; + dest[r] = source[i]; + + dest[nm1-i] = source[nm1-r]; + dest[nm1-r] = source[nm1-i]; + } + i++; + } while (i < halfSize); + dest[nm1] = source[nm1]; + }; + + this.generateReverseTable = function () { + var bufferSize = this.bufferSize, + halfSize = bufferSize >>> 1, + nm1 = bufferSize - 1, + i = 1, r = 0, h; + + this.reverseTable[0] = 0; + + do { + r += halfSize; + + this.reverseTable[i] = r; + this.reverseTable[r] = i; + + i++; + + h = halfSize << 1; + while (h = h >> 1, !((r ^= h) & h)); + + if (r >= i) { + this.reverseTable[i] = r; + this.reverseTable[r] = i; + + this.reverseTable[nm1-i] = nm1-r; + this.reverseTable[nm1-r] = nm1-i; + } + i++; + } while (i < halfSize); + + this.reverseTable[nm1] = nm1; + }; + + this.generateReverseTable(); +} + + +// Ordering of output: +// +// trans[0] = re[0] (==zero frequency, purely real) +// trans[1] = re[1] +// ... +// trans[n/2-1] = re[n/2-1] +// trans[n/2] = re[n/2] (==nyquist frequency, purely real) +// +// trans[n/2+1] = im[n/2-1] +// trans[n/2+2] = im[n/2-2] +// ... +// trans[n-1] = im[1] + +RFFT.prototype.forward = function(buffer) { + var n = this.bufferSize, + spectrum = this.spectrum, + x = this.trans, + TWO_PI = 2*Math.PI, + sqrt = Math.sqrt, + i = n >>> 1, + bSi = 2 / n, + n2, n4, n8, nn, + t1, t2, t3, t4, + i1, i2, i3, i4, i5, i6, i7, i8, + st1, cc1, ss1, cc3, ss3, + e, + a, + rval, ival, mag; + + this.reverseBinPermute(x, buffer); + + /* + var reverseTable = this.reverseTable; + + for (var k = 0, len = reverseTable.length; k < len; k++) { + x[k] = buffer[reverseTable[k]]; + } + */ + + for (var ix = 0, id = 4; ix < n; id *= 4) { + for (var i0 = ix; i0 < n; i0 += id) { + //sumdiff(x[i0], x[i0+1]); // {a, b} <--| {a+b, a-b} + st1 = x[i0] - x[i0+1]; + x[i0] += x[i0+1]; + x[i0+1] = st1; + } + ix = 2*(id-1); + } + + n2 = 2; + nn = n >>> 1; + + while((nn = nn >>> 1)) { + ix = 0; + n2 = n2 << 1; + id = n2 << 1; + n4 = n2 >>> 2; + n8 = n2 >>> 3; + do { + if(n4 !== 1) { + for(i0 = ix; i0 < n; i0 += id) { + i1 = i0; + i2 = i1 + n4; + i3 = i2 + n4; + i4 = i3 + n4; + + //diffsum3_r(x[i3], x[i4], t1); // {a, b, s} <--| {a, b-a, a+b} + t1 = x[i3] + x[i4]; + x[i4] -= x[i3]; + //sumdiff3(x[i1], t1, x[i3]); // {a, b, d} <--| {a+b, b, a-b} + x[i3] = x[i1] - t1; + x[i1] += t1; + + i1 += n8; + i2 += n8; + i3 += n8; + i4 += n8; + + //sumdiff(x[i3], x[i4], t1, t2); // {s, d} <--| {a+b, a-b} + t1 = x[i3] + x[i4]; + t2 = x[i3] - x[i4]; + + t1 = -t1 * Math.SQRT1_2; + t2 *= Math.SQRT1_2; + + // sumdiff(t1, x[i2], x[i4], x[i3]); // {s, d} <--| {a+b, a-b} + st1 = x[i2]; + x[i4] = t1 + st1; + x[i3] = t1 - st1; + + //sumdiff3(x[i1], t2, x[i2]); // {a, b, d} <--| {a+b, b, a-b} + x[i2] = x[i1] - t2; + x[i1] += t2; + } + } else { + for(i0 = ix; i0 < n; i0 += id) { + i1 = i0; + i2 = i1 + n4; + i3 = i2 + n4; + i4 = i3 + n4; + + //diffsum3_r(x[i3], x[i4], t1); // {a, b, s} <--| {a, b-a, a+b} + t1 = x[i3] + x[i4]; + x[i4] -= x[i3]; + + //sumdiff3(x[i1], t1, x[i3]); // {a, b, d} <--| {a+b, b, a-b} + x[i3] = x[i1] - t1; + x[i1] += t1; + } + } + + ix = (id << 1) - n2; + id = id << 2; + } while (ix < n); + + e = TWO_PI / n2; + + for (var j = 1; j < n8; j++) { + a = j * e; + ss1 = Math.sin(a); + cc1 = Math.cos(a); + + //ss3 = sin(3*a); cc3 = cos(3*a); + cc3 = 4*cc1*(cc1*cc1-0.75); + ss3 = 4*ss1*(0.75-ss1*ss1); + + ix = 0; id = n2 << 1; + do { + for (i0 = ix; i0 < n; i0 += id) { + i1 = i0 + j; + i2 = i1 + n4; + i3 = i2 + n4; + i4 = i3 + n4; + + i5 = i0 + n4 - j; + i6 = i5 + n4; + i7 = i6 + n4; + i8 = i7 + n4; + + //cmult(c, s, x, y, &u, &v) + //cmult(cc1, ss1, x[i7], x[i3], t2, t1); // {u,v} <--| {x*c-y*s, x*s+y*c} + t2 = x[i7]*cc1 - x[i3]*ss1; + t1 = x[i7]*ss1 + x[i3]*cc1; + + //cmult(cc3, ss3, x[i8], x[i4], t4, t3); + t4 = x[i8]*cc3 - x[i4]*ss3; + t3 = x[i8]*ss3 + x[i4]*cc3; + + //sumdiff(t2, t4); // {a, b} <--| {a+b, a-b} + st1 = t2 - t4; + t2 += t4; + t4 = st1; + + //sumdiff(t2, x[i6], x[i8], x[i3]); // {s, d} <--| {a+b, a-b} + //st1 = x[i6]; x[i8] = t2 + st1; x[i3] = t2 - st1; + x[i8] = t2 + x[i6]; + x[i3] = t2 - x[i6]; + + //sumdiff_r(t1, t3); // {a, b} <--| {a+b, b-a} + st1 = t3 - t1; + t1 += t3; + t3 = st1; + + //sumdiff(t3, x[i2], x[i4], x[i7]); // {s, d} <--| {a+b, a-b} + //st1 = x[i2]; x[i4] = t3 + st1; x[i7] = t3 - st1; + x[i4] = t3 + x[i2]; + x[i7] = t3 - x[i2]; + + //sumdiff3(x[i1], t1, x[i6]); // {a, b, d} <--| {a+b, b, a-b} + x[i6] = x[i1] - t1; + x[i1] += t1; + + //diffsum3_r(t4, x[i5], x[i2]); // {a, b, s} <--| {a, b-a, a+b} + x[i2] = t4 + x[i5]; + x[i5] -= t4; + } + + ix = (id << 1) - n2; + id = id << 2; + + } while (ix < n); + } + } + + while (--i) { + rval = x[i]; + ival = x[n-i-1]; + mag = bSi * sqrt(rval * rval + ival * ival); + + if (mag > this.peak) { + this.peakBand = i; + this.peak = mag; + } + + spectrum[i] = mag; + } + + spectrum[0] = bSi * x[0]; + + return spectrum; +}; + +function Sampler(file, bufferSize, sampleRate, playStart, playEnd, loopStart, loopEnd, loopMode) { + this.file = file; + this.bufferSize = bufferSize; + this.sampleRate = sampleRate; + this.playStart = playStart || 0; // 0% + this.playEnd = playEnd || 1; // 100% + this.loopStart = loopStart || 0; + this.loopEnd = loopEnd || 1; + this.loopMode = loopMode || DSP.OFF; + this.loaded = false; + this.samples = []; + this.signal = new Float32Array(bufferSize); + this.frameCount = 0; + this.envelope = null; + this.amplitude = 1; + this.rootFrequency = 110; // A2 110 + this.frequency = 550; + this.step = this.frequency / this.rootFrequency; + this.duration = 0; + this.samplesProcessed = 0; + this.playhead = 0; + + var audio = /* new Audio();*/ document.createElement("AUDIO"); + var self = this; + + this.loadSamples = function(event) { + var buffer = DSP.getChannel(DSP.MIX, event.frameBuffer); + for ( var i = 0; i < buffer.length; i++) { + self.samples.push(buffer[i]); + } + }; + + this.loadComplete = function() { + // convert flexible js array into a fast typed array + self.samples = new Float32Array(self.samples); + self.loaded = true; + }; + + this.loadMetaData = function() { + self.duration = audio.duration; + }; + + audio.addEventListener("MozAudioAvailable", this.loadSamples, false); + audio.addEventListener("loadedmetadata", this.loadMetaData, false); + audio.addEventListener("ended", this.loadComplete, false); + audio.muted = true; + audio.src = file; + audio.play(); +} + +Sampler.prototype.applyEnvelope = function() { + this.envelope.process(this.signal); + return this.signal; +}; + +Sampler.prototype.generate = function() { + var frameOffset = this.frameCount * this.bufferSize; + + var loopWidth = this.playEnd * this.samples.length - this.playStart * this.samples.length; + var playStartSamples = this.playStart * this.samples.length; // ie 0.5 -> 50% of the length + var playEndSamples = this.playEnd * this.samples.length; // ie 0.5 -> 50% of the length + var offset; + + for ( var i = 0; i < this.bufferSize; i++ ) { + switch (this.loopMode) { + case DSP.OFF: + this.playhead = Math.round(this.samplesProcessed * this.step + playStartSamples); + if (this.playhead < (this.playEnd * this.samples.length) ) { + this.signal[i] = this.samples[this.playhead] * this.amplitude; + } else { + this.signal[i] = 0; + } + break; + + case DSP.FW: + this.playhead = Math.round((this.samplesProcessed * this.step) % loopWidth + playStartSamples); + if (this.playhead < (this.playEnd * this.samples.length) ) { + this.signal[i] = this.samples[this.playhead] * this.amplitude; + } + break; + + case DSP.BW: + this.playhead = playEndSamples - Math.round((this.samplesProcessed * this.step) % loopWidth); + if (this.playhead < (this.playEnd * this.samples.length) ) { + this.signal[i] = this.samples[this.playhead] * this.amplitude; + } + break; + + case DSP.FWBW: + if ( Math.floor(this.samplesProcessed * this.step / loopWidth) % 2 === 0 ) { + this.playhead = Math.round((this.samplesProcessed * this.step) % loopWidth + playStartSamples); + } else { + this.playhead = playEndSamples - Math.round((this.samplesProcessed * this.step) % loopWidth); + } + if (this.playhead < (this.playEnd * this.samples.length) ) { + this.signal[i] = this.samples[this.playhead] * this.amplitude; + } + break; + } + this.samplesProcessed++; + } + + this.frameCount++; + + return this.signal; +}; + +Sampler.prototype.setFreq = function(frequency) { + var totalProcessed = this.samplesProcessed * this.step; + this.frequency = frequency; + this.step = this.frequency / this.rootFrequency; + this.samplesProcessed = Math.round(totalProcessed/this.step); +}; + +Sampler.prototype.reset = function() { + this.samplesProcessed = 0; + this.playhead = 0; +}; + +/** + * Oscillator class for generating and modifying signals + * + * @param {Number} type A waveform constant (eg. DSP.SINE) + * @param {Number} frequency Initial frequency of the signal + * @param {Number} amplitude Initial amplitude of the signal + * @param {Number} bufferSize Size of the sample buffer to generate + * @param {Number} sampleRate The sample rate of the signal + * + * @contructor + */ +function Oscillator(type, frequency, amplitude, bufferSize, sampleRate) { + this.frequency = frequency; + this.amplitude = amplitude; + this.bufferSize = bufferSize; + this.sampleRate = sampleRate; + //this.pulseWidth = pulseWidth; + this.frameCount = 0; + + this.waveTableLength = 2048; + + this.cyclesPerSample = frequency / sampleRate; + + this.signal = new Float32Array(bufferSize); + this.envelope = null; + + switch(parseInt(type, 10)) { + case DSP.TRIANGLE: + this.func = Oscillator.Triangle; + break; + + case DSP.SAW: + this.func = Oscillator.Saw; + break; + + case DSP.SQUARE: + this.func = Oscillator.Square; + break; + + default: + case DSP.SINE: + this.func = Oscillator.Sine; + break; + } + + this.generateWaveTable = function() { + Oscillator.waveTable[this.func] = new Float32Array(2048); + var waveTableTime = this.waveTableLength / this.sampleRate; + var waveTableHz = 1 / waveTableTime; + + for (var i = 0; i < this.waveTableLength; i++) { + Oscillator.waveTable[this.func][i] = this.func(i * waveTableHz/this.sampleRate); + } + }; + + if ( typeof Oscillator.waveTable === 'undefined' ) { + Oscillator.waveTable = {}; + } + + if ( typeof Oscillator.waveTable[this.func] === 'undefined' ) { + this.generateWaveTable(); + } + + this.waveTable = Oscillator.waveTable[this.func]; +} + +/** + * Set the amplitude of the signal + * + * @param {Number} amplitude The amplitude of the signal (between 0 and 1) + */ +Oscillator.prototype.setAmp = function(amplitude) { + if (amplitude >= 0 && amplitude <= 1) { + this.amplitude = amplitude; + } else { + throw "Amplitude out of range (0..1)."; + } +}; + +/** + * Set the frequency of the signal + * + * @param {Number} frequency The frequency of the signal + */ +Oscillator.prototype.setFreq = function(frequency) { + this.frequency = frequency; + this.cyclesPerSample = frequency / this.sampleRate; +}; + +// Add an oscillator +Oscillator.prototype.add = function(oscillator) { + for ( var i = 0; i < this.bufferSize; i++ ) { + //this.signal[i] += oscillator.valueAt(i); + this.signal[i] += oscillator.signal[i]; + } + + return this.signal; +}; + +// Add a signal to the current generated osc signal +Oscillator.prototype.addSignal = function(signal) { + for ( var i = 0; i < signal.length; i++ ) { + if ( i >= this.bufferSize ) { + break; + } + this.signal[i] += signal[i]; + + /* + // Constrain amplitude + if ( this.signal[i] > 1 ) { + this.signal[i] = 1; + } else if ( this.signal[i] < -1 ) { + this.signal[i] = -1; + } + */ + } + return this.signal; +}; + +// Add an envelope to the oscillator +Oscillator.prototype.addEnvelope = function(envelope) { + this.envelope = envelope; +}; + +Oscillator.prototype.applyEnvelope = function() { + this.envelope.process(this.signal); +}; + +Oscillator.prototype.valueAt = function(offset) { + return this.waveTable[offset % this.waveTableLength]; +}; + +Oscillator.prototype.generate = function() { + var frameOffset = this.frameCount * this.bufferSize; + var step = this.waveTableLength * this.frequency / this.sampleRate; + var offset; + + for ( var i = 0; i < this.bufferSize; i++ ) { + //var step = (frameOffset + i) * this.cyclesPerSample % 1; + //this.signal[i] = this.func(step) * this.amplitude; + //this.signal[i] = this.valueAt(Math.round((frameOffset + i) * step)) * this.amplitude; + offset = Math.round((frameOffset + i) * step); + this.signal[i] = this.waveTable[offset % this.waveTableLength] * this.amplitude; + } + + this.frameCount++; + + return this.signal; +}; + +Oscillator.Sine = function(step) { + return Math.sin(DSP.TWO_PI * step); +}; + +Oscillator.Square = function(step) { + return step < 0.5 ? 1 : -1; +}; + +Oscillator.Saw = function(step) { + return 2 * (step - Math.round(step)); +}; + +Oscillator.Triangle = function(step) { + return 1 - 4 * Math.abs(Math.round(step) - step); +}; + +Oscillator.Pulse = function(step) { + // stub +}; + +function ADSR(attackLength, decayLength, sustainLevel, sustainLength, releaseLength, sampleRate) { + this.sampleRate = sampleRate; + // Length in seconds + this.attackLength = attackLength; + this.decayLength = decayLength; + this.sustainLevel = sustainLevel; + this.sustainLength = sustainLength; + this.releaseLength = releaseLength; + this.sampleRate = sampleRate; + + // Length in samples + this.attackSamples = attackLength * sampleRate; + this.decaySamples = decayLength * sampleRate; + this.sustainSamples = sustainLength * sampleRate; + this.releaseSamples = releaseLength * sampleRate; + + // Updates the envelope sample positions + this.update = function() { + this.attack = this.attackSamples; + this.decay = this.attack + this.decaySamples; + this.sustain = this.decay + this.sustainSamples; + this.release = this.sustain + this.releaseSamples; + }; + + this.update(); + + this.samplesProcessed = 0; +} + +ADSR.prototype.noteOn = function() { + this.samplesProcessed = 0; + this.sustainSamples = this.sustainLength * this.sampleRate; + this.update(); +}; + +// Send a note off when using a sustain of infinity to let the envelope enter the release phase +ADSR.prototype.noteOff = function() { + this.sustainSamples = this.samplesProcessed - this.decaySamples; + this.update(); +}; + +ADSR.prototype.processSample = function(sample) { + var amplitude = 0; + + if ( this.samplesProcessed <= this.attack ) { + amplitude = 0 + (1 - 0) * ((this.samplesProcessed - 0) / (this.attack - 0)); + } else if ( this.samplesProcessed > this.attack && this.samplesProcessed <= this.decay ) { + amplitude = 1 + (this.sustainLevel - 1) * ((this.samplesProcessed - this.attack) / (this.decay - this.attack)); + } else if ( this.samplesProcessed > this.decay && this.samplesProcessed <= this.sustain ) { + amplitude = this.sustainLevel; + } else if ( this.samplesProcessed > this.sustain && this.samplesProcessed <= this.release ) { + amplitude = this.sustainLevel + (0 - this.sustainLevel) * ((this.samplesProcessed - this.sustain) / (this.release - this.sustain)); + } + + return sample * amplitude; +}; + +ADSR.prototype.value = function() { + var amplitude = 0; + + if ( this.samplesProcessed <= this.attack ) { + amplitude = 0 + (1 - 0) * ((this.samplesProcessed - 0) / (this.attack - 0)); + } else if ( this.samplesProcessed > this.attack && this.samplesProcessed <= this.decay ) { + amplitude = 1 + (this.sustainLevel - 1) * ((this.samplesProcessed - this.attack) / (this.decay - this.attack)); + } else if ( this.samplesProcessed > this.decay && this.samplesProcessed <= this.sustain ) { + amplitude = this.sustainLevel; + } else if ( this.samplesProcessed > this.sustain && this.samplesProcessed <= this.release ) { + amplitude = this.sustainLevel + (0 - this.sustainLevel) * ((this.samplesProcessed - this.sustain) / (this.release - this.sustain)); + } + + return amplitude; +}; + +ADSR.prototype.process = function(buffer) { + for ( var i = 0; i < buffer.length; i++ ) { + buffer[i] *= this.value(); + + this.samplesProcessed++; + } + + return buffer; +}; + + +ADSR.prototype.isActive = function() { + if ( this.samplesProcessed > this.release || this.samplesProcessed === -1 ) { + return false; + } else { + return true; + } +}; + +ADSR.prototype.disable = function() { + this.samplesProcessed = -1; +}; + +function IIRFilter(type, cutoff, resonance, sampleRate) { + this.sampleRate = sampleRate; + + switch(type) { + case DSP.LOWPASS: + case DSP.LP12: + this.func = new IIRFilter.LP12(cutoff, resonance, sampleRate); + break; + } +} + +IIRFilter.prototype.__defineGetter__('cutoff', + function() { + return this.func.cutoff; + } +); + +IIRFilter.prototype.__defineGetter__('resonance', + function() { + return this.func.resonance; + } +); + +IIRFilter.prototype.set = function(cutoff, resonance) { + this.func.calcCoeff(cutoff, resonance); +}; + +IIRFilter.prototype.process = function(buffer) { + this.func.process(buffer); +}; + +// Add an envelope to the filter +IIRFilter.prototype.addEnvelope = function(envelope) { + if ( envelope instanceof ADSR ) { + this.func.addEnvelope(envelope); + } else { + throw "Not an envelope."; + } +}; + +IIRFilter.LP12 = function(cutoff, resonance, sampleRate) { + this.sampleRate = sampleRate; + this.vibraPos = 0; + this.vibraSpeed = 0; + this.envelope = false; + + this.calcCoeff = function(cutoff, resonance) { + this.w = 2.0 * Math.PI * cutoff / this.sampleRate; + this.q = 1.0 - this.w / (2.0 * (resonance + 0.5 / (1.0 + this.w)) + this.w - 2.0); + this.r = this.q * this.q; + this.c = this.r + 1.0 - 2.0 * Math.cos(this.w) * this.q; + + this.cutoff = cutoff; + this.resonance = resonance; + }; + + this.calcCoeff(cutoff, resonance); + + this.process = function(buffer) { + for ( var i = 0; i < buffer.length; i++ ) { + this.vibraSpeed += (buffer[i] - this.vibraPos) * this.c; + this.vibraPos += this.vibraSpeed; + this.vibraSpeed *= this.r; + + /* + var temp = this.vibraPos; + + if ( temp > 1.0 ) { + temp = 1.0; + } else if ( temp < -1.0 ) { + temp = -1.0; + } else if ( temp != temp ) { + temp = 1; + } + + buffer[i] = temp; + */ + + if (this.envelope) { + buffer[i] = (buffer[i] * (1 - this.envelope.value())) + (this.vibraPos * this.envelope.value()); + this.envelope.samplesProcessed++; + } else { + buffer[i] = this.vibraPos; + } + } + }; +}; + +IIRFilter.LP12.prototype.addEnvelope = function(envelope) { + this.envelope = envelope; +}; + +function IIRFilter2(type, cutoff, resonance, sampleRate) { + this.type = type; + this.cutoff = cutoff; + this.resonance = resonance; + this.sampleRate = sampleRate; + + this.f = Float32Array(4); + this.f[0] = 0.0; // lp + this.f[1] = 0.0; // hp + this.f[2] = 0.0; // bp + this.f[3] = 0.0; // br + + this.calcCoeff = function(cutoff, resonance) { + this.freq = 2 * Math.sin(Math.PI * Math.min(0.25, cutoff/(this.sampleRate*2))); + this.damp = Math.min(2 * (1 - Math.pow(resonance, 0.25)), Math.min(2, 2/this.freq - this.freq * 0.5)); + }; + + this.calcCoeff(cutoff, resonance); +} + +IIRFilter2.prototype.process = function(buffer) { + var input, output; + var f = this.f; + + for ( var i = 0; i < buffer.length; i++ ) { + input = buffer[i]; + + // first pass + f[3] = input - this.damp * f[2]; + f[0] = f[0] + this.freq * f[2]; + f[1] = f[3] - f[0]; + f[2] = this.freq * f[1] + f[2]; + output = 0.5 * f[this.type]; + + // second pass + f[3] = input - this.damp * f[2]; + f[0] = f[0] + this.freq * f[2]; + f[1] = f[3] - f[0]; + f[2] = this.freq * f[1] + f[2]; + output += 0.5 * f[this.type]; + + if (this.envelope) { + buffer[i] = (buffer[i] * (1 - this.envelope.value())) + (output * this.envelope.value()); + this.envelope.samplesProcessed++; + } else { + buffer[i] = output; + } + } +}; + +IIRFilter2.prototype.addEnvelope = function(envelope) { + if ( envelope instanceof ADSR ) { + this.envelope = envelope; + } else { + throw "This is not an envelope."; + } +}; + +IIRFilter2.prototype.set = function(cutoff, resonance) { + this.calcCoeff(cutoff, resonance); +}; + + + +function WindowFunction(type, alpha) { + this.alpha = alpha; + + switch(type) { + case DSP.BARTLETT: + this.func = WindowFunction.Bartlett; + break; + + case DSP.BARTLETTHANN: + this.func = WindowFunction.BartlettHann; + break; + + case DSP.BLACKMAN: + this.func = WindowFunction.Blackman; + this.alpha = this.alpha || 0.16; + break; + + case DSP.COSINE: + this.func = WindowFunction.Cosine; + break; + + case DSP.GAUSS: + this.func = WindowFunction.Gauss; + this.alpha = this.alpha || 0.25; + break; + + case DSP.HAMMING: + this.func = WindowFunction.Hamming; + break; + + case DSP.HANN: + this.func = WindowFunction.Hann; + break; + + case DSP.LANCZOS: + this.func = WindowFunction.Lanczoz; + break; + + case DSP.RECTANGULAR: + this.func = WindowFunction.Rectangular; + break; + + case DSP.TRIANGULAR: + this.func = WindowFunction.Triangular; + break; + } +} + +WindowFunction.prototype.process = function(buffer) { + var length = buffer.length; + for ( var i = 0; i < length; i++ ) { + buffer[i] *= this.func(length, i, this.alpha); + } + return buffer; +}; + +WindowFunction.Bartlett = function(length, index) { + return 2 / (length - 1) * ((length - 1) / 2 - Math.abs(index - (length - 1) / 2)); +}; + +WindowFunction.BartlettHann = function(length, index) { + return 0.62 - 0.48 * Math.abs(index / (length - 1) - 0.5) - 0.38 * Math.cos(DSP.TWO_PI * index / (length - 1)); +}; + +WindowFunction.Blackman = function(length, index, alpha) { + var a0 = (1 - alpha) / 2; + var a1 = 0.5; + var a2 = alpha / 2; + + return a0 - a1 * Math.cos(DSP.TWO_PI * index / (length - 1)) + a2 * Math.cos(4 * Math.PI * index / (length - 1)); +}; + +WindowFunction.Cosine = function(length, index) { + return Math.cos(Math.PI * index / (length - 1) - Math.PI / 2); +}; + +WindowFunction.Gauss = function(length, index, alpha) { + return Math.pow(Math.E, -0.5 * Math.pow((index - (length - 1) / 2) / (alpha * (length - 1) / 2), 2)); +}; + +WindowFunction.Hamming = function(length, index) { + return 0.54 - 0.46 * Math.cos(DSP.TWO_PI * index / (length - 1)); +}; + +WindowFunction.Hann = function(length, index) { + return 0.5 * (1 - Math.cos(DSP.TWO_PI * index / (length - 1))); +}; + +WindowFunction.Lanczos = function(length, index) { + var x = 2 * index / (length - 1) - 1; + return Math.sin(Math.PI * x) / (Math.PI * x); +}; + +WindowFunction.Rectangular = function(length, index) { + return 1; +}; + +WindowFunction.Triangular = function(length, index) { + return 2 / length * (length / 2 - Math.abs(index - (length - 1) / 2)); +}; + +function sinh (arg) { + // Returns the hyperbolic sine of the number, defined as (exp(number) - exp(-number))/2 + // + // version: 1004.2314 + // discuss at: http://phpjs.org/functions/sinh // + original by: Onno Marsman + // * example 1: sinh(-0.9834330348825909); + // * returns 1: -1.1497971402636502 + return (Math.exp(arg) - Math.exp(-arg))/2; +} + +/* + * Biquad filter + * + * Created by Ricard Marxer on 2010-05-23. + * Copyright 2010 Ricard Marxer. All rights reserved. + * + */ +// Implementation based on: +// http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt +function Biquad(type, sampleRate) { + this.Fs = sampleRate; + this.type = type; // type of the filter + this.parameterType = DSP.Q; // type of the parameter + + this.x_1_l = 0; + this.x_2_l = 0; + this.y_1_l = 0; + this.y_2_l = 0; + + this.x_1_r = 0; + this.x_2_r = 0; + this.y_1_r = 0; + this.y_2_r = 0; + + this.b0 = 1; + this.a0 = 1; + + this.b1 = 0; + this.a1 = 0; + + this.b2 = 0; + this.a2 = 0; + + this.b0a0 = this.b0 / this.a0; + this.b1a0 = this.b1 / this.a0; + this.b2a0 = this.b2 / this.a0; + this.a1a0 = this.a1 / this.a0; + this.a2a0 = this.a2 / this.a0; + + this.f0 = 3000; // "wherever it's happenin', man." Center Frequency or + // Corner Frequency, or shelf midpoint frequency, depending + // on which filter type. The "significant frequency". + + this.dBgain = 12; // used only for peaking and shelving filters + + this.Q = 1; // the EE kind of definition, except for peakingEQ in which A*Q is + // the classic EE Q. That adjustment in definition was made so that + // a boost of N dB followed by a cut of N dB for identical Q and + // f0/Fs results in a precisely flat unity gain filter or "wire". + + this.BW = -3; // the bandwidth in octaves (between -3 dB frequencies for BPF + // and notch or between midpoint (dBgain/2) gain frequencies for + // peaking EQ + + this.S = 1; // a "shelf slope" parameter (for shelving EQ only). When S = 1, + // the shelf slope is as steep as it can be and remain monotonically + // increasing or decreasing gain with frequency. The shelf slope, in + // dB/octave, remains proportional to S for all other values for a + // fixed f0/Fs and dBgain. + + this.coefficients = function() { + var b = [this.b0, this.b1, this.b2]; + var a = [this.a0, this.a1, this.a2]; + return {b: b, a:a}; + }; + + this.setFilterType = function(type) { + this.type = type; + this.recalculateCoefficients(); + }; + + this.setSampleRate = function(rate) { + this.Fs = rate; + this.recalculateCoefficients(); + }; + + this.setQ = function(q) { + this.parameterType = DSP.Q; + this.Q = Math.max(Math.min(q, 115.0), 0.001); + this.recalculateCoefficients(); + }; + + this.setBW = function(bw) { + this.parameterType = DSP.BW; + this.BW = bw; + this.recalculateCoefficients(); + }; + + this.setS = function(s) { + this.parameterType = DSP.S; + this.S = Math.max(Math.min(s, 5.0), 0.0001); + this.recalculateCoefficients(); + }; + + this.setF0 = function(freq) { + this.f0 = freq; + this.recalculateCoefficients(); + }; + + this.setDbGain = function(g) { + this.dBgain = g; + this.recalculateCoefficients(); + }; + + this.recalculateCoefficients = function() { + var A; + if (type === DSP.PEAKING_EQ || type === DSP.LOW_SHELF || type === DSP.HIGH_SHELF ) { + A = Math.pow(10, (this.dBgain/40)); // for peaking and shelving EQ filters only + } else { + A = Math.sqrt( Math.pow(10, (this.dBgain/20)) ); + } + + var w0 = DSP.TWO_PI * this.f0 / this.Fs; + + var cosw0 = Math.cos(w0); + var sinw0 = Math.sin(w0); + + var alpha = 0; + + switch (this.parameterType) { + case DSP.Q: + alpha = sinw0/(2*this.Q); + break; + + case DSP.BW: + alpha = sinw0 * sinh( Math.LN2/2 * this.BW * w0/sinw0 ); + break; + + case DSP.S: + alpha = sinw0/2 * Math.sqrt( (A + 1/A)*(1/this.S - 1) + 2 ); + break; + } + + /** + FYI: The relationship between bandwidth and Q is + 1/Q = 2*sinh(ln(2)/2*BW*w0/sin(w0)) (digital filter w BLT) + or 1/Q = 2*sinh(ln(2)/2*BW) (analog filter prototype) + + The relationship between shelf slope and Q is + 1/Q = sqrt((A + 1/A)*(1/S - 1) + 2) + */ + + var coeff; + + switch (this.type) { + case DSP.LPF: // H(s) = 1 / (s^2 + s/Q + 1) + this.b0 = (1 - cosw0)/2; + this.b1 = 1 - cosw0; + this.b2 = (1 - cosw0)/2; + this.a0 = 1 + alpha; + this.a1 = -2 * cosw0; + this.a2 = 1 - alpha; + break; + + case DSP.HPF: // H(s) = s^2 / (s^2 + s/Q + 1) + this.b0 = (1 + cosw0)/2; + this.b1 = -(1 + cosw0); + this.b2 = (1 + cosw0)/2; + this.a0 = 1 + alpha; + this.a1 = -2 * cosw0; + this.a2 = 1 - alpha; + break; + + case DSP.BPF_CONSTANT_SKIRT: // H(s) = s / (s^2 + s/Q + 1) (constant skirt gain, peak gain = Q) + this.b0 = sinw0/2; + this.b1 = 0; + this.b2 = -sinw0/2; + this.a0 = 1 + alpha; + this.a1 = -2*cosw0; + this.a2 = 1 - alpha; + break; + + case DSP.BPF_CONSTANT_PEAK: // H(s) = (s/Q) / (s^2 + s/Q + 1) (constant 0 dB peak gain) + this.b0 = alpha; + this.b1 = 0; + this.b2 = -alpha; + this.a0 = 1 + alpha; + this.a1 = -2*cosw0; + this.a2 = 1 - alpha; + break; + + case DSP.NOTCH: // H(s) = (s^2 + 1) / (s^2 + s/Q + 1) + this.b0 = 1; + this.b1 = -2*cosw0; + this.b2 = 1; + this.a0 = 1 + alpha; + this.a1 = -2*cosw0; + this.a2 = 1 - alpha; + break; + + case DSP.APF: // H(s) = (s^2 - s/Q + 1) / (s^2 + s/Q + 1) + this.b0 = 1 - alpha; + this.b1 = -2*cosw0; + this.b2 = 1 + alpha; + this.a0 = 1 + alpha; + this.a1 = -2*cosw0; + this.a2 = 1 - alpha; + break; + + case DSP.PEAKING_EQ: // H(s) = (s^2 + s*(A/Q) + 1) / (s^2 + s/(A*Q) + 1) + this.b0 = 1 + alpha*A; + this.b1 = -2*cosw0; + this.b2 = 1 - alpha*A; + this.a0 = 1 + alpha/A; + this.a1 = -2*cosw0; + this.a2 = 1 - alpha/A; + break; + + case DSP.LOW_SHELF: // H(s) = A * (s^2 + (sqrt(A)/Q)*s + A)/(A*s^2 + (sqrt(A)/Q)*s + 1) + coeff = sinw0 * Math.sqrt( (A^2 + 1)*(1/this.S - 1) + 2*A ); + this.b0 = A*((A+1) - (A-1)*cosw0 + coeff); + this.b1 = 2*A*((A-1) - (A+1)*cosw0); + this.b2 = A*((A+1) - (A-1)*cosw0 - coeff); + this.a0 = (A+1) + (A-1)*cosw0 + coeff; + this.a1 = -2*((A-1) + (A+1)*cosw0); + this.a2 = (A+1) + (A-1)*cosw0 - coeff; + break; + + case DSP.HIGH_SHELF: // H(s) = A * (A*s^2 + (sqrt(A)/Q)*s + 1)/(s^2 + (sqrt(A)/Q)*s + A) + coeff = sinw0 * Math.sqrt( (A^2 + 1)*(1/this.S - 1) + 2*A ); + this.b0 = A*((A+1) + (A-1)*cosw0 + coeff); + this.b1 = -2*A*((A-1) + (A+1)*cosw0); + this.b2 = A*((A+1) + (A-1)*cosw0 - coeff); + this.a0 = (A+1) - (A-1)*cosw0 + coeff; + this.a1 = 2*((A-1) - (A+1)*cosw0); + this.a2 = (A+1) - (A-1)*cosw0 - coeff; + break; + } + + this.b0a0 = this.b0/this.a0; + this.b1a0 = this.b1/this.a0; + this.b2a0 = this.b2/this.a0; + this.a1a0 = this.a1/this.a0; + this.a2a0 = this.a2/this.a0; + }; + + this.process = function(buffer) { + //y[n] = (b0/a0)*x[n] + (b1/a0)*x[n-1] + (b2/a0)*x[n-2] + // - (a1/a0)*y[n-1] - (a2/a0)*y[n-2] + + var len = buffer.length; + var output = new Float32Array(len); + + for ( var i=0; i on 2010-05-23. + * Copyright 2010 Ricard Marxer. All rights reserved. + * + * @buffer array of magnitudes to convert to decibels + * + * @returns the array in decibels + * + */ +DSP.mag2db = function(buffer) { + var minDb = -120; + var minMag = Math.pow(10.0, minDb / 20.0); + + var log = Math.log; + var max = Math.max; + + var result = Float32Array(buffer.length); + for (var i=0; i on 2010-05-23. + * Copyright 2010 Ricard Marxer. All rights reserved. + * + * Calculates the frequency response at the given points. + * + * @b b coefficients of the filter + * @a a coefficients of the filter + * @w w points (normally between -PI and PI) where to calculate the frequency response + * + * @returns the frequency response in magnitude + * + */ +DSP.freqz = function(b, a, w) { + var i, j; + + if (!w) { + w = Float32Array(200); + for (i=0;i on 2010-05-23. + * Copyright 2010 Ricard Marxer. All rights reserved. + * + */ +function GraphicalEq(sampleRate) { + this.FS = sampleRate; + this.minFreq = 40.0; + this.maxFreq = 16000.0; + + this.bandsPerOctave = 1.0; + + this.filters = []; + this.freqzs = []; + + this.calculateFreqzs = true; + + this.recalculateFilters = function() { + var bandCount = Math.round(Math.log(this.maxFreq/this.minFreq) * this.bandsPerOctave/ Math.LN2); + + this.filters = []; + for (var i=0; i (this.filters.length-1)) { + throw "The band index of the graphical equalizer is out of bounds."; + } + + if (!gain) { + throw "A gain must be passed."; + } + + this.filters[bandIndex].setDbGain(gain); + this.recalculateFreqz(bandIndex); + }; + + this.recalculateFreqz = function(bandIndex) { + if (!this.calculateFreqzs) { + return; + } + + if (bandIndex < 0 || bandIndex > (this.filters.length-1)) { + throw "The band index of the graphical equalizer is out of bounds. " + bandIndex + " is out of [" + 0 + ", " + this.filters.length-1 + "]"; + } + + if (!this.w) { + this.w = Float32Array(400); + for (var i=0; i1.0 (amplify) + * @param {Number} delayVolume Initial feedback delay volume. Float value: 0.0 (silence), 1.0 (normal), >1.0 (amplify) + * + * @constructor + */ +function MultiDelay(maxDelayInSamplesSize, delayInSamples, masterVolume, delayVolume) { + this.delayBufferSamples = new Float32Array(maxDelayInSamplesSize); // The maximum size of delay + this.delayInputPointer = delayInSamples; + this.delayOutputPointer = 0; + + this.delayInSamples = delayInSamples; + this.masterVolume = masterVolume; + this.delayVolume = delayVolume; +} + +/** + * Change the delay time in samples. + * + * @param {Number} delayInSamples Delay in samples + */ +MultiDelay.prototype.setDelayInSamples = function (delayInSamples) { + this.delayInSamples = delayInSamples; + + this.delayInputPointer = this.delayOutputPointer + delayInSamples; + + if (this.delayInputPointer >= this.delayBufferSamples.length-1) { + this.delayInputPointer = this.delayInputPointer - this.delayBufferSamples.length; + } +}; + +/** + * Change the master volume. + * + * @param {Number} masterVolume Float value: 0.0 (silence), 1.0 (normal), >1.0 (amplify) + */ +MultiDelay.prototype.setMasterVolume = function(masterVolume) { + this.masterVolume = masterVolume; +}; + +/** + * Change the delay feedback volume. + * + * @param {Number} delayVolume Float value: 0.0 (silence), 1.0 (normal), >1.0 (amplify) + */ +MultiDelay.prototype.setDelayVolume = function(delayVolume) { + this.delayVolume = delayVolume; +}; + +/** + * Process a given interleaved or mono non-interleaved float value Array and adds the delayed audio. + * + * @param {Array} samples Array containing Float values or a Float32Array + * + * @returns A new Float32Array interleaved or mono non-interleaved as was fed to this function. + */ +MultiDelay.prototype.process = function(samples) { + // NB. Make a copy to put in the output samples to return. + var outputSamples = new Float32Array(samples.length); + + for (var i=0; i= this.delayBufferSamples.length-1) { + this.delayInputPointer = 0; + } + + this.delayOutputPointer++; + if (this.delayOutputPointer >= this.delayBufferSamples.length-1) { + this.delayOutputPointer = 0; + } + } + + return outputSamples; +}; + +/** + * SingleDelay effect by Almer Thie (http://code.almeros.com). + * Copyright 2010 Almer Thie. All rights reserved. + * Example: See usage in Reverb class + * + * This is a delay that does NOT feeds it's own delayed signal back into its + * circular buffer, neither does it return the original signal. Also known as + * an AllPassFilter(?). + * + * Compatible with interleaved stereo (or more channel) buffers and + * non-interleaved mono buffers. + * + * @param {Number} maxDelayInSamplesSize Maximum possible delay in samples (size of circular buffer) + * @param {Number} delayInSamples Initial delay in samples + * @param {Number} delayVolume Initial feedback delay volume. Float value: 0.0 (silence), 1.0 (normal), >1.0 (amplify) + * + * @constructor + */ + +function SingleDelay(maxDelayInSamplesSize, delayInSamples, delayVolume) { + this.delayBufferSamples = new Float32Array(maxDelayInSamplesSize); // The maximum size of delay + this.delayInputPointer = delayInSamples; + this.delayOutputPointer = 0; + + this.delayInSamples = delayInSamples; + this.delayVolume = delayVolume; +} + +/** + * Change the delay time in samples. + * + * @param {Number} delayInSamples Delay in samples + */ +SingleDelay.prototype.setDelayInSamples = function(delayInSamples) { + this.delayInSamples = delayInSamples; + this.delayInputPointer = this.delayOutputPointer + delayInSamples; + + if (this.delayInputPointer >= this.delayBufferSamples.length-1) { + this.delayInputPointer = this.delayInputPointer - this.delayBufferSamples.length; + } +}; + +/** + * Change the return signal volume. + * + * @param {Number} delayVolume Float value: 0.0 (silence), 1.0 (normal), >1.0 (amplify) + */ +SingleDelay.prototype.setDelayVolume = function(delayVolume) { + this.delayVolume = delayVolume; +}; + +/** + * Process a given interleaved or mono non-interleaved float value Array and + * returns the delayed audio. + * + * @param {Array} samples Array containing Float values or a Float32Array + * + * @returns A new Float32Array interleaved or mono non-interleaved as was fed to this function. + */ +SingleDelay.prototype.process = function(samples) { + // NB. Make a copy to put in the output samples to return. + var outputSamples = new Float32Array(samples.length); + + for (var i=0; i= this.delayBufferSamples.length-1) { + this.delayInputPointer = 0; + } + + this.delayOutputPointer++; + + if (this.delayOutputPointer >= this.delayBufferSamples.length-1) { + this.delayOutputPointer = 0; + } + } + + return outputSamples; +}; + +/** + * Reverb effect by Almer Thie (http://code.almeros.com). + * Copyright 2010 Almer Thie. All rights reserved. + * Example: http://code.almeros.com/code-examples/reverb-firefox-audio-api/ + * + * This reverb consists of 6 SingleDelays, 6 MultiDelays and an IIRFilter2 + * for each of the two stereo channels. + * + * Compatible with interleaved stereo buffers only! + * + * @param {Number} maxDelayInSamplesSize Maximum possible delay in samples (size of circular buffers) + * @param {Number} delayInSamples Initial delay in samples for internal (Single/Multi)delays + * @param {Number} masterVolume Initial master volume. Float value: 0.0 (silence), 1.0 (normal), >1.0 (amplify) + * @param {Number} mixVolume Initial reverb signal mix volume. Float value: 0.0 (silence), 1.0 (normal), >1.0 (amplify) + * @param {Number} delayVolume Initial feedback delay volume for internal (Single/Multi)delays. Float value: 0.0 (silence), 1.0 (normal), >1.0 (amplify) + * @param {Number} dampFrequency Initial low pass filter frequency. 0 to 44100 (depending on your maximum sampling frequency) + * + * @constructor + */ +function Reverb(maxDelayInSamplesSize, delayInSamples, masterVolume, mixVolume, delayVolume, dampFrequency) { + this.delayInSamples = delayInSamples; + this.masterVolume = masterVolume; + this.mixVolume = mixVolume; + this.delayVolume = delayVolume; + this.dampFrequency = dampFrequency; + + this.NR_OF_MULTIDELAYS = 6; + this.NR_OF_SINGLEDELAYS = 6; + + this.LOWPASSL = new IIRFilter2(DSP.LOWPASS, dampFrequency, 0, 44100); + this.LOWPASSR = new IIRFilter2(DSP.LOWPASS, dampFrequency, 0, 44100); + + this.singleDelays = []; + + var i, delayMultiply; + + for (i = 0; i < this.NR_OF_SINGLEDELAYS; i++) { + delayMultiply = 1.0 + (i/7.0); // 1.0, 1.1, 1.2... + this.singleDelays[i] = new SingleDelay(maxDelayInSamplesSize, Math.round(this.delayInSamples * delayMultiply), this.delayVolume); + } + + this.multiDelays = []; + + for (i = 0; i < this.NR_OF_MULTIDELAYS; i++) { + delayMultiply = 1.0 + (i/10.0); // 1.0, 1.1, 1.2... + this.multiDelays[i] = new MultiDelay(maxDelayInSamplesSize, Math.round(this.delayInSamples * delayMultiply), this.masterVolume, this.delayVolume); + } +} + +/** + * Change the delay time in samples as a base for all delays. + * + * @param {Number} delayInSamples Delay in samples + */ +Reverb.prototype.setDelayInSamples = function (delayInSamples){ + this.delayInSamples = delayInSamples; + + var i, delayMultiply; + + for (i = 0; i < this.NR_OF_SINGLEDELAYS; i++) { + delayMultiply = 1.0 + (i/7.0); // 1.0, 1.1, 1.2... + this.singleDelays[i].setDelayInSamples( Math.round(this.delayInSamples * delayMultiply) ); + } + + for (i = 0; i < this.NR_OF_MULTIDELAYS; i++) { + delayMultiply = 1.0 + (i/10.0); // 1.0, 1.1, 1.2... + this.multiDelays[i].setDelayInSamples( Math.round(this.delayInSamples * delayMultiply) ); + } +}; + +/** + * Change the master volume. + * + * @param {Number} masterVolume Float value: 0.0 (silence), 1.0 (normal), >1.0 (amplify) + */ +Reverb.prototype.setMasterVolume = function (masterVolume){ + this.masterVolume = masterVolume; +}; + +/** + * Change the reverb signal mix level. + * + * @param {Number} mixVolume Float value: 0.0 (silence), 1.0 (normal), >1.0 (amplify) + */ +Reverb.prototype.setMixVolume = function (mixVolume){ + this.mixVolume = mixVolume; +}; + +/** + * Change all delays feedback volume. + * + * @param {Number} delayVolume Float value: 0.0 (silence), 1.0 (normal), >1.0 (amplify) + */ +Reverb.prototype.setDelayVolume = function (delayVolume){ + this.delayVolume = delayVolume; + + var i; + + for (i = 0; i)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^-ms-/,N=/-([\da-z])/gi,E=function(e,t){return t.toUpperCase()},S=function(){o.removeEventListener("DOMContentLoaded",S,!1),e.removeEventListener("load",S,!1),x.ready()};x.fn=x.prototype={jquery:p,constructor:x,init:function(e,t,n){var r,i;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:T.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:o,!0)),C.test(r[1])&&x.isPlainObject(t))for(r in t)x.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=o.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?n.ready(e):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return d.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},a=2),"object"==typeof s||x.isFunction(s)||(s={}),u===a&&(s=this,--a);u>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(x.isPlainObject(r)||(i=x.isArray(r)))?(i?(i=!1,o=n&&x.isArray(n)?n:[]):o=n&&x.isPlainObject(n)?n:{},s[t]=x.extend(l,o,r)):r!==undefined&&(s[t]=r));return s},x.extend({expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=a),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){(e===!0?--x.readyWait:x.isReady)||(x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(o,[x]),x.fn.trigger&&x(o).trigger("ready").off("ready")))},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if("object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:JSON.parse,parseXML:function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=undefined}return(!t||t.getElementsByTagName("parsererror").length)&&x.error("Invalid XML: "+e),t},noop:function(){},globalEval:function(e){var t,n=eval;e=x.trim(e),e&&(1===e.indexOf("use strict")?(t=o.createElement("script"),t.text=e,o.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(k,"ms-").replace(N,E)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,s=j(e);if(n){if(s){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(s){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:function(e){return null==e?"":v.call(e)},makeArray:function(e,t){var n=t||[];return null!=e&&(j(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:g.call(t,e,n)},merge:function(e,t){var n=t.length,r=e.length,i=0;if("number"==typeof n)for(;n>i;i++)e[r++]=t[i];else while(t[i]!==undefined)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){var r,i=[],o=0,s=e.length;for(n=!!n;s>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,s=j(e),a=[];if(s)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(a[a.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(a[a.length]=r);return f.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),x.isFunction(e)?(r=d.call(arguments,2),i=function(){return e.apply(t||this,r.concat(d.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):undefined},access:function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===x.type(n)){i=!0;for(a in n)x.access(e,t,a,n[a],!0,o,s)}else if(r!==undefined&&(i=!0,x.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(x(e),n)})),t))for(;u>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o},now:Date.now,swap:function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i}}),x.ready.promise=function(t){return n||(n=x.Deferred(),"complete"===o.readyState?setTimeout(x.ready):(o.addEventListener("DOMContentLoaded",S,!1),e.addEventListener("load",S,!1))),n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function j(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}t=x(o),function(e,undefined){var t,n,r,i,o,s,a,u,l,c,p,f,h,d,g,m,y,v="sizzle"+-new Date,b=e.document,w=0,T=0,C=st(),k=st(),N=st(),E=!1,S=function(e,t){return e===t?(E=!0,0):0},j=typeof undefined,D=1<<31,A={}.hasOwnProperty,L=[],q=L.pop,H=L.push,O=L.push,F=L.slice,P=L.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",$=W.replace("w","w#"),B="\\["+M+"*("+W+")"+M+"*(?:([*^$|!~]?=)"+M+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+$+")|)|)"+M+"*\\]",I=":("+W+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+B.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=RegExp("^"+M+"*,"+M+"*"),X=RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=RegExp(M+"*[+~]"),Y=RegExp("="+M+"*([^\\]'\"]*)"+M+"*\\]","g"),V=RegExp(I),G=RegExp("^"+$+"$"),J={ID:RegExp("^#("+W+")"),CLASS:RegExp("^\\.("+W+")"),TAG:RegExp("^("+W.replace("w","w*")+")"),ATTR:RegExp("^"+B),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:RegExp("^(?:"+R+")$","i"),needsContext:RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Q=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/^(?:input|select|textarea|button)$/i,et=/^h\d$/i,tt=/'|\\/g,nt=RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),rt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{O.apply(L=F.call(b.childNodes),b.childNodes),L[b.childNodes.length].nodeType}catch(it){O={apply:L.length?function(e,t){H.apply(e,F.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function ot(e,t,r,i){var o,s,a,u,l,f,g,m,x,w;if((t?t.ownerDocument||t:b)!==p&&c(t),t=t||p,r=r||[],!e||"string"!=typeof e)return r;if(1!==(u=t.nodeType)&&9!==u)return[];if(h&&!i){if(o=K.exec(e))if(a=o[1]){if(9===u){if(s=t.getElementById(a),!s||!s.parentNode)return r;if(s.id===a)return r.push(s),r}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(a))&&y(t,s)&&s.id===a)return r.push(s),r}else{if(o[2])return O.apply(r,t.getElementsByTagName(e)),r;if((a=o[3])&&n.getElementsByClassName&&t.getElementsByClassName)return O.apply(r,t.getElementsByClassName(a)),r}if(n.qsa&&(!d||!d.test(e))){if(m=g=v,x=t,w=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){f=gt(e),(g=t.getAttribute("id"))?m=g.replace(tt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",l=f.length;while(l--)f[l]=m+mt(f[l]);x=U.test(e)&&t.parentNode||t,w=f.join(",")}if(w)try{return O.apply(r,x.querySelectorAll(w)),r}catch(T){}finally{g||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,r,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>i.cacheLength&&delete t[e.shift()],t[n]=r}return t}function at(e){return e[v]=!0,e}function ut(e){var t=p.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function lt(e,t){var n=e.split("|"),r=e.length;while(r--)i.attrHandle[n[r]]=t}function ct(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function pt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return at(function(t){return t=+t,at(function(n,r){var i,o=e([],n.length,t),s=o.length;while(s--)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}s=ot.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},n=ot.support={},c=ot.setDocument=function(e){var t=e?e.ownerDocument||e:b,r=t.defaultView;return t!==p&&9===t.nodeType&&t.documentElement?(p=t,f=t.documentElement,h=!s(t),r&&r.attachEvent&&r!==r.top&&r.attachEvent("onbeforeunload",function(){c()}),n.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ut(function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=ut(function(e){return e.innerHTML="