raylib/docs/games/just_do.js
Ray San 1f6eb1fc61 Moved raylib webpage to docs folder
raylib webpage has been completely reorganized and moved from gh-pages
(a pain to work with) to docs folder. Useless libs have been removed,
webs have been renamed, etc.

Now it would be easier (hopefully) to update webpage. :)
2017-02-06 18:48:56 +01:00

24 lines
432 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var Module;if(typeof Module==="undefined")Module=eval("(function() { try { return Module || {} } catch(e) { return {} } })()");if(!Module.expectedDataFileDownloads){Module.expectedDataFileDownloads=0;Module.finishedDataFileDownloads=0}Module.expectedDataFileDownloads++;((function(){var PACKAGE_PATH;if(typeof window==="object"){PACKAGE_PATH=window["encodeURIComponent"](window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/")}else{PACKAGE_PATH=encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}var PACKAGE_NAME="just_do.data";var REMOTE_PACKAGE_BASE="just_do.data";if(typeof Module["locateFilePackage"]==="function"&&!Module["locateFile"]){Module["locateFile"]=Module["locateFilePackage"];Module.printErr("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)")}var REMOTE_PACKAGE_NAME=typeof Module["locateFile"]==="function"?Module["locateFile"](REMOTE_PACKAGE_BASE):(Module["filePackagePrefixURL"]||"")+REMOTE_PACKAGE_BASE;var REMOTE_PACKAGE_SIZE=2679704;var PACKAGE_UUID="dec45b16-1956-43f0-bb9b-a49e7d24385a";function fetchRemotePackage(packageName,packageSize,callback,errback){var xhr=new XMLHttpRequest;xhr.open("GET",packageName,true);xhr.responseType="arraybuffer";xhr.onprogress=(function(event){var url=packageName;var size=packageSize;if(event.total)size=event.total;if(event.loaded){if(!xhr.addedTotal){xhr.addedTotal=true;if(!Module.dataFileDownloads)Module.dataFileDownloads={};Module.dataFileDownloads[url]={loaded:event.loaded,total:size}}else{Module.dataFileDownloads[url].loaded=event.loaded}var total=0;var loaded=0;var num=0;for(var download in Module.dataFileDownloads){var data=Module.dataFileDownloads[download];total+=data.total;loaded+=data.loaded;num++}total=Math.ceil(total*Module.expectedDataFileDownloads/num);if(Module["setStatus"])Module["setStatus"]("Downloading data... ("+loaded+"/"+total+")")}else if(!Module.dataFileDownloads){if(Module["setStatus"])Module["setStatus"]("Downloading data...")}});xhr.onload=(function(event){var packageData=xhr.response;callback(packageData)});xhr.send(null)}function handleError(error){console.error("package error:",error)}var fetched=null,fetchedCallback=null;fetchRemotePackage(REMOTE_PACKAGE_NAME,REMOTE_PACKAGE_SIZE,(function(data){if(fetchedCallback){fetchedCallback(data);fetchedCallback=null}else{fetched=data}}),handleError);function runWithFS(){function assert(check,msg){if(!check)throw msg+(new Error).stack}Module["FS_createPath"]("/","resources",true,true);function DataRequest(start,end,crunched,audio){this.start=start;this.end=end;this.crunched=crunched;this.audio=audio}DataRequest.prototype={requests:{},open:(function(mode,name){this.name=name;this.requests[name]=this;Module["addRunDependency"]("fp "+this.name)}),send:(function(){}),onload:(function(){var byteArray=this.byteArray.subarray(this.start,this.end);this.finish(byteArray)}),finish:(function(byteArray){var that=this;Module["FS_createPreloadedFile"](this.name,null,byteArray,true,true,(function(){Module["removeRunDependency"]("fp "+that.name)}),(function(){if(that.audio){Module["removeRunDependency"]("fp "+that.name)}else{Module.printErr("Preloading file "+that.name+" failed")}}),false,true);this.requests[this.name]=null})};(new DataRequest(0,2672956,0,1)).open("GET","/resources/ambient.ogg");(new DataRequest(2672956,2679704,0,1)).open("GET","/resources/win.wav");function processPackageData(arrayBuffer){Module.finishedDataFileDownloads++;assert(arrayBuffer,"Loading data file failed.");var byteArray=new Uint8Array(arrayBuffer);var curr;var ptr=Module["_malloc"](byteArray.length);Module["HEAPU8"].set(byteArray,ptr);DataRequest.prototype.byteArray=Module["HEAPU8"].subarray(ptr,ptr+byteArray.length);DataRequest.prototype.requests["/resources/ambient.ogg"].onload();DataRequest.prototype.requests["/resources/win.wav"].onload();Module["removeRunDependency"]("datafile_just_do.data")}Module["addRunDependency"]("datafile_just_do.data");if(!Module.preloadResults)Module.preloadResults={};Module.preloadResults[PACKAGE_NAME]={fromCache:false};if(fetched){processPackageData(fetched);fetched=null}else{fetchedCallback=processPackageData}}if(Module["calledRun"]){runWithFS()}else{if(!Module["preRun"])Module["preRun"]=[];Module["preRun"].push(runWithFS)}}))();var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function";var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=function print(x){process["stdout"].write(x+"\n")};if(!Module["printErr"])Module["printErr"]=function printErr(x){process["stderr"].write(x+"\n")};var nodeFS=require("fs");var nodePath=require("path");Module["read"]=function read(filename,binary){filename=nodePath["normalize"](filename);var ret=nodeFS["readFileSync"](filename);if(!ret&&filename!=nodePath["resolve"](filename)){filename=path.join(__dirname,"..","src",filename);ret=nodeFS["readFileSync"](filename)}if(ret&&!binary)ret=ret.toString();return ret};Module["readBinary"]=function readBinary(filename){return Module["read"](filename,true)};Module["load"]=function load(f){globalEval(read(f))};if(process["argv"].length>1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}else{Module["thisProgram"]="unknown-program"}Module["arguments"]=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}))}else if(ENVIRONMENT_IS_SHELL){if(!Module["print"])Module["print"]=print;if(typeof printErr!="undefined")Module["printErr"]=printErr;if(typeof read!="undefined"){Module["read"]=read}else{Module["read"]=function read(){throw"no read() available (jsc?)"}}Module["readBinary"]=function readBinary(f){if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}var data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}this["Module"]=Module}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){Module["read"]=function read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof console!=="undefined"){if(!Module["print"])Module["print"]=function print(x){console.log(x)};if(!Module["printErr"])Module["printErr"]=function printErr(x){console.log(x)}}else{var TRY_USE_DUMP=false;if(!Module["print"])Module["print"]=TRY_USE_DUMP&&typeof dump!=="undefined"?(function(x){dump(x)}):(function(x){})}if(ENVIRONMENT_IS_WEB){window["Module"]=Module}else{Module["load"]=importScripts}}else{throw"Unknown runtime environment. Where are we?"}function globalEval(x){eval.call(null,x)}if(!Module["load"]&&Module["read"]){Module["load"]=function load(f){globalEval(Module["read"](f))}}if(!Module["print"]){Module["print"]=(function(){})}if(!Module["printErr"]){Module["printErr"]=Module["print"]}if(!Module["arguments"]){Module["arguments"]=[]}if(!Module["thisProgram"]){Module["thisProgram"]="./this.program"}Module.print=Module["print"];Module.printErr=Module["printErr"];Module["preRun"]=[];Module["postRun"]=[];for(var key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}var Runtime={setTempRet0:(function(value){tempRet0=value}),getTempRet0:(function(){return tempRet0}),stackSave:(function(){return STACKTOP}),stackRestore:(function(stackTop){STACKTOP=stackTop}),getNativeTypeSize:(function(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return Runtime.QUANTUM_SIZE}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0);return bits/8}else{return 0}}}}),getNativeFieldSize:(function(type){return Math.max(Runtime.getNativeTypeSize(type),Runtime.QUANTUM_SIZE)}),STACK_ALIGN:16,getAlignSize:(function(type,size,vararg){if(!vararg&&(type=="i64"||type=="double"))return 8;if(!type)return Math.min(size,8);return Math.min(size||(type?Runtime.getNativeFieldSize(type):0),Runtime.QUANTUM_SIZE)}),dynCall:(function(sig,ptr,args){if(args&&args.length){if(!args.splice)args=Array.prototype.slice.call(args);args.splice(0,0,ptr);return Module["dynCall_"+sig].apply(null,args)}else{return Module["dynCall_"+sig].call(null,ptr)}}),functionPointers:[],addFunction:(function(func){for(var i=0;i<Runtime.functionPointers.length;i++){if(!Runtime.functionPointers[i]){Runtime.functionPointers[i]=func;return 2*(1+i)}}throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."}),removeFunction:(function(index){Runtime.functionPointers[(index-2)/2]=null}),getAsmConst:(function(code,numArgs){if(!Runtime.asmConstCache)Runtime.asmConstCache={};var func=Runtime.asmConstCache[code];if(func)return func;var args=[];for(var i=0;i<numArgs;i++){args.push(String.fromCharCode(36)+i)}var source=Pointer_stringify(code);if(source[0]==='"'){if(source.indexOf('"',1)===source.length-1){source=source.substr(1,source.length-2)}else{abort("invalid EM_ASM input |"+source+"|. Please use EM_ASM(..code..) (no quotes) or EM_ASM({ ..code($0).. }, input) (to input values)")}}try{var evalled=eval("(function(Module, FS) { return function("+args.join(",")+"){ "+source+" } })")(Module,typeof FS!=="undefined"?FS:null)}catch(e){Module.printErr("error in executing inline EM_ASM code: "+e+" on: \n\n"+source+"\n\nwith args |"+args+"| (make sure to use the right one out of EM_ASM, EM_ASM_ARGS, etc.)");throw e}return Runtime.asmConstCache[code]=evalled}),warnOnce:(function(text){if(!Runtime.warnOnce.shown)Runtime.warnOnce.shown={};if(!Runtime.warnOnce.shown[text]){Runtime.warnOnce.shown[text]=1;Module.printErr(text)}}),funcWrappers:{},getFuncWrapper:(function(func,sig){assert(sig);if(!Runtime.funcWrappers[sig]){Runtime.funcWrappers[sig]={}}var sigCache=Runtime.funcWrappers[sig];if(!sigCache[func]){sigCache[func]=function dynCall_wrapper(){return Runtime.dynCall(sig,func,arguments)}}return sigCache[func]}),UTF8Processor:(function(){var buffer=[];var needed=0;this.processCChar=(function(code){code=code&255;if(buffer.length==0){if((code&128)==0){return String.fromCharCode(code)}buffer.push(code);if((code&224)==192){needed=1}else if((code&240)==224){needed=2}else{needed=3}return""}if(needed){buffer.push(code);needed--;if(needed>0)return""}var c1=buffer[0];var c2=buffer[1];var c3=buffer[2];var c4=buffer[3];var ret;if(buffer.length==2){ret=String.fromCharCode((c1&31)<<6|c2&63)}else if(buffer.length==3){ret=String.fromCharCode((c1&15)<<12|(c2&63)<<6|c3&63)}else{var codePoint=(c1&7)<<18|(c2&63)<<12|(c3&63)<<6|c4&63;ret=String.fromCharCode(((codePoint-65536)/1024|0)+55296,(codePoint-65536)%1024+56320)}buffer.length=0;return ret});this.processJSString=function processJSString(string){string=unescape(encodeURIComponent(string));var ret=[];for(var i=0;i<string.length;i++){ret.push(string.charCodeAt(i))}return ret}}),getCompilerSetting:(function(name){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work"}),stackAlloc:(function(size){var ret=STACKTOP;STACKTOP=STACKTOP+size|0;STACKTOP=STACKTOP+15&-16;return ret}),staticAlloc:(function(size){var ret=STATICTOP;STATICTOP=STATICTOP+size|0;STATICTOP=STATICTOP+15&-16;return ret}),dynamicAlloc:(function(size){var ret=DYNAMICTOP;DYNAMICTOP=DYNAMICTOP+size|0;DYNAMICTOP=DYNAMICTOP+15&-16;if(DYNAMICTOP>=TOTAL_MEMORY)enlargeMemory();return ret}),alignMemory:(function(size,quantum){var ret=size=Math.ceil(size/(quantum?quantum:16))*(quantum?quantum:16);return ret}),makeBigInt:(function(low,high,unsigned){var ret=unsigned?+(low>>>0)+ +(high>>>0)*+4294967296:+(low>>>0)+ +(high|0)*+4294967296;return ret}),GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module["Runtime"]=Runtime;var __THREW__=0;var ABORT=false;var EXITSTATUS=0;var undef=0;var tempValue,tempInt,tempBigInt,tempInt2,tempBigInt2,tempPair,tempBigIntI,tempBigIntR,tempBigIntS,tempBigIntP,tempBigIntD,tempDouble,tempFloat;var tempI64,tempI64b;var tempRet0,tempRet1,tempRet2,tempRet3,tempRet4,tempRet5,tempRet6,tempRet7,tempRet8,tempRet9;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}var globalScope=this;function getCFunc(ident){var func=Module["_"+ident];if(!func){try{func=eval("_"+ident)}catch(e){}}assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)");return func}var cwrap,ccall;((function(){var stack=0;var JSfuncs={"stackSave":(function(){stack=Runtime.stackSave()}),"stackRestore":(function(){Runtime.stackRestore(stack)}),"arrayToC":(function(arr){var ret=Runtime.stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}),"stringToC":(function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=Runtime.stackAlloc((str.length<<2)+1);writeStringToMemory(str,ret)}return ret})};var toC={"string":JSfuncs["stringToC"],"array":JSfuncs["arrayToC"]};ccall=function ccallFunc(ident,returnType,argTypes,args){var func=getCFunc(ident);var cArgs=[];if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=Runtime.stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func.apply(null,cArgs);if(returnType==="string")ret=Pointer_stringify(ret);if(stack!==0)JSfuncs["stackRestore"]();return ret};var sourceRegex=/^function\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;function parseJSFunc(jsfunc){var parsed=jsfunc.toString().match(sourceRegex).slice(1);return{arguments:parsed[0],body:parsed[1],returnValue:parsed[2]}}var JSsource={};for(var fun in JSfuncs){if(JSfuncs.hasOwnProperty(fun)){JSsource[fun]=parseJSFunc(JSfuncs[fun])}}cwrap=function cwrap(ident,returnType,argTypes){argTypes=argTypes||[];var cfunc=getCFunc(ident);var numericArgs=argTypes.every((function(type){return type==="number"}));var numericRet=returnType!=="string";if(numericRet&&numericArgs){return cfunc}var argNames=argTypes.map((function(x,i){return"$"+i}));var funcstr="(function("+argNames.join(",")+") {";var nargs=argTypes.length;if(!numericArgs){funcstr+=JSsource["stackSave"].body+";";for(var i=0;i<nargs;i++){var arg=argNames[i],type=argTypes[i];if(type==="number")continue;var convertCode=JSsource[type+"ToC"];funcstr+="var "+convertCode.arguments+" = "+arg+";";funcstr+=convertCode.body+";";funcstr+=arg+"="+convertCode.returnValue+";"}}var cfuncname=parseJSFunc((function(){return cfunc})).returnValue;funcstr+="var ret = "+cfuncname+"("+argNames.join(",")+");";if(!numericRet){var strgfy=parseJSFunc((function(){return Pointer_stringify})).returnValue;funcstr+="ret = "+strgfy+"(ret);"}if(!numericArgs){funcstr+=JSsource["stackRestore"].body+";"}funcstr+="return ret})";return eval(funcstr)}}))();Module["cwrap"]=cwrap;Module["ccall"]=ccall;function setValue(ptr,value,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":HEAP8[ptr>>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble- +(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}Module["setValue"]=setValue;function getValue(ptr,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":return HEAP8[ptr>>0];case"i8":return HEAP8[ptr>>0];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP32[ptr>>2];case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];default:abort("invalid type for setValue: "+type)}return null}Module["getValue"]=getValue;var ALLOC_NORMAL=0;var ALLOC_STACK=1;var ALLOC_STATIC=2;var ALLOC_DYNAMIC=3;var ALLOC_NONE=4;Module["ALLOC_NORMAL"]=ALLOC_NORMAL;Module["ALLOC_STACK"]=ALLOC_STACK;Module["ALLOC_STATIC"]=ALLOC_STATIC;Module["ALLOC_DYNAMIC"]=ALLOC_DYNAMIC;Module["ALLOC_NONE"]=ALLOC_NONE;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[_malloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][allocator===undefined?ALLOC_STATIC:allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var ptr=ret,stop;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr<stop;ptr+=4){HEAP32[ptr>>2]=0}stop=ret+size;while(ptr<stop){HEAP8[ptr++>>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i<size){var curr=slab[i];if(typeof curr==="function"){curr=Runtime.getFunctionIndex(curr)}type=singleType||types[i];if(type===0){i++;continue}if(type=="i64")type="i32";setValue(ret+i,curr,type);if(previousType!==type){typeSize=Runtime.getNativeTypeSize(type);previousType=type}i+=typeSize}return ret}Module["allocate"]=allocate;function Pointer_stringify(ptr,length){if(length===0||!ptr)return"";var hasUtf=false;var t;var i=0;while(1){t=HEAPU8[ptr+i>>0];if(t>=128)hasUtf=true;else if(t==0&&!length)break;i++;if(length&&i==length)break}if(!length)length=i;var ret="";if(!hasUtf){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK}return ret}var utf8=new Runtime.UTF8Processor;for(i=0;i<length;i++){t=HEAPU8[ptr+i>>0];ret+=utf8.processCChar(t)}return ret}Module["Pointer_stringify"]=Pointer_stringify;function UTF16ToString(ptr){var i=0;var str="";while(1){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)return str;++i;str+=String.fromCharCode(codeUnit)}}Module["UTF16ToString"]=UTF16ToString;function stringToUTF16(str,outPtr){for(var i=0;i<str.length;++i){var codeUnit=str.charCodeAt(i);HEAP16[outPtr+i*2>>1]=codeUnit}HEAP16[outPtr+str.length*2>>1]=0}Module["stringToUTF16"]=stringToUTF16;function UTF32ToString(ptr){var i=0;var str="";while(1){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)return str;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}}Module["UTF32ToString"]=UTF32ToString;function stringToUTF32(str,outPtr){var iChar=0;for(var iCodeUnit=0;iCodeUnit<str.length;++iCodeUnit){var codeUnit=str.charCodeAt(iCodeUnit);if(codeUnit>=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++iCodeUnit);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr+iChar*4>>2]=codeUnit;++iChar}HEAP32[outPtr+iChar*4>>2]=0}Module["stringToUTF32"]=stringToUTF32;function demangle(func){var hasLibcxxabi=!!Module["___cxa_demangle"];if(hasLibcxxabi){try{var buf=_malloc(func.length);writeStringToMemory(func.substr(1),buf);var status=_malloc(4);var ret=Module["___cxa_demangle"](buf,0,0,status);if(getValue(status,"i32")===0&&ret){return Pointer_stringify(ret)}}catch(e){}finally{if(buf)_free(buf);if(status)_free(status);if(ret)_free(ret)}}var i=3;var basicTypes={"v":"void","b":"bool","c":"char","s":"short","i":"int","l":"long","f":"float","d":"double","w":"wchar_t","a":"signed char","h":"unsigned char","t":"unsigned short","j":"unsigned int","m":"unsigned long","x":"long long","y":"unsigned long long","z":"..."};var subs=[];var first=true;function dump(x){if(x)Module.print(x);Module.print(func);var pre="";for(var a=0;a<i;a++)pre+=" ";Module.print(pre+"^")}function parseNested(){i++;if(func[i]==="K")i++;var parts=[];while(func[i]!=="E"){if(func[i]==="S"){i++;var next=func.indexOf("_",i);var num=func.substring(i,next)||0;parts.push(subs[num]||"?");i=next+1;continue}if(func[i]==="C"){parts.push(parts[parts.length-1]);i+=2;continue}var size=parseInt(func.substr(i));var pre=size.toString().length;if(!size||!pre){i--;break}var curr=func.substr(i+pre,size);parts.push(curr);subs.push(curr);i+=pre+size}i++;return parts}function parse(rawList,limit,allowVoid){limit=limit||Infinity;var ret="",list=[];function flushList(){return"("+list.join(", ")+")"}var name;if(func[i]==="N"){name=parseNested().join("::");limit--;if(limit===0)return rawList?[name]:name}else{if(func[i]==="K"||first&&func[i]==="L")i++;var size=parseInt(func.substr(i));if(size){var pre=size.toString().length;name=func.substr(i+pre,size);i+=pre+size}}first=false;if(func[i]==="I"){i++;var iList=parse(true);var iRet=parse(true,1,true);ret+=iRet[0]+" "+name+"<"+iList.join(", ")+">"}else{ret=name}paramLoop:while(i<func.length&&limit-->0){var c=func[i++];if(c in basicTypes){list.push(basicTypes[c])}else{switch(c){case"P":list.push(parse(true,1,true)[0]+"*");break;case"R":list.push(parse(true,1,true)[0]+"&");break;case"L":{i++;var end=func.indexOf("E",i);var size=end-i;list.push(func.substr(i,size));i+=size+2;break};case"A":{var size=parseInt(func.substr(i));i+=size.toString().length;if(func[i]!=="_")throw"?";i++;list.push(parse(true,1,true)[0]+" ["+size+"]");break};case"E":break paramLoop;default:ret+="?"+c;break paramLoop}}}if(!allowVoid&&list.length===1&&list[0]==="void")list=[];if(rawList){if(ret){list.push(ret+"?")}return list}else{return ret+flushList()}}var final=func;try{if(func=="Object._main"||func=="_main"){return"main()"}if(typeof func==="number")func=Pointer_stringify(func);if(func[0]!=="_")return func;if(func[1]!=="_")return func;if(func[2]!=="Z")return func;switch(func[3]){case"n":return"operator new()";case"d":return"operator delete()"}final=parse()}catch(e){final+="?"}if(final.indexOf("?")>=0&&!hasLibcxxabi){Runtime.warnOnce("warning: a problem occurred in builtin C++ name demangling; build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling")}return final}function demangleAll(text){return text.replace(/__Z[\w\d_]+/g,(function(x){var y=demangle(x);return x===y?x:x+" ["+y+"]"}))}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}function stackTrace(){return demangleAll(jsStackTrace())}Module["stackTrace"]=stackTrace;var PAGE_SIZE=4096;function alignMemoryPage(x){return x+4095&-4096}var HEAP;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;var STATIC_BASE=0,STATICTOP=0,staticSealed=false;var STACK_BASE=0,STACKTOP=0,STACK_MAX=0;var DYNAMIC_BASE=0,DYNAMICTOP=0;function enlargeMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.")}var TOTAL_STACK=Module["TOTAL_STACK"]||5242880;var TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;var FAST_MEMORY=Module["FAST_MEMORY"]||2097152;var totalMemory=64*1024;while(totalMemory<TOTAL_MEMORY||totalMemory<2*TOTAL_STACK){if(totalMemory<16*1024*1024){totalMemory*=2}else{totalMemory+=16*1024*1024}}if(totalMemory!==TOTAL_MEMORY){Module.printErr("increasing TOTAL_MEMORY to "+totalMemory+" to be compliant with the asm.js spec");TOTAL_MEMORY=totalMemory}assert(typeof Int32Array!=="undefined"&&typeof Float64Array!=="undefined"&&!!(new Int32Array(1))["subarray"]&&!!(new Int32Array(1))["set"],"JS engine does not provide full typed array support");var buffer=new ArrayBuffer(TOTAL_MEMORY);HEAP8=new Int8Array(buffer);HEAP16=new Int16Array(buffer);HEAP32=new Int32Array(buffer);HEAPU8=new Uint8Array(buffer);HEAPU16=new Uint16Array(buffer);HEAPU32=new Uint32Array(buffer);HEAPF32=new Float32Array(buffer);HEAPF64=new Float64Array(buffer);HEAP32[0]=255;assert(HEAPU8[0]===255&&HEAPU8[3]===0,"Typed arrays 2 must be run on a little-endian system");Module["HEAP"]=HEAP;Module["buffer"]=buffer;Module["HEAP8"]=HEAP8;Module["HEAP16"]=HEAP16;Module["HEAP32"]=HEAP32;Module["HEAPU8"]=HEAPU8;Module["HEAPU16"]=HEAPU16;Module["HEAPU32"]=HEAPU32;Module["HEAPF32"]=HEAPF32;Module["HEAPF64"]=HEAPF64;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Runtime.dynCall("v",func)}else{Runtime.dynCall("vi",func,[callback.arg])}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}Module["addOnPreRun"]=Module.addOnPreRun=addOnPreRun;function addOnInit(cb){__ATINIT__.unshift(cb)}Module["addOnInit"]=Module.addOnInit=addOnInit;function addOnPreMain(cb){__ATMAIN__.unshift(cb)}Module["addOnPreMain"]=Module.addOnPreMain=addOnPreMain;function addOnExit(cb){__ATEXIT__.unshift(cb)}Module["addOnExit"]=Module.addOnExit=addOnExit;function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}Module["addOnPostRun"]=Module.addOnPostRun=addOnPostRun;function intArrayFromString(stringy,dontAddNull,length){var ret=(new Runtime.UTF8Processor).processJSString(stringy);if(length){ret.length=length}if(!dontAddNull){ret.push(0)}return ret}Module["intArrayFromString"]=intArrayFromString;function intArrayToString(array){var ret=[];for(var i=0;i<array.length;i++){var chr=array[i];if(chr>255){chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}Module["intArrayToString"]=intArrayToString;function writeStringToMemory(string,buffer,dontAddNull){var array=intArrayFromString(string,dontAddNull);var i=0;while(i<array.length){var chr=array[i];HEAP8[buffer+i>>0]=chr;i=i+1}}Module["writeStringToMemory"]=writeStringToMemory;function writeArrayToMemory(array,buffer){for(var i=0;i<array.length;i++){HEAP8[buffer+i>>0]=array[i]}}Module["writeArrayToMemory"]=writeArrayToMemory;function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i<str.length;i++){HEAP8[buffer+i>>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer+str.length>>0]=0}Module["writeAsciiToMemory"]=writeAsciiToMemory;function unSign(value,bits,ignore){if(value>=0){return value}return bits<=32?2*Math.abs(1<<bits-1)+value:Math.pow(2,bits)+value}function reSign(value,bits,ignore){if(value<=0){return value}var half=bits<=32?Math.abs(1<<bits-1):Math.pow(2,bits-1);if(value>=half&&(bits<=32||value>half)){value=-2*half+value}return value}if(!Math["imul"]||Math["imul"](4294967295,5)!==-5)Math["imul"]=function imul(a,b){var ah=a>>>16;var al=a&65535;var bh=b>>>16;var bl=b&65535;return al*bl+(ah*bl+al*bh<<16)|0};Math.imul=Math["imul"];var Math_abs=Math.abs;var Math_cos=Math.cos;var Math_sin=Math.sin;var Math_tan=Math.tan;var Math_acos=Math.acos;var Math_asin=Math.asin;var Math_atan=Math.atan;var Math_atan2=Math.atan2;var Math_exp=Math.exp;var Math_log=Math.log;var Math_sqrt=Math.sqrt;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_pow=Math.pow;var Math_imul=Math.imul;var Math_fround=Math.fround;var Math_min=Math.min;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}Module["addRunDependency"]=addRunDependency;function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["removeRunDependency"]=removeRunDependency;Module["preloadedImages"]={};Module["preloadedAudios"]={};var memoryInitializer=null;STATIC_BASE=8;STATICTOP=STATIC_BASE+16752;__ATINIT__.push();var memoryInitializer="just_do.html.mem";var tempDoublePtr=Runtime.alignMemory(allocate(12,"i8",ALLOC_STATIC),8);assert(tempDoublePtr%8==0);function copyTempFloat(ptr){HEAP8[tempDoublePtr]=HEAP8[ptr];HEAP8[tempDoublePtr+1]=HEAP8[ptr+1];HEAP8[tempDoublePtr+2]=HEAP8[ptr+2];HEAP8[tempDoublePtr+3]=HEAP8[ptr+3]}function copyTempDouble(ptr){HEAP8[tempDoublePtr]=HEAP8[ptr];HEAP8[tempDoublePtr+1]=HEAP8[ptr+1];HEAP8[tempDoublePtr+2]=HEAP8[ptr+2];HEAP8[tempDoublePtr+3]=HEAP8[ptr+3];HEAP8[tempDoublePtr+4]=HEAP8[ptr+4];HEAP8[tempDoublePtr+5]=HEAP8[ptr+5];HEAP8[tempDoublePtr+6]=HEAP8[ptr+6];HEAP8[tempDoublePtr+7]=HEAP8[ptr+7]}var GL={counter:1,lastError:0,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],uniforms:[],shaders:[],vaos:[],contexts:[],byteSizeByTypeRoot:5120,byteSizeByType:[1,1,2,2,4,4,4,2,3,4,8],programInfos:{},stringCache:{},packAlignment:4,unpackAlignment:4,init:(function(){GL.miniTempBuffer=new Float32Array(GL.MINI_TEMP_BUFFER_SIZE);for(var i=0;i<GL.MINI_TEMP_BUFFER_SIZE;i++){GL.miniTempBufferViews[i]=GL.miniTempBuffer.subarray(0,i+1)}}),recordError:function recordError(errorCode){if(!GL.lastError){GL.lastError=errorCode}},getNewId:(function(table){var ret=GL.counter++;for(var i=table.length;i<ret;i++){table[i]=null}return ret}),MINI_TEMP_BUFFER_SIZE:16,miniTempBuffer:null,miniTempBufferViews:[0],getSource:(function(shader,count,string,length){var source="";for(var i=0;i<count;++i){var frag;if(length){var len=HEAP32[length+i*4>>2];if(len<0){frag=Pointer_stringify(HEAP32[string+i*4>>2])}else{frag=Pointer_stringify(HEAP32[string+i*4>>2],len)}}else{frag=Pointer_stringify(HEAP32[string+i*4>>2])}source+=frag}return source}),computeImageSize:(function(width,height,sizePerPixel,alignment){function roundedToNextMultipleOf(x,y){return Math.floor((x+y-1)/y)*y}var plainRowSize=width*sizePerPixel;var alignedRowSize=roundedToNextMultipleOf(plainRowSize,alignment);return height<=0?0:(height-1)*alignedRowSize+plainRowSize}),get:(function(name_,p,type){if(!p){GL.recordError(1281);return}var ret=undefined;switch(name_){case 36346:ret=1;break;case 36344:if(type!=="Integer"){GL.recordError(1280)}return;case 36345:ret=0;break;case 34466:var formats=GLctx.getParameter(34467);ret=formats.length;break;case 35738:ret=5121;break;case 35739:ret=6408;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 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<result.length;++i){switch(type){case"Integer":HEAP32[p+i*4>>2]=result[i];break;case"Float":HEAPF32[p+i*4>>2]=result[i];break;case"Boolean":HEAP8[p+i>>0]=result[i]?1:0;break;default:throw"internal glGet error, bad type: "+type}}return}else if(result instanceof WebGLBuffer||result instanceof WebGLProgram||result instanceof WebGLFramebuffer||result instanceof WebGLRenderbuffer||result instanceof WebGLTexture){ret=result.name|0}else{GL.recordError(1280);return}break;default:GL.recordError(1280);return}}switch(type){case"Integer":HEAP32[p>>2]=ret;break;case"Float":HEAPF32[p>>2]=ret;break;case"Boolean":HEAP8[p>>0]=ret?1:0;break;default:throw"internal glGet error, bad type: "+type}}),getTexPixelData:(function(type,format,width,height,pixels,internalFormat){var sizePerPixel;switch(type){case 5121:switch(format){case 6406:case 6409:sizePerPixel=1;break;case 6407:sizePerPixel=3;break;case 6408:sizePerPixel=4;break;case 6410:sizePerPixel=2;break;default:GL.recordError(1280);return{pixels:null,internalFormat:0}}break;case 5123:if(format==6402){sizePerPixel=2}else{GL.recordError(1280);return{pixels:null,internalFormat:0}}break;case 5125:if(format==6402){sizePerPixel=4}else{GL.recordError(1280);return{pixels:null,internalFormat:0}}break;case 34042:sizePerPixel=4;break;case 33635:case 32819:case 32820:sizePerPixel=2;break;case 5126:switch(format){case 6407:sizePerPixel=3*4;break;case 6408:sizePerPixel=4*4;break;default:GL.recordError(1280);return{pixels:null,internalFormat:0}}internalFormat=GLctx.RGBA;break;case 36193:switch(format){case 6403:sizePerPixel=2;break;case 33399:sizePerPixel=2*2;break;case 6407:sizePerPixel=3*2;break;case 6408:sizePerPixel=4*2;break;default:GL.recordError(1280);return{pixels:null,internalFormat:0}}break;default:GL.recordError(1280);return{pixels:null,internalFormat:0}}var bytes=GL.computeImageSize(width,height,sizePerPixel,GL.unpackAlignment);if(type==5121){pixels=HEAPU8.subarray(pixels,pixels+bytes)}else if(type==5126){pixels=HEAPF32.subarray(pixels>>2,pixels+bytes>>2)}else if(type==5125||type==34042){pixels=HEAPU32.subarray(pixels>>2,pixels+bytes>>2)}else{pixels=HEAPU16.subarray(pixels>>1,pixels+bytes>>1)}return{pixels:pixels,internalFormat:internalFormat}}),validateBufferTarget:(function(target){switch(target){case 34962:case 34963:case 36662:case 36663:case 35051:case 35052:case 35882:case 35982:case 35345:return true;default:return false}}),createContext:(function(canvas,webGLContextAttributes){if(typeof webGLContextAttributes.majorVersion==="undefined"&&typeof webGLContextAttributes.minorVersion==="undefined"){webGLContextAttributes.majorVersion=1;webGLContextAttributes.minorVersion=0}var ctx;var errorInfo="?";function onContextCreationError(event){errorInfo=event.statusMessage||errorInfo}try{canvas.addEventListener("webglcontextcreationerror",onContextCreationError,false);try{if(webGLContextAttributes.majorVersion==1&&webGLContextAttributes.minorVersion==0){ctx=canvas.getContext("webgl",webGLContextAttributes)||canvas.getContext("experimental-webgl",webGLContextAttributes)}else if(webGLContextAttributes.majorVersion==2&&webGLContextAttributes.minorVersion==0){ctx=canvas.getContext("webgl2",webGLContextAttributes)||canvas.getContext("experimental-webgl2",webGLContextAttributes)}else{throw"Unsupported WebGL context version "+majorVersion+"."+minorVersion+"!"}}finally{canvas.removeEventListener("webglcontextcreationerror",onContextCreationError,false)}if(!ctx)throw":("}catch(e){Module.print("Could not create canvas: "+[errorInfo,e,JSON.stringify(webGLContextAttributes)]);return 0}if(!ctx)return 0;var handle=GL.getNewId(GL.contexts);var context={handle:handle,version:webGLContextAttributes.majorVersion,GLctx:ctx};if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;if(typeof webGLContextAttributes["webGLContextAttributes"]==="undefined"||webGLContextAttributes.enableExtensionsByDefault){GL.initExtensions(context)}return handle}),makeContextCurrent:(function(contextHandle){var context=GL.contexts[contextHandle];if(!context)return false;GLctx=Module.ctx=context.GLctx;GL.currentContext=context;return true}),getContext:(function(contextHandle){return GL.contexts[contextHandle]}),deleteContext:(function(contextHandle){if(GL.currentContext===GL.contexts[contextHandle])GL.currentContext=0;if(typeof JSEvents==="object")JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].canvas);if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas)GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined;GL.contexts[contextHandle]=null}),initExtensions:(function(context){if(!context)context=GL.currentContext;if(context.initExtensionsDone)return;context.initExtensionsDone=true;var GLctx=context.GLctx;context.maxVertexAttribs=GLctx.getParameter(GLctx.MAX_VERTEX_ATTRIBS);context.compressionExt=GLctx.getExtension("WEBGL_compressed_texture_s3tc")||GLctx.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||GLctx.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");context.anisotropicExt=GLctx.getExtension("EXT_texture_filter_anisotropic")||GLctx.getExtension("MOZ_EXT_texture_filter_anisotropic")||GLctx.getExtension("WEBKIT_EXT_texture_filter_anisotropic");context.floatExt=GLctx.getExtension("OES_texture_float");context.instancedArraysExt=GLctx.getExtension("ANGLE_instanced_arrays");context.vaoExt=GLctx.getExtension("OES_vertex_array_object");if(context.version===2){context.drawBuffersExt=(function(n,bufs){GLctx.drawBuffers(n,bufs)})}else{var ext=GLctx.getExtension("WEBGL_draw_buffers");if(ext){context.drawBuffersExt=(function(n,bufs){ext.drawBuffersWEBGL(n,bufs)})}}var automaticallyEnabledExtensions=["OES_texture_float","OES_texture_half_float","OES_standard_derivatives","OES_vertex_array_object","WEBGL_compressed_texture_s3tc","WEBGL_depth_texture","OES_element_index_uint","EXT_texture_filter_anisotropic","ANGLE_instanced_arrays","OES_texture_float_linear","OES_texture_half_float_linear","WEBGL_compressed_texture_atc","WEBGL_compressed_texture_pvrtc","EXT_color_buffer_half_float","WEBGL_color_buffer_float","EXT_frag_depth","EXT_sRGB","WEBGL_draw_buffers","WEBGL_shared_resources","EXT_shader_texture_lod"];function shouldEnableAutomatically(extension){var ret=false;automaticallyEnabledExtensions.forEach((function(include){if(ext.indexOf(include)!=-1){ret=true}}));return ret}GLctx.getSupportedExtensions().forEach((function(ext){ext=ext.replace("MOZ_","").replace("WEBKIT_","");if(automaticallyEnabledExtensions.indexOf(ext)!=-1){GLctx.getExtension(ext)}}))}),populateUniformTable:(function(program){var p=GL.programs[program];GL.programInfos[program]={uniforms:{},maxUniformLength:0,maxAttributeLength:-1};var ptable=GL.programInfos[program];var utable=ptable.uniforms;var numUniforms=GLctx.getProgramParameter(p,GLctx.ACTIVE_UNIFORMS);for(var i=0;i<numUniforms;++i){var u=GLctx.getActiveUniform(p,i);var name=u.name;ptable.maxUniformLength=Math.max(ptable.maxUniformLength,name.length+1);if(name.indexOf("]",name.length-1)!==-1){var ls=name.lastIndexOf("[");name=name.slice(0,ls)}var loc=GLctx.getUniformLocation(p,name);var id=GL.getNewId(GL.uniforms);utable[name]=[u.size,id];GL.uniforms[id]=loc;for(var j=1;j<u.size;++j){var n=name+"["+j+"]";loc=GLctx.getUniformLocation(p,n);id=GL.getNewId(GL.uniforms);GL.uniforms[id]=loc}}})};function _glClearColor(x0,x1,x2,x3){GLctx.clearColor(x0,x1,x2,x3)}function _emscripten_get_now(){if(!_emscripten_get_now.actual){if(ENVIRONMENT_IS_NODE){_emscripten_get_now.actual=function _emscripten_get_now_actual(){var t=process["hrtime"]();return t[0]*1e3+t[1]/1e6}}else if(typeof dateNow!=="undefined"){_emscripten_get_now.actual=dateNow}else if((ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&self["performance"]&&self["performance"]["now"]){_emscripten_get_now.actual=function _emscripten_get_now_actual(){return self["performance"]["now"]()}}else{_emscripten_get_now.actual=Date.now}}return _emscripten_get_now.actual()}var GLFW={Window:(function(id,width,height,title,monitor,share){this.id=id;this.x=0;this.y=0;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.shouldClose=0;this.title=null;this.windowPosFunc=null;this.windowSizeFunc=null;this.windowCloseFunc=null;this.windowRefreshFunc=null;this.windowFocusFunc=null;this.windowIconifyFunc=null;this.framebufferSizeFunc=null;this.mouseButtonFunc=null;this.cursorPosFunc=null;this.cursorEnterFunc=null;this.scrollFunc=null;this.keyFunc=null;this.charFunc=null;this.userptr=null}),WindowFromId:(function(id){if(id<=0||!GLFW.windows)return null;return GLFW.windows[id-1]}),errorFunc:null,monitorFunc:null,active: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,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},DOMToGLFWKeyCode:(function(keycode){switch(keycode){case 32:return 32;case 222:return 39;case 188:return 44;case 173: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 97: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 94;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:(function(win){var mod=0;if(win.keys[16])mod|=1;if(win.keys[17])mod|=2;if(win.keys[18])mod|=4;if(win.keys[91])mod|=8;return mod}),onKeyPress:(function(event){if(!GLFW.active||!GLFW.active.charFunc)return;var charCode=event.charCode;if(charCode==0||charCode>=0&&charCode<=31)return;Runtime.dynCall("vii",GLFW.active.charFunc,[GLFW.active.id,charCode])}),onKeyChanged:(function(event,status){if(!GLFW.active)return;var key=GLFW.DOMToGLFWKeyCode(event.keyCode);if(key==-1)return;GLFW.active.keys[key]=status;if(!GLFW.active.keyFunc)return;Runtime.dynCall("viiiii",GLFW.active.keyFunc,[GLFW.active.id,key,event.keyCode,status,GLFW.getModBits(GLFW.active)])}),onKeydown:(function(event){GLFW.onKeyChanged(event,1);if(event.keyCode===8||event.keyCode===9){event.preventDefault()}}),onKeyup:(function(event){GLFW.onKeyChanged(event,0)}),onMousemove:(function(event){if(!GLFW.active)return;Browser.calculateMouseEvent(event);if(event.target!=Module["canvas"]||!GLFW.active.cursorPosFunc)return;Runtime.dynCall("vidd",GLFW.active.cursorPosFunc,[GLFW.active.id,Browser.mouseX,Browser.mouseY])}),onMouseButtonChanged:(function(event,status){if(!GLFW.active||!GLFW.active.mouseButtonFunc)return;Browser.calculateMouseEvent(event);if(event.target!=Module["canvas"])return;if(status==1){try{event.target.setCapture()}catch(e){}}var eventButton=event["button"];if(eventButton>0){if(eventButton==1){eventButton=2}else{eventButton=1}}Runtime.dynCall("viiii",GLFW.active.mouseButtonFunc,[GLFW.active.id,eventButton,status,GLFW.getModBits(GLFW.active)])}),onMouseButtonDown:(function(event){if(!GLFW.active)return;GLFW.active.buttons|=1<<event["button"];GLFW.onMouseButtonChanged(event,1)}),onMouseButtonUp:(function(event){if(!GLFW.active)return;GLFW.active.buttons&=~(1<<event["button"]);GLFW.onMouseButtonChanged(event,0)}),onMouseWheel:(function(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=0;if(event.type=="mousewheel"){sx=event.wheelDeltaX;sy=event.wheelDeltaY}else{sx=event.deltaX;sy=event.deltaY}Runtime.dynCall("vidd",GLFW.active.scrollFunc,[GLFW.active.id,sx,sy]);event.preventDefault()}),onFullScreenEventChange:(function(event){if(!GLFW.active)return;if(document["fullScreen"]||document["mozFullScreen"]||document["webkitIsFullScreen"]){GLFW.active.storedX=GLFW.active.x;GLFW.active.storedY=GLFW.active.y;GLFW.active.x=GLFW.active.y=0;GLFW.active.storedWidth=GLFW.active.width;GLFW.active.storedHeight=GLFW.active.height;GLFW.active.width=screen.width;GLFW.active.height=screen.height}else{document.removeEventListener("fullscreenchange",GLFW.onFullScreenEventChange,true);document.removeEventListener("mozfullscreenchange",GLFW.onFullScreenEventChange,true);document.removeEventListener("webkitfullscreenchange",GLFW.onFullScreenEventChange,true);GLFW.active.width=GLFW.active.storedWidth;GLFW.active.height=GLFW.active.storedHeight}Browser.setCanvasSize(GLFW.active.width,GLFW.active.height);if(!GLFW.active.windowResizeFunc)return;Runtime.dynCall("viii",GLFW.active.windowResizeFunc,[GLFW.active.id,width,height])}),requestFullScreen:(function(){var RFS=Module["canvas"]["requestFullscreen"]||Module["canvas"]["requestFullScreen"]||Module["canvas"]["mozRequestFullScreen"]||Module["canvas"]["webkitRequestFullScreen"]||(function(){});RFS.apply(Module["canvas"],[])}),cancelFullScreen:(function(){var CFS=document["exitFullscreen"]||document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["webkitCancelFullScreen"]||(function(){});CFS.apply(document,[])}),getTime:(function(){return _emscripten_get_now()/1e3}),setWindowTitle:(function(winid,title){var win=GLFW.WindowFromId(winid);if(!win)return;win.title=Pointer_stringify(title);if(GLFW.active.id==win.id){document.title=win.title}}),setKeyCallback:(function(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return;win.keyFunc=cbfun}),setCharCallback:(function(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return;win.charFunc=cbfun}),setMouseButtonCallback:(function(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return;win.mouseButtonFunc=cbfun}),setCursorPosCallback:(function(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return;win.cursorPosFunc=cbfun}),setScrollCallback:(function(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return;win.scrollFunc=cbfun}),setWindowSizeCallback:(function(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return;win.windowSizeFunc=cbfun}),setWindowCloseCallback:(function(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return;win.windowCloseFunc=cbfun}),setWindowRefreshCallback:(function(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return;win.windowRefreshFunc=cbfun}),getKey:(function(winid,key){var win=GLFW.WindowFromId(winid);if(!win)return 0;return win.keys[key]}),getMouseButton:(function(winid,button){var win=GLFW.WindowFromId(winid);if(!win)return 0;return(win.buttons&1<<button)>0}),getCursorPos:(function(winid,x,y){setValue(x,Browser.mouseX,"double");setValue(y,Browser.mouseY,"double")}),getMousePos:(function(winid,x,y){setValue(x,Browser.mouseX,"i32");setValue(y,Browser.mouseY,"i32")}),setCursorPos:(function(winid,x,y){}),getWindowPos:(function(winid,x,y){var wx=0;var wy=0;var win=GLFW.WindowFromId(winid);if(win){wx=win.x;wy=win.y}setValue(x,wx,"i32");setValue(y,wy,"i32")}),setWindowPos:(function(winid,x,y){var win=GLFW.WindowFromId(winid);if(!win)return;win.x=x;win.y=y}),getWindowSize:(function(winid,width,height){var ww=0;var wh=0;var win=GLFW.WindowFromId(winid);if(win){ww=win.width;wh=win.height}setValue(width,ww,"i32");setValue(height,wh,"i32")}),setWindowSize:(function(winid,width,height){var win=GLFW.WindowFromId(winid);if(!win)return;if(GLFW.active.id==win.id){if(width==screen.width&&height==screen.height){GLFW.requestFullScreen()}else{GLFW.cancelFullScreen();Browser.setCanvasSize(width,height);win.width=width;win.height=height}}if(!win.windowResizeFunc)return;Runtime.dynCall("viii",win.windowResizeFunc,[win.id,width,height])}),createWindow:(function(width,height,title,monitor,share){var i,id;for(i=0;i<GLFW.windows.length&&GLFW.windows[i]!==null;i++);if(i>0)throw"glfwCreateWindow only supports one window at time currently";id=i+1;if(width<=0||height<=0)return 0;if(monitor){GLFW.requestFullScreen()}else{Browser.setCanvasSize(width,height)}for(i=0;i<GLFW.windows.length&&GLFW.windows[i]==null;i++);if(i==GLFW.windows.length){var contextAttributes={antialias:GLFW.hints[135181]>1,depth:GLFW.hints[135173]>0,stencil:GLFW.hints[135174]>0};Module.ctx=Browser.createContext(Module["canvas"],true,true,contextAttributes)}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:(function(winid){var win=GLFW.WindowFromId(winid);if(!win)return;if(win.windowCloseFunc)Runtime.dynCall("vi",win.windowCloseFunc,[win.id]);GLFW.windows[win.id-1]=null;if(GLFW.active.id==win.id)GLFW.active=null;for(var i=0;i<GLFW.windows.length;i++)if(GLFW.windows[i]!==null)return;Module.ctx=Browser.destroyContext(Module["canvas"],true,true)}),swapBuffers:(function(winid){}),GLFW2ParamToGLFW3Param:(function(param){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]})};function _glfwGetCursorPos(winid,x,y){GLFW.getCursorPos(winid,x,y)}function _glLinkProgram(program){GLctx.linkProgram(GL.programs[program]);GL.programInfos[program]=null;GL.populateUniformTable(program)}function _glBindTexture(target,texture){GLctx.bindTexture(target,texture?GL.textures[texture]:null)}var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"};var ___errno_state=0;function ___setErrNo(value){HEAP32[___errno_state>>2]=value;return value}var PATH={splitPath:(function(filename){var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)}),normalizeArray:(function(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:(function(path){var isAbsolute=path.charAt(0)==="/",trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter((function(p){return!!p})),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path}),dirname:(function(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:(function(path){if(path==="/")return"/";var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)}),extname:(function(path){return PATH.splitPath(path)[3]}),join:(function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))}),join2:(function(l,r){return PATH.normalize(l+"/"+r)}),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.charAt(0)==="/"}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter((function(p){return!!p})),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."}),relative:(function(from,to){from=PATH.resolve(from).substr(1);to=PATH.resolve(to).substr(1);function trim(arr){var start=0;for(;start<arr.length;start++){if(arr[start]!=="")break}var end=arr.length-1;for(;end>=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<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++){outputParts.push("..")}outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join("/")})};var TTY={ttys:[],init:(function(){}),shutdown:(function(){}),register:(function(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)}),stream_ops:{open:(function(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}stream.tty=tty;stream.seekable=false}),close:(function(stream){if(stream.tty.output.length){stream.tty.ops.put_char(stream.tty,10)}}),read:(function(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(ERRNO_CODES.ENXIO)}var bytesRead=0;for(var i=0;i<length;i++){var result;try{result=stream.tty.ops.get_char(stream.tty)}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EIO)}if(result===undefined&&bytesRead===0){throw new FS.ErrnoError(ERRNO_CODES.EAGAIN)}if(result===null||result===undefined)break;bytesRead++;buffer[offset+i]=result}if(bytesRead){stream.node.timestamp=Date.now()}return bytesRead}),write:(function(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.put_char){throw new FS.ErrnoError(ERRNO_CODES.ENXIO)}for(var i=0;i<length;i++){try{stream.tty.ops.put_char(stream.tty,buffer[offset+i])}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EIO)}}if(length){stream.node.timestamp=Date.now()}return i})},default_tty_ops:{get_char:(function(tty){if(!tty.input.length){var result=null;if(ENVIRONMENT_IS_NODE){result=process["stdin"]["read"]();if(!result){if(process["stdin"]["_readableState"]&&process["stdin"]["_readableState"]["ended"]){return null}return undefined}}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}tty.input=intArrayFromString(result,true)}return tty.input.shift()}),put_char:(function(tty,val){if(val===null||val===10){Module["print"](tty.output.join(""));tty.output=[]}else{tty.output.push(TTY.utf8.processCChar(val))}})},default_tty1_ops:{put_char:(function(tty,val){if(val===null||val===10){Module["printErr"](tty.output.join(""));tty.output=[]}else{tty.output.push(TTY.utf8.processCChar(val))}})}};var MEMFS={ops_table:null,mount:(function(mount){return MEMFS.createNode(null,"/",16384|511,0)}),createNode:(function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap}},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}return node}),getFileDataAsRegularArray:(function(node){if(node.contents&&node.contents.subarray){var arr=[];for(var i=0;i<node.usedBytes;++i)arr.push(node.contents[i]);return arr}return node.contents}),getFileDataAsTypedArray:(function(node){if(!node.contents)return new Uint8Array;if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents)}),expandFileStorage:(function(node,newCapacity){if(node.contents&&node.contents.subarray&&newCapacity>node.contents.length){node.contents=MEMFS.getFileDataAsRegularArray(node);node.usedBytes=node.contents.length}if(!node.contents||node.contents.subarray){var prevCapacity=node.contents?node.contents.buffer.byteLength:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity<CAPACITY_DOUBLING_MAX?2:1.125)|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);return}if(!node.contents&&newCapacity>0)node.contents=[];while(node.contents.length<newCapacity)node.contents.push(0)}),resizeFileStorage:(function(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0;return}if(!node.contents||node.contents.subarray){var oldContents=node.contents;node.contents=new Uint8Array(new ArrayBuffer(newSize));if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize;return}if(!node.contents)node.contents=[];if(node.contents.length>newSize)node.contents.length=newSize;else while(node.contents.length<newSize)node.contents.push(0);node.usedBytes=newSize}),node_ops:{getattr:(function(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:(function(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:(function(parent,name){throw FS.genericErrors[ERRNO_CODES.ENOENT]}),mknod:(function(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)}),rename:(function(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(ERRNO_CODES.ENOTEMPTY)}}}delete old_node.parent.contents[old_node.name];old_node.name=new_name;new_dir.contents[new_name]=old_node;old_node.parent=new_dir}),unlink:(function(parent,name){delete parent.contents[name]}),rmdir:(function(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY)}delete parent.contents[name]}),readdir:(function(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries}),symlink:(function(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node}),readlink:(function(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}return node.link})},stream_ops:{read:(function(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;i<size;i++)buffer[offset+i]=contents[position+i]}return size}),write:(function(stream,buffer,offset,length,position,canOwn){if(!length)return 0;var node=stream.node;node.timestamp=Date.now();if(buffer.subarray&&(!node.contents||node.contents.subarray)){if(canOwn){node.contents=buffer.subarray(offset,offset+length);node.usedBytes=length;return length}else if(node.usedBytes===0&&position===0){node.contents=new Uint8Array(buffer.subarray(offset,offset+length));node.usedBytes=length;return length}else if(position+length<=node.usedBytes){node.contents.set(buffer.subarray(offset,offset+length),position);return length}}MEMFS.expandFileStorage(node,position+length);if(node.contents.subarray&&buffer.subarray)node.contents.set(buffer.subarray(offset,offset+length),position);else for(var i=0;i<length;i++){node.contents[position+i]=buffer[offset+i]}node.usedBytes=Math.max(node.usedBytes,position+length);return length}),llseek:(function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){position+=stream.node.usedBytes}}if(position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}return position}),allocate:(function(stream,offset,length){MEMFS.expandFileStorage(stream.node,offset+length);stream.node.usedBytes=Math.max(stream.node.usedBytes,offset+length)}),mmap:(function(stream,buffer,offset,length,position,prot,flags){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}var ptr;var allocated;var contents=stream.node.contents;if(!(flags&2)&&(contents.buffer===buffer||contents.buffer===buffer.buffer)){allocated=false;ptr=contents.byteOffset}else{if(position>0||position+length<stream.node.usedBytes){if(contents.subarray){contents=contents.subarray(position,position+length)}else{contents=Array.prototype.slice.call(contents,position,position+length)}}allocated=true;ptr=_malloc(length);if(!ptr){throw new FS.ErrnoError(ERRNO_CODES.ENOMEM)}buffer.set(contents,ptr)}return{ptr:ptr,allocated:allocated}})}};var IDBFS={dbs:{},indexedDB:(function(){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:(function(mount,populate,callback){IDBFS.getLocalSet(mount,(function(err,local){if(err)return callback(err);IDBFS.getRemoteSet(mount,(function(err,remote){if(err)return callback(err);var src=populate?remote:local;var dst=populate?local:remote;IDBFS.reconcile(src,dst,callback)}))}))}),getDB:(function(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)}req.onupgradeneeded=(function(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)}fileStore.createIndex("timestamp","timestamp",{unique:false})});req.onsuccess=(function(){db=req.result;IDBFS.dbs[name]=db;callback(null,db)});req.onerror=(function(){callback(this.error)})}),getLocalSet:(function(mount,callback){var entries={};function isRealDir(p){return p!=="."&&p!==".."}function toAbsolute(root){return(function(p){return 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:(function(mount,callback){var entries={};IDBFS.getDB(mount.mountpoint,(function(err,db){if(err)return callback(err);var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readonly");transaction.onerror=(function(){callback(this.error)});var store=transaction.objectStore(IDBFS.DB_STORE_NAME);var index=store.index("timestamp");index.openKeyCursor().onsuccess=(function(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()})}))}),loadLocalEntry:(function(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:(function(path,entry,callback){try{if(FS.isDir(entry.mode)){FS.mkdir(path,entry.mode)}else if(FS.isFile(entry.mode)){FS.writeFile(path,entry.contents,{encoding:"binary",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:(function(path,callback){try{var lookup=FS.lookupPath(path);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:(function(store,path,callback){var req=store.get(path);req.onsuccess=(function(event){callback(null,event.target.result)});req.onerror=(function(){callback(this.error)})}),storeRemoteEntry:(function(store,path,entry,callback){var req=store.put(entry,path);req.onsuccess=(function(){callback(null)});req.onerror=(function(){callback(this.error)})}),removeRemoteEntry:(function(store,path,callback){var req=store.delete(path);req.onsuccess=(function(){callback(null)});req.onerror=(function(){callback(this.error)})}),reconcile:(function(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>e2.timestamp){create.push(key);total++}}));var remove=[];Object.keys(dst.entries).forEach((function(key){var e=dst.entries[key];var e2=src.entries[key];if(!e2){remove.push(key);total++}}));if(!total){return callback(null)}var errored=false;var completed=0;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){if(!done.errored){done.errored=true;return callback(err)}return}if(++completed>=total){return callback(null)}}transaction.onerror=(function(){done(this.error)});create.sort().forEach((function(path){if(dst.type==="local"){IDBFS.loadRemoteEntry(store,path,(function(err,entry){if(err)return done(err);IDBFS.storeLocalEntry(path,entry,done)}))}else{IDBFS.loadLocalEntry(path,(function(err,entry){if(err)return done(err);IDBFS.storeRemoteEntry(store,path,entry,done)}))}}));remove.sort().reverse().forEach((function(path){if(dst.type==="local"){IDBFS.removeLocalEntry(path,done)}else{IDBFS.removeRemoteEntry(store,path,done)}}))})};var NODEFS={isWindows:false,staticInit:(function(){NODEFS.isWindows=!!process.platform.match(/^win/)}),mount:(function(mount){assert(ENVIRONMENT_IS_NODE);return NODEFS.createNode(null,"/",NODEFS.getMode(mount.opts.root),0)}),createNode:(function(parent,name,mode,dev){if(!FS.isDir(mode)&&!FS.isFile(mode)&&!FS.isLink(mode)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node=FS.createNode(parent,name,mode);node.node_ops=NODEFS.node_ops;node.stream_ops=NODEFS.stream_ops;return node}),getMode:(function(path){var stat;try{stat=fs.lstatSync(path);if(NODEFS.isWindows){stat.mode=stat.mode|(stat.mode&146)>>1}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}return stat.mode}),realPath:(function(node){var parts=[];while(node.parent!==node){parts.push(node.name);node=node.parent}parts.push(node.mount.opts.root);parts.reverse();return PATH.join.apply(null,parts)}),flagsToPermissionStringMap:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},flagsToPermissionString:(function(flags){if(flags in NODEFS.flagsToPermissionStringMap){return NODEFS.flagsToPermissionStringMap[flags]}else{return flags}}),node_ops:{getattr:(function(node){var path=NODEFS.realPath(node);var stat;try{stat=fs.lstatSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}if(NODEFS.isWindows&&!stat.blksize){stat.blksize=4096}if(NODEFS.isWindows&&!stat.blocks){stat.blocks=(stat.size+stat.blksize-1)/stat.blksize|0}return{dev:stat.dev,ino:stat.ino,mode:stat.mode,nlink:stat.nlink,uid:stat.uid,gid:stat.gid,rdev:stat.rdev,size:stat.size,atime:stat.atime,mtime:stat.mtime,ctime:stat.ctime,blksize:stat.blksize,blocks:stat.blocks}}),setattr:(function(node,attr){var path=NODEFS.realPath(node);try{if(attr.mode!==undefined){fs.chmodSync(path,attr.mode);node.mode=attr.mode}if(attr.timestamp!==undefined){var date=new Date(attr.timestamp);fs.utimesSync(path,date,date)}if(attr.size!==undefined){fs.truncateSync(path,attr.size)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),lookup:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);var mode=NODEFS.getMode(path);return NODEFS.createNode(parent,name,mode)}),mknod:(function(parent,name,mode,dev){var node=NODEFS.createNode(parent,name,mode,dev);var path=NODEFS.realPath(node);try{if(FS.isDir(node.mode)){fs.mkdirSync(path,node.mode)}else{fs.writeFileSync(path,"",{mode:node.mode})}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}return node}),rename:(function(oldNode,newDir,newName){var oldPath=NODEFS.realPath(oldNode);var newPath=PATH.join2(NODEFS.realPath(newDir),newName);try{fs.renameSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),unlink:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.unlinkSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),rmdir:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.rmdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),readdir:(function(node){var path=NODEFS.realPath(node);try{return fs.readdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),symlink:(function(parent,newName,oldPath){var newPath=PATH.join2(NODEFS.realPath(parent),newName);try{fs.symlinkSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),readlink:(function(node){var path=NODEFS.realPath(node);try{return fs.readlinkSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}})},stream_ops:{open:(function(stream){var path=NODEFS.realPath(stream.node);try{if(FS.isFile(stream.node.mode)){stream.nfd=fs.openSync(path,NODEFS.flagsToPermissionString(stream.flags))}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),close:(function(stream){try{if(FS.isFile(stream.node.mode)&&stream.nfd){fs.closeSync(stream.nfd)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),read:(function(stream,buffer,offset,length,position){if(length===0)return 0;var nbuffer=new Buffer(length);var res;try{res=fs.readSync(stream.nfd,nbuffer,0,length,position)}catch(e){throw new FS.ErrnoError(ERRNO_CODES[e.code])}if(res>0){for(var i=0;i<res;i++){buffer[offset+i]=nbuffer[i]}}return res}),write:(function(stream,buffer,offset,length,position){var nbuffer=new Buffer(buffer.subarray(offset,offset+length));var res;try{res=fs.writeSync(stream.nfd,nbuffer,0,length,position)}catch(e){throw new FS.ErrnoError(ERRNO_CODES[e.code])}return res}),llseek:(function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){try{var stat=fs.fstatSync(stream.nfd);position+=stat.size}catch(e){throw new FS.ErrnoError(ERRNO_CODES[e.code])}}}if(position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}return position})}};var _stdin=allocate(1,"i32*",ALLOC_STATIC);var _stdout=allocate(1,"i32*",ALLOC_STATIC);var _stderr=allocate(1,"i32*",ALLOC_STATIC);function _fflush(stream){}var FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},handleFSError:(function(e){if(!(e instanceof FS.ErrnoError))throw e+" : "+stackTrace();return ___setErrNo(e.errno)}),lookupPath:(function(path,opts){path=PATH.resolve(FS.cwd(),path);opts=opts||{};if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};for(var key in defaults){if(opts[key]===undefined){opts[key]=defaults[key]}}if(opts.recurse_count>8){throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}var parts=PATH.normalizeArray(path.split("/").filter((function(p){return!!p})),false);var current=FS.root;var current_path="/";for(var i=0;i<parts.length;i++){var islast=i===parts.length-1;if(islast&&opts.parent){break}current=FS.lookupNode(current,parts[i]);current_path=PATH.join2(current_path,parts[i]);if(FS.isMountpoint(current)){if(!islast||islast&&opts.follow_mount){current=current.mounted.root}}if(!islast||opts.follow){var count=0;while(FS.isLink(current.mode)){var link=FS.readlink(current_path);current_path=PATH.resolve(PATH.dirname(current_path),link);var lookup=FS.lookupPath(current_path,{recurse_count:opts.recurse_count});current=lookup.node;if(count++>40){throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}}}}return{path:current_path,node:current}}),getPath:(function(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:(function(parentid,name){var hash=0;for(var i=0;i<name.length;i++){hash=(hash<<5)-hash+name.charCodeAt(i)|0}return(parentid+hash>>>0)%FS.nameTable.length}),hashAddNode:(function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node}),hashRemoveNode:(function(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:(function(parent,name){var err=FS.mayLookup(parent);if(err){throw new FS.ErrnoError(err,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:(function(parent,name,mode,rdev){if(!FS.FSNode){FS.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});FS.FSNode.prototype={};var readMode=292|73;var writeMode=146;Object.defineProperties(FS.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)})}})}var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node}),destroyNode:(function(node){FS.hashRemoveNode(node)}),isRoot:(function(node){return node===node.parent}),isMountpoint:(function(node){return!!node.mounted}),isFile:(function(mode){return(mode&61440)===32768}),isDir:(function(mode){return(mode&61440)===16384}),isLink:(function(mode){return(mode&61440)===40960}),isChrdev:(function(mode){return(mode&61440)===8192}),isBlkdev:(function(mode){return(mode&61440)===24576}),isFIFO:(function(mode){return(mode&61440)===4096}),isSocket:(function(mode){return(mode&49152)===49152}),flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:(function(str){var flags=FS.flagModes[str];if(typeof flags==="undefined"){throw new Error("Unknown file open mode: "+str)}return flags}),flagsToPermissionString:(function(flag){var accmode=flag&2097155;var perms=["r","w","rw"][accmode];if(flag&512){perms+="w"}return perms}),nodePermissions:(function(node,perms){if(FS.ignorePermissions){return 0}if(perms.indexOf("r")!==-1&&!(node.mode&292)){return ERRNO_CODES.EACCES}else if(perms.indexOf("w")!==-1&&!(node.mode&146)){return ERRNO_CODES.EACCES}else if(perms.indexOf("x")!==-1&&!(node.mode&73)){return ERRNO_CODES.EACCES}return 0}),mayLookup:(function(dir){var err=FS.nodePermissions(dir,"x");if(err)return err;if(!dir.node_ops.lookup)return ERRNO_CODES.EACCES;return 0}),mayCreate:(function(dir,name){try{var node=FS.lookupNode(dir,name);return ERRNO_CODES.EEXIST}catch(e){}return FS.nodePermissions(dir,"wx")}),mayDelete:(function(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var err=FS.nodePermissions(dir,"wx");if(err){return err}if(isdir){if(!FS.isDir(node.mode)){return ERRNO_CODES.ENOTDIR}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return ERRNO_CODES.EBUSY}}else{if(FS.isDir(node.mode)){return ERRNO_CODES.EISDIR}}return 0}),mayOpen:(function(node,flags){if(!node){return ERRNO_CODES.ENOENT}if(FS.isLink(node.mode)){return ERRNO_CODES.ELOOP}else if(FS.isDir(node.mode)){if((flags&2097155)!==0||flags&512){return ERRNO_CODES.EISDIR}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))}),MAX_OPEN_FDS:4096,nextfd:(function(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(ERRNO_CODES.EMFILE)}),getStream:(function(fd){return FS.streams[fd]}),createStream:(function(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=(function(){});FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:(function(){return this.node}),set:(function(val){this.node=val})},isRead:{get:(function(){return(this.flags&2097155)!==1})},isWrite:{get:(function(){return(this.flags&2097155)!==0})},isAppend:{get:(function(){return this.flags&1024})}})}var newStream=new FS.FSStream;for(var p in stream){newStream[p]=stream[p]}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream}),closeStream:(function(fd){FS.streams[fd]=null}),getStreamFromPtr:(function(ptr){return FS.streams[ptr-1]}),getPtrForStream:(function(stream){return stream?stream.fd+1:0}),chrdev_stream_ops:{open:(function(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:(function(){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)})},major:(function(dev){return dev>>8}),minor:(function(dev){return dev&255}),makedev:(function(ma,mi){return ma<<8|mi}),registerDevice:(function(dev,ops){FS.devices[dev]={stream_ops:ops}}),getDevice:(function(dev){return FS.devices[dev]}),getMounts:(function(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:(function(populate,callback){if(typeof populate==="function"){callback=populate;populate=false}var mounts=FS.getMounts(FS.root.mount);var completed=0;function done(err){if(err){if(!done.errored){done.errored=true;return callback(err)}return}if(++completed>=mounts.length){callback(null)}}mounts.forEach((function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)}))}),mount:(function(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}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(ERRNO_CODES.EBUSY)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}}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:(function(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach((function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.indexOf(current.mount)!==-1){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:(function(parent,name){return parent.node_ops.lookup(parent,name)}),mknod:(function(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(ERRNO_CODES.EINVAL)}var err=FS.mayCreate(parent,name);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return parent.node_ops.mknod(parent,name,mode,dev)}),create:(function(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)}),mkdir:(function(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)}),mkdev:(function(path,mode,dev){if(typeof dev==="undefined"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)}),symlink:(function(oldpath,newpath){if(!PATH.resolve(oldpath)){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}var newname=PATH.basename(newpath);var err=FS.mayCreate(parent,newname);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return parent.node_ops.symlink(parent,newname,oldpath)}),rename:(function(old_path,new_path){var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;try{lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(!old_dir||!new_dir)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(ERRNO_CODES.EXDEV)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH.relative(old_path,new_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}relative=PATH.relative(new_path,old_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var err=FS.mayDelete(old_dir,old_name,isdir);if(err){throw new FS.ErrnoError(err)}err=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(err){throw new FS.ErrnoError(err)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(new_dir!==old_dir){err=FS.nodePermissions(old_dir,"w");if(err){throw new FS.ErrnoError(err)}}try{if(FS.trackingDelegate["willMovePath"]){FS.trackingDelegate["willMovePath"](old_path,new_path)}}catch(e){console.log("FS.trackingDelegate['willMovePath']('"+old_path+"', '"+new_path+"') threw an exception: "+e.message)}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}try{if(FS.trackingDelegate["onMovePath"])FS.trackingDelegate["onMovePath"](old_path,new_path)}catch(e){console.log("FS.trackingDelegate['onMovePath']('"+old_path+"', '"+new_path+"') threw an exception: "+e.message)}}),rmdir:(function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var err=FS.mayDelete(parent,name,true);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}try{if(FS.trackingDelegate["willDeletePath"]){FS.trackingDelegate["willDeletePath"](path)}}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: "+e.message)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate["onDeletePath"])FS.trackingDelegate["onDeletePath"](path)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: "+e.message)}}),readdir:(function(path){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}return node.node_ops.readdir(node)}),unlink:(function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var err=FS.mayDelete(parent,name,false);if(err){if(err===ERRNO_CODES.EISDIR)err=ERRNO_CODES.EPERM;throw new FS.ErrnoError(err)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}try{if(FS.trackingDelegate["willDeletePath"]){FS.trackingDelegate["willDeletePath"](path)}}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: "+e.message)}parent.node_ops.unlink(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate["onDeletePath"])FS.trackingDelegate["onDeletePath"](path)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: "+e.message)}}),readlink:(function(path){var lookup=FS.lookupPath(path);var link=lookup.node;if(!link){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}if(!link.node_ops.readlink){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}return link.node_ops.readlink(link)}),stat:(function(path,dontFollow){var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}if(!node.node_ops.getattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return node.node_ops.getattr(node)}),lstat:(function(path){return FS.stat(path,true)}),chmod:(function(path,mode,dontFollow){var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})}),lchmod:(function(path,mode){FS.chmod(path,mode,true)}),fchmod:(function(fd,mode){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}FS.chmod(stream.node,mode)}),chown:(function(path,uid,gid,dontFollow){var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}node.node_ops.setattr(node,{timestamp:Date.now()})}),lchown:(function(path,uid,gid){FS.chown(path,uid,gid,true)}),fchown:(function(fd,uid,gid){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}FS.chown(stream.node,uid,gid)}),truncate:(function(path,len){if(len<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var err=FS.nodePermissions(node,"w");if(err){throw new FS.ErrnoError(err)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})}),ftruncate:(function(fd,len){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}FS.truncate(stream.node,len)}),utime:(function(path,atime,mtime){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})}),open:(function(path,flags,mode,fd_start,fd_end){if(path===""){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}flags=typeof flags==="string"?FS.modeStringToFlags(flags):flags;mode=typeof mode==="undefined"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path==="object"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}var created=false;if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(ERRNO_CODES.EEXIST)}}else{node=FS.mknod(path,mode,0);created=true}}if(!node){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}if(FS.isChrdev(node.mode)){flags&=~512}if(!created){var err=FS.mayOpen(node,flags);if(err){throw new FS.ErrnoError(err)}}if(flags&512){FS.truncate(node,0)}flags&=~(128|512);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false},fd_start,fd_end);if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module["logReadFiles"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1;Module["printErr"]("read file: "+path)}}try{if(FS.trackingDelegate["onOpenFile"]){var trackingFlags=0;if((flags&2097155)!==1){trackingFlags|=FS.tracking.openFlags.READ}if((flags&2097155)!==0){trackingFlags|=FS.tracking.openFlags.WRITE}FS.trackingDelegate["onOpenFile"](path,trackingFlags)}}catch(e){console.log("FS.trackingDelegate['onOpenFile']('"+path+"', flags) threw an exception: "+e.message)}return stream}),close:(function(stream){try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}}),llseek:(function(stream,offset,whence){if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}stream.position=stream.stream_ops.llseek(stream,offset,whence);stream.ungotten=[];return stream.position}),read:(function(stream,buffer,offset,length,position){if(length<0||position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!stream.stream_ops.read){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var seeking=true;if(typeof position==="undefined"){position=stream.position;seeking=false}else if(!stream.seekable){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead}),write:(function(stream,buffer,offset,length,position,canOwn){if(length<0||position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!stream.stream_ops.write){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if(stream.flags&1024){FS.llseek(stream,0,2)}var seeking=true;if(typeof position==="undefined"){position=stream.position;seeking=false}else if(!stream.seekable){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;try{if(stream.path&&FS.trackingDelegate["onWriteToFile"])FS.trackingDelegate["onWriteToFile"](stream.path)}catch(e){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+e.message)}return bytesWritten}),allocate:(function(stream,offset,length){if(offset<0||length<=0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP)}stream.stream_ops.allocate(stream,offset,length)}),mmap:(function(stream,buffer,offset,length,position,prot,flags){if((stream.flags&2097155)===1){throw new FS.ErrnoError(ERRNO_CODES.EACCES)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}return stream.stream_ops.mmap(stream,buffer,offset,length,position,prot,flags)}),ioctl:(function(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(ERRNO_CODES.ENOTTY)}return stream.stream_ops.ioctl(stream,cmd,arg)}),readFile:(function(path,opts){opts=opts||{};opts.flags=opts.flags||"r";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="";var utf8=new Runtime.UTF8Processor;for(var i=0;i<length;i++){ret+=utf8.processCChar(buf[i])}}else if(opts.encoding==="binary"){ret=buf}FS.close(stream);return ret}),writeFile:(function(path,data,opts){opts=opts||{};opts.flags=opts.flags||"w";opts.encoding=opts.encoding||"utf8";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"')}var stream=FS.open(path,opts.flags,opts.mode);if(opts.encoding==="utf8"){var utf8=new Runtime.UTF8Processor;var buf=new Uint8Array(utf8.processJSString(data));FS.write(stream,buf,0,buf.length,0,opts.canOwn)}else if(opts.encoding==="binary"){FS.write(stream,data,0,data.length,0,opts.canOwn)}FS.close(stream)}),cwd:(function(){return FS.currentPath}),chdir:(function(path){var lookup=FS.lookupPath(path,{follow:true});if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}var err=FS.nodePermissions(lookup.node,"x");if(err){throw new FS.ErrnoError(err)}FS.currentPath=lookup.path}),createDefaultDirectories:(function(){FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")}),createDefaultDevices:(function(){FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:(function(){return 0}),write:(function(){return 0})});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 random_device;if(typeof crypto!=="undefined"){var randomBuffer=new Uint8Array(1);random_device=(function(){crypto.getRandomValues(randomBuffer);return randomBuffer[0]})}else if(ENVIRONMENT_IS_NODE){random_device=(function(){return require("crypto").randomBytes(1)[0]})}else{random_device=(function(){return Math.random()*256|0})}FS.createDevice("/dev","random",random_device);FS.createDevice("/dev","urandom",random_device);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")}),createStandardStreams:(function(){if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"])}else{FS.symlink("/dev/tty","/dev/stdin")}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"])}else{FS.symlink("/dev/tty","/dev/stdout")}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"])}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin","r");HEAP32[_stdin>>2]=FS.getPtrForStream(stdin);assert(stdin.fd===0,"invalid handle for stdin ("+stdin.fd+")");var stdout=FS.open("/dev/stdout","w");HEAP32[_stdout>>2]=FS.getPtrForStream(stdout);assert(stdout.fd===1,"invalid handle for stdout ("+stdout.fd+")");var stderr=FS.open("/dev/stderr","w");HEAP32[_stderr>>2]=FS.getPtrForStream(stderr);assert(stderr.fd===2,"invalid handle for stderr ("+stderr.fd+")")}),ensureErrnoError:(function(){if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){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]};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[ERRNO_CODES.ENOENT].forEach((function(code){FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack="<generic error, no stack>"}))}),staticInit:(function(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices()}),init:(function(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:(function(){FS.init.initialized=false;for(var i=0;i<FS.streams.length;i++){var stream=FS.streams[i];if(!stream){continue}FS.close(stream)}}),getMode:(function(canRead,canWrite){var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode}),joinPath:(function(parts,forceRelative){var path=PATH.join.apply(null,parts);if(forceRelative&&path[0]=="/")path=path.substr(1);return path}),absolutePath:(function(relative,base){return PATH.resolve(base,relative)}),standardizePath:(function(path){return PATH.normalize(path)}),findObject:(function(path,dontResolveLastLink){var ret=FS.analyzePath(path,dontResolveLastLink);if(ret.exists){return ret.object}else{___setErrNo(ret.error);return null}}),analyzePath:(function(path,dontResolveLastLink){try{var lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});path=lookup.path}catch(e){}var ret={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var lookup=FS.lookupPath(path,{parent:true});ret.parentExists=true;ret.parentPath=lookup.path;ret.parentObject=lookup.node;ret.name=PATH.basename(path);lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});ret.exists=true;ret.path=lookup.path;ret.object=lookup.node;ret.name=lookup.node.name;ret.isRoot=lookup.path==="/"}catch(e){ret.error=e.errno}return ret}),createFolder:(function(parent,name,canRead,canWrite){var path=PATH.join2(typeof parent==="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(canRead,canWrite);return FS.mkdir(path,mode)}),createPath:(function(parent,path,canRead,canWrite){parent=typeof parent==="string"?parent:FS.getPath(parent);var parts=path.split("/").reverse();while(parts.length){var part=parts.pop();if(!part)continue;var current=PATH.join2(parent,part);try{FS.mkdir(current)}catch(e){}parent=current}return current}),createFile:(function(parent,name,properties,canRead,canWrite){var path=PATH.join2(typeof parent==="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(canRead,canWrite);return FS.create(path,mode)}),createDataFile:(function(parent,name,data,canRead,canWrite,canOwn){var path=name?PATH.join2(typeof parent==="string"?parent:FS.getPath(parent),name):parent;var mode=FS.getMode(canRead,canWrite);var node=FS.create(path,mode);if(data){if(typeof data==="string"){var arr=new Array(data.length);for(var i=0,len=data.length;i<len;++i)arr[i]=data.charCodeAt(i);data=arr}FS.chmod(node,mode|146);var stream=FS.open(node,"w");FS.write(stream,data,0,data.length,0,canOwn);FS.close(stream);FS.chmod(node,mode)}return node}),createDevice:(function(parent,name,input,output){var path=PATH.join2(typeof parent==="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(!!input,!!output);if(!FS.createDevice.major)FS.createDevice.major=64;var dev=FS.makedev(FS.createDevice.major++,0);FS.registerDevice(dev,{open:(function(stream){stream.seekable=false}),close:(function(stream){if(output&&output.buffer&&output.buffer.length){output(10)}}),read:(function(stream,buffer,offset,length,pos){var bytesRead=0;for(var i=0;i<length;i++){var result;try{result=input()}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EIO)}if(result===undefined&&bytesRead===0){throw new FS.ErrnoError(ERRNO_CODES.EAGAIN)}if(result===null||result===undefined)break;bytesRead++;buffer[offset+i]=result}if(bytesRead){stream.node.timestamp=Date.now()}return bytesRead}),write:(function(stream,buffer,offset,length,pos){for(var i=0;i<length;i++){try{output(buffer[offset+i])}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EIO)}}if(length){stream.node.timestamp=Date.now()}return i})});return FS.mkdev(path,mode,dev)}),createLink:(function(parent,name,target,canRead,canWrite){var path=PATH.join2(typeof parent==="string"?parent:FS.getPath(parent),name);return FS.symlink(target,path)}),forceLoadFile:(function(obj){if(obj.isDevice||obj.isFolder||obj.link||obj.contents)return true;var success=true;if(typeof XMLHttpRequest!=="undefined"){throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")}else if(Module["read"]){try{obj.contents=intArrayFromString(Module["read"](obj.url),true);obj.usedBytes=obj.contents.length}catch(e){success=false}}else{throw new Error("Cannot load without read() or XMLHttpRequest.")}if(!success)___setErrNo(ERRNO_CODES.EIO);return success}),createLazyFile:(function(parent,name,url,canRead,canWrite){function LazyUint8Array(){this.lengthKnown=false;this.chunks=[]}LazyUint8Array.prototype.get=function LazyUint8Array_get(idx){if(idx>this.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 chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(function(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);if(typeof Uint8Array!="undefined")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||[])}else{return intArrayFromString(xhr.responseText||"",true)}});var lazyArray=this;lazyArray.setDataGetter((function(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]}));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.defineProperty(lazyArray,"length",{get:(function(){if(!this.lengthKnown){this.cacheLength()}return this._length})});Object.defineProperty(lazyArray,"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.defineProperty(node,"usedBytes",{get:(function(){return this.contents.length})});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach((function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(ERRNO_CODES.EIO)}return fn.apply(null,arguments)}}));stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(ERRNO_CODES.EIO)}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<size;i++){buffer[offset+i]=contents[position+i]}}else{for(var i=0;i<size;i++){buffer[offset+i]=contents.get(position+i)}}return size};node.stream_ops=stream_ops;return node}),createPreloadedFile:(function(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn){Browser.init();var fullname=name?PATH.resolve(PATH.join2(parent,name)):parent;function processData(byteArray){function finish(byteArray){if(!dontCreateFile){FS.createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency("cp "+fullname)}var handled=false;Module["preloadPlugins"].forEach((function(plugin){if(handled)return;if(plugin["canHandle"](fullname)){plugin["handle"](byteArray,fullname,finish,(function(){if(onerror)onerror();removeRunDependency("cp "+fullname)}));handled=true}}));if(!handled)finish(byteArray)}addRunDependency("cp "+fullname);if(typeof url=="string"){Browser.asyncLoad(url,(function(byteArray){processData(byteArray)}),onerror)}else{processData(url)}}),indexedDB:(function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB}),DB_NAME:(function(){return"EM_FS_"+window.location.pathname}),DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(function(paths,onload,onerror){onload=onload||(function(){});onerror=onerror||(function(){});var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=function openRequest_onupgradeneeded(){console.log("creating db");var db=openRequest.result;db.createObjectStore(FS.DB_STORE_NAME)};openRequest.onsuccess=function openRequest_onsuccess(){var db=openRequest.result;var transaction=db.transaction([FS.DB_STORE_NAME],"readwrite");var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach((function(path){var putRequest=files.put(FS.analyzePath(path).object.contents,path);putRequest.onsuccess=function putRequest_onsuccess(){ok++;if(ok+fail==total)finish()};putRequest.onerror=function putRequest_onerror(){fail++;if(ok+fail==total)finish()}}));transaction.onerror=onerror};openRequest.onerror=onerror}),loadFilesFromDB:(function(paths,onload,onerror){onload=onload||(function(){});onerror=onerror||(function(){});var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=onerror;openRequest.onsuccess=function openRequest_onsuccess(){var db=openRequest.result;try{var transaction=db.transaction([FS.DB_STORE_NAME],"readonly")}catch(e){onerror(e);return}var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach((function(path){var getRequest=files.get(path);getRequest.onsuccess=function getRequest_onsuccess(){if(FS.analyzePath(path).exists){FS.unlink(path)}FS.createDataFile(PATH.dirname(path),PATH.basename(path),getRequest.result,true,true,true);ok++;if(ok+fail==total)finish()};getRequest.onerror=function getRequest_onerror(){fail++;if(ok+fail==total)finish()}}));transaction.onerror=onerror};openRequest.onerror=onerror})};function _mkport(){throw"TODO"}var SOCKFS={mount:(function(mount){Module["websocket"]=Module["websocket"]&&"object"===typeof Module["websocket"]?Module["websocket"]:{};Module["websocket"]._callbacks={};Module["websocket"]["on"]=(function(event,callback){if("function"===typeof callback){this._callbacks[event]=callback}return this});Module["websocket"].emit=(function(event,param){if("function"===typeof this._callbacks[event]){this._callbacks[event].call(this,param)}});return FS.createNode(null,"/",16384|511,0)}),createSocket:(function(family,type,protocol){var streaming=type==1;if(protocol){assert(streaming==(protocol==6))}var sock={family:family,type:type,protocol:protocol,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:SOCKFS.websocket_sock_ops};var name=SOCKFS.nextname();var node=FS.createNode(SOCKFS.root,name,49152,0);node.sock=sock;var stream=FS.createStream({path:name,node:node,flags:FS.modeStringToFlags("r+"),seekable:false,stream_ops:SOCKFS.stream_ops});sock.stream=stream;return sock}),getSocket:(function(fd){var stream=FS.getStream(fd);if(!stream||!FS.isSocket(stream.node.mode)){return null}return stream.node.sock}),stream_ops:{poll:(function(stream){var sock=stream.node.sock;return sock.sock_ops.poll(sock)}),ioctl:(function(stream,request,varargs){var sock=stream.node.sock;return sock.sock_ops.ioctl(sock,request,varargs)}),read:(function(stream,buffer,offset,length,position){var sock=stream.node.sock;var msg=sock.sock_ops.recvmsg(sock,length);if(!msg){return 0}buffer.set(msg.buffer,offset);return msg.buffer.length}),write:(function(stream,buffer,offset,length,position){var sock=stream.node.sock;return sock.sock_ops.sendmsg(sock,buffer,offset,length)}),close:(function(stream){var sock=stream.node.sock;sock.sock_ops.close(sock)})},nextname:(function(){if(!SOCKFS.nextname.current){SOCKFS.nextname.current=0}return"socket["+SOCKFS.nextname.current++ +"]"}),websocket_sock_ops:{createPeer:(function(sock,addr,port){var ws;if(typeof addr==="object"){ws=addr;addr=null;port=null}if(ws){if(ws._socket){addr=ws._socket.remoteAddress;port=ws._socket.remotePort}else{var result=/ws[s]?:\/\/([^:]+):(\d+)/.exec(ws.url);if(!result){throw new Error("WebSocket URL must be in the format ws(s)://address:port")}addr=result[1];port=parseInt(result[2],10)}}else{try{var runtimeConfig=Module["websocket"]&&"object"===typeof Module["websocket"];var url="ws:#".replace("#","//");if(runtimeConfig){if("string"===typeof Module["websocket"]["url"]){url=Module["websocket"]["url"]}}if(url==="ws://"||url==="wss://"){var parts=addr.split("/");url=url+parts[0]+":"+port+"/"+parts.slice(1).join("/")}var subProtocols="binary";if(runtimeConfig){if("string"===typeof Module["websocket"]["subprotocol"]){subProtocols=Module["websocket"]["subprotocol"]}}subProtocols=subProtocols.replace(/^ +| +$/g,"").split(/ *, */);var opts=ENVIRONMENT_IS_NODE?{"protocol":subProtocols.toString()}:subProtocols;var WebSocket=ENVIRONMENT_IS_NODE?require("ws"):window["WebSocket"];ws=new WebSocket(url,opts);ws.binaryType="arraybuffer"}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EHOSTUNREACH)}}var peer={addr:addr,port:port,socket:ws,dgram_send_queue:[]};SOCKFS.websocket_sock_ops.addPeer(sock,peer);SOCKFS.websocket_sock_ops.handlePeerEvents(sock,peer);if(sock.type===2&&typeof sock.sport!=="undefined"){peer.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(sock.sport&65280)>>8,sock.sport&255]))}return peer}),getPeer:(function(sock,addr,port){return sock.peers[addr+":"+port]}),addPeer:(function(sock,peer){sock.peers[peer.addr+":"+peer.port]=peer}),removePeer:(function(sock,peer){delete sock.peers[peer.addr+":"+peer.port]}),handlePeerEvents:(function(sock,peer){var first=true;var handleOpen=(function(){Module["websocket"].emit("open",sock.stream.fd);try{var queued=peer.dgram_send_queue.shift();while(queued){peer.socket.send(queued);queued=peer.dgram_send_queue.shift()}}catch(e){peer.socket.close()}});function handleMessage(data){assert(typeof data!=="string"&&data.byteLength!==undefined);data=new Uint8Array(data);var wasfirst=first;first=false;if(wasfirst&&data.length===10&&data[0]===255&&data[1]===255&&data[2]===255&&data[3]===255&&data[4]==="p".charCodeAt(0)&&data[5]==="o".charCodeAt(0)&&data[6]==="r".charCodeAt(0)&&data[7]==="t".charCodeAt(0)){var newport=data[8]<<8|data[9];SOCKFS.websocket_sock_ops.removePeer(sock,peer);peer.port=newport;SOCKFS.websocket_sock_ops.addPeer(sock,peer);return}sock.recv_queue.push({addr:peer.addr,port:peer.port,data:data});Module["websocket"].emit("message",sock.stream.fd)}if(ENVIRONMENT_IS_NODE){peer.socket.on("open",handleOpen);peer.socket.on("message",(function(data,flags){if(!flags.binary){return}handleMessage((new Uint8Array(data)).buffer)}));peer.socket.on("close",(function(){Module["websocket"].emit("close",sock.stream.fd)}));peer.socket.on("error",(function(error){sock.error=ERRNO_CODES.ECONNREFUSED;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])}))}else{peer.socket.onopen=handleOpen;peer.socket.onclose=(function(){Module["websocket"].emit("close",sock.stream.fd)});peer.socket.onmessage=function peer_socket_onmessage(event){handleMessage(event.data)};peer.socket.onerror=(function(error){sock.error=ERRNO_CODES.ECONNREFUSED;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])})}}),poll:(function(sock){if(sock.type===1&&sock.server){return sock.pending.length?64|1:0}var mask=0;var dest=sock.type===1?SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport):null;if(sock.recv_queue.length||!dest||dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=64|1}if(!dest||dest&&dest.socket.readyState===dest.socket.OPEN){mask|=4}if(dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=16}return mask}),ioctl:(function(sock,request,arg){switch(request){case 21531:var bytes=0;if(sock.recv_queue.length){bytes=sock.recv_queue[0].data.length}HEAP32[arg>>2]=bytes;return 0;default:return ERRNO_CODES.EINVAL}}),close:(function(sock){if(sock.server){try{sock.server.close()}catch(e){}sock.server=null}var peers=Object.keys(sock.peers);for(var i=0;i<peers.length;i++){var peer=sock.peers[peers[i]];try{peer.socket.close()}catch(e){}SOCKFS.websocket_sock_ops.removePeer(sock,peer)}return 0}),bind:(function(sock,addr,port){if(typeof sock.saddr!=="undefined"||typeof sock.sport!=="undefined"){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}sock.saddr=addr;sock.sport=port||_mkport();if(sock.type===2){if(sock.server){sock.server.close();sock.server=null}try{sock.sock_ops.listen(sock,0)}catch(e){if(!(e instanceof FS.ErrnoError))throw e;if(e.errno!==ERRNO_CODES.EOPNOTSUPP)throw e}}}),connect:(function(sock,addr,port){if(sock.server){throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP)}if(typeof sock.daddr!=="undefined"&&typeof sock.dport!=="undefined"){var dest=SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport);if(dest){if(dest.socket.readyState===dest.socket.CONNECTING){throw new FS.ErrnoError(ERRNO_CODES.EALREADY)}else{throw new FS.ErrnoError(ERRNO_CODES.EISCONN)}}}var peer=SOCKFS.websocket_sock_ops.createPeer(sock,addr,port);sock.daddr=peer.addr;sock.dport=peer.port;throw new FS.ErrnoError(ERRNO_CODES.EINPROGRESS)}),listen:(function(sock,backlog){if(!ENVIRONMENT_IS_NODE){throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP)}if(sock.server){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var WebSocketServer=require("ws").Server;var host=sock.saddr;sock.server=new WebSocketServer({host:host,port:sock.sport});Module["websocket"].emit("listen",sock.stream.fd);sock.server.on("connection",(function(ws){if(sock.type===1){var newsock=SOCKFS.createSocket(sock.family,sock.type,sock.protocol);var peer=SOCKFS.websocket_sock_ops.createPeer(newsock,ws);newsock.daddr=peer.addr;newsock.dport=peer.port;sock.pending.push(newsock);Module["websocket"].emit("connection",newsock.stream.fd)}else{SOCKFS.websocket_sock_ops.createPeer(sock,ws);Module["websocket"].emit("connection",sock.stream.fd)}}));sock.server.on("closed",(function(){Module["websocket"].emit("close",sock.stream.fd);sock.server=null}));sock.server.on("error",(function(error){sock.error=ERRNO_CODES.EHOSTUNREACH;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"EHOSTUNREACH: Host is unreachable"])}))}),accept:(function(listensock){if(!listensock.server){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var newsock=listensock.pending.shift();newsock.stream.flags=listensock.stream.flags;return newsock}),getname:(function(sock,peer){var addr,port;if(peer){if(sock.daddr===undefined||sock.dport===undefined){throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN)}addr=sock.daddr;port=sock.dport}else{addr=sock.saddr||0;port=sock.sport||0}return{addr:addr,port:port}}),sendmsg:(function(sock,buffer,offset,length,addr,port){if(sock.type===2){if(addr===undefined||port===undefined){addr=sock.daddr;port=sock.dport}if(addr===undefined||port===undefined){throw new FS.ErrnoError(ERRNO_CODES.EDESTADDRREQ)}}else{addr=sock.daddr;port=sock.dport}var dest=SOCKFS.websocket_sock_ops.getPeer(sock,addr,port);if(sock.type===1){if(!dest||dest.socket.readyState===dest.socket.CLOSING||dest.socket.readyState===dest.socket.CLOSED){throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN)}else if(dest.socket.readyState===dest.socket.CONNECTING){throw new FS.ErrnoError(ERRNO_CODES.EAGAIN)}}var data;if(buffer instanceof Array||buffer instanceof ArrayBuffer){data=buffer.slice(offset,offset+length)}else{data=buffer.buffer.slice(buffer.byteOffset+offset,buffer.byteOffset+offset+length)}if(sock.type===2){if(!dest||dest.socket.readyState!==dest.socket.OPEN){if(!dest||dest.socket.readyState===dest.socket.CLOSING||dest.socket.readyState===dest.socket.CLOSED){dest=SOCKFS.websocket_sock_ops.createPeer(sock,addr,port)}dest.dgram_send_queue.push(data);return length}}try{dest.socket.send(data);return length}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}}),recvmsg:(function(sock,length){if(sock.type===1&&sock.server){throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN)}var queued=sock.recv_queue.shift();if(!queued){if(sock.type===1){var dest=SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport);if(!dest){throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN)}else if(dest.socket.readyState===dest.socket.CLOSING||dest.socket.readyState===dest.socket.CLOSED){return null}else{throw new FS.ErrnoError(ERRNO_CODES.EAGAIN)}}else{throw new FS.ErrnoError(ERRNO_CODES.EAGAIN)}}var queuedLength=queued.data.byteLength||queued.data.length;var queuedOffset=queued.data.byteOffset||0;var queuedBuffer=queued.data.buffer||queued.data;var bytesRead=Math.min(length,queuedLength);var res={buffer:new Uint8Array(queuedBuffer,queuedOffset,bytesRead),addr:queued.addr,port:queued.port};if(sock.type===1&&bytesRead<queuedLength){var bytesRemaining=queuedLength-bytesRead;queued.data=new Uint8Array(queuedBuffer,queuedOffset+bytesRead,bytesRemaining);sock.recv_queue.unshift(queued)}return res})}};function _send(fd,buf,len,flags){var sock=SOCKFS.getSocket(fd);if(!sock){___setErrNo(ERRNO_CODES.EBADF);return-1}return _write(fd,buf,len)}function _pwrite(fildes,buf,nbyte,offset){var stream=FS.getStream(fildes);if(!stream){___setErrNo(ERRNO_CODES.EBADF);return-1}try{var slab=HEAP8;return FS.write(stream,slab,buf,nbyte,offset)}catch(e){FS.handleFSError(e);return-1}}function _write(fildes,buf,nbyte){var stream=FS.getStream(fildes);if(!stream){___setErrNo(ERRNO_CODES.EBADF);return-1}try{var slab=HEAP8;return FS.write(stream,slab,buf,nbyte)}catch(e){FS.handleFSError(e);return-1}}function _fileno(stream){stream=FS.getStreamFromPtr(stream);if(!stream)return-1;return stream.fd}function _fputc(c,stream){var chr=unSign(c&255);HEAP8[_fputc.ret>>0]=chr;var fd=_fileno(stream);var ret=_write(fd,_fputc.ret,1);if(ret==-1){var streamObj=FS.getStreamFromPtr(stream);if(streamObj)streamObj.error=true;return-1}else{return chr}}function _glGetString(name_){if(GL.stringCache[name_])return GL.stringCache[name_];var ret;switch(name_){case 7936:case 7937:case 7938:ret=allocate(intArrayFromString(GLctx.getParameter(name_)),"i8",ALLOC_NORMAL);break;case 7939:var exts=GLctx.getSupportedExtensions();var gl_exts=[];for(i in exts){gl_exts.push(exts[i]);gl_exts.push("GL_"+exts[i])}ret=allocate(intArrayFromString(gl_exts.join(" ")),"i8",ALLOC_NORMAL);break;case 35724:ret=allocate(intArrayFromString("OpenGL ES GLSL 1.00 (WebGL)"),"i8",ALLOC_NORMAL);break;default:GL.recordError(1280);return 0}GL.stringCache[name_]=ret;return ret}function _llvm_stackrestore(p){var self=_llvm_stacksave;var ret=self.LLVM_SAVEDSTACKS[p];self.LLVM_SAVEDSTACKS.splice(p,1);Runtime.stackRestore(ret)}function _glfwSetWindowShouldClose(winid,value){var win=GLFW.WindowFromId(winid);if(!win)return;win.shouldClose=value}function _fwrite(ptr,size,nitems,stream){var bytesToWrite=nitems*size;if(bytesToWrite==0)return 0;var fd=_fileno(stream);var bytesWritten=_write(fd,ptr,bytesToWrite);if(bytesWritten==-1){var streamObj=FS.getStreamFromPtr(stream);if(streamObj)streamObj.error=true;return 0}else{return bytesWritten/size|0}}function _glfwSetScrollCallback(winid,cbfun){GLFW.setScrollCallback(winid,cbfun)}function _glfwGetTime(){return GLFW.getTime()-GLFW.initialTime}function _emscripten_set_main_loop_timing(mode,value){Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){return 1}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler(){setTimeout(Browser.mainLoop.runner,value)};Browser.mainLoop.method="timeout"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method="rAF"}return 0}function _emscripten_set_main_loop(func,fps,simulateInfiniteLoop,arg){Module["noExitRuntime"]=true;assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");Browser.mainLoop.func=func;Browser.mainLoop.arg=arg;var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;Browser.mainLoop.runner=function Browser_mainLoop_runner(){if(ABORT)return;if(Browser.mainLoop.queue.length>0){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}}console.log('main loop blocker "'+blocker.name+'" took '+(Date.now()-start)+" ms");Browser.mainLoop.updateStatus();setTimeout(Browser.mainLoop.runner,0);return}if(thisMainLoopId<Browser.mainLoop.currentlyRunningMainloop)return;Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0;if(Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}if(Browser.mainLoop.method==="timeout"&&Module.ctx){Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!");Browser.mainLoop.method=""}Browser.mainLoop.runIter((function(){if(typeof arg!=="undefined"){Runtime.dynCall("vi",func,[arg])}else{Runtime.dynCall("v",func)}}));if(thisMainLoopId<Browser.mainLoop.currentlyRunningMainloop)return;if(typeof SDL==="object"&&SDL.audio&&SDL.audio.queueNewAudioData)SDL.audio.queueNewAudioData();Browser.mainLoop.scheduler()};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"SimulateInfiniteLoop"}}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:(function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++}),resume:(function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;_emscripten_set_main_loop(func,0,false,Browser.mainLoop.arg);_emscripten_set_main_loop_timing(timingMode,timingValue)}),updateStatus:(function(){if(Module["setStatus"]){var message=Module["statusMessage"]||"Please wait...";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining<expected){Module["setStatus"](message+" ("+(expected-remaining)+"/"+expected+")")}else{Module["setStatus"](message)}}else{Module["setStatus"]("")}}}),runIter:(function(func){if(ABORT)return;if(Module["preMainLoop"]){var preRet=Module["preMainLoop"]();if(preRet===false){return}}try{func()}catch(e){if(e instanceof ExitStatus){return}else{if(e&&typeof e==="object"&&e.stack)Module.printErr("exception thrown: "+[e,e.stack]);throw e}}if(Module["postMainLoop"])Module["postMainLoop"]()})},isFullScreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:(function(){if(!Module["preloadPlugins"])Module["preloadPlugins"]=[];if(Browser.initted)return;Browser.initted=true;try{new Blob;Browser.hasBlobConstructor=true}catch(e){Browser.hasBlobConstructor=false;console.log("warning: no blob constructor, cannot create blobs with mimetypes")}Browser.BlobBuilder=typeof MozBlobBuilder!="undefined"?MozBlobBuilder:typeof WebKitBlobBuilder!="undefined"?WebKitBlobBuilder:!Browser.hasBlobConstructor?console.log("warning: no BlobBuilder"):null;Browser.URLObject=typeof window!="undefined"?window.URL?window.URL:window.webkitURL:undefined;if(!Module.noImageDecoding&&typeof Browser.URLObject==="undefined"){console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available.");Module.noImageDecoding=true}var imagePlugin={};imagePlugin["canHandle"]=function imagePlugin_canHandle(name){return!Module.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(name)};imagePlugin["handle"]=function imagePlugin_handle(byteArray,name,onload,onerror){var b=null;if(Browser.hasBlobConstructor){try{b=new Blob([byteArray],{type:Browser.getMimetype(name)});if(b.size!==byteArray.length){b=new Blob([(new Uint8Array(byteArray)).buffer],{type:Browser.getMimetype(name)})}}catch(e){Runtime.warnOnce("Blob constructor present but fails: "+e+"; falling back to blob builder")}}if(!b){var bb=new Browser.BlobBuilder;bb.append((new Uint8Array(byteArray)).buffer);b=bb.getBlob()}var url=Browser.URLObject.createObjectURL(b);var img=new Image;img.onload=function img_onload(){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);Module["preloadedImages"][name]=canvas;Browser.URLObject.revokeObjectURL(url);if(onload)onload(byteArray)};img.onerror=function img_onerror(event){console.log("Image "+url+" could not be decoded");if(onerror)onerror()};img.src=url};Module["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;Module["preloadedAudios"][name]=audio;if(onload)onload(byteArray)}function fail(){if(done)return;done=true;Module["preloadedAudios"][name]=new Audio;if(onerror)onerror()}if(Browser.hasBlobConstructor){try{var b=new Blob([byteArray],{type:Browser.getMimetype(name)})}catch(e){return fail()}var url=Browser.URLObject.createObjectURL(b);var audio=new Audio;audio.addEventListener("canplaythrough",(function(){finish(audio)}),false);audio.onerror=function audio_onerror(event){if(done)return;console.log("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<data.length;i++){leftchar=leftchar<<8|data[i];leftbits+=8;while(leftbits>=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;Browser.safeSetTimeout((function(){finish(audio)}),1e4)}else{return fail()}};Module["preloadPlugins"].push(audioPlugin);var canvas=Module["canvas"];function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===canvas||document["mozPointerLockElement"]===canvas||document["webkitPointerLockElement"]===canvas||document["msPointerLockElement"]===canvas}if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||(function(){});canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||(function(){});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",(function(ev){if(!Browser.pointerLock&&canvas.requestPointerLock){canvas.requestPointerLock();ev.preventDefault()}}),false)}}}),createContext:(function(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};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}canvas.style.backgroundColor="black"}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((function(callback){callback()}));Browser.init()}return ctx}),destroyContext:(function(canvas,useWebGL,setInModule){}),fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:(function(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["webkitFullScreenElement"]||document["webkitFullscreenElement"]||document["mozFullScreenElement"]||document["mozFullscreenElement"]||document["fullScreenElement"]||document["fullscreenElement"]||document["msFullScreenElement"]||document["msFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.cancelFullScreen=document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["webkitCancelFullScreen"]||document["msExitFullscreen"]||document["exitFullscreen"]||(function(){});canvas.cancelFullScreen=canvas.cancelFullScreen.bind(document);if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullScreen=true;if(Browser.resizeCanvas)Browser.setFullScreenCanvasSize()}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas)Browser.setWindowedCanvasSize()}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullScreen);Browser.updateCanvasDimensions(canvas)}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"]?(function(){canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"])}):null);canvasContainer.requestFullScreen()}),nextRAF:0,fakeRequestAnimationFrame:(function(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:function requestAnimationFrame(func){if(typeof window==="undefined"){Browser.fakeRequestAnimationFrame(func)}else{if(!window.requestAnimationFrame){window.requestAnimationFrame=window["requestAnimationFrame"]||window["mozRequestAnimationFrame"]||window["webkitRequestAnimationFrame"]||window["msRequestAnimationFrame"]||window["oRequestAnimationFrame"]||Browser.fakeRequestAnimationFrame}window.requestAnimationFrame(func)}},safeCallback:(function(func){return(function(){if(!ABORT)return func.apply(null,arguments)})}),safeRequestAnimationFrame:(function(func){return Browser.requestAnimationFrame((function(){if(!ABORT)func()}))}),safeSetTimeout:(function(func,timeout){Module["noExitRuntime"]=true;return setTimeout((function(){if(!ABORT)func()}),timeout)}),safeSetInterval:(function(func,timeout){Module["noExitRuntime"]=true;return setInterval((function(){if(!ABORT)func()}),timeout)}),getMimetype:(function(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:(function(func){if(!window.getUserMedia){window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"]}window.getUserMedia(func)}),getMovementX:(function(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0}),getMovementY:(function(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0}),getMouseWheelDelta:(function(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail;break;case"mousewheel":delta=event.wheelDelta;break;case"wheel":delta=event["deltaY"];break;default:throw"unrecognized mouse wheel event: "+event.type}return delta}),mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:(function(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;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"){Browser.lastTouches[touch.identifier]=Browser.touches[touch.identifier];Browser.touches[touch.identifier]={x:adjustedX,y:adjustedY}}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}}),xhrLoad:(function(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response)}else{onerror()}};xhr.onerror=onerror;xhr.send(null)}),asyncLoad:(function(url,onload,onerror,noRunDep){Browser.xhrLoad(url,(function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(!noRunDep)removeRunDependency("al "+url)}),(function(event){if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}}));if(!noRunDep)addRunDependency("al "+url)}),resizeListeners:[],updateResizeListeners:(function(){var canvas=Module["canvas"];Browser.resizeListeners.forEach((function(listener){listener(canvas.width,canvas.height)}))}),setCanvasSize:(function(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()}),windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:(function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];flags=flags|8388608;HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=flags}Browser.updateResizeListeners()}),setWindowedCanvasSize:(function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];flags=flags&~8388608;HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=flags}Browser.updateResizeListeners()}),updateCanvasDimensions:(function(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<Module["forcedAspectRatio"]){w=Math.round(h*Module["forcedAspectRatio"])}else{h=Math.round(w/Module["forcedAspectRatio"])}}if((document["webkitFullScreenElement"]||document["webkitFullscreenElement"]||document["mozFullScreenElement"]||document["mozFullscreenElement"]||document["fullScreenElement"]||document["fullscreenElement"]||document["msFullScreenElement"]||document["msFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvas.parentNode&&typeof screen!="undefined"){var factor=Math.min(screen.width/w,screen.height/h);w=Math.round(w*factor);h=Math.round(h*factor)}if(Browser.resizeCanvas){if(canvas.width!=w)canvas.width=w;if(canvas.height!=h)canvas.height=h;if(typeof canvas.style!="undefined"){canvas.style.removeProperty("width");canvas.style.removeProperty("height")}}else{if(canvas.width!=wNative)canvas.width=wNative;if(canvas.height!=hNative)canvas.height=hNative;if(typeof canvas.style!="undefined"){if(w!=wNative||h!=hNative){canvas.style.setProperty("width",w+"px","important");canvas.style.setProperty("height",h+"px","important")}else{canvas.style.removeProperty("width");canvas.style.removeProperty("height")}}}}),wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:(function(){var handle=Browser.nextWgetRequestHandle;Browser.nextWgetRequestHandle++;return handle})};function _glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _glDeleteTextures(n,textures){for(var i=0;i<n;i++){var id=HEAP32[textures+i*4>>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _close(fildes){var stream=FS.getStream(fildes);if(!stream){___setErrNo(ERRNO_CODES.EBADF);return-1}try{FS.close(stream);return 0}catch(e){FS.handleFSError(e);return-1}}function _fsync(fildes){var stream=FS.getStream(fildes);if(stream){return 0}else{___setErrNo(ERRNO_CODES.EBADF);return-1}}function _fclose(stream){var fd=_fileno(stream);_fsync(fd);return _close(fd)}function _glfwSetWindowSizeCallback(winid,cbfun){GLFW.setWindowSizeCallback(winid,cbfun)}var AL={contexts:[],currentContext:null,alcErr:0,stringCache:{},alcStringCache:{},QUEUE_INTERVAL:25,QUEUE_LOOKAHEAD:100,newSrcId:0,updateSources:function updateSources(context){if(Browser.mainLoop.timingMode==1&&document["visibilityState"]!="visible")return;for(var srcId in context.src){AL.updateSource(context.src[srcId])}},updateSource:function updateSource(src){if(src.state!==4114){return}var currentTime=AL.currentContext.ctx.currentTime;var startTime=src.bufferPosition;for(var i=src.buffersPlayed;i<src.queue.length;i++){var entry=src.queue[i];var startOffset=startTime-currentTime;var endTime=startTime+entry.buffer.duration;if(currentTime>=endTime){src.bufferPosition=endTime;src.buffersPlayed=i+1;if(src.buffersPlayed>=src.queue.length){if(src.loop){AL.setSourceState(src,4114)}else{AL.setSourceState(src,4116)}}}else if(startOffset<AL.QUEUE_LOOKAHEAD/1e3&&!entry.src){var offset=Math.abs(Math.min(startOffset,0));entry.src=AL.currentContext.ctx.createBufferSource();entry.src.buffer=entry.buffer;entry.src.connect(src.gain);if(typeof entry.src.start!=="undefined"){entry.src.start(startTime,offset)}else if(typeof entry.src.noteOn!=="undefined"){entry.src.noteOn(startTime)}}startTime=endTime}},setSourceState:function setSourceState(src,state){if(state===4114){if(src.state!==4115){src.state=4114;src.bufferPosition=AL.currentContext.ctx.currentTime;src.buffersPlayed=0}else{src.state=4114;src.bufferPosition=AL.currentContext.ctx.currentTime-src.bufferPosition}AL.stopSourceQueue(src);AL.updateSource(src)}else if(state===4115){if(src.state===4114){src.state=4115;src.bufferPosition=AL.currentContext.ctx.currentTime-src.bufferPosition;AL.stopSourceQueue(src)}}else if(state===4116){if(src.state!==4113){src.state=4116;src.buffersPlayed=src.queue.length;AL.stopSourceQueue(src)}}else if(state==4113){if(src.state!==4113){src.state=4113;src.bufferPosition=0;src.buffersPlayed=0}}},stopSourceQueue:function stopSourceQueue(src){for(var i=0;i<src.queue.length;i++){var entry=src.queue[i];if(entry.src){entry.src.stop(0);entry.src=null}}}};function _alSourcei(source,param,value){if(!AL.currentContext){return}var src=AL.currentContext.src[source];if(!src){AL.currentContext.err=40961;return}switch(param){case 4097:src.coneInnerAngle=value;break;case 4098:src.coneOuterAngle=value;break;case 4103:src.loop=value===1;break;case 4105:var buffer=AL.currentContext.buf[value-1];if(value==0){src.queue=[]}else{src.queue=[{buffer:buffer}]}AL.updateSource(src);break;case 514:if(value===1){if(src.panner){src.panner=null;src.gain.disconnect();src.gain.connect(AL.currentContext.ctx.destination)}}else if(value===0){if(!src.panner){var panner=src.panner=AL.currentContext.ctx.createPanner();panner.panningModel="equalpower";panner.distanceModel="linear";panner.refDistance=src.refDistance;panner.maxDistance=src.maxDistance;panner.rolloffFactor=src.rolloffFactor;panner.setPosition(src.position[0],src.position[1],src.position[2]);panner.setVelocity(src.velocity[0],src.velocity[1],src.velocity[2]);panner.connect(AL.currentContext.ctx.destination);src.gain.disconnect();src.gain.connect(panner)}}else{AL.currentContext.err=40963}break;default:AL.currentContext.err=40962;break}}function _alSourceQueueBuffers(source,count,buffers){if(!AL.currentContext){return}var src=AL.currentContext.src[source];if(!src){AL.currentContext.err=40961;return}for(var i=0;i<count;++i){var bufferIdx=HEAP32[buffers+i*4>>2];if(bufferIdx>AL.currentContext.buf.length){AL.currentContext.err=40961;return}}for(var i=0;i<count;++i){var bufferIdx=HEAP32[buffers+i*4>>2];var buffer=AL.currentContext.buf[bufferIdx-1];src.queue.push({buffer:buffer,src:null})}AL.updateSource(src)}function _alcGetCurrentContext(){for(var i=0;i<AL.contexts.length;++i){if(AL.contexts[i]==AL.currentContext){return i+1}}return 0}function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest);return dest}Module["_memcpy"]=_memcpy;function _alSourcef(source,param,value){if(!AL.currentContext){return}var src=AL.currentContext.src[source];if(!src){AL.currentContext.err=40961;return}switch(param){case 4099:break;case 4106:src.gain.gain.value=value;break;case 4131:src.maxDistance=value;break;case 4129:src.rolloffFactor=value;break;case 4130:src.coneOuterGain=value;break;case 4097:src.coneInnerAngle=value;break;case 4098:src.coneOuterAngle=value;break;case 4128:src.refDistance=value;break;default:AL.currentContext.err=40962;break}}function _alcGetString(device,param){if(AL.alcStringCache[param])return AL.alcStringCache[param];var ret;switch(param){case 0:ret="No Error";break;case 40961:ret="Invalid Device";break;case 40962:ret="Invalid Context";break;case 40963:ret="Invalid Enum";break;case 40964:ret="Invalid Value";break;case 40965:ret="Out of Memory";break;case 4100:if(typeof AudioContext!=="undefined"||typeof webkitAudioContext!=="undefined"){ret="Device"}else{return 0}break;case 4101:if(typeof AudioContext!=="undefined"||typeof webkitAudioContext!=="undefined"){ret="Device"}else{ret=""}break;case 785:return 0;break;case 784:ret="";break;case 4102:if(!device){AL.alcErr=40961;return 0}ret="";break;default:AL.alcErr=40963;return 0}ret=allocate(intArrayFromString(ret),"i8",ALLOC_NORMAL);AL.alcStringCache[param]=ret;return ret}Module["_memmove"]=_memmove;function _glGenTextures(n,textures){for(var i=0;i<n;i++){var id=GL.getNewId(GL.textures);var texture=GLctx.createTexture();texture.name=id;GL.textures[id]=texture;HEAP32[textures+i*4>>2]=id}}function _glDepthFunc(x0){GLctx.depthFunc(x0)}function _glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _glUniform1i(location,v0){location=GL.uniforms[location];GLctx.uniform1i(location,v0)}function _alGetError(){if(!AL.currentContext){return 40964}else{var err=AL.currentContext.err;AL.currentContext.err=0;return err}}function _glfwGetMouseButton(winid,button){return GLFW.getMouseButton(winid,button)}function _recv(fd,buf,len,flags){var sock=SOCKFS.getSocket(fd);if(!sock){___setErrNo(ERRNO_CODES.EBADF);return-1}return _read(fd,buf,len)}function _pread(fildes,buf,nbyte,offset){var stream=FS.getStream(fildes);if(!stream){___setErrNo(ERRNO_CODES.EBADF);return-1}try{var slab=HEAP8;return FS.read(stream,slab,buf,nbyte,offset)}catch(e){FS.handleFSError(e);return-1}}function _read(fildes,buf,nbyte){var stream=FS.getStream(fildes);if(!stream){___setErrNo(ERRNO_CODES.EBADF);return-1}try{var slab=HEAP8;return FS.read(stream,slab,buf,nbyte)}catch(e){FS.handleFSError(e);return-1}}function _fread(ptr,size,nitems,stream){var bytesToRead=nitems*size;if(bytesToRead==0){return 0}var bytesRead=0;var streamObj=FS.getStreamFromPtr(stream);if(!streamObj){___setErrNo(ERRNO_CODES.EBADF);return 0}while(streamObj.ungotten.length&&bytesToRead>0){HEAP8[ptr++>>0]=streamObj.ungotten.pop();bytesToRead--;bytesRead++}var err=_read(streamObj.fd,ptr,bytesToRead);if(err==-1){if(streamObj)streamObj.error=true;return 0}bytesRead+=err;if(bytesRead<bytesToRead)streamObj.eof=true;return bytesRead/size|0}function _fgetc(stream){var streamObj=FS.getStreamFromPtr(stream);if(!streamObj)return-1;if(streamObj.eof||streamObj.error)return-1;var ret=_fread(_fgetc.ret,1,1,stream);if(ret==0){return-1}else if(ret==-1){streamObj.error=true;return-1}else{return HEAPU8[_fgetc.ret>>0]}}Module["_memset"]=_memset;var _BDtoILow=true;function _glGetProgramiv(program,pname,p){if(pname==35716){HEAP32[p>>2]=GLctx.getProgramInfoLog(GL.programs[program]).length+1}else if(pname==35719){var ptable=GL.programInfos[program];if(ptable){HEAP32[p>>2]=ptable.maxUniformLength;return}else if(program<GL.counter){GL.recordError(1282)}else{GL.recordError(1281)}}else if(pname==35722){var ptable=GL.programInfos[program];if(ptable){if(ptable.maxAttributeLength==-1){var program=GL.programs[program];var numAttribs=GLctx.getProgramParameter(program,GLctx.ACTIVE_ATTRIBUTES);ptable.maxAttributeLength=0;for(var i=0;i<numAttribs;++i){var activeAttrib=GLctx.getActiveAttrib(program,i);ptable.maxAttributeLength=Math.max(ptable.maxAttributeLength,activeAttrib.name.length+1)}}HEAP32[p>>2]=ptable.maxAttributeLength;return}else if(program<GL.counter){GL.recordError(1282)}else{GL.recordError(1281)}}else{HEAP32[p>>2]=GLctx.getProgramParameter(GL.programs[program],pname)}}function _glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,normalized,stride,ptr)}function _alDeleteBuffers(count,buffers){if(!AL.currentContext){return}if(count>AL.currentContext.buf.length){AL.currentContext.err=40963;return}for(var i=0;i<count;++i){var bufferIdx=HEAP32[buffers+i*4>>2]-1;if(bufferIdx>=AL.currentContext.buf.length||!AL.currentContext.buf[bufferIdx]){AL.currentContext.err=40961;return}var buffer=AL.currentContext.buf[bufferIdx];for(var srcId in AL.currentContext.src){var src=AL.currentContext.src[srcId];if(!src){continue}for(var k=0;k<src.queue.length;k++){if(buffer===src.queue[k].buffer){AL.currentContext.err=40964;return}}}}for(var i=0;i<count;++i){var bufferIdx=HEAP32[buffers+i*4>>2]-1;delete AL.currentContext.buf[bufferIdx]}}function _alcMakeContextCurrent(context){if(context==0){AL.currentContext=null;return 0}else{AL.currentContext=AL.contexts[context-1];return 1}}function _alListener3f(param,v1,v2,v3){if(!AL.currentContext){return}switch(param){case 4100:AL.currentContext.ctx.listener._position=[v1,v2,v3];AL.currentContext.ctx.listener.setPosition(v1,v2,v3);break;case 4102:AL.currentContext.ctx.listener._velocity=[v1,v2,v3];AL.currentContext.ctx.listener.setVelocity(v1,v2,v3);break;default:AL.currentContext.err=40962;break}}function ___assert_fail(condition,filename,line,func){ABORT=true;throw"Assertion failed: "+Pointer_stringify(condition)+", at: "+[filename?Pointer_stringify(filename):"unknown filename",line,func?Pointer_stringify(func):"unknown function"]+" at "+stackTrace()}function _glGetUniformLocation(program,name){name=Pointer_stringify(name);var arrayOffset=0;if(name.indexOf("]",name.length-1)!==-1){var ls=name.lastIndexOf("[");var arrayIndex=name.slice(ls+1,-1);if(arrayIndex.length>0){arrayOffset=parseInt(arrayIndex);if(arrayOffset<0){return-1}}name=name.slice(0,ls)}var ptable=GL.programInfos[program];if(!ptable){return-1}var utable=ptable.uniforms;var uniformInfo=utable[name];if(uniformInfo&&arrayOffset<uniformInfo[0]){return uniformInfo[1]+arrayOffset}else{return-1}}function _glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(!log)log="";log=log.substr(0,maxLength-1);if(maxLength>0&&infoLog){writeStringToMemory(log,infoLog);if(length)HEAP32[length>>2]=log.length}else{if(length)HEAP32[length>>2]=0}}function _alSource3f(source,param,v1,v2,v3){if(!AL.currentContext){return}var src=AL.currentContext.src[source];if(!src){AL.currentContext.err=40961;return}switch(param){case 4100:src.position=[v1,v2,v3];break;case 4101:src.direction=[v1,v2,v3];break;case 4102:src.velocity=[v1,v2,v3];break;default:AL.currentContext.err=40962;break}}var _sqrtf=Math_sqrt;function _ftell(stream){stream=FS.getStreamFromPtr(stream);if(!stream){___setErrNo(ERRNO_CODES.EBADF);return-1}if(FS.isChrdev(stream.node.mode)){___setErrNo(ERRNO_CODES.ESPIPE);return-1}else{return stream.position}}function _glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null;GL.programInfos[id]=null}function __exit(status){Module["exit"](status)}function _exit(status){__exit(status)}var _setSourceState=undefined;function _alSourcePlay(source){if(!AL.currentContext){return}var src=AL.currentContext.src[source];if(!src){AL.currentContext.err=40961;return}AL.setSourceState(src,4114)}function _glAttachShader(program,shader){GLctx.attachShader(GL.programs[program],GL.shaders[shader])}function _glfwPollEvents(){}function _glfwGetPrimaryMonitor(){return 1}function _glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _glfwTerminate(){window.removeEventListener("keydown",GLFW.onKeydown,true);window.removeEventListener("keypress",GLFW.onKeyPress,true);window.removeEventListener("keyup",GLFW.onKeyup,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"].width=Module["canvas"].height=1;GLFW.windows=null;GLFW.active=null}var _cos=Math_cos;function _glBufferSubData(target,offset,size,data){GLctx.bufferSubData(target,offset,HEAPU8.subarray(data,data+size))}function _llvm_stacksave(){var self=_llvm_stacksave;if(!self.LLVM_SAVEDSTACKS){self.LLVM_SAVEDSTACKS=[]}self.LLVM_SAVEDSTACKS.push(Runtime.stackSave());return self.LLVM_SAVEDSTACKS.length-1}function _alcDestroyContext(context){clearInterval(AL.contexts[context-1].interval)}function _glGenerateMipmap(x0){GLctx.generateMipmap(x0)}function _glGetShaderiv(shader,pname,p){if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(!log)log="(unknown error)";HEAP32[p>>2]=log.length+1}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function _glfwSetWindowIconifyCallback(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return;win.windowIconifyFunc=cbfun}Module["_i64Subtract"]=_i64Subtract;Module["_i64Add"]=_i64Add;function _glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)}function _alcCreateContext(device,attrList){if(device!=1){return 0}if(attrList){return 0}var ctx;try{ctx=new AudioContext}catch(e){try{ctx=new webkitAudioContext}catch(e){}}if(ctx){if(typeof ctx.createGain==="undefined")ctx.createGain=ctx.createGainNode;var gain=ctx.createGain();gain.connect(ctx.destination);var context={ctx:ctx,err:0,src:{},buf:[],interval:setInterval((function(){AL.updateSources(context)}),AL.QUEUE_INTERVAL),gain:gain};AL.contexts.push(context);return AL.contexts.length}else{return 0}}function _alSourceStop(source){if(!AL.currentContext){return}var src=AL.currentContext.src[source];if(!src){AL.currentContext.err=40961;return}AL.setSourceState(src,4116)}function _alcCloseDevice(device){}function _glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _open(path,oflag,varargs){var mode=HEAP32[varargs>>2];path=Pointer_stringify(path);try{var stream=FS.open(path,oflag,mode);return stream.fd}catch(e){FS.handleFSError(e);return-1}}function _fopen(filename,mode){var flags;mode=Pointer_stringify(mode);if(mode[0]=="r"){if(mode.indexOf("+")!=-1){flags=2}else{flags=0}}else if(mode[0]=="w"){if(mode.indexOf("+")!=-1){flags=2}else{flags=1}flags|=64;flags|=512}else if(mode[0]=="a"){if(mode.indexOf("+")!=-1){flags=2}else{flags=1}flags|=64;flags|=1024}else{___setErrNo(ERRNO_CODES.EINVAL);return 0}var fd=_open(filename,flags,allocate([511,0,0,0],"i32",ALLOC_STACK));return fd===-1?0:FS.getPtrForStream(FS.getStream(fd))}function _glDrawArrays(mode,first,count){GLctx.drawArrays(mode,first,count)}Module["_strncpy"]=_strncpy;function _alcOpenDevice(deviceName){if(typeof AudioContext!=="undefined"||typeof webkitAudioContext!=="undefined"){return 1}else{return 0}}var _log=Math_log;function _glClear(x0){GLctx.clear(x0)}function _glfwSetCharCallback(winid,cbfun){GLFW.setCharCallback(winid,cbfun)}function _glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)}function _glBindBuffer(target,buffer){var bufferObj=buffer?GL.buffers[buffer]:null;GLctx.bindBuffer(target,bufferObj)}function _alSourceUnqueueBuffers(source,count,buffers){if(!AL.currentContext){return}var src=AL.currentContext.src[source];if(!src){AL.currentContext.err=40961;return}if(count>src.buffersPlayed){AL.currentContext.err=40963;return}for(var i=0;i<count;i++){var entry=src.queue.shift();for(var j=0;j<AL.currentContext.buf.length;j++){var b=AL.currentContext.buf[j];if(b&&b==entry.buffer){HEAP32[buffers+i*4>>2]=j+1;break}}src.buffersPlayed--}AL.updateSource(src)}function _glfwSetCursorEnterCallback(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return;win.cursorEnterFunc=cbfun}Module["_bitshift64Lshr"]=_bitshift64Lshr;function _glBufferData(target,size,data,usage){switch(usage){case 35041:case 35042:usage=35040;break;case 35045:case 35046:usage=35044;break;case 35049:case 35050:usage=35048;break}if(!data){GLctx.bufferData(target,size,usage)}else{GLctx.bufferData(target,HEAPU8.subarray(data,data+size),usage)}}function _glfwCreateWindow(width,height,title,monitor,share){return GLFW.createWindow(width,height,title,monitor,share)}var _BDtoIHigh=true;function _alGetSourcei(source,param,value){if(!AL.currentContext){return}var src=AL.currentContext.src[source];if(!src){AL.currentContext.err=40961;return}AL.updateSource(src);switch(param){case 514:HEAP32[value>>2]=src.panner?1:0;break;case 4097:HEAP32[value>>2]=src.coneInnerAngle;break;case 4098:HEAP32[value>>2]=src.coneOuterAngle;break;case 4105:if(!src.queue.length){HEAP32[value>>2]=0}else{var buffer=src.queue[src.buffersPlayed].buffer;for(var i=0;i<AL.currentContext.buf.length;++i){if(buffer==AL.currentContext.buf[i]){HEAP32[value>>2]=i+1;return}}HEAP32[value>>2]=0}break;case 4112:HEAP32[value>>2]=src.state;break;case 4117:HEAP32[value>>2]=src.queue.length;break;case 4118:if(src.loop){HEAP32[value>>2]=0}else{HEAP32[value>>2]=src.buffersPlayed}break;default:AL.currentContext.err=40962;break}}Module["_strlen"]=_strlen;function __reallyNegative(x){return x<0||x===0&&1/x===-Infinity}function __formatString(format,varargs){var textIndex=format;var argIndex=0;function getNextArg(type){var ret;if(type==="double"){ret=(HEAP32[tempDoublePtr>>2]=HEAP32[varargs+argIndex>>2],HEAP32[tempDoublePtr+4>>2]=HEAP32[varargs+(argIndex+4)>>2],+HEAPF64[tempDoublePtr>>3])}else if(type=="i64"){ret=[HEAP32[varargs+argIndex>>2],HEAP32[varargs+(argIndex+4)>>2]]}else{type="i32";ret=HEAP32[varargs+argIndex>>2]}argIndex+=Runtime.getNativeFieldSize(type);return ret}var ret=[];var curr,next,currArg;while(1){var startTextIndex=textIndex;curr=HEAP8[textIndex>>0];if(curr===0)break;next=HEAP8[textIndex+1>>0];if(curr==37){var flagAlwaysSigned=false;var flagLeftAlign=false;var flagAlternative=false;var flagZeroPad=false;var flagPadSign=false;flagsLoop:while(1){switch(next){case 43:flagAlwaysSigned=true;break;case 45:flagLeftAlign=true;break;case 35:flagAlternative=true;break;case 48:if(flagZeroPad){break flagsLoop}else{flagZeroPad=true;break};case 32:flagPadSign=true;break;default:break flagsLoop}textIndex++;next=HEAP8[textIndex+1>>0]}var width=0;if(next==42){width=getNextArg("i32");textIndex++;next=HEAP8[textIndex+1>>0]}else{while(next>=48&&next<=57){width=width*10+(next-48);textIndex++;next=HEAP8[textIndex+1>>0]}}var precisionSet=false,precision=-1;if(next==46){precision=0;precisionSet=true;textIndex++;next=HEAP8[textIndex+1>>0];if(next==42){precision=getNextArg("i32");textIndex++}else{while(1){var precisionChr=HEAP8[textIndex+1>>0];if(precisionChr<48||precisionChr>57)break;precision=precision*10+(precisionChr-48);textIndex++}}next=HEAP8[textIndex+1>>0]}if(precision<0){precision=6;precisionSet=false}var argSize;switch(String.fromCharCode(next)){case"h":var nextNext=HEAP8[textIndex+2>>0];if(nextNext==104){textIndex++;argSize=1}else{argSize=2}break;case"l":var nextNext=HEAP8[textIndex+2>>0];if(nextNext==108){textIndex++;argSize=8}else{argSize=4}break;case"L":case"q":case"j":argSize=8;break;case"z":case"t":case"I":argSize=4;break;default:argSize=null}if(argSize)textIndex++;next=HEAP8[textIndex+1>>0];switch(String.fromCharCode(next)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":{var signed=next==100||next==105;argSize=argSize||4;var currArg=getNextArg("i"+argSize*8);var origArg=currArg;var argText;if(argSize==8){currArg=Runtime.makeBigInt(currArg[0],currArg[1],next==117)}if(argSize<=4){var limit=Math.pow(256,argSize)-1;currArg=(signed?reSign:unSign)(currArg&limit,argSize*8)}var currAbsArg=Math.abs(currArg);var prefix="";if(next==100||next==105){if(argSize==8&&i64Math)argText=i64Math.stringify(origArg[0],origArg[1],null);else argText=reSign(currArg,8*argSize,1).toString(10)}else if(next==117){if(argSize==8&&i64Math)argText=i64Math.stringify(origArg[0],origArg[1],true);else argText=unSign(currArg,8*argSize,1).toString(10);currArg=Math.abs(currArg)}else if(next==111){argText=(flagAlternative?"0":"")+currAbsArg.toString(8)}else if(next==120||next==88){prefix=flagAlternative&&currArg!=0?"0x":"";if(argSize==8&&i64Math){if(origArg[1]){argText=(origArg[1]>>>0).toString(16);var lower=(origArg[0]>>>0).toString(16);while(lower.length<8)lower="0"+lower;argText+=lower}else{argText=(origArg[0]>>>0).toString(16)}}else if(currArg<0){currArg=-currArg;argText=(currAbsArg-1).toString(16);var buffer=[];for(var i=0;i<argText.length;i++){buffer.push((15-parseInt(argText[i],16)).toString(16))}argText=buffer.join("");while(argText.length<argSize*2)argText="f"+argText}else{argText=currAbsArg.toString(16)}if(next==88){prefix=prefix.toUpperCase();argText=argText.toUpperCase()}}else if(next==112){if(currAbsArg===0){argText="(nil)"}else{prefix="0x";argText=currAbsArg.toString(16)}}if(precisionSet){while(argText.length<precision){argText="0"+argText}}if(currArg>=0){if(flagAlwaysSigned){prefix="+"+prefix}else if(flagPadSign){prefix=" "+prefix}}if(argText.charAt(0)=="-"){prefix="-"+prefix;argText=argText.substr(1)}while(prefix.length+argText.length<width){if(flagLeftAlign){argText+=" "}else{if(flagZeroPad){argText="0"+argText}else{prefix=" "+prefix}}}argText=prefix+argText;argText.split("").forEach((function(chr){ret.push(chr.charCodeAt(0))}));break};case"f":case"F":case"e":case"E":case"g":case"G":{var currArg=getNextArg("double");var argText;if(isNaN(currArg)){argText="nan";flagZeroPad=false}else if(!isFinite(currArg)){argText=(currArg<0?"-":"")+"inf";flagZeroPad=false}else{var isGeneral=false;var effectivePrecision=Math.min(precision,20);if(next==103||next==71){isGeneral=true;precision=precision||1;var exponent=parseInt(currArg.toExponential(effectivePrecision).split("e")[1],10);if(precision>exponent&&exponent>=-4){next=(next==103?"f":"F").charCodeAt(0);precision-=exponent+1}else{next=(next==103?"e":"E").charCodeAt(0);precision--}effectivePrecision=Math.min(precision,20)}if(next==101||next==69){argText=currArg.toExponential(effectivePrecision);if(/[eE][-+]\d$/.test(argText)){argText=argText.slice(0,-1)+"0"+argText.slice(-1)}}else if(next==102||next==70){argText=currArg.toFixed(effectivePrecision);if(currArg===0&&__reallyNegative(currArg)){argText="-"+argText}}var parts=argText.split("e");if(isGeneral&&!flagAlternative){while(parts[0].length>1&&parts[0].indexOf(".")!=-1&&(parts[0].slice(-1)=="0"||parts[0].slice(-1)==".")){parts[0]=parts[0].slice(0,-1)}}else{if(flagAlternative&&argText.indexOf(".")==-1)parts[0]+=".";while(precision>effectivePrecision++)parts[0]+="0"}argText=parts[0]+(parts.length>1?"e"+parts[1]:"");if(next==69)argText=argText.toUpperCase();if(currArg>=0){if(flagAlwaysSigned){argText="+"+argText}else if(flagPadSign){argText=" "+argText}}}while(argText.length<width){if(flagLeftAlign){argText+=" "}else{if(flagZeroPad&&(argText[0]=="-"||argText[0]=="+")){argText=argText[0]+"0"+argText.slice(1)}else{argText=(flagZeroPad?"0":" ")+argText}}}if(next<97)argText=argText.toUpperCase();argText.split("").forEach((function(chr){ret.push(chr.charCodeAt(0))}));break};case"s":{var arg=getNextArg("i8*");var argLength=arg?_strlen(arg):"(null)".length;if(precisionSet)argLength=Math.min(argLength,precision);if(!flagLeftAlign){while(argLength<width--){ret.push(32)}}if(arg){for(var i=0;i<argLength;i++){ret.push(HEAPU8[arg++>>0])}}else{ret=ret.concat(intArrayFromString("(null)".substr(0,argLength),true))}if(flagLeftAlign){while(argLength<width--){ret.push(32)}}break};case"c":{if(flagLeftAlign)ret.push(getNextArg("i8"));while(--width>0){ret.push(32)}if(!flagLeftAlign)ret.push(getNextArg("i8"));break};case"n":{var ptr=getNextArg("i32*");HEAP32[ptr>>2]=ret.length;break};case"%":{ret.push(curr);break};default:{for(var i=startTextIndex;i<textIndex+2;i++){ret.push(HEAP8[i>>0])}}}textIndex+=2}else{ret.push(curr);textIndex+=1}}return ret}function _fprintf(stream,format,varargs){var result=__formatString(format,varargs);var stack=Runtime.stackSave();var ret=_fwrite(allocate(result,"i8",ALLOC_STACK),1,result.length,stream);Runtime.stackRestore(stack);return ret}function _vfprintf(s,f,va_arg){return _fprintf(s,f,HEAP32[va_arg>>2])}function _alcGetContextsDevice(context){if(context<=AL.contexts.length&&context>0){return 1}return 0}function _alGenSources(count,sources){if(!AL.currentContext){return}for(var i=0;i<count;++i){var gain=AL.currentContext.ctx.createGain();gain.connect(AL.currentContext.gain);AL.currentContext.src[AL.newSrcId]={state:4113,queue:[],loop:false,get refDistance(){return this._refDistance||1},set refDistance(val){this._refDistance=val;if(this.panner)this.panner.refDistance=val},get maxDistance(){return this._maxDistance||1e4},set maxDistance(val){this._maxDistance=val;if(this.panner)this.panner.maxDistance=val},get rolloffFactor(){return this._rolloffFactor||1},set rolloffFactor(val){this._rolloffFactor=val;if(this.panner)this.panner.rolloffFactor=val},get position(){return this._position||[0,0,0]},set position(val){this._position=val;if(this.panner)this.panner.setPosition(val[0],val[1],val[2])},get velocity(){return this._velocity||[0,0,0]},set velocity(val){this._velocity=val;if(this.panner)this.panner.setVelocity(val[0],val[1],val[2])},get direction(){return this._direction||[0,0,0]},set direction(val){this._direction=val;if(this.panner)this.panner.setOrientation(val[0],val[1],val[2])},get coneOuterGain(){return this._coneOuterGain||0},set coneOuterGain(val){this._coneOuterGain=val;if(this.panner)this.panner.coneOuterGain=val},get coneInnerAngle(){return this._coneInnerAngle||360},set coneInnerAngle(val){this._coneInnerAngle=val;if(this.panner)this.panner.coneInnerAngle=val},get coneOuterAngle(){return this._coneOuterAngle||360},set coneOuterAngle(val){this._coneOuterAngle=val;if(this.panner)this.panner.coneOuterAngle=val},gain:gain,panner:null,buffersPlayed:0,bufferPosition:0};HEAP32[sources+i*4>>2]=AL.newSrcId;AL.newSrcId++}}var _llvm_pow_f64=Math_pow;function _sbrk(bytes){var self=_sbrk;if(!self.called){DYNAMICTOP=alignMemoryPage(DYNAMICTOP);self.called=true;assert(Runtime.dynamicAlloc);self.alloc=Runtime.dynamicAlloc;Runtime.dynamicAlloc=(function(){abort("cannot dynamically allocate, sbrk now has control")})}var ret=DYNAMICTOP;if(bytes!=0)self.alloc(bytes);return ret}Module["_bitshift64Shl"]=_bitshift64Shl;function ___errno_location(){return ___errno_state}function _strerror_r(errnum,strerrbuf,buflen){if(errnum in ERRNO_MESSAGES){if(ERRNO_MESSAGES[errnum].length>buflen-1){return ___setErrNo(ERRNO_CODES.ERANGE)}else{var msg=ERRNO_MESSAGES[errnum];writeAsciiToMemory(msg,strerrbuf);return 0}}else{return ___setErrNo(ERRNO_CODES.EINVAL)}}function _strerror(errnum){if(!_strerror.buffer)_strerror.buffer=_malloc(256);_strerror_r(errnum,_strerror.buffer,256);return _strerror.buffer}function _glfwInit(){if(GLFW.windows)return 1;GLFW.initialTime=GLFW.getTime();GLFW.hints=GLFW.defaultHints;GLFW.windows=new Array;GLFW.active=null;window.addEventListener("keydown",GLFW.onKeydown,true);window.addEventListener("keypress",GLFW.onKeyPress,true);window.addEventListener("keyup",GLFW.onKeyup,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);return 1}function _alDeleteSources(count,sources){if(!AL.currentContext){return}for(var i=0;i<count;++i){var sourceIdx=HEAP32[sources+i*4>>2];delete AL.currentContext.src[sourceIdx]}}function _glfwSwapBuffers(winid){GLFW.swapBuffers(winid)}function _glUseProgram(program){GLctx.useProgram(program?GL.programs[program]:null)}function _glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){if(pixels){var data=GL.getTexPixelData(type,format,width,height,pixels,internalFormat);pixels=data.pixels;internalFormat=data.internalFormat}else{pixels=null}GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels)}function _sysconf(name){switch(name){case 30:return PAGE_SIZE;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 79:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:{if(typeof navigator==="object")return navigator["hardwareConcurrency"]||1;return 1}}___setErrNo(ERRNO_CODES.EINVAL);return-1}function _glfwDefaultWindowHints(){GLFW.hints=GLFW.defaultHints}function _glfwSwapInterval(interval){interval=Math.abs(interval);if(interval==0)_emscripten_set_main_loop_timing(0,0);else _emscripten_set_main_loop_timing(1,interval)}function _glfwMakeContextCurrent(winid){}function _abort(){Module["abort"]()}function _glfwSetMouseButtonCallback(winid,cbfun){GLFW.setMouseButtonCallback(winid,cbfun)}function _alSourcePause(source){if(!AL.currentContext){return}var src=AL.currentContext.src[source];if(!src){AL.currentContext.err=40961;return}AL.setSourceState(src,4115)}function _glEnable(x0){GLctx.enable(x0)}function _alBufferData(buffer,format,data,size,freq){if(!AL.currentContext){return}if(buffer>AL.currentContext.buf.length){return}var channels,bytes;switch(format){case 4352:bytes=1;channels=1;break;case 4353:bytes=2;channels=1;break;case 4354:bytes=1;channels=2;break;case 4355:bytes=2;channels=2;break;default:return}try{AL.currentContext.buf[buffer-1]=AL.currentContext.ctx.createBuffer(channels,size/(bytes*channels),freq);AL.currentContext.buf[buffer-1].bytesPerSample=bytes}catch(e){AL.currentContext.err=40963;return}var buf=new Array(channels);for(var i=0;i<channels;++i){buf[i]=AL.currentContext.buf[buffer-1].getChannelData(i)}for(var i=0;i<size/(bytes*channels);++i){for(var j=0;j<channels;++j){switch(bytes){case 1:var val=HEAP8[data+(i*channels+j)>>0]&255;buf[j][i]=-1+val*(2/256);break;case 2:var val=HEAP16[data+2*(i*channels+j)>>1];buf[j][i]=val/32768;break}}}}var _floor=Math_floor;function _alGenBuffers(count,buffers){if(!AL.currentContext){return}for(var i=0;i<count;++i){AL.currentContext.buf.push(null);HEAP32[buffers+i*4>>2]=AL.currentContext.buf.length}}function _lseek(fildes,offset,whence){var stream=FS.getStream(fildes);if(!stream){___setErrNo(ERRNO_CODES.EBADF);return-1}try{return FS.llseek(stream,offset,whence)}catch(e){FS.handleFSError(e);return-1}}function _fseek(stream,offset,whence){var fd=_fileno(stream);var ret=_lseek(fd,offset,whence);if(ret==-1){return-1}stream=FS.getStreamFromPtr(stream);stream.eof=false;return 0}function _glGenBuffers(n,buffers){for(var i=0;i<n;i++){var id=GL.getNewId(GL.buffers);var buffer=GLctx.createBuffer();buffer.name=id;GL.buffers[id]=buffer;HEAP32[buffers+i*4>>2]=id}}function _glGetAttribLocation(program,name){program=GL.programs[program];name=Pointer_stringify(name);return GLctx.getAttribLocation(program,name)}function _glfwWindowHint(target,hint){GLFW.hints[target]=hint}var _sin=Math_sin;function _glBlendFunc(x0,x1){GLctx.blendFunc(x0,x1)}function _glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;GL.programs[id]=program;return id}function _glViewport(x0,x1,x2,x3){GLctx.viewport(x0,x1,x2,x3)}function _glfwDestroyWindow(winid){return GLFW.destroyWindow(winid)}function _glfwSetErrorCallback(cbfun){GLFW.errorFunc=cbfun}function _glUniformMatrix4fv(location,count,transpose,value){location=GL.uniforms[location];var view;if(count===1){view=GL.miniTempBufferViews[15];for(var i=0;i<16;i++){view[i]=HEAPF32[value+i*4>>2]}}else{view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(location,transpose,view)}var _BItoD=true;function _glTexParameteri(x0,x1,x2){GLctx.texParameteri(x0,x1,x2)}function _glfwSetKeyCallback(winid,cbfun){GLFW.setKeyCallback(winid,cbfun)}function _glDeleteBuffers(n,buffers){for(var i=0;i<n;i++){var id=HEAP32[buffers+i*4>>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GL.currArrayBuffer)GL.currArrayBuffer=0;if(id==GL.currElementArrayBuffer)GL.currElementArrayBuffer=0}}var _exp=Math_exp;function _time(ptr){var ret=Date.now()/1e3|0;if(ptr){HEAP32[ptr>>2]=ret}return ret}var GLctx;GL.init();_fputc.ret=allocate([0],"i8",ALLOC_STATIC);FS.staticInit();__ATINIT__.unshift({func:(function(){if(!Module["noFSInit"]&&!FS.init.initialized)FS.init()})});__ATMAIN__.push({func:(function(){FS.ignorePermissions=false})});__ATEXIT__.push({func:(function(){FS.quit()})});Module["FS_createFolder"]=FS.createFolder;Module["FS_createPath"]=FS.createPath;Module["FS_createDataFile"]=FS.createDataFile;Module["FS_createPreloadedFile"]=FS.createPreloadedFile;Module["FS_createLazyFile"]=FS.createLazyFile;Module["FS_createLink"]=FS.createLink;Module["FS_createDevice"]=FS.createDevice;___errno_state=Runtime.staticAlloc(4);HEAP32[___errno_state>>2]=0;__ATINIT__.unshift({func:(function(){TTY.init()})});__ATEXIT__.push({func:(function(){TTY.shutdown()})});TTY.utf8=new Runtime.UTF8Processor;if(ENVIRONMENT_IS_NODE){var fs=require("fs");NODEFS.staticInit()}__ATINIT__.push({func:(function(){SOCKFS.root=FS.mount(SOCKFS,{},null)})});Module["requestFullScreen"]=function Module_requestFullScreen(lockPointer,resizeCanvas){Browser.requestFullScreen(lockPointer,resizeCanvas)};Module["requestAnimationFrame"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module["setCanvasSize"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module["pauseMainLoop"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module["resumeMainLoop"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module["getUserMedia"]=function Module_getUserMedia(){Browser.getUserMedia()};_fgetc.ret=allocate([0],"i8",ALLOC_STATIC);STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP);staticSealed=true;STACK_MAX=STACK_BASE+TOTAL_STACK;DYNAMIC_BASE=DYNAMICTOP=Runtime.alignMemory(STACK_MAX);assert(DYNAMIC_BASE<TOTAL_MEMORY,"TOTAL_MEMORY not big enough for stack");var ctlz_i8=allocate([8,7,6,6,5,5,5,5,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",ALLOC_DYNAMIC);var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",ALLOC_DYNAMIC);function invoke_viiiii(index,a1,a2,a3,a4,a5){try{Module["dynCall_viiiii"](index,a1,a2,a3,a4,a5)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;asm["setThrew"](1,0)}}function invoke_vii(index,a1,a2){try{Module["dynCall_vii"](index,a1,a2)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;asm["setThrew"](1,0)}}function invoke_vidd(index,a1,a2,a3){try{Module["dynCall_vidd"](index,a1,a2,a3)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;asm["setThrew"](1,0)}}function invoke_iiii(index,a1,a2,a3){try{return Module["dynCall_iiii"](index,a1,a2,a3)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;asm["setThrew"](1,0)}}function invoke_viii(index,a1,a2,a3){try{Module["dynCall_viii"](index,a1,a2,a3)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;asm["setThrew"](1,0)}}function invoke_v(index){try{Module["dynCall_v"](index)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;asm["setThrew"](1,0)}}function invoke_iii(index,a1,a2){try{return Module["dynCall_iii"](index,a1,a2)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;asm["setThrew"](1,0)}}function invoke_viiii(index,a1,a2,a3,a4){try{Module["dynCall_viiii"](index,a1,a2,a3,a4)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;asm["setThrew"](1,0)}}Module.asmGlobalArg={"Math":Math,"Int8Array":Int8Array,"Int16Array":Int16Array,"Int32Array":Int32Array,"Uint8Array":Uint8Array,"Uint16Array":Uint16Array,"Uint32Array":Uint32Array,"Float32Array":Float32Array,"Float64Array":Float64Array};Module.asmLibraryArg={"abort":abort,"assert":assert,"min":Math_min,"invoke_viiiii":invoke_viiiii,"invoke_vii":invoke_vii,"invoke_vidd":invoke_vidd,"invoke_iiii":invoke_iiii,"invoke_viii":invoke_viii,"invoke_v":invoke_v,"invoke_iii":invoke_iii,"invoke_viiii":invoke_viiii,"_glUseProgram":_glUseProgram,"_alGetError":_alGetError,"_exp":_exp,"_glfwCreateWindow":_glfwCreateWindow,"_sqrtf":_sqrtf,"_fread":_fread,"_glUniformMatrix4fv":_glUniformMatrix4fv,"_glGetShaderiv":_glGetShaderiv,"_alBufferData":_alBufferData,"___assert_fail":___assert_fail,"_glDeleteProgram":_glDeleteProgram,"_glBindBuffer":_glBindBuffer,"_glCreateProgram":_glCreateProgram,"_alSource3f":_alSource3f,"_ftell":_ftell,"_emscripten_set_main_loop_timing":_emscripten_set_main_loop_timing,"_sbrk":_sbrk,"_glBlendFunc":_glBlendFunc,"_glGetAttribLocation":_glGetAttribLocation,"_glDisableVertexAttribArray":_glDisableVertexAttribArray,"_emscripten_memcpy_big":_emscripten_memcpy_big,"_sysconf":_sysconf,"_close":_close,"_cos":_cos,"_alSourceStop":_alSourceStop,"_glfwSetWindowSizeCallback":_glfwSetWindowSizeCallback,"_glfwInit":_glfwInit,"_write":_write,"_fsync":_fsync,"_glGenBuffers":_glGenBuffers,"_glShaderSource":_glShaderSource,"_alcCloseDevice":_alcCloseDevice,"_alSourcePlay":_alSourcePlay,"_alSourcePause":_alSourcePause,"_glfwDefaultWindowHints":_glfwDefaultWindowHints,"_glfwDestroyWindow":_glfwDestroyWindow,"_glGenerateMipmap":_glGenerateMipmap,"_glVertexAttribPointer":_glVertexAttribPointer,"_send":_send,"_alcCreateContext":_alcCreateContext,"_glGetProgramInfoLog":_glGetProgramInfoLog,"_llvm_stackrestore":_llvm_stackrestore,"_glDeleteShader":_glDeleteShader,"_glfwMakeContextCurrent":_glfwMakeContextCurrent,"_glDrawElements":_glDrawElements,"_alGetSourcei":_alGetSourcei,"_glBufferSubData":_glBufferSubData,"_alcMakeContextCurrent":_alcMakeContextCurrent,"_strerror_r":_strerror_r,"_glViewport":_glViewport,"_alSourceQueueBuffers":_alSourceQueueBuffers,"___setErrNo":___setErrNo,"_alcGetCurrentContext":_alcGetCurrentContext,"_alSourcef":_alSourcef,"_glDeleteTextures":_glDeleteTextures,"_glDepthFunc":_glDepthFunc,"_alSourcei":_alSourcei,"_alGenBuffers":_alGenBuffers,"_glEnable":_glEnable,"_glGenTextures":_glGenTextures,"_alDeleteSources":_alDeleteSources,"_glfwSetErrorCallback":_glfwSetErrorCallback,"_pread":_pread,"_glfwSetWindowShouldClose":_glfwSetWindowShouldClose,"_emscripten_get_now":_emscripten_get_now,"_glAttachShader":_glAttachShader,"_read":_read,"_fwrite":_fwrite,"_time":_time,"_fprintf":_fprintf,"_glfwSetMouseButtonCallback":_glfwSetMouseButtonCallback,"_exit":_exit,"_glGetString":_glGetString,"_llvm_pow_f64":_llvm_pow_f64,"_glfwPollEvents":_glfwPollEvents,"_lseek":_lseek,"_vfprintf":_vfprintf,"_floor":_floor,"_pwrite":_pwrite,"_open":_open,"_glClearColor":_glClearColor,"_glBindTexture":_glBindTexture,"_glfwSetCharCallback":_glfwSetCharCallback,"_glUniform1i":_glUniform1i,"_alcDestroyContext":_alcDestroyContext,"_glDrawArrays":_glDrawArrays,"_glCreateShader":_glCreateShader,"_fseek":_fseek,"_glfwGetMouseButton":_glfwGetMouseButton,"_fclose":_fclose,"_log":_log,"_glfwSwapBuffers":_glfwSwapBuffers,"_alcGetString":_alcGetString,"_glfwSetWindowIconifyCallback":_glfwSetWindowIconifyCallback,"_recv":_recv,"_glCompileShader":_glCompileShader,"_glfwSwapInterval":_glfwSwapInterval,"_glEnableVertexAttribArray":_glEnableVertexAttribArray,"_fputc":_fputc,"_abort":_abort,"_alcGetContextsDevice":_alcGetContextsDevice,"_glDeleteBuffers":_glDeleteBuffers,"_glBufferData":_glBufferData,"_glTexImage2D":_glTexImage2D,"_fopen":_fopen,"_sin":_sin,"_glGetProgramiv":_glGetProgramiv,"_glfwGetTime":_glfwGetTime,"_alListener3f":_alListener3f,"_glfwGetPrimaryMonitor":_glfwGetPrimaryMonitor,"_glLinkProgram":_glLinkProgram,"__reallyNegative":__reallyNegative,"_glGetUniformLocation":_glGetUniformLocation,"_strerror":_strerror,"_glClear":_glClear,"_fileno":_fileno,"__exit":__exit,"_glfwTerminate":_glfwTerminate,"_alDeleteBuffers":_alDeleteBuffers,"_llvm_stacksave":_llvm_stacksave,"_mkport":_mkport,"_glfwGetCursorPos":_glfwGetCursorPos,"_fflush":_fflush,"_emscripten_set_main_loop":_emscripten_set_main_loop,"___errno_location":___errno_location,"_glfwWindowHint":_glfwWindowHint,"_alGenSources":_alGenSources,"_fgetc":_fgetc,"_alcOpenDevice":_alcOpenDevice,"_glfwSetKeyCallback":_glfwSetKeyCallback,"_glTexParameteri":_glTexParameteri,"__formatString":__formatString,"_glfwSetScrollCallback":_glfwSetScrollCallback,"_glfwSetCursorEnterCallback":_glfwSetCursorEnterCallback,"_alSourceUnqueueBuffers":_alSourceUnqueueBuffers,"STACKTOP":STACKTOP,"STACK_MAX":STACK_MAX,"tempDoublePtr":tempDoublePtr,"ABORT":ABORT,"cttz_i8":cttz_i8,"ctlz_i8":ctlz_i8,"NaN":NaN,"Infinity":Infinity,"_stdout":_stdout};// EMSCRIPTEN_START_ASM
var asm=(function(global,env,buffer) {
"use asm";var a=new global.Int8Array(buffer);var b=new global.Int16Array(buffer);var c=new global.Int32Array(buffer);var d=new global.Uint8Array(buffer);var e=new global.Uint16Array(buffer);var f=new global.Uint32Array(buffer);var g=new global.Float32Array(buffer);var h=new global.Float64Array(buffer);var i=env.STACKTOP|0;var j=env.STACK_MAX|0;var k=env.tempDoublePtr|0;var l=env.ABORT|0;var m=env.cttz_i8|0;var n=env.ctlz_i8|0;var o=env._stdout|0;var p=0;var q=0;var r=0;var s=0;var t=+env.NaN,u=+env.Infinity;var v=0,w=0,x=0,y=0,z=0.0,A=0,B=0,C=0,D=0.0;var E=0;var F=0;var G=0;var H=0;var I=0;var J=0;var K=0;var L=0;var M=0;var N=0;var O=global.Math.floor;var P=global.Math.abs;var Q=global.Math.sqrt;var R=global.Math.pow;var S=global.Math.cos;var T=global.Math.sin;var U=global.Math.tan;var V=global.Math.acos;var W=global.Math.asin;var X=global.Math.atan;var Y=global.Math.atan2;var Z=global.Math.exp;var _=global.Math.log;var $=global.Math.ceil;var aa=global.Math.imul;var ba=env.abort;var ca=env.assert;var da=env.min;var ea=env.invoke_viiiii;var fa=env.invoke_vii;var ga=env.invoke_vidd;var ha=env.invoke_iiii;var ia=env.invoke_viii;var ja=env.invoke_v;var ka=env.invoke_iii;var la=env.invoke_viiii;var ma=env._glUseProgram;var na=env._alGetError;var oa=env._exp;var pa=env._glfwCreateWindow;var qa=env._sqrtf;var ra=env._fread;var sa=env._glUniformMatrix4fv;var ta=env._glGetShaderiv;var ua=env._alBufferData;var va=env.___assert_fail;var wa=env._glDeleteProgram;var xa=env._glBindBuffer;var ya=env._glCreateProgram;var za=env._alSource3f;var Aa=env._ftell;var Ba=env._emscripten_set_main_loop_timing;var Ca=env._sbrk;var Da=env._glBlendFunc;var Ea=env._glGetAttribLocation;var Fa=env._glDisableVertexAttribArray;var Ga=env._emscripten_memcpy_big;var Ha=env._sysconf;var Ia=env._close;var Ja=env._cos;var Ka=env._alSourceStop;var La=env._glfwSetWindowSizeCallback;var Ma=env._glfwInit;var Na=env._write;var Oa=env._fsync;var Pa=env._glGenBuffers;var Qa=env._glShaderSource;var Ra=env._alcCloseDevice;var Sa=env._alSourcePlay;var Ta=env._alSourcePause;var Ua=env._glfwDefaultWindowHints;var Va=env._glfwDestroyWindow;var Wa=env._glGenerateMipmap;var Xa=env._glVertexAttribPointer;var Ya=env._send;var Za=env._alcCreateContext;var _a=env._glGetProgramInfoLog;var $a=env._llvm_stackrestore;var ab=env._glDeleteShader;var bb=env._glfwMakeContextCurrent;var cb=env._glDrawElements;var db=env._alGetSourcei;var eb=env._glBufferSubData;var fb=env._alcMakeContextCurrent;var gb=env._strerror_r;var hb=env._glViewport;var ib=env._alSourceQueueBuffers;var jb=env.___setErrNo;var kb=env._alcGetCurrentContext;var lb=env._alSourcef;var mb=env._glDeleteTextures;var nb=env._glDepthFunc;var ob=env._alSourcei;var pb=env._alGenBuffers;var qb=env._glEnable;var rb=env._glGenTextures;var sb=env._alDeleteSources;var tb=env._glfwSetErrorCallback;var ub=env._pread;var vb=env._glfwSetWindowShouldClose;var wb=env._emscripten_get_now;var xb=env._glAttachShader;var yb=env._read;var zb=env._fwrite;var Ab=env._time;var Bb=env._fprintf;var Cb=env._glfwSetMouseButtonCallback;var Db=env._exit;var Eb=env._glGetString;var Fb=env._llvm_pow_f64;var Gb=env._glfwPollEvents;var Hb=env._lseek;var Ib=env._vfprintf;var Jb=env._floor;var Kb=env._pwrite;var Lb=env._open;var Mb=env._glClearColor;var Nb=env._glBindTexture;var Ob=env._glfwSetCharCallback;var Pb=env._glUniform1i;var Qb=env._alcDestroyContext;var Rb=env._glDrawArrays;var Sb=env._glCreateShader;var Tb=env._fseek;var Ub=env._glfwGetMouseButton;var Vb=env._fclose;var Wb=env._log;var Xb=env._glfwSwapBuffers;var Yb=env._alcGetString;var Zb=env._glfwSetWindowIconifyCallback;var _b=env._recv;var $b=env._glCompileShader;var ac=env._glfwSwapInterval;var bc=env._glEnableVertexAttribArray;var cc=env._fputc;var dc=env._abort;var ec=env._alcGetContextsDevice;var fc=env._glDeleteBuffers;var gc=env._glBufferData;var hc=env._glTexImage2D;var ic=env._fopen;var jc=env._sin;var kc=env._glGetProgramiv;var lc=env._glfwGetTime;var mc=env._alListener3f;var nc=env._glfwGetPrimaryMonitor;var oc=env._glLinkProgram;var pc=env.__reallyNegative;var qc=env._glGetUniformLocation;var rc=env._strerror;var sc=env._glClear;var tc=env._fileno;var uc=env.__exit;var vc=env._glfwTerminate;var wc=env._alDeleteBuffers;var xc=env._llvm_stacksave;var yc=env._mkport;var zc=env._glfwGetCursorPos;var Ac=env._fflush;var Bc=env._emscripten_set_main_loop;var Cc=env.___errno_location;var Dc=env._glfwWindowHint;var Ec=env._alGenSources;var Fc=env._fgetc;var Gc=env._alcOpenDevice;var Hc=env._glfwSetKeyCallback;var Ic=env._glTexParameteri;var Jc=env.__formatString;var Kc=env._glfwSetScrollCallback;var Lc=env._glfwSetCursorEnterCallback;var Mc=env._alSourceUnqueueBuffers;var Nc=0.0;
// EMSCRIPTEN_START_FUNCS
function Wc(a){a=a|0;var b=0;b=i;i=i+a|0;i=i+15&-16;return b|0}function Xc(){return i|0}function Yc(a){a=a|0;i=a}function Zc(a,b){a=a|0;b=b|0;if(!p){p=a;q=b}}function _c(b){b=b|0;a[k>>0]=a[b>>0];a[k+1>>0]=a[b+1>>0];a[k+2>>0]=a[b+2>>0];a[k+3>>0]=a[b+3>>0]}function $c(b){b=b|0;a[k>>0]=a[b>>0];a[k+1>>0]=a[b+1>>0];a[k+2>>0]=a[b+2>>0];a[k+3>>0]=a[b+3>>0];a[k+4>>0]=a[b+4>>0];a[k+5>>0]=a[b+5>>0];a[k+6>>0]=a[b+6>>0];a[k+7>>0]=a[b+7>>0]}function ad(a){a=a|0;E=a}function bd(){return E|0}function cd(){var a=0,b=0,d=0,e=0,f=0;a=i;i=i+16|0;b=a+8|0;d=a;ge(1280,720,56);Wf();Zf(d,96);e=d;d=c[e+4>>2]|0;f=88;c[f>>2]=c[e>>2];c[f+4>>2]=d;c[30]=0;ed();Bc(1,0,1);c[b+0>>2]=c[22];c[b+4>>2]=c[23];bg(b);Xf();me();i=a;return 0}function dd(){var b=0,d=0,e=0,f=0,h=0,j=0.0,k=0.0,l=0;b=i;i=i+16|0;d=b+12|0;e=b;f=b+4|0;h=b+8|0;a:do if(c[4]|0){j=+g[2];if(!(c[6]|0)){k=j+.019999999552965164;g[2]=k;if(!(k>=1.0))break;g[2]=1.0;c[30]=c[10];c[6]=1;c[12]=0;break}else{k=j+-.019999999552965164;g[2]=k;if(!(k<=0.0))break;g[2]=0.0;c[6]=0;c[4]=0;c[8]=-1;c[10]=-1;break}}else{do if(!(xe(48)|0)){if(xe(49)|0){c[4]=1;c[8]=c[30];c[10]=2;pd();break}if(xe(50)|0){c[4]=1;c[8]=c[30];c[10]=3;ud();break}if(xe(51)|0){c[4]=1;c[8]=c[30];c[10]=4;zd();break}if(xe(52)|0){c[4]=1;c[8]=c[30];c[10]=5;Ed();break}if(xe(53)|0){c[4]=1;c[8]=c[30];c[10]=6;Jd();break}if(xe(54)|0){c[4]=1;c[8]=c[30];c[10]=7;Od();break}if(xe(55)|0){c[4]=1;c[8]=c[30];c[10]=8;Td();break}if(xe(56)|0){c[4]=1;c[8]=c[30];c[10]=9;Yd();break}if(xe(57)|0){c[4]=1;c[8]=c[30];c[10]=10;Yd()}}else{c[4]=1;c[8]=c[30];c[10]=1;jd()}while(0);do switch(c[30]|0){case 0:{fd();if(!(id()|0))break a;c[4]=1;c[8]=c[30];c[10]=1;jd();dg(128);ig(.6000000238418579);break a;break};case 4:{Ad();if(!(Dd()|0))break a;c[4]=1;c[8]=c[30];c[10]=5;Ed();break a;break};case 9:{Zd();if(!(ae()|0))break a;c[4]=1;c[8]=c[30];c[10]=10;be();break a;break};case 3:{vd();if(!(yd()|0))break a;c[4]=1;c[8]=c[30];c[10]=4;zd();break a;break};case 10:{ce();if(!(fe()|0))break a;c[4]=1;c[8]=c[30];c[10]=1;jd();break a;break};case 6:{Kd();if(!(Nd()|0))break a;c[4]=1;c[8]=c[30];c[10]=7;Od();break a;break};case 1:{kd();if(!(od()|0))break a;c[4]=1;c[8]=c[30];c[10]=2;pd();break a;break};case 7:{Pd();if(!(Sd()|0))break a;c[4]=1;c[8]=c[30];c[10]=8;Td();break a;break};case 5:{Fd();if(!(Id()|0))break a;c[4]=1;c[8]=c[30];c[10]=6;Jd();break a;break};case 2:{qd();if(!(td()|0))break a;c[4]=1;c[8]=c[30];c[10]=3;ud();break a;break};case 8:{Ud();if(!(Xd()|0))break a;c[4]=1;c[8]=c[30];c[10]=9;Yd();break a;break};default:break a}while(0)}while(0);qe();a[h>>0]=-11;a[h+1>>0]=-11;a[h+2>>0]=-11;a[h+3>>0]=-1;a[d+0>>0]=a[h+0>>0]|0;a[d+1>>0]=a[h+1>>0]|0;a[d+2>>0]=a[h+2>>0]|0;a[d+3>>0]=a[h+3>>0]|0;pe(d);do switch(c[30]|0){case 1:{ld();break};case 2:{rd();break};case 0:{gd();break};case 3:{wd();break};case 4:{Bd();break};case 5:{Gd();break};case 6:{Ld();break};case 7:{Qd();break};case 10:{de();break};case 9:{_d();break};case 8:{Vd();break};default:{}}while(0);if(!(c[4]|0)){se();i=b;return}h=ne()|0;l=oe()|0;a[f>>0]=-11;a[f+1>>0]=-11;a[f+2>>0]=-11;a[f+3>>0]=-1;k=+g[2];a[d+0>>0]=a[f+0>>0]|0;a[d+1>>0]=a[f+1>>0]|0;a[d+2>>0]=a[f+2>>0]|0;a[d+3>>0]=a[f+3>>0]|0;we(e,d,k);a[d+0>>0]=a[e+0>>0]|0;a[d+1>>0]=a[e+1>>0]|0;a[d+2>>0]=a[e+2>>0]|0;a[d+3>>0]=a[e+3>>0]|0;Ff(0,0,h,l,d);se();i=b;return}function ed(){var a=0;a=i;c[122]=0;c[124]=0;c[126]=((ne()|0)/2|0)+ -128;c[128]=((oe()|0)/2|0)+ -128;i=a;return}function fd(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;b=i;i=i+16|0;d=b;e=c[122]|0;c[122]=e+1;f=c[82]|0;a:do if((f|0)==2){g=(c[76]|0)+4|0;c[76]=g;c[78]=(c[78]|0)+4;if((g|0)==256){c[88]=0;if(a[360]|0){g=0;do{a[360+g>>0]=32;g=g+1|0}while(g>>>0<(vi(360)|0)>>>0)}c[82]=3;h=32}else h=32}else if((f|0)==1){g=(c[72]|0)+4|0;c[72]=g;c[74]=(c[74]|0)+4;if((g|0)==256){c[82]=2;h=32}else h=32}else if((f|0)==3){g=e+2|0;c[122]=g;j=c[70]|0;if(!((g|0)%12|0)){k=j+1|0;c[70]=k;l=k}else l=j;switch(l|0){case 3:{a[322]=121;h=32;break a;break};case 4:{a[323]=108;h=32;break a;break};case 6:{a[325]=98;h=32;break a;break};case 2:{a[321]=97;h=32;break a;break};case 5:{a[324]=105;h=32;break a;break};case 1:{a[320]=114;h=32;break a;break};default:{if((l|0)<=9){h=32;break a}if(!(g&1))c[88]=(c[88]|0)+1;if(c[84]|0){if(c[86]|0){m=g;break a}g=c[88]|0;if(g>>>0<32){ti(360,216,g|0)|0;h=32;break a}else{c[86]=1;c[122]=0;c[d+0>>2]=c[22];c[d+4>>2]=c[23];cg(d);h=32;break a}}g=c[88]|0;if(g>>>0<33){ti(360,152,g|0)|0;h=32;break a}if(a[360]|0){g=0;do{a[360+g>>0]=32;g=g+1|0}while(g>>>0<(vi(360)|0)>>>0)}c[88]=0;c[84]=1;h=32;break a}}}else if((f|0)==0?(g=e+2|0,c[122]=g,(g|0)==120):0){c[82]=1;c[122]=0;h=32}else h=32;while(0);do if((h|0)==32)if(!(c[86]|0)){i=b;return}else{m=c[122]|0;break}while(0);c[122]=m+1;if((m|0)<=89){i=b;return}c[124]=1;i=b;return}function gd(){var b=0,d=0,e=0,f=0,g=0,h=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;b=i;i=i+80|0;d=b+68|0;e=b+64|0;f=b+60|0;g=b+56|0;h=b+52|0;j=b+48|0;k=b+44|0;l=b+40|0;m=b+36|0;n=b+32|0;o=b+24|0;p=b+20|0;q=b+16|0;r=b+12|0;s=b+8|0;t=b+4|0;u=b;v=b+28|0;w=c[82]|0;if(!w){if(!(((c[122]|0)/15|0)&1)){i=b;return}x=c[126]|0;y=(c[128]|0)+ -60|0;a[e>>0]=0;a[e+1>>0]=0;a[e+2>>0]=0;a[e+3>>0]=-1;a[d+0>>0]=a[e+0>>0]|0;a[d+1>>0]=a[e+1>>0]|0;a[d+2>>0]=a[e+2>>0]|0;a[d+3>>0]=a[e+3>>0]|0;Ff(x,y,16,16,d);i=b;return}else if((w|0)==2){y=c[126]|0;x=(c[128]|0)+ -60|0;e=c[72]|0;a[h>>0]=0;a[h+1>>0]=0;a[h+2>>0]=0;a[h+3>>0]=-1;a[d+0>>0]=a[h+0>>0]|0;a[d+1>>0]=a[h+1>>0]|0;a[d+2>>0]=a[h+2>>0]|0;a[d+3>>0]=a[h+3>>0]|0;Ff(y,x,e,16,d);e=c[126]|0;x=(c[128]|0)+ -60|0;y=c[74]|0;a[j>>0]=0;a[j+1>>0]=0;a[j+2>>0]=0;a[j+3>>0]=-1;a[d+0>>0]=a[j+0>>0]|0;a[d+1>>0]=a[j+1>>0]|0;a[d+2>>0]=a[j+2>>0]|0;a[d+3>>0]=a[j+3>>0]|0;Ff(e,x,16,y,d);y=(c[126]|0)+240|0;x=(c[128]|0)+ -60|0;e=c[78]|0;a[k>>0]=0;a[k+1>>0]=0;a[k+2>>0]=0;a[k+3>>0]=-1;a[d+0>>0]=a[k+0>>0]|0;a[d+1>>0]=a[k+1>>0]|0;a[d+2>>0]=a[k+2>>0]|0;a[d+3>>0]=a[k+3>>0]|0;Ff(y,x,16,e,d);e=c[126]|0;x=(c[128]|0)+180|0;y=c[76]|0;a[l>>0]=0;a[l+1>>0]=0;a[l+2>>0]=0;a[l+3>>0]=-1;a[d+0>>0]=a[l+0>>0]|0;a[d+1>>0]=a[l+1>>0]|0;a[d+2>>0]=a[l+2>>0]|0;a[d+3>>0]=a[l+3>>0]|0;Ff(e,x,y,16,d);i=b;return}else if((w|0)==3){y=c[126]|0;x=(c[128]|0)+ -60|0;e=c[72]|0;a[m>>0]=0;a[m+1>>0]=0;a[m+2>>0]=0;a[m+3>>0]=-1;a[d+0>>0]=a[m+0>>0]|0;a[d+1>>0]=a[m+1>>0]|0;a[d+2>>0]=a[m+2>>0]|0;a[d+3>>0]=a[m+3>>0]|0;Ff(y,x,e,16,d);e=c[126]|0;x=(c[128]|0)+ -44|0;y=(c[74]|0)+ -32|0;a[n>>0]=0;a[n+1>>0]=0;a[n+2>>0]=0;a[n+3>>0]=-1;a[d+0>>0]=a[n+0>>0]|0;a[d+1>>0]=a[n+1>>0]|0;a[d+2>>0]=a[n+2>>0]|0;a[d+3>>0]=a[n+3>>0]|0;Ff(e,x,16,y,d);y=(c[126]|0)+240|0;x=(c[128]|0)+ -44|0;e=(c[78]|0)+ -32|0;a[o>>0]=0;a[o+1>>0]=0;a[o+2>>0]=0;a[o+3>>0]=-1;a[d+0>>0]=a[o+0>>0]|0;a[d+1>>0]=a[o+1>>0]|0;a[d+2>>0]=a[o+2>>0]|0;a[d+3>>0]=a[o+3>>0]|0;Ff(y,x,16,e,d);e=c[126]|0;x=(c[128]|0)+180|0;y=c[76]|0;a[p>>0]=0;a[p+1>>0]=0;a[p+2>>0]=0;a[p+3>>0]=-1;a[d+0>>0]=a[p+0>>0]|0;a[d+1>>0]=a[p+1>>0]|0;a[d+2>>0]=a[p+2>>0]|0;a[d+3>>0]=a[p+3>>0]|0;Ff(e,x,y,16,d);y=((ne()|0)/2|0)+ -112|0;x=((oe()|0)/2|0)+ -172|0;a[q>>0]=-11;a[q+1>>0]=-11;a[q+2>>0]=-11;a[q+3>>0]=-1;a[d+0>>0]=a[q+0>>0]|0;a[d+1>>0]=a[q+1>>0]|0;a[d+2>>0]=a[q+2>>0]|0;a[d+3>>0]=a[q+3>>0]|0;Ff(y,x,224,224,d);x=((ne()|0)/2|0)+ -44|0;y=((oe()|0)/2|0)+ -12|0;a[r>>0]=0;a[r+1>>0]=0;a[r+2>>0]=0;a[r+3>>0]=-1;a[d+0>>0]=a[r+0>>0]|0;a[d+1>>0]=a[r+1>>0]|0;a[d+2>>0]=a[r+2>>0]|0;a[d+3>>0]=a[r+3>>0]|0;Pf(320,x,y,50,d);y=(c[84]|0)==0;x=(ne()|0)/2|0;r=x-((Sf(152,30)|0)/2|0)|0;x=(c[128]|0)+230|0;if(y){a[s>>0]=-126;a[s+1>>0]=-126;a[s+2>>0]=-126;a[s+3>>0]=-1;a[d+0>>0]=a[s+0>>0]|0;a[d+1>>0]=a[s+1>>0]|0;a[d+2>>0]=a[s+2>>0]|0;a[d+3>>0]=a[s+3>>0]|0;Pf(360,r,x,30,d);i=b;return}a[t>>0]=-126;a[t+1>>0]=-126;a[t+2>>0]=-126;a[t+3>>0]=-1;a[d+0>>0]=a[t+0>>0]|0;a[d+1>>0]=a[t+1>>0]|0;a[d+2>>0]=a[t+2>>0]|0;a[d+3>>0]=a[t+3>>0]|0;Pf(152,r,x,30,d);x=(c[86]|0)==0;r=(ne()|0)/2|0;if(x){x=r-((Sf(216,30)|0)/2|0)|0;t=(c[128]|0)+280|0;a[u>>0]=-126;a[u+1>>0]=-126;a[u+2>>0]=-126;a[u+3>>0]=-1;a[d+0>>0]=a[u+0>>0]|0;a[d+1>>0]=a[u+1>>0]|0;a[d+2>>0]=a[u+2>>0]|0;a[d+3>>0]=a[u+3>>0]|0;Pf(360,x,t,30,d);i=b;return}else{t=r-((Sf(152,30)|0)/2|0)|0;r=(c[128]|0)+280|0;a[v>>0]=-126;a[v+1>>0]=-126;a[v+2>>0]=-126;a[v+3>>0]=-1;a[d+0>>0]=a[v+0>>0]|0;a[d+1>>0]=a[v+1>>0]|0;a[d+2>>0]=a[v+2>>0]|0;a[d+3>>0]=a[v+3>>0]|0;Pf(216,t,r,30,d);i=b;return}}else if((w|0)==1){w=c[126]|0;r=(c[128]|0)+ -60|0;t=c[72]|0;a[f>>0]=0;a[f+1>>0]=0;a[f+2>>0]=0;a[f+3>>0]=-1;a[d+0>>0]=a[f+0>>0]|0;a[d+1>>0]=a[f+1>>0]|0;a[d+2>>0]=a[f+2>>0]|0;a[d+3>>0]=a[f+3>>0]|0;Ff(w,r,t,16,d);t=c[126]|0;r=(c[128]|0)+ -60|0;w=c[74]|0;a[g>>0]=0;a[g+1>>0]=0;a[g+2>>0]=0;a[g+3>>0]=-1;a[d+0>>0]=a[g+0>>0]|0;a[d+1>>0]=a[g+1>>0]|0;a[d+2>>0]=a[g+2>>0]|0;a[d+3>>0]=a[g+3>>0]|0;Ff(t,r,16,w,d);i=b;return}else{i=b;return}}function hd(){return}function id(){return c[124]|0}function jd(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0;a=i;c[130]=0;c[132]=0;b=(c[134]|0)==0;d=((ne()|0)/2|0)+ -265|0;e=(Sf(560,160)|0)+40|0;c[136]=d;if(b){c[137]=-200;c[138]=e;c[139]=160;b=ne()|0;f=Sf(584,160)|0;g=-30;h=b}else{c[137]=270;c[138]=e;c[139]=160;e=ne()|0;f=Sf(584,160)|0;g=270;h=e}c[142]=h+ -370;c[143]=g;c[144]=f+40;c[145]=160;i=a;return}function kd(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0;a=i;i=i+32|0;b=a+16|0;d=a;e=a+8|0;if(!(c[134]|0)){c[130]=(c[130]|0)+1;f=c[137]|0;if(!(c[148]|0)){g=f+2|0;c[137]=g;h=g}else h=f;if((h|0)>=(oe()|0))c[137]=0-(c[139]|0);Be(e);c[d+0>>2]=c[e+0>>2];c[d+4>>2]=c[e+4>>2];c[b+0>>2]=c[136];c[b+4>>2]=c[137];c[b+8>>2]=c[138];c[b+12>>2]=c[139];if(Jf(d,b)|0){c[150]=1;if((((c[148]|0)==0?(ye(0)|0)!=0:0)?(h=c[137]|0,(h|0)>(((oe()|0)/2|0)+ -110|0)):0)?(h=(c[139]|0)+(c[137]|0)|0,(h|0)<(((oe()|0)/2|0)+100|0)):0)c[148]=1}else c[150]=0;c[d+0>>2]=c[e+0>>2];c[d+4>>2]=c[e+4>>2];c[b+0>>2]=c[142];c[b+4>>2]=c[143];c[b+8>>2]=c[144];c[b+12>>2]=c[145];if(Jf(d,b)|0){c[152]=1;if((c[154]|0)==0?(ye(0)|0)!=0:0)c[143]=(c[143]|0)+100;d=c[143]|0;if((d|0)>=(((oe()|0)/2|0)+ -130|0))c[154]=1}else c[152]=0;if((c[154]|0)!=0&(c[148]|0)!=0){c[134]=1;c[b+0>>2]=c[22];c[b+4>>2]=c[23];cg(b)}}b=c[156]|0;if(!((c[134]|0)==0|(b|0)!=0)){c[158]=(c[130]|0)/60|0;c[156]=1;c[130]=1;i=a;return}if(!b){i=a;return}b=c[130]|0;c[130]=b+1;if((b|0)<=29){i=a;return}if(!(ye(0)|0)){i=a;return}c[132]=1;i=a;return}function ld(){var b=0,d=0,e=0,f=0,g=0,h=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;b=i;i=i+80|0;d=b+8|0;e=b;f=b+60|0;g=b+56|0;h=b+52|0;j=b+48|0;k=b+44|0;l=b+40|0;m=b+64|0;n=b+28|0;o=b+24|0;p=b+20|0;q=b+16|0;r=b+12|0;s=b+32|0;t=b+36|0;u=((oe()|0)/2|0)+100|0;a[g>>0]=-56;a[g+1>>0]=-56;a[g+2>>0]=-56;a[g+3>>0]=-1;a[d+0>>0]=a[g+0>>0]|0;a[d+1>>0]=a[g+1>>0]|0;a[d+2>>0]=a[g+2>>0]|0;a[d+3>>0]=a[g+3>>0]|0;we(f,d,.4000000059604645);a[d+0>>0]=a[f+0>>0]|0;a[d+1>>0]=a[f+1>>0]|0;a[d+2>>0]=a[f+2>>0]|0;a[d+3>>0]=a[f+3>>0]|0;Pf(640,370,u,30,d);u=c[136]|0;f=(c[137]|0)+10|0;a[h>>0]=-126;a[h+1>>0]=-126;a[h+2>>0]=-126;a[h+3>>0]=-1;a[d+0>>0]=a[h+0>>0]|0;a[d+1>>0]=a[h+1>>0]|0;a[d+2>>0]=a[h+2>>0]|0;a[d+3>>0]=a[h+3>>0]|0;Pf(560,u,f,160,d);f=(ne()|0)/2|0;u=f-((Sf(680,160)|0)/2|0)|0;f=((oe()|0)/2|0)+ -80|0;a[j>>0]=-126;a[j+1>>0]=-126;a[j+2>>0]=-126;a[j+3>>0]=-1;a[d+0>>0]=a[j+0>>0]|0;a[d+1>>0]=a[j+1>>0]|0;a[d+2>>0]=a[j+2>>0]|0;a[d+3>>0]=a[j+3>>0]|0;Pf(672,u,f,160,d);f=(ne()|0)/2|0;u=f+210+((Sf(680,160)|0)/-2|0)|0;f=((oe()|0)/2|0)+ -80|0;a[k>>0]=-126;a[k+1>>0]=-126;a[k+2>>0]=-126;a[k+3>>0]=-1;a[d+0>>0]=a[k+0>>0]|0;a[d+1>>0]=a[k+1>>0]|0;a[d+2>>0]=a[k+2>>0]|0;a[d+3>>0]=a[k+3>>0]|0;Pf(688,u,f,160,d);f=c[142]|0;u=(c[143]|0)+10|0;a[l>>0]=-126;a[l+1>>0]=-126;a[l+2>>0]=-126;a[l+3>>0]=-1;a[d+0>>0]=a[l+0>>0]|0;a[d+1>>0]=a[l+1>>0]|0;a[d+2>>0]=a[l+2>>0]|0;a[d+3>>0]=a[l+3>>0]|0;Pf(584,f,u,160,d);if(!((c[150]|0)==0|(c[148]|0)!=0)){u=(c[136]|0)+ -20|0;f=c[137]|0;l=c[138]|0;k=c[139]|0;a[n>>0]=-56;a[n+1>>0]=-56;a[n+2>>0]=-56;a[n+3>>0]=-1;a[d+0>>0]=a[n+0>>0]|0;a[d+1>>0]=a[n+1>>0]|0;a[d+2>>0]=a[n+2>>0]|0;a[d+3>>0]=a[n+3>>0]|0;we(m,d,.800000011920929);a[d+0>>0]=a[m+0>>0]|0;a[d+1>>0]=a[m+1>>0]|0;a[d+2>>0]=a[m+2>>0]|0;a[d+3>>0]=a[m+3>>0]|0;If(u,f,l,k,d)}if(!((c[152]|0)==0|(c[154]|0)!=0)){k=(c[142]|0)+ -20|0;l=c[143]|0;f=c[144]|0;u=c[145]|0;a[p>>0]=-56;a[p+1>>0]=-56;a[p+2>>0]=-56;a[p+3>>0]=-1;a[d+0>>0]=a[p+0>>0]|0;a[d+1>>0]=a[p+1>>0]|0;a[d+2>>0]=a[p+2>>0]|0;a[d+3>>0]=a[p+3>>0]|0;we(o,d,.800000011920929);a[d+0>>0]=a[o+0>>0]|0;a[d+1>>0]=a[o+1>>0]|0;a[d+2>>0]=a[o+2>>0]|0;a[d+3>>0]=a[o+3>>0]|0;If(k,l,f,u,d)}u=(c[156]|0)==0;f=ne()|0;if(u){u=((f|0)/2|0)-((Sf(696,30)|0)/2|0)|0;a[t>>0]=-56;a[t+1>>0]=-56;a[t+2>>0]=-56;a[t+3>>0]=-1;a[d+0>>0]=a[t+0>>0]|0;a[d+1>>0]=a[t+1>>0]|0;a[d+2>>0]=a[t+2>>0]|0;a[d+3>>0]=a[t+3>>0]|0;Pf(696,u,20,30,d);i=b;return}else{u=oe()|0;a[q>>0]=-56;a[q+1>>0]=-56;a[q+2>>0]=-56;a[q+3>>0]=-1;a[d+0>>0]=a[q+0>>0]|0;a[d+1>>0]=a[q+1>>0]|0;a[d+2>>0]=a[q+2>>0]|0;a[d+3>>0]=a[q+3>>0]|0;we(e,d,.6000000238418579);a[d+0>>0]=a[e+0>>0]|0;a[d+1>>0]=a[e+1>>0]|0;a[d+2>>0]=a[e+2>>0]|0;a[d+3>>0]=a[e+3>>0]|0;Ff(0,0,f,60,d);q=u+ -120|0;a[d+0>>0]=a[e+0>>0]|0;a[d+1>>0]=a[e+1>>0]|0;a[d+2>>0]=a[e+2>>0]|0;a[d+3>>0]=a[e+3>>0]|0;Ff(0,60,60,q,d);t=f+ -60|0;a[d+0>>0]=a[e+0>>0]|0;a[d+1>>0]=a[e+1>>0]|0;a[d+2>>0]=a[e+2>>0]|0;a[d+3>>0]=a[e+3>>0]|0;Ff(t,60,60,q,d);q=u+ -60|0;a[d+0>>0]=a[e+0>>0]|0;a[d+1>>0]=a[e+1>>0]|0;a[d+2>>0]=a[e+2>>0]|0;a[d+3>>0]=a[e+3>>0]|0;Ff(0,q,f,60,d);f=(ne()|0)/2|0;q=f-((Sf(696,30)|0)/2|0)|0;a[r>>0]=-126;a[r+1>>0]=-126;a[r+2>>0]=-126;a[r+3>>0]=-1;a[d+0>>0]=a[r+0>>0]|0;a[d+1>>0]=a[r+1>>0]|0;a[d+2>>0]=a[r+2>>0]|0;a[d+3>>0]=a[r+3>>0]|0;Pf(696,q,20,30,d);c[d>>2]=c[158];q=Rf(712,d)|0;r=(ne()|0)/2|0;f=r-((Sf(736,30)|0)/2|0)|0;r=(oe()|0)+ -40|0;a[s>>0]=-126;a[s+1>>0]=-126;a[s+2>>0]=-126;a[s+3>>0]=-1;a[d+0>>0]=a[s+0>>0]|0;a[d+1>>0]=a[s+1>>0]|0;a[d+2>>0]=a[s+2>>0]|0;a[d+3>>0]=a[s+3>>0]|0;Pf(q,f,r,30,d);i=b;return}}function md(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;h=i;i=i+16|0;j=h;k=c[b>>2]|0;l=k+d|0;m=c[b+4>>2]|0;n=m+e|0;o=c[b+8>>2]|0;a[j+0>>0]=a[g+0>>0]|0;a[j+1>>0]=a[g+1>>0]|0;a[j+2>>0]=a[g+2>>0]|0;a[j+3>>0]=a[g+3>>0]|0;Ff(l,n,o,f,j);n=f+e+m|0;p=c[b+12>>2]|0;b=p-(f<<1)|0;a[j+0>>0]=a[g+0>>0]|0;a[j+1>>0]=a[g+1>>0]|0;a[j+2>>0]=a[g+2>>0]|0;a[j+3>>0]=a[g+3>>0]|0;Ff(l,n,f,b,j);q=d-f+k+o|0;a[j+0>>0]=a[g+0>>0]|0;a[j+1>>0]=a[g+1>>0]|0;a[j+2>>0]=a[g+2>>0]|0;a[j+3>>0]=a[g+3>>0]|0;Ff(q,n,f,b,j);b=e-f+m+p|0;a[j+0>>0]=a[g+0>>0]|0;a[j+1>>0]=a[g+1>>0]|0;a[j+2>>0]=a[g+2>>0]|0;a[j+3>>0]=a[g+3>>0]|0;Ff(l,b,o,f,j);i=h;return}function nd(){return}function od(){return c[132]|0}function pd(){var a=0,b=0,d=0,e=0;a=i;c[190]=0;c[192]=0;b=(ne()|0)/2|0;d=oe()|0;c[194]=0;c[195]=0;c[196]=b;c[197]=d;d=(ne()|0)/2|0;b=(ne()|0)/2|0;e=oe()|0;c[198]=d;c[199]=0;c[200]=b;c[201]=e;e=((ne()|0)/4|0)+ -200|0;b=((oe()|0)/2|0)+ -200|0;c[202]=e;c[203]=b;c[204]=400;c[205]=400;b=(ne()|0)/2|0;e=b+ -200+((ne()|0)/4|0)|0;b=((oe()|0)/2|0)+ -200|0;c[206]=e;c[207]=b;c[208]=400;c[209]=400;i=a;return}function qd(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;a=i;i=i+64|0;b=a+40|0;d=a;e=a+8|0;f=a+16|0;g=a+24|0;h=a+32|0;c[190]=(c[190]|0)+1;do if(!(c[210]|0)){do if(ye(0)|0){Be(e);c[d+0>>2]=c[e+0>>2];c[d+4>>2]=c[e+4>>2];c[b+0>>2]=c[202];c[b+4>>2]=c[203];c[b+8>>2]=c[204];c[b+12>>2]=c[205];if(Jf(d,b)|0){j=c[208]|0;if((j|0)<=0){k=j;break}c[206]=(c[206]|0)+20;c[207]=(c[207]|0)+20;c[208]=j+ -40;c[209]=(c[209]|0)+ -40;l=13;break}Be(f);c[d+0>>2]=c[f+0>>2];c[d+4>>2]=c[f+4>>2];c[b+0>>2]=c[206];c[b+4>>2]=c[207];c[b+8>>2]=c[208];c[b+12>>2]=c[209];if(Jf(d,b)|0){j=c[204]|0;if((j|0)<=0){l=13;break}c[202]=(c[202]|0)+20;c[203]=(c[203]|0)+20;c[204]=j+ -40;c[205]=(c[205]|0)+ -40;l=13;break}Be(g);c[d+0>>2]=c[g+0>>2];c[d+4>>2]=c[g+4>>2];c[b+0>>2]=c[194];c[b+4>>2]=c[195];c[b+8>>2]=c[196];c[b+12>>2]=c[197];if(Jf(d,b)|0){c[202]=(c[202]|0)+ -20;c[203]=(c[203]|0)+ -20;c[204]=(c[204]|0)+40;c[205]=(c[205]|0)+40;l=13;break}Be(h);c[d+0>>2]=c[h+0>>2];c[d+4>>2]=c[h+4>>2];c[b+0>>2]=c[198];c[b+4>>2]=c[199];c[b+8>>2]=c[200];c[b+12>>2]=c[201];if(Jf(d,b)|0){c[206]=(c[206]|0)+ -20;c[207]=(c[207]|0)+ -20;c[208]=(c[208]|0)+40;c[209]=(c[209]|0)+40;l=13}else l=13}else l=13;while(0);if((l|0)==13)k=c[208]|0;if(!((k|0)==0?(j=c[205]|0,(j|0)>=(oe()|0)):0)){if(c[204]|0)break;j=c[209]|0;if((j|0)<(oe()|0))break}c[210]=1;c[b+0>>2]=c[22];c[b+4>>2]=c[23];cg(b)}while(0);b=c[212]|0;if(!((c[210]|0)==0|(b|0)!=0)){c[214]=(c[190]|0)/60|0;c[212]=1;c[190]=1;i=a;return}if(!b){i=a;return}b=c[190]|0;c[190]=b+1;if((b|0)<=89){i=a;return}if(!(ye(0)|0)){i=a;return}c[192]=1;i=a;return}function rd(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;b=i;i=i+96|0;d=b;e=b+24|0;f=b+76|0;g=b+72|0;h=b+68|0;j=b+64|0;k=b+60|0;l=b+80|0;m=b+8|0;n=b+44|0;o=b+40|0;p=b+48|0;q=b+52|0;r=b+56|0;s=(c[212]|0)==0;t=ne()|0;if(s){s=oe()|0;a[f>>0]=-56;a[f+1>>0]=-56;a[f+2>>0]=-56;a[f+3>>0]=-1;a[d+0>>0]=a[f+0>>0]|0;a[d+1>>0]=a[f+1>>0]|0;a[d+2>>0]=a[f+2>>0]|0;a[d+3>>0]=a[f+3>>0]|0;Ff(0,0,t,s,d)}else{s=t+ -120|0;t=(oe()|0)+ -120|0;a[g>>0]=-56;a[g+1>>0]=-56;a[g+2>>0]=-56;a[g+3>>0]=-1;a[d+0>>0]=a[g+0>>0]|0;a[d+1>>0]=a[g+1>>0]|0;a[d+2>>0]=a[g+2>>0]|0;a[d+3>>0]=a[g+3>>0]|0;Ff(60,60,s,t,d)}a[h>>0]=-126;a[h+1>>0]=-126;a[h+2>>0]=-126;a[h+3>>0]=-1;c[e+0>>2]=c[194];c[e+4>>2]=c[195];c[e+8>>2]=c[196];c[e+12>>2]=c[197];a[d+0>>0]=a[h+0>>0]|0;a[d+1>>0]=a[h+1>>0]|0;a[d+2>>0]=a[h+2>>0]|0;a[d+3>>0]=a[h+3>>0]|0;Hf(e,d);a[j>>0]=-11;a[j+1>>0]=-11;a[j+2>>0]=-11;a[j+3>>0]=-1;c[e+0>>2]=c[202];c[e+4>>2]=c[203];c[e+8>>2]=c[204];c[e+12>>2]=c[205];a[d+0>>0]=a[j+0>>0]|0;a[d+1>>0]=a[j+1>>0]|0;a[d+2>>0]=a[j+2>>0]|0;a[d+3>>0]=a[j+3>>0]|0;Hf(e,d);a[k>>0]=-11;a[k+1>>0]=-11;a[k+2>>0]=-11;a[k+3>>0]=-1;c[e+0>>2]=c[198];c[e+4>>2]=c[199];c[e+8>>2]=c[200];c[e+12>>2]=c[201];a[d+0>>0]=a[k+0>>0]|0;a[d+1>>0]=a[k+1>>0]|0;a[d+2>>0]=a[k+2>>0]|0;a[d+3>>0]=a[k+3>>0]|0;Hf(e,d);a[l>>0]=-126;a[l+1>>0]=-126;a[l+2>>0]=-126;a[l+3>>0]=-1;c[e+0>>2]=c[206];c[e+4>>2]=c[207];c[e+8>>2]=c[208];c[e+12>>2]=c[209];a[d+0>>0]=a[l+0>>0]|0;a[d+1>>0]=a[l+1>>0]|0;a[d+2>>0]=a[l+2>>0]|0;a[d+3>>0]=a[l+3>>0]|0;Hf(e,d);if(!(c[212]|0)){l=(ne()|0)/2|0;k=l-((Sf(864,30)|0)/2|0)|0;a[r>>0]=-56;a[r+1>>0]=-56;a[r+2>>0]=-56;a[r+3>>0]=-1;a[d+0>>0]=a[r+0>>0]|0;a[d+1>>0]=a[r+1>>0]|0;a[d+2>>0]=a[r+2>>0]|0;a[d+3>>0]=a[r+3>>0]|0;Pf(864,k,20,30,d);i=b;return}else{c[m>>2]=0;c[m+4>>2]=0;c[m+8>>2]=ne()|0;c[m+12>>2]=oe()|0;a[o>>0]=-56;a[o+1>>0]=-56;a[o+2>>0]=-56;a[o+3>>0]=-1;a[d+0>>0]=a[o+0>>0]|0;a[d+1>>0]=a[o+1>>0]|0;a[d+2>>0]=a[o+2>>0]|0;a[d+3>>0]=a[o+3>>0]|0;we(n,d,.6000000238418579);c[e+0>>2]=c[m+0>>2];c[e+4>>2]=c[m+4>>2];c[e+8>>2]=c[m+8>>2];c[e+12>>2]=c[m+12>>2];a[d+0>>0]=a[n+0>>0]|0;a[d+1>>0]=a[n+1>>0]|0;a[d+2>>0]=a[n+2>>0]|0;a[d+3>>0]=a[n+3>>0]|0;md(e,0,0,60,d);e=(ne()|0)/2|0;n=e-((Sf(864,30)|0)/2|0)|0;a[p>>0]=-126;a[p+1>>0]=-126;a[p+2>>0]=-126;a[p+3>>0]=-1;a[d+0>>0]=a[p+0>>0]|0;a[d+1>>0]=a[p+1>>0]|0;a[d+2>>0]=a[p+2>>0]|0;a[d+3>>0]=a[p+3>>0]|0;Pf(864,n,20,30,d);c[d>>2]=c[214];n=Rf(880,d)|0;p=(ne()|0)/2|0;e=p-((Sf(904,30)|0)/2|0)|0;p=(oe()|0)+ -40|0;a[q>>0]=-126;a[q+1>>0]=-126;a[q+2>>0]=-126;a[q+3>>0]=-1;a[d+0>>0]=a[q+0>>0]|0;a[d+1>>0]=a[q+1>>0]|0;a[d+2>>0]=a[q+2>>0]|0;a[d+3>>0]=a[q+3>>0]|0;Pf(n,e,p,30,d);i=b;return}}function sd(){return}function td(){return c[192]|0}function ud(){var a=0,b=0.0,d=0.0;a=i;c[232]=0;c[234]=0;g[236]=120.0;g[237]=80.0;g[238]=6.0;g[240]=8.0;b=+((ne()|0)/2|0|0);d=+((oe()|0)/2|0|0);g[242]=b;g[243]=d;i=a;return}function vd(){var a=0,b=0,d=0,e=0,f=0.0,h=0.0,j=0.0,l=0,m=0,n=0;a=i;i=i+32|0;b=a+16|0;d=a+8|0;e=a;c[232]=(c[232]|0)+1;if(!(c[244]|0)){f=+g[238];h=f+ +g[236];g[236]=h;g[237]=+g[240]+ +g[237];if(!(h+-40.0<=0.0)){if(h+40.0>=+(ne()|0)){j=+g[238];l=5}}else{j=f;l=5}if((l|0)==5)g[238]=j*-1.0;j=+g[237];if(!(!(j+-40.0<=0.0)?!(j+40.0>=+(oe()|0)):0))g[240]=+g[240]*-1.0;Be(e);c[d+0>>2]=c[e+0>>2];c[d+4>>2]=c[e+4>>2];c[b+0>>2]=c[236];c[b+4>>2]=c[237];if(Kf(d,b,120.0)|0){g[236]=+(ve(80,1200)|0);g[237]=+(ve(80,650)|0)}c[d+0>>2]=c[e+0>>2];c[d+4>>2]=c[e+4>>2];c[b+0>>2]=c[242];c[b+4>>2]=c[243];do if((Kf(d,b,120.0)|0)!=0?(ze(0)|0)!=0:0){l=e;m=c[l>>2]|0;n=c[l+4>>2]|0;l=968;c[l>>2]=m;c[l+4>>2]=n;j=(c[k>>2]=m,+g[k>>2]);if(!(j+-50.0<=0.0)){if(j+50.0>=+(ne()|0))g[242]=+(ne()|0)+-50.0}else g[242]=50.0;j=+g[243];if(j+-50.0<=0.0){g[243]=50.0;break}if(j+50.0>=+(oe()|0))g[243]=+(oe()|0)+-50.0}while(0);j=+g[242]- +g[236];f=+g[243]- +g[237];if(+Q(+(j*j+f*f))<20.0){c[244]=1;c[b+0>>2]=c[22];c[b+4>>2]=c[23];cg(b)}}b=c[246]|0;if(!((c[244]|0)==0|(b|0)!=0)){c[248]=(c[232]|0)/60|0;c[246]=1;c[232]=1;i=a;return}if(!b){i=a;return}b=c[232]|0;c[232]=b+1;if((b|0)<=89){i=a;return}if(!(ye(0)|0)){i=a;return}c[234]=1;i=a;return}function wd(){var b=0,d=0,e=0,f=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=i;i=i+80|0;d=b;e=b+24|0;f=b+72|0;h=b+68|0;j=b+64|0;k=b+60|0;l=b+8|0;m=b+56|0;n=b+44|0;o=b+40|0;p=b+48|0;q=b+52|0;a[f>>0]=-56;a[f+1>>0]=-56;a[f+2>>0]=-56;a[f+3>>0]=-1;c[e+0>>2]=c[242];c[e+4>>2]=c[243];a[d+0>>0]=a[f+0>>0]|0;a[d+1>>0]=a[f+1>>0]|0;a[d+2>>0]=a[f+2>>0]|0;a[d+3>>0]=a[f+3>>0]|0;Df(e,50.0,d);a[h>>0]=80;a[h+1>>0]=80;a[h+2>>0]=80;a[h+3>>0]=-1;c[e+0>>2]=c[236];c[e+4>>2]=c[237];a[d+0>>0]=a[h+0>>0]|0;a[d+1>>0]=a[h+1>>0]|0;a[d+2>>0]=a[h+2>>0]|0;a[d+3>>0]=a[h+3>>0]|0;Df(e,40.0,d);h=~~+g[236];f=~~+g[237];a[k>>0]=-56;a[k+1>>0]=-56;a[k+2>>0]=-56;a[k+3>>0]=-1;a[d+0>>0]=a[k+0>>0]|0;a[d+1>>0]=a[k+1>>0]|0;a[d+2>>0]=a[k+2>>0]|0;a[d+3>>0]=a[k+3>>0]|0;we(j,d,.800000011920929);a[d+0>>0]=a[j+0>>0]|0;a[d+1>>0]=a[j+1>>0]|0;a[d+2>>0]=a[j+2>>0]|0;a[d+3>>0]=a[j+3>>0]|0;Ef(h,f,120.0,d);if(!(c[246]|0)){f=(ne()|0)/2|0;h=f-((Sf(1e3,30)|0)/2|0)|0;a[q>>0]=-56;a[q+1>>0]=-56;a[q+2>>0]=-56;a[q+3>>0]=-1;a[d+0>>0]=a[q+0>>0]|0;a[d+1>>0]=a[q+1>>0]|0;a[d+2>>0]=a[q+2>>0]|0;a[d+3>>0]=a[q+3>>0]|0;Pf(1e3,h,20,30,d);i=b;return}else{c[l>>2]=0;c[l+4>>2]=0;c[l+8>>2]=ne()|0;c[l+12>>2]=oe()|0;a[n>>0]=-56;a[n+1>>0]=-56;a[n+2>>0]=-56;a[n+3>>0]=-1;a[d+0>>0]=a[n+0>>0]|0;a[d+1>>0]=a[n+1>>0]|0;a[d+2>>0]=a[n+2>>0]|0;a[d+3>>0]=a[n+3>>0]|0;we(m,d,.6000000238418579);c[e+0>>2]=c[l+0>>2];c[e+4>>2]=c[l+4>>2];c[e+8>>2]=c[l+8>>2];c[e+12>>2]=c[l+12>>2];a[d+0>>0]=a[m+0>>0]|0;a[d+1>>0]=a[m+1>>0]|0;a[d+2>>0]=a[m+2>>0]|0;a[d+3>>0]=a[m+3>>0]|0;md(e,0,0,60,d);e=(ne()|0)/2|0;m=e-((Sf(1e3,30)|0)/2|0)|0;a[o>>0]=-126;a[o+1>>0]=-126;a[o+2>>0]=-126;a[o+3>>0]=-1;a[d+0>>0]=a[o+0>>0]|0;a[d+1>>0]=a[o+1>>0]|0;a[d+2>>0]=a[o+2>>0]|0;a[d+3>>0]=a[o+3>>0]|0;Pf(1e3,m,20,30,d);c[d>>2]=c[248];m=Rf(1016,d)|0;o=(ne()|0)/2|0;e=o-((Sf(1040,30)|0)/2|0)|0;o=(oe()|0)+ -40|0;a[p>>0]=-126;a[p+1>>0]=-126;a[p+2>>0]=-126;a[p+3>>0]=-1;a[d+0>>0]=a[p+0>>0]|0;a[d+1>>0]=a[p+1>>0]|0;a[d+2>>0]=a[p+2>>0]|0;a[d+3>>0]=a[p+3>>0]|0;Pf(m,e,o,30,d);i=b;return}}function xd(){return}function yd(){return c[234]|0}function zd(){var a=0,b=0,d=0;a=i;c[266]=0;c[268]=0;b=((ne()|0)/2|0)+ -50|0;d=((oe()|0)/2|0)+ -50|0;c[270]=b;c[271]=d;c[272]=100;c[273]=100;c[274]=200;c[275]=400;c[276]=100;c[277]=100;i=a;return}function Ad(){var a=0,b=0,d=0,e=0;a=i;i=i+32|0;b=a+16|0;d=a;e=a+8|0;c[266]=(c[266]|0)+1;Be(e);if(!(c[278]|0)){c[d+0>>2]=c[e+0>>2];c[d+4>>2]=c[e+4>>2];c[b+0>>2]=c[270];c[b+4>>2]=c[271];c[b+8>>2]=c[272];c[b+12>>2]=c[273];c[280]=(Jf(d,b)|0)!=0&1;if(ze(0)|0){c[d+0>>2]=c[e+0>>2];c[d+4>>2]=c[e+4>>2];c[b+0>>2]=c[274];c[b+4>>2]=c[275];c[b+8>>2]=c[276];c[b+12>>2]=c[277];if(Jf(d,b)|0){c[274]=~~+g[e>>2]+ -50;c[275]=~~+g[e+4>>2]+ -50}}if((c[274]|0)==(c[270]|0)){c[d+0>>2]=c[e+0>>2];c[d+4>>2]=c[e+4>>2];c[b+0>>2]=c[270];c[b+4>>2]=c[271];c[b+8>>2]=c[272];c[b+12>>2]=c[273];if(!(Jf(d,b)|0)){c[278]=1;c[b+0>>2]=c[22];c[b+4>>2]=c[23];cg(b)}}}b=c[282]|0;if(!((c[278]|0)==0|(b|0)!=0)){c[284]=(c[266]|0)/60|0;c[282]=1;c[266]=1;i=a;return}if(!b){i=a;return}b=c[266]|0;c[266]=b+1;if((b|0)<=89){i=a;return}if(!(ye(0)|0)){i=a;return}c[268]=1;i=a;return}function Bd(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;b=i;i=i+80|0;d=b;e=b+24|0;f=b+72|0;g=b+68|0;h=b+64|0;j=b+60|0;k=b+8|0;l=b+56|0;m=b+44|0;n=b+40|0;o=b+48|0;p=b+52|0;a[f>>0]=-126;a[f+1>>0]=-126;a[f+2>>0]=-126;a[f+3>>0]=-1;c[e+0>>2]=c[270];c[e+4>>2]=c[271];c[e+8>>2]=c[272];c[e+12>>2]=c[273];a[d+0>>0]=a[f+0>>0]|0;a[d+1>>0]=a[f+1>>0]|0;a[d+2>>0]=a[f+2>>0]|0;a[d+3>>0]=a[f+3>>0]|0;Hf(e,d);a[g>>0]=-11;a[g+1>>0]=-11;a[g+2>>0]=-11;a[g+3>>0]=-1;c[e+0>>2]=c[274];c[e+4>>2]=c[275];c[e+8>>2]=c[276];c[e+12>>2]=c[277];a[d+0>>0]=a[g+0>>0]|0;a[d+1>>0]=a[g+1>>0]|0;a[d+2>>0]=a[g+2>>0]|0;a[d+3>>0]=a[g+3>>0]|0;Hf(e,d);if(c[280]|0){g=c[274]|0;f=c[275]|0;q=c[276]|0;r=c[277]|0;a[j>>0]=-56;a[j+1>>0]=-56;a[j+2>>0]=-56;a[j+3>>0]=-1;a[d+0>>0]=a[j+0>>0]|0;a[d+1>>0]=a[j+1>>0]|0;a[d+2>>0]=a[j+2>>0]|0;a[d+3>>0]=a[j+3>>0]|0;we(h,d,.800000011920929);a[d+0>>0]=a[h+0>>0]|0;a[d+1>>0]=a[h+1>>0]|0;a[d+2>>0]=a[h+2>>0]|0;a[d+3>>0]=a[h+3>>0]|0;If(g,f,q,r,d)}if(!(c[282]|0)){r=(ne()|0)/2|0;q=r-((Sf(1144,30)|0)/2|0)|0;a[p>>0]=-56;a[p+1>>0]=-56;a[p+2>>0]=-56;a[p+3>>0]=-1;a[d+0>>0]=a[p+0>>0]|0;a[d+1>>0]=a[p+1>>0]|0;a[d+2>>0]=a[p+2>>0]|0;a[d+3>>0]=a[p+3>>0]|0;Pf(1144,q,20,30,d);i=b;return}else{c[k>>2]=0;c[k+4>>2]=0;c[k+8>>2]=ne()|0;c[k+12>>2]=oe()|0;a[m>>0]=-56;a[m+1>>0]=-56;a[m+2>>0]=-56;a[m+3>>0]=-1;a[d+0>>0]=a[m+0>>0]|0;a[d+1>>0]=a[m+1>>0]|0;a[d+2>>0]=a[m+2>>0]|0;a[d+3>>0]=a[m+3>>0]|0;we(l,d,.6000000238418579);c[e+0>>2]=c[k+0>>2];c[e+4>>2]=c[k+4>>2];c[e+8>>2]=c[k+8>>2];c[e+12>>2]=c[k+12>>2];a[d+0>>0]=a[l+0>>0]|0;a[d+1>>0]=a[l+1>>0]|0;a[d+2>>0]=a[l+2>>0]|0;a[d+3>>0]=a[l+3>>0]|0;md(e,0,0,60,d);e=(ne()|0)/2|0;l=e-((Sf(1144,30)|0)/2|0)|0;a[n>>0]=-126;a[n+1>>0]=-126;a[n+2>>0]=-126;a[n+3>>0]=-1;a[d+0>>0]=a[n+0>>0]|0;a[d+1>>0]=a[n+1>>0]|0;a[d+2>>0]=a[n+2>>0]|0;a[d+3>>0]=a[n+3>>0]|0;Pf(1144,l,20,30,d);c[d>>2]=c[284];l=Rf(1160,d)|0;n=(ne()|0)/2|0;e=n-((Sf(1184,30)|0)/2|0)|0;n=(oe()|0)+ -40|0;a[o>>0]=-126;a[o+1>>0]=-126;a[o+2>>0]=-126;a[o+3>>0]=-1;a[d+0>>0]=a[o+0>>0]|0;a[d+1>>0]=a[o+1>>0]|0;a[d+2>>0]=a[o+2>>0]|0;a[d+3>>0]=a[o+3>>0]|0;Pf(l,e,n,30,d);i=b;return}}function Cd(){return}function Dd(){return c[268]|0}function Ed(){var a=0,b=0.0,d=0.0;a=i;c[302]=0;c[304]=0;b=+((ne()|0)/2|0|0);d=+((oe()|0)/2|0|0);g[306]=b;g[307]=d;i=a;return}function Fd(){var a=0,b=0,d=0,e=0,f=0,h=0.0,j=0.0,k=0,l=0.0,m=0,n=0.0,o=0.0;a=i;i=i+32|0;b=a+24|0;d=a;e=a+8|0;f=a+16|0;c[302]=(c[302]|0)+1;if(!(c[308]|0)){do if(!(ze(0)|0))if(!(c[308]|0)){h=+g[310]+-2.0;g[310]=h;j=+g[312];if(j>300.0){g[312]=j+-2.0;k=12}else l=h}else k=12;else{Be(e);h=+g[310];c[d+0>>2]=c[e+0>>2];c[d+4>>2]=c[e+4>>2];c[b+0>>2]=c[306];c[b+4>>2]=c[307];if(Kf(d,b,h)|0){h=+g[310]+2.0;g[310]=h;l=h;break}Be(f);h=+g[312];c[d+0>>2]=c[f+0>>2];c[d+4>>2]=c[f+4>>2];c[b+0>>2]=c[306];c[b+4>>2]=c[307];m=(Kf(d,b,h)|0)==0;h=+g[312];if(!m){g[312]=h+2.0;k=12;break}j=h+-2.0;g[312]=j;if(!(j<=260.0))k=12;else{g[312]=260.0;k=12}}while(0);if((k|0)==12)l=+g[310];if(!(l>=270.0))if(!(l<=40.0))n=l;else{g[310]=40.0;n=40.0}else{g[310]=270.0;n=270.0}l=+g[312];if(!(l>=600.0))o=l;else{g[312]=600.0;o=600.0}if(n>=o){c[308]=1;c[b+0>>2]=c[22];c[b+4>>2]=c[23];cg(b)}}b=c[314]|0;if(!((c[308]|0)==0|(b|0)!=0)){c[316]=(c[302]|0)/60|0;c[314]=1;c[302]=1;i=a;return}if(!b){i=a;return}b=c[302]|0;c[302]=b+1;if((b|0)<=89){i=a;return}if(!(ye(0)|0)){i=a;return}c[304]=1;i=a;return}function Gd(){var b=0,d=0,e=0,f=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0;b=i;i=i+80|0;d=b;e=b+24|0;f=b+60|0;h=b+56|0;j=b+8|0;k=b+64|0;l=b+48|0;m=b+40|0;n=b+52|0;o=b+44|0;p=+g[312];a[f>>0]=-126;a[f+1>>0]=-126;a[f+2>>0]=-126;a[f+3>>0]=-1;c[e+0>>2]=c[306];c[e+4>>2]=c[307];a[d+0>>0]=a[f+0>>0]|0;a[d+1>>0]=a[f+1>>0]|0;a[d+2>>0]=a[f+2>>0]|0;a[d+3>>0]=a[f+3>>0]|0;Df(e,p,d);p=+g[310];a[h>>0]=-11;a[h+1>>0]=-11;a[h+2>>0]=-11;a[h+3>>0]=-1;c[e+0>>2]=c[306];c[e+4>>2]=c[307];a[d+0>>0]=a[h+0>>0]|0;a[d+1>>0]=a[h+1>>0]|0;a[d+2>>0]=a[h+2>>0]|0;a[d+3>>0]=a[h+3>>0]|0;Df(e,p,d);if(!(c[314]|0)){h=(ne()|0)/2|0;f=h-((Sf(1272,30)|0)/2|0)|0;a[o>>0]=-56;a[o+1>>0]=-56;a[o+2>>0]=-56;a[o+3>>0]=-1;a[d+0>>0]=a[o+0>>0]|0;a[d+1>>0]=a[o+1>>0]|0;a[d+2>>0]=a[o+2>>0]|0;a[d+3>>0]=a[o+3>>0]|0;Pf(1272,f,20,30,d);i=b;return}else{c[j>>2]=0;c[j+4>>2]=0;c[j+8>>2]=ne()|0;c[j+12>>2]=oe()|0;a[l>>0]=-56;a[l+1>>0]=-56;a[l+2>>0]=-56;a[l+3>>0]=-1;a[d+0>>0]=a[l+0>>0]|0;a[d+1>>0]=a[l+1>>0]|0;a[d+2>>0]=a[l+2>>0]|0;a[d+3>>0]=a[l+3>>0]|0;we(k,d,.6000000238418579);c[e+0>>2]=c[j+0>>2];c[e+4>>2]=c[j+4>>2];c[e+8>>2]=c[j+8>>2];c[e+12>>2]=c[j+12>>2];a[d+0>>0]=a[k+0>>0]|0;a[d+1>>0]=a[k+1>>0]|0;a[d+2>>0]=a[k+2>>0]|0;a[d+3>>0]=a[k+3>>0]|0;md(e,0,0,60,d);e=(ne()|0)/2|0;k=e-((Sf(1272,30)|0)/2|0)|0;a[m>>0]=-126;a[m+1>>0]=-126;a[m+2>>0]=-126;a[m+3>>0]=-1;a[d+0>>0]=a[m+0>>0]|0;a[d+1>>0]=a[m+1>>0]|0;a[d+2>>0]=a[m+2>>0]|0;a[d+3>>0]=a[m+3>>0]|0;Pf(1272,k,20,30,d);c[d>>2]=c[316];k=Rf(1288,d)|0;m=(ne()|0)/2|0;e=m-((Sf(1312,30)|0)/2|0)|0;m=(oe()|0)+ -40|0;a[n>>0]=-126;a[n+1>>0]=-126;a[n+2>>0]=-126;a[n+3>>0]=-1;a[d+0>>0]=a[n+0>>0]|0;a[d+1>>0]=a[n+1>>0]|0;a[d+2>>0]=a[n+2>>0]|0;a[d+3>>0]=a[n+3>>0]|0;Pf(k,e,m,30,d);i=b;return}}function Hd(){return}function Id(){return c[304]|0}function Jd(){var b=0,d=0.0,e=0.0;b=i;c[334]=0;c[336]=0;d=+((ne()|0)/2|0|0);e=+((oe()|0)/2|0|0);g[338]=d;g[339]=e;g[340]=760.0;g[341]=684.0;g[342]=608.0;g[343]=532.0;g[344]=456.0;g[345]=380.0;g[346]=304.0;g[347]=228.0;g[348]=152.0;g[349]=76.0;a[1436]=-126;a[1437]=-126;a[1438]=-126;a[1439]=-1;a[1432]=-11;a[1433]=-11;a[1434]=-11;a[1435]=-1;a[1428]=-11;a[1429]=-11;a[1430]=-11;a[1431]=-1;a[1424]=-126;a[1425]=-126;a[1426]=-126;a[1427]=-1;a[1420]=-11;a[1421]=-11;a[1422]=-11;a[1423]=-1;a[1416]=-126;a[1417]=-126;a[1418]=-126;a[1419]=-1;a[1412]=-126;a[1413]=-126;a[1414]=-126;a[1415]=-1;a[1408]=-126;a[1409]=-126;a[1410]=-126;a[1411]=-1;a[1404]=-11;a[1405]=-11;a[1406]=-11;a[1407]=-1;a[1400]=-126;a[1401]=-126;a[1402]=-126;a[1403]=-1;i=b;return}function Kd(){var b=0,d=0,e=0,f=0,h=0,j=0,k=0.0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;b=i;i=i+32|0;d=b+16|0;e=b;f=b+8|0;c[334]=(c[334]|0)+1;h=c[360]|0;do if(!h){a:do if(ye(0)|0){j=9;while(1){Be(f);k=+g[1360+(j<<2)>>2];c[e+0>>2]=c[f+0>>2];c[e+4>>2]=c[f+4>>2];c[d+0>>2]=c[338];c[d+4>>2]=c[339];if(Kf(e,d,k)|0)break;if((j|0)>0)j=j+ -1|0;else{l=0;break a}}if((j|0)==3)if((a[1424]|0)==-126&(a[1425]|0)==-126&(a[1426]|0)==-126&(a[1427]|0)==-1){a[1424]=-11;a[1425]=-11;a[1426]=-11;a[1427]=-1;i=b;return}else{a[1424]=-126;a[1425]=-126;a[1426]=-126;a[1427]=-1;i=b;return}else if((j|0)==2)if((a[1420]|0)==-126&(a[1421]|0)==-126&(a[1422]|0)==-126&(a[1423]|0)==-1){a[1420]=-11;a[1421]=-11;a[1422]=-11;a[1423]=-1;i=b;return}else{a[1420]=-126;a[1421]=-126;a[1422]=-126;a[1423]=-1;i=b;return}else if(!j)if((a[1432]|0)==-126&(a[1433]|0)==-126&(a[1434]|0)==-126&(a[1435]|0)==-1){a[1432]=-11;a[1433]=-11;a[1434]=-11;a[1435]=-1;i=b;return}else{a[1432]=-126;a[1433]=-126;a[1434]=-126;a[1435]=-1;i=b;return}else{m=1400+(j<<2)|0;n=1401+(j<<2)|0;if((((a[m>>0]|0)==-126?(a[n>>0]|0)==-126:0)?(o=1402+(j<<2)|0,(a[o>>0]|0)==-126):0)?(p=1403+(j<<2)|0,(a[p>>0]|0)==-1):0){a[m>>0]=-11;a[n>>0]=-11;a[o>>0]=-11;a[p>>0]=-1;i=b;return}a[m>>0]=-126;a[n>>0]=-126;a[1402+(j<<2)>>0]=-126;a[1403+(j<<2)>>0]=-1;i=b;return}}else l=0;while(0);while(1){if((((a[1400+(l<<2)>>0]|0)==-11?(a[1401+(l<<2)>>0]|0)==-11:0)?(a[1402+(l<<2)>>0]|0)==-11:0)?(a[1403+(l<<2)>>0]|0)==-1:0)break;l=l+1|0;if((l|0)>=10){q=27;break}}if((q|0)==27){c[360]=1;c[d+0>>2]=c[22];c[d+4>>2]=c[23];cg(d);r=c[360]|0;break}c[360]=0;i=b;return}else r=h;while(0);h=c[362]|0;if(!((r|0)==0|(h|0)!=0)){c[364]=(c[334]|0)/60|0;c[362]=1;c[334]=1;i=b;return}if(!h){i=b;return}h=c[334]|0;c[334]=h+1;if((h|0)<=89){i=b;return}if(!(ye(0)|0)){i=b;return}c[336]=1;i=b;return}function Ld(){var b=0,d=0,e=0,f=0,h=0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0;b=i;i=i+64|0;d=b;e=b+24|0;f=b+8|0;h=b+56|0;j=b+40|0;k=b+44|0;l=b+48|0;m=b+52|0;n=+g[340];c[e+0>>2]=c[338];c[e+4>>2]=c[339];a[d+0>>0]=a[1400]|0;a[d+1>>0]=a[1401]|0;a[d+2>>0]=a[1402]|0;a[d+3>>0]=a[1403]|0;Cf(e,64,n,0.0,d);n=+g[341];c[e+0>>2]=c[338];c[e+4>>2]=c[339];a[d+0>>0]=a[1404]|0;a[d+1>>0]=a[1405]|0;a[d+2>>0]=a[1406]|0;a[d+3>>0]=a[1407]|0;Cf(e,64,n,0.0,d);n=+g[342];c[e+0>>2]=c[338];c[e+4>>2]=c[339];a[d+0>>0]=a[1408]|0;a[d+1>>0]=a[1409]|0;a[d+2>>0]=a[1410]|0;a[d+3>>0]=a[1411]|0;Cf(e,64,n,0.0,d);n=+g[343];c[e+0>>2]=c[338];c[e+4>>2]=c[339];a[d+0>>0]=a[1412]|0;a[d+1>>0]=a[1413]|0;a[d+2>>0]=a[1414]|0;a[d+3>>0]=a[1415]|0;Cf(e,64,n,0.0,d);n=+g[344];c[e+0>>2]=c[338];c[e+4>>2]=c[339];a[d+0>>0]=a[1416]|0;a[d+1>>0]=a[1417]|0;a[d+2>>0]=a[1418]|0;a[d+3>>0]=a[1419]|0;Cf(e,64,n,0.0,d);n=+g[345];c[e+0>>2]=c[338];c[e+4>>2]=c[339];a[d+0>>0]=a[1420]|0;a[d+1>>0]=a[1421]|0;a[d+2>>0]=a[1422]|0;a[d+3>>0]=a[1423]|0;Cf(e,64,n,0.0,d);n=+g[346];c[e+0>>2]=c[338];c[e+4>>2]=c[339];a[d+0>>0]=a[1424]|0;a[d+1>>0]=a[1425]|0;a[d+2>>0]=a[1426]|0;a[d+3>>0]=a[1427]|0;Cf(e,64,n,0.0,d);n=+g[347];c[e+0>>2]=c[338];c[e+4>>2]=c[339];a[d+0>>0]=a[1428]|0;a[d+1>>0]=a[1429]|0;a[d+2>>0]=a[1430]|0;a[d+3>>0]=a[1431]|0;Cf(e,64,n,0.0,d);n=+g[348];c[e+0>>2]=c[338];c[e+4>>2]=c[339];a[d+0>>0]=a[1432]|0;a[d+1>>0]=a[1433]|0;a[d+2>>0]=a[1434]|0;a[d+3>>0]=a[1435]|0;Cf(e,64,n,0.0,d);n=+g[349];c[e+0>>2]=c[338];c[e+4>>2]=c[339];a[d+0>>0]=a[1436]|0;a[d+1>>0]=a[1437]|0;a[d+2>>0]=a[1438]|0;a[d+3>>0]=a[1439]|0;Cf(e,64,n,0.0,d);if(!(c[362]|0)){o=(ne()|0)/2|0;p=o-((Sf(1464,30)|0)/2|0)|0;a[m>>0]=-56;a[m+1>>0]=-56;a[m+2>>0]=-56;a[m+3>>0]=-1;a[d+0>>0]=a[m+0>>0]|0;a[d+1>>0]=a[m+1>>0]|0;a[d+2>>0]=a[m+2>>0]|0;a[d+3>>0]=a[m+3>>0]|0;Pf(1464,p,20,30,d);i=b;return}else{c[f>>2]=0;c[f+4>>2]=0;c[f+8>>2]=ne()|0;c[f+12>>2]=oe()|0;a[j>>0]=-56;a[j+1>>0]=-56;a[j+2>>0]=-56;a[j+3>>0]=-1;a[d+0>>0]=a[j+0>>0]|0;a[d+1>>0]=a[j+1>>0]|0;a[d+2>>0]=a[j+2>>0]|0;a[d+3>>0]=a[j+3>>0]|0;we(h,d,.6000000238418579);c[e+0>>2]=c[f+0>>2];c[e+4>>2]=c[f+4>>2];c[e+8>>2]=c[f+8>>2];c[e+12>>2]=c[f+12>>2];a[d+0>>0]=a[h+0>>0]|0;a[d+1>>0]=a[h+1>>0]|0;a[d+2>>0]=a[h+2>>0]|0;a[d+3>>0]=a[h+3>>0]|0;md(e,0,0,60,d);e=(ne()|0)/2|0;h=e-((Sf(1464,30)|0)/2|0)|0;a[k>>0]=-126;a[k+1>>0]=-126;a[k+2>>0]=-126;a[k+3>>0]=-1;a[d+0>>0]=a[k+0>>0]|0;a[d+1>>0]=a[k+1>>0]|0;a[d+2>>0]=a[k+2>>0]|0;a[d+3>>0]=a[k+3>>0]|0;Pf(1464,h,20,30,d);c[d>>2]=c[364];h=Rf(1480,d)|0;k=(ne()|0)/2|0;e=k-((Sf(1504,30)|0)/2|0)|0;k=(oe()|0)+ -40|0;a[l>>0]=-126;a[l+1>>0]=-126;a[l+2>>0]=-126;a[l+3>>0]=-1;a[d+0>>0]=a[l+0>>0]|0;a[d+1>>0]=a[l+1>>0]|0;a[d+2>>0]=a[l+2>>0]|0;a[d+3>>0]=a[l+3>>0]|0;Pf(h,e,k,30,d);i=b;return}}function Md(){return}function Nd(){return c[336]|0}function Od(){var a=0,b=0,d=0;a=i;c[382]=0;c[384]=0;b=((ne()|0)/2|0)+ -100|0;d=oe()|0;c[386]=b;c[387]=0;c[388]=200;c[389]=d;c[390]=(ve(0,5)|0)*150;c[391]=90;c[392]=100;c[393]=100;c[406]=0;c[410]=ve(4,8)|0;c[394]=(ve(0,5)|0)*150;c[395]=240;c[396]=100;c[397]=100;c[407]=0;c[411]=ve(4,8)|0;c[398]=(ve(0,5)|0)*150;c[399]=390;c[400]=100;c[401]=100;c[408]=0;c[412]=ve(4,8)|0;c[402]=(ve(0,5)|0)*150;c[403]=540;c[404]=100;c[405]=100;c[409]=0;c[413]=ve(4,8)|0;i=a;return}function Pd(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;a=i;i=i+32|0;b=a+16|0;d=a;e=a+8|0;c[382]=(c[382]|0)+1;if(!(c[414]|0)){f=0;a:while(1){if(!(c[1624+(f<<2)>>2]|0)){g=1560+(f<<4)|0;h=(c[g>>2]|0)+(c[1640+(f<<2)>>2]|0)|0;c[g>>2]=h;g=1560+(f<<4)|0;j=g;k=g;l=h}else{h=1560+(f<<4)|0;j=h;k=h;l=c[h>>2]|0}if((l|0)>=(ne()|0))c[j>>2]=0-(c[1568+(f<<4)>>2]|0);Be(e);c[d+0>>2]=c[e+0>>2];c[d+4>>2]=c[e+4>>2];c[b+0>>2]=c[k+0>>2];c[b+4>>2]=c[k+4>>2];c[b+8>>2]=c[k+8>>2];c[b+12>>2]=c[k+12>>2];do if((Jf(d,b)|0)!=0?(c[416]=f,(ye(0)|0)!=0):0){if(!f)c[409]=(c[409]|0)==0&1;else if((f|0)==2)c[406]=(c[406]|0)==0&1;else if((f|0)==1)c[408]=(c[408]|0)==0&1;else if((f|0)==3){m=13;break a}else break;f=f+1|0;continue a}while(0);f=f+1|0;if((f|0)==4)break}if((m|0)==13)c[407]=(c[407]|0)==0&1;m=c[390]|0;f=c[386]|0;if((((((((m|0)>(f|0)?(d=(c[388]|0)+f|0,((c[392]|0)+m|0)<(d|0)):0)?(m=c[394]|0,(m|0)>(f|0)):0)?((c[396]|0)+m|0)<(d|0):0)?(m=c[398]|0,(m|0)>(f|0)):0)?((c[400]|0)+m|0)<(d|0):0)?(m=c[402]|0,(m|0)>(f|0)):0)?((c[404]|0)+m|0)<(d|0):0){c[414]=1;c[b+0>>2]=c[22];c[b+4>>2]=c[23];cg(b)}}b=c[418]|0;if(!((c[414]|0)==0|(b|0)!=0)){c[420]=(c[382]|0)/60|0;c[418]=1;c[382]=1;i=a;return}if(!b){i=a;return}b=c[382]|0;c[382]=b+1;if((b|0)<=89){i=a;return}if(!(ye(0)|0)){i=a;return}c[384]=1;i=a;return}function Qd(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;b=i;i=i+80|0;d=b;e=b+24|0;f=b+72|0;g=b+68|0;h=b+64|0;j=b+60|0;k=b+8|0;l=b+56|0;m=b+44|0;n=b+40|0;o=b+48|0;p=b+52|0;a[f>>0]=-56;a[f+1>>0]=-56;a[f+2>>0]=-56;a[f+3>>0]=-1;c[e+0>>2]=c[386];c[e+4>>2]=c[387];c[e+8>>2]=c[388];c[e+12>>2]=c[389];a[d+0>>0]=a[f+0>>0]|0;a[d+1>>0]=a[f+1>>0]|0;a[d+2>>0]=a[f+2>>0]|0;a[d+3>>0]=a[f+3>>0]|0;Hf(e,d);f=g+1|0;q=g+2|0;r=g+3|0;a[g>>0]=-126;a[f>>0]=-126;a[q>>0]=-126;a[r>>0]=-1;c[e+0>>2]=c[390];c[e+4>>2]=c[391];c[e+8>>2]=c[392];c[e+12>>2]=c[393];a[d+0>>0]=a[g+0>>0]|0;a[d+1>>0]=a[g+1>>0]|0;a[d+2>>0]=a[g+2>>0]|0;a[d+3>>0]=a[g+3>>0]|0;Hf(e,d);a[g>>0]=-126;a[f>>0]=-126;a[q>>0]=-126;a[r>>0]=-1;c[e+0>>2]=c[394];c[e+4>>2]=c[395];c[e+8>>2]=c[396];c[e+12>>2]=c[397];a[d+0>>0]=a[g+0>>0]|0;a[d+1>>0]=a[g+1>>0]|0;a[d+2>>0]=a[g+2>>0]|0;a[d+3>>0]=a[g+3>>0]|0;Hf(e,d);a[g>>0]=-126;a[f>>0]=-126;a[q>>0]=-126;a[r>>0]=-1;c[e+0>>2]=c[398];c[e+4>>2]=c[399];c[e+8>>2]=c[400];c[e+12>>2]=c[401];a[d+0>>0]=a[g+0>>0]|0;a[d+1>>0]=a[g+1>>0]|0;a[d+2>>0]=a[g+2>>0]|0;a[d+3>>0]=a[g+3>>0]|0;Hf(e,d);a[g>>0]=-126;a[f>>0]=-126;a[q>>0]=-126;a[r>>0]=-1;c[e+0>>2]=c[402];c[e+4>>2]=c[403];c[e+8>>2]=c[404];c[e+12>>2]=c[405];a[d+0>>0]=a[g+0>>0]|0;a[d+1>>0]=a[g+1>>0]|0;a[d+2>>0]=a[g+2>>0]|0;a[d+3>>0]=a[g+3>>0]|0;Hf(e,d);g=c[416]|0;if((g>>>31^1)&(c[414]^1)){r=(c[1560+(g<<4)>>2]|0)+ -5|0;q=(c[1564+(g<<4)>>2]|0)+ -5|0;f=(c[1568+(g<<4)>>2]|0)+10|0;s=(c[1572+(g<<4)>>2]|0)+10|0;a[j>>0]=-56;a[j+1>>0]=-56;a[j+2>>0]=-56;a[j+3>>0]=-1;a[d+0>>0]=a[j+0>>0]|0;a[d+1>>0]=a[j+1>>0]|0;a[d+2>>0]=a[j+2>>0]|0;a[d+3>>0]=a[j+3>>0]|0;we(h,d,.800000011920929);a[d+0>>0]=a[h+0>>0]|0;a[d+1>>0]=a[h+1>>0]|0;a[d+2>>0]=a[h+2>>0]|0;a[d+3>>0]=a[h+3>>0]|0;If(r,q,f,s,d)}if(!(c[418]|0)){s=(ne()|0)/2|0;f=s-((Sf(1688,30)|0)/2|0)|0;a[p>>0]=-56;a[p+1>>0]=-56;a[p+2>>0]=-56;a[p+3>>0]=-1;a[d+0>>0]=a[p+0>>0]|0;a[d+1>>0]=a[p+1>>0]|0;a[d+2>>0]=a[p+2>>0]|0;a[d+3>>0]=a[p+3>>0]|0;Pf(1688,f,20,30,d);i=b;return}else{c[k>>2]=0;c[k+4>>2]=0;c[k+8>>2]=ne()|0;c[k+12>>2]=oe()|0;a[m>>0]=-56;a[m+1>>0]=-56;a[m+2>>0]=-56;a[m+3>>0]=-1;a[d+0>>0]=a[m+0>>0]|0;a[d+1>>0]=a[m+1>>0]|0;a[d+2>>0]=a[m+2>>0]|0;a[d+3>>0]=a[m+3>>0]|0;we(l,d,.6000000238418579);c[e+0>>2]=c[k+0>>2];c[e+4>>2]=c[k+4>>2];c[e+8>>2]=c[k+8>>2];c[e+12>>2]=c[k+12>>2];a[d+0>>0]=a[l+0>>0]|0;a[d+1>>0]=a[l+1>>0]|0;a[d+2>>0]=a[l+2>>0]|0;a[d+3>>0]=a[l+3>>0]|0;md(e,0,0,60,d);e=(ne()|0)/2|0;l=e-((Sf(1688,30)|0)/2|0)|0;a[n>>0]=-126;a[n+1>>0]=-126;a[n+2>>0]=-126;a[n+3>>0]=-1;a[d+0>>0]=a[n+0>>0]|0;a[d+1>>0]=a[n+1>>0]|0;a[d+2>>0]=a[n+2>>0]|0;a[d+3>>0]=a[n+3>>0]|0;Pf(1688,l,20,30,d);c[d>>2]=c[420];l=Rf(1704,d)|0;n=(ne()|0)/2|0;e=n-((Sf(1728,30)|0)/2|0)|0;n=(oe()|0)+ -40|0;a[o>>0]=-126;a[o+1>>0]=-126;a[o+2>>0]=-126;a[o+3>>0]=-1;a[d+0>>0]=a[o+0>>0]|0;a[d+1>>0]=a[o+1>>0]|0;a[d+2>>0]=a[o+2>>0]|0;a[d+3>>0]=a[o+3>>0]|0;Pf(l,e,n,30,d);i=b;return}}function Rd(){return}function Sd(){return c[384]|0}function Td(){var b=0,d=0.0,e=0.0;b=i;c[438]=0;c[440]=0;d=+(((ne()|0)/2|0)+ -340|0);e=+(((oe()|0)/2|0)+ -100|0);g[442]=d;g[443]=e;e=+((ne()|0)/2|0|0);d=+(((oe()|0)/2|0)+ -100|0);g[444]=e;g[445]=d;d=+(((ne()|0)/2|0)+340|0);e=+(((oe()|0)/2|0)+ -100|0);g[446]=d;g[447]=e;e=+(((ne()|0)/2|0)+ -340|0);d=+(((oe()|0)/2|0)+120|0);g[448]=e;g[449]=d;d=+((ne()|0)/2|0|0);e=+(((oe()|0)/2|0)+120|0);g[450]=d;g[451]=e;e=+(((ne()|0)/2|0)+340|0);d=+(((oe()|0)/2|0)+120|0);g[452]=e;g[453]=d;c[454]=0;c[456]=1;c[458]=0;a[1840]=-126;a[1841]=-126;a[1842]=-126;a[1843]=-1;a[1848]=-126;a[1849]=-126;a[1850]=-126;a[1851]=-1;a[1856]=-126;a[1857]=-126;a[1858]=-126;a[1859]=-1;i=b;return}function Ud(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;b=i;i=i+64|0;d=b+56|0;e=b;f=b+8|0;g=b+16|0;h=b+24|0;j=b+32|0;k=b+40|0;l=b+48|0;c[438]=(c[438]|0)+1;if(!(c[466]|0)){do if(ye(0)|0){Be(f);c[e+0>>2]=c[f+0>>2];c[e+4>>2]=c[f+4>>2];c[d+0>>2]=c[448];c[d+4>>2]=c[449];do if(!(Kf(e,d,80.0)|0)){Be(g);c[e+0>>2]=c[g+0>>2];c[e+4>>2]=c[g+4>>2];c[d+0>>2]=c[450];c[d+4>>2]=c[451];if(Kf(e,d,80.0)|0){c[456]=(c[456]|0)==0&1;m=9;break}Be(h);c[e+0>>2]=c[h+0>>2];c[e+4>>2]=c[h+4>>2];c[d+0>>2]=c[452];c[d+4>>2]=c[453];if(!(Kf(e,d,80.0)|0))m=9;else{n=(c[458]|0)==0&1;c[458]=n;o=n}}else{c[454]=(c[454]|0)==0&1;m=9}while(0);if((m|0)==9)o=c[458]|0;do if(o){Be(j);c[e+0>>2]=c[j+0>>2];c[e+4>>2]=c[j+4>>2];c[d+0>>2]=c[442];c[d+4>>2]=c[443];if(Kf(e,d,100.0)|0)if((a[1840]|0)==-126&(a[1841]|0)==-126&(a[1842]|0)==-126&(a[1843]|0)==-1){a[1840]=-56;a[1841]=-56;a[1842]=-56;a[1843]=-1;break}else{a[1840]=-126;a[1841]=-126;a[1842]=-126;a[1843]=-1;break}}while(0);do if(c[456]|0){Be(k);c[e+0>>2]=c[k+0>>2];c[e+4>>2]=c[k+4>>2];c[d+0>>2]=c[444];c[d+4>>2]=c[445];if(Kf(e,d,100.0)|0)if((a[1848]|0)==-126&(a[1849]|0)==-126&(a[1850]|0)==-126&(a[1851]|0)==-1){a[1848]=-56;a[1849]=-56;a[1850]=-56;a[1851]=-1;break}else{a[1848]=-126;a[1849]=-126;a[1850]=-126;a[1851]=-1;break}}while(0);if((c[458]|0)!=0&(c[454]|0)!=0){Be(l);c[e+0>>2]=c[l+0>>2];c[e+4>>2]=c[l+4>>2];c[d+0>>2]=c[446];c[d+4>>2]=c[447];if(Kf(e,d,100.0)|0)if((a[1856]|0)==-126&(a[1857]|0)==-126&(a[1858]|0)==-126&(a[1859]|0)==-1){a[1856]=-56;a[1857]=-56;a[1858]=-56;a[1859]=-1;break}else{a[1856]=-126;a[1857]=-126;a[1858]=-126;a[1859]=-1;break}}}while(0);if((a[1840]|0)==-56&(a[1841]|0)==-56&(a[1842]|0)==-56&(a[1843]|0)==-1?(a[1848]|0)==-56&(a[1849]|0)==-56&(a[1850]|0)==-56&(a[1851]|0)==-1:0){if((a[1856]|0)==-56&(a[1857]|0)==-56&(a[1858]|0)==-56)p=(a[1859]|0)!=-1;else p=1;if(!((c[454]|0)!=0|p|(c[456]|0)!=0|(c[458]|0)!=0)){c[466]=1;c[d+0>>2]=c[22];c[d+4>>2]=c[23];cg(d)}}}d=c[468]|0;if(!((c[466]|0)==0|(d|0)!=0)){c[470]=(c[438]|0)/60|0;c[468]=1;c[438]=1;i=b;return}if(!d){i=b;return}d=c[438]|0;c[438]=d+1;if((d|0)<=89){i=b;return}if(!(ye(0)|0)){i=b;return}c[440]=1;i=b;return}function Vd(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;b=i;i=i+96|0;d=b;e=b+24|0;f=b+76|0;g=b+72|0;h=b+68|0;j=b+64|0;k=b+60|0;l=b+80|0;m=b+8|0;n=b+44|0;o=b+40|0;p=b+48|0;q=b+52|0;r=b+56|0;c[e+0>>2]=c[442];c[e+4>>2]=c[443];a[d+0>>0]=a[1840]|0;a[d+1>>0]=a[1841]|0;a[d+2>>0]=a[1842]|0;a[d+3>>0]=a[1843]|0;Df(e,100.0,d);c[e+0>>2]=c[444];c[e+4>>2]=c[445];a[d+0>>0]=a[1848]|0;a[d+1>>0]=a[1849]|0;a[d+2>>0]=a[1850]|0;a[d+3>>0]=a[1851]|0;Df(e,100.0,d);c[e+0>>2]=c[446];c[e+4>>2]=c[447];a[d+0>>0]=a[1856]|0;a[d+1>>0]=a[1857]|0;a[d+2>>0]=a[1858]|0;a[d+3>>0]=a[1859]|0;Df(e,100.0,d);if(!(c[454]|0)){a[g>>0]=-56;a[g+1>>0]=-56;a[g+2>>0]=-56;a[g+3>>0]=-1;c[e+0>>2]=c[448];c[e+4>>2]=c[449];a[d+0>>0]=a[g+0>>0]|0;a[d+1>>0]=a[g+1>>0]|0;a[d+2>>0]=a[g+2>>0]|0;a[d+3>>0]=a[g+3>>0]|0;Df(e,80.0,d)}else{a[f>>0]=-126;a[f+1>>0]=-126;a[f+2>>0]=-126;a[f+3>>0]=-1;c[e+0>>2]=c[448];c[e+4>>2]=c[449];a[d+0>>0]=a[f+0>>0]|0;a[d+1>>0]=a[f+1>>0]|0;a[d+2>>0]=a[f+2>>0]|0;a[d+3>>0]=a[f+3>>0]|0;Df(e,80.0,d)}if(!(c[456]|0)){a[j>>0]=-56;a[j+1>>0]=-56;a[j+2>>0]=-56;a[j+3>>0]=-1;c[e+0>>2]=c[450];c[e+4>>2]=c[451];a[d+0>>0]=a[j+0>>0]|0;a[d+1>>0]=a[j+1>>0]|0;a[d+2>>0]=a[j+2>>0]|0;a[d+3>>0]=a[j+3>>0]|0;Df(e,80.0,d)}else{a[h>>0]=-126;a[h+1>>0]=-126;a[h+2>>0]=-126;a[h+3>>0]=-1;c[e+0>>2]=c[450];c[e+4>>2]=c[451];a[d+0>>0]=a[h+0>>0]|0;a[d+1>>0]=a[h+1>>0]|0;a[d+2>>0]=a[h+2>>0]|0;a[d+3>>0]=a[h+3>>0]|0;Df(e,80.0,d)}if(!(c[458]|0)){a[l>>0]=-56;a[l+1>>0]=-56;a[l+2>>0]=-56;a[l+3>>0]=-1;c[e+0>>2]=c[452];c[e+4>>2]=c[453];a[d+0>>0]=a[l+0>>0]|0;a[d+1>>0]=a[l+1>>0]|0;a[d+2>>0]=a[l+2>>0]|0;a[d+3>>0]=a[l+3>>0]|0;Df(e,80.0,d)}else{a[k>>0]=-126;a[k+1>>0]=-126;a[k+2>>0]=-126;a[k+3>>0]=-1;c[e+0>>2]=c[452];c[e+4>>2]=c[453];a[d+0>>0]=a[k+0>>0]|0;a[d+1>>0]=a[k+1>>0]|0;a[d+2>>0]=a[k+2>>0]|0;a[d+3>>0]=a[k+3>>0]|0;Df(e,80.0,d)}if(!(c[468]|0)){k=(ne()|0)/2|0;l=k-((Sf(1888,30)|0)/2|0)|0;a[r>>0]=-56;a[r+1>>0]=-56;a[r+2>>0]=-56;a[r+3>>0]=-1;a[d+0>>0]=a[r+0>>0]|0;a[d+1>>0]=a[r+1>>0]|0;a[d+2>>0]=a[r+2>>0]|0;a[d+3>>0]=a[r+3>>0]|0;Pf(1888,l,20,30,d);i=b;return}else{c[m>>2]=0;c[m+4>>2]=0;c[m+8>>2]=ne()|0;c[m+12>>2]=oe()|0;a[o>>0]=-56;a[o+1>>0]=-56;a[o+2>>0]=-56;a[o+3>>0]=-1;a[d+0>>0]=a[o+0>>0]|0;a[d+1>>0]=a[o+1>>0]|0;a[d+2>>0]=a[o+2>>0]|0;a[d+3>>0]=a[o+3>>0]|0;we(n,d,.6000000238418579);c[e+0>>2]=c[m+0>>2];c[e+4>>2]=c[m+4>>2];c[e+8>>2]=c[m+8>>2];c[e+12>>2]=c[m+12>>2];a[d+0>>0]=a[n+0>>0]|0;a[d+1>>0]=a[n+1>>0]|0;a[d+2>>0]=a[n+2>>0]|0;a[d+3>>0]=a[n+3>>0]|0;md(e,0,0,60,d);e=(ne()|0)/2|0;n=e-((Sf(1888,30)|0)/2|0)|0;a[p>>0]=-126;a[p+1>>0]=-126;a[p+2>>0]=-126;a[p+3>>0]=-1;a[d+0>>0]=a[p+0>>0]|0;a[d+1>>0]=a[p+1>>0]|0;a[d+2>>0]=a[p+2>>0]|0;a[d+3>>0]=a[p+3>>0]|0;Pf(1888,n,20,30,d);c[d>>2]=c[470];n=Rf(1904,d)|0;p=(ne()|0)/2|0;e=p-((Sf(1928,30)|0)/2|0)|0;p=(oe()|0)+ -40|0;a[q>>0]=-126;a[q+1>>0]=-126;a[q+2>>0]=-126;a[q+3>>0]=-1;a[d+0>>0]=a[q+0>>0]|0;a[d+1>>0]=a[q+1>>0]|0;a[d+2>>0]=a[q+2>>0]|0;a[d+3>>0]=a[q+3>>0]|0;Pf(n,e,p,30,d);i=b;return}}function Wd(){return}function Xd(){return c[440]|0}function Yd(){var a=0,b=0,d=0;a=i;c[488]=0;c[490]=0;b=((oe()|0)/2|0)+ -20|0;c[492]=20;c[493]=b;c[494]=40;c[495]=40;b=oe()|0;c[496]=240;c[497]=0;c[498]=100;c[499]=b;b=((ne()|0)/2|0)+ -50|0;d=oe()|0;c[500]=b;c[501]=0;c[502]=100;c[503]=d;d=oe()|0;c[504]=920;c[505]=0;c[506]=100;c[507]=d;c[508]=1;c[510]=0;c[512]=1;i=a;return}function Zd(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0;a=i;i=i+64|0;b=a+40|0;d=a;e=a+16|0;f=a+24|0;g=a+32|0;c[488]=(c[488]|0)+1;if(!(c[514]|0)){h=c[516]|0;j=(c[492]|0)+h|0;c[492]=j;if((j|0)<1)c[516]=0-h;if(c[508]|0){c[d+0>>2]=c[496];c[d+4>>2]=c[497];c[d+8>>2]=c[498];c[d+12>>2]=c[499];c[b+0>>2]=c[492];c[b+4>>2]=c[493];c[b+8>>2]=c[494];c[b+12>>2]=c[495];if(Mf(d,b)|0)k=10;else k=6}else k=6;do if((k|0)==6){if(c[510]|0){c[d+0>>2]=c[500];c[d+4>>2]=c[501];c[d+8>>2]=c[502];c[d+12>>2]=c[503];c[b+0>>2]=c[492];c[b+4>>2]=c[493];c[b+8>>2]=c[494];c[b+12>>2]=c[495];if(Mf(d,b)|0){k=10;break}}if(c[512]|0){c[d+0>>2]=c[504];c[d+4>>2]=c[505];c[d+8>>2]=c[506];c[d+12>>2]=c[507];c[b+0>>2]=c[492];c[b+4>>2]=c[493];c[b+8>>2]=c[494];c[b+12>>2]=c[495];if(Mf(d,b)|0)k=10}}while(0);if((k|0)==10)c[516]=0-(c[516]|0);do if(ye(0)|0){Be(e);c[d+0>>2]=c[e+0>>2];c[d+4>>2]=c[e+4>>2];c[b+0>>2]=c[496];c[b+4>>2]=c[497];c[b+8>>2]=c[498];c[b+12>>2]=c[499];if(Jf(d,b)|0){c[510]=0;c[512]=1;break}Be(f);c[d+0>>2]=c[f+0>>2];c[d+4>>2]=c[f+4>>2];c[b+0>>2]=c[500];c[b+4>>2]=c[501];c[b+8>>2]=c[502];c[b+12>>2]=c[503];if(Jf(d,b)|0){c[512]=0;c[508]=1;break}Be(g);c[d+0>>2]=c[g+0>>2];c[d+4>>2]=c[g+4>>2];c[b+0>>2]=c[504];c[b+4>>2]=c[505];c[b+8>>2]=c[506];c[b+12>>2]=c[507];if(Jf(d,b)|0){c[508]=0;c[510]=1}}while(0);if((c[492]|0)>1099){c[514]=1;c[b+0>>2]=c[22];c[b+4>>2]=c[23];cg(b)}}b=c[518]|0;if(!((c[514]|0)==0|(b|0)!=0)){c[520]=(c[488]|0)/60|0;c[518]=1;c[488]=1;i=a;return}if(!b){i=a;return}b=c[488]|0;c[488]=b+1;if((b|0)<=89){i=a;return}if(!(ye(0)|0)){i=a;return}c[490]=1;i=a;return}function _d(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;b=i;i=i+80|0;d=b;e=b+24|0;f=b+72|0;g=b+68|0;h=b+64|0;j=b+60|0;k=b+76|0;l=b+8|0;m=b+44|0;n=b+40|0;o=b+52|0;p=b+56|0;q=b+48|0;r=((oe()|0)/2|0)+ -20|0;a[f>>0]=-126;a[f+1>>0]=-126;a[f+2>>0]=-126;a[f+3>>0]=-1;a[d+0>>0]=a[f+0>>0]|0;a[d+1>>0]=a[f+1>>0]|0;a[d+2>>0]=a[f+2>>0]|0;a[d+3>>0]=a[f+3>>0]|0;Ff(1100,r,40,40,d);a[g>>0]=-56;a[g+1>>0]=-56;a[g+2>>0]=-56;a[g+3>>0]=-1;c[e+0>>2]=c[492];c[e+4>>2]=c[493];c[e+8>>2]=c[494];c[e+12>>2]=c[495];a[d+0>>0]=a[g+0>>0]|0;a[d+1>>0]=a[g+1>>0]|0;a[d+2>>0]=a[g+2>>0]|0;a[d+3>>0]=a[g+3>>0]|0;Hf(e,d);if(c[508]|0){a[h>>0]=-126;a[h+1>>0]=-126;a[h+2>>0]=-126;a[h+3>>0]=-1;c[e+0>>2]=c[496];c[e+4>>2]=c[497];c[e+8>>2]=c[498];c[e+12>>2]=c[499];a[d+0>>0]=a[h+0>>0]|0;a[d+1>>0]=a[h+1>>0]|0;a[d+2>>0]=a[h+2>>0]|0;a[d+3>>0]=a[h+3>>0]|0;Hf(e,d)}if(c[510]|0){a[j>>0]=-126;a[j+1>>0]=-126;a[j+2>>0]=-126;a[j+3>>0]=-1;c[e+0>>2]=c[500];c[e+4>>2]=c[501];c[e+8>>2]=c[502];c[e+12>>2]=c[503];a[d+0>>0]=a[j+0>>0]|0;a[d+1>>0]=a[j+1>>0]|0;a[d+2>>0]=a[j+2>>0]|0;a[d+3>>0]=a[j+3>>0]|0;Hf(e,d)}if(c[512]|0){a[k>>0]=-126;a[k+1>>0]=-126;a[k+2>>0]=-126;a[k+3>>0]=-1;c[e+0>>2]=c[504];c[e+4>>2]=c[505];c[e+8>>2]=c[506];c[e+12>>2]=c[507];a[d+0>>0]=a[k+0>>0]|0;a[d+1>>0]=a[k+1>>0]|0;a[d+2>>0]=a[k+2>>0]|0;a[d+3>>0]=a[k+3>>0]|0;Hf(e,d)}if(!(c[518]|0)){k=(ne()|0)/2|0;j=k-((Sf(2088,30)|0)/2|0)|0;a[q>>0]=-56;a[q+1>>0]=-56;a[q+2>>0]=-56;a[q+3>>0]=-1;a[d+0>>0]=a[q+0>>0]|0;a[d+1>>0]=a[q+1>>0]|0;a[d+2>>0]=a[q+2>>0]|0;a[d+3>>0]=a[q+3>>0]|0;Pf(2088,j,20,30,d);i=b;return}else{c[l>>2]=0;c[l+4>>2]=0;c[l+8>>2]=ne()|0;c[l+12>>2]=oe()|0;a[n>>0]=-56;a[n+1>>0]=-56;a[n+2>>0]=-56;a[n+3>>0]=-1;a[d+0>>0]=a[n+0>>0]|0;a[d+1>>0]=a[n+1>>0]|0;a[d+2>>0]=a[n+2>>0]|0;a[d+3>>0]=a[n+3>>0]|0;we(m,d,.6000000238418579);c[e+0>>2]=c[l+0>>2];c[e+4>>2]=c[l+4>>2];c[e+8>>2]=c[l+8>>2];c[e+12>>2]=c[l+12>>2];a[d+0>>0]=a[m+0>>0]|0;a[d+1>>0]=a[m+1>>0]|0;a[d+2>>0]=a[m+2>>0]|0;a[d+3>>0]=a[m+3>>0]|0;md(e,0,0,60,d);e=(ne()|0)/2|0;m=e-((Sf(2088,30)|0)/2|0)|0;a[o>>0]=-126;a[o+1>>0]=-126;a[o+2>>0]=-126;a[o+3>>0]=-1;a[d+0>>0]=a[o+0>>0]|0;a[d+1>>0]=a[o+1>>0]|0;a[d+2>>0]=a[o+2>>0]|0;a[d+3>>0]=a[o+3>>0]|0;Pf(2088,m,20,30,d);c[d>>2]=c[520];m=Rf(2104,d)|0;o=(ne()|0)/2|0;e=o-((Sf(2128,30)|0)/2|0)|0;o=(oe()|0)+ -40|0;a[p>>0]=-126;a[p+1>>0]=-126;a[p+2>>0]=-126;a[p+3>>0]=-1;a[d+0>>0]=a[p+0>>0]|0;a[d+1>>0]=a[p+1>>0]|0;a[d+2>>0]=a[p+2>>0]|0;a[d+3>>0]=a[p+3>>0]|0;Pf(m,e,o,30,d);i=b;return}}function $d(){return}function ae(){return c[490]|0}function be(){var b=0,d=0,e=0;b=i;c[538]=0;c[540]=0;d=0;do{c[2168+(d<<4)>>2]=aa((d|0)%7|0,(ne()|0)/7|0)|0;c[2172+(d<<4)>>2]=aa((d|0)/7|0,(oe()|0)/3|0)|0;c[2176+(d<<4)>>2]=(ne()|0)/7|0;c[2180+(d<<4)>>2]=(oe()|0)/3|0;c[2504+(d<<2)>>2]=0;e=2592+(d<<2)|0;if(!(d&1)){a[e>>0]=-56;a[2593+(d<<2)>>0]=-56;a[2594+(d<<2)>>0]=-56;a[2595+(d<<2)>>0]=-1}else{a[e>>0]=-126;a[2593+(d<<2)>>0]=-126;a[2594+(d<<2)>>0]=-126;a[2595+(d<<2)>>0]=-1}d=d+1|0}while((d|0)!=21);a[2632]=-11;a[2633]=-11;a[2634]=-11;a[2635]=-1;i=b;return}function ce(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;b=i;i=i+32|0;d=b+16|0;e=b;f=b+8|0;c[538]=(c[538]|0)+1;if(c[670]|0)c[672]=(c[672]|0)+1;g=c[674]|0;do if(!g){if(ye(0)|0){h=0;a:while(1){Be(f);j=2168+(h<<4)|0;c[e+0>>2]=c[f+0>>2];c[e+4>>2]=c[f+4>>2];c[d+0>>2]=c[j+0>>2];c[d+4>>2]=c[j+4>>2];c[d+8>>2]=c[j+8>>2];c[d+12>>2]=c[j+12>>2];do if(Jf(e,d)|0){if((h|0)==10)if((a[2632]|0)==-11&(a[2633]|0)==-11&(a[2634]|0)==-11&(a[2635]|0)==-1){a[2632]=-56;a[2633]=-56;a[2634]=-56;a[2635]=-1;c[670]=1;c[672]=0;c[627]=1;break}else{a[2632]=-11;a[2633]=-11;a[2634]=-11;a[2635]=-1;c[670]=0;c[672]=300;k=2504;l=k+84|0;do{c[k>>2]=0;k=k+4|0}while((k|0)<(l|0));break}if(((h|0)%2|0|0)==1&(c[670]|0)!=0?(c[2504+(h<<2)>>2]|0)!=0:0){a[2592+(h<<2)>>0]=-56;a[2593+(h<<2)>>0]=-56;a[2594+(h<<2)>>0]=-56;a[2595+(h<<2)>>0]=-1;if((h|0)==19){h=h+1|0;continue a}else{c[2504+(h+2<<2)>>2]=1;break}}}while(0);h=h+1|0;if((h|0)==21)break}}if((c[672]|0)>250){k=2504;l=k+84|0;do{c[k>>2]=0;k=k+4|0}while((k|0)<(l|0));h=0;do{j=2592+(h<<2)|0;if(!(h&1)){a[j>>0]=-56;a[2593+(h<<2)>>0]=-56;a[2594+(h<<2)>>0]=-56;a[2595+(h<<2)>>0]=-1}else{a[j>>0]=-126;a[2593+(h<<2)>>0]=-126;a[2594+(h<<2)>>0]=-126;a[2595+(h<<2)>>0]=-1}h=h+1|0}while((h|0)!=21);a[2632]=-11;a[2633]=-11;a[2634]=-11;a[2635]=-1;c[670]=0;c[672]=0;m=0}else m=0;while(1){if((a[2592+(m<<2)>>0]|0)!=-56)break;if((a[2593+(m<<2)>>0]|0)!=-56)break;if((a[2594+(m<<2)>>0]|0)!=-56)break;if((a[2595+(m<<2)>>0]|0)!=-1)break;m=m+1|0;if((m|0)>=21){n=29;break}}if((n|0)==29){c[674]=1;c[d+0>>2]=c[22];c[d+4>>2]=c[23];cg(d);o=c[674]|0;break}c[674]=0;i=b;return}else o=g;while(0);g=c[676]|0;if(!((o|0)==0|(g|0)!=0)){c[678]=(c[538]|0)/60|0;c[676]=1;c[538]=1;i=b;return}if(!g){i=b;return}g=c[538]|0;c[538]=g+1;if((g|0)<=89){i=b;return}if(!(ye(0)|0)){i=b;return}c[540]=1;i=b;return}function de(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;b=i;i=i+64|0;d=b;e=b+24|0;f=b+8|0;g=b+56|0;h=b+40|0;j=b+44|0;k=b+48|0;l=b+52|0;m=0;do{n=2168+(m<<4)|0;o=2592+(m<<2)|0;c[e+0>>2]=c[n+0>>2];c[e+4>>2]=c[n+4>>2];c[e+8>>2]=c[n+8>>2];c[e+12>>2]=c[n+12>>2];a[d+0>>0]=a[o+0>>0]|0;a[d+1>>0]=a[o+1>>0]|0;a[d+2>>0]=a[o+2>>0]|0;a[d+3>>0]=a[o+3>>0]|0;Hf(e,d);m=m+1|0}while((m|0)!=21);if(!(c[676]|0)){m=(ne()|0)/2|0;o=m-((Sf(2720,30)|0)/2|0)|0;a[l>>0]=-56;a[l+1>>0]=-56;a[l+2>>0]=-56;a[l+3>>0]=-1;a[d+0>>0]=a[l+0>>0]|0;a[d+1>>0]=a[l+1>>0]|0;a[d+2>>0]=a[l+2>>0]|0;a[d+3>>0]=a[l+3>>0]|0;Pf(2720,o,20,30,d);i=b;return}else{c[f>>2]=0;c[f+4>>2]=0;c[f+8>>2]=ne()|0;c[f+12>>2]=oe()|0;a[h>>0]=-11;a[h+1>>0]=-11;a[h+2>>0]=-11;a[h+3>>0]=-1;a[d+0>>0]=a[h+0>>0]|0;a[d+1>>0]=a[h+1>>0]|0;a[d+2>>0]=a[h+2>>0]|0;a[d+3>>0]=a[h+3>>0]|0;we(g,d,.6000000238418579);c[e+0>>2]=c[f+0>>2];c[e+4>>2]=c[f+4>>2];c[e+8>>2]=c[f+8>>2];c[e+12>>2]=c[f+12>>2];a[d+0>>0]=a[g+0>>0]|0;a[d+1>>0]=a[g+1>>0]|0;a[d+2>>0]=a[g+2>>0]|0;a[d+3>>0]=a[g+3>>0]|0;md(e,0,0,60,d);e=(ne()|0)/2|0;g=e-((Sf(2720,30)|0)/2|0)|0;a[j>>0]=-126;a[j+1>>0]=-126;a[j+2>>0]=-126;a[j+3>>0]=-1;a[d+0>>0]=a[j+0>>0]|0;a[d+1>>0]=a[j+1>>0]|0;a[d+2>>0]=a[j+2>>0]|0;a[d+3>>0]=a[j+3>>0]|0;Pf(2720,g,20,30,d);c[d>>2]=c[678];g=Rf(2736,d)|0;j=(ne()|0)/2|0;e=j-((Sf(2760,30)|0)/2|0)|0;j=(oe()|0)+ -40|0;a[k>>0]=-126;a[k+1>>0]=-126;a[k+2>>0]=-126;a[k+3>>0]=-1;a[d+0>>0]=a[k+0>>0]|0;a[d+1>>0]=a[k+1>>0]|0;a[d+2>>0]=a[k+2>>0]|0;a[d+3>>0]=a[k+3>>0]|0;Pf(g,e,j,30,d);i=b;return}}function ee(){return}function fe(){return c[540]|0}function ge(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=i;i=i+16|0;kg(0,2784,e);c[704]=d;he(a,b);ie();Nf();je();g[708]=+((c[706]|0)/2|0|0);g[709]=+((c[710]|0)/2|0|0);if(!(c[712]|0)){i=e;return}ke(60);le();i=e;return}function he(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+80|0;f=e;g=e+8|0;c[706]=b;c[710]=d;uf(g);d=2936|0;b=g+0|0;g=d+64|0;do{c[d>>2]=c[b>>2];d=d+4|0;b=b+4|0}while((d|0)<(g|0));tb(1)|0;if(!(Ma()|0))kg(1,4176,f);c[1052]=c[706];c[1054]=c[710];Ua();Dc(131075,0);if((ef()|0)==2){if(a[3072]&16){Dc(135181,4);kg(0,4224,f)}Dc(139266,3);Dc(139267,3);Dc(139272,204801);Dc(139270,0)}if(!(c[770]|0)){b=pa(c[706]|0,c[710]|0,c[704]|0,0,0)|0;c[714]=b;c[1040]=c[706];c[1042]=c[710];h=b}else{De(c[1052]|0,c[1054]|0);b=c[1040]|0;d=c[1042]|0;g=c[704]|0;j=pa(b|0,d|0,g|0,nc()|0,0)|0;c[714]=j;h=j}if(!h){vc();kg(1,4240,f)}else{kg(0,4280,f);h=c[1042]|0;c[f>>2]=c[1040];c[f+4>>2]=h;kg(0,4320,f);h=c[710]|0;c[f>>2]=c[706];c[f+4>>2]=h;kg(0,4344,f);h=c[1038]|0;c[f>>2]=c[1036];c[f+4>>2]=h;kg(0,4368,f)}La(c[714]|0,1)|0;Lc(c[714]|0,2)|0;Hc(c[714]|0,1)|0;Cb(c[714]|0,1)|0;Ob(c[714]|0,3)|0;Kc(c[714]|0,1)|0;Zb(c[714]|0,4)|0;bb(c[714]|0);if(!(a[3072]&32)){i=e;return}ac(1);kg(0,4400,f);i=e;return}function ie(){var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;ff();pf(c[1036]|0,c[1038]|0,c[1040]|0,c[1042]|0);a[e>>0]=-11;a[e+1>>0]=-11;a[e+2>>0]=-11;a[e+3>>0]=-1;a[d+0>>0]=a[e+0>>0]|0;a[d+1>>0]=a[e+1>>0]|0;a[d+2>>0]=a[e+2>>0]|0;a[d+3>>0]=a[e+3>>0]|0;pe(d);i=b;return}function je(){var a=0;a=i;ai(Ab(0)|0);h[365]=+re();i=a;return}function ke(a){a=a|0;var b=0,d=0,e=0.0;b=i;i=i+16|0;d=b;e=1.0/+(a|0);h[377]=e;h[k>>3]=e*1.0e3;c[d>>2]=c[k>>2];c[d+4>>2]=c[k+4>>2];kg(0,3024,d);i=b;return}function le(){c[712]=0;return}function me(){var a=0;a=i;i=i+16|0;Of();mf();Va(c[714]|0);vc();kg(0,2864,a);i=a;return}function ne(){return c[706]|0}function oe(){return c[710]|0}function pe(b){b=b|0;var c=0;c=i;cf(a[b>>0]|0,a[b+1>>0]|0,a[b+2>>0]|0,a[b+3>>0]|0);i=c;return}function qe(){var a=0,b=0,d=0.0,e=0,f=0,g=0;a=i;i=i+64|0;b=a;d=+re();h[364]=d;h[366]=d- +h[365];h[365]=d;df();Ne();e=b+0|0;f=2936|0;g=e+64|0;do{c[e>>2]=c[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));Re(sf(b)|0);i=a;return}function re(){var a=0,b=0.0;a=i;b=+lc();i=a;return+b}function se(){var a=0,b=0.0,c=0.0;a=i;nf();te();ue();jg();b=+re();h[364]=b;c=b- +h[365];h[375]=c;h[365]=b;b=+h[366]+c;h[376]=b;if(!(b<+h[377])){i=a;return}do{b=+re();h[364]=b;c=b- +h[365];h[365]=b;b=+h[376]+c;h[376]=b}while(b<+h[377]);i=a;return}function te(){var a=0;a=i;Xb(c[714]|0);i=a;return}function ue(){var b=0,d=0,e=0;b=i;i=i+16|0;d=b+8|0;e=b;zc(c[714]|0,d|0,e|0);g[708]=+h[d>>3];g[709]=+h[e>>3];c[1028]=-1;oi(3600,3088,512)|0;a[4128]=a[4120]|0;a[4129]=a[4121]|0;a[4130]=a[4122]|0;Gb();i=b;return}function ve(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;c=i;d=(a|0)>(b|0);e=d?b:a;f=bi()|0;g=(d?a:b)-e|0;i=c;return((f|0)%(((g|0)>-1?g:0-g|0)+1|0)|0)+e|0}function we(b,c,e){b=b|0;c=c|0;e=+e;var f=0,g=0.0;f=i;if(!(e<0.0))if(e>1.0)g=1.0;else g=e;else g=0.0;a[b>>0]=a[c>>0]|0;a[b+1>>0]=a[c+1>>0]|0;a[b+2>>0]=a[c+2>>0]|0;a[b+3>>0]=~~(g*+(d[c+3>>0]|0|0));i=f;return}function xe(b){b=b|0;var c=0;c=a[3088+b>>0]|0;return(c<<24>>24==1?c<<24>>24!=(a[3600+b>>0]|0):0)&1|0}function ye(b){b=b|0;var c=0;c=a[4120+b>>0]|0;return(c<<24>>24==1?c<<24>>24!=(a[4128+b>>0]|0):0)&1|0}function ze(a){a=a|0;var b=0,c=0;b=i;c=(Ae(a)|0)==1&1;i=b;return c|0}function Ae(a){a=a|0;var b=0,d=0;b=i;d=Ub(c[714]|0,a|0)|0;i=b;return d|0}function Be(a){a=a|0;var b=0,d=0,e=0;b=2832;d=c[b+4>>2]|0;e=a;c[e>>2]=c[b>>2];c[e+4>>2]=d;return}function Ce(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;i=i+16|0;e=d;c[e>>2]=a;c[e+4>>2]=b;kg(2,4648,e);i=d;return}function De(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0.0,k=0.0,l=0.0,m=0;d=i;i=i+80|0;e=d;f=d+16|0;g=c[706]|0;if((g|0)<=(a|0)?(h=c[710]|0,(h|0)<=(b|0)):0){if(!((g|0)<(a|0)|(h|0)<(b|0))){c[1040]=g;c[1042]=c[710];c[1036]=0;c[1038]=0;i=d;return}c[e>>2]=g;c[e+4>>2]=h;c[e+8>>2]=a;c[e+12>>2]=b;kg(0,4576,e);j=+(a|0)/+(b|0);h=c[706]|0;k=+(c[710]|0);if(!(j<=+(h|0)/k)){g=~~(j*k);c[1040]=g;c[1042]=c[710];c[1036]=g-(c[706]|0);c[1038]=0;i=d;return}else{c[1040]=h;h=~~(+(c[706]|0)/j);c[1042]=h;c[1036]=0;c[1038]=h-(c[710]|0);i=d;return}}h=c[710]|0;c[e>>2]=c[706];c[e+4>>2]=h;c[e+8>>2]=a;c[e+12>>2]=b;kg(2,4424,e);j=+(c[706]|0);k=+(a|0)/j;l=+(b|0)/+(c[710]|0);if(!(k<=l)){h=~~(j*l);c[1040]=h;c[1042]=b;c[1036]=a-h;m=0}else{c[1040]=a;h=~~(k*+(c[710]|0));c[1042]=h;c[1036]=0;m=b-h|0}c[1038]=m;k=+(c[1040]|0)/+(c[706]|0);Af(f,k,k,k);m=2936|0;h=f+0|0;f=m+64|0;do{c[m>>2]=c[h>>2];m=m+4|0;h=h+4|0}while((m|0)<(f|0));c[1040]=a;c[1042]=b;c[e>>2]=a;c[e+4>>2]=b;kg(2,4504,e);i=d;return}function Ee(b,d,e){b=b|0;d=d|0;e=e|0;e=i;i=i+16|0;d=e+4|0;b=e;pf(c[1036]|0,c[1038]|0,c[1040]|0,c[1042]|0);a[b>>0]=-11;a[b+1>>0]=-11;a[b+2>>0]=-11;a[b+3>>0]=-1;a[d+0>>0]=a[b+0>>0]|0;a[d+1>>0]=a[b+1>>0]|0;a[d+2>>0]=a[b+2>>0]|0;a[d+3>>0]=a[b+3>>0]|0;pe(d);i=e;return}function Fe(a,b){a=a|0;b=b|0;return}function Ge(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;g=i;e=(f|0)==1;if((c[726]|0)==(d|0)&e)vb(b|0,1);else a[3088+d>>0]=f;if(!((d|0)==259&e)){i=g;return}c[1028]=3;i=g;return}function He(b,c,d,e){b=b|0;c=c|0;d=d|0;e=e|0;a[4120+c>>0]=d;return}function Ie(a,b){a=a|0;b=b|0;c[1028]=b;return}function Je(a,b,d){a=a|0;b=+b;d=+d;c[1034]=~~d;return}function Ke(a,b){a=a|0;b=b|0;var d=0;a=i;if(!b){hg();d=0}else{gg();d=1}c[724]=d;i=a;return}function Le(a){a=a|0;var b=0;b=i;if((a|0)==1)c[1188]=4760;else if(!a)c[1188]=4688;c[1206]=a;i=b;return}function Me(){var a=0,b=0,d=0,e=0;a=i;i=i+16|0;b=a;if((c[1208]|0)==15){c[b>>2]=16;kg(1,4840,b)}b=4880+(c[1208]<<6)|0;d=(c[1188]|0)+0|0;e=b+64|0;do{c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0}while((b|0)<(e|0));Ne();c[1208]=(c[1208]|0)+1;if((c[1206]|0)!=1){i=a;return}c[1476]=1;i=a;return}function Ne(){var a=0,b=0,d=0,e=0;a=i;i=i+64|0;b=a;d=c[1188]|0;uf(b);e=d+0|0;d=b+0|0;b=e+64|0;do{c[e>>2]=c[d>>2];e=e+4|0;d=d+4|0}while((e|0)<(b|0));i=a;return}function Oe(){var a=0;a=i;if((c[1208]|0)<=0){i=a;return}pi(c[1188]|0,4880+((c[1208]|0)+ -1<<6)|0,64)|0;c[1208]=(c[1208]|0)+ -1;i=a;return}function Pe(a,b,d){a=+a;b=+b;d=+d;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;e=i;i=i+256|0;f=e+192|0;g=e;h=e+64|0;j=e+128|0;vf(h,a,b,d);tf(h);k=c[1188]|0;l=g+0|0;m=k+0|0;n=l+64|0;do{c[l>>2]=c[m>>2];l=l+4|0;m=m+4|0}while((l|0)<(n|0));l=f+0|0;m=h+0|0;n=l+64|0;do{c[l>>2]=c[m>>2];l=l+4|0;m=m+4|0}while((l|0)<(n|0));zf(j,g,f);l=k+0|0;m=j+0|0;n=l+64|0;do{c[l>>2]=c[m>>2];l=l+4|0;m=m+4|0}while((l|0)<(n|0));i=e;return}function Qe(a,b,d,e){a=+a;b=+b;d=+d;e=+e;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;f=i;i=i+448|0;g=f+384|0;h=f;j=f+64|0;k=f+128|0;l=f+192|0;m=f+256|0;n=f+320|0;uf(j);do if(!(b==1.0)){if(d==1.0){xf(l,a*.017453292519943295);o=j+0|0;p=l+0|0;q=o+64|0;do{c[o>>2]=c[p>>2];o=o+4|0;p=p+4|0}while((o|0)<(q|0));break}if(e==1.0){yf(m,a*.017453292519943295);o=j+0|0;p=m+0|0;q=o+64|0;do{c[o>>2]=c[p>>2];o=o+4|0;p=p+4|0}while((o|0)<(q|0))}}else{wf(k,a*.017453292519943295);o=j+0|0;p=k+0|0;q=o+64|0;do{c[o>>2]=c[p>>2];o=o+4|0;p=p+4|0}while((o|0)<(q|0))}while(0);tf(j);k=c[1188]|0;o=h+0|0;p=k+0|0;q=o+64|0;do{c[o>>2]=c[p>>2];o=o+4|0;p=p+4|0}while((o|0)<(q|0));o=g+0|0;p=j+0|0;q=o+64|0;do{c[o>>2]=c[p>>2];o=o+4|0;p=p+4|0}while((o|0)<(q|0));zf(n,h,g);o=k+0|0;p=n+0|0;q=o+64|0;do{c[o>>2]=c[p>>2];o=o+4|0;p=p+4|0}while((o|0)<(q|0));i=f;return}function Re(a){a=a|0;var b=0,d=0,e=0,f=0,h=0,j=0,k=0,l=0;b=i;i=i+256|0;d=b+192|0;e=b;f=b+64|0;h=b+128|0;g[f>>2]=+g[a>>2];g[f+4>>2]=+g[a+4>>2];g[f+8>>2]=+g[a+8>>2];g[f+12>>2]=+g[a+12>>2];g[f+16>>2]=+g[a+16>>2];g[f+20>>2]=+g[a+20>>2];g[f+24>>2]=+g[a+24>>2];g[f+28>>2]=+g[a+28>>2];g[f+32>>2]=+g[a+32>>2];g[f+36>>2]=+g[a+36>>2];g[f+40>>2]=+g[a+40>>2];g[f+44>>2]=+g[a+44>>2];g[f+48>>2]=+g[a+48>>2];g[f+52>>2]=+g[a+52>>2];g[f+56>>2]=+g[a+56>>2];g[f+60>>2]=+g[a+60>>2];a=c[1188]|0;j=e+0|0;k=a+0|0;l=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(l|0));j=d+0|0;k=f+0|0;l=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(l|0));zf(h,e,d);j=a+0|0;k=h+0|0;l=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(l|0));i=b;return}function Se(a,b,d,e,f,g){a=+a;b=+b;d=+d;e=+e;f=+f;g=+g;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;h=i;i=i+256|0;j=h+192|0;k=h;l=h+64|0;m=h+128|0;Bf(l,a,b,d,e,f,g);tf(l);n=c[1188]|0;o=k+0|0;p=n+0|0;q=o+64|0;do{c[o>>2]=c[p>>2];o=o+4|0;p=p+4|0}while((o|0)<(q|0));o=j+0|0;p=l+0|0;q=o+64|0;do{c[o>>2]=c[p>>2];o=o+4|0;p=p+4|0}while((o|0)<(q|0));zf(m,k,j);o=n+0|0;p=m+0|0;q=o+64|0;do{c[o>>2]=c[p>>2];o=o+4|0;p=p+4|0}while((o|0)<(q|0));i=h;return}function Te(a){a=a|0;c[1478]=a;return}function Ue(){var b=0,d=0,e=0,f=0,h=0,j=0,k=0,l=0;b=i;i=i+64|0;d=b;if(c[1476]|0){if((c[1480]|0)>0){e=0;do{f=(c[1482]|0)+(e*12|0)|0;h=d+0|0;j=(c[1188]|0)+0|0;k=h+64|0;do{c[h>>2]=c[j>>2];h=h+4|0;j=j+4|0}while((h|0)<(k|0));qf(f,d);e=e+1|0;l=c[1480]|0}while((e|0)<(l|0));c[1476]=0;if((l|0)>0){l=0;do{e=c[1482]|0;Ve(+g[e+(l*12|0)>>2],+g[e+(l*12|0)+4>>2],+g[e+(l*12|0)+8>>2]);l=l+1|0}while((l|0)<(c[1480]|0))}}else c[1476]=0;c[1480]=0}l=c[1478]|0;if((l|0)==1){e=c[1492]|0;d=c[1494]|0;if(!((e|0)!=(d|0)&(e-d|0)>0)){i=b;return}j=e-d|0;d=0;do{e=c[1494]<<2;h=c[1498]|0;a[h+e>>0]=a[h+(e+ -4)>>0]|0;e=c[1494]<<2;h=c[1498]|0;a[h+(e|1)>>0]=a[h+(e+ -3)>>0]|0;e=c[1494]<<2;h=c[1498]|0;a[h+(e|2)>>0]=a[h+(e+ -2)>>0]|0;e=c[1494]<<2;h=c[1498]|0;a[h+(e|3)>>0]=a[h+(e+ -1)>>0]|0;c[1494]=(c[1494]|0)+1;d=d+1|0}while((d|0)!=(j|0));i=b;return}else if(!l){j=c[1484]|0;d=c[1486]|0;if(!((j|0)!=(d|0)&(j-d|0)>0)){i=b;return}e=j-d|0;d=0;do{j=c[1486]<<2;h=c[1490]|0;a[h+j>>0]=a[h+(j+ -4)>>0]|0;j=c[1486]<<2;h=c[1490]|0;a[h+(j|1)>>0]=a[h+(j+ -3)>>0]|0;j=c[1486]<<2;h=c[1490]|0;a[h+(j|2)>>0]=a[h+(j+ -2)>>0]|0;j=c[1486]<<2;h=c[1490]|0;a[h+(j|3)>>0]=a[h+(j+ -1)>>0]|0;c[1486]=(c[1486]|0)+1;d=d+1|0}while((d|0)!=(e|0));i=b;return}else if((l|0)==2){l=c[1500]|0;e=c[1504]|0;if((l|0)!=(e|0)&(l-e|0)>0){d=l-e|0;e=0;do{l=c[1504]<<2;j=c[1510]|0;a[j+l>>0]=a[j+(l+ -4)>>0]|0;l=c[1504]<<2;j=c[1510]|0;a[j+(l|1)>>0]=a[j+(l+ -3)>>0]|0;l=c[1504]<<2;j=c[1510]|0;a[j+(l|2)>>0]=a[j+(l+ -2)>>0]|0;l=c[1504]<<2;j=c[1510]|0;a[j+(l|3)>>0]=a[j+(l+ -1)>>0]|0;c[1504]=(c[1504]|0)+1;e=e+1|0}while((e|0)!=(d|0))}d=c[1500]|0;e=c[1502]|0;if(!((d|0)!=(e|0)&(d-e|0)>0)){i=b;return}l=c[1508]|0;j=c[1502]|0;h=d+j|0;k=d-e|0;d=j;j=0;while(1){g[l+(d<<1<<2)>>2]=0.0;g[l+((d<<1|1)<<2)>>2]=0.0;j=j+1|0;if((j|0)==(k|0))break;else d=d+1|0}c[1502]=h-e;i=b;return}else{i=b;return}}function Ve(a,b,d){a=+a;b=+b;d=+d;var e=0,f=0,h=0,j=0;e=i;i=i+16|0;f=e;if(c[1476]|0){g[(c[1482]|0)+((c[1480]|0)*12|0)>>2]=a;g[(c[1482]|0)+((c[1480]|0)*12|0)+4>>2]=b;g[(c[1482]|0)+((c[1480]|0)*12|0)+8>>2]=d;c[1480]=(c[1480]|0)+1;i=e;return}h=c[1478]|0;if((h|0)==1){j=c[1492]|0;if((j|0)<6144){g[(c[1496]|0)+(j*3<<2)>>2]=a;g[(c[1496]|0)+(((c[1492]|0)*3|0)+1<<2)>>2]=b;g[(c[1496]|0)+(((c[1492]|0)*3|0)+2<<2)>>2]=d;c[1492]=(c[1492]|0)+1;i=e;return}else{kg(1,6088,f);i=e;return}}else if((h|0)==2){j=c[1500]|0;if((j|0)<4096){g[(c[1506]|0)+(j*3<<2)>>2]=a;g[(c[1506]|0)+(((c[1500]|0)*3|0)+1<<2)>>2]=b;g[(c[1506]|0)+(((c[1500]|0)*3|0)+2<<2)>>2]=d;c[1500]=(c[1500]|0)+1;j=(c[1532]|0)+((c[1530]|0)+ -1<<3)+4|0;c[j>>2]=(c[j>>2]|0)+1;i=e;return}else{kg(1,6136,f);i=e;return}}else if(!h){h=c[1484]|0;if((h|0)<2048){g[(c[1488]|0)+(h*3<<2)>>2]=a;g[(c[1488]|0)+(((c[1484]|0)*3|0)+1<<2)>>2]=b;g[(c[1488]|0)+(((c[1484]|0)*3|0)+2<<2)>>2]=d;c[1484]=(c[1484]|0)+1;i=e;return}else{kg(1,6056,f);i=e;return}}else{i=e;return}}function We(a,b){a=+a;b=+b;var c=0;c=i;Ve(a,b,0.0);i=c;return}function Xe(a,b){a=a|0;b=b|0;var c=0;c=i;Ve(+(a|0),+(b|0),0.0);i=c;return}function Ye(a,b){a=+a;b=+b;var d=0;d=i;if((c[1478]|0)!=2){i=d;return}g[(c[1508]|0)+(c[1502]<<1<<2)>>2]=a;g[(c[1508]|0)+((c[1502]<<1|1)<<2)>>2]=b;c[1502]=(c[1502]|0)+1;i=d;return}function Ze(a,b,c){a=+a;b=+b;c=+c;return}function _e(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=i;h=c[1478]|0;if(!h){a[(c[1490]|0)+(c[1486]<<2)>>0]=b;a[(c[1490]|0)+(c[1486]<<2|1)>>0]=d;a[(c[1490]|0)+(c[1486]<<2|2)>>0]=e;a[(c[1490]|0)+(c[1486]<<2|3)>>0]=f;c[1486]=(c[1486]|0)+1;i=g;return}else if((h|0)==1){a[(c[1498]|0)+(c[1494]<<2)>>0]=b;a[(c[1498]|0)+(c[1494]<<2|1)>>0]=d;a[(c[1498]|0)+(c[1494]<<2|2)>>0]=e;a[(c[1498]|0)+(c[1494]<<2|3)>>0]=f;c[1494]=(c[1494]|0)+1;i=g;return}else if((h|0)==2){a[(c[1510]|0)+(c[1504]<<2)>>0]=b;a[(c[1510]|0)+(c[1504]<<2|1)>>0]=d;a[(c[1510]|0)+(c[1504]<<2|2)>>0]=e;a[(c[1510]|0)+(c[1504]<<2|3)>>0]=f;c[1504]=(c[1504]|0)+1;i=g;return}else{i=g;return}}function $e(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;d=c[1530]|0;e=d+ -1|0;f=c[1532]|0;if((c[f+(e<<3)>>2]|0)==(a|0)){i=b;return}if((c[f+(e<<3)+4>>2]|0)>0)c[1530]=d+1;c[(c[1532]|0)+((c[1530]|0)+ -1<<3)>>2]=a;c[(c[1532]|0)+((c[1530]|0)+ -1<<3)+4>>2]=0;i=b;return}function af(){return}function bf(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;mb(1,d|0);i=b;return}function cf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=i;Mb(+(+(a&255)/255.0),+(+(b&255)/255.0),+(+(c&255)/255.0),+(+(d&255)/255.0));i=e;return}function df(){var a=0;a=i;sc(16640);i=a;return}function ef(){return 3}function ff(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0;a=i;i=i+224|0;b=a;d=a+152|0;e=a+8|0;f=a+72|0;g=a+136|0;h=a+148|0;kg(2,6168,b);c[b>>2]=Eb(7936)|0;kg(0,6224,b);c[b>>2]=Eb(7937)|0;kg(0,6248,b);c[b>>2]=Eb(7938)|0;kg(0,6272,b);c[b>>2]=Eb(35724)|0;kg(0,6296,b);c[1478]=1;uf(d);j=4688|0;k=d+0|0;d=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(d|0));uf(e);j=4760|0;k=e+0|0;d=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(d|0));c[1188]=4760;uf(f);j=4880|0;k=f+0|0;d=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(d|0));uf(f);j=4944|0;k=f+0|0;d=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(d|0));uf(f);j=5008|0;k=f+0|0;d=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(d|0));uf(f);j=5072|0;k=f+0|0;d=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(d|0));uf(f);j=5136|0;k=f+0|0;d=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(d|0));uf(f);j=5200|0;k=f+0|0;d=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(d|0));uf(f);j=5264|0;k=f+0|0;d=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(d|0));uf(f);j=5328|0;k=f+0|0;d=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(d|0));uf(f);j=5392|0;k=f+0|0;d=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(d|0));uf(f);j=5456|0;k=f+0|0;d=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(d|0));uf(f);j=5520|0;k=f+0|0;d=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(d|0));uf(f);j=5584|0;k=f+0|0;d=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(d|0));uf(f);j=5648|0;k=f+0|0;d=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(d|0));uf(f);j=5712|0;k=f+0|0;d=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(d|0));uf(f);j=5776|0;k=f+0|0;d=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(d|0));uf(f);j=5840|0;k=f+0|0;d=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(d|0));c[1580]=gf()|0;c[1582]=hf()|0;c[1588]=Ea(c[1580]|0,6336)|0;c[1594]=Ea(c[1580]|0,6360)|0;c[1600]=Ea(c[1580]|0,6384)|0;c[1606]=qc(c[1580]|0,6408)|0;c[1614]=qc(c[1580]|0,6432)|0;c[1620]=qc(c[1580]|0,6464)|0;c[1622]=Ea(c[1582]|0,6336)|0;c[1624]=Ea(c[1582]|0,6360)|0;c[1630]=Ea(c[1580]|0,6504)|0;c[1632]=qc(c[1582]|0,6408)|0;c[1634]=qc(c[1582]|0,6432)|0;c[1636]=qc(c[1582]|0,6464)|0;c[1642]=qc(c[1582]|0,6552)|0;jf();kf();c[1482]=Vh(49152)|0;k=0;do{j=(c[1482]|0)+(k*12|0)|0;rf(g);c[j+0>>2]=c[g+0>>2];c[j+4>>2]=c[g+4>>2];c[j+8>>2]=c[g+8>>2];k=k+1|0}while((k|0)!=4096);c[h>>2]=-1;k=lf(h,1,1,0)|0;c[1644]=k;if(!k)kg(2,6640,b);else{c[b>>2]=k;kg(0,6584,b)}b=Vh(2048)|0;c[1532]=b;k=0;do{c[b+(k<<3)>>2]=0;c[b+(k<<3)+4>>2]=0;k=k+1|0}while((k|0)!=256);c[1530]=1;c[c[1532]>>2]=c[1644];i=a;return}function gf(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;a=i;i=i+912|0;b=a;d=a+368|0;e=a+24|0;f=a+8|0;g=a+12|0;h=a+16|0;j=a+4|0;oi(d|0,8376,536)|0;oi(e|0,8912,340)|0;k=Sb(35633)|0;l=Sb(35632)|0;c[f>>2]=d;c[g>>2]=e;Qa(k|0,1,f|0,0);Qa(l|0,1,g|0,0);c[h>>2]=0;$b(k|0);ta(k|0,35713,h|0);if((c[h>>2]|0)==1){c[b>>2]=k;kg(0,9320,b)}else{c[b>>2]=k;kg(2,9256,b)}$b(l|0);ta(l|0,35713,h|0);if((c[h>>2]|0)==1){c[b>>2]=l;kg(0,9448,b)}else{c[b>>2]=l;kg(2,9384,b)}g=ya()|0;xb(g|0,k|0);xb(g|0,l|0);oc(g|0);kc(g|0,35714,h|0);if(!(c[h>>2]|0)){kc(g|0,35716,j|0);h=c[j>>2]|0;f=xc()|0;e=i;i=i+((1*h|0)+15&-16)|0;_a(g|0,c[j>>2]|0,a+20|0,e|0);c[b>>2]=e;kg(0,8288,b);$a(f|0);ab(k|0);ab(l|0);i=a;return g|0}else{c[b>>2]=g;kg(0,9512,b);ab(k|0);ab(l|0);i=a;return g|0}return 0}function hf(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;a=i;i=i+832|0;b=a;d=a+368|0;e=a+24|0;f=a+8|0;g=a+12|0;h=a+16|0;j=a+4|0;oi(d|0,7232,464)|0;oi(e|0,7696,340)|0;k=Sb(35633)|0;l=Sb(35632)|0;c[f>>2]=d;c[g>>2]=e;Qa(k|0,1,f|0,0);Qa(l|0,1,g|0,0);c[h>>2]=0;$b(k|0);ta(k|0,35713,h|0);if((c[h>>2]|0)==1){c[b>>2]=k;kg(0,8096,b)}else{c[b>>2]=k;kg(2,8040,b)}$b(l|0);ta(l|0,35713,h|0);if((c[h>>2]|0)==1){c[b>>2]=l;kg(0,8224,b)}else{c[b>>2]=l;kg(2,8160,b)}g=ya()|0;xb(g|0,k|0);xb(g|0,l|0);oc(g|0);kc(g|0,35714,h|0);if(!(c[h>>2]|0)){kc(g|0,35716,j|0);h=c[j>>2]|0;f=xc()|0;e=i;i=i+((1*h|0)+15&-16)|0;_a(g|0,c[j>>2]|0,a+20|0,e|0);c[b>>2]=e;kg(0,8288,b);$a(f|0);ab(k|0);ab(l|0);i=a;return g|0}else{c[b>>2]=g;kg(0,8320,b);ab(k|0);ab(l|0);i=a;return g|0}return 0}function jf(){var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;i=i+16|0;e=d;c[1488]=Vh(24576)|0;c[1490]=Vh(8192)|0;qi(c[1488]|0,0,24576)|0;f=0;do{a[(c[1490]|0)+f>>0]=0;f=f+1|0}while((f|0)!=8192);c[1484]=0;c[1486]=0;c[1496]=Vh(73728)|0;c[1498]=Vh(24576)|0;qi(c[1496]|0,0,73728)|0;f=0;do{a[(c[1498]|0)+f>>0]=0;f=f+1|0}while((f|0)!=24576);c[1492]=0;c[1494]=0;c[1506]=Vh(49152)|0;c[1508]=Vh(32768)|0;c[1510]=Vh(16384)|0;c[1512]=Vh(12288)|0;qi(c[1506]|0,0,49152)|0;qi(c[1508]|0,0,32768)|0;f=0;do{a[(c[1510]|0)+f>>0]=0;f=f+1|0}while((f|0)!=16384);f=c[1512]|0;g=0;h=0;while(1){j=h<<2;k=j&65535;b[f+(g<<1)>>1]=k;b[f+((g|1)<<1)>>1]=j|1;l=(j|2)&65535;b[f+(g+2<<1)>>1]=l;b[f+(g+3<<1)>>1]=k;b[f+(g+4<<1)>>1]=l;b[f+(g+5<<1)>>1]=j|3;h=h+1|0;if((h|0)==1024)break;else g=g+6|0}c[1500]=0;c[1502]=0;c[1504]=0;kg(0,7168,e);i=d;return}function kf(){var a=0,b=0,d=0,e=0,f=0;a=i;i=i+16|0;b=a;Pa(2,6680);xa(34962,c[1670]|0);gc(34962,24576,c[1488]|0,35048);bc(c[1588]|0);Xa(c[1588]|0,3,5126,0,0,0);xa(34962,c[1671]|0);gc(34962,8192,c[1490]|0,35048);bc(c[1600]|0);Xa(c[1600]|0,4,5121,1,0,0);d=c[1671]|0;c[b>>2]=c[1670];c[b+4>>2]=d;kg(0,6952,b);Pa(2,6688);xa(34962,c[1672]|0);gc(34962,73728,c[1496]|0,35048);bc(c[1588]|0);Xa(c[1588]|0,3,5126,0,0,0);xa(34962,c[1673]|0);gc(34962,24576,c[1498]|0,35048);bc(c[1600]|0);Xa(c[1600]|0,4,5121,1,0,0);d=c[1673]|0;c[b>>2]=c[1672];c[b+4>>2]=d;kg(0,7016,b);Pa(4,6696);xa(34962,c[1674]|0);gc(34962,49152,c[1506]|0,35048);bc(c[1588]|0);Xa(c[1588]|0,3,5126,0,0,0);xa(34962,c[1675]|0);gc(34962,32768,c[1508]|0,35048);bc(c[1594]|0);Xa(c[1594]|0,2,5126,0,0,0);xa(34962,c[1676]|0);gc(34962,16384,c[1510]|0,35048);bc(c[1600]|0);Xa(c[1600]|0,4,5121,1,0,0);xa(34963,c[1677]|0);gc(34963,12288,c[1512]|0,35044);d=c[1675]|0;e=c[1676]|0;f=c[1677]|0;c[b>>2]=c[1674];c[b+4>>2]=d;c[b+8>>2]=e;c[b+12>>2]=f;kg(0,7080,b);i=a;return}function lf(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f;h=f+12|0;Nb(3553,0);rb(1,h|0);Nb(3553,c[h>>2]|0);Ic(3553,10242,10497);Ic(3553,10243,10497);if((b|0)>0?(b+ -1&b|0)==0&(d|0)>0:0)j=(d+ -1&d|0)!=0;else j=1;if(!((e|0)!=0&j))if(!e)k=8;else{Ic(3553,10240,9729);Ic(3553,10241,9987);hc(3553,0,6408,b|0,d|0,0,6408,5121,a|0);Wa(3553);c[g>>2]=c[h>>2];kg(0,6832,g)}else{c[g>>2]=c[h>>2];kg(2,6760,g);k=8}if((k|0)==8){Ic(3553,10240,9728);Ic(3553,10241,9728);hc(3553,0,6408,b|0,d|0,0,6408,5121,a|0)}Nb(3553,0);c[g>>2]=c[h>>2];c[g+4>>2]=b;c[g+8>>2]=d;kg(0,6896,g);i=f;return c[h>>2]|0}function mf(){var a=0;a=i;Fa(0);Fa(1);Fa(2);Fa(3);xa(34962,0);xa(34963,0);ma(0);fc(1,6680);fc(1,6684|0);fc(1,6688);fc(1,6692|0);fc(1,6696);fc(1,6700|0);fc(1,6704|0);fc(1,6708|0);wa(c[1580]|0);Wh(c[1488]|0);Wh(c[1490]|0);Wh(c[1496]|0);Wh(c[1498]|0);Wh(c[1506]|0);Wh(c[1508]|0);Wh(c[1510]|0);Wh(c[1512]|0);mb(1,6576);Wh(c[1532]|0);i=a;return}function nf(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;a=i;i=i+64|0;b=a;of();if((c[1484]|0)>0|(c[1492]|0)>0|(c[1500]|0)>0){ma(c[1580]|0);d=c[1614]|0;e=b+0|0;f=4688|0;g=e+64|0;do{c[e>>2]=c[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));sa(d|0,1,0,sf(b)|0);d=c[1606]|0;e=b+0|0;f=4760|0;g=e+64|0;do{c[e>>2]=c[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));sa(d|0,1,0,sf(b)|0);Pb(c[1620]|0,0)}if((c[1492]|0)>0){Nb(3553,c[1644]|0);xa(34962,c[1672]|0);Xa(c[1588]|0,3,5126,0,0,0);bc(c[1588]|0);xa(34962,c[1673]|0);Xa(c[1600]|0,4,5121,1,0,0);bc(c[1600]|0);Rb(4,0,c[1492]|0);xa(34962,0);Nb(3553,0)}if((c[1500]|0)>0){xa(34962,c[1674]|0);Xa(c[1588]|0,3,5126,0,0,0);bc(c[1588]|0);xa(34962,c[1675]|0);Xa(c[1594]|0,2,5126,0,0,0);bc(c[1594]|0);xa(34962,c[1676]|0);Xa(c[1600]|0,4,5121,1,0,0);bc(c[1600]|0);xa(34963,c[1677]|0);if((c[1530]|0)>0){b=0;d=0;do{f=c[1532]|0;e=((c[f+(b<<3)+4>>2]|0)/4|0)*6|0;Nb(3553,c[f+(b<<3)>>2]|0);cb(4,e|0,5123,d<<1|0);d=(((c[(c[1532]|0)+(b<<3)+4>>2]|0)/4|0)*6|0)+d|0;b=b+1|0}while((b|0)<(c[1530]|0))}xa(34962,0);xa(34963,0);Nb(3553,0)}if((c[1484]|0)<=0){c[1530]=1;h=c[1644]|0;j=c[1532]|0;c[j>>2]=h;k=c[1532]|0;l=k+4|0;c[l>>2]=0;c[1484]=0;c[1486]=0;c[1492]=0;c[1494]=0;c[1500]=0;c[1502]=0;c[1504]=0;i=a;return}Nb(3553,c[1644]|0);xa(34962,c[1670]|0);Xa(c[1588]|0,3,5126,0,0,0);bc(c[1588]|0);xa(34962,c[1671]|0);Xa(c[1600]|0,4,5121,1,0,0);bc(c[1600]|0);Rb(1,0,c[1484]|0);xa(34962,0);Nb(3553,0);c[1530]=1;h=c[1644]|0;j=c[1532]|0;c[j>>2]=h;k=c[1532]|0;l=k+4|0;c[l>>2]=0;c[1484]=0;c[1486]=0;c[1492]=0;c[1494]=0;c[1500]=0;c[1502]=0;c[1504]=0;i=a;return}function of(){var a=0;a=i;if((c[1484]|0)>0){xa(34962,c[1670]|0);eb(34962,0,(c[1484]|0)*12|0,c[1488]|0);xa(34962,c[1671]|0);eb(34962,0,c[1486]<<2|0,c[1490]|0)}if((c[1492]|0)>0){xa(34962,c[1672]|0);eb(34962,0,(c[1492]|0)*12|0,c[1496]|0);xa(34962,c[1673]|0);eb(34962,0,c[1494]<<2|0,c[1498]|0)}if((c[1500]|0)<=0){i=a;return}xa(34962,c[1674]|0);eb(34962,0,(c[1500]|0)*12|0,c[1506]|0);xa(34962,c[1675]|0);eb(34962,0,c[1500]<<3|0,c[1508]|0);xa(34962,c[1676]|0);eb(34962,0,c[1500]<<2|0,c[1510]|0);i=a;return}function pf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=i;i=i+16|0;f=c-a|0;c=d-b|0;hb((a|0)/2|0|0,(b|0)/2|0|0,f|0,c|0);sc(16640);Mb(0.0,0.0,0.0,1.0);qb(2929);nb(515);qb(3042);Da(770,771);Le(0);Ne();Se(0.0,+(f|0),+(c|0),0.0,0.0,1.0);Le(1);Ne();qb(2884);kg(0,6712,e);i=e;return}function qf(a,b){a=a|0;b=b|0;var c=0.0,d=0,e=0.0,f=0,h=0.0;c=+g[a>>2];d=a+4|0;e=+g[d>>2];f=a+8|0;h=+g[f>>2];g[a>>2]=+g[b+12>>2]+(c*+g[b>>2]+e*+g[b+4>>2]+h*+g[b+8>>2]);g[d>>2]=+g[b+28>>2]+(c*+g[b+16>>2]+e*+g[b+20>>2]+h*+g[b+24>>2]);g[f>>2]=+g[b+44>>2]+(c*+g[b+32>>2]+e*+g[b+36>>2]+h*+g[b+40>>2]);return}function rf(a){a=a|0;var b=0;b=i;c[a+0>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;i=b;return}function sf(a){a=a|0;g[2392]=+g[a>>2];g[2393]=+g[a+4>>2];g[2394]=+g[a+8>>2];g[2395]=+g[a+12>>2];g[2396]=+g[a+16>>2];g[2397]=+g[a+20>>2];g[2398]=+g[a+24>>2];g[2399]=+g[a+28>>2];g[2400]=+g[a+32>>2];g[2401]=+g[a+36>>2];g[2402]=+g[a+40>>2];g[2403]=+g[a+44>>2];g[2404]=+g[a+48>>2];g[2405]=+g[a+52>>2];g[2406]=+g[a+56>>2];g[2407]=+g[a+60>>2];return 9568}function tf(a){a=a|0;var b=0,c=0.0,d=0,e=0.0,f=0,h=0.0,i=0,j=0,k=0.0,l=0,m=0.0,n=0,o=0.0,p=0,q=0.0,r=0,s=0.0,t=0,u=0.0,v=0,w=0.0,x=0,y=0.0;b=a+4|0;c=+g[b>>2];d=a+8|0;e=+g[d>>2];f=a+12|0;h=+g[f>>2];i=a+16|0;j=a+24|0;k=+g[j>>2];l=a+28|0;m=+g[l>>2];n=a+32|0;o=+g[n>>2];p=a+36|0;q=+g[p>>2];r=a+44|0;s=+g[r>>2];t=a+48|0;u=+g[t>>2];v=a+52|0;w=+g[v>>2];x=a+56|0;y=+g[x>>2];g[b>>2]=+g[i>>2];g[d>>2]=o;g[f>>2]=u;g[i>>2]=c;g[j>>2]=q;g[l>>2]=w;g[n>>2]=e;g[p>>2]=k;g[r>>2]=y;g[t>>2]=h;g[v>>2]=m;g[x>>2]=s;return}function uf(a){a=a|0;var b=0,d=0,e=0,f=0,h=0;b=i;i=i+48|0;d=b+32|0;e=b;f=b+16|0;c[d+0>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;c[d+12>>2]=0;c[e+0>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;c[e+12>>2]=0;c[f+0>>2]=0;c[f+4>>2]=0;c[f+8>>2]=0;c[f+12>>2]=0;g[a>>2]=1.0;h=a+4|0;c[h+0>>2]=c[d+0>>2];c[h+4>>2]=c[d+4>>2];c[h+8>>2]=c[d+8>>2];c[h+12>>2]=c[d+12>>2];g[a+20>>2]=1.0;d=a+24|0;c[d+0>>2]=c[e+0>>2];c[d+4>>2]=c[e+4>>2];c[d+8>>2]=c[e+8>>2];c[d+12>>2]=c[e+12>>2];g[a+40>>2]=1.0;e=a+44|0;c[e+0>>2]=c[f+0>>2];c[e+4>>2]=c[f+4>>2];c[e+8>>2]=c[f+8>>2];c[e+12>>2]=c[f+12>>2];g[a+60>>2]=1.0;i=b;return}function vf(a,b,d,e){a=a|0;b=+b;d=+d;e=+e;var f=0,h=0,j=0;f=i;g[a>>2]=1.0;h=a+4|0;j=a+20|0;c[h+0>>2]=0;c[h+4>>2]=0;c[h+8>>2]=0;c[h+12>>2]=0;g[j>>2]=1.0;j=a+24|0;h=a+40|0;c[j+0>>2]=0;c[j+4>>2]=0;c[j+8>>2]=0;c[j+12>>2]=0;g[h>>2]=1.0;g[a+44>>2]=0.0;g[a+48>>2]=b;g[a+52>>2]=d;g[a+56>>2]=e;g[a+60>>2]=1.0;i=f;return}function wf(a,b){a=a|0;b=+b;var d=0,e=0,f=0.0,h=0.0,j=0;d=i;i=i+64|0;e=d;uf(e);f=b;b=+S(+f);h=+T(+f);g[e+20>>2]=b;g[e+36>>2]=-h;g[e+24>>2]=h;g[e+40>>2]=b;j=a+0|0;a=e+0|0;e=j+64|0;do{c[j>>2]=c[a>>2];j=j+4|0;a=a+4|0}while((j|0)<(e|0));i=d;return}function xf(a,b){a=a|0;b=+b;var d=0,e=0,f=0.0,h=0.0,j=0;d=i;i=i+64|0;e=d;uf(e);f=b;b=+S(+f);h=+T(+f);g[e>>2]=b;g[e+32>>2]=h;g[e+8>>2]=-h;g[e+40>>2]=b;j=a+0|0;a=e+0|0;e=j+64|0;do{c[j>>2]=c[a>>2];j=j+4|0;a=a+4|0}while((j|0)<(e|0));i=d;return}function yf(a,b){a=a|0;b=+b;var d=0,e=0,f=0.0,h=0.0,j=0;d=i;i=i+64|0;e=d;uf(e);f=b;b=+S(+f);h=+T(+f);g[e>>2]=b;g[e+16>>2]=-h;g[e+4>>2]=h;g[e+20>>2]=b;j=a+0|0;a=e+0|0;e=j+64|0;do{c[j>>2]=c[a>>2];j=j+4|0;a=a+4|0}while((j|0)<(e|0));i=d;return}function zf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0,e=0.0,f=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0;d=+g[b>>2];e=+g[b+16>>2];f=+g[b+32>>2];h=+g[b+48>>2];i=+g[b+4>>2];j=+g[b+20>>2];k=+g[b+36>>2];l=+g[b+52>>2];m=+g[b+8>>2];n=+g[b+24>>2];o=+g[b+40>>2];p=+g[b+56>>2];q=+g[b+12>>2];r=+g[b+28>>2];s=+g[b+44>>2];t=+g[b+60>>2];u=+g[c>>2];v=+g[c+16>>2];w=+g[c+32>>2];x=+g[c+48>>2];y=+g[c+4>>2];z=+g[c+20>>2];A=+g[c+36>>2];B=+g[c+52>>2];C=+g[c+8>>2];D=+g[c+24>>2];E=+g[c+40>>2];F=+g[c+56>>2];G=+g[c+12>>2];H=+g[c+28>>2];I=+g[c+44>>2];J=+g[c+60>>2];g[a>>2]=d*u+i*v+m*w+q*x;g[a+4>>2]=d*y+i*z+m*A+q*B;g[a+8>>2]=d*C+i*D+m*E+q*F;g[a+12>>2]=d*G+i*H+m*I+q*J;g[a+16>>2]=e*u+j*v+n*w+r*x;g[a+20>>2]=e*y+j*z+n*A+r*B;g[a+24>>2]=e*C+j*D+n*E+r*F;g[a+28>>2]=e*G+j*H+n*I+r*J;g[a+32>>2]=f*u+k*v+o*w+s*x;g[a+36>>2]=f*y+k*z+o*A+s*B;g[a+40>>2]=f*C+k*D+o*E+s*F;g[a+44>>2]=f*G+k*H+o*I+s*J;g[a+48>>2]=h*u+l*v+p*w+t*x;g[a+52>>2]=h*y+l*z+p*A+t*B;g[a+56>>2]=h*C+l*D+p*E+t*F;g[a+60>>2]=h*G+l*H+p*I+t*J;return}function Af(a,b,d,e){a=a|0;b=+b;d=+d;e=+e;var f=0,h=0,j=0;f=i;g[a>>2]=b;h=a+4|0;j=a+20|0;c[h+0>>2]=0;c[h+4>>2]=0;c[h+8>>2]=0;c[h+12>>2]=0;g[j>>2]=d;j=a+24|0;h=a+40|0;c[j+0>>2]=0;c[j+4>>2]=0;c[j+8>>2]=0;c[j+12>>2]=0;g[h>>2]=e;h=a+44|0;j=a+60|0;c[h+0>>2]=0;c[h+4>>2]=0;c[h+8>>2]=0;c[h+12>>2]=0;g[j>>2]=1.0;i=f;return}function Bf(a,b,c,d,e,f,h){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;h=+h;var i=0.0,j=0.0,k=0.0;i=c-b;j=e-d;k=h-f;g[a>>2]=2.0/i;g[a+4>>2]=0.0;g[a+8>>2]=0.0;g[a+12>>2]=-(b+c)/i;g[a+16>>2]=0.0;g[a+20>>2]=2.0/j;g[a+24>>2]=0.0;g[a+28>>2]=-(d+e)/j;g[a+32>>2]=0.0;g[a+36>>2]=0.0;g[a+40>>2]=-2.0/k;g[a+44>>2]=-(f+h)/k;g[a+48>>2]=0.0;g[a+52>>2]=0.0;g[a+56>>2]=0.0;g[a+60>>2]=1.0;return}function Cf(b,c,d,e,f){b=b|0;c=c|0;d=+d;e=+e;f=f|0;var h=0,j=0,k=0,l=0;h=i;Me();Pe(+g[b>>2],+g[b+4>>2],0.0);Qe(e,0.0,0.0,1.0);Te(1);b=a[f>>0]|0;j=a[f+1>>0]|0;k=a[f+2>>0]|0;l=a[f+3>>0]|0;e=d;f=360/(((c|0)<3?3:c)|0)|0;c=0;do{_e(b,j,k,l);Xe(0,0);d=+(c|0)*.017453292519943295;We(e*+T(+d),e*+S(+d));c=f+c|0;d=+(c|0)*.017453292519943295;We(e*+T(+d),e*+S(+d))}while((c|0)<360);Ue();Oe();i=h;return}function Df(b,c,d){b=b|0;c=+c;d=d|0;var e=0,f=0,h=0,j=0,k=0,l=0.0,m=0,n=0.0,o=0,p=0.0,q=0.0,r=0.0;e=i;Te(1);f=a[d>>0]|0;h=a[d+1>>0]|0;j=a[d+2>>0]|0;k=a[d+3>>0]|0;l=+g[b>>2];d=~~l;m=b+4|0;n=+g[m>>2];o=~~n;p=l;l=c;c=n;n=+g[b>>2];q=+g[m>>2];m=0;do{_e(f,h,j,k);Xe(d,o);r=+(m|0)*.017453292519943295;We(p+l*+T(+r),c+l*+S(+r));m=m+2|0;r=+(m|0)*.017453292519943295;We(n+l*+T(+r),q+l*+S(+r))}while((m|0)<360);Ue();i=e;return}function Ef(b,c,d,e){b=b|0;c=c|0;d=+d;e=e|0;var f=0,g=0.0,h=0.0,j=0.0;f=i;Te(0);_e(a[e>>0]|0,a[e+1>>0]|0,a[e+2>>0]|0,a[e+3>>0]|0);g=+(b|0);h=d;d=+(c|0);c=0;do{j=+(c|0)*.017453292519943295;We(g+h*+T(+j),d+h*+S(+j));c=c+1|0;j=+(c|0)*.017453292519943295;We(g+h*+T(+j),d+h*+S(+j))}while((c|0)!=360);Ue();i=f;return}function Ff(b,d,e,f,h){b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0;j=i;i=i+48|0;k=j+32|0;l=j;m=j+8|0;n=j+16|0;o=j+24|0;g[n>>2]=+(b|0);g[n+4>>2]=+(d|0);g[o>>2]=+(e|0);g[o+4>>2]=+(f|0);c[m+0>>2]=c[n+0>>2];c[m+4>>2]=c[n+4>>2];c[l+0>>2]=c[o+0>>2];c[l+4>>2]=c[o+4>>2];a[k+0>>0]=a[h+0>>0]|0;a[k+1>>0]=a[h+1>>0]|0;a[k+2>>0]=a[h+2>>0]|0;a[k+3>>0]=a[h+3>>0]|0;Gf(m,l,k);i=j;return}function Gf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,h=0,j=0;f=i;if((ef()|0)==1){Te(1);_e(a[e>>0]|0,a[e+1>>0]|0,a[e+2>>0]|0,a[e+3>>0]|0);h=b+4|0;Xe(~~+g[b>>2],~~+g[h>>2]);j=d+4|0;Xe(~~+g[b>>2],~~(+g[h>>2]+ +g[j>>2]));Xe(~~(+g[b>>2]+ +g[d>>2]),~~(+g[h>>2]+ +g[j>>2]));Xe(~~+g[b>>2],~~+g[h>>2]);Xe(~~(+g[b>>2]+ +g[d>>2]),~~(+g[h>>2]+ +g[j>>2]));Xe(~~(+g[b>>2]+ +g[d>>2]),~~+g[h>>2]);Ue();i=f;return}if((ef()|0)!=2?(ef()|0)!=3:0){i=f;return}$e(c[1644]|0);Te(2);_e(a[e>>0]|0,a[e+1>>0]|0,a[e+2>>0]|0,a[e+3>>0]|0);Ye(0.0,0.0);e=b+4|0;We(+g[b>>2],+g[e>>2]);Ye(0.0,1.0);h=d+4|0;We(+g[b>>2],+g[e>>2]+ +g[h>>2]);Ye(1.0,1.0);We(+g[b>>2]+ +g[d>>2],+g[e>>2]+ +g[h>>2]);Ye(1.0,0.0);We(+g[b>>2]+ +g[d>>2],+g[e>>2]);Ue();i=f;return}function Hf(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+16|0;f=e;g=c[b>>2]|0;h=c[b+4>>2]|0;j=c[b+8>>2]|0;k=c[b+12>>2]|0;a[f+0>>0]=a[d+0>>0]|0;a[f+1>>0]=a[d+1>>0]|0;a[f+2>>0]=a[d+2>>0]|0;a[f+3>>0]=a[d+3>>0]|0;Ff(g,h,j,k,f);i=e;return}function If(b,c,d,e,f){b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0;g=i;Te(0);_e(a[f>>0]|0,a[f+1>>0]|0,a[f+2>>0]|0,a[f+3>>0]|0);f=b+1|0;h=c+1|0;Xe(f,h);j=d+b|0;Xe(j,h);Xe(j,h);b=e+c|0;Xe(j,b);Xe(j,b);Xe(f,b);Xe(f,b);Xe(f,h);Ue();i=g;return}function Jf(a,b){a=a|0;b=b|0;var d=0,e=0.0,f=0,h=0;d=i;e=+g[a>>2];f=c[b>>2]|0;if(((e>=+(f|0)?e<=+((c[b+8>>2]|0)+f|0):0)?(e=+g[a+4>>2],a=c[b+4>>2]|0,e>=+(a|0)):0)?e<=+((c[b+12>>2]|0)+a|0):0)h=1;else h=0;i=d;return h|0}function Kf(a,b,d){a=a|0;b=b|0;d=+d;var e=0,f=0,g=0;e=i;i=i+16|0;f=e+8|0;g=e;c[g+0>>2]=c[a+0>>2];c[g+4>>2]=c[a+4>>2];c[f+0>>2]=c[b+0>>2];c[f+4>>2]=c[b+4>>2];b=Lf(g,0.0,f,d)|0;i=e;return b|0}function Lf(a,b,c,d){a=a|0;b=+b;c=c|0;d=+d;var e=0.0,f=0.0;e=+g[c>>2]- +g[a>>2];f=+g[c+4>>2]- +g[a+4>>2];a=+Q(+(e*e+f*f))<=b+d&1;return a|0}function Mf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;e=(c[a+8>>2]|0)/2|0;f=(c[b+8>>2]|0)/2|0;g=e+(c[a>>2]|0)-(c[b>>2]|0)-f|0;h=(c[a+12>>2]|0)/2|0;j=(c[b+12>>2]|0)/2|0;k=h+(c[a+4>>2]|0)-(c[b+4>>2]|0)-j|0;if((((g|0)>-1?g:0-g|0)|0)>(f+e|0)){i=d;return 0}else{i=d;return(((k|0)>-1?k:0-k|0)|0)<=(j+h|0)|0}return 0}function Nf(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=i;i=i+48|0;d=b;e=b+24|0;f=b+12|0;c[2411]=96;g=e+4|0;c[g>>2]=128;h=e+8|0;c[h>>2]=64;c[e>>2]=Vh(c[g>>2]<<8)|0;if((aa(c[h>>2]|0,c[g>>2]|0)|0)>0){j=0;do{k=(c[e>>2]|0)+(j<<2)|0;j=j+1|0;a[k>>0]=0;a[k+1>>0]=0;a[k+2>>0]=0;a[k+3>>0]=0}while((j|0)<(aa(c[h>>2]|0,c[g>>2]|0)|0))}if((aa(c[h>>2]|0,c[g>>2]|0)|0)>0){j=0;k=0;while(1){l=c[9656+(j<<2)>>2]|0;m=31;while(1){if(l&1<<m){n=(c[e>>2]|0)+(m+k<<2)|0;a[n>>0]=-1;a[n+1>>0]=-1>>8;a[n+2>>0]=-1>>16;a[n+3>>0]=-1>>24}if((m|0)>0)m=m+ -1|0;else break}k=k+32|0;if((k|0)>=(aa(c[h>>2]|0,c[g>>2]|0)|0))break;else j=(j|0)>255?0:j+1|0}}c[d+0>>2]=c[e+0>>2];c[d+4>>2]=c[e+4>>2];c[d+8>>2]=c[e+8>>2];Uf(f,d,0);c[2408]=c[f+0>>2];c[2409]=c[f+4>>2];c[2410]=c[f+8>>2];c[d+0>>2]=c[e+0>>2];c[d+4>>2]=c[e+4>>2];c[d+8>>2]=c[e+8>>2];Vf(d);c[2412]=Vh((c[2411]|0)*20|0)|0;if((c[2411]|0)<=0){o=c[2408]|0;c[d>>2]=o;kg(0,11064,d);i=b;return}e=c[2412]|0;f=0;j=1;g=0;while(1){c[e+(g*20|0)>>2]=g+32;c[e+(g*20|0)+4>>2]=j;c[e+(g*20|0)+8>>2]=(f*11|0)+1;h=10680+(g<<2)|0;c[e+(g*20|0)+12>>2]=c[h>>2];c[e+(g*20|0)+16>>2]=10;k=j+1+(c[e+(g*20|0)+12>>2]|0)|0;if((k|0)<(c[2409]|0)){p=f;q=k}else{k=f+1|0;m=(c[h>>2]|0)+2|0;c[e+(g*20|0)+4>>2]=1;c[e+(g*20|0)+8>>2]=(k*11|0)+1;p=k;q=m}g=g+1|0;if((g|0)>=(c[2411]|0))break;else{f=p;j=q}}o=c[2408]|0;c[d>>2]=o;kg(0,11064,d);i=b;return}function Of(){var a=0;a=i;bf(c[2408]|0);Wh(c[2412]|0);i=a;return}function Pf(b,d,e,f,h){b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;var j=0,k=0,l=0,m=0,n=0;j=i;i=i+48|0;k=j+40|0;l=j;m=j+8|0;n=j+32|0;g[n>>2]=+(d|0);g[n+4>>2]=+(e|0);e=(f|0)<10?10:f;f=(e|0)/10|0;c[m+0>>2]=c[2408];c[m+4>>2]=c[2409];c[m+8>>2]=c[2410];c[m+12>>2]=c[2411];c[m+16>>2]=c[2412];c[l+0>>2]=c[n+0>>2];c[l+4>>2]=c[n+4>>2];a[k+0>>0]=a[h+0>>0]|0;a[k+1>>0]=a[h+1>>0]|0;a[k+2>>0]=a[h+2>>0]|0;a[k+3>>0]=a[h+3>>0]|0;Qf(m,b,l,e,f,k);i=j;return}function Qf(b,d,e,f,h,j){b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;j=j|0;var k=0,l=0,m=0.0,n=0,o=0,p=0.0,q=0,r=0,s=0,t=0.0,u=0,v=0.0,w=0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0,I=0.0,J=0.0,K=0.0,L=0.0;k=i;l=vi(d|0)|0;m=+g[e>>2];n=b+16|0;o=c[(c[n>>2]|0)+16>>2]|0;if((o|0)<(f|0))p=+(f|0)/+(o|0);else p=1.0;$e(c[b>>2]|0);Te(2);if((l|0)<=0){Ue();i=k;return}o=c[n>>2]|0;f=a[j>>0]|0;q=a[j+1>>0]|0;r=a[j+2>>0]|0;s=a[j+3>>0]|0;j=b+4|0;t=+(c[j>>2]|0);u=b+8|0;b=c[u>>2]|0;v=+(b|0);w=e+4|0;x=+g[w>>2];e=c[j>>2]|0;y=+(e|0);z=+(b|0);A=+(e|0);e=c[u>>2]|0;B=+(e|0);C=+g[w>>2];D=+(c[j>>2]|0);E=+(e|0);e=c[n>>2]|0;F=+(h|0);h=0;G=m;while(1){n=d+h|0;j=(a[n>>0]|0)+ -32|0;w=c[o+(j*20|0)+4>>2]|0;u=c[o+(j*20|0)+8>>2]|0;b=c[o+(j*20|0)+12>>2]|0;H=c[o+(j*20|0)+16>>2]|0;_e(f,q,r,s);m=+(w|0);I=+(u|0);Ye(m/t,I/v);J=+(~~G|0);We(J,x);K=+(H+u|0);Ye(m/y,K/z);m=p*+(H|0);We(J,m+x);L=+(b+w|0);Ye(L/A,K/B);K=J+p*+(b|0);We(K,m+C);Ye(L/D,I/E);We(K,C);h=h+1|0;if((h|0)==(l|0))break;else G=J+(F+p*+(c[e+(((a[n>>0]|0)+ -32|0)*20|0)+12>>2]|0))}Ue();i=k;return}function Rf(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;i=i+16|0;e=d;c[e>>2]=b;ii(11112,a,e)|0;i=d;return 11112}function Sf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,h=0;d=i;i=i+32|0;e=d+8|0;f=d;h=(b|0)<10?10:b;b=(h|0)/10|0;c[e+0>>2]=c[2408];c[e+4>>2]=c[2409];c[e+8>>2]=c[2410];c[e+12>>2]=c[2411];c[e+16>>2]=c[2412];Tf(f,e,a,h,b);i=d;return~~+g[f>>2]|0}function Tf(b,d,e,f,h){b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0;j=i;k=vi(e|0)|0;if((k|0)>0){l=c[d+16>>2]|0;m=0;n=0;do{n=(c[l+(((a[e+m>>0]|0)+ -32|0)*20|0)+12>>2]|0)+n|0;m=m+1|0}while((m|0)!=(k|0));o=+(n|0)}else o=0.0;n=d+16|0;d=c[(c[n>>2]|0)+16>>2]|0;if((d|0)<(f|0))p=+(f|0)/+(d|0);else p=1.0;q=+(aa(k+ -1|0,h)|0)+o*p;o=p*+(c[(c[n>>2]|0)+16>>2]|0);g[b>>2]=q;g[b+4>>2]=o;i=j;return}function Uf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=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;f=i;i=i+16|0;g=f;if(((c[d>>2]|0)!=0?(h=d+4|0,j=c[h>>2]|0,(j|0)>0):0)?(k=d+8|0,l=c[k>>2]|0,(l|0)>0):0){m=Vh(aa(j<<2,l)|0)|0;l=c[h>>2]|0;j=c[k>>2]|0;if((aa(l<<2,j)|0)>0){n=c[d>>2]|0;d=c[h>>2]|0;o=c[k>>2]|0;p=aa(d<<2,o)|0;q=0;r=0;while(1){a[m+q>>0]=a[n+(r<<2)>>0]|0;a[m+(q|1)>>0]=a[n+(r<<2)+1>>0]|0;a[m+(q|2)>>0]=a[n+(r<<2)+2>>0]|0;a[m+(q|3)>>0]=a[n+(r<<2)+3>>0]|0;q=q+4|0;if((q|0)>=(p|0)){s=d;t=o;break}else r=r+1|0}}else{s=l;t=j}j=lf(m,s,t,e)|0;e=c[h>>2]|0;h=c[k>>2]|0;Wh(m);u=j;v=e;w=h;c[b>>2]=u;x=b+4|0;c[x>>2]=v;y=b+8|0;c[y>>2]=w;i=f;return}kg(2,11168,g);u=0;v=0;w=0;c[b>>2]=u;x=b+4|0;c[x>>2]=v;y=b+8|0;c[y>>2]=w;i=f;return}function Vf(a){a=a|0;var b=0;b=i;Wh(c[a>>2]|0);i=b;return}function Wf(){var a=0,b=0,d=0,e=0,f=0;a=i;i=i+16|0;b=a;d=Gc(0)|0;if(!d)kg(1,11232,b);e=Za(d|0,0)|0;if(e){if(!((fb(e|0)|0)<<24>>24)){Qb(e|0);f=6}}else f=6;if((f|0)==6){Ra(d|0)|0;kg(1,11272,b)}c[b>>2]=Yb(d|0,4101)|0;kg(0,11304,b);mc(4100,0.0,0.0,0.0);mc(4102,0.0,0.0,0.0);mc(4111,0.0,0.0,-1.0);i=a;return}function Xf(){var a=0,b=0,c=0;a=i;i=i+16|0;Yf();b=kb()|0;if(!b)kg(2,11360,a);c=ec(b|0)|0;fb(0)|0;Qb(b|0);Ra(c|0)|0;i=a;return}function Yf(){var a=0;a=i;if(!(c[2806]|0)){c[2806]=0;i=a;return}Ka(c[2895]|0);fg();sb(1,11580|0);wc(2,11572|0);mg(c[2892]|0);c[2806]=0;i=a;return}function Zf(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=i;i=i+48|0;f=e;g=e+24|0;h=e+16|0;j=e+20|0;k=g+4|0;l=g+8|0;m=g+12|0;n=g+14|0;c[g+0>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;do if(li(lg(d)|0,11408)|0)if(!(li(lg(d)|0,11416)|0)){$f(g,d);break}else{c[f>>2]=d;kg(2,11424,f);break}else _f(g,d);while(0);if(!(c[g>>2]|0)){o=0;p=0;c[a>>2]=o;q=a+4|0;c[q>>2]=p;i=e;return}r=b[n>>1]|0;if(r<<16>>16==1){s=b[m>>1]|0;if(s<<16>>16==8)t=4352;else t=s<<16>>16==16?4353:0}else if(r<<16>>16==2){r=b[m>>1]|0;if(r<<16>>16==8)t=4354;else t=r<<16>>16==16?4355:0}else t=0;Ec(1,h|0);lb(c[h>>2]|0,4099,1.0);lb(c[h>>2]|0,4106,1.0);za(c[h>>2]|0,4100,0.0,0.0,0.0);za(c[h>>2]|0,4102,0.0,0.0,0.0);ob(c[h>>2]|0,4103,0);pb(1,j|0);ua(c[j>>2]|0,t|0,c[g>>2]|0,c[k>>2]|0,c[l>>2]|0);ob(c[h>>2]|0,4105,c[j>>2]|0);k=c[l>>2]|0;l=b[m>>1]|0;m=b[n>>1]|0;c[f>>2]=d;c[f+4>>2]=k;c[f+8>>2]=l;c[f+12>>2]=m;kg(0,11480,f);c[f+0>>2]=c[g+0>>2];c[f+4>>2]=c[g+4>>2];c[f+8>>2]=c[g+8>>2];c[f+12>>2]=c[g+12>>2];ag(f);o=c[h>>2]|0;p=c[j>>2]|0;c[a>>2]=o;q=a+4|0;c[q>>2]=p;i=e;return}function _f(d,e){d=d|0;e=e|0;var f=0,g=0,h=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,z=0,A=0,B=0,C=0,D=0,E=0,F=0;f=i;i=i+64|0;g=f;h=f+48|0;j=f+16|0;k=f+40|0;l=ic(e|0,11560)|0;if(!l){c[g>>2]=e;kg(2,12192,g);m=0;n=0;o=0;p=0;q=0;c[d>>2]=m;r=d+4|0;c[r>>2]=n;s=d+8|0;c[s>>2]=o;t=d+12|0;b[t>>1]=p;u=d+14|0;b[u>>1]=q;i=f;return}ra(h|0,12,1,l|0)|0;do if((mi(h,12232,4)|0)==0?(mi(h+8|0,12240,4)|0)==0:0){ra(j|0,24,1,l|0)|0;if((((a[j>>0]|0)==102?(a[j+1>>0]|0)==109:0)?(a[j+2>>0]|0)==116:0)?(a[j+3>>0]|0)==32:0){if((c[j+4>>2]|0)>16)Tb(l|0,2,1)|0;ra(k|0,8,1,l|0)|0;if((((a[k>>0]|0)==100?(a[k+1>>0]|0)==97:0)?(a[k+2>>0]|0)==116:0)?(a[k+3>>0]|0)==97:0){v=k+4|0;w=Vh(c[v>>2]|0)|0;ra(w|0,c[v>>2]|0,1,l|0)|0;x=c[v>>2]|0;v=c[j+12>>2]|0;y=b[j+10>>1]|0;z=b[j+22>>1]|0;c[g>>2]=e;c[g+4>>2]=v;c[g+8>>2]=z<<16>>16;c[g+12>>2]=y<<16>>16;kg(0,12352,g);A=w;B=x;C=v;D=z;E=y;break}c[g>>2]=e;kg(2,12320,g);A=0;B=0;C=0;D=0;E=0;break}c[g>>2]=e;kg(2,12288,g);A=0;B=0;C=0;D=0;E=0}else F=5;while(0);if((F|0)==5){c[g>>2]=e;kg(2,12248,g);A=0;B=0;C=0;D=0;E=0}Vb(l|0)|0;m=A;n=B;o=C;p=D;q=E;c[d>>2]=m;r=d+4|0;c[r>>2]=n;s=d+8|0;c[s>>2]=o;t=d+12|0;b[t>>1]=p;u=d+14|0;b[u>>1]=q;i=f;return}function $f(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0,s=0;e=i;i=i+48|0;f=e;g=e+16|0;j=Kg(d,0,0)|0;pg(g,j);l=c[g>>2]|0;m=g+4|0;n=c[m>>2]|0;c[f>>2]=d;c[f+4>>2]=l;kg(3,11648,f);o=c[m>>2]|0;c[f>>2]=d;c[f+4>>2]=o;kg(3,11680,f);o=Cg(j)|0;p=aa(c[m>>2]|0,o)|0;o=p<<1;c[f>>2]=d;c[f+4>>2]=p;kg(3,11880,f);q=+Gg(j);r=q;c[f>>2]=d;s=f+4|0;h[k>>3]=r;c[s>>2]=c[k>>2];c[s+4>>2]=c[k+4>>2];kg(3,11904,f);if(q>10.0){c[f>>2]=d;s=f+4|0;h[k>>3]=r;c[s>>2]=c[k>>2];c[s+4>>2]=c[k+4>>2];kg(2,11928,f)}s=~~(q*+((c[g>>2]|0)>>>0)*+(c[m>>2]|0));c[f>>2]=d;c[f+4>>2]=s;kg(3,12040,f);s=Vh(o)|0;g=Mg(j,c[m>>2]|0,s,p)|0;c[f>>2]=d;c[f+4>>2]=g;kg(3,12080,f);c[f>>2]=d;c[f+4>>2]=l;c[f+8>>2]=16;c[f+12>>2]=n<<16>>16;kg(0,12112,f);mg(j);c[a>>2]=s;c[a+4>>2]=o;c[a+8>>2]=l;b[a+12>>1]=16;b[a+14>>1]=n;i=e;return}function ag(a){a=a|0;var b=0;b=i;Wh(c[a>>2]|0);i=b;return}function bg(a){a=a|0;var b=0;b=i;sb(1,a|0);wc(1,a+4|0);i=b;return}function cg(a){a=a|0;var b=0;b=i;Sa(c[a>>2]|0);i=b;return}function dg(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+32|0;d=b;e=b+8|0;if(li(lg(a)|0,11416)|0){c[d>>2]=a;kg(2,11736,d);i=b;return}Yf();f=Kg(a,0,0)|0;c[2892]=f;if(!f){c[d>>2]=a;kg(2,11608,d);i=b;return}else{pg(e,f);f=e+4|0;c[2897]=c[f>>2];c[2898]=c[e>>2];g=c[e>>2]|0;c[d>>2]=a;c[d+4>>2]=g;kg(0,11648,d);g=c[f>>2]|0;c[d>>2]=a;c[d+4>>2]=g;kg(0,11680,d);g=c[e+16>>2]|0;c[d>>2]=a;c[d+4>>2]=g;kg(0,11704,d);c[2896]=(c[f>>2]|0)==2?4355:4353;c[2900]=1;c[2806]=1;Ec(1,11580|0);lb(c[2895]|0,4099,1.0);lb(c[2895]|0,4106,1.0);za(c[2895]|0,4100,0.0,0.0,0.0);za(c[2895]|0,4102,0.0,0.0,0.0);pb(2,11572|0);eg(c[2893]|0)|0;eg(c[2894]|0)|0;ib(c[2895]|0,2,11572|0);Sa(c[2895]|0);f=Cg(c[2892]|0)|0;c[2899]=aa(c[2897]|0,f)|0;i=b;return}}function eg(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;i=i+65552|0;d=b;e=b+8|0;do if(c[2806]|0){f=0;while(1){g=Mg(c[2892]|0,c[2897]|0,e+(f<<1)|0,32768-f|0)|0;if((g|0)<=0){h=4;break}j=(aa(c[2897]|0,g)|0)+f|0;if((j|0)<32768)f=j;else{k=j;break}}if((h|0)==4)if((f|0)>0)k=f;else break;ua(a|0,c[2896]|0,e|0,k<<1|0,c[2898]|0);c[2899]=(c[2899]|0)-k;l=1;i=b;return l|0}while(0);kg(2,12432,d);l=0;i=b;return l|0}function fg(){var a=0,b=0,d=0,e=0;a=i;i=i+16|0;b=a+4|0;d=a;c[b>>2]=0;c[d>>2]=0;db(c[2895]|0,4117,d|0);if((c[d>>2]|0)<=0){i=a;return}do{Mc(c[2895]|0,1,b|0);e=(c[d>>2]|0)+ -1|0;c[d>>2]=e}while((e|0)>0);i=a;return}function gg(){var a=0;a=i;i=i+16|0;if(!(c[2806]|0)){i=a;return}kg(0,11792,a);Ta(c[2895]|0);c[2806]=0;i=a;return}function hg(){var a=0,b=0;a=i;i=i+16|0;b=a+4|0;db(c[2895]|0,4112,b|0);if((c[b>>2]|0)!=4115){i=a;return}kg(0,11816,a);Sa(c[2895]|0);c[2806]=1;i=a;return}function ig(a){a=+a;var b=0;b=i;lb(c[2895]|0,4106,+a);i=b;return}function jg(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;a=i;i=i+16|0;b=a;d=a+12|0;e=a+4|0;f=a+8|0;c[d>>2]=0;c[e>>2]=0;if(!(c[2806]|0)){i=a;return}db(c[2895]|0,4118,e|0);g=c[2895]|0;if((c[e>>2]|0)>0){h=g;while(1){Mc(h|0,1,d|0);j=eg(c[d>>2]|0)|0;if((j|0)==0&(c[2900]|0)!=0){zg(c[2892]|0);k=Cg(c[2892]|0)|0;c[2899]=aa(c[2897]|0,k)|0;l=eg(c[d>>2]|0)|0}else l=j;ib(c[2895]|0,1,d|0);if(na()|0)kg(2,11840,b);j=(c[e>>2]|0)+ -1|0;c[e>>2]=j;k=c[2895]|0;if((j|0)>0)h=k;else{m=k;n=l;break}}}else{m=g;n=1}db(m|0,4112,f|0);m=(n|0)==0;if(!((c[f>>2]|0)==4114|m))Sa(c[2895]|0);if(!m){i=a;return}Yf();i=a;return}function kg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=i;i=i+16|0;f=e;if(!a)zb(12472,6,1,c[o>>2]|0)|0;else if((a|0)==2)zb(12488,9,1,c[o>>2]|0)|0;else if((a|0)==3){i=e;return}else if((a|0)==1)zb(12480,7,1,c[o>>2]|0)|0;c[f>>2]=d;Ib(c[o>>2]|0,b|0,f|0)|0;cc(10,c[o>>2]|0)|0;if((a|0)==1)Db(1);else{i=e;return}}function lg(a){a=a|0;var b=0,c=0;b=i;c=Uh(a,46)|0;i=b;return((c|0)==0|(c|0)==(a|0)?12504:c+1|0)|0}function mg(a){a=a|0;var b=0;b=i;if(a){ng(a);og(a,a)}i=b;return}function ng(a){a=a|0;var b=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;b=i;e=a+280|0;if((c[e>>2]|0)>0){f=a+412|0;g=a+140|0;h=0;do{j=c[f>>2]|0;k=j+(h*24|0)+16|0;if(c[k>>2]|0){l=j+(h*24|0)+13|0;m=c[k>>2]|0;if((c[(c[g>>2]|0)+((d[l>>0]|0)*2096|0)+4>>2]|0)>0){n=m;o=0;while(1){og(a,c[n+(o<<2)>>2]|0);o=o+1|0;p=c[k>>2]|0;if((o|0)>=(c[(c[g>>2]|0)+((d[l>>0]|0)*2096|0)+4>>2]|0)){q=p;break}else n=p}}else q=m;og(a,q)}og(a,c[j+(h*24|0)+20>>2]|0);h=h+1|0}while((h|0)<(c[e>>2]|0))}e=a+140|0;if(c[e>>2]|0){h=a+136|0;q=c[e>>2]|0;if((c[h>>2]|0)>0){g=q;f=0;while(1){og(a,c[g+(f*2096|0)+8>>2]|0);og(a,c[g+(f*2096|0)+28>>2]|0);og(a,c[g+(f*2096|0)+32>>2]|0);og(a,c[g+(f*2096|0)+2084>>2]|0);n=c[g+(f*2096|0)+2088>>2]|0;if(!n)r=0;else r=n+ -4|0;og(a,r);f=f+1|0;n=c[e>>2]|0;if((f|0)>=(c[h>>2]|0)){s=n;break}else g=n}}else s=q;og(a,s)}og(a,c[a+276>>2]|0);og(a,c[a+412>>2]|0);s=a+416|0;q=a+420|0;g=c[q>>2]|0;if((c[s>>2]|0)>0){h=g;f=0;while(1){og(a,c[h+(f*40|0)+4>>2]|0);f=f+1|0;e=c[q>>2]|0;if((f|0)>=(c[s>>2]|0)){t=e;break}else h=e}}else t=g;og(a,t);t=a+4|0;if((c[t>>2]|0)>0){g=0;do{og(a,c[a+(g<<2)+816>>2]|0);og(a,c[a+(g<<2)+944>>2]|0);og(a,c[a+(g<<2)+1012>>2]|0);g=g+1|0}while((g|0)<(c[t>>2]|0))}og(a,c[a+1084>>2]|0);og(a,c[a+1092>>2]|0);og(a,c[a+1100>>2]|0);og(a,c[a+1108>>2]|0);og(a,c[a+1116>>2]|0);og(a,c[a+1088>>2]|0);og(a,c[a+1096>>2]|0);og(a,c[a+1104>>2]|0);og(a,c[a+1112>>2]|0);og(a,c[a+1120>>2]|0);if(!(c[a+28>>2]|0)){i=b;return}Vb(c[a+20>>2]|0)|0;i=b;return}function og(a,b){a=a|0;b=b|0;var d=0;d=i;if(!(c[a+96>>2]|0))Wh(b);i=d;return}function pg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=c[b+4>>2]|0;e=c[b+8>>2]|0;f=c[b+16>>2]|0;g=c[b+12>>2]|0;h=c[b+132>>2]>>1;c[a>>2]=c[b>>2];c[a+4>>2]=d;c[a+8>>2]=e;c[a+12>>2]=f;c[a+16>>2]=g;c[a+20>>2]=h;return}function qg(a,b){a=a|0;b=b|0;c[a+116>>2]=b;return}function rg(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=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;e=i;f=c[b+1396>>2]|0;g=c[b+32>>2]|0;if((f|0)!=-1){h=b+1132|0;a:do if((f|0)<(c[h>>2]|0)){j=g;k=f;while(1){l=a[b+k+1136>>0]|0;m=j+(l&255)|0;n=k+1|0;if(l<<24>>24!=-1){o=m;p=k;break a}if((n|0)<(c[h>>2]|0)){j=m;k=n}else{o=m;p=n;break}}}else{o=g;p=f}while(0);if((d|0)!=0?(p|0)<((c[h>>2]|0)+ -1|0):0){qg(b,21);q=0;i=e;return q|0}f=(p|0)==(c[h>>2]|0)?-1:p;if(o>>>0>(c[b+40>>2]|0)>>>0){qg(b,1);q=0;i=e;return q|0}else{r=0;s=o;t=f}}else{r=1;s=g;t=-1}g=b+40|0;f=(d|0)==0;d=b+1008|0;o=r;r=s;s=t;while(1){if((s|0)!=-1){q=1;u=34;break}t=r+26|0;if(t>>>0>=(c[g>>2]|0)>>>0){u=13;break}if(ki(r,12640,4)|0){u=15;break}if(a[r+4>>0]|0){u=17;break}if(!o){if(!(a[r+5>>0]&1)){u=23;break}}else if((c[d>>2]|0)!=0?(a[r+5>>0]&1)!=0:0){u=21;break}p=a[t>>0]|0;t=p&255;h=r+(t+27)|0;if(h>>>0>(c[g>>2]|0)>>>0){u=26;break}b:do if(!(p<<24>>24)){v=h;w=0}else{k=h;j=0;while(1){n=a[r+(j+27)>>0]|0;m=k+(n&255)|0;l=j+1|0;if(n<<24>>24!=-1){v=m;w=j;break b}if((l|0)<(t|0)){k=m;j=l}else{v=m;w=l;break}}}while(0);if(!f?(w|0)<(t+ -1|0):0){u=31;break}if(v>>>0>(c[g>>2]|0)>>>0){u=33;break}else{o=0;r=v;s=(w|0)==(t|0)?-1:w}}if((u|0)==13){qg(b,1);q=0;i=e;return q|0}else if((u|0)==15){qg(b,21);q=0;i=e;return q|0}else if((u|0)==17){qg(b,21);q=0;i=e;return q|0}else if((u|0)==21){qg(b,21);q=0;i=e;return q|0}else if((u|0)==23){qg(b,21);q=0;i=e;return q|0}else if((u|0)==26){qg(b,1);q=0;i=e;return q|0}else if((u|0)==31){qg(b,21);q=0;i=e;return q|0}else if((u|0)==33){qg(b,1);q=0;i=e;return q|0}else if((u|0)==34){i=e;return q|0}return 0}function sg(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0;f=i;i=i+16|0;g=f+8|0;h=f+4|0;if(!(Sg(a,d,f,e,h,g)|0)){j=0;i=f;return j|0}j=wh(a,b,a+((c[g>>2]|0)*6|0)+428|0,c[d>>2]|0,c[e>>2]|0,c[h>>2]|0,d)|0;i=f;return j|0}function tg(a){a=a|0;var b=0,d=0;b=i;d=Zg(a)|0;c[a+1412>>2]=0;i=b;return d|0}function ug(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,h=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=i;h=a+1008|0;j=c[h>>2]|0;if(!j)k=0;else{l=vh(a,j)|0;m=a+4|0;if((c[m>>2]|0)>0){n=(j|0)>0;o=c[m>>2]|0;m=j+ -1|0;p=0;do{if(n){q=c[a+(p<<2)+816>>2]|0;r=c[a+(p<<2)+944>>2]|0;s=0;do{t=q+(s+d<<2)|0;g[t>>2]=+g[t>>2]*+g[l+(s<<2)>>2]+ +g[r+(s<<2)>>2]*+g[l+(m-s<<2)>>2];s=s+1|0}while((s|0)!=(j|0))}p=p+1|0}while((p|0)<(o|0))}k=c[h>>2]|0}c[h>>2]=b-e;h=a+4|0;if((c[h>>2]|0)>0){o=(e|0)<(b|0);p=c[h>>2]|0;h=b-e|0;j=0;do{if(o){m=c[a+(j<<2)+816>>2]|0;l=c[a+(j<<2)+944>>2]|0;n=e;s=0;while(1){g[l+(s<<2)>>2]=+g[m+(n<<2)>>2];r=s+1|0;if((r|0)==(h|0))break;else{n=r+e|0;s=r}}}j=j+1|0}while((j|0)<(p|0))}if(!k){u=0;i=f;return u|0}k=((b|0)<(e|0)?b:e)-d|0;d=a+1432|0;c[d>>2]=(c[d>>2]|0)+k;u=k;i=f;return u|0}function vg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;qi(a|0,0,1528)|0;if(b){e=b;b=c[e+4>>2]|0;f=a+96|0;c[f>>2]=c[e>>2];c[f+4>>2]=b;b=a+100|0;f=(c[b>>2]|0)+3&-4;c[b>>2]=f;c[a+108>>2]=f}c[a+112>>2]=0;c[a+116>>2]=0;c[a+32>>2]=0;c[a+140>>2]=0;c[a+1436>>2]=-1;c[a+28>>2]=0;c[a+20>>2]=0;i=d;return}function wg(f){f=f|0;var h=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,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,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,$=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=0,ua=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0;h=i;i=i+1024|0;j=h+1008|0;k=h+8|0;l=h;m=h+4|0;if(!(Xg(f)|0)){n=0;i=h;return n|0}o=d[f+1391>>0]|0;if(!(o&2)){qg(f,34);n=0;i=h;return n|0}if(o&4){qg(f,34);n=0;i=h;return n|0}if(o&1){qg(f,34);n=0;i=h;return n|0}if((c[f+1132>>2]|0)!=1){qg(f,34);n=0;i=h;return n|0}if((a[f+1136>>0]|0)!=30){qg(f,34);n=0;i=h;return n|0}if((Og(f)|0)<<24>>24!=1){qg(f,34);n=0;i=h;return n|0}if(!(Eg(f,j,6)|0)){qg(f,10);n=0;i=h;return n|0}if(!(bh(j)|0)){qg(f,34);n=0;i=h;return n|0}if(Fg(f)|0){qg(f,34);n=0;i=h;return n|0}o=Og(f)|0;p=f+4|0;c[p>>2]=o&255;if(!(o<<24>>24)){qg(f,34);n=0;i=h;return n|0}if((o&255)>16){qg(f,5);n=0;i=h;return n|0}o=Fg(f)|0;c[f>>2]=o;if(!o){qg(f,34);n=0;i=h;return n|0}Fg(f)|0;Fg(f)|0;Fg(f)|0;o=Og(f)|0;q=o&255;r=q&15;s=q>>>4;q=f+128|0;c[q>>2]=1<<r;t=f+132|0;c[t>>2]=1<<s;if((r+ -6|0)>>>0>7){qg(f,20);n=0;i=h;return n|0}if(o+ -96<<24>>24<<24>>24<0){qg(f,20);n=0;i=h;return n|0}if(r>>>0>s>>>0){qg(f,20);n=0;i=h;return n|0}if(!((Og(f)|0)&1)){qg(f,34);n=0;i=h;return n|0}if(!(Xg(f)|0)){n=0;i=h;return n|0}if(!(Wg(f)|0)){n=0;i=h;return n|0}s=f+1392|0;do{r=_g(f)|0;Rg(f,r);a[s>>0]=0}while((r|0)!=0);if(!(Wg(f)|0)){n=0;i=h;return n|0}do if(a[f+48>>0]|0){if(rg(f,1)|0)break;s=f+116|0;if((c[s>>2]|0)!=21){n=0;i=h;return n|0}c[s>>2]=20;n=0;i=h;return n|0}while(0);ch();if((tg(f)|0)!=5){qg(f,20);n=0;i=h;return n|0}a[j>>0]=tg(f)|0;a[j+1>>0]=tg(f)|0;a[j+2>>0]=tg(f)|0;a[j+3>>0]=tg(f)|0;a[j+4>>0]=tg(f)|0;a[j+5>>0]=tg(f)|0;if(!(bh(j)|0)){qg(f,20);n=0;i=h;return n|0}j=($g(f,8)|0)+1|0;s=f+136|0;c[s>>2]=j;r=ah(f,j*2096|0)|0;j=f+140|0;c[j>>2]=r;if(!r){qg(f,3);n=0;i=h;return n|0}qi(r|0,0,(c[s>>2]|0)*2096|0)|0;a:do if((c[s>>2]|0)>0){r=f+16|0;o=f+16|0;u=0;b:while(1){v=c[j>>2]|0;w=v+(u*2096|0)|0;if((($g(f,8)|0)&255|0)!=66){x=52;break}if((($g(f,8)|0)&255|0)!=67){x=54;break}if((($g(f,8)|0)&255|0)!=86){x=56;break}y=$g(f,8)|0;c[w>>2]=($g(f,8)|0)<<8|y&255;y=$g(f,8)|0;z=$g(f,8)|0;A=v+(u*2096|0)+4|0;c[A>>2]=z<<8&65280|y&255|($g(f,8)|0)<<16;y=($g(f,1)|0)!=0;do if(y){z=v+(u*2096|0)+23|0;a[z>>0]=0;B=c[A>>2]|0;C=z;x=61}else{z=($g(f,1)|0)&255;D=v+(u*2096|0)+23|0;a[D>>0]=z;E=c[A>>2]|0;if(!(z<<24>>24)){B=E;C=D;x=61;break}F=D;G=dh(f,E)|0}while(0);if((x|0)==61){x=0;E=ah(f,B)|0;c[v+(u*2096|0)+8>>2]=E;F=C;G=E}if(!G){x=63;break}do if(y){E=$g(f,5)|0;D=c[A>>2]|0;if((D|0)>0){H=D;I=0;J=E}else{K=0;break}while(1){J=J+1|0;E=$g(f,Qg(H-I|0)|0)|0;D=I;I=E+I|0;if((I|0)>(c[A>>2]|0)){x=68;break b}qi(G+D|0,J&255|0,E|0)|0;H=c[A>>2]|0;if((I|0)>=(H|0)){K=0;break}}}else{if((c[A>>2]|0)>0){L=0;M=0}else{K=0;break}while(1){do if(!(a[F>>0]|0))x=72;else{if($g(f,1)|0){x=72;break}a[G+L>>0]=-1;N=M}while(0);if((x|0)==72){x=0;a[G+L>>0]=($g(f,5)|0)+1;N=M+1|0}L=L+1|0;if((L|0)>=(c[A>>2]|0)){K=N;break}else M=N}}while(0);do if(!(a[F>>0]|0)){O=G;x=81}else{y=c[A>>2]|0;if((K|0)<(y>>2|0))if(!(a[F>>0]|0)){O=G;x=81;break}else{P=G;Q=K;break}if((y|0)>(c[o>>2]|0))c[o>>2]=y;y=ah(f,c[A>>2]|0)|0;E=v+(u*2096|0)+8|0;c[E>>2]=y;oi(y|0,G|0,c[A>>2]|0)|0;eh(f,G,c[A>>2]|0);y=c[E>>2]|0;a[F>>0]=0;O=y;x=81}while(0);do if((x|0)==81){x=0;if((c[A>>2]|0)<=0){P=O;Q=0;break}y=c[A>>2]|0;E=0;D=0;while(1){z=a[O+E>>0]|0;R=(((z&255)<11|z<<24>>24==-1)&1^1)+D|0;E=E+1|0;if((E|0)>=(y|0)){P=O;Q=R;break}else D=R}}while(0);D=v+(u*2096|0)+2092|0;c[D>>2]=Q;do if(!(a[F>>0]|0)){y=ah(f,c[A>>2]<<2)|0;c[v+(u*2096|0)+32>>2]=y;if(!y){x=86;break b}else S=0}else{if(Q){y=ah(f,Q)|0;c[v+(u*2096|0)+8>>2]=y;if(!y){x=89;break b}y=dh(f,c[D>>2]<<2)|0;c[v+(u*2096|0)+32>>2]=y;if(!y){x=91;break b}y=dh(f,c[D>>2]<<2)|0;if(!y){x=93;break b}else T=y}else T=0;y=(c[D>>2]<<3)+(c[A>>2]|0)|0;if(y>>>0<=(c[r>>2]|0)>>>0){S=T;break}c[r>>2]=y;S=T}while(0);fh(w,P,c[A>>2]|0,S);y=c[D>>2]|0;if(y){c[v+(u*2096|0)+2084>>2]=ah(f,(y<<2)+4|0)|0;y=ah(f,(c[D>>2]<<2)+4|0)|0;E=v+(u*2096|0)+2088|0;c[E>>2]=y;if(y){c[E>>2]=y+4;c[y>>2]=-1}gh(w,P,S)}if(a[F>>0]|0){eh(f,S,c[D>>2]<<2);y=v+(u*2096|0)+32|0;eh(f,c[y>>2]|0,c[D>>2]<<2);eh(f,P,c[A>>2]|0);c[y>>2]=0}hh(w);y=$g(f,4)|0;E=v+(u*2096|0)+21|0;a[E>>0]=y;R=y&255;if(R>>>0>2){x=103;break}do if(R){y=v+(u*2096|0)+12|0;g[y>>2]=+ih($g(f,32)|0);z=v+(u*2096|0)+16|0;g[z>>2]=+ih($g(f,32)|0);U=v+(u*2096|0)+20|0;a[U>>0]=($g(f,4)|0)+1;V=v+(u*2096|0)+22|0;a[V>>0]=$g(f,1)|0;W=c[A>>2]|0;X=c[w>>2]|0;if((a[E>>0]|0)==1)c[v+(u*2096|0)+24>>2]=jh(W,X)|0;else c[v+(u*2096|0)+24>>2]=aa(X,W)|0;Y=v+(u*2096|0)+24|0;Z=dh(f,c[Y>>2]<<1)|0;if(!Z){x=110;break b}W=c[Y>>2]|0;if((W|0)>0){X=0;while(1){_=$g(f,d[U>>0]|0)|0;if((_|0)==-1){x=112;break b}b[Z+(X<<1)>>1]=_;X=X+1|0;_=c[Y>>2]|0;if((X|0)>=(_|0)){$=_;break}}}else $=W;do if((a[E>>0]|0)==1){X=(a[F>>0]|0)!=0;if(X){U=c[D>>2]|0;if(!U){x=134;break}c[v+(u*2096|0)+28>>2]=ah(f,aa(U<<2,c[w>>2]|0)|0)|0}else c[v+(u*2096|0)+28>>2]=ah(f,aa(c[A>>2]<<2,c[w>>2]|0)|0)|0;U=v+(u*2096|0)+28|0;if(!(c[U>>2]|0)){x=120;break b}_=c[(X?D:A)>>2]|0;if((_|0)>0){ba=v+(u*2096|0)+2088|0;ca=c[w>>2]|0;da=(ca|0)>0;ea=0;do{if(X)fa=c[(c[ba>>2]|0)+(ea<<2)>>2]|0;else fa=ea;if(da){ga=c[Y>>2]|0;ha=c[U>>2]|0;ia=c[w>>2]|0;ja=ca;ka=1;la=0;while(1){g[ha+((aa(ja,ea)|0)+la<<2)>>2]=+g[y>>2]+ +g[z>>2]*+(e[Z+(((((fa|0)/(ka|0)|0)>>>0)%(ga>>>0)|0)<<1)>>1]|0);ma=aa(ga,ka)|0;na=la+1|0;if((na|0)<(ia|0)){ja=ia;ka=ma;la=na}else break}}ea=ea+1|0}while((ea|0)!=(_|0))}eh(f,Z,c[Y>>2]<<1);a[E>>0]=2}else{_=v+(u*2096|0)+28|0;c[_>>2]=ah(f,$<<2)|0;ea=c[Y>>2]|0;if((ea|0)>0){ca=c[_>>2]|0;_=c[Y>>2]|0;U=0;do{g[ca+(U<<2)>>2]=+g[y>>2]+ +g[z>>2]*+(e[Z+(U<<1)>>1]|0);U=U+1|0}while((U|0)<(_|0));oa=_}else oa=ea;eh(f,Z,oa<<1);x=134}while(0);if((x|0)==134?(x=0,(a[E>>0]|0)!=2):0)break;if(!(a[V>>0]|0))break;if((c[Y>>2]|0)>1){z=c[v+(u*2096|0)+28>>2]|0;y=c[Y>>2]|0;W=1;do{g[z+(W<<2)>>2]=+g[z+(W+ -1<<2)>>2];W=W+1|0}while((W|0)<(y|0))}a[V>>0]=0}while(0);u=u+1|0;if((u|0)>=(c[s>>2]|0))break a}switch(x|0){case 52:{qg(f,20);n=0;i=h;return n|0};case 54:{qg(f,20);n=0;i=h;return n|0};case 56:{qg(f,20);n=0;i=h;return n|0};case 63:{qg(f,3);n=0;i=h;return n|0};case 68:{qg(f,20);n=0;i=h;return n|0};case 86:{qg(f,3);n=0;i=h;return n|0};case 89:{qg(f,3);n=0;i=h;return n|0};case 91:{qg(f,3);n=0;i=h;return n|0};case 93:{qg(f,3);n=0;i=h;return n|0};case 103:{qg(f,20);n=0;i=h;return n|0};case 110:{qg(f,3);n=0;i=h;return n|0};case 112:{eh(f,Z,c[Y>>2]<<1);qg(f,20);n=0;i=h;return n|0};case 120:{eh(f,Z,c[Y>>2]<<1);qg(f,3);n=0;i=h;return n|0}}}while(0);Y=($g(f,6)|0)+1&255;c:do if(Y){Z=0;while(1){Z=Z+1|0;if($g(f,16)|0)break;if((Z|0)>=(Y|0))break c}qg(f,20);n=0;i=h;return n|0}while(0);Y=($g(f,6)|0)+1|0;Z=f+144|0;c[Z>>2]=Y;oa=f+276|0;c[oa>>2]=ah(f,Y*1596|0)|0;do if((c[Z>>2]|0)>0){Y=0;$=0;d:while(1){fa=$g(f,16)|0;b[f+(Y<<1)+148>>1]=fa;F=fa&65535;if(F>>>0>1){x=148;break}if(!F){x=150;break}F=c[oa>>2]|0;fa=$g(f,5)|0;P=F+(Y*1596|0)|0;a[P>>0]=fa;do if(fa&255){S=0;T=-1;do{Q=$g(f,4)|0;a[F+(Y*1596|0)+S+1>>0]=Q;O=Q&255;T=(O|0)>(T|0)?O:T;S=S+1|0}while((S|0)<(d[P>>0]|0));if((T|0)<0)break;else pa=0;while(1){a[F+(Y*1596|0)+pa+33>>0]=($g(f,3)|0)+1;S=($g(f,2)|0)&255;V=F+(Y*1596|0)+pa+49|0;a[V>>0]=S;if(S<<24>>24!=0?(S=$g(f,8)|0,a[F+(Y*1596|0)+pa+65>>0]=S,(S&255|0)>=(c[s>>2]|0)):0){x=159;break d}if((1<<d[V>>0]|0)>0){S=0;do{O=($g(f,8)|0)+65535|0;b[F+(Y*1596|0)+(pa<<4)+(S<<1)+82>>1]=O;S=S+1|0;if((O<<16>>16|0)>=(c[s>>2]|0)){x=162;break d}}while((S|0)<(1<<d[V>>0]|0))}if((pa|0)<(T|0))pa=pa+1|0;else break}}while(0);a[F+(Y*1596|0)+1588>>0]=($g(f,2)|0)+1;fa=F+(Y*1596|0)+1589|0;a[fa>>0]=$g(f,4)|0;T=F+(Y*1596|0)+338|0;b[T>>1]=0;b[F+(Y*1596|0)+340>>1]=1<<d[fa>>0];V=F+(Y*1596|0)+1592|0;c[V>>2]=2;if(a[P>>0]|0){S=0;do{ea=(d[F+(Y*1596|0)+S+1>>0]|0)+(F+(Y*1596|0))+33|0;if(a[ea>>0]|0){O=0;do{Q=($g(f,d[fa>>0]|0)|0)&65535;b[F+(Y*1596|0)+(c[V>>2]<<1)+338>>1]=Q;c[V>>2]=(c[V>>2]|0)+1;O=O+1|0}while((O|0)<(d[ea>>0]|0))}S=S+1|0}while((S|0)<(d[P>>0]|0));P=c[V>>2]|0;if((P|0)<=0)qa=P;else{ra=0;x=169}}else{ra=0;x=169}if((x|0)==169)while(1){x=0;b[k+(ra<<2)>>1]=b[F+(Y*1596|0)+(ra<<1)+338>>1]|0;b[k+(ra<<2)+2>>1]=ra;ra=ra+1|0;P=c[V>>2]|0;if((ra|0)>=(P|0)){qa=P;break}else x=169}Rh(k,qa,4,1);P=c[V>>2]|0;do if((P|0)>0){S=0;do{a[F+(Y*1596|0)+S+838>>0]=b[k+(S<<2)+2>>1];S=S+1|0;sa=c[V>>2]|0}while((S|0)<(sa|0));if((sa|0)>2)ta=2;else{ua=sa;break}do{c[l>>2]=0;c[m>>2]=0;lh(T,ta,l,m);a[F+(Y*1596|0)+(ta<<1)+1088>>0]=c[l>>2];a[F+(Y*1596|0)+(ta<<1)+1089>>0]=c[m>>2];ta=ta+1|0;S=c[V>>2]|0}while((ta|0)<(S|0));ua=S}else ua=P;while(0);$=(ua|0)>($|0)?ua:$;P=Y+1|0;if((P|0)>=(c[Z>>2]|0)){x=175;break}else Y=P}if((x|0)==148){qg(f,20);n=0;i=h;return n|0}else if((x|0)==150){P=c[oa>>2]|0;a[P+(Y*1596|0)>>0]=$g(f,8)|0;b[P+(Y*1596|0)+2>>1]=$g(f,16)|0;b[P+(Y*1596|0)+4>>1]=$g(f,16)|0;a[P+(Y*1596|0)+6>>0]=$g(f,6)|0;a[P+(Y*1596|0)+7>>0]=$g(f,8)|0;V=($g(f,4)|0)+1|0;F=P+(Y*1596|0)+8|0;a[F>>0]=V;if(V&255){V=0;do{a[V+8+(P+(Y*1596|0))+1>>0]=$g(f,8)|0;V=V+1|0}while((V|0)<(d[F>>0]|0))}qg(f,4);n=0;i=h;return n|0}else if((x|0)==159){qg(f,20);n=0;i=h;return n|0}else if((x|0)==162){qg(f,20);n=0;i=h;return n|0}else if((x|0)==175){wa=$<<1;break}}else wa=0;while(0);oa=($g(f,6)|0)+1|0;ua=f+280|0;c[ua>>2]=oa;ta=f+412|0;c[ta>>2]=ah(f,oa*24|0)|0;e:do if((c[ua>>2]|0)>0){oa=0;f:while(1){m=c[ta>>2]|0;l=$g(f,16)|0;b[f+(oa<<1)+284>>1]=l;if((l&65535)>>>0>2){x=179;break}c[m+(oa*24|0)>>2]=$g(f,24)|0;c[m+(oa*24|0)+4>>2]=$g(f,24)|0;c[m+(oa*24|0)+8>>2]=($g(f,24)|0)+1;l=m+(oa*24|0)+12|0;a[l>>0]=($g(f,6)|0)+1;sa=m+(oa*24|0)+13|0;a[sa>>0]=$g(f,8)|0;qa=a[l>>0]|0;if(!(qa<<24>>24))xa=qa&255;else{qa=0;do{ra=$g(f,3)|0;if(!($g(f,1)|0))ya=0;else ya=($g(f,5)|0)<<3&2040;a[k+qa>>0]=ya+ra;qa=qa+1|0;ra=d[l>>0]|0}while((qa|0)<(ra|0));xa=ra}qa=m+(oa*24|0)+20|0;c[qa>>2]=ah(f,xa<<4)|0;if(a[l>>0]|0){ra=0;do{pa=d[k+ra>>0]|0;F=0;do{if(pa&1<<F){V=($g(f,8)|0)&65535;b[(c[qa>>2]|0)+(ra<<4)+(F<<1)>>1]=V;if((b[(c[qa>>2]|0)+(ra<<4)+(F<<1)>>1]|0)>=(c[s>>2]|0)){x=188;break f}}else b[(c[qa>>2]|0)+(ra<<4)+(F<<1)>>1]=-1;F=F+1|0}while((F|0)<8);ra=ra+1|0}while((ra|0)<(d[l>>0]|0))}ra=ah(f,c[(c[j>>2]|0)+((d[sa>>0]|0)*2096|0)+4>>2]<<2)|0;qa=m+(oa*24|0)+16|0;c[qa>>2]=ra;if(!ra){x=193;break}qi(ra|0,0,c[(c[j>>2]|0)+((d[sa>>0]|0)*2096|0)+4>>2]<<2|0)|0;ra=d[sa>>0]|0;F=c[j>>2]|0;if((c[F+(ra*2096|0)+4>>2]|0)>0){pa=F;F=ra;ra=0;do{V=c[pa+(F*2096|0)>>2]|0;Y=ah(f,V)|0;c[(c[qa>>2]|0)+(ra<<2)>>2]=Y;if((V|0)>0){Y=V;V=ra;while(1){Y=Y+ -1|0;a[(c[(c[qa>>2]|0)+(ra<<2)>>2]|0)+Y>>0]=(V|0)%(d[l>>0]|0)|0;if((Y|0)<=0)break;else V=(V|0)/(d[l>>0]|0)|0}}ra=ra+1|0;F=d[sa>>0]|0;pa=c[j>>2]|0}while((ra|0)<(c[pa+(F*2096|0)+4>>2]|0))}oa=oa+1|0;if((oa|0)>=(c[ua>>2]|0))break e}if((x|0)==179){qg(f,20);n=0;i=h;return n|0}else if((x|0)==188){qg(f,20);n=0;i=h;return n|0}else if((x|0)==193){qg(f,3);n=0;i=h;return n|0}}while(0);j=($g(f,6)|0)+1|0;s=f+416|0;c[s>>2]=j;k=f+420|0;c[k>>2]=ah(f,j*40|0)|0;g:do if((c[s>>2]|0)>0){j=0;h:while(1){xa=c[k>>2]|0;ya=xa+(j*40|0)|0;if($g(f,16)|0){x=201;break}oa=xa+(j*40|0)+4|0;c[oa>>2]=ah(f,(c[p>>2]|0)*3|0)|0;if(!($g(f,1)|0))a[xa+(j*40|0)+8>>0]=1;else a[xa+(j*40|0)+8>>0]=($g(f,4)|0)+1;$=xa+(j*40|0)+8|0;do if(!($g(f,1)|0))b[ya>>1]=0;else{F=($g(f,8)|0)+1|0;b[ya>>1]=F;if(!(F&65535))break;else za=0;do{F=($g(f,Qg((c[p>>2]|0)+ -1|0)|0)|0)&255;a[(c[oa>>2]|0)+(za*3|0)>>0]=F;F=($g(f,Qg((c[p>>2]|0)+ -1|0)|0)|0)&255;a[(c[oa>>2]|0)+(za*3|0)+1>>0]=F;F=c[oa>>2]|0;pa=a[F+(za*3|0)>>0]|0;ra=c[p>>2]|0;if((pa&255|0)>=(ra|0)){x=209;break h}sa=a[F+(za*3|0)+1>>0]|0;if((sa&255|0)>=(ra|0)){x=211;break h}za=za+1|0;if(pa<<24>>24==sa<<24>>24){x=213;break h}}while((za|0)<(e[ya>>1]|0))}while(0);if($g(f,2)|0){x=216;break}ya=(c[p>>2]|0)>0;do if((d[$>>0]|0)>1){if(ya)Aa=0;else break;do{sa=($g(f,4)|0)&255;a[(c[oa>>2]|0)+(Aa*3|0)+2>>0]=sa;if((d[(c[oa>>2]|0)+(Aa*3|0)+2>>0]|0)>=(d[$>>0]|0)){x=222;break h}Aa=Aa+1|0}while((Aa|0)<(c[p>>2]|0))}else{if(ya)Ba=0;else break;do{a[(c[oa>>2]|0)+(Ba*3|0)+2>>0]=0;Ba=Ba+1|0}while((Ba|0)<(c[p>>2]|0))}while(0);if(a[$>>0]|0){oa=0;do{$g(f,8)|0;ya=xa+(j*40|0)+oa+9|0;a[ya>>0]=$g(f,8)|0;sa=$g(f,8)|0;a[xa+(j*40|0)+oa+24>>0]=sa;if((d[ya>>0]|0)>=(c[Z>>2]|0)){x=227;break h}oa=oa+1|0;if((sa&255|0)>=(c[ua>>2]|0)){x=229;break h}}while((oa|0)<(d[$>>0]|0))}j=j+1|0;if((j|0)>=(c[s>>2]|0))break g}if((x|0)==201){qg(f,20);n=0;i=h;return n|0}else if((x|0)==209){qg(f,20);n=0;i=h;return n|0}else if((x|0)==211){qg(f,20);n=0;i=h;return n|0}else if((x|0)==213){qg(f,20);n=0;i=h;return n|0}else if((x|0)==216){qg(f,20);n=0;i=h;return n|0}else if((x|0)==222){qg(f,20);n=0;i=h;return n|0}else if((x|0)==227){qg(f,20);n=0;i=h;return n|0}else if((x|0)==229){qg(f,20);n=0;i=h;return n|0}}while(0);Z=($g(f,6)|0)+1|0;Ba=f+424|0;c[Ba>>2]=Z;i:do if((Z|0)>0){Aa=0;while(1){a[f+(Aa*6|0)+428>>0]=$g(f,1)|0;za=f+(Aa*6|0)+430|0;b[za>>1]=$g(f,16)|0;k=f+(Aa*6|0)+432|0;b[k>>1]=$g(f,16)|0;j=$g(f,8)|0;a[f+(Aa*6|0)+429>>0]=j;if(b[za>>1]|0){x=234;break}if(b[k>>1]|0){x=236;break}Aa=Aa+1|0;if((j&255|0)>=(c[s>>2]|0)){x=238;break}if((Aa|0)>=(c[Ba>>2]|0))break i}if((x|0)==234){qg(f,20);n=0;i=h;return n|0}else if((x|0)==236){qg(f,20);n=0;i=h;return n|0}else if((x|0)==238){qg(f,20);n=0;i=h;return n|0}}while(0);Tg(f);c[f+1008>>2]=0;if((c[p>>2]|0)>0){x=0;do{c[f+(x<<2)+816>>2]=ah(f,c[t>>2]<<2)|0;c[f+(x<<2)+944>>2]=ah(f,c[t>>2]<<1&2147483646)|0;c[f+(x<<2)+1012>>2]=ah(f,wa)|0;x=x+1|0}while((x|0)<(c[p>>2]|0))}if(!(mh(f,0,c[q>>2]|0)|0)){n=0;i=h;return n|0}if(!(mh(f,1,c[t>>2]|0)|0)){n=0;i=h;return n|0}c[f+120>>2]=c[q>>2];c[f+124>>2]=c[t>>2];q=c[t>>2]<<1&2147483646;if((c[ua>>2]|0)>0){t=c[ta>>2]|0;ta=c[ua>>2]|0;ua=0;x=0;do{wa=(((c[t+(ua*24|0)+4>>2]|0)-(c[t+(ua*24|0)>>2]|0)|0)>>>0)/((c[t+(ua*24|0)+8>>2]|0)>>>0)|0;x=(wa|0)>(x|0)?wa:x;ua=ua+1|0}while((ua|0)<(ta|0));Ca=(x<<2)+4|0}else Ca=4;x=aa(c[p>>2]|0,Ca)|0;Ca=f+12|0;c[Ca>>2]=q>>>0>x>>>0?q:x;a[f+1393>>0]=1;do if(c[f+96>>2]|0){x=c[f+108>>2]|0;if((x|0)!=(c[f+100>>2]|0))va(13848,12536,3735,13904);if(((c[f+104>>2]|0)+1528+(c[Ca>>2]|0)|0)>>>0<=x>>>0)break;qg(f,3);n=0;i=h;return n|0}while(0);c[f+52>>2]=yg(f)|0;n=1;i=h;return n|0}function xg(a){a=a|0;var b=0,c=0;b=i;c=ah(a,1528)|0;i=b;return c|0}function yg(b){b=b|0;var d=0,e=0,f=0,g=0;d=i;if(a[b+48>>0]|0){e=0;i=d;return e|0}f=c[b+32>>2]|0;if(!f){g=Aa(c[b+20>>2]|0)|0;e=g-(c[b+24>>2]|0)|0;i=d;return e|0}else{e=f-(c[b+36>>2]|0)|0;i=d;return e|0}return 0}function zg(b){b=b|0;var d=0;d=i;if(!(a[b+48>>0]|0)){Ag(b,c[b+52>>2]|0);c[b+1008>>2]=0;a[b+1393>>0]=1;c[b+1396>>2]=-1;Bg(b);i=d;return}else{qg(b,2);i=d;return}}function Ag(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;if(a[b+48>>0]|0){i=e;return}f=b+112|0;c[f>>2]=0;g=b+32|0;if(c[g>>2]|0){h=(c[b+36>>2]|0)+d|0;j=c[b+40>>2]|0;if(h>>>0>=j>>>0|(d|0)<0){c[g>>2]=j;c[f>>2]=1;i=e;return}else{c[g>>2]=h;i=e;return}}h=b+24|0;g=(c[h>>2]|0)+d|0;if(g>>>0<d>>>0|(d|0)<0){c[f>>2]=1;k=2147483647}else k=g;g=b+20|0;if(!(Tb(c[g>>2]|0,k|0,0)|0)){i=e;return}c[f>>2]=1;Tb(c[g>>2]|0,c[h>>2]|0,2)|0;i=e;return}function Bg(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+8|0;e=b;f=b+4|0;if(!(sg(a,d,f,e)|0)){i=b;return}ug(a,c[d>>2]|0,c[f>>2]|0,c[e>>2]|0)|0;i=b;return}function Cg(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;d=i;i=i+16|0;e=d+4|0;f=d;g=d+8|0;if(a[b+48>>0]|0){qg(b,2);h=0;i=d;return h|0}j=b+812|0;if(!(c[j>>2]|0)){k=yg(b)|0;l=c[b+44>>2]|0;if(l>>>0>65535?(m=l+ -65536|0,m>>>0>=(c[b+52>>2]|0)>>>0):0)n=m;else n=c[b+52>>2]|0;Ag(b,n);do if(Dg(b,e,f)|0){m=yg(b)|0;a:do if(!(c[f>>2]|0)){l=m;o=n;while(1){Ag(b,c[e>>2]|0);if(!(Dg(b,e,f)|0)){p=l;q=o;break a}r=l+1|0;s=yg(b)|0;if(!(c[f>>2]|0)){l=s;o=r}else{p=s;q=r;break}}}else{p=m;q=n}while(0);Ag(b,p);Eg(b,g,6)|0;m=Fg(b)|0;o=Fg(b)|0;if((m|0)==-1&(o|0)==-1){c[b+116>>2]=36;c[j>>2]=-1;break}else{l=(o|0)==0?m:-2;c[j>>2]=l;c[b+76>>2]=p;c[b+80>>2]=c[e>>2];c[b+92>>2]=l;c[b+88>>2]=-1;c[b+84>>2]=q;break}}else{c[b+116>>2]=36;c[j>>2]=-1}while(0);Ag(b,k)}k=c[j>>2]|0;h=(k|0)==-1?0:k;i=d;return h|0}function Dg(e,f,g){e=e|0;f=f|0;g=g|0;var h=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,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;h=i;i=i+32|0;j=h;k=e+112|0;if(c[k>>2]|0){l=0;i=h;return l|0}m=e+44|0;n=j+4|0;o=j+22|0;p=j+23|0;q=j+24|0;r=j+25|0;s=j+26|0;t=j+22|0;while(1){if((Og(e)|0)<<24>>24==79){u=yg(e)|0;if((u+ -25|0)>>>0>(c[m>>2]|0)>>>0){l=0;v=32;break}else w=1;while(1){x=Og(e)|0;y=w+1|0;if(x<<24>>24!=(a[12640+w>>0]|0)){z=w;break}if((y|0)<4)w=y;else{z=y;break}}if(c[k>>2]|0){l=0;v=32;break}if((z|0)==4){c[j>>2]=c[3160];y=4;do{a[j+y>>0]=Og(e)|0;y=y+1|0}while((y|0)!=27);if(c[k>>2]|0){l=0;v=32;break}if(!(a[n>>0]|0)){y=a[o>>0]|0;x=a[p>>0]|0;A=a[q>>0]|0;B=d[r>>0]<<24;b[t>>1]=0;b[t+2>>1]=0>>>16;C=(x&255)<<8|y&255|(A&255)<<16;A=0;y=0;do{A=Pg(A,a[j+y>>0]|0)|0;y=y+1|0}while((y|0)!=27);y=C|B;if(a[s>>0]|0){x=d[s>>0]|0;D=A;E=0;F=0;do{G=Og(e)|0;D=Pg(D,G)|0;F=(G&255)+F|0;E=E+1|0}while(E>>>0<x>>>0);if(F){if(c[k>>2]|0){l=0;v=32;break}if(F){x=D;E=0;while(1){B=Pg(x,Og(e)|0)|0;E=E+1|0;if((E|0)==(F|0)){H=B;break}else x=B}}else H=D}else H=D}else H=A;if((H|0)==(y|0)){v=23;break}}}Ag(e,u)}if(c[k>>2]|0){l=0;v=32;break}}if((v|0)==23){if(f)c[f>>2]=yg(e)|0;do if(g)if(!(a[j+5>>0]&4)){c[g>>2]=0;break}else{c[g>>2]=1;break}while(0);Ag(e,u+ -1|0);l=1;i=h;return l|0}else if((v|0)==32){i=h;return l|0}return 0}function Eg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;f=a+32|0;g=c[f>>2]|0;if(!g){if((ra(b|0,d|0,1,c[a+20>>2]|0)|0)==1){h=1;i=e;return h|0}c[a+112>>2]=1;h=0;i=e;return h|0}if((g+d|0)>>>0>(c[a+40>>2]|0)>>>0){c[a+112>>2]=1;h=0;i=e;return h|0}else{oi(b|0,g|0,d|0)|0;c[f>>2]=(c[f>>2]|0)+d;h=1;i=e;return h|0}return 0}function Fg(a){a=a|0;var b=0,c=0,d=0;b=i;c=(Og(a)|0)&255;d=((Og(a)|0)&255)<<8|c;c=d|((Og(a)|0)&255)<<16;d=c|((Og(a)|0)&255)<<24;i=b;return d|0}function Gg(a){a=a|0;var b=0,d=0.0;b=i;d=+((Cg(a)|0)>>>0);i=b;return+(d/+((c[a>>2]|0)>>>0))}function Hg(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;i=i+16|0;g=f+8|0;h=f;j=f+4|0;if(a[b+48>>0]|0){qg(b,2);k=0;i=f;return k|0}if(!(sg(b,g,j,h)|0)){c[b+1524>>2]=0;c[b+1520>>2]=0;k=0;i=f;return k|0}c[g>>2]=ug(b,c[g>>2]|0,c[j>>2]|0,c[h>>2]|0)|0;h=b+4|0;if((c[h>>2]|0)>0){l=c[j>>2]|0;m=0;do{c[b+(m<<2)+880>>2]=(c[b+(m<<2)+816>>2]|0)+(l<<2);m=m+1|0}while((m|0)<(c[h>>2]|0))}c[b+1520>>2]=c[j>>2];c[b+1524>>2]=(c[g>>2]|0)+(c[j>>2]|0);if(d)c[d>>2]=c[h>>2];if(e)c[e>>2]=b+880;k=c[g>>2]|0;i=f;return k|0}function Ig(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0;g=i;i=i+1536|0;h=g;vg(h,e);c[h+20>>2]=a;c[h+24>>2]=Aa(a|0)|0;c[h+44>>2]=f;c[h+28>>2]=b;if((wg(h)|0)!=0?(b=xg(h)|0,(b|0)!=0):0){oi(b|0,h|0,1528)|0;Bg(b);j=b;i=g;return j|0}if(d)c[d>>2]=c[h+116>>2];ng(h);j=0;i=g;return j|0}function Jg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=i;f=Aa(a|0)|0;Tb(a|0,0,2)|0;g=(Aa(a|0)|0)-f|0;Tb(a|0,f|0,0)|0;f=Ig(a,b,c,d,g)|0;i=e;return f|0}function Kg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=i;f=ic(a|0,12512)|0;if(!f)if(!b)g=0;else{c[b>>2]=6;g=0}else g=Jg(f,1,b,d)|0;i=e;return g|0}function Lg(a,d,e,f,h,j){a=a|0;d=d|0;e=e|0;f=f|0;h=h|0;j=j|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;l=i;if((a|0)!=(e|0)&(a|0)<3&(e|0)<7){if((a|0)==2)m=0;else va(12520,12536,4817,12552);do{Ng(d,e,f,h,j);m=m+1|0}while((m|0)!=(a|0));i=l;return}if((j|0)<=0){i=l;return}m=(((a|0)<(e|0)?a:e)|0)>0;n=~e;e=~a;o=~((n|0)>(e|0)?n:e);e=d;d=0;while(1){if(m){n=d+h|0;p=e;q=0;while(1){r=(g[k>>2]=+g[(c[f+(q<<2)>>2]|0)+(n<<2)>>2]+384.0,c[k>>2]|0);s=r+ -1136656384|0;if((r+ -1136623616|0)>>>0>65535)t=(s>>31&-65535)+32767|0;else t=s;b[p>>1]=t;q=q+1|0;if((q|0)==(o|0))break;else p=p+2|0}u=e+(o<<1)|0;v=o}else{u=e;v=0}if((v|0)<(a|0)){qi(u|0,0,a-v<<1|0)|0;w=u+(a-v<<1)|0}else w=u;d=d+1|0;if((d|0)==(j|0))break;else e=w}i=l;return}function Mg(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f=i;i=i+16|0;g=f;h=(e|0)/(b|0)|0;e=a+4|0;j=a+1524|0;k=a+1520|0;l=a+816|0;m=d;d=0;while(1){if((d|0)>=(h|0)){n=d;o=7;break}p=c[k>>2]|0;q=(c[j>>2]|0)-p|0;r=(q+d|0)<(h|0)?q:h-d|0;if(r)Lg(b,m,c[e>>2]|0,l,p,r);p=r+d|0;c[k>>2]=(c[k>>2]|0)+r;if((p|0)==(h|0)){n=p;o=7;break}m=m+((aa(r,b)|0)<<1)|0;if(!(Hg(a,0,g)|0)){n=p;o=7;break}else d=p}if((o|0)==7){i=f;return n|0}return 0}function Ng(a,e,f,h,j){a=a|0;e=e|0;f=f|0;h=h|0;j=j|0;var 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,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;l=i;i=i+128|0;m=l;if((j|0)<=0){i=l;return}n=(e|0)>0;o=~j;p=-1;q=16;r=0;while(1){s=r<<1;t=m+0|0;u=t+128|0;do{c[t>>2]=0;t=t+4|0}while((t|0)<(u|0));t=q;q=(r+q|0)>(j|0)?j-r|0:q;if(n){u=(q|0)>0;v=r+h|0;w=(q|0)>0;x=r+h|0;y=(q|0)>0;z=r+h|0;A=p-t|0;B=p-((A|0)>(o|0)?A:o)|0;A=p-t|0;C=p-((A|0)>(o|0)?A:o)|0;A=p-t|0;D=p-((A|0)>(o|0)?A:o)|0;A=0;do{E=(d[12592+(e*6|0)+A>>0]|0)&6;if((E|0)==4){if(u){F=c[f+(A<<2)>>2]|0;G=0;do{H=m+((G<<1|1)<<2)|0;g[H>>2]=+g[F+(v+G<<2)>>2]+ +g[H>>2];G=G+1|0}while((G|0)!=(B|0))}}else if((E|0)==2){if(w){G=c[f+(A<<2)>>2]|0;F=0;do{H=m+(F<<1<<2)|0;g[H>>2]=+g[G+(x+F<<2)>>2]+ +g[H>>2];F=F+1|0}while((F|0)!=(C|0))}}else if((E|0)==6?y:0){F=c[f+(A<<2)>>2]|0;G=0;do{H=z+G|0;I=G<<1;J=m+(I<<2)|0;g[J>>2]=+g[F+(H<<2)>>2]+ +g[J>>2];J=m+((I|1)<<2)|0;g[J>>2]=+g[F+(H<<2)>>2]+ +g[J>>2];G=G+1|0}while((G|0)!=(D|0))}A=A+1|0}while((A|0)!=(e|0))}if((q<<1|0)>0){A=p-t|0;D=p-((A|0)>(o|0)?A:o)<<1;A=0;do{z=(g[k>>2]=+g[m+(A<<2)>>2]+384.0,c[k>>2]|0);y=z+ -1136656384|0;if((z+ -1136623616|0)>>>0>65535)K=(y>>31&-65535)+32767|0;else K=y;b[a+(A+s<<1)>>1]=K;A=A+1|0}while((A|0)!=(D|0))}r=r+16|0;if((r|0)>=(j|0))break;else p=p+ -16|0}i=l;return}function Og(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;e=b+32|0;f=c[e>>2]|0;do if(!f){g=Fc(c[b+20>>2]|0)|0;if((g|0)==-1){c[b+112>>2]=1;h=0;break}else{h=g&255;break}}else if(f>>>0<(c[b+40>>2]|0)>>>0){c[e>>2]=f+1;h=a[f>>0]|0;break}else{c[b+112>>2]=1;h=0;break}while(0);i=d;return h|0}function Pg(a,b){a=a|0;b=b|0;return c[12648+((b&255^a>>>24)<<2)>>2]^a<<8|0}function Qg(b){b=b|0;var c=0,d=0;c=i;do if((b|0)<16384){if((b|0)<16){d=a[13672+b>>0]|0;break}if((b|0)<512){d=(a[13672+(b>>5)>>0]|0)+5|0;break}else{d=(a[13672+(b>>10)>>0]|0)+10|0;break}}else{if((b|0)>=16777216){if((b|0)>=536870912){d=0;break}d=(a[13672+(b>>25)>>0]|0)+25|0;break}if((b|0)<524288){d=(a[13672+(b>>15)>>0]|0)+15|0;break}else{d=(a[13672+(b>>20)>>0]|0)+20|0;break}}while(0);i=c;return d|0}function Rg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;e=a+32|0;f=c[e>>2]|0;if(!f){g=a+20|0;h=Aa(c[g>>2]|0)|0;Tb(c[g>>2]|0,h+b|0,0)|0;i=d;return}h=f+b|0;c[e>>2]=h;if(h>>>0<(c[a+40>>2]|0)>>>0){i=d;return}c[a+112>>2]=1;i=d;return}function Sg(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;j=i;c[b+1524>>2]=0;c[b+1520>>2]=0;k=b+112|0;if(c[k>>2]|0){l=0;i=j;return l|0}m=b+48|0;while(1){if(!(Ug(b)|0)){l=0;n=24;break}if(!($g(b,1)|0)){n=9;break}if(a[m>>0]|0){n=7;break}do{}while((tg(b)|0)!=-1);if(c[k>>2]|0){l=0;n=24;break}}if((n|0)==7){qg(b,35);l=0;i=j;return l|0}else if((n|0)==9){if((c[b+96>>2]|0)!=0?(c[b+100>>2]|0)!=(c[b+108>>2]|0):0)va(13768,12536,2796,13824);k=b+424|0;m=$g(b,Qg((c[k>>2]|0)+ -1|0)|0)|0;if((m|0)==-1){l=0;i=j;return l|0}if((m|0)>=(c[k>>2]|0)){l=0;i=j;return l|0}c[h>>2]=m;h=b+(m*6|0)+428|0;if(!(a[h>>0]|0)){o=c[b+128>>2]|0;p=0;q=1}else{m=c[b+132>>2]|0;k=$g(b,1)|0;o=m;p=$g(b,1)|0;q=(k|0)==0}k=o>>1;if((a[h>>0]|0)!=0&q){q=b+128|0;c[d>>2]=o-(c[q>>2]|0)>>2;r=(c[q>>2]|0)+o>>2}else{c[d>>2]=0;r=k}c[e>>2]=r;if((a[h>>0]|0)!=0&(p|0)==0){p=o*3|0;h=b+128|0;c[f>>2]=p-(c[h>>2]|0)>>2;s=(c[h>>2]|0)+p>>2}else{c[f>>2]=k;s=o}c[g>>2]=s;l=1;i=j;return l|0}else if((n|0)==24){i=j;return l|0}return 0}function Tg(a){a=a|0;var b=0;b=i;do{}while((Zg(a)|0)!=-1);i=b;return}function Ug(b){b=b|0;var d=0,e=0,f=0,g=0;d=i;do if((c[b+1396>>2]|0)==-1){e=Og(b)|0;if(!(c[b+112>>2]|0)){if(e<<24>>24!=79){qg(b,30);f=0;break}if((Og(b)|0)<<24>>24!=103){qg(b,30);f=0;break}if((Og(b)|0)<<24>>24!=103){qg(b,30);f=0;break}if((Og(b)|0)<<24>>24!=83){qg(b,30);f=0;break}if(Vg(b)|0)if(!(a[b+1391>>0]&1))g=14;else{c[b+1400>>2]=0;a[b+1392>>0]=0;qg(b,32);f=0}else f=0}else f=0}else g=14;while(0);if((g|0)==14)f=Wg(b)|0;i=d;return f|0}function Vg(b){b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;e=i;if((Og(b)|0)<<24>>24){qg(b,31);f=0;i=e;return f|0}a[b+1391>>0]=Og(b)|0;g=Fg(b)|0;h=Fg(b)|0;Fg(b)|0;c[b+1128>>2]=Fg(b)|0;Fg(b)|0;j=(Og(b)|0)&255;k=b+1132|0;c[k>>2]=j;if(!(Eg(b,b+1136|0,j)|0)){qg(b,10);f=0;i=e;return f|0}j=b+1420|0;c[j>>2]=-2;a:do if(!((g|0)==-1&(h|0)==-1)){l=c[k>>2]|0;do{m=l;l=l+ -1|0;if((m|0)<=0)break a}while((a[b+l+1136>>0]|0)==-1);c[j>>2]=l;c[b+1424>>2]=g}while(0);if(a[b+1393>>0]|0){j=c[k>>2]|0;if((j|0)>0){h=c[k>>2]|0;k=0;m=0;do{m=(d[b+k+1136>>0]|0)+m|0;k=k+1|0}while((k|0)<(h|0));n=h;o=m+27|0}else{n=j;o=27}j=c[b+52>>2]|0;c[b+56>>2]=j;c[b+60>>2]=o+n+j;c[b+64>>2]=j;c[b+68>>2]=0;c[b+72>>2]=g}c[b+1396>>2]=0;f=1;i=e;return f|0}function Wg(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;e=b+1396|0;f=b+1391|0;while(1){if((c[e>>2]|0)!=-1){g=6;break}if(!(Xg(b)|0)){h=0;g=7;break}if(a[f>>0]&1){g=5;break}}if((g|0)==5){qg(b,32);h=0;i=d;return h|0}else if((g|0)==6){c[b+1400>>2]=0;c[b+1412>>2]=0;c[b+1416>>2]=0;a[b+1392>>0]=0;h=1;i=d;return h|0}else if((g|0)==7){i=d;return h|0}return 0}function Xg(a){a=a|0;var b=0,c=0;b=i;if(!(Yg(a)|0)){qg(a,30);c=0}else c=Vg(a)|0;i=b;return c|0}function Yg(a){a=a|0;var b=0,c=0;b=i;if(((Og(a)|0)<<24>>24==79?(Og(a)|0)<<24>>24==103:0)?(Og(a)|0)<<24>>24==103:0)c=(Og(a)|0)<<24>>24==83&1;else c=0;i=b;return c|0}function Zg(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;e=b+1392|0;f=a[e>>0]|0;if(!(f<<24>>24)){if(c[b+1400>>2]|0){g=-1;i=d;return g|0}if(!(_g(b)|0)){g=-1;i=d;return g|0}h=a[e>>0]|0;if(!(h<<24>>24))va(13688,12536,1130,13712);else j=h}else j=f;a[e>>0]=j+ -1<<24>>24;j=b+1416|0;c[j>>2]=(c[j>>2]|0)+1;g=(Og(b)|0)&255;i=d;return g|0}function _g(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;e=b+1400|0;if(c[e>>2]|0){f=0;i=d;return f|0}g=b+1396|0;if((c[g>>2]|0)==-1){c[b+1404>>2]=(c[b+1132>>2]|0)+ -1;if(!(Xg(b)|0)){c[e>>2]=1;f=0;i=d;return f|0}if(!(a[b+1391>>0]&1)){qg(b,32);f=0;i=d;return f|0}}h=c[g>>2]|0;c[g>>2]=h+1;j=a[b+h+1136>>0]|0;if(j<<24>>24!=-1){c[e>>2]=1;c[b+1404>>2]=(c[g>>2]|0)+ -1}if((c[g>>2]|0)>=(c[b+1132>>2]|0))c[g>>2]=-1;g=b+1392|0;if(a[g>>0]|0)va(13728,12536,1116,13752);a[g>>0]=j;f=j&255;i=d;return f|0}function $g(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;e=a+1412|0;f=c[e>>2]|0;if((f|0)<0){g=0;i=d;return g|0}a:do if((f|0)<(b|0)){if((b|0)>24){h=$g(a,24)|0;j=(($g(a,b+ -24|0)|0)<<24)+h|0;i=d;return j|0}if(!f)c[a+1408>>2]=0;j=c[e>>2]|0;if((j|0)<(b|0)){h=a+1408|0;while(1){k=Zg(a)|0;if((k|0)==-1)break;c[h>>2]=(c[h>>2]|0)+(k<<c[e>>2]);k=(c[e>>2]|0)+8|0;c[e>>2]=k;if((k|0)>=(b|0)){l=k;break a}}c[e>>2]=-1;g=0;i=d;return g|0}else l=j}else l=c[e>>2]|0;while(0);if((l|0)<0){g=0;i=d;return g|0}l=a+1408|0;a=c[l>>2]|0;c[l>>2]=a>>>b;c[e>>2]=(c[e>>2]|0)-b;g=a&(1<<b)+ -1;i=d;return g|0}function ah(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;e=b+3&-4;b=a+8|0;c[b>>2]=(c[b>>2]|0)+e;b=c[a+96>>2]|0;if(!b)if(!e)f=0;else f=Vh(e)|0;else{g=a+104|0;h=c[g>>2]|0;j=h+e|0;if((j|0)>(c[a+108>>2]|0))f=0;else{c[g>>2]=j;f=b+h|0}}i=d;return f|0}function bh(a){a=a|0;var b=0,c=0;b=i;c=(ki(a,14208,6)|0)==0&1;i=b;return c|0}function ch(){var a=0,b=0,d=0,e=0,f=0;a=i;b=0;do{d=b<<25;e=(b<<24>>31&79764919^d)<<1;f=(d>>31&79764919^e)<<1;d=(e>>31&79764919^f)<<1;e=(f>>31&79764919^d)<<1;f=(d>>31&79764919^e)<<1;d=(e>>31&79764919^f)<<1;c[12648+(b<<2)>>2]=d>>31&79764919^(f>>31&79764919^d)<<1;b=b+1|0}while((b|0)!=256);i=a;return}function dh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;e=b+3&-4;b=a+96|0;if(!(c[b>>2]|0)){f=Vh(e)|0;i=d;return f|0}g=a+108|0;h=(c[g>>2]|0)-e|0;if((h|0)<(c[a+104>>2]|0)){f=0;i=d;return f|0}c[g>>2]=h;f=(c[b>>2]|0)+h|0;i=d;return f|0}function eh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=i;if(!(c[a+96>>2]|0)){Wh(b);i=e;return}else{b=a+108|0;c[b>>2]=(c[b>>2]|0)+(d+3&-4);i=e;return}}function fh(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=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;h=i;i=i+128|0;j=h;k=j+0|0;l=k+128|0;do{c[k>>2]=0;k=k+4|0}while((k|0)<(l|0));a:do if((f|0)>0){k=0;while(1){l=k+1|0;if((a[e+k>>0]|0)!=-1){m=k;break a}if((l|0)<(f|0))k=l;else{m=l;break}}}else m=0;while(0);if((m|0)==(f|0))if(!(c[b+2092>>2]|0)){i=h;return}else va(14128,12536,657,14152);k=e+m|0;uh(b,0,m,0,d[k>>0]|0,g);if(!(a[k>>0]|0)){n=m;o=1}else{l=d[k>>0]|0;k=1;while(1){c[j+(k<<2)>>2]=1<<32-k;if((k|0)<(l|0))k=k+1|0;else{n=m;o=1;break}}}b:while(1){m=n;while(1){p=m+1|0;if((p|0)>=(f|0)){q=21;break b}r=e+p|0;k=a[r>>0]|0;l=k&255;if(!(k<<24>>24)){s=l;q=15;break}else if(k<<24>>24==-1)m=p;else{t=l;q=14;break}}c:do if((q|0)==14)while(1){q=0;m=t+ -1|0;if(c[j+(t<<2)>>2]|0){u=t;break c}if((m|0)>0){t=m;q=14}else{s=m;q=15;break}}while(0);if((q|0)==15){q=0;if(!s){q=16;break}else u=s}m=j+(u<<2)|0;l=c[m>>2]|0;c[m>>2]=0;m=qh(l)|0;k=o+1|0;uh(b,m,p,o,d[r>>0]|0,g);m=d[r>>0]|0;if((m|0)>(u|0))v=m;else{n=p;o=k;continue}while(1){m=j+(v<<2)|0;if(c[m>>2]|0){q=19;break b}c[m>>2]=(1<<32-v)+l;m=v+ -1|0;if((m|0)>(u|0))v=m;else{n=p;o=k;continue b}}}if((q|0)==16)va(14176,12536,678,14152);else if((q|0)==19)va(14184,12536,685,14152);else if((q|0)==21){i=h;return}}function gh(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=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,z=0,A=0,B=0;f=i;g=b+23|0;if(!(a[g>>0]|0)){h=b+4|0;if((c[h>>2]|0)>0){j=b+32|0;k=b+2084|0;l=0;m=0;while(1){if(!(sh(b,a[d+l>>0]|0)|0))n=m;else{o=qh(c[(c[j>>2]|0)+(l<<2)>>2]|0)|0;c[(c[k>>2]|0)+(m<<2)>>2]=o;n=m+1|0}l=l+1|0;if((l|0)>=(c[h>>2]|0)){p=n;break}else m=n}}else p=0;if((p|0)!=(c[b+2092>>2]|0))va(14016,12536,752,14040)}else{p=b+2092|0;if((c[p>>2]|0)>0){n=c[b+32>>2]|0;m=c[b+2084>>2]|0;h=0;do{c[m+(h<<2)>>2]=qh(c[n+(h<<2)>>2]|0)|0;h=h+1|0}while((h|0)<(c[p>>2]|0))}}p=b+2084|0;h=b+2092|0;Rh(c[p>>2]|0,c[h>>2]|0,4,2);c[(c[p>>2]|0)+(c[h>>2]<<2)>>2]=-1;n=c[((a[g>>0]|0)==0?b+4|0:h)>>2]|0;if((n|0)<=0){i=f;return}m=b+32|0;l=b+2088|0;k=b+2088|0;j=b+8|0;o=0;a:while(1){if(!(a[g>>0]|0))q=o;else q=c[e+(o<<2)>>2]|0;r=a[d+q>>0]|0;do if(sh(b,r)|0){s=qh(c[(c[m>>2]|0)+(o<<2)>>2]|0)|0;t=c[h>>2]|0;if((t|0)>1){u=c[p>>2]|0;v=t;t=0;while(1){w=v>>1;x=w+t|0;y=(c[u+(x<<2)>>2]|0)>>>0>s>>>0;z=y?t:x;v=y?w:v-w|0;if((v|0)<=1){A=z;break}else t=z}}else A=0;if((c[(c[p>>2]|0)+(A<<2)>>2]|0)!=(s|0)){B=21;break a}if(!(a[g>>0]|0)){c[(c[l>>2]|0)+(A<<2)>>2]=o;break}else{c[(c[k>>2]|0)+(A<<2)>>2]=c[e+(o<<2)>>2];a[(c[j>>2]|0)+A>>0]=r;break}}while(0);o=o+1|0;if((o|0)>=(n|0)){B=26;break}}if((B|0)==21)va(14064,12536,782,14040);else if((B|0)==26){i=f;return}}function hh(e){e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=i;qi(e+36|0,-1,2048)|0;g=e+23|0;h=c[((a[g>>0]|0)==0?e+4|0:e+2092|0)>>2]|0;if((h|0)<=0){i=f;return}j=e+8|0;k=e+32|0;l=e+2084|0;m=(h|0)<32767?h:32767;h=0;do{if((d[(c[j>>2]|0)+h>>0]|0)<11){if(!(a[g>>0]|0))n=c[(c[k>>2]|0)+(h<<2)>>2]|0;else n=qh(c[(c[l>>2]|0)+(h<<2)>>2]|0)|0;if(n>>>0<1024){o=h&65535;p=n;do{b[e+(p<<1)+36>>1]=o;p=(1<<d[(c[j>>2]|0)+h>>0])+p|0}while(p>>>0<1024)}}h=h+1|0}while((h|0)!=(m|0));i=f;return}function ih(a){a=a|0;var b=0,c=0.0,d=0.0;b=i;c=+((a&2097151)>>>0);if((a|0)<0)d=-c;else d=c;c=+Qh(d,(a>>>21&1023)+ -788|0);i=b;return+c}function jh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0.0,f=0.0;c=i;d=~~+O(+(+Z(+(+_(+(+(a|0)))/+(b|0)))));e=+(b|0);b=((~~+O(+(+R(+(+(d|0)+1.0),+e)))|0)<=(a|0)&1)+d|0;f=+(b|0);if(!(+R(+(f+1.0),+e)>+(a|0)))va(13920,12536,807,13952);if((~~+O(+(+R(+f,+e)))|0)>(a|0))va(13968,12536,808,13952);else{i=c;return b|0}return 0}function kh(a,c){a=a|0;c=c|0;var d=0,e=0;d=b[a>>1]|0;a=b[c>>1]|0;if((d&65535)<(a&65535))e=-1;else e=(d&65535)>(a&65535)&1;return e|0}function lh(a,d,f,g){a=a|0;d=d|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;h=i;if((d|0)<=0){i=h;return}j=a+(d<<1)|0;k=a+(d<<1)|0;l=65536;m=0;n=-1;while(1){o=a+(m<<1)|0;p=b[o>>1]|0;if((p&65535|0)>(n|0)?(p&65535)<(e[j>>1]|0):0){c[f>>2]=m;q=e[o>>1]|0}else q=n;p=b[o>>1]|0;if((p&65535|0)<(l|0)?(p&65535)>(e[k>>1]|0):0){c[g>>2]=m;r=e[o>>1]|0}else r=l;m=m+1|0;if((m|0)==(d|0))break;else{l=r;n=q}}i=h;return}function mh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;f=d>>3;g=d>>>1<<2;h=a+(b<<2)+1084|0;c[h>>2]=ah(a,g)|0;j=a+(b<<2)+1092|0;c[j>>2]=ah(a,g)|0;k=ah(a,d&-4)|0;c[a+(b<<2)+1100>>2]=k;l=c[h>>2]|0;if((l|0)!=0?(h=c[j>>2]|0,!((h|0)==0|(k|0)==0)):0){nh(d,l,h,k);k=ah(a,g)|0;c[a+(b<<2)+1108>>2]=k;if(!k){qg(a,3);m=0;i=e;return m|0}oh(d,k);k=ah(a,f<<1)|0;c[a+(b<<2)+1116>>2]=k;if(!k){qg(a,3);m=0;i=e;return m|0}else{ph(d,k);m=1;i=e;return m|0}}qg(a,3);m=0;i=e;return m|0}function nh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,h=0,j=0.0,k=0,l=0,m=0.0,n=0;e=i;f=a>>2;h=a>>3;if((f|0)>0){j=+(a|0);k=0;l=0;while(1){m=+(k<<2|0)*3.1415927410125732/j;g[b+(l<<2)>>2]=+S(+m);n=l|1;g[b+(n<<2)>>2]=-+T(+m);m=+(n|0)*3.1415927410125732/j*.5;g[c+(l<<2)>>2]=+S(+m)*.5;g[c+(n<<2)>>2]=+T(+m)*.5;k=k+1|0;if((k|0)==(f|0))break;else l=l+2|0}}if((h|0)<=0){i=e;return}j=+(a|0);a=0;l=0;while(1){f=l|1;m=+(f<<1|0)*3.1415927410125732/j;g[d+(l<<2)>>2]=+S(+m);g[d+(f<<2)>>2]=-+T(+m);a=a+1|0;if((a|0)==(h|0))break;else l=l+2|0}i=e;return}function oh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0.0;c=i;d=a>>1;if((d|0)<=0){i=c;return}e=+(d|0);a=0;do{g[b+(a<<2)>>2]=+T(+(+rh(+T(+((+(a|0)+.5)/e*.5*3.1415927410125732)))*1.5707963705062866));a=a+1|0}while((a|0)!=(d|0));i=c;return}function ph(a,c){a=a|0;c=c|0;var d=0,e=0,f=0;d=i;e=a>>3;if((e|0)<=0){i=d;return}f=36-(Qg(a)|0)|0;a=0;do{b[c+(a<<1)>>1]=(qh(a)|0)>>>f<<2;a=a+1|0}while((a|0)!=(e|0));i=d;return}function qh(a){a=a|0;var b=0;b=a>>>1&1431655765|a<<1&-1431655766;a=b>>>2&858993459|b<<2&-858993460;b=a>>>4&252645135|a<<4&-252645136;a=b>>>8&16711935|b<<8&-16711936;return a>>>16|a<<16|0}function rh(a){a=+a;return+(a*a)}function sh(b,c){b=b|0;c=c|0;var d=0,e=0,f=0;d=i;e=c<<24>>24==-1;if(!(a[b+23>>0]|0))if(e)f=0;else f=(c&255)>10&1;else if(e)va(14096,12536,732,14112);else f=1;i=d;return f|0}function th(a,b){a=a|0;b=b|0;var d=0,e=0;d=c[a>>2]|0;a=c[b>>2]|0;if(d>>>0<a>>>0)e=-1;else e=d>>>0>a>>>0&1;return e|0}function uh(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;j=i;k=c[b+32>>2]|0;if(!(a[b+23>>0]|0)){c[k+(e<<2)>>2]=d;i=j;return}else{c[k+(f<<2)>>2]=d;a[(c[b+8>>2]|0)+f>>0]=g;c[h+(f<<2)>>2]=e;i=j;return}}function vh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;e=b<<1;if((e|0)==(c[a+128>>2]|0)){f=a+1108|0;g=c[f>>2]|0;i=d;return g|0}if((e|0)!=(c[a+132>>2]|0))va(14176,12536,2735,14216);f=a+1112|0;g=c[f>>2]|0;i=d;return g|0}function wh(f,h,j,k,l,m,n){f=f|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,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,$=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.0,qa=0.0,ra=0.0,sa=0.0,ta=0,ua=0;o=i;i=i+2624|0;p=o+1088|0;q=o;r=o+2368|0;s=o+1024|0;t=o+2112|0;u=c[f+(d[j>>0]<<2)+120>>2]|0;v=d[j+1>>0]|0;w=c[f+420>>2]|0;x=w+(v*40|0)|0;y=u>>1;z=0-y|0;A=f+4|0;a:do if((c[A>>2]|0)>0){B=w+(v*40|0)+4|0;C=f+276|0;D=f+1412|0;E=r+1|0;F=f+140|0;G=f+1412|0;H=f+1408|0;I=f+140|0;J=f+1412|0;K=f+1408|0;L=0;while(1){M=d[(c[B>>2]|0)+(L*3|0)+2>>0]|0;N=p+(L<<2)|0;c[N>>2]=0;O=d[w+(v*40|0)+M+9>>0]|0;if(!(b[f+(O<<1)+148>>1]|0))break;M=c[C>>2]|0;if($g(f,1)|0){P=c[14232+((d[M+(O*1596|0)+1588>>0]|0)+ -1<<2)>>2]|0;Q=c[f+(L<<2)+1012>>2]|0;R=(Qg(P)|0)+ -1|0;b[Q>>1]=$g(f,R)|0;b[Q+2>>1]=$g(f,R)|0;R=M+(O*1596|0)|0;if(a[R>>0]|0){S=0;T=2;while(1){U=d[M+(O*1596|0)+S+1>>0]|0;V=a[M+(O*1596|0)+U+33>>0]|0;W=V&255;X=a[M+(O*1596|0)+U+49>>0]|0;Y=X&255;Z=(1<<Y)+ -1|0;if(X<<24>>24){X=c[F>>2]|0;_=d[M+(O*1596|0)+U+65>>0]|0;if((c[G>>2]|0)<10)xh(f);$=c[H>>2]|0;aa=b[X+(_*2096|0)+(($&1023)<<1)+36>>1]|0;ba=aa<<16>>16;if(aa<<16>>16>-1){aa=d[(c[X+(_*2096|0)+8>>2]|0)+ba>>0]|0;c[H>>2]=$>>>aa;$=(c[G>>2]|0)-aa|0;aa=($|0)<0;c[G>>2]=aa?0:$;ca=aa?-1:ba}else ca=yh(f,X+(_*2096|0)|0)|0;if(!(a[X+(_*2096|0)+23>>0]|0))da=ca;else da=c[(c[X+(_*2096|0)+2088>>2]|0)+(ca<<2)>>2]|0}else da=0;if(!(V<<24>>24))ea=T;else{_=V&255;V=_>>>0>1?_:1;_=da;X=0;ba=T;while(1){aa=b[M+(O*1596|0)+(U<<4)+((_&Z)<<1)+82>>1]|0;_=_>>Y;if(aa<<16>>16>-1){$=aa<<16>>16;aa=c[I>>2]|0;if((c[J>>2]|0)<10)xh(f);fa=c[K>>2]|0;ga=b[aa+($*2096|0)+((fa&1023)<<1)+36>>1]|0;ha=ga<<16>>16;if(ga<<16>>16>-1){ga=d[(c[aa+($*2096|0)+8>>2]|0)+ha>>0]|0;c[K>>2]=fa>>>ga;fa=(c[J>>2]|0)-ga|0;ga=(fa|0)<0;c[J>>2]=ga?0:fa;ia=ga?-1:ha}else ia=yh(f,aa+($*2096|0)|0)|0;if(!(a[aa+($*2096|0)+23>>0]|0))ja=ia;else ja=c[(c[aa+($*2096|0)+2088>>2]|0)+(ia<<2)>>2]|0;b[Q+(ba<<1)>>1]=ja}else b[Q+(ba<<1)>>1]=0;X=X+1|0;if((X|0)>=(W|0))break;else ba=ba+1|0}ea=T+V|0}S=S+1|0;if((S|0)>=(d[R>>0]|0))break;else T=ea}}if((c[D>>2]|0)!=-1){a[E>>0]=1;a[r>>0]=1;T=M+(O*1596|0)+1592|0;R=c[T>>2]|0;if((R|0)>2){S=2;do{ba=d[M+(O*1596|0)+(S<<1)+1088>>0]|0;W=d[M+(O*1596|0)+(S<<1)+1089>>0]|0;X=zh(e[M+(O*1596|0)+(S<<1)+338>>1]|0,e[M+(O*1596|0)+(ba<<1)+338>>1]|0,e[M+(O*1596|0)+(W<<1)+338>>1]|0,b[Q+(ba<<1)>>1]|0,b[Q+(W<<1)>>1]|0)|0;Y=Q+(S<<1)|0;_=b[Y>>1]|0;Z=_<<16>>16;U=P-X|0;do if(_<<16>>16){a[r+W>>0]=1;a[r+ba>>0]=1;a[r+S>>0]=1;if((Z|0)<(((U|0)<(X|0)?U:X)<<1|0))if(!(Z&1)){b[Y>>1]=(Z>>>1)+X;break}else{b[Y>>1]=X-((Z+1|0)>>>1);break}else if((U|0)>(X|0)){b[Y>>1]=_;break}else{b[Y>>1]=P+65535-Z;break}}else{a[r+S>>0]=0;b[Y>>1]=X}while(0);S=S+1|0;X=c[T>>2]|0}while((S|0)<(X|0));ka=X}else ka=R;if((ka|0)>0){S=c[T>>2]|0;P=0;do{if(!(a[r+P>>0]|0))b[Q+(P<<1)>>1]=-1;P=P+1|0}while((P|0)<(S|0))}}else la=47}else la=47;if((la|0)==47){la=0;c[N>>2]=1}L=L+1|0;if((L|0)>=(c[A>>2]|0))break a}qg(f,21);ma=0;i=o;return ma|0}while(0);la=f+96|0;if((c[la>>2]|0)!=0?(c[f+100>>2]|0)!=(c[f+108>>2]|0):0)va(13768,12536,2943,14248);oi(q|0,p|0,c[A>>2]<<2|0)|0;if(b[x>>1]|0){r=w+(v*40|0)+4|0;ka=c[r>>2]|0;ea=e[x>>1]|0;ja=0;do{if(!((c[p+(d[ka+(ja*3|0)>>0]<<2)>>2]|0)!=0?(c[p+(d[ka+(ja*3|0)+1>>0]<<2)>>2]|0)!=0:0)){c[p+(d[(c[r>>2]|0)+(ja*3|0)+1>>0]<<2)>>2]=0;c[p+(d[(c[r>>2]|0)+(ja*3|0)>>0]<<2)>>2]=0}ja=ja+1|0}while((ja|0)<(ea|0))}ea=w+(v*40|0)+8|0;if(a[ea>>0]|0){ja=w+(v*40|0)+4|0;r=0;do{if((c[A>>2]|0)>0){ka=c[ja>>2]|0;ia=c[A>>2]|0;da=0;ca=0;while(1){if((d[ka+(ca*3|0)+2>>0]|0)==(r|0)){L=t+da|0;if(!(c[p+(ca<<2)>>2]|0)){a[L>>0]=0;c[s+(da<<2)>>2]=c[f+(ca<<2)+816>>2]}else{a[L>>0]=1;c[s+(da<<2)>>2]=0}na=da+1|0}else na=da;ca=ca+1|0;if((ca|0)>=(ia|0)){oa=na;break}else da=na}}else oa=0;Ah(f,s,oa,y,d[w+(v*40|0)+r+24>>0]|0,t);r=r+1|0}while((r|0)<(d[ea>>0]|0))}if((c[la>>2]|0)!=0?(c[f+100>>2]|0)!=(c[f+108>>2]|0):0)va(13768,12536,2975,14248);ea=b[x>>1]|0;if(ea<<16>>16){r=w+(v*40|0)+4|0;v=(y|0)>0;w=ea&65535;do{w=w+ -1|0;ea=c[r>>2]|0;t=c[f+(d[ea+(w*3|0)>>0]<<2)+816>>2]|0;oa=c[f+(d[ea+(w*3|0)+1>>0]<<2)+816>>2]|0;if(v){ea=0;do{s=t+(ea<<2)|0;pa=+g[s>>2];na=oa+(ea<<2)|0;qa=+g[na>>2];p=qa>0.0;do if(pa>0.0)if(p){ra=pa-qa;sa=pa;break}else{ra=pa;sa=pa+qa;break}else if(p){ra=pa+qa;sa=pa;break}else{ra=pa;sa=pa-qa;break}while(0);g[s>>2]=sa;g[na>>2]=ra;ea=ea+1|0}while((ea|0)!=(y|0))}}while((w|0)>0)}if((c[A>>2]|0)>0){w=y<<2;v=0;do{r=c[f+(v<<2)+816>>2]|0;if(!(c[q+(v<<2)>>2]|0))Bh(f,x,v,u,r,c[f+(v<<2)+1012>>2]|0);else qi(r|0,0,w|0)|0;v=v+1|0;ta=c[A>>2]|0}while((v|0)<(ta|0));if((ta|0)>0){ta=0;do{Ch(c[f+(ta<<2)+816>>2]|0,u,f,d[j>>0]|0);ta=ta+1|0}while((ta|0)<(c[A>>2]|0))}}Tg(f);A=f+1393|0;if(!(a[A>>0]|0)){ta=f+1428|0;j=c[ta>>2]|0;if(!j)ua=k;else{v=j+k|0;c[n>>2]=v;c[ta>>2]=0;ua=v}}else{c[f+1076>>2]=z;c[f+1428>>2]=u-m;c[f+1080>>2]=1;a[A>>0]=0;ua=k}if((c[f+1404>>2]|0)==(c[f+1420>>2]|0)){k=f+1080|0;if(((c[k>>2]|0)!=0?(a[f+1391>>0]&4)!=0:0)?(A=(c[f+1424>>2]|0)+(m-u)|0,u=f+1076|0,z=c[u>>2]|0,A>>>0<(z+m|0)>>>0):0){v=(A>>>0<z>>>0?0:A-z|0)+ua|0;c[h>>2]=v;c[u>>2]=(c[u>>2]|0)+v;ma=1;i=o;return ma|0}c[f+1076>>2]=ua-y+(c[f+1424>>2]|0);c[k>>2]=1}if(c[f+1080>>2]|0){k=f+1076|0;c[k>>2]=l-ua+(c[k>>2]|0)}if((c[la>>2]|0)!=0?(c[f+100>>2]|0)!=(c[f+108>>2]|0):0)va(13768,12536,3084,14248);c[h>>2]=m;ma=1;i=o;return ma|0}function xh(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;e=b+1412|0;f=c[e>>2]|0;if((f|0)>=25){i=d;return}if(!f)c[b+1408>>2]=0;f=b+1392|0;g=b+1400|0;h=b+1408|0;while(1){if((c[g>>2]|0)!=0?(a[f>>0]|0)==0:0){j=9;break}k=Zg(b)|0;if((k|0)==-1){j=9;break}c[h>>2]=(c[h>>2]|0)+(k<<c[e>>2]);k=(c[e>>2]|0)+8|0;c[e>>2]=k;if((k|0)>=25){j=9;break}}if((j|0)==9){i=d;return}}function yh(b,e){b=b|0;e=e|0;var f=0,g=0,h=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;f=i;xh(b);g=e+2084|0;if((c[g>>2]|0)==0?(c[e+32>>2]|0)==0:0)va(15472,12536,1211,15512);h=e+4|0;if((c[h>>2]|0)>8){if(c[g>>2]|0)j=7}else if(!(c[e+32>>2]|0))j=7;if((j|0)==7){j=b+1408|0;k=qh(c[j>>2]|0)|0;l=c[e+2092>>2]|0;if((l|0)>1){m=c[g>>2]|0;g=l;l=0;while(1){n=g>>1;o=n+l|0;p=(c[m+(o<<2)>>2]|0)>>>0>k>>>0;q=p?l:o;g=p?n:g-n|0;if((g|0)<=1){r=q;break}else l=q}}else r=0;if(!(a[e+23>>0]|0))s=c[(c[e+2088>>2]|0)+(r<<2)>>2]|0;else s=r;r=d[(c[e+8>>2]|0)+s>>0]|0;l=b+1412|0;if((c[l>>2]|0)<(r|0)){c[l>>2]=0;t=-1;i=f;return t|0}else{c[j>>2]=(c[j>>2]|0)>>>r;c[l>>2]=(c[l>>2]|0)-r;t=s;i=f;return t|0}}if(a[e+23>>0]|0)va(15544,12536,1244,15512);a:do if((c[h>>2]|0)>0){s=e+8|0;r=c[s>>2]|0;l=e+32|0;j=b+1408|0;g=0;while(1){k=a[r+g>>0]|0;u=k&255;if(k<<24>>24!=-1?(v=c[j>>2]|0,(c[(c[l>>2]|0)+(g<<2)>>2]|0)==(v&(1<<u)+ -1|0)):0)break;k=g+1|0;if((k|0)<(c[h>>2]|0))g=k;else break a}l=b+1412|0;if((c[l>>2]|0)<(u|0)){c[l>>2]=0;t=-1;i=f;return t|0}else{c[j>>2]=v>>>u;c[l>>2]=(c[l>>2]|0)-(d[(c[s>>2]|0)+g>>0]|0);t=g;i=f;return t|0}}while(0);qg(b,21);c[b+1412>>2]=0;t=-1;i=f;return t|0}function zh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0;f=e-d|0;e=(aa((f|0)>-1?f:0-f|0,a-b|0)|0)/(c-b|0)|0;return((f|0)<0?0-e|0:e)+d|0}
function Ah(e,f,g,h,j,k){e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var 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,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,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0;l=i;i=i+32|0;m=l+20|0;n=l;o=l+4|0;p=l+8|0;q=l+12|0;r=l+16|0;s=c[e+412>>2]|0;t=b[e+(j<<1)+284>>1]|0;u=t&65535;v=s+(j*24|0)+13|0;w=e+140|0;x=c[(c[w>>2]|0)+((d[v>>0]|0)*2096|0)>>2]|0;y=s+(j*24|0)|0;z=s+(j*24|0)+8|0;A=(((c[s+(j*24|0)+4>>2]|0)-(c[y>>2]|0)|0)>>>0)/((c[z>>2]|0)>>>0)|0;B=e+108|0;C=c[B>>2]|0;D=e+4|0;E=A<<2;F=aa(c[D>>2]|0,E+4|0)|0;if(!(c[e+96>>2]|0)){G=i;i=i+((1*F|0)+15&-16)|0;H=G}else H=dh(e,F)|0;F=Jh(H,c[D>>2]|0,E)|0;if((g|0)>0){E=h<<2;D=0;do{if(!(a[k+D>>0]|0))qi(c[f+(D<<2)>>2]|0,0,E|0)|0;D=D+1|0}while((D|0)!=(g|0))}if(t<<16>>16!=2|(g|0)==1){t=(A|0)>0;D=e+1412|0;E=e+1408|0;H=s+(j*24|0)+16|0;G=(x|0)>0;I=(g|0)>0;J=s+(j*24|0)+20|0;K=0;a:while(1){if(t){L=0;M=0;while(1){if(!((K|0)!=0|(g|0)<1)){N=0;do{if(!(a[k+N>>0]|0)){O=c[w>>2]|0;P=d[v>>0]|0;if((c[D>>2]|0)<10)xh(e);Q=c[E>>2]|0;R=b[O+(P*2096|0)+((Q&1023)<<1)+36>>1]|0;S=R<<16>>16;if(R<<16>>16>-1){R=d[(c[O+(P*2096|0)+8>>2]|0)+S>>0]|0;c[E>>2]=Q>>>R;Q=(c[D>>2]|0)-R|0;R=(Q|0)<0;c[D>>2]=R?0:Q;T=R?-1:S}else T=yh(e,O+(P*2096|0)|0)|0;if(!(a[O+(P*2096|0)+23>>0]|0))U=T;else U=c[(c[O+(P*2096|0)+2088>>2]|0)+(T<<2)>>2]|0;if((U|0)==-1){V=94;break a}c[(c[F+(N<<2)>>2]|0)+(L<<2)>>2]=c[(c[H>>2]|0)+(U<<2)>>2]}N=N+1|0}while((N|0)<(g|0))}if(G&(M|0)<(A|0)){N=0;P=M;while(1){if(I){O=0;do{if(((a[k+O>>0]|0)==0?(S=b[(c[J>>2]|0)+(d[(c[(c[F+(O<<2)>>2]|0)+(L<<2)>>2]|0)+N>>0]<<4)+(K<<1)>>1]|0,S<<16>>16>-1):0)?(R=c[z>>2]|0,Q=(aa(R,P)|0)+(c[y>>2]|0)|0,(Mh(e,(c[w>>2]|0)+((S<<16>>16)*2096|0)|0,c[f+(O<<2)>>2]|0,Q,R,u)|0)==0):0){V=94;break a}O=O+1|0}while((O|0)<(g|0))}N=N+1|0;O=P+1|0;if(!((N|0)<(x|0)&(O|0)<(A|0))){W=O;break}else P=O}}else W=M;if((W|0)<(A|0)){L=L+1|0;M=W}else break}}K=K+1|0;if((K|0)>=8){V=94;break}}if((V|0)==94){c[B>>2]=C;i=l;return}}b:do if((g|0)>0){K=0;while(1){W=K+1|0;if(!(a[k+K>>0]|0)){X=K;break b}if((W|0)<(g|0))K=W;else{X=W;break}}}else X=0;while(0);if((X|0)==(g|0)){c[B>>2]=C;i=l;return}X=(A|0)>0;k=e+1412|0;K=e+1408|0;W=s+(j*24|0)+16|0;u=(x|0)>0;J=s+(j*24|0)+20|0;I=(A|0)>0;G=e+1412|0;U=e+1408|0;H=s+(j*24|0)+16|0;T=(x|0)>0;D=s+(j*24|0)+20|0;E=(A|0)>0;t=e+1412|0;M=e+1408|0;L=s+(j*24|0)+16|0;P=(x|0)>0;N=s+(j*24|0)+20|0;j=0;c:while(1){if((g|0)==2){if(I){s=(j|0)==0;O=0;R=0;while(1){Q=(aa(c[z>>2]|0,R)|0)+(c[y>>2]|0)|0;c[m>>2]=Q&1;c[n>>2]=Q>>1;if(s){Q=c[w>>2]|0;S=d[v>>0]|0;if((c[G>>2]|0)<10)xh(e);Y=c[U>>2]|0;Z=b[Q+(S*2096|0)+((Y&1023)<<1)+36>>1]|0;_=Z<<16>>16;if(Z<<16>>16>-1){Z=d[(c[Q+(S*2096|0)+8>>2]|0)+_>>0]|0;c[U>>2]=Y>>>Z;Y=(c[G>>2]|0)-Z|0;Z=(Y|0)<0;c[G>>2]=Z?0:Y;$=Z?-1:_}else $=yh(e,Q+(S*2096|0)|0)|0;if(!(a[Q+(S*2096|0)+23>>0]|0))ba=$;else ba=c[(c[Q+(S*2096|0)+2088>>2]|0)+($<<2)>>2]|0;if((ba|0)==-1){V=94;break c}c[(c[F>>2]|0)+(O<<2)>>2]=c[(c[H>>2]|0)+(ba<<2)>>2]}if(T&(R|0)<(A|0)){S=0;Q=R;while(1){_=c[z>>2]|0;Z=b[(c[D>>2]|0)+(d[(c[(c[F>>2]|0)+(O<<2)>>2]|0)+S>>0]<<4)+(j<<1)>>1]|0;if(Z<<16>>16>-1){if(!(Kh(e,(c[w>>2]|0)+((Z<<16>>16)*2096|0)|0,f,m,n,h,_)|0)){V=94;break c}}else{Z=aa(_,Q)|0;Y=Z+_+(c[y>>2]|0)|0;c[m>>2]=Y&1;c[n>>2]=Y>>1}S=S+1|0;Y=Q+1|0;if(!((S|0)<(x|0)&(Y|0)<(A|0))){ca=Y;break}else Q=Y}}else ca=R;if((ca|0)<(A|0)){O=O+1|0;R=ca}else break}}}else if((g|0)==1){if(X){R=(j|0)==0;O=0;s=0;while(1){Q=(aa(c[z>>2]|0,s)|0)+(c[y>>2]|0)|0;c[o>>2]=0;c[p>>2]=Q;if(R){Q=c[w>>2]|0;S=d[v>>0]|0;if((c[k>>2]|0)<10)xh(e);Y=c[K>>2]|0;_=b[Q+(S*2096|0)+((Y&1023)<<1)+36>>1]|0;Z=_<<16>>16;if(_<<16>>16>-1){_=d[(c[Q+(S*2096|0)+8>>2]|0)+Z>>0]|0;c[K>>2]=Y>>>_;Y=(c[k>>2]|0)-_|0;_=(Y|0)<0;c[k>>2]=_?0:Y;da=_?-1:Z}else da=yh(e,Q+(S*2096|0)|0)|0;if(!(a[Q+(S*2096|0)+23>>0]|0))ea=da;else ea=c[(c[Q+(S*2096|0)+2088>>2]|0)+(da<<2)>>2]|0;if((ea|0)==-1){V=94;break c}c[(c[F>>2]|0)+(O<<2)>>2]=c[(c[W>>2]|0)+(ea<<2)>>2]}if(u&(s|0)<(A|0)){S=0;Q=s;while(1){Z=c[z>>2]|0;_=b[(c[J>>2]|0)+(d[(c[(c[F>>2]|0)+(O<<2)>>2]|0)+S>>0]<<4)+(j<<1)>>1]|0;if(_<<16>>16>-1){if(!(Lh(e,(c[w>>2]|0)+((_<<16>>16)*2096|0)|0,f,g,o,p,h,Z)|0)){V=94;break c}}else{_=aa(Z,Q)|0;Y=_+Z+(c[y>>2]|0)|0;c[o>>2]=0;c[p>>2]=Y}S=S+1|0;Y=Q+1|0;if(!((S|0)<(x|0)&(Y|0)<(A|0))){fa=Y;break}else Q=Y}}else fa=s;if((fa|0)<(A|0)){O=O+1|0;s=fa}else break}}}else if(E){s=(j|0)==0;O=0;R=0;while(1){Q=(aa(c[z>>2]|0,R)|0)+(c[y>>2]|0)|0;c[q>>2]=(Q|0)%(g|0)|0;c[r>>2]=(Q|0)/(g|0)|0;if(s){Q=c[w>>2]|0;S=d[v>>0]|0;if((c[t>>2]|0)<10)xh(e);Y=c[M>>2]|0;Z=b[Q+(S*2096|0)+((Y&1023)<<1)+36>>1]|0;_=Z<<16>>16;if(Z<<16>>16>-1){Z=d[(c[Q+(S*2096|0)+8>>2]|0)+_>>0]|0;c[M>>2]=Y>>>Z;Y=(c[t>>2]|0)-Z|0;Z=(Y|0)<0;c[t>>2]=Z?0:Y;ga=Z?-1:_}else ga=yh(e,Q+(S*2096|0)|0)|0;if(!(a[Q+(S*2096|0)+23>>0]|0))ha=ga;else ha=c[(c[Q+(S*2096|0)+2088>>2]|0)+(ga<<2)>>2]|0;if((ha|0)==-1){V=94;break c}c[(c[F>>2]|0)+(O<<2)>>2]=c[(c[L>>2]|0)+(ha<<2)>>2]}if(P&(R|0)<(A|0)){S=0;Q=R;while(1){_=c[z>>2]|0;Z=b[(c[N>>2]|0)+(d[(c[(c[F>>2]|0)+(O<<2)>>2]|0)+S>>0]<<4)+(j<<1)>>1]|0;if(Z<<16>>16>-1){if(!(Lh(e,(c[w>>2]|0)+((Z<<16>>16)*2096|0)|0,f,g,q,r,h,_)|0)){V=94;break c}}else{Z=aa(_,Q)|0;Y=Z+_+(c[y>>2]|0)|0;c[q>>2]=(Y|0)%(g|0)|0;c[r>>2]=(Y|0)/(g|0)|0}S=S+1|0;Y=Q+1|0;if(!((S|0)<(x|0)&(Y|0)<(A|0))){ia=Y;break}else Q=Y}}else ia=R;if((ia|0)<(A|0)){O=O+1|0;R=ia}else break}}j=j+1|0;if((j|0)>=8){V=94;break}}if((V|0)==94){c[B>>2]=C;i=l;return}}function Bh(a,f,h,j,k,l){a=a|0;f=f|0;h=h|0;j=j|0;k=k|0;l=l|0;var 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;m=i;n=j>>1;j=d[f+(d[(c[f+4>>2]|0)+(h*3|0)+2>>0]|0)+9>>0]|0;if(!(b[a+(j<<1)+148>>1]|0)){qg(a,21);i=m;return}h=c[a+276>>2]|0;a=h+(j*1596|0)+1588|0;f=aa(d[a>>0]|0,b[l>>1]|0)|0;o=h+(j*1596|0)+1592|0;if((c[o>>2]|0)>1){p=0;q=f;r=1;while(1){s=d[h+(j*1596|0)+r+838>>0]|0;t=b[l+(s<<1)>>1]|0;if(t<<16>>16>-1){u=aa(d[a>>0]|0,t<<16>>16)|0;t=e[h+(j*1596|0)+(s<<1)+338>>1]|0;Ih(k,p,q,t,u,n);v=t;w=u}else{v=p;w=q}r=r+1|0;if((r|0)>=(c[o>>2]|0)){x=v;y=w;break}else{p=v;q=w}}}else{x=0;y=f}if((x|0)>=(n|0)){i=m;return}z=+g[14320+(y<<2)>>2];y=x;do{x=k+(y<<2)|0;g[x>>2]=z*+g[x>>2];y=y+1|0}while((y|0)!=(n|0));i=m;return}function Ch(a,b,d,f){a=a|0;b=b|0;d=d|0;f=f|0;var h=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,z=0,A=0.0,B=0.0,C=0.0,D=0.0,E=0,F=0,G=0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0;h=i;j=b>>1;k=b>>2;l=b>>3;m=d+108|0;n=c[m>>2]|0;o=j<<2;if(!(c[d+96>>2]|0)){p=i;i=i+((1*o|0)+15&-16)|0;q=p}else q=dh(d,o)|0;o=c[d+(f<<2)+1084>>2]|0;p=q+(j+ -2<<2)|0;r=a+(j<<2)|0;if(!j){s=o;t=p}else{u=(j<<2)+ -16|0;v=u>>>4;w=(v<<1)+2|0;x=q+(u-(v<<3))|0;v=o;u=p;p=a;while(1){y=p+8|0;z=v+4|0;g[u+4>>2]=+g[p>>2]*+g[v>>2]- +g[y>>2]*+g[z>>2];g[u>>2]=+g[p>>2]*+g[z>>2]+ +g[y>>2]*+g[v>>2];p=p+16|0;if((p|0)==(r|0))break;else{v=v+8|0;u=u+ -8|0}}s=o+(w<<2)|0;t=x}if(t>>>0>=q>>>0){x=s;s=t;t=a+(j+ -3<<2)|0;while(1){w=t+8|0;u=x+4|0;g[s+4>>2]=+g[t>>2]*+g[u>>2]- +g[w>>2]*+g[x>>2];g[s>>2]=-(+g[t>>2]*+g[x>>2])- +g[w>>2]*+g[u>>2];s=s+ -8|0;if(s>>>0<q>>>0)break;else{x=x+8|0;t=t+ -16|0}}}t=j+ -8|0;if((t|0)>=0){x=o+(t<<2)|0;t=a+(k<<2)|0;s=a;u=q+(k<<2)|0;w=q;while(1){A=+g[u+4>>2];B=+g[w+4>>2];C=A-B;D=+g[u>>2]- +g[w>>2];g[t+4>>2]=A+B;g[t>>2]=+g[u>>2]+ +g[w>>2];v=x+16|0;p=x+20|0;g[s+4>>2]=C*+g[v>>2]-D*+g[p>>2];g[s>>2]=D*+g[v>>2]+C*+g[p>>2];C=+g[u+12>>2];D=+g[w+12>>2];B=C-D;p=u+8|0;v=w+8|0;A=+g[p>>2]- +g[v>>2];g[t+12>>2]=C+D;g[t+8>>2]=+g[p>>2]+ +g[v>>2];v=x+4|0;g[s+12>>2]=B*+g[x>>2]-A*+g[v>>2];g[s+8>>2]=A*+g[x>>2]+B*+g[v>>2];x=x+ -32|0;if(x>>>0<o>>>0)break;else{t=t+16|0;s=s+16|0;u=u+16|0;w=w+16|0}}}w=Qg(b)|0;u=b>>4;s=j+ -1|0;t=0-l|0;Dh(u,a,s,t,o);Dh(u,a,s-k|0,t,o);t=b>>5;x=0-u|0;Eh(t,a,s,x,o,16);Eh(t,a,s-l|0,x,o,16);Eh(t,a,s-(l<<1)|0,x,o,16);Eh(t,a,s+(aa(l,-3)|0)|0,x,o,16);x=w+ -4>>1;if((x|0)>2){l=2;do{u=b>>l+2;v=l;l=l+1|0;p=1<<l;if((p|0)>0){y=b>>v+4;z=0-(u>>1)|0;E=1<<v+3;v=0;do{Eh(y,a,s-(aa(v,u)|0)|0,z,o,E);v=v+1|0}while((v|0)!=(p|0))}}while((l|0)!=(x|0));F=x}else F=2;if((F|0)<(w+ -7|0)){x=w+ -7|0;w=F;do{F=b>>w+2;l=1<<w+3;p=b>>w+6;w=w+1|0;v=1<<w;if((p|0)>0){E=0-(F>>1)|0;z=l<<2;u=o;y=s;G=p;while(1){Fh(v,a,y,E,u,l,F);G=G+ -1|0;if((G|0)<=0)break;else{u=u+(z<<2)|0;y=y+ -8|0}}}}while((w|0)!=(x|0))}Gh(t,a,s,o,b);o=q+(k+ -4<<2)|0;k=j+ -4|0;if(o>>>0>=q>>>0){s=c[d+(f<<2)+1116>>2]|0;t=o;o=q+(k<<2)|0;while(1){x=e[s>>1]|0;g[o+12>>2]=+g[a+(x<<2)>>2];g[o+8>>2]=+g[a+(x+1<<2)>>2];g[t+12>>2]=+g[a+(x+2<<2)>>2];g[t+8>>2]=+g[a+(x+3<<2)>>2];x=e[s+2>>1]|0;g[o+4>>2]=+g[a+(x<<2)>>2];g[o>>2]=+g[a+(x+1<<2)>>2];g[t+4>>2]=+g[a+(x+2<<2)>>2];g[t>>2]=+g[a+(x+3<<2)>>2];t=t+ -16|0;if(t>>>0<q>>>0)break;else{s=s+4|0;o=o+ -16|0}}}o=q+(j+ -4<<2)|0;if(q>>>0<o>>>0){s=c[d+(f<<2)+1100>>2]|0;t=q;x=o;while(1){B=+g[t>>2];o=x+8|0;A=+g[o>>2];D=B-A;w=t+4|0;C=+g[w>>2];y=x+12|0;H=+g[y>>2];I=C+H;J=+g[s+4>>2];K=+g[s>>2];L=D*J+I*K;M=J*I-D*K;K=B+A;A=C-H;g[t>>2]=K+L;g[w>>2]=A+M;g[o>>2]=K-L;g[y>>2]=M-A;y=t+8|0;A=+g[y>>2];M=+g[x>>2];L=A-M;o=t+12|0;K=+g[o>>2];w=x+4|0;H=+g[w>>2];C=K+H;B=+g[s+12>>2];D=+g[s+8>>2];I=L*B+C*D;J=B*C-L*D;D=A+M;M=K-H;g[y>>2]=D+I;g[o>>2]=M+J;g[x>>2]=D-I;g[w>>2]=J-M;t=t+16|0;x=x+ -16|0;if(t>>>0>=x>>>0)break;else s=s+16|0}}s=j+ -8|0;j=q+(s<<2)|0;if(j>>>0<q>>>0){c[m>>2]=n;i=h;return}x=(c[d+(f<<2)+1092>>2]|0)+(s<<2)|0;s=a;f=a+(k<<2)|0;k=r;r=a+(b+ -4<<2)|0;b=j;while(1){M=+g[b+24>>2];J=+g[x+28>>2];I=+g[b+28>>2];D=+g[x+24>>2];H=M*J-I*D;K=-(M*D)-J*I;g[s>>2]=H;g[f+12>>2]=-H;g[k>>2]=K;g[r+12>>2]=K;K=+g[b+16>>2];H=+g[x+20>>2];I=+g[b+20>>2];J=+g[x+16>>2];D=K*H-I*J;M=-(K*J)-H*I;g[s+4>>2]=D;g[f+8>>2]=-D;g[k+4>>2]=M;g[r+8>>2]=M;M=+g[b+8>>2];D=+g[x+12>>2];I=+g[b+12>>2];H=+g[x+8>>2];J=M*D-I*H;K=-(M*H)-D*I;g[s+8>>2]=J;g[f+4>>2]=-J;g[k+8>>2]=K;g[r+4>>2]=K;K=+g[b>>2];J=+g[x+4>>2];I=+g[b+4>>2];D=+g[x>>2];H=K*J-I*D;M=-(K*D)-J*I;g[s+12>>2]=H;g[f>>2]=-H;g[k+12>>2]=M;g[r>>2]=M;b=b+ -32|0;if(b>>>0<q>>>0)break;else{x=x+ -32|0;s=s+16|0;f=f+ -16|0;k=k+16|0;r=r+ -16|0}}c[m>>2]=n;i=h;return}function Dh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,h=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0,p=0;f=i;if(a&3)va(14280,12536,2085,14296);h=a>>2;if((h|0)<=0){i=f;return}a=e;e=b+(c<<2)|0;j=b+(d+c<<2)|0;c=h;while(1){k=+g[e>>2];l=+g[j>>2];m=k-l;h=e+ -4|0;d=j+ -4|0;n=+g[h>>2]- +g[d>>2];g[e>>2]=k+l;g[h>>2]=+g[d>>2]+ +g[h>>2];h=a+4|0;g[j>>2]=m*+g[a>>2]-n*+g[h>>2];g[d>>2]=n*+g[a>>2]+m*+g[h>>2];h=a+32|0;d=e+ -8|0;m=+g[d>>2];b=j+ -8|0;n=+g[b>>2];l=m-n;o=e+ -12|0;p=j+ -12|0;k=+g[o>>2]- +g[p>>2];g[d>>2]=m+n;g[o>>2]=+g[p>>2]+ +g[o>>2];o=a+36|0;g[b>>2]=l*+g[h>>2]-k*+g[o>>2];g[p>>2]=k*+g[h>>2]+l*+g[o>>2];o=a+64|0;h=e+ -16|0;l=+g[h>>2];p=j+ -16|0;k=+g[p>>2];n=l-k;b=e+ -20|0;d=j+ -20|0;m=+g[b>>2]- +g[d>>2];g[h>>2]=l+k;g[b>>2]=+g[d>>2]+ +g[b>>2];b=a+68|0;g[p>>2]=n*+g[o>>2]-m*+g[b>>2];g[d>>2]=m*+g[o>>2]+n*+g[b>>2];b=a+96|0;o=e+ -24|0;n=+g[o>>2];d=j+ -24|0;m=+g[d>>2];k=n-m;p=e+ -28|0;h=j+ -28|0;l=+g[p>>2]- +g[h>>2];g[o>>2]=n+m;g[p>>2]=+g[h>>2]+ +g[p>>2];p=a+100|0;g[d>>2]=k*+g[b>>2]-l*+g[p>>2];g[h>>2]=l*+g[b>>2]+k*+g[p>>2];c=c+ -1|0;if((c|0)<=0)break;else{a=a+128|0;e=e+ -32|0;j=j+ -32|0}}i=f;return}function Eh(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 h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0.0,u=0.0,v=0,w=0;h=i;j=a>>2;if((j|0)<=0){i=h;return}a=f+1|0;k=f<<1;l=k|1;m=k+f|0;n=m+1|0;o=m+f|0;p=e;e=b+(c<<2)|0;q=b+(d+c<<2)|0;c=j;while(1){r=+g[e>>2];s=+g[q>>2];t=r-s;j=e+ -4|0;d=q+ -4|0;u=+g[j>>2]- +g[d>>2];g[e>>2]=r+s;g[j>>2]=+g[d>>2]+ +g[j>>2];j=p+4|0;g[q>>2]=t*+g[p>>2]-u*+g[j>>2];g[d>>2]=u*+g[p>>2]+t*+g[j>>2];j=p+(f<<2)|0;d=e+ -8|0;t=+g[d>>2];b=q+ -8|0;u=+g[b>>2];s=t-u;v=e+ -12|0;w=q+ -12|0;r=+g[v>>2]- +g[w>>2];g[d>>2]=t+u;g[v>>2]=+g[w>>2]+ +g[v>>2];v=p+(a<<2)|0;g[b>>2]=s*+g[j>>2]-r*+g[v>>2];g[w>>2]=r*+g[j>>2]+s*+g[v>>2];v=p+(k<<2)|0;j=e+ -16|0;s=+g[j>>2];w=q+ -16|0;r=+g[w>>2];u=s-r;b=e+ -20|0;d=q+ -20|0;t=+g[b>>2]- +g[d>>2];g[j>>2]=s+r;g[b>>2]=+g[d>>2]+ +g[b>>2];b=p+(l<<2)|0;g[w>>2]=u*+g[v>>2]-t*+g[b>>2];g[d>>2]=t*+g[v>>2]+u*+g[b>>2];b=p+(m<<2)|0;v=e+ -24|0;u=+g[v>>2];d=q+ -24|0;t=+g[d>>2];r=u-t;w=e+ -28|0;j=q+ -28|0;s=+g[w>>2]- +g[j>>2];g[v>>2]=u+t;g[w>>2]=+g[j>>2]+ +g[w>>2];w=p+(n<<2)|0;g[d>>2]=r*+g[b>>2]-s*+g[w>>2];g[j>>2]=s*+g[b>>2]+r*+g[w>>2];c=c+ -1|0;if((c|0)<=0)break;else{p=p+(o<<2)|0;e=e+ -32|0;q=q+ -32|0}}i=h;return}function Fh(a,b,c,d,e,f,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;h=h|0;var j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0;j=i;k=+g[e>>2];l=+g[e+4>>2];m=+g[e+(f<<2)>>2];n=+g[e+(f+1<<2)>>2];o=f<<1;p=+g[e+(o<<2)>>2];q=+g[e+((o|1)<<2)>>2];o=f*3|0;r=+g[e+(o<<2)>>2];s=+g[e+(o+1<<2)>>2];if((a|0)<=0){i=j;return}o=0-h|0;h=b+(c<<2)|0;e=b+(d+c<<2)|0;c=a;while(1){t=+g[h>>2];u=+g[e>>2];v=t-u;a=h+ -4|0;d=e+ -4|0;w=+g[a>>2]- +g[d>>2];g[h>>2]=t+u;g[a>>2]=+g[a>>2]+ +g[d>>2];g[e>>2]=k*v-l*w;g[d>>2]=l*v+k*w;d=h+ -8|0;w=+g[d>>2];a=e+ -8|0;v=+g[a>>2];u=w-v;b=h+ -12|0;f=e+ -12|0;t=+g[b>>2]- +g[f>>2];g[d>>2]=w+v;g[b>>2]=+g[b>>2]+ +g[f>>2];g[a>>2]=m*u-n*t;g[f>>2]=n*u+m*t;f=h+ -16|0;t=+g[f>>2];a=e+ -16|0;u=+g[a>>2];v=t-u;b=h+ -20|0;d=e+ -20|0;w=+g[b>>2]- +g[d>>2];g[f>>2]=t+u;g[b>>2]=+g[b>>2]+ +g[d>>2];g[a>>2]=p*v-q*w;g[d>>2]=q*v+p*w;d=h+ -24|0;w=+g[d>>2];a=e+ -24|0;v=+g[a>>2];u=w-v;b=h+ -28|0;f=e+ -28|0;t=+g[b>>2]- +g[f>>2];g[d>>2]=w+v;g[b>>2]=+g[b>>2]+ +g[f>>2];g[a>>2]=r*u-s*t;g[f>>2]=s*u+r*t;c=c+ -1|0;if((c|0)<=0)break;else{h=h+(o<<2)|0;e=e+(o<<2)|0}}i=j;return}function Gh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,h=0.0,j=0.0,k=0.0,l=0.0,m=0,n=0,o=0.0;f=i;h=+g[d+(e>>3<<2)>>2];e=c-(a<<4)|0;a=b+(e<<2)|0;if((e|0)>=(c|0)){i=f;return}e=b+(c<<2)|0;do{j=+g[e>>2];c=e+ -32|0;k=+g[c>>2];b=e+ -4|0;d=e+ -36|0;l=+g[b>>2]- +g[d>>2];g[e>>2]=j+k;g[b>>2]=+g[b>>2]+ +g[d>>2];g[c>>2]=j-k;g[d>>2]=l;d=e+ -8|0;l=+g[d>>2];b=e+ -40|0;k=+g[b>>2];j=l-k;m=e+ -12|0;n=e+ -44|0;o=+g[m>>2]- +g[n>>2];g[d>>2]=l+k;g[m>>2]=+g[m>>2]+ +g[n>>2];g[b>>2]=h*(j+o);g[n>>2]=h*(o-j);n=e+ -48|0;j=+g[n>>2];b=e+ -16|0;o=+g[b>>2];m=e+ -20|0;d=e+ -52|0;k=+g[m>>2]- +g[d>>2];g[b>>2]=j+o;g[m>>2]=+g[m>>2]+ +g[d>>2];g[n>>2]=k;g[d>>2]=j-o;d=e+ -56|0;o=+g[d>>2];n=e+ -24|0;j=+g[n>>2];k=o-j;m=e+ -28|0;b=e+ -60|0;l=+g[m>>2]- +g[b>>2];g[n>>2]=o+j;g[m>>2]=+g[m>>2]+ +g[b>>2];g[d>>2]=h*(k+l);g[b>>2]=h*(k-l);Hh(e);Hh(c);e=e+ -64|0}while(e>>>0>a>>>0);i=f;return}function Hh(a){a=a|0;var b=0.0,c=0,d=0.0,e=0.0,f=0.0,h=0,i=0,j=0.0,k=0.0,l=0;b=+g[a>>2];c=a+ -16|0;d=+g[c>>2];e=b-d;f=b+d;h=a+ -8|0;d=+g[h>>2];i=a+ -24|0;b=+g[i>>2];j=d+b;k=d-b;g[a>>2]=f+j;g[h>>2]=f-j;h=a+ -12|0;l=a+ -28|0;j=+g[h>>2]- +g[l>>2];g[c>>2]=e+j;g[i>>2]=e-j;i=a+ -4|0;j=+g[i>>2];c=a+ -20|0;e=+g[c>>2];f=j-e;b=j+e;e=+g[h>>2]+ +g[l>>2];g[i>>2]=b+e;g[h>>2]=b-e;g[c>>2]=f-k;g[l>>2]=k+f;return}function Ih(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 h=0,j=0,k=0,l=0,m=0,n=0,o=0;h=i;j=e-c|0;e=d-b|0;k=(j|0)/(e|0)|0;l=j>>31|1;m=((j|0)>-1?j:0-j|0)-(aa((k|0)>-1?k:0-k|0,e)|0)|0;j=a+(b<<2)|0;g[j>>2]=+g[14320+(c<<2)>>2]*+g[j>>2];j=b+1|0;if((j|0)>=(((d|0)>(f|0)?f:d)|0)){i=h;return}b=~f;f=~d;d=~((b|0)>(f|0)?b:f);f=0;b=j;j=c;while(1){c=f+m|0;n=(c|0)<(e|0);j=j+k+(n?0:l)|0;o=a+(b<<2)|0;g[o>>2]=+g[14320+(j<<2)>>2]*+g[o>>2];b=b+1|0;if((b|0)==(d|0))break;else f=c-(n?0:e)|0}i=h;return}function Jh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=i;if((b|0)<=0){i=e;return a|0}f=0;g=a+(b<<2)|0;while(1){c[a+(f<<2)>>2]=g;f=f+1|0;if((f|0)==(b|0))break;else g=g+d|0}i=e;return a|0}function Kh(e,f,h,j,k,l,m){e=e|0;f=f|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0.0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;n=i;o=c[j>>2]|0;p=c[k>>2]|0;q=c[f>>2]|0;if(!(a[f+21>>0]|0)){qg(e,21);r=0;i=n;return r|0}a:do if((m|0)>0){s=e+1412|0;t=e+1408|0;u=f+8|0;v=l<<1;w=f+22|0;x=f+28|0;y=h+4|0;z=f+28|0;A=f+28|0;B=f+28|0;C=m;D=o;E=q;F=p;while(1){if((c[s>>2]|0)<10)xh(e);G=c[t>>2]|0;H=b[f+((G&1023)<<1)+36>>1]|0;I=H<<16>>16;if(H<<16>>16>-1){H=d[(c[u>>2]|0)+I>>0]|0;c[t>>2]=G>>>H;G=(c[s>>2]|0)-H|0;H=(G|0)<0;c[s>>2]=H?0:G;J=H?-1:I}else J=yh(e,f)|0;if((J|0)<0)break;I=F<<1;if((I+E+D|0)>(v|0))K=v-I+D|0;else K=E;I=aa(c[f>>2]|0,J)|0;if(!(a[w>>0]|0)){if((D|0)==1){H=c[h+(D<<2)>>2]|0;if(H){G=H+(F<<2)|0;g[G>>2]=+g[G>>2]+(+g[(c[x>>2]|0)+(I<<2)>>2]+0.0)}L=0;M=1;N=F+1|0}else{L=D;M=0;N=F}G=c[h>>2]|0;H=c[y>>2]|0;if((M+1|0)<(K|0)){O=c[A>>2]|0;P=(G|0)==0;Q=(H|0)==0;R=M;S=N;while(1){T=R+I|0;U=+g[O+(T+1<<2)>>2]+0.0;if(!P){V=G+(S<<2)|0;g[V>>2]=+g[V>>2]+(+g[O+(T<<2)>>2]+0.0)}if(!Q){T=H+(S<<2)|0;g[T>>2]=U+ +g[T>>2]}T=S+1|0;V=R+2|0;if((R+3|0)<(K|0)){R=V;S=T}else{W=V;X=T;break}}}else{W=M;X=N}if((W|0)<(K|0)){S=c[h+(L<<2)>>2]|0;if(S){R=S+(X<<2)|0;g[R>>2]=+g[R>>2]+(+g[(c[z>>2]|0)+(W+I<<2)>>2]+0.0)}R=L+1|0;S=(R|0)==2;Y=S?0:R;Z=X+(S&1)|0}else{Y=L;Z=X}}else if((K|0)>0){S=c[B>>2]|0;R=D;H=0;U=0.0;Q=F;while(1){U=U+ +g[S+(H+I<<2)>>2];O=c[h+(R<<2)>>2]|0;if(O){G=O+(Q<<2)|0;g[G>>2]=U+ +g[G>>2]}G=R+1|0;O=(G|0)==2;P=(O&1)+Q|0;T=O?0:G;H=H+1|0;if((H|0)==(K|0)){Y=T;Z=P;break}else{R=T;Q=P}}}else{Y=D;Z=F}C=C-K|0;if((C|0)<=0){_=Y;$=Z;break a}else{D=Y;E=K;F=Z}}if((a[e+1392>>0]|0)==0?(c[e+1400>>2]|0)!=0:0){r=0;i=n;return r|0}qg(e,21);r=0;i=n;return r|0}else{_=o;$=p}while(0);c[j>>2]=_;c[k>>2]=$;r=1;i=n;return r|0}function Lh(e,f,h,j,k,l,m,n){e=e|0;f=f|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0.0,V=0,W=0,X=0;o=i;p=c[k>>2]|0;q=c[l>>2]|0;r=c[f>>2]|0;if(!(a[f+21>>0]|0)){qg(e,21);s=0;i=o;return s|0}a:do if((n|0)>0){t=e+1412|0;u=e+1408|0;v=f+8|0;w=f+23|0;x=aa(m,j)|0;y=f+22|0;z=f+28|0;A=f+28|0;B=f+2092|0;C=n;D=p;E=r;F=q;while(1){if((c[t>>2]|0)<10)xh(e);G=c[u>>2]|0;H=b[f+((G&1023)<<1)+36>>1]|0;I=H<<16>>16;if(H<<16>>16>-1){H=d[(c[v>>2]|0)+I>>0]|0;c[u>>2]=G>>>H;G=(c[t>>2]|0)-H|0;H=(G|0)<0;c[t>>2]=H?0:G;J=H?-1:I}else J=yh(e,f)|0;if((a[w>>0]|0)!=0?(J|0)>=(c[B>>2]|0):0){K=12;break}if((J|0)<0)break;I=aa(F,j)|0;if((E+I+D|0)>(x|0))L=x-I+D|0;else L=E;I=aa(c[f>>2]|0,J)|0;H=(L|0)>0;if(!(a[y>>0]|0))if(H){G=D;M=0;N=F;while(1){O=c[h+(G<<2)>>2]|0;if(O){P=O+(N<<2)|0;g[P>>2]=+g[P>>2]+(+g[(c[A>>2]|0)+(M+I<<2)>>2]+0.0)}P=G+1|0;O=(P|0)==(j|0);Q=(O&1)+N|0;R=O?0:P;M=M+1|0;if((M|0)==(L|0)){S=R;T=Q;break}else{G=R;N=Q}}}else{S=D;T=F}else if(H){N=c[z>>2]|0;G=D;M=0;U=0.0;Q=F;while(1){U=U+ +g[N+(M+I<<2)>>2];R=c[h+(G<<2)>>2]|0;if(R){P=R+(Q<<2)|0;g[P>>2]=U+ +g[P>>2]}P=G+1|0;R=(P|0)==(j|0);O=(R&1)+Q|0;V=R?0:P;M=M+1|0;if((M|0)==(L|0)){S=V;T=O;break}else{G=V;Q=O}}}else{S=D;T=F}C=C-L|0;if((C|0)<=0){W=S;X=T;break a}else{D=S;E=L;F=T}}if((K|0)==12)va(15392,12536,1432,15432);if((a[e+1392>>0]|0)==0?(c[e+1400>>2]|0)!=0:0){s=0;i=o;return s|0}qg(e,21);s=0;i=o;return s|0}else{W=p;X=q}while(0);c[k>>2]=W;c[l>>2]=X;s=1;i=o;return s|0}function Mh(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0;h=i;a:do if(!g){j=(f|0)/(c[b>>2]|0)|0;if((j|0)>0){k=f-e|0;l=0;while(1){if(!(Nh(a,b,d+(l+e<<2)|0,k-l|0,j)|0)){m=0;break a}l=l+1|0;if((l|0)>=(j|0)){m=1;break}}}else m=1}else if((f|0)>0){j=e;l=0;while(1){if(!(Oh(a,b,d+(j<<2)|0,f-l|0)|0)){m=0;break a}k=c[b>>2]|0;l=k+l|0;if((l|0)>=(f|0)){m=1;break}else j=k+j|0}}else m=1;while(0);i=h;return m|0}function Nh(b,d,e,f,h){b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0.0,p=0.0;j=i;k=Ph(b,d)|0;if((k|0)<0){l=0;i=j;return l|0}b=c[d>>2]|0;m=aa(b,k)|0;if((((b|0)<(f|0)?b:f)|0)<=0){l=1;i=j;return l|0}k=c[d+28>>2]|0;n=d+22|0;d=~b;b=~f;f=~((d|0)>(b|0)?d:b);b=0;o=0.0;while(1){p=o+ +g[k+(b+m<<2)>>2];d=e+((aa(b,h)|0)<<2)|0;g[d>>2]=+g[d>>2]+p;b=b+1|0;if((b|0)==(f|0)){l=1;break}else o=(a[n>>0]|0)==0?o:p}i=j;return l|0}function Oh(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0;h=i;j=Ph(b,d)|0;if((j|0)<0){k=0;i=h;return k|0}b=c[d>>2]|0;l=aa(b,j)|0;j=(((b|0)<(f|0)?b:f)|0)>0;if(!(a[d+22>>0]|0)){if(!j){k=1;i=h;return k|0}m=c[d+28>>2]|0;n=~b;o=~f;p=~((n|0)>(o|0)?n:o);o=0;do{n=e+(o<<2)|0;g[n>>2]=+g[n>>2]+(+g[m+(o+l<<2)>>2]+0.0);o=o+1|0}while((o|0)!=(p|0));k=1;i=h;return k|0}else{if(!j){k=1;i=h;return k|0}j=c[d+28>>2]|0;p=d+12|0;d=~b;b=~f;f=~((d|0)>(b|0)?d:b);b=0;q=0.0;while(1){r=q+ +g[j+(b+l<<2)>>2];d=e+(b<<2)|0;g[d>>2]=+g[d>>2]+r;b=b+1|0;if((b|0)==(f|0)){k=1;break}else q=r+ +g[p>>2]}i=h;return k|0}return 0}function Ph(e,f){e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;g=i;if(!(a[f+21>>0]|0)){qg(e,21);h=-1;i=g;return h|0}j=e+1412|0;if((c[j>>2]|0)<10)xh(e);k=e+1408|0;l=c[k>>2]|0;m=b[f+((l&1023)<<1)+36>>1]|0;n=m<<16>>16;if(m<<16>>16>-1){m=d[(c[f+8>>2]|0)+n>>0]|0;c[k>>2]=l>>>m;l=(c[j>>2]|0)-m|0;m=(l|0)<0;c[j>>2]=m?0:l;o=m?-1:n}else o=yh(e,f)|0;if((a[f+23>>0]|0)!=0?(o|0)>=(c[f+2092>>2]|0):0)va(15344,12536,1338,15368);if((o|0)>=0){h=o;i=g;return h|0}if((a[e+1392>>0]|0)==0?(c[e+1400>>2]|0)!=0:0){h=o;i=g;return h|0}qg(e,21);h=o;i=g;return h|0}function Qh(a,b){a=+a;b=b|0;var c=0,d=0.0;c=i;d=+Zh(a,b);i=c;return+d}function Rh(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=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,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,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,$=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0;f=i;i=i+944|0;g=f+680|0;h=f+424|0;j=f;k=f+232|0;l=aa(d,b)|0;if(!l){i=f;return}b=l-d|0;c[k+4>>2]=d;c[k>>2]=d;m=d;n=d;o=2;while(1){p=m+d+n|0;c[k+(o<<2)>>2]=p;if(p>>>0<l>>>0){q=n;n=p;o=o+1|0;m=q}else break}m=0-d|0;o=a+b|0;if((b|0)>0){b=(d|0)==0;n=d>>>0>256?256:d;l=(n|0)==(d|0);q=o;p=1;r=0;s=a;t=1;while(1){do if((p&3|0)!=3){u=t+ -1|0;a:do if((c[k+(u<<2)>>2]|0)>>>0<(q-s|0)>>>0){c[j>>2]=s;if((t|0)>1){v=t;w=s;x=s;y=1;while(1){z=w+m|0;A=v+ -2|0;B=w+(0-((c[k+(A<<2)>>2]|0)+d))|0;if((Uc[e&3](x,B)|0)>-1?(Uc[e&3](x,z)|0)>-1:0){C=y;break}D=y+1|0;E=j+(y<<2)|0;if((Uc[e&3](B,z)|0)>-1){c[E>>2]=B;F=B;G=v+ -1|0}else{c[E>>2]=z;F=z;G=A}if((G|0)<=1){C=D;break}v=G;w=F;x=c[j>>2]|0;y=D}if((C|0)>=2?(y=j+(C<<2)|0,c[y>>2]=g,!b):0){if((C|0)>0){H=d;I=g}else{x=c[j>>2]|0;oi(g|0,x|0,n|0)|0;if(l)break;else{J=d;K=n}while(1){J=J-K|0;K=J>>>0>256?256:J;oi(g|0,x|0,K|0)|0;if((J|0)==(K|0))break a}}while(1){x=H>>>0>256?256:H;w=c[j>>2]|0;oi(I|0,w|0,x|0)|0;v=w;w=0;do{D=w;w=w+1|0;A=v;v=c[j+(w<<2)>>2]|0;oi(A|0,v|0,x|0)|0;c[j+(D<<2)>>2]=A+x}while((w|0)!=(C|0));if((H|0)==(x|0))break a;H=H-x|0;I=c[y>>2]|0}}}}else Sh(s,d,e,p,r,t,0,k);while(0);if((t|0)==1){L=p<<1;M=p>>>31|r<<1;N=0;break}else{y=u>>>0>31;w=y?0:p;v=y?t+ -33|0:u;L=w<<v;M=w>>>(32-v|0)|(y?p:r)<<v;N=1;break}}else{c[j>>2]=s;b:do if((t|0)>1){v=t;y=s;w=s;A=1;while(1){D=y+m|0;z=v+ -2|0;E=y+(0-((c[k+(z<<2)>>2]|0)+d))|0;if((Uc[e&3](w,E)|0)>-1?(Uc[e&3](w,D)|0)>-1:0){O=A;break}B=A+1|0;P=j+(A<<2)|0;if((Uc[e&3](E,D)|0)>-1){c[P>>2]=E;Q=E;R=v+ -1|0}else{c[P>>2]=D;Q=D;R=z}if((R|0)<=1){O=B;break}v=R;y=Q;w=c[j>>2]|0;A=B}if((O|0)>=2?(A=j+(O<<2)|0,c[A>>2]=h,!b):0){if((O|0)>0){S=d;T=h}else{w=c[j>>2]|0;oi(h|0,w|0,n|0)|0;if(l)break;else{U=d;V=n}while(1){U=U-V|0;V=U>>>0>256?256:U;oi(h|0,w|0,V|0)|0;if((U|0)==(V|0))break b}}while(1){w=S>>>0>256?256:S;y=c[j>>2]|0;oi(T|0,y|0,w|0)|0;v=y;y=0;do{B=y;y=y+1|0;z=v;v=c[j+(y<<2)>>2]|0;oi(z|0,v|0,w|0)|0;c[j+(B<<2)>>2]=z+w}while((y|0)!=(O|0));if((S|0)==(w|0))break b;S=S-w|0;T=c[A>>2]|0}}}while(0);L=p>>>2|r<<30;M=r>>>2;N=t+2|0}while(0);u=L|1;A=s+d|0;if(A>>>0<o>>>0){p=u;r=M;s=A;t=N}else{W=M;X=u;Y=A;Z=N;break}}}else{W=0;X=1;Y=a;Z=1}Sh(Y,d,e,X,W,Z,0,k);a=X;X=W;W=Y;Y=Z;while(1){if((Y|0)==1){if((a|0)==1)if(!X)break;else _=52}else _=52;if((_|0)==52?(_=0,(Y|0)>=2):0){Z=a>>>30;N=Y+ -2|0;M=(a<<1&2147483646|Z<<31)^3;t=(Z|X<<2)>>>1;Sh(W+(0-((c[k+(N<<2)>>2]|0)+d))|0,d,e,M,t,Y+ -1|0,1,k);s=t<<1|Z&1;Z=M<<1|1;M=W+m|0;Sh(M,d,e,Z,s,N,1,k);a=Z;X=s;W=M;Y=N;continue}N=a+ -1|0;if(N){if(!(N&1)){M=N;N=0;do{N=N+1|0;M=M>>>1}while((M&1|0)==0);if(N)$=N;else _=57}else _=57;if((_|0)==57){_=0;if(X)if(!(X&1)){M=X;s=0;while(1){Z=s+1|0;M=M>>>1;if(M&1){ba=Z;break}else s=Z}}else ba=0;else ba=32;$=(ba|0)==0?0:ba+32|0}if($>>>0>31){ca=$;_=62}else{da=$;ea=a;fa=X;ga=$}}else{ca=32;_=62}if((_|0)==62){_=0;da=ca+ -32|0;ea=X;fa=0;ga=ca}a=fa<<32-da|ea>>>da;X=fa>>>da;W=W+m|0;Y=ga+Y|0}i=f;return}function Sh(a,b,d,e,f,g,h,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var 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,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,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0;k=i;i=i+720|0;l=k+456|0;m=k;n=k+228|0;c[n>>2]=a;o=0-b|0;a:do if((e|0)==1&(f|0)==0){p=a;q=g;r=h;s=1;t=18}else{u=g;v=a;w=h;x=e;y=f;z=a;A=1;while(1){B=v+(0-(c[j+(u<<2)>>2]|0))|0;if((Uc[d&3](B,z)|0)<1){p=v;q=u;r=w;s=A;t=18;break a}if((w|0)==0&(u|0)>1){C=c[j+(u+ -2<<2)>>2]|0;if((Uc[d&3](v+o|0,B)|0)>-1){D=v;E=u;F=A;break a}if((Uc[d&3](v+(0-(C+b))|0,B)|0)>-1){D=v;E=u;F=A;break a}}C=A+1|0;c[n+(A<<2)>>2]=B;G=x+ -1|0;if(G){if(!(G&1)){H=G;G=0;do{G=G+1|0;H=H>>>1}while((H&1|0)==0);if(G)I=G;else t=10}else t=10;if((t|0)==10){t=0;if(y)if(!(y&1)){H=y;J=0;while(1){K=J+1|0;H=H>>>1;if(H&1){L=K;break}else J=K}}else L=0;else L=32;I=(L|0)==0?0:L+32|0}if(I>>>0>31){M=I;t=15}else{N=I;O=x;P=y;Q=I}}else{M=32;t=15}if((t|0)==15){t=0;N=M+ -32|0;O=y;P=0;Q=M}J=P<<32-N|O>>>N;H=P>>>N;G=Q+u|0;if((J|0)==1&(H|0)==0){D=B;E=G;F=C;break a}u=G;v=B;w=0;x=J;y=H;z=c[n>>2]|0;A=C}}while(0);if((t|0)==18)if(!r){D=p;E=q;F=s}else{i=k;return}b:do if((F|0)>=2?(s=n+(F<<2)|0,c[s>>2]=l,(b|0)!=0):0){if((F|0)>0){R=b;S=l}else{q=b>>>0>256?256:b;p=c[n>>2]|0;oi(l|0,p|0,q|0)|0;if((q|0)==(b|0))break;else{T=b;U=q}while(1){T=T-U|0;U=T>>>0>256?256:T;oi(l|0,p|0,U|0)|0;if((T|0)==(U|0))break b}}while(1){p=R>>>0>256?256:R;q=c[n>>2]|0;oi(S|0,q|0,p|0)|0;r=q;q=0;do{t=q;q=q+1|0;Q=r;r=c[n+(q<<2)>>2]|0;oi(Q|0,r|0,p|0)|0;c[n+(t<<2)>>2]=Q+p}while((q|0)!=(F|0));if((R|0)==(p|0))break b;R=R-p|0;S=c[s>>2]|0}}while(0);c[m>>2]=D;c:do if((E|0)>1){S=E;R=D;F=D;n=1;while(1){U=R+o|0;T=S+ -2|0;s=R+(0-((c[j+(T<<2)>>2]|0)+b))|0;if((Uc[d&3](F,s)|0)>-1?(Uc[d&3](F,U)|0)>-1:0){V=n;break}q=n+1|0;r=m+(n<<2)|0;if((Uc[d&3](s,U)|0)>-1){c[r>>2]=s;W=s;X=S+ -1|0}else{c[r>>2]=U;W=U;X=T}if((X|0)<=1){V=q;break}S=X;R=W;F=c[m>>2]|0;n=q}if((V|0)>=2?(n=m+(V<<2)|0,c[n>>2]=l,(b|0)!=0):0){if((V|0)>0){Y=b;Z=l}else{F=b>>>0>256?256:b;R=c[m>>2]|0;oi(l|0,R|0,F|0)|0;if((F|0)==(b|0)){_=l;break}else{$=b;aa=F}while(1){$=$-aa|0;aa=$>>>0>256?256:$;oi(l|0,R|0,aa|0)|0;if(($|0)==(aa|0)){_=l;break c}}}while(1){R=Y>>>0>256?256:Y;F=c[m>>2]|0;oi(Z|0,F|0,R|0)|0;S=F;F=0;do{q=F;F=F+1|0;T=S;S=c[m+(F<<2)>>2]|0;oi(T|0,S|0,R|0)|0;c[m+(q<<2)>>2]=T+R}while((F|0)!=(V|0));if((Y|0)==(R|0)){_=l;break c}Y=Y-R|0;Z=c[n>>2]|0}}else _=l}else _=l;while(0);i=k;return}function Th(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;f=c&255;c=d;while(1){if(!c){g=0;h=4;break}c=c+ -1|0;d=b+c|0;if((a[d>>0]|0)==f<<24>>24){g=d;h=4;break}}if((h|0)==4){i=e;return g|0}return 0}function Uh(a,b){a=a|0;b=b|0;var c=0,d=0;c=i;d=Th(a,b,(vi(a|0)|0)+1|0)|0;i=c;return d|0}function Vh(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=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,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,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,$=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=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Da=0,Ea=0,Fa=0,Ga=0,Ia=0,Ja=0,Ka=0,La=0;b=i;do if(a>>>0<245){if(a>>>0<11)d=16;else d=a+11&-8;e=d>>>3;f=c[3890]|0;g=f>>>e;if(g&3){h=(g&1^1)+e|0;j=h<<1;k=15600+(j<<2)|0;l=15600+(j+2<<2)|0;j=c[l>>2]|0;m=j+8|0;n=c[m>>2]|0;do if((k|0)!=(n|0)){if(n>>>0<(c[3894]|0)>>>0)dc();o=n+12|0;if((c[o>>2]|0)==(j|0)){c[o>>2]=k;c[l>>2]=n;break}else dc()}else c[3890]=f&~(1<<h);while(0);n=h<<3;c[j+4>>2]=n|3;l=j+(n|4)|0;c[l>>2]=c[l>>2]|1;p=m;i=b;return p|0}if(d>>>0>(c[3892]|0)>>>0){if(g){l=2<<e;n=g<<e&(l|0-l);l=(n&0-n)+ -1|0;n=l>>>12&16;k=l>>>n;l=k>>>5&8;o=k>>>l;k=o>>>2&4;q=o>>>k;o=q>>>1&2;r=q>>>o;q=r>>>1&1;s=(l|n|k|o|q)+(r>>>q)|0;q=s<<1;r=15600+(q<<2)|0;o=15600+(q+2<<2)|0;q=c[o>>2]|0;k=q+8|0;n=c[k>>2]|0;do if((r|0)!=(n|0)){if(n>>>0<(c[3894]|0)>>>0)dc();l=n+12|0;if((c[l>>2]|0)==(q|0)){c[l>>2]=r;c[o>>2]=n;break}else dc()}else c[3890]=f&~(1<<s);while(0);f=s<<3;n=f-d|0;c[q+4>>2]=d|3;o=q+d|0;c[q+(d|4)>>2]=n|1;c[q+f>>2]=n;f=c[3892]|0;if(f){r=c[3895]|0;e=f>>>3;f=e<<1;g=15600+(f<<2)|0;m=c[3890]|0;j=1<<e;if(m&j){e=15600+(f+2<<2)|0;h=c[e>>2]|0;if(h>>>0<(c[3894]|0)>>>0)dc();else{t=e;u=h}}else{c[3890]=m|j;t=15600+(f+2<<2)|0;u=g}c[t>>2]=r;c[u+12>>2]=r;c[r+8>>2]=u;c[r+12>>2]=g}c[3892]=n;c[3895]=o;p=k;i=b;return p|0}o=c[3891]|0;if(o){n=(o&0-o)+ -1|0;o=n>>>12&16;g=n>>>o;n=g>>>5&8;r=g>>>n;g=r>>>2&4;f=r>>>g;r=f>>>1&2;j=f>>>r;f=j>>>1&1;m=c[15864+((n|o|g|r|f)+(j>>>f)<<2)>>2]|0;f=(c[m+4>>2]&-8)-d|0;j=m;r=m;while(1){m=c[j+16>>2]|0;if(!m){g=c[j+20>>2]|0;if(!g)break;else v=g}else v=m;m=(c[v+4>>2]&-8)-d|0;g=m>>>0<f>>>0;f=g?m:f;j=v;r=g?v:r}j=c[3894]|0;if(r>>>0<j>>>0)dc();k=r+d|0;if(r>>>0>=k>>>0)dc();q=c[r+24>>2]|0;s=c[r+12>>2]|0;do if((s|0)==(r|0)){g=r+20|0;m=c[g>>2]|0;if(!m){o=r+16|0;n=c[o>>2]|0;if(!n){w=0;break}else{x=n;y=o}}else{x=m;y=g}while(1){g=x+20|0;m=c[g>>2]|0;if(m){x=m;y=g;continue}g=x+16|0;m=c[g>>2]|0;if(!m)break;else{x=m;y=g}}if(y>>>0<j>>>0)dc();else{c[y>>2]=0;w=x;break}}else{g=c[r+8>>2]|0;if(g>>>0<j>>>0)dc();m=g+12|0;if((c[m>>2]|0)!=(r|0))dc();o=s+8|0;if((c[o>>2]|0)==(r|0)){c[m>>2]=s;c[o>>2]=g;w=s;break}else dc()}while(0);do if(q){s=c[r+28>>2]|0;j=15864+(s<<2)|0;if((r|0)==(c[j>>2]|0)){c[j>>2]=w;if(!w){c[3891]=c[3891]&~(1<<s);break}}else{if(q>>>0<(c[3894]|0)>>>0)dc();s=q+16|0;if((c[s>>2]|0)==(r|0))c[s>>2]=w;else c[q+20>>2]=w;if(!w)break}if(w>>>0<(c[3894]|0)>>>0)dc();c[w+24>>2]=q;s=c[r+16>>2]|0;do if(s)if(s>>>0<(c[3894]|0)>>>0)dc();else{c[w+16>>2]=s;c[s+24>>2]=w;break}while(0);s=c[r+20>>2]|0;if(s)if(s>>>0<(c[3894]|0)>>>0)dc();else{c[w+20>>2]=s;c[s+24>>2]=w;break}}while(0);if(f>>>0<16){q=f+d|0;c[r+4>>2]=q|3;s=r+(q+4)|0;c[s>>2]=c[s>>2]|1}else{c[r+4>>2]=d|3;c[r+(d|4)>>2]=f|1;c[r+(f+d)>>2]=f;s=c[3892]|0;if(s){q=c[3895]|0;j=s>>>3;s=j<<1;g=15600+(s<<2)|0;o=c[3890]|0;m=1<<j;if(o&m){j=15600+(s+2<<2)|0;n=c[j>>2]|0;if(n>>>0<(c[3894]|0)>>>0)dc();else{z=j;A=n}}else{c[3890]=o|m;z=15600+(s+2<<2)|0;A=g}c[z>>2]=q;c[A+12>>2]=q;c[q+8>>2]=A;c[q+12>>2]=g}c[3892]=f;c[3895]=k}p=r+8|0;i=b;return p|0}else B=d}else B=d}else if(a>>>0<=4294967231){g=a+11|0;q=g&-8;s=c[3891]|0;if(s){m=0-q|0;o=g>>>8;if(o)if(q>>>0>16777215)C=31;else{g=(o+1048320|0)>>>16&8;n=o<<g;o=(n+520192|0)>>>16&4;j=n<<o;n=(j+245760|0)>>>16&2;h=14-(o|g|n)+(j<<n>>>15)|0;C=q>>>(h+7|0)&1|h<<1}else C=0;h=c[15864+(C<<2)>>2]|0;a:do if(!h){D=m;E=0;F=0}else{if((C|0)==31)G=0;else G=25-(C>>>1)|0;n=m;j=0;g=q<<G;o=h;e=0;while(1){l=c[o+4>>2]&-8;H=l-q|0;if(H>>>0<n>>>0)if((l|0)==(q|0)){D=H;E=o;F=o;break a}else{I=H;J=o}else{I=n;J=e}H=c[o+20>>2]|0;o=c[o+(g>>>31<<2)+16>>2]|0;l=(H|0)==0|(H|0)==(o|0)?j:H;if(!o){D=I;E=l;F=J;break}else{n=I;j=l;g=g<<1;e=J}}}while(0);if((E|0)==0&(F|0)==0){h=2<<C;m=s&(h|0-h);if(!m){B=q;break}h=(m&0-m)+ -1|0;m=h>>>12&16;r=h>>>m;h=r>>>5&8;k=r>>>h;r=k>>>2&4;f=k>>>r;k=f>>>1&2;e=f>>>k;f=e>>>1&1;K=c[15864+((h|m|r|k|f)+(e>>>f)<<2)>>2]|0}else K=E;if(!K){L=D;M=F}else{f=D;e=K;k=F;while(1){r=(c[e+4>>2]&-8)-q|0;m=r>>>0<f>>>0;h=m?r:f;r=m?e:k;m=c[e+16>>2]|0;if(m){f=h;e=m;k=r;continue}e=c[e+20>>2]|0;if(!e){L=h;M=r;break}else{f=h;k=r}}}if((M|0)!=0?L>>>0<((c[3892]|0)-q|0)>>>0:0){k=c[3894]|0;if(M>>>0<k>>>0)dc();f=M+q|0;if(M>>>0>=f>>>0)dc();e=c[M+24>>2]|0;s=c[M+12>>2]|0;do if((s|0)==(M|0)){r=M+20|0;h=c[r>>2]|0;if(!h){m=M+16|0;g=c[m>>2]|0;if(!g){N=0;break}else{O=g;P=m}}else{O=h;P=r}while(1){r=O+20|0;h=c[r>>2]|0;if(h){O=h;P=r;continue}r=O+16|0;h=c[r>>2]|0;if(!h)break;else{O=h;P=r}}if(P>>>0<k>>>0)dc();else{c[P>>2]=0;N=O;break}}else{r=c[M+8>>2]|0;if(r>>>0<k>>>0)dc();h=r+12|0;if((c[h>>2]|0)!=(M|0))dc();m=s+8|0;if((c[m>>2]|0)==(M|0)){c[h>>2]=s;c[m>>2]=r;N=s;break}else dc()}while(0);do if(e){s=c[M+28>>2]|0;k=15864+(s<<2)|0;if((M|0)==(c[k>>2]|0)){c[k>>2]=N;if(!N){c[3891]=c[3891]&~(1<<s);break}}else{if(e>>>0<(c[3894]|0)>>>0)dc();s=e+16|0;if((c[s>>2]|0)==(M|0))c[s>>2]=N;else c[e+20>>2]=N;if(!N)break}if(N>>>0<(c[3894]|0)>>>0)dc();c[N+24>>2]=e;s=c[M+16>>2]|0;do if(s)if(s>>>0<(c[3894]|0)>>>0)dc();else{c[N+16>>2]=s;c[s+24>>2]=N;break}while(0);s=c[M+20>>2]|0;if(s)if(s>>>0<(c[3894]|0)>>>0)dc();else{c[N+20>>2]=s;c[s+24>>2]=N;break}}while(0);b:do if(L>>>0>=16){c[M+4>>2]=q|3;c[M+(q|4)>>2]=L|1;c[M+(L+q)>>2]=L;e=L>>>3;if(L>>>0<256){s=e<<1;k=15600+(s<<2)|0;r=c[3890]|0;m=1<<e;do if(!(r&m)){c[3890]=r|m;Q=15600+(s+2<<2)|0;R=k}else{e=15600+(s+2<<2)|0;h=c[e>>2]|0;if(h>>>0>=(c[3894]|0)>>>0){Q=e;R=h;break}dc()}while(0);c[Q>>2]=f;c[R+12>>2]=f;c[M+(q+8)>>2]=R;c[M+(q+12)>>2]=k;break}s=L>>>8;if(s)if(L>>>0>16777215)S=31;else{m=(s+1048320|0)>>>16&8;r=s<<m;s=(r+520192|0)>>>16&4;h=r<<s;r=(h+245760|0)>>>16&2;e=14-(s|m|r)+(h<<r>>>15)|0;S=L>>>(e+7|0)&1|e<<1}else S=0;e=15864+(S<<2)|0;c[M+(q+28)>>2]=S;c[M+(q+20)>>2]=0;c[M+(q+16)>>2]=0;r=c[3891]|0;h=1<<S;if(!(r&h)){c[3891]=r|h;c[e>>2]=f;c[M+(q+24)>>2]=e;c[M+(q+12)>>2]=f;c[M+(q+8)>>2]=f;break}h=c[e>>2]|0;if((S|0)==31)T=0;else T=25-(S>>>1)|0;c:do if((c[h+4>>2]&-8|0)!=(L|0)){e=L<<T;r=h;while(1){U=r+(e>>>31<<2)+16|0;m=c[U>>2]|0;if(!m)break;if((c[m+4>>2]&-8|0)==(L|0)){V=m;break c}else{e=e<<1;r=m}}if(U>>>0<(c[3894]|0)>>>0)dc();else{c[U>>2]=f;c[M+(q+24)>>2]=r;c[M+(q+12)>>2]=f;c[M+(q+8)>>2]=f;break b}}else V=h;while(0);h=V+8|0;k=c[h>>2]|0;e=c[3894]|0;if(V>>>0<e>>>0)dc();if(k>>>0<e>>>0)dc();else{c[k+12>>2]=f;c[h>>2]=f;c[M+(q+8)>>2]=k;c[M+(q+12)>>2]=V;c[M+(q+24)>>2]=0;break}}else{k=L+q|0;c[M+4>>2]=k|3;h=M+(k+4)|0;c[h>>2]=c[h>>2]|1}while(0);p=M+8|0;i=b;return p|0}else B=q}else B=q}else B=-1;while(0);M=c[3892]|0;if(B>>>0<=M>>>0){L=M-B|0;V=c[3895]|0;if(L>>>0>15){c[3895]=V+B;c[3892]=L;c[V+(B+4)>>2]=L|1;c[V+M>>2]=L;c[V+4>>2]=B|3}else{c[3892]=0;c[3895]=0;c[V+4>>2]=M|3;L=V+(M+4)|0;c[L>>2]=c[L>>2]|1}p=V+8|0;i=b;return p|0}V=c[3893]|0;if(B>>>0<V>>>0){L=V-B|0;c[3893]=L;V=c[3896]|0;c[3896]=V+B;c[V+(B+4)>>2]=L|1;c[V+4>>2]=B|3;p=V+8|0;i=b;return p|0}do if(!(c[4008]|0)){V=Ha(30)|0;if(!(V+ -1&V)){c[4010]=V;c[4009]=V;c[4011]=-1;c[4012]=-1;c[4013]=0;c[4001]=0;c[4008]=(Ab(0)|0)&-16^1431655768;break}else dc()}while(0);V=B+48|0;L=c[4010]|0;M=B+47|0;U=L+M|0;T=0-L|0;L=U&T;if(L>>>0<=B>>>0){p=0;i=b;return p|0}S=c[4e3]|0;if((S|0)!=0?(R=c[3998]|0,Q=R+L|0,Q>>>0<=R>>>0|Q>>>0>S>>>0):0){p=0;i=b;return p|0}d:do if(!(c[4001]&4)){S=c[3896]|0;e:do if(S){Q=16008|0;while(1){R=c[Q>>2]|0;if(R>>>0<=S>>>0?(W=Q+4|0,(R+(c[W>>2]|0)|0)>>>0>S>>>0):0)break;R=c[Q+8>>2]|0;if(!R){X=182;break e}else Q=R}if(Q){R=U-(c[3893]|0)&T;if(R>>>0<2147483647){N=Ca(R|0)|0;O=(N|0)==((c[Q>>2]|0)+(c[W>>2]|0)|0);Y=N;Z=R;_=O?N:-1;$=O?R:0;X=191}else aa=0}else X=182}else X=182;while(0);do if((X|0)==182){S=Ca(0)|0;if((S|0)!=(-1|0)){q=S;R=c[4009]|0;O=R+ -1|0;if(!(O&q))ba=L;else ba=L-q+(O+q&0-R)|0;R=c[3998]|0;q=R+ba|0;if(ba>>>0>B>>>0&ba>>>0<2147483647){O=c[4e3]|0;if((O|0)!=0?q>>>0<=R>>>0|q>>>0>O>>>0:0){aa=0;break}O=Ca(ba|0)|0;q=(O|0)==(S|0);Y=O;Z=ba;_=q?S:-1;$=q?ba:0;X=191}else aa=0}else aa=0}while(0);f:do if((X|0)==191){q=0-Z|0;if((_|0)!=(-1|0)){ca=_;da=$;X=202;break d}do if((Y|0)!=(-1|0)&Z>>>0<2147483647&Z>>>0<V>>>0?(S=c[4010]|0,O=M-Z+S&0-S,O>>>0<2147483647):0)if((Ca(O|0)|0)==(-1|0)){Ca(q|0)|0;aa=$;break f}else{ea=O+Z|0;break}else ea=Z;while(0);if((Y|0)==(-1|0))aa=$;else{ca=Y;da=ea;X=202;break d}}while(0);c[4001]=c[4001]|4;fa=aa;X=199}else{fa=0;X=199}while(0);if((((X|0)==199?L>>>0<2147483647:0)?(aa=Ca(L|0)|0,L=Ca(0)|0,(L|0)!=(-1|0)&(aa|0)!=(-1|0)&aa>>>0<L>>>0):0)?(ea=L-aa|0,L=ea>>>0>(B+40|0)>>>0,L):0){ca=aa;da=L?ea:fa;X=202}if((X|0)==202){fa=(c[3998]|0)+da|0;c[3998]=fa;if(fa>>>0>(c[3999]|0)>>>0)c[3999]=fa;fa=c[3896]|0;g:do if(fa){ea=16008|0;while(1){ga=c[ea>>2]|0;ha=ea+4|0;ia=c[ha>>2]|0;if((ca|0)==(ga+ia|0)){X=214;break}L=c[ea+8>>2]|0;if(!L)break;else ea=L}if(((X|0)==214?(c[ea+12>>2]&8|0)==0:0)?fa>>>0>=ga>>>0&fa>>>0<ca>>>0:0){c[ha>>2]=ia+da;L=(c[3893]|0)+da|0;aa=fa+8|0;if(!(aa&7))ja=0;else ja=0-aa&7;aa=L-ja|0;c[3896]=fa+ja;c[3893]=aa;c[fa+(ja+4)>>2]=aa|1;c[fa+(L+4)>>2]=40;c[3897]=c[4012];break}if(ca>>>0<(c[3894]|0)>>>0)c[3894]=ca;L=ca+da|0;aa=16008|0;while(1){if((c[aa>>2]|0)==(L|0)){X=224;break}Y=c[aa+8>>2]|0;if(!Y)break;else aa=Y}if((X|0)==224?(c[aa+12>>2]&8|0)==0:0){c[aa>>2]=ca;L=aa+4|0;c[L>>2]=(c[L>>2]|0)+da;L=ca+8|0;if(!(L&7))ka=0;else ka=0-L&7;L=ca+(da+8)|0;if(!(L&7))la=0;else la=0-L&7;L=ca+(la+da)|0;ea=ka+B|0;Y=ca+ea|0;$=L-(ca+ka)-B|0;c[ca+(ka+4)>>2]=B|3;h:do if((L|0)!=(c[3896]|0)){if((L|0)==(c[3895]|0)){Z=(c[3892]|0)+$|0;c[3892]=Z;c[3895]=Y;c[ca+(ea+4)>>2]=Z|1;c[ca+(Z+ea)>>2]=Z;break}Z=da+4|0;M=c[ca+(Z+la)>>2]|0;if((M&3|0)==1){V=M&-8;_=M>>>3;i:do if(M>>>0>=256){ba=c[ca+((la|24)+da)>>2]|0;W=c[ca+(da+12+la)>>2]|0;do if((W|0)==(L|0)){T=la|16;U=ca+(Z+T)|0;q=c[U>>2]|0;if(!q){Q=ca+(T+da)|0;T=c[Q>>2]|0;if(!T){ma=0;break}else{na=T;oa=Q}}else{na=q;oa=U}while(1){U=na+20|0;q=c[U>>2]|0;if(q){na=q;oa=U;continue}U=na+16|0;q=c[U>>2]|0;if(!q)break;else{na=q;oa=U}}if(oa>>>0<(c[3894]|0)>>>0)dc();else{c[oa>>2]=0;ma=na;break}}else{U=c[ca+((la|8)+da)>>2]|0;if(U>>>0<(c[3894]|0)>>>0)dc();q=U+12|0;if((c[q>>2]|0)!=(L|0))dc();Q=W+8|0;if((c[Q>>2]|0)==(L|0)){c[q>>2]=W;c[Q>>2]=U;ma=W;break}else dc()}while(0);if(!ba)break;W=c[ca+(da+28+la)>>2]|0;r=15864+(W<<2)|0;do if((L|0)!=(c[r>>2]|0)){if(ba>>>0<(c[3894]|0)>>>0)dc();U=ba+16|0;if((c[U>>2]|0)==(L|0))c[U>>2]=ma;else c[ba+20>>2]=ma;if(!ma)break i}else{c[r>>2]=ma;if(ma)break;c[3891]=c[3891]&~(1<<W);break i}while(0);if(ma>>>0<(c[3894]|0)>>>0)dc();c[ma+24>>2]=ba;W=la|16;r=c[ca+(W+da)>>2]|0;do if(r)if(r>>>0<(c[3894]|0)>>>0)dc();else{c[ma+16>>2]=r;c[r+24>>2]=ma;break}while(0);r=c[ca+(Z+W)>>2]|0;if(!r)break;if(r>>>0<(c[3894]|0)>>>0)dc();else{c[ma+20>>2]=r;c[r+24>>2]=ma;break}}else{r=c[ca+((la|8)+da)>>2]|0;ba=c[ca+(da+12+la)>>2]|0;U=15600+(_<<1<<2)|0;do if((r|0)!=(U|0)){if(r>>>0<(c[3894]|0)>>>0)dc();if((c[r+12>>2]|0)==(L|0))break;dc()}while(0);if((ba|0)==(r|0)){c[3890]=c[3890]&~(1<<_);break}do if((ba|0)==(U|0))pa=ba+8|0;else{if(ba>>>0<(c[3894]|0)>>>0)dc();W=ba+8|0;if((c[W>>2]|0)==(L|0)){pa=W;break}dc()}while(0);c[r+12>>2]=ba;c[pa>>2]=r}while(0);qa=ca+((V|la)+da)|0;ra=V+$|0}else{qa=L;ra=$}_=qa+4|0;c[_>>2]=c[_>>2]&-2;c[ca+(ea+4)>>2]=ra|1;c[ca+(ra+ea)>>2]=ra;_=ra>>>3;if(ra>>>0<256){Z=_<<1;M=15600+(Z<<2)|0;U=c[3890]|0;W=1<<_;do if(!(U&W)){c[3890]=U|W;sa=15600+(Z+2<<2)|0;ta=M}else{_=15600+(Z+2<<2)|0;Q=c[_>>2]|0;if(Q>>>0>=(c[3894]|0)>>>0){sa=_;ta=Q;break}dc()}while(0);c[sa>>2]=Y;c[ta+12>>2]=Y;c[ca+(ea+8)>>2]=ta;c[ca+(ea+12)>>2]=M;break}Z=ra>>>8;do if(!Z)ua=0;else{if(ra>>>0>16777215){ua=31;break}W=(Z+1048320|0)>>>16&8;U=Z<<W;V=(U+520192|0)>>>16&4;Q=U<<V;U=(Q+245760|0)>>>16&2;_=14-(V|W|U)+(Q<<U>>>15)|0;ua=ra>>>(_+7|0)&1|_<<1}while(0);Z=15864+(ua<<2)|0;c[ca+(ea+28)>>2]=ua;c[ca+(ea+20)>>2]=0;c[ca+(ea+16)>>2]=0;M=c[3891]|0;_=1<<ua;if(!(M&_)){c[3891]=M|_;c[Z>>2]=Y;c[ca+(ea+24)>>2]=Z;c[ca+(ea+12)>>2]=Y;c[ca+(ea+8)>>2]=Y;break}_=c[Z>>2]|0;if((ua|0)==31)va=0;else va=25-(ua>>>1)|0;j:do if((c[_+4>>2]&-8|0)!=(ra|0)){Z=ra<<va;M=_;while(1){wa=M+(Z>>>31<<2)+16|0;U=c[wa>>2]|0;if(!U)break;if((c[U+4>>2]&-8|0)==(ra|0)){xa=U;break j}else{Z=Z<<1;M=U}}if(wa>>>0<(c[3894]|0)>>>0)dc();else{c[wa>>2]=Y;c[ca+(ea+24)>>2]=M;c[ca+(ea+12)>>2]=Y;c[ca+(ea+8)>>2]=Y;break h}}else xa=_;while(0);_=xa+8|0;Z=c[_>>2]|0;r=c[3894]|0;if(xa>>>0<r>>>0)dc();if(Z>>>0<r>>>0)dc();else{c[Z+12>>2]=Y;c[_>>2]=Y;c[ca+(ea+8)>>2]=Z;c[ca+(ea+12)>>2]=xa;c[ca+(ea+24)>>2]=0;break}}else{Z=(c[3893]|0)+$|0;c[3893]=Z;c[3896]=Y;c[ca+(ea+4)>>2]=Z|1}while(0);p=ca+(ka|8)|0;i=b;return p|0}ea=16008|0;while(1){ya=c[ea>>2]|0;if(ya>>>0<=fa>>>0?(za=c[ea+4>>2]|0,Aa=ya+za|0,Aa>>>0>fa>>>0):0)break;ea=c[ea+8>>2]|0}ea=ya+(za+ -39)|0;if(!(ea&7))Ba=0;else Ba=0-ea&7;ea=ya+(za+ -47+Ba)|0;Y=ea>>>0<(fa+16|0)>>>0?fa:ea;ea=Y+8|0;$=ca+8|0;if(!($&7))Da=0;else Da=0-$&7;$=da+ -40-Da|0;c[3896]=ca+Da;c[3893]=$;c[ca+(Da+4)>>2]=$|1;c[ca+(da+ -36)>>2]=40;c[3897]=c[4012];c[Y+4>>2]=27;c[ea+0>>2]=c[4002];c[ea+4>>2]=c[4003];c[ea+8>>2]=c[4004];c[ea+12>>2]=c[4005];c[4002]=ca;c[4003]=da;c[4005]=0;c[4004]=ea;ea=Y+28|0;c[ea>>2]=7;if((Y+32|0)>>>0<Aa>>>0){$=ea;do{ea=$;$=$+4|0;c[$>>2]=7}while((ea+8|0)>>>0<Aa>>>0)}if((Y|0)!=(fa|0)){$=Y-fa|0;ea=fa+($+4)|0;c[ea>>2]=c[ea>>2]&-2;c[fa+4>>2]=$|1;c[fa+$>>2]=$;ea=$>>>3;if($>>>0<256){L=ea<<1;aa=15600+(L<<2)|0;Z=c[3890]|0;_=1<<ea;do if(!(Z&_)){c[3890]=Z|_;Ea=15600+(L+2<<2)|0;Fa=aa}else{ea=15600+(L+2<<2)|0;r=c[ea>>2]|0;if(r>>>0>=(c[3894]|0)>>>0){Ea=ea;Fa=r;break}dc()}while(0);c[Ea>>2]=fa;c[Fa+12>>2]=fa;c[fa+8>>2]=Fa;c[fa+12>>2]=aa;break}L=$>>>8;if(L)if($>>>0>16777215)Ga=31;else{_=(L+1048320|0)>>>16&8;Z=L<<_;L=(Z+520192|0)>>>16&4;Y=Z<<L;Z=(Y+245760|0)>>>16&2;r=14-(L|_|Z)+(Y<<Z>>>15)|0;Ga=$>>>(r+7|0)&1|r<<1}else Ga=0;r=15864+(Ga<<2)|0;c[fa+28>>2]=Ga;c[fa+20>>2]=0;c[fa+16>>2]=0;Z=c[3891]|0;Y=1<<Ga;if(!(Z&Y)){c[3891]=Z|Y;c[r>>2]=fa;c[fa+24>>2]=r;c[fa+12>>2]=fa;c[fa+8>>2]=fa;break}Y=c[r>>2]|0;if((Ga|0)==31)Ia=0;else Ia=25-(Ga>>>1)|0;k:do if((c[Y+4>>2]&-8|0)!=($|0)){r=$<<Ia;Z=Y;while(1){Ja=Z+(r>>>31<<2)+16|0;_=c[Ja>>2]|0;if(!_)break;if((c[_+4>>2]&-8|0)==($|0)){Ka=_;break k}else{r=r<<1;Z=_}}if(Ja>>>0<(c[3894]|0)>>>0)dc();else{c[Ja>>2]=fa;c[fa+24>>2]=Z;c[fa+12>>2]=fa;c[fa+8>>2]=fa;break g}}else Ka=Y;while(0);Y=Ka+8|0;$=c[Y>>2]|0;aa=c[3894]|0;if(Ka>>>0<aa>>>0)dc();if($>>>0<aa>>>0)dc();else{c[$+12>>2]=fa;c[Y>>2]=fa;c[fa+8>>2]=$;c[fa+12>>2]=Ka;c[fa+24>>2]=0;break}}}else{$=c[3894]|0;if(($|0)==0|ca>>>0<$>>>0)c[3894]=ca;c[4002]=ca;c[4003]=da;c[4005]=0;c[3899]=c[4008];c[3898]=-1;$=0;do{Y=$<<1;aa=15600+(Y<<2)|0;c[15600+(Y+3<<2)>>2]=aa;c[15600+(Y+2<<2)>>2]=aa;$=$+1|0}while(($|0)!=32);$=ca+8|0;if(!($&7))La=0;else La=0-$&7;$=da+ -40-La|0;c[3896]=ca+La;c[3893]=$;c[ca+(La+4)>>2]=$|1;c[ca+(da+ -36)>>2]=40;c[3897]=c[4012]}while(0);da=c[3893]|0;if(da>>>0>B>>>0){ca=da-B|0;c[3893]=ca;da=c[3896]|0;c[3896]=da+B;c[da+(B+4)>>2]=ca|1;c[da+4>>2]=B|3;p=da+8|0;i=b;return p|0}}c[(Cc()|0)>>2]=12;p=0;i=b;return p|0}function Wh(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=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,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;b=i;if(!a){i=b;return}d=a+ -8|0;e=c[3894]|0;if(d>>>0<e>>>0)dc();f=c[a+ -4>>2]|0;g=f&3;if((g|0)==1)dc();h=f&-8;j=a+(h+ -8)|0;do if(!(f&1)){k=c[d>>2]|0;if(!g){i=b;return}l=-8-k|0;m=a+l|0;n=k+h|0;if(m>>>0<e>>>0)dc();if((m|0)==(c[3895]|0)){o=a+(h+ -4)|0;if((c[o>>2]&3|0)!=3){p=m;q=n;break}c[3892]=n;c[o>>2]=c[o>>2]&-2;c[a+(l+4)>>2]=n|1;c[j>>2]=n;i=b;return}o=k>>>3;if(k>>>0<256){k=c[a+(l+8)>>2]|0;r=c[a+(l+12)>>2]|0;s=15600+(o<<1<<2)|0;if((k|0)!=(s|0)){if(k>>>0<e>>>0)dc();if((c[k+12>>2]|0)!=(m|0))dc()}if((r|0)==(k|0)){c[3890]=c[3890]&~(1<<o);p=m;q=n;break}if((r|0)!=(s|0)){if(r>>>0<e>>>0)dc();s=r+8|0;if((c[s>>2]|0)==(m|0))t=s;else dc()}else t=r+8|0;c[k+12>>2]=r;c[t>>2]=k;p=m;q=n;break}k=c[a+(l+24)>>2]|0;r=c[a+(l+12)>>2]|0;do if((r|0)==(m|0)){s=a+(l+20)|0;o=c[s>>2]|0;if(!o){u=a+(l+16)|0;v=c[u>>2]|0;if(!v){w=0;break}else{x=v;y=u}}else{x=o;y=s}while(1){s=x+20|0;o=c[s>>2]|0;if(o){x=o;y=s;continue}s=x+16|0;o=c[s>>2]|0;if(!o)break;else{x=o;y=s}}if(y>>>0<e>>>0)dc();else{c[y>>2]=0;w=x;break}}else{s=c[a+(l+8)>>2]|0;if(s>>>0<e>>>0)dc();o=s+12|0;if((c[o>>2]|0)!=(m|0))dc();u=r+8|0;if((c[u>>2]|0)==(m|0)){c[o>>2]=r;c[u>>2]=s;w=r;break}else dc()}while(0);if(k){r=c[a+(l+28)>>2]|0;s=15864+(r<<2)|0;if((m|0)==(c[s>>2]|0)){c[s>>2]=w;if(!w){c[3891]=c[3891]&~(1<<r);p=m;q=n;break}}else{if(k>>>0<(c[3894]|0)>>>0)dc();r=k+16|0;if((c[r>>2]|0)==(m|0))c[r>>2]=w;else c[k+20>>2]=w;if(!w){p=m;q=n;break}}if(w>>>0<(c[3894]|0)>>>0)dc();c[w+24>>2]=k;r=c[a+(l+16)>>2]|0;do if(r)if(r>>>0<(c[3894]|0)>>>0)dc();else{c[w+16>>2]=r;c[r+24>>2]=w;break}while(0);r=c[a+(l+20)>>2]|0;if(r)if(r>>>0<(c[3894]|0)>>>0)dc();else{c[w+20>>2]=r;c[r+24>>2]=w;p=m;q=n;break}else{p=m;q=n}}else{p=m;q=n}}else{p=d;q=h}while(0);if(p>>>0>=j>>>0)dc();d=a+(h+ -4)|0;w=c[d>>2]|0;if(!(w&1))dc();if(!(w&2)){if((j|0)==(c[3896]|0)){e=(c[3893]|0)+q|0;c[3893]=e;c[3896]=p;c[p+4>>2]=e|1;if((p|0)!=(c[3895]|0)){i=b;return}c[3895]=0;c[3892]=0;i=b;return}if((j|0)==(c[3895]|0)){e=(c[3892]|0)+q|0;c[3892]=e;c[3895]=p;c[p+4>>2]=e|1;c[p+e>>2]=e;i=b;return}e=(w&-8)+q|0;x=w>>>3;do if(w>>>0>=256){y=c[a+(h+16)>>2]|0;t=c[a+(h|4)>>2]|0;do if((t|0)==(j|0)){g=a+(h+12)|0;f=c[g>>2]|0;if(!f){r=a+(h+8)|0;k=c[r>>2]|0;if(!k){z=0;break}else{A=k;B=r}}else{A=f;B=g}while(1){g=A+20|0;f=c[g>>2]|0;if(f){A=f;B=g;continue}g=A+16|0;f=c[g>>2]|0;if(!f)break;else{A=f;B=g}}if(B>>>0<(c[3894]|0)>>>0)dc();else{c[B>>2]=0;z=A;break}}else{g=c[a+h>>2]|0;if(g>>>0<(c[3894]|0)>>>0)dc();f=g+12|0;if((c[f>>2]|0)!=(j|0))dc();r=t+8|0;if((c[r>>2]|0)==(j|0)){c[f>>2]=t;c[r>>2]=g;z=t;break}else dc()}while(0);if(y){t=c[a+(h+20)>>2]|0;n=15864+(t<<2)|0;if((j|0)==(c[n>>2]|0)){c[n>>2]=z;if(!z){c[3891]=c[3891]&~(1<<t);break}}else{if(y>>>0<(c[3894]|0)>>>0)dc();t=y+16|0;if((c[t>>2]|0)==(j|0))c[t>>2]=z;else c[y+20>>2]=z;if(!z)break}if(z>>>0<(c[3894]|0)>>>0)dc();c[z+24>>2]=y;t=c[a+(h+8)>>2]|0;do if(t)if(t>>>0<(c[3894]|0)>>>0)dc();else{c[z+16>>2]=t;c[t+24>>2]=z;break}while(0);t=c[a+(h+12)>>2]|0;if(t)if(t>>>0<(c[3894]|0)>>>0)dc();else{c[z+20>>2]=t;c[t+24>>2]=z;break}}}else{t=c[a+h>>2]|0;y=c[a+(h|4)>>2]|0;n=15600+(x<<1<<2)|0;if((t|0)!=(n|0)){if(t>>>0<(c[3894]|0)>>>0)dc();if((c[t+12>>2]|0)!=(j|0))dc()}if((y|0)==(t|0)){c[3890]=c[3890]&~(1<<x);break}if((y|0)!=(n|0)){if(y>>>0<(c[3894]|0)>>>0)dc();n=y+8|0;if((c[n>>2]|0)==(j|0))C=n;else dc()}else C=y+8|0;c[t+12>>2]=y;c[C>>2]=t}while(0);c[p+4>>2]=e|1;c[p+e>>2]=e;if((p|0)==(c[3895]|0)){c[3892]=e;i=b;return}else D=e}else{c[d>>2]=w&-2;c[p+4>>2]=q|1;c[p+q>>2]=q;D=q}q=D>>>3;if(D>>>0<256){w=q<<1;d=15600+(w<<2)|0;e=c[3890]|0;C=1<<q;if(e&C){q=15600+(w+2<<2)|0;j=c[q>>2]|0;if(j>>>0<(c[3894]|0)>>>0)dc();else{E=q;F=j}}else{c[3890]=e|C;E=15600+(w+2<<2)|0;F=d}c[E>>2]=p;c[F+12>>2]=p;c[p+8>>2]=F;c[p+12>>2]=d;i=b;return}d=D>>>8;if(d)if(D>>>0>16777215)G=31;else{F=(d+1048320|0)>>>16&8;E=d<<F;d=(E+520192|0)>>>16&4;w=E<<d;E=(w+245760|0)>>>16&2;C=14-(d|F|E)+(w<<E>>>15)|0;G=D>>>(C+7|0)&1|C<<1}else G=0;C=15864+(G<<2)|0;c[p+28>>2]=G;c[p+20>>2]=0;c[p+16>>2]=0;E=c[3891]|0;w=1<<G;a:do if(E&w){F=c[C>>2]|0;if((G|0)==31)H=0;else H=25-(G>>>1)|0;b:do if((c[F+4>>2]&-8|0)!=(D|0)){d=D<<H;e=F;while(1){I=e+(d>>>31<<2)+16|0;j=c[I>>2]|0;if(!j)break;if((c[j+4>>2]&-8|0)==(D|0)){J=j;break b}else{d=d<<1;e=j}}if(I>>>0<(c[3894]|0)>>>0)dc();else{c[I>>2]=p;c[p+24>>2]=e;c[p+12>>2]=p;c[p+8>>2]=p;break a}}else J=F;while(0);F=J+8|0;d=c[F>>2]|0;j=c[3894]|0;if(J>>>0<j>>>0)dc();if(d>>>0<j>>>0)dc();else{c[d+12>>2]=p;c[F>>2]=p;c[p+8>>2]=d;c[p+12>>2]=J;c[p+24>>2]=0;break}}else{c[3891]=E|w;c[C>>2]=p;c[p+24>>2]=C;c[p+12>>2]=p;c[p+8>>2]=p}while(0);p=(c[3898]|0)+ -1|0;c[3898]=p;if(!p)K=16016|0;else{i=b;return}while(1){p=c[K>>2]|0;if(!p)break;else K=p+8|0}c[3898]=-1;i=b;return}function Xh(a,b){a=+a;b=b|0;var d=0,e=0,f=0,g=0,j=0,l=0.0,m=0.0,n=0.0,o=0;d=i;h[k>>3]=a;e=c[k>>2]|0;f=c[k+4>>2]|0;g=ui(e|0,f|0,52)|0;j=g&2047;if((j|0)==2047){l=a;i=d;return+l}else if(!j){if(a!=0.0){m=+Xh(a*18446744073709552000.0,b);n=m;o=(c[b>>2]|0)+ -64|0}else{n=a;o=0}c[b>>2]=o;l=n;i=d;return+l}else{c[b>>2]=j+ -1022;c[k>>2]=e;c[k+4>>2]=f&-2146435073|1071644672;l=+h[k>>3];i=d;return+l}return 0.0}function Yh(a,b){a=+a;b=b|0;var c=0,d=0.0;c=i;d=+Xh(a,b);i=c;return+d}function Zh(a,b){a=+a;b=b|0;var d=0,e=0.0,f=0,g=0,j=0,l=0.0;d=i;if((b|0)>1023){e=a*8.98846567431158e+307;f=b+ -1023|0;if((f|0)>1023){g=b+ -2046|0;j=(g|0)>1023?1023:g;l=e*8.98846567431158e+307}else{j=f;l=e}}else if((b|0)<-1022){e=a*2.2250738585072014e-308;f=b+1022|0;if((f|0)<-1022){g=b+2044|0;j=(g|0)<-1022?-1022:g;l=e*2.2250738585072014e-308}else{j=f;l=e}}else{j=b;l=a}b=wi(j+1023|0,0,52)|0;j=E;c[k>>2]=b;c[k+4>>2]=j;a=l*+h[k>>3];i=d;return+a}function _h(a,b){a=a|0;b=b|0;var c=0,d=0;c=i;if(!a)d=0;else d=$h(a,b,0)|0;i=c;return d|0}function $h(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;e=i;if(!b){f=1;i=e;return f|0}if(d>>>0<128){a[b>>0]=d;f=1;i=e;return f|0}if(d>>>0<2048){a[b>>0]=d>>>6|192;a[b+1>>0]=d&63|128;f=2;i=e;return f|0}if(d>>>0<55296|(d+ -57344|0)>>>0<8192){a[b>>0]=d>>>12|224;a[b+1>>0]=d>>>6&63|128;a[b+2>>0]=d&63|128;f=3;i=e;return f|0}if((d+ -65536|0)>>>0<1048576){a[b>>0]=d>>>18|240;a[b+1>>0]=d>>>12&63|128;a[b+2>>0]=d>>>6&63|128;a[b+3>>0]=d&63|128;f=4;i=e;return f|0}else{c[(Cc()|0)>>2]=84;f=-1;i=e;return f|0}return 0}function ai(a){a=a|0;var b=0;b=16056;c[b>>2]=a+ -1;c[b+4>>2]=0;return}function bi(){var a=0,b=0,d=0,e=0;a=i;b=16056;d=Di(c[b>>2]|0,c[b+4>>2]|0,1284865837,1481765933)|0;b=si(d|0,E|0,1,0)|0;d=E;e=16056;c[e>>2]=b;c[e+4>>2]=d;e=ui(b|0,d|0,33)|0;i=a;return e|0}function ci(b){b=b|0;var d=0,e=0,f=0,g=0;d=i;e=b+74|0;f=a[e>>0]|0;a[e>>0]=f+255|f;f=c[b>>2]|0;if(!(f&8)){c[b+8>>2]=0;c[b+4>>2]=0;e=c[b+44>>2]|0;c[b+28>>2]=e;c[b+20>>2]=e;c[b+16>>2]=e+(c[b+48>>2]|0);g=0;i=d;return g|0}else{c[b>>2]=f|32;g=-1;i=d;return g|0}return 0}function di(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=i;g=e+16|0;h=c[g>>2]|0;do if(!h)if(!(ci(e)|0)){j=c[g>>2]|0;break}else{k=0;i=f;return k|0}else j=h;while(0);h=e+20|0;g=c[h>>2]|0;if((j-g|0)>>>0<d>>>0){k=Rc[c[e+36>>2]&1](e,b,d)|0;i=f;return k|0}a:do if((a[e+75>>0]|0)>-1){j=d;while(1){if(!j){l=d;m=b;n=g;o=0;break a}p=j+ -1|0;if((a[b+p>>0]|0)==10)break;else j=p}if((Rc[c[e+36>>2]&1](e,b,j)|0)>>>0<j>>>0){k=j;i=f;return k|0}else{l=d-j|0;m=b+j|0;n=c[h>>2]|0;o=j;break}}else{l=d;m=b;n=g;o=0}while(0);oi(n|0,m|0,l|0)|0;c[h>>2]=(c[h>>2]|0)+l;k=o+l|0;i=f;return k|0}function ei(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=i;i=i+224|0;f=e+120|0;g=e+80|0;h=e;j=e+136|0;k=g+0|0;l=k+40|0;do{c[k>>2]=0;k=k+4|0}while((k|0)<(l|0));c[f>>2]=c[d>>2];if((fi(0,b,f,h,g)|0)<0){m=-1;i=e;return m|0}d=a+48|0;if(!(c[d>>2]|0)){k=a+44|0;l=c[k>>2]|0;c[k>>2]=j;n=a+28|0;c[n>>2]=j;o=a+20|0;c[o>>2]=j;c[d>>2]=80;p=a+16|0;c[p>>2]=j+80;j=fi(a,b,f,h,g)|0;if(!l)q=j;else{Rc[c[a+36>>2]&1](a,0,0)|0;r=(c[o>>2]|0)==0?-1:j;c[k>>2]=l;c[d>>2]=0;c[p>>2]=0;c[n>>2]=0;c[o>>2]=0;q=r}}else q=fi(a,b,f,h,g)|0;m=q;i=e;return m|0}function fi(e,f,g,j,l){e=e|0;f=f|0;g=g|0;j=j|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,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,X=0,Y=0,Z=0,_=0,$=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=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0.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=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0.0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0.0,Cb=0.0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0.0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0.0,Wb=0,Xb=0,Yb=0,Zb=0,_b=0,$b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0.0,zc=0.0,Ac=0.0,Bc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,_c=0,$c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0;m=i;i=i+864|0;n=m+16|0;o=m;p=m+832|0;q=p;r=m+816|0;s=m+520|0;t=m+776|0;u=m+8|0;v=m+828|0;w=(e|0)!=0;x=t+40|0;y=x;z=t+39|0;t=u+4|0;A=r+12|0;B=r+11|0;r=A;C=r-q|0;D=-2-q|0;F=r+2|0;G=n+288|0;H=p+9|0;I=H;J=p+8|0;K=0;L=0;M=f;f=0;N=0;O=0;a:while(1){do if((f|0)>-1)if((N|0)>(2147483647-f|0)){c[(Cc()|0)>>2]=75;P=-1;break}else{P=N+f|0;break}else P=f;while(0);Q=a[M>>0]|0;if(!(Q<<24>>24)){R=344;break}else{S=Q;T=M}while(1){if(S<<24>>24==37){U=T;V=T;R=9;break}else if(!(S<<24>>24)){W=T;X=T;break}Q=T+1|0;S=a[Q>>0]|0;T=Q}b:do if((R|0)==9)while(1){R=0;if((a[U+1>>0]|0)!=37){W=U;X=V;break b}Q=V+1|0;Y=U+2|0;if((a[Y>>0]|0)==37){U=Y;V=Q;R=9}else{W=Y;X=Q;break}}while(0);Q=X-M|0;if(w)di(M,Q,e)|0;if((X|0)!=(M|0)){M=W;f=P;N=Q;continue}Y=W+1|0;Z=a[Y>>0]|0;_=(Z<<24>>24)+ -48|0;if(_>>>0<10?(a[W+2>>0]|0)==36:0){$=W+3|0;ba=a[$>>0]|0;ca=_;da=1;ea=$}else{ba=Z;ca=-1;da=O;ea=Y}Y=ba<<24>>24;c:do if((Y+ -32|0)>>>0<32){Z=Y;$=ba;_=0;fa=ea;while(1){if(!(1<<Z+ -32&75913)){ga=$;ha=_;ia=fa;break c}ja=1<<($<<24>>24)+ -32|_;ka=fa+1|0;la=a[ka>>0]|0;Z=la<<24>>24;if((Z+ -32|0)>>>0>=32){ga=la;ha=ja;ia=ka;break}else{$=la;_=ja;fa=ka}}}else{ga=ba;ha=0;ia=ea}while(0);do if(ga<<24>>24==42){Y=ia+1|0;fa=(a[Y>>0]|0)+ -48|0;if(fa>>>0<10?(a[ia+2>>0]|0)==36:0){c[l+(fa<<2)>>2]=10;ma=1;na=ia+3|0;oa=c[j+((a[Y>>0]|0)+ -48<<3)>>2]|0}else{if(da){pa=-1;R=362;break a}if(!w){qa=Y;ra=ha;sa=0;ta=0;break}fa=c[g>>2]|0;_=c[fa>>2]|0;c[g>>2]=fa+4;ma=0;na=Y;oa=_}if((oa|0)<0){qa=na;ra=ha|8192;sa=ma;ta=0-oa|0}else{qa=na;ra=ha;sa=ma;ta=oa}}else{_=ga<<24>>24;if((_+ -48|0)>>>0<10){Y=_;_=ia;fa=0;do{fa=Y+ -48+(fa*10|0)|0;_=_+1|0;Y=a[_>>0]|0}while((Y+ -48|0)>>>0<10);if((fa|0)<0){pa=-1;R=362;break a}else{qa=_;ra=ha;sa=da;ta=fa}}else{qa=ia;ra=ha;sa=da;ta=0}}while(0);d:do if((a[qa>>0]|0)==46){Y=qa+1|0;$=a[Y>>0]|0;if($<<24>>24!=42){Z=$<<24>>24;if((Z+ -48|0)>>>0<10){ua=Z;va=Y;wa=0}else{xa=Y;ya=0;break}while(1){Y=ua+ -48+(wa*10|0)|0;Z=va+1|0;ua=a[Z>>0]|0;if((ua+ -48|0)>>>0>=10){xa=Z;ya=Y;break d}else{va=Z;wa=Y}}}fa=qa+2|0;_=(a[fa>>0]|0)+ -48|0;if(_>>>0<10?(a[qa+3>>0]|0)==36:0){c[l+(_<<2)>>2]=10;xa=qa+4|0;ya=c[j+((a[fa>>0]|0)+ -48<<3)>>2]|0;break}if(sa){pa=-1;R=362;break a}if(w){_=c[g>>2]|0;Y=c[_>>2]|0;c[g>>2]=_+4;xa=fa;ya=Y}else{xa=fa;ya=0}}else{xa=qa;ya=-1}while(0);fa=xa;Y=0;while(1){za=a[fa>>0]|0;_=(za<<24>>24)+ -65|0;if(_>>>0>57){pa=-1;R=362;break a}Aa=fa+1|0;Ba=a[16064+(Y*58|0)+_>>0]|0;Ca=Ba&255;if((Ca+ -1|0)>>>0<8){fa=Aa;Y=Ca}else break}if(!(Ba<<24>>24)){pa=-1;R=362;break}_=(ca|0)>-1;e:do if(Ba<<24>>24==19)if(_){pa=-1;R=362;break a}else{Da=K;Ea=L;R=63}else{if(_){c[l+(ca<<2)>>2]=Ca;Z=j+(ca<<3)|0;Da=c[Z+4>>2]|0;Ea=c[Z>>2]|0;R=63;break}if(!w){pa=0;R=362;break a}if((Ba&255)>20){Fa=za;Ga=L;Ha=K}else do switch(Ca|0){case 17:{Z=c[g>>2]|0;c[k>>2]=c[Z>>2];c[k+4>>2]=c[Z+4>>2];Ia=+h[k>>3];c[g>>2]=Z+8;h[k>>3]=Ia;Ja=c[k>>2]|0;Ka=c[k+4>>2]|0;R=64;break e;break};case 9:{Z=c[g>>2]|0;$=c[Z>>2]|0;c[g>>2]=Z+4;Ja=$;Ka=K;R=64;break e;break};case 12:{$=c[g>>2]|0;Z=$;ka=c[Z>>2]|0;ja=c[Z+4>>2]|0;c[g>>2]=$+8;Ja=ka;Ka=ja;R=64;break e;break};case 13:{ja=c[g>>2]|0;ka=c[ja>>2]|0;c[g>>2]=ja+4;Ja=ka<<16>>16;Ka=(((ka&65535)<<16>>16|0)<0)<<31>>31;R=64;break e;break};case 11:{ka=c[g>>2]|0;ja=c[ka>>2]|0;c[g>>2]=ka+4;Ja=ja;Ka=0;R=64;break e;break};case 14:{ja=c[g>>2]|0;ka=c[ja>>2]|0;c[g>>2]=ja+4;Ja=ka&65535;Ka=0;R=64;break e;break};case 10:{ka=c[g>>2]|0;ja=c[ka>>2]|0;c[g>>2]=ka+4;Ja=ja;Ka=((ja|0)<0)<<31>>31;R=64;break e;break};case 15:{ja=c[g>>2]|0;ka=c[ja>>2]|0;c[g>>2]=ja+4;Ja=ka<<24>>24;Ka=(((ka&255)<<24>>24|0)<0)<<31>>31;R=64;break e;break};case 16:{ka=c[g>>2]|0;ja=c[ka>>2]|0;c[g>>2]=ka+4;Ja=ja&255;Ka=0;R=64;break e;break};case 18:{ja=c[g>>2]|0;c[k>>2]=c[ja>>2];c[k+4>>2]=c[ja+4>>2];Ia=+h[k>>3];c[g>>2]=ja+8;h[k>>3]=Ia;Da=c[k+4>>2]|0;Ea=c[k>>2]|0;R=63;break e;break};default:{Ja=L;Ka=K;R=64;break e}}while(0)}while(0);if((R|0)==63){R=0;if(w){Ja=Ea;Ka=Da;R=64}else{K=Da;L=Ea;M=Aa;f=P;N=Q;O=sa;continue}}if((R|0)==64){R=0;Fa=a[fa>>0]|0;Ga=Ja;Ha=Ka}_=Fa<<24>>24;if(!Y)La=_;else La=(_&15|0)==3?_&-33:_;_=ra&-65537;ja=(ra&8192|0)==0?ra:_;f:do switch(La|0){case 117:{Ma=Ga;Na=Ha;Oa=0;Pa=16528;R=89;break};case 105:case 100:{if((Ha|0)<0){ka=ri(0,0,Ga|0,Ha|0)|0;Ma=ka;Na=E;Oa=1;Pa=16528;R=89;break f}if(!(ja&2048)){ka=ja&1;Ma=Ga;Na=Ha;Oa=ka;Pa=(ka|0)==0?16528:16530;R=89}else{Ma=Ga;Na=Ha;Oa=1;Pa=16529;R=89}break};case 67:{c[u>>2]=Ga;c[t>>2]=0;Qa=u;Ra=u;Sa=-1;R=104;break};case 112:{Ta=ja|8;Ua=ya>>>0>8?ya:8;Va=120;R=77;break};case 99:{a[z>>0]=Ga;Wa=Ha;Xa=Ga;Ya=z;Za=_;_a=1;$a=0;ab=16528;bb=x;break};case 110:{switch(Y|0){case 3:{b[Ga>>1]=P;K=Ha;L=Ga;M=Aa;f=P;N=Q;O=sa;continue a;break};case 4:{a[Ga>>0]=P;K=Ha;L=Ga;M=Aa;f=P;N=Q;O=sa;continue a;break};case 2:{ka=Ga;c[ka>>2]=P;c[ka+4>>2]=((P|0)<0)<<31>>31;K=Ha;L=Ga;M=Aa;f=P;N=Q;O=sa;continue a;break};case 0:{c[Ga>>2]=P;K=Ha;L=Ga;M=Aa;f=P;N=Q;O=sa;continue a;break};case 1:{c[Ga>>2]=P;K=Ha;L=Ga;M=Aa;f=P;N=Q;O=sa;continue a;break};case 7:{ka=Ga;c[ka>>2]=P;c[ka+4>>2]=((P|0)<0)<<31>>31;K=Ha;L=Ga;M=Aa;f=P;N=Q;O=sa;continue a;break};case 6:{c[Ga>>2]=P;K=Ha;L=Ga;M=Aa;f=P;N=Q;O=sa;continue a;break};default:{K=Ha;L=Ga;M=Aa;f=P;N=Q;O=sa;continue a}}break};case 115:{cb=(Ga|0)==0?16544:Ga;R=99;break};case 83:{if(!ya){db=Ga;eb=Ga;fb=0;R=110}else{Qa=Ga;Ra=Ga;Sa=ya;R=104}break};case 109:{cb=rc(c[(Cc()|0)>>2]|0)|0;R=99;break};case 88:case 120:{Ta=ja;Ua=ya;Va=La;R=77;break};case 111:{ka=Ga;$=(ka|0)==0&(Ha|0)==0;if($)gb=x;else{Z=x;la=ka;ka=Ha;while(1){hb=Z+ -1|0;a[hb>>0]=la&7|48;la=ui(la|0,ka|0,3)|0;ka=E;if((la|0)==0&(ka|0)==0){gb=hb;break}else Z=hb}}if(!(ja&8)){ib=Ga;jb=Ha;kb=gb;lb=ja;mb=ya;nb=0;ob=16528;R=94}else{ib=Ga;jb=Ha;kb=gb;lb=ja;mb=ya;nb=$&1^1;ob=$?16528:16533;R=94}break};case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{c[k>>2]=Ga;c[k+4>>2]=Ha;Ia=+h[k>>3];c[o>>2]=0;if((Ha|0)>=0)if(!(ja&2048)){Z=ja&1;pb=Ia;qb=Z;rb=(Z|0)==0?16553:16558}else{pb=Ia;qb=1;rb=16555}else{pb=-Ia;qb=1;rb=16552}h[k>>3]=pb;Z=c[k+4>>2]&2146435072;if(!(Z>>>0<2146435072|(Z|0)==2146435072&0<0)){Z=(La&32|0)!=0;if(pb!=pb|0.0!=0.0){sb=0;tb=Z?16592:16600}else{sb=qb;tb=Z?16576:16584}Z=sb+3|0;ka=(Z|0)<(ta|0);if((ja&8192|0)==0&ka){la=ta-Z|0;qi(s|0,32,(la>>>0>256?256:la)|0)|0;if(la>>>0>255){hb=la;while(1){di(s,256,e)|0;ub=hb+ -256|0;if(ub>>>0>255)hb=ub;else{vb=ub;break}}}else vb=la;di(s,vb,e)|0}di(rb,sb,e)|0;di(tb,3,e)|0;if((ja&73728|0)==8192&ka){hb=ta-Z|0;qi(s|0,32,(hb>>>0>256?256:hb)|0)|0;if(hb>>>0>255){$=hb;while(1){di(s,256,e)|0;ub=$+ -256|0;if(ub>>>0>255)$=ub;else{wb=ub;break}}}else wb=hb;di(s,wb,e)|0}K=Ha;L=Ga;M=Aa;f=P;N=ka?ta:Z;O=sa;continue a}Ia=+Yh(pb,o)*2.0;$=Ia!=0.0;if($)c[o>>2]=(c[o>>2]|0)+ -1;la=La|32;if((la|0)==97){ub=La&32;xb=(ub|0)==0?rb:rb+9|0;yb=qb|2;zb=ya>>>0>11?0:12-ya|0;do if(zb){Ab=zb;Bb=8.0;do{Ab=Ab+ -1|0;Bb=Bb*16.0}while((Ab|0)!=0);if((a[xb>>0]|0)==45){Cb=-(Bb+(-Ia-Bb));break}else{Cb=Ia+Bb-Bb;break}}else Cb=Ia;while(0);zb=c[o>>2]|0;Z=(zb|0)<0?0-zb|0:zb;if((Z|0)<0){zb=A;ka=Z;hb=((Z|0)<0)<<31>>31;while(1){Ab=Fi(ka|0,hb|0,10,0)|0;zb=zb+ -1|0;a[zb>>0]=Ab|48;Ab=ka;ka=Ei(ka|0,hb|0,10,0)|0;if(!(hb>>>0>9|(hb|0)==9&Ab>>>0>4294967295))break;else hb=E}Db=zb;Eb=ka}else{Db=A;Eb=Z}if(!Eb)Fb=Db;else{hb=Db;Ab=Eb;while(1){Gb=hb+ -1|0;a[Gb>>0]=(Ab>>>0)%10|0|48;if(Ab>>>0<10){Fb=Gb;break}else{hb=Gb;Ab=(Ab>>>0)/10|0}}}if((Fb|0)==(A|0)){a[B>>0]=48;Hb=B}else Hb=Fb;a[Hb+ -1>>0]=(c[o>>2]>>31&2)+43;Ab=Hb+ -2|0;a[Ab>>0]=La+15;hb=(ja&8|0)==0;if((ya|0)>0)if(hb){Ib=Cb;Z=p;while(1){ka=~~Ib;zb=Z+1|0;a[Z>>0]=d[16608+ka>>0]|ub;Ib=(Ib- +(ka|0))*16.0;if((zb-q|0)==1){a[zb>>0]=46;Jb=Z+2|0}else Jb=zb;if(!(Ib!=0.0)){Kb=Jb;break}else Z=Jb}}else{Ib=Cb;Z=p;while(1){zb=~~Ib;ka=Z+1|0;a[Z>>0]=d[16608+zb>>0]|ub;Ib=(Ib- +(zb|0))*16.0;if((ka-q|0)==1){a[ka>>0]=46;Lb=Z+2|0}else Lb=ka;if(!(Ib!=0.0)){Kb=Lb;break}else Z=Lb}}else if(hb){Ib=Cb;Z=p;while(1){ka=~~Ib;zb=Z+1|0;a[Z>>0]=d[16608+ka>>0]|ub;Ib=(Ib- +(ka|0))*16.0;ka=Ib!=0.0;if((zb-q|0)==1&ka){a[zb>>0]=46;Mb=Z+2|0}else Mb=zb;if(!ka){Kb=Mb;break}else Z=Mb}}else{Ib=Cb;Z=p;while(1){hb=~~Ib;ka=Z+1|0;a[Z>>0]=d[16608+hb>>0]|ub;Ib=(Ib- +(hb|0))*16.0;if((ka-q|0)==1){a[ka>>0]=46;Nb=Z+2|0}else Nb=ka;if(!(Ib!=0.0)){Kb=Nb;break}else Z=Nb}}Z=Kb;do if(!ya)R=173;else{if((D+Z|0)>=(ya|0)){R=173;break}Ob=F+ya-Ab|0}while(0);if((R|0)==173){R=0;Ob=C-Ab+Z|0}ub=Ob+yb|0;ka=ja&73728;hb=(ub|0)<(ta|0);if((ka|0)==0&hb){zb=ta-ub|0;qi(s|0,32,(zb>>>0>256?256:zb)|0)|0;if(zb>>>0>255){Gb=zb;while(1){di(s,256,e)|0;Pb=Gb+ -256|0;if(Pb>>>0>255)Gb=Pb;else{Qb=Pb;break}}}else Qb=zb;di(s,Qb,e)|0}di(xb,yb,e)|0;if((ka|0)==65536&hb){Gb=ta-ub|0;qi(s|0,48,(Gb>>>0>256?256:Gb)|0)|0;if(Gb>>>0>255){Pb=Gb;while(1){di(s,256,e)|0;Rb=Pb+ -256|0;if(Rb>>>0>255)Pb=Rb;else{Sb=Rb;break}}}else Sb=Gb;di(s,Sb,e)|0}Pb=Z-q|0;di(p,Pb,e)|0;yb=r-Ab|0;xb=Ob-yb-Pb|0;if((xb|0)>0){qi(s|0,48,(xb>>>0>256?256:xb)|0)|0;if(xb>>>0>255){Pb=xb;while(1){di(s,256,e)|0;zb=Pb+ -256|0;if(zb>>>0>255)Pb=zb;else{Tb=zb;break}}}else Tb=xb;di(s,Tb,e)|0}di(Ab,yb,e)|0;if((ka|0)==8192&hb){Pb=ta-ub|0;qi(s|0,32,(Pb>>>0>256?256:Pb)|0)|0;if(Pb>>>0>255){Z=Pb;while(1){di(s,256,e)|0;Gb=Z+ -256|0;if(Gb>>>0>255)Z=Gb;else{Ub=Gb;break}}}else Ub=Pb;di(s,Ub,e)|0}K=Ha;L=Ga;M=Aa;f=P;N=hb?ta:ub;O=sa;continue a}Z=(ya|0)<0?6:ya;if($){ka=(c[o>>2]|0)+ -28|0;c[o>>2]=ka;Vb=Ia*268435456.0;Wb=ka}else{Vb=Ia;Wb=c[o>>2]|0}ka=(Wb|0)<0?n:G;Ib=Vb;yb=ka;do{Ab=~~Ib>>>0;c[yb>>2]=Ab;yb=yb+4|0;Ib=(Ib- +(Ab>>>0))*1.0e9}while(Ib!=0.0);$=c[o>>2]|0;if(($|0)>0){ub=$;hb=ka;Pb=yb;while(1){Ab=(ub|0)>29?29:ub;xb=Pb+ -4|0;do if(xb>>>0<hb>>>0)Xb=hb;else{Gb=0;zb=xb;do{Rb=wi(c[zb>>2]|0,0,Ab|0)|0;Yb=si(Rb|0,E|0,Gb|0,0)|0;Rb=E;Zb=Fi(Yb|0,Rb|0,1e9,0)|0;c[zb>>2]=Zb;Gb=Ei(Yb|0,Rb|0,1e9,0)|0;zb=zb+ -4|0}while(zb>>>0>=hb>>>0);if(!Gb){Xb=hb;break}zb=hb+ -4|0;c[zb>>2]=Gb;Xb=zb}while(0);xb=Pb;while(1){if(xb>>>0<=Xb>>>0)break;zb=xb+ -4|0;if(!(c[zb>>2]|0))xb=zb;else break}zb=(c[o>>2]|0)-Ab|0;c[o>>2]=zb;if((zb|0)>0){ub=zb;hb=Xb;Pb=xb}else{_b=zb;$b=Xb;ac=xb;break}}}else{_b=$;$b=ka;ac=yb}g:do if((_b|0)<0){Pb=((Z+25|0)/9|0)+1|0;if((la|0)==102){hb=ka;ub=ka+(Pb<<2)|0;zb=_b;Rb=$b;Yb=ac;while(1){Zb=0-zb|0;bc=(Zb|0)>9?9:Zb;do if(Rb>>>0<Yb>>>0){Zb=(1<<bc)+ -1|0;cc=1e9>>>bc;dc=0;ec=Rb;do{fc=c[ec>>2]|0;c[ec>>2]=(fc>>>bc)+dc;dc=aa(fc&Zb,cc)|0;ec=ec+4|0}while(ec>>>0<Yb>>>0);ec=(c[Rb>>2]|0)==0?Rb+4|0:Rb;if(!dc){gc=ec;hc=Yb;break}c[Yb>>2]=dc;gc=ec;hc=Yb+4|0}else{gc=(c[Rb>>2]|0)==0?Rb+4|0:Rb;hc=Yb}while(0);Gb=(hc-hb>>2|0)>(Pb|0)?ub:hc;zb=(c[o>>2]|0)+bc|0;c[o>>2]=zb;if((zb|0)>=0){ic=gc;jc=Gb;break g}else{Rb=gc;Yb=Gb}}}else{kc=_b;lc=$b;mc=ac}while(1){Yb=0-kc|0;Rb=(Yb|0)>9?9:Yb;do if(lc>>>0<mc>>>0){Yb=(1<<Rb)+ -1|0;zb=1e9>>>Rb;ub=0;hb=lc;do{xb=c[hb>>2]|0;c[hb>>2]=(xb>>>Rb)+ub;ub=aa(xb&Yb,zb)|0;hb=hb+4|0}while(hb>>>0<mc>>>0);hb=(c[lc>>2]|0)==0?lc+4|0:lc;if(!ub){nc=hb;oc=mc;break}c[mc>>2]=ub;nc=hb;oc=mc+4|0}else{nc=(c[lc>>2]|0)==0?lc+4|0:lc;oc=mc}while(0);if((oc-nc>>2|0)>(Pb|0))pc=nc+(Pb<<2)|0;else pc=oc;kc=(c[o>>2]|0)+Rb|0;c[o>>2]=kc;if((kc|0)>=0){ic=nc;jc=pc;break}else{lc=nc;mc=pc}}}else{ic=$b;jc=ac}while(0);yb=ka;do if(ic>>>0<jc>>>0){$=(yb-ic>>2)*9|0;Pb=c[ic>>2]|0;if(Pb>>>0<10){qc=$;break}else{sc=$;tc=10}while(1){tc=tc*10|0;$=sc+1|0;if(Pb>>>0<tc>>>0){qc=$;break}else sc=$}}else qc=0;while(0);Pb=(la|0)==103;$=Z-((la|0)!=102?qc:0)+((Pb&(Z|0)!=0)<<31>>31)|0;if(($|0)<(((jc-yb>>2)*9|0)+ -9|0)){bc=$+9216|0;$=(bc|0)/9|0;hb=ka+($+ -1023<<2)|0;zb=((bc|0)%9|0)+1|0;if((zb|0)<9){bc=10;Yb=zb;while(1){zb=bc*10|0;Yb=Yb+1|0;if((Yb|0)==9){uc=zb;break}else bc=zb}}else uc=10;bc=c[hb>>2]|0;Yb=(bc>>>0)%(uc>>>0)|0;if((Yb|0)==0?(ka+($+ -1022<<2)|0)==(jc|0):0){vc=ic;wc=hb;xc=qc}else R=233;do if((R|0)==233){R=0;Bb=(((bc>>>0)/(uc>>>0)|0)&1|0)==0?9007199254740992.0:9007199254740994.0;la=(uc|0)/2|0;do if(Yb>>>0<la>>>0)yc=.5;else{if((Yb|0)==(la|0)?(ka+($+ -1022<<2)|0)==(jc|0):0){yc=1.0;break}yc=1.5}while(0);do if(!qb){zc=Bb;Ac=yc}else{if((a[rb>>0]|0)!=45){zc=Bb;Ac=yc;break}zc=Bb*-1.0;Ac=yc*-1.0}while(0);la=bc-Yb|0;c[hb>>2]=la;if(!(zc+Ac!=zc)){vc=ic;wc=hb;xc=qc;break}zb=la+uc|0;c[hb>>2]=zb;if(zb>>>0>999999999){zb=ic;la=hb;while(1){dc=la+ -4|0;c[la>>2]=0;if(dc>>>0<zb>>>0){xb=zb+ -4|0;c[xb>>2]=0;Bc=xb}else Bc=zb;xb=(c[dc>>2]|0)+1|0;c[dc>>2]=xb;if(xb>>>0>999999999){zb=Bc;la=dc}else{Dc=Bc;Ec=dc;break}}}else{Dc=ic;Ec=hb}la=(yb-Dc>>2)*9|0;zb=c[Dc>>2]|0;if(zb>>>0<10){vc=Dc;wc=Ec;xc=la;break}else{Fc=la;Gc=10}while(1){Gc=Gc*10|0;la=Fc+1|0;if(zb>>>0<Gc>>>0){vc=Dc;wc=Ec;xc=la;break}else Fc=la}}while(0);hb=wc+4|0;Hc=vc;Ic=xc;Jc=jc>>>0>hb>>>0?hb:jc}else{Hc=ic;Ic=qc;Jc=jc}hb=0-Ic|0;Yb=Jc;while(1){if(Yb>>>0<=Hc>>>0){Kc=0;break}bc=Yb+ -4|0;if(!(c[bc>>2]|0))Yb=bc;else{Kc=1;break}}do if(Pb){bc=((Z|0)==0&1)+Z|0;if((bc|0)>(Ic|0)&(Ic|0)>-5){Lc=La+ -1|0;Mc=bc+ -1-Ic|0}else{Lc=La+ -2|0;Mc=bc+ -1|0}if(ja&8){Nc=Lc;Oc=Mc;break}do if(Kc){bc=c[Yb+ -4>>2]|0;if(!bc){Pc=9;break}if(!((bc>>>0)%10|0)){Qc=10;Rc=0}else{Pc=0;break}while(1){Qc=Qc*10|0;$=Rc+1|0;if((bc>>>0)%(Qc>>>0)|0){Pc=$;break}else Rc=$}}else Pc=9;while(0);bc=((Yb-yb>>2)*9|0)+ -9|0;if((Lc|32|0)==102){Rb=bc-Pc|0;$=(Rb|0)<0?0:Rb;Nc=Lc;Oc=(Mc|0)<($|0)?Mc:$;break}else{$=bc+Ic-Pc|0;bc=($|0)<0?0:$;Nc=Lc;Oc=(Mc|0)<(bc|0)?Mc:bc;break}}else{Nc=La;Oc=Z}while(0);Z=(Oc|0)!=0;if(Z)Sc=1;else Sc=(ja&8|0)!=0;yb=Sc&1;Pb=(Nc|32|0)==102;if(Pb){Tc=(Ic|0)>0?Ic:0;Uc=0}else{bc=(Ic|0)<0?hb:Ic;if((bc|0)<0){$=A;Rb=bc;zb=((bc|0)<0)<<31>>31;while(1){la=Fi(Rb|0,zb|0,10,0)|0;$=$+ -1|0;a[$>>0]=la|48;la=Rb;Rb=Ei(Rb|0,zb|0,10,0)|0;if(!(zb>>>0>9|(zb|0)==9&la>>>0>4294967295))break;else zb=E}Vc=$;Wc=Rb}else{Vc=A;Wc=bc}if(!Wc)Xc=Vc;else{zb=Vc;hb=Wc;while(1){la=zb+ -1|0;a[la>>0]=(hb>>>0)%10|0|48;if(hb>>>0<10){Xc=la;break}else{zb=la;hb=(hb>>>0)/10|0}}}if((r-Xc|0)<2){hb=Xc;while(1){zb=hb+ -1|0;a[zb>>0]=48;if((r-zb|0)<2)hb=zb;else{Yc=zb;break}}}else Yc=Xc;a[Yc+ -1>>0]=(Ic>>31&2)+43;hb=Yc+ -2|0;a[hb>>0]=Nc;Tc=r-hb|0;Uc=hb}hb=qb+1+Oc+yb+Tc|0;zb=ja&73728;bc=(hb|0)<(ta|0);if((zb|0)==0&bc){Rb=ta-hb|0;qi(s|0,32,(Rb>>>0>256?256:Rb)|0)|0;if(Rb>>>0>255){$=Rb;while(1){di(s,256,e)|0;la=$+ -256|0;if(la>>>0>255)$=la;else{Zc=la;break}}}else Zc=Rb;di(s,Zc,e)|0}di(rb,qb,e)|0;if((zb|0)==65536&bc){$=ta-hb|0;qi(s|0,48,($>>>0>256?256:$)|0)|0;if($>>>0>255){yb=$;while(1){di(s,256,e)|0;la=yb+ -256|0;if(la>>>0>255)yb=la;else{_c=la;break}}}else _c=$;di(s,_c,e)|0}do if(Pb){yb=Hc>>>0>ka>>>0?ka:Hc;Rb=yb;do{la=c[Rb>>2]|0;if(!la)$c=H;else{dc=H;xb=la;while(1){la=dc+ -1|0;a[la>>0]=(xb>>>0)%10|0|48;if(xb>>>0<10){$c=la;break}else{dc=la;xb=(xb>>>0)/10|0}}}do if((Rb|0)==(yb|0)){if(($c|0)!=(H|0)){ad=$c;break}a[J>>0]=48;ad=J}else{if($c>>>0>p>>>0)bd=$c;else{ad=$c;break}while(1){xb=bd+ -1|0;a[xb>>0]=48;if(xb>>>0>p>>>0)bd=xb;else{ad=xb;break}}}while(0);di(ad,I-ad|0,e)|0;Rb=Rb+4|0}while(Rb>>>0<=ka>>>0);if(!Z?(ja&8|0)==0:0)break;di(16624,1,e)|0;if(Rb>>>0<Yb>>>0&(Oc|0)>0){yb=Oc;ub=Rb;while(1){xb=c[ub>>2]|0;if(xb){dc=H;la=xb;while(1){dc=dc+ -1|0;a[dc>>0]=(la>>>0)%10|0|48;if(la>>>0<10)break;else la=(la>>>0)/10|0}if(dc>>>0>p>>>0){cd=dc;R=300}else dd=dc}else{cd=H;R=300}if((R|0)==300)while(1){R=0;la=cd+ -1|0;a[la>>0]=48;if(la>>>0>p>>>0){cd=la;R=300}else{dd=la;break}}di(dd,(yb|0)>9?9:yb,e)|0;ub=ub+4|0;dc=yb+ -9|0;if(!(ub>>>0<Yb>>>0&(dc|0)>0)){ed=dc;break}else yb=dc}}else ed=Oc;if((ed|0)<=0)break;qi(s|0,48,(ed>>>0>256?256:ed)|0)|0;if(ed>>>0>255){yb=ed;while(1){di(s,256,e)|0;ub=yb+ -256|0;if(ub>>>0>255)yb=ub;else{fd=ub;break}}}else fd=ed;di(s,fd,e)|0}else{yb=Kc?Yb:Hc+4|0;do if((Oc|0)>-1){ub=(ja&8|0)!=0;Rb=Oc;dc=Hc;do{la=c[dc>>2]|0;if(la){xb=H;Ab=la;while(1){xb=xb+ -1|0;a[xb>>0]=(Ab>>>0)%10|0|48;if(Ab>>>0<10)break;else Ab=(Ab>>>0)/10|0}if((xb|0)!=(H|0))gd=xb;else R=311}else R=311;if((R|0)==311){R=0;a[J>>0]=48;gd=J}do if((dc|0)==(Hc|0)){Ab=gd+1|0;di(gd,1,e)|0;if(!((Rb|0)>0|ub)){hd=Ab;break}di(16624,1,e)|0;hd=Ab}else{if(gd>>>0>p>>>0)id=gd;else{hd=gd;break}while(1){Ab=id+ -1|0;a[Ab>>0]=48;if(Ab>>>0>p>>>0)id=Ab;else{hd=Ab;break}}}while(0);xb=I-hd|0;di(hd,(xb|0)<(Rb|0)?xb:Rb,e)|0;Rb=Rb-xb|0;dc=dc+4|0}while(dc>>>0<yb>>>0&(Rb|0)>-1);if((Rb|0)<=0)break;qi(s|0,48,(Rb>>>0>256?256:Rb)|0)|0;if(Rb>>>0>255){dc=Rb;while(1){di(s,256,e)|0;ub=dc+ -256|0;if(ub>>>0>255)dc=ub;else{jd=ub;break}}}else jd=Rb;di(s,jd,e)|0}while(0);di(Uc,r-Uc|0,e)|0}while(0);if((zb|0)==8192&bc){Yb=ta-hb|0;qi(s|0,32,(Yb>>>0>256?256:Yb)|0)|0;if(Yb>>>0>255){Z=Yb;while(1){di(s,256,e)|0;ka=Z+ -256|0;if(ka>>>0>255)Z=ka;else{kd=ka;break}}}else kd=Yb;di(s,kd,e)|0}K=Ha;L=Ga;M=Aa;f=P;N=bc?ta:hb;O=sa;continue a;break};default:{Wa=Ha;Xa=Ga;Ya=M;Za=ja;_a=ya;$a=0;ab=16528;bb=x}}while(0);h:do if((R|0)==77){R=0;Q=Ga;Y=Va&32;if(!((Q|0)==0&(Ha|0)==0)){fa=x;Z=Q;Q=Ha;do{fa=fa+ -1|0;a[fa>>0]=d[16608+(Z&15)>>0]|Y;Z=ui(Z|0,Q|0,4)|0;Q=E}while(!((Z|0)==0&(Q|0)==0));if(!(Ta&8)){ib=Ga;jb=Ha;kb=fa;lb=Ta;mb=Ua;nb=0;ob=16528;R=94}else{ib=Ga;jb=Ha;kb=fa;lb=Ta;mb=Ua;nb=2;ob=16528+(Va>>4)|0;R=94}}else{ib=Ga;jb=Ha;kb=x;lb=Ta;mb=Ua;nb=0;ob=16528;R=94}}else if((R|0)==89){R=0;Q=Ma;if(Na>>>0>0|(Na|0)==0&Q>>>0>4294967295){Z=x;Y=Q;hb=Na;while(1){bc=Fi(Y|0,hb|0,10,0)|0;Z=Z+ -1|0;a[Z>>0]=bc|48;bc=Y;Y=Ei(Y|0,hb|0,10,0)|0;if(!(hb>>>0>9|(hb|0)==9&bc>>>0>4294967295))break;else hb=E}ld=Z;md=Y}else{ld=x;md=Q}if(!md){ib=Ma;jb=Na;kb=ld;lb=ja;mb=ya;nb=Oa;ob=Pa;R=94}else{hb=ld;fa=md;while(1){bc=hb+ -1|0;a[bc>>0]=(fa>>>0)%10|0|48;if(fa>>>0<10){ib=Ma;jb=Na;kb=bc;lb=ja;mb=ya;nb=Oa;ob=Pa;R=94;break}else{hb=bc;fa=(fa>>>0)/10|0}}}}else if((R|0)==99){R=0;fa=ji(cb,0,ya)|0;if(!fa){Wa=Ha;Xa=Ga;Ya=cb;Za=_;_a=ya;$a=0;ab=16528;bb=cb+ya|0;break}else{Wa=Ha;Xa=Ga;Ya=cb;Za=_;_a=fa-cb|0;$a=0;ab=16528;bb=fa;break}}else if((R|0)==104){R=0;fa=0;hb=0;Q=Qa;while(1){Y=c[Q>>2]|0;if(!Y){nd=fa;od=hb;break}Z=_h(v,Y)|0;if((Z|0)<=-1){pa=-1;R=362;break a}Y=Z+fa|0;if(Z>>>0>(Sa-fa|0)>>>0){db=Qa;eb=Ra;fb=fa;R=110;break h}if(Y>>>0<Sa>>>0){fa=Y;hb=Z;Q=Q+4|0}else{nd=Y;od=Z;break}}if((od|0)<0){pa=-1;R=362;break a}else{db=Qa;eb=Ra;fb=nd;R=110}}while(0);if((R|0)==94){R=0;_=(mb|0)>-1?lb&-65537:lb;Q=(ib|0)==0&(jb|0)==0;if(Q&(mb|0)==0){Wa=jb;Xa=ib;Ya=x;Za=_;_a=0;$a=nb;ab=ob;bb=x}else{hb=(Q&1)+(y-kb)|0;Wa=jb;Xa=ib;Ya=kb;Za=_;_a=(mb|0)>(hb|0)?mb:hb;$a=nb;ab=ob;bb=x}}else if((R|0)==110){R=0;hb=ja&73728;_=(fb|0)<(ta|0);if((hb|0)==0&_){Q=ta-fb|0;qi(s|0,32,(Q>>>0>256?256:Q)|0)|0;if(Q>>>0>255){fa=Q;while(1){di(s,256,e)|0;Z=fa+ -256|0;if(Z>>>0>255)fa=Z;else{pd=Z;break}}}else pd=Q;di(s,pd,e)|0}i:do if(fb){fa=0;ja=db;while(1){Z=c[ja>>2]|0;if(!Z)break i;Y=_h(v,Z)|0;fa=Y+fa|0;if((fa|0)>(fb|0))break i;di(v,Y,e)|0;if(fa>>>0>=fb>>>0)break;else ja=ja+4|0}}while(0);if((hb|0)==8192&_){Q=ta-fb|0;qi(s|0,32,(Q>>>0>256?256:Q)|0)|0;if(Q>>>0>255){ja=Q;while(1){di(s,256,e)|0;fa=ja+ -256|0;if(fa>>>0>255)ja=fa;else{qd=fa;break}}}else qd=Q;di(s,qd,e)|0}K=Ha;L=eb;M=Aa;f=P;N=_?ta:fb;O=sa;continue}ja=bb-Ya|0;hb=(_a|0)<(ja|0)?ja:_a;fa=$a+hb|0;Y=(ta|0)<(fa|0)?fa:ta;Z=Za&73728;bc=(fa|0)<(Y|0);if((Z|0)==0&bc){Yb=Y-fa|0;qi(s|0,32,(Yb>>>0>256?256:Yb)|0)|0;if(Yb>>>0>255){zb=Yb;while(1){di(s,256,e)|0;ka=zb+ -256|0;if(ka>>>0>255)zb=ka;else{rd=ka;break}}}else rd=Yb;di(s,rd,e)|0}di(ab,$a,e)|0;if((Z|0)==65536&bc){zb=Y-fa|0;qi(s|0,48,(zb>>>0>256?256:zb)|0)|0;if(zb>>>0>255){_=zb;while(1){di(s,256,e)|0;Q=_+ -256|0;if(Q>>>0>255)_=Q;else{sd=Q;break}}}else sd=zb;di(s,sd,e)|0}if((ja|0)<(hb|0)){_=hb-ja|0;qi(s|0,48,(_>>>0>256?256:_)|0)|0;if(_>>>0>255){Yb=_;while(1){di(s,256,e)|0;Q=Yb+ -256|0;if(Q>>>0>255)Yb=Q;else{td=Q;break}}}else td=_;di(s,td,e)|0}di(Ya,ja,e)|0;if(!((Z|0)==8192&bc)){K=Wa;L=Xa;M=Aa;f=P;N=Y;O=sa;continue}Yb=Y-fa|0;qi(s|0,32,(Yb>>>0>256?256:Yb)|0)|0;if(Yb>>>0>255){hb=Yb;while(1){di(s,256,e)|0;zb=hb+ -256|0;if(zb>>>0>255)hb=zb;else{ud=zb;break}}}else ud=Yb;di(s,ud,e)|0;K=Wa;L=Xa;M=Aa;f=P;N=Y;O=sa}if((R|0)==344){if(e){pa=P;i=m;return pa|0}if(!O){pa=0;i=m;return pa|0}else vd=1;while(1){O=c[l+(vd<<2)>>2]|0;if(!O){wd=vd;break}P=j+(vd<<3)|0;j:do if(O>>>0<=20)do switch(O|0){case 11:{e=c[g>>2]|0;sa=c[e>>2]|0;c[g>>2]=e+4;e=P;c[e>>2]=sa;c[e+4>>2]=0;break j;break};case 14:{e=c[g>>2]|0;sa=c[e>>2]|0;c[g>>2]=e+4;e=P;c[e>>2]=sa&65535;c[e+4>>2]=0;break j;break};case 9:{e=c[g>>2]|0;sa=c[e>>2]|0;c[g>>2]=e+4;c[P>>2]=sa;break j;break};case 18:{sa=c[g>>2]|0;c[k>>2]=c[sa>>2];c[k+4>>2]=c[sa+4>>2];zc=+h[k>>3];c[g>>2]=sa+8;h[P>>3]=zc;break j;break};case 16:{sa=c[g>>2]|0;e=c[sa>>2]|0;c[g>>2]=sa+4;sa=P;c[sa>>2]=e&255;c[sa+4>>2]=0;break j;break};case 10:{sa=c[g>>2]|0;e=c[sa>>2]|0;c[g>>2]=sa+4;sa=P;c[sa>>2]=e;c[sa+4>>2]=((e|0)<0)<<31>>31;break j;break};case 13:{e=c[g>>2]|0;sa=c[e>>2]|0;c[g>>2]=e+4;e=(sa&65535)<<16>>16;sa=P;c[sa>>2]=e;c[sa+4>>2]=((e|0)<0)<<31>>31;break j;break};case 15:{e=c[g>>2]|0;sa=c[e>>2]|0;c[g>>2]=e+4;e=(sa&255)<<24>>24;sa=P;c[sa>>2]=e;c[sa+4>>2]=((e|0)<0)<<31>>31;break j;break};case 17:{e=c[g>>2]|0;c[k>>2]=c[e>>2];c[k+4>>2]=c[e+4>>2];zc=+h[k>>3];c[g>>2]=e+8;h[P>>3]=zc;break j;break};case 12:{e=c[g>>2]|0;sa=e;N=c[sa>>2]|0;f=c[sa+4>>2]|0;c[g>>2]=e+8;e=P;c[e>>2]=N;c[e+4>>2]=f;break j;break};default:break j}while(0);while(0);vd=vd+1|0;if((vd|0)>=10){pa=1;R=362;break}}if((R|0)==362){i=m;return pa|0}while(1){if(c[l+(wd<<2)>>2]|0){pa=-1;R=362;break}wd=wd+1|0;if((wd|0)>=10){pa=1;R=362;break}}if((R|0)==362){i=m;return pa|0}}else if((R|0)==362){i=m;return pa|0}return 0}function gi(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;g=i;i=i+128|0;h=g+112|0;j=g;k=j+0|0;l=16632|0;m=k+112|0;do{c[k>>2]=c[l>>2];k=k+4|0;l=l+4|0}while((k|0)<(m|0));if((d+ -1|0)>>>0>2147483646)if(!d){n=h;o=1}else{c[(Cc()|0)>>2]=75;p=-1;i=g;return p|0}else{n=b;o=d}d=-2-n|0;b=o>>>0>d>>>0?d:o;c[j+48>>2]=b;o=j+20|0;c[o>>2]=n;c[j+44>>2]=n;d=n+b|0;n=j+16|0;c[n>>2]=d;c[j+28>>2]=d;d=ei(j,e,f)|0;if(!b){p=d;i=g;return p|0}b=c[o>>2]|0;a[b+(((b|0)==(c[n>>2]|0))<<31>>31)>>0]=0;p=d;i=g;return p|0}function hi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;f=a+20|0;g=c[f>>2]|0;h=(c[a+16>>2]|0)-g|0;a=h>>>0>d>>>0?d:h;oi(g|0,b|0,a|0)|0;c[f>>2]=(c[f>>2]|0)+a;i=e;return d|0}function ii(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=i;e=gi(a,2147483647,b,c)|0;i=d;return e|0}function ji(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=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;f=i;g=d&255;h=(e|0)==0;a:do if((b&3|0)==0|h){j=e;k=h;l=b;m=5}else{n=d&255;o=e;p=b;while(1){if((a[p>>0]|0)==n<<24>>24){q=o;r=p;m=6;break a}s=p+1|0;t=o+ -1|0;u=(t|0)==0;if((s&3|0)==0|u){j=t;k=u;l=s;m=5;break}else{o=t;p=s}}}while(0);if((m|0)==5)if(k){v=0;w=l}else{q=j;r=l;m=6}b:do if((m|0)==6){l=d&255;if((a[r>>0]|0)!=l<<24>>24){j=aa(g,16843009)|0;c:do if(q>>>0>3){k=q;b=r;while(1){e=c[b>>2]^j;if((e&-2139062144^-2139062144)&e+ -16843009){x=k;y=b;break c}e=b+4|0;h=k+ -4|0;if(h>>>0>3){k=h;b=e}else{x=h;y=e;break}}}else{x=q;y=r}while(0);if(!x){v=0;w=y}else{j=x;b=y;while(1){if((a[b>>0]|0)==l<<24>>24){v=j;w=b;break b}k=b+1|0;j=j+ -1|0;if(!j){v=0;w=k;break}else b=k}}}else{v=q;w=r}}while(0);i=f;return((v|0)!=0?w:0)|0}function ki(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;a:do if(!d)f=0;else{g=d;h=b;j=c;while(1){k=a[h>>0]|0;l=a[j>>0]|0;if(k<<24>>24!=l<<24>>24)break;g=g+ -1|0;if(!g){f=0;break a}else{h=h+1|0;j=j+1|0}}f=(k&255)-(l&255)|0}while(0);i=e;return f|0}function li(b,c){b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;d=i;e=a[b>>0]|0;f=a[c>>0]|0;if(e<<24>>24==0?1:e<<24>>24!=f<<24>>24){g=e;h=f}else{f=b;b=c;do{f=f+1|0;b=b+1|0;c=a[f>>0]|0;e=a[b>>0]|0}while(!(c<<24>>24==0?1:c<<24>>24!=e<<24>>24));g=c;h=e}i=d;return(g&255)-(h&255)|0}function mi(b,c,e){b=b|0;c=c|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=i;if(!e){g=0;i=f;return g|0}h=a[b>>0]|0;a:do if(!(h<<24>>24)){j=0;k=c}else{l=e;m=h;n=b;o=c;while(1){l=l+ -1|0;p=a[o>>0]|0;if(!((l|0)!=0&p<<24>>24!=0&m<<24>>24==p<<24>>24)){j=m;k=o;break a}n=n+1|0;p=o+1|0;m=a[n>>0]|0;if(!(m<<24>>24)){j=0;k=p;break}else o=p}}while(0);g=(j&255)-(d[k>>0]|0)|0;i=f;return g|0}function ni(){}function oi(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;if((e|0)>=4096)return Ga(b|0,d|0,e|0)|0;f=b|0;if((b&3)==(d&3)){while(b&3){if(!e)return f|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}while((e|0)>=4){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0;e=e-4|0}}while((e|0)>0){a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}return f|0}function pi(b,c,d){b=b|0;c=c|0;d=d|0;var e=0;if((c|0)<(b|0)&(b|0)<(c+d|0)){e=b;c=c+d|0;b=b+d|0;while((d|0)>0){b=b-1|0;c=c-1|0;d=d-1|0;a[b>>0]=a[c>>0]|0}b=e}else oi(b,c,d)|0;return b|0}function qi(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=b+e|0;if((e|0)>=20){d=d&255;g=b&3;h=d|d<<8|d<<16|d<<24;i=f&~3;if(g){g=b+4-g|0;while((b|0)<(g|0)){a[b>>0]=d;b=b+1|0}}while((b|0)<(i|0)){c[b>>2]=h;b=b+4|0}}while((b|0)<(f|0)){a[b>>0]=d;b=b+1|0}return b-e|0}function ri(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=b-d>>>0;e=b-d-(c>>>0>a>>>0|0)>>>0;return(E=e,a-c>>>0|0)|0}function si(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=a+c>>>0;return(E=b+d+(e>>>0<a>>>0|0)>>>0,e|0)|0}function ti(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0;while((e|0)<(d|0)){a[b+e>>0]=f?0:a[c+e>>0]|0;f=f?1:(a[c+e>>0]|0)==0;e=e+1|0}return b|0}function ui(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){E=b>>>c;return a>>>c|(b&(1<<c)-1)<<32-c}E=0;return b>>>c-32|0}function vi(b){b=b|0;var c=0;c=b;while(a[c>>0]|0)c=c+1|0;return c-b|0}function wi(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){E=b<<c|(a&(1<<c)-1<<32-c)>>>32-c;return a<<c}E=a<<c-32;return 0}function xi(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){E=b>>c;return a>>>c|(b&(1<<c)-1)<<32-c}E=(b|0)<0?-1:0;return b>>c-32|0}function yi(b){b=b|0;var c=0;c=a[n+(b>>>24)>>0]|0;if((c|0)<8)return c|0;c=a[n+(b>>16&255)>>0]|0;if((c|0)<8)return c+8|0;c=a[n+(b>>8&255)>>0]|0;if((c|0)<8)return c+16|0;return(a[n+(b&255)>>0]|0)+24|0}function zi(b){b=b|0;var c=0;c=a[m+(b&255)>>0]|0;if((c|0)<8)return c|0;c=a[m+(b>>8&255)>>0]|0;if((c|0)<8)return c+8|0;c=a[m+(b>>16&255)>>0]|0;if((c|0)<8)return c+16|0;return(a[m+(b>>>24)>>0]|0)+24|0}function Ai(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=a&65535;d=b&65535;e=aa(d,c)|0;f=a>>>16;a=(e>>>16)+(aa(d,f)|0)|0;d=b>>>16;b=aa(d,c)|0;return(E=(a>>>16)+(aa(d,f)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|e&65535|0)|0}function Bi(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;e=b>>31|((b|0)<0?-1:0)<<1;f=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;g=d>>31|((d|0)<0?-1:0)<<1;h=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;i=ri(e^a,f^b,e,f)|0;b=E;a=g^e;e=h^f;f=ri((Gi(i,b,ri(g^c,h^d,g,h)|0,E,0)|0)^a,E^e,a,e)|0;return f|0}function Ci(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;i=i+8|0;g=f|0;h=b>>31|((b|0)<0?-1:0)<<1;j=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;k=e>>31|((e|0)<0?-1:0)<<1;l=((e|0)<0?-1:0)>>31|((e|0)<0?-1:0)<<1;m=ri(h^a,j^b,h,j)|0;b=E;Gi(m,b,ri(k^d,l^e,k,l)|0,E,g)|0;l=ri(c[g>>2]^h,c[g+4>>2]^j,h,j)|0;j=E;i=f;return(E=j,l)|0}function Di(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;a=c;c=Ai(e,a)|0;f=E;return(E=(aa(b,a)|0)+(aa(d,e)|0)+f|f&0,c|0|0)|0}function Ei(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=Gi(a,b,c,d,0)|0;return e|0}function Fi(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;f=i;i=i+8|0;g=f|0;Gi(a,b,d,e,g)|0;i=f;return(E=c[g+4>>2]|0,c[g>>2]|0)|0}function Gi(a,b,d,e,f){a=a|0;b=b|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,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,F=0,G=0,H=0;g=a;h=b;i=h;j=d;k=e;l=k;if(!i){m=(f|0)!=0;if(!l){if(m){c[f>>2]=(g>>>0)%(j>>>0);c[f+4>>2]=0}n=0;o=(g>>>0)/(j>>>0)>>>0;return(E=n,o)|0}else{if(!m){n=0;o=0;return(E=n,o)|0}c[f>>2]=a|0;c[f+4>>2]=b&0;n=0;o=0;return(E=n,o)|0}}m=(l|0)==0;do if(j){if(!m){p=(yi(l|0)|0)-(yi(i|0)|0)|0;if(p>>>0<=31){q=p+1|0;r=31-p|0;s=p-31>>31;t=q;u=g>>>(q>>>0)&s|i<<r;v=i>>>(q>>>0)&s;w=0;x=g<<r;break}if(!f){n=0;o=0;return(E=n,o)|0}c[f>>2]=a|0;c[f+4>>2]=h|b&0;n=0;o=0;return(E=n,o)|0}r=j-1|0;if(r&j){s=(yi(j|0)|0)+33-(yi(i|0)|0)|0;q=64-s|0;p=32-s|0;y=p>>31;z=s-32|0;A=z>>31;t=s;u=p-1>>31&i>>>(z>>>0)|(i<<p|g>>>(s>>>0))&A;v=A&i>>>(s>>>0);w=g<<q&y;x=(i<<q|g>>>(z>>>0))&y|g<<p&s-33>>31;break}if(f){c[f>>2]=r&g;c[f+4>>2]=0}if((j|0)==1){n=h|b&0;o=a|0|0;return(E=n,o)|0}else{r=zi(j|0)|0;n=i>>>(r>>>0)|0;o=i<<32-r|g>>>(r>>>0)|0;return(E=n,o)|0}}else{if(m){if(f){c[f>>2]=(i>>>0)%(j>>>0);c[f+4>>2]=0}n=0;o=(i>>>0)/(j>>>0)>>>0;return(E=n,o)|0}if(!g){if(f){c[f>>2]=0;c[f+4>>2]=(i>>>0)%(l>>>0)}n=0;o=(i>>>0)/(l>>>0)>>>0;return(E=n,o)|0}r=l-1|0;if(!(r&l)){if(f){c[f>>2]=a|0;c[f+4>>2]=r&i|b&0}n=0;o=i>>>((zi(l|0)|0)>>>0);return(E=n,o)|0}r=(yi(l|0)|0)-(yi(i|0)|0)|0;if(r>>>0<=30){s=r+1|0;p=31-r|0;t=s;u=i<<p|g>>>(s>>>0);v=i>>>(s>>>0);w=0;x=g<<p;break}if(!f){n=0;o=0;return(E=n,o)|0}c[f>>2]=a|0;c[f+4>>2]=h|b&0;n=0;o=0;return(E=n,o)|0}while(0);if(!t){B=x;C=w;D=v;F=u;G=0;H=0}else{b=d|0|0;d=k|e&0;e=si(b,d,-1,-1)|0;k=E;h=x;x=w;w=v;v=u;u=t;t=0;do{a=h;h=x>>>31|h<<1;x=t|x<<1;g=v<<1|a>>>31|0;a=v>>>31|w<<1|0;ri(e,k,g,a)|0;i=E;l=i>>31|((i|0)<0?-1:0)<<1;t=l&1;v=ri(g,a,l&b,(((i|0)<0?-1:0)>>31|((i|0)<0?-1:0)<<1)&d)|0;w=E;u=u-1|0}while((u|0)!=0);B=h;C=x;D=w;F=v;G=0;H=t}t=C;C=0;if(f){c[f>>2]=F;c[f+4>>2]=D}n=(t|0)>>>31|(B|C)<<1|(C<<1|t>>>31)&0|G;o=(t<<1|0>>>31)&-2|H;return(E=n,o)|0}function Hi(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;Oc[a&1](b|0,c|0,d|0,e|0,f|0)}function Ii(a,b,c){a=a|0;b=b|0;c=c|0;Pc[a&7](b|0,c|0)}function Ji(a,b,c,d){a=a|0;b=b|0;c=+c;d=+d;Qc[a&1](b|0,+c,+d)}function Ki(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Rc[a&1](b|0,c|0,d|0)|0}function Li(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Sc[a&1](b|0,c|0,d|0)}function Mi(a){a=a|0;Tc[a&1]()}function Ni(a,b,c){a=a|0;b=b|0;c=c|0;return Uc[a&3](b|0,c|0)|0}function Oi(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;Vc[a&1](b|0,c|0,d|0,e|0)}function Pi(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ba(0)}function Qi(a,b){a=a|0;b=b|0;ba(1)}function Ri(a,b,c){a=a|0;b=+b;c=+c;ba(2)}function Si(a,b,c){a=a|0;b=b|0;c=c|0;ba(3);return 0}function Ti(a,b,c){a=a|0;b=b|0;c=c|0;ba(4)}function Ui(){ba(5)}function Vi(a,b){a=a|0;b=b|0;ba(6);return 0}function Wi(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ba(7)}
// EMSCRIPTEN_END_FUNCS
var Oc=[Pi,Ge];var Pc=[Qi,Ce,Fe,Ie,Ke,Qi,Qi,Qi];var Qc=[Ri,Je];var Rc=[Si,hi];var Sc=[Ti,Ee];var Tc=[Ui,dd];var Uc=[Vi,kh,th,Vi];var Vc=[Wi,He];return{_i64Subtract:ri,_free:Wh,_main:cd,_i64Add:si,_memmove:pi,_memset:qi,_malloc:Vh,_strncpy:ti,_memcpy:oi,_strlen:vi,_bitshift64Lshr:ui,_bitshift64Shl:wi,runPostSets:ni,stackAlloc:Wc,stackSave:Xc,stackRestore:Yc,setThrew:Zc,setTempRet0:ad,getTempRet0:bd,dynCall_viiiii:Hi,dynCall_vii:Ii,dynCall_vidd:Ji,dynCall_iiii:Ki,dynCall_viii:Li,dynCall_v:Mi,dynCall_iii:Ni,dynCall_viiii:Oi}})
// EMSCRIPTEN_END_ASM
(Module.asmGlobalArg,Module.asmLibraryArg,buffer);var _i64Subtract=Module["_i64Subtract"]=asm["_i64Subtract"];var _free=Module["_free"]=asm["_free"];var _main=Module["_main"]=asm["_main"];var _i64Add=Module["_i64Add"]=asm["_i64Add"];var _memmove=Module["_memmove"]=asm["_memmove"];var _memset=Module["_memset"]=asm["_memset"];var _malloc=Module["_malloc"]=asm["_malloc"];var _strncpy=Module["_strncpy"]=asm["_strncpy"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var _strlen=Module["_strlen"]=asm["_strlen"];var _bitshift64Lshr=Module["_bitshift64Lshr"]=asm["_bitshift64Lshr"];var _bitshift64Shl=Module["_bitshift64Shl"]=asm["_bitshift64Shl"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];var dynCall_viiiii=Module["dynCall_viiiii"]=asm["dynCall_viiiii"];var dynCall_vii=Module["dynCall_vii"]=asm["dynCall_vii"];var dynCall_vidd=Module["dynCall_vidd"]=asm["dynCall_vidd"];var dynCall_iiii=Module["dynCall_iiii"]=asm["dynCall_iiii"];var dynCall_viii=Module["dynCall_viii"]=asm["dynCall_viii"];var dynCall_v=Module["dynCall_v"]=asm["dynCall_v"];var dynCall_iii=Module["dynCall_iii"]=asm["dynCall_iii"];var dynCall_viiii=Module["dynCall_viiii"]=asm["dynCall_viiii"];Runtime.stackAlloc=asm["stackAlloc"];Runtime.stackSave=asm["stackSave"];Runtime.stackRestore=asm["stackRestore"];Runtime.setTempRet0=asm["setTempRet0"];Runtime.getTempRet0=asm["getTempRet0"];var i64Math=(function(){var goog={math:{}};goog.math.Long=(function(low,high){this.low_=low|0;this.high_=high|0});goog.math.Long.IntCache_={};goog.math.Long.fromInt=(function(value){if(-128<=value&&value<128){var cachedObj=goog.math.Long.IntCache_[value];if(cachedObj){return cachedObj}}var obj=new goog.math.Long(value|0,value<0?-1:0);if(-128<=value&&value<128){goog.math.Long.IntCache_[value]=obj}return obj});goog.math.Long.fromNumber=(function(value){if(isNaN(value)||!isFinite(value)){return goog.math.Long.ZERO}else if(value<=-goog.math.Long.TWO_PWR_63_DBL_){return goog.math.Long.MIN_VALUE}else if(value+1>=goog.math.Long.TWO_PWR_63_DBL_){return goog.math.Long.MAX_VALUE}else if(value<0){return goog.math.Long.fromNumber(-value).negate()}else{return new goog.math.Long(value%goog.math.Long.TWO_PWR_32_DBL_|0,value/goog.math.Long.TWO_PWR_32_DBL_|0)}});goog.math.Long.fromBits=(function(lowBits,highBits){return new goog.math.Long(lowBits,highBits)});goog.math.Long.fromString=(function(str,opt_radix){if(str.length==0){throw Error("number format error: empty string")}var radix=opt_radix||10;if(radix<2||36<radix){throw Error("radix out of range: "+radix)}if(str.charAt(0)=="-"){return goog.math.Long.fromString(str.substring(1),radix).negate()}else if(str.indexOf("-")>=0){throw Error('number format error: interior "-" character: '+str)}var radixToPower=goog.math.Long.fromNumber(Math.pow(radix,8));var result=goog.math.Long.ZERO;for(var i=0;i<str.length;i+=8){var size=Math.min(8,str.length-i);var value=parseInt(str.substring(i,i+size),radix);if(size<8){var power=goog.math.Long.fromNumber(Math.pow(radix,size));result=result.multiply(power).add(goog.math.Long.fromNumber(value))}else{result=result.multiply(radixToPower);result=result.add(goog.math.Long.fromNumber(value))}}return result});goog.math.Long.TWO_PWR_16_DBL_=1<<16;goog.math.Long.TWO_PWR_24_DBL_=1<<24;goog.math.Long.TWO_PWR_32_DBL_=goog.math.Long.TWO_PWR_16_DBL_*goog.math.Long.TWO_PWR_16_DBL_;goog.math.Long.TWO_PWR_31_DBL_=goog.math.Long.TWO_PWR_32_DBL_/2;goog.math.Long.TWO_PWR_48_DBL_=goog.math.Long.TWO_PWR_32_DBL_*goog.math.Long.TWO_PWR_16_DBL_;goog.math.Long.TWO_PWR_64_DBL_=goog.math.Long.TWO_PWR_32_DBL_*goog.math.Long.TWO_PWR_32_DBL_;goog.math.Long.TWO_PWR_63_DBL_=goog.math.Long.TWO_PWR_64_DBL_/2;goog.math.Long.ZERO=goog.math.Long.fromInt(0);goog.math.Long.ONE=goog.math.Long.fromInt(1);goog.math.Long.NEG_ONE=goog.math.Long.fromInt(-1);goog.math.Long.MAX_VALUE=goog.math.Long.fromBits(4294967295|0,2147483647|0);goog.math.Long.MIN_VALUE=goog.math.Long.fromBits(0,2147483648|0);goog.math.Long.TWO_PWR_24_=goog.math.Long.fromInt(1<<24);goog.math.Long.prototype.toInt=(function(){return this.low_});goog.math.Long.prototype.toNumber=(function(){return this.high_*goog.math.Long.TWO_PWR_32_DBL_+this.getLowBitsUnsigned()});goog.math.Long.prototype.toString=(function(opt_radix){var radix=opt_radix||10;if(radix<2||36<radix){throw Error("radix out of range: "+radix)}if(this.isZero()){return"0"}if(this.isNegative()){if(this.equals(goog.math.Long.MIN_VALUE)){var radixLong=goog.math.Long.fromNumber(radix);var div=this.div(radixLong);var rem=div.multiply(radixLong).subtract(this);return div.toString(radix)+rem.toInt().toString(radix)}else{return"-"+this.negate().toString(radix)}}var radixToPower=goog.math.Long.fromNumber(Math.pow(radix,6));var rem=this;var result="";while(true){var remDiv=rem.div(radixToPower);var intval=rem.subtract(remDiv.multiply(radixToPower)).toInt();var digits=intval.toString(radix);rem=remDiv;if(rem.isZero()){return digits+result}else{while(digits.length<6){digits="0"+digits}result=""+digits+result}}});goog.math.Long.prototype.getHighBits=(function(){return this.high_});goog.math.Long.prototype.getLowBits=(function(){return this.low_});goog.math.Long.prototype.getLowBitsUnsigned=(function(){return this.low_>=0?this.low_:goog.math.Long.TWO_PWR_32_DBL_+this.low_});goog.math.Long.prototype.getNumBitsAbs=(function(){if(this.isNegative()){if(this.equals(goog.math.Long.MIN_VALUE)){return 64}else{return this.negate().getNumBitsAbs()}}else{var val=this.high_!=0?this.high_:this.low_;for(var bit=31;bit>0;bit--){if((val&1<<bit)!=0){break}}return this.high_!=0?bit+33:bit+1}});goog.math.Long.prototype.isZero=(function(){return this.high_==0&&this.low_==0});goog.math.Long.prototype.isNegative=(function(){return this.high_<0});goog.math.Long.prototype.isOdd=(function(){return(this.low_&1)==1});goog.math.Long.prototype.equals=(function(other){return this.high_==other.high_&&this.low_==other.low_});goog.math.Long.prototype.notEquals=(function(other){return this.high_!=other.high_||this.low_!=other.low_});goog.math.Long.prototype.lessThan=(function(other){return this.compare(other)<0});goog.math.Long.prototype.lessThanOrEqual=(function(other){return this.compare(other)<=0});goog.math.Long.prototype.greaterThan=(function(other){return this.compare(other)>0});goog.math.Long.prototype.greaterThanOrEqual=(function(other){return this.compare(other)>=0});goog.math.Long.prototype.compare=(function(other){if(this.equals(other)){return 0}var thisNeg=this.isNegative();var otherNeg=other.isNegative();if(thisNeg&&!otherNeg){return-1}if(!thisNeg&&otherNeg){return 1}if(this.subtract(other).isNegative()){return-1}else{return 1}});goog.math.Long.prototype.negate=(function(){if(this.equals(goog.math.Long.MIN_VALUE)){return goog.math.Long.MIN_VALUE}else{return this.not().add(goog.math.Long.ONE)}});goog.math.Long.prototype.add=(function(other){var a48=this.high_>>>16;var a32=this.high_&65535;var a16=this.low_>>>16;var a00=this.low_&65535;var b48=other.high_>>>16;var b32=other.high_&65535;var b16=other.low_>>>16;var b00=other.low_&65535;var c48=0,c32=0,c16=0,c00=0;c00+=a00+b00;c16+=c00>>>16;c00&=65535;c16+=a16+b16;c32+=c16>>>16;c16&=65535;c32+=a32+b32;c48+=c32>>>16;c32&=65535;c48+=a48+b48;c48&=65535;return goog.math.Long.fromBits(c16<<16|c00,c48<<16|c32)});goog.math.Long.prototype.subtract=(function(other){return this.add(other.negate())});goog.math.Long.prototype.multiply=(function(other){if(this.isZero()){return goog.math.Long.ZERO}else if(other.isZero()){return goog.math.Long.ZERO}if(this.equals(goog.math.Long.MIN_VALUE)){return other.isOdd()?goog.math.Long.MIN_VALUE:goog.math.Long.ZERO}else if(other.equals(goog.math.Long.MIN_VALUE)){return this.isOdd()?goog.math.Long.MIN_VALUE:goog.math.Long.ZERO}if(this.isNegative()){if(other.isNegative()){return this.negate().multiply(other.negate())}else{return this.negate().multiply(other).negate()}}else if(other.isNegative()){return this.multiply(other.negate()).negate()}if(this.lessThan(goog.math.Long.TWO_PWR_24_)&&other.lessThan(goog.math.Long.TWO_PWR_24_)){return goog.math.Long.fromNumber(this.toNumber()*other.toNumber())}var a48=this.high_>>>16;var a32=this.high_&65535;var a16=this.low_>>>16;var a00=this.low_&65535;var b48=other.high_>>>16;var b32=other.high_&65535;var b16=other.low_>>>16;var b00=other.low_&65535;var c48=0,c32=0,c16=0,c00=0;c00+=a00*b00;c16+=c00>>>16;c00&=65535;c16+=a16*b00;c32+=c16>>>16;c16&=65535;c16+=a00*b16;c32+=c16>>>16;c16&=65535;c32+=a32*b00;c48+=c32>>>16;c32&=65535;c32+=a16*b16;c48+=c32>>>16;c32&=65535;c32+=a00*b32;c48+=c32>>>16;c32&=65535;c48+=a48*b00+a32*b16+a16*b32+a00*b48;c48&=65535;return goog.math.Long.fromBits(c16<<16|c00,c48<<16|c32)});goog.math.Long.prototype.div=(function(other){if(other.isZero()){throw Error("division by zero")}else if(this.isZero()){return goog.math.Long.ZERO}if(this.equals(goog.math.Long.MIN_VALUE)){if(other.equals(goog.math.Long.ONE)||other.equals(goog.math.Long.NEG_ONE)){return goog.math.Long.MIN_VALUE}else if(other.equals(goog.math.Long.MIN_VALUE)){return goog.math.Long.ONE}else{var halfThis=this.shiftRight(1);var approx=halfThis.div(other).shiftLeft(1);if(approx.equals(goog.math.Long.ZERO)){return other.isNegative()?goog.math.Long.ONE:goog.math.Long.NEG_ONE}else{var rem=this.subtract(other.multiply(approx));var result=approx.add(rem.div(other));return result}}}else if(other.equals(goog.math.Long.MIN_VALUE)){return goog.math.Long.ZERO}if(this.isNegative()){if(other.isNegative()){return this.negate().div(other.negate())}else{return this.negate().div(other).negate()}}else if(other.isNegative()){return this.div(other.negate()).negate()}var res=goog.math.Long.ZERO;var rem=this;while(rem.greaterThanOrEqual(other)){var approx=Math.max(1,Math.floor(rem.toNumber()/other.toNumber()));var log2=Math.ceil(Math.log(approx)/Math.LN2);var delta=log2<=48?1:Math.pow(2,log2-48);var approxRes=goog.math.Long.fromNumber(approx);var approxRem=approxRes.multiply(other);while(approxRem.isNegative()||approxRem.greaterThan(rem)){approx-=delta;approxRes=goog.math.Long.fromNumber(approx);approxRem=approxRes.multiply(other)}if(approxRes.isZero()){approxRes=goog.math.Long.ONE}res=res.add(approxRes);rem=rem.subtract(approxRem)}return res});goog.math.Long.prototype.modulo=(function(other){return this.subtract(this.div(other).multiply(other))});goog.math.Long.prototype.not=(function(){return goog.math.Long.fromBits(~this.low_,~this.high_)});goog.math.Long.prototype.and=(function(other){return goog.math.Long.fromBits(this.low_&other.low_,this.high_&other.high_)});goog.math.Long.prototype.or=(function(other){return goog.math.Long.fromBits(this.low_|other.low_,this.high_|other.high_)});goog.math.Long.prototype.xor=(function(other){return goog.math.Long.fromBits(this.low_^other.low_,this.high_^other.high_)});goog.math.Long.prototype.shiftLeft=(function(numBits){numBits&=63;if(numBits==0){return this}else{var low=this.low_;if(numBits<32){var high=this.high_;return goog.math.Long.fromBits(low<<numBits,high<<numBits|low>>>32-numBits)}else{return goog.math.Long.fromBits(0,low<<numBits-32)}}});goog.math.Long.prototype.shiftRight=(function(numBits){numBits&=63;if(numBits==0){return this}else{var high=this.high_;if(numBits<32){var low=this.low_;return goog.math.Long.fromBits(low>>>numBits|high<<32-numBits,high>>numBits)}else{return goog.math.Long.fromBits(high>>numBits-32,high>=0?0:-1)}}});goog.math.Long.prototype.shiftRightUnsigned=(function(numBits){numBits&=63;if(numBits==0){return this}else{var high=this.high_;if(numBits<32){var low=this.low_;return goog.math.Long.fromBits(low>>>numBits|high<<32-numBits,high>>>numBits)}else if(numBits==32){return goog.math.Long.fromBits(high,0)}else{return goog.math.Long.fromBits(high>>>numBits-32,0)}}});var navigator={appName:"Modern Browser"};var dbits;var canary=0xdeadbeefcafe;var j_lm=(canary&16777215)==15715070;function BigInteger(a,b,c){if(a!=null)if("number"==typeof a)this.fromNumber(a,b,c);else if(b==null&&"string"!=typeof a)this.fromString(a,256);else this.fromString(a,b)}function nbi(){return new BigInteger(null)}function am1(i,x,w,j,c,n){while(--n>=0){var v=x*this[i++]+w[j]+c;c=Math.floor(v/67108864);w[j++]=v&67108863}return c}function am2(i,x,w,j,c,n){var xl=x&32767,xh=x>>15;while(--n>=0){var l=this[i]&32767;var h=this[i++]>>15;var m=xh*l+h*xl;l=xl*l+((m&32767)<<15)+w[j]+(c&1073741823);c=(l>>>30)+(m>>>15)+xh*h+(c>>>30);w[j++]=l&1073741823}return c}function am3(i,x,w,j,c,n){var xl=x&16383,xh=x>>14;while(--n>=0){var l=this[i]&16383;var h=this[i++]>>14;var m=xh*l+h*xl;l=xl*l+((m&16383)<<14)+w[j]+c;c=(l>>28)+(m>>14)+xh*h;w[j++]=l&268435455}return c}if(j_lm&&navigator.appName=="Microsoft Internet Explorer"){BigInteger.prototype.am=am2;dbits=30}else if(j_lm&&navigator.appName!="Netscape"){BigInteger.prototype.am=am1;dbits=26}else{BigInteger.prototype.am=am3;dbits=28}BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=(1<<dbits)-1;BigInteger.prototype.DV=1<<dbits;var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP);BigInteger.prototype.F1=BI_FP-dbits;BigInteger.prototype.F2=2*dbits-BI_FP;var BI_RM="0123456789abcdefghijklmnopqrstuvwxyz";var BI_RC=new Array;var rr,vv;rr="0".charCodeAt(0);for(vv=0;vv<=9;++vv)BI_RC[rr++]=vv;rr="a".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;rr="A".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;function int2char(n){return BI_RM.charAt(n)}function intAt(s,i){var c=BI_RC[s.charCodeAt(i)];return c==null?-1:c}function bnpCopyTo(r){for(var i=this.t-1;i>=0;--i)r[i]=this[i];r.t=this.t;r.s=this.s}function bnpFromInt(x){this.t=1;this.s=x<0?-1:0;if(x>0)this[0]=x;else if(x<-1)this[0]=x+DV;else this.t=0}function nbv(i){var r=nbi();r.fromInt(i);return r}function bnpFromString(s,b){var k;if(b==16)k=4;else if(b==8)k=3;else if(b==256)k=8;else if(b==2)k=1;else if(b==32)k=5;else if(b==4)k=2;else{this.fromRadix(s,b);return}this.t=0;this.s=0;var i=s.length,mi=false,sh=0;while(--i>=0){var x=k==8?s[i]&255:intAt(s,i);if(x<0){if(s.charAt(i)=="-")mi=true;continue}mi=false;if(sh==0)this[this.t++]=x;else if(sh+k>this.DB){this[this.t-1]|=(x&(1<<this.DB-sh)-1)<<sh;this[this.t++]=x>>this.DB-sh}else this[this.t-1]|=x<<sh;sh+=k;if(sh>=this.DB)sh-=this.DB}if(k==8&&(s[0]&128)!=0){this.s=-1;if(sh>0)this[this.t-1]|=(1<<this.DB-sh)-1<<sh}this.clamp();if(mi)BigInteger.ZERO.subTo(this,this)}function bnpClamp(){var c=this.s&this.DM;while(this.t>0&&this[this.t-1]==c)--this.t}function bnToString(b){if(this.s<0)return"-"+this.negate().toString(b);var k;if(b==16)k=4;else if(b==8)k=3;else if(b==2)k=1;else if(b==32)k=5;else if(b==4)k=2;else return this.toRadix(b);var km=(1<<k)-1,d,m=false,r="",i=this.t;var p=this.DB-i*this.DB%k;if(i-->0){if(p<this.DB&&(d=this[i]>>p)>0){m=true;r=int2char(d)}while(i>=0){if(p<k){d=(this[i]&(1<<p)-1)<<k-p;d|=this[--i]>>(p+=this.DB-k)}else{d=this[i]>>(p-=k)&km;if(p<=0){p+=this.DB;--i}}if(d>0)m=true;if(m)r+=int2char(d)}}return m?r:"0"}function bnNegate(){var r=nbi();BigInteger.ZERO.subTo(this,r);return r}function bnAbs(){return this.s<0?this.negate():this}function bnCompareTo(a){var r=this.s-a.s;if(r!=0)return r;var i=this.t;r=i-a.t;if(r!=0)return this.s<0?-r:r;while(--i>=0)if((r=this[i]-a[i])!=0)return r;return 0}function nbits(x){var r=1,t;if((t=x>>>16)!=0){x=t;r+=16}if((t=x>>8)!=0){x=t;r+=8}if((t=x>>4)!=0){x=t;r+=4}if((t=x>>2)!=0){x=t;r+=2}if((t=x>>1)!=0){x=t;r+=1}return r}function bnBitLength(){if(this.t<=0)return 0;return this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}function bnpDLShiftTo(n,r){var i;for(i=this.t-1;i>=0;--i)r[i+n]=this[i];for(i=n-1;i>=0;--i)r[i]=0;r.t=this.t+n;r.s=this.s}function bnpDRShiftTo(n,r){for(var i=n;i<this.t;++i)r[i-n]=this[i];r.t=Math.max(this.t-n,0);r.s=this.s}function bnpLShiftTo(n,r){var bs=n%this.DB;var cbs=this.DB-bs;var bm=(1<<cbs)-1;var ds=Math.floor(n/this.DB),c=this.s<<bs&this.DM,i;for(i=this.t-1;i>=0;--i){r[i+ds+1]=this[i]>>cbs|c;c=(this[i]&bm)<<bs}for(i=ds-1;i>=0;--i)r[i]=0;r[ds]=c;r.t=this.t+ds+1;r.s=this.s;r.clamp()}function bnpRShiftTo(n,r){r.s=this.s;var ds=Math.floor(n/this.DB);if(ds>=this.t){r.t=0;return}var bs=n%this.DB;var cbs=this.DB-bs;var bm=(1<<bs)-1;r[0]=this[ds]>>bs;for(var i=ds+1;i<this.t;++i){r[i-ds-1]|=(this[i]&bm)<<cbs;r[i-ds]=this[i]>>bs}if(bs>0)r[this.t-ds-1]|=(this.s&bm)<<cbs;r.t=this.t-ds;r.clamp()}function bnpSubTo(a,r){var i=0,c=0,m=Math.min(a.t,this.t);while(i<m){c+=this[i]-a[i];r[i++]=c&this.DM;c>>=this.DB}if(a.t<this.t){c-=a.s;while(i<this.t){c+=this[i];r[i++]=c&this.DM;c>>=this.DB}c+=this.s}else{c+=this.s;while(i<a.t){c-=a[i];r[i++]=c&this.DM;c>>=this.DB}c-=a.s}r.s=c<0?-1:0;if(c<-1)r[i++]=this.DV+c;else if(c>0)r[i++]=c;r.t=i;r.clamp()}function bnpMultiplyTo(a,r){var x=this.abs(),y=a.abs();var i=x.t;r.t=i+y.t;while(--i>=0)r[i]=0;for(i=0;i<y.t;++i)r[i+x.t]=x.am(0,y[i],r,i,0,x.t);r.s=0;r.clamp();if(this.s!=a.s)BigInteger.ZERO.subTo(r,r)}function bnpSquareTo(r){var x=this.abs();var i=r.t=2*x.t;while(--i>=0)r[i]=0;for(i=0;i<x.t-1;++i){var c=x.am(i,x[i],r,2*i,0,1);if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1))>=x.DV){r[i+x.t]-=x.DV;r[i+x.t+1]=1}}if(r.t>0)r[r.t-1]+=x.am(i,x[i],r,2*i,0,1);r.s=0;r.clamp()}function bnpDivRemTo(m,q,r){var pm=m.abs();if(pm.t<=0)return;var pt=this.abs();if(pt.t<pm.t){if(q!=null)q.fromInt(0);if(r!=null)this.copyTo(r);return}if(r==null)r=nbi();var y=nbi(),ts=this.s,ms=m.s;var nsh=this.DB-nbits(pm[pm.t-1]);if(nsh>0){pm.lShiftTo(nsh,y);pt.lShiftTo(nsh,r)}else{pm.copyTo(y);pt.copyTo(r)}var ys=y.t;var y0=y[ys-1];if(y0==0)return;var yt=y0*(1<<this.F1)+(ys>1?y[ys-2]>>this.F2:0);var d1=this.FV/yt,d2=(1<<this.F1)/yt,e=1<<this.F2;var i=r.t,j=i-ys,t=q==null?nbi():q;y.dlShiftTo(j,t);if(r.compareTo(t)>=0){r[r.t++]=1;r.subTo(t,r)}BigInteger.ONE.dlShiftTo(ys,t);t.subTo(y,y);while(y.t<ys)y[y.t++]=0;while(--j>=0){var qd=r[--i]==y0?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);if((r[i]+=y.am(0,qd,r,j,0,ys))<qd){y.dlShiftTo(j,t);r.subTo(t,r);while(r[i]<--qd)r.subTo(t,r)}}if(q!=null){r.drShiftTo(ys,q);if(ts!=ms)BigInteger.ZERO.subTo(q,q)}r.t=ys;r.clamp();if(nsh>0)r.rShiftTo(nsh,r);if(ts<0)BigInteger.ZERO.subTo(r,r)}function bnMod(a){var r=nbi();this.abs().divRemTo(a,null,r);if(this.s<0&&r.compareTo(BigInteger.ZERO)>0)a.subTo(r,r);return r}function Classic(m){this.m=m}function cConvert(x){if(x.s<0||x.compareTo(this.m)>=0)return x.mod(this.m);else return x}function cRevert(x){return x}function cReduce(x){x.divRemTo(this.m,null,x)}function cMulTo(x,y,r){x.multiplyTo(y,r);this.reduce(r)}function cSqrTo(x,r){x.squareTo(r);this.reduce(r)}Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;function bnpInvDigit(){if(this.t<1)return 0;var x=this[0];if((x&1)==0)return 0;var y=x&3;y=y*(2-(x&15)*y)&15;y=y*(2-(x&255)*y)&255;y=y*(2-((x&65535)*y&65535))&65535;y=y*(2-x*y%this.DV)%this.DV;return y>0?this.DV-y:-y}function Montgomery(m){this.m=m;this.mp=m.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<m.DB-15)-1;this.mt2=2*m.t}function montConvert(x){var r=nbi();x.abs().dlShiftTo(this.m.t,r);r.divRemTo(this.m,null,r);if(x.s<0&&r.compareTo(BigInteger.ZERO)>0)this.m.subTo(r,r);return r}function montRevert(x){var r=nbi();x.copyTo(r);this.reduce(r);return r}function montReduce(x){while(x.t<=this.mt2)x[x.t++]=0;for(var i=0;i<this.m.t;++i){var j=x[i]&32767;var u0=j*this.mpl+((j*this.mph+(x[i]>>15)*this.mpl&this.um)<<15)&x.DM;j=i+this.m.t;x[j]+=this.m.am(0,u0,x,i,0,this.m.t);while(x[j]>=x.DV){x[j]-=x.DV;x[++j]++}}x.clamp();x.drShiftTo(this.m.t,x);if(x.compareTo(this.m)>=0)x.subTo(this.m,x)}function montSqrTo(x,r){x.squareTo(r);this.reduce(r)}function montMulTo(x,y,r){x.multiplyTo(y,r);this.reduce(r)}Montgomery.prototype.convert=montConvert;Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;function bnpIsEven(){return(this.t>0?this[0]&1:this.s)==0}function bnpExp(e,z){if(e>4294967295||e<1)return BigInteger.ONE;var r=nbi(),r2=nbi(),g=z.convert(this),i=nbits(e)-1;g.copyTo(r);while(--i>=0){z.sqrTo(r,r2);if((e&1<<i)>0)z.mulTo(r2,g,r);else{var t=r;r=r2;r2=t}}return z.revert(r)}function bnModPowInt(e,m){var z;if(e<256||m.isEven())z=new Classic(m);else z=new Montgomery(m);return this.exp(e,z)}BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1);function bnpFromRadix(s,b){this.fromInt(0);if(b==null)b=10;var cs=this.chunkSize(b);var d=Math.pow(b,cs),mi=false,j=0,w=0;for(var i=0;i<s.length;++i){var x=intAt(s,i);if(x<0){if(s.charAt(i)=="-"&&this.signum()==0)mi=true;continue}w=b*w+x;if(++j>=cs){this.dMultiply(d);this.dAddOffset(w,0);j=0;w=0}}if(j>0){this.dMultiply(Math.pow(b,j));this.dAddOffset(w,0)}if(mi)BigInteger.ZERO.subTo(this,this)}function bnpChunkSize(r){return Math.floor(Math.LN2*this.DB/Math.log(r))}function bnSigNum(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this[0]<=0)return 0;else return 1}function bnpDMultiply(n){this[this.t]=this.am(0,n-1,this,0,0,this.t);++this.t;this.clamp()}function bnpDAddOffset(n,w){if(n==0)return;while(this.t<=w)this[this.t++]=0;this[w]+=n;while(this[w]>=this.DV){this[w]-=this.DV;if(++w>=this.t)this[this.t++]=0;++this[w]}}function bnpToRadix(b){if(b==null)b=10;if(this.signum()==0||b<2||b>36)return"0";var cs=this.chunkSize(b);var a=Math.pow(b,cs);var d=nbv(a),y=nbi(),z=nbi(),r="";this.divRemTo(d,y,z);while(y.signum()>0){r=(a+z.intValue()).toString(b).substr(1)+r;y.divRemTo(d,y,z)}return z.intValue().toString(b)+r}function bnIntValue(){if(this.s<0){if(this.t==1)return this[0]-this.DV;else if(this.t==0)return-1}else if(this.t==1)return this[0];else if(this.t==0)return 0;return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function bnpAddTo(a,r){var i=0,c=0,m=Math.min(a.t,this.t);while(i<m){c+=this[i]+a[i];r[i++]=c&this.DM;c>>=this.DB}if(a.t<this.t){c+=a.s;while(i<this.t){c+=this[i];r[i++]=c&this.DM;c>>=this.DB}c+=this.s}else{c+=this.s;while(i<a.t){c+=a[i];r[i++]=c&this.DM;c>>=this.DB}c+=a.s}r.s=c<0?-1:0;if(c>0)r[i++]=c;else if(c<-1)r[i++]=this.DV+c;r.t=i;r.clamp()}BigInteger.prototype.fromRadix=bnpFromRadix;BigInteger.prototype.chunkSize=bnpChunkSize;BigInteger.prototype.signum=bnSigNum;BigInteger.prototype.dMultiply=bnpDMultiply;BigInteger.prototype.dAddOffset=bnpDAddOffset;BigInteger.prototype.toRadix=bnpToRadix;BigInteger.prototype.intValue=bnIntValue;BigInteger.prototype.addTo=bnpAddTo;var Wrapper={abs:(function(l,h){var x=new goog.math.Long(l,h);var ret;if(x.isNegative()){ret=x.negate()}else{ret=x}HEAP32[tempDoublePtr>>2]=ret.low_;HEAP32[tempDoublePtr+4>>2]=ret.high_}),ensureTemps:(function(){if(Wrapper.ensuredTemps)return;Wrapper.ensuredTemps=true;Wrapper.two32=new BigInteger;Wrapper.two32.fromString("4294967296",10);Wrapper.two64=new BigInteger;Wrapper.two64.fromString("18446744073709551616",10);Wrapper.temp1=new BigInteger;Wrapper.temp2=new BigInteger}),lh2bignum:(function(l,h){var a=new BigInteger;a.fromString(h.toString(),10);var b=new BigInteger;a.multiplyTo(Wrapper.two32,b);var c=new BigInteger;c.fromString(l.toString(),10);var d=new BigInteger;c.addTo(b,d);return d}),stringify:(function(l,h,unsigned){var ret=(new goog.math.Long(l,h)).toString();if(unsigned&&ret[0]=="-"){Wrapper.ensureTemps();var bignum=new BigInteger;bignum.fromString(ret,10);ret=new BigInteger;Wrapper.two64.addTo(bignum,ret);ret=ret.toString(10)}return ret}),fromString:(function(str,base,min,max,unsigned){Wrapper.ensureTemps();var bignum=new BigInteger;bignum.fromString(str,base);var bigmin=new BigInteger;bigmin.fromString(min,10);var bigmax=new BigInteger;bigmax.fromString(max,10);if(unsigned&&bignum.compareTo(BigInteger.ZERO)<0){var temp=new BigInteger;bignum.addTo(Wrapper.two64,temp);bignum=temp}var error=false;if(bignum.compareTo(bigmin)<0){bignum=bigmin;error=true}else if(bignum.compareTo(bigmax)>0){bignum=bigmax;error=true}var ret=goog.math.Long.fromString(bignum.toString());HEAP32[tempDoublePtr>>2]=ret.low_;HEAP32[tempDoublePtr+4>>2]=ret.high_;if(error)throw"range error"})};return Wrapper})();if(memoryInitializer){if(typeof Module["locateFile"]==="function"){memoryInitializer=Module["locateFile"](memoryInitializer)}else if(Module["memoryInitializerPrefixURL"]){memoryInitializer=Module["memoryInitializerPrefixURL"]+memoryInitializer}if(ENVIRONMENT_IS_NODE||ENVIRONMENT_IS_SHELL){var data=Module["readBinary"](memoryInitializer);HEAPU8.set(data,STATIC_BASE)}else{addRunDependency("memory initializer");Browser.asyncLoad(memoryInitializer,(function(data){HEAPU8.set(data,STATIC_BASE);removeRunDependency("memory initializer")}),(function(data){throw"could not load memory initializer "+memoryInitializer}))}}function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;var preloadStartTime=null;var calledMain=false;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"]&&shouldRunNow)run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};Module["callMain"]=Module.callMain=function callMain(args){assert(runDependencies==0,"cannot call main when async dependencies remain! (listen on __ATMAIN__)");assert(__ATPRERUN__.length==0,"cannot call main when preRun functions remain to be called");args=args||[];ensureInitRuntime();var argc=args.length+1;function pad(){for(var i=0;i<4-1;i++){argv.push(0)}}var argv=[allocate(intArrayFromString(Module["thisProgram"]),"i8",ALLOC_NORMAL)];pad();for(var i=0;i<argc-1;i=i+1){argv.push(allocate(intArrayFromString(args[i]),"i8",ALLOC_NORMAL));pad()}argv.push(0);argv=allocate(argv,"i32",ALLOC_NORMAL);initialStackTop=STACKTOP;try{var ret=Module["_main"](argc,argv,0);exit(ret)}catch(e){if(e instanceof ExitStatus){return}else if(e=="SimulateInfiniteLoop"){Module["noExitRuntime"]=true;return}else{if(e&&typeof e==="object"&&e.stack)Module.printErr("exception thrown: "+[e,e.stack]);throw e}}finally{calledMain=true}};function run(args){args=args||Module["arguments"];if(preloadStartTime===null)preloadStartTime=Date.now();if(runDependencies>0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(ENVIRONMENT_IS_WEB&&preloadStartTime!==null){Module.printErr("pre-main prep time: "+(Date.now()-preloadStartTime)+" ms")}if(Module["_main"]&&shouldRunNow){Module["callMain"](args)}postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout((function(){setTimeout((function(){Module["setStatus"]("")}),1);doRun()}),1)}else{doRun()}}Module["run"]=Module.run=run;function exit(status){if(Module["noExitRuntime"]){return}ABORT=true;EXITSTATUS=status;STACKTOP=initialStackTop;exitRuntime();if(ENVIRONMENT_IS_NODE){process["stdout"]["once"]("drain",(function(){process["exit"](status)}));console.log(" ");setTimeout((function(){process["exit"](status)}),500)}else if(ENVIRONMENT_IS_SHELL&&typeof quit==="function"){quit(status)}throw new ExitStatus(status)}Module["exit"]=Module.exit=exit;function abort(text){if(text){Module.print(text);Module.printErr(text)}ABORT=true;EXITSTATUS=1;var extra="\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";throw"abort() at "+stackTrace()+extra}Module["abort"]=Module.abort=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"]){shouldRunNow=false}run()